-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathadc2ff3d48a1669f3de5e750acd1588f83f13af7-3531475e0861d2149a8f.js.map
1 lines (1 loc) · 112 KB
/
adc2ff3d48a1669f3de5e750acd1588f83f13af7-3531475e0861d2149a8f.js.map
1
{"version":3,"sources":["webpack:///./node_modules/grommet-icons/icons/FormSearch.js","webpack:///./node_modules/grommet/es6/components/Table/TableContext.js","webpack:///./node_modules/grommet/es6/components/Table/StyledTable.js","webpack:///./node_modules/grommet/es6/components/TableCell/TableCell.js","webpack:///./node_modules/grommet/es6/components/DataTable/Resizer.js","webpack:///./node_modules/grommet/es6/components/DataTable/Searcher.js","webpack:///./node_modules/grommet/es6/components/DataTable/ExpanderCell.js","webpack:///./node_modules/grommet/es6/components/TableRow/TableRow.js","webpack:///./node_modules/grommet/es6/components/Table/Table.js","webpack:///./node_modules/grommet/es6/components/TableBody/TableBody.js","webpack:///./node_modules/grommet/es6/components/TableHeader/TableHeader.js","webpack:///./node_modules/grommet/es6/components/TableFooter/TableFooter.js","webpack:///./node_modules/grommet/es6/components/DataTable/StyledDataTable.js","webpack:///./node_modules/grommet/es6/components/DataTable/buildState.js","webpack:///./node_modules/grommet/es6/components/DataTable/Header.js","webpack:///./node_modules/grommet/es6/components/DataTable/Cell.js","webpack:///./node_modules/grommet/es6/components/DataTable/Footer.js","webpack:///./node_modules/grommet/es6/components/DataTable/Body.js","webpack:///./node_modules/grommet/es6/components/DataTable/GroupedBody.js","webpack:///./node_modules/grommet/es6/components/DataTable/DataTable.js","webpack:///./node_modules/grommet-icons/es6/icons/Configure.js"],"names":["exports","__esModule","FormSearch","obj","_react","_StyledIcon","_extends","Object","assign","target","i","arguments","length","source","key","prototype","hasOwnProperty","call","apply","this","props","createElement","StyledIcon","viewBox","a11yTitle","fill","stroke","strokeWidth","d","TableContext","createContext","undefined","SIZE_MAP","sizeStyle","size","theme","global","StyledTableCell","td","withConfig","displayName","componentId","verticalAlign","align","background","border","responsive","pad","box","responsiveBreakpoint","tableContextTheme","extend","defaultProps","setPrototypeOf","StyledTableDataCaption","caption","edgeSize","xxsmall","StyledTableRow","tr","StyledTableBody","tbody","StyledTableHeader","thead","StyledTableFooter","tfoot","StyledTable","table","verticalAlignToJustify","middle","top","bottom","TableCell","_ref","ref","children","className","colSpan","plain","scope","rest","excluded","sourceKeys","keys","indexOf","_objectWithoutPropertiesLoose","Consumer","tableContext","mergedProps","header","footer","body","forEach","cellProps","as","Box","justify","TableCellWrapper","InteractionBox","active","onResize","property","_useState","setActive","_useState2","start","setStart","_useState3","width","setWidth","onMouseDown","event","current","element","nodeName","parentNode","rect","getBoundingClientRect","clientX","onMouseMove","nextWidth","Math","max","onMouseUp","remove","document","removeEventListener","addEventListener","dataTable","resize","hover","_theme$dataTable$resi","color","_theme$dataTable$resi2","side","Stack","anchor","flex","vertical","left","filtering","filters","onFilter","onFiltering","inputRef","needsFocus","focus","Keyboard","onEsc","min","horizontal","TextInput","name","value","onChange","onBlur","Fragment","direction","Text","Button","icon","hoverIndicator","onClick","content","context","expanded","onToggle","ExpandIcon","icons","normalizedThemeProps","disabled","TableRow","TableRowWrapper","TableWrapper","TableBody","Provider","TableBodyWrapper","TableHeader","TableHeaderWrapper","TableFooter","TableFooterWrapper","StyledDataTable","fillProp","hoverStyle","row","StyledDataTableRow","onClickRow","StyledDataTableBody","skipSvgChildren","forceOutline","StyledDataTableHeader","StyledDataTableFooter","pin","StyledDataTableCell","map","p","join","pinned","StyledPlaceholder","set","path","parts","Array","isArray","toString","match","slice","reduce","acc","item","index","abs","datumValue","datum","split","sumReducer","accumulated","next","reducers","sum","reducersInitValues","Number","MAX_VALUE","MIN_VALUE","aggregateColumn","column","data","aggregate","buildFooterValues","columns","aggregateValues","result","separateThemeProps","_theme$dataTable$head","font","gap","units","textProps","iconProps","StyledHeaderCellButton","styles","_separateThemeProps","layoutProps","push","partStyles","StyledContentBox","Header","_ref2","backgroundProp","groups","groupState","onSelect","onSort","tablePin","primaryProperty","selected","sort","widths","_separateThemeProps2","filter","k","CheckBox","checked","indeterminate","_ref3","Icon","columnPin","search","sortable","unitsContent","resizer","searcher","style","position","normalizeProp","rowProp","prop","_ref$column","render","cellPin","renderContexts","primary","Footer","footerValues","Body","onMore","replace","pinnedBackground","rowProps","step","_React$useState","useState","onEnter","persist","adjustedEvent","onUp","onDown","tabIndex","InfiniteScroll","items","renderMarker","marker","scrollableAncestor","rowRef","primaryValue","isSelected","includes","onMouseOver","onMouseOut","onFocus","s","concat","groupBy","group","memberCount","contexts","some","c","DataTableWrapper","_ref$columns","_ref$data","onSearch","onSortProp","placeholder","primaryKey","resizeable","select","sortProp","_ref$step","normalizePrimaryProperty","showFooter","setFiltering","initializeFilters","setFilters","setSort","adjustedData","regexps","n","RegExp","test","external","before","after","d1","d2","filterAndSortData","groupMap","groupByProperty","groupValue","buildGroups","_useState4","expand","buildGroupState","setGroupState","_useState5","setSelected","_useState6","setWidths","headerRef","footerRef","_useState7","headerHeight","setHeaderHeight","_useState8","footerHeight","setFooterHeight","nextHeaderHeight","height","nextFooterHeight","nextWidths","console","warn","nextFilters","nextSelected","nextSort","nextGroupState","onExpand","expandedKeys","opacity","Configure"],"mappings":"2FAEAA,EAAQC,YAAa,EACrBD,EAAQE,gBAAa,EAErB,IAIgCC,EAJ5BC,GAI4BD,EAJI,EAAQ,UAK5BA,EAAIF,WAAaE,EAAM,CACnC,QAAWA,GAJXE,EAAc,EAAQ,QAQ1B,SAASC,IAeP,OAdAA,EAAWC,OAAOC,QAAU,SAAUC,GACpC,IAAK,IAAIC,EAAI,EAAGA,EAAIC,UAAUC,OAAQF,IAAK,CACzC,IAAIG,EAASF,UAAUD,GAEvB,IAAK,IAAII,KAAOD,EACVN,OAAOQ,UAAUC,eAAeC,KAAKJ,EAAQC,KAC/CL,EAAOK,GAAOD,EAAOC,IAK3B,OAAOL,IAGOS,MAAMC,KAAMR,WAe9BX,EAAQE,WAZS,SAAoBkB,GACnC,OAAoBhB,EAAgB,QAAEiB,cAAchB,E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BAAhBzC,EAAwC,IAAM9S,cAAc0E,EAAA,EAAK,CACzEnD,WAAY,CACVwF,MAAO,mBACPsP,QAAS,UAEX/U,MAAO,SACPqD,QAAS,SACTvE,KAAM,YACQ,IAAMJ,cAAcyI,EAAA,EAAM,KAAMqK,IAAgBA,M,kCCzVlE,gFAAS7T,IAeP,OAdAA,EAAWC,OAAOC,QAAU,SAAUC,GACpC,IAAK,IAAIC,EAAI,EAAGA,EAAIC,UAAUC,OAAQF,IAAK,CACzC,IAAIG,EAASF,UAAUD,GAEvB,IAAK,IAAII,KAAOD,EACVN,OAAOQ,UAAUC,eAAeC,KAAKJ,EAAQC,KAC/CL,EAAOK,GAAOD,EAAOC,IAK3B,OAAOL,IAGOS,MAAMC,KAAMR,WAKvB,IAAIgX,EAAY,SAAmBvW,GACxC,OAAoB,IAAMC,cAAc,IAAYf,EAAS,CAC3DiB,QAAS,YACTC,UAAW,aACVJ,GAAqB,IAAMC,cAAc,OAAQ,CAClDI,KAAM,OACNC,OAAQ,OACRC,YAAa,IACbC,EAAG","file":"adc2ff3d48a1669f3de5e750acd1588f83f13af7-3531475e0861d2149a8f.js","sourcesContent":["\"use strict\";\n\nexports.__esModule = true;\nexports.FormSearch = void 0;\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nvar _StyledIcon = require(\"../StyledIcon\");\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n \"default\": obj\n };\n}\n\nfunction _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nvar FormSearch = function FormSearch(props) {\n return /*#__PURE__*/_react[\"default\"].createElement(_StyledIcon.StyledIcon, _extends({\n viewBox: \"0 0 24 24\",\n a11yTitle: \"FormSearch\"\n }, props), /*#__PURE__*/_react[\"default\"].createElement(\"path\", {\n fill: \"none\",\n stroke: \"#000\",\n strokeWidth: \"2\",\n d: \"M13.8,13.8 L18,18 L13.8,13.8 Z M10.5,15 C12.9852814,15 15,12.9852814 15,10.5 C15,8.01471863 12.9852814,6 10.5,6 C8.01471863,6 6,8.01471863 6,10.5 C6,12.9852814 8.01471863,15 10.5,15 Z\"\n }));\n};\n\nexports.FormSearch = FormSearch;","import React from 'react';\nexport var TableContext = /*#__PURE__*/React.createContext(undefined);","import styled, { css } from 'styled-components';\nimport { backgroundStyle, borderStyle, edgeStyle, genericStyles } from '../../utils';\nimport { defaultProps } from '../../default-props';\nvar SIZE_MAP = {\n '1/2': '50%',\n '1/4': '25%',\n '2/4': '50%',\n '3/4': '75%',\n '1/3': '33.33%',\n '2/3': '66.66%'\n};\nvar sizeStyle = css([\"width:\", \";max-width:\", \";overflow:hidden;\"], function (props) {\n return SIZE_MAP[props.size] || props.theme.global.size[props.size] || props.size;\n}, function (props) {\n return SIZE_MAP[props.size] || props.theme.global.size[props.size] || props.size;\n});\nvar StyledTableCell = styled.td.withConfig({\n displayName: \"StyledTable__StyledTableCell\",\n componentId: \"sc-1m3u5g-0\"\n})([\"margin:0;padding:0;font-weight:inherit;text-align:inherit;\", \" \", \" \", \" \", \" \", \" \", \" \", \"\"], function (props) {\n return props.size && sizeStyle;\n}, function (props) {\n return props.verticalAlign && \"vertical-align: \" + props.verticalAlign + \";\";\n}, function (props) {\n return props.align && \"text-align: \" + props.align + \";\";\n}, function (props) {\n return props.background && backgroundStyle(props.background, props.theme);\n}, function (props) {\n return props.border && borderStyle(props.border, props.responsive, props.theme);\n}, function (props) {\n return props.pad && edgeStyle('padding', props.pad, props.responsive, props.theme.box.responsiveBreakpoint, props.theme);\n}, function (props) {\n return props.tableContextTheme && props.tableContextTheme.extend;\n});\nStyledTableCell.defaultProps = {};\nObject.setPrototypeOf(StyledTableCell.defaultProps, defaultProps);\nvar StyledTableDataCaption = styled.caption.withConfig({\n displayName: \"StyledTable__StyledTableDataCaption\",\n componentId: \"sc-1m3u5g-1\"\n})([\"margin-bottom:\", \";\"], function (props) {\n return props.theme.global.edgeSize.xxsmall;\n});\nStyledTableDataCaption.defaultProps = {};\nObject.setPrototypeOf(StyledTableDataCaption.defaultProps, defaultProps);\nvar StyledTableRow = styled.tr.withConfig({\n displayName: \"StyledTable__StyledTableRow\",\n componentId: \"sc-1m3u5g-2\"\n})([\"\"]);\nStyledTableRow.defaultProps = {};\nObject.setPrototypeOf(StyledTableRow.defaultProps, defaultProps);\nvar StyledTableBody = styled.tbody.withConfig({\n displayName: \"StyledTable__StyledTableBody\",\n componentId: \"sc-1m3u5g-3\"\n})([\"\"]);\nStyledTableBody.defaultProps = {};\nObject.setPrototypeOf(StyledTableBody.defaultProps, defaultProps);\nvar StyledTableHeader = styled.thead.withConfig({\n displayName: \"StyledTable__StyledTableHeader\",\n componentId: \"sc-1m3u5g-4\"\n})([\"\"]);\nStyledTableHeader.defaultProps = {};\nObject.setPrototypeOf(StyledTableHeader.defaultProps, defaultProps);\nvar StyledTableFooter = styled.tfoot.withConfig({\n displayName: \"StyledTable__StyledTableFooter\",\n componentId: \"sc-1m3u5g-5\"\n})([\"\"]);\nStyledTableFooter.defaultProps = {};\nObject.setPrototypeOf(StyledTableFooter.defaultProps, defaultProps);\nvar StyledTable = styled.table.withConfig({\n displayName: \"StyledTable\",\n componentId: \"sc-1m3u5g-6\"\n})([\"border-spacing:0;border-collapse:collapse;width:inherit;@media all and (min--moz-device-pixel-ratio:0){table-layout:fixed;}\", \" \", \";\"], genericStyles, function (props) {\n return props.theme.table && props.theme.table.extend;\n});\nStyledTable.defaultProps = {};\nObject.setPrototypeOf(StyledTable.defaultProps, defaultProps);\nexport { StyledTableCell, StyledTableDataCaption, StyledTableRow, StyledTableBody, StyledTableHeader, StyledTableFooter, StyledTable };","function _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\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\n return target;\n}\n\nimport React, { forwardRef, useContext } from 'react';\nimport { ThemeContext } from 'styled-components';\nimport { defaultProps } from '../../default-props';\nimport { Box } from '../Box';\nimport { TableContext } from '../Table/TableContext';\nimport { StyledTableCell } from '../Table/StyledTable';\nvar verticalAlignToJustify = {\n middle: 'center',\n top: 'start',\n bottom: 'end'\n};\nvar TableCell = /*#__PURE__*/forwardRef(function (_ref, ref) {\n var align = _ref.align,\n background = _ref.background,\n border = _ref.border,\n children = _ref.children,\n className = _ref.className,\n colSpan = _ref.colSpan,\n pad = _ref.pad,\n plain = _ref.plain,\n scope = _ref.scope,\n size = _ref.size,\n verticalAlign = _ref.verticalAlign,\n rest = _objectWithoutPropertiesLoose(_ref, [\"align\", \"background\", \"border\", \"children\", \"className\", \"colSpan\", \"pad\", \"plain\", \"scope\", \"size\", \"verticalAlign\"]);\n\n var theme = useContext(ThemeContext) || defaultProps.theme;\n return /*#__PURE__*/React.createElement(TableContext.Consumer, null, function (tableContext) {\n var tableContextTheme;\n\n if (tableContext === 'header') {\n tableContextTheme = theme.table && theme.table.header;\n } else if (tableContext === 'footer') {\n tableContextTheme = theme.table && theme.table.footer;\n } else {\n tableContextTheme = theme.table && theme.table.body;\n } // merge tabelContextTheme and rest\n\n\n var mergedProps = _extends({}, tableContextTheme, rest);\n\n Object.keys(mergedProps).forEach(function (key) {\n if (rest[key] === undefined) mergedProps[key] = tableContextTheme[key];\n }); // split out background, border, and pad\n\n var cellProps = {\n align: align || mergedProps.align || undefined,\n background: background || mergedProps.background || undefined,\n border: border || mergedProps.border || undefined,\n pad: pad || mergedProps.pad || undefined,\n verticalAlign: verticalAlign || mergedProps.verticalAlign || undefined\n };\n delete mergedProps.align;\n delete mergedProps.background;\n delete mergedProps.border;\n delete mergedProps.pad;\n delete mergedProps.verticalAlign;\n return /*#__PURE__*/React.createElement(StyledTableCell, _extends({\n ref: ref,\n as: scope ? 'th' : undefined,\n scope: scope,\n size: size,\n colSpan: colSpan,\n tableContext: tableContext,\n tableContextTheme: tableContextTheme\n }, plain ? mergedProps : {}, cellProps, {\n className: className\n }), plain || !Object.keys(mergedProps).length ? children : /*#__PURE__*/React.createElement(Box, _extends({}, mergedProps, {\n align: align,\n justify: verticalAlignToJustify[verticalAlign]\n }), children));\n });\n});\nTableCell.displayName = 'TableCell';\nvar TableCellDoc;\n\nif (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line global-require\n TableCellDoc = require('./doc').doc(TableCell);\n}\n\nvar TableCellWrapper = TableCellDoc || TableCell;\nexport { TableCellWrapper as TableCell };","function _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nimport React, { useCallback, useContext, useEffect, useRef, useState } from 'react';\nimport styled, { ThemeContext } from 'styled-components';\nimport { defaultProps } from '../../default-props';\nimport { Box } from '../Box';\nimport { Stack } from '../Stack';\nvar InteractionBox = styled(Box).withConfig({\n displayName: \"Resizer__InteractionBox\",\n componentId: \"sc-8l808w-0\"\n})([\"cursor:col-resize;> *{opacity:0;}\", \" &:hover{> *{opacity:1;}}\"], function (props) {\n return props.active && '> * { opacity: 1; }';\n});\n\nvar Resizer = function Resizer(_ref) {\n var onResize = _ref.onResize,\n property = _ref.property;\n var theme = useContext(ThemeContext) || defaultProps.theme;\n\n var _useState = useState(false),\n active = _useState[0],\n setActive = _useState[1];\n\n var _useState2 = useState(),\n start = _useState2[0],\n setStart = _useState2[1];\n\n var _useState3 = useState(),\n width = _useState3[0],\n setWidth = _useState3[1];\n\n var ref = useRef();\n var onMouseDown = useCallback(function (event) {\n if (ref.current) {\n var element = ref.current; // find TH parent\n\n while (element && element.nodeName !== 'TH') {\n element = element.parentNode;\n }\n\n var rect = element.getBoundingClientRect();\n setStart(event.clientX);\n setWidth(rect.width);\n setActive(true);\n }\n }, []);\n var onMouseMove = useCallback(function (event) {\n // We determined 12 empirically as being wide enough to hit but\n // not too wide to cause false hits.\n var nextWidth = Math.max(12, width + (event.clientX - start));\n onResize(property, nextWidth);\n }, [onResize, property, start, width]);\n var onMouseUp = useCallback(function () {\n setActive(false);\n setStart(undefined);\n setWidth(undefined);\n }, []);\n useEffect(function () {\n var remove = function remove() {\n document.removeEventListener('mouseup', onMouseUp);\n document.removeEventListener('mousemove', onMouseMove);\n };\n\n if (active) {\n document.addEventListener('mouseup', onMouseUp);\n document.addEventListener('mousemove', onMouseMove);\n return remove;\n }\n\n remove();\n return undefined;\n }, [active, onMouseMove, onMouseUp]);\n var border;\n\n if (theme.dataTable.resize.hover && theme.dataTable.resize.hover.border) {\n var _theme$dataTable$resi = theme.dataTable.resize.hover.border,\n color = _theme$dataTable$resi.color,\n _theme$dataTable$resi2 = _theme$dataTable$resi.side,\n side = _theme$dataTable$resi2 === void 0 ? 'end' : _theme$dataTable$resi2,\n size = _theme$dataTable$resi.size;\n border = {\n color: color,\n side: side,\n size: size\n };\n }\n\n return /*#__PURE__*/React.createElement(Stack, {\n anchor: \"right\"\n }, /*#__PURE__*/React.createElement(Box, _extends({\n flex: false,\n responsive: false,\n pad: {\n vertical: 'small'\n }\n }, theme.dataTable.resize)), /*#__PURE__*/React.createElement(InteractionBox, {\n active: active,\n flex: false,\n pad: {\n left: 'xsmall'\n },\n ref: ref,\n responsive: false,\n onMouseDown: onMouseDown,\n onMouseMove: start !== undefined ? onMouseMove : undefined,\n onMouseUp: start !== undefined ? onMouseUp : undefined\n }, /*#__PURE__*/React.createElement(Box, {\n pad: {\n vertical: 'small'\n },\n border: border\n })));\n};\n\nResizer.displayName = 'Resizer';\nResizer.defaultProps = {};\nObject.setPrototypeOf(Resizer.defaultProps, defaultProps);\nexport { Resizer };","import React, { useContext, useEffect, useRef } from 'react';\nimport { ThemeContext } from 'styled-components';\nimport { FormSearch } from 'grommet-icons/icons/FormSearch';\nimport { defaultProps } from '../../default-props';\nimport { Box } from '../Box';\nimport { Button } from '../Button';\nimport { Keyboard } from '../Keyboard';\nimport { Text } from '../Text';\nimport { TextInput } from '../TextInput';\nimport { normalizeColor } from '../../utils';\n\nvar Searcher = function Searcher(_ref) {\n var filtering = _ref.filtering,\n filters = _ref.filters,\n onFilter = _ref.onFilter,\n onFiltering = _ref.onFiltering,\n property = _ref.property;\n var theme = useContext(ThemeContext) || defaultProps.theme;\n var inputRef = useRef();\n var needsFocus = filtering === property;\n useEffect(function () {\n if (inputRef && needsFocus) {\n inputRef.current.focus();\n }\n }, [needsFocus, inputRef]);\n return filtering === property ? /*#__PURE__*/React.createElement(Keyboard, {\n onEsc: function onEsc() {\n return onFiltering(undefined);\n }\n }, /*#__PURE__*/React.createElement(Box, {\n width: {\n min: 'xsmall'\n },\n flex: true,\n pad: {\n horizontal: 'small'\n }\n }, /*#__PURE__*/React.createElement(TextInput, {\n name: \"search-\" + property,\n a11yTitle: \"Search by \" + property,\n ref: inputRef,\n value: filters[property],\n onChange: function onChange(event) {\n return onFilter(property, event.target.value);\n },\n onBlur: function onBlur() {\n return onFiltering(undefined);\n }\n }))) : /*#__PURE__*/React.createElement(React.Fragment, null, filters[property] ? /*#__PURE__*/React.createElement(Box, {\n flex: false,\n pad: {\n horizontal: 'small'\n },\n direction: \"row\",\n align: \"center\"\n }, /*#__PURE__*/React.createElement(Text, null, filters[property])) : null, /*#__PURE__*/React.createElement(Button, {\n a11yTitle: \"Open search by \" + property,\n icon: /*#__PURE__*/React.createElement(FormSearch, {\n color: normalizeColor(filtering === property ? 'brand' : 'border', theme)\n }),\n hoverIndicator: true,\n onClick: function onClick() {\n return onFiltering(filtering === property ? undefined : property);\n }\n }));\n};\n\nSearcher.displayName = 'Searcher';\nSearcher.defaultProps = {};\nObject.setPrototypeOf(Searcher.defaultProps, defaultProps);\nexport { Searcher };","function _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\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\n return target;\n}\n\nimport React, { useContext } from 'react';\nimport { ThemeContext } from 'styled-components';\nimport { defaultProps } from '../../default-props';\nimport { Box } from '../Box';\nimport { Button } from '../Button';\nimport { TableCell } from '../TableCell';\nimport { normalizeColor } from '../../utils';\n\nvar ExpanderCell = function ExpanderCell(_ref) {\n var context = _ref.context,\n expanded = _ref.expanded,\n onToggle = _ref.onToggle,\n rest = _objectWithoutPropertiesLoose(_ref, [\"context\", \"expanded\", \"onToggle\"]);\n\n var theme = useContext(ThemeContext) || defaultProps.theme;\n var content;\n\n if (onToggle) {\n var ExpandIcon = theme.dataTable.icons[expanded ? 'contract' : 'expand'];\n content = /*#__PURE__*/React.createElement(ExpandIcon, {\n color: normalizeColor('border', theme)\n });\n }\n\n var normalizedThemeProps = _extends({}, theme.table[context], theme.dataTable[context]);\n\n delete normalizedThemeProps.background;\n delete normalizedThemeProps.border;\n delete normalizedThemeProps.pad;\n content = /*#__PURE__*/React.createElement(Box, _extends({}, normalizedThemeProps, rest, {\n align: \"center\",\n pad: \"xsmall\"\n }), content);\n\n if (onToggle) {\n content = /*#__PURE__*/React.createElement(Button, {\n fill: true,\n a11yTitle: expanded ? 'collapse' : 'expand',\n hoverIndicator: true,\n disabled: !onToggle,\n onClick: onToggle,\n plain: true\n }, content);\n }\n\n return /*#__PURE__*/React.createElement(TableCell, {\n size: \"xxsmall\",\n plain: true,\n verticalAlign: context === 'groupEnd' ? 'bottom' : 'top',\n pad: \"none\"\n }, content);\n};\n\nExpanderCell.displayName = 'ExpanderCell';\nExpanderCell.defaultProps = {};\nObject.setPrototypeOf(ExpanderCell.defaultProps, defaultProps);\nexport { ExpanderCell };","function _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nimport React, { forwardRef } from 'react';\nimport { StyledTableRow } from '../Table/StyledTable';\nvar TableRow = /*#__PURE__*/forwardRef(function (props, ref) {\n return /*#__PURE__*/React.createElement(StyledTableRow, _extends({\n ref: ref\n }, props));\n});\nTableRow.displayName = 'TableRow';\nvar TableRowDoc;\n\nif (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line global-require\n TableRowDoc = require('./doc').doc(TableRow);\n}\n\nvar TableRowWrapper = TableRowDoc || TableRow;\nexport { TableRowWrapper as TableRow };","function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\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\n return target;\n}\n\nimport React from 'react';\nimport { StyledTable, StyledTableDataCaption } from './StyledTable';\n\nvar Table = function Table(_ref) {\n var caption = _ref.caption,\n children = _ref.children,\n rest = _objectWithoutPropertiesLoose(_ref, [\"caption\", \"children\"]);\n\n return /*#__PURE__*/React.createElement(StyledTable, rest, caption ? /*#__PURE__*/React.createElement(StyledTableDataCaption, null, caption) : null, children);\n};\n\nvar TableDoc;\n\nif (process.env.NODE_ENV !== 'production') {\n TableDoc = require('./doc').doc(Table); // eslint-disable-line global-require\n}\n\nvar TableWrapper = TableDoc || Table;\nexport { TableWrapper as Table };","function _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nimport React, { forwardRef } from 'react';\nimport { TableContext } from '../Table/TableContext';\nimport { StyledTableBody } from '../Table/StyledTable';\nvar TableBody = /*#__PURE__*/forwardRef(function (props, ref) {\n return /*#__PURE__*/React.createElement(TableContext.Provider, {\n value: \"body\"\n }, /*#__PURE__*/React.createElement(StyledTableBody, _extends({\n ref: ref\n }, props)));\n});\nTableBody.displayName = 'TableBody';\nvar TableBodyDoc;\n\nif (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line global-require\n TableBodyDoc = require('./doc').doc(TableBody);\n}\n\nvar TableBodyWrapper = TableBodyDoc || TableBody;\nexport { TableBodyWrapper as TableBody };","function _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nimport React, { forwardRef } from 'react';\nimport { TableContext } from '../Table/TableContext';\nimport { StyledTableHeader } from '../Table/StyledTable';\nvar TableHeader = /*#__PURE__*/forwardRef(function (props, ref) {\n return /*#__PURE__*/React.createElement(TableContext.Provider, {\n value: \"header\"\n }, /*#__PURE__*/React.createElement(StyledTableHeader, _extends({\n ref: ref\n }, props)));\n});\nTableHeader.displayName = 'TableHeader';\nvar TableHeaderDoc;\n\nif (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line global-require\n TableHeaderDoc = require('./doc').doc(TableHeader);\n}\n\nvar TableHeaderWrapper = TableHeaderDoc || TableHeader;\nexport { TableHeaderWrapper as TableHeader };","function _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nimport React, { forwardRef } from 'react';\nimport { TableContext } from '../Table/TableContext';\nimport { StyledTableFooter } from '../Table/StyledTable';\nvar TableFooter = /*#__PURE__*/forwardRef(function (props, ref) {\n return /*#__PURE__*/React.createElement(TableContext.Provider, {\n value: \"footer\"\n }, /*#__PURE__*/React.createElement(StyledTableFooter, _extends({\n ref: ref\n }, props)));\n});\nTableFooter.displayName = 'TableFooter';\nvar TableFooterDoc;\n\nif (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line global-require\n TableFooterDoc = require('./doc').doc(TableFooter);\n}\n\nvar TableFooterWrapper = TableFooterDoc || TableFooter;\nexport { TableFooterWrapper as TableFooter };","import styled, { css } from 'styled-components';\nimport { backgroundStyle, fillStyle, focusStyle, genericStyles, normalizeColor } from '../../utils';\nimport { defaultProps } from '../../default-props';\nimport { TableRow } from '../TableRow';\nimport { Table } from '../Table';\nimport { TableBody } from '../TableBody';\nimport { TableCell } from '../TableCell';\nimport { TableHeader } from '../TableHeader';\nimport { TableFooter } from '../TableFooter'; // border-collapse: separate is needed so pinned header/footer borders work\n\nvar StyledDataTable = styled(Table).withConfig({\n displayName: \"StyledDataTable\",\n componentId: \"xrlyjm-0\"\n})([\"position:relative;border-spacing:0;border-collapse:separate;height:auto;\", \" \", \" \", \";\"], genericStyles, function (props) {\n return props.fillProp && fillStyle(props.fillProp);\n}, function (props) {\n return props.theme.dataTable && props.theme.dataTable.body && props.theme.dataTable.body.extend;\n});\nStyledDataTable.defaultProps = {};\nObject.setPrototypeOf(StyledDataTable.defaultProps, defaultProps);\nvar hoverStyle = css([\"\", \" color:\", \";\"], function (props) {\n return backgroundStyle(normalizeColor(props.theme.table && props.theme.table.row && props.theme.table.row.hover && props.theme.table.row.hover.background || props.theme.global.hover.background, props.theme), props.theme);\n}, function (props) {\n return normalizeColor(props.theme.table && props.theme.table.row && props.theme.table.row.hover && props.theme.table.row.hover.color || props.theme.global.hover.color, props.theme);\n});\nvar StyledDataTableRow = styled(TableRow).withConfig({\n displayName: \"StyledDataTable__StyledDataTableRow\",\n componentId: \"xrlyjm-1\"\n})([\"\", \" \", \" &:hover{\", \"}\", \"\"], function (props) {\n return props.size && \"\\n display: table;\\n width: 100%;\\n table-layout: fixed;\\n \";\n}, function (props) {\n return props.onClick && \"\\n cursor: pointer;\\n \";\n}, function (props) {\n return props.onClickRow && !props.active && hoverStyle;\n}, function (props) {\n return props.active && hoverStyle;\n});\nStyledDataTableRow.defaultProps = {};\nObject.setPrototypeOf(StyledDataTableRow.defaultProps, defaultProps); // focus styling other than outline doesn't work on <tbody />\n\nvar StyledDataTableBody = styled(TableBody).withConfig({\n displayName: \"StyledDataTable__StyledDataTableBody\",\n componentId: \"xrlyjm-2\"\n})([\"\", \" &:focus{\", \"}\"], function (props) {\n return props.size && \"\\n display: block;\\n width: 100%;\\n max-height: \" + props.theme.global.size[props.size] + \";\\n overflow: auto;\\n \";\n}, focusStyle({\n skipSvgChildren: true,\n forceOutline: true\n}));\nStyledDataTableBody.defaultProps = {};\nObject.setPrototypeOf(StyledDataTableBody.defaultProps, defaultProps);\nvar StyledDataTableHeader = styled(TableHeader).withConfig({\n displayName: \"StyledDataTable__StyledDataTableHeader\",\n componentId: \"xrlyjm-3\"\n})([\"\", \"\"], function (props) {\n return props.size && \"\\n display: table;\\n width: 100%;\\n table-layout: fixed;\\n \";\n});\nStyledDataTableHeader.defaultProps = {};\nObject.setPrototypeOf(StyledDataTableHeader.defaultProps, defaultProps);\nvar StyledDataTableFooter = styled(TableFooter).withConfig({\n displayName: \"StyledDataTable__StyledDataTableFooter\",\n componentId: \"xrlyjm-4\"\n})([\"\", \" \", \"\"], function (props) {\n return props.size && \"\\n display: table;\\n width: 100%;\\n table-layout: fixed;\\n \";\n}, function (props) {\n return props.pin && \"\\n /* Safari needs the relative positioning of tfoot specified */\\n position: sticky;\\n bottom: 0;\\n z-index: 1;\\n \";\n});\nStyledDataTableFooter.defaultProps = {};\nObject.setPrototypeOf(StyledDataTableFooter.defaultProps, defaultProps);\nvar StyledDataTableCell = styled(TableCell).withConfig({\n displayName: \"StyledDataTable__StyledDataTableCell\",\n componentId: \"xrlyjm-5\"\n})([\"\", \";\", \"\"], function (props) {\n return props.context === 'header' && props.theme.dataTable && props.theme.dataTable.header && props.theme.dataTable.header.extend;\n}, function (props) {\n return props.pin && props.pin.length > 0 && \"\\n position: sticky;\\n \" + props.pin.map(function (p) {\n return p + \": 0;\";\n }).join(' ') + \"\\n z-index: \" + Object.keys(props.pin).length + \";\\n \" + (props.theme.dataTable && props.theme.dataTable.pinned && props.theme.dataTable.pinned[props.context] && props.theme.dataTable.pinned[props.context].extend ? props.theme.dataTable.pinned[props.context].extend : '') + \"\\n \";\n});\nStyledDataTableCell.defaultProps = {};\nObject.setPrototypeOf(StyledDataTableCell.defaultProps, defaultProps);\nvar StyledPlaceholder = styled('caption').withConfig({\n displayName: \"StyledDataTable__StyledPlaceholder\",\n componentId: \"xrlyjm-6\"\n})([\"position:absolute;\", \" \", \" left:0;right:0;\"], function (props) {\n return \"top: \" + (props.top || 0) + \"px;\";\n}, function (props) {\n return \"bottom: \" + (props.bottom || 0) + \"px;\";\n});\nexport { StyledDataTable, StyledDataTableRow, StyledDataTableBody, StyledDataTableCell, StyledDataTableHeader, StyledDataTableFooter, StyledPlaceholder };","// This file contains helper functions for DataTable, to keep the component\n// files simpler.\nexport var set = function set(obj, path, value) {\n var parts = path;\n if (Object(obj) !== obj) return obj;\n if (!Array.isArray(path)) parts = path.toString().match(/[^.[\\]]+/g) || [];\n parts.slice(0, -1).reduce(function (acc, item, index) {\n if (Object(acc[item]) === acc[item]) {\n return acc[item];\n }\n\n acc[item] = Math.abs(parts[index + 1]) > 0 === +parts[index + 1] ? [] : {};\n return acc[item];\n }, obj)[parts[parts.length - 1]] = value;\n return obj;\n}; // get the value for the property in the datum object\n\nexport var datumValue = function datumValue(datum, property) {\n if (!property) return undefined;\n var parts = property.split('.');\n\n if (parts.length === 1) {\n return datum[property];\n }\n\n if (!datum[parts[0]]) {\n return undefined;\n }\n\n return datumValue(datum[parts[0]], parts.slice(1).join('.'));\n}; // get the primary property name\n\nexport var normalizePrimaryProperty = function normalizePrimaryProperty(columns, primaryKey) {\n var result;\n columns.forEach(function (column) {\n // remember the first key property\n if (column.primary && !result) {\n result = column.property;\n }\n });\n\n if (!result) {\n if (primaryKey === false) result = undefined;else if (primaryKey) result = primaryKey;else if (columns.length > 0) result = columns[0].property;\n }\n\n return result;\n}; // initialize filters with empty strings\n\nexport var initializeFilters = function initializeFilters(columns) {\n var result = {};\n columns.forEach(function (column) {\n if (column.search) {\n result[column.property] = '';\n }\n });\n return result;\n}; // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#Escaping\n\nvar escapeRegExp = function escapeRegExp(input) {\n return input.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n}; // filter data based on filters then sort\n\n\nexport var filterAndSortData = function filterAndSortData(data, filters, onSearch, sort) {\n var result = data;\n\n if (!onSearch) {\n var regexps = {};\n Object.keys(filters).filter(function (n) {\n return filters[n];\n }).forEach(function (n) {\n regexps[n] = new RegExp(escapeRegExp(filters[n]), 'i');\n });\n\n if (Object.keys(regexps).length > 0) {\n result = data.filter(function (datum) {\n return !Object.keys(regexps).some(function (property) {\n return !regexps[property].test(datumValue(datum, property));\n });\n });\n }\n }\n\n if (sort && !sort.external) {\n var property = sort.property,\n direction = sort.direction;\n result = result === data ? [].concat(data) : result; // don't sort caller's data\n\n var before = direction === 'asc' ? 1 : -1;\n var after = direction === 'asc' ? -1 : 1;\n result.sort(function (d1, d2) {\n if (datumValue(d1, property) > datumValue(d2, property)) return before;\n if (datumValue(d1, property) < datumValue(d2, property)) return after;\n return 0;\n });\n }\n\n return result;\n}; // aggregate reducers\n\nvar sumReducer = function sumReducer(accumulated, next) {\n return accumulated + next;\n};\n\nvar minReducer = function minReducer(accumulated, next) {\n return accumulated === undefined ? next : Math.min(accumulated, next);\n};\n\nvar maxReducer = function maxReducer(accumulated, next) {\n return accumulated === undefined ? next : Math.max(accumulated, next);\n};\n\nvar reducers = {\n max: maxReducer,\n min: minReducer,\n sum: sumReducer\n}; // aggregate reducers init values\n\nvar reducersInitValues = {\n min: Number.MAX_VALUE,\n max: Number.MIN_VALUE,\n sum: 0\n}; // aggregate a single column\n\nvar aggregateColumn = function aggregateColumn(column, data) {\n var value;\n\n if (column.aggregate === 'avg') {\n value = data.map(function (d) {\n return datumValue(d, column.property);\n }).reduce(sumReducer);\n value /= data.length;\n } else {\n value = data.map(function (d) {\n return datumValue(d, column.property);\n }).reduce(reducers[column.aggregate], reducersInitValues[column.aggregate]);\n }\n\n return value;\n}; // aggregate all columns that can\n\n\nvar aggregate = function aggregate(columns, data) {\n var result = {};\n columns.forEach(function (column) {\n if (column.aggregate) {\n var value = aggregateColumn(column, data);\n result = set(result, column.property, value);\n }\n });\n return result;\n}; // build the values for the footer cells\n\n\nexport var buildFooterValues = function buildFooterValues(columns, data) {\n var aggregateValues = aggregate(columns, data);\n var result = {};\n columns.forEach(function (column) {\n if (column.footer) {\n if (typeof column.footer === 'string') {\n result = set(result, column.property, column.footer);\n } else if (column.footer.aggregate) {\n var value = datumValue(aggregateValues, column.property);\n result = set(result, column.property, value);\n }\n }\n });\n return result;\n}; // looks at the groupBy property of each data object and returns an\n// array with one item for each unique value of that property.\n\nexport var buildGroups = function buildGroups(columns, data, groupBy) {\n var result;\n\n if (groupBy) {\n result = [];\n var groupMap = {};\n data.forEach(function (datum) {\n var groupByProperty = groupBy.property ? groupBy.property : groupBy;\n var groupValue = datumValue(datum, groupByProperty);\n\n if (!groupMap[groupValue]) {\n var group = {\n data: [],\n datum: {},\n key: groupValue\n };\n group.datum[groupByProperty] = groupValue;\n result.push(group);\n groupMap[groupValue] = group;\n }\n\n groupMap[groupValue].data.push(datum);\n }); // include any aggregate column values across the data for each group\n\n columns.forEach(function (column) {\n if (column.aggregate) {\n result.forEach(function (group) {\n var datum = group.datum;\n datum[column.property] = aggregateColumn(column, group.data);\n });\n }\n });\n }\n\n return result;\n}; // build group expanded state, expanding any in groupBy.expand\n\nexport var buildGroupState = function buildGroupState(groups, groupBy) {\n var result = {};\n\n if (groups) {\n groups.forEach(function (_ref) {\n var key = _ref.key;\n result[key] = {\n expanded: false\n };\n });\n }\n\n if (groupBy && groupBy.expand) {\n groupBy.expand.forEach(function (value) {\n result[value] = {\n expanded: true\n };\n });\n }\n\n return result;\n};","function _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\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\n return target;\n}\n\nimport React, { forwardRef, useContext } from 'react';\nimport styled, { css, ThemeContext } from 'styled-components';\nimport { defaultProps } from '../../default-props';\nimport { Box } from '../Box';\nimport { Button } from '../Button';\nimport { CheckBox } from '../CheckBox';\nimport { TableCell } from '../TableCell';\nimport { Text } from '../Text';\nimport { Resizer } from './Resizer';\nimport { Searcher } from './Searcher';\nimport { ExpanderCell } from './ExpanderCell';\nimport { StyledDataTableCell, StyledDataTableHeader, StyledDataTableRow } from './StyledDataTable';\nimport { datumValue } from './buildState';\nimport { kindPartStyles } from '../../utils/styles';\nimport { normalizeColor } from '../../utils/colors'; // separate theme values into groupings depending on what\n// part of header cell they should style\n\nvar separateThemeProps = function separateThemeProps(theme) {\n var _theme$dataTable$head = theme.dataTable.header,\n background = _theme$dataTable$head.background,\n border = _theme$dataTable$head.border,\n color = _theme$dataTable$head.color,\n font = _theme$dataTable$head.font,\n gap = _theme$dataTable$head.gap,\n units = _theme$dataTable$head.units,\n rest = _objectWithoutPropertiesLoose(_theme$dataTable$head, [\"background\", \"border\", \"color\", \"font\", \"gap\", \"units\"]);\n\n var cellProps = {\n background: background,\n border: border\n };\n\n var textProps = _extends({\n color: color\n }, font);\n\n var iconProps = {\n color: color\n };\n\n var layoutProps = _extends({}, rest);\n\n return [cellProps, layoutProps, textProps, iconProps];\n}; // build up CSS from basic to specific based on the supplied sub-object paths.\n// adapted from StyledButtonKind to only include parts relevant for DataTable\n\n\nvar buttonStyle = function buttonStyle(_ref) {\n var theme = _ref.theme;\n var styles = [];\n\n var _separateThemeProps = separateThemeProps(theme),\n layoutProps = _separateThemeProps[1],\n iconProps = _separateThemeProps[3];\n\n if (layoutProps) {\n styles.push(kindPartStyles(layoutProps, theme));\n }\n\n if (layoutProps.hover) {\n // CSS for this sub-object in the theme\n var partStyles = kindPartStyles(layoutProps.hover, theme);\n if (partStyles.length > 0) styles.push(css([\"&:hover{\", \"}\"], partStyles));\n }\n\n if (iconProps.color) {\n styles.push(css([\"svg{stroke:\", \";fill:\", \";}\"], normalizeColor(iconProps.color, theme), normalizeColor(iconProps.color, theme)));\n }\n\n return styles;\n};\n\nvar StyledHeaderCellButton = styled(Button).withConfig({\n displayName: \"Header__StyledHeaderCellButton\",\n componentId: \"sc-1baku5q-0\"\n})([\"\", \"\"], function (props) {\n return buttonStyle(props);\n}); // allow extend to spread onto Box that surrounds column label\n\nvar StyledContentBox = styled(Box).withConfig({\n displayName: \"Header__StyledContentBox\",\n componentId: \"sc-1baku5q-1\"\n})([\"\", \"\"], function (props) {\n return props.extend;\n});\nvar Header = /*#__PURE__*/forwardRef(function (_ref2, ref) {\n var backgroundProp = _ref2.background,\n border = _ref2.border,\n columns = _ref2.columns,\n data = _ref2.data,\n fill = _ref2.fill,\n filtering = _ref2.filtering,\n filters = _ref2.filters,\n groups = _ref2.groups,\n groupState = _ref2.groupState,\n onFilter = _ref2.onFilter,\n onFiltering = _ref2.onFiltering,\n onResize = _ref2.onResize,\n onSelect = _ref2.onSelect,\n onSort = _ref2.onSort,\n onToggle = _ref2.onToggle,\n pad = _ref2.pad,\n tablePin = _ref2.pin,\n primaryProperty = _ref2.primaryProperty,\n selected = _ref2.selected,\n sort = _ref2.sort,\n widths = _ref2.widths,\n rest = _objectWithoutPropertiesLoose(_ref2, [\"background\", \"border\", \"columns\", \"data\", \"fill\", \"filtering\", \"filters\", \"groups\", \"groupState\", \"onFilter\", \"onFiltering\", \"onResize\", \"onSelect\", \"onSort\", \"onToggle\", \"pad\", \"pin\", \"primaryProperty\", \"selected\", \"sort\", \"widths\"]);\n\n var theme = useContext(ThemeContext) || defaultProps.theme;\n\n var _separateThemeProps2 = separateThemeProps(theme),\n cellProps = _separateThemeProps2[0],\n layoutProps = _separateThemeProps2[1],\n textProps = _separateThemeProps2[2];\n\n var background;\n if (backgroundProp) background = backgroundProp;else background = undefined;\n return /*#__PURE__*/React.createElement(StyledDataTableHeader, _extends({\n ref: ref,\n fillProp: fill\n }, rest), /*#__PURE__*/React.createElement(StyledDataTableRow, null, groups && /*#__PURE__*/React.createElement(ExpanderCell, {\n context: \"header\",\n expanded: Object.keys(groupState).filter(function (k) {\n return !groupState[k].expanded;\n }).length === 0,\n onToggle: onToggle\n }), (selected || onSelect) && /*#__PURE__*/React.createElement(TableCell, {\n background: background || cellProps.background\n }, onSelect && /*#__PURE__*/React.createElement(CheckBox, {\n checked: selected.length === data.length,\n indeterminate: selected.length > 0 && selected.length < data.length,\n onChange: function onChange() {\n // if any are selected, clear selection\n if (selected.length === data.length) onSelect([]); // if none are selected, select all data\n else onSelect(data.map(function (datum) {\n return datumValue(datum, primaryProperty);\n }));\n }\n })), columns.map(function (_ref3) {\n var property = _ref3.property,\n header = _ref3.header,\n align = _ref3.align,\n columnPin = _ref3.pin,\n search = _ref3.search,\n sortable = _ref3.sortable,\n verticalAlign = _ref3.verticalAlign,\n size = _ref3.size,\n units = _ref3.units;\n var content;\n var unitsContent = units ? /*#__PURE__*/React.createElement(Text, _extends({}, textProps, theme.dataTable.header.units), units) : undefined;\n\n if (typeof header === 'string') {\n content = /*#__PURE__*/React.createElement(Text, textProps, header);\n\n if (Object.keys(layoutProps).length && (sortable === false || !onSort)) {\n // apply rest of layout styling if cell is not sortable,\n // otherwise this styling will be applied by\n // StyledHeaderCellButton\n content = /*#__PURE__*/React.createElement(StyledContentBox, layoutProps, content);\n }\n } else content = header;\n\n if (onSort && sortable !== false) {\n var Icon;\n\n if (onSort && sortable !== false) {\n if (sort && sort.property === property) {\n Icon = theme.dataTable.icons[sort.direction !== 'asc' ? 'ascending' : 'descending'];\n } else if (theme.dataTable.icons.sortable) {\n Icon = theme.dataTable.icons.sortable;\n }\n }\n\n content = /*#__PURE__*/React.createElement(StyledHeaderCellButton, {\n plain: true,\n column: property,\n fill: \"vertical\",\n onClick: onSort(property),\n sort: sort,\n sortable: true\n }, /*#__PURE__*/React.createElement(Box, {\n direction: \"row\",\n align: \"center\",\n gap: \"xsmall\",\n justify: align\n }, content, Icon && /*#__PURE__*/React.createElement(Icon, null)));\n }\n\n if (unitsContent) {\n content = /*#__PURE__*/React.createElement(Box, {\n align: \"baseline\",\n direction: \"row\"\n }, content, unitsContent);\n } // content should fill any available space in cell\n\n\n content = /*#__PURE__*/React.createElement(Box, {\n flex: \"grow\"\n }, content);\n\n if (search || onResize) {\n var resizer = onResize ? /*#__PURE__*/React.createElement(Resizer, {\n property: property,\n onResize: onResize\n }) : null;\n var searcher = search && filters ? /*#__PURE__*/React.createElement(Searcher, {\n filtering: filtering,\n filters: filters,\n property: property,\n onFilter: onFilter,\n onFiltering: onFiltering\n }) : null;\n content = /*#__PURE__*/React.createElement(Box, {\n direction: \"row\",\n align: \"center\",\n justify: !align || align === 'start' ? 'between' : align,\n gap: theme.dataTable.header.gap,\n fill: \"vertical\",\n style: onResize ? {\n position: 'relative'\n } : undefined\n }, content, searcher && resizer ? /*#__PURE__*/React.createElement(Box, {\n flex: \"shrink\",\n direction: \"row\",\n align: \"center\",\n gap: theme.dataTable.header.gap\n }, searcher, resizer) : searcher || resizer);\n }\n\n var pin = [];\n if (tablePin) pin.push('top');\n if (columnPin) pin.push('left');\n if (backgroundProp) background = backgroundProp;else if (pin.length > 0 && theme.dataTable.pinned && theme.dataTable.pinned.header) {\n background = theme.dataTable.pinned.header.background;\n } else background = undefined;\n return /*#__PURE__*/React.createElement(StyledDataTableCell, {\n key: property,\n align: align,\n context: \"header\",\n verticalAlign: verticalAlign,\n background: background || cellProps.background,\n border: border || cellProps.border,\n pad: pad,\n pin: pin,\n plain: true,\n scope: \"col\",\n size: widths && widths[property] ? undefined : size,\n style: widths && widths[property] ? {\n width: widths[property]\n } : undefined\n }, content);\n })));\n});\nHeader.displayName = 'Header';\nHeader.defaultProps = {};\nObject.setPrototypeOf(Header.defaultProps, defaultProps);\nexport { Header };","function _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nimport React, { useContext } from 'react';\nimport { ThemeContext } from 'styled-components';\nimport { defaultProps } from '../../default-props';\nimport { Text } from '../Text';\nimport { StyledDataTableCell } from './StyledDataTable';\nimport { datumValue } from './buildState';\nimport { TableContext } from '../Table/TableContext';\n\nvar normalizeProp = function normalizeProp(name, rowProp, prop) {\n if (rowProp && rowProp[name]) return rowProp[name];\n return prop;\n};\n\nvar Cell = function Cell(_ref) {\n var backgroundProp = _ref.background,\n border = _ref.border,\n _ref$column = _ref.column,\n align = _ref$column.align,\n columnPin = _ref$column.pin,\n footer = _ref$column.footer,\n property = _ref$column.property,\n render = _ref$column.render,\n verticalAlign = _ref$column.verticalAlign,\n size = _ref$column.size,\n datum = _ref.datum,\n index = _ref.index,\n pad = _ref.pad,\n cellPin = _ref.pin,\n primaryProperty = _ref.primaryProperty,\n rowProp = _ref.rowProp,\n scope = _ref.scope;\n var theme = useContext(ThemeContext) || defaultProps.theme;\n var value = datumValue(datum, property);\n var context = useContext(TableContext);\n var renderContexts = context === 'body' || context === 'footer' && footer && footer.aggregate;\n var content;\n\n if (render && renderContexts) {\n content = render(datum);\n } else if (value !== undefined) {\n content = value;\n }\n\n if (typeof content === 'string' || typeof content === 'number') {\n var textProps = property === primaryProperty ? theme.dataTable.primary : {};\n content = /*#__PURE__*/React.createElement(Text, textProps, content);\n }\n\n var pin;\n if (cellPin) pin = cellPin;else if (columnPin) pin = ['left'];\n var background;\n\n if (pin && theme.dataTable.pinned && theme.dataTable.pinned[context]) {\n background = theme.dataTable.pinned[context].background;\n } else background = undefined;\n\n return /*#__PURE__*/React.createElement(StyledDataTableCell, _extends({\n scope: scope\n }, theme.dataTable[context], {\n align: align,\n context: context,\n verticalAlign: verticalAlign,\n size: size,\n background: normalizeProp('background', rowProp, Array.isArray(backgroundProp) ? backgroundProp[index % backgroundProp.length] : backgroundProp) || background,\n border: normalizeProp('border', rowProp, border),\n pad: normalizeProp('pad', rowProp, pad),\n pin: pin\n }), content);\n};\n\nCell.displayName = 'Cell';\nCell.defaultProps = {};\nObject.setPrototypeOf(Cell.defaultProps, defaultProps);\nexport { Cell };","function _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\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\n return target;\n}\n\nimport React, { forwardRef } from 'react';\nimport { defaultProps } from '../../default-props';\nimport { TableRow } from '../TableRow';\nimport { TableCell } from '../TableCell';\nimport { Cell } from './Cell';\nimport { StyledDataTableFooter } from './StyledDataTable';\nvar Footer = /*#__PURE__*/forwardRef(function (_ref, ref) {\n var background = _ref.background,\n border = _ref.border,\n columns = _ref.columns,\n fill = _ref.fill,\n footerValues = _ref.footerValues,\n groups = _ref.groups,\n onSelect = _ref.onSelect,\n pad = _ref.pad,\n tablePin = _ref.pin,\n primaryProperty = _ref.primaryProperty,\n selected = _ref.selected,\n rest = _objectWithoutPropertiesLoose(_ref, [\"background\", \"border\", \"columns\", \"fill\", \"footerValues\", \"groups\", \"onSelect\", \"pad\", \"pin\", \"primaryProperty\", \"selected\"]);\n\n return /*#__PURE__*/React.createElement(StyledDataTableFooter, _extends({\n ref: ref,\n fillProp: fill,\n pin: tablePin\n }, rest), /*#__PURE__*/React.createElement(TableRow, null, groups && /*#__PURE__*/React.createElement(TableCell, {\n plain: true,\n size: \"xxsmall\",\n pad: \"none\",\n verticalAlign: \"top\"\n }), (selected || onSelect) && /*#__PURE__*/React.createElement(TableCell, {\n background: background\n }), columns.map(function (column) {\n var pin = [];\n if (tablePin) pin.push('bottom');\n if (column.pin) pin.push('left');\n return /*#__PURE__*/React.createElement(Cell, {\n key: column.property,\n background: background,\n border: border,\n context: \"footer\",\n column: column,\n datum: footerValues,\n pad: pad,\n pin: pin.length ? pin : undefined,\n primaryProperty: primaryProperty\n });\n })));\n});\nFooter.displayName = 'Footer';\nFooter.defaultProps = {};\nObject.setPrototypeOf(Footer.defaultProps, defaultProps);\nexport { Footer };","function _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\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\n return target;\n}\n\nimport React, { forwardRef } from 'react';\nimport { CheckBox } from '../CheckBox';\nimport { InfiniteScroll } from '../InfiniteScroll';\nimport { TableRow } from '../TableRow';\nimport { TableCell } from '../TableCell';\nimport { Keyboard } from '../Keyboard';\nimport { Cell } from './Cell';\nimport { StyledDataTableBody, StyledDataTableRow } from './StyledDataTable';\nimport { datumValue } from './buildState';\nvar Body = /*#__PURE__*/forwardRef(function (_ref, ref) {\n var background = _ref.background,\n border = _ref.border,\n columns = _ref.columns,\n data = _ref.data,\n onMore = _ref.onMore,\n replace = _ref.replace,\n onClickRow = _ref.onClickRow,\n onSelect = _ref.onSelect,\n pad = _ref.pad,\n pinnedBackground = _ref.pinnedBackground,\n primaryProperty = _ref.primaryProperty,\n rowProps = _ref.rowProps,\n selected = _ref.selected,\n size = _ref.size,\n step = _ref.step,\n rest = _objectWithoutPropertiesLoose(_ref, [\"background\", \"border\", \"columns\", \"data\", \"onMore\", \"replace\", \"onClickRow\", \"onSelect\", \"pad\", \"pinnedBackground\", \"primaryProperty\", \"rowProps\", \"selected\", \"size\", \"step\"]);\n\n var _React$useState = React.useState(),\n active = _React$useState[0],\n setActive = _React$useState[1];\n\n return /*#__PURE__*/React.createElement(Keyboard, {\n onEnter: onClickRow && active >= 0 ? function (event) {\n event.persist();\n var adjustedEvent = event;\n adjustedEvent.datum = data[active];\n onClickRow(adjustedEvent);\n } : undefined,\n onUp: onClickRow && active ? function () {\n setActive(active - 1);\n } : undefined,\n onDown: onClickRow && data.length ? function () {\n setActive(active >= 0 ? Math.min(active + 1, data.length - 1) : 0);\n } : undefined\n }, /*#__PURE__*/React.createElement(StyledDataTableBody, _extends({\n ref: ref,\n size: size,\n tabIndex: onClickRow ? 0 : undefined\n }, rest), /*#__PURE__*/React.createElement(InfiniteScroll, {\n items: data,\n onMore: onMore,\n replace: replace,\n renderMarker: function renderMarker(marker) {\n return /*#__PURE__*/React.createElement(TableRow, null, /*#__PURE__*/React.createElement(TableCell, null, marker));\n },\n scrollableAncestor: \"window\",\n step: step\n }, function (datum, index, rowRef) {\n var primaryValue = primaryProperty ? datumValue(datum, primaryProperty) : undefined;\n var isSelected = selected && selected.includes(primaryValue);\n return /*#__PURE__*/React.createElement(StyledDataTableRow, {\n key: primaryValue || index,\n ref: rowRef,\n size: size,\n active: active >= 0 ? active === index : undefined,\n onClick: onClickRow ? function (event) {\n // extract from React's synthetic event pool\n event.persist();\n var adjustedEvent = event;\n adjustedEvent.datum = datum;\n adjustedEvent.index = index;\n onClickRow(adjustedEvent);\n } : undefined,\n onMouseOver: onClickRow ? function () {\n return setActive(index);\n } : undefined,\n onMouseOut: onClickRow ? function () {\n return setActive(undefined);\n } : undefined,\n onFocus: onClickRow ? function () {\n return setActive(index);\n } : undefined,\n onBlur: onClickRow ? function () {\n return setActive(undefined);\n } : undefined\n }, (selected || onSelect) && /*#__PURE__*/React.createElement(TableCell, {\n background: background\n }, /*#__PURE__*/React.createElement(CheckBox, {\n a11yTitle: (isSelected ? 'unselect' : 'select') + \" \" + primaryValue,\n checked: isSelected,\n disabled: !onSelect,\n onChange: function onChange() {\n if (isSelected) onSelect(selected.filter(function (s) {\n return s !== primaryValue;\n }));else onSelect([].concat(selected, [primaryValue]));\n }\n })), columns.map(function (column) {\n return /*#__PURE__*/React.createElement(Cell, {\n key: column.property,\n background: column.pin ? pinnedBackground : background,\n border: border,\n context: \"body\",\n column: column,\n datum: datum,\n index: index,\n pad: pad,\n primaryProperty: primaryProperty,\n rowProp: rowProps && rowProps[primaryValue],\n scope: column.primary || column.property === primaryProperty ? 'row' : undefined\n });\n }));\n })));\n});\nexport { Body };","function _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\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\n return target;\n}\n\nimport React, { Fragment } from 'react';\nimport { Cell } from './Cell';\nimport { ExpanderCell } from './ExpanderCell';\nimport { StyledDataTableBody, StyledDataTableRow } from './StyledDataTable';\nexport var GroupedBody = function GroupedBody(_ref) {\n var background = _ref.background,\n border = _ref.border,\n columns = _ref.columns,\n groupBy = _ref.groupBy,\n groups = _ref.groups,\n groupState = _ref.groupState,\n pad = _ref.pad,\n primaryProperty = _ref.primaryProperty,\n onToggle = _ref.onToggle,\n size = _ref.size,\n rest = _objectWithoutPropertiesLoose(_ref, [\"background\", \"border\", \"columns\", \"groupBy\", \"groups\", \"groupState\", \"pad\", \"primaryProperty\", \"onToggle\", \"size\"]);\n\n return /*#__PURE__*/React.createElement(StyledDataTableBody, _extends({\n size: size\n }, rest), groups.map(function (group) {\n var expanded = groupState[group.key].expanded;\n var memberCount = group.data.length;\n var content = memberCount > 1 ? /*#__PURE__*/React.createElement(StyledDataTableRow, {\n key: group.key,\n size: size\n }, /*#__PURE__*/React.createElement(ExpanderCell, {\n context: expanded ? 'groupHeader' : 'body',\n expanded: expanded,\n onToggle: onToggle(group.key)\n }), columns.map(function (column) {\n return /*#__PURE__*/React.createElement(Cell, {\n key: column.property,\n background: background,\n border: border,\n context: expanded ? 'groupHeader' : 'body',\n column: column,\n datum: group.datum,\n pad: pad,\n scope: column.property === groupBy ? 'row' : undefined\n });\n })) : null;\n\n if (memberCount === 1 || expanded) {\n content = /*#__PURE__*/React.createElement(Fragment, {\n key: group.key\n }, content, group.data.map(function (datum, index) {\n var context = memberCount > 1 && index === memberCount - 1 ? 'groupEnd' : 'body';\n return /*#__PURE__*/React.createElement(StyledDataTableRow, {\n key: datum[primaryProperty],\n size: size\n }, /*#__PURE__*/React.createElement(ExpanderCell, {\n context: context\n }), columns.map(function (column) {\n return /*#__PURE__*/React.createElement(Cell, {\n key: column.property,\n background: background,\n border: border,\n context: context,\n column: column,\n datum: datum,\n pad: pad,\n scope: column.primary ? 'row' : undefined\n });\n }));\n }));\n }\n\n return content;\n }));\n};","function _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\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\n return target;\n}\n\nimport React, { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';\nimport { Box } from '../Box';\nimport { Text } from '../Text';\nimport { Header } from './Header';\nimport { Footer } from './Footer';\nimport { Body } from './Body';\nimport { GroupedBody } from './GroupedBody';\nimport { buildFooterValues, buildGroups, buildGroupState, filterAndSortData, initializeFilters, normalizePrimaryProperty } from './buildState';\nimport { StyledDataTable, StyledPlaceholder } from './StyledDataTable';\nvar contexts = ['header', 'body', 'footer'];\n\nvar normalizeProp = function normalizeProp(prop, context) {\n if (prop) {\n if (prop[context]) {\n return prop[context];\n } // if prop[context] wasn't defined, but other values\n // exist on the prop, return undefined so that background\n // for context will defaultto theme values instead\n // note: need to include `pinned` since it is not a\n // defined context\n\n\n if (contexts.some(function (c) {\n return prop[c] || prop.pinned;\n })) {\n return undefined;\n }\n\n return prop;\n }\n\n return undefined;\n};\n\nvar DataTable = function DataTable(_ref) {\n var background = _ref.background,\n border = _ref.border,\n _ref$columns = _ref.columns,\n columns = _ref$columns === void 0 ? [] : _ref$columns,\n _ref$data = _ref.data,\n data = _ref$data === void 0 ? [] : _ref$data,\n fill = _ref.fill,\n groupBy = _ref.groupBy,\n onClickRow = _ref.onClickRow,\n onMore = _ref.onMore,\n onSearch = _ref.onSearch,\n onSelect = _ref.onSelect,\n onSortProp = _ref.onSort,\n replace = _ref.replace,\n pad = _ref.pad,\n pin = _ref.pin,\n placeholder = _ref.placeholder,\n primaryKey = _ref.primaryKey,\n resizeable = _ref.resizeable,\n rowProps = _ref.rowProps,\n select = _ref.select,\n size = _ref.size,\n sortProp = _ref.sort,\n sortable = _ref.sortable,\n _ref$step = _ref.step,\n step = _ref$step === void 0 ? 50 : _ref$step,\n rest = _objectWithoutPropertiesLoose(_ref, [\"background\", \"border\", \"columns\", \"data\", \"fill\", \"groupBy\", \"onClickRow\", \"onMore\", \"onSearch\", \"onSelect\", \"onSort\", \"replace\", \"pad\", \"pin\", \"placeholder\", \"primaryKey\", \"resizeable\", \"rowProps\", \"select\", \"size\", \"sort\", \"sortable\", \"step\"]); // property name of the primary property\n\n\n var primaryProperty = useMemo(function () {\n return normalizePrimaryProperty(columns, primaryKey);\n }, [columns, primaryKey]); // whether or not we should show a footer\n\n var showFooter = useMemo(function () {\n return columns.filter(function (c) {\n return c.footer;\n }).length > 0;\n }, [columns]); // what column we are actively capturing filter input on\n\n var _useState = useState(),\n filtering = _useState[0],\n setFiltering = _useState[1]; // the currently active filters\n\n\n var _useState2 = useState(initializeFilters(columns)),\n filters = _useState2[0],\n setFilters = _useState2[1]; // which column we are sorting on, with direction\n\n\n var _useState3 = useState(sortProp || {}),\n sort = _useState3[0],\n setSort = _useState3[1]; // the data filtered and sorted, if needed\n\n\n var adjustedData = useMemo(function () {\n return filterAndSortData(data, filters, onSearch, sort);\n }, [data, filters, onSearch, sort]); // the values to put in the footer cells\n\n var footerValues = useMemo(function () {\n return buildFooterValues(columns, adjustedData);\n }, [adjustedData, columns]); // if groupBy, an array with one item per unique groupBy key value\n\n var groups = useMemo(function () {\n return buildGroups(columns, adjustedData, groupBy);\n }, [adjustedData, columns, groupBy]); // an object indicating which group values are expanded\n\n var _useState4 = useState(buildGroupState(groups, groupBy)),\n groupState = _useState4[0],\n setGroupState = _useState4[1];\n\n var _useState5 = useState(select || onSelect && [] || undefined),\n selected = _useState5[0],\n setSelected = _useState5[1];\n\n useEffect(function () {\n return setSelected(select || onSelect && [] || undefined);\n }, [onSelect, select]); // any customized column widths\n\n var _useState6 = useState({}),\n widths = _useState6[0],\n setWidths = _useState6[1]; // placeholder placement stuff\n\n\n var headerRef = useRef();\n var footerRef = useRef();\n\n var _useState7 = useState(),\n headerHeight = _useState7[0],\n setHeaderHeight = _useState7[1];\n\n var _useState8 = useState(),\n footerHeight = _useState8[0],\n setFooterHeight = _useState8[1];\n\n useLayoutEffect(function () {\n if (placeholder) {\n if (headerRef.current) {\n var nextHeaderHeight = headerRef.current.getBoundingClientRect().height;\n setHeaderHeight(nextHeaderHeight);\n } else setHeaderHeight(0);\n\n if (footerRef.current) {\n var nextFooterHeight = footerRef.current.getBoundingClientRect().height;\n setFooterHeight(nextFooterHeight);\n } else setFooterHeight(0);\n }\n }, [footerRef, headerRef, placeholder]); // remember that we are filtering on this property\n\n var onFiltering = function onFiltering(property) {\n return setFiltering(property);\n }; // remember the search text we should filter this property by\n\n\n var onFilter = function onFilter(property, value) {\n var nextFilters = _extends({}, filters);\n\n nextFilters[property] = value;\n setFilters(nextFilters); // Let caller know about search, if interested\n\n if (onSearch) onSearch(nextFilters);\n }; // toggle the sort direction on this property\n\n\n var onSort = function onSort(property) {\n return function () {\n var external = sort ? sort.external : false;\n var direction;\n if (!sort || property !== sort.property) direction = 'asc';else if (sort.direction === 'asc') direction = 'desc';else direction = 'asc';\n var nextSort = {\n property: property,\n direction: direction,\n external: external\n };\n setSort(nextSort);\n if (onSortProp) onSortProp(nextSort);\n };\n }; // toggle whether the group is expanded\n\n\n var onToggleGroup = function onToggleGroup(groupValue) {\n return function () {\n var nextGroupState = _extends({}, groupState);\n\n nextGroupState[groupValue] = _extends({}, nextGroupState[groupValue], {\n expanded: !nextGroupState[groupValue].expanded\n });\n setGroupState(nextGroupState);\n\n if (groupBy.onExpand) {\n var expandedKeys = Object.keys(nextGroupState).filter(function (k) {\n return nextGroupState[k].expanded;\n });\n groupBy.onExpand(expandedKeys);\n }\n };\n }; // toggle whether all groups are expanded\n\n\n var onToggleGroups = function onToggleGroups() {\n var expanded = Object.keys(groupState).filter(function (k) {\n return !groupState[k].expanded;\n }).length === 0;\n var nextGroupState = {};\n Object.keys(groupState).forEach(function (k) {\n nextGroupState[k] = _extends({}, groupState[k], {\n expanded: !expanded\n });\n });\n setGroupState(nextGroupState);\n\n if (groupBy.onExpand) {\n var expandedKeys = Object.keys(nextGroupState).filter(function (k) {\n return nextGroupState[k].expanded;\n });\n groupBy.onExpand(expandedKeys);\n }\n }; // remember the width this property's column should be\n\n\n var onResize = useCallback(function (property, width) {\n if (widths[property] !== width) {\n var nextWidths = _extends({}, widths);\n\n nextWidths[property] = width;\n setWidths(nextWidths);\n }\n }, [widths]);\n\n if (size && resizeable) {\n console.warn('DataTable cannot combine \"size\" and \"resizeble\".');\n }\n\n return /*#__PURE__*/React.createElement(StyledDataTable, _extends({\n fillProp: fill\n }, rest), /*#__PURE__*/React.createElement(Header, {\n ref: headerRef,\n background: normalizeProp(background, 'header'),\n border: normalizeProp(border, 'header'),\n columns: columns,\n data: adjustedData,\n fill: fill,\n filtering: filtering,\n filters: filters,\n groups: groups,\n groupState: groupState,\n pad: normalizeProp(pad, 'header'),\n pin: pin === true || pin === 'header',\n selected: selected,\n size: size,\n sort: sort,\n widths: widths,\n onFiltering: onFiltering,\n onFilter: onFilter,\n onResize: resizeable ? onResize : undefined,\n onSelect: onSelect ? function (nextSelected) {\n setSelected(nextSelected);\n if (onSelect) onSelect(nextSelected);\n } : undefined,\n onSort: sortable || sortProp || onSortProp ? onSort : undefined,\n onToggle: onToggleGroups,\n primaryProperty: primaryProperty\n }), groups ? /*#__PURE__*/React.createElement(GroupedBody, {\n background: normalizeProp(background, 'body'),\n border: normalizeProp(border, 'body'),\n columns: columns,\n groupBy: groupBy.property ? groupBy.property : groupBy,\n groups: groups,\n groupState: groupState,\n pad: normalizeProp(pad, 'body'),\n primaryProperty: primaryProperty,\n onToggle: onToggleGroup,\n size: size\n }) : /*#__PURE__*/React.createElement(Body, {\n background: normalizeProp(background, 'body'),\n border: normalizeProp(border, 'body'),\n columns: columns,\n data: adjustedData,\n onMore: onMore,\n replace: replace,\n onClickRow: onClickRow,\n onSelect: onSelect ? function (nextSelected) {\n setSelected(nextSelected);\n if (onSelect) onSelect(nextSelected);\n } : undefined,\n pad: normalizeProp(pad, 'body'),\n pinnedBackground: normalizeProp(background, 'pinned'),\n placeholder: placeholder,\n primaryProperty: primaryProperty,\n rowProps: rowProps,\n selected: selected,\n size: size,\n step: step\n }), showFooter && /*#__PURE__*/React.createElement(Footer, {\n ref: footerRef,\n background: normalizeProp(background, 'footer'),\n border: normalizeProp(border, 'footer'),\n columns: columns,\n fill: fill,\n footerValues: footerValues,\n groups: groups,\n onSelect: onSelect,\n pad: normalizeProp(pad, 'footer'),\n pin: pin === true || pin === 'footer',\n primaryProperty: primaryProperty,\n selected: selected,\n size: size\n }), placeholder && /*#__PURE__*/React.createElement(StyledPlaceholder, {\n top: headerHeight,\n bottom: footerHeight\n }, typeof placeholder === 'string' ? /*#__PURE__*/React.createElement(Box, {\n background: {\n color: 'background-front',\n opacity: 'strong'\n },\n align: \"center\",\n justify: \"center\",\n fill: \"vertical\"\n }, /*#__PURE__*/React.createElement(Text, null, placeholder)) : placeholder));\n};\n\nvar DataTableDoc;\n\nif (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line global-require\n DataTableDoc = require('./doc').doc(DataTable);\n}\n\nvar DataTableWrapper = DataTableDoc || DataTable;\nexport { DataTableWrapper as DataTable };","function _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nimport React from 'react';\nimport { StyledIcon } from '../StyledIcon';\nexport var Configure = function Configure(props) {\n return /*#__PURE__*/React.createElement(StyledIcon, _extends({\n viewBox: \"0 0 24 24\",\n a11yTitle: \"Configure\"\n }, props), /*#__PURE__*/React.createElement(\"path\", {\n fill: \"none\",\n stroke: \"#000\",\n strokeWidth: \"2\",\n d: \"M16,15 C20.0089021,14.9354541 23,11.9673591 23,8 C23,4.98813056 22.0029673,5.9851632 21,7 C20.0089021,7.97922849 18,10 18,10 L14,6 C14,6 16.0207715,3.99109792 17,3 C18.0148368,1.99703264 18.0148368,1 16,1 C12.0326409,0.999999999 9.05307486,3.99109792 9,8 C9.04154304,8.97626113 9,11 9,11 C7.11486635,12.8970031 4.65923194,15.3526375 3,17 C0.0682492584,19.9436202 4.05637975,23.9317507 7,21 C8.65052042,19.3376102 11.1126942,16.8754364 13,15 C13,15 15.0237389,14.958457 16,15 Z\"\n }));\n};"],"sourceRoot":""}