@infinite-table/infinite-react 6.1.0-canary.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 +22 -5
- package/index.dev.js +460 -248
- package/index.dev.mjs +537 -325
- package/index.js +460 -248
- package/index.mjs +537 -325
- package/package.json +2 -2
package/index.dev.js
CHANGED
|
@@ -143,7 +143,7 @@ function debounce(fn, { wait }) {
|
|
|
143
143
|
}
|
|
144
144
|
|
|
145
145
|
// src/components/InfiniteTable/index.tsx
|
|
146
|
-
var
|
|
146
|
+
var React71 = __toESM(require("react"));
|
|
147
147
|
|
|
148
148
|
// src/utils/join.ts
|
|
149
149
|
var join = (...args) => args.filter((x) => !!`${x}`).join(" ");
|
|
@@ -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.
|
|
23217
|
+
version: "6.1.1-canary.0"
|
|
23030
23218
|
});
|
|
23031
23219
|
if (!licenseKey && !valid2 && isInsidePlayground) {
|
|
23032
23220
|
return true;
|
|
@@ -26406,7 +26594,63 @@ function useColumnFilterOperatorMenu() {
|
|
|
26406
26594
|
var import_react62 = require("react");
|
|
26407
26595
|
|
|
26408
26596
|
// src/components/InfiniteTable/utils/getCellContextMenu.tsx
|
|
26597
|
+
var React68 = __toESM(require("react"));
|
|
26598
|
+
|
|
26599
|
+
// src/components/InfiniteTable/utils/contextMenuUtils.tsx
|
|
26409
26600
|
var React67 = __toESM(require("react"));
|
|
26601
|
+
function getMenuItemsAndColumns(menuDefinition) {
|
|
26602
|
+
let items = menuDefinition ? Array.isArray(menuDefinition) ? menuDefinition : menuDefinition.items : null;
|
|
26603
|
+
const columns = menuDefinition && !Array.isArray(menuDefinition) ? menuDefinition.columns : void 0;
|
|
26604
|
+
return {
|
|
26605
|
+
items,
|
|
26606
|
+
columns
|
|
26607
|
+
};
|
|
26608
|
+
}
|
|
26609
|
+
function getMenuDefaultProps(config) {
|
|
26610
|
+
const onRootMouseDown = (event) => {
|
|
26611
|
+
event.__insideMenu = true;
|
|
26612
|
+
};
|
|
26613
|
+
const onHide = (state) => {
|
|
26614
|
+
state.domRef.current?.parentNode?.removeEventListener(
|
|
26615
|
+
"mousedown",
|
|
26616
|
+
onRootMouseDown
|
|
26617
|
+
);
|
|
26618
|
+
};
|
|
26619
|
+
const menuDefaultProps = {
|
|
26620
|
+
columns: [],
|
|
26621
|
+
items: [],
|
|
26622
|
+
autoFocus: true,
|
|
26623
|
+
onShow: (state) => {
|
|
26624
|
+
state.domRef.current?.parentNode?.addEventListener(
|
|
26625
|
+
"mousedown",
|
|
26626
|
+
onRootMouseDown
|
|
26627
|
+
);
|
|
26628
|
+
},
|
|
26629
|
+
onHide,
|
|
26630
|
+
onHideIntent: (state) => {
|
|
26631
|
+
onHide(state);
|
|
26632
|
+
config.onHideIntent?.();
|
|
26633
|
+
}
|
|
26634
|
+
};
|
|
26635
|
+
return menuDefaultProps;
|
|
26636
|
+
}
|
|
26637
|
+
function getLazyMenu(menuDefinition, menuDefaultProps, MenuCmp) {
|
|
26638
|
+
if (!menuDefinition) {
|
|
26639
|
+
return null;
|
|
26640
|
+
}
|
|
26641
|
+
const updater = buildSubscriptionCallback();
|
|
26642
|
+
menuDefinition.then((menuDefinition2) => {
|
|
26643
|
+
const { items, columns } = getMenuItemsAndColumns(menuDefinition2);
|
|
26644
|
+
if (items && items.length) {
|
|
26645
|
+
updater(
|
|
26646
|
+
/* @__PURE__ */ React67.createElement(MenuCmp, { ...menuDefaultProps, items: items || [], columns })
|
|
26647
|
+
);
|
|
26648
|
+
}
|
|
26649
|
+
});
|
|
26650
|
+
return /* @__PURE__ */ React67.createElement(AvoidReactDiff, { updater });
|
|
26651
|
+
}
|
|
26652
|
+
|
|
26653
|
+
// src/components/InfiniteTable/utils/getCellContextMenu.tsx
|
|
26410
26654
|
function getCellContextMenu(cellLocation, context, onHideIntent) {
|
|
26411
26655
|
const { columnId, rowIndex, event } = cellLocation;
|
|
26412
26656
|
const { getComputed, getState } = context;
|
|
@@ -26429,42 +26673,25 @@ function getCellContextMenu(cellLocation, context, onHideIntent) {
|
|
|
26429
26673
|
preventDefault: false
|
|
26430
26674
|
};
|
|
26431
26675
|
}
|
|
26676
|
+
const menuDefaultProps = getMenuDefaultProps({
|
|
26677
|
+
onHideIntent
|
|
26678
|
+
});
|
|
26432
26679
|
const menuDefinition = getCellContextMenuItems(cellContext, context);
|
|
26433
|
-
|
|
26434
|
-
|
|
26435
|
-
|
|
26436
|
-
|
|
26437
|
-
|
|
26438
|
-
|
|
26439
|
-
|
|
26440
|
-
|
|
26441
|
-
|
|
26442
|
-
);
|
|
26443
|
-
};
|
|
26680
|
+
const preventDefault = menuDefinition instanceof Promise ? true : Array.isArray(menuDefinition) ? true : !!(menuDefinition && Array.isArray(menuDefinition.items));
|
|
26681
|
+
if (menuDefinition instanceof Promise) {
|
|
26682
|
+
return {
|
|
26683
|
+
cellContext,
|
|
26684
|
+
menu: getLazyMenu(menuDefinition, menuDefaultProps, MenuCmp),
|
|
26685
|
+
preventDefault
|
|
26686
|
+
};
|
|
26687
|
+
}
|
|
26688
|
+
const { items, columns } = getMenuItemsAndColumns(menuDefinition);
|
|
26444
26689
|
if (!items || !items.length) {
|
|
26445
26690
|
return { cellContext, menu: null, preventDefault: Array.isArray(items) };
|
|
26446
26691
|
}
|
|
26447
26692
|
return {
|
|
26448
|
-
preventDefault
|
|
26449
|
-
menu: /* @__PURE__ */
|
|
26450
|
-
MenuCmp,
|
|
26451
|
-
{
|
|
26452
|
-
columns: menuColumns,
|
|
26453
|
-
autoFocus: true,
|
|
26454
|
-
items,
|
|
26455
|
-
onShow: (state) => {
|
|
26456
|
-
state.domRef.current?.parentNode?.addEventListener(
|
|
26457
|
-
"mousedown",
|
|
26458
|
-
onRootMouseDown
|
|
26459
|
-
);
|
|
26460
|
-
},
|
|
26461
|
-
onHide,
|
|
26462
|
-
onHideIntent: (state) => {
|
|
26463
|
-
onHide(state);
|
|
26464
|
-
onHideIntent?.();
|
|
26465
|
-
}
|
|
26466
|
-
}
|
|
26467
|
-
),
|
|
26693
|
+
preventDefault,
|
|
26694
|
+
menu: /* @__PURE__ */ React68.createElement(MenuCmp, { ...menuDefaultProps, columns, items }),
|
|
26468
26695
|
cellContext
|
|
26469
26696
|
};
|
|
26470
26697
|
}
|
|
@@ -26485,42 +26712,25 @@ function getTableContextMenu(menuLocation, context, onHideIntent) {
|
|
|
26485
26712
|
if (!getContextMenuItems) {
|
|
26486
26713
|
return { cellContext, menu: null, preventDefault: false };
|
|
26487
26714
|
}
|
|
26488
|
-
|
|
26489
|
-
|
|
26490
|
-
|
|
26491
|
-
const
|
|
26492
|
-
|
|
26493
|
-
|
|
26494
|
-
|
|
26495
|
-
|
|
26496
|
-
|
|
26497
|
-
|
|
26498
|
-
|
|
26499
|
-
}
|
|
26715
|
+
const menuDefaultProps = getMenuDefaultProps({
|
|
26716
|
+
onHideIntent
|
|
26717
|
+
});
|
|
26718
|
+
const menuDefinition = getContextMenuItems(cellContext, context);
|
|
26719
|
+
const preventDefault = menuDefinition instanceof Promise ? true : Array.isArray(menuDefinition) ? true : !!(menuDefinition && Array.isArray(menuDefinition.items));
|
|
26720
|
+
if (menuDefinition instanceof Promise) {
|
|
26721
|
+
return {
|
|
26722
|
+
cellContext,
|
|
26723
|
+
menu: getLazyMenu(menuDefinition, menuDefaultProps, MenuCmp),
|
|
26724
|
+
preventDefault
|
|
26725
|
+
};
|
|
26726
|
+
}
|
|
26727
|
+
const { items, columns } = getMenuItemsAndColumns(menuDefinition);
|
|
26500
26728
|
if (!items || !items.length) {
|
|
26501
26729
|
return { cellContext, menu: null, preventDefault: Array.isArray(items) };
|
|
26502
26730
|
}
|
|
26503
26731
|
return {
|
|
26504
|
-
preventDefault
|
|
26505
|
-
menu: /* @__PURE__ */
|
|
26506
|
-
MenuCmp,
|
|
26507
|
-
{
|
|
26508
|
-
columns: menuColumns,
|
|
26509
|
-
autoFocus: true,
|
|
26510
|
-
items,
|
|
26511
|
-
onShow: (state) => {
|
|
26512
|
-
state.domRef.current?.parentNode?.addEventListener(
|
|
26513
|
-
"mousedown",
|
|
26514
|
-
onRootMouseDown
|
|
26515
|
-
);
|
|
26516
|
-
},
|
|
26517
|
-
onHide,
|
|
26518
|
-
onHideIntent: (state) => {
|
|
26519
|
-
onHide(state);
|
|
26520
|
-
onHideIntent?.();
|
|
26521
|
-
}
|
|
26522
|
-
}
|
|
26523
|
-
),
|
|
26732
|
+
preventDefault,
|
|
26733
|
+
menu: /* @__PURE__ */ React68.createElement(MenuCmp, { ...menuDefaultProps, columns, items }),
|
|
26524
26734
|
cellContext
|
|
26525
26735
|
};
|
|
26526
26736
|
}
|
|
@@ -26712,7 +26922,7 @@ function useTableContextMenu() {
|
|
|
26712
26922
|
|
|
26713
26923
|
// src/components/InfiniteTable/components/HScrollSyncContent.tsx
|
|
26714
26924
|
var import_react64 = require("react");
|
|
26715
|
-
var
|
|
26925
|
+
var React69 = __toESM(require("react"));
|
|
26716
26926
|
|
|
26717
26927
|
// src/components/InfiniteTable/hooks/useGridScroll.ts
|
|
26718
26928
|
var import_react63 = require("react");
|
|
@@ -26758,7 +26968,7 @@ function HScrollSyncContent(props) {
|
|
|
26758
26968
|
} else if (maxWidth === "viewport") {
|
|
26759
26969
|
style2.maxWidth = ThemeVars.runtime.bodyWidth;
|
|
26760
26970
|
}
|
|
26761
|
-
return /* @__PURE__ */
|
|
26971
|
+
return /* @__PURE__ */ React69.createElement(
|
|
26762
26972
|
"div",
|
|
26763
26973
|
{
|
|
26764
26974
|
ref: domRef,
|
|
@@ -26859,7 +27069,7 @@ function useHorizontalLayout() {
|
|
|
26859
27069
|
}
|
|
26860
27070
|
|
|
26861
27071
|
// src/components/InfiniteTable/hooks/useDebugMode.ts
|
|
26862
|
-
var
|
|
27072
|
+
var React70 = __toESM(require("react"));
|
|
26863
27073
|
var logWarning = once(() => {
|
|
26864
27074
|
console.warn(
|
|
26865
27075
|
`It appears you have not loaded the CSS file for InfiniteTable.
|
|
@@ -26873,7 +27083,7 @@ import '@infinite-table/infinite-react/index.css'
|
|
|
26873
27083
|
var cssFileLoadedVarName = stripVar(ThemeVars.loaded);
|
|
26874
27084
|
function useDebugMode() {
|
|
26875
27085
|
const { getState } = useInfiniteTable();
|
|
26876
|
-
|
|
27086
|
+
React70.useEffect(() => {
|
|
26877
27087
|
runDebugMode(getState);
|
|
26878
27088
|
}, []);
|
|
26879
27089
|
}
|
|
@@ -26929,7 +27139,7 @@ function InfiniteTableHeader2() {
|
|
|
26929
27139
|
const { state: componentState, getComputed } = context;
|
|
26930
27140
|
const { header, brain, headerBrain, wrapRowsHorizontally } = componentState;
|
|
26931
27141
|
const { scrollbars } = getComputed();
|
|
26932
|
-
return header ? /* @__PURE__ */
|
|
27142
|
+
return header ? /* @__PURE__ */ React71.createElement(
|
|
26933
27143
|
TableHeaderWrapper,
|
|
26934
27144
|
{
|
|
26935
27145
|
wrapRowsHorizontally: !!wrapRowsHorizontally,
|
|
@@ -26946,7 +27156,7 @@ var InfiniteTableBodyCls = join(
|
|
|
26946
27156
|
transformTranslateZero
|
|
26947
27157
|
);
|
|
26948
27158
|
function InfiniteTableBodyContainer(props) {
|
|
26949
|
-
return /* @__PURE__ */
|
|
27159
|
+
return /* @__PURE__ */ React71.createElement(
|
|
26950
27160
|
"div",
|
|
26951
27161
|
{
|
|
26952
27162
|
...props,
|
|
@@ -26974,7 +27184,8 @@ function InfiniteTableBody() {
|
|
|
26974
27184
|
rowDetailRenderer,
|
|
26975
27185
|
showHoverRows,
|
|
26976
27186
|
wrapRowsHorizontally,
|
|
26977
|
-
domProps
|
|
27187
|
+
domProps,
|
|
27188
|
+
domRef
|
|
26978
27189
|
} = componentState;
|
|
26979
27190
|
const LoadMaskCmp = components2?.LoadMask ?? LoadMask;
|
|
26980
27191
|
const computed = getComputed();
|
|
@@ -26983,7 +27194,7 @@ function InfiniteTableBody() {
|
|
|
26983
27194
|
const {
|
|
26984
27195
|
componentState: { loading }
|
|
26985
27196
|
} = useDataSourceContextValue();
|
|
26986
|
-
const onContextMenu =
|
|
27197
|
+
const onContextMenu = React71.useCallback((event) => {
|
|
26987
27198
|
const state = context.getState();
|
|
26988
27199
|
const target = event.target;
|
|
26989
27200
|
if (!masterContext && event._from_row_detail) {
|
|
@@ -27023,13 +27234,13 @@ function InfiniteTableBody() {
|
|
|
27023
27234
|
const { renderCell, renderDetailRow } = useCellRendering({
|
|
27024
27235
|
imperativeApi: api,
|
|
27025
27236
|
getComputed,
|
|
27026
|
-
domRef
|
|
27237
|
+
domRef,
|
|
27027
27238
|
bodySize,
|
|
27028
27239
|
computed
|
|
27029
27240
|
});
|
|
27030
27241
|
const { autoFocus, tabIndex } = domProps ?? {};
|
|
27031
27242
|
useToggleWrapRowsHorizontally();
|
|
27032
|
-
return /* @__PURE__ */
|
|
27243
|
+
return /* @__PURE__ */ React71.createElement(InfiniteTableBodyContainer, { onContextMenu }, /* @__PURE__ */ React71.createElement(
|
|
27033
27244
|
HeadlessTable,
|
|
27034
27245
|
{
|
|
27035
27246
|
forceRerenderTimestamp: componentState.forceBodyRerenderTimestamp,
|
|
@@ -27048,11 +27259,12 @@ function InfiniteTableBody() {
|
|
|
27048
27259
|
renderCell,
|
|
27049
27260
|
renderDetailRow: rowDetailRenderer ? renderDetailRow : void 0,
|
|
27050
27261
|
cellHoverClassNames: showHoverRows ? HOVERED_CLASS_NAMES : void 0,
|
|
27051
|
-
scrollerDOMRef
|
|
27262
|
+
scrollerDOMRef,
|
|
27263
|
+
scrollVarHostRef: domRef
|
|
27052
27264
|
}
|
|
27053
|
-
), /* @__PURE__ */
|
|
27265
|
+
), /* @__PURE__ */ React71.createElement(LoadMaskCmp, { visible: loading }, loadingText));
|
|
27054
27266
|
}
|
|
27055
|
-
var InfiniteTableComponent =
|
|
27267
|
+
var InfiniteTableComponent = React71.memo(
|
|
27056
27268
|
function InfiniteTableComponent2() {
|
|
27057
27269
|
const context = useInfiniteTable();
|
|
27058
27270
|
const masterContext = useMasterDetailContext();
|
|
@@ -27084,7 +27296,7 @@ var InfiniteTableComponent = React70.memo(
|
|
|
27084
27296
|
useScrollToActiveRow(activeRowIndex, dataArray.length, api);
|
|
27085
27297
|
useScrollToActiveCell(activeCellIndex, dataArray.length, api);
|
|
27086
27298
|
const { onKeyDown: onKeyDown2 } = useDOMEventHandlers();
|
|
27087
|
-
|
|
27299
|
+
React71.useEffect(() => {
|
|
27088
27300
|
const dataSourceState = getDataSourceState();
|
|
27089
27301
|
const onChange = debounce(
|
|
27090
27302
|
(renderRange) => {
|
|
@@ -27107,7 +27319,7 @@ var InfiniteTableComponent = React70.memo(
|
|
|
27107
27319
|
...initialDOMProps
|
|
27108
27320
|
} = componentState.domProps ?? {};
|
|
27109
27321
|
const domProps = useDOMProps(initialDOMProps);
|
|
27110
|
-
|
|
27322
|
+
React71.useEffect(() => {
|
|
27111
27323
|
brain.setScrollStopDelay(scrollStopDelay);
|
|
27112
27324
|
dataSourceActions.scrollStopDelayUpdatedByTable = scrollStopDelay;
|
|
27113
27325
|
}, [scrollStopDelay]);
|
|
@@ -27118,7 +27330,7 @@ var InfiniteTableComponent = React70.memo(
|
|
|
27118
27330
|
const { menuPortal: cellContextMenuPortal } = useCellContextMenu();
|
|
27119
27331
|
const { menuPortal: tableContextMenuPortal } = useTableContextMenu();
|
|
27120
27332
|
const { menuPortal: filterOperatorMenuPortal } = useColumnFilterOperatorMenu();
|
|
27121
|
-
|
|
27333
|
+
React71.useEffect(() => {
|
|
27122
27334
|
if (typeof globalThis.__DO_NOT_USE_UNLESS_YOU_KNOW_WHAT_YOURE_DOING_IS_READY === "function") {
|
|
27123
27335
|
globalThis.__DO_NOT_USE_UNLESS_YOU_KNOW_WHAT_YOURE_DOING_IS_READY(
|
|
27124
27336
|
componentState.id,
|
|
@@ -27132,13 +27344,13 @@ var InfiniteTableComponent = React70.memo(
|
|
|
27132
27344
|
}
|
|
27133
27345
|
}, [componentState.ready]);
|
|
27134
27346
|
useDebugMode();
|
|
27135
|
-
|
|
27347
|
+
React71.useEffect(() => {
|
|
27136
27348
|
if (masterContext) {
|
|
27137
27349
|
portalDOMRef.current = masterContext.getMasterState().portalDOMRef.current;
|
|
27138
27350
|
}
|
|
27139
27351
|
}, []);
|
|
27140
|
-
const children = initialChildren ?? /* @__PURE__ */
|
|
27141
|
-
return /* @__PURE__ */
|
|
27352
|
+
const children = initialChildren ?? /* @__PURE__ */ React71.createElement(React71.Fragment, null, /* @__PURE__ */ React71.createElement(InfiniteTableHeader2, null), /* @__PURE__ */ React71.createElement(InfiniteTableBody, null));
|
|
27353
|
+
return /* @__PURE__ */ React71.createElement("div", { onKeyDown: onKeyDown2, ref: domRef, ...domProps }, children, /* @__PURE__ */ React71.createElement(
|
|
27142
27354
|
"div",
|
|
27143
27355
|
{
|
|
27144
27356
|
ref: portalDOMRef,
|
|
@@ -27154,14 +27366,14 @@ var InfiniteTableComponent = React70.memo(
|
|
|
27154
27366
|
cellContextMenuPortal,
|
|
27155
27367
|
tableContextMenuPortal,
|
|
27156
27368
|
filterOperatorMenuPortal
|
|
27157
|
-
), rowHeightCSSVar ? /* @__PURE__ */
|
|
27369
|
+
), rowHeightCSSVar ? /* @__PURE__ */ React71.createElement(
|
|
27158
27370
|
CSSNumericVariableWatch,
|
|
27159
27371
|
{
|
|
27160
27372
|
key: "row-height",
|
|
27161
27373
|
varName: rowHeightCSSVar,
|
|
27162
27374
|
onChange: onRowHeightCSSVarChange
|
|
27163
27375
|
}
|
|
27164
|
-
) : null, /* @__PURE__ */
|
|
27376
|
+
) : null, /* @__PURE__ */ React71.createElement(
|
|
27165
27377
|
CSSNumericVariableWatch,
|
|
27166
27378
|
{
|
|
27167
27379
|
key: "flashing-duration",
|
|
@@ -27169,21 +27381,21 @@ var InfiniteTableComponent = React70.memo(
|
|
|
27169
27381
|
varName: ThemeVars.components.Cell.flashingDuration,
|
|
27170
27382
|
onChange: onFlashingDurationCSSVarChange
|
|
27171
27383
|
}
|
|
27172
|
-
), rowDetailHeightCSSVar ? /* @__PURE__ */
|
|
27384
|
+
), rowDetailHeightCSSVar ? /* @__PURE__ */ React71.createElement(
|
|
27173
27385
|
CSSNumericVariableWatch,
|
|
27174
27386
|
{
|
|
27175
27387
|
key: "row-detail-height",
|
|
27176
27388
|
varName: rowDetailHeightCSSVar,
|
|
27177
27389
|
onChange: onRowDetailHeightCSSVarChange
|
|
27178
27390
|
}
|
|
27179
|
-
) : null, columnHeaderHeightCSSVar ? /* @__PURE__ */
|
|
27391
|
+
) : null, columnHeaderHeightCSSVar ? /* @__PURE__ */ React71.createElement(
|
|
27180
27392
|
CSSNumericVariableWatch,
|
|
27181
27393
|
{
|
|
27182
27394
|
key: "column-header-height",
|
|
27183
27395
|
varName: columnHeaderHeightCSSVar,
|
|
27184
27396
|
onChange: onColumnHeaderHeightCSSVarChange
|
|
27185
27397
|
}
|
|
27186
|
-
) : null, licenseValid ? null : /* @__PURE__ */
|
|
27398
|
+
) : null, licenseValid ? null : /* @__PURE__ */ React71.createElement(InfiniteTableLicenseFooter, null), /* @__PURE__ */ React71.createElement(FocusDetect, null));
|
|
27187
27399
|
}
|
|
27188
27400
|
);
|
|
27189
27401
|
function InfiniteTableContextProvider({
|
|
@@ -27207,7 +27419,7 @@ function InfiniteTableContextProvider({
|
|
|
27207
27419
|
getDataSourceMasterContext,
|
|
27208
27420
|
api: dataSourceApi
|
|
27209
27421
|
} = useDataSourceContextValue();
|
|
27210
|
-
const [imperativeApi] =
|
|
27422
|
+
const [imperativeApi] = React71.useState(() => {
|
|
27211
27423
|
return getImperativeApi({
|
|
27212
27424
|
getComputed,
|
|
27213
27425
|
getState,
|
|
@@ -27243,20 +27455,20 @@ function InfiniteTableContextProvider({
|
|
|
27243
27455
|
},
|
|
27244
27456
|
{ earlyAttach: true, debounce: 50 }
|
|
27245
27457
|
);
|
|
27246
|
-
|
|
27458
|
+
React71.useEffect(() => {
|
|
27247
27459
|
if (scrollerDOMRef.current) {
|
|
27248
27460
|
scrollerDOMRef.current.scrollTop = 0;
|
|
27249
27461
|
}
|
|
27250
27462
|
}, [scrollTopKey, scrollerDOMRef]);
|
|
27251
27463
|
const TableContext2 = getInfiniteTableContext();
|
|
27252
|
-
return /* @__PURE__ */
|
|
27464
|
+
return /* @__PURE__ */ React71.createElement(TableContext2.Provider, { value: contextValue }, /* @__PURE__ */ React71.createElement(InfiniteTableComponent, null));
|
|
27253
27465
|
}
|
|
27254
27466
|
var DEFAULT_ROW_HEIGHT = 40;
|
|
27255
27467
|
var DEFAULT_COLUMN_HEADER_HEIGHT = toCSSVarName(columnHeaderHeightName);
|
|
27256
27468
|
var InfiniteTable = function(props) {
|
|
27257
27469
|
const table = (
|
|
27258
27470
|
//@ts-ignore
|
|
27259
|
-
/* @__PURE__ */
|
|
27471
|
+
/* @__PURE__ */ React71.createElement(
|
|
27260
27472
|
InfiniteTableRoot,
|
|
27261
27473
|
{
|
|
27262
27474
|
repeatWrappedGroupRows: !!props.wrapRowsHorizontally,
|
|
@@ -27264,30 +27476,30 @@ var InfiniteTable = function(props) {
|
|
|
27264
27476
|
columnHeaderHeight: DEFAULT_COLUMN_HEADER_HEIGHT,
|
|
27265
27477
|
...props
|
|
27266
27478
|
},
|
|
27267
|
-
/* @__PURE__ */
|
|
27479
|
+
/* @__PURE__ */ React71.createElement(InfiniteTableContextProvider, { children: props.children })
|
|
27268
27480
|
)
|
|
27269
27481
|
);
|
|
27270
27482
|
if (false) {
|
|
27271
|
-
return /* @__PURE__ */
|
|
27483
|
+
return /* @__PURE__ */ React71.createElement(React71.StrictMode, null, table);
|
|
27272
27484
|
}
|
|
27273
27485
|
return table;
|
|
27274
27486
|
};
|
|
27275
27487
|
InfiniteTable.Header = InfiniteTableHeader2;
|
|
27276
27488
|
InfiniteTable.Body = InfiniteTableBody;
|
|
27277
27489
|
InfiniteTable.HScrollSyncContent = HScrollSyncContent;
|
|
27278
|
-
InfiniteTable.Footer = () => /* @__PURE__ */
|
|
27490
|
+
InfiniteTable.Footer = () => /* @__PURE__ */ React71.createElement(InfiniteTableFooter, null);
|
|
27279
27491
|
|
|
27280
27492
|
// src/components/TreeGrid/TreeDataSource.tsx
|
|
27281
|
-
var
|
|
27493
|
+
var React72 = __toESM(require("react"));
|
|
27282
27494
|
function TreeDataSource(props) {
|
|
27283
27495
|
const { DataSource: DataSourceComponent } = useDataSourceInternal({ nodesKey: "children", ...props });
|
|
27284
|
-
return /* @__PURE__ */
|
|
27496
|
+
return /* @__PURE__ */ React72.createElement(DataSourceComponent, null, props.children ?? null);
|
|
27285
27497
|
}
|
|
27286
27498
|
|
|
27287
27499
|
// src/components/TreeGrid/TreeGrid.tsx
|
|
27288
|
-
var
|
|
27500
|
+
var React73 = __toESM(require("react"));
|
|
27289
27501
|
function TreeGrid(props) {
|
|
27290
|
-
return /* @__PURE__ */
|
|
27502
|
+
return /* @__PURE__ */ React73.createElement(InfiniteTable, { ...props });
|
|
27291
27503
|
}
|
|
27292
27504
|
|
|
27293
27505
|
// src/components/DataSource/DataLoader/DataQuery.ts
|
|
@@ -27754,12 +27966,12 @@ var useEffectWhen = (callback, options) => {
|
|
|
27754
27966
|
};
|
|
27755
27967
|
|
|
27756
27968
|
// src/components/InfiniteTable/components/InfiniteTableRow/FlashingColumnCell.tsx
|
|
27757
|
-
var
|
|
27969
|
+
var React74 = __toESM(require("react"));
|
|
27758
27970
|
var currentFlashingDurationVar = stripVar(
|
|
27759
27971
|
InternalVars.currentFlashingDuration
|
|
27760
27972
|
);
|
|
27761
27973
|
var defaultRender = ({ children }) => {
|
|
27762
|
-
return /* @__PURE__ */
|
|
27974
|
+
return /* @__PURE__ */ React74.createElement(React74.Fragment, null, children);
|
|
27763
27975
|
};
|
|
27764
27976
|
var DEFAULT_FLASH_DURATION = 1e3;
|
|
27765
27977
|
var INTERNAL_FLASH_CLS_FOR_DIRECTION = {
|
|
@@ -27781,7 +27993,7 @@ var createFlashingColumnCellComponent = (options = {}) => {
|
|
|
27781
27993
|
// fadeClassName,
|
|
27782
27994
|
render = defaultRender
|
|
27783
27995
|
} = options;
|
|
27784
|
-
const FlashingColumnCell2 =
|
|
27996
|
+
const FlashingColumnCell2 = React74.forwardRef(
|
|
27785
27997
|
(props, _ref) => {
|
|
27786
27998
|
const cellContext = useInfiniteColumnCell();
|
|
27787
27999
|
const {
|
|
@@ -27791,13 +28003,13 @@ var createFlashingColumnCellComponent = (options = {}) => {
|
|
|
27791
28003
|
const { domRef, value, column, rowInfo, htmlElementRef } = cellContext;
|
|
27792
28004
|
const rowId = rowInfo.id;
|
|
27793
28005
|
const columnId = column.id;
|
|
27794
|
-
const initialRef =
|
|
27795
|
-
const oldValueRef =
|
|
28006
|
+
const initialRef = React74.useRef(true);
|
|
28007
|
+
const oldValueRef = React74.useRef(value);
|
|
27796
28008
|
const oldValue = initialRef.current ? null : oldValueRef.current;
|
|
27797
28009
|
initialRef.current = false;
|
|
27798
|
-
const flashTimeoutIdRef =
|
|
27799
|
-
const flashDirectionRef =
|
|
27800
|
-
const fadeTimeoutIdRef =
|
|
28010
|
+
const flashTimeoutIdRef = React74.useRef();
|
|
28011
|
+
const flashDirectionRef = React74.useRef();
|
|
28012
|
+
const fadeTimeoutIdRef = React74.useRef();
|
|
27801
28013
|
useEffectWhen(
|
|
27802
28014
|
() => {
|
|
27803
28015
|
if (value === oldValueRef.current) {
|
|
@@ -27844,7 +28056,7 @@ var createFlashingColumnCellComponent = (options = {}) => {
|
|
|
27844
28056
|
different: [value]
|
|
27845
28057
|
}
|
|
27846
28058
|
);
|
|
27847
|
-
return /* @__PURE__ */
|
|
28059
|
+
return /* @__PURE__ */ React74.createElement("div", { ref: domRef, ...props, className: join(props.className) }, render({ children: props.children, oldValue }));
|
|
27848
28060
|
}
|
|
27849
28061
|
);
|
|
27850
28062
|
return FlashingColumnCell2;
|