@bigbinary/neeto-molecules 1.0.46 → 1.0.48
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/IntegrationCard.cjs.js.map +1 -1
- package/dist/IntegrationCard.js.map +1 -1
- package/dist/IntegrationWalkthroughModal.cjs.js.map +1 -1
- package/dist/IntegrationWalkthroughModal.js.map +1 -1
- package/dist/IpRestriction.cjs.js +39 -44
- package/dist/IpRestriction.cjs.js.map +1 -1
- package/dist/IpRestriction.js +39 -44
- package/dist/IpRestriction.js.map +1 -1
- package/dist/PublishBlock.cjs.js.map +1 -1
- package/dist/PublishBlock.js.map +1 -1
- package/dist/ShareViaEmail.cjs.js +6 -3
- package/dist/ShareViaEmail.cjs.js.map +1 -1
- package/dist/ShareViaEmail.js +6 -3
- package/dist/ShareViaEmail.js.map +1 -1
- package/dist/Sidebar.cjs.js +14 -6
- package/dist/Sidebar.cjs.js.map +1 -1
- package/dist/Sidebar.js +15 -7
- package/dist/Sidebar.js.map +1 -1
- package/package.json +9 -9
- package/types/ShareViaEmail.d.ts +1 -0
package/dist/Sidebar.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useRef, useCallback, useEffect, Children, isValidElement, cloneElement, forwardRef, useState } from 'react';
|
|
2
|
-
import { toLower, mergeDeepLeft, not } from 'ramda';
|
|
2
|
+
import { toLower, mergeDeepLeft, curry, is, includes, __, not } from 'ramda';
|
|
3
3
|
import { Link, useLocation, NavLink } from 'react-router-dom';
|
|
4
4
|
import { NeetoIcon, Close, Search, AppSwitcher as AppSwitcher$1, ChatEmpty, Book, Gift, Keyboard, User, Settings, LeftArrow, Help } from '@bigbinary/neeto-icons';
|
|
5
5
|
import { Typography, Button, Input, Tooltip, Avatar } from '@bigbinary/neetoui';
|
|
@@ -11,6 +11,7 @@ import { resetAuthTokens } from '@bigbinary/neeto-commons-frontend/utils';
|
|
|
11
11
|
import KeyboardShortcuts from '@bigbinary/neeto-molecules/KeyboardShortcuts';
|
|
12
12
|
import * as ProductLogos from '@bigbinary/neeto-icons/logos';
|
|
13
13
|
import { Neeto } from '@bigbinary/neeto-icons/logos';
|
|
14
|
+
import { globalProps as globalProps$1 } from '@bigbinary/neeto-commons-frontend/initializers';
|
|
14
15
|
|
|
15
16
|
function _arrayWithHoles(arr) {
|
|
16
17
|
if (Array.isArray(arr)) return arr;
|
|
@@ -32075,14 +32076,21 @@ var _excluded = ["label", "to", "icon", "description"];
|
|
|
32075
32076
|
var Links = function Links(_ref) {
|
|
32076
32077
|
var navLinks = _ref.navLinks;
|
|
32077
32078
|
var location = useLocation();
|
|
32079
|
+
var filterByPermissions = curry(function (_ref2) {
|
|
32080
|
+
var permissions = _ref2.permissions;
|
|
32081
|
+
if (permissions) {
|
|
32082
|
+
return is(Array, permissions) ? permissions.some(includes(__, globalProps$1.permissions)) : globalProps$1.permissions.includes(permissions);
|
|
32083
|
+
}
|
|
32084
|
+
return true;
|
|
32085
|
+
});
|
|
32078
32086
|
return /*#__PURE__*/React.createElement("div", {
|
|
32079
32087
|
className: "neeto-molecules-sidebar__links"
|
|
32080
|
-
}, navLinks.map(function (
|
|
32081
|
-
var label =
|
|
32082
|
-
to =
|
|
32083
|
-
icon =
|
|
32084
|
-
description =
|
|
32085
|
-
otherProps = _objectWithoutProperties(
|
|
32088
|
+
}, navLinks.filter(filterByPermissions).map(function (_ref3, mainIndex) {
|
|
32089
|
+
var label = _ref3.label,
|
|
32090
|
+
to = _ref3.to,
|
|
32091
|
+
icon = _ref3.icon,
|
|
32092
|
+
description = _ref3.description,
|
|
32093
|
+
otherProps = _objectWithoutProperties(_ref3, _excluded);
|
|
32086
32094
|
var IconSVG = icon;
|
|
32087
32095
|
var url = new URL(to, window.location.href);
|
|
32088
32096
|
var isActive = function isActive() {
|