d2coreui 23.0.52 → 23.0.53

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