@infinite-table/infinite-react 0.5.1 → 0.5.3

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 (282) hide show
  1. package/README.md +104 -0
  2. package/index.css +896 -0
  3. package/index.d.ts +2264 -0
  4. package/index.esm.css +896 -0
  5. package/index.esm.js +15404 -0
  6. package/index.js +15240 -0
  7. package/package.json +3 -95
  8. package/.vscode/settings.json +0 -3
  9. package/API.md +0 -0
  10. package/build/buildPackageJson.js +0 -43
  11. package/build/scripts/test.js +0 -37
  12. package/bundler.config.js +0 -25
  13. package/globals.d.ts +0 -7
  14. package/rollup.config.js +0 -15
  15. package/run-build-deepmap.js +0 -47
  16. package/run-build.js +0 -45
  17. package/run-dts-concat.js +0 -21
  18. package/src/components/CSSVariableWatch.tsx +0 -82
  19. package/src/components/DataSource/BooleanCollectionState.ts +0 -214
  20. package/src/components/DataSource/BooleanDeepCollectionState.ts +0 -208
  21. package/src/components/DataSource/DataSourceContext.ts +0 -20
  22. package/src/components/DataSource/GroupRowsState.ts +0 -74
  23. package/src/components/DataSource/Indexer.ts +0 -27
  24. package/src/components/DataSource/RowSelectionState.ts +0 -763
  25. package/src/components/DataSource/defaultFilterTypes.ts +0 -64
  26. package/src/components/DataSource/index.tsx +0 -108
  27. package/src/components/DataSource/privateHooks/getChangeDetect.ts +0 -7
  28. package/src/components/DataSource/privateHooks/useLoadData.ts +0 -783
  29. package/src/components/DataSource/publicHooks/useDataSource.ts +0 -19
  30. package/src/components/DataSource/publicHooks/useDataSourceActions.ts +0 -14
  31. package/src/components/DataSource/state/getInitialState.ts +0 -494
  32. package/src/components/DataSource/state/normalizeSortInfo.ts +0 -35
  33. package/src/components/DataSource/state/reducer.ts +0 -466
  34. package/src/components/DataSource/state/rowInfoStatus.ts +0 -27
  35. package/src/components/DataSource/types.ts +0 -548
  36. package/src/components/HeadlessTable/HeadlessTableWithPinnedContainers.tsx +0 -142
  37. package/src/components/HeadlessTable/MappedCells.ts +0 -251
  38. package/src/components/HeadlessTable/RawTable.tsx +0 -98
  39. package/src/components/HeadlessTable/ReactHeadlessTableRenderer.tsx +0 -1516
  40. package/src/components/HeadlessTable/index.tsx +0 -234
  41. package/src/components/InfiniteTable/InfiniteCls.css.ts +0 -164
  42. package/src/components/InfiniteTable/InfiniteTableContext.ts +0 -16
  43. package/src/components/InfiniteTable/api/getImperativeApi.ts +0 -391
  44. package/src/components/InfiniteTable/api/getSelectionApi.ts +0 -364
  45. package/src/components/InfiniteTable/api/type.ts +0 -11
  46. package/src/components/InfiniteTable/components/ActiveCellIndicator.css.ts +0 -51
  47. package/src/components/InfiniteTable/components/ActiveCellIndicator.tsx +0 -116
  48. package/src/components/InfiniteTable/components/ActiveRowIndicator.css.ts +0 -56
  49. package/src/components/InfiniteTable/components/ActiveRowIndicator.tsx +0 -94
  50. package/src/components/InfiniteTable/components/CheckBox.css.ts +0 -13
  51. package/src/components/InfiniteTable/components/CheckBox.tsx +0 -96
  52. package/src/components/InfiniteTable/components/FilterEditors.tsx +0 -52
  53. package/src/components/InfiniteTable/components/InfiniteTableBody/InfiniteTableBody.tsx +0 -27
  54. package/src/components/InfiniteTable/components/InfiniteTableBody/index.tsx +0 -1
  55. package/src/components/InfiniteTable/components/InfiniteTableFooter/InfiniteTableFooter.tsx +0 -31
  56. package/src/components/InfiniteTable/components/InfiniteTableFooter/index.tsx +0 -1
  57. package/src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableColumnHeaderFilter.tsx +0 -102
  58. package/src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableHeader.tsx +0 -163
  59. package/src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableHeaderCell.tsx +0 -574
  60. package/src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableHeaderGroup.tsx +0 -79
  61. package/src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableHeaderTypes.tsx +0 -25
  62. package/src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableHeaderWrapper.tsx +0 -185
  63. package/src/components/InfiniteTable/components/InfiniteTableHeader/ResizeHandle/GroupResizeHandle.tsx +0 -159
  64. package/src/components/InfiniteTable/components/InfiniteTableHeader/ResizeHandle/ResizeHandle.css.ts +0 -124
  65. package/src/components/InfiniteTable/components/InfiniteTableHeader/ResizeHandle/columnResizer.ts +0 -166
  66. package/src/components/InfiniteTable/components/InfiniteTableHeader/ResizeHandle/index.tsx +0 -146
  67. package/src/components/InfiniteTable/components/InfiniteTableHeader/buildColumnAndGroupTree.ts +0 -240
  68. package/src/components/InfiniteTable/components/InfiniteTableHeader/header.css.ts +0 -358
  69. package/src/components/InfiniteTable/components/InfiniteTableHeader/index.tsx +0 -1
  70. package/src/components/InfiniteTable/components/InfiniteTableHeader/useColumnGroupResizeHandle.tsx +0 -114
  71. package/src/components/InfiniteTable/components/InfiniteTableHeader/useColumnResizeHandle.tsx +0 -146
  72. package/src/components/InfiniteTable/components/InfiniteTableLicenseFooter/footer.css.ts +0 -7
  73. package/src/components/InfiniteTable/components/InfiniteTableLicenseFooter/index.tsx +0 -110
  74. package/src/components/InfiniteTable/components/InfiniteTableRow/InfiniteTableCell.tsx +0 -120
  75. package/src/components/InfiniteTable/components/InfiniteTableRow/InfiniteTableCellTypes.ts +0 -74
  76. package/src/components/InfiniteTable/components/InfiniteTableRow/InfiniteTableColumnCell.tsx +0 -457
  77. package/src/components/InfiniteTable/components/InfiniteTableRow/InfiniteTableRow.tsx +0 -107
  78. package/src/components/InfiniteTable/components/InfiniteTableRow/InfiniteTableRowClassName.ts +0 -6
  79. package/src/components/InfiniteTable/components/InfiniteTableRow/InfiniteTableRowTypes.ts +0 -32
  80. package/src/components/InfiniteTable/components/InfiniteTableRow/InfiniteTableRowUnvirtualized.tsx +0 -75
  81. package/src/components/InfiniteTable/components/InfiniteTableRow/columnRendering.tsx +0 -263
  82. package/src/components/InfiniteTable/components/InfiniteTableRow/index.tsx +0 -1
  83. package/src/components/InfiniteTable/components/InfiniteTableRow/row.css.ts +0 -74
  84. package/src/components/InfiniteTable/components/InfiniteTableRow/useRowDOMProps.ts +0 -199
  85. package/src/components/InfiniteTable/components/LoadMask.css.ts +0 -34
  86. package/src/components/InfiniteTable/components/LoadMask.tsx +0 -27
  87. package/src/components/InfiniteTable/components/ScrollbarPlaceholder.tsx +0 -56
  88. package/src/components/InfiniteTable/components/cell.css.ts +0 -192
  89. package/src/components/InfiniteTable/components/icons/ArrowDown.tsx +0 -14
  90. package/src/components/InfiniteTable/components/icons/ArrowUp.tsx +0 -14
  91. package/src/components/InfiniteTable/components/icons/ExpanderIcon.css.ts +0 -31
  92. package/src/components/InfiniteTable/components/icons/ExpanderIcon.tsx +0 -63
  93. package/src/components/InfiniteTable/components/icons/Icon.tsx +0 -18
  94. package/src/components/InfiniteTable/components/icons/InfiniteTableIconClassName.ts +0 -1
  95. package/src/components/InfiniteTable/components/icons/LoadingIcon.css.ts +0 -8
  96. package/src/components/InfiniteTable/components/icons/LoadingIcon.tsx +0 -45
  97. package/src/components/InfiniteTable/components/icons/MenuIcon.tsx +0 -50
  98. package/src/components/InfiniteTable/components/icons/SortIcon.tsx +0 -113
  99. package/src/components/InfiniteTable/eventHandlers/eventHandlerTypes.ts +0 -57
  100. package/src/components/InfiniteTable/eventHandlers/index.ts +0 -95
  101. package/src/components/InfiniteTable/eventHandlers/keyboardNavigation.ts +0 -232
  102. package/src/components/InfiniteTable/eventHandlers/keyboardSelection.ts +0 -110
  103. package/src/components/InfiniteTable/eventHandlers/onCellClick.ts +0 -94
  104. package/src/components/InfiniteTable/eventHandlers/onKeyDown.ts +0 -25
  105. package/src/components/InfiniteTable/hooks/adjustColumnOrderForAllColumns.ts +0 -70
  106. package/src/components/InfiniteTable/hooks/reorderColumnsOnDrag.ts +0 -476
  107. package/src/components/InfiniteTable/hooks/useAutoSizeColumns.ts +0 -206
  108. package/src/components/InfiniteTable/hooks/useCellClassName.ts +0 -80
  109. package/src/components/InfiniteTable/hooks/useCellRendering.tsx +0 -217
  110. package/src/components/InfiniteTable/hooks/useColumnGroups.ts +0 -71
  111. package/src/components/InfiniteTable/hooks/useColumnMenu.ts +0 -72
  112. package/src/components/InfiniteTable/hooks/useColumnPointerEvents.ts +0 -258
  113. package/src/components/InfiniteTable/hooks/useColumnRowspan.ts +0 -43
  114. package/src/components/InfiniteTable/hooks/useColumnSizeFn.ts +0 -24
  115. package/src/components/InfiniteTable/hooks/useColumnsWhen.ts +0 -582
  116. package/src/components/InfiniteTable/hooks/useComputed.ts +0 -186
  117. package/src/components/InfiniteTable/hooks/useComputedVisibleColumns.ts +0 -219
  118. package/src/components/InfiniteTable/hooks/useDOMProps.ts +0 -306
  119. package/src/components/InfiniteTable/hooks/useEffectWithRaf.ts +0 -47
  120. package/src/components/InfiniteTable/hooks/useInfiniteTable.ts +0 -10
  121. package/src/components/InfiniteTable/hooks/useInfiniteTableState.ts +0 -11
  122. package/src/components/InfiniteTable/hooks/useInternalProps.ts +0 -8
  123. package/src/components/InfiniteTable/hooks/useLicense/LicenseDetails.ts +0 -13
  124. package/src/components/InfiniteTable/hooks/useLicense/crc32.ts +0 -56
  125. package/src/components/InfiniteTable/hooks/useLicense/decode.ts +0 -147
  126. package/src/components/InfiniteTable/hooks/useLicense/useLicense.ts +0 -39
  127. package/src/components/InfiniteTable/hooks/useRerenderOnKeyChange.ts +0 -21
  128. package/src/components/InfiniteTable/hooks/useRowHover.ts +0 -18
  129. package/src/components/InfiniteTable/hooks/useScrollToActiveCell.ts +0 -48
  130. package/src/components/InfiniteTable/hooks/useScrollToActiveRow.ts +0 -44
  131. package/src/components/InfiniteTable/hooks/useScrollbars.ts +0 -51
  132. package/src/components/InfiniteTable/hooks/useToggleGroupRow.ts +0 -56
  133. package/src/components/InfiniteTable/hooks/useUnpinnedRendering.tsx +0 -165
  134. package/src/components/InfiniteTable/hooks/useYourBrain.ts +0 -55
  135. package/src/components/InfiniteTable/index.tsx +0 -352
  136. package/src/components/InfiniteTable/internalProps.ts +0 -4
  137. package/src/components/InfiniteTable/state/computeColumnGroupsDepths.ts +0 -29
  138. package/src/components/InfiniteTable/state/getColumnVisibilityForHideEmptyGroupColumns.ts +0 -127
  139. package/src/components/InfiniteTable/state/getInitialState.ts +0 -375
  140. package/src/components/InfiniteTable/theme.css.ts +0 -556
  141. package/src/components/InfiniteTable/types/InfiniteTableAction.ts +0 -6
  142. package/src/components/InfiniteTable/types/InfiniteTableActionType.ts +0 -12
  143. package/src/components/InfiniteTable/types/InfiniteTableColumn.ts +0 -478
  144. package/src/components/InfiniteTable/types/InfiniteTableComputedValues.ts +0 -43
  145. package/src/components/InfiniteTable/types/InfiniteTableContextValue.ts +0 -12
  146. package/src/components/InfiniteTable/types/InfiniteTableInternalProps.ts +0 -3
  147. package/src/components/InfiniteTable/types/InfiniteTableProps.ts +0 -511
  148. package/src/components/InfiniteTable/types/InfiniteTableState.ts +0 -195
  149. package/src/components/InfiniteTable/types/Utility.ts +0 -35
  150. package/src/components/InfiniteTable/types/index.ts +0 -96
  151. package/src/components/InfiniteTable/utilities.css.ts +0 -179
  152. package/src/components/InfiniteTable/utils/MultiRowSelector.ts +0 -111
  153. package/src/components/InfiniteTable/utils/RenderHookComponentForInfinite.tsx +0 -52
  154. package/src/components/InfiniteTable/utils/adjustColumnOrderForPinning.ts +0 -33
  155. package/src/components/InfiniteTable/utils/assignFiltered.ts +0 -29
  156. package/src/components/InfiniteTable/utils/defaultGetColumContextMenuItems.tsx +0 -108
  157. package/src/components/InfiniteTable/utils/getColumnComputedType.ts +0 -33
  158. package/src/components/InfiniteTable/utils/getColumnForGroupBy.tsx +0 -313
  159. package/src/components/InfiniteTable/utils/getComputedVisibleColumns.ts +0 -773
  160. package/src/components/InfiniteTable/utils/getContextMenuForColumn.tsx +0 -72
  161. package/src/components/InfiniteTable/utils/infiniteDOMUtils.ts +0 -189
  162. package/src/components/InfiniteTable/utils/mapToObject.ts +0 -20
  163. package/src/components/InfiniteTable/utils/moveXatY.ts +0 -25
  164. package/src/components/InfiniteTable/utils/objectValuesExcept.ts +0 -9
  165. package/src/components/InfiniteTable/utils/progressiveSpeedScroller.ts +0 -158
  166. package/src/components/InfiniteTable/utils/rafFn.ts +0 -13
  167. package/src/components/InfiniteTable/utils/toCSSVarName.ts +0 -1
  168. package/src/components/InfiniteTable/utils/toMap.ts +0 -24
  169. package/src/components/Menu/Menu.tsx +0 -750
  170. package/src/components/Menu/MenuCls.css.ts +0 -139
  171. package/src/components/Menu/MenuContext.ts +0 -10
  172. package/src/components/Menu/MenuContextValue.ts +0 -15
  173. package/src/components/Menu/MenuProps.ts +0 -98
  174. package/src/components/Menu/MenuState.ts +0 -56
  175. package/src/components/Menu/MenuTriangleContext.ts +0 -352
  176. package/src/components/Menu/childrenToRuntimeItems.tsx +0 -103
  177. package/src/components/Menu/getMenuState.tsx +0 -119
  178. package/src/components/Menu/index.tsx +0 -88
  179. package/src/components/Menu/propToIdentifyMenu.ts +0 -1
  180. package/src/components/RawList/AvoidReactDiff.tsx +0 -48
  181. package/src/components/RawList/MappedItems.ts +0 -143
  182. package/src/components/RawList/ReactVirtualRenderer.tsx +0 -307
  183. package/src/components/RawList/index.tsx +0 -42
  184. package/src/components/RawList/types.ts +0 -23
  185. package/src/components/RawList/useVirtualRenderer.ts +0 -36
  186. package/src/components/RenderHookComponent.tsx +0 -10
  187. package/src/components/ResizeObserver/index.tsx +0 -170
  188. package/src/components/VirtualBrain/MatrixBrain.ts +0 -1621
  189. package/src/components/VirtualBrain/ScrollListener.ts +0 -39
  190. package/src/components/VirtualBrain/index.ts +0 -664
  191. package/src/components/VirtualList/ColumnListWithExternalScrolling.tsx +0 -78
  192. package/src/components/VirtualList/InfiniteListRootClassName.ts +0 -1
  193. package/src/components/VirtualList/RowListWithExternalScrolling.tsx +0 -120
  194. package/src/components/VirtualList/SpacePlaceholder.tsx +0 -32
  195. package/src/components/VirtualList/VirtualList.css.ts +0 -29
  196. package/src/components/VirtualList/VirtualList.tsx +0 -141
  197. package/src/components/VirtualList/VirtualRowList.tsx +0 -34
  198. package/src/components/VirtualList/types.ts +0 -56
  199. package/src/components/VirtualList/useCorrectHeightForRowElements.ts +0 -14
  200. package/src/components/VirtualScrollContainer/VirtualScrollContainer.css.ts +0 -51
  201. package/src/components/VirtualScrollContainer/getScrollableClassName.ts +0 -30
  202. package/src/components/VirtualScrollContainer/index.tsx +0 -63
  203. package/src/components/flexbox/index.ts +0 -562
  204. package/src/components/hooks/useComponentState/index.tsx +0 -562
  205. package/src/components/hooks/useComponentState/types.ts +0 -32
  206. package/src/components/hooks/useEffectOnceWithProperUnmount.ts +0 -33
  207. package/src/components/hooks/useEffectWithChanges.ts +0 -56
  208. package/src/components/hooks/useImmutableRef.ts +0 -7
  209. package/src/components/hooks/useInterceptedMap.ts +0 -71
  210. package/src/components/hooks/useLatest.tsx +0 -8
  211. package/src/components/hooks/useLazyLatest.ts +0 -23
  212. package/src/components/hooks/useMemoShallowObjectMerge.ts +0 -16
  213. package/src/components/hooks/useMounted.ts +0 -18
  214. package/src/components/hooks/useOnMount.ts +0 -21
  215. package/src/components/hooks/useOnScroll.ts +0 -34
  216. package/src/components/hooks/useOnce.ts +0 -10
  217. package/src/components/hooks/useOverlay/index.tsx +0 -418
  218. package/src/components/hooks/usePrevious.ts +0 -8
  219. package/src/components/hooks/usePropertyOld.ts +0 -168
  220. package/src/components/hooks/useRerender.ts +0 -12
  221. package/src/components/hooks/xuseProperty.ts +0 -165
  222. package/src/components/types/CellPosition.ts +0 -4
  223. package/src/components/types/NonUndefined.ts +0 -1
  224. package/src/components/types/RemoveObject.ts +0 -22
  225. package/src/components/types/Renderable.ts +0 -3
  226. package/src/components/types/ScrollPosition.ts +0 -7
  227. package/src/components/types/Setter.ts +0 -2
  228. package/src/components/types/Size.ts +0 -6
  229. package/src/components/types/SubscriptionCallback.ts +0 -10
  230. package/src/components/types/VoidFn.ts +0 -1
  231. package/src/components/utils/buildSubscriptionCallback.tsx +0 -60
  232. package/src/components/utils/clamp.ts +0 -3
  233. package/src/components/utils/debounce.ts +0 -16
  234. package/src/components/utils/decamelize.ts +0 -11
  235. package/src/components/utils/discardCallsWithEqualArg.ts +0 -42
  236. package/src/components/utils/getRenderIndexes.ts +0 -33
  237. package/src/components/utils/getScrollbarWidth.ts +0 -31
  238. package/src/components/utils/getVirtualRenderCount.ts +0 -21
  239. package/src/components/utils/isControlled.ts +0 -12
  240. package/src/components/utils/isControlledValue.ts +0 -5
  241. package/src/index.tsx +0 -34
  242. package/src/test.tsx +0 -18
  243. package/src/utils/DeepMap/index.ts +0 -588
  244. package/src/utils/DeepMap/once.ts +0 -16
  245. package/src/utils/DeepMap/sortAscending.ts +0 -1
  246. package/src/utils/DeepMap/tsconfig.deepmap.json +0 -17
  247. package/src/utils/DeepMap/xpackage.json +0 -26
  248. package/src/utils/debug.ts +0 -40
  249. package/src/utils/deepClone.ts +0 -38
  250. package/src/utils/getGlobal.ts +0 -3
  251. package/src/utils/groupAndPivot/defaultToKey.ts +0 -3
  252. package/src/utils/groupAndPivot/getGroupKeysForDataItem.ts +0 -19
  253. package/src/utils/groupAndPivot/getPivotColumnsAndColumnGroups.ts +0 -361
  254. package/src/utils/groupAndPivot/index.ts +0 -1229
  255. package/src/utils/groupAndPivot/types.ts +0 -10
  256. package/src/utils/join.ts +0 -4
  257. package/src/utils/mathIntersection.ts +0 -21
  258. package/src/utils/minified.d.ts +0 -2
  259. package/src/utils/minified.js +0 -6
  260. package/src/utils/multisort/index.ts +0 -151
  261. package/src/utils/multisort/sortTypes.ts +0 -25
  262. package/src/utils/notes-status.md +0 -92
  263. package/src/utils/pageGeometry/ConvexPoly.ts +0 -34
  264. package/src/utils/pageGeometry/Point.ts +0 -51
  265. package/src/utils/pageGeometry/PolyWithPoints.ts +0 -52
  266. package/src/utils/pageGeometry/Rectangle.ts +0 -98
  267. package/src/utils/pageGeometry/Triangle.ts +0 -16
  268. package/src/utils/pageGeometry/alignment/index.ts +0 -221
  269. package/src/utils/pageGeometry/polyContainsPoint.ts +0 -182
  270. package/src/utils/pageGeometry/types.ts +0 -3
  271. package/src/utils/proxyFnCall.ts +0 -46
  272. package/src/utils/raf.ts +0 -13
  273. package/src/utils/selectParent.ts +0 -18
  274. package/src/utils/shallowEqualObjects.ts +0 -49
  275. package/src/utils/stripVar.ts +0 -3
  276. package/src/utils/toUpperFirst.ts +0 -5
  277. package/todo.md +0 -2
  278. package/tsconfig.build.json +0 -8
  279. package/tsconfig.dev.json +0 -7
  280. package/tsconfig.json +0 -30
  281. package/tsconfig.typebundler.json +0 -13
  282. package/typedoc.json +0 -4
package/index.d.ts ADDED
@@ -0,0 +1,2264 @@
1
+ import * as React$1 from 'react';
2
+ import { CSSProperties, HTMLProps, RefCallback, MutableRefObject, MouseEvent, KeyboardEvent, ReactNode } from 'react';
3
+
4
+ declare type SortDir = 1 | -1;
5
+ declare type MultisortInfo<T> = {
6
+ /**
7
+ * The sorting direction
8
+ */
9
+ dir: SortDir;
10
+ /**
11
+ * for now 'string' and 'number' are known types, meaning they have
12
+ * sort functions already implemented
13
+ */
14
+ type?: string;
15
+ fn?: (a: any, b: any) => number;
16
+ /**
17
+ * a property whose value to use for sorting on the array items
18
+ */
19
+ field?: keyof T;
20
+ /**
21
+ * or a function to retrieve the item value to use for sorting
22
+ */
23
+ valueGetter?: (item: T) => any;
24
+ };
25
+ declare type MultisortInfoAllowMultipleFields<T> = Omit<MultisortInfo<T>, 'field'> & {
26
+ field?: keyof T | (keyof T)[];
27
+ };
28
+ declare const multisort: {
29
+ <T>(sortInfo: MultisortInfoAllowMultipleFields<T>[], array: T[], get?: ((item: any) => T) | undefined): T[];
30
+ knownTypes: {
31
+ [key: string]: (first: any, second: any) => number;
32
+ };
33
+ };
34
+
35
+ declare type VoidFn$1 = () => void;
36
+ declare type Pair<KeyType, ValueType> = {
37
+ value?: ValueType;
38
+ map?: Map<KeyType, Pair<KeyType, ValueType>>;
39
+ length: number;
40
+ revision?: number;
41
+ };
42
+ declare type DeepMapVisitFn<KeyType, ValueType> = (pair: Pair<KeyType, ValueType>, keys: KeyType[], next: VoidFn$1) => void;
43
+ declare class DeepMap<KeyType, ValueType> {
44
+ private map;
45
+ private length;
46
+ private revision;
47
+ private emptyKey;
48
+ static clone<KeyType, ValueType>(map: DeepMap<KeyType, ValueType>): DeepMap<KeyType, ValueType>;
49
+ constructor(initial?: [KeyType[], ValueType][]);
50
+ fill(initial?: [KeyType[], ValueType][]): void;
51
+ getValuesStartingWith(keys: KeyType[], excludeSelf?: boolean, depthLimit?: number): ValueType[];
52
+ getKeysStartingWith(keys: KeyType[], excludeSelf?: boolean, depthLimit?: number): KeyType[][];
53
+ private getStartingWith;
54
+ private getMapAt;
55
+ getAllChildrenSizeFor(keys: KeyType[]): number;
56
+ getDirectChildrenSizeFor(keys: KeyType[]): number;
57
+ set(keys: KeyType[] & {
58
+ length: Omit<number, 0>;
59
+ }, value: ValueType): this;
60
+ get(keys: KeyType[]): ValueType | undefined;
61
+ get size(): number;
62
+ clear(): void;
63
+ delete(keys: KeyType[]): boolean;
64
+ has(keys: KeyType[]): boolean;
65
+ private visitKey;
66
+ visit: (fn: DeepMapVisitFn<KeyType, ValueType>) => void;
67
+ visitDepthFirst: (fn: (value: ValueType, keys: KeyType[], indexInGroup: number, next?: VoidFn$1) => void) => void;
68
+ private visitWithNext;
69
+ private getArray;
70
+ valuesAt(keys: KeyType[]): ValueType[];
71
+ values(): Generator<ValueType, void, unknown>;
72
+ keys(): Generator<KeyType[], void, unknown>;
73
+ entries(): Generator<[KeyType[], ValueType], void, unknown>;
74
+ topDownEntries(): [KeyType[], ValueType][];
75
+ topDownKeys(): KeyType[][];
76
+ topDownValues(): ValueType[];
77
+ private sortedIterator;
78
+ }
79
+
80
+ declare enum InfiniteTableActionType {
81
+ SET_COLUMN_SIZE = 0,
82
+ SET_SCROLL_POSITION = 1,
83
+ SET_BODY_SIZE = 2,
84
+ SET_COLUMN_ORDER = 3,
85
+ SET_COLUMN_VISIBILITY = 4,
86
+ SET_COLUMN_SHIFTS = 5,
87
+ SET_COLUMN_PINNING = 6,
88
+ SET_COLUMN_AGGREGATIONS = 7,
89
+ SET_DRAGGING_COLUMN_ID = 8
90
+ }
91
+
92
+ declare type InfiniteTableAction = {
93
+ type: InfiniteTableActionType;
94
+ payload?: any;
95
+ };
96
+
97
+ declare type Renderable = React$1.ReactNode | JSX.Element;
98
+
99
+ declare function useInfiniteHeaderCell<T>(): InfiniteTableColumnHeaderParam<T, InfiniteTableComputedColumn<T>>;
100
+
101
+ declare function useInfiniteColumnCell<T>(): InfiniteTableColumnCellContextType<T>;
102
+
103
+ declare const InfiniteTableClassName: string;
104
+ declare const InfiniteTableComponent: React$1.MemoExoticComponent<(<T>() => JSX.Element)>;
105
+ declare function InfiniteTable<T>(props: InfiniteTableProps<T>): JSX.Element;
106
+ declare namespace InfiniteTable {
107
+ var defaultProps: {
108
+ rowHeight: number;
109
+ columnHeaderHeight: string;
110
+ };
111
+ }
112
+
113
+ interface Size {
114
+ width: number;
115
+ height: number;
116
+ }
117
+
118
+ declare type InfiniteTableBaseCellProps<T> = {
119
+ column: InfiniteTableComputedColumn<T>;
120
+ rowId?: any;
121
+ renderChildren: () => Renderable;
122
+ width: number;
123
+ cssEllipsis?: boolean;
124
+ contentStyle?: CSSProperties;
125
+ contentClassName?: string;
126
+ virtualized?: boolean;
127
+ skipColumnShifting?: boolean;
128
+ beforeChildren?: Renderable;
129
+ afterChildren?: Renderable;
130
+ cssPosition?: CSSProperties['position'];
131
+ domRef?: React.RefCallback<HTMLElement>;
132
+ };
133
+ declare type InfiniteTableCellProps<T> = ({
134
+ cellType: 'header';
135
+ } & InfiniteTableBaseCellProps<T>) | ({
136
+ cellType: 'body';
137
+ } & InfiniteTableBaseCellProps<T>);
138
+
139
+ declare type DiscriminatedUnion<A, B> = (A & {
140
+ [K in keyof B]?: undefined;
141
+ }) | (B & {
142
+ [K in keyof A]?: undefined;
143
+ });
144
+ declare type KeyOfNoSymbol<T> = Exclude<keyof T, Symbol>;
145
+
146
+ declare type InfiniteTableToggleGroupRowFn = (groupKeys: any[]) => void;
147
+ declare type InfiniteTableSelectRowFn = (id: any) => void;
148
+ declare type InfiniteTableColumnHeaderParam<DATA_TYPE, COL_TYPE = InfiniteTableComputedColumn<DATA_TYPE>> = {
149
+ domRef: InfiniteTableCellProps<DATA_TYPE>['domRef'];
150
+ dragging: boolean;
151
+ column: COL_TYPE;
152
+ columnsMap: Map<string, COL_TYPE>;
153
+ columnSortInfo: DataSourceSingleSortInfo<DATA_TYPE> | null;
154
+ columnFilterValue: DataSourceFilterValueItem<DATA_TYPE> | null;
155
+ selectionMode: DataSourcePropSelectionMode;
156
+ allRowsSelected: boolean;
157
+ someRowsSelected: boolean;
158
+ api: InfiniteTableApi<DATA_TYPE>;
159
+ renderBag: {
160
+ header: string | number | Renderable;
161
+ sortIcon?: Renderable;
162
+ menuIcon?: Renderable;
163
+ selectionCheckBox?: Renderable;
164
+ };
165
+ };
166
+ declare type InfiniteTableColumnRenderBag = {
167
+ value: string | number | Renderable;
168
+ groupIcon?: Renderable;
169
+ selectionCheckBox?: Renderable;
170
+ };
171
+ declare type InfiniteTableColumnRenderParamBase<DATA_TYPE, COL_TYPE = InfiniteTableComputedColumn<DATA_TYPE>> = {
172
+ domRef: InfiniteTableCellProps<DATA_TYPE>['domRef'];
173
+ value: string | number | Renderable;
174
+ renderBag: InfiniteTableColumnRenderBag;
175
+ rowIndex: number;
176
+ rowActive: boolean;
177
+ api: InfiniteTableApi<DATA_TYPE>;
178
+ column: COL_TYPE;
179
+ columnsMap: Map<string, COL_TYPE>;
180
+ fieldsToColumn: Map<keyof DATA_TYPE, COL_TYPE>;
181
+ groupByColumn?: InfiniteTableComputedColumn<DATA_TYPE>;
182
+ toggleCurrentGroupRow: () => void;
183
+ toggleGroupRow: InfiniteTableToggleGroupRowFn;
184
+ toggleCurrentGroupRowSelection: () => void;
185
+ toggleCurrentRowSelection: () => void;
186
+ selectCurrentRow: () => void;
187
+ selectRow: InfiniteTableSelectRowFn;
188
+ deselectRow: InfiniteTableSelectRowFn;
189
+ deselectCurrentRow: () => void;
190
+ toggleRowSelection: InfiniteTableSelectRowFn;
191
+ toggleGroupRowSelection: InfiniteTableToggleGroupRowFn;
192
+ selectionMode: DataSourcePropSelectionMode | undefined;
193
+ rootGroupBy: DataSourceState<DATA_TYPE>['groupBy'];
194
+ pivotBy?: DataSourceState<DATA_TYPE>['pivotBy'];
195
+ };
196
+ declare type InfiniteTableColumnRenderParam<DATA_TYPE, COL_TYPE = InfiniteTableComputedColumn<DATA_TYPE>> = InfiniteTableColumnRenderParamBase<DATA_TYPE, COL_TYPE> & InfiniteTableRowInfoDataDiscriminator<DATA_TYPE>;
197
+ declare type InfiniteTableColumnCellContextType<DATA_TYPE> = InfiniteTableColumnRenderParam<DATA_TYPE> & {};
198
+ declare type InfiniteTableColumnRenderValueParam<DATA_TYPE, COL_TYPE = InfiniteTableComputedColumn<DATA_TYPE>> = InfiniteTableColumnRenderParam<DATA_TYPE, COL_TYPE>;
199
+ declare type InfiniteTableColumnRowspanParam<DATA_TYPE, COL_TYPE = InfiniteTableComputedColumn<DATA_TYPE>> = {
200
+ rowInfo: InfiniteTableRowInfo<DATA_TYPE>;
201
+ data: DATA_TYPE | Partial<DATA_TYPE> | null;
202
+ dataArray: InfiniteTableRowInfo<DATA_TYPE>[];
203
+ rowIndex: number;
204
+ column: COL_TYPE;
205
+ };
206
+ declare type InfiniteTableColumnRenderFunctionForGroupRows<DATA_TYPE, COL_TYPE = InfiniteTableComputedColumn<DATA_TYPE>> = (renderParams: InfiniteTableColumnRenderParam<DATA_TYPE, COL_TYPE> & {
207
+ isGroupRow: true;
208
+ }) => Renderable | null;
209
+ declare type InfiniteTableColumnRenderFunctionForNormalRows<DATA_TYPE, COL_TYPE = InfiniteTableComputedColumn<DATA_TYPE>> = (renderParams: InfiniteTableColumnRenderParam<DATA_TYPE, COL_TYPE> & {
210
+ isGroupRow: false;
211
+ }) => Renderable | null;
212
+ declare type InfiniteTableColumnRenderFunction<DATA_TYPE, COL_TYPE = InfiniteTableComputedColumn<DATA_TYPE>> = (renderParams: InfiniteTableColumnRenderParam<DATA_TYPE, COL_TYPE>) => Renderable | null;
213
+ declare type InfiniteTableColumnHeaderRenderFunction<T> = (headerParams: InfiniteTableColumnHeaderParam<T>) => Renderable;
214
+ declare type InfiniteTableColumnAlign = 'start' | 'center' | 'end';
215
+ declare type InfiniteTableColumnVerticalAlign = 'start' | 'center' | 'end';
216
+ declare type InfiniteTableColumnHeader<T> = Renderable | InfiniteTableColumnHeaderRenderFunction<T>;
217
+ declare type InfiniteTableDataTypeNames = 'string' | 'number' | 'date' | string;
218
+ declare type InfiniteTableColumnTypeNames = 'string' | 'number' | 'date' | string;
219
+ declare type InfiniteTableColumnStyleFnParams<T> = {
220
+ value: Renderable;
221
+ column: InfiniteTableComputedColumn<T>;
222
+ } & InfiniteTableRowInfoDataDiscriminator<T>;
223
+ declare type InfiniteTableColumnStyleFn<T> = (params: InfiniteTableColumnStyleFnParams<T>) => undefined | React.CSSProperties;
224
+ declare type InfiniteTableColumnHeaderClassNameFn<T> = (params: InfiniteTableColumnHeaderParam<T>) => undefined | string;
225
+ declare type InfiniteTableColumnHeaderStyleFn<T> = (params: InfiniteTableColumnHeaderParam<T>) => undefined | React.CSSProperties;
226
+ declare type InfiniteTableColumnClassNameFn<T> = (params: InfiniteTableColumnStyleFnParams<T>) => undefined | string;
227
+ declare type InfiniteTableColumnStyle<T> = CSSProperties | InfiniteTableColumnStyleFn<T>;
228
+ declare type InfiniteTableColumnHeaderStyle<T> = CSSProperties | InfiniteTableColumnHeaderStyleFn<T>;
229
+ declare type InfiniteTableColumnClassName<T> = string | InfiniteTableColumnClassNameFn<T>;
230
+ declare type InfiniteTableColumnHeaderClassName<T> = string | InfiniteTableColumnHeaderClassNameFn<T>;
231
+ declare type InfiniteTableColumnValueGetterParams<T> = {
232
+ data: T;
233
+ field?: keyof T;
234
+ };
235
+ declare type InfiniteTableColumnValueFormatterParams<T> = InfiniteTableRowInfoDataDiscriminator<T>;
236
+ declare type InfiniteTableColumnValueGetter<T, VALUE_GETTER_TYPE = string | number | boolean | Date | null | undefined> = (params: InfiniteTableColumnValueGetterParams<T>) => VALUE_GETTER_TYPE;
237
+ declare type InfiniteTableColumnValueFormatter<T, VALUE_FORMATTER_TYPE = string | number | boolean | Date | null | undefined> = (params: InfiniteTableColumnValueFormatterParams<T>) => VALUE_FORMATTER_TYPE;
238
+ declare type InfiniteTableColumnRowspanFn<T> = (params: InfiniteTableColumnRowspanParam<T>) => number;
239
+ declare type InfiniteTableColumnComparer<T> = (a: T, b: T) => number;
240
+ /**
241
+ * Defines a column in the table.
242
+ *
243
+ * @typeParam DATA_TYPE The type of the data in the table.
244
+ *
245
+ * Can be bound to a field which is a `keyof DATA_TYPE`.
246
+ */
247
+ declare type InfiniteTableColumn<DATA_TYPE> = {
248
+ sortable?: boolean;
249
+ draggable?: boolean;
250
+ resizable?: boolean;
251
+ comparer?: InfiniteTableColumnComparer<DATA_TYPE>;
252
+ defaultHiddenWhenGroupedBy?: '*' | true | keyof DATA_TYPE | {
253
+ [k in keyof Partial<DATA_TYPE>]: true;
254
+ };
255
+ align?: InfiniteTableColumnAlign;
256
+ verticalAlign?: InfiniteTableColumnVerticalAlign;
257
+ columnGroup?: string;
258
+ header?: InfiniteTableColumnHeader<DATA_TYPE>;
259
+ renderHeader?: InfiniteTableColumnHeaderRenderFunction<DATA_TYPE>;
260
+ name?: Renderable;
261
+ cssEllipsis?: boolean;
262
+ headerCssEllipsis?: boolean;
263
+ type?: InfiniteTableColumnTypeNames | InfiniteTableColumnTypeNames[] | null;
264
+ dataType?: InfiniteTableDataTypeNames;
265
+ sortType?: string;
266
+ filterType?: string;
267
+ style?: InfiniteTableColumnStyle<DATA_TYPE>;
268
+ headerStyle?: InfiniteTableColumnHeaderStyle<DATA_TYPE>;
269
+ headerClassName?: InfiniteTableColumnHeaderClassName<DATA_TYPE>;
270
+ className?: InfiniteTableColumnClassName<DATA_TYPE>;
271
+ rowspan?: InfiniteTableColumnRowspanFn<DATA_TYPE>;
272
+ field?: KeyOfNoSymbol<DATA_TYPE>;
273
+ render?: InfiniteTableColumnRenderFunction<DATA_TYPE>;
274
+ renderValue?: InfiniteTableColumnRenderFunction<DATA_TYPE>;
275
+ renderGroupValue?: InfiniteTableColumnRenderFunctionForGroupRows<DATA_TYPE>;
276
+ renderLeafValue?: InfiniteTableColumnRenderFunctionForNormalRows<DATA_TYPE>;
277
+ valueGetter?: InfiniteTableColumnValueGetter<DATA_TYPE>;
278
+ valueFormatter?: InfiniteTableColumnValueFormatter<DATA_TYPE, Renderable>;
279
+ defaultWidth?: number;
280
+ defaultFlex?: number;
281
+ defaultFilterable?: boolean;
282
+ minWidth?: number;
283
+ maxWidth?: number;
284
+ renderGroupIcon?: InfiniteTableColumnRenderFunctionForGroupRows<DATA_TYPE>;
285
+ renderSortIcon?: InfiniteTableColumnHeaderRenderFunction<DATA_TYPE>;
286
+ renderSelectionCheckBox?: boolean | InfiniteTableColumnRenderFunction<DATA_TYPE>;
287
+ renderMenuIcon?: boolean | InfiniteTableColumnRenderFunction<DATA_TYPE>;
288
+ renderHeaderSelectionCheckBox?: boolean | InfiniteTableColumnHeaderRenderFunction<DATA_TYPE>;
289
+ components?: {
290
+ ColumnCell?: React.FunctionComponent<HTMLProps<HTMLDivElement>>;
291
+ HeaderCell?: React.FunctionComponent<HTMLProps<HTMLDivElement>>;
292
+ };
293
+ };
294
+ declare type InfiniteTableGeneratedGroupColumn<T> = Omit<InfiniteTableColumn<T>, 'sortable'> & {
295
+ groupByField: string | string[];
296
+ id?: string;
297
+ };
298
+ declare type InfiniteTablePivotColumn<T> = InfiniteTableColumn<T> & ColumnTypeWithInherit<Partial<InfiniteTablePivotFinalColumnVariant<T, any>>>;
299
+ declare type InfiniteTablePivotFinalColumnGroup<DataType, KeyType extends any = any> = InfiniteTableColumnGroup & {
300
+ pivotBy: DataSourcePivotBy<DataType>[];
301
+ pivotTotalColumnGroup?: true;
302
+ pivotGroupKeys: KeyType[];
303
+ pivotByAtIndex: PivotBy<DataType, KeyType>;
304
+ pivotGroupKey: KeyType;
305
+ pivotIndex: number;
306
+ };
307
+ declare type InfiniteTablePivotFinalColumn<DataType, KeyType extends any = any> = InfiniteTableColumn<DataType> & {
308
+ pivotBy: DataSourcePivotBy<DataType>[];
309
+ pivotColumn: true;
310
+ pivotTotalColumn: boolean;
311
+ pivotAggregator: AggregationReducer<DataType, any>;
312
+ pivotAggregatorIndex: number;
313
+ pivotGroupKeys: KeyType[];
314
+ pivotByAtIndex?: PivotBy<DataType, KeyType>;
315
+ pivotIndex: number;
316
+ pivotGroupKey: KeyType;
317
+ };
318
+ declare type InfiniteTablePivotFinalColumnVariant<DataType, KeyType extends any = any> = InfiniteTablePivotFinalColumn<DataType, KeyType>;
319
+ declare type InfiniteTableComputedColumnBase<T> = {
320
+ computedFilterType: string;
321
+ computedSortType: string;
322
+ computedDataType: string;
323
+ computedWidth: number;
324
+ computedFlex: number | null;
325
+ computedMinWidth: number;
326
+ computedMaxWidth: number;
327
+ computedOffset: number;
328
+ computedPinningOffset: number;
329
+ computedAbsoluteOffset: number;
330
+ computedSortable: boolean;
331
+ computedSortInfo: DataSourceSingleSortInfo<T> | null;
332
+ computedSorted: boolean;
333
+ computedSortedAsc: boolean;
334
+ computedSortedDesc: boolean;
335
+ computedSortIndex: number;
336
+ computedVisible: boolean;
337
+ computedVisibleIndex: number;
338
+ computedVisibleIndexInCategory: number;
339
+ computedMultiSort: boolean;
340
+ computedFiltered: boolean;
341
+ computedFilterable: boolean;
342
+ computedFilterValue: DataSourceFilterValueItem<T> | null;
343
+ computedPinned: InfiniteTableColumnPinnedValues;
344
+ computedDraggable: boolean;
345
+ computedResizable: boolean;
346
+ computedFirstInCategory: boolean;
347
+ computedLastInCategory: boolean;
348
+ computedFirst: boolean;
349
+ computedLast: boolean;
350
+ toggleSort: () => void;
351
+ colType: InfiniteTableColumnType<T>;
352
+ id: string;
353
+ };
354
+ declare type InfiniteTableComputedColumn<T> = InfiniteTableColumn<T> & InfiniteTableComputedColumnBase<T> & Partial<InfiniteTablePivotFinalColumn<T>> & Partial<InfiniteTableGeneratedGroupColumn<T>>;
355
+ declare type InfiniteTableComputedPivotFinalColumn<T> = InfiniteTableComputedColumn<T> & InfiniteTablePivotFinalColumn<T>;
356
+
357
+ interface LogFn {
358
+ (...args: any[]): LogFn;
359
+ extend: (channelName: string) => LogFn;
360
+ }
361
+ declare class Logger {
362
+ debug: LogFn;
363
+ error: LogFn;
364
+ constructor(channelName: string);
365
+ }
366
+
367
+ interface ScrollPosition {
368
+ scrollTop: number;
369
+ scrollLeft: number;
370
+ }
371
+ declare type OnScrollFn = (scrollPosition: ScrollPosition) => void;
372
+
373
+ declare type VoidFn = () => void;
374
+
375
+ declare type FixedPosition = false | 'start' | 'end';
376
+ declare type SpanFunction = ({ rowIndex, colIndex, }: {
377
+ rowIndex: number;
378
+ colIndex: number;
379
+ }) => number;
380
+ declare type RenderRangeType = {
381
+ startIndex: number;
382
+ endIndex: number;
383
+ };
384
+ declare type ItemSizeFunction = (index: number) => number;
385
+ declare type MatrixBrainOptions = {
386
+ width: number;
387
+ height: number;
388
+ cols: number;
389
+ rows: number;
390
+ rowHeight: number | ItemSizeFunction;
391
+ colWidth: number | ItemSizeFunction;
392
+ rowspan?: SpanFunction;
393
+ colspan?: SpanFunction;
394
+ };
395
+ declare type TableRenderRange = {
396
+ start: [number, number];
397
+ end: [number, number];
398
+ rowFixed?: FixedPosition;
399
+ colFixed?: FixedPosition;
400
+ };
401
+ declare type WhichDirection = {
402
+ horizontal?: boolean;
403
+ vertical?: boolean;
404
+ };
405
+ declare type FnOnRenderRangeChange = (range: TableRenderRange) => void;
406
+ declare type FnOnDirectionalRenderRangeChange = (range: [number, number]) => void;
407
+ declare type FnOnRenderCountChange = ({ horizontal, vertical, }: {
408
+ horizontal: number;
409
+ vertical: number;
410
+ }) => void;
411
+ declare type OnAvailableSizeChange = (size: Size) => void;
412
+ declare class MatrixBrain extends Logger {
413
+ private scrolling;
414
+ private width;
415
+ private height;
416
+ private cols;
417
+ private rows;
418
+ private rowHeight;
419
+ private colWidth;
420
+ private rowspan;
421
+ private colspan;
422
+ private rowspanParent;
423
+ private rowspanValue;
424
+ private rowHeightCache;
425
+ private rowOffsetCache;
426
+ private verticalTotalSize;
427
+ private colspanParent;
428
+ private colspanValue;
429
+ private colWidthCache;
430
+ private colOffsetCache;
431
+ private horizontalTotalSize;
432
+ private horizontalRenderCount?;
433
+ private verticalRenderCount?;
434
+ private horizontalRenderRange;
435
+ private verticalRenderRange;
436
+ private extraSpanCells;
437
+ private scrollPosition;
438
+ private onScrollFns;
439
+ private onRenderRangeChangeFns;
440
+ private onVerticalRenderRangeChangeFns;
441
+ private onHorizontalRenderRangeChangeFns;
442
+ private onDestroyFns;
443
+ private destroyed;
444
+ private onRenderCountChangeFns;
445
+ private onAvailableSizeChangeFns;
446
+ private onScrollStartFns;
447
+ private onScrollStopFns;
448
+ private scrollTimeoutId;
449
+ private scrollStopDelay;
450
+ /**
451
+ * Number of columns that are fixed at the start
452
+ */
453
+ private fixedColsStart;
454
+ /**
455
+ * Number of columns that are fixed at the end
456
+ */
457
+ private fixedColsEnd;
458
+ /**
459
+ * Number of rows that are fixed at the start
460
+ */
461
+ private fixedRowsStart;
462
+ /**
463
+ * Number of rows that are fixed at the end
464
+ */
465
+ private fixedRowsEnd;
466
+ constructor(name?: string);
467
+ private reset;
468
+ private resetVertical;
469
+ private resetHorizontal;
470
+ setScrollStopDelay: (scrollStopDelay: number) => void;
471
+ getRowCount: () => number;
472
+ getColCount: () => number;
473
+ update: (options: Partial<MatrixBrainOptions>) => void;
474
+ setRowAndColumnSizes({ rowHeight, colWidth, }: {
475
+ rowHeight: number | ItemSizeFunction;
476
+ colWidth: number | ItemSizeFunction;
477
+ }): void;
478
+ setRowsAndCols: ({ rows, cols }: {
479
+ rows: number;
480
+ cols: number;
481
+ }) => void;
482
+ setAvailableSize(size: Partial<Size>, config?: {
483
+ skipUpdateRenderCount?: boolean;
484
+ }): void;
485
+ updateRenderCount: (which?: WhichDirection) => void;
486
+ private doUpdateRenderCount;
487
+ get scrollTopMax(): number;
488
+ get scrollLeftMax(): number;
489
+ private setScrolling;
490
+ private notifyScrollStart;
491
+ private notifyScrollStop;
492
+ setScrollPosition: (scrollPosition: ScrollPosition, callback?: ((scrollPos: ScrollPosition) => void) | undefined) => void;
493
+ private notifyAvailableSizeChange;
494
+ private notifyRenderRangeChange;
495
+ private notifyVerticalRenderRangeChange;
496
+ private notifyHorizontalRenderRangeChange;
497
+ private notifyScrollChange;
498
+ private computeDirectionalRenderCount;
499
+ getFixedSize(direction: 'horizontal' | 'vertical'): number;
500
+ getFixedStartSize(direction: 'horizontal' | 'vertical'): number;
501
+ getFixedEndSize(direction: 'horizontal' | 'vertical'): number;
502
+ isColFixedEnd: (colIndex: number) => boolean;
503
+ isColFixedStart: (colIndex: number) => boolean;
504
+ isRowFixedEnd: (rowIndex: number) => boolean;
505
+ isRowFixedStart: (rowIndex: number) => boolean;
506
+ isColFixed: (colIndex: number) => boolean;
507
+ isRowFixed: (rowIndex: number) => boolean;
508
+ getFixedEndColsWidth: () => number;
509
+ /**
510
+ * Returns an array of offsets for all cols fixed at the end
511
+ *
512
+ * The order in the array is from leftmost col to the rightmost col
513
+ * The reference for offset is the left side of the table.
514
+ * The offsets take into account the scroll position and return the correct position.
515
+ *
516
+ * The indexes in the returned array are the absolute indexes of the cols, so the returned array is an array with holes
517
+ *
518
+ */
519
+ getFixedEndColsOffsets: ({ skipScroll }?: {
520
+ skipScroll: boolean;
521
+ }) => number[];
522
+ /**
523
+ * Returns an array of offsets for all rows fixed at the end
524
+ *
525
+ * The order in the array is from topmost row to the bottom-most row
526
+ * The reference for offset is the top side of the table.
527
+ * The offsets take into account the scroll position and return the correct position.
528
+ *
529
+ * The indexes in the returned array are the absolute indexes of the rows, so the returned array is an array with holes
530
+ *
531
+ */
532
+ getFixedEndRowsOffsets: ({ skipScroll }?: {
533
+ skipScroll: boolean;
534
+ }) => number[];
535
+ getFixedStartColsWidth: () => number;
536
+ getFixedEndRowsHeight: () => number;
537
+ getFixedStartRowsHeight: () => number;
538
+ computeRenderCount: (which?: WhichDirection) => {
539
+ horizontal: number;
540
+ vertical: number;
541
+ };
542
+ setRenderCount: ({ horizontal, vertical, }: {
543
+ horizontal: number | undefined;
544
+ vertical: number | undefined;
545
+ }) => void;
546
+ private notifyRenderCountChange;
547
+ updateFixedCells: (config: {
548
+ fixedColsStart?: number;
549
+ fixedColsEnd?: number;
550
+ fixedRowsStart?: number;
551
+ fixedRowsEnd?: number;
552
+ }) => void;
553
+ getFixedCellInfo: () => {
554
+ fixedRowsStart: number;
555
+ fixedColsStart: number;
556
+ fixedRowsEnd: number;
557
+ fixedColsEnd: number;
558
+ };
559
+ updateRenderRange: (which?: WhichDirection) => void;
560
+ getExtraSpanCellsForRange: ({ horizontal, vertical, }: {
561
+ horizontal: RenderRangeType;
562
+ vertical: RenderRangeType;
563
+ }) => [number, number][];
564
+ computeRenderRange: (which?: WhichDirection) => {
565
+ horizontal: RenderRangeType;
566
+ vertical: RenderRangeType;
567
+ extraCells: [number, number][];
568
+ };
569
+ computeDirectionalRenderRange: (direction: 'horizontal' | 'vertical') => {
570
+ startIndex: number;
571
+ endIndex: number;
572
+ };
573
+ getItemAt: (scrollPos: number, direction: 'horizontal' | 'vertical') => number;
574
+ getCellOffset: (rowIndex: number, colIndex: number) => {
575
+ x: number;
576
+ y: number;
577
+ };
578
+ getItemOffsetFor: (itemIndex: number, direction: 'horizontal' | 'vertical') => number;
579
+ private computeCacheFor;
580
+ private getItemSizeCacheFor;
581
+ private computeItemSpanUpTo;
582
+ private getCellSpan;
583
+ getRowspan: (rowIndex: number, colIndex: number) => number;
584
+ getColspan: (rowIndex: number, colIndex: number) => number;
585
+ getRowspanParent: (rowIndex: number, colIndex: number) => number;
586
+ getColspanParent: (rowIndex: number, colIndex: number) => number;
587
+ getItemSpanParent: (rowIndex: number, colIndex: number, direction: 'horizontal' | 'vertical') => number;
588
+ getRowHeightWithSpan: (rowIndex: number, colIndex: number, rowspan: number) => number;
589
+ getColWidthWithSpan: (rowIndex: number, colIndex: number, colspan: number) => number;
590
+ private getItemSizeWithSpan;
591
+ getRowHeight: (rowIndex: number) => number;
592
+ getColWidth: (colIndex: number) => number;
593
+ /**
594
+ * For now, this doesn't take into account the row/colspan, and it's okay not to
595
+ * @param itemIndex
596
+ * @returns the size of the specified item
597
+ */
598
+ getItemSize: (itemIndex: number, direction: 'horizontal' | 'vertical') => number;
599
+ getTotalSize: () => {
600
+ height: number;
601
+ width: number;
602
+ };
603
+ getTotalSizeFor: (direction: 'horizontal' | 'vertical') => number;
604
+ setRenderRange: ({ horizontal, vertical, extraCells, }: {
605
+ horizontal: RenderRangeType;
606
+ vertical: RenderRangeType;
607
+ extraCells?: [number, number][] | undefined;
608
+ }) => void;
609
+ getRenderRangeCellCount: (range: TableRenderRange) => number;
610
+ getExtraCells: () => [
611
+ number,
612
+ number
613
+ ][];
614
+ getScrollPosition: () => ScrollPosition;
615
+ getRenderRange: () => TableRenderRange;
616
+ onScroll: (fn: OnScrollFn) => () => void;
617
+ onScrollStart: (fn: VoidFunction) => () => void;
618
+ onScrollStop: (fn: (scrollPos: ScrollPosition) => void) => () => void;
619
+ onRenderRangeChange: (fn: FnOnRenderRangeChange) => () => void;
620
+ onVerticalRenderRangeChange: (fn: FnOnDirectionalRenderRangeChange) => () => void;
621
+ onHorizontalRenderRangeChange: (fn: FnOnDirectionalRenderRangeChange) => () => void;
622
+ onRenderCountChange: (fn: FnOnRenderCountChange) => () => void;
623
+ onAvailableSizeChange: (fn: OnAvailableSizeChange) => () => void;
624
+ onDestroy: (fn: VoidFn) => () => void;
625
+ getAvailableSize: () => {
626
+ width: number;
627
+ height: number;
628
+ };
629
+ private notifyDestroy;
630
+ destroy: () => void;
631
+ }
632
+
633
+ declare type RowSelectionStateItem = (any | any[])[];
634
+ declare type RowSelectionStateObject = {
635
+ selectedRows: RowSelectionStateItem;
636
+ deselectedRows: RowSelectionStateItem;
637
+ defaultSelection: boolean;
638
+ } | {
639
+ defaultSelection: true;
640
+ deselectedRows: RowSelectionStateItem;
641
+ selectedRows?: RowSelectionStateItem;
642
+ } | {
643
+ defaultSelection: false;
644
+ selectedRows: RowSelectionStateItem;
645
+ deselectedRows?: RowSelectionStateItem;
646
+ };
647
+ declare type RowSelectionStateConfig<T> = {
648
+ groupBy: DataSourceState<T>['groupBy'];
649
+ groupDeepMap: DataSourceState<T>['groupDeepMap'];
650
+ toPrimaryKey: DataSourceState<T>['toPrimaryKey'];
651
+ totalCount: number;
652
+ indexer: DataSourceState<T>['indexer'];
653
+ lazyLoad: boolean;
654
+ onlyUsePrimaryKeys: boolean;
655
+ };
656
+ declare type GetRowSelectionStateConfig<T> = () => RowSelectionStateConfig<T>;
657
+ declare type RowSelectionStateOverride = {
658
+ getGroupKeysForPrimaryKey: RowSelectionState<any>['getGroupKeysForPrimaryKey'];
659
+ getGroupByLength: RowSelectionState<any>['getGroupByLength'];
660
+ getGroupCount: RowSelectionState<any>['getGroupCount'];
661
+ getGroupKeysDirectlyInsideGroup: RowSelectionState<any>['getGroupKeysDirectlyInsideGroup'];
662
+ getAllPrimaryKeysInsideGroup: RowSelectionState<any>['getAllPrimaryKeysInsideGroup'];
663
+ };
664
+ declare class RowSelectionState<T = any> {
665
+ selectedRows: RowSelectionStateItem | null;
666
+ deselectedRows: RowSelectionStateItem | null;
667
+ defaultSelection: boolean;
668
+ selectedMap: DeepMap<any, true>;
669
+ deselectedMap: DeepMap<any, true>;
670
+ onlyUsePrimaryKeys: boolean;
671
+ selectionCache: DeepMap<any, boolean | null>;
672
+ selectionCountCache: DeepMap<any, {
673
+ selectedCount: number;
674
+ deselectedCount: number;
675
+ }>;
676
+ getConfig: GetRowSelectionStateConfig<T>;
677
+ getGroupKeysForPrimaryKey(pk: any): any[];
678
+ getGroupDeepMap(): DeepMap<any, DeepMapGroupValueType<T, any>> | undefined;
679
+ getGroupCount(groupKeys: any[]): number;
680
+ getGroupKeysDirectlyInsideGroup(groupKeys: any[]): any[][];
681
+ getAllPrimaryKeysInsideGroup(groupKeys: any[]): any[];
682
+ getGroupByLength(): number;
683
+ static from<T>(rowSeleStateObject: RowSelectionStateObject, getConfig: GetRowSelectionStateConfig<T>, overrides?: RowSelectionStateOverride): RowSelectionState<T>;
684
+ constructor(state: RowSelectionStateObject | RowSelectionState, getConfig: GetRowSelectionStateConfig<T>, _forTestingOnly?: RowSelectionStateOverride);
685
+ mapSet: (name: 'selected' | 'deselected', key: any | any[]) => void;
686
+ _selectedMapSet: (key: any | any[]) => void;
687
+ _deselectedMapSet: (key: any | any[]) => void;
688
+ update(stateObject: RowSelectionStateObject): void;
689
+ private xcache;
690
+ getState(): RowSelectionStateObject;
691
+ deselectAll(): void;
692
+ selectAll(): void;
693
+ isRowDefaultSelected(): boolean;
694
+ isRowDefaultDeselected(): boolean;
695
+ /**
696
+ *
697
+ * @param key the id of the row - if a row in a grouped datasource, this is the final row id, without the group keys
698
+ * @param groupKeys the keys of row parents, in order
699
+ * @returns Whether the row is selected or not.
700
+ */
701
+ isRowSelected(key: any, groupKeys?: any[]): boolean;
702
+ isRowDeselected(key: any, groupKeys?: any[]): boolean;
703
+ setRowSelected(key: string | number, selected: boolean, groupKeys?: any[]): void;
704
+ /**
705
+ * Returns if the selection state ('full','partial','none') for the current group
706
+ *
707
+ * The selection state will be full (true) if either of those are true:
708
+ * * the group keys are specified as selected
709
+ * * all the children are specified as selected
710
+ *
711
+ * The selection state will be partial (null) if either of those are true:
712
+ * * the group keys are partially selected
713
+ * * some of the children are specified as selected
714
+ *
715
+ *
716
+ * @param groupKeys the keys of the group row
717
+ * @param children leaf children that belong to the group
718
+ * @returns boolean
719
+ */
720
+ getGroupRowSelectionState(initialGroupKeys: any[]): boolean | null;
721
+ private getGroupRowBooleanSelectionStateFromParent;
722
+ isGroupRowPartlySelected(groupKeys: any[]): boolean;
723
+ isGroupRowSelected(groupKeys: any[]): boolean;
724
+ isGroupRowDeselected(groupKeys: any[]): boolean;
725
+ selectGroupRow(groupKeys: any[]): void;
726
+ deselectGroupRow(groupKeys: any[]): void;
727
+ setRowAsSelected(key: string | number, groupKeys?: any[]): void;
728
+ setRowAsDeselected(key: string | number, groupKeys?: any[]): void;
729
+ deselectRow(key: any, groupKeys?: any[]): void;
730
+ selectRow(key: any, groupKeys?: any[]): void;
731
+ toggleGroupRowSelection(groupKeys: any[]): void;
732
+ toggleRowSelection(key: string | number, groupKeys?: any[] | undefined): void;
733
+ getSelectedCount(): number;
734
+ getDeselectedCount(): number;
735
+ getSelectionCountFor(groupKeys?: any[], parentSelected?: boolean): {
736
+ selectedCount: number;
737
+ deselectedCount: number;
738
+ };
739
+ }
740
+
741
+ declare type MultiRowSelectorOptions = {
742
+ getIdForIndex: (index: number) => string | number;
743
+ };
744
+ declare class MultiRowSelector {
745
+ getIdForIndex: MultiRowSelectorOptions['getIdForIndex'];
746
+ multiSelectStartIndex: number;
747
+ multiSelectEndIndex?: number;
748
+ _rowSelectionState: RowSelectionState;
749
+ constructor(options: MultiRowSelectorOptions);
750
+ set rowSelectionState(rowSelectionState: RowSelectionState);
751
+ get rowSelectionState(): RowSelectionState;
752
+ private selectRange;
753
+ private deselectRange;
754
+ /**
755
+ * This is the single click, without any modifier
756
+ */
757
+ resetClick(index: number): void;
758
+ /**
759
+ * This is the click with ctrl/cmd key pressed
760
+ * @param index
761
+ */
762
+ singleAddClick(index: number): void;
763
+ multiSelectClick(index: number): void;
764
+ }
765
+
766
+ interface InfiniteTableComputedValues<T> {
767
+ scrollbars: {
768
+ vertical: boolean;
769
+ horizontal: boolean;
770
+ };
771
+ multiRowSelector: MultiRowSelector;
772
+ showColumnFilters: boolean;
773
+ renderSelectionCheckBox: boolean;
774
+ rowspan?: MatrixBrainOptions['rowspan'];
775
+ computedPinnedStartOverflow: boolean;
776
+ computedPinnedEndOverflow: boolean;
777
+ computedPinnedStartColumns: InfiniteTableComputedColumn<T>[];
778
+ computedPinnedEndColumns: InfiniteTableComputedColumn<T>[];
779
+ computedUnpinnedColumns: InfiniteTableComputedColumn<T>[];
780
+ computedVisibleColumns: InfiniteTableComputedColumn<T>[];
781
+ computedVisibleColumnsMap: Map<string, InfiniteTableComputedColumn<T>>;
782
+ computedColumnsMap: Map<string, InfiniteTableComputedColumn<T>>;
783
+ computedColumnsMapInInitialOrder: Map<string, InfiniteTableComputedColumn<T>>;
784
+ computedColumnOrder: InfiniteTablePropColumnOrderNormalized;
785
+ computedPinnedStartColumnsWidth: number;
786
+ computedPinnedStartWidth: number;
787
+ computedPinnedEndColumnsWidth: number;
788
+ computedPinnedEndWidth: number;
789
+ computedUnpinnedColumnsWidth: number;
790
+ computedUnpinnedOffset: number;
791
+ computedPinnedEndOffset: number;
792
+ computedRemainingSpace: number;
793
+ fieldsToColumn: Map<keyof T, InfiniteTableComputedColumn<T>>;
794
+ toggleGroupRow: (groupKeys: any[]) => void;
795
+ columnSize: (colIndex: number) => number;
796
+ }
797
+
798
+ declare type TableRenderCellFnParam = {
799
+ domRef: RefCallback<HTMLElement>;
800
+ rowIndex: number;
801
+ colIndex: number;
802
+ rowspan: number;
803
+ colspan: number;
804
+ hidden: boolean;
805
+ width: number;
806
+ height: number;
807
+ widthWithColspan: number;
808
+ heightWithRowspan: number;
809
+ rowFixed: FixedPosition;
810
+ colFixed: FixedPosition;
811
+ onMouseEnter: VoidFunction;
812
+ onMouseLeave: VoidFunction;
813
+ };
814
+ declare type TableRenderCellFn = (param: TableRenderCellFnParam) => Renderable;
815
+ declare class ReactHeadlessTableRenderer extends Logger {
816
+ private brain;
817
+ private destroyed;
818
+ private scrolling;
819
+ cellHoverClassNames: string[];
820
+ name: string;
821
+ private itemDOMElements;
822
+ private itemDOMRefs;
823
+ private updaters;
824
+ private mappedCells;
825
+ private items;
826
+ private currentHoveredRow;
827
+ private onDestroy;
828
+ private hoverRowUpdatesInProgress;
829
+ private infiniteNode;
830
+ private getInfiniteNode;
831
+ setTransform: (element: HTMLElement, _rowIndex: number, colIndex: number, { x, y, scrollLeft, scrollTop, }: {
832
+ x: number;
833
+ y: number;
834
+ scrollLeft?: boolean | undefined;
835
+ scrollTop?: boolean | undefined;
836
+ }, zIndex: number | 'auto' | undefined | null) => void;
837
+ constructor(brain: MatrixBrain);
838
+ getFullyVisibleRowsRange: () => {
839
+ start: number;
840
+ end: number;
841
+ } | null;
842
+ getScrollPositionForScrollRowIntoView: (rowIndex: number, config?: {
843
+ scrollAdjustPosition?: ScrollAdjustPosition;
844
+ offset?: number;
845
+ }) => ScrollPosition | null;
846
+ getScrollPositionForScrollColumnIntoView: (colIndex: number, config?: {
847
+ scrollAdjustPosition?: ScrollAdjustPosition;
848
+ offset?: number;
849
+ }) => ScrollPosition | null;
850
+ getScrollPositionForScrollCellIntoView: (rowIndex: number, colIndex: number, config?: {
851
+ rowScrollAdjustPosition?: ScrollAdjustPosition;
852
+ colScrollAdjustPosition?: ScrollAdjustPosition;
853
+ scrollAdjustPosition?: ScrollAdjustPosition;
854
+ offsetTop: number;
855
+ offsetLeft: number;
856
+ }) => ScrollPosition | null;
857
+ isRowFullyVisible: (rowIndex: number, offsetMargin?: number) => boolean;
858
+ isRowVisible: (rowIndex: number, offsetMargin?: number) => boolean;
859
+ isRowRendered: (rowIndex: number) => boolean;
860
+ isCellVisible: (rowIndex: number, colIndex: number) => boolean;
861
+ isCellFullyVisible: (rowIndex: number, colIndex: number) => boolean;
862
+ isColumnFullyVisible: (colIndex: number, offsetMargin?: number) => boolean;
863
+ isColumnVisible: (colIndex: number, offsetMargin?: number) => boolean;
864
+ isCellRendered: (rowIndex: number, colIndex: number) => boolean;
865
+ isColumnRendered: (colIndex: number) => boolean;
866
+ getExtraSpanCellsForRange: (range: TableRenderRange) => [number, number][];
867
+ renderRange: (range: TableRenderRange, { renderCell, force, onRender, }: {
868
+ force?: boolean | undefined;
869
+ renderCell: TableRenderCellFn;
870
+ onRender: (items: Renderable[]) => void;
871
+ }) => Renderable[];
872
+ private renderElement;
873
+ getFixedRanges: (currentRenderRange: TableRenderRange) => TableRenderRange[];
874
+ private isCellFixed;
875
+ private isCellCovered;
876
+ private renderCellAtElement;
877
+ private onMouseEnter;
878
+ private addHoverClass;
879
+ private onMouseLeave;
880
+ private removeHoverClass;
881
+ private updateHoverClassNamesForRow;
882
+ private updateElementPosition;
883
+ private onScrollStart;
884
+ private onScrollStop;
885
+ adjustFixedElementsOnScroll: (scrollPosition?: ScrollPosition) => void;
886
+ destroy: () => void;
887
+ reset(): void;
888
+ }
889
+
890
+ declare type ComponentStateContext<T_STATE, T_ACTIONS> = {
891
+ getComponentState: () => T_STATE;
892
+ componentState: T_STATE;
893
+ componentActions: T_ACTIONS;
894
+ };
895
+ declare type ComponentStateGeneratedActions<T_STATE> = {
896
+ [k in keyof T_STATE]: T_STATE[k] | React.SetStateAction<T_STATE[k]>;
897
+ };
898
+ declare type ComponentInterceptedActions<T_STATE> = {
899
+ [k in keyof T_STATE]?: (value: T_STATE[k], { actions, state, }: {
900
+ actions: ComponentStateGeneratedActions<T_STATE>;
901
+ state: T_STATE;
902
+ }) => void | boolean;
903
+ };
904
+ declare type ComponentMappedCallbacks<T_STATE> = {
905
+ [k in keyof T_STATE]: (value: T_STATE[k], state: T_STATE) => {
906
+ callbackName: string;
907
+ callbackParams: any[];
908
+ };
909
+ };
910
+ declare type ComponentStateActions<T_STATE> = ComponentStateGeneratedActions<T_STATE>;
911
+
912
+ declare type CellPosition = {
913
+ rowIndex: number;
914
+ colIndex: number;
915
+ };
916
+
917
+ declare type NonUndefined<T> = T extends undefined ? never : T;
918
+
919
+ declare type SubscriptionCallbackOnChangeFn<T> = (node: T | null) => void;
920
+ interface SubscriptionCallback<T> {
921
+ (node: T, callback?: () => void): void;
922
+ get: () => T | null;
923
+ destroy: VoidFn;
924
+ onChange: (fn: SubscriptionCallbackOnChangeFn<T>) => VoidFn;
925
+ }
926
+
927
+ declare class ScrollListener {
928
+ private scrollPosition;
929
+ private onScrollFns;
930
+ getScrollPosition: () => ScrollPosition;
931
+ onScroll: (fn: OnScrollFn) => () => void;
932
+ setScrollPosition: (scrollPosition: ScrollPosition) => void;
933
+ private notifyScrollChange;
934
+ destroy: () => void;
935
+ }
936
+
937
+ interface InfiniteTableSetupState<T> {
938
+ renderer: ReactHeadlessTableRenderer;
939
+ onRenderUpdater: SubscriptionCallback<Renderable>;
940
+ propsCache: Map<keyof InfiniteTableProps<T>, WeakMap<any, any>>;
941
+ columnsWhenInlineGroupRenderStrategy?: Map<string, InfiniteTableColumn<T>>;
942
+ domRef: MutableRefObject<HTMLDivElement | null>;
943
+ scrollerDOMRef: MutableRefObject<HTMLDivElement | null>;
944
+ portalDOMRef: MutableRefObject<HTMLDivElement | null>;
945
+ activeCellIndicatorDOMRef: MutableRefObject<HTMLDivElement | null>;
946
+ onRowHeightCSSVarChange: SubscriptionCallback<number>;
947
+ onColumnMenuClick: SubscriptionCallback<{
948
+ target: HTMLElement;
949
+ column: InfiniteTableComputedColumn<T>;
950
+ }>;
951
+ columnContextMenuVisibleForColumnId: string | null;
952
+ onColumnHeaderHeightCSSVarChange: SubscriptionCallback<number>;
953
+ cellClick: SubscriptionCallback<CellPosition & {
954
+ event: MouseEvent;
955
+ }>;
956
+ cellMouseDown: SubscriptionCallback<CellPosition & {
957
+ event: MouseEvent;
958
+ }>;
959
+ keyDown: SubscriptionCallback<KeyboardEvent>;
960
+ columnsWhenGrouping?: InfiniteTableColumnsMap<T>;
961
+ bodySize: Size;
962
+ brain: MatrixBrain;
963
+ headerBrain: MatrixBrain;
964
+ focused: boolean;
965
+ ready: boolean;
966
+ columnReorderDragColumnId: false | string;
967
+ columnVisibilityForGrouping: Record<string, false>;
968
+ focusedWithin: boolean;
969
+ scrollPosition: ScrollPosition;
970
+ pinnedStartScrollListener: ScrollListener;
971
+ pinnedEndScrollListener: ScrollListener;
972
+ }
973
+ declare type InfiniteTableColumnGroupsDepthsMap = Map<string, number>;
974
+ declare type InfiniteTablePropPivotTotalColumnPosition = false | 'start' | 'end';
975
+ declare type InfiniteTablePropPivotGrandTotalColumnPosition = InfiniteTablePropPivotTotalColumnPosition;
976
+ interface InfiniteTableMappedState<T> {
977
+ id: InfiniteTableProps<T>['id'];
978
+ scrollTopKey: InfiniteTableProps<T>['scrollTopKey'];
979
+ viewportReservedWidth: InfiniteTableProps<T>['viewportReservedWidth'];
980
+ resizableColumns: InfiniteTableProps<T>['resizableColumns'];
981
+ groupColumn: InfiniteTableProps<T>['groupColumn'];
982
+ headerOptions: NonUndefined<InfiniteTableProps<T>['headerOptions']>;
983
+ onScrollbarsChange: InfiniteTableProps<T>['onScrollbarsChange'];
984
+ getColumContextMenuItems: InfiniteTableProps<T>['getColumContextMenuItems'];
985
+ columnPinning: InfiniteTablePropColumnPinning;
986
+ loadingText: InfiniteTableProps<T>['loadingText'];
987
+ components: InfiniteTableProps<T>['components'];
988
+ columns: InfiniteTableColumnsMap<T>;
989
+ pivotColumns: InfiniteTableProps<T>['pivotColumns'];
990
+ onReady: InfiniteTableProps<T>['onReady'];
991
+ onSelfFocus: InfiniteTableProps<T>['onSelfFocus'];
992
+ onSelfBlur: InfiniteTableProps<T>['onSelfBlur'];
993
+ onFocusWithin: InfiniteTableProps<T>['onFocusWithin'];
994
+ onBlurWithin: InfiniteTableProps<T>['onBlurWithin'];
995
+ autoSizeColumnsKey: InfiniteTableProps<T>['autoSizeColumnsKey'];
996
+ activeRowIndex: InfiniteTableProps<T>['activeRowIndex'];
997
+ activeCellIndex: InfiniteTableProps<T>['activeCellIndex'];
998
+ scrollStopDelay: NonUndefined<InfiniteTableProps<T>['scrollStopDelay']>;
999
+ onScrollToTop: InfiniteTableProps<T>['onScrollToTop'];
1000
+ onScrollToBottom: InfiniteTableProps<T>['onScrollToBottom'];
1001
+ onScrollStop: InfiniteTableProps<T>['onScrollStop'];
1002
+ scrollToBottomOffset: InfiniteTableProps<T>['scrollToBottomOffset'];
1003
+ filterEditors: NonUndefined<InfiniteTableProps<T>['filterEditors']>;
1004
+ focusedClassName: InfiniteTableProps<T>['focusedClassName'];
1005
+ focusedWithinClassName: InfiniteTableProps<T>['focusedWithinClassName'];
1006
+ focusedStyle: InfiniteTableProps<T>['focusedStyle'];
1007
+ focusedWithinStyle: InfiniteTableProps<T>['focusedWithinStyle'];
1008
+ showSeparatePivotColumnForSingleAggregation: NonUndefined<InfiniteTableProps<T>['showSeparatePivotColumnForSingleAggregation']>;
1009
+ domProps: InfiniteTableProps<T>['domProps'];
1010
+ rowStyle: InfiniteTableProps<T>['rowStyle'];
1011
+ rowProps: InfiniteTableProps<T>['rowProps'];
1012
+ rowClassName: InfiniteTableProps<T>['rowClassName'];
1013
+ pinnedStartMaxWidth: InfiniteTableProps<T>['pinnedStartMaxWidth'];
1014
+ pinnedEndMaxWidth: InfiniteTableProps<T>['pinnedEndMaxWidth'];
1015
+ pivotColumn: InfiniteTableProps<T>['pivotColumn'];
1016
+ pivotColumnGroups: InfiniteTablePropColumnGroupsMap;
1017
+ columnMinWidth: NonUndefined<InfiniteTableProps<T>['columnMinWidth']>;
1018
+ columnMaxWidth: NonUndefined<InfiniteTableProps<T>['columnMaxWidth']>;
1019
+ columnDefaultWidth: NonUndefined<InfiniteTableProps<T>['columnDefaultWidth']>;
1020
+ columnCssEllipsis: NonUndefined<InfiniteTableProps<T>['columnCssEllipsis']>;
1021
+ draggableColumns: NonUndefined<InfiniteTableProps<T>['draggableColumns']>;
1022
+ sortable: NonUndefined<InfiniteTableProps<T>['sortable']>;
1023
+ hideEmptyGroupColumns: NonUndefined<InfiniteTableProps<T>['hideEmptyGroupColumns']>;
1024
+ hideColumnWhenGrouped: NonUndefined<InfiniteTableProps<T>['hideColumnWhenGrouped']>;
1025
+ keyboardSelection: NonUndefined<InfiniteTableProps<T>['keyboardSelection']>;
1026
+ columnOrder: NonUndefined<InfiniteTableProps<T>['columnOrder']>;
1027
+ showZebraRows: NonUndefined<InfiniteTableProps<T>['showZebraRows']>;
1028
+ showHoverRows: NonUndefined<InfiniteTableProps<T>['showHoverRows']>;
1029
+ header: NonUndefined<InfiniteTableProps<T>['header']>;
1030
+ virtualizeColumns: NonUndefined<InfiniteTableProps<T>['virtualizeColumns']>;
1031
+ rowHeight: number;
1032
+ columnHeaderHeight: number;
1033
+ licenseKey: NonUndefined<InfiniteTableProps<T>['licenseKey']>;
1034
+ columnVisibility: InfiniteTablePropColumnVisibility;
1035
+ columnSizing: InfiniteTablePropColumnSizing;
1036
+ columnTypes: InfiniteTablePropColumnTypes<T>;
1037
+ columnGroups: InfiniteTablePropColumnGroupsMap;
1038
+ collapsedColumnGroups: NonUndefined<InfiniteTableProps<T>['collapsedColumnGroups']>;
1039
+ pivotTotalColumnPosition: NonUndefined<InfiniteTableProps<T>['pivotTotalColumnPosition']>;
1040
+ pivotGrandTotalColumnPosition: InfiniteTableProps<T>['pivotGrandTotalColumnPosition'];
1041
+ }
1042
+ interface InfiniteTableDerivedState<T> {
1043
+ groupBy: DataSourceProps<T>['groupBy'];
1044
+ computedColumns: Map<string, InfiniteTableColumn<T>>;
1045
+ initialColumns: InfiniteTableProps<T>['columns'];
1046
+ groupRenderStrategy: NonUndefined<InfiniteTableProps<T>['groupRenderStrategy']>;
1047
+ columnHeaderCssEllipsis: NonUndefined<InfiniteTableProps<T>['columnHeaderCssEllipsis']>;
1048
+ keyboardNavigation: NonUndefined<InfiniteTableProps<T>['keyboardNavigation']>;
1049
+ columnGroupsDepthsMap: InfiniteTableColumnGroupsDepthsMap;
1050
+ columnGroupsMaxDepth: number;
1051
+ computedColumnGroups: InfiniteTablePropColumnGroupsMap;
1052
+ rowHeightCSSVar: string;
1053
+ columnHeaderHeightCSSVar: string;
1054
+ controlledColumnVisibility: boolean;
1055
+ }
1056
+ declare type InfiniteTableActions<T> = ComponentStateActions<InfiniteTableState<T>>;
1057
+ interface InfiniteTableState<T> extends InfiniteTableMappedState<T>, InfiniteTableDerivedState<T>, InfiniteTableSetupState<T> {
1058
+ }
1059
+
1060
+ interface InfiniteTableContextValue<T> {
1061
+ imperativeApi: InfiniteTableApi<T>;
1062
+ componentState: InfiniteTableState<T>;
1063
+ componentActions: InfiniteTableActions<T>;
1064
+ computed: InfiniteTableComputedValues<T>;
1065
+ getComputed: () => InfiniteTableComputedValues<T>;
1066
+ getState: () => InfiniteTableState<T>;
1067
+ }
1068
+
1069
+ declare type GroupKeyType$1<T extends any = any> = T;
1070
+ declare type GroupBy<DataType, KeyType> = {
1071
+ field: KeyOfNoSymbol<DataType>;
1072
+ toKey?: (value: any, data: DataType) => GroupKeyType$1<KeyType>;
1073
+ column?: Partial<InfiniteTableGroupColumnBase<DataType>>;
1074
+ };
1075
+
1076
+ declare type RenderRange = {
1077
+ renderStartIndex: number;
1078
+ renderEndIndex: number;
1079
+ };
1080
+
1081
+ declare type BooleanDeepCollectionStateKeys<KeyType> = true | KeyType[][];
1082
+ declare type BooleanDeepCollectionStateObject<KeyType> = {
1083
+ positiveItems: BooleanDeepCollectionStateKeys<KeyType>;
1084
+ negativeItems: BooleanDeepCollectionStateKeys<KeyType>;
1085
+ };
1086
+ declare abstract class BooleanDeepCollectionState<StateObject, KeyType extends any = any> {
1087
+ protected positiveMap?: DeepMap<KeyType, true>;
1088
+ protected negativeMap?: DeepMap<KeyType, true>;
1089
+ protected allNegative: boolean;
1090
+ protected allPositive: boolean;
1091
+ private initialState;
1092
+ constructor(state: BooleanDeepCollectionStateObject<KeyType> | BooleanDeepCollectionState<StateObject, KeyType>);
1093
+ abstract getPositiveFromState(state: StateObject): BooleanDeepCollectionStateKeys<KeyType>;
1094
+ abstract getNegativeFromState(state: StateObject): BooleanDeepCollectionStateKeys<KeyType>;
1095
+ abstract getState(): StateObject;
1096
+ protected getInitialState(): BooleanDeepCollectionStateObject<KeyType>;
1097
+ destroy(): void;
1098
+ private update;
1099
+ protected areAllNegative(): boolean;
1100
+ protected areAllPositive(): boolean;
1101
+ protected makeAllNegative(): void;
1102
+ protected makeAllPositive(): void;
1103
+ protected isItemPositive(keys: KeyType[]): boolean | undefined;
1104
+ protected isItemNegative(keys: KeyType[]): boolean;
1105
+ protected setItemValue(keys: KeyType[], shouldMakePositive: boolean): void;
1106
+ protected makeItemNegative(keys: KeyType[]): void;
1107
+ protected makeItemPositive(keys: KeyType[]): void;
1108
+ protected toggleItem(keys: KeyType[]): void;
1109
+ }
1110
+
1111
+ declare class GroupRowsState<KeyType extends any = any> extends BooleanDeepCollectionState<DataSourcePropGroupRowsStateObject<KeyType>, KeyType> {
1112
+ constructor(state: DataSourcePropGroupRowsStateObject<KeyType> | GroupRowsState<KeyType>);
1113
+ getState(): DataSourcePropGroupRowsStateObject<KeyType>;
1114
+ getPositiveFromState(state: DataSourcePropGroupRowsStateObject<KeyType>): DataSourceGroupRowsList<KeyType>;
1115
+ getNegativeFromState(state: DataSourcePropGroupRowsStateObject<KeyType>): DataSourceGroupRowsList<KeyType>;
1116
+ areAllCollapsed(): boolean;
1117
+ areAllExpanded(): boolean;
1118
+ collapseAll(): void;
1119
+ expandAll(): void;
1120
+ isGroupRowExpanded(keys: KeyType[]): boolean | undefined;
1121
+ isGroupRowCollapsed(keys: KeyType[]): boolean;
1122
+ setGroupRowExpanded(keys: KeyType[], shouldExpand: boolean): void;
1123
+ collapseGroupRow(keys: KeyType[]): void;
1124
+ expandGroupRow(keys: KeyType[]): void;
1125
+ toggleGroupRow(keys: KeyType[]): void;
1126
+ }
1127
+
1128
+ declare class Indexer<DataType, PrimaryKeyType = string> {
1129
+ primaryKeyToData: Map<string, DataType>;
1130
+ add: (primaryKey: PrimaryKeyType, data: DataType) => void;
1131
+ clear: () => void;
1132
+ getDataForPrimaryKey: (primaryKey: PrimaryKeyType) => DataType | undefined;
1133
+ indexArray: (arr: DataType[], toPrimaryKey: (data: DataType) => PrimaryKeyType) => void;
1134
+ }
1135
+
1136
+ interface DataSourceDataParams<T> {
1137
+ originalDataArray: T[];
1138
+ sortInfo?: DataSourceSortInfo<T>;
1139
+ groupBy?: DataSourcePropGroupBy<T>;
1140
+ pivotBy?: DataSourcePropPivotBy<T>;
1141
+ filterValue?: DataSourcePropFilterValue<T>;
1142
+ groupRowsState?: DataSourcePropGroupRowsStateObject<any>;
1143
+ lazyLoadBatchSize?: number;
1144
+ lazyLoadStartIndex?: number;
1145
+ groupKeys?: any[];
1146
+ append?: boolean;
1147
+ aggregationReducers?: DataSourcePropAggregationReducers<T>;
1148
+ livePaginationCursor?: DataSourceLivePaginationCursorValue;
1149
+ __cursorId?: DataSourceSetupState<T>['cursorId'];
1150
+ changes?: DataSourceDataParamsChanges<T>;
1151
+ }
1152
+ declare type DataSourceDataParamsChanges<T> = Partial<Record<keyof Omit<DataSourceDataParams<T>, 'originalDataArray' | 'changes'>, true>>;
1153
+ declare type DataSourceSingleSortInfo<T> = Omit<MultisortInfo<T>, 'field'> & {
1154
+ field?: keyof T | (keyof T)[];
1155
+ id?: string;
1156
+ };
1157
+ declare type DataSourceGroupBy<T> = GroupBy<T, any>;
1158
+ declare type DataSourcePivotBy<T> = PivotBy<T, any>;
1159
+ declare type DataSourceSortInfo<T> = null | DataSourceSingleSortInfo<T> | DataSourceSingleSortInfo<T>[];
1160
+ declare type DataSourcePropSortInfo<T> = DataSourceSortInfo<T>;
1161
+ declare type DataSourceRemoteData<T> = {
1162
+ data: T[] | LazyGroupDataItem<T>[];
1163
+ mappings?: DataSourceMappings;
1164
+ cache?: boolean;
1165
+ error?: string;
1166
+ totalCount?: number;
1167
+ totalCountUnfiltered?: number;
1168
+ livePaginationCursor?: DataSourceLivePaginationCursorValue;
1169
+ };
1170
+ declare type DataSourceData<T> = T[] | DataSourceRemoteData<T> | Promise<T[] | DataSourceRemoteData<T>> | ((dataInfo: DataSourceDataParams<T>) => T[] | Promise<T[] | DataSourceRemoteData<T>>);
1171
+ declare type DataSourceGroupRowsList<KeyType> = true | KeyType[][];
1172
+ declare type DataSourcePropGroupRowsStateObject<KeyType> = {
1173
+ expandedRows: DataSourceGroupRowsList<KeyType>;
1174
+ collapsedRows: DataSourceGroupRowsList<KeyType>;
1175
+ };
1176
+ declare type DataSourcePropGroupBy<T> = DataSourceGroupBy<T>[];
1177
+ declare type DataSourcePropPivotBy<T> = DataSourcePivotBy<T>[];
1178
+ interface DataSourceMappedState<T> {
1179
+ aggregationReducers?: DataSourceProps<T>['aggregationReducers'];
1180
+ livePagination: DataSourceProps<T>['livePagination'];
1181
+ isRowSelected: DataSourceProps<T>['isRowSelected'];
1182
+ lazyLoad: DataSourceProps<T>['lazyLoad'];
1183
+ useGroupKeysForMultiRowSelection: NonUndefined<DataSourceProps<T>['useGroupKeysForMultiRowSelection']>;
1184
+ onDataParamsChange: DataSourceProps<T>['onDataParamsChange'];
1185
+ data: DataSourceProps<T>['data'];
1186
+ sortMode: DataSourceProps<T>['sortMode'];
1187
+ filterFunction: DataSourceProps<T>['filterFunction'];
1188
+ filterValue: DataSourceProps<T>['filterValue'];
1189
+ filterTypes: NonUndefined<DataSourceProps<T>['filterTypes']>;
1190
+ primaryKey: DataSourceProps<T>['primaryKey'];
1191
+ filterDelay: NonUndefined<DataSourceProps<T>['filterDelay']>;
1192
+ groupBy: NonUndefined<DataSourceProps<T>['groupBy']>;
1193
+ pivotBy: DataSourceProps<T>['pivotBy'];
1194
+ loading: NonUndefined<DataSourceProps<T>['loading']>;
1195
+ sortTypes: NonUndefined<DataSourceProps<T>['sortTypes']>;
1196
+ collapseGroupRowsOnDataFunctionChange: NonUndefined<DataSourceProps<T>['collapseGroupRowsOnDataFunctionChange']>;
1197
+ sortInfo: DataSourceSingleSortInfo<T>[] | null;
1198
+ }
1199
+ declare type DataSourceAggregationReducer<T, AggregationResultType> = {
1200
+ name?: string;
1201
+ field?: keyof T;
1202
+ initialValue?: AggregationResultType;
1203
+ getter?: (data: T) => any;
1204
+ reducer: string | ((accumulator: any, value: any, data: T, index: number, groupKeys: any[] | undefined) => AggregationResultType | any);
1205
+ done?: (accumulatedValue: AggregationResultType | any, array: T[]) => AggregationResultType;
1206
+ pivotColumn?: ColumnTypeWithInherit<Partial<InfiniteTableColumn<T>>> | (({ column, }: {
1207
+ column: InfiniteTablePivotFinalColumnVariant<T>;
1208
+ }) => ColumnTypeWithInherit<Partial<InfiniteTablePivotColumn<T>>>);
1209
+ };
1210
+ declare type ColumnTypeWithInherit<COL_TYPE> = COL_TYPE & {
1211
+ inheritFromColumn?: string | boolean;
1212
+ };
1213
+ declare type DataSourceMappings = Record<'totals' | 'values', string>;
1214
+ declare type LazyGroupDataItem<DataType> = {
1215
+ data: Partial<DataType>;
1216
+ keys: any[];
1217
+ aggregations?: Record<string, any>;
1218
+ dataset?: DataSourceRemoteData<DataType>;
1219
+ totalChildrenCount?: number;
1220
+ pivot?: {
1221
+ values: Record<string, any>;
1222
+ totals?: Record<string, any>;
1223
+ };
1224
+ };
1225
+ declare type LazyRowInfoGroup<DataType> = {
1226
+ /**
1227
+ * Those are direct children of the current lazy group row
1228
+ */
1229
+ children: LazyGroupDataItem<DataType>[];
1230
+ childrenLoading: boolean;
1231
+ childrenAvailable: boolean;
1232
+ cache: boolean;
1233
+ totalCount: number;
1234
+ totalCountUnfiltered: number;
1235
+ error?: string;
1236
+ };
1237
+ declare type LazyGroupDataDeepMap<DataType, KeyType = string> = DeepMap<KeyType, LazyRowInfoGroup<DataType>>;
1238
+ interface DataSourceSetupState<T> {
1239
+ indexer: Indexer<T, any>;
1240
+ unfilteredCount: number;
1241
+ filteredCount: number;
1242
+ lazyLoadCacheOfLoadedBatches: DeepMap<string, true>;
1243
+ pivotMappings?: DataSourceMappings;
1244
+ propsCache: Map<keyof DataSourceProps<T>, WeakMap<any, any>>;
1245
+ showSeparatePivotColumnForSingleAggregation: boolean;
1246
+ dataParams?: DataSourceDataParams<T>;
1247
+ originalLazyGroupData: LazyGroupDataDeepMap<T>;
1248
+ originalLazyGroupDataChangeDetect: number | string;
1249
+ scrollStopDelayUpdatedByTable: number;
1250
+ notifyScrollbarsChange: SubscriptionCallback<Scrollbars>;
1251
+ notifyScrollStop: SubscriptionCallback<ScrollStopInfo>;
1252
+ notifyRenderRangeChange: SubscriptionCallback<RenderRange>;
1253
+ originalDataArray: T[];
1254
+ lastFilterDataArray?: T[];
1255
+ lastSortDataArray?: T[];
1256
+ lastGroupDataArray?: InfiniteTableRowInfo<T>[];
1257
+ dataArray: InfiniteTableRowInfo<T>[];
1258
+ groupDeepMap?: DeepMap<GroupKeyType, DeepMapGroupValueType<T, any>>;
1259
+ groupRowsIndexesInDataArray?: number[];
1260
+ reducerResults?: Record<string, AggregationReducerResult>;
1261
+ allRowsSelected: boolean;
1262
+ someRowsSelected: boolean;
1263
+ pivotTotalColumnPosition: InfiniteTablePropPivotTotalColumnPosition;
1264
+ pivotGrandTotalColumnPosition: InfiniteTablePropPivotGrandTotalColumnPosition;
1265
+ cursorId: number | symbol | DataSourceLivePaginationCursorValue;
1266
+ updatedAt: number;
1267
+ reducedAt: number;
1268
+ groupedAt: number;
1269
+ sortedAt: number;
1270
+ filteredAt: number;
1271
+ generateGroupRows: boolean;
1272
+ postFilterDataArray?: T[];
1273
+ postSortDataArray?: T[];
1274
+ postGroupDataArray?: InfiniteTableRowInfo<T>[];
1275
+ pivotColumns?: Map<string, InfiniteTableColumn<T>>;
1276
+ pivotColumnGroups?: Map<string, InfiniteTableColumnGroup>;
1277
+ }
1278
+ declare type DataSourcePropAggregationReducers<T> = Record<string, DataSourceAggregationReducer<T, any>>;
1279
+ declare type DataSourcePropMultiRowSelectionChangeParamType = RowSelectionStateObject;
1280
+ declare type DataSourcePropRowSelection = DataSourcePropRowSelection_MultiRow | DataSourcePropRowSelection_SingleRow;
1281
+ declare type DataSourcePropRowSelection_MultiRow = RowSelectionStateObject;
1282
+ declare type DataSourcePropRowSelection_SingleRow = null | string | number;
1283
+ declare type DataSourcePropCellSelection = any;
1284
+ declare type DataSourcePropSelectionMode = false | 'single-cell' | 'single-row' | 'multi-cell' | 'multi-row';
1285
+ declare type DataSourcePropOnRowSelectionChange_MultiRow = (rowSelection: DataSourcePropRowSelection_MultiRow, selectionMode: 'multi-row') => void;
1286
+ declare type DataSourcePropOnRowSelectionChange_SingleRow = (rowSelection: DataSourcePropRowSelection_SingleRow, selectionMode: 'single-row') => void;
1287
+ declare type DataSourcePropOnRowSelectionChange = DataSourcePropOnRowSelectionChange_SingleRow | DataSourcePropOnRowSelectionChange_MultiRow;
1288
+ declare type DataSourcePropOnCellSelectionChange = (cellSelectionParams: any) => void;
1289
+ declare type DataSourcePropIsRowSelected<T> = (rowInfo: InfiniteTableRowInfo<T>, rowSelectionState: RowSelectionState, selectionMode: 'multi-row') => boolean | null;
1290
+ declare type DataSourceProps<T> = {
1291
+ children: React$1.ReactNode | ((contextData: DataSourceState<T>) => React$1.ReactNode);
1292
+ primaryKey: keyof T | ((data: T) => string);
1293
+ fields?: (keyof T)[];
1294
+ data: DataSourceData<T>;
1295
+ selectionMode?: DataSourcePropSelectionMode;
1296
+ useGroupKeysForMultiRowSelection?: boolean;
1297
+ rowSelection?: DataSourcePropRowSelection_MultiRow | DataSourcePropRowSelection_SingleRow;
1298
+ defaultRowSelection?: DataSourcePropRowSelection_MultiRow | DataSourcePropRowSelection_SingleRow;
1299
+ cellSelection?: DataSourcePropCellSelection;
1300
+ defaultCellSelection?: DataSourcePropCellSelection;
1301
+ onCellSelectionChange?: DataSourcePropOnCellSelectionChange;
1302
+ isRowSelected?: DataSourcePropIsRowSelected<T>;
1303
+ lazyLoad?: boolean | {
1304
+ batchSize?: number;
1305
+ };
1306
+ loading?: boolean;
1307
+ defaultLoading?: boolean;
1308
+ onLoadingChange?: (loading: boolean) => void;
1309
+ pivotBy?: DataSourcePropPivotBy<T>;
1310
+ defaultPivotBy?: DataSourcePropPivotBy<T>;
1311
+ onPivotByChange?: (pivotBy: DataSourcePropPivotBy<T>) => void;
1312
+ aggregationReducers?: DataSourcePropAggregationReducers<T>;
1313
+ defaultAggregationReducers?: DataSourcePropAggregationReducers<T>;
1314
+ groupBy?: DataSourcePropGroupBy<T>;
1315
+ defaultGroupBy?: DataSourcePropGroupBy<T>;
1316
+ onGroupByChange?: (groupBy: DataSourcePropGroupBy<T>) => void;
1317
+ groupRowsState?: GroupRowsState | DataSourcePropGroupRowsStateObject<any>;
1318
+ defaultGroupRowsState?: GroupRowsState | DataSourcePropGroupRowsStateObject<keyof T>;
1319
+ onGroupRowsStateChange?: (groupRowsState: GroupRowsState) => void;
1320
+ collapseGroupRowsOnDataFunctionChange?: boolean;
1321
+ sortInfo?: DataSourceSortInfo<T>;
1322
+ defaultSortInfo?: DataSourceSortInfo<T>;
1323
+ onSortInfoChange?: ((sortInfo: DataSourceSingleSortInfo<T> | null) => void) | ((sortInfo: DataSourceSingleSortInfo<T>[]) => void);
1324
+ onDataParamsChange?: (dataParamsChange: DataSourceDataParams<T>) => void;
1325
+ livePagination?: boolean;
1326
+ livePaginationCursor?: DataSourcePropLivePaginationCursor<T>;
1327
+ onLivePaginationCursorChange?: (livePaginationCursor: DataSourceLivePaginationCursorValue) => void;
1328
+ filterFunction?: DataSourcePropFilterFunction<T>;
1329
+ sortMode?: 'local' | 'remote';
1330
+ filterMode?: 'local' | 'remote';
1331
+ filterValue?: DataSourcePropFilterValue<T>;
1332
+ defaultFilterValue?: DataSourcePropFilterValue<T>;
1333
+ onFilterValueChange?: (filterValue: DataSourcePropFilterValue<T>) => void;
1334
+ filterDelay?: number;
1335
+ filterTypes?: DataSourcePropFilterTypes<T>;
1336
+ sortTypes?: DataSourcePropSortTypes;
1337
+ } & ({
1338
+ selectionMode?: 'multi-row';
1339
+ rowSelection?: DataSourcePropRowSelection_MultiRow;
1340
+ defaultRowSelection?: DataSourcePropRowSelection_MultiRow;
1341
+ onRowSelectionChange?: DataSourcePropOnRowSelectionChange_MultiRow;
1342
+ } | {
1343
+ selectionMode?: 'single-row';
1344
+ rowSelection?: DataSourcePropRowSelection_SingleRow;
1345
+ defaultRowSelection?: DataSourcePropRowSelection_SingleRow;
1346
+ onRowSelectionChange?: DataSourcePropOnRowSelectionChange_SingleRow;
1347
+ } | {
1348
+ selectionMode?: 'single-cell';
1349
+ } | {
1350
+ selectionMode?: 'multi-cell';
1351
+ } | {
1352
+ selectionMode?: false;
1353
+ });
1354
+ declare type DataSourcePropSortTypes = Record<string, (first: any, second: any) => number>;
1355
+ declare type DataSourcePropFilterTypes<T> = Record<string, DataSourceFilterType<T>>;
1356
+ declare type DataSourceFilterFunctionParam<T> = {
1357
+ data: T;
1358
+ index: number;
1359
+ dataArray: T[];
1360
+ primaryKey: any;
1361
+ };
1362
+ declare type DataSourcePropFilterFunction<T> = (filterParam: DataSourceFilterFunctionParam<T>) => boolean;
1363
+ declare type DataSourcePropFilterValue<T> = DataSourceFilterValueItem<T>[];
1364
+ declare type DataSourceFilterValueItem<T> = DiscriminatedUnion<{
1365
+ field: keyof T;
1366
+ }, {
1367
+ id: string;
1368
+ }> & {
1369
+ valueGetter?: DataSourceFilterValueItemValueGetter<T>;
1370
+ filterValue: any;
1371
+ disabled?: boolean;
1372
+ filterType: string;
1373
+ operator: string;
1374
+ };
1375
+ declare type DataSourceFilterValueItemValueGetter<T> = (param: DataSourceFilterFunctionParam<T>) => any;
1376
+ declare type DataSourceFilterType<T> = {
1377
+ emptyValues: Set<any>;
1378
+ label?: string;
1379
+ defaultOperator: string;
1380
+ operators: DataSourceFilterOperator<T>[];
1381
+ };
1382
+ declare type DataSourceFilterOperator<T> = {
1383
+ name: string;
1384
+ label?: string;
1385
+ fn: DataSourceFilterOperatorFunction<T>;
1386
+ };
1387
+ declare type DataSourceFilterOperatorFunction<T> = (filterOperatorFunctionParam: DataSourceFilterOperatorFunctionParam<T>) => boolean;
1388
+ declare type DataSourceFilterOperatorFunctionParam<T> = {
1389
+ currentValue: any;
1390
+ filterValue: any;
1391
+ emptyValues: Set<any>;
1392
+ } & DataSourceFilterFunctionParam<T>;
1393
+ declare type DataSourcePropLivePaginationCursor<T> = DataSourceLivePaginationCursorValue | DataSourceLivePaginationCursorFn<T>;
1394
+ declare type DataSourceLivePaginationCursorFn<T> = (params: DataSourceLivePaginationCursorParams<T>) => DataSourceLivePaginationCursorValue;
1395
+ declare type DataSourceLivePaginationCursorParams<T> = {
1396
+ array: T[];
1397
+ lastItem: T | Partial<T> | null;
1398
+ length: number;
1399
+ };
1400
+ declare type DataSourceLivePaginationCursorValue = string | number | null;
1401
+ interface DataSourceState<T> extends DataSourceSetupState<T>, DataSourceDerivedState<T>, DataSourceMappedState<T> {
1402
+ }
1403
+ declare type DataSourceDerivedState<T> = {
1404
+ toPrimaryKey: (data: T) => any;
1405
+ operatorsByFilterType: Record<string, Record<string, DataSourceFilterOperator<T>>>;
1406
+ filterMode: NonUndefined<DataSourceProps<T>['filterMode']>;
1407
+ groupRowsState: GroupRowsState<T>;
1408
+ multiSort: boolean;
1409
+ controlledSort: boolean;
1410
+ controlledFilter: boolean;
1411
+ livePaginationCursor?: DataSourceLivePaginationCursorValue;
1412
+ lazyLoadBatchSize?: number;
1413
+ rowSelection: RowSelectionState | null | number | string;
1414
+ selectionMode: NonUndefined<DataSourceProps<T>['selectionMode']>;
1415
+ };
1416
+ declare type DataSourceComponentActions<T> = ComponentStateActions<DataSourceState<T>>;
1417
+ interface DataSourceContextValue<T> {
1418
+ getState: () => DataSourceState<T>;
1419
+ componentState: DataSourceState<T>;
1420
+ componentActions: DataSourceComponentActions<T>;
1421
+ }
1422
+ declare enum DataSourceActionType {
1423
+ INIT = "INIT"
1424
+ }
1425
+ interface DataSourceAction<T> {
1426
+ type: DataSourceActionType;
1427
+ payload: T;
1428
+ }
1429
+ interface DataSourceReducer<T> {
1430
+ (state: DataSourceState<T>, action: DataSourceAction<any>): DataSourceState<T>;
1431
+ }
1432
+
1433
+ declare const defaultFilterTypes: Record<string, DataSourceFilterType<any>>;
1434
+
1435
+ declare function useDataSource<T>(): DataSourceState<T>;
1436
+
1437
+ declare function DataSource<T>(props: DataSourceProps<T>): JSX.Element;
1438
+
1439
+ declare type AggregationReducer<T, AggregationResultType = any> = DataSourceAggregationReducer<T, AggregationResultType> & {
1440
+ id: string;
1441
+ };
1442
+ declare type AggregationReducerResult<AggregationResultType extends any = any> = AggregationResultType;
1443
+ /**
1444
+ * InfiniteTableRowInfo can have different object shape depending on the presence or absence of grouping.
1445
+ *
1446
+ * You can use `dataSourceHasGrouping: boolean` as a discriminator to determine the shape of the object, to know
1447
+ * if the dataSource had grouping or not. Furthermore, for when the dataSource has grouping,
1448
+ * you can use `isGroupRow: boolean` to discriminate between group rows vs normal rows.
1449
+ *
1450
+ */
1451
+ declare type InfiniteTableRowInfo<T> = InfiniteTable_HasGrouping_RowInfoNormal<T> | InfiniteTable_HasGrouping_RowInfoGroup<T> | InfiniteTable_NoGrouping_RowInfoNormal<T>;
1452
+ declare type InfiniteTableRowInfoDataDiscriminator_RowInfoNormal<T> = {
1453
+ data: T;
1454
+ isGroupRow: false;
1455
+ rowActive: boolean;
1456
+ rowInfo: InfiniteTable_NoGrouping_RowInfoNormal<T> | InfiniteTable_HasGrouping_RowInfoNormal<T>;
1457
+ field?: keyof T;
1458
+ value: any;
1459
+ rowSelected: boolean | null;
1460
+ };
1461
+ declare type InfiniteTableRowInfoDataDiscriminator_RowInfoGroup<T> = {
1462
+ rowActive: boolean;
1463
+ data: Partial<T> | null;
1464
+ rowInfo: InfiniteTable_HasGrouping_RowInfoGroup<T>;
1465
+ isGroupRow: true;
1466
+ field?: keyof T;
1467
+ value: any;
1468
+ rowSelected: boolean | null;
1469
+ };
1470
+ declare type InfiniteTableRowInfoDataDiscriminator<T> = InfiniteTableRowInfoDataDiscriminator_RowInfoNormal<T> | InfiniteTableRowInfoDataDiscriminator_RowInfoGroup<T>;
1471
+ /**
1472
+ * This is the base row info for all scenarios - things every
1473
+ * rowInfo is guaranteed to have (be it group or normal row, or dataSource with or without grouping)
1474
+ *
1475
+ */
1476
+ declare type InfiniteTable_RowInfoBase<_T> = {
1477
+ id: any;
1478
+ value?: any;
1479
+ indexInAll: number;
1480
+ rowSelected: boolean | null;
1481
+ };
1482
+ declare type InfiniteTable_HasGrouping_RowInfoNormal<T> = {
1483
+ dataSourceHasGrouping: true;
1484
+ data: T;
1485
+ isGroupRow: false;
1486
+ } & InfiniteTable_HasGrouping_RowInfoBase<T> & InfiniteTable_RowInfoBase<T>;
1487
+ declare type InfiniteTable_HasGrouping_RowInfoGroup<T> = {
1488
+ dataSourceHasGrouping: true;
1489
+ data: Partial<T> | null;
1490
+ isGroupRow: true;
1491
+ /**
1492
+ * This array contains all the (uncollapsed, so visible) row infos under this group, at any level of nesting,
1493
+ * in the order in which they are visible in the table
1494
+ */
1495
+ deepRowInfoArray: (InfiniteTable_HasGrouping_RowInfoNormal<T> | InfiniteTable_HasGrouping_RowInfoGroup<T>)[];
1496
+ error?: string;
1497
+ reducerResults?: Record<string, AggregationReducerResult>;
1498
+ /**
1499
+ * The count of all leaf nodes (normal rows) that are inside this group.
1500
+ * This count is the same as the length of the groupData array property.
1501
+ *
1502
+ */
1503
+ groupCount: number;
1504
+ /**
1505
+ * The array of all leaf nodes (normal rows) that are inside this group.
1506
+ */
1507
+ groupData: T[];
1508
+ /**
1509
+ * The count of all selected leaf nodes (normal rows) inside the group that are selected
1510
+ */
1511
+ selectedChildredCount: number;
1512
+ /**
1513
+ * The count of all deselected leaf nodes (normal rows) inside the group that are selected
1514
+ */
1515
+ deselectedChildredCount: number;
1516
+ /**
1517
+ * Will be used only with lazy loading, if the server provides this info on the data items.
1518
+ *
1519
+ * Represents the total count of all leaf nodes (normal rows) that are under this group
1520
+ * at any level (so not only direct children). This is needed for multiple selection to work properly,
1521
+ * so the table component knows how many rows are on the remote backend, and whether to show a group as selected or not
1522
+ * when it has a certain number of rows selected
1523
+ */
1524
+ totalChildrenCount?: number;
1525
+ /**
1526
+ * The count of all leaf nodes (normal rows) inside the group that are not being visible
1527
+ * due to collapsing (either the current row is collapsed or any of its children)
1528
+ */
1529
+ collapsedChildrenCount: number;
1530
+ collapsedGroupsCount: number;
1531
+ /**
1532
+ * The count of the direct children of the current group. Direct children can be either normal rows or groups.
1533
+ */
1534
+ directChildrenCount: number;
1535
+ directChildrenLoadedCount: number;
1536
+ /**
1537
+ *
1538
+ * A DeepMap of pivot values.
1539
+ *
1540
+ * For each pivot reducer result, it contains all the items that make up the pivot value.
1541
+ *
1542
+ */
1543
+ pivotValuesMap?: PivotValuesDeepMap<T, any>;
1544
+ /**
1545
+ * For non-lazy grouping, this is always true.
1546
+ * For lazy/batched grouping, this is true if the group has been expanded at least once (and if the remote call has been configured with cache: true),
1547
+ * since if the remote call is not cached, collapsing the row group should lose all the data that was loaded for it, and it's as if it was never loaded, so in that case, childrenAvailable is false.
1548
+ *
1549
+ * NOTE: if this is true, it doesn't mean that all the children have been loaded, it only means that some children have been loaded and are available
1550
+ *
1551
+ * Use directChildrenCount and directChildrenLoadedCount to know if all the children have been loaded or not.
1552
+ */
1553
+ childrenAvailable: boolean;
1554
+ /**
1555
+ * Boolean flag that will be true while lazy loading direct children of the current row group.
1556
+ *
1557
+ * NOTE: with batched loading, if the user is no longer scrolling, after everything
1558
+ * in the viewport has loaded (and thus for example a certain row group had childrenLoading: true)
1559
+ * if no new batches are being loaded, childrenLoading will be false again, even though
1560
+ * the current row group still has children that are not loaded yet.
1561
+ * Use directChildrenLoadedCount and directChildrenCount to know if all the children have been loaded or not.
1562
+ */
1563
+ childrenLoading: boolean;
1564
+ } & InfiniteTable_HasGrouping_RowInfoBase<T> & InfiniteTable_RowInfoBase<T>;
1565
+ declare type InfiniteTable_NoGrouping_RowInfoNormal<T> = {
1566
+ dataSourceHasGrouping: false;
1567
+ data: T;
1568
+ isGroupRow: false;
1569
+ selfLoaded: boolean;
1570
+ } & InfiniteTable_RowInfoBase<T>;
1571
+ declare type InfiniteTable_HasGrouping_RowInfoBase<T> = {
1572
+ indexInGroup: number;
1573
+ /**
1574
+ * Available on all rowInfo objects when the datasource is grouped, otherwise, it will be undefined.
1575
+ *
1576
+ * For group rows, the group keys will have all the keys starting from the topmost parent
1577
+ * down to the current group row (including the group row).
1578
+ * For normal rows, the group keys will have all the keys starting from the topmost parent
1579
+ * down to the last group row in the hierarchy (the direct parent of the current row).
1580
+ *
1581
+ * Example: People grouped by country and city
1582
+ *
1583
+ * Italy - country - groupKeys: ['Italy']
1584
+ * Rome - city - groupKeys: ['Italy', 'Rome']
1585
+ * Marco - person - groupKeys: ['Italy', 'Rome']
1586
+ * Luca - person - groupKeys: ['Italy', 'Rome']
1587
+ * Giuseppe - person - groupKeys: ['Italy', 'Rome']
1588
+ *
1589
+ */
1590
+ groupKeys: any[];
1591
+ /**
1592
+ * Available on all rowInfo objects when the datasource is grouped, otherwise, it will be undefined.
1593
+ *
1594
+ * Has the same structure as groupKeys, but it will contain the fields used to group the rows.
1595
+ *
1596
+ * Example: People grouped by country and city
1597
+ *
1598
+ * Italy - country - groupKeys: ['country']
1599
+ * Rome - city - groupKeys: ['country', 'city']
1600
+ * Marco - person - groupKeys: ['country', 'city']
1601
+ * Luca - person - groupKeys: ['country', 'city']
1602
+ * Giuseppe - person - groupKeys: ['country', 'city']
1603
+ */
1604
+ groupBy: (keyof T)[];
1605
+ /**
1606
+ * The groupBy value of the DataSource component, mapped to the groupBy.field
1607
+ */
1608
+ rootGroupBy: (keyof T)[];
1609
+ /**
1610
+ * Available on all rowInfo objects when the datasource is grouped.
1611
+ *
1612
+ * Italy - country - parent mapped to their ids will be: [] // rowInfo.parents.map((p: any) => p.id)
1613
+ * Rome - city - parent mapped to their ids will be: ['Italy']
1614
+ * Marco - person - parent mapped to their ids will be: ['Italy','Italy,Rome']
1615
+ * Luca - person - parent mapped to their ids will be: ['Italy','Italy,Rome']
1616
+ * Giuseppe - person - parent mapped to their ids will be: ['Italy','Italy,Rome']
1617
+ * USA - country - parent mapped to their ids will be: []
1618
+ * LA - city - parent mapped to their ids will be: ['USA']
1619
+ * Bob - person - parent mapped to their ids will be: ['USA','USA,LA']
1620
+ */
1621
+ parents: InfiniteTable_HasGrouping_RowInfoGroup<T>[];
1622
+ /**
1623
+ * Available when the datasource is grouped, this will be set for both group and normal rows.
1624
+ * Italy - country - indexInParentGroups: [0]
1625
+ * Rome - city - indexInParentGroups: [0,0]
1626
+ * Marco - person - indexInParentGroups: [0,0,0]
1627
+ * Luca - person - indexInParentGroups: [0,0,1]
1628
+ * Giuseppe - person - indexInParentGroups: [0,0,2]
1629
+ * USA - country - indexInParentGroups: [1]
1630
+ * LA - city - indexInParentGroups: [1,0]
1631
+ * Bob - person - indexInParentGroups: [1,0,2]
1632
+ */
1633
+ indexInParentGroups: number[];
1634
+ /**
1635
+ * Available on all rowInfo objects when the datasource is grouped.
1636
+ *
1637
+ * For every rowInfo object, it counts the number of leaf/normal rows that the group contains.
1638
+ * For normal rows, the groupCount represents the groupCount of the direct parent.
1639
+ *
1640
+ * Italy - country - groupCount: 3
1641
+ * Rome - city - groupCount: 2
1642
+ * Marco - person - groupCount: 2
1643
+ * Luca - person - groupCount: 2
1644
+ * Napoli - city - groupCount: 1
1645
+ * Giuseppe - person - groupCount: 1
1646
+ * USA - country - groupCount: 1
1647
+ * LA - city - groupCount: 1
1648
+ * Bob - person - groupCount: 1
1649
+ */
1650
+ groupCount: number;
1651
+ groupNesting: number;
1652
+ collapsed: boolean;
1653
+ /**
1654
+ * This is false only when the DataSource is configured with lazy batching and the current
1655
+ * row has not been loaded yet. It has nothing to do with children, only with self.
1656
+ */
1657
+ selfLoaded: boolean;
1658
+ };
1659
+ declare type GroupKeyType<T extends any = any> = T;
1660
+ declare type PivotReducerResults<T = any> = Record<string, AggregationReducerResult<T>>;
1661
+ declare type PivotGroupValueType<DataType, KeyType> = {
1662
+ reducerResults: PivotReducerResults<KeyType>;
1663
+ items: DataType[];
1664
+ };
1665
+ declare type PivotValuesDeepMap<DataType, KeyType> = DeepMap<GroupKeyType<KeyType>, PivotGroupValueType<DataType, KeyType>>;
1666
+ declare type DeepMapGroupValueType<DataType, KeyType> = {
1667
+ /**
1668
+ * These are leaf items. This array may be empty when there is batched lazy loading
1669
+ */
1670
+ items: DataType[];
1671
+ commonData?: Partial<DataType>;
1672
+ childrenLoading: boolean;
1673
+ childrenAvailable: boolean;
1674
+ totalChildrenCount?: number;
1675
+ cache: boolean;
1676
+ error?: string;
1677
+ reducerResults: Record<string, AggregationReducerResult>;
1678
+ pivotDeepMap?: DeepMap<GroupKeyType<KeyType>, PivotGroupValueType<DataType, KeyType>>;
1679
+ };
1680
+ declare type PivotBy<DataType, KeyType> = Omit<GroupBy<DataType, KeyType>, 'column'> & {
1681
+ column?: ColumnTypeWithInherit<Partial<InfiniteTableColumn<DataType>>> | (({ column, }: {
1682
+ column: InfiniteTablePivotFinalColumnVariant<DataType, KeyType>;
1683
+ }) => Partial<InfiniteTablePivotColumn<DataType>>);
1684
+ columnGroup?: InfiniteTableColumnGroup | (({ columnGroup, }: {
1685
+ columnGroup: InfiniteTablePivotFinalColumnGroup<DataType, KeyType>;
1686
+ }) => ColumnTypeWithInherit<Partial<InfiniteTablePivotFinalColumnGroup<DataType>>>);
1687
+ };
1688
+ declare type GroupParams<DataType, KeyType> = {
1689
+ groupBy: GroupBy<DataType, KeyType>[];
1690
+ defaultToKey?: (value: any, item: DataType) => GroupKeyType<KeyType>;
1691
+ pivot?: PivotBy<DataType, KeyType>[];
1692
+ reducers?: Record<string, DataSourceAggregationReducer<DataType, any>>;
1693
+ };
1694
+ declare type DataGroupResult<DataType, KeyType extends any> = {
1695
+ deepMap: DeepMap<GroupKeyType<KeyType>, DeepMapGroupValueType<DataType, KeyType>>;
1696
+ groupParams: GroupParams<DataType, KeyType>;
1697
+ initialData: DataType[];
1698
+ reducerResults?: Record<string, AggregationReducerResult>;
1699
+ topLevelPivotColumns?: DeepMap<GroupKeyType<KeyType>, boolean>;
1700
+ pivot?: PivotBy<DataType, KeyType>[];
1701
+ };
1702
+ declare function group<DataType, KeyType = any>(groupParams: GroupParams<DataType, KeyType>, data: DataType[]): DataGroupResult<DataType, KeyType>;
1703
+ declare function flatten<DataType, KeyType extends any>(groupResult: DataGroupResult<DataType, KeyType>): DataType[];
1704
+
1705
+ declare type InfiniteCheckBoxPropChecked = true | false | null;
1706
+ declare type InfiniteCheckBoxProps = {
1707
+ disabled?: boolean;
1708
+ checked?: InfiniteCheckBoxPropChecked;
1709
+ defaultChecked?: InfiniteCheckBoxPropChecked;
1710
+ onChange?: (checked: InfiniteCheckBoxPropChecked) => void;
1711
+ domProps?: React$1.HTMLProps<HTMLElement>;
1712
+ };
1713
+ declare function InfiniteCheckBox(props: InfiniteCheckBoxProps): JSX.Element;
1714
+
1715
+ declare type ArrayOfIds = Pick<InfiniteTable_RowInfoBase<any>, 'id'>[];
1716
+ declare type InfiniteTableSelectionApi = {
1717
+ get allRowsSelected(): boolean;
1718
+ isRowSelected(pk: any, groupKeys?: any[]): boolean;
1719
+ isRowDeselected(pk: any, groupKeys?: any[]): boolean;
1720
+ selectRow(pk: any, groupKeys?: any[]): void;
1721
+ deselectRow(pk: any, groupKeys?: any[]): void;
1722
+ toggleRowSelection(pk: any, groupKeys?: any[]): void;
1723
+ selectGroupRow(groupKeys: any[], children?: ArrayOfIds): void;
1724
+ deselectGroupRow(groupKeys: any[], children?: ArrayOfIds): void;
1725
+ toggleGroupRowSelection(groupKeys: any[], children?: ArrayOfIds): void;
1726
+ getGroupRowSelectionState(groupKeys: any[]): boolean | null;
1727
+ getSelectedPrimaryKeys(rowSelection?: RowSelectionStateObject): (string | number)[];
1728
+ selectAll(): void;
1729
+ deselectAll(): void;
1730
+ };
1731
+
1732
+ declare type PointCoords = {
1733
+ top: number;
1734
+ left: number;
1735
+ };
1736
+
1737
+ declare type CoordsWithSize = {
1738
+ width: number;
1739
+ height: number;
1740
+ left: number;
1741
+ top: number;
1742
+ };
1743
+ declare type CoordsNoSize = {
1744
+ right: number;
1745
+ bottom: number;
1746
+ left: number;
1747
+ top: number;
1748
+ };
1749
+ declare type RectangleCoords = CoordsWithSize | CoordsNoSize;
1750
+
1751
+ declare type Alignable = RectangleCoords | HTMLElement | DOMRect;
1752
+ declare type AlignPositionEnum = 'TopLeft' | 'TopCenter' | 'TopRight' | 'CenterRight' | 'BottomRight' | 'BottomCenter' | 'BottomLeft' | 'CenterLeft' | 'Center';
1753
+ declare type AlignPositionItem = [AlignPositionEnum, AlignPositionEnum];
1754
+ declare type AlignPositionOptions = {
1755
+ alignPosition: AlignPositionItem[];
1756
+ constrainTo?: Alignable;
1757
+ alignAnchor: Alignable;
1758
+ alignTarget: Alignable;
1759
+ };
1760
+
1761
+ declare type OverlayParams = {
1762
+ portalContainer?: ElementContainerGetter | null | false;
1763
+ constrainTo?: OverlayShowParams['constrainTo'];
1764
+ };
1765
+ declare type ElementContainerGetter = (() => HTMLElement | string | Promise<HTMLElement | string>) | string | HTMLElement | Promise<HTMLElement | string>;
1766
+ declare type AdvancedAlignable = Alignable | ElementContainerGetter;
1767
+ /**
1768
+ * If portal container is given, it will create a React portal from that element
1769
+ * otherwise it will simply render another node as portal
1770
+ *
1771
+ * @param portalContainer
1772
+ */
1773
+ declare function useOverlayPortal(content: ReactNode, portalContainer?: ElementContainerGetter | null | false): string | number | boolean | JSX.Element | React$1.ReactFragment | null | undefined;
1774
+ declare type OverlayShowParams = {
1775
+ id?: string | number;
1776
+ constrainTo?: AdvancedAlignable | boolean;
1777
+ alignPosition: AlignPositionOptions['alignPosition'];
1778
+ alignTo: AdvancedAlignable | PointCoords;
1779
+ };
1780
+ declare function useOverlay(params: OverlayParams): {
1781
+ portal: string | number | boolean | JSX.Element | React$1.ReactFragment | null | undefined;
1782
+ hideOverlay: (id: string) => void;
1783
+ clearAll: () => void;
1784
+ rerenderOverlays: () => void;
1785
+ showOverlay: (content: ReactNode | (() => ReactNode), params: OverlayShowParams) => (() => void) | undefined;
1786
+ };
1787
+
1788
+ /**
1789
+
1790
+ We have this utility - it's used in Menu Renderable declaration
1791
+ because:
1792
+
1793
+ type Renderable = React.ReactNode;
1794
+
1795
+ const x: Renderable = <div />;
1796
+ const y: Renderable = {};
1797
+
1798
+ we don't want to allow the above `y` as a valid declaration
1799
+
1800
+ it breaks some types in the Menu component as well
1801
+
1802
+ */
1803
+ declare type RemoveObject<T> = T extends null | undefined ? T : T extends unknown ? keyof T extends never ? never : T : never;
1804
+
1805
+ declare type MenuSetupState = {
1806
+ domRef: MutableRefObject<HTMLDivElement | null>;
1807
+ keyboardActiveItemKey: string | null;
1808
+ activeItemKey: string | null;
1809
+ generatedId: string;
1810
+ focused: boolean;
1811
+ destroyed: boolean;
1812
+ };
1813
+ declare type MenuDerivedState = {
1814
+ runtimeItems: MenuRuntimeItem[];
1815
+ runtimeSelectableItems: MenuRuntimeItemSelectable[];
1816
+ columns: MenuColumn[];
1817
+ menuId: string;
1818
+ };
1819
+ declare type MenuMappedState = {
1820
+ parentMenuId: MenuProps['parentMenuId'];
1821
+ parentMenuItemKey: MenuProps['parentMenuItemKey'];
1822
+ constrainTo: MenuProps['constrainTo'];
1823
+ autoFocus: MenuProps['autoFocus'];
1824
+ onHideIntent: MenuProps['onHideIntent'];
1825
+ onAction: MenuProps['onAction'];
1826
+ onShow: MenuProps['onShow'];
1827
+ onHide: MenuProps['onHide'];
1828
+ wrapLabels: MenuProps['wrapLabels'];
1829
+ };
1830
+ interface MenuState extends MenuMappedState, MenuDerivedState, MenuSetupState {
1831
+ }
1832
+ declare type MenuApi = {
1833
+ focus: VoidFunction;
1834
+ getMenuId: () => string;
1835
+ getParentMenuId: () => string | undefined;
1836
+ };
1837
+
1838
+ declare type MenuRenderable = string | number | RemoveObject<Renderable>;
1839
+ declare type MenuRuntimeItemSelectable = {
1840
+ type: 'item';
1841
+ key: string;
1842
+ parentMenuId: string;
1843
+ active: boolean;
1844
+ keyboardActive: boolean;
1845
+ value: MenuItemObject;
1846
+ style?: CSSProperties;
1847
+ className?: string;
1848
+ disabled: boolean;
1849
+ span: number;
1850
+ menu: MenuProps | (() => MenuProps) | null;
1851
+ originalMenuItem: MenuItemObject;
1852
+ };
1853
+ declare type MenuRuntimeItem = MenuRuntimeItemSelectable | {
1854
+ type: 'decoration';
1855
+ value: MenuDecoration;
1856
+ style: CSSProperties;
1857
+ span: number;
1858
+ };
1859
+ declare type MenuChildrenFnParam = {
1860
+ item: MenuRuntimeItem;
1861
+ column: MenuColumn;
1862
+ columns: MenuColumn[];
1863
+ };
1864
+ declare type MenuProps = {
1865
+ id?: string;
1866
+ portalContainer?: ElementContainerGetter | false | null;
1867
+ items?: MenuItemDefinition[];
1868
+ constrainTo?: OverlayShowParams['constrainTo'];
1869
+ columns?: MenuColumn[];
1870
+ children?: MenuRenderable;
1871
+ wrapLabels?: boolean;
1872
+ onShow?: (state: MenuState, api: MenuApi) => void;
1873
+ onHide?: (state: MenuState) => void;
1874
+ onHideIntent?: (state: MenuState) => void;
1875
+ bubbleActionsFromSubmenus?: boolean;
1876
+ addSubmenuColumnIfNeeded?: boolean;
1877
+ onAction?: (key: string, item: MenuItemObject) => void;
1878
+ parentMenuId?: string;
1879
+ parentMenuItemKey?: string;
1880
+ autoFocus?: boolean;
1881
+ };
1882
+ declare type MenuSeparator = '-';
1883
+ declare type MenuItemDefinition = MenuItemObject | MenuDecoration | MenuSeparator;
1884
+ declare type MenuItemSubMenu = Omit<MenuProps, 'children' | 'items'> & {
1885
+ items: (MenuItemObject | MenuSeparator)[];
1886
+ };
1887
+ declare type MenuItemObject = {
1888
+ key: string;
1889
+ label: NonUndefined<MenuRenderable>;
1890
+ span?: number;
1891
+ description?: MenuRenderable;
1892
+ disabled?: boolean;
1893
+ menu?: MenuItemSubMenu | (() => MenuItemSubMenu);
1894
+ style?: CSSProperties;
1895
+ className?: string;
1896
+ onClick?: (event: React.MouseEvent) => void;
1897
+ onAction?: (key: string, item: MenuItemObject) => void;
1898
+ [k: string]: any;
1899
+ };
1900
+ declare type MenuDecoration = MenuRenderable;
1901
+ declare type MenuColumn = {
1902
+ flex?: number;
1903
+ width?: string | number;
1904
+ style?: CSSProperties;
1905
+ name: string;
1906
+ field?: string;
1907
+ render?: (param: MenuColumnRenderParam) => MenuRenderable;
1908
+ };
1909
+ declare type MenuColumnRenderParam = {
1910
+ item: MenuItemObject;
1911
+ column: MenuColumn;
1912
+ value: MenuRenderable;
1913
+ domProps: HTMLProps<HTMLDivElement>;
1914
+ };
1915
+
1916
+ declare type LoadMaskProps = {
1917
+ visible: boolean;
1918
+ children: Renderable;
1919
+ };
1920
+ declare type InfiniteTablePropColumnOrderNormalized = string[];
1921
+ declare type InfiniteTablePropColumnOrder = InfiniteTablePropColumnOrderNormalized | true;
1922
+ declare type InfiniteTablePropColumnVisibility = Record<string, false>;
1923
+ declare type InfiniteTableColumnPinnedValues = false | 'start' | 'end';
1924
+ declare type InfiniteTablePropColumnPinning = Record<string, true | 'start' | 'end'>;
1925
+ declare type InfiniteTableRowStyleFnParams<T> = {
1926
+ rowIndex: number;
1927
+ } & InfiniteTableRowInfoDataDiscriminator<T>;
1928
+ declare type InfiniteTableRowStyleFn<T> = (params: InfiniteTableRowStyleFnParams<T>) => undefined | React$1.CSSProperties;
1929
+ declare type InfiniteTableRowClassNameFn<T> = (params: InfiniteTableRowStyleFnParams<T>) => string | undefined;
1930
+ declare type InfiniteTablePropRowStyle<T> = React$1.CSSProperties | InfiniteTableRowStyleFn<T>;
1931
+ declare type InfiniteTablePropRowClassName<T> = string | InfiniteTableRowClassNameFn<T>;
1932
+ declare type InfiniteTableColumnAggregator<T, AggregationResultType> = Omit<AggregationReducer<T, AggregationResultType>, 'getter' | 'id'> & {
1933
+ getter?: AggregationReducer<T, AggregationResultType>['getter'];
1934
+ field?: keyof T;
1935
+ };
1936
+ declare type InfiniteTableColumnType<T> = {
1937
+ minWidth?: number;
1938
+ maxWidth?: number;
1939
+ filterType?: string;
1940
+ sortType?: string;
1941
+ dataType?: InfiniteTableDataTypeNames;
1942
+ defaultWidth?: number;
1943
+ defaultFlex?: number;
1944
+ defaultPinned?: InfiniteTableColumnPinnedValues;
1945
+ defaultFilterable?: boolean;
1946
+ defaultHiddenWhenGroupedBy?: InfiniteTableColumn<T>['defaultHiddenWhenGroupedBy'];
1947
+ header?: InfiniteTableColumn<T>['header'];
1948
+ comparer?: InfiniteTableColumn<T>['comparer'];
1949
+ draggable?: InfiniteTableColumn<T>['draggable'];
1950
+ sortable?: InfiniteTableColumn<T>['sortable'];
1951
+ resizable?: InfiniteTableColumn<T>['resizable'];
1952
+ align?: InfiniteTableColumn<T>['align'];
1953
+ verticalAlign?: InfiniteTableColumn<T>['verticalAlign'];
1954
+ columnGroup?: string;
1955
+ cssEllipsis?: boolean;
1956
+ headerCssEllipsis?: boolean;
1957
+ field?: KeyOfNoSymbol<T>;
1958
+ components?: InfiniteTableColumn<T>['components'];
1959
+ renderMenuIcon?: InfiniteTableColumn<T>['renderMenuIcon'];
1960
+ renderSortIcon?: InfiniteTableColumn<T>['renderSortIcon'];
1961
+ renderSelectionCheckBox?: InfiniteTableColumn<T>['renderSelectionCheckBox'];
1962
+ renderHeaderSelectionCheckBox?: InfiniteTableColumn<T>['renderHeaderSelectionCheckBox'];
1963
+ renderValue?: InfiniteTableColumn<T>['renderValue'];
1964
+ render?: InfiniteTableColumn<T>['render'];
1965
+ valueGetter?: InfiniteTableColumn<T>['valueGetter'];
1966
+ valueFormatter?: InfiniteTableColumn<T>['valueFormatter'];
1967
+ style?: InfiniteTableColumn<T>['style'];
1968
+ headerStyle?: InfiniteTableColumn<T>['headerStyle'];
1969
+ headerClassName?: InfiniteTableColumn<T>['headerClassName'];
1970
+ };
1971
+ declare type InfiniteTablePropColumnTypes<T> = Record<'default' | string, InfiniteTableColumnType<T>>;
1972
+ declare type InfiniteTableColumnSizingOptions = {
1973
+ flex?: number;
1974
+ width?: number;
1975
+ minWidth?: number;
1976
+ maxWidth?: number;
1977
+ };
1978
+ declare type InfiniteTablePropColumnSizing = Record<string, InfiniteTableColumnSizingOptions>;
1979
+ declare type InfiniteTableApi<T> = {
1980
+ get selectionApi(): InfiniteTableSelectionApi;
1981
+ setColumnOrder: (columnOrder: InfiniteTablePropColumnOrder) => void;
1982
+ setColumnVisibility: (columnVisibility: InfiniteTablePropColumnVisibility) => void;
1983
+ x?: T;
1984
+ get scrollLeft(): number;
1985
+ set scrollLeft(value: number);
1986
+ get scrollTop(): number;
1987
+ set scrollTop(value: number);
1988
+ toggleGroupRow: (groupKeys: any[]) => void;
1989
+ collapseGroupRow: (groupKeys: any[]) => boolean;
1990
+ expandGroupRow: (groupKeys: any[]) => boolean;
1991
+ setSortInfoForColumn: (columnId: string, sortInfo: DataSourceSingleSortInfo<T> | null) => void;
1992
+ setPinningForColumn: (columnId: string, pinning: InfiniteTableColumnPinnedValues) => void;
1993
+ setSortingForColumn: (columnId: string, dir: SortDir | null) => void;
1994
+ setVisibilityForColumn: (columnId: string, visible: boolean) => void;
1995
+ getVisibleColumnsCount: () => number;
1996
+ scrollRowIntoView: (rowIndex: number, config?: {
1997
+ scrollAdjustPosition?: ScrollAdjustPosition;
1998
+ offset?: number;
1999
+ }) => boolean;
2000
+ scrollColumnIntoView: (colId: string, config?: {
2001
+ scrollAdjustPosition?: ScrollAdjustPosition;
2002
+ offset?: number;
2003
+ }) => boolean;
2004
+ scrollCellIntoView: (rowIndex: number, colIdOrIndex: string | number, config?: {
2005
+ scrollAdjustPosition?: ScrollAdjustPosition;
2006
+ offset?: number;
2007
+ }) => boolean;
2008
+ getState: () => InfiniteTableState<T>;
2009
+ getDataSourceState: () => DataSourceState<T>;
2010
+ };
2011
+ declare type InfiniteTablePropVirtualizeColumns<T> = boolean | ((columns: InfiniteTableComputedColumn<T>[]) => boolean);
2012
+ declare type InfiniteTableColumnsMap<T, ColumnType = InfiniteTableColumn<T>> = Map<string, ColumnType>;
2013
+ declare type InfiniteTablePropColumns<T, ColumnType = InfiniteTableColumn<T>> = Record<string, ColumnType> | InfiniteTableColumnsMap<T, ColumnType>;
2014
+ declare type InfiniteTablePropColumnGroupsMap = Map<string, InfiniteTableColumnGroup>;
2015
+ declare type InfiniteTablePropColumnGroupsRecord = Record<string, InfiniteTableColumnGroup>;
2016
+ declare type InfiniteTablePropColumnGroups = InfiniteTablePropColumnGroupsRecord | InfiniteTablePropColumnGroupsMap;
2017
+ declare type InfiniteTablePropCollapsedColumnGroups = Map<string[], string>;
2018
+ declare type InfiniteTableColumnGroupHeaderRenderParams = {
2019
+ columnGroup: InfiniteTableComputedColumnGroup;
2020
+ };
2021
+ declare type InfiniteTableColumnGroupHeaderRenderFunction = (params: InfiniteTableColumnGroupHeaderRenderParams) => Renderable;
2022
+ declare type InfiniteTableColumnGroup = {
2023
+ columnGroup?: string;
2024
+ header?: Renderable | InfiniteTableColumnGroupHeaderRenderFunction;
2025
+ };
2026
+ declare type InfiniteTableComputedColumnGroup = InfiniteTableColumnGroup & {
2027
+ id: string;
2028
+ groupOffset: number;
2029
+ computedWidth: number;
2030
+ uniqueGroupId: string[];
2031
+ columns: string[];
2032
+ depth: number;
2033
+ };
2034
+ declare type InfiniteTableGroupColumnGetterOptions<T> = {
2035
+ groupIndexForColumn?: number;
2036
+ groupByForColumn?: DataSourceGroupBy<T>;
2037
+ selectionMode: DataSourcePropSelectionMode;
2038
+ groupRenderStrategy: InfiniteTablePropGroupRenderStrategy;
2039
+ groupCount: number;
2040
+ groupBy: DataSourceGroupBy<T>[];
2041
+ pivotBy?: DataSourcePivotBy<T>[];
2042
+ sortable?: boolean;
2043
+ };
2044
+ declare type InfiniteTablePivotColumnGetterOptions<T, COL_TYPE = InfiniteTableColumn<T>> = {
2045
+ column: COL_TYPE;
2046
+ groupBy: DataSourcePropGroupBy<T>;
2047
+ pivotBy: DataSourcePropPivotBy<T>;
2048
+ };
2049
+ declare type InfiniteTablePropGroupRenderStrategy = 'single-column' | 'multi-column' | 'inline';
2050
+ declare type InfiniteTableGroupColumnBase<T> = Partial<InfiniteTableColumn<T>> & {
2051
+ renderGroupIcon?: InfiniteTableColumnRenderFunctionForGroupRows<T>;
2052
+ id?: string;
2053
+ };
2054
+ declare type InfiniteTablePivotColumnBase<T> = InfiniteTableColumn<T> & {
2055
+ renderValue?: InfiniteTableColumnRenderFunction<T, InfiniteTableComputedPivotFinalColumn<T>>;
2056
+ };
2057
+ declare type InfiniteTablePropGroupColumn<T> = InfiniteTableGroupColumnBase<T> | InfiniteTableGroupColumnFunction<T>;
2058
+ declare type InfiniteTableGroupColumnFunction<T> = (options: InfiniteTableGroupColumnGetterOptions<T>, toggleGroupRow: (groupKeys: any[]) => void) => Partial<InfiniteTableGroupColumnBase<T>>;
2059
+ declare type InfiniteTablePropPivotColumn<T, COL_TYPE = InfiniteTableColumn<T>> = Partial<InfiniteTablePivotColumnBase<T>> | ((options: InfiniteTablePivotColumnGetterOptions<T, COL_TYPE>) => InfiniteTablePivotColumnBase<T>);
2060
+ declare type InfiniteTablePropComponents = {
2061
+ LoadMask?: React$1.FC<React$1.PropsWithChildren<LoadMaskProps>>;
2062
+ CheckBox?: React$1.FC<InfiniteCheckBoxProps>;
2063
+ Menu?: React$1.FC<React$1.PropsWithChildren<MenuProps>>;
2064
+ };
2065
+ declare type ScrollStopInfo = {
2066
+ scrollTop: number;
2067
+ firstVisibleRowIndex: number;
2068
+ lastVisibleRowIndex: number;
2069
+ };
2070
+ declare type InfiniteTablePropFilterEditors<T> = Record<string, React$1.FC<InfiniteTableFilterEditorProps<T>>>;
2071
+ declare type InfiniteTableFilterEditorProps<T extends any> = {
2072
+ filterType: string;
2073
+ operator: string;
2074
+ ariaLabel: string;
2075
+ filterValue: T;
2076
+ className: string;
2077
+ onChange: (value: T | undefined) => void;
2078
+ };
2079
+ interface InfiniteTableProps<T> {
2080
+ columns: InfiniteTablePropColumns<T>;
2081
+ pivotColumns?: InfiniteTableColumnsMap<T, InfiniteTablePivotColumn<T>>;
2082
+ loadingText?: Renderable;
2083
+ components?: InfiniteTablePropComponents;
2084
+ viewportReservedWidth?: number;
2085
+ onViewportReservedWidthChange?: (viewportReservedWidth: number) => void;
2086
+ pivotColumn?: InfiniteTablePropPivotColumn<T, InfiniteTableColumn<T> & InfiniteTablePivotFinalColumn<T>>;
2087
+ pivotTotalColumnPosition?: InfiniteTablePropPivotTotalColumnPosition;
2088
+ pivotGrandTotalColumnPosition?: InfiniteTablePropPivotGrandTotalColumnPosition;
2089
+ groupColumn?: Partial<InfiniteTablePropGroupColumn<T>>;
2090
+ groupRenderStrategy?: InfiniteTablePropGroupRenderStrategy;
2091
+ hideEmptyGroupColumns?: boolean;
2092
+ columnVisibility?: InfiniteTablePropColumnVisibility;
2093
+ defaultColumnVisibility?: InfiniteTablePropColumnVisibility;
2094
+ pinnedStartMaxWidth?: number;
2095
+ pinnedEndMaxWidth?: number;
2096
+ columnPinning?: InfiniteTablePropColumnPinning;
2097
+ defaultColumnPinning?: InfiniteTablePropColumnPinning;
2098
+ columnSizing?: InfiniteTablePropColumnSizing;
2099
+ defaultColumnSizing?: InfiniteTablePropColumnSizing;
2100
+ onColumnSizingChange?: (columnSizing: InfiniteTablePropColumnSizing) => void;
2101
+ pivotColumnGroups?: InfiniteTablePropColumnGroups;
2102
+ columnGroups?: InfiniteTablePropColumnGroups;
2103
+ defaultColumnGroups?: InfiniteTablePropColumnGroups;
2104
+ defaultCollapsedColumnGroups?: InfiniteTablePropCollapsedColumnGroups;
2105
+ collapsedColumnGroups?: InfiniteTablePropCollapsedColumnGroups;
2106
+ onScrollbarsChange?: (scrollbars: Scrollbars) => void;
2107
+ onColumnVisibilityChange?: (columnVisibility: InfiniteTablePropColumnVisibility) => void;
2108
+ columnTypes?: InfiniteTablePropColumnTypes<T>;
2109
+ showSeparatePivotColumnForSingleAggregation?: boolean;
2110
+ rowHeight: number | string;
2111
+ rowStyle?: InfiniteTablePropRowStyle<T>;
2112
+ rowClassName?: InfiniteTablePropRowClassName<T>;
2113
+ columnHeaderHeight: number | string;
2114
+ domProps?: React$1.HTMLProps<HTMLDivElement>;
2115
+ /**
2116
+ * A unique identifier for the table instance. Will not be passed to the DOM.
2117
+ */
2118
+ id?: string;
2119
+ showZebraRows?: boolean;
2120
+ showHoverRows?: boolean;
2121
+ sortable?: boolean;
2122
+ keyboardNavigation?: InfiniteTablePropKeyboardNavigation;
2123
+ keyboardSelection?: InfiniteTablePropKeyboardSelection;
2124
+ defaultActiveRowIndex?: number | null;
2125
+ activeRowIndex?: number | null;
2126
+ onActiveRowIndexChange?: (activeRowIndex: number) => void;
2127
+ onActiveCellIndexChange?: (activeCellIndex: [number, number]) => void;
2128
+ activeCellIndex?: [number, number] | null;
2129
+ defaultActiveCellIndex?: [number, number] | null;
2130
+ draggableColumns?: boolean;
2131
+ header?: boolean;
2132
+ headerOptions?: InfiniteTablePropHeaderOptions;
2133
+ focusedClassName?: string;
2134
+ focusedWithinClassName?: string;
2135
+ focusedStyle?: React$1.CSSProperties;
2136
+ focusedWithinStyle?: React$1.CSSProperties;
2137
+ columnCssEllipsis?: boolean;
2138
+ columnHeaderCssEllipsis?: boolean;
2139
+ columnDefaultWidth?: number;
2140
+ columnMinWidth?: number;
2141
+ columnMaxWidth?: number;
2142
+ hideColumnWhenGrouped?: boolean;
2143
+ resizableColumns?: boolean;
2144
+ virtualizeColumns?: InfiniteTablePropVirtualizeColumns<T>;
2145
+ virtualizeRows?: boolean;
2146
+ onSelfFocus?: (event: React$1.FocusEvent<HTMLDivElement>) => void;
2147
+ onSelfBlur?: (event: React$1.FocusEvent<HTMLDivElement>) => void;
2148
+ onFocusWithin?: (event: React$1.FocusEvent<HTMLDivElement>) => void;
2149
+ onBlurWithin?: (event: React$1.FocusEvent<HTMLDivElement>) => void;
2150
+ onScrollToTop?: () => void;
2151
+ onScrollToBottom?: () => void;
2152
+ scrollStopDelay?: number;
2153
+ onScrollStop?: (param: ScrollStopInfo) => void;
2154
+ scrollToBottomOffset?: number;
2155
+ defaultColumnOrder?: InfiniteTablePropColumnOrder;
2156
+ columnOrder?: InfiniteTablePropColumnOrder;
2157
+ onColumnOrderChange?: (columnOrder: InfiniteTablePropColumnOrderNormalized) => void;
2158
+ onRowHeightChange?: (rowHeight: number) => void;
2159
+ filterEditors?: InfiniteTablePropFilterEditors<T>;
2160
+ onReady?: (api: InfiniteTableApi<T>) => void;
2161
+ rowProps?: React$1.HTMLProps<HTMLDivElement> | ((rowArgs: InfiniteTableRowStyleFnParams<T>) => React$1.HTMLProps<HTMLDivElement>);
2162
+ licenseKey?: string;
2163
+ scrollTopKey?: string | number;
2164
+ autoSizeColumnsKey?: InfiniteTablePropAutoSizeColumnsKey;
2165
+ getColumContextMenuItems?: (params: {
2166
+ column: InfiniteTableComputedColumn<T>;
2167
+ api: InfiniteTableApi<T>;
2168
+ getState: () => InfiniteTableState<T>;
2169
+ getComputed: () => InfiniteTableComputedValues<T>;
2170
+ actions: InfiniteTableActions<T>;
2171
+ }) => MenuProps['items'];
2172
+ }
2173
+ declare type InfiniteTablePropKeyboardNavigation = 'cell' | 'row' | false;
2174
+ declare type InfiniteTablePropKeyboardSelection = boolean;
2175
+ declare type InfiniteTablePropHeaderOptions = {
2176
+ alwaysReserveSpaceForSortIcon: boolean;
2177
+ };
2178
+ declare type InfiniteTablePropAutoSizeColumnsKey = string | number | {
2179
+ key: string | number;
2180
+ columnsToSkip?: string[];
2181
+ columnsToResize?: string[];
2182
+ includeHeader?: boolean;
2183
+ };
2184
+ declare type Scrollbars = {
2185
+ vertical: boolean;
2186
+ horizontal: boolean;
2187
+ };
2188
+ declare type ScrollAdjustPosition = 'start' | 'end' | 'center';
2189
+
2190
+ declare function debounce(fn: Function, { wait }: {
2191
+ wait: number;
2192
+ }): (...args: any[]) => void;
2193
+
2194
+ declare function Menu(props: MenuProps & HTMLProps<HTMLDivElement>): JSX.Element;
2195
+ declare namespace Menu {
2196
+ var defaultProps: MenuProps & {
2197
+ __is_infinite_menu_component?: boolean | undefined;
2198
+ };
2199
+ }
2200
+
2201
+ declare type ForwardPropsToStateFnResult<TYPE_PROPS, TYPE_RESULT> = {
2202
+ [propName in keyof TYPE_PROPS & keyof TYPE_RESULT]: 1 | ((value: TYPE_PROPS[propName]) => TYPE_RESULT[propName]);
2203
+ };
2204
+ declare type ComponentStateRootConfig<T_PROPS, COMPONENT_MAPPED_STATE, COMPONENT_SETUP_STATE = {}, COMPONENT_DERIVED_STATE = {}, T_ACTIONS = {}, T_PARENT_STATE = {}> = {
2205
+ debugName?: string;
2206
+ initSetupState?: () => COMPONENT_SETUP_STATE;
2207
+ layoutEffect?: boolean;
2208
+ forwardProps?: (setupState: COMPONENT_SETUP_STATE) => ForwardPropsToStateFnResult<T_PROPS, COMPONENT_MAPPED_STATE>;
2209
+ allowedControlledPropOverrides?: Record<keyof T_PROPS, true>;
2210
+ interceptActions?: ComponentInterceptedActions<COMPONENT_MAPPED_STATE & COMPONENT_DERIVED_STATE & COMPONENT_SETUP_STATE>;
2211
+ mappedCallbacks?: ComponentMappedCallbacks<COMPONENT_MAPPED_STATE & COMPONENT_DERIVED_STATE & COMPONENT_SETUP_STATE>;
2212
+ onPropChange?: (params: {
2213
+ name: keyof T_PROPS;
2214
+ oldValue: any;
2215
+ newValue: any;
2216
+ }, props: T_PROPS, actions: ComponentStateActions<COMPONENT_MAPPED_STATE & COMPONENT_DERIVED_STATE & COMPONENT_SETUP_STATE>) => void;
2217
+ mapPropsToState?: (params: {
2218
+ props: T_PROPS;
2219
+ state: COMPONENT_MAPPED_STATE & COMPONENT_SETUP_STATE & Partial<COMPONENT_DERIVED_STATE>;
2220
+ oldState: null | (COMPONENT_MAPPED_STATE & COMPONENT_SETUP_STATE & Partial<COMPONENT_DERIVED_STATE>);
2221
+ parentState: T_PARENT_STATE | null;
2222
+ }) => COMPONENT_DERIVED_STATE;
2223
+ concludeReducer?: (params: {
2224
+ previousState: COMPONENT_MAPPED_STATE & COMPONENT_SETUP_STATE & COMPONENT_DERIVED_STATE;
2225
+ state: COMPONENT_MAPPED_STATE & COMPONENT_SETUP_STATE & COMPONENT_DERIVED_STATE;
2226
+ updatedProps: Partial<T_PROPS> | null;
2227
+ parentState: T_PARENT_STATE | null;
2228
+ }) => COMPONENT_MAPPED_STATE & COMPONENT_SETUP_STATE & COMPONENT_DERIVED_STATE;
2229
+ getReducerActions?: (dispatch: React$1.Dispatch<any>) => T_ACTIONS;
2230
+ getParentState?: () => T_PARENT_STATE;
2231
+ cleanup?: (state: COMPONENT_MAPPED_STATE & COMPONENT_SETUP_STATE & COMPONENT_DERIVED_STATE) => void;
2232
+ onControlledPropertyChange?: (name: string, newValue: any, oldValue: any) => void | ((value: any, oldValue: any) => any);
2233
+ };
2234
+ declare function getComponentStateRoot<T_PROPS, COMPONENT_MAPPED_STATE extends object, COMPONENT_SETUP_STATE extends object = {}, COMPONENT_DERIVED_STATE extends object = {}, T_ACTIONS = {}, T_PARENT_STATE = {}>(config: ComponentStateRootConfig<T_PROPS, COMPONENT_MAPPED_STATE, COMPONENT_SETUP_STATE, COMPONENT_DERIVED_STATE, T_ACTIONS, T_PARENT_STATE>): React$1.NamedExoticComponent<T_PROPS & {
2235
+ children: React$1.ReactNode;
2236
+ }>;
2237
+ declare function useComponentState<COMPONENT_STATE>(): ComponentStateContext<COMPONENT_STATE, ComponentStateGeneratedActions<COMPONENT_STATE>>;
2238
+
2239
+ declare type InterceptedMapFns<K, V> = {
2240
+ set?: (k: K, v: V) => void;
2241
+ beforeClear?: (map: Map<K, V>) => void;
2242
+ clear?: () => void;
2243
+ delete?: (k: K) => void;
2244
+ };
2245
+ /**
2246
+ *
2247
+ * @param map Map to intercept
2248
+ * @param fns fns to inject
2249
+ * @returns a function to restore the map to initial methods
2250
+ */
2251
+ declare function interceptMap<K, V>(map: Map<K, V>, fns: InterceptedMapFns<K, V>): () => void;
2252
+
2253
+ declare function useEffectWithChanges<T>(fn: (changes: Record<keyof T, any>, prevValues: Record<string, any>) => void | (() => void), deps: Record<keyof T, any>): void;
2254
+
2255
+ declare const defaultFilterEditors: InfiniteTablePropFilterEditors<unknown>;
2256
+ declare function StringFilterEditor<T>(props: InfiniteTableFilterEditorProps<T>): JSX.Element;
2257
+ declare function NumberFilterEditor<T>(props: InfiniteTableFilterEditorProps<T>): JSX.Element;
2258
+
2259
+ declare const components: {
2260
+ CheckBox: typeof InfiniteCheckBox;
2261
+ LoadMask: (props: LoadMaskProps) => JSX.Element;
2262
+ };
2263
+
2264
+ export { AdvancedAlignable, ColumnTypeWithInherit, DataSource, DataSourceAction, DataSourceActionType, DataSourceAggregationReducer, DataSourceComponentActions, DataSourceContextValue, DataSourceData, DataSourceDataParams, DataSourceDataParamsChanges, DataSourceDerivedState, DataSourceFilterFunctionParam, DataSourceFilterOperator, DataSourceFilterOperatorFunction, DataSourceFilterOperatorFunctionParam, DataSourceFilterType, DataSourceFilterValueItem, DataSourceFilterValueItemValueGetter, DataSourceGroupBy, DataSourceGroupRowsList, DataSourceLivePaginationCursorFn, DataSourceLivePaginationCursorParams, DataSourceLivePaginationCursorValue, DataSourceMappedState, DataSourceMappings, DataSourcePivotBy, DataSourcePropAggregationReducers, DataSourcePropCellSelection, DataSourcePropFilterFunction, DataSourcePropFilterTypes, DataSourcePropFilterValue, DataSourcePropGroupBy, DataSourcePropGroupRowsStateObject, DataSourcePropIsRowSelected, DataSourcePropLivePaginationCursor, DataSourcePropMultiRowSelectionChangeParamType, DataSourcePropOnCellSelectionChange, DataSourcePropOnRowSelectionChange, DataSourcePropOnRowSelectionChange_MultiRow, DataSourcePropOnRowSelectionChange_SingleRow, DataSourcePropPivotBy, DataSourcePropRowSelection, DataSourcePropRowSelection_MultiRow, DataSourcePropRowSelection_SingleRow, DataSourcePropSelectionMode, DataSourcePropSortInfo, DataSourcePropSortTypes, DataSourceProps, DataSourceReducer, DataSourceRemoteData, DataSourceSetupState, DataSourceSingleSortInfo, DataSourceSortInfo, DataSourceState, ElementContainerGetter, GroupRowsState, InfiniteTable, InfiniteTableAction, InfiniteTableActionType, InfiniteTableApi, InfiniteTableClassName, InfiniteTableColumn, InfiniteTableColumnAggregator, InfiniteTableColumnComparer, InfiniteTableColumnGroup, InfiniteTableColumnRenderFunctionForGroupRows, InfiniteTableColumnRenderFunctionForNormalRows, InfiniteTableColumnRenderParam, InfiniteTableColumnRenderValueParam, InfiniteTableColumnRowspanParam, InfiniteTableColumnSizingOptions, InfiniteTableColumnsMap, InfiniteTableComponent, InfiniteTableComputedColumn, InfiniteTableComputedValues, InfiniteTableContextValue, InfiniteTableFilterEditorProps, InfiniteTableGroupColumnBase, InfiniteTableGroupColumnFunction, InfiniteTableGroupColumnGetterOptions, InfiniteTablePivotColumn, InfiniteTablePropAutoSizeColumnsKey, InfiniteTablePropColumnGroups, InfiniteTablePropColumnOrder, InfiniteTablePropColumnPinning, InfiniteTablePropColumnSizing, InfiniteTablePropColumnTypes, InfiniteTablePropColumnVisibility, InfiniteTablePropColumns, InfiniteTablePropComponents, InfiniteTablePropFilterEditors, InfiniteTablePropGroupColumn, InfiniteTablePropGroupRenderStrategy, InfiniteTablePropHeaderOptions, InfiniteTablePropKeyboardNavigation, InfiniteTablePropRowClassName, InfiniteTablePropRowStyle, InfiniteTableProps, InfiniteTableRowClassNameFn, InfiniteTableRowInfo, InfiniteTableRowStyleFn, InfiniteTableState, LazyGroupDataDeepMap, LazyGroupDataItem, LazyRowInfoGroup, Menu, MenuChildrenFnParam, MenuColumn, MenuColumnRenderParam, MenuDecoration, MenuItemDefinition, MenuItemObject, MenuProps, MenuRenderable, MenuRuntimeItem, MenuRuntimeItemSelectable, MenuSeparator, NumberFilterEditor, OverlayShowParams, RowSelectionState, Scrollbars, StringFilterEditor, components, debounce, defaultFilterEditors, defaultFilterTypes, defaultFilterTypes as filterTypes, flatten, getComponentStateRoot, group, interceptMap, multisort, useComponentState, useDataSource, useEffectWithChanges, useInfiniteColumnCell, useInfiniteHeaderCell, useOverlay, useOverlayPortal };