@bigbinary/neeto-molecules 4.1.50 → 4.1.52
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/CalendarView.js +2 -1
- package/dist/CalendarView.js.map +1 -1
- package/dist/{Columns-BB50-jks.js → Columns-D68XA-e7.js} +2 -53
- package/dist/Columns-D68XA-e7.js.map +1 -0
- package/dist/Columns-cUgR6NTO.js +502 -0
- package/dist/Columns-cUgR6NTO.js.map +1 -0
- package/dist/Columns.js +2 -1
- package/dist/Columns.js.map +1 -1
- package/dist/StatusDropdown.js +1 -0
- package/dist/StatusDropdown.js.map +1 -1
- package/dist/SubHeader.js +2 -1
- package/dist/SubHeader.js.map +1 -1
- package/dist/Taxonomy.js +2 -1
- package/dist/Taxonomy.js.map +1 -1
- package/dist/circle-question-mark-Dib48f5Z.js +19 -0
- package/dist/circle-question-mark-Dib48f5Z.js.map +1 -0
- package/dist/cjs/CalendarView.js +2 -1
- package/dist/cjs/CalendarView.js.map +1 -1
- package/dist/cjs/{Columns-jm_CUnLP.js → Columns-BACqpEQU.js} +3 -54
- package/dist/cjs/Columns-BACqpEQU.js.map +1 -0
- package/dist/cjs/Columns-D3eocaeY.js +508 -0
- package/dist/cjs/Columns-D3eocaeY.js.map +1 -0
- package/dist/cjs/Columns.js +2 -1
- package/dist/cjs/Columns.js.map +1 -1
- package/dist/cjs/StatusDropdown.js +1 -0
- package/dist/cjs/StatusDropdown.js.map +1 -1
- package/dist/cjs/SubHeader.js +2 -1
- package/dist/cjs/SubHeader.js.map +1 -1
- package/dist/cjs/Taxonomy.js +2 -1
- package/dist/cjs/Taxonomy.js.map +1 -1
- package/dist/cjs/circle-question-mark-kxBMPyWQ.js +21 -0
- package/dist/cjs/circle-question-mark-kxBMPyWQ.js.map +1 -0
- package/dist/cjs/ellipsis-BcfLTtl5.js +21 -0
- package/dist/cjs/ellipsis-BcfLTtl5.js.map +1 -0
- package/dist/cjs/utilities.esm-jwIHISzF.js +58 -0
- package/dist/cjs/utilities.esm-jwIHISzF.js.map +1 -0
- package/dist/cjs/v2/Breadcrumbs.js +50 -0
- package/dist/cjs/v2/Breadcrumbs.js.map +1 -0
- package/dist/cjs/v2/Columns.js +34 -0
- package/dist/cjs/v2/Columns.js.map +1 -0
- package/dist/cjs/v2/Container.js +34 -0
- package/dist/cjs/v2/Container.js.map +1 -0
- package/dist/cjs/v2/FloatingActionMenu.js +10 -24
- package/dist/cjs/v2/FloatingActionMenu.js.map +1 -1
- package/dist/cjs/v2/Header.js +128 -0
- package/dist/cjs/v2/Header.js.map +1 -0
- package/dist/cjs/v2/HelpPopover.js +93 -0
- package/dist/cjs/v2/HelpPopover.js.map +1 -0
- package/dist/cjs/v2/MoreDropdown.js +201 -0
- package/dist/cjs/v2/MoreDropdown.js.map +1 -0
- package/dist/cjs/v2/Search.js +129 -0
- package/dist/cjs/v2/Search.js.map +1 -0
- package/dist/cjs/v2/Sidebar.js +3 -17
- package/dist/cjs/v2/Sidebar.js.map +1 -1
- package/dist/cjs/v2/SubHeader.js +246 -0
- package/dist/cjs/v2/SubHeader.js.map +1 -0
- package/dist/ellipsis-DpI9xqUK.js +19 -0
- package/dist/ellipsis-DpI9xqUK.js.map +1 -0
- package/dist/utilities.esm-CS21Daln.js +56 -0
- package/dist/utilities.esm-CS21Daln.js.map +1 -0
- package/dist/v2/Breadcrumbs.js +48 -0
- package/dist/v2/Breadcrumbs.js.map +1 -0
- package/dist/v2/Columns.js +22 -0
- package/dist/v2/Columns.js.map +1 -0
- package/dist/v2/Container.js +32 -0
- package/dist/v2/Container.js.map +1 -0
- package/dist/v2/FloatingActionMenu.js +8 -22
- package/dist/v2/FloatingActionMenu.js.map +1 -1
- package/dist/v2/Header.js +126 -0
- package/dist/v2/Header.js.map +1 -0
- package/dist/v2/HelpPopover.js +91 -0
- package/dist/v2/HelpPopover.js.map +1 -0
- package/dist/v2/MoreDropdown.js +199 -0
- package/dist/v2/MoreDropdown.js.map +1 -0
- package/dist/v2/Search.js +127 -0
- package/dist/v2/Search.js.map +1 -0
- package/dist/v2/Sidebar.js +2 -16
- package/dist/v2/Sidebar.js.map +1 -1
- package/dist/v2/SubHeader.js +244 -0
- package/dist/v2/SubHeader.js.map +1 -0
- package/package.json +1 -1
- package/types/v2/Breadcrumbs.d.ts +12 -0
- package/types/v2/Columns.d.ts +42 -0
- package/types/v2/Container.d.ts +8 -0
- package/types/v2/Header.d.ts +22 -0
- package/types/v2/HelpPopover.d.ts +23 -0
- package/types/v2/MoreDropdown.d.ts +42 -0
- package/types/v2/Search.d.ts +16 -0
- package/types/v2/SubHeader.d.ts +51 -0
- package/dist/Columns-BB50-jks.js.map +0 -1
- package/dist/cjs/Columns-jm_CUnLP.js.map +0 -1
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
|
|
4
|
+
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
5
|
+
var React = require('react');
|
|
6
|
+
var neetoAtoms = require('@bigbinary/neeto-atoms');
|
|
7
|
+
var classnames = require('classnames');
|
|
8
|
+
var neetoCist = require('@bigbinary/neeto-cist');
|
|
9
|
+
var v2_Breadcrumbs = require('./Breadcrumbs.js');
|
|
10
|
+
var v2_HelpPopover = require('./HelpPopover.js');
|
|
11
|
+
var v2_MoreDropdown = require('./MoreDropdown.js');
|
|
12
|
+
var v2_Search = require('./Search.js');
|
|
13
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
14
|
+
require('@bigbinary/neeto-commons-frontend/react-utils');
|
|
15
|
+
require('@bigbinary/neeto-commons-frontend/utils/general');
|
|
16
|
+
require('react-router-dom');
|
|
17
|
+
require('../circle-question-mark-kxBMPyWQ.js');
|
|
18
|
+
require('../createLucideIcon-DBDhE7kE.js');
|
|
19
|
+
require('ramda');
|
|
20
|
+
require('react-i18next');
|
|
21
|
+
require('../ellipsis-BcfLTtl5.js');
|
|
22
|
+
require('@babel/runtime/helpers/slicedToArray');
|
|
23
|
+
require('@bigbinary/neeto-commons-frontend/react-utils/useFuncDebounce');
|
|
24
|
+
require('@bigbinary/neeto-commons-frontend/react-utils/useQueryParams');
|
|
25
|
+
require('@bigbinary/neeto-commons-frontend/react-utils/useUpdateEffect');
|
|
26
|
+
require('@bigbinary/neeto-commons-frontend/utils');
|
|
27
|
+
require('../search-BBuFYdmG.js');
|
|
28
|
+
|
|
29
|
+
var SIZES = {
|
|
30
|
+
nano: "nano",
|
|
31
|
+
small: "small"
|
|
32
|
+
};
|
|
33
|
+
var DROPDOWN_BUTTON_SIZES = {
|
|
34
|
+
nano: "small",
|
|
35
|
+
small: "medium"
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
var _excluded = ["dropdownButtonProps"];
|
|
39
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
40
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
41
|
+
var Header = function Header(_ref) {
|
|
42
|
+
var title = _ref.title,
|
|
43
|
+
_ref$titleHelpPopover = _ref.titleHelpPopoverProps,
|
|
44
|
+
titleHelpPopoverProps = _ref$titleHelpPopover === void 0 ? {} : _ref$titleHelpPopover,
|
|
45
|
+
searchProps = _ref.searchProps,
|
|
46
|
+
_ref$className = _ref.className,
|
|
47
|
+
className = _ref$className === void 0 ? "" : _ref$className,
|
|
48
|
+
actionBlock = _ref.actionBlock,
|
|
49
|
+
_ref$breadcrumbs = _ref.breadcrumbs,
|
|
50
|
+
breadcrumbs = _ref$breadcrumbs === void 0 ? [] : _ref$breadcrumbs,
|
|
51
|
+
_ref$renderDropdown = _ref.renderDropdown,
|
|
52
|
+
renderDropdown = _ref$renderDropdown === void 0 ? neetoCist.noop : _ref$renderDropdown,
|
|
53
|
+
_ref$size = _ref.size,
|
|
54
|
+
size = _ref$size === void 0 ? "small" : _ref$size,
|
|
55
|
+
_ref$dataTestid = _ref["data-testid"],
|
|
56
|
+
dataTestId = _ref$dataTestid === void 0 ? "neeto-molecules-header" : _ref$dataTestid;
|
|
57
|
+
var headerRef = React.useRef(null);
|
|
58
|
+
React.useLayoutEffect(function () {
|
|
59
|
+
var updateHeaderHeight = function updateHeaderHeight() {
|
|
60
|
+
if (!headerRef.current) return;
|
|
61
|
+
var height = headerRef.current.offsetHeight;
|
|
62
|
+
document.body.style.setProperty("--neeto-molecules-effective-header-height", "".concat(height, "px"));
|
|
63
|
+
};
|
|
64
|
+
updateHeaderHeight();
|
|
65
|
+
window.addEventListener("resize", updateHeaderHeight);
|
|
66
|
+
return function () {
|
|
67
|
+
window.removeEventListener("resize", updateHeaderHeight);
|
|
68
|
+
document.body.style.removeProperty("--neeto-molecules-effective-header-height");
|
|
69
|
+
};
|
|
70
|
+
}, []);
|
|
71
|
+
var isNano = size === SIZES.nano;
|
|
72
|
+
var hasBreadcrumbs = neetoCist.isNotEmpty(breadcrumbs);
|
|
73
|
+
var TitleTag = isNano ? "h3" : "h1";
|
|
74
|
+
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
75
|
+
"data-testid": dataTestId,
|
|
76
|
+
ref: headerRef,
|
|
77
|
+
className: classnames("bg-background text-foreground flex w-full shrink-0 flex-row items-start justify-between gap-4 pt-10 pb-6", "flex-wrap lg:flex-nowrap", {
|
|
78
|
+
"min-h-0": isNano || size === SIZES.small
|
|
79
|
+
}, className),
|
|
80
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("div", {
|
|
81
|
+
className: "flex flex-row flex-wrap items-start justify-start",
|
|
82
|
+
children: /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
83
|
+
className: "flex flex-wrap",
|
|
84
|
+
children: [hasBreadcrumbs && /*#__PURE__*/jsxRuntime.jsx(v2_Breadcrumbs, {
|
|
85
|
+
breadcrumbs: breadcrumbs
|
|
86
|
+
}), /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
87
|
+
className: classnames("flex w-full flex-row items-center gap-3", hasBreadcrumbs ? "mt-0" : "-mt-1 max-lg:-mt-2.5 max-md:-mt-2 max-sm:-mt-1"),
|
|
88
|
+
children: /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Typography, {
|
|
89
|
+
asChild: true,
|
|
90
|
+
variant: isNano ? "h3" : "h1",
|
|
91
|
+
weight: "semibold",
|
|
92
|
+
children: /*#__PURE__*/jsxRuntime.jsxs(TitleTag, {
|
|
93
|
+
"data-testid": "main-header",
|
|
94
|
+
children: [title, neetoCist.isPresent(titleHelpPopoverProps) && /*#__PURE__*/jsxRuntime.jsx(v2_HelpPopover, _objectSpread({
|
|
95
|
+
className: "ms-2 inline-flex align-middle",
|
|
96
|
+
side: "right"
|
|
97
|
+
}, titleHelpPopoverProps)), renderDropdown(function (_ref2) {
|
|
98
|
+
var _ref2$dropdownButtonP = _ref2.dropdownButtonProps,
|
|
99
|
+
dropdownButtonProps = _ref2$dropdownButtonP === void 0 ? {} : _ref2$dropdownButtonP,
|
|
100
|
+
dropdownProps = _objectWithoutProperties(_ref2, _excluded);
|
|
101
|
+
return /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
102
|
+
className: "ms-2 inline-flex align-middle",
|
|
103
|
+
children: /*#__PURE__*/jsxRuntime.jsx(v2_MoreDropdown, _objectSpread({
|
|
104
|
+
dropdownButtonProps: _objectSpread({
|
|
105
|
+
size: DROPDOWN_BUTTON_SIZES[size]
|
|
106
|
+
}, dropdownButtonProps)
|
|
107
|
+
}, dropdownProps))
|
|
108
|
+
});
|
|
109
|
+
})]
|
|
110
|
+
})
|
|
111
|
+
})
|
|
112
|
+
})]
|
|
113
|
+
})
|
|
114
|
+
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
115
|
+
className: classnames("flex items-center gap-3 empty:hidden", "flex-wrap justify-start md:flex-nowrap md:justify-end"),
|
|
116
|
+
children: [searchProps && /*#__PURE__*/jsxRuntime.jsx(v2_Search, _objectSpread({
|
|
117
|
+
enableUrlSync: true,
|
|
118
|
+
className: classnames("min-w-[12.6rem] grow-0", searchProps.className)
|
|
119
|
+
}, searchProps)), actionBlock && /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
120
|
+
className: "flex shrink-0 items-center justify-end gap-3 max-[360px]:shrink max-[360px]:flex-wrap max-[360px]:justify-start",
|
|
121
|
+
children: actionBlock
|
|
122
|
+
})]
|
|
123
|
+
})]
|
|
124
|
+
});
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
module.exports = Header;
|
|
128
|
+
//# sourceMappingURL=Header.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Header.js","sources":["../../../src/v2/components/Header/constants.js","../../../src/v2/components/Header/index.jsx"],"sourcesContent":["const SIZES = { nano: \"nano\", small: \"small\" };\n\nconst DROPDOWN_BUTTON_SIZES = { nano: \"small\", small: \"medium\" };\n\nexport { SIZES, DROPDOWN_BUTTON_SIZES };\n","import { useLayoutEffect, useRef } from \"react\";\n\nimport { Typography } from \"@bigbinary/neeto-atoms\";\nimport classnames from \"classnames\";\nimport { noop, isNotEmpty, isPresent } from \"neetocist\";\nimport PropTypes from \"prop-types\";\n\nimport { DROPDOWN_BUTTON_SIZES, SIZES } from \"./constants\";\n\nimport Breadcrumbs from \"../Breadcrumbs\";\nimport HelpPopover from \"../HelpPopover\";\nimport MoreDropdown from \"../MoreDropdown\";\nimport Search from \"../Search\";\n\nconst Header = ({\n title,\n titleHelpPopoverProps = {},\n searchProps,\n className = \"\",\n actionBlock,\n breadcrumbs = [],\n renderDropdown = noop,\n size = \"small\",\n \"data-testid\": dataTestId = \"neeto-molecules-header\",\n}) => {\n const headerRef = useRef(null);\n\n useLayoutEffect(() => {\n const updateHeaderHeight = () => {\n if (!headerRef.current) return;\n const height = headerRef.current.offsetHeight;\n document.body.style.setProperty(\n \"--neeto-molecules-effective-header-height\",\n `${height}px`\n );\n };\n\n updateHeaderHeight();\n\n window.addEventListener(\"resize\", updateHeaderHeight);\n\n return () => {\n window.removeEventListener(\"resize\", updateHeaderHeight);\n document.body.style.removeProperty(\n \"--neeto-molecules-effective-header-height\"\n );\n };\n }, []);\n\n const isNano = size === SIZES.nano;\n const hasBreadcrumbs = isNotEmpty(breadcrumbs);\n const TitleTag = isNano ? \"h3\" : \"h1\";\n\n return (\n <div\n data-testid={dataTestId}\n ref={headerRef}\n className={classnames(\n \"bg-background text-foreground flex w-full shrink-0 flex-row items-start justify-between gap-4 pt-10 pb-6\",\n \"flex-wrap lg:flex-nowrap\",\n { \"min-h-0\": isNano || size === SIZES.small },\n className\n )}\n >\n <div className=\"flex flex-row flex-wrap items-start justify-start\">\n <div className=\"flex flex-wrap\">\n {hasBreadcrumbs && <Breadcrumbs {...{ breadcrumbs }} />}\n <div\n className={classnames(\n \"flex w-full flex-row items-center gap-3\",\n hasBreadcrumbs\n ? \"mt-0\"\n : \"-mt-1 max-lg:-mt-2.5 max-md:-mt-2 max-sm:-mt-1\"\n )}\n >\n <Typography\n asChild\n variant={isNano ? \"h3\" : \"h1\"}\n weight=\"semibold\"\n >\n <TitleTag data-testid=\"main-header\">\n {title}\n {isPresent(titleHelpPopoverProps) && (\n <HelpPopover\n className=\"ms-2 inline-flex align-middle\"\n side=\"right\"\n {...titleHelpPopoverProps}\n />\n )}\n {renderDropdown(\n ({ dropdownButtonProps = {}, ...dropdownProps }) => (\n <span className=\"ms-2 inline-flex align-middle\">\n <MoreDropdown\n dropdownButtonProps={{\n size: DROPDOWN_BUTTON_SIZES[size],\n ...dropdownButtonProps,\n }}\n {...dropdownProps}\n />\n </span>\n )\n )}\n </TitleTag>\n </Typography>\n </div>\n </div>\n </div>\n <div\n className={classnames(\n \"flex items-center gap-3 empty:hidden\",\n \"flex-wrap justify-start md:flex-nowrap md:justify-end\"\n )}\n >\n {searchProps && (\n <Search\n enableUrlSync\n className={classnames(\n \"min-w-[12.6rem] grow-0\",\n searchProps.className\n )}\n {...searchProps}\n />\n )}\n {actionBlock && (\n <div className=\"flex shrink-0 items-center justify-end gap-3 max-[360px]:shrink max-[360px]:flex-wrap max-[360px]:justify-start\">\n {actionBlock}\n </div>\n )}\n </div>\n </div>\n );\n};\n\nHeader.propTypes = {\n /**\n * To set a title in the Header section.\n */\n title: PropTypes.node,\n /**\n * To set props for the HelpPopover component in the title.\n */\n titleHelpPopoverProps: PropTypes.object,\n /**\n * To specify additional class names.\n */\n className: PropTypes.string,\n /**\n * To specify the content to be rendered in the right side of the Header section.\n */\n actionBlock: PropTypes.node,\n /**\n * To add **Search** molecule to the subheader section.\n */\n searchProps: PropTypes.object,\n /**\n * To show breadcrumbs in the Header section. `text` accepts a text string to be shown as the breadcrumb and `link` accepts relative URL path for the breadcrumb.\n */\n breadcrumbs: PropTypes.arrayOf(\n PropTypes.shape({\n text: PropTypes.string,\n link: PropTypes.string,\n })\n ),\n /**\n * A function to render the Dropdown next to the title. It provides the MoreDropdown component as argument.\n */\n renderDropdown: PropTypes.func,\n /**\n * To specify size of the Header.\n * `small` - Default size.\n *\n * `nano` - To be used in inner pages with menubar.\n */\n size: PropTypes.oneOf([\"nano\", \"small\"]),\n};\n\nexport default Header;\n"],"names":["SIZES","nano","small","DROPDOWN_BUTTON_SIZES","Header","_ref","title","_ref$titleHelpPopover","titleHelpPopoverProps","searchProps","_ref$className","className","actionBlock","_ref$breadcrumbs","breadcrumbs","_ref$renderDropdown","renderDropdown","noop","_ref$size","size","_ref$dataTestid","dataTestId","headerRef","useRef","useLayoutEffect","updateHeaderHeight","current","height","offsetHeight","document","body","style","setProperty","concat","window","addEventListener","removeEventListener","removeProperty","isNano","hasBreadcrumbs","isNotEmpty","TitleTag","_jsxs","ref","classnames","children","_jsx","Breadcrumbs","Typography","asChild","variant","weight","isPresent","HelpPopover","_objectSpread","side","_ref2","_ref2$dropdownButtonP","dropdownButtonProps","dropdownProps","_objectWithoutProperties","_excluded","MoreDropdown","Search","enableUrlSync"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAMA,KAAK,GAAG;AAAEC,EAAAA,IAAI,EAAE,MAAM;AAAEC,EAAAA,KAAK,EAAE;AAAQ,CAAC;AAE9C,IAAMC,qBAAqB,GAAG;AAAEF,EAAAA,IAAI,EAAE,OAAO;AAAEC,EAAAA,KAAK,EAAE;AAAS,CAAC;;;;;ACYhE,IAAME,MAAM,GAAG,SAATA,MAAMA,CAAAC,IAAA,EAUN;AAAA,EAAA,IATJC,KAAK,GAAAD,IAAA,CAALC,KAAK;IAAAC,qBAAA,GAAAF,IAAA,CACLG,qBAAqB;AAArBA,IAAAA,qBAAqB,GAAAD,qBAAA,KAAA,MAAA,GAAG,EAAE,GAAAA,qBAAA;IAC1BE,WAAW,GAAAJ,IAAA,CAAXI,WAAW;IAAAC,cAAA,GAAAL,IAAA,CACXM,SAAS;AAATA,IAAAA,SAAS,GAAAD,cAAA,KAAA,MAAA,GAAG,EAAE,GAAAA,cAAA;IACdE,WAAW,GAAAP,IAAA,CAAXO,WAAW;IAAAC,gBAAA,GAAAR,IAAA,CACXS,WAAW;AAAXA,IAAAA,WAAW,GAAAD,gBAAA,KAAA,MAAA,GAAG,EAAE,GAAAA,gBAAA;IAAAE,mBAAA,GAAAV,IAAA,CAChBW,cAAc;AAAdA,IAAAA,cAAc,GAAAD,mBAAA,KAAA,MAAA,GAAGE,cAAI,GAAAF,mBAAA;IAAAG,SAAA,GAAAb,IAAA,CACrBc,IAAI;AAAJA,IAAAA,IAAI,GAAAD,SAAA,KAAA,MAAA,GAAG,OAAO,GAAAA,SAAA;IAAAE,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,EAAC,+BAA+B;AAAAkC,kBAAAA,QAAA,eAC7CC,cAAA,CAACgB,eAAY,EAAAR,aAAA,CAAA;AACXI,oBAAAA,mBAAmB,EAAAJ,aAAA,CAAA;sBACjBnC,IAAI,EAAEhB,qBAAqB,CAACgB,IAAI;AAAC,qBAAA,EAC9BuC,mBAAmB;AACtB,mBAAA,EACEC,aAAa,CAClB;AAAC,iBACE,CAAC;AAAA,cAAA,CAEX,CAAC;aACO;WACA;AAAC,SACV,CAAC;OACH;KACF,CAAC,eACNjB,eAAA,CAAA,KAAA,EAAA;AACE/B,MAAAA,SAAS,EAAEiC,UAAU,CACnB,sCAAsC,EACtC,uDACF,CAAE;AAAAC,MAAAA,QAAA,GAEDpC,WAAW,iBACVqC,cAAA,CAACiB,SAAM,EAAAT,aAAA,CAAA;QACLU,aAAa,EAAA,IAAA;AACbrD,QAAAA,SAAS,EAAEiC,UAAU,CACnB,wBAAwB,EACxBnC,WAAW,CAACE,SACd;AAAE,OAAA,EACEF,WAAW,CAChB,CACF,EACAG,WAAW,iBACVkC,cAAA,CAAA,KAAA,EAAA;AAAKnC,QAAAA,SAAS,EAAC,iHAAiH;AAAAkC,QAAAA,QAAA,EAC7HjC;AAAW,OACT,CACN;AAAA,KACE,CAAC;AAAA,GACH,CAAC;AAEV;;;;"}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
4
|
+
var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
|
|
5
|
+
var neetoAtoms = require('@bigbinary/neeto-atoms');
|
|
6
|
+
var classnames = require('classnames');
|
|
7
|
+
var reactUtils = require('@bigbinary/neeto-commons-frontend/react-utils');
|
|
8
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
9
|
+
var circleQuestionMark = require('../circle-question-mark-kxBMPyWQ.js');
|
|
10
|
+
require('../createLucideIcon-DBDhE7kE.js');
|
|
11
|
+
require('react');
|
|
12
|
+
|
|
13
|
+
var SIZE = {
|
|
14
|
+
"default": 16,
|
|
15
|
+
large: 20
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
var _excluded = ["label"];
|
|
19
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
20
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
21
|
+
var HelpPopover = reactUtils.withT(function (_ref) {
|
|
22
|
+
var t = _ref.t,
|
|
23
|
+
title = _ref.title,
|
|
24
|
+
_ref$size = _ref.size,
|
|
25
|
+
size = _ref$size === void 0 ? "large" : _ref$size,
|
|
26
|
+
description = _ref.description,
|
|
27
|
+
helpLinkProps = _ref.helpLinkProps,
|
|
28
|
+
className = _ref.className,
|
|
29
|
+
_ref$iconColor = _ref.iconColor,
|
|
30
|
+
iconColor = _ref$iconColor === void 0 ? "currentColor" : _ref$iconColor,
|
|
31
|
+
_ref$icon = _ref.icon,
|
|
32
|
+
IconComponent = _ref$icon === void 0 ? circleQuestionMark.CircleQuestionMark : _ref$icon,
|
|
33
|
+
side = _ref.side,
|
|
34
|
+
sideOffset = _ref.sideOffset,
|
|
35
|
+
align = _ref.align,
|
|
36
|
+
alignOffset = _ref.alignOffset;
|
|
37
|
+
return /*#__PURE__*/jsxRuntime.jsxs(neetoAtoms.HoverCard, {
|
|
38
|
+
closeDelay: 150,
|
|
39
|
+
openDelay: 0,
|
|
40
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(neetoAtoms.HoverCardTrigger, {
|
|
41
|
+
asChild: true,
|
|
42
|
+
children: /*#__PURE__*/jsxRuntime.jsx("button", {
|
|
43
|
+
"data-testid": "help-popover-button",
|
|
44
|
+
type: "button",
|
|
45
|
+
className: classnames("inline-flex cursor-pointer items-center justify-center rounded-full border-none bg-transparent p-0", className),
|
|
46
|
+
children: /*#__PURE__*/jsxRuntime.jsx(IconComponent, {
|
|
47
|
+
color: iconColor,
|
|
48
|
+
size: SIZE[size]
|
|
49
|
+
})
|
|
50
|
+
})
|
|
51
|
+
}), /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.HoverCardContent, {
|
|
52
|
+
align: align,
|
|
53
|
+
alignOffset: alignOffset,
|
|
54
|
+
side: side,
|
|
55
|
+
sideOffset: sideOffset,
|
|
56
|
+
children: /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
57
|
+
className: "flex flex-col",
|
|
58
|
+
onClick: function onClick(event) {
|
|
59
|
+
return event.stopPropagation();
|
|
60
|
+
},
|
|
61
|
+
children: [title && /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Typography, {
|
|
62
|
+
asChild: true,
|
|
63
|
+
variant: "body2",
|
|
64
|
+
weight: "semibold",
|
|
65
|
+
children: /*#__PURE__*/jsxRuntime.jsx("h3", {
|
|
66
|
+
className: "mb-2",
|
|
67
|
+
"data-testid": "help-popover-title",
|
|
68
|
+
children: title
|
|
69
|
+
})
|
|
70
|
+
}), typeof description === "string" ? /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Typography, {
|
|
71
|
+
color: "muted",
|
|
72
|
+
"data-testid": "help-popover-description",
|
|
73
|
+
variant: "body2",
|
|
74
|
+
children: description
|
|
75
|
+
}) : description, helpLinkProps && function () {
|
|
76
|
+
var linkLabel = helpLinkProps.label,
|
|
77
|
+
restLinkProps = _objectWithoutProperties(helpLinkProps, _excluded);
|
|
78
|
+
return /*#__PURE__*/jsxRuntime.jsx("a", _objectSpread(_objectSpread({
|
|
79
|
+
className: "text-primary mt-3 text-sm hover:underline",
|
|
80
|
+
"data-testid": "help-popover-link-button",
|
|
81
|
+
rel: "noreferrer",
|
|
82
|
+
target: "_blank"
|
|
83
|
+
}, restLinkProps), {}, {
|
|
84
|
+
children: linkLabel !== null && linkLabel !== void 0 ? linkLabel : t("neetoMolecules.common.viewHelpArticle")
|
|
85
|
+
}));
|
|
86
|
+
}()]
|
|
87
|
+
})
|
|
88
|
+
})]
|
|
89
|
+
});
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
module.exports = HelpPopover;
|
|
93
|
+
//# sourceMappingURL=HelpPopover.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HelpPopover.js","sources":["../../../src/v2/components/HelpPopover/constants.js","../../../src/v2/components/HelpPopover/index.jsx"],"sourcesContent":["export const SIZE = { default: 16, large: 20 };\n","/* eslint-disable @bigbinary/neeto/use-neetoui-classes */\nimport {\n HoverCard,\n HoverCardContent,\n HoverCardTrigger,\n Typography,\n} from \"@bigbinary/neeto-atoms\";\nimport classNames from \"classnames\";\nimport { CircleHelp } from \"lucide-react\";\nimport { withT } from \"neetocommons/react-utils\";\nimport PropTypes from \"prop-types\";\n\nimport { SIZE } from \"./constants\";\n\nconst HelpPopover = withT(\n ({\n t,\n title,\n size = \"large\",\n description,\n helpLinkProps,\n className,\n iconColor = \"currentColor\",\n icon: IconComponent = CircleHelp,\n side,\n sideOffset,\n align,\n alignOffset,\n }) => (\n <HoverCard closeDelay={150} openDelay={0}>\n <HoverCardTrigger asChild>\n <button\n data-testid=\"help-popover-button\"\n type=\"button\"\n className={classNames(\n \"inline-flex cursor-pointer items-center justify-center rounded-full border-none bg-transparent p-0\",\n className\n )}\n >\n <IconComponent color={iconColor} size={SIZE[size]} />\n </button>\n </HoverCardTrigger>\n <HoverCardContent {...{ align, alignOffset, side, sideOffset }}>\n <div\n className=\"flex flex-col\"\n onClick={event => event.stopPropagation()}\n >\n {title && (\n <Typography asChild variant=\"body2\" weight=\"semibold\">\n <h3 className=\"mb-2\" data-testid=\"help-popover-title\">\n {title}\n </h3>\n </Typography>\n )}\n {typeof description === \"string\" ? (\n <Typography\n color=\"muted\"\n data-testid=\"help-popover-description\"\n variant=\"body2\"\n >\n {description}\n </Typography>\n ) : (\n description\n )}\n {helpLinkProps &&\n (() => {\n const { label: linkLabel, ...restLinkProps } = helpLinkProps;\n\n return (\n <a\n className=\"text-primary mt-3 text-sm hover:underline\"\n data-testid=\"help-popover-link-button\"\n rel=\"noreferrer\"\n target=\"_blank\"\n {...restLinkProps}\n >\n {linkLabel ?? t(\"neetoMolecules.common.viewHelpArticle\")}\n </a>\n );\n })()}\n </div>\n </HoverCardContent>\n </HoverCard>\n )\n);\n\nHelpPopover.propTypes = {\n title: PropTypes.string,\n size: PropTypes.oneOf([\"default\", \"large\"]),\n description: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),\n helpLinkProps: PropTypes.object,\n className: PropTypes.string,\n iconColor: PropTypes.string,\n icon: PropTypes.node,\n side: PropTypes.oneOf([\"top\", \"right\", \"bottom\", \"left\"]),\n sideOffset: PropTypes.number,\n align: PropTypes.oneOf([\"start\", \"center\", \"end\"]),\n alignOffset: PropTypes.number,\n};\n\nexport default HelpPopover;\n"],"names":["SIZE","large","HelpPopover","withT","_ref","t","title","_ref$size","size","description","helpLinkProps","className","_ref$iconColor","iconColor","_ref$icon","icon","IconComponent","CircleHelp","side","sideOffset","align","alignOffset","_jsxs","HoverCard","closeDelay","openDelay","children","_jsx","HoverCardTrigger","asChild","type","classNames","color","HoverCardContent","onClick","event","stopPropagation","Typography","variant","weight","linkLabel","label","restLinkProps","_objectWithoutProperties","_excluded","_objectSpread","rel","target"],"mappings":";;;;;;;;;;;;AAAO,IAAMA,IAAI,GAAG;AAAE,EAAA,SAAA,EAAS,EAAE;AAAEC,EAAAA,KAAK,EAAE;AAAG,CAAC;;;;;ACc9C,IAAMC,WAAW,GAAGC,gBAAK,CACvB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BC,YAAAA,MAAM,EAAC;AAAQ,WAAA,EACXL,aAAa,CAAA,EAAA,EAAA,EAAA;YAAAhB,QAAA,EAEhBc,SAAS,KAAA,IAAA,IAATA,SAAS,cAATA,SAAS,GAAInC,CAAC,CAAC,uCAAuC;AAAC,WAAA,CACvD,CAAC;AAER,QAAA,CAAC,EAAG;OACH;AAAC,KACU,CAAC;AAAA,GACV,CAAC;AAAA,CAEhB;;;;"}
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
4
|
+
var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
|
|
5
|
+
var neetoAtoms = require('@bigbinary/neeto-atoms');
|
|
6
|
+
var classnames = require('classnames');
|
|
7
|
+
var neetoCist = require('@bigbinary/neeto-cist');
|
|
8
|
+
var ramda = require('ramda');
|
|
9
|
+
var reactI18next = require('react-i18next');
|
|
10
|
+
var reactUtils = require('@bigbinary/neeto-commons-frontend/react-utils');
|
|
11
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
12
|
+
var createLucideIcon = require('../createLucideIcon-DBDhE7kE.js');
|
|
13
|
+
var ellipsis = require('../ellipsis-BcfLTtl5.js');
|
|
14
|
+
require('react');
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* @license lucide-react v1.7.0 - ISC
|
|
18
|
+
*
|
|
19
|
+
* This source code is licensed under the ISC license.
|
|
20
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
const __iconNode = [
|
|
25
|
+
["circle", { cx: "12", cy: "12", r: "1", key: "41hilf" }],
|
|
26
|
+
["circle", { cx: "12", cy: "5", r: "1", key: "gxeob9" }],
|
|
27
|
+
["circle", { cx: "12", cy: "19", r: "1", key: "lyex9k" }]
|
|
28
|
+
];
|
|
29
|
+
const EllipsisVertical = createLucideIcon.createLucideIcon("ellipsis-vertical", __iconNode);
|
|
30
|
+
|
|
31
|
+
var DEFAULT_TOOLTIP_PROPS = {
|
|
32
|
+
disabled: true,
|
|
33
|
+
position: "bottom",
|
|
34
|
+
touch: ["hold", 500]
|
|
35
|
+
};
|
|
36
|
+
var ICON_SIZES = {
|
|
37
|
+
small: 20,
|
|
38
|
+
medium: 24,
|
|
39
|
+
large: 30
|
|
40
|
+
};
|
|
41
|
+
var STYLE_TO_VARIANT = {
|
|
42
|
+
primary: "default",
|
|
43
|
+
secondary: "secondary",
|
|
44
|
+
tertiary: "ghost",
|
|
45
|
+
danger: "destructive",
|
|
46
|
+
danger_text: "destructive",
|
|
47
|
+
text: "ghost",
|
|
48
|
+
link: "link"
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
var _excluded$2 = ["isVisible", "key"];
|
|
52
|
+
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; }
|
|
53
|
+
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; }
|
|
54
|
+
var Submenu = reactUtils.withT(function (_ref) {
|
|
55
|
+
var t = _ref.t,
|
|
56
|
+
label = _ref.label,
|
|
57
|
+
_ref$menuItems = _ref.menuItems,
|
|
58
|
+
menuItems = _ref$menuItems === void 0 ? [] : _ref$menuItems;
|
|
59
|
+
return /*#__PURE__*/jsxRuntime.jsxs(neetoAtoms.DropdownMenuSub, {
|
|
60
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(neetoAtoms.DropdownMenuSubTrigger, {
|
|
61
|
+
"aria-haspopup": "menu",
|
|
62
|
+
children: label
|
|
63
|
+
}), /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.DropdownMenuSubContent, {
|
|
64
|
+
"aria-label": t("neetoMolecules.moreDropdown.submenuAriaLabel", {
|
|
65
|
+
label: label
|
|
66
|
+
}),
|
|
67
|
+
children: menuItems.map(function (_ref2) {
|
|
68
|
+
var _ref2$isVisible = _ref2.isVisible,
|
|
69
|
+
isVisible = _ref2$isVisible === void 0 ? true : _ref2$isVisible,
|
|
70
|
+
key = _ref2.key,
|
|
71
|
+
itemProps = _objectWithoutProperties(_ref2, _excluded$2);
|
|
72
|
+
if (!isVisible) return null;
|
|
73
|
+
return /*#__PURE__*/jsxRuntime.jsx(MenuItem, _objectSpread$2({}, itemProps), key !== null && key !== void 0 ? key : neetoCist.hyphenate(itemProps.label || "menu-item"));
|
|
74
|
+
})
|
|
75
|
+
})]
|
|
76
|
+
});
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
var _excluded$1 = ["onClick", "label", "type", "hasSubItems", "menuItems", "dropdownProps"];
|
|
80
|
+
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; }
|
|
81
|
+
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; }
|
|
82
|
+
var MenuItem = function MenuItem(_ref) {
|
|
83
|
+
var onClick = _ref.onClick,
|
|
84
|
+
label = _ref.label,
|
|
85
|
+
_ref$type = _ref.type,
|
|
86
|
+
type = _ref$type === void 0 ? "menuItem" : _ref$type,
|
|
87
|
+
_ref$hasSubItems = _ref.hasSubItems,
|
|
88
|
+
hasSubItems = _ref$hasSubItems === void 0 ? false : _ref$hasSubItems,
|
|
89
|
+
menuItems = _ref.menuItems,
|
|
90
|
+
dropdownProps = _ref.dropdownProps,
|
|
91
|
+
menuItemProps = _objectWithoutProperties(_ref, _excluded$1);
|
|
92
|
+
if (type === "divider") return /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.DropdownMenuSeparator, {
|
|
93
|
+
role: "separator"
|
|
94
|
+
});
|
|
95
|
+
if (hasSubItems) {
|
|
96
|
+
return /*#__PURE__*/jsxRuntime.jsx(Submenu, _objectSpread$1({}, _objectSpread$1({
|
|
97
|
+
dropdownProps: dropdownProps,
|
|
98
|
+
label: label,
|
|
99
|
+
menuItems: menuItems
|
|
100
|
+
}, menuItemProps)));
|
|
101
|
+
}
|
|
102
|
+
return /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.DropdownMenuItem, _objectSpread$1(_objectSpread$1({
|
|
103
|
+
onClick: onClick,
|
|
104
|
+
role: "menuitem"
|
|
105
|
+
}, menuItemProps), {}, {
|
|
106
|
+
children: label
|
|
107
|
+
}));
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
var _excluded = ["isRounded", "size", "tooltipProps", "style"],
|
|
111
|
+
_excluded2 = ["isVisible", "key"];
|
|
112
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
113
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
114
|
+
var MoreDropdown = function MoreDropdown(_ref) {
|
|
115
|
+
var _ref$dropdownButtonPr = _ref.dropdownButtonProps,
|
|
116
|
+
dropdownButtonProps = _ref$dropdownButtonPr === void 0 ? {} : _ref$dropdownButtonPr,
|
|
117
|
+
_ref$isVertical = _ref.isVertical,
|
|
118
|
+
isVertical = _ref$isVertical === void 0 ? false : _ref$isVertical,
|
|
119
|
+
_ref$isDisabled = _ref.isDisabled,
|
|
120
|
+
isDisabled = _ref$isDisabled === void 0 ? false : _ref$isDisabled,
|
|
121
|
+
_ref$dropdownProps = _ref.dropdownProps,
|
|
122
|
+
dropdownProps = _ref$dropdownProps === void 0 ? {} : _ref$dropdownProps,
|
|
123
|
+
menuTopChildren = _ref.menuTopChildren,
|
|
124
|
+
menuBottomChildren = _ref.menuBottomChildren,
|
|
125
|
+
_ref$menuItems = _ref.menuItems,
|
|
126
|
+
menuItems = _ref$menuItems === void 0 ? [] : _ref$menuItems;
|
|
127
|
+
var _useTranslation = reactI18next.useTranslation(),
|
|
128
|
+
t = _useTranslation.t;
|
|
129
|
+
var isRoundedButton = dropdownButtonProps.isRounded,
|
|
130
|
+
_dropdownButtonProps$ = dropdownButtonProps.size,
|
|
131
|
+
buttonSize = _dropdownButtonProps$ === void 0 ? "medium" : _dropdownButtonProps$,
|
|
132
|
+
customTooltipProps = dropdownButtonProps.tooltipProps,
|
|
133
|
+
buttonStyle = dropdownButtonProps.style,
|
|
134
|
+
buttonProps = _objectWithoutProperties(dropdownButtonProps, _excluded);
|
|
135
|
+
var tooltipProps = ramda.mergeRight(DEFAULT_TOOLTIP_PROPS, customTooltipProps);
|
|
136
|
+
var variant = STYLE_TO_VARIANT[buttonStyle] || "ghost";
|
|
137
|
+
var TargetIcon = isVertical ? EllipsisVertical : ellipsis.Ellipsis;
|
|
138
|
+
var iconSize = ICON_SIZES[buttonSize] || 20;
|
|
139
|
+
var isDropdownDisabled = isDisabled || dropdownProps.disabled;
|
|
140
|
+
if (isDropdownDisabled && !tooltipProps.disabled) {
|
|
141
|
+
return /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.TooltipProvider, {
|
|
142
|
+
children: /*#__PURE__*/jsxRuntime.jsxs(neetoAtoms.Tooltip, {
|
|
143
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(neetoAtoms.TooltipTrigger, {
|
|
144
|
+
asChild: true,
|
|
145
|
+
children: /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
146
|
+
children: /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Button, _objectSpread(_objectSpread({
|
|
147
|
+
variant: variant,
|
|
148
|
+
disabled: true,
|
|
149
|
+
"data-dropdown-button-style": "more-dropdown",
|
|
150
|
+
"data-testid": "more-dropdown-button",
|
|
151
|
+
size: "icon",
|
|
152
|
+
className: classnames("shrink-0", {
|
|
153
|
+
"rounded-full": isRoundedButton
|
|
154
|
+
})
|
|
155
|
+
}, buttonProps), {}, {
|
|
156
|
+
children: /*#__PURE__*/jsxRuntime.jsx(TargetIcon, {
|
|
157
|
+
size: iconSize
|
|
158
|
+
})
|
|
159
|
+
}))
|
|
160
|
+
})
|
|
161
|
+
}), /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.TooltipContent, {
|
|
162
|
+
side: tooltipProps.position || "bottom",
|
|
163
|
+
children: tooltipProps.content
|
|
164
|
+
})]
|
|
165
|
+
})
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
return /*#__PURE__*/jsxRuntime.jsxs(neetoAtoms.DropdownMenu, _objectSpread(_objectSpread({}, dropdownProps), {}, {
|
|
169
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(neetoAtoms.DropdownMenuTrigger, {
|
|
170
|
+
asChild: true,
|
|
171
|
+
children: /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Button, _objectSpread(_objectSpread({
|
|
172
|
+
variant: variant,
|
|
173
|
+
"aria-haspopup": "menu",
|
|
174
|
+
"aria-label": t("neetoMolecules.moreDropdown.buttonAriaLabel"),
|
|
175
|
+
"data-dropdown-button-style": "more-dropdown",
|
|
176
|
+
disabled: isDropdownDisabled,
|
|
177
|
+
size: "icon",
|
|
178
|
+
className: classnames("shrink-0", {
|
|
179
|
+
"rounded-full": isRoundedButton
|
|
180
|
+
})
|
|
181
|
+
}, buttonProps), {}, {
|
|
182
|
+
children: /*#__PURE__*/jsxRuntime.jsx(TargetIcon, {
|
|
183
|
+
size: iconSize
|
|
184
|
+
})
|
|
185
|
+
}))
|
|
186
|
+
}), /*#__PURE__*/jsxRuntime.jsxs(neetoAtoms.DropdownMenuContent, {
|
|
187
|
+
"aria-label": t("neetoMolecules.moreDropdown.menuAriaLabel"),
|
|
188
|
+
children: [menuTopChildren, menuItems.map(function (_ref2) {
|
|
189
|
+
var _ref2$isVisible = _ref2.isVisible,
|
|
190
|
+
isVisible = _ref2$isVisible === void 0 ? true : _ref2$isVisible,
|
|
191
|
+
key = _ref2.key,
|
|
192
|
+
menuItemProps = _objectWithoutProperties(_ref2, _excluded2);
|
|
193
|
+
if (!isVisible) return null;
|
|
194
|
+
return /*#__PURE__*/jsxRuntime.jsx(MenuItem, _objectSpread({}, menuItemProps), key !== null && key !== void 0 ? key : neetoCist.hyphenate(menuItemProps.label || "menu-item"));
|
|
195
|
+
}), menuBottomChildren]
|
|
196
|
+
})]
|
|
197
|
+
}));
|
|
198
|
+
};
|
|
199
|
+
|
|
200
|
+
module.exports = MoreDropdown;
|
|
201
|
+
//# sourceMappingURL=MoreDropdown.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MoreDropdown.js","sources":["../../../node_modules/lucide-react/dist/esm/icons/ellipsis-vertical.js","../../../src/v2/components/MoreDropdown/constants.js","../../../src/v2/components/MoreDropdown/Submenu.jsx","../../../src/v2/components/MoreDropdown/MenuItem.jsx","../../../src/v2/components/MoreDropdown/index.jsx"],"sourcesContent":["/**\n * @license lucide-react v1.7.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n [\"circle\", { cx: \"12\", cy: \"12\", r: \"1\", key: \"41hilf\" }],\n [\"circle\", { cx: \"12\", cy: \"5\", r: \"1\", key: \"gxeob9\" }],\n [\"circle\", { cx: \"12\", cy: \"19\", r: \"1\", key: \"lyex9k\" }]\n];\nconst EllipsisVertical = createLucideIcon(\"ellipsis-vertical\", __iconNode);\n\nexport { __iconNode, EllipsisVertical as default };\n//# sourceMappingURL=ellipsis-vertical.js.map\n","const BUTTON_STYLES = {\n primary: \"primary\",\n secondary: \"secondary\",\n tertiary: \"tertiary\",\n danger: \"danger\",\n danger_text: \"danger_text\",\n text: \"text\",\n link: \"link\",\n};\n\nconst SIZES = { small: \"small\", medium: \"medium\", large: \"large\" };\n\nconst STRATEGY = { absolute: \"absolute\", fixed: \"fixed\" };\n\nconst MENU_ITEM_TYPES = { menuItem: \"menuItem\", divider: \"divider\" };\n\nconst DEFAULT_TOOLTIP_PROPS = {\n disabled: true,\n position: \"bottom\",\n touch: [\"hold\", 500],\n};\n\nconst ICON_SIZES = { small: 20, medium: 24, large: 30 };\n\nconst STYLE_TO_VARIANT = {\n primary: \"default\",\n secondary: \"secondary\",\n tertiary: \"ghost\",\n danger: \"destructive\",\n danger_text: \"destructive\",\n text: \"ghost\",\n link: \"link\",\n};\n\nexport {\n BUTTON_STYLES,\n SIZES,\n STRATEGY,\n MENU_ITEM_TYPES,\n DEFAULT_TOOLTIP_PROPS,\n ICON_SIZES,\n STYLE_TO_VARIANT,\n};\n","import {\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n} from \"@bigbinary/neeto-atoms\";\nimport { hyphenate } from \"neetocist\";\nimport { withT } from \"neetocommons/react-utils\";\n\nimport MenuItem from \"./MenuItem\";\n\nconst Submenu = withT(({ t, label, menuItems = [] }) => (\n <DropdownMenuSub>\n <DropdownMenuSubTrigger aria-haspopup=\"menu\">\n {label}\n </DropdownMenuSubTrigger>\n <DropdownMenuSubContent\n aria-label={t(\"neetoMolecules.moreDropdown.submenuAriaLabel\", {\n label,\n })}\n >\n {menuItems.map(({ isVisible = true, key, ...itemProps }) => {\n if (!isVisible) return null;\n\n return (\n <MenuItem\n key={key ?? hyphenate(itemProps.label || \"menu-item\")}\n {...itemProps}\n />\n );\n })}\n </DropdownMenuSubContent>\n </DropdownMenuSub>\n));\n\nexport default Submenu;\n","import {\n DropdownMenuItem,\n DropdownMenuSeparator,\n} from \"@bigbinary/neeto-atoms\";\n\nimport Submenu from \"./Submenu\";\n\nconst MenuItem = ({\n onClick,\n label,\n type = \"menuItem\",\n hasSubItems = false,\n menuItems,\n dropdownProps,\n ...menuItemProps\n}) => {\n if (type === \"divider\") return <DropdownMenuSeparator role=\"separator\" />;\n\n if (hasSubItems) {\n return (\n <Submenu {...{ dropdownProps, label, menuItems, ...menuItemProps }} />\n );\n }\n\n return (\n <DropdownMenuItem {...{ onClick }} role=\"menuitem\" {...menuItemProps}>\n {label}\n </DropdownMenuItem>\n );\n};\n\nexport default MenuItem;\n","/* eslint-disable @bigbinary/neeto/use-neetoui-classes */\nimport {\n Button,\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuTrigger,\n Tooltip,\n TooltipContent,\n TooltipProvider,\n TooltipTrigger,\n} from \"@bigbinary/neeto-atoms\";\nimport classnames from \"classnames\";\nimport { Ellipsis, EllipsisVertical } from \"lucide-react\";\nimport { hyphenate } from \"neetocist\";\nimport PropTypes from \"prop-types\";\nimport { mergeRight } from \"ramda\";\nimport { useTranslation } from \"react-i18next\";\n\nimport {\n DEFAULT_TOOLTIP_PROPS,\n ICON_SIZES,\n MENU_ITEM_TYPES,\n SIZES,\n STYLE_TO_VARIANT,\n} from \"./constants\";\nimport MenuItem from \"./MenuItem\";\n\nconst MoreDropdown = ({\n dropdownButtonProps = {},\n isVertical = false,\n isDisabled = false,\n dropdownProps = {},\n menuTopChildren,\n menuBottomChildren,\n menuItems = [],\n}) => {\n const { t } = useTranslation();\n\n const {\n isRounded: isRoundedButton,\n size: buttonSize = \"medium\",\n tooltipProps: customTooltipProps,\n style: buttonStyle,\n ...buttonProps\n } = dropdownButtonProps;\n\n const tooltipProps = mergeRight(DEFAULT_TOOLTIP_PROPS, customTooltipProps);\n const variant = STYLE_TO_VARIANT[buttonStyle] || \"ghost\";\n\n const TargetIcon = isVertical ? EllipsisVertical : Ellipsis;\n const iconSize = ICON_SIZES[buttonSize] || 20;\n\n const isDropdownDisabled = isDisabled || dropdownProps.disabled;\n\n if (isDropdownDisabled && !tooltipProps.disabled) {\n return (\n <TooltipProvider>\n <Tooltip>\n <TooltipTrigger asChild>\n <span>\n <Button\n {...{ variant }}\n disabled\n data-dropdown-button-style=\"more-dropdown\"\n data-testid=\"more-dropdown-button\"\n size=\"icon\"\n className={classnames(\"shrink-0\", {\n \"rounded-full\": isRoundedButton,\n })}\n {...buttonProps}\n >\n <TargetIcon size={iconSize} />\n </Button>\n </span>\n </TooltipTrigger>\n <TooltipContent side={tooltipProps.position || \"bottom\"}>\n {tooltipProps.content}\n </TooltipContent>\n </Tooltip>\n </TooltipProvider>\n );\n }\n\n return (\n <DropdownMenu {...dropdownProps}>\n <DropdownMenuTrigger asChild>\n <Button\n {...{ variant }}\n aria-haspopup=\"menu\"\n aria-label={t(\"neetoMolecules.moreDropdown.buttonAriaLabel\")}\n data-dropdown-button-style=\"more-dropdown\"\n disabled={isDropdownDisabled}\n size=\"icon\"\n className={classnames(\"shrink-0\", {\n \"rounded-full\": isRoundedButton,\n })}\n {...buttonProps}\n >\n <TargetIcon size={iconSize} />\n </Button>\n </DropdownMenuTrigger>\n <DropdownMenuContent\n aria-label={t(\"neetoMolecules.moreDropdown.menuAriaLabel\")}\n >\n {menuTopChildren}\n {menuItems.map(({ isVisible = true, key, ...menuItemProps }) => {\n if (!isVisible) return null;\n\n return (\n <MenuItem\n key={key ?? hyphenate(menuItemProps.label || \"menu-item\")}\n {...menuItemProps}\n />\n );\n })}\n {menuBottomChildren}\n </DropdownMenuContent>\n </DropdownMenu>\n );\n};\n\nMoreDropdown.propTypes = {\n dropdownButtonProps: PropTypes.shape({\n style: PropTypes.oneOf([\n \"primary\",\n \"secondary\",\n \"tertiary\",\n \"danger\",\n \"danger_text\",\n \"text\",\n \"link\",\n ]),\n size: PropTypes.oneOf(Object.values(SIZES)),\n iconSize: PropTypes.number,\n disabled: PropTypes.bool,\n isRounded: PropTypes.bool,\n }),\n isVertical: PropTypes.bool,\n isDisabled: PropTypes.bool,\n dropdownProps: PropTypes.object,\n menuTopChildren: PropTypes.node,\n menuBottomChildren: PropTypes.node,\n menuItems: PropTypes.arrayOf(\n PropTypes.shape({\n label: PropTypes.string,\n onClick: PropTypes.func,\n key: PropTypes.string,\n type: PropTypes.oneOf(Object.values(MENU_ITEM_TYPES)),\n isVisible: PropTypes.bool,\n hasSubItems: PropTypes.bool,\n dropdownProps: PropTypes.shape({\n position: PropTypes.string,\n trigger: PropTypes.string,\n }),\n })\n ),\n};\n\nexport default MoreDropdown;\n"],"names":["createLucideIcon","DEFAULT_TOOLTIP_PROPS","disabled","position","touch","ICON_SIZES","small","medium","large","STYLE_TO_VARIANT","primary","secondary","tertiary","danger","danger_text","text","link","Submenu","withT","_ref","t","label","_ref$menuItems","menuItems","_jsxs","DropdownMenuSub","children","_jsx","DropdownMenuSubTrigger","DropdownMenuSubContent","map","_ref2","_ref2$isVisible","isVisible","key","itemProps","_objectWithoutProperties","_excluded","MenuItem","_objectSpread","hyphenate","onClick","_ref$type","type","_ref$hasSubItems","hasSubItems","dropdownProps","menuItemProps","DropdownMenuSeparator","role","DropdownMenuItem","MoreDropdown","_ref$dropdownButtonPr","dropdownButtonProps","_ref$isVertical","isVertical","_ref$isDisabled","isDisabled","_ref$dropdownProps","menuTopChildren","menuBottomChildren","_useTranslation","useTranslation","isRoundedButton","isRounded","_dropdownButtonProps$","size","buttonSize","customTooltipProps","tooltipProps","buttonStyle","style","buttonProps","mergeRight","variant","TargetIcon","EllipsisVertical","Ellipsis","iconSize","isDropdownDisabled","TooltipProvider","Tooltip","TooltipTrigger","asChild","Button","className","classnames","TooltipContent","side","content","DropdownMenu","DropdownMenuTrigger","DropdownMenuContent","_excluded2"],"mappings":";;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;;;AAIA,MAAM,UAAU,GAAG;AACnB,EAAE,CAAC,QAAQ,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC;AAC3D,EAAE,CAAC,QAAQ,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC;AAC1D,EAAE,CAAC,QAAQ,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,QAAQ,EAAE;AAC1D,CAAC;AACD,MAAM,gBAAgB,GAAGA,iCAAgB,CAAC,mBAAmB,EAAE,UAAU,CAAC;;ACE1E,IAAMC,qBAAqB,GAAG;AAC5BC,EAAAA,QAAQ,EAAE,IAAI;AACdC,EAAAA,QAAQ,EAAE,QAAQ;AAClBC,EAAAA,KAAK,EAAE,CAAC,MAAM,EAAE,GAAG;AACrB,CAAC;AAED,IAAMC,UAAU,GAAG;AAAEC,EAAAA,KAAK,EAAE,EAAE;AAAEC,EAAAA,MAAM,EAAE,EAAE;AAAEC,EAAAA,KAAK,EAAE;AAAG,CAAC;AAEvD,IAAMC,gBAAgB,GAAG;AACvBC,EAAAA,OAAO,EAAE,SAAS;AAClBC,EAAAA,SAAS,EAAE,WAAW;AACtBC,EAAAA,QAAQ,EAAE,OAAO;AAC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CAACW,QAAQ,EAAAC,aAAA,CAAA,EAAA,EAEHQ,aAAa,CAAA,EADZb,GAAG,KAAA,IAAA,IAAHA,GAAG,cAAHA,GAAG,GAAIM,mBAAS,CAACO,aAAa,CAAC1B,KAAK,IAAI,WAAW,CAEzD,CAAC;MAEN,CAAC,CAAC,EACDuC,kBAAkB;AAAA,KACA,CAAC;AAAA,GAAA,CACV,CAAC;AAEnB;;;;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
4
|
+
var _slicedToArray = require('@babel/runtime/helpers/slicedToArray');
|
|
5
|
+
var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
|
|
6
|
+
var React = require('react');
|
|
7
|
+
var neetoAtoms = require('@bigbinary/neeto-atoms');
|
|
8
|
+
var useFuncDebounce = require('@bigbinary/neeto-commons-frontend/react-utils/useFuncDebounce');
|
|
9
|
+
var useQueryParams = require('@bigbinary/neeto-commons-frontend/react-utils/useQueryParams');
|
|
10
|
+
var useUpdateEffect = require('@bigbinary/neeto-commons-frontend/react-utils/useUpdateEffect');
|
|
11
|
+
var general = require('@bigbinary/neeto-commons-frontend/utils/general');
|
|
12
|
+
var ramda = require('ramda');
|
|
13
|
+
var reactI18next = require('react-i18next');
|
|
14
|
+
var reactRouterDom = require('react-router-dom');
|
|
15
|
+
var utils = require('@bigbinary/neeto-commons-frontend/utils');
|
|
16
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
17
|
+
var search = require('../search-BBuFYdmG.js');
|
|
18
|
+
require('../createLucideIcon-DBDhE7kE.js');
|
|
19
|
+
|
|
20
|
+
var getInitialSearchValue = function getInitialSearchValue(_ref) {
|
|
21
|
+
var _ref$initialValue = _ref.initialValue,
|
|
22
|
+
initialValue = _ref$initialValue === void 0 ? "" : _ref$initialValue,
|
|
23
|
+
enableUrlSync = _ref.enableUrlSync,
|
|
24
|
+
searchParamName = _ref.searchParamName;
|
|
25
|
+
if (enableUrlSync) {
|
|
26
|
+
var _queryParams$searchPa;
|
|
27
|
+
var queryParams = utils.getQueryParams({
|
|
28
|
+
toCamelCase: false
|
|
29
|
+
});
|
|
30
|
+
return (_queryParams$searchPa = queryParams[searchParamName]) !== null && _queryParams$searchPa !== void 0 ? _queryParams$searchPa : "";
|
|
31
|
+
}
|
|
32
|
+
return initialValue;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
var _excluded = ["value", "debounceTime", "onSearch", "onChange", "enableUrlSync", "searchParamName", "className", "label"];
|
|
36
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
37
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
38
|
+
var Search = function Search(_ref) {
|
|
39
|
+
var value = _ref.value,
|
|
40
|
+
_ref$debounceTime = _ref.debounceTime,
|
|
41
|
+
debounceTime = _ref$debounceTime === void 0 ? 300 : _ref$debounceTime,
|
|
42
|
+
onSearch = _ref.onSearch,
|
|
43
|
+
onChange = _ref.onChange,
|
|
44
|
+
_ref$enableUrlSync = _ref.enableUrlSync,
|
|
45
|
+
enableUrlSync = _ref$enableUrlSync === void 0 ? false : _ref$enableUrlSync,
|
|
46
|
+
_ref$searchParamName = _ref.searchParamName,
|
|
47
|
+
searchParamName = _ref$searchParamName === void 0 ? "search_term" : _ref$searchParamName,
|
|
48
|
+
className = _ref.className,
|
|
49
|
+
label = _ref.label,
|
|
50
|
+
inputProps = _objectWithoutProperties(_ref, _excluded);
|
|
51
|
+
var _useTranslation = reactI18next.useTranslation(),
|
|
52
|
+
t = _useTranslation.t;
|
|
53
|
+
var queryParams = useQueryParams({
|
|
54
|
+
toCamelCase: false
|
|
55
|
+
});
|
|
56
|
+
var history = reactRouterDom.useHistory();
|
|
57
|
+
var inputId = React.useId();
|
|
58
|
+
var _useState = React.useState(getInitialSearchValue({
|
|
59
|
+
initialValue: value,
|
|
60
|
+
enableUrlSync: enableUrlSync,
|
|
61
|
+
searchParamName: searchParamName
|
|
62
|
+
})),
|
|
63
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
64
|
+
internalValue = _useState2[0],
|
|
65
|
+
setInternalValue = _useState2[1];
|
|
66
|
+
var trimmedValue = value === null || value === void 0 ? void 0 : value.trim();
|
|
67
|
+
useUpdateEffect(function () {
|
|
68
|
+
var _queryParams$searchPa;
|
|
69
|
+
if (!enableUrlSync) return;
|
|
70
|
+
var searchParamValue = (_queryParams$searchPa = queryParams === null || queryParams === void 0 ? void 0 : queryParams[searchParamName]) !== null && _queryParams$searchPa !== void 0 ? _queryParams$searchPa : "";
|
|
71
|
+
setInternalValue(searchParamValue);
|
|
72
|
+
}, [queryParams === null || queryParams === void 0 ? void 0 : queryParams[searchParamName]]);
|
|
73
|
+
var handleSearchQueryParams = function handleSearchQueryParams(trimmedValue) {
|
|
74
|
+
if (!trimmedValue && !(queryParams !== null && queryParams !== void 0 && queryParams[searchParamName])) return;
|
|
75
|
+
if (trimmedValue === (queryParams === null || queryParams === void 0 ? void 0 : queryParams[searchParamName])) return;
|
|
76
|
+
var pathname = history.location.pathname;
|
|
77
|
+
if (trimmedValue) {
|
|
78
|
+
history.push(general.buildUrl(pathname, ramda.mergeLeft(_defineProperty({}, searchParamName, trimmedValue), queryParams)));
|
|
79
|
+
} else {
|
|
80
|
+
history.push(general.buildUrl(pathname, ramda.omit([searchParamName], queryParams)));
|
|
81
|
+
}
|
|
82
|
+
};
|
|
83
|
+
var handleDebouncedSearchTermChange = useFuncDebounce(function (trimmedValue) {
|
|
84
|
+
if (onSearch) onSearch(trimmedValue);else if (enableUrlSync) handleSearchQueryParams(trimmedValue);
|
|
85
|
+
}, debounceTime);
|
|
86
|
+
useUpdateEffect(function () {
|
|
87
|
+
handleDebouncedSearchTermChange(trimmedValue);
|
|
88
|
+
}, [trimmedValue]);
|
|
89
|
+
var prevValueRef = React.useRef(value);
|
|
90
|
+
if (value !== undefined && value !== prevValueRef.current) {
|
|
91
|
+
setInternalValue(value);
|
|
92
|
+
prevValueRef.current = value;
|
|
93
|
+
}
|
|
94
|
+
var handleOnChange = function handleOnChange(e) {
|
|
95
|
+
var _e$target$value;
|
|
96
|
+
var trimmedValue = (_e$target$value = e.target.value) === null || _e$target$value === void 0 ? void 0 : _e$target$value.trim();
|
|
97
|
+
onChange === null || onChange === void 0 || onChange(e);
|
|
98
|
+
setInternalValue(e.target.value);
|
|
99
|
+
if ((internalValue === null || internalValue === void 0 ? void 0 : internalValue.trim()) !== trimmedValue) {
|
|
100
|
+
handleDebouncedSearchTermChange(trimmedValue);
|
|
101
|
+
}
|
|
102
|
+
};
|
|
103
|
+
React.useEffect(function () {
|
|
104
|
+
return handleDebouncedSearchTermChange.cancel;
|
|
105
|
+
}, []);
|
|
106
|
+
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
107
|
+
className: className,
|
|
108
|
+
children: [label && /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Label, {
|
|
109
|
+
className: "mb-1",
|
|
110
|
+
htmlFor: inputId,
|
|
111
|
+
children: label
|
|
112
|
+
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
113
|
+
className: "relative",
|
|
114
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(search.Search, {
|
|
115
|
+
className: "text-muted-foreground pointer-events-none absolute top-1/2 left-3 size-4 -translate-y-1/2"
|
|
116
|
+
}), /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Input, _objectSpread({
|
|
117
|
+
className: "pl-9 [&::-webkit-search-cancel-button:hover]:cursor-pointer [&::-webkit-search-decoration:hover]:cursor-pointer",
|
|
118
|
+
id: inputId,
|
|
119
|
+
placeholder: t("neetoMolecules.common.actions.search"),
|
|
120
|
+
type: "search",
|
|
121
|
+
value: internalValue,
|
|
122
|
+
onChange: handleOnChange
|
|
123
|
+
}, inputProps))]
|
|
124
|
+
})]
|
|
125
|
+
});
|
|
126
|
+
};
|
|
127
|
+
|
|
128
|
+
module.exports = Search;
|
|
129
|
+
//# sourceMappingURL=Search.js.map
|