@infinite-table/infinite-react 6.1.0 → 6.1.1-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.css +59 -42
- package/index.d.ts +20 -3
- package/index.dev.js +333 -143
- package/index.dev.mjs +410 -220
- package/index.js +333 -143
- package/index.mjs +410 -220
- package/package.json +2 -2
package/index.js
CHANGED
|
@@ -1453,7 +1453,7 @@ var internalProps = {
|
|
|
1453
1453
|
};
|
|
1454
1454
|
|
|
1455
1455
|
// src/components/InfiniteTable/internalVars.css.ts
|
|
1456
|
-
var InternalVars = { currentColumnTransformX: "var(--currentColumnTransformX__16hkbkc0)", y: "var(--y__16hkbkc1)", currentFlashingBackground: "var(--currentFlashingBackground__16hkbkc2)", currentFlashingDuration: "var(--currentFlashingDuration__16hkbkc3)", activeCellRowOffset: "var(--activeCellRowOffset__16hkbkc4)", activeCellRowOffsetX: "var(--activeCellRowOffsetX__16hkbkc5)", activeCellRowHeight: "var(--activeCellRowHeight__16hkbkc6)", activeCellOffsetX: "var(--activeCellOffsetX__16hkbkc7)", activeCellOffsetY: "var(--activeCellOffsetY__16hkbkc8)", scrollTopForActiveRow: "var(--scrollTopForActiveRow__16hkbkc9)", scrollLeftForActiveRowWhenHorizontalLayout: "var(--scrollLeftForActiveRowWhenHorizontalLayout__16hkbkca)", activeCellColWidth: "var(--activeCellColWidth__16hkbkcb)", activeCellColOffset: "var(--activeCellColOffset__16hkbkcc)", columnReorderEffectDurationAtIndex: "var(--columnReorderEffectDurationAtIndex__16hkbkcd)", columnWidthAtIndex: "var(--columnWidthAtIndex__16hkbkce)", columnOffsetAtIndex: "var(--columnOffsetAtIndex__16hkbkcf)", columnOffsetAtIndexWhileReordering: "var(--columnOffsetAtIndexWhileReordering__16hkbkcg)", columnZIndexAtIndex: "var(--columnZIndexAtIndex__16hkbkch)", pinnedStartWidth: "var(--pinnedStartWidth__16hkbkci)", pinnedEndWidth: "var(--pinnedEndWidth__16hkbkcj)", pinnedEndOffset: "var(--pinnedEndOffset__16hkbkck)", computedVisibleColumnsCount: "var(--computedVisibleColumnsCount__16hkbkcl)", baseZIndexForCells: "var(--baseZIndexForCells__16hkbkcm)", bodyWidth: "var(--bodyWidth__16hkbkcn)", bodyHeight: "var(--bodyHeight__16hkbkco)", scrollbarWidthHorizontal: "var(--scrollbarWidthHorizontal__16hkbkcp)", scrollbarWidthVertical: "var(--scrollbarWidthVertical__16hkbkcq)", scrollLeft: "var(--scrollLeft__16hkbkcr)", scrollTop: "var(--scrollTop__16hkbkcs)" };
|
|
1456
|
+
var InternalVars = { currentColumnTransformX: "var(--currentColumnTransformX__16hkbkc0)", y: "var(--y__16hkbkc1)", currentFlashingBackground: "var(--currentFlashingBackground__16hkbkc2)", currentFlashingDuration: "var(--currentFlashingDuration__16hkbkc3)", activeCellRowOffset: "var(--activeCellRowOffset__16hkbkc4)", activeCellRowOffsetX: "var(--activeCellRowOffsetX__16hkbkc5)", activeCellRowHeight: "var(--activeCellRowHeight__16hkbkc6)", activeCellOffsetX: "var(--activeCellOffsetX__16hkbkc7)", activeCellOffsetY: "var(--activeCellOffsetY__16hkbkc8)", scrollTopForActiveRow: "var(--scrollTopForActiveRow__16hkbkc9)", scrollLeftForActiveRowWhenHorizontalLayout: "var(--scrollLeftForActiveRowWhenHorizontalLayout__16hkbkca)", activeCellColWidth: "var(--activeCellColWidth__16hkbkcb)", activeCellColOffset: "var(--activeCellColOffset__16hkbkcc)", columnReorderEffectDurationAtIndex: "var(--columnReorderEffectDurationAtIndex__16hkbkcd)", columnWidthAtIndex: "var(--columnWidthAtIndex__16hkbkce)", columnOffsetAtIndex: "var(--columnOffsetAtIndex__16hkbkcf)", columnOffsetAtIndexWhileReordering: "var(--columnOffsetAtIndexWhileReordering__16hkbkcg)", columnZIndexAtIndex: "var(--columnZIndexAtIndex__16hkbkch)", pinnedStartWidth: "var(--pinnedStartWidth__16hkbkci)", pinnedEndWidth: "var(--pinnedEndWidth__16hkbkcj)", pinnedEndOffset: "var(--pinnedEndOffset__16hkbkck)", computedVisibleColumnsCount: "var(--computedVisibleColumnsCount__16hkbkcl)", baseZIndexForCells: "var(--baseZIndexForCells__16hkbkcm)", bodyWidth: "var(--bodyWidth__16hkbkcn)", bodyHeight: "var(--bodyHeight__16hkbkco)", scrollbarWidthHorizontal: "var(--scrollbarWidthHorizontal__16hkbkcp)", scrollbarWidthVertical: "var(--scrollbarWidthVertical__16hkbkcq)", scrollLeft: "var(--scrollLeft__16hkbkcr)", scrollTop: "var(--scrollTop__16hkbkcs)", virtualScrollLeftOffset: "var(--virtualScrollLeftOffset__16hkbkct)", virtualScrollTopOffset: "var(--virtualScrollTopOffset__16hkbkcu)" };
|
|
1457
1457
|
|
|
1458
1458
|
// src/components/InfiniteTable/vars.css.ts
|
|
1459
1459
|
var CSS_LOADED_VALUE = "true";
|
|
@@ -1673,6 +1673,8 @@ var MatrixBrain = class extends Logger {
|
|
|
1673
1673
|
this.horizontalTotalSize = 0;
|
|
1674
1674
|
this.horizontalRenderCount = void 0;
|
|
1675
1675
|
this.verticalRenderCount = void 0;
|
|
1676
|
+
this.maxHorizontalRenderCount = 0;
|
|
1677
|
+
this.maxVerticalRenderCount = 0;
|
|
1676
1678
|
this.horizontalExtendRangeBy = DEFAULT_EXTEND_BY;
|
|
1677
1679
|
this.verticalExtendRangeBy = DEFAULT_EXTEND_BY;
|
|
1678
1680
|
this.horizontalRenderRange = {
|
|
@@ -2353,6 +2355,9 @@ var MatrixBrain = class extends Logger {
|
|
|
2353
2355
|
}
|
|
2354
2356
|
};
|
|
2355
2357
|
this.getRenderRangeCellCount = getRenderRangeCellCount;
|
|
2358
|
+
this.getMaxCellCount = () => {
|
|
2359
|
+
return this.maxHorizontalRenderCount * this.maxVerticalRenderCount;
|
|
2360
|
+
};
|
|
2356
2361
|
this.getExtraCells = () => {
|
|
2357
2362
|
return this.extraSpanCells;
|
|
2358
2363
|
};
|
|
@@ -2714,6 +2719,11 @@ var MatrixBrain = class extends Logger {
|
|
|
2714
2719
|
renderCount = (itemSize ? Math.ceil(size / itemSize) : 0) + 1;
|
|
2715
2720
|
}
|
|
2716
2721
|
renderCount += fixedStart + fixedEnd;
|
|
2722
|
+
if (direction === "horizontal") {
|
|
2723
|
+
this.maxHorizontalRenderCount = renderCount;
|
|
2724
|
+
} else {
|
|
2725
|
+
this.maxVerticalRenderCount = renderCount;
|
|
2726
|
+
}
|
|
2717
2727
|
renderCount = Math.min(count, renderCount);
|
|
2718
2728
|
return renderCount;
|
|
2719
2729
|
}
|
|
@@ -2882,6 +2892,7 @@ var emptyFn = () => {
|
|
|
2882
2892
|
var GridCellForReact = class {
|
|
2883
2893
|
constructor(debugId, cellInfo) {
|
|
2884
2894
|
this.element = null;
|
|
2895
|
+
this.mounted = false;
|
|
2885
2896
|
this.mountSubscription = buildSubscriptionCallback();
|
|
2886
2897
|
const count = CELL_COUNT_BY_DEBUG_ID.get(debugId) ?? 0;
|
|
2887
2898
|
const key = `${debugId}:GridCellReact:${count}`;
|
|
@@ -2893,10 +2904,16 @@ var GridCellForReact = class {
|
|
|
2893
2904
|
this.ref = (htmlElement) => {
|
|
2894
2905
|
this.element = htmlElement;
|
|
2895
2906
|
if (htmlElement) {
|
|
2907
|
+
this.mounted = true;
|
|
2896
2908
|
this.mountSubscription(this);
|
|
2909
|
+
} else {
|
|
2910
|
+
this.mounted = false;
|
|
2897
2911
|
}
|
|
2898
2912
|
};
|
|
2899
2913
|
}
|
|
2914
|
+
isMounted() {
|
|
2915
|
+
return this.mounted;
|
|
2916
|
+
}
|
|
2900
2917
|
onMount(callback) {
|
|
2901
2918
|
const off = this.mountSubscription.onChange((cell) => {
|
|
2902
2919
|
if (cell != null) {
|
|
@@ -2927,10 +2944,12 @@ var GridCellForReact = class {
|
|
|
2927
2944
|
}
|
|
2928
2945
|
};
|
|
2929
2946
|
var _GridCellPoolForReact = class extends Logger {
|
|
2947
|
+
// for now, making this larger will create the cells, but on fast scrolling, those extra cells can tend to lag behind the scroll position as they are not updated
|
|
2930
2948
|
constructor(debugId) {
|
|
2931
2949
|
super(`${debugId}:GridCellPoolForReact`);
|
|
2932
2950
|
this.debugId = debugId;
|
|
2933
2951
|
this.cellRemoveSubscription = buildSubscriptionCallback();
|
|
2952
|
+
this.cellAttachmentChangeSubscription = buildSubscriptionCallback();
|
|
2934
2953
|
this.attachedCells = /* @__PURE__ */ new Set();
|
|
2935
2954
|
this.detachedCells = /* @__PURE__ */ new Set();
|
|
2936
2955
|
this.allCellsOrdered = /* @__PURE__ */ new Set();
|
|
@@ -2946,11 +2965,22 @@ var _GridCellPoolForReact = class extends Logger {
|
|
|
2946
2965
|
});
|
|
2947
2966
|
return off;
|
|
2948
2967
|
}
|
|
2968
|
+
onCellAttachmentChange(callback) {
|
|
2969
|
+
const off = this.cellAttachmentChangeSubscription.onChange((res) => {
|
|
2970
|
+
if (res == null) {
|
|
2971
|
+
return;
|
|
2972
|
+
}
|
|
2973
|
+
const { cell, attached } = res;
|
|
2974
|
+
callback(cell, attached);
|
|
2975
|
+
});
|
|
2976
|
+
return off;
|
|
2977
|
+
}
|
|
2949
2978
|
reset() {
|
|
2950
2979
|
this.attachedCells.clear();
|
|
2951
2980
|
this.detachedCells.clear();
|
|
2952
2981
|
this.allCellsOrdered.clear();
|
|
2953
2982
|
this.cellRemoveSubscription.destroy();
|
|
2983
|
+
this.cellAttachmentChangeSubscription.destroy();
|
|
2954
2984
|
}
|
|
2955
2985
|
getAttachedCells() {
|
|
2956
2986
|
return this.attachedCells;
|
|
@@ -2995,16 +3025,31 @@ var _GridCellPoolForReact = class extends Logger {
|
|
|
2995
3025
|
* If a cell is provided, it's moved to the attached set as well.
|
|
2996
3026
|
*/
|
|
2997
3027
|
attachCell(cell) {
|
|
3028
|
+
if (cell && this.attachedCells.has(cell)) {
|
|
3029
|
+
return cell;
|
|
3030
|
+
}
|
|
2998
3031
|
if (!cell) {
|
|
2999
3032
|
cell = this.getDetachedCell();
|
|
3000
3033
|
}
|
|
3001
3034
|
this.detachedCells.delete(cell);
|
|
3002
3035
|
this.attachedCells.add(cell);
|
|
3036
|
+
this.cellAttachmentChangeSubscription({
|
|
3037
|
+
cell,
|
|
3038
|
+
attached: true
|
|
3039
|
+
});
|
|
3003
3040
|
return cell;
|
|
3004
3041
|
}
|
|
3005
3042
|
detachCell(cell) {
|
|
3043
|
+
if (this.detachedCells.has(cell)) {
|
|
3044
|
+
return false;
|
|
3045
|
+
}
|
|
3006
3046
|
this.attachedCells.delete(cell);
|
|
3007
3047
|
this.detachedCells.add(cell);
|
|
3048
|
+
this.cellAttachmentChangeSubscription({
|
|
3049
|
+
cell,
|
|
3050
|
+
attached: false
|
|
3051
|
+
});
|
|
3052
|
+
return true;
|
|
3008
3053
|
}
|
|
3009
3054
|
/**
|
|
3010
3055
|
* This gets a detached cell from the pool.
|
|
@@ -3061,14 +3106,16 @@ var _GridCellPoolForReact = class extends Logger {
|
|
|
3061
3106
|
};
|
|
3062
3107
|
var GridCellPoolForReact = _GridCellPoolForReact;
|
|
3063
3108
|
// we'll grow the pool by this amount at a time
|
|
3064
|
-
GridCellPoolForReact.POOL_SIZE_INCREMENT =
|
|
3109
|
+
GridCellPoolForReact.POOL_SIZE_INCREMENT = 1;
|
|
3065
3110
|
|
|
3066
3111
|
// src/components/HeadlessTable/GridCellManager.ts
|
|
3112
|
+
var ASC_SORT = (a, b) => a - b;
|
|
3067
3113
|
var GridCellManager = class extends Logger {
|
|
3068
3114
|
constructor(debugId) {
|
|
3069
3115
|
super(`${debugId}:GridCellManager`);
|
|
3070
3116
|
this.matrix = new DeepMap();
|
|
3071
|
-
this.
|
|
3117
|
+
this.rowsWithCellsHistory = /* @__PURE__ */ new Map();
|
|
3118
|
+
this.columnsWithCellsHistory = /* @__PURE__ */ new Map();
|
|
3072
3119
|
this.cellToMatrixPosition = /* @__PURE__ */ new WeakMap();
|
|
3073
3120
|
this.getCellsOutsideRenderRange = (range) => {
|
|
3074
3121
|
const { start, end } = range;
|
|
@@ -3103,11 +3150,9 @@ var GridCellManager = class extends Logger {
|
|
|
3103
3150
|
if (!cellPos) {
|
|
3104
3151
|
return;
|
|
3105
3152
|
}
|
|
3106
|
-
this.
|
|
3107
|
-
|
|
3108
|
-
|
|
3109
|
-
cellsAtPos.delete(cell);
|
|
3110
|
-
}
|
|
3153
|
+
this.clearCellFromMatrix(cell, cellPos, {
|
|
3154
|
+
skipHistory: false
|
|
3155
|
+
});
|
|
3111
3156
|
}
|
|
3112
3157
|
set poolSize(cellCount) {
|
|
3113
3158
|
this.pool.poolSize = cellCount;
|
|
@@ -3116,47 +3161,73 @@ var GridCellManager = class extends Logger {
|
|
|
3116
3161
|
return this.pool.poolSize;
|
|
3117
3162
|
}
|
|
3118
3163
|
getDetachedCell() {
|
|
3119
|
-
console.warn("getting detached cell");
|
|
3120
3164
|
return this.pool.getDetachedCell();
|
|
3121
3165
|
}
|
|
3166
|
+
clearCellFromMatrix(cell, cellPos, config) {
|
|
3167
|
+
this.matrix.delete(cellPos);
|
|
3168
|
+
if (config.skipHistory) {
|
|
3169
|
+
return;
|
|
3170
|
+
}
|
|
3171
|
+
const [rowIndex, colIndex] = cellPos;
|
|
3172
|
+
const cellsAtRow = this.rowsWithCellsHistory.get(rowIndex);
|
|
3173
|
+
const cellsAtCol = this.columnsWithCellsHistory.get(colIndex);
|
|
3174
|
+
if (cellsAtRow) {
|
|
3175
|
+
cellsAtRow.delete(cell);
|
|
3176
|
+
if (cellsAtRow.size === 0) {
|
|
3177
|
+
this.rowsWithCellsHistory.delete(rowIndex);
|
|
3178
|
+
}
|
|
3179
|
+
}
|
|
3180
|
+
if (cellsAtCol) {
|
|
3181
|
+
cellsAtCol.delete(cell);
|
|
3182
|
+
if (cellsAtCol.size === 0) {
|
|
3183
|
+
this.columnsWithCellsHistory.delete(colIndex);
|
|
3184
|
+
}
|
|
3185
|
+
}
|
|
3186
|
+
}
|
|
3187
|
+
addCellToMatrix(cell, cellPos) {
|
|
3188
|
+
const [rowIndex, colIndex] = cellPos;
|
|
3189
|
+
this.matrix.set(cellPos, cell);
|
|
3190
|
+
this.cellToMatrixPosition.set(cell, cellPos);
|
|
3191
|
+
let cellsAtRow = this.rowsWithCellsHistory.get(rowIndex);
|
|
3192
|
+
let cellsAtColumn = this.columnsWithCellsHistory.get(colIndex);
|
|
3193
|
+
if (!cellsAtRow) {
|
|
3194
|
+
cellsAtRow = /* @__PURE__ */ new Set();
|
|
3195
|
+
cellsAtRow.add(cell);
|
|
3196
|
+
this.rowsWithCellsHistory.set(rowIndex, cellsAtRow);
|
|
3197
|
+
} else {
|
|
3198
|
+
cellsAtRow.add(cell);
|
|
3199
|
+
}
|
|
3200
|
+
if (!cellsAtColumn) {
|
|
3201
|
+
cellsAtColumn = /* @__PURE__ */ new Set();
|
|
3202
|
+
cellsAtColumn.add(cell);
|
|
3203
|
+
this.columnsWithCellsHistory.set(colIndex, cellsAtColumn);
|
|
3204
|
+
} else {
|
|
3205
|
+
cellsAtColumn.add(cell);
|
|
3206
|
+
}
|
|
3207
|
+
}
|
|
3122
3208
|
setCellPositionInMatrix(cell, cellPos) {
|
|
3209
|
+
const currentCellPos = this.cellToMatrixPosition.get(cell);
|
|
3123
3210
|
if (cellPos == null) {
|
|
3124
|
-
const currentCellPos = this.cellToMatrixPosition.get(cell);
|
|
3125
3211
|
if (currentCellPos) {
|
|
3126
|
-
this.
|
|
3127
|
-
|
|
3128
|
-
|
|
3129
|
-
let prevCellPos = this.cellToMatrixPosition.get(cell);
|
|
3130
|
-
const samePos = prevCellPos && prevCellPos[0] === cellPos[0] && prevCellPos[1] === cellPos[1];
|
|
3131
|
-
this.matrix.set(cellPos, cell);
|
|
3132
|
-
this.cellToMatrixPosition.set(cell, cellPos);
|
|
3133
|
-
let cellsAtPos = this.matrixWithHistory.get(cellPos);
|
|
3134
|
-
if (!cellsAtPos) {
|
|
3135
|
-
cellsAtPos = /* @__PURE__ */ new Set();
|
|
3136
|
-
cellsAtPos.add(cell);
|
|
3137
|
-
this.matrixWithHistory.set(cellPos, cellsAtPos);
|
|
3138
|
-
} else {
|
|
3139
|
-
cellsAtPos.add(cell);
|
|
3140
|
-
}
|
|
3141
|
-
if (prevCellPos && !samePos) {
|
|
3142
|
-
this.matrix.delete(prevCellPos);
|
|
3143
|
-
let cellsAtPrevPos = this.matrixWithHistory.get(prevCellPos);
|
|
3144
|
-
if (cellsAtPrevPos) {
|
|
3145
|
-
cellsAtPrevPos.delete(cell);
|
|
3146
|
-
}
|
|
3212
|
+
this.clearCellFromMatrix(cell, currentCellPos, {
|
|
3213
|
+
skipHistory: true
|
|
3214
|
+
});
|
|
3147
3215
|
}
|
|
3216
|
+
return;
|
|
3217
|
+
}
|
|
3218
|
+
const [rowIndex, colIndex] = cellPos;
|
|
3219
|
+
const samePos = currentCellPos && currentCellPos[0] === rowIndex && currentCellPos[1] === colIndex;
|
|
3220
|
+
if (currentCellPos && !samePos) {
|
|
3221
|
+
this.clearCellFromMatrix(cell, currentCellPos, {
|
|
3222
|
+
skipHistory: false
|
|
3223
|
+
});
|
|
3148
3224
|
}
|
|
3225
|
+
this.addCellToMatrix(cell, cellPos);
|
|
3149
3226
|
}
|
|
3150
3227
|
renderNodeAtCell(node, cell, cellPos, additionalInfo) {
|
|
3151
3228
|
const currentCellAtPos = this.getCellAt(cellPos);
|
|
3152
|
-
if (currentCellAtPos) {
|
|
3153
|
-
|
|
3154
|
-
this.detachCellAt(cellPos);
|
|
3155
|
-
this.detachCell(cell);
|
|
3156
|
-
} else {
|
|
3157
|
-
}
|
|
3158
|
-
} else {
|
|
3159
|
-
this.detachCell(cell);
|
|
3229
|
+
if (currentCellAtPos && currentCellAtPos !== cell) {
|
|
3230
|
+
this.detachCellAt(cellPos);
|
|
3160
3231
|
}
|
|
3161
3232
|
this.pool.attachCell(cell);
|
|
3162
3233
|
this.setCellPositionInMatrix(cell, cellPos);
|
|
@@ -3198,34 +3269,16 @@ var GridCellManager = class extends Logger {
|
|
|
3198
3269
|
}
|
|
3199
3270
|
const [rowIndex, colIndex] = cellPos;
|
|
3200
3271
|
if (optimise === "row") {
|
|
3201
|
-
this.
|
|
3202
|
-
|
|
3203
|
-
|
|
3204
|
-
|
|
3205
|
-
if (row === rowIndex) {
|
|
3206
|
-
cell = setFind(cellsForPos, (c) => !this.isCellAttached(c));
|
|
3207
|
-
if (cell) {
|
|
3208
|
-
return true;
|
|
3209
|
-
}
|
|
3210
|
-
}
|
|
3211
|
-
next?.();
|
|
3212
|
-
return false;
|
|
3213
|
-
});
|
|
3272
|
+
const cellsAtRow = this.rowsWithCellsHistory.get(rowIndex);
|
|
3273
|
+
if (cellsAtRow) {
|
|
3274
|
+
cell = setFind(cellsAtRow, (c) => !this.isCellAttached(c));
|
|
3275
|
+
}
|
|
3214
3276
|
}
|
|
3215
3277
|
if (optimise === "column") {
|
|
3216
|
-
this.
|
|
3217
|
-
|
|
3218
|
-
|
|
3219
|
-
|
|
3220
|
-
if (col === colIndex) {
|
|
3221
|
-
cell = setFind(cellsForPos, (c) => !this.isCellAttached(c));
|
|
3222
|
-
if (cell) {
|
|
3223
|
-
return true;
|
|
3224
|
-
}
|
|
3225
|
-
}
|
|
3226
|
-
next?.();
|
|
3227
|
-
return false;
|
|
3228
|
-
});
|
|
3278
|
+
const cellsAtColumn = this.columnsWithCellsHistory.get(colIndex);
|
|
3279
|
+
if (cellsAtColumn) {
|
|
3280
|
+
cell = setFind(cellsAtColumn, (c) => !this.isCellAttached(c));
|
|
3281
|
+
}
|
|
3229
3282
|
}
|
|
3230
3283
|
return cell ?? this.getDetachedCell();
|
|
3231
3284
|
}
|
|
@@ -3266,12 +3319,12 @@ var GridCellManager = class extends Logger {
|
|
|
3266
3319
|
return cell;
|
|
3267
3320
|
}
|
|
3268
3321
|
getRowsWithCells() {
|
|
3269
|
-
return this.matrix.rawKeysAt([]).sort();
|
|
3322
|
+
return this.matrix.rawKeysAt([]).sort(ASC_SORT);
|
|
3270
3323
|
}
|
|
3271
3324
|
getColumnsWithCells() {
|
|
3272
3325
|
const positions = this.matrix.getUnnestedKeysStartingWith([], true);
|
|
3273
3326
|
const columns = new Set(positions.map((pos) => pos[1]));
|
|
3274
|
-
return [...columns.values()].sort();
|
|
3327
|
+
return [...columns.values()].sort(ASC_SORT);
|
|
3275
3328
|
}
|
|
3276
3329
|
isRowAttached(rowIndex) {
|
|
3277
3330
|
return this.getRowsWithCells().includes(rowIndex);
|
|
@@ -3293,17 +3346,20 @@ var GridCellManager = class extends Logger {
|
|
|
3293
3346
|
});
|
|
3294
3347
|
}
|
|
3295
3348
|
detachCell(cell) {
|
|
3296
|
-
|
|
3297
|
-
|
|
3298
|
-
this.detachCellAt(cellPos);
|
|
3349
|
+
if (!cell) {
|
|
3350
|
+
return false;
|
|
3299
3351
|
}
|
|
3352
|
+
if (this.pool.detachCell(cell)) {
|
|
3353
|
+
this.setCellPositionInMatrix(cell, null);
|
|
3354
|
+
}
|
|
3355
|
+
return true;
|
|
3300
3356
|
}
|
|
3301
3357
|
detachCells(cells) {
|
|
3302
3358
|
cells.forEach((cell) => this.detachCell(cell));
|
|
3303
3359
|
}
|
|
3304
3360
|
detachRowsStartingWith(rowIndex) {
|
|
3305
3361
|
const rows = this.getRowsWithCells().sort();
|
|
3306
|
-
let idx = (0, import_binary_search2.default)(rows, rowIndex,
|
|
3362
|
+
let idx = (0, import_binary_search2.default)(rows, rowIndex, ASC_SORT);
|
|
3307
3363
|
if (idx < 0) {
|
|
3308
3364
|
idx = ~idx;
|
|
3309
3365
|
}
|
|
@@ -3312,7 +3368,7 @@ var GridCellManager = class extends Logger {
|
|
|
3312
3368
|
}
|
|
3313
3369
|
detachColsStartingWith(colIndex) {
|
|
3314
3370
|
const cols = this.getColumnsWithCells().sort();
|
|
3315
|
-
let idx = (0, import_binary_search2.default)(cols, colIndex,
|
|
3371
|
+
let idx = (0, import_binary_search2.default)(cols, colIndex, ASC_SORT);
|
|
3316
3372
|
if (idx < 0) {
|
|
3317
3373
|
idx = ~idx;
|
|
3318
3374
|
}
|
|
@@ -3331,9 +3387,12 @@ var GridCellManager = class extends Logger {
|
|
|
3331
3387
|
detachCellAt(cellPos) {
|
|
3332
3388
|
const cell = this.getCellAt(cellPos);
|
|
3333
3389
|
if (cell) {
|
|
3334
|
-
this.
|
|
3335
|
-
this.pool.detachCell(cell);
|
|
3390
|
+
return this.detachCell(cell);
|
|
3336
3391
|
}
|
|
3392
|
+
return false;
|
|
3393
|
+
}
|
|
3394
|
+
onCellAttachmentChange(callback) {
|
|
3395
|
+
return this.pool.onCellAttachmentChange(callback);
|
|
3337
3396
|
}
|
|
3338
3397
|
getCellFromListForRow(cells, rowIndex) {
|
|
3339
3398
|
return setFind(cells, (cell) => {
|
|
@@ -3354,7 +3413,8 @@ var GridCellManager = class extends Logger {
|
|
|
3354
3413
|
reset() {
|
|
3355
3414
|
this.pool.reset();
|
|
3356
3415
|
this.matrix.clear();
|
|
3357
|
-
this.
|
|
3416
|
+
this.rowsWithCellsHistory.clear();
|
|
3417
|
+
this.columnsWithCellsHistory.clear();
|
|
3358
3418
|
this.offRemoveCell();
|
|
3359
3419
|
this.offRemoveCell = () => {
|
|
3360
3420
|
};
|
|
@@ -3364,6 +3424,9 @@ var GridCellManager = class extends Logger {
|
|
|
3364
3424
|
cell.update(null);
|
|
3365
3425
|
});
|
|
3366
3426
|
}
|
|
3427
|
+
withDetachedCells(fn) {
|
|
3428
|
+
this.pool.getDetachedCells().forEach(fn);
|
|
3429
|
+
}
|
|
3367
3430
|
};
|
|
3368
3431
|
|
|
3369
3432
|
// src/components/HeadlessTable/ListRowManager.ts
|
|
@@ -3377,6 +3440,7 @@ var emptyFn2 = () => {
|
|
|
3377
3440
|
var ListRowForReact = class {
|
|
3378
3441
|
constructor(debugId) {
|
|
3379
3442
|
this.element = null;
|
|
3443
|
+
this.mounted = false;
|
|
3380
3444
|
this.mountSubscription = buildSubscriptionCallback();
|
|
3381
3445
|
const count = ROW_COUNT_BY_DEBUG_ID.get(debugId) ?? 0;
|
|
3382
3446
|
const key = `${debugId}:ListRowReact:${count}`;
|
|
@@ -3394,10 +3458,16 @@ var ListRowForReact = class {
|
|
|
3394
3458
|
this.ref = (htmlElement) => {
|
|
3395
3459
|
this.element = htmlElement;
|
|
3396
3460
|
if (htmlElement) {
|
|
3461
|
+
this.mounted = true;
|
|
3397
3462
|
this.mountSubscription(this);
|
|
3463
|
+
} else {
|
|
3464
|
+
this.mounted = false;
|
|
3398
3465
|
}
|
|
3399
3466
|
};
|
|
3400
3467
|
}
|
|
3468
|
+
isMounted() {
|
|
3469
|
+
return this.mounted;
|
|
3470
|
+
}
|
|
3401
3471
|
onMount(callback) {
|
|
3402
3472
|
const off = this.mountSubscription.onChange((row) => {
|
|
3403
3473
|
if (row != null) {
|
|
@@ -3428,6 +3498,7 @@ var _ListRowPoolForReact = class extends Logger {
|
|
|
3428
3498
|
super(`${debugId}:ListRowPoolForReact`);
|
|
3429
3499
|
this.debugId = debugId;
|
|
3430
3500
|
this.rowRemoveSubscription = buildSubscriptionCallback();
|
|
3501
|
+
this.rowAttachmentChangeSubscription = buildSubscriptionCallback();
|
|
3431
3502
|
this.attachedRows = /* @__PURE__ */ new Set();
|
|
3432
3503
|
this.detachedRows = /* @__PURE__ */ new Set();
|
|
3433
3504
|
this.allRowsOrdered = /* @__PURE__ */ new Set();
|
|
@@ -3443,11 +3514,22 @@ var _ListRowPoolForReact = class extends Logger {
|
|
|
3443
3514
|
});
|
|
3444
3515
|
return off;
|
|
3445
3516
|
}
|
|
3517
|
+
onRowAttachmentChange(callback) {
|
|
3518
|
+
const off = this.rowAttachmentChangeSubscription.onChange((res) => {
|
|
3519
|
+
if (res == null) {
|
|
3520
|
+
return;
|
|
3521
|
+
}
|
|
3522
|
+
const { row, attached } = res;
|
|
3523
|
+
callback(row, attached);
|
|
3524
|
+
});
|
|
3525
|
+
return off;
|
|
3526
|
+
}
|
|
3446
3527
|
reset() {
|
|
3447
3528
|
this.attachedRows.clear();
|
|
3448
3529
|
this.detachedRows.clear();
|
|
3449
3530
|
this.allRowsOrdered.clear();
|
|
3450
3531
|
this.rowRemoveSubscription.destroy();
|
|
3532
|
+
this.rowAttachmentChangeSubscription.destroy();
|
|
3451
3533
|
}
|
|
3452
3534
|
getAttachedRows() {
|
|
3453
3535
|
return this.attachedRows;
|
|
@@ -3492,16 +3574,31 @@ var _ListRowPoolForReact = class extends Logger {
|
|
|
3492
3574
|
* If a row is provided, it's moved to the attached set as well.
|
|
3493
3575
|
*/
|
|
3494
3576
|
attachRow(row) {
|
|
3577
|
+
if (row && this.attachedRows.has(row)) {
|
|
3578
|
+
return row;
|
|
3579
|
+
}
|
|
3495
3580
|
if (!row) {
|
|
3496
3581
|
row = this.getDetachedRow();
|
|
3497
3582
|
}
|
|
3498
3583
|
this.detachedRows.delete(row);
|
|
3499
3584
|
this.attachedRows.add(row);
|
|
3585
|
+
this.rowAttachmentChangeSubscription({
|
|
3586
|
+
row,
|
|
3587
|
+
attached: true
|
|
3588
|
+
});
|
|
3500
3589
|
return row;
|
|
3501
3590
|
}
|
|
3502
3591
|
detachRow(row) {
|
|
3592
|
+
if (this.detachedRows.has(row)) {
|
|
3593
|
+
return false;
|
|
3594
|
+
}
|
|
3503
3595
|
this.attachedRows.delete(row);
|
|
3504
3596
|
this.detachedRows.add(row);
|
|
3597
|
+
this.rowAttachmentChangeSubscription({
|
|
3598
|
+
row,
|
|
3599
|
+
attached: false
|
|
3600
|
+
});
|
|
3601
|
+
return true;
|
|
3505
3602
|
}
|
|
3506
3603
|
/**
|
|
3507
3604
|
* This gets a detached row from the pool.
|
|
@@ -3558,7 +3655,7 @@ var _ListRowPoolForReact = class extends Logger {
|
|
|
3558
3655
|
};
|
|
3559
3656
|
var ListRowPoolForReact = _ListRowPoolForReact;
|
|
3560
3657
|
// we'll grow the pool by this amount at a time
|
|
3561
|
-
ListRowPoolForReact.POOL_SIZE_INCREMENT =
|
|
3658
|
+
ListRowPoolForReact.POOL_SIZE_INCREMENT = 1;
|
|
3562
3659
|
|
|
3563
3660
|
// src/components/HeadlessTable/ListRowManager.ts
|
|
3564
3661
|
var ListRowManager = class extends Logger {
|
|
@@ -3672,14 +3769,8 @@ var ListRowManager = class extends Logger {
|
|
|
3672
3769
|
}
|
|
3673
3770
|
renderNodeAtRow(node, row, rowIndex) {
|
|
3674
3771
|
const currentRowAtPos = this.getRowAt(rowIndex);
|
|
3675
|
-
if (currentRowAtPos) {
|
|
3676
|
-
|
|
3677
|
-
this.detachRowAt(rowIndex);
|
|
3678
|
-
this.detachRow(row);
|
|
3679
|
-
} else {
|
|
3680
|
-
}
|
|
3681
|
-
} else {
|
|
3682
|
-
this.detachRow(row);
|
|
3772
|
+
if (currentRowAtPos && currentRowAtPos !== row) {
|
|
3773
|
+
this.detachRowAt(rowIndex);
|
|
3683
3774
|
}
|
|
3684
3775
|
this.pool.attachRow(row);
|
|
3685
3776
|
this.setRowIndexInList(row, rowIndex);
|
|
@@ -3691,6 +3782,12 @@ var ListRowManager = class extends Logger {
|
|
|
3691
3782
|
row.update(null);
|
|
3692
3783
|
});
|
|
3693
3784
|
}
|
|
3785
|
+
onRowAttachmentChange(callback) {
|
|
3786
|
+
return this.pool.onRowAttachmentChange(callback);
|
|
3787
|
+
}
|
|
3788
|
+
withDetachedRows(fn) {
|
|
3789
|
+
this.pool.getDetachedRows().forEach(fn);
|
|
3790
|
+
}
|
|
3694
3791
|
destroy() {
|
|
3695
3792
|
this.reset();
|
|
3696
3793
|
}
|
|
@@ -3719,6 +3816,7 @@ var GridRenderer = class extends Logger {
|
|
|
3719
3816
|
this.destroyed = false;
|
|
3720
3817
|
this.scrolling = false;
|
|
3721
3818
|
this.cellHoverClassNames = [];
|
|
3819
|
+
this.cellDetachedClassNames = [];
|
|
3722
3820
|
this.lastEnteredRow = -1;
|
|
3723
3821
|
this.lastExitedRow = -1;
|
|
3724
3822
|
this.hoverRowUpdatesInProgress = /* @__PURE__ */ new Map();
|
|
@@ -4519,7 +4617,21 @@ var GridRenderer = class extends Logger {
|
|
|
4519
4617
|
this.brain = brain;
|
|
4520
4618
|
this.debugId = debugId;
|
|
4521
4619
|
this.cellManager = new GridCellManager(debugId);
|
|
4620
|
+
this.cellManager.onCellAttachmentChange((cell, attached) => {
|
|
4621
|
+
if (attached) {
|
|
4622
|
+
this.onCellAttached(cell);
|
|
4623
|
+
} else {
|
|
4624
|
+
this.onCellDetached(cell);
|
|
4625
|
+
}
|
|
4626
|
+
});
|
|
4522
4627
|
this.rowManager = new ListRowManager(debugId);
|
|
4628
|
+
this.rowManager.onRowAttachmentChange((row, attached) => {
|
|
4629
|
+
if (attached) {
|
|
4630
|
+
this.onRowAttached(row);
|
|
4631
|
+
} else {
|
|
4632
|
+
this.onRowDetached(row);
|
|
4633
|
+
}
|
|
4634
|
+
});
|
|
4523
4635
|
this.renderRange = this.renderRange.bind(this);
|
|
4524
4636
|
const removeOnScroll = brain.onScroll(this.adjustFixedElementsOnScroll);
|
|
4525
4637
|
const removeOnSizeChange = brain.onAvailableSizeChange(() => {
|
|
@@ -4546,6 +4658,46 @@ var GridRenderer = class extends Logger {
|
|
|
4546
4658
|
}
|
|
4547
4659
|
return this.infiniteNode;
|
|
4548
4660
|
}
|
|
4661
|
+
onCellAttached(cell) {
|
|
4662
|
+
if (this.cellDetachedClassNames.length) {
|
|
4663
|
+
const el = cell.getElement();
|
|
4664
|
+
if (el) {
|
|
4665
|
+
this.cellDetachedClassNames.forEach((className) => {
|
|
4666
|
+
el.classList.remove(className);
|
|
4667
|
+
});
|
|
4668
|
+
}
|
|
4669
|
+
}
|
|
4670
|
+
}
|
|
4671
|
+
onCellDetached(cell) {
|
|
4672
|
+
if (this.cellDetachedClassNames.length) {
|
|
4673
|
+
const el = cell.getElement();
|
|
4674
|
+
if (el) {
|
|
4675
|
+
this.cellDetachedClassNames.forEach((className) => {
|
|
4676
|
+
el.classList.add(className);
|
|
4677
|
+
});
|
|
4678
|
+
}
|
|
4679
|
+
}
|
|
4680
|
+
}
|
|
4681
|
+
onRowAttached(row) {
|
|
4682
|
+
if (this.cellDetachedClassNames.length) {
|
|
4683
|
+
const el = row.getElement();
|
|
4684
|
+
if (el) {
|
|
4685
|
+
this.cellDetachedClassNames.forEach((className) => {
|
|
4686
|
+
el.classList.remove(className);
|
|
4687
|
+
});
|
|
4688
|
+
}
|
|
4689
|
+
}
|
|
4690
|
+
}
|
|
4691
|
+
onRowDetached(row) {
|
|
4692
|
+
if (this.cellDetachedClassNames.length) {
|
|
4693
|
+
const el = row.getElement();
|
|
4694
|
+
if (el) {
|
|
4695
|
+
this.cellDetachedClassNames.forEach((className) => {
|
|
4696
|
+
el.classList.add(className);
|
|
4697
|
+
});
|
|
4698
|
+
}
|
|
4699
|
+
}
|
|
4700
|
+
}
|
|
4549
4701
|
isCellRenderedAndMappedCorrectly(row, col) {
|
|
4550
4702
|
const rendered = !!this.cellManager.getCellAt([row, col]);
|
|
4551
4703
|
return {
|
|
@@ -4591,13 +4743,10 @@ var GridRenderer = class extends Logger {
|
|
|
4591
4743
|
0
|
|
4592
4744
|
);
|
|
4593
4745
|
const renderRowCount = renderDetailRow ? ranges.reduce((sum2, range2) => sum2 + getRenderRangeRowCount(range2), 0) : 0;
|
|
4594
|
-
|
|
4595
|
-
|
|
4596
|
-
|
|
4597
|
-
|
|
4598
|
-
if (cellManager.poolSize > renderCount) {
|
|
4599
|
-
cellManager.poolSize = renderCount;
|
|
4600
|
-
}
|
|
4746
|
+
const rowCount = this.brain.getRowCount();
|
|
4747
|
+
const colCount = this.brain.getColCount();
|
|
4748
|
+
cellManager.detachCellsStartingAt([rowCount, colCount]);
|
|
4749
|
+
const maxCount = Math.min(rowCount * colCount, renderCount);
|
|
4601
4750
|
if (renderDetailRow) {
|
|
4602
4751
|
rowManager.detachStartingWith(this.brain.getRowCount());
|
|
4603
4752
|
if (rowManager.poolSize > renderRowCount) {
|
|
@@ -4615,7 +4764,7 @@ var GridRenderer = class extends Logger {
|
|
|
4615
4764
|
return true;
|
|
4616
4765
|
});
|
|
4617
4766
|
cellManager.detachCells(cellsOutsideRanges);
|
|
4618
|
-
cellManager.poolSize =
|
|
4767
|
+
cellManager.poolSize = maxCount;
|
|
4619
4768
|
const visitedCells = /* @__PURE__ */ new Map();
|
|
4620
4769
|
const visitedRows = /* @__PURE__ */ new Map();
|
|
4621
4770
|
ranges.forEach((range2) => {
|
|
@@ -4700,9 +4849,7 @@ var GridRenderer = class extends Logger {
|
|
|
4700
4849
|
}
|
|
4701
4850
|
this.renderCellAt(rowIndex, colIndex, cell, renderCell);
|
|
4702
4851
|
});
|
|
4703
|
-
cellManager.makeDetachedCellsEmpty();
|
|
4704
4852
|
if (renderDetailRow) {
|
|
4705
|
-
rowManager.makeDetachedRowsEmpty();
|
|
4706
4853
|
}
|
|
4707
4854
|
let result = cellManager.getAllCells().map((cell) => cell.getNode());
|
|
4708
4855
|
if (renderDetailRow) {
|
|
@@ -4735,14 +4882,20 @@ var GridRenderer = class extends Logger {
|
|
|
4735
4882
|
},
|
|
4736
4883
|
domRef: row.ref
|
|
4737
4884
|
});
|
|
4738
|
-
row.
|
|
4739
|
-
|
|
4740
|
-
|
|
4741
|
-
element
|
|
4742
|
-
|
|
4743
|
-
|
|
4744
|
-
|
|
4745
|
-
|
|
4885
|
+
if (!row.isMounted()) {
|
|
4886
|
+
row.onMount((row2) => {
|
|
4887
|
+
const element = row2.getElement();
|
|
4888
|
+
if (element) {
|
|
4889
|
+
element.style.position = "absolute";
|
|
4890
|
+
element.style.left = "0px";
|
|
4891
|
+
}
|
|
4892
|
+
this.updateDetailElementPosition(row2);
|
|
4893
|
+
});
|
|
4894
|
+
}
|
|
4895
|
+
if (!renderedDetailNode) {
|
|
4896
|
+
this.rowManager.detachRow(row);
|
|
4897
|
+
return;
|
|
4898
|
+
}
|
|
4746
4899
|
this.rowManager.renderNodeAtRow(renderedDetailNode, row, rowIndex);
|
|
4747
4900
|
this.updateDetailElementPosition(row);
|
|
4748
4901
|
return;
|
|
@@ -4786,19 +4939,29 @@ var GridRenderer = class extends Logger {
|
|
|
4786
4939
|
onMouseLeave: this.onMouseLeave.bind(null, rowIndex),
|
|
4787
4940
|
domRef: cell.ref
|
|
4788
4941
|
});
|
|
4789
|
-
cell.
|
|
4790
|
-
|
|
4791
|
-
|
|
4792
|
-
element
|
|
4793
|
-
|
|
4794
|
-
|
|
4795
|
-
|
|
4796
|
-
|
|
4797
|
-
|
|
4942
|
+
if (!cell.isMounted()) {
|
|
4943
|
+
cell.onMount((cell2) => {
|
|
4944
|
+
const element = cell2.getElement();
|
|
4945
|
+
if (element) {
|
|
4946
|
+
element.style.position = "absolute";
|
|
4947
|
+
element.style.left = "0px";
|
|
4948
|
+
element.style.top = "0px";
|
|
4949
|
+
}
|
|
4950
|
+
this.updateElementPosition(cell2);
|
|
4951
|
+
});
|
|
4952
|
+
}
|
|
4798
4953
|
const cellAdditionalInfo = this.brain.isHorizontalLayoutBrain ? {
|
|
4799
4954
|
renderRowIndex,
|
|
4800
4955
|
renderColIndex
|
|
4801
4956
|
} : void 0;
|
|
4957
|
+
if (!renderedNode) {
|
|
4958
|
+
if (this.brain.isHorizontalLayoutBrain) {
|
|
4959
|
+
this.cellManager.detachCell(cell);
|
|
4960
|
+
} else {
|
|
4961
|
+
this.cellManager.detachCell(cell);
|
|
4962
|
+
}
|
|
4963
|
+
return;
|
|
4964
|
+
}
|
|
4802
4965
|
this.cellManager.renderNodeAtCell(
|
|
4803
4966
|
renderedNode,
|
|
4804
4967
|
cell,
|
|
@@ -4911,6 +5074,9 @@ function RawTableFn(props) {
|
|
|
4911
5074
|
(0, import_react6.useEffect)(() => {
|
|
4912
5075
|
renderer.cellHoverClassNames = props.cellHoverClassNames || [];
|
|
4913
5076
|
}, [renderer, props.cellHoverClassNames]);
|
|
5077
|
+
(0, import_react6.useEffect)(() => {
|
|
5078
|
+
renderer.cellDetachedClassNames = props.cellDetachedClassNames || [];
|
|
5079
|
+
}, [renderer, props.cellDetachedClassNames]);
|
|
4914
5080
|
(0, import_react6.useLayoutEffect)(() => {
|
|
4915
5081
|
const renderRange = brain.getRenderRange();
|
|
4916
5082
|
renderer.renderRange(renderRange, {
|
|
@@ -5226,7 +5392,23 @@ var ActiveCellIndicator = React13.memo(
|
|
|
5226
5392
|
ActiveCellIndicatorFn
|
|
5227
5393
|
);
|
|
5228
5394
|
|
|
5395
|
+
// src/components/InfiniteTable/components/cell.css.ts
|
|
5396
|
+
var ColumnCellCls = "cell_ColumnCellCls__1eexc2a7 cell_CellCls__1eexc2a6";
|
|
5397
|
+
var ColumnCellRecipe = createRuntimeFn({ defaultClassName: "cell_ColumnCellRecipe__1eexc2an", variantClassNames: { dragging: { false: "cell_ColumnCellRecipe_dragging_false__1eexc2ao", true: "cell_ColumnCellRecipe_dragging_true__1eexc2ap" }, insideDisabledDraggingPage: { true: "cell_ColumnCellRecipe_insideDisabledDraggingPage_true__1eexc2aq", false: "cell_ColumnCellRecipe_insideDisabledDraggingPage_false__1eexc2ar" }, cellSelected: { false: "cell_ColumnCellRecipe_cellSelected_false__1eexc2as", true: "cell_ColumnCellRecipe_cellSelected_true__1eexc2at" }, treeNode: { parent: "cell_ColumnCellRecipe_treeNode_parent__1eexc2au", leaf: "cell_ColumnCellRecipe_treeNode_leaf__1eexc2av", false: "cell_ColumnCellRecipe_treeNode_false__1eexc2aw" }, align: { start: "cell_ColumnCellRecipe_align_start__1eexc2ax", end: "cell_ColumnCellRecipe_align_end__1eexc2ay", center: "cell_ColumnCellRecipe_align_center__1eexc2az" }, verticalAlign: { start: "cell_ColumnCellRecipe_verticalAlign_start__1eexc2a10", end: "cell_ColumnCellRecipe_verticalAlign_end__1eexc2a11", center: "cell_ColumnCellRecipe_verticalAlign_center__1eexc2a12" }, rowActive: { false: "cell_ColumnCellRecipe_rowActive_false__1eexc2a13", true: "cell_ColumnCellRecipe_rowActive_true__1eexc2a14" }, groupRow: { false: "cell_ColumnCellRecipe_groupRow_false__1eexc2a15", true: "cell_ColumnCellRecipe_groupRow_true__1eexc2a16" }, groupCell: { false: "cell_ColumnCellRecipe_groupCell_false__1eexc2a17", true: "cell_ColumnCellRecipe_groupCell_true__1eexc2a18" }, rowDisabled: { false: "cell_ColumnCellRecipe_rowDisabled_false__1eexc2a19", true: "cell_ColumnCellRecipe_rowDisabled_true__1eexc2a1a" }, zebra: { false: "cell_ColumnCellRecipe_zebra_false__1eexc2a1b", even: "cell_ColumnCellRecipe_zebra_even__1eexc2a1c", odd: "cell_ColumnCellRecipe_zebra_odd__1eexc2a1d" }, rowSelected: { true: "cell_ColumnCellRecipe_rowSelected_true__1eexc2a1e", false: "cell_ColumnCellRecipe_rowSelected_false__1eexc2a1f", null: "cell_ColumnCellRecipe_rowSelected_null__1eexc2a1g" }, first: { true: "cell_ColumnCellRecipe_first_true__1eexc2a1h", false: "cell_ColumnCellRecipe_first_false__1eexc2a1i" }, last: { true: "cell_ColumnCellRecipe_last_true__1eexc2a1j", false: "cell_ColumnCellRecipe_last_false__1eexc2a1k" }, groupByField: { true: "cell_ColumnCellRecipe_groupByField_true__1eexc2a1l", false: "cell_ColumnCellRecipe_groupByField_false__1eexc2a1m" }, firstInCategory: { true: "cell_ColumnCellRecipe_firstInCategory_true__1eexc2a1n", false: "cell_ColumnCellRecipe_firstInCategory_false__1eexc2a1o" }, firstRow: { true: "cell_ColumnCellRecipe_firstRow_true__1eexc2a1p", false: "cell_ColumnCellRecipe_firstRow_false__1eexc2a1q" }, firstRowInHorizontalLayoutPage: { true: "cell_ColumnCellRecipe_firstRowInHorizontalLayoutPage_true__1eexc2a1r", false: "cell_ColumnCellRecipe_firstRowInHorizontalLayoutPage_false__1eexc2a1s" }, lastInCategory: { true: "cell_ColumnCellRecipe_lastInCategory_true__1eexc2a1t", false: "cell_ColumnCellRecipe_lastInCategory_false__1eexc2a1u" }, pinned: { start: "cell_ColumnCellRecipe_pinned_start__1eexc2a1v", end: "cell_ColumnCellRecipe_pinned_end__1eexc2a1w", false: "cell_ColumnCellRecipe_pinned_false__1eexc2a1x" }, filtered: { true: "cell_ColumnCellRecipe_filtered_true__1eexc2a1y", false: "cell_ColumnCellRecipe_filtered_false__1eexc2a1z" } }, defaultVariants: {}, compoundVariants: [[{ firstRowInHorizontalLayoutPage: true, firstRow: false }, "cell_ColumnCellRecipe_compound_0__1eexc2a20"], [{ pinned: "start", lastInCategory: true }, "cell_ColumnCellRecipe_compound_1__1eexc2a21"], [{ pinned: "start", firstInCategory: true }, "cell_ColumnCellRecipe_compound_2__1eexc2a22"], [{ pinned: "end", firstInCategory: true }, "cell_ColumnCellRecipe_compound_3__1eexc2a23"], [{ pinned: "end", lastInCategory: true }, "cell_ColumnCellRecipe_compound_4__1eexc2a24"], [{ align: "center", groupCell: false }, "cell_ColumnCellRecipe_compound_5__1eexc2a25"], [{ rowDisabled: true, zebra: "odd" }, "cell_ColumnCellRecipe_compound_6__1eexc2a26"]] });
|
|
5398
|
+
var ColumnCellSelectionIndicatorRecipe = createRuntimeFn({ defaultClassName: "cell_ColumnCellSelectionIndicatorRecipe__1eexc2ae", variantClassNames: { right: { true: "cell_ColumnCellSelectionIndicatorRecipe_right_true__1eexc2af", false: "cell_ColumnCellSelectionIndicatorRecipe_right_false__1eexc2ag" }, left: { true: "cell_ColumnCellSelectionIndicatorRecipe_left_true__1eexc2ah", false: "cell_ColumnCellSelectionIndicatorRecipe_left_false__1eexc2ai" }, top: { true: "cell_ColumnCellSelectionIndicatorRecipe_top_true__1eexc2aj", false: "cell_ColumnCellSelectionIndicatorRecipe_top_false__1eexc2ak" }, bottom: { true: "cell_ColumnCellSelectionIndicatorRecipe_bottom_true__1eexc2al", false: "cell_ColumnCellSelectionIndicatorRecipe_bottom_false__1eexc2am" } }, defaultVariants: {}, compoundVariants: [] });
|
|
5399
|
+
var DetachedCellCls = "cell_DetachedCellCls__1eexc2a5";
|
|
5400
|
+
var FlashingColumnCellRecipe = createRuntimeFn({ defaultClassName: "cell_FlashingColumnCellRecipe__1eexc2aa", variantClassNames: { direction: { up: "cell_FlashingColumnCellRecipe_direction_up__1eexc2ab", down: "cell_FlashingColumnCellRecipe_direction_down__1eexc2ac", neutral: "cell_FlashingColumnCellRecipe_direction_neutral__1eexc2ad" } }, defaultVariants: {}, compoundVariants: [] });
|
|
5401
|
+
var SelectionCheckboxCls = "cell_SelectionCheckboxCls__1eexc2a8";
|
|
5402
|
+
|
|
5403
|
+
// src/components/InfiniteTable/components/cellDetachedCls.ts
|
|
5404
|
+
var CELL_DETACHED_CLASSNAMES = [
|
|
5405
|
+
DetachedCellCls,
|
|
5406
|
+
`${rootClassName2}DetachedCell`
|
|
5407
|
+
];
|
|
5408
|
+
|
|
5229
5409
|
// src/components/HeadlessTable/index.tsx
|
|
5410
|
+
var virtualScrollLeftOffset = stripVar(InternalVars.virtualScrollLeftOffset);
|
|
5411
|
+
var virtualScrollTopOffset = stripVar(InternalVars.virtualScrollTopOffset);
|
|
5230
5412
|
function useMatrixBrain(brain, brainOptions, fixedCellsInfo) {
|
|
5231
5413
|
if (fixedCellsInfo && (fixedCellsInfo.fixedColsStart || fixedCellsInfo.fixedColsEnd || fixedCellsInfo.fixedRowsStart || fixedCellsInfo.fixedRowsEnd)) {
|
|
5232
5414
|
brain.updateFixedCells({
|
|
@@ -5266,6 +5448,7 @@ function HeadlessTable(props) {
|
|
|
5266
5448
|
onRenderUpdater,
|
|
5267
5449
|
wrapRowsHorizontally,
|
|
5268
5450
|
forceRerenderTimestamp,
|
|
5451
|
+
scrollVarHostRef,
|
|
5269
5452
|
...domProps
|
|
5270
5453
|
} = props;
|
|
5271
5454
|
const { autoFocus } = domProps;
|
|
@@ -5298,7 +5481,24 @@ function HeadlessTable(props) {
|
|
|
5298
5481
|
return remove;
|
|
5299
5482
|
}, [wrapRowsHorizontally, brain]);
|
|
5300
5483
|
const updateDOMTransform = (0, import_react10.useCallback)((scrollPos) => {
|
|
5301
|
-
|
|
5484
|
+
requestAnimationFrame(() => {
|
|
5485
|
+
const scrollVarHost = scrollVarHostRef?.current;
|
|
5486
|
+
if (!scrollVarHost) {
|
|
5487
|
+
domRef.current.style.setProperty(
|
|
5488
|
+
"transform",
|
|
5489
|
+
`translate3d(${-scrollPos.scrollLeft}px, ${-scrollPos.scrollTop}px, 0px)`
|
|
5490
|
+
);
|
|
5491
|
+
return;
|
|
5492
|
+
}
|
|
5493
|
+
scrollVarHost.style.setProperty(
|
|
5494
|
+
virtualScrollLeftOffset,
|
|
5495
|
+
`-${scrollPos.scrollLeft}px`
|
|
5496
|
+
);
|
|
5497
|
+
scrollVarHost.style.setProperty(
|
|
5498
|
+
virtualScrollTopOffset,
|
|
5499
|
+
`-${scrollPos.scrollTop}px`
|
|
5500
|
+
);
|
|
5501
|
+
});
|
|
5302
5502
|
}, []);
|
|
5303
5503
|
const onContainerScroll = (0, import_react10.useCallback)(
|
|
5304
5504
|
(scrollPos) => {
|
|
@@ -5339,7 +5539,8 @@ function HeadlessTable(props) {
|
|
|
5339
5539
|
renderCell,
|
|
5340
5540
|
renderDetailRow,
|
|
5341
5541
|
brain,
|
|
5342
|
-
cellHoverClassNames
|
|
5542
|
+
cellHoverClassNames,
|
|
5543
|
+
cellDetachedClassNames: CELL_DETACHED_CLASSNAMES
|
|
5343
5544
|
}
|
|
5344
5545
|
),
|
|
5345
5546
|
activeCellIndex != null ? /* @__PURE__ */ React14.createElement(
|
|
@@ -5948,10 +6149,10 @@ var React27 = __toESM(require("react"));
|
|
|
5948
6149
|
var import_react18 = require("react");
|
|
5949
6150
|
|
|
5950
6151
|
// src/components/InfiniteTable/components/InfiniteTableHeader/header.css.ts
|
|
5951
|
-
var CellCls = "
|
|
6152
|
+
var CellCls = "cell_CellCls__1eexc2a6";
|
|
5952
6153
|
var HeaderCellContentRecipe = createRuntimeFn({ defaultClassName: "header_HeaderCellContentRecipe__12zfob129 utilities_height_100%__16lm1iw19 utilities_width_100%__16lm1iw1c utilities_display_flex__16lm1iwz utilities_flexFlow_row__16lm1iw1p utilities_alignItems_center__16lm1iw1r utilities_justifyContent_start__16lm1iw1w", variantClassNames: { filtered: { false: "header_HeaderCellContentRecipe_filtered_false__12zfob12a", true: "header_HeaderCellContentRecipe_filtered_true__12zfob12b" }, verticalAlign: { start: "header_HeaderCellContentRecipe_verticalAlign_start__12zfob12c", end: "header_HeaderCellContentRecipe_verticalAlign_end__12zfob12d", center: "header_HeaderCellContentRecipe_verticalAlign_center__12zfob12e" }, align: { start: "header_HeaderCellContentRecipe_align_start__12zfob12f", end: "header_HeaderCellContentRecipe_align_end__12zfob12g", center: "header_HeaderCellContentRecipe_align_center__12zfob12h" } }, defaultVariants: {}, compoundVariants: [] });
|
|
5953
6154
|
var HeaderCellProxy = "header_HeaderCellProxy__12zfob1n utilities_whiteSpace_nowrap__16lm1iw24 utilities_textOverflow_ellipsis__16lm1iw25 utilities_overflow_hidden__16lm1iw1y";
|
|
5954
|
-
var HeaderCellRecipe = createRuntimeFn({ defaultClassName: "header_HeaderCellRecipe__12zfob1o
|
|
6155
|
+
var HeaderCellRecipe = createRuntimeFn({ defaultClassName: "header_HeaderCellRecipe__12zfob1o", variantClassNames: { rowActive: { false: "header_HeaderCellRecipe_rowActive_false__12zfob1p", true: "header_HeaderCellRecipe_rowActive_true__12zfob1q" }, cellSelected: { false: "header_HeaderCellRecipe_cellSelected_false__12zfob1r", true: "header_HeaderCellRecipe_cellSelected_true__12zfob1s" }, rowSelected: { false: "header_HeaderCellRecipe_rowSelected_false__12zfob1t", true: "header_HeaderCellRecipe_rowSelected_true__12zfob1u", null: "header_HeaderCellRecipe_rowSelected_null__12zfob1v" }, rowDisabled: { false: "header_HeaderCellRecipe_rowDisabled_false__12zfob1w", true: "header_HeaderCellRecipe_rowDisabled_true__12zfob1x" }, firstRow: { false: "header_HeaderCellRecipe_firstRow_false__12zfob1y", true: "header_HeaderCellRecipe_firstRow_true__12zfob1z" }, treeNode: { parent: "header_HeaderCellRecipe_treeNode_parent__12zfob110", leaf: "header_HeaderCellRecipe_treeNode_leaf__12zfob111", false: "header_HeaderCellRecipe_treeNode_false__12zfob112" }, firstRowInHorizontalLayoutPage: { false: "header_HeaderCellRecipe_firstRowInHorizontalLayoutPage_false__12zfob113", true: "header_HeaderCellRecipe_firstRowInHorizontalLayoutPage_true__12zfob114" }, groupRow: { false: "header_HeaderCellRecipe_groupRow_false__12zfob115", true: "header_HeaderCellRecipe_groupRow_true__12zfob116" }, groupCell: { false: "header_HeaderCellRecipe_groupCell_false__12zfob117", true: "header_HeaderCellRecipe_groupCell_true__12zfob118" }, align: { start: "header_HeaderCellRecipe_align_start__12zfob119", end: "header_HeaderCellRecipe_align_end__12zfob11a", center: "header_HeaderCellRecipe_align_center__12zfob11b" }, verticalAlign: { start: "header_HeaderCellRecipe_verticalAlign_start__12zfob11c", end: "header_HeaderCellRecipe_verticalAlign_end__12zfob11d", center: "header_HeaderCellRecipe_verticalAlign_center__12zfob11e" }, zebra: { false: "header_HeaderCellRecipe_zebra_false__12zfob11f", even: "header_HeaderCellRecipe_zebra_even__12zfob11g", odd: "header_HeaderCellRecipe_zebra_odd__12zfob11h" }, dragging: { true: "header_HeaderCellRecipe_dragging_true__12zfob11i", false: "header_HeaderCellRecipe_dragging_false__12zfob11j" }, insideDisabledDraggingPage: { true: "header_HeaderCellRecipe_insideDisabledDraggingPage_true__12zfob11k", false: "header_HeaderCellRecipe_insideDisabledDraggingPage_false__12zfob11l" }, first: { true: "header_HeaderCellRecipe_first_true__12zfob11m", false: "header_HeaderCellRecipe_first_false__12zfob11n" }, last: { true: "header_HeaderCellRecipe_last_true__12zfob11o", false: "header_HeaderCellRecipe_last_false__12zfob11p" }, groupByField: { true: "header_HeaderCellRecipe_groupByField_true__12zfob11q", false: "header_HeaderCellRecipe_groupByField_false__12zfob11r" }, firstInCategory: { true: "header_HeaderCellRecipe_firstInCategory_true__12zfob11s", false: "header_HeaderCellRecipe_firstInCategory_false__12zfob11t" }, lastInCategory: { true: "header_HeaderCellRecipe_lastInCategory_true__12zfob11u", false: "header_HeaderCellRecipe_lastInCategory_false__12zfob11v" }, pinned: { start: "header_HeaderCellRecipe_pinned_start__12zfob11w", end: "header_HeaderCellRecipe_pinned_end__12zfob11x", false: "header_HeaderCellRecipe_pinned_false__12zfob11y" }, filtered: { true: "header_HeaderCellRecipe_filtered_true__12zfob11z", false: "header_HeaderCellRecipe_filtered_false__12zfob120" } }, defaultVariants: {}, compoundVariants: [[{ pinned: "start", lastInCategory: true }, "header_HeaderCellRecipe_compound_0__12zfob121"], [{ pinned: "end", firstInCategory: true }, "header_HeaderCellRecipe_compound_1__12zfob122"], [{ pinned: false, lastInCategory: true }, "header_HeaderCellRecipe_compound_2__12zfob123"]] });
|
|
5955
6156
|
var HeaderClsRecipe = createRuntimeFn({ defaultClassName: "header_HeaderClsRecipe__12zfob19 utilities_display_block__16lm1iw12 utilities_position_absolute__16lm1iw2", variantClassNames: { pinned: { start: "header_HeaderClsRecipe_pinned_start__12zfob1a", end: "header_HeaderClsRecipe_pinned_end__12zfob1b", false: "header_HeaderClsRecipe_pinned_false__12zfob1c" }, firstInCategory: { true: "header_HeaderClsRecipe_firstInCategory_true__12zfob1d", false: "header_HeaderClsRecipe_firstInCategory_false__12zfob1e" }, lastInCategory: { true: "header_HeaderClsRecipe_lastInCategory_true__12zfob1f", false: "header_HeaderClsRecipe_lastInCategory_false__12zfob1g" }, overflow: { true: "header_HeaderClsRecipe_overflow_true__12zfob1h", false: "header_HeaderClsRecipe_overflow_false__12zfob1i" } }, defaultVariants: {}, compoundVariants: [[{ overflow: true, pinned: "start" }, "header_HeaderClsRecipe_compound_0__12zfob1j"], [{ pinned: "start", firstInCategory: true }, "header_HeaderClsRecipe_compound_1__12zfob1k"], [{ overflow: true, pinned: "end" }, "header_HeaderClsRecipe_compound_2__12zfob1l"], [{ pinned: "end", lastInCategory: true }, "header_HeaderClsRecipe_compound_3__12zfob1m"]] });
|
|
5956
6157
|
var HeaderFilterEditorCls = "header_HeaderFilterEditorCls__12zfob12r utilities_width_100%__16lm1iw1c utilities_height_100%__16lm1iw19";
|
|
5957
6158
|
var HeaderFilterIconIndexCls = "header_HeaderFilterIconIndexCls__12zfob17";
|
|
@@ -8808,13 +9009,6 @@ function objectValuesExcept(obj, exceptList) {
|
|
|
8808
9009
|
return result;
|
|
8809
9010
|
}
|
|
8810
9011
|
|
|
8811
|
-
// src/components/InfiniteTable/components/cell.css.ts
|
|
8812
|
-
var ColumnCellCls = "cell_ColumnCellCls__1eexc2a6 cell_CellCls__1eexc2a5 utilities_display_flex__16lm1iwz utilities_flexFlow_row__16lm1iw1p utilities_alignItems_center__16lm1iw1r utilities_position_absolute__16lm1iw2 utilities_willChange_transform__16lm1iw23 utilities_whiteSpace_nowrap__16lm1iw24 utilities_userSelect_none__16lm1iw17";
|
|
8813
|
-
var ColumnCellRecipe = createRuntimeFn({ defaultClassName: "cell_ColumnCellRecipe__1eexc2am", variantClassNames: { dragging: { false: "cell_ColumnCellRecipe_dragging_false__1eexc2an", true: "cell_ColumnCellRecipe_dragging_true__1eexc2ao" }, insideDisabledDraggingPage: { true: "cell_ColumnCellRecipe_insideDisabledDraggingPage_true__1eexc2ap", false: "cell_ColumnCellRecipe_insideDisabledDraggingPage_false__1eexc2aq" }, cellSelected: { false: "cell_ColumnCellRecipe_cellSelected_false__1eexc2ar", true: "cell_ColumnCellRecipe_cellSelected_true__1eexc2as" }, treeNode: { parent: "cell_ColumnCellRecipe_treeNode_parent__1eexc2at", leaf: "cell_ColumnCellRecipe_treeNode_leaf__1eexc2au", false: "cell_ColumnCellRecipe_treeNode_false__1eexc2av" }, align: { start: "cell_ColumnCellRecipe_align_start__1eexc2aw", end: "cell_ColumnCellRecipe_align_end__1eexc2ax", center: "cell_ColumnCellRecipe_align_center__1eexc2ay" }, verticalAlign: { start: "cell_ColumnCellRecipe_verticalAlign_start__1eexc2az", end: "cell_ColumnCellRecipe_verticalAlign_end__1eexc2a10", center: "cell_ColumnCellRecipe_verticalAlign_center__1eexc2a11" }, rowActive: { false: "cell_ColumnCellRecipe_rowActive_false__1eexc2a12", true: "cell_ColumnCellRecipe_rowActive_true__1eexc2a13" }, groupRow: { false: "cell_ColumnCellRecipe_groupRow_false__1eexc2a14", true: "cell_ColumnCellRecipe_groupRow_true__1eexc2a15" }, groupCell: { false: "cell_ColumnCellRecipe_groupCell_false__1eexc2a16", true: "cell_ColumnCellRecipe_groupCell_true__1eexc2a17" }, rowDisabled: { false: "cell_ColumnCellRecipe_rowDisabled_false__1eexc2a18", true: "cell_ColumnCellRecipe_rowDisabled_true__1eexc2a19" }, zebra: { false: "cell_ColumnCellRecipe_zebra_false__1eexc2a1a", even: "cell_ColumnCellRecipe_zebra_even__1eexc2a1b", odd: "cell_ColumnCellRecipe_zebra_odd__1eexc2a1c" }, rowSelected: { true: "cell_ColumnCellRecipe_rowSelected_true__1eexc2a1d", false: "cell_ColumnCellRecipe_rowSelected_false__1eexc2a1e", null: "cell_ColumnCellRecipe_rowSelected_null__1eexc2a1f" }, first: { true: "cell_ColumnCellRecipe_first_true__1eexc2a1g", false: "cell_ColumnCellRecipe_first_false__1eexc2a1h" }, last: { true: "cell_ColumnCellRecipe_last_true__1eexc2a1i", false: "cell_ColumnCellRecipe_last_false__1eexc2a1j" }, groupByField: { true: "cell_ColumnCellRecipe_groupByField_true__1eexc2a1k", false: "cell_ColumnCellRecipe_groupByField_false__1eexc2a1l" }, firstInCategory: { true: "cell_ColumnCellRecipe_firstInCategory_true__1eexc2a1m", false: "cell_ColumnCellRecipe_firstInCategory_false__1eexc2a1n" }, firstRow: { true: "cell_ColumnCellRecipe_firstRow_true__1eexc2a1o", false: "cell_ColumnCellRecipe_firstRow_false__1eexc2a1p" }, firstRowInHorizontalLayoutPage: { true: "cell_ColumnCellRecipe_firstRowInHorizontalLayoutPage_true__1eexc2a1q", false: "cell_ColumnCellRecipe_firstRowInHorizontalLayoutPage_false__1eexc2a1r" }, lastInCategory: { true: "cell_ColumnCellRecipe_lastInCategory_true__1eexc2a1s", false: "cell_ColumnCellRecipe_lastInCategory_false__1eexc2a1t" }, pinned: { start: "cell_ColumnCellRecipe_pinned_start__1eexc2a1u", end: "cell_ColumnCellRecipe_pinned_end__1eexc2a1v", false: "cell_ColumnCellRecipe_pinned_false__1eexc2a1w" }, filtered: { true: "cell_ColumnCellRecipe_filtered_true__1eexc2a1x", false: "cell_ColumnCellRecipe_filtered_false__1eexc2a1y" } }, defaultVariants: {}, compoundVariants: [[{ firstRowInHorizontalLayoutPage: true, firstRow: false }, "cell_ColumnCellRecipe_compound_0__1eexc2a1z"], [{ pinned: "start", lastInCategory: true }, "cell_ColumnCellRecipe_compound_1__1eexc2a20"], [{ pinned: "start", firstInCategory: true }, "cell_ColumnCellRecipe_compound_2__1eexc2a21"], [{ pinned: "end", firstInCategory: true }, "cell_ColumnCellRecipe_compound_3__1eexc2a22"], [{ pinned: "end", lastInCategory: true }, "cell_ColumnCellRecipe_compound_4__1eexc2a23"], [{ align: "center", groupCell: false }, "cell_ColumnCellRecipe_compound_5__1eexc2a24"], [{ rowDisabled: true, zebra: "odd" }, "cell_ColumnCellRecipe_compound_6__1eexc2a25"]] });
|
|
8814
|
-
var ColumnCellSelectionIndicatorRecipe = createRuntimeFn({ defaultClassName: "cell_ColumnCellSelectionIndicatorRecipe__1eexc2ad", variantClassNames: { right: { true: "cell_ColumnCellSelectionIndicatorRecipe_right_true__1eexc2ae", false: "cell_ColumnCellSelectionIndicatorRecipe_right_false__1eexc2af" }, left: { true: "cell_ColumnCellSelectionIndicatorRecipe_left_true__1eexc2ag", false: "cell_ColumnCellSelectionIndicatorRecipe_left_false__1eexc2ah" }, top: { true: "cell_ColumnCellSelectionIndicatorRecipe_top_true__1eexc2ai", false: "cell_ColumnCellSelectionIndicatorRecipe_top_false__1eexc2aj" }, bottom: { true: "cell_ColumnCellSelectionIndicatorRecipe_bottom_true__1eexc2ak", false: "cell_ColumnCellSelectionIndicatorRecipe_bottom_false__1eexc2al" } }, defaultVariants: {}, compoundVariants: [] });
|
|
8815
|
-
var FlashingColumnCellRecipe = createRuntimeFn({ defaultClassName: "cell_FlashingColumnCellRecipe__1eexc2a9", variantClassNames: { direction: { up: "cell_FlashingColumnCellRecipe_direction_up__1eexc2aa", down: "cell_FlashingColumnCellRecipe_direction_down__1eexc2ab", neutral: "cell_FlashingColumnCellRecipe_direction_neutral__1eexc2ac" } }, defaultVariants: {}, compoundVariants: [] });
|
|
8816
|
-
var SelectionCheckboxCls = "cell_SelectionCheckboxCls__1eexc2a7";
|
|
8817
|
-
|
|
8818
9012
|
// src/components/InfiniteTable/components/CheckBox.tsx
|
|
8819
9013
|
var React34 = __toESM(require("react"));
|
|
8820
9014
|
var import_react23 = require("react");
|
|
@@ -11321,11 +11515,14 @@ function InfiniteTableHeaderGroup(props) {
|
|
|
11321
11515
|
|
|
11322
11516
|
// src/components/InfiniteTable/components/InfiniteTableHeader/InfiniteTableHeader.tsx
|
|
11323
11517
|
var { rootClassName: rootClassName9 } = internalProps;
|
|
11518
|
+
var EMPTY_ARR = [];
|
|
11324
11519
|
var TableHeaderClassName = `${rootClassName9}Header`;
|
|
11520
|
+
var headerCls = HeaderClsRecipe({
|
|
11521
|
+
overflow: false
|
|
11522
|
+
});
|
|
11325
11523
|
function InfiniteTableHeaderFn(props) {
|
|
11326
11524
|
const {
|
|
11327
11525
|
bodyBrain,
|
|
11328
|
-
headerBrain: brain,
|
|
11329
11526
|
columns,
|
|
11330
11527
|
style: style2,
|
|
11331
11528
|
className,
|
|
@@ -11340,21 +11537,6 @@ function InfiniteTableHeaderFn(props) {
|
|
|
11340
11537
|
} = useInfiniteTable();
|
|
11341
11538
|
const { computedColumnsMap } = computed;
|
|
11342
11539
|
const domRef = (0, import_react32.useRef)(null);
|
|
11343
|
-
const updateDOMTransform = (0, import_react32.useCallback)((scrollPosition) => {
|
|
11344
|
-
if (domRef.current) {
|
|
11345
|
-
domRef.current.style.transform = `translate3d(-${scrollPosition.scrollLeft}px, 0px, 0px)`;
|
|
11346
|
-
}
|
|
11347
|
-
}, []);
|
|
11348
|
-
(0, import_react32.useEffect)(() => {
|
|
11349
|
-
const removeOnScroll = brain.onScroll(updateDOMTransform);
|
|
11350
|
-
updateDOMTransform(
|
|
11351
|
-
brain.getScrollPosition() || { scrollLeft: 0, scrollTop: 0 }
|
|
11352
|
-
);
|
|
11353
|
-
return removeOnScroll;
|
|
11354
|
-
}, [brain]);
|
|
11355
|
-
const headerCls = HeaderClsRecipe({
|
|
11356
|
-
overflow: false
|
|
11357
|
-
});
|
|
11358
11540
|
const domProps = {
|
|
11359
11541
|
ref: domRef,
|
|
11360
11542
|
className: join(
|
|
@@ -11440,7 +11622,8 @@ function InfiniteTableHeaderFn(props) {
|
|
|
11440
11622
|
name: "header",
|
|
11441
11623
|
renderCell,
|
|
11442
11624
|
brain: headerBrain,
|
|
11443
|
-
cellHoverClassNames:
|
|
11625
|
+
cellHoverClassNames: EMPTY_ARR,
|
|
11626
|
+
cellDetachedClassNames: CELL_DETACHED_CLASSNAMES
|
|
11444
11627
|
}
|
|
11445
11628
|
));
|
|
11446
11629
|
}
|
|
@@ -21286,6 +21469,11 @@ var HorizontalLayoutMatrixBrain = class extends MatrixBrain {
|
|
|
21286
21469
|
remainingSize,
|
|
21287
21470
|
sizes.concat(sizes)
|
|
21288
21471
|
);
|
|
21472
|
+
if (direction === "horizontal") {
|
|
21473
|
+
this.maxHorizontalRenderCount = renderCount;
|
|
21474
|
+
} else {
|
|
21475
|
+
this.maxVerticalRenderCount = renderCount;
|
|
21476
|
+
}
|
|
21289
21477
|
renderCount = Math.min(count, renderCount);
|
|
21290
21478
|
return renderCount;
|
|
21291
21479
|
}
|
|
@@ -23026,7 +23214,7 @@ var useLicense = (licenseKey = "") => {
|
|
|
23026
23214
|
}
|
|
23027
23215
|
let valid2 = isValidLicense(licenseKey, {
|
|
23028
23216
|
publishedAt: 1624970570587,
|
|
23029
|
-
version: "6.1.0"
|
|
23217
|
+
version: "6.1.1-canary.0"
|
|
23030
23218
|
});
|
|
23031
23219
|
if (!licenseKey && !valid2 && isInsidePlayground) {
|
|
23032
23220
|
return true;
|
|
@@ -26996,7 +27184,8 @@ function InfiniteTableBody() {
|
|
|
26996
27184
|
rowDetailRenderer,
|
|
26997
27185
|
showHoverRows,
|
|
26998
27186
|
wrapRowsHorizontally,
|
|
26999
|
-
domProps
|
|
27187
|
+
domProps,
|
|
27188
|
+
domRef
|
|
27000
27189
|
} = componentState;
|
|
27001
27190
|
const LoadMaskCmp = components2?.LoadMask ?? LoadMask;
|
|
27002
27191
|
const computed = getComputed();
|
|
@@ -27045,7 +27234,7 @@ function InfiniteTableBody() {
|
|
|
27045
27234
|
const { renderCell, renderDetailRow } = useCellRendering({
|
|
27046
27235
|
imperativeApi: api,
|
|
27047
27236
|
getComputed,
|
|
27048
|
-
domRef
|
|
27237
|
+
domRef,
|
|
27049
27238
|
bodySize,
|
|
27050
27239
|
computed
|
|
27051
27240
|
});
|
|
@@ -27070,7 +27259,8 @@ function InfiniteTableBody() {
|
|
|
27070
27259
|
renderCell,
|
|
27071
27260
|
renderDetailRow: rowDetailRenderer ? renderDetailRow : void 0,
|
|
27072
27261
|
cellHoverClassNames: showHoverRows ? HOVERED_CLASS_NAMES : void 0,
|
|
27073
|
-
scrollerDOMRef
|
|
27262
|
+
scrollerDOMRef,
|
|
27263
|
+
scrollVarHostRef: domRef
|
|
27074
27264
|
}
|
|
27075
27265
|
), /* @__PURE__ */ React71.createElement(LoadMaskCmp, { visible: loading }, loadingText));
|
|
27076
27266
|
}
|