@absreim/react-bootstrap-data-grid 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/{filtering → common/filtering}/FilterOptionsTable.d.ts +4 -4
- package/{filtering → common/filtering}/types.d.ts +6 -6
- package/common/filtering/useFilterFormState.d.ts +3 -0
- package/{index.d.ts → common/index.d.ts} +8 -7
- package/{index.js → common/index.js} +8 -7
- package/{pagination → common/pagination}/PageSelector.d.ts +1 -1
- package/{pagination → common/pagination}/PageSizeSelector.d.ts +1 -1
- package/{pagination → common/pagination}/types.d.ts +2 -1
- package/{pipeline → common/pipeline}/useAugFormattedRows.d.ts +1 -1
- package/common/pipeline/useColNameToWidth.d.ts +3 -0
- package/common/pipeline/useColNameToWidth.js +12 -0
- package/{pipeline → common/pipeline}/useCombinedPipeline/index.d.ts +4 -4
- package/{pipeline → common/pipeline}/useCombinedPipeline/useCurrentPageRows.d.ts +1 -1
- package/{pipeline → common/pipeline}/useCombinedPipeline/useDisplayRows.d.ts +1 -1
- package/{pipeline → 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/{pipeline → common/pipeline}/useCombinedPipeline/useSortedRows.d.ts +2 -2
- package/{pipeline → common/pipeline}/useGridSelectionFns.d.ts +2 -2
- package/{sorting → common/sorting}/types.d.ts +3 -3
- package/{main/ColHeaderCell → common/sorting}/useSortHeaderStates.d.ts +2 -2
- package/{main/ColHeaderCell → common/sorting}/useSortHeaderStates.js +4 -4
- package/common/styling/types.d.ts +21 -0
- package/{types.d.ts → common/types.d.ts} +21 -30
- package/common/util/index.d.ts +5 -0
- package/common/util/index.js +5 -0
- package/community/index.d.ts +4 -0
- package/community/index.js +4 -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/types.js +1 -0
- package/grid/focus/useGridFocus.d.ts +10 -0
- package/grid/focus/useGridFocus.js +130 -0
- package/grid/index.d.ts +3 -0
- package/grid/index.js +3 -0
- package/{Grid.d.ts → grid/main/Grid.d.ts} +0 -1
- package/grid/main/Grid.js +77 -0
- package/grid/main/GridBody.d.ts +4 -0
- package/grid/main/GridBody.js +28 -0
- package/grid/main/GridHeader.d.ts +4 -0
- package/grid/main/GridHeader.js +16 -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/main/types.js +1 -0
- package/grid.css +1 -0
- package/grid.scss +243 -0
- package/package.json +1 -1
- package/{InternalGrid.d.ts → table/InternalTable.d.ts} +6 -6
- package/{InternalGrid.js → table/InternalTable.js} +7 -7
- package/table/Table.d.ts +5 -0
- package/{Grid.js → table/Table.js} +10 -17
- package/{editing → table/editing}/EditableRow.d.ts +1 -2
- package/{editing → table/editing}/EditableRow.js +2 -2
- package/table/index.d.ts +5 -0
- package/table/index.js +5 -0
- package/{main → table/main}/BodyRows.d.ts +7 -7
- package/{main → table/main}/BodyRows.js +1 -1
- package/{main → table/main}/ColHeaderCell/index.js +3 -3
- package/{selection → table/selection}/SelectAllHeaderCell.d.ts +1 -1
- package/{styling → 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/editing/types.d.ts +0 -16
- package/filtering/useFilterFormState.d.ts +0 -3
- package/main/ToggleButton.d.ts +0 -9
- package/main/ToggleButton.js +0 -14
- package/pipeline/useCombinedPipeline/useEditableFromFilterState.d.ts +0 -3
- package/pipeline/useCombinedPipeline/useEditableFromFilterState.js +0 -14
- package/pipeline/useCombinedPipeline/useFilter.d.ts +0 -4
- package/pipeline/useCombinedPipeline/useFilterStateFromEditable.d.ts +0 -4
- /package/{editing → common/editing}/inputStrsToRowData.d.ts +0 -0
- /package/{editing → common/editing}/inputStrsToRowData.js +0 -0
- /package/{editing → common/editing}/types.js +0 -0
- /package/{export → common/export}/ExportForm.d.ts +0 -0
- /package/{export → common/export}/ExportForm.js +0 -0
- /package/{export → common/export}/types.d.ts +0 -0
- /package/{export → common/export}/types.js +0 -0
- /package/{export → common/export}/useExportFn.d.ts +0 -0
- /package/{export → common/export}/useExportFn.js +0 -0
- /package/{filtering → common/filtering}/DateFilterRow.d.ts +0 -0
- /package/{filtering → common/filtering}/DateFilterRow.js +0 -0
- /package/{filtering → common/filtering}/FilterOptionsTable.js +0 -0
- /package/{filtering → common/filtering}/FilterRow.d.ts +0 -0
- /package/{filtering → common/filtering}/FilterRow.js +0 -0
- /package/{filtering → common/filtering}/NumberFilterRow.d.ts +0 -0
- /package/{filtering → common/filtering}/NumberFilterRow.js +0 -0
- /package/{filtering → common/filtering}/StringFilterRow.d.ts +0 -0
- /package/{filtering → common/filtering}/StringFilterRow.js +0 -0
- /package/{filtering → common/filtering}/types.js +0 -0
- /package/{filtering → common/filtering}/useFilterFormState.js +0 -0
- /package/{pagination → common/pagination}/PageSelector.js +0 -0
- /package/{pagination → common/pagination}/PageSizeSelector.js +0 -0
- /package/{pagination → common/pagination}/Pagination.d.ts +0 -0
- /package/{pagination → common/pagination}/Pagination.js +0 -0
- /package/{pagination → common/pagination}/types.js +0 -0
- /package/{pipeline → common/pipeline}/types.d.ts +0 -0
- /package/{pipeline → common/pipeline}/types.js +0 -0
- /package/{pipeline → common/pipeline}/useAugFormattedRows.js +0 -0
- /package/{pipeline → common/pipeline}/useCombinedPipeline/index.js +0 -0
- /package/{pipeline → common/pipeline}/useCombinedPipeline/useCurrentPageRows.js +0 -0
- /package/{pipeline → common/pipeline}/useCombinedPipeline/useFilter.js +0 -0
- /package/{pipeline → common/pipeline}/useCombinedPipeline/useFilterStateFromEditable.js +0 -0
- /package/{pipeline → common/pipeline}/useCombinedPipeline/useFilterStateStore.d.ts +0 -0
- /package/{pipeline → common/pipeline}/useCombinedPipeline/useFilterStateStore.js +0 -0
- /package/{pipeline → common/pipeline}/useCombinedPipeline/useSortedRows.js +0 -0
- /package/{pipeline → common/pipeline}/useGetInputStrSubmitCallback.d.ts +0 -0
- /package/{pipeline → common/pipeline}/useGetInputStrSubmitCallback.js +0 -0
- /package/{pipeline → common/pipeline}/useGridSelectionFns.js +0 -0
- /package/{selection → common/selection}/types.d.ts +0 -0
- /package/{selection → common/selection}/types.js +0 -0
- /package/{sorting → common/sorting}/arrowPlaceholder.d.ts +0 -0
- /package/{sorting → common/sorting}/arrowPlaceholder.js +0 -0
- /package/{sorting → common/sorting}/downArrow.d.ts +0 -0
- /package/{sorting → common/sorting}/downArrow.js +0 -0
- /package/{sorting → common/sorting}/sortOrderToAriaSort.d.ts +0 -0
- /package/{sorting → common/sorting}/sortOrderToAriaSort.js +0 -0
- /package/{sorting → common/sorting}/types.js +0 -0
- /package/{sorting → common/sorting}/upArrow.d.ts +0 -0
- /package/{sorting → common/sorting}/upArrow.js +0 -0
- /package/{styling → common/styling}/types.js +0 -0
- /package/{toolbar → common/toolbar}/Toolbar.d.ts +0 -0
- /package/{toolbar → common/toolbar}/Toolbar.js +0 -0
- /package/{toolbar → common/toolbar}/ToolbarContainer.d.ts +0 -0
- /package/{toolbar → common/toolbar}/ToolbarContainer.js +0 -0
- /package/{toolbar → common/toolbar}/types.d.ts +0 -0
- /package/{toolbar → common/toolbar}/types.js +0 -0
- /package/{toolbar → common/toolbar}/useInterfaces.d.ts +0 -0
- /package/{toolbar → common/toolbar}/useInterfaces.js +0 -0
- /package/{types.js → common/types.js} +0 -0
- /package/{util → common/util}/datetime.d.ts +0 -0
- /package/{util → common/util}/datetime.js +0 -0
- /package/{util → common/util}/getWidthStyle.d.ts +0 -0
- /package/{util → common/util}/getWidthStyle.js +0 -0
- /package/{util → common/util}/isSubset.d.ts +0 -0
- /package/{util → common/util}/isSubset.js +0 -0
- /package/{util → common/util}/trueModulo.d.ts +0 -0
- /package/{util → common/util}/trueModulo.js +0 -0
- /package/{util → common/util}/useControlledHover.d.ts +0 -0
- /package/{util → common/util}/useControlledHover.js +0 -0
- /package/{editing → table/editing}/EditControlsCell.d.ts +0 -0
- /package/{editing → table/editing}/EditControlsCell.js +0 -0
- /package/{main → table/main}/ColHeaderCell/index.d.ts +0 -0
- /package/{selection → table/selection}/SelectAllHeaderCell.js +0 -0
- /package/{selection → table/selection}/SelectionInput.d.ts +0 -0
- /package/{selection → table/selection}/SelectionInput.js +0 -0
- /package/{style.css → table.css} +0 -0
- /package/{style.scss → table.scss} +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
|
var BodyRows = function (_a) {
|
|
7
7
|
var augFormattedRows = _a.augFormattedRows, _b = _a.gridSelectionFns, selectedSet = _b.selectedSet, getSelectInputModel = _b.getSelectInputModel, getSelectHandler = _b.getSelectHandler, getRowClickHandler = _b.getRowClickHandler, getAriaSelectedValue = _b.getAriaSelectedValue, tableStyleModel = _a.tableStyleModel, _c = _a.combinedPipelineOutput, showSelectCol = _c.showSelectCol, ariaColIndexOffset = _c.ariaColIndexOffset, selectModel = _a.selectModel, editModel = _a.editModel, getInputStrSubmitCallback = _a.getInputStrSubmitCallback, additionalColIndexOffset = _a.additionalColIndexOffset, renderPrefixCells = _a.renderPrefixCells, additionalRowStyles = _a.additionalRowStyles;
|
|
@@ -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
|
var ColHeaderCell = function (_a) {
|
|
8
8
|
var label = _a.label, sortModel = _a.sortModel, ariaColIndex = _a.ariaColIndex, additionalClasses = _a.additionalClasses, width = _a.width;
|
|
9
9
|
var _b = useSortHeaderStates(sortModel), handleClick = _b.handleClick, handleMouseOver = _b.handleMouseOver, handleMouseOut = _b.handleMouseOut, sortSymbol = _b.sortSymbol;
|
|
@@ -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 {};
|
package/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
|
-
}
|
package/main/ToggleButton.d.ts
DELETED
package/main/ToggleButton.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
import classNames from "classnames";
|
|
4
|
-
var ToggleButton = function (_a) {
|
|
5
|
-
var isActive = _a.isActive, label = _a.label, onClick = _a.onClick, classes = _a.classes;
|
|
6
|
-
var baseClasses = ["btn"];
|
|
7
|
-
var variableClasses = {
|
|
8
|
-
active: isActive,
|
|
9
|
-
};
|
|
10
|
-
return (_jsx("button", { type: "button", className: classNames(baseClasses, variableClasses, classes, {
|
|
11
|
-
"btn-primary": !(classes && classes.length > 0),
|
|
12
|
-
}), "aria-pressed": isActive, onClick: onClick, children: label }));
|
|
13
|
-
};
|
|
14
|
-
export default ToggleButton;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { useMemo } from "react";
|
|
2
|
-
var useEditableFromFilterState = function (filterState) {
|
|
3
|
-
return useMemo(function () {
|
|
4
|
-
if (filterState === null) {
|
|
5
|
-
return null;
|
|
6
|
-
}
|
|
7
|
-
var editableState = {};
|
|
8
|
-
Object.keys(filterState).forEach(function (columnName) {
|
|
9
|
-
editableState[columnName] = filterState[columnName].editableState;
|
|
10
|
-
});
|
|
11
|
-
return editableState;
|
|
12
|
-
}, [filterState]);
|
|
13
|
-
};
|
|
14
|
-
export default useEditableFromFilterState;
|
|
@@ -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;
|
|
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
|
/package/{style.css → table.css}
RENAMED
|
File without changes
|
|
File without changes
|