@bigbinary/neeto-molecules 3.15.1 → 3.15.3

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.
@@ -29,10 +29,11 @@ var BrowserIcon = function BrowserIcon() {
29
29
  };
30
30
 
31
31
  var BrowserPreview = function BrowserPreview(_ref) {
32
- var className = _ref.className,
32
+ var wrapperClassName = _ref.wrapperClassName,
33
+ className = _ref.className,
33
34
  children = _ref.children;
34
35
  return /*#__PURE__*/jsxs("div", {
35
- className: "neeto-molecules-browser-preview",
36
+ className: classnames("neeto-molecules-browser-preview", wrapperClassName),
36
37
  "data-testid": "browser-preview",
37
38
  children: [/*#__PURE__*/jsx("div", {
38
39
  className: "neeto-molecules-browser-preview__header",
@@ -1 +1 @@
1
- {"version":3,"file":"BrowserPreview.js","sources":["../src/components/BrowserPreview/BrowserIcon.jsx","../src/components/BrowserPreview/index.jsx"],"sourcesContent":["const BrowserIcon = () => (\n <svg\n fill=\"none\"\n height=\"12\"\n viewBox=\"0 0 52 12\"\n width=\"52\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M11.5 6a5.5 5.5 0 11-11 0 5.5 5.5 0 0111 0z\"\n fill=\"#FF5F57\"\n stroke=\"#E14640\"\n />\n <path\n d=\"M31.5 6a5.5 5.5 0 11-11 0 5.5 5.5 0 0111 0z\"\n fill=\"#FFBD2E\"\n stroke=\"#DFA123\"\n />\n <path\n d=\"M51.5 6a5.5 5.5 0 11-11 0 5.5 5.5 0 0111 0z\"\n fill=\"#28CA42\"\n stroke=\"#1DAD2C\"\n />\n </svg>\n);\n\nexport default BrowserIcon;\n","import classNames from \"classnames\";\nimport PropTypes from \"prop-types\";\n\nimport \"./browser-preview.scss\";\nimport BrowserIcon from \"./BrowserIcon.jsx\";\n\nconst BrowserPreview = ({ className, children }) => (\n <div\n className=\"neeto-molecules-browser-preview\"\n data-testid=\"browser-preview\"\n >\n <div className=\"neeto-molecules-browser-preview__header\">\n <BrowserIcon />\n </div>\n <div\n className={classNames(\"neeto-molecules-browser-preview__body\", className)}\n data-testid=\"browser-preview-body\"\n >\n {children}\n </div>\n </div>\n);\n\nBrowserPreview.propTypes = {\n /**\n * The content to be rendered inside the browser preview body.\n */\n children: PropTypes.node,\n /*\n * To provide additional classes to the browser preview body.\n */\n className: PropTypes.string,\n};\n\nexport default BrowserPreview;\n"],"names":["BrowserIcon","_jsxs","fill","height","viewBox","width","xmlns","children","_jsx","d","stroke","BrowserPreview","_ref","className","classNames"],"mappings":";;;;;;;AAAA,IAAMA,WAAW,GAAG,SAAdA,WAAWA,GAAA;AAAA,EAAA,oBACfC,IAAA,CAAA,KAAA,EAAA;AACEC,IAAAA,IAAI,EAAC,MAAM;AACXC,IAAAA,MAAM,EAAC,IAAI;AACXC,IAAAA,OAAO,EAAC,WAAW;AACnBC,IAAAA,KAAK,EAAC,IAAI;AACVC,IAAAA,KAAK,EAAC,4BAA4B;AAAAC,IAAAA,QAAA,gBAElCC,GAAA,CAAA,MAAA,EAAA;AACEC,MAAAA,CAAC,EAAC,6CAA6C;AAC/CP,MAAAA,IAAI,EAAC,SAAS;AACdQ,MAAAA,MAAM,EAAC,SAAA;KACR,CAAC,eACFF,GAAA,CAAA,MAAA,EAAA;AACEC,MAAAA,CAAC,EAAC,6CAA6C;AAC/CP,MAAAA,IAAI,EAAC,SAAS;AACdQ,MAAAA,MAAM,EAAC,SAAA;KACR,CAAC,eACFF,GAAA,CAAA,MAAA,EAAA;AACEC,MAAAA,CAAC,EAAC,6CAA6C;AAC/CP,MAAAA,IAAI,EAAC,SAAS;AACdQ,MAAAA,MAAM,EAAC,SAAA;AAAS,KACjB,CAAC,CAAA;AAAA,GACC,CAAC,CAAA;AAAA,CACP;;AClBD,IAAMC,cAAc,GAAG,SAAjBA,cAAcA,CAAAC,IAAA,EAAA;AAAA,EAAA,IAAMC,SAAS,GAAAD,IAAA,CAATC,SAAS;IAAEN,QAAQ,GAAAK,IAAA,CAARL,QAAQ,CAAA;AAAA,EAAA,oBAC3CN,IAAA,CAAA,KAAA,EAAA;AACEY,IAAAA,SAAS,EAAC,iCAAiC;AAC3C,IAAA,aAAA,EAAY,iBAAiB;AAAAN,IAAAA,QAAA,gBAE7BC,GAAA,CAAA,KAAA,EAAA;AAAKK,MAAAA,SAAS,EAAC,yCAAyC;AAAAN,MAAAA,QAAA,eACtDC,GAAA,CAACR,WAAW,EAAE,EAAA,CAAA;KACX,CAAC,eACNQ,GAAA,CAAA,KAAA,EAAA;AACEK,MAAAA,SAAS,EAAEC,UAAU,CAAC,uCAAuC,EAAED,SAAS,CAAE;AAC1E,MAAA,aAAA,EAAY,sBAAsB;AAAAN,MAAAA,QAAA,EAEjCA,QAAAA;AAAQ,KACN,CAAC,CAAA;AAAA,GACH,CAAC,CAAA;AAAA;;;;"}
1
+ {"version":3,"file":"BrowserPreview.js","sources":["../src/components/BrowserPreview/BrowserIcon.jsx","../src/components/BrowserPreview/index.jsx"],"sourcesContent":["const BrowserIcon = () => (\n <svg\n fill=\"none\"\n height=\"12\"\n viewBox=\"0 0 52 12\"\n width=\"52\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M11.5 6a5.5 5.5 0 11-11 0 5.5 5.5 0 0111 0z\"\n fill=\"#FF5F57\"\n stroke=\"#E14640\"\n />\n <path\n d=\"M31.5 6a5.5 5.5 0 11-11 0 5.5 5.5 0 0111 0z\"\n fill=\"#FFBD2E\"\n stroke=\"#DFA123\"\n />\n <path\n d=\"M51.5 6a5.5 5.5 0 11-11 0 5.5 5.5 0 0111 0z\"\n fill=\"#28CA42\"\n stroke=\"#1DAD2C\"\n />\n </svg>\n);\n\nexport default BrowserIcon;\n","import classNames from \"classnames\";\nimport PropTypes from \"prop-types\";\n\nimport \"./browser-preview.scss\";\nimport BrowserIcon from \"./BrowserIcon.jsx\";\n\nconst BrowserPreview = ({ wrapperClassName, className, children }) => (\n <div\n className={classNames(\"neeto-molecules-browser-preview\", wrapperClassName)}\n data-testid=\"browser-preview\"\n >\n <div className=\"neeto-molecules-browser-preview__header\">\n <BrowserIcon />\n </div>\n <div\n className={classNames(\"neeto-molecules-browser-preview__body\", className)}\n data-testid=\"browser-preview-body\"\n >\n {children}\n </div>\n </div>\n);\n\nBrowserPreview.propTypes = {\n /**\n * The content to be rendered inside the browser preview body.\n */\n children: PropTypes.node,\n /*\n * To provide additional classes to the browser preview container.\n */\n wrapperClassName: PropTypes.string,\n /*\n * To provide additional classes to the browser preview body.\n */\n className: PropTypes.string,\n};\n\nexport default BrowserPreview;\n"],"names":["BrowserIcon","_jsxs","fill","height","viewBox","width","xmlns","children","_jsx","d","stroke","BrowserPreview","_ref","wrapperClassName","className","classNames"],"mappings":";;;;;;;AAAA,IAAMA,WAAW,GAAG,SAAdA,WAAWA,GAAA;AAAA,EAAA,oBACfC,IAAA,CAAA,KAAA,EAAA;AACEC,IAAAA,IAAI,EAAC,MAAM;AACXC,IAAAA,MAAM,EAAC,IAAI;AACXC,IAAAA,OAAO,EAAC,WAAW;AACnBC,IAAAA,KAAK,EAAC,IAAI;AACVC,IAAAA,KAAK,EAAC,4BAA4B;AAAAC,IAAAA,QAAA,gBAElCC,GAAA,CAAA,MAAA,EAAA;AACEC,MAAAA,CAAC,EAAC,6CAA6C;AAC/CP,MAAAA,IAAI,EAAC,SAAS;AACdQ,MAAAA,MAAM,EAAC,SAAA;KACR,CAAC,eACFF,GAAA,CAAA,MAAA,EAAA;AACEC,MAAAA,CAAC,EAAC,6CAA6C;AAC/CP,MAAAA,IAAI,EAAC,SAAS;AACdQ,MAAAA,MAAM,EAAC,SAAA;KACR,CAAC,eACFF,GAAA,CAAA,MAAA,EAAA;AACEC,MAAAA,CAAC,EAAC,6CAA6C;AAC/CP,MAAAA,IAAI,EAAC,SAAS;AACdQ,MAAAA,MAAM,EAAC,SAAA;AAAS,KACjB,CAAC,CAAA;AAAA,GACC,CAAC,CAAA;AAAA,CACP;;AClBD,IAAMC,cAAc,GAAG,SAAjBA,cAAcA,CAAAC,IAAA,EAAA;AAAA,EAAA,IAAMC,gBAAgB,GAAAD,IAAA,CAAhBC,gBAAgB;IAAEC,SAAS,GAAAF,IAAA,CAATE,SAAS;IAAEP,QAAQ,GAAAK,IAAA,CAARL,QAAQ,CAAA;AAAA,EAAA,oBAC7DN,IAAA,CAAA,KAAA,EAAA;AACEa,IAAAA,SAAS,EAAEC,UAAU,CAAC,iCAAiC,EAAEF,gBAAgB,CAAE;AAC3E,IAAA,aAAA,EAAY,iBAAiB;AAAAN,IAAAA,QAAA,gBAE7BC,GAAA,CAAA,KAAA,EAAA;AAAKM,MAAAA,SAAS,EAAC,yCAAyC;AAAAP,MAAAA,QAAA,eACtDC,GAAA,CAACR,WAAW,EAAE,EAAA,CAAA;KACX,CAAC,eACNQ,GAAA,CAAA,KAAA,EAAA;AACEM,MAAAA,SAAS,EAAEC,UAAU,CAAC,uCAAuC,EAAED,SAAS,CAAE;AAC1E,MAAA,aAAA,EAAY,sBAAsB;AAAAP,MAAAA,QAAA,EAEjCA,QAAAA;AAAQ,KACN,CAAC,CAAA;AAAA,GACH,CAAC,CAAA;AAAA;;;;"}
package/dist/Codeblock.js CHANGED
@@ -31,7 +31,7 @@ var Codeblock = function Codeblock(_ref) {
31
31
  className: "relative",
32
32
  children: [/*#__PURE__*/jsx(PrismLight, _objectSpread(_objectSpread({
33
33
  wrapLines: true,
34
- className: "p-4 pr-12 md:pr-4",
34
+ className: "neeto-molecules-code-block p-4 pr-12 md:pr-4",
35
35
  codeTagProps: {
36
36
  "data-cy": "code-block-content"
37
37
  },
@@ -1 +1 @@
1
- {"version":3,"file":"Codeblock.js","sources":["../src/components/Codeblock.jsx"],"sourcesContent":["import PropTypes from \"prop-types\";\nimport { PrismLight as CodeBlock } from \"react-syntax-highlighter\";\nimport { dracula } from \"react-syntax-highlighter/dist/esm/styles/prism\";\n\nimport CopyCode from \"components/CopyToClipboardButton\";\n\nconst Codeblock = ({\n code,\n showCopyButton = true,\n codeblockProps,\n copyButtonProps = { label: \"Copy\" },\n}) => {\n const isLargerScreen = window.innerWidth > 768;\n\n return (\n <div className=\"relative\">\n <CodeBlock\n wrapLines\n className=\"p-4 pr-12 md:pr-4\"\n codeTagProps={{ \"data-cy\": \"code-block-content\" }}\n data-cy=\"code-block\"\n data-testid=\"codeblock-react-highlighter\"\n language=\"javascript\"\n style={dracula}\n {...codeblockProps}\n >\n {code}\n </CodeBlock>\n {showCopyButton && (\n <CopyCode\n className=\"absolute right-2 top-2\"\n data-cy=\"copy-button\"\n data-testid=\"codeblock-copy-button\"\n size=\"small\"\n style=\"secondary\"\n value={code}\n {...copyButtonProps}\n label={isLargerScreen ? copyButtonProps.label : \"\"}\n />\n )}\n </div>\n );\n};\n\nCodeblock.propTypes = {\n /**\n * The code to be displayed.\n */\n code: PropTypes.string,\n /**\n * Flag to determine whether the 'Copy' button is displayed.\n */\n showCopyButton: PropTypes.bool,\n /**\n * Additional props that can be passed on to the 'PrismLight' component from 'react-syntax-highlighter'.\n */\n codeblockProps: PropTypes.object,\n /**\n * Additional props that can be passed on to the 'CopyToClipboardButton' component from 'neeto-molecules'.\n */\n copyButtonProps: PropTypes.object,\n};\n\nexport default Codeblock;\n"],"names":["Codeblock","_ref","code","_ref$showCopyButton","showCopyButton","codeblockProps","_ref$copyButtonProps","copyButtonProps","label","isLargerScreen","window","innerWidth","_jsxs","className","children","_jsx","CodeBlock","_objectSpread","wrapLines","codeTagProps","language","style","dracula","CopyCode","size","value"],"mappings":";;;;;;;;;;;;;;;;;;;AAMA,IAAMA,SAAS,GAAG,SAAZA,SAASA,CAAAC,IAAA,EAKT;AAAA,EAAA,IAJJC,IAAI,GAAAD,IAAA,CAAJC,IAAI;IAAAC,mBAAA,GAAAF,IAAA,CACJG,cAAc;AAAdA,IAAAA,cAAc,GAAAD,mBAAA,KAAG,KAAA,CAAA,GAAA,IAAI,GAAAA,mBAAA;IACrBE,cAAc,GAAAJ,IAAA,CAAdI,cAAc;IAAAC,oBAAA,GAAAL,IAAA,C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["import PropTypes from \"prop-types\";\nimport { PrismLight as CodeBlock } from \"react-syntax-highlighter\";\nimport { dracula } from \"react-syntax-highlighter/dist/esm/styles/prism\";\n\nimport CopyCode from \"components/CopyToClipboardButton\";\n\nconst Codeblock = ({\n code,\n showCopyButton = true,\n codeblockProps,\n copyButtonProps = { label: \"Copy\" },\n}) => {\n const isLargerScreen = window.innerWidth > 768;\n\n return (\n <div className=\"relative\">\n <CodeBlock\n wrapLines\n className=\"neeto-molecules-code-block p-4 pr-12 md:pr-4\"\n codeTagProps={{ \"data-cy\": \"code-block-content\" }}\n data-cy=\"code-block\"\n data-testid=\"codeblock-react-highlighter\"\n language=\"javascript\"\n style={dracula}\n {...codeblockProps}\n >\n {code}\n </CodeBlock>\n {showCopyButton && (\n <CopyCode\n className=\"absolute right-2 top-2\"\n data-cy=\"copy-button\"\n data-testid=\"codeblock-copy-button\"\n size=\"small\"\n style=\"secondary\"\n value={code}\n {...copyButtonProps}\n label={isLargerScreen ? copyButtonProps.label : \"\"}\n />\n )}\n </div>\n );\n};\n\nCodeblock.propTypes = {\n /**\n * The code to be displayed.\n */\n code: PropTypes.string,\n /**\n * Flag to determine whether the 'Copy' button is displayed.\n */\n showCopyButton: PropTypes.bool,\n /**\n * Additional props that can be passed on to the 'PrismLight' component from 'react-syntax-highlighter'.\n */\n codeblockProps: PropTypes.object,\n /**\n * Additional props that can be passed on to the 'CopyToClipboardButton' component from 'neeto-molecules'.\n */\n copyButtonProps: PropTypes.object,\n};\n\nexport default Codeblock;\n"],"names":["Codeblock","_ref","code","_ref$showCopyButton","showCopyButton","codeblockProps","_ref$copyButtonProps","copyButtonProps","label","isLargerScreen","window","innerWidth","_jsxs","className","children","_jsx","CodeBlock","_objectSpread","wrapLines","codeTagProps","language","style","dracula","CopyCode","size","value"],"mappings":";;;;;;;;;;;;;;;;;;;AAMA,IAAMA,SAAS,GAAG,SAAZA,SAASA,CAAAC,IAAA,EAKT;AAAA,EAAA,IAJJC,IAAI,GAAAD,IAA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,EAAA;AACnBC,MAAAA,KAAK,EAAEC,cAAc,GAAGF,eAAe,CAACC,KAAK,GAAG,EAAA;AAAG,KAAA,CACpD,CACF,CAAA;AAAA,GACE,CAAC,CAAA;AAEV;;;;"}
@@ -1,16 +1,17 @@
1
- import { isPresent } from '@bigbinary/neeto-cist';
1
+ import { isPresent, existsBy, isNotEmpty } from '@bigbinary/neeto-cist';
2
2
  import useBreakpoints from '@bigbinary/neeto-commons-frontend/react-utils/useBreakpoints';
3
3
  import { mergeDeepRight, length, filter } from 'ramda';
4
4
  import _defineProperty from '@babel/runtime/helpers/defineProperty';
5
5
  import Tooltip from '@bigbinary/neetoui/Tooltip';
6
- import { Link, NavLink } from 'react-router-dom';
6
+ import { Link, useLocation, NavLink } from 'react-router-dom';
7
7
  import Rename from './Rename.js';
8
8
  import { t } from 'i18next';
9
9
  import Home from '@bigbinary/neeto-icons/Home';
10
10
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
11
+ import classnames from 'classnames';
11
12
  import { joinHyphenCase } from '@bigbinary/neeto-commons-frontend/utils/general';
13
+ import Dropdown from '@bigbinary/neetoui/Dropdown';
12
14
  import Typography from '@bigbinary/neetoui/Typography';
13
- import classnames from 'classnames';
14
15
  import { useTranslation } from 'react-i18next';
15
16
  import PublishBlock from './PublishBlock.js';
16
17
  import { n } from './inject-css-DmrvuTKK.js';
@@ -30,7 +31,6 @@ import './MoreDropdown.js';
30
31
  import '@babel/runtime/helpers/objectWithoutProperties';
31
32
  import '@bigbinary/neeto-icons/MenuHorizontal';
32
33
  import '@bigbinary/neeto-icons/MenuVertical';
33
- import '@bigbinary/neetoui/Dropdown';
34
34
  import '@babel/runtime/helpers/asyncToGenerator';
35
35
  import '@babel/runtime/regenerator';
36
36
  import '@bigbinary/neeto-commons-frontend/react-utils/withT';
@@ -87,30 +87,64 @@ var LeftBlock = function LeftBlock(_ref) {
87
87
 
88
88
  function ownKeys$1(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
89
89
  function _objectSpread$1(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
90
+ var Menu = Dropdown.Menu,
91
+ MenuItem = Dropdown.MenuItem;
90
92
  var NavigationLinks = function NavigationLinks(_ref) {
91
- var headerLinks = _ref.headerLinks;
92
- return /*#__PURE__*/jsx("div", {
93
- className: "flex w-full items-center justify-between gap-4 md:justify-center md:gap-3 lg:gap-6",
93
+ var headerLinks = _ref.headerLinks,
94
+ _ref$maxVisibleLinks = _ref.maxVisibleLinks,
95
+ maxVisibleLinks = _ref$maxVisibleLinks === void 0 ? 5 : _ref$maxVisibleLinks;
96
+ var _useLocation = useLocation(),
97
+ pathname = _useLocation.pathname;
98
+ var _useTranslation = useTranslation(),
99
+ t = _useTranslation.t;
100
+ var visibleLinks = headerLinks.slice(0, maxVisibleLinks);
101
+ var overflowLinks = headerLinks.slice(maxVisibleLinks);
102
+ var isMoreButtonActive = existsBy({
103
+ to: pathname
104
+ }, overflowLinks);
105
+ return /*#__PURE__*/jsxs("div", {
106
+ className: "font- flex w-full items-center justify-between gap-4 md:justify-center md:gap-3 lg:gap-6",
94
107
  "data-cy": "navigation-header-navigation-links",
95
108
  "data-testid": "navigation-header-navigation-links",
96
- children: headerLinks.map(function (headerLink) {
109
+ children: [visibleLinks.map(function (headerLink) {
97
110
  return /*#__PURE__*/jsx(NavLink, _objectSpread$1(_objectSpread$1({
98
111
  activeClassName: "active",
99
112
  className: "neeto-molecules-navigation-header__link px-2 capitalize no-underline md:px-0",
100
113
  "data-cy": "".concat(joinHyphenCase(headerLink.key), "-tab")
101
114
  }, headerLink), {}, {
102
115
  children: /*#__PURE__*/jsx(Typography, {
116
+ component: "span",
103
117
  lineHeight: "normal",
104
118
  style: "h4",
105
119
  weight: "semibold",
106
120
  children: headerLink.label
107
121
  })
108
122
  }), headerLink.key);
109
- })
123
+ }), isNotEmpty(overflowLinks) && /*#__PURE__*/jsx(Dropdown, {
124
+ buttonStyle: "text",
125
+ label: t("neetoMolecules.navigationHeader.more"),
126
+ position: "bottom-end",
127
+ buttonProps: {
128
+ className: classnames("neeto-molecules-navigation-header__link neeto-molecules-navigation-header__link--more neeto-ui-typography neeto-ui-text-h4 neeto-ui-font-semibold neeto-ui-leading-normal px-2 capitalize no-underline md:px-0", {
129
+ active: isMoreButtonActive
130
+ })
131
+ },
132
+ children: /*#__PURE__*/jsx(Menu, {
133
+ children: overflowLinks.map(function (headerLink) {
134
+ return /*#__PURE__*/jsx(MenuItem.Button, _objectSpread$1(_objectSpread$1({
135
+ "data-cy": "".concat(joinHyphenCase(headerLink.key), "-more-tab"),
136
+ isActive: headerLink.to === pathname,
137
+ to: headerLink.to
138
+ }, headerLink), {}, {
139
+ children: headerLink.label
140
+ }), headerLink.key);
141
+ })
142
+ })
143
+ })]
110
144
  });
111
145
  };
112
146
 
113
- var css = ".standalone-publish-preview-button{border-radius:var(--neeto-ui-rounded)!important}.neeto-molecules-navigation-header .neeto-ui-text-h4{color:inherit}@media screen and (max-width:1024px){.neeto-molecules-navigation-header .neeto-ui-text-h4{font-size:.875rem;font-weight:var(--neeto-ui-font-medium)}}.neeto-molecules-navigation-header .neeto-molecules-navigation-header__link{color:rgb(var(--neeto-ui-gray-500))}.neeto-molecules-navigation-header .neeto-molecules-navigation-header__link.active{color:rgb(var(--neeto-ui-black))}.neeto-molecules-navigation-header .neeto-molecules-navigation-header__link:hover:not(.active){color:rgb(var(--neeto-ui-gray-600))}.neeto-molecules-navigation-header .neeto-molecules-navigation-header__link.disabled{color:rgb(var(--neeto-ui-gray-300));cursor:not-allowed}.neeto-molecules-navigation-header .neeto-molecules-navigation-header__link.disabled:hover{color:rgb(var(--neeto-ui-gray-300))}";
147
+ var css = ".standalone-publish-preview-button{border-radius:var(--neeto-ui-rounded)!important}.neeto-molecules-navigation-header .neeto-ui-text-h4{color:inherit}@media screen and (max-width:1024px){.neeto-molecules-navigation-header .neeto-ui-text-h4{font-size:.875rem;font-weight:var(--neeto-ui-font-medium)}}.neeto-molecules-navigation-header .neeto-molecules-navigation-header__link{color:rgb(var(--neeto-ui-gray-500))}.neeto-molecules-navigation-header .neeto-molecules-navigation-header__link--more{background-color:transparent!important;box-shadow:none!important;padding-bottom:0!important;padding-top:0!important}.neeto-molecules-navigation-header .neeto-molecules-navigation-header__link.active{color:rgb(var(--neeto-ui-black))}.neeto-molecules-navigation-header .neeto-molecules-navigation-header__link:hover:not(.active){color:rgb(var(--neeto-ui-gray-600))}.neeto-molecules-navigation-header .neeto-molecules-navigation-header__link.disabled{color:rgb(var(--neeto-ui-gray-300));cursor:not-allowed}.neeto-molecules-navigation-header .neeto-molecules-navigation-header__link.disabled:hover{color:rgb(var(--neeto-ui-gray-300))}";
114
148
  n(css,{});
115
149
 
116
150
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
@@ -1 +1 @@
1
- {"version":3,"file":"NavigationHeader.js","sources":["../src/components/NavigationHeader/constants.jsx","../src/components/NavigationHeader/LeftBlock.jsx","../src/components/NavigationHeader/Navigation.jsx","../src/components/NavigationHeader/RightBlock.jsx","../src/components/NavigationHeader/index.jsx"],"sourcesContent":["import { t } from \"i18next\";\nimport { Home } from \"neetoicons\";\n\nexport const DEFAULT_HOME_BUTTON_PROPS = {\n tooltip: {\n content: t(\"neetoMolecules.navigationHeader.home\"),\n position: \"bottom\",\n },\n homeUrl: \"/\",\n icon: <Home />,\n};\n","import { isPresent } from \"neetocist\";\nimport { Tooltip } from \"neetoui\";\nimport PropTypes from \"prop-types\";\nimport { mergeDeepRight } from \"ramda\";\nimport { Link } from \"react-router-dom\";\n\nimport Rename from \"components/Rename\";\n\nimport { DEFAULT_HOME_BUTTON_PROPS } from \"./constants\";\n\nconst LeftBlock = ({\n homeButtonProps: customHomeButtonProps,\n homeUrl,\n renameProps,\n children,\n}) => {\n const homeButtonProps = mergeDeepRight(\n DEFAULT_HOME_BUTTON_PROPS,\n customHomeButtonProps\n );\n\n return (\n <div\n className=\"flex items-center gap-1 md:gap-2\"\n data-cy=\"navigation-header-left-block\"\n data-testid=\"navigation-header-left-block\"\n >\n <Tooltip\n content={homeButtonProps.tooltip.content}\n position={homeButtonProps.tooltip.position}\n touch={[\"hold\", 500]}\n >\n <Link data-cy=\"home-button\" data-testid=\"home-button\" to={homeUrl}>\n <div className=\"neeto-ui-rounded hover:neeto-ui-bg-gray-200 p-1\">\n {homeButtonProps.icon}\n </div>\n </Link>\n </Tooltip>\n {isPresent(renameProps) && (\n <Rename\n dropdownItems={renameProps.dropdownItems}\n value={renameProps.value}\n {...renameProps}\n />\n )}\n {children}\n </div>\n );\n};\n\nLeftBlock.propTypes = {\n /**\n * Object containing the home button icon and the props to be passed to the tooltip of the home button.\n */\n homeButtonProps: PropTypes.shape({\n tooltip: PropTypes.shape({\n content: PropTypes.string,\n postition: PropTypes.string,\n }),\n icon: PropTypes.node,\n }),\n /**\n * URL to navigate when the home button is clicked.\n */\n homeUrl: PropTypes.string.isRequired,\n /**\n * Props to be passed to the `Rename` component. Please check the `Rename` component props for more details\n */\n renameProps: PropTypes.object,\n /**\n * To render extra content in the block.\n */\n children: PropTypes.node,\n};\n\nexport default LeftBlock;\n","import { joinHyphenCase } from \"neetocommons/utils/general\";\nimport { Typography } from \"neetoui\";\nimport PropTypes from \"prop-types\";\nimport { NavLink } from \"react-router-dom\";\n\nconst NavigationLinks = ({ headerLinks }) => (\n <div\n className=\"flex w-full items-center justify-between gap-4 md:justify-center md:gap-3 lg:gap-6\"\n data-cy=\"navigation-header-navigation-links\"\n data-testid=\"navigation-header-navigation-links\"\n >\n {headerLinks.map(headerLink => (\n <NavLink\n activeClassName=\"active\"\n className=\"neeto-molecules-navigation-header__link px-2 capitalize no-underline md:px-0\"\n data-cy={`${joinHyphenCase(headerLink.key)}-tab`}\n key={headerLink.key}\n {...headerLink}\n >\n <Typography lineHeight=\"normal\" style=\"h4\" weight=\"semibold\">\n {headerLink.label}\n </Typography>\n </NavLink>\n ))}\n </div>\n);\n\nNavigationLinks.propTypes = {\n /**\n * Links to be rendered in the center of the navigation header. It is an array of objects.\n * Each object should have the properties `key`, `to` and `label`. Other props will be passed on to the `Navlink` component from\n `react-router-dom`.\n */\n headerLinks: PropTypes.arrayOf(\n PropTypes.shape({\n key: PropTypes.string,\n to: PropTypes.string,\n label: PropTypes.string,\n })\n ),\n};\n\nexport default NavigationLinks;\n","import classNames from \"classnames\";\nimport PropTypes from \"prop-types\";\nimport { useTranslation } from \"react-i18next\";\n\nimport PublishBlock from \"components/PublishBlock\";\n\nimport \"./navigation-header.scss\";\n\nconst RightBlock = ({\n isDraftBlockHidden,\n previewDraftUrl,\n isResetDraftButtonVisible,\n onResetClick,\n isResetting,\n isPublishDisabled,\n isPublishing,\n handlePublish,\n isPublishPreviewDisabled,\n previewPublishedUrl,\n isPublishButtonVisible,\n isResetAlertOpen,\n setIsResetAlertOpen,\n handleReset,\n publishAlertTitle,\n publishAlertDescription,\n publishButtonProps = {},\n}) => {\n const { t } = useTranslation();\n\n const renderDraftButtons = ({ ViewDraftButton, ResetDraftButton }) =>\n !isDraftBlockHidden && (\n <>\n <ViewDraftButton to={previewDraftUrl} />\n {isResetDraftButtonVisible && (\n <ResetDraftButton\n loading={isResetting}\n onClick={() => onResetClick()}\n />\n )}\n </>\n );\n\n const renderPublishButtons = ({ PublishButton, PublishPreviewButton }) => (\n <>\n {isPublishButtonVisible && (\n <PublishButton\n disabled={isPublishDisabled}\n loading={isPublishing}\n onClick={() => handlePublish()}\n {...publishButtonProps}\n />\n )}\n <PublishPreviewButton\n disabled={isPublishPreviewDisabled}\n to={previewPublishedUrl}\n className={classNames({\n \"standalone-publish-preview-button\": !isPublishButtonVisible,\n })}\n />\n </>\n );\n\n return (\n <>\n <PublishBlock {...{ renderDraftButtons, renderPublishButtons }} />\n <PublishBlock.Alert\n isOpen={isResetAlertOpen}\n isSubmitting={isResetting}\n message={\n publishAlertDescription ||\n t(\"neetoMolecules.navigationHeader.resetDescription\")\n }\n title={\n publishAlertTitle || t(\"neetoMolecules.navigationHeader.resetTitle\")\n }\n onClose={() => setIsResetAlertOpen(false)}\n onSubmit={handleReset}\n />\n </>\n );\n};\n\nRightBlock.propTypes = {\n /**\n * To show/hide the draft block.\n */\n isDraftBlockHidden: PropTypes.bool,\n /**\n * Draft preview URL, when the draft button is clicked user will be redirected to this URL.\n */\n previewDraftUrl: PropTypes.string,\n /**\n * Boolean to control the visibility of reset draft button.\n */\n isResetDraftButtonVisible: PropTypes.bool,\n /**\n * Callback function that will be called when the reset button is clicked.\n */\n onResetClick: PropTypes.func,\n /**\n * Setting this to `true` will show a spinner on the reset button. Use when the reset process is in progress.\n */\n isResetting: PropTypes.bool,\n /**\n * To disable the publish button.\n */\n isPublishDisabled: PropTypes.bool,\n /**\n * Setting this to `true` will show a spinner on the publish button. Use when the publish process is in progress.\n */\n isPublishing: PropTypes.bool,\n /**\n * Callback function that will be called when the publish button is clicked.\n */\n handlePublish: PropTypes.func,\n /**\n * To disable the publish preview button.\n */\n isPublishPreviewDisabled: PropTypes.bool,\n /**\n * Publish preview URL, when the preview publish button is clicked user will be redirected to this URL.\n */\n previewPublishedUrl: PropTypes.string,\n /**\n * Boolean to control whether the user have the ability to publish.\n */\n isPublishButtonVisible: PropTypes.bool,\n /**\n * Boolean to control whether the reset alert is open.\n */\n isResetAlertOpen: PropTypes.bool,\n /**\n * Handler to control the `isResetAlert` state variable.\n */\n setIsResetAlertOpen: PropTypes.func,\n /**\n * Callback function that will be called when the reset button is clicked.\n */\n handleReset: PropTypes.func,\n /**\n * Description to be shown in the publish alert\n */\n publishAlertDescription: PropTypes.string,\n /**\n * Title of the publish alert\n */\n publishAlertTitle: PropTypes.string,\n /**\n * Props to be passed to the publish button\n */\n publishButtonProps: PropTypes.object,\n};\n\nexport default RightBlock;\n","import { isPresent } from \"neetocist\";\nimport useBreakpoints from \"neetocommons/react-utils/useBreakpoints\";\nimport PropTypes from \"prop-types\";\nimport { filter, length } from \"ramda\";\n\nimport LeftBlock from \"./LeftBlock\";\nimport NavigationLinks from \"./Navigation\";\nimport RightBlock from \"./RightBlock\";\n\nconst NavigationHeader = ({\n leftActionBlock,\n navigationLinks,\n rightActionBlock,\n}) => {\n const { isSize } = useBreakpoints();\n const isMobile = isSize(\"mobile\");\n\n const numberOfChildren = length(\n filter(isPresent, [leftActionBlock, navigationLinks, rightActionBlock])\n );\n\n return (\n <div className=\"w-full\">\n <div\n className=\"neeto-molecules-navigation-header neeto-ui-border-gray-200 neeto-ui-bg-white flex h-16 w-full flex-shrink-0 items-center overflow-x-auto border-b px-2 py-2 md:px-4 lg:px-6\"\n data-cy=\"navigation-header\"\n data-testid=\"navigation-header\"\n >\n <div\n className=\"grid w-full gap-4\"\n style={{\n gridTemplateColumns: isMobile\n ? `repeat(${numberOfChildren - 1}, 1fr)`\n : `repeat(${numberOfChildren}, 1fr)`,\n }}\n >\n {leftActionBlock}\n {!isMobile && navigationLinks}\n {rightActionBlock}\n </div>\n </div>\n {isMobile && (\n <div className=\"neeto-molecules-navigation-header neeto-ui-border-gray-200 neeto-ui-bg-white ßflex-shrink-0 flex items-center overflow-x-auto border-b px-4 py-2 lg:px-6\">\n {navigationLinks}\n </div>\n )}\n </div>\n );\n};\n\nNavigationHeader.LeftActionBlock = LeftBlock;\nNavigationHeader.NavigationLinks = NavigationLinks;\nNavigationHeader.RightActionBlock = RightBlock;\n\nNavigationHeader.propTypes = {\n /**\n * To specify the content to be rendered in the left side of the `NavigationHeader`.\n */\n leftActionBlock: PropTypes.node,\n /**\n * To specify the content to be rendered at the center of the `NavigationHeader`.\n */\n navigationLinks: PropTypes.node,\n /**\n * To specify the content to be rendered in the right side of the `NavigationHeader`.\n */\n rightActionBlock: PropTypes.node,\n};\n\nexport default NavigationHeader;\n"],"names":["DEFAULT_HOME_BUTTON_PROPS","tooltip","content","t","position","homeUrl","icon","_jsx","Home","LeftBlock","_ref","customHomeButtonProps","homeButtonProps","renameProps","children","mergeDeepRight","_jsxs","className","Tooltip","touch","Link","to","isPresent","Rename","_objectSpread","dropdownItems","value","NavigationLinks","headerLinks","map","headerLink","NavLink","activeClassName","concat","joinHyphenCase","key","Typography","lineHeight","style","weight","label","RightBlock","isDraftBlockHidden","previewDraftUrl","isResetDraftButtonVisible","onResetClick","isResetting","isPublishDisabled","isPublishing","handlePublish","isPublishPreviewDisabled","previewPublishedUrl","isPublishButtonVisible","isResetAlertOpen","setIsResetAlertOpen","handleReset","publishAlertTitle","publishAlertDescription","_ref$publishButtonPro","publishButtonProps","_useTranslation","useTranslation","renderDraftButtons","_ref2","ViewDraftButton","ResetDraftButton","_Fragment","loading","onClick","renderPublishButtons","_ref3","PublishButton","PublishPreviewButton","disabled","classNames","PublishBlock","Alert","isOpen","isSubmitting","message","title","onClose","onSubmit","NavigationHeader","leftActionBlock","navigationLinks","rightActionBlock","_useBreakpoints","useBreakpoints","isSize","isMobile","numberOfChildren","length","filter","gridTemplateColumns","LeftActionBlock","RightActionBlock"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGO,IAAMA,yBAAyB,GAAG;AACvCC,EAAAA,OAAO,EAAE;AACPC,IAAAA,OAAO,EAAEC,CAAC,CAAC,sCAAsC,CAAC;AAClDC,IAAAA,QAAQ,EAAE,QAAA;GACX;AACDC,EAAAA,OAAO,EAAE,GAAG;AACZC,EAAAA,IAAI,eAAEC,GAAA,CAAC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AA,CACf0D,gBAAgB,GAAG,CAAC,EAAA,QAAA,CAAA,GAAA,SAAA,CAAA1D,MAAA,CACpB0D,gBAAgB,EAAA,QAAA,CAAA;SAC9B;QAAA7E,QAAA,EAAA,CAEDsE,eAAe,EACf,CAACM,QAAQ,IAAIL,eAAe,EAC5BC,gBAAgB,CAAA;OACd,CAAA;AAAC,KACH,CAAC,EACLI,QAAQ,iBACPnF,GAAA,CAAA,KAAA,EAAA;AAAKU,MAAAA,SAAS,EAAC,6JAA0J;AAAAH,MAAAA,QAAA,EACtKuE,eAAAA;AAAe,KACb,CACN,CAAA;AAAA,GACE,CAAC,CAAA;AAEV,EAAC;AAEDF,gBAAgB,CAACY,eAAe,GAAGtF,SAAS,CAAA;AAC5C0E,gBAAgB,CAACxD,eAAe,GAAGA,eAAe,CAAA;AAClDwD,gBAAgB,CAACa,gBAAgB,GAAGvD,UAAU;;;;"}
1
+ {"version":3,"file":"NavigationHeader.js","sources":["../src/components/NavigationHeader/constants.jsx","../src/components/NavigationHeader/LeftBlock.jsx","../src/components/NavigationHeader/Navigation.jsx","../src/components/NavigationHeader/RightBlock.jsx","../src/components/NavigationHeader/index.jsx"],"sourcesContent":["import { t } from \"i18next\";\nimport { Home } from \"neetoicons\";\n\nexport const DEFAULT_HOME_BUTTON_PROPS = {\n tooltip: {\n content: t(\"neetoMolecules.navigationHeader.home\"),\n position: \"bottom\",\n },\n homeUrl: \"/\",\n icon: <Home />,\n};\n","import { isPresent } from \"neetocist\";\nimport { Tooltip } from \"neetoui\";\nimport PropTypes from \"prop-types\";\nimport { mergeDeepRight } from \"ramda\";\nimport { Link } from \"react-router-dom\";\n\nimport Rename from \"components/Rename\";\n\nimport { DEFAULT_HOME_BUTTON_PROPS } from \"./constants\";\n\nconst LeftBlock = ({\n homeButtonProps: customHomeButtonProps,\n homeUrl,\n renameProps,\n children,\n}) => {\n const homeButtonProps = mergeDeepRight(\n DEFAULT_HOME_BUTTON_PROPS,\n customHomeButtonProps\n );\n\n return (\n <div\n className=\"flex items-center gap-1 md:gap-2\"\n data-cy=\"navigation-header-left-block\"\n data-testid=\"navigation-header-left-block\"\n >\n <Tooltip\n content={homeButtonProps.tooltip.content}\n position={homeButtonProps.tooltip.position}\n touch={[\"hold\", 500]}\n >\n <Link data-cy=\"home-button\" data-testid=\"home-button\" to={homeUrl}>\n <div className=\"neeto-ui-rounded hover:neeto-ui-bg-gray-200 p-1\">\n {homeButtonProps.icon}\n </div>\n </Link>\n </Tooltip>\n {isPresent(renameProps) && (\n <Rename\n dropdownItems={renameProps.dropdownItems}\n value={renameProps.value}\n {...renameProps}\n />\n )}\n {children}\n </div>\n );\n};\n\nLeftBlock.propTypes = {\n /**\n * Object containing the home button icon and the props to be passed to the tooltip of the home button.\n */\n homeButtonProps: PropTypes.shape({\n tooltip: PropTypes.shape({\n content: PropTypes.string,\n postition: PropTypes.string,\n }),\n icon: PropTypes.node,\n }),\n /**\n * URL to navigate when the home button is clicked.\n */\n homeUrl: PropTypes.string.isRequired,\n /**\n * Props to be passed to the `Rename` component. Please check the `Rename` component props for more details\n */\n renameProps: PropTypes.object,\n /**\n * To render extra content in the block.\n */\n children: PropTypes.node,\n};\n\nexport default LeftBlock;\n","import classNames from \"classnames\";\nimport { existsBy, isNotEmpty } from \"neetocist\";\nimport { joinHyphenCase } from \"neetocommons/utils/general\";\nimport { Dropdown, Typography } from \"neetoui\";\nimport PropTypes from \"prop-types\";\nimport { useTranslation } from \"react-i18next\";\nimport { NavLink, useLocation } from \"react-router-dom\";\n\nconst { Menu, MenuItem } = Dropdown;\n\nconst NavigationLinks = ({ headerLinks, maxVisibleLinks = 5 }) => {\n const { pathname } = useLocation();\n const { t } = useTranslation();\n\n const visibleLinks = headerLinks.slice(0, maxVisibleLinks);\n const overflowLinks = headerLinks.slice(maxVisibleLinks);\n\n const isMoreButtonActive = existsBy({ to: pathname }, overflowLinks);\n\n return (\n <div\n className=\"font- flex w-full items-center justify-between gap-4 md:justify-center md:gap-3 lg:gap-6\"\n data-cy=\"navigation-header-navigation-links\"\n data-testid=\"navigation-header-navigation-links\"\n >\n {visibleLinks.map(headerLink => (\n <NavLink\n activeClassName=\"active\"\n className=\"neeto-molecules-navigation-header__link px-2 capitalize no-underline md:px-0\"\n data-cy={`${joinHyphenCase(headerLink.key)}-tab`}\n key={headerLink.key}\n {...headerLink}\n >\n <Typography\n component=\"span\"\n lineHeight=\"normal\"\n style=\"h4\"\n weight=\"semibold\"\n >\n {headerLink.label}\n </Typography>\n </NavLink>\n ))}\n {isNotEmpty(overflowLinks) && (\n <Dropdown\n buttonStyle=\"text\"\n label={t(\"neetoMolecules.navigationHeader.more\")}\n position=\"bottom-end\"\n buttonProps={{\n className: classNames(\n \"neeto-molecules-navigation-header__link neeto-molecules-navigation-header__link--more neeto-ui-typography neeto-ui-text-h4 neeto-ui-font-semibold neeto-ui-leading-normal px-2 capitalize no-underline md:px-0\",\n { active: isMoreButtonActive }\n ),\n }}\n >\n <Menu>\n {overflowLinks.map(headerLink => (\n <MenuItem.Button\n data-cy={`${joinHyphenCase(headerLink.key)}-more-tab`}\n isActive={headerLink.to === pathname}\n key={headerLink.key}\n to={headerLink.to}\n {...headerLink}\n >\n {headerLink.label}\n </MenuItem.Button>\n ))}\n </Menu>\n </Dropdown>\n )}\n </div>\n );\n};\n\nNavigationLinks.propTypes = {\n /**\n * Links to be rendered in the center of the navigation header. It is an array of objects.\n * Each object should have the properties `key`, `to` and `label`. Other props will be passed on to the `Navlink` component from\n `react-router-dom`.\n */\n headerLinks: PropTypes.arrayOf(\n PropTypes.shape({\n key: PropTypes.string,\n to: PropTypes.string,\n label: PropTypes.string,\n })\n ),\n /**\n * Maximum number of links to be visible in the navigation header. Remaining links will be shown in a more dropdown.\n */\n maxVisibleLinks: PropTypes.number,\n};\n\nexport default NavigationLinks;\n","import classNames from \"classnames\";\nimport PropTypes from \"prop-types\";\nimport { useTranslation } from \"react-i18next\";\n\nimport PublishBlock from \"components/PublishBlock\";\n\nimport \"./navigation-header.scss\";\n\nconst RightBlock = ({\n isDraftBlockHidden,\n previewDraftUrl,\n isResetDraftButtonVisible,\n onResetClick,\n isResetting,\n isPublishDisabled,\n isPublishing,\n handlePublish,\n isPublishPreviewDisabled,\n previewPublishedUrl,\n isPublishButtonVisible,\n isResetAlertOpen,\n setIsResetAlertOpen,\n handleReset,\n publishAlertTitle,\n publishAlertDescription,\n publishButtonProps = {},\n}) => {\n const { t } = useTranslation();\n\n const renderDraftButtons = ({ ViewDraftButton, ResetDraftButton }) =>\n !isDraftBlockHidden && (\n <>\n <ViewDraftButton to={previewDraftUrl} />\n {isResetDraftButtonVisible && (\n <ResetDraftButton\n loading={isResetting}\n onClick={() => onResetClick()}\n />\n )}\n </>\n );\n\n const renderPublishButtons = ({ PublishButton, PublishPreviewButton }) => (\n <>\n {isPublishButtonVisible && (\n <PublishButton\n disabled={isPublishDisabled}\n loading={isPublishing}\n onClick={() => handlePublish()}\n {...publishButtonProps}\n />\n )}\n <PublishPreviewButton\n disabled={isPublishPreviewDisabled}\n to={previewPublishedUrl}\n className={classNames({\n \"standalone-publish-preview-button\": !isPublishButtonVisible,\n })}\n />\n </>\n );\n\n return (\n <>\n <PublishBlock {...{ renderDraftButtons, renderPublishButtons }} />\n <PublishBlock.Alert\n isOpen={isResetAlertOpen}\n isSubmitting={isResetting}\n message={\n publishAlertDescription ||\n t(\"neetoMolecules.navigationHeader.resetDescription\")\n }\n title={\n publishAlertTitle || t(\"neetoMolecules.navigationHeader.resetTitle\")\n }\n onClose={() => setIsResetAlertOpen(false)}\n onSubmit={handleReset}\n />\n </>\n );\n};\n\nRightBlock.propTypes = {\n /**\n * To show/hide the draft block.\n */\n isDraftBlockHidden: PropTypes.bool,\n /**\n * Draft preview URL, when the draft button is clicked user will be redirected to this URL.\n */\n previewDraftUrl: PropTypes.string,\n /**\n * Boolean to control the visibility of reset draft button.\n */\n isResetDraftButtonVisible: PropTypes.bool,\n /**\n * Callback function that will be called when the reset button is clicked.\n */\n onResetClick: PropTypes.func,\n /**\n * Setting this to `true` will show a spinner on the reset button. Use when the reset process is in progress.\n */\n isResetting: PropTypes.bool,\n /**\n * To disable the publish button.\n */\n isPublishDisabled: PropTypes.bool,\n /**\n * Setting this to `true` will show a spinner on the publish button. Use when the publish process is in progress.\n */\n isPublishing: PropTypes.bool,\n /**\n * Callback function that will be called when the publish button is clicked.\n */\n handlePublish: PropTypes.func,\n /**\n * To disable the publish preview button.\n */\n isPublishPreviewDisabled: PropTypes.bool,\n /**\n * Publish preview URL, when the preview publish button is clicked user will be redirected to this URL.\n */\n previewPublishedUrl: PropTypes.string,\n /**\n * Boolean to control whether the user have the ability to publish.\n */\n isPublishButtonVisible: PropTypes.bool,\n /**\n * Boolean to control whether the reset alert is open.\n */\n isResetAlertOpen: PropTypes.bool,\n /**\n * Handler to control the `isResetAlert` state variable.\n */\n setIsResetAlertOpen: PropTypes.func,\n /**\n * Callback function that will be called when the reset button is clicked.\n */\n handleReset: PropTypes.func,\n /**\n * Description to be shown in the publish alert\n */\n publishAlertDescription: PropTypes.string,\n /**\n * Title of the publish alert\n */\n publishAlertTitle: PropTypes.string,\n /**\n * Props to be passed to the publish button\n */\n publishButtonProps: PropTypes.object,\n};\n\nexport default RightBlock;\n","import { isPresent } from \"neetocist\";\nimport useBreakpoints from \"neetocommons/react-utils/useBreakpoints\";\nimport PropTypes from \"prop-types\";\nimport { filter, length } from \"ramda\";\n\nimport LeftBlock from \"./LeftBlock\";\nimport NavigationLinks from \"./Navigation\";\nimport RightBlock from \"./RightBlock\";\n\nconst NavigationHeader = ({\n leftActionBlock,\n navigationLinks,\n rightActionBlock,\n}) => {\n const { isSize } = useBreakpoints();\n const isMobile = isSize(\"mobile\");\n\n const numberOfChildren = length(\n filter(isPresent, [leftActionBlock, navigationLinks, rightActionBlock])\n );\n\n return (\n <div className=\"w-full\">\n <div\n className=\"neeto-molecules-navigation-header neeto-ui-border-gray-200 neeto-ui-bg-white flex h-16 w-full flex-shrink-0 items-center overflow-x-auto border-b px-2 py-2 md:px-4 lg:px-6\"\n data-cy=\"navigation-header\"\n data-testid=\"navigation-header\"\n >\n <div\n className=\"grid w-full gap-4\"\n style={{\n gridTemplateColumns: isMobile\n ? `repeat(${numberOfChildren - 1}, 1fr)`\n : `repeat(${numberOfChildren}, 1fr)`,\n }}\n >\n {leftActionBlock}\n {!isMobile && navigationLinks}\n {rightActionBlock}\n </div>\n </div>\n {isMobile && (\n <div className=\"neeto-molecules-navigation-header neeto-ui-border-gray-200 neeto-ui-bg-white ßflex-shrink-0 flex items-center overflow-x-auto border-b px-4 py-2 lg:px-6\">\n {navigationLinks}\n </div>\n )}\n </div>\n );\n};\n\nNavigationHeader.LeftActionBlock = LeftBlock;\nNavigationHeader.NavigationLinks = NavigationLinks;\nNavigationHeader.RightActionBlock = RightBlock;\n\nNavigationHeader.propTypes = {\n /**\n * To specify the content to be rendered in the left side of the `NavigationHeader`.\n */\n leftActionBlock: PropTypes.node,\n /**\n * To specify the content to be rendered at the center of the `NavigationHeader`.\n */\n navigationLinks: PropTypes.node,\n /**\n * To specify the content to be rendered in the right side of the `NavigationHeader`.\n */\n rightActionBlock: PropTypes.node,\n};\n\nexport default NavigationHeader;\n"],"names":["DEFAULT_HOME_BUTTON_PROPS","tooltip","content","t","position","homeUrl","icon","_jsx","Home","LeftBlock","_ref","customHomeButtonProps","homeButtonProps","renameProps","children","mergeDeepRight","_jsxs","className","Tooltip","touch","Link","to","isPresent","Rename","_objectSpread","dropdownItems","value","Menu","Dropdown","MenuItem","NavigationLinks","headerLinks","_ref$maxVisibleLinks","maxVisibleLinks","_useLocation","useLocation","pathname","_useTranslation","useTranslation","visibleLinks","slice","overflowLinks","isMoreButtonActive","existsBy","map","headerLink","NavLink","activeClassName","concat","joinHyphenCase","key","Typography","component","lineHeight","style","weight","label","isNotEmpty","buttonStyle","buttonProps","classNames","active","Button","isActive","RightBlock","isDraftBlockHidden","previewDraftUrl","isResetDraftButtonVisible","onResetClick","isResetting","isPublishDisabled","isPublishing","handlePublish","isPublishPreviewDisabled","previewPublishedUrl","isPublishButtonVisible","isResetAlertOpen","setIsResetAlertOpen","handleReset","publishAlertTitle","publishAlertDescription","_ref$publishButtonPro","publishButtonProps","renderDraftButtons","_ref2","ViewDraftButton","ResetDraftButton","_Fragment","loading","onClick","renderPublishButtons","_ref3","PublishButton","PublishPreviewButton","disabled","PublishBlock","Alert","isOpen","isSubmitting","message","title","onClose","onSubmit","NavigationHeader","leftActionBlock","navigationLinks","rightActionBlock","_useBreakpoints","useBreakpoints","isSize","isMobile","numberOfChildren","length","filter","gridTemplateColumns","LeftActionBlock","RightActionBlock"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGO,IAAMA,yBAAyB,GAAG;AACvCC,EAAAA,OAAO,EAAE;AACPC,IAAAA,OAAO,EAAEC,CAAC,CAAC,sCAAsC,CAAC;AAClDC,IAAAA,QAAQ,EAAE,QAAA;GACX;AACDC,EAAAA,OAAO,EAAE,GAAG;AACZC,EAAAA,IAAI,eAAEC,GAAA,CAACC,IAAI,EAAE,EAAA,CAAA;AACf,CAAC;;;;ACAD,IAAMC,SAAS,GAAG,SAAZA,SAASA,CAAAC,IAAA,EAKT;AAAA,EAAA,IAJaC,qBAAqB,GAAAD,IAAA,CAAtCE,eAAe;IACfP,OAAO,GAAAK,IAAA,CAAPL,OAAO;IACPQ,WAAW,GAAAH,IAAA,CAAXG,WAAW;IACXC,QAAQ,GAAAJ,IAAA,CAARI,QAAQ,CAAA;AAER,EAAA,IAAMF,eAAe,GAAGG,cAAc,CACpCf,yBAAyB,EACzBW,qBACF,CAAC,CAAA;AAED,EAAA,oBACEK,IAAA,CAAA,KAAA,EAAA;AACEC,IAAAA,SAAS,EAAC,kCAAkC;AAC5C,IAAA,SAAA,EAAQ,8BAA8B;AACtC,IAAA,aAAA,EAAY,8BAA8B;IAAAH,QAAA,EAAA,cAE1CP,GAAA,CAACW,OAAO,EAAA;AACNhB,MAAAA,OAAO,EAAEU,eA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