@bigbinary/neeto-molecules 1.10.6 → 1.10.7
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/FloatingActionMenu.js +44 -40
- package/dist/FloatingActionMenu.js.map +1 -1
- package/dist/cjs/FloatingActionMenu.js +44 -40
- package/dist/cjs/FloatingActionMenu.js.map +1 -1
- package/package.json +3 -1
- package/types/Currency.d.ts +1 -1
- package/types/EmojiPicker.d.ts +1 -1
- package/types/EmojiReactions.d.ts +1 -1
|
@@ -4,6 +4,7 @@ var React = require('react');
|
|
|
4
4
|
var neetoCist = require('@bigbinary/neeto-cist');
|
|
5
5
|
var useFetchNeetoApps = require('@bigbinary/neeto-commons-frontend/react-utils/useFetchNeetoApps');
|
|
6
6
|
var KeyboardShortcuts = require('@bigbinary/neeto-molecules/KeyboardShortcuts');
|
|
7
|
+
var neetoTeamMembersFrontend = require('@bigbinary/neeto-team-members-frontend');
|
|
7
8
|
var neetoui = require('@bigbinary/neetoui');
|
|
8
9
|
var neetoIcons = require('@bigbinary/neeto-icons');
|
|
9
10
|
var reactI18next = require('react-i18next');
|
|
@@ -1307,6 +1308,37 @@ function _defineProperty(obj, key, value) {
|
|
|
1307
1308
|
return obj;
|
|
1308
1309
|
}
|
|
1309
1310
|
|
|
1311
|
+
function _arrayLikeToArray(arr, len) {
|
|
1312
|
+
if (len == null || len > arr.length) len = arr.length;
|
|
1313
|
+
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
1314
|
+
return arr2;
|
|
1315
|
+
}
|
|
1316
|
+
|
|
1317
|
+
function _arrayWithoutHoles(arr) {
|
|
1318
|
+
if (Array.isArray(arr)) return _arrayLikeToArray(arr);
|
|
1319
|
+
}
|
|
1320
|
+
|
|
1321
|
+
function _iterableToArray(iter) {
|
|
1322
|
+
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
1323
|
+
}
|
|
1324
|
+
|
|
1325
|
+
function _unsupportedIterableToArray(o, minLen) {
|
|
1326
|
+
if (!o) return;
|
|
1327
|
+
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
1328
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
1329
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
1330
|
+
if (n === "Map" || n === "Set") return Array.from(o);
|
|
1331
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
1332
|
+
}
|
|
1333
|
+
|
|
1334
|
+
function _nonIterableSpread() {
|
|
1335
|
+
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
1336
|
+
}
|
|
1337
|
+
|
|
1338
|
+
function _toConsumableArray(arr) {
|
|
1339
|
+
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
|
|
1340
|
+
}
|
|
1341
|
+
|
|
1310
1342
|
function _arrayWithHoles(arr) {
|
|
1311
1343
|
if (Array.isArray(arr)) return arr;
|
|
1312
1344
|
}
|
|
@@ -1339,21 +1371,6 @@ function _iterableToArrayLimit(r, l) {
|
|
|
1339
1371
|
}
|
|
1340
1372
|
}
|
|
1341
1373
|
|
|
1342
|
-
function _arrayLikeToArray(arr, len) {
|
|
1343
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
1344
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
1345
|
-
return arr2;
|
|
1346
|
-
}
|
|
1347
|
-
|
|
1348
|
-
function _unsupportedIterableToArray(o, minLen) {
|
|
1349
|
-
if (!o) return;
|
|
1350
|
-
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
1351
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
1352
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
1353
|
-
if (n === "Map" || n === "Set") return Array.from(o);
|
|
1354
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
1355
|
-
}
|
|
1356
|
-
|
|
1357
1374
|
function _nonIterableRest() {
|
|
1358
1375
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
1359
1376
|
}
|
|
@@ -1362,22 +1379,6 @@ function _slicedToArray(arr, i) {
|
|
|
1362
1379
|
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
1363
1380
|
}
|
|
1364
1381
|
|
|
1365
|
-
function _arrayWithoutHoles(arr) {
|
|
1366
|
-
if (Array.isArray(arr)) return _arrayLikeToArray(arr);
|
|
1367
|
-
}
|
|
1368
|
-
|
|
1369
|
-
function _iterableToArray(iter) {
|
|
1370
|
-
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
1371
|
-
}
|
|
1372
|
-
|
|
1373
|
-
function _nonIterableSpread() {
|
|
1374
|
-
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
1375
|
-
}
|
|
1376
|
-
|
|
1377
|
-
function _toConsumableArray(arr) {
|
|
1378
|
-
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
|
|
1379
|
-
}
|
|
1380
|
-
|
|
1381
1382
|
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}}
|
|
1382
1383
|
|
|
1383
1384
|
var css$1 = ".neeto-molecules-app-switcher__wrapper{align-items:flex-start;background-color:rgb(var(--neeto-ui-white));display:flex;flex-direction:column;justify-content:flex-start;max-width:100%;overflow-y:auto;padding:40px;position:relative;transition:all .3s;width:100%}@media only screen and (max-width:992px){.neeto-molecules-app-switcher__wrapper{padding:32px}}@media screen and (max-width:768px){.neeto-molecules-app-switcher__wrapper{padding:16px}}.neeto-molecules-app-switcher__grid{grid-gap:24px;display:grid;gap:24px;grid-template-columns:repeat(auto-fill,minmax(288px,1fr))}@media only screen and (max-width:992px){.neeto-molecules-app-switcher__grid{grid-template-columns:repeat(auto-fill,minmax(248px,1fr))}}@media only screen and (max-width:640px){.neeto-molecules-app-switcher__grid{grid-template-columns:repeat(auto-fill,minmax(100%,1fr))}}.neeto-molecules-app-switcher__header{align-items:center;display:flex;gap:32px;justify-content:space-between;margin-bottom:32px;position:relative;width:100%}@media only screen and (max-width:768px){.neeto-molecules-app-switcher__header{align-items:flex-start;flex-direction:column-reverse;gap:24px}}@media only screen and (max-width:640px){.neeto-molecules-app-switcher__header h1{font-size:24px}}.neeto-molecules-app-switcher__close-btn{position:absolute;right:12px;top:12px}.neeto-molecules-app-switcher__search-wrapper{flex-grow:1}@media only screen and (min-width:992px){.neeto-molecules-app-switcher__search-wrapper{flex-grow:0;width:296px}}.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}";
|
|
@@ -1632,7 +1633,6 @@ var shouldShowWhatsNew = function shouldShowWhatsNew() {
|
|
|
1632
1633
|
var currentUserEmail = (_window$globalProps = window.globalProps) === null || _window$globalProps === void 0 ? void 0 : (_window$globalProps$u = _window$globalProps.user) === null || _window$globalProps$u === void 0 ? void 0 : _window$globalProps$u.email;
|
|
1633
1634
|
return window.location.hostname === "localhost" || currentUserEmail === "oliver@example.com" || (currentUserEmail === null || currentUserEmail === void 0 ? void 0 : currentUserEmail.endsWith("@bigbinary.com"));
|
|
1634
1635
|
};
|
|
1635
|
-
var MY_PROFILE_URL = "/auth/profile/edit";
|
|
1636
1636
|
var MY_ORGANIZATION_URL = "/auth/organization/edit";
|
|
1637
1637
|
var CHANGELOG_WIDGET_TRIGGER_ID = "neetochangelog-trigger";
|
|
1638
1638
|
var DEFAULT_HELP_LINK_PROPS = {
|
|
@@ -1672,14 +1672,15 @@ var getSidebarStateLocalStorageKey = function getSidebarStateLocalStorageKey() {
|
|
|
1672
1672
|
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);
|
|
1673
1673
|
return "sidebarState-".concat(user);
|
|
1674
1674
|
};
|
|
1675
|
-
var getDefaultTopLinks = function getDefaultTopLinks(isOwner) {
|
|
1675
|
+
var getDefaultTopLinks = function getDefaultTopLinks(isOwner, setIsProfilePaneOpen) {
|
|
1676
1676
|
return [{
|
|
1677
1677
|
label: i18next.t("neetoMolecules.sidebar.myProfile"),
|
|
1678
1678
|
icon: neetoIcons.User,
|
|
1679
1679
|
onClick: function onClick() {
|
|
1680
|
-
return
|
|
1680
|
+
return setIsProfilePaneOpen(true);
|
|
1681
1681
|
},
|
|
1682
|
-
"data-cy": "my-profile-button"
|
|
1682
|
+
"data-cy": "my-profile-button",
|
|
1683
|
+
"data-testid": "my-profile-button"
|
|
1683
1684
|
}, isOwner && {
|
|
1684
1685
|
label: i18next.t("neetoMolecules.sidebar.myOrganization"),
|
|
1685
1686
|
icon: neetoIcons.Settings,
|
|
@@ -1720,12 +1721,18 @@ var ProfileButton = function ProfileButton(_ref) {
|
|
|
1720
1721
|
bottomLinks = _ref.bottomLinks,
|
|
1721
1722
|
topLinks = _ref.topLinks,
|
|
1722
1723
|
customContent = _ref.customContent;
|
|
1724
|
+
var _KeyboardShortcuts$us = KeyboardShortcuts__default["default"].usePaneState(),
|
|
1725
|
+
_KeyboardShortcuts$us2 = _slicedToArray(_KeyboardShortcuts$us, 2),
|
|
1726
|
+
setIsOpen = _KeyboardShortcuts$us2[1];
|
|
1727
|
+
var _Profile$usePaneState = neetoTeamMembersFrontend.Profile.usePaneState(),
|
|
1728
|
+
_Profile$usePaneState2 = _slicedToArray(_Profile$usePaneState, 2),
|
|
1729
|
+
setIsProfilePaneOpen = _Profile$usePaneState2[1];
|
|
1723
1730
|
var _useFetchNeetoApps = useFetchNeetoApps__default["default"]({
|
|
1724
1731
|
enabled: false
|
|
1725
1732
|
}),
|
|
1726
1733
|
data = _useFetchNeetoApps.data;
|
|
1727
1734
|
var profileInfo = getProfileInfo(profileInfoOverrides);
|
|
1728
|
-
var newTopLinks = globalProps.appName !== "neetoAuth" ? [].concat(_toConsumableArray(getDefaultTopLinks(data === null || data === void 0 ? void 0 : data.isOwner)), _toConsumableArray(topLinks)) : topLinks;
|
|
1735
|
+
var newTopLinks = globalProps.appName !== "neetoAuth" ? [].concat(_toConsumableArray(getDefaultTopLinks(data === null || data === void 0 ? void 0 : data.isOwner, setIsProfilePaneOpen)), _toConsumableArray(topLinks)) : topLinks;
|
|
1729
1736
|
var newBottomLinks = [].concat(_toConsumableArray(getDefaultBottomLinks()), _toConsumableArray(bottomLinks));
|
|
1730
1737
|
var _useState = React.useState(null),
|
|
1731
1738
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -1743,9 +1750,6 @@ var ProfileButton = function ProfileButton(_ref) {
|
|
|
1743
1750
|
};
|
|
1744
1751
|
window.Nv = window.Nv ? Object.assign(window.Nv, Nv) : Nv;
|
|
1745
1752
|
}, []);
|
|
1746
|
-
var _KeyboardShortcuts$us = KeyboardShortcuts__default["default"].usePaneState(),
|
|
1747
|
-
_KeyboardShortcuts$us2 = _slicedToArray(_KeyboardShortcuts$us, 2),
|
|
1748
|
-
setIsOpen = _KeyboardShortcuts$us2[1];
|
|
1749
1753
|
var helpLinks = Object.keys(DEFAULT_HELP_LINK_PROPS).filter(function (key) {
|
|
1750
1754
|
var _DEFAULT_HELP_LINK_PR, _DEFAULT_HELP_LINK_PR2, _DEFAULT_HELP_LINK_PR3;
|
|
1751
1755
|
return (_DEFAULT_HELP_LINK_PR = (_DEFAULT_HELP_LINK_PR2 = (_DEFAULT_HELP_LINK_PR3 = DEFAULT_HELP_LINK_PROPS[key]).isVisible) === null || _DEFAULT_HELP_LINK_PR2 === void 0 ? void 0 : _DEFAULT_HELP_LINK_PR2.call(_DEFAULT_HELP_LINK_PR3)) !== null && _DEFAULT_HELP_LINK_PR !== void 0 ? _DEFAULT_HELP_LINK_PR : true;
|
|
@@ -1763,7 +1767,7 @@ var ProfileButton = function ProfileButton(_ref) {
|
|
|
1763
1767
|
var hide = _ref2.hide;
|
|
1764
1768
|
return !hide;
|
|
1765
1769
|
});
|
|
1766
|
-
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(neetoui.Dropdown, {
|
|
1770
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(neetoTeamMembersFrontend.Profile.Pane, null), /*#__PURE__*/React__default["default"].createElement(neetoui.Dropdown, {
|
|
1767
1771
|
isMultiLevel: true,
|
|
1768
1772
|
appendTo: function appendTo() {
|
|
1769
1773
|
return document.body;
|