@bigbinary/neeto-molecules 3.1.0 → 3.1.1

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/Header.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import _extends from '@babel/runtime/helpers/extends';
2
2
  import _defineProperty from '@babel/runtime/helpers/defineProperty';
3
3
  import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
4
- import React__default from 'react';
4
+ import React__default, { useRef, useLayoutEffect } from 'react';
5
5
  import classnames from 'classnames';
6
6
  import { isNotEmpty, noop } from '@bigbinary/neeto-cist';
7
7
  import Typography from '@bigbinary/neetoui/Typography';
@@ -37,7 +37,7 @@ var DROPDOWN_BUTTON_SIZES = {
37
37
  large: "large"
38
38
  };
39
39
 
40
- 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}}";
40
+ var css = ":root{--neeto-molecules-main-header-height:98px;--neeto-molecules-main-header-with-breadcrumbs-height:170px;--neeto-molecules-effective-header-height:0px}.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;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}.neeto-molecules-header .neeto-molecules-header__right:empty{display:none;visibility:hidden}@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 .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}}";
41
41
  n(css,{});
42
42
 
43
43
  var _excluded = ["dropdownButtonProps"];
@@ -57,9 +57,23 @@ var Header = function Header(_ref) {
57
57
  size = _ref$size === void 0 ? "large" : _ref$size,
58
58
  _ref$dataTestid = _ref["data-testid"],
59
59
  dataTestId = _ref$dataTestid === void 0 ? "neeto-molecules-header" : _ref$dataTestid;
60
+ var headerRef = useRef(null);
61
+ useLayoutEffect(function () {
62
+ var updateHeaderHeight = function updateHeaderHeight() {
63
+ if (!headerRef.current) return;
64
+ var height = headerRef.current.offsetHeight;
65
+ document.body.style.setProperty("--neeto-molecules-effective-header-height", "".concat(height, "px"));
66
+ };
67
+ updateHeaderHeight();
68
+ window.addEventListener("resize", updateHeaderHeight);
69
+ return function () {
70
+ return window.removeEventListener("resize", updateHeaderHeight);
71
+ };
72
+ }, []);
60
73
  return /*#__PURE__*/React__default.createElement("div", {
61
74
  "data-cy": "neeto-molecules-header",
62
75
  "data-testid": dataTestId,
76
+ ref: headerRef,
63
77
  className: classnames(["neeto-molecules-header", {
64
78
  "neeto-molecules-header--has-breadcrumbs": isNotEmpty(breadcrumbs),
65
79
  "neeto-molecules-header--large": size === SIZES.large,
@@ -1 +1 @@
1
- {"version":3,"file":"Header.js","sources":["../src/components/Header/constants.js","../src/components/Header/index.jsx"],"sourcesContent":["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 classnames from \"classnames\";\nimport { noop, isNotEmpty } from \"neetocist\";\nimport { Typography } from \"neetoui\";\nimport PropTypes from \"prop-types\";\n\nimport Breadcrumbs from \"components/Breadcrumbs\";\nimport MoreDropdown from \"components/MoreDropdown\";\nimport Search from \"components/Search\";\n\nimport { DROPDOWN_BUTTON_SIZES, SIZES } from \"./constants\";\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(({ dropdownButtonProps = {}, ...dropdownProps }) => (\n <MoreDropdown\n dropdownButtonProps={{\n size: DROPDOWN_BUTTON_SIZES[size],\n ...dropdownButtonProps,\n }}\n {...dropdownProps}\n />\n ))}\n </div>\n </div>\n </div>\n <div className=\"neeto-molecules-header__right\">\n {searchProps && (\n <Search\n enableUrlSync\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 MoreDropdown 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":["SIZES","nano","small","large","DROPDOWN_BUTTON_SIZES","Header","_ref","title","searchProps","_ref$className","className","actionBlock","_ref$breadcrumbs","breadcrumbs","_ref$renderDropdown","renderDropdown","noop","_ref$size","size","_ref$dataTestid","dataTestId","React","createElement","classnames","isNotEmpty","Breadcrumbs","Typography","lineHeight","style","weight","_ref2","_ref2$dropdownButtonP","dropdownButtonProps","dropdownProps","_objectWithoutProperties","_excluded","MoreDropdown","_extends","_objectSpread","Search","enableUrlSync"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAMA,KAAK,GAAG;AAAEC,EAAAA,IAAI,EAAE,MAAM;AAAEC,EAAAA,KAAK,EAAE,OAAO;AAAEC,EAAAA,KAAK,EAAE,OAAA;AA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BAAmB,CAAA;KAEpBC,EAAAA,aAAa,CAClB,CAAC,CAAA;AAAA,GACH,CACE,CACF,CACF,CAAC,eACNZ,cAAA,CAAAC,aAAA,CAAA,KAAA,EAAA;AAAKZ,IAAAA,SAAS,EAAC,+BAAA;GACZF,EAAAA,WAAW,iBACVa,cAAA,CAAAC,aAAA,CAACiB,MAAM,EAAAF,QAAA,CAAA;IACLG,aAAa,EAAA,IAAA;IACb9B,SAAS,EAAEa,UAAU,CAAC,CACpB,sCAAsC,EACtCf,WAAW,CAACE,SAAS,CACtB,CAAA;GACGF,EAAAA,WAAW,CAChB,CACF,EACAG,WAAW,iBACVU,cAAA,CAAAC,aAAA,CAAA,KAAA,EAAA;AAAKZ,IAAAA,SAAS,EAAC,sCAAA;GACZC,EAAAA,WACE,CAEJ,CACF,CAAC,CAAA;AAAA;;;;"}
1
+ {"version":3,"file":"Header.js","sources":["../src/components/Header/constants.js","../src/components/Header/index.jsx"],"sourcesContent":["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, { useLayoutEffect, useRef } from \"react\";\n\nimport classnames from \"classnames\";\nimport { noop, isNotEmpty } from \"neetocist\";\nimport { Typography } from \"neetoui\";\nimport PropTypes from \"prop-types\";\n\nimport Breadcrumbs from \"components/Breadcrumbs\";\nimport MoreDropdown from \"components/MoreDropdown\";\nimport Search from \"components/Search\";\n\nimport { DROPDOWN_BUTTON_SIZES, SIZES } from \"./constants\";\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 const headerRef = useRef(null);\n\n useLayoutEffect(() => {\n const updateHeaderHeight = () => {\n if (!headerRef.current) return;\n const height = headerRef.current.offsetHeight;\n document.body.style.setProperty(\n \"--neeto-molecules-effective-header-height\",\n `${height}px`\n );\n };\n\n updateHeaderHeight();\n\n window.addEventListener(\"resize\", updateHeaderHeight);\n\n return () => window.removeEventListener(\"resize\", updateHeaderHeight);\n }, []);\n\n return (\n <div\n data-cy=\"neeto-molecules-header\"\n data-testid={dataTestId}\n ref={headerRef}\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(\n ({ dropdownButtonProps = {}, ...dropdownProps }) => (\n <MoreDropdown\n dropdownButtonProps={{\n size: DROPDOWN_BUTTON_SIZES[size],\n ...dropdownButtonProps,\n }}\n {...dropdownProps}\n />\n )\n )}\n </div>\n </div>\n </div>\n <div className=\"neeto-molecules-header__right\">\n {searchProps && (\n <Search\n enableUrlSync\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};\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 MoreDropdown 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":["SIZES","nano","small","large","DROPDOWN_BUTTON_SIZES","Header","_ref","title","searchProps","_ref$className","className","actionBlock","_ref$breadcrumbs","breadcrumbs","_ref$renderDropdown","renderDropdown","noop","_ref$size","size","_ref$dataTestid","dataTestId","headerRef","useRef","useLayoutEffect","updateHeaderHeight","current","height","offsetHeight","document","body","style","setProperty","concat","window","addEventListener","removeEventListener","React","createElement","ref","classnames","isNotEmpty","Breadcrumbs","Typography","lineHeight","weight","_ref2","_ref2$dropdownButtonP","dropdownButtonProps","dropdownProps","_objectWithoutProperties","_excluded","MoreDropdown","_extends","_objectSpread","Search","enableUrlSync"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAMA,KAAK,GAAG;AAAEC,EAAAA,IAAI,EAAE,MAAM;AAAEC,EAAAA,KAAK,EAAE,OAAO;AAAEC,EAAAA,KAAK,EAAE,OAAA;AAAQ,CAAC,CAAA;AAE9D,IAAMC,qBAAqB,GAAG;AAC5BH,EAAAA,IAAI,EAAE,OAAO;AACbC,EAAAA,KAAK,EAAE,QAAQ;AACfC,EAAAA,KAAK,EAAE,OAAA;AACT,CAAC;;;;;;;;ACQD,IAAME,MAAM,GAAG,SAATA,MAAMA,CAAAC,IAAA,EASN;AAAA,EAAA,IARJC,KAAK,GAAAD,IAAA,CAALC,KAAK;IACLC,WAAW,GAAAF,IAAA,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AAc,CACb,UAAA8B,KAAA,EAAA;AAAA,IAAA,IAAAC,qBAAA,GAAAD,KAAA,CAAGE,mBAAmB;AAAnBA,MAAAA,mBAAmB,GAAAD,qBAAA,KAAA,KAAA,CAAA,GAAG,EAAE,GAAAA,qBAAA;AAAKE,MAAAA,aAAa,GAAAC,wBAAA,CAAAJ,KAAA,EAAAK,SAAA,CAAA,CAAA;AAAA,IAAA,oBAC3Cd,cAAA,CAAAC,aAAA,CAACc,YAAY,EAAAC,QAAA,CAAA;AACXL,MAAAA,mBAAmB,EAAAM,aAAA,CAAA;QACjBnC,IAAI,EAAEd,qBAAqB,CAACc,IAAI,CAAA;AAAC,OAAA,EAC9B6B,mBAAmB,CAAA;KAEpBC,EAAAA,aAAa,CAClB,CAAC,CAAA;AAAA,GAEN,CACG,CACF,CACF,CAAC,eACNZ,cAAA,CAAAC,aAAA,CAAA,KAAA,EAAA;AAAK3B,IAAAA,SAAS,EAAC,+BAAA;GACZF,EAAAA,WAAW,iBACV4B,cAAA,CAAAC,aAAA,CAACiB,MAAM,EAAAF,QAAA,CAAA;IACLG,aAAa,EAAA,IAAA;IACb7C,SAAS,EAAE6B,UAAU,CAAC,CACpB,sCAAsC,EACtC/B,WAAW,CAACE,SAAS,CACtB,CAAA;GACGF,EAAAA,WAAW,CAChB,CACF,EACAG,WAAW,iBACVyB,cAAA,CAAAC,aAAA,CAAA,KAAA,EAAA;AAAK3B,IAAAA,SAAS,EAAC,sCAAA;GACZC,EAAAA,WACE,CAEJ,CACF,CAAC,CAAA;AAEV;;;;"}
@@ -13,7 +13,7 @@ var SIZES = {
13
13
  viewport: "viewport"
14
14
  };
15
15
 
16
- var css = ".neeto-molecules-scrollable{flex-grow:1;overflow-y:auto}.neeto-molecules-scrollable.neeto-molecules-scrollable--nano{height:calc(100vh - var(--neeto-molecules-main-header-with-breadcrumbs-height) - var(--neeto-molecules-sub-header-height) - var(--neeto-molecules-sub-header-bottom-margin))}.neeto-molecules-scrollable.neeto-molecules-scrollable--small{height:calc(100vh - var(--neeto-molecules-main-header-height) - var(--neeto-molecules-sub-header-height) - var(--neeto-molecules-sub-header-bottom-margin))}.neeto-molecules-scrollable.neeto-molecules-scrollable--medium{height:calc(100vh - var(--neeto-molecules-main-header-with-breadcrumbs-height))}.neeto-molecules-scrollable.neeto-molecules-scrollable--large{height:calc(100vh - var(--neeto-molecules-main-header-height))}.neeto-molecules-scrollable.neeto-molecules-scrollable--viewport{height:100vh}";
16
+ var css = ".neeto-molecules-scrollable{flex-grow:1;overflow-y:auto}.neeto-molecules-scrollable.neeto-molecules-scrollable--nano,.neeto-molecules-scrollable.neeto-molecules-scrollable--small{height:calc(100vh - var(--neeto-molecules-effective-header-height) - var(--neeto-molecules-effective-subheader-height) - var(--neeto-molecules-sub-header-bottom-margin))}.neeto-molecules-scrollable.neeto-molecules-scrollable--large,.neeto-molecules-scrollable.neeto-molecules-scrollable--medium{height:calc(100vh - var(--neeto-molecules-effective-header-height))}.neeto-molecules-scrollable.neeto-molecules-scrollable--viewport{height:100vh}";
17
17
  n(css,{});
18
18
 
19
19
  var _excluded = ["children", "className", "size"];
package/dist/SubHeader.js CHANGED
@@ -1,4 +1,4 @@
1
- import React__default, { forwardRef, useMemo } from 'react';
1
+ import React__default, { forwardRef, useMemo, useRef, useLayoutEffect } from 'react';
2
2
  import classnames from 'classnames';
3
3
  import { isNotPresent } from '@bigbinary/neeto-cist';
4
4
  import { pluck, not } from 'ramda';
@@ -148,7 +148,7 @@ var RightBlock = function RightBlock(_ref) {
148
148
  }, downloadButtonProps && /*#__PURE__*/React__default.createElement(DownloadButton, downloadButtonProps), columnsButtonProps && /*#__PURE__*/React__default.createElement(Columns, columnsButtonProps), filterProps && /*#__PURE__*/React__default.createElement(FilterButton, filterProps));
149
149
  };
150
150
 
151
- var css = ":root{--neeto-molecules-sub-header-height:37px;--neeto-molecules-sub-header-bottom-margin:20px}.neeto-molecules-subheader{align-items:center;background-color:rgb(var(--neeto-ui-white));display:flex;flex-direction:row;flex-shrink:0;gap:16px;justify-content:space-between;margin-bottom:20px;margin-bottom:var(--neeto-molecules-sub-header-bottom-margin);min-height:37px;min-height:var(--neeto-molecules-sub-header-height);width:100%}@media screen and (max-width:768px){.neeto-molecules-subheader{flex-wrap:wrap}}.neeto-molecules-subheader .neeto-molecules-subheader__left-wrapper{display:flex;flex-grow:1}.neeto-molecules-subheader .neeto-molecules-subheader__left-wrapper .neeto-molecules-subheader__left{align-items:center;display:flex;flex-direction:row;justify-content:flex-start}.neeto-molecules-subheader .neeto-molecules-subheader__left-wrapper .neeto-molecules-subheader__left .neeto-molecules-input__prefix{color:rgb(var(--neeto-ui-gray-400))}@media screen and (max-width:360px){.neeto-molecules-subheader .neeto-molecules-subheader__left-wrapper .neeto-molecules-subheader__left h4{font-size:14px}}.neeto-molecules-subheader .neeto-molecules-subheader__left-wrapper .neeto-ui-btn{flex-shrink:0}.neeto-molecules-subheader .neeto-molecules-subheader__right{align-items:center;display:flex;flex-direction:row;gap:12px;justify-content:flex-end}@media screen and (max-width:768px){.neeto-molecules-subheader .neeto-molecules-subheader__right{margin-left:auto}}.neeto-molecules-subheader .neeto-molecules-subheader__right-actions{align-items:center;display:flex;flex-direction:row;gap:8px;justify-content:flex-end}.neeto-molecules-subheader .neeto-molecules-subheader__right-actions>:not([hidden])~:not([hidden]){border-left:thin solid rgb(var(--neeto-ui-gray-200));padding-left:8px}.neeto-molecules-subheader__download{position:relative}.neeto-molecules-subheader__download-count{align-items:center;background-color:rgb(var(--neeto-ui-accent-500));border-radius:var(--neeto-ui-rounded-full);color:rgb(var(--neeto-ui-white));display:inline-flex;font-size:10px;justify-content:center;min-height:16px;min-width:16px;position:absolute;right:-2px;text-align:center;top:-2px;z-index:1}.neeto-molecules-subheader__columns .neeto-ui-dropdown__popup{max-height:calc(100vh - var(--neeto-molecules-main-header-with-breadcrumbs-height) - 57px);max-height:calc(100vh - var(--neeto-molecules-main-header-with-breadcrumbs-height) - var(--neeto-molecules-sub-header-height) - var(--neeto-molecules-sub-header-bottom-margin));min-width:320px}";
151
+ var css = ":root{--neeto-molecules-sub-header-height:37px;--neeto-molecules-sub-header-bottom-margin:20px;--neeto-molecules-effective-subheader-height:0px}.neeto-molecules-subheader{align-items:center;background-color:rgb(var(--neeto-ui-white));display:flex;flex-direction:row;flex-shrink:0;gap:16px;justify-content:space-between;margin-bottom:20px;margin-bottom:var(--neeto-molecules-sub-header-bottom-margin);width:100%}@media screen and (max-width:768px){.neeto-molecules-subheader{flex-wrap:wrap}}.neeto-molecules-subheader .neeto-molecules-subheader__left-wrapper{display:flex;flex-grow:1}.neeto-molecules-subheader .neeto-molecules-subheader__left-wrapper .neeto-molecules-subheader__left{align-items:center;display:flex;flex-direction:row;justify-content:flex-start}.neeto-molecules-subheader .neeto-molecules-subheader__left-wrapper .neeto-molecules-subheader__left .neeto-molecules-input__prefix{color:rgb(var(--neeto-ui-gray-400))}@media screen and (max-width:360px){.neeto-molecules-subheader .neeto-molecules-subheader__left-wrapper .neeto-molecules-subheader__left h4{font-size:14px}}.neeto-molecules-subheader .neeto-molecules-subheader__left-wrapper .neeto-ui-btn{flex-shrink:0}.neeto-molecules-subheader .neeto-molecules-subheader__right{align-items:center;display:flex;flex-direction:row;gap:12px;justify-content:flex-end}@media screen and (max-width:768px){.neeto-molecules-subheader .neeto-molecules-subheader__right{margin-left:auto}}.neeto-molecules-subheader .neeto-molecules-subheader__right-actions{align-items:center;display:flex;flex-direction:row;gap:8px;justify-content:flex-end}.neeto-molecules-subheader .neeto-molecules-subheader__right-actions>:not([hidden])~:not([hidden]){border-left:thin solid rgb(var(--neeto-ui-gray-200));padding-left:8px}.neeto-molecules-subheader__download{position:relative}.neeto-molecules-subheader__download-count{align-items:center;background-color:rgb(var(--neeto-ui-accent-500));border-radius:var(--neeto-ui-rounded-full);color:rgb(var(--neeto-ui-white));display:inline-flex;font-size:10px;justify-content:center;min-height:16px;min-width:16px;position:absolute;right:-2px;text-align:center;top:-2px;z-index:1}.neeto-molecules-subheader__columns .neeto-ui-dropdown__popup{max-height:calc(100vh - var(--neeto-molecules-effective-header-height) - 57px);max-height:calc(100vh - var(--neeto-molecules-effective-header-height) - var(--neeto-molecules-sub-header-height) - var(--neeto-molecules-sub-header-bottom-margin));min-width:320px}";
152
152
  n(css,{});
153
153
 
154
154
  var SubHeader = function SubHeader(_ref) {
@@ -158,10 +158,24 @@ var SubHeader = function SubHeader(_ref) {
158
158
  rightActionBlock = _ref.rightActionBlock,
159
159
  _ref$dataCy = _ref["data-cy"],
160
160
  dataCy = _ref$dataCy === void 0 ? "subheader" : _ref$dataCy;
161
+ var subheaderRef = useRef(null);
162
+ useLayoutEffect(function () {
163
+ var updateHeaderHeight = function updateHeaderHeight() {
164
+ if (!subheaderRef.current) return;
165
+ var height = subheaderRef.current.offsetHeight;
166
+ document.body.style.setProperty("--neeto-molecules-effective-subheader-height", "".concat(height, "px"));
167
+ };
168
+ updateHeaderHeight();
169
+ window.addEventListener("resize", updateHeaderHeight);
170
+ return function () {
171
+ return window.removeEventListener("resize", updateHeaderHeight);
172
+ };
173
+ }, []);
161
174
  return /*#__PURE__*/React__default.createElement("div", {
162
175
  className: classnames(["neeto-molecules-subheader", className]),
163
176
  "data-cy": dataCy,
164
- "data-testid": "subheader"
177
+ "data-testid": "subheader",
178
+ ref: subheaderRef
165
179
  }, /*#__PURE__*/React__default.createElement("div", {
166
180
  className: "neeto-molecules-subheader__left-wrapper",
167
181
  "data-cy": "subheader-left-wrapper"
@@ -1 +1 @@
1
- {"version":3,"file":"SubHeader.js","sources":["../src/components/SubHeader/RightBlock/Columns.jsx","../src/components/SubHeader/RightBlock/Download.jsx","../src/components/SubHeader/RightBlock/Filter.jsx","../src/components/SubHeader/RightBlock/index.jsx","../src/components/SubHeader/index.jsx"],"sourcesContent":["import React, { forwardRef, useMemo } from \"react\";\n\nimport { Column } from \"neetoicons\";\nimport { Button } from \"neetoui\";\nimport { pluck } from \"ramda\";\nimport { useTranslation } from \"react-i18next\";\n\nimport ManageColumns, { useHiddenColumns } from \"components/Columns\";\n\nconst Columns = forwardRef(\n (\n { buttonProps = {}, columnData, localStorageKey, fixedColumns, ...props },\n ref\n ) => {\n const { t } = useTranslation();\n\n const columnDataIndex = useMemo(\n () =>\n pluck(\n \"dataIndex\",\n (columnData || []).filter(\n column => !fixedColumns?.includes(column.dataIndex)\n )\n ),\n [columnData, fixedColumns]\n );\n\n const { hideColumn, showColumn } = useHiddenColumns(localStorageKey);\n\n return (\n <div className=\"neeto-molecules-subheader__columns\">\n <ManageColumns\n isSearchable\n className=\"neeto-ui-dropdown--manage-columns\"\n actionBlock={\n <div className=\"grid grid-cols-2 gap-2 px-4 py-3\">\n <Button\n className=\"col-span-1 justify-center\"\n label=\"Hide all\"\n style=\"secondary\"\n onClick={() => hideColumn(columnDataIndex)}\n />\n <Button\n className=\"col-span-1 justify-center\"\n label=\"Show all\"\n style=\"secondary\"\n onClick={() => showColumn(columnDataIndex)}\n />\n </div>\n }\n buttonProps={{\n icon: Column,\n label: null,\n tooltipProps: {\n content: t(\"neetoMolecules.columns.columns\"),\n position: \"bottom\",\n },\n \"data-testid\": \"columns-button\",\n \"data-cy\": \"columns-dropdown-button\",\n ...buttonProps,\n }}\n {...{ columnData, localStorageKey, ...props, ref }}\n />\n </div>\n );\n }\n);\n\nColumns.displayName = \"Columns\";\nexport default Columns;\n","import React from \"react\";\n\nimport { Download } from \"neetoicons\";\nimport { Button } from \"neetoui\";\nimport { useTranslation } from \"react-i18next\";\n\nconst DownloadButton = ({\n count,\n onClick,\n \"data-cy\": dataCy = \"download-button\",\n}) => {\n const { t } = useTranslation();\n\n return (\n <div className=\"neeto-molecules-subheader__download\">\n <Button\n data-cy={dataCy}\n data-testid=\"download-button\"\n icon={Download}\n style=\"text\"\n tooltipProps={{\n content: t(\"neetoMolecules.common.download\"),\n position: \"bottom\",\n }}\n onClick={onClick}\n />\n {count && (\n <span className=\"neeto-molecules-subheader__download-count\">\n {count}\n </span>\n )}\n </div>\n );\n};\n\nexport default DownloadButton;\n","import React from \"react\";\n\nimport { Filters as NeetoFilters } from \"neetofilters\";\nimport { Filter } from \"neetoicons\";\nimport { useTranslation } from \"react-i18next\";\n\nconst FilterButton = ({ buttonProps, ...props }) => {\n const { t } = useTranslation();\n\n return (\n <div className=\"neeto-molecules-subheader__filter\">\n <NeetoFilters\n buttonProps={{\n \"data-testid\": \"filter-button\",\n icon: Filter,\n style: \"text\",\n tooltipProps: {\n content: t(\"neetoMolecules.common.filter\"),\n position: \"bottom\",\n },\n label: null,\n ...buttonProps,\n }}\n {...props}\n />\n </div>\n );\n};\n\nexport default FilterButton;\n","import React from \"react\";\n\nimport classnames from \"classnames\";\nimport { isNotPresent } from \"neetocist\";\nimport PropTypes from \"prop-types\";\nimport { not } from \"ramda\";\n\nimport Columns from \"./Columns\";\nimport Download from \"./Download\";\nimport Filter from \"./Filter\";\n\nconst RightBlock = ({\n downloadButtonProps,\n columnsButtonProps,\n filterProps,\n dataProps,\n}) => {\n const showIcons = isNotPresent(dataProps?.totalCount)\n ? true\n : dataProps?.totalCount > 0;\n\n return (\n <div\n data-testid=\"subheader-rightblock-buttons-container\"\n className={classnames(\"neeto-molecules-subheader__right-actions\", {\n hidden: not(showIcons),\n })}\n >\n {downloadButtonProps && <Download {...downloadButtonProps} />}\n {columnsButtonProps && <Columns {...columnsButtonProps} />}\n {filterProps && <Filter {...filterProps} />}\n </div>\n );\n};\n\nRightBlock.propTypes = {\n /**\n * Props that are passed to the download button.\n */\n downloadButtonProps: PropTypes.shape({\n count: PropTypes.number,\n onClick: PropTypes.func,\n }),\n /**\n * Props that are passed to the columns button, same as the `Columns` component from neetoMolecules.\n */\n columnsButtonProps: PropTypes.shape({\n onChange: PropTypes.func,\n actionBlock: PropTypes.node,\n checkboxProps: PropTypes.object,\n columnData: PropTypes.array,\n isSearchable: PropTypes.bool,\n localStorageKey: PropTypes.string,\n initialValue: PropTypes.array,\n noColumnMessage: PropTypes.string,\n searchProps: PropTypes.object,\n }),\n /**\n * Props that are passed the the filter component. These are the same props as the\n * neetoFilters `Filters` component.\n */\n filterProps: PropTypes.shape({\n size: PropTypes.oneOf([\"xsmall\", \"small\", \"large\"]),\n isOpen: PropTypes.bool,\n setIsOpen: PropTypes.func,\n columns: PropTypes.object,\n onChange: PropTypes.func,\n onSelectorsChange: PropTypes.func,\n buttonProps: PropTypes.object,\n paneProps: PropTypes.object,\n isSearchable: PropTypes.bool,\n className: PropTypes.string,\n }),\n /**\n * Props related to data being displayed, such as tables, lists, and more. The buttons\n * will be hidden if the value of `totalCount` in `dataProps` is `0`.\n */\n dataProps: PropTypes.shape({ totalCount: PropTypes.number }),\n};\n\nexport default RightBlock;\n","import React from \"react\";\n\nimport classnames from \"classnames\";\nimport PropTypes from \"prop-types\";\n\nimport RightBlock from \"./RightBlock\";\nimport \"./subheader.scss\";\n\nconst SubHeader = ({\n className = \"\",\n leftActionBlock,\n rightActionBlock,\n \"data-cy\": dataCy = \"subheader\",\n}) => (\n <div\n className={classnames([\"neeto-molecules-subheader\", className])}\n data-cy={dataCy}\n data-testid=\"subheader\"\n >\n <div\n className=\"neeto-molecules-subheader__left-wrapper\"\n data-cy=\"subheader-left-wrapper\"\n >\n {leftActionBlock && (\n <div\n className=\"neeto-molecules-subheader__left\"\n data-cy=\"subheader-left\"\n >\n {leftActionBlock}\n </div>\n )}\n </div>\n {rightActionBlock && (\n <div\n className=\"neeto-molecules-subheader__right\"\n data-cy=\"subheader-right\"\n >\n {rightActionBlock}\n </div>\n )}\n </div>\n);\n\nSubHeader.RightBlock = RightBlock;\n\nSubHeader.propTypes = {\n /**\n * To specify external classnames as overrides to the `SubHeader`.\n */\n className: PropTypes.string,\n /**\n * To specify the content to be rendered in the left side of the `SubHeader` section.\n */\n leftActionBlock: PropTypes.node,\n /**\n * To specify the content to be rendered in the right side of the `SubHeader` section.\n */\n rightActionBlock: PropTypes.node,\n};\n\nexport default SubHeader;\n"],"names":["Columns","forwardRef","_ref","ref","_ref$buttonProps","buttonProps","columnData","localStorageKey","fixedColumns","props","_objectWithoutProperties","_excluded","_useTranslation","useTranslation","t","columnDataIndex","useMemo","pluck","filter","column","includes","dataIndex","_useHiddenColumns","useHiddenColumns","hideColumn","showColumn","React","createElement","className","ManageColumns","_extends","isSearchable","actionBlock","Button","label","style","onClick","_objectSpread","icon","Column","tooltipProps","content","position","displayName","DownloadButton","count","_ref$dataCy","dataCy","Download","FilterButton","NeetoFilters","Filter","RightBlock","downloadButtonProps","columnsButtonProps","filterProps","dataProps","showIcons","isNotPresent","totalCount","classnames","hidden","not","SubHeader","_ref$className","leftActionBlock","rightActionBlock"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASA,IAAMA,OAAO,gBAAGC,UAAU,CACxB,UAAAC,IAAA,EAEEC,GAAG,EACA;AAAA,EAAA,IAAAC,gBAAA,GAAAF,IAAA,CAFDG,WAAW;AAAXA,IAAAA,WAAW,GAAAD,gBAAA,KAAA,KAAA,CAAA,GAAG,EAAE,GAAAA,gBAAA;IAAEE,UAAU,GAAAJ,IAAA,CAAVI,UAAU;IAAEC,eAAe,GAAAL,IAAA,CAAfK,eAAe;IAAEC,YAAY,GAAAN,IAAA,CAAZM,YAAY;AAAKC,IAAAA,KAAK,GAAAC,wBAAA,CAAAR,IAAA,EAAAS,WAAA,CAAA,CAAA;AAGvE,EAAA,IAAAC,eAAA,GAAcC,cAAc,EAAE;IAAtBC,CAAC,GAAAF,eAAA,CAADE,CAAC,CAAA;EAET,IAAMC,eAAe,GAAGC,OAAO,CAC7B,YAAA;AAAA,IAAA,OACEC,KAAK,CACH,WAAW,EACX,CAACX,UAAU,IAAI,EAAE,EAAEY,MAAM,CACvB,UAAAC,MAAM,EAAA;AAAA,MAAA,OAAI,EAACX,YAAY,KAAZA,IAAAA,IAAAA,YAAY,KAAZA,KAAAA,CAAAA,IAAAA,YAAY,CAAEY,QAAQ,CAACD,MAAM,CAACE,SAAS,CAAC,CAAA,CAAA;AAAA,KACrD,CACF,CAAC,CAAA;AAAA,GAAA,E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E;AAChE,IAAA,SAAA,EAASmB,MAAO;IAChB,aAAY,EAAA,WAAA;GAEZrB,eAAAA,cAAA,CAAAC,aAAA,CAAA,KAAA,EAAA;AACEC,IAAAA,SAAS,EAAC,yCAAyC;IACnD,SAAQ,EAAA,wBAAA;AAAwB,GAAA,EAE/BqC,eAAe,iBACdvC,cAAA,CAAAC,aAAA,CAAA,KAAA,EAAA;AACEC,IAAAA,SAAS,EAAC,iCAAiC;IAC3C,SAAQ,EAAA,gBAAA;GAEPqC,EAAAA,eACE,CAEJ,CAAC,EACLC,gBAAgB,iBACfxC,cAAA,CAAAC,aAAA,CAAA,KAAA,EAAA;AACEC,IAAAA,SAAS,EAAC,kCAAkC;IAC5C,SAAQ,EAAA,iBAAA;GAEPsC,EAAAA,gBACE,CAEJ,CAAC,CAAA;AAAA,EACP;AAEDH,SAAS,CAACX,UAAU,GAAGA,UAAU;;;;"}
1
+ {"version":3,"file":"SubHeader.js","sources":["../src/components/SubHeader/RightBlock/Columns.jsx","../src/components/SubHeader/RightBlock/Download.jsx","../src/components/SubHeader/RightBlock/Filter.jsx","../src/components/SubHeader/RightBlock/index.jsx","../src/components/SubHeader/index.jsx"],"sourcesContent":["import React, { forwardRef, useMemo } from \"react\";\n\nimport { Column } from \"neetoicons\";\nimport { Button } from \"neetoui\";\nimport { pluck } from \"ramda\";\nimport { useTranslation } from \"react-i18next\";\n\nimport ManageColumns, { useHiddenColumns } from \"components/Columns\";\n\nconst Columns = forwardRef(\n (\n { buttonProps = {}, columnData, localStorageKey, fixedColumns, ...props },\n ref\n ) => {\n const { t } = useTranslation();\n\n const columnDataIndex = useMemo(\n () =>\n pluck(\n \"dataIndex\",\n (columnData || []).filter(\n column => !fixedColumns?.includes(column.dataIndex)\n )\n ),\n [columnData, fixedColumns]\n );\n\n const { hideColumn, showColumn } = useHiddenColumns(localStorageKey);\n\n return (\n <div className=\"neeto-molecules-subheader__columns\">\n <ManageColumns\n isSearchable\n className=\"neeto-ui-dropdown--manage-columns\"\n actionBlock={\n <div className=\"grid grid-cols-2 gap-2 px-4 py-3\">\n <Button\n className=\"col-span-1 justify-center\"\n label=\"Hide all\"\n style=\"secondary\"\n onClick={() => hideColumn(columnDataIndex)}\n />\n <Button\n className=\"col-span-1 justify-center\"\n label=\"Show all\"\n style=\"secondary\"\n onClick={() => showColumn(columnDataIndex)}\n />\n </div>\n }\n buttonProps={{\n icon: Column,\n label: null,\n tooltipProps: {\n content: t(\"neetoMolecules.columns.columns\"),\n position: \"bottom\",\n },\n \"data-testid\": \"columns-button\",\n \"data-cy\": \"columns-dropdown-button\",\n ...buttonProps,\n }}\n {...{ columnData, localStorageKey, ...props, ref }}\n />\n </div>\n );\n }\n);\n\nColumns.displayName = \"Columns\";\nexport default Columns;\n","import React from \"react\";\n\nimport { Download } from \"neetoicons\";\nimport { Button } from \"neetoui\";\nimport { useTranslation } from \"react-i18next\";\n\nconst DownloadButton = ({\n count,\n onClick,\n \"data-cy\": dataCy = \"download-button\",\n}) => {\n const { t } = useTranslation();\n\n return (\n <div className=\"neeto-molecules-subheader__download\">\n <Button\n data-cy={dataCy}\n data-testid=\"download-button\"\n icon={Download}\n style=\"text\"\n tooltipProps={{\n content: t(\"neetoMolecules.common.download\"),\n position: \"bottom\",\n }}\n onClick={onClick}\n />\n {count && (\n <span className=\"neeto-molecules-subheader__download-count\">\n {count}\n </span>\n )}\n </div>\n );\n};\n\nexport default DownloadButton;\n","import React from \"react\";\n\nimport { Filters as NeetoFilters } from \"neetofilters\";\nimport { Filter } from \"neetoicons\";\nimport { useTranslation } from \"react-i18next\";\n\nconst FilterButton = ({ buttonProps, ...props }) => {\n const { t } = useTranslation();\n\n return (\n <div className=\"neeto-molecules-subheader__filter\">\n <NeetoFilters\n buttonProps={{\n \"data-testid\": \"filter-button\",\n icon: Filter,\n style: \"text\",\n tooltipProps: {\n content: t(\"neetoMolecules.common.filter\"),\n position: \"bottom\",\n },\n label: null,\n ...buttonProps,\n }}\n {...props}\n />\n </div>\n );\n};\n\nexport default FilterButton;\n","import React from \"react\";\n\nimport classnames from \"classnames\";\nimport { isNotPresent } from \"neetocist\";\nimport PropTypes from \"prop-types\";\nimport { not } from \"ramda\";\n\nimport Columns from \"./Columns\";\nimport Download from \"./Download\";\nimport Filter from \"./Filter\";\n\nconst RightBlock = ({\n downloadButtonProps,\n columnsButtonProps,\n filterProps,\n dataProps,\n}) => {\n const showIcons = isNotPresent(dataProps?.totalCount)\n ? true\n : dataProps?.totalCount > 0;\n\n return (\n <div\n data-testid=\"subheader-rightblock-buttons-container\"\n className={classnames(\"neeto-molecules-subheader__right-actions\", {\n hidden: not(showIcons),\n })}\n >\n {downloadButtonProps && <Download {...downloadButtonProps} />}\n {columnsButtonProps && <Columns {...columnsButtonProps} />}\n {filterProps && <Filter {...filterProps} />}\n </div>\n );\n};\n\nRightBlock.propTypes = {\n /**\n * Props that are passed to the download button.\n */\n downloadButtonProps: PropTypes.shape({\n count: PropTypes.number,\n onClick: PropTypes.func,\n }),\n /**\n * Props that are passed to the columns button, same as the `Columns` component from neetoMolecules.\n */\n columnsButtonProps: PropTypes.shape({\n onChange: PropTypes.func,\n actionBlock: PropTypes.node,\n checkboxProps: PropTypes.object,\n columnData: PropTypes.array,\n isSearchable: PropTypes.bool,\n localStorageKey: PropTypes.string,\n initialValue: PropTypes.array,\n noColumnMessage: PropTypes.string,\n searchProps: PropTypes.object,\n }),\n /**\n * Props that are passed the the filter component. These are the same props as the\n * neetoFilters `Filters` component.\n */\n filterProps: PropTypes.shape({\n size: PropTypes.oneOf([\"xsmall\", \"small\", \"large\"]),\n isOpen: PropTypes.bool,\n setIsOpen: PropTypes.func,\n columns: PropTypes.object,\n onChange: PropTypes.func,\n onSelectorsChange: PropTypes.func,\n buttonProps: PropTypes.object,\n paneProps: PropTypes.object,\n isSearchable: PropTypes.bool,\n className: PropTypes.string,\n }),\n /**\n * Props related to data being displayed, such as tables, lists, and more. The buttons\n * will be hidden if the value of `totalCount` in `dataProps` is `0`.\n */\n dataProps: PropTypes.shape({ totalCount: PropTypes.number }),\n};\n\nexport default RightBlock;\n","import React, { useLayoutEffect, useRef } from \"react\";\n\nimport classnames from \"classnames\";\nimport PropTypes from \"prop-types\";\n\nimport RightBlock from \"./RightBlock\";\nimport \"./subheader.scss\";\n\nconst SubHeader = ({\n className = \"\",\n leftActionBlock,\n rightActionBlock,\n \"data-cy\": dataCy = \"subheader\",\n}) => {\n const subheaderRef = useRef(null);\n\n useLayoutEffect(() => {\n const updateHeaderHeight = () => {\n if (!subheaderRef.current) return;\n const height = subheaderRef.current.offsetHeight;\n document.body.style.setProperty(\n \"--neeto-molecules-effective-subheader-height\",\n `${height}px`\n );\n };\n\n updateHeaderHeight();\n\n window.addEventListener(\"resize\", updateHeaderHeight);\n\n return () => window.removeEventListener(\"resize\", updateHeaderHeight);\n }, []);\n\n return (\n <div\n className={classnames([\"neeto-molecules-subheader\", className])}\n data-cy={dataCy}\n data-testid=\"subheader\"\n ref={subheaderRef}\n >\n <div\n className=\"neeto-molecules-subheader__left-wrapper\"\n data-cy=\"subheader-left-wrapper\"\n >\n {leftActionBlock && (\n <div\n className=\"neeto-molecules-subheader__left\"\n data-cy=\"subheader-left\"\n >\n {leftActionBlock}\n </div>\n )}\n </div>\n {rightActionBlock && (\n <div\n className=\"neeto-molecules-subheader__right\"\n data-cy=\"subheader-right\"\n >\n {rightActionBlock}\n </div>\n )}\n </div>\n );\n};\n\nSubHeader.RightBlock = RightBlock;\n\nSubHeader.propTypes = {\n /**\n * To specify external classnames as overrides to the `SubHeader`.\n */\n className: PropTypes.string,\n /**\n * To specify the content to be rendered in the left side of the `SubHeader` section.\n */\n leftActionBlock: PropTypes.node,\n /**\n * To specify the content to be rendered in the right side of the `SubHeader` section.\n */\n rightActionBlock: PropTypes.node,\n};\n\nexport default SubHeader;\n"],"names":["Columns","forwardRef","_ref","ref","_ref$buttonProps","buttonProps","columnData","localStorageKey","fixedColumns","props","_objectWithoutProperties","_excluded","_useTranslation","useTranslation","t","columnDataIndex","useMemo","pluck","filter","column","includes","dataIndex","_useHiddenColumns","useHiddenColumns","hideColumn","showColumn","React","createElement","className","ManageColumns","_extends","isSearchable","actionBlock","Button","label","style","onClick","_objectSpread","icon","Column","tooltipProps","content","position","displayName","DownloadButton","count","_ref$dataCy","dataCy","Download","FilterButton","NeetoFilters","Filter","RightBlock","downloadButtonProps","columnsButtonProps","filterProps","dataProps","showIcons","isNotPresent","totalCount","classnames","hidden","not","SubHeader","_ref$className","leftActionBlock","rightActionBlock","subheaderRef","useRef","useLayoutEffect","updateHeaderHeight","current","height","offsetHeight","document","body","setProperty","concat","window","addEventListener","removeEventListener"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASA,IAAMA,OAAO,gBAAGC,UAAU,CACxB,UAAAC,IAAA,EAEEC,GAAG,EACA;AAAA,EAAA,IAAAC,gBAAA,GAAAF,IAAA,CAFDG,WAAW;AAAXA,IAAAA,WAAW,GAAAD,gBAAA,KAAA,KAAA,CAAA,GAAG,EAAE,GAAAA,gBAAA;IAAEE,UAAU,GAAAJ,IAAA,CAAVI,UAAU;IAAEC,eAAe,GAAAL,IAAA,CAAfK,eAAe;IAAEC,YAAY,GAAAN,IAAA,CAAZM,YAAY;AAAKC,IAAAA,KAAK,GAAAC,wBAAA,CAAAR,IAAA,EAAAS,WAAA,CAAA,CAAA;AAGvE,EAAA,IAAAC,eAAA,GAAcC,cAAc,EAAE;IAAtBC,CAAC,GAAAF,eAAA,CAADE,CAAC,CAAA;EAET,IAAMC,eAAe,GAAGC,OAAO,CAC7B,YAAA;AAAA,IAAA,OACEC,KAAK,CACH,WAAW,EACX,CAACX,UAAU,IAAI,EAAE,EAAEY,MAAM,CACvB,UAAAC,MAAM,EAAA;AAAA,MAAA,OAAI,EAACX,YAAY,KAAZA,IAAAA,IAAAA,YAAY,KAAZA,KAAAA,CAAAA,IAAAA,YAAY,CAAEY,QAAQ,CAACD,MAAM,CAACE,SAAS,CAAC,CAAA,CAAA;AAAA,KACrD,CACF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gBACE,CAEJ,CAAC,CAAA;AAEV,EAAC;AAEDH,SAAS,CAACX,UAAU,GAAGA,UAAU;;;;"}
@@ -48,7 +48,7 @@ var DROPDOWN_BUTTON_SIZES = {
48
48
  large: "large"
49
49
  };
50
50
 
51
- 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}}";
51
+ var css = ":root{--neeto-molecules-main-header-height:98px;--neeto-molecules-main-header-with-breadcrumbs-height:170px;--neeto-molecules-effective-header-height:0px}.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;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}.neeto-molecules-header .neeto-molecules-header__right:empty{display:none;visibility:hidden}@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 .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}}";
52
52
  injectCss.n(css,{});
53
53
 
54
54
  var _excluded = ["dropdownButtonProps"];
@@ -68,9 +68,23 @@ var Header = function Header(_ref) {
68
68
  size = _ref$size === void 0 ? "large" : _ref$size,
69
69
  _ref$dataTestid = _ref["data-testid"],
70
70
  dataTestId = _ref$dataTestid === void 0 ? "neeto-molecules-header" : _ref$dataTestid;
71
+ var headerRef = React.useRef(null);
72
+ React.useLayoutEffect(function () {
73
+ var updateHeaderHeight = function updateHeaderHeight() {
74
+ if (!headerRef.current) return;
75
+ var height = headerRef.current.offsetHeight;
76
+ document.body.style.setProperty("--neeto-molecules-effective-header-height", "".concat(height, "px"));
77
+ };
78
+ updateHeaderHeight();
79
+ window.addEventListener("resize", updateHeaderHeight);
80
+ return function () {
81
+ return window.removeEventListener("resize", updateHeaderHeight);
82
+ };
83
+ }, []);
71
84
  return /*#__PURE__*/React__default["default"].createElement("div", {
72
85
  "data-cy": "neeto-molecules-header",
73
86
  "data-testid": dataTestId,
87
+ ref: headerRef,
74
88
  className: classnames__default["default"](["neeto-molecules-header", {
75
89
  "neeto-molecules-header--has-breadcrumbs": neetoCist.isNotEmpty(breadcrumbs),
76
90
  "neeto-molecules-header--large": size === SIZES.large,
@@ -1 +1 @@
1
- {"version":3,"file":"Header.js","sources":["../../src/components/Header/constants.js","../../src/components/Header/index.jsx"],"sourcesContent":["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 classnames from \"classnames\";\nimport { noop, isNotEmpty } from \"neetocist\";\nimport { Typography } from \"neetoui\";\nimport PropTypes from \"prop-types\";\n\nimport Breadcrumbs from \"components/Breadcrumbs\";\nimport MoreDropdown from \"components/MoreDropdown\";\nimport Search from \"components/Search\";\n\nimport { DROPDOWN_BUTTON_SIZES, SIZES } from \"./constants\";\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(({ dropdownButtonProps = {}, ...dropdownProps }) => (\n <MoreDropdown\n dropdownButtonProps={{\n size: DROPDOWN_BUTTON_SIZES[size],\n ...dropdownButtonProps,\n }}\n {...dropdownProps}\n />\n ))}\n </div>\n </div>\n </div>\n <div className=\"neeto-molecules-header__right\">\n {searchProps && (\n <Search\n enableUrlSync\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 MoreDropdown 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":["SIZES","nano","small","large","DROPDOWN_BUTTON_SIZES","Header","_ref","title","searchProps","_ref$className","className","actionBlock","_ref$breadcrumbs","breadcrumbs","_ref$renderDropdown","renderDropdown","noop","_ref$size","size","_ref$dataTestid","dataTestId","React","createElement","classnames","isNotEmpty","Breadcrumbs","Typography","lineHeight","style","weight","_ref2","_ref2$dropdownButtonP","dropdownButtonProps","dropdownProps","_objectWithoutProperties","_excluded","MoreDropdown","_extends","_objectSpread","Search","enableUrlSync"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAMA,KAAK,GAAG;AAAEC,EAAAA,IAAI,EAAE,MAAM;AAAEC,EAAAA,KAAK,EAAE,OAAO;AAAEC,EAAAA,KAAK,EAAE,OAAA;AAAQ,CAAC,CAAA;AAE9D,IAAMC,qBAAqB,GAAG;AAC5BH,EAAAA,IAAI,EAAE,OAAO;AACbC,EAAAA,KAAK,EAAE,QAAQ;AACfC,EAAAA,KAAK,EAAE,OAAA;AACT,CAAC;;;;;;;;ACQD,IAAME,MAAM,GAAG,SAATA,MAAMA,CAAAC,IAAA,EAAA;AAAA,EAAA,IACVC,KAAK,GAAAD,IAAA,CAALC,KAAK;IACLC,WAAW,GAAAF,IAAA,CAA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EAAEa,8BAAU,CAAC,CACpB,sCAAsC,EACtCf,WAAW,CAACE,SAAS,CACtB,CAAA;GACGF,EAAAA,WAAW,CAChB,CACF,EACAG,WAAW,iBACVU,yBAAA,CAAAC,aAAA,CAAA,KAAA,EAAA;AAAKZ,IAAAA,SAAS,EAAC,sCAAA;GACZC,EAAAA,WACE,CAEJ,CACF,CAAC,CAAA;AAAA;;;;"}
1
+ {"version":3,"file":"Header.js","sources":["../../src/components/Header/constants.js","../../src/components/Header/index.jsx"],"sourcesContent":["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, { useLayoutEffect, useRef } from \"react\";\n\nimport classnames from \"classnames\";\nimport { noop, isNotEmpty } from \"neetocist\";\nimport { Typography } from \"neetoui\";\nimport PropTypes from \"prop-types\";\n\nimport Breadcrumbs from \"components/Breadcrumbs\";\nimport MoreDropdown from \"components/MoreDropdown\";\nimport Search from \"components/Search\";\n\nimport { DROPDOWN_BUTTON_SIZES, SIZES } from \"./constants\";\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 const headerRef = useRef(null);\n\n useLayoutEffect(() => {\n const updateHeaderHeight = () => {\n if (!headerRef.current) return;\n const height = headerRef.current.offsetHeight;\n document.body.style.setProperty(\n \"--neeto-molecules-effective-header-height\",\n `${height}px`\n );\n };\n\n updateHeaderHeight();\n\n window.addEventListener(\"resize\", updateHeaderHeight);\n\n return () => window.removeEventListener(\"resize\", updateHeaderHeight);\n }, []);\n\n return (\n <div\n data-cy=\"neeto-molecules-header\"\n data-testid={dataTestId}\n ref={headerRef}\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(\n ({ dropdownButtonProps = {}, ...dropdownProps }) => (\n <MoreDropdown\n dropdownButtonProps={{\n size: DROPDOWN_BUTTON_SIZES[size],\n ...dropdownButtonProps,\n }}\n {...dropdownProps}\n />\n )\n )}\n </div>\n </div>\n </div>\n <div className=\"neeto-molecules-header__right\">\n {searchProps && (\n <Search\n enableUrlSync\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};\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 MoreDropdown 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":["SIZES","nano","small","large","DROPDOWN_BUTTON_SIZES","Header","_ref","title","searchProps","_ref$className","className","actionBlock","_ref$breadcrumbs","breadcrumbs","_ref$renderDropdown","renderDropdown","noop","_ref$size","size","_ref$dataTestid","dataTestId","headerRef","useRef","useLayoutEffect","updateHeaderHeight","current","height","offsetHeight","document","body","style","setProperty","concat","window","addEventListener","removeEventListener","React","createElement","ref","classnames","isNotEmpty","Breadcrumbs","Typography","lineHeight","weight","_ref2","_ref2$dropdownButtonP","dropdownButtonProps","dropdownProps","_objectWithoutProperties","_excluded","MoreDropdown","_extends","_objectSpread","Search","enableUrlSync"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAMA,KAAK,GAAG;AAAEC,EAAAA,IAAI,EAAE,MAAM;AAAEC,EAAAA,KAAK,EAAE,OAAO;AAAEC,EAAAA,KAAK,EAAE,OAAA;AAAQ,CAAC,CAAA;AAE9D,IAAMC,qBAAqB,GAAG;AAC5BH,EAAAA,IAAI,EAAE,OAAO;AACbC,EAAAA,KAAK,EAAE,QAAQ;AACfC,EAAAA,KAAK,EAAE,OAAA;AACT,CAAC;;;;;;;;ACQD,IAAME,MAAM,GAAG,SAATA,MAAMA,CAAAC,IAAA,EASN;AAAA,EAAA,IARJC,KAAK,GAAAD,IAAA,CAALC,KAAK;IACLC,WAAW,GAAAF,IAAA,CAAXE,WAAW;IAAAC,cAAA,GAAAH,IAAA,CACXI,SAAS;AAATA,IAAAA,SAAS,GAAAD,cAAA,KAAG,KAAA,CAAA,GAAA,EAAE,GAAAA,cAAA;IACdE,WAAW,GAAAL,IAAA,CAAXK,WAAW;IAAAC,gBAAA,GAAAN,IAAA,CACXO,WAAW;AAAXA,IAAAA,WAAW,GAAAD,gBAAA,KAAG,KAAA,CAAA,GA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,IAAA,oBAC3Cd,yBAAA,CAAAC,aAAA,CAACc,YAAY,EAAAC,4BAAA,CAAA;AACXL,MAAAA,mBAAmB,EAAAM,aAAA,CAAA;QACjBnC,IAAI,EAAEd,qBAAqB,CAACc,IAAI,CAAA;AAAC,OAAA,EAC9B6B,mBAAmB,CAAA;KAEpBC,EAAAA,aAAa,CAClB,CAAC,CAAA;AAAA,GAEN,CACG,CACF,CACF,CAAC,eACNZ,yBAAA,CAAAC,aAAA,CAAA,KAAA,EAAA;AAAK3B,IAAAA,SAAS,EAAC,+BAAA;GACZF,EAAAA,WAAW,iBACV4B,yBAAA,CAAAC,aAAA,CAACiB,MAAM,EAAAF,4BAAA,CAAA;IACLG,aAAa,EAAA,IAAA;IACb7C,SAAS,EAAE6B,8BAAU,CAAC,CACpB,sCAAsC,EACtC/B,WAAW,CAACE,SAAS,CACtB,CAAA;GACGF,EAAAA,WAAW,CAChB,CACF,EACAG,WAAW,iBACVyB,yBAAA,CAAAC,aAAA,CAAA,KAAA,EAAA;AAAK3B,IAAAA,SAAS,EAAC,sCAAA;GACZC,EAAAA,WACE,CAEJ,CACF,CAAC,CAAA;AAEV;;;;"}
@@ -23,7 +23,7 @@ var SIZES = {
23
23
  viewport: "viewport"
24
24
  };
25
25
 
26
- var css = ".neeto-molecules-scrollable{flex-grow:1;overflow-y:auto}.neeto-molecules-scrollable.neeto-molecules-scrollable--nano{height:calc(100vh - var(--neeto-molecules-main-header-with-breadcrumbs-height) - var(--neeto-molecules-sub-header-height) - var(--neeto-molecules-sub-header-bottom-margin))}.neeto-molecules-scrollable.neeto-molecules-scrollable--small{height:calc(100vh - var(--neeto-molecules-main-header-height) - var(--neeto-molecules-sub-header-height) - var(--neeto-molecules-sub-header-bottom-margin))}.neeto-molecules-scrollable.neeto-molecules-scrollable--medium{height:calc(100vh - var(--neeto-molecules-main-header-with-breadcrumbs-height))}.neeto-molecules-scrollable.neeto-molecules-scrollable--large{height:calc(100vh - var(--neeto-molecules-main-header-height))}.neeto-molecules-scrollable.neeto-molecules-scrollable--viewport{height:100vh}";
26
+ var css = ".neeto-molecules-scrollable{flex-grow:1;overflow-y:auto}.neeto-molecules-scrollable.neeto-molecules-scrollable--nano,.neeto-molecules-scrollable.neeto-molecules-scrollable--small{height:calc(100vh - var(--neeto-molecules-effective-header-height) - var(--neeto-molecules-effective-subheader-height) - var(--neeto-molecules-sub-header-bottom-margin))}.neeto-molecules-scrollable.neeto-molecules-scrollable--large,.neeto-molecules-scrollable.neeto-molecules-scrollable--medium{height:calc(100vh - var(--neeto-molecules-effective-header-height))}.neeto-molecules-scrollable.neeto-molecules-scrollable--viewport{height:100vh}";
27
27
  injectCss.n(css,{});
28
28
 
29
29
  var _excluded = ["children", "className", "size"];
@@ -162,7 +162,7 @@ var RightBlock = function RightBlock(_ref) {
162
162
  }, downloadButtonProps && /*#__PURE__*/React__default["default"].createElement(DownloadButton, downloadButtonProps), columnsButtonProps && /*#__PURE__*/React__default["default"].createElement(Columns, columnsButtonProps), filterProps && /*#__PURE__*/React__default["default"].createElement(FilterButton, filterProps));
163
163
  };
164
164
 
165
- var css = ":root{--neeto-molecules-sub-header-height:37px;--neeto-molecules-sub-header-bottom-margin:20px}.neeto-molecules-subheader{align-items:center;background-color:rgb(var(--neeto-ui-white));display:flex;flex-direction:row;flex-shrink:0;gap:16px;justify-content:space-between;margin-bottom:20px;margin-bottom:var(--neeto-molecules-sub-header-bottom-margin);min-height:37px;min-height:var(--neeto-molecules-sub-header-height);width:100%}@media screen and (max-width:768px){.neeto-molecules-subheader{flex-wrap:wrap}}.neeto-molecules-subheader .neeto-molecules-subheader__left-wrapper{display:flex;flex-grow:1}.neeto-molecules-subheader .neeto-molecules-subheader__left-wrapper .neeto-molecules-subheader__left{align-items:center;display:flex;flex-direction:row;justify-content:flex-start}.neeto-molecules-subheader .neeto-molecules-subheader__left-wrapper .neeto-molecules-subheader__left .neeto-molecules-input__prefix{color:rgb(var(--neeto-ui-gray-400))}@media screen and (max-width:360px){.neeto-molecules-subheader .neeto-molecules-subheader__left-wrapper .neeto-molecules-subheader__left h4{font-size:14px}}.neeto-molecules-subheader .neeto-molecules-subheader__left-wrapper .neeto-ui-btn{flex-shrink:0}.neeto-molecules-subheader .neeto-molecules-subheader__right{align-items:center;display:flex;flex-direction:row;gap:12px;justify-content:flex-end}@media screen and (max-width:768px){.neeto-molecules-subheader .neeto-molecules-subheader__right{margin-left:auto}}.neeto-molecules-subheader .neeto-molecules-subheader__right-actions{align-items:center;display:flex;flex-direction:row;gap:8px;justify-content:flex-end}.neeto-molecules-subheader .neeto-molecules-subheader__right-actions>:not([hidden])~:not([hidden]){border-left:thin solid rgb(var(--neeto-ui-gray-200));padding-left:8px}.neeto-molecules-subheader__download{position:relative}.neeto-molecules-subheader__download-count{align-items:center;background-color:rgb(var(--neeto-ui-accent-500));border-radius:var(--neeto-ui-rounded-full);color:rgb(var(--neeto-ui-white));display:inline-flex;font-size:10px;justify-content:center;min-height:16px;min-width:16px;position:absolute;right:-2px;text-align:center;top:-2px;z-index:1}.neeto-molecules-subheader__columns .neeto-ui-dropdown__popup{max-height:calc(100vh - var(--neeto-molecules-main-header-with-breadcrumbs-height) - 57px);max-height:calc(100vh - var(--neeto-molecules-main-header-with-breadcrumbs-height) - var(--neeto-molecules-sub-header-height) - var(--neeto-molecules-sub-header-bottom-margin));min-width:320px}";
165
+ var css = ":root{--neeto-molecules-sub-header-height:37px;--neeto-molecules-sub-header-bottom-margin:20px;--neeto-molecules-effective-subheader-height:0px}.neeto-molecules-subheader{align-items:center;background-color:rgb(var(--neeto-ui-white));display:flex;flex-direction:row;flex-shrink:0;gap:16px;justify-content:space-between;margin-bottom:20px;margin-bottom:var(--neeto-molecules-sub-header-bottom-margin);width:100%}@media screen and (max-width:768px){.neeto-molecules-subheader{flex-wrap:wrap}}.neeto-molecules-subheader .neeto-molecules-subheader__left-wrapper{display:flex;flex-grow:1}.neeto-molecules-subheader .neeto-molecules-subheader__left-wrapper .neeto-molecules-subheader__left{align-items:center;display:flex;flex-direction:row;justify-content:flex-start}.neeto-molecules-subheader .neeto-molecules-subheader__left-wrapper .neeto-molecules-subheader__left .neeto-molecules-input__prefix{color:rgb(var(--neeto-ui-gray-400))}@media screen and (max-width:360px){.neeto-molecules-subheader .neeto-molecules-subheader__left-wrapper .neeto-molecules-subheader__left h4{font-size:14px}}.neeto-molecules-subheader .neeto-molecules-subheader__left-wrapper .neeto-ui-btn{flex-shrink:0}.neeto-molecules-subheader .neeto-molecules-subheader__right{align-items:center;display:flex;flex-direction:row;gap:12px;justify-content:flex-end}@media screen and (max-width:768px){.neeto-molecules-subheader .neeto-molecules-subheader__right{margin-left:auto}}.neeto-molecules-subheader .neeto-molecules-subheader__right-actions{align-items:center;display:flex;flex-direction:row;gap:8px;justify-content:flex-end}.neeto-molecules-subheader .neeto-molecules-subheader__right-actions>:not([hidden])~:not([hidden]){border-left:thin solid rgb(var(--neeto-ui-gray-200));padding-left:8px}.neeto-molecules-subheader__download{position:relative}.neeto-molecules-subheader__download-count{align-items:center;background-color:rgb(var(--neeto-ui-accent-500));border-radius:var(--neeto-ui-rounded-full);color:rgb(var(--neeto-ui-white));display:inline-flex;font-size:10px;justify-content:center;min-height:16px;min-width:16px;position:absolute;right:-2px;text-align:center;top:-2px;z-index:1}.neeto-molecules-subheader__columns .neeto-ui-dropdown__popup{max-height:calc(100vh - var(--neeto-molecules-effective-header-height) - 57px);max-height:calc(100vh - var(--neeto-molecules-effective-header-height) - var(--neeto-molecules-sub-header-height) - var(--neeto-molecules-sub-header-bottom-margin));min-width:320px}";
166
166
  injectCss.n(css,{});
167
167
 
168
168
  var SubHeader = function SubHeader(_ref) {
@@ -172,10 +172,24 @@ var SubHeader = function SubHeader(_ref) {
172
172
  rightActionBlock = _ref.rightActionBlock,
173
173
  _ref$dataCy = _ref["data-cy"],
174
174
  dataCy = _ref$dataCy === void 0 ? "subheader" : _ref$dataCy;
175
+ var subheaderRef = React.useRef(null);
176
+ React.useLayoutEffect(function () {
177
+ var updateHeaderHeight = function updateHeaderHeight() {
178
+ if (!subheaderRef.current) return;
179
+ var height = subheaderRef.current.offsetHeight;
180
+ document.body.style.setProperty("--neeto-molecules-effective-subheader-height", "".concat(height, "px"));
181
+ };
182
+ updateHeaderHeight();
183
+ window.addEventListener("resize", updateHeaderHeight);
184
+ return function () {
185
+ return window.removeEventListener("resize", updateHeaderHeight);
186
+ };
187
+ }, []);
175
188
  return /*#__PURE__*/React__default["default"].createElement("div", {
176
189
  className: classnames__default["default"](["neeto-molecules-subheader", className]),
177
190
  "data-cy": dataCy,
178
- "data-testid": "subheader"
191
+ "data-testid": "subheader",
192
+ ref: subheaderRef
179
193
  }, /*#__PURE__*/React__default["default"].createElement("div", {
180
194
  className: "neeto-molecules-subheader__left-wrapper",
181
195
  "data-cy": "subheader-left-wrapper"
@@ -1 +1 @@
1
- {"version":3,"file":"SubHeader.js","sources":["../../src/components/SubHeader/RightBlock/Columns.jsx","../../src/components/SubHeader/RightBlock/Download.jsx","../../src/components/SubHeader/RightBlock/Filter.jsx","../../src/components/SubHeader/RightBlock/index.jsx","../../src/components/SubHeader/index.jsx"],"sourcesContent":["import React, { forwardRef, useMemo } from \"react\";\n\nimport { Column } from \"neetoicons\";\nimport { Button } from \"neetoui\";\nimport { pluck } from \"ramda\";\nimport { useTranslation } from \"react-i18next\";\n\nimport ManageColumns, { useHiddenColumns } from \"components/Columns\";\n\nconst Columns = forwardRef(\n (\n { buttonProps = {}, columnData, localStorageKey, fixedColumns, ...props },\n ref\n ) => {\n const { t } = useTranslation();\n\n const columnDataIndex = useMemo(\n () =>\n pluck(\n \"dataIndex\",\n (columnData || []).filter(\n column => !fixedColumns?.includes(column.dataIndex)\n )\n ),\n [columnData, fixedColumns]\n );\n\n const { hideColumn, showColumn } = useHiddenColumns(localStorageKey);\n\n return (\n <div className=\"neeto-molecules-subheader__columns\">\n <ManageColumns\n isSearchable\n className=\"neeto-ui-dropdown--manage-columns\"\n actionBlock={\n <div className=\"grid grid-cols-2 gap-2 px-4 py-3\">\n <Button\n className=\"col-span-1 justify-center\"\n label=\"Hide all\"\n style=\"secondary\"\n onClick={() => hideColumn(columnDataIndex)}\n />\n <Button\n className=\"col-span-1 justify-center\"\n label=\"Show all\"\n style=\"secondary\"\n onClick={() => showColumn(columnDataIndex)}\n />\n </div>\n }\n buttonProps={{\n icon: Column,\n label: null,\n tooltipProps: {\n content: t(\"neetoMolecules.columns.columns\"),\n position: \"bottom\",\n },\n \"data-testid\": \"columns-button\",\n \"data-cy\": \"columns-dropdown-button\",\n ...buttonProps,\n }}\n {...{ columnData, localStorageKey, ...props, ref }}\n />\n </div>\n );\n }\n);\n\nColumns.displayName = \"Columns\";\nexport default Columns;\n","import React from \"react\";\n\nimport { Download } from \"neetoicons\";\nimport { Button } from \"neetoui\";\nimport { useTranslation } from \"react-i18next\";\n\nconst DownloadButton = ({\n count,\n onClick,\n \"data-cy\": dataCy = \"download-button\",\n}) => {\n const { t } = useTranslation();\n\n return (\n <div className=\"neeto-molecules-subheader__download\">\n <Button\n data-cy={dataCy}\n data-testid=\"download-button\"\n icon={Download}\n style=\"text\"\n tooltipProps={{\n content: t(\"neetoMolecules.common.download\"),\n position: \"bottom\",\n }}\n onClick={onClick}\n />\n {count && (\n <span className=\"neeto-molecules-subheader__download-count\">\n {count}\n </span>\n )}\n </div>\n );\n};\n\nexport default DownloadButton;\n","import React from \"react\";\n\nimport { Filters as NeetoFilters } from \"neetofilters\";\nimport { Filter } from \"neetoicons\";\nimport { useTranslation } from \"react-i18next\";\n\nconst FilterButton = ({ buttonProps, ...props }) => {\n const { t } = useTranslation();\n\n return (\n <div className=\"neeto-molecules-subheader__filter\">\n <NeetoFilters\n buttonProps={{\n \"data-testid\": \"filter-button\",\n icon: Filter,\n style: \"text\",\n tooltipProps: {\n content: t(\"neetoMolecules.common.filter\"),\n position: \"bottom\",\n },\n label: null,\n ...buttonProps,\n }}\n {...props}\n />\n </div>\n );\n};\n\nexport default FilterButton;\n","import React from \"react\";\n\nimport classnames from \"classnames\";\nimport { isNotPresent } from \"neetocist\";\nimport PropTypes from \"prop-types\";\nimport { not } from \"ramda\";\n\nimport Columns from \"./Columns\";\nimport Download from \"./Download\";\nimport Filter from \"./Filter\";\n\nconst RightBlock = ({\n downloadButtonProps,\n columnsButtonProps,\n filterProps,\n dataProps,\n}) => {\n const showIcons = isNotPresent(dataProps?.totalCount)\n ? true\n : dataProps?.totalCount > 0;\n\n return (\n <div\n data-testid=\"subheader-rightblock-buttons-container\"\n className={classnames(\"neeto-molecules-subheader__right-actions\", {\n hidden: not(showIcons),\n })}\n >\n {downloadButtonProps && <Download {...downloadButtonProps} />}\n {columnsButtonProps && <Columns {...columnsButtonProps} />}\n {filterProps && <Filter {...filterProps} />}\n </div>\n );\n};\n\nRightBlock.propTypes = {\n /**\n * Props that are passed to the download button.\n */\n downloadButtonProps: PropTypes.shape({\n count: PropTypes.number,\n onClick: PropTypes.func,\n }),\n /**\n * Props that are passed to the columns button, same as the `Columns` component from neetoMolecules.\n */\n columnsButtonProps: PropTypes.shape({\n onChange: PropTypes.func,\n actionBlock: PropTypes.node,\n checkboxProps: PropTypes.object,\n columnData: PropTypes.array,\n isSearchable: PropTypes.bool,\n localStorageKey: PropTypes.string,\n initialValue: PropTypes.array,\n noColumnMessage: PropTypes.string,\n searchProps: PropTypes.object,\n }),\n /**\n * Props that are passed the the filter component. These are the same props as the\n * neetoFilters `Filters` component.\n */\n filterProps: PropTypes.shape({\n size: PropTypes.oneOf([\"xsmall\", \"small\", \"large\"]),\n isOpen: PropTypes.bool,\n setIsOpen: PropTypes.func,\n columns: PropTypes.object,\n onChange: PropTypes.func,\n onSelectorsChange: PropTypes.func,\n buttonProps: PropTypes.object,\n paneProps: PropTypes.object,\n isSearchable: PropTypes.bool,\n className: PropTypes.string,\n }),\n /**\n * Props related to data being displayed, such as tables, lists, and more. The buttons\n * will be hidden if the value of `totalCount` in `dataProps` is `0`.\n */\n dataProps: PropTypes.shape({ totalCount: PropTypes.number }),\n};\n\nexport default RightBlock;\n","import React from \"react\";\n\nimport classnames from \"classnames\";\nimport PropTypes from \"prop-types\";\n\nimport RightBlock from \"./RightBlock\";\nimport \"./subheader.scss\";\n\nconst SubHeader = ({\n className = \"\",\n leftActionBlock,\n rightActionBlock,\n \"data-cy\": dataCy = \"subheader\",\n}) => (\n <div\n className={classnames([\"neeto-molecules-subheader\", className])}\n data-cy={dataCy}\n data-testid=\"subheader\"\n >\n <div\n className=\"neeto-molecules-subheader__left-wrapper\"\n data-cy=\"subheader-left-wrapper\"\n >\n {leftActionBlock && (\n <div\n className=\"neeto-molecules-subheader__left\"\n data-cy=\"subheader-left\"\n >\n {leftActionBlock}\n </div>\n )}\n </div>\n {rightActionBlock && (\n <div\n className=\"neeto-molecules-subheader__right\"\n data-cy=\"subheader-right\"\n >\n {rightActionBlock}\n </div>\n )}\n </div>\n);\n\nSubHeader.RightBlock = RightBlock;\n\nSubHeader.propTypes = {\n /**\n * To specify external classnames as overrides to the `SubHeader`.\n */\n className: PropTypes.string,\n /**\n * To specify the content to be rendered in the left side of the `SubHeader` section.\n */\n leftActionBlock: PropTypes.node,\n /**\n * To specify the content to be rendered in the right side of the `SubHeader` section.\n */\n rightActionBlock: PropTypes.node,\n};\n\nexport default SubHeader;\n"],"names":["Columns","forwardRef","_ref","ref","_ref$buttonProps","buttonProps","columnData","localStorageKey","fixedColumns","props","_objectWithoutProperties","_excluded","_useTranslation","useTranslation","t","columnDataIndex","useMemo","pluck","filter","column","includes","dataIndex","_useHiddenColumns","useHiddenColumns","hideColumn","showColumn","React","createElement","className","ManageColumns","_extends","isSearchable","actionBlock","Button","label","style","onClick","_objectSpread","icon","Column","tooltipProps","content","position","displayName","DownloadButton","count","_ref$dataCy","dataCy","Download","FilterButton","NeetoFilters","Filter","RightBlock","downloadButtonProps","columnsButtonProps","filterProps","dataProps","showIcons","isNotPresent","totalCount","classnames","hidden","not","SubHeader","_ref$className","leftActionBlock","rightActionBlock"],"mappings":";;;;;;;;;;;;;;;;;;;;;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C,EACLC,gBAAgB,iBACfxC,yBAAA,CAAAC,aAAA,CAAA,KAAA,EAAA;AACEC,IAAAA,SAAS,EAAC,kCAAkC;IAC5C,SAAQ,EAAA,iBAAA;GAEPsC,EAAAA,gBACE,CAEJ,CAAC,CAAA;AAAA,EACP;AAEDH,SAAS,CAACX,UAAU,GAAGA,UAAU;;;;"}
1
+ {"version":3,"file":"SubHeader.js","sources":["../../src/components/SubHeader/RightBlock/Columns.jsx","../../src/components/SubHeader/RightBlock/Download.jsx","../../src/components/SubHeader/RightBlock/Filter.jsx","../../src/components/SubHeader/RightBlock/index.jsx","../../src/components/SubHeader/index.jsx"],"sourcesContent":["import React, { forwardRef, useMemo } from \"react\";\n\nimport { Column } from \"neetoicons\";\nimport { Button } from \"neetoui\";\nimport { pluck } from \"ramda\";\nimport { useTranslation } from \"react-i18next\";\n\nimport ManageColumns, { useHiddenColumns } from \"components/Columns\";\n\nconst Columns = forwardRef(\n (\n { buttonProps = {}, columnData, localStorageKey, fixedColumns, ...props },\n ref\n ) => {\n const { t } = useTranslation();\n\n const columnDataIndex = useMemo(\n () =>\n pluck(\n \"dataIndex\",\n (columnData || []).filter(\n column => !fixedColumns?.includes(column.dataIndex)\n )\n ),\n [columnData, fixedColumns]\n );\n\n const { hideColumn, showColumn } = useHiddenColumns(localStorageKey);\n\n return (\n <div className=\"neeto-molecules-subheader__columns\">\n <ManageColumns\n isSearchable\n className=\"neeto-ui-dropdown--manage-columns\"\n actionBlock={\n <div className=\"grid grid-cols-2 gap-2 px-4 py-3\">\n <Button\n className=\"col-span-1 justify-center\"\n label=\"Hide all\"\n style=\"secondary\"\n onClick={() => hideColumn(columnDataIndex)}\n />\n <Button\n className=\"col-span-1 justify-center\"\n label=\"Show all\"\n style=\"secondary\"\n onClick={() => showColumn(columnDataIndex)}\n />\n </div>\n }\n buttonProps={{\n icon: Column,\n label: null,\n tooltipProps: {\n content: t(\"neetoMolecules.columns.columns\"),\n position: \"bottom\",\n },\n \"data-testid\": \"columns-button\",\n \"data-cy\": \"columns-dropdown-button\",\n ...buttonProps,\n }}\n {...{ columnData, localStorageKey, ...props, ref }}\n />\n </div>\n );\n }\n);\n\nColumns.displayName = \"Columns\";\nexport default Columns;\n","import React from \"react\";\n\nimport { Download } from \"neetoicons\";\nimport { Button } from \"neetoui\";\nimport { useTranslation } from \"react-i18next\";\n\nconst DownloadButton = ({\n count,\n onClick,\n \"data-cy\": dataCy = \"download-button\",\n}) => {\n const { t } = useTranslation();\n\n return (\n <div className=\"neeto-molecules-subheader__download\">\n <Button\n data-cy={dataCy}\n data-testid=\"download-button\"\n icon={Download}\n style=\"text\"\n tooltipProps={{\n content: t(\"neetoMolecules.common.download\"),\n position: \"bottom\",\n }}\n onClick={onClick}\n />\n {count && (\n <span className=\"neeto-molecules-subheader__download-count\">\n {count}\n </span>\n )}\n </div>\n );\n};\n\nexport default DownloadButton;\n","import React from \"react\";\n\nimport { Filters as NeetoFilters } from \"neetofilters\";\nimport { Filter } from \"neetoicons\";\nimport { useTranslation } from \"react-i18next\";\n\nconst FilterButton = ({ buttonProps, ...props }) => {\n const { t } = useTranslation();\n\n return (\n <div className=\"neeto-molecules-subheader__filter\">\n <NeetoFilters\n buttonProps={{\n \"data-testid\": \"filter-button\",\n icon: Filter,\n style: \"text\",\n tooltipProps: {\n content: t(\"neetoMolecules.common.filter\"),\n position: \"bottom\",\n },\n label: null,\n ...buttonProps,\n }}\n {...props}\n />\n </div>\n );\n};\n\nexport default FilterButton;\n","import React from \"react\";\n\nimport classnames from \"classnames\";\nimport { isNotPresent } from \"neetocist\";\nimport PropTypes from \"prop-types\";\nimport { not } from \"ramda\";\n\nimport Columns from \"./Columns\";\nimport Download from \"./Download\";\nimport Filter from \"./Filter\";\n\nconst RightBlock = ({\n downloadButtonProps,\n columnsButtonProps,\n filterProps,\n dataProps,\n}) => {\n const showIcons = isNotPresent(dataProps?.totalCount)\n ? true\n : dataProps?.totalCount > 0;\n\n return (\n <div\n data-testid=\"subheader-rightblock-buttons-container\"\n className={classnames(\"neeto-molecules-subheader__right-actions\", {\n hidden: not(showIcons),\n })}\n >\n {downloadButtonProps && <Download {...downloadButtonProps} />}\n {columnsButtonProps && <Columns {...columnsButtonProps} />}\n {filterProps && <Filter {...filterProps} />}\n </div>\n );\n};\n\nRightBlock.propTypes = {\n /**\n * Props that are passed to the download button.\n */\n downloadButtonProps: PropTypes.shape({\n count: PropTypes.number,\n onClick: PropTypes.func,\n }),\n /**\n * Props that are passed to the columns button, same as the `Columns` component from neetoMolecules.\n */\n columnsButtonProps: PropTypes.shape({\n onChange: PropTypes.func,\n actionBlock: PropTypes.node,\n checkboxProps: PropTypes.object,\n columnData: PropTypes.array,\n isSearchable: PropTypes.bool,\n localStorageKey: PropTypes.string,\n initialValue: PropTypes.array,\n noColumnMessage: PropTypes.string,\n searchProps: PropTypes.object,\n }),\n /**\n * Props that are passed the the filter component. These are the same props as the\n * neetoFilters `Filters` component.\n */\n filterProps: PropTypes.shape({\n size: PropTypes.oneOf([\"xsmall\", \"small\", \"large\"]),\n isOpen: PropTypes.bool,\n setIsOpen: PropTypes.func,\n columns: PropTypes.object,\n onChange: PropTypes.func,\n onSelectorsChange: PropTypes.func,\n buttonProps: PropTypes.object,\n paneProps: PropTypes.object,\n isSearchable: PropTypes.bool,\n className: PropTypes.string,\n }),\n /**\n * Props related to data being displayed, such as tables, lists, and more. The buttons\n * will be hidden if the value of `totalCount` in `dataProps` is `0`.\n */\n dataProps: PropTypes.shape({ totalCount: PropTypes.number }),\n};\n\nexport default RightBlock;\n","import React, { useLayoutEffect, useRef } from \"react\";\n\nimport classnames from \"classnames\";\nimport PropTypes from \"prop-types\";\n\nimport RightBlock from \"./RightBlock\";\nimport \"./subheader.scss\";\n\nconst SubHeader = ({\n className = \"\",\n leftActionBlock,\n rightActionBlock,\n \"data-cy\": dataCy = \"subheader\",\n}) => {\n const subheaderRef = useRef(null);\n\n useLayoutEffect(() => {\n const updateHeaderHeight = () => {\n if (!subheaderRef.current) return;\n const height = subheaderRef.current.offsetHeight;\n document.body.style.setProperty(\n \"--neeto-molecules-effective-subheader-height\",\n `${height}px`\n );\n };\n\n updateHeaderHeight();\n\n window.addEventListener(\"resize\", updateHeaderHeight);\n\n return () => window.removeEventListener(\"resize\", updateHeaderHeight);\n }, []);\n\n return (\n <div\n className={classnames([\"neeto-molecules-subheader\", className])}\n data-cy={dataCy}\n data-testid=\"subheader\"\n ref={subheaderRef}\n >\n <div\n className=\"neeto-molecules-subheader__left-wrapper\"\n data-cy=\"subheader-left-wrapper\"\n >\n {leftActionBlock && (\n <div\n className=\"neeto-molecules-subheader__left\"\n data-cy=\"subheader-left\"\n >\n {leftActionBlock}\n </div>\n )}\n </div>\n {rightActionBlock && (\n <div\n className=\"neeto-molecules-subheader__right\"\n data-cy=\"subheader-right\"\n >\n {rightActionBlock}\n </div>\n )}\n </div>\n );\n};\n\nSubHeader.RightBlock = RightBlock;\n\nSubHeader.propTypes = {\n /**\n * To specify external classnames as overrides to the `SubHeader`.\n */\n className: PropTypes.string,\n /**\n * To specify the content to be rendered in the left side of the `SubHeader` section.\n */\n leftActionBlock: PropTypes.node,\n /**\n * To specify the content to be rendered in the right side of the `SubHeader` section.\n */\n rightActionBlock: PropTypes.node,\n};\n\nexport default SubHeader;\n"],"names":["Columns","forwardRef","_ref","ref","_ref$buttonProps","buttonProps","columnData","localStorageKey","fixedColumns","props","_objectWithoutProperties","_excluded","_useTranslation","useTranslation","t","columnDataIndex","useMemo","pluck","filter","column","includes","dataIndex","_useHiddenColumns","useHiddenColumns","hideColumn","showColumn","React","createElement","className","ManageColumns","_extends","isSearchable","actionBlock","Button","label","style","onClick","_objectSpread","icon","Column","tooltipProps","content","position","displayName","DownloadButton","count","_ref$dataCy","dataCy","Download","FilterButton","NeetoFilters","Filter","RightBlock","downloadButtonProps","columnsButtonProps","filterProps","dataProps","showIcons","isNotPresent","totalCount","classnames","hidden","not","SubHeader","_ref$className","leftActionBlock","rightActionBlock","subheaderRef","useRef","useLayoutEffect","updateHeaderHeight","current","height","offsetHeight","document","body","setProperty","concat","window","addEventListener","removeEventListener"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASA,IAAMA,OAAO,gBAAGC,gBAAU,CACxB,UAAAC,IAAA,EAEEC,GAAG,EACA;AAAA,EAAA,IAAAC,gBAAA,GAAAF,IAAA,CAFDG,WAAW;AAAXA,IAAAA,WAAW,GAAAD,gBAAA,KAAA,KAAA,CAAA,GAAG,EAAE,GAAAA,gBAAA;IAAEE,UAAU,GAAAJ,IAAA,CAAVI,UAAU;IAAEC,eAAe,GAAAL,IAAA,CAAfK,eAAe;IAAEC,YAAY,GAAAN,IAAA,CAAZM,YAAY;AAAKC,IAAAA,KAAK,GAAAC,4CAAA,CAAAR,IAAA,EAAAS,WAAA,CAAA,CAAA;AAGvE,EAAA,IAAAC,eAAA,GAAcC,2BAAc,EAAE;IAAtBC,CAAC,GAAAF,eAAA,CAADE,CAAC,CAAA;EAET,IAAMC,eAAe,GAAGC,aAAO,CAC7B,YAAA;AAAA,IAAA,OACEC,WAAK,CACH,WAAW,EACX,CAACX,UAAU,IAAI,EAAE,EAAEY,MAAM,CACvB,UAAAC,MAAM,EAAA;AAAA,MAAA,OAAI,EAACX,YAAY,KAAZA,IAAAA,IAAAA,YAAY,KAAZA,KAAAA,CAAAA,IAAAA,YAAY,CAAEY,QAAQ,CAACD,MAAM,CAACE,SAAS,CAAC,CAAA,CAAA;AAAA,KACrD,CACF,CAAC,CAAA;AAAA,GAAA,EACH,CAACf,UAAU,EAAEE,YAAY,CAC3B,CAAC,CAAA;AAED,EAAA,IAAAc,iBAAA,GAAmCC,2BAAgB,CAAChB,eAAe,CAAC;IAA5DiB,UAAU,GAAAF,iBAAA,CAAVE,UAAU;IAAEC,UAAU,GAAAH,iBAAA,CAAVG,UAAU,CAAA;EAE9B,oBACEC,yBAAA,CAAAC,aAAA,CAAA,KAAA,EAAA;AAAKC,IAAAA,SAAS,EAAC,oCAAA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AAA,MAAA,CAC3CL,MAAM,OACX,CAAC,CAAA;KACF,CAAA;AAEDF,IAAAA,kBAAkB,EAAE,CAAA;AAEpBQ,IAAAA,MAAM,CAACC,gBAAgB,CAAC,QAAQ,EAAET,kBAAkB,CAAC,CAAA;IAErD,OAAO,YAAA;AAAA,MAAA,OAAMQ,MAAM,CAACE,mBAAmB,CAAC,QAAQ,EAAEV,kBAAkB,CAAC,CAAA;AAAA,KAAA,CAAA;GACtE,EAAE,EAAE,CAAC,CAAA;EAEN,oBACE5C,yBAAA,CAAAC,aAAA,CAAA,KAAA,EAAA;IACEC,SAAS,EAAEgC,8BAAU,CAAC,CAAC,2BAA2B,EAAEhC,SAAS,CAAC,CAAE;AAChE,IAAA,SAAA,EAASmB,MAAO;AAChB,IAAA,aAAA,EAAY,WAAW;AACvB5C,IAAAA,GAAG,EAAEgE,YAAAA;GAELzC,eAAAA,yBAAA,CAAAC,aAAA,CAAA,KAAA,EAAA;AACEC,IAAAA,SAAS,EAAC,yCAAyC;IACnD,SAAQ,EAAA,wBAAA;AAAwB,GAAA,EAE/BqC,eAAe,iBACdvC,yBAAA,CAAAC,aAAA,CAAA,KAAA,EAAA;AACEC,IAAAA,SAAS,EAAC,iCAAiC;IAC3C,SAAQ,EAAA,gBAAA;GAEPqC,EAAAA,eACE,CAEJ,CAAC,EACLC,gBAAgB,iBACfxC,yBAAA,CAAAC,aAAA,CAAA,KAAA,EAAA;AACEC,IAAAA,SAAS,EAAC,kCAAkC;IAC5C,SAAQ,EAAA,iBAAA;GAEPsC,EAAAA,gBACE,CAEJ,CAAC,CAAA;AAEV,EAAC;AAEDH,SAAS,CAACX,UAAU,GAAGA,UAAU;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bigbinary/neeto-molecules",
3
- "version": "3.1.0",
3
+ "version": "3.1.1",
4
4
  "description": "A package of reusable molecular components for neeto products.",
5
5
  "repository": "git@github.com:bigbinary/neeto-molecules.git",
6
6
  "author": "Amaljith K <amaljith.k@bigbinary.com>",