@coreui/react-data-grid 0.1.0-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (104) hide show
  1. package/LICENSE +3 -0
  2. package/README.md +33 -0
  3. package/dist/cjs/CDataGrid.d.ts +8 -0
  4. package/dist/cjs/CDataGrid.js +903 -0
  5. package/dist/cjs/CDataGrid.js.map +1 -0
  6. package/dist/cjs/CDataGridBody.d.ts +40 -0
  7. package/dist/cjs/CDataGridBody.js +144 -0
  8. package/dist/cjs/CDataGridBody.js.map +1 -0
  9. package/dist/cjs/CDataGridCellEditor.d.ts +8 -0
  10. package/dist/cjs/CDataGridCellEditor.js +67 -0
  11. package/dist/cjs/CDataGridCellEditor.js.map +1 -0
  12. package/dist/cjs/CDataGridColumnChooser.d.ts +23 -0
  13. package/dist/cjs/CDataGridColumnChooser.js +71 -0
  14. package/dist/cjs/CDataGridColumnChooser.js.map +1 -0
  15. package/dist/cjs/CDataGridFilterMenu.d.ts +22 -0
  16. package/dist/cjs/CDataGridFilterMenu.js +177 -0
  17. package/dist/cjs/CDataGridFilterMenu.js.map +1 -0
  18. package/dist/cjs/CDataGridHeader.d.ts +36 -0
  19. package/dist/cjs/CDataGridHeader.js +232 -0
  20. package/dist/cjs/CDataGridHeader.js.map +1 -0
  21. package/dist/cjs/CDataGridHeaderMenu.d.ts +29 -0
  22. package/dist/cjs/CDataGridHeaderMenu.js +127 -0
  23. package/dist/cjs/CDataGridHeaderMenu.js.map +1 -0
  24. package/dist/cjs/CDataGridPagination.d.ts +18 -0
  25. package/dist/cjs/CDataGridPagination.js +39 -0
  26. package/dist/cjs/CDataGridPagination.js.map +1 -0
  27. package/dist/cjs/CDataGridToolbar.d.ts +32 -0
  28. package/dist/cjs/CDataGridToolbar.js +49 -0
  29. package/dist/cjs/CDataGridToolbar.js.map +1 -0
  30. package/dist/cjs/active-cell.d.ts +22 -0
  31. package/dist/cjs/active-cell.js +89 -0
  32. package/dist/cjs/active-cell.js.map +1 -0
  33. package/dist/cjs/columns.d.ts +37 -0
  34. package/dist/cjs/columns.js +170 -0
  35. package/dist/cjs/columns.js.map +1 -0
  36. package/dist/cjs/icons.d.ts +22 -0
  37. package/dist/cjs/icons.js +40 -0
  38. package/dist/cjs/icons.js.map +1 -0
  39. package/dist/cjs/index.d.ts +12 -0
  40. package/dist/cjs/index.js +39 -0
  41. package/dist/cjs/index.js.map +1 -0
  42. package/dist/cjs/labels.d.ts +7 -0
  43. package/dist/cjs/pinning.d.ts +19 -0
  44. package/dist/cjs/pinning.js +32 -0
  45. package/dist/cjs/pinning.js.map +1 -0
  46. package/dist/cjs/toolbar.d.ts +22 -0
  47. package/dist/cjs/toolbar.js +43 -0
  48. package/dist/cjs/toolbar.js.map +1 -0
  49. package/dist/cjs/tooltip.d.ts +10 -0
  50. package/dist/cjs/tooltip.js +102 -0
  51. package/dist/cjs/tooltip.js.map +1 -0
  52. package/dist/cjs/types.d.ts +287 -0
  53. package/dist/esm/CDataGrid.d.ts +8 -0
  54. package/dist/esm/CDataGrid.mjs +901 -0
  55. package/dist/esm/CDataGrid.mjs.map +1 -0
  56. package/dist/esm/CDataGridBody.d.ts +40 -0
  57. package/dist/esm/CDataGridBody.mjs +142 -0
  58. package/dist/esm/CDataGridBody.mjs.map +1 -0
  59. package/dist/esm/CDataGridCellEditor.d.ts +8 -0
  60. package/dist/esm/CDataGridCellEditor.mjs +65 -0
  61. package/dist/esm/CDataGridCellEditor.mjs.map +1 -0
  62. package/dist/esm/CDataGridColumnChooser.d.ts +23 -0
  63. package/dist/esm/CDataGridColumnChooser.mjs +69 -0
  64. package/dist/esm/CDataGridColumnChooser.mjs.map +1 -0
  65. package/dist/esm/CDataGridFilterMenu.d.ts +22 -0
  66. package/dist/esm/CDataGridFilterMenu.mjs +175 -0
  67. package/dist/esm/CDataGridFilterMenu.mjs.map +1 -0
  68. package/dist/esm/CDataGridHeader.d.ts +36 -0
  69. package/dist/esm/CDataGridHeader.mjs +230 -0
  70. package/dist/esm/CDataGridHeader.mjs.map +1 -0
  71. package/dist/esm/CDataGridHeaderMenu.d.ts +29 -0
  72. package/dist/esm/CDataGridHeaderMenu.mjs +125 -0
  73. package/dist/esm/CDataGridHeaderMenu.mjs.map +1 -0
  74. package/dist/esm/CDataGridPagination.d.ts +18 -0
  75. package/dist/esm/CDataGridPagination.mjs +37 -0
  76. package/dist/esm/CDataGridPagination.mjs.map +1 -0
  77. package/dist/esm/CDataGridToolbar.d.ts +32 -0
  78. package/dist/esm/CDataGridToolbar.mjs +47 -0
  79. package/dist/esm/CDataGridToolbar.mjs.map +1 -0
  80. package/dist/esm/active-cell.d.ts +22 -0
  81. package/dist/esm/active-cell.mjs +86 -0
  82. package/dist/esm/active-cell.mjs.map +1 -0
  83. package/dist/esm/columns.d.ts +37 -0
  84. package/dist/esm/columns.mjs +163 -0
  85. package/dist/esm/columns.mjs.map +1 -0
  86. package/dist/esm/icons.d.ts +22 -0
  87. package/dist/esm/icons.mjs +24 -0
  88. package/dist/esm/icons.mjs.map +1 -0
  89. package/dist/esm/index.d.mts +1 -0
  90. package/dist/esm/index.d.ts +12 -0
  91. package/dist/esm/index.mjs +5 -0
  92. package/dist/esm/index.mjs.map +1 -0
  93. package/dist/esm/labels.d.ts +7 -0
  94. package/dist/esm/pinning.d.ts +19 -0
  95. package/dist/esm/pinning.mjs +29 -0
  96. package/dist/esm/pinning.mjs.map +1 -0
  97. package/dist/esm/toolbar.d.ts +22 -0
  98. package/dist/esm/toolbar.mjs +41 -0
  99. package/dist/esm/toolbar.mjs.map +1 -0
  100. package/dist/esm/tooltip.d.ts +10 -0
  101. package/dist/esm/tooltip.mjs +100 -0
  102. package/dist/esm/tooltip.mjs.map +1 -0
  103. package/dist/esm/types.d.ts +287 -0
  104. package/package.json +92 -0
@@ -0,0 +1,22 @@
1
+ /**
2
+ * --------------------------------------------------------------------------
3
+ * CoreUI PRO react-data-grid icons.tsx
4
+ * License (https://coreui.io/pro/license/)
5
+ * --------------------------------------------------------------------------
6
+ */
7
+ import type { ReactNode } from 'react';
8
+ export declare const DEFAULT_COLUMN_MENU_ICON: ReactNode;
9
+ export declare const DEFAULT_SORT_ASCENDING_ICON: ReactNode;
10
+ export declare const DEFAULT_SORT_DESCENDING_ICON: ReactNode;
11
+ export declare const DEFAULT_SORT_NEUTRAL_ICON: ReactNode;
12
+ export declare const DEFAULT_PIN_LEFT_ICON: ReactNode;
13
+ export declare const DEFAULT_PIN_RIGHT_ICON: ReactNode;
14
+ export declare const DEFAULT_UNPIN_ICON: ReactNode;
15
+ export declare const DEFAULT_MOVE_LEFT_ICON: ReactNode;
16
+ export declare const DEFAULT_MOVE_RIGHT_ICON: ReactNode;
17
+ export declare const DEFAULT_FILTER_ICON: ReactNode;
18
+ export declare const DEFAULT_TOOLBAR_COLUMNS_ICON: ReactNode;
19
+ export declare const DEFAULT_TOOLBAR_EXPORT_ICON: ReactNode;
20
+ export declare const DEFAULT_TOOLBAR_UNDO_ICON: ReactNode;
21
+ export declare const DEFAULT_TOOLBAR_REDO_ICON: ReactNode;
22
+ export declare const DEFAULT_HIDE_COLUMN_ICON: ReactNode;
@@ -0,0 +1,24 @@
1
+ import { jsx, jsxs } from 'react/jsx-runtime';
2
+
3
+ // Default icon set. Every icon is a `ReactNode` drawn with `currentColor`, so it
4
+ // inherits the button's text color; each is overridable through the matching
5
+ // `*Icon` prop.
6
+ const PIN_PATH = 'm477.8 140.2-106-106a62.132 62.132 0 0 0-93.617 81.24l-4.913 5.533-97.654 42.9-42.611-23.026a24.04 24.04 0 0 0-28.86 4.638L62.6 189.487a23.88 23.88 0 0 0 .479 33.449l101.68 101.679L16 473.373V496h22.627l148.758-148.758L288.6 448.457a23.93 23.93 0 0 0 33.275.642l44.425-41.128a23.98 23.98 0 0 0 4.773-29.092l-23.344-42.858 42.131-90.515 8.6-10.318A62.134 62.134 0 0 0 477.8 140.2m-22.628 65.231a30.125 30.125 0 0 1-42.6 0l-16.885-16.886-33.08 39.678-50.7 108.933 28.087 51.566-34.209 31.669L91.2 205.806l32-33.89 50.969 27.543 118.386-52.008 29.177-32.863-15.158-15.161a30.126 30.126 0 0 1 42.6-42.6l106 106a30.126 30.126 0 0 1 0 42.6Z';
7
+ const DEFAULT_COLUMN_MENU_ICON = (jsx("svg", { width: 16, height: 16, viewBox: "0 0 512 512", "aria-hidden": "true", focusable: "false", children: jsx("path", { fill: "currentColor", d: "M204 148a52 52 0 1 0 104 0 52 52 0 1 0-104 0m78 0a26 26 0 1 1-26-26 26.03 26.03 0 0 1 26 26M204 264a52 52 0 1 0 104 0 52 52 0 1 0-104 0m78 0a26 26 0 1 1-26-26 26.03 26.03 0 0 1 26 26M204 380a52 52 0 1 0 104 0 52 52 0 1 0-104 0m78 0a26 26 0 1 1-26-26 26.03 26.03 0 0 1 26 26" }) }));
8
+ const DEFAULT_SORT_ASCENDING_ICON = (jsx("svg", { width: 16, height: 16, viewBox: "0 0 512 512", "aria-hidden": "true", focusable: "false", children: jsx("path", { fill: "currentColor", d: "M390.624 150.625 256 16 121.376 150.625l22.628 22.627 95.997-95.998v417.982h32V77.257l95.995 95.995z" }) }));
9
+ const DEFAULT_SORT_DESCENDING_ICON = (jsx("svg", { width: 16, height: 16, viewBox: "0 0 512 512", "aria-hidden": "true", focusable: "false", children: jsx("path", { fill: "currentColor", d: "m367.997 338.75-95.998 95.997V17.503h-32v417.242l-95.996-95.995-22.627 22.627L256 496l134.624-134.623z" }) }));
10
+ const DEFAULT_SORT_NEUTRAL_ICON = (jsx("svg", { width: 16, height: 16, viewBox: "0 0 512 512", "aria-hidden": "true", focusable: "false", children: jsx("path", { fill: "currentColor", d: "M384 433.373V160h-32v274.51l-69.823-69.823-22.627 22.626 107.882 107.883 107.881-107.883-22.626-22.626zM159.432 17.372 51.55 125.255l22.627 22.627L144 78.059V352h32V79.195l68.687 68.687 22.626-22.627z" }) }));
11
+ const DEFAULT_PIN_LEFT_ICON = (jsx("svg", { width: 16, height: 16, viewBox: "0 0 512 512", "aria-hidden": "true", focusable: "false", children: jsx("path", { fill: "currentColor", d: PIN_PATH }) }));
12
+ const DEFAULT_PIN_RIGHT_ICON = (jsx("svg", { width: 16, height: 16, viewBox: "0 0 512 512", "aria-hidden": "true", focusable: "false", children: jsx("g", { transform: "translate(512 0) scale(-1 1)", children: jsx("path", { fill: "currentColor", d: PIN_PATH }) }) }));
13
+ const DEFAULT_UNPIN_ICON = (jsx("svg", { width: 16, height: 16, viewBox: "0 0 512 512", "aria-hidden": "true", focusable: "false", children: jsx("path", { fill: "currentColor", d: "m427.314 107.313-22.628-22.626L256 233.373 107.314 84.687l-22.628 22.626L233.373 256 84.686 404.687l22.628 22.626L256 278.627l148.686 148.686 22.628-22.626L278.627 256z" }) }));
14
+ const DEFAULT_MOVE_LEFT_ICON = (jsx("svg", { width: 16, height: 16, viewBox: "0 0 512 512", "aria-hidden": "true", focusable: "false", children: jsx("path", { fill: "currentColor", d: "M254.625 56h-38.632L16 256.2 216 456h38.623V336h144V176h-144Zm112 152v96h-144v113.384l-161.37-161.21 161.37-161.535V208Zm96-152h32v400h-32z" }) }));
15
+ const DEFAULT_MOVE_RIGHT_ICON = (jsx("svg", { width: 16, height: 16, viewBox: "0 0 512 512", "aria-hidden": "true", focusable: "false", children: jsx("path", { fill: "currentColor", d: "M296.007 56h-38.632v120h-144v160h144v120H296l200-199.8Zm-6.632 361.384V304h-144v-96h144V94.639l161.37 161.535ZM17.375 56h32v400h-32z" }) }));
16
+ const DEFAULT_FILTER_ICON = (jsx("svg", { width: 16, height: 16, viewBox: "0 0 512 512", "aria-hidden": "true", focusable: "false", children: jsx("path", { fill: "currentColor", d: "M96 197.333h320v32H96zm72 101.334h176v32H168zM216 400h80v32h-80zM48 96h416v32H48z" }) }));
17
+ const DEFAULT_TOOLBAR_COLUMNS_ICON = (jsx("svg", { width: 16, height: 16, viewBox: "0 0 512 512", "aria-hidden": "true", focusable: "false", children: jsx("path", { fill: "currentColor", d: "M16 64v384h480V64Zm304 32v320H192V96ZM48 96h112v320H48Zm416 320H352V96h112Z" }) }));
18
+ const DEFAULT_TOOLBAR_EXPORT_ICON = (jsx("svg", { width: 16, height: 16, viewBox: "0 0 512 512", "aria-hidden": "true", focusable: "false", children: jsx("path", { fill: "currentColor", d: "M16 464h480v32H16zm379.313-164.687-22.626-22.626L280 369.373V16h-32v353.373l-92.687-92.686-22.626 22.626L264 430.627z" }) }));
19
+ const DEFAULT_TOOLBAR_UNDO_ICON = (jsx("svg", { width: 16, height: 16, viewBox: "0 0 512 512", "aria-hidden": "true", focusable: "false", children: jsx("path", { fill: "currentColor", d: "M495.473 197.262c0-73.061-43.651-136.118-106.242-164.462q-2-.9-4.021-1.762-4.046-1.715-8.19-3.235-2.071-.761-4.167-1.47-4.19-1.422-8.468-2.64a180.95 180.95 0 0 0-98.675 0q-4.278 1.218-8.469 2.64-2.094.71-4.166 1.47-4.143 1.519-8.19 3.235-2.023.857-4.021 1.762c-62.592 28.344-106.242 91.4-106.242 164.462v237.483L38.627 338.75 16 361.377 150.623 496l134.623-134.623-22.627-22.627-96 96V197.263c0-72.891 52.814-133.678 122.186-146.1a149.4 149.4 0 0 1 52.479 0c69.371 12.426 122.186 73.213 122.186 146.1h32Z" }) }));
20
+ const DEFAULT_TOOLBAR_REDO_ICON = (jsxs("svg", { width: 16, height: 16, viewBox: "0 0 512 512", "aria-hidden": "true", focusable: "false", children: [jsx("path", { fill: "currentColor", d: "M361.376 495.163 226.753 360.54l22.627-22.627 111.996 111.996 111.997-111.996L496 360.54z" }), jsx("path", { fill: "currentColor", d: "M377.377 472.52h-32V196.426C345.377 114.584 278.794 48 196.952 48c-83.229 0-148.426 63.106-148.426 143.667h-32c0-48.024 18.85-92.569 53.079-125.429C103.35 33.842 148.576 16 196.952 16c99.487 0 180.425 80.938 180.425 180.426Z" })] }));
21
+ const DEFAULT_HIDE_COLUMN_ICON = (jsxs("svg", { width: 16, height: 16, viewBox: "0 0 512 512", "aria-hidden": "true", focusable: "false", children: [jsx("path", { fill: "currentColor", d: "m397.222 131.1-.218-.223c-63.173-63.17-158.534-75.015-233.776-35.531l23.938 23.939c61.571-27.691 136.573-16.327 187.105 34.115L464 246.683v3.107l-71.744 74.585 22.63 22.63L496 262.683V233.79Z" }), jsx("path", { fill: "currentColor", d: "M352.8 284.33a103.307 103.307 0 0 0-132.893-132.892L246.1 177.63a71.228 71.228 0 0 1 80.507 80.508Zm17.1 62.938-33.831-33.831c.088-.108.179-.212.266-.32l-22.805-22.806q-.126.168-.253.334l-99.681-99.681.334-.253-22.81-22.805c-.108.087-.213.179-.321.266L38.627 16H16v22.627l95.689 95.689L16 233.79v28.893l98.778 102.689.218.222A199.73 199.73 0 0 0 367.372 390l106 106H496v-22.627L392.537 369.911Zm-177.157-131.9 96.128 96.132a71.28 71.28 0 0 1-96.133-96.133Zm-55.014 127.705L48 249.79v-3.107l86.319-89.737 35.065 35.064a103.248 103.248 0 0 0 142.842 142.843l32.007 32.007c-64.51 40.015-150.522 32.095-206.504-23.787" })] }));
22
+
23
+ export { DEFAULT_COLUMN_MENU_ICON, DEFAULT_FILTER_ICON, DEFAULT_HIDE_COLUMN_ICON, DEFAULT_MOVE_LEFT_ICON, DEFAULT_MOVE_RIGHT_ICON, DEFAULT_PIN_LEFT_ICON, DEFAULT_PIN_RIGHT_ICON, DEFAULT_SORT_ASCENDING_ICON, DEFAULT_SORT_DESCENDING_ICON, DEFAULT_SORT_NEUTRAL_ICON, DEFAULT_TOOLBAR_COLUMNS_ICON, DEFAULT_TOOLBAR_EXPORT_ICON, DEFAULT_TOOLBAR_REDO_ICON, DEFAULT_TOOLBAR_UNDO_ICON, DEFAULT_UNPIN_ICON };
24
+ //# sourceMappingURL=icons.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"icons.mjs","sources":["../../../src/icons.tsx"],"sourcesContent":[null],"names":["_jsx","_jsxs"],"mappings":";;AASA;AACA;AACA;AAEA,MAAM,QAAQ,GACZ,4nBAA4nB;AAEvnB,MAAM,wBAAwB,IACnCA,GAAA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EACE,IAAI,EAAC,cAAc,EACnB,CAAC,EAAC,2FAA2F,EAAA,CAC7F,EACFA,cACE,IAAI,EAAC,cAAc,EACnB,CAAC,EAAC,kOAAkO,EAAA,CACpO,CAAA,EAAA,CACE;MAGK,wBAAwB,IACnCC,IAAA,CAAA,KAAA,EAAA,EAAK,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,OAAO,EAAC,aAAa,EAAA,aAAA,EAAa,MAAM,EAAC,SAAS,EAAC,OAAO,EAAA,QAAA,EAAA,CACpFD,GAAA,CAAA,MAAA,EAAA,EACE,IAAI,EAAC,cAAc,EACnB,CAAC,EAAC,iMAAiM,EAAA,CACnM,EACFA,cACE,IAAI,EAAC,cAAc,EACnB,CAAC,EAAC,umBAAumB,EAAA,CACzmB,CAAA,EAAA,CACE;;;;"}
@@ -0,0 +1 @@
1
+ export * from './index.js'
@@ -0,0 +1,12 @@
1
+ /**
2
+ * --------------------------------------------------------------------------
3
+ * CoreUI PRO react-data-grid index.ts
4
+ * License (https://coreui.io/pro/license/)
5
+ * --------------------------------------------------------------------------
6
+ */
7
+ export { CDataGrid } from './CDataGrid';
8
+ export { DEFAULT_LABELS, interpolate } from './labels';
9
+ export { downloadCsv, exportCsv } from '@coreui/data-grid/csv';
10
+ export type { CsvDownloadOptions, CsvOptions } from '@coreui/data-grid/csv';
11
+ export { evaluateColumnFilter, FILTER_OPERATORS, VALUELESS_OPERATORS } from '@coreui/data-grid/filters';
12
+ export type { CDataGridColumn, CDataGridColumnFilterProps, CDataGridColumnMenuBuilder, CDataGridColumnMenuContext, CDataGridEditorHandle, CDataGridEditorProps, CDataGridMenuAction, CDataGridProps, CDataGridSlotProps, CDataGridSlots, CDataGridToolbarOptions, Column, ColumnFiltersState, ColumnOrderState, ColumnPinningState, ColumnSizingState, DataGridColumnFilterValue, DataGridColumnSizingOptions, DataGridDataRequest, DataGridDataResponse, DataGridEditableOptions, DataGridEditCommitEvent, DataGridEditorType, DataGridFilterCondition, DataGridFilterOperator, DataGridFilterType, DataGridItem, DataGridLabels, DataGridPaginationOptions, DataGridRowSelectionOptions, DataGridSortingOptions, PaginationState, RowSelectionState, SortingState, Table, VisibilityState } from './types';
@@ -0,0 +1,5 @@
1
+ export { CDataGrid } from './CDataGrid.mjs';
2
+ export { DEFAULT_LABELS, interpolate } from '@coreui/data-grid/labels';
3
+ export { downloadCsv, exportCsv } from '@coreui/data-grid/csv';
4
+ export { FILTER_OPERATORS, VALUELESS_OPERATORS, evaluateColumnFilter } from '@coreui/data-grid/filters';
5
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * --------------------------------------------------------------------------
3
+ * CoreUI PRO react-data-grid labels.ts
4
+ * License (https://coreui.io/pro/license/)
5
+ * --------------------------------------------------------------------------
6
+ */
7
+ export { DEFAULT_LABELS, interpolate } from '@coreui/data-grid/labels';
@@ -0,0 +1,19 @@
1
+ /**
2
+ * --------------------------------------------------------------------------
3
+ * CoreUI PRO react-data-grid pinning.ts
4
+ * License (https://coreui.io/pro/license/)
5
+ * --------------------------------------------------------------------------
6
+ */
7
+ import type { Column } from '@tanstack/react-table';
8
+ import type { CSSProperties } from 'react';
9
+ import type { DataGridItem } from './types';
10
+ export interface PinnedCellProps {
11
+ className?: string;
12
+ style?: CSSProperties;
13
+ }
14
+ export interface PinnedEdges {
15
+ lastLeft: string | null;
16
+ firstRight: string | null;
17
+ }
18
+ export declare const pinnedColumnProps: (column: Column<DataGridItem>, selectPinned: boolean, edges: PinnedEdges) => PinnedCellProps;
19
+ export declare const selectCellPinnedProps: (selectPinned: boolean) => PinnedCellProps;
@@ -0,0 +1,29 @@
1
+ /**
2
+ * --------------------------------------------------------------------------
3
+ * CoreUI PRO react-data-grid pinning.ts
4
+ * License (https://coreui.io/pro/license/)
5
+ * --------------------------------------------------------------------------
6
+ */
7
+ const pinnedColumnProps = (column, selectPinned, edges) => {
8
+ const pinned = column.getIsPinned();
9
+ if (pinned === 'left') {
10
+ const offset = column.getStart('left');
11
+ return {
12
+ className: `data-grid-cell-pinned-left${column.id === edges.lastLeft ? ' data-grid-cell-pinned-left-last' : ''}`,
13
+ style: {
14
+ left: selectPinned ? `calc(var(--cui-data-grid-select-cell-width) + ${offset}px)` : offset
15
+ }
16
+ };
17
+ }
18
+ if (pinned === 'right') {
19
+ return {
20
+ className: `data-grid-cell-pinned-right${column.id === edges.firstRight ? ' data-grid-cell-pinned-right-first' : ''}`,
21
+ style: { right: column.getAfter('right') }
22
+ };
23
+ }
24
+ return {};
25
+ };
26
+ const selectCellPinnedProps = (selectPinned) => selectPinned ? { className: 'data-grid-cell-pinned-left', style: { left: 0 } } : {};
27
+
28
+ export { pinnedColumnProps, selectCellPinnedProps };
29
+ //# sourceMappingURL=pinning.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pinning.mjs","sources":["../../../src/pinning.ts"],"sourcesContent":[null],"names":[],"mappings":"AAAA;;;;;AAKG;AAgBI,MAAM,iBAAiB,GAAG,CAC/B,MAA4B,EAC5B,YAAqB,EACrB,KAAkB,KACC;AACnB,IAAA,MAAM,MAAM,GAAG,MAAM,CAAC,WAAW,EAAE;AAEnC,IAAA,IAAI,MAAM,KAAK,MAAM,EAAE;QACrB,MAAM,MAAM,GAAG,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC;QACtC,OAAO;AACL,YAAA,SAAS,EAAE,CAAA,0BAAA,EACT,MAAM,CAAC,EAAE,KAAK,KAAK,CAAC,QAAQ,GAAG,kCAAkC,GAAG,EACtE,CAAA,CAAE;AACF,YAAA,KAAK,EAAE;gBACL,IAAI,EAAE,YAAY,GAAG,CAAA,8CAAA,EAAiD,MAAM,CAAA,GAAA,CAAK,GAAG;AACrF;SACF;IACH;AAEA,IAAA,IAAI,MAAM,KAAK,OAAO,EAAE;QACtB,OAAO;AACL,YAAA,SAAS,EAAE,CAAA,2BAAA,EACT,MAAM,CAAC,EAAE,KAAK,KAAK,CAAC,UAAU,GAAG,oCAAoC,GAAG,EAC1E,CAAA,CAAE;YACF,KAAK,EAAE,EAAE,KAAK,EAAE,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC;SACzC;IACH;AAEA,IAAA,OAAO,EAAE;AACX;AAEO,MAAM,qBAAqB,GAAG,CAAC,YAAqB,KACzD,YAAY,GAAG,EAAE,SAAS,EAAE,4BAA4B,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,EAAE,GAAG;;;;"}
@@ -0,0 +1,22 @@
1
+ /**
2
+ * --------------------------------------------------------------------------
3
+ * CoreUI PRO react-data-grid toolbar.ts
4
+ * License (https://coreui.io/pro/license/)
5
+ * --------------------------------------------------------------------------
6
+ */
7
+ import type { CsvDownloadOptions } from '@coreui/data-grid/csv';
8
+ import type { CDataGridToolbarOptions } from './types';
9
+ export interface ResolvedToolbar {
10
+ columns: boolean;
11
+ export: boolean;
12
+ exportOptions: CsvDownloadOptions;
13
+ history: boolean;
14
+ search: boolean;
15
+ }
16
+ export interface ResolveToolbarContext {
17
+ columnVisibility: boolean;
18
+ globalFilter: boolean;
19
+ history: boolean;
20
+ toolbar: boolean | CDataGridToolbarOptions;
21
+ }
22
+ export declare const resolveToolbar: ({ columnVisibility, globalFilter, history, toolbar }: ResolveToolbarContext) => ResolvedToolbar;
@@ -0,0 +1,41 @@
1
+ /**
2
+ * --------------------------------------------------------------------------
3
+ * CoreUI PRO react-data-grid toolbar.ts
4
+ * License (https://coreui.io/pro/license/)
5
+ * --------------------------------------------------------------------------
6
+ */
7
+ // Normalizes `toolbar` + `globalFilter` into the individual actions. `toolbar:
8
+ // true` enables each action whose underlying feature is on; a granular object
9
+ // picks individually. `globalFilter` stays shorthand for the search input.
10
+ const resolveToolbar = ({ columnVisibility, globalFilter, history, toolbar }) => {
11
+ var _a, _b, _c, _d;
12
+ if (toolbar === true) {
13
+ return {
14
+ columns: columnVisibility,
15
+ export: true,
16
+ exportOptions: {},
17
+ history,
18
+ search: true
19
+ };
20
+ }
21
+ if (typeof toolbar === 'object') {
22
+ const exportOption = (_a = toolbar.export) !== null && _a !== void 0 ? _a : false;
23
+ return {
24
+ columns: ((_b = toolbar.columns) !== null && _b !== void 0 ? _b : false) && columnVisibility,
25
+ export: Boolean(exportOption),
26
+ exportOptions: typeof exportOption === 'object' ? exportOption : {},
27
+ history: ((_c = toolbar.history) !== null && _c !== void 0 ? _c : false) && history,
28
+ search: ((_d = toolbar.search) !== null && _d !== void 0 ? _d : false) || globalFilter
29
+ };
30
+ }
31
+ return {
32
+ columns: false,
33
+ export: false,
34
+ exportOptions: {},
35
+ history: false,
36
+ search: globalFilter
37
+ };
38
+ };
39
+
40
+ export { resolveToolbar };
41
+ //# sourceMappingURL=toolbar.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toolbar.mjs","sources":["../../../src/toolbar.ts"],"sourcesContent":[null],"names":[],"mappings":"AAAA;;;;;AAKG;AAoBH;AACA;AACA;AACO,MAAM,cAAc,GAAG,CAAC,EAC7B,gBAAgB,EAChB,YAAY,EACZ,OAAO,EACP,OAAO,EACe,KAAqB;;AAC3C,IAAA,IAAI,OAAO,KAAK,IAAI,EAAE;QACpB,OAAO;AACL,YAAA,OAAO,EAAE,gBAAgB;AACzB,YAAA,MAAM,EAAE,IAAI;AACZ,YAAA,aAAa,EAAE,EAAE;YACjB,OAAO;AACP,YAAA,MAAM,EAAE;SACT;IACH;AAEA,IAAA,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE;QAC/B,MAAM,YAAY,GAAG,CAAA,EAAA,GAAA,OAAO,CAAC,MAAM,MAAA,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,EAAA,GAAI,KAAK;QAC5C,OAAO;YACL,OAAO,EAAE,CAAC,CAAA,EAAA,GAAA,OAAO,CAAC,OAAO,MAAA,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,EAAA,GAAI,KAAK,KAAK,gBAAgB;AACvD,YAAA,MAAM,EAAE,OAAO,CAAC,YAAY,CAAC;AAC7B,YAAA,aAAa,EAAE,OAAO,YAAY,KAAK,QAAQ,GAAG,YAAY,GAAG,EAAE;YACnE,OAAO,EAAE,CAAC,CAAA,EAAA,GAAA,OAAO,CAAC,OAAO,MAAA,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,EAAA,GAAI,KAAK,KAAK,OAAO;YAC9C,MAAM,EAAE,CAAC,CAAA,EAAA,GAAA,OAAO,CAAC,MAAM,MAAA,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,EAAA,GAAI,KAAK,KAAK;SACtC;IACH;IAEA,OAAO;AACL,QAAA,OAAO,EAAE,KAAK;AACd,QAAA,MAAM,EAAE,KAAK;AACb,QAAA,aAAa,EAAE,EAAE;AACjB,QAAA,OAAO,EAAE,KAAK;AACd,QAAA,MAAM,EAAE;KACT;AACH;;;;"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * --------------------------------------------------------------------------
3
+ * CoreUI PRO react-data-grid tooltip.ts
4
+ * License (https://coreui.io/pro/license/)
5
+ * --------------------------------------------------------------------------
6
+ */
7
+ export interface GridTooltip {
8
+ dispose: () => void;
9
+ }
10
+ export declare const createTooltip: (root: HTMLElement) => GridTooltip;
@@ -0,0 +1,100 @@
1
+ /**
2
+ * --------------------------------------------------------------------------
3
+ * CoreUI PRO react-data-grid tooltip.ts
4
+ * License (https://coreui.io/pro/license/)
5
+ * --------------------------------------------------------------------------
6
+ */
7
+ // Duplicated-by-design across the ports (like active-cell.ts/columns.ts) from
8
+ // packages/data-grid/src/ui/tooltip.ts - a framework-agnostic DOM controller,
9
+ // keep in sync.
10
+ const CLASS_NAME_TOOLTIP = 'data-grid-tooltip';
11
+ const ATTRIBUTE = 'data-coreui-tooltip';
12
+ const SELECTOR = `[${ATTRIBUTE}]`;
13
+ const SHOW_DELAY = 200;
14
+ const GAP = 6;
15
+ const EDGE = 4;
16
+ // A single shared, delegated tooltip for grid-owned icon controls. Positioned
17
+ // with position: fixed so it escapes the viewport's overflow, above the anchor
18
+ // with a flip below when there isn't room. Purely visual (aria-hidden) - the
19
+ // anchors already carry their accessible name via aria-label / hidden text.
20
+ const createTooltip = (root) => {
21
+ const element = document.createElement('div');
22
+ element.className = CLASS_NAME_TOOLTIP;
23
+ element.setAttribute('role', 'tooltip');
24
+ element.setAttribute('aria-hidden', 'true');
25
+ element.hidden = true;
26
+ root.append(element);
27
+ let anchor = null;
28
+ let showTimer;
29
+ const anchorFrom = (target) => {
30
+ const element_ = target instanceof Element ? target.closest(SELECTOR) : null;
31
+ return element_ instanceof HTMLElement && element_.getAttribute(ATTRIBUTE) ? element_ : null;
32
+ };
33
+ const position = () => {
34
+ if (!anchor) {
35
+ return;
36
+ }
37
+ const rect = anchor.getBoundingClientRect();
38
+ const width = element.offsetWidth;
39
+ const height = element.offsetHeight;
40
+ const above = rect.top - height - GAP;
41
+ const top = above >= 0 ? above : rect.bottom + GAP;
42
+ const left = Math.max(EDGE, Math.min(rect.left + ((rect.width - width) / 2), window.innerWidth - width - EDGE));
43
+ element.style.top = `${top}px`;
44
+ element.style.left = `${left}px`;
45
+ element.style.visibility = 'visible';
46
+ };
47
+ const show = (target) => {
48
+ anchor = target;
49
+ element.textContent = target.getAttribute(ATTRIBUTE);
50
+ element.style.visibility = 'hidden';
51
+ element.hidden = false;
52
+ position();
53
+ };
54
+ const hide = () => {
55
+ clearTimeout(showTimer);
56
+ anchor = null;
57
+ element.hidden = true;
58
+ };
59
+ const onPointerOver = (event) => {
60
+ const target = anchorFrom(event.target);
61
+ if (!target || target === anchor) {
62
+ return;
63
+ }
64
+ clearTimeout(showTimer);
65
+ showTimer = setTimeout(() => show(target), SHOW_DELAY);
66
+ };
67
+ const onPointerOut = (event) => {
68
+ if (anchor && event.relatedTarget instanceof Node && anchor.contains(event.relatedTarget)) {
69
+ return;
70
+ }
71
+ hide();
72
+ };
73
+ const onFocusIn = (event) => {
74
+ const target = anchorFrom(event.target);
75
+ if (target) {
76
+ show(target);
77
+ }
78
+ };
79
+ root.addEventListener('pointerover', onPointerOver);
80
+ root.addEventListener('pointerout', onPointerOut);
81
+ root.addEventListener('pointerdown', hide);
82
+ root.addEventListener('focusin', onFocusIn);
83
+ root.addEventListener('focusout', hide);
84
+ window.addEventListener('scroll', hide, true);
85
+ return {
86
+ dispose() {
87
+ clearTimeout(showTimer);
88
+ root.removeEventListener('pointerover', onPointerOver);
89
+ root.removeEventListener('pointerout', onPointerOut);
90
+ root.removeEventListener('pointerdown', hide);
91
+ root.removeEventListener('focusin', onFocusIn);
92
+ root.removeEventListener('focusout', hide);
93
+ window.removeEventListener('scroll', hide, true);
94
+ element.remove();
95
+ }
96
+ };
97
+ };
98
+
99
+ export { createTooltip };
100
+ //# sourceMappingURL=tooltip.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tooltip.mjs","sources":["../../../src/tooltip.ts"],"sourcesContent":[null],"names":[],"mappings":"AAAA;;;;;AAKG;AAEH;AACA;AACA;AAEA,MAAM,kBAAkB,GAAG,mBAAmB;AAC9C,MAAM,SAAS,GAAG,qBAAqB;AACvC,MAAM,QAAQ,GAAG,CAAA,CAAA,EAAI,SAAS,GAAG;AACjC,MAAM,UAAU,GAAG,GAAG;AACtB,MAAM,GAAG,GAAG,CAAC;AACb,MAAM,IAAI,GAAG,CAAC;AAMd;AACA;AACA;AACA;AACO,MAAM,aAAa,GAAG,CAAC,IAAiB,KAAiB;IAC9D,MAAM,OAAO,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC;AAC7C,IAAA,OAAO,CAAC,SAAS,GAAG,kBAAkB;AACtC,IAAA,OAAO,CAAC,YAAY,CAAC,MAAM,EAAE,SAAS,CAAC;AACvC,IAAA,OAAO,CAAC,YAAY,CAAC,aAAa,EAAE,MAAM,CAAC;AAC3C,IAAA,OAAO,CAAC,MAAM,GAAG,IAAI;AACrB,IAAA,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC;IA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Aa,EAAE,IAAI,CAAC;AAC1C,IAAA,IAAI,CAAC,gBAAgB,CAAC,SAAS,EAAE,SAA0B,CAAC;AAC5D,IAAA,IAAI,CAAC,gBAAgB,CAAC,UAAU,EAAE,IAAI,CAAC;IACvC,MAAM,CAAC,gBAAgB,CAAC,QAAQ,EAAE,IAAI,EAAE,IAAI,CAAC;IAE7C,OAAO;QACL,OAAO,GAAA;YACL,YAAY,CAAC,SAAS,CAAC;AACvB,YAAA,IAAI,CAAC,mBAAmB,CAAC,aAAa,EAAE,aAA8B,CAAC;AACvE,YAAA,IAAI,CAAC,mBAAmB,CAAC,YAAY,EAAE,YAA6B,CAAC;AACrE,YAAA,IAAI,CAAC,mBAAmB,CAAC,aAAa,EAAE,IAAI,CAAC;AAC7C,YAAA,IAAI,CAAC,mBAAmB,CAAC,SAAS,EAAE,SAA0B,CAAC;AAC/D,YAAA,IAAI,CAAC,mBAAmB,CAAC,UAAU,EAAE,IAAI,CAAC;YAC1C,MAAM,CAAC,mBAAmB,CAAC,QAAQ,EAAE,IAAI,EAAE,IAAI,CAAC;YAChD,OAAO,CAAC,MAAM,EAAE;QAClB;KACD;AACH;;;;"}
@@ -0,0 +1,287 @@
1
+ /**
2
+ * --------------------------------------------------------------------------
3
+ * CoreUI PRO react-data-grid types.ts
4
+ * License (https://coreui.io/pro/license/)
5
+ * --------------------------------------------------------------------------
6
+ */
7
+ import type { DataGridColumn, DataGridColumnSizingOptions, DataGridDataRequest, DataGridDataResponse, DataGridEditCommitEvent, DataGridItem, DataGridLabels, DataGridPaginationOptions, DataGridRowSelectionOptions, DataGridSortingOptions } from '@coreui/data-grid';
8
+ import type { CsvDownloadOptions } from '@coreui/data-grid/csv';
9
+ import type { Column, ColumnFiltersState, ColumnOrderState, ColumnPinningState, ColumnSizingState, PaginationState, RowSelectionState, SortingState, Table, VisibilityState } from '@tanstack/react-table';
10
+ import type { ComponentType, CSSProperties, HTMLAttributes, ReactNode, Ref } from 'react';
11
+ export interface CDataGridSlotProps {
12
+ table: Table<DataGridItem>;
13
+ labels: DataGridLabels;
14
+ }
15
+ export interface CDataGridSlots {
16
+ toolbar: ComponentType<CDataGridSlotProps>;
17
+ pagination: ComponentType<CDataGridSlotProps>;
18
+ empty: ComponentType<CDataGridSlotProps>;
19
+ }
20
+ export interface CDataGridToolbarOptions {
21
+ columns?: boolean;
22
+ export?: boolean | CsvDownloadOptions;
23
+ history?: boolean;
24
+ search?: boolean;
25
+ }
26
+ export interface CDataGridColumnFilterProps {
27
+ column: Column<DataGridItem, unknown>;
28
+ table: Table<DataGridItem>;
29
+ labels: DataGridLabels;
30
+ }
31
+ export interface CDataGridEditorHandle {
32
+ contains?: (target: Node) => boolean;
33
+ focus?: () => void;
34
+ getValue?: () => unknown;
35
+ }
36
+ export interface CDataGridEditorProps {
37
+ column: CDataGridColumn;
38
+ item: DataGridItem;
39
+ value: unknown;
40
+ invalid: string | null;
41
+ labels: DataGridLabels;
42
+ commit: (value: unknown) => void;
43
+ cancel: () => void;
44
+ handleRef: (handle: CDataGridEditorHandle | null) => void;
45
+ }
46
+ export interface CDataGridColumn extends Omit<DataGridColumn, 'editor' | 'filter' | 'render' | 'style'> {
47
+ editor?: ComponentType<CDataGridEditorProps>;
48
+ editorPopup?: boolean;
49
+ filter?: ComponentType<CDataGridColumnFilterProps>;
50
+ render?: (item: DataGridItem, index: number) => ReactNode;
51
+ style?: CSSProperties;
52
+ }
53
+ export interface CDataGridMenuAction {
54
+ key: string;
55
+ label: string;
56
+ disabled?: boolean;
57
+ group?: string;
58
+ icon?: ReactNode;
59
+ run: () => void;
60
+ }
61
+ export interface CDataGridColumnMenuContext {
62
+ column: CDataGridColumn;
63
+ defaultActions: CDataGridMenuAction[];
64
+ }
65
+ export type CDataGridColumnMenuBuilder = (context: CDataGridColumnMenuContext) => CDataGridMenuAction[];
66
+ export interface CDataGridProps extends HTMLAttributes<HTMLDivElement> {
67
+ /**
68
+ * APG grid keyboard navigation — `role="grid"`, a roving-tabindex active cell, and arrow-key movement across header and data cells.
69
+ */
70
+ cellNavigation?: boolean;
71
+ /**
72
+ * Renders a filter row in the header with an input per filterable column.
73
+ */
74
+ columnFilters?: boolean;
75
+ /**
76
+ * Adds a per-column header menu — `true` builds it from the enabled features (sort/pin/move/hide); a builder `({ column, defaultActions }) => actions` returns the final item list.
77
+ */
78
+ columnMenu?: boolean | CDataGridColumnMenuBuilder;
79
+ /**
80
+ * Custom column menu button icon (ReactNode) replacing the default one.
81
+ */
82
+ columnMenuIcon?: ReactNode;
83
+ /**
84
+ * Enables drag-and-drop column reordering; an array sets the initial order.
85
+ */
86
+ columnOrder?: boolean | ColumnOrderState;
87
+ /**
88
+ * Freezes columns (by `key`) to the left/right edge with sticky positioning; `true` enables the feature with no initial pins.
89
+ */
90
+ columnPinning?: boolean | ColumnPinningState;
91
+ /**
92
+ * Enables column resize handles; `mode` controls whether widths update while dragging (`'onChange'`, the default) or on release (`'onEnd'`).
93
+ */
94
+ columnSizing?: boolean | DataGridColumnSizingOptions;
95
+ /**
96
+ * Enables hiding/showing columns via `column.toggleVisibility()`; an object sets the initial visibility.
97
+ */
98
+ columnVisibility?: boolean | VisibilityState;
99
+ /**
100
+ * Column definitions.
101
+ */
102
+ columns: CDataGridColumn[];
103
+ /**
104
+ * Server-side mode: the grid requests data on every sorting/filter/page change; implies pagination.
105
+ */
106
+ dataProvider?: (request: DataGridDataRequest) => Promise<DataGridDataResponse>;
107
+ /**
108
+ * Inline cell editing on Enter/F2/double-click for columns opting in via `editable`/`editor`; implies `cellNavigation`.
109
+ */
110
+ editing?: boolean;
111
+ /**
112
+ * Content (ReactNode) shown when no rows match.
113
+ */
114
+ empty?: ReactNode;
115
+ /** Icon for the per-column filter button. */
116
+ filterIcon?: ReactNode;
117
+ /**
118
+ * Renders a search input above the grid that filters across all columns.
119
+ */
120
+ globalFilter?: boolean;
121
+ /**
122
+ * Undo/redo history of edit commits — Ctrl/Cmd+Z and Ctrl+Shift+Z/Ctrl+Y plus toolbar buttons; requires `editing`.
123
+ */
124
+ history?: boolean;
125
+ /**
126
+ * Custom hide-column menu action icon (ReactNode) replacing the default one.
127
+ */
128
+ hideColumnIcon?: ReactNode;
129
+ /**
130
+ * Stable row id — required for selection to survive sorting and filtering.
131
+ */
132
+ itemKey?: (item: DataGridItem, index: number) => string;
133
+ /**
134
+ * Row data.
135
+ */
136
+ items?: DataGridItem[];
137
+ /**
138
+ * UI strings (i18n), merged over the defaults; supports `{token}` interpolation.
139
+ */
140
+ labels?: Partial<DataGridLabels>;
141
+ /**
142
+ * Custom move-left menu action icon (ReactNode) replacing the default one.
143
+ */
144
+ moveLeftIcon?: ReactNode;
145
+ /**
146
+ * Custom move-right menu action icon (ReactNode) replacing the default one.
147
+ */
148
+ moveRightIcon?: ReactNode;
149
+ /**
150
+ * Fires when the data provider rejects, with the error (server-side mode).
151
+ */
152
+ onDataError?: (error: unknown) => void;
153
+ /**
154
+ * Fires when the data provider resolves, with the `{ items, totalRows }` response (server-side mode).
155
+ */
156
+ onDataLoad?: (response: DataGridDataResponse) => void;
157
+ /**
158
+ * Fires when an edit is cancelled, with the item and column key.
159
+ */
160
+ onEditCancel?: (item: DataGridItem, columnId: string) => void;
161
+ /**
162
+ * Fires when an edit commits, with `{ item, columnId, value, previousValue }` — the grid never mutates `items`; apply the change and re-render.
163
+ */
164
+ onEditCommit?: (event: DataGridEditCommitEvent) => void;
165
+ /**
166
+ * Fires when a cell enters edit mode, with the item and column key.
167
+ */
168
+ onEditStart?: (item: DataGridItem, columnId: string) => void;
169
+ /**
170
+ * Fires when column filters or the global filter change, with both filter states.
171
+ */
172
+ onFilterChange?: (columnFilters: ColumnFiltersState, globalFilter: string) => void;
173
+ /**
174
+ * Fires when columns are reordered, with the TanStack columnOrder state.
175
+ */
176
+ onOrderChange?: (columnOrder: ColumnOrderState) => void;
177
+ /**
178
+ * Fires when the page or page size changes, with the TanStack pagination state.
179
+ */
180
+ onPaginationChange?: (pagination: PaginationState) => void;
181
+ /**
182
+ * Fires when column pinning changes, with the TanStack columnPinning state.
183
+ */
184
+ onPinningChange?: (columnPinning: ColumnPinningState) => void;
185
+ /**
186
+ * Fires when the row selection changes, with the TanStack rowSelection state and the selected items.
187
+ */
188
+ onSelectionChange?: (rowSelection: RowSelectionState, selectedItems: DataGridItem[]) => void;
189
+ /**
190
+ * Fires when a column is resized, with the TanStack columnSizing state.
191
+ */
192
+ onSizingChange?: (columnSizing: ColumnSizingState) => void;
193
+ /**
194
+ * Fires when sorting changes, with the TanStack sorting state.
195
+ */
196
+ onSortingChange?: (sorting: SortingState) => void;
197
+ /**
198
+ * Fires when column visibility changes, with the TanStack columnVisibility state.
199
+ */
200
+ onVisibilityChange?: (columnVisibility: VisibilityState) => void;
201
+ /**
202
+ * Extra rows rendered above and below the visible window.
203
+ */
204
+ overscan?: number;
205
+ /**
206
+ * Pagination mode — mutually exclusive with virtualization.
207
+ */
208
+ pagination?: boolean | DataGridPaginationOptions;
209
+ /**
210
+ * Custom pin-left menu action icon (ReactNode) replacing the default one.
211
+ */
212
+ pinLeftIcon?: ReactNode;
213
+ /**
214
+ * Custom pin-right menu action icon (ReactNode) replacing the default one.
215
+ */
216
+ pinRightIcon?: ReactNode;
217
+ /**
218
+ * Estimated row height in px used by the virtualizer.
219
+ */
220
+ rowHeight?: number;
221
+ /**
222
+ * Checkbox selection with select-all and shift+click ranges.
223
+ */
224
+ rowSelection?: boolean | DataGridRowSelectionOptions;
225
+ /**
226
+ * Replaces built-in chrome — each slot is a component rendered with `{ table, labels }`.
227
+ */
228
+ slots?: Partial<CDataGridSlots>;
229
+ /**
230
+ * Custom ascending sort indicator icon (ReactNode) replacing the default one.
231
+ */
232
+ sortAscendingIcon?: ReactNode;
233
+ /**
234
+ * Custom descending sort indicator icon (ReactNode) replacing the default one.
235
+ */
236
+ sortDescendingIcon?: ReactNode;
237
+ /**
238
+ * Custom unsorted sort indicator icon (ReactNode) replacing the default one.
239
+ */
240
+ sortNeutralIcon?: ReactNode;
241
+ /**
242
+ * Controls when the neutral (unsorted) sort icon is shown on sortable columns: `'always'` keeps it visible, `'hover'` reveals it on header hover/focus. Omit to hide it until the column is sorted.
243
+ */
244
+ sorterVisibility?: 'always' | 'hover';
245
+ /**
246
+ * Column sorting; shift+click adds columns to the sort.
247
+ */
248
+ sorting?: boolean | DataGridSortingOptions;
249
+ /**
250
+ * Persists the grid state (sorting, filters, order, sizing, visibility, pinning, selection, page) to localStorage under this key — autosaved on every change and restored on mount.
251
+ */
252
+ stateKey?: string;
253
+ /**
254
+ * Ref that receives the TanStack table instance.
255
+ */
256
+ tableRef?: Ref<Table<DataGridItem>>;
257
+ /**
258
+ * Adds a built-in toolbar above the grid — `true` enables every action whose feature is on (column chooser, CSV export, global search); an object picks each individually.
259
+ */
260
+ toolbar?: boolean | CDataGridToolbarOptions;
261
+ /**
262
+ * Custom toolbar column-chooser button icon (ReactNode) replacing the default one.
263
+ */
264
+ toolbarColumnsIcon?: ReactNode;
265
+ /**
266
+ * Custom toolbar export button icon (ReactNode) replacing the default one.
267
+ */
268
+ toolbarExportIcon?: ReactNode;
269
+ /**
270
+ * Custom toolbar redo button icon (ReactNode) replacing the default one.
271
+ */
272
+ toolbarRedoIcon?: ReactNode;
273
+ /**
274
+ * Custom toolbar undo button icon (ReactNode) replacing the default one.
275
+ */
276
+ toolbarUndoIcon?: ReactNode;
277
+ /**
278
+ * Custom unpin menu action icon (ReactNode) replacing the default one.
279
+ */
280
+ unpinIcon?: ReactNode;
281
+ /**
282
+ * Windowed rendering for large datasets.
283
+ */
284
+ virtualization?: boolean;
285
+ }
286
+ export { type Column, type ColumnFiltersState, type ColumnOrderState, type ColumnPinningState, type ColumnSizingState, type PaginationState, type RowSelectionState, type SortingState, type Table, type VisibilityState } from '@tanstack/react-table';
287
+ export { type DataGridColumnFilterValue, type DataGridColumnSizingOptions, type DataGridDataRequest, type DataGridDataResponse, type DataGridEditableOptions, type DataGridEditCommitEvent, type DataGridEditorType, type DataGridFilterCondition, type DataGridFilterOperator, type DataGridFilterType, type DataGridItem, type DataGridLabels, type DataGridPaginationOptions, type DataGridRowSelectionOptions, type DataGridSortingOptions, type DataGridState } from '@coreui/data-grid';