@infinite-table/infinite-react 8.0.3 → 8.0.4
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/index.d.ts +9 -1
- package/index.dev.js +39 -2
- package/index.dev.mjs +36 -2
- package/index.js +8 -8
- package/index.mjs +5 -5
- package/package.json +2 -2
package/index.d.ts
CHANGED
|
@@ -3411,6 +3411,10 @@ declare namespace InfiniteTableBody {
|
|
|
3411
3411
|
var rowHoverClassName: string[];
|
|
3412
3412
|
}
|
|
3413
3413
|
|
|
3414
|
+
declare function useInfiniteTableApi<T>(): InfiniteTableApi<T>;
|
|
3415
|
+
|
|
3416
|
+
declare function useInfiniteColumnApi<T = unknown>(columnId: string): InfiniteTableColumnApi<T> | null;
|
|
3417
|
+
|
|
3414
3418
|
declare const InfiniteTableClassName: string;
|
|
3415
3419
|
declare const InfiniteTableComponent: React$1.MemoExoticComponent<(<T>() => React$1.JSX.Element)>;
|
|
3416
3420
|
type InfiniteTableComponent = {
|
|
@@ -3479,6 +3483,8 @@ declare function useDataSourceSelector<R extends unknown>(selector: (ctx: DataSo
|
|
|
3479
3483
|
|
|
3480
3484
|
declare function useMasterRowInfo<T = any>(): InfiniteTableRowInfo<T> | undefined;
|
|
3481
3485
|
|
|
3486
|
+
declare function useDataSourceApi<T>(): DataSourceApi<T>;
|
|
3487
|
+
|
|
3482
3488
|
declare const useManagedDataSource: (props: object) => {
|
|
3483
3489
|
contextValue: {
|
|
3484
3490
|
componentState: {
|
|
@@ -7220,6 +7226,8 @@ type ColumnCellValues = {
|
|
|
7220
7226
|
formattedValue: any;
|
|
7221
7227
|
};
|
|
7222
7228
|
type InfiniteTableColumnApi<_T> = {
|
|
7229
|
+
getColumnId(): string | null;
|
|
7230
|
+
getComputedColumn(): InfiniteTableComputedColumn<_T> | null;
|
|
7223
7231
|
showContextMenu: (target: EventTarget | HTMLElement) => void;
|
|
7224
7232
|
toggleContextMenu: (target: EventTarget | HTMLElement) => void;
|
|
7225
7233
|
hideContextMenu: () => void;
|
|
@@ -8169,4 +8177,4 @@ declare const components: {
|
|
|
8169
8177
|
NumberFilterEditor: typeof NumberFilterEditor;
|
|
8170
8178
|
};
|
|
8171
8179
|
|
|
8172
|
-
export { type AdvancedAlignable, AutoScroller, type AutoScrollerConfig, CellSelectionState, type CellSelectionStateObject, type ColumnTypeWithInherit, DRAG_ITEM_ATTRIBUTE, DataClient, DataSource, type DataSourceAction, DataSourceActionType, type DataSourceAggregationReducer, type DataSourceApi, type DataSourceCRUDParam, type DataSourceCallback_BaseParam, type DataSourceComponentActions, type DataSourceContextValue, type DataSourceData, type DataSourceDataFn, type DataSourceDataParams, type DataSourceDataParamsChanges, type DataSourceDebugWarningKey, type DataSourceDerivedState, type DataSourceFilterFunctionParam, type DataSourceFilterOperator, type DataSourceFilterOperatorFunction, type DataSourceFilterOperatorFunctionParam, type DataSourceFilterType, type DataSourceFilterValueItem, type DataSourceFilterValueItemValueGetter, type DataSourceGroupBy, type DataSourceGroupRowsList, type DataSourceInsertParam, type DataSourceLivePaginationCursorFn, type DataSourceLivePaginationCursorParams, type DataSourceLivePaginationCursorValue, type DataSourceMappedState, type DataSourceMappings, type DataSourceMasterDetailContextValue, type DataSourcePivotBy, type DataSourcePropAggregationReducers, type DataSourcePropCellSelection, type DataSourcePropCellSelection_MultiCell, type DataSourcePropCellSelection_SingleCell, type DataSourcePropFilterFunction, type DataSourcePropFilterTypes, type DataSourcePropFilterValue, type DataSourcePropGroupBy, type DataSourcePropGroupRowsState, type DataSourcePropGroupRowsStateObject, type DataSourcePropIsNodeExpanded, type DataSourcePropIsNodeReadOnly, type DataSourcePropIsNodeSelectable, type DataSourcePropIsNodeSelected, type DataSourcePropIsRowSelected, type DataSourcePropLivePaginationCursor, type DataSourcePropMultiRowSelectionChangeParamType, type DataSourcePropOnCellSelectionChange, type DataSourcePropOnCellSelectionChange_MultiCell, type DataSourcePropOnCellSelectionChange_SingleCell, type DataSourcePropOnRowSelectionChange, type DataSourcePropOnRowSelectionChange_MultiRow, type DataSourcePropOnRowSelectionChange_SingleRow, type DataSourcePropOnTreeSelectionChange, type DataSourcePropOnTreeSelectionChange_MultiNode, type DataSourcePropOnTreeSelectionChange_SingleNode, type DataSourcePropPivotBy, type DataSourcePropRowInfoReducers, type DataSourcePropRowSelection, type DataSourcePropRowSelection_MultiRow, type DataSourcePropRowSelection_SingleRow, type DataSourcePropSelectionMode, type DataSourcePropShouldReloadData, type DataSourcePropShouldReloadDataObject, type DataSourcePropSortFn, type DataSourcePropSortInfo, type DataSourcePropSortTypes, type DataSourcePropTreeFilterFunction, type DataSourcePropTreeSelection, type DataSourcePropTreeSelection_MultiNode, type DataSourcePropTreeSelection_SingleNode, type DataSourceProps, type DataSourcePropsNotAvailableInTreeDataSource, type DataSourcePropsWithChildren, type DataSourceRawReducer, type DataSourceRemoteData, type DataSourceRowInfoReducer, type DataSourceSetupState, type DataSourceSingleSortInfo, type DataSourceSortInfo, type DataSourceStableContextValue, type DataSourceState, type DataSourceUpdateParam, type DebugLogger, type DebugTimingKey, type DebugWarningPayload, DeepMap, type DevToolsDataSourceOverrides, type DevToolsGenericMessage, type DevToolsHookFn, type DevToolsHookFnOptions, type DevToolsHostPageLogMessage, type DevToolsHostPageLogMessagePayload, type DevToolsHostPageMessage, type DevToolsHostPageMessagePayload, type DevToolsHostPageMessageType, type DevToolsInfiniteOverrides, type DevToolsMessageAddress, type DevToolsOverrides, DragDropProvider, type DragDropSourceAndTarget, DragInteractionTarget, DragList, type DragListProps, type DragProxyMoveParams, type DragProxyRenderParams, type DragProxySetupParams, type DragProxySetupResult, type ElementContainerGetter, type ErrorCodeKey, FixedSizeSet, FlashingColumnCell, GroupRowsState, INTERNAL_MatrixDebugger, type InfiniteColumnEditorContextType, InfiniteTable, type InfiniteTableAction, InfiniteTableActionType, type InfiniteTableApi, type InfiniteTableCellSelectionApi, InfiniteTableClassName, type InfiniteTableColumn, type InfiniteTableColumnAggregator, type InfiniteTableColumnApi, type InfiniteTableColumnCellContextType, type InfiniteTableColumnComparer, type InfiniteTableColumnGroup, type InfiniteTableColumnRenderFunctionForGroupRows, type InfiniteTableColumnRenderFunctionForNormalRows, type InfiniteTableColumnRenderValueParam, type InfiniteTableColumnRowspanParam, type InfiniteTableColumnSizingOptions, type InfiniteTableColumnValueFormatterParams, type InfiniteTableColumnValueGetterParams, InfiniteTableComponent, type InfiniteTableComputedColumn, type InfiniteTableComputedValues, type InfiniteTableContextValue, type InfiniteTableDebugWarningKey, type InfiniteTableGroupColumnBase, type InfiniteTableGroupColumnFunction, type InfiniteTableGroupColumnGetterOptions, type InfiniteTableKeyboardNavigationApi, type InfiniteTablePivotColumn, type InfiniteTablePropAutoSizeColumnsKey, type InfiniteTablePropColumnGroupVisibility, type InfiniteTablePropColumnGroups, type InfiniteTablePropColumnOrder, type InfiniteTablePropColumnPinning, type InfiniteTablePropColumnSizing, type InfiniteTablePropColumnTypes, type InfiniteTablePropColumnVisibility, type InfiniteTablePropColumns, type InfiniteTablePropComponents, type InfiniteTablePropGetCellContextMenuItems, type InfiniteTablePropGetColumnMenuItems, type InfiniteTablePropGetContextMenuItems, type InfiniteTablePropGroupColumn, type InfiniteTablePropGroupRenderStrategy, type InfiniteTablePropHeaderOptions, type InfiniteTablePropKeyboardNavigation, type InfiniteTablePropKeyboardShorcut, type InfiniteTablePropMultiSortBehavior, type InfiniteTablePropRowClassName, type InfiniteTablePropRowStyle, type InfiniteTableProps, type InfiniteTablePropsNotAvailableInTreeGrid, type InfiniteTableRowClassNameFn, type InfiniteTableRowDetailApi, type InfiniteTableRowInfo, type InfiniteTableRowSelectionApi, type InfiniteTableRowStyleFn, type InfiniteTableState, type InfiniteTable_HasGrouping_RowInfoGroup, type InfiniteTable_HasGrouping_RowInfoNormal, type InfiniteTable_Tree_RowInfoLeafNode, type InfiniteTable_Tree_RowInfoNode, type InfiniteTable_Tree_RowInfoParentNode, type LazyGroupDataDeepMap, type LazyGroupDataItem, type LazyRowInfoGroup, Menu, type MenuChildrenFnParam, type MenuColumn, type MenuColumnRenderParam, type MenuDecoration, type MenuIconProps, type MenuItemActionContext, type MenuItemDefinition, type MenuItemObject, type MenuProps, type MenuRenderable, type MenuRuntimeItem, type MenuRuntimeItemSelectable, type MenuSeparator, type OverlayShowParams, RowDetailCache, RowDetailState, type RowDetailStateObject, RowDisabledState, type RowDisabledStateObject, RowSelectionState, type ScrollStopInfo, type Scrollbars, type ShowOverlayFn, type TableRenderRange, TreeDataSource, type TreeDataSourceProps, TreeExpandState, type TreeExpandStateValue, TreeGrid, type TreeGridOnlyProps, type TreeGridProps, TreeSelectionState, type TreeSelectionStateObject, type TreeSelectionValue, type UpdateChildrenFn, type UpdateOverlayContentFn, type WaitForNodeOptions, WeakFixedSizeSet, alignNode, components, createDefaultProxy, createFlashingColumnCellComponent, debounce, debug, defaultDragProxyMove, defaultFilterTypes, eventMatchesKeyboardShortcut, filterDataArray, defaultFilterTypes as filterTypes, flatten, buildManagedComponent as getComponentStateRoot, group, interceptMap, keyboardShortcuts, multisort, multisortNested, queryKeyToCacheKey, toTreeDataArray, useManagedComponentState as useComponentState, useDataSourceInternal, useDataSourceSelector, useDataSourceState, useDragDropProvider, useDragListContext, useEffectWhen, useEffectWhenSameDeps, useEffectWithChanges, useEffectWithObject, useGridScroll, useInfiniteColumnCell, useInfiniteColumnEditor, useInfiniteColumnFilterEditor, useInfiniteHeaderCell, useInfinitePortalContainer, useLayoutEffectWithChanges, useManagedDataSource, useMasterRowInfo, useOverlay, useOverlayPortal, usePrevious, useRowInfoReducers, useVisibleColumnSizes, withSelectedLeafNodesOnly };
|
|
8180
|
+
export { type AdvancedAlignable, AutoScroller, type AutoScrollerConfig, CellSelectionState, type CellSelectionStateObject, type ColumnTypeWithInherit, DRAG_ITEM_ATTRIBUTE, DataClient, DataSource, type DataSourceAction, DataSourceActionType, type DataSourceAggregationReducer, type DataSourceApi, type DataSourceCRUDParam, type DataSourceCallback_BaseParam, type DataSourceComponentActions, type DataSourceContextValue, type DataSourceData, type DataSourceDataFn, type DataSourceDataParams, type DataSourceDataParamsChanges, type DataSourceDebugWarningKey, type DataSourceDerivedState, type DataSourceFilterFunctionParam, type DataSourceFilterOperator, type DataSourceFilterOperatorFunction, type DataSourceFilterOperatorFunctionParam, type DataSourceFilterType, type DataSourceFilterValueItem, type DataSourceFilterValueItemValueGetter, type DataSourceGroupBy, type DataSourceGroupRowsList, type DataSourceInsertParam, type DataSourceLivePaginationCursorFn, type DataSourceLivePaginationCursorParams, type DataSourceLivePaginationCursorValue, type DataSourceMappedState, type DataSourceMappings, type DataSourceMasterDetailContextValue, type DataSourcePivotBy, type DataSourcePropAggregationReducers, type DataSourcePropCellSelection, type DataSourcePropCellSelection_MultiCell, type DataSourcePropCellSelection_SingleCell, type DataSourcePropFilterFunction, type DataSourcePropFilterTypes, type DataSourcePropFilterValue, type DataSourcePropGroupBy, type DataSourcePropGroupRowsState, type DataSourcePropGroupRowsStateObject, type DataSourcePropIsNodeExpanded, type DataSourcePropIsNodeReadOnly, type DataSourcePropIsNodeSelectable, type DataSourcePropIsNodeSelected, type DataSourcePropIsRowSelected, type DataSourcePropLivePaginationCursor, type DataSourcePropMultiRowSelectionChangeParamType, type DataSourcePropOnCellSelectionChange, type DataSourcePropOnCellSelectionChange_MultiCell, type DataSourcePropOnCellSelectionChange_SingleCell, type DataSourcePropOnRowSelectionChange, type DataSourcePropOnRowSelectionChange_MultiRow, type DataSourcePropOnRowSelectionChange_SingleRow, type DataSourcePropOnTreeSelectionChange, type DataSourcePropOnTreeSelectionChange_MultiNode, type DataSourcePropOnTreeSelectionChange_SingleNode, type DataSourcePropPivotBy, type DataSourcePropRowInfoReducers, type DataSourcePropRowSelection, type DataSourcePropRowSelection_MultiRow, type DataSourcePropRowSelection_SingleRow, type DataSourcePropSelectionMode, type DataSourcePropShouldReloadData, type DataSourcePropShouldReloadDataObject, type DataSourcePropSortFn, type DataSourcePropSortInfo, type DataSourcePropSortTypes, type DataSourcePropTreeFilterFunction, type DataSourcePropTreeSelection, type DataSourcePropTreeSelection_MultiNode, type DataSourcePropTreeSelection_SingleNode, type DataSourceProps, type DataSourcePropsNotAvailableInTreeDataSource, type DataSourcePropsWithChildren, type DataSourceRawReducer, type DataSourceRemoteData, type DataSourceRowInfoReducer, type DataSourceSetupState, type DataSourceSingleSortInfo, type DataSourceSortInfo, type DataSourceStableContextValue, type DataSourceState, type DataSourceUpdateParam, type DebugLogger, type DebugTimingKey, type DebugWarningPayload, DeepMap, type DevToolsDataSourceOverrides, type DevToolsGenericMessage, type DevToolsHookFn, type DevToolsHookFnOptions, type DevToolsHostPageLogMessage, type DevToolsHostPageLogMessagePayload, type DevToolsHostPageMessage, type DevToolsHostPageMessagePayload, type DevToolsHostPageMessageType, type DevToolsInfiniteOverrides, type DevToolsMessageAddress, type DevToolsOverrides, DragDropProvider, type DragDropSourceAndTarget, DragInteractionTarget, DragList, type DragListProps, type DragProxyMoveParams, type DragProxyRenderParams, type DragProxySetupParams, type DragProxySetupResult, type ElementContainerGetter, type ErrorCodeKey, FixedSizeSet, FlashingColumnCell, GroupRowsState, INTERNAL_MatrixDebugger, type InfiniteColumnEditorContextType, InfiniteTable, type InfiniteTableAction, InfiniteTableActionType, type InfiniteTableApi, type InfiniteTableCellSelectionApi, InfiniteTableClassName, type InfiniteTableColumn, type InfiniteTableColumnAggregator, type InfiniteTableColumnApi, type InfiniteTableColumnCellContextType, type InfiniteTableColumnComparer, type InfiniteTableColumnGroup, type InfiniteTableColumnRenderFunctionForGroupRows, type InfiniteTableColumnRenderFunctionForNormalRows, type InfiniteTableColumnRenderValueParam, type InfiniteTableColumnRowspanParam, type InfiniteTableColumnSizingOptions, type InfiniteTableColumnValueFormatterParams, type InfiniteTableColumnValueGetterParams, InfiniteTableComponent, type InfiniteTableComputedColumn, type InfiniteTableComputedValues, type InfiniteTableContextValue, type InfiniteTableDebugWarningKey, type InfiniteTableGroupColumnBase, type InfiniteTableGroupColumnFunction, type InfiniteTableGroupColumnGetterOptions, type InfiniteTableKeyboardNavigationApi, type InfiniteTablePivotColumn, type InfiniteTablePropAutoSizeColumnsKey, type InfiniteTablePropColumnGroupVisibility, type InfiniteTablePropColumnGroups, type InfiniteTablePropColumnOrder, type InfiniteTablePropColumnPinning, type InfiniteTablePropColumnSizing, type InfiniteTablePropColumnTypes, type InfiniteTablePropColumnVisibility, type InfiniteTablePropColumns, type InfiniteTablePropComponents, type InfiniteTablePropGetCellContextMenuItems, type InfiniteTablePropGetColumnMenuItems, type InfiniteTablePropGetContextMenuItems, type InfiniteTablePropGroupColumn, type InfiniteTablePropGroupRenderStrategy, type InfiniteTablePropHeaderOptions, type InfiniteTablePropKeyboardNavigation, type InfiniteTablePropKeyboardShorcut, type InfiniteTablePropMultiSortBehavior, type InfiniteTablePropRowClassName, type InfiniteTablePropRowStyle, type InfiniteTableProps, type InfiniteTablePropsNotAvailableInTreeGrid, type InfiniteTableRowClassNameFn, type InfiniteTableRowDetailApi, type InfiniteTableRowInfo, type InfiniteTableRowSelectionApi, type InfiniteTableRowStyleFn, type InfiniteTableState, type InfiniteTable_HasGrouping_RowInfoGroup, type InfiniteTable_HasGrouping_RowInfoNormal, type InfiniteTable_Tree_RowInfoLeafNode, type InfiniteTable_Tree_RowInfoNode, type InfiniteTable_Tree_RowInfoParentNode, type LazyGroupDataDeepMap, type LazyGroupDataItem, type LazyRowInfoGroup, Menu, type MenuChildrenFnParam, type MenuColumn, type MenuColumnRenderParam, type MenuDecoration, type MenuIconProps, type MenuItemActionContext, type MenuItemDefinition, type MenuItemObject, type MenuProps, type MenuRenderable, type MenuRuntimeItem, type MenuRuntimeItemSelectable, type MenuSeparator, type OverlayShowParams, RowDetailCache, RowDetailState, type RowDetailStateObject, RowDisabledState, type RowDisabledStateObject, RowSelectionState, type ScrollStopInfo, type Scrollbars, type ShowOverlayFn, type TableRenderRange, TreeDataSource, type TreeDataSourceProps, TreeExpandState, type TreeExpandStateValue, TreeGrid, type TreeGridOnlyProps, type TreeGridProps, TreeSelectionState, type TreeSelectionStateObject, type TreeSelectionValue, type UpdateChildrenFn, type UpdateOverlayContentFn, type WaitForNodeOptions, WeakFixedSizeSet, alignNode, components, createDefaultProxy, createFlashingColumnCellComponent, debounce, debug, defaultDragProxyMove, defaultFilterTypes, eventMatchesKeyboardShortcut, filterDataArray, defaultFilterTypes as filterTypes, flatten, buildManagedComponent as getComponentStateRoot, group, interceptMap, keyboardShortcuts, multisort, multisortNested, queryKeyToCacheKey, toTreeDataArray, useManagedComponentState as useComponentState, useDataSourceApi, useDataSourceInternal, useDataSourceSelector, useDataSourceState, useDragDropProvider, useDragListContext, useEffectWhen, useEffectWhenSameDeps, useEffectWithChanges, useEffectWithObject, useGridScroll, useInfiniteColumnApi, useInfiniteColumnCell, useInfiniteColumnEditor, useInfiniteColumnFilterEditor, useInfiniteHeaderCell, useInfinitePortalContainer, useInfiniteTableApi, useLayoutEffectWithChanges, useManagedDataSource, useMasterRowInfo, useOverlay, useOverlayPortal, usePrevious, useRowInfoReducers, useVisibleColumnSizes, withSelectedLeafNodesOnly };
|
package/index.dev.js
CHANGED
|
@@ -116,6 +116,7 @@ __export(index_exports, {
|
|
|
116
116
|
queryKeyToCacheKey: () => queryKeyToCacheKey,
|
|
117
117
|
toTreeDataArray: () => toTreeDataArray,
|
|
118
118
|
useComponentState: () => useManagedComponentState,
|
|
119
|
+
useDataSourceApi: () => useDataSourceApi,
|
|
119
120
|
useDataSourceInternal: () => useDataSourceInternal,
|
|
120
121
|
useDataSourceSelector: () => useDataSourceSelector,
|
|
121
122
|
useDataSourceState: () => useDataSourceState,
|
|
@@ -126,11 +127,13 @@ __export(index_exports, {
|
|
|
126
127
|
useEffectWithChanges: () => useEffectWithChanges,
|
|
127
128
|
useEffectWithObject: () => useEffectWithObject,
|
|
128
129
|
useGridScroll: () => useGridScroll,
|
|
130
|
+
useInfiniteColumnApi: () => useInfiniteColumnApi,
|
|
129
131
|
useInfiniteColumnCell: () => useInfiniteColumnCell,
|
|
130
132
|
useInfiniteColumnEditor: () => useInfiniteColumnEditor,
|
|
131
133
|
useInfiniteColumnFilterEditor: () => useInfiniteColumnFilterEditor,
|
|
132
134
|
useInfiniteHeaderCell: () => useInfiniteHeaderCell,
|
|
133
135
|
useInfinitePortalContainer: () => useInfinitePortalContainer,
|
|
136
|
+
useInfiniteTableApi: () => useInfiniteTableApi,
|
|
134
137
|
useLayoutEffectWithChanges: () => useLayoutEffectWithChanges,
|
|
135
138
|
useManagedDataSource: () => useManagedDataSource,
|
|
136
139
|
useMasterRowInfo: () => useMasterRowInfo,
|
|
@@ -3437,6 +3440,12 @@ function getColumnApiForColumn(colOrColId, param) {
|
|
|
3437
3440
|
},
|
|
3438
3441
|
clearSort() {
|
|
3439
3442
|
this.setSort(null);
|
|
3443
|
+
},
|
|
3444
|
+
getColumnId() {
|
|
3445
|
+
return column.id;
|
|
3446
|
+
},
|
|
3447
|
+
getComputedColumn() {
|
|
3448
|
+
return column;
|
|
3440
3449
|
}
|
|
3441
3450
|
};
|
|
3442
3451
|
return columnApi;
|
|
@@ -22596,6 +22605,11 @@ function useDataSourceInternal(props) {
|
|
|
22596
22605
|
};
|
|
22597
22606
|
}
|
|
22598
22607
|
|
|
22608
|
+
// src/components/DataSource/publicHooks/useDataSourceApi.ts
|
|
22609
|
+
function useDataSourceApi() {
|
|
22610
|
+
return useDataSourceSelector((ctx) => ctx.dataSourceApi);
|
|
22611
|
+
}
|
|
22612
|
+
|
|
22599
22613
|
// src/components/DataSource/RowDetailState.ts
|
|
22600
22614
|
var RowDetailState = class extends BooleanCollectionState {
|
|
22601
22615
|
constructor(state) {
|
|
@@ -23605,6 +23619,7 @@ function isSortInfoForColumn(sortInfo, col) {
|
|
|
23605
23619
|
}
|
|
23606
23620
|
var InfiniteTableApiImpl = class {
|
|
23607
23621
|
constructor(context) {
|
|
23622
|
+
this.columnApiById = /* @__PURE__ */ new Map();
|
|
23608
23623
|
this.getVisibleRenderRange = () => {
|
|
23609
23624
|
return this.getState().brain.getRenderRange();
|
|
23610
23625
|
};
|
|
@@ -23835,10 +23850,19 @@ var InfiniteTableApiImpl = class {
|
|
|
23835
23850
|
return result;
|
|
23836
23851
|
};
|
|
23837
23852
|
this.getColumnApi = (columnIdOrIndex) => {
|
|
23838
|
-
|
|
23853
|
+
const colId = typeof columnIdOrIndex === "string" ? columnIdOrIndex : this.getComputed().computedVisibleColumns[columnIdOrIndex]?.id;
|
|
23854
|
+
const existingApi = this.columnApiById.get(colId);
|
|
23855
|
+
if (existingApi) {
|
|
23856
|
+
return existingApi;
|
|
23857
|
+
}
|
|
23858
|
+
const columnApi = getColumnApiForColumn(columnIdOrIndex, {
|
|
23839
23859
|
...this.context,
|
|
23840
23860
|
api: this
|
|
23841
23861
|
});
|
|
23862
|
+
if (columnApi) {
|
|
23863
|
+
this.columnApiById.set(columnApi.getColumnId(), columnApi);
|
|
23864
|
+
}
|
|
23865
|
+
return columnApi;
|
|
23842
23866
|
};
|
|
23843
23867
|
this.isColumnSortable = (columnId) => {
|
|
23844
23868
|
return this.getColumnApi(columnId)?.isSortable() ?? false;
|
|
@@ -26934,7 +26958,7 @@ var useLicense = (licenseKey = "") => {
|
|
|
26934
26958
|
}
|
|
26935
26959
|
let valid2 = isValidLicense(licenseKey, {
|
|
26936
26960
|
publishedAt: 1624970570587,
|
|
26937
|
-
version: "8.0.
|
|
26961
|
+
version: "8.0.4"
|
|
26938
26962
|
});
|
|
26939
26963
|
if (!licenseKey && !valid2 && isInsidePlayground) {
|
|
26940
26964
|
return true;
|
|
@@ -31845,6 +31869,16 @@ function InfiniteTableBody(props) {
|
|
|
31845
31869
|
}
|
|
31846
31870
|
InfiniteTableBody.rowHoverClassName = _HOVERED_CLASS_NAMES;
|
|
31847
31871
|
|
|
31872
|
+
// src/components/InfiniteTable/hooks/useInfiniteTableApi.ts
|
|
31873
|
+
function useInfiniteTableApi() {
|
|
31874
|
+
return useInfiniteTableSelector((ctx) => ctx.api);
|
|
31875
|
+
}
|
|
31876
|
+
|
|
31877
|
+
// src/components/InfiniteTable/hooks/useInfiniteColumnApi.ts
|
|
31878
|
+
function useInfiniteColumnApi(columnId) {
|
|
31879
|
+
return useInfiniteTableSelector((ctx) => ctx.api.getColumnApi(columnId));
|
|
31880
|
+
}
|
|
31881
|
+
|
|
31848
31882
|
// src/components/InfiniteTable/index.tsx
|
|
31849
31883
|
var InfiniteTableClassName = internalProps.rootClassName;
|
|
31850
31884
|
var { ManagedComponentContextProvider: InfiniteTableRoot } = buildManagedComponent({
|
|
@@ -32947,6 +32981,7 @@ var components = {
|
|
|
32947
32981
|
queryKeyToCacheKey,
|
|
32948
32982
|
toTreeDataArray,
|
|
32949
32983
|
useComponentState,
|
|
32984
|
+
useDataSourceApi,
|
|
32950
32985
|
useDataSourceInternal,
|
|
32951
32986
|
useDataSourceSelector,
|
|
32952
32987
|
useDataSourceState,
|
|
@@ -32957,11 +32992,13 @@ var components = {
|
|
|
32957
32992
|
useEffectWithChanges,
|
|
32958
32993
|
useEffectWithObject,
|
|
32959
32994
|
useGridScroll,
|
|
32995
|
+
useInfiniteColumnApi,
|
|
32960
32996
|
useInfiniteColumnCell,
|
|
32961
32997
|
useInfiniteColumnEditor,
|
|
32962
32998
|
useInfiniteColumnFilterEditor,
|
|
32963
32999
|
useInfiniteHeaderCell,
|
|
32964
33000
|
useInfinitePortalContainer,
|
|
33001
|
+
useInfiniteTableApi,
|
|
32965
33002
|
useLayoutEffectWithChanges,
|
|
32966
33003
|
useManagedDataSource,
|
|
32967
33004
|
useMasterRowInfo,
|
package/index.dev.mjs
CHANGED
|
@@ -3367,6 +3367,12 @@ function getColumnApiForColumn(colOrColId, param) {
|
|
|
3367
3367
|
},
|
|
3368
3368
|
clearSort() {
|
|
3369
3369
|
this.setSort(null);
|
|
3370
|
+
},
|
|
3371
|
+
getColumnId() {
|
|
3372
|
+
return column.id;
|
|
3373
|
+
},
|
|
3374
|
+
getComputedColumn() {
|
|
3375
|
+
return column;
|
|
3370
3376
|
}
|
|
3371
3377
|
};
|
|
3372
3378
|
return columnApi;
|
|
@@ -22531,6 +22537,11 @@ function useDataSourceInternal(props) {
|
|
|
22531
22537
|
};
|
|
22532
22538
|
}
|
|
22533
22539
|
|
|
22540
|
+
// src/components/DataSource/publicHooks/useDataSourceApi.ts
|
|
22541
|
+
function useDataSourceApi() {
|
|
22542
|
+
return useDataSourceSelector((ctx) => ctx.dataSourceApi);
|
|
22543
|
+
}
|
|
22544
|
+
|
|
22534
22545
|
// src/components/DataSource/RowDetailState.ts
|
|
22535
22546
|
var RowDetailState = class extends BooleanCollectionState {
|
|
22536
22547
|
constructor(state) {
|
|
@@ -23540,6 +23551,7 @@ function isSortInfoForColumn(sortInfo, col) {
|
|
|
23540
23551
|
}
|
|
23541
23552
|
var InfiniteTableApiImpl = class {
|
|
23542
23553
|
constructor(context) {
|
|
23554
|
+
this.columnApiById = /* @__PURE__ */ new Map();
|
|
23543
23555
|
this.getVisibleRenderRange = () => {
|
|
23544
23556
|
return this.getState().brain.getRenderRange();
|
|
23545
23557
|
};
|
|
@@ -23770,10 +23782,19 @@ var InfiniteTableApiImpl = class {
|
|
|
23770
23782
|
return result;
|
|
23771
23783
|
};
|
|
23772
23784
|
this.getColumnApi = (columnIdOrIndex) => {
|
|
23773
|
-
|
|
23785
|
+
const colId = typeof columnIdOrIndex === "string" ? columnIdOrIndex : this.getComputed().computedVisibleColumns[columnIdOrIndex]?.id;
|
|
23786
|
+
const existingApi = this.columnApiById.get(colId);
|
|
23787
|
+
if (existingApi) {
|
|
23788
|
+
return existingApi;
|
|
23789
|
+
}
|
|
23790
|
+
const columnApi = getColumnApiForColumn(columnIdOrIndex, {
|
|
23774
23791
|
...this.context,
|
|
23775
23792
|
api: this
|
|
23776
23793
|
});
|
|
23794
|
+
if (columnApi) {
|
|
23795
|
+
this.columnApiById.set(columnApi.getColumnId(), columnApi);
|
|
23796
|
+
}
|
|
23797
|
+
return columnApi;
|
|
23777
23798
|
};
|
|
23778
23799
|
this.isColumnSortable = (columnId) => {
|
|
23779
23800
|
return this.getColumnApi(columnId)?.isSortable() ?? false;
|
|
@@ -26873,7 +26894,7 @@ var useLicense = (licenseKey = "") => {
|
|
|
26873
26894
|
}
|
|
26874
26895
|
let valid2 = isValidLicense(licenseKey, {
|
|
26875
26896
|
publishedAt: 1624970570587,
|
|
26876
|
-
version: "8.0.
|
|
26897
|
+
version: "8.0.4"
|
|
26877
26898
|
});
|
|
26878
26899
|
if (!licenseKey && !valid2 && isInsidePlayground) {
|
|
26879
26900
|
return true;
|
|
@@ -31794,6 +31815,16 @@ function InfiniteTableBody(props) {
|
|
|
31794
31815
|
}
|
|
31795
31816
|
InfiniteTableBody.rowHoverClassName = _HOVERED_CLASS_NAMES;
|
|
31796
31817
|
|
|
31818
|
+
// src/components/InfiniteTable/hooks/useInfiniteTableApi.ts
|
|
31819
|
+
function useInfiniteTableApi() {
|
|
31820
|
+
return useInfiniteTableSelector((ctx) => ctx.api);
|
|
31821
|
+
}
|
|
31822
|
+
|
|
31823
|
+
// src/components/InfiniteTable/hooks/useInfiniteColumnApi.ts
|
|
31824
|
+
function useInfiniteColumnApi(columnId) {
|
|
31825
|
+
return useInfiniteTableSelector((ctx) => ctx.api.getColumnApi(columnId));
|
|
31826
|
+
}
|
|
31827
|
+
|
|
31797
31828
|
// src/components/InfiniteTable/index.tsx
|
|
31798
31829
|
var InfiniteTableClassName = internalProps.rootClassName;
|
|
31799
31830
|
var { ManagedComponentContextProvider: InfiniteTableRoot } = buildManagedComponent({
|
|
@@ -32895,6 +32926,7 @@ export {
|
|
|
32895
32926
|
queryKeyToCacheKey,
|
|
32896
32927
|
toTreeDataArray,
|
|
32897
32928
|
useManagedComponentState as useComponentState,
|
|
32929
|
+
useDataSourceApi,
|
|
32898
32930
|
useDataSourceInternal,
|
|
32899
32931
|
useDataSourceSelector,
|
|
32900
32932
|
useDataSourceState,
|
|
@@ -32905,11 +32937,13 @@ export {
|
|
|
32905
32937
|
useEffectWithChanges,
|
|
32906
32938
|
useEffectWithObject,
|
|
32907
32939
|
useGridScroll,
|
|
32940
|
+
useInfiniteColumnApi,
|
|
32908
32941
|
useInfiniteColumnCell,
|
|
32909
32942
|
useInfiniteColumnEditor,
|
|
32910
32943
|
useInfiniteColumnFilterEditor,
|
|
32911
32944
|
useInfiniteHeaderCell,
|
|
32912
32945
|
useInfinitePortalContainer,
|
|
32946
|
+
useInfiniteTableApi,
|
|
32913
32947
|
useLayoutEffectWithChanges,
|
|
32914
32948
|
useManagedDataSource,
|
|
32915
32949
|
useMasterRowInfo,
|