@mjhls/mjh-framework 1.0.440 → 1.0.441
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 +172 -172
- package/dist/cjs/{ADInfeed-494f5e6b.js → ADInfeed-ae1f348d.js} +12 -10
- package/dist/cjs/{ADlgInfeed-be0e0bde.js → ADlgInfeed-f4c4a1bf.js} +8 -7
- package/dist/cjs/{AdSlot-4d22aad4.js → AdSlot-257d8d4e.js} +256 -15
- package/dist/cjs/{AuthorComponent-4706f297.js → AuthorComponent-b44bb44e.js} +13 -12
- package/dist/cjs/DeckContent.js +91 -87
- package/dist/cjs/DeckQueue.js +82 -78
- package/dist/cjs/{Dfp-2399639f.js → Dfp-d7639f4c.js} +22 -20
- package/dist/cjs/{Figure-9e886c5b.js → Figure-cc919c38.js} +20 -19
- package/dist/cjs/{GridContent-184cdd0f.js → GridContent-db383f73.js} +161 -157
- package/dist/cjs/GridContent.js +14 -14
- package/dist/cjs/GroupDeck.js +39 -38
- package/dist/cjs/IssueContentDeck.js +65 -60
- package/dist/cjs/IssueDeck.js +69 -64
- package/dist/cjs/MasterDeck.js +60 -59
- package/dist/cjs/{Normal-62915103.js → Normal-430e8e61.js} +523 -512
- package/dist/cjs/PublicationDeck.js +64 -59
- package/dist/cjs/QueueDeckExpanded.js +99 -99
- package/dist/cjs/{TaxonomyCard-eb928f05.js → TaxonomyCard-fa09aac1.js} +77 -71
- package/dist/cjs/TaxonomyCard.js +4 -4
- package/dist/cjs/TemplateNormal.js +6 -6
- package/dist/cjs/ThumbnailCard.js +17 -15
- package/dist/cjs/{Ustream-6aebd935.js → Ustream-46288bdf.js} +17 -16
- package/dist/cjs/Ustream.js +1 -1
- package/dist/cjs/VideoSeriesListing.js +40 -39
- package/dist/cjs/YoutubeGroup.js +49 -48
- package/dist/cjs/{debounce-b088070c.js → debounce-420ff8a8.js} +16 -12
- package/dist/cjs/{get-5aa7468c.js → get-7a75c563.js} +1 -1
- package/dist/cjs/{index-fa0fb52c.js → index-8a3fb0bc.js} +13 -10
- package/dist/cjs/{index-b5eb3ff8.js → index-be0c82be.js} +19 -20
- package/dist/cjs/{index.es-ab3f2690.js → index.es-44c8e726.js} +9 -10
- package/dist/cjs/index.esm-340d3792.js +0 -3
- package/dist/cjs/index.js +1887 -1927
- package/dist/cjs/{inherits-e793003e.js → inherits-b4036c94.js} +4 -4
- package/dist/cjs/{main-bc4db521.js → main-d76cde9c.js} +52 -82
- package/dist/cjs/{react-social-icons-cd0d9d3b.js → react-social-icons-07939b41.js} +13 -11
- package/dist/cjs/{typeof-2747c582.js → typeof-0d86b91c.js} +1 -1
- package/dist/cjs/{visibility-sensor-0c45a583.js → visibility-sensor-a40ae0cd.js} +8 -6
- package/dist/esm/{ADInfeed-e5cefea5.js → ADInfeed-dff74bbe.js} +6 -6
- package/dist/esm/{ADlgInfeed-51a2801a.js → ADlgInfeed-7b29db85.js} +5 -5
- package/dist/esm/{AdSlot-78e48a2c.js → AdSlot-362a1c30.js} +246 -8
- package/dist/esm/{AuthorComponent-c9e46673.js → AuthorComponent-4f5f15ed.js} +10 -10
- package/dist/esm/DeckContent.js +62 -62
- package/dist/esm/DeckQueue.js +47 -47
- package/dist/esm/{Dfp-d5fe1252.js → Dfp-994cd0ab.js} +10 -10
- package/dist/esm/{Figure-cc1affbe.js → Figure-1c55ebf0.js} +17 -17
- package/dist/esm/{GridContent-b79201ad.js → GridContent-6b38c580.js} +111 -111
- package/dist/esm/GridContent.js +14 -14
- package/dist/esm/GroupDeck.js +34 -34
- package/dist/esm/IssueContentDeck.js +35 -35
- package/dist/esm/IssueDeck.js +34 -34
- package/dist/esm/MasterDeck.js +45 -45
- package/dist/esm/{Normal-6eba8168.js → Normal-6efd92da.js} +407 -407
- package/dist/esm/PublicationDeck.js +34 -34
- package/dist/esm/QueueDeckExpanded.js +92 -92
- package/dist/esm/{TaxonomyCard-b29aa7ac.js → TaxonomyCard-b22a742f.js} +37 -37
- package/dist/esm/TaxonomyCard.js +4 -4
- package/dist/esm/TemplateNormal.js +6 -6
- package/dist/esm/ThumbnailCard.js +13 -13
- package/dist/esm/{Ustream-914ce145.js → Ustream-c4f281a3.js} +14 -14
- package/dist/esm/Ustream.js +1 -1
- package/dist/esm/VideoSeriesListing.js +26 -26
- package/dist/esm/YoutubeGroup.js +37 -37
- package/dist/esm/{debounce-df468b0e.js → debounce-42a7f724.js} +9 -7
- package/dist/esm/{get-53653403.js → get-bc6cf9fb.js} +1 -1
- package/dist/esm/{index-51a80699.js → index-73819142.js} +19 -20
- package/dist/esm/{index-5f9f807a.js → index-c5fd0af5.js} +4 -4
- package/dist/esm/{index.es-938a3a58.js → index.es-27d0bae9.js} +6 -8
- package/dist/esm/index.js +1752 -1815
- package/dist/esm/{inherits-dfba24f5.js → inherits-bbec2f34.js} +1 -1
- package/dist/esm/{main-7d1b3c98.js → main-cf4930f0.js} +50 -81
- package/dist/esm/{react-social-icons-a7d5c5c7.js → react-social-icons-3822f1ce.js} +5 -5
- package/dist/esm/{typeof-e4b50250.js → typeof-09bf9211.js} +1 -1
- package/dist/esm/{visibility-sensor-0baa4eea.js → visibility-sensor-87d6b78c.js} +3 -3
- package/package.json +105 -103
package/dist/esm/DeckQueue.js
CHANGED
|
@@ -6,10 +6,10 @@ import './_iter-detect-7c281f0a.js';
|
|
|
6
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
|
-
import { a as _inherits, b as _classCallCheck, c as _possibleConstructorReturn, d as _Object$getPrototypeOf, e as _createClass } from './inherits-
|
|
10
|
-
import './typeof-
|
|
11
|
-
import
|
|
12
|
-
import { d as debounce_1, l as lib_3 } from './debounce-
|
|
9
|
+
import { a as _inherits, b as _classCallCheck, c as _possibleConstructorReturn, d as _Object$getPrototypeOf, e as _createClass } from './inherits-bbec2f34.js';
|
|
10
|
+
import './typeof-09bf9211.js';
|
|
11
|
+
import React from 'react';
|
|
12
|
+
import { d as debounce_1, l as lib_3 } from './debounce-42a7f724.js';
|
|
13
13
|
import 'prop-types';
|
|
14
14
|
import Container from 'react-bootstrap/Container';
|
|
15
15
|
import Row from 'react-bootstrap/Row';
|
|
@@ -17,14 +17,14 @@ import Col from 'react-bootstrap/Col';
|
|
|
17
17
|
import Card from 'react-bootstrap/Card';
|
|
18
18
|
import { m as moment } from './moment-12415288.js';
|
|
19
19
|
import { withRouter } from 'next/router';
|
|
20
|
-
import { I as InfiniteScroll } from './index.es-
|
|
20
|
+
import { I as InfiniteScroll } from './index.es-27d0bae9.js';
|
|
21
21
|
import 'react-dom';
|
|
22
|
-
import { V as VisibilitySensor } from './visibility-sensor-
|
|
23
|
-
import { i as imageUrlBuilder } from './index-
|
|
24
|
-
import { L as LazyLoad } from './index-
|
|
25
|
-
import { m as
|
|
22
|
+
import { V as VisibilitySensor } from './visibility-sensor-87d6b78c.js';
|
|
23
|
+
import { i as imageUrlBuilder } from './index-73819142.js';
|
|
24
|
+
import { L as LazyLoad } from './index-c5fd0af5.js';
|
|
25
|
+
import { m as main_36 } from './main-cf4930f0.js';
|
|
26
26
|
import { c as clean_html_1 } from './entities-7cc3bf45.js';
|
|
27
|
-
import { g as get_1 } from './get-
|
|
27
|
+
import { g as get_1 } from './get-bc6cf9fb.js';
|
|
28
28
|
|
|
29
29
|
var DeckQueue = function (_React$Component) {
|
|
30
30
|
_inherits(DeckQueue, _React$Component);
|
|
@@ -176,7 +176,7 @@ var DeckQueue = function (_React$Component) {
|
|
|
176
176
|
var rightItems = _this.props.rightItems;
|
|
177
177
|
|
|
178
178
|
var i = ((index + 1) / numberOfItemsBeforeAd - 1) % rightItems.length;
|
|
179
|
-
return
|
|
179
|
+
return React.createElement(
|
|
180
180
|
'div',
|
|
181
181
|
{ style: { display: 'flex', flex: '1 0 auto' } },
|
|
182
182
|
rightItems[i].component
|
|
@@ -184,15 +184,15 @@ var DeckQueue = function (_React$Component) {
|
|
|
184
184
|
}, _this.renderManualPagination = function () {
|
|
185
185
|
var currentPage = _this.state.currentPage;
|
|
186
186
|
|
|
187
|
-
return
|
|
187
|
+
return React.createElement(
|
|
188
188
|
'div',
|
|
189
189
|
{ className: 'd-flex justify-content-between' },
|
|
190
|
-
currentPage && currentPage > 1 &&
|
|
190
|
+
currentPage && currentPage > 1 && React.createElement(
|
|
191
191
|
'a',
|
|
192
192
|
{ href: '?page=' + (currentPage - 1) },
|
|
193
193
|
'<< Previous'
|
|
194
194
|
),
|
|
195
|
-
|
|
195
|
+
React.createElement(
|
|
196
196
|
'a',
|
|
197
197
|
{ href: '?page=' + (currentPage + 1) },
|
|
198
198
|
'Next >>'
|
|
@@ -210,78 +210,78 @@ var DeckQueue = function (_React$Component) {
|
|
|
210
210
|
var lgVar = Math.floor(12 / columns);
|
|
211
211
|
var numberOfItemsBeforeAd = 6;
|
|
212
212
|
|
|
213
|
-
return
|
|
213
|
+
return React.createElement(
|
|
214
214
|
Row,
|
|
215
215
|
null,
|
|
216
216
|
this.state.data && this.state.data.map(function (row, index) {
|
|
217
217
|
var pageNumber = row.pageNumber || _this2.state.page;
|
|
218
218
|
// const thumbnailURL = get(row, 'thumbnail.asset.url', this.props.defaultImage)
|
|
219
219
|
|
|
220
|
-
return
|
|
221
|
-
|
|
220
|
+
return React.createElement(
|
|
221
|
+
React.Fragment,
|
|
222
222
|
{ key: index },
|
|
223
|
-
|
|
223
|
+
React.createElement(
|
|
224
224
|
VisibilitySensor,
|
|
225
225
|
{
|
|
226
226
|
onChange: function onChange(isVisible) {
|
|
227
227
|
isVisible && _this2.changePageNumber(pageNumber);
|
|
228
228
|
} },
|
|
229
|
-
|
|
229
|
+
React.createElement(
|
|
230
230
|
Col,
|
|
231
231
|
{ md: 12, lg: lgVar, style: { display: 'flex', flex: '1 0 auto' } },
|
|
232
|
-
|
|
232
|
+
React.createElement(
|
|
233
233
|
Card,
|
|
234
234
|
{ className: 'queue-card', style: { borderTop: '1px solid #EEE' } },
|
|
235
|
-
|
|
235
|
+
React.createElement(
|
|
236
236
|
Row,
|
|
237
237
|
{ style: { flexDirection: mode } },
|
|
238
|
-
(row.thumbnail && row.thumbnail.asset || _this2.props.defaultImage) &&
|
|
238
|
+
(row.thumbnail && row.thumbnail.asset || _this2.props.defaultImage) && React.createElement(
|
|
239
239
|
Col,
|
|
240
240
|
{ md: 12, lg: 4 },
|
|
241
|
-
|
|
241
|
+
React.createElement(
|
|
242
242
|
'a',
|
|
243
243
|
{ href: _this2.page + '/' + get_1(row, 'url.current') },
|
|
244
|
-
|
|
244
|
+
React.createElement(
|
|
245
245
|
LazyLoad,
|
|
246
246
|
{ height: _this2.props.imageHeight },
|
|
247
|
-
|
|
247
|
+
React.createElement(Card.Img, { variant: 'top', src: _this2.renderCardImage(row), alt: row.thumbnail && row.thumbnail.asset ? row.thumbnail.asset.originalFilename : '' })
|
|
248
248
|
)
|
|
249
249
|
)
|
|
250
250
|
),
|
|
251
|
-
|
|
251
|
+
React.createElement(
|
|
252
252
|
Col,
|
|
253
253
|
null,
|
|
254
|
-
|
|
254
|
+
React.createElement(
|
|
255
255
|
Card.Body,
|
|
256
256
|
{ style: { padding: '20px' } },
|
|
257
|
-
row.title &&
|
|
257
|
+
row.title && React.createElement(
|
|
258
258
|
Card.Title,
|
|
259
259
|
null,
|
|
260
|
-
|
|
260
|
+
React.createElement(
|
|
261
261
|
'a',
|
|
262
262
|
{ href: _this2.page + '/' + get_1(row, 'url.current') },
|
|
263
263
|
row.title
|
|
264
264
|
)
|
|
265
265
|
),
|
|
266
|
-
_this2.props.showPublished && row.published &&
|
|
266
|
+
_this2.props.showPublished && row.published && React.createElement(
|
|
267
267
|
Card.Subtitle,
|
|
268
268
|
null,
|
|
269
269
|
moment(row.published).format('MMMM DD, YYYY')
|
|
270
270
|
),
|
|
271
|
-
_this2.props.showRecent && row.recent && row.recent.title &&
|
|
271
|
+
_this2.props.showRecent && row.recent && row.recent.title && React.createElement(
|
|
272
272
|
Card.Subtitle,
|
|
273
273
|
null,
|
|
274
274
|
'Recent : ',
|
|
275
|
-
|
|
275
|
+
React.createElement(
|
|
276
276
|
'a',
|
|
277
277
|
{ href: 'view/' + row.recent.url.current },
|
|
278
278
|
row.recent.title
|
|
279
279
|
)
|
|
280
280
|
),
|
|
281
|
-
row.summary &&
|
|
281
|
+
row.summary && React.createElement(
|
|
282
282
|
Card.Text,
|
|
283
283
|
null,
|
|
284
|
-
|
|
284
|
+
React.createElement(
|
|
285
285
|
'a',
|
|
286
286
|
{ href: _this2.page + '/' + get_1(row, 'url.current') },
|
|
287
287
|
clean_html_1(row.summary)
|
|
@@ -293,7 +293,7 @@ var DeckQueue = function (_React$Component) {
|
|
|
293
293
|
)
|
|
294
294
|
)
|
|
295
295
|
),
|
|
296
|
-
|
|
296
|
+
main_36 && _this2.props.rightItems && (index + 1) % numberOfItemsBeforeAd === 0 && _this2.renderMobileAd(index, numberOfItemsBeforeAd)
|
|
297
297
|
);
|
|
298
298
|
})
|
|
299
299
|
);
|
|
@@ -310,29 +310,29 @@ var DeckQueue = function (_React$Component) {
|
|
|
310
310
|
page = _props.page;
|
|
311
311
|
|
|
312
312
|
|
|
313
|
-
return
|
|
313
|
+
return React.createElement(
|
|
314
314
|
'div',
|
|
315
315
|
{ className: 'contentDeck' },
|
|
316
|
-
autoScroll ?
|
|
316
|
+
autoScroll ? React.createElement(
|
|
317
317
|
InfiniteScroll,
|
|
318
318
|
{ dataLength: this.state.data.length, next: this.loadMore, hasMore: this.state.scrolling },
|
|
319
|
-
|
|
319
|
+
React.createElement(
|
|
320
320
|
Container,
|
|
321
321
|
null,
|
|
322
322
|
this.cardLoader(page, columns, variant)
|
|
323
323
|
)
|
|
324
|
-
) :
|
|
325
|
-
|
|
324
|
+
) : React.createElement(
|
|
325
|
+
React.Fragment,
|
|
326
326
|
null,
|
|
327
|
-
|
|
327
|
+
React.createElement(
|
|
328
328
|
Container,
|
|
329
329
|
null,
|
|
330
330
|
this.cardLoader(page, columns, variant)
|
|
331
331
|
),
|
|
332
|
-
|
|
332
|
+
React.createElement(
|
|
333
333
|
'div',
|
|
334
334
|
{ style: { padding: '0px 10px' } },
|
|
335
|
-
this.state.scrolling ?
|
|
335
|
+
this.state.scrolling ? React.createElement(
|
|
336
336
|
'button',
|
|
337
337
|
{
|
|
338
338
|
style: { margin: 'auto', width: '100%' },
|
|
@@ -340,17 +340,17 @@ var DeckQueue = function (_React$Component) {
|
|
|
340
340
|
_this3.loadMore();
|
|
341
341
|
} },
|
|
342
342
|
'Load More'
|
|
343
|
-
) :
|
|
343
|
+
) : React.createElement(
|
|
344
344
|
'p',
|
|
345
345
|
{ style: { textAlign: 'center' } },
|
|
346
|
-
|
|
346
|
+
React.createElement(
|
|
347
347
|
'b',
|
|
348
348
|
null,
|
|
349
349
|
'End of data'
|
|
350
350
|
)
|
|
351
351
|
)
|
|
352
352
|
),
|
|
353
|
-
|
|
353
|
+
React.createElement(
|
|
354
354
|
'noscript',
|
|
355
355
|
null,
|
|
356
356
|
this.renderManualPagination()
|
|
@@ -361,7 +361,7 @@ var DeckQueue = function (_React$Component) {
|
|
|
361
361
|
}]);
|
|
362
362
|
|
|
363
363
|
return DeckQueue;
|
|
364
|
-
}(
|
|
364
|
+
}(React.Component);
|
|
365
365
|
|
|
366
366
|
var Queue = withRouter(DeckQueue);
|
|
367
367
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import './_commonjsHelpers-0c4b6f40.js';
|
|
2
2
|
import './_to-object-1b1f7766.js';
|
|
3
3
|
import './web.dom.iterable-e6bf2bf6.js';
|
|
4
|
-
import
|
|
5
|
-
import { d as debounce_1, a as lib_1, e as lib_2 } from './debounce-
|
|
4
|
+
import React, { useState } from 'react';
|
|
5
|
+
import { d as debounce_1, a as lib_1, e as lib_2 } from './debounce-42a7f724.js';
|
|
6
6
|
import PropTypes from 'prop-types';
|
|
7
7
|
import 'react-dom';
|
|
8
|
-
import { V as VisibilitySensor } from './visibility-sensor-
|
|
8
|
+
import { V as VisibilitySensor } from './visibility-sensor-87d6b78c.js';
|
|
9
9
|
import { _ as _slicedToArray } from './slicedToArray-04e02710.js';
|
|
10
10
|
|
|
11
11
|
var AD = function AD(_ref) {
|
|
@@ -37,20 +37,20 @@ var AD = function AD(_ref) {
|
|
|
37
37
|
}
|
|
38
38
|
}, 500);
|
|
39
39
|
|
|
40
|
-
return
|
|
41
|
-
|
|
40
|
+
return React.createElement(
|
|
41
|
+
React.Fragment,
|
|
42
42
|
null,
|
|
43
|
-
!showPlaceholder &&
|
|
43
|
+
!showPlaceholder && React.createElement(
|
|
44
44
|
lib_1,
|
|
45
45
|
{
|
|
46
46
|
dfpNetworkId: networkID,
|
|
47
47
|
targetingArguments: targeting,
|
|
48
48
|
sizeMapping: sizeMapping,
|
|
49
49
|
lazyLoad: { fetchMarginPercent: 500, renderMarginPercent: 200, mobileScaling: 2.0 } },
|
|
50
|
-
|
|
50
|
+
React.createElement(
|
|
51
51
|
'div',
|
|
52
52
|
{ className: className },
|
|
53
|
-
|
|
53
|
+
React.createElement(lib_2, {
|
|
54
54
|
slotId: slotId,
|
|
55
55
|
sizes: sizes,
|
|
56
56
|
adUnit: adUnit,
|
|
@@ -62,7 +62,7 @@ var AD = function AD(_ref) {
|
|
|
62
62
|
})
|
|
63
63
|
)
|
|
64
64
|
),
|
|
65
|
-
adRendered && showPlaceholder &&
|
|
65
|
+
adRendered && showPlaceholder && React.createElement(
|
|
66
66
|
VisibilitySensor,
|
|
67
67
|
{
|
|
68
68
|
partialVisibility: true,
|
|
@@ -71,7 +71,7 @@ var AD = function AD(_ref) {
|
|
|
71
71
|
setShowPlaceholder(false);
|
|
72
72
|
}
|
|
73
73
|
} },
|
|
74
|
-
|
|
74
|
+
React.createElement(
|
|
75
75
|
'div',
|
|
76
76
|
{ style: { height: 'auto' } },
|
|
77
77
|
'\xA0'
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import './_commonjsHelpers-0c4b6f40.js';
|
|
2
2
|
import './_to-object-1b1f7766.js';
|
|
3
3
|
import './web.dom.iterable-e6bf2bf6.js';
|
|
4
|
-
import
|
|
5
|
-
import { i as imageUrlBuilder } from './index-
|
|
4
|
+
import React, { useState } from 'react';
|
|
5
|
+
import { i as imageUrlBuilder } from './index-73819142.js';
|
|
6
6
|
import { _ as _slicedToArray } from './slicedToArray-04e02710.js';
|
|
7
7
|
import { Figure as Figure$1 } from 'react-bootstrap';
|
|
8
8
|
|
|
@@ -96,21 +96,21 @@ var FigureComponent = function FigureComponent(props) {
|
|
|
96
96
|
margin: figureMargin
|
|
97
97
|
};
|
|
98
98
|
|
|
99
|
-
return
|
|
100
|
-
|
|
99
|
+
return React.createElement(
|
|
100
|
+
React.Fragment,
|
|
101
101
|
null,
|
|
102
|
-
|
|
102
|
+
React.createElement(
|
|
103
103
|
Figure$1,
|
|
104
104
|
{ className: '' + class_name, style: figureStyle },
|
|
105
|
-
link ?
|
|
105
|
+
link ? React.createElement(
|
|
106
106
|
'a',
|
|
107
107
|
{ target: blank ? '_blank' : '_self', href: link },
|
|
108
|
-
|
|
109
|
-
caption &&
|
|
110
|
-
) :
|
|
111
|
-
|
|
108
|
+
React.createElement(Figure$1.Image, { style: { maxWidth: '100%' }, className: 'figure-image', src: urlFor(node, client).url(), alt: alt && alt }),
|
|
109
|
+
caption && React.createElement('div', { dangerouslySetInnerHTML: { __html: '<span class=\'figure-caption\'>' + caption + '</span>' } })
|
|
110
|
+
) : React.createElement(
|
|
111
|
+
React.Fragment,
|
|
112
112
|
null,
|
|
113
|
-
|
|
113
|
+
React.createElement(Figure$1.Image, {
|
|
114
114
|
style: { maxWidth: '100%', cursor: 'pointer', width: 'auto' },
|
|
115
115
|
className: 'figure-image',
|
|
116
116
|
src: urlFor(node, client).url(),
|
|
@@ -120,14 +120,14 @@ var FigureComponent = function FigureComponent(props) {
|
|
|
120
120
|
setOpenImg(true);
|
|
121
121
|
}
|
|
122
122
|
}),
|
|
123
|
-
caption &&
|
|
123
|
+
caption && React.createElement('div', { dangerouslySetInnerHTML: { __html: '<span class=\'figure-caption\'>' + caption + '</span>' } })
|
|
124
124
|
)
|
|
125
125
|
),
|
|
126
|
-
|
|
126
|
+
React.createElement(
|
|
127
127
|
'div',
|
|
128
128
|
{ className: 'lightbox-target ' + (openImg ? 'open' : 'close') },
|
|
129
|
-
|
|
130
|
-
|
|
129
|
+
React.createElement('img', { src: openImgSrc }),
|
|
130
|
+
React.createElement('a', {
|
|
131
131
|
className: 'lightbox-close',
|
|
132
132
|
onClick: function onClick() {
|
|
133
133
|
setOpenImgSrc('');
|
|
@@ -135,7 +135,7 @@ var FigureComponent = function FigureComponent(props) {
|
|
|
135
135
|
}
|
|
136
136
|
})
|
|
137
137
|
),
|
|
138
|
-
|
|
138
|
+
React.createElement(
|
|
139
139
|
'style',
|
|
140
140
|
{ jsx: 'true' },
|
|
141
141
|
'\n figure-caption {\n font-size: 90%;\n color: #6c757d;\n }\n /*Eliminates padding, centers the thumbnail */\n\n /* Styles the lightbox, removes it from sight and adds the fade-in transition */\n\n .lightbox-target {\n position: fixed;\n top: -100%;\n width: 100%;\n background: rgba(0, 0, 0, 0.7);\n width: 100%;\n opacity: 0;\n -webkit-transition: opacity 0.5s ease-in-out;\n -moz-transition: opacity 0.5s ease-in-out;\n -o-transition: opacity 0.5s ease-in-out;\n transition: opacity 0.5s ease-in-out;\n overflow: hidden;\n }\n\n .lightbox-target.close {\n opacity: 0;\n }\n\n /* Styles the lightbox image, centers it vertically and horizontally, adds the zoom-in transition and makes it responsive using a combination of margin and absolute positioning */\n\n .lightbox-target img {\n margin: auto;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n max-height: 0%;\n max-width: 0%;\n border: 3px solid white;\n box-shadow: 0px 0px 8px rgba(0, 0, 0, 0.3);\n box-sizing: border-box;\n -webkit-transition: 0.5s ease-in-out;\n -moz-transition: 0.5s ease-in-out;\n -o-transition: 0.5s ease-in-out;\n transition: 0.5s ease-in-out;\n }\n\n /* Styles the close link, adds the slide down transition */\n\n a.lightbox-close {\n display: block;\n width: 50px;\n height: 50px;\n box-sizing: border-box;\n background: white;\n color: black;\n text-decoration: none;\n position: absolute;\n top: -80px;\n right: 0;\n -webkit-transition: 0.5s ease-in-out;\n -moz-transition: 0.5s ease-in-out;\n -o-transition: 0.5s ease-in-out;\n transition: 0.5s ease-in-out;\n }\n\n /* Provides part of the "X" to eliminate an image from the close link */\n\n a.lightbox-close:before {\n content: \'\';\n display: block;\n height: 30px;\n width: 1px;\n background: black;\n position: absolute;\n left: 26px;\n top: 10px;\n -webkit-transform: rotate(45deg);\n -moz-transform: rotate(45deg);\n -o-transform: rotate(45deg);\n transform: rotate(45deg);\n }\n\n /* Provides part of the "X" to eliminate an image from the close link */\n\n a.lightbox-close:after {\n content: \'\';\n display: block;\n height: 30px;\n width: 1px;\n background: black;\n position: absolute;\n left: 26px;\n top: 10px;\n -webkit-transform: rotate(-45deg);\n -moz-transform: rotate(-45deg);\n -o-transform: rotate(-45deg);\n transform: rotate(-45deg);\n }\n\n /* Uses the :target pseudo-class to perform the animations upon clicking the .lightbox-target anchor */\n\n .lightbox-target.open {\n opacity: 1;\n top: 0;\n bottom: 0;\n right: 0;\n z-index: 99999;\n }\n\n .lightbox-target.open img {\n max-height: 100%;\n max-width: 100%;\n }\n\n .lightbox-target.open a.lightbox-close {\n top: 0px;\n }\n '
|
|
@@ -143,6 +143,6 @@ var FigureComponent = function FigureComponent(props) {
|
|
|
143
143
|
);
|
|
144
144
|
};
|
|
145
145
|
|
|
146
|
-
var Figure =
|
|
146
|
+
var Figure = React.memo(FigureComponent, compareProps);
|
|
147
147
|
|
|
148
148
|
export default Figure;
|