@bigbinary/neeto-molecules 3.16.94 → 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.
@@ -608,7 +608,8 @@ var ShareBlock = function ShareBlock(_ref) {
608
608
  disableQRDownload = _ref.disableQRDownload,
609
609
  socialMediaProps = _ref.socialMediaProps,
610
610
  qrCodeProps = _ref.qrCodeProps,
611
- entity = _ref.entity;
611
+ entity = _ref.entity,
612
+ urls = _ref.urls;
612
613
  var location = reactRouterDom.useLocation();
613
614
  var history = reactRouterDom.useHistory();
614
615
  var _useTranslation = reactI18next.useTranslation(),
@@ -619,7 +620,9 @@ var ShareBlock = function ShareBlock(_ref) {
619
620
  };
620
621
  var hasMoreOptions = neetoCist.isPresent(moreOptions);
621
622
  return /*#__PURE__*/jsxRuntime.jsxs("div", {
622
- 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",
623
+ className: classnames("grid grid-cols-1 gap-4 sm:grid-cols-2 md:grid-cols-3", {
624
+ "neeto-ui-border-gray-200 mt-8 border-t pt-8": neetoCist.isNotEmpty(urls)
625
+ }),
623
626
  children: [hasMoreOptions && moreOptions.filter(function (_ref2) {
624
627
  var permissions = _ref2.permissions;
625
628
  return neetoCist.isNotPresent(permissions) || globalProps.permissions.some(ramda.includes(ramda.__, permissions));
@@ -665,6 +668,7 @@ var ShareBlock = function ShareBlock(_ref) {
665
668
  };
666
669
 
667
670
  var MainPanel = function MainPanel(_ref) {
671
+ var _urls$;
668
672
  var title = _ref.title,
669
673
  description = _ref.description,
670
674
  qrCodeProps = _ref.qrCodeProps,
@@ -720,11 +724,11 @@ var MainPanel = function MainPanel(_ref) {
720
724
  }), /*#__PURE__*/jsxRuntime.jsxs("div", {
721
725
  className: "neeto-ui-rounded-lg neeto-ui-bg-white p-6 sm:p-8",
722
726
  "data-testid": "share-via-link",
723
- children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
727
+ children: [neetoCist.isNotEmpty(urls) && /*#__PURE__*/jsxRuntime.jsxs("div", {
724
728
  className: "space-y-1",
725
729
  children: [/*#__PURE__*/jsxRuntime.jsx("div", {
726
730
  className: "inline-flex max-w-full flex-col space-y-4",
727
- children: urls.map(function (urlOption) {
731
+ children: urls === null || urls === void 0 ? void 0 : urls.map(function (urlOption) {
728
732
  return /*#__PURE__*/React.createElement(Link, {
729
733
  enabledOptions: enabledOptions,
730
734
  entityName: entityName,
@@ -747,7 +751,8 @@ var MainPanel = function MainPanel(_ref) {
747
751
  moreOptions: moreOptions,
748
752
  qrCodeProps: qrCodeProps,
749
753
  socialMediaProps: socialMediaProps,
750
- url: urls[0].url
754
+ urls: urls,
755
+ url: (_urls$ = urls[0]) === null || _urls$ === void 0 ? void 0 : _urls$.url
751
756
  })]
752
757
  }), customBottomContent]
753
758
  })
@@ -1810,21 +1815,23 @@ var ShareViaLink = function ShareViaLink(_ref) {
1810
1815
  exact: true,
1811
1816
  path: "".concat(sharePath, "/qrcode"),
1812
1817
  render: function render() {
1818
+ var _urls$;
1813
1819
  return /*#__PURE__*/jsxRuntime.jsx(QRCode, {
1814
1820
  entity: entity,
1815
1821
  qrCodeProps: qrCodeProps,
1816
1822
  shareUrl: shareUrl,
1817
- url: urls[0].url
1823
+ url: (_urls$ = urls[0]) === null || _urls$ === void 0 ? void 0 : _urls$.url
1818
1824
  });
1819
1825
  }
1820
1826
  }), /*#__PURE__*/jsxRuntime.jsx(reactRouterDom.Route, {
1821
1827
  exact: true,
1822
1828
  path: "".concat(sharePath, "/social-media"),
1823
1829
  render: function render() {
1830
+ var _urls$2;
1824
1831
  return /*#__PURE__*/jsxRuntime.jsx(SocialMedia, {
1825
1832
  shareUrl: shareUrl,
1826
1833
  socialMediaProps: socialMediaProps,
1827
- url: urls[0].url
1834
+ url: (_urls$2 = urls[0]) === null || _urls$2 === void 0 ? void 0 : _urls$2.url
1828
1835
  });
1829
1836
  }
1830
1837
  }), neetoCist.isPresent(moreOptions) && moreOptions.map(function (_ref2) {