@mjhls/mjh-framework 1.0.111 → 1.0.113

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
@@ -12537,6 +12537,10 @@ var MdMouse = function (props) {
12537
12537
  return GenIcon({"tag":"svg","attr":{"viewBox":"0 0 24 24"},"child":[{"tag":"path","attr":{"d":"M13 1.07V9h7c0-4.08-3.05-7.44-7-7.93zM4 15c0 4.42 3.58 8 8 8s8-3.58 8-8v-4H4v4zm7-13.93C7.05 1.56 4 4.92 4 9h7V1.07z"}}]})(props);
12538
12538
  };
12539
12539
  MdMouse.displayName = "MdMouse";
12540
+ var MdPictureAsPdf = function (props) {
12541
+ return GenIcon({"tag":"svg","attr":{"viewBox":"0 0 24 24"},"child":[{"tag":"path","attr":{"d":"M20 2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-8.5 7.5c0 .83-.67 1.5-1.5 1.5H9v2H7.5V7H10c.83 0 1.5.67 1.5 1.5v1zm5 2c0 .83-.67 1.5-1.5 1.5h-2.5V7H15c.83 0 1.5.67 1.5 1.5v3zm4-3H19v1h1.5V11H19v2h-1.5V7h3v1.5zM9 9.5h1v-1H9v1zM4 6H2v14c0 1.1.9 2 2 2h14v-2H4V6zm10 5.5h1v-3h-1v3z"}}]})(props);
12542
+ };
12543
+ MdPictureAsPdf.displayName = "MdPictureAsPdf";
12540
12544
 
12541
12545
  var NavNormal = function NavNormal(props) {
12542
12546
  var logo = props.logo,
@@ -13812,22 +13816,21 @@ var FigureComponent = function FigureComponent(_ref) {
13812
13816
  _node$alignment = node$$1.alignment,
13813
13817
  alignment = _node$alignment === undefined ? 'center' : _node$alignment;
13814
13818
 
13815
-
13816
- var imgWidth = widthP ? widthP + '%' : 'auto';
13819
+ var imgWidth = widthP ? widthP + '%' : '100%';
13817
13820
 
13818
13821
  var figureMargin = void 0;
13819
13822
  if (imgFloat === 'none') {
13820
13823
  figureMargin = '0 auto 1rem';
13821
13824
  }
13822
13825
  if (imgFloat === 'left') {
13823
- figureMargin = '0 1rem 1rem 10%';
13826
+ figureMargin = '0 10% 1rem 1rem';
13824
13827
  }
13825
13828
  if (imgFloat === 'right') {
13826
- figureMargin = '0 10% 1rem 1rem';
13829
+ figureMargin = '0 1rem 1rem 10%';
13827
13830
  }
13828
13831
 
13829
13832
  var loadImg = function loadImg() {
13830
- setcaptionWidth(imgElement.current.naturalWidth);
13833
+ setcaptionWidth(imgElement.current.width);
13831
13834
  };
13832
13835
 
13833
13836
  React.useEffect(function () {
@@ -13835,14 +13838,13 @@ var FigureComponent = function FigureComponent(_ref) {
13835
13838
  if (screenWidth > 1000) {
13836
13839
  var align = alignment.toLowerCase() === 'center' ? 'none' : alignment.toLowerCase();
13837
13840
  setimgFloat(align);
13838
- loadImg();
13839
13841
  }
13840
13842
  // eslint-disable-next-line react-hooks/exhaustive-deps
13841
13843
  }, []);
13842
13844
 
13843
13845
  return React__default.createElement(
13844
13846
  reactBootstrap.Figure,
13845
- { className: 'd-block text-center mb-3', style: { width: imgWidth, clear: 'both', float: imgFloat, margin: figureMargin } },
13847
+ { className: 'd-block text-center mb-3', style: { width: imgWidth, float: imgFloat, clear: 'both', margin: figureMargin } },
13846
13848
  link ? React__default.createElement(
13847
13849
  'a',
13848
13850
  { href: link, target: blank ? '_blank' : '_self' },
@@ -20640,6 +20642,25 @@ var AlphabeticList = function AlphabeticList(_ref) {
20640
20642
  );
20641
20643
  };
20642
20644
 
20645
+ var PdfDownload = function PdfDownload(props) {
20646
+ console.log(props.issueInfo.asset.url);
20647
+
20648
+ return React__default.createElement(
20649
+ 'div',
20650
+ { className: 'pdf-download', style: { textAlign: 'center', padding: '1rem 0', borderTop: '1px solid #eee', marginTop: '1rem' } },
20651
+ React__default.createElement(
20652
+ 'a',
20653
+ { href: props.issueInfo.asset.url, target: '_blank' },
20654
+ React__default.createElement(MdPictureAsPdf, { style: { fontSize: '65px', color: '#ff0000' } }),
20655
+ React__default.createElement(
20656
+ 'span',
20657
+ null,
20658
+ 'Click to download this publication issue.'
20659
+ )
20660
+ )
20661
+ );
20662
+ };
20663
+
20643
20664
  exports.DeckContent = ContentCard;
20644
20665
  exports.GridContent = GridContent$1;
20645
20666
  exports.DeckQueue = Queue;
@@ -20672,4 +20693,5 @@ exports.Breadcrumbs = Breadcrumbs;
20672
20693
  exports.SetCookie = SetCookie;
20673
20694
  exports.Hero = Hero;
20674
20695
  exports.AlphabeticList = AlphabeticList;
20696
+ exports.PdfDownload = PdfDownload;
20675
20697
  //# sourceMappingURL=index.js.map