@bigbinary/neeto-molecules 1.15.13 → 1.15.15
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/Breadcrumbs.js +2 -1
- package/dist/Breadcrumbs.js.map +1 -1
- package/dist/Header.js +1 -1
- package/dist/Search.js +5 -0
- package/dist/Search.js.map +1 -1
- package/dist/Security.js +1 -1
- package/dist/Taxonomy.js +1 -1
- package/dist/cjs/Breadcrumbs.js +2 -1
- package/dist/cjs/Breadcrumbs.js.map +1 -1
- package/dist/cjs/Header.js +1 -1
- package/dist/cjs/Search.js +5 -0
- package/dist/cjs/Search.js.map +1 -1
- package/dist/cjs/Security.js +1 -1
- package/dist/cjs/Taxonomy.js +1 -1
- package/package.json +1 -1
package/dist/Breadcrumbs.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React__default from 'react';
|
|
2
2
|
import classnames from 'classnames';
|
|
3
|
+
import { hyphenize } from '@bigbinary/neeto-commons-frontend/utils/general';
|
|
3
4
|
import { Typography } from '@bigbinary/neetoui';
|
|
4
5
|
import { Link } from 'react-router-dom';
|
|
5
6
|
import { n } from './inject-css-c86de496.js';
|
|
@@ -27,7 +28,7 @@ var Breadcrumbs = function Breadcrumbs(_ref) {
|
|
|
27
28
|
}, /*#__PURE__*/React__default.createElement(Typography, {
|
|
28
29
|
className: "neeto-ui-text-gray-700 hover:neeto-ui-text-gray-800 neeto-molecules-breadcrumb-link",
|
|
29
30
|
component: "span",
|
|
30
|
-
"data-cy": text,
|
|
31
|
+
"data-cy": "".concat(hyphenize(text), "-breadcrumb"),
|
|
31
32
|
"data-test-id": text,
|
|
32
33
|
style: "body2",
|
|
33
34
|
weight: "normal"
|
package/dist/Breadcrumbs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Breadcrumbs.js","sources":["../src/components/Breadcrumbs/index.jsx"],"sourcesContent":["import React from \"react\";\n\nimport classNames from \"classnames\";\nimport { Typography } from \"neetoui\";\nimport PropTypes from \"prop-types\";\nimport { Link } from \"react-router-dom\";\n\nimport \"./breadcrumbs.scss\";\n\nconst Breadcrumbs = ({\n breadcrumbs,\n hasTrailingSeparator = false,\n className,\n}) => (\n <div className={classNames(\"neeto-molecules-breadcrumbs-wrap\", className)}>\n {breadcrumbs.map(({ text, link = \"#\" }, index) => (\n <div\n className=\"neeto-molecules-breadcrumb\"\n data-cy=\"header-breadcrumb\"\n key={index}\n >\n <Link to={link}>\n <Typography\n className=\"neeto-ui-text-gray-700 hover:neeto-ui-text-gray-800 neeto-molecules-breadcrumb-link\"\n component=\"span\"\n data-cy={text}\n data-test-id={text}\n style=\"body2\"\n weight=\"normal\"\n >\n {text}\n </Typography>\n </Link>\n {(index + 1 !== breadcrumbs.length || hasTrailingSeparator) && (\n <span className=\"neeto-molecules-breadcrumb-separator neeto-ui-text-black\">\n /\n </span>\n )}\n </div>\n ))}\n </div>\n);\n\nBreadcrumbs.propTypes = {\n /**\n * To show breadcrumbs. `text` accepts a text string to be shown as the breadcrumb and `link` accepts relative URL path for the breadcrumb.\n */\n breadcrumbs: PropTypes.arrayOf(\n PropTypes.shape({\n text: PropTypes.string,\n link: PropTypes.string,\n })\n ),\n};\n\nexport default Breadcrumbs;\n"],"names":["Breadcrumbs","_ref","breadcrumbs","_ref$hasTrailingSepar","hasTrailingSeparator","className","React","createElement","classNames","map","_ref2","index","text","_ref2$link","link","key","Link","to","Typography","component","style","weight","length"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Breadcrumbs.js","sources":["../src/components/Breadcrumbs/index.jsx"],"sourcesContent":["import React from \"react\";\n\nimport classNames from \"classnames\";\nimport { hyphenize } from \"neetocommons/utils/general\";\nimport { Typography } from \"neetoui\";\nimport PropTypes from \"prop-types\";\nimport { Link } from \"react-router-dom\";\n\nimport \"./breadcrumbs.scss\";\n\nconst Breadcrumbs = ({\n breadcrumbs,\n hasTrailingSeparator = false,\n className,\n}) => (\n <div className={classNames(\"neeto-molecules-breadcrumbs-wrap\", className)}>\n {breadcrumbs.map(({ text, link = \"#\" }, index) => (\n <div\n className=\"neeto-molecules-breadcrumb\"\n data-cy=\"header-breadcrumb\"\n key={index}\n >\n <Link to={link}>\n <Typography\n className=\"neeto-ui-text-gray-700 hover:neeto-ui-text-gray-800 neeto-molecules-breadcrumb-link\"\n component=\"span\"\n data-cy={`${hyphenize(text)}-breadcrumb`}\n data-test-id={text}\n style=\"body2\"\n weight=\"normal\"\n >\n {text}\n </Typography>\n </Link>\n {(index + 1 !== breadcrumbs.length || hasTrailingSeparator) && (\n <span className=\"neeto-molecules-breadcrumb-separator neeto-ui-text-black\">\n /\n </span>\n )}\n </div>\n ))}\n </div>\n);\n\nBreadcrumbs.propTypes = {\n /**\n * To show breadcrumbs. `text` accepts a text string to be shown as the breadcrumb and `link` accepts relative URL path for the breadcrumb.\n */\n breadcrumbs: PropTypes.arrayOf(\n PropTypes.shape({\n text: PropTypes.string,\n link: PropTypes.string,\n })\n ),\n};\n\nexport default Breadcrumbs;\n"],"names":["Breadcrumbs","_ref","breadcrumbs","_ref$hasTrailingSepar","hasTrailingSeparator","className","React","createElement","classNames","map","_ref2","index","text","_ref2$link","link","key","Link","to","Typography","component","concat","hyphenize","style","weight","length"],"mappings":";;;;;;;;;;AAUA,IAAMA,WAAW,GAAG,SAAdA,WAAWA,CAAAC,IAAA,EAAA;AAAA,EAAA,IACfC,WAAW,GAAAD,IAAA,CAAXC,WAAW;IAAAC,qBAAA,GAAAF,IAAA,CACXG,oBAAoB;AAApBA,IAAAA,oBAAoB,GAAAD,qBAAA,KAAG,KAAA,CAAA,GAAA,KAAK,GAAAA,qBAAA;IAC5BE,SAAS,GAAAJ,IAAA,CAATI,SAAS,CAAA;EAAA,oBAETC,cAAA,CAAAC,aAAA,CAAA,KAAA,EAAA;AAAKF,IAAAA,SAAS,EAAEG,UAAU,CAAC,kCAAkC,EAAEH,SAAS,CAAA;AAAE,GAAA,EACvEH,WAAW,CAACO,GAAG,CAAC,UAAAC,KAAA,EAAuBC,KAAK,EAAA;AAAA,IAAA,IAAzBC,IAAI,GAAAF,KAAA,CAAJE,IAAI;MAAAC,UAAA,GAAAH,KAAA,CAAEI,IAAI;AAAJA,MAAAA,IAAI,GAAAD,UAAA,KAAG,KAAA,CAAA,GAAA,GAAG,GAAAA,UAAA,CAAA;IAAA,oBAClCP,cAAA,CAAAC,aAAA,CAAA,KAAA,EAAA;AACEF,MAAAA,SAAS,EAAC,4BAA4B;AACtC,MAAA,SAAA,EAAQ,mBAAmB;AAC3BU,MAAAA,GAAG,EAAEJ,KAAAA;AAAM,KAAA,eAEXL,cAAA,CAAAC,aAAA,CAACS,IAAI,EAAA;AAACC,MAAAA,EAAE,EAAEH,IAAAA;AAAK,KAAA,eACbR,cAAA,CAAAC,aAAA,CAACW,UAAU,EAAA;AACTb,MAAAA,SAAS,EAAC,qFAAqF;AAC/Fc,MAAAA,SAAS,EAAC,MAAM;AAChB,MAAA,SAAA,EAAA,EAAA,CAAAC,MAAA,CAAYC,SAAS,CAACT,IAAI,CAAC,EAAc,aAAA,CAAA;AACzC,MAAA,cAAA,EAAcA,IAAK;AACnBU,MAAAA,KAAK,EAAC,OAAO;AACbC,MAAAA,MAAM,EAAC,QAAA;AAAQ,KAAA,EAEdX,IACS,CACR,CAAC,EACN,CAACD,KAAK,GAAG,CAAC,KAAKT,WAAW,CAACsB,MAAM,IAAIpB,oBAAoB,kBACxDE,cAAA,CAAAC,aAAA,CAAA,MAAA,EAAA;AAAMF,MAAAA,SAAS,EAAC,0DAAA;KAA2D,EAAA,GAErE,CAEL,CAAC,CAAA;AAAA,GACP,CACE,CAAC,CAAA;AAAA;;;;"}
|
package/dist/Header.js
CHANGED
|
@@ -8,13 +8,13 @@ import Breadcrumbs from './Breadcrumbs.js';
|
|
|
8
8
|
import Search from './Search.js';
|
|
9
9
|
import { MenuHorizontal } from '@bigbinary/neeto-icons';
|
|
10
10
|
import { n } from './inject-css-c86de496.js';
|
|
11
|
+
import '@bigbinary/neeto-commons-frontend/utils/general';
|
|
11
12
|
import 'react-router-dom';
|
|
12
13
|
import './slicedToArray-b4278ecd.js';
|
|
13
14
|
import './objectWithoutProperties-a0edb288.js';
|
|
14
15
|
import '@bigbinary/neeto-commons-frontend/react-utils/useFuncDebounce';
|
|
15
16
|
import '@bigbinary/neeto-commons-frontend/react-utils/useQueryParams';
|
|
16
17
|
import '@bigbinary/neeto-commons-frontend/react-utils/useUpdateEffect';
|
|
17
|
-
import '@bigbinary/neeto-commons-frontend/utils/general';
|
|
18
18
|
import 'ramda';
|
|
19
19
|
import 'react-i18next';
|
|
20
20
|
|
package/dist/Search.js
CHANGED
|
@@ -13,6 +13,10 @@ import { Input } from '@bigbinary/neetoui';
|
|
|
13
13
|
import { mergeLeft } from 'ramda';
|
|
14
14
|
import { useTranslation } from 'react-i18next';
|
|
15
15
|
import { useHistory } from 'react-router-dom';
|
|
16
|
+
import { n } from './inject-css-c86de496.js';
|
|
17
|
+
|
|
18
|
+
var css = ".neeto-molecules-search__wrapper input[type=search]::-webkit-search-cancel-button:hover,.neeto-molecules-search__wrapper input[type=search]::-webkit-search-decoration:hover{cursor:pointer}";
|
|
19
|
+
n(css,{});
|
|
16
20
|
|
|
17
21
|
var _excluded = ["value", "debounceTime", "onSearch", "onChange", "searchParamName"];
|
|
18
22
|
var Search = function Search(_ref) {
|
|
@@ -70,6 +74,7 @@ var Search = function Search(_ref) {
|
|
|
70
74
|
return handleDebouncedSearchTermChange.cancel;
|
|
71
75
|
}, []);
|
|
72
76
|
return /*#__PURE__*/React__default.createElement(Input, _extends({
|
|
77
|
+
className: "neeto-molecules-search__wrapper",
|
|
73
78
|
placeholder: t("neetoMolecules.common.actions.search"),
|
|
74
79
|
prefix: /*#__PURE__*/React__default.createElement(Search$1, null),
|
|
75
80
|
type: "search",
|
package/dist/Search.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Search.js","sources":["../src/components/Search/index.jsx"],"sourcesContent":["import React, { useEffect, useState } from \"react\";\n\nimport { isNotPresent } from \"neetocist\";\nimport useFuncDebounce from \"neetocommons/react-utils/useFuncDebounce\";\nimport useQueryParams from \"neetocommons/react-utils/useQueryParams\";\nimport useUpdateEffect from \"neetocommons/react-utils/useUpdateEffect\";\nimport { buildUrl } from \"neetocommons/utils/general\";\nimport { Search as NeetoUISearchIcon } from \"neetoicons\";\nimport { Input } from \"neetoui\";\nimport PropTypes from \"prop-types\";\nimport { mergeLeft } from \"ramda\";\nimport { useTranslation } from \"react-i18next\";\nimport { useHistory } from \"react-router-dom\";\n\nconst Search = ({\n value,\n debounceTime = 300,\n onSearch,\n onChange,\n searchParamName = \"search_term\",\n ...inputProps\n}) => {\n const { t } = useTranslation();\n const queryParams = useQueryParams({ toCamelCase: false });\n const history = useHistory();\n\n const searchInputValue = (value ?? queryParams?.[searchParamName]) || \"\";\n const [internalValue, setInternalValue] = useState(searchInputValue);\n const trimmedValue = value?.trim();\n\n useUpdateEffect(() => {\n if (isNotPresent(queryParams?.[searchParamName])) setInternalValue(\"\");\n }, [queryParams?.[searchParamName]]);\n\n const handleDebouncedSearchTermChange = useFuncDebounce(trimmedValue => {\n if (onSearch) onSearch(trimmedValue);\n else handleSearchQueryParams(trimmedValue);\n }, debounceTime);\n\n const handleSearchQueryParams = trimmedValue => {\n let searchParams = {};\n\n if (!trimmedValue && !queryParams?.[searchParamName]) return;\n\n if (trimmedValue) searchParams = { [searchParamName]: trimmedValue };\n else delete queryParams?.[searchParamName];\n\n if (trimmedValue !== queryParams?.[searchParamName]) {\n const pathname = window.location.pathname;\n history.push(buildUrl(pathname, mergeLeft(searchParams, queryParams)));\n }\n };\n\n useUpdateEffect(() => {\n handleDebouncedSearchTermChange(trimmedValue);\n }, [trimmedValue]);\n\n if (value !== undefined && internalValue !== value) {\n setInternalValue(value);\n }\n\n const handleOnChange = e => {\n const trimmedValue = e.target.value?.trim();\n onChange?.(e);\n setInternalValue(e.target.value);\n\n if (internalValue?.trim() !== trimmedValue) {\n handleDebouncedSearchTermChange(trimmedValue);\n }\n };\n\n useEffect(() => handleDebouncedSearchTermChange.cancel, []);\n\n return (\n <Input\n placeholder={t(\"neetoMolecules.common.actions.search\")}\n prefix={<NeetoUISearchIcon />}\n type=\"search\"\n value={internalValue}\n onChange={handleOnChange}\n {...inputProps}\n />\n );\n};\n\nSearch.propTypes = {\n /**\n * value for the search (optional).\n */\n value: PropTypes.string,\n /**\n * Time in milliseconds to debounce the search input before triggering a search.\n */\n debounceTime: PropTypes.number,\n /**\n * To specify the function to be triggered when the value is updated (optional).\n */\n onChange: PropTypes.func,\n /**\n * Callback to handle debounced search value without updating the search params.\n */\n onSearch: PropTypes.func,\n /**\n * value for the search param name.\n */\n searchParamName: PropTypes.string,\n /**\n * To override the properties of the Input component.\n */\n inputProps: PropTypes.object,\n};\n\nexport default Search;\n"],"names":["Search","_ref","value","_ref$debounceTime","debounceTime","onSearch","onChange","_ref$searchParamName","searchParamName","inputProps","_objectWithoutProperties","_excluded","_useTranslation","useTranslation","t","queryParams","useQueryParams","toCamelCase","history","useHistory","searchInputValue","_useState","useState","_useState2","_slicedToArray","internalValue","setInternalValue","trimmedValue","trim","useUpdateEffect","isNotPresent","handleDebouncedSearchTermChange","useFuncDebounce","handleSearchQueryParams","searchParams","_defineProperty","pathname","window","location","push","buildUrl","mergeLeft","undefined","handleOnChange","e","_e$target$value","target","useEffect","cancel","React","createElement","Input","_extends","placeholder","prefix","NeetoUISearchIcon","type"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Search.js","sources":["../src/components/Search/index.jsx"],"sourcesContent":["import React, { useEffect, useState } from \"react\";\n\nimport { isNotPresent } from \"neetocist\";\nimport useFuncDebounce from \"neetocommons/react-utils/useFuncDebounce\";\nimport useQueryParams from \"neetocommons/react-utils/useQueryParams\";\nimport useUpdateEffect from \"neetocommons/react-utils/useUpdateEffect\";\nimport { buildUrl } from \"neetocommons/utils/general\";\nimport { Search as NeetoUISearchIcon } from \"neetoicons\";\nimport { Input } from \"neetoui\";\nimport PropTypes from \"prop-types\";\nimport { mergeLeft } from \"ramda\";\nimport { useTranslation } from \"react-i18next\";\nimport { useHistory } from \"react-router-dom\";\n\nimport \"./search.scss\";\n\nconst Search = ({\n value,\n debounceTime = 300,\n onSearch,\n onChange,\n searchParamName = \"search_term\",\n ...inputProps\n}) => {\n const { t } = useTranslation();\n const queryParams = useQueryParams({ toCamelCase: false });\n const history = useHistory();\n\n const searchInputValue = (value ?? queryParams?.[searchParamName]) || \"\";\n const [internalValue, setInternalValue] = useState(searchInputValue);\n const trimmedValue = value?.trim();\n\n useUpdateEffect(() => {\n if (isNotPresent(queryParams?.[searchParamName])) setInternalValue(\"\");\n }, [queryParams?.[searchParamName]]);\n\n const handleDebouncedSearchTermChange = useFuncDebounce(trimmedValue => {\n if (onSearch) onSearch(trimmedValue);\n else handleSearchQueryParams(trimmedValue);\n }, debounceTime);\n\n const handleSearchQueryParams = trimmedValue => {\n let searchParams = {};\n\n if (!trimmedValue && !queryParams?.[searchParamName]) return;\n\n if (trimmedValue) searchParams = { [searchParamName]: trimmedValue };\n else delete queryParams?.[searchParamName];\n\n if (trimmedValue !== queryParams?.[searchParamName]) {\n const pathname = window.location.pathname;\n history.push(buildUrl(pathname, mergeLeft(searchParams, queryParams)));\n }\n };\n\n useUpdateEffect(() => {\n handleDebouncedSearchTermChange(trimmedValue);\n }, [trimmedValue]);\n\n if (value !== undefined && internalValue !== value) {\n setInternalValue(value);\n }\n\n const handleOnChange = e => {\n const trimmedValue = e.target.value?.trim();\n onChange?.(e);\n setInternalValue(e.target.value);\n\n if (internalValue?.trim() !== trimmedValue) {\n handleDebouncedSearchTermChange(trimmedValue);\n }\n };\n\n useEffect(() => handleDebouncedSearchTermChange.cancel, []);\n\n return (\n <Input\n className=\"neeto-molecules-search__wrapper\"\n placeholder={t(\"neetoMolecules.common.actions.search\")}\n prefix={<NeetoUISearchIcon />}\n type=\"search\"\n value={internalValue}\n onChange={handleOnChange}\n {...inputProps}\n />\n );\n};\n\nSearch.propTypes = {\n /**\n * value for the search (optional).\n */\n value: PropTypes.string,\n /**\n * Time in milliseconds to debounce the search input before triggering a search.\n */\n debounceTime: PropTypes.number,\n /**\n * To specify the function to be triggered when the value is updated (optional).\n */\n onChange: PropTypes.func,\n /**\n * Callback to handle debounced search value without updating the search params.\n */\n onSearch: PropTypes.func,\n /**\n * value for the search param name.\n */\n searchParamName: PropTypes.string,\n /**\n * To override the properties of the Input component.\n */\n inputProps: PropTypes.object,\n};\n\nexport default Search;\n"],"names":["Search","_ref","value","_ref$debounceTime","debounceTime","onSearch","onChange","_ref$searchParamName","searchParamName","inputProps","_objectWithoutProperties","_excluded","_useTranslation","useTranslation","t","queryParams","useQueryParams","toCamelCase","history","useHistory","searchInputValue","_useState","useState","_useState2","_slicedToArray","internalValue","setInternalValue","trimmedValue","trim","useUpdateEffect","isNotPresent","handleDebouncedSearchTermChange","useFuncDebounce","handleSearchQueryParams","searchParams","_defineProperty","pathname","window","location","push","buildUrl","mergeLeft","undefined","handleOnChange","e","_e$target$value","target","useEffect","cancel","React","createElement","Input","_extends","className","placeholder","prefix","NeetoUISearchIcon","type"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAgBA,IAAMA,MAAM,GAAG,SAATA,MAAMA,CAAAC,IAAA,EAON;AAAA,EAAA,IANJC,KAAK,GAAAD,IAAA,CAALC,KAAK;IAAAC,iBAAA,GAAAF,IAAA,CACLG,YAAY;AAAZA,IAAAA,YAAY,GAAAD,iBAAA,KAAG,KAAA,CAAA,GAAA,GAAG,GAAAA,iBAAA;IAClBE,QAAQ,GAAAJ,IAAA,CAARI,QAAQ;IACRC,QAAQ,GAAAL,IAAA,CAARK,QAAQ;IAAAC,oBAAA,GAAAN,IAAA,CACRO,eAAe;AAAfA,IAAAA,eAAe,GAAAD,oBAAA,KAAG,KAAA,CAAA,GAAA,aAAa,GAAAA,oBAAA;AAC5BE,IAAAA,UAAU,GAAAC,wBAAA,CAAAT,IAAA,EAAA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
|
import './inject-css-c86de496.js';
|
|
25
25
|
import './extends-093996c9.js';
|
|
26
26
|
import './Breadcrumbs.js';
|
|
27
|
+
import '@bigbinary/neeto-commons-frontend/utils/general';
|
|
27
28
|
import 'react-router-dom';
|
|
28
29
|
import './Search.js';
|
|
29
30
|
import './objectWithoutProperties-a0edb288.js';
|
|
30
31
|
import '@bigbinary/neeto-commons-frontend/react-utils/useFuncDebounce';
|
|
31
32
|
import '@bigbinary/neeto-commons-frontend/react-utils/useQueryParams';
|
|
32
33
|
import '@bigbinary/neeto-commons-frontend/react-utils/useUpdateEffect';
|
|
33
|
-
import '@bigbinary/neeto-commons-frontend/utils/general';
|
|
34
34
|
|
|
35
35
|
var Add = function Add() {
|
|
36
36
|
var _useTranslation = useTranslation(),
|
package/dist/Taxonomy.js
CHANGED
|
@@ -24,13 +24,13 @@ import './inject-css-c86de496.js';
|
|
|
24
24
|
import './extends-093996c9.js';
|
|
25
25
|
import './defineProperty-549061a7.js';
|
|
26
26
|
import './Breadcrumbs.js';
|
|
27
|
+
import '@bigbinary/neeto-commons-frontend/utils/general';
|
|
27
28
|
import 'react-router-dom';
|
|
28
29
|
import './Search.js';
|
|
29
30
|
import './objectWithoutProperties-a0edb288.js';
|
|
30
31
|
import '@bigbinary/neeto-commons-frontend/react-utils/useFuncDebounce';
|
|
31
32
|
import '@bigbinary/neeto-commons-frontend/react-utils/useQueryParams';
|
|
32
33
|
import '@bigbinary/neeto-commons-frontend/react-utils/useUpdateEffect';
|
|
33
|
-
import '@bigbinary/neeto-commons-frontend/utils/general';
|
|
34
34
|
import '@bigbinary/neeto-icons';
|
|
35
35
|
import './Columns-2bdb8579.js';
|
|
36
36
|
import 'zustand';
|
package/dist/cjs/Breadcrumbs.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var React = require('react');
|
|
4
4
|
var classnames = require('classnames');
|
|
5
|
+
var general = require('@bigbinary/neeto-commons-frontend/utils/general');
|
|
5
6
|
var neetoui = require('@bigbinary/neetoui');
|
|
6
7
|
var reactRouterDom = require('react-router-dom');
|
|
7
8
|
var injectCss = require('./inject-css-80a5faa3.js');
|
|
@@ -34,7 +35,7 @@ var Breadcrumbs = function Breadcrumbs(_ref) {
|
|
|
34
35
|
}, /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
35
36
|
className: "neeto-ui-text-gray-700 hover:neeto-ui-text-gray-800 neeto-molecules-breadcrumb-link",
|
|
36
37
|
component: "span",
|
|
37
|
-
"data-cy": text,
|
|
38
|
+
"data-cy": "".concat(general.hyphenize(text), "-breadcrumb"),
|
|
38
39
|
"data-test-id": text,
|
|
39
40
|
style: "body2",
|
|
40
41
|
weight: "normal"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Breadcrumbs.js","sources":["../../src/components/Breadcrumbs/index.jsx"],"sourcesContent":["import React from \"react\";\n\nimport classNames from \"classnames\";\nimport { Typography } from \"neetoui\";\nimport PropTypes from \"prop-types\";\nimport { Link } from \"react-router-dom\";\n\nimport \"./breadcrumbs.scss\";\n\nconst Breadcrumbs = ({\n breadcrumbs,\n hasTrailingSeparator = false,\n className,\n}) => (\n <div className={classNames(\"neeto-molecules-breadcrumbs-wrap\", className)}>\n {breadcrumbs.map(({ text, link = \"#\" }, index) => (\n <div\n className=\"neeto-molecules-breadcrumb\"\n data-cy=\"header-breadcrumb\"\n key={index}\n >\n <Link to={link}>\n <Typography\n className=\"neeto-ui-text-gray-700 hover:neeto-ui-text-gray-800 neeto-molecules-breadcrumb-link\"\n component=\"span\"\n data-cy={text}\n data-test-id={text}\n style=\"body2\"\n weight=\"normal\"\n >\n {text}\n </Typography>\n </Link>\n {(index + 1 !== breadcrumbs.length || hasTrailingSeparator) && (\n <span className=\"neeto-molecules-breadcrumb-separator neeto-ui-text-black\">\n /\n </span>\n )}\n </div>\n ))}\n </div>\n);\n\nBreadcrumbs.propTypes = {\n /**\n * To show breadcrumbs. `text` accepts a text string to be shown as the breadcrumb and `link` accepts relative URL path for the breadcrumb.\n */\n breadcrumbs: PropTypes.arrayOf(\n PropTypes.shape({\n text: PropTypes.string,\n link: PropTypes.string,\n })\n ),\n};\n\nexport default Breadcrumbs;\n"],"names":["Breadcrumbs","_ref","breadcrumbs","_ref$hasTrailingSepar","hasTrailingSeparator","className","React","createElement","classNames","map","_ref2","index","text","_ref2$link","link","key","Link","to","Typography","component","style","weight","length"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Breadcrumbs.js","sources":["../../src/components/Breadcrumbs/index.jsx"],"sourcesContent":["import React from \"react\";\n\nimport classNames from \"classnames\";\nimport { hyphenize } from \"neetocommons/utils/general\";\nimport { Typography } from \"neetoui\";\nimport PropTypes from \"prop-types\";\nimport { Link } from \"react-router-dom\";\n\nimport \"./breadcrumbs.scss\";\n\nconst Breadcrumbs = ({\n breadcrumbs,\n hasTrailingSeparator = false,\n className,\n}) => (\n <div className={classNames(\"neeto-molecules-breadcrumbs-wrap\", className)}>\n {breadcrumbs.map(({ text, link = \"#\" }, index) => (\n <div\n className=\"neeto-molecules-breadcrumb\"\n data-cy=\"header-breadcrumb\"\n key={index}\n >\n <Link to={link}>\n <Typography\n className=\"neeto-ui-text-gray-700 hover:neeto-ui-text-gray-800 neeto-molecules-breadcrumb-link\"\n component=\"span\"\n data-cy={`${hyphenize(text)}-breadcrumb`}\n data-test-id={text}\n style=\"body2\"\n weight=\"normal\"\n >\n {text}\n </Typography>\n </Link>\n {(index + 1 !== breadcrumbs.length || hasTrailingSeparator) && (\n <span className=\"neeto-molecules-breadcrumb-separator neeto-ui-text-black\">\n /\n </span>\n )}\n </div>\n ))}\n </div>\n);\n\nBreadcrumbs.propTypes = {\n /**\n * To show breadcrumbs. `text` accepts a text string to be shown as the breadcrumb and `link` accepts relative URL path for the breadcrumb.\n */\n breadcrumbs: PropTypes.arrayOf(\n PropTypes.shape({\n text: PropTypes.string,\n link: PropTypes.string,\n })\n ),\n};\n\nexport default Breadcrumbs;\n"],"names":["Breadcrumbs","_ref","breadcrumbs","_ref$hasTrailingSepar","hasTrailingSeparator","className","React","createElement","classNames","map","_ref2","index","text","_ref2$link","link","key","Link","to","Typography","component","concat","hyphenize","style","weight","length"],"mappings":";;;;;;;;;;;;;;;;;AAUA,IAAMA,WAAW,GAAG,SAAdA,WAAWA,CAAAC,IAAA,EAAA;AAAA,EAAA,IACfC,WAAW,GAAAD,IAAA,CAAXC,WAAW;IAAAC,qBAAA,GAAAF,IAAA,CACXG,oBAAoB;AAApBA,IAAAA,oBAAoB,GAAAD,qBAAA,KAAG,KAAA,CAAA,GAAA,KAAK,GAAAA,qBAAA;IAC5BE,SAAS,GAAAJ,IAAA,CAATI,SAAS,CAAA;EAAA,oBAETC,yBAAA,CAAAC,aAAA,CAAA,KAAA,EAAA;AAAKF,IAAAA,SAAS,EAAEG,8BAAU,CAAC,kCAAkC,EAAEH,SAAS,CAAA;AAAE,GAAA,EACvEH,WAAW,CAACO,GAAG,CAAC,UAAAC,KAAA,EAAuBC,KAAK,EAAA;AAAA,IAAA,IAAzBC,IAAI,GAAAF,KAAA,CAAJE,IAAI;MAAAC,UAAA,GAAAH,KAAA,CAAEI,IAAI;AAAJA,MAAAA,IAAI,GAAAD,UAAA,KAAG,KAAA,CAAA,GAAA,GAAG,GAAAA,UAAA,CAAA;IAAA,oBAClCP,yBAAA,CAAAC,aAAA,CAAA,KAAA,EAAA;AACEF,MAAAA,SAAS,EAAC,4BAA4B;AACtC,MAAA,SAAA,EAAQ,mBAAmB;AAC3BU,MAAAA,GAAG,EAAEJ,KAAAA;AAAM,KAAA,eAEXL,yBAAA,CAAAC,aAAA,CAACS,mBAAI,EAAA;AAACC,MAAAA,EAAE,EAAEH,IAAAA;AAAK,KAAA,eACbR,yBAAA,CAAAC,aAAA,CAACW,kBAAU,EAAA;AACTb,MAAAA,SAAS,EAAC,qFAAqF;AAC/Fc,MAAAA,SAAS,EAAC,MAAM;AAChB,MAAA,SAAA,EAAA,EAAA,CAAAC,MAAA,CAAYC,iBAAS,CAACT,IAAI,CAAC,EAAc,aAAA,CAAA;AACzC,MAAA,cAAA,EAAcA,IAAK;AACnBU,MAAAA,KAAK,EAAC,OAAO;AACbC,MAAAA,MAAM,EAAC,QAAA;AAAQ,KAAA,EAEdX,IACS,CACR,CAAC,EACN,CAACD,KAAK,GAAG,CAAC,KAAKT,WAAW,CAACsB,MAAM,IAAIpB,oBAAoB,kBACxDE,yBAAA,CAAAC,aAAA,CAAA,MAAA,EAAA;AAAMF,MAAAA,SAAS,EAAC,0DAAA;KAA2D,EAAA,GAErE,CAEL,CAAC,CAAA;AAAA,GACP,CACE,CAAC,CAAA;AAAA;;;;"}
|
package/dist/cjs/Header.js
CHANGED
|
@@ -10,13 +10,13 @@ var Breadcrumbs = require('./Breadcrumbs.js');
|
|
|
10
10
|
var Search = require('./Search.js');
|
|
11
11
|
var neetoIcons = require('@bigbinary/neeto-icons');
|
|
12
12
|
var injectCss = require('./inject-css-80a5faa3.js');
|
|
13
|
+
require('@bigbinary/neeto-commons-frontend/utils/general');
|
|
13
14
|
require('react-router-dom');
|
|
14
15
|
require('./slicedToArray-f320d9e7.js');
|
|
15
16
|
require('./objectWithoutProperties-2fed2d7d.js');
|
|
16
17
|
require('@bigbinary/neeto-commons-frontend/react-utils/useFuncDebounce');
|
|
17
18
|
require('@bigbinary/neeto-commons-frontend/react-utils/useQueryParams');
|
|
18
19
|
require('@bigbinary/neeto-commons-frontend/react-utils/useUpdateEffect');
|
|
19
|
-
require('@bigbinary/neeto-commons-frontend/utils/general');
|
|
20
20
|
require('ramda');
|
|
21
21
|
require('react-i18next');
|
|
22
22
|
|
package/dist/cjs/Search.js
CHANGED
|
@@ -15,6 +15,7 @@ var neetoui = require('@bigbinary/neetoui');
|
|
|
15
15
|
var ramda = require('ramda');
|
|
16
16
|
var reactI18next = require('react-i18next');
|
|
17
17
|
var reactRouterDom = require('react-router-dom');
|
|
18
|
+
var injectCss = require('./inject-css-80a5faa3.js');
|
|
18
19
|
|
|
19
20
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
20
21
|
|
|
@@ -23,6 +24,9 @@ var useFuncDebounce__default = /*#__PURE__*/_interopDefaultLegacy(useFuncDebounc
|
|
|
23
24
|
var useQueryParams__default = /*#__PURE__*/_interopDefaultLegacy(useQueryParams);
|
|
24
25
|
var useUpdateEffect__default = /*#__PURE__*/_interopDefaultLegacy(useUpdateEffect);
|
|
25
26
|
|
|
27
|
+
var css = ".neeto-molecules-search__wrapper input[type=search]::-webkit-search-cancel-button:hover,.neeto-molecules-search__wrapper input[type=search]::-webkit-search-decoration:hover{cursor:pointer}";
|
|
28
|
+
injectCss.n(css,{});
|
|
29
|
+
|
|
26
30
|
var _excluded = ["value", "debounceTime", "onSearch", "onChange", "searchParamName"];
|
|
27
31
|
var Search = function Search(_ref) {
|
|
28
32
|
var value = _ref.value,
|
|
@@ -79,6 +83,7 @@ var Search = function Search(_ref) {
|
|
|
79
83
|
return handleDebouncedSearchTermChange.cancel;
|
|
80
84
|
}, []);
|
|
81
85
|
return /*#__PURE__*/React__default["default"].createElement(neetoui.Input, _extends._extends({
|
|
86
|
+
className: "neeto-molecules-search__wrapper",
|
|
82
87
|
placeholder: t("neetoMolecules.common.actions.search"),
|
|
83
88
|
prefix: /*#__PURE__*/React__default["default"].createElement(neetoIcons.Search, null),
|
|
84
89
|
type: "search",
|
package/dist/cjs/Search.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Search.js","sources":["../../src/components/Search/index.jsx"],"sourcesContent":["import React, { useEffect, useState } from \"react\";\n\nimport { isNotPresent } from \"neetocist\";\nimport useFuncDebounce from \"neetocommons/react-utils/useFuncDebounce\";\nimport useQueryParams from \"neetocommons/react-utils/useQueryParams\";\nimport useUpdateEffect from \"neetocommons/react-utils/useUpdateEffect\";\nimport { buildUrl } from \"neetocommons/utils/general\";\nimport { Search as NeetoUISearchIcon } from \"neetoicons\";\nimport { Input } from \"neetoui\";\nimport PropTypes from \"prop-types\";\nimport { mergeLeft } from \"ramda\";\nimport { useTranslation } from \"react-i18next\";\nimport { useHistory } from \"react-router-dom\";\n\nconst Search = ({\n value,\n debounceTime = 300,\n onSearch,\n onChange,\n searchParamName = \"search_term\",\n ...inputProps\n}) => {\n const { t } = useTranslation();\n const queryParams = useQueryParams({ toCamelCase: false });\n const history = useHistory();\n\n const searchInputValue = (value ?? queryParams?.[searchParamName]) || \"\";\n const [internalValue, setInternalValue] = useState(searchInputValue);\n const trimmedValue = value?.trim();\n\n useUpdateEffect(() => {\n if (isNotPresent(queryParams?.[searchParamName])) setInternalValue(\"\");\n }, [queryParams?.[searchParamName]]);\n\n const handleDebouncedSearchTermChange = useFuncDebounce(trimmedValue => {\n if (onSearch) onSearch(trimmedValue);\n else handleSearchQueryParams(trimmedValue);\n }, debounceTime);\n\n const handleSearchQueryParams = trimmedValue => {\n let searchParams = {};\n\n if (!trimmedValue && !queryParams?.[searchParamName]) return;\n\n if (trimmedValue) searchParams = { [searchParamName]: trimmedValue };\n else delete queryParams?.[searchParamName];\n\n if (trimmedValue !== queryParams?.[searchParamName]) {\n const pathname = window.location.pathname;\n history.push(buildUrl(pathname, mergeLeft(searchParams, queryParams)));\n }\n };\n\n useUpdateEffect(() => {\n handleDebouncedSearchTermChange(trimmedValue);\n }, [trimmedValue]);\n\n if (value !== undefined && internalValue !== value) {\n setInternalValue(value);\n }\n\n const handleOnChange = e => {\n const trimmedValue = e.target.value?.trim();\n onChange?.(e);\n setInternalValue(e.target.value);\n\n if (internalValue?.trim() !== trimmedValue) {\n handleDebouncedSearchTermChange(trimmedValue);\n }\n };\n\n useEffect(() => handleDebouncedSearchTermChange.cancel, []);\n\n return (\n <Input\n placeholder={t(\"neetoMolecules.common.actions.search\")}\n prefix={<NeetoUISearchIcon />}\n type=\"search\"\n value={internalValue}\n onChange={handleOnChange}\n {...inputProps}\n />\n );\n};\n\nSearch.propTypes = {\n /**\n * value for the search (optional).\n */\n value: PropTypes.string,\n /**\n * Time in milliseconds to debounce the search input before triggering a search.\n */\n debounceTime: PropTypes.number,\n /**\n * To specify the function to be triggered when the value is updated (optional).\n */\n onChange: PropTypes.func,\n /**\n * Callback to handle debounced search value without updating the search params.\n */\n onSearch: PropTypes.func,\n /**\n * value for the search param name.\n */\n searchParamName: PropTypes.string,\n /**\n * To override the properties of the Input component.\n */\n inputProps: PropTypes.object,\n};\n\nexport default Search;\n"],"names":["Search","_ref","value","_ref$debounceTime","debounceTime","onSearch","onChange","_ref$searchParamName","searchParamName","inputProps","_objectWithoutProperties","_excluded","_useTranslation","useTranslation","t","queryParams","useQueryParams","toCamelCase","history","useHistory","searchInputValue","_useState","useState","_useState2","_slicedToArray","internalValue","setInternalValue","trimmedValue","trim","useUpdateEffect","isNotPresent","handleDebouncedSearchTermChange","useFuncDebounce","handleSearchQueryParams","searchParams","_defineProperty","pathname","window","location","push","buildUrl","mergeLeft","undefined","handleOnChange","e","_e$target$value","target","useEffect","cancel","React","createElement","Input","_extends","placeholder","prefix","NeetoUISearchIcon","type"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Search.js","sources":["../../src/components/Search/index.jsx"],"sourcesContent":["import React, { useEffect, useState } from \"react\";\n\nimport { isNotPresent } from \"neetocist\";\nimport useFuncDebounce from \"neetocommons/react-utils/useFuncDebounce\";\nimport useQueryParams from \"neetocommons/react-utils/useQueryParams\";\nimport useUpdateEffect from \"neetocommons/react-utils/useUpdateEffect\";\nimport { buildUrl } from \"neetocommons/utils/general\";\nimport { Search as NeetoUISearchIcon } from \"neetoicons\";\nimport { Input } from \"neetoui\";\nimport PropTypes from \"prop-types\";\nimport { mergeLeft } from \"ramda\";\nimport { useTranslation } from \"react-i18next\";\nimport { useHistory } from \"react-router-dom\";\n\nimport \"./search.scss\";\n\nconst Search = ({\n value,\n debounceTime = 300,\n onSearch,\n onChange,\n searchParamName = \"search_term\",\n ...inputProps\n}) => {\n const { t } = useTranslation();\n const queryParams = useQueryParams({ toCamelCase: false });\n const history = useHistory();\n\n const searchInputValue = (value ?? queryParams?.[searchParamName]) || \"\";\n const [internalValue, setInternalValue] = useState(searchInputValue);\n const trimmedValue = value?.trim();\n\n useUpdateEffect(() => {\n if (isNotPresent(queryParams?.[searchParamName])) setInternalValue(\"\");\n }, [queryParams?.[searchParamName]]);\n\n const handleDebouncedSearchTermChange = useFuncDebounce(trimmedValue => {\n if (onSearch) onSearch(trimmedValue);\n else handleSearchQueryParams(trimmedValue);\n }, debounceTime);\n\n const handleSearchQueryParams = trimmedValue => {\n let searchParams = {};\n\n if (!trimmedValue && !queryParams?.[searchParamName]) return;\n\n if (trimmedValue) searchParams = { [searchParamName]: trimmedValue };\n else delete queryParams?.[searchParamName];\n\n if (trimmedValue !== queryParams?.[searchParamName]) {\n const pathname = window.location.pathname;\n history.push(buildUrl(pathname, mergeLeft(searchParams, queryParams)));\n }\n };\n\n useUpdateEffect(() => {\n handleDebouncedSearchTermChange(trimmedValue);\n }, [trimmedValue]);\n\n if (value !== undefined && internalValue !== value) {\n setInternalValue(value);\n }\n\n const handleOnChange = e => {\n const trimmedValue = e.target.value?.trim();\n onChange?.(e);\n setInternalValue(e.target.value);\n\n if (internalValue?.trim() !== trimmedValue) {\n handleDebouncedSearchTermChange(trimmedValue);\n }\n };\n\n useEffect(() => handleDebouncedSearchTermChange.cancel, []);\n\n return (\n <Input\n className=\"neeto-molecules-search__wrapper\"\n placeholder={t(\"neetoMolecules.common.actions.search\")}\n prefix={<NeetoUISearchIcon />}\n type=\"search\"\n value={internalValue}\n onChange={handleOnChange}\n {...inputProps}\n />\n );\n};\n\nSearch.propTypes = {\n /**\n * value for the search (optional).\n */\n value: PropTypes.string,\n /**\n * Time in milliseconds to debounce the search input before triggering a search.\n */\n debounceTime: PropTypes.number,\n /**\n * To specify the function to be triggered when the value is updated (optional).\n */\n onChange: PropTypes.func,\n /**\n * Callback to handle debounced search value without updating the search params.\n */\n onSearch: PropTypes.func,\n /**\n * value for the search param name.\n */\n searchParamName: PropTypes.string,\n /**\n * To override the properties of the Input component.\n */\n inputProps: PropTypes.object,\n};\n\nexport default Search;\n"],"names":["Search","_ref","value","_ref$debounceTime","debounceTime","onSearch","onChange","_ref$searchParamName","searchParamName","inputProps","_objectWithoutProperties","_excluded","_useTranslation","useTranslation","t","queryParams","useQueryParams","toCamelCase","history","useHistory","searchInputValue","_useState","useState","_useState2","_slicedToArray","internalValue","setInternalValue","trimmedValue","trim","useUpdateEffect","isNotPresent","handleDebouncedSearchTermChange","useFuncDebounce","handleSearchQueryParams","searchParams","_defineProperty","pathname","window","location","push","buildUrl","mergeLeft","undefined","handleOnChange","e","_e$target$value","target","useEffect","cancel","React","createElement","Input","_extends","className","placeholder","prefix","NeetoUISearchIcon","type"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgBA,IAAMA,MAAM,GAAG,SAATA,MAAMA,CAAAC,IAAA,EAON;AAAA,EAAA,IANJC,KAAK,GAAAD,IAAA,CAALC,KAAK;IAAAC,iBAAA,GAAAF,IAAA,CACLG,YAAY;AAAZA,IAAAA,YAAY,GAAAD,iBAAA,KAAG,KAAA,CAAA,GAAA,GAAG,GAAAA,iBAAA;IAClBE,QAAQ,GAAAJ,IAAA,CAARI,QAAQ;IACRC,QAAQ,GAAAL,IAAA,CAARK,QAAQ;IAAAC,oBAAA,GAAAN,IAAA,CACRO,eAAe;AAAfA,IAAAA,eAAe,GAAAD,oBAAA,KAAG,KAAA,CAAA,GAAA,aAAa,GAAAA,oBAAA;AAC5BE,IAAAA,UAAU,GAAAC,gDAAA,CAAAT,IAAA,EAAAU,SAAA,CAAA,CAAA;AAEb,EAAA,IAAAC,eAAA,GAAcC,2BAAc,EAAE;IAAtBC,CAAC,GAAAF,eAAA,CAADE,CAAC,CAAA;EACT,IAAMC,WAAW,GAAGC,kCAAc,CAAC;AAAEC,IAAAA,WAAW,EAAE,KAAA;AAAM,GAAC,CAAC,CAAA;AAC1D,EAAA,IAAMC,OAAO,GAAGC,yBAAU,EAAE,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E,CAAA;AAC3CtB,IAAAA,QAAQ,aAARA,QAAQ,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAARA,QAAQ,CAAGsC,CAAC,CAAC,CAAA;AACblB,IAAAA,gBAAgB,CAACkB,CAAC,CAACE,MAAM,CAAC5C,KAAK,CAAC,CAAA;AAEhC,IAAA,IAAI,CAAAuB,aAAa,KAAbA,IAAAA,IAAAA,aAAa,KAAbA,KAAAA,CAAAA,GAAAA,KAAAA,CAAAA,GAAAA,aAAa,CAAEG,IAAI,EAAE,MAAKD,YAAY,EAAE;MAC1CI,+BAA+B,CAACJ,YAAY,CAAC,CAAA;AAC/C,KAAA;GACD,CAAA;AAEDoB,EAAAA,eAAS,CAAC,YAAA;IAAA,OAAMhB,+BAA+B,CAACiB,MAAM,CAAA;AAAA,GAAA,EAAE,EAAE,CAAC,CAAA;AAE3D,EAAA,oBACEC,yBAAA,CAAAC,aAAA,CAACC,aAAK,EAAAC,iBAAA,CAAA;AACJC,IAAAA,SAAS,EAAC,iCAAiC;AAC3CC,IAAAA,WAAW,EAAExC,CAAC,CAAC,sCAAsC,CAAE;AACvDyC,IAAAA,MAAM,eAAEN,yBAAA,CAAAC,aAAA,CAACM,iBAAiB,MAAE,CAAE;AAC9BC,IAAAA,IAAI,EAAC,QAAQ;AACbvD,IAAAA,KAAK,EAAEuB,aAAc;AACrBnB,IAAAA,QAAQ,EAAEqC,cAAAA;GACNlC,EAAAA,UAAU,CACf,CAAC,CAAA;AAEN;;;;"}
|
package/dist/cjs/Security.js
CHANGED
|
@@ -26,13 +26,13 @@ require('./index-248c4f4c.js');
|
|
|
26
26
|
require('./inject-css-80a5faa3.js');
|
|
27
27
|
require('./extends-1b35a664.js');
|
|
28
28
|
require('./Breadcrumbs.js');
|
|
29
|
+
require('@bigbinary/neeto-commons-frontend/utils/general');
|
|
29
30
|
require('react-router-dom');
|
|
30
31
|
require('./Search.js');
|
|
31
32
|
require('./objectWithoutProperties-2fed2d7d.js');
|
|
32
33
|
require('@bigbinary/neeto-commons-frontend/react-utils/useFuncDebounce');
|
|
33
34
|
require('@bigbinary/neeto-commons-frontend/react-utils/useQueryParams');
|
|
34
35
|
require('@bigbinary/neeto-commons-frontend/react-utils/useUpdateEffect');
|
|
35
|
-
require('@bigbinary/neeto-commons-frontend/utils/general');
|
|
36
36
|
|
|
37
37
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
38
38
|
|
package/dist/cjs/Taxonomy.js
CHANGED
|
@@ -26,13 +26,13 @@ require('./inject-css-80a5faa3.js');
|
|
|
26
26
|
require('./extends-1b35a664.js');
|
|
27
27
|
require('./defineProperty-886ed289.js');
|
|
28
28
|
require('./Breadcrumbs.js');
|
|
29
|
+
require('@bigbinary/neeto-commons-frontend/utils/general');
|
|
29
30
|
require('react-router-dom');
|
|
30
31
|
require('./Search.js');
|
|
31
32
|
require('./objectWithoutProperties-2fed2d7d.js');
|
|
32
33
|
require('@bigbinary/neeto-commons-frontend/react-utils/useFuncDebounce');
|
|
33
34
|
require('@bigbinary/neeto-commons-frontend/react-utils/useQueryParams');
|
|
34
35
|
require('@bigbinary/neeto-commons-frontend/react-utils/useUpdateEffect');
|
|
35
|
-
require('@bigbinary/neeto-commons-frontend/utils/general');
|
|
36
36
|
require('@bigbinary/neeto-icons');
|
|
37
37
|
require('./Columns-6b710238.js');
|
|
38
38
|
require('zustand');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bigbinary/neeto-molecules",
|
|
3
|
-
"version": "1.15.
|
|
3
|
+
"version": "1.15.15",
|
|
4
4
|
"description": "A package of reusable molecular components for neeto products.",
|
|
5
5
|
"repository": "git@github.com:bigbinary/neeto-molecules.git",
|
|
6
6
|
"author": "Amaljith K <amaljith.k@bigbinary.com>",
|