@infinite-table/infinite-react 7.2.3 → 7.2.5-canary.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +10 -4
- package/index.dev.js +135 -7
- package/index.dev.mjs +134 -7
- package/index.js +8 -8
- package/index.mjs +8 -8
- package/package.json +2 -2
package/index.d.ts
CHANGED
|
@@ -249,6 +249,7 @@ type TreeSelectionStateObject = {
|
|
|
249
249
|
};
|
|
250
250
|
type TreeSelectionStateConfig<_T = any> = {
|
|
251
251
|
treeDeepMap: DeepMap<any, DeepMapTreeValueType<any, any>>;
|
|
252
|
+
treePaths: DeepMap<any, true>;
|
|
252
253
|
};
|
|
253
254
|
type GetTreeSelectionStateConfig<T> = () => TreeSelectionStateConfig<T>;
|
|
254
255
|
type NodeSelectionState = {
|
|
@@ -265,8 +266,8 @@ declare class TreeSelectionState<T = any> {
|
|
|
265
266
|
cache: DeepMap<NodePath, NodeSelectionState>;
|
|
266
267
|
getConfig: GetTreeSelectionStateConfig<T>;
|
|
267
268
|
getTreeDeepMap(): DeepMap<any, DeepMapTreeValueType<any, any>>;
|
|
268
|
-
getSelectedLeafNodePaths(rootNodePath?: NodePath,
|
|
269
|
-
getDeselectedLeafNodePaths(rootNodePath?: NodePath,
|
|
269
|
+
getSelectedLeafNodePaths(rootNodePath?: NodePath, treePaths?: DeepMap<any, true>): NodePath[];
|
|
270
|
+
getDeselectedLeafNodePaths(rootNodePath?: NodePath, treePaths?: DeepMap<any, true>): NodePath[];
|
|
270
271
|
isLeafNode(nodePath: NodePath): boolean;
|
|
271
272
|
getLeafNodesCount(nodePath: NodePath): number;
|
|
272
273
|
static from<T>(treeSelectionState: TreeSelectionStateObject, getConfig: GetTreeSelectionStateConfig<T>): TreeSelectionState<T>;
|
|
@@ -2533,7 +2534,7 @@ declare class GridRenderer extends Logger {
|
|
|
2533
2534
|
private scrolling;
|
|
2534
2535
|
cellHoverClassNames: string[];
|
|
2535
2536
|
cellDetachedClassNames: string[];
|
|
2536
|
-
|
|
2537
|
+
cellManager: GridCellManager<{
|
|
2537
2538
|
renderRowIndex: number;
|
|
2538
2539
|
renderColIndex: number;
|
|
2539
2540
|
}>;
|
|
@@ -7546,6 +7547,11 @@ type FlashingCellOptions = {
|
|
|
7546
7547
|
declare const createFlashingColumnCellComponent: (options?: FlashingCellOptions) => React$1.ForwardRefExoticComponent<Omit<React$1.HTMLProps<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
7547
7548
|
declare const FlashingColumnCell: React$1.ForwardRefExoticComponent<Omit<React$1.HTMLProps<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
7548
7549
|
|
|
7550
|
+
type MatrixDebuggerProps = {
|
|
7551
|
+
debugTarget: string;
|
|
7552
|
+
};
|
|
7553
|
+
declare function INTERNAL_MatrixDebugger(props: MatrixDebuggerProps): React$1.JSX.Element | null;
|
|
7554
|
+
|
|
7549
7555
|
declare const components: {
|
|
7550
7556
|
CheckBox: typeof InfiniteCheckBox;
|
|
7551
7557
|
LoadMask: (props: LoadMaskProps) => React$1.JSX.Element;
|
|
@@ -7554,4 +7560,4 @@ declare const components: {
|
|
|
7554
7560
|
NumberFilterEditor: typeof NumberFilterEditor;
|
|
7555
7561
|
};
|
|
7556
7562
|
|
|
7557
|
-
export { type AdvancedAlignable, CellSelectionState, type CellSelectionStateObject, type ColumnTypeWithInherit, DataClient, DataSource, type DataSourceAction, DataSourceActionType, type DataSourceAggregationReducer, type DataSourceApi, type DataSourceCRUDParam, type DataSourceCallback_BaseParam, type DataSourceComponentActions, type DataSourceContextValue, type DataSourceData, 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 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, type ElementContainerGetter, type ErrorCodeKey, FixedSizeSet, FlashingColumnCell, GroupRowsState, 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 TreeSelectionValue, type UpdateChildrenFn, type UpdateOverlayContentFn, type WaitForNodeOptions, WeakFixedSizeSet, alignNode, components, createFlashingColumnCellComponent, debounce, debug, defaultFilterTypes, eventMatchesKeyboardShortcut, filterDataArray, defaultFilterTypes as filterTypes, flatten, buildManagedComponent as getComponentStateRoot, group, interceptMap, keyboardShortcuts, multisort, multisortNested, queryKeyToCacheKey, toTreeDataArray, useManagedComponentState as useComponentState, useDataSourceInternal, useDataSourceState, useEffectWhen, useEffectWhenSameDeps, useEffectWithChanges, useEffectWithObject, useGridScroll, useInfiniteColumnCell, useInfiniteColumnEditor, useInfiniteColumnFilterEditor, useInfiniteHeaderCell, useInfinitePortalContainer, useLayoutEffectWithChanges, useManagedDataSource, useMasterRowInfo, useOverlay, useOverlayPortal, usePrevious, useRowInfoReducers, useVisibleColumnSizes };
|
|
7563
|
+
export { type AdvancedAlignable, CellSelectionState, type CellSelectionStateObject, type ColumnTypeWithInherit, DataClient, DataSource, type DataSourceAction, DataSourceActionType, type DataSourceAggregationReducer, type DataSourceApi, type DataSourceCRUDParam, type DataSourceCallback_BaseParam, type DataSourceComponentActions, type DataSourceContextValue, type DataSourceData, 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 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, 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 TreeSelectionValue, type UpdateChildrenFn, type UpdateOverlayContentFn, type WaitForNodeOptions, WeakFixedSizeSet, alignNode, components, createFlashingColumnCellComponent, debounce, debug, defaultFilterTypes, eventMatchesKeyboardShortcut, filterDataArray, defaultFilterTypes as filterTypes, flatten, buildManagedComponent as getComponentStateRoot, group, interceptMap, keyboardShortcuts, multisort, multisortNested, queryKeyToCacheKey, toTreeDataArray, useManagedComponentState as useComponentState, useDataSourceInternal, useDataSourceState, useEffectWhen, useEffectWhenSameDeps, useEffectWithChanges, useEffectWithObject, useGridScroll, useInfiniteColumnCell, useInfiniteColumnEditor, useInfiniteColumnFilterEditor, useInfiniteHeaderCell, useInfinitePortalContainer, useLayoutEffectWithChanges, useManagedDataSource, useMasterRowInfo, useOverlay, useOverlayPortal, usePrevious, useRowInfoReducers, useVisibleColumnSizes };
|
package/index.dev.js
CHANGED
|
@@ -76,6 +76,7 @@ __export(index_exports, {
|
|
|
76
76
|
FixedSizeSet: () => FixedSizeSet,
|
|
77
77
|
FlashingColumnCell: () => FlashingColumnCell,
|
|
78
78
|
GroupRowsState: () => GroupRowsState,
|
|
79
|
+
INTERNAL_MatrixDebugger: () => INTERNAL_MatrixDebugger,
|
|
79
80
|
InfiniteTable: () => InfiniteTable,
|
|
80
81
|
InfiniteTableClassName: () => InfiniteTableClassName,
|
|
81
82
|
InfiniteTableComponent: () => InfiniteTableComponent,
|
|
@@ -17074,20 +17075,20 @@ var TreeSelectionState = class _TreeSelectionState {
|
|
|
17074
17075
|
getTreeDeepMap() {
|
|
17075
17076
|
return this.getConfig().treeDeepMap;
|
|
17076
17077
|
}
|
|
17077
|
-
getSelectedLeafNodePaths(rootNodePath = [],
|
|
17078
|
-
|
|
17078
|
+
getSelectedLeafNodePaths(rootNodePath = [], treePaths) {
|
|
17079
|
+
treePaths = treePaths || this.getConfig().treePaths;
|
|
17079
17080
|
const selectedLeafPaths = [];
|
|
17080
|
-
|
|
17081
|
+
treePaths.getLeafNodesStartingWith(rootNodePath, (pair) => {
|
|
17081
17082
|
if (this.isNodeSelected(pair.keys)) {
|
|
17082
17083
|
selectedLeafPaths.push(pair.keys);
|
|
17083
17084
|
}
|
|
17084
17085
|
});
|
|
17085
17086
|
return selectedLeafPaths;
|
|
17086
17087
|
}
|
|
17087
|
-
getDeselectedLeafNodePaths(rootNodePath = [],
|
|
17088
|
-
|
|
17088
|
+
getDeselectedLeafNodePaths(rootNodePath = [], treePaths) {
|
|
17089
|
+
treePaths = treePaths || this.getConfig().treePaths;
|
|
17089
17090
|
const deselectedLeafPaths = [];
|
|
17090
|
-
|
|
17091
|
+
treePaths.getLeafNodesStartingWith(rootNodePath, (pair) => {
|
|
17091
17092
|
if (!this.isNodeSelected(pair.keys)) {
|
|
17092
17093
|
deselectedLeafPaths.push(pair.keys);
|
|
17093
17094
|
}
|
|
@@ -17344,6 +17345,7 @@ function treeSelectionStateConfigGetter(stateOrStateGetter) {
|
|
|
17344
17345
|
return () => {
|
|
17345
17346
|
const state = typeof stateOrStateGetter === "function" ? stateOrStateGetter() : stateOrStateGetter;
|
|
17346
17347
|
return {
|
|
17348
|
+
treePaths: state.treePaths,
|
|
17347
17349
|
treeDeepMap: state.treeDeepMap
|
|
17348
17350
|
};
|
|
17349
17351
|
};
|
|
@@ -25719,7 +25721,7 @@ var useLicense = (licenseKey = "") => {
|
|
|
25719
25721
|
}
|
|
25720
25722
|
let valid2 = isValidLicense(licenseKey, {
|
|
25721
25723
|
publishedAt: 1624970570587,
|
|
25722
|
-
version: "7.2.
|
|
25724
|
+
version: "7.2.5-canary.0"
|
|
25723
25725
|
});
|
|
25724
25726
|
if (!licenseKey && !valid2 && isInsidePlayground) {
|
|
25725
25727
|
return true;
|
|
@@ -30739,6 +30741,131 @@ var createFlashingColumnCellComponent = (options = {}) => {
|
|
|
30739
30741
|
};
|
|
30740
30742
|
var FlashingColumnCell = createFlashingColumnCellComponent();
|
|
30741
30743
|
|
|
30744
|
+
// src/components/HeadlessTable/MatrixDebugger.tsx
|
|
30745
|
+
var React80 = __toESM(require("react"));
|
|
30746
|
+
var import_react74 = require("react");
|
|
30747
|
+
var import_react_dom3 = require("react-dom");
|
|
30748
|
+
function INTERNAL_MatrixDebugger(props) {
|
|
30749
|
+
const [getState, setGetState] = React80.useState(null);
|
|
30750
|
+
(0, import_react74.useEffect)(() => {
|
|
30751
|
+
const { debugTarget } = props;
|
|
30752
|
+
const intervalId = setInterval(() => {
|
|
30753
|
+
if (globalThis.INFINITE && globalThis.INFINITE[debugTarget]) {
|
|
30754
|
+
const getState2 = globalThis.INFINITE[debugTarget].getState;
|
|
30755
|
+
clearInterval(intervalId);
|
|
30756
|
+
setGetState(() => getState2);
|
|
30757
|
+
}
|
|
30758
|
+
}, 100);
|
|
30759
|
+
return () => {
|
|
30760
|
+
clearInterval(intervalId);
|
|
30761
|
+
};
|
|
30762
|
+
}, [props.debugTarget]);
|
|
30763
|
+
return typeof getState === "function" ? /* @__PURE__ */ React80.createElement(MatrixDebuggerContext.Provider, { value: { getState } }, /* @__PURE__ */ React80.createElement(MatrixDebuggerUI, null)) : null;
|
|
30764
|
+
}
|
|
30765
|
+
var MatrixDebuggerContext = React80.createContext({
|
|
30766
|
+
getState: () => null
|
|
30767
|
+
});
|
|
30768
|
+
function MatrixDebuggerUI() {
|
|
30769
|
+
const contextValue = React80.useContext(MatrixDebuggerContext);
|
|
30770
|
+
const { getState } = contextValue;
|
|
30771
|
+
const [, rerender] = useRerender();
|
|
30772
|
+
const cellManager = getState().renderer.cellManager;
|
|
30773
|
+
(0, import_react74.useEffect)(() => {
|
|
30774
|
+
const delayedRerender = debounce(
|
|
30775
|
+
() => {
|
|
30776
|
+
console.log("rerender");
|
|
30777
|
+
rerender();
|
|
30778
|
+
},
|
|
30779
|
+
{ wait: 500 }
|
|
30780
|
+
);
|
|
30781
|
+
return cellManager.onCellAttachmentChange(delayedRerender);
|
|
30782
|
+
}, [cellManager, rerender]);
|
|
30783
|
+
const rowIndexes = cellManager.getRowsWithCells();
|
|
30784
|
+
const columnsIndexes = cellManager.getColumnsWithCells();
|
|
30785
|
+
const domRef = (0, import_react74.useRef)(null);
|
|
30786
|
+
const displayTimeoutRef = (0, import_react74.useRef)(null);
|
|
30787
|
+
return /* @__PURE__ */ React80.createElement("div", { style: { overflow: "auto" } }, (0, import_react_dom3.createPortal)(
|
|
30788
|
+
/* @__PURE__ */ React80.createElement(
|
|
30789
|
+
"div",
|
|
30790
|
+
{
|
|
30791
|
+
ref: domRef,
|
|
30792
|
+
style: {
|
|
30793
|
+
position: "absolute",
|
|
30794
|
+
top: 0,
|
|
30795
|
+
left: 0,
|
|
30796
|
+
width: "0px",
|
|
30797
|
+
height: "0px",
|
|
30798
|
+
pointerEvents: "none",
|
|
30799
|
+
background: "rgba(255, 0, 0, 0.5)",
|
|
30800
|
+
opacity: "0"
|
|
30801
|
+
}
|
|
30802
|
+
}
|
|
30803
|
+
),
|
|
30804
|
+
document.body
|
|
30805
|
+
), /* @__PURE__ */ React80.createElement(
|
|
30806
|
+
"table",
|
|
30807
|
+
{
|
|
30808
|
+
style: {
|
|
30809
|
+
borderCollapse: "collapse"
|
|
30810
|
+
}
|
|
30811
|
+
},
|
|
30812
|
+
/* @__PURE__ */ React80.createElement("thead", null, /* @__PURE__ */ React80.createElement("tr", null, columnsIndexes.map((columnIndex) => {
|
|
30813
|
+
return /* @__PURE__ */ React80.createElement("th", { key: columnIndex, "data-col-index": columnIndex }, columnIndex);
|
|
30814
|
+
}))),
|
|
30815
|
+
/* @__PURE__ */ React80.createElement("tbody", null, rowIndexes.map((rowIndex) => {
|
|
30816
|
+
return /* @__PURE__ */ React80.createElement("tr", { key: rowIndex, "data-row-index": rowIndex }, columnsIndexes.map((columnIndex) => {
|
|
30817
|
+
return /* @__PURE__ */ React80.createElement(
|
|
30818
|
+
"td",
|
|
30819
|
+
{
|
|
30820
|
+
key: columnIndex,
|
|
30821
|
+
style: {
|
|
30822
|
+
padding: 5,
|
|
30823
|
+
border: "1px solid gray",
|
|
30824
|
+
background: cellManager.getCellAt([rowIndex, columnIndex])?.getNode() ? "rgba(0, 255, 0, 0.3)" : "rgba(255, 0, 0, 0.3)"
|
|
30825
|
+
// with 0.3 opacity
|
|
30826
|
+
},
|
|
30827
|
+
"data-col-index": columnIndex
|
|
30828
|
+
},
|
|
30829
|
+
/* @__PURE__ */ React80.createElement(
|
|
30830
|
+
"button",
|
|
30831
|
+
{
|
|
30832
|
+
onClick: () => {
|
|
30833
|
+
const el = cellManager.getCellAt([rowIndex, columnIndex])?.getElement();
|
|
30834
|
+
if (!el) {
|
|
30835
|
+
return;
|
|
30836
|
+
}
|
|
30837
|
+
const rect = el.getBoundingClientRect();
|
|
30838
|
+
domRef.current.style.top = `${rect.top}px`;
|
|
30839
|
+
domRef.current.style.left = `${rect.left}px`;
|
|
30840
|
+
domRef.current.style.width = `${rect.width}px`;
|
|
30841
|
+
domRef.current.style.height = `${rect.height}px`;
|
|
30842
|
+
domRef.current.style.opacity = "0.5";
|
|
30843
|
+
domRef.current.style.transition = "opacity 0.5s";
|
|
30844
|
+
if (displayTimeoutRef.current) {
|
|
30845
|
+
clearTimeout(displayTimeoutRef.current);
|
|
30846
|
+
}
|
|
30847
|
+
displayTimeoutRef.current = setTimeout(() => {
|
|
30848
|
+
domRef.current.style.opacity = "0";
|
|
30849
|
+
displayTimeoutRef.current = null;
|
|
30850
|
+
}, 2e3);
|
|
30851
|
+
console.log(el);
|
|
30852
|
+
},
|
|
30853
|
+
style: {
|
|
30854
|
+
cursor: "pointer"
|
|
30855
|
+
}
|
|
30856
|
+
},
|
|
30857
|
+
"(",
|
|
30858
|
+
rowIndex,
|
|
30859
|
+
",",
|
|
30860
|
+
columnIndex,
|
|
30861
|
+
")"
|
|
30862
|
+
)
|
|
30863
|
+
);
|
|
30864
|
+
}));
|
|
30865
|
+
}))
|
|
30866
|
+
));
|
|
30867
|
+
}
|
|
30868
|
+
|
|
30742
30869
|
// src/index.tsx
|
|
30743
30870
|
var components = {
|
|
30744
30871
|
CheckBox: InfiniteCheckBox,
|
|
@@ -30757,6 +30884,7 @@ var components = {
|
|
|
30757
30884
|
FixedSizeSet,
|
|
30758
30885
|
FlashingColumnCell,
|
|
30759
30886
|
GroupRowsState,
|
|
30887
|
+
INTERNAL_MatrixDebugger,
|
|
30760
30888
|
InfiniteTable,
|
|
30761
30889
|
InfiniteTableClassName,
|
|
30762
30890
|
InfiniteTableComponent,
|
package/index.dev.mjs
CHANGED
|
@@ -17016,20 +17016,20 @@ var TreeSelectionState = class _TreeSelectionState {
|
|
|
17016
17016
|
getTreeDeepMap() {
|
|
17017
17017
|
return this.getConfig().treeDeepMap;
|
|
17018
17018
|
}
|
|
17019
|
-
getSelectedLeafNodePaths(rootNodePath = [],
|
|
17020
|
-
|
|
17019
|
+
getSelectedLeafNodePaths(rootNodePath = [], treePaths) {
|
|
17020
|
+
treePaths = treePaths || this.getConfig().treePaths;
|
|
17021
17021
|
const selectedLeafPaths = [];
|
|
17022
|
-
|
|
17022
|
+
treePaths.getLeafNodesStartingWith(rootNodePath, (pair) => {
|
|
17023
17023
|
if (this.isNodeSelected(pair.keys)) {
|
|
17024
17024
|
selectedLeafPaths.push(pair.keys);
|
|
17025
17025
|
}
|
|
17026
17026
|
});
|
|
17027
17027
|
return selectedLeafPaths;
|
|
17028
17028
|
}
|
|
17029
|
-
getDeselectedLeafNodePaths(rootNodePath = [],
|
|
17030
|
-
|
|
17029
|
+
getDeselectedLeafNodePaths(rootNodePath = [], treePaths) {
|
|
17030
|
+
treePaths = treePaths || this.getConfig().treePaths;
|
|
17031
17031
|
const deselectedLeafPaths = [];
|
|
17032
|
-
|
|
17032
|
+
treePaths.getLeafNodesStartingWith(rootNodePath, (pair) => {
|
|
17033
17033
|
if (!this.isNodeSelected(pair.keys)) {
|
|
17034
17034
|
deselectedLeafPaths.push(pair.keys);
|
|
17035
17035
|
}
|
|
@@ -17286,6 +17286,7 @@ function treeSelectionStateConfigGetter(stateOrStateGetter) {
|
|
|
17286
17286
|
return () => {
|
|
17287
17287
|
const state = typeof stateOrStateGetter === "function" ? stateOrStateGetter() : stateOrStateGetter;
|
|
17288
17288
|
return {
|
|
17289
|
+
treePaths: state.treePaths,
|
|
17289
17290
|
treeDeepMap: state.treeDeepMap
|
|
17290
17291
|
};
|
|
17291
17292
|
};
|
|
@@ -25670,7 +25671,7 @@ var useLicense = (licenseKey = "") => {
|
|
|
25670
25671
|
}
|
|
25671
25672
|
let valid2 = isValidLicense(licenseKey, {
|
|
25672
25673
|
publishedAt: 1624970570587,
|
|
25673
|
-
version: "7.2.
|
|
25674
|
+
version: "7.2.5-canary.0"
|
|
25674
25675
|
});
|
|
25675
25676
|
if (!licenseKey && !valid2 && isInsidePlayground) {
|
|
25676
25677
|
return true;
|
|
@@ -30700,6 +30701,131 @@ var createFlashingColumnCellComponent = (options = {}) => {
|
|
|
30700
30701
|
};
|
|
30701
30702
|
var FlashingColumnCell = createFlashingColumnCellComponent();
|
|
30702
30703
|
|
|
30704
|
+
// src/components/HeadlessTable/MatrixDebugger.tsx
|
|
30705
|
+
import * as React80 from "react";
|
|
30706
|
+
import { useEffect as useEffect44, useRef as useRef37 } from "react";
|
|
30707
|
+
import { createPortal as createPortal3 } from "react-dom";
|
|
30708
|
+
function INTERNAL_MatrixDebugger(props) {
|
|
30709
|
+
const [getState, setGetState] = React80.useState(null);
|
|
30710
|
+
useEffect44(() => {
|
|
30711
|
+
const { debugTarget } = props;
|
|
30712
|
+
const intervalId = setInterval(() => {
|
|
30713
|
+
if (globalThis.INFINITE && globalThis.INFINITE[debugTarget]) {
|
|
30714
|
+
const getState2 = globalThis.INFINITE[debugTarget].getState;
|
|
30715
|
+
clearInterval(intervalId);
|
|
30716
|
+
setGetState(() => getState2);
|
|
30717
|
+
}
|
|
30718
|
+
}, 100);
|
|
30719
|
+
return () => {
|
|
30720
|
+
clearInterval(intervalId);
|
|
30721
|
+
};
|
|
30722
|
+
}, [props.debugTarget]);
|
|
30723
|
+
return typeof getState === "function" ? /* @__PURE__ */ React80.createElement(MatrixDebuggerContext.Provider, { value: { getState } }, /* @__PURE__ */ React80.createElement(MatrixDebuggerUI, null)) : null;
|
|
30724
|
+
}
|
|
30725
|
+
var MatrixDebuggerContext = React80.createContext({
|
|
30726
|
+
getState: () => null
|
|
30727
|
+
});
|
|
30728
|
+
function MatrixDebuggerUI() {
|
|
30729
|
+
const contextValue = React80.useContext(MatrixDebuggerContext);
|
|
30730
|
+
const { getState } = contextValue;
|
|
30731
|
+
const [, rerender] = useRerender();
|
|
30732
|
+
const cellManager = getState().renderer.cellManager;
|
|
30733
|
+
useEffect44(() => {
|
|
30734
|
+
const delayedRerender = debounce(
|
|
30735
|
+
() => {
|
|
30736
|
+
console.log("rerender");
|
|
30737
|
+
rerender();
|
|
30738
|
+
},
|
|
30739
|
+
{ wait: 500 }
|
|
30740
|
+
);
|
|
30741
|
+
return cellManager.onCellAttachmentChange(delayedRerender);
|
|
30742
|
+
}, [cellManager, rerender]);
|
|
30743
|
+
const rowIndexes = cellManager.getRowsWithCells();
|
|
30744
|
+
const columnsIndexes = cellManager.getColumnsWithCells();
|
|
30745
|
+
const domRef = useRef37(null);
|
|
30746
|
+
const displayTimeoutRef = useRef37(null);
|
|
30747
|
+
return /* @__PURE__ */ React80.createElement("div", { style: { overflow: "auto" } }, createPortal3(
|
|
30748
|
+
/* @__PURE__ */ React80.createElement(
|
|
30749
|
+
"div",
|
|
30750
|
+
{
|
|
30751
|
+
ref: domRef,
|
|
30752
|
+
style: {
|
|
30753
|
+
position: "absolute",
|
|
30754
|
+
top: 0,
|
|
30755
|
+
left: 0,
|
|
30756
|
+
width: "0px",
|
|
30757
|
+
height: "0px",
|
|
30758
|
+
pointerEvents: "none",
|
|
30759
|
+
background: "rgba(255, 0, 0, 0.5)",
|
|
30760
|
+
opacity: "0"
|
|
30761
|
+
}
|
|
30762
|
+
}
|
|
30763
|
+
),
|
|
30764
|
+
document.body
|
|
30765
|
+
), /* @__PURE__ */ React80.createElement(
|
|
30766
|
+
"table",
|
|
30767
|
+
{
|
|
30768
|
+
style: {
|
|
30769
|
+
borderCollapse: "collapse"
|
|
30770
|
+
}
|
|
30771
|
+
},
|
|
30772
|
+
/* @__PURE__ */ React80.createElement("thead", null, /* @__PURE__ */ React80.createElement("tr", null, columnsIndexes.map((columnIndex) => {
|
|
30773
|
+
return /* @__PURE__ */ React80.createElement("th", { key: columnIndex, "data-col-index": columnIndex }, columnIndex);
|
|
30774
|
+
}))),
|
|
30775
|
+
/* @__PURE__ */ React80.createElement("tbody", null, rowIndexes.map((rowIndex) => {
|
|
30776
|
+
return /* @__PURE__ */ React80.createElement("tr", { key: rowIndex, "data-row-index": rowIndex }, columnsIndexes.map((columnIndex) => {
|
|
30777
|
+
return /* @__PURE__ */ React80.createElement(
|
|
30778
|
+
"td",
|
|
30779
|
+
{
|
|
30780
|
+
key: columnIndex,
|
|
30781
|
+
style: {
|
|
30782
|
+
padding: 5,
|
|
30783
|
+
border: "1px solid gray",
|
|
30784
|
+
background: cellManager.getCellAt([rowIndex, columnIndex])?.getNode() ? "rgba(0, 255, 0, 0.3)" : "rgba(255, 0, 0, 0.3)"
|
|
30785
|
+
// with 0.3 opacity
|
|
30786
|
+
},
|
|
30787
|
+
"data-col-index": columnIndex
|
|
30788
|
+
},
|
|
30789
|
+
/* @__PURE__ */ React80.createElement(
|
|
30790
|
+
"button",
|
|
30791
|
+
{
|
|
30792
|
+
onClick: () => {
|
|
30793
|
+
const el = cellManager.getCellAt([rowIndex, columnIndex])?.getElement();
|
|
30794
|
+
if (!el) {
|
|
30795
|
+
return;
|
|
30796
|
+
}
|
|
30797
|
+
const rect = el.getBoundingClientRect();
|
|
30798
|
+
domRef.current.style.top = `${rect.top}px`;
|
|
30799
|
+
domRef.current.style.left = `${rect.left}px`;
|
|
30800
|
+
domRef.current.style.width = `${rect.width}px`;
|
|
30801
|
+
domRef.current.style.height = `${rect.height}px`;
|
|
30802
|
+
domRef.current.style.opacity = "0.5";
|
|
30803
|
+
domRef.current.style.transition = "opacity 0.5s";
|
|
30804
|
+
if (displayTimeoutRef.current) {
|
|
30805
|
+
clearTimeout(displayTimeoutRef.current);
|
|
30806
|
+
}
|
|
30807
|
+
displayTimeoutRef.current = setTimeout(() => {
|
|
30808
|
+
domRef.current.style.opacity = "0";
|
|
30809
|
+
displayTimeoutRef.current = null;
|
|
30810
|
+
}, 2e3);
|
|
30811
|
+
console.log(el);
|
|
30812
|
+
},
|
|
30813
|
+
style: {
|
|
30814
|
+
cursor: "pointer"
|
|
30815
|
+
}
|
|
30816
|
+
},
|
|
30817
|
+
"(",
|
|
30818
|
+
rowIndex,
|
|
30819
|
+
",",
|
|
30820
|
+
columnIndex,
|
|
30821
|
+
")"
|
|
30822
|
+
)
|
|
30823
|
+
);
|
|
30824
|
+
}));
|
|
30825
|
+
}))
|
|
30826
|
+
));
|
|
30827
|
+
}
|
|
30828
|
+
|
|
30703
30829
|
// src/index.tsx
|
|
30704
30830
|
var components = {
|
|
30705
30831
|
CheckBox: InfiniteCheckBox,
|
|
@@ -30717,6 +30843,7 @@ export {
|
|
|
30717
30843
|
FixedSizeSet,
|
|
30718
30844
|
FlashingColumnCell,
|
|
30719
30845
|
GroupRowsState,
|
|
30846
|
+
INTERNAL_MatrixDebugger,
|
|
30720
30847
|
InfiniteTable,
|
|
30721
30848
|
InfiniteTableClassName,
|
|
30722
30849
|
InfiniteTableComponent,
|