@absreim/react-bootstrap-data-grid-pro 3.0.0 → 4.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/common/constants.d.ts +2 -0
- package/common/constants.js +2 -0
- package/common/editing/types.d.ts +7 -0
- package/{grid → common}/filtering/FilterOptionsTable.d.ts +4 -4
- package/{grid → common}/filtering/types.d.ts +6 -6
- package/common/filtering/useFilterFormState.d.ts +3 -0
- package/common/index.d.ts +11 -0
- package/common/index.js +11 -0
- package/{grid → common}/pagination/PageSelector.d.ts +1 -1
- package/{grid → common}/pagination/PageSizeSelector.d.ts +1 -1
- package/{grid → common}/pagination/types.d.ts +2 -1
- package/{grid → common}/pipeline/useAugFormattedRows.d.ts +1 -1
- package/common/pipeline/useColNameToWidth.d.ts +3 -0
- package/common/pipeline/useColNameToWidth.js +7 -0
- package/{grid → common}/pipeline/useCombinedPipeline/index.d.ts +4 -4
- package/{grid → common}/pipeline/useCombinedPipeline/useCurrentPageRows.d.ts +1 -1
- package/{grid → common}/pipeline/useCombinedPipeline/useDisplayRows.d.ts +1 -1
- package/{grid → common}/pipeline/useCombinedPipeline/useDisplayRows.js +1 -2
- package/common/pipeline/useCombinedPipeline/useFilter.d.ts +4 -0
- package/common/pipeline/useCombinedPipeline/useFilterStateFromEditable.d.ts +4 -0
- package/{grid → common}/pipeline/useCombinedPipeline/useSortedRows.d.ts +2 -2
- package/{grid → common}/pipeline/useGridSelectionFns.d.ts +2 -2
- package/{grid → common}/sorting/types.d.ts +3 -3
- package/{grid/main/ColHeaderCell → common/sorting}/useSortHeaderStates.d.ts +2 -2
- package/{grid/main/ColHeaderCell → common/sorting}/useSortHeaderStates.js +4 -4
- package/common/styling/types.d.ts +21 -0
- package/{grid → common}/types.d.ts +21 -30
- package/common/util/index.d.ts +5 -0
- package/common/util/index.js +5 -0
- package/grid/constants.d.ts +2 -0
- package/grid/constants.js +2 -0
- package/grid/focus/types.d.ts +4 -0
- package/grid/focus/useGridFocus.d.ts +10 -0
- package/grid/focus/useGridFocus.js +130 -0
- package/grid/index.d.ts +3 -10
- package/grid/index.js +3 -10
- package/grid/{Grid.d.ts → main/Grid.d.ts} +0 -1
- package/grid/main/Grid.js +76 -0
- package/grid/main/GridBody.d.ts +4 -0
- package/grid/main/GridBody.js +26 -0
- package/grid/main/GridHeader.d.ts +4 -0
- package/grid/main/GridHeader.js +15 -0
- package/grid/main/getWidthStyles.d.ts +3 -0
- package/grid/main/getWidthStyles.js +6 -0
- package/grid/main/types.d.ts +41 -0
- package/grid.css +1 -0
- package/grid.scss +243 -0
- package/package.json +1 -1
- package/pro/index.d.ts +5 -0
- package/pro/index.js +5 -0
- package/{grid/InternalGrid.d.ts → table/InternalTable.d.ts} +6 -6
- package/{grid/InternalGrid.js → table/InternalTable.js} +7 -7
- package/table/Table.d.ts +5 -0
- package/{grid/Grid.js → table/Table.js} +10 -14
- package/{grid → table}/editing/EditableRow.d.ts +1 -2
- package/{grid → table}/editing/EditableRow.js +2 -2
- package/table/index.d.ts +5 -0
- package/table/index.js +5 -0
- package/{grid → table}/main/BodyRows.d.ts +7 -7
- package/{grid → table}/main/BodyRows.js +1 -1
- package/{grid → table}/main/ColHeaderCell/index.js +3 -3
- package/{grid → table}/selection/SelectAllHeaderCell.d.ts +1 -1
- package/table/style.scss +3 -0
- package/{grid → table}/styling/types.d.ts +1 -21
- package/table/styling/types.js +1 -0
- package/table/types.d.ts +19 -0
- package/table/types.js +1 -0
- package/{grid-pro → table-pro}/ColHeaderCellPro.js +4 -4
- package/table-pro/TablePro.d.ts +4 -0
- package/{grid-pro/GridPro.js → table-pro/TablePro.js} +9 -9
- package/{grid-pro → table-pro}/index.d.ts +2 -2
- package/{grid-pro → table-pro}/index.js +2 -2
- package/{grid-pro → table-pro}/reorder/ReorderHandleCell.js +1 -1
- package/{grid-pro → table-pro}/reorder/useKeyboardReorder.js +1 -1
- package/table-pro/resize/types.js +1 -0
- package/{grid-pro → table-pro}/resize/useResizeModel.d.ts +1 -1
- package/table-pro/style.scss +69 -0
- package/{grid-pro → table-pro}/types.d.ts +3 -3
- package/table-pro/types.js +1 -0
- package/table-pro.scss +1 -0
- package/grid/editing/types.d.ts +0 -16
- package/grid/filtering/useFilterFormState.d.ts +0 -3
- package/grid/pipeline/useCombinedPipeline/useFilter.d.ts +0 -4
- package/grid/pipeline/useCombinedPipeline/useFilterStateFromEditable.d.ts +0 -4
- package/grid-pro/GridPro.d.ts +0 -4
- /package/{grid → common}/editing/inputStrsToRowData.d.ts +0 -0
- /package/{grid → common}/editing/inputStrsToRowData.js +0 -0
- /package/{grid-pro/reorder → common/editing}/types.js +0 -0
- /package/{grid → common}/export/ExportForm.d.ts +0 -0
- /package/{grid → common}/export/ExportForm.js +0 -0
- /package/{grid → common}/export/types.d.ts +0 -0
- /package/{grid-pro/resize → common/export}/types.js +0 -0
- /package/{grid → common}/export/useExportFn.d.ts +0 -0
- /package/{grid → common}/export/useExportFn.js +0 -0
- /package/{grid → common}/filtering/DateFilterRow.d.ts +0 -0
- /package/{grid → common}/filtering/DateFilterRow.js +0 -0
- /package/{grid → common}/filtering/FilterOptionsTable.js +0 -0
- /package/{grid → common}/filtering/FilterRow.d.ts +0 -0
- /package/{grid → common}/filtering/FilterRow.js +0 -0
- /package/{grid → common}/filtering/NumberFilterRow.d.ts +0 -0
- /package/{grid → common}/filtering/NumberFilterRow.js +0 -0
- /package/{grid → common}/filtering/StringFilterRow.d.ts +0 -0
- /package/{grid → common}/filtering/StringFilterRow.js +0 -0
- /package/{grid → common}/filtering/types.js +0 -0
- /package/{grid → common}/filtering/useFilterFormState.js +0 -0
- /package/{grid → common}/pagination/PageSelector.js +0 -0
- /package/{grid → common}/pagination/PageSizeSelector.js +0 -0
- /package/{grid → common}/pagination/Pagination.d.ts +0 -0
- /package/{grid → common}/pagination/Pagination.js +0 -0
- /package/{grid-pro → common/pagination}/types.js +0 -0
- /package/{grid → common}/pipeline/types.d.ts +0 -0
- /package/{grid-pro/util → common/pipeline}/types.js +0 -0
- /package/{grid → common}/pipeline/useAugFormattedRows.js +0 -0
- /package/{grid → common}/pipeline/useCombinedPipeline/index.js +0 -0
- /package/{grid → common}/pipeline/useCombinedPipeline/useCurrentPageRows.js +0 -0
- /package/{grid → common}/pipeline/useCombinedPipeline/useFilter.js +0 -0
- /package/{grid → common}/pipeline/useCombinedPipeline/useFilterStateFromEditable.js +0 -0
- /package/{grid → common}/pipeline/useCombinedPipeline/useFilterStateStore.d.ts +0 -0
- /package/{grid → common}/pipeline/useCombinedPipeline/useFilterStateStore.js +0 -0
- /package/{grid → common}/pipeline/useCombinedPipeline/useSortedRows.js +0 -0
- /package/{grid → common}/pipeline/useGetInputStrSubmitCallback.d.ts +0 -0
- /package/{grid → common}/pipeline/useGetInputStrSubmitCallback.js +0 -0
- /package/{grid → common}/pipeline/useGridSelectionFns.js +0 -0
- /package/{grid → common}/selection/types.d.ts +0 -0
- /package/{grid → common}/selection/types.js +0 -0
- /package/{grid → common}/sorting/arrowPlaceholder.d.ts +0 -0
- /package/{grid → common}/sorting/arrowPlaceholder.js +0 -0
- /package/{grid → common}/sorting/downArrow.d.ts +0 -0
- /package/{grid → common}/sorting/downArrow.js +0 -0
- /package/{grid → common}/sorting/sortOrderToAriaSort.d.ts +0 -0
- /package/{grid → common}/sorting/sortOrderToAriaSort.js +0 -0
- /package/{grid/editing → common/sorting}/types.js +0 -0
- /package/{grid → common}/sorting/upArrow.d.ts +0 -0
- /package/{grid → common}/sorting/upArrow.js +0 -0
- /package/{grid/export → common/styling}/types.js +0 -0
- /package/{grid → common}/toolbar/Toolbar.d.ts +0 -0
- /package/{grid → common}/toolbar/Toolbar.js +0 -0
- /package/{grid → common}/toolbar/ToolbarContainer.d.ts +0 -0
- /package/{grid → common}/toolbar/ToolbarContainer.js +0 -0
- /package/{grid → common}/toolbar/types.d.ts +0 -0
- /package/{grid/pagination → common/toolbar}/types.js +0 -0
- /package/{grid → common}/toolbar/useInterfaces.d.ts +0 -0
- /package/{grid → common}/toolbar/useInterfaces.js +0 -0
- /package/{grid/pipeline → common}/types.js +0 -0
- /package/{grid → common}/util/datetime.d.ts +0 -0
- /package/{grid → common}/util/datetime.js +0 -0
- /package/{grid → common}/util/getWidthStyle.d.ts +0 -0
- /package/{grid → common}/util/getWidthStyle.js +0 -0
- /package/{grid → common}/util/isSubset.d.ts +0 -0
- /package/{grid → common}/util/isSubset.js +0 -0
- /package/{grid → common}/util/trueModulo.d.ts +0 -0
- /package/{grid → common}/util/trueModulo.js +0 -0
- /package/{grid → common}/util/useControlledHover.d.ts +0 -0
- /package/{grid → common}/util/useControlledHover.js +0 -0
- /package/grid/{sorting → focus}/types.js +0 -0
- /package/grid/{styling → main}/types.js +0 -0
- /package/{grid → table}/editing/EditControlsCell.d.ts +0 -0
- /package/{grid → table}/editing/EditControlsCell.js +0 -0
- /package/{grid → table}/main/ColHeaderCell/index.d.ts +0 -0
- /package/{grid → table}/selection/SelectAllHeaderCell.js +0 -0
- /package/{grid → table}/selection/SelectionInput.d.ts +0 -0
- /package/{grid → table}/selection/SelectionInput.js +0 -0
- /package/{grid-pro → table-pro}/ColHeaderCellPro.d.ts +0 -0
- /package/{grid-pro → table-pro}/assets/HorizontalGrip.d.ts +0 -0
- /package/{grid-pro → table-pro}/assets/HorizontalGrip.js +0 -0
- /package/{grid-pro → table-pro}/assets/VerticalGrip.d.ts +0 -0
- /package/{grid-pro → table-pro}/assets/VerticalGrip.js +0 -0
- /package/{grid-pro/util → table-pro/lib}/regDragCleanup.d.ts +0 -0
- /package/{grid-pro/util → table-pro/lib}/regDragCleanup.js +0 -0
- /package/{grid-pro/util → table-pro/lib}/types.d.ts +0 -0
- /package/{grid/toolbar → table-pro/lib}/types.js +0 -0
- /package/{grid-pro → table-pro}/reorder/ReorderHandleCell.d.ts +0 -0
- /package/{grid-pro → table-pro}/reorder/ReorderHeaderCell.d.ts +0 -0
- /package/{grid-pro → table-pro}/reorder/ReorderHeaderCell.js +0 -0
- /package/{grid-pro → table-pro}/reorder/types.d.ts +0 -0
- /package/{grid → table-pro/reorder}/types.js +0 -0
- /package/{grid-pro → table-pro}/reorder/useKeyboardReorder.d.ts +0 -0
- /package/{grid-pro → table-pro}/reorder/useKeyboardReorderListener.d.ts +0 -0
- /package/{grid-pro → table-pro}/reorder/useKeyboardReorderListener.js +0 -0
- /package/{grid-pro → table-pro}/reorder/useReorderStyles.d.ts +0 -0
- /package/{grid-pro → table-pro}/reorder/useReorderStyles.js +0 -0
- /package/{grid-pro → table-pro}/resize/types.d.ts +0 -0
- /package/{grid-pro → table-pro}/resize/useResizeModel.js +0 -0
- /package/{grid-pro → table-pro}/util/index.d.ts +0 -0
- /package/{grid-pro → table-pro}/util/index.js +0 -0
- /package/{grid-pro → table-pro}/util/reorderRows.d.ts +0 -0
- /package/{grid-pro → table-pro}/util/reorderRows.js +0 -0
- /package/{style.css → table-pro.css} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import EditableRow from "../editing/EditableRow";
|
|
3
3
|
import classNames from "classnames";
|
|
4
|
-
import getWidthStyle from "
|
|
4
|
+
import getWidthStyle from "../../common/util/getWidthStyle";
|
|
5
5
|
import SelectionInput from "../selection/SelectionInput";
|
|
6
6
|
const BodyRows = ({ augFormattedRows, gridSelectionFns: { selectedSet, getSelectInputModel, getSelectHandler, getRowClickHandler, getAriaSelectedValue, }, tableStyleModel, combinedPipelineOutput: { showSelectCol, ariaColIndexOffset }, selectModel, editModel, getInputStrSubmitCallback, additionalColIndexOffset, renderPrefixCells, additionalRowStyles, }) => augFormattedRows.map((row, index) => {
|
|
7
7
|
return (_jsxs(EditableRow, { onClick: getRowClickHandler(row.id), className: classNames({
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import classNames from "classnames";
|
|
4
|
-
import getWidthStyle from "
|
|
5
|
-
import useSortHeaderStates from "
|
|
6
|
-
import sortOrderToAriaSort from "
|
|
4
|
+
import getWidthStyle from "../../../common/util/getWidthStyle";
|
|
5
|
+
import useSortHeaderStates from "../../../common/sorting/useSortHeaderStates";
|
|
6
|
+
import sortOrderToAriaSort from "../../../common/sorting/sortOrderToAriaSort";
|
|
7
7
|
const ColHeaderCell = ({ label, sortModel, ariaColIndex, additionalClasses, width, }) => {
|
|
8
8
|
const { handleClick, handleMouseOver, handleMouseOut, sortSymbol } = useSortHeaderStates(sortModel);
|
|
9
9
|
return (_jsxs("th", { className: classNames({
|
package/table/style.scss
ADDED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RowId } from "
|
|
1
|
+
import { RowId } from "../../common/types";
|
|
2
2
|
export interface SharedTableStyleModel {
|
|
3
3
|
table?: string[];
|
|
4
4
|
tbody?: string[];
|
|
@@ -39,23 +39,3 @@ export interface AdditionalComponentsStyleModel {
|
|
|
39
39
|
tableDiv?: string[];
|
|
40
40
|
paginationUiDiv?: string[];
|
|
41
41
|
}
|
|
42
|
-
export interface ToolbarStyleModel {
|
|
43
|
-
activeButton?: string[];
|
|
44
|
-
inactiveButton?: string[];
|
|
45
|
-
toolbar?: string[];
|
|
46
|
-
interfaceContainer?: string[];
|
|
47
|
-
}
|
|
48
|
-
export interface ExportFormStyleModel {
|
|
49
|
-
legend?: string[];
|
|
50
|
-
radioContainer?: string[];
|
|
51
|
-
radioInput?: string[];
|
|
52
|
-
radioLabel?: string[];
|
|
53
|
-
submitButton?: string[];
|
|
54
|
-
}
|
|
55
|
-
export interface StyleModel {
|
|
56
|
-
mainTableStyleModel?: TableStyleModel;
|
|
57
|
-
filterInputTableStyleModel?: FilterInputTableStyleModel;
|
|
58
|
-
additionalComponentsStyleModel?: AdditionalComponentsStyleModel;
|
|
59
|
-
toolbarStyleModel?: ToolbarStyleModel;
|
|
60
|
-
exportFormStyleModel?: ExportFormStyleModel;
|
|
61
|
-
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/table/types.d.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ColSortModel } from "../common/sorting/types";
|
|
2
|
+
import { ColDefBase, MainComponentSharedProps } from "../common/types";
|
|
3
|
+
import { StyleModel } from "../common/styling/types";
|
|
4
|
+
export type DisplayMode = "table" | "block";
|
|
5
|
+
export type TableProps = MainComponentSharedProps & {
|
|
6
|
+
caption?: string;
|
|
7
|
+
styleModel?: StyleModel;
|
|
8
|
+
displayMode?: DisplayMode;
|
|
9
|
+
};
|
|
10
|
+
export type BaseTableProps = Omit<TableProps, "cols"> & {
|
|
11
|
+
cols: ColDefBase[];
|
|
12
|
+
};
|
|
13
|
+
export interface ColHeaderCellProps {
|
|
14
|
+
label: string;
|
|
15
|
+
sortModel?: ColSortModel;
|
|
16
|
+
ariaColIndex: number;
|
|
17
|
+
additionalClasses?: string[] | null;
|
|
18
|
+
width?: number;
|
|
19
|
+
}
|
package/table/types.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { useCallback, useMemo, useRef, } from "react";
|
|
4
4
|
import classNames from "classnames";
|
|
5
|
-
import getWidthStyle from "../
|
|
6
|
-
import useSortHeaderStates from "../
|
|
5
|
+
import getWidthStyle from "../common/util/getWidthStyle";
|
|
6
|
+
import useSortHeaderStates from "../common/sorting/useSortHeaderStates";
|
|
7
7
|
import VerticalGrip from "./assets/VerticalGrip";
|
|
8
|
-
import regDragCleanup from "./
|
|
9
|
-
import sortOrderToAriaSort from "../
|
|
8
|
+
import regDragCleanup from "./lib/regDragCleanup";
|
|
9
|
+
import sortOrderToAriaSort from "../common/sorting/sortOrderToAriaSort";
|
|
10
10
|
const setWidthStyle = (cells, width) => {
|
|
11
11
|
cells.forEach((cell) => {
|
|
12
12
|
cell.style.minWidth = `${width}px`;
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import { useCallback, useEffect, useMemo } from "react";
|
|
4
|
-
import useCombinedPipeline from "../
|
|
5
|
-
import
|
|
4
|
+
import useCombinedPipeline from "../common/pipeline/useCombinedPipeline";
|
|
5
|
+
import InternalTable from "../table/InternalTable";
|
|
6
6
|
import ColHeaderCellPro from "./ColHeaderCellPro";
|
|
7
|
-
import useGridSelectionFns from "../
|
|
8
|
-
import useGetInputStrSubmitCallback from "../
|
|
9
|
-
import useAugFormattedRows from "../
|
|
7
|
+
import useGridSelectionFns from "../common/pipeline/useGridSelectionFns";
|
|
8
|
+
import useGetInputStrSubmitCallback from "../common/pipeline/useGetInputStrSubmitCallback";
|
|
9
|
+
import useAugFormattedRows from "../common/pipeline/useAugFormattedRows";
|
|
10
10
|
import useResizeModel from "./resize/useResizeModel";
|
|
11
|
-
import BodyRows from "../
|
|
11
|
+
import BodyRows from "../table/main/BodyRows";
|
|
12
12
|
import ReorderHeaderCell from "./reorder/ReorderHeaderCell";
|
|
13
13
|
import ReorderHandleCell from "./reorder/ReorderHandleCell";
|
|
14
14
|
import useKeyboardReorder from "./reorder/useKeyboardReorder";
|
|
15
15
|
import useReorderStyles from "./reorder/useReorderStyles";
|
|
16
16
|
import useKeyboardReorderListener from "./reorder/useKeyboardReorderListener";
|
|
17
|
-
const
|
|
17
|
+
const TablePro = (props) => {
|
|
18
18
|
const { rows, cols, editModel, filterModel, sortModel, pagination, selectModel, styleModel, displayMode, reorder, } = props;
|
|
19
19
|
const combinedPipelineOutput = useCombinedPipeline({
|
|
20
20
|
rows,
|
|
@@ -117,11 +117,11 @@ const GridPro = (props) => {
|
|
|
117
117
|
]);
|
|
118
118
|
const bodyRows = (_jsx(BodyRows, { augFormattedRows: augFormattedRows, gridSelectionFns: gridSelectionFns, selectModel: selectModel, combinedPipelineOutput: combinedPipelineOutput, editModel: editModel, getInputStrSubmitCallback: getInputStrSubmitCallback, renderPrefixCells: renderPrefixCells, additionalColIndexOffset: reorder ? 1 : 0, additionalRowStyles: additionalBodyRowStyles, tableStyleModel: styleModel === null || styleModel === void 0 ? void 0 : styleModel.mainTableStyleModel }));
|
|
119
119
|
const prefixHeader = reorder ? _jsx(ReorderHeaderCell, {}) : null;
|
|
120
|
-
return (_jsx(
|
|
120
|
+
return (_jsx(InternalTable, { gridProps: props, hooks: {
|
|
121
121
|
pipelineOutput: combinedPipelineOutput,
|
|
122
122
|
selectFns: gridSelectionFns,
|
|
123
123
|
}, slots: { colHeaderCells, bodyRows, prefixHeader }, classes: {
|
|
124
124
|
headerRow: additionalHeaderRowStyles,
|
|
125
125
|
} }));
|
|
126
126
|
};
|
|
127
|
-
export default
|
|
127
|
+
export default TablePro;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useCallback, } from "react";
|
|
3
3
|
import HorizontalGrip from "../assets/HorizontalGrip";
|
|
4
|
-
import regDragCleanup from "../
|
|
4
|
+
import regDragCleanup from "../lib/regDragCleanup";
|
|
5
5
|
import classNames from "classnames";
|
|
6
6
|
function dropTargetRefValuesEqual(first, second) {
|
|
7
7
|
if (first === null && second === null) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useCallback, useMemo, useState } from "react";
|
|
2
|
-
import trueModulo from "../../
|
|
2
|
+
import trueModulo from "../../common/util/trueModulo";
|
|
3
3
|
const useKeyboardReorder = (displayRowIds) => {
|
|
4
4
|
const [state, setState] = useState(null);
|
|
5
5
|
// A change the displayed rows can suddenly make the existing state invalid.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ProColDef } from "../types";
|
|
2
|
-
import { DisplayMode } from "../../
|
|
2
|
+
import { DisplayMode } from "../../table";
|
|
3
3
|
import { ResizeModel } from "./types";
|
|
4
4
|
declare const useResizeModel: (cols: Pick<ProColDef, "resizeable" | "width" | "name">[], display: DisplayMode | undefined) => ResizeModel;
|
|
5
5
|
export default useResizeModel;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
@use "../table/style";
|
|
2
|
+
|
|
3
|
+
.rbdg-draggable-container {
|
|
4
|
+
width: 1rem;
|
|
5
|
+
height: 1rem;
|
|
6
|
+
touch-action: none;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.rbdg-draggable-icon {
|
|
10
|
+
pointer-events: none;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.rbdg-resize-container {
|
|
14
|
+
cursor: col-resize;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.rbdg-reorder-container {
|
|
18
|
+
cursor: grab !important;
|
|
19
|
+
|
|
20
|
+
&:active {
|
|
21
|
+
cursor: grabbing !important;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
// Typical button reset to make it look like a plain div
|
|
26
|
+
.rbdg-plain-icon-button {
|
|
27
|
+
display: inline-flex;
|
|
28
|
+
padding: 0;
|
|
29
|
+
margin: 0;
|
|
30
|
+
border: none;
|
|
31
|
+
|
|
32
|
+
background: none;
|
|
33
|
+
color: inherit;
|
|
34
|
+
font: inherit;
|
|
35
|
+
|
|
36
|
+
-webkit-appearance: none;
|
|
37
|
+
appearance: none;
|
|
38
|
+
|
|
39
|
+
&:disabled {
|
|
40
|
+
pointer-events: none;
|
|
41
|
+
opacity: 0.65;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.rbdg-drag-ghost {
|
|
46
|
+
opacity: 75%;
|
|
47
|
+
position: fixed;
|
|
48
|
+
padding: 0.5rem;
|
|
49
|
+
z-index: 2; // float above toolbar panels
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.rbdg-reorder-dragged-row-pred {
|
|
53
|
+
border-bottom-color: var(--bs-success);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.rbdg-reorder-dragged-row {
|
|
57
|
+
border-top-width: 1px;
|
|
58
|
+
opacity: 50%;
|
|
59
|
+
border-color: var(--bs-success);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.rbdg-reorder-above-drag-target-row {
|
|
63
|
+
border-bottom-color: var(--bs-primary);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.rbdg-reorder-below-drag-target-row {
|
|
67
|
+
border-top-width: 1px;
|
|
68
|
+
border-top-color: var(--bs-primary);
|
|
69
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ColDef, ColDefBase, ColHeaderCellProps,
|
|
1
|
+
import { ColDef, ColDefBase, ColHeaderCellProps, TableProps, StyleModel } from "../table";
|
|
2
2
|
import { ReorderModel, ReorderStyleModel } from "./reorder/types";
|
|
3
3
|
export type ProColDef<ValueType = any> = ColDefBase<ValueType> & {
|
|
4
4
|
resizeable?: boolean;
|
|
@@ -7,12 +7,12 @@ export type ProColDef<ValueType = any> = ColDefBase<ValueType> & {
|
|
|
7
7
|
maxResizeWidth?: number;
|
|
8
8
|
keyboardResizeStep?: number;
|
|
9
9
|
};
|
|
10
|
-
export type
|
|
10
|
+
export type TableProProps = Omit<TableProps, "cols" | "styleModel"> & {
|
|
11
11
|
cols: ProColDef[];
|
|
12
12
|
reorder?: ReorderModel;
|
|
13
13
|
styleModel?: ProStyleModel;
|
|
14
14
|
};
|
|
15
|
-
export type ColHeaderCellProProps = ColHeaderCellProps & Pick<
|
|
15
|
+
export type ColHeaderCellProProps = ColHeaderCellProps & Pick<TableProps, "displayMode"> & {
|
|
16
16
|
setWidth?: (width: number) => void;
|
|
17
17
|
} & Pick<ProColDef, "minResizeWidth" | "maxResizeWidth" | "keyboardResizeStep">;
|
|
18
18
|
export interface WidthModel {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/table-pro.scss
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@use "./table-pro/style";
|
package/grid/editing/types.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { ColDataType, ColDataTypeStrings, RowData, RowId } from "../types";
|
|
2
|
-
export interface CellData {
|
|
3
|
-
fieldName: string;
|
|
4
|
-
value: ColDataType;
|
|
5
|
-
type: ColDataTypeStrings;
|
|
6
|
-
ariaColIndex: number;
|
|
7
|
-
formattedValue: string;
|
|
8
|
-
label: string;
|
|
9
|
-
width?: number;
|
|
10
|
-
}
|
|
11
|
-
export type UpdateCallbackGenerator = (id: RowId) => (rowData: RowData) => void;
|
|
12
|
-
export interface EditModel {
|
|
13
|
-
getUpdateCallback: UpdateCallbackGenerator;
|
|
14
|
-
getDeleteCallback?: (id: RowId) => () => void;
|
|
15
|
-
editColWidth?: number;
|
|
16
|
-
}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { ColDef } from "../../types";
|
|
2
|
-
import { EditableTableFilterState, TableFilterState } from "../../filtering/types";
|
|
3
|
-
declare const useFilterStateFromEditable: (colDefs: ColDef[], editableFilterState: EditableTableFilterState | null) => TableFilterState | null;
|
|
4
|
-
export default useFilterStateFromEditable;
|
package/grid-pro/GridPro.d.ts
DELETED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|