@bigbinary/neeto-molecules 4.0.109-beta → 4.0.110
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/Chevron-Dtxc2piW.js +266 -0
- package/dist/Chevron-Dtxc2piW.js.map +1 -0
- package/dist/ConfigurePageSidebar.js +1 -1
- package/dist/FinderModal.js +67 -44
- package/dist/FinderModal.js.map +1 -1
- package/dist/Sidebar.js +1 -1
- package/dist/cjs/{Chevron-CR2oO31Z.js → Chevron-DzdbGPJI.js} +21 -23
- package/dist/cjs/Chevron-DzdbGPJI.js.map +1 -0
- package/dist/cjs/ConfigurePageSidebar.js +1 -1
- package/dist/cjs/FinderModal.js +67 -44
- package/dist/cjs/FinderModal.js.map +1 -1
- package/dist/cjs/Sidebar.js +1 -1
- package/package.json +2 -2
- package/dist/Chevron-DUn6spE9.js +0 -268
- package/dist/Chevron-DUn6spE9.js.map +0 -1
- package/dist/cjs/Chevron-CR2oO31Z.js.map +0 -1
package/dist/FinderModal.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FinderModal.js","sources":["../src/components/FinderModal/Link.jsx","../src/components/FinderModal/utils.jsx","../src/components/FinderModal/Body.jsx","../src/components/FinderModal/Footer.jsx","../src/components/FinderModal/Header.jsx","../src/components/FinderModal/index.jsx"],"sourcesContent":["import { Link as RRDLink } from \"react-router-dom\";\n\nconst Link = ({ to, children, ...rest }) => {\n const url = new URL(to);\n url.host = \"\";\n\n return (\n <RRDLink {...rest} to={`${url.pathname}${url.search}`}>\n {children}\n </RRDLink>\n );\n};\n\nexport default Link;\n","import React from \"react\";\n\nexport const minMax = (number, max = Number.POSITIVE_INFINITY, min = 0) =>\n Math.min(max, Math.max(min, number));\n\nexport const htmlToText = html => {\n if (!html) return null;\n\n const tmp = document.createElement(\"div\");\n tmp.innerHTML = html;\n\n return tmp.textContent || tmp.innerText || \"\";\n};\n\nexport const highlightMatch = (text, searchTerm) => {\n if (!searchTerm) return text;\n\n const regex = new RegExp(`(${searchTerm})`, \"gi\");\n\n return text.split(regex).map((part, index) =>\n part?.toLowerCase() === searchTerm.toLowerCase() ? (\n <span className=\"neeto-molecules-finder-matched-tag\" key={index}>\n {part}\n </span>\n ) : (\n part\n )\n );\n};\n\nexport const filterAndHighlightContent = (bodyContent, searchTerm) => {\n if (!searchTerm) return bodyContent;\n\n if (!bodyContent) return null;\n\n return bodyContent\n .split(/(.{1,130}(?:\\s|$))/g)\n .filter(line => line.trim())\n .filter(line => line.toLowerCase().includes(searchTerm.toLowerCase()))\n .map((line, index) => (\n <React.Fragment key={index}>\n {highlightMatch(line, searchTerm)}\n <br />\n </React.Fragment>\n ));\n};\n","import classNames from \"classnames\";\nimport { humanize, isNotPresent } from \"neetocist\";\nimport { Modal, Typography, NoData } from \"neetoui\";\nimport { useTranslation } from \"react-i18next\";\n\nimport Link from \"./Link\";\nimport { htmlToText, highlightMatch, filterAndHighlightContent } from \"./utils\";\n\nconst ModalBody = ({\n containerRef,\n data,\n iconComponentMap,\n onClose,\n loading,\n searchTerm,\n}) => {\n const { t } = useTranslation();\n\n const isDataEmpty =\n isNotPresent(data) || Object.values(data).every(isNotPresent);\n\n if (isDataEmpty && !loading) {\n return (\n <Modal.Body className=\"neeto-molecules-finder-modal__body flex h-96 items-center justify-center overflow-y-auto px-4 py-6\">\n <NoData\n description={t(\"neetoMolecules.finderModal.noDataDesc\")}\n title={t(\"neetoMolecules.finderModal.noDataTitle\")}\n />\n </Modal.Body>\n );\n }\n\n return (\n <Modal.Body className=\"neeto-molecules-finder-modal__body h-96 overflow-y-auto px-4 py-6\">\n <div className=\"flex flex-col gap-y-4\" ref={containerRef}>\n {Object.keys(data).map(key => {\n if (isNotPresent(data[key])) return null;\n\n return (\n <div className=\"w-full\" key={key}>\n <Typography className=\"mb-2\" style=\"h6\" textTransform=\"uppercase\">\n {humanize(key)}\n </Typography>\n <div className=\"w-full\">\n {data[key].map(item => {\n const Icon =\n iconComponentMap[key] || iconComponentMap.default;\n\n const nameContent = htmlToText(item.name);\n const bodyContent = htmlToText(item.body);\n\n const filteredBodyContent = filterAndHighlightContent(\n bodyContent,\n searchTerm\n );\n\n return (\n <Link\n className=\"neeto-molecules-search-result-item hover:neeto-ui-bg-accent-100 focus:neeto-ui-bg-accent-100 neeto-ui-rounded flex w-full cursor-pointer items-center gap-2 p-2 text-xs\"\n key={item.id}\n to={item.url}\n onClick={onClose}\n >\n <Icon\n className=\"neeto-ui-text-gray-500 min-w-fit\"\n size={16}\n />\n <div className=\"line-clamp-1 flex flex-col\">\n {nameContent && (\n <Typography className=\"neeto-ui-text-black text-sm font-medium\">\n {highlightMatch(nameContent, searchTerm)}\n </Typography>\n )}\n {bodyContent && (\n <Typography\n className={classNames(\"truncate\", {\n \"neeto-ui-text-gray-600 text-xs\": nameContent,\n \"neeto-ui-text-black text-sm font-medium\":\n !nameContent,\n })}\n >\n {filteredBodyContent || bodyContent}\n </Typography>\n )}\n </div>\n </Link>\n );\n })}\n </div>\n </div>\n );\n })}\n </div>\n </Modal.Body>\n );\n};\n\nexport default ModalBody;\n","import { Down, Up } from \"neetoicons\";\nimport { Modal, Typography } from \"neetoui\";\nimport { prop } from \"ramda\";\nimport { useTranslation } from \"react-i18next\";\n\nconst ModalFooter = ({ enableAdvancedSearch }) => {\n const { t } = useTranslation();\n\n const shortcuts = [\n {\n label: t(\"neetoMolecules.finderModal.advancedSearch\"),\n keys: [\"Cmd/Ctrl\", \"Return\"],\n isVisible: enableAdvancedSearch,\n },\n {\n label: t(\"neetoMolecules.common.actions.open\"),\n keys: [\"Return\"],\n isVisible: true,\n },\n {\n label: t(\"neetoMolecules.common.actions.move\"),\n keys: [\n <Up className=\"neeto-ui-text-gray-800\" key=\"up\" size={12} />,\n <Down className=\"neeto-ui-text-gray-800\" key=\"down\" size={12} />,\n ],\n isVisible: true,\n },\n {\n label: t(\"neetoMolecules.common.actions.close\"),\n keys: [\"Esc\"],\n isVisible: true,\n },\n ];\n\n return (\n <Modal.Footer className=\"neeto-ui-border-gray-300 neeto-molecules-finder-modal__footer border-t px-4 py-3\">\n <div className=\"neeto-ui-text-xxs flex items-center justify-end gap-4\">\n {shortcuts.filter(prop(\"isVisible\")).map(({ label, keys }, index) => (\n <div className=\"flex items-center gap-1\" key={index}>\n <Typography component=\"span\" style=\"nano\">\n {label}\n </Typography>\n {keys.map((key, index) => (\n <Typography\n className=\"neeto-ui-bg-gray-200 neeto-ui-rounded-sm p-1\"\n component=\"span\"\n key={index}\n style=\"nano\"\n >\n {key}\n </Typography>\n ))}\n </div>\n ))}\n </div>\n </Modal.Footer>\n );\n};\n\nexport default ModalFooter;\n","import { withT } from \"neetocommons/react-utils\";\nimport { Button, Modal, Spinner } from \"neetoui\";\n\nimport Search from \"components/Search\";\n\nconst ModalHeader = withT(\n ({ t, enableAdvancedSearch, loading, onSearch, onGoToAdvanced }) => (\n <Modal.Header className=\"neeto-molecules-finder-modal__header neeto-ui-border-gray-200 border-b px-0 py-0\">\n <Search\n {...{ onSearch }}\n nakedInput\n autoComplete=\"off\"\n className=\"neeto-molecules-finder-modal__search px-3 py-1.5\"\n name=\"term\"\n placeholder={t(\"neetoMolecules.common.actions.search\")}\n suffix={\n <div className=\"ms-3 flex items-center\">\n <div className=\"h-4 w-4 flex-shrink-0\">\n {loading && <Spinner size=\"small\" />}\n </div>\n {enableAdvancedSearch && (\n <Button\n className=\"ms-3 whitespace-nowrap\"\n label={t(\"neetoMolecules.finderModal.advancedSearch\")}\n size=\"small\"\n style=\"secondary\"\n onClick={onGoToAdvanced}\n />\n )}\n </div>\n }\n />\n </Modal.Header>\n )\n);\n\nexport default ModalHeader;\n","import { useRef } from \"react\";\n\nimport { noop } from \"neetocist\";\nimport useHotkeys from \"neetohotkeys\";\nimport { Modal } from \"neetoui\";\nimport PropTypes from \"prop-types\";\nimport { isEmpty } from \"ramda\";\n\nimport ModalBody from \"./Body\";\nimport \"./finder-modal.scss\";\nimport ModalFooter from \"./Footer\";\nimport ModalHeader from \"./Header\";\nimport { minMax } from \"./utils\";\n\nconst FinderModal = ({\n enableAdvancedSearch = true,\n data,\n iconComponentMap,\n isFetching,\n isOpen,\n searchTerm,\n setSearchTerm,\n onClose,\n onGoToAdvanced = noop,\n ...props\n}) => {\n const containerRef = useRef();\n const mutables = useRef({ focusIndex: -1 }).current;\n\n const onFocusChange = offset => {\n const container = containerRef.current;\n if (!container) return;\n\n const nodes = container.querySelectorAll(\n \"a.neeto-molecules-search-result-item\"\n );\n\n if (isEmpty(nodes)) return;\n\n mutables.focusIndex = minMax(\n mutables.focusIndex + offset,\n nodes.length - 1\n );\n\n const targetNode = nodes[mutables.focusIndex];\n if (targetNode) {\n targetNode.focus();\n }\n };\n\n useHotkeys(\n [\"up\", \"down\"],\n event => {\n event.preventDefault();\n if (event.code === \"ArrowUp\") onFocusChange(-1);\n else if (event.code === \"ArrowDown\") onFocusChange(1);\n },\n { mode: \"global\", enabled: isOpen }\n );\n\n useHotkeys([\"ctrl+enter\", \"command+enter\"], onGoToAdvanced, {\n mode: \"global\",\n enabled: isOpen && enableAdvancedSearch,\n });\n\n return (\n <Modal\n {...{ isOpen, onClose }}\n closeButton={false}\n {...props}\n backdropClassName=\"neeto-molecules-finder-modal-backdrop py-10 px-4\"\n className=\"neeto-molecules-finder-modal\"\n >\n <ModalHeader\n {...{ enableAdvancedSearch, onGoToAdvanced }}\n loading={isFetching}\n onSearch={setSearchTerm}\n />\n <ModalBody\n {...{ containerRef, data, iconComponentMap, onClose, searchTerm }}\n loading={isFetching}\n />\n <ModalFooter {...{ enableAdvancedSearch }} />\n </Modal>\n );\n};\n\nFinderModal.propTypes = {\n /*\n Boolean to indicate decide whether to show advanced search button or not\n */\n enableAdvancedSearch: PropTypes.bool,\n /*\n Data to be displayed in the modal\n */\n data: PropTypes.objectOf(\n PropTypes.arrayOf(\n PropTypes.shape({\n id: PropTypes.string,\n url: PropTypes.string,\n body: PropTypes.string,\n name: PropTypes.string,\n })\n )\n ),\n /*\n Icon component map to render icons for each section\n */\n iconComponentMap: PropTypes.objectOf(PropTypes.elementType),\n /*\n Boolean to indicate whether data is being fetched or not\n */\n isFetching: PropTypes.bool,\n /*\n Boolean to indicate whether modal is open or not\n */\n isOpen: PropTypes.bool,\n /*\n Term used for search\n */\n searchTerm: PropTypes.string,\n /*\n Function to set search term\n */\n setSearchTerm: PropTypes.func,\n /*\n Function to close the modal\n */\n onClose: PropTypes.func,\n /*\n Function to execute when user clicks on advanced search button\n */\n onGoToAdvanced: PropTypes.func,\n};\n\nexport default FinderModal;\n"],"names":["Link","_ref","to","children","rest","_objectWithoutProperties","_excluded","url","URL","host","_jsx","RRDLink","_objectSpread","concat","pathname","search","minMax","number","max","arguments","length","undefined","Number","POSITIVE_INFINITY","min","Math","htmlToText","html","tmp","document","createElement","innerHTML","textContent","innerText","highlightMatch","text","searchTerm","regex","RegExp","split","map","part","index","toLowerCase","className","filterAndHighlightContent","bodyContent","filter","line","trim","includes","_jsxs","React","Fragment","ModalBody","containerRef","data","iconComponentMap","onClose","loading","_useTranslation","useTranslation","t","isDataEmpty","isNotPresent","Object","values","every","Modal","Body","NoData","description","title","ref","keys","key","Typography","style","textTransform","humanize","item","Icon","nameContent","name","body","filteredBodyContent","onClick","size","classNames","id","ModalFooter","enableAdvancedSearch","shortcuts","label","isVisible","Up","Down","Footer","prop","_ref2","component","ModalHeader","withT","onSearch","onGoToAdvanced","Header","Search","nakedInput","autoComplete","placeholder","suffix","Spinner","Button","FinderModal","_ref$enableAdvancedSe","isFetching","isOpen","setSearchTerm","_ref$onGoToAdvanced","noop","props","useRef","mutables","focusIndex","current","onFocusChange","offset","container","nodes","querySelectorAll","isEmpty","targetNode","focus","useHotkeys","event","preventDefault","code","mode","enabled","closeButton","backdropClassName"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,IAAMA,IAAI,GAAG,SAAPA,IAAIA,CAAAC,IAAA,EAAkC;AAAA,EAAA,IAA5BC,EAAE,GAAAD,IAAA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AM;AAAE1D,IAAAA,OAAO,EAAPA,OAAO;AACrBiF,IAAAA,WAAW,EAAE;AAAM,GAAA,EACfnB,KAAK,CAAA,EAAA,EAAA,EAAA;AACToB,IAAAA,iBAAiB,EAAC,kDAAkD;AACpEhG,IAAAA,SAAS,EAAC,8BAA8B;IAAAzC,QAAA,EAAA,cAExCO,GAAA,CAAC2F,WAAW,EAAA;AACJV,MAAAA,oBAAoB,EAApBA,oBAAoB;AAAEa,MAAAA,cAAc,EAAdA,cAAc;AAC1C7C,MAAAA,OAAO,EAAEwD,UAAW;AACpBZ,MAAAA,QAAQ,EAAEc;AAAc,KACzB,CAAC,eACF3G,GAAA,CAAC4C,SAAS,EAAA;AACFC,MAAAA,YAAY,EAAZA,YAAY;AAAEC,MAAAA,IAAI,EAAJA,IAAI;AAAEC,MAAAA,gBAAgB,EAAhBA,gBAAgB;AAAEC,MAAAA,OAAO,EAAPA,OAAO;AAAEtB,MAAAA,UAAU,EAAVA,UAAU;AAC/DuB,MAAAA,OAAO,EAAEwD;AAAW,KACrB,CAAC,eACFzG,GAAA,CAACgF,WAAW,EAAA;AAAOC,MAAAA,oBAAoB,EAApBA;AAAoB,KAAK,CAAC;AAAA,GAAA,CACxC,CAAC;AAEZ;;;;"}
|
|
1
|
+
{"version":3,"file":"FinderModal.js","sources":["../src/components/FinderModal/Link.jsx","../src/components/FinderModal/utils.jsx","../src/components/FinderModal/Body.jsx","../src/components/FinderModal/Footer.jsx","../src/components/FinderModal/Header.jsx","../src/components/FinderModal/index.jsx"],"sourcesContent":["import { Link as RRDLink } from \"react-router-dom\";\n\nconst Link = ({ to, children, ...rest }) => {\n const url = new URL(to);\n url.host = \"\";\n\n return (\n <RRDLink {...rest} to={`${url.pathname}${url.search}`}>\n {children}\n </RRDLink>\n );\n};\n\nexport default Link;\n","import React from \"react\";\n\nexport const minMax = (number, max = Number.POSITIVE_INFINITY, min = 0) =>\n Math.min(max, Math.max(min, number));\n\nexport const htmlToText = html => {\n if (!html) return null;\n\n const tmp = document.createElement(\"div\");\n tmp.innerHTML = html;\n\n return tmp.textContent || tmp.innerText || \"\";\n};\n\nexport const highlightMatch = (text, searchTerm) => {\n if (!searchTerm) return text;\n\n const regex = new RegExp(`(${searchTerm})`, \"gi\");\n\n return text.split(regex).map((part, index) =>\n part?.toLowerCase() === searchTerm.toLowerCase() ? (\n <span className=\"neeto-molecules-finder-matched-tag\" key={index}>\n {part}\n </span>\n ) : (\n part\n )\n );\n};\n\nexport const filterAndHighlightContent = (bodyContent, searchTerm) => {\n if (!searchTerm) return bodyContent;\n\n if (!bodyContent) return null;\n\n return bodyContent\n .split(/(.{1,130}(?:\\s|$))/g)\n .filter(line => line.trim())\n .filter(line => line.toLowerCase().includes(searchTerm.toLowerCase()))\n .map((line, index) => (\n <React.Fragment key={index}>\n {highlightMatch(line, searchTerm)}\n <br />\n </React.Fragment>\n ));\n};\n\nexport const flattenData = data => {\n if (!data) return [];\n\n if (Array.isArray(data)) return data;\n\n const result = [];\n Object.keys(data).forEach(key => {\n data[key].forEach(item => {\n result.push({ ...item, category: key });\n });\n });\n\n return result;\n};\n\nexport const createStylePalette = values => {\n const assignedStyles = {};\n let styleIndex = 0;\n\n return key => {\n if (assignedStyles[key]) return assignedStyles[key];\n const style = values[styleIndex];\n styleIndex = (styleIndex + 1) % values.length;\n assignedStyles[key] = style;\n\n return style;\n };\n};\n","import classNames from \"classnames\";\nimport { humanize, isNotPresent } from \"neetocist\";\nimport { Modal, Typography, NoData, Tag } from \"neetoui\";\nimport { useTranslation } from \"react-i18next\";\n\nimport Link from \"./Link\";\nimport {\n htmlToText,\n highlightMatch,\n filterAndHighlightContent,\n flattenData,\n createStylePalette,\n} from \"./utils\";\n\nconst getStyle = createStylePalette([\n \"primary\",\n \"info\",\n \"success\",\n \"secondary\",\n \"warning\",\n]);\n\nconst ModalBody = ({\n containerRef,\n data,\n iconComponentMap,\n onClose,\n loading,\n searchTerm,\n}) => {\n const { t } = useTranslation();\n\n const flattenedData = flattenData(data);\n const isDataEmpty = isNotPresent(flattenedData);\n\n if (isDataEmpty && !loading) {\n return (\n <Modal.Body className=\"neeto-molecules-finder-modal__body flex h-96 items-center justify-center overflow-y-auto px-4 py-6\">\n <NoData\n description={t(\"neetoMolecules.finderModal.noDataDesc\")}\n title={t(\"neetoMolecules.finderModal.noDataTitle\")}\n />\n </Modal.Body>\n );\n }\n\n return (\n <Modal.Body className=\"neeto-molecules-finder-modal__body h-96 overflow-y-auto px-4 py-6\">\n <div className=\"flex flex-col gap-y-2\" ref={containerRef}>\n {flattenedData.map(item => {\n if (isNotPresent(item.category)) return null;\n\n const Icon =\n iconComponentMap[item.category] || iconComponentMap.default;\n\n const nameContent = htmlToText(item.name);\n const bodyContent = htmlToText(item.body);\n\n const filteredBodyContent = filterAndHighlightContent(\n bodyContent,\n searchTerm\n );\n\n return (\n <Link\n className=\"neeto-molecules-search-result-item hover:neeto-ui-bg-accent-100 focus:neeto-ui-bg-accent-100 neeto-ui-rounded flex w-full cursor-pointer items-center gap-2 p-2 text-xs\"\n key={item.id}\n to={item.url}\n onClick={onClose}\n >\n <Icon className=\"neeto-ui-text-gray-500 min-w-fit\" size={16} />\n <div className=\"line-clamp-1 flex flex-col\">\n <div className=\"flex items-center gap-2\">\n {nameContent && (\n <Typography className=\"neeto-ui-text-black text-sm font-medium\">\n {highlightMatch(nameContent, searchTerm)}\n </Typography>\n )}\n <Tag size=\"small\" style={getStyle(item.category)}>\n {humanize(item.category)}\n </Tag>\n </div>\n {bodyContent && (\n <Typography\n className={classNames(\"truncate\", {\n \"neeto-ui-text-gray-600 text-xs\": nameContent,\n \"neeto-ui-text-black text-sm font-medium\": !nameContent,\n })}\n >\n {filteredBodyContent || bodyContent}\n </Typography>\n )}\n </div>\n </Link>\n );\n })}\n </div>\n </Modal.Body>\n );\n};\n\nexport default ModalBody;\n","import { Down, Up } from \"neetoicons\";\nimport { Modal, Typography } from \"neetoui\";\nimport { prop } from \"ramda\";\nimport { useTranslation } from \"react-i18next\";\n\nconst ModalFooter = ({ enableAdvancedSearch }) => {\n const { t } = useTranslation();\n\n const shortcuts = [\n {\n label: t(\"neetoMolecules.finderModal.advancedSearch\"),\n keys: [\"Cmd/Ctrl\", \"Return\"],\n isVisible: enableAdvancedSearch,\n },\n {\n label: t(\"neetoMolecules.common.actions.open\"),\n keys: [\"Return\"],\n isVisible: true,\n },\n {\n label: t(\"neetoMolecules.common.actions.move\"),\n keys: [\n <Up className=\"neeto-ui-text-gray-800\" key=\"up\" size={12} />,\n <Down className=\"neeto-ui-text-gray-800\" key=\"down\" size={12} />,\n ],\n isVisible: true,\n },\n {\n label: t(\"neetoMolecules.common.actions.close\"),\n keys: [\"Esc\"],\n isVisible: true,\n },\n ];\n\n return (\n <Modal.Footer className=\"neeto-ui-border-gray-300 neeto-molecules-finder-modal__footer border-t px-4 py-3\">\n <div className=\"neeto-ui-text-xxs flex items-center justify-end gap-4\">\n {shortcuts.filter(prop(\"isVisible\")).map(({ label, keys }, index) => (\n <div className=\"flex items-center gap-1\" key={index}>\n <Typography component=\"span\" style=\"nano\">\n {label}\n </Typography>\n {keys.map((key, index) => (\n <Typography\n className=\"neeto-ui-bg-gray-200 neeto-ui-rounded-sm p-1\"\n component=\"span\"\n key={index}\n style=\"nano\"\n >\n {key}\n </Typography>\n ))}\n </div>\n ))}\n </div>\n </Modal.Footer>\n );\n};\n\nexport default ModalFooter;\n","import { withT } from \"neetocommons/react-utils\";\nimport { Button, Modal, Spinner } from \"neetoui\";\n\nimport Search from \"components/Search\";\n\nconst ModalHeader = withT(\n ({ t, enableAdvancedSearch, loading, onSearch, onGoToAdvanced }) => (\n <Modal.Header className=\"neeto-molecules-finder-modal__header neeto-ui-border-gray-200 border-b px-0 py-0\">\n <Search\n {...{ onSearch }}\n nakedInput\n autoComplete=\"off\"\n className=\"neeto-molecules-finder-modal__search px-3 py-1.5\"\n name=\"term\"\n placeholder={t(\"neetoMolecules.common.actions.search\")}\n suffix={\n <div className=\"ms-3 flex items-center\">\n <div className=\"h-4 w-4 flex-shrink-0\">\n {loading && <Spinner size=\"small\" />}\n </div>\n {enableAdvancedSearch && (\n <Button\n className=\"ms-3 whitespace-nowrap\"\n label={t(\"neetoMolecules.finderModal.advancedSearch\")}\n size=\"small\"\n style=\"secondary\"\n onClick={onGoToAdvanced}\n />\n )}\n </div>\n }\n />\n </Modal.Header>\n )\n);\n\nexport default ModalHeader;\n","import { useRef } from \"react\";\n\nimport { noop } from \"neetocist\";\nimport useHotkeys from \"neetohotkeys\";\nimport { Modal } from \"neetoui\";\nimport PropTypes from \"prop-types\";\nimport { isEmpty } from \"ramda\";\n\nimport ModalBody from \"./Body\";\nimport \"./finder-modal.scss\";\nimport ModalFooter from \"./Footer\";\nimport ModalHeader from \"./Header\";\nimport { minMax } from \"./utils\";\n\nconst FinderModal = ({\n enableAdvancedSearch = true,\n data,\n iconComponentMap,\n isFetching,\n isOpen,\n searchTerm,\n setSearchTerm,\n onClose,\n onGoToAdvanced = noop,\n ...props\n}) => {\n const containerRef = useRef();\n const mutables = useRef({ focusIndex: -1 }).current;\n\n const onFocusChange = offset => {\n const container = containerRef.current;\n if (!container) return;\n\n const nodes = container.querySelectorAll(\n \"a.neeto-molecules-search-result-item\"\n );\n\n if (isEmpty(nodes)) return;\n\n mutables.focusIndex = minMax(\n mutables.focusIndex + offset,\n nodes.length - 1\n );\n\n const targetNode = nodes[mutables.focusIndex];\n if (targetNode) {\n targetNode.focus();\n }\n };\n\n useHotkeys(\n [\"up\", \"down\"],\n event => {\n event.preventDefault();\n if (event.code === \"ArrowUp\") onFocusChange(-1);\n else if (event.code === \"ArrowDown\") onFocusChange(1);\n },\n { mode: \"global\", enabled: isOpen }\n );\n\n useHotkeys([\"ctrl+enter\", \"command+enter\"], onGoToAdvanced, {\n mode: \"global\",\n enabled: isOpen && enableAdvancedSearch,\n });\n\n return (\n <Modal\n {...{ isOpen, onClose }}\n closeButton={false}\n {...props}\n backdropClassName=\"neeto-molecules-finder-modal-backdrop py-10 px-4\"\n className=\"neeto-molecules-finder-modal\"\n >\n <ModalHeader\n {...{ enableAdvancedSearch, onGoToAdvanced }}\n loading={isFetching}\n onSearch={setSearchTerm}\n />\n <ModalBody\n {...{ containerRef, data, iconComponentMap, onClose, searchTerm }}\n loading={isFetching}\n />\n <ModalFooter {...{ enableAdvancedSearch }} />\n </Modal>\n );\n};\n\nFinderModal.propTypes = {\n /*\n Boolean to indicate decide whether to show advanced search button or not\n */\n enableAdvancedSearch: PropTypes.bool,\n /*\n Data to be displayed in the modal. Can be an array of items with category property,\n or an object with category keys containing arrays of items.\n */\n data: PropTypes.oneOfType([\n PropTypes.arrayOf(\n PropTypes.shape({\n id: PropTypes.string,\n url: PropTypes.string,\n body: PropTypes.string,\n name: PropTypes.string,\n category: PropTypes.string,\n })\n ),\n PropTypes.objectOf(\n PropTypes.arrayOf(\n PropTypes.shape({\n id: PropTypes.string,\n url: PropTypes.string,\n body: PropTypes.string,\n name: PropTypes.string,\n })\n )\n ),\n ]),\n /*\n Icon component map to render icons for each section\n */\n iconComponentMap: PropTypes.objectOf(PropTypes.elementType),\n /*\n Boolean to indicate whether data is being fetched or not\n */\n isFetching: PropTypes.bool,\n /*\n Boolean to indicate whether modal is open or not\n */\n isOpen: PropTypes.bool,\n /*\n Term used for search\n */\n searchTerm: PropTypes.string,\n /*\n Function to set search term\n */\n setSearchTerm: PropTypes.func,\n /*\n Function to close the modal\n */\n onClose: PropTypes.func,\n /*\n Function to execute when user clicks on advanced search button\n */\n onGoToAdvanced: PropTypes.func,\n};\n\nexport default FinderModal;\n"],"names":["Link","_ref","to","children","rest","_objectWithoutProperties","_excluded","url","URL","host","_jsx","RRDLink","_objectSpread","concat","pathname","search","minMax","number","max","arguments","length","undefined","Number","POSITIVE_INFINITY","min","Math","htmlToText","html","tmp","document","createElement","innerHTML","textContent","innerText","highlightMatch","text","searchTerm","regex","RegExp","split","map","part","index","toLowerCase","className","filterAndHighlightContent","bodyContent","filter","line","trim","includes","_jsxs","React","Fragment","flattenData","data","Array","isArray","result","Object","keys","forEach","key","item","push","category","createStylePalette","values","assignedStyles","styleIndex","style","getStyle","ModalBody","containerRef","iconComponentMap","onClose","loading","_useTranslation","useTranslation","t","flattenedData","isDataEmpty","isNotPresent","Modal","Body","NoData","description","title","ref","Icon","nameContent","name","body","filteredBodyContent","onClick","size","Typography","Tag","humanize","classNames","id","ModalFooter","enableAdvancedSearch","shortcuts","label","isVisible","Up","Down","Footer","prop","_ref2","component","ModalHeader","withT","onSearch","onGoToAdvanced","Header","Search","nakedInput","autoComplete","placeholder","suffix","Spinner","Button","FinderModal","_ref$enableAdvancedSe","isFetching","isOpen","setSearchTerm","_ref$onGoToAdvanced","noop","props","useRef","mutables","focusIndex","current","onFocusChange","offset","container","nodes","querySelectorAll","isEmpty","targetNode","focus","useHotkeys","event","preventDefault","code","mode","enabled","closeButton","backdropClassName"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,IAAMA,IAAI,GAAG,SAAPA,IAAIA,CAAAC,IAAA,EAAkC;AAAA,EAAA,IAA5BC,EAAE,GAAAD,IAAA,CAAFC,EAAE;IAAEC,QAAQ,GAAAF,IAAA,CAARE,QAAQ;AAAKC,IAAAA,IAAI,GAAAC,wBAAA,CAAAJ,IAAA,EAAAK,WAAA,CAAA;AACnC,EAAA,IAAMC,GAAG,GAAG,IAAIC,GAAG,CAACN,EAAE,CAAC;EACvBK,GAAG,CAACE,IAAI,GAAG,EAAE;EAEb,oBACEC,GAAA,CAACC,MAAO,EAAAC,eAAA,CAAAA,eAAA,KAAKR,IAAI,CAAA,EAAA,EAAA,EAAA;AAAEF,IAAAA,EAAE,EAAA,EAAA,CAAAW,MAAA,CAAKN,GAAG,CAACO,QAAQ,CAAA,CAAAD,MAAA,CAAGN,GAAG,CAACQ,MAAM,CAAG;AAAAZ,IAAAA,QAAA,EACnDA;AAAQ,GAAA,CACF,CAAC;AAEd,CAAC;;;;ACTM,IAAMa,MAAM,GAAG,SAATA,MAAMA,CAAIC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import Typography from '@bigbinary/neetoui/Typography';
|
|
|
9
9
|
import { is, append, not, findLast } from 'ramda';
|
|
10
10
|
import { useTranslation } from 'react-i18next';
|
|
11
11
|
import { Link, useLocation, useHistory } from 'react-router-dom';
|
|
12
|
-
import { a as SPECIAL_APP_NAMES, D as DEFAULT_HOME_PATH, f as filterByPermissions, b as CheckPointNavLinks, P as PINNED_MORE_NAV_LINKS_KEY, _ as _Items, c as SELECTED_NAV_LINK_ROUTE_STORAGE_KEY, g as getSidebarStateLocalStorageKey, d as SIDEBAR_WIDTH_KEY, e as DEFAULT_SIDEBAR_WIDTH, S as SelectedLink, C as Chevron, h as enableDraggingStyles, i as disableDraggingStyles, j as getActiveConfigurePageLink, M as MIN_SIDEBAR_WIDTH, k as MAX_SIDEBAR_WIDTH } from './Chevron-
|
|
12
|
+
import { a as SPECIAL_APP_NAMES, D as DEFAULT_HOME_PATH, f as filterByPermissions, b as CheckPointNavLinks, P as PINNED_MORE_NAV_LINKS_KEY, _ as _Items, c as SELECTED_NAV_LINK_ROUTE_STORAGE_KEY, g as getSidebarStateLocalStorageKey, d as SIDEBAR_WIDTH_KEY, e as DEFAULT_SIDEBAR_WIDTH, S as SelectedLink, C as Chevron, h as enableDraggingStyles, i as disableDraggingStyles, j as getActiveConfigurePageLink, M as MIN_SIDEBAR_WIDTH, k as MAX_SIDEBAR_WIDTH } from './Chevron-Dtxc2piW.js';
|
|
13
13
|
import { globalProps as globalProps$1 } from '@bigbinary/neeto-commons-frontend/initializers';
|
|
14
14
|
import Neeto from '@bigbinary/neeto-icons/typeface-logos/Neeto';
|
|
15
15
|
import * as AppIcons from '@bigbinary/neeto-icons/typeface-logos';
|
|
@@ -110,7 +110,6 @@ var SubLink = function SubLink(_ref) {
|
|
|
110
110
|
count = _ref.count,
|
|
111
111
|
isSectionHeader = _ref.isSectionHeader,
|
|
112
112
|
isCountsLoading = _ref.isCountsLoading,
|
|
113
|
-
isSettingsItems = _ref.isSettingsItems,
|
|
114
113
|
dataCy = _ref["data-cy"],
|
|
115
114
|
_ref$entity = _ref.entity,
|
|
116
115
|
entity = _ref$entity === void 0 ? "" : _ref$entity,
|
|
@@ -138,11 +137,9 @@ var SubLink = function SubLink(_ref) {
|
|
|
138
137
|
onClick: onClick,
|
|
139
138
|
to: to,
|
|
140
139
|
activeClassName: "active",
|
|
140
|
+
className: "neeto-molecules-sidebar__sublink neeto-ui-flex neeto-ui-items-center neeto-ui-select-none",
|
|
141
141
|
"data-cy": "".concat(dataCyPrefix, "-sub-link"),
|
|
142
142
|
isActive: isSubLinkActive,
|
|
143
|
-
className: classnames("neeto-molecules-sidebar__sublink neeto-ui-flex neeto-ui-items-center neeto-ui-select-none", {
|
|
144
|
-
"neeto-molecules-sidebar__sublink--settings-items": isSettingsItems
|
|
145
|
-
}),
|
|
146
143
|
children: [/*#__PURE__*/jsxRuntime.jsx(Typography, {
|
|
147
144
|
className: "neeto-molecules-sidebar__link-sub-label neeto-ui-flex-grow",
|
|
148
145
|
component: "span",
|
|
@@ -169,25 +166,26 @@ var _Items = function Items(_ref) {
|
|
|
169
166
|
isSettingsItems = _ref$isSettingsItems === void 0 ? false : _ref$isSettingsItems,
|
|
170
167
|
isCountsLoading = _ref.isCountsLoading;
|
|
171
168
|
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
169
|
+
className: "neeto-molecules-sidebar__sublink-wrapper",
|
|
172
170
|
"data-cy": "sidebar-sub-link-wrapper",
|
|
173
|
-
className: classnames("neeto-molecules-sidebar__sublink-wrapper", {
|
|
174
|
-
"neeto-molecules-sidebar__sublink-wrapper--settings-items": isSettingsItems
|
|
175
|
-
}),
|
|
176
171
|
children: items.filter(filterByPermissions).map(function (subItem, subIndex) {
|
|
177
172
|
var _subItem$to;
|
|
178
173
|
return /*#__PURE__*/jsxRuntime.jsxs(React.Fragment, {
|
|
179
174
|
children: [/*#__PURE__*/jsxRuntime.jsx(SubLink, _objectSpread$1(_objectSpread$1({}, _objectSpread$1(_objectSpread$1({}, subItem), {}, {
|
|
180
|
-
isCountsLoading: isCountsLoading
|
|
181
|
-
isSettingsItems: isSettingsItems
|
|
175
|
+
isCountsLoading: isCountsLoading
|
|
182
176
|
})), {}, {
|
|
183
177
|
href: subItem.href,
|
|
184
178
|
isActive: subItem.isActive,
|
|
185
179
|
isSectionHeader: neetoCist.isPresent(subItem.item),
|
|
186
180
|
to: (_subItem$to = subItem.to) !== null && _subItem$to !== void 0 ? _subItem$to : subItem.path,
|
|
187
181
|
onClick: subItem.onClick
|
|
188
|
-
})), isSettingsItems && neetoCist.isPresent(subItem.items) && /*#__PURE__*/jsxRuntime.
|
|
189
|
-
|
|
190
|
-
|
|
182
|
+
})), isSettingsItems && neetoCist.isPresent(subItem.items) && /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
183
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(_Items, {
|
|
184
|
+
isSettingsItems: isSettingsItems,
|
|
185
|
+
items: subItem.items
|
|
186
|
+
}), items.length - 1 !== subIndex && /*#__PURE__*/jsxRuntime.jsx("hr", {
|
|
187
|
+
className: "neeto-molecules-sidebar__separator neeto-ui-border-gray-200"
|
|
188
|
+
})]
|
|
191
189
|
})]
|
|
192
190
|
}, subIndex);
|
|
193
191
|
})
|
|
@@ -219,24 +217,24 @@ var SelectedLink = function SelectedLink(_ref) {
|
|
|
219
217
|
className: "neeto-molecules-sidebar__links neeto-molecules-sidebar__links--focus-mode neeto-molecules-sidebar__no-shrinkable",
|
|
220
218
|
"data-cy": "configure-nav-container",
|
|
221
219
|
children: [/*#__PURE__*/jsxRuntime.jsxs("div", _objectSpread(_objectSpread({
|
|
222
|
-
className: "neeto-ui-flex neeto-ui-items-center neeto-ui-no-underline neeto-molecules-sidebar__link neeto-
|
|
220
|
+
className: "neeto-ui-flex neeto-ui-items-center neeto-ui-no-underline neeto-molecules-sidebar__link neeto-ui-border-b neeto-ui-border-gray-200",
|
|
223
221
|
onClick: handleGoBack
|
|
224
222
|
}, _objectSpread({}, ramda.omit(["icon"], otherProps))), {}, {
|
|
225
|
-
children: [isConfigureNavLink && /*#__PURE__*/jsxRuntime.
|
|
226
|
-
className: "neeto-molecules-sidebar__link-icon flex items-center pl-
|
|
227
|
-
children: /*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
223
|
+
children: [isConfigureNavLink && /*#__PURE__*/jsxRuntime.jsxs("span", {
|
|
224
|
+
className: "neeto-molecules-sidebar__link-icon flex items-center pl-3",
|
|
225
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
228
226
|
"data-cy": "".concat(general.hyphenize(label), "-go-back-button"),
|
|
229
227
|
"data-testid": "".concat(label, "-go-home-button"),
|
|
230
228
|
icon: Home,
|
|
231
|
-
iconProps: {
|
|
232
|
-
size: 20
|
|
233
|
-
},
|
|
234
229
|
style: "text",
|
|
235
230
|
onClick: handleHomeButtonClick
|
|
236
|
-
})
|
|
231
|
+
}), /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
232
|
+
className: "px-1 text-xs",
|
|
233
|
+
children: "/"
|
|
234
|
+
})]
|
|
237
235
|
}), /*#__PURE__*/jsxRuntime.jsx(Typography, {
|
|
238
236
|
component: "span",
|
|
239
|
-
style: "
|
|
237
|
+
style: "body1",
|
|
240
238
|
className: classnames("neeto-molecules-sidebar__link-label", _defineProperty({
|
|
241
239
|
"neeto-molecules-sidebar__configure-page-header": isConfigureNavLink
|
|
242
240
|
}, "pl-4", isConfigureSidebar)),
|
|
@@ -249,7 +247,7 @@ var SelectedLink = function SelectedLink(_ref) {
|
|
|
249
247
|
});
|
|
250
248
|
};
|
|
251
249
|
|
|
252
|
-
var css = ":root{--neeto-molecules-sidebar-width:15rem;--neeto-molecules-sidebar-wrapper-z-index:99997;--neeto-molecules-sidebar-z-index:99998}@media screen and (min-width:1024px){:root{--neeto-molecules-sidebar-width:15rem}}.neeto-molecules-sidebar__wrapper{display:flex;max-width:15rem;max-width:var(--neeto-molecules-sidebar-width);position:relative;width:15rem;width:var(--neeto-molecules-sidebar-width)}@media screen and (max-width:768px){.neeto-molecules-sidebar__wrapper{height:100%;inset-inline-start:0;max-width:100%;position:fixed;top:0;transition:none;width:100%;z-index:99997;z-index:var(--neeto-molecules-sidebar-wrapper-z-index)}.neeto-molecules-sidebar__wrapper .neeto-molecules-sidebar{inset-inline-start:0;max-width:15rem;max-width:var(--neeto-molecules-sidebar-width);position:fixed;top:0;transition:none;width:15rem;width:var(--neeto-molecules-sidebar-width)}}.neeto-molecules-sidebar__wrapper__configure-page .neeto-molecules-sidebar__toggler{inset-inline-end:1.25rem;top:.5rem}@media screen and (max-width:768px){.neeto-molecules-sidebar__wrapper__configure-page .neeto-molecules-sidebar__toggler{inset-inline-end:auto;top:.5rem}}.neeto-molecules-sidebar__wrapper--collapsed{max-width:0;width:0}.neeto-molecules-sidebar__wrapper--collapsed .neeto-molecules-sidebar__toggler{inset-inline-end:-2.25rem;transform:scale(-1)}@media screen and (max-width:768px){.neeto-molecules-sidebar__wrapper--collapsed .neeto-molecules-sidebar__toggler{inset-inline-end:auto;inset-inline-start:.5rem;top:.5rem}.neeto-molecules-sidebar__wrapper--collapsed .neeto-molecules-sidebar{inset-inline-start:-15rem;inset-inline-start:calc(var(--neeto-molecules-sidebar-width)*-1)}.neeto-molecules-sidebar__wrapper__configure-page.neeto-molecules-sidebar__wrapper--collapsed .neeto-molecules-sidebar__toggler{top:6.8125rem}}.neeto-molecules-sidebar{background-color:#f9f8f6;height:100vh;height:100dvh;padding:1.5rem 0;width:100%;z-index:99998;z-index:var(--neeto-molecules-sidebar-z-index)}.neeto-molecules-sidebar:not(.neeto-molecules-sidebar__configure-page) .neeto-molecules-sidebar__links:not(.neeto-molecules-sidebar__links--focus-mode){display:flex;flex-direction:column;gap:.625rem;height:calc(100vh - 7.75rem)!important;height:calc(100dvh - 7.75rem)!important;overflow-y:auto;padding-block-end:4rem;padding:0 1rem}.neeto-molecules-sidebar__no-shrinkable{max-width:15rem;max-width:var(--neeto-molecules-sidebar-width);width:15rem;width:var(--neeto-molecules-sidebar-width)}.neeto-molecules-sidebar__separator{margin:.375rem auto;width:100%}.neeto-molecules-sidebar__toggler{color:rgb(var(--neeto-ui-primary-500))!important;inset-inline-end:.5rem;position:absolute!important;top:2.125rem;z-index:99998;z-index:var(--neeto-molecules-sidebar-z-index)}@media screen and (max-width:768px){.neeto-molecules-sidebar__toggler{inset-inline-end:auto;inset-inline-start:12.625rem;inset-inline-start:calc(var(--neeto-molecules-sidebar-width) - 2.375rem);transition:none}}.neeto-molecules-sidebar__configure-page{border-inline-end:1px solid rgb(var(--neeto-ui-gray-200));height:auto}@media screen and (max-width:768px){.neeto-molecules-sidebar__configure-page{height:100%}}.neeto-molecules-sidebar__configure-page .neeto-molecules-sidebar__links{height:calc(100vh - 8.5rem)!important;height:calc(100dvh - 8.5rem)!important}@media screen and (max-width:768px){.neeto-molecules-sidebar__configure-page .neeto-molecules-sidebar__links{height:calc(100vh - 5rem)!important;height:calc(100dvh - 5rem)!important}}.neeto-molecules-sidebar__configure-page .neeto-molecules-sidebar__toggler{display:none}.neeto-molecules-sidebar__header{--neeto-ui-text-body2:1rem;margin-block:.5rem 2rem;margin-inline:0;padding-block:0;padding-inline:1.5rem}.neeto-molecules-sidebar__logo svg{height:2.25rem;max-width:100%;width:auto}.neeto-molecules-sidebar__link{border-radius:.25rem;color:rgb(var(--neeto-ui-black));gap:.5rem;line-height:1.2;padding-block:.375rem;padding-inline:.5rem;position:relative;text-decoration:none!important;transition:color .3s,background-color .3s;width:100%}.neeto-molecules-sidebar__link-icon{flex-shrink:0}.neeto-molecules-sidebar__link-icon svg path{stroke-width:1.2;vector-effect:non-scaling-stroke;color:rgb(var(--neeto-ui-gray-600))}.neeto-molecules-sidebar__link-icon--caret{opacity:0;transition:opacity .3s ease-in-out}.neeto-molecules-sidebar__link-icon--rotate{opacity:1;transform:rotate(90deg)}.neeto-molecules-sidebar__link-label,.neeto-molecules-sidebar__link-sub-label{--neeto-ui-text-body2:0.9375rem;flex-grow:1;text-align:start}@media screen and (min-width:1536px){.neeto-molecules-sidebar__link-label,.neeto-molecules-sidebar__link-sub-label{--neeto-ui-text-body2:1rem}}.neeto-molecules-sidebar__link:hover{background-color:rgb(var(--neeto-ui-gray-200));color:rgb(var(--neeto-ui-black))}.neeto-molecules-sidebar__link:focus,.neeto-molecules-sidebar__link:focus-visible,.neeto-molecules-sidebar__link[aria-expanded=true]{color:rgb(var(--neeto-ui-black));outline:none}.neeto-molecules-sidebar__link--hover-active{background-color:rgb(var(--neeto-ui-gray-100))}.neeto-molecules-sidebar__link.active{background-color:rgb(var(--neeto-ui-white));box-shadow:0 0 4px 0 rgba(var(--neeto-ui-black),.15);color:rgb(var(--neeto-ui-black));font-weight:var(--neeto-ui-font-semibold)}.neeto-molecules-sidebar__link.active .neeto-molecules-sidebar__link-icon--caret,.neeto-molecules-sidebar__link:hover .neeto-molecules-sidebar__link-icon--caret,.neeto-molecules-sidebar__link[aria-expanded=true] .neeto-molecules-sidebar__link-icon--caret{opacity:1}.neeto-molecules-sidebar__link--button:focus{background-color:transparent}.neeto-molecules-sidebar__link--button:focus-visible{background-color:rgb(var(--neeto-ui-gray-200));color:rgb(var(--neeto-ui-black))}.neeto-molecules-sidebar__link--change-log{outline:none!important}.neeto-molecules-sidebar__sublink-wrapper{padding-block:.25rem;padding-inline:0}.neeto-molecules-sidebar__sublink-wrapper--settings-items{gap:.125rem!important;padding-block:.25rem;padding-inline:.75rem!important}.neeto-molecules-sidebar__sublink{color:rgb(var(--neeto-ui-gray-700));cursor:pointer;gap:.5rem;margin-block-end:0;margin-inline:0;padding-block:.5rem;padding-inline-end:.5rem;padding-inline-start:2.5rem;text-decoration:none;transition:color .3s,background-color .3s}.neeto-molecules-sidebar__sublink--settings-items{padding-block:.375rem;padding-inline-end:1.5rem;padding-inline-start:1.5rem}.neeto-molecules-sidebar__sublink--settings-items:focus,.neeto-molecules-sidebar__sublink--settings-items:focus-visible,.neeto-molecules-sidebar__sublink--settings-items:hover{background-color:var(--neeto-ui-gray-200)!important;border-radius:4px!important}.neeto-molecules-sidebar__sublink--settings-items.active{background-color:rgb(var(--neeto-ui-white))!important;border-radius:4px!important;box-shadow:0 0 4px 0 rgba(var(--neeto-ui-black),.15)!important;font-weight:var(--neeto-ui-font-semibold)!important}.neeto-molecules-sidebar__sublink .neeto-molecules-sidebar__link-sub-count{--neeto-ui-text-body2:0.9375rem;opacity:.75}@media screen and (min-width:1536px){.neeto-molecules-sidebar__sublink .neeto-molecules-sidebar__link-sub-count{--neeto-ui-text-body2:1rem}}.neeto-molecules-sidebar__sublink:hover{color:rgb(var(--neeto-ui-black));text-decoration:none}.neeto-molecules-sidebar__sublink:hover .neeto-molecules-sidebar__link-sub-count{opacity:1}.neeto-molecules-sidebar__sublink:focus,.neeto-molecules-sidebar__sublink:focus-visible{color:rgb(var(--neeto-ui-black));outline:none;text-decoration:none}.neeto-molecules-sidebar__sublink:focus .neeto-molecules-sidebar__link-sub-count,.neeto-molecules-sidebar__sublink:focus-visible .neeto-molecules-sidebar__link-sub-count{opacity:1}.neeto-molecules-sidebar__sublink.active,.neeto-molecules-sidebar__sublink:active{color:rgb(var(--neeto-ui-accent-800));font-weight:500;text-decoration:none}.neeto-molecules-sidebar__sublink.active .neeto-molecules-sidebar__link-sub-count,.neeto-molecules-sidebar__sublink:active .neeto-molecules-sidebar__link-sub-count{opacity:1}.neeto-molecules-sidebar__footer{margin-block-start:auto}.sidebar-featured-tooltip__content{border-radius:.5rem!important;box-shadow:var(--neeto-ui-shadow-sm)!important}.sidebar-featured-tooltip__content .tippy-content{padding:0}.sidebar-featured-tooltip{padding:.75rem;width:9.375rem}.sidebar-featured-tooltip__icon-wrap{background-color:rgb(var(--neeto-ui-gray-100));border-radius:.5rem;height:2.5rem;margin-block-end:.5rem;margin-inline:auto;width:2.5rem}.sidebar-featured-tooltip__title{margin-block-end:.25rem}.neeto-molecules-help-popup-wrapper,.neeto-molecules-product-switcher-popup-wrapper,.neeto-molecules-profile-popup-wrapper{border:1px solid rgb(var(--neeto-ui-gray-400));border-radius:var(--neeto-ui-rounded)!important;min-width:15rem}.neeto-molecules-help-popup-wrapper .tippy-content,.neeto-molecules-product-switcher-popup-wrapper .tippy-content,.neeto-molecules-profile-popup-wrapper .tippy-content{padding:0}.neeto-molecules-help-popup-wrapper .tippy-svg-arrow,.neeto-molecules-product-switcher-popup-wrapper .tippy-svg-arrow,.neeto-molecules-profile-popup-wrapper .tippy-svg-arrow{display:none!important}.neeto-molecules-profile-popup__top-section{border-start-end-radius:var(--neeto-ui-rounded);border-start-start-radius:var(--neeto-ui-rounded)}.neeto-molecules-profile-sublist{border-block-start:1px solid rgb(var(--neeto-ui-gray-400))}.neeto-molecules-help-sublist,.neeto-molecules-profile-sublist{list-style:none;margin:0;padding-block:.25rem;padding-inline:0}.neeto-molecules-help-sublist__item,.neeto-molecules-profile-sublist__item{width:100%}.neeto-molecules-help-sublist__item-btn,.neeto-molecules-profile-sublist__item-btn{border-radius:0;justify-content:flex-end!important;min-height:2.5rem;text-align:start}.neeto-molecules-help-sublist__item-btn.active,.neeto-molecules-profile-sublist__item-btn.active{background-color:rgb(var(--neeto-ui-gray-800));color:rgb(var(--neeto-ui-white))}.neeto-molecules-help-sublist__item-btn-icon svg path,.neeto-molecules-profile-sublist__item-btn-icon svg path{vector-effect:non-scaling-stroke}.neeto-molecules-help-sublist__item-btn span,.neeto-molecules-profile-sublist__item-btn span{align-items:center;display:flex;gap:.5rem}.neeto-molecules-sidebar__link-icon{position:relative}.neeto-molecules-sidebar__notif-count{inset-inline-end:-6px;position:absolute;top:-6px;z-index:1}.neeto-molecules-help-sublist__item-btn-count,.neeto-molecules-sidebar__notif-count{align-items:center;background-color:rgb(var(--neeto-ui-primary-500));border-radius:var(--neeto-ui-rounded-full);color:rgb(var(--neeto-ui-white));display:inline-flex;flex-shrink:0;font-size:var(--neeto-ui-text-xxs);height:.9375rem;justify-content:center;text-align:center;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:.9375rem}.neeto-molecules-product-switcher-popup-wrapper{height:calc(100vh - 1rem);height:calc(100dvh - 1rem);margin-block-end:.5rem;min-width:calc(100vw - 11rem);overflow-y:auto}@media screen and (max-width:768px){.neeto-molecules-product-switcher-popup-wrapper{width:calc(100vw - 11.5625rem)!important}}.neeto-molecules-sidebar__backdrop{background-color:rgba(var(--neeto-ui-black),.4);height:100%;inset-inline-start:0;position:absolute;top:0;width:100%}@media screen and (min-width:769px){.neeto-molecules-sidebar__backdrop{display:none;visibility:hidden}}.neeto-molecules-sidebar-segments-header{padding-inline-start:3.625rem}.neeto-molecules-sidebar-segment{margin-block-end:0!important;padding-block:.25rem;padding-inline-end:1.5rem;padding-inline-start:3.625rem}.neeto-molecules-sidebar.neeto-molecules-sidebar--focus-mode{padding-block-start:0}.neeto-molecules-sidebar.neeto-molecules-sidebar--focus-mode .neeto-molecules-sidebar__header{padding-block-start:1.5rem}.neeto-molecules-sidebar.neeto-molecules-sidebar--focus-mode .neeto-molecules-sidebar__links{display:flex;flex-direction:column;height:calc(100vh - 10rem);height:calc(100dvh - 10rem);margin-block-end:0}.neeto-molecules-sidebar__links--focus-mode>.neeto-molecules-sidebar__sublink-wrapper{flex-grow:1;margin-block-end:.625rem!important;margin-inline:0!important;min-height:0;overflow-y:auto;padding-block-end:.625rem!important;padding-inline:0!important}.neeto-molecules-sidebar__links--focus-mode .neeto-molecules-sidebar__link{--neeto-ui-text-body1:1.125rem;background-color:rgb(var(--neeto-ui-gray-100));color:rgb(var(--neeto-ui-black));cursor:pointer;font-weight:var(--neeto-ui-font-semibold);gap:.25rem;padding-block:.75rem;padding-inline:.25rem;position:sticky;top:0;z-index:1}.neeto-molecules-sidebar__links--focus-mode .neeto-molecules-sidebar__link--selected{background-color:transparent;border-radius:0}.neeto-molecules-sidebar__links--focus-mode .neeto-molecules-sidebar__link-label,.neeto-molecules-sidebar__links--focus-mode .neeto-molecules-sidebar__link-sub-label{--neeto-ui-text-body2:0.9375rem}.neeto-molecules-sidebar__links--focus-mode>.neeto-molecules-sidebar__sublink-wrapper>.neeto-molecules-sidebar__sublink{color:rgb(var(--neeto-ui-black));font-weight:var(--neeto-ui-font-medium);margin-block-end:0;padding-block:.625rem;padding-inline:1.5rem}.neeto-molecules-sidebar__links--focus-mode>.neeto-molecules-sidebar__sublink-wrapper>.neeto-molecules-sidebar__sublink.active{font-weight:var(--neeto-ui-font-semibold)}.neeto-molecules-sidebar__links--focus-mode>.neeto-molecules-sidebar__sublink-wrapper>.neeto-molecules-sidebar__sublink-wrapper .neeto-molecules-sidebar__sublink{border-radius:0;padding-inline-start:2rem}.neeto-molecules-sidebar__links--focus-mode .neeto-molecules-sidebar__sublink{cursor:pointer;line-height:1.2;padding-block:.5rem;padding-inline-end:.75rem;padding-inline-start:1.5rem;position:relative}.neeto-molecules-sidebar__links--focus-mode .neeto-molecules-sidebar__sublink:hover{background-color:rgb(var(--neeto-ui-gray-100))}.neeto-molecules-sidebar__links--focus-mode .neeto-molecules-sidebar__sublink.active{background-color:rgb(var(--neeto-ui-white))!important;color:rgb(var(--neeto-ui-black))!important;font-weight:var(--neeto-ui-font-medium)}.neeto-molecules-sidebar__link-unread-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:flex;flex-shrink:0;font-size:var(--neeto-ui-text-xxs);height:1rem;inset-inline-end:-4px;justify-content:center;min-width:1rem;padding-inline:.25rem;position:absolute;top:-4px;-webkit-user-select:none;-moz-user-select:none;user-select:none}.neeto-ui-theme--dark .neeto-molecules-sidebar__logo [data-dark-mode-color=true]{fill:rgb(var(--neeto-ui-black))}.neeto-molecules-sidebar__workspace-info{margin-block-end:1.5rem;padding-block:.5rem;padding-inline:1.5rem}.neeto-molecules-sidebar__resize-handle{bottom:0;cursor:col-resize;inset-inline-end:0;position:absolute;top:0;width:3px;z-index:99999;z-index:calc(var(--neeto-molecules-sidebar-z-index) + 1)}.neeto-molecules-sidebar__resize-handle:before{background-color:rgb(var(--neeto-ui-gray-200));bottom:0;content:\"\";inset-inline-start:0;position:absolute;top:0;transition:background-color .15s ease-in-out,width .15s ease-in-out;width:0}.neeto-molecules-sidebar__resize-handle:hover:before{background-color:rgb(var(--neeto-ui-gray-400));width:2px}.neeto-molecules-sidebar__resize-handle:active:before{background-color:rgb(var(--neeto-ui-primary-500));width:2px}.neeto-molecules-sidebar__wrapper:not(.neeto-molecules-sidebar__wrapper--collapsed)+.neeto-molecules-sidebar__resize-handle{display:block}.neeto-molecules-sidebar__wrapper+.neeto-molecules-sidebar__resize-handle{display:none;inset-inline-start:15rem;inset-inline-start:var(--neeto-molecules-sidebar-width)}.neeto-molecules-sidebar__wrapper--collapsed+.neeto-molecules-sidebar__resize-handle{display:none}body.dragging-sidebar,body.dragging-sidebar *{cursor:col-resize!important}body.dragging-sidebar *{-webkit-user-select:none!important;-moz-user-select:none!important;user-select:none!important}[dir=rtl] .neeto-molecules-sidebar__toggler{transform:scaleX(-1);transition:none}[dir=rtl] .neeto-molecules-sidebar__wrapper--collapsed .neeto-molecules-sidebar__toggler{transform:scaleX(1)}[dir=rtl] .neeto-molecules-sidebar__link-icon{transform:scaleX(-1)}[dir=rtl] .neeto-molecules-sidebar__link-icon--rotate{transform:scaleX(1) rotate(90deg)}";
|
|
250
|
+
var css = ":root{--neeto-molecules-sidebar-width:15rem;--neeto-molecules-sidebar-wrapper-z-index:99997;--neeto-molecules-sidebar-z-index:99998}@media screen and (min-width:1024px){:root{--neeto-molecules-sidebar-width:15rem}}.neeto-molecules-sidebar__wrapper{display:flex;max-width:15rem;max-width:var(--neeto-molecules-sidebar-width);position:relative;width:15rem;width:var(--neeto-molecules-sidebar-width)}@media screen and (max-width:768px){.neeto-molecules-sidebar__wrapper{height:100%;inset-inline-start:0;max-width:100%;position:fixed;top:0;transition:none;width:100%;z-index:99997;z-index:var(--neeto-molecules-sidebar-wrapper-z-index)}.neeto-molecules-sidebar__wrapper .neeto-molecules-sidebar{inset-inline-start:0;max-width:15rem;max-width:var(--neeto-molecules-sidebar-width);position:fixed;top:0;transition:none;width:15rem;width:var(--neeto-molecules-sidebar-width)}}.neeto-molecules-sidebar__wrapper__configure-page .neeto-molecules-sidebar__toggler{inset-inline-end:1.25rem;top:.5rem}@media screen and (max-width:768px){.neeto-molecules-sidebar__wrapper__configure-page .neeto-molecules-sidebar__toggler{inset-inline-end:auto;top:.5rem}}.neeto-molecules-sidebar__wrapper--collapsed{max-width:0;width:0}.neeto-molecules-sidebar__wrapper--collapsed .neeto-molecules-sidebar__toggler{inset-inline-end:-2.25rem;transform:scale(-1)}@media screen and (max-width:768px){.neeto-molecules-sidebar__wrapper--collapsed .neeto-molecules-sidebar__toggler{inset-inline-end:auto;inset-inline-start:.5rem;top:.5rem}.neeto-molecules-sidebar__wrapper--collapsed .neeto-molecules-sidebar{inset-inline-start:-15rem;inset-inline-start:calc(var(--neeto-molecules-sidebar-width)*-1)}.neeto-molecules-sidebar__wrapper__configure-page.neeto-molecules-sidebar__wrapper--collapsed .neeto-molecules-sidebar__toggler{top:6.8125rem}}.neeto-molecules-sidebar{background-color:rgb(var(--neeto-ui-white));border-inline-end:1px solid rgb(var(--neeto-ui-gray-200));height:100vh;height:100dvh;padding:1.5rem 0;width:100%;z-index:99998;z-index:var(--neeto-molecules-sidebar-z-index)}.neeto-molecules-sidebar:not(.neeto-molecules-sidebar__configure-page) .neeto-molecules-sidebar__links:not(.neeto-molecules-sidebar__links--focus-mode){height:calc(100vh - 7.75rem)!important;height:calc(100dvh - 7.75rem)!important;overflow-y:auto;padding-block-end:4rem}.neeto-molecules-sidebar__no-shrinkable{max-width:15rem;max-width:var(--neeto-molecules-sidebar-width);width:15rem;width:var(--neeto-molecules-sidebar-width)}.neeto-molecules-sidebar__separator{margin:.375rem auto;width:100%}.neeto-molecules-sidebar__toggler{color:rgb(var(--neeto-ui-primary-500))!important;inset-inline-end:.5rem;position:absolute!important;top:2.125rem;z-index:99998;z-index:var(--neeto-molecules-sidebar-z-index)}@media screen and (max-width:768px){.neeto-molecules-sidebar__toggler{inset-inline-end:auto;inset-inline-start:12.625rem;inset-inline-start:calc(var(--neeto-molecules-sidebar-width) - 2.375rem);transition:none}}.neeto-molecules-sidebar__configure-page{border-inline-end:1px solid rgb(var(--neeto-ui-gray-200));height:auto}@media screen and (max-width:768px){.neeto-molecules-sidebar__configure-page{height:100%}}.neeto-molecules-sidebar__configure-page .neeto-molecules-sidebar__links{height:calc(100vh - 8.5rem)!important;height:calc(100dvh - 8.5rem)!important}@media screen and (max-width:768px){.neeto-molecules-sidebar__configure-page .neeto-molecules-sidebar__links{height:calc(100vh - 5rem)!important;height:calc(100dvh - 5rem)!important}}.neeto-molecules-sidebar__configure-page .neeto-molecules-sidebar__toggler{display:none}.neeto-molecules-sidebar__header{margin-block:.5rem 2rem;margin-inline:0;padding-block:0;padding-inline:1.5rem}.neeto-molecules-sidebar__logo svg{height:2.25rem;max-width:100%;width:auto}.neeto-molecules-sidebar__link{color:rgb(var(--neeto-ui-black));gap:.625rem;line-height:1.2;padding-block:.75rem;padding-inline:1.5rem;position:relative;text-decoration:none!important;transition:color .3s,background-color .3s;width:100%}.neeto-molecules-sidebar__link-icon{flex-shrink:0}.neeto-molecules-sidebar__link-icon svg path{vector-effect:non-scaling-stroke}.neeto-molecules-sidebar__link-icon--caret{opacity:0;transition:opacity .3s ease-in-out}.neeto-molecules-sidebar__link-icon--rotate{opacity:1;transform:rotate(90deg)}.neeto-molecules-sidebar__link-label,.neeto-molecules-sidebar__link-sub-label{--neeto-ui-text-body2:0.9375rem;flex-grow:1;text-align:start}@media screen and (min-width:1536px){.neeto-molecules-sidebar__link-label,.neeto-molecules-sidebar__link-sub-label{--neeto-ui-text-body2:1rem}}.neeto-molecules-sidebar__link:hover{background-color:rgb(var(--neeto-ui-gray-100));color:rgb(var(--neeto-ui-black))}.neeto-molecules-sidebar__link:focus,.neeto-molecules-sidebar__link:focus-visible,.neeto-molecules-sidebar__link[aria-expanded=true]{color:rgb(var(--neeto-ui-black));outline:none}.neeto-molecules-sidebar__link--hover-active{background-color:rgb(var(--neeto-ui-gray-100))}.neeto-molecules-sidebar__link.active{background-color:rgb(var(--neeto-ui-accent-100));color:rgb(var(--neeto-ui-black));font-weight:var(--neeto-ui-font-semibold)}.neeto-molecules-sidebar__link.active .neeto-molecules-sidebar__link-icon--caret,.neeto-molecules-sidebar__link:hover .neeto-molecules-sidebar__link-icon--caret,.neeto-molecules-sidebar__link[aria-expanded=true] .neeto-molecules-sidebar__link-icon--caret{opacity:1}.neeto-molecules-sidebar__link--button:focus{background-color:transparent}.neeto-molecules-sidebar__link--button:focus-visible{background-color:rgb(var(--neeto-ui-gray-200));color:rgb(var(--neeto-ui-black))}.neeto-molecules-sidebar__link--change-log{outline:none!important}.neeto-molecules-sidebar__sublink-wrapper{padding-block:.25rem;padding-inline:0}.neeto-molecules-sidebar__sublink{color:rgb(var(--neeto-ui-gray-700));cursor:pointer;gap:.5rem;margin-block-end:0;margin-inline:0;padding-block:.5rem;padding-inline-end:1.5rem;padding-inline-start:3.625rem;text-decoration:none;transition:color .3s,background-color .3s}.neeto-molecules-sidebar__sublink .neeto-molecules-sidebar__link-sub-count{--neeto-ui-text-body2:0.9375rem;opacity:.75}@media screen and (min-width:1536px){.neeto-molecules-sidebar__sublink .neeto-molecules-sidebar__link-sub-count{--neeto-ui-text-body2:1rem}}.neeto-molecules-sidebar__sublink:hover{color:rgb(var(--neeto-ui-black));text-decoration:none}.neeto-molecules-sidebar__sublink:hover .neeto-molecules-sidebar__link-sub-count{opacity:1}.neeto-molecules-sidebar__sublink:focus,.neeto-molecules-sidebar__sublink:focus-visible{color:rgb(var(--neeto-ui-black));outline:none;text-decoration:none}.neeto-molecules-sidebar__sublink:focus .neeto-molecules-sidebar__link-sub-count,.neeto-molecules-sidebar__sublink:focus-visible .neeto-molecules-sidebar__link-sub-count{opacity:1}.neeto-molecules-sidebar__sublink.active,.neeto-molecules-sidebar__sublink:active{color:rgb(var(--neeto-ui-accent-800));font-weight:500;text-decoration:none}.neeto-molecules-sidebar__sublink.active .neeto-molecules-sidebar__link-sub-count,.neeto-molecules-sidebar__sublink:active .neeto-molecules-sidebar__link-sub-count{opacity:1}.neeto-molecules-sidebar__footer{margin-block-start:auto}.sidebar-featured-tooltip__content{border-radius:.5rem!important;box-shadow:var(--neeto-ui-shadow-sm)!important}.sidebar-featured-tooltip__content .tippy-content{padding:0}.sidebar-featured-tooltip{padding:.75rem;width:9.375rem}.sidebar-featured-tooltip__icon-wrap{background-color:rgb(var(--neeto-ui-gray-100));border-radius:.5rem;height:2.5rem;margin-block-end:.5rem;margin-inline:auto;width:2.5rem}.sidebar-featured-tooltip__title{margin-block-end:.25rem}.neeto-molecules-help-popup-wrapper,.neeto-molecules-product-switcher-popup-wrapper,.neeto-molecules-profile-popup-wrapper{border:1px solid rgb(var(--neeto-ui-gray-400));border-radius:var(--neeto-ui-rounded)!important;min-width:15rem}.neeto-molecules-help-popup-wrapper .tippy-content,.neeto-molecules-product-switcher-popup-wrapper .tippy-content,.neeto-molecules-profile-popup-wrapper .tippy-content{padding:0}.neeto-molecules-help-popup-wrapper .tippy-svg-arrow,.neeto-molecules-product-switcher-popup-wrapper .tippy-svg-arrow,.neeto-molecules-profile-popup-wrapper .tippy-svg-arrow{display:none!important}.neeto-molecules-profile-popup__top-section{border-start-end-radius:var(--neeto-ui-rounded);border-start-start-radius:var(--neeto-ui-rounded)}.neeto-molecules-profile-sublist{border-block-start:1px solid rgb(var(--neeto-ui-gray-400))}.neeto-molecules-help-sublist,.neeto-molecules-profile-sublist{list-style:none;margin:0;padding-block:.25rem;padding-inline:0}.neeto-molecules-help-sublist__item,.neeto-molecules-profile-sublist__item{width:100%}.neeto-molecules-help-sublist__item-btn,.neeto-molecules-profile-sublist__item-btn{border-radius:0;justify-content:flex-end!important;min-height:2.5rem;text-align:start}.neeto-molecules-help-sublist__item-btn.active,.neeto-molecules-profile-sublist__item-btn.active{background-color:rgb(var(--neeto-ui-gray-800));color:rgb(var(--neeto-ui-white))}.neeto-molecules-help-sublist__item-btn-icon svg path,.neeto-molecules-profile-sublist__item-btn-icon svg path{vector-effect:non-scaling-stroke}.neeto-molecules-help-sublist__item-btn span,.neeto-molecules-profile-sublist__item-btn span{align-items:center;display:flex;gap:.5rem}.neeto-molecules-sidebar__link-icon{position:relative}.neeto-molecules-sidebar__notif-count{inset-inline-end:-6px;position:absolute;top:-6px;z-index:1}.neeto-molecules-help-sublist__item-btn-count,.neeto-molecules-sidebar__notif-count{align-items:center;background-color:rgb(var(--neeto-ui-primary-500));border-radius:var(--neeto-ui-rounded-full);color:rgb(var(--neeto-ui-white));display:inline-flex;flex-shrink:0;font-size:var(--neeto-ui-text-xxs);height:.9375rem;justify-content:center;text-align:center;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:.9375rem}.neeto-molecules-product-switcher-popup-wrapper{height:calc(100vh - 1rem);height:calc(100dvh - 1rem);margin-block-end:.5rem;min-width:calc(100vw - 11rem);overflow-y:auto}@media screen and (max-width:768px){.neeto-molecules-product-switcher-popup-wrapper{width:calc(100vw - 11.5625rem)!important}}.neeto-molecules-sidebar__backdrop{background-color:rgba(var(--neeto-ui-black),.4);height:100%;inset-inline-start:0;position:absolute;top:0;width:100%}@media screen and (min-width:769px){.neeto-molecules-sidebar__backdrop{display:none;visibility:hidden}}.neeto-molecules-sidebar-segments-header{padding-inline-start:3.625rem}.neeto-molecules-sidebar-segment{margin-block-end:0!important;padding-block:.25rem;padding-inline-end:1.5rem;padding-inline-start:3.625rem}.neeto-molecules-sidebar.neeto-molecules-sidebar--focus-mode{padding-block-start:0}.neeto-molecules-sidebar.neeto-molecules-sidebar--focus-mode .neeto-molecules-sidebar__header{padding-block-start:1.5rem}.neeto-molecules-sidebar.neeto-molecules-sidebar--focus-mode .neeto-molecules-sidebar__links{display:flex;flex-direction:column;height:calc(100vh - 10rem);height:calc(100dvh - 10rem);margin-block-end:0}.neeto-molecules-sidebar__links--focus-mode>.neeto-molecules-sidebar__sublink-wrapper{flex-grow:1;margin-block-end:.625rem!important;margin-inline:0!important;min-height:0;overflow-y:auto;padding-block-end:.625rem!important;padding-inline:0!important}.neeto-molecules-sidebar__links--focus-mode>.neeto-molecules-sidebar__sublink-wrapper .neeto-molecules-sidebar__sublink-wrapper{padding:0!important}.neeto-molecules-sidebar__links--focus-mode>.neeto-molecules-sidebar__sublink-wrapper .neeto-molecules-sidebar__sublink-wrapper .neeto-molecules-sidebar__sublink{border-radius:0}.neeto-molecules-sidebar__links--focus-mode .neeto-molecules-sidebar__link{--neeto-ui-text-body1:1.125rem;background-color:rgb(var(--neeto-ui-gray-100));color:rgb(var(--neeto-ui-black));cursor:pointer;font-weight:var(--neeto-ui-font-semibold);gap:.25rem;padding-block:.75rem;padding-inline:.25rem;position:sticky;top:0;z-index:1}.neeto-molecules-sidebar__links--focus-mode .neeto-molecules-sidebar__link-label,.neeto-molecules-sidebar__links--focus-mode .neeto-molecules-sidebar__link-sub-label{--neeto-ui-text-body2:0.9375rem}.neeto-molecules-sidebar__links--focus-mode>.neeto-molecules-sidebar__sublink-wrapper>.neeto-molecules-sidebar__sublink{color:rgb(var(--neeto-ui-black));font-weight:var(--neeto-ui-font-medium);margin-block-end:0;padding-block:.625rem;padding-inline:.75rem}.neeto-molecules-sidebar__links--focus-mode>.neeto-molecules-sidebar__sublink-wrapper>.neeto-molecules-sidebar__sublink.active{font-weight:var(--neeto-ui-font-semibold)}.neeto-molecules-sidebar__links--focus-mode>.neeto-molecules-sidebar__sublink-wrapper>.neeto-molecules-sidebar__sublink-wrapper .neeto-molecules-sidebar__sublink{border-radius:0;padding-inline-start:2rem}.neeto-molecules-sidebar__links--focus-mode .neeto-molecules-sidebar__sublink{cursor:pointer;line-height:1.2;padding-block:.5rem;padding-inline-end:.75rem;padding-inline-start:1.5rem;position:relative}.neeto-molecules-sidebar__links--focus-mode .neeto-molecules-sidebar__sublink:hover{background-color:rgb(var(--neeto-ui-gray-100))}.neeto-molecules-sidebar__links--focus-mode .neeto-molecules-sidebar__sublink.active{background-color:rgb(var(--neeto-ui-accent-100))!important;color:rgb(var(--neeto-ui-black))!important;font-weight:var(--neeto-ui-font-medium)}.neeto-molecules-sidebar__link-unread-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:flex;flex-shrink:0;font-size:var(--neeto-ui-text-xxs);height:1rem;inset-inline-end:-4px;justify-content:center;min-width:1rem;padding-inline:.25rem;position:absolute;top:-4px;-webkit-user-select:none;-moz-user-select:none;user-select:none}.neeto-ui-theme--dark .neeto-molecules-sidebar__logo [data-dark-mode-color=true]{fill:rgb(var(--neeto-ui-black))}.neeto-molecules-sidebar__workspace-info{margin-block-end:1.5rem;padding-block:.5rem;padding-inline:1.5rem}.neeto-molecules-sidebar__resize-handle{bottom:0;cursor:col-resize;inset-inline-end:0;position:absolute;top:0;width:3px;z-index:99999;z-index:calc(var(--neeto-molecules-sidebar-z-index) + 1)}.neeto-molecules-sidebar__resize-handle:before{background-color:rgb(var(--neeto-ui-gray-200));bottom:0;content:\"\";inset-inline-start:0;position:absolute;top:0;transition:background-color .15s ease-in-out,width .15s ease-in-out;width:0}.neeto-molecules-sidebar__resize-handle:hover:before{background-color:rgb(var(--neeto-ui-gray-400));width:2px}.neeto-molecules-sidebar__resize-handle:active:before{background-color:rgb(var(--neeto-ui-primary-500));width:2px}.neeto-molecules-sidebar__wrapper:not(.neeto-molecules-sidebar__wrapper--collapsed)+.neeto-molecules-sidebar__resize-handle{display:block}.neeto-molecules-sidebar__wrapper+.neeto-molecules-sidebar__resize-handle{display:none;inset-inline-start:15rem;inset-inline-start:var(--neeto-molecules-sidebar-width)}.neeto-molecules-sidebar__wrapper--collapsed+.neeto-molecules-sidebar__resize-handle{display:none}body.dragging-sidebar,body.dragging-sidebar *{cursor:col-resize!important}body.dragging-sidebar *{-webkit-user-select:none!important;-moz-user-select:none!important;user-select:none!important}[dir=rtl] .neeto-molecules-sidebar__toggler{transform:scaleX(-1);transition:none}[dir=rtl] .neeto-molecules-sidebar__wrapper--collapsed .neeto-molecules-sidebar__toggler{transform:scaleX(1)}[dir=rtl] .neeto-molecules-sidebar__link-icon{transform:scaleX(-1)}[dir=rtl] .neeto-molecules-sidebar__link-icon--rotate{transform:scaleX(1) rotate(90deg)}";
|
|
253
251
|
injectCss.n(css,{});
|
|
254
252
|
|
|
255
253
|
var Chevron = function Chevron(_ref) {
|
|
@@ -283,4 +281,4 @@ exports.enableDraggingStyles = enableDraggingStyles;
|
|
|
283
281
|
exports.filterByPermissions = filterByPermissions;
|
|
284
282
|
exports.getActiveConfigurePageLink = getActiveConfigurePageLink;
|
|
285
283
|
exports.getSidebarStateLocalStorageKey = getSidebarStateLocalStorageKey;
|
|
286
|
-
//# sourceMappingURL=Chevron-
|
|
284
|
+
//# sourceMappingURL=Chevron-DzdbGPJI.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Chevron-DzdbGPJI.js","sources":["../../src/components/Sidebar/constants.js","../../src/components/Sidebar/Components/Links/CheckPointNavLink.jsx","../../src/components/Sidebar/utils.js","../../src/components/Sidebar/Components/Links/SubLink.jsx","../../src/components/Sidebar/Components/Links/Items.jsx","../../src/components/Sidebar/Components/Links/SelectedLink.jsx","../../src/components/Sidebar/Components/Chevron.jsx"],"sourcesContent":["export const SUB_LINK_TYPES = {\n SYSTEM_VIEW: \"system_view\",\n SEGMENTS: \"segments\",\n};\n\nexport const SELECTED_NAV_LINK_ROUTE_STORAGE_KEY = \"selectedNavLinkRoute\";\n\nexport const DEFAULT_HOME_PATH = \"/admin\";\n\nexport const SIDEBAR_WIDTH_KEY = \"neeto-molecules-sidebar-width\";\nexport const MIN_SIDEBAR_WIDTH = 12.5 * 16;\nexport const MAX_SIDEBAR_WIDTH = 20 * 16;\nexport const DEFAULT_SIDEBAR_WIDTH = 15 * 16;\n\nexport const PINNED_MORE_NAV_LINKS_KEY = \"pinnedMoreNavLinks\";\n\nexport const SPECIAL_APP_NAMES = { bugwatch: \"BugWatch\" };\n","import { useNavigationCheckpoints } from \"neetocommons/react-utils/useRegisterNavigationCheckpoint\";\nimport { NavLink } from \"react-router-dom\";\n\nconst CheckPointNavLinks = ({\n checkpointKey,\n to,\n href,\n children,\n ...others\n}) => {\n const { [checkpointKey]: checkpoint } =\n useNavigationCheckpoints(checkpointKey);\n\n const LinkElement = href ? \"a\" : NavLink;\n const linkProps = href\n ? { href, key: href, ...others }\n : { to: checkpoint || to, key: to, ...others };\n\n return <LinkElement {...linkProps}>{children}</LinkElement>;\n};\n\nexport default CheckPointNavLinks;\n","import { isPresent, isNotEmpty } from \"neetocist\";\nimport { __, all, curry, equals, includes, is } from \"ramda\";\n\nexport const isSubRouteActive = (subRoute, location) => {\n const currentBrowserUrl = new URL(\n location.pathname + location.search + location.hash,\n window.location.origin\n );\n const targetUrl = new URL(subRoute, window.location.origin);\n\n const targetSearchParams = targetUrl.searchParams;\n const targetSearchKeys = Array.from(targetSearchParams.keys());\n\n return (\n all(\n key =>\n currentBrowserUrl.searchParams.get(key) === targetSearchParams.get(key),\n targetSearchKeys\n ) && equals(currentBrowserUrl.pathname, targetUrl.pathname)\n );\n};\n\nexport const getSidebarStateLocalStorageKey = () => {\n const user = globalProps.user?.email || globalProps.user?.phoneNumber;\n\n return `sidebarState-${user}`;\n};\n\nexport const filterByPermissions = curry(({ permissions }) => {\n if (permissions && isNotEmpty(permissions)) {\n return is(Array, permissions)\n ? permissions.some(includes(__, globalProps.permissions))\n : globalProps.permissions.includes(permissions);\n }\n\n return true;\n});\n\nexport const getActiveConfigurePageLink = ({ navLinks, location }) =>\n navLinks.find(link => {\n const [linkPathname] = link.to?.split(\"?\") || [];\n\n return (\n isPresent(link.isConfigureNavLink) &&\n link.isConfigureNavLink &&\n location.pathname.startsWith(linkPathname)\n );\n });\n\nexport const enableDraggingStyles = () => {\n document.body.classList.add(\"dragging-sidebar\");\n document.body.style.cursor = \"col-resize\";\n document.body.style.userSelect = \"none\";\n};\n\nexport const disableDraggingStyles = () => {\n document.body.classList.remove(\"dragging-sidebar\");\n document.body.style.cursor = \"\";\n document.body.style.userSelect = \"\";\n};\n","import { hyphenate } from \"neetocist\";\nimport { Segments } from \"neetofilters\";\nimport { Typography } from \"neetoui\";\nimport { is } from \"ramda\";\n\nimport CheckPointNavLinks from \"./CheckPointNavLink\";\n\nimport { SUB_LINK_TYPES } from \"../../constants\";\nimport { isSubRouteActive } from \"../../utils\";\n\nconst SubLink = ({\n to,\n href,\n onClick,\n label,\n type = SUB_LINK_TYPES.SYSTEM_VIEW,\n count,\n isSectionHeader,\n isCountsLoading,\n \"data-cy\": dataCy,\n entity = \"\",\n columns = [],\n baseUrl,\n isActive,\n}) => {\n if (type === SUB_LINK_TYPES.SEGMENTS) {\n return <Segments {...{ baseUrl, columns, entity }} isIndependent={false} />;\n }\n\n const dataCyPrefix = dataCy || hyphenate(label);\n\n const renderCount = count => (count > 999 ? \"999+\" : count);\n\n const isSubLinkActive = () =>\n !isSectionHeader &&\n (is(Function, isActive) ? isActive() : isSubRouteActive(to, location));\n\n return (\n <CheckPointNavLinks\n {...{ href, onClick, to }}\n activeClassName=\"active\"\n className=\"neeto-molecules-sidebar__sublink neeto-ui-flex neeto-ui-items-center neeto-ui-select-none\"\n data-cy={`${dataCyPrefix}-sub-link`}\n isActive={isSubLinkActive}\n >\n <Typography\n className=\"neeto-molecules-sidebar__link-sub-label neeto-ui-flex-grow\"\n component=\"span\"\n data-cy={`${dataCyPrefix}-sub-link-label`}\n style=\"body2\"\n >\n {label}\n </Typography>\n <Typography\n className=\"neeto-molecules-sidebar__link-sub-count neeto-ui-flex-shrink-0\"\n component=\"span\"\n data-cy={`${dataCyPrefix}-sub-link-count`}\n style=\"body2\"\n >\n {isCountsLoading ? (\n <div className=\"neeto-ui-rounded neeto-ui-bg-gray-200 h-4 w-4 animate-pulse\" />\n ) : (\n renderCount(count)\n )}\n </Typography>\n </CheckPointNavLinks>\n );\n};\n\nexport default SubLink;\n","import { Fragment } from \"react\";\n\nimport { isPresent } from \"neetocist\";\n\nimport SubLink from \"./SubLink\";\n\nimport { filterByPermissions } from \"../../utils\";\n\nconst Items = ({ items, isSettingsItems = false, isCountsLoading }) => (\n <div\n className=\"neeto-molecules-sidebar__sublink-wrapper\"\n data-cy=\"sidebar-sub-link-wrapper\"\n >\n {items.filter(filterByPermissions).map((subItem, subIndex) => (\n <Fragment key={subIndex}>\n <SubLink\n {...{ ...subItem, isCountsLoading }}\n href={subItem.href}\n isActive={subItem.isActive}\n isSectionHeader={isPresent(subItem.item)}\n to={subItem.to ?? subItem.path}\n onClick={subItem.onClick}\n />\n {isSettingsItems && isPresent(subItem.items) && (\n <>\n <Items {...{ isSettingsItems }} items={subItem.items} />\n {items.length - 1 !== subIndex && (\n <hr className=\"neeto-molecules-sidebar__separator neeto-ui-border-gray-200\" />\n )}\n </>\n )}\n </Fragment>\n ))}\n </div>\n);\n\nexport default Items;\n","import classNames from \"classnames\";\nimport { handleMetaClick } from \"neetocommons/react-utils\";\nimport { hyphenize } from \"neetocommons/utils/general\";\nimport { Home } from \"neetoicons\";\nimport { Typography, Button } from \"neetoui\";\nimport { omit } from \"ramda\";\nimport { useHistory } from \"react-router-dom\";\n\nimport { DEFAULT_HOME_PATH } from \"components/Sidebar/constants\";\n\nimport Items from \"./Items\";\n\nconst SelectedLink = ({\n navLink = { label: \"\", items: [], isConfigureNavLink: false },\n handleGoBack,\n isConfigureSidebar,\n}) => {\n const history = useHistory();\n const { label, items, isConfigureNavLink, ...otherProps } = navLink;\n\n const handleHomeButtonClick = e => {\n e.stopPropagation();\n handleMetaClick(history, DEFAULT_HOME_PATH, e);\n };\n\n return (\n <div\n className=\"neeto-molecules-sidebar__links neeto-molecules-sidebar__links--focus-mode neeto-molecules-sidebar__no-shrinkable\"\n data-cy=\"configure-nav-container\"\n >\n <div\n className=\"neeto-ui-flex neeto-ui-items-center neeto-ui-no-underline neeto-molecules-sidebar__link neeto-ui-border-b neeto-ui-border-gray-200\"\n onClick={handleGoBack}\n {...{ ...omit([\"icon\"], otherProps) }}\n >\n {isConfigureNavLink && (\n <span className=\"neeto-molecules-sidebar__link-icon flex items-center pl-3\">\n <Button\n data-cy={`${hyphenize(label)}-go-back-button`}\n data-testid={`${label}-go-home-button`}\n icon={Home}\n style=\"text\"\n onClick={handleHomeButtonClick}\n />\n <span className=\"px-1 text-xs\">/</span>\n </span>\n )}\n <Typography\n component=\"span\"\n style=\"body1\"\n className={classNames(\"neeto-molecules-sidebar__link-label\", {\n \"neeto-molecules-sidebar__configure-page-header\":\n isConfigureNavLink,\n [\"pl-4\"]: isConfigureSidebar,\n })}\n >\n {label}\n </Typography>\n </div>\n {items && <Items {...{ items }} isSettingsItems />}\n </div>\n );\n};\n\nexport default SelectedLink;\n","const Chevron = ({ style }) => (\n <svg {...{ style }} height=\"16\" viewBox=\"0 0 16 16\" width=\"16\">\n <path\n d=\"M7.07031 13.8887C7.2207 14.0391 7.40527 14.1211 7.62402 14.1211C8.06836 14.1211 8.41699 13.7725 8.41699 13.3281C8.41699 13.1094 8.32812 12.9043 8.17773 12.7539L3.37207 8.05762L8.17773 3.375C8.32812 3.21777 8.41699 3.0127 8.41699 2.80078C8.41699 2.35645 8.06836 2.00781 7.62402 2.00781C7.40527 2.00781 7.2207 2.08984 7.07031 2.24023L1.73828 7.44922C1.56055 7.62012 1.46484 7.8252 1.46484 8.06445C1.46484 8.29688 1.55371 8.49512 1.73828 8.67969L7.07031 13.8887ZM13.1748 13.8887C13.3252 14.0391 13.5098 14.1211 13.7354 14.1211C14.1797 14.1211 14.5283 13.7725 14.5283 13.3281C14.5283 13.1094 14.4395 12.9043 14.2891 12.7539L9.4834 8.05762L14.2891 3.375C14.4395 3.21777 14.5283 3.0127 14.5283 2.80078C14.5283 2.35645 14.1797 2.00781 13.7354 2.00781C13.5098 2.00781 13.3252 2.08984 13.1748 2.24023L7.84961 7.44922C7.66504 7.62012 7.57617 7.8252 7.56934 8.06445C7.56934 8.29688 7.66504 8.49512 7.84961 8.67969L13.1748 13.8887Z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n\nexport default Chevron;\n"],"names":["SUB_LINK_TYPES","SYSTEM_VIEW","SEGMENTS","SELECTED_NAV_LINK_ROUTE_STORAGE_KEY","DEFAULT_HOME_PATH","SIDEBAR_WIDTH_KEY","MIN_SIDEBAR_WIDTH","MAX_SIDEBAR_WIDTH","DEFAULT_SIDEBAR_WIDTH","PINNED_MORE_NAV_LINKS_KEY","SPECIAL_APP_NAMES","bugwatch","CheckPointNavLinks","_ref","checkpointKey","to","href","children","others","_objectWithoutProperties","_excluded","_useNavigationCheckpo","useNavigationCheckpoints","checkpoint","LinkElement","NavLink","linkProps","_objectSpread","key","_jsx","isSubRouteActive","subRoute","location","currentBrowserUrl","URL","pathname","search","hash","window","origin","targetUrl","targetSearchParams","searchParams","targetSearchKeys","Array","from","keys","all","get","equals","getSidebarStateLocalStorageKey","_globalProps$user","_globalProps$user2","user","globalProps","email","phoneNumber","concat","filterByPermissions","curry","permissions","isNotEmpty","is","some","includes","__","getActiveConfigurePageLink","_ref2","navLinks","find","link","_link$to","_ref3","split","_ref4","_slicedToArray","linkPathname","isPresent","isConfigureNavLink","startsWith","enableDraggingStyles","document","body","classList","add","style","cursor","userSelect","disableDraggingStyles","remove","SubLink","onClick","label","_ref$type","type","count","isSectionHeader","isCountsLoading","dataCy","_ref$entity","entity","_ref$columns","columns","baseUrl","isActive","Segments","isIndependent","dataCyPrefix","hyphenate","renderCount","isSubLinkActive","Function","_jsxs","activeClassName","className","Typography","component","Items","items","_ref$isSettingsItems","isSettingsItems","filter","map","subItem","subIndex","_subItem$to","Fragment","item","path","_Fragment","_Items","length","SelectedLink","_ref$navLink","navLink","handleGoBack","isConfigureSidebar","history","useHistory","otherProps","handleHomeButtonClick","e","stopPropagation","handleMetaClick","omit","Button","hyphenize","icon","Home","classNames","_defineProperty","Chevron","height","viewBox","width","d","fill"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAO,IAAMA,cAAc,GA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|
8
8
|
var reactI18next = require('react-i18next');
|
|
9
9
|
var reactRouterDom = require('react-router-dom');
|
|
10
|
-
var Chevron = require('./Chevron-
|
|
10
|
+
var Chevron = require('./Chevron-DzdbGPJI.js');
|
|
11
11
|
var jsxRuntime = require('react/jsx-runtime');
|
|
12
12
|
require('@babel/runtime/helpers/defineProperty');
|
|
13
13
|
require('@babel/runtime/helpers/objectWithoutProperties');
|
package/dist/cjs/FinderModal.js
CHANGED
|
@@ -10,6 +10,7 @@ var ramda = require('ramda');
|
|
|
10
10
|
var classnames = require('classnames');
|
|
11
11
|
var Typography = require('@bigbinary/neetoui/Typography');
|
|
12
12
|
var NoData = require('@bigbinary/neetoui/NoData');
|
|
13
|
+
var Tag = require('@bigbinary/neetoui/Tag');
|
|
13
14
|
var reactI18next = require('react-i18next');
|
|
14
15
|
var reactRouterDom = require('react-router-dom');
|
|
15
16
|
var jsxRuntime = require('react/jsx-runtime');
|
|
@@ -30,20 +31,22 @@ require('@bigbinary/neetoui/Input');
|
|
|
30
31
|
require('@bigbinary/neeto-commons-frontend/utils');
|
|
31
32
|
|
|
32
33
|
var _excluded$1 = ["to", "children"];
|
|
33
|
-
function ownKeys$
|
|
34
|
-
function _objectSpread$
|
|
34
|
+
function ownKeys$2(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; }
|
|
35
|
+
function _objectSpread$2(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$2(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$2(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
35
36
|
var Link = function Link(_ref) {
|
|
36
37
|
var to = _ref.to,
|
|
37
38
|
children = _ref.children,
|
|
38
39
|
rest = _objectWithoutProperties(_ref, _excluded$1);
|
|
39
40
|
var url = new URL(to);
|
|
40
41
|
url.host = "";
|
|
41
|
-
return /*#__PURE__*/jsxRuntime.jsx(reactRouterDom.Link, _objectSpread$
|
|
42
|
+
return /*#__PURE__*/jsxRuntime.jsx(reactRouterDom.Link, _objectSpread$2(_objectSpread$2({}, rest), {}, {
|
|
42
43
|
to: "".concat(url.pathname).concat(url.search),
|
|
43
44
|
children: children
|
|
44
45
|
}));
|
|
45
46
|
};
|
|
46
47
|
|
|
48
|
+
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; }
|
|
49
|
+
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), true).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; }
|
|
47
50
|
var minMax = function minMax(number) {
|
|
48
51
|
var max = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Number.POSITIVE_INFINITY;
|
|
49
52
|
var min = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
|
@@ -78,7 +81,32 @@ var filterAndHighlightContent = function filterAndHighlightContent(bodyContent,
|
|
|
78
81
|
}, index);
|
|
79
82
|
});
|
|
80
83
|
};
|
|
84
|
+
var flattenData = function flattenData(data) {
|
|
85
|
+
if (!data) return [];
|
|
86
|
+
if (Array.isArray(data)) return data;
|
|
87
|
+
var result = [];
|
|
88
|
+
Object.keys(data).forEach(function (key) {
|
|
89
|
+
data[key].forEach(function (item) {
|
|
90
|
+
result.push(_objectSpread$1(_objectSpread$1({}, item), {}, {
|
|
91
|
+
category: key
|
|
92
|
+
}));
|
|
93
|
+
});
|
|
94
|
+
});
|
|
95
|
+
return result;
|
|
96
|
+
};
|
|
97
|
+
var createStylePalette = function createStylePalette(values) {
|
|
98
|
+
var assignedStyles = {};
|
|
99
|
+
var styleIndex = 0;
|
|
100
|
+
return function (key) {
|
|
101
|
+
if (assignedStyles[key]) return assignedStyles[key];
|
|
102
|
+
var style = values[styleIndex];
|
|
103
|
+
styleIndex = (styleIndex + 1) % values.length;
|
|
104
|
+
assignedStyles[key] = style;
|
|
105
|
+
return style;
|
|
106
|
+
};
|
|
107
|
+
};
|
|
81
108
|
|
|
109
|
+
var getStyle = createStylePalette(["primary", "info", "success", "secondary", "warning"]);
|
|
82
110
|
var ModalBody = function ModalBody(_ref) {
|
|
83
111
|
var containerRef = _ref.containerRef,
|
|
84
112
|
data = _ref.data,
|
|
@@ -88,7 +116,8 @@ var ModalBody = function ModalBody(_ref) {
|
|
|
88
116
|
searchTerm = _ref.searchTerm;
|
|
89
117
|
var _useTranslation = reactI18next.useTranslation(),
|
|
90
118
|
t = _useTranslation.t;
|
|
91
|
-
var
|
|
119
|
+
var flattenedData = flattenData(data);
|
|
120
|
+
var isDataEmpty = neetoCist.isNotPresent(flattenedData);
|
|
92
121
|
if (isDataEmpty && !loading) {
|
|
93
122
|
return /*#__PURE__*/jsxRuntime.jsx(Modal.Body, {
|
|
94
123
|
className: "neeto-molecules-finder-modal__body flex h-96 items-center justify-center overflow-y-auto px-4 py-6",
|
|
@@ -101,48 +130,42 @@ var ModalBody = function ModalBody(_ref) {
|
|
|
101
130
|
return /*#__PURE__*/jsxRuntime.jsx(Modal.Body, {
|
|
102
131
|
className: "neeto-molecules-finder-modal__body h-96 overflow-y-auto px-4 py-6",
|
|
103
132
|
children: /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
104
|
-
className: "flex flex-col gap-y-
|
|
133
|
+
className: "flex flex-col gap-y-2",
|
|
105
134
|
ref: containerRef,
|
|
106
|
-
children:
|
|
107
|
-
if (neetoCist.isNotPresent(
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
}),
|
|
139
|
-
children: filteredBodyContent || bodyContent
|
|
140
|
-
})]
|
|
141
|
-
})]
|
|
142
|
-
}, item.id);
|
|
143
|
-
})
|
|
135
|
+
children: flattenedData.map(function (item) {
|
|
136
|
+
if (neetoCist.isNotPresent(item.category)) return null;
|
|
137
|
+
var Icon = iconComponentMap[item.category] || iconComponentMap["default"];
|
|
138
|
+
var nameContent = htmlToText(item.name);
|
|
139
|
+
var bodyContent = htmlToText(item.body);
|
|
140
|
+
var filteredBodyContent = filterAndHighlightContent(bodyContent, searchTerm);
|
|
141
|
+
return /*#__PURE__*/jsxRuntime.jsxs(Link, {
|
|
142
|
+
className: "neeto-molecules-search-result-item hover:neeto-ui-bg-accent-100 focus:neeto-ui-bg-accent-100 neeto-ui-rounded flex w-full cursor-pointer items-center gap-2 p-2 text-xs",
|
|
143
|
+
to: item.url,
|
|
144
|
+
onClick: onClose,
|
|
145
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Icon, {
|
|
146
|
+
className: "neeto-ui-text-gray-500 min-w-fit",
|
|
147
|
+
size: 16
|
|
148
|
+
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
149
|
+
className: "line-clamp-1 flex flex-col",
|
|
150
|
+
children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
151
|
+
className: "flex items-center gap-2",
|
|
152
|
+
children: [nameContent && /*#__PURE__*/jsxRuntime.jsx(Typography, {
|
|
153
|
+
className: "neeto-ui-text-black text-sm font-medium",
|
|
154
|
+
children: highlightMatch(nameContent, searchTerm)
|
|
155
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Tag, {
|
|
156
|
+
size: "small",
|
|
157
|
+
style: getStyle(item.category),
|
|
158
|
+
children: neetoCist.humanize(item.category)
|
|
159
|
+
})]
|
|
160
|
+
}), bodyContent && /*#__PURE__*/jsxRuntime.jsx(Typography, {
|
|
161
|
+
className: classnames("truncate", {
|
|
162
|
+
"neeto-ui-text-gray-600 text-xs": nameContent,
|
|
163
|
+
"neeto-ui-text-black text-sm font-medium": !nameContent
|
|
164
|
+
}),
|
|
165
|
+
children: filteredBodyContent || bodyContent
|
|
166
|
+
})]
|
|
144
167
|
})]
|
|
145
|
-
},
|
|
168
|
+
}, item.id);
|
|
146
169
|
})
|
|
147
170
|
})
|
|
148
171
|
});
|