@bigbinary/neeto-molecules 1.0.46 → 1.0.47
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 +11 -6
- package/dist/Sidebar.cjs.js.map +1 -1
- package/dist/Sidebar.js +12 -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, 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,18 @@ 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 filterByPermission = curry(function (_ref2) {
|
|
32080
|
+
var permission = _ref2.permission;
|
|
32081
|
+
return permission ? globalProps$1.permissions.includes(permission) : true;
|
|
32082
|
+
});
|
|
32078
32083
|
return /*#__PURE__*/React.createElement("div", {
|
|
32079
32084
|
className: "neeto-molecules-sidebar__links"
|
|
32080
|
-
}, navLinks.map(function (
|
|
32081
|
-
var label =
|
|
32082
|
-
to =
|
|
32083
|
-
icon =
|
|
32084
|
-
description =
|
|
32085
|
-
otherProps = _objectWithoutProperties(
|
|
32085
|
+
}, navLinks.filter(filterByPermission).map(function (_ref3, mainIndex) {
|
|
32086
|
+
var label = _ref3.label,
|
|
32087
|
+
to = _ref3.to,
|
|
32088
|
+
icon = _ref3.icon,
|
|
32089
|
+
description = _ref3.description,
|
|
32090
|
+
otherProps = _objectWithoutProperties(_ref3, _excluded);
|
|
32086
32091
|
var IconSVG = icon;
|
|
32087
32092
|
var url = new URL(to, window.location.href);
|
|
32088
32093
|
var isActive = function isActive() {
|