@bigbinary/neeto-molecules 1.7.0-beta.0 → 1.7.0-beta.2
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/README.md +63 -54
- package/dist/Breadcrumbs.js +4 -9
- package/dist/Breadcrumbs.js.map +1 -1
- package/dist/Builder.js +5 -2
- package/dist/Builder.js.map +1 -1
- package/dist/CalendarView.js +39 -6
- package/dist/CalendarView.js.map +1 -1
- package/dist/Columns.js +27 -16
- package/dist/Columns.js.map +1 -1
- package/dist/Currency.js +937 -0
- package/dist/Currency.js.map +1 -0
- package/dist/CustomDomainDashboard.js +45 -39
- package/dist/CustomDomainDashboard.js.map +1 -1
- package/dist/EmojiPicker.js +134 -0
- package/dist/EmojiPicker.js.map +1 -0
- package/dist/EmojiReactions.js +123 -0
- package/dist/EmojiReactions.js.map +1 -0
- package/dist/ErrorPage.js +4 -2
- package/dist/ErrorPage.js.map +1 -1
- package/dist/FloatingActionMenu.js +6 -5
- package/dist/FloatingActionMenu.js.map +1 -1
- package/dist/Header.js +9 -36
- package/dist/Header.js.map +1 -1
- package/dist/HelpPopover.js +109 -27
- package/dist/HelpPopover.js.map +1 -1
- package/dist/IpRestriction.js +1 -3
- package/dist/IpRestriction.js.map +1 -1
- package/dist/LoginPage.js +5 -4
- package/dist/LoginPage.js.map +1 -1
- package/dist/MenuBar.js +1 -1
- package/dist/NavigationHeader.js +9 -9
- package/dist/NavigationHeader.js.map +1 -1
- package/dist/ProductEmbed.js +72 -23
- package/dist/ProductEmbed.js.map +1 -1
- package/dist/PublishBlock.js +2 -0
- package/dist/PublishBlock.js.map +1 -1
- package/dist/Rename.js +4 -9
- package/dist/Rename.js.map +1 -1
- package/dist/Schedule.js +8 -4
- package/dist/Schedule.js.map +1 -1
- package/dist/Search.js +3 -1
- package/dist/Search.js.map +1 -1
- package/dist/Security.js +7 -34
- package/dist/Security.js.map +1 -1
- package/dist/Settings.js +10 -36
- package/dist/Settings.js.map +1 -1
- package/dist/ShareViaLink.js +30 -25
- package/dist/ShareViaLink.js.map +1 -1
- package/dist/Sidebar.js +449 -50
- package/dist/Sidebar.js.map +1 -1
- package/dist/SubHeader.js +40 -7
- package/dist/SubHeader.js.map +1 -1
- package/dist/Taxonomy.js +46 -40
- package/dist/Taxonomy.js.map +1 -1
- package/dist/ToggleFeatureCard.js +25 -11
- package/dist/ToggleFeatureCard.js.map +1 -1
- package/dist/cjs/Breadcrumbs.js +4 -9
- package/dist/cjs/Breadcrumbs.js.map +1 -1
- package/dist/cjs/Builder.js +5 -2
- package/dist/cjs/Builder.js.map +1 -1
- package/dist/cjs/CalendarView.js +36 -3
- package/dist/cjs/CalendarView.js.map +1 -1
- package/dist/cjs/Columns.js +25 -14
- package/dist/cjs/Columns.js.map +1 -1
- package/dist/cjs/Currency.js +943 -0
- package/dist/cjs/Currency.js.map +1 -0
- package/dist/cjs/CustomDomainDashboard.js +43 -36
- package/dist/cjs/CustomDomainDashboard.js.map +1 -1
- package/dist/cjs/EmojiPicker.js +142 -0
- package/dist/cjs/EmojiPicker.js.map +1 -0
- package/dist/cjs/EmojiReactions.js +130 -0
- package/dist/cjs/EmojiReactions.js.map +1 -0
- package/dist/cjs/ErrorPage.js +4 -2
- package/dist/cjs/ErrorPage.js.map +1 -1
- package/dist/cjs/FloatingActionMenu.js +6 -5
- package/dist/cjs/FloatingActionMenu.js.map +1 -1
- package/dist/cjs/Header.js +9 -35
- package/dist/cjs/Header.js.map +1 -1
- package/dist/cjs/HelpPopover.js +109 -26
- package/dist/cjs/HelpPopover.js.map +1 -1
- package/dist/cjs/IpRestriction.js +1 -3
- package/dist/cjs/IpRestriction.js.map +1 -1
- package/dist/cjs/LoginPage.js +5 -4
- package/dist/cjs/LoginPage.js.map +1 -1
- package/dist/cjs/MenuBar.js +1 -1
- package/dist/cjs/NavigationHeader.js +9 -9
- package/dist/cjs/NavigationHeader.js.map +1 -1
- package/dist/cjs/ProductEmbed.js +71 -22
- package/dist/cjs/ProductEmbed.js.map +1 -1
- package/dist/cjs/PublishBlock.js +2 -0
- package/dist/cjs/PublishBlock.js.map +1 -1
- package/dist/cjs/Rename.js +4 -9
- package/dist/cjs/Rename.js.map +1 -1
- package/dist/cjs/Schedule.js +8 -4
- package/dist/cjs/Schedule.js.map +1 -1
- package/dist/cjs/Search.js +3 -1
- package/dist/cjs/Search.js.map +1 -1
- package/dist/cjs/Security.js +7 -33
- package/dist/cjs/Security.js.map +1 -1
- package/dist/cjs/Settings.js +10 -35
- package/dist/cjs/Settings.js.map +1 -1
- package/dist/cjs/ShareViaLink.js +30 -25
- package/dist/cjs/ShareViaLink.js.map +1 -1
- package/dist/cjs/Sidebar.js +442 -42
- package/dist/cjs/Sidebar.js.map +1 -1
- package/dist/cjs/SubHeader.js +37 -4
- package/dist/cjs/SubHeader.js.map +1 -1
- package/dist/cjs/Taxonomy.js +43 -36
- package/dist/cjs/Taxonomy.js.map +1 -1
- package/dist/cjs/ToggleFeatureCard.js +25 -12
- package/dist/cjs/ToggleFeatureCard.js.map +1 -1
- package/package.json +9 -2
- package/src/translations/en.json +20 -4
- package/types/Builder.d.ts +52 -9
- package/types/Columns.d.ts +2 -3
- package/types/Currency.d.ts +35 -0
- package/types/EmojiPicker.d.ts +33 -0
- package/types/EmojiReactions.d.ts +60 -0
- package/types/ErrorPage.d.ts +1 -0
- package/types/HelpPopover.d.ts +1 -0
- package/types/ProductEmbed.d.ts +3 -0
- package/types/Schedule.d.ts +1 -0
- package/types/Sidebar.d.ts +10 -2
- package/types/SubHeader.d.ts +0 -1
- package/types/ToggleFeatureCard.d.ts +8 -1
package/dist/cjs/Header.js
CHANGED
|
@@ -3,15 +3,16 @@
|
|
|
3
3
|
var React = require('react');
|
|
4
4
|
var classnames = require('classnames');
|
|
5
5
|
var neetoCist = require('@bigbinary/neeto-cist');
|
|
6
|
+
var Breadcrumbs = require('@bigbinary/neeto-molecules/Breadcrumbs');
|
|
6
7
|
var Search = require('@bigbinary/neeto-molecules/Search');
|
|
7
8
|
var neetoui = require('@bigbinary/neetoui');
|
|
8
|
-
var reactRouterDom = require('react-router-dom');
|
|
9
9
|
var neetoIcons = require('@bigbinary/neeto-icons');
|
|
10
10
|
|
|
11
11
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
12
12
|
|
|
13
13
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
14
14
|
var classnames__default = /*#__PURE__*/_interopDefaultLegacy(classnames);
|
|
15
|
+
var Breadcrumbs__default = /*#__PURE__*/_interopDefaultLegacy(Breadcrumbs);
|
|
15
16
|
var Search__default = /*#__PURE__*/_interopDefaultLegacy(Search);
|
|
16
17
|
|
|
17
18
|
function _extends() {
|
|
@@ -70,39 +71,6 @@ function _defineProperty(obj, key, value) {
|
|
|
70
71
|
return obj;
|
|
71
72
|
}
|
|
72
73
|
|
|
73
|
-
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}}
|
|
74
|
-
|
|
75
|
-
var css = ":root{--neeto-molecules-main-header-height:98px;--neeto-molecules-main-header-with-breadcrumbs-height:170px}.neeto-molecules-header{align-items:flex-start;background:rgb(var(--neeto-ui-white));display:flex;flex-direction:row;flex-shrink:0;gap:16px;justify-content:space-between;min-height:98px;min-height:var(--neeto-molecules-main-header-height);padding:40px 0 24px;width:100%}@media screen and (max-width:1024px){.neeto-molecules-header{flex-wrap:wrap}}.neeto-molecules-header .neeto-molecules-header__toggle-menubar-btn{margin-right:8px}.neeto-molecules-header .neeto-molecules-header__left{align-items:flex-start;display:flex;flex-direction:row;flex-wrap:wrap;justify-content:flex-start}.neeto-molecules-header .neeto-molecules-header__left-data-wrap{display:flex;flex-wrap:wrap}.neeto-molecules-header .neeto-molecules-header__page-title{align-items:center;display:flex;flex-direction:row;gap:12px;margin-top:-12px;width:100%}@media screen and (max-width:1024px){.neeto-molecules-header .neeto-molecules-header__page-title{margin-top:-10px}}@media screen and (max-width:768px){.neeto-molecules-header .neeto-molecules-header__page-title{margin-top:-8px}}@media screen and (max-width:576px){.neeto-molecules-header .neeto-molecules-header__page-title{margin-top:-4px}}.neeto-molecules-header .neeto-molecules-header__page-title h2{font-size:calc(1.375rem + 1.5vw);line-height:var(--neeto-ui-leading-tight)}@media (min-width:1200px){.neeto-molecules-header .neeto-molecules-header__page-title h2{font-size:2.5rem}}.neeto-molecules-header .neeto-molecules-header__breadcrumbs-wrap{display:flex;margin:0 0 40px}@media screen and (max-width:768px){.neeto-molecules-header .neeto-molecules-header__breadcrumbs-wrap{margin:0 0 16px}}.neeto-molecules-header .neeto-molecules-header__breadcrumb{align-items:center;display:flex;flex-direction:row;justify-content:flex-start;line-height:1}.neeto-molecules-header .neeto-molecules-header__breadcrumb a{text-decoration:none;transition:all .3s ease-in-out}.neeto-molecules-header .neeto-molecules-header__breadcrumb a:focus-visible{border-radius:var(--neeto-ui-rounded-sm);outline:3px solid rgba(var(--neeto-ui-primary-500),50%)}.neeto-molecules-header .neeto-molecules-header__breadcrumb-separator{font-size:12px;line-height:16px;margin:0 12px}.neeto-molecules-header .neeto-molecules-header__right{align-items:center;display:flex;gap:12px;justify-content:flex-end}@media screen and (max-width:768px){.neeto-molecules-header .neeto-molecules-header__right{flex-wrap:wrap;justify-content:flex-start}}.neeto-molecules-header .neeto-molecules-header__right .neeto-ui-btn{flex-shrink:0}.neeto-molecules-header .neeto-molecules-header__right .neeto-molecules-header__search-input{flex-grow:0;min-width:104px}.neeto-molecules-header .neeto-molecules-header__right .neeto-molecules-header__action-block{align-items:center;display:flex;flex-shrink:0;gap:12px;justify-content:flex-end}@media screen and (max-width:360px){.neeto-molecules-header .neeto-molecules-header__right .neeto-molecules-header__action-block{flex-shrink:1;flex-wrap:wrap;justify-content:flex-start}}.neeto-molecules-header--has-breadcrumbs{min-height:170px;min-height:var(--neeto-molecules-main-header-with-breadcrumbs-height)}.neeto-molecules-header--has-breadcrumbs .neeto-molecules-header__page-title{margin-top:0}.neeto-molecules-header--nano,.neeto-molecules-header--small{flex-shrink:0;min-height:0}.neeto-molecules-header--nano .neeto-molecules-header__breadcrumbs-wrap,.neeto-molecules-header--small .neeto-molecules-header__breadcrumbs-wrap{margin:0 0 16px}.neeto-molecules-header--small .neeto-molecules-header__page-title{margin-top:-4px}.neeto-molecules-header--small .neeto-molecules-header__page-title h2{font-size:calc(1.325rem + .9vw)}@media (min-width:1200px){.neeto-molecules-header--small .neeto-molecules-header__page-title h2{font-size:2rem}}.neeto-molecules-header--nano .neeto-molecules-header__page-title{margin-top:0}.neeto-molecules-header--nano .neeto-molecules-header__page-title h2{font-size:calc(1.275rem + .3vw)}@media (min-width:1200px){.neeto-molecules-header--nano .neeto-molecules-header__page-title h2{font-size:1.5rem}}";
|
|
76
|
-
n(css,{});
|
|
77
|
-
|
|
78
|
-
var Breadcrumbs = function Breadcrumbs(_ref) {
|
|
79
|
-
var breadcrumbs = _ref.breadcrumbs;
|
|
80
|
-
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
81
|
-
className: "neeto-molecules-header__breadcrumbs-wrap"
|
|
82
|
-
}, breadcrumbs.map(function (_ref2, index) {
|
|
83
|
-
var text = _ref2.text,
|
|
84
|
-
_ref2$link = _ref2.link,
|
|
85
|
-
link = _ref2$link === void 0 ? "#" : _ref2$link;
|
|
86
|
-
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
87
|
-
className: "neeto-molecules-header__breadcrumb",
|
|
88
|
-
"data-cy": "header-breadcrumb",
|
|
89
|
-
key: index
|
|
90
|
-
}, /*#__PURE__*/React__default["default"].createElement(reactRouterDom.Link, {
|
|
91
|
-
to: link
|
|
92
|
-
}, /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
93
|
-
className: "neeto-ui-text-gray-700 hover:neeto-ui-text-gray-800 neeto-molecules-header__breadcrumb-link",
|
|
94
|
-
component: "span",
|
|
95
|
-
"data-cy": text,
|
|
96
|
-
"data-test-id": text,
|
|
97
|
-
style: "body2",
|
|
98
|
-
weight: "normal"
|
|
99
|
-
}, text)), index !== breadcrumbs.length - 1 && /*#__PURE__*/React__default["default"].createElement("span", {
|
|
100
|
-
className: "neeto-molecules-header__breadcrumb-separator neeto-ui-text-black"
|
|
101
|
-
}, "/"));
|
|
102
|
-
}));
|
|
103
|
-
};
|
|
104
|
-
var Breadcrumbs$1 = /*#__PURE__*/React__default["default"].memo(Breadcrumbs);
|
|
105
|
-
|
|
106
74
|
var SIZES = {
|
|
107
75
|
nano: "nano",
|
|
108
76
|
small: "small",
|
|
@@ -124,6 +92,11 @@ var Dropdown = function Dropdown(props) {
|
|
|
124
92
|
}, props));
|
|
125
93
|
};
|
|
126
94
|
|
|
95
|
+
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}}
|
|
96
|
+
|
|
97
|
+
var css = ":root{--neeto-molecules-main-header-height:98px;--neeto-molecules-main-header-with-breadcrumbs-height:170px}.neeto-molecules-header{align-items:flex-start;background:rgb(var(--neeto-ui-white));display:flex;flex-direction:row;flex-shrink:0;gap:16px;justify-content:space-between;min-height:98px;min-height:var(--neeto-molecules-main-header-height);padding:40px 0 24px;width:100%}@media screen and (max-width:1024px){.neeto-molecules-header{flex-wrap:wrap}}.neeto-molecules-header .neeto-molecules-header__toggle-menubar-btn{margin-right:8px}.neeto-molecules-header .neeto-molecules-header__left{align-items:flex-start;display:flex;flex-direction:row;flex-wrap:wrap;justify-content:flex-start}.neeto-molecules-header .neeto-molecules-header__left-data-wrap{display:flex;flex-wrap:wrap}.neeto-molecules-header .neeto-molecules-header__page-title{align-items:center;display:flex;flex-direction:row;gap:12px;margin-top:-12px;width:100%}@media screen and (max-width:1024px){.neeto-molecules-header .neeto-molecules-header__page-title{margin-top:-10px}}@media screen and (max-width:768px){.neeto-molecules-header .neeto-molecules-header__page-title{margin-top:-8px}}@media screen and (max-width:576px){.neeto-molecules-header .neeto-molecules-header__page-title{margin-top:-4px}}.neeto-molecules-header .neeto-molecules-header__page-title h2{font-size:calc(1.375rem + 1.5vw);line-height:var(--neeto-ui-leading-tight)}@media (min-width:1200px){.neeto-molecules-header .neeto-molecules-header__page-title h2{font-size:2.5rem}}.neeto-molecules-header .neeto-molecules-header__right{align-items:center;display:flex;gap:12px;justify-content:flex-end}@media screen and (max-width:768px){.neeto-molecules-header .neeto-molecules-header__right{flex-wrap:wrap;justify-content:flex-start}}.neeto-molecules-header .neeto-molecules-header__right .neeto-ui-btn{flex-shrink:0}.neeto-molecules-header .neeto-molecules-header__right .neeto-molecules-header__search-input{flex-grow:0;min-width:104px}.neeto-molecules-header .neeto-molecules-header__right .neeto-molecules-header__action-block{align-items:center;display:flex;flex-shrink:0;gap:12px;justify-content:flex-end}@media screen and (max-width:360px){.neeto-molecules-header .neeto-molecules-header__right .neeto-molecules-header__action-block{flex-shrink:1;flex-wrap:wrap;justify-content:flex-start}}.neeto-molecules-header--has-breadcrumbs{min-height:170px;min-height:var(--neeto-molecules-main-header-with-breadcrumbs-height)}.neeto-molecules-header--has-breadcrumbs .neeto-molecules-header__page-title{margin-top:0}.neeto-molecules-header--nano,.neeto-molecules-header--small{flex-shrink:0;min-height:0}.neeto-molecules-header--nano .neeto-molecules-breadcrumbs-wrap,.neeto-molecules-header--small .neeto-molecules-breadcrumbs-wrap{margin:0 0 16px}.neeto-molecules-header--small .neeto-molecules-header__page-title{margin-top:-4px}.neeto-molecules-header--small .neeto-molecules-header__page-title h2{font-size:calc(1.325rem + .9vw)}@media (min-width:1200px){.neeto-molecules-header--small .neeto-molecules-header__page-title h2{font-size:2rem}}.neeto-molecules-header--nano .neeto-molecules-header__page-title{margin-top:0}.neeto-molecules-header--nano .neeto-molecules-header__page-title h2{font-size:calc(1.275rem + .3vw)}@media (min-width:1200px){.neeto-molecules-header--nano .neeto-molecules-header__page-title h2{font-size:1.5rem}}";
|
|
98
|
+
n(css,{});
|
|
99
|
+
|
|
127
100
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
128
101
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
129
102
|
var Header = function Header(_ref) {
|
|
@@ -141,6 +114,7 @@ var Header = function Header(_ref) {
|
|
|
141
114
|
_ref$dataTestid = _ref["data-testid"],
|
|
142
115
|
dataTestId = _ref$dataTestid === void 0 ? "neeto-molecules-header" : _ref$dataTestid;
|
|
143
116
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
117
|
+
"data-cy": "neeto-molecules-header",
|
|
144
118
|
"data-testid": dataTestId,
|
|
145
119
|
className: classnames__default["default"](["neeto-molecules-header", {
|
|
146
120
|
"neeto-molecules-header--has-breadcrumbs": neetoCist.isNotEmpty(breadcrumbs),
|
|
@@ -152,7 +126,7 @@ var Header = function Header(_ref) {
|
|
|
152
126
|
className: "neeto-molecules-header__left"
|
|
153
127
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
154
128
|
className: "neeto-molecules-header__left-data-wrap"
|
|
155
|
-
}, neetoCist.isNotEmpty(breadcrumbs) && /*#__PURE__*/React__default["default"].createElement(
|
|
129
|
+
}, neetoCist.isNotEmpty(breadcrumbs) && /*#__PURE__*/React__default["default"].createElement(Breadcrumbs__default["default"], {
|
|
156
130
|
breadcrumbs: breadcrumbs
|
|
157
131
|
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
158
132
|
className: "neeto-molecules-header__page-title"
|
package/dist/cjs/Header.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Header.js","sources":["../../node_modules/@babel/runtime/helpers/esm/extends.js","../../node_modules/@babel/runtime/helpers/esm/typeof.js","../../node_modules/@babel/runtime/helpers/esm/toPrimitive.js","../../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js","../../node_modules/@babel/runtime/helpers/esm/defineProperty.js","../../node_modules/rollup-plugin-styles/dist/runtime/inject-css.js","../../src/components/Header/Breadcrumbs.jsx","../../src/components/Header/constants.js","../../src/components/Header/Dropdown.jsx","../../src/components/Header/index.jsx"],"sourcesContent":["export default function _extends() {\n _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n}","export default function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, _typeof(o);\n}","import _typeof from \"./typeof.js\";\nexport default function _toPrimitive(input, hint) {\n if (_typeof(input) !== \"object\" || input === null) return input;\n var prim = input[Symbol.toPrimitive];\n if (prim !== undefined) {\n var res = prim.call(input, hint || \"default\");\n if (_typeof(res) !== \"object\") return res;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (hint === \"string\" ? String : Number)(input);\n}","import _typeof from \"./typeof.js\";\nimport toPrimitive from \"./toPrimitive.js\";\nexport default function _toPropertyKey(arg) {\n var key = toPrimitive(arg, \"string\");\n return _typeof(key) === \"symbol\" ? key : String(key);\n}","import toPropertyKey from \"./toPropertyKey.js\";\nexport default function _defineProperty(obj, key, value) {\n key = toPropertyKey(key);\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}","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}}export{n as default};\n","import React from \"react\";\n\nimport { Typography } from \"neetoui\";\nimport { Link } from \"react-router-dom\";\n\nimport \"./header.scss\";\n\nconst Breadcrumbs = ({ breadcrumbs }) => (\n <div className=\"neeto-molecules-header__breadcrumbs-wrap\">\n {breadcrumbs.map(({ text, link = \"#\" }, index) => (\n <div\n className=\"neeto-molecules-header__breadcrumb\"\n data-cy=\"header-breadcrumb\"\n key={index}\n >\n <Link to={link}>\n <Typography\n className=\"neeto-ui-text-gray-700 hover:neeto-ui-text-gray-800 neeto-molecules-header__breadcrumb-link\"\n component=\"span\"\n data-cy={text}\n data-test-id={text}\n style=\"body2\"\n weight=\"normal\"\n >\n {text}\n </Typography>\n </Link>\n {index !== breadcrumbs.length - 1 && (\n <span className=\"neeto-molecules-header__breadcrumb-separator neeto-ui-text-black\">\n /\n </span>\n )}\n </div>\n ))}\n </div>\n);\n\nexport default React.memo(Breadcrumbs);\n","const SIZES = { nano: \"nano\", small: \"small\", large: \"large\" };\n\nconst DROPDOWN_BUTTON_SIZES = {\n nano: \"small\",\n small: \"medium\",\n large: \"large\",\n};\n\nexport { SIZES, DROPDOWN_BUTTON_SIZES };\n","import React from \"react\";\n\nimport { MenuHorizontal } from \"neetoicons\";\nimport { Dropdown as NeetoUIDropdown } from \"neetoui\";\n\nimport { DROPDOWN_BUTTON_SIZES } from \"./constants\";\n\nconst Dropdown = props => (\n <NeetoUIDropdown\n buttonSize={DROPDOWN_BUTTON_SIZES[props.size]}\n buttonStyle=\"secondary\"\n icon={MenuHorizontal}\n position=\"bottom-start\"\n strategy=\"fixed\"\n {...props}\n />\n);\n\nexport default Dropdown;\n","import React from \"react\";\n\nimport classnames from \"classnames\";\nimport { noop, isNotEmpty } from \"neetocist\";\nimport Search from \"neetomolecules/Search\";\nimport { Typography } from \"neetoui\";\nimport PropTypes from \"prop-types\";\n\nimport Breadcrumbs from \"./Breadcrumbs\";\nimport { SIZES } from \"./constants\";\nimport Dropdown from \"./Dropdown\";\nimport \"./header.scss\";\n\nconst Header = ({\n title,\n searchProps,\n className = \"\",\n actionBlock,\n breadcrumbs = [],\n renderDropdown = noop,\n size = \"large\",\n \"data-testid\": dataTestId = \"neeto-molecules-header\",\n}) => (\n <div\n data-testid={dataTestId}\n className={classnames([\n \"neeto-molecules-header\",\n {\n \"neeto-molecules-header--has-breadcrumbs\": isNotEmpty(breadcrumbs),\n \"neeto-molecules-header--large\": size === SIZES.large,\n \"neeto-molecules-header--small\": size === SIZES.small,\n \"neeto-molecules-header--nano\": size === SIZES.nano,\n },\n className,\n ])}\n >\n <div className=\"neeto-molecules-header__left\">\n <div className=\"neeto-molecules-header__left-data-wrap\">\n {isNotEmpty(breadcrumbs) && <Breadcrumbs {...{ breadcrumbs }} />}\n <div className=\"neeto-molecules-header__page-title\">\n <Typography\n data-cy=\"main-header\"\n data-test-id=\"main-header\"\n lineHeight=\"tight\"\n style=\"h2\"\n weight=\"semibold\"\n >\n {title}\n </Typography>\n {renderDropdown(props => (\n <Dropdown {...{ size, ...props }} />\n ))}\n </div>\n </div>\n </div>\n <div className=\"neeto-molecules-header__right\">\n {searchProps && (\n <Search\n className={classnames([\n \"neeto-molecules-header__search-input\",\n searchProps.className,\n ])}\n {...searchProps}\n />\n )}\n {actionBlock && (\n <div className=\"neeto-molecules-header__action-block\">\n {actionBlock}\n </div>\n )}\n </div>\n </div>\n);\n\nHeader.propTypes = {\n /**\n * To set a title in the Header section.\n */\n title: PropTypes.node,\n /**\n * To specify additional class names.\n */\n className: PropTypes.string,\n /**\n * To specify the content to be rendered in the right side of the Header section.\n */\n\n actionBlock: PropTypes.node,\n /**\n * To add **Search** molecule to the subheader section.\n */\n searchProps: PropTypes.object,\n /**\n * To show breadcrumbs in the Header section. `text` accepts a text string to be shown as the breadcrumb and `link` accepts relative URL path for the breadcrumb.\n */\n breadcrumbs: PropTypes.arrayOf(\n PropTypes.shape({\n text: PropTypes.string,\n link: PropTypes.string,\n })\n ),\n /**\n * A function to render the Dropdown next to the title. It provides the Dropdown component as argument.\n */\n renderDropdown: PropTypes.func,\n /**\n * To specify size of the Header.\n *\n * `large` - Default size. To be used in index pages.\n *\n * `small` - To be used in inner pages.\n *\n * `nano` - To be used in inner pages with menubar.\n */\n size: PropTypes.oneOf([\"nano\", \"small\", \"large\"]),\n};\n\nexport default Header;\n"],"names":["toPrimitive","toPropertyKey","Breadcrumbs","_ref","breadcrumbs","React","createElement","className","map","_ref2","index","text","_ref2$link","link","key","Link","to","Typography","component","style","weight","length","memo","SIZES","nano","small","large","DROPDOWN_BUTTON_SIZES","Dropdown","props","NeetoUIDropdown","_extends","buttonSize","size","buttonStyle","icon","MenuHorizontal","position","strategy","Header","title","searchProps","_ref$className","actionBlock","_ref$breadcrumbs","_ref$renderDropdown","renderDropdown","noop","_ref$size","_ref$dataTestid","dataTestId","classnames","isNotEmpty","lineHeight","_objectSpread","Search"],"mappings":";;;;;;;;;;;;;;;;AAAe,SAAS,QAAQ,GAAG;AACnC,EAAE,QAAQ,GAAG,MAAM,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,GAAG,UAAU,MAAM,EAAE;AACtE,IAAI,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;AAC/C,MAAM,IAAI,MAAM,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC;AAChC,MAAM,KAAK,IAAI,GAAG,IAAI,MAAM,EAAE;AAC9B,QAAQ,IAAI,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE;AAC/D,UAAU,MAAM,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;AACpC,SAAS;AACT,OAAO;AACP,KAAK;AACL,IAAI,OAAO,MAA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AC1BoC,IAAAA,UAAU,EAAC,OAAO;AAClBlC,IAAAA,KAAK,EAAC,IAAI;AACVC,IAAAA,MAAM,EAAC,UAAA;AAAU,GAAA,EAEhBoB,KACS,CAAC,EACZM,cAAc,CAAC,UAAAjB,KAAK,EAAA;AAAA,IAAA,oBACnBxB,yBAAA,CAAAC,aAAA,CAACsB,QAAQ,EAAA0B,aAAA,CAAA;AAAOrB,MAAAA,IAAI,EAAJA,IAAAA;KAASJ,EAAAA,KAAK,CAAK,CAAC,CAAA;AAAA,GACrC,CACE,CACF,CACF,CAAC,eACNxB,yBAAA,CAAAC,aAAA,CAAA,KAAA,EAAA;AAAKC,IAAAA,SAAS,EAAC,+BAAA;GACZkC,EAAAA,WAAW,iBACVpC,yBAAA,CAAAC,aAAA,CAACiD,0BAAM,EAAAxB,QAAA,CAAA;IACLxB,SAAS,EAAE4C,8BAAU,CAAC,CACpB,sCAAsC,EACtCV,WAAW,CAAClC,SAAS,CACtB,CAAA;GACGkC,EAAAA,WAAW,CAChB,CACF,EACAE,WAAW,iBACVtC,yBAAA,CAAAC,aAAA,CAAA,KAAA,EAAA;AAAKC,IAAAA,SAAS,EAAC,sCAAA;GACZoC,EAAAA,WACE,CAEJ,CACF,CAAC,CAAA;AAAA;;;;"}
|
|
1
|
+
{"version":3,"file":"Header.js","sources":["../../node_modules/@babel/runtime/helpers/esm/extends.js","../../node_modules/@babel/runtime/helpers/esm/typeof.js","../../node_modules/@babel/runtime/helpers/esm/toPrimitive.js","../../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js","../../node_modules/@babel/runtime/helpers/esm/defineProperty.js","../../src/components/Header/constants.js","../../src/components/Header/Dropdown.jsx","../../node_modules/rollup-plugin-styles/dist/runtime/inject-css.js","../../src/components/Header/index.jsx"],"sourcesContent":["export default function _extends() {\n _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n}","export default function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, _typeof(o);\n}","import _typeof from \"./typeof.js\";\nexport default function _toPrimitive(input, hint) {\n if (_typeof(input) !== \"object\" || input === null) return input;\n var prim = input[Symbol.toPrimitive];\n if (prim !== undefined) {\n var res = prim.call(input, hint || \"default\");\n if (_typeof(res) !== \"object\") return res;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (hint === \"string\" ? String : Number)(input);\n}","import _typeof from \"./typeof.js\";\nimport toPrimitive from \"./toPrimitive.js\";\nexport default function _toPropertyKey(arg) {\n var key = toPrimitive(arg, \"string\");\n return _typeof(key) === \"symbol\" ? key : String(key);\n}","import toPropertyKey from \"./toPropertyKey.js\";\nexport default function _defineProperty(obj, key, value) {\n key = toPropertyKey(key);\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}","const SIZES = { nano: \"nano\", small: \"small\", large: \"large\" };\n\nconst DROPDOWN_BUTTON_SIZES = {\n nano: \"small\",\n small: \"medium\",\n large: \"large\",\n};\n\nexport { SIZES, DROPDOWN_BUTTON_SIZES };\n","import React from \"react\";\n\nimport { MenuHorizontal } from \"neetoicons\";\nimport { Dropdown as NeetoUIDropdown } from \"neetoui\";\n\nimport { DROPDOWN_BUTTON_SIZES } from \"./constants\";\n\nconst Dropdown = props => (\n <NeetoUIDropdown\n buttonSize={DROPDOWN_BUTTON_SIZES[props.size]}\n buttonStyle=\"secondary\"\n icon={MenuHorizontal}\n position=\"bottom-start\"\n strategy=\"fixed\"\n {...props}\n />\n);\n\nexport default Dropdown;\n","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}}export{n as default};\n","import React from \"react\";\n\nimport classnames from \"classnames\";\nimport { noop, isNotEmpty } from \"neetocist\";\nimport Breadcrumbs from \"neetomolecules/Breadcrumbs\";\nimport Search from \"neetomolecules/Search\";\nimport { Typography } from \"neetoui\";\nimport PropTypes from \"prop-types\";\n\nimport { SIZES } from \"./constants\";\nimport Dropdown from \"./Dropdown\";\nimport \"./header.scss\";\n\nconst Header = ({\n title,\n searchProps,\n className = \"\",\n actionBlock,\n breadcrumbs = [],\n renderDropdown = noop,\n size = \"large\",\n \"data-testid\": dataTestId = \"neeto-molecules-header\",\n}) => (\n <div\n data-cy=\"neeto-molecules-header\"\n data-testid={dataTestId}\n className={classnames([\n \"neeto-molecules-header\",\n {\n \"neeto-molecules-header--has-breadcrumbs\": isNotEmpty(breadcrumbs),\n \"neeto-molecules-header--large\": size === SIZES.large,\n \"neeto-molecules-header--small\": size === SIZES.small,\n \"neeto-molecules-header--nano\": size === SIZES.nano,\n },\n className,\n ])}\n >\n <div className=\"neeto-molecules-header__left\">\n <div className=\"neeto-molecules-header__left-data-wrap\">\n {isNotEmpty(breadcrumbs) && <Breadcrumbs {...{ breadcrumbs }} />}\n <div className=\"neeto-molecules-header__page-title\">\n <Typography\n data-cy=\"main-header\"\n data-test-id=\"main-header\"\n lineHeight=\"tight\"\n style=\"h2\"\n weight=\"semibold\"\n >\n {title}\n </Typography>\n {renderDropdown(props => (\n <Dropdown {...{ size, ...props }} />\n ))}\n </div>\n </div>\n </div>\n <div className=\"neeto-molecules-header__right\">\n {searchProps && (\n <Search\n className={classnames([\n \"neeto-molecules-header__search-input\",\n searchProps.className,\n ])}\n {...searchProps}\n />\n )}\n {actionBlock && (\n <div className=\"neeto-molecules-header__action-block\">\n {actionBlock}\n </div>\n )}\n </div>\n </div>\n);\n\nHeader.propTypes = {\n /**\n * To set a title in the Header section.\n */\n title: PropTypes.node,\n /**\n * To specify additional class names.\n */\n className: PropTypes.string,\n /**\n * To specify the content to be rendered in the right side of the Header section.\n */\n\n actionBlock: PropTypes.node,\n /**\n * To add **Search** molecule to the subheader section.\n */\n searchProps: PropTypes.object,\n /**\n * To show breadcrumbs in the Header section. `text` accepts a text string to be shown as the breadcrumb and `link` accepts relative URL path for the breadcrumb.\n */\n breadcrumbs: PropTypes.arrayOf(\n PropTypes.shape({\n text: PropTypes.string,\n link: PropTypes.string,\n })\n ),\n /**\n * A function to render the Dropdown next to the title. It provides the Dropdown component as argument.\n */\n renderDropdown: PropTypes.func,\n /**\n * To specify size of the Header.\n *\n * `large` - Default size. To be used in index pages.\n *\n * `small` - To be used in inner pages.\n *\n * `nano` - To be used in inner pages with menubar.\n */\n size: PropTypes.oneOf([\"nano\", \"small\", \"large\"]),\n};\n\nexport default Header;\n"],"names":["toPrimitive","toPropertyKey","SIZES","nano","small","large","DROPDOWN_BUTTON_SIZES","Dropdown","props","React","createElement","NeetoUIDropdown","_extends","buttonSize","size","buttonStyle","icon","MenuHorizontal","position","strategy","Header","_ref","title","searchProps","_ref$className","className","actionBlock","_ref$breadcrumbs","breadcrumbs","_ref$renderDropdown","renderDropdown","noop","_ref$size","_ref$dataTestid","dataTestId","classnames","isNotEmpty","Breadcrumbs","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AG,WAAW,iBACVjB,yBAAA,CAAAC,aAAA,CAAA,KAAA,EAAA;AAAKe,IAAAA,SAAS,EAAC,sCAAA;GACZC,EAAAA,WACE,CAEJ,CACF,CAAC,CAAA;AAAA;;;;"}
|
package/dist/cjs/HelpPopover.js
CHANGED
|
@@ -1,12 +1,56 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var React = require('react');
|
|
4
|
+
var classNames = require('classnames');
|
|
5
|
+
var neetoCist = require('@bigbinary/neeto-cist');
|
|
4
6
|
var neetoIcons = require('@bigbinary/neeto-icons');
|
|
5
7
|
var neetoui = require('@bigbinary/neetoui');
|
|
6
8
|
|
|
7
9
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
10
|
|
|
9
11
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
12
|
+
var classNames__default = /*#__PURE__*/_interopDefaultLegacy(classNames);
|
|
13
|
+
|
|
14
|
+
function _typeof(o) {
|
|
15
|
+
"@babel/helpers - typeof";
|
|
16
|
+
|
|
17
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
18
|
+
return typeof o;
|
|
19
|
+
} : function (o) {
|
|
20
|
+
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
21
|
+
}, _typeof(o);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
function _toPrimitive(input, hint) {
|
|
25
|
+
if (_typeof(input) !== "object" || input === null) return input;
|
|
26
|
+
var prim = input[Symbol.toPrimitive];
|
|
27
|
+
if (prim !== undefined) {
|
|
28
|
+
var res = prim.call(input, hint || "default");
|
|
29
|
+
if (_typeof(res) !== "object") return res;
|
|
30
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
31
|
+
}
|
|
32
|
+
return (hint === "string" ? String : Number)(input);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
function _toPropertyKey(arg) {
|
|
36
|
+
var key = _toPrimitive(arg, "string");
|
|
37
|
+
return _typeof(key) === "symbol" ? key : String(key);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
function _defineProperty(obj, key, value) {
|
|
41
|
+
key = _toPropertyKey(key);
|
|
42
|
+
if (key in obj) {
|
|
43
|
+
Object.defineProperty(obj, key, {
|
|
44
|
+
value: value,
|
|
45
|
+
enumerable: true,
|
|
46
|
+
configurable: true,
|
|
47
|
+
writable: true
|
|
48
|
+
});
|
|
49
|
+
} else {
|
|
50
|
+
obj[key] = value;
|
|
51
|
+
}
|
|
52
|
+
return obj;
|
|
53
|
+
}
|
|
10
54
|
|
|
11
55
|
function _extends() {
|
|
12
56
|
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
@@ -23,11 +67,41 @@ function _extends() {
|
|
|
23
67
|
return _extends.apply(this, arguments);
|
|
24
68
|
}
|
|
25
69
|
|
|
70
|
+
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
71
|
+
if (source == null) return {};
|
|
72
|
+
var target = {};
|
|
73
|
+
var sourceKeys = Object.keys(source);
|
|
74
|
+
var key, i;
|
|
75
|
+
for (i = 0; i < sourceKeys.length; i++) {
|
|
76
|
+
key = sourceKeys[i];
|
|
77
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
78
|
+
target[key] = source[key];
|
|
79
|
+
}
|
|
80
|
+
return target;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
function _objectWithoutProperties(source, excluded) {
|
|
84
|
+
if (source == null) return {};
|
|
85
|
+
var target = _objectWithoutPropertiesLoose(source, excluded);
|
|
86
|
+
var key, i;
|
|
87
|
+
if (Object.getOwnPropertySymbols) {
|
|
88
|
+
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
89
|
+
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
|
90
|
+
key = sourceSymbolKeys[i];
|
|
91
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
92
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
93
|
+
target[key] = source[key];
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
return target;
|
|
97
|
+
}
|
|
98
|
+
|
|
26
99
|
var SIZE = {
|
|
27
100
|
"default": 16,
|
|
28
101
|
large: 20
|
|
29
102
|
};
|
|
30
103
|
|
|
104
|
+
var _excluded = ["title", "size", "description", "helpLinkProps", "popoverProps", "className"];
|
|
31
105
|
var Title = neetoui.Popover.Title;
|
|
32
106
|
var HelpPopover = function HelpPopover(_ref) {
|
|
33
107
|
var title = _ref.title,
|
|
@@ -35,10 +109,12 @@ var HelpPopover = function HelpPopover(_ref) {
|
|
|
35
109
|
size = _ref$size === void 0 ? "default" : _ref$size,
|
|
36
110
|
description = _ref.description,
|
|
37
111
|
helpLinkProps = _ref.helpLinkProps,
|
|
38
|
-
popoverProps = _ref.popoverProps
|
|
112
|
+
popoverProps = _ref.popoverProps,
|
|
113
|
+
className = _ref.className,
|
|
114
|
+
otherProps = _objectWithoutProperties(_ref, _excluded);
|
|
39
115
|
var helpIconRef = React.useRef();
|
|
40
|
-
|
|
41
|
-
|
|
116
|
+
var isCompact = neetoCist.isNotPresent(title) && neetoCist.isNotPresent(helpLinkProps);
|
|
117
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(neetoui.Button, _extends({}, otherProps, {
|
|
42
118
|
"data-cy": "help-popover-button",
|
|
43
119
|
"data-testid": "help-popover-button",
|
|
44
120
|
icon: function icon() {
|
|
@@ -47,33 +123,40 @@ var HelpPopover = function HelpPopover(_ref) {
|
|
|
47
123
|
});
|
|
48
124
|
},
|
|
49
125
|
ref: helpIconRef,
|
|
50
|
-
style: "text"
|
|
51
|
-
|
|
52
|
-
|
|
126
|
+
style: "text",
|
|
127
|
+
className: classNames__default["default"]("neeto-molecule-help-popover-trigger neeto-ui-rounded-full bg-transparent p-0", className)
|
|
128
|
+
})), /*#__PURE__*/React__default["default"].createElement(neetoui.Tooltip, _extends({
|
|
53
129
|
appendTo: function appendTo() {
|
|
54
130
|
return document.body;
|
|
55
131
|
}
|
|
56
132
|
}, popoverProps, {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
className: "
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
"
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
133
|
+
interactive: true,
|
|
134
|
+
arrow: isCompact ? undefined : true,
|
|
135
|
+
className: classNames__default["default"](_defineProperty({}, "neeto-ui-popover", !isCompact)),
|
|
136
|
+
reference: helpIconRef,
|
|
137
|
+
role: "tooltip",
|
|
138
|
+
theme: isCompact ? "dark" : "light",
|
|
139
|
+
content: /*#__PURE__*/React__default["default"].createElement("div", {
|
|
140
|
+
className: "flex flex-col"
|
|
141
|
+
}, title && /*#__PURE__*/React__default["default"].createElement(Title, {
|
|
142
|
+
"data-cy": "help-popover-title",
|
|
143
|
+
"data-testid": "help-popover-title"
|
|
144
|
+
}, title), typeof description === "string" && !isCompact ? /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
145
|
+
"data-cy": "help-popover-description",
|
|
146
|
+
"data-testid": "help-popover-description",
|
|
147
|
+
lineHeight: "normal",
|
|
148
|
+
style: "body2"
|
|
149
|
+
}, description) : description, helpLinkProps && /*#__PURE__*/React__default["default"].createElement(neetoui.Button, _extends({
|
|
150
|
+
className: "neeto-ui-mt-3",
|
|
151
|
+
"data-cy": "help-popover-link-button",
|
|
152
|
+
label: "View help article",
|
|
153
|
+
size: "small"
|
|
154
|
+
}, helpLinkProps, {
|
|
155
|
+
"data-testid": "help-popover-link-button",
|
|
156
|
+
style: "link",
|
|
157
|
+
target: "_blank"
|
|
158
|
+
})))
|
|
159
|
+
})));
|
|
77
160
|
};
|
|
78
161
|
|
|
79
162
|
module.exports = HelpPopover;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HelpPopover.js","sources":["../../node_modules/@babel/runtime/helpers/esm/extends.js","../../src/components/HelpPopover/constants.js","../../src/components/HelpPopover/index.jsx"],"sourcesContent":["export default function _extends() {\n _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n}","export const SIZE = { default: 16, large: 20 };\n","import React, { useRef } from \"react\";\n\nimport { Help } from \"neetoicons\";\nimport { Button, Popover, Typography } from \"neetoui\";\nimport PropTypes from \"prop-types\";\n\nimport { SIZE } from \"./constants\";\n\nconst { Title } = Popover;\n\nconst HelpPopover = ({\n title,\n size = \"default\",\n description,\n helpLinkProps,\n popoverProps,\n}) => {\n const helpIconRef = useRef();\n\n return (\n <>\n <Button\n className=\"neeto-molecule-help-popover-trigger neeto-ui-rounded-full bg-transparent p-0\"\n data-cy=\"help-popover-button\"\n data-testid=\"help-popover-button\"\n icon={() => <Help size={SIZE[size]} />}\n ref={helpIconRef}\n style=\"text\"\n />\n <Popover\n interactive\n appendTo={() => document.body}\n {...popoverProps}\n reference={helpIconRef}\n >\n <div className=\"flex flex-col\">\n {title && (\n <Title\n data-cy=\"help-popover-title\"\n data-testid=\"help-popover-title\"\n >\n {title}\n </Title>\n )}\n {typeof description === \"string\" ? (\n <Typography\n data-cy=\"help-popover-description\"\n data-testid=\"help-popover-description\"\n lineHeight=\"normal\"\n style=\"body2\"\n >\n {description}\n </Typography>\n ) : (\n description\n )}\n {helpLinkProps && (\n <Button\n className=\"neeto-ui-mt-3\"\n size=\"small\"\n {...helpLinkProps}\n data-cy=\"help-popover-link-button\"\n data-testid=\"help-popover-link-button\"\n style=\"link\"\n target=\"_blank\"\n />\n )}\n </div>\n </Popover>\n </>\n );\n};\n\nHelpPopover.propTypes = {\n /**\n * To set the title of the help popover.\n */\n title: PropTypes.string,\n /**\n * To set the size of the popover help icon.\n */\n size: PropTypes.oneOf([\"default\", \"large\"]),\n /**\n * To set the description of the popover, this can be a string or a custom component.\n */\n description: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),\n /**\n * To set the props of the help link which is displayed below the description.\n */\n helpLinkProps: PropTypes.object,\n /**\n * To set the props of the popover to customize it further.\n */\n popoverProps: PropTypes.object,\n};\n\nexport default HelpPopover;\n"],"names":["SIZE","large","Title","Popover","HelpPopover","_ref","title","_ref$size","size","description","helpLinkProps","popoverProps","helpIconRef","useRef","React","createElement","Fragment","Button","className","icon","Help","ref","style","_extends","interactive","appendTo","document","body","reference","Typography","lineHeight","target"],"mappings":";;;;;;;;;;AAAe,SAAS,QAAQ,GAAG;AACnC,EAAE,QAAQ,GAAG,MAAM,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,GAAG,UAAU,MAAM,EAAE;AACtE,IAAI,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;AAC/C,MAAM,IAAI,MAAM,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC;AAChC,MAAM,KAAK,IAAI,GAAG,IAAI,MAAM,EAAE;AAC9B,QAAQ,IAAI,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE;AAC/D,UAAU,MAAM,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;AACpC,SAAS;AACT,OAAO;AACP,KAAK;AACL,IAAI,OAAO,MAAM,CAAC;AAClB,GAAG,CAAC;AACJ,EAAE,OAAO,QAAQ,CAAC,KAAK,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;AACzC;;ACbO,IAAMA,IAAI,GAAG;A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AEhB,WAAAA;GAEXE,CAAAA,eAAAA,yBAAA,CAAAC,aAAA,CAAA,KAAA,EAAA;AAAKG,IAAAA,SAAS,EAAC,eAAA;AAAe,GAAA,EAC3BZ,KAAK,iBACJQ,yBAAA,CAAAC,aAAA,CAACb,KAAK,EAAA;AACJ,IAAA,SAAA,EAAQ,oBAAoB;IAC5B,aAAY,EAAA,oBAAA;AAAoB,GAAA,EAE/BI,KACI,CACR,EACA,OAAOG,WAAW,KAAK,QAAQ,gBAC9BK,yBAAA,CAAAC,aAAA,CAACc,kBAAU,EAAA;AACT,IAAA,SAAA,EAAQ,0BAA0B;AAClC,IAAA,aAAA,EAAY,0BAA0B;AACtCC,IAAAA,UAAU,EAAC,QAAQ;AACnBR,IAAAA,KAAK,EAAC,OAAA;AAAO,GAAA,EAEZb,WACS,CAAC,GAEbA,WACD,EACAC,aAAa,iBACZI,yBAAA,CAAAC,aAAA,CAACE,cAAM,EAAAM,QAAA,CAAA;AACLL,IAAAA,SAAS,EAAC,eAAe;AACzBV,IAAAA,IAAI,EAAC,OAAA;AAAO,GAAA,EACRE,aAAa,EAAA;AACjB,IAAA,SAAA,EAAQ,0BAA0B;AAClC,IAAA,aAAA,EAAY,0BAA0B;AACtCY,IAAAA,KAAK,EAAC,MAAM;AACZS,IAAAA,MAAM,EAAC,QAAA;GACR,CAAA,CAEA,CACE,CACT,CAAC,CAAA;AAEP;;;;"}
|
|
1
|
+
{"version":3,"file":"HelpPopover.js","sources":["../../node_modules/@babel/runtime/helpers/esm/typeof.js","../../node_modules/@babel/runtime/helpers/esm/toPrimitive.js","../../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js","../../node_modules/@babel/runtime/helpers/esm/defineProperty.js","../../node_modules/@babel/runtime/helpers/esm/extends.js","../../node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js","../../node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js","../../src/components/HelpPopover/constants.js","../../src/components/HelpPopover/index.jsx"],"sourcesContent":["export default function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, _typeof(o);\n}","import _typeof from \"./typeof.js\";\nexport default function _toPrimitive(input, hint) {\n if (_typeof(input) !== \"object\" || input === null) return input;\n var prim = input[Symbol.toPrimitive];\n if (prim !== undefined) {\n var res = prim.call(input, hint || \"default\");\n if (_typeof(res) !== \"object\") return res;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (hint === \"string\" ? String : Number)(input);\n}","import _typeof from \"./typeof.js\";\nimport toPrimitive from \"./toPrimitive.js\";\nexport default function _toPropertyKey(arg) {\n var key = toPrimitive(arg, \"string\");\n return _typeof(key) === \"symbol\" ? key : String(key);\n}","import toPropertyKey from \"./toPropertyKey.js\";\nexport default function _defineProperty(obj, key, value) {\n key = toPropertyKey(key);\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}","export default function _extends() {\n _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n}","export default function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n return target;\n}","import objectWithoutPropertiesLoose from \"./objectWithoutPropertiesLoose.js\";\nexport default function _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n var target = objectWithoutPropertiesLoose(source, excluded);\n var key, i;\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n return target;\n}","export const SIZE = { default: 16, large: 20 };\n","import React, { useRef } from \"react\";\n\nimport classNames from \"classnames\";\nimport { isNotPresent } from \"neetocist\";\nimport { Help } from \"neetoicons\";\nimport { Button, Popover, Tooltip, Typography } from \"neetoui\";\nimport PropTypes from \"prop-types\";\n\nimport { SIZE } from \"./constants\";\n\nconst { Title } = Popover;\n\nconst HelpPopover = ({\n title,\n size = \"default\",\n description,\n helpLinkProps,\n popoverProps,\n className,\n ...otherProps\n}) => {\n const helpIconRef = useRef();\n\n const isCompact = isNotPresent(title) && isNotPresent(helpLinkProps);\n\n return (\n <>\n <Button\n {...otherProps}\n data-cy=\"help-popover-button\"\n data-testid=\"help-popover-button\"\n icon={() => <Help size={SIZE[size]} />}\n ref={helpIconRef}\n style=\"text\"\n className={classNames(\n \"neeto-molecule-help-popover-trigger neeto-ui-rounded-full bg-transparent p-0\",\n className\n )}\n />\n <Tooltip\n appendTo={() => document.body}\n {...popoverProps}\n interactive\n arrow={isCompact ? undefined : true}\n className={classNames({ [\"neeto-ui-popover\"]: !isCompact })}\n reference={helpIconRef}\n role=\"tooltip\"\n theme={isCompact ? \"dark\" : \"light\"}\n content={\n <div className=\"flex flex-col\">\n {title && (\n <Title\n data-cy=\"help-popover-title\"\n data-testid=\"help-popover-title\"\n >\n {title}\n </Title>\n )}\n {typeof description === \"string\" && !isCompact ? (\n <Typography\n data-cy=\"help-popover-description\"\n data-testid=\"help-popover-description\"\n lineHeight=\"normal\"\n style=\"body2\"\n >\n {description}\n </Typography>\n ) : (\n description\n )}\n {helpLinkProps && (\n <Button\n className=\"neeto-ui-mt-3\"\n data-cy=\"help-popover-link-button\"\n label=\"View help article\"\n size=\"small\"\n {...helpLinkProps}\n data-testid=\"help-popover-link-button\"\n style=\"link\"\n target=\"_blank\"\n />\n )}\n </div>\n }\n />\n </>\n );\n};\n\nHelpPopover.propTypes = {\n /**\n * To set the title of the help popover.\n */\n title: PropTypes.string,\n /**\n * To set the size of the popover help icon.\n */\n size: PropTypes.oneOf([\"default\", \"large\"]),\n /**\n * To set the description of the popover, this can be a string or a custom component.\n */\n description: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),\n /**\n * To set the props of the help link which is displayed below the description.\n */\n helpLinkProps: PropTypes.object,\n /**\n * To set the props of the popover to customize it further.\n */\n popoverProps: PropTypes.object,\n /**\n * Additional classes passed on to the help button element.\n */\n className: PropTypes.string,\n};\n\nexport default HelpPopover;\n"],"names":["toPrimitive","toPropertyKey","objectWithoutPropertiesLoose","SIZE","large","Title","Popover","HelpPopover","_ref","title","_ref$size","size","description","helpLinkProps","popoverProps","className","otherProps","_objectWithoutProperties","_excluded","helpIconRef","useRef","isCompact","isNotPresent","React","createElement","Fragment","Button","_extends","icon","Help","ref","style","classNames","Tooltip","appendTo","document","body","interactive","arrow","undefined","_defineProperty","reference","role","theme","content","Typography","lineHeight","label","target"],"mappings":";;;;;;;;;;;;;AAAe,SAAS,OAAO,CAAC,CAAC,EAAE;AACnC,EAAE,yBAAyB,CAAC;AAC5B;AACA,EAAE,OAAO,OAAO,GAAG,UAAU,IAAI,OAAO,MAAM,IAAI,QAAQ,IAAI,OAAO,MAAM,CAAC,QAAQ,GAAG,UAAU,CAAC,EAAE;AACpG,IAAI,OAAO,OAAO,CAAC,CAAC;AACpB,GAAG,GAAG,UAAU,CAAC,EAAE;AACnB,IAAI,OAAO,CAAC,IAAI,UAAU,IAAI,OAAO,MAAM,IAAI,CAAC,CAAC,WAAW,KAAK,MAAM,IAAI,CAAC,KAAK,MAAM,CAAC,SAAS,GAAG,QAAQ,GAAG,OAAO,CAAC,CAAC;AACxH,GAAG,EAAE,OAAO,CAAC,C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AACN,GAAA,CACF,CACD,CAAC,CAAA;AAEP;;;;"}
|
|
@@ -226,8 +226,6 @@ var PageLoader = function PageLoader(_ref) {
|
|
|
226
226
|
};
|
|
227
227
|
var PageLoader$1 = /*#__PURE__*/React__default["default"].memo(PageLoader);
|
|
228
228
|
|
|
229
|
-
// We need to apply a transformation for the label. Hence disabling this lint warning.
|
|
230
|
-
// eslint-disable-next-line @bigbinary/neeto/use-functions-and-hooks-from-neeto-commons-frontend
|
|
231
229
|
var toLabelAndValue = function toLabelAndValue(value) {
|
|
232
230
|
return {
|
|
233
231
|
label: humanizeIpAddressFormat(value),
|
|
@@ -315,7 +313,7 @@ var buildInitialValue = function buildInitialValue(isIpRestrictionEnabled, allow
|
|
|
315
313
|
};
|
|
316
314
|
};
|
|
317
315
|
var buildAllowedIpRangesFormData = function buildAllowedIpRangesFormData(allowedIpRanges) {
|
|
318
|
-
return allowedIpRanges.map(function (allowedIpRange) {
|
|
316
|
+
return allowedIpRanges === null || allowedIpRanges === void 0 ? void 0 : allowedIpRanges.map(function (allowedIpRange) {
|
|
319
317
|
return ramda.assoc("addressType", toLabelAndValue(allowedIpRange.addressType), allowedIpRange);
|
|
320
318
|
});
|
|
321
319
|
};
|