@infinite-table/infinite-react 6.2.3 → 6.2.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 +16 -16
- package/index.dev.js +237 -237
- package/index.dev.mjs +4 -4
- package/index.js +237 -237
- package/index.mjs +4 -4
- package/package.json +2 -2
package/index.dev.js
CHANGED
|
@@ -6025,7 +6025,7 @@ function InfiniteTableFooter(props) {
|
|
|
6025
6025
|
|
|
6026
6026
|
// src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableHeaderCell.tsx
|
|
6027
6027
|
var React43 = __toESM(require("react"));
|
|
6028
|
-
var
|
|
6028
|
+
var import_react28 = require("react");
|
|
6029
6029
|
var import_react_dom = require("react-dom");
|
|
6030
6030
|
|
|
6031
6031
|
// src/utils/keyMirror.ts
|
|
@@ -6113,7 +6113,7 @@ var React30 = __toESM(require("react"));
|
|
|
6113
6113
|
|
|
6114
6114
|
// src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableColumnHeaderFilter.tsx
|
|
6115
6115
|
var React29 = __toESM(require("react"));
|
|
6116
|
-
var
|
|
6116
|
+
var import_react19 = require("react");
|
|
6117
6117
|
|
|
6118
6118
|
// src/components/InfiniteTable/hooks/useInfiniteTable.ts
|
|
6119
6119
|
var import_react16 = require("react");
|
|
@@ -7281,10 +7281,10 @@ function getColumnLabel(colIdOrCol, context) {
|
|
|
7281
7281
|
}
|
|
7282
7282
|
|
|
7283
7283
|
// src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableColumnHeaderFilterContext.ts
|
|
7284
|
-
var
|
|
7284
|
+
var React28 = __toESM(require("react"));
|
|
7285
7285
|
var InfiniteTableColumnHeaderFilterClassName = `${rootClassName2}HeaderCell__filter`;
|
|
7286
7286
|
var InfiniteTableColumnHeaderFilterOperatorClassName = `${rootClassName2}HeaderCell__filterOperator`;
|
|
7287
|
-
var InfiniteTableColumnHeaderFilterContext =
|
|
7287
|
+
var InfiniteTableColumnHeaderFilterContext = React28.createContext(null);
|
|
7288
7288
|
|
|
7289
7289
|
// src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableColumnHeaderFilter.tsx
|
|
7290
7290
|
var InfiniteTableColumnHeaderFilterInputClassName = `${InfiniteTableColumnHeaderFilterClassName}__input`;
|
|
@@ -7294,7 +7294,7 @@ function InfiniteTableColumnHeaderFilter(props) {
|
|
|
7294
7294
|
const { column } = useInfiniteHeaderCell();
|
|
7295
7295
|
const FilterEditor = props.filterEditor;
|
|
7296
7296
|
const FilterOperatorSwitch = props.filterOperatorSwitch;
|
|
7297
|
-
const [focused, setFocused] = (0,
|
|
7297
|
+
const [focused, setFocused] = (0, import_react19.useState)(false);
|
|
7298
7298
|
const onFocus = React29.useCallback(() => {
|
|
7299
7299
|
setFocused(true);
|
|
7300
7300
|
}, []);
|
|
@@ -7372,7 +7372,7 @@ function useInfiniteColumnFilterEditor() {
|
|
|
7372
7372
|
);
|
|
7373
7373
|
const { columnFilterType, filterTypes, columnFilterValue } = filterContextValue;
|
|
7374
7374
|
const filterType = filterTypes[columnFilterType];
|
|
7375
|
-
const [theValue, setTheValue] = (0,
|
|
7375
|
+
const [theValue, setTheValue] = (0, import_react19.useState)(
|
|
7376
7376
|
columnFilterValue?.filter.value ?? ""
|
|
7377
7377
|
);
|
|
7378
7378
|
const onInputChange = React29.useCallback(
|
|
@@ -7388,7 +7388,7 @@ function useInfiniteColumnFilterEditor() {
|
|
|
7388
7388
|
const removeColumnFilter = React29.useCallback(() => {
|
|
7389
7389
|
context.api.removeColumnFilter(column.id);
|
|
7390
7390
|
}, [column.id]);
|
|
7391
|
-
(0,
|
|
7391
|
+
(0, import_react19.useEffect)(() => {
|
|
7392
7392
|
if (columnFilterValue) {
|
|
7393
7393
|
if (theValue !== columnFilterValue.filter.value) {
|
|
7394
7394
|
setTheValue(columnFilterValue.filter.value);
|
|
@@ -7678,7 +7678,7 @@ function useCellClassName(column, baseClasses, variants, extraFlags) {
|
|
|
7678
7678
|
}
|
|
7679
7679
|
|
|
7680
7680
|
// src/components/InfiniteTable/hooks/useColumnPointerEvents.ts
|
|
7681
|
-
var
|
|
7681
|
+
var import_react20 = require("react");
|
|
7682
7682
|
|
|
7683
7683
|
// src/components/InfiniteTable/InfiniteCls.css.ts
|
|
7684
7684
|
var FooterCls = "_16lm1iw1";
|
|
@@ -8497,7 +8497,7 @@ var useColumnPointerEvents = ({
|
|
|
8497
8497
|
domRef,
|
|
8498
8498
|
horizontalLayoutPageIndex
|
|
8499
8499
|
}) => {
|
|
8500
|
-
const [proxyPosition, setProxyPosition] = (0,
|
|
8500
|
+
const [proxyPosition, setProxyPosition] = (0, import_react20.useState)(null);
|
|
8501
8501
|
const {
|
|
8502
8502
|
actions,
|
|
8503
8503
|
computed,
|
|
@@ -8506,7 +8506,7 @@ var useColumnPointerEvents = ({
|
|
|
8506
8506
|
api,
|
|
8507
8507
|
state: { domRef: rootRef }
|
|
8508
8508
|
} = useInfiniteTable();
|
|
8509
|
-
const defaultPointerDown = (0,
|
|
8509
|
+
const defaultPointerDown = (0, import_react20.useCallback)((e) => {
|
|
8510
8510
|
const computedCol = getComputed().computedVisibleColumnsMap.get(columnId);
|
|
8511
8511
|
if (!computedCol || !computedCol.computedSortable) {
|
|
8512
8512
|
return;
|
|
@@ -8516,7 +8516,7 @@ var useColumnPointerEvents = ({
|
|
|
8516
8516
|
multiSortBehavior: multiSortBehavior === "replace" && (e.ctrlKey || e.metaKey) ? "append" : multiSortBehavior
|
|
8517
8517
|
});
|
|
8518
8518
|
}, []);
|
|
8519
|
-
const onPointerDown = (0,
|
|
8519
|
+
const onPointerDown = (0, import_react20.useCallback)(
|
|
8520
8520
|
(e) => {
|
|
8521
8521
|
const tagName = e.target?.tagName;
|
|
8522
8522
|
if (tagName === "INPUT" || tagName === "BUTTON") {
|
|
@@ -8707,7 +8707,7 @@ var React38 = __toESM(require("react"));
|
|
|
8707
8707
|
|
|
8708
8708
|
// src/components/InfiniteTable/components/InfiniteTableRow/InfiniteTableColumnCell.tsx
|
|
8709
8709
|
var React37 = __toESM(require("react"));
|
|
8710
|
-
var
|
|
8710
|
+
var import_react24 = require("react");
|
|
8711
8711
|
|
|
8712
8712
|
// src/components/InfiniteTable/utils/getColumnForGroupBy.tsx
|
|
8713
8713
|
var React33 = __toESM(require("react"));
|
|
@@ -8722,7 +8722,7 @@ var showLoadingIcon = (rowInfo) => {
|
|
|
8722
8722
|
|
|
8723
8723
|
// src/components/InfiniteTable/components/icons/ExpandCollapseIcon.tsx
|
|
8724
8724
|
var React31 = __toESM(require("react"));
|
|
8725
|
-
var
|
|
8725
|
+
var import_react21 = require("react");
|
|
8726
8726
|
|
|
8727
8727
|
// src/components/InfiniteTable/components/icons/ExpandCollapseIcon.css.ts
|
|
8728
8728
|
var ExpanderIconCls = "_6rdmyg0 _16lm1iwn _16lm1iwi _16lm1iw9";
|
|
@@ -8732,7 +8732,7 @@ var ExpanderIconClsVariants = createRuntimeFn({ defaultClassName: "_6rdmyg1", va
|
|
|
8732
8732
|
var THIS_ICON = `${InfiniteIconClassName}-expand-collapse`;
|
|
8733
8733
|
function ExpandCollapseIcon(props) {
|
|
8734
8734
|
const { size = 24, direction = "start", disabled = false } = props;
|
|
8735
|
-
const [expanded, setExpanded] = (0,
|
|
8735
|
+
const [expanded, setExpanded] = (0, import_react21.useState)(
|
|
8736
8736
|
props.expanded ?? props.defaultExpanded
|
|
8737
8737
|
);
|
|
8738
8738
|
const onClick = () => {
|
|
@@ -9011,7 +9011,7 @@ function objectValuesExcept(obj, exceptList) {
|
|
|
9011
9011
|
|
|
9012
9012
|
// src/components/InfiniteTable/components/CheckBox.tsx
|
|
9013
9013
|
var React34 = __toESM(require("react"));
|
|
9014
|
-
var
|
|
9014
|
+
var import_react22 = require("react");
|
|
9015
9015
|
|
|
9016
9016
|
// src/components/InfiniteTable/components/CheckBox.css.ts
|
|
9017
9017
|
var CheckBoxCls = "qz8ht90 _16lm1iwi";
|
|
@@ -9045,8 +9045,8 @@ var { ManagedComponentContextProvider: InfiniteCheckBoxRoot } = buildManagedComp
|
|
|
9045
9045
|
function InfiniteCheckBoxComponent() {
|
|
9046
9046
|
const { componentState, componentActions } = useManagedComponentState();
|
|
9047
9047
|
const { checked, domProps, disabled } = componentState;
|
|
9048
|
-
const inputRef = (0,
|
|
9049
|
-
(0,
|
|
9048
|
+
const inputRef = (0, import_react22.useRef)(null);
|
|
9049
|
+
(0, import_react22.useEffect)(() => {
|
|
9050
9050
|
inputRef.current.indeterminate = checked == null;
|
|
9051
9051
|
}, [checked]);
|
|
9052
9052
|
return /* @__PURE__ */ React34.createElement(
|
|
@@ -9567,17 +9567,17 @@ var InfiniteTableCell = React35.memo(
|
|
|
9567
9567
|
|
|
9568
9568
|
// src/components/InfiniteTable/components/InfiniteTableRow/InfiniteTableColumnEditor.tsx
|
|
9569
9569
|
var React36 = __toESM(require("react"));
|
|
9570
|
-
var
|
|
9570
|
+
var import_react23 = require("react");
|
|
9571
9571
|
function InfiniteTableColumnEditor() {
|
|
9572
9572
|
const { initialValue, setValue, confirmEdit, cancelEdit, readOnly } = useInfiniteColumnEditor();
|
|
9573
|
-
const domRef = (0,
|
|
9573
|
+
const domRef = (0, import_react23.useRef)();
|
|
9574
9574
|
const refCallback = React36.useCallback((node) => {
|
|
9575
9575
|
domRef.current = node;
|
|
9576
9576
|
if (node) {
|
|
9577
9577
|
node.focus();
|
|
9578
9578
|
}
|
|
9579
9579
|
}, []);
|
|
9580
|
-
const onKeyDown2 = (0,
|
|
9580
|
+
const onKeyDown2 = (0, import_react23.useCallback)((event) => {
|
|
9581
9581
|
const { key } = event;
|
|
9582
9582
|
if (key === "Enter" || key === "Tab") {
|
|
9583
9583
|
confirmEdit();
|
|
@@ -9597,7 +9597,7 @@ function InfiniteTableColumnEditor() {
|
|
|
9597
9597
|
className: join(absoluteCover, outline.none),
|
|
9598
9598
|
type: "text",
|
|
9599
9599
|
defaultValue: initialValue,
|
|
9600
|
-
onChange: (0,
|
|
9600
|
+
onChange: (0, import_react23.useCallback)((event) => {
|
|
9601
9601
|
setValue(event.target.value);
|
|
9602
9602
|
}, [])
|
|
9603
9603
|
}
|
|
@@ -9722,7 +9722,7 @@ function InfiniteTableColumnCellFn(props) {
|
|
|
9722
9722
|
showZebraRows
|
|
9723
9723
|
} = props;
|
|
9724
9724
|
const htmlElementRef = React37.useRef(null);
|
|
9725
|
-
const domRef = (0,
|
|
9725
|
+
const domRef = (0, import_react24.useCallback)(
|
|
9726
9726
|
(node) => {
|
|
9727
9727
|
htmlElementRef.current = node;
|
|
9728
9728
|
if (initialDomRef) {
|
|
@@ -9783,7 +9783,7 @@ function InfiniteTableColumnCellFn(props) {
|
|
|
9783
9783
|
const { align: align2, verticalAlign } = renderParams;
|
|
9784
9784
|
const renderParam = renderParams;
|
|
9785
9785
|
const renderParamRef = React37.useRef(renderParam);
|
|
9786
|
-
const onClick = (0,
|
|
9786
|
+
const onClick = (0, import_react24.useCallback)(
|
|
9787
9787
|
(event) => {
|
|
9788
9788
|
const colIndex = column.computedVisibleIndex;
|
|
9789
9789
|
getState().cellClick({
|
|
@@ -9794,7 +9794,7 @@ function InfiniteTableColumnCellFn(props) {
|
|
|
9794
9794
|
},
|
|
9795
9795
|
[rowIndex, column.computedVisibleIndex, keyboardNavigation]
|
|
9796
9796
|
);
|
|
9797
|
-
const onMouseDown = (0,
|
|
9797
|
+
const onMouseDown = (0, import_react24.useCallback)(
|
|
9798
9798
|
(event) => {
|
|
9799
9799
|
const colIndex = column.computedVisibleIndex;
|
|
9800
9800
|
getState().cellMouseDown({
|
|
@@ -9818,37 +9818,37 @@ function InfiniteTableColumnCellFn(props) {
|
|
|
9818
9818
|
const cellSelected = renderParam.cellSelected;
|
|
9819
9819
|
renderParam.domRef = domRef;
|
|
9820
9820
|
renderParam.htmlElementRef = htmlElementRef;
|
|
9821
|
-
renderParam.toggleCurrentTreeNode = (0,
|
|
9821
|
+
renderParam.toggleCurrentTreeNode = (0, import_react24.useCallback)(
|
|
9822
9822
|
renderParam.toggleCurrentTreeNode,
|
|
9823
9823
|
[rowInfo]
|
|
9824
9824
|
);
|
|
9825
|
-
renderParam.selectCell = (0,
|
|
9826
|
-
renderParam.deselectCell = (0,
|
|
9827
|
-
renderParam.selectCurrentRow = (0,
|
|
9825
|
+
renderParam.selectCell = (0, import_react24.useCallback)(renderParam.selectCell, [rowInfo]);
|
|
9826
|
+
renderParam.deselectCell = (0, import_react24.useCallback)(renderParam.deselectCell, [rowInfo]);
|
|
9827
|
+
renderParam.selectCurrentRow = (0, import_react24.useCallback)(renderParam.selectCurrentRow, [
|
|
9828
9828
|
rowInfo
|
|
9829
9829
|
]);
|
|
9830
|
-
renderParam.deselectCurrentRow = (0,
|
|
9830
|
+
renderParam.deselectCurrentRow = (0, import_react24.useCallback)(renderParam.deselectCurrentRow, [
|
|
9831
9831
|
rowInfo
|
|
9832
9832
|
]);
|
|
9833
|
-
renderParam.toggleCurrentGroupRow = (0,
|
|
9833
|
+
renderParam.toggleCurrentGroupRow = (0, import_react24.useCallback)(
|
|
9834
9834
|
renderParam.toggleCurrentGroupRow,
|
|
9835
9835
|
[rowInfo]
|
|
9836
9836
|
);
|
|
9837
|
-
renderParam.toggleCurrentRowSelection = (0,
|
|
9837
|
+
renderParam.toggleCurrentRowSelection = (0, import_react24.useCallback)(
|
|
9838
9838
|
renderParam.toggleCurrentRowSelection,
|
|
9839
9839
|
[rowInfo]
|
|
9840
9840
|
);
|
|
9841
|
-
renderParam.toggleCurrentGroupRowSelection = (0,
|
|
9841
|
+
renderParam.toggleCurrentGroupRowSelection = (0, import_react24.useCallback)(
|
|
9842
9842
|
renderParam.toggleCurrentGroupRowSelection,
|
|
9843
9843
|
[rowInfo]
|
|
9844
9844
|
);
|
|
9845
|
-
renderParam.toggleCurrentTreeNodeSelection = (0,
|
|
9845
|
+
renderParam.toggleCurrentTreeNodeSelection = (0, import_react24.useCallback)(
|
|
9846
9846
|
renderParam.toggleCurrentTreeNodeSelection,
|
|
9847
9847
|
[rowInfo]
|
|
9848
9848
|
);
|
|
9849
9849
|
const EditorComponent = column.components?.Editor ?? InfiniteTableColumnEditor;
|
|
9850
9850
|
const editor = inEdit ? /* @__PURE__ */ React37.createElement(CellEditorContextComponent, { contextValue: renderParam }, /* @__PURE__ */ React37.createElement(EditorComponent, null)) : null;
|
|
9851
|
-
const renderChildren = (0,
|
|
9851
|
+
const renderChildren = (0, import_react24.useCallback)(
|
|
9852
9852
|
once(() => {
|
|
9853
9853
|
if (hidden) {
|
|
9854
9854
|
return null;
|
|
@@ -10090,7 +10090,7 @@ function InfiniteTableColumnCellFn(props) {
|
|
|
10090
10090
|
style2 = style2 || {};
|
|
10091
10091
|
style2.height = rowHeight;
|
|
10092
10092
|
style2.zIndex = `var(${columnZIndexAtIndex4}-${column.computedVisibleIndex})`;
|
|
10093
|
-
const memoizedStyle = (0,
|
|
10093
|
+
const memoizedStyle = (0, import_react24.useMemo)(
|
|
10094
10094
|
() => style2,
|
|
10095
10095
|
[!style2 ? null : JSON.stringify(style2)]
|
|
10096
10096
|
);
|
|
@@ -10169,7 +10169,7 @@ function InfiniteTableColumnCellFn(props) {
|
|
|
10169
10169
|
colClassName,
|
|
10170
10170
|
rowComputedClassName
|
|
10171
10171
|
),
|
|
10172
|
-
renderChildren: (0,
|
|
10172
|
+
renderChildren: (0, import_react24.useCallback)(() => theChildren, [renderChildren])
|
|
10173
10173
|
};
|
|
10174
10174
|
const ContextProvider = InfiniteTableColumnCellContext.Provider;
|
|
10175
10175
|
return (
|
|
@@ -10188,7 +10188,7 @@ var InfiniteTableColumnCell = React37.memo(
|
|
|
10188
10188
|
InfiniteTableColumnCellFn
|
|
10189
10189
|
);
|
|
10190
10190
|
function useInfiniteColumnCell() {
|
|
10191
|
-
const result = (0,
|
|
10191
|
+
const result = (0, import_react24.useContext)(
|
|
10192
10192
|
InfiniteTableColumnCellContext
|
|
10193
10193
|
);
|
|
10194
10194
|
return result;
|
|
@@ -10307,7 +10307,7 @@ function MenuIcon(props) {
|
|
|
10307
10307
|
|
|
10308
10308
|
// src/components/InfiniteTable/components/icons/SortIcon.tsx
|
|
10309
10309
|
var React40 = __toESM(require("react"));
|
|
10310
|
-
var
|
|
10310
|
+
var import_react25 = require("react");
|
|
10311
10311
|
|
|
10312
10312
|
// src/components/InfiniteTable/components/icons/SortIcon.css.ts
|
|
10313
10313
|
var SortIconCls = "_1ek6mqy0 _16lm1iwz _16lm1iw1n _16lm1iw1 _16lm1iw1v";
|
|
@@ -10319,8 +10319,8 @@ var defaultLineStyle3 = {
|
|
|
10319
10319
|
transition: `width 0.25s, opacity 0.25s`
|
|
10320
10320
|
};
|
|
10321
10321
|
function SortIcon(props) {
|
|
10322
|
-
const [rendered, setRendered] = (0,
|
|
10323
|
-
const [opacity, setOpacity] = (0,
|
|
10322
|
+
const [rendered, setRendered] = (0, import_react25.useState)(true);
|
|
10323
|
+
const [opacity, setOpacity] = (0, import_react25.useState)(0);
|
|
10324
10324
|
const { direction, lineWidth = 1, style: style2, className, index } = props;
|
|
10325
10325
|
const showIndex = index != null && index > 0;
|
|
10326
10326
|
const size = props.size ?? 16;
|
|
@@ -10335,7 +10335,7 @@ function SortIcon(props) {
|
|
|
10335
10335
|
...props.lineStyle,
|
|
10336
10336
|
opacity
|
|
10337
10337
|
};
|
|
10338
|
-
(0,
|
|
10338
|
+
(0, import_react25.useEffect)(() => {
|
|
10339
10339
|
const newOpacity = direction != 0 ? 1 : 0;
|
|
10340
10340
|
if (!rendered && newOpacity) {
|
|
10341
10341
|
setRendered(true);
|
|
@@ -10400,10 +10400,10 @@ function SortIcon(props) {
|
|
|
10400
10400
|
|
|
10401
10401
|
// src/components/InfiniteTable/components/InfiniteTableHeader/useColumnResizeHandle.tsx
|
|
10402
10402
|
var React42 = __toESM(require("react"));
|
|
10403
|
-
var
|
|
10403
|
+
var import_react27 = require("react");
|
|
10404
10404
|
|
|
10405
10405
|
// src/components/InfiniteTable/components/InfiniteTableHeader/ResizeHandle/index.tsx
|
|
10406
|
-
var
|
|
10406
|
+
var import_react26 = require("react");
|
|
10407
10407
|
var React41 = __toESM(require("react"));
|
|
10408
10408
|
|
|
10409
10409
|
// src/components/InfiniteTable/components/InfiniteTableHeader/ResizeHandle/columnResizer.ts
|
|
@@ -10539,9 +10539,9 @@ function ResizeHandleFn(props) {
|
|
|
10539
10539
|
const {
|
|
10540
10540
|
state: { brain, headerBrain }
|
|
10541
10541
|
} = useInfiniteTable();
|
|
10542
|
-
const domRef = (0,
|
|
10543
|
-
const [constrained, setConstrained] = (0,
|
|
10544
|
-
const constrainedRef = (0,
|
|
10542
|
+
const domRef = (0, import_react26.useRef)(null);
|
|
10543
|
+
const [constrained, setConstrained] = (0, import_react26.useState)(false);
|
|
10544
|
+
const constrainedRef = (0, import_react26.useRef)(constrained);
|
|
10545
10545
|
constrainedRef.current = constrained;
|
|
10546
10546
|
const col = props.columns[props.columnIndex];
|
|
10547
10547
|
const horizontalLayoutPageIndex = props.horizontalLayoutPageIndex;
|
|
@@ -10657,7 +10657,7 @@ function useColumnResizeHandle(column, opts) {
|
|
|
10657
10657
|
getComputed,
|
|
10658
10658
|
actions
|
|
10659
10659
|
} = useInfiniteTable();
|
|
10660
|
-
const computeResizeForDiff = (0,
|
|
10660
|
+
const computeResizeForDiff = (0, import_react27.useCallback)(
|
|
10661
10661
|
({
|
|
10662
10662
|
diff,
|
|
10663
10663
|
shareSpaceOnResize
|
|
@@ -10701,7 +10701,7 @@ function useColumnResizeHandle(column, opts) {
|
|
|
10701
10701
|
},
|
|
10702
10702
|
[column]
|
|
10703
10703
|
);
|
|
10704
|
-
const onColumnResize = (0,
|
|
10704
|
+
const onColumnResize = (0, import_react27.useCallback)(
|
|
10705
10705
|
({
|
|
10706
10706
|
diff,
|
|
10707
10707
|
shareSpaceOnResize
|
|
@@ -10807,7 +10807,7 @@ function InfiniteTableHeaderCell(props) {
|
|
|
10807
10807
|
const { onResize, height: height2, width, headerOptions, columnsMap } = props;
|
|
10808
10808
|
const sortInfo = column.computedSortInfo;
|
|
10809
10809
|
const header = column.header;
|
|
10810
|
-
const ref = (0,
|
|
10810
|
+
const ref = (0, import_react28.useCallback)(
|
|
10811
10811
|
(node) => {
|
|
10812
10812
|
domRef.current = node;
|
|
10813
10813
|
props.domRef?.(node);
|
|
@@ -10867,7 +10867,7 @@ function InfiniteTableHeaderCell(props) {
|
|
|
10867
10867
|
};
|
|
10868
10868
|
const MenuIconCmp = column.components?.MenuIcon || components2?.MenuIcon || MenuIcon;
|
|
10869
10869
|
const menuIcon = /* @__PURE__ */ React43.createElement(MenuIconCmp, { ...menuIconProps });
|
|
10870
|
-
const domRef = (0,
|
|
10870
|
+
const domRef = (0, import_react28.useRef)(null);
|
|
10871
10871
|
const initialRenderParam = {
|
|
10872
10872
|
horizontalLayoutPageIndex,
|
|
10873
10873
|
dragging,
|
|
@@ -11014,7 +11014,7 @@ function InfiniteTableHeaderCell(props) {
|
|
|
11014
11014
|
}
|
|
11015
11015
|
return all;
|
|
11016
11016
|
};
|
|
11017
|
-
(0,
|
|
11017
|
+
(0, import_react28.useEffect)(() => {
|
|
11018
11018
|
let clearOnResize = null;
|
|
11019
11019
|
const node = domRef.current;
|
|
11020
11020
|
if (onResize && node) {
|
|
@@ -11160,7 +11160,7 @@ function InfiniteTableHeaderCell(props) {
|
|
|
11160
11160
|
), draggingProxy);
|
|
11161
11161
|
}
|
|
11162
11162
|
function useInfiniteHeaderCell() {
|
|
11163
|
-
const result = (0,
|
|
11163
|
+
const result = (0, import_react28.useContext)(
|
|
11164
11164
|
InfiniteTableHeaderCellContext
|
|
11165
11165
|
);
|
|
11166
11166
|
return result;
|
|
@@ -11273,24 +11273,24 @@ function assignGroupOffsetsAndComputedWidths(items, groupOffset = 0) {
|
|
|
11273
11273
|
|
|
11274
11274
|
// src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableHeader.tsx
|
|
11275
11275
|
var React47 = __toESM(require("react"));
|
|
11276
|
-
var
|
|
11276
|
+
var import_react31 = require("react");
|
|
11277
11277
|
|
|
11278
11278
|
// src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableHeaderGroup.tsx
|
|
11279
11279
|
var React46 = __toESM(require("react"));
|
|
11280
11280
|
|
|
11281
11281
|
// src/components/InfiniteTable/components/InfiniteTableHeader/useColumnGroupResizeHandle.tsx
|
|
11282
11282
|
var React45 = __toESM(require("react"));
|
|
11283
|
-
var
|
|
11283
|
+
var import_react30 = require("react");
|
|
11284
11284
|
|
|
11285
11285
|
// src/components/InfiniteTable/components/InfiniteTableHeader/ResizeHandle/GroupResizeHandle.tsx
|
|
11286
|
-
var
|
|
11286
|
+
var import_react29 = require("react");
|
|
11287
11287
|
var React44 = __toESM(require("react"));
|
|
11288
11288
|
var { rootClassName: rootClassName8 } = internalProps;
|
|
11289
11289
|
var InfiniteTableHeaderCellResizeHandleCls2 = `${rootClassName8}HeaderCell_ResizeHandle`;
|
|
11290
11290
|
function GroupResizeHandleFn(props) {
|
|
11291
|
-
const domRef = (0,
|
|
11292
|
-
const [constrained, setConstrained] = (0,
|
|
11293
|
-
const constrainedRef = (0,
|
|
11291
|
+
const domRef = (0, import_react29.useRef)(null);
|
|
11292
|
+
const [constrained, setConstrained] = (0, import_react29.useState)(false);
|
|
11293
|
+
const constrainedRef = (0, import_react29.useRef)(constrained);
|
|
11294
11294
|
constrainedRef.current = constrained;
|
|
11295
11295
|
const col = props.groupColumns[0];
|
|
11296
11296
|
if (!col) {
|
|
@@ -11391,7 +11391,7 @@ function useColumnGroupResizeHandle(groupColumns, config) {
|
|
|
11391
11391
|
actions
|
|
11392
11392
|
} = useInfiniteTable();
|
|
11393
11393
|
const lastColumnInGroup = groupColumns[groupColumns.length - 1];
|
|
11394
|
-
const computeResizeForDiff = (0,
|
|
11394
|
+
const computeResizeForDiff = (0, import_react30.useCallback)(
|
|
11395
11395
|
(diff) => {
|
|
11396
11396
|
const state = getState();
|
|
11397
11397
|
const { columnSizing, viewportReservedWidth, bodySize } = state;
|
|
@@ -11433,7 +11433,7 @@ function useColumnGroupResizeHandle(groupColumns, config) {
|
|
|
11433
11433
|
},
|
|
11434
11434
|
[lastColumnInGroup]
|
|
11435
11435
|
);
|
|
11436
|
-
const onColumnResize = (0,
|
|
11436
|
+
const onColumnResize = (0, import_react30.useCallback)(
|
|
11437
11437
|
(diff) => {
|
|
11438
11438
|
const { columnSizing, reservedWidth } = computeResizeForDiff(diff);
|
|
11439
11439
|
actions.viewportReservedWidth = reservedWidth;
|
|
@@ -11536,7 +11536,7 @@ function InfiniteTableHeaderFn(props) {
|
|
|
11536
11536
|
state: { headerBrain, headerOptions, showColumnFilters }
|
|
11537
11537
|
} = useInfiniteTable();
|
|
11538
11538
|
const { computedColumnsMap } = computed;
|
|
11539
|
-
const domRef = (0,
|
|
11539
|
+
const domRef = (0, import_react31.useRef)(null);
|
|
11540
11540
|
const domProps = {
|
|
11541
11541
|
ref: domRef,
|
|
11542
11542
|
className: join(
|
|
@@ -11547,7 +11547,7 @@ function InfiniteTableHeaderFn(props) {
|
|
|
11547
11547
|
),
|
|
11548
11548
|
style: { ...style2, height: columnHeaderHeight }
|
|
11549
11549
|
};
|
|
11550
|
-
const renderCell = (0,
|
|
11550
|
+
const renderCell = (0, import_react31.useCallback)(
|
|
11551
11551
|
(params) => {
|
|
11552
11552
|
const {
|
|
11553
11553
|
rowIndex,
|
|
@@ -11767,7 +11767,7 @@ function TableHeaderWrapper(props) {
|
|
|
11767
11767
|
|
|
11768
11768
|
// src/components/InfiniteTable/components/InfiniteTableLicenseFooter/index.tsx
|
|
11769
11769
|
var React49 = __toESM(require("react"));
|
|
11770
|
-
var
|
|
11770
|
+
var import_react32 = require("react");
|
|
11771
11771
|
|
|
11772
11772
|
// src/components/utils/decamelize.ts
|
|
11773
11773
|
function decamelize(str, options) {
|
|
@@ -11824,7 +11824,7 @@ var InfiniteTableLicenseFooter = React49.forwardRef(
|
|
|
11824
11824
|
ref.current = node;
|
|
11825
11825
|
}
|
|
11826
11826
|
}, []);
|
|
11827
|
-
(0,
|
|
11827
|
+
(0, import_react32.useEffect)(() => {
|
|
11828
11828
|
const forceStyle = () => {
|
|
11829
11829
|
setTimeout(() => {
|
|
11830
11830
|
enforceStyle(domRef.current, defaultStyle);
|
|
@@ -14652,15 +14652,15 @@ var Indexer = class {
|
|
|
14652
14652
|
};
|
|
14653
14653
|
|
|
14654
14654
|
// src/components/DataSource/privateHooks/useLoadData.ts
|
|
14655
|
-
var
|
|
14655
|
+
var import_react34 = require("react");
|
|
14656
14656
|
|
|
14657
14657
|
// src/components/hooks/useEffectWithChanges.ts
|
|
14658
|
-
var
|
|
14658
|
+
var import_react33 = require("react");
|
|
14659
14659
|
function useEffectWithChanges(fn, deps) {
|
|
14660
|
-
const prevRef = (0,
|
|
14661
|
-
const oldValuesRef = (0,
|
|
14660
|
+
const prevRef = (0, import_react33.useRef)({});
|
|
14661
|
+
const oldValuesRef = (0, import_react33.useRef)({});
|
|
14662
14662
|
const oldValues = oldValuesRef.current;
|
|
14663
|
-
const changesRef = (0,
|
|
14663
|
+
const changesRef = (0, import_react33.useRef)({});
|
|
14664
14664
|
const changes = changesRef.current;
|
|
14665
14665
|
const useEffectDeps = [];
|
|
14666
14666
|
for (const k in deps) {
|
|
@@ -14673,7 +14673,7 @@ function useEffectWithChanges(fn, deps) {
|
|
|
14673
14673
|
}
|
|
14674
14674
|
}
|
|
14675
14675
|
prevRef.current = deps;
|
|
14676
|
-
(0,
|
|
14676
|
+
(0, import_react33.useEffect)(() => {
|
|
14677
14677
|
const changes2 = changesRef.current;
|
|
14678
14678
|
let result = void 0;
|
|
14679
14679
|
if (Object.keys(changes2).length !== 0) {
|
|
@@ -14691,7 +14691,7 @@ function useEffectWithObject(fn, deps) {
|
|
|
14691
14691
|
useEffectDeps.push(deps[k]);
|
|
14692
14692
|
}
|
|
14693
14693
|
}
|
|
14694
|
-
(0,
|
|
14694
|
+
(0, import_react33.useEffect)(fn, useEffectDeps);
|
|
14695
14695
|
}
|
|
14696
14696
|
|
|
14697
14697
|
// src/utils/composeFunctions.ts
|
|
@@ -17784,12 +17784,12 @@ function useLoadData(options) {
|
|
|
17784
17784
|
filterTypes,
|
|
17785
17785
|
cursorId: stateCursorId
|
|
17786
17786
|
} = componentState;
|
|
17787
|
-
const [scrollbars, setScrollbars] = (0,
|
|
17787
|
+
const [scrollbars, setScrollbars] = (0, import_react34.useState)({
|
|
17788
17788
|
vertical: false,
|
|
17789
17789
|
horizontal: false
|
|
17790
17790
|
});
|
|
17791
|
-
const scrollbarsRef = (0,
|
|
17792
|
-
(0,
|
|
17791
|
+
const scrollbarsRef = (0, import_react34.useRef)(scrollbars);
|
|
17792
|
+
(0, import_react34.useEffect)(() => {
|
|
17793
17793
|
notifyScrollbarsChange.onChange((scrollbars2) => {
|
|
17794
17794
|
if (!scrollbars2) {
|
|
17795
17795
|
return;
|
|
@@ -17799,7 +17799,7 @@ function useLoadData(options) {
|
|
|
17799
17799
|
});
|
|
17800
17800
|
return () => notifyScrollbarsChange.destroy();
|
|
17801
17801
|
}, [notifyScrollbarsChange]);
|
|
17802
|
-
(0,
|
|
17802
|
+
(0, import_react34.useEffect)(() => {
|
|
17803
17803
|
if (!livePagination) {
|
|
17804
17804
|
return;
|
|
17805
17805
|
}
|
|
@@ -17812,7 +17812,7 @@ function useLoadData(options) {
|
|
|
17812
17812
|
});
|
|
17813
17813
|
return () => cancelAnimationFrame(frameId);
|
|
17814
17814
|
}, [livePaginationCursor]);
|
|
17815
|
-
(0,
|
|
17815
|
+
(0, import_react34.useEffect)(() => {
|
|
17816
17816
|
if (!livePagination || livePaginationCursor !== void 0) {
|
|
17817
17817
|
return;
|
|
17818
17818
|
}
|
|
@@ -17825,7 +17825,7 @@ function useLoadData(options) {
|
|
|
17825
17825
|
});
|
|
17826
17826
|
return () => cancelAnimationFrame(frameId);
|
|
17827
17827
|
}, [dataArray.length, livePaginationCursor]);
|
|
17828
|
-
(0,
|
|
17828
|
+
(0, import_react34.useEffect)(() => {
|
|
17829
17829
|
const state = getComponentState();
|
|
17830
17830
|
const { livePaginationCursor: livePaginationCursor2, livePagination: livePagination2, dataArray: dataArray2 } = state;
|
|
17831
17831
|
if (!scrollbars.vertical && livePagination2) {
|
|
@@ -17836,7 +17836,7 @@ function useLoadData(options) {
|
|
|
17836
17836
|
}
|
|
17837
17837
|
}
|
|
17838
17838
|
}, [scrollbars.vertical]);
|
|
17839
|
-
const computedFilterValue = (0,
|
|
17839
|
+
const computedFilterValue = (0, import_react34.useMemo)(() => {
|
|
17840
17840
|
return computeFilterValueForRemote(filterValue, {
|
|
17841
17841
|
filterTypes,
|
|
17842
17842
|
filterMode
|
|
@@ -17851,7 +17851,7 @@ function useLoadData(options) {
|
|
|
17851
17851
|
filterValue: shouldReloadData.filterValue ? computedFilterValue : null,
|
|
17852
17852
|
cursorId: livePagination ? stateCursorId : null
|
|
17853
17853
|
};
|
|
17854
|
-
const initialRef = (0,
|
|
17854
|
+
const initialRef = (0, import_react34.useRef)(true);
|
|
17855
17855
|
useLazyLoadRange(options, {
|
|
17856
17856
|
sortInfo,
|
|
17857
17857
|
groupBy,
|
|
@@ -17861,7 +17861,7 @@ function useLoadData(options) {
|
|
|
17861
17861
|
cursorId: livePagination ? stateCursorId : null
|
|
17862
17862
|
});
|
|
17863
17863
|
const getMasterContext = useLatest(useMasterDetailContext());
|
|
17864
|
-
const dataChangeTimestampsRef = (0,
|
|
17864
|
+
const dataChangeTimestampsRef = (0, import_react34.useRef)([]);
|
|
17865
17865
|
useEffectWithChanges(
|
|
17866
17866
|
() => {
|
|
17867
17867
|
const componentState2 = getComponentState();
|
|
@@ -17956,7 +17956,7 @@ function useLazyLoadRange(options, dependencies) {
|
|
|
17956
17956
|
componentActions: actions,
|
|
17957
17957
|
componentState
|
|
17958
17958
|
} = options;
|
|
17959
|
-
(0,
|
|
17959
|
+
(0, import_react34.useEffect)(() => {
|
|
17960
17960
|
actions.lazyLoadCacheOfLoadedBatches = new DeepMap();
|
|
17961
17961
|
}, [componentState.data, componentState.dataParams]);
|
|
17962
17962
|
const {
|
|
@@ -17968,7 +17968,7 @@ function useLazyLoadRange(options, dependencies) {
|
|
|
17968
17968
|
groupRowsState,
|
|
17969
17969
|
scrollStopDelayUpdatedByTable
|
|
17970
17970
|
} = componentState;
|
|
17971
|
-
const latestRenderRangeRef = (0,
|
|
17971
|
+
const latestRenderRangeRef = (0, import_react34.useRef)(null);
|
|
17972
17972
|
const loadRange = (renderRange, options2, cache = getComponentState().lazyLoadCacheOfLoadedBatches) => {
|
|
17973
17973
|
const componentState2 = getComponentState();
|
|
17974
17974
|
renderRange = renderRange || latestRenderRangeRef.current;
|
|
@@ -17997,7 +17997,7 @@ function useLazyLoadRange(options, dependencies) {
|
|
|
17997
17997
|
cache
|
|
17998
17998
|
);
|
|
17999
17999
|
};
|
|
18000
|
-
const debouncedLoadRange = (0,
|
|
18000
|
+
const debouncedLoadRange = (0, import_react34.useMemo)(
|
|
18001
18001
|
() => debounce(loadRange, { wait: scrollStopDelayUpdatedByTable }),
|
|
18002
18002
|
[scrollStopDelayUpdatedByTable]
|
|
18003
18003
|
);
|
|
@@ -18037,7 +18037,7 @@ function useLazyLoadRange(options, dependencies) {
|
|
|
18037
18037
|
groupRowsState
|
|
18038
18038
|
}
|
|
18039
18039
|
);
|
|
18040
|
-
(0,
|
|
18040
|
+
(0, import_react34.useEffect)(() => {
|
|
18041
18041
|
if (lazyLoadBatchSize && lazyLoadBatchSize > 0) {
|
|
18042
18042
|
debouncedLoadRange();
|
|
18043
18043
|
}
|
|
@@ -18842,7 +18842,7 @@ function getDataSourceStateRestoreForDetails(state) {
|
|
|
18842
18842
|
}
|
|
18843
18843
|
|
|
18844
18844
|
// src/components/DataSource/privateHooks/useDataSource.tsx
|
|
18845
|
-
var
|
|
18845
|
+
var import_react35 = __toESM(require("react"));
|
|
18846
18846
|
function useDataSourceInternal(props) {
|
|
18847
18847
|
const masterContext = useMasterDetailContext();
|
|
18848
18848
|
const getDataSourceMasterContext = useLatest(masterContext);
|
|
@@ -18852,7 +18852,7 @@ function useDataSourceInternal(props) {
|
|
|
18852
18852
|
const { componentActions, componentState, assignState } = managedContextValue;
|
|
18853
18853
|
componentState.getDataSourceMasterContextRef.current = getDataSourceMasterContext;
|
|
18854
18854
|
const getState = useLatest(componentState);
|
|
18855
|
-
const [api] = (0,
|
|
18855
|
+
const [api] = (0, import_react35.useState)(
|
|
18856
18856
|
() => getDataSourceApi({ getState, actions: componentActions })
|
|
18857
18857
|
);
|
|
18858
18858
|
const contextValue = {
|
|
@@ -18866,28 +18866,28 @@ function useDataSourceInternal(props) {
|
|
|
18866
18866
|
const getLatestManagedContextValue = useLatest(managedContextValue);
|
|
18867
18867
|
const getLatestContextValue = useLatest(contextValue);
|
|
18868
18868
|
const DataSourceContext = getDataSourceContext();
|
|
18869
|
-
const DataSource2 = (0,
|
|
18869
|
+
const DataSource2 = (0, import_react35.useCallback)(
|
|
18870
18870
|
({ children }) => {
|
|
18871
18871
|
if (typeof children === "function") {
|
|
18872
18872
|
children = children(getState());
|
|
18873
18873
|
}
|
|
18874
|
-
return /* @__PURE__ */
|
|
18874
|
+
return /* @__PURE__ */ import_react35.default.createElement(
|
|
18875
18875
|
ContextComponent.Provider,
|
|
18876
18876
|
{
|
|
18877
18877
|
key,
|
|
18878
18878
|
value: getLatestManagedContextValue()
|
|
18879
18879
|
},
|
|
18880
|
-
/* @__PURE__ */
|
|
18880
|
+
/* @__PURE__ */ import_react35.default.createElement(DataSourceContext.Provider, { value: getLatestContextValue() }, children)
|
|
18881
18881
|
);
|
|
18882
18882
|
},
|
|
18883
18883
|
[ContextComponent, isDetail, key]
|
|
18884
18884
|
);
|
|
18885
|
-
(0,
|
|
18885
|
+
(0, import_react35.useLayoutEffect)(() => {
|
|
18886
18886
|
if (masterContext) {
|
|
18887
18887
|
masterContext.registerDetail(contextValue);
|
|
18888
18888
|
}
|
|
18889
18889
|
}, []);
|
|
18890
|
-
(0,
|
|
18890
|
+
(0, import_react35.useLayoutEffect)(() => {
|
|
18891
18891
|
return () => {
|
|
18892
18892
|
const state = getState();
|
|
18893
18893
|
state.onCleanup(state);
|
|
@@ -18911,7 +18911,7 @@ function useDataSourceInternal(props) {
|
|
|
18911
18911
|
componentActions,
|
|
18912
18912
|
getComponentState: getState
|
|
18913
18913
|
});
|
|
18914
|
-
(0,
|
|
18914
|
+
(0, import_react35.useEffect)(() => {
|
|
18915
18915
|
componentState.onDataArrayChange?.(
|
|
18916
18916
|
componentState.originalDataArray,
|
|
18917
18917
|
componentState.originalDataArrayChangedInfo
|
|
@@ -18933,7 +18933,7 @@ function useDataSourceInternal(props) {
|
|
|
18933
18933
|
});
|
|
18934
18934
|
}
|
|
18935
18935
|
}, [componentState.originalDataArrayChangedInfo]);
|
|
18936
|
-
(0,
|
|
18936
|
+
(0, import_react35.useEffect)(() => {
|
|
18937
18937
|
componentState.onReady?.(api);
|
|
18938
18938
|
}, []);
|
|
18939
18939
|
return {
|
|
@@ -20867,7 +20867,7 @@ function getImperativeApi(context) {
|
|
|
20867
20867
|
}
|
|
20868
20868
|
|
|
20869
20869
|
// src/components/InfiniteTable/hooks/useAutoSizeColumns.ts
|
|
20870
|
-
var
|
|
20870
|
+
var import_react36 = require("react");
|
|
20871
20871
|
var OFFSET = 10;
|
|
20872
20872
|
function getColumnContentMaxWidths(domRef, options) {
|
|
20873
20873
|
const { includeHeader, columnsToResize, columnsToSkip } = options;
|
|
@@ -20938,11 +20938,11 @@ function useAutoSizeColumns() {
|
|
|
20938
20938
|
componentActions,
|
|
20939
20939
|
componentState: { domRef, ready, autoSizeColumnsKey, brain }
|
|
20940
20940
|
} = useManagedComponentState();
|
|
20941
|
-
const [refreshId, setRefreshId] = (0,
|
|
20941
|
+
const [refreshId, setRefreshId] = (0, import_react36.useState)(0);
|
|
20942
20942
|
const theKey = typeof autoSizeColumnsKey === "object" ? autoSizeColumnsKey.key : autoSizeColumnsKey;
|
|
20943
20943
|
const getTheKey = useLatest(theKey);
|
|
20944
|
-
const lastExecutedIdentifierRef = (0,
|
|
20945
|
-
(0,
|
|
20944
|
+
const lastExecutedIdentifierRef = (0, import_react36.useRef)(null);
|
|
20945
|
+
(0, import_react36.useEffect)(() => {
|
|
20946
20946
|
const key = getTheKey();
|
|
20947
20947
|
if (key == null) {
|
|
20948
20948
|
return;
|
|
@@ -20955,7 +20955,7 @@ function useAutoSizeColumns() {
|
|
|
20955
20955
|
};
|
|
20956
20956
|
return brain.onRenderRangeChange(onChange);
|
|
20957
20957
|
}, [brain]);
|
|
20958
|
-
(0,
|
|
20958
|
+
(0, import_react36.useEffect)(() => {
|
|
20959
20959
|
if (theKey == null) {
|
|
20960
20960
|
return;
|
|
20961
20961
|
}
|
|
@@ -21000,8 +21000,8 @@ function useAutoSizeColumns() {
|
|
|
21000
21000
|
}
|
|
21001
21001
|
|
|
21002
21002
|
// src/components/InfiniteTable/hooks/useCellRendering.tsx
|
|
21003
|
+
var import_react38 = require("react");
|
|
21003
21004
|
var import_react39 = require("react");
|
|
21004
|
-
var import_react40 = require("react");
|
|
21005
21005
|
var React54 = __toESM(require("react"));
|
|
21006
21006
|
|
|
21007
21007
|
// src/components/InfiniteTable/hooks/useYourBrain.ts
|
|
@@ -21045,7 +21045,7 @@ var React53 = __toESM(require("react"));
|
|
|
21045
21045
|
var RowDetailRecipe = createRuntimeFn({ defaultClassName: "evqes20", variantClassNames: {}, defaultVariants: {}, compoundVariants: [] });
|
|
21046
21046
|
|
|
21047
21047
|
// src/components/InfiniteTable/components/InfiniteTableRow/useRegisterDetail.ts
|
|
21048
|
-
var
|
|
21048
|
+
var import_react37 = require("react");
|
|
21049
21049
|
function restoreDetailStateForRowId(rowId, options) {
|
|
21050
21050
|
const { masterState, detailContext } = options;
|
|
21051
21051
|
const detailDataSourcesMap = masterState.detailDataSourcesStateToRestore;
|
|
@@ -21080,8 +21080,8 @@ function updateDetailStateToRestoreForRowId(rowId, options) {
|
|
|
21080
21080
|
masterActions.detailDataSourcesStateToRestore = cacheMap;
|
|
21081
21081
|
}
|
|
21082
21082
|
function useCurrentRowCache(rowId, rowDetailsCache) {
|
|
21083
|
-
const cacheCalledByRowDetailRenderer = (0,
|
|
21084
|
-
const currentRowCache = (0,
|
|
21083
|
+
const cacheCalledByRowDetailRenderer = (0, import_react37.useRef)(false);
|
|
21084
|
+
const currentRowCache = (0, import_react37.useMemo)(() => {
|
|
21085
21085
|
return {
|
|
21086
21086
|
getRowId: () => rowId,
|
|
21087
21087
|
add: (value) => {
|
|
@@ -21106,7 +21106,7 @@ function useRegisterDetail(props) {
|
|
|
21106
21106
|
} = useDataSourceContextValue();
|
|
21107
21107
|
const { getState: getMasterState } = useInfiniteTable();
|
|
21108
21108
|
const { currentRowCache, cacheCalledByRowDetailRenderer } = useCurrentRowCache(rowInfo.id, rowDetailsCache);
|
|
21109
|
-
const masterDetailContextValue = (0,
|
|
21109
|
+
const masterDetailContextValue = (0, import_react37.useMemo)(() => {
|
|
21110
21110
|
const shouldRestoreState = getMasterDataSourceState().detailDataSourcesStateToRestore.has(
|
|
21111
21111
|
rowInfo.id
|
|
21112
21112
|
) && currentRowCache.has();
|
|
@@ -21255,18 +21255,18 @@ function useCellRendering(param) {
|
|
|
21255
21255
|
bodySize,
|
|
21256
21256
|
rowspan
|
|
21257
21257
|
});
|
|
21258
|
-
const scrollTopMaxRef = (0,
|
|
21259
|
-
(0,
|
|
21258
|
+
const scrollTopMaxRef = (0, import_react39.useRef)(0);
|
|
21259
|
+
(0, import_react39.useEffect)(() => {
|
|
21260
21260
|
return brain.onRenderCountChange(() => {
|
|
21261
21261
|
scrollTopMaxRef.current = brain.scrollTopMax;
|
|
21262
21262
|
});
|
|
21263
21263
|
}, [brain]);
|
|
21264
|
-
(0,
|
|
21264
|
+
(0, import_react39.useEffect)(() => {
|
|
21265
21265
|
return brain.onRenderRangeChange((range) => {
|
|
21266
21266
|
getState().onRenderRangeChange?.(range);
|
|
21267
21267
|
});
|
|
21268
21268
|
}, [brain]);
|
|
21269
|
-
(0,
|
|
21269
|
+
(0, import_react39.useEffect)(() => {
|
|
21270
21270
|
return brain.onScrollStop((scrollPosition) => {
|
|
21271
21271
|
const { scrollTop: scrollTop2, scrollLeft: scrollLeft2 } = scrollPosition;
|
|
21272
21272
|
if (scrollTop2 === 0) {
|
|
@@ -21306,13 +21306,13 @@ function useCellRendering(param) {
|
|
|
21306
21306
|
}
|
|
21307
21307
|
});
|
|
21308
21308
|
}, [brain, onScrollToTop, onScrollToBottom, onScrollStop]);
|
|
21309
|
-
(0,
|
|
21309
|
+
(0, import_react39.useEffect)(() => {
|
|
21310
21310
|
if (!bodySize.height) {
|
|
21311
21311
|
return;
|
|
21312
21312
|
}
|
|
21313
21313
|
actions.ready = true;
|
|
21314
21314
|
}, [!!bodySize.height]);
|
|
21315
|
-
(0,
|
|
21315
|
+
(0, import_react39.useEffect)(() => {
|
|
21316
21316
|
if (!ready) {
|
|
21317
21317
|
}
|
|
21318
21318
|
const { onReady } = getState();
|
|
@@ -21321,10 +21321,10 @@ function useCellRendering(param) {
|
|
|
21321
21321
|
}
|
|
21322
21322
|
}, [ready]);
|
|
21323
21323
|
const [, rerender] = useRerender();
|
|
21324
|
-
(0,
|
|
21324
|
+
(0, import_react39.useEffect)(() => {
|
|
21325
21325
|
rerender();
|
|
21326
21326
|
}, [dataSourceState]);
|
|
21327
|
-
const renderCell = (0,
|
|
21327
|
+
const renderCell = (0, import_react39.useCallback)(
|
|
21328
21328
|
(params) => {
|
|
21329
21329
|
const {
|
|
21330
21330
|
rowIndex,
|
|
@@ -21401,7 +21401,7 @@ function useCellRendering(param) {
|
|
|
21401
21401
|
cellStyle
|
|
21402
21402
|
]
|
|
21403
21403
|
);
|
|
21404
|
-
const renderDetailRow = (0,
|
|
21404
|
+
const renderDetailRow = (0, import_react38.useMemo)(() => {
|
|
21405
21405
|
if (!isRowDetailsExpanded) {
|
|
21406
21406
|
return void 0;
|
|
21407
21407
|
}
|
|
@@ -21442,7 +21442,7 @@ function useCellRendering(param) {
|
|
|
21442
21442
|
}
|
|
21443
21443
|
|
|
21444
21444
|
// src/components/InfiniteTable/hooks/useComputed.ts
|
|
21445
|
-
var
|
|
21445
|
+
var import_react48 = require("react");
|
|
21446
21446
|
|
|
21447
21447
|
// src/components/InfiniteTable/utils/MultiCellSelector.ts
|
|
21448
21448
|
var MultiCellSelector = class {
|
|
@@ -21667,10 +21667,10 @@ var MultiRowSelector = class {
|
|
|
21667
21667
|
};
|
|
21668
21668
|
|
|
21669
21669
|
// src/components/InfiniteTable/hooks/useColumnRowspan.ts
|
|
21670
|
-
var
|
|
21670
|
+
var import_react40 = require("react");
|
|
21671
21671
|
function useColumnRowspan(computedVisibleColumns) {
|
|
21672
21672
|
const { getState: getDataSourceState } = useDataSourceContextValue();
|
|
21673
|
-
const rowspan = (0,
|
|
21673
|
+
const rowspan = (0, import_react40.useMemo)(() => {
|
|
21674
21674
|
const colsWithRowspan = computedVisibleColumns.filter(
|
|
21675
21675
|
(col) => typeof col.rowspan === "function"
|
|
21676
21676
|
);
|
|
@@ -21698,10 +21698,10 @@ function useColumnRowspan(computedVisibleColumns) {
|
|
|
21698
21698
|
}
|
|
21699
21699
|
|
|
21700
21700
|
// src/components/InfiniteTable/hooks/useColumnSizeFn.ts
|
|
21701
|
-
var
|
|
21701
|
+
var import_react41 = require("react");
|
|
21702
21702
|
var debug4 = dbg("useColumnSizeFn");
|
|
21703
21703
|
function useColumnSizeFn(columns) {
|
|
21704
|
-
const columnSize = (0,
|
|
21704
|
+
const columnSize = (0, import_react41.useCallback)(
|
|
21705
21705
|
(index) => {
|
|
21706
21706
|
const column = columns[index];
|
|
21707
21707
|
if (false) {
|
|
@@ -21715,10 +21715,10 @@ function useColumnSizeFn(columns) {
|
|
|
21715
21715
|
}
|
|
21716
21716
|
|
|
21717
21717
|
// src/components/InfiniteTable/hooks/useColumnsWhen.ts
|
|
21718
|
-
var
|
|
21718
|
+
var import_react44 = require("react");
|
|
21719
21719
|
|
|
21720
21720
|
// src/components/InfiniteTable/state/getInitialState.ts
|
|
21721
|
-
var
|
|
21721
|
+
var import_react42 = require("react");
|
|
21722
21722
|
|
|
21723
21723
|
// src/components/VirtualBrain/ScrollListener.ts
|
|
21724
21724
|
var initialScrollPosition = {
|
|
@@ -22108,7 +22108,7 @@ function initSetupState2({
|
|
|
22108
22108
|
debugId,
|
|
22109
22109
|
!!wrapRowsHorizontally
|
|
22110
22110
|
);
|
|
22111
|
-
const domRef = (0,
|
|
22111
|
+
const domRef = (0, import_react42.createRef)();
|
|
22112
22112
|
return {
|
|
22113
22113
|
renderer,
|
|
22114
22114
|
onRenderUpdater,
|
|
@@ -22130,12 +22130,12 @@ function initSetupState2({
|
|
|
22130
22130
|
brain,
|
|
22131
22131
|
headerBrain,
|
|
22132
22132
|
domRef,
|
|
22133
|
-
columnMenuTargetRef: (0,
|
|
22134
|
-
editingValueRef: (0,
|
|
22135
|
-
scrollerDOMRef: (0,
|
|
22136
|
-
portalDOMRef: (0,
|
|
22137
|
-
focusDetectDOMRef: (0,
|
|
22138
|
-
activeCellIndicatorDOMRef: (0,
|
|
22133
|
+
columnMenuTargetRef: (0, import_react42.createRef)(),
|
|
22134
|
+
editingValueRef: (0, import_react42.createRef)(),
|
|
22135
|
+
scrollerDOMRef: (0, import_react42.createRef)(),
|
|
22136
|
+
portalDOMRef: (0, import_react42.createRef)(),
|
|
22137
|
+
focusDetectDOMRef: (0, import_react42.createRef)(),
|
|
22138
|
+
activeCellIndicatorDOMRef: (0, import_react42.createRef)(),
|
|
22139
22139
|
onColumnMenuClick: buildSubscriptionCallback(),
|
|
22140
22140
|
cellContextMenu: buildSubscriptionCallback(),
|
|
22141
22141
|
contextMenu: buildSubscriptionCallback(),
|
|
@@ -22505,14 +22505,14 @@ function getColumnVisibilityForHideEmptyGroupColumns(params) {
|
|
|
22505
22505
|
}
|
|
22506
22506
|
|
|
22507
22507
|
// src/components/InfiniteTable/hooks/useToggleGroupRow.ts
|
|
22508
|
-
var
|
|
22508
|
+
var import_react43 = require("react");
|
|
22509
22509
|
function useToggleGroupRow() {
|
|
22510
22510
|
const {
|
|
22511
22511
|
getState: getDataSourceState,
|
|
22512
22512
|
componentActions: dataSourceActions,
|
|
22513
22513
|
getDataSourceMasterContext
|
|
22514
22514
|
} = useDataSourceContextValue();
|
|
22515
|
-
const toggleGroupRow = (0,
|
|
22515
|
+
const toggleGroupRow = (0, import_react43.useCallback)((groupKeys) => {
|
|
22516
22516
|
const state = getDataSourceState();
|
|
22517
22517
|
const newState = new GroupRowsState(state.groupRowsState);
|
|
22518
22518
|
newState.toggleGroupRow(groupKeys);
|
|
@@ -22552,7 +22552,7 @@ function useToggleGroupRow() {
|
|
|
22552
22552
|
|
|
22553
22553
|
// src/components/InfiniteTable/hooks/useColumnsWhen.ts
|
|
22554
22554
|
function useGroupByMap(groupBy) {
|
|
22555
|
-
return (0,
|
|
22555
|
+
return (0, import_react44.useMemo)(() => getGroupByMap(groupBy), [groupBy]);
|
|
22556
22556
|
}
|
|
22557
22557
|
function useColumnsWhen() {
|
|
22558
22558
|
const {
|
|
@@ -22566,13 +22566,13 @@ function useColumnsWhen() {
|
|
|
22566
22566
|
pivotGrandTotalColumnPosition
|
|
22567
22567
|
}
|
|
22568
22568
|
} = useManagedComponentState();
|
|
22569
|
-
(0,
|
|
22569
|
+
(0, import_react44.useEffect)(() => {
|
|
22570
22570
|
dataSourceActions.generateGroupRows = groupRenderStrategy !== "inline";
|
|
22571
22571
|
}, [groupRenderStrategy]);
|
|
22572
|
-
(0,
|
|
22572
|
+
(0, import_react44.useEffect)(() => {
|
|
22573
22573
|
dataSourceActions.pivotTotalColumnPosition = pivotTotalColumnPosition;
|
|
22574
22574
|
}, [pivotTotalColumnPosition]);
|
|
22575
|
-
(0,
|
|
22575
|
+
(0, import_react44.useEffect)(() => {
|
|
22576
22576
|
if (pivotGrandTotalColumnPosition != void 0) {
|
|
22577
22577
|
dataSourceActions.pivotGrandTotalColumnPosition = pivotGrandTotalColumnPosition;
|
|
22578
22578
|
}
|
|
@@ -22655,7 +22655,7 @@ function useColumnsWhenInlineGroupRenderStrategy(groupByMap) {
|
|
|
22655
22655
|
});
|
|
22656
22656
|
return Object.keys(computedColumns).length === 0 ? void 0 : computedColumns;
|
|
22657
22657
|
}
|
|
22658
|
-
(0,
|
|
22658
|
+
(0, import_react44.useEffect)(() => {
|
|
22659
22659
|
const update = () => {
|
|
22660
22660
|
componentActions.columnsWhenInlineGroupRenderStrategy = isTree ? void 0 : computeColumnsWhenInlineGroupRenderStrategy(
|
|
22661
22661
|
columns,
|
|
@@ -22686,7 +22686,7 @@ function useColumnsWhenGrouping() {
|
|
|
22686
22686
|
getComponentState
|
|
22687
22687
|
} = useManagedComponentState();
|
|
22688
22688
|
const toggleGroupRow = useToggleGroupRow();
|
|
22689
|
-
(0,
|
|
22689
|
+
(0, import_react44.useEffect)(() => {
|
|
22690
22690
|
const update = () => {
|
|
22691
22691
|
const { columns: columnsWhenGrouping, groupColumnIds } = getColumnsWhenGrouping({
|
|
22692
22692
|
columns,
|
|
@@ -22757,7 +22757,7 @@ function useHideColumns(groupByMap) {
|
|
|
22757
22757
|
groupRenderStrategy
|
|
22758
22758
|
}
|
|
22759
22759
|
} = useManagedComponentState();
|
|
22760
|
-
(0,
|
|
22760
|
+
(0, import_react44.useLayoutEffect)(() => {
|
|
22761
22761
|
if (groupRenderStrategy !== "multi-column") {
|
|
22762
22762
|
return;
|
|
22763
22763
|
}
|
|
@@ -22790,7 +22790,7 @@ function useHideColumns(groupByMap) {
|
|
|
22790
22790
|
hideEmptyGroupColumns ? groupRowsIndexesInDataArray : null,
|
|
22791
22791
|
hideEmptyGroupColumns
|
|
22792
22792
|
]);
|
|
22793
|
-
(0,
|
|
22793
|
+
(0, import_react44.useEffect)(() => {
|
|
22794
22794
|
const isGrouped = groupBy.length > 0;
|
|
22795
22795
|
const currentState = getComponentState();
|
|
22796
22796
|
const {
|
|
@@ -22960,7 +22960,7 @@ function getColumnsWhenGrouping(params) {
|
|
|
22960
22960
|
}
|
|
22961
22961
|
|
|
22962
22962
|
// src/components/InfiniteTable/hooks/useComputedColumns.ts
|
|
22963
|
-
var
|
|
22963
|
+
var import_react45 = require("react");
|
|
22964
22964
|
var useComputedColumns = ({
|
|
22965
22965
|
columns,
|
|
22966
22966
|
bodySize,
|
|
@@ -23013,7 +23013,7 @@ var useComputedColumns = ({
|
|
|
23013
23013
|
computedColumnsMap,
|
|
23014
23014
|
computedColumnsMapInInitialOrder,
|
|
23015
23015
|
fieldsToColumn
|
|
23016
|
-
} = (0,
|
|
23016
|
+
} = (0, import_react45.useMemo)(() => {
|
|
23017
23017
|
return getComputedColumns({
|
|
23018
23018
|
columns,
|
|
23019
23019
|
scrollbarWidth: scrollbarWidth2,
|
|
@@ -23100,7 +23100,7 @@ var useComputedColumns = ({
|
|
|
23100
23100
|
};
|
|
23101
23101
|
|
|
23102
23102
|
// src/components/InfiniteTable/hooks/useComputedRowHeight.ts
|
|
23103
|
-
var
|
|
23103
|
+
var import_react46 = require("react");
|
|
23104
23104
|
var RowSizeCache = class {
|
|
23105
23105
|
constructor() {
|
|
23106
23106
|
this.rowHeight = /* @__PURE__ */ new Map();
|
|
@@ -23184,7 +23184,7 @@ function getComputedRowHeight(param, cache) {
|
|
|
23184
23184
|
return result;
|
|
23185
23185
|
}
|
|
23186
23186
|
function useComputedRowHeight(param) {
|
|
23187
|
-
return (0,
|
|
23187
|
+
return (0, import_react46.useMemo)(() => {
|
|
23188
23188
|
const computedRowSizeCache = new RowSizeCache();
|
|
23189
23189
|
const computedRowHeight = getComputedRowHeight(param, computedRowSizeCache);
|
|
23190
23190
|
return {
|
|
@@ -23201,7 +23201,7 @@ function useComputedRowHeight(param) {
|
|
|
23201
23201
|
}
|
|
23202
23202
|
|
|
23203
23203
|
// src/components/InfiniteTable/hooks/useScrollbars.ts
|
|
23204
|
-
var
|
|
23204
|
+
var import_react47 = require("react");
|
|
23205
23205
|
var INITIAL_SCROLLBARS = {
|
|
23206
23206
|
vertical: false,
|
|
23207
23207
|
horizontal: false
|
|
@@ -23209,8 +23209,8 @@ var INITIAL_SCROLLBARS = {
|
|
|
23209
23209
|
function useScrollbars(brain) {
|
|
23210
23210
|
const { getComponentState: getInfiniteTableState } = useManagedComponentState();
|
|
23211
23211
|
const { getState: getDataSourceState } = useDataSourceContextValue();
|
|
23212
|
-
const [scrollbars, setScrollbars] = (0,
|
|
23213
|
-
(0,
|
|
23212
|
+
const [scrollbars, setScrollbars] = (0, import_react47.useState)(INITIAL_SCROLLBARS);
|
|
23213
|
+
(0, import_react47.useEffect)(() => {
|
|
23214
23214
|
return brain.onRenderCountChange(() => {
|
|
23215
23215
|
const { scrollTopMax, scrollLeftMax } = brain;
|
|
23216
23216
|
setScrollbars({
|
|
@@ -23219,7 +23219,7 @@ function useScrollbars(brain) {
|
|
|
23219
23219
|
});
|
|
23220
23220
|
});
|
|
23221
23221
|
}, [brain]);
|
|
23222
|
-
(0,
|
|
23222
|
+
(0, import_react47.useLayoutEffect)(() => {
|
|
23223
23223
|
const dataSourceState = getDataSourceState();
|
|
23224
23224
|
const { onScrollbarsChange } = getInfiniteTableState();
|
|
23225
23225
|
const { notifyScrollbarsChange } = dataSourceState;
|
|
@@ -23258,7 +23258,7 @@ function useComputed() {
|
|
|
23258
23258
|
bodySize,
|
|
23259
23259
|
showSeparatePivotColumnForSingleAggregation
|
|
23260
23260
|
} = componentState;
|
|
23261
|
-
(0,
|
|
23261
|
+
(0, import_react48.useState)(() => {
|
|
23262
23262
|
componentState.onRowHeightCSSVarChange.onChange((rowHeight2) => {
|
|
23263
23263
|
if (rowHeight2) {
|
|
23264
23264
|
componentActions.rowHeight = rowHeight2;
|
|
@@ -23285,7 +23285,7 @@ function useComputed() {
|
|
|
23285
23285
|
}
|
|
23286
23286
|
);
|
|
23287
23287
|
});
|
|
23288
|
-
(0,
|
|
23288
|
+
(0, import_react48.useEffect)(() => {
|
|
23289
23289
|
dataSourceActions.showSeparatePivotColumnForSingleAggregation = showSeparatePivotColumnForSingleAggregation;
|
|
23290
23290
|
}, [showSeparatePivotColumnForSingleAggregation]);
|
|
23291
23291
|
const { multiSort, filterValue, filterTypes } = dataSourceState;
|
|
@@ -23353,7 +23353,7 @@ function useComputed() {
|
|
|
23353
23353
|
const scrollbars = useScrollbars(brain);
|
|
23354
23354
|
const computedPinnedStartOverflow = computedPinnedStartWidth ? computedPinnedStartColumnsWidth > computedPinnedStartWidth : false;
|
|
23355
23355
|
const computedPinnedEndOverflow = computedPinnedEndWidth ? computedPinnedEndColumnsWidth > computedPinnedEndWidth : false;
|
|
23356
|
-
const [multiRowSelector] = (0,
|
|
23356
|
+
const [multiRowSelector] = (0, import_react48.useState)(() => {
|
|
23357
23357
|
const multiRowSelector2 = new MultiRowSelector({
|
|
23358
23358
|
isRowDisabledAt: (index) => {
|
|
23359
23359
|
const dataItem = getDataSourceState().dataArray[index];
|
|
@@ -23367,7 +23367,7 @@ function useComputed() {
|
|
|
23367
23367
|
return multiRowSelector2;
|
|
23368
23368
|
});
|
|
23369
23369
|
const getComputedVisibleColumns = useLatest(computedVisibleColumns);
|
|
23370
|
-
const [multiCellSelector] = (0,
|
|
23370
|
+
const [multiCellSelector] = (0, import_react48.useState)(() => {
|
|
23371
23371
|
return new MultiCellSelector({
|
|
23372
23372
|
getPrimaryKeyByIndex: dataSourceApi.getPrimaryKeyByIndex,
|
|
23373
23373
|
getColumnIdByIndex: (colIndex) => {
|
|
@@ -23416,7 +23416,7 @@ function useComputed() {
|
|
|
23416
23416
|
}
|
|
23417
23417
|
|
|
23418
23418
|
// src/components/InfiniteTable/hooks/useLicense/useLicense.ts
|
|
23419
|
-
var
|
|
23419
|
+
var import_react49 = require("react");
|
|
23420
23420
|
|
|
23421
23421
|
// src/components/InfiniteTable/hooks/useLicense/crc32.ts
|
|
23422
23422
|
var DEFAULT_ReversedPolynomial = 3988292384;
|
|
@@ -23587,13 +23587,13 @@ var isInsidePlayground = isInsideSandbox() || isInsideSandpack();
|
|
|
23587
23587
|
var useLicense = (licenseKey = "") => {
|
|
23588
23588
|
const masterContext = useMasterDetailContext();
|
|
23589
23589
|
const isDetail = !!masterContext;
|
|
23590
|
-
const valid = (0,
|
|
23590
|
+
const valid = (0, import_react49.useMemo)(() => {
|
|
23591
23591
|
if (isDetail) {
|
|
23592
23592
|
return true;
|
|
23593
23593
|
}
|
|
23594
23594
|
let valid2 = isValidLicense(licenseKey, {
|
|
23595
23595
|
publishedAt: 1624970570587,
|
|
23596
|
-
version: "6.2.
|
|
23596
|
+
version: "6.2.4"
|
|
23597
23597
|
});
|
|
23598
23598
|
if (!licenseKey && !valid2 && isInsidePlayground) {
|
|
23599
23599
|
return true;
|
|
@@ -23604,18 +23604,18 @@ var useLicense = (licenseKey = "") => {
|
|
|
23604
23604
|
};
|
|
23605
23605
|
|
|
23606
23606
|
// src/components/InfiniteTable/hooks/useScrollToActiveCell.ts
|
|
23607
|
-
var
|
|
23607
|
+
var import_react50 = require("react");
|
|
23608
23608
|
var RETRIES = 10;
|
|
23609
23609
|
function useScrollToActiveCell(activeCellIndex, dataCount, imperativeApi) {
|
|
23610
|
-
const didScrollRef = (0,
|
|
23611
|
-
const rafId = (0,
|
|
23612
|
-
(0,
|
|
23610
|
+
const didScrollRef = (0, import_react50.useRef)(false);
|
|
23611
|
+
const rafId = (0, import_react50.useRef)(null);
|
|
23612
|
+
(0, import_react50.useEffect)(() => {
|
|
23613
23613
|
if (activeCellIndex != null) {
|
|
23614
23614
|
didScrollRef.current = false;
|
|
23615
23615
|
cancelRaf(rafId.current);
|
|
23616
23616
|
}
|
|
23617
23617
|
}, [activeCellIndex]);
|
|
23618
|
-
(0,
|
|
23618
|
+
(0, import_react50.useEffect)(() => {
|
|
23619
23619
|
if (activeCellIndex != null && !didScrollRef.current) {
|
|
23620
23620
|
let tryScroll2 = function(times = 0) {
|
|
23621
23621
|
times++;
|
|
@@ -23643,18 +23643,18 @@ function useScrollToActiveCell(activeCellIndex, dataCount, imperativeApi) {
|
|
|
23643
23643
|
}
|
|
23644
23644
|
|
|
23645
23645
|
// src/components/InfiniteTable/hooks/useScrollToActiveRow.ts
|
|
23646
|
-
var
|
|
23646
|
+
var import_react51 = require("react");
|
|
23647
23647
|
var RETRIES2 = 10;
|
|
23648
23648
|
function useScrollToActiveRow(activeRowIndex, dataCount, imperativeApi) {
|
|
23649
|
-
const didScrollRef = (0,
|
|
23650
|
-
const rafId = (0,
|
|
23651
|
-
(0,
|
|
23649
|
+
const didScrollRef = (0, import_react51.useRef)(false);
|
|
23650
|
+
const rafId = (0, import_react51.useRef)(null);
|
|
23651
|
+
(0, import_react51.useEffect)(() => {
|
|
23652
23652
|
if (activeRowIndex != null) {
|
|
23653
23653
|
didScrollRef.current = false;
|
|
23654
23654
|
cancelAnimationFrame(rafId.current);
|
|
23655
23655
|
}
|
|
23656
23656
|
}, [activeRowIndex]);
|
|
23657
|
-
(0,
|
|
23657
|
+
(0, import_react51.useEffect)(() => {
|
|
23658
23658
|
if (activeRowIndex != null && !didScrollRef.current) {
|
|
23659
23659
|
let tryScroll2 = function(times = 0) {
|
|
23660
23660
|
times++;
|
|
@@ -23683,7 +23683,7 @@ function useScrollToActiveRow(activeRowIndex, dataCount, imperativeApi) {
|
|
|
23683
23683
|
var toCSSVarName = (value) => `--infinite-${value}`;
|
|
23684
23684
|
|
|
23685
23685
|
// src/components/InfiniteTable/eventHandlers/index.ts
|
|
23686
|
-
var
|
|
23686
|
+
var import_react52 = require("react");
|
|
23687
23687
|
|
|
23688
23688
|
// src/components/InfiniteTable/eventHandlers/onCellClick.ts
|
|
23689
23689
|
function onCellClick(context, event) {
|
|
@@ -24363,7 +24363,7 @@ function useEventHandlersContext() {
|
|
|
24363
24363
|
componentActions: dataSourceActions,
|
|
24364
24364
|
api: dataSourceApi
|
|
24365
24365
|
} = useDataSourceContextValue();
|
|
24366
|
-
const context = (0,
|
|
24366
|
+
const context = (0, import_react52.useMemo)(() => {
|
|
24367
24367
|
const context2 = {
|
|
24368
24368
|
getComputed,
|
|
24369
24369
|
getDataSourceMasterContext,
|
|
@@ -24394,7 +24394,7 @@ function useEventHandlersContext() {
|
|
|
24394
24394
|
}
|
|
24395
24395
|
function handleDOMEvents() {
|
|
24396
24396
|
const context = useEventHandlersContext();
|
|
24397
|
-
(0,
|
|
24397
|
+
(0, import_react52.useEffect)(() => {
|
|
24398
24398
|
const removeOnKeyDown = context.getState().keyDown.onChange((event) => {
|
|
24399
24399
|
onKeyDown(context, event);
|
|
24400
24400
|
});
|
|
@@ -24439,7 +24439,7 @@ function handleDOMEvents() {
|
|
|
24439
24439
|
}
|
|
24440
24440
|
function subscribeToDOMEvents() {
|
|
24441
24441
|
const { getState } = useInfiniteTable();
|
|
24442
|
-
const onKeyDown2 = (0,
|
|
24442
|
+
const onKeyDown2 = (0, import_react52.useCallback)((event) => {
|
|
24443
24443
|
getState().keyDown(event);
|
|
24444
24444
|
}, []);
|
|
24445
24445
|
return { onKeyDown: onKeyDown2 };
|
|
@@ -24450,11 +24450,11 @@ function useDOMEventHandlers() {
|
|
|
24450
24450
|
}
|
|
24451
24451
|
|
|
24452
24452
|
// src/components/InfiniteTable/hooks/useColumnMenu.ts
|
|
24453
|
-
var
|
|
24453
|
+
var import_react57 = require("react");
|
|
24454
24454
|
|
|
24455
24455
|
// src/components/hooks/useOverlay/index.tsx
|
|
24456
24456
|
var React56 = __toESM(require("react"));
|
|
24457
|
-
var
|
|
24457
|
+
var import_react53 = require("react");
|
|
24458
24458
|
var import_react_dom2 = require("react-dom");
|
|
24459
24459
|
|
|
24460
24460
|
// src/utils/pageGeometry/Point.ts
|
|
@@ -24842,7 +24842,7 @@ function DefaultOverlayPortal(props) {
|
|
|
24842
24842
|
}
|
|
24843
24843
|
function OverlayContent(props) {
|
|
24844
24844
|
const nodeRef = React56.useRef(null);
|
|
24845
|
-
(0,
|
|
24845
|
+
(0, import_react53.useEffect)(() => {
|
|
24846
24846
|
return props.realign.onChange((handle) => {
|
|
24847
24847
|
if (nodeRef.current && handle) {
|
|
24848
24848
|
alignNode(nodeRef.current, handle);
|
|
@@ -24853,7 +24853,7 @@ function OverlayContent(props) {
|
|
|
24853
24853
|
"div",
|
|
24854
24854
|
{
|
|
24855
24855
|
style: { position: "absolute", top: 0, left: 0 },
|
|
24856
|
-
ref: (0,
|
|
24856
|
+
ref: (0, import_react53.useCallback)((node) => {
|
|
24857
24857
|
if (node) {
|
|
24858
24858
|
alignNode(node, props);
|
|
24859
24859
|
}
|
|
@@ -24902,8 +24902,8 @@ async function alignNode(node, params) {
|
|
|
24902
24902
|
}
|
|
24903
24903
|
}
|
|
24904
24904
|
function useOverlayPortal(content, portalContainer) {
|
|
24905
|
-
const [container, setContainer] = (0,
|
|
24906
|
-
(0,
|
|
24905
|
+
const [container, setContainer] = (0, import_react53.useState)(null);
|
|
24906
|
+
(0, import_react53.useLayoutEffect)(() => {
|
|
24907
24907
|
async function getContainer() {
|
|
24908
24908
|
const container2 = portalContainer ? await retrieveElement(portalContainer) : null;
|
|
24909
24909
|
if (container2 != null) {
|
|
@@ -24949,10 +24949,10 @@ globalThis.allhandles = {};
|
|
|
24949
24949
|
globalThis.thehandles = {};
|
|
24950
24950
|
function useOverlay(params) {
|
|
24951
24951
|
const rootParams = params;
|
|
24952
|
-
const [handles] = (0,
|
|
24953
|
-
const [handleToRealign, setHandleToRealign] = (0,
|
|
24954
|
-
const [realignTimestamp, setRealignTimestamp] = (0,
|
|
24955
|
-
const getContentForPortal = (0,
|
|
24952
|
+
const [handles] = (0, import_react53.useState)(() => /* @__PURE__ */ new Map());
|
|
24953
|
+
const [handleToRealign, setHandleToRealign] = (0, import_react53.useState)(null);
|
|
24954
|
+
const [realignTimestamp, setRealignTimestamp] = (0, import_react53.useState)(0);
|
|
24955
|
+
const getContentForPortal = (0, import_react53.useCallback)(() => {
|
|
24956
24956
|
const contentForPortal = [];
|
|
24957
24957
|
for (const [_2, handle] of handles) {
|
|
24958
24958
|
contentForPortal.push(
|
|
@@ -24966,7 +24966,7 @@ function useOverlay(params) {
|
|
|
24966
24966
|
getContentForPortal(),
|
|
24967
24967
|
params.portalContainer
|
|
24968
24968
|
);
|
|
24969
|
-
const showOverlay = (0,
|
|
24969
|
+
const showOverlay = (0, import_react53.useCallback)(
|
|
24970
24970
|
(content, params2) => {
|
|
24971
24971
|
const id = params2.id || getIdForReactOnlyChild(content) || getChangeDetect();
|
|
24972
24972
|
const key = `${id}`;
|
|
@@ -25207,7 +25207,7 @@ var deriveStateFromProps2 = (params) => {
|
|
|
25207
25207
|
|
|
25208
25208
|
// src/components/Menu/Menu.tsx
|
|
25209
25209
|
var React59 = __toESM(require("react"));
|
|
25210
|
-
var
|
|
25210
|
+
var import_react56 = require("react");
|
|
25211
25211
|
|
|
25212
25212
|
// src/utils/pageGeometry/Triangle.ts
|
|
25213
25213
|
var Triangle = class extends ConvexPoly {
|
|
@@ -25426,24 +25426,24 @@ var MenuTriangleContext = class {
|
|
|
25426
25426
|
};
|
|
25427
25427
|
|
|
25428
25428
|
// src/components/Menu/MenuContext.ts
|
|
25429
|
-
var
|
|
25430
|
-
var MenuContext = (0,
|
|
25429
|
+
var import_react54 = require("react");
|
|
25430
|
+
var MenuContext = (0, import_react54.createContext)(null);
|
|
25431
25431
|
function useMenuContext() {
|
|
25432
|
-
const contextValue = (0,
|
|
25432
|
+
const contextValue = (0, import_react54.useContext)(MenuContext);
|
|
25433
25433
|
return contextValue;
|
|
25434
25434
|
}
|
|
25435
25435
|
|
|
25436
25436
|
// src/components/hooks/useMounted.ts
|
|
25437
|
-
var
|
|
25437
|
+
var import_react55 = require("react");
|
|
25438
25438
|
function useMounted() {
|
|
25439
|
-
let mountedRef = (0,
|
|
25440
|
-
(0,
|
|
25439
|
+
let mountedRef = (0, import_react55.useRef)(true);
|
|
25440
|
+
(0, import_react55.useEffect)(() => {
|
|
25441
25441
|
mountedRef.current = true;
|
|
25442
25442
|
return () => {
|
|
25443
25443
|
mountedRef.current = false;
|
|
25444
25444
|
};
|
|
25445
25445
|
}, []);
|
|
25446
|
-
const isMounted = (0,
|
|
25446
|
+
const isMounted = (0, import_react55.useCallback)(() => mountedRef.current, []);
|
|
25447
25447
|
return isMounted;
|
|
25448
25448
|
}
|
|
25449
25449
|
|
|
@@ -25536,7 +25536,7 @@ function useSubmenus({
|
|
|
25536
25536
|
onItemActivate
|
|
25537
25537
|
}) {
|
|
25538
25538
|
const { getState } = useMenuContext();
|
|
25539
|
-
const [{ onItemEnter, onItemLeave }] = (0,
|
|
25539
|
+
const [{ onItemEnter, onItemLeave }] = (0, import_react56.useState)(() => {
|
|
25540
25540
|
return new MenuTriangleContext({
|
|
25541
25541
|
parentMenuId: getState().parentMenuId,
|
|
25542
25542
|
onItemActivate: (itemKey) => {
|
|
@@ -25567,8 +25567,8 @@ function useSubmenus({
|
|
|
25567
25567
|
}).getHandlers();
|
|
25568
25568
|
});
|
|
25569
25569
|
return {
|
|
25570
|
-
onItemEnter: (0,
|
|
25571
|
-
onItemLeave: (0,
|
|
25570
|
+
onItemEnter: (0, import_react56.useCallback)(onItemEnter, []),
|
|
25571
|
+
onItemLeave: (0, import_react56.useCallback)(onItemLeave, [])
|
|
25572
25572
|
};
|
|
25573
25573
|
}
|
|
25574
25574
|
function MenuComponent(props) {
|
|
@@ -25593,16 +25593,16 @@ function MenuComponent(props) {
|
|
|
25593
25593
|
componentActions,
|
|
25594
25594
|
getState
|
|
25595
25595
|
} = useMenuContext();
|
|
25596
|
-
const setKeyboardActiveItemKey = (0,
|
|
25596
|
+
const setKeyboardActiveItemKey = (0, import_react56.useCallback)((key) => {
|
|
25597
25597
|
componentActions.keyboardActiveItemKey = key;
|
|
25598
25598
|
}, []);
|
|
25599
|
-
const setActiveItemKey = (0,
|
|
25599
|
+
const setActiveItemKey = (0, import_react56.useCallback)((key) => {
|
|
25600
25600
|
componentActions.activeItemKey = key;
|
|
25601
25601
|
}, []);
|
|
25602
25602
|
const isMounted = useMounted();
|
|
25603
|
-
const [submenuApi, setSubmenuApi] = (0,
|
|
25603
|
+
const [submenuApi, setSubmenuApi] = (0, import_react56.useState)(null);
|
|
25604
25604
|
let renderedChildren = null;
|
|
25605
|
-
(0,
|
|
25605
|
+
(0, import_react56.useLayoutEffect)(() => {
|
|
25606
25606
|
const { runtimeItems: runtimeItems2 } = getState();
|
|
25607
25607
|
const activeItem = runtimeItems2.filter(
|
|
25608
25608
|
(item) => item.type === "item" && activeItemKey === item.key
|
|
@@ -25812,7 +25812,7 @@ function MenuComponent(props) {
|
|
|
25812
25812
|
function onMenuBlur() {
|
|
25813
25813
|
componentActions.focused = false;
|
|
25814
25814
|
}
|
|
25815
|
-
const onMenuFocus = (0,
|
|
25815
|
+
const onMenuFocus = (0, import_react56.useCallback)(function() {
|
|
25816
25816
|
componentActions.focused = true;
|
|
25817
25817
|
setTimeout(() => {
|
|
25818
25818
|
if (shouldSelectFirstItemOnFocus.current && domRef.current && domRef.current === document.activeElement && getState().keyboardActiveItemKey == null) {
|
|
@@ -25822,12 +25822,12 @@ function MenuComponent(props) {
|
|
|
25822
25822
|
}
|
|
25823
25823
|
});
|
|
25824
25824
|
}, []);
|
|
25825
|
-
const shouldSelectFirstItemOnFocus = (0,
|
|
25826
|
-
const hideAll = (0,
|
|
25825
|
+
const shouldSelectFirstItemOnFocus = (0, import_react56.useRef)(true);
|
|
25826
|
+
const hideAll = (0, import_react56.useCallback)(() => {
|
|
25827
25827
|
const state = getState();
|
|
25828
25828
|
state.onHideIntent?.(state);
|
|
25829
25829
|
}, [getState]);
|
|
25830
|
-
const [api] = (0,
|
|
25830
|
+
const [api] = (0, import_react56.useState)(() => {
|
|
25831
25831
|
const result2 = {
|
|
25832
25832
|
hideMenu: hideAll,
|
|
25833
25833
|
focus: () => {
|
|
@@ -25846,7 +25846,7 @@ function MenuComponent(props) {
|
|
|
25846
25846
|
};
|
|
25847
25847
|
return result2;
|
|
25848
25848
|
});
|
|
25849
|
-
const refCallback = (0,
|
|
25849
|
+
const refCallback = (0, import_react56.useCallback)((node) => {
|
|
25850
25850
|
if (node) {
|
|
25851
25851
|
domRef.current = node;
|
|
25852
25852
|
onShow?.(getState(), api);
|
|
@@ -26249,7 +26249,7 @@ function useColumnMenu() {
|
|
|
26249
26249
|
} = useOverlay({
|
|
26250
26250
|
portalContainer: masterContext ? masterContext.getMasterState().portalDOMRef.current : false
|
|
26251
26251
|
});
|
|
26252
|
-
(0,
|
|
26252
|
+
(0, import_react57.useEffect)(() => {
|
|
26253
26253
|
const { actions: actions2, getState: getState2 } = context;
|
|
26254
26254
|
const state = getState2();
|
|
26255
26255
|
return state.onColumnMenuClick.onChange((info) => {
|
|
@@ -26264,7 +26264,7 @@ function useColumnMenu() {
|
|
|
26264
26264
|
});
|
|
26265
26265
|
}, []);
|
|
26266
26266
|
const { columnMenuVisibleForColumnId, columnMenuVisibleKey } = getState();
|
|
26267
|
-
(0,
|
|
26267
|
+
(0, import_react57.useEffect)(() => {
|
|
26268
26268
|
const { columnMenuVisibleForColumnId: columnMenuVisibleForColumnId2, columnMenuTargetRef } = getState();
|
|
26269
26269
|
if (columnMenuVisibleForColumnId2) {
|
|
26270
26270
|
let handleMouseDown2 = function(event) {
|
|
@@ -26299,7 +26299,7 @@ function useColumnMenu() {
|
|
|
26299
26299
|
|
|
26300
26300
|
// src/components/InfiniteTable/components/FocusDetect.tsx
|
|
26301
26301
|
var React63 = __toESM(require("react"));
|
|
26302
|
-
var
|
|
26302
|
+
var import_react58 = require("react");
|
|
26303
26303
|
var style = {
|
|
26304
26304
|
width: 0,
|
|
26305
26305
|
height: 0,
|
|
@@ -26319,7 +26319,7 @@ function FocusDetect() {
|
|
|
26319
26319
|
} = useInfiniteTable();
|
|
26320
26320
|
const { getState: getDataSourceState, getDataSourceMasterContext } = useDataSourceContextValue();
|
|
26321
26321
|
const { focusDetectDOMRef } = getState();
|
|
26322
|
-
const onFocus = (0,
|
|
26322
|
+
const onFocus = (0, import_react58.useCallback)(async () => {
|
|
26323
26323
|
const context = {
|
|
26324
26324
|
getDataSourceState,
|
|
26325
26325
|
getDataSourceMasterContext,
|
|
@@ -26344,13 +26344,13 @@ function FocusDetect() {
|
|
|
26344
26344
|
}
|
|
26345
26345
|
|
|
26346
26346
|
// src/components/InfiniteTable/hooks/useEditingCallbackProps.ts
|
|
26347
|
-
var
|
|
26347
|
+
var import_react59 = require("react");
|
|
26348
26348
|
function useOnEditCancelled() {
|
|
26349
26349
|
const context = useInfiniteTable();
|
|
26350
26350
|
const { getState } = context;
|
|
26351
26351
|
const { editingCell } = getState();
|
|
26352
26352
|
const cancelled = editingCell && !editingCell.active ? editingCell.cancelled : void 0;
|
|
26353
|
-
(0,
|
|
26353
|
+
(0, import_react59.useEffect)(() => {
|
|
26354
26354
|
if (cancelled) {
|
|
26355
26355
|
const { rowIndex, columnId, initialValue } = getState().editingCell;
|
|
26356
26356
|
const { onEditCancelled } = getState();
|
|
@@ -26372,7 +26372,7 @@ function useOnEditRejected() {
|
|
|
26372
26372
|
state: { editingCell }
|
|
26373
26373
|
} = context;
|
|
26374
26374
|
const rejected = editingCell && !editingCell.active && editingCell.accepted instanceof Error ? editingCell.accepted : void 0;
|
|
26375
|
-
(0,
|
|
26375
|
+
(0, import_react59.useEffect)(() => {
|
|
26376
26376
|
if (rejected) {
|
|
26377
26377
|
const { rowIndex, columnId, value, initialValue } = getState().editingCell;
|
|
26378
26378
|
const { onEditRejected } = getState();
|
|
@@ -26396,7 +26396,7 @@ function useFocusOnEditStop() {
|
|
|
26396
26396
|
} = context;
|
|
26397
26397
|
const active = editingCell?.active;
|
|
26398
26398
|
const prevActive = usePrevious(active);
|
|
26399
|
-
(0,
|
|
26399
|
+
(0, import_react59.useEffect)(() => {
|
|
26400
26400
|
if (!active && prevActive) {
|
|
26401
26401
|
context.api.focus();
|
|
26402
26402
|
}
|
|
@@ -26409,7 +26409,7 @@ function useOnEditAccepted() {
|
|
|
26409
26409
|
getState
|
|
26410
26410
|
} = context;
|
|
26411
26411
|
const accepted = editingCell && !editingCell.active && !editingCell.cancelled && editingCell.accepted === true;
|
|
26412
|
-
(0,
|
|
26412
|
+
(0, import_react59.useEffect)(() => {
|
|
26413
26413
|
if (accepted) {
|
|
26414
26414
|
const { editingCell: editingCell2 } = getState();
|
|
26415
26415
|
const { value, rowIndex, columnId, initialValue } = editingCell2;
|
|
@@ -26434,7 +26434,7 @@ function useOnEditPersisted() {
|
|
|
26434
26434
|
getState
|
|
26435
26435
|
} = context;
|
|
26436
26436
|
const persisted = editingCell ? editingCell.persisted : void 0;
|
|
26437
|
-
(0,
|
|
26437
|
+
(0, import_react59.useEffect)(() => {
|
|
26438
26438
|
if (persisted) {
|
|
26439
26439
|
const { editingCell: editingCell2, onEditPersistError, onEditPersistSuccess } = getState();
|
|
26440
26440
|
if (!editingCell2) {
|
|
@@ -26467,7 +26467,7 @@ function useEditingCallbackProps() {
|
|
|
26467
26467
|
}
|
|
26468
26468
|
|
|
26469
26469
|
// src/components/InfiniteTable/hooks/useColumnFilterOperatorMenu.ts
|
|
26470
|
-
var
|
|
26470
|
+
var import_react60 = require("react");
|
|
26471
26471
|
|
|
26472
26472
|
// src/components/InfiniteTable/utils/getFilterOperatorMenuForColumn.tsx
|
|
26473
26473
|
var React66 = __toESM(require("react"));
|
|
@@ -26606,7 +26606,7 @@ function useColumnFilterOperatorMenu() {
|
|
|
26606
26606
|
} = useOverlay({
|
|
26607
26607
|
portalContainer: masterContext ? masterContext.getMasterState().portalDOMRef.current : false
|
|
26608
26608
|
});
|
|
26609
|
-
(0,
|
|
26609
|
+
(0, import_react60.useEffect)(() => {
|
|
26610
26610
|
const { actions: actions2, getState: getState2 } = context;
|
|
26611
26611
|
const state = getState2();
|
|
26612
26612
|
return state.onFilterOperatorMenuClick.onChange((info) => {
|
|
@@ -26642,7 +26642,7 @@ function useColumnFilterOperatorMenu() {
|
|
|
26642
26642
|
actions2.filterOperatorMenuVisibleForColumnId = column.id;
|
|
26643
26643
|
});
|
|
26644
26644
|
}, []);
|
|
26645
|
-
(0,
|
|
26645
|
+
(0, import_react60.useEffect)(() => {
|
|
26646
26646
|
const { filterOperatorMenuVisibleForColumnId } = getState();
|
|
26647
26647
|
if (filterOperatorMenuVisibleForColumnId) {
|
|
26648
26648
|
let handleMouseDown2 = function(event) {
|
|
@@ -26669,7 +26669,7 @@ function useColumnFilterOperatorMenu() {
|
|
|
26669
26669
|
}
|
|
26670
26670
|
|
|
26671
26671
|
// src/components/InfiniteTable/hooks/useContextMenu.ts
|
|
26672
|
-
var
|
|
26672
|
+
var import_react61 = require("react");
|
|
26673
26673
|
|
|
26674
26674
|
// src/components/InfiniteTable/utils/getCellContextMenu.tsx
|
|
26675
26675
|
var React68 = __toESM(require("react"));
|
|
@@ -26836,7 +26836,7 @@ function useCellContextMenu() {
|
|
|
26836
26836
|
} = useOverlay({
|
|
26837
26837
|
portalContainer: masterContext ? masterContext.getMasterState().portalDOMRef.current : false
|
|
26838
26838
|
});
|
|
26839
|
-
(0,
|
|
26839
|
+
(0, import_react61.useEffect)(() => {
|
|
26840
26840
|
const { actions: actions2, getState: getState2, getDataSourceState } = context;
|
|
26841
26841
|
const state = getState2();
|
|
26842
26842
|
return state.cellContextMenu.onChange((info) => {
|
|
@@ -26887,7 +26887,7 @@ function useCellContextMenu() {
|
|
|
26887
26887
|
}
|
|
26888
26888
|
});
|
|
26889
26889
|
}, []);
|
|
26890
|
-
(0,
|
|
26890
|
+
(0, import_react61.useEffect)(() => {
|
|
26891
26891
|
const { cellContextMenuVisibleFor } = getState();
|
|
26892
26892
|
if (cellContextMenuVisibleFor) {
|
|
26893
26893
|
let handleMouseDown2 = function(event) {
|
|
@@ -26923,7 +26923,7 @@ function useTableContextMenu() {
|
|
|
26923
26923
|
} = useOverlay({
|
|
26924
26924
|
portalContainer: masterContext ? masterContext.getMasterState().portalDOMRef.current : false
|
|
26925
26925
|
});
|
|
26926
|
-
(0,
|
|
26926
|
+
(0, import_react61.useEffect)(() => {
|
|
26927
26927
|
const { actions: actions2, getState: getState2 } = context;
|
|
26928
26928
|
const state = getState2();
|
|
26929
26929
|
return state.contextMenu.onChange((info) => {
|
|
@@ -26972,7 +26972,7 @@ function useTableContextMenu() {
|
|
|
26972
26972
|
}
|
|
26973
26973
|
});
|
|
26974
26974
|
}, []);
|
|
26975
|
-
(0,
|
|
26975
|
+
(0, import_react61.useEffect)(() => {
|
|
26976
26976
|
const { contextMenuVisibleFor } = getState();
|
|
26977
26977
|
if (contextMenuVisibleFor) {
|
|
26978
26978
|
let handleMouseDown2 = function(event) {
|
|
@@ -26999,17 +26999,17 @@ function useTableContextMenu() {
|
|
|
26999
26999
|
}
|
|
27000
27000
|
|
|
27001
27001
|
// src/components/InfiniteTable/components/HScrollSyncContent.tsx
|
|
27002
|
-
var
|
|
27002
|
+
var import_react63 = require("react");
|
|
27003
27003
|
var React69 = __toESM(require("react"));
|
|
27004
27004
|
|
|
27005
27005
|
// src/components/InfiniteTable/hooks/useGridScroll.ts
|
|
27006
|
-
var
|
|
27006
|
+
var import_react62 = require("react");
|
|
27007
27007
|
function useGridScroll(onScroll, deps) {
|
|
27008
27008
|
const {
|
|
27009
27009
|
state: { brain }
|
|
27010
27010
|
} = useInfiniteTable();
|
|
27011
|
-
const memoizedOnScroll = (0,
|
|
27012
|
-
(0,
|
|
27011
|
+
const memoizedOnScroll = (0, import_react62.useCallback)(onScroll, deps);
|
|
27012
|
+
(0, import_react62.useEffect)(() => {
|
|
27013
27013
|
const removeOnScroll = brain.onScroll(memoizedOnScroll);
|
|
27014
27014
|
return removeOnScroll;
|
|
27015
27015
|
}, [brain, memoizedOnScroll]);
|
|
@@ -27021,7 +27021,7 @@ var HScrollSyncContentCls = "yzx0vj0";
|
|
|
27021
27021
|
// src/components/InfiniteTable/components/HScrollSyncContent.tsx
|
|
27022
27022
|
function HScrollSyncContent(props) {
|
|
27023
27023
|
const { width, maxWidth, minWidth, scrollable, ...domProps } = props;
|
|
27024
|
-
const domRef = (0,
|
|
27024
|
+
const domRef = (0, import_react63.useRef)(null);
|
|
27025
27025
|
useGridScroll(
|
|
27026
27026
|
(scrollPos) => {
|
|
27027
27027
|
if (domRef.current && scrollable !== false) {
|
|
@@ -27079,12 +27079,12 @@ function useVisibleColumnSizes() {
|
|
|
27079
27079
|
var DEBUG_NAME = "InfiniteTable";
|
|
27080
27080
|
|
|
27081
27081
|
// src/components/InfiniteTable/hooks/useToggleWrapRowsHorizontally.ts
|
|
27082
|
-
var
|
|
27082
|
+
var import_react64 = require("react");
|
|
27083
27083
|
function useToggleWrapRowsHorizontally() {
|
|
27084
27084
|
const { state, getState, actions } = useInfiniteTable();
|
|
27085
27085
|
const { wrapRowsHorizontally } = state;
|
|
27086
27086
|
const oldWrapRowsHorizontally = usePrevious(wrapRowsHorizontally);
|
|
27087
|
-
(0,
|
|
27087
|
+
(0, import_react64.useEffect)(() => {
|
|
27088
27088
|
if (oldWrapRowsHorizontally !== wrapRowsHorizontally) {
|
|
27089
27089
|
const { brain, headerBrain, renderer, onRenderUpdater } = getState();
|
|
27090
27090
|
brain.destroy();
|
|
@@ -27101,12 +27101,12 @@ function useToggleWrapRowsHorizontally() {
|
|
|
27101
27101
|
}
|
|
27102
27102
|
|
|
27103
27103
|
// src/components/InfiniteTable/hooks/useHorizontalLayout.ts
|
|
27104
|
-
var
|
|
27104
|
+
var import_react65 = require("react");
|
|
27105
27105
|
function useHorizontalLayout() {
|
|
27106
27106
|
const { getState, actions, dataSourceActions, getDataSourceState } = useInfiniteTable();
|
|
27107
27107
|
const { groupBy, isTree } = getDataSourceState();
|
|
27108
27108
|
const { brain, wrapRowsHorizontally, repeatWrappedGroupRows } = getState();
|
|
27109
|
-
(0,
|
|
27109
|
+
(0, import_react65.useEffect)(() => {
|
|
27110
27110
|
if (!wrapRowsHorizontally) {
|
|
27111
27111
|
return;
|
|
27112
27112
|
}
|
|
@@ -27819,7 +27819,7 @@ var keyboardShortcuts = {
|
|
|
27819
27819
|
};
|
|
27820
27820
|
|
|
27821
27821
|
// src/components/hooks/useInterceptedMap.ts
|
|
27822
|
-
var
|
|
27822
|
+
var import_react66 = require("react");
|
|
27823
27823
|
function interceptMap(map2, fns) {
|
|
27824
27824
|
const { set, delete: deleteKey, clear } = map2;
|
|
27825
27825
|
if (fns.set) {
|
|
@@ -27981,21 +27981,21 @@ var WeakFixedSizeSet = _WeakFixedSizeSet;
|
|
|
27981
27981
|
WeakFixedSizeSet.DEFAULT_SIZE = 10;
|
|
27982
27982
|
|
|
27983
27983
|
// src/components/hooks/useEffectWhenSameDeps.ts
|
|
27984
|
-
var
|
|
27984
|
+
var import_react67 = require("react");
|
|
27985
27985
|
var isSameDeps = (deps, prevDeps) => {
|
|
27986
27986
|
return deps.every((dep, index) => dep === prevDeps[index]);
|
|
27987
27987
|
};
|
|
27988
27988
|
var useEffectWhenSameDeps = (callback, deps) => {
|
|
27989
|
-
const depsRef = (0,
|
|
27989
|
+
const depsRef = (0, import_react67.useRef)(deps);
|
|
27990
27990
|
const sameDeps = isSameDeps(deps, depsRef.current);
|
|
27991
|
-
const isInitialRef = (0,
|
|
27991
|
+
const isInitialRef = (0, import_react67.useRef)(true);
|
|
27992
27992
|
depsRef.current = deps;
|
|
27993
|
-
const effectDepsRef = (0,
|
|
27993
|
+
const effectDepsRef = (0, import_react67.useRef)(["same"]);
|
|
27994
27994
|
const effectDeps = sameDeps ? [Date.now()] : effectDepsRef.current;
|
|
27995
27995
|
effectDepsRef.current = effectDeps;
|
|
27996
|
-
const callbackRef = (0,
|
|
27996
|
+
const callbackRef = (0, import_react67.useRef)(callback);
|
|
27997
27997
|
callbackRef.current = callback;
|
|
27998
|
-
(0,
|
|
27998
|
+
(0, import_react67.useEffect)(() => {
|
|
27999
27999
|
if (isInitialRef.current) {
|
|
28000
28000
|
isInitialRef.current = false;
|
|
28001
28001
|
return;
|
|
@@ -28005,7 +28005,7 @@ var useEffectWhenSameDeps = (callback, deps) => {
|
|
|
28005
28005
|
};
|
|
28006
28006
|
|
|
28007
28007
|
// src/components/hooks/useEffectWhen.ts
|
|
28008
|
-
var
|
|
28008
|
+
var import_react68 = require("react");
|
|
28009
28009
|
var isSameDeps2 = (deps, prevDeps, compare) => {
|
|
28010
28010
|
return deps.every((dep, index) => {
|
|
28011
28011
|
if (compare) {
|
|
@@ -28016,26 +28016,26 @@ var isSameDeps2 = (deps, prevDeps, compare) => {
|
|
|
28016
28016
|
};
|
|
28017
28017
|
var useEffectWhen = (callback, options) => {
|
|
28018
28018
|
const { same: depsForSame, different: depsForDifferent, compare } = options;
|
|
28019
|
-
const sameDepsRef = (0,
|
|
28020
|
-
const differentDepsRef = (0,
|
|
28019
|
+
const sameDepsRef = (0, import_react68.useRef)(depsForSame);
|
|
28020
|
+
const differentDepsRef = (0, import_react68.useRef)(depsForDifferent);
|
|
28021
28021
|
const sameRespected = isSameDeps2(depsForSame, sameDepsRef.current, compare);
|
|
28022
28022
|
const differentRespected = !isSameDeps2(
|
|
28023
28023
|
depsForDifferent,
|
|
28024
28024
|
differentDepsRef.current,
|
|
28025
28025
|
compare
|
|
28026
28026
|
);
|
|
28027
|
-
const isInitialRef = (0,
|
|
28027
|
+
const isInitialRef = (0, import_react68.useRef)(true);
|
|
28028
28028
|
sameDepsRef.current = depsForSame;
|
|
28029
28029
|
differentDepsRef.current = depsForDifferent;
|
|
28030
|
-
const effectDepsRef = (0,
|
|
28030
|
+
const effectDepsRef = (0, import_react68.useRef)(["same"]);
|
|
28031
28031
|
const effectDeps = sameRespected && differentRespected ? [Date.now()] : effectDepsRef.current;
|
|
28032
28032
|
effectDepsRef.current = effectDeps;
|
|
28033
|
-
const callbackRef = (0,
|
|
28033
|
+
const callbackRef = (0, import_react68.useRef)(callback);
|
|
28034
28034
|
callbackRef.current = callback;
|
|
28035
28035
|
if (sameRespected && differentRespected) {
|
|
28036
28036
|
isInitialRef.current = false;
|
|
28037
28037
|
}
|
|
28038
|
-
(0,
|
|
28038
|
+
(0, import_react68.useEffect)(() => {
|
|
28039
28039
|
if (isInitialRef.current) {
|
|
28040
28040
|
return;
|
|
28041
28041
|
}
|