@bigbinary/neeto-molecules 1.0.89-beta → 1.0.90-beta
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/CustomDomain.cjs.js +8 -10
- package/dist/CustomDomain.cjs.js.map +1 -1
- package/dist/CustomDomain.js +10 -13
- package/dist/CustomDomain.js.map +1 -1
- package/dist/CustomDomainDashboard.cjs.js +8 -10
- package/dist/CustomDomainDashboard.cjs.js.map +1 -1
- package/dist/CustomDomainDashboard.js +9 -12
- package/dist/CustomDomainDashboard.js.map +1 -1
- package/dist/IconPicker.cjs.js +1 -0
- package/dist/IconPicker.cjs.js.map +1 -1
- package/dist/IconPicker.js +1 -0
- package/dist/IconPicker.js.map +1 -1
- package/dist/IntegrationCard.cjs.js +223 -38
- package/dist/IntegrationCard.cjs.js.map +1 -1
- package/dist/IntegrationCard.js +227 -42
- package/dist/IntegrationCard.js.map +1 -1
- package/dist/IntegrationDisconnectAlert.cjs.js +22 -14
- package/dist/IntegrationDisconnectAlert.cjs.js.map +1 -1
- package/dist/IntegrationDisconnectAlert.js +19 -14
- package/dist/IntegrationDisconnectAlert.js.map +1 -1
- package/dist/IntegrationWalkthroughModal.cjs.js +17 -9
- package/dist/IntegrationWalkthroughModal.cjs.js.map +1 -1
- package/dist/IntegrationWalkthroughModal.js +14 -9
- package/dist/IntegrationWalkthroughModal.js.map +1 -1
- package/dist/IpRestriction.cjs.js +51 -50
- package/dist/IpRestriction.cjs.js.map +1 -1
- package/dist/IpRestriction.js +52 -51
- package/dist/IpRestriction.js.map +1 -1
- package/dist/KeyboardShortcuts.cjs.js +2 -0
- package/dist/KeyboardShortcuts.cjs.js.map +1 -1
- package/dist/KeyboardShortcuts.js +2 -0
- package/dist/KeyboardShortcuts.js.map +1 -1
- package/dist/NeetoWidget.cjs.js +5 -20
- package/dist/NeetoWidget.cjs.js.map +1 -1
- package/dist/NeetoWidget.js +5 -21
- package/dist/NeetoWidget.js.map +1 -1
- package/dist/Schedule.cjs.js +6 -11
- package/dist/Schedule.cjs.js.map +1 -1
- package/dist/Schedule.js +7 -12
- package/dist/Schedule.js.map +1 -1
- package/dist/ShareViaLink.cjs.js +7 -8
- package/dist/ShareViaLink.cjs.js.map +1 -1
- package/dist/ShareViaLink.js +7 -9
- package/dist/ShareViaLink.js.map +1 -1
- package/dist/Sidebar.cjs.js +29 -21
- package/dist/Sidebar.cjs.js.map +1 -1
- package/dist/Sidebar.js +30 -22
- package/dist/Sidebar.js.map +1 -1
- package/package.json +1 -1
- package/src/translations/en.json +11 -2
- package/types/IntegrationCard.d.ts +14 -5
package/dist/Sidebar.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React, { useRef, useCallback, useEffect, Children, isValidElement, cloneElement, forwardRef, useState } from 'react';
|
|
2
2
|
import { globalProps as globalProps$1 } from '@bigbinary/neeto-commons-frontend/initializers';
|
|
3
|
+
import { useFetchNeetoApps, useLocalStorage } from '@bigbinary/neeto-commons-frontend/react-utils';
|
|
3
4
|
import { Typography, Button, Input, Spinner, Avatar, Tooltip } from '@bigbinary/neetoui';
|
|
4
|
-
import { toLower,
|
|
5
|
+
import { toLower, all, mergeDeepLeft, curry, is, includes, __, not } from 'ramda';
|
|
5
6
|
import { useTranslation } from 'react-i18next';
|
|
6
7
|
import { Link, useLocation, NavLink } from 'react-router-dom';
|
|
7
|
-
import { useFetchNeetoApps } from '@bigbinary/neeto-commons-frontend/react-utils';
|
|
8
8
|
import { NeetoIcon, Close, Search, AppSwitcher as AppSwitcher$1, ChatEmpty, Book, Gift, Keyboard, User, Settings, LeftArrow, Help, Down } from '@bigbinary/neeto-icons';
|
|
9
9
|
import { capitalize, truncate, findBy, isNotPresent } from '@bigbinary/neeto-commons-frontend/pure';
|
|
10
10
|
import * as AppIcons from '@bigbinary/neeto-icons/app-icons';
|
|
@@ -31486,7 +31486,7 @@ SwitchTransition.defaultProps = {
|
|
|
31486
31486
|
|
|
31487
31487
|
var e=[],t=[];function n(n,r){if(n&&"undefined"!=typeof document){var a,s=!0===r.prepend?"prepend":"append",d=!0===r.singleTag,i="string"==typeof r.container?document.querySelector(r.container):document.getElementsByTagName("head")[0];if(d){var u=e.indexOf(i);-1===u&&(u=e.push(i)-1,t[u]={}),a=t[u]&&t[u][s]?t[u][s]:t[u][s]=c();}else a=c();65279===n.charCodeAt(0)&&(n=n.substring(1)),a.styleSheet?a.styleSheet.cssText+=n:a.appendChild(document.createTextNode(n));}function c(){var e=document.createElement("style");if(e.setAttribute("type","text/css"),r.attributes)for(var t=Object.keys(r.attributes),n=0;n<t.length;n++)e.setAttribute(t[n],r.attributes[t[n]]);var a="prepend"===s?"afterbegin":"beforeend";return i.insertAdjacentElement(a,e),e}}
|
|
31488
31488
|
|
|
31489
|
-
var css$1 = ".neeto-molecules-app-switcher__backdrop{align-items:center;background-color:rgba(27,31,35,.867);flex-direction:row;left:240px;overflow:hidden;position:fixed;top:0;width:100vw;z-index:99996}.neeto-molecules-app-switcher__backdrop,.neeto-molecules-app-switcher__wrapper{-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);display:flex;height:100vh;justify-content:flex-start;transition:all .3s}.neeto-molecules-app-switcher__wrapper{align-items:flex-start;animation:nuifadeIn .3s ease-in;background-color:rgb(var(--neeto-ui-white));flex-direction:column;max-width:100%;overflow-y:auto;padding:
|
|
31489
|
+
var css$1 = ".neeto-molecules-app-switcher__backdrop{align-items:center;background-color:rgba(27,31,35,.867);flex-direction:row;left:240px;overflow:hidden;position:fixed;top:0;width:100vw;z-index:99996}.neeto-molecules-app-switcher__backdrop,.neeto-molecules-app-switcher__wrapper{-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);display:flex;height:100vh;justify-content:flex-start;transition:all .3s}.neeto-molecules-app-switcher__wrapper{align-items:flex-start;animation:nuifadeIn .3s ease-in;background-color:rgb(var(--neeto-ui-white));flex-direction:column;max-width:100%;overflow-y:auto;padding:40px;position:relative;width:calc(100% - 240px)}.neeto-molecules-app-switcher__grid{grid-gap:24px;display:grid;gap:24px;grid-template-columns:repeat(auto-fill,minmax(288px,1fr))}.neeto-molecules-app-switcher__header{align-items:center;display:flex;gap:16px;justify-content:space-between;margin-bottom:32px;position:relative;width:100%}.neeto-molecules-app-switcher__header h1{font-size:40px;line-height:var(--neeto-ui-leading-tight);margin-top:-16px}.neeto-molecules-app-switcher__close-btn{position:absolute;right:12px;top:12px}.neeto-molecules-app-switcher__search-wrapper{width:316px}.neeto-molecules-app-switcher__body{display:flex;flex-direction:column;font-size:var(--neeto-ui-text-sm);gap:12px;margin-bottom:24px;width:100%}.neeto-molecules-app-switcher-link{align-items:center;background-color:rgb(var(--neeto-ui-gray-100));border-color:rgb(var(--neeto-ui-gray-100));border-radius:var(--neeto-ui-rounded-lg);border-style:solid;border-width:2px;cursor:pointer;display:flex;gap:12px;max-width:100%;padding:12px 16px;text-decoration:none;transition:background-color .3s ease-in-out;width:100%}.neeto-molecules-app-switcher-link:focus,.neeto-molecules-app-switcher-link:focus-visible{outline:none}.neeto-molecules-app-switcher-link:focus-visible{background-color:rgb(var(--neeto-ui-gray-200))}.neeto-molecules-app-switcher-link:not(.neeto-molecules-app-switcher-link--active):hover{background-color:rgb(var(--neeto-ui-gray-200))}.neeto-molecules-app-switcher-link--active{background:rgb(var(--neeto-ui-primary-100));border-color:rgb(var(--neeto-ui-primary-600))}.neeto-molecules-app-switcher-link__icon-holder{align-items:center;border-radius:var(--neeto-ui-rounded-lg);display:flex;flex-shrink:0;height:42px;justify-content:center;width:42px}.neeto-molecules-app-switcher-link__content{flex-grow:1}.neeto-molecules-app-switcher-link__content span{display:block}.neeto-molecules-app-switcher-enter.neeto-molecules-app-switcher__backdrop{-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);opacity:0}.neeto-molecules-app-switcher-enter-active.neeto-molecules-app-switcher__backdrop,.neeto-molecules-app-switcher-enter-done.neeto-molecules-app-switcher__backdrop,.neeto-molecules-app-switcher-exit.neeto-molecules-app-switcher__backdrop{-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);opacity:1}.neeto-molecules-app-switcher-exit-active.neeto-molecules-app-switcher__backdrop{-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);opacity:0}";
|
|
31490
31490
|
n(css$1,{});
|
|
31491
31491
|
|
|
31492
31492
|
function _extends() {
|
|
@@ -31614,7 +31614,7 @@ var Body = function Body(_ref) {
|
|
|
31614
31614
|
className: "neeto-molecules-app-switcher__header",
|
|
31615
31615
|
"data-cy": "app-switcher-body-wrapper"
|
|
31616
31616
|
}, /*#__PURE__*/React.createElement(Typography, {
|
|
31617
|
-
style: "
|
|
31617
|
+
style: "h1"
|
|
31618
31618
|
}, t("neetoMolecules.appSwitcher.chooseNeetoProduct")), /*#__PURE__*/React.createElement("div", {
|
|
31619
31619
|
className: "neeto-molecules-app-switcher__search-wrapper"
|
|
31620
31620
|
}, /*#__PURE__*/React.createElement(Input, {
|
|
@@ -31799,6 +31799,24 @@ var DEFAULT_HELP_LINK_PROPS = {
|
|
|
31799
31799
|
}
|
|
31800
31800
|
};
|
|
31801
31801
|
|
|
31802
|
+
var isSubRouteActive = function isSubRouteActive(subRoute, location) {
|
|
31803
|
+
var currentBrowserUrl = new URL(location.pathname + location.search, window.location.origin);
|
|
31804
|
+
var targetUrl = new URL(subRoute, window.location.origin);
|
|
31805
|
+
if (!currentBrowserUrl.pathname.startsWith(targetUrl.pathname)) {
|
|
31806
|
+
return false;
|
|
31807
|
+
}
|
|
31808
|
+
var targetSearchParams = targetUrl.searchParams;
|
|
31809
|
+
var targetSearchKeys = Array.from(targetSearchParams.keys());
|
|
31810
|
+
return all(function (key) {
|
|
31811
|
+
return currentBrowserUrl.searchParams.get(key) === targetSearchParams.get(key);
|
|
31812
|
+
}, targetSearchKeys);
|
|
31813
|
+
};
|
|
31814
|
+
var getSidebarStateLocalStorageKey = function getSidebarStateLocalStorageKey() {
|
|
31815
|
+
var _globalProps$user, _globalProps$user2;
|
|
31816
|
+
var user = ((_globalProps$user = globalProps.user) === null || _globalProps$user === void 0 ? void 0 : _globalProps$user.email) || ((_globalProps$user2 = globalProps.user) === null || _globalProps$user2 === void 0 ? void 0 : _globalProps$user2.phoneNumber);
|
|
31817
|
+
return "sidebarState-".concat(user);
|
|
31818
|
+
};
|
|
31819
|
+
|
|
31802
31820
|
var getProfileInfo = function getProfileInfo(isOwner, profileInfoOverrides) {
|
|
31803
31821
|
var _globalProps$user, _globalProps$user2, _globalProps$user3, _globalProps$user4, _globalProps$user5;
|
|
31804
31822
|
return mergeDeepLeft(profileInfoOverrides, {
|
|
@@ -31825,6 +31843,7 @@ var getProfileInfo = function getProfileInfo(isOwner, profileInfoOverrides) {
|
|
|
31825
31843
|
label: t$1("neetoMolecules.sidebar.logout"),
|
|
31826
31844
|
onClick: function onClick() {
|
|
31827
31845
|
resetAuthTokens();
|
|
31846
|
+
localStorage.removeItem(getSidebarStateLocalStorageKey());
|
|
31828
31847
|
window.location.href = "/logout";
|
|
31829
31848
|
},
|
|
31830
31849
|
"data-cy": "profile-logout-button"
|
|
@@ -32149,19 +32168,6 @@ var Header = function Header() {
|
|
|
32149
32168
|
};
|
|
32150
32169
|
var Header$1 = /*#__PURE__*/React.memo(Header);
|
|
32151
32170
|
|
|
32152
|
-
var isSubRouteActive = function isSubRouteActive(subRoute, location) {
|
|
32153
|
-
var currentBrowserUrl = new URL(location.pathname + location.search, window.location.origin);
|
|
32154
|
-
var targetUrl = new URL(subRoute, window.location.origin);
|
|
32155
|
-
if (!currentBrowserUrl.pathname.startsWith(targetUrl.pathname)) {
|
|
32156
|
-
return false;
|
|
32157
|
-
}
|
|
32158
|
-
var targetSearchParams = targetUrl.searchParams;
|
|
32159
|
-
var targetSearchKeys = Array.from(targetSearchParams.keys());
|
|
32160
|
-
return all(function (key) {
|
|
32161
|
-
return currentBrowserUrl.searchParams.get(key) === targetSearchParams.get(key);
|
|
32162
|
-
}, targetSearchKeys);
|
|
32163
|
-
};
|
|
32164
|
-
|
|
32165
32171
|
var _excluded = ["label", "to", "icon", "items"],
|
|
32166
32172
|
_excluded2 = ["label", "to", "count"];
|
|
32167
32173
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
@@ -32270,10 +32276,10 @@ var Sidebar = function Sidebar(_ref) {
|
|
|
32270
32276
|
_useState2 = _slicedToArray(_useState, 2),
|
|
32271
32277
|
isAppSwitcherOpen = _useState2[0],
|
|
32272
32278
|
setIsAppSwitcherOpen = _useState2[1];
|
|
32273
|
-
var
|
|
32274
|
-
|
|
32275
|
-
isSidebarCollapsed =
|
|
32276
|
-
setIsSidebarCollapsed =
|
|
32279
|
+
var _useLocalStorage = useLocalStorage(getSidebarStateLocalStorageKey(), false),
|
|
32280
|
+
_useLocalStorage2 = _slicedToArray(_useLocalStorage, 2),
|
|
32281
|
+
isSidebarCollapsed = _useLocalStorage2[0],
|
|
32282
|
+
setIsSidebarCollapsed = _useLocalStorage2[1];
|
|
32277
32283
|
var location = useLocation();
|
|
32278
32284
|
var _useTranslation = useTranslation(),
|
|
32279
32285
|
t = _useTranslation.t;
|
|
@@ -32283,6 +32289,7 @@ var Sidebar = function Sidebar(_ref) {
|
|
|
32283
32289
|
}, [location]);
|
|
32284
32290
|
var productName = globalProps$1.appName.substr(5).toLowerCase();
|
|
32285
32291
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
32292
|
+
"data-testid": "sidebar-container",
|
|
32286
32293
|
className: classnames("neeto-molecules-sidebar__wrapper", {
|
|
32287
32294
|
"neeto-molecules-sidebar__wrapper--collapsed": isSidebarCollapsed
|
|
32288
32295
|
})
|
|
@@ -32304,6 +32311,7 @@ var Sidebar = function Sidebar(_ref) {
|
|
|
32304
32311
|
className: "neeto-molecules-sidebar__toggler-hover-area"
|
|
32305
32312
|
}), /*#__PURE__*/React.createElement(Button, {
|
|
32306
32313
|
className: "neeto-molecules-sidebar__toggler",
|
|
32314
|
+
"data-testid": "sidebar-toggleButton",
|
|
32307
32315
|
style: "text",
|
|
32308
32316
|
icon: function icon() {
|
|
32309
32317
|
return /*#__PURE__*/React.createElement(Chevron, {
|
|
@@ -32317,7 +32325,7 @@ var Sidebar = function Sidebar(_ref) {
|
|
|
32317
32325
|
position: "bottom"
|
|
32318
32326
|
},
|
|
32319
32327
|
onClick: function onClick() {
|
|
32320
|
-
|
|
32328
|
+
setIsSidebarCollapsed(!isSidebarCollapsed);
|
|
32321
32329
|
}
|
|
32322
32330
|
})), showAppSwitcher && /*#__PURE__*/React.createElement(AppSwitcher, {
|
|
32323
32331
|
isOpen: isAppSwitcherOpen,
|