@bigbinary/neeto-molecules 3.16.93 → 3.16.95

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.
@@ -1,4 +1,4 @@
1
- import { isPresent, noop, isNotPresent, slugify } from '@bigbinary/neeto-cist';
1
+ import { isPresent, noop, isNotEmpty, isNotPresent, slugify } from '@bigbinary/neeto-cist';
2
2
  import PrivateRoute from '@bigbinary/neeto-commons-frontend/react-utils/PrivateRoute';
3
3
  import { Link as Link$1, useLocation, useHistory, useRouteMatch, Switch, Route } from 'react-router-dom';
4
4
  import ErrorPage from './ErrorPage.js';
@@ -565,13 +565,15 @@ var Card = function Card(_ref) {
565
565
  children: [Icon && /*#__PURE__*/jsx(Icon, {
566
566
  className: "neeto-ui-text-gray-500 flex-shrink-0",
567
567
  size: 24
568
- }), /*#__PURE__*/jsx(Typography, {
569
- className: "min-w-0 flex-grow break-words",
568
+ }), /*#__PURE__*/jsxs(Typography, {
569
+ className: "neeto-molecules-share-landing__card-title min-w-0 flex-grow break-words",
570
570
  style: "h4",
571
- children: title
572
- }), helpPopoverProps && /*#__PURE__*/jsx(HelpPopover, _objectSpread({}, helpPopoverProps))]
571
+ children: [title, helpPopoverProps && /*#__PURE__*/jsxs(Fragment, {
572
+ children: [" ", /*#__PURE__*/jsx(HelpPopover, _objectSpread({}, helpPopoverProps))]
573
+ })]
574
+ })]
573
575
  }), description && /*#__PURE__*/jsx(Typography, {
574
- className: "break-words",
576
+ className: "neeto-molecules-share-landing__card-desc break-words",
575
577
  lineHeight: "normal",
576
578
  style: "body2",
577
579
  children: description
@@ -585,7 +587,8 @@ var ShareBlock = function ShareBlock(_ref) {
585
587
  disableQRDownload = _ref.disableQRDownload,
586
588
  socialMediaProps = _ref.socialMediaProps,
587
589
  qrCodeProps = _ref.qrCodeProps,
588
- entity = _ref.entity;
590
+ entity = _ref.entity,
591
+ urls = _ref.urls;
589
592
  var location = useLocation();
590
593
  var history = useHistory();
591
594
  var _useTranslation = useTranslation(),
@@ -596,7 +599,9 @@ var ShareBlock = function ShareBlock(_ref) {
596
599
  };
597
600
  var hasMoreOptions = isPresent(moreOptions);
598
601
  return /*#__PURE__*/jsxs("div", {
599
- className: "neeto-ui-border-gray-200 mt-8 grid grid-cols-1 gap-4 border-t pt-8 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4",
602
+ className: classnames("grid grid-cols-1 gap-4 sm:grid-cols-2 md:grid-cols-3", {
603
+ "neeto-ui-border-gray-200 mt-8 border-t pt-8": isNotEmpty(urls)
604
+ }),
600
605
  children: [hasMoreOptions && moreOptions.filter(function (_ref2) {
601
606
  var permissions = _ref2.permissions;
602
607
  return isNotPresent(permissions) || globalProps.permissions.some(includes(__, permissions));
@@ -642,6 +647,7 @@ var ShareBlock = function ShareBlock(_ref) {
642
647
  };
643
648
 
644
649
  var MainPanel = function MainPanel(_ref) {
650
+ var _urls$;
645
651
  var title = _ref.title,
646
652
  description = _ref.description,
647
653
  qrCodeProps = _ref.qrCodeProps,
@@ -697,11 +703,11 @@ var MainPanel = function MainPanel(_ref) {
697
703
  }), /*#__PURE__*/jsxs("div", {
698
704
  className: "neeto-ui-rounded-lg neeto-ui-bg-white p-6 sm:p-8",
699
705
  "data-testid": "share-via-link",
700
- children: [/*#__PURE__*/jsxs("div", {
706
+ children: [isNotEmpty(urls) && /*#__PURE__*/jsxs("div", {
701
707
  className: "space-y-1",
702
708
  children: [/*#__PURE__*/jsx("div", {
703
709
  className: "inline-flex max-w-full flex-col space-y-4",
704
- children: urls.map(function (urlOption) {
710
+ children: urls === null || urls === void 0 ? void 0 : urls.map(function (urlOption) {
705
711
  return /*#__PURE__*/createElement(Link, {
706
712
  enabledOptions: enabledOptions,
707
713
  entityName: entityName,
@@ -724,7 +730,8 @@ var MainPanel = function MainPanel(_ref) {
724
730
  moreOptions: moreOptions,
725
731
  qrCodeProps: qrCodeProps,
726
732
  socialMediaProps: socialMediaProps,
727
- url: urls[0].url
733
+ urls: urls,
734
+ url: (_urls$ = urls[0]) === null || _urls$ === void 0 ? void 0 : _urls$.url
728
735
  })]
729
736
  }), customBottomContent]
730
737
  })
@@ -1664,7 +1671,7 @@ var QRCode = function QRCode(_ref) {
1664
1671
  });
1665
1672
  };
1666
1673
 
1667
- var css = ".neeto-molecules-share-landing__card{outline:1px solid rgb(var(--neeto-ui-white))!important;transition:all .3s!important}.neeto-molecules-share-landing__card:hover{border-color:rgb(var(--neeto-ui-primary-500))!important;outline:1px solid rgb(var(--neeto-ui-primary-500))!important}";
1674
+ var css = ".neeto-molecules-share-landing__card{outline:1px solid rgb(var(--neeto-ui-white))!important;transition:all .3s!important}.neeto-molecules-share-landing__card:hover{border-color:rgb(var(--neeto-ui-primary-500))!important;outline:1px solid rgb(var(--neeto-ui-primary-500))!important}.neeto-molecules-share-landing__card-title .neeto-molecule-help-popover-trigger{display:inline-block!important;vertical-align:middle}";
1668
1675
  n(css,{});
1669
1676
 
1670
1677
  var SocialMedia = function SocialMedia(_ref) {
@@ -1787,21 +1794,23 @@ var ShareViaLink = function ShareViaLink(_ref) {
1787
1794
  exact: true,
1788
1795
  path: "".concat(sharePath, "/qrcode"),
1789
1796
  render: function render() {
1797
+ var _urls$;
1790
1798
  return /*#__PURE__*/jsx(QRCode, {
1791
1799
  entity: entity,
1792
1800
  qrCodeProps: qrCodeProps,
1793
1801
  shareUrl: shareUrl,
1794
- url: urls[0].url
1802
+ url: (_urls$ = urls[0]) === null || _urls$ === void 0 ? void 0 : _urls$.url
1795
1803
  });
1796
1804
  }
1797
1805
  }), /*#__PURE__*/jsx(Route, {
1798
1806
  exact: true,
1799
1807
  path: "".concat(sharePath, "/social-media"),
1800
1808
  render: function render() {
1809
+ var _urls$2;
1801
1810
  return /*#__PURE__*/jsx(SocialMedia, {
1802
1811
  shareUrl: shareUrl,
1803
1812
  socialMediaProps: socialMediaProps,
1804
- url: urls[0].url
1813
+ url: (_urls$2 = urls[0]) === null || _urls$2 === void 0 ? void 0 : _urls$2.url
1805
1814
  });
1806
1815
  }
1807
1816
  }), isPresent(moreOptions) && moreOptions.map(function (_ref2) {