@mjhls/mjh-framework 1.0.402 → 1.0.403

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.
Files changed (44) hide show
  1. package/README.md +1 -1
  2. package/dist/cjs/{ADInfeed-d1783f42.js → ADInfeed-494f5e6b.js} +1 -1
  3. package/dist/cjs/{AdSlot-20aa927e.js → AdSlot-4d22aad4.js} +2 -2
  4. package/dist/cjs/DeckContent.js +9 -7
  5. package/dist/cjs/DeckQueue.js +6 -4
  6. package/dist/cjs/{Dfp-27b922b0.js → Dfp-2399639f.js} +1 -1
  7. package/dist/cjs/{Figure-8dd7df44.js → Figure-04d4a60d.js} +1 -1
  8. package/dist/cjs/{GridContent-c0c0d3e5.js → GridContent-2f42692a.js} +7 -6
  9. package/dist/cjs/GridContent.js +9 -7
  10. package/dist/cjs/IssueDeck.js +182 -86
  11. package/dist/cjs/MasterDeck.js +21 -7
  12. package/dist/cjs/{Normal-c1c98dcf.js → Normal-4a0d7dfc.js} +82 -2
  13. package/dist/cjs/QueueDeckExpanded.js +9 -7
  14. package/dist/cjs/TemplateNormal.js +5 -4
  15. package/dist/cjs/VideoSeriesListing.js +3 -2
  16. package/dist/cjs/_iter-detect-234453c3.js +53 -0
  17. package/dist/cjs/index.es-ab3f2690.js +428 -0
  18. package/dist/cjs/index.js +19 -97
  19. package/dist/cjs/{main-2020ba94.js → main-bc4db521.js} +0 -50
  20. package/dist/cjs/{promise-d5136080.js → promise-0a493c7a.js} +4 -4
  21. package/dist/cjs/{toConsumableArray-3cf1df2c.js → toConsumableArray-25d0e2a3.js} +4 -4
  22. package/dist/cjs/{visibility-sensor-43e0b37c.js → visibility-sensor-0c45a583.js} +0 -421
  23. package/dist/esm/{ADInfeed-40adc8e0.js → ADInfeed-e5cefea5.js} +1 -1
  24. package/dist/esm/{AdSlot-c3ed3214.js → AdSlot-78e48a2c.js} +2 -2
  25. package/dist/esm/DeckContent.js +8 -6
  26. package/dist/esm/DeckQueue.js +5 -3
  27. package/dist/esm/{Dfp-3b3273ee.js → Dfp-d5fe1252.js} +1 -1
  28. package/dist/esm/{Figure-f269f495.js → Figure-e32f60c5.js} +1 -1
  29. package/dist/esm/{GridContent-b042eb2d.js → GridContent-cafb2fe4.js} +6 -5
  30. package/dist/esm/GridContent.js +9 -7
  31. package/dist/esm/IssueDeck.js +183 -87
  32. package/dist/esm/MasterDeck.js +20 -6
  33. package/dist/esm/{Normal-68ef59cd.js → Normal-b8c423e3.js} +82 -3
  34. package/dist/esm/QueueDeckExpanded.js +8 -6
  35. package/dist/esm/TemplateNormal.js +5 -4
  36. package/dist/esm/VideoSeriesListing.js +2 -1
  37. package/dist/esm/_iter-detect-7c281f0a.js +49 -0
  38. package/dist/esm/index.es-938a3a58.js +423 -0
  39. package/dist/esm/index.js +16 -94
  40. package/dist/esm/{main-25bb2c75.js → main-7d1b3c98.js} +1 -48
  41. package/dist/esm/{promise-5d7cd78a.js → promise-2592a80a.js} +1 -1
  42. package/dist/esm/{toConsumableArray-d7054876.js → toConsumableArray-c5e2fde8.js} +1 -1
  43. package/dist/esm/{visibility-sensor-49d5805d.js → visibility-sensor-0baa4eea.js} +2 -422
  44. package/package.json +1 -1
@@ -1,5 +1,4 @@
1
- import { m as main_39 } from './main-25bb2c75.js';
2
- import { _ as _toConsumableArray } from './toConsumableArray-d7054876.js';
1
+ import { _ as _toConsumableArray } from './toConsumableArray-c5e2fde8.js';
3
2
  import { _ as _extends } from './extends-92072fff.js';
4
3
  import { a as _inherits, b as _classCallCheck, c as _possibleConstructorReturn, d as _Object$getPrototypeOf, e as _createClass } from './inherits-dfba24f5.js';
5
4
  import React__default, { Suspense } from 'react';
@@ -10,16 +9,18 @@ import Col from 'react-bootstrap/Col';
10
9
  import Card from 'react-bootstrap/Card';
11
10
  import { m as moment } from './moment-12415288.js';
12
11
  import { withRouter } from 'next/router';
13
- import { V as VisibilitySensor, I as InfiniteScroll } from './visibility-sensor-49d5805d.js';
12
+ import { I as InfiniteScroll } from './index.es-938a3a58.js';
13
+ import { V as VisibilitySensor } from './visibility-sensor-0baa4eea.js';
14
14
  import { i as imageUrlBuilder } from './index-51a80699.js';
15
15
  import { L as LazyLoad } from './index-5f9f807a.js';
16
+ import { m as main_39 } from './main-7d1b3c98.js';
16
17
  import { c as clean_html_1 } from './entities-7cc3bf45.js';
17
- import { A as ADInfeed } from './ADInfeed-40adc8e0.js';
18
+ import { A as ADInfeed } from './ADInfeed-e5cefea5.js';
18
19
  import { g as get_1 } from './get-53653403.js';
19
20
  import { A as AuthorComponent } from './AuthorComponent-c9e46673.js';
20
21
 
21
22
  var Dfp = React__default.lazy(function () {
22
- return import('./Dfp-3b3273ee.js');
23
+ return import('./Dfp-d5fe1252.js');
23
24
  });
24
25
 
25
26
  var AD = function AD(props) {
@@ -2,8 +2,8 @@ import './_commonjsHelpers-0c4b6f40.js';
2
2
  import './_to-object-1b1f7766.js';
3
3
  import './web.dom.iterable-e6bf2bf6.js';
4
4
  import './_library-528f1934.js';
5
- import './main-25bb2c75.js';
6
- import './toConsumableArray-d7054876.js';
5
+ import './_iter-detect-7c281f0a.js';
6
+ import './toConsumableArray-c5e2fde8.js';
7
7
  import './_object-pie-33c40e79.js';
8
8
  import './extends-92072fff.js';
9
9
  import './inherits-dfba24f5.js';
@@ -17,15 +17,17 @@ import 'react-bootstrap/Col';
17
17
  import 'react-bootstrap/Card';
18
18
  import './moment-12415288.js';
19
19
  import 'next/router';
20
- import './visibility-sensor-49d5805d.js';
20
+ import './index.es-938a3a58.js';
21
21
  import 'react-dom';
22
+ import './visibility-sensor-0baa4eea.js';
22
23
  import './index-51a80699.js';
23
24
  import './index-5f9f807a.js';
25
+ import './main-7d1b3c98.js';
24
26
  import './entities-7cc3bf45.js';
25
27
  import './slicedToArray-04e02710.js';
26
- import './AdSlot-c3ed3214.js';
27
- import './promise-5d7cd78a.js';
28
- import './ADInfeed-40adc8e0.js';
28
+ import './AdSlot-78e48a2c.js';
29
+ import './promise-2592a80a.js';
30
+ import './ADInfeed-e5cefea5.js';
29
31
  import './get-53653403.js';
30
- export { G as default } from './GridContent-b042eb2d.js';
32
+ export { G as default } from './GridContent-cafb2fe4.js';
31
33
  import './AuthorComponent-c9e46673.js';
@@ -1,14 +1,30 @@
1
1
  import './_commonjsHelpers-0c4b6f40.js';
2
- import React__default from 'react';
2
+ import './_to-object-1b1f7766.js';
3
+ import './web.dom.iterable-e6bf2bf6.js';
4
+ import './_iter-detect-7c281f0a.js';
5
+ import { _ as _toConsumableArray } from './toConsumableArray-c5e2fde8.js';
6
+ import './_object-pie-33c40e79.js';
7
+ import { _ as _extends } from './extends-92072fff.js';
8
+ import React__default, { useState, useRef, useEffect } from 'react';
3
9
  import 'prop-types';
4
10
  import Row from 'react-bootstrap/Row';
5
11
  import Col from 'react-bootstrap/Col';
6
12
  import Card from 'react-bootstrap/Card';
13
+ import { I as InfiniteScroll } from './index.es-938a3a58.js';
7
14
  import 'react-dom';
8
15
  import { i as imageUrlBuilder } from './index-51a80699.js';
9
16
  import { L as LazyLoad } from './index-5f9f807a.js';
17
+ import { _ as _slicedToArray } from './slicedToArray-04e02710.js';
10
18
  import Button from 'react-bootstrap/Button';
11
19
 
20
+ var usePrevious = function usePrevious(value) {
21
+ var ref = useRef();
22
+ useEffect(function () {
23
+ ref.current = value;
24
+ });
25
+ return ref.current;
26
+ };
27
+
12
28
  var IssueDeck = function IssueDeck(props) {
13
29
  var data = props.data,
14
30
  href = props.href,
@@ -16,8 +32,36 @@ var IssueDeck = function IssueDeck(props) {
16
32
  imageWidth = props.imageWidth,
17
33
  Website = props.Website,
18
34
  client = props.client,
19
- publication = props.publication;
35
+ publication = props.publication,
36
+ query = props.query,
37
+ params = props.params;
38
+
39
+ var _useState = useState(params ? params.count : 0),
40
+ _useState2 = _slicedToArray(_useState, 1),
41
+ count = _useState2[0];
42
+
43
+ var _useState3 = useState(true),
44
+ _useState4 = _slicedToArray(_useState3, 2),
45
+ scrolling = _useState4[0],
46
+ setScrolling = _useState4[1];
47
+
48
+ var _useState5 = useState(data),
49
+ _useState6 = _slicedToArray(_useState5, 2),
50
+ issuesData = _useState6[0],
51
+ setIssuesData = _useState6[1];
52
+
53
+ var _useState7 = useState({
54
+ from: params ? params.from : 0,
55
+ to: params ? params.to : 0,
56
+ page: 1
57
+ }),
58
+ _useState8 = _slicedToArray(_useState7, 2),
59
+ values = _useState8[0],
60
+ setValues = _useState8[1];
20
61
 
62
+ var deckRef = useRef(null);
63
+
64
+ var prevValues = usePrevious(values);
21
65
 
22
66
  var urlFor = function urlFor(source) {
23
67
  var builder = imageUrlBuilder(client);
@@ -35,120 +79,172 @@ var IssueDeck = function IssueDeck(props) {
35
79
  }
36
80
  };
37
81
 
82
+ var loadMore = function loadMore() {
83
+ setValues({
84
+ page: values.page + 1,
85
+ from: values.from + count,
86
+ to: values.to + count
87
+ });
88
+ };
89
+
90
+ var loadData = function loadData(values, query, client, params, setIssuesData, setScrolling) {
91
+ params = _extends({}, params, {
92
+ from: values.from,
93
+ to: values.to
94
+ });
95
+
96
+ client.fetch(query, params).then(function (dataArr) {
97
+ if (!dataArr) {
98
+ dataArr = [];
99
+ }
100
+
101
+ dataArr = dataArr.map(function (item) {
102
+ return _extends({}, item, {
103
+ pageNumber: values.page
104
+ });
105
+ });
106
+
107
+ if (dataArr.length > 0) {
108
+ setIssuesData(function (prevData) {
109
+ return [].concat(_toConsumableArray(prevData), _toConsumableArray(dataArr));
110
+ });
111
+ setScrolling(true);
112
+ } else {
113
+ var parentScroll = document.getElementsByClassName('infinite-scroll-component')[0];
114
+ parentScroll.style.overflow = 'hidden';
115
+ setScrolling(false);
116
+ }
117
+ });
118
+ };
119
+
120
+ useEffect(function () {
121
+ if (prevValues) {
122
+ if (values.page !== prevValues.page && values.from !== prevValues.from && values.to !== prevValues.from) {
123
+ loadData(values, query, client, params, setIssuesData, setScrolling);
124
+ }
125
+ }
126
+ }, [values, prevValues, query, client, params, setIssuesData, setScrolling]);
127
+
38
128
  return React__default.createElement(
39
- Row,
40
- null,
41
- data && data.length ? data.map(function (row, index) {
42
- return publication && row.identifier && row.identifier.current && React__default.createElement(
43
- Col,
44
- { md: 12, lg: 12, key: index },
45
- React__default.createElement(
46
- Card,
47
- { className: 'queue-card journal-queue', style: { borderTop: '1px solid #EEE' } },
129
+ InfiniteScroll,
130
+ { ref: deckRef, dataLength: issuesData && issuesData.length, next: function next() {
131
+ return loadMore();
132
+ }, hasMore: scrolling, scrollThreshold: 0.9 },
133
+ React__default.createElement(
134
+ Row,
135
+ null,
136
+ issuesData && issuesData.length ? issuesData.map(function (row, index) {
137
+ return publication && row.identifier && row.identifier.current && React__default.createElement(
138
+ Col,
139
+ { md: 12, lg: 12, key: index },
48
140
  React__default.createElement(
49
- Row,
50
- { style: { flexDirection: 'left' } },
141
+ Card,
142
+ { className: 'queue-card journal-queue', style: { borderTop: '1px solid #EEE' } },
51
143
  React__default.createElement(
52
- Col,
53
- { md: 12, lg: 4, className: 'body-image', style: { textAlign: 'center' } },
54
- row.issues.length > 0 ? React__default.createElement(
55
- 'a',
56
- { href: href + '/' + publication + '/' + row.identifier.current, style: { width: '100%' } },
57
- row.thumbnail && React__default.createElement(
58
- LazyLoad,
59
- { height: imageHeight },
60
- React__default.createElement(Card.Img, { variant: 'top', src: renderCardImage(row.thumbnail), alt: row.name, style: { objectFit: 'contain' } })
61
- )
62
- ) : React__default.createElement(
63
- 'a',
64
- null,
65
- row.thumbnail && React__default.createElement(
66
- LazyLoad,
67
- { height: imageHeight },
68
- React__default.createElement(Card.Img, { variant: 'top', src: renderCardImage(row.thumbnail), alt: row.name, style: { objectFit: 'contain' } })
144
+ Row,
145
+ { style: { flexDirection: 'left' } },
146
+ React__default.createElement(
147
+ Col,
148
+ { md: 12, lg: 4, className: 'body-image', style: { textAlign: 'center' } },
149
+ row.issues.length > 0 ? React__default.createElement(
150
+ 'a',
151
+ { href: href + '/' + publication + '/' + row.identifier.current, style: { width: '100%' } },
152
+ row.thumbnail && React__default.createElement(
153
+ LazyLoad,
154
+ { height: imageHeight },
155
+ React__default.createElement(Card.Img, { variant: 'top', src: renderCardImage(row.thumbnail), alt: row.name, style: { objectFit: 'contain' } })
156
+ )
157
+ ) : React__default.createElement(
158
+ 'a',
159
+ null,
160
+ row.thumbnail && React__default.createElement(
161
+ LazyLoad,
162
+ { height: imageHeight },
163
+ React__default.createElement(Card.Img, { variant: 'top', src: renderCardImage(row.thumbnail), alt: row.name, style: { objectFit: 'contain' } })
164
+ )
69
165
  )
70
- )
71
- ),
72
- React__default.createElement(
73
- Col,
74
- { md: 12, lg: 8 },
166
+ ),
75
167
  React__default.createElement(
76
- Card.Body,
77
- { style: { padding: '20px' }, className: 'body-text' },
168
+ Col,
169
+ { md: 12, lg: 8 },
78
170
  React__default.createElement(
79
- Row,
80
- null,
171
+ Card.Body,
172
+ { style: { padding: '20px' }, className: 'body-text' },
81
173
  React__default.createElement(
82
- Col,
174
+ Row,
83
175
  null,
84
176
  React__default.createElement(
85
- Card.Title,
177
+ Col,
86
178
  null,
87
- row.name
179
+ React__default.createElement(
180
+ Card.Title,
181
+ null,
182
+ row.name
183
+ )
88
184
  )
89
- )
90
- ),
91
- React__default.createElement(
92
- Row,
93
- null,
185
+ ),
94
186
  React__default.createElement(
95
- Col,
187
+ Row,
96
188
  null,
97
189
  React__default.createElement(
98
- 'div',
190
+ Col,
99
191
  null,
100
- 'Volume: ',
101
- row.volume
192
+ React__default.createElement(
193
+ 'div',
194
+ null,
195
+ 'Volume: ',
196
+ row.volume
197
+ )
102
198
  )
103
- )
104
- ),
105
- React__default.createElement(
106
- Row,
107
- null,
199
+ ),
108
200
  React__default.createElement(
109
- Col,
201
+ Row,
110
202
  null,
111
203
  React__default.createElement(
112
- 'div',
204
+ Col,
113
205
  null,
114
- 'Number: ',
115
- row.number
116
- )
117
- )
118
- ),
119
- React__default.createElement(
120
- Row,
121
- null,
122
- row.issues.length > 0 && React__default.createElement(
123
- 'a',
124
- { style: { paddingRight: '15px', paddingLeft: '15px' }, href: href + '/' + publication + '/' + row.identifier.current },
125
- React__default.createElement(
126
- Button,
127
- { style: { marginTop: '20px', marginRight: '1rem' }, variant: 'secondary' },
128
- 'View Issue'
206
+ React__default.createElement(
207
+ 'div',
208
+ null,
209
+ 'Number: ',
210
+ row.number
211
+ )
129
212
  )
130
213
  ),
131
- row.pdf && row.pdf.asset && React__default.createElement(
132
- 'a',
133
- { href: row.pdf.asset.url, target: '_blank', className: 'btn btn-primary', style: { marginTop: '20px' } },
134
- 'Download Issue'
214
+ React__default.createElement(
215
+ Row,
216
+ null,
217
+ row.issues.length > 0 && React__default.createElement(
218
+ 'a',
219
+ { style: { paddingRight: '15px', paddingLeft: '15px' }, href: href + '/' + publication + '/' + row.identifier.current },
220
+ React__default.createElement(
221
+ Button,
222
+ { style: { marginTop: '20px', marginRight: '1rem' }, variant: 'secondary' },
223
+ 'View Issue'
224
+ )
225
+ ),
226
+ row.pdf && row.pdf.asset && React__default.createElement(
227
+ 'a',
228
+ { href: row.pdf.asset.url, target: '_blank', className: 'btn btn-primary', style: { marginTop: '20px' } },
229
+ 'Download Issue'
230
+ )
135
231
  )
136
232
  )
137
233
  )
138
234
  )
139
235
  )
140
- )
141
- );
142
- }) : React__default.createElement(
143
- 'div',
144
- null,
145
- React__default.createElement(
146
- 'h5',
236
+ );
237
+ }) : React__default.createElement(
238
+ 'div',
147
239
  null,
148
240
  React__default.createElement(
149
- 'em',
150
- { className: 'pl-3' },
151
- 'New content coming soon, please check back later.'
241
+ 'h5',
242
+ null,
243
+ React__default.createElement(
244
+ 'em',
245
+ { className: 'pl-3' },
246
+ 'New content coming soon, please check back later.'
247
+ )
152
248
  )
153
249
  )
154
250
  )
@@ -2,8 +2,8 @@ import './_commonjsHelpers-0c4b6f40.js';
2
2
  import './_to-object-1b1f7766.js';
3
3
  import './web.dom.iterable-e6bf2bf6.js';
4
4
  import './_library-528f1934.js';
5
- import { m as main_39 } from './main-25bb2c75.js';
6
- import { _ as _toConsumableArray } from './toConsumableArray-d7054876.js';
5
+ import './_iter-detect-7c281f0a.js';
6
+ import { _ as _toConsumableArray } from './toConsumableArray-c5e2fde8.js';
7
7
  import './_object-pie-33c40e79.js';
8
8
  import { _ as _extends } from './extends-92072fff.js';
9
9
  import { a as _inherits, b as _classCallCheck, c as _possibleConstructorReturn, d as _Object$getPrototypeOf, e as _createClass } from './inherits-dfba24f5.js';
@@ -17,10 +17,12 @@ import 'react-bootstrap/Col';
17
17
  import 'react-bootstrap/Card';
18
18
  import './moment-12415288.js';
19
19
  import { withRouter } from 'next/router';
20
- import { V as VisibilitySensor, I as InfiniteScroll } from './visibility-sensor-49d5805d.js';
20
+ import { I as InfiniteScroll } from './index.es-938a3a58.js';
21
21
  import 'react-dom';
22
+ import { V as VisibilitySensor } from './visibility-sensor-0baa4eea.js';
22
23
  import './index-51a80699.js';
23
- import { d as _Promise } from './promise-5d7cd78a.js';
24
+ import { m as main_39 } from './main-7d1b3c98.js';
25
+ import { d as _Promise } from './promise-2592a80a.js';
24
26
 
25
27
  var MasterDeck = function (_React$Component) {
26
28
  _inherits(MasterDeck, _React$Component);
@@ -196,7 +198,7 @@ var MasterDeck = function (_React$Component) {
196
198
  return React__default.createElement(
197
199
  'div',
198
200
  null,
199
- _this.state.data && _this.state.data.map(function (row, index) {
201
+ _this.state.data && _this.state.data.length > 0 ? _this.state.data.map(function (row, index) {
200
202
  var pageNumber = row.pageNumber || _this.state.page;
201
203
 
202
204
  return React__default.createElement(
@@ -220,7 +222,19 @@ var MasterDeck = function (_React$Component) {
220
222
  )
221
223
  )
222
224
  );
223
- })
225
+ }) : React__default.createElement(
226
+ 'div',
227
+ null,
228
+ React__default.createElement(
229
+ 'h5',
230
+ null,
231
+ React__default.createElement(
232
+ 'em',
233
+ null,
234
+ 'New content coming soon, please check back later.'
235
+ )
236
+ )
237
+ )
224
238
  );
225
239
  }, _this.renderMobileAd = function (index, numberOfItemsBeforeAd, rightItems) {
226
240
  var i = ((index + 1) / numberOfItemsBeforeAd - 1) % rightItems.length;
@@ -1,11 +1,11 @@
1
- import { m as main_39, c as main_40 } from './main-25bb2c75.js';
2
1
  import React__default, { useState, useEffect, useRef } from 'react';
3
2
  import Container from 'react-bootstrap/Container';
4
3
  import Row from 'react-bootstrap/Row';
5
4
  import Col from 'react-bootstrap/Col';
6
5
  import { useRouter } from 'next/router';
6
+ import { m as main_39, c as main_40 } from './main-7d1b3c98.js';
7
7
  import { _ as _slicedToArray } from './slicedToArray-04e02710.js';
8
- import { D as DFPAdSlot } from './AdSlot-c3ed3214.js';
8
+ import { D as DFPAdSlot } from './AdSlot-78e48a2c.js';
9
9
  import { g as get_1 } from './get-53653403.js';
10
10
  import { r as reactSocialIcons_1 } from './react-social-icons-a7d5c5c7.js';
11
11
  import { Dropdown } from 'react-bootstrap';
@@ -182,6 +182,84 @@ var Column2 = function Column2(props) {
182
182
  );
183
183
  };
184
184
 
185
+ var ADSponsoredResources = function ADSponsoredResources(_ref) {
186
+ var sponsoredAd = _ref.sponsoredAd,
187
+ _ref$minScreenWidth = _ref.minScreenWidth,
188
+ minScreenWidth = _ref$minScreenWidth === undefined ? 1200 : _ref$minScreenWidth;
189
+ var className = sponsoredAd.className,
190
+ slotId = sponsoredAd.slotId,
191
+ adUnit = sponsoredAd.adUnit,
192
+ _sponsoredAd$targetin = sponsoredAd.targeting,
193
+ targeting = _sponsoredAd$targetin === undefined ? {} : _sponsoredAd$targetin,
194
+ _sponsoredAd$position = sponsoredAd.position,
195
+ position = _sponsoredAd$position === undefined ? 'sponsor' : _sponsoredAd$position,
196
+ networkID = sponsoredAd.networkID,
197
+ sizes = sponsoredAd.sizes;
198
+
199
+
200
+ var adTargeting = {
201
+ content_placement: targeting.content_placement,
202
+ tags: targeting.tags,
203
+ document_group: targeting.document_group,
204
+ document_url: targeting.document_url,
205
+ pos: position,
206
+ campaign_id: targeting.campaign_id,
207
+ issue_url: targeting.issue_url,
208
+ publication_url: targeting.publication_url
209
+ };
210
+
211
+ var _useState = useState(false),
212
+ _useState2 = _slicedToArray(_useState, 2),
213
+ widthFlag = _useState2[0],
214
+ setWidthFlag = _useState2[1];
215
+
216
+ useEffect(function () {
217
+ if (window && window.innerWidth >= minScreenWidth) {
218
+ setWidthFlag(true);
219
+ }
220
+ }, [minScreenWidth]);
221
+
222
+ var collapseAd = function collapseAd() {
223
+ var parent = document.getElementById('sponsored-ad-wrapper');
224
+ parent.style.height = '0%';
225
+ parent.style.width = '0%';
226
+ parent.style.display = 'none';
227
+ };
228
+
229
+ var checkIsAdFound = function checkIsAdFound(isFound) {
230
+ if (isFound) {
231
+ var parent = document.getElementById('sponsored-ad-wrapper');
232
+ parent.style.display = 'block';
233
+ } else {
234
+ collapseAd();
235
+ }
236
+ };
237
+ if (widthFlag) {
238
+ return React__default.createElement(
239
+ React__default.Fragment,
240
+ null,
241
+ React__default.createElement(
242
+ 'div',
243
+ { id: 'sponsored-ad-wrapper', className: 'sponsored-ad-wrapper' },
244
+ React__default.createElement(
245
+ 'div',
246
+ { className: 'sponsored-ad' },
247
+ React__default.createElement(DFPAdSlot, {
248
+ className: className,
249
+ slotId: slotId,
250
+ networkID: networkID,
251
+ sizes: sizes,
252
+ adUnit: adUnit,
253
+ targeting: adTargeting,
254
+ refreshFlag: false,
255
+ checkIsAdFound: checkIsAdFound
256
+ })
257
+ )
258
+ )
259
+ );
260
+ } else return null;
261
+ };
262
+
185
263
  var LeftNav = function LeftNav(props) {
186
264
  var leftItems = props.leftItems,
187
265
  _props$fixedHeight = props.fixedHeight,
@@ -369,6 +447,7 @@ var Column3 = function Column3(props) {
369
447
  Col,
370
448
  { md: true, className: 'leftCol', style: { width: '200px' } },
371
449
  React__default.createElement(LeftNav$1, { leftItems: leftItems }),
450
+ website && website.sponsoredAd && React__default.createElement(ADSponsoredResources, { sponsoredAd: website.sponsoredAd }),
372
451
  website && website.sideFooterContent && website.sideFooterContent.length && website.showFooterOnLeftSide && React__default.createElement(SideFooter, { website: website, cache: website.cache, logo: logo })
373
452
  ),
374
453
  React__default.createElement(
@@ -2187,4 +2266,4 @@ var TemplateNormal = function TemplateNormal(props) {
2187
2266
  );
2188
2267
  };
2189
2268
 
2190
- export { AD728x90 as A, Column1 as C, Header$1 as H, LeftNav$1 as L, MdPictureAsPdf as M, NavNative as N, PageFilter as P, Search as S, TemplateNormal as T, Column2 as a, Column3 as b, MagazineNav as c, NavNormal as d, NavDvm as e, HamMagazine as f, SideFooter as g };
2269
+ export { AD728x90 as A, Column1 as C, Header$1 as H, LeftNav$1 as L, MdPictureAsPdf as M, NavNative as N, PageFilter as P, Search as S, TemplateNormal as T, Column2 as a, Column3 as b, MagazineNav as c, NavNormal as d, NavDvm as e, HamMagazine as f, ADSponsoredResources as g, SideFooter as h };
@@ -2,8 +2,8 @@ import './_commonjsHelpers-0c4b6f40.js';
2
2
  import './_to-object-1b1f7766.js';
3
3
  import './web.dom.iterable-e6bf2bf6.js';
4
4
  import './_library-528f1934.js';
5
- import { m as main_39 } from './main-25bb2c75.js';
6
- import { _ as _toConsumableArray } from './toConsumableArray-d7054876.js';
5
+ import './_iter-detect-7c281f0a.js';
6
+ import { _ as _toConsumableArray } from './toConsumableArray-c5e2fde8.js';
7
7
  import './_object-pie-33c40e79.js';
8
8
  import { _ as _extends } from './extends-92072fff.js';
9
9
  import React__default, { useState, useEffect, useRef } from 'react';
@@ -12,15 +12,17 @@ import 'prop-types';
12
12
  import 'react-bootstrap/Card';
13
13
  import { m as moment } from './moment-12415288.js';
14
14
  import { useRouter } from 'next/router';
15
- import { I as InfiniteScroll, V as VisibilitySensor } from './visibility-sensor-49d5805d.js';
15
+ import { I as InfiniteScroll } from './index.es-938a3a58.js';
16
16
  import 'react-dom';
17
+ import { V as VisibilitySensor } from './visibility-sensor-0baa4eea.js';
17
18
  import { i as imageUrlBuilder } from './index-51a80699.js';
18
19
  import { L as LazyLoad } from './index-5f9f807a.js';
20
+ import { m as main_39 } from './main-7d1b3c98.js';
19
21
  import { c as clean_html_1 } from './entities-7cc3bf45.js';
20
22
  import { _ as _slicedToArray } from './slicedToArray-04e02710.js';
21
- import './AdSlot-c3ed3214.js';
22
- import './promise-5d7cd78a.js';
23
- import { A as ADInfeed } from './ADInfeed-40adc8e0.js';
23
+ import './AdSlot-78e48a2c.js';
24
+ import './promise-2592a80a.js';
25
+ import { A as ADInfeed } from './ADInfeed-e5cefea5.js';
24
26
  import { A as AuthorComponent } from './AuthorComponent-c9e46673.js';
25
27
  import { Container, Media } from 'react-bootstrap';
26
28
 
@@ -2,7 +2,7 @@ import './_commonjsHelpers-0c4b6f40.js';
2
2
  import './_to-object-1b1f7766.js';
3
3
  import './web.dom.iterable-e6bf2bf6.js';
4
4
  import './_library-528f1934.js';
5
- import './main-25bb2c75.js';
5
+ import './_iter-detect-7c281f0a.js';
6
6
  import 'react';
7
7
  import './debounce-df468b0e.js';
8
8
  import 'prop-types';
@@ -10,15 +10,16 @@ import 'react-bootstrap/Container';
10
10
  import 'react-bootstrap/Row';
11
11
  import 'react-bootstrap/Col';
12
12
  import 'next/router';
13
+ import './main-7d1b3c98.js';
13
14
  import './slicedToArray-04e02710.js';
14
- import './AdSlot-c3ed3214.js';
15
- import './promise-5d7cd78a.js';
15
+ import './AdSlot-78e48a2c.js';
16
+ import './promise-2592a80a.js';
16
17
  import './get-53653403.js';
17
18
  import './react-social-icons-a7d5c5c7.js';
18
19
  import 'react-bootstrap';
19
20
  import './index.esm-536609db.js';
20
21
  import 'react-bootstrap/Button';
21
- export { T as default } from './Normal-68ef59cd.js';
22
+ export { T as default } from './Normal-b8c423e3.js';
22
23
  import 'react-bootstrap/ListGroup';
23
24
  import 'next/head';
24
25
  import 'react-bootstrap/Nav';
@@ -12,8 +12,9 @@ import 'prop-types';
12
12
  import Container from 'react-bootstrap/Container';
13
13
  import './moment-12415288.js';
14
14
  import { withRouter } from 'next/router';
15
- import { I as InfiniteScroll, V as VisibilitySensor } from './visibility-sensor-49d5805d.js';
15
+ import { I as InfiniteScroll } from './index.es-938a3a58.js';
16
16
  import 'react-dom';
17
+ import { V as VisibilitySensor } from './visibility-sensor-0baa4eea.js';
17
18
  import './index-51a80699.js';
18
19
  import './index-5f9f807a.js';
19
20
  import './slicedToArray-04e02710.js';