@mjhls/mjh-framework 1.0.439 → 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-068c0b1c.js → GridContent-db383f73.js} +162 -158
- 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-90c0f8b5.js → GridContent-6b38c580.js} +112 -112
- 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/YoutubeGroup.js
CHANGED
|
@@ -3,19 +3,19 @@ import './_to-object-1b1f7766.js';
|
|
|
3
3
|
import './web.dom.iterable-e6bf2bf6.js';
|
|
4
4
|
import './_library-528f1934.js';
|
|
5
5
|
import './_object-pie-33c40e79.js';
|
|
6
|
-
import { b as _typeof } from './typeof-
|
|
7
|
-
import
|
|
6
|
+
import { b as _typeof } from './typeof-09bf9211.js';
|
|
7
|
+
import React, { useRef, useState, useEffect } from 'react';
|
|
8
8
|
import 'prop-types';
|
|
9
9
|
import 'react-dom';
|
|
10
|
-
import { i as imageUrlBuilder } from './index-
|
|
11
|
-
import { L as LazyLoad } from './index-
|
|
10
|
+
import { i as imageUrlBuilder } from './index-73819142.js';
|
|
11
|
+
import { L as LazyLoad } from './index-c5fd0af5.js';
|
|
12
12
|
import { _ as _slicedToArray } from './slicedToArray-04e02710.js';
|
|
13
13
|
import { s as smoothscroll, g as getYoutubeId } from './smoothscroll-4b699764.js';
|
|
14
14
|
|
|
15
|
-
/*
|
|
16
|
-
GROQ query -
|
|
17
|
-
accepts an array of title, URL
|
|
18
|
-
`https://img.youtube.com/vi/${getYouTubeId(vid.url)}/hqdefault.jpg`
|
|
15
|
+
/*
|
|
16
|
+
GROQ query -
|
|
17
|
+
accepts an array of title, URL
|
|
18
|
+
`https://img.youtube.com/vi/${getYouTubeId(vid.url)}/hqdefault.jpg`
|
|
19
19
|
*/
|
|
20
20
|
|
|
21
21
|
var YoutubeGroup = function YoutubeGroup(props) {
|
|
@@ -142,27 +142,27 @@ var YoutubeGroup = function YoutubeGroup(props) {
|
|
|
142
142
|
current = _props$current === undefined ? '' : _props$current;
|
|
143
143
|
|
|
144
144
|
|
|
145
|
-
return
|
|
145
|
+
return React.createElement(
|
|
146
146
|
'div',
|
|
147
147
|
{ ref: viewableWindow, id: 'vid-slider', className: 'col' },
|
|
148
|
-
|
|
148
|
+
React.createElement(
|
|
149
149
|
'div',
|
|
150
150
|
{ className: 'row' },
|
|
151
|
-
showScroller && showScroller &&
|
|
151
|
+
showScroller && showScroller && React.createElement(
|
|
152
152
|
'div',
|
|
153
153
|
{ onClick: function onClick(e) {
|
|
154
154
|
return scrollSlider(e, 'prev');
|
|
155
155
|
}, className: 'tile__slider-prev', style: { color: '#fff', background: 'var(--primary)', width: '35px', height: '35px', borderRadius: '50%', paddingLeft: '19px' } },
|
|
156
|
-
|
|
156
|
+
React.createElement('i', { style: { border: 'solid #fff', borderWidth: '0 4px 4px 0' }, className: 'arrow left' })
|
|
157
157
|
),
|
|
158
|
-
showScroller && showScroller &&
|
|
158
|
+
showScroller && showScroller && React.createElement(
|
|
159
159
|
'div',
|
|
160
160
|
{ onClick: function onClick(e) {
|
|
161
161
|
return scrollSlider(e, 'next');
|
|
162
162
|
}, className: 'tile__slider-next', style: { color: '#fff', background: 'var(--primary)', width: '35px', height: '35px', borderRadius: '50%', paddingRight: '19px' } },
|
|
163
|
-
|
|
163
|
+
React.createElement('i', { style: { border: 'solid #fff', borderWidth: '0 4px 4px 0' }, className: 'arrow right' })
|
|
164
164
|
),
|
|
165
|
-
|
|
165
|
+
React.createElement(
|
|
166
166
|
'div',
|
|
167
167
|
{ ref: innerSlider, className: 'row__inner' },
|
|
168
168
|
props.dataset && props.dataset.map(function (video, index) {
|
|
@@ -178,42 +178,42 @@ var YoutubeGroup = function YoutubeGroup(props) {
|
|
|
178
178
|
thumbnail = 'https://img.youtube.com/vi/' + getYoutubeId(video.url) + '/hqdefault.jpg';
|
|
179
179
|
}
|
|
180
180
|
|
|
181
|
-
return
|
|
181
|
+
return React.createElement(
|
|
182
182
|
'div',
|
|
183
183
|
{ ref: tile, key: index, className: 'tile', style: { width: tileSize + 'px' } },
|
|
184
|
-
current && current === url ?
|
|
184
|
+
current && current === url ? React.createElement(
|
|
185
185
|
'div',
|
|
186
186
|
{ className: 'now-playing' },
|
|
187
187
|
'Now Playing'
|
|
188
188
|
) : '',
|
|
189
|
-
|
|
189
|
+
React.createElement(
|
|
190
190
|
'a',
|
|
191
191
|
{ onClick: function onClick() {
|
|
192
192
|
return handleClick(url, index + 1);
|
|
193
193
|
} },
|
|
194
|
-
|
|
194
|
+
React.createElement(
|
|
195
195
|
'div',
|
|
196
196
|
{ className: 'tile__media' },
|
|
197
|
-
|
|
197
|
+
React.createElement(
|
|
198
198
|
LazyLoad,
|
|
199
199
|
null,
|
|
200
|
-
|
|
200
|
+
React.createElement('img', { className: 'tile__img', src: thumbnail, style: { width: tileSize + 'px' }, alt: '' })
|
|
201
201
|
)
|
|
202
202
|
),
|
|
203
|
-
|
|
203
|
+
React.createElement(
|
|
204
204
|
'div',
|
|
205
205
|
{ className: 'tile__details' },
|
|
206
|
-
|
|
206
|
+
React.createElement(
|
|
207
207
|
'div',
|
|
208
208
|
{ className: 'tile__title' },
|
|
209
|
-
|
|
209
|
+
React.createElement(
|
|
210
210
|
'div',
|
|
211
211
|
{ style: { color: variant }, className: 'tile__title_text' },
|
|
212
212
|
video.title
|
|
213
213
|
)
|
|
214
214
|
)
|
|
215
215
|
),
|
|
216
|
-
|
|
216
|
+
React.createElement(
|
|
217
217
|
'div',
|
|
218
218
|
{ style: { color: '#fff' }, className: 'tile__info' },
|
|
219
219
|
video.title
|
|
@@ -229,41 +229,41 @@ var YoutubeGroup = function YoutubeGroup(props) {
|
|
|
229
229
|
} else {
|
|
230
230
|
_thumbnail = 'https://img.youtube.com/vi/' + getYoutubeId(video.url) + '/hqdefault.jpg';
|
|
231
231
|
}
|
|
232
|
-
return
|
|
232
|
+
return React.createElement(
|
|
233
233
|
'div',
|
|
234
234
|
{ ref: tile, key: index, className: 'tile', style: { width: tileSize + 'px' } },
|
|
235
|
-
|
|
235
|
+
React.createElement(
|
|
236
236
|
'a',
|
|
237
237
|
{ href: _url },
|
|
238
|
-
|
|
238
|
+
React.createElement(
|
|
239
239
|
'div',
|
|
240
240
|
{ className: 'tile__media' },
|
|
241
|
-
|
|
241
|
+
React.createElement(
|
|
242
242
|
LazyLoad,
|
|
243
243
|
null,
|
|
244
|
-
|
|
244
|
+
React.createElement('img', { className: 'tile__img', src: _thumbnail, alt: '', style: { width: tileSize + 'px' } })
|
|
245
245
|
)
|
|
246
246
|
),
|
|
247
|
-
|
|
247
|
+
React.createElement(
|
|
248
248
|
'div',
|
|
249
249
|
{ className: 'tile__details' },
|
|
250
|
-
|
|
250
|
+
React.createElement(
|
|
251
251
|
'div',
|
|
252
252
|
{ className: 'tile__title' },
|
|
253
|
-
|
|
253
|
+
React.createElement(
|
|
254
254
|
'div',
|
|
255
255
|
{ style: { color: '#fff' }, className: 'tile__title_text' },
|
|
256
256
|
video.title
|
|
257
257
|
)
|
|
258
258
|
)
|
|
259
259
|
),
|
|
260
|
-
|
|
260
|
+
React.createElement(
|
|
261
261
|
'div',
|
|
262
262
|
{ style: { color: variant }, className: 'tile__info' },
|
|
263
|
-
props.displayEpisodeNumber ?
|
|
263
|
+
props.displayEpisodeNumber ? React.createElement(
|
|
264
264
|
'span',
|
|
265
265
|
null,
|
|
266
|
-
|
|
266
|
+
React.createElement(
|
|
267
267
|
'span',
|
|
268
268
|
{ style: { fontWeight: 'bold' } },
|
|
269
269
|
'Ep. ',
|
|
@@ -280,7 +280,7 @@ var YoutubeGroup = function YoutubeGroup(props) {
|
|
|
280
280
|
})
|
|
281
281
|
)
|
|
282
282
|
),
|
|
283
|
-
|
|
283
|
+
React.createElement(
|
|
284
284
|
'style',
|
|
285
285
|
{ jsx: 'true' },
|
|
286
286
|
'\n #vid-slider * {\n box-sizing: border-box;\n -ms-overflow-style: none;\n }\n #vid-slider::-webkit-scrollbar-thumb {\n display: none;\n }\n #vid-slider::-webkit-scrollbar {\n display: none;\n }\n #vid-slider .row::-webkit-scrollbar {\n display: none;\n }\n #vid-slider .row::-webkit-scrollbar-thumb {\n display: none;\n }\n #vid-slider {\n position: relative;\n -ms-overflow-style: none;\n padding: 0 1.5rem;\n margin-bottom: 2rem;\n }\n #vid-slider .now-playing {\n position: absolute;\n top: 0.5rem;\n left: 1rem;\n color: white;\n background: rgba(0, 0, 0, 0.75);\n }\n #vid-slider h1,\n #vid-slider p {\n text-align: center;\n width: 100%;\n max-width: 500px;\n margin: auto;\n }\n #vid-slider,\n #vidHolder {\n max-width: 805px;\n }\n #vid-slider a:link,\n #vid-slider a:hover,\n #vid-slider a:active,\n #vid-slider a:visited {\n transition: color 150ms;\n color: #95a5a6;\n text-decoration: none;\n }\n #vid-slider a:hover {\n color: #7f8c8d;\n text-decoration: underline;\n }\n #vid-slider .contain {\n width: 100%;\n }\n #vid-slider .row {\n overflow-x: hidden;\n width: 100%;\n -ms-overflow-style: none;\n overflow-y: hidden !important;\n }\n #vid-slider .tile__info {\n white-space: normal !important;\n position: absolute;\n text-align: center;\n color: ' + (props.dark ? 'white' : '#383838') + ';\n opacity: 1;\n font-size: 0.9rem;\n font-weight: bold;\n transition: opacity 0.25s;\n }\n #vid-slider .row__inner {\n transition: 450ms -webkit-transform;\n transition: 450ms transform;\n transition: 450ms transform, 450ms -webkit-transform;\n font-size: 0;\n white-space: nowrap;\n margin: 25px 0 55px -.25rem !important;\n padding-bottom: 10px;\n padding-left: 0;\n }\n #vid-slider .tile {\n position: relative;\n display: inline-block;\n height: 100%;\n\n margin: 0 12.5px;\n font-size: 20px;\n cursor: pointer;\n transition: 450ms all;\n -webkit-transform-origin: center left;\n transform-origin: center left;\n }\n #vid-slider .tile:first-child {\n margin-left: 15px;\n }\n #vid-slider .tile__img {\n height: 135px;\n\n -o-object-fit: cover;\n object-fit: cover;\n object-position: center;\n }\n #vid-slider .tile__details {\n position: absolute;\n bottom: 0;\n left: 0;\n right: 0;\n top: 0;\n font-size: 10px;\n opacity: 0;\n background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0) 100%);\n transition: 450ms opacity;\n }\n #vid-slider .tile__details:after,\n #vid-slider .tile__details:before {\n content: \'\';\n\n position: absolute;\n top: 50%;\n left: 50%;\n display: #000;\n }\n #vid-slider .tile__details:after {\n margin-top: -25px;\n margin-left: -25px;\n width: 50px;\n height: 50px;\n border: 3px solid #ecf0f1;\n line-height: 50px;\n text-align: center;\n border-radius: 100%;\n background: rgba(0, 0, 0, 0.5);\n z-index: 1;\n }\n #vid-slider .tile__details:before {\n content: \'\';\n background: url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox=\'0 0 64 64\' width=\'64\' height=\'64\' fill=\'white\'><path d=\'M26 46 L46 32 L26 18 Z\'/></svg>")\n no-repeat center center;\n left: 0;\n width: 100%;\n height: 3rem;\n font-size: 30px;\n margin-right: 12px;\n margin-top: -24px;\n text-align: center;\n z-index: 2;\n color: white;\n }\n\n #vid-slider .tile__title {\n position: absolute;\n bottom: 0;\n padding: 10px;\n max-width: 250px;\n }\n #vid-slider .tile__title_text {\n position: relative;\n left: 0;\n white-space: normal;\n }\n\n #vid-slider .tile__slider-prev,\n #vid-slider .tile__slider-next {\n width: 30px;\n background: transparent;\n border: none;\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n z-index: 99;\n cursor: pointer;\n color: ' + (props.dark ? 'white' : 'black') + ';\n display: flex;\n justify-content: center;\n align-items: center;\n font-size: 2rem;\n }\n #vid-slider .tile__slider-prev {\n left: -0.5rem;\n padding: 1rem;\n }\n #vid-slider .tile__slider-next {\n right: -.5rem;\n padding: 1rem;\n }\n #vid-slider,\n #vid-slider .row {\n margin: 0;\n padding-right: 0 1.2rem;\n }\n\n #vid-slider .row::-webkit-scrollbar-thumb {\n background-color: transparent !important;\n }\n #vid-slider i {\n border: solid ' + (props.dark ? 'white' : 'black') + ';\n border-width: 0 4px 4px 0;\n display: inline-block;\n padding: 4px;\n pointer-events: none;\n }\n #vid-slider .right {\n transform: rotate(-45deg);\n -webkit-transform: rotate(-45deg);\n }\n #vid-slider .left {\n transform: rotate(135deg);\n -webkit-transform: rotate(135deg);\n }\n @media screen and (max-width: 1399px) {\n #vid-slider,\n #vidHolder {\n max-width: 620px;\n }\n #vid-slider .tile__img {\n height: 145px;\n }\n }\n @media screen and (max-width: 1200px) {\n #vid-slider,\n #vidHolder {\n max-width: 580px;\n }\n }\n @media screen and (max-width: 967px) {\n #vid-slider {\n max-width: 100%;\n }\n #vid-slider .tile__img {\n height: 175px;\n }\n }\n\n @media screen and (max-width: 768px) {\n #vidHolder {\n position: unset;\n width: 100%;\n }\n\n #vid-slider .tile__img {\n height: 118px;\n }\n #vid-slider .row__inner {\n margin: 30px 0 60px ;\n }\n }\n\n @media screen and (max-width: 590px) {\n #vid-slider .tile__img {\n height: 195px;\n }\n }\n '
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { c as createCommonjsModule, u as unwrapExports, a as commonjsGlobal } from './_commonjsHelpers-0c4b6f40.js';
|
|
2
|
-
import
|
|
2
|
+
import React from 'react';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
|
|
5
5
|
var domain;
|
|
@@ -821,13 +821,15 @@ var DFPManager = Object.assign(new EventEmitter.EventEmitter().setMaxListeners(0
|
|
|
821
821
|
});
|
|
822
822
|
|
|
823
823
|
if (_this5.lazyLoadIsEnabled()) {
|
|
824
|
+
var args = [];
|
|
825
|
+
|
|
824
826
|
var config = _this5.getLazyLoadConfig();
|
|
825
827
|
|
|
826
|
-
if (config) {
|
|
827
|
-
|
|
828
|
-
} else {
|
|
829
|
-
pubadsService.enableLazyLoad();
|
|
828
|
+
if (config !== null) {
|
|
829
|
+
args.push(config);
|
|
830
830
|
}
|
|
831
|
+
|
|
832
|
+
pubadsService.enableLazyLoad.call(args);
|
|
831
833
|
}
|
|
832
834
|
|
|
833
835
|
if (_this5.singleRequestIsEnabled()) {
|
|
@@ -1027,7 +1029,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
1027
1029
|
});
|
|
1028
1030
|
exports.default = exports.Context = void 0;
|
|
1029
1031
|
|
|
1030
|
-
var _react = _interopRequireDefault(
|
|
1032
|
+
var _react = _interopRequireDefault(React);
|
|
1031
1033
|
|
|
1032
1034
|
var _propTypes = _interopRequireDefault(PropTypes);
|
|
1033
1035
|
|
|
@@ -1335,7 +1337,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
1335
1337
|
});
|
|
1336
1338
|
exports.default = exports.AdSlot = void 0;
|
|
1337
1339
|
|
|
1338
|
-
var _react = _interopRequireDefault(
|
|
1340
|
+
var _react = _interopRequireDefault(React);
|
|
1339
1341
|
|
|
1340
1342
|
var _propTypes = _interopRequireDefault(PropTypes);
|
|
1341
1343
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { f as isSymbol_1, g as isObject_1, _ as _baseGetTag, b as _root, h as _Symbol } from './debounce-
|
|
1
|
+
import { f as isSymbol_1, g as isObject_1, _ as _baseGetTag, b as _root, h as _Symbol } from './debounce-42a7f724.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Checks if `value` is classified as an `Array` object.
|
|
@@ -58,35 +58,35 @@ function parseSource(source) {
|
|
|
58
58
|
if (typeof source === 'string' && isUrl(source)) {
|
|
59
59
|
// Someone passed an existing image url?
|
|
60
60
|
image = {
|
|
61
|
-
asset: { _ref: urlToId(source) }
|
|
61
|
+
asset: { _ref: urlToId(source) }
|
|
62
62
|
};
|
|
63
63
|
}
|
|
64
64
|
else if (typeof source === 'string') {
|
|
65
65
|
// Just an asset id
|
|
66
66
|
image = {
|
|
67
|
-
asset: { _ref: source }
|
|
67
|
+
asset: { _ref: source }
|
|
68
68
|
};
|
|
69
69
|
}
|
|
70
70
|
else if (isRef(source)) {
|
|
71
71
|
// We just got passed an asset directly
|
|
72
72
|
image = {
|
|
73
|
-
asset: source
|
|
73
|
+
asset: source
|
|
74
74
|
};
|
|
75
75
|
}
|
|
76
76
|
else if (isAsset(source)) {
|
|
77
77
|
// If we were passed an image asset document
|
|
78
78
|
image = {
|
|
79
79
|
asset: {
|
|
80
|
-
_ref: source._id || ''
|
|
81
|
-
}
|
|
80
|
+
_ref: source._id || ''
|
|
81
|
+
}
|
|
82
82
|
};
|
|
83
83
|
}
|
|
84
84
|
else if (isAssetStub(source)) {
|
|
85
85
|
// If we were passed a partial asset (`url`, but no `_id`)
|
|
86
86
|
image = {
|
|
87
87
|
asset: {
|
|
88
|
-
_ref: urlToId(source.asset.url)
|
|
89
|
-
}
|
|
88
|
+
_ref: urlToId(source.asset.url)
|
|
89
|
+
}
|
|
90
90
|
};
|
|
91
91
|
}
|
|
92
92
|
else if (typeof source.asset === 'object') {
|
|
@@ -127,7 +127,7 @@ function applyDefaults(image) {
|
|
|
127
127
|
left: 0,
|
|
128
128
|
top: 0,
|
|
129
129
|
bottom: 0,
|
|
130
|
-
right: 0
|
|
130
|
+
right: 0
|
|
131
131
|
};
|
|
132
132
|
}
|
|
133
133
|
if (!result.hotspot) {
|
|
@@ -135,7 +135,7 @@ function applyDefaults(image) {
|
|
|
135
135
|
x: 0.5,
|
|
136
136
|
y: 0.5,
|
|
137
137
|
height: 1.0,
|
|
138
|
-
width: 1.0
|
|
138
|
+
width: 1.0
|
|
139
139
|
};
|
|
140
140
|
}
|
|
141
141
|
return result;
|
|
@@ -182,7 +182,7 @@ exports.SPEC_NAME_TO_URL_NAME_MAPPINGS = [
|
|
|
182
182
|
['crop', 'crop'],
|
|
183
183
|
['saturation', 'sat'],
|
|
184
184
|
['auto', 'auto'],
|
|
185
|
-
['dpr', 'dpr']
|
|
185
|
+
['dpr', 'dpr']
|
|
186
186
|
];
|
|
187
187
|
function urlForImage(options) {
|
|
188
188
|
var spec = __assign({}, (options || {}));
|
|
@@ -201,7 +201,7 @@ function urlForImage(options) {
|
|
|
201
201
|
left: cropLeft,
|
|
202
202
|
top: cropTop,
|
|
203
203
|
width: Math.round(asset.width - image.crop.right * asset.width - cropLeft),
|
|
204
|
-
height: Math.round(asset.height - image.crop.bottom * asset.height - cropTop)
|
|
204
|
+
height: Math.round(asset.height - image.crop.bottom * asset.height - cropTop)
|
|
205
205
|
};
|
|
206
206
|
// Compute hot spot rect in terms of pixel coordinates
|
|
207
207
|
var hotSpotVerticalRadius = (image.hotspot.height * asset.height) / 2;
|
|
@@ -212,7 +212,7 @@ function urlForImage(options) {
|
|
|
212
212
|
left: hotSpotCenterX - hotSpotHorizontalRadius,
|
|
213
213
|
top: hotSpotCenterY - hotSpotVerticalRadius,
|
|
214
214
|
right: hotSpotCenterX + hotSpotHorizontalRadius,
|
|
215
|
-
bottom: hotSpotCenterY + hotSpotVerticalRadius
|
|
215
|
+
bottom: hotSpotCenterY + hotSpotVerticalRadius
|
|
216
216
|
};
|
|
217
217
|
// If irrelevant, or if we are requested to: don't perform crop/fit based on
|
|
218
218
|
// the crop/hotspot.
|
|
@@ -294,7 +294,7 @@ function fit(source, spec) {
|
|
|
294
294
|
left: Math.round(left),
|
|
295
295
|
top: Math.round(top_2),
|
|
296
296
|
width: Math.round(width),
|
|
297
|
-
height: Math.round(height)
|
|
297
|
+
height: Math.round(height)
|
|
298
298
|
};
|
|
299
299
|
}
|
|
300
300
|
else {
|
|
@@ -316,13 +316,13 @@ function fit(source, spec) {
|
|
|
316
316
|
left: Math.max(0, Math.floor(left)),
|
|
317
317
|
top: Math.max(0, Math.floor(top_3)),
|
|
318
318
|
width: Math.round(width),
|
|
319
|
-
height: Math.round(height)
|
|
319
|
+
height: Math.round(height)
|
|
320
320
|
};
|
|
321
321
|
}
|
|
322
322
|
return {
|
|
323
323
|
width: imgWidth,
|
|
324
324
|
height: imgHeight,
|
|
325
|
-
rect: cropRect
|
|
325
|
+
rect: cropRect
|
|
326
326
|
};
|
|
327
327
|
}
|
|
328
328
|
|
|
@@ -375,12 +375,11 @@ function urlBuilder(options) {
|
|
|
375
375
|
var client = options;
|
|
376
376
|
if (isSanityClient(client)) {
|
|
377
377
|
// Inherit config from client
|
|
378
|
-
var _a = client.clientConfig,
|
|
379
|
-
var apiHost = apiUrl || 'https://api.sanity.io';
|
|
378
|
+
var _a = client.clientConfig, apiHost = _a.apiHost, projectId = _a.projectId, dataset = _a.dataset;
|
|
380
379
|
return new ImageUrlBuilder(null, {
|
|
381
380
|
baseUrl: apiHost.replace(/^https:\/\/api\./, 'https://cdn.'),
|
|
382
381
|
projectId: projectId,
|
|
383
|
-
dataset: dataset
|
|
382
|
+
dataset: dataset
|
|
384
383
|
});
|
|
385
384
|
}
|
|
386
385
|
// Or just accept the options as given
|
|
@@ -393,7 +392,7 @@ var ImageUrlBuilder = /** @class */ (function () {
|
|
|
393
392
|
? __assign(__assign({}, (parent.options || {})), (options || {})) : __assign({}, (options || {})); // Copy options
|
|
394
393
|
}
|
|
395
394
|
ImageUrlBuilder.prototype.withOptions = function (options) {
|
|
396
|
-
var baseUrl = options.baseUrl ||
|
|
395
|
+
var baseUrl = options.baseUrl || '';
|
|
397
396
|
var newOptions = { baseUrl: baseUrl };
|
|
398
397
|
for (var key in options) {
|
|
399
398
|
if (options.hasOwnProperty(key)) {
|
|
@@ -521,7 +520,7 @@ var ImageUrlBuilder = /** @class */ (function () {
|
|
|
521
520
|
ImageUrlBuilder.prototype.url = function () {
|
|
522
521
|
return urlForImage_1$1.default(this.options);
|
|
523
522
|
};
|
|
524
|
-
//
|
|
523
|
+
// Synonym for url()
|
|
525
524
|
ImageUrlBuilder.prototype.toString = function () {
|
|
526
525
|
return this.url();
|
|
527
526
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { c as createCommonjsModule, u as unwrapExports } from './_commonjsHelpers-0c4b6f40.js';
|
|
2
|
-
import
|
|
2
|
+
import React from 'react';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import reactDom from 'react-dom';
|
|
5
5
|
|
|
@@ -179,7 +179,7 @@ var _createClass = function () { function defineProperties(target, props) { for
|
|
|
179
179
|
|
|
180
180
|
|
|
181
181
|
|
|
182
|
-
var _react2 = _interopRequireDefault(
|
|
182
|
+
var _react2 = _interopRequireDefault(React);
|
|
183
183
|
|
|
184
184
|
|
|
185
185
|
|
|
@@ -530,7 +530,7 @@ var LazyLoad = function (_Component) {
|
|
|
530
530
|
}]);
|
|
531
531
|
|
|
532
532
|
return LazyLoad;
|
|
533
|
-
}(
|
|
533
|
+
}(React.Component);
|
|
534
534
|
|
|
535
535
|
LazyLoad.propTypes = {
|
|
536
536
|
once: _propTypes2.default.bool,
|
|
@@ -587,7 +587,7 @@ var decorator = function decorator() {
|
|
|
587
587
|
}]);
|
|
588
588
|
|
|
589
589
|
return LazyLoadDecorated;
|
|
590
|
-
}(
|
|
590
|
+
}(React.Component);
|
|
591
591
|
};
|
|
592
592
|
};
|
|
593
593
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React, { Component } from 'react';
|
|
2
2
|
|
|
3
3
|
/*! *****************************************************************************
|
|
4
4
|
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -263,9 +263,6 @@ var InfiniteScroll = /** @class */ (function (_super) {
|
|
|
263
263
|
_this.dragging = false;
|
|
264
264
|
if (_this.state.pullToRefreshThresholdBreached) {
|
|
265
265
|
_this.props.refreshFunction && _this.props.refreshFunction();
|
|
266
|
-
_this.setState({
|
|
267
|
-
pullToRefreshThresholdBreached: false,
|
|
268
|
-
});
|
|
269
266
|
}
|
|
270
267
|
requestAnimationFrame(function () {
|
|
271
268
|
// this._infScroll
|
|
@@ -372,6 +369,7 @@ var InfiniteScroll = /** @class */ (function (_super) {
|
|
|
372
369
|
// update state when new data was sent in
|
|
373
370
|
this.setState({
|
|
374
371
|
showLoader: false,
|
|
372
|
+
pullToRefreshThresholdBreached: false,
|
|
375
373
|
});
|
|
376
374
|
};
|
|
377
375
|
InfiniteScroll.prototype.isElementAtBottom = function (target, scrollThreshold) {
|
|
@@ -398,10 +396,10 @@ var InfiniteScroll = /** @class */ (function (_super) {
|
|
|
398
396
|
var outerDivStyle = this.props.pullDownToRefresh && this.props.height
|
|
399
397
|
? { overflow: 'auto' }
|
|
400
398
|
: {};
|
|
401
|
-
return (
|
|
402
|
-
|
|
403
|
-
this.props.pullDownToRefresh && (
|
|
404
|
-
|
|
399
|
+
return (React.createElement("div", { style: outerDivStyle, className: "infinite-scroll-component__outerdiv" },
|
|
400
|
+
React.createElement("div", { className: "infinite-scroll-component " + (this.props.className || ''), ref: function (infScroll) { return (_this._infScroll = infScroll); }, style: style },
|
|
401
|
+
this.props.pullDownToRefresh && (React.createElement("div", { style: { position: 'relative' }, ref: function (pullDown) { return (_this._pullDown = pullDown); } },
|
|
402
|
+
React.createElement("div", { style: {
|
|
405
403
|
position: 'absolute',
|
|
406
404
|
left: 0,
|
|
407
405
|
right: 0,
|