@mjhls/mjh-framework 1.0.366 → 1.0.368
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/index.js +716 -41
- package/dist/esm/index.js +723 -49
- package/package.json +1 -1
package/dist/esm/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { c as createCommonjsModule, a as commonjsGlobal, g as getCjsExportFromNamespace, u as unwrapExports } from './_commonjsHelpers-0c4b6f40.js';
|
|
2
2
|
import { _ as _objectKeys, a as _toObject, b as _core } from './_to-object-b9b796ec.js';
|
|
3
3
|
import './web.dom.iterable-7e9bebf9.js';
|
|
4
|
-
import {
|
|
4
|
+
import { l as lib_3, d as debounce_1, a as lib_1, i as isObjectLike_1, _ as _baseGetTag, t as toNumber_1, b as _root, c as _freeGlobal } from './debounce-702eb224.js';
|
|
5
5
|
import { m as main_39, a as main_16, b as main_38 } from './main-cb86f95d.js';
|
|
6
6
|
import { _ as _toConsumableArray, a as _Array$from } from './toConsumableArray-2718dc16.js';
|
|
7
7
|
import { _ as _extends$2, a as _Object$assign } from './extends-26d3b609.js';
|
|
8
8
|
import { _ as _objectSap, a as _inherits$1, b as _classCallCheck$1, c as _possibleConstructorReturn$1, d as _Object$getPrototypeOf, e as _createClass$1 } from './inherits-4b85034c.js';
|
|
9
9
|
import React__default, { useState, useEffect, useRef } from 'react';
|
|
10
10
|
import PropTypes from 'prop-types';
|
|
11
|
-
import Container from 'react-bootstrap/Container';
|
|
11
|
+
import Container$1 from 'react-bootstrap/Container';
|
|
12
12
|
import Row from 'react-bootstrap/Row';
|
|
13
13
|
import Col from 'react-bootstrap/Col';
|
|
14
14
|
import Card from 'react-bootstrap/Card';
|
|
@@ -18,12 +18,12 @@ import { I as InfiniteScroll, V as VisibilitySensor } from './visibility-sensor-
|
|
|
18
18
|
import 'react-dom';
|
|
19
19
|
import { i as imageUrlBuilder } from './index-51a80699.js';
|
|
20
20
|
import { L as LazyLoad } from './index-5f9f807a.js';
|
|
21
|
-
import {
|
|
21
|
+
import { c as clean_html_1, h as html_decode_1 } from './entities-7cc3bf45.js';
|
|
22
22
|
import { _ as _slicedToArray, a as _getIterator } from './slicedToArray-a47a84a4.js';
|
|
23
23
|
import { _ as _JSON$stringify, a as _asyncToGenerator, r as regenerator, D as DFPAdSlot, B as Beam } from './AdSlot-8946358f.js';
|
|
24
24
|
export { D as AdSlot, B as Beam } from './AdSlot-8946358f.js';
|
|
25
25
|
import './promise-86cb8313.js';
|
|
26
|
-
import './ADInfeed-ca26fca6.js';
|
|
26
|
+
import { A as ADInfeed } from './ADInfeed-ca26fca6.js';
|
|
27
27
|
export { default as DeckContent } from './DeckContent.js';
|
|
28
28
|
import { i as isFunction_1, a as isArray_1, _ as _arrayMap } from './get-36d03764.js';
|
|
29
29
|
export { A as AD, G as GridContent } from './GridContent-e2b1de22.js';
|
|
@@ -37,7 +37,7 @@ import { g as getYoutubeId } from './smoothscroll-4b699764.js';
|
|
|
37
37
|
import GroupDeck from './GroupDeck.js';
|
|
38
38
|
export { default as GroupDeck } from './GroupDeck.js';
|
|
39
39
|
export { default as YoutubeGroup } from './YoutubeGroup.js';
|
|
40
|
-
import {
|
|
40
|
+
import { Container, Media as Media$1, Spinner as Spinner$1, Row as Row$1, Col as Col$1, Carousel, Table, Figure as Figure$1, Button as Button$1, ProgressBar, Card as Card$1, Form } from 'react-bootstrap';
|
|
41
41
|
export { default as QueueDeckExpanded } from './QueueDeckExpanded.js';
|
|
42
42
|
import { I as IoMdArrowDropdown } from './index.esm-536609db.js';
|
|
43
43
|
export { default as VideoSeriesListing } from './VideoSeriesListing.js';
|
|
@@ -72,6 +72,632 @@ import useSWR from 'swr';
|
|
|
72
72
|
import Local from 'passport-local';
|
|
73
73
|
import mysql from 'mysql';
|
|
74
74
|
|
|
75
|
+
var urlFor$1 = function urlFor(source, builder) {
|
|
76
|
+
return builder.image(source).auto('format');
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
var renderCardImage = function renderCardImage(row, builder, imageHeight, imageWidth) {
|
|
80
|
+
var url = urlFor$1(row.thumbnail, builder);
|
|
81
|
+
if (imageHeight) url = url.height(imageHeight);
|
|
82
|
+
if (imageWidth) url = url.width(imageWidth);
|
|
83
|
+
return url.url();
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
var loadMore = function loadMore(values, setValues, per) {
|
|
87
|
+
setValues({
|
|
88
|
+
page: values.page + 1,
|
|
89
|
+
from: values.from + per,
|
|
90
|
+
to: values.to + per
|
|
91
|
+
});
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
var loadData = function loadData(values, query, client, params, setData, setScrolling, pointer, pointerArray) {
|
|
95
|
+
params = _extends$2({}, params, {
|
|
96
|
+
from: values.from,
|
|
97
|
+
to: values.to
|
|
98
|
+
});
|
|
99
|
+
|
|
100
|
+
client.fetch(query, params).then(function (dataArr) {
|
|
101
|
+
if (pointer && pointerArray) {
|
|
102
|
+
dataArr = dataArr[pointerArray][pointer];
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
if (!dataArr) {
|
|
106
|
+
dataArr = [];
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
dataArr = dataArr.map(function (item) {
|
|
110
|
+
return _extends$2({}, item, {
|
|
111
|
+
pageNumber: values.page
|
|
112
|
+
});
|
|
113
|
+
});
|
|
114
|
+
|
|
115
|
+
if (dataArr.length > 0) {
|
|
116
|
+
setData(function (prevData) {
|
|
117
|
+
return [].concat(_toConsumableArray(prevData), _toConsumableArray(dataArr));
|
|
118
|
+
});
|
|
119
|
+
setScrolling(true);
|
|
120
|
+
} else {
|
|
121
|
+
setScrolling(false);
|
|
122
|
+
}
|
|
123
|
+
});
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
var changePageNumber = function changePageNumber(pageNumber, seoPaginate, pageview, router, currentPage, setCurrentPage, itemsPerPage, itemIndex) {
|
|
127
|
+
if (seoPaginate) {
|
|
128
|
+
var path = router.asPath;
|
|
129
|
+
var qrIndex = path.indexOf('?');
|
|
130
|
+
var pathname = router.pathname;
|
|
131
|
+
var queryString = '';
|
|
132
|
+
|
|
133
|
+
if (qrIndex > 0) {
|
|
134
|
+
path = path.substring(1, qrIndex);
|
|
135
|
+
|
|
136
|
+
var partialQS = router.asPath.substring(qrIndex + 1);
|
|
137
|
+
var partialQSArr = partialQS.split('&');
|
|
138
|
+
|
|
139
|
+
// exclude page=xxx from query string
|
|
140
|
+
partialQSArr.map(function (item) {
|
|
141
|
+
var itemArr = item.split('=');
|
|
142
|
+
var key = itemArr[0];
|
|
143
|
+
var val = itemArr[1];
|
|
144
|
+
|
|
145
|
+
if (key !== 'page') {
|
|
146
|
+
queryString += (queryString.length === 0 ? '' : '&') + key + '=' + val;
|
|
147
|
+
}
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
if (queryString.length > 0) {
|
|
152
|
+
path += '?' + queryString;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
// pageNumber = parseInt(pageNumber)
|
|
156
|
+
|
|
157
|
+
var index = Number(itemIndex);
|
|
158
|
+
var perPage = Number(itemsPerPage);
|
|
159
|
+
|
|
160
|
+
pageNumber = Math.ceil((index + 1) / perPage);
|
|
161
|
+
|
|
162
|
+
if (currentPage !== pageNumber) {
|
|
163
|
+
lib_3.refresh();
|
|
164
|
+
|
|
165
|
+
setCurrentPage(pageNumber);
|
|
166
|
+
if (path[0] !== '/') {
|
|
167
|
+
path = '/' + path;
|
|
168
|
+
}
|
|
169
|
+
var newPath = pageNumber === 1 ? '' + path : '' + path + (queryString.length > 0 ? '&' : '?') + 'page=' + pageNumber;
|
|
170
|
+
|
|
171
|
+
if (pageview) {
|
|
172
|
+
pageview(newPath);
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
router.push(pathname, newPath, {
|
|
176
|
+
shallow: true
|
|
177
|
+
});
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
};
|
|
181
|
+
|
|
182
|
+
var renderAuthor = function renderAuthor(authorDetail, index, length) {
|
|
183
|
+
if (authorDetail) {
|
|
184
|
+
var _id = authorDetail._id,
|
|
185
|
+
displayName = authorDetail.displayName,
|
|
186
|
+
url = authorDetail.url;
|
|
187
|
+
|
|
188
|
+
if (displayName && url && url.current) {
|
|
189
|
+
return React__default.createElement(
|
|
190
|
+
'div',
|
|
191
|
+
{ key: _id },
|
|
192
|
+
index === 0 && React__default.createElement(
|
|
193
|
+
'span',
|
|
194
|
+
{ className: 'pr-1' },
|
|
195
|
+
'By'
|
|
196
|
+
),
|
|
197
|
+
React__default.createElement(
|
|
198
|
+
'a',
|
|
199
|
+
{ href: '/authors/' + url.current, className: 'text-muted' },
|
|
200
|
+
displayName,
|
|
201
|
+
length !== index + 1 && React__default.createElement('br', null)
|
|
202
|
+
)
|
|
203
|
+
);
|
|
204
|
+
} else if (displayName) {
|
|
205
|
+
return React__default.createElement(
|
|
206
|
+
'div',
|
|
207
|
+
{ key: _id },
|
|
208
|
+
index === 0 && React__default.createElement(
|
|
209
|
+
'span',
|
|
210
|
+
{ className: 'pr-1' },
|
|
211
|
+
'By'
|
|
212
|
+
),
|
|
213
|
+
React__default.createElement(
|
|
214
|
+
'span',
|
|
215
|
+
{ className: 'text-muted' },
|
|
216
|
+
displayName,
|
|
217
|
+
length !== index + 1 && React__default.createElement('br', null)
|
|
218
|
+
)
|
|
219
|
+
);
|
|
220
|
+
}
|
|
221
|
+
} else return null;
|
|
222
|
+
};
|
|
223
|
+
|
|
224
|
+
var checkExternalUrl = function checkExternalUrl(url) {
|
|
225
|
+
return new RegExp(['http', 'https'].join('|')).test(url);
|
|
226
|
+
};
|
|
227
|
+
|
|
228
|
+
var cardLoader = function cardLoader(data, builder, mapping, values, seoPaginate, pageview, router, currentPage, setCurrentPage, showPublished, defaultImage, showAuthor, showCategory, imageHeight, imageWidth, rightItems, brandInsightAd, showBI, itemsPerPage) {
|
|
229
|
+
var numberOfItemsBeforeAd = 6;
|
|
230
|
+
|
|
231
|
+
var insertBrandInsightAd = function insertBrandInsightAd(arr, index, newElement) {
|
|
232
|
+
return [].concat(_toConsumableArray(arr.slice(0, index)), [newElement], _toConsumableArray(arr.slice(index)));
|
|
233
|
+
};
|
|
234
|
+
if (showBI && brandInsightAd) {
|
|
235
|
+
var pos = 0;
|
|
236
|
+
for (var i = 1; pos < data.length; i++) {
|
|
237
|
+
var inFeedAd = {
|
|
238
|
+
adUnit: brandInsightAd.adUnit,
|
|
239
|
+
className: brandInsightAd.className,
|
|
240
|
+
networkID: brandInsightAd.networkID,
|
|
241
|
+
sizes: brandInsightAd.sizes,
|
|
242
|
+
slotId: brandInsightAd.slotId + '_' + i,
|
|
243
|
+
targeting: {
|
|
244
|
+
pos: 'article' + i,
|
|
245
|
+
content_placement: brandInsightAd.targeting.content_placement,
|
|
246
|
+
document_url: brandInsightAd.targeting.document_url
|
|
247
|
+
},
|
|
248
|
+
_type: 'brandInsightAd'
|
|
249
|
+
};
|
|
250
|
+
|
|
251
|
+
data = insertBrandInsightAd(data, pos, inFeedAd);
|
|
252
|
+
pos += brandInsightAd.interval + 1;
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
return React__default.createElement(
|
|
257
|
+
'div',
|
|
258
|
+
null,
|
|
259
|
+
data && data.length > 0 ? data.map(function (article, index) {
|
|
260
|
+
var pageNumber = article.pageNumber || values.page;
|
|
261
|
+
|
|
262
|
+
var contentCategoryName = article.contentCategory ? article.contentCategory.name : 'Articles';
|
|
263
|
+
|
|
264
|
+
if (article._type === 'feature') {
|
|
265
|
+
if (article.blank || checkExternalUrl(article.url.current)) {
|
|
266
|
+
return React__default.createElement(
|
|
267
|
+
React__default.Fragment,
|
|
268
|
+
{ key: article._id ? article._id : index },
|
|
269
|
+
React__default.createElement(
|
|
270
|
+
VisibilitySensor,
|
|
271
|
+
{
|
|
272
|
+
key: article._id ? article._id : index,
|
|
273
|
+
partialVisibility: true,
|
|
274
|
+
onChange: function onChange(isVisible) {
|
|
275
|
+
isVisible && changePageNumber(1, seoPaginate, pageview, router, currentPage, setCurrentPage, itemsPerPage, parseInt(index));
|
|
276
|
+
} },
|
|
277
|
+
React__default.createElement(
|
|
278
|
+
React__default.Fragment,
|
|
279
|
+
null,
|
|
280
|
+
React__default.createElement(
|
|
281
|
+
Media$1,
|
|
282
|
+
{
|
|
283
|
+
key: article._id ? article._id : index,
|
|
284
|
+
className: 'feature-media',
|
|
285
|
+
style: { flexDirection: 'column', marginBottom: '1.25rem', paddingBottom: '1.25rem', borderBottom: '1px solid #ddd' } },
|
|
286
|
+
(article.thumbnail && article.thumbnail.asset || defaultImage) && React__default.createElement(
|
|
287
|
+
'a',
|
|
288
|
+
{ href: article.url.current, target: '_blank', className: 'feature-wrapper' },
|
|
289
|
+
React__default.createElement(
|
|
290
|
+
LazyLoad,
|
|
291
|
+
{ height: imageHeight },
|
|
292
|
+
article.thumbnail && article.thumbnail.asset ? React__default.createElement('img', { className: 'img-fluid', src: renderCardImage(article, builder, imageHeight, imageWidth), alt: article.title }) : article.thumbnail ? React__default.createElement('img', { src: article.thumbnail, className: 'mr-3', alt: article.title }) : React__default.createElement('img', { src: defaultImage, src2: article.thumbnail, className: 'mr-3', width: '240', height: '135', alt: article.title })
|
|
293
|
+
)
|
|
294
|
+
),
|
|
295
|
+
React__default.createElement(
|
|
296
|
+
Media$1.Body,
|
|
297
|
+
null,
|
|
298
|
+
React__default.createElement(
|
|
299
|
+
'a',
|
|
300
|
+
{ href: article.url.current, target: '_blank' },
|
|
301
|
+
article.title && React__default.createElement(
|
|
302
|
+
'h4',
|
|
303
|
+
{ className: 'card-title', style: { fontWeight: '500', color: 'var(--gray-dark)', marginBottom: '.5rem' } },
|
|
304
|
+
article.title
|
|
305
|
+
)
|
|
306
|
+
),
|
|
307
|
+
showPublished && article.published && React__default.createElement(
|
|
308
|
+
'p',
|
|
309
|
+
{ className: 'card-text', style: { color: 'var(--dark)', marginBottom: '.25rem' } },
|
|
310
|
+
moment(article.published).format('MMMM DD, YYYY')
|
|
311
|
+
),
|
|
312
|
+
showAuthor && article.authorMapping && article.authorMapping.length > 0 && article.authorMapping.map(function (authorDetail, index) {
|
|
313
|
+
return renderAuthor(authorDetail, index, article.authorMapping.length);
|
|
314
|
+
}),
|
|
315
|
+
article.source && React__default.createElement(
|
|
316
|
+
'p',
|
|
317
|
+
{ className: 'p-0 mb-1' },
|
|
318
|
+
article.source
|
|
319
|
+
),
|
|
320
|
+
showCategory && article.contentCategory && React__default.createElement(
|
|
321
|
+
'p',
|
|
322
|
+
{
|
|
323
|
+
className: 'article-category',
|
|
324
|
+
style: {
|
|
325
|
+
background: '#3FB618',
|
|
326
|
+
color: '#ffffff',
|
|
327
|
+
marginBottom: '.25rem',
|
|
328
|
+
display: 'inline-block',
|
|
329
|
+
padding: '0 .25rem',
|
|
330
|
+
fontSize: '.8rem'
|
|
331
|
+
} },
|
|
332
|
+
article.contentCategory.name.slice(0, article.contentCategory.name.length - 1)
|
|
333
|
+
),
|
|
334
|
+
article.summary && React__default.createElement(
|
|
335
|
+
'p',
|
|
336
|
+
{ className: 'pt-2 card-text' },
|
|
337
|
+
clean_html_1(article.summary)
|
|
338
|
+
)
|
|
339
|
+
)
|
|
340
|
+
)
|
|
341
|
+
)
|
|
342
|
+
),
|
|
343
|
+
main_39 && rightItems && (index + 1) % numberOfItemsBeforeAd === 0 && renderMobileAd(index, numberOfItemsBeforeAd, rightItems)
|
|
344
|
+
);
|
|
345
|
+
} else {
|
|
346
|
+
return React__default.createElement(
|
|
347
|
+
React__default.Fragment,
|
|
348
|
+
{ key: article._id ? article._id : index },
|
|
349
|
+
React__default.createElement(
|
|
350
|
+
VisibilitySensor,
|
|
351
|
+
{
|
|
352
|
+
key: article._id ? article._id : index,
|
|
353
|
+
partialVisibility: true,
|
|
354
|
+
onChange: function onChange(isVisible) {
|
|
355
|
+
isVisible && changePageNumber(1, seoPaginate, pageview, router, currentPage, setCurrentPage, itemsPerPage, parseInt(index));
|
|
356
|
+
} },
|
|
357
|
+
React__default.createElement(
|
|
358
|
+
React__default.Fragment,
|
|
359
|
+
null,
|
|
360
|
+
React__default.createElement(
|
|
361
|
+
Media$1,
|
|
362
|
+
{
|
|
363
|
+
key: article._id ? article._id : index,
|
|
364
|
+
className: 'feature-media',
|
|
365
|
+
style: { flexDirection: 'column', marginBottom: '1.25rem', paddingBottom: '1.25rem', borderBottom: '1px solid #ddd' } },
|
|
366
|
+
(article.thumbnail && article.thumbnail.asset || defaultImage) && React__default.createElement(
|
|
367
|
+
'a',
|
|
368
|
+
{ href: article.url.current, className: 'feature-wrapper' },
|
|
369
|
+
React__default.createElement(
|
|
370
|
+
LazyLoad,
|
|
371
|
+
{ height: imageHeight },
|
|
372
|
+
article.thumbnail && article.thumbnail.asset ? React__default.createElement('img', { className: 'img-fluid', src: renderCardImage(article, builder, imageHeight, imageWidth), alt: article.title }) : article.thumbnail ? React__default.createElement('img', { src: article.thumbnail, className: 'mr-3', alt: article.title }) : React__default.createElement('img', { src: defaultImage, src2: article.thumbnail, className: 'mr-3', width: '240', height: '135', alt: article.title })
|
|
373
|
+
)
|
|
374
|
+
),
|
|
375
|
+
React__default.createElement(
|
|
376
|
+
Media$1.Body,
|
|
377
|
+
null,
|
|
378
|
+
React__default.createElement(
|
|
379
|
+
'a',
|
|
380
|
+
{ href: article.url.current },
|
|
381
|
+
article.title && React__default.createElement(
|
|
382
|
+
'h4',
|
|
383
|
+
{ className: 'card-title', style: { fontWeight: '500', color: 'var(--gray-dark)', marginBottom: '.5rem' } },
|
|
384
|
+
article.title
|
|
385
|
+
)
|
|
386
|
+
),
|
|
387
|
+
showPublished && article.published && React__default.createElement(
|
|
388
|
+
'p',
|
|
389
|
+
{ className: 'card-text', style: { color: 'var(--dark)', marginBottom: '.25rem' } },
|
|
390
|
+
moment(article.published).format('MMMM DD, YYYY')
|
|
391
|
+
),
|
|
392
|
+
showAuthor && article.authorMapping && article.authorMapping.length > 0 && article.authorMapping.map(function (authorDetail, index) {
|
|
393
|
+
return renderAuthor(authorDetail, index, article.authorMapping.length);
|
|
394
|
+
}),
|
|
395
|
+
article.source && React__default.createElement(
|
|
396
|
+
'p',
|
|
397
|
+
{ className: 'p-0 mb-1' },
|
|
398
|
+
article.source
|
|
399
|
+
),
|
|
400
|
+
showCategory && article.contentCategory && React__default.createElement(
|
|
401
|
+
'p',
|
|
402
|
+
{
|
|
403
|
+
style: {
|
|
404
|
+
background: '#3FB618',
|
|
405
|
+
color: '#ffffff',
|
|
406
|
+
marginBottom: '.25rem',
|
|
407
|
+
display: 'inline-block',
|
|
408
|
+
padding: '0 .25rem',
|
|
409
|
+
fontSize: '.8rem'
|
|
410
|
+
} },
|
|
411
|
+
article.contentCategory.name.slice(0, article.contentCategory.name.length - 1)
|
|
412
|
+
),
|
|
413
|
+
article.summary && React__default.createElement(
|
|
414
|
+
'p',
|
|
415
|
+
{ className: 'pt-2 card-text' },
|
|
416
|
+
clean_html_1(article.summary)
|
|
417
|
+
)
|
|
418
|
+
)
|
|
419
|
+
)
|
|
420
|
+
)
|
|
421
|
+
),
|
|
422
|
+
main_39 && rightItems && (index + 1) % numberOfItemsBeforeAd === 0 && renderMobileAd(index, numberOfItemsBeforeAd, rightItems)
|
|
423
|
+
);
|
|
424
|
+
}
|
|
425
|
+
} else if (article._type === 'brandInsightAd' && article.adUnit) {
|
|
426
|
+
return React__default.createElement(ADInfeed, { index: index, infeedAd: article });
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
return React__default.createElement(
|
|
430
|
+
React__default.Fragment,
|
|
431
|
+
{ key: article._id ? article._id : index },
|
|
432
|
+
React__default.createElement(
|
|
433
|
+
VisibilitySensor,
|
|
434
|
+
{
|
|
435
|
+
key: article._id ? article._id : index,
|
|
436
|
+
onChange: function onChange(isVisible) {
|
|
437
|
+
isVisible && changePageNumber(pageNumber, seoPaginate, pageview, router, currentPage, setCurrentPage, itemsPerPage, parseInt(index));
|
|
438
|
+
} },
|
|
439
|
+
React__default.createElement(
|
|
440
|
+
React__default.Fragment,
|
|
441
|
+
null,
|
|
442
|
+
React__default.createElement(
|
|
443
|
+
Media$1,
|
|
444
|
+
{
|
|
445
|
+
key: article._id ? article._id : index,
|
|
446
|
+
style: { flexDirection: 'row', marginBottom: '1.25rem', paddingBottom: '1.25rem', borderBottom: '1px solid #ddd' } },
|
|
447
|
+
(article.thumbnail && article.thumbnail.asset || defaultImage) && React__default.createElement(
|
|
448
|
+
'a',
|
|
449
|
+
{ href: mapping[contentCategoryName] + '/' + article.url.current, className: 'img-wrapper' },
|
|
450
|
+
React__default.createElement(
|
|
451
|
+
LazyLoad,
|
|
452
|
+
{ height: imageHeight },
|
|
453
|
+
article.thumbnail && article.thumbnail.asset ? React__default.createElement('img', { className: 'mr-3 img-fluid', src: renderCardImage(article, builder, imageHeight, imageWidth), alt: article.title }) : article.thumbnail ? React__default.createElement('img', { src: article.thumbnail, className: 'mr-3', alt: article.title }) : React__default.createElement('img', { src: defaultImage, src2: article.thumbnail, className: 'mr-3', width: '240', height: '135', alt: article.title })
|
|
454
|
+
)
|
|
455
|
+
),
|
|
456
|
+
React__default.createElement(
|
|
457
|
+
Media$1.Body,
|
|
458
|
+
null,
|
|
459
|
+
React__default.createElement(
|
|
460
|
+
'a',
|
|
461
|
+
{ href: mapping[contentCategoryName] + '/' + article.url.current },
|
|
462
|
+
article.title && React__default.createElement(
|
|
463
|
+
'h4',
|
|
464
|
+
{ className: 'card-title', style: { fontWeight: '500', color: 'var(--gray-dark)', marginBottom: '.5rem' } },
|
|
465
|
+
article.title
|
|
466
|
+
)
|
|
467
|
+
),
|
|
468
|
+
showPublished && article.published && React__default.createElement(
|
|
469
|
+
'p',
|
|
470
|
+
{ className: 'card-text', style: { color: 'var(--dark)', marginBottom: '.25rem' } },
|
|
471
|
+
moment(article.published).format('MMMM DD, YYYY')
|
|
472
|
+
),
|
|
473
|
+
showAuthor && article.authorMapping && article.authorMapping.length > 0 && article.authorMapping.map(function (authorDetail, index) {
|
|
474
|
+
return renderAuthor(authorDetail, index, article.authorMapping.length);
|
|
475
|
+
}),
|
|
476
|
+
article.source && React__default.createElement(
|
|
477
|
+
'p',
|
|
478
|
+
{ className: 'p-0 mb-1' },
|
|
479
|
+
article.source
|
|
480
|
+
),
|
|
481
|
+
showCategory && article.contentCategory && React__default.createElement(
|
|
482
|
+
'p',
|
|
483
|
+
{
|
|
484
|
+
style: {
|
|
485
|
+
background: '#3FB618',
|
|
486
|
+
color: '#ffffff',
|
|
487
|
+
marginBottom: '.25rem',
|
|
488
|
+
display: 'inline-block',
|
|
489
|
+
padding: '0 .25rem',
|
|
490
|
+
fontSize: '.8rem'
|
|
491
|
+
} },
|
|
492
|
+
article.contentCategory.name.slice(0, article.contentCategory.name.length - 1)
|
|
493
|
+
),
|
|
494
|
+
article.summary && React__default.createElement(
|
|
495
|
+
'p',
|
|
496
|
+
{ className: 'pt-2 card-text' },
|
|
497
|
+
clean_html_1(article.summary)
|
|
498
|
+
)
|
|
499
|
+
)
|
|
500
|
+
)
|
|
501
|
+
)
|
|
502
|
+
),
|
|
503
|
+
main_39 && rightItems && (index + 1) % numberOfItemsBeforeAd === 0 && renderMobileAd(index, numberOfItemsBeforeAd, rightItems)
|
|
504
|
+
);
|
|
505
|
+
}) : React__default.createElement(
|
|
506
|
+
'div',
|
|
507
|
+
null,
|
|
508
|
+
React__default.createElement(
|
|
509
|
+
'h5',
|
|
510
|
+
null,
|
|
511
|
+
React__default.createElement(
|
|
512
|
+
'em',
|
|
513
|
+
null,
|
|
514
|
+
'New content coming soon, please check back later.'
|
|
515
|
+
)
|
|
516
|
+
)
|
|
517
|
+
),
|
|
518
|
+
React__default.createElement(
|
|
519
|
+
'style',
|
|
520
|
+
{ jsx: 'true' },
|
|
521
|
+
'\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 '
|
|
522
|
+
)
|
|
523
|
+
);
|
|
524
|
+
};
|
|
525
|
+
|
|
526
|
+
var renderMobileAd = function renderMobileAd(index, numberOfItemsBeforeAd, rightItems) {
|
|
527
|
+
var i = ((index + 1) / numberOfItemsBeforeAd - 1) % rightItems.length;
|
|
528
|
+
return React__default.createElement(
|
|
529
|
+
'div',
|
|
530
|
+
{ style: { display: 'flex', flex: '1 0 auto' } },
|
|
531
|
+
rightItems[i].component
|
|
532
|
+
);
|
|
533
|
+
};
|
|
534
|
+
|
|
535
|
+
var renderManualPagination = function renderManualPagination(currentPage) {
|
|
536
|
+
return React__default.createElement(
|
|
537
|
+
'div',
|
|
538
|
+
{ className: 'd-flex justify-content-between' },
|
|
539
|
+
currentPage && currentPage > 1 && React__default.createElement(
|
|
540
|
+
'a',
|
|
541
|
+
{ href: '?page=' + (currentPage - 1) },
|
|
542
|
+
'<< Previous'
|
|
543
|
+
),
|
|
544
|
+
React__default.createElement(
|
|
545
|
+
'a',
|
|
546
|
+
{ href: '?page=' + (currentPage + 1) },
|
|
547
|
+
'Next >>'
|
|
548
|
+
)
|
|
549
|
+
);
|
|
550
|
+
};
|
|
551
|
+
|
|
552
|
+
var usePrevious = function usePrevious(value) {
|
|
553
|
+
var ref = useRef();
|
|
554
|
+
useEffect(function () {
|
|
555
|
+
ref.current = value;
|
|
556
|
+
});
|
|
557
|
+
return ref.current;
|
|
558
|
+
};
|
|
559
|
+
|
|
560
|
+
var InfiniteScrollDeck = function InfiniteScrollDeck(props) {
|
|
561
|
+
var router = useRouter();
|
|
562
|
+
var initialData = props.dataRecord,
|
|
563
|
+
client = props.client,
|
|
564
|
+
params = props.params,
|
|
565
|
+
query = props.query,
|
|
566
|
+
autoScroll = props.autoScroll,
|
|
567
|
+
pointer = props.pointer,
|
|
568
|
+
pointerArray = props.pointerArray,
|
|
569
|
+
mapping = props.mapping,
|
|
570
|
+
seoPaginate = props.seoPaginate,
|
|
571
|
+
pageview = props.pageview,
|
|
572
|
+
defaultImage = props.defaultImage,
|
|
573
|
+
showAuthor = props.showAuthor,
|
|
574
|
+
showCategory = props.showCategory,
|
|
575
|
+
imageHeight = props.imageHeight,
|
|
576
|
+
imageWidth = props.imageWidth,
|
|
577
|
+
rightItems = props.rightItems,
|
|
578
|
+
brandInsightAd = props.brandInsightAd,
|
|
579
|
+
_props$showBI = props.showBI,
|
|
580
|
+
showBI = _props$showBI === undefined ? false : _props$showBI;
|
|
581
|
+
var initialCurrentPage = props.currentPage,
|
|
582
|
+
showPublished = props.showPublished;
|
|
583
|
+
|
|
584
|
+
var builder = imageUrlBuilder(client);
|
|
585
|
+
|
|
586
|
+
var _useState = useState(initialData),
|
|
587
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
588
|
+
data = _useState2[0],
|
|
589
|
+
setData = _useState2[1];
|
|
590
|
+
|
|
591
|
+
var _useState3 = useState(true),
|
|
592
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
593
|
+
scrolling = _useState4[0],
|
|
594
|
+
setScrolling = _useState4[1];
|
|
595
|
+
|
|
596
|
+
var _useState5 = useState(params ? params.to : 0),
|
|
597
|
+
_useState6 = _slicedToArray(_useState5, 1),
|
|
598
|
+
per = _useState6[0];
|
|
599
|
+
|
|
600
|
+
var _useState7 = useState(initialCurrentPage || 1),
|
|
601
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
602
|
+
currentPage = _useState8[0],
|
|
603
|
+
setCurrentPage = _useState8[1];
|
|
604
|
+
|
|
605
|
+
var _useState9 = useState({
|
|
606
|
+
from: params ? params.from : 0,
|
|
607
|
+
to: params ? params.to : 0,
|
|
608
|
+
page: 1
|
|
609
|
+
}),
|
|
610
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
611
|
+
values = _useState10[0],
|
|
612
|
+
setValues = _useState10[1];
|
|
613
|
+
|
|
614
|
+
var itemsPerPage = params.itemsPerPage;
|
|
615
|
+
|
|
616
|
+
var prevValues = usePrevious(values);
|
|
617
|
+
|
|
618
|
+
useEffect(function () {
|
|
619
|
+
if (prevValues) {
|
|
620
|
+
if (values.page !== prevValues.page && values.from !== prevValues.from && values.to !== prevValues.from) {
|
|
621
|
+
loadData(values, query, client, params, setData, setScrolling, pointer, pointerArray);
|
|
622
|
+
}
|
|
623
|
+
}
|
|
624
|
+
}, [values, prevValues, query, client, params, setData, setScrolling, pointer, pointerArray]);
|
|
625
|
+
|
|
626
|
+
useEffect(function () {
|
|
627
|
+
document.addEventListener('scroll', trackScrolling);
|
|
628
|
+
return function () {
|
|
629
|
+
document.removeEventListener('scroll', trackScrolling);
|
|
630
|
+
};
|
|
631
|
+
}, [currentPage]);
|
|
632
|
+
|
|
633
|
+
var trackScrolling = function trackScrolling(current) {
|
|
634
|
+
if (window.pageYOffset === 0) {
|
|
635
|
+
if (currentPage > 1) {
|
|
636
|
+
changePageNumber(1, seoPaginate, pageview, router, currentPage, setCurrentPage, itemsPerPage, 1);
|
|
637
|
+
}
|
|
638
|
+
}
|
|
639
|
+
};
|
|
640
|
+
|
|
641
|
+
return React__default.createElement(
|
|
642
|
+
'div',
|
|
643
|
+
null,
|
|
644
|
+
autoScroll ? React__default.createElement(
|
|
645
|
+
React__default.Fragment,
|
|
646
|
+
null,
|
|
647
|
+
React__default.createElement(
|
|
648
|
+
InfiniteScroll,
|
|
649
|
+
{ dataLength: data && data.length, next: function next() {
|
|
650
|
+
return loadMore(values, setValues, per);
|
|
651
|
+
}, hasMore: scrolling, scrollThreshold: 0.9 },
|
|
652
|
+
React__default.createElement(
|
|
653
|
+
Container,
|
|
654
|
+
null,
|
|
655
|
+
cardLoader(data, builder, mapping, values, seoPaginate, pageview, router, currentPage, setCurrentPage, showPublished, defaultImage, showAuthor, showCategory, imageHeight, imageWidth, rightItems, brandInsightAd, showBI, itemsPerPage)
|
|
656
|
+
)
|
|
657
|
+
),
|
|
658
|
+
React__default.createElement(
|
|
659
|
+
'noscript',
|
|
660
|
+
null,
|
|
661
|
+
renderManualPagination(currentPage)
|
|
662
|
+
)
|
|
663
|
+
) : React__default.createElement(
|
|
664
|
+
React__default.Fragment,
|
|
665
|
+
null,
|
|
666
|
+
React__default.createElement(
|
|
667
|
+
Container,
|
|
668
|
+
null,
|
|
669
|
+
cardLoader(data, builder, mapping, values, seoPaginate, pageview, router, currentPage, setCurrentPage, showPublished, defaultImage, showAuthor, showCategory, rightItems, brandInsightAd, showBI, itemsPerPage)
|
|
670
|
+
),
|
|
671
|
+
React__default.createElement(
|
|
672
|
+
'div',
|
|
673
|
+
{ style: { padding: '0px 10px' } },
|
|
674
|
+
scrolling ? React__default.createElement(
|
|
675
|
+
'button',
|
|
676
|
+
{
|
|
677
|
+
style: { margin: 'auto', width: '100%' },
|
|
678
|
+
onClick: function onClick(e) {
|
|
679
|
+
loadMore(values, setValues, per);
|
|
680
|
+
} },
|
|
681
|
+
'Load More'
|
|
682
|
+
) : React__default.createElement(
|
|
683
|
+
'p',
|
|
684
|
+
{ style: { textAlign: 'center' } },
|
|
685
|
+
React__default.createElement(
|
|
686
|
+
'b',
|
|
687
|
+
null,
|
|
688
|
+
'End of data'
|
|
689
|
+
)
|
|
690
|
+
)
|
|
691
|
+
),
|
|
692
|
+
React__default.createElement(
|
|
693
|
+
'noscript',
|
|
694
|
+
null,
|
|
695
|
+
renderManualPagination(currentPage)
|
|
696
|
+
)
|
|
697
|
+
)
|
|
698
|
+
);
|
|
699
|
+
};
|
|
700
|
+
|
|
75
701
|
var momentTimezone = createCommonjsModule(function (module) {
|
|
76
702
|
//! moment-timezone.js
|
|
77
703
|
//! version : 0.5.31
|
|
@@ -1623,12 +2249,12 @@ var latest = {
|
|
|
1623
2249
|
};
|
|
1624
2250
|
|
|
1625
2251
|
var latest$1 = /*#__PURE__*/Object.freeze({
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
2252
|
+
__proto__: null,
|
|
2253
|
+
version: version,
|
|
2254
|
+
zones: zones,
|
|
2255
|
+
links: links,
|
|
2256
|
+
countries: countries,
|
|
2257
|
+
'default': latest
|
|
1632
2258
|
});
|
|
1633
2259
|
|
|
1634
2260
|
var require$$1 = getCjsExportFromNamespace(latest$1);
|
|
@@ -1801,7 +2427,9 @@ var itemsPerPage = 200;
|
|
|
1801
2427
|
var EventsDeck = function EventsDeck(_ref) {
|
|
1802
2428
|
var rightItems = _ref.rightItems,
|
|
1803
2429
|
_ref$filter = _ref.filter,
|
|
1804
|
-
filter = _ref$filter === undefined ? 'start gt \'' + currentTime + '\' and status eq \'Active\'' : _ref$filter
|
|
2430
|
+
filter = _ref$filter === undefined ? 'start gt \'' + currentTime + '\' and status eq \'Active\'' : _ref$filter,
|
|
2431
|
+
_ref$hardCodedEvents = _ref.hardCodedEvents,
|
|
2432
|
+
hardCodedEvents = _ref$hardCodedEvents === undefined ? null : _ref$hardCodedEvents;
|
|
1805
2433
|
|
|
1806
2434
|
var _useState = useState(true),
|
|
1807
2435
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -1842,11 +2470,31 @@ var EventsDeck = function EventsDeck(_ref) {
|
|
|
1842
2470
|
return response.json();
|
|
1843
2471
|
}).then(function (events) {
|
|
1844
2472
|
setIsLoading(false);
|
|
2473
|
+
|
|
2474
|
+
if (hardCodedEvents) {
|
|
2475
|
+
var temp = [].concat(_toConsumableArray(events.data));
|
|
2476
|
+
if (filter.indexOf('start') >= 0 && hardCodedEvents.upcomingEvents.length > 0) {
|
|
2477
|
+
for (var event in hardCodedEvents.upcomingEvents) {
|
|
2478
|
+
temp.push(hardCodedEvents.upcomingEvents[event]);
|
|
2479
|
+
}
|
|
2480
|
+
}
|
|
2481
|
+
if (filter.indexOf('end') >= 0 && hardCodedEvents.pastEvents.length > 0) {
|
|
2482
|
+
for (var _event in hardCodedEvents.pastEvents) {
|
|
2483
|
+
temp.push(hardCodedEvents.pastEvents[_event]);
|
|
2484
|
+
}
|
|
2485
|
+
}
|
|
2486
|
+
events.data = temp;
|
|
2487
|
+
}
|
|
2488
|
+
|
|
1845
2489
|
if (events.data && events.data.length > 0) {
|
|
1846
2490
|
var filteredEventsByTestMode = events.data.filter(function (event) {
|
|
1847
2491
|
return event.testMode === false;
|
|
1848
2492
|
});
|
|
1849
2493
|
var sortedEventsByStartData = filteredEventsByTestMode.sort(function (a, b) {
|
|
2494
|
+
console.log(a.start);
|
|
2495
|
+
if (a.start.indexOf('TBD') >= 0 || b.start.indexOf('TBD') >= 0) {
|
|
2496
|
+
return -1;
|
|
2497
|
+
}
|
|
1850
2498
|
if (momentTimezone$1(a.start).isAfter(b.start)) {
|
|
1851
2499
|
return 1;
|
|
1852
2500
|
} else if (momentTimezone$1(a.start).isBefore(b.start)) {
|
|
@@ -1917,10 +2565,10 @@ var EventsDeck = function EventsDeck(_ref) {
|
|
|
1917
2565
|
fetch(url, {
|
|
1918
2566
|
headers: {
|
|
1919
2567
|
'Content-Type': 'application/json',
|
|
1920
|
-
|
|
2568
|
+
Accept: 'application/json'
|
|
1921
2569
|
},
|
|
1922
2570
|
method: 'post',
|
|
1923
|
-
credentials:
|
|
2571
|
+
credentials: 'include',
|
|
1924
2572
|
body: _JSON$stringify({
|
|
1925
2573
|
clientId: clientId,
|
|
1926
2574
|
clientSecret: clientSecret
|
|
@@ -1948,12 +2596,23 @@ var EventsDeck = function EventsDeck(_ref) {
|
|
|
1948
2596
|
)
|
|
1949
2597
|
);
|
|
1950
2598
|
};
|
|
2599
|
+
var renderLearnMoreButton = function renderLearnMoreButton(links) {
|
|
2600
|
+
return React__default.createElement(
|
|
2601
|
+
'a',
|
|
2602
|
+
{ href: links.summary.href || '#', target: '_blank' },
|
|
2603
|
+
React__default.createElement(
|
|
2604
|
+
Button,
|
|
2605
|
+
{ size: 'sm', className: 'registration-button', style: { borderRadius: '8px' } },
|
|
2606
|
+
'Learn More'
|
|
2607
|
+
)
|
|
2608
|
+
);
|
|
2609
|
+
};
|
|
1951
2610
|
|
|
1952
2611
|
var cardLoader = function cardLoader() {
|
|
1953
2612
|
var numberOfItemsBeforeAd = 5;
|
|
1954
2613
|
|
|
1955
2614
|
return React__default.createElement(
|
|
1956
|
-
Container,
|
|
2615
|
+
Container$1,
|
|
1957
2616
|
{ style: { padding: 1 } },
|
|
1958
2617
|
data && data.map(function (row, index) {
|
|
1959
2618
|
var speakerInfo = [];
|
|
@@ -1964,7 +2623,7 @@ var EventsDeck = function EventsDeck(_ref) {
|
|
|
1964
2623
|
}
|
|
1965
2624
|
});
|
|
1966
2625
|
}
|
|
1967
|
-
|
|
2626
|
+
var isHardcoded = row.hardCoded;
|
|
1968
2627
|
var start = row.start,
|
|
1969
2628
|
end = row.end,
|
|
1970
2629
|
venues = row.venues,
|
|
@@ -1987,14 +2646,24 @@ var EventsDeck = function EventsDeck(_ref) {
|
|
|
1987
2646
|
}
|
|
1988
2647
|
return result;
|
|
1989
2648
|
}, '') : '';
|
|
1990
|
-
|
|
2649
|
+
var startDay = momentTimezone$1(start).tz(timezone).format();
|
|
2650
|
+
var endDay = momentTimezone$1(end).tz(timezone).format();
|
|
2651
|
+
var showEndTime = momentTimezone$1(startDay.split('T')[0]).isBefore(endDay.split('T')[0]) ? ' to ' + momentTimezone$1(end).tz(timezone).format('LLL zz') : null;
|
|
1991
2652
|
return React__default.createElement(
|
|
1992
2653
|
React__default.Fragment,
|
|
1993
2654
|
{ key: index },
|
|
1994
2655
|
React__default.createElement(
|
|
1995
2656
|
Card,
|
|
1996
2657
|
null,
|
|
1997
|
-
|
|
2658
|
+
isHardcoded ? _links && React__default.createElement(
|
|
2659
|
+
Row,
|
|
2660
|
+
null,
|
|
2661
|
+
React__default.createElement(
|
|
2662
|
+
Col,
|
|
2663
|
+
null,
|
|
2664
|
+
renderLearnMoreButton(_links)
|
|
2665
|
+
)
|
|
2666
|
+
) : isRegister && _links && React__default.createElement(
|
|
1998
2667
|
Row,
|
|
1999
2668
|
null,
|
|
2000
2669
|
React__default.createElement(
|
|
@@ -2018,10 +2687,15 @@ var EventsDeck = function EventsDeck(_ref) {
|
|
|
2018
2687
|
React__default.createElement(
|
|
2019
2688
|
Col,
|
|
2020
2689
|
null,
|
|
2021
|
-
React__default.createElement(
|
|
2690
|
+
start.indexOf('TBD') >= 0 ? React__default.createElement(
|
|
2022
2691
|
'p',
|
|
2023
2692
|
{ className: 'start-time', style: { padding: 0, margin: 0 } },
|
|
2024
|
-
|
|
2693
|
+
start
|
|
2694
|
+
) : React__default.createElement(
|
|
2695
|
+
'p',
|
|
2696
|
+
{ className: 'start-time', style: { padding: 0, margin: 0 } },
|
|
2697
|
+
start.indexOf('T') >= 0 ? momentTimezone$1(start).tz(timezone).format('LLL zz') : momentTimezone$1(start).format('LL'),
|
|
2698
|
+
showEndTime
|
|
2025
2699
|
)
|
|
2026
2700
|
)
|
|
2027
2701
|
),
|
|
@@ -2504,7 +3178,7 @@ var CMEDeck = function CMEDeck(_ref) {
|
|
|
2504
3178
|
)
|
|
2505
3179
|
) },
|
|
2506
3180
|
React__default.createElement(
|
|
2507
|
-
Container
|
|
3181
|
+
Container,
|
|
2508
3182
|
null,
|
|
2509
3183
|
cardLoader()
|
|
2510
3184
|
)
|
|
@@ -2518,7 +3192,7 @@ var CMEDeck = function CMEDeck(_ref) {
|
|
|
2518
3192
|
React__default.Fragment,
|
|
2519
3193
|
null,
|
|
2520
3194
|
React__default.createElement(
|
|
2521
|
-
Container
|
|
3195
|
+
Container,
|
|
2522
3196
|
null,
|
|
2523
3197
|
cardLoader()
|
|
2524
3198
|
),
|
|
@@ -3159,7 +3833,7 @@ var ADSponsoredResources = function ADSponsoredResources(_ref) {
|
|
|
3159
3833
|
} else return null;
|
|
3160
3834
|
};
|
|
3161
3835
|
|
|
3162
|
-
var urlFor$
|
|
3836
|
+
var urlFor$2 = function urlFor(source, builder) {
|
|
3163
3837
|
return builder.image(source).auto('format');
|
|
3164
3838
|
};
|
|
3165
3839
|
|
|
@@ -3210,7 +3884,7 @@ var Slideshow = function Slideshow(_ref) {
|
|
|
3210
3884
|
return React__default.createElement(
|
|
3211
3885
|
Carousel.Item,
|
|
3212
3886
|
{ key: slide._key },
|
|
3213
|
-
React__default.createElement('img', { src: slide.asset && urlFor$
|
|
3887
|
+
React__default.createElement('img', { src: slide.asset && urlFor$2(slide.asset, builder).url(), alt: slide.alt && slide.alt, style: { width: '100%' } }),
|
|
3214
3888
|
slide.caption && React__default.createElement(
|
|
3215
3889
|
'p',
|
|
3216
3890
|
{ className: 'p-2' },
|
|
@@ -13519,7 +14193,7 @@ var Leads = function Leads(_ref) {
|
|
|
13519
14193
|
);
|
|
13520
14194
|
};
|
|
13521
14195
|
|
|
13522
|
-
var urlFor$
|
|
14196
|
+
var urlFor$3 = function urlFor(source, client) {
|
|
13523
14197
|
var builder = imageUrlBuilder(client);
|
|
13524
14198
|
return builder.image(source).auto('format');
|
|
13525
14199
|
};
|
|
@@ -13576,7 +14250,7 @@ var Slideshow$1 = function Slideshow(_ref) {
|
|
|
13576
14250
|
React__default.createElement(
|
|
13577
14251
|
LazyLoad,
|
|
13578
14252
|
null,
|
|
13579
|
-
React__default.createElement('img', { src: urlFor$
|
|
14253
|
+
React__default.createElement('img', { src: urlFor$3(slide.slideshowImage, client).url(), alt: slide.slideshowImage.alt || 'slideshow image', style: { width: '100%' } })
|
|
13580
14254
|
)
|
|
13581
14255
|
),
|
|
13582
14256
|
React__default.createElement(
|
|
@@ -14010,13 +14684,13 @@ var SetCookie = function SetCookie(key, value) {
|
|
|
14010
14684
|
js_cookie.set(key, value, { expires: 1, sameSite: 'none', secure: true });
|
|
14011
14685
|
};
|
|
14012
14686
|
|
|
14013
|
-
var urlFor$
|
|
14687
|
+
var urlFor$4 = function urlFor(source, client) {
|
|
14014
14688
|
var builder = imageUrlBuilder(client);
|
|
14015
14689
|
return builder.image(source).auto('format');
|
|
14016
14690
|
};
|
|
14017
14691
|
|
|
14018
|
-
var renderCardImage = function renderCardImage(thumbnail, client, imageHeight, imageWidth) {
|
|
14019
|
-
var url = urlFor$
|
|
14692
|
+
var renderCardImage$1 = function renderCardImage(thumbnail, client, imageHeight, imageWidth) {
|
|
14693
|
+
var url = urlFor$4(thumbnail, client);
|
|
14020
14694
|
if (imageHeight) url = url.height(imageHeight);
|
|
14021
14695
|
if (imageWidth) url = url.width(imageWidth);
|
|
14022
14696
|
return url.url();
|
|
@@ -14043,7 +14717,7 @@ var Hero = function Hero(_ref) {
|
|
|
14043
14717
|
{ className: 'h4' },
|
|
14044
14718
|
title
|
|
14045
14719
|
),
|
|
14046
|
-
thumbnail && client && React__default.createElement(Card$1.Img, { src: renderCardImage(thumbnail, client, imageHeight, imageWidth) }),
|
|
14720
|
+
thumbnail && client && React__default.createElement(Card$1.Img, { src: renderCardImage$1(thumbnail, client, imageHeight, imageWidth) }),
|
|
14047
14721
|
summary && React__default.createElement(
|
|
14048
14722
|
Card$1.Footer,
|
|
14049
14723
|
{ className: 'h6' },
|
|
@@ -16214,7 +16888,7 @@ var InscreenSensor = function (_React$Component) {
|
|
|
16214
16888
|
return InscreenSensor;
|
|
16215
16889
|
}(React__default.Component);
|
|
16216
16890
|
|
|
16217
|
-
var renderAuthor = function renderAuthor(authorName, authorURL, index, length) {
|
|
16891
|
+
var renderAuthor$1 = function renderAuthor(authorName, authorURL, index, length) {
|
|
16218
16892
|
if (authorName && authorURL) {
|
|
16219
16893
|
return React__default.createElement(
|
|
16220
16894
|
'a',
|
|
@@ -16516,7 +17190,7 @@ var Article = function Article(props) {
|
|
|
16516
17190
|
return React__default.createElement(
|
|
16517
17191
|
'div',
|
|
16518
17192
|
{ key: index },
|
|
16519
|
-
renderAuthor(authorDetail.displayName, authorDetail.url, index, authorDetails.length)
|
|
17193
|
+
renderAuthor$1(authorDetail.displayName, authorDetail.url, index, authorDetails.length)
|
|
16520
17194
|
);
|
|
16521
17195
|
}),
|
|
16522
17196
|
React__default.createElement(
|
|
@@ -17091,8 +17765,8 @@ function useUser() {
|
|
|
17091
17765
|
}
|
|
17092
17766
|
|
|
17093
17767
|
var hooks = /*#__PURE__*/Object.freeze({
|
|
17094
|
-
|
|
17095
|
-
|
|
17768
|
+
__proto__: null,
|
|
17769
|
+
useUser: useUser
|
|
17096
17770
|
});
|
|
17097
17771
|
|
|
17098
17772
|
var LoginForm = function LoginForm(props) {
|
|
@@ -18314,11 +18988,11 @@ function getTokenCookie(req) {
|
|
|
18314
18988
|
}
|
|
18315
18989
|
|
|
18316
18990
|
var authCookies = /*#__PURE__*/Object.freeze({
|
|
18317
|
-
|
|
18318
|
-
|
|
18319
|
-
|
|
18320
|
-
|
|
18321
|
-
|
|
18991
|
+
__proto__: null,
|
|
18992
|
+
setTokenCookie: setTokenCookie,
|
|
18993
|
+
removeTokenCookie: removeTokenCookie,
|
|
18994
|
+
parseCookies: parseCookies,
|
|
18995
|
+
getTokenCookie: getTokenCookie
|
|
18322
18996
|
});
|
|
18323
18997
|
|
|
18324
18998
|
function encryptSession(session) {
|
|
@@ -18362,9 +19036,9 @@ var getSession = function () {
|
|
|
18362
19036
|
}();
|
|
18363
19037
|
|
|
18364
19038
|
var iron = /*#__PURE__*/Object.freeze({
|
|
18365
|
-
|
|
18366
|
-
|
|
18367
|
-
|
|
19039
|
+
__proto__: null,
|
|
19040
|
+
encryptSession: encryptSession,
|
|
19041
|
+
getSession: getSession
|
|
18368
19042
|
});
|
|
18369
19043
|
|
|
18370
19044
|
var toStr = Object.prototype.toString;
|
|
@@ -20619,10 +21293,10 @@ var findUser$1 = function () {
|
|
|
20619
21293
|
}();
|
|
20620
21294
|
|
|
20621
21295
|
var user = /*#__PURE__*/Object.freeze({
|
|
20622
|
-
|
|
20623
|
-
|
|
20624
|
-
|
|
20625
|
-
|
|
21296
|
+
__proto__: null,
|
|
21297
|
+
createUser: createUser$1,
|
|
21298
|
+
updateUser: updateUser$1,
|
|
21299
|
+
findUser: findUser$1
|
|
20626
21300
|
});
|
|
20627
21301
|
|
|
20628
21302
|
var localStrategy = new Local.Strategy({
|
|
@@ -20638,8 +21312,8 @@ var localStrategy = new Local.Strategy({
|
|
|
20638
21312
|
});
|
|
20639
21313
|
|
|
20640
21314
|
var passportLocal = /*#__PURE__*/Object.freeze({
|
|
20641
|
-
|
|
20642
|
-
|
|
21315
|
+
__proto__: null,
|
|
21316
|
+
localStrategy: localStrategy
|
|
20643
21317
|
});
|
|
20644
21318
|
|
|
20645
21319
|
var _this$4 = undefined;
|
|
@@ -20831,4 +21505,4 @@ var auth = {
|
|
|
20831
21505
|
ProcessData: ProcessData_1
|
|
20832
21506
|
};
|
|
20833
21507
|
|
|
20834
|
-
export { AD300x250, AD300x250x600, ADFloatingFooter, ADFooter, ADGutter, ADSponsoredResources, ADWelcome, AccordionPanel, AdSlotsProvider, AlphabeticList, ArticleDetailDropdown, ArticleQueue, auth as Auth, Breadcrumbs$1 as Breadcrumbs, CMEDeck, ConferenceArticleCard, EventsDeck, Feature, fbsHero as ForbesHero, GridHero, Hero, HighlightenVideo, HorizontalHero, KMTracker, OncliveHero, OncliveLargeHero, PdfDownload, RelatedContent, RelatedTopicsDropdown, SetCookie, SocialShare$1 as SocialShare, VerticalHero, YahooHero, getSerializers };
|
|
21508
|
+
export { AD300x250, AD300x250x600, ADFloatingFooter, ADFooter, ADGutter, ADSponsoredResources, ADWelcome, AccordionPanel, AdSlotsProvider, AlphabeticList, ArticleDetailDropdown, ArticleQueue, auth as Auth, Breadcrumbs$1 as Breadcrumbs, CMEDeck, ConferenceArticleCard, EventsDeck, Feature, fbsHero as ForbesHero, GridHero, Hero, HighlightenVideo, HorizontalHero, InfiniteScrollDeck, KMTracker, OncliveHero, OncliveLargeHero, PdfDownload, RelatedContent, RelatedTopicsDropdown, SetCookie, SocialShare$1 as SocialShare, VerticalHero, YahooHero, getSerializers };
|