@ekz/blueprintjs 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/common/classes.d.ts +28 -0
- package/lib/cjs/common/classes.js +34 -0
- package/lib/cjs/common/classes.js.map +1 -0
- package/lib/cjs/common/index.d.ts +3 -0
- package/lib/cjs/common/index.js +9 -0
- package/lib/cjs/common/index.js.map +1 -0
- package/lib/cjs/components/pagination/index.d.ts +1 -0
- package/lib/cjs/components/pagination/index.js +5 -0
- package/lib/cjs/components/pagination/index.js.map +1 -0
- package/lib/cjs/components/pagination/pagination.d.ts +46 -0
- package/lib/cjs/components/pagination/pagination.js +46 -0
- package/lib/cjs/components/pagination/pagination.js.map +1 -0
- package/lib/cjs/components/table/columnFilter.d.ts +7 -0
- package/lib/cjs/components/table/columnFilter.js +23 -0
- package/lib/cjs/components/table/columnFilter.js.map +1 -0
- package/lib/cjs/components/table/columnHelpers.d.ts +340 -0
- package/lib/cjs/components/table/columnHelpers.js +39 -0
- package/lib/cjs/components/table/columnHelpers.js.map +1 -0
- package/lib/cjs/components/table/headerGroup.d.ts +8 -0
- package/lib/cjs/components/table/headerGroup.js +42 -0
- package/lib/cjs/components/table/headerGroup.js.map +1 -0
- package/lib/cjs/components/table/index.d.ts +9 -0
- package/lib/cjs/components/table/index.js +20 -0
- package/lib/cjs/components/table/index.js.map +1 -0
- package/lib/cjs/components/table/reactTableBase.d.ts +2 -0
- package/lib/cjs/components/table/reactTableBase.js +8 -0
- package/lib/cjs/components/table/reactTableBase.js.map +1 -0
- package/lib/cjs/components/table/table.d.ts +123 -0
- package/lib/cjs/components/table/table.js +229 -0
- package/lib/cjs/components/table/table.js.map +1 -0
- package/lib/cjs/components/table/tableMessages.d.ts +6 -0
- package/lib/cjs/components/table/tableMessages.js +11 -0
- package/lib/cjs/components/table/tableMessages.js.map +1 -0
- package/lib/cjs/components/table/theme.d.ts +4 -0
- package/lib/cjs/components/table/theme.js +9 -0
- package/lib/cjs/components/table/theme.js.map +1 -0
- package/lib/cjs/components/table/useAutoColumnSizer.d.ts +7 -0
- package/lib/cjs/components/table/useAutoColumnSizer.js +51 -0
- package/lib/cjs/components/table/useAutoColumnSizer.js.map +1 -0
- package/lib/cjs/components/table/useAutoHeight.d.ts +4 -0
- package/lib/cjs/components/table/useAutoHeight.js +69 -0
- package/lib/cjs/components/table/useAutoHeight.js.map +1 -0
- package/lib/cjs/components/table/useGroupedHeaderColumnSizer.d.ts +2 -0
- package/lib/cjs/components/table/useGroupedHeaderColumnSizer.js +57 -0
- package/lib/cjs/components/table/useGroupedHeaderColumnSizer.js.map +1 -0
- package/lib/cjs/components/table/useTable.d.ts +122 -0
- package/lib/cjs/components/table/useTable.js +31 -0
- package/lib/cjs/components/table/useTable.js.map +1 -0
- package/lib/cjs/components/table/useTableExport.d.ts +6 -0
- package/lib/cjs/components/table/useTableExport.js +41 -0
- package/lib/cjs/components/table/useTableExport.js.map +1 -0
- package/lib/cjs/components/table/useTableState.d.ts +3 -0
- package/lib/cjs/components/table/useTableState.js +14 -0
- package/lib/cjs/components/table/useTableState.js.map +1 -0
- package/lib/cjs/components/table/utils.d.ts +1 -0
- package/lib/cjs/components/table/utils.js +8 -0
- package/lib/cjs/components/table/utils.js.map +1 -0
- package/lib/cjs/index.d.ts +7 -0
- package/lib/cjs/index.js +16 -0
- package/lib/cjs/index.js.map +1 -0
- package/lib/cjs/theme/baseTheme.d.ts +39 -0
- package/lib/cjs/theme/baseTheme.js +47 -0
- package/lib/cjs/theme/baseTheme.js.map +1 -0
- package/lib/cjs/theme/blueprintTheme.d.ts +26 -0
- package/lib/cjs/theme/blueprintTheme.js +99 -0
- package/lib/cjs/theme/blueprintTheme.js.map +1 -0
- package/lib/cjs/theme/index.d.ts +6 -0
- package/lib/cjs/theme/index.js +13 -0
- package/lib/cjs/theme/index.js.map +1 -0
- package/lib/cjs/theme/spacing.d.ts +2 -0
- package/lib/cjs/theme/spacing.js +13 -0
- package/lib/cjs/theme/spacing.js.map +1 -0
- package/lib/cjs/theme/useBlueprintTheme.d.ts +2 -0
- package/lib/cjs/theme/useBlueprintTheme.js +12 -0
- package/lib/cjs/theme/useBlueprintTheme.js.map +1 -0
- package/lib/css/blueprintjs.css +402 -0
- package/lib/css/blueprintjs.css.map +1 -0
- package/lib/esm/common/classes.d.ts +28 -0
- package/lib/esm/common/classes.js +31 -0
- package/lib/esm/common/classes.js.map +1 -0
- package/lib/esm/common/index.d.ts +3 -0
- package/lib/esm/common/index.js +4 -0
- package/lib/esm/common/index.js.map +1 -0
- package/lib/esm/components/pagination/index.d.ts +1 -0
- package/lib/esm/components/pagination/index.js +2 -0
- package/lib/esm/components/pagination/index.js.map +1 -0
- package/lib/esm/components/pagination/pagination.d.ts +46 -0
- package/lib/esm/components/pagination/pagination.js +42 -0
- package/lib/esm/components/pagination/pagination.js.map +1 -0
- package/lib/esm/components/table/columnFilter.d.ts +7 -0
- package/lib/esm/components/table/columnFilter.js +18 -0
- package/lib/esm/components/table/columnFilter.js.map +1 -0
- package/lib/esm/components/table/columnHelpers.d.ts +340 -0
- package/lib/esm/components/table/columnHelpers.js +36 -0
- package/lib/esm/components/table/columnHelpers.js.map +1 -0
- package/lib/esm/components/table/headerGroup.d.ts +8 -0
- package/lib/esm/components/table/headerGroup.js +39 -0
- package/lib/esm/components/table/headerGroup.js.map +1 -0
- package/lib/esm/components/table/index.d.ts +9 -0
- package/lib/esm/components/table/index.js +10 -0
- package/lib/esm/components/table/index.js.map +1 -0
- package/lib/esm/components/table/reactTableBase.d.ts +2 -0
- package/lib/esm/components/table/reactTableBase.js +3 -0
- package/lib/esm/components/table/reactTableBase.js.map +1 -0
- package/lib/esm/components/table/table.d.ts +123 -0
- package/lib/esm/components/table/table.js +225 -0
- package/lib/esm/components/table/table.js.map +1 -0
- package/lib/esm/components/table/tableMessages.d.ts +6 -0
- package/lib/esm/components/table/tableMessages.js +6 -0
- package/lib/esm/components/table/tableMessages.js.map +1 -0
- package/lib/esm/components/table/theme.d.ts +4 -0
- package/lib/esm/components/table/theme.js +6 -0
- package/lib/esm/components/table/theme.js.map +1 -0
- package/lib/esm/components/table/useAutoColumnSizer.d.ts +7 -0
- package/lib/esm/components/table/useAutoColumnSizer.js +46 -0
- package/lib/esm/components/table/useAutoColumnSizer.js.map +1 -0
- package/lib/esm/components/table/useAutoHeight.d.ts +4 -0
- package/lib/esm/components/table/useAutoHeight.js +65 -0
- package/lib/esm/components/table/useAutoHeight.js.map +1 -0
- package/lib/esm/components/table/useGroupedHeaderColumnSizer.d.ts +2 -0
- package/lib/esm/components/table/useGroupedHeaderColumnSizer.js +53 -0
- package/lib/esm/components/table/useGroupedHeaderColumnSizer.js.map +1 -0
- package/lib/esm/components/table/useTable.d.ts +122 -0
- package/lib/esm/components/table/useTable.js +28 -0
- package/lib/esm/components/table/useTable.js.map +1 -0
- package/lib/esm/components/table/useTableExport.d.ts +6 -0
- package/lib/esm/components/table/useTableExport.js +37 -0
- package/lib/esm/components/table/useTableExport.js.map +1 -0
- package/lib/esm/components/table/useTableState.d.ts +3 -0
- package/lib/esm/components/table/useTableState.js +11 -0
- package/lib/esm/components/table/useTableState.js.map +1 -0
- package/lib/esm/components/table/utils.d.ts +1 -0
- package/lib/esm/components/table/utils.js +5 -0
- package/lib/esm/components/table/utils.js.map +1 -0
- package/lib/esm/index.d.ts +7 -0
- package/lib/esm/index.js +11 -0
- package/lib/esm/index.js.map +1 -0
- package/lib/esm/theme/baseTheme.d.ts +39 -0
- package/lib/esm/theme/baseTheme.js +44 -0
- package/lib/esm/theme/baseTheme.js.map +1 -0
- package/lib/esm/theme/blueprintTheme.d.ts +26 -0
- package/lib/esm/theme/blueprintTheme.js +96 -0
- package/lib/esm/theme/blueprintTheme.js.map +1 -0
- package/lib/esm/theme/index.d.ts +6 -0
- package/lib/esm/theme/index.js +5 -0
- package/lib/esm/theme/index.js.map +1 -0
- package/lib/esm/theme/spacing.d.ts +2 -0
- package/lib/esm/theme/spacing.js +9 -0
- package/lib/esm/theme/spacing.js.map +1 -0
- package/lib/esm/theme/useBlueprintTheme.d.ts +2 -0
- package/lib/esm/theme/useBlueprintTheme.js +9 -0
- package/lib/esm/theme/useBlueprintTheme.js.map +1 -0
- package/lib/esnext/common/classes.d.ts +28 -0
- package/lib/esnext/common/classes.js +31 -0
- package/lib/esnext/common/classes.js.map +1 -0
- package/lib/esnext/common/index.d.ts +3 -0
- package/lib/esnext/common/index.js +4 -0
- package/lib/esnext/common/index.js.map +1 -0
- package/lib/esnext/components/pagination/index.d.ts +1 -0
- package/lib/esnext/components/pagination/index.js +2 -0
- package/lib/esnext/components/pagination/index.js.map +1 -0
- package/lib/esnext/components/pagination/pagination.d.ts +46 -0
- package/lib/esnext/components/pagination/pagination.js +42 -0
- package/lib/esnext/components/pagination/pagination.js.map +1 -0
- package/lib/esnext/components/table/columnFilter.d.ts +7 -0
- package/lib/esnext/components/table/columnFilter.js +18 -0
- package/lib/esnext/components/table/columnFilter.js.map +1 -0
- package/lib/esnext/components/table/columnHelpers.d.ts +340 -0
- package/lib/esnext/components/table/columnHelpers.js +36 -0
- package/lib/esnext/components/table/columnHelpers.js.map +1 -0
- package/lib/esnext/components/table/headerGroup.d.ts +8 -0
- package/lib/esnext/components/table/headerGroup.js +39 -0
- package/lib/esnext/components/table/headerGroup.js.map +1 -0
- package/lib/esnext/components/table/index.d.ts +9 -0
- package/lib/esnext/components/table/index.js +10 -0
- package/lib/esnext/components/table/index.js.map +1 -0
- package/lib/esnext/components/table/reactTableBase.d.ts +2 -0
- package/lib/esnext/components/table/reactTableBase.js +3 -0
- package/lib/esnext/components/table/reactTableBase.js.map +1 -0
- package/lib/esnext/components/table/table.d.ts +123 -0
- package/lib/esnext/components/table/table.js +225 -0
- package/lib/esnext/components/table/table.js.map +1 -0
- package/lib/esnext/components/table/tableMessages.d.ts +6 -0
- package/lib/esnext/components/table/tableMessages.js +6 -0
- package/lib/esnext/components/table/tableMessages.js.map +1 -0
- package/lib/esnext/components/table/theme.d.ts +4 -0
- package/lib/esnext/components/table/theme.js +6 -0
- package/lib/esnext/components/table/theme.js.map +1 -0
- package/lib/esnext/components/table/useAutoColumnSizer.d.ts +7 -0
- package/lib/esnext/components/table/useAutoColumnSizer.js +46 -0
- package/lib/esnext/components/table/useAutoColumnSizer.js.map +1 -0
- package/lib/esnext/components/table/useAutoHeight.d.ts +4 -0
- package/lib/esnext/components/table/useAutoHeight.js +65 -0
- package/lib/esnext/components/table/useAutoHeight.js.map +1 -0
- package/lib/esnext/components/table/useGroupedHeaderColumnSizer.d.ts +2 -0
- package/lib/esnext/components/table/useGroupedHeaderColumnSizer.js +53 -0
- package/lib/esnext/components/table/useGroupedHeaderColumnSizer.js.map +1 -0
- package/lib/esnext/components/table/useTable.d.ts +122 -0
- package/lib/esnext/components/table/useTable.js +28 -0
- package/lib/esnext/components/table/useTable.js.map +1 -0
- package/lib/esnext/components/table/useTableExport.d.ts +6 -0
- package/lib/esnext/components/table/useTableExport.js +37 -0
- package/lib/esnext/components/table/useTableExport.js.map +1 -0
- package/lib/esnext/components/table/useTableState.d.ts +3 -0
- package/lib/esnext/components/table/useTableState.js +11 -0
- package/lib/esnext/components/table/useTableState.js.map +1 -0
- package/lib/esnext/components/table/utils.d.ts +1 -0
- package/lib/esnext/components/table/utils.js +5 -0
- package/lib/esnext/components/table/utils.js.map +1 -0
- package/lib/esnext/index.d.ts +7 -0
- package/lib/esnext/index.js +11 -0
- package/lib/esnext/index.js.map +1 -0
- package/lib/esnext/theme/baseTheme.d.ts +39 -0
- package/lib/esnext/theme/baseTheme.js +44 -0
- package/lib/esnext/theme/baseTheme.js.map +1 -0
- package/lib/esnext/theme/blueprintTheme.d.ts +26 -0
- package/lib/esnext/theme/blueprintTheme.js +96 -0
- package/lib/esnext/theme/blueprintTheme.js.map +1 -0
- package/lib/esnext/theme/index.d.ts +6 -0
- package/lib/esnext/theme/index.js +5 -0
- package/lib/esnext/theme/index.js.map +1 -0
- package/lib/esnext/theme/spacing.d.ts +2 -0
- package/lib/esnext/theme/spacing.js +9 -0
- package/lib/esnext/theme/spacing.js.map +1 -0
- package/lib/esnext/theme/useBlueprintTheme.d.ts +2 -0
- package/lib/esnext/theme/useBlueprintTheme.js +9 -0
- package/lib/esnext/theme/useBlueprintTheme.js.map +1 -0
- package/package.json +5 -5
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/main/web/components/pagination/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface PaginationProps extends React.HTMLAttributes<HTMLUListElement> {
|
|
3
|
+
/** Current selected page. */
|
|
4
|
+
selectedPage: number;
|
|
5
|
+
/** Handler that accepts the newly selected page by the user. */
|
|
6
|
+
onPageChange: (nextPage: number) => void;
|
|
7
|
+
/** True if component should be disabled. */
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
/** The total number of pages. */
|
|
10
|
+
pageCount: number;
|
|
11
|
+
/** The central number of pages to be displayed.
|
|
12
|
+
*
|
|
13
|
+
* @default 5
|
|
14
|
+
*/
|
|
15
|
+
centerPagesDisplayed?: number;
|
|
16
|
+
/** The number of pages to be displayed around the center pages.
|
|
17
|
+
*
|
|
18
|
+
* @default 1
|
|
19
|
+
*/
|
|
20
|
+
marginPagesDisplayed?: number;
|
|
21
|
+
/** The position to place the pagination list.
|
|
22
|
+
*
|
|
23
|
+
* @default "center"
|
|
24
|
+
*/
|
|
25
|
+
position?: PaginationPosition;
|
|
26
|
+
/** The message inside the previous page button.
|
|
27
|
+
*
|
|
28
|
+
* @default "Previous"
|
|
29
|
+
*/
|
|
30
|
+
previousMessage?: React.ReactNode;
|
|
31
|
+
/** The message inside the next page button.
|
|
32
|
+
*
|
|
33
|
+
* @default "Next"
|
|
34
|
+
*/
|
|
35
|
+
nextMessage?: React.ReactNode;
|
|
36
|
+
/** The aria message for the previous page button. */
|
|
37
|
+
'aria-previous-page'?: string;
|
|
38
|
+
/** The aria message for the next page button. */
|
|
39
|
+
'aria-next-page'?: string;
|
|
40
|
+
/** The aria message for the current page button. */
|
|
41
|
+
'aria-current-page'?: string;
|
|
42
|
+
}
|
|
43
|
+
/** Pagination position */
|
|
44
|
+
export type PaginationPosition = 'left' | 'center' | 'right';
|
|
45
|
+
declare const Pagination: React.FC<PaginationProps>;
|
|
46
|
+
export { Pagination };
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { AnchorButton } from '@blueprintjs/core';
|
|
3
|
+
import cx from 'classnames';
|
|
4
|
+
import { Range } from 'immutable';
|
|
5
|
+
import invariant from 'invariant';
|
|
6
|
+
import * as React from 'react';
|
|
7
|
+
import { Classes, DISPLAYNAME_PREFIX } from '../../common';
|
|
8
|
+
const Pagination = React.forwardRef((props, ref) => {
|
|
9
|
+
const { selectedPage, onPageChange, disabled, pageCount, centerPagesDisplayed = 5, marginPagesDisplayed = 1, position = 'center', previousMessage = 'Previous', nextMessage = 'Next', 'aria-previous-page': ariaPreviousPage, 'aria-next-page': ariaNextPage, 'aria-current-page': ariaCurrentPage, ...ulProps } = props;
|
|
10
|
+
invariant(Number.isInteger(selectedPage), 'selectedPage must be an integer');
|
|
11
|
+
invariant(Number.isInteger(pageCount), 'pageCount must be an integer');
|
|
12
|
+
invariant(Number.isInteger(centerPagesDisplayed), 'centerPagesDisplayed must be an integer');
|
|
13
|
+
invariant(Number.isInteger(marginPagesDisplayed), 'marginPagesDisplayed must be an integer');
|
|
14
|
+
const changePage = React.useCallback((page) => () => onPageChange(page), [onPageChange]);
|
|
15
|
+
const buildPage = React.useCallback((page) => {
|
|
16
|
+
return (_jsx("li", { children: _jsx(AnchorButton, { className: Classes.PAGINATION_PAGE, disabled: page !== selectedPage && disabled, minimal: true, onClick: changePage(page), active: page === selectedPage, "aria-label": page === selectedPage
|
|
17
|
+
? (ariaCurrentPage ?? 'Current page')
|
|
18
|
+
: undefined, intent: "primary", children: page + 1 }) }, page));
|
|
19
|
+
}, [selectedPage, disabled, changePage, ariaCurrentPage]);
|
|
20
|
+
if (pageCount === 0) {
|
|
21
|
+
return null;
|
|
22
|
+
}
|
|
23
|
+
const hasPrevious = selectedPage > 0;
|
|
24
|
+
const hasNext = selectedPage < pageCount - 1;
|
|
25
|
+
const halfRange = Math.floor(centerPagesDisplayed / 2);
|
|
26
|
+
const pageRange = Range(0, pageCount)
|
|
27
|
+
.skip(Math.min(selectedPage - halfRange, pageCount - centerPagesDisplayed))
|
|
28
|
+
.take(centerPagesDisplayed);
|
|
29
|
+
const pages = pageRange.map(buildPage);
|
|
30
|
+
const leftMargin = pageRange.first(0) > marginPagesDisplayed - 1
|
|
31
|
+
? Range(0, marginPagesDisplayed).map(buildPage)
|
|
32
|
+
: null;
|
|
33
|
+
const leftBreak = pageRange.first(0) < marginPagesDisplayed + 1 ? null : (_jsx("li", { children: _jsx(AnchorButton, { className: Classes.PAGINATION_PAGE, disabled: disabled, onClick: changePage(Math.max(0, selectedPage - centerPagesDisplayed)), minimal: true, children: "..." }) }));
|
|
34
|
+
const rightMargin = pageRange.last(pageCount - 1) < pageCount - marginPagesDisplayed
|
|
35
|
+
? Range(pageCount - marginPagesDisplayed, pageCount).map(buildPage)
|
|
36
|
+
: null;
|
|
37
|
+
const rightBreak = pageRange.last(pageCount - 1) > pageCount - marginPagesDisplayed - 2 ? null : (_jsx("li", { children: _jsx(AnchorButton, { className: Classes.PAGINATION_PAGE, disabled: disabled, onClick: changePage(Math.min(pageCount - 1, selectedPage + centerPagesDisplayed)), minimal: true, children: "..." }) }));
|
|
38
|
+
return (_jsxs("ul", { ref: ref, ...ulProps, className: cx(Classes.PAGINATION, props.className, position), children: [_jsx("li", { children: _jsx(AnchorButton, { className: Classes.PAGINATION_BUTTON, disabled: disabled || !hasPrevious, onClick: changePage(selectedPage - 1), icon: "caret-left", minimal: true, "aria-label": ariaPreviousPage ?? 'Previous page', children: previousMessage }) }), leftMargin, leftBreak, pages, rightBreak, rightMargin, _jsx("li", { children: _jsx(AnchorButton, { className: Classes.PAGINATION_BUTTON, disabled: disabled || !hasNext, onClick: changePage(selectedPage + 1), rightIcon: "caret-right", minimal: true, "aria-label": ariaNextPage ?? 'Next page', children: nextMessage }) })] }));
|
|
39
|
+
});
|
|
40
|
+
Pagination.displayName = `${DISPLAYNAME_PREFIX}.Pagination`;
|
|
41
|
+
export { Pagination };
|
|
42
|
+
//# sourceMappingURL=pagination.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pagination.js","sourceRoot":"","sources":["../../../../src/main/web/components/pagination/pagination.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,MAAM,YAAY,CAAC;AAC5B,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAClC,OAAO,SAAS,MAAM,WAAW,CAAC;AAClC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AA0D3D,MAAM,UAAU,GAA8B,KAAK,CAAC,UAAU,CAC1D,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;IACX,MAAM,EACF,YAAY,EACZ,YAAY,EACZ,QAAQ,EACR,SAAS,EACT,oBAAoB,GAAG,CAAC,EACxB,oBAAoB,GAAG,CAAC,EACxB,QAAQ,GAAG,QAAQ,EACnB,eAAe,GAAG,UAAU,EAC5B,WAAW,GAAG,MAAM,EACpB,oBAAoB,EAAE,gBAAgB,EACtC,gBAAgB,EAAE,YAAY,EAC9B,mBAAmB,EAAE,eAAe,EACpC,GAAG,OAAO,EACb,GAAG,KAAK,CAAC;IAEV,SAAS,CAAC,MAAM,CAAC,SAAS,CAAC,YAAY,CAAC,EAAE,iCAAiC,CAAC,CAAC;IAC7E,SAAS,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S,EAAE,OAAO,CAAC,eAAe,EAClC,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,UAAU,CACf,IAAI,CAAC,GAAG,CAAC,SAAS,GAAG,CAAC,EAAE,YAAY,GAAG,oBAAqB,CAAC,CAChE,EACD,OAAO,EAAE,IAAI,oBAEF,GACd,CACR,CAAC;IAEN,OAAO,CACH,cACI,GAAG,EAAE,GAAG,KACJ,OAAO,EACX,SAAS,EAAE,EAAE,CAAC,OAAO,CAAC,UAAU,EAAE,KAAK,CAAC,SAAS,EAAE,QAAQ,CAAC,aAC5D,uBACI,KAAC,YAAY,IACT,SAAS,EAAE,OAAO,CAAC,iBAAiB,EACpC,QAAQ,EAAE,QAAQ,IAAI,CAAC,WAAW,EAClC,OAAO,EAAE,UAAU,CAAC,YAAY,GAAG,CAAC,CAAC,EACrC,IAAI,EAAC,YAAY,EACjB,OAAO,EAAE,IAAI,gBACD,gBAAgB,IAAI,eAAe,YAC9C,eAAe,GACL,GACd,EACJ,UAAU,EACV,SAAS,EACT,KAAK,EACL,UAAU,EACV,WAAW,EACZ,uBACI,KAAC,YAAY,IACT,SAAS,EAAE,OAAO,CAAC,iBAAiB,EACpC,QAAQ,EAAE,QAAQ,IAAI,CAAC,OAAO,EAC9B,OAAO,EAAE,UAAU,CAAC,YAAY,GAAG,CAAC,CAAC,EACrC,SAAS,EAAC,aAAa,EACvB,OAAO,EAAE,IAAI,gBACD,YAAY,IAAI,WAAW,YACtC,WAAW,GACD,GACd,IACJ,CACR,CAAC;AACN,CAAC,CACJ,CAAC;AAEF,UAAU,CAAC,WAAW,GAAG,GAAG,kBAAkB,aAAa,CAAC;AAE5D,OAAO,EAAE,UAAU,EAAE,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { Column, Table } from './reactTableBase';
|
|
3
|
+
export interface ColumnFilterProps<TData, TValue = unknown> {
|
|
4
|
+
table: Table<TData>;
|
|
5
|
+
column: Column<TData, TValue>;
|
|
6
|
+
}
|
|
7
|
+
export declare const ColumnFilter: <TData, TValue>(props: ColumnFilterProps<TData, TValue>) => React.ReactElement;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { InputGroup, NumericInput } from '@blueprintjs/core';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
export const ColumnFilter = function ColumnFilter(props) {
|
|
5
|
+
const definition = props.column.columnDef;
|
|
6
|
+
const value = props.column.getFilterValue();
|
|
7
|
+
const setFilterValue = props.column.setFilterValue;
|
|
8
|
+
const handleStringChange = React.useCallback((event) => setFilterValue(event.currentTarget.value), [setFilterValue]);
|
|
9
|
+
const handleNumberChange = React.useCallback((number) => setFilterValue([number]), [setFilterValue]);
|
|
10
|
+
const flatRows = props.table.getPreFilteredRowModel().flatRows;
|
|
11
|
+
const valueType = React.useMemo(() => typeof flatRows
|
|
12
|
+
.slice(0, 5)
|
|
13
|
+
.map((row) => row.getValue(props.column.id))
|
|
14
|
+
.filter((x) => x != null)[0], [props.column.id, flatRows]);
|
|
15
|
+
const numberValue = valueType === 'number' && value != null ? value[0] : undefined;
|
|
16
|
+
return definition.filter != null ? (_jsx(_Fragment, { children: definition.filter(props) })) : valueType === 'number' ? (_jsx(NumericInput, { asyncControl: true, value: value != null ? numberValue : undefined, onValueChange: handleNumberChange })) : (_jsx(InputGroup, { value: value, onChange: handleStringChange }));
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=columnFilter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"columnFilter.js","sourceRoot":"","sources":["../../../../src/main/web/components/table/columnFilter.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,KAAK,MAAM,OAAO,CAAC;AAW1B,MAAM,CAAC,MAAM,YAAY,GAAG,SAAS,YAAY,CAC7C,KAAuC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CAAC,KAAK,CAAC,GAAI,CAClC,CAAC,CAAC,CAAC,SAAS,KAAK,QAAQ,CAAC,CAAC,CAAC,CACzB,KAAC,YAAY,IACT,YAAY,EAAE,IAAI,EAClB,KAAK,EAAE,KAAK,IAAI,IAAI,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,EAC9C,aAAa,EAAE,kBAAkB,GACnC,CACL,CAAC,CAAC,CAAC,CACA,KAAC,UAAU,IAAC,KAAK,EAAE,KAAe,EAAE,QAAQ,EAAE,kBAAkB,GAAI,CACvE,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -0,0 +1,340 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type AccessorFn, type AggregationFnOption, type Column, type ColumnDef, type ColumnPinningPosition, type DeepKeys, type DeepValue, type FilterFnOption, type Getter, type Row, type RowData, type SortingFnOption, type StringHeaderIdentifier, type StringOrTemplateHeader, type Table } from './reactTableBase';
|
|
3
|
+
export interface ColumnHelper<TData> {
|
|
4
|
+
accessor: <TAccessor extends AccessorFn<TData> | DeepKeys<TData>, TValue extends (TAccessor extends AccessorFn<TData, infer TReturn> ? TReturn : TAccessor extends DeepKeys<TData> ? DeepValue<TData, TAccessor> : never)>(accessor: TAccessor, column: TAccessor extends AccessorFn<TData> ? DisplayColumnDef<TData, TValue> : IdentifiedColumnDef<TData, TValue>) => ColumnDef<TData, TValue>;
|
|
5
|
+
display: (column: DisplayColumnDef<TData>) => ColumnDef<TData, unknown>;
|
|
6
|
+
group: (column: GroupColumnDef<TData>) => ColumnDef<TData, unknown>;
|
|
7
|
+
expansion: <TAccessor extends AccessorFn<TData> | DeepKeys<TData>, TValue extends (TAccessor extends AccessorFn<TData, infer TReturn> ? TReturn : TAccessor extends DeepKeys<TData> ? DeepValue<TData, TAccessor> : never)>(accessor: TAccessor, column: ExpansionColumnDef<TData, TValue>) => ColumnDef<TData, TValue>;
|
|
8
|
+
selection: (column?: SelectionColumnDef<TData>) => ColumnDef<TData, unknown>;
|
|
9
|
+
}
|
|
10
|
+
export type ColumnDefTemplate<TProps extends object> = string | ((props: TProps) => React.ReactNode);
|
|
11
|
+
export interface CellContext<TData extends RowData, TValue> {
|
|
12
|
+
cell: Cell<TData, TValue>;
|
|
13
|
+
column: Column<TData, TValue>;
|
|
14
|
+
getValue: Getter<TValue>;
|
|
15
|
+
renderValue: Getter<TValue | null>;
|
|
16
|
+
row: Row<TData>;
|
|
17
|
+
table: Table<TData>;
|
|
18
|
+
}
|
|
19
|
+
export interface CoreCell<TData extends RowData, TValue> {
|
|
20
|
+
/**
|
|
21
|
+
* The associated Column object for the cell.
|
|
22
|
+
*/
|
|
23
|
+
column: Column<TData, TValue>;
|
|
24
|
+
/**
|
|
25
|
+
* Returns the rendering context (or props) for cell-based components like cells and aggregated cells. Use these props with your framework's `flexRender` utility to render these using the template of your choice:
|
|
26
|
+
*/
|
|
27
|
+
getContext: () => CellContext<TData, TValue>;
|
|
28
|
+
/**
|
|
29
|
+
* Returns the value for the cell, accessed via the associated column's accessor key or accessor function.
|
|
30
|
+
*/
|
|
31
|
+
getValue: CellContext<TData, TValue>['getValue'];
|
|
32
|
+
/**
|
|
33
|
+
* The unique ID for the cell across the entire table.
|
|
34
|
+
*/
|
|
35
|
+
id: string;
|
|
36
|
+
/**
|
|
37
|
+
* Renders the value for a cell the same as `getValue`, but will return the `renderFallbackValue` if no value is found.
|
|
38
|
+
*/
|
|
39
|
+
renderValue: CellContext<TData, TValue>['renderValue'];
|
|
40
|
+
/**
|
|
41
|
+
* The associated Row object for the cell.
|
|
42
|
+
*/
|
|
43
|
+
row: Row<TData>;
|
|
44
|
+
}
|
|
45
|
+
export interface Cell<TData extends RowData, TValue> extends CoreCell<TData, TValue>, GroupingCell {
|
|
46
|
+
}
|
|
47
|
+
export type GroupColumnDef<TData extends RowData, TValue = unknown> = GroupColumnDefBase<TData, TValue> & ColumnIdentifiers<TData, TValue>;
|
|
48
|
+
export interface GroupColumnDefBase<TData extends RowData, TValue = unknown> extends ColumnDefBase<TData, TValue> {
|
|
49
|
+
/**
|
|
50
|
+
* The children columns of this group.
|
|
51
|
+
*/
|
|
52
|
+
columns: Array<ColumnDef<TData, any>>;
|
|
53
|
+
}
|
|
54
|
+
export interface GroupingCell {
|
|
55
|
+
/**
|
|
56
|
+
* Returns whether or not the cell is currently aggregated.
|
|
57
|
+
*/
|
|
58
|
+
getIsAggregated: () => boolean;
|
|
59
|
+
/**
|
|
60
|
+
* Returns whether or not the cell is currently grouped.
|
|
61
|
+
*/
|
|
62
|
+
getIsGrouped: () => boolean;
|
|
63
|
+
/**
|
|
64
|
+
* Returns whether or not the cell is currently a placeholder cell.
|
|
65
|
+
*/
|
|
66
|
+
getIsPlaceholder: () => boolean;
|
|
67
|
+
}
|
|
68
|
+
export interface HeaderContext<TData, TValue> {
|
|
69
|
+
/**
|
|
70
|
+
* An instance of a column.
|
|
71
|
+
*/
|
|
72
|
+
column: Column<TData, TValue>;
|
|
73
|
+
/**
|
|
74
|
+
* An instance of a header.
|
|
75
|
+
*/
|
|
76
|
+
header: Header<TData, TValue>;
|
|
77
|
+
/**
|
|
78
|
+
* The table instance.
|
|
79
|
+
*/
|
|
80
|
+
table: Table<TData>;
|
|
81
|
+
}
|
|
82
|
+
export interface Header<TData extends RowData, TValue> extends CoreHeader<TData, TValue>, ColumnSizingHeader {
|
|
83
|
+
}
|
|
84
|
+
export type HeaderGroup<TData extends RowData> = CoreHeaderGroup<TData>;
|
|
85
|
+
export interface CoreHeaderGroup<TData extends RowData> {
|
|
86
|
+
depth: number;
|
|
87
|
+
headers: Array<Header<TData, unknown>>;
|
|
88
|
+
id: string;
|
|
89
|
+
}
|
|
90
|
+
export interface CoreHeader<TData extends RowData, TValue> {
|
|
91
|
+
/**
|
|
92
|
+
* The col-span for the header.
|
|
93
|
+
*/
|
|
94
|
+
colSpan: number;
|
|
95
|
+
/**
|
|
96
|
+
* The header's associated column object.
|
|
97
|
+
*/
|
|
98
|
+
column: Column<TData, TValue>;
|
|
99
|
+
/**
|
|
100
|
+
* The depth of the header, zero-indexed based.
|
|
101
|
+
*/
|
|
102
|
+
depth: number;
|
|
103
|
+
/**
|
|
104
|
+
* Returns the rendering context (or props) for column-based components like headers, footers and filters.
|
|
105
|
+
*/
|
|
106
|
+
getContext: () => HeaderContext<TData, TValue>;
|
|
107
|
+
/**
|
|
108
|
+
* Returns the leaf headers hierarchically nested under this header.
|
|
109
|
+
*/
|
|
110
|
+
getLeafHeaders: () => Array<Header<TData, unknown>>;
|
|
111
|
+
/**
|
|
112
|
+
* The header's associated header group object.
|
|
113
|
+
*/
|
|
114
|
+
headerGroup: HeaderGroup<TData>;
|
|
115
|
+
/**
|
|
116
|
+
* The unique identifier for the header.
|
|
117
|
+
*/
|
|
118
|
+
id: string;
|
|
119
|
+
/**
|
|
120
|
+
* The index for the header within the header group.
|
|
121
|
+
*/
|
|
122
|
+
index: number;
|
|
123
|
+
/**
|
|
124
|
+
* A boolean denoting if the header is a placeholder header.
|
|
125
|
+
*/
|
|
126
|
+
isPlaceholder: boolean;
|
|
127
|
+
/**
|
|
128
|
+
* If the header is a placeholder header, this will be a unique header ID that does not conflict with any other headers across the table.
|
|
129
|
+
*/
|
|
130
|
+
placeholderId?: string;
|
|
131
|
+
/**
|
|
132
|
+
* The row-span for the header.
|
|
133
|
+
*/
|
|
134
|
+
rowSpan: number;
|
|
135
|
+
/**
|
|
136
|
+
* The header's hierarchical sub/child headers. Will be empty if the header's associated column is a leaf-column.
|
|
137
|
+
*/
|
|
138
|
+
subHeaders: Array<Header<TData, TValue>>;
|
|
139
|
+
}
|
|
140
|
+
export interface Header<TData extends RowData, TValue> extends CoreHeader<TData, TValue>, ColumnSizingHeader {
|
|
141
|
+
}
|
|
142
|
+
export interface ColumnSizingHeader {
|
|
143
|
+
/**
|
|
144
|
+
* Returns an event handler function that can be used to resize the header. It can be used as an:
|
|
145
|
+
* - `onMouseDown` handler
|
|
146
|
+
* - `onTouchStart` handler
|
|
147
|
+
*
|
|
148
|
+
* The dragging and release events are automatically handled for you.
|
|
149
|
+
*/
|
|
150
|
+
getResizeHandler: (context?: Document) => (event: unknown) => void;
|
|
151
|
+
/**
|
|
152
|
+
* Returns the current size of the header.
|
|
153
|
+
*/
|
|
154
|
+
getSize: () => number;
|
|
155
|
+
/**
|
|
156
|
+
* Returns the offset measurement along the row-axis (usually the x-axis for standard tables) for the header. This is effectively a sum of the offset measurements of all preceding headers.
|
|
157
|
+
*/
|
|
158
|
+
getStart: (position?: ColumnPinningPosition) => number;
|
|
159
|
+
}
|
|
160
|
+
interface ColumnDefExtensions<TData extends RowData, TValue = unknown> extends VisibilityColumnDef, ColumnPinningColumnDef, FiltersColumnDef<TData>, SortingColumnDef<TData>, GroupingColumnDef<TData, TValue>, ColumnSizingColumnDef {
|
|
161
|
+
}
|
|
162
|
+
export interface ColumnSizingColumnDef {
|
|
163
|
+
/**
|
|
164
|
+
* Enables or disables column resizing for the column.
|
|
165
|
+
*/
|
|
166
|
+
enableResizing?: boolean;
|
|
167
|
+
/**
|
|
168
|
+
* The maximum allowed size for the column
|
|
169
|
+
*/
|
|
170
|
+
maxSize?: number;
|
|
171
|
+
/**
|
|
172
|
+
* The minimum allowed size for the column
|
|
173
|
+
*/
|
|
174
|
+
minSize?: number;
|
|
175
|
+
/**
|
|
176
|
+
* The desired size for the column
|
|
177
|
+
*/
|
|
178
|
+
size?: number;
|
|
179
|
+
}
|
|
180
|
+
export declare const SELECTION_ID = "_selection";
|
|
181
|
+
export interface GroupingColumnDef<TData extends RowData, TValue> {
|
|
182
|
+
/**
|
|
183
|
+
* The cell to display each row for the column if the cell is an aggregate. If a function is passed, it will be passed a props object with the context of the cell and should return the property type for your adapter (the exact type depends on the adapter being used).
|
|
184
|
+
*/
|
|
185
|
+
aggregatedCell?: ColumnDefTemplate<ReturnType<Cell<TData, TValue>['getContext']>>;
|
|
186
|
+
/**
|
|
187
|
+
* The resolved aggregation function for the column.
|
|
188
|
+
*/
|
|
189
|
+
aggregationFn?: AggregationFnOption<TData>;
|
|
190
|
+
/**
|
|
191
|
+
* Enables/disables grouping for this column.
|
|
192
|
+
*/
|
|
193
|
+
enableGrouping?: boolean;
|
|
194
|
+
/**
|
|
195
|
+
* Specify a value to be used for grouping rows on this column. If this option is not specified, the value derived from `accessorKey` / `accessorFn` will be used instead.
|
|
196
|
+
*/
|
|
197
|
+
getGroupingValue?: (row: TData) => any;
|
|
198
|
+
}
|
|
199
|
+
export interface SortingColumnDef<TData extends RowData> {
|
|
200
|
+
/**
|
|
201
|
+
* Enables/Disables multi-sorting for this column.
|
|
202
|
+
*/
|
|
203
|
+
enableMultiSort?: boolean;
|
|
204
|
+
/**
|
|
205
|
+
* Enables/Disables sorting for this column.
|
|
206
|
+
*/
|
|
207
|
+
enableSorting?: boolean;
|
|
208
|
+
/**
|
|
209
|
+
* Inverts the order of the sorting for this column. This is useful for values that have an inverted best/worst scale where lower numbers are better, eg. a ranking (1st, 2nd, 3rd) or golf-like scoring
|
|
210
|
+
*/
|
|
211
|
+
invertSorting?: boolean;
|
|
212
|
+
/**
|
|
213
|
+
* Set to `true` for sorting toggles on this column to start in the descending direction.
|
|
214
|
+
*/
|
|
215
|
+
sortDescFirst?: boolean;
|
|
216
|
+
/**
|
|
217
|
+
* The sorting function to use with this column.
|
|
218
|
+
* - A `string` referencing a built-in sorting function
|
|
219
|
+
* - A custom sorting function
|
|
220
|
+
*/
|
|
221
|
+
sortingFn?: SortingFnOption<TData>;
|
|
222
|
+
/**
|
|
223
|
+
* - `false`
|
|
224
|
+
* - Undefined values will be considered tied and need to be sorted by the next column filter or original index (whichever applies)
|
|
225
|
+
* - `-1`
|
|
226
|
+
* - Undefined values will be sorted with higher priority (ascending) (if ascending, undefined will appear on the beginning of the list)
|
|
227
|
+
* - `1`
|
|
228
|
+
* - Undefined values will be sorted with lower priority (descending) (if ascending, undefined will appear on the end of the list)
|
|
229
|
+
*/
|
|
230
|
+
sortUndefined?: false | -1 | 1;
|
|
231
|
+
}
|
|
232
|
+
export interface FiltersColumnDef<TData extends RowData> {
|
|
233
|
+
/**
|
|
234
|
+
* The filter function to use with this column. Can be the name of a built-in filter function or a custom filter function.
|
|
235
|
+
*/
|
|
236
|
+
filterFn?: FilterFnOption<TData>;
|
|
237
|
+
/**
|
|
238
|
+
* Enables/disables the **column** filter for this column.
|
|
239
|
+
*/
|
|
240
|
+
enableColumnFilter?: boolean;
|
|
241
|
+
/**
|
|
242
|
+
* Enables/disables the **global** filter for this column.
|
|
243
|
+
*/
|
|
244
|
+
enableGlobalFilter?: boolean;
|
|
245
|
+
}
|
|
246
|
+
export interface ColumnPinningColumnDef {
|
|
247
|
+
/**
|
|
248
|
+
* Enables/disables column pinning for this column. Defaults to `true`.
|
|
249
|
+
*/
|
|
250
|
+
enablePinning?: boolean;
|
|
251
|
+
}
|
|
252
|
+
export interface VisibilityColumnDef {
|
|
253
|
+
enableHiding?: boolean;
|
|
254
|
+
}
|
|
255
|
+
export interface ColumnFilterProps<TData, TValue> {
|
|
256
|
+
column: Column<TData, TValue>;
|
|
257
|
+
table: Table<TData>;
|
|
258
|
+
}
|
|
259
|
+
export interface ColumnDefBase<TData, TValue> extends ColumnDefExtensions<TData, TValue> {
|
|
260
|
+
getUniqueValues?: AccessorFn<TData, unknown[]>;
|
|
261
|
+
footer?: ColumnDefTemplate<HeaderContext<TData, TValue>>;
|
|
262
|
+
cell?: ColumnDefTemplate<CellContext<TData, TValue>>;
|
|
263
|
+
filter?: (props: ColumnFilterProps<TData, TValue>) => React.ReactNode;
|
|
264
|
+
/**
|
|
265
|
+
* When defined, the callback can return an optional class name that will be added to the specific cell.
|
|
266
|
+
*/
|
|
267
|
+
getClassName?: (content: CellContext<TData, TValue>) => string | null | undefined;
|
|
268
|
+
/**
|
|
269
|
+
* Set to `true` to skip row click when the cell is clicked.
|
|
270
|
+
*
|
|
271
|
+
* @default false
|
|
272
|
+
*/
|
|
273
|
+
skipRowClick?: boolean;
|
|
274
|
+
}
|
|
275
|
+
export interface DisplayColumnDef<TData, TValue = unknown> extends ColumnDefBase<TData, TValue>, IdIdentifier<TData, TValue> {
|
|
276
|
+
}
|
|
277
|
+
export interface ExpansionColumnDef<TData, TValue = unknown> extends DisplayColumnDef<TData, TValue> {
|
|
278
|
+
/**
|
|
279
|
+
* When row depth is not 0 and not expandable, a left padding is added to the cell for alignment with
|
|
280
|
+
* parent row.
|
|
281
|
+
*
|
|
282
|
+
* @default false
|
|
283
|
+
*/
|
|
284
|
+
alwaysIncludeDepthPadding?: boolean;
|
|
285
|
+
}
|
|
286
|
+
export interface IdentifiedColumnDef<TData, TValue = unknown> extends ColumnDefBase<TData, TValue> {
|
|
287
|
+
id?: string;
|
|
288
|
+
header?: StringOrTemplateHeader<TData, TValue>;
|
|
289
|
+
}
|
|
290
|
+
type ColumnIdentifiers<TData extends RowData, TValue> = IdIdentifier<TData, TValue> | StringHeaderIdentifier;
|
|
291
|
+
export interface IdIdentifier<TData extends RowData, TValue> {
|
|
292
|
+
id: string;
|
|
293
|
+
header?: StringOrTemplateHeader<TData, TValue>;
|
|
294
|
+
}
|
|
295
|
+
export type SelectionColumnDef<TData> = Omit<DisplayColumnDef<TData>, 'id' | 'cell' | 'header'>;
|
|
296
|
+
/**
|
|
297
|
+
* Configuration for the table’s column utility popover (export/visibility/reorder/search).
|
|
298
|
+
*/
|
|
299
|
+
export type ColumnUtilityProps = {
|
|
300
|
+
/**
|
|
301
|
+
* Show the **Export** actions inside the utility panel.
|
|
302
|
+
* Use when users should be able to export the current table view (CSV/XLSX/etc).
|
|
303
|
+
*
|
|
304
|
+
* @default false
|
|
305
|
+
*/
|
|
306
|
+
showExport?: boolean;
|
|
307
|
+
/**
|
|
308
|
+
* Show the **Column Visibility** manager to show/hide columns.
|
|
309
|
+
* When enabled, users can toggle column visibility via checkboxes.
|
|
310
|
+
*
|
|
311
|
+
* @default true
|
|
312
|
+
*/
|
|
313
|
+
showColumnVisibility?: boolean;
|
|
314
|
+
/**
|
|
315
|
+
* Allow **Column Reorder** in the manager (drag to rearrange).
|
|
316
|
+
* When disabled, the list is static and drag handles are hidden.
|
|
317
|
+
*
|
|
318
|
+
* @default true
|
|
319
|
+
*/
|
|
320
|
+
canColumnReorder?: boolean;
|
|
321
|
+
/**
|
|
322
|
+
* Enable **Search** within the column list (filters by header/ID).
|
|
323
|
+
* Helpful for wide tables with many columns.
|
|
324
|
+
*
|
|
325
|
+
* @default true
|
|
326
|
+
*/
|
|
327
|
+
canColumnSearch?: boolean;
|
|
328
|
+
/**
|
|
329
|
+
* If true, the Column Utility shows each column's **id** as the label.
|
|
330
|
+
* If false (default), it tries to show the column's header text.
|
|
331
|
+
*
|
|
332
|
+
* Useful when headers are complex React nodes or localized at render-time,
|
|
333
|
+
* and you prefer a stable technical label in the manager.
|
|
334
|
+
*
|
|
335
|
+
* @default false
|
|
336
|
+
*/
|
|
337
|
+
useIdAsLabel?: boolean;
|
|
338
|
+
};
|
|
339
|
+
export declare function createColumnHelper<TData>(): ColumnHelper<TData>;
|
|
340
|
+
export {};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Checkbox, Colors } from '@blueprintjs/core';
|
|
3
|
+
import { CaretDown, CaretRight } from '@blueprintjs/icons';
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import { Classes } from '../../common';
|
|
6
|
+
import { createColumnHelper as createColumnHelperBase } from './reactTableBase';
|
|
7
|
+
export const SELECTION_ID = '_selection';
|
|
8
|
+
export function createColumnHelper() {
|
|
9
|
+
const base = createColumnHelperBase();
|
|
10
|
+
return {
|
|
11
|
+
...base,
|
|
12
|
+
expansion(accessor, column) {
|
|
13
|
+
return base.accessor(accessor, {
|
|
14
|
+
...column,
|
|
15
|
+
cell: (props) => (_jsxs("span", { className: Classes.REACT_TABLE_ROW_EXPANDER_WRAPPER, style: { paddingLeft: props.row.depth * 25 }, children: [props.row.getCanExpand() ? (_jsx("span", { className: Classes.REACT_TABLE_ROW_EXPANDER, onClick: props.row.getToggleExpandedHandler(), "data-skip-row-click": true, children: props.row.getIsExpanded() ? (_jsx(CaretDown, { size: 18, color: Colors.BLUE1 })) : (_jsx(CaretRight, { size: 18, color: Colors.BLUE1 })) })) : column.alwaysIncludeDepthPadding ? (_jsx("span", { style: { paddingLeft: 25 } })) : null, _jsx("span", { children: typeof column.cell === 'string'
|
|
16
|
+
? column.cell
|
|
17
|
+
: typeof column.cell === 'function'
|
|
18
|
+
? column.cell(props)
|
|
19
|
+
: props.renderValue() })] }))
|
|
20
|
+
}); // eslint-disable-line @typescript-eslint/no-explicit-any
|
|
21
|
+
},
|
|
22
|
+
selection(column) {
|
|
23
|
+
return {
|
|
24
|
+
...column,
|
|
25
|
+
cell: ({ row }) => (_jsx(Checkbox, { className: Classes.REACT_TABLE_SELECTION, checked: row.getIsSelected(), disabled: !row.getCanSelect(), indeterminate: row.getIsSomeSelected(), onChange: row.getToggleSelectedHandler() })),
|
|
26
|
+
enableResizing: false,
|
|
27
|
+
enableSorting: false,
|
|
28
|
+
header: ({ table }) => (_jsx(Checkbox, { className: Classes.REACT_TABLE_SELECTION, checked: table.getIsAllRowsSelected(), disabled: table.options.enableRowSelection === false, indeterminate: table.getIsSomeRowsSelected(), onChange: table.getToggleAllRowsSelectedHandler() })),
|
|
29
|
+
id: SELECTION_ID,
|
|
30
|
+
size: 20,
|
|
31
|
+
skipRowClick: true
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=columnHelpers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"columnHelpers.js","sourceRoot":"","sources":["../../../../src/main/web/components/table/columnHelpers.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,KAAK,MAAM,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,CAAC,IAAI;gCACb,CAAC,CAAC,OAAO,MAAM,CAAC,IAAI,KAAK,UAAU;oCACjC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC;oCACpB,CAAC,CAAC,KAAK,CAAC,WAAW,EAAE,GACxB,IACJ,CACV;aAC4B,CAAC,CAAC,CAAC,yDAAyD;QACjG,CAAC;QACD,SAAS,CAAC,MAAM;YACZ,OAAO;gBACH,GAAG,MAAM;gBACT,IAAI,EAAE,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC,CACf,KAAC,QAAQ,IACL,SAAS,EAAE,OAAO,CAAC,qBAAqB,EACxC,OAAO,EAAE,GAAG,CAAC,aAAa,EAAE,EAC5B,QAAQ,EAAE,CAAC,GAAG,CAAC,YAAY,EAAE,EAC7B,aAAa,EAAE,GAAG,CAAC,iBAAiB,EAAE,EACtC,QAAQ,EAAE,GAAG,CAAC,wBAAwB,EAAE,GAC1C,CACL;gBACD,cAAc,EAAE,KAAK;gBACrB,aAAa,EAAE,KAAK;gBACpB,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CACnB,KAAC,QAAQ,IACL,SAAS,EAAE,OAAO,CAAC,qBAAqB,EACxC,OAAO,EAAE,KAAK,CAAC,oBAAoB,EAAE,EACrC,QAAQ,EAAE,KAAK,CAAC,OAAO,CAAC,kBAAkB,KAAK,KAAK,EACpD,aAAa,EAAE,KAAK,CAAC,qBAAqB,EAAE,EAC5C,QAAQ,EAAE,KAAK,CAAC,+BAA+B,EAAE,GACnD,CACL;gBACD,EAAE,EAAE,YAAY;gBAChB,IAAI,EAAE,EAAE;gBACR,YAAY,EAAE,IAAI;aACrB,CAAC;QACN,CAAC;KACJ,CAAC;AACN,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type HeaderGroup, type Table } from './reactTableBase';
|
|
3
|
+
interface HeaderGroupProps<TData = unknown> {
|
|
4
|
+
table: Table<TData>;
|
|
5
|
+
headerGroup: HeaderGroup<TData>;
|
|
6
|
+
}
|
|
7
|
+
export declare const HeaderGroupWrapper: React.FC<HeaderGroupProps>;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { SortAsc, SortDesc } from '@blueprintjs/icons';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { Classes } from '../../common';
|
|
5
|
+
import { ColumnFilter } from './columnFilter';
|
|
6
|
+
import { flexRender } from './reactTableBase';
|
|
7
|
+
const LEAF_MIN_TOTAL_WIDTH_PX = 41; // expected total leaf width incl. padding + border
|
|
8
|
+
const COLUMN_BORDER_PX = 1;
|
|
9
|
+
const stopPropagation = (e) => e.stopPropagation();
|
|
10
|
+
const getHeaderMinWidth = (header) => {
|
|
11
|
+
if (header.isPlaceholder)
|
|
12
|
+
return 0;
|
|
13
|
+
if (header.subHeaders != null && header.subHeaders.length > 0) {
|
|
14
|
+
const childrenMin = header.subHeaders.reduce((sum, subHeader) => sum + getHeaderMinWidth(subHeader), 0);
|
|
15
|
+
return childrenMin + COLUMN_BORDER_PX;
|
|
16
|
+
}
|
|
17
|
+
return header.column.columnDef.minSize ?? LEAF_MIN_TOTAL_WIDTH_PX;
|
|
18
|
+
};
|
|
19
|
+
export const HeaderGroupWrapper = function HeaderGroup(props) {
|
|
20
|
+
return (_jsx("div", { className: Classes.REACT_TABLE_ROW, children: props.headerGroup.headers.map((header) => header.isPlaceholder ? (_jsx("div", { className: Classes.REACT_TABLE_HEAD_CELL, style: { width: `calc(var(--header-${header?.id}-size) * 1px)` } }, header.id)) : (_jsxs("div", { className: Classes.REACT_TABLE_HEAD_CELL, "data-sortable": header.column.getCanSort(), "data-has-filter": header.column.getCanFilter(), style: {
|
|
21
|
+
display: 'grid',
|
|
22
|
+
gridTemplateRows: header.column.getCanFilter() ? 'auto auto' : 'auto',
|
|
23
|
+
justifyContent: header.subHeaders && header.subHeaders.length > 0
|
|
24
|
+
? 'center'
|
|
25
|
+
: undefined,
|
|
26
|
+
minWidth: `${getHeaderMinWidth(header)}px`,
|
|
27
|
+
rowGap: 4,
|
|
28
|
+
textAlign: header.subHeaders && header.subHeaders.length > 0
|
|
29
|
+
? 'center'
|
|
30
|
+
: 'left',
|
|
31
|
+
width: `calc(var(--header-${header?.id}-size) * 1px)`
|
|
32
|
+
}, onClick: header.column.getToggleSortingHandler(), children: [_jsxs("div", { className: Classes.REACT_TABLE_HEAD_CELL_CONTENT, style: { display: 'flex', gap: 4 }, children: [_jsx("span", { className: Classes.REACT_TABLE_HEAD_CELL_CONTENT_LABEL, "data-ellipsize": "false", children: flexRender(header.column.columnDef.header, header.getContext()) }), header.column.getCanSort() && (_jsx("span", { className: Classes.REACT_TABLE_SORTING, children: {
|
|
33
|
+
asc: _jsx(SortAsc, { size: 16 }),
|
|
34
|
+
desc: _jsx(SortDesc, { size: 16 })
|
|
35
|
+
}[header.column.getIsSorted()] ?? null }))] }), header.column.getCanResize() && (_jsx("div", { onDoubleClick: () => header.column.resetSize(), onClick: stopPropagation, onMouseDown: header.getResizeHandler(), onTouchStart: header.getResizeHandler(), className: Classes.REACT_TABLE_RESIZER, "data-resizing": header.column.getIsResizing() })), header.column.getCanFilter() && (_jsx("div", { className: Classes.REACT_TABLE_HEAD_FILTER, "data-can-resize": header.column.getCanResize(), onClick: stopPropagation, style: {
|
|
36
|
+
width: `calc(var(--header-${header.id}-size) * 1px - 20px)`
|
|
37
|
+
}, children: _jsx(ColumnFilter, { table: props.table, column: header.column }) }))] }, header.id))) }));
|
|
38
|
+
};
|
|
39
|
+
//# sourceMappingURL=headerGroup.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"headerGroup.js","sourceRoot":"","sources":["../../../../src/main/web/components/table/headerGroup.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB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IAAC,IAAI,EAAE,EAAE,GAAI;gCAC1B,IAAI,EAAE,KAAC,QAAQ,IAAC,IAAI,EAAE,EAAE,GAAI;6BAC/B,CAAC,MAAM,CAAC,MAAM,CAAC,WAAW,EAAY,CAAC,IAAI,IAAI,GAC7C,CACV,IACC,EACL,MAAM,CAAC,MAAM,CAAC,YAAY,EAAE,IAAI,CAC7B,cACI,aAAa,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,SAAS,EAAE,EAC9C,OAAO,EAAE,eAAe,EACxB,WAAW,EAAE,MAAM,CAAC,gBAAgB,EAAE,EACtC,YAAY,EAAE,MAAM,CAAC,gBAAgB,EAAE,EACvC,SAAS,EAAE,OAAO,CAAC,mBAAmB,mBACvB,MAAM,CAAC,MAAM,CAAC,aAAa,EAAE,GAC9C,CACL,EACA,MAAM,CAAC,MAAM,CAAC,YAAY,EAAE,IAAI,CAC7B,cACI,SAAS,EAAE,OAAO,CAAC,uBAAuB,qBACzB,MAAM,CAAC,MAAM,CAAC,YAAY,EAAE,EAC7C,OAAO,EAAE,eAAe,EACxB,KAAK,EAAE;wBACH,KAAK,EAAE,qBAAqB,MAAM,CAAC,EAAE,sBAAsB;qBAC9D,YACD,KAAC,YAAY,IAAC,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,GAAI,GACzD,CACT,KAzDI,MAAM,CAAC,EAAE,CA0DZ,CACT,CACJ,GACC,CACT,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from './reactTableBase';
|
|
2
|
+
export { type Table as TableAPI } from './reactTableBase';
|
|
3
|
+
export { TableTheme } from './theme';
|
|
4
|
+
export { Table, type TableProps, type TypedTable } from './table';
|
|
5
|
+
export { createColumnHelper, type ColumnHelper, type SelectionColumnDef, type IdIdentifier, type IdentifiedColumnDef, type DisplayColumnDef, type GroupColumnDef, type GroupColumnDefBase, type ColumnDefTemplate, type CellContext, type HeaderContext, type ColumnFilterProps, type ColumnUtilityProps } from './columnHelpers';
|
|
6
|
+
export { useTable, type UseTableOptions } from './useTable';
|
|
7
|
+
export { useTableExport, type TableExport } from './useTableExport';
|
|
8
|
+
export * from './useTableState';
|
|
9
|
+
export { TableMessagesContext, useTableMessages, type TableMessages } from './tableMessages';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export * from './reactTableBase';
|
|
2
|
+
export {} from './reactTableBase';
|
|
3
|
+
export { TableTheme } from './theme';
|
|
4
|
+
export { Table } from './table';
|
|
5
|
+
export { createColumnHelper } from './columnHelpers';
|
|
6
|
+
export { useTable } from './useTable';
|
|
7
|
+
export { useTableExport } from './useTableExport';
|
|
8
|
+
export * from './useTableState';
|
|
9
|
+
export { TableMessagesContext, useTableMessages } from './tableMessages';
|
|
10
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/main/web/components/table/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,OAAO,EAA0B,MAAM,kBAAkB,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,KAAK,EAAoC,MAAM,SAAS,CAAC;AAClE,OAAO,EACH,kBAAkB,EAarB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,QAAQ,EAAwB,MAAM,YAAY,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAoB,MAAM,kBAAkB,CAAC;AACpE,cAAc,iBAAiB,CAAC;AAChC,OAAO,EAAE,oBAAoB,EAAE,gBAAgB,EAAsB,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reactTableBase.js","sourceRoot":"","sources":["../../../../src/main/web/components/table/reactTableBase.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,OAAO,EAAE,UAAU,EAAe,MAAM,uBAAuB,CAAC"}
|