diff --git a/README.md b/README.md index 5e92966a..bb5a2d3d 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,25 @@ This is the home of shared javascript components and utilities for Ona. +## Typescript Support + +It is actually recommended to create all new packages using `Typescript`. The instructions above on how to add a new package are all that you need to get started. + +In addition to the above instructions, you need to create a `tsconfig.json` file next to the package.json file inside your new package's directory. + +The contents of this file should be something like: + +```json +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "outDir": "dist", + "declarationDir": "dist/types" + }, + "include": ["src"] +} +``` + ## Contribution Contribution is highly encouraged. If you have something - a tool, a component, a useful utility function, etc. - that would be useful to others then by all means please add it to this repository. @@ -84,7 +103,7 @@ Here's an example sample `package.json` for a `js`/`jsx` package: }, "scripts": { "jest": "jest --coverage --verbose --color", - "transpile": "babel src -d dist --root-mode upward --ignore '**/*.test.js,**/*.test.jsx,**/tests,**/__tests__' --copy-files" + "transpile": "babel src -d dist --root-mode upward --ignore '**/*.test.js,**/*.test.jsx,**/tests,**/__tests__'" }, // the list of files to be included by npm when the package is published "files": ["dist"], @@ -128,7 +147,7 @@ Here's an example sample `package.json` for a `ts`/`tsx` package: "scripts": { "jest": "jest --coverage --verbose --color", "tsc": "tsc", - "transpile": "babel src -d dist --root-mode upward --extensions '.ts,.tsx' --ignore '**/*.test.ts,**/*.test.tsx,**/tests,**/__tests__' --copy-files" + "transpile": "babel src -d dist --root-mode upward --extensions '.ts,.tsx' --ignore '**/*.test.ts,**/*.test.tsx,**/tests,**/__tests__'" }, // the list of files to be included by npm when the package is published "files": ["dist"], @@ -192,55 +211,68 @@ Your transpiled package is saved in the `dist` directory within each package. No ## Publishing -Assuming that you have the `js-tools` repo cloned locally, switch to the `master` branch and proceed: +### Prepare for publishing + +Before we publish our packages, we need to prepare them. Currently, this means we need to do two things: generating Typescript type delcaration files, and transpiling the code. -First, tag releases for Github - this will tag releases on Github and create a changelog for all updated packages: +You will need to switch to the package that you want to publish by running ```sh -lerna version --github-release --conventional-commits +cd packages/SomePackage ``` -Next clean your `dist` folders locally to remove old files: +Transpile the package - this will create the distribution-ready files: + +The command to do this depends on whether the package uses javascript or Typescript. ```sh -yarn clean-build +# javascript package +babel src -d dist --root-mode upward --ignore '**/*.test.js,**/*.test.jsx,**/tests,**/__tests__' + +# typescript package +yarn babel src -d dist --root-mode upward --extensions '.ts,.tsx' --ignore '**/*.test.ts,**/*.test.tsx,**/tests,**/__tests__' ``` -Generate type declaration files for packages written in Typescript: +> Note that you may need to compy non-js/non-typescript files to the `dist` directory manually e.g. css files -```sh -lerna run tsc -``` +Once this is done, commit any changes to the `dist` folder. -Transpile the packages - this will create the distribution-ready files for all packages: +Next, generate type declaration files for packages written in Typescript: ```sh -lerna run transpile +yarn tsc ``` -Finally, publish the packages to the `npm` registry: +Once this is done, commit changes to the `types` folder. You may have to ignore some stubborn linter warnings. -```sh -lerna publish from-git -``` +--- -You may want to checkout documentation for the [`lerna version`](https://github.com/lerna/lerna/tree/master/commands/version) and [`lerna publish`](https://github.com/lerna/lerna/tree/master/commands/publish) commands. +Once you have done the above, you would then push your changes, have your code reviewed and eventually merged to master before you proceed. -## Typescript Support +### Actually publish -It is actually recommended to create all new packages using `Typescript`. The instructions above on how to add a new package are all that you need to get started. +Assuming that you have the `js-tools` repo cloned locally, switch to the `master` branch and proceed: -In addition to the above instructions, you need to create a `tsconfig.json` file next to the package.json file inside your new package's directory. +1. To authenticate with Github, you need to define the following environment variable: -The contents of this file should be something like: +> _GH_TOKEN_ (required) - Your GitHub authentication token (under Settings > Developer settings > Personal access tokens) -```json -{ - "extends": "../../tsconfig.json", - "compilerOptions": { - "outDir": "dist", - "declarationDir": "dist/types" - }, - "include": ["src"] -} +2. Next, tag releases on Github and create a changelog for all updated packages: + +```sh +lerna version --github-release --conventional-commits +``` + +3. At this point, we are ready to publish to `npm`. You would, of course, need to log in to npm first: + +```sh +npm login ``` + +4. Finally, publish the packages to the `npm` registry: + +```sh +lerna publish from-git +``` + +You may want to checkout documentation for the [`lerna version`](https://github.com/lerna/lerna/tree/master/commands/version) and [`lerna publish`](https://github.com/lerna/lerna/tree/master/commands/publish) commands. diff --git a/packages/DrillDownTable/README.md b/packages/DrillDownTable/README.md index b567a12b..17327c85 100644 --- a/packages/DrillDownTable/README.md +++ b/packages/DrillDownTable/README.md @@ -87,10 +87,30 @@ When the table is rendered, you can click anywhere on a row to drill down to the This is a component responsible for rendering the cell in which the `linkerField` (above) is found. By default it just adds a caret to show if you can drill down on a row of data or not. However you can supply your own component that renders whatever else you may want - for example instead of a caret you may want to show a link. Have a look at [`DropDownCell`](src/helpers/DropDownCell.tsx) for an example of how this component might look at. +#### extraCellProps + +This is an object that represents extra props to be given to the `CellComponent` (above). + #### useDrillDownTrProps By default `DrillDownTable` allows you to click on any row to drill-down to the next hierarchical level of data. This is achieved by having a [custom geTrProps](https://github.com/tannerlinsley/react-table/tree/v6#props) built into `DrillDownTable`. You can turn this off by setting `useDrillDownTrProps` to be `false`. +#### hasChildren + +This is a function that returns a `boolean` indicating whether or not a row of data has children i.e. should you be able to drill down using the given row? + +A sample `hasChildren` function looks like so: + +```ts +export function hasChildrenFunc( + currentObject: RowInfo | CellInfo, + parentIdList: number[] | string[], + idField: string | number = 'id' +) { + return parentIdList.includes(currentObject.original[idField]); +} +``` + ### Code examples Simplest example: @@ -155,3 +175,49 @@ const props = { }; ; ``` + +Use a custom `CellComponent` and `extraCellProps`. + +```tsx +interface NewCellComponentProps extends DropDownCellProps { + urlPath: string; + caret: string; +} + +const NewCellComponent: React.ElementType = (props: NewCellComponentProps) => { + const { cellValue, hasChildren, urlPath, caret } = props; + return ( +
+ + {hasChildren ? ( + + {cellValue} {caret} + + ) : ( + cellValue + )} + +
+ ); +}; + +const props = { + CellComponent: NewCellComponent, + data, + extraCellProps: { urlPath: 'http://example.com', caret: + } +}; +; +``` + +Use custom `hasChildren` + +```tsx +import 'react-table/react-table.css'; +import DrillDownTable from '@onaio/drill-down-table/'; + +const props = { + data: data, + hasChildren: (item, parents, idfield) => item.original[idfield] === 10 +}; +; +``` diff --git a/packages/DrillDownTable/dist/index.js b/packages/DrillDownTable/dist/index.js index fbd847de..099b0894 100644 --- a/packages/DrillDownTable/dist/index.js +++ b/packages/DrillDownTable/dist/index.js @@ -7,6 +7,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau Object.defineProperty(exports, "__esModule", { value: true }); +exports.hasChildrenFunc = hasChildrenFunc; Object.defineProperty(exports, "DropDownCell", { enumerable: true, get: function get() { @@ -47,8 +48,14 @@ var _DropDownCell = _interopRequireWildcard(require("./helpers/DropDownCell")); var _WithHeaders = _interopRequireWildcard(require("./WithHeaders")); +function hasChildrenFunc(currentObject, parentIdList) { + var idField = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'id'; + return parentIdList.includes(currentObject.original[idField]); +} + function DrillDownTable(props) { var data = props.data, + hasChildren = props.hasChildren, parentIdentifierField = props.parentIdentifierField, useDrillDownTrProps = props.useDrillDownTrProps; var columns = (0, _WithHeaders.getColumns)(props); @@ -74,7 +81,7 @@ function DrillDownTable(props) { setPreviousParentId = _useState8[1]; (0, _react.useEffect)(function () { - if (props.rootParentId !== currentParentId) { + if (props.rootParentId != null && props.rootParentId !== currentParentId) { setPreviousParentId(currentParentId); setCurrentParentId(props.rootParentId); } @@ -104,16 +111,6 @@ function DrillDownTable(props) { return data; } - function hasChildren(row) { - var identifierField = props.identifierField; - - if (identifierField && parentNodes && parentNodes.includes(row.original[identifierField])) { - return true; - } - - return false; - } - var drillDownTrProps = function drillDownTrProps(row, instance) { var getTrProps = props.getTrProps; @@ -124,7 +121,7 @@ function DrillDownTable(props) { return { onClick: function onClick() { if (props.identifierField && props.parentIdentifierField) { - if (hasChildren(instance)) { + if (hasChildren && hasChildren(instance, parentNodes, props.identifierField) === true) { var newParentId = instance.original[props.identifierField]; var oldParentId = instance.original[props.parentIdentifierField]; setCurrentParentId(newParentId); @@ -149,9 +146,16 @@ function DrillDownTable(props) { if (el.accessor === linkerField) { el.Cell = function (cell) { if (CellComponent !== undefined) { + var _identifierField = props.identifierField; + var thisCellHasChildren = false; + + if (hasChildren && _identifierField && hasChildren(cell, parentNodes, _identifierField)) { + thisCellHasChildren = true; + } + var cellProps = { cellValue: cell.value, - hasChildren: hasChildren(cell) + hasChildren: thisCellHasChildren }; if (extraCellProps !== undefined) { @@ -187,6 +191,7 @@ function DrillDownTable(props) { DrillDownTable.defaultProps = { CellComponent: _DropDownCell.default, + hasChildren: hasChildrenFunc, identifierField: _constants.ID, linkerField: _constants.ID, parentIdentifierField: _constants.PARENT_ID, diff --git a/packages/DrillDownTable/dist/types/index.d.ts b/packages/DrillDownTable/dist/types/index.d.ts index e977cd90..84c32915 100644 --- a/packages/DrillDownTable/dist/types/index.d.ts +++ b/packages/DrillDownTable/dist/types/index.d.ts @@ -1,13 +1,26 @@ import React from 'react'; -import { TableProps } from 'react-table'; +import { CellInfo, RowInfo, TableProps } from 'react-table'; import './DrillDownTable.css'; import DropDownCell, { DropDownCellProps } from './helpers/DropDownCell'; import { FlexObject } from './helpers/utils'; import WithHeaders, { getColumns } from './WithHeaders'; +/** Type definition for hasChildrenFunc */ +export declare type hasChildrenFuncType = ( + currentObject: RowInfo | CellInfo, + parentIdList: number[] | string[], + idField: string | number +) => boolean; +/** Check if a row of data has children */ +export declare function hasChildrenFunc( + currentObject: RowInfo | CellInfo, + parentIdList: number[] | string[], + idField?: string | number +): boolean; /** Interface to define props of Drill down table */ export interface DrillDownProps extends Partial> { CellComponent: React.ElementType; extraCellProps?: FlexObject; + hasChildren?: hasChildrenFuncType; identifierField?: string; linkerField?: string; parentIdentifierField?: string; @@ -22,6 +35,7 @@ declare function DrillDownTable(props: Partial>): JSX.Eleme declare namespace DrillDownTable { var defaultProps: { CellComponent: React.ElementType; + hasChildren: typeof hasChildrenFunc; identifierField: string; linkerField: string; parentIdentifierField: string; diff --git a/packages/DrillDownTable/src/index.tsx b/packages/DrillDownTable/src/index.tsx index 2fd14ab2..aef347d7 100644 --- a/packages/DrillDownTable/src/index.tsx +++ b/packages/DrillDownTable/src/index.tsx @@ -6,10 +6,27 @@ import DropDownCell, { DropDownCellProps } from './helpers/DropDownCell'; import { FlexObject } from './helpers/utils'; import WithHeaders, { getColumns } from './WithHeaders'; +/** Type definition for hasChildrenFunc */ +export type hasChildrenFuncType = ( + currentObject: RowInfo | CellInfo, + parentIdList: number[] | string[], + idField: string | number +) => boolean; + +/** Check if a row of data has children */ +export function hasChildrenFunc( + currentObject: RowInfo | CellInfo, + parentIdList: number[] | string[], + idField: string | number = 'id' +) { + return parentIdList.includes(currentObject.original[idField]); +} + /** Interface to define props of Drill down table */ export interface DrillDownProps extends Partial> { CellComponent: React.ElementType; extraCellProps?: FlexObject; + hasChildren?: hasChildrenFuncType; identifierField?: string; linkerField?: string; parentIdentifierField?: string; @@ -30,7 +47,7 @@ interface State extends Partial> { * the lowest, nad back with maximum flexibility. */ function DrillDownTable(props: Partial>) { - const { data, parentIdentifierField, useDrillDownTrProps } = props; + const { data, hasChildren, parentIdentifierField, useDrillDownTrProps } = props; const columns = getColumns(props); // state variables const [currentParentId, setCurrentParentId] = useState(props.rootParentId); @@ -44,7 +61,7 @@ function DrillDownTable(props: Partial>) { * is updated to match it */ useEffect(() => { - if (props.rootParentId !== currentParentId) { + if (props.rootParentId != null && props.rootParentId !== currentParentId) { setPreviousParentId(currentParentId); setCurrentParentId(props.rootParentId); } @@ -71,15 +88,6 @@ function DrillDownTable(props: Partial>) { return data; } - /** Check if a row of data has children */ - function hasChildren(row: RowInfo) { - const { identifierField } = props; - if (identifierField && parentNodes && parentNodes.includes(row.original[identifierField])) { - return true; - } - return false; - } - /** getTrProps hook set up to handle drill-down using click event */ const drillDownTrProps = (row: RowInfo, instance: RowInfo) => { const { getTrProps } = props; @@ -89,7 +97,7 @@ function DrillDownTable(props: Partial>) { return { onClick: () => { if (props.identifierField && props.parentIdentifierField) { - if (hasChildren(instance)) { + if (hasChildren && hasChildren(instance, parentNodes, props.identifierField) === true) { const newParentId = instance.original[props.identifierField]; const oldParentId = instance.original[props.parentIdentifierField]; setCurrentParentId(newParentId); @@ -114,10 +122,18 @@ function DrillDownTable(props: Partial>) { if (el.accessor === linkerField) { el.Cell = (cell: CellInfo) => { if (CellComponent !== undefined) { + const { identifierField } = props; + + let thisCellHasChildren = false; + if (hasChildren && identifierField && hasChildren(cell, parentNodes, identifierField)) { + thisCellHasChildren = true; + } + const cellProps: DropDownCellProps = { cellValue: cell.value, - hasChildren: hasChildren(cell) + hasChildren: thisCellHasChildren }; + if (extraCellProps !== undefined) { Object.assign(cellProps, extraCellProps); } @@ -148,6 +164,7 @@ function DrillDownTable(props: Partial>) { DrillDownTable.defaultProps = { CellComponent: DropDownCell, + hasChildren: hasChildrenFunc, identifierField: ID, linkerField: ID, parentIdentifierField: PARENT_ID, diff --git a/packages/DrillDownTable/src/tests/DrillDownTable.test.tsx b/packages/DrillDownTable/src/tests/DrillDownTable.test.tsx index a581bd36..cb563797 100644 --- a/packages/DrillDownTable/src/tests/DrillDownTable.test.tsx +++ b/packages/DrillDownTable/src/tests/DrillDownTable.test.tsx @@ -42,20 +42,21 @@ describe('DrillDownTable', () => { data }; const wrapper = mount(); + expect(toJson(wrapper.find('div.ReactTable'))).toMatchSnapshot(); // drill down first level expect(wrapper.find('.dd-linker-item.dd-clickable').length).toEqual(3); wrapper .find('.dd-linker-item.dd-clickable') .first() .simulate('click'); - expect(toJson(wrapper.find('ReactTable'))).toMatchSnapshot(); + expect(toJson(wrapper.find('div.ReactTable'))).toMatchSnapshot(); // drill down second level expect(wrapper.find('.dd-linker-item.dd-clickable').length).toEqual(2); wrapper .find('.dd-linker-item.dd-clickable') .first() .simulate('click'); - expect(toJson(wrapper.find('ReactTable'))).toMatchSnapshot(); + expect(toJson(wrapper.find('div.ReactTable'))).toMatchSnapshot(); // there should now be no more drilling down possible expect(wrapper.find('.dd-linker-item.dd-clickable').length).toEqual(0); wrapper.unmount(); @@ -223,4 +224,14 @@ describe('DrillDownTable', () => { expect(toJson(wrapper)).toMatchSnapshot(); wrapper.unmount(); }); + + it('works with custom hasChildren callback', () => { + const props = { + data: dataLowestLevel, + hasChildren: (item, parents, idfield) => item.original[idfield] === 10 + }; + const wrapper = mount(); + expect(toJson(wrapper)).toMatchSnapshot(); + wrapper.unmount(); + }); }); diff --git a/packages/DrillDownTable/src/tests/__snapshots__/DrillDownTable.test.tsx.snap b/packages/DrillDownTable/src/tests/__snapshots__/DrillDownTable.test.tsx.snap index dfc715ea..0697fab9 100644 --- a/packages/DrillDownTable/src/tests/__snapshots__/DrillDownTable.test.tsx.snap +++ b/packages/DrillDownTable/src/tests/__snapshots__/DrillDownTable.test.tsx.snap @@ -1,226 +1,54 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`DrillDownTable click to drill down works 1`] = ` - -
- -
- -
- -
+
+ -
+ id +
+
- id -
- -
- -
-
- + +
+ + +
+ location +
+
- location -
- -
- -
- - +
+
+
+ +
+ parent_id +
+
- parent_id -
- -
- -
- - +
+
+
+ +
+ spray_coverage +
+
- spray_coverage -
- -
- -
- - +
+
+
+ +
+ spray_effectiveness +
+
- spray_effectiveness -
- -
- -
- -
- -
- - + +
+ +
+ +
+ + +
-
- -
- +
-
+
+ - -
- - -
- - 4 - -  ▼ - + + 1 + +  ▼ -
-
-
-
-
- +
+ + +
+ + +
-
- HFC 1 -
- - + + +
-
- 1 -
- - + + +
-
- 80% -
- - + + +
-
- 80% -
- -
- -
- - +
+
+ +
+ + +
-
- +
-
+
+ - -
- - -
- - 5 - -  ▼ - + + 2 + +  ▼ -
-
-
-
-
- -
- HFC 2 -
-
- +
+ + +
+ + -
- 1 -
-
- +
-
- 80% -
- - + + -
- 80% -
-
-
- -
- - -
- -
- -
- - -   - - -
-
- -
- - -   - - -
-
- -
- - -   - - -
-
- -
- - -   - - -
-
- + + -
- - -   - - -
-
-
-
-
-
- -
- -
- -
- - -   - - -
-
- -
- - -   - - -
-
- -
- - -   - - -
-
- -
- - -   - - -
-
- + + -
- - -   - - -
-
-
-
-
-
- -
- -
- -
- - -   - - -
-
- -
- - -   - - -
-
- -
- - -   - - -
-
- -
- - -   - - -
-
- -
- - -   - - -
-
-
-
-
-
- + +
+ +
+
+ +
-
- -
- -
- - -   - - -
-
- -
- - -   - - -
-
- -
- - -   - - -
-
- -
- - -   - - -
-
- -
- - -   - - -
-
-
-
-
- - -
- -
- -
- - -   - - -
-
- -
- - -   - - -
-
- -
- - -   - - -
-
- -
- - -   - - -
-
- -
- - -   - - -
-
-
-
-
-
- -
- -
- -
- - -   - - -
-
- -
- - -   - - -
-
- -
- - -   - - -
-
- -
- - -   - - -
-
- -
- - -   - - -
-
-
-
-
-
- -
- -
- -
- - -   - - -
-
- -
- - -   - - -
-
- -
- - -   - - -
-
- + +
-
- - -   - - -
- - -
- - -   - - -
-
-
- -
- - -
- -
- -
- - -   - - -
-
- +
+ + 3 + +  ▼ + + +
+ + +
+ + +
-
- - -   - - -
- - + + +
-
- - -   - - -
- - + + +
-
- - -   - - -
- - + + +
-
- - -   - - -
- -
- -
- - +
+
+ +
+ + +
-
- -
- -
- - -   - - -
-
- -
- - -   - - -
-
- -
- - -   - - -
-
- -
- - -   - - -
-
- -
- - -   - - -
-
-
-
-
- - -
- -
- -
- - -   - - -
-
- -
- - -   - - -
-
- -
- - -   - - -
-
- -
- - -   - - -
-
- -
- - -   - - -
-
-
-
-
-
- -
- -
- -
- - -   - - -
-
- -
- - -   - - -
-
- -
- - -   - - -
-
- -
- - -   - - -
-
- -
- - -   - - -
-
-
-
-
-
- -
- -
- -
- - -   - - -
-
- +
+ + 18 + +
+ + +
+ + +
-
- - -   - - -
- - + + +
-
- - -   - - -
- - + + +
-
- - -   - - -
- - + + +
-
- - -   - - -
- -
- -
- - +
+
+ +
+ + +
-
- -
- -
- - -   - - -
-
- + +   + + +
+ + +
-
- - -   - - -
- - + +   + + +
+
+ +
-
- - -   - - -
- - + +   + + +
+
+ +
-
- - -   - - -
- - + +   + + +
+
+ +
-
- - -   - - -
- -
-
-
- - + +   + + +
+
+
+ +
+
+ +
-
- -
- -
- - -   - - -
-
- + +   + + +
+ + +
-
- - -   - - -
- - + +   + + +
+
+ +
-
- - -   - - -
- - + +   + + +
+
+ +
-
- - -   - - -
- - + +   + + +
+
+ +
-
- - -   - - -
- -
-
-
- - + +   + + +
+
+
+
+
+
+ +
-
- -
- -
- - -   - - -
-
- + +   + + +
+ + +
-
- - -   - - -
- - + +   + + +
+
+ +
-
- - -   - - -
- - + +   + + +
+
+ +
-
- - -   - - -
- - + +   + + +
+
+ +
-
- - -   - - -
- -
-
-
- - + +   + + +
+ +
+ +
+ + +
-
- -
- -
- - -   - - -
-
- + +   + + +
+ + +
-
- - -   - - -
- - + +   + + +
+
+ +
-
- - -   - - -
- - + +   + + +
+
+ +
-
- - -   - - -
- - + +   + + +
+
+ +
-
- - -   - - -
- -
-
-
- - + +   + + +
+ +
+ +
+ + +
-
- -
- -
- - -   - - -
-
- + +   + + +
+ + +
-
- - -   - - -
- - + +   + + +
+
+ +
-
+ +   + + +
+ + +
- - -   - - -
-
- + + +   + + +
+
+ +
-
+ +   + + +
+ +
+
+
+ + +
+ +
+ +
- - -   - - -
-
- + + +   + + +
+ + +
-
+ +   + + +
+ + +
- - -   - - -
-
-
-
-
-
- + + +   + + +
+ + +
+ + +   + + +
+
+ +
+ + +   + + +
+
+
+ + + + +
-
- -
- -
+ +   + + +
+
+ +
- - -   - - -
-
- + + +   + + +
+ + +
-
+ +   + + +
+ + +
- - -   - - -
-
- + + +   + + +
+
+ +
-
+ +   + + +
+ +
+
+
+ + +
+ +
+ +
- - -   - - -
-
- + + +   + + +
+ + +
-
+ +   + + +
+ + +
- - -   - - -
-
- + + +   + + +
+
+ +
-
+ +   + + +
+ + +
- - -   - - -
-
-
-
-
-
-
- - - -
- -
-
- - - -
-
- - Page - -
- -
- - of - - - 1 - -
- - - -
-
+ + +   + + +
+ +
+ +
+
+ - - - - - - - - -
-
- Loading... -
-
-
- -
-`; - -exports[`DrillDownTable click to drill down works 2`] = ` - -
- -
- -
- -
- -
- id + + +   + +
- -
- -
- - -
+
- location + + +   + +
- -
- -
- - -
+
- parent_id + + +   + +
- -
- -
- - -
+
- spray_coverage + + +   + +
- -
- -
- - + +
+ + +   + + +
+
+
+ +
+ + +
+ +
-
- spray_effectiveness + + +   + +
- + +
-
- -
- -
- -
- - -
+ +   + + +
+ + +
+ + +   + + +
+
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+
+
+
+
+ - -
- + +
+ + +   + + +
+
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+
+ +
+ + +
+ +
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+
+
+
+
+ +
+ +
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+
+
+
+
+ +
+ +
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+
+
+
+
+ +
+ +
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+
+
+
+
+ +
+ +
+ +
+ + +   + + +
+
+ -
+
+ + +   + + +
+ + +
+ + +   + + +
+
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+
+ +
+ +
+ +
+ +
+ +
+
+ + + +
+
+ + Page + +
+ +
+ + of + + + 1 + +
+ + + +
+
+ + + +
+
+
+
+ +
+
+ Loading... +
+
+
+
+`; + +exports[`DrillDownTable click to drill down works 2`] = ` +
+ +
+ +
+ +
+ +
+
+ id +
+ +
+ +
+ + +
+
+ location +
+ +
+ +
+ + +
+
+ parent_id +
+ +
+ +
+ + +
+
+ spray_coverage +
+ +
+ +
+ + +
+
+ spray_effectiveness +
+ +
+ +
+ +
+ +
+ + +
+ +
+ +
+ +
+ + +
+ + 4 + +  ▼ + + +
+
+
+
+
+ +
+ HFC 1 +
+
+ +
+ 1 +
+
+ +
+ 80% +
+
+ +
+ 80% +
+
+
+
+
+
+ +
+ +
+ +
+ + +
+ + 5 + +  ▼ + + +
+
+
+
+
+ +
+ HFC 2 +
+
+ +
+ 1 +
+
+ +
+ 80% +
+
+ +
+ 80% +
+
+
+
+
+
+ +
+ +
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+
+
+
+
+ +
+ +
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+
+
+
+
+ +
+ +
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+
+
+
+
+ +
+ +
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+
+
+
+
+ +
+ +
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+
+
+
+
+ +
+ +
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+
+
+
+
+ +
+ +
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+
+
+
+
+ +
+ +
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+
+
+
+
+ +
+ +
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+
+
+
+
+ +
+ +
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+
+
+
+
+ +
+ +
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+
+
+
+
+ +
+ +
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+
+
+
+
+ +
+ +
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+
+
+
+
+ +
+ +
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+
+
+
+
+ +
+ +
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+
+
+
+
+ +
+ +
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+
+
+
+
+ +
+ +
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+
+
+
+
+ +
+ +
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+
+
+
+
+
+ +
+ +
+ +
+
+ + + +
+
+ + Page + +
+ +
+ + of + + + 1 + +
+ + + +
+
+ + + +
+
+
+
+ +
+
+ Loading... +
+
+
+
+`; + +exports[`DrillDownTable click to drill down works 3`] = ` +
+ +
+ +
+ +
+ +
+
+ id +
+ +
+ +
+ + +
+
+ location +
+ +
+ +
+ + +
+
+ parent_id +
+ +
+ +
+ + +
+
+ spray_coverage +
+ +
+ +
+ + +
+
+ spray_effectiveness +
+ +
+ +
+ +
+ +
+ + +
+ +
+ +
+ - -
- + - -
- - 9 - -
-
-
-
-
- + 9 + +
+ + +
+ + +
-
- Operational Area 9 -
- - + + +
-
- 4 -
- - + + +
-
- 70% -
- - + + +
-
- 90% -
- -
- -
- - +
+
+ +
+
+ +
-
- -
+ - -
- + + - -
- - 10 - -
-
-
-
-
- + 10 + +
+ + +
+ + +
-
- Operational Area 10 -
- - + + +
-
- 4 -
- - + + +
-
- 80% -
- - + + +
-
- 100% -
- -
- -
- - +
+
+ +
+ + +
-
- -
+ - -
- - -
- - 11 - -
-
-
-
-
- -
- Operational Area 11 -
-
- +
+ + 11 + +
+ + +
+ + -
- 4 -
-
- +
-
- 100% -
- - + + -
- 100% -
-
-
-
-
- - -
- -
- -
- - -   - - -
-
- + + -
- - -   - - -
-
- +
-
- - -   - - -
- - + + -
- - -   - - -
-
- +
-
- - -   - - -
- -
- -
- - +
+
+
+
+
+ +
-
- -
- -
- - -   - - -
-
- -
- - -   - - -
-
- -
- - -   - - -
-
- -
- - -   - - -
-
- +
-
- - -   - - -
- -
- -
- - -
- -
- + +   + + +
+ + -
- - -   - - -
-
- +
-
- - -   - - -
- - + +   + + +
+
+ +
-
- - -   - - -
- - + +   + + +
+
+ +
-
- - -   - - -
- - + +   + + +
+
+ +
-
- - -   - - -
- -
-
-
-
- + +   + + +
+ +
+ +
+
+ +
-
- -
- -
- - -   - - -
-
- + +   + + +
+ + +
-
- - -   - - -
- - + +   + + +
+
+ +
-
- - -   - - -
- - + +   + + +
+
+ +
-
- - -   - - -
- - + +   + + +
+
+ +
-
- - -   - - -
- -
-
-
- - + +   + + +
+
+
+ +
+ + +
-
- -
- -
- - -   - - -
-
- + +   + + +
+ + +
-
- - -   - - -
- - + +   + + +
+
+ +
-
- - -   - - -
- - + +   + + +
+
+ +
-
- - -   - - -
- - + +   + + +
+
+ +
-
- - -   - - -
- -
-
-
- - + +   + + +
+ +
+ +
+ + +
-
- -
- -
- - -   - - -
-
- + +   + + +
+ + +
-
- - -   - - -
- - + +   + + +
+
+ +
-
- - -   - - -
- - + +   + + +
+
+ +
-
- - -   - - -
- - + +   + + +
+
+ +
-
- - -   - - -
- -
-
-
- - + +   + + +
+ +
+ +
+ + +
-
- -
- -
- - -   - - -
-
- + +   + + +
+ + +
-
- - -   - - -
- - + +   + + +
+
+ +
-
- - -   - - -
- - + +   + + +
+
+ +
-
- - -   - - -
- - + +   + + +
+
+ +
-
- - -   - - -
- -
-
-
- - + +   + + +
+ +
+ +
+ + +
-
- -
- -
- - -   - - -
-
- + +   + + +
+ + +
-
- - -   - - -
- - + +   + + +
+
+ +
-
- - -   - - -
- - + +   + + +
+
+ +
-
- - -   - - -
- - + +   + + +
+
+ +
-
- - -   - - -
- -
-
-
- - + +   + + +
+ +
+ +
+ + +
-
- -
- -
- - -   - - -
-
- + +   + + +
+ + +
-
- - -   - - -
- - + +   + + +
+
+ +
-
- - -   - - -
- - + +   + + +
+
+ +
-
- - -   - - -
- - + +   + + +
+
+ +
-
- - -   - - -
- -
-
-
- - + +   + + +
+ +
+
+
+ + +
-
- -
- -
- - -   - - -
-
- + +   + + +
+ + +
-
- - -   - - -
- - + +   + + +
+
+ +
-
- - -   - - -
- - + +   + + +
+
+ +
-
- - -   - - -
- - + +   + + +
+
+ +
-
- - -   - - -
- -
-
-
- - + +   + + +
+ +
+ +
+ + +
-
- -
- -
- - -   - - -
-
- + +   + + +
+ + +
-
- - -   - - -
- - + +   + + +
+
+ +
-
- - -   - - -
- - + +   + + +
+
+ +
-
- - -   - - -
- - + +   + + +
+
+ +
-
- - -   - - -
- -
-
-
- - + +   + + +
+ +
+ +
+ + +
-
- -
- -
- - -   - - -
-
- + +   + + +
+ + +
-
- - -   - - -
- - + +   + + +
+
+ +
-
- - -   - - -
- - + +   + + +
+
+ +
-
- - -   - - -
- - + +   + + +
+
+ +
-
- - -   - - -
- -
-
-
- - + +   + + +
+ +
+ + + + +
-
- -
- -
- - -   - - -
-
- + +   + + +
+ + +
-
- - -   - - -
- - + +   + + +
+
+ +
-
- - -   - - -
- - + +   + + +
+
+ +
-
- - -   - - -
- - + +   + + +
+
+ +
-
- - -   - - -
- -
-
-
- - + +   + + +
+ + + + +
+ +
-
- -
- -
- - -   - - -
-
- + +   + + +
+ + +
-
- - -   - - -
- - + +   + + +
+
+ +
-
- - -   - - -
- - + +   + + +
+
+ +
-
- - -   - - -
- - + +   + + +
+
+ +
-
- - -   - - -
- -
-
-
- - + +   + + +
+ + + + +
+ +
-
- -
- -
- - -   - - -
-
- + +   + + +
+ + +
-
- - -   - - -
- - + +   + + +
+
+ +
-
- - -   - - -
- - + +   + + +
+
+ +
-
- - -   - - -
- - + +   + + +
+
+ +
-
- - -   - - -
- -
-
-
- - + +   + + +
+ + + + +
+ +
-
- -
- -
- - -   - - -
-
- + +   + + +
+ + +
-
- - -   - - -
- - + +   + + +
+
+ +
-
- - -   - - -
- - + +   + + +
+
+ +
-
- - -   - - -
- - + +   + + +
+
+ +
-
- - -   - - -
- -
-
-
- - + +   + + +
+ + + + +
+ +
-
- -
- -
- - -   - - -
-
- + +   + + +
+ + -
- - -   - - -
-
- +
-
- - -   - - -
- - + +   + + +
+
+ +
-
- - -   - - -
- - + +   + + +
+
+ +
-
- - -   - - -
- -
-
-
- -
- - - -
- + +   + + +
+ + +
+ + +   + + +
+
+ + + +
+ +
+ +
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+
+
+
+
+ +
+ +
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+
+
+
+
+ + + + +
+ +
-
- - - -
-
+ +
+
+ + Page + +
+ +
+ + of + - Page - -
- -
- - of - - - 1 - + 1
- + + + 5 rows + + + - - - - - - - -
-
+ + + + + +
+
+ - - - -
+ Next + +
- -
- +
+
+ +
-
- Loading... -
+ Loading...
- -
-
+ + + `; exports[`DrillDownTable gets linkerColumn from nested columns 1`] = ` @@ -16592,6 +27176,7 @@ exports[`DrillDownTable gets linkerColumn from nested columns 1`] = ` }, ] } + hasChildren={[Function]} identifierField="id" linkerField="location" parentIdentifierField="parent_id" @@ -16754,6 +27339,7 @@ exports[`DrillDownTable gets linkerColumn from nested columns 1`] = ` getTrGroupProps={[Function]} getTrProps={[Function]} groupedByPivotKey="_groupedByPivot" + hasChildren={[Function]} identifierField="id" indexKey="_index" linkerField="location" @@ -17541,6 +28127,7 @@ exports[`DrillDownTable gets linkerColumn from nested columns 1`] = ` "getTrGroupProps": [Function], "getTrProps": [Function], "groupedByPivotKey": "_groupedByPivot", + "hasChildren": [Function], "hasColumnFooter": false, "hasHeaderGroups": true, "headerGroups": Array [ @@ -18460,6 +29047,7 @@ exports[`DrillDownTable gets linkerColumn from nested columns 1`] = ` "getTrGroupProps": [Function], "getTrProps": [Function], "groupedByPivotKey": "_groupedByPivot", + "hasChildren": [Function], "hasColumnFooter": false, "hasHeaderGroups": true, "headerGroups": Array [ @@ -19622,6 +30210,7 @@ exports[`DrillDownTable gets linkerColumn from nested columns 1`] = ` "getTrGroupProps": [Function], "getTrProps": [Function], "groupedByPivotKey": "_groupedByPivot", + "hasChildren": [Function], "hasColumnFooter": false, "hasHeaderGroups": true, "headerGroups": Array [ @@ -20541,6 +31130,7 @@ exports[`DrillDownTable gets linkerColumn from nested columns 1`] = ` "getTrGroupProps": [Function], "getTrProps": [Function], "groupedByPivotKey": "_groupedByPivot", + "hasChildren": [Function], "hasColumnFooter": false, "hasHeaderGroups": true, "headerGroups": Array [ @@ -21703,6 +32293,7 @@ exports[`DrillDownTable gets linkerColumn from nested columns 1`] = ` "getTrGroupProps": [Function], "getTrProps": [Function], "groupedByPivotKey": "_groupedByPivot", + "hasChildren": [Function], "hasColumnFooter": false, "hasHeaderGroups": true, "headerGroups": Array [ @@ -22622,6 +33213,7 @@ exports[`DrillDownTable gets linkerColumn from nested columns 1`] = ` "getTrGroupProps": [Function], "getTrProps": [Function], "groupedByPivotKey": "_groupedByPivot", + "hasChildren": [Function], "hasColumnFooter": false, "hasHeaderGroups": true, "headerGroups": Array [ @@ -23784,6 +34376,7 @@ exports[`DrillDownTable gets linkerColumn from nested columns 1`] = ` "getTrGroupProps": [Function], "getTrProps": [Function], "groupedByPivotKey": "_groupedByPivot", + "hasChildren": [Function], "hasColumnFooter": false, "hasHeaderGroups": true, "headerGroups": Array [ @@ -24703,6 +35296,7 @@ exports[`DrillDownTable gets linkerColumn from nested columns 1`] = ` "getTrGroupProps": [Function], "getTrProps": [Function], "groupedByPivotKey": "_groupedByPivot", + "hasChildren": [Function], "hasColumnFooter": false, "hasHeaderGroups": true, "headerGroups": Array [ @@ -28044,6 +38638,7 @@ exports[`DrillDownTable gets linkerColumn from nested columns 1`] = ` getTrGroupProps={[Function]} getTrProps={[Function]} groupedByPivotKey="_groupedByPivot" + hasChildren={[Function]} hasHeaderGroups={true} headerGroups={ Array [ @@ -28725,6 +39320,7 @@ exports[`DrillDownTable renders correctly even with invalid linkerField 1`] = ` }, ] } + hasChildren={[Function]} identifierField="id" linkerField="fakeColumn" parentIdentifierField="parent_id" @@ -28885,6 +39481,7 @@ exports[`DrillDownTable renders correctly even with invalid linkerField 1`] = ` getTrGroupProps={[Function]} getTrProps={[Function]} groupedByPivotKey="_groupedByPivot" + hasChildren={[Function]} identifierField="id" indexKey="_index" linkerField="fakeColumn" @@ -29679,6 +40276,7 @@ exports[`DrillDownTable renders correctly even with invalid linkerField 1`] = ` "getTrGroupProps": [Function], "getTrProps": [Function], "groupedByPivotKey": "_groupedByPivot", + "hasChildren": [Function], "hasColumnFooter": false, "hasHeaderGroups": false, "headerGroups": Array [], @@ -30449,6 +41047,7 @@ exports[`DrillDownTable renders correctly even with invalid linkerField 1`] = ` "getTrGroupProps": [Function], "getTrProps": [Function], "groupedByPivotKey": "_groupedByPivot", + "hasChildren": [Function], "hasColumnFooter": false, "hasHeaderGroups": false, "headerGroups": Array [], @@ -31362,6 +41961,7 @@ exports[`DrillDownTable renders correctly even with invalid linkerField 1`] = ` "getTrGroupProps": [Function], "getTrProps": [Function], "groupedByPivotKey": "_groupedByPivot", + "hasChildren": [Function], "hasColumnFooter": false, "hasHeaderGroups": false, "headerGroups": Array [], @@ -32132,6 +42732,7 @@ exports[`DrillDownTable renders correctly even with invalid linkerField 1`] = ` "getTrGroupProps": [Function], "getTrProps": [Function], "groupedByPivotKey": "_groupedByPivot", + "hasChildren": [Function], "hasColumnFooter": false, "hasHeaderGroups": false, "headerGroups": Array [], @@ -33045,6 +43646,7 @@ exports[`DrillDownTable renders correctly even with invalid linkerField 1`] = ` "getTrGroupProps": [Function], "getTrProps": [Function], "groupedByPivotKey": "_groupedByPivot", + "hasChildren": [Function], "hasColumnFooter": false, "hasHeaderGroups": false, "headerGroups": Array [], @@ -33815,6 +44417,7 @@ exports[`DrillDownTable renders correctly even with invalid linkerField 1`] = ` "getTrGroupProps": [Function], "getTrProps": [Function], "groupedByPivotKey": "_groupedByPivot", + "hasChildren": [Function], "hasColumnFooter": false, "hasHeaderGroups": false, "headerGroups": Array [], @@ -34728,6 +45331,7 @@ exports[`DrillDownTable renders correctly even with invalid linkerField 1`] = ` "getTrGroupProps": [Function], "getTrProps": [Function], "groupedByPivotKey": "_groupedByPivot", + "hasChildren": [Function], "hasColumnFooter": false, "hasHeaderGroups": false, "headerGroups": Array [], @@ -35498,6 +46102,7 @@ exports[`DrillDownTable renders correctly even with invalid linkerField 1`] = ` "getTrGroupProps": [Function], "getTrProps": [Function], "groupedByPivotKey": "_groupedByPivot", + "hasChildren": [Function], "hasColumnFooter": false, "hasHeaderGroups": false, "headerGroups": Array [], @@ -39059,6 +49664,7 @@ exports[`DrillDownTable renders correctly even with invalid linkerField 1`] = ` getTrGroupProps={[Function]} getTrProps={[Function]} groupedByPivotKey="_groupedByPivot" + hasChildren={[Function]} hasHeaderGroups={false} headerGroups={Array []} identifierField="id" @@ -39424,6 +50030,7 @@ exports[`DrillDownTable renders correctly lowest level hierarchy 1`] = ` }, ] } + hasChildren={[Function]} identifierField="id" linkerField="id" parentIdentifierField="parent_id" @@ -39578,6 +50185,7 @@ exports[`DrillDownTable renders correctly lowest level hierarchy 1`] = ` getTrGroupProps={[Function]} getTrProps={[Function]} groupedByPivotKey="_groupedByPivot" + hasChildren={[Function]} identifierField="id" indexKey="_index" linkerField="id" @@ -40366,6 +50974,7 @@ exports[`DrillDownTable renders correctly lowest level hierarchy 1`] = ` "getTrGroupProps": [Function], "getTrProps": [Function], "groupedByPivotKey": "_groupedByPivot", + "hasChildren": [Function], "hasColumnFooter": false, "hasHeaderGroups": false, "headerGroups": Array [], @@ -41079,6 +51688,7 @@ exports[`DrillDownTable renders correctly lowest level hierarchy 1`] = ` "getTrGroupProps": [Function], "getTrProps": [Function], "groupedByPivotKey": "_groupedByPivot", + "hasChildren": [Function], "hasColumnFooter": false, "hasHeaderGroups": false, "headerGroups": Array [], @@ -42050,6 +52660,7 @@ exports[`DrillDownTable renders correctly lowest level hierarchy 1`] = ` "getTrGroupProps": [Function], "getTrProps": [Function], "groupedByPivotKey": "_groupedByPivot", + "hasChildren": [Function], "hasColumnFooter": false, "hasHeaderGroups": false, "headerGroups": Array [], @@ -42763,6 +53374,7 @@ exports[`DrillDownTable renders correctly lowest level hierarchy 1`] = ` "getTrGroupProps": [Function], "getTrProps": [Function], "groupedByPivotKey": "_groupedByPivot", + "hasChildren": [Function], "hasColumnFooter": false, "hasHeaderGroups": false, "headerGroups": Array [], @@ -43734,6 +54346,7 @@ exports[`DrillDownTable renders correctly lowest level hierarchy 1`] = ` "getTrGroupProps": [Function], "getTrProps": [Function], "groupedByPivotKey": "_groupedByPivot", + "hasChildren": [Function], "hasColumnFooter": false, "hasHeaderGroups": false, "headerGroups": Array [], @@ -44447,6 +55060,7 @@ exports[`DrillDownTable renders correctly lowest level hierarchy 1`] = ` "getTrGroupProps": [Function], "getTrProps": [Function], "groupedByPivotKey": "_groupedByPivot", + "hasChildren": [Function], "hasColumnFooter": false, "hasHeaderGroups": false, "headerGroups": Array [], @@ -48231,6 +58845,7 @@ exports[`DrillDownTable renders correctly lowest level hierarchy 1`] = ` getTrGroupProps={[Function]} getTrProps={[Function]} groupedByPivotKey="_groupedByPivot" + hasChildren={[Function]} hasHeaderGroups={false} headerGroups={Array []} identifierField="id" @@ -48702,6 +59317,7 @@ exports[`DrillDownTable renders correctly with custom columns 1`] = ` }, ] } + hasChildren={[Function]} identifierField="id" linkerField="id" parentIdentifierField="parent_id" @@ -48859,6 +59475,7 @@ exports[`DrillDownTable renders correctly with custom columns 1`] = ` getTrGroupProps={[Function]} getTrProps={[Function]} groupedByPivotKey="_groupedByPivot" + hasChildren={[Function]} identifierField="id" indexKey="_index" linkerField="id" @@ -49544,6 +60161,7 @@ exports[`DrillDownTable renders correctly with custom columns 1`] = ` "getTrGroupProps": [Function], "getTrProps": [Function], "groupedByPivotKey": "_groupedByPivot", + "hasChildren": [Function], "hasColumnFooter": false, "hasHeaderGroups": false, "headerGroups": Array [], @@ -50235,6 +60853,7 @@ exports[`DrillDownTable renders correctly with custom columns 1`] = ` "getTrGroupProps": [Function], "getTrProps": [Function], "groupedByPivotKey": "_groupedByPivot", + "hasChildren": [Function], "hasColumnFooter": false, "hasHeaderGroups": false, "headerGroups": Array [], @@ -51159,6 +61778,7 @@ exports[`DrillDownTable renders correctly with custom columns 1`] = ` "getTrGroupProps": [Function], "getTrProps": [Function], "groupedByPivotKey": "_groupedByPivot", + "hasChildren": [Function], "hasColumnFooter": false, "hasHeaderGroups": false, "headerGroups": Array [], @@ -51850,6 +62470,7 @@ exports[`DrillDownTable renders correctly with custom columns 1`] = ` "getTrGroupProps": [Function], "getTrProps": [Function], "groupedByPivotKey": "_groupedByPivot", + "hasChildren": [Function], "hasColumnFooter": false, "hasHeaderGroups": false, "headerGroups": Array [], @@ -52774,6 +63395,7 @@ exports[`DrillDownTable renders correctly with custom columns 1`] = ` "getTrGroupProps": [Function], "getTrProps": [Function], "groupedByPivotKey": "_groupedByPivot", + "hasChildren": [Function], "hasColumnFooter": false, "hasHeaderGroups": false, "headerGroups": Array [], @@ -53465,6 +64087,7 @@ exports[`DrillDownTable renders correctly with custom columns 1`] = ` "getTrGroupProps": [Function], "getTrProps": [Function], "groupedByPivotKey": "_groupedByPivot", + "hasChildren": [Function], "hasColumnFooter": false, "hasHeaderGroups": false, "headerGroups": Array [], @@ -54389,6 +65012,7 @@ exports[`DrillDownTable renders correctly with custom columns 1`] = ` "getTrGroupProps": [Function], "getTrProps": [Function], "groupedByPivotKey": "_groupedByPivot", + "hasChildren": [Function], "hasColumnFooter": false, "hasHeaderGroups": false, "headerGroups": Array [], @@ -55080,6 +65704,7 @@ exports[`DrillDownTable renders correctly with custom columns 1`] = ` "getTrGroupProps": [Function], "getTrProps": [Function], "groupedByPivotKey": "_groupedByPivot", + "hasChildren": [Function], "hasColumnFooter": false, "hasHeaderGroups": false, "headerGroups": Array [], @@ -58183,6 +68808,7 @@ exports[`DrillDownTable renders correctly with custom columns 1`] = ` getTrGroupProps={[Function]} getTrProps={[Function]} groupedByPivotKey="_groupedByPivot" + hasChildren={[Function]} hasHeaderGroups={false} headerGroups={Array []} identifierField="id" @@ -58680,6 +69306,7 @@ exports[`DrillDownTable renders correctly with custom columns and custom linker }, ] } + hasChildren={[Function]} identifierField="id" linkerField="location" parentIdentifierField="parent_id" @@ -58837,6 +69464,7 @@ exports[`DrillDownTable renders correctly with custom columns and custom linker getTrGroupProps={[Function]} getTrProps={[Function]} groupedByPivotKey="_groupedByPivot" + hasChildren={[Function]} identifierField="id" indexKey="_index" linkerField="location" @@ -59522,6 +70150,7 @@ exports[`DrillDownTable renders correctly with custom columns and custom linker "getTrGroupProps": [Function], "getTrProps": [Function], "groupedByPivotKey": "_groupedByPivot", + "hasChildren": [Function], "hasColumnFooter": false, "hasHeaderGroups": false, "headerGroups": Array [], @@ -60213,6 +70842,7 @@ exports[`DrillDownTable renders correctly with custom columns and custom linker "getTrGroupProps": [Function], "getTrProps": [Function], "groupedByPivotKey": "_groupedByPivot", + "hasChildren": [Function], "hasColumnFooter": false, "hasHeaderGroups": false, "headerGroups": Array [], @@ -61137,6 +71767,7 @@ exports[`DrillDownTable renders correctly with custom columns and custom linker "getTrGroupProps": [Function], "getTrProps": [Function], "groupedByPivotKey": "_groupedByPivot", + "hasChildren": [Function], "hasColumnFooter": false, "hasHeaderGroups": false, "headerGroups": Array [], @@ -61828,6 +72459,7 @@ exports[`DrillDownTable renders correctly with custom columns and custom linker "getTrGroupProps": [Function], "getTrProps": [Function], "groupedByPivotKey": "_groupedByPivot", + "hasChildren": [Function], "hasColumnFooter": false, "hasHeaderGroups": false, "headerGroups": Array [], @@ -62752,6 +73384,7 @@ exports[`DrillDownTable renders correctly with custom columns and custom linker "getTrGroupProps": [Function], "getTrProps": [Function], "groupedByPivotKey": "_groupedByPivot", + "hasChildren": [Function], "hasColumnFooter": false, "hasHeaderGroups": false, "headerGroups": Array [], @@ -63443,6 +74076,7 @@ exports[`DrillDownTable renders correctly with custom columns and custom linker "getTrGroupProps": [Function], "getTrProps": [Function], "groupedByPivotKey": "_groupedByPivot", + "hasChildren": [Function], "hasColumnFooter": false, "hasHeaderGroups": false, "headerGroups": Array [], @@ -64367,6 +75001,7 @@ exports[`DrillDownTable renders correctly with custom columns and custom linker "getTrGroupProps": [Function], "getTrProps": [Function], "groupedByPivotKey": "_groupedByPivot", + "hasChildren": [Function], "hasColumnFooter": false, "hasHeaderGroups": false, "headerGroups": Array [], @@ -65058,6 +75693,7 @@ exports[`DrillDownTable renders correctly with custom columns and custom linker "getTrGroupProps": [Function], "getTrProps": [Function], "groupedByPivotKey": "_groupedByPivot", + "hasChildren": [Function], "hasColumnFooter": false, "hasHeaderGroups": false, "headerGroups": Array [], @@ -68161,6 +78797,7 @@ exports[`DrillDownTable renders correctly with custom columns and custom linker getTrGroupProps={[Function]} getTrProps={[Function]} groupedByPivotKey="_groupedByPivot" + hasChildren={[Function]} hasHeaderGroups={false} headerGroups={Array []} identifierField="id" @@ -68637,6 +79274,7 @@ exports[`DrillDownTable renders correctly with derived columns 1`] = ` }, ] } + hasChildren={[Function]} identifierField="id" linkerField="id" parentIdentifierField="parent_id" @@ -68798,6 +79436,7 @@ exports[`DrillDownTable renders correctly with derived columns 1`] = ` getTrGroupProps={[Function]} getTrProps={[Function]} groupedByPivotKey="_groupedByPivot" + hasChildren={[Function]} identifierField="id" indexKey="_index" linkerField="id" @@ -69593,6 +80232,7 @@ exports[`DrillDownTable renders correctly with derived columns 1`] = ` "getTrGroupProps": [Function], "getTrProps": [Function], "groupedByPivotKey": "_groupedByPivot", + "hasChildren": [Function], "hasColumnFooter": false, "hasHeaderGroups": false, "headerGroups": Array [], @@ -70364,6 +81004,7 @@ exports[`DrillDownTable renders correctly with derived columns 1`] = ` "getTrGroupProps": [Function], "getTrProps": [Function], "groupedByPivotKey": "_groupedByPivot", + "hasChildren": [Function], "hasColumnFooter": false, "hasHeaderGroups": false, "headerGroups": Array [], @@ -71396,6 +82037,7 @@ exports[`DrillDownTable renders correctly with derived columns 1`] = ` "getTrGroupProps": [Function], "getTrProps": [Function], "groupedByPivotKey": "_groupedByPivot", + "hasChildren": [Function], "hasColumnFooter": false, "hasHeaderGroups": false, "headerGroups": Array [], @@ -72167,6 +82809,7 @@ exports[`DrillDownTable renders correctly with derived columns 1`] = ` "getTrGroupProps": [Function], "getTrProps": [Function], "groupedByPivotKey": "_groupedByPivot", + "hasChildren": [Function], "hasColumnFooter": false, "hasHeaderGroups": false, "headerGroups": Array [], @@ -73199,6 +83842,7 @@ exports[`DrillDownTable renders correctly with derived columns 1`] = ` "getTrGroupProps": [Function], "getTrProps": [Function], "groupedByPivotKey": "_groupedByPivot", + "hasChildren": [Function], "hasColumnFooter": false, "hasHeaderGroups": false, "headerGroups": Array [], @@ -73970,6 +84614,7 @@ exports[`DrillDownTable renders correctly with derived columns 1`] = ` "getTrGroupProps": [Function], "getTrProps": [Function], "groupedByPivotKey": "_groupedByPivot", + "hasChildren": [Function], "hasColumnFooter": false, "hasHeaderGroups": false, "headerGroups": Array [], @@ -75002,6 +85647,7 @@ exports[`DrillDownTable renders correctly with derived columns 1`] = ` "getTrGroupProps": [Function], "getTrProps": [Function], "groupedByPivotKey": "_groupedByPivot", + "hasChildren": [Function], "hasColumnFooter": false, "hasHeaderGroups": false, "headerGroups": Array [], @@ -75773,6 +86419,7 @@ exports[`DrillDownTable renders correctly with derived columns 1`] = ` "getTrGroupProps": [Function], "getTrProps": [Function], "groupedByPivotKey": "_groupedByPivot", + "hasChildren": [Function], "hasColumnFooter": false, "hasHeaderGroups": false, "headerGroups": Array [], @@ -79448,6 +90095,7 @@ exports[`DrillDownTable renders correctly with derived columns 1`] = ` getTrGroupProps={[Function]} getTrProps={[Function]} groupedByPivotKey="_groupedByPivot" + hasChildren={[Function]} hasHeaderGroups={false} headerGroups={Array []} identifierField="id" @@ -79933,6 +90581,7 @@ exports[`DrillDownTable works fine with custom getTrProps 1`] = ` ] } getTrProps={[Function]} + hasChildren={[Function]} identifierField="id" linkerField="id" parentIdentifierField="parent_id" @@ -80094,6 +90743,7 @@ exports[`DrillDownTable works fine with custom getTrProps 1`] = ` getTrGroupProps={[Function]} getTrProps={[Function]} groupedByPivotKey="_groupedByPivot" + hasChildren={[Function]} identifierField="id" indexKey="_index" linkerField="id" @@ -80889,6 +91539,7 @@ exports[`DrillDownTable works fine with custom getTrProps 1`] = ` "getTrGroupProps": [Function], "getTrProps": [Function], "groupedByPivotKey": "_groupedByPivot", + "hasChildren": [Function], "hasColumnFooter": false, "hasHeaderGroups": false, "headerGroups": Array [], @@ -81660,6 +92311,7 @@ exports[`DrillDownTable works fine with custom getTrProps 1`] = ` "getTrGroupProps": [Function], "getTrProps": [Function], "groupedByPivotKey": "_groupedByPivot", + "hasChildren": [Function], "hasColumnFooter": false, "hasHeaderGroups": false, "headerGroups": Array [], @@ -82692,6 +93344,7 @@ exports[`DrillDownTable works fine with custom getTrProps 1`] = ` "getTrGroupProps": [Function], "getTrProps": [Function], "groupedByPivotKey": "_groupedByPivot", + "hasChildren": [Function], "hasColumnFooter": false, "hasHeaderGroups": false, "headerGroups": Array [], @@ -83463,6 +94116,7 @@ exports[`DrillDownTable works fine with custom getTrProps 1`] = ` "getTrGroupProps": [Function], "getTrProps": [Function], "groupedByPivotKey": "_groupedByPivot", + "hasChildren": [Function], "hasColumnFooter": false, "hasHeaderGroups": false, "headerGroups": Array [], @@ -84495,6 +95149,7 @@ exports[`DrillDownTable works fine with custom getTrProps 1`] = ` "getTrGroupProps": [Function], "getTrProps": [Function], "groupedByPivotKey": "_groupedByPivot", + "hasChildren": [Function], "hasColumnFooter": false, "hasHeaderGroups": false, "headerGroups": Array [], @@ -85266,6 +95921,7 @@ exports[`DrillDownTable works fine with custom getTrProps 1`] = ` "getTrGroupProps": [Function], "getTrProps": [Function], "groupedByPivotKey": "_groupedByPivot", + "hasChildren": [Function], "hasColumnFooter": false, "hasHeaderGroups": false, "headerGroups": Array [], @@ -86298,6 +96954,7 @@ exports[`DrillDownTable works fine with custom getTrProps 1`] = ` "getTrGroupProps": [Function], "getTrProps": [Function], "groupedByPivotKey": "_groupedByPivot", + "hasChildren": [Function], "hasColumnFooter": false, "hasHeaderGroups": false, "headerGroups": Array [], @@ -87069,6 +97726,7 @@ exports[`DrillDownTable works fine with custom getTrProps 1`] = ` "getTrGroupProps": [Function], "getTrProps": [Function], "groupedByPivotKey": "_groupedByPivot", + "hasChildren": [Function], "hasColumnFooter": false, "hasHeaderGroups": false, "headerGroups": Array [], @@ -90744,6 +101402,7 @@ exports[`DrillDownTable works fine with custom getTrProps 1`] = ` getTrGroupProps={[Function]} getTrProps={[Function]} groupedByPivotKey="_groupedByPivot" + hasChildren={[Function]} hasHeaderGroups={false} headerGroups={Array []} identifierField="id" @@ -91236,6 +101895,7 @@ exports[`DrillDownTable works fine with extraCellProps 1`] = ` "urlPath": "http://example.com", } } + hasChildren={[Function]} identifierField="id" linkerField="id" parentIdentifierField="parent_id" @@ -91405,6 +102065,7 @@ exports[`DrillDownTable works fine with extraCellProps 1`] = ` getTrGroupProps={[Function]} getTrProps={[Function]} groupedByPivotKey="_groupedByPivot" + hasChildren={[Function]} identifierField="id" indexKey="_index" linkerField="id" @@ -91491,235 +102152,2059 @@ exports[`DrillDownTable works fine with extraCellProps 1`] = ` "width": "100px", } } - toggleSort={[Function]} + toggleSort={[Function]} + > +
+
+ id +
+ +
+ +
+ + +
+
+ location +
+ +
+ +
+ + +
+
+ parent_id +
+ +
+ +
+ + +
+
+ spray_coverage +
+ +
+ +
+ + +
+
+ spray_effectiveness +
+ +
+ +
+ +
+ +
+ + +
+ +
+ + + + , + "urlPath": "http://example.com", + }, + "filterable": false, + "filtered": Array [], + "freezeWhenExpanded": false, + "frozen": false, + "getLoadingProps": [Function], + "getNoDataProps": [Function], + "getPaginationProps": [Function], + "getProps": [Function], + "getResizerProps": [Function], + "getTableProps": [Function], + "getTbodyProps": [Function], + "getTdProps": [Function], + "getTfootProps": [Function], + "getTfootTdProps": [Function], + "getTfootTrProps": [Function], + "getTheadFilterProps": [Function], + "getTheadFilterThProps": [Function], + "getTheadFilterTrProps": [Function], + "getTheadGroupProps": [Function], + "getTheadGroupThProps": [Function], + "getTheadGroupTrProps": [Function], + "getTheadProps": [Function], + "getTheadThProps": [Function], + "getTheadTrProps": [Function], + "getTrGroupProps": [Function], + "getTrProps": [Function], + "groupedByPivotKey": "_groupedByPivot", + "hasChildren": [Function], + "hasColumnFooter": false, + "hasHeaderGroups": false, + "headerGroups": Array [], + "identifierField": "id", + "indexKey": "_index", + "linkerField": "id", + "loading": false, + "loadingText": "Loading...", + "minRows": 20, + "multiSort": true, + "nestingLevelKey": "_nestingLevel", + "nextText": "Next", + "noDataText": "No rows found", + "ofText": "of", + "onFetchData": [Function], + "originalKey": "_original", + "padRows": Array [ + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + ], + "page": 0, + "pageJumpText": "jump to page", + "pageRows": Array [ + Object { + "_index": 0, + "_nestingLevel": 0, + "_original": Object { + "id": 1, + "location": "District A", + "parent_id": null, + "spray_coverage": "80%", + "spray_effectiveness": "80%", + }, + "_subRows": undefined, + "_viewIndex": 0, + "id": 1, + "location": "District A", + "parent_id": null, + "spray_coverage": "80%", + "spray_effectiveness": "80%", + }, + Object { + "_index": 1, + "_nestingLevel": 0, + "_original": Object { + "id": 2, + "location": "District B", + "parent_id": null, + "spray_coverage": "75%", + "spray_effectiveness": "85%", + }, + "_subRows": undefined, + "_viewIndex": 1, + "id": 2, + "location": "District B", + "parent_id": null, + "spray_coverage": "75%", + "spray_effectiveness": "85%", + }, + Object { + "_index": 2, + "_nestingLevel": 0, + "_original": Object { + "id": 3, + "location": "District C", + "parent_id": null, + "spray_coverage": "90%", + "spray_effectiveness": "90%", + }, + "_subRows": undefined, + "_viewIndex": 2, + "id": 3, + "location": "District C", + "parent_id": null, + "spray_coverage": "90%", + "spray_effectiveness": "90%", + }, + Object { + "_index": 3, + "_nestingLevel": 0, + "_original": Object { + "id": 18, + "location": "District D", + "parent_id": null, + "spray_coverage": "0%", + "spray_effectiveness": "0%", + }, + "_subRows": undefined, + "_viewIndex": 3, + "id": 18, + "location": "District D", + "parent_id": null, + "spray_coverage": "0%", + "spray_effectiveness": "0%", + }, + ], + "pageSize": 20, + "pageSizeOptions": Array [ + 5, + 10, + 20, + 25, + 50, + 100, + ], + "pageText": "Page", + "pages": 1, + "parentIdentifierField": "parent_id", + "pivotDefaults": Object {}, + "pivotIDKey": "_pivotID", + "pivotValKey": "_pivotVal", + "previousText": "Previous", + "resizable": true, + "resized": Array [], + "resolveData": [Function], + "resolvedData": Array [ + Object { + "_index": 0, + "_nestingLevel": 0, + "_original": Object { + "id": 1, + "location": "District A", + "parent_id": null, + "spray_coverage": "80%", + "spray_effectiveness": "80%", + }, + "_subRows": undefined, + "id": 1, + "location": "District A", + "parent_id": null, + "spray_coverage": "80%", + "spray_effectiveness": "80%", + }, + Object { + "_index": 1, + "_nestingLevel": 0, + "_original": Object { + "id": 2, + "location": "District B", + "parent_id": null, + "spray_coverage": "75%", + "spray_effectiveness": "85%", + }, + "_subRows": undefined, + "id": 2, + "location": "District B", + "parent_id": null, + "spray_coverage": "75%", + "spray_effectiveness": "85%", + }, + Object { + "_index": 2, + "_nestingLevel": 0, + "_original": Object { + "id": 3, + "location": "District C", + "parent_id": null, + "spray_coverage": "90%", + "spray_effectiveness": "90%", + }, + "_subRows": undefined, + "id": 3, + "location": "District C", + "parent_id": null, + "spray_coverage": "90%", + "spray_effectiveness": "90%", + }, + Object { + "_index": 3, + "_nestingLevel": 0, + "_original": Object { + "id": 18, + "location": "District D", + "parent_id": null, + "spray_coverage": "0%", + "spray_effectiveness": "0%", + }, + "_subRows": undefined, + "id": 18, + "location": "District D", + "parent_id": null, + "spray_coverage": "0%", + "spray_effectiveness": "0%", + }, + ], + "rootParentId": null, + "rowMinWidth": 500, + "rowsSelectorText": "rows per page", + "rowsText": "rows", + "showPageJump": true, + "showPageSizeOptions": true, + "showPagination": true, + "showPaginationBottom": true, + "showPaginationTop": false, + "skipNextSort": false, + "sortable": true, + "sorted": Array [], + "sortedData": Array [ + Object { + "_index": 0, + "_nestingLevel": 0, + "_original": Object { + "id": 1, + "location": "District A", + "parent_id": null, + "spray_coverage": "80%", + "spray_effectiveness": "80%", + }, + "_subRows": undefined, + "id": 1, + "location": "District A", + "parent_id": null, + "spray_coverage": "80%", + "spray_effectiveness": "80%", + }, + Object { + "_index": 1, + "_nestingLevel": 0, + "_original": Object { + "id": 2, + "location": "District B", + "parent_id": null, + "spray_coverage": "75%", + "spray_effectiveness": "85%", + }, + "_subRows": undefined, + "id": 2, + "location": "District B", + "parent_id": null, + "spray_coverage": "75%", + "spray_effectiveness": "85%", + }, + Object { + "_index": 2, + "_nestingLevel": 0, + "_original": Object { + "id": 3, + "location": "District C", + "parent_id": null, + "spray_coverage": "90%", + "spray_effectiveness": "90%", + }, + "_subRows": undefined, + "id": 3, + "location": "District C", + "parent_id": null, + "spray_coverage": "90%", + "spray_effectiveness": "90%", + }, + Object { + "_index": 3, + "_nestingLevel": 0, + "_original": Object { + "id": 18, + "location": "District D", + "parent_id": null, + "spray_coverage": "0%", + "spray_effectiveness": "0%", + }, + "_subRows": undefined, + "id": 18, + "location": "District D", + "parent_id": null, + "spray_coverage": "0%", + "spray_effectiveness": "0%", + }, + ], + "startRow": 0, + "style": Object {}, + "subRowsKey": "_subRows", + "useDrillDownTrProps": true, + } + } >
+ + + , + "urlPath": "http://example.com", + }, + "filterable": false, + "filtered": Array [], + "freezeWhenExpanded": false, + "frozen": false, + "getLoadingProps": [Function], + "getNoDataProps": [Function], + "getPaginationProps": [Function], + "getProps": [Function], + "getResizerProps": [Function], + "getTableProps": [Function], + "getTbodyProps": [Function], + "getTdProps": [Function], + "getTfootProps": [Function], + "getTfootTdProps": [Function], + "getTfootTrProps": [Function], + "getTheadFilterProps": [Function], + "getTheadFilterThProps": [Function], + "getTheadFilterTrProps": [Function], + "getTheadGroupProps": [Function], + "getTheadGroupThProps": [Function], + "getTheadGroupTrProps": [Function], + "getTheadProps": [Function], + "getTheadThProps": [Function], + "getTheadTrProps": [Function], + "getTrGroupProps": [Function], + "getTrProps": [Function], + "groupedByPivotKey": "_groupedByPivot", + "hasChildren": [Function], + "hasColumnFooter": false, + "hasHeaderGroups": false, + "headerGroups": Array [], + "identifierField": "id", + "indexKey": "_index", + "linkerField": "id", + "loading": false, + "loadingText": "Loading...", + "minRows": 20, + "multiSort": true, + "nestingLevelKey": "_nestingLevel", + "nextText": "Next", + "noDataText": "No rows found", + "ofText": "of", + "onFetchData": [Function], + "originalKey": "_original", + "padRows": Array [ + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + ], + "page": 0, + "pageJumpText": "jump to page", + "pageRows": Array [ + Object { + "_index": 0, + "_nestingLevel": 0, + "_original": Object { + "id": 1, + "location": "District A", + "parent_id": null, + "spray_coverage": "80%", + "spray_effectiveness": "80%", + }, + "_subRows": undefined, + "_viewIndex": 0, + "id": 1, + "location": "District A", + "parent_id": null, + "spray_coverage": "80%", + "spray_effectiveness": "80%", + }, + Object { + "_index": 1, + "_nestingLevel": 0, + "_original": Object { + "id": 2, + "location": "District B", + "parent_id": null, + "spray_coverage": "75%", + "spray_effectiveness": "85%", + }, + "_subRows": undefined, + "_viewIndex": 1, + "id": 2, + "location": "District B", + "parent_id": null, + "spray_coverage": "75%", + "spray_effectiveness": "85%", + }, + Object { + "_index": 2, + "_nestingLevel": 0, + "_original": Object { + "id": 3, + "location": "District C", + "parent_id": null, + "spray_coverage": "90%", + "spray_effectiveness": "90%", + }, + "_subRows": undefined, + "_viewIndex": 2, + "id": 3, + "location": "District C", + "parent_id": null, + "spray_coverage": "90%", + "spray_effectiveness": "90%", + }, + Object { + "_index": 3, + "_nestingLevel": 0, + "_original": Object { + "id": 18, + "location": "District D", + "parent_id": null, + "spray_coverage": "0%", + "spray_effectiveness": "0%", + }, + "_subRows": undefined, + "_viewIndex": 3, + "id": 18, + "location": "District D", + "parent_id": null, + "spray_coverage": "0%", + "spray_effectiveness": "0%", + }, + ], + "pageSize": 20, + "pageSizeOptions": Array [ + 5, + 10, + 20, + 25, + 50, + 100, + ], + "pageText": "Page", + "pages": 1, + "parentIdentifierField": "parent_id", + "pivotDefaults": Object {}, + "pivotIDKey": "_pivotID", + "pivotValKey": "_pivotVal", + "previousText": "Previous", + "resizable": true, + "resized": Array [], + "resolveData": [Function], + "resolvedData": Array [ + Object { + "_index": 0, + "_nestingLevel": 0, + "_original": Object { + "id": 1, + "location": "District A", + "parent_id": null, + "spray_coverage": "80%", + "spray_effectiveness": "80%", + }, + "_subRows": undefined, + "id": 1, + "location": "District A", + "parent_id": null, + "spray_coverage": "80%", + "spray_effectiveness": "80%", + }, + Object { + "_index": 1, + "_nestingLevel": 0, + "_original": Object { + "id": 2, + "location": "District B", + "parent_id": null, + "spray_coverage": "75%", + "spray_effectiveness": "85%", + }, + "_subRows": undefined, + "id": 2, + "location": "District B", + "parent_id": null, + "spray_coverage": "75%", + "spray_effectiveness": "85%", + }, + Object { + "_index": 2, + "_nestingLevel": 0, + "_original": Object { + "id": 3, + "location": "District C", + "parent_id": null, + "spray_coverage": "90%", + "spray_effectiveness": "90%", + }, + "_subRows": undefined, + "id": 3, + "location": "District C", + "parent_id": null, + "spray_coverage": "90%", + "spray_effectiveness": "90%", + }, + Object { + "_index": 3, + "_nestingLevel": 0, + "_original": Object { + "id": 18, + "location": "District D", + "parent_id": null, + "spray_coverage": "0%", + "spray_effectiveness": "0%", + }, + "_subRows": undefined, + "id": 18, + "location": "District D", + "parent_id": null, + "spray_coverage": "0%", + "spray_effectiveness": "0%", + }, + ], + "rootParentId": null, + "rowMinWidth": 500, + "rowsSelectorText": "rows per page", + "rowsText": "rows", + "showPageJump": true, + "showPageSizeOptions": true, + "showPagination": true, + "showPaginationBottom": true, + "showPaginationTop": false, + "skipNextSort": false, + "sortable": true, + "sorted": Array [], + "sortedData": Array [ + Object { + "_index": 0, + "_nestingLevel": 0, + "_original": Object { + "id": 1, + "location": "District A", + "parent_id": null, + "spray_coverage": "80%", + "spray_effectiveness": "80%", + }, + "_subRows": undefined, + "id": 1, + "location": "District A", + "parent_id": null, + "spray_coverage": "80%", + "spray_effectiveness": "80%", + }, + Object { + "_index": 1, + "_nestingLevel": 0, + "_original": Object { + "id": 2, + "location": "District B", + "parent_id": null, + "spray_coverage": "75%", + "spray_effectiveness": "85%", + }, + "_subRows": undefined, + "id": 2, + "location": "District B", + "parent_id": null, + "spray_coverage": "75%", + "spray_effectiveness": "85%", + }, + Object { + "_index": 2, + "_nestingLevel": 0, + "_original": Object { + "id": 3, + "location": "District C", + "parent_id": null, + "spray_coverage": "90%", + "spray_effectiveness": "90%", + }, + "_subRows": undefined, + "id": 3, + "location": "District C", + "parent_id": null, + "spray_coverage": "90%", + "spray_effectiveness": "90%", + }, + Object { + "_index": 3, + "_nestingLevel": 0, + "_original": Object { + "id": 18, + "location": "District D", + "parent_id": null, + "spray_coverage": "0%", + "spray_effectiveness": "0%", + }, + "_subRows": undefined, + "id": 18, + "location": "District D", + "parent_id": null, + "spray_coverage": "0%", + "spray_effectiveness": "0%", + }, + ], + "startRow": 0, + "style": Object {}, + "subRowsKey": "_subRows", + "useDrillDownTrProps": true, } } - tabIndex="-1" > -
- id -
-
- -
- - -
+ + + + + + } + cellValue={1} + hasChildren={true} + urlPath="http://example.com" + > + + + +
+ + -
- location -
-
- -
-
- -
+ District A +
+ + -
- parent_id -
-
- -
-
- -
+ -
- spray_coverage -
-
- -
- - -
+ 80% +
+
+ -
- spray_effectiveness -
-
- + className="rt-td" + onClick={[Function]} + role="gridcell" + style={ + Object { + "flex": "100 0 auto", + "maxWidth": null, + "width": "100px", + } + } + > + 80% +
+
-
+
-
-
- - -
+
} - cellValue={1} + cellValue={2} hasChildren={true} urlPath="http://example.com" > @@ -93411,7 +105898,7 @@ exports[`DrillDownTable works fine with extraCellProps 1`] = ` - 1 + 2 + @@ -93447,7 +105934,7 @@ exports[`DrillDownTable works fine with extraCellProps 1`] = ` } } > - District A + District B
- 80% + 75%
- 80% + 85%
@@ -93534,14 +106021,14 @@ exports[`DrillDownTable works fine with extraCellProps 1`] = `
- 85% + 90%
@@ -95356,14 +107845,14 @@ exports[`DrillDownTable works fine with extraCellProps 1`] = `
+ + + , + "urlPath": "http://example.com", + }, + "filterable": false, + "filtered": Array [], + "freezeWhenExpanded": false, + "frozen": false, + "getLoadingProps": [Function], + "getNoDataProps": [Function], + "getPaginationProps": [Function], + "getProps": [Function], + "getResizerProps": [Function], + "getTableProps": [Function], + "getTbodyProps": [Function], + "getTdProps": [Function], + "getTfootProps": [Function], + "getTfootTdProps": [Function], + "getTfootTrProps": [Function], + "getTheadFilterProps": [Function], + "getTheadFilterThProps": [Function], + "getTheadFilterTrProps": [Function], + "getTheadGroupProps": [Function], + "getTheadGroupThProps": [Function], + "getTheadGroupTrProps": [Function], + "getTheadProps": [Function], + "getTheadThProps": [Function], + "getTheadTrProps": [Function], + "getTrGroupProps": [Function], + "getTrProps": [Function], + "groupedByPivotKey": "_groupedByPivot", + "hasChildren": [Function], + "hasColumnFooter": false, + "hasHeaderGroups": false, + "headerGroups": Array [], + "identifierField": "id", + "indexKey": "_index", + "linkerField": "id", + "loading": false, + "loadingText": "Loading...", + "minRows": 20, + "multiSort": true, + "nestingLevelKey": "_nestingLevel", + "nextText": "Next", + "noDataText": "No rows found", + "ofText": "of", + "onFetchData": [Function], + "originalKey": "_original", + "padRows": Array [ + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + ], + "page": 0, + "pageJumpText": "jump to page", + "pageRows": Array [ + Object { + "_index": 0, + "_nestingLevel": 0, + "_original": Object { + "id": 1, + "location": "District A", + "parent_id": null, + "spray_coverage": "80%", + "spray_effectiveness": "80%", + }, + "_subRows": undefined, + "_viewIndex": 0, + "id": 1, + "location": "District A", + "parent_id": null, + "spray_coverage": "80%", + "spray_effectiveness": "80%", + }, + Object { + "_index": 1, + "_nestingLevel": 0, + "_original": Object { + "id": 2, + "location": "District B", + "parent_id": null, + "spray_coverage": "75%", + "spray_effectiveness": "85%", + }, + "_subRows": undefined, + "_viewIndex": 1, + "id": 2, + "location": "District B", + "parent_id": null, + "spray_coverage": "75%", + "spray_effectiveness": "85%", + }, + Object { + "_index": 2, + "_nestingLevel": 0, + "_original": Object { + "id": 3, + "location": "District C", + "parent_id": null, + "spray_coverage": "90%", + "spray_effectiveness": "90%", + }, + "_subRows": undefined, + "_viewIndex": 2, + "id": 3, + "location": "District C", + "parent_id": null, + "spray_coverage": "90%", + "spray_effectiveness": "90%", + }, + Object { + "_index": 3, + "_nestingLevel": 0, + "_original": Object { + "id": 18, + "location": "District D", + "parent_id": null, + "spray_coverage": "0%", + "spray_effectiveness": "0%", + }, + "_subRows": undefined, + "_viewIndex": 3, + "id": 18, + "location": "District D", + "parent_id": null, + "spray_coverage": "0%", + "spray_effectiveness": "0%", + }, + ], + "pageSize": 20, + "pageSizeOptions": Array [ + 5, + 10, + 20, + 25, + 50, + 100, + ], + "pageText": "Page", + "pages": 1, + "parentIdentifierField": "parent_id", + "pivotDefaults": Object {}, + "pivotIDKey": "_pivotID", + "pivotValKey": "_pivotVal", + "previousText": "Previous", + "resizable": true, + "resized": Array [], + "resolveData": [Function], + "resolvedData": Array [ + Object { + "_index": 0, + "_nestingLevel": 0, + "_original": Object { + "id": 1, + "location": "District A", + "parent_id": null, + "spray_coverage": "80%", + "spray_effectiveness": "80%", + }, + "_subRows": undefined, + "id": 1, + "location": "District A", + "parent_id": null, + "spray_coverage": "80%", + "spray_effectiveness": "80%", + }, + Object { + "_index": 1, + "_nestingLevel": 0, + "_original": Object { + "id": 2, + "location": "District B", + "parent_id": null, + "spray_coverage": "75%", + "spray_effectiveness": "85%", + }, + "_subRows": undefined, + "id": 2, + "location": "District B", + "parent_id": null, + "spray_coverage": "75%", + "spray_effectiveness": "85%", }, - ], - "allVisibleColumns": Array [ Object { - "Aggregated": undefined, - "Cell": [Function], - "Expander": undefined, - "Filter": undefined, - "Footer": undefined, - "Header": "id", - "Pivot": undefined, - "PivotValue": undefined, - "Placeholder": undefined, - "accessor": [Function], - "aggregate": undefined, - "className": "", - "filterAll": false, - "filterMethod": undefined, - "filterable": undefined, - "footerClassName": "", - "footerStyle": Object {}, - "getFooterProps": [Function], - "getHeaderProps": [Function], - "getProps": [Function], - "headerClassName": "", - "headerStyle": Object {}, - "id": "id", - "minResizeWidth": 11, - "minWidth": 100, - "resizable": undefined, - "show": true, - "sortMethod": undefined, - "sortable": undefined, - "style": Object {}, + "_index": 2, + "_nestingLevel": 0, + "_original": Object { + "id": 3, + "location": "District C", + "parent_id": null, + "spray_coverage": "90%", + "spray_effectiveness": "90%", + }, + "_subRows": undefined, + "id": 3, + "location": "District C", + "parent_id": null, + "spray_coverage": "90%", + "spray_effectiveness": "90%", }, Object { - "Aggregated": undefined, - "Cell": undefined, - "Expander": undefined, - "Filter": undefined, - "Footer": undefined, - "Header": "location", - "Pivot": undefined, - "PivotValue": undefined, - "Placeholder": undefined, - "accessor": [Function], - "aggregate": undefined, - "className": "", - "filterAll": false, - "filterMethod": undefined, - "filterable": undefined, - "footerClassName": "", - "footerStyle": Object {}, - "getFooterProps": [Function], - "getHeaderProps": [Function], - "getProps": [Function], - "headerClassName": "", - "headerStyle": Object {}, - "id": "location", - "minResizeWidth": 11, - "minWidth": 100, - "resizable": undefined, - "show": true, - "sortMethod": undefined, - "sortable": undefined, - "style": Object {}, + "_index": 3, + "_nestingLevel": 0, + "_original": Object { + "id": 18, + "location": "District D", + "parent_id": null, + "spray_coverage": "0%", + "spray_effectiveness": "0%", + }, + "_subRows": undefined, + "id": 18, + "location": "District D", + "parent_id": null, + "spray_coverage": "0%", + "spray_effectiveness": "0%", }, + ], + "rootParentId": null, + "rowMinWidth": 500, + "rowsSelectorText": "rows per page", + "rowsText": "rows", + "showPageJump": true, + "showPageSizeOptions": true, + "showPagination": true, + "showPaginationBottom": true, + "showPaginationTop": false, + "skipNextSort": false, + "sortable": true, + "sorted": Array [], + "sortedData": Array [ Object { - "Aggregated": undefined, - "Cell": undefined, - "Expander": undefined, - "Filter": undefined, - "Footer": undefined, - "Header": "parent_id", - "Pivot": undefined, - "PivotValue": undefined, - "Placeholder": undefined, - "accessor": [Function], - "aggregate": undefined, - "className": "", - "filterAll": false, - "filterMethod": undefined, - "filterable": undefined, - "footerClassName": "", - "footerStyle": Object {}, - "getFooterProps": [Function], - "getHeaderProps": [Function], - "getProps": [Function], - "headerClassName": "", - "headerStyle": Object {}, - "id": "parent_id", - "minResizeWidth": 11, - "minWidth": 100, - "resizable": undefined, - "show": true, - "sortMethod": undefined, - "sortable": undefined, - "style": Object {}, + "_index": 0, + "_nestingLevel": 0, + "_original": Object { + "id": 1, + "location": "District A", + "parent_id": null, + "spray_coverage": "80%", + "spray_effectiveness": "80%", + }, + "_subRows": undefined, + "id": 1, + "location": "District A", + "parent_id": null, + "spray_coverage": "80%", + "spray_effectiveness": "80%", }, Object { - "Aggregated": undefined, - "Cell": undefined, - "Expander": undefined, - "Filter": undefined, - "Footer": undefined, - "Header": "spray_coverage", - "Pivot": undefined, - "PivotValue": undefined, - "Placeholder": undefined, - "accessor": [Function], - "aggregate": undefined, - "className": "", - "filterAll": false, - "filterMethod": undefined, - "filterable": undefined, - "footerClassName": "", - "footerStyle": Object {}, - "getFooterProps": [Function], - "getHeaderProps": [Function], - "getProps": [Function], - "headerClassName": "", - "headerStyle": Object {}, - "id": "spray_coverage", - "minResizeWidth": 11, - "minWidth": 100, - "resizable": undefined, - "show": true, - "sortMethod": undefined, - "sortable": undefined, - "style": Object {}, + "_index": 1, + "_nestingLevel": 0, + "_original": Object { + "id": 2, + "location": "District B", + "parent_id": null, + "spray_coverage": "75%", + "spray_effectiveness": "85%", + }, + "_subRows": undefined, + "id": 2, + "location": "District B", + "parent_id": null, + "spray_coverage": "75%", + "spray_effectiveness": "85%", + }, + Object { + "_index": 2, + "_nestingLevel": 0, + "_original": Object { + "id": 3, + "location": "District C", + "parent_id": null, + "spray_coverage": "90%", + "spray_effectiveness": "90%", + }, + "_subRows": undefined, + "id": 3, + "location": "District C", + "parent_id": null, + "spray_coverage": "90%", + "spray_effectiveness": "90%", }, Object { + "_index": 3, + "_nestingLevel": 0, + "_original": Object { + "id": 18, + "location": "District D", + "parent_id": null, + "spray_coverage": "0%", + "spray_effectiveness": "0%", + }, + "_subRows": undefined, + "id": 18, + "location": "District D", + "parent_id": null, + "spray_coverage": "0%", + "spray_effectiveness": "0%", + }, + ], + "startRow": 0, + "style": Object {}, + "subRowsKey": "_subRows", + "useDrillDownTrProps": true, + } + } + > +
+ + + , + "urlPath": "http://example.com", }, - ], - "defaultExpanded": Object {}, - "defaultFilterMethod": [Function], - "defaultFiltered": Array [], - "defaultPage": 0, - "defaultPageSize": 20, - "defaultResized": Array [], - "defaultSortDesc": false, - "defaultSortMethod": [Function], - "defaultSorted": Array [], - "endRow": 20, - "expanded": Object {}, - "expanderDefaults": Object { "filterable": false, - "resizable": false, - "sortable": false, - "width": 35, - }, - "extraCellProps": Object { - "caret": - + - , - "urlPath": "http://example.com", - }, - "filterable": false, - "filtered": Array [], - "freezeWhenExpanded": false, - "frozen": false, - "getLoadingProps": [Function], - "getNoDataProps": [Function], - "getPaginationProps": [Function], - "getProps": [Function], - "getResizerProps": [Function], - "getTableProps": [Function], - "getTbodyProps": [Function], - "getTdProps": [Function], - "getTfootProps": [Function], - "getTfootTdProps": [Function], - "getTfootTrProps": [Function], - "getTheadFilterProps": [Function], - "getTheadFilterThProps": [Function], - "getTheadFilterTrProps": [Function], - "getTheadGroupProps": [Function], - "getTheadGroupThProps": [Function], - "getTheadGroupTrProps": [Function], - "getTheadProps": [Function], - "getTheadThProps": [Function], - "getTheadTrProps": [Function], - "getTrGroupProps": [Function], - "getTrProps": [Function], - "groupedByPivotKey": "_groupedByPivot", - "hasColumnFooter": false, - "hasHeaderGroups": false, - "headerGroups": Array [], - "identifierField": "id", - "indexKey": "_index", - "linkerField": "id", - "loading": false, - "loadingText": "Loading...", - "minRows": 20, - "multiSort": true, - "nestingLevelKey": "_nestingLevel", - "nextText": "Next", - "noDataText": "No rows found", - "ofText": "of", - "onFetchData": [Function], - "originalKey": "_original", - "padRows": Array [ - 16, - 16, - 16, - 16, - 16, - 16, - 16, - 16, - 16, - 16, - 16, - 16, - 16, - 16, - 16, - 16, - ], - "page": 0, - "pageJumpText": "jump to page", - "pageRows": Array [ - Object { - "_index": 0, - "_nestingLevel": 0, - "_original": Object { + "filtered": Array [], + "freezeWhenExpanded": false, + "frozen": false, + "getLoadingProps": [Function], + "getNoDataProps": [Function], + "getPaginationProps": [Function], + "getProps": [Function], + "getResizerProps": [Function], + "getTableProps": [Function], + "getTbodyProps": [Function], + "getTdProps": [Function], + "getTfootProps": [Function], + "getTfootTdProps": [Function], + "getTfootTrProps": [Function], + "getTheadFilterProps": [Function], + "getTheadFilterThProps": [Function], + "getTheadFilterTrProps": [Function], + "getTheadGroupProps": [Function], + "getTheadGroupThProps": [Function], + "getTheadGroupTrProps": [Function], + "getTheadProps": [Function], + "getTheadThProps": [Function], + "getTheadTrProps": [Function], + "getTrGroupProps": [Function], + "getTrProps": [Function], + "groupedByPivotKey": "_groupedByPivot", + "hasChildren": [Function], + "hasColumnFooter": false, + "hasHeaderGroups": false, + "headerGroups": Array [], + "identifierField": "id", + "indexKey": "_index", + "linkerField": "id", + "loading": false, + "loadingText": "Loading...", + "minRows": 20, + "multiSort": true, + "nestingLevelKey": "_nestingLevel", + "nextText": "Next", + "noDataText": "No rows found", + "ofText": "of", + "onFetchData": [Function], + "originalKey": "_original", + "padRows": Array [ + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + ], + "page": 0, + "pageJumpText": "jump to page", + "pageRows": Array [ + Object { + "_index": 0, + "_nestingLevel": 0, + "_original": Object { + "id": 1, + "location": "District A", + "parent_id": null, + "spray_coverage": "80%", + "spray_effectiveness": "80%", + }, + "_subRows": undefined, + "_viewIndex": 0, + "id": 1, + "location": "District A", + "parent_id": null, + "spray_coverage": "80%", + "spray_effectiveness": "80%", + }, + Object { + "_index": 1, + "_nestingLevel": 0, + "_original": Object { + "id": 2, + "location": "District B", + "parent_id": null, + "spray_coverage": "75%", + "spray_effectiveness": "85%", + }, + "_subRows": undefined, + "_viewIndex": 1, + "id": 2, + "location": "District B", + "parent_id": null, + "spray_coverage": "75%", + "spray_effectiveness": "85%", + }, + Object { + "_index": 2, + "_nestingLevel": 0, + "_original": Object { + "id": 3, + "location": "District C", + "parent_id": null, + "spray_coverage": "90%", + "spray_effectiveness": "90%", + }, + "_subRows": undefined, + "_viewIndex": 2, + "id": 3, + "location": "District C", + "parent_id": null, + "spray_coverage": "90%", + "spray_effectiveness": "90%", + }, + Object { + "_index": 3, + "_nestingLevel": 0, + "_original": Object { + "id": 18, + "location": "District D", + "parent_id": null, + "spray_coverage": "0%", + "spray_effectiveness": "0%", + }, + "_subRows": undefined, + "_viewIndex": 3, + "id": 18, + "location": "District D", + "parent_id": null, + "spray_coverage": "0%", + "spray_effectiveness": "0%", + }, + ], + "pageSize": 20, + "pageSizeOptions": Array [ + 5, + 10, + 20, + 25, + 50, + 100, + ], + "pageText": "Page", + "pages": 1, + "parentIdentifierField": "parent_id", + "pivotDefaults": Object {}, + "pivotIDKey": "_pivotID", + "pivotValKey": "_pivotVal", + "previousText": "Previous", + "resizable": true, + "resized": Array [], + "resolveData": [Function], + "resolvedData": Array [ + Object { + "_index": 0, + "_nestingLevel": 0, + "_original": Object { + "id": 1, + "location": "District A", + "parent_id": null, + "spray_coverage": "80%", + "spray_effectiveness": "80%", + }, + "_subRows": undefined, "id": 1, "location": "District A", "parent_id": null, "spray_coverage": "80%", "spray_effectiveness": "80%", }, - "_subRows": undefined, - "_viewIndex": 0, - "id": 1, - "location": "District A", - "parent_id": null, - "spray_coverage": "80%", - "spray_effectiveness": "80%", - }, - Object { - "_index": 1, - "_nestingLevel": 0, - "_original": Object { + Object { + "_index": 1, + "_nestingLevel": 0, + "_original": Object { + "id": 2, + "location": "District B", + "parent_id": null, + "spray_coverage": "75%", + "spray_effectiveness": "85%", + }, + "_subRows": undefined, "id": 2, "location": "District B", "parent_id": null, "spray_coverage": "75%", "spray_effectiveness": "85%", }, - "_subRows": undefined, - "_viewIndex": 1, - "id": 2, - "location": "District B", - "parent_id": null, - "spray_coverage": "75%", - "spray_effectiveness": "85%", - }, - Object { - "_index": 2, - "_nestingLevel": 0, - "_original": Object { + Object { + "_index": 2, + "_nestingLevel": 0, + "_original": Object { + "id": 3, + "location": "District C", + "parent_id": null, + "spray_coverage": "90%", + "spray_effectiveness": "90%", + }, + "_subRows": undefined, "id": 3, "location": "District C", "parent_id": null, "spray_coverage": "90%", "spray_effectiveness": "90%", }, - "_subRows": undefined, - "_viewIndex": 2, - "id": 3, - "location": "District C", - "parent_id": null, - "spray_coverage": "90%", - "spray_effectiveness": "90%", - }, - Object { - "_index": 3, - "_nestingLevel": 0, - "_original": Object { + Object { + "_index": 3, + "_nestingLevel": 0, + "_original": Object { + "id": 18, + "location": "District D", + "parent_id": null, + "spray_coverage": "0%", + "spray_effectiveness": "0%", + }, + "_subRows": undefined, "id": 18, "location": "District D", "parent_id": null, "spray_coverage": "0%", "spray_effectiveness": "0%", }, - "_subRows": undefined, - "_viewIndex": 3, - "id": 18, - "location": "District D", - "parent_id": null, - "spray_coverage": "0%", - "spray_effectiveness": "0%", - }, - ], - "pageSize": 20, - "pageSizeOptions": Array [ - 5, - 10, - 20, - 25, - 50, - 100, - ], - "pageText": "Page", - "pages": 1, - "parentIdentifierField": "parent_id", - "pivotDefaults": Object {}, - "pivotIDKey": "_pivotID", - "pivotValKey": "_pivotVal", - "previousText": "Previous", - "resizable": true, - "resized": Array [], - "resolveData": [Function], - "resolvedData": Array [ - Object { - "_index": 0, - "_nestingLevel": 0, - "_original": Object { + ], + "rootParentId": null, + "rowMinWidth": 500, + "rowsSelectorText": "rows per page", + "rowsText": "rows", + "showPageJump": true, + "showPageSizeOptions": true, + "showPagination": true, + "showPaginationBottom": true, + "showPaginationTop": false, + "skipNextSort": false, + "sortable": true, + "sorted": Array [], + "sortedData": Array [ + Object { + "_index": 0, + "_nestingLevel": 0, + "_original": Object { + "id": 1, + "location": "District A", + "parent_id": null, + "spray_coverage": "80%", + "spray_effectiveness": "80%", + }, + "_subRows": undefined, "id": 1, "location": "District A", "parent_id": null, "spray_coverage": "80%", "spray_effectiveness": "80%", }, - "_subRows": undefined, - "id": 1, - "location": "District A", - "parent_id": null, - "spray_coverage": "80%", - "spray_effectiveness": "80%", - }, - Object { - "_index": 1, - "_nestingLevel": 0, - "_original": Object { + Object { + "_index": 1, + "_nestingLevel": 0, + "_original": Object { + "id": 2, + "location": "District B", + "parent_id": null, + "spray_coverage": "75%", + "spray_effectiveness": "85%", + }, + "_subRows": undefined, "id": 2, "location": "District B", "parent_id": null, "spray_coverage": "75%", "spray_effectiveness": "85%", }, - "_subRows": undefined, - "id": 2, - "location": "District B", - "parent_id": null, - "spray_coverage": "75%", - "spray_effectiveness": "85%", - }, - Object { - "_index": 2, - "_nestingLevel": 0, - "_original": Object { + Object { + "_index": 2, + "_nestingLevel": 0, + "_original": Object { + "id": 3, + "location": "District C", + "parent_id": null, + "spray_coverage": "90%", + "spray_effectiveness": "90%", + }, + "_subRows": undefined, "id": 3, "location": "District C", "parent_id": null, "spray_coverage": "90%", "spray_effectiveness": "90%", }, - "_subRows": undefined, - "id": 3, - "location": "District C", - "parent_id": null, - "spray_coverage": "90%", - "spray_effectiveness": "90%", - }, + Object { + "_index": 3, + "_nestingLevel": 0, + "_original": Object { + "id": 18, + "location": "District D", + "parent_id": null, + "spray_coverage": "0%", + "spray_effectiveness": "0%", + }, + "_subRows": undefined, + "id": 18, + "location": "District D", + "parent_id": null, + "spray_coverage": "0%", + "spray_effectiveness": "0%", + }, + ], + "startRow": 0, + "style": Object {}, + "subRowsKey": "_subRows", + "useDrillDownTrProps": true, + } + } + > + +
+ + + + + + } + cellValue={18} + hasChildren={false} + urlPath="http://example.com" + > +
+ + 18 + +
+
+
+
+
+ +
+ District D +
+
+ +
+ + +
+ 0% +
+
+ +
+ 0% +
+
+
+ +
+ + +
+ +
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+
+
+
+
+ +
+
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+
+
+
+
+ +
+ +
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+
+
+
+
+ +
+ +
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+
+
+
+
+ +
+ +
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+
+
+
+
+ +
+ +
+ +
- + - , - "urlPath": "http://example.com", - }, - "filterable": false, - "filtered": Array [], - "freezeWhenExpanded": false, - "frozen": false, - "getLoadingProps": [Function], - "getNoDataProps": [Function], - "getPaginationProps": [Function], - "getProps": [Function], - "getResizerProps": [Function], - "getTableProps": [Function], - "getTbodyProps": [Function], - "getTdProps": [Function], - "getTfootProps": [Function], - "getTfootTdProps": [Function], - "getTfootTrProps": [Function], - "getTheadFilterProps": [Function], - "getTheadFilterThProps": [Function], - "getTheadFilterTrProps": [Function], - "getTheadGroupProps": [Function], - "getTheadGroupThProps": [Function], - "getTheadGroupTrProps": [Function], - "getTheadProps": [Function], - "getTheadThProps": [Function], - "getTheadTrProps": [Function], - "getTrGroupProps": [Function], - "getTrProps": [Function], - "groupedByPivotKey": "_groupedByPivot", - "hasColumnFooter": false, - "hasHeaderGroups": false, - "headerGroups": Array [], - "identifierField": "id", - "indexKey": "_index", - "linkerField": "id", - "loading": false, - "loadingText": "Loading...", - "minRows": 20, - "multiSort": true, - "nestingLevelKey": "_nestingLevel", - "nextText": "Next", - "noDataText": "No rows found", - "ofText": "of", - "onFetchData": [Function], - "originalKey": "_original", - "padRows": Array [ - 16, - 16, - 16, - 16, - 16, - 16, - 16, - 16, - 16, - 16, - 16, - 16, - 16, - 16, - 16, - 16, - ], - "page": 0, - "pageJumpText": "jump to page", - "pageRows": Array [ + "flex": "100 0 auto", + "maxWidth": null, + "width": "100px", + } + } + > + + +   + + +
+
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+
+
+
+
+ +
+ +
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+
+
+
+
+ +
+ +
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+
+
+
+
+ +
+ +
- + +   + + +
+
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+
+
+
+
+ +
+ + +
+ +
+ +
+ + +   + +
- District C + + +   + +
+ > + + +   + + +
- 90% + + +   + +
- 90% + + +   + +
@@ -97178,1564 +111476,3109 @@ exports[`DrillDownTable works fine with extraCellProps 1`] = `
+
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+ - + - , - "urlPath": "http://example.com", - }, - "filterable": false, - "filtered": Array [], - "freezeWhenExpanded": false, - "frozen": false, - "getLoadingProps": [Function], - "getNoDataProps": [Function], - "getPaginationProps": [Function], - "getProps": [Function], - "getResizerProps": [Function], - "getTableProps": [Function], - "getTbodyProps": [Function], - "getTdProps": [Function], - "getTfootProps": [Function], - "getTfootTdProps": [Function], - "getTfootTrProps": [Function], - "getTheadFilterProps": [Function], - "getTheadFilterThProps": [Function], - "getTheadFilterTrProps": [Function], - "getTheadGroupProps": [Function], - "getTheadGroupThProps": [Function], - "getTheadGroupTrProps": [Function], - "getTheadProps": [Function], - "getTheadThProps": [Function], - "getTheadTrProps": [Function], - "getTrGroupProps": [Function], - "getTrProps": [Function], - "groupedByPivotKey": "_groupedByPivot", - "hasColumnFooter": false, - "hasHeaderGroups": false, - "headerGroups": Array [], - "identifierField": "id", - "indexKey": "_index", - "linkerField": "id", - "loading": false, - "loadingText": "Loading...", - "minRows": 20, - "multiSort": true, - "nestingLevelKey": "_nestingLevel", - "nextText": "Next", - "noDataText": "No rows found", - "ofText": "of", - "onFetchData": [Function], - "originalKey": "_original", - "padRows": Array [ - 16, - 16, - 16, - 16, - 16, - 16, - 16, - 16, - 16, - 16, - 16, - 16, - 16, - 16, - 16, - 16, - ], - "page": 0, - "pageJumpText": "jump to page", - "pageRows": Array [ + "flex": "100 0 auto", + "maxWidth": null, + "width": "100px", + } + } + > +
+ + +   + + +
+
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+
+
+
+
+ +
+ +
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+
+
+
+
+ +
+ +
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+
+
+
+
+ +
+
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+
+
+
+
+ +
+ +
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+
+
+
+
+
+ + + +
+ + + + , + "urlPath": "http://example.com", + } + } + filterable={false} + filtered={Array []} + freezeWhenExpanded={false} + frozen={false} + getLoadingProps={[Function]} + getNoDataProps={[Function]} + getPaginationProps={[Function]} + getProps={[Function]} + getResizerProps={[Function]} + getTableProps={[Function]} + getTbodyProps={[Function]} + getTdProps={[Function]} + getTfootProps={[Function]} + getTfootTdProps={[Function]} + getTfootTrProps={[Function]} + getTheadFilterProps={[Function]} + getTheadFilterThProps={[Function]} + getTheadFilterTrProps={[Function]} + getTheadGroupProps={[Function]} + getTheadGroupThProps={[Function]} + getTheadGroupTrProps={[Function]} + getTheadProps={[Function]} + getTheadThProps={[Function]} + getTheadTrProps={[Function]} + getTrGroupProps={[Function]} + getTrProps={[Function]} + groupedByPivotKey="_groupedByPivot" + hasChildren={[Function]} + hasHeaderGroups={false} + headerGroups={Array []} + identifierField="id" + indexKey="_index" + isTop={false} + linkerField="id" + loading={false} + loadingText="Loading..." + multiSort={true} + nestingLevelKey="_nestingLevel" + nextText="Next" + noDataText="No rows found" + ofText="of" + onFetchData={[Function]} + onPageChange={[Function]} + onPageSizeChange={[Function]} + originalKey="_original" + page={0} + pageJumpText="jump to page" + pageSize={20} + pageSizeOptions={ + Array [ + 5, + 10, + 20, + 25, + 50, + 100, + ] + } + pageText="Page" + pages={1} + parentIdentifierField="parent_id" + pivotDefaults={Object {}} + pivotIDKey="_pivotID" + pivotValKey="_pivotVal" + previousText="Previous" + renderCurrentPage={[Function]} + renderPageJump={[Function]} + renderPageSizeOptions={[Function]} + renderTotalPagesCount={[Function]} + resizable={true} + resized={Array []} + resolveData={[Function]} + resolvedData={ + Array [ + Object { + "_index": 0, + "_nestingLevel": 0, + "_original": Object { + "id": 1, + "location": "District A", + "parent_id": null, + "spray_coverage": "80%", + "spray_effectiveness": "80%", + }, + "_subRows": undefined, + "id": 1, + "location": "District A", + "parent_id": null, + "spray_coverage": "80%", + "spray_effectiveness": "80%", + }, + Object { + "_index": 1, + "_nestingLevel": 0, + "_original": Object { + "id": 2, + "location": "District B", + "parent_id": null, + "spray_coverage": "75%", + "spray_effectiveness": "85%", + }, + "_subRows": undefined, + "id": 2, + "location": "District B", + "parent_id": null, + "spray_coverage": "75%", + "spray_effectiveness": "85%", + }, + Object { + "_index": 2, + "_nestingLevel": 0, + "_original": Object { + "id": 3, + "location": "District C", + "parent_id": null, + "spray_coverage": "90%", + "spray_effectiveness": "90%", + }, + "_subRows": undefined, + "id": 3, + "location": "District C", + "parent_id": null, + "spray_coverage": "90%", + "spray_effectiveness": "90%", + }, + Object { + "_index": 3, + "_nestingLevel": 0, + "_original": Object { + "id": 18, + "location": "District D", + "parent_id": null, + "spray_coverage": "0%", + "spray_effectiveness": "0%", + }, + "_subRows": undefined, + "id": 18, + "location": "District D", + "parent_id": null, + "spray_coverage": "0%", + "spray_effectiveness": "0%", + }, + ] + } + rootParentId={null} + rowsSelectorText="rows per page" + rowsText="rows" + showPageJump={true} + showPageSizeOptions={true} + showPagination={true} + showPaginationBottom={true} + showPaginationTop={false} + skipNextSort={false} + sortable={true} + sorted={Array []} + sortedData={ + Array [ + Object { + "_index": 0, + "_nestingLevel": 0, + "_original": Object { + "id": 1, + "location": "District A", + "parent_id": null, + "spray_coverage": "80%", + "spray_effectiveness": "80%", + }, + "_subRows": undefined, + "id": 1, + "location": "District A", + "parent_id": null, + "spray_coverage": "80%", + "spray_effectiveness": "80%", + }, + Object { + "_index": 1, + "_nestingLevel": 0, + "_original": Object { + "id": 2, + "location": "District B", + "parent_id": null, + "spray_coverage": "75%", + "spray_effectiveness": "85%", + }, + "_subRows": undefined, + "id": 2, + "location": "District B", + "parent_id": null, + "spray_coverage": "75%", + "spray_effectiveness": "85%", + }, + Object { + "_index": 2, + "_nestingLevel": 0, + "_original": Object { + "id": 3, + "location": "District C", + "parent_id": null, + "spray_coverage": "90%", + "spray_effectiveness": "90%", + }, + "_subRows": undefined, + "id": 3, + "location": "District C", + "parent_id": null, + "spray_coverage": "90%", + "spray_effectiveness": "90%", + }, + Object { + "_index": 3, + "_nestingLevel": 0, + "_original": Object { + "id": 18, + "location": "District D", + "parent_id": null, + "spray_coverage": "0%", + "spray_effectiveness": "0%", + }, + "_subRows": undefined, + "id": 18, + "location": "District D", + "parent_id": null, + "spray_coverage": "0%", + "spray_effectiveness": "0%", + }, + ] + } + subRowsKey="_subRows" + useDrillDownTrProps={true} + > +
+
+ + + +
+
+ + Page + +
+ +
+ + of + + + 1 + +
+ + + +
+
+ + + +
+
+
+
+ +
+
+ Loading... +
+
+
+ + +
+`; + +exports[`DrillDownTable works fine with useDrillDownTrProps being flase 1`] = ` + + +
+ +
+ +
+ +
+ +
+
+ id +
+ +
+ +
+ + +
+
+ location +
+ +
+ +
+ + +
+
+ parent_id +
+ +
+ +
+ + +
+
+ spray_coverage +
+ +
+ +
+ + +
+
+ spray_effectiveness +
+ +
+ +
+ +
+ +
+ + +
+ +
+ +
+ +
+ + +
+ + 1 + +  ▼ + + +
+
+
+
+
+ +
+ District A +
+
+ +
+ + +
+ 80% +
+
+ +
+ 80% +
+
+
+ +
+ + +
+ +
+ +
+ + +
+ + 2 + +  ▼ + + +
+
+
+
+
+ +
+ District B +
+
+ +
- + - , - "urlPath": "http://example.com", - }, - "filterable": false, - "filtered": Array [], - "freezeWhenExpanded": false, - "frozen": false, - "getLoadingProps": [Function], - "getNoDataProps": [Function], - "getPaginationProps": [Function], - "getProps": [Function], - "getResizerProps": [Function], - "getTableProps": [Function], - "getTbodyProps": [Function], - "getTdProps": [Function], - "getTfootProps": [Function], - "getTfootTdProps": [Function], - "getTfootTrProps": [Function], - "getTheadFilterProps": [Function], - "getTheadFilterThProps": [Function], - "getTheadFilterTrProps": [Function], - "getTheadGroupProps": [Function], - "getTheadGroupThProps": [Function], - "getTheadGroupTrProps": [Function], - "getTheadProps": [Function], - "getTheadThProps": [Function], - "getTheadTrProps": [Function], - "getTrGroupProps": [Function], - "getTrProps": [Function], - "groupedByPivotKey": "_groupedByPivot", - "hasColumnFooter": false, - "hasHeaderGroups": false, - "headerGroups": Array [], - "identifierField": "id", - "indexKey": "_index", - "linkerField": "id", - "loading": false, - "loadingText": "Loading...", - "minRows": 20, - "multiSort": true, - "nestingLevelKey": "_nestingLevel", - "nextText": "Next", - "noDataText": "No rows found", - "ofText": "of", - "onFetchData": [Function], - "originalKey": "_original", - "padRows": Array [ - 16, - 16, - 16, - 16, - 16, - 16, - 16, - 16, - 16, - 16, - 16, - 16, - 16, - 16, - 16, - 16, - ], - "page": 0, - "pageJumpText": "jump to page", - "pageRows": Array [ + "flex": "100 0 auto", + "maxWidth": null, + "width": "100px", + } + } + /> + + +
+ 75% +
+
+ +
+ 85% +
+
+
+ +
+ + +
+ +
+ +
+ + +
+ + 3 + +  ▼ + + +
+
+
+
+
+ +
+ District C +
+
+ +
+ + +
+ 90% +
+
+ +
+ 90% +
+
+
+ +
+ + +
+ +
- - + - - } + -
+
18
- +
@@ -102101,14 +117940,6 @@ exports[`DrillDownTable works fine with extraCellProps 1`] = ` "width": 35, } } - extraCellProps={ - Object { - "caret": - + - , - "urlPath": "http://example.com", - } - } filterable={false} filtered={Array []} freezeWhenExpanded={false} @@ -102136,6 +117967,7 @@ exports[`DrillDownTable works fine with extraCellProps 1`] = ` getTrGroupProps={[Function]} getTrProps={[Function]} groupedByPivotKey="_groupedByPivot" + hasChildren={[Function]} hasHeaderGroups={false} headerGroups={Array []} identifierField="id" @@ -102336,7 +118168,7 @@ exports[`DrillDownTable works fine with extraCellProps 1`] = ` ] } subRowsKey="_subRows" - useDrillDownTrProps={true} + useDrillDownTrProps={false} >
`; -exports[`DrillDownTable works fine with useDrillDownTrProps being flase 1`] = ` +exports[`DrillDownTable works with custom hasChildren callback 1`] = `
-
+
+
+ id +
+ +
+ +
+ + +
+
+ location +
+ +
+ +
+ + +
+
+ parent_id +
+ +
+ +
+ + +
+
+ spray_coverage +
+ +
+ +
+ + +
+
+ spray_effectiveness +
+ +
+ +
+ +
+ +
+ + +
+ +
+ +
+ +
+ + +
+ + 9 + +
+
+
+
+
+ +
+ Operational Area 9 +
+
+ +
+ 4 +
+
+ -
- id -
-
- -
- - -
+ 70% +
+
+ -
- location -
-
- + className="rt-td" + onClick={[Function]} + role="gridcell" + style={ + Object { + "flex": "100 0 auto", + "maxWidth": null, + "width": "100px", + } + } + > + 90% +
+
- - +
+
+ +
+
-
- parent_id -
-
- -
- - -
+ + +
+ + 10 + +  ▼ + + +
+
+
+
+ + -
- spray_coverage -
- + Operational Area 10 +
+ +
- -
- - -
+ 4 +
+
+ -
- spray_effectiveness -
- + 80% +
+ +
- + className="rt-td" + onClick={[Function]} + role="gridcell" + style={ + Object { + "flex": "100 0 auto", + "maxWidth": null, + "width": "100px", + } + } + > + 100% +
+
-
+
- -
- - -
+
- -
- - -
- - 1 - -  ▼ - - -
-
-
-
-
- -
- District A -
-
- -
- - -
- 80% -
-
- -
- 80% -
-
-
- -
- - -
- -
- -
- - -
- - 2 - -  ▼ - - -
-
-
-
-
- -
- District B -
-
- -
- - -
- 75% -
-
- -
- 85% -
-
-
- -
- - -
- -
- 3 - -  ▼ - + 11
@@ -103808,7 +123770,7 @@ exports[`DrillDownTable works fine with useDrillDownTrProps being flase 1`] = ` } } > - District C + Operational Area 11
-
- - -
- 90% -
-
- -
- 90% -
-
-
-
-
-
- -
- -
-
- - -
- - 18 - -
-
-
+ 4
- District D + 100%
+ > + 100% +
+ +
+
+
+
+ +
+ +
+ +
+ + +   + + +
+
+ +
+ + +   + + +
+
+ +
+ + +   + + +
- 0% + + +   + +
- 0% + + +   + +
@@ -104159,7 +124024,7 @@ exports[`DrillDownTable works fine with useDrillDownTrProps being flase 1`] = `
{ - it('should authorize a user using an Ona token', async () => { - fetch.mockResponseOnce(JSON.stringify({})); - const authZstatus = await superset.authZ( - { - token: 'abcdefghij' - }, - res => res.status - ); - expect(authZstatus).toEqual(200); - }); - - it('should not authorize a user using an expired Ona token', async () => { - fetch.mockRejectOnce({ status: 302 }); - const authZstatus = await superset.authZ( - { - token: 'abcdefghij' - }, - res => res.status - ); - expect(authZstatus).toEqual(302); - }); - - it('should fetch from the Slice API without a callback', async () => { - fetch.mockResponseOnce(JSON.stringify(sliceResponse)); - const res = await superset.api.fetch({ - endpoint: 'slice', - extraPath: '892' - }); - expect(res).toEqual(sliceResponse); - }); - - it('should fetch from the Slice API with a callback', async () => { - fetch.mockResponseOnce(JSON.stringify(sliceResponse)); - const data = await superset.api.fetch( - { - endpoint: 'slice', - extraPath: '892' - }, - res => superset.processData(res) - ); - expect(data).toEqual(parsedSliceResponse); - }); - - it('should parse Slice data from Slice response', () => { - expect(superset.processData(sliceResponse)).toEqual(parsedSliceResponse); - }); - - it('should de-authorize a user', async () => { - fetch.mockResponseOnce(JSON.stringify({})); - const resStatus = await superset.deAuthZ(null, res => res.status); - expect(resStatus).toEqual(200); - }); -});