@mjhls/mjh-framework 1.0.43 → 1.0.44
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 +170 -170
- package/dist/index.es.js +32 -4
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +30 -2
- package/dist/index.js.map +1 -1
- package/package.json +79 -78
package/dist/index.js
CHANGED
|
@@ -25,6 +25,7 @@ var Button = _interopDefault(require('react-bootstrap/Button'));
|
|
|
25
25
|
var router = require('next/router');
|
|
26
26
|
var PropTypes = _interopDefault(require('prop-types'));
|
|
27
27
|
var reactBootstrap = require('react-bootstrap');
|
|
28
|
+
var BlockContent = _interopDefault(require('@sanity/block-content-to-react'));
|
|
28
29
|
|
|
29
30
|
/*! *****************************************************************************
|
|
30
31
|
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
@@ -681,7 +682,7 @@ var DeckContent = function (_React$Component) {
|
|
|
681
682
|
}, _this.renderCardImage = function (row, page) {
|
|
682
683
|
if (row.thumbnail && row.thumbnail.asset) {
|
|
683
684
|
return row.thumbnail.asset.url;
|
|
684
|
-
/*} else if (page === 'videos' && row.youtubeURL) {
|
|
685
|
+
/*} else if (page === 'videos' && row.youtubeURL) {
|
|
685
686
|
return `https://img.youtube.com/vi/${getYouTubeId(row.youtubeURL)}/0.jpg`*/
|
|
686
687
|
} else {
|
|
687
688
|
return _this.defaultImage;
|
|
@@ -3094,7 +3095,7 @@ var NavDvm = function NavDvm(props) {
|
|
|
3094
3095
|
Nav,
|
|
3095
3096
|
{ className: 'mr-auto' },
|
|
3096
3097
|
dataObject && dataObject.map(function (row, index) {
|
|
3097
|
-
if (row.subQuery.length >
|
|
3098
|
+
if (row.subQuery.length > 0) {
|
|
3098
3099
|
return React__default.createElement(
|
|
3099
3100
|
NavDropdown,
|
|
3100
3101
|
{ key: index, title: row.name, id: 'basic-nav-dropdown' },
|
|
@@ -8467,6 +8468,26 @@ var YouTubePlayer$1 = function YouTubePlayer(_ref) {
|
|
|
8467
8468
|
return React__default.createElement(YouTube, { videoId: id, opts: { width: '100%' } });
|
|
8468
8469
|
};
|
|
8469
8470
|
|
|
8471
|
+
var Sidebar = function Sidebar(_ref) {
|
|
8472
|
+
var caption = _ref.caption,
|
|
8473
|
+
content = _ref.content;
|
|
8474
|
+
|
|
8475
|
+
return React__default.createElement(
|
|
8476
|
+
reactBootstrap.Card,
|
|
8477
|
+
{ style: { maxWidth: '50%', float: 'right' } },
|
|
8478
|
+
React__default.createElement(
|
|
8479
|
+
reactBootstrap.Card.Body,
|
|
8480
|
+
null,
|
|
8481
|
+
React__default.createElement(
|
|
8482
|
+
reactBootstrap.Card.Title,
|
|
8483
|
+
null,
|
|
8484
|
+
caption
|
|
8485
|
+
),
|
|
8486
|
+
React__default.createElement(BlockContent, { blocks: content })
|
|
8487
|
+
)
|
|
8488
|
+
);
|
|
8489
|
+
};
|
|
8490
|
+
|
|
8470
8491
|
var getSerializers = function getSerializers(client) {
|
|
8471
8492
|
return {
|
|
8472
8493
|
types: {
|
|
@@ -8488,6 +8509,13 @@ var getSerializers = function getSerializers(client) {
|
|
|
8488
8509
|
var slides = node.slides;
|
|
8489
8510
|
|
|
8490
8511
|
return React__default.createElement(Slideshow, { slides: slides });
|
|
8512
|
+
},
|
|
8513
|
+
sidebar: function sidebar(_ref4) {
|
|
8514
|
+
var node = _ref4.node;
|
|
8515
|
+
var caption = node.caption,
|
|
8516
|
+
content = node.content;
|
|
8517
|
+
|
|
8518
|
+
return React__default.createElement(Sidebar, { caption: caption, content: content });
|
|
8491
8519
|
}
|
|
8492
8520
|
}
|
|
8493
8521
|
};
|