@mjhls/mjh-framework 1.0.64 → 1.0.65
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/index.es.js +7 -14
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +6 -13
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
package/dist/index.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React__default, { Component, useState,
|
|
1
|
+
import React__default, { Component, useState, createContext, createElement } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import reactDom from 'react-dom';
|
|
4
4
|
import Row from 'react-bootstrap/Row';
|
|
@@ -3823,8 +3823,7 @@ var DeckContent = function (_React$Component) {
|
|
|
3823
3823
|
currentPage: _this.props.currentPage || 1
|
|
3824
3824
|
}, _this.loadMore = debounce_1(function () {
|
|
3825
3825
|
_this.setState(function (state) {
|
|
3826
|
-
var
|
|
3827
|
-
page = state.page,
|
|
3826
|
+
var page = state.page,
|
|
3828
3827
|
from = state.from,
|
|
3829
3828
|
per = state.per,
|
|
3830
3829
|
to = state.to;
|
|
@@ -3878,8 +3877,8 @@ var DeckContent = function (_React$Component) {
|
|
|
3878
3877
|
var builder = imageUrlBuilder(client);
|
|
3879
3878
|
return builder.image(source);
|
|
3880
3879
|
}, _this.renderCardImage = function (row, page) {
|
|
3881
|
-
if (row.thumbnail
|
|
3882
|
-
return _this.urlFor(row.thumbnail
|
|
3880
|
+
if (row.thumbnail) {
|
|
3881
|
+
return _this.urlFor(row.thumbnail).url();
|
|
3883
3882
|
} else {
|
|
3884
3883
|
return _this.defaultImage;
|
|
3885
3884
|
}
|
|
@@ -5216,7 +5215,7 @@ var DeckQueue = function (_React$Component) {
|
|
|
5216
5215
|
null,
|
|
5217
5216
|
this.state.data && this.state.data.map(function (row, index) {
|
|
5218
5217
|
// const thumbnailURL = get(row, 'thumbnail.asset.url', this.props.defaultImage)
|
|
5219
|
-
var thumbnailURL = row.thumbnail
|
|
5218
|
+
var thumbnailURL = row.thumbnail ? _this2.urlFor(row.thumbnail).url() : _this2.props.defaultImage;
|
|
5220
5219
|
return React__default.createElement(
|
|
5221
5220
|
Col,
|
|
5222
5221
|
{ key: index, md: 12, lg: lgVar, style: { display: 'flex', flex: '1 0 auto' } },
|
|
@@ -5333,13 +5332,7 @@ var ThumbnailCard = function ThumbnailCard(_ref) {
|
|
|
5333
5332
|
return React__default.createElement(
|
|
5334
5333
|
Media,
|
|
5335
5334
|
{ className: 'mb-3 thumbnail-card' },
|
|
5336
|
-
React__default.createElement('img', {
|
|
5337
|
-
width: size,
|
|
5338
|
-
height: size,
|
|
5339
|
-
className: 'mr-3',
|
|
5340
|
-
src: item.thumbnail && item.thumbnail.asset ? urlFor(item.thumbnail.asset).url() : defaultImage,
|
|
5341
|
-
alt: 'Generic placeholder'
|
|
5342
|
-
}),
|
|
5335
|
+
React__default.createElement('img', { width: size, height: size, className: 'mr-3', src: item.thumbnail ? urlFor(item.thumbnail).url() : defaultImage, alt: 'Generic placeholder' }),
|
|
5343
5336
|
React__default.createElement(
|
|
5344
5337
|
Media.Body,
|
|
5345
5338
|
null,
|
|
@@ -7457,7 +7450,7 @@ var Slideshow = function Slideshow(_ref) {
|
|
|
7457
7450
|
return React__default.createElement(
|
|
7458
7451
|
Carousel.Item,
|
|
7459
7452
|
{ key: slide._key },
|
|
7460
|
-
React__default.createElement('img', { src: urlFor(slide
|
|
7453
|
+
React__default.createElement('img', { src: urlFor(slide).url(), style: { width: '100%' } })
|
|
7461
7454
|
);
|
|
7462
7455
|
})
|
|
7463
7456
|
)
|