@absreim/react-bootstrap-data-grid-pro 3.0.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 (184) 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/{grid → common}/filtering/FilterOptionsTable.d.ts +4 -4
  5. package/{grid → common}/filtering/types.d.ts +6 -6
  6. package/common/filtering/useFilterFormState.d.ts +3 -0
  7. package/common/index.d.ts +11 -0
  8. package/common/index.js +11 -0
  9. package/{grid → common}/pagination/PageSelector.d.ts +1 -1
  10. package/{grid → common}/pagination/PageSizeSelector.d.ts +1 -1
  11. package/{grid → common}/pagination/types.d.ts +2 -1
  12. package/{grid → common}/pipeline/useAugFormattedRows.d.ts +1 -1
  13. package/common/pipeline/useColNameToWidth.d.ts +3 -0
  14. package/common/pipeline/useColNameToWidth.js +7 -0
  15. package/{grid → common}/pipeline/useCombinedPipeline/index.d.ts +4 -4
  16. package/{grid → common}/pipeline/useCombinedPipeline/useCurrentPageRows.d.ts +1 -1
  17. package/{grid → common}/pipeline/useCombinedPipeline/useDisplayRows.d.ts +1 -1
  18. package/{grid → common}/pipeline/useCombinedPipeline/useDisplayRows.js +1 -2
  19. package/common/pipeline/useCombinedPipeline/useFilter.d.ts +4 -0
  20. package/common/pipeline/useCombinedPipeline/useFilterStateFromEditable.d.ts +4 -0
  21. package/{grid → common}/pipeline/useCombinedPipeline/useSortedRows.d.ts +2 -2
  22. package/{grid → common}/pipeline/useGridSelectionFns.d.ts +2 -2
  23. package/{grid → common}/sorting/types.d.ts +3 -3
  24. package/{grid/main/ColHeaderCell → common/sorting}/useSortHeaderStates.d.ts +2 -2
  25. package/{grid/main/ColHeaderCell → common/sorting}/useSortHeaderStates.js +4 -4
  26. package/common/styling/types.d.ts +21 -0
  27. package/{grid → common}/types.d.ts +21 -30
  28. package/common/util/index.d.ts +5 -0
  29. package/common/util/index.js +5 -0
  30. package/grid/constants.d.ts +2 -0
  31. package/grid/constants.js +2 -0
  32. package/grid/index.d.ts +3 -10
  33. package/grid/index.js +3 -10
  34. package/grid/{Grid.d.ts → main/Grid.d.ts} +0 -1
  35. package/grid/main/Grid.js +59 -0
  36. package/grid/main/GridBody.d.ts +4 -0
  37. package/grid/main/GridBody.js +13 -0
  38. package/grid/main/GridHeader.d.ts +4 -0
  39. package/grid/main/GridHeader.js +11 -0
  40. package/grid/main/getWidthStyles.d.ts +3 -0
  41. package/grid/main/getWidthStyles.js +6 -0
  42. package/grid/main/types.d.ts +32 -0
  43. package/grid.css +1 -0
  44. package/grid.scss +231 -0
  45. package/package.json +1 -1
  46. package/pro/index.d.ts +5 -0
  47. package/pro/index.js +5 -0
  48. package/{grid/InternalGrid.d.ts → table/InternalTable.d.ts} +6 -6
  49. package/{grid/InternalGrid.js → table/InternalTable.js} +7 -7
  50. package/table/Table.d.ts +5 -0
  51. package/{grid/Grid.js → table/Table.js} +10 -14
  52. package/{grid → table}/editing/EditableRow.d.ts +1 -2
  53. package/{grid → table}/editing/EditableRow.js +2 -2
  54. package/table/index.d.ts +5 -0
  55. package/table/index.js +5 -0
  56. package/{grid → table}/main/BodyRows.d.ts +7 -7
  57. package/{grid → table}/main/BodyRows.js +1 -1
  58. package/{grid → table}/main/ColHeaderCell/index.js +3 -3
  59. package/{grid → table}/selection/SelectAllHeaderCell.d.ts +1 -1
  60. package/table/style.scss +3 -0
  61. package/{grid → table}/styling/types.d.ts +1 -21
  62. package/table/styling/types.js +1 -0
  63. package/table/types.d.ts +19 -0
  64. package/table/types.js +1 -0
  65. package/{grid-pro → table-pro}/ColHeaderCellPro.js +4 -4
  66. package/table-pro/TablePro.d.ts +4 -0
  67. package/{grid-pro/GridPro.js → table-pro/TablePro.js} +9 -9
  68. package/{grid-pro → table-pro}/index.d.ts +2 -2
  69. package/{grid-pro → table-pro}/index.js +2 -2
  70. package/{grid-pro → table-pro}/reorder/ReorderHandleCell.js +1 -1
  71. package/{grid-pro → table-pro}/reorder/useKeyboardReorder.js +1 -1
  72. package/{grid-pro → table-pro}/resize/useResizeModel.d.ts +1 -1
  73. package/table-pro/style.scss +69 -0
  74. package/{grid-pro → table-pro}/types.d.ts +3 -3
  75. package/table-pro/types.js +1 -0
  76. package/table-pro.scss +1 -0
  77. package/grid/editing/types.d.ts +0 -16
  78. package/grid/filtering/useFilterFormState.d.ts +0 -3
  79. package/grid/pipeline/useCombinedPipeline/useFilter.d.ts +0 -4
  80. package/grid/pipeline/useCombinedPipeline/useFilterStateFromEditable.d.ts +0 -4
  81. package/grid-pro/GridPro.d.ts +0 -4
  82. /package/{grid → common}/editing/inputStrsToRowData.d.ts +0 -0
  83. /package/{grid → common}/editing/inputStrsToRowData.js +0 -0
  84. /package/{grid-pro/reorder → common/editing}/types.js +0 -0
  85. /package/{grid → common}/export/ExportForm.d.ts +0 -0
  86. /package/{grid → common}/export/ExportForm.js +0 -0
  87. /package/{grid → common}/export/types.d.ts +0 -0
  88. /package/{grid-pro/resize → common/export}/types.js +0 -0
  89. /package/{grid → common}/export/useExportFn.d.ts +0 -0
  90. /package/{grid → common}/export/useExportFn.js +0 -0
  91. /package/{grid → common}/filtering/DateFilterRow.d.ts +0 -0
  92. /package/{grid → common}/filtering/DateFilterRow.js +0 -0
  93. /package/{grid → common}/filtering/FilterOptionsTable.js +0 -0
  94. /package/{grid → common}/filtering/FilterRow.d.ts +0 -0
  95. /package/{grid → common}/filtering/FilterRow.js +0 -0
  96. /package/{grid → common}/filtering/NumberFilterRow.d.ts +0 -0
  97. /package/{grid → common}/filtering/NumberFilterRow.js +0 -0
  98. /package/{grid → common}/filtering/StringFilterRow.d.ts +0 -0
  99. /package/{grid → common}/filtering/StringFilterRow.js +0 -0
  100. /package/{grid → common}/filtering/types.js +0 -0
  101. /package/{grid → common}/filtering/useFilterFormState.js +0 -0
  102. /package/{grid → common}/pagination/PageSelector.js +0 -0
  103. /package/{grid → common}/pagination/PageSizeSelector.js +0 -0
  104. /package/{grid → common}/pagination/Pagination.d.ts +0 -0
  105. /package/{grid → common}/pagination/Pagination.js +0 -0
  106. /package/{grid-pro → common/pagination}/types.js +0 -0
  107. /package/{grid → common}/pipeline/types.d.ts +0 -0
  108. /package/{grid-pro/util → common/pipeline}/types.js +0 -0
  109. /package/{grid → common}/pipeline/useAugFormattedRows.js +0 -0
  110. /package/{grid → common}/pipeline/useCombinedPipeline/index.js +0 -0
  111. /package/{grid → common}/pipeline/useCombinedPipeline/useCurrentPageRows.js +0 -0
  112. /package/{grid → common}/pipeline/useCombinedPipeline/useFilter.js +0 -0
  113. /package/{grid → common}/pipeline/useCombinedPipeline/useFilterStateFromEditable.js +0 -0
  114. /package/{grid → common}/pipeline/useCombinedPipeline/useFilterStateStore.d.ts +0 -0
  115. /package/{grid → common}/pipeline/useCombinedPipeline/useFilterStateStore.js +0 -0
  116. /package/{grid → common}/pipeline/useCombinedPipeline/useSortedRows.js +0 -0
  117. /package/{grid → common}/pipeline/useGetInputStrSubmitCallback.d.ts +0 -0
  118. /package/{grid → common}/pipeline/useGetInputStrSubmitCallback.js +0 -0
  119. /package/{grid → common}/pipeline/useGridSelectionFns.js +0 -0
  120. /package/{grid → common}/selection/types.d.ts +0 -0
  121. /package/{grid → common}/selection/types.js +0 -0
  122. /package/{grid → common}/sorting/arrowPlaceholder.d.ts +0 -0
  123. /package/{grid → common}/sorting/arrowPlaceholder.js +0 -0
  124. /package/{grid → common}/sorting/downArrow.d.ts +0 -0
  125. /package/{grid → common}/sorting/downArrow.js +0 -0
  126. /package/{grid → common}/sorting/sortOrderToAriaSort.d.ts +0 -0
  127. /package/{grid → common}/sorting/sortOrderToAriaSort.js +0 -0
  128. /package/{grid/editing → common/sorting}/types.js +0 -0
  129. /package/{grid → common}/sorting/upArrow.d.ts +0 -0
  130. /package/{grid → common}/sorting/upArrow.js +0 -0
  131. /package/{grid/export → common/styling}/types.js +0 -0
  132. /package/{grid → common}/toolbar/Toolbar.d.ts +0 -0
  133. /package/{grid → common}/toolbar/Toolbar.js +0 -0
  134. /package/{grid → common}/toolbar/ToolbarContainer.d.ts +0 -0
  135. /package/{grid → common}/toolbar/ToolbarContainer.js +0 -0
  136. /package/{grid → common}/toolbar/types.d.ts +0 -0
  137. /package/{grid/pagination → common/toolbar}/types.js +0 -0
  138. /package/{grid → common}/toolbar/useInterfaces.d.ts +0 -0
  139. /package/{grid → common}/toolbar/useInterfaces.js +0 -0
  140. /package/{grid/pipeline → common}/types.js +0 -0
  141. /package/{grid → common}/util/datetime.d.ts +0 -0
  142. /package/{grid → common}/util/datetime.js +0 -0
  143. /package/{grid → common}/util/getWidthStyle.d.ts +0 -0
  144. /package/{grid → common}/util/getWidthStyle.js +0 -0
  145. /package/{grid → common}/util/isSubset.d.ts +0 -0
  146. /package/{grid → common}/util/isSubset.js +0 -0
  147. /package/{grid → common}/util/trueModulo.d.ts +0 -0
  148. /package/{grid → common}/util/trueModulo.js +0 -0
  149. /package/{grid → common}/util/useControlledHover.d.ts +0 -0
  150. /package/{grid → common}/util/useControlledHover.js +0 -0
  151. /package/grid/{sorting → main}/types.js +0 -0
  152. /package/{grid → table}/editing/EditControlsCell.d.ts +0 -0
  153. /package/{grid → table}/editing/EditControlsCell.js +0 -0
  154. /package/{grid → table}/main/ColHeaderCell/index.d.ts +0 -0
  155. /package/{grid → table}/selection/SelectAllHeaderCell.js +0 -0
  156. /package/{grid → table}/selection/SelectionInput.d.ts +0 -0
  157. /package/{grid → table}/selection/SelectionInput.js +0 -0
  158. /package/{grid-pro → table-pro}/ColHeaderCellPro.d.ts +0 -0
  159. /package/{grid-pro → table-pro}/assets/HorizontalGrip.d.ts +0 -0
  160. /package/{grid-pro → table-pro}/assets/HorizontalGrip.js +0 -0
  161. /package/{grid-pro → table-pro}/assets/VerticalGrip.d.ts +0 -0
  162. /package/{grid-pro → table-pro}/assets/VerticalGrip.js +0 -0
  163. /package/{grid-pro/util → table-pro/lib}/regDragCleanup.d.ts +0 -0
  164. /package/{grid-pro/util → table-pro/lib}/regDragCleanup.js +0 -0
  165. /package/{grid-pro/util → table-pro/lib}/types.d.ts +0 -0
  166. /package/{grid/styling → table-pro/lib}/types.js +0 -0
  167. /package/{grid-pro → table-pro}/reorder/ReorderHandleCell.d.ts +0 -0
  168. /package/{grid-pro → table-pro}/reorder/ReorderHeaderCell.d.ts +0 -0
  169. /package/{grid-pro → table-pro}/reorder/ReorderHeaderCell.js +0 -0
  170. /package/{grid-pro → table-pro}/reorder/types.d.ts +0 -0
  171. /package/{grid/toolbar → table-pro/reorder}/types.js +0 -0
  172. /package/{grid-pro → table-pro}/reorder/useKeyboardReorder.d.ts +0 -0
  173. /package/{grid-pro → table-pro}/reorder/useKeyboardReorderListener.d.ts +0 -0
  174. /package/{grid-pro → table-pro}/reorder/useKeyboardReorderListener.js +0 -0
  175. /package/{grid-pro → table-pro}/reorder/useReorderStyles.d.ts +0 -0
  176. /package/{grid-pro → table-pro}/reorder/useReorderStyles.js +0 -0
  177. /package/{grid-pro → table-pro}/resize/types.d.ts +0 -0
  178. /package/{grid → table-pro/resize}/types.js +0 -0
  179. /package/{grid-pro → table-pro}/resize/useResizeModel.js +0 -0
  180. /package/{grid-pro → table-pro}/util/index.d.ts +0 -0
  181. /package/{grid-pro → table-pro}/util/index.js +0 -0
  182. /package/{grid-pro → table-pro}/util/reorderRows.d.ts +0 -0
  183. /package/{grid-pro → table-pro}/util/reorderRows.js +0 -0
  184. /package/{style.css → table-pro.css} +0 -0
@@ -0,0 +1,69 @@
1
+ @use "../table/style";
2
+
3
+ .rbdg-draggable-container {
4
+ width: 1rem;
5
+ height: 1rem;
6
+ touch-action: none;
7
+ }
8
+
9
+ .rbdg-draggable-icon {
10
+ pointer-events: none;
11
+ }
12
+
13
+ .rbdg-resize-container {
14
+ cursor: col-resize;
15
+ }
16
+
17
+ .rbdg-reorder-container {
18
+ cursor: grab !important;
19
+
20
+ &:active {
21
+ cursor: grabbing !important;
22
+ }
23
+ }
24
+
25
+ // Typical button reset to make it look like a plain div
26
+ .rbdg-plain-icon-button {
27
+ display: inline-flex;
28
+ padding: 0;
29
+ margin: 0;
30
+ border: none;
31
+
32
+ background: none;
33
+ color: inherit;
34
+ font: inherit;
35
+
36
+ -webkit-appearance: none;
37
+ appearance: none;
38
+
39
+ &:disabled {
40
+ pointer-events: none;
41
+ opacity: 0.65;
42
+ }
43
+ }
44
+
45
+ .rbdg-drag-ghost {
46
+ opacity: 75%;
47
+ position: fixed;
48
+ padding: 0.5rem;
49
+ z-index: 2; // float above toolbar panels
50
+ }
51
+
52
+ .rbdg-reorder-dragged-row-pred {
53
+ border-bottom-color: var(--bs-success);
54
+ }
55
+
56
+ .rbdg-reorder-dragged-row {
57
+ border-top-width: 1px;
58
+ opacity: 50%;
59
+ border-color: var(--bs-success);
60
+ }
61
+
62
+ .rbdg-reorder-above-drag-target-row {
63
+ border-bottom-color: var(--bs-primary);
64
+ }
65
+
66
+ .rbdg-reorder-below-drag-target-row {
67
+ border-top-width: 1px;
68
+ border-top-color: var(--bs-primary);
69
+ }
@@ -1,4 +1,4 @@
1
- import { ColDef, ColDefBase, ColHeaderCellProps, GridProps, StyleModel } from "../grid";
1
+ import { ColDef, ColDefBase, ColHeaderCellProps, TableProps, StyleModel } from "../table";
2
2
  import { ReorderModel, ReorderStyleModel } from "./reorder/types";
3
3
  export type ProColDef<ValueType = any> = ColDefBase<ValueType> & {
4
4
  resizeable?: boolean;
@@ -7,12 +7,12 @@ export type ProColDef<ValueType = any> = ColDefBase<ValueType> & {
7
7
  maxResizeWidth?: number;
8
8
  keyboardResizeStep?: number;
9
9
  };
10
- export type GridProProps = Omit<GridProps, "cols" | "styleModel"> & {
10
+ export type TableProProps = Omit<TableProps, "cols" | "styleModel"> & {
11
11
  cols: ProColDef[];
12
12
  reorder?: ReorderModel;
13
13
  styleModel?: ProStyleModel;
14
14
  };
15
- export type ColHeaderCellProProps = ColHeaderCellProps & Pick<GridProps, "displayMode"> & {
15
+ export type ColHeaderCellProProps = ColHeaderCellProps & Pick<TableProps, "displayMode"> & {
16
16
  setWidth?: (width: number) => void;
17
17
  } & Pick<ProColDef, "minResizeWidth" | "maxResizeWidth" | "keyboardResizeStep">;
18
18
  export interface WidthModel {
@@ -0,0 +1 @@
1
+ export {};
package/table-pro.scss ADDED
@@ -0,0 +1 @@
1
+ @use "./table-pro/style";
@@ -1,16 +0,0 @@
1
- import { ColDataType, ColDataTypeStrings, RowData, RowId } from "../types";
2
- export interface CellData {
3
- fieldName: string;
4
- value: ColDataType;
5
- type: ColDataTypeStrings;
6
- ariaColIndex: number;
7
- formattedValue: string;
8
- label: string;
9
- width?: number;
10
- }
11
- export type UpdateCallbackGenerator = (id: RowId) => (rowData: RowData) => void;
12
- export interface EditModel {
13
- getUpdateCallback: UpdateCallbackGenerator;
14
- getDeleteCallback?: (id: RowId) => () => void;
15
- editColWidth?: number;
16
- }
@@ -1,3 +0,0 @@
1
- import { FilterFormState, TableFilterState } from "./types";
2
- declare const useFilterFormState: (tableFilterState: TableFilterState) => FilterFormState;
3
- export default useFilterFormState;
@@ -1,4 +0,0 @@
1
- import { AugRowDef, RowDef } from "../../types";
2
- import { EditableTableFilterState } from "../../filtering/types";
3
- declare const useFilter: (rows: RowDef[], filterState: EditableTableFilterState | null) => AugRowDef[];
4
- export default useFilter;
@@ -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;
@@ -1,4 +0,0 @@
1
- import { FC } from "react";
2
- import { GridProProps } from "./types";
3
- declare const GridPro: FC<GridProProps>;
4
- export default GridPro;
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