{"version":3,"file":"reactTable-D4yoLO7y.js","sources":["../../../client/app/bundles/Shared/components/reactTable/reactTable.tsx"],"sourcesContent":["import * as React from \"react\";\nimport {\n useExpanded,\n useFilters,\n useGroupBy,\n usePagination,\n useSortBy,\n useTable,\n} from \"react-table\";\n\nimport ReactTablePagination from \"./reactTablePagination\";\n\nimport { NumberFilterInputProps } from \"../../interfaces\";\n\nconst DEFAULT_PAGE_SIZE = 100;\n\nfunction columnClassName(isSorted, isSortedDesc) {\n const defaultClassName = \"rt-th -cursor-pointer\";\n if (!isSorted) {\n return defaultClassName;\n }\n if (isSortedDesc) {\n return `${defaultClassName} -sort-desc`;\n }\n return `${defaultClassName} -sort-asc`;\n}\n\nexport const TextFilter = ({ column, setFilter }) => {\n return (\n setFilter(column.id, event.target.value)}\n style={{ width: \"100%\" }}\n value={column.filterValue}\n />\n );\n};\n\nexport const NumberFilterInput = ({\n handleChange,\n label,\n column,\n}: NumberFilterInputProps) => {\n return (\n
\n {\n if (e.key === \"Enter\" || e.key === \" \") {\n e.preventDefault();\n column.toggleSortBy();\n }\n }}\n >\n {column.render(\"Header\")}\n \n \n {filterable && column.canFilter ? column.render(\"Filter\") : null}\n \n | \n ))}\n
---|
\n {cell.isAggregated ? cell.render(\"Aggregated\") : cell.render(\"Cell\")}\n | \n ))}\n