@absreim/react-bootstrap-data-grid-pro 2.4.1 → 2.6.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/grid/Grid.js +26 -30
- package/grid/InternalGrid.d.ts +1 -0
- package/grid/InternalGrid.js +17 -18
- package/grid/editing/EditControlsCell.js +3 -4
- package/grid/editing/EditableRow.js +11 -17
- package/grid/editing/inputStrsToRowData.js +4 -4
- package/grid/export/ExportForm.js +25 -49
- package/grid/export/useExportFn.js +34 -58
- package/grid/filtering/DateFilterRow.js +17 -33
- package/grid/filtering/FilterOptionsTable.js +60 -96
- package/grid/filtering/FilterRow.js +4 -13
- package/grid/filtering/NumberFilterRow.js +10 -25
- package/grid/filtering/StringFilterRow.js +10 -25
- package/grid/filtering/types.js +6 -6
- package/grid/filtering/useFilterFormState.js +52 -65
- package/grid/main/BodyRows.d.ts +3 -1
- package/grid/main/BodyRows.js +6 -13
- package/grid/main/ColHeaderCell/index.js +4 -4
- package/grid/main/ColHeaderCell/useSortHeaderStates.js +10 -10
- package/grid/main/ToggleButton.js +3 -4
- package/grid/pagination/PageSelector.js +17 -18
- package/grid/pagination/PageSizeSelector.js +5 -6
- package/grid/pagination/Pagination.js +6 -7
- package/grid/pipeline/useAugFormattedRows.js +5 -20
- package/grid/pipeline/useCombinedPipeline/index.d.ts +2 -2
- package/grid/pipeline/useCombinedPipeline/index.js +21 -22
- package/grid/pipeline/useCombinedPipeline/useCurrentPageRows.d.ts +3 -3
- package/grid/pipeline/useCombinedPipeline/useCurrentPageRows.js +29 -24
- package/grid/pipeline/useCombinedPipeline/useDisplayRows.d.ts +2 -2
- package/grid/pipeline/useCombinedPipeline/useDisplayRows.js +40 -41
- package/grid/pipeline/useCombinedPipeline/useFilter.d.ts +2 -2
- package/grid/pipeline/useCombinedPipeline/useFilter.js +9 -9
- package/grid/pipeline/useCombinedPipeline/useFilterStateFromEditable.js +5 -6
- package/grid/pipeline/useCombinedPipeline/useFilterStateStore.js +6 -7
- package/grid/pipeline/useCombinedPipeline/useSortedRows.d.ts +3 -3
- package/grid/pipeline/useCombinedPipeline/useSortedRows.js +22 -27
- package/grid/pipeline/useGetInputStrSubmitCallback.js +6 -6
- package/grid/pipeline/useGridSelectionFns.js +30 -30
- package/grid/pipeline/useUnwrappedGridStyles.js +5 -7
- package/grid/selection/SelectAllHeaderCell.d.ts +1 -0
- package/grid/selection/SelectAllHeaderCell.js +9 -10
- package/grid/selection/SelectionInput.js +4 -6
- package/grid/sorting/arrowPlaceholder.js +1 -1
- package/grid/sorting/downArrow.js +1 -1
- package/grid/sorting/sortOrderToAriaSort.d.ts +4 -0
- package/grid/sorting/sortOrderToAriaSort.js +11 -0
- package/grid/sorting/upArrow.js +1 -10
- package/grid/styling/styleModelUnwrappers.js +22 -33
- package/grid/toolbar/Toolbar.js +61 -9
- package/grid/toolbar/ToolbarContainer.js +3 -6
- package/grid/toolbar/useInterfaces.js +5 -17
- package/grid/types.d.ts +9 -5
- package/grid/util/datetime.js +2 -4
- package/grid/util/getWidthStyle.js +6 -8
- package/grid/util/isSubset.js +3 -4
- package/grid/util/useControlledHover.js +8 -8
- package/grid-pro/ColHeaderCellPro.js +47 -42
- package/grid-pro/GridPro.js +42 -32
- package/grid-pro/assets/HorizontalGrip.d.ts +6 -0
- package/grid-pro/assets/HorizontalGrip.js +3 -0
- package/grid-pro/assets/VerticalGrip.d.ts +6 -0
- package/grid-pro/assets/VerticalGrip.js +3 -0
- package/grid-pro/index.d.ts +3 -0
- package/grid-pro/index.js +3 -0
- package/grid-pro/reorder/ReorderHandleCell.d.ts +12 -0
- package/grid-pro/reorder/ReorderHandleCell.js +220 -0
- package/grid-pro/reorder/ReorderHeaderCell.d.ts +3 -0
- package/grid-pro/reorder/ReorderHeaderCell.js +4 -0
- package/grid-pro/reorder/types.d.ts +12 -0
- package/grid-pro/reorder/types.js +1 -0
- package/grid-pro/resize/useResizeModel.js +40 -62
- package/grid-pro/types.d.ts +9 -2
- package/grid-pro/util/index.d.ts +1 -0
- package/grid-pro/util/index.js +1 -0
- package/grid-pro/util/regDragCleanup.d.ts +3 -0
- package/grid-pro/util/regDragCleanup.js +28 -0
- package/grid-pro/util/reorderRows.d.ts +3 -0
- package/grid-pro/util/reorderRows.js +17 -0
- package/grid-pro/util/types.d.ts +10 -0
- package/grid-pro/util/types.js +1 -0
- package/package.json +1 -1
- package/style.css +1 -1
package/grid/Grid.js
CHANGED
|
@@ -9,48 +9,44 @@ import useUnwrappedGridStyles from "./pipeline/useUnwrappedGridStyles";
|
|
|
9
9
|
import useGetInputStrSubmitCallback from "./pipeline/useGetInputStrSubmitCallback";
|
|
10
10
|
import useAugFormattedRows from "./pipeline/useAugFormattedRows";
|
|
11
11
|
import BodyRows from "./main/BodyRows";
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
rows
|
|
16
|
-
cols
|
|
17
|
-
filterModel
|
|
18
|
-
sortModel
|
|
19
|
-
pagination
|
|
20
|
-
selectModel
|
|
12
|
+
const Grid = (props) => {
|
|
13
|
+
const { rows, cols, filterModel, sortModel, pagination, selectModel, styleModel, editModel, } = props;
|
|
14
|
+
const combinedPipelineOutput = useCombinedPipeline({
|
|
15
|
+
rows,
|
|
16
|
+
cols,
|
|
17
|
+
filterModel,
|
|
18
|
+
sortModel,
|
|
19
|
+
pagination,
|
|
20
|
+
selectModel,
|
|
21
21
|
});
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
cols.forEach(
|
|
29
|
-
var name = _a.name, width = _a.width;
|
|
30
|
-
return (map[name] = width);
|
|
31
|
-
});
|
|
22
|
+
const { sortedRowsOutput: { sortColDef, setSortColDef, sortingEnabled }, showSelectCol, displayRows, } = combinedPipelineOutput;
|
|
23
|
+
const gridSelectionFns = useGridSelectionFns(selectModel, rows);
|
|
24
|
+
const unwrappedStyles = useUnwrappedGridStyles(styleModel);
|
|
25
|
+
const getInputStrSubmitCallback = useGetInputStrSubmitCallback(editModel, cols);
|
|
26
|
+
const colNameToWidth = useMemo(() => {
|
|
27
|
+
const map = {};
|
|
28
|
+
cols.forEach(({ name, width }) => (map[name] = width));
|
|
32
29
|
return map;
|
|
33
30
|
}, [cols]);
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
var
|
|
37
|
-
|
|
38
|
-
var colSortModel = sortingEnabled && sortable
|
|
31
|
+
const augFormattedRows = useAugFormattedRows(colNameToWidth, displayRows);
|
|
32
|
+
const colHeaderCells = cols.map(({ name, label, sortable, width }, index) => {
|
|
33
|
+
var _a;
|
|
34
|
+
const colSortModel = sortingEnabled && sortable
|
|
39
35
|
? {
|
|
40
36
|
sortOrder: (sortColDef === null || sortColDef === void 0 ? void 0 : sortColDef.name) === name ? sortColDef.order : null,
|
|
41
|
-
setSortOrder:
|
|
42
|
-
setSortColDef && setSortColDef(order && { name
|
|
37
|
+
setSortOrder: (order) => {
|
|
38
|
+
setSortColDef && setSortColDef(order && { name, order });
|
|
43
39
|
},
|
|
44
40
|
}
|
|
45
41
|
: undefined;
|
|
46
|
-
return (_jsx(ColHeaderCell, { label: label, sortModel: colSortModel, ariaColIndex: index + 1 + (showSelectCol ? 1 : 0), additionalClasses: ((
|
|
42
|
+
return (_jsx(ColHeaderCell, { label: label, sortModel: colSortModel, ariaColIndex: index + 1 + (showSelectCol ? 1 : 0), additionalClasses: ((_a = styleModel === null || styleModel === void 0 ? void 0 : styleModel.mainTableStyleModel) === null || _a === void 0 ? void 0 : _a.theadTh) &&
|
|
47
43
|
styleModel.mainTableStyleModel.theadTh(index), width: width }, name));
|
|
48
44
|
});
|
|
49
|
-
|
|
45
|
+
const bodyRows = (_jsx(BodyRows, { augFormattedRows: augFormattedRows, gridSelectionFns: gridSelectionFns, selectModel: selectModel, unwrappedStyles: unwrappedStyles, combinedPipelineOutput: combinedPipelineOutput, editModel: editModel, getInputStrSubmitCallback: getInputStrSubmitCallback }));
|
|
50
46
|
return (_jsx(InternalGrid, { gridProps: props, hooks: {
|
|
51
47
|
pipelineOutput: combinedPipelineOutput,
|
|
52
48
|
selectFns: gridSelectionFns,
|
|
53
|
-
unwrappedStyles
|
|
54
|
-
}, slots: { colHeaderCells
|
|
49
|
+
unwrappedStyles,
|
|
50
|
+
}, slots: { colHeaderCells, bodyRows } }));
|
|
55
51
|
};
|
|
56
52
|
export default Grid;
|
package/grid/InternalGrid.d.ts
CHANGED
package/grid/InternalGrid.js
CHANGED
|
@@ -10,18 +10,17 @@ import useInterfaces from "./toolbar/useInterfaces";
|
|
|
10
10
|
import ToolbarContainer from "./toolbar/ToolbarContainer";
|
|
11
11
|
import useExportFn from "./export/useExportFn";
|
|
12
12
|
import getWidthStyle from "./util/getWidthStyle";
|
|
13
|
-
|
|
14
|
-
var
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
cols: cols,
|
|
13
|
+
const InternalGrid = ({ gridProps: { rows, cols, pagination, filterModel, selectModel, editModel, caption, styleModel, useToolbar, responsive, displayMode, }, hooks: { pipelineOutput, selectFns, unwrappedStyles }, slots: { colHeaderCells, bodyRows, prefixHeader }, }) => {
|
|
14
|
+
var _a;
|
|
15
|
+
const { normalizedTableFilterModel, filteredRows, filterState, sortedRowsOutput: { sortedRows }, currentPageRowsOutput: { paginatedRows, normalizedModel }, showSelectCol, } = pipelineOutput;
|
|
16
|
+
const [filterOptionsVisible, setFilterOptionsVisible] = useState(false);
|
|
17
|
+
const exportFnInfo = useExportFn({
|
|
18
|
+
rows,
|
|
19
|
+
cols,
|
|
21
20
|
filteredRows: filterModel && filteredRows,
|
|
22
21
|
currentPageRows: pagination && paginatedRows,
|
|
23
22
|
});
|
|
24
|
-
|
|
23
|
+
const toolbarInterfaceParams = useMemo(() => ({
|
|
25
24
|
filtering: useToolbar && filterState && filterModel && normalizedTableFilterModel
|
|
26
25
|
? {
|
|
27
26
|
filterState: filterState,
|
|
@@ -31,9 +30,9 @@ var InternalGrid = function (_a) {
|
|
|
31
30
|
}
|
|
32
31
|
: undefined,
|
|
33
32
|
exporting: useToolbar
|
|
34
|
-
? { exportFnInfo
|
|
33
|
+
? { exportFnInfo, styleModel: styleModel === null || styleModel === void 0 ? void 0 : styleModel.exportFormStyleModel }
|
|
35
34
|
: undefined,
|
|
36
|
-
})
|
|
35
|
+
}), [
|
|
37
36
|
exportFnInfo,
|
|
38
37
|
filterModel,
|
|
39
38
|
filterState,
|
|
@@ -42,16 +41,16 @@ var InternalGrid = function (_a) {
|
|
|
42
41
|
styleModel === null || styleModel === void 0 ? void 0 : styleModel.filterInputTableStyleModel,
|
|
43
42
|
useToolbar,
|
|
44
43
|
]);
|
|
45
|
-
|
|
46
|
-
|
|
44
|
+
const toolbarInterfaces = useInterfaces(toolbarInterfaceParams);
|
|
45
|
+
const handleToggleFilterOptions = () => {
|
|
47
46
|
setFilterOptionsVisible(!filterOptionsVisible);
|
|
48
47
|
};
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
48
|
+
const { rowsAreSelectable, selectionInfo, selectAllOnClick } = selectFns;
|
|
49
|
+
const { unwrappedTableModel, unwrappedAdditionalStyleModel } = unwrappedStyles;
|
|
50
|
+
const mainTable = (_jsxs("table", { className: classNames("table", {
|
|
52
51
|
"table-hover": rowsAreSelectable,
|
|
53
52
|
"d-block": displayMode === "block",
|
|
54
|
-
}, unwrappedTableModel.table), "aria-rowcount": filteredRows.length + 1, children: [caption !== undefined && (_jsx("caption", { className: classNames(unwrappedTableModel.caption), children: caption })), _jsx("thead", { className: classNames(unwrappedTableModel.thead), children: _jsxs("tr", { "aria-rowindex": 1, className: classNames(unwrappedTableModel.theadTr), children: [showSelectCol && (_jsx(SelectAllHeaderCell, { style: getWidthStyle(selectModel === null || selectModel === void 0 ? void 0 : selectModel.selectColWidth), selectionInfo: selectionInfo, onClick: selectAllOnClick, totalRows: rows.length, additionalClasses: unwrappedTableModel.rowSelectColTh })), colHeaderCells, editModel && (_jsx("th", { "aria-colindex": cols.length + 1 + (showSelectCol ? 1 : 0), className: classNames(unwrappedTableModel.editColTh), style: getWidthStyle(editModel === null || editModel === void 0 ? void 0 : editModel.editColWidth), children: "Edit Controls" }))] }) }), _jsx("tbody", { className: classNames(unwrappedTableModel.tbody), children: bodyRows })] }));
|
|
55
|
-
return (_jsxs("div", { "data-testid": "rbdg-top-level-div", className: classNames(unwrappedAdditionalStyleModel.topLevelDiv), children: [normalizedTableFilterModel && !useToolbar && (_jsxs("div", { "data-testid": "rbdg-filter-inputs-div", className: classNames(unwrappedAdditionalStyleModel.filterInputsDiv), children: [_jsx(ToggleButton, { isActive: filterOptionsVisible, label:
|
|
53
|
+
}, unwrappedTableModel.table), "aria-rowcount": filteredRows.length + 1, children: [caption !== undefined && (_jsx("caption", { className: classNames(unwrappedTableModel.caption), children: caption })), _jsx("thead", { className: classNames(unwrappedTableModel.thead), children: _jsxs("tr", { "aria-rowindex": 1, className: classNames(unwrappedTableModel.theadTr), children: [prefixHeader, showSelectCol && (_jsx(SelectAllHeaderCell, { style: getWidthStyle(selectModel === null || selectModel === void 0 ? void 0 : selectModel.selectColWidth), selectionInfo: selectionInfo, onClick: selectAllOnClick, totalRows: rows.length, additionalClasses: unwrappedTableModel.rowSelectColTh, colIndexOffset: prefixHeader ? 1 : 0 })), colHeaderCells, editModel && (_jsx("th", { "aria-colindex": cols.length + 1 + (showSelectCol ? 1 : 0), className: classNames(unwrappedTableModel.editColTh), style: getWidthStyle(editModel === null || editModel === void 0 ? void 0 : editModel.editColWidth), children: "Edit Controls" }))] }) }), _jsx("tbody", { className: classNames(unwrappedTableModel.tbody), children: bodyRows })] }));
|
|
54
|
+
return (_jsxs("div", { "data-testid": "rbdg-top-level-div", className: classNames(unwrappedAdditionalStyleModel.topLevelDiv), children: [normalizedTableFilterModel && !useToolbar && (_jsxs("div", { "data-testid": "rbdg-filter-inputs-div", className: classNames(unwrappedAdditionalStyleModel.filterInputsDiv), children: [_jsx(ToggleButton, { isActive: filterOptionsVisible, label: `${filterOptionsVisible ? "Hide" : "Show "} Filter Options`, onClick: handleToggleFilterOptions, classes: (_a = styleModel === null || styleModel === void 0 ? void 0 : styleModel.additionalComponentsStyleModel) === null || _a === void 0 ? void 0 : _a.filterUiToggleButton }), filterOptionsVisible && (_jsx(FilterOptionsTable, { caption: filterModel.filterTableCaption, filterState: filterState, setFilterState: normalizedTableFilterModel.setTableFilterState, styleModel: styleModel === null || styleModel === void 0 ? void 0 : styleModel.filterInputTableStyleModel }))] })), useToolbar && (_jsx(ToolbarContainer, { interfaces: toolbarInterfaces, styleModel: styleModel === null || styleModel === void 0 ? void 0 : styleModel.toolbarStyleModel })), _jsxs("div", { "data-testid": "rbdg-table-and-pagination-div", className: classNames(unwrappedAdditionalStyleModel.tableAndPaginationDiv), children: [responsive ? (_jsx("div", { "data-testid": "rbdg-table-div", className: "table-responsive", children: mainTable })) : (_jsx(_Fragment, { children: mainTable })), normalizedModel && (_jsx(Pagination, { normalizedModel: normalizedModel, prePagingNumRows: sortedRows.length, containerDivClasses: unwrappedAdditionalStyleModel.paginationUiDiv }))] })] }));
|
|
56
55
|
};
|
|
57
56
|
export default InternalGrid;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import classNames from "classnames";
|
|
3
|
-
|
|
3
|
+
const stopPropagationWrapper = (fn) => (event) => {
|
|
4
4
|
event.stopPropagation();
|
|
5
5
|
fn();
|
|
6
|
-
};
|
|
7
|
-
|
|
8
|
-
var ariaColIndex = _a.ariaColIndex, beginEditingCallback = _a.beginEditingCallback, cancelEditingCallback = _a.cancelEditingCallback, isEditing = _a.isEditing, saveCallback = _a.saveCallback, deleteCallback = _a.deleteCallback, editControlsCellClasses = _a.editControlsCellClasses, saveButtonClasses = _a.saveButtonClasses, deleteButtonClasses = _a.deleteButtonClasses, startButtonClasses = _a.startButtonClasses, cancelButtonClasses = _a.cancelButtonClasses;
|
|
6
|
+
};
|
|
7
|
+
const EditControlsCell = ({ ariaColIndex, beginEditingCallback, cancelEditingCallback, isEditing, saveCallback, deleteCallback, editControlsCellClasses, saveButtonClasses, deleteButtonClasses, startButtonClasses, cancelButtonClasses, }) => {
|
|
9
8
|
return (_jsx("td", { "aria-colindex": ariaColIndex, className: classNames(editControlsCellClasses), children: _jsx("div", { className: "hstack gap-2", children: isEditing ? (_jsxs(_Fragment, { children: [_jsx("button", { "aria-label": "Cancel", className: classNames("btn", cancelButtonClasses.length === 0
|
|
10
9
|
? ["btn-secondary"]
|
|
11
10
|
: cancelButtonClasses), onClick: stopPropagationWrapper(cancelEditingCallback), title: "Cancel", children: _jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", fill: "currentColor", viewBox: "0 0 16 16", children: _jsx("path", { d: "M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0M5.354 4.646a.5.5 0 1 0-.708.708L7.293 8l-2.647 2.646a.5.5 0 0 0 .708.708L8 8.707l2.646 2.647a.5.5 0 0 0 .708-.708L8.707 8l2.647-2.646a.5.5 0 0 0-.708-.708L8 7.293z" }) }) }), _jsx("button", { "aria-label": "Save", className: classNames("btn", saveButtonClasses.length === 0
|
|
@@ -5,7 +5,7 @@ import { dateToDatetimeInputStr, dateToInputStr } from "../util/datetime";
|
|
|
5
5
|
import EditControlsCell from "./EditControlsCell";
|
|
6
6
|
import classNames from "classnames";
|
|
7
7
|
import getWidthStyle from "../util/getWidthStyle";
|
|
8
|
-
|
|
8
|
+
const initValueToFormValue = (value, type) => {
|
|
9
9
|
switch (type) {
|
|
10
10
|
case "date":
|
|
11
11
|
return dateToInputStr(value);
|
|
@@ -17,7 +17,7 @@ var initValueToFormValue = function (value, type) {
|
|
|
17
17
|
return value;
|
|
18
18
|
}
|
|
19
19
|
};
|
|
20
|
-
|
|
20
|
+
const colDataTypeToInputType = (colDataType) => {
|
|
21
21
|
switch (colDataType) {
|
|
22
22
|
case "date":
|
|
23
23
|
return "date";
|
|
@@ -29,21 +29,18 @@ var colDataTypeToInputType = function (colDataType) {
|
|
|
29
29
|
return "text";
|
|
30
30
|
}
|
|
31
31
|
};
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
for (var _i = 0, _a = Array.from(trRef.current.children); _i < _a.length; _i++) {
|
|
40
|
-
var rowChild = _a[_i];
|
|
32
|
+
const EditableRow = ({ ariaColIndexOffset, cellData, children, updateCallback, deleteCallback, onClick, className, "aria-rowindex": ariaRowIndex, "aria-selected": ariaSelected, dataRowId, dataCellClasses, dataCellInputClasses, editCellClasses, saveButtonClasses, startButtonClasses, cancelButtonClasses, deleteButtonClasses, editControlCellStyles, }) => {
|
|
33
|
+
const trRef = useRef(null);
|
|
34
|
+
const [isEditing, setIsEditing] = useState(false);
|
|
35
|
+
const handleSave = () => {
|
|
36
|
+
let failedValidationFound = false;
|
|
37
|
+
const formValues = [];
|
|
38
|
+
for (const rowChild of Array.from(trRef.current.children)) {
|
|
41
39
|
if (!(rowChild instanceof HTMLTableCellElement)) {
|
|
42
40
|
console.warn("Found non-td element inside EditableRow");
|
|
43
41
|
continue;
|
|
44
42
|
}
|
|
45
|
-
for (
|
|
46
|
-
var cellChild = _c[_b];
|
|
43
|
+
for (const cellChild of Array.from(rowChild.children)) {
|
|
47
44
|
if (!(cellChild instanceof HTMLInputElement) ||
|
|
48
45
|
cellChild.type === "checkbox" ||
|
|
49
46
|
cellChild.type === "radio") {
|
|
@@ -60,9 +57,6 @@ var EditableRow = function (_a) {
|
|
|
60
57
|
setIsEditing(false);
|
|
61
58
|
}
|
|
62
59
|
};
|
|
63
|
-
return (_jsxs("tr", { ref: trRef, onClick: onClick, className: className, "aria-rowindex": ariaRowIndex, "aria-selected": ariaSelected, "data-rowid": dataRowId, children: [children, cellData.map(
|
|
64
|
-
var type = _a.type, value = _a.value, formattedValue = _a.formattedValue, label = _a.label, width = _a.width;
|
|
65
|
-
return (_jsx("td", { "aria-colindex": index + ariaColIndexOffset + 1, className: classNames(dataCellClasses(index)), style: getWidthStyle(width), children: isEditing && !!updateCallback ? (_jsx("input", { "aria-label": label, name: "editable-cell-input-".concat(dataRowId, "-").concat(index), className: classNames("form-control", dataCellInputClasses(index)), type: colDataTypeToInputType(type), defaultValue: initValueToFormValue(value, type), required: type !== "string" })) : (formattedValue) }, index));
|
|
66
|
-
}), updateCallback && (_jsx(EditControlsCell, { ariaColIndex: ariaColIndexOffset + cellData.length + 1, beginEditingCallback: function () { return setIsEditing(true); }, cancelEditingCallback: function () { return setIsEditing(false); }, isEditing: isEditing, saveCallback: handleSave, deleteCallback: deleteCallback, editControlsCellClasses: editCellClasses, startButtonClasses: startButtonClasses, deleteButtonClasses: deleteButtonClasses, cancelButtonClasses: cancelButtonClasses, saveButtonClasses: saveButtonClasses, style: editControlCellStyles }))] }));
|
|
60
|
+
return (_jsxs("tr", { ref: trRef, onClick: onClick, className: className, "aria-rowindex": ariaRowIndex, "aria-selected": ariaSelected, "data-rowid": dataRowId, children: [children, cellData.map(({ type, value, formattedValue, label, width }, index) => (_jsx("td", { "aria-colindex": index + ariaColIndexOffset + 1, className: classNames(dataCellClasses(index)), style: getWidthStyle(width), children: isEditing && !!updateCallback ? (_jsx("input", { "aria-label": label, name: `editable-cell-input-${dataRowId}-${index}`, className: classNames("form-control", dataCellInputClasses(index)), type: colDataTypeToInputType(type), defaultValue: initValueToFormValue(value, type), required: type !== "string" })) : (formattedValue) }, index))), updateCallback && (_jsx(EditControlsCell, { ariaColIndex: ariaColIndexOffset + cellData.length + 1, beginEditingCallback: () => setIsEditing(true), cancelEditingCallback: () => setIsEditing(false), isEditing: isEditing, saveCallback: handleSave, deleteCallback: deleteCallback, editControlsCellClasses: editCellClasses, startButtonClasses: startButtonClasses, deleteButtonClasses: deleteButtonClasses, cancelButtonClasses: cancelButtonClasses, saveButtonClasses: saveButtonClasses, style: editControlCellStyles }))] }));
|
|
67
61
|
};
|
|
68
62
|
export default EditableRow;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
inputStrs.forEach(
|
|
4
|
-
|
|
1
|
+
const inputStrsToRowData = (cols, inputStrs) => {
|
|
2
|
+
const newRow = {};
|
|
3
|
+
inputStrs.forEach((value, index) => {
|
|
4
|
+
const col = cols[index];
|
|
5
5
|
switch (col.type) {
|
|
6
6
|
case "string":
|
|
7
7
|
newRow[col.name] = value;
|
|
@@ -1,57 +1,42 @@
|
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
2
|
import { useId, useState } from "react";
|
|
14
3
|
import classNames from "classnames";
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
var _c = useState({
|
|
4
|
+
const ExportForm = ({ exportFnInfo: { exportFn, formattersExist, paginationEnabled, filteringEnabled, rowCounts, }, styleModel, }) => {
|
|
5
|
+
const formId = useId();
|
|
6
|
+
const [formState, setFormState] = useState({
|
|
19
7
|
stage: "original",
|
|
20
8
|
formatted: false,
|
|
21
9
|
fileType: "json",
|
|
22
|
-
})
|
|
23
|
-
|
|
24
|
-
return
|
|
25
|
-
setFormState(
|
|
26
|
-
var _a;
|
|
27
|
-
return (__assign(__assign({}, prev), (_a = {}, _a[field] = value, _a)));
|
|
28
|
-
});
|
|
10
|
+
});
|
|
11
|
+
const getChangeHandler = (field, value) => {
|
|
12
|
+
return () => {
|
|
13
|
+
setFormState((prev) => (Object.assign(Object.assign({}, prev), { [field]: value })));
|
|
29
14
|
};
|
|
30
15
|
};
|
|
31
|
-
|
|
16
|
+
const getRowCountLabel = (featureType, count) => {
|
|
32
17
|
if (count === undefined) {
|
|
33
|
-
return
|
|
18
|
+
return `${featureType} disabled`;
|
|
34
19
|
}
|
|
35
|
-
return
|
|
20
|
+
return `${count} ${count === 1 ? "row" : "rows"}`;
|
|
36
21
|
};
|
|
37
|
-
|
|
22
|
+
const stageOptions = [
|
|
38
23
|
{
|
|
39
24
|
value: "original",
|
|
40
|
-
label:
|
|
25
|
+
label: `Original rows (total ${rowCounts.total} ${rowCounts.total === 1 ? "row" : "rows"})`,
|
|
41
26
|
disabled: false,
|
|
42
27
|
},
|
|
43
28
|
{
|
|
44
29
|
value: "filtered",
|
|
45
|
-
label:
|
|
30
|
+
label: `After filters applied (${getRowCountLabel("filtering", rowCounts.filtered)})`,
|
|
46
31
|
disabled: !filteringEnabled,
|
|
47
32
|
},
|
|
48
33
|
{
|
|
49
34
|
value: "paged",
|
|
50
|
-
label:
|
|
35
|
+
label: `Current page only (${getRowCountLabel("pagination", rowCounts.currentPage)})`,
|
|
51
36
|
disabled: !paginationEnabled,
|
|
52
37
|
},
|
|
53
38
|
];
|
|
54
|
-
|
|
39
|
+
const formatOptions = [
|
|
55
40
|
{
|
|
56
41
|
formatted: false,
|
|
57
42
|
label: "Use original data",
|
|
@@ -59,11 +44,11 @@ var ExportForm = function (_a) {
|
|
|
59
44
|
},
|
|
60
45
|
{
|
|
61
46
|
formatted: true,
|
|
62
|
-
label:
|
|
47
|
+
label: `Apply formatters to data${formattersExist ? "" : " (no formatters defined)"}`,
|
|
63
48
|
disabled: !formattersExist,
|
|
64
49
|
},
|
|
65
50
|
];
|
|
66
|
-
|
|
51
|
+
const fileTypeOptions = [
|
|
67
52
|
{
|
|
68
53
|
fileType: "json",
|
|
69
54
|
label: "JSON",
|
|
@@ -73,25 +58,16 @@ var ExportForm = function (_a) {
|
|
|
73
58
|
label: "CSV",
|
|
74
59
|
},
|
|
75
60
|
];
|
|
76
|
-
|
|
61
|
+
const handleSubmit = (event) => {
|
|
77
62
|
event.preventDefault();
|
|
78
|
-
|
|
63
|
+
const { stage, fileType, formatted } = formState;
|
|
79
64
|
exportFn(stage, fileType, formatted);
|
|
80
65
|
};
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
return (_jsxs("form", { onSubmit: handleSubmit, children: [_jsxs("fieldset", { children: [_jsx("legend", { className: legendClasses, children: "Choose data to export" }), stageOptions.map(
|
|
87
|
-
var value = _a.value, label = _a.label, disabled = _a.disabled;
|
|
88
|
-
return (_jsxs("div", { className: radioContainerClasses, children: [_jsx("input", { className: radioInputClasses, type: "radio", id: "".concat(formId, "-").concat(value), value: value, checked: formState.stage === value, onChange: getChangeHandler("stage", value), disabled: disabled }), _jsx("label", { className: radioLabelClasses, htmlFor: "".concat(formId, "-").concat(value), children: label })] }, value));
|
|
89
|
-
})] }), _jsxs("fieldset", { children: [_jsx("legend", { className: legendClasses, children: "Choose whether to apply formatters" }), formatOptions.map(function (_a) {
|
|
90
|
-
var formatted = _a.formatted, label = _a.label, disabled = _a.disabled;
|
|
91
|
-
return (_jsxs("div", { className: radioContainerClasses, children: [_jsx("input", { className: radioInputClasses, type: "radio", id: "".concat(formId, "-").concat(formatted), value: String(formatted), checked: formState.formatted === formatted, onChange: getChangeHandler("formatted", formatted), disabled: disabled }), _jsx("label", { className: radioLabelClasses, htmlFor: "".concat(formId, "-").concat(formatted), children: label })] }, String(formatted)));
|
|
92
|
-
})] }), _jsxs("fieldset", { children: [_jsx("legend", { className: legendClasses, children: "Choose the file type" }), fileTypeOptions.map(function (_a) {
|
|
93
|
-
var fileType = _a.fileType, label = _a.label;
|
|
94
|
-
return (_jsxs("div", { className: radioContainerClasses, children: [_jsx("input", { className: radioInputClasses, type: "radio", id: "".concat(formId, "-").concat(fileType), value: fileType, checked: formState.fileType === fileType, onChange: getChangeHandler("fileType", fileType) }), _jsx("label", { className: radioLabelClasses, htmlFor: "".concat(formId, "-").concat(fileType), children: label })] }, fileType));
|
|
95
|
-
})] }), _jsx("button", { type: "submit", className: submitButtonClasses, children: "Submit" })] }));
|
|
66
|
+
const legendClasses = classNames((styleModel === null || styleModel === void 0 ? void 0 : styleModel.legend) || []);
|
|
67
|
+
const radioContainerClasses = classNames((styleModel === null || styleModel === void 0 ? void 0 : styleModel.radioContainer) || ["form-check"]);
|
|
68
|
+
const radioInputClasses = classNames((styleModel === null || styleModel === void 0 ? void 0 : styleModel.radioInput) || ["form-check-input"]);
|
|
69
|
+
const radioLabelClasses = classNames((styleModel === null || styleModel === void 0 ? void 0 : styleModel.radioLabel) || ["form-check-label"]);
|
|
70
|
+
const submitButtonClasses = classNames((styleModel === null || styleModel === void 0 ? void 0 : styleModel.submitButton) || ["btn", "btn-secondary"]);
|
|
71
|
+
return (_jsxs("form", { onSubmit: handleSubmit, children: [_jsxs("fieldset", { children: [_jsx("legend", { className: legendClasses, children: "Choose data to export" }), stageOptions.map(({ value, label, disabled }) => (_jsxs("div", { className: radioContainerClasses, children: [_jsx("input", { className: radioInputClasses, type: "radio", id: `${formId}-${value}`, value: value, checked: formState.stage === value, onChange: getChangeHandler("stage", value), disabled: disabled }), _jsx("label", { className: radioLabelClasses, htmlFor: `${formId}-${value}`, children: label })] }, value)))] }), _jsxs("fieldset", { children: [_jsx("legend", { className: legendClasses, children: "Choose whether to apply formatters" }), formatOptions.map(({ formatted, label, disabled }) => (_jsxs("div", { className: radioContainerClasses, children: [_jsx("input", { className: radioInputClasses, type: "radio", id: `${formId}-${formatted}`, value: String(formatted), checked: formState.formatted === formatted, onChange: getChangeHandler("formatted", formatted), disabled: disabled }), _jsx("label", { className: radioLabelClasses, htmlFor: `${formId}-${formatted}`, children: label })] }, String(formatted))))] }), _jsxs("fieldset", { children: [_jsx("legend", { className: legendClasses, children: "Choose the file type" }), fileTypeOptions.map(({ fileType, label }) => (_jsxs("div", { className: radioContainerClasses, children: [_jsx("input", { className: radioInputClasses, type: "radio", id: `${formId}-${fileType}`, value: fileType, checked: formState.fileType === fileType, onChange: getChangeHandler("fileType", fileType) }), _jsx("label", { className: radioLabelClasses, htmlFor: `${formId}-${fileType}`, children: label })] }, fileType)))] }), _jsx("button", { type: "submit", className: submitButtonClasses, children: "Submit" })] }));
|
|
96
72
|
};
|
|
97
73
|
export default ExportForm;
|
|
@@ -1,80 +1,56 @@
|
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
1
|
import { dateToDatetimeInputStr, dateToInputStr } from "../util/datetime";
|
|
13
2
|
import Papa from "papaparse";
|
|
14
3
|
import { useCallback, useMemo } from "react";
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
4
|
+
const downloadFile = (data, filename, type) => {
|
|
5
|
+
const blob = new Blob([data], { type });
|
|
6
|
+
const url = URL.createObjectURL(blob);
|
|
7
|
+
const a = document.createElement("a");
|
|
19
8
|
a.href = url;
|
|
20
9
|
a.download = filename;
|
|
21
10
|
a.click();
|
|
22
11
|
a.remove();
|
|
23
|
-
setTimeout(
|
|
12
|
+
setTimeout(() => URL.revokeObjectURL(url), 0);
|
|
24
13
|
};
|
|
25
|
-
|
|
14
|
+
const getDefaultFormatter = (type) => {
|
|
26
15
|
switch (type) {
|
|
27
16
|
case "date":
|
|
28
17
|
return dateToInputStr;
|
|
29
18
|
case "datetime":
|
|
30
19
|
return dateToDatetimeInputStr;
|
|
31
20
|
default:
|
|
32
|
-
return
|
|
21
|
+
return (a) => a;
|
|
33
22
|
}
|
|
34
23
|
};
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
var normalizedFormatter = (!defaultOnly && formatter) || getDefaultFormatter(type);
|
|
24
|
+
const applyFormatters = (rows, cols, defaultOnly) => {
|
|
25
|
+
const colToFormatter = cols.reduce((map, { name, formatter, type }) => {
|
|
26
|
+
const normalizedFormatter = (!defaultOnly && formatter) || getDefaultFormatter(type);
|
|
39
27
|
map.set(name, normalizedFormatter);
|
|
40
28
|
return map;
|
|
41
29
|
}, new Map());
|
|
42
|
-
return rows.map(
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
}, {}),
|
|
51
|
-
});
|
|
52
|
-
});
|
|
53
|
-
};
|
|
54
|
-
var flattenExportRows = function (rows) {
|
|
55
|
-
return rows.map(function (_a) {
|
|
56
|
-
var id = _a.id, data = _a.data;
|
|
57
|
-
return (__assign({ id: id }, data));
|
|
58
|
-
});
|
|
30
|
+
return rows.map(({ id, data }) => ({
|
|
31
|
+
id,
|
|
32
|
+
data: Object.keys(data).reduce((newData, name) => {
|
|
33
|
+
const formatter = colToFormatter.get(name);
|
|
34
|
+
newData[name] = formatter(data[name]);
|
|
35
|
+
return newData;
|
|
36
|
+
}, {}),
|
|
37
|
+
}));
|
|
59
38
|
};
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
39
|
+
const flattenExportRows = (rows) => rows.map(({ id, data }) => (Object.assign({ id }, data)));
|
|
40
|
+
const exportJson = (rows, cols, useDefaultFormatters) => {
|
|
41
|
+
const formattedRows = applyFormatters(rows, cols, useDefaultFormatters);
|
|
42
|
+
const json = JSON.stringify(formattedRows, null, 2);
|
|
63
43
|
downloadFile(json, "export.json", "application/json");
|
|
64
44
|
};
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
45
|
+
const exportCsv = (rows, cols, useDefaultFormatters) => {
|
|
46
|
+
const formattedRows = applyFormatters(rows, cols, useDefaultFormatters);
|
|
47
|
+
const flattenedRows = flattenExportRows(formattedRows);
|
|
48
|
+
const csv = Papa.unparse(flattenedRows, { header: true });
|
|
69
49
|
downloadFile(csv, "export.csv", "text/csv");
|
|
70
50
|
};
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
var formatter = _a.formatter;
|
|
75
|
-
return prev || !!formatter;
|
|
76
|
-
}, false); }, [cols]);
|
|
77
|
-
var exportFn = useCallback(function (stage, fileType, formatted) {
|
|
51
|
+
const useExportFn = ({ rows, cols, filteredRows, currentPageRows, }) => {
|
|
52
|
+
const formattersExist = useMemo(() => cols.reduce((prev, { formatter }) => prev || !!formatter, false), [cols]);
|
|
53
|
+
const exportFn = useCallback((stage, fileType, formatted) => {
|
|
78
54
|
if (stage === "filtered" && !filteredRows) {
|
|
79
55
|
throw Error("Cannot export filtered rows because filtering is not enabled for this grid");
|
|
80
56
|
}
|
|
@@ -84,7 +60,7 @@ var useExportFn = function (_a) {
|
|
|
84
60
|
if (formatted && !formattersExist) {
|
|
85
61
|
throw Error("Cannot export formatted rows because formatters are not defined for this grid");
|
|
86
62
|
}
|
|
87
|
-
|
|
63
|
+
const exportRows = (() => {
|
|
88
64
|
switch (stage) {
|
|
89
65
|
case "filtered":
|
|
90
66
|
return filteredRows;
|
|
@@ -100,9 +76,9 @@ var useExportFn = function (_a) {
|
|
|
100
76
|
}
|
|
101
77
|
exportJson(exportRows, cols, !formatted);
|
|
102
78
|
}, [cols, currentPageRows, filteredRows, formattersExist, rows]);
|
|
103
|
-
return useMemo(
|
|
104
|
-
exportFn
|
|
105
|
-
formattersExist
|
|
79
|
+
return useMemo(() => ({
|
|
80
|
+
exportFn,
|
|
81
|
+
formattersExist,
|
|
106
82
|
paginationEnabled: !!currentPageRows,
|
|
107
83
|
filteringEnabled: !!filteredRows,
|
|
108
84
|
rowCounts: {
|
|
@@ -110,6 +86,6 @@ var useExportFn = function (_a) {
|
|
|
110
86
|
filtered: filteredRows === null || filteredRows === void 0 ? void 0 : filteredRows.length,
|
|
111
87
|
currentPage: currentPageRows === null || currentPageRows === void 0 ? void 0 : currentPageRows.length,
|
|
112
88
|
},
|
|
113
|
-
})
|
|
89
|
+
}), [currentPageRows, exportFn, filteredRows, formattersExist, rows.length]);
|
|
114
90
|
};
|
|
115
91
|
export default useExportFn;
|
|
@@ -1,45 +1,29 @@
|
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
2
|
import { useId } from "react";
|
|
14
3
|
import { dateFilterSchemeNames, } from "./types";
|
|
15
4
|
import FilterRow from "./FilterRow";
|
|
16
5
|
import classNames from "classnames";
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
var target = _a.target;
|
|
21
|
-
setFilterState(__assign(__assign({}, filterState), { scheme: target.value }));
|
|
6
|
+
const DateFilterRow = ({ ariaRowIndex, includeTime, columnLabel, filterState, setFilterState, schemeSelectClasses, enableInputClasses, startDateInputClasses, endDateInputClasses, tdClasses, trClasses, }) => {
|
|
7
|
+
const handleOpChange = ({ target, }) => {
|
|
8
|
+
setFilterState(Object.assign(Object.assign({}, filterState), { scheme: target.value }));
|
|
22
9
|
};
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
setFilterState(__assign(__assign({}, filterState), { enabled: target.checked }));
|
|
10
|
+
const handleEnabledChange = ({ target, }) => {
|
|
11
|
+
setFilterState(Object.assign(Object.assign({}, filterState), { enabled: target.checked }));
|
|
26
12
|
};
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
setFilterState(__assign(__assign({}, filterState), { startDate: target.value }));
|
|
13
|
+
const handleStartValueChange = ({ target, }) => {
|
|
14
|
+
setFilterState(Object.assign(Object.assign({}, filterState), { startDate: target.value }));
|
|
30
15
|
};
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
setFilterState(__assign(__assign({}, filterState), { endDate: target.value }));
|
|
16
|
+
const handleEndValueChange = ({ target, }) => {
|
|
17
|
+
setFilterState(Object.assign(Object.assign({}, filterState), { endDate: target.value }));
|
|
34
18
|
};
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
19
|
+
const { enabled, scheme, startDate, endDate } = filterState;
|
|
20
|
+
const inputType = includeTime ? "datetime-local" : "date";
|
|
21
|
+
const inputId = useId();
|
|
22
|
+
const startDateInputId = `$startDate-${inputId}`;
|
|
23
|
+
const endDateInputId = `$endDate-${inputId}`;
|
|
24
|
+
const startDateInputLabel = `${columnLabel} Column Filter Start Date`;
|
|
25
|
+
const endDateInputLabel = `${columnLabel} Column Filter End Date`;
|
|
26
|
+
const searchStringInputCellContents = (_jsxs(_Fragment, { children: [scheme !== "endAt" && (_jsxs(_Fragment, { children: [scheme === "between" && (_jsx("label", { htmlFor: startDateInputId, children: "Start Date" })), _jsx("input", { id: startDateInputId, className: classNames("form-control", startDateInputClasses), type: inputType, required: enabled, disabled: !enabled, value: startDate, onChange: handleStartValueChange, "aria-label": startDateInputLabel })] })), scheme !== "startFrom" && (_jsxs(_Fragment, { children: [scheme === "between" && (_jsx("label", { htmlFor: endDateInputId, children: "End Date" })), _jsx("input", { id: endDateInputId, className: classNames("form-control", endDateInputClasses), type: inputType, required: enabled, disabled: !enabled, value: endDate, onChange: handleEndValueChange, "aria-label": endDateInputLabel })] }))] }));
|
|
43
27
|
return (_jsx(FilterRow, { ariaRowIndex: ariaRowIndex, columnLabel: columnLabel, typeLabel: filterState.type === "date" ? "Date" : "Datetime", enabled: enabled, enabledChangeHandler: handleEnabledChange, currentScheme: scheme, handleSchemeChange: handleOpChange, schemesToLabels: dateFilterSchemeNames, searchStringInputCellContents: searchStringInputCellContents, trClasses: trClasses, tdClasses: tdClasses, inputClasses: enableInputClasses, selectClasses: schemeSelectClasses }));
|
|
44
28
|
};
|
|
45
29
|
export default DateFilterRow;
|