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