@infinite-table/infinite-react 7.2.4 → 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 +7 -2
- package/index.dev.js +128 -1
- package/index.dev.mjs +127 -1
- package/index.js +8 -8
- package/index.mjs +8 -8
- package/package.json +2 -2
package/index.d.ts
CHANGED
|
@@ -2534,7 +2534,7 @@ declare class GridRenderer extends Logger {
|
|
|
2534
2534
|
private scrolling;
|
|
2535
2535
|
cellHoverClassNames: string[];
|
|
2536
2536
|
cellDetachedClassNames: string[];
|
|
2537
|
-
|
|
2537
|
+
cellManager: GridCellManager<{
|
|
2538
2538
|
renderRowIndex: number;
|
|
2539
2539
|
renderColIndex: number;
|
|
2540
2540
|
}>;
|
|
@@ -7547,6 +7547,11 @@ type FlashingCellOptions = {
|
|
|
7547
7547
|
declare const createFlashingColumnCellComponent: (options?: FlashingCellOptions) => React$1.ForwardRefExoticComponent<Omit<React$1.HTMLProps<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
7548
7548
|
declare const FlashingColumnCell: React$1.ForwardRefExoticComponent<Omit<React$1.HTMLProps<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
7549
7549
|
|
|
7550
|
+
type MatrixDebuggerProps = {
|
|
7551
|
+
debugTarget: string;
|
|
7552
|
+
};
|
|
7553
|
+
declare function INTERNAL_MatrixDebugger(props: MatrixDebuggerProps): React$1.JSX.Element | null;
|
|
7554
|
+
|
|
7550
7555
|
declare const components: {
|
|
7551
7556
|
CheckBox: typeof InfiniteCheckBox;
|
|
7552
7557
|
LoadMask: (props: LoadMaskProps) => React$1.JSX.Element;
|
|
@@ -7555,4 +7560,4 @@ declare const components: {
|
|
|
7555
7560
|
NumberFilterEditor: typeof NumberFilterEditor;
|
|
7556
7561
|
};
|
|
7557
7562
|
|
|
7558
|
-
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,
|
|
@@ -25720,7 +25721,7 @@ var useLicense = (licenseKey = "") => {
|
|
|
25720
25721
|
}
|
|
25721
25722
|
let valid2 = isValidLicense(licenseKey, {
|
|
25722
25723
|
publishedAt: 1624970570587,
|
|
25723
|
-
version: "7.2.
|
|
25724
|
+
version: "7.2.5-canary.0"
|
|
25724
25725
|
});
|
|
25725
25726
|
if (!licenseKey && !valid2 && isInsidePlayground) {
|
|
25726
25727
|
return true;
|
|
@@ -30740,6 +30741,131 @@ var createFlashingColumnCellComponent = (options = {}) => {
|
|
|
30740
30741
|
};
|
|
30741
30742
|
var FlashingColumnCell = createFlashingColumnCellComponent();
|
|
30742
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
|
+
|
|
30743
30869
|
// src/index.tsx
|
|
30744
30870
|
var components = {
|
|
30745
30871
|
CheckBox: InfiniteCheckBox,
|
|
@@ -30758,6 +30884,7 @@ var components = {
|
|
|
30758
30884
|
FixedSizeSet,
|
|
30759
30885
|
FlashingColumnCell,
|
|
30760
30886
|
GroupRowsState,
|
|
30887
|
+
INTERNAL_MatrixDebugger,
|
|
30761
30888
|
InfiniteTable,
|
|
30762
30889
|
InfiniteTableClassName,
|
|
30763
30890
|
InfiniteTableComponent,
|
package/index.dev.mjs
CHANGED
|
@@ -25671,7 +25671,7 @@ var useLicense = (licenseKey = "") => {
|
|
|
25671
25671
|
}
|
|
25672
25672
|
let valid2 = isValidLicense(licenseKey, {
|
|
25673
25673
|
publishedAt: 1624970570587,
|
|
25674
|
-
version: "7.2.
|
|
25674
|
+
version: "7.2.5-canary.0"
|
|
25675
25675
|
});
|
|
25676
25676
|
if (!licenseKey && !valid2 && isInsidePlayground) {
|
|
25677
25677
|
return true;
|
|
@@ -30701,6 +30701,131 @@ var createFlashingColumnCellComponent = (options = {}) => {
|
|
|
30701
30701
|
};
|
|
30702
30702
|
var FlashingColumnCell = createFlashingColumnCellComponent();
|
|
30703
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
|
+
|
|
30704
30829
|
// src/index.tsx
|
|
30705
30830
|
var components = {
|
|
30706
30831
|
CheckBox: InfiniteCheckBox,
|
|
@@ -30718,6 +30843,7 @@ export {
|
|
|
30718
30843
|
FixedSizeSet,
|
|
30719
30844
|
FlashingColumnCell,
|
|
30720
30845
|
GroupRowsState,
|
|
30846
|
+
INTERNAL_MatrixDebugger,
|
|
30721
30847
|
InfiniteTable,
|
|
30722
30848
|
InfiniteTableClassName,
|
|
30723
30849
|
InfiniteTableComponent,
|