react-table.d.ts 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. import {
  2. type UseColumnOrderInstanceProps,
  3. type UseColumnOrderState,
  4. type UseExpandedHooks,
  5. type UseExpandedInstanceProps,
  6. type UseExpandedOptions,
  7. type UseExpandedRowProps,
  8. type UseExpandedState,
  9. type UseFiltersColumnOptions,
  10. type UseFiltersColumnProps,
  11. type UseFiltersInstanceProps,
  12. type UseFiltersOptions,
  13. type UseFiltersState,
  14. type UseGlobalFiltersColumnOptions,
  15. type UseGlobalFiltersInstanceProps,
  16. type UseGlobalFiltersOptions,
  17. type UseGlobalFiltersState,
  18. type UseGroupByCellProps,
  19. type UseGroupByColumnOptions,
  20. type UseGroupByColumnProps,
  21. type UseGroupByHooks,
  22. type UseGroupByInstanceProps,
  23. type UseGroupByOptions,
  24. type UseGroupByRowProps,
  25. type UseGroupByState,
  26. type UsePaginationInstanceProps,
  27. type UsePaginationOptions,
  28. type UsePaginationState,
  29. type UseResizeColumnsColumnOptions,
  30. type UseResizeColumnsColumnProps,
  31. type UseResizeColumnsOptions,
  32. type UseResizeColumnsState,
  33. type UseRowSelectHooks,
  34. type UseRowSelectInstanceProps,
  35. type UseRowSelectOptions,
  36. type UseRowSelectRowProps,
  37. type UseRowSelectState,
  38. type UseRowStateCellProps,
  39. type UseRowStateInstanceProps,
  40. type UseRowStateOptions,
  41. type UseRowStateRowProps,
  42. type UseRowStateState,
  43. type UseSortByColumnOptions,
  44. type UseSortByColumnProps,
  45. type UseSortByHooks,
  46. type UseSortByInstanceProps,
  47. type UseSortByOptions,
  48. type UseSortByState,
  49. } from "react-table";
  50. declare module "react-table" {
  51. // take this file as-is, or comment out the sections that don't apply to your plugin configuration
  52. export type TableOptions<D extends object = {}> = {} & UseExpandedOptions<D> &
  53. UseFiltersOptions<D> &
  54. UseGlobalFiltersOptions<D> &
  55. UseGroupByOptions<D> &
  56. UsePaginationOptions<D> &
  57. UseResizeColumnsOptions<D> &
  58. UseRowSelectOptions<D> &
  59. UseRowStateOptions<D> &
  60. UseSortByOptions<D> &
  61. Record<string, any>;
  62. export type Hooks<D extends object = {}> = {} & UseExpandedHooks<D> &
  63. UseGroupByHooks<D> &
  64. UseRowSelectHooks<D> &
  65. UseSortByHooks<D>;
  66. export type TableInstance<D extends object = {}> =
  67. {} & UseColumnOrderInstanceProps<D> &
  68. UseExpandedInstanceProps<D> &
  69. UseFiltersInstanceProps<D> &
  70. UseGlobalFiltersInstanceProps<D> &
  71. UseGroupByInstanceProps<D> &
  72. UsePaginationInstanceProps<D> &
  73. UseRowSelectInstanceProps<D> &
  74. UseRowStateInstanceProps<D> &
  75. UseSortByInstanceProps<D>;
  76. export type TableState<D extends object = {}> = {} & UseColumnOrderState<D> &
  77. UseExpandedState<D> &
  78. UseFiltersState<D> &
  79. UseGlobalFiltersState<D> &
  80. UseGroupByState<D> &
  81. UsePaginationState<D> &
  82. UseResizeColumnsState<D> &
  83. UseRowSelectState<D> &
  84. UseRowStateState<D> &
  85. UseSortByState<D>;
  86. export type ColumnInterface<D extends object = {}> =
  87. {} & UseFiltersColumnOptions<D> &
  88. UseGlobalFiltersColumnOptions<D> &
  89. UseGroupByColumnOptions<D> &
  90. UseResizeColumnsColumnOptions<D> &
  91. UseSortByColumnOptions<D>;
  92. export type ColumnInstance<D extends object = {}> =
  93. {} & UseFiltersColumnProps<D> &
  94. UseGroupByColumnProps<D> &
  95. UseResizeColumnsColumnProps<D> &
  96. UseSortByColumnProps<D>;
  97. export type Cell<
  98. D extends object = {},
  99. V = any,
  100. > = {} & UseGroupByCellProps<D> & UseRowStateCellProps<D>;
  101. export type Row<D extends object = {}> = {} & UseExpandedRowProps<D> &
  102. UseGroupByRowProps<D> &
  103. UseRowSelectRowProps<D> &
  104. UseRowStateRowProps<D>;
  105. }