@bigbinary/neeto-molecules 1.0.73-beta → 1.0.74
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/Columns.cjs.js +32 -3
- package/dist/Columns.cjs.js.map +1 -1
- package/dist/Columns.js +32 -3
- package/dist/Columns.js.map +1 -1
- package/dist/Container.cjs.js +1 -1
- package/dist/Container.js +1 -1
- package/dist/CustomDomainDashboard.cjs.js +49 -45
- package/dist/CustomDomainDashboard.cjs.js.map +1 -1
- package/dist/CustomDomainDashboard.js +51 -47
- package/dist/CustomDomainDashboard.js.map +1 -1
- package/dist/DynamicVariables.cjs.js +31 -2
- package/dist/DynamicVariables.cjs.js.map +1 -1
- package/dist/DynamicVariables.js +31 -2
- package/dist/DynamicVariables.js.map +1 -1
- package/dist/Header.cjs.js +30 -50
- package/dist/Header.cjs.js.map +1 -1
- package/dist/Header.js +33 -53
- package/dist/Header.js.map +1 -1
- package/dist/MenuBar.cjs.js +1 -1
- package/dist/MenuBar.js +1 -1
- package/dist/Sidebar.cjs.js +90 -135
- package/dist/Sidebar.cjs.js.map +1 -1
- package/dist/Sidebar.js +92 -137
- package/dist/Sidebar.js.map +1 -1
- package/dist/SubHeader.cjs.js +13 -18
- package/dist/SubHeader.cjs.js.map +1 -1
- package/dist/SubHeader.js +13 -18
- package/dist/SubHeader.js.map +1 -1
- package/package.json +2 -2
- package/src/translations/en.json +2 -6
- package/types/Columns.d.ts +1 -2
- package/types/DynamicVariables.d.ts +1 -2
- package/types/Header.d.ts +1 -1
- package/types/Sidebar.d.ts +1 -1
- package/types/SubHeader.d.ts +1 -2
package/dist/Columns.cjs.js
CHANGED
|
@@ -84,6 +84,35 @@ function _slicedToArray(arr, i) {
|
|
|
84
84
|
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
85
85
|
}
|
|
86
86
|
|
|
87
|
+
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
88
|
+
if (source == null) return {};
|
|
89
|
+
var target = {};
|
|
90
|
+
var sourceKeys = Object.keys(source);
|
|
91
|
+
var key, i;
|
|
92
|
+
for (i = 0; i < sourceKeys.length; i++) {
|
|
93
|
+
key = sourceKeys[i];
|
|
94
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
95
|
+
target[key] = source[key];
|
|
96
|
+
}
|
|
97
|
+
return target;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
function _objectWithoutProperties(source, excluded) {
|
|
101
|
+
if (source == null) return {};
|
|
102
|
+
var target = _objectWithoutPropertiesLoose(source, excluded);
|
|
103
|
+
var key, i;
|
|
104
|
+
if (Object.getOwnPropertySymbols) {
|
|
105
|
+
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
106
|
+
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
|
107
|
+
key = sourceSymbolKeys[i];
|
|
108
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
109
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
110
|
+
target[key] = source[key];
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
return target;
|
|
114
|
+
}
|
|
115
|
+
|
|
87
116
|
var removeFixedColumns = function removeFixedColumns(fixedColumns, columnData) {
|
|
88
117
|
return pure.removeBy({
|
|
89
118
|
dataIndex: ramda.includes(ramda.__, fixedColumns)
|
|
@@ -96,14 +125,13 @@ var filterBySearchTerm = function filterBySearchTerm(searchTerm, columns) {
|
|
|
96
125
|
}, columns);
|
|
97
126
|
};
|
|
98
127
|
|
|
128
|
+
var _excluded = ["actionBlock", "checkboxProps", "columnData", "fixedColumns", "isSearchable", "localStorageKey", "initialValue", "noColumnMessage", "onChange", "searchProps"];
|
|
99
129
|
var Columns = function Columns(_ref) {
|
|
100
130
|
var actionBlock = _ref.actionBlock,
|
|
101
131
|
_ref$checkboxProps = _ref.checkboxProps,
|
|
102
132
|
checkboxProps = _ref$checkboxProps === void 0 ? {} : _ref$checkboxProps,
|
|
103
133
|
_ref$columnData = _ref.columnData,
|
|
104
134
|
columnData = _ref$columnData === void 0 ? [] : _ref$columnData,
|
|
105
|
-
_ref$dropdownProps = _ref.dropdownProps,
|
|
106
|
-
dropdownProps = _ref$dropdownProps === void 0 ? {} : _ref$dropdownProps,
|
|
107
135
|
_ref$fixedColumns = _ref.fixedColumns,
|
|
108
136
|
fixedColumns = _ref$fixedColumns === void 0 ? [] : _ref$fixedColumns,
|
|
109
137
|
_ref$isSearchable = _ref.isSearchable,
|
|
@@ -117,7 +145,8 @@ var Columns = function Columns(_ref) {
|
|
|
117
145
|
_ref$onChange = _ref.onChange,
|
|
118
146
|
onChange = _ref$onChange === void 0 ? ramda.identity : _ref$onChange,
|
|
119
147
|
_ref$searchProps = _ref.searchProps,
|
|
120
|
-
searchProps = _ref$searchProps === void 0 ? {} : _ref$searchProps
|
|
148
|
+
searchProps = _ref$searchProps === void 0 ? {} : _ref$searchProps,
|
|
149
|
+
dropdownProps = _objectWithoutProperties(_ref, _excluded);
|
|
121
150
|
var Divider = neetoui.Dropdown.Divider,
|
|
122
151
|
Menu = neetoui.Dropdown.Menu,
|
|
123
152
|
MenuItem = neetoui.Dropdown.MenuItem;
|
package/dist/Columns.cjs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Columns.cjs.js","sources":["../node_modules/@babel/runtime/helpers/esm/extends.js","../node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js","../node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js","../node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js","../node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js","../node_modules/@babel/runtime/helpers/esm/nonIterableRest.js","../node_modules/@babel/runtime/helpers/esm/slicedToArray.js","../src/components/Columns/utils.js","../src/components/Columns/index.jsx"],"sourcesContent":["export default function _extends() {\n _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n}","export default function _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}","export default function _iterableToArrayLimit(arr, i) {\n var _i = null == arr ? null : \"undefined\" != typeof Symbol && arr[Symbol.iterator] || arr[\"@@iterator\"];\n if (null != _i) {\n var _s,\n _e,\n _x,\n _r,\n _arr = [],\n _n = !0,\n _d = !1;\n try {\n if (_x = (_i = _i.call(arr)).next, 0 === i) {\n if (Object(_i) !== _i) return;\n _n = !1;\n } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0);\n } catch (err) {\n _d = !0, _e = err;\n } finally {\n try {\n if (!_n && null != _i[\"return\"] && (_r = _i[\"return\"](), Object(_r) !== _r)) return;\n } finally {\n if (_d) throw _e;\n }\n }\n return _arr;\n }\n}","export default function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n return arr2;\n}","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nexport default function _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}","export default function _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}","import arrayWithHoles from \"./arrayWithHoles.js\";\nimport iterableToArrayLimit from \"./iterableToArrayLimit.js\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nimport nonIterableRest from \"./nonIterableRest.js\";\nexport default function _slicedToArray(arr, i) {\n return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();\n}","import { removeBy } from \"neetocommons/pure\";\nimport { __, filter, includes, toLower, trim } from \"ramda\";\n\nexport const removeFixedColumns = (fixedColumns, columnData) =>\n removeBy({ dataIndex: includes(__, fixedColumns) }, columnData);\n\nexport const filterBySearchTerm = (searchTerm, columns) =>\n filter(\n ({ title }) => includes(trim(toLower(searchTerm)), trim(toLower(title))),\n columns\n );\n","import React, { useState, useEffect } from \"react\";\n\nimport i18next from \"i18next\";\nimport { isNotEmpty, removeBy } from \"neetocommons/pure\";\nimport { useLocalStorage } from \"neetocommons/react-utils\";\nimport { Search } from \"neetoicons\";\nimport { Checkbox, Dropdown, Input, Label } from \"neetoui\";\nimport PropTypes from \"prop-types\";\nimport { __, append, identity, includes, without } from \"ramda\";\nimport { useTranslation } from \"react-i18next\";\n\nimport { filterBySearchTerm, removeFixedColumns } from \"./utils\";\n\nconst Columns = ({\n actionBlock,\n checkboxProps = {},\n columnData = [],\n dropdownProps = {},\n fixedColumns = [],\n isSearchable = false,\n localStorageKey = \"\",\n initialValue = [],\n noColumnMessage = i18next.t(\"neetoMolecules.columns.noColumns\"),\n onChange = identity,\n searchProps = {},\n}) => {\n const { Divider, Menu, MenuItem } = Dropdown;\n const [hiddenColumns, setHiddenColumns] = useLocalStorage(\n localStorageKey,\n initialValue\n );\n const [searchTerm, setSearchTerm] = useState(\"\");\n\n const columns = removeFixedColumns(fixedColumns, columnData);\n const filteredColumns = filterBySearchTerm(searchTerm, columns);\n\n const handleChange = ({ target: { name: dataIndex, checked } }) =>\n checked\n ? setHiddenColumns(without([dataIndex], hiddenColumns))\n : setHiddenColumns(append(dataIndex, hiddenColumns));\n\n const handleSearch = ({ target: { value } }) => setSearchTerm(value);\n\n useEffect(() => {\n onChange(removeBy({ dataIndex: includes(__, hiddenColumns) }, columnData));\n }, [columnData, hiddenColumns]);\n\n const { t } = useTranslation();\n\n return (\n <Dropdown\n buttonSize=\"medium\"\n buttonStyle=\"text\"\n closeOnSelect={false}\n label={t(\"neetoMolecules.columns.columns\")}\n position=\"bottom-end\"\n onClose={() => setSearchTerm(\"\")}\n {...dropdownProps}\n >\n <Menu>\n <div>\n {isSearchable && (\n <Input\n className=\"neeto-ui-px-3 neeto-ui-py-2\"\n data-cy=\"neeto-ui-columns-search\"\n placeholder={t(\"neetoMolecules.columns.search\")}\n prefix={<Search />}\n type=\"search\"\n value={searchTerm}\n onChange={handleSearch}\n {...searchProps}\n />\n )}\n {isNotEmpty(filteredColumns) ? (\n filteredColumns.map(({ dataIndex, key, title }) => (\n <MenuItem key={key}>\n <Label\n className=\"neeto-ui-w-full neeto-ui-px-3 neeto-ui-py-2 hover:neeto-ui-bg-gray-200 neeto-ui-cursor-pointer\"\n htmlFor={dataIndex}\n >\n <Checkbox\n checked={!hiddenColumns.includes(dataIndex)}\n data-cy=\"neeto-ui-columns-checkbox\"\n id={dataIndex}\n label={title}\n name={dataIndex}\n onChange={handleChange}\n {...checkboxProps}\n />\n </Label>\n </MenuItem>\n ))\n ) : (\n <span className=\"neeto-ui-flex neeto-ui-flex-col neeto-ui-items-center neeto-ui-p-2\">\n {noColumnMessage}\n </span>\n )}\n {!!actionBlock && (\n <>\n <Divider />\n {actionBlock}\n </>\n )}\n </div>\n </Menu>\n </Dropdown>\n );\n};\n\nColumns.propTypes = {\n /**\n * Extra action items that can be added at the end of the dropdown (optional).\n */\n actionBlock: PropTypes.element,\n /**\n * Additional props for the checkboxes in the dropdown (optional).\n */\n checkboxProps: PropTypes.object,\n /**\n * The list of columns from which the dropdown options are built (required).\n */\n columnData: PropTypes.array,\n /**\n * Additional props for the dropdown (optional).\n */\n dropdownProps: PropTypes.object,\n /**\n * The list of columns that are not allowed to be hidden. This is the `dataIndex` attribute from columnData (optional).\n */\n fixedColumns: PropTypes.array,\n /**\n * Controls whether the dropdown options should be searchable (optional).\n */\n isSearchable: PropTypes.bool,\n /**\n * The key used to store data in local storage (required).\n */\n localStorageKey: PropTypes.string,\n /**\n * The list of columns that are hidden on initial render. This is the `dataIndex` attribute from columnData (optional).\n */\n initialValue: PropTypes.array,\n /**\n * The message to be shown when there are no columns to be displayed in the dropdown (optional).\n */\n noColumnMessage: PropTypes.string,\n /**\n * Handler function that is called when a checkbox is selected or unselected.\n */\n onChange: PropTypes.func,\n /**\n * Props to be passed to the search input in the column dropdown. Only works when `isSearchable` is set to `true` (optional).\n */\n searchProps: PropTypes.object,\n};\n\nexport default Columns;\n"],"names":["arrayLikeToArray","arrayWithHoles","iterableToArrayLimit","unsupportedIterableToArray","nonIterableRest","removeFixedColumns","fixedColumns","columnData","removeBy","dataIndex","includes","__","filterBySearchTerm","searchTerm","columns","filter","_ref","title","trim","toLower","Columns","actionBlock","_ref$checkboxProps","checkboxProps","_ref$columnData","_ref$dropdownProps","dropdownProps","_ref$fixedColumns","_ref$isSearchable","isSearchable","_ref$localStorageKey","localStorageKey","_ref$initialValue","initialValue","_ref$noColumnMessage","noColumnMessage","i18next","t","_ref$onChange","onChange","identity","_ref$searchProps","searchProps","Divider","Dropdown","Menu","MenuItem","_useLocalStorage","useLocalStorage","_useLocalStorage2","_slicedToArray","hiddenColumns","setHiddenColumns","_useState","useState","_useState2","setSearchTerm","filteredColumns","handleChange","_ref2","_ref2$target","target","name","checked","without","append","handleSearch","_ref3","value","useEffect","_useTranslation","useTranslation","React","createElement","_extends","buttonSize","buttonStyle","closeOnSelect","label","position","onClose","Input","className","placeholder","prefix","Search","type","isNotEmpty","map","_ref4","key","Label","htmlFor","Checkbox","id","Fragment"],"mappings":";;;;;;;;;;;;;;;;AAAe,SAAS,QAAQ,GAAG;AACnC,EAAE,QAAQ,GAAG,MAAM,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,GAAG,UAAU,MAAM,EAAE;AACtE,IAAI,KAAK,IAAI,CAAC,GA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aAAa,CAACzC,QAAQ,CAACD,SAAS,CAAE;AAC5C,MAAA,SAAA,EAAQ,2BAA2B;AACnCqF,MAAAA,EAAE,EAAErF,SAAU;AACdqE,MAAAA,KAAK,EAAE7D,KAAM;AACb6C,MAAAA,IAAI,EAAErD,SAAU;AAChB8B,MAAAA,QAAQ,EAAEmB,YAAAA;KACNnC,EAAAA,aAAa,CACjB,CAAA,CACI,CACC,CAAA;AAAA,GACZ,CAAC,gBAEFiD,yBAAA,CAAAC,aAAA,CAAA,MAAA,EAAA;AAAMS,IAAAA,SAAS,EAAC,oEAAA;GACb/C,EAAAA,eAAe,CAEnB,EACA,CAAC,CAACd,WAAW,iBACZmD,yBAAA,CAAAC,aAAA,CAAAD,yBAAA,CAAAuB,QAAA,EACEvB,IAAAA,eAAAA,yBAAA,CAAAC,aAAA,CAAC9B,OAAO,EAAG,IAAA,CAAA,EACVtB,WAAW,CAEf,CACG,CACD,CACE,CAAA;AAEf;;;;"}
|
|
1
|
+
{"version":3,"file":"Columns.cjs.js","sources":["../node_modules/@babel/runtime/helpers/esm/extends.js","../node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js","../node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js","../node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js","../node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js","../node_modules/@babel/runtime/helpers/esm/nonIterableRest.js","../node_modules/@babel/runtime/helpers/esm/slicedToArray.js","../node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js","../node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js","../src/components/Columns/utils.js","../src/components/Columns/index.jsx"],"sourcesContent":["export default function _extends() {\n _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n}","export default function _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}","export default function _iterableToArrayLimit(arr, i) {\n var _i = null == arr ? null : \"undefined\" != typeof Symbol && arr[Symbol.iterator] || arr[\"@@iterator\"];\n if (null != _i) {\n var _s,\n _e,\n _x,\n _r,\n _arr = [],\n _n = !0,\n _d = !1;\n try {\n if (_x = (_i = _i.call(arr)).next, 0 === i) {\n if (Object(_i) !== _i) return;\n _n = !1;\n } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0);\n } catch (err) {\n _d = !0, _e = err;\n } finally {\n try {\n if (!_n && null != _i[\"return\"] && (_r = _i[\"return\"](), Object(_r) !== _r)) return;\n } finally {\n if (_d) throw _e;\n }\n }\n return _arr;\n }\n}","export default function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n return arr2;\n}","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nexport default function _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}","export default function _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}","import arrayWithHoles from \"./arrayWithHoles.js\";\nimport iterableToArrayLimit from \"./iterableToArrayLimit.js\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nimport nonIterableRest from \"./nonIterableRest.js\";\nexport default function _slicedToArray(arr, i) {\n return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();\n}","export default function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n return target;\n}","import objectWithoutPropertiesLoose from \"./objectWithoutPropertiesLoose.js\";\nexport default function _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n var target = objectWithoutPropertiesLoose(source, excluded);\n var key, i;\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n return target;\n}","import { removeBy } from \"neetocommons/pure\";\nimport { __, filter, includes, toLower, trim } from \"ramda\";\n\nexport const removeFixedColumns = (fixedColumns, columnData) =>\n removeBy({ dataIndex: includes(__, fixedColumns) }, columnData);\n\nexport const filterBySearchTerm = (searchTerm, columns) =>\n filter(\n ({ title }) => includes(trim(toLower(searchTerm)), trim(toLower(title))),\n columns\n );\n","import React, { useState, useEffect } from \"react\";\n\nimport i18next from \"i18next\";\nimport { isNotEmpty, removeBy } from \"neetocommons/pure\";\nimport { useLocalStorage } from \"neetocommons/react-utils\";\nimport { Search } from \"neetoicons\";\nimport { Checkbox, Dropdown, Input, Label } from \"neetoui\";\nimport PropTypes from \"prop-types\";\nimport { __, append, identity, includes, without } from \"ramda\";\nimport { useTranslation } from \"react-i18next\";\n\nimport { filterBySearchTerm, removeFixedColumns } from \"./utils\";\n\nconst Columns = ({\n actionBlock,\n checkboxProps = {},\n columnData = [],\n fixedColumns = [],\n isSearchable = false,\n localStorageKey = \"\",\n initialValue = [],\n noColumnMessage = i18next.t(\"neetoMolecules.columns.noColumns\"),\n onChange = identity,\n searchProps = {},\n ...dropdownProps\n}) => {\n const { Divider, Menu, MenuItem } = Dropdown;\n const [hiddenColumns, setHiddenColumns] = useLocalStorage(\n localStorageKey,\n initialValue\n );\n const [searchTerm, setSearchTerm] = useState(\"\");\n\n const columns = removeFixedColumns(fixedColumns, columnData);\n const filteredColumns = filterBySearchTerm(searchTerm, columns);\n\n const handleChange = ({ target: { name: dataIndex, checked } }) =>\n checked\n ? setHiddenColumns(without([dataIndex], hiddenColumns))\n : setHiddenColumns(append(dataIndex, hiddenColumns));\n\n const handleSearch = ({ target: { value } }) => setSearchTerm(value);\n\n useEffect(() => {\n onChange(removeBy({ dataIndex: includes(__, hiddenColumns) }, columnData));\n }, [columnData, hiddenColumns]);\n\n const { t } = useTranslation();\n\n return (\n <Dropdown\n buttonSize=\"medium\"\n buttonStyle=\"text\"\n closeOnSelect={false}\n label={t(\"neetoMolecules.columns.columns\")}\n position=\"bottom-end\"\n onClose={() => setSearchTerm(\"\")}\n {...dropdownProps}\n >\n <Menu>\n <div>\n {isSearchable && (\n <Input\n className=\"neeto-ui-px-3 neeto-ui-py-2\"\n data-cy=\"neeto-ui-columns-search\"\n placeholder={t(\"neetoMolecules.columns.search\")}\n prefix={<Search />}\n type=\"search\"\n value={searchTerm}\n onChange={handleSearch}\n {...searchProps}\n />\n )}\n {isNotEmpty(filteredColumns) ? (\n filteredColumns.map(({ dataIndex, key, title }) => (\n <MenuItem key={key}>\n <Label\n className=\"neeto-ui-w-full neeto-ui-px-3 neeto-ui-py-2 hover:neeto-ui-bg-gray-200 neeto-ui-cursor-pointer\"\n htmlFor={dataIndex}\n >\n <Checkbox\n checked={!hiddenColumns.includes(dataIndex)}\n data-cy=\"neeto-ui-columns-checkbox\"\n id={dataIndex}\n label={title}\n name={dataIndex}\n onChange={handleChange}\n {...checkboxProps}\n />\n </Label>\n </MenuItem>\n ))\n ) : (\n <span className=\"neeto-ui-flex neeto-ui-flex-col neeto-ui-items-center neeto-ui-p-2\">\n {noColumnMessage}\n </span>\n )}\n {!!actionBlock && (\n <>\n <Divider />\n {actionBlock}\n </>\n )}\n </div>\n </Menu>\n </Dropdown>\n );\n};\n\nColumns.propTypes = {\n /**\n * Extra action items that can be added at the end of the dropdown (optional).\n */\n actionBlock: PropTypes.element,\n /**\n * Additional props for the checkboxes in the dropdown (optional).\n */\n checkboxProps: PropTypes.object,\n /**\n * The list of columns from which the dropdown options are built (required).\n */\n columnData: PropTypes.array,\n /**\n * The list of columns that are not allowed to be hidden. This is the `dataIndex` attribute from columnData (optional).\n */\n fixedColumns: PropTypes.array,\n /**\n * Controls whether the dropdown options should be searchable (optional).\n */\n isSearchable: PropTypes.bool,\n /**\n * The key used to store data in local storage (required).\n */\n localStorageKey: PropTypes.string,\n /**\n * The list of columns that are hidden on initial render. This is the `dataIndex` attribute from columnData (optional).\n */\n initialValue: PropTypes.array,\n /**\n * The message to be shown when there are no columns to be displayed in the dropdown (optional).\n */\n noColumnMessage: PropTypes.string,\n /**\n * Handler function that is called when a checkbox is selected or unselected.\n */\n onChange: PropTypes.func,\n /**\n * Props to be passed to the search input in the column dropdown. Only works when `isSearchable` is set to `true` (optional).\n */\n searchProps: PropTypes.object,\n};\n\nexport default Columns;\n"],"names":["arrayLikeToArray","arrayWithHoles","iterableToArrayLimit","unsupportedIterableToArray","nonIterableRest","objectWithoutPropertiesLoose","removeFixedColumns","fixedColumns","columnData","removeBy","dataIndex","includes","__","filterBySearchTerm","searchTerm","columns","filter","_ref","title","trim","toLower","Columns","actionBlock","_ref$checkboxProps","checkboxProps","_ref$columnData","_ref$fixedColumns","_ref$isSearchable","isSearchable","_ref$localStorageKey","localStorageKey","_ref$initialValue","initialValue","_ref$noColumnMessage","noColumnMessage","i18next","t","_ref$onChange","onChange","identity","_ref$searchProps","searchProps","dropdownProps","_objectWithoutProperties","_excluded","Divider","Dropdown","Menu","MenuItem","_useLocalStorage","useLocalStorage","_useLocalStorage2","_slicedToArray","hiddenColumns","setHiddenColumns","_useState","useState","_useState2","setSearchTerm","filteredColumns","handleChange","_ref2","_ref2$target","target","name","checked","without","append","handleSearch","_ref3","value","useEffect","_useTranslation","useTranslation","React","createElement","_extends","buttonSize","buttonStyle","closeOnSelect","label","position","onClose","Input","className","placeholder","prefix","Search","type","isNotEmpty","map","_ref4","key","Label","htmlFor","Checkbox","id","Fragment"],"mappings":";;;;;;;;;;;;;;;;AAAe,SAAS,QAAQ,GAAG;AACnC,EAAE,QAAQ,GAAG,MAAM,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,GAAG,UAAU,MAAM,EAAE;AACtE,IAAI,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;AAC/C,MAAM,IAAI,MAAM,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC;AAChC,MAAM,KAAK,IAAI,GAAG,IAAI,MAAM,EAAE;AAC9B,QAAQ,IAAI,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE;AAC/D,UAAU,MAAM,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;AACpC,SAAS;AACT,OAAO;AACP,KAAK;AACL,IAAI,OAAO,MAAM,CAAC;AAClB,GAAG,CAAC;AACJ,EAAE,OAAO,QAAQ,CAAC,KAAK,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;AACzC;;ACbe,SAAS,eAAe,CAAC,GAAG,EAAE;AAC7C,EAAE,IAAI,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,OAAO,GAAG,CAAC;AACrC;;ACFe,SAAS,qBAAqB,CAAC,GAAG,EAAE,CAAC,EAAE;AACtD,EAAE,IAAI,EAAE,GAAG,IAAI,IAAI,GAAG,GAAG,IAAI,GAAG,WAAW,IAAI,OAAO,MAAM,IAAI,GAAG,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,GAAG,CAAC,YAAY,CAAC,CAAC;AAC1G,EAAE,I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ArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
78
78
|
}
|
|
79
79
|
|
|
80
|
+
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
81
|
+
if (source == null) return {};
|
|
82
|
+
var target = {};
|
|
83
|
+
var sourceKeys = Object.keys(source);
|
|
84
|
+
var key, i;
|
|
85
|
+
for (i = 0; i < sourceKeys.length; i++) {
|
|
86
|
+
key = sourceKeys[i];
|
|
87
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
88
|
+
target[key] = source[key];
|
|
89
|
+
}
|
|
90
|
+
return target;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
function _objectWithoutProperties(source, excluded) {
|
|
94
|
+
if (source == null) return {};
|
|
95
|
+
var target = _objectWithoutPropertiesLoose(source, excluded);
|
|
96
|
+
var key, i;
|
|
97
|
+
if (Object.getOwnPropertySymbols) {
|
|
98
|
+
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
99
|
+
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
|
100
|
+
key = sourceSymbolKeys[i];
|
|
101
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
102
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
103
|
+
target[key] = source[key];
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
return target;
|
|
107
|
+
}
|
|
108
|
+
|
|
80
109
|
var removeFixedColumns = function removeFixedColumns(fixedColumns, columnData) {
|
|
81
110
|
return removeBy({
|
|
82
111
|
dataIndex: includes(__, fixedColumns)
|
|
@@ -89,14 +118,13 @@ var filterBySearchTerm = function filterBySearchTerm(searchTerm, columns) {
|
|
|
89
118
|
}, columns);
|
|
90
119
|
};
|
|
91
120
|
|
|
121
|
+
var _excluded = ["actionBlock", "checkboxProps", "columnData", "fixedColumns", "isSearchable", "localStorageKey", "initialValue", "noColumnMessage", "onChange", "searchProps"];
|
|
92
122
|
var Columns = function Columns(_ref) {
|
|
93
123
|
var actionBlock = _ref.actionBlock,
|
|
94
124
|
_ref$checkboxProps = _ref.checkboxProps,
|
|
95
125
|
checkboxProps = _ref$checkboxProps === void 0 ? {} : _ref$checkboxProps,
|
|
96
126
|
_ref$columnData = _ref.columnData,
|
|
97
127
|
columnData = _ref$columnData === void 0 ? [] : _ref$columnData,
|
|
98
|
-
_ref$dropdownProps = _ref.dropdownProps,
|
|
99
|
-
dropdownProps = _ref$dropdownProps === void 0 ? {} : _ref$dropdownProps,
|
|
100
128
|
_ref$fixedColumns = _ref.fixedColumns,
|
|
101
129
|
fixedColumns = _ref$fixedColumns === void 0 ? [] : _ref$fixedColumns,
|
|
102
130
|
_ref$isSearchable = _ref.isSearchable,
|
|
@@ -110,7 +138,8 @@ var Columns = function Columns(_ref) {
|
|
|
110
138
|
_ref$onChange = _ref.onChange,
|
|
111
139
|
onChange = _ref$onChange === void 0 ? identity : _ref$onChange,
|
|
112
140
|
_ref$searchProps = _ref.searchProps,
|
|
113
|
-
searchProps = _ref$searchProps === void 0 ? {} : _ref$searchProps
|
|
141
|
+
searchProps = _ref$searchProps === void 0 ? {} : _ref$searchProps,
|
|
142
|
+
dropdownProps = _objectWithoutProperties(_ref, _excluded);
|
|
114
143
|
var Divider = Dropdown.Divider,
|
|
115
144
|
Menu = Dropdown.Menu,
|
|
116
145
|
MenuItem = Dropdown.MenuItem;
|
package/dist/Columns.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Columns.js","sources":["../node_modules/@babel/runtime/helpers/esm/extends.js","../node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js","../node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js","../node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js","../node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js","../node_modules/@babel/runtime/helpers/esm/nonIterableRest.js","../node_modules/@babel/runtime/helpers/esm/slicedToArray.js","../src/components/Columns/utils.js","../src/components/Columns/index.jsx"],"sourcesContent":["export default function _extends() {\n _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n}","export default function _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}","export default function _iterableToArrayLimit(arr, i) {\n var _i = null == arr ? null : \"undefined\" != typeof Symbol && arr[Symbol.iterator] || arr[\"@@iterator\"];\n if (null != _i) {\n var _s,\n _e,\n _x,\n _r,\n _arr = [],\n _n = !0,\n _d = !1;\n try {\n if (_x = (_i = _i.call(arr)).next, 0 === i) {\n if (Object(_i) !== _i) return;\n _n = !1;\n } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0);\n } catch (err) {\n _d = !0, _e = err;\n } finally {\n try {\n if (!_n && null != _i[\"return\"] && (_r = _i[\"return\"](), Object(_r) !== _r)) return;\n } finally {\n if (_d) throw _e;\n }\n }\n return _arr;\n }\n}","export default function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n return arr2;\n}","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nexport default function _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}","export default function _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}","import arrayWithHoles from \"./arrayWithHoles.js\";\nimport iterableToArrayLimit from \"./iterableToArrayLimit.js\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nimport nonIterableRest from \"./nonIterableRest.js\";\nexport default function _slicedToArray(arr, i) {\n return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();\n}","import { removeBy } from \"neetocommons/pure\";\nimport { __, filter, includes, toLower, trim } from \"ramda\";\n\nexport const removeFixedColumns = (fixedColumns, columnData) =>\n removeBy({ dataIndex: includes(__, fixedColumns) }, columnData);\n\nexport const filterBySearchTerm = (searchTerm, columns) =>\n filter(\n ({ title }) => includes(trim(toLower(searchTerm)), trim(toLower(title))),\n columns\n );\n","import React, { useState, useEffect } from \"react\";\n\nimport i18next from \"i18next\";\nimport { isNotEmpty, removeBy } from \"neetocommons/pure\";\nimport { useLocalStorage } from \"neetocommons/react-utils\";\nimport { Search } from \"neetoicons\";\nimport { Checkbox, Dropdown, Input, Label } from \"neetoui\";\nimport PropTypes from \"prop-types\";\nimport { __, append, identity, includes, without } from \"ramda\";\nimport { useTranslation } from \"react-i18next\";\n\nimport { filterBySearchTerm, removeFixedColumns } from \"./utils\";\n\nconst Columns = ({\n actionBlock,\n checkboxProps = {},\n columnData = [],\n dropdownProps = {},\n fixedColumns = [],\n isSearchable = false,\n localStorageKey = \"\",\n initialValue = [],\n noColumnMessage = i18next.t(\"neetoMolecules.columns.noColumns\"),\n onChange = identity,\n searchProps = {},\n}) => {\n const { Divider, Menu, MenuItem } = Dropdown;\n const [hiddenColumns, setHiddenColumns] = useLocalStorage(\n localStorageKey,\n initialValue\n );\n const [searchTerm, setSearchTerm] = useState(\"\");\n\n const columns = removeFixedColumns(fixedColumns, columnData);\n const filteredColumns = filterBySearchTerm(searchTerm, columns);\n\n const handleChange = ({ target: { name: dataIndex, checked } }) =>\n checked\n ? setHiddenColumns(without([dataIndex], hiddenColumns))\n : setHiddenColumns(append(dataIndex, hiddenColumns));\n\n const handleSearch = ({ target: { value } }) => setSearchTerm(value);\n\n useEffect(() => {\n onChange(removeBy({ dataIndex: includes(__, hiddenColumns) }, columnData));\n }, [columnData, hiddenColumns]);\n\n const { t } = useTranslation();\n\n return (\n <Dropdown\n buttonSize=\"medium\"\n buttonStyle=\"text\"\n closeOnSelect={false}\n label={t(\"neetoMolecules.columns.columns\")}\n position=\"bottom-end\"\n onClose={() => setSearchTerm(\"\")}\n {...dropdownProps}\n >\n <Menu>\n <div>\n {isSearchable && (\n <Input\n className=\"neeto-ui-px-3 neeto-ui-py-2\"\n data-cy=\"neeto-ui-columns-search\"\n placeholder={t(\"neetoMolecules.columns.search\")}\n prefix={<Search />}\n type=\"search\"\n value={searchTerm}\n onChange={handleSearch}\n {...searchProps}\n />\n )}\n {isNotEmpty(filteredColumns) ? (\n filteredColumns.map(({ dataIndex, key, title }) => (\n <MenuItem key={key}>\n <Label\n className=\"neeto-ui-w-full neeto-ui-px-3 neeto-ui-py-2 hover:neeto-ui-bg-gray-200 neeto-ui-cursor-pointer\"\n htmlFor={dataIndex}\n >\n <Checkbox\n checked={!hiddenColumns.includes(dataIndex)}\n data-cy=\"neeto-ui-columns-checkbox\"\n id={dataIndex}\n label={title}\n name={dataIndex}\n onChange={handleChange}\n {...checkboxProps}\n />\n </Label>\n </MenuItem>\n ))\n ) : (\n <span className=\"neeto-ui-flex neeto-ui-flex-col neeto-ui-items-center neeto-ui-p-2\">\n {noColumnMessage}\n </span>\n )}\n {!!actionBlock && (\n <>\n <Divider />\n {actionBlock}\n </>\n )}\n </div>\n </Menu>\n </Dropdown>\n );\n};\n\nColumns.propTypes = {\n /**\n * Extra action items that can be added at the end of the dropdown (optional).\n */\n actionBlock: PropTypes.element,\n /**\n * Additional props for the checkboxes in the dropdown (optional).\n */\n checkboxProps: PropTypes.object,\n /**\n * The list of columns from which the dropdown options are built (required).\n */\n columnData: PropTypes.array,\n /**\n * Additional props for the dropdown (optional).\n */\n dropdownProps: PropTypes.object,\n /**\n * The list of columns that are not allowed to be hidden. This is the `dataIndex` attribute from columnData (optional).\n */\n fixedColumns: PropTypes.array,\n /**\n * Controls whether the dropdown options should be searchable (optional).\n */\n isSearchable: PropTypes.bool,\n /**\n * The key used to store data in local storage (required).\n */\n localStorageKey: PropTypes.string,\n /**\n * The list of columns that are hidden on initial render. This is the `dataIndex` attribute from columnData (optional).\n */\n initialValue: PropTypes.array,\n /**\n * The message to be shown when there are no columns to be displayed in the dropdown (optional).\n */\n noColumnMessage: PropTypes.string,\n /**\n * Handler function that is called when a checkbox is selected or unselected.\n */\n onChange: PropTypes.func,\n /**\n * Props to be passed to the search input in the column dropdown. Only works when `isSearchable` is set to `true` (optional).\n */\n searchProps: PropTypes.object,\n};\n\nexport default Columns;\n"],"names":["arrayLikeToArray","arrayWithHoles","iterableToArrayLimit","unsupportedIterableToArray","nonIterableRest","removeFixedColumns","fixedColumns","columnData","removeBy","dataIndex","includes","__","filterBySearchTerm","searchTerm","columns","filter","_ref","title","trim","toLower","Columns","actionBlock","_ref$checkboxProps","checkboxProps","_ref$columnData","_ref$dropdownProps","dropdownProps","_ref$fixedColumns","_ref$isSearchable","isSearchable","_ref$localStorageKey","localStorageKey","_ref$initialValue","initialValue","_ref$noColumnMessage","noColumnMessage","i18next","t","_ref$onChange","onChange","identity","_ref$searchProps","searchProps","Divider","Dropdown","Menu","MenuItem","_useLocalStorage","useLocalStorage","_useLocalStorage2","_slicedToArray","hiddenColumns","setHiddenColumns","_useState","useState","_useState2","setSearchTerm","filteredColumns","handleChange","_ref2","_ref2$target","target","name","checked","without","append","handleSearch","_ref3","value","useEffect","_useTranslation","useTranslation","React","createElement","_extends","buttonSize","buttonStyle","closeOnSelect","label","position","onClose","Input","className","placeholder","prefix","Search","type","isNotEmpty","map","_ref4","key","Label","htmlFor","Checkbox","id","Fragment"],"mappings":";;;;;;;;;AAAe,SAAS,QAAQ,GAAG;AACnC,EAAE,QAAQ,GAAG,MAAM,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,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AA;AACPX,MAAAA,OAAO,EAAE,CAACZ,aAAa,CAACzC,QAAQ,CAACD,SAAS,CAAE;AAC5C,MAAA,SAAA,EAAQ,2BAA2B;AACnCqF,MAAAA,EAAE,EAAErF,SAAU;AACdqE,MAAAA,KAAK,EAAE7D,KAAM;AACb6C,MAAAA,IAAI,EAAErD,SAAU;AAChB8B,MAAAA,QAAQ,EAAEmB,YAAAA;KACNnC,EAAAA,aAAa,CACjB,CAAA,CACI,CACC,CAAA;AAAA,GACZ,CAAC,gBAEFiD,KAAA,CAAAC,aAAA,CAAA,MAAA,EAAA;AAAMS,IAAAA,SAAS,EAAC,oEAAA;GACb/C,EAAAA,eAAe,CAEnB,EACA,CAAC,CAACd,WAAW,iBACZmD,KAAA,CAAAC,aAAA,CAAAD,KAAA,CAAAuB,QAAA,EACEvB,IAAAA,eAAAA,KAAA,CAAAC,aAAA,CAAC9B,OAAO,EAAG,IAAA,CAAA,EACVtB,WAAW,CAEf,CACG,CACD,CACE,CAAA;AAEf;;;;"}
|
|
1
|
+
{"version":3,"file":"Columns.js","sources":["../node_modules/@babel/runtime/helpers/esm/extends.js","../node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js","../node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js","../node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js","../node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js","../node_modules/@babel/runtime/helpers/esm/nonIterableRest.js","../node_modules/@babel/runtime/helpers/esm/slicedToArray.js","../node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js","../node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js","../src/components/Columns/utils.js","../src/components/Columns/index.jsx"],"sourcesContent":["export default function _extends() {\n _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n}","export default function _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}","export default function _iterableToArrayLimit(arr, i) {\n var _i = null == arr ? null : \"undefined\" != typeof Symbol && arr[Symbol.iterator] || arr[\"@@iterator\"];\n if (null != _i) {\n var _s,\n _e,\n _x,\n _r,\n _arr = [],\n _n = !0,\n _d = !1;\n try {\n if (_x = (_i = _i.call(arr)).next, 0 === i) {\n if (Object(_i) !== _i) return;\n _n = !1;\n } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0);\n } catch (err) {\n _d = !0, _e = err;\n } finally {\n try {\n if (!_n && null != _i[\"return\"] && (_r = _i[\"return\"](), Object(_r) !== _r)) return;\n } finally {\n if (_d) throw _e;\n }\n }\n return _arr;\n }\n}","export default function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n return arr2;\n}","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nexport default function _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}","export default function _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}","import arrayWithHoles from \"./arrayWithHoles.js\";\nimport iterableToArrayLimit from \"./iterableToArrayLimit.js\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nimport nonIterableRest from \"./nonIterableRest.js\";\nexport default function _slicedToArray(arr, i) {\n return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();\n}","export default function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n return target;\n}","import objectWithoutPropertiesLoose from \"./objectWithoutPropertiesLoose.js\";\nexport default function _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n var target = objectWithoutPropertiesLoose(source, excluded);\n var key, i;\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n return target;\n}","import { removeBy } from \"neetocommons/pure\";\nimport { __, filter, includes, toLower, trim } from \"ramda\";\n\nexport const removeFixedColumns = (fixedColumns, columnData) =>\n removeBy({ dataIndex: includes(__, fixedColumns) }, columnData);\n\nexport const filterBySearchTerm = (searchTerm, columns) =>\n filter(\n ({ title }) => includes(trim(toLower(searchTerm)), trim(toLower(title))),\n columns\n );\n","import React, { useState, useEffect } from \"react\";\n\nimport i18next from \"i18next\";\nimport { isNotEmpty, removeBy } from \"neetocommons/pure\";\nimport { useLocalStorage } from \"neetocommons/react-utils\";\nimport { Search } from \"neetoicons\";\nimport { Checkbox, Dropdown, Input, Label } from \"neetoui\";\nimport PropTypes from \"prop-types\";\nimport { __, append, identity, includes, without } from \"ramda\";\nimport { useTranslation } from \"react-i18next\";\n\nimport { filterBySearchTerm, removeFixedColumns } from \"./utils\";\n\nconst Columns = ({\n actionBlock,\n checkboxProps = {},\n columnData = [],\n fixedColumns = [],\n isSearchable = false,\n localStorageKey = \"\",\n initialValue = [],\n noColumnMessage = i18next.t(\"neetoMolecules.columns.noColumns\"),\n onChange = identity,\n searchProps = {},\n ...dropdownProps\n}) => {\n const { Divider, Menu, MenuItem } = Dropdown;\n const [hiddenColumns, setHiddenColumns] = useLocalStorage(\n localStorageKey,\n initialValue\n );\n const [searchTerm, setSearchTerm] = useState(\"\");\n\n const columns = removeFixedColumns(fixedColumns, columnData);\n const filteredColumns = filterBySearchTerm(searchTerm, columns);\n\n const handleChange = ({ target: { name: dataIndex, checked } }) =>\n checked\n ? setHiddenColumns(without([dataIndex], hiddenColumns))\n : setHiddenColumns(append(dataIndex, hiddenColumns));\n\n const handleSearch = ({ target: { value } }) => setSearchTerm(value);\n\n useEffect(() => {\n onChange(removeBy({ dataIndex: includes(__, hiddenColumns) }, columnData));\n }, [columnData, hiddenColumns]);\n\n const { t } = useTranslation();\n\n return (\n <Dropdown\n buttonSize=\"medium\"\n buttonStyle=\"text\"\n closeOnSelect={false}\n label={t(\"neetoMolecules.columns.columns\")}\n position=\"bottom-end\"\n onClose={() => setSearchTerm(\"\")}\n {...dropdownProps}\n >\n <Menu>\n <div>\n {isSearchable && (\n <Input\n className=\"neeto-ui-px-3 neeto-ui-py-2\"\n data-cy=\"neeto-ui-columns-search\"\n placeholder={t(\"neetoMolecules.columns.search\")}\n prefix={<Search />}\n type=\"search\"\n value={searchTerm}\n onChange={handleSearch}\n {...searchProps}\n />\n )}\n {isNotEmpty(filteredColumns) ? (\n filteredColumns.map(({ dataIndex, key, title }) => (\n <MenuItem key={key}>\n <Label\n className=\"neeto-ui-w-full neeto-ui-px-3 neeto-ui-py-2 hover:neeto-ui-bg-gray-200 neeto-ui-cursor-pointer\"\n htmlFor={dataIndex}\n >\n <Checkbox\n checked={!hiddenColumns.includes(dataIndex)}\n data-cy=\"neeto-ui-columns-checkbox\"\n id={dataIndex}\n label={title}\n name={dataIndex}\n onChange={handleChange}\n {...checkboxProps}\n />\n </Label>\n </MenuItem>\n ))\n ) : (\n <span className=\"neeto-ui-flex neeto-ui-flex-col neeto-ui-items-center neeto-ui-p-2\">\n {noColumnMessage}\n </span>\n )}\n {!!actionBlock && (\n <>\n <Divider />\n {actionBlock}\n </>\n )}\n </div>\n </Menu>\n </Dropdown>\n );\n};\n\nColumns.propTypes = {\n /**\n * Extra action items that can be added at the end of the dropdown (optional).\n */\n actionBlock: PropTypes.element,\n /**\n * Additional props for the checkboxes in the dropdown (optional).\n */\n checkboxProps: PropTypes.object,\n /**\n * The list of columns from which the dropdown options are built (required).\n */\n columnData: PropTypes.array,\n /**\n * The list of columns that are not allowed to be hidden. This is the `dataIndex` attribute from columnData (optional).\n */\n fixedColumns: PropTypes.array,\n /**\n * Controls whether the dropdown options should be searchable (optional).\n */\n isSearchable: PropTypes.bool,\n /**\n * The key used to store data in local storage (required).\n */\n localStorageKey: PropTypes.string,\n /**\n * The list of columns that are hidden on initial render. This is the `dataIndex` attribute from columnData (optional).\n */\n initialValue: PropTypes.array,\n /**\n * The message to be shown when there are no columns to be displayed in the dropdown (optional).\n */\n noColumnMessage: PropTypes.string,\n /**\n * Handler function that is called when a checkbox is selected or unselected.\n */\n onChange: PropTypes.func,\n /**\n * Props to be passed to the search input in the column dropdown. Only works when `isSearchable` is set to `true` (optional).\n */\n searchProps: PropTypes.object,\n};\n\nexport default Columns;\n"],"names":["arrayLikeToArray","arrayWithHoles","iterableToArrayLimit","unsupportedIterableToArray","nonIterableRest","objectWithoutPropertiesLoose","removeFixedColumns","fixedColumns","columnData","removeBy","dataIndex","includes","__","filterBySearchTerm","searchTerm","columns","filter","_ref","title","trim","toLower","Columns","actionBlock","_ref$checkboxProps","checkboxProps","_ref$columnData","_ref$fixedColumns","_ref$isSearchable","isSearchable","_ref$localStorageKey","localStorageKey","_ref$initialValue","initialValue","_ref$noColumnMessage","noColumnMessage","i18next","t","_ref$onChange","onChange","identity","_ref$searchProps","searchProps","dropdownProps","_objectWithoutProperties","_excluded","Divider","Dropdown","Menu","MenuItem","_useLocalStorage","useLocalStorage","_useLocalStorage2","_slicedToArray","hiddenColumns","setHiddenColumns","_useState","useState","_useState2","setSearchTerm","filteredColumns","handleChange","_ref2","_ref2$target","target","name","checked","without","append","handleSearch","_ref3","value","useEffect","_useTranslation","useTranslation","React","createElement","_extends","buttonSize","buttonStyle","closeOnSelect","label","position","onClose","Input","className","placeholder","prefix","Search","type","isNotEmpty","map","_ref4","key","Label","htmlFor","Checkbox","id","Fragment"],"mappings":";;;;;;;;;AAAe,SAAS,QAAQ,GAAG;AACnC,EAAE,QAAQ,GAAG,MAAM,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,GAAG,UAAU,MAAM,EAAE;AACtE,IAAI,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;AAC/C,MAAM,IAAI,MAAM,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC;AAChC,MAAM,KAAK,IAAI,GAAG,IAAI,MAAM,EAAE;AAC9B,QAAQ,IAAI,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE;AAC/D,UAAU,MAAM,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;AACpC,SAAS;AACT,OAAO;AACP,KAAK;AACL,IAAI,OAAO,MAAM,CAAC;AAClB,GAAG,CAAC;AACJ,EAAE,OAAO,QAAQ,CAAC,KAAK,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;AACzC;;ACbe,SAAS,eAAe,CAAC,GAAG,EAAE;AAC7C,EAAE,IAAI,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,OAAO,GAAG,CAAC;AACrC;;ACFe,SAAS,qBAAqB,CAAC,GAAG,EAAE,CAAC,EAAE;AACtD,EAAE,IAAI,EAAE,GAAG,IAAI,IAAI,GAAG,GAAG,IAAI,GAAG,WAAW,IAAI,OAAO,MAAM,IAAI,GAAG,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,GAAG,CAAC,YAAY,CAAC,CA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=[],t=[];function n(n,r){if(n&&"undefined"!=typeof document){var a,s=!0===r.prepend?"prepend":"append",d=!0===r.singleTag,i="string"==typeof r.container?document.querySelector(r.container):document.getElementsByTagName("head")[0];if(d){var u=e.indexOf(i);-1===u&&(u=e.push(i)-1,t[u]={}),a=t[u]&&t[u][s]?t[u][s]:t[u][s]=c();}else a=c();65279===n.charCodeAt(0)&&(n=n.substring(1)),a.styleSheet?a.styleSheet.cssText+=n:a.appendChild(document.createTextNode(n));}function c(){var e=document.createElement("style");if(e.setAttribute("type","text/css"),r.attributes)for(var t=Object.keys(r.attributes),n=0;n<t.length;n++)e.setAttribute(t[n],r.attributes[t[n]]);var a="prepend"===s?"afterbegin":"beforeend";return i.insertAdjacentElement(a,e),e}}
|
|
1253
1253
|
|
|
1254
|
-
var css = ".neeto-molecules-container{align-items:flex-start;display:flex;flex-direction:column;flex-grow:1;height:100vh;justify-content:flex-start;overflow-y:auto;padding:0
|
|
1254
|
+
var css = ".neeto-molecules-container{align-items:flex-start;display:flex;flex-direction:column;flex-grow:1;height:100vh;justify-content:flex-start;overflow-y:auto;padding:0 24px}.neeto-molecules-container--header-fixed{padding:0}.neeto-molecules-container--header-fixed>.neeto-molecules-header,.neeto-molecules-container--header-fixed>.neeto-molecules-scrollable,.neeto-molecules-container--header-fixed>.neeto-molecules-subheader{padding-left:24px;padding-right:24px}";
|
|
1255
1255
|
n(css,{});
|
|
1256
1256
|
|
|
1257
1257
|
var Container = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
package/dist/Container.js
CHANGED
|
@@ -1245,7 +1245,7 @@ if (process.env.NODE_ENV !== 'production') {
|
|
|
1245
1245
|
|
|
1246
1246
|
var e=[],t=[];function n(n,r){if(n&&"undefined"!=typeof document){var a,s=!0===r.prepend?"prepend":"append",d=!0===r.singleTag,i="string"==typeof r.container?document.querySelector(r.container):document.getElementsByTagName("head")[0];if(d){var u=e.indexOf(i);-1===u&&(u=e.push(i)-1,t[u]={}),a=t[u]&&t[u][s]?t[u][s]:t[u][s]=c();}else a=c();65279===n.charCodeAt(0)&&(n=n.substring(1)),a.styleSheet?a.styleSheet.cssText+=n:a.appendChild(document.createTextNode(n));}function c(){var e=document.createElement("style");if(e.setAttribute("type","text/css"),r.attributes)for(var t=Object.keys(r.attributes),n=0;n<t.length;n++)e.setAttribute(t[n],r.attributes[t[n]]);var a="prepend"===s?"afterbegin":"beforeend";return i.insertAdjacentElement(a,e),e}}
|
|
1247
1247
|
|
|
1248
|
-
var css = ".neeto-molecules-container{align-items:flex-start;display:flex;flex-direction:column;flex-grow:1;height:100vh;justify-content:flex-start;overflow-y:auto;padding:0
|
|
1248
|
+
var css = ".neeto-molecules-container{align-items:flex-start;display:flex;flex-direction:column;flex-grow:1;height:100vh;justify-content:flex-start;overflow-y:auto;padding:0 24px}.neeto-molecules-container--header-fixed{padding:0}.neeto-molecules-container--header-fixed>.neeto-molecules-header,.neeto-molecules-container--header-fixed>.neeto-molecules-scrollable,.neeto-molecules-container--header-fixed>.neeto-molecules-subheader{padding-left:24px;padding-right:24px}";
|
|
1249
1249
|
n(css,{});
|
|
1250
1250
|
|
|
1251
1251
|
var Container = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
@@ -9,6 +9,7 @@ var neetoIcons = require('@bigbinary/neeto-icons');
|
|
|
9
9
|
var ManageColumns = require('@bigbinary/neeto-molecules/Columns');
|
|
10
10
|
var neetoFiltersFrontend = require('@bigbinary/neeto-filters-frontend');
|
|
11
11
|
var utils = require('@bigbinary/neeto-commons-frontend/utils');
|
|
12
|
+
var ramda = require('ramda');
|
|
12
13
|
var reactRouterDom = require('react-router-dom');
|
|
13
14
|
var formik = require('formik');
|
|
14
15
|
var formik$1 = require('@bigbinary/neetoui/formik');
|
|
@@ -1343,7 +1344,7 @@ if (process.env.NODE_ENV !== 'production') {
|
|
|
1343
1344
|
|
|
1344
1345
|
var e=[],t=[];function n(n,r){if(n&&"undefined"!=typeof document){var a,s=!0===r.prepend?"prepend":"append",d=!0===r.singleTag,i="string"==typeof r.container?document.querySelector(r.container):document.getElementsByTagName("head")[0];if(d){var u=e.indexOf(i);-1===u&&(u=e.push(i)-1,t[u]={}),a=t[u]&&t[u][s]?t[u][s]:t[u][s]=c();}else a=c();65279===n.charCodeAt(0)&&(n=n.substring(1)),a.styleSheet?a.styleSheet.cssText+=n:a.appendChild(document.createTextNode(n));}function c(){var e=document.createElement("style");if(e.setAttribute("type","text/css"),r.attributes)for(var t=Object.keys(r.attributes),n=0;n<t.length;n++)e.setAttribute(t[n],r.attributes[t[n]]);var a="prepend"===s?"afterbegin":"beforeend";return i.insertAdjacentElement(a,e),e}}
|
|
1345
1346
|
|
|
1346
|
-
var css$3 = ".neeto-molecules-container{align-items:flex-start;display:flex;flex-direction:column;flex-grow:1;height:100vh;justify-content:flex-start;overflow-y:auto;padding:0
|
|
1347
|
+
var css$3 = ".neeto-molecules-container{align-items:flex-start;display:flex;flex-direction:column;flex-grow:1;height:100vh;justify-content:flex-start;overflow-y:auto;padding:0 24px}.neeto-molecules-container--header-fixed{padding:0}.neeto-molecules-container--header-fixed>.neeto-molecules-header,.neeto-molecules-container--header-fixed>.neeto-molecules-scrollable,.neeto-molecules-container--header-fixed>.neeto-molecules-subheader{padding-left:24px;padding-right:24px}";
|
|
1347
1348
|
n(css$3,{});
|
|
1348
1349
|
|
|
1349
1350
|
var Container = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
@@ -1458,11 +1459,11 @@ var SvgNeeto = function SvgNeeto(props) {
|
|
|
1458
1459
|
var css$2 = ".neeto-molecules-pageloader__wrapper{height:100%;position:relative;width:100%}.neeto-molecules-pageloader__wrapper .neeto-molecules-pageloader{height:100%;left:0;position:absolute;top:0;width:100%}.neeto-molecules-pageloader__wrapper .neeto-molecules-pageloader__content{height:66px;margin-bottom:16px;overflow:hidden;padding:8px;position:relative;width:66px}.neeto-molecules-pageloader__wrapper .neeto-molecules-pageloader__text{color:rgb(var(--neeto-ui-gray-800));font-size:1.25rem;line-height:1.75rem;margin-bottom:4rem;text-align:center}.neeto-molecules-pageloader__spinner{display:flex;gap:2px;height:25px;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%)}.neeto-molecules-pageloader__spinner>div{animation:neeto-ui-stretch-delay 1.2s ease-in-out infinite;background-color:#fff;border-radius:2px;display:inline-flex;height:100%;width:2px}.neeto-molecules-pageloader__spinner .neeto-molecules-pageloader__rect2{animation-delay:-1.1s}.neeto-molecules-pageloader__spinner .neeto-molecules-pageloader__rect3{animation-delay:-1s}.neeto-molecules-pageloader__spinner .neeto-molecules-pageloader__rect4{animation-delay:-.9s}.neeto-molecules-pageloader__spinner .neeto-molecules-pageloader__rect5{animation-delay:-.8s}@keyframes neeto-ui-stretch-delay{0%,40%,to{transform:scaleY(.4);-webkit-transform:scaleY(.4)}20%{transform:scaleY(1);-webkit-transform:scaleY(1)}}";
|
|
1459
1460
|
n(css$2,{});
|
|
1460
1461
|
|
|
1461
|
-
var _excluded$
|
|
1462
|
+
var _excluded$2 = ["text"];
|
|
1462
1463
|
var PageLoader = function PageLoader(_ref) {
|
|
1463
1464
|
var _ref$text = _ref.text,
|
|
1464
1465
|
text = _ref$text === void 0 ? "" : _ref$text,
|
|
1465
|
-
otherProps = _objectWithoutProperties(_ref, _excluded$
|
|
1466
|
+
otherProps = _objectWithoutProperties(_ref, _excluded$2);
|
|
1466
1467
|
return /*#__PURE__*/React__default["default"].createElement("div", _extends$1({
|
|
1467
1468
|
className: "neeto-molecules-pageloader__wrapper"
|
|
1468
1469
|
}, otherProps), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
@@ -1532,33 +1533,28 @@ function _defineProperty(obj, key, value) {
|
|
|
1532
1533
|
return obj;
|
|
1533
1534
|
}
|
|
1534
1535
|
|
|
1535
|
-
var _excluded$
|
|
1536
|
-
_excluded2 = ["buttonProps"];
|
|
1536
|
+
var _excluded$1 = ["buttonProps"];
|
|
1537
1537
|
function ownKeys$2(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
1538
1538
|
function _objectSpread$2(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$2(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$2(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
1539
1539
|
var Columns = function Columns(_ref) {
|
|
1540
|
-
var _ref$
|
|
1541
|
-
|
|
1542
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
1540
|
+
var _ref$buttonProps = _ref.buttonProps,
|
|
1541
|
+
buttonProps = _ref$buttonProps === void 0 ? {} : _ref$buttonProps,
|
|
1542
|
+
props = _objectWithoutProperties(_ref, _excluded$1);
|
|
1543
1543
|
var _useTranslation = reactI18next.useTranslation(),
|
|
1544
1544
|
t = _useTranslation.t;
|
|
1545
|
-
var buttonProps = dropdownProps.buttonProps,
|
|
1546
|
-
restDropdownProps = _objectWithoutProperties(dropdownProps, _excluded2);
|
|
1547
1545
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1548
1546
|
className: "neeto-molecules-subheader__columns"
|
|
1549
1547
|
}, /*#__PURE__*/React__default["default"].createElement(ManageColumns__default["default"], _extends$1({
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
}, buttonProps)
|
|
1561
|
-
}, restDropdownProps)
|
|
1548
|
+
buttonProps: _objectSpread$2({
|
|
1549
|
+
icon: neetoIcons.Column,
|
|
1550
|
+
label: null,
|
|
1551
|
+
tooltipProps: {
|
|
1552
|
+
content: t("neetoMolecules.columns.columns"),
|
|
1553
|
+
position: "bottom"
|
|
1554
|
+
},
|
|
1555
|
+
"data-testid": "columns-button",
|
|
1556
|
+
"data-cy": "columns-dropdown-button"
|
|
1557
|
+
}, buttonProps)
|
|
1562
1558
|
}, props)));
|
|
1563
1559
|
};
|
|
1564
1560
|
|
|
@@ -1586,12 +1582,12 @@ var DownloadButton = function DownloadButton(_ref) {
|
|
|
1586
1582
|
}, count));
|
|
1587
1583
|
};
|
|
1588
1584
|
|
|
1589
|
-
var _excluded
|
|
1585
|
+
var _excluded = ["buttonProps"];
|
|
1590
1586
|
function ownKeys$1(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
1591
1587
|
function _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$1(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$1(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
1592
1588
|
var FilterButton = function FilterButton(_ref) {
|
|
1593
1589
|
var buttonProps = _ref.buttonProps,
|
|
1594
|
-
props = _objectWithoutProperties(_ref, _excluded
|
|
1590
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
1595
1591
|
var _useTranslation = reactI18next.useTranslation(),
|
|
1596
1592
|
t = _useTranslation.t;
|
|
1597
1593
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
@@ -1665,7 +1661,7 @@ var DeleteAlert = function DeleteAlert(_ref) {
|
|
|
1665
1661
|
});
|
|
1666
1662
|
};
|
|
1667
1663
|
|
|
1668
|
-
var css = ".neeto-molecules-header{align-items:
|
|
1664
|
+
var css = ".neeto-molecules-header{align-items:center;background:rgb(var(--neeto-ui-white));display:flex;flex-direction:row;justify-content:space-between;min-height:var(--neeto-ui-main-header-height);padding:24px 0;width:100%}.neeto-molecules-header--has-breadcrumbs{min-height:var(--neeto-ui-main-header-with-breadcrumbs-height)}.neeto-molecules-header .neeto-molecules-header__toggle-menubar-btn{margin-right:8px}.neeto-molecules-header .neeto-molecules-header__left{align-items:center;display:flex;flex-direction:row;flex-wrap:wrap;justify-content:flex-start}.neeto-molecules-header .neeto-molecules-header__left-data-wrap{display:flex;flex-wrap:wrap}.neeto-molecules-header .neeto-molecules-header__page-title{display:flex;flex-direction:row;width:100%}.neeto-molecules-header .neeto-molecules-header__breadcrumbs-wrap{display:flex}.neeto-molecules-header .neeto-molecules-header__breadcrumb{align-items:center;display:flex;flex-direction:row;justify-content:flex-start;line-height:1}.neeto-molecules-header .neeto-molecules-header__breadcrumb a{text-decoration:none;transition:all .3s ease-in-out}.neeto-molecules-header .neeto-molecules-header__breadcrumb a:focus-visible{border-radius:var(--neeto-ui-rounded-sm);outline:3px solid rgba(var(--neeto-ui-primary-500),50%)}.neeto-molecules-header .neeto-molecules-header__breadcrumb-separator{margin:0 4px}.neeto-molecules-header .neeto-molecules-header__right{align-items:center;display:flex;flex-direction:row;justify-content:flex-end}";
|
|
1669
1665
|
n(css,{});
|
|
1670
1666
|
|
|
1671
1667
|
var Breadcrumbs = function Breadcrumbs(_ref) {
|
|
@@ -1681,64 +1677,72 @@ var Breadcrumbs = function Breadcrumbs(_ref) {
|
|
|
1681
1677
|
}, /*#__PURE__*/React__default["default"].createElement(reactRouterDom.Link, {
|
|
1682
1678
|
to: link
|
|
1683
1679
|
}, /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
1684
|
-
className: "neeto-
|
|
1680
|
+
className: "neeto-molecules-text-gray-700 hover:neeto-ui-text-gray-800 neeto-molecules-header__breadcrumb-link",
|
|
1685
1681
|
component: "span",
|
|
1686
1682
|
"data-cy": text,
|
|
1687
1683
|
"data-test-id": text,
|
|
1688
1684
|
style: "body2",
|
|
1689
1685
|
weight: "normal"
|
|
1690
|
-
}, text)),
|
|
1691
|
-
className: "neeto-molecules-header__breadcrumb-separator neeto-ui-text-
|
|
1692
|
-
|
|
1686
|
+
}, text)), /*#__PURE__*/React__default["default"].createElement(neetoIcons.Right, {
|
|
1687
|
+
className: "neeto-molecules-header__breadcrumb-separator neeto-ui-text-gray-400",
|
|
1688
|
+
size: 16
|
|
1689
|
+
}));
|
|
1693
1690
|
}));
|
|
1694
1691
|
};
|
|
1695
1692
|
var Breadcrumbs$1 = /*#__PURE__*/React__default["default"].memo(Breadcrumbs);
|
|
1696
1693
|
|
|
1697
|
-
var
|
|
1698
|
-
var Dropdown = function Dropdown(_ref) {
|
|
1699
|
-
var _ref$dropdownProps = _ref.dropdownProps,
|
|
1700
|
-
children = _ref$dropdownProps.children,
|
|
1701
|
-
otherProps = _objectWithoutProperties(_ref$dropdownProps, _excluded);
|
|
1694
|
+
var Dropdown = function Dropdown(props) {
|
|
1702
1695
|
return /*#__PURE__*/React__default["default"].createElement(neetoui.Dropdown, _extends$1({
|
|
1696
|
+
buttonProps: {
|
|
1697
|
+
className: "ml-1.5"
|
|
1698
|
+
},
|
|
1703
1699
|
buttonStyle: "text",
|
|
1700
|
+
className: "ml-3",
|
|
1704
1701
|
icon: neetoIcons.MenuVertical,
|
|
1705
1702
|
position: "bottom-end"
|
|
1706
|
-
},
|
|
1703
|
+
}, props));
|
|
1707
1704
|
};
|
|
1708
1705
|
|
|
1709
1706
|
var Header$2 = function Header(_ref) {
|
|
1710
1707
|
var title = _ref.title,
|
|
1708
|
+
menuBarToggle = _ref.menuBarToggle,
|
|
1711
1709
|
searchProps = _ref.searchProps,
|
|
1712
1710
|
_ref$className = _ref.className,
|
|
1713
1711
|
className = _ref$className === void 0 ? "" : _ref$className,
|
|
1714
1712
|
actionBlock = _ref.actionBlock,
|
|
1715
1713
|
_ref$breadcrumbs = _ref.breadcrumbs,
|
|
1716
1714
|
breadcrumbs = _ref$breadcrumbs === void 0 ? [] : _ref$breadcrumbs,
|
|
1717
|
-
|
|
1715
|
+
_ref$renderDropdown = _ref.renderDropdown,
|
|
1716
|
+
renderDropdown = _ref$renderDropdown === void 0 ? pure.noop : _ref$renderDropdown;
|
|
1718
1717
|
var searchRef = React.useRef(null);
|
|
1719
1718
|
var _useTranslation = reactI18next.useTranslation(),
|
|
1720
1719
|
t = _useTranslation.t;
|
|
1721
1720
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1722
|
-
className: classnames(["neeto-molecules-header",
|
|
1721
|
+
className: classnames(["neeto-molecules-header", {
|
|
1722
|
+
"neeto-molecules-header--has-breadcrumbs": !ramda.isEmpty(breadcrumbs)
|
|
1723
|
+
}, className])
|
|
1723
1724
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1724
1725
|
className: "neeto-molecules-header__left"
|
|
1725
|
-
}, /*#__PURE__*/React__default["default"].createElement(
|
|
1726
|
+
}, menuBarToggle && /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
|
|
1727
|
+
"aria-label": "Toggle Menubar",
|
|
1728
|
+
className: "neeto-molecules-header__toggle-menubar-btn",
|
|
1729
|
+
"data-cy": "menubar-toggle-button",
|
|
1730
|
+
icon: neetoIcons.HamburgerMenu,
|
|
1731
|
+
style: "text",
|
|
1732
|
+
onClick: menuBarToggle
|
|
1733
|
+
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1726
1734
|
className: "neeto-molecules-header__left-data-wrap"
|
|
1727
|
-
},
|
|
1735
|
+
}, breadcrumbs && /*#__PURE__*/React__default["default"].createElement(Breadcrumbs$1, {
|
|
1728
1736
|
breadcrumbs: breadcrumbs
|
|
1729
1737
|
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1730
|
-
className:
|
|
1731
|
-
"neeto-molecules-header__page-title--has-breadcrumbs": pure.isNotEmpty(breadcrumbs)
|
|
1732
|
-
})
|
|
1738
|
+
className: "neeto-molecules-header__page-title"
|
|
1733
1739
|
}, /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
1734
1740
|
"data-cy": "main-header",
|
|
1735
1741
|
"data-test-id": "main-header",
|
|
1736
1742
|
lineHeight: "tight",
|
|
1737
1743
|
style: "h2",
|
|
1738
1744
|
weight: "semibold"
|
|
1739
|
-
}, title),
|
|
1740
|
-
dropdownProps: dropdownProps
|
|
1741
|
-
})))), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1745
|
+
}, title), renderDropdown(Dropdown)))), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1742
1746
|
className: "neeto-ui-gap-3 neeto-molecules-header__right"
|
|
1743
1747
|
}, searchProps && /*#__PURE__*/React__default["default"].createElement(neetoui.Input, _extends$1({
|
|
1744
1748
|
placeholder: t("neetoMolecules.common.actions.search"),
|