@ekz/blueprintjs 0.1.0
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/LICENSE +21 -0
- 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 +57 -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 +22 -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 +42 -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 +49 -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 +243 -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 +52 -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 +70 -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 +3 -0
- package/lib/cjs/index.js +7 -0
- package/lib/cjs/index.js.map +1 -0
- package/lib/css/blueprintjs.css +345 -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 +53 -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 +17 -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 +37 -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 +44 -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 +239 -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 +47 -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 +66 -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 +3 -0
- package/lib/esm/index.js +4 -0
- package/lib/esm/index.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 +53 -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 +17 -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 +37 -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 +44 -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 +239 -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 +47 -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 +66 -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 +3 -0
- package/lib/esnext/index.js +4 -0
- package/lib/esnext/index.js.map +1 -0
- package/package.json +61 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 erkez
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export declare const PAGINATION: string;
|
|
2
|
+
export declare const PAGINATION_BUTTON: string;
|
|
3
|
+
export declare const PAGINATION_PAGE: string;
|
|
4
|
+
export declare const REACT_TABLE: string;
|
|
5
|
+
export declare const REACT_TABLE_EMPTY: string;
|
|
6
|
+
export declare const REACT_TABLE_LOADING: string;
|
|
7
|
+
export declare const REACT_TABLE_TOP_TOOLBAR: string;
|
|
8
|
+
export declare const REACT_TABLE_TOP_TOOLBAR_LEFT: string;
|
|
9
|
+
export declare const REACT_TABLE_TOP_TOOLBAR_RIGHT: string;
|
|
10
|
+
export declare const REACT_TABLE_UTILITY_TOOLBAR: string;
|
|
11
|
+
export declare const REACT_TABLE_GLOBAL_FILTER: string;
|
|
12
|
+
export declare const REACT_TABLE_CONTENT: string;
|
|
13
|
+
export declare const REACT_TABLE_HEAD: string;
|
|
14
|
+
export declare const REACT_TABLE_BODY: string;
|
|
15
|
+
export declare const REACT_TABLE_PAGINATION: string;
|
|
16
|
+
export declare const REACT_TABLE_ROW: string;
|
|
17
|
+
export declare const REACT_TABLE_HEAD_CELL: string;
|
|
18
|
+
export declare const REACT_TABLE_HEAD_CELL_CONTENT: string;
|
|
19
|
+
export declare const REACT_TABLE_HEAD_CELL_CONTENT_LABEL: string;
|
|
20
|
+
export declare const REACT_TABLE_HEAD_FILTER: string;
|
|
21
|
+
export declare const REACT_TABLE_CELL: string;
|
|
22
|
+
export declare const REACT_TABLE_ROW_EXPANDER: string;
|
|
23
|
+
export declare const REACT_TABLE_ROW_EXPANDER_WRAPPER: string;
|
|
24
|
+
export declare const REACT_TABLE_ROW_SUB_COMPONENT: string;
|
|
25
|
+
export declare const REACT_TABLE_RESIZER: string;
|
|
26
|
+
export declare const REACT_TABLE_SORTING: string;
|
|
27
|
+
export declare const REACT_TABLE_SELECTION: string;
|
|
28
|
+
export declare const REACT_TABLE_COLUMN_MANAGER: string;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.REACT_TABLE_COLUMN_MANAGER = exports.REACT_TABLE_SELECTION = exports.REACT_TABLE_SORTING = exports.REACT_TABLE_RESIZER = exports.REACT_TABLE_ROW_SUB_COMPONENT = exports.REACT_TABLE_ROW_EXPANDER_WRAPPER = exports.REACT_TABLE_ROW_EXPANDER = exports.REACT_TABLE_CELL = exports.REACT_TABLE_HEAD_FILTER = exports.REACT_TABLE_HEAD_CELL_CONTENT_LABEL = exports.REACT_TABLE_HEAD_CELL_CONTENT = exports.REACT_TABLE_HEAD_CELL = exports.REACT_TABLE_ROW = exports.REACT_TABLE_PAGINATION = exports.REACT_TABLE_BODY = exports.REACT_TABLE_HEAD = exports.REACT_TABLE_CONTENT = exports.REACT_TABLE_GLOBAL_FILTER = exports.REACT_TABLE_UTILITY_TOOLBAR = exports.REACT_TABLE_TOP_TOOLBAR_RIGHT = exports.REACT_TABLE_TOP_TOOLBAR_LEFT = exports.REACT_TABLE_TOP_TOOLBAR = exports.REACT_TABLE_LOADING = exports.REACT_TABLE_EMPTY = exports.REACT_TABLE = exports.PAGINATION_PAGE = exports.PAGINATION_BUTTON = exports.PAGINATION = void 0;
|
|
4
|
+
const core_1 = require("@blueprintjs/core");
|
|
5
|
+
const NS = core_1.Classes.getClassNamespace();
|
|
6
|
+
exports.PAGINATION = `${NS}-pagination`;
|
|
7
|
+
exports.PAGINATION_BUTTON = `${NS}-pagination-button`;
|
|
8
|
+
exports.PAGINATION_PAGE = `${NS}-pagination-page`;
|
|
9
|
+
exports.REACT_TABLE = `${NS}-react-table`;
|
|
10
|
+
exports.REACT_TABLE_EMPTY = `${exports.REACT_TABLE}-empty`;
|
|
11
|
+
exports.REACT_TABLE_LOADING = `${exports.REACT_TABLE}-loading`;
|
|
12
|
+
exports.REACT_TABLE_TOP_TOOLBAR = `${exports.REACT_TABLE}-top-toolbar`;
|
|
13
|
+
exports.REACT_TABLE_TOP_TOOLBAR_LEFT = `${exports.REACT_TABLE}-top-toolbar-left`;
|
|
14
|
+
exports.REACT_TABLE_TOP_TOOLBAR_RIGHT = `${exports.REACT_TABLE}-top-toolbar-right`;
|
|
15
|
+
exports.REACT_TABLE_UTILITY_TOOLBAR = `${exports.REACT_TABLE}-utility-toolbar`;
|
|
16
|
+
exports.REACT_TABLE_GLOBAL_FILTER = `${exports.REACT_TABLE}-global-filter`;
|
|
17
|
+
exports.REACT_TABLE_CONTENT = `${exports.REACT_TABLE}-content`;
|
|
18
|
+
exports.REACT_TABLE_HEAD = `${exports.REACT_TABLE}-head`;
|
|
19
|
+
exports.REACT_TABLE_BODY = `${exports.REACT_TABLE}-body`;
|
|
20
|
+
exports.REACT_TABLE_PAGINATION = `${exports.REACT_TABLE}-pagination`;
|
|
21
|
+
exports.REACT_TABLE_ROW = `${exports.REACT_TABLE}-row`;
|
|
22
|
+
exports.REACT_TABLE_HEAD_CELL = `${exports.REACT_TABLE}-head-cell`;
|
|
23
|
+
exports.REACT_TABLE_HEAD_CELL_CONTENT = `${exports.REACT_TABLE_HEAD_CELL}-content`;
|
|
24
|
+
exports.REACT_TABLE_HEAD_CELL_CONTENT_LABEL = `${exports.REACT_TABLE_HEAD_CELL_CONTENT}-label`;
|
|
25
|
+
exports.REACT_TABLE_HEAD_FILTER = `${exports.REACT_TABLE}-head-filter`;
|
|
26
|
+
exports.REACT_TABLE_CELL = `${exports.REACT_TABLE}-cell`;
|
|
27
|
+
exports.REACT_TABLE_ROW_EXPANDER = `${exports.REACT_TABLE}-row-expander`;
|
|
28
|
+
exports.REACT_TABLE_ROW_EXPANDER_WRAPPER = `${exports.REACT_TABLE}-row-expander-wrapper`;
|
|
29
|
+
exports.REACT_TABLE_ROW_SUB_COMPONENT = `${exports.REACT_TABLE}-row-sub-component`;
|
|
30
|
+
exports.REACT_TABLE_RESIZER = `${exports.REACT_TABLE}-resizer`;
|
|
31
|
+
exports.REACT_TABLE_SORTING = `${exports.REACT_TABLE}-sorting`;
|
|
32
|
+
exports.REACT_TABLE_SELECTION = `${exports.REACT_TABLE}-selection`;
|
|
33
|
+
exports.REACT_TABLE_COLUMN_MANAGER = `${exports.REACT_TABLE}-column-manager`;
|
|
34
|
+
//# sourceMappingURL=classes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"classes.js","sourceRoot":"","sources":["../../../src/main/web/common/classes.ts"],"names":[],"mappings":";;;AAAA,4CAA4C;AAE5C,MAAM,EAAE,GAAG,cAAO,CAAC,iBAAiB,EAAE,CAAC;AAE1B,QAAA,UAAU,GAAG,G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AC;AACnE,QAAA,mBAAmB,GAAG,GAAG,mBAAW,UAAU,CAAC;AAC/C,QAAA,mBAAmB,GAAG,GAAG,mBAAW,UAAU,CAAC;AAC/C,QAAA,qBAAqB,GAAG,GAAG,mBAAW,YAAY,CAAC;AACnD,QAAA,0BAA0B,GAAG,GAAG,mBAAW,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Classes = exports.DISPLAYNAME_PREFIX = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const Classes = tslib_1.__importStar(require("./classes"));
|
|
6
|
+
exports.Classes = Classes;
|
|
7
|
+
var core_1 = require("@blueprintjs/core");
|
|
8
|
+
Object.defineProperty(exports, "DISPLAYNAME_PREFIX", { enumerable: true, get: function () { return core_1.DISPLAYNAME_PREFIX; } });
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/main/web/common/index.ts"],"names":[],"mappings":";;;;AAAA,2DAAqC;AAI5B,0BAAO;AAFhB,0CAAuD;AAA9C,0GAAA,kBAAkB,OAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './pagination';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/main/web/components/pagination/index.ts"],"names":[],"mappings":";;;AAAA,uDAA6B"}
|
|
@@ -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,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Pagination = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const core_1 = require("@blueprintjs/core");
|
|
6
|
+
const classnames_1 = tslib_1.__importDefault(require("classnames"));
|
|
7
|
+
const immutable_1 = require("immutable");
|
|
8
|
+
const invariant_1 = tslib_1.__importDefault(require("invariant"));
|
|
9
|
+
const React = tslib_1.__importStar(require("react"));
|
|
10
|
+
const common_1 = require("../../common");
|
|
11
|
+
const Pagination = React.forwardRef((props, ref) => {
|
|
12
|
+
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;
|
|
13
|
+
(0, invariant_1.default)(Number.isInteger(selectedPage), 'selectedPage must be an integer');
|
|
14
|
+
(0, invariant_1.default)(Number.isInteger(pageCount), 'pageCount must be an integer');
|
|
15
|
+
(0, invariant_1.default)(Number.isInteger(centerPagesDisplayed), 'centerPagesDisplayed must be an integer');
|
|
16
|
+
(0, invariant_1.default)(Number.isInteger(marginPagesDisplayed), 'marginPagesDisplayed must be an integer');
|
|
17
|
+
const changePage = React.useCallback((page) => () => onPageChange(page), [onPageChange]);
|
|
18
|
+
const buildPage = React.useCallback((page) => {
|
|
19
|
+
return (React.createElement("li", { key: page },
|
|
20
|
+
React.createElement(core_1.AnchorButton, { className: common_1.Classes.PAGINATION_PAGE, disabled: page !== selectedPage && disabled, minimal: true, onClick: changePage(page), active: page === selectedPage, "aria-label": page === selectedPage
|
|
21
|
+
? (ariaCurrentPage ?? 'Current page')
|
|
22
|
+
: undefined, intent: "primary" }, page + 1)));
|
|
23
|
+
}, [selectedPage, disabled, changePage, ariaCurrentPage]);
|
|
24
|
+
if (pageCount === 0) {
|
|
25
|
+
return null;
|
|
26
|
+
}
|
|
27
|
+
const hasPrevious = selectedPage > 0;
|
|
28
|
+
const hasNext = selectedPage < pageCount - 1;
|
|
29
|
+
const halfRange = Math.floor(centerPagesDisplayed / 2);
|
|
30
|
+
const pageRange = (0, immutable_1.Range)(0, pageCount)
|
|
31
|
+
.skip(Math.min(selectedPage - halfRange, pageCount - centerPagesDisplayed))
|
|
32
|
+
.take(centerPagesDisplayed);
|
|
33
|
+
const pages = pageRange.map(buildPage);
|
|
34
|
+
const leftMargin = pageRange.first(0) > marginPagesDisplayed - 1
|
|
35
|
+
? (0, immutable_1.Range)(0, marginPagesDisplayed).map(buildPage)
|
|
36
|
+
: null;
|
|
37
|
+
const leftBreak = pageRange.first(0) < marginPagesDisplayed + 1 ? null : (React.createElement("li", null,
|
|
38
|
+
React.createElement(core_1.AnchorButton, { className: common_1.Classes.PAGINATION_PAGE, disabled: disabled, onClick: changePage(Math.max(0, selectedPage - centerPagesDisplayed)), minimal: true }, "...")));
|
|
39
|
+
const rightMargin = pageRange.last(pageCount - 1) < pageCount - marginPagesDisplayed
|
|
40
|
+
? (0, immutable_1.Range)(pageCount - marginPagesDisplayed, pageCount).map(buildPage)
|
|
41
|
+
: null;
|
|
42
|
+
const rightBreak = pageRange.last(pageCount - 1) > pageCount - marginPagesDisplayed - 2 ? null : (React.createElement("li", null,
|
|
43
|
+
React.createElement(core_1.AnchorButton, { className: common_1.Classes.PAGINATION_PAGE, disabled: disabled, onClick: changePage(Math.min(pageCount - 1, selectedPage + centerPagesDisplayed)), minimal: true }, "...")));
|
|
44
|
+
return (React.createElement("ul", { ref: ref, ...ulProps, className: (0, classnames_1.default)(common_1.Classes.PAGINATION, props.className, position) },
|
|
45
|
+
React.createElement("li", null,
|
|
46
|
+
React.createElement(core_1.AnchorButton, { className: common_1.Classes.PAGINATION_BUTTON, disabled: disabled || !hasPrevious, onClick: changePage(selectedPage - 1), icon: "caret-left", minimal: true, "aria-label": ariaPreviousPage ?? 'Previous page' }, previousMessage)),
|
|
47
|
+
leftMargin,
|
|
48
|
+
leftBreak,
|
|
49
|
+
pages,
|
|
50
|
+
rightBreak,
|
|
51
|
+
rightMargin,
|
|
52
|
+
React.createElement("li", null,
|
|
53
|
+
React.createElement(core_1.AnchorButton, { className: common_1.Classes.PAGINATION_BUTTON, disabled: disabled || !hasNext, onClick: changePage(selectedPage + 1), rightIcon: "caret-right", minimal: true, "aria-label": ariaNextPage ?? 'Next page' }, nextMessage))));
|
|
54
|
+
});
|
|
55
|
+
exports.Pagination = Pagination;
|
|
56
|
+
Pagination.displayName = `${common_1.DISPLAYNAME_PREFIX}.Pagination`;
|
|
57
|
+
//# 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,4CAAiD;AACjD,oEAA4B;AAC5B,yCAAkC;AAClC,kEAAkC;AAClC,qDAA+B;AAE/B,yCAA2D;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,IAAA,mBAAS,EAAC,MAAM,CAAC,SAAS,CAAC,YAAY,CAAC,EAAE,iCAAiC,CAAC,CAAC;IAC7E,IAAA,mBAAS,EAAC,MAAM,CAAC,SAAS,CAAC,SAAS,CAAC,EAAE,8BAA8B,CAAC,CAAC;IACvE,IAAA,mBAAS,EACL,MAAM,CAAC,SAAS,CAAC,oBAAoB,CAAC,EACtC,yCAAyC,CAC5C,CAAC;IACF,IAAA,mBAAS,EACL,MAAM,CAAC,SAAS,CAAC,oBAAoB,CAAC,EACtC,yCAAyC,CAC5C,CAAC;IAEF,MAAM,UAAU,GAAG,KAAK,CAAC,WAAW,CAChC,CAAC,IAAY,EAAE,EAAE,CAAC,GAAG,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,EAC1C,CAAC,Y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AAC,SAAS,EAAE,QAAQ,CAAC;QAC5D;YACI,oBAAC,mBAAY,IACT,SAAS,EAAE,gBAAO,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,IAC9C,eAAe,CACL,CACd;QACJ,UAAU;QACV,SAAS;QACT,KAAK;QACL,UAAU;QACV,WAAW;QACZ;YACI,oBAAC,mBAAY,IACT,SAAS,EAAE,gBAAO,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,IACtC,WAAW,CACD,CACd,CACJ,CACR,CAAC;AACN,CAAC,CACJ,CAAC;AAIO,gCAAU;AAFnB,UAAU,CAAC,WAAW,GAAG,GAAG,2BAAkB,aAAa,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,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ColumnFilter = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const core_1 = require("@blueprintjs/core");
|
|
6
|
+
const react_1 = tslib_1.__importDefault(require("react"));
|
|
7
|
+
const ColumnFilter = function ColumnFilter(props) {
|
|
8
|
+
const definition = props.column.columnDef;
|
|
9
|
+
const value = props.column.getFilterValue();
|
|
10
|
+
const setFilterValue = props.column.setFilterValue;
|
|
11
|
+
const handleStringChange = react_1.default.useCallback((event) => setFilterValue(event.currentTarget.value), [setFilterValue]);
|
|
12
|
+
const handleNumberChange = react_1.default.useCallback((number) => setFilterValue([number]), [setFilterValue]);
|
|
13
|
+
const flatRows = props.table.getPreFilteredRowModel().flatRows;
|
|
14
|
+
const valueType = react_1.default.useMemo(() => typeof flatRows
|
|
15
|
+
.slice(0, 5)
|
|
16
|
+
.map((row) => row.getValue(props.column.id))
|
|
17
|
+
.filter((x) => x != null)[0], [props.column.id, flatRows]);
|
|
18
|
+
const numberValue = valueType === 'number' && value != null ? value[0] : undefined;
|
|
19
|
+
return definition.filter != null ? (react_1.default.createElement(react_1.default.Fragment, null, definition.filter(props))) : valueType === 'number' ? (react_1.default.createElement(core_1.NumericInput, { asyncControl: true, value: value != null ? numberValue : undefined, onValueChange: handleNumberChange })) : (react_1.default.createElement(core_1.InputGroup, { value: value, onChange: handleStringChange }));
|
|
20
|
+
};
|
|
21
|
+
exports.ColumnFilter = ColumnFilter;
|
|
22
|
+
//# 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,4CAA6D;AAC7D,0DAA0B;AAWnB,MAAM,YAAY,GAAG,SAAS,YAAY,CAC7C,KAAuC;IAEvC,MAAM,UAAU,GAAG,KAAK,CAAC,MAAM,CAAC,SAAyC,CAAC;IAC1E,MAAM,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC,cAAc,EAAE,CAAC;IAE5C,MAAM,cAAc,GAAG,KAAK,CAAC,MAAM,CAAC,cAAc,CAAC;IACnD,MAAM,kBAAkB,GAAG,eAAK,CAAC,WAAW,CACxC,CAAC,KAA6C,EA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AAC,CAAC,CACA,8BAAC,iBAAU,IAAC,KAAK,EAAE,KAAe,EAAE,QAAQ,EAAE,kBAAkB,GAAI,CACvE,CAAC;AACN,CAAC,CAAC;AAzCW,QAAA,YAAY,gBAyCvB"}
|
|
@@ -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 {};
|