@infinite-table/infinite-react 7.3.6 → 7.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +29 -2
- package/index.dev.js +392 -67
- package/index.dev.mjs +392 -67
- package/index.js +8 -8
- package/index.mjs +8 -8
- package/package.json +2 -2
package/index.dev.js
CHANGED
|
@@ -1129,6 +1129,7 @@ var onLogIntentGlobal = (intentChannel, fn) => {
|
|
|
1129
1129
|
});
|
|
1130
1130
|
};
|
|
1131
1131
|
debug.onLogIntent = onLogIntentGlobal;
|
|
1132
|
+
debug.isChannelEnabled = isChannelEnabled;
|
|
1132
1133
|
debug.destroyAll = () => {
|
|
1133
1134
|
initUsedColors();
|
|
1134
1135
|
initUsedColors(debug.colors);
|
|
@@ -5695,61 +5696,64 @@ var useColumnPointerEvents = ({
|
|
|
5695
5696
|
reorderDragResult = dragger.onMove(e2);
|
|
5696
5697
|
};
|
|
5697
5698
|
const onPointerUp = (e2) => {
|
|
5698
|
-
const
|
|
5699
|
-
|
|
5700
|
-
|
|
5701
|
-
|
|
5702
|
-
|
|
5703
|
-
|
|
5704
|
-
|
|
5705
|
-
|
|
5706
|
-
|
|
5707
|
-
|
|
5708
|
-
|
|
5709
|
-
|
|
5710
|
-
|
|
5711
|
-
|
|
5712
|
-
|
|
5713
|
-
|
|
5714
|
-
|
|
5715
|
-
|
|
5716
|
-
|
|
5717
|
-
|
|
5718
|
-
|
|
5719
|
-
|
|
5699
|
+
const pointerId = e2.pointerId;
|
|
5700
|
+
requestAnimationFrame(() => {
|
|
5701
|
+
const { multiSortBehavior } = getState();
|
|
5702
|
+
const target2 = domRef.current;
|
|
5703
|
+
rootRef.current?.classList.remove(InfiniteClsShiftingColumns);
|
|
5704
|
+
dragger.stop();
|
|
5705
|
+
brain.update({
|
|
5706
|
+
...initialAvailableSize
|
|
5707
|
+
});
|
|
5708
|
+
discardAlwaysRenderedColumn?.();
|
|
5709
|
+
restoreRenderRange?.();
|
|
5710
|
+
computedVisibleColumns.forEach((col) => {
|
|
5711
|
+
clearInfiniteColumnReorderDuration(
|
|
5712
|
+
col.computedVisibleIndex,
|
|
5713
|
+
rootRef.current
|
|
5714
|
+
);
|
|
5715
|
+
setInfiniteColumnVisibility(
|
|
5716
|
+
col.computedVisibleIndex,
|
|
5717
|
+
"",
|
|
5718
|
+
rootRef.current
|
|
5719
|
+
);
|
|
5720
|
+
setInfiniteColumnOffsetWhileReordering(
|
|
5721
|
+
col.computedVisibleIndex,
|
|
5722
|
+
"",
|
|
5723
|
+
rootRef.current
|
|
5724
|
+
);
|
|
5725
|
+
});
|
|
5726
|
+
setInfiniteColumnZIndex(
|
|
5727
|
+
dragColumnIndex,
|
|
5728
|
+
getColumnZIndex(dragColumn, {
|
|
5729
|
+
pinnedStartColsCount: computedPinnedStartColumns.length,
|
|
5730
|
+
visibleColsCount: computedVisibleColumns.length
|
|
5731
|
+
}),
|
|
5720
5732
|
rootRef.current
|
|
5721
5733
|
);
|
|
5722
|
-
|
|
5723
|
-
|
|
5724
|
-
|
|
5725
|
-
|
|
5726
|
-
|
|
5727
|
-
|
|
5728
|
-
|
|
5729
|
-
|
|
5730
|
-
|
|
5731
|
-
|
|
5732
|
-
target2.releasePointerCapture(e2.pointerId);
|
|
5733
|
-
target2.removeEventListener("pointermove", onPointerMove);
|
|
5734
|
-
target2.removeEventListener("pointerup", onPointerUp);
|
|
5735
|
-
setProxyPosition(null);
|
|
5736
|
-
const dragColumnSortable = api.getColumnApi(dragColumn.id)?.isSortable() ?? false;
|
|
5737
|
-
if (!didDragAtLeastOnce && dragColumnSortable) {
|
|
5738
|
-
api.toggleSortingForColumn(dragColumn.id, {
|
|
5739
|
-
multiSortBehavior: multiSortBehavior === "replace" && (e2.ctrlKey || e2.metaKey) ? "append" : multiSortBehavior
|
|
5740
|
-
});
|
|
5741
|
-
}
|
|
5742
|
-
if (reorderDragResult) {
|
|
5743
|
-
persistColumnOrder(reorderDragResult);
|
|
5744
|
-
} else if (didDragAtLeastOnce) {
|
|
5745
|
-
if (allowColumnHideOnDrag) {
|
|
5746
|
-
api.setVisibilityForColumn(dragColumn.id, false);
|
|
5734
|
+
target2.style.cursor = initialCursor;
|
|
5735
|
+
target2.releasePointerCapture(pointerId);
|
|
5736
|
+
target2.removeEventListener("pointermove", onPointerMove);
|
|
5737
|
+
target2.removeEventListener("pointerup", onPointerUp);
|
|
5738
|
+
setProxyPosition(null);
|
|
5739
|
+
const dragColumnSortable = api.getColumnApi(dragColumn.id)?.isSortable() ?? false;
|
|
5740
|
+
if (!didDragAtLeastOnce && dragColumnSortable) {
|
|
5741
|
+
api.toggleSortingForColumn(dragColumn.id, {
|
|
5742
|
+
multiSortBehavior: multiSortBehavior === "replace" && (e2.ctrlKey || e2.metaKey) ? "append" : multiSortBehavior
|
|
5743
|
+
});
|
|
5747
5744
|
}
|
|
5748
|
-
|
|
5749
|
-
|
|
5750
|
-
|
|
5751
|
-
|
|
5752
|
-
|
|
5745
|
+
if (reorderDragResult) {
|
|
5746
|
+
persistColumnOrder(reorderDragResult);
|
|
5747
|
+
} else if (didDragAtLeastOnce) {
|
|
5748
|
+
if (allowColumnHideOnDrag) {
|
|
5749
|
+
api.setVisibilityForColumn(dragColumn.id, false);
|
|
5750
|
+
}
|
|
5751
|
+
}
|
|
5752
|
+
actions.columnReorderDragColumnId = false;
|
|
5753
|
+
if (horizontalLayoutPageIndex != null) {
|
|
5754
|
+
actions.columnReorderInPageIndex = null;
|
|
5755
|
+
}
|
|
5756
|
+
});
|
|
5753
5757
|
};
|
|
5754
5758
|
target.addEventListener("pointermove", onPointerMove);
|
|
5755
5759
|
target.addEventListener("pointerup", onPointerUp);
|
|
@@ -13706,6 +13710,7 @@ function computeReducersFor(data, index, reducers, reducerResults, groupKeys) {
|
|
|
13706
13710
|
}
|
|
13707
13711
|
function lazyGroup(groupParams, rootData) {
|
|
13708
13712
|
const {
|
|
13713
|
+
marker,
|
|
13709
13714
|
reducers = {},
|
|
13710
13715
|
pivot,
|
|
13711
13716
|
groupBy,
|
|
@@ -13714,6 +13719,9 @@ function lazyGroup(groupParams, rootData) {
|
|
|
13714
13719
|
cache,
|
|
13715
13720
|
mappings
|
|
13716
13721
|
} = groupParams;
|
|
13722
|
+
if (marker) {
|
|
13723
|
+
marker.start();
|
|
13724
|
+
}
|
|
13717
13725
|
const deepMap = new DeepMap();
|
|
13718
13726
|
function traverseValues(pivotDeepMap, container, pivot2, pivotIndex = 0, currentPivotKeys2 = []) {
|
|
13719
13727
|
const last = !pivot2.length || pivotIndex === pivot2.length - 1;
|
|
@@ -13845,6 +13853,16 @@ function lazyGroup(groupParams, rootData) {
|
|
|
13845
13853
|
result.topLevelPivotColumns = topLevelPivotColumns;
|
|
13846
13854
|
result.pivot = pivot;
|
|
13847
13855
|
}
|
|
13856
|
+
if (marker) {
|
|
13857
|
+
marker.end({
|
|
13858
|
+
details: [
|
|
13859
|
+
{
|
|
13860
|
+
name: "Group by fields",
|
|
13861
|
+
value: groupBy.map((group2) => group2.field).join(", ")
|
|
13862
|
+
}
|
|
13863
|
+
]
|
|
13864
|
+
});
|
|
13865
|
+
}
|
|
13848
13866
|
return result;
|
|
13849
13867
|
}
|
|
13850
13868
|
function processGroup(deepMap, currentGroupKeys, currentPivotKeys, item, itemIndex, pivot, reducers, topLevelPivotColumns, initialReducerValue, defaultToKey = DEFAULT_TO_KEY) {
|
|
@@ -13966,7 +13984,18 @@ function processTreeNode(treeParams, deepMap, treePaths, parentPath, item, itemI
|
|
|
13966
13984
|
}
|
|
13967
13985
|
}
|
|
13968
13986
|
function tree(treeParams, data) {
|
|
13969
|
-
const { reducers } = treeParams;
|
|
13987
|
+
const { reducers, marker } = treeParams;
|
|
13988
|
+
if (marker) {
|
|
13989
|
+
const reducerKeys = Object.keys(reducers ?? {});
|
|
13990
|
+
marker.start({
|
|
13991
|
+
details: reducerKeys.length > 0 ? [
|
|
13992
|
+
{
|
|
13993
|
+
name: "Reducers",
|
|
13994
|
+
value: reducerKeys.join(", ")
|
|
13995
|
+
}
|
|
13996
|
+
] : void 0
|
|
13997
|
+
});
|
|
13998
|
+
}
|
|
13970
13999
|
const initialReducerValue = initReducers(reducers);
|
|
13971
14000
|
const globalReducerResults = deepClone(initialReducerValue);
|
|
13972
14001
|
const deepMap = new DeepMap();
|
|
@@ -14006,15 +14035,22 @@ function tree(treeParams, data) {
|
|
|
14006
14035
|
initialData: data,
|
|
14007
14036
|
reducerResults: globalReducerResults
|
|
14008
14037
|
};
|
|
14038
|
+
if (marker) {
|
|
14039
|
+
marker.end();
|
|
14040
|
+
}
|
|
14009
14041
|
return result;
|
|
14010
14042
|
}
|
|
14011
14043
|
function group(groupParams, data) {
|
|
14012
14044
|
const {
|
|
14045
|
+
marker,
|
|
14013
14046
|
groupBy,
|
|
14014
14047
|
defaultToKey = DEFAULT_TO_KEY,
|
|
14015
14048
|
pivot,
|
|
14016
14049
|
reducers
|
|
14017
14050
|
} = groupParams;
|
|
14051
|
+
if (marker) {
|
|
14052
|
+
marker.start();
|
|
14053
|
+
}
|
|
14018
14054
|
const groupByLength = groupBy.length;
|
|
14019
14055
|
const topLevelPivotColumns = pivot ? new DeepMap() : void 0;
|
|
14020
14056
|
const deepMap = new DeepMap();
|
|
@@ -14144,6 +14180,16 @@ function group(groupParams, data) {
|
|
|
14144
14180
|
result.topLevelPivotColumns = topLevelPivotColumns;
|
|
14145
14181
|
result.pivot = pivot;
|
|
14146
14182
|
}
|
|
14183
|
+
if (marker) {
|
|
14184
|
+
marker.end({
|
|
14185
|
+
details: [
|
|
14186
|
+
{
|
|
14187
|
+
name: "Group by fields",
|
|
14188
|
+
value: groupBy.map((group2) => group2.field).join(", ")
|
|
14189
|
+
}
|
|
14190
|
+
]
|
|
14191
|
+
});
|
|
14192
|
+
}
|
|
14147
14193
|
return result;
|
|
14148
14194
|
}
|
|
14149
14195
|
function flatten(groupResult) {
|
|
@@ -14438,13 +14484,20 @@ function flattenTreeNodes(dataArray, parentPath, parents, indexInParentNodes, pa
|
|
|
14438
14484
|
return result;
|
|
14439
14485
|
}
|
|
14440
14486
|
function enhancedTreeFlatten(param) {
|
|
14441
|
-
const { dataArray } = param;
|
|
14487
|
+
const { dataArray, marker } = param;
|
|
14488
|
+
if (marker) {
|
|
14489
|
+
marker.start();
|
|
14490
|
+
}
|
|
14442
14491
|
const result = [];
|
|
14443
14492
|
flattenTreeNodes(dataArray, [], [], [], param, result);
|
|
14493
|
+
if (marker) {
|
|
14494
|
+
marker.end();
|
|
14495
|
+
}
|
|
14444
14496
|
return { data: result };
|
|
14445
14497
|
}
|
|
14446
14498
|
function enhancedFlatten(param) {
|
|
14447
14499
|
const {
|
|
14500
|
+
marker,
|
|
14448
14501
|
lazyLoad,
|
|
14449
14502
|
groupResult,
|
|
14450
14503
|
rowsPerPage,
|
|
@@ -14460,6 +14513,16 @@ function enhancedFlatten(param) {
|
|
|
14460
14513
|
} = param;
|
|
14461
14514
|
const { groupParams, deepMap, pivot } = groupResult;
|
|
14462
14515
|
const { groupBy } = groupParams;
|
|
14516
|
+
if (marker) {
|
|
14517
|
+
marker.start({
|
|
14518
|
+
details: [
|
|
14519
|
+
{
|
|
14520
|
+
name: "Group by fields",
|
|
14521
|
+
value: groupBy.map((g) => g.field).join(", ")
|
|
14522
|
+
}
|
|
14523
|
+
]
|
|
14524
|
+
});
|
|
14525
|
+
}
|
|
14463
14526
|
const result = [];
|
|
14464
14527
|
const groupRowsIndexes = [];
|
|
14465
14528
|
const parents = [];
|
|
@@ -14629,6 +14692,9 @@ function enhancedFlatten(param) {
|
|
|
14629
14692
|
indexInParentGroups.pop();
|
|
14630
14693
|
}
|
|
14631
14694
|
);
|
|
14695
|
+
if (marker) {
|
|
14696
|
+
marker.end();
|
|
14697
|
+
}
|
|
14632
14698
|
return {
|
|
14633
14699
|
data: result,
|
|
14634
14700
|
groupRowsIndexes
|
|
@@ -14752,10 +14818,21 @@ function toPlainSortInfo(sortInfo) {
|
|
|
14752
14818
|
}
|
|
14753
14819
|
var multisort = (sortInfo, array, options) => {
|
|
14754
14820
|
const get = typeof options === "function" ? options : options?.get;
|
|
14821
|
+
const marker = options && typeof options === "object" ? options.marker : void 0;
|
|
14822
|
+
if (marker) {
|
|
14823
|
+
marker.start();
|
|
14824
|
+
}
|
|
14755
14825
|
array.sort(getMultisortFunction(toPlainSortInfo(sortInfo), get));
|
|
14826
|
+
if (marker) {
|
|
14827
|
+
marker.end();
|
|
14828
|
+
}
|
|
14756
14829
|
return array;
|
|
14757
14830
|
};
|
|
14758
14831
|
var multisortNested = (sortInfo, array, options) => {
|
|
14832
|
+
const { marker } = options;
|
|
14833
|
+
if (marker) {
|
|
14834
|
+
marker.start();
|
|
14835
|
+
}
|
|
14759
14836
|
const sortFn = getMultisortFunction(
|
|
14760
14837
|
toPlainSortInfo(sortInfo),
|
|
14761
14838
|
options.get
|
|
@@ -14805,6 +14882,9 @@ var multisortNested = (sortInfo, array, options) => {
|
|
|
14805
14882
|
array = [...array].sort(sortFn);
|
|
14806
14883
|
}
|
|
14807
14884
|
}
|
|
14885
|
+
if (marker) {
|
|
14886
|
+
marker.end();
|
|
14887
|
+
}
|
|
14808
14888
|
return array;
|
|
14809
14889
|
};
|
|
14810
14890
|
multisort.knownTypes = sortTypes_default;
|
|
@@ -18752,6 +18832,165 @@ function finishRowInfoReducersFor(params) {
|
|
|
18752
18832
|
return results;
|
|
18753
18833
|
}
|
|
18754
18834
|
|
|
18835
|
+
// src/utils/devTools/devToolsTracks.ts
|
|
18836
|
+
var DevToolsTracks = {
|
|
18837
|
+
DataSource: {
|
|
18838
|
+
track: "DataSource",
|
|
18839
|
+
labels: {
|
|
18840
|
+
RemoteDataLoad: "Remote data load",
|
|
18841
|
+
TreeUnfilteredTreePaths: "Computing unfiltered tree paths",
|
|
18842
|
+
Filter: "Filter",
|
|
18843
|
+
Sort: "Sort",
|
|
18844
|
+
Group: "Group",
|
|
18845
|
+
LazyGroup: "Lazy group",
|
|
18846
|
+
Tree: "Tree",
|
|
18847
|
+
FlattenTree: "Flatten tree",
|
|
18848
|
+
Flatten: "Flatten groups",
|
|
18849
|
+
PrepareData: "Preparing data",
|
|
18850
|
+
ComputeSelectionCount: "Computing selection count",
|
|
18851
|
+
ComputeSelectionCountLazy: "Computing selection count (lazy)",
|
|
18852
|
+
PrepareRowInfo: "Preparing row info array"
|
|
18853
|
+
}
|
|
18854
|
+
},
|
|
18855
|
+
InfiniteTable: {
|
|
18856
|
+
track: "InfiniteTable",
|
|
18857
|
+
labels: {
|
|
18858
|
+
Render: "Rendering"
|
|
18859
|
+
}
|
|
18860
|
+
},
|
|
18861
|
+
MatrixBrain: {
|
|
18862
|
+
track: "Layout Computations",
|
|
18863
|
+
labels: {
|
|
18864
|
+
ComputeRenderRange: "Computing render range"
|
|
18865
|
+
}
|
|
18866
|
+
}
|
|
18867
|
+
};
|
|
18868
|
+
|
|
18869
|
+
// src/utils/devTools/index.ts
|
|
18870
|
+
var DevToolsMarker = class _DevToolsMarker {
|
|
18871
|
+
constructor(debugId) {
|
|
18872
|
+
this.debugId = debugId;
|
|
18873
|
+
this.markerDetails = {
|
|
18874
|
+
label: "",
|
|
18875
|
+
track: "",
|
|
18876
|
+
trackGroup: void 0,
|
|
18877
|
+
color: void 0,
|
|
18878
|
+
details: [],
|
|
18879
|
+
tooltip: void 0
|
|
18880
|
+
};
|
|
18881
|
+
this.stopped = false;
|
|
18882
|
+
this.start = (startDetails) => {
|
|
18883
|
+
if (this.markerDetails.startTs) {
|
|
18884
|
+
return this;
|
|
18885
|
+
}
|
|
18886
|
+
const start = performance.now();
|
|
18887
|
+
this.markerDetails.details = startDetails?.details ?? [];
|
|
18888
|
+
this.markerDetails.startTs = start;
|
|
18889
|
+
return this;
|
|
18890
|
+
};
|
|
18891
|
+
this.end = (markerDetails = {}) => {
|
|
18892
|
+
if (this.stopped) {
|
|
18893
|
+
return this;
|
|
18894
|
+
}
|
|
18895
|
+
this.stopped = true;
|
|
18896
|
+
const start = markerDetails.startTs ?? this.markerDetails.startTs;
|
|
18897
|
+
const end = markerDetails.endTs ?? this.markerDetails.endTs ?? performance.now();
|
|
18898
|
+
const color = markerDetails.color || this.markerDetails.color || "primary";
|
|
18899
|
+
const trackGroup = markerDetails.trackGroup || this.markerDetails.trackGroup || `Infinite Table (${this.debugId})`;
|
|
18900
|
+
const details = [
|
|
18901
|
+
...this.markerDetails.details || [],
|
|
18902
|
+
...markerDetails.details || []
|
|
18903
|
+
];
|
|
18904
|
+
const tooltip = markerDetails.tooltip || this.markerDetails.tooltip;
|
|
18905
|
+
const label = markerDetails.label || this.markerDetails.label || "Unknown";
|
|
18906
|
+
const track = markerDetails.track || this.markerDetails.track || "Unknown";
|
|
18907
|
+
performance.measure(label, {
|
|
18908
|
+
start,
|
|
18909
|
+
end,
|
|
18910
|
+
detail: {
|
|
18911
|
+
devtools: {
|
|
18912
|
+
dataType: "track-entry",
|
|
18913
|
+
trackGroup,
|
|
18914
|
+
track,
|
|
18915
|
+
color,
|
|
18916
|
+
properties: details.length > 0 ? details.map((detail) => [detail.name, detail.value]) : void 0,
|
|
18917
|
+
tooltipText: tooltip
|
|
18918
|
+
}
|
|
18919
|
+
}
|
|
18920
|
+
});
|
|
18921
|
+
return this;
|
|
18922
|
+
};
|
|
18923
|
+
this.debugId = debugId;
|
|
18924
|
+
}
|
|
18925
|
+
static create(debugId) {
|
|
18926
|
+
return new _DevToolsMarker(debugId);
|
|
18927
|
+
}
|
|
18928
|
+
get startTimestamp() {
|
|
18929
|
+
return this.markerDetails.startTs;
|
|
18930
|
+
}
|
|
18931
|
+
get track() {
|
|
18932
|
+
const self = this;
|
|
18933
|
+
return Object.keys(DevToolsTracks).reduce(
|
|
18934
|
+
(acc, track) => {
|
|
18935
|
+
const trackObj = {
|
|
18936
|
+
start: self.start,
|
|
18937
|
+
end: (markerDetails) => {
|
|
18938
|
+
return self.end({
|
|
18939
|
+
...markerDetails,
|
|
18940
|
+
track: DevToolsTracks[track].track,
|
|
18941
|
+
label: markerDetails.label
|
|
18942
|
+
});
|
|
18943
|
+
},
|
|
18944
|
+
get label() {
|
|
18945
|
+
const currentTrack = DevToolsTracks[track];
|
|
18946
|
+
return Object.keys(currentTrack.labels).reduce(
|
|
18947
|
+
(labelAcc, label) => {
|
|
18948
|
+
const labelObj = {
|
|
18949
|
+
start: self.start,
|
|
18950
|
+
end: (markerDetails) => {
|
|
18951
|
+
return self.end({
|
|
18952
|
+
...markerDetails,
|
|
18953
|
+
track: currentTrack.track,
|
|
18954
|
+
label: currentTrack.labels[label]
|
|
18955
|
+
});
|
|
18956
|
+
}
|
|
18957
|
+
};
|
|
18958
|
+
Object.defineProperty(labelAcc, label, {
|
|
18959
|
+
get: () => {
|
|
18960
|
+
self.markerDetails.label = currentTrack.labels[label];
|
|
18961
|
+
return labelObj;
|
|
18962
|
+
}
|
|
18963
|
+
});
|
|
18964
|
+
return labelAcc;
|
|
18965
|
+
},
|
|
18966
|
+
{}
|
|
18967
|
+
);
|
|
18968
|
+
}
|
|
18969
|
+
};
|
|
18970
|
+
Object.defineProperty(acc, track, {
|
|
18971
|
+
get: () => {
|
|
18972
|
+
const currentTrack = DevToolsTracks[track];
|
|
18973
|
+
self.markerDetails.track = currentTrack.track;
|
|
18974
|
+
return trackObj;
|
|
18975
|
+
}
|
|
18976
|
+
});
|
|
18977
|
+
return acc;
|
|
18978
|
+
},
|
|
18979
|
+
{}
|
|
18980
|
+
);
|
|
18981
|
+
}
|
|
18982
|
+
};
|
|
18983
|
+
function getMarker(debugId) {
|
|
18984
|
+
return DevToolsMarker.create(debugId);
|
|
18985
|
+
}
|
|
18986
|
+
|
|
18987
|
+
// src/components/InfiniteTable/types/Utility.ts
|
|
18988
|
+
function notNullable(value) {
|
|
18989
|
+
if (value === null || value === void 0) return false;
|
|
18990
|
+
const testDummyForCompileError = value;
|
|
18991
|
+
return true;
|
|
18992
|
+
}
|
|
18993
|
+
|
|
18755
18994
|
// src/components/DataSource/state/reducer.ts
|
|
18756
18995
|
function cleanupEmptyFilterValues(filterValue, filterTypes) {
|
|
18757
18996
|
if (!filterValue) {
|
|
@@ -18882,6 +19121,7 @@ function filterTreeDataSource(params) {
|
|
|
18882
19121
|
function filterDataArray(params) {
|
|
18883
19122
|
const {
|
|
18884
19123
|
filterTypes,
|
|
19124
|
+
marker,
|
|
18885
19125
|
operatorsByFilterType,
|
|
18886
19126
|
filterFunction,
|
|
18887
19127
|
toPrimaryKey,
|
|
@@ -18891,6 +19131,9 @@ function filterDataArray(params) {
|
|
|
18891
19131
|
isLeafNode
|
|
18892
19132
|
} = params;
|
|
18893
19133
|
let { dataArray } = params;
|
|
19134
|
+
marker?.start({
|
|
19135
|
+
details: [{ name: "Count before", value: dataArray.length }]
|
|
19136
|
+
});
|
|
18894
19137
|
if (filterFunction) {
|
|
18895
19138
|
dataArray = dataArray.filter(
|
|
18896
19139
|
(data, index, arr) => filterFunction({
|
|
@@ -18912,7 +19155,7 @@ function filterDataArray(params) {
|
|
|
18912
19155
|
}
|
|
18913
19156
|
const filterValueArray = cleanupEmptyFilterValues(params.filterValue, filterTypes) || [];
|
|
18914
19157
|
if (filterValueArray && filterValueArray.length) {
|
|
18915
|
-
|
|
19158
|
+
const result = dataArray.filter((data, index, arr) => {
|
|
18916
19159
|
const param = {
|
|
18917
19160
|
data,
|
|
18918
19161
|
index,
|
|
@@ -18949,11 +19192,24 @@ function filterDataArray(params) {
|
|
|
18949
19192
|
}
|
|
18950
19193
|
return true;
|
|
18951
19194
|
});
|
|
19195
|
+
marker?.end({
|
|
19196
|
+
details: [{ name: "Count after", value: result.length }]
|
|
19197
|
+
});
|
|
19198
|
+
return result;
|
|
18952
19199
|
}
|
|
19200
|
+
marker?.end({
|
|
19201
|
+
details: [{ name: "Count after", value: dataArray.length }]
|
|
19202
|
+
});
|
|
18953
19203
|
return dataArray;
|
|
18954
19204
|
}
|
|
18955
19205
|
function concludeReducer(params) {
|
|
19206
|
+
let marker;
|
|
18956
19207
|
const { state, previousState } = params;
|
|
19208
|
+
const debugId = state.debugId;
|
|
19209
|
+
let rootMarker;
|
|
19210
|
+
if (debugId) {
|
|
19211
|
+
rootMarker = getMarker(debugId).track.DataSource.label.PrepareData.start();
|
|
19212
|
+
}
|
|
18957
19213
|
const cacheAffectedParts = getCacheAffectedParts(state);
|
|
18958
19214
|
const sortInfo = state.sortInfo;
|
|
18959
19215
|
const sortMode = state.sortMode;
|
|
@@ -19097,6 +19353,9 @@ function concludeReducer(params) {
|
|
|
19097
19353
|
let dataArray = state.originalDataArray;
|
|
19098
19354
|
if (shouldTree && shouldTreeAgain) {
|
|
19099
19355
|
const treeParams = {
|
|
19356
|
+
marker: debugId ? getMarker(
|
|
19357
|
+
debugId
|
|
19358
|
+
).track.DataSource.label.TreeUnfilteredTreePaths.start() : void 0,
|
|
19100
19359
|
isLeafNode,
|
|
19101
19360
|
getNodeChildren,
|
|
19102
19361
|
toKey: toPrimaryKey
|
|
@@ -19114,6 +19373,7 @@ function concludeReducer(params) {
|
|
|
19114
19373
|
filterTimestamp = Date.now();
|
|
19115
19374
|
}
|
|
19116
19375
|
dataArray = filterDataArray({
|
|
19376
|
+
marker: debugId ? getMarker(debugId).track.DataSource.label.Filter.start() : void 0,
|
|
19117
19377
|
// tree-related stuff
|
|
19118
19378
|
getNodeChildren,
|
|
19119
19379
|
isLeafNode,
|
|
@@ -19146,11 +19406,21 @@ function concludeReducer(params) {
|
|
|
19146
19406
|
if (state.devToolsDetected) {
|
|
19147
19407
|
sortTimestamp = Date.now();
|
|
19148
19408
|
}
|
|
19409
|
+
if (debugId) {
|
|
19410
|
+
marker = getMarker(debugId).track.DataSource.label.Sort.start({
|
|
19411
|
+
details: [{ name: "Count", value: dataArray.length }]
|
|
19412
|
+
});
|
|
19413
|
+
}
|
|
19149
19414
|
if (state.sortFunction) {
|
|
19150
19415
|
dataArray = state.sortFunction(sortInfo, [...dataArray]);
|
|
19416
|
+
if (marker) {
|
|
19417
|
+
marker.end();
|
|
19418
|
+
marker = void 0;
|
|
19419
|
+
}
|
|
19151
19420
|
} else {
|
|
19152
19421
|
if (isTree) {
|
|
19153
19422
|
dataArray = multisortNested(sortInfo, dataArray, {
|
|
19423
|
+
marker,
|
|
19154
19424
|
inplace: false,
|
|
19155
19425
|
isLeafNode,
|
|
19156
19426
|
getNodeChildren,
|
|
@@ -19158,9 +19428,13 @@ function concludeReducer(params) {
|
|
|
19158
19428
|
nodesKey
|
|
19159
19429
|
});
|
|
19160
19430
|
} else {
|
|
19161
|
-
dataArray = multisort(sortInfo, [...dataArray]);
|
|
19431
|
+
dataArray = multisort(sortInfo, [...dataArray], { marker });
|
|
19162
19432
|
}
|
|
19163
19433
|
}
|
|
19434
|
+
if (debugId) {
|
|
19435
|
+
marker?.end();
|
|
19436
|
+
marker = void 0;
|
|
19437
|
+
}
|
|
19164
19438
|
if (state.devToolsDetected) {
|
|
19165
19439
|
const sortDuration = Date.now() - sortTimestamp;
|
|
19166
19440
|
state.debugTimings.set("sort", sortDuration);
|
|
@@ -19226,14 +19500,16 @@ function concludeReducer(params) {
|
|
|
19226
19500
|
reducers: aggregationReducers,
|
|
19227
19501
|
indexer: state.indexer,
|
|
19228
19502
|
toPrimaryKey,
|
|
19229
|
-
cache
|
|
19503
|
+
cache,
|
|
19504
|
+
marker: debugId ? getMarker(debugId).track.DataSource.label.LazyGroup.start() : void 0
|
|
19230
19505
|
},
|
|
19231
19506
|
state.originalLazyGroupData
|
|
19232
19507
|
) : group(
|
|
19233
19508
|
{
|
|
19234
19509
|
groupBy,
|
|
19235
19510
|
pivot: pivotBy,
|
|
19236
|
-
reducers: aggregationReducers
|
|
19511
|
+
reducers: aggregationReducers,
|
|
19512
|
+
marker: debugId ? getMarker(debugId).track.DataSource.label.Group.start() : void 0
|
|
19237
19513
|
},
|
|
19238
19514
|
dataArray
|
|
19239
19515
|
);
|
|
@@ -19267,6 +19543,7 @@ function concludeReducer(params) {
|
|
|
19267
19543
|
withRowInfoForCellSelection
|
|
19268
19544
|
) : void 0;
|
|
19269
19545
|
const flattenResult = enhancedFlatten({
|
|
19546
|
+
marker: debugId ? getMarker(debugId).track.DataSource.label.FlattenTree.start() : void 0,
|
|
19270
19547
|
groupResult,
|
|
19271
19548
|
lazyLoad: !!state.lazyLoad,
|
|
19272
19549
|
reducers: aggregationReducers,
|
|
@@ -19313,6 +19590,7 @@ function concludeReducer(params) {
|
|
|
19313
19590
|
}
|
|
19314
19591
|
let aggregationReducers = state.aggregationReducers;
|
|
19315
19592
|
const treeParams = {
|
|
19593
|
+
marker: debugId ? getMarker(debugId).track.DataSource.label.Tree.start() : void 0,
|
|
19316
19594
|
isLeafNode,
|
|
19317
19595
|
getNodeChildren,
|
|
19318
19596
|
toKey: toPrimaryKey,
|
|
@@ -19359,6 +19637,7 @@ function concludeReducer(params) {
|
|
|
19359
19637
|
} : void 0;
|
|
19360
19638
|
const repeatWrappedGroupRows = state.rowsPerPage != null ? state.repeatWrappedGroupRows : false;
|
|
19361
19639
|
const flattenResult = enhancedTreeFlatten({
|
|
19640
|
+
marker: debugId ? getMarker(debugId).track.DataSource.label.FlattenTree.start() : void 0,
|
|
19362
19641
|
treeResult,
|
|
19363
19642
|
treeParams,
|
|
19364
19643
|
dataArray,
|
|
@@ -19435,6 +19714,11 @@ function concludeReducer(params) {
|
|
|
19435
19714
|
state.reducedAt = now;
|
|
19436
19715
|
if (state.selectionMode === "multi-row") {
|
|
19437
19716
|
if (shouldGroup && state.lazyLoad) {
|
|
19717
|
+
if (debugId) {
|
|
19718
|
+
marker = getMarker(
|
|
19719
|
+
debugId
|
|
19720
|
+
).track.DataSource.label.ComputeSelectionCountLazy.start();
|
|
19721
|
+
}
|
|
19438
19722
|
let allRowsSelected = true;
|
|
19439
19723
|
let someRowsSelected = false;
|
|
19440
19724
|
state.dataArray.forEach((rowInfo) => {
|
|
@@ -19453,11 +19737,24 @@ function concludeReducer(params) {
|
|
|
19453
19737
|
});
|
|
19454
19738
|
state.allRowsSelected = allRowsSelected;
|
|
19455
19739
|
state.someRowsSelected = someRowsSelected;
|
|
19740
|
+
if (debugId) {
|
|
19741
|
+
marker?.end();
|
|
19742
|
+
marker = void 0;
|
|
19743
|
+
}
|
|
19456
19744
|
} else {
|
|
19745
|
+
if (debugId) {
|
|
19746
|
+
marker = getMarker(
|
|
19747
|
+
debugId
|
|
19748
|
+
).track.DataSource.label.ComputeSelectionCount.start();
|
|
19749
|
+
}
|
|
19457
19750
|
const dataArrayCount = state.isTree ? state.totalLeafNodesCount : state.filteredCount;
|
|
19458
19751
|
const selectedRowCount = state.isTree ? state.treeSelectionState ? state.treeSelectionState.getSelectedCount() : 0 : state.rowSelection.getSelectedCount();
|
|
19459
19752
|
state.allRowsSelected = dataArrayCount === selectedRowCount;
|
|
19460
19753
|
state.someRowsSelected = selectedRowCount > 0;
|
|
19754
|
+
if (debugId) {
|
|
19755
|
+
marker?.end();
|
|
19756
|
+
marker = void 0;
|
|
19757
|
+
}
|
|
19461
19758
|
}
|
|
19462
19759
|
}
|
|
19463
19760
|
if (false) {
|
|
@@ -19471,6 +19768,33 @@ function concludeReducer(params) {
|
|
|
19471
19768
|
treeMutations: treeMutations?.size ? treeMutations : void 0
|
|
19472
19769
|
};
|
|
19473
19770
|
}
|
|
19771
|
+
if (rootMarker) {
|
|
19772
|
+
rootMarker?.track.DataSource.label.PrepareData.end({
|
|
19773
|
+
details: [
|
|
19774
|
+
shouldFilterAgain || shouldSortAgain || shouldGroupAgain || shouldTreeAgain ? {
|
|
19775
|
+
name: "Performed operations",
|
|
19776
|
+
value: [
|
|
19777
|
+
shouldFilterAgain ? "filter" : null,
|
|
19778
|
+
shouldSortAgain ? "sort" : null,
|
|
19779
|
+
shouldGroupAgain ? "group" : null,
|
|
19780
|
+
shouldTreeAgain ? "tree" : null
|
|
19781
|
+
].filter(notNullable).join(", ")
|
|
19782
|
+
} : null,
|
|
19783
|
+
refetchKeyChanged ? {
|
|
19784
|
+
name: "Refetch key",
|
|
19785
|
+
value: `Old ${previousState.refetchKey} -> New ${state.refetchKey}`
|
|
19786
|
+
} : null,
|
|
19787
|
+
originalDataArrayChanged ? {
|
|
19788
|
+
name: "Original data array changed",
|
|
19789
|
+
value: ``
|
|
19790
|
+
} : null,
|
|
19791
|
+
{
|
|
19792
|
+
name: "Unfiltered data length",
|
|
19793
|
+
value: state.originalDataArray.length
|
|
19794
|
+
}
|
|
19795
|
+
].filter(notNullable)
|
|
19796
|
+
});
|
|
19797
|
+
}
|
|
19474
19798
|
return state;
|
|
19475
19799
|
}
|
|
19476
19800
|
|
|
@@ -20061,6 +20385,12 @@ function useLoadData(options) {
|
|
|
20061
20385
|
}
|
|
20062
20386
|
const componentState2 = getComponentState();
|
|
20063
20387
|
if (typeof componentState2.data === "function") {
|
|
20388
|
+
let marker;
|
|
20389
|
+
if (componentState2.debugId) {
|
|
20390
|
+
marker = getMarker(
|
|
20391
|
+
componentState2.debugId
|
|
20392
|
+
).track.DataSource.label.RemoteDataLoad.start();
|
|
20393
|
+
}
|
|
20064
20394
|
loadData(
|
|
20065
20395
|
componentState2.data,
|
|
20066
20396
|
componentState2,
|
|
@@ -20069,7 +20399,9 @@ function useLoadData(options) {
|
|
|
20069
20399
|
append: appendWhenLivePagination
|
|
20070
20400
|
},
|
|
20071
20401
|
masterContext
|
|
20072
|
-
)
|
|
20402
|
+
).then(() => {
|
|
20403
|
+
marker?.end();
|
|
20404
|
+
});
|
|
20073
20405
|
}
|
|
20074
20406
|
},
|
|
20075
20407
|
{ ...depsObject, data }
|
|
@@ -21372,13 +21704,6 @@ function realignColumnContextMenu(param) {
|
|
|
21372
21704
|
return colId;
|
|
21373
21705
|
}
|
|
21374
21706
|
|
|
21375
|
-
// src/components/InfiniteTable/types/Utility.ts
|
|
21376
|
-
function notNullable(value) {
|
|
21377
|
-
if (value === null || value === void 0) return false;
|
|
21378
|
-
const testDummyForCompileError = value;
|
|
21379
|
-
return true;
|
|
21380
|
-
}
|
|
21381
|
-
|
|
21382
21707
|
// src/components/types/CellPositionByIndex.ts
|
|
21383
21708
|
function ensureMinMaxCellPositionByIndex(start, end) {
|
|
21384
21709
|
let { rowIndex: startRowIndex, colIndex: startColIndex } = start;
|
|
@@ -25363,7 +25688,7 @@ var useLicense = (licenseKey = "") => {
|
|
|
25363
25688
|
}
|
|
25364
25689
|
let valid2 = isValidLicense(licenseKey, {
|
|
25365
25690
|
publishedAt: 1624970570587,
|
|
25366
|
-
version: "7.
|
|
25691
|
+
version: "7.4.1"
|
|
25367
25692
|
});
|
|
25368
25693
|
if (!licenseKey && !valid2 && isInsidePlayground) {
|
|
25369
25694
|
return true;
|