@mjhls/mjh-framework 1.0.150 → 1.0.151

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,5 +1,5 @@
1
1
 
2
- # mjh-framework v. 1.0.150
2
+ # mjh-framework v. 1.0.151
3
3
 
4
4
 
5
5
 
package/dist/index.es.js CHANGED
@@ -1,4 +1,4 @@
1
- import React__default, { Component, useState, useEffect, useRef, createElement, createContext } from 'react';
1
+ import React__default, { Component, useState, useEffect, useRef, createContext, createElement } from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import reactDom from 'react-dom';
4
4
  import Container from 'react-bootstrap/Container';
@@ -7985,6 +7985,10 @@ var IoIosHome = function (props) {
7985
7985
  return GenIcon({"tag":"svg","attr":{"viewBox":"0 0 512 512"},"child":[{"tag":"path","attr":{"d":"M258.5 104.1c-1.5-1.2-3.5-1.2-5 0l-156 124.8c-.9.8-1.5 1.9-1.5 3.1v230c0 1.1.9 2 2 2h108c1.1 0 2-.9 2-2V322c0-1.1.9-2 2-2h92c1.1 0 2 .9 2 2v140c0 1.1.9 2 2 2h108c1.1 0 2-.9 2-2V232c0-1.2-.6-2.4-1.5-3.1l-156-124.8z"}},{"tag":"path","attr":{"d":"M458.7 204.2l-189-151.4C265.9 49.7 261 48 256 48s-9.9 1.7-13.7 4.8L160 119.7V77.5c0-1.1-.9-2-2-2H98c-1.1 0-2 .9-2 2v92.2l-42.7 35.1c-3.1 2.5-5.1 6.2-5.3 10.2-.2 4 1.3 7.9 4.1 10.7 2.6 2.6 6.1 4.1 9.9 4.1 3.2 0 6.3-1.1 8.8-3.1l183.9-148c.5-.4.9-.4 1.3-.4s.8.1 1.3.4l183.9 147.4c2.5 2 5.6 3.1 8.8 3.1 3.7 0 7.2-1.4 9.9-4.1 2.9-2.8 4.4-6.7 4.2-10.7-.3-4-2.2-7.7-5.4-10.2z"}}]})(props);
7986
7986
  };
7987
7987
  IoIosHome.displayName = "IoIosHome";
7988
+ var IoIosOpen = function (props) {
7989
+ return GenIcon({"tag":"svg","attr":{"viewBox":"0 0 512 512"},"child":[{"tag":"path","attr":{"d":"M227.8 300.2c-5.1-5.1-5.1-13.3 0-18.4l133.7-133.7c-5.3-2.6-11.2-4.1-17.5-4.1H88c-22 0-40 18-40 40v224c0 22 18 40 40 40h256c22 0 40-18 40-40V184c0-6.3-1.5-12.2-4.1-17.5L246.2 300.2c-5.1 5.1-13.3 5.1-18.4 0z"}},{"tag":"path","attr":{"d":"M459.5 68.5C457 66 453 64 449 64h-97c-7.2-.1-13.1 5.7-13.1 12.9-.1 7.2 5.7 13.1 12.9 13.1l67.3.5-57.6 57.6c8 3.9 14.5 10.4 18.4 18.4l57.6-57.6.5 67.3c.1 7.2 5.9 13 13.1 12.9 7.2-.1 13-5.9 12.9-13.1V78c0-3.5-2-7-4.5-9.5z"}}]})(props);
7990
+ };
7991
+ IoIosOpen.displayName = "IoIosOpen";
7988
7992
  var IoMdArrowDropdown = function (props) {
7989
7993
  return GenIcon({"tag":"svg","attr":{"viewBox":"0 0 512 512"},"child":[{"tag":"path","attr":{"d":"M128 192l128 128 128-128z"}}]})(props);
7990
7994
  };
@@ -15579,28 +15583,13 @@ var RelatedTopicsDropdown = function RelatedTopicsDropdown(_ref) {
15579
15583
  };
15580
15584
 
15581
15585
  // THIS FILE IS AUTO GENERATED
15582
- var FaWindowClose = function (props) {
15583
- return GenIcon({"tag":"svg","attr":{"viewBox":"0 0 512 512"},"child":[{"tag":"path","attr":{"d":"M464 32H48C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h416c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48zm-83.6 290.5c4.8 4.8 4.8 12.6 0 17.4l-40.5 40.5c-4.8 4.8-12.6 4.8-17.4 0L256 313.3l-66.5 67.1c-4.8 4.8-12.6 4.8-17.4 0l-40.5-40.5c-4.8-4.8-4.8-12.6 0-17.4l67.1-66.5-67.1-66.5c-4.8-4.8-4.8-12.6 0-17.4l40.5-40.5c4.8-4.8 12.6-4.8 17.4 0l66.5 67.1 66.5-67.1c4.8-4.8 12.6-4.8 17.4 0l40.5 40.5c4.8 4.8 4.8 12.6 0 17.4L313.3 256l67.1 66.5z"}}]})(props);
15586
+ var FaRegWindowClose = function (props) {
15587
+ return GenIcon({"tag":"svg","attr":{"viewBox":"0 0 512 512"},"child":[{"tag":"path","attr":{"d":"M464 32H48C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h416c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48zm0 394c0 3.3-2.7 6-6 6H54c-3.3 0-6-2.7-6-6V86c0-3.3 2.7-6 6-6h404c3.3 0 6 2.7 6 6v340zM356.5 194.6L295.1 256l61.4 61.4c4.6 4.6 4.6 12.1 0 16.8l-22.3 22.3c-4.6 4.6-12.1 4.6-16.8 0L256 295.1l-61.4 61.4c-4.6 4.6-12.1 4.6-16.8 0l-22.3-22.3c-4.6-4.6-4.6-12.1 0-16.8l61.4-61.4-61.4-61.4c-4.6-4.6-4.6-12.1 0-16.8l22.3-22.3c4.6-4.6 12.1-4.6 16.8 0l61.4 61.4 61.4-61.4c4.6-4.6 12.1-4.6 16.8 0l22.3 22.3c4.7 4.6 4.7 12.1 0 16.8z"}}]})(props);
15584
15588
  };
15585
- FaWindowClose.displayName = "FaWindowClose";
15589
+ FaRegWindowClose.displayName = "FaRegWindowClose";
15586
15590
 
15587
15591
  /*****UStream Component*****/
15588
- /*
15589
-
15590
- Width and Height(percent or px) prop passed is the floating window, when closed
15591
- it will take 100% of its parent element
15592
-
15593
- You can pass in another SRC for Ustream if needed
15594
-
15595
- If 'close' is passed as prop, the floating window will be removed
15596
- from DOM once close button is hit
15597
-
15598
- Example:
15599
- import { Ustream } from '@mjhls/mjh-framework';
15600
- <Ustream width={'200px'} height={'120px'} close />
15601
-
15602
- */
15603
- /************************* */
15592
+
15604
15593
  var Ustream = function Ustream(_ref) {
15605
15594
  var _ref$width = _ref.width,
15606
15595
  width = _ref$width === undefined ? '300px' : _ref$width,
@@ -15608,6 +15597,8 @@ var Ustream = function Ustream(_ref) {
15608
15597
  height = _ref$height === undefined ? '168px' : _ref$height,
15609
15598
  _ref$close = _ref.close,
15610
15599
  close = _ref$close === undefined ? false : _ref$close,
15600
+ _ref$right = _ref.right,
15601
+ right = _ref$right === undefined ? false : _ref$right,
15611
15602
  _ref$src = _ref.src,
15612
15603
  src = _ref$src === undefined ? 'https://video.ibm.com/embed/23627444?volume=0&autoplay=true' : _ref$src;
15613
15604
 
@@ -15625,11 +15616,15 @@ var Ustream = function Ustream(_ref) {
15625
15616
 
15626
15617
  useEffect(function () {
15627
15618
  try {
15628
- document.querySelector('.ustream-close').addEventListener('click', function (e) {
15629
- var container = document.getElementById('ustream-container');
15630
- if (close) {
15619
+ var container = document.getElementById('ustream-container');
15620
+
15621
+ if (close) {
15622
+ var closeBtn = document.querySelector('.ustream-close');
15623
+ closeBtn.addEventListener('click', function () {
15631
15624
  container.remove();
15632
- } else {
15625
+ });
15626
+ } else {
15627
+ document.querySelector('.ustream-minimize').addEventListener('click', function (e) {
15633
15628
  container.style.position = 'static';
15634
15629
  container.style.padding = '0 1rem';
15635
15630
  container.classList.add('closed');
@@ -15639,9 +15634,14 @@ var Ustream = function Ustream(_ref) {
15639
15634
  console.log(newHeight);
15640
15635
  console.log(ustreamContainer);
15641
15636
  setHeight(newHeight);
15642
- e.target.remove();
15643
- }
15644
- });
15637
+ document.querySelector('.ustream-minimize').remove();
15638
+ var closeBtn = document.querySelector('.ustream-close');
15639
+ closeBtn.style.display = 'block';
15640
+ closeBtn.addEventListener('click', function () {
15641
+ container.remove();
15642
+ });
15643
+ });
15644
+ }
15645
15645
  } catch (err) {}
15646
15646
  }, []);
15647
15647
 
@@ -15651,10 +15651,23 @@ var Ustream = function Ustream(_ref) {
15651
15651
  React__default.createElement(
15652
15652
  'div',
15653
15653
  { style: { position: 'relative' } },
15654
- React__default.createElement(
15654
+ close ? React__default.createElement(
15655
15655
  'div',
15656
15656
  { className: 'ustream-close' },
15657
- React__default.createElement(FaWindowClose, { style: { fontSize: '1.3rem' } })
15657
+ React__default.createElement(FaRegWindowClose, { style: { color: '#fff', fontSize: '1.3rem' } })
15658
+ ) : React__default.createElement(
15659
+ React__default.Fragment,
15660
+ null,
15661
+ React__default.createElement(
15662
+ 'div',
15663
+ { className: 'ustream-minimize' },
15664
+ React__default.createElement(IoIosOpen, { style: right ? { color: '#fff', fontSize: '1.3rem', transform: 'rotateZ(-90deg)' } : { color: '#fff', fontSize: '1.3rem' } })
15665
+ ),
15666
+ React__default.createElement(
15667
+ 'div',
15668
+ { className: 'ustream-close' },
15669
+ React__default.createElement(FaRegWindowClose, { style: { color: '#fff', fontSize: '1rem' } })
15670
+ )
15658
15671
  ),
15659
15672
  React__default.createElement('iframe', {
15660
15673
  id: 'ustream-iframe',
@@ -15662,13 +15675,12 @@ var Ustream = function Ustream(_ref) {
15662
15675
  webkitallowfullscreen: true,
15663
15676
  allowFullScreen: true,
15664
15677
  frameBorder: 'no',
15665
-
15666
15678
  style: { maxWidth: '100%', height: currentHeight, width: currentWidth } })
15667
15679
  ),
15668
15680
  React__default.createElement(
15669
15681
  'style',
15670
15682
  { jsx: 'true' },
15671
- '\n #ustream-container {\n position: fixed;\n bottom: 0;\n right: 1rem;\n z-index: 999;\n max-width: 100%;\n }\n .ustream-close {\n position: absolute;\n color: white;\n right: 0.5rem;\n top: 0.25rem;\n cursor: pointer;\n font-weight: bold;\n }\n @media screen and (max-width: 768px) {\n #ustream-container:not(.closed) {\n width: 231px !important;\n height: 130px !important;\n }\n #ustream-container:not(.closed) iframe {\n height: 130px !important;\n }\n }\n '
15683
+ '\n #ustream-container {\n position: fixed;\n bottom: 0;\n ' + (right ? 'right: 1rem;' : 'left: 1.5rem;') + '\n z-index: 999;\n max-width: 100%;\n }\n .ustream-minimize,\n .ustream-close {\n position: absolute;\n color: white;\n right: 0.5rem;\n top: 0.25rem;\n cursor: pointer;\n font-weight: bold;\n }\n .ustream-close {\n ' + (close ? 'display: block; right: .75rem; top: .5rem; ' : 'display: none; right: .5rem; top: .75rem;') + '\n }\n @media screen and (max-width: 768px) {\n #ustream-container:not(.closed) {\n width: 231px !important;\n height: 130px !important;\n }\n #ustream-container:not(.closed) iframe {\n height: 130px !important;\n }\n }\n '
15672
15684
  )
15673
15685
  );
15674
15686
  };