d2coreui 23.0.52 → 23.0.54

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 (280) hide show
  1. package/CHANGELOG.md +40 -0
  2. package/README.md +154 -0
  3. package/components/clipboard/clipboardUtils.d.ts +11 -0
  4. package/components/clipboard/clipboardUtils.js +16 -4
  5. package/components/clipboard/clipboardUtils.js.map +1 -1
  6. package/components/codemirror/SyntaxHighlighter.d.ts +13 -0
  7. package/components/codemirror/SyntaxHighlighter.js +6 -1
  8. package/components/codemirror/SyntaxHighlighter.js.map +1 -1
  9. package/components/collapse/expandable.d.ts +10 -0
  10. package/components/collapse/expandable.js +4 -0
  11. package/components/collapse/expandable.js.map +1 -1
  12. package/components/color/colorPicker.d.ts +16 -0
  13. package/components/color/colorPicker.js +4 -0
  14. package/components/color/colorPicker.js.map +1 -1
  15. package/components/color/colorSwatch.d.ts +16 -0
  16. package/components/color/colorSwatch.js +23 -2
  17. package/components/color/colorSwatch.js.map +1 -1
  18. package/components/color/colorUtils.d.ts +9 -0
  19. package/components/color/colorUtils.js +15 -0
  20. package/components/color/colorUtils.js.map +1 -1
  21. package/components/date/dateRangeInput.d.ts +76 -0
  22. package/components/date/dateRangeInput.js +63 -12
  23. package/components/date/dateRangeInput.js.map +1 -1
  24. package/components/date/dateRangeInputAdvancedPanel.d.ts +27 -0
  25. package/components/date/dateRangeInputAdvancedPanel.js +7 -0
  26. package/components/date/dateRangeInputAdvancedPanel.js.map +1 -1
  27. package/components/date/dateRangeInputConfirm.d.ts +18 -0
  28. package/components/date/dateRangeInputConfirm.js +12 -0
  29. package/components/date/dateRangeInputConfirm.js.map +1 -1
  30. package/components/date/dateTimeInput.d.ts +99 -0
  31. package/components/date/dateTimeInput.js +78 -6
  32. package/components/date/dateTimeInput.js.map +1 -1
  33. package/components/date/durationInput.d.ts +37 -0
  34. package/components/date/durationInput.js +26 -3
  35. package/components/date/durationInput.js.map +1 -1
  36. package/components/date/savedIntervals.d.ts +63 -0
  37. package/components/date/savedIntervals.js +37 -0
  38. package/components/date/savedIntervals.js.map +1 -1
  39. package/components/date/savedIntervalsDialog.d.ts +13 -0
  40. package/components/date/savedIntervalsDialog.js +7 -2
  41. package/components/date/savedIntervalsDialog.js.map +1 -1
  42. package/components/form/NiceFormItem.d.ts +9 -0
  43. package/components/form/NiceFormItem.js +4 -0
  44. package/components/form/NiceFormItem.js.map +1 -1
  45. package/components/grid/cell/beanAccessor.d.ts +12 -0
  46. package/components/grid/cell/beanAccessor.js +8 -0
  47. package/components/grid/cell/beanAccessor.js.map +1 -1
  48. package/components/grid/cell/bigNumberCellEditor.d.ts +9 -0
  49. package/components/grid/cell/bigNumberCellEditor.js +19 -0
  50. package/components/grid/cell/bigNumberCellEditor.js.map +1 -1
  51. package/components/grid/cell/cellControl.d.ts +4 -0
  52. package/components/grid/cell/cellControl.js +14 -0
  53. package/components/grid/cell/cellControl.js.map +1 -1
  54. package/components/grid/cell/cellEditorUtils.d.ts +6 -0
  55. package/components/grid/cell/cellEditorUtils.js +6 -0
  56. package/components/grid/cell/cellEditorUtils.js.map +1 -1
  57. package/components/grid/cell/customEnumCellEditor.d.ts +6 -0
  58. package/components/grid/cell/customEnumCellEditor.js +10 -0
  59. package/components/grid/cell/customEnumCellEditor.js.map +1 -1
  60. package/components/grid/cell/dataGridCellEditorComponent.d.ts +26 -0
  61. package/components/grid/cell/dataGridCellEditorComponent.js +21 -0
  62. package/components/grid/cell/dataGridCellEditorComponent.js.map +1 -1
  63. package/components/grid/cell/dateCellEditor.d.ts +6 -0
  64. package/components/grid/cell/dateCellEditor.js +10 -0
  65. package/components/grid/cell/dateCellEditor.js.map +1 -1
  66. package/components/grid/cell/dragListenerFeature.d.ts +6 -0
  67. package/components/grid/cell/dragListenerFeature.js +6 -0
  68. package/components/grid/cell/dragListenerFeature.js.map +1 -1
  69. package/components/grid/cell/durationCellEditor.d.ts +6 -0
  70. package/components/grid/cell/durationCellEditor.js +14 -0
  71. package/components/grid/cell/durationCellEditor.js.map +1 -1
  72. package/components/grid/cell/hexaOctetStringCellEditor.d.ts +6 -0
  73. package/components/grid/cell/hexaOctetStringCellEditor.js +14 -0
  74. package/components/grid/cell/hexaOctetStringCellEditor.js.map +1 -1
  75. package/components/grid/cell/hexaValueCellEditor.d.ts +6 -0
  76. package/components/grid/cell/hexaValueCellEditor.js +14 -0
  77. package/components/grid/cell/hexaValueCellEditor.js.map +1 -1
  78. package/components/grid/cell/numberCellEditor.d.ts +6 -0
  79. package/components/grid/cell/numberCellEditor.js +15 -0
  80. package/components/grid/cell/numberCellEditor.js.map +1 -1
  81. package/components/grid/cell/rangeSelector.d.ts +7 -0
  82. package/components/grid/cell/rangeSelector.js +59 -5
  83. package/components/grid/cell/rangeSelector.js.map +1 -1
  84. package/components/grid/cell/simpleStatusTextCellEditor.d.ts +7 -0
  85. package/components/grid/cell/simpleStatusTextCellEditor.js +11 -0
  86. package/components/grid/cell/simpleStatusTextCellEditor.js.map +1 -1
  87. package/components/grid/cell/statusTextCellEditor.d.ts +7 -0
  88. package/components/grid/cell/statusTextCellEditor.js +17 -0
  89. package/components/grid/cell/statusTextCellEditor.js.map +1 -1
  90. package/components/grid/cell/tableDefaultRowStyleRules.d.ts +31 -0
  91. package/components/grid/cell/tableDefaultRowStyleRules.js +5 -0
  92. package/components/grid/cell/tableDefaultRowStyleRules.js.map +1 -1
  93. package/components/grid/cell/textCellEditor.d.ts +6 -0
  94. package/components/grid/cell/textCellEditor.js +15 -0
  95. package/components/grid/cell/textCellEditor.js.map +1 -1
  96. package/components/grid/cell/withAgGridHooks.d.ts +8 -0
  97. package/components/grid/cell/withAgGridHooks.js +8 -0
  98. package/components/grid/cell/withAgGridHooks.js.map +1 -1
  99. package/components/grid/columnUtils.d.ts +10 -1
  100. package/components/grid/columnUtils.js +11 -0
  101. package/components/grid/columnUtils.js.map +1 -1
  102. package/components/grid/config/columnTransfer.d.ts +18 -0
  103. package/components/grid/config/columnTransfer.js +45 -29
  104. package/components/grid/config/columnTransfer.js.map +1 -1
  105. package/components/grid/config/dataGridEditor.d.ts +31 -0
  106. package/components/grid/config/dataGridEditor.js +14 -2
  107. package/components/grid/config/dataGridEditor.js.map +1 -1
  108. package/components/grid/config/rowHeightCalculator.d.ts +11 -0
  109. package/components/grid/config/rowHeightCalculator.js +11 -0
  110. package/components/grid/config/rowHeightCalculator.js.map +1 -1
  111. package/components/grid/config/rowStylePicker.d.ts +19 -0
  112. package/components/grid/config/rowStylePicker.js +12 -0
  113. package/components/grid/config/rowStylePicker.js.map +1 -1
  114. package/components/grid/dataGrid.d.ts +361 -12
  115. package/components/grid/dataGrid.js +201 -28
  116. package/components/grid/dataGrid.js.map +1 -1
  117. package/components/grid/detail/detailHeaderPanel.d.ts +11 -0
  118. package/components/grid/detail/detailHeaderPanel.js +5 -0
  119. package/components/grid/detail/detailHeaderPanel.js.map +1 -1
  120. package/components/grid/export/contextMenu.d.ts +31 -0
  121. package/components/grid/export/contextMenu.js +8 -0
  122. package/components/grid/export/contextMenu.js.map +1 -1
  123. package/components/grid/export/progressPopup.d.ts +21 -0
  124. package/components/grid/export/progressPopup.js +17 -0
  125. package/components/grid/export/progressPopup.js.map +1 -1
  126. package/components/grid/export/worker/pdfExport.js +5 -0
  127. package/components/grid/export/worker/pdfExport.js.map +1 -1
  128. package/components/grid/extendedDataGrid.d.ts +249 -4
  129. package/components/grid/extendedDataGrid.js +160 -19
  130. package/components/grid/extendedDataGrid.js.map +1 -1
  131. package/components/grid/filter/customColumnFilter.d.ts +5 -0
  132. package/components/grid/filter/customColumnFilter.js +5 -0
  133. package/components/grid/filter/customColumnFilter.js.map +1 -1
  134. package/components/grid/filter/dataGridColumnFilter.d.ts +19 -0
  135. package/components/grid/filter/dataGridColumnFilter.js +19 -0
  136. package/components/grid/filter/dataGridColumnFilter.js.map +1 -1
  137. package/components/grid/filter/dateColumnFilter.d.ts +6 -0
  138. package/components/grid/filter/dateColumnFilter.js +6 -0
  139. package/components/grid/filter/dateColumnFilter.js.map +1 -1
  140. package/components/grid/filter/textColumnFilter.d.ts +6 -0
  141. package/components/grid/filter/textColumnFilter.js +6 -0
  142. package/components/grid/filter/textColumnFilter.js.map +1 -1
  143. package/components/grid/filter/wildcardQuickFilterEngine.d.ts +21 -0
  144. package/components/grid/filter/wildcardQuickFilterEngine.js +21 -0
  145. package/components/grid/filter/wildcardQuickFilterEngine.js.map +1 -1
  146. package/components/grid/header/simpleHeader.d.ts +17 -0
  147. package/components/grid/header/simpleHeader.js +20 -0
  148. package/components/grid/header/simpleHeader.js.map +1 -1
  149. package/components/grid/panel/dataGridPagination.d.ts +10 -0
  150. package/components/grid/panel/dataGridPagination.js +5 -0
  151. package/components/grid/panel/dataGridPagination.js.map +1 -1
  152. package/components/grid/panel/loadingOverlay.d.ts +5 -0
  153. package/components/grid/panel/loadingOverlay.js +4 -0
  154. package/components/grid/panel/loadingOverlay.js.map +1 -1
  155. package/components/grid/panel/noRecordsOverlay.d.ts +6 -0
  156. package/components/grid/panel/noRecordsOverlay.js +5 -0
  157. package/components/grid/panel/noRecordsOverlay.js.map +1 -1
  158. package/components/grid/panel/tablePagination.d.ts +4 -0
  159. package/components/grid/panel/tablePagination.js +4 -0
  160. package/components/grid/panel/tablePagination.js.map +1 -1
  161. package/components/icons/dropdownArrow.d.ts +3 -0
  162. package/components/icons/dropdownArrow.js +2 -0
  163. package/components/icons/dropdownArrow.js.map +1 -1
  164. package/components/icons/undoIcon.d.ts +2 -0
  165. package/components/icons/undoIcon.js +2 -0
  166. package/components/icons/undoIcon.js.map +1 -1
  167. package/components/input/autoCompleteInput.d.ts +29 -0
  168. package/components/input/autoCompleteInput.js +7 -0
  169. package/components/input/autoCompleteInput.js.map +1 -1
  170. package/components/input/draftUtils.d.ts +7 -0
  171. package/components/input/draftUtils.js +9 -0
  172. package/components/input/draftUtils.js.map +1 -1
  173. package/components/input/hexaFormattedInput.d.ts +9 -0
  174. package/components/input/hexaFormattedInput.js +3 -0
  175. package/components/input/hexaFormattedInput.js.map +1 -1
  176. package/components/input/mask/helpers.d.ts +27 -0
  177. package/components/input/mask/helpers.js +27 -0
  178. package/components/input/mask/helpers.js.map +1 -1
  179. package/components/input/mask/inputMaskCore.d.ts +80 -0
  180. package/components/input/mask/inputMaskCore.js +90 -0
  181. package/components/input/mask/inputMaskCore.js.map +1 -1
  182. package/components/input/mask/pattern.d.ts +24 -0
  183. package/components/input/mask/pattern.js +26 -0
  184. package/components/input/mask/pattern.js.map +1 -1
  185. package/components/input/maskedInput.d.ts +53 -0
  186. package/components/input/maskedInput.js +44 -4
  187. package/components/input/maskedInput.js.map +1 -1
  188. package/components/input/passwordInput.d.ts +7 -0
  189. package/components/input/passwordInput.js +8 -0
  190. package/components/input/passwordInput.js.map +1 -1
  191. package/components/input/simpleAutoComplete.d.ts +6 -0
  192. package/components/input/simpleAutoComplete.js +6 -0
  193. package/components/input/simpleAutoComplete.js.map +1 -1
  194. package/components/input/textarea/extractSpansOfClasses.d.ts +17 -0
  195. package/components/input/textarea/extractSpansOfClasses.js +26 -1
  196. package/components/input/textarea/extractSpansOfClasses.js.map +1 -1
  197. package/components/input/textarea/getRanges.d.ts +7 -0
  198. package/components/input/textarea/getRanges.js +11 -0
  199. package/components/input/textarea/getRanges.js.map +1 -1
  200. package/components/input/textarea/getType.d.ts +5 -0
  201. package/components/input/textarea/getType.js +5 -0
  202. package/components/input/textarea/getType.js.map +1 -1
  203. package/components/input/textarea/highlighedContents.d.ts +4 -0
  204. package/components/input/textarea/highlighedContents.js +5 -0
  205. package/components/input/textarea/highlighedContents.js.map +1 -1
  206. package/components/input/textarea/mentionsWithHighlighting.d.ts +25 -0
  207. package/components/input/textarea/mentionsWithHighlighting.js +14 -0
  208. package/components/input/textarea/mentionsWithHighlighting.js.map +1 -1
  209. package/components/keyboard/keyboardUtils.d.ts +6 -0
  210. package/components/keyboard/keyboardUtils.js +6 -0
  211. package/components/keyboard/keyboardUtils.js.map +1 -1
  212. package/components/modal/draggableModalProvider.d.ts +6 -0
  213. package/components/modal/draggableModalProvider.js +7 -0
  214. package/components/modal/draggableModalProvider.js.map +1 -1
  215. package/components/modal/impl/clamp.js +1 -0
  216. package/components/modal/impl/clamp.js.map +1 -1
  217. package/components/modal/impl/draggableModal.d.ts +1 -0
  218. package/components/modal/impl/draggableModal.js +6 -0
  219. package/components/modal/impl/draggableModal.js.map +1 -1
  220. package/components/modal/impl/draggableModalContext.js +1 -0
  221. package/components/modal/impl/draggableModalContext.js.map +1 -1
  222. package/components/modal/impl/draggableModalInner.js +12 -1
  223. package/components/modal/impl/draggableModalInner.js.map +1 -1
  224. package/components/modal/impl/draggableModalReducer.d.ts +7 -1
  225. package/components/modal/impl/draggableModalReducer.js +6 -1
  226. package/components/modal/impl/draggableModalReducer.js.map +1 -1
  227. package/components/modal/impl/draggableModalStyles.d.ts +17 -0
  228. package/components/modal/impl/draggableModalStyles.js +31 -0
  229. package/components/modal/impl/draggableModalStyles.js.map +1 -1
  230. package/components/modal/impl/getWindowSize.js +1 -0
  231. package/components/modal/impl/getWindowSize.js.map +1 -1
  232. package/components/modal/impl/index.js +1 -0
  233. package/components/modal/impl/index.js.map +1 -1
  234. package/components/modal/impl/resizeHandle.d.ts +1 -0
  235. package/components/modal/impl/resizeHandle.js +4 -1
  236. package/components/modal/impl/resizeHandle.js.map +1 -1
  237. package/components/modal/impl/useDrag.js +1 -0
  238. package/components/modal/impl/useDrag.js.map +1 -1
  239. package/components/modal/impl/usePrevious.js +1 -0
  240. package/components/modal/impl/usePrevious.js.map +1 -1
  241. package/components/modal/impl/useResize.js +1 -0
  242. package/components/modal/impl/useResize.js.map +1 -1
  243. package/components/modal/modalDialog.d.ts +85 -0
  244. package/components/modal/modalDialog.js +80 -10
  245. package/components/modal/modalDialog.js.map +1 -1
  246. package/components/picker/enumValuePicker.d.ts +17 -0
  247. package/components/picker/enumValuePicker.js +4 -0
  248. package/components/picker/enumValuePicker.js.map +1 -1
  249. package/components/platformSpecific.d.ts +17 -0
  250. package/components/platformSpecific.js +16 -0
  251. package/components/platformSpecific.js.map +1 -1
  252. package/components/scrollTo/onlyText.d.ts +5 -0
  253. package/components/scrollTo/onlyText.js +5 -0
  254. package/components/scrollTo/onlyText.js.map +1 -1
  255. package/components/scrollTo/scrollTo.d.ts +56 -0
  256. package/components/scrollTo/scrollTo.js +40 -3
  257. package/components/scrollTo/scrollTo.js.map +1 -1
  258. package/components/style/withCss.d.ts +15 -0
  259. package/components/style/withCss.js +6 -0
  260. package/components/style/withCss.js.map +1 -1
  261. package/components/table/dragSortingTable.d.ts +15 -0
  262. package/components/table/dragSortingTable.js +12 -0
  263. package/components/table/dragSortingTable.js.map +1 -1
  264. package/components/text/impl/innerSize.js +2 -0
  265. package/components/text/impl/innerSize.js.map +1 -1
  266. package/components/text/impl/series.d.ts +10 -0
  267. package/components/text/impl/series.js +10 -0
  268. package/components/text/impl/series.js.map +1 -1
  269. package/components/text/impl/shallowEqual.js +1 -0
  270. package/components/text/impl/shallowEqual.js.map +1 -1
  271. package/components/text/impl/whilst.d.ts +7 -0
  272. package/components/text/impl/whilst.js +7 -0
  273. package/components/text/impl/whilst.js.map +1 -1
  274. package/components/text/textFit.d.ts +24 -0
  275. package/components/text/textFit.js +29 -1
  276. package/components/text/textFit.js.map +1 -1
  277. package/i18n/componentsLocaleHolder.d.ts +9 -0
  278. package/i18n/componentsLocaleHolder.js +9 -0
  279. package/i18n/componentsLocaleHolder.js.map +1 -1
  280. package/package.json +66 -65
@@ -3,122 +3,332 @@ import { MenuProps } from "antd";
3
3
  import { AgGridReact } from "ag-grid-react";
4
4
  import 'd2coreui/style/ag-grid/aggrid-adaptations.css';
5
5
  import { ContextMenuProps, PageOrientation } from "d2coreui/components/grid/export/contextMenu";
6
- import { CellClassParams, CellFocusedEvent, CellMouseDownEvent, CellMouseOverEvent, ColDef, Column, ColumnEvent, ColumnState, FilterChangedEvent, FilterModifiedEvent, GridApi, GridOptions, GridReadyEvent, IRowNode, PaginationChangedEvent, RowClassParams, RowPinnedType, RowStyle, ViewportChangedEvent } from "ag-grid-community";
6
+ import { CellClassParams, CellFocusedEvent, CellMouseDownEvent, CellMouseOverEvent, ColDef, ColTypeDef, ColGroupDef, Column, ColumnEvent, NewColumnsLoadedEvent, ColumnState, FilterChangedEvent, FilterModifiedEvent, GridApi, GridOptions, GridReadyEvent, IRowNode, PaginationChangedEvent, RowClassParams, RowPinnedType, RowStyle, ViewportChangedEvent } from "ag-grid-community";
7
7
  import { GridRowStyle, RowStyleRule } from "d2coreui/components/grid/cell/tableDefaultRowStyleRules";
8
8
  import ProgressPopup from "d2coreui/components/grid/export/progressPopup";
9
9
  import WildcardQuickFilterEngine from "./filter/wildcardQuickFilterEngine";
10
+ /**
11
+ * Separator for joining several parts into one cell value (e.g. name and status).
12
+ * When a string cell value contains it (after the first character), clipboard copy of several rows and export
13
+ * replace every run of line breaks with a single space; copying a single focused cell keeps the line breaks.
14
+ */
10
15
  export declare const EXPORT_SEPARATOR = "\n";
16
+ /** A single (non-null) antd menu item as used by the export, settings and context menus of {@link DataGrid}. */
11
17
  export type MenuElement = Exclude<Exclude<MenuProps["items"], undefined>[number], null>;
12
18
  declare const enum NavigationEventEnum {
13
19
  KEYBOARD = 0,
14
20
  MOUSE = 1
15
21
  }
22
+ /**
23
+ * ag-grid's `viewportChanged` event enriched by {@link DataGrid}. The object passed to
24
+ * `DataGridProps.onViewportChanged` is actually of this type (cast it to read the extra field).
25
+ */
16
26
  export interface DataGridViewportChangedEvent extends ViewportChangedEvent {
27
+ /**
28
+ * Number of rows the last displayed row moved by since the previous viewport change: negative when
29
+ * scrolled/paged backwards (towards the first record), positive when forwards (towards the last record).
30
+ * On the first event it equals the number of displayed rows (`lastRow + 1`).
31
+ */
17
32
  rowsScrollingDelta: number;
18
33
  }
34
+ /** Sort direction of a column. */
19
35
  export type SortMode = "asc" | "desc";
36
+ /**
37
+ * Sorting of one column. A sort model is an array of these, ordered by sort priority
38
+ * (see {@link DataGrid.getSortModel} and {@link DataGrid.setSortModel}).
39
+ */
20
40
  export interface SortItem {
41
+ /** Column id (`ColDef.colId`). */
21
42
  colId: string;
43
+ /** Sort direction. */
22
44
  sort: SortMode;
23
45
  }
46
+ /**
47
+ * Renders a custom floating filter for a column (see {@link DataGridColDef.renderFilter}).
48
+ * @param value - current filter text (empty string when no filter is set)
49
+ * @param changeValue - updates the filter text in the ag-grid filter model without applying it
50
+ * @param onSearch - applies the current filter text (use e.g. on Enter)
51
+ * @returns the filter UI rendered beneath the column header
52
+ */
24
53
  export type FilterRenderer = (value: string, changeValue: (newValue: string) => void, onSearch: () => void) => React.ReactNode;
54
+ /**
55
+ * Column definition accepted by {@link DataGrid}: an ag-grid `ColDef` with a few extra fields.
56
+ *
57
+ * Unless `DataGridProps.disableColumnDefsPreprocessing` is set, DataGrid adapts every definition: it makes the column
58
+ * resizable, uses the built-in `simpleHeader` header component (column menu with pin/autosize/hide/reset/columns
59
+ * configuration), enables the floating filter only when the column (or one of its `type`s) defines one and the column
60
+ * search is visible, and takes `hide` from the current column state when the column is already known.
61
+ *
62
+ * Besides ag-grid's own, these values can be used in `type`: `numberColumn` (localized number, fraction digits from
63
+ * `cellRendererParams.fractionDigits`), `dateColumn`, `dateTimeColumn`, `fromNowDateTimeColumn` (D2000 unix time values,
64
+ * formatted according to `hideYear`/`showMilliseconds`/`showUtcOffset`), `localizedArrayColumn` (array of i18n keys),
65
+ * `escapedValueColumn` (line breaks shown as spaces), `alignRight`, and the filter types `textColumnFilter`
66
+ * (client-side text filter), `textColumnServerFilter` and `customColumnServerFilter` (filter applied explicitly, the latter
67
+ * rendered by {@link DataGridColDef.renderFilter}). Text filters are case-insensitive and `contains` supports `*` and `?` wildcards.
68
+ */
25
69
  export interface DataGridColDef extends Omit<ColDef, "cellStyle"> {
70
+ /** Localized name of the column group; columns are grouped by it in the columns configuration dialog. */
26
71
  group: string;
72
+ /** Arbitrary user data attached to the column definition. */
27
73
  context?: any;
74
+ /**
75
+ * Cell style (object or function), like ag-grid's `cellStyle` but a function may return `undefined`.
76
+ * It is merged over the grid's own cell style (font size, right alignment).
77
+ */
28
78
  cellStyle?: {
29
79
  [cssProperty: string]: string | number | null;
30
80
  } | ((cellClassParams: CellClassParams) => {
31
81
  [cssProperty: string]: string | number | null;
32
82
  } | undefined);
83
+ /** Custom floating filter renderer; used by columns of type `customColumnServerFilter`. */
33
84
  renderFilter?: FilterRenderer;
34
85
  }
86
+ /**
87
+ * Column group of {@link DataGrid}: a common header above its children, which are adapted like top-level columns.
88
+ * Not to be confused with {@link DataGridColDef.group}, which is the column's category in the columns configuration dialog.
89
+ */
90
+ export interface DataGridColGroupDef extends Omit<ColGroupDef, "children"> {
91
+ children: (DataGridColDef | DataGridColGroupDef)[];
92
+ }
93
+ /** Column (floating) filter configuration of {@link DataGrid}, see `DataGridProps.filter`. */
35
94
  export interface DataGridFilterProps {
95
+ /**
96
+ * Whether the floating filters beneath the column headers are visible (controlled). Hiding them clears the
97
+ * filter model. While visible, the search box is disabled.
98
+ */
36
99
  columnSearchVisible?: boolean;
100
+ /** Called when the user toggles the column filter in the settings menu; update `columnSearchVisible` in response. */
37
101
  onColumnSearchVisible?: (visible: boolean) => void;
102
+ /**
103
+ * Returns the ag-grid filter model to apply. It is re-applied whenever the `rowData` prop changes and when the
104
+ * column filter is toggled, so filters stay pre-filled (e.g. from the search box).
105
+ */
38
106
  getFilterModel?(): any;
107
+ /** Forwarded ag-grid `filterChanged` event (a filter was applied, e.g. Enter in a floating filter). */
39
108
  onFilterChanged?(event: FilterChangedEvent): void;
109
+ /** Forwarded ag-grid `filterModified` event (a filter value was edited but not necessarily applied). */
40
110
  onFilterModified?(event: FilterModifiedEvent): void;
111
+ /** Called when Enter is pressed in a text floating filter. */
41
112
  onFilterConfirmed?(): void;
42
113
  }
114
+ /** Search box and search button configuration of the {@link DataGrid} toolbar, see `DataGridProps.search`. */
43
115
  export interface DataGridSearchProps {
116
+ /** Placeholder of the empty search field. */
44
117
  placeholder?: string;
118
+ /** Current search text (controlled, update it from {@link DataGridSearchProps.onChange}). */
45
119
  searchString?: string;
120
+ /** Previous searches offered in the search field's popup. */
46
121
  searchHistory?: string[];
122
+ /** Extra CSS class of the search button. */
47
123
  searchButtonClassName?: string;
124
+ /** Disables the search button. */
48
125
  searchButtonDisabled?: boolean;
126
+ /** Hides the search button. */
49
127
  searchButtonHidden?: boolean;
128
+ /** Icon of the search button (replaced by a spinner while loading). */
50
129
  searchButtonIcon?: React.ReactNode;
130
+ /** Renders the search button as antd `danger`. */
51
131
  searchButtonDanger?: boolean;
132
+ /** Hides the search field; the search button then acts as a "Refresh" button with a reload icon. */
52
133
  hidden?: boolean;
134
+ /** Renders a custom search field in place of the built-in one. */
53
135
  searchRenderer?(): React.ReactNode;
136
+ /** Formats strings displayed in the search field and its history. */
54
137
  stringFormatter?(rawString: string): string;
138
+ /** Called when the search field text changes. */
55
139
  onChange?(searchString: string): void;
140
+ /**
141
+ * Called when a search is invoked: search button, Enter in the search field, or the "Search" button of the
142
+ * default no-records overlay.
143
+ */
56
144
  onSearch?(): void;
57
145
  }
146
+ /**
147
+ * Callback handed to `DataGridProps.onLoadData`; call it once the data are loaded. It hides the loading overlay,
148
+ * shows the no-records overlay when `totalRecords` is 0 and focuses the grid when `autofocus` is set.
149
+ */
58
150
  export type OnLoadDataCallback = (totalRecords: number) => void;
59
- export interface DataGridProps extends Omit<GridOptions, "columnDefs" | "paginationPageSize" | "getRowStyle" | "cellStyle"> {
60
- gridOptions?: GridOptions;
61
- columnDefs: DataGridColDef[];
151
+ /**
152
+ * Props of {@link DataGrid}. All other ag-grid `GridOptions` are passed through to `AgGridReact`, with these differences:
153
+ * - `columnDefs` are {@link DataGridColDef}s, optionally wrapped in {@link DataGridColGroupDef}s;
154
+ * - `paginationPageSize` is not available, use `paging.pageSize`;
155
+ * - `getRowStyle` is combined with {@link DataGridProps.rowStyleRules};
156
+ * - `getRowId` is fixed to `String(data.id)`, so every row object must have a unique `id`;
157
+ * - the pagination panel, overlays, header component, column types, `context` and several event handlers are provided
158
+ * by DataGrid (the handlers listed here are still called).
159
+ *
160
+ * @typeParam TData - row data type, passed to the ag-grid `GridOptions` (`rowData`, `getRowId`, events, ...)
161
+ */
162
+ export interface DataGridProps<TData = any> extends Omit<GridOptions<TData>, "columnDefs" | "paginationPageSize" | "getRowStyle" | "cellStyle"> {
163
+ /** ag-grid options object passed to `AgGridReact`, e.g. to link grids for the aligned grids feature. */
164
+ gridOptions?: GridOptions<TData>;
165
+ /** Column definitions; see {@link DataGridColDef} for how they are adapted. Columns may be wrapped in {@link DataGridColGroupDef}s. */
166
+ columnDefs: (DataGridColDef | DataGridColGroupDef)[];
167
+ /** Passes `columnDefs` to ag-grid unchanged (no header component, cell style or floating filter adaptation); used for aligned grids. */
62
168
  disableColumnDefsPreprocessing?: boolean;
63
- onColumnDefsAdapted?(columnDefs: ColDef[]): void;
169
+ /** Called asynchronously with the adapted column definitions each time they are rebuilt (not called when preprocessing is disabled). */
170
+ onColumnDefsAdapted?(columnDefs: (ColDef | ColGroupDef)[]): void;
171
+ /**
172
+ * Visibility of the advanced table configuration panel (page size, date format, row styles). Controlled: the panel
173
+ * is shown only while this is `true`; update it from {@link DataGridProps.onTableConfigVisible}.
174
+ */
64
175
  tableConfigVisible?: boolean;
176
+ /** Initial visibility of the columns configuration dialog; afterwards the dialog is managed internally. */
65
177
  columnsConfigVisible?: boolean;
178
+ /** Style merged into the body of the card wrapping the toolbar and the grid. */
66
179
  panelStyle?: React.CSSProperties;
180
+ /** Style merged into the panel wrapping the grid itself (below the toolbar). */
67
181
  tablePanelStyle?: React.CSSProperties;
182
+ /** Column (floating) filter configuration. */
68
183
  filter?: DataGridFilterProps;
184
+ /** Toolbar search box configuration. */
69
185
  search?: DataGridSearchProps;
186
+ /**
187
+ * Paging configuration.
188
+ * @default {pageSize: 0, defaultPageSize: 0}
189
+ */
70
190
  paging: {
191
+ /**
192
+ * Page size: `-1` disables paging (scrolling only, the toolbar shows the visible range instead of the pager),
193
+ * `0` sizes pages automatically to the available height, a positive number is a fixed number of rows per page.
194
+ */
71
195
  pageSize: number;
196
+ /** Page size restored when the table configuration is reset to defaults. */
72
197
  defaultPageSize?: number;
198
+ /**
199
+ * Called when the effective page size changes (reported by ag-grid) or when the user changes the paging in the
200
+ * table configuration panel. The grid does not store the new setting in `pageSize`; persist it if needed.
201
+ * @param currentPageSize - number of rows per page currently used by ag-grid (`null` before it is known)
202
+ * @param definedPageSize - configured page size with the same meaning as {@link pageSize} (`-1`, `0` or rows per page)
203
+ */
73
204
  onPaginationChanged?: (currentPageSize: number | null, definedPageSize: number) => void;
74
205
  };
206
+ /**
207
+ * When `true`, the `rowData` prop is not passed to ag-grid; supply data through {@link DataGrid.setRowData} or
208
+ * ag-grid transactions instead (avoids comparing large `rowData` arrays on every render).
209
+ */
75
210
  rowDataManualMode?: boolean;
211
+ /**
212
+ * Called when the grid needs data: once after the grid is ready and its page size is known, and on every
213
+ * {@link DataGrid.loadData} call. A loading overlay is shown until `callback` is called.
214
+ */
76
215
  onLoadData(callback: OnLoadDataCallback): void;
216
+ /** Focuses the first column of the (last) selected row, or the first row, after each data load. */
77
217
  autofocus?: boolean;
218
+ /** Called for every key down in a grid cell, after the built-in keyboard handling; `editing` is `true` while a cell editor is open. */
78
219
  onKeyPressed?(event: KeyboardEvent, editing: boolean): void;
220
+ /** Called when Enter is pressed in a grid cell. */
79
221
  onEnter?: () => void;
222
+ /**
223
+ * Ids of the rows to keep selected. Applied only when the `rowData` prop changes: matching rows are selected,
224
+ * and if none of them is present the selection is cleared.
225
+ */
80
226
  selectedIds?: (number | string)[];
227
+ /**
228
+ * Row styling rules. A rule applies to rows whose data match its `expression` (a filtrex expression evaluated on the
229
+ * row data) or to all rows when it has none; matching styles are merged in order. The rules with keys
230
+ * `table-font-size` and `table-line-indentation` also determine the font size and the row, header and floating
231
+ * filter heights.
232
+ * @default tableDefaultRowStyleRules()
233
+ */
81
234
  rowStyleRules: RowStyleRule[];
235
+ /** Row styling rules restored when the table configuration is reset to defaults. */
82
236
  defaultRowStyleRules?: RowStyleRule[];
237
+ /** Called when the user edits the row styling rules in the table configuration panel; update `rowStyleRules` in response. */
83
238
  onChangeRowStyleRules?(rowStyleRules: RowStyleRule[]): void;
239
+ /** Toolbar customization. The toolbar contains the extra buttons, export and settings menus, the search box and the pager. */
84
240
  toolbar?: {
241
+ /** Renders the toolbar part left of the pager; receives the default one (buttons, menus and search box) to wrap or replace. */
85
242
  renderToolbar?(originalSearchBar: ReactElement): ReactElement;
243
+ /** Extra buttons rendered at the start of the toolbar, before the export menu button. */
86
244
  toolbarButtons?: ReactElement;
245
+ /** Hides the "first-last of total" record range shown when paging is disabled (`pageSize` -1). */
87
246
  hideRecordCount?: boolean;
247
+ /** Extra content rendered at the end of the toolbar, after the pager or record count. */
88
248
  extraContent?: React.ReactNode;
89
249
  };
250
+ /** Called with the new row height in pixels when it changes because of the font size/line indentation rules. */
90
251
  onRowHeightChanged?(rowHeight: number): void;
252
+ /** Called with the full ag-grid column state when a column is shown/hidden, pinned, resized or moved; persist it to restore the layout. */
91
253
  onColumnsChanged?(columnModel: ColumnState[], event: ColumnEvent): void;
254
+ /** Called when the table configuration panel is requested to open (settings menu) or close. */
92
255
  onTableConfigVisible?(visible: boolean): void;
256
+ /** Called when the columns configuration dialog is opened or closed. */
93
257
  onColumnsConfigVisible?(visible: boolean): void;
258
+ /**
259
+ * Custom loading indicator. When set, ag-grid's loading overlay is suppressed and this is rendered over the grid
260
+ * while data are loading (otherwise a default spinner is shown).
261
+ */
94
262
  loadingOverlayRenderer?(): ReactElement | null;
263
+ /** Custom "no records" overlay; returning `null` (or omitting it) shows the default empty state with a "Search" button. */
95
264
  noRecordsOverlayRenderer?(): ReactElement | null;
265
+ /** Extra content rendered inside the grid panel after the grid, e.g. an absolutely positioned overlay. */
96
266
  tableOverlayRenderer?(): ReactElement | null;
267
+ /** Shows milliseconds in date-time columns (controlled, see {@link DataGridProps.onShowMilliseconds}). */
97
268
  showMilliseconds?: boolean;
269
+ /** Value of `showMilliseconds` restored when the table configuration is reset to defaults. */
98
270
  defaultShowMilliseconds?: boolean;
271
+ /**
272
+ * Called when the user toggles milliseconds in the table configuration panel. Update `showMilliseconds` and then
273
+ * call `callback` so the grid re-renders its rows with the new format.
274
+ */
99
275
  onShowMilliseconds?(show: boolean, callback: () => void): void;
276
+ /** Hides the year in date and date-time columns (controlled, see {@link DataGridProps.onShowYear}). */
100
277
  hideYear?: boolean;
278
+ /** Value of `hideYear` restored when the table configuration is reset to defaults. */
101
279
  defaultHideYear?: boolean;
280
+ /**
281
+ * Called when the user toggles the year in the table configuration panel; note that `show` is the inverse of
282
+ * `hideYear`. Update `hideYear` and then call `callback` so the grid re-renders its rows.
283
+ */
102
284
  onShowYear?(show: boolean, callback: () => void): void;
285
+ /** Shows the UTC offset in date-time columns (controlled, see {@link DataGridProps.onShowUtcOffset}). */
103
286
  showUtcOffset?: boolean;
287
+ /** Value of `showUtcOffset` restored when the table configuration is reset to defaults. */
104
288
  defaultShowUtcOffset?: boolean;
289
+ /**
290
+ * Called when the user toggles the UTC offset in the table configuration panel. Update `showUtcOffset` and then
291
+ * call `callback` so the grid re-renders its rows.
292
+ */
105
293
  onShowUtcOffset?(show: boolean, callback: () => void): void;
294
+ /** Toolbar export menu customization; the built-in items export all displayed rows to TXT, CSV, PDF or the clipboard. */
106
295
  exportMenu?: {
296
+ /** Transforms the default menu items, e.g. to add or remove entries. */
107
297
  renderer?(menuElements: MenuElement[]): MenuElement[];
298
+ /** Called with the key of every clicked menu item, built-in ones included. */
108
299
  onClick?(key: string): void;
300
+ /** Called after an export finishes with the number of exported rows and the file name (or `"[CLIPBOARD]"`). */
109
301
  onExported?(rowCount: number, destination: string): void;
110
302
  };
303
+ /** Toolbar settings menu customization (column filter, autosize, columns configuration, advanced settings). */
111
304
  settingsMenu?: {
305
+ /** Transforms the default menu items, e.g. to add or remove entries. */
112
306
  renderer?(menuElements: MenuElement[]): MenuElement[];
307
+ /** Called with the key of a clicked custom (non built-in) menu item. */
113
308
  onClick?(key: string): void;
114
309
  };
310
+ /** Row context menu (right click) customization; the built-in items export the selected rows to TXT, CSV, PDF or the clipboard. */
115
311
  contextMenu?: {
312
+ /** Transforms the default menu items, e.g. to add or remove entries. */
116
313
  renderer?(menuElements: MenuElement[]): MenuElement[];
314
+ /** Called with the key of every clicked menu item, built-in ones included. */
117
315
  onClick?(key: string): void;
118
316
  };
317
+ /** Additional row style merged over the style computed from {@link DataGridProps.rowStyleRules}; may return `undefined`. */
119
318
  getRowStyle?(params: any): GridRowStyle | undefined;
120
- gridRef?: React.RefObject<AgGridReact>;
319
+ /** Ref receiving the underlying `AgGridReact` instance. */
320
+ gridRef?: React.RefObject<AgGridReact<TData>>;
321
+ /**
322
+ * Enables an Excel-like fill handle on the focused cell: dragging from its bottom-right corner selects a cell range
323
+ * and reports it through {@link DataGridProps.onFillHandleComplete}. The grid does not modify any data itself.
324
+ */
121
325
  showFillHandle?: boolean;
326
+ /**
327
+ * Called when a fill handle drag ends.
328
+ * @param startRow - first row index of the range (inclusive)
329
+ * @param endRow - last row index of the range (inclusive)
330
+ * @param columns - ids of the displayed columns in the range, in display order
331
+ */
122
332
  onFillHandleComplete?: (startRow: number, endRow: number, columns: string[]) => void;
123
333
  }
124
334
  interface CellCoord {
@@ -146,7 +356,40 @@ interface DataGridState {
146
356
  endCoord: CellCoord | null;
147
357
  focusedCell: CellCoord | null;
148
358
  }
149
- export default class DataGrid extends React.Component<DataGridProps, DataGridState> {
359
+ /**
360
+ * ag-grid (community modules, Balham theme derived from the antd theme tokens unless `theme` is given) wrapped in a
361
+ * card with a toolbar: custom buttons,
362
+ * export and settings menus, a search box and a pager. Adds D2000 column types (see {@link DataGridColDef}), rule-based
363
+ * row styling with configurable font size and row height, a table configuration panel, a columns configuration
364
+ * dialog, a row context menu with export, wildcard quick filter and an optional fill handle.
365
+ *
366
+ * Data are requested through `onLoadData`; use `rowData` (client-side row model) or an ag-grid `datasource`
367
+ * (infinite row model). Row objects must have a unique `id`. The grid state (paging, columns, row styles, date format)
368
+ * is not persisted by DataGrid itself; it reports changes through callbacks and expects the updated values back in
369
+ * props (`ExtendedDataGrid` from `d2coreui/components/grid/extendedDataGrid` keeps this state and reports it as one
370
+ * configuration object; storing it is still up to the caller).
371
+ *
372
+ * Keyboard: PageUp/PageDown/Home/End and arrows at page edges move across pages, Alt+arrows move the open cell editor,
373
+ * Ctrl+A selects the displayed rows, Ctrl+C copies the selected rows with a header line (when more than one is
374
+ * selected) or the focused cell,
375
+ * Ctrl+I / Ctrl+B copy the `objectId`/`id` or `objectName`/`name` column of the focused row.
376
+ *
377
+ * @example
378
+ * <DataGrid
379
+ * columnDefs={[{colId: "name", field: "name", headerName: "Name", group: "Object", type: "textColumnFilter"}]}
380
+ * rowData={rows}
381
+ * paging={{pageSize: 0}}
382
+ * rowStyleRules={rowStyleRules}
383
+ * onChangeRowStyleRules={setRowStyleRules}
384
+ * onLoadData={(callback) => loadRows().then((rows) => { setRows(rows); callback(rows.length); })}
385
+ * />
386
+ *
387
+ * @typeParam TData - row data type, see {@link DataGridProps}
388
+ */
389
+ export default class DataGrid<TData extends {
390
+ id: number | string;
391
+ } = any> extends React.Component<DataGridProps<TData>, DataGridState> {
392
+ /** Default `paging` (automatic page size) and `rowStyleRules` ({@link tableDefaultRowStyleRules}). */
150
393
  static defaultProps: {
151
394
  paging: {
152
395
  pageSize: number;
@@ -154,82 +397,188 @@ export default class DataGrid extends React.Component<DataGridProps, DataGridSta
154
397
  };
155
398
  rowStyleRules: RowStyleRule[];
156
399
  };
400
+ /** Whether the initial `onLoadData` call has already been made. */
157
401
  firstLoadDone: boolean;
402
+ /** Engine providing the wildcard (`*`, `?`) quick filter and text filter matching. */
158
403
  wildcardQuickFilter: WildcardQuickFilterEngine;
404
+ /** Custom ag-grid column types registered by the grid (see {@link DataGridColDef}). */
159
405
  columnTypes: {
160
- [key: string]: ColDef;
406
+ [key: string]: ColTypeDef<TData>;
161
407
  };
162
- gridApi?: GridApi;
408
+ /** ag-grid API; `undefined` until the grid is ready. */
409
+ gridApi?: GridApi<TData>;
410
+ /** Column state saved when the columns configuration dialog opens, restored when it is cancelled. */
163
411
  columnModelBeforeEdit?: ColumnState[];
412
+ /** Row index to focus after the pending page change. */
164
413
  indexToJump: number | null;
414
+ /** Column to focus after the pending page change. */
165
415
  columnToJump: Column | null;
416
+ /** Last `cellFocused` event, used for Shift+arrow range selection. */
166
417
  lastCellFocus?: CellFocusedEvent;
418
+ /** Whether the last navigation was done by keyboard or mouse. */
167
419
  lastNavigationEvent?: NavigationEventEnum;
420
+ /** Pagination event received before the grid API was available, replayed once the grid is ready. */
168
421
  lastPaginationEvent?: PaginationChangedEvent | null;
422
+ /**
423
+ * Object passed to ag-grid as `context`; the grid's overlays, header and filter components read the overlay
424
+ * renderers, `onFilterConfirmed`, `fontSize` and `lineHeight` from it.
425
+ */
169
426
  table_context: any;
170
427
  private readonly getTheme;
171
- constructor(props: Readonly<DataGridProps>);
428
+ constructor(props: Readonly<DataGridProps<TData>>);
172
429
  private static getCellValue;
430
+ /**
431
+ * Case-insensitive `textCustomComparator` used by the grid's text filters; `contains` supports `*` and `?` wildcards.
432
+ * @param filter - ag-grid text filter type (`contains`, `notContains`, `equals`, `notEqual`, `startsWith`, `endsWith`)
433
+ * @returns whether `value` passes the filter
434
+ */
173
435
  textCustomComparator(filter: string, value: any, filterText: string): boolean;
174
- componentDidUpdate(prevProps: DataGridProps): void;
436
+ componentDidUpdate(prevProps: DataGridProps<TData>): void;
175
437
  componentWillUnmount(): void;
438
+ /**
439
+ * Applies a column state (order, width, visibility, pinning, sorting) to the grid, e.g. one saved from
440
+ * `onColumnsChanged`. Columns not in the state lose their sorting. No-op until the grid is ready.
441
+ * Note: it clears `sort` and `sortIndex` on the passed objects.
442
+ */
176
443
  setColumnState(columnModel: ColumnState[]): void;
444
+ /**
445
+ * Sorts the grid by the given columns; array order defines the sort priority and all other columns are unsorted.
446
+ * No-op until the grid is ready.
447
+ */
177
448
  setSortModel(sortModel: SortItem[]): void;
449
+ /** Returns the sorted columns ordered by sort priority; empty until the grid is ready. */
178
450
  getSortModel(): SortItem[];
451
+ /** Recomputes font size and row height from `rowStyleRules` and applies them if they changed. */
179
452
  updateRowHeight(): void;
453
+ /**
454
+ * Computes the font size and row height (pixels) defined by the `table-font-size` and `table-line-indentation`
455
+ * rules, falling back to the grid defaults.
456
+ */
180
457
  calculateRowAndFontHeight(rowStyleRules?: RowStyleRule[]): {
181
458
  fontSize: number;
182
459
  rowHeight: number;
183
460
  };
461
+ /** Synchronizes the table configuration panel visibility with the `tableConfigVisible` prop when it is set. */
184
462
  static getDerivedStateFromProps(props: DataGridProps, state: DataGridState): Partial<DataGridState>;
185
- onGridReady(gridReadyEvent: GridReadyEvent): void;
463
+ /** ag-grid `gridReady` handler: stores the grid API, forwards the event to `props.onGridReady` and initializes sort/column state. */
464
+ onGridReady(gridReadyEvent: GridReadyEvent<TData>): void;
465
+ /**
466
+ * ag-grid `paginationChanged` handler: updates the pager, reports page size changes through
467
+ * `paging.onPaginationChanged`, triggers the initial data load and forwards the event to `props.onPaginationChanged`.
468
+ */
186
469
  onPaginationChanged(event: PaginationChangedEvent): void;
470
+ /** ag-grid `viewportChanged` handler: adds `rowsScrollingDelta` (see {@link DataGridViewportChangedEvent}) and forwards the event to `props.onViewportChanged`. */
187
471
  onViewportChanged(event: ViewportChangedEvent): void;
472
+ /**
473
+ * Switches the paging mode at runtime (used by the table configuration panel) and reports it through
474
+ * `paging.onPaginationChanged`; the `paging.pageSize` prop is not changed. No-op until the grid is ready.
475
+ * @param pageSize - `-1` no paging, `0` automatic page size, positive number fixed rows per page
476
+ */
188
477
  changePagination(pageSize: number): void;
478
+ /** Requests showing/hiding milliseconds via `props.onShowMilliseconds` and redraws the rows once the parent calls back. */
189
479
  showMilliseconds(showMilis: boolean): void;
480
+ /** Requests showing/hiding the year via `props.onShowYear` and redraws the rows once the parent calls back. */
190
481
  showYear(showYear: boolean): void;
482
+ /** Requests showing/hiding the UTC offset via `props.onShowUtcOffset` and redraws the rows once the parent calls back. */
191
483
  showUtcOffset(showUtcOffset: boolean): void;
484
+ /**
485
+ * Applies a new row height (and header/floating filter height derived from `fontSize`, unless given in props),
486
+ * redraws the grid (reloading an infinite datasource) and calls `props.onRowHeightChanged`.
487
+ */
192
488
  changeRowHeight(fontSize: number, rowHeight: number): void;
489
+ /** Shows the page with the given zero-based index. */
193
490
  onGoToPage(pageIndex: number): void;
491
+ /**
492
+ * (Re)loads data: shows the loading overlay and calls `props.onLoadData`. No-op until the grid is ready.
493
+ * @param callback - called after `onLoadData` reports that loading has finished
494
+ */
194
495
  loadData(callback?: () => void): void;
496
+ /** Focuses (after a short delay) the first column of the last selected row, or of the first row when nothing is selected. */
195
497
  focus(): void;
498
+ /** Returns `true` when the grid is ready and not destroyed. */
196
499
  isActive(): boolean;
500
+ /** Handler of ag-grid column visible/pinned/resized/moved events; stores the column state and calls `props.onColumnsChanged`. */
197
501
  onColumnsChanged(event: ColumnEvent): void;
502
+ /**
503
+ * ag-grid `newColumnsLoaded` handler: refreshes the stored column state after `columnDefs` change, without calling
504
+ * `props.onColumnsChanged`, and forwards the event to `props.onNewColumnsLoaded`.
505
+ */
506
+ onNewColumnsLoaded(event: NewColumnsLoadedEvent): void;
507
+ /**
508
+ * Requests showing/hiding the floating column filters: re-applies `filter.getFilterModel()` and calls
509
+ * `filter.onColumnSearchVisible`; the actual visibility follows `filter.columnSearchVisible`.
510
+ */
198
511
  setColumnSearchVisible(visible: boolean): void;
199
512
  private onFilterModified;
200
513
  private onFilterChanged;
201
514
  private onFilterConfirmed;
202
515
  private onSortChanged;
516
+ /** Requests opening/closing the table configuration panel via `props.onTableConfigVisible`; redraws the rows when it closes. */
203
517
  showTableConfiguration(show: boolean): void;
518
+ /** Opens/closes the columns configuration dialog and calls `props.onColumnsConfigVisible`. */
204
519
  showColumnsConfig(show: boolean): void;
205
520
  private navigateToNextCell;
206
521
  private suppressKeyboardEvent;
522
+ /**
523
+ * Returns the cell value as used for clipboard copy and export: the ag-grid cell value passed through the column's
524
+ * `valueFormatter` (a string formatter is treated as a field path into the row data).
525
+ * @param doNotReplaceNewline - keep line breaks in values containing {@link EXPORT_SEPARATOR} (otherwise replaced by a space)
526
+ */
207
527
  getValue(column: Column, row: IRowNode, doNotReplaceNewline?: boolean): string;
528
+ /**
529
+ * Collects the table content for export: a header row with the displayed column names followed by one row of
530
+ * {@link DataGrid.getValue} values per record (all filtered and sorted rows, or only the selected ones when
531
+ * `props.onlySelectedNodes` is set). With a non client-side row model it waits for rows to be loaded.
532
+ * @param progressPopup - optional popup updated with the progress
533
+ * @returns rows of cell strings; empty when the grid is not ready
534
+ */
208
535
  getExportContent(progressPopup: ProgressPopup | null, props: ContextMenuProps): Promise<string[][]>;
536
+ /**
537
+ * ag-grid `cellFocused` handler: selects the focused row (Shift+arrow extends/shrinks the selection), tracks the
538
+ * fill handle cell and forwards the event to `props.onCellFocused`.
539
+ */
209
540
  onCellFocused(event: CellFocusedEvent): void;
541
+ /** ag-grid `cellMouseOver` handler: extends the fill handle range while dragging. */
210
542
  onCellMouseOver(e: CellMouseOverEvent): void;
543
+ /**
544
+ * ag-grid `cellMouseDown` handler: focuses the clicked cell, forwards the event to `props.onCellMouseDown` and
545
+ * starts a fill handle drag when the bottom-right corner of the cell is pressed.
546
+ */
211
547
  onCellMouseDown(e: CellMouseDownEvent): void;
548
+ /** Window `mouseup` handler: finishes a fill handle drag and calls `props.onFillHandleComplete`. */
212
549
  onMouseUp(): void;
550
+ /** Focuses the given cell; debounced by 200 ms. */
213
551
  setFocusedCellDebounced(rowIndex: number, column: string | Column, rowPinned: RowPinnedType): void;
214
552
  private onCellContextMenu;
215
553
  private loadingOverlayRenderer;
216
554
  private noRecordsOverlayRenderer;
555
+ /**
556
+ * Replaces the grid's row data (client-side row model) without going through the `rowData` prop; intended for
557
+ * {@link DataGridProps.rowDataManualMode}. No-op until the grid is ready.
558
+ */
217
559
  setRowData(dataArray: any[]): void;
218
560
  private onRowDataUpdated;
219
561
  private static EMPTY_STYLE;
562
+ /** ag-grid `getRowStyle` implementation: merges the matching `rowStyleRules` and then `props.getRowStyle`. */
220
563
  _getRowStyle(params: RowClassParams): RowStyle;
564
+ /** ag-grid `getRowHeight` implementation: the current row height in pixels. */
221
565
  _getRowHeight(): number;
566
+ /** Cell style applied to every adapted column: font size, right alignment for `alignRight` and the column's own `cellStyle`. */
222
567
  _getCellStyle(params: {
223
568
  colDef: ColDef;
224
569
  }): {
225
570
  [key: string]: any;
226
571
  };
572
+ /** Returns `props.defaultColDef` extended with the grid's keyboard handling (`suppressKeyboardEvent` is always overridden). */
227
573
  getDefaultColDefinition(colDef: ColDef | undefined): ColDef;
228
574
  private getCustomComponents;
229
575
  private onPageOrientationChange;
230
576
  private onExport;
577
+ /** Renders the toolbar row: toolbar with search, pager (or record range when paging is disabled) and `toolbar.extraContent`. */
231
578
  renderNavigationPanel(): ReactElement;
579
+ /** Renders the default toolbar: `toolbar.toolbarButtons`, export and settings menus, search field and search button. */
232
580
  renderToolBarWithSearch(): ReactElement;
581
+ /** Builds the toolbar settings menu (keys `columnFilter`, `autosizeAllColumns`, `columnsConfig`, `advancedConfig`), passed through `settingsMenu.renderer`. */
233
582
  getSettingsMenu(): MenuProps;
234
583
  private getAdaptedColumnDefs;
235
584
  private isInRange;