@infinite-table/infinite-react 0.5.1 → 0.5.2
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.
- package/README.md +104 -0
- package/index.css +896 -0
- package/index.d.ts +2264 -0
- package/index.esm.css +896 -0
- package/index.esm.js +15404 -0
- package/index.js +15240 -0
- package/package.json +2 -94
- package/.vscode/settings.json +0 -3
- package/API.md +0 -0
- package/build/buildPackageJson.js +0 -43
- package/build/scripts/test.js +0 -37
- package/bundler.config.js +0 -25
- package/globals.d.ts +0 -7
- package/rollup.config.js +0 -15
- package/run-build-deepmap.js +0 -47
- package/run-build.js +0 -45
- package/run-dts-concat.js +0 -21
- package/src/components/CSSVariableWatch.tsx +0 -82
- package/src/components/DataSource/BooleanCollectionState.ts +0 -214
- package/src/components/DataSource/BooleanDeepCollectionState.ts +0 -208
- package/src/components/DataSource/DataSourceContext.ts +0 -20
- package/src/components/DataSource/GroupRowsState.ts +0 -74
- package/src/components/DataSource/Indexer.ts +0 -27
- package/src/components/DataSource/RowSelectionState.ts +0 -763
- package/src/components/DataSource/defaultFilterTypes.ts +0 -64
- package/src/components/DataSource/index.tsx +0 -108
- package/src/components/DataSource/privateHooks/getChangeDetect.ts +0 -7
- package/src/components/DataSource/privateHooks/useLoadData.ts +0 -783
- package/src/components/DataSource/publicHooks/useDataSource.ts +0 -19
- package/src/components/DataSource/publicHooks/useDataSourceActions.ts +0 -14
- package/src/components/DataSource/state/getInitialState.ts +0 -494
- package/src/components/DataSource/state/normalizeSortInfo.ts +0 -35
- package/src/components/DataSource/state/reducer.ts +0 -466
- package/src/components/DataSource/state/rowInfoStatus.ts +0 -27
- package/src/components/DataSource/types.ts +0 -548
- package/src/components/HeadlessTable/HeadlessTableWithPinnedContainers.tsx +0 -142
- package/src/components/HeadlessTable/MappedCells.ts +0 -251
- package/src/components/HeadlessTable/RawTable.tsx +0 -98
- package/src/components/HeadlessTable/ReactHeadlessTableRenderer.tsx +0 -1516
- package/src/components/HeadlessTable/index.tsx +0 -234
- package/src/components/InfiniteTable/InfiniteCls.css.ts +0 -164
- package/src/components/InfiniteTable/InfiniteTableContext.ts +0 -16
- package/src/components/InfiniteTable/api/getImperativeApi.ts +0 -391
- package/src/components/InfiniteTable/api/getSelectionApi.ts +0 -364
- package/src/components/InfiniteTable/api/type.ts +0 -11
- package/src/components/InfiniteTable/components/ActiveCellIndicator.css.ts +0 -51
- package/src/components/InfiniteTable/components/ActiveCellIndicator.tsx +0 -116
- package/src/components/InfiniteTable/components/ActiveRowIndicator.css.ts +0 -56
- package/src/components/InfiniteTable/components/ActiveRowIndicator.tsx +0 -94
- package/src/components/InfiniteTable/components/CheckBox.css.ts +0 -13
- package/src/components/InfiniteTable/components/CheckBox.tsx +0 -96
- package/src/components/InfiniteTable/components/FilterEditors.tsx +0 -52
- package/src/components/InfiniteTable/components/InfiniteTableBody/InfiniteTableBody.tsx +0 -27
- package/src/components/InfiniteTable/components/InfiniteTableBody/index.tsx +0 -1
- package/src/components/InfiniteTable/components/InfiniteTableFooter/InfiniteTableFooter.tsx +0 -31
- package/src/components/InfiniteTable/components/InfiniteTableFooter/index.tsx +0 -1
- package/src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableColumnHeaderFilter.tsx +0 -102
- package/src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableHeader.tsx +0 -163
- package/src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableHeaderCell.tsx +0 -574
- package/src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableHeaderGroup.tsx +0 -79
- package/src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableHeaderTypes.tsx +0 -25
- package/src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableHeaderWrapper.tsx +0 -185
- package/src/components/InfiniteTable/components/InfiniteTableHeader/ResizeHandle/GroupResizeHandle.tsx +0 -159
- package/src/components/InfiniteTable/components/InfiniteTableHeader/ResizeHandle/ResizeHandle.css.ts +0 -124
- package/src/components/InfiniteTable/components/InfiniteTableHeader/ResizeHandle/columnResizer.ts +0 -166
- package/src/components/InfiniteTable/components/InfiniteTableHeader/ResizeHandle/index.tsx +0 -146
- package/src/components/InfiniteTable/components/InfiniteTableHeader/buildColumnAndGroupTree.ts +0 -240
- package/src/components/InfiniteTable/components/InfiniteTableHeader/header.css.ts +0 -358
- package/src/components/InfiniteTable/components/InfiniteTableHeader/index.tsx +0 -1
- package/src/components/InfiniteTable/components/InfiniteTableHeader/useColumnGroupResizeHandle.tsx +0 -114
- package/src/components/InfiniteTable/components/InfiniteTableHeader/useColumnResizeHandle.tsx +0 -146
- package/src/components/InfiniteTable/components/InfiniteTableLicenseFooter/footer.css.ts +0 -7
- package/src/components/InfiniteTable/components/InfiniteTableLicenseFooter/index.tsx +0 -110
- package/src/components/InfiniteTable/components/InfiniteTableRow/InfiniteTableCell.tsx +0 -120
- package/src/components/InfiniteTable/components/InfiniteTableRow/InfiniteTableCellTypes.ts +0 -74
- package/src/components/InfiniteTable/components/InfiniteTableRow/InfiniteTableColumnCell.tsx +0 -457
- package/src/components/InfiniteTable/components/InfiniteTableRow/InfiniteTableRow.tsx +0 -107
- package/src/components/InfiniteTable/components/InfiniteTableRow/InfiniteTableRowClassName.ts +0 -6
- package/src/components/InfiniteTable/components/InfiniteTableRow/InfiniteTableRowTypes.ts +0 -32
- package/src/components/InfiniteTable/components/InfiniteTableRow/InfiniteTableRowUnvirtualized.tsx +0 -75
- package/src/components/InfiniteTable/components/InfiniteTableRow/columnRendering.tsx +0 -263
- package/src/components/InfiniteTable/components/InfiniteTableRow/index.tsx +0 -1
- package/src/components/InfiniteTable/components/InfiniteTableRow/row.css.ts +0 -74
- package/src/components/InfiniteTable/components/InfiniteTableRow/useRowDOMProps.ts +0 -199
- package/src/components/InfiniteTable/components/LoadMask.css.ts +0 -34
- package/src/components/InfiniteTable/components/LoadMask.tsx +0 -27
- package/src/components/InfiniteTable/components/ScrollbarPlaceholder.tsx +0 -56
- package/src/components/InfiniteTable/components/cell.css.ts +0 -192
- package/src/components/InfiniteTable/components/icons/ArrowDown.tsx +0 -14
- package/src/components/InfiniteTable/components/icons/ArrowUp.tsx +0 -14
- package/src/components/InfiniteTable/components/icons/ExpanderIcon.css.ts +0 -31
- package/src/components/InfiniteTable/components/icons/ExpanderIcon.tsx +0 -63
- package/src/components/InfiniteTable/components/icons/Icon.tsx +0 -18
- package/src/components/InfiniteTable/components/icons/InfiniteTableIconClassName.ts +0 -1
- package/src/components/InfiniteTable/components/icons/LoadingIcon.css.ts +0 -8
- package/src/components/InfiniteTable/components/icons/LoadingIcon.tsx +0 -45
- package/src/components/InfiniteTable/components/icons/MenuIcon.tsx +0 -50
- package/src/components/InfiniteTable/components/icons/SortIcon.tsx +0 -113
- package/src/components/InfiniteTable/eventHandlers/eventHandlerTypes.ts +0 -57
- package/src/components/InfiniteTable/eventHandlers/index.ts +0 -95
- package/src/components/InfiniteTable/eventHandlers/keyboardNavigation.ts +0 -232
- package/src/components/InfiniteTable/eventHandlers/keyboardSelection.ts +0 -110
- package/src/components/InfiniteTable/eventHandlers/onCellClick.ts +0 -94
- package/src/components/InfiniteTable/eventHandlers/onKeyDown.ts +0 -25
- package/src/components/InfiniteTable/hooks/adjustColumnOrderForAllColumns.ts +0 -70
- package/src/components/InfiniteTable/hooks/reorderColumnsOnDrag.ts +0 -476
- package/src/components/InfiniteTable/hooks/useAutoSizeColumns.ts +0 -206
- package/src/components/InfiniteTable/hooks/useCellClassName.ts +0 -80
- package/src/components/InfiniteTable/hooks/useCellRendering.tsx +0 -217
- package/src/components/InfiniteTable/hooks/useColumnGroups.ts +0 -71
- package/src/components/InfiniteTable/hooks/useColumnMenu.ts +0 -72
- package/src/components/InfiniteTable/hooks/useColumnPointerEvents.ts +0 -258
- package/src/components/InfiniteTable/hooks/useColumnRowspan.ts +0 -43
- package/src/components/InfiniteTable/hooks/useColumnSizeFn.ts +0 -24
- package/src/components/InfiniteTable/hooks/useColumnsWhen.ts +0 -582
- package/src/components/InfiniteTable/hooks/useComputed.ts +0 -186
- package/src/components/InfiniteTable/hooks/useComputedVisibleColumns.ts +0 -219
- package/src/components/InfiniteTable/hooks/useDOMProps.ts +0 -306
- package/src/components/InfiniteTable/hooks/useEffectWithRaf.ts +0 -47
- package/src/components/InfiniteTable/hooks/useInfiniteTable.ts +0 -10
- package/src/components/InfiniteTable/hooks/useInfiniteTableState.ts +0 -11
- package/src/components/InfiniteTable/hooks/useInternalProps.ts +0 -8
- package/src/components/InfiniteTable/hooks/useLicense/LicenseDetails.ts +0 -13
- package/src/components/InfiniteTable/hooks/useLicense/crc32.ts +0 -56
- package/src/components/InfiniteTable/hooks/useLicense/decode.ts +0 -147
- package/src/components/InfiniteTable/hooks/useLicense/useLicense.ts +0 -39
- package/src/components/InfiniteTable/hooks/useRerenderOnKeyChange.ts +0 -21
- package/src/components/InfiniteTable/hooks/useRowHover.ts +0 -18
- package/src/components/InfiniteTable/hooks/useScrollToActiveCell.ts +0 -48
- package/src/components/InfiniteTable/hooks/useScrollToActiveRow.ts +0 -44
- package/src/components/InfiniteTable/hooks/useScrollbars.ts +0 -51
- package/src/components/InfiniteTable/hooks/useToggleGroupRow.ts +0 -56
- package/src/components/InfiniteTable/hooks/useUnpinnedRendering.tsx +0 -165
- package/src/components/InfiniteTable/hooks/useYourBrain.ts +0 -55
- package/src/components/InfiniteTable/index.tsx +0 -352
- package/src/components/InfiniteTable/internalProps.ts +0 -4
- package/src/components/InfiniteTable/state/computeColumnGroupsDepths.ts +0 -29
- package/src/components/InfiniteTable/state/getColumnVisibilityForHideEmptyGroupColumns.ts +0 -127
- package/src/components/InfiniteTable/state/getInitialState.ts +0 -375
- package/src/components/InfiniteTable/theme.css.ts +0 -556
- package/src/components/InfiniteTable/types/InfiniteTableAction.ts +0 -6
- package/src/components/InfiniteTable/types/InfiniteTableActionType.ts +0 -12
- package/src/components/InfiniteTable/types/InfiniteTableColumn.ts +0 -478
- package/src/components/InfiniteTable/types/InfiniteTableComputedValues.ts +0 -43
- package/src/components/InfiniteTable/types/InfiniteTableContextValue.ts +0 -12
- package/src/components/InfiniteTable/types/InfiniteTableInternalProps.ts +0 -3
- package/src/components/InfiniteTable/types/InfiniteTableProps.ts +0 -511
- package/src/components/InfiniteTable/types/InfiniteTableState.ts +0 -195
- package/src/components/InfiniteTable/types/Utility.ts +0 -35
- package/src/components/InfiniteTable/types/index.ts +0 -96
- package/src/components/InfiniteTable/utilities.css.ts +0 -179
- package/src/components/InfiniteTable/utils/MultiRowSelector.ts +0 -111
- package/src/components/InfiniteTable/utils/RenderHookComponentForInfinite.tsx +0 -52
- package/src/components/InfiniteTable/utils/adjustColumnOrderForPinning.ts +0 -33
- package/src/components/InfiniteTable/utils/assignFiltered.ts +0 -29
- package/src/components/InfiniteTable/utils/defaultGetColumContextMenuItems.tsx +0 -108
- package/src/components/InfiniteTable/utils/getColumnComputedType.ts +0 -33
- package/src/components/InfiniteTable/utils/getColumnForGroupBy.tsx +0 -313
- package/src/components/InfiniteTable/utils/getComputedVisibleColumns.ts +0 -773
- package/src/components/InfiniteTable/utils/getContextMenuForColumn.tsx +0 -72
- package/src/components/InfiniteTable/utils/infiniteDOMUtils.ts +0 -189
- package/src/components/InfiniteTable/utils/mapToObject.ts +0 -20
- package/src/components/InfiniteTable/utils/moveXatY.ts +0 -25
- package/src/components/InfiniteTable/utils/objectValuesExcept.ts +0 -9
- package/src/components/InfiniteTable/utils/progressiveSpeedScroller.ts +0 -158
- package/src/components/InfiniteTable/utils/rafFn.ts +0 -13
- package/src/components/InfiniteTable/utils/toCSSVarName.ts +0 -1
- package/src/components/InfiniteTable/utils/toMap.ts +0 -24
- package/src/components/Menu/Menu.tsx +0 -750
- package/src/components/Menu/MenuCls.css.ts +0 -139
- package/src/components/Menu/MenuContext.ts +0 -10
- package/src/components/Menu/MenuContextValue.ts +0 -15
- package/src/components/Menu/MenuProps.ts +0 -98
- package/src/components/Menu/MenuState.ts +0 -56
- package/src/components/Menu/MenuTriangleContext.ts +0 -352
- package/src/components/Menu/childrenToRuntimeItems.tsx +0 -103
- package/src/components/Menu/getMenuState.tsx +0 -119
- package/src/components/Menu/index.tsx +0 -88
- package/src/components/Menu/propToIdentifyMenu.ts +0 -1
- package/src/components/RawList/AvoidReactDiff.tsx +0 -48
- package/src/components/RawList/MappedItems.ts +0 -143
- package/src/components/RawList/ReactVirtualRenderer.tsx +0 -307
- package/src/components/RawList/index.tsx +0 -42
- package/src/components/RawList/types.ts +0 -23
- package/src/components/RawList/useVirtualRenderer.ts +0 -36
- package/src/components/RenderHookComponent.tsx +0 -10
- package/src/components/ResizeObserver/index.tsx +0 -170
- package/src/components/VirtualBrain/MatrixBrain.ts +0 -1621
- package/src/components/VirtualBrain/ScrollListener.ts +0 -39
- package/src/components/VirtualBrain/index.ts +0 -664
- package/src/components/VirtualList/ColumnListWithExternalScrolling.tsx +0 -78
- package/src/components/VirtualList/InfiniteListRootClassName.ts +0 -1
- package/src/components/VirtualList/RowListWithExternalScrolling.tsx +0 -120
- package/src/components/VirtualList/SpacePlaceholder.tsx +0 -32
- package/src/components/VirtualList/VirtualList.css.ts +0 -29
- package/src/components/VirtualList/VirtualList.tsx +0 -141
- package/src/components/VirtualList/VirtualRowList.tsx +0 -34
- package/src/components/VirtualList/types.ts +0 -56
- package/src/components/VirtualList/useCorrectHeightForRowElements.ts +0 -14
- package/src/components/VirtualScrollContainer/VirtualScrollContainer.css.ts +0 -51
- package/src/components/VirtualScrollContainer/getScrollableClassName.ts +0 -30
- package/src/components/VirtualScrollContainer/index.tsx +0 -63
- package/src/components/flexbox/index.ts +0 -562
- package/src/components/hooks/useComponentState/index.tsx +0 -562
- package/src/components/hooks/useComponentState/types.ts +0 -32
- package/src/components/hooks/useEffectOnceWithProperUnmount.ts +0 -33
- package/src/components/hooks/useEffectWithChanges.ts +0 -56
- package/src/components/hooks/useImmutableRef.ts +0 -7
- package/src/components/hooks/useInterceptedMap.ts +0 -71
- package/src/components/hooks/useLatest.tsx +0 -8
- package/src/components/hooks/useLazyLatest.ts +0 -23
- package/src/components/hooks/useMemoShallowObjectMerge.ts +0 -16
- package/src/components/hooks/useMounted.ts +0 -18
- package/src/components/hooks/useOnMount.ts +0 -21
- package/src/components/hooks/useOnScroll.ts +0 -34
- package/src/components/hooks/useOnce.ts +0 -10
- package/src/components/hooks/useOverlay/index.tsx +0 -418
- package/src/components/hooks/usePrevious.ts +0 -8
- package/src/components/hooks/usePropertyOld.ts +0 -168
- package/src/components/hooks/useRerender.ts +0 -12
- package/src/components/hooks/xuseProperty.ts +0 -165
- package/src/components/types/CellPosition.ts +0 -4
- package/src/components/types/NonUndefined.ts +0 -1
- package/src/components/types/RemoveObject.ts +0 -22
- package/src/components/types/Renderable.ts +0 -3
- package/src/components/types/ScrollPosition.ts +0 -7
- package/src/components/types/Setter.ts +0 -2
- package/src/components/types/Size.ts +0 -6
- package/src/components/types/SubscriptionCallback.ts +0 -10
- package/src/components/types/VoidFn.ts +0 -1
- package/src/components/utils/buildSubscriptionCallback.tsx +0 -60
- package/src/components/utils/clamp.ts +0 -3
- package/src/components/utils/debounce.ts +0 -16
- package/src/components/utils/decamelize.ts +0 -11
- package/src/components/utils/discardCallsWithEqualArg.ts +0 -42
- package/src/components/utils/getRenderIndexes.ts +0 -33
- package/src/components/utils/getScrollbarWidth.ts +0 -31
- package/src/components/utils/getVirtualRenderCount.ts +0 -21
- package/src/components/utils/isControlled.ts +0 -12
- package/src/components/utils/isControlledValue.ts +0 -5
- package/src/index.tsx +0 -34
- package/src/test.tsx +0 -18
- package/src/utils/DeepMap/index.ts +0 -588
- package/src/utils/DeepMap/once.ts +0 -16
- package/src/utils/DeepMap/sortAscending.ts +0 -1
- package/src/utils/DeepMap/tsconfig.deepmap.json +0 -17
- package/src/utils/DeepMap/xpackage.json +0 -26
- package/src/utils/debug.ts +0 -40
- package/src/utils/deepClone.ts +0 -38
- package/src/utils/getGlobal.ts +0 -3
- package/src/utils/groupAndPivot/defaultToKey.ts +0 -3
- package/src/utils/groupAndPivot/getGroupKeysForDataItem.ts +0 -19
- package/src/utils/groupAndPivot/getPivotColumnsAndColumnGroups.ts +0 -361
- package/src/utils/groupAndPivot/index.ts +0 -1229
- package/src/utils/groupAndPivot/types.ts +0 -10
- package/src/utils/join.ts +0 -4
- package/src/utils/mathIntersection.ts +0 -21
- package/src/utils/minified.d.ts +0 -2
- package/src/utils/minified.js +0 -6
- package/src/utils/multisort/index.ts +0 -151
- package/src/utils/multisort/sortTypes.ts +0 -25
- package/src/utils/notes-status.md +0 -92
- package/src/utils/pageGeometry/ConvexPoly.ts +0 -34
- package/src/utils/pageGeometry/Point.ts +0 -51
- package/src/utils/pageGeometry/PolyWithPoints.ts +0 -52
- package/src/utils/pageGeometry/Rectangle.ts +0 -98
- package/src/utils/pageGeometry/Triangle.ts +0 -16
- package/src/utils/pageGeometry/alignment/index.ts +0 -221
- package/src/utils/pageGeometry/polyContainsPoint.ts +0 -182
- package/src/utils/pageGeometry/types.ts +0 -3
- package/src/utils/proxyFnCall.ts +0 -46
- package/src/utils/raf.ts +0 -13
- package/src/utils/selectParent.ts +0 -18
- package/src/utils/shallowEqualObjects.ts +0 -49
- package/src/utils/stripVar.ts +0 -3
- package/src/utils/toUpperFirst.ts +0 -5
- package/todo.md +0 -2
- package/tsconfig.build.json +0 -8
- package/tsconfig.dev.json +0 -7
- package/tsconfig.json +0 -30
- package/tsconfig.typebundler.json +0 -13
- package/typedoc.json +0 -4
|
@@ -1,511 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
AggregationReducer,
|
|
5
|
-
InfiniteTableRowInfoDataDiscriminator,
|
|
6
|
-
} from '../../../utils/groupAndPivot';
|
|
7
|
-
import {
|
|
8
|
-
DataSourceGroupBy,
|
|
9
|
-
DataSourcePivotBy,
|
|
10
|
-
DataSourcePropGroupBy,
|
|
11
|
-
DataSourcePropPivotBy,
|
|
12
|
-
DataSourcePropSelectionMode,
|
|
13
|
-
DataSourceSingleSortInfo,
|
|
14
|
-
DataSourceState,
|
|
15
|
-
} from '../../DataSource/types';
|
|
16
|
-
import { Renderable } from '../../types/Renderable';
|
|
17
|
-
|
|
18
|
-
import type {
|
|
19
|
-
InfiniteTableColumn,
|
|
20
|
-
InfiniteTableColumnRenderFunction,
|
|
21
|
-
InfiniteTableColumnRenderFunctionForGroupRows,
|
|
22
|
-
InfiniteTableComputedColumn,
|
|
23
|
-
InfiniteTableComputedPivotFinalColumn,
|
|
24
|
-
InfiniteTableDataTypeNames,
|
|
25
|
-
InfiniteTablePivotColumn,
|
|
26
|
-
InfiniteTablePivotFinalColumn,
|
|
27
|
-
} from './InfiniteTableColumn';
|
|
28
|
-
import {
|
|
29
|
-
InfiniteTableActions,
|
|
30
|
-
InfiniteTablePropPivotGrandTotalColumnPosition,
|
|
31
|
-
InfiniteTablePropPivotTotalColumnPosition,
|
|
32
|
-
} from './InfiniteTableState';
|
|
33
|
-
|
|
34
|
-
import { InfiniteTableState } from '.';
|
|
35
|
-
import { InfiniteTableComputedValues } from './InfiniteTableComputedValues';
|
|
36
|
-
import { InfiniteCheckBoxProps } from '../components/CheckBox';
|
|
37
|
-
import { InfiniteTableSelectionApi } from '../api/getSelectionApi';
|
|
38
|
-
import { MenuProps } from '../../Menu/MenuProps';
|
|
39
|
-
import { SortDir } from '../../../utils/multisort';
|
|
40
|
-
import { KeyOfNoSymbol } from './Utility';
|
|
41
|
-
|
|
42
|
-
export type LoadMaskProps = {
|
|
43
|
-
visible: boolean;
|
|
44
|
-
children: Renderable;
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
// export type TablePropColumnOrderItem = string | { id: string; visible: boolean };
|
|
48
|
-
export type InfiniteTablePropColumnOrderNormalized = string[];
|
|
49
|
-
export type InfiniteTablePropColumnOrder =
|
|
50
|
-
| InfiniteTablePropColumnOrderNormalized
|
|
51
|
-
| true;
|
|
52
|
-
|
|
53
|
-
export type InfiniteTablePropColumnVisibility = Record<string, false>;
|
|
54
|
-
|
|
55
|
-
export type InfiniteTableColumnPinnedValues = false | 'start' | 'end';
|
|
56
|
-
|
|
57
|
-
export type InfiniteTablePropColumnPinning = Record<
|
|
58
|
-
string,
|
|
59
|
-
true | 'start' | 'end'
|
|
60
|
-
>;
|
|
61
|
-
|
|
62
|
-
export type InfiniteTableRowStyleFnParams<T> = {
|
|
63
|
-
rowIndex: number;
|
|
64
|
-
} & InfiniteTableRowInfoDataDiscriminator<T>;
|
|
65
|
-
export type InfiniteTableRowStyleFn<T> = (
|
|
66
|
-
params: InfiniteTableRowStyleFnParams<T>,
|
|
67
|
-
) => undefined | React.CSSProperties;
|
|
68
|
-
export type InfiniteTableRowClassNameFn<T> = (
|
|
69
|
-
params: InfiniteTableRowStyleFnParams<T>,
|
|
70
|
-
) => string | undefined;
|
|
71
|
-
export type InfiniteTablePropRowStyle<T> =
|
|
72
|
-
| React.CSSProperties
|
|
73
|
-
| InfiniteTableRowStyleFn<T>;
|
|
74
|
-
export type InfiniteTablePropRowClassName<T> =
|
|
75
|
-
| string
|
|
76
|
-
| InfiniteTableRowClassNameFn<T>;
|
|
77
|
-
|
|
78
|
-
export type InfiniteTableColumnAggregator<T, AggregationResultType> = Omit<
|
|
79
|
-
AggregationReducer<T, AggregationResultType>,
|
|
80
|
-
'getter' | 'id'
|
|
81
|
-
> & {
|
|
82
|
-
getter?: AggregationReducer<T, AggregationResultType>['getter'];
|
|
83
|
-
field?: keyof T;
|
|
84
|
-
};
|
|
85
|
-
|
|
86
|
-
export type InfiniteTableColumnType<T> = {
|
|
87
|
-
minWidth?: number;
|
|
88
|
-
maxWidth?: number;
|
|
89
|
-
|
|
90
|
-
filterType?: string;
|
|
91
|
-
sortType?: string;
|
|
92
|
-
dataType?: InfiniteTableDataTypeNames;
|
|
93
|
-
|
|
94
|
-
defaultWidth?: number;
|
|
95
|
-
defaultFlex?: number;
|
|
96
|
-
defaultPinned?: InfiniteTableColumnPinnedValues;
|
|
97
|
-
defaultFilterable?: boolean;
|
|
98
|
-
defaultHiddenWhenGroupedBy?: InfiniteTableColumn<T>['defaultHiddenWhenGroupedBy'];
|
|
99
|
-
|
|
100
|
-
header?: InfiniteTableColumn<T>['header'];
|
|
101
|
-
comparer?: InfiniteTableColumn<T>['comparer'];
|
|
102
|
-
draggable?: InfiniteTableColumn<T>['draggable'];
|
|
103
|
-
sortable?: InfiniteTableColumn<T>['sortable'];
|
|
104
|
-
resizable?: InfiniteTableColumn<T>['resizable'];
|
|
105
|
-
align?: InfiniteTableColumn<T>['align'];
|
|
106
|
-
verticalAlign?: InfiniteTableColumn<T>['verticalAlign'];
|
|
107
|
-
|
|
108
|
-
columnGroup?: string;
|
|
109
|
-
|
|
110
|
-
cssEllipsis?: boolean;
|
|
111
|
-
headerCssEllipsis?: boolean;
|
|
112
|
-
field?: KeyOfNoSymbol<T>;
|
|
113
|
-
|
|
114
|
-
components?: InfiniteTableColumn<T>['components'];
|
|
115
|
-
renderMenuIcon?: InfiniteTableColumn<T>['renderMenuIcon'];
|
|
116
|
-
renderSortIcon?: InfiniteTableColumn<T>['renderSortIcon'];
|
|
117
|
-
renderSelectionCheckBox?: InfiniteTableColumn<T>['renderSelectionCheckBox'];
|
|
118
|
-
renderHeaderSelectionCheckBox?: InfiniteTableColumn<T>['renderHeaderSelectionCheckBox'];
|
|
119
|
-
renderValue?: InfiniteTableColumn<T>['renderValue'];
|
|
120
|
-
render?: InfiniteTableColumn<T>['render'];
|
|
121
|
-
valueGetter?: InfiniteTableColumn<T>['valueGetter'];
|
|
122
|
-
valueFormatter?: InfiniteTableColumn<T>['valueFormatter'];
|
|
123
|
-
style?: InfiniteTableColumn<T>['style'];
|
|
124
|
-
headerStyle?: InfiniteTableColumn<T>['headerStyle'];
|
|
125
|
-
headerClassName?: InfiniteTableColumn<T>['headerClassName'];
|
|
126
|
-
};
|
|
127
|
-
export type InfiniteTablePropColumnTypesMap<T> = Map<
|
|
128
|
-
'default' | string,
|
|
129
|
-
InfiniteTableColumnType<T>
|
|
130
|
-
>;
|
|
131
|
-
export type InfiniteTablePropColumnTypes<T> = Record<
|
|
132
|
-
'default' | string,
|
|
133
|
-
InfiniteTableColumnType<T>
|
|
134
|
-
>;
|
|
135
|
-
|
|
136
|
-
export type InfiniteTableColumnSizingOptions = {
|
|
137
|
-
flex?: number;
|
|
138
|
-
width?: number;
|
|
139
|
-
minWidth?: number;
|
|
140
|
-
maxWidth?: number;
|
|
141
|
-
};
|
|
142
|
-
export type InfiniteTablePropColumnSizing = Record<
|
|
143
|
-
string,
|
|
144
|
-
InfiniteTableColumnSizingOptions
|
|
145
|
-
>;
|
|
146
|
-
|
|
147
|
-
export type InfiniteTableStateGetter<T> = () => InfiniteTableState<T>;
|
|
148
|
-
export type InfiniteTableComputedValuesGetter<T> =
|
|
149
|
-
() => InfiniteTableComputedValues<T>;
|
|
150
|
-
export type InfiniteTableActionsGetter<T> = () => InfiniteTableActions<T>;
|
|
151
|
-
export type DataSourceStateGetter<T> = () => DataSourceState<T>;
|
|
152
|
-
|
|
153
|
-
export type InfiniteTableApi<T> = {
|
|
154
|
-
get selectionApi(): InfiniteTableSelectionApi;
|
|
155
|
-
setColumnOrder: (columnOrder: InfiniteTablePropColumnOrder) => void;
|
|
156
|
-
setColumnVisibility: (
|
|
157
|
-
columnVisibility: InfiniteTablePropColumnVisibility,
|
|
158
|
-
) => void;
|
|
159
|
-
x?: T;
|
|
160
|
-
|
|
161
|
-
get scrollLeft(): number;
|
|
162
|
-
set scrollLeft(value: number);
|
|
163
|
-
|
|
164
|
-
get scrollTop(): number;
|
|
165
|
-
set scrollTop(value: number);
|
|
166
|
-
|
|
167
|
-
toggleGroupRow: (groupKeys: any[]) => void;
|
|
168
|
-
collapseGroupRow: (groupKeys: any[]) => boolean;
|
|
169
|
-
expandGroupRow: (groupKeys: any[]) => boolean;
|
|
170
|
-
|
|
171
|
-
setSortInfoForColumn: (
|
|
172
|
-
columnId: string,
|
|
173
|
-
sortInfo: DataSourceSingleSortInfo<T> | null,
|
|
174
|
-
) => void;
|
|
175
|
-
|
|
176
|
-
setPinningForColumn: (
|
|
177
|
-
columnId: string,
|
|
178
|
-
pinning: InfiniteTableColumnPinnedValues,
|
|
179
|
-
) => void;
|
|
180
|
-
|
|
181
|
-
setSortingForColumn: (columnId: string, dir: SortDir | null) => void;
|
|
182
|
-
|
|
183
|
-
setVisibilityForColumn: (columnId: string, visible: boolean) => void;
|
|
184
|
-
getVisibleColumnsCount: () => number;
|
|
185
|
-
|
|
186
|
-
scrollRowIntoView: (
|
|
187
|
-
rowIndex: number,
|
|
188
|
-
config?: {
|
|
189
|
-
scrollAdjustPosition?: ScrollAdjustPosition;
|
|
190
|
-
offset?: number;
|
|
191
|
-
},
|
|
192
|
-
) => boolean;
|
|
193
|
-
scrollColumnIntoView: (
|
|
194
|
-
colId: string,
|
|
195
|
-
config?: {
|
|
196
|
-
scrollAdjustPosition?: ScrollAdjustPosition;
|
|
197
|
-
offset?: number;
|
|
198
|
-
},
|
|
199
|
-
) => boolean;
|
|
200
|
-
scrollCellIntoView: (
|
|
201
|
-
rowIndex: number,
|
|
202
|
-
colIdOrIndex: string | number,
|
|
203
|
-
config?: {
|
|
204
|
-
scrollAdjustPosition?: ScrollAdjustPosition;
|
|
205
|
-
offset?: number;
|
|
206
|
-
},
|
|
207
|
-
) => boolean;
|
|
208
|
-
|
|
209
|
-
getState: () => InfiniteTableState<T>;
|
|
210
|
-
getDataSourceState: () => DataSourceState<T>;
|
|
211
|
-
};
|
|
212
|
-
export type InfiniteTablePropVirtualizeColumns<T> =
|
|
213
|
-
| boolean
|
|
214
|
-
| ((columns: InfiniteTableComputedColumn<T>[]) => boolean);
|
|
215
|
-
|
|
216
|
-
export type InfiniteTableInternalProps<T> = {
|
|
217
|
-
rowHeight: number;
|
|
218
|
-
___t?: T;
|
|
219
|
-
};
|
|
220
|
-
|
|
221
|
-
export type InfiniteTableColumnsMap<
|
|
222
|
-
T,
|
|
223
|
-
ColumnType = InfiniteTableColumn<T>,
|
|
224
|
-
> = Map<string, ColumnType>;
|
|
225
|
-
|
|
226
|
-
export type InfiniteTablePropColumns<T, ColumnType = InfiniteTableColumn<T>> =
|
|
227
|
-
| Record<string, ColumnType>
|
|
228
|
-
| InfiniteTableColumnsMap<T, ColumnType>;
|
|
229
|
-
|
|
230
|
-
export type InfiniteTableColumns<T> = InfiniteTablePropColumns<T>;
|
|
231
|
-
|
|
232
|
-
export type InfiniteTablePropColumnGroupsMap = Map<
|
|
233
|
-
string,
|
|
234
|
-
InfiniteTableColumnGroup
|
|
235
|
-
>;
|
|
236
|
-
export type InfiniteTablePropColumnGroupsRecord = Record<
|
|
237
|
-
string,
|
|
238
|
-
InfiniteTableColumnGroup
|
|
239
|
-
>;
|
|
240
|
-
export type InfiniteTablePropColumnGroups =
|
|
241
|
-
| InfiniteTablePropColumnGroupsRecord
|
|
242
|
-
| InfiniteTablePropColumnGroupsMap;
|
|
243
|
-
|
|
244
|
-
/**
|
|
245
|
-
* the keys is an array of strings: first string in the array is the column group id, next strings are the ids of all columns in the group
|
|
246
|
-
* the value is the id of the column to leave as visible
|
|
247
|
-
*/
|
|
248
|
-
export type InfiniteTablePropCollapsedColumnGroupsMap = Map<string[], string>;
|
|
249
|
-
export type InfiniteTablePropCollapsedColumnGroups = Map<string[], string>;
|
|
250
|
-
|
|
251
|
-
export type InfiniteTableColumnGroupHeaderRenderParams = {
|
|
252
|
-
columnGroup: InfiniteTableComputedColumnGroup;
|
|
253
|
-
};
|
|
254
|
-
export type InfiniteTableColumnGroupHeaderRenderFunction = (
|
|
255
|
-
params: InfiniteTableColumnGroupHeaderRenderParams,
|
|
256
|
-
) => Renderable;
|
|
257
|
-
|
|
258
|
-
export type InfiniteTableColumnGroup = {
|
|
259
|
-
columnGroup?: string;
|
|
260
|
-
header?: Renderable | InfiniteTableColumnGroupHeaderRenderFunction;
|
|
261
|
-
};
|
|
262
|
-
export type InfiniteTableComputedColumnGroup = InfiniteTableColumnGroup & {
|
|
263
|
-
id: string;
|
|
264
|
-
groupOffset: number;
|
|
265
|
-
computedWidth: number;
|
|
266
|
-
uniqueGroupId: string[];
|
|
267
|
-
columns: string[];
|
|
268
|
-
depth: number;
|
|
269
|
-
};
|
|
270
|
-
|
|
271
|
-
export type InfiniteTableGroupColumnGetterOptions<T> = {
|
|
272
|
-
groupIndexForColumn?: number;
|
|
273
|
-
groupByForColumn?: DataSourceGroupBy<T>;
|
|
274
|
-
selectionMode: DataSourcePropSelectionMode;
|
|
275
|
-
groupRenderStrategy: InfiniteTablePropGroupRenderStrategy;
|
|
276
|
-
groupCount: number;
|
|
277
|
-
groupBy: DataSourceGroupBy<T>[];
|
|
278
|
-
pivotBy?: DataSourcePivotBy<T>[];
|
|
279
|
-
sortable?: boolean;
|
|
280
|
-
};
|
|
281
|
-
|
|
282
|
-
export type InfiniteTablePivotColumnGetterOptions<
|
|
283
|
-
T,
|
|
284
|
-
COL_TYPE = InfiniteTableColumn<T>,
|
|
285
|
-
> = {
|
|
286
|
-
column: COL_TYPE;
|
|
287
|
-
groupBy: DataSourcePropGroupBy<T>;
|
|
288
|
-
pivotBy: DataSourcePropPivotBy<T>;
|
|
289
|
-
};
|
|
290
|
-
|
|
291
|
-
export type InfiniteTablePropGroupRenderStrategy =
|
|
292
|
-
| 'single-column'
|
|
293
|
-
// | 'single-column-extended'
|
|
294
|
-
| 'multi-column'
|
|
295
|
-
| 'inline';
|
|
296
|
-
export type InfiniteTableGroupColumnBase<T> = Partial<
|
|
297
|
-
InfiniteTableColumn<T>
|
|
298
|
-
> & {
|
|
299
|
-
renderGroupIcon?: InfiniteTableColumnRenderFunctionForGroupRows<T>;
|
|
300
|
-
id?: string;
|
|
301
|
-
};
|
|
302
|
-
export type InfiniteTablePivotColumnBase<T> = InfiniteTableColumn<T> & {
|
|
303
|
-
renderValue?: InfiniteTableColumnRenderFunction<
|
|
304
|
-
T,
|
|
305
|
-
InfiniteTableComputedPivotFinalColumn<T>
|
|
306
|
-
>;
|
|
307
|
-
// id?: string;
|
|
308
|
-
};
|
|
309
|
-
export type InfiniteTablePropGroupColumn<T> =
|
|
310
|
-
| InfiniteTableGroupColumnBase<T>
|
|
311
|
-
| InfiniteTableGroupColumnFunction<T>;
|
|
312
|
-
|
|
313
|
-
export type InfiniteTableGroupColumnFunction<T> = (
|
|
314
|
-
options: InfiniteTableGroupColumnGetterOptions<T>,
|
|
315
|
-
toggleGroupRow: (groupKeys: any[]) => void,
|
|
316
|
-
) => Partial<InfiniteTableGroupColumnBase<T>>;
|
|
317
|
-
export type InfiniteTablePropPivotColumn<
|
|
318
|
-
T,
|
|
319
|
-
COL_TYPE = InfiniteTableColumn<T>,
|
|
320
|
-
> =
|
|
321
|
-
| Partial<InfiniteTablePivotColumnBase<T>>
|
|
322
|
-
| ((
|
|
323
|
-
options: InfiniteTablePivotColumnGetterOptions<T, COL_TYPE>,
|
|
324
|
-
) => InfiniteTablePivotColumnBase<T>);
|
|
325
|
-
|
|
326
|
-
export type InfiniteTablePropComponents = {
|
|
327
|
-
LoadMask?: React.FC<React.PropsWithChildren<LoadMaskProps>>;
|
|
328
|
-
CheckBox?: React.FC<InfiniteCheckBoxProps>;
|
|
329
|
-
Menu?: React.FC<React.PropsWithChildren<MenuProps>>;
|
|
330
|
-
};
|
|
331
|
-
|
|
332
|
-
export type ScrollStopInfo = {
|
|
333
|
-
scrollTop: number;
|
|
334
|
-
firstVisibleRowIndex: number;
|
|
335
|
-
lastVisibleRowIndex: number;
|
|
336
|
-
};
|
|
337
|
-
|
|
338
|
-
export type InfiniteTablePropFilterEditors<T> = Record<
|
|
339
|
-
string,
|
|
340
|
-
React.FC<InfiniteTableFilterEditorProps<T>>
|
|
341
|
-
>;
|
|
342
|
-
|
|
343
|
-
export type InfiniteTableFilterEditorProps<T extends any> = {
|
|
344
|
-
filterType: string;
|
|
345
|
-
operator: string;
|
|
346
|
-
ariaLabel: string;
|
|
347
|
-
filterValue: T;
|
|
348
|
-
className: string;
|
|
349
|
-
onChange: (value: T | undefined) => void;
|
|
350
|
-
};
|
|
351
|
-
|
|
352
|
-
export interface InfiniteTableProps<T> {
|
|
353
|
-
columns: InfiniteTablePropColumns<T>;
|
|
354
|
-
pivotColumns?: InfiniteTableColumnsMap<T, InfiniteTablePivotColumn<T>>;
|
|
355
|
-
|
|
356
|
-
loadingText?: Renderable;
|
|
357
|
-
components?: InfiniteTablePropComponents;
|
|
358
|
-
|
|
359
|
-
viewportReservedWidth?: number;
|
|
360
|
-
onViewportReservedWidthChange?: (viewportReservedWidth: number) => void;
|
|
361
|
-
|
|
362
|
-
pivotColumn?: InfiniteTablePropPivotColumn<
|
|
363
|
-
T,
|
|
364
|
-
InfiniteTableColumn<T> & InfiniteTablePivotFinalColumn<T>
|
|
365
|
-
>;
|
|
366
|
-
|
|
367
|
-
pivotTotalColumnPosition?: InfiniteTablePropPivotTotalColumnPosition;
|
|
368
|
-
pivotGrandTotalColumnPosition?: InfiniteTablePropPivotGrandTotalColumnPosition;
|
|
369
|
-
|
|
370
|
-
groupColumn?: Partial<InfiniteTablePropGroupColumn<T>>;
|
|
371
|
-
groupRenderStrategy?: InfiniteTablePropGroupRenderStrategy;
|
|
372
|
-
hideEmptyGroupColumns?: boolean;
|
|
373
|
-
|
|
374
|
-
columnVisibility?: InfiniteTablePropColumnVisibility;
|
|
375
|
-
defaultColumnVisibility?: InfiniteTablePropColumnVisibility;
|
|
376
|
-
|
|
377
|
-
pinnedStartMaxWidth?: number;
|
|
378
|
-
pinnedEndMaxWidth?: number;
|
|
379
|
-
|
|
380
|
-
// filterableColumns?: Record<string, boolean>;
|
|
381
|
-
|
|
382
|
-
columnPinning?: InfiniteTablePropColumnPinning;
|
|
383
|
-
defaultColumnPinning?: InfiniteTablePropColumnPinning;
|
|
384
|
-
|
|
385
|
-
columnSizing?: InfiniteTablePropColumnSizing;
|
|
386
|
-
defaultColumnSizing?: InfiniteTablePropColumnSizing;
|
|
387
|
-
onColumnSizingChange?: (columnSizing: InfiniteTablePropColumnSizing) => void;
|
|
388
|
-
|
|
389
|
-
pivotColumnGroups?: InfiniteTablePropColumnGroups;
|
|
390
|
-
columnGroups?: InfiniteTablePropColumnGroups;
|
|
391
|
-
defaultColumnGroups?: InfiniteTablePropColumnGroups;
|
|
392
|
-
|
|
393
|
-
defaultCollapsedColumnGroups?: InfiniteTablePropCollapsedColumnGroups;
|
|
394
|
-
collapsedColumnGroups?: InfiniteTablePropCollapsedColumnGroups;
|
|
395
|
-
|
|
396
|
-
onScrollbarsChange?: (scrollbars: Scrollbars) => void;
|
|
397
|
-
|
|
398
|
-
// TODO P1 clarify columnVisibility as object only
|
|
399
|
-
onColumnVisibilityChange?: (
|
|
400
|
-
columnVisibility: InfiniteTablePropColumnVisibility,
|
|
401
|
-
) => void;
|
|
402
|
-
columnTypes?: InfiniteTablePropColumnTypes<T>;
|
|
403
|
-
// columnVisibilityAssumeVisible?: boolean;
|
|
404
|
-
|
|
405
|
-
showSeparatePivotColumnForSingleAggregation?: boolean;
|
|
406
|
-
|
|
407
|
-
rowHeight: number | string;
|
|
408
|
-
rowStyle?: InfiniteTablePropRowStyle<T>;
|
|
409
|
-
rowClassName?: InfiniteTablePropRowClassName<T>;
|
|
410
|
-
columnHeaderHeight: number | string;
|
|
411
|
-
domProps?: React.HTMLProps<HTMLDivElement>;
|
|
412
|
-
/**
|
|
413
|
-
* A unique identifier for the table instance. Will not be passed to the DOM.
|
|
414
|
-
*/
|
|
415
|
-
id?: string;
|
|
416
|
-
showZebraRows?: boolean;
|
|
417
|
-
showHoverRows?: boolean;
|
|
418
|
-
sortable?: boolean;
|
|
419
|
-
|
|
420
|
-
keyboardNavigation?: InfiniteTablePropKeyboardNavigation;
|
|
421
|
-
keyboardSelection?: InfiniteTablePropKeyboardSelection;
|
|
422
|
-
defaultActiveRowIndex?: number | null;
|
|
423
|
-
activeRowIndex?: number | null;
|
|
424
|
-
onActiveRowIndexChange?: (activeRowIndex: number) => void;
|
|
425
|
-
onActiveCellIndexChange?: (activeCellIndex: [number, number]) => void;
|
|
426
|
-
activeCellIndex?: [number, number] | null;
|
|
427
|
-
defaultActiveCellIndex?: [number, number] | null;
|
|
428
|
-
draggableColumns?: boolean;
|
|
429
|
-
header?: boolean;
|
|
430
|
-
headerOptions?: InfiniteTablePropHeaderOptions;
|
|
431
|
-
focusedClassName?: string;
|
|
432
|
-
focusedWithinClassName?: string;
|
|
433
|
-
focusedStyle?: React.CSSProperties;
|
|
434
|
-
focusedWithinStyle?: React.CSSProperties;
|
|
435
|
-
columnCssEllipsis?: boolean;
|
|
436
|
-
columnHeaderCssEllipsis?: boolean;
|
|
437
|
-
columnDefaultWidth?: number;
|
|
438
|
-
columnMinWidth?: number;
|
|
439
|
-
columnMaxWidth?: number;
|
|
440
|
-
|
|
441
|
-
hideColumnWhenGrouped?: boolean;
|
|
442
|
-
|
|
443
|
-
resizableColumns?: boolean;
|
|
444
|
-
virtualizeColumns?: InfiniteTablePropVirtualizeColumns<T>;
|
|
445
|
-
virtualizeRows?: boolean;
|
|
446
|
-
|
|
447
|
-
onSelfFocus?: (event: React.FocusEvent<HTMLDivElement>) => void;
|
|
448
|
-
onSelfBlur?: (event: React.FocusEvent<HTMLDivElement>) => void;
|
|
449
|
-
onFocusWithin?: (event: React.FocusEvent<HTMLDivElement>) => void;
|
|
450
|
-
onBlurWithin?: (event: React.FocusEvent<HTMLDivElement>) => void;
|
|
451
|
-
|
|
452
|
-
onScrollToTop?: () => void;
|
|
453
|
-
onScrollToBottom?: () => void;
|
|
454
|
-
scrollStopDelay?: number;
|
|
455
|
-
onScrollStop?: (param: ScrollStopInfo) => void;
|
|
456
|
-
scrollToBottomOffset?: number;
|
|
457
|
-
|
|
458
|
-
defaultColumnOrder?: InfiniteTablePropColumnOrder;
|
|
459
|
-
columnOrder?: InfiniteTablePropColumnOrder;
|
|
460
|
-
onColumnOrderChange?: (
|
|
461
|
-
columnOrder: InfiniteTablePropColumnOrderNormalized,
|
|
462
|
-
) => void;
|
|
463
|
-
onRowHeightChange?: (rowHeight: number) => void;
|
|
464
|
-
|
|
465
|
-
filterEditors?: InfiniteTablePropFilterEditors<T>;
|
|
466
|
-
|
|
467
|
-
onReady?: (api: InfiniteTableApi<T>) => void;
|
|
468
|
-
|
|
469
|
-
rowProps?:
|
|
470
|
-
| React.HTMLProps<HTMLDivElement>
|
|
471
|
-
| ((
|
|
472
|
-
rowArgs: InfiniteTableRowStyleFnParams<T>,
|
|
473
|
-
) => React.HTMLProps<HTMLDivElement>);
|
|
474
|
-
|
|
475
|
-
licenseKey?: string;
|
|
476
|
-
|
|
477
|
-
scrollTopKey?: string | number;
|
|
478
|
-
autoSizeColumnsKey?: InfiniteTablePropAutoSizeColumnsKey;
|
|
479
|
-
|
|
480
|
-
getColumContextMenuItems?: (params: {
|
|
481
|
-
column: InfiniteTableComputedColumn<T>;
|
|
482
|
-
api: InfiniteTableApi<T>;
|
|
483
|
-
getState: () => InfiniteTableState<T>;
|
|
484
|
-
getComputed: () => InfiniteTableComputedValues<T>;
|
|
485
|
-
actions: InfiniteTableActions<T>;
|
|
486
|
-
}) => MenuProps['items'];
|
|
487
|
-
}
|
|
488
|
-
|
|
489
|
-
export type InfiniteTablePropKeyboardNavigation = 'cell' | 'row' | false;
|
|
490
|
-
export type InfiniteTablePropKeyboardSelection = boolean;
|
|
491
|
-
|
|
492
|
-
export type InfiniteTablePropHeaderOptions = {
|
|
493
|
-
alwaysReserveSpaceForSortIcon: boolean;
|
|
494
|
-
};
|
|
495
|
-
|
|
496
|
-
export type InfiniteTablePropAutoSizeColumnsKey =
|
|
497
|
-
| string
|
|
498
|
-
| number
|
|
499
|
-
| {
|
|
500
|
-
key: string | number;
|
|
501
|
-
columnsToSkip?: string[];
|
|
502
|
-
columnsToResize?: string[];
|
|
503
|
-
includeHeader?: boolean;
|
|
504
|
-
};
|
|
505
|
-
|
|
506
|
-
export type Scrollbars = {
|
|
507
|
-
vertical: boolean;
|
|
508
|
-
horizontal: boolean;
|
|
509
|
-
};
|
|
510
|
-
|
|
511
|
-
export type ScrollAdjustPosition = 'start' | 'end' | 'center';
|
|
@@ -1,195 +0,0 @@
|
|
|
1
|
-
import type { KeyboardEvent, MouseEvent, MutableRefObject } from 'react';
|
|
2
|
-
import { DataSourceGroupBy, DataSourceProps } from '../../DataSource/types';
|
|
3
|
-
import { ReactHeadlessTableRenderer } from '../../HeadlessTable/ReactHeadlessTableRenderer';
|
|
4
|
-
import { ComponentStateActions } from '../../hooks/useComponentState/types';
|
|
5
|
-
import { CellPosition } from '../../types/CellPosition';
|
|
6
|
-
import type { NonUndefined } from '../../types/NonUndefined';
|
|
7
|
-
import { Renderable } from '../../types/Renderable';
|
|
8
|
-
import type { ScrollPosition } from '../../types/ScrollPosition';
|
|
9
|
-
import type { Size } from '../../types/Size';
|
|
10
|
-
import { SubscriptionCallback } from '../../types/SubscriptionCallback';
|
|
11
|
-
|
|
12
|
-
import { MatrixBrain } from '../../VirtualBrain/MatrixBrain';
|
|
13
|
-
import { ScrollListener } from '../../VirtualBrain/ScrollListener';
|
|
14
|
-
|
|
15
|
-
import {
|
|
16
|
-
InfiniteTableColumn,
|
|
17
|
-
InfiniteTableComputedColumn,
|
|
18
|
-
} from './InfiniteTableColumn';
|
|
19
|
-
import type {
|
|
20
|
-
InfiniteTableColumnGroup,
|
|
21
|
-
InfiniteTablePropColumnGroupsMap,
|
|
22
|
-
InfiniteTablePropColumnPinning,
|
|
23
|
-
InfiniteTablePropColumnSizing,
|
|
24
|
-
InfiniteTableColumnsMap,
|
|
25
|
-
InfiniteTablePropColumnTypes,
|
|
26
|
-
InfiniteTablePropColumnVisibility,
|
|
27
|
-
InfiniteTableProps,
|
|
28
|
-
} from './InfiniteTableProps';
|
|
29
|
-
|
|
30
|
-
export type GroupByMap<T> = Map<
|
|
31
|
-
keyof T,
|
|
32
|
-
{ groupBy: DataSourceGroupBy<T>; groupIndex: number }
|
|
33
|
-
>;
|
|
34
|
-
|
|
35
|
-
export interface InfiniteTableSetupState<T> {
|
|
36
|
-
renderer: ReactHeadlessTableRenderer;
|
|
37
|
-
onRenderUpdater: SubscriptionCallback<Renderable>;
|
|
38
|
-
propsCache: Map<keyof InfiniteTableProps<T>, WeakMap<any, any>>;
|
|
39
|
-
columnsWhenInlineGroupRenderStrategy?: Map<string, InfiniteTableColumn<T>>;
|
|
40
|
-
domRef: MutableRefObject<HTMLDivElement | null>;
|
|
41
|
-
scrollerDOMRef: MutableRefObject<HTMLDivElement | null>;
|
|
42
|
-
portalDOMRef: MutableRefObject<HTMLDivElement | null>;
|
|
43
|
-
activeCellIndicatorDOMRef: MutableRefObject<HTMLDivElement | null>;
|
|
44
|
-
onRowHeightCSSVarChange: SubscriptionCallback<number>;
|
|
45
|
-
onColumnMenuClick: SubscriptionCallback<{
|
|
46
|
-
target: HTMLElement;
|
|
47
|
-
column: InfiniteTableComputedColumn<T>;
|
|
48
|
-
}>;
|
|
49
|
-
columnContextMenuVisibleForColumnId: string | null;
|
|
50
|
-
onColumnHeaderHeightCSSVarChange: SubscriptionCallback<number>;
|
|
51
|
-
cellClick: SubscriptionCallback<CellPosition & { event: MouseEvent }>;
|
|
52
|
-
cellMouseDown: SubscriptionCallback<CellPosition & { event: MouseEvent }>;
|
|
53
|
-
keyDown: SubscriptionCallback<KeyboardEvent>;
|
|
54
|
-
columnsWhenGrouping?: InfiniteTableColumnsMap<T>;
|
|
55
|
-
bodySize: Size;
|
|
56
|
-
brain: MatrixBrain;
|
|
57
|
-
headerBrain: MatrixBrain;
|
|
58
|
-
focused: boolean;
|
|
59
|
-
ready: boolean;
|
|
60
|
-
columnReorderDragColumnId: false | string;
|
|
61
|
-
columnVisibilityForGrouping: Record<string, false>;
|
|
62
|
-
focusedWithin: boolean;
|
|
63
|
-
scrollPosition: ScrollPosition;
|
|
64
|
-
pinnedStartScrollListener: ScrollListener;
|
|
65
|
-
pinnedEndScrollListener: ScrollListener;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
export type InfiniteTableColumnGroupWithDepth = InfiniteTableColumnGroup & {
|
|
69
|
-
depth: number;
|
|
70
|
-
};
|
|
71
|
-
export type InfiniteTableColumnGroupsDepthsMap = Map<string, number>;
|
|
72
|
-
|
|
73
|
-
export type InfiniteTablePropPivotTotalColumnPosition = false | 'start' | 'end';
|
|
74
|
-
export type InfiniteTablePropPivotGrandTotalColumnPosition =
|
|
75
|
-
InfiniteTablePropPivotTotalColumnPosition;
|
|
76
|
-
|
|
77
|
-
export interface InfiniteTableMappedState<T> {
|
|
78
|
-
id: InfiniteTableProps<T>['id'];
|
|
79
|
-
scrollTopKey: InfiniteTableProps<T>['scrollTopKey'];
|
|
80
|
-
viewportReservedWidth: InfiniteTableProps<T>['viewportReservedWidth'];
|
|
81
|
-
resizableColumns: InfiniteTableProps<T>['resizableColumns'];
|
|
82
|
-
groupColumn: InfiniteTableProps<T>['groupColumn'];
|
|
83
|
-
headerOptions: NonUndefined<InfiniteTableProps<T>['headerOptions']>;
|
|
84
|
-
|
|
85
|
-
onScrollbarsChange: InfiniteTableProps<T>['onScrollbarsChange'];
|
|
86
|
-
|
|
87
|
-
getColumContextMenuItems: InfiniteTableProps<T>['getColumContextMenuItems'];
|
|
88
|
-
|
|
89
|
-
columnPinning: InfiniteTablePropColumnPinning;
|
|
90
|
-
|
|
91
|
-
loadingText: InfiniteTableProps<T>['loadingText'];
|
|
92
|
-
components: InfiniteTableProps<T>['components'];
|
|
93
|
-
columns: InfiniteTableColumnsMap<T>;
|
|
94
|
-
pivotColumns: InfiniteTableProps<T>['pivotColumns'];
|
|
95
|
-
onReady: InfiniteTableProps<T>['onReady'];
|
|
96
|
-
|
|
97
|
-
onSelfFocus: InfiniteTableProps<T>['onSelfFocus'];
|
|
98
|
-
onSelfBlur: InfiniteTableProps<T>['onSelfBlur'];
|
|
99
|
-
onFocusWithin: InfiniteTableProps<T>['onFocusWithin'];
|
|
100
|
-
onBlurWithin: InfiniteTableProps<T>['onBlurWithin'];
|
|
101
|
-
|
|
102
|
-
autoSizeColumnsKey: InfiniteTableProps<T>['autoSizeColumnsKey'];
|
|
103
|
-
|
|
104
|
-
activeRowIndex: InfiniteTableProps<T>['activeRowIndex'];
|
|
105
|
-
activeCellIndex: InfiniteTableProps<T>['activeCellIndex'];
|
|
106
|
-
scrollStopDelay: NonUndefined<InfiniteTableProps<T>['scrollStopDelay']>;
|
|
107
|
-
onScrollToTop: InfiniteTableProps<T>['onScrollToTop'];
|
|
108
|
-
onScrollToBottom: InfiniteTableProps<T>['onScrollToBottom'];
|
|
109
|
-
onScrollStop: InfiniteTableProps<T>['onScrollStop'];
|
|
110
|
-
scrollToBottomOffset: InfiniteTableProps<T>['scrollToBottomOffset'];
|
|
111
|
-
|
|
112
|
-
filterEditors: NonUndefined<InfiniteTableProps<T>['filterEditors']>;
|
|
113
|
-
|
|
114
|
-
focusedClassName: InfiniteTableProps<T>['focusedClassName'];
|
|
115
|
-
focusedWithinClassName: InfiniteTableProps<T>['focusedWithinClassName'];
|
|
116
|
-
focusedStyle: InfiniteTableProps<T>['focusedStyle'];
|
|
117
|
-
focusedWithinStyle: InfiniteTableProps<T>['focusedWithinStyle'];
|
|
118
|
-
showSeparatePivotColumnForSingleAggregation: NonUndefined<
|
|
119
|
-
InfiniteTableProps<T>['showSeparatePivotColumnForSingleAggregation']
|
|
120
|
-
>;
|
|
121
|
-
domProps: InfiniteTableProps<T>['domProps'];
|
|
122
|
-
rowStyle: InfiniteTableProps<T>['rowStyle'];
|
|
123
|
-
rowProps: InfiniteTableProps<T>['rowProps'];
|
|
124
|
-
rowClassName: InfiniteTableProps<T>['rowClassName'];
|
|
125
|
-
pinnedStartMaxWidth: InfiniteTableProps<T>['pinnedStartMaxWidth'];
|
|
126
|
-
pinnedEndMaxWidth: InfiniteTableProps<T>['pinnedEndMaxWidth'];
|
|
127
|
-
pivotColumn: InfiniteTableProps<T>['pivotColumn'];
|
|
128
|
-
pivotColumnGroups: InfiniteTablePropColumnGroupsMap;
|
|
129
|
-
|
|
130
|
-
columnMinWidth: NonUndefined<InfiniteTableProps<T>['columnMinWidth']>;
|
|
131
|
-
columnMaxWidth: NonUndefined<InfiniteTableProps<T>['columnMaxWidth']>;
|
|
132
|
-
columnDefaultWidth: NonUndefined<InfiniteTableProps<T>['columnDefaultWidth']>;
|
|
133
|
-
columnCssEllipsis: NonUndefined<InfiniteTableProps<T>['columnCssEllipsis']>;
|
|
134
|
-
|
|
135
|
-
draggableColumns: NonUndefined<InfiniteTableProps<T>['draggableColumns']>;
|
|
136
|
-
sortable: NonUndefined<InfiniteTableProps<T>['sortable']>;
|
|
137
|
-
hideEmptyGroupColumns: NonUndefined<
|
|
138
|
-
InfiniteTableProps<T>['hideEmptyGroupColumns']
|
|
139
|
-
>;
|
|
140
|
-
hideColumnWhenGrouped: NonUndefined<
|
|
141
|
-
InfiniteTableProps<T>['hideColumnWhenGrouped']
|
|
142
|
-
>;
|
|
143
|
-
keyboardSelection: NonUndefined<InfiniteTableProps<T>['keyboardSelection']>;
|
|
144
|
-
columnOrder: NonUndefined<InfiniteTableProps<T>['columnOrder']>;
|
|
145
|
-
showZebraRows: NonUndefined<InfiniteTableProps<T>['showZebraRows']>;
|
|
146
|
-
showHoverRows: NonUndefined<InfiniteTableProps<T>['showHoverRows']>;
|
|
147
|
-
header: NonUndefined<InfiniteTableProps<T>['header']>;
|
|
148
|
-
virtualizeColumns: NonUndefined<InfiniteTableProps<T>['virtualizeColumns']>;
|
|
149
|
-
rowHeight: number;
|
|
150
|
-
columnHeaderHeight: number;
|
|
151
|
-
licenseKey: NonUndefined<InfiniteTableProps<T>['licenseKey']>;
|
|
152
|
-
columnVisibility: InfiniteTablePropColumnVisibility;
|
|
153
|
-
|
|
154
|
-
columnSizing: InfiniteTablePropColumnSizing;
|
|
155
|
-
columnTypes: InfiniteTablePropColumnTypes<T>;
|
|
156
|
-
columnGroups: InfiniteTablePropColumnGroupsMap;
|
|
157
|
-
collapsedColumnGroups: NonUndefined<
|
|
158
|
-
InfiniteTableProps<T>['collapsedColumnGroups']
|
|
159
|
-
>;
|
|
160
|
-
pivotTotalColumnPosition: NonUndefined<
|
|
161
|
-
InfiniteTableProps<T>['pivotTotalColumnPosition']
|
|
162
|
-
>;
|
|
163
|
-
pivotGrandTotalColumnPosition: InfiniteTableProps<T>['pivotGrandTotalColumnPosition'];
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
export interface InfiniteTableDerivedState<T> {
|
|
167
|
-
groupBy: DataSourceProps<T>['groupBy'];
|
|
168
|
-
computedColumns: Map<string, InfiniteTableColumn<T>>;
|
|
169
|
-
initialColumns: InfiniteTableProps<T>['columns'];
|
|
170
|
-
|
|
171
|
-
groupRenderStrategy: NonUndefined<
|
|
172
|
-
InfiniteTableProps<T>['groupRenderStrategy']
|
|
173
|
-
>;
|
|
174
|
-
|
|
175
|
-
columnHeaderCssEllipsis: NonUndefined<
|
|
176
|
-
InfiniteTableProps<T>['columnHeaderCssEllipsis']
|
|
177
|
-
>;
|
|
178
|
-
keyboardNavigation: NonUndefined<InfiniteTableProps<T>['keyboardNavigation']>;
|
|
179
|
-
|
|
180
|
-
columnGroupsDepthsMap: InfiniteTableColumnGroupsDepthsMap;
|
|
181
|
-
columnGroupsMaxDepth: number;
|
|
182
|
-
computedColumnGroups: InfiniteTablePropColumnGroupsMap;
|
|
183
|
-
|
|
184
|
-
rowHeightCSSVar: string;
|
|
185
|
-
columnHeaderHeightCSSVar: string;
|
|
186
|
-
controlledColumnVisibility: boolean;
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
export type InfiniteTableActions<T> = ComponentStateActions<
|
|
190
|
-
InfiniteTableState<T>
|
|
191
|
-
>;
|
|
192
|
-
export interface InfiniteTableState<T>
|
|
193
|
-
extends InfiniteTableMappedState<T>,
|
|
194
|
-
InfiniteTableDerivedState<T>,
|
|
195
|
-
InfiniteTableSetupState<T> {}
|