@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/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # mjh-framework v. 1.0.61
1
+ # mjh-framework v. 1.0.62
2
2
 
3
3
  > Foundation Framework
4
4
 
package/dist/index.es.js CHANGED
@@ -3972,6 +3972,7 @@ var DeckContent = function (_React$Component) {
3972
3972
  }
3973
3973
 
3974
3974
  var pageNumber = row.pageNumber || _this.state.page;
3975
+ var contentCategoryName = row.contentCategory ? row.contentCategory.name : 'Articles';
3975
3976
 
3976
3977
  return React__default.createElement(
3977
3978
  VisibilitySensor,
@@ -3988,7 +3989,7 @@ var DeckContent = function (_React$Component) {
3988
3989
  { className: 'content-card', style: { flexDirection: mode } },
3989
3990
  React__default.createElement(
3990
3991
  Link,
3991
- { href: _this.mapping[row.contentCategory.name] + '/[url]', as: _this.mapping[row.contentCategory.name] + '/' + row.url.current },
3992
+ { href: _this.mapping[contentCategoryName] + '/[url]', as: _this.mapping[contentCategoryName] + '/' + row.url.current },
3992
3993
  React__default.createElement(
3993
3994
  'a',
3994
3995
  null,
@@ -4000,7 +4001,7 @@ var DeckContent = function (_React$Component) {
4000
4001
  null,
4001
4002
  React__default.createElement(
4002
4003
  Link,
4003
- { href: _this.mapping[row.contentCategory.name] + '/[url]', as: _this.mapping[row.contentCategory.name] + '/' + row.url.current },
4004
+ { href: _this.mapping[contentCategoryName] + '/[url]', as: _this.mapping[contentCategoryName] + '/' + row.url.current },
4004
4005
  React__default.createElement(
4005
4006
  'a',
4006
4007
  null,
@@ -7386,21 +7387,26 @@ var AD300x250x600 = function AD300x250x600(_ref) {
7386
7387
 
7387
7388
  var FigureComponent = function FigureComponent(_ref) {
7388
7389
  var caption = _ref.caption,
7390
+ _ref$widthP = _ref.widthP,
7391
+ widthP = _ref$widthP === undefined ? '100' : _ref$widthP,
7392
+ _ref$alignment = _ref.alignment,
7393
+ alignment = _ref$alignment === undefined ? 'center' : _ref$alignment,
7389
7394
  asset = _ref.asset,
7390
7395
  client = _ref.client;
7391
7396
 
7397
+
7392
7398
  var builder = imageUrlBuilder(client);
7393
7399
 
7394
7400
  var urlFor = function urlFor(source) {
7395
7401
  return builder.image(source);
7396
7402
  };
7397
-
7403
+ var imgWidth = widthP + '%';
7398
7404
  return React__default.createElement(
7399
7405
  'div',
7400
- { style: { textAlign: 'center', marginTop: '1em', marginBottom: '1em' } },
7406
+ { style: { textAlign: alignment, marginTop: '1em', marginBottom: '1em' } },
7401
7407
  React__default.createElement(
7402
7408
  Figure,
7403
- null,
7409
+ { style: { width: imgWidth } },
7404
7410
  React__default.createElement(Figure.Image, { src: urlFor(asset).url() }),
7405
7411
  caption && React__default.createElement(
7406
7412
  Figure.Caption,
@@ -11108,9 +11114,11 @@ var getSerializers$1 = function getSerializers(client) {
11108
11114
  figure: function figure(_ref2) {
11109
11115
  var node = _ref2.node;
11110
11116
  var asset = node.asset,
11111
- caption = node.caption;
11117
+ caption = node.caption,
11118
+ widthP = node.widthP,
11119
+ alignment = node.alignment;
11112
11120
 
11113
- return React__default.createElement(FigureComponent, { caption: caption, asset: asset, client: client });
11121
+ return React__default.createElement(FigureComponent, { caption: caption, asset: asset, client: client, widthP: widthP, alignment: alignment });
11114
11122
  },
11115
11123
  slideshow: function slideshow(_ref3) {
11116
11124
  var node = _ref3.node;