@mjhls/mjh-framework 1.0.607 → 1.0.608
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/DeckQueue.js +2 -2
- package/dist/cjs/TaxonomyCard.js +3 -1
- package/dist/cjs/View.js +4 -2
- package/dist/cjs/urlFor.js +2 -1
- package/dist/esm/DeckQueue.js +2 -2
- package/dist/esm/TaxonomyCard.js +3 -1
- package/dist/esm/View.js +4 -2
- package/dist/esm/urlFor.js +2 -1
- package/package.json +1 -1
package/README.md
CHANGED
package/dist/cjs/DeckQueue.js
CHANGED
|
@@ -53,7 +53,7 @@ var DeckQueue = function (_React$Component) {
|
|
|
53
53
|
args[_key] = arguments[_key];
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
-
return _ret = (_temp = (_this = inherits._possibleConstructorReturn(this, (_ref = DeckQueue.__proto__ || inherits._Object$getPrototypeOf(DeckQueue)).call.apply(_ref, [this].concat(args))), _this), _this.page = _this.props.page, _this.data = _this.props.dataRecord, _this.query = _this.props.query, _this.params = _this.props.params, _this.pointer = _this.props.pointer ? _this.props.pointer : false, _this.pointerArray = _this.props.pointerArray ? _this.props.pointerArray : false, _this.defaultImage = _this.props.defaultImage ? _this.props.defaultImage : '/placeholder.jpg', _this.state = {
|
|
56
|
+
return _ret = (_temp = (_this = inherits._possibleConstructorReturn(this, (_ref = DeckQueue.__proto__ || inherits._Object$getPrototypeOf(DeckQueue)).call.apply(_ref, [this].concat(args))), _this), _this.page = _this.props.page, _this.data = _this.props.dataRecord, _this.query = _this.props.query, _this.params = _this.props.params, _this.pointer = _this.props.pointer ? _this.props.pointer : false, _this.pointerArray = _this.props.pointerArray ? _this.props.pointerArray : false, _this.defaultImage = _this.props.defaultImage ? _this.props.defaultImage : '/placeholder.jpg', _this.imageHeight = _this.props.imageHeight ? _this.props.imageHeight : 270, _this.state = {
|
|
57
57
|
data: _this.data,
|
|
58
58
|
per: _this.params ? _this.params.to : 2,
|
|
59
59
|
page: _this.props.currentPage || 1,
|
|
@@ -120,7 +120,7 @@ var DeckQueue = function (_React$Component) {
|
|
|
120
120
|
}, _this.renderCardImage = function (row) {
|
|
121
121
|
if (row.thumbnail && row.thumbnail.asset) {
|
|
122
122
|
var url = _this.urlFor(row.thumbnail);
|
|
123
|
-
|
|
123
|
+
url = url.height(_this.imageHeight);
|
|
124
124
|
if (_this.props.imageWidth) url = url.width(_this.props.imageWidth);
|
|
125
125
|
return url.url();
|
|
126
126
|
} else {
|
package/dist/cjs/TaxonomyCard.js
CHANGED
|
@@ -20,6 +20,7 @@ var BlockContent = require('./BlockContent-f942392e.js');
|
|
|
20
20
|
var reactSocialIcons = require('./react-social-icons-cd0d9d3b.js');
|
|
21
21
|
|
|
22
22
|
var TaxonomyCard = function TaxonomyCard(props) {
|
|
23
|
+
// setting default value for imageHeight
|
|
23
24
|
var columns = props.columns,
|
|
24
25
|
variant = props.variant,
|
|
25
26
|
_props$icon = props.icon,
|
|
@@ -27,7 +28,8 @@ var TaxonomyCard = function TaxonomyCard(props) {
|
|
|
27
28
|
data = props.dataRecord,
|
|
28
29
|
defaultImage = props.defaultImage,
|
|
29
30
|
client = props.client,
|
|
30
|
-
imageHeight = props.imageHeight,
|
|
31
|
+
_props$imageHeight = props.imageHeight,
|
|
32
|
+
imageHeight = _props$imageHeight === undefined ? 270 : _props$imageHeight,
|
|
31
33
|
imageWidth = props.imageWidth,
|
|
32
34
|
getSerializers = props.getSerializers;
|
|
33
35
|
|
package/dist/cjs/View.js
CHANGED
|
@@ -350,7 +350,9 @@ var Article = function Article(props) {
|
|
|
350
350
|
lgContextAd = _props$lgContextAd === undefined ? false : _props$lgContextAd,
|
|
351
351
|
queueData = props.queueData,
|
|
352
352
|
_props$sponsoredFlag = props.sponsoredFlag,
|
|
353
|
-
sponsoredFlag = _props$sponsoredFlag === undefined ? false : _props$sponsoredFlag
|
|
353
|
+
sponsoredFlag = _props$sponsoredFlag === undefined ? false : _props$sponsoredFlag,
|
|
354
|
+
_props$authorImgHeigh = props.authorImgHeight,
|
|
355
|
+
authorImgHeight = _props$authorImgHeigh === undefined ? 270 : _props$authorImgHeigh;
|
|
354
356
|
var onChangeArticle = props.onChangeArticle;
|
|
355
357
|
|
|
356
358
|
//If sponsored flag, disable contextual ads
|
|
@@ -788,7 +790,7 @@ var Article = function Article(props) {
|
|
|
788
790
|
return React__default.createElement(
|
|
789
791
|
'span',
|
|
790
792
|
{ key: index },
|
|
791
|
-
getSerializers.renderAuthor(authorDetail.displayName, authorDetail.url, index, authorDetails.length, authorPrefix, authorDetail.biography && renderAuthorBiography(authorDetail.biography[0]), authorDetail.profileImage && urlFor(props.client, authorDetail.profileImage).url())
|
|
793
|
+
getSerializers.renderAuthor(authorDetail.displayName, authorDetail.url, index, authorDetails.length, authorPrefix, authorDetail.biography && renderAuthorBiography(authorDetail.biography[0]), authorDetail.profileImage && urlFor(props.client, authorDetail.profileImage).height(authorImgHeight).url())
|
|
792
794
|
);
|
|
793
795
|
}),
|
|
794
796
|
React__default.createElement(
|
package/dist/cjs/urlFor.js
CHANGED
|
@@ -3,8 +3,9 @@
|
|
|
3
3
|
require('./_commonjsHelpers-06173234.js');
|
|
4
4
|
var index$1 = require('./index-b5eb3ff8.js');
|
|
5
5
|
|
|
6
|
+
// Sanity image auto formating
|
|
6
7
|
function urlFor(client, source) {
|
|
7
|
-
return index$1.imageUrlBuilder(client).image(source);
|
|
8
|
+
return index$1.imageUrlBuilder(client).image(source).auto('format');
|
|
8
9
|
}
|
|
9
10
|
|
|
10
11
|
module.exports = urlFor;
|
package/dist/esm/DeckQueue.js
CHANGED
|
@@ -47,7 +47,7 @@ var DeckQueue = function (_React$Component) {
|
|
|
47
47
|
args[_key] = arguments[_key];
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = DeckQueue.__proto__ || _Object$getPrototypeOf(DeckQueue)).call.apply(_ref, [this].concat(args))), _this), _this.page = _this.props.page, _this.data = _this.props.dataRecord, _this.query = _this.props.query, _this.params = _this.props.params, _this.pointer = _this.props.pointer ? _this.props.pointer : false, _this.pointerArray = _this.props.pointerArray ? _this.props.pointerArray : false, _this.defaultImage = _this.props.defaultImage ? _this.props.defaultImage : '/placeholder.jpg', _this.state = {
|
|
50
|
+
return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = DeckQueue.__proto__ || _Object$getPrototypeOf(DeckQueue)).call.apply(_ref, [this].concat(args))), _this), _this.page = _this.props.page, _this.data = _this.props.dataRecord, _this.query = _this.props.query, _this.params = _this.props.params, _this.pointer = _this.props.pointer ? _this.props.pointer : false, _this.pointerArray = _this.props.pointerArray ? _this.props.pointerArray : false, _this.defaultImage = _this.props.defaultImage ? _this.props.defaultImage : '/placeholder.jpg', _this.imageHeight = _this.props.imageHeight ? _this.props.imageHeight : 270, _this.state = {
|
|
51
51
|
data: _this.data,
|
|
52
52
|
per: _this.params ? _this.params.to : 2,
|
|
53
53
|
page: _this.props.currentPage || 1,
|
|
@@ -114,7 +114,7 @@ var DeckQueue = function (_React$Component) {
|
|
|
114
114
|
}, _this.renderCardImage = function (row) {
|
|
115
115
|
if (row.thumbnail && row.thumbnail.asset) {
|
|
116
116
|
var url = _this.urlFor(row.thumbnail);
|
|
117
|
-
|
|
117
|
+
url = url.height(_this.imageHeight);
|
|
118
118
|
if (_this.props.imageWidth) url = url.width(_this.props.imageWidth);
|
|
119
119
|
return url.url();
|
|
120
120
|
} else {
|
package/dist/esm/TaxonomyCard.js
CHANGED
|
@@ -15,6 +15,7 @@ import { B as BlockContent } from './BlockContent-a614acdf.js';
|
|
|
15
15
|
import { r as reactSocialIcons_1 } from './react-social-icons-a7d5c5c7.js';
|
|
16
16
|
|
|
17
17
|
var TaxonomyCard = function TaxonomyCard(props) {
|
|
18
|
+
// setting default value for imageHeight
|
|
18
19
|
var columns = props.columns,
|
|
19
20
|
variant = props.variant,
|
|
20
21
|
_props$icon = props.icon,
|
|
@@ -22,7 +23,8 @@ var TaxonomyCard = function TaxonomyCard(props) {
|
|
|
22
23
|
data = props.dataRecord,
|
|
23
24
|
defaultImage = props.defaultImage,
|
|
24
25
|
client = props.client,
|
|
25
|
-
imageHeight = props.imageHeight,
|
|
26
|
+
_props$imageHeight = props.imageHeight,
|
|
27
|
+
imageHeight = _props$imageHeight === undefined ? 270 : _props$imageHeight,
|
|
26
28
|
imageWidth = props.imageWidth,
|
|
27
29
|
getSerializers = props.getSerializers;
|
|
28
30
|
|
package/dist/esm/View.js
CHANGED
|
@@ -344,7 +344,9 @@ var Article = function Article(props) {
|
|
|
344
344
|
lgContextAd = _props$lgContextAd === undefined ? false : _props$lgContextAd,
|
|
345
345
|
queueData = props.queueData,
|
|
346
346
|
_props$sponsoredFlag = props.sponsoredFlag,
|
|
347
|
-
sponsoredFlag = _props$sponsoredFlag === undefined ? false : _props$sponsoredFlag
|
|
347
|
+
sponsoredFlag = _props$sponsoredFlag === undefined ? false : _props$sponsoredFlag,
|
|
348
|
+
_props$authorImgHeigh = props.authorImgHeight,
|
|
349
|
+
authorImgHeight = _props$authorImgHeigh === undefined ? 270 : _props$authorImgHeigh;
|
|
348
350
|
var onChangeArticle = props.onChangeArticle;
|
|
349
351
|
|
|
350
352
|
//If sponsored flag, disable contextual ads
|
|
@@ -782,7 +784,7 @@ var Article = function Article(props) {
|
|
|
782
784
|
return React__default.createElement(
|
|
783
785
|
'span',
|
|
784
786
|
{ key: index },
|
|
785
|
-
renderAuthor(authorDetail.displayName, authorDetail.url, index, authorDetails.length, authorPrefix, authorDetail.biography && renderAuthorBiography(authorDetail.biography[0]), authorDetail.profileImage && urlFor(props.client, authorDetail.profileImage).url())
|
|
787
|
+
renderAuthor(authorDetail.displayName, authorDetail.url, index, authorDetails.length, authorPrefix, authorDetail.biography && renderAuthorBiography(authorDetail.biography[0]), authorDetail.profileImage && urlFor(props.client, authorDetail.profileImage).height(authorImgHeight).url())
|
|
786
788
|
);
|
|
787
789
|
}),
|
|
788
790
|
React__default.createElement(
|
package/dist/esm/urlFor.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import './_commonjsHelpers-0c4b6f40.js';
|
|
2
2
|
import { i as imageUrlBuilder } from './index-51a80699.js';
|
|
3
3
|
|
|
4
|
+
// Sanity image auto formating
|
|
4
5
|
function urlFor(client, source) {
|
|
5
|
-
return imageUrlBuilder(client).image(source);
|
|
6
|
+
return imageUrlBuilder(client).image(source).auto('format');
|
|
6
7
|
}
|
|
7
8
|
|
|
8
9
|
export default urlFor;
|