@mjhls/mjh-framework 1.0.456 → 1.0.457
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/AD300x250.js +1 -1
- package/dist/cjs/AD300x250x600.js +1 -1
- package/dist/cjs/AD728x90.js +1 -1
- package/dist/cjs/ADFloatingFooter.js +1 -1
- package/dist/cjs/ADGutter.js +1 -1
- package/dist/cjs/ADSponsoredResources.js +1 -1
- package/dist/cjs/ADWebcast.js +1 -1
- package/dist/cjs/ADWelcome.js +1 -1
- package/dist/cjs/AdSlot.js +1 -1
- package/dist/cjs/ArticleQueue.js +31 -30
- package/dist/cjs/Auth.js +6 -6
- package/dist/cjs/{BlockContent-77f81ffc.js → BlockContent-f942392e.js} +1 -1
- package/dist/cjs/CMEDeck.js +2 -2
- package/dist/cjs/Column3.js +1 -1
- package/dist/cjs/ConferenceArticleCard.js +2 -2
- package/dist/cjs/DeckContent.js +5 -5
- package/dist/cjs/DeckQueue.js +4 -4
- package/dist/cjs/EventsDeck.js +2 -2
- package/dist/cjs/Feature.js +2 -2
- package/dist/cjs/{Figure-eeac313a.js → Figure-05b73e6a.js} +1 -1
- package/dist/cjs/ForbesHero.js +2 -2
- package/dist/cjs/GridContent.js +6 -6
- package/dist/cjs/GridHero.js +2 -2
- package/dist/cjs/GroupDeck.js +1 -1
- package/dist/cjs/HamMagazine.js +1 -1
- package/dist/cjs/Hero.js +1 -1
- package/dist/cjs/HorizontalHero.js +2 -2
- package/dist/cjs/{InscreenSensor-bcdec6b0.js → InscreenSensor-f9989c04.js} +1 -1
- package/dist/cjs/IssueContentDeck.js +2 -2
- package/dist/cjs/IssueDeck.js +1 -1
- package/dist/cjs/IssueLanding.js +5 -5
- package/dist/cjs/LeftNav.js +1 -1
- package/dist/cjs/MasterDeck.js +4 -4
- package/dist/cjs/NavMagazine.js +1 -1
- package/dist/cjs/NavNative.js +1 -1
- package/dist/cjs/OncliveHero.js +2 -2
- package/dist/cjs/OncliveLargeHero.js +2 -2
- package/dist/cjs/PublicationDeck.js +1 -1
- package/dist/cjs/QueueDeckExpanded.js +5 -5
- package/dist/cjs/RelatedContent.js +2 -2
- package/dist/cjs/TaxonomyCard.js +2 -2
- package/dist/cjs/TemplateNormal.js +1 -1
- package/dist/cjs/ThumbnailCard.js +1 -1
- package/dist/cjs/VerticalHero.js +2 -2
- package/dist/cjs/VideoSeriesFilter.js +1 -1
- package/dist/cjs/VideoSeriesListing.js +3 -3
- package/dist/cjs/View.js +66 -63
- package/dist/cjs/YahooHero.js +2 -2
- package/dist/cjs/YoutubeGroup.js +1 -1
- package/dist/cjs/getQuery.js +1 -1
- package/dist/cjs/getSerializers.js +447 -435
- package/dist/cjs/{getTargeting-37612527.js → getTargeting-3ced038f.js} +2 -2
- package/dist/cjs/getTargeting.js +1 -1
- package/dist/cjs/{index-be0c82be.js → index-b5eb3ff8.js} +20 -19
- package/dist/cjs/index.js +9 -9
- package/dist/cjs/{inherits-93684212.js → inherits-14962339.js} +4 -4
- package/dist/cjs/{main-88348b15.js → main-00905561.js} +6 -6
- package/dist/cjs/{moment-575fe24c.js → moment-3cf060f6.js} +5 -5
- package/dist/cjs/urlFor.js +1 -1
- package/dist/esm/AD300x250.js +1 -1
- package/dist/esm/AD300x250x600.js +1 -1
- package/dist/esm/AD728x90.js +1 -1
- package/dist/esm/ADFloatingFooter.js +1 -1
- package/dist/esm/ADGutter.js +1 -1
- package/dist/esm/ADSponsoredResources.js +1 -1
- package/dist/esm/ADWebcast.js +1 -1
- package/dist/esm/ADWelcome.js +1 -1
- package/dist/esm/AdSlot.js +1 -1
- package/dist/esm/ArticleQueue.js +29 -28
- package/dist/esm/Auth.js +3 -3
- package/dist/esm/{BlockContent-e9b4ddcf.js → BlockContent-a614acdf.js} +1 -1
- package/dist/esm/CMEDeck.js +2 -2
- package/dist/esm/Column3.js +1 -1
- package/dist/esm/ConferenceArticleCard.js +2 -2
- package/dist/esm/DeckContent.js +4 -4
- package/dist/esm/DeckQueue.js +3 -3
- package/dist/esm/EventsDeck.js +2 -2
- package/dist/esm/Feature.js +2 -2
- package/dist/esm/{Figure-bc2b95d7.js → Figure-23e3ecc0.js} +1 -1
- package/dist/esm/ForbesHero.js +2 -2
- package/dist/esm/GridContent.js +5 -5
- package/dist/esm/GridHero.js +2 -2
- package/dist/esm/GroupDeck.js +1 -1
- package/dist/esm/HamMagazine.js +1 -1
- package/dist/esm/Hero.js +1 -1
- package/dist/esm/HorizontalHero.js +2 -2
- package/dist/esm/IssueContentDeck.js +2 -2
- package/dist/esm/IssueDeck.js +1 -1
- package/dist/esm/IssueLanding.js +5 -5
- package/dist/esm/LeftNav.js +1 -1
- package/dist/esm/MasterDeck.js +3 -3
- package/dist/esm/NavMagazine.js +1 -1
- package/dist/esm/NavNative.js +1 -1
- package/dist/esm/OncliveHero.js +2 -2
- package/dist/esm/OncliveLargeHero.js +2 -2
- package/dist/esm/PublicationDeck.js +1 -1
- package/dist/esm/QueueDeckExpanded.js +5 -5
- package/dist/esm/RelatedContent.js +2 -2
- package/dist/esm/TaxonomyCard.js +2 -2
- package/dist/esm/TemplateNormal.js +1 -1
- package/dist/esm/ThumbnailCard.js +1 -1
- package/dist/esm/VerticalHero.js +2 -2
- package/dist/esm/VideoSeriesFilter.js +1 -1
- package/dist/esm/VideoSeriesListing.js +2 -2
- package/dist/esm/View.js +41 -38
- package/dist/esm/YahooHero.js +2 -2
- package/dist/esm/YoutubeGroup.js +1 -1
- package/dist/esm/getQuery.js +1 -1
- package/dist/esm/getSerializers.js +447 -435
- package/dist/esm/{index-73819142.js → index-51a80699.js} +20 -19
- package/dist/esm/index.js +6 -6
- package/dist/esm/{main-d7ee6151.js → main-adf6ec37.js} +6 -6
- package/dist/esm/{moment-e2f9b20c.js → moment-49ae13fa.js} +5 -5
- package/dist/esm/urlFor.js +1 -1
- package/package.json +1 -1
- /package/dist/cjs/{ADInfeed-5c1d1425.js → ADInfeed-5adbfbba.js} +0 -0
- /package/dist/cjs/{ADlgInfeed-ce35bd57.js → ADlgInfeed-028da9eb.js} +0 -0
- /package/dist/esm/{ADInfeed-24924eab.js → ADInfeed-08192400.js} +0 -0
- /package/dist/esm/{ADlgInfeed-019d6cd9.js → ADlgInfeed-a90cf553.js} +0 -0
|
@@ -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,11 +375,12 @@ function urlBuilder(options) {
|
|
|
375
375
|
var client = options;
|
|
376
376
|
if (isSanityClient(client)) {
|
|
377
377
|
// Inherit config from client
|
|
378
|
-
var _a = client.clientConfig,
|
|
378
|
+
var _a = client.clientConfig, apiUrl = _a.apiHost, projectId = _a.projectId, dataset = _a.dataset;
|
|
379
|
+
var apiHost = apiUrl || 'https://api.sanity.io';
|
|
379
380
|
return new ImageUrlBuilder(null, {
|
|
380
381
|
baseUrl: apiHost.replace(/^https:\/\/api\./, 'https://cdn.'),
|
|
381
382
|
projectId: projectId,
|
|
382
|
-
dataset: dataset
|
|
383
|
+
dataset: dataset,
|
|
383
384
|
});
|
|
384
385
|
}
|
|
385
386
|
// Or just accept the options as given
|
|
@@ -392,7 +393,7 @@ var ImageUrlBuilder = /** @class */ (function () {
|
|
|
392
393
|
? __assign(__assign({}, (parent.options || {})), (options || {})) : __assign({}, (options || {})); // Copy options
|
|
393
394
|
}
|
|
394
395
|
ImageUrlBuilder.prototype.withOptions = function (options) {
|
|
395
|
-
var baseUrl = options.baseUrl ||
|
|
396
|
+
var baseUrl = options.baseUrl || this.options.baseUrl;
|
|
396
397
|
var newOptions = { baseUrl: baseUrl };
|
|
397
398
|
for (var key in options) {
|
|
398
399
|
if (options.hasOwnProperty(key)) {
|
|
@@ -520,7 +521,7 @@ var ImageUrlBuilder = /** @class */ (function () {
|
|
|
520
521
|
ImageUrlBuilder.prototype.url = function () {
|
|
521
522
|
return urlForImage_1$1.default(this.options);
|
|
522
523
|
};
|
|
523
|
-
//
|
|
524
|
+
// Alias for url()
|
|
524
525
|
ImageUrlBuilder.prototype.toString = function () {
|
|
525
526
|
return this.url();
|
|
526
527
|
};
|
package/dist/esm/index.js
CHANGED
|
@@ -19,16 +19,16 @@ import 'react-bootstrap/Container';
|
|
|
19
19
|
import 'react-bootstrap/Row';
|
|
20
20
|
import 'react-bootstrap/Col';
|
|
21
21
|
import 'react-bootstrap/Card';
|
|
22
|
-
import './moment-
|
|
22
|
+
import './moment-49ae13fa.js';
|
|
23
23
|
import 'next/router';
|
|
24
24
|
import './isSymbol-c1b9be80.js';
|
|
25
25
|
import './debounce-8cd9e09c.js';
|
|
26
26
|
import './index.es-29c1cef5.js';
|
|
27
27
|
import 'react-dom';
|
|
28
28
|
import './visibility-sensor-0baa4eea.js';
|
|
29
|
-
import './index-
|
|
29
|
+
import './index-51a80699.js';
|
|
30
30
|
import './index-5f9f807a.js';
|
|
31
|
-
import './main-
|
|
31
|
+
import './main-adf6ec37.js';
|
|
32
32
|
import './entities-7cc3bf45.js';
|
|
33
33
|
import './slicedToArray-f1e40361.js';
|
|
34
34
|
import './stringify-e30bc114.js';
|
|
@@ -38,10 +38,10 @@ import './promise-53143c9a.js';
|
|
|
38
38
|
export { default as Beam } from './Beam.js';
|
|
39
39
|
export { default as Segment } from './Segment.js';
|
|
40
40
|
export { default as AdSlot } from './AdSlot.js';
|
|
41
|
-
import './ADInfeed-
|
|
41
|
+
import './ADInfeed-08192400.js';
|
|
42
42
|
export { default as DeckContent } from './DeckContent.js';
|
|
43
43
|
import './lodash-17fdfebb.js';
|
|
44
|
-
import './ADlgInfeed-
|
|
44
|
+
import './ADlgInfeed-a90cf553.js';
|
|
45
45
|
import './_arrayMap-a8dd2b2c.js';
|
|
46
46
|
import './get-ae817b75.js';
|
|
47
47
|
export { default as AD } from './AD.js';
|
|
@@ -50,7 +50,7 @@ export { default as GridContent } from './GridContent.js';
|
|
|
50
50
|
export { default as DeckQueue } from './DeckQueue.js';
|
|
51
51
|
import 'react-bootstrap/Media';
|
|
52
52
|
export { default as ThumbnailCard } from './ThumbnailCard.js';
|
|
53
|
-
import './BlockContent-
|
|
53
|
+
import './BlockContent-a614acdf.js';
|
|
54
54
|
import './react-social-icons-a7d5c5c7.js';
|
|
55
55
|
export { default as TaxonomyCard } from './TaxonomyCard.js';
|
|
56
56
|
import './smoothscroll-4b699764.js';
|
|
@@ -48,7 +48,7 @@ var getNavigatorInstance = function getNavigatorInstance() {
|
|
|
48
48
|
};
|
|
49
49
|
var isIOS13Check = function isIOS13Check(type) {
|
|
50
50
|
var nav = getNavigatorInstance();
|
|
51
|
-
return nav && (nav.platform.
|
|
51
|
+
return nav && (nav.platform.indexOf(type) !== -1 || nav.platform === 'MacIntel' && nav.maxTouchPoints > 1 && !window.MSStream);
|
|
52
52
|
};
|
|
53
53
|
|
|
54
54
|
function _typeof(obj) {
|
|
@@ -444,7 +444,7 @@ var isIEType = function isIEType() {
|
|
|
444
444
|
var isElectronType = function isElectronType() {
|
|
445
445
|
var nav = getNavigatorInstance();
|
|
446
446
|
var ua = nav && nav.userAgent.toLowerCase();
|
|
447
|
-
return typeof ua === 'string' ? ua
|
|
447
|
+
return typeof ua === 'string' ? /electron/.test(ua) : false;
|
|
448
448
|
};
|
|
449
449
|
|
|
450
450
|
var getIOS13 = function getIOS13() {
|
|
@@ -511,15 +511,15 @@ var getDeviceType = function getDeviceType() {
|
|
|
511
511
|
var isSmartTV = isSmartTVType();
|
|
512
512
|
var isConsole = isConsoleType();
|
|
513
513
|
var isWearable = isWearableType();
|
|
514
|
-
var isMobileSafari = isMobileSafariType();
|
|
514
|
+
var isMobileSafari = isMobileSafariType() || getIPad13();
|
|
515
515
|
var isChromium = isChromiumType();
|
|
516
|
-
var isMobile = isMobileAndTabletType();
|
|
516
|
+
var isMobile = isMobileAndTabletType() || getIPad13();
|
|
517
517
|
var isMobileOnly = isMobileType();
|
|
518
|
-
var isTablet = isTabletType();
|
|
518
|
+
var isTablet = isTabletType() || getIPad13();
|
|
519
519
|
var isBrowser = isBrowserType();
|
|
520
520
|
var isAndroid = isAndroidType();
|
|
521
521
|
var isWinPhone = isWinPhoneType();
|
|
522
|
-
var isIOS = isIOSType();
|
|
522
|
+
var isIOS = isIOSType() || getIPad13();
|
|
523
523
|
var isChrome = isChromeType();
|
|
524
524
|
var isFirefox = isFirefoxType();
|
|
525
525
|
var isSafari = isSafariType();
|
|
@@ -4398,7 +4398,7 @@ var moment = createCommonjsModule(function (module, exports) {
|
|
|
4398
4398
|
eras = this.localeData().eras();
|
|
4399
4399
|
for (i = 0, l = eras.length; i < l; ++i) {
|
|
4400
4400
|
// truncate time
|
|
4401
|
-
val = this.startOf('day').valueOf();
|
|
4401
|
+
val = this.clone().startOf('day').valueOf();
|
|
4402
4402
|
|
|
4403
4403
|
if (eras[i].since <= val && val <= eras[i].until) {
|
|
4404
4404
|
return eras[i].name;
|
|
@@ -4418,7 +4418,7 @@ var moment = createCommonjsModule(function (module, exports) {
|
|
|
4418
4418
|
eras = this.localeData().eras();
|
|
4419
4419
|
for (i = 0, l = eras.length; i < l; ++i) {
|
|
4420
4420
|
// truncate time
|
|
4421
|
-
val = this.startOf('day').valueOf();
|
|
4421
|
+
val = this.clone().startOf('day').valueOf();
|
|
4422
4422
|
|
|
4423
4423
|
if (eras[i].since <= val && val <= eras[i].until) {
|
|
4424
4424
|
return eras[i].narrow;
|
|
@@ -4438,7 +4438,7 @@ var moment = createCommonjsModule(function (module, exports) {
|
|
|
4438
4438
|
eras = this.localeData().eras();
|
|
4439
4439
|
for (i = 0, l = eras.length; i < l; ++i) {
|
|
4440
4440
|
// truncate time
|
|
4441
|
-
val = this.startOf('day').valueOf();
|
|
4441
|
+
val = this.clone().startOf('day').valueOf();
|
|
4442
4442
|
|
|
4443
4443
|
if (eras[i].since <= val && val <= eras[i].until) {
|
|
4444
4444
|
return eras[i].abbr;
|
|
@@ -4461,7 +4461,7 @@ var moment = createCommonjsModule(function (module, exports) {
|
|
|
4461
4461
|
dir = eras[i].since <= eras[i].until ? +1 : -1;
|
|
4462
4462
|
|
|
4463
4463
|
// truncate time
|
|
4464
|
-
val = this.startOf('day').valueOf();
|
|
4464
|
+
val = this.clone().startOf('day').valueOf();
|
|
4465
4465
|
|
|
4466
4466
|
if (
|
|
4467
4467
|
(eras[i].since <= val && val <= eras[i].until) ||
|
|
@@ -5612,7 +5612,7 @@ var moment = createCommonjsModule(function (module, exports) {
|
|
|
5612
5612
|
|
|
5613
5613
|
//! moment.js
|
|
5614
5614
|
|
|
5615
|
-
hooks.version = '2.
|
|
5615
|
+
hooks.version = '2.28.0';
|
|
5616
5616
|
|
|
5617
5617
|
setHookCallback(createLocal);
|
|
5618
5618
|
|
package/dist/esm/urlFor.js
CHANGED
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|