@mjhls/mjh-framework 1.0.61 → 1.0.63

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/dist/index.js CHANGED
@@ -3979,6 +3979,7 @@ var DeckContent = function (_React$Component) {
3979
3979
  }
3980
3980
 
3981
3981
  var pageNumber = row.pageNumber || _this.state.page;
3982
+ var contentCategoryName = row.contentCategory ? row.contentCategory.name : 'Articles';
3982
3983
 
3983
3984
  return React__default.createElement(
3984
3985
  VisibilitySensor,
@@ -3995,7 +3996,7 @@ var DeckContent = function (_React$Component) {
3995
3996
  { className: 'content-card', style: { flexDirection: mode } },
3996
3997
  React__default.createElement(
3997
3998
  Link,
3998
- { href: _this.mapping[row.contentCategory.name] + '/[url]', as: _this.mapping[row.contentCategory.name] + '/' + row.url.current },
3999
+ { href: _this.mapping[contentCategoryName] + '/[url]', as: _this.mapping[contentCategoryName] + '/' + row.url.current },
3999
4000
  React__default.createElement(
4000
4001
  'a',
4001
4002
  null,
@@ -4007,7 +4008,7 @@ var DeckContent = function (_React$Component) {
4007
4008
  null,
4008
4009
  React__default.createElement(
4009
4010
  Link,
4010
- { href: _this.mapping[row.contentCategory.name] + '/[url]', as: _this.mapping[row.contentCategory.name] + '/' + row.url.current },
4011
+ { href: _this.mapping[contentCategoryName] + '/[url]', as: _this.mapping[contentCategoryName] + '/' + row.url.current },
4011
4012
  React__default.createElement(
4012
4013
  'a',
4013
4014
  null,
@@ -7393,21 +7394,26 @@ var AD300x250x600 = function AD300x250x600(_ref) {
7393
7394
 
7394
7395
  var FigureComponent = function FigureComponent(_ref) {
7395
7396
  var caption = _ref.caption,
7397
+ _ref$widthP = _ref.widthP,
7398
+ widthP = _ref$widthP === undefined ? '100' : _ref$widthP,
7399
+ _ref$alignment = _ref.alignment,
7400
+ alignment = _ref$alignment === undefined ? 'center' : _ref$alignment,
7396
7401
  asset = _ref.asset,
7397
7402
  client = _ref.client;
7398
7403
 
7404
+
7399
7405
  var builder = imageUrlBuilder(client);
7400
7406
 
7401
7407
  var urlFor = function urlFor(source) {
7402
7408
  return builder.image(source);
7403
7409
  };
7404
-
7410
+ var imgWidth = widthP + '%';
7405
7411
  return React__default.createElement(
7406
7412
  'div',
7407
- { style: { textAlign: 'center', marginTop: '1em', marginBottom: '1em' } },
7413
+ { style: { textAlign: alignment, marginTop: '1em', marginBottom: '1em' } },
7408
7414
  React__default.createElement(
7409
7415
  reactBootstrap.Figure,
7410
- null,
7416
+ { style: { width: imgWidth } },
7411
7417
  React__default.createElement(reactBootstrap.Figure.Image, { src: urlFor(asset).url() }),
7412
7418
  caption && React__default.createElement(
7413
7419
  reactBootstrap.Figure.Caption,
@@ -11115,9 +11121,11 @@ var getSerializers$1 = function getSerializers(client) {
11115
11121
  figure: function figure(_ref2) {
11116
11122
  var node = _ref2.node;
11117
11123
  var asset = node.asset,
11118
- caption = node.caption;
11124
+ caption = node.caption,
11125
+ widthP = node.widthP,
11126
+ alignment = node.alignment;
11119
11127
 
11120
- return React__default.createElement(FigureComponent, { caption: caption, asset: asset, client: client });
11128
+ return React__default.createElement(FigureComponent, { caption: caption, asset: asset, client: client, widthP: widthP, alignment: alignment });
11121
11129
  },
11122
11130
  slideshow: function slideshow(_ref3) {
11123
11131
  var node = _ref3.node;