@absreim/react-bootstrap-data-grid 2.7.0 → 4.0.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.
Files changed (162) hide show
  1. package/common/constants.d.ts +2 -0
  2. package/common/constants.js +2 -0
  3. package/common/editing/types.d.ts +7 -0
  4. package/{export → common/export}/ExportForm.d.ts +1 -0
  5. package/{export → common/export}/ExportForm.js +3 -3
  6. package/{filtering → common/filtering}/DateFilterRow.d.ts +4 -4
  7. package/{filtering → common/filtering}/DateFilterRow.js +1 -1
  8. package/common/filtering/FilterOptionsTable.d.ts +12 -0
  9. package/{filtering → common/filtering}/FilterOptionsTable.js +17 -20
  10. package/{filtering → common/filtering}/FilterRow.d.ts +4 -4
  11. package/{filtering → common/filtering}/FilterRow.js +1 -10
  12. package/{filtering → common/filtering}/NumberFilterRow.d.ts +3 -3
  13. package/{filtering → common/filtering}/NumberFilterRow.js +1 -1
  14. package/{filtering → common/filtering}/StringFilterRow.d.ts +3 -3
  15. package/{filtering → common/filtering}/StringFilterRow.js +1 -1
  16. package/{filtering → common/filtering}/types.d.ts +6 -6
  17. package/common/filtering/useFilterFormState.d.ts +3 -0
  18. package/{index.d.ts → common/index.d.ts} +8 -7
  19. package/{index.js → common/index.js} +8 -7
  20. package/{pagination → common/pagination}/PageSelector.d.ts +1 -1
  21. package/{pagination → common/pagination}/PageSizeSelector.d.ts +1 -1
  22. package/{pagination → common/pagination}/Pagination.d.ts +1 -1
  23. package/{pagination → common/pagination}/Pagination.js +6 -3
  24. package/{pagination → common/pagination}/types.d.ts +3 -2
  25. package/{pipeline → common/pipeline}/useAugFormattedRows.d.ts +1 -1
  26. package/common/pipeline/useColNameToWidth.d.ts +3 -0
  27. package/common/pipeline/useColNameToWidth.js +12 -0
  28. package/{pipeline → common/pipeline}/useCombinedPipeline/index.d.ts +4 -4
  29. package/{pipeline → common/pipeline}/useCombinedPipeline/useCurrentPageRows.d.ts +3 -3
  30. package/{pipeline → common/pipeline}/useCombinedPipeline/useDisplayRows.d.ts +1 -1
  31. package/{pipeline → common/pipeline}/useCombinedPipeline/useDisplayRows.js +1 -2
  32. package/common/pipeline/useCombinedPipeline/useFilter.d.ts +4 -0
  33. package/common/pipeline/useCombinedPipeline/useFilterStateFromEditable.d.ts +4 -0
  34. package/{pipeline → common/pipeline}/useCombinedPipeline/useSortedRows.d.ts +2 -2
  35. package/{pipeline → common/pipeline}/useGridSelectionFns.d.ts +2 -2
  36. package/{sorting → common/sorting}/types.d.ts +3 -3
  37. package/{main/ColHeaderCell → common/sorting}/useSortHeaderStates.d.ts +2 -2
  38. package/{main/ColHeaderCell → common/sorting}/useSortHeaderStates.js +4 -4
  39. package/common/styling/types.d.ts +21 -0
  40. package/{toolbar → common/toolbar}/ToolbarContainer.d.ts +2 -2
  41. package/{toolbar → common/toolbar}/ToolbarContainer.js +11 -7
  42. package/common/toolbar/types.d.ts +11 -0
  43. package/common/toolbar/useInterfaces.d.ts +3 -0
  44. package/{toolbar → common/toolbar}/useInterfaces.js +9 -6
  45. package/{types.d.ts → common/types.d.ts} +24 -34
  46. package/common/util/index.d.ts +5 -0
  47. package/common/util/index.js +5 -0
  48. package/community/index.d.ts +4 -0
  49. package/community/index.js +4 -0
  50. package/grid/constants.d.ts +2 -0
  51. package/grid/constants.js +2 -0
  52. package/grid/index.d.ts +3 -0
  53. package/grid/index.js +3 -0
  54. package/{Grid.d.ts → grid/main/Grid.d.ts} +0 -1
  55. package/grid/main/Grid.js +60 -0
  56. package/grid/main/GridBody.d.ts +4 -0
  57. package/grid/main/GridBody.js +17 -0
  58. package/grid/main/GridHeader.d.ts +4 -0
  59. package/grid/main/GridHeader.js +12 -0
  60. package/grid/main/getWidthStyles.d.ts +3 -0
  61. package/grid/main/getWidthStyles.js +6 -0
  62. package/grid/main/types.d.ts +32 -0
  63. package/grid/main/types.js +1 -0
  64. package/grid.css +1 -0
  65. package/grid.scss +231 -0
  66. package/package.json +1 -1
  67. package/table/InternalTable.d.ts +21 -0
  68. package/table/InternalTable.js +59 -0
  69. package/table/Table.d.ts +5 -0
  70. package/{Grid.js → table/Table.js} +11 -21
  71. package/{editing → table/editing}/EditControlsCell.d.ts +5 -5
  72. package/table/editing/EditControlsCell.js +11 -0
  73. package/{editing → table/editing}/EditableRow.d.ts +8 -9
  74. package/{editing → table/editing}/EditableRow.js +3 -3
  75. package/table/index.d.ts +5 -0
  76. package/table/index.js +5 -0
  77. package/table/main/BodyRows.d.ts +22 -0
  78. package/table/main/BodyRows.js +34 -0
  79. package/{main → table/main}/ColHeaderCell/index.js +3 -3
  80. package/{selection → table/selection}/SelectAllHeaderCell.d.ts +2 -2
  81. package/{selection → table/selection}/SelectAllHeaderCell.js +2 -4
  82. package/{selection → table/selection}/SelectionInput.d.ts +1 -1
  83. package/table/styling/types.d.ts +41 -0
  84. package/table/styling/types.js +1 -0
  85. package/table/types.d.ts +19 -0
  86. package/table/types.js +1 -0
  87. package/InternalGrid.d.ts +0 -23
  88. package/InternalGrid.js +0 -57
  89. package/editing/EditControlsCell.js +0 -19
  90. package/editing/types.d.ts +0 -16
  91. package/filtering/FilterOptionsTable.d.ts +0 -11
  92. package/filtering/useFilterFormState.d.ts +0 -3
  93. package/main/BodyRows.d.ts +0 -22
  94. package/main/BodyRows.js +0 -18
  95. package/main/ToggleButton.d.ts +0 -9
  96. package/main/ToggleButton.js +0 -14
  97. package/pipeline/useCombinedPipeline/useEditableFromFilterState.d.ts +0 -3
  98. package/pipeline/useCombinedPipeline/useEditableFromFilterState.js +0 -14
  99. package/pipeline/useCombinedPipeline/useFilter.d.ts +0 -4
  100. package/pipeline/useCombinedPipeline/useFilterStateFromEditable.d.ts +0 -4
  101. package/pipeline/useUnwrappedGridStyles.d.ts +0 -7
  102. package/pipeline/useUnwrappedGridStyles.js +0 -17
  103. package/styling/styleModelUnwrappers.d.ts +0 -4
  104. package/styling/styleModelUnwrappers.js +0 -58
  105. package/styling/types.d.ts +0 -62
  106. package/toolbar/types.d.ts +0 -3
  107. package/toolbar/useInterfaces.d.ts +0 -9
  108. /package/{editing → common/editing}/inputStrsToRowData.d.ts +0 -0
  109. /package/{editing → common/editing}/inputStrsToRowData.js +0 -0
  110. /package/{editing → common/editing}/types.js +0 -0
  111. /package/{export → common/export}/types.d.ts +0 -0
  112. /package/{export → common/export}/types.js +0 -0
  113. /package/{export → common/export}/useExportFn.d.ts +0 -0
  114. /package/{export → common/export}/useExportFn.js +0 -0
  115. /package/{filtering → common/filtering}/types.js +0 -0
  116. /package/{filtering → common/filtering}/useFilterFormState.js +0 -0
  117. /package/{pagination → common/pagination}/PageSelector.js +0 -0
  118. /package/{pagination → common/pagination}/PageSizeSelector.js +0 -0
  119. /package/{pagination → common/pagination}/types.js +0 -0
  120. /package/{pipeline → common/pipeline}/types.d.ts +0 -0
  121. /package/{pipeline → common/pipeline}/types.js +0 -0
  122. /package/{pipeline → common/pipeline}/useAugFormattedRows.js +0 -0
  123. /package/{pipeline → common/pipeline}/useCombinedPipeline/index.js +0 -0
  124. /package/{pipeline → common/pipeline}/useCombinedPipeline/useCurrentPageRows.js +0 -0
  125. /package/{pipeline → common/pipeline}/useCombinedPipeline/useFilter.js +0 -0
  126. /package/{pipeline → common/pipeline}/useCombinedPipeline/useFilterStateFromEditable.js +0 -0
  127. /package/{pipeline → common/pipeline}/useCombinedPipeline/useFilterStateStore.d.ts +0 -0
  128. /package/{pipeline → common/pipeline}/useCombinedPipeline/useFilterStateStore.js +0 -0
  129. /package/{pipeline → common/pipeline}/useCombinedPipeline/useSortedRows.js +0 -0
  130. /package/{pipeline → common/pipeline}/useGetInputStrSubmitCallback.d.ts +0 -0
  131. /package/{pipeline → common/pipeline}/useGetInputStrSubmitCallback.js +0 -0
  132. /package/{pipeline → common/pipeline}/useGridSelectionFns.js +0 -0
  133. /package/{selection → common/selection}/types.d.ts +0 -0
  134. /package/{selection → common/selection}/types.js +0 -0
  135. /package/{sorting → common/sorting}/arrowPlaceholder.d.ts +0 -0
  136. /package/{sorting → common/sorting}/arrowPlaceholder.js +0 -0
  137. /package/{sorting → common/sorting}/downArrow.d.ts +0 -0
  138. /package/{sorting → common/sorting}/downArrow.js +0 -0
  139. /package/{sorting → common/sorting}/sortOrderToAriaSort.d.ts +0 -0
  140. /package/{sorting → common/sorting}/sortOrderToAriaSort.js +0 -0
  141. /package/{sorting → common/sorting}/types.js +0 -0
  142. /package/{sorting → common/sorting}/upArrow.d.ts +0 -0
  143. /package/{sorting → common/sorting}/upArrow.js +0 -0
  144. /package/{styling → common/styling}/types.js +0 -0
  145. /package/{toolbar → common/toolbar}/Toolbar.d.ts +0 -0
  146. /package/{toolbar → common/toolbar}/Toolbar.js +0 -0
  147. /package/{toolbar → common/toolbar}/types.js +0 -0
  148. /package/{types.js → common/types.js} +0 -0
  149. /package/{util → common/util}/datetime.d.ts +0 -0
  150. /package/{util → common/util}/datetime.js +0 -0
  151. /package/{util → common/util}/getWidthStyle.d.ts +0 -0
  152. /package/{util → common/util}/getWidthStyle.js +0 -0
  153. /package/{util → common/util}/isSubset.d.ts +0 -0
  154. /package/{util → common/util}/isSubset.js +0 -0
  155. /package/{util → common/util}/trueModulo.d.ts +0 -0
  156. /package/{util → common/util}/trueModulo.js +0 -0
  157. /package/{util → common/util}/useControlledHover.d.ts +0 -0
  158. /package/{util → common/util}/useControlledHover.js +0 -0
  159. /package/{main → table/main}/ColHeaderCell/index.d.ts +0 -0
  160. /package/{selection → table/selection}/SelectionInput.js +0 -0
  161. /package/{style.css → table.css} +0 -0
  162. /package/{style.scss → table.scss} +0 -0
@@ -0,0 +1,2 @@
1
+ export declare const DEFAULT_COL_WIDTH = 100;
2
+ export declare const CSS_PREFIX = "rbdg-grid";
@@ -0,0 +1,2 @@
1
+ export var DEFAULT_COL_WIDTH = 100;
2
+ export var CSS_PREFIX = "rbdg-grid";
@@ -0,0 +1,7 @@
1
+ import { RowData, RowId } from "../types";
2
+ export type UpdateCallbackGenerator = (id: RowId) => (rowData: RowData) => void;
3
+ export interface EditModel {
4
+ getUpdateCallback: UpdateCallbackGenerator;
5
+ getDeleteCallback?: (id: RowId) => () => void;
6
+ editColWidth?: number;
7
+ }
@@ -3,6 +3,7 @@ import { FC } from "react";
3
3
  import { ExportFormStyleModel } from "../styling/types";
4
4
  export interface ExportFormProps {
5
5
  exportFnInfo: ExportFnInfo;
6
+ closeCallback: () => void;
6
7
  styleModel?: ExportFormStyleModel;
7
8
  }
8
9
  declare const ExportForm: FC<ExportFormProps>;
@@ -13,7 +13,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
13
  import { useId, useState } from "react";
14
14
  import classNames from "classnames";
15
15
  var ExportForm = function (_a) {
16
- var _b = _a.exportFnInfo, exportFn = _b.exportFn, formattersExist = _b.formattersExist, paginationEnabled = _b.paginationEnabled, filteringEnabled = _b.filteringEnabled, rowCounts = _b.rowCounts, styleModel = _a.styleModel;
16
+ var _b = _a.exportFnInfo, exportFn = _b.exportFn, formattersExist = _b.formattersExist, paginationEnabled = _b.paginationEnabled, filteringEnabled = _b.filteringEnabled, rowCounts = _b.rowCounts, closeCallback = _a.closeCallback, styleModel = _a.styleModel;
17
17
  var formId = useId();
18
18
  var _c = useState({
19
19
  stage: "original",
@@ -82,7 +82,7 @@ var ExportForm = function (_a) {
82
82
  var radioContainerClasses = classNames((styleModel === null || styleModel === void 0 ? void 0 : styleModel.radioContainer) || ["form-check"]);
83
83
  var radioInputClasses = classNames((styleModel === null || styleModel === void 0 ? void 0 : styleModel.radioInput) || ["form-check-input"]);
84
84
  var radioLabelClasses = classNames((styleModel === null || styleModel === void 0 ? void 0 : styleModel.radioLabel) || ["form-check-label"]);
85
- var submitButtonClasses = classNames((styleModel === null || styleModel === void 0 ? void 0 : styleModel.submitButton) || ["btn", "btn-secondary"]);
85
+ var submitButtonClasses = classNames((styleModel === null || styleModel === void 0 ? void 0 : styleModel.submitButton) || ["btn", "btn-primary"]);
86
86
  return (_jsxs("form", { onSubmit: handleSubmit, children: [_jsxs("fieldset", { children: [_jsx("legend", { className: legendClasses, children: "Choose data to export" }), stageOptions.map(function (_a) {
87
87
  var value = _a.value, label = _a.label, disabled = _a.disabled;
88
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));
@@ -92,6 +92,6 @@ var ExportForm = function (_a) {
92
92
  })] }), _jsxs("fieldset", { children: [_jsx("legend", { className: legendClasses, children: "Choose the file type" }), fileTypeOptions.map(function (_a) {
93
93
  var fileType = _a.fileType, label = _a.label;
94
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" })] }));
95
+ })] }), _jsxs("div", { className: "hstack justify-content-end gap-2", children: [_jsx("button", { className: "btn btn-secondary", onClick: closeCallback, type: "button", children: "Cancel" }), _jsx("button", { type: "submit", className: submitButtonClasses, children: "Submit" })] })] }));
96
96
  };
97
97
  export default ExportForm;
@@ -7,10 +7,10 @@ export type DateFilterRowProps = {
7
7
  columnLabel: string;
8
8
  filterState: DateFormFilterState;
9
9
  setFilterState: (filterState: DateFormFilterState) => void;
10
- schemeSelectClasses: string[];
11
- enableInputClasses: string[];
12
- startDateInputClasses: string[];
13
- endDateInputClasses: string[];
10
+ schemeSelectClasses: string[] | null | undefined;
11
+ enableInputClasses: string[] | null | undefined;
12
+ startDateInputClasses: string[] | null | undefined;
13
+ endDateInputClasses: string[] | null | undefined;
14
14
  } & CommonFilterRowStyleProps;
15
15
  declare const DateFilterRow: FC<DateFilterRowProps>;
16
16
  export default DateFilterRow;
@@ -39,7 +39,7 @@ var DateFilterRow = function (_a) {
39
39
  var endDateInputId = "$endDate-".concat(inputId);
40
40
  var startDateInputLabel = "".concat(columnLabel, " Column Filter Start Date");
41
41
  var endDateInputLabel = "".concat(columnLabel, " Column Filter End Date");
42
- var 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 })] }))] }));
42
+ var searchStringInputCellContents = (_jsxs(_Fragment, { children: [scheme !== "endAt" && (_jsxs(_Fragment, { children: [scheme === "between" && (_jsx("label", { htmlFor: startDateInputId, children: "Start Date" })), _jsx("input", { id: startDateInputId, className: classNames(startDateInputClasses || "form-control"), 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(endDateInputClasses || "form-control"), type: inputType, required: enabled, disabled: !enabled, value: endDate, onChange: handleEndValueChange, "aria-label": endDateInputLabel })] }))] }));
43
43
  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
44
  };
45
45
  export default DateFilterRow;
@@ -0,0 +1,12 @@
1
+ import { FC } from "react";
2
+ import { EditableFilterState, FilterState } from "./types";
3
+ import { FilterInputTableStyleModel } from "../../table/styling/types";
4
+ export interface FilterOptionsTableProps {
5
+ filterState: FilterState;
6
+ setFilterState: (filterState: EditableFilterState) => void;
7
+ closeFormCallback: () => void;
8
+ caption?: string;
9
+ styleModel?: FilterInputTableStyleModel;
10
+ }
11
+ declare const FilterOptionsTable: FC<FilterOptionsTableProps>;
12
+ export default FilterOptionsTable;
@@ -9,23 +9,13 @@ var __assign = (this && this.__assign) || function () {
9
9
  };
10
10
  return __assign.apply(this, arguments);
11
11
  };
12
- var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
13
- if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
14
- if (ar || !(i in from)) {
15
- if (!ar) ar = Array.prototype.slice.call(from, 0, i);
16
- ar[i] = from[i];
17
- }
18
- }
19
- return to.concat(ar || Array.prototype.slice.call(from));
20
- };
21
12
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
22
- import { useMemo, useState } from "react";
13
+ import { useState } from "react";
23
14
  import StringFilterRow from "./StringFilterRow";
24
15
  import NumberFilterRow from "./NumberFilterRow";
25
16
  import useFilterFormState from "./useFilterFormState";
26
17
  import DateFilterRow from "./DateFilterRow";
27
18
  import classNames from "classnames";
28
- import { unwrapFilterInputTableStyleModel } from "../styling/styleModelUnwrappers";
29
19
  var convertFilterFormStateToEditableState = function (filterFormState) {
30
20
  return Object.keys(filterFormState).reduce(function (editableState, colName) {
31
21
  var rowFilterFormState = filterFormState[colName];
@@ -73,10 +63,9 @@ var convertFilterFormStateToEditableState = function (filterFormState) {
73
63
  }, {});
74
64
  };
75
65
  var FilterOptionsTable = function (_a) {
76
- var filterState = _a.filterState, setFilterState = _a.setFilterState, caption = _a.caption, styleModel = _a.styleModel;
66
+ var filterState = _a.filterState, setFilterState = _a.setFilterState, caption = _a.caption, styleModel = _a.styleModel, closeFormCallback = _a.closeFormCallback;
77
67
  var formFilterState = useFilterFormState(filterState);
78
68
  var _b = useState(formFilterState), formState = _b[0], setFormState = _b[1];
79
- var unwrappedStyleModel = useMemo(function () { return unwrapFilterInputTableStyleModel(styleModel); }, [styleModel]);
80
69
  var getRows = function () {
81
70
  return Object.keys(formState).map(function (colName, index) {
82
71
  function getColStateSetter(colName) {
@@ -89,19 +78,26 @@ var FilterOptionsTable = function (_a) {
89
78
  var colFilterState = formState[colName];
90
79
  switch (colFilterState.type) {
91
80
  case "string": {
92
- return (_jsx(StringFilterRow, { ariaRowIndex: index + 2, columnLabel: colLabel, filterState: colFilterState, setFilterState: getColStateSetter(colName), schemeSelectClasses: unwrappedStyleModel.schemeSelectionInput(index), enableInputClasses: unwrappedStyleModel.enablementInput(index), searchStringInputClasses: unwrappedStyleModel.searchStringInput(index), trClasses: unwrappedStyleModel.tbodyTr(index), tdClasses: function (colIndex) {
93
- return unwrappedStyleModel.tbodyTd(index, colIndex);
81
+ return (_jsx(StringFilterRow, { ariaRowIndex: index + 2, columnLabel: colLabel, filterState: colFilterState, setFilterState: getColStateSetter(colName), schemeSelectClasses: (styleModel === null || styleModel === void 0 ? void 0 : styleModel.schemeSelectionInput) &&
82
+ (styleModel === null || styleModel === void 0 ? void 0 : styleModel.schemeSelectionInput(index)), enableInputClasses: (styleModel === null || styleModel === void 0 ? void 0 : styleModel.enablementInput) &&
83
+ (styleModel === null || styleModel === void 0 ? void 0 : styleModel.enablementInput(index)), searchStringInputClasses: (styleModel === null || styleModel === void 0 ? void 0 : styleModel.searchStringInput) &&
84
+ (styleModel === null || styleModel === void 0 ? void 0 : styleModel.searchStringInput(index)), trClasses: (styleModel === null || styleModel === void 0 ? void 0 : styleModel.tbodyTr) && (styleModel === null || styleModel === void 0 ? void 0 : styleModel.tbodyTr(index)), tdClasses: function (colIndex) {
85
+ return (styleModel === null || styleModel === void 0 ? void 0 : styleModel.tbodyTd) && (styleModel === null || styleModel === void 0 ? void 0 : styleModel.tbodyTd(index, colIndex));
94
86
  } }, colName));
95
87
  }
96
88
  case "number": {
97
- return (_jsx(NumberFilterRow, { ariaRowIndex: index + 2, columnLabel: colLabel, filterState: colFilterState, setFilterState: getColStateSetter(colName), schemeSelectClasses: unwrappedStyleModel.schemeSelectionInput(index), enableInputClasses: unwrappedStyleModel.enablementInput(index), numberInputClasses: unwrappedStyleModel.numberInput(index), trClasses: unwrappedStyleModel.tbodyTr(index), tdClasses: function (colIndex) {
98
- return unwrappedStyleModel.tbodyTd(index, colIndex);
89
+ return (_jsx(NumberFilterRow, { ariaRowIndex: index + 2, columnLabel: colLabel, filterState: colFilterState, setFilterState: getColStateSetter(colName), schemeSelectClasses: (styleModel === null || styleModel === void 0 ? void 0 : styleModel.schemeSelectionInput) &&
90
+ (styleModel === null || styleModel === void 0 ? void 0 : styleModel.schemeSelectionInput(index)), enableInputClasses: (styleModel === null || styleModel === void 0 ? void 0 : styleModel.enablementInput) &&
91
+ (styleModel === null || styleModel === void 0 ? void 0 : styleModel.enablementInput(index)), numberInputClasses: (styleModel === null || styleModel === void 0 ? void 0 : styleModel.numberInput) && (styleModel === null || styleModel === void 0 ? void 0 : styleModel.numberInput(index)), trClasses: (styleModel === null || styleModel === void 0 ? void 0 : styleModel.tbodyTr) && (styleModel === null || styleModel === void 0 ? void 0 : styleModel.tbodyTr(index)), tdClasses: function (colIndex) {
92
+ return (styleModel === null || styleModel === void 0 ? void 0 : styleModel.tbodyTd) && (styleModel === null || styleModel === void 0 ? void 0 : styleModel.tbodyTd(index, colIndex));
99
93
  } }, colName));
100
94
  }
101
95
  default: {
102
96
  // date or datetime
103
- return (_jsx(DateFilterRow, { ariaRowIndex: index + 2, includeTime: colFilterState.type === "datetime", columnLabel: colLabel, filterState: colFilterState, setFilterState: getColStateSetter(colName), schemeSelectClasses: unwrappedStyleModel.schemeSelectionInput(index), enableInputClasses: unwrappedStyleModel.enablementInput(index), startDateInputClasses: unwrappedStyleModel.startDateInput(index), endDateInputClasses: unwrappedStyleModel.endDateInput(index), trClasses: unwrappedStyleModel.tbodyTr(index), tdClasses: function (colIndex) {
104
- return unwrappedStyleModel.tbodyTd(index, colIndex);
97
+ return (_jsx(DateFilterRow, { ariaRowIndex: index + 2, includeTime: colFilterState.type === "datetime", columnLabel: colLabel, filterState: colFilterState, setFilterState: getColStateSetter(colName), schemeSelectClasses: (styleModel === null || styleModel === void 0 ? void 0 : styleModel.schemeSelectionInput) &&
98
+ (styleModel === null || styleModel === void 0 ? void 0 : styleModel.schemeSelectionInput(index)), enableInputClasses: (styleModel === null || styleModel === void 0 ? void 0 : styleModel.enablementInput) &&
99
+ (styleModel === null || styleModel === void 0 ? void 0 : styleModel.enablementInput(index)), startDateInputClasses: (styleModel === null || styleModel === void 0 ? void 0 : styleModel.startDateInput) && styleModel.startDateInput(index), endDateInputClasses: (styleModel === null || styleModel === void 0 ? void 0 : styleModel.endDateInput) && styleModel.endDateInput(index), trClasses: (styleModel === null || styleModel === void 0 ? void 0 : styleModel.tbodyTr) && (styleModel === null || styleModel === void 0 ? void 0 : styleModel.tbodyTr(index)), tdClasses: function (colIndex) {
100
+ return (styleModel === null || styleModel === void 0 ? void 0 : styleModel.tbodyTd) && (styleModel === null || styleModel === void 0 ? void 0 : styleModel.tbodyTd(index, colIndex));
105
101
  } }, colName));
106
102
  }
107
103
  }
@@ -111,7 +107,8 @@ var FilterOptionsTable = function (_a) {
111
107
  event.preventDefault();
112
108
  var editableTableFilterState = convertFilterFormStateToEditableState(formState);
113
109
  setFilterState(editableTableFilterState);
110
+ closeFormCallback();
114
111
  };
115
- return (_jsxs("form", { onSubmit: onSubmit, className: classNames(styleModel === null || styleModel === void 0 ? void 0 : styleModel.form), children: [_jsxs("table", { className: classNames.apply(void 0, __spreadArray(["table"], unwrappedStyleModel.table, false)), children: [caption && (_jsx("caption", { className: classNames(unwrappedStyleModel.caption), children: caption })), _jsx("thead", { className: classNames.apply(void 0, unwrappedStyleModel.thead), children: _jsx("tr", { className: classNames.apply(void 0, unwrappedStyleModel.theadTr), children: ["Enabled", "Column", "Type", "Operator", "Value"].map(function (colName, index) { return (_jsx("th", { className: classNames.apply(void 0, unwrappedStyleModel.theadTh(index)), children: colName }, index)); }) }) }), _jsx("tbody", { className: classNames.apply(void 0, unwrappedStyleModel.tbody), children: getRows() })] }), _jsx("button", { className: classNames("btn", { "btn-secondary": unwrappedStyleModel.submitButton.length === 0 }, unwrappedStyleModel.submitButton), type: "submit", children: "Submit" })] }));
112
+ return (_jsxs("form", { onSubmit: onSubmit, className: classNames(styleModel === null || styleModel === void 0 ? void 0 : styleModel.form), children: [_jsxs("table", { className: classNames((styleModel === null || styleModel === void 0 ? void 0 : styleModel.table) || "table"), children: [caption && (_jsx("caption", { className: classNames(styleModel === null || styleModel === void 0 ? void 0 : styleModel.caption), children: caption })), _jsx("thead", { className: classNames(styleModel === null || styleModel === void 0 ? void 0 : styleModel.thead), children: _jsx("tr", { className: classNames(styleModel === null || styleModel === void 0 ? void 0 : styleModel.theadTr), children: ["Enabled", "Column", "Type", "Operator", "Value"].map(function (colName, index) { return (_jsx("th", { className: classNames((styleModel === null || styleModel === void 0 ? void 0 : styleModel.theadTh) && styleModel.theadTh(index)), children: colName }, index)); }) }) }), _jsx("tbody", { className: classNames(styleModel === null || styleModel === void 0 ? void 0 : styleModel.tbody), children: getRows() })] }), _jsxs("div", { className: "hstack justify-content-end gap-2", children: [_jsx("button", { className: "btn btn-secondary", onClick: closeFormCallback, type: "button", children: "Cancel" }), _jsx("button", { className: classNames((styleModel === null || styleModel === void 0 ? void 0 : styleModel.submitButton) || ["btn", "btn-primary"]), type: "submit", children: "Submit" })] })] }));
116
113
  };
117
114
  export default FilterOptionsTable;
@@ -9,10 +9,10 @@ export interface FilterRowProps<FilterScheme extends string> {
9
9
  handleSchemeChange: ChangeEventHandler<HTMLSelectElement>;
10
10
  schemesToLabels: Record<FilterScheme, string>;
11
11
  searchStringInputCellContents: ReactNode;
12
- trClasses: string[];
13
- tdClasses: (colIndex: number) => string[];
14
- inputClasses: string[];
15
- selectClasses: string[];
12
+ trClasses: string[] | null | undefined;
13
+ tdClasses: (colIndex: number) => (string[] | null) | undefined;
14
+ inputClasses: string[] | null | undefined;
15
+ selectClasses: string[] | null | undefined;
16
16
  }
17
17
  export type CommonFilterRowStyleProps = Pick<FilterRowProps<string>, "trClasses" | "tdClasses">;
18
18
  export declare function FilterRow<FilterScheme extends string = string>(props: FilterRowProps<FilterScheme>): ReactNode;
@@ -1,18 +1,9 @@
1
- var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
2
- if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
3
- if (ar || !(i in from)) {
4
- if (!ar) ar = Array.prototype.slice.call(from, 0, i);
5
- ar[i] = from[i];
6
- }
7
- }
8
- return to.concat(ar || Array.prototype.slice.call(from));
9
- };
10
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
11
2
  import classNames from "classnames";
12
3
  export function FilterRow(props) {
13
4
  var ariaRowIndex = props.ariaRowIndex, columnLabel = props.columnLabel, typeLabel = props.typeLabel, enabled = props.enabled, enabledChangeHandler = props.enabledChangeHandler, currentScheme = props.currentScheme, handleSchemeChange = props.handleSchemeChange, schemesToLabels = props.schemesToLabels, searchStringInputCellContents = props.searchStringInputCellContents, trClasses = props.trClasses, tdClasses = props.tdClasses, inputClasses = props.inputClasses, selectClasses = props.selectClasses;
14
5
  var checkboxLabel = "".concat(columnLabel, " Column Filter Toggle");
15
6
  var opSelectLabel = "".concat(columnLabel, " Column Filter Operator Selection");
16
- return (_jsxs("tr", { className: classNames(trClasses), "aria-rowindex": ariaRowIndex, children: [_jsx("td", { className: classNames(tdClasses(0)), "aria-colindex": 1, children: _jsx("input", { className: classNames(inputClasses), name: checkboxLabel, "aria-label": checkboxLabel, type: "checkbox", checked: enabled, onChange: enabledChangeHandler }) }), _jsx("td", { className: classNames(tdClasses(1)), "aria-colindex": 2, children: columnLabel }), _jsx("td", { className: classNames(tdClasses(2)), "aria-colindex": 3, children: typeLabel }), _jsx("td", { className: classNames(tdClasses(3)), "aria-colindex": 4, children: _jsx("select", { name: opSelectLabel, "aria-label": opSelectLabel, disabled: !enabled, className: classNames.apply(void 0, __spreadArray(["form-select"], selectClasses, false)), value: currentScheme, onChange: handleSchemeChange, children: Object.keys(schemesToLabels).map(function (scheme) { return (_jsx("option", { value: scheme, children: schemesToLabels[scheme] }, scheme)); }) }) }), _jsx("td", { className: classNames(tdClasses(4)), "aria-colindex": 5, children: searchStringInputCellContents })] }));
7
+ return (_jsxs("tr", { className: classNames(trClasses), "aria-rowindex": ariaRowIndex, children: [_jsx("td", { className: classNames(tdClasses(0)), "aria-colindex": 1, children: _jsx("input", { className: classNames(inputClasses), name: checkboxLabel, "aria-label": checkboxLabel, type: "checkbox", checked: enabled, onChange: enabledChangeHandler }) }), _jsx("td", { className: classNames(tdClasses(1)), "aria-colindex": 2, children: columnLabel }), _jsx("td", { className: classNames(tdClasses(2)), "aria-colindex": 3, children: typeLabel }), _jsx("td", { className: classNames(tdClasses(3)), "aria-colindex": 4, children: _jsx("select", { name: opSelectLabel, "aria-label": opSelectLabel, disabled: !enabled, className: classNames(selectClasses || "form-select"), value: currentScheme, onChange: handleSchemeChange, children: Object.keys(schemesToLabels).map(function (scheme) { return (_jsx("option", { value: scheme, children: schemesToLabels[scheme] }, scheme)); }) }) }), _jsx("td", { className: classNames(tdClasses(4)), "aria-colindex": 5, children: searchStringInputCellContents })] }));
17
8
  }
18
9
  export default FilterRow;
@@ -6,9 +6,9 @@ export type NumberFilterRowProps = {
6
6
  columnLabel: string;
7
7
  filterState: NumberFormFilterState;
8
8
  setFilterState: (filterState: NumberFormFilterState) => void;
9
- schemeSelectClasses: string[];
10
- enableInputClasses: string[];
11
- numberInputClasses: string[];
9
+ schemeSelectClasses: string[] | null | undefined;
10
+ enableInputClasses: string[] | null | undefined;
11
+ numberInputClasses: string[] | null | undefined;
12
12
  } & CommonFilterRowStyleProps;
13
13
  declare const NumberFilterRow: FC<NumberFilterRowProps>;
14
14
  export default NumberFilterRow;
@@ -29,7 +29,7 @@ var NumberFilterRow = function (_a) {
29
29
  };
30
30
  var enabled = filterState.enabled, scheme = filterState.scheme, inputValue = filterState.inputValue;
31
31
  var valueInputLabel = "".concat(columnLabel, " Column Filter Value");
32
- var searchStringInputCellContents = (_jsx("input", { name: valueInputLabel, "aria-label": valueInputLabel, className: classNames("form-control", numberInputClasses), type: "number", required: enabled, disabled: !enabled, value: inputValue, onChange: handleNumInputValueChange }));
32
+ var searchStringInputCellContents = (_jsx("input", { name: valueInputLabel, "aria-label": valueInputLabel, className: classNames(numberInputClasses || "form-control"), type: "number", required: enabled, disabled: !enabled, value: inputValue, onChange: handleNumInputValueChange }));
33
33
  return (_jsx(FilterRow, { ariaRowIndex: ariaRowIndex, columnLabel: columnLabel, typeLabel: "Number", enabled: enabled, enabledChangeHandler: handleEnabledChange, currentScheme: scheme, handleSchemeChange: handleOpChange, schemesToLabels: numberFilterSchemeNames, searchStringInputCellContents: searchStringInputCellContents, trClasses: trClasses, tdClasses: tdClasses, inputClasses: enableInputClasses, selectClasses: schemeSelectClasses }));
34
34
  };
35
35
  export default NumberFilterRow;
@@ -6,9 +6,9 @@ type StringFilterRowProps = {
6
6
  columnLabel: string;
7
7
  filterState: StringFilterState;
8
8
  setFilterState: (filterState: StringFilterState) => void;
9
- schemeSelectClasses: string[];
10
- enableInputClasses: string[];
11
- searchStringInputClasses: string[];
9
+ schemeSelectClasses: string[] | null | undefined;
10
+ enableInputClasses: string[] | null | undefined;
11
+ searchStringInputClasses: string[] | null | undefined;
12
12
  } & CommonFilterRowStyleProps;
13
13
  declare const StringFilterRow: FC<StringFilterRowProps>;
14
14
  export default StringFilterRow;
@@ -29,7 +29,7 @@ var StringFilterRow = function (_a) {
29
29
  };
30
30
  var enabled = filterState.enabled, scheme = filterState.scheme, searchString = filterState.searchString;
31
31
  var valueInputLabel = "".concat(columnLabel, " Column Filter Value");
32
- var searchStringInputCellContents = (_jsx("input", { name: valueInputLabel, "aria-label": valueInputLabel, className: classNames("form-control", searchStringInputClasses), required: enabled, disabled: !enabled, value: searchString, onChange: handleSearchStringChange }));
32
+ var searchStringInputCellContents = (_jsx("input", { name: valueInputLabel, "aria-label": valueInputLabel, className: classNames(searchStringInputClasses || "form-control"), required: enabled, disabled: !enabled, value: searchString, onChange: handleSearchStringChange }));
33
33
  return (_jsx(FilterRow, { ariaRowIndex: ariaRowIndex, columnLabel: columnLabel, typeLabel: "String", enabled: enabled, enabledChangeHandler: handleEnabledChange, currentScheme: scheme, handleSchemeChange: handleOpChange, schemesToLabels: stringFilterSchemeNames, searchStringInputCellContents: searchStringInputCellContents, trClasses: trClasses, tdClasses: tdClasses, inputClasses: enableInputClasses, selectClasses: schemeSelectClasses }));
34
34
  };
35
35
  export default StringFilterRow;
@@ -1,7 +1,7 @@
1
- export type TableFilterState = Record<string, ColFilterState>;
2
- export type EditableTableFilterState = Record<string, FilterState>;
1
+ export type FilterState = Record<string, ColFilterState>;
2
+ export type EditableFilterState = Record<string, EditableColFilterState>;
3
3
  export interface ColFilterState {
4
- editableState: FilterState;
4
+ editableState: EditableColFilterState;
5
5
  label: string;
6
6
  }
7
7
  export interface AbstractFilterState {
@@ -44,11 +44,11 @@ export interface BetweenDatesFilterState extends AbstractDateFilterState {
44
44
  endDate: Date | null;
45
45
  }
46
46
  export type DateFilterState = StartDateFilterState | EndDateFilterState | BetweenDatesFilterState;
47
- export type FilterState = StringFilterState | NumberFilterState | DateFilterState;
47
+ export type EditableColFilterState = StringFilterState | NumberFilterState | DateFilterState;
48
48
  export interface ControlledFilterModel {
49
49
  type?: "controlled";
50
- tableFilterState: EditableTableFilterState;
51
- setTableFilterState: (state: EditableTableFilterState) => void;
50
+ tableFilterState: EditableFilterState;
51
+ setTableFilterState: (state: EditableFilterState) => void;
52
52
  filterTableCaption?: string;
53
53
  }
54
54
  export type UncontrolledFilterModel = Partial<Pick<ControlledFilterModel, "tableFilterState" | "filterTableCaption">> & {
@@ -0,0 +1,3 @@
1
+ import { FilterFormState, FilterState } from "./types";
2
+ declare const useFilterFormState: (tableFilterState: FilterState) => FilterFormState;
3
+ export default useFilterFormState;
@@ -1,10 +1,11 @@
1
- export * from "./types";
2
- export * from "./styling/types";
3
1
  export * from "./editing/types";
4
- export * from "./selection/types";
2
+ export * from "./export/types";
5
3
  export * from "./filtering/types";
6
- export * from "./sorting/types";
7
4
  export * from "./pagination/types";
8
- export * from "./Grid";
9
- export * from "./util/datetime";
10
- export { default } from "./Grid";
5
+ export * from "./pipeline/types";
6
+ export * from "./sorting/types";
7
+ export * from "./styling/types";
8
+ export * from "./toolbar/types";
9
+ export * from "./selection/types";
10
+ export * from "./types";
11
+ export * from "./util";
@@ -1,10 +1,11 @@
1
- export * from "./types";
2
- export * from "./styling/types";
3
1
  export * from "./editing/types";
4
- export * from "./selection/types";
2
+ export * from "./export/types";
5
3
  export * from "./filtering/types";
6
- export * from "./sorting/types";
7
4
  export * from "./pagination/types";
8
- export * from "./Grid";
9
- export * from "./util/datetime";
10
- export { default } from "./Grid";
5
+ export * from "./pipeline/types";
6
+ export * from "./sorting/types";
7
+ export * from "./styling/types";
8
+ export * from "./toolbar/types";
9
+ export * from "./selection/types";
10
+ export * from "./types";
11
+ export * from "./util";
@@ -1,5 +1,5 @@
1
- import { JustifyContentSetting, Size } from "../types";
2
1
  import { FC } from "react";
2
+ import { JustifyContentSetting, Size } from "../";
3
3
  export interface PageSelectorProps {
4
4
  numPages: number;
5
5
  pageNum: number;
@@ -1,5 +1,5 @@
1
1
  import { FC } from "react";
2
- import { Size } from "../types";
2
+ import { Size } from "../";
3
3
  export interface PageSizeSelectorProps {
4
4
  componentSize: Size;
5
5
  pageSizeOptions: number[];
@@ -3,7 +3,7 @@ import { NormalizedPaginationModel } from "./types";
3
3
  export interface PaginationProps {
4
4
  normalizedModel: NormalizedPaginationModel;
5
5
  prePagingNumRows: number;
6
- containerDivClasses: string[];
6
+ containerDivClasses: string[] | undefined;
7
7
  }
8
8
  declare const Pagination: FC<PaginationProps>;
9
9
  export default Pagination;
@@ -17,8 +17,11 @@ var Pagination = function (_a) {
17
17
  setCurrentPage(maxPages);
18
18
  }
19
19
  };
20
- return (_jsxs("div", { "data-testid": "pagination ui container div", className: classNames(containerDivClasses.length > 0
21
- ? containerDivClasses
22
- : ["d-flex", "justify-content-end", "gap-2", "px-2"]), children: [_jsx(PageSizeSelector, { componentSize: componentSize, pageSizeOptions: pageSizeOptions, pageSizeIndex: pageSizeIndex, handleSetPageSize: pageIndexAwarePageSizeSetter }), _jsx(PageSelector, { numPages: numPages, pageNum: currentPage, numButtons: maxPageButtons, setPageNum: setCurrentPage, size: componentSize, ariaLabel: pageSelectorAriaLabel, alignment: pageSelectorJustifyContent })] }));
20
+ return (_jsxs("div", { "data-testid": "pagination ui container div", className: classNames(containerDivClasses || [
21
+ "d-flex",
22
+ "justify-content-end",
23
+ "gap-2",
24
+ "px-2",
25
+ ]), children: [_jsx(PageSizeSelector, { componentSize: componentSize, pageSizeOptions: pageSizeOptions, pageSizeIndex: pageSizeIndex, handleSetPageSize: pageIndexAwarePageSizeSetter }), _jsx(PageSelector, { numPages: numPages, pageNum: currentPage, numButtons: maxPageButtons, setPageNum: setCurrentPage, size: componentSize, ariaLabel: pageSelectorAriaLabel, alignment: pageSelectorJustifyContent })] }));
23
26
  };
24
27
  export default Pagination;
@@ -1,4 +1,5 @@
1
- import { JustifyContentSetting, Size } from "../types";
1
+ export type JustifyContentSetting = "start" | "end" | "center" | "between" | "around" | "evenly";
2
+ export type Size = "small" | "medium" | "large";
2
3
  export interface PaginationOptions {
3
4
  pageSizeOptions?: number[];
4
5
  maxPageButtons?: number;
@@ -18,5 +19,5 @@ export type UncontrolledPaginationModel = PaginationOptions & {
18
19
  startingPageSizeIndex?: number;
19
20
  startingCurrentPage?: number;
20
21
  };
21
- export type GridPaginationState = ControlledPaginationModel | UncontrolledPaginationModel;
22
+ export type PaginationModel = ControlledPaginationModel | UncontrolledPaginationModel;
22
23
  export type NormalizedPaginationModel = Required<Omit<ControlledPaginationModel, "type" | "pageSelectorAriaLabel" | "pageSelectorJustifyContent">> & Pick<ControlledPaginationModel, "pageSelectorAriaLabel" | "pageSelectorJustifyContent">;
@@ -1,4 +1,4 @@
1
- import { AugFormattedRow, FormattedRow } from "../types";
2
1
  import { ColNameToWidth } from "./types";
2
+ import { AugFormattedRow, FormattedRow } from "../";
3
3
  declare const useAugFormattedRows: (colNameToWidth: ColNameToWidth, rows: FormattedRow[]) => AugFormattedRow[];
4
4
  export default useAugFormattedRows;
@@ -0,0 +1,3 @@
1
+ import { ColDef, ColNameToWidth } from "../";
2
+ declare const useColNameToWidth: (cols: ColDef[]) => ColNameToWidth;
3
+ export default useColNameToWidth;
@@ -0,0 +1,12 @@
1
+ import { useMemo } from "react";
2
+ var useColNameToWidth = function (cols) {
3
+ return useMemo(function () {
4
+ var map = {};
5
+ cols.forEach(function (_a) {
6
+ var name = _a.name, width = _a.width;
7
+ return (map[name] = width);
8
+ });
9
+ return map;
10
+ }, [cols]);
11
+ };
12
+ export default useColNameToWidth;
@@ -1,14 +1,14 @@
1
1
  import { SortedRowsOutput } from "./useSortedRows";
2
2
  import { CurrentPageRowsOutput } from "./useCurrentPageRows";
3
- import { ColDefBase, FormattedRow, GridProps, RowDef } from "../../types";
4
- import { NormalizedTableFilterModel, TableFilterState } from "../../filtering/types";
5
- export type CombinedPipelineParams = Pick<GridProps, "rows" | "filterModel" | "sortModel" | "pagination" | "selectModel"> & {
3
+ import { NormalizedTableFilterModel, FilterState } from "../../";
4
+ import { ColDefBase, FormattedRow, MainComponentSharedProps, RowDef } from "../../types";
5
+ export type CombinedPipelineParams = Pick<MainComponentSharedProps, "rows" | "filterModel" | "sortModel" | "pagination" | "selectModel"> & {
6
6
  cols: ColDefBase[];
7
7
  };
8
8
  export interface UseCombinedPipelineHook {
9
9
  normalizedTableFilterModel: NormalizedTableFilterModel | null;
10
10
  filteredRows: RowDef[];
11
- filterState: TableFilterState | null;
11
+ filterState: FilterState | null;
12
12
  sortedRowsOutput: SortedRowsOutput;
13
13
  currentPageRowsOutput: CurrentPageRowsOutput;
14
14
  showSelectCol: boolean;
@@ -1,8 +1,8 @@
1
- import { AugRowDef, PostPaginationRowDef } from "../../types";
2
- import { NormalizedPaginationModel, GridPaginationState } from "../../pagination/types";
1
+ import { NormalizedPaginationModel, PaginationModel } from "../../pagination/types";
2
+ import { AugRowDef, PostPaginationRowDef } from "../../";
3
3
  export interface CurrentPageRowsOutput {
4
4
  paginatedRows: PostPaginationRowDef[];
5
5
  normalizedModel: NormalizedPaginationModel | null;
6
6
  }
7
- declare const useCurrentPageRows: (sortedRows: AugRowDef[], paginationModel: GridPaginationState | undefined) => CurrentPageRowsOutput;
7
+ declare const useCurrentPageRows: (sortedRows: AugRowDef[], paginationModel: PaginationModel | undefined) => CurrentPageRowsOutput;
8
8
  export default useCurrentPageRows;
@@ -1,3 +1,3 @@
1
- import { FormattedRow, ColDef, PostPaginationRowDef } from "../../types";
1
+ import { ColDef, FormattedRow, PostPaginationRowDef } from "../../types";
2
2
  declare const useDisplayRows: (currentPageRows: PostPaginationRowDef[], cols: ColDef[], ariaColIndexOffset: number) => FormattedRow[];
3
3
  export default useDisplayRows;
@@ -1,5 +1,5 @@
1
1
  import { useMemo } from "react";
2
- import { dateToDatetimeInputStr, dateToInputStr } from "../../util/datetime";
2
+ import { dateToDatetimeInputStr, dateToInputStr } from "../../util";
3
3
  var getFormattedValue = function (value, formatter, typeString) {
4
4
  if (formatter) {
5
5
  return formatter(value);
@@ -36,7 +36,6 @@ var useDisplayRows = function (currentPageRows, cols, ariaColIndexOffset) {
36
36
  var displayRow = [];
37
37
  Object.keys(row.data).forEach(function (name) {
38
38
  if (!nameToIndex.has(name)) {
39
- console.error("Warning: row data contains a property named \"".concat(name, "\", but it was not found among the column definitions."));
40
39
  return;
41
40
  }
42
41
  var index = nameToIndex.get(name);
@@ -0,0 +1,4 @@
1
+ import { EditableFilterState } from "../../filtering/types";
2
+ import { AugRowDef, RowDef } from "../../types";
3
+ declare const useFilter: (rows: RowDef[], filterState: EditableFilterState | null) => AugRowDef[];
4
+ export default useFilter;
@@ -0,0 +1,4 @@
1
+ import { EditableFilterState, FilterState } from "../../filtering/types";
2
+ import { ColDef } from "../../types";
3
+ declare const useFilterStateFromEditable: (colDefs: ColDef[], editableFilterState: EditableFilterState | null) => FilterState | null;
4
+ export default useFilterStateFromEditable;
@@ -1,10 +1,10 @@
1
+ import { SortColDef, SortModel } from "../../sorting/types";
1
2
  import { AugRowDef, ColDefBase } from "../../types";
2
- import { SortColDef, TableSortModel } from "../../sorting/types";
3
3
  export interface SortedRowsOutput {
4
4
  sortedRows: AugRowDef[];
5
5
  sortingEnabled: boolean;
6
6
  sortColDef: SortColDef | null | undefined;
7
7
  setSortColDef: ((sortColDef: SortColDef | null) => void) | undefined;
8
8
  }
9
- declare const useSortedRows: (rows: AugRowDef[], cols: ColDefBase[], sortModel: TableSortModel | undefined) => SortedRowsOutput;
9
+ declare const useSortedRows: (rows: AugRowDef[], cols: ColDefBase[], sortModel: SortModel | undefined) => SortedRowsOutput;
10
10
  export default useSortedRows;
@@ -1,7 +1,7 @@
1
- import { RowDef, RowId } from "../types";
2
1
  import { MouseEventHandler } from "react";
3
2
  import { SelectionInfo, SelectModel } from "../selection/types";
4
- import { SelectionInputModel } from "../selection/SelectionInput";
3
+ import { SelectionInputModel } from "../../table/selection/SelectionInput";
4
+ import { RowDef, RowId } from "../types";
5
5
  export interface UseGridSelectionFnsHook {
6
6
  selectedSet: Set<RowId>;
7
7
  rowsAreSelectable: boolean | undefined;
@@ -7,13 +7,13 @@ export interface ColSortModel {
7
7
  sortOrder: SortOrder | null;
8
8
  setSortOrder: (order: SortOrder | null) => void;
9
9
  }
10
- export interface ControlledTableSortModel {
10
+ export interface ControlledSortModel {
11
11
  type?: "controlled";
12
12
  sortColDef: SortColDef | null;
13
13
  setSortColDef: (sortColDef: SortColDef | null) => void;
14
14
  }
15
- export interface UncontrolledTableSortModel {
15
+ export interface UncontrolledSortModel {
16
16
  type: "uncontrolled";
17
17
  initialSortColDef: SortColDef | null;
18
18
  }
19
- export type TableSortModel = ControlledTableSortModel | UncontrolledTableSortModel;
19
+ export type SortModel = ControlledSortModel | UncontrolledSortModel;
@@ -1,6 +1,6 @@
1
- import { UseControlledHoverHook } from "../../util/useControlledHover";
1
+ import { UseControlledHoverHook } from "../util/useControlledHover";
2
2
  import { ReactNode } from "react";
3
- import { ColSortModel } from "../../sorting/types";
3
+ import { ColSortModel } from "./types";
4
4
  export type UseSortHeaderStatesHook = UseControlledHoverHook<HTMLTableCellElement> & {
5
5
  handleClick: () => void;
6
6
  sortSymbol: ReactNode;
@@ -1,8 +1,8 @@
1
- import useControlledHover from "../../util/useControlledHover";
1
+ import useControlledHover from "../util/useControlledHover";
2
2
  import { useMemo } from "react";
3
- import upArrow from "../../sorting/upArrow";
4
- import arrowPlaceholder from "../../sorting/arrowPlaceholder";
5
- import downArrow from "../../sorting/downArrow";
3
+ import upArrow from "./upArrow";
4
+ import arrowPlaceholder from "./arrowPlaceholder";
5
+ import downArrow from "./downArrow";
6
6
  var useSortHeaderStates = function (sortModel) {
7
7
  var _a = useControlledHover(), isHovering = _a.isHovering, setIsHovering = _a.setIsHovering, handleMouseOver = _a.handleMouseOver, handleMouseOut = _a.handleMouseOut;
8
8
  var handleClick = function () {
@@ -0,0 +1,21 @@
1
+ import { AdditionalComponentsStyleModel, FilterInputTableStyleModel, TableStyleModel } from "../../table";
2
+ export interface ToolbarStyleModel {
3
+ activeButton?: string[];
4
+ inactiveButton?: string[];
5
+ toolbar?: string[];
6
+ interfaceContainer?: string[];
7
+ }
8
+ export interface ExportFormStyleModel {
9
+ legend?: string[];
10
+ radioContainer?: string[];
11
+ radioInput?: string[];
12
+ radioLabel?: string[];
13
+ submitButton?: string[];
14
+ }
15
+ export interface StyleModel {
16
+ mainTableStyleModel?: TableStyleModel;
17
+ filterInputTableStyleModel?: FilterInputTableStyleModel;
18
+ additionalComponentsStyleModel?: AdditionalComponentsStyleModel;
19
+ toolbarStyleModel?: ToolbarStyleModel;
20
+ exportFormStyleModel?: ExportFormStyleModel;
21
+ }