@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.mjs
CHANGED
|
@@ -1055,6 +1055,7 @@ var onLogIntentGlobal = (intentChannel, fn) => {
|
|
|
1055
1055
|
});
|
|
1056
1056
|
};
|
|
1057
1057
|
debug.onLogIntent = onLogIntentGlobal;
|
|
1058
|
+
debug.isChannelEnabled = isChannelEnabled;
|
|
1058
1059
|
debug.destroyAll = () => {
|
|
1059
1060
|
initUsedColors();
|
|
1060
1061
|
initUsedColors(debug.colors);
|
|
@@ -5635,61 +5636,64 @@ var useColumnPointerEvents = ({
|
|
|
5635
5636
|
reorderDragResult = dragger.onMove(e2);
|
|
5636
5637
|
};
|
|
5637
5638
|
const onPointerUp = (e2) => {
|
|
5638
|
-
const
|
|
5639
|
-
|
|
5640
|
-
|
|
5641
|
-
|
|
5642
|
-
|
|
5643
|
-
|
|
5644
|
-
|
|
5645
|
-
|
|
5646
|
-
|
|
5647
|
-
|
|
5648
|
-
|
|
5649
|
-
|
|
5650
|
-
|
|
5651
|
-
|
|
5652
|
-
|
|
5653
|
-
|
|
5654
|
-
|
|
5655
|
-
|
|
5656
|
-
|
|
5657
|
-
|
|
5658
|
-
|
|
5659
|
-
|
|
5639
|
+
const pointerId = e2.pointerId;
|
|
5640
|
+
requestAnimationFrame(() => {
|
|
5641
|
+
const { multiSortBehavior } = getState();
|
|
5642
|
+
const target2 = domRef.current;
|
|
5643
|
+
rootRef.current?.classList.remove(InfiniteClsShiftingColumns);
|
|
5644
|
+
dragger.stop();
|
|
5645
|
+
brain.update({
|
|
5646
|
+
...initialAvailableSize
|
|
5647
|
+
});
|
|
5648
|
+
discardAlwaysRenderedColumn?.();
|
|
5649
|
+
restoreRenderRange?.();
|
|
5650
|
+
computedVisibleColumns.forEach((col) => {
|
|
5651
|
+
clearInfiniteColumnReorderDuration(
|
|
5652
|
+
col.computedVisibleIndex,
|
|
5653
|
+
rootRef.current
|
|
5654
|
+
);
|
|
5655
|
+
setInfiniteColumnVisibility(
|
|
5656
|
+
col.computedVisibleIndex,
|
|
5657
|
+
"",
|
|
5658
|
+
rootRef.current
|
|
5659
|
+
);
|
|
5660
|
+
setInfiniteColumnOffsetWhileReordering(
|
|
5661
|
+
col.computedVisibleIndex,
|
|
5662
|
+
"",
|
|
5663
|
+
rootRef.current
|
|
5664
|
+
);
|
|
5665
|
+
});
|
|
5666
|
+
setInfiniteColumnZIndex(
|
|
5667
|
+
dragColumnIndex,
|
|
5668
|
+
getColumnZIndex(dragColumn, {
|
|
5669
|
+
pinnedStartColsCount: computedPinnedStartColumns.length,
|
|
5670
|
+
visibleColsCount: computedVisibleColumns.length
|
|
5671
|
+
}),
|
|
5660
5672
|
rootRef.current
|
|
5661
5673
|
);
|
|
5662
|
-
|
|
5663
|
-
|
|
5664
|
-
|
|
5665
|
-
|
|
5666
|
-
|
|
5667
|
-
|
|
5668
|
-
|
|
5669
|
-
|
|
5670
|
-
|
|
5671
|
-
|
|
5672
|
-
target2.releasePointerCapture(e2.pointerId);
|
|
5673
|
-
target2.removeEventListener("pointermove", onPointerMove);
|
|
5674
|
-
target2.removeEventListener("pointerup", onPointerUp);
|
|
5675
|
-
setProxyPosition(null);
|
|
5676
|
-
const dragColumnSortable = api.getColumnApi(dragColumn.id)?.isSortable() ?? false;
|
|
5677
|
-
if (!didDragAtLeastOnce && dragColumnSortable) {
|
|
5678
|
-
api.toggleSortingForColumn(dragColumn.id, {
|
|
5679
|
-
multiSortBehavior: multiSortBehavior === "replace" && (e2.ctrlKey || e2.metaKey) ? "append" : multiSortBehavior
|
|
5680
|
-
});
|
|
5681
|
-
}
|
|
5682
|
-
if (reorderDragResult) {
|
|
5683
|
-
persistColumnOrder(reorderDragResult);
|
|
5684
|
-
} else if (didDragAtLeastOnce) {
|
|
5685
|
-
if (allowColumnHideOnDrag) {
|
|
5686
|
-
api.setVisibilityForColumn(dragColumn.id, false);
|
|
5674
|
+
target2.style.cursor = initialCursor;
|
|
5675
|
+
target2.releasePointerCapture(pointerId);
|
|
5676
|
+
target2.removeEventListener("pointermove", onPointerMove);
|
|
5677
|
+
target2.removeEventListener("pointerup", onPointerUp);
|
|
5678
|
+
setProxyPosition(null);
|
|
5679
|
+
const dragColumnSortable = api.getColumnApi(dragColumn.id)?.isSortable() ?? false;
|
|
5680
|
+
if (!didDragAtLeastOnce && dragColumnSortable) {
|
|
5681
|
+
api.toggleSortingForColumn(dragColumn.id, {
|
|
5682
|
+
multiSortBehavior: multiSortBehavior === "replace" && (e2.ctrlKey || e2.metaKey) ? "append" : multiSortBehavior
|
|
5683
|
+
});
|
|
5687
5684
|
}
|
|
5688
|
-
|
|
5689
|
-
|
|
5690
|
-
|
|
5691
|
-
|
|
5692
|
-
|
|
5685
|
+
if (reorderDragResult) {
|
|
5686
|
+
persistColumnOrder(reorderDragResult);
|
|
5687
|
+
} else if (didDragAtLeastOnce) {
|
|
5688
|
+
if (allowColumnHideOnDrag) {
|
|
5689
|
+
api.setVisibilityForColumn(dragColumn.id, false);
|
|
5690
|
+
}
|
|
5691
|
+
}
|
|
5692
|
+
actions.columnReorderDragColumnId = false;
|
|
5693
|
+
if (horizontalLayoutPageIndex != null) {
|
|
5694
|
+
actions.columnReorderInPageIndex = null;
|
|
5695
|
+
}
|
|
5696
|
+
});
|
|
5693
5697
|
};
|
|
5694
5698
|
target.addEventListener("pointermove", onPointerMove);
|
|
5695
5699
|
target.addEventListener("pointerup", onPointerUp);
|
|
@@ -13646,6 +13650,7 @@ function computeReducersFor(data, index, reducers, reducerResults, groupKeys) {
|
|
|
13646
13650
|
}
|
|
13647
13651
|
function lazyGroup(groupParams, rootData) {
|
|
13648
13652
|
const {
|
|
13653
|
+
marker,
|
|
13649
13654
|
reducers = {},
|
|
13650
13655
|
pivot,
|
|
13651
13656
|
groupBy,
|
|
@@ -13654,6 +13659,9 @@ function lazyGroup(groupParams, rootData) {
|
|
|
13654
13659
|
cache,
|
|
13655
13660
|
mappings
|
|
13656
13661
|
} = groupParams;
|
|
13662
|
+
if (marker) {
|
|
13663
|
+
marker.start();
|
|
13664
|
+
}
|
|
13657
13665
|
const deepMap = new DeepMap();
|
|
13658
13666
|
function traverseValues(pivotDeepMap, container, pivot2, pivotIndex = 0, currentPivotKeys2 = []) {
|
|
13659
13667
|
const last = !pivot2.length || pivotIndex === pivot2.length - 1;
|
|
@@ -13785,6 +13793,16 @@ function lazyGroup(groupParams, rootData) {
|
|
|
13785
13793
|
result.topLevelPivotColumns = topLevelPivotColumns;
|
|
13786
13794
|
result.pivot = pivot;
|
|
13787
13795
|
}
|
|
13796
|
+
if (marker) {
|
|
13797
|
+
marker.end({
|
|
13798
|
+
details: [
|
|
13799
|
+
{
|
|
13800
|
+
name: "Group by fields",
|
|
13801
|
+
value: groupBy.map((group2) => group2.field).join(", ")
|
|
13802
|
+
}
|
|
13803
|
+
]
|
|
13804
|
+
});
|
|
13805
|
+
}
|
|
13788
13806
|
return result;
|
|
13789
13807
|
}
|
|
13790
13808
|
function processGroup(deepMap, currentGroupKeys, currentPivotKeys, item, itemIndex, pivot, reducers, topLevelPivotColumns, initialReducerValue, defaultToKey = DEFAULT_TO_KEY) {
|
|
@@ -13906,7 +13924,18 @@ function processTreeNode(treeParams, deepMap, treePaths, parentPath, item, itemI
|
|
|
13906
13924
|
}
|
|
13907
13925
|
}
|
|
13908
13926
|
function tree(treeParams, data) {
|
|
13909
|
-
const { reducers } = treeParams;
|
|
13927
|
+
const { reducers, marker } = treeParams;
|
|
13928
|
+
if (marker) {
|
|
13929
|
+
const reducerKeys = Object.keys(reducers ?? {});
|
|
13930
|
+
marker.start({
|
|
13931
|
+
details: reducerKeys.length > 0 ? [
|
|
13932
|
+
{
|
|
13933
|
+
name: "Reducers",
|
|
13934
|
+
value: reducerKeys.join(", ")
|
|
13935
|
+
}
|
|
13936
|
+
] : void 0
|
|
13937
|
+
});
|
|
13938
|
+
}
|
|
13910
13939
|
const initialReducerValue = initReducers(reducers);
|
|
13911
13940
|
const globalReducerResults = deepClone(initialReducerValue);
|
|
13912
13941
|
const deepMap = new DeepMap();
|
|
@@ -13946,15 +13975,22 @@ function tree(treeParams, data) {
|
|
|
13946
13975
|
initialData: data,
|
|
13947
13976
|
reducerResults: globalReducerResults
|
|
13948
13977
|
};
|
|
13978
|
+
if (marker) {
|
|
13979
|
+
marker.end();
|
|
13980
|
+
}
|
|
13949
13981
|
return result;
|
|
13950
13982
|
}
|
|
13951
13983
|
function group(groupParams, data) {
|
|
13952
13984
|
const {
|
|
13985
|
+
marker,
|
|
13953
13986
|
groupBy,
|
|
13954
13987
|
defaultToKey = DEFAULT_TO_KEY,
|
|
13955
13988
|
pivot,
|
|
13956
13989
|
reducers
|
|
13957
13990
|
} = groupParams;
|
|
13991
|
+
if (marker) {
|
|
13992
|
+
marker.start();
|
|
13993
|
+
}
|
|
13958
13994
|
const groupByLength = groupBy.length;
|
|
13959
13995
|
const topLevelPivotColumns = pivot ? new DeepMap() : void 0;
|
|
13960
13996
|
const deepMap = new DeepMap();
|
|
@@ -14084,6 +14120,16 @@ function group(groupParams, data) {
|
|
|
14084
14120
|
result.topLevelPivotColumns = topLevelPivotColumns;
|
|
14085
14121
|
result.pivot = pivot;
|
|
14086
14122
|
}
|
|
14123
|
+
if (marker) {
|
|
14124
|
+
marker.end({
|
|
14125
|
+
details: [
|
|
14126
|
+
{
|
|
14127
|
+
name: "Group by fields",
|
|
14128
|
+
value: groupBy.map((group2) => group2.field).join(", ")
|
|
14129
|
+
}
|
|
14130
|
+
]
|
|
14131
|
+
});
|
|
14132
|
+
}
|
|
14087
14133
|
return result;
|
|
14088
14134
|
}
|
|
14089
14135
|
function flatten(groupResult) {
|
|
@@ -14378,13 +14424,20 @@ function flattenTreeNodes(dataArray, parentPath, parents, indexInParentNodes, pa
|
|
|
14378
14424
|
return result;
|
|
14379
14425
|
}
|
|
14380
14426
|
function enhancedTreeFlatten(param) {
|
|
14381
|
-
const { dataArray } = param;
|
|
14427
|
+
const { dataArray, marker } = param;
|
|
14428
|
+
if (marker) {
|
|
14429
|
+
marker.start();
|
|
14430
|
+
}
|
|
14382
14431
|
const result = [];
|
|
14383
14432
|
flattenTreeNodes(dataArray, [], [], [], param, result);
|
|
14433
|
+
if (marker) {
|
|
14434
|
+
marker.end();
|
|
14435
|
+
}
|
|
14384
14436
|
return { data: result };
|
|
14385
14437
|
}
|
|
14386
14438
|
function enhancedFlatten(param) {
|
|
14387
14439
|
const {
|
|
14440
|
+
marker,
|
|
14388
14441
|
lazyLoad,
|
|
14389
14442
|
groupResult,
|
|
14390
14443
|
rowsPerPage,
|
|
@@ -14400,6 +14453,16 @@ function enhancedFlatten(param) {
|
|
|
14400
14453
|
} = param;
|
|
14401
14454
|
const { groupParams, deepMap, pivot } = groupResult;
|
|
14402
14455
|
const { groupBy } = groupParams;
|
|
14456
|
+
if (marker) {
|
|
14457
|
+
marker.start({
|
|
14458
|
+
details: [
|
|
14459
|
+
{
|
|
14460
|
+
name: "Group by fields",
|
|
14461
|
+
value: groupBy.map((g) => g.field).join(", ")
|
|
14462
|
+
}
|
|
14463
|
+
]
|
|
14464
|
+
});
|
|
14465
|
+
}
|
|
14403
14466
|
const result = [];
|
|
14404
14467
|
const groupRowsIndexes = [];
|
|
14405
14468
|
const parents = [];
|
|
@@ -14569,6 +14632,9 @@ function enhancedFlatten(param) {
|
|
|
14569
14632
|
indexInParentGroups.pop();
|
|
14570
14633
|
}
|
|
14571
14634
|
);
|
|
14635
|
+
if (marker) {
|
|
14636
|
+
marker.end();
|
|
14637
|
+
}
|
|
14572
14638
|
return {
|
|
14573
14639
|
data: result,
|
|
14574
14640
|
groupRowsIndexes
|
|
@@ -14692,10 +14758,21 @@ function toPlainSortInfo(sortInfo) {
|
|
|
14692
14758
|
}
|
|
14693
14759
|
var multisort = (sortInfo, array, options) => {
|
|
14694
14760
|
const get = typeof options === "function" ? options : options?.get;
|
|
14761
|
+
const marker = options && typeof options === "object" ? options.marker : void 0;
|
|
14762
|
+
if (marker) {
|
|
14763
|
+
marker.start();
|
|
14764
|
+
}
|
|
14695
14765
|
array.sort(getMultisortFunction(toPlainSortInfo(sortInfo), get));
|
|
14766
|
+
if (marker) {
|
|
14767
|
+
marker.end();
|
|
14768
|
+
}
|
|
14696
14769
|
return array;
|
|
14697
14770
|
};
|
|
14698
14771
|
var multisortNested = (sortInfo, array, options) => {
|
|
14772
|
+
const { marker } = options;
|
|
14773
|
+
if (marker) {
|
|
14774
|
+
marker.start();
|
|
14775
|
+
}
|
|
14699
14776
|
const sortFn = getMultisortFunction(
|
|
14700
14777
|
toPlainSortInfo(sortInfo),
|
|
14701
14778
|
options.get
|
|
@@ -14745,6 +14822,9 @@ var multisortNested = (sortInfo, array, options) => {
|
|
|
14745
14822
|
array = [...array].sort(sortFn);
|
|
14746
14823
|
}
|
|
14747
14824
|
}
|
|
14825
|
+
if (marker) {
|
|
14826
|
+
marker.end();
|
|
14827
|
+
}
|
|
14748
14828
|
return array;
|
|
14749
14829
|
};
|
|
14750
14830
|
multisort.knownTypes = sortTypes_default;
|
|
@@ -18692,6 +18772,165 @@ function finishRowInfoReducersFor(params) {
|
|
|
18692
18772
|
return results;
|
|
18693
18773
|
}
|
|
18694
18774
|
|
|
18775
|
+
// src/utils/devTools/devToolsTracks.ts
|
|
18776
|
+
var DevToolsTracks = {
|
|
18777
|
+
DataSource: {
|
|
18778
|
+
track: "DataSource",
|
|
18779
|
+
labels: {
|
|
18780
|
+
RemoteDataLoad: "Remote data load",
|
|
18781
|
+
TreeUnfilteredTreePaths: "Computing unfiltered tree paths",
|
|
18782
|
+
Filter: "Filter",
|
|
18783
|
+
Sort: "Sort",
|
|
18784
|
+
Group: "Group",
|
|
18785
|
+
LazyGroup: "Lazy group",
|
|
18786
|
+
Tree: "Tree",
|
|
18787
|
+
FlattenTree: "Flatten tree",
|
|
18788
|
+
Flatten: "Flatten groups",
|
|
18789
|
+
PrepareData: "Preparing data",
|
|
18790
|
+
ComputeSelectionCount: "Computing selection count",
|
|
18791
|
+
ComputeSelectionCountLazy: "Computing selection count (lazy)",
|
|
18792
|
+
PrepareRowInfo: "Preparing row info array"
|
|
18793
|
+
}
|
|
18794
|
+
},
|
|
18795
|
+
InfiniteTable: {
|
|
18796
|
+
track: "InfiniteTable",
|
|
18797
|
+
labels: {
|
|
18798
|
+
Render: "Rendering"
|
|
18799
|
+
}
|
|
18800
|
+
},
|
|
18801
|
+
MatrixBrain: {
|
|
18802
|
+
track: "Layout Computations",
|
|
18803
|
+
labels: {
|
|
18804
|
+
ComputeRenderRange: "Computing render range"
|
|
18805
|
+
}
|
|
18806
|
+
}
|
|
18807
|
+
};
|
|
18808
|
+
|
|
18809
|
+
// src/utils/devTools/index.ts
|
|
18810
|
+
var DevToolsMarker = class _DevToolsMarker {
|
|
18811
|
+
constructor(debugId) {
|
|
18812
|
+
this.debugId = debugId;
|
|
18813
|
+
this.markerDetails = {
|
|
18814
|
+
label: "",
|
|
18815
|
+
track: "",
|
|
18816
|
+
trackGroup: void 0,
|
|
18817
|
+
color: void 0,
|
|
18818
|
+
details: [],
|
|
18819
|
+
tooltip: void 0
|
|
18820
|
+
};
|
|
18821
|
+
this.stopped = false;
|
|
18822
|
+
this.start = (startDetails) => {
|
|
18823
|
+
if (this.markerDetails.startTs) {
|
|
18824
|
+
return this;
|
|
18825
|
+
}
|
|
18826
|
+
const start = performance.now();
|
|
18827
|
+
this.markerDetails.details = startDetails?.details ?? [];
|
|
18828
|
+
this.markerDetails.startTs = start;
|
|
18829
|
+
return this;
|
|
18830
|
+
};
|
|
18831
|
+
this.end = (markerDetails = {}) => {
|
|
18832
|
+
if (this.stopped) {
|
|
18833
|
+
return this;
|
|
18834
|
+
}
|
|
18835
|
+
this.stopped = true;
|
|
18836
|
+
const start = markerDetails.startTs ?? this.markerDetails.startTs;
|
|
18837
|
+
const end = markerDetails.endTs ?? this.markerDetails.endTs ?? performance.now();
|
|
18838
|
+
const color = markerDetails.color || this.markerDetails.color || "primary";
|
|
18839
|
+
const trackGroup = markerDetails.trackGroup || this.markerDetails.trackGroup || `Infinite Table (${this.debugId})`;
|
|
18840
|
+
const details = [
|
|
18841
|
+
...this.markerDetails.details || [],
|
|
18842
|
+
...markerDetails.details || []
|
|
18843
|
+
];
|
|
18844
|
+
const tooltip = markerDetails.tooltip || this.markerDetails.tooltip;
|
|
18845
|
+
const label = markerDetails.label || this.markerDetails.label || "Unknown";
|
|
18846
|
+
const track = markerDetails.track || this.markerDetails.track || "Unknown";
|
|
18847
|
+
performance.measure(label, {
|
|
18848
|
+
start,
|
|
18849
|
+
end,
|
|
18850
|
+
detail: {
|
|
18851
|
+
devtools: {
|
|
18852
|
+
dataType: "track-entry",
|
|
18853
|
+
trackGroup,
|
|
18854
|
+
track,
|
|
18855
|
+
color,
|
|
18856
|
+
properties: details.length > 0 ? details.map((detail) => [detail.name, detail.value]) : void 0,
|
|
18857
|
+
tooltipText: tooltip
|
|
18858
|
+
}
|
|
18859
|
+
}
|
|
18860
|
+
});
|
|
18861
|
+
return this;
|
|
18862
|
+
};
|
|
18863
|
+
this.debugId = debugId;
|
|
18864
|
+
}
|
|
18865
|
+
static create(debugId) {
|
|
18866
|
+
return new _DevToolsMarker(debugId);
|
|
18867
|
+
}
|
|
18868
|
+
get startTimestamp() {
|
|
18869
|
+
return this.markerDetails.startTs;
|
|
18870
|
+
}
|
|
18871
|
+
get track() {
|
|
18872
|
+
const self = this;
|
|
18873
|
+
return Object.keys(DevToolsTracks).reduce(
|
|
18874
|
+
(acc, track) => {
|
|
18875
|
+
const trackObj = {
|
|
18876
|
+
start: self.start,
|
|
18877
|
+
end: (markerDetails) => {
|
|
18878
|
+
return self.end({
|
|
18879
|
+
...markerDetails,
|
|
18880
|
+
track: DevToolsTracks[track].track,
|
|
18881
|
+
label: markerDetails.label
|
|
18882
|
+
});
|
|
18883
|
+
},
|
|
18884
|
+
get label() {
|
|
18885
|
+
const currentTrack = DevToolsTracks[track];
|
|
18886
|
+
return Object.keys(currentTrack.labels).reduce(
|
|
18887
|
+
(labelAcc, label) => {
|
|
18888
|
+
const labelObj = {
|
|
18889
|
+
start: self.start,
|
|
18890
|
+
end: (markerDetails) => {
|
|
18891
|
+
return self.end({
|
|
18892
|
+
...markerDetails,
|
|
18893
|
+
track: currentTrack.track,
|
|
18894
|
+
label: currentTrack.labels[label]
|
|
18895
|
+
});
|
|
18896
|
+
}
|
|
18897
|
+
};
|
|
18898
|
+
Object.defineProperty(labelAcc, label, {
|
|
18899
|
+
get: () => {
|
|
18900
|
+
self.markerDetails.label = currentTrack.labels[label];
|
|
18901
|
+
return labelObj;
|
|
18902
|
+
}
|
|
18903
|
+
});
|
|
18904
|
+
return labelAcc;
|
|
18905
|
+
},
|
|
18906
|
+
{}
|
|
18907
|
+
);
|
|
18908
|
+
}
|
|
18909
|
+
};
|
|
18910
|
+
Object.defineProperty(acc, track, {
|
|
18911
|
+
get: () => {
|
|
18912
|
+
const currentTrack = DevToolsTracks[track];
|
|
18913
|
+
self.markerDetails.track = currentTrack.track;
|
|
18914
|
+
return trackObj;
|
|
18915
|
+
}
|
|
18916
|
+
});
|
|
18917
|
+
return acc;
|
|
18918
|
+
},
|
|
18919
|
+
{}
|
|
18920
|
+
);
|
|
18921
|
+
}
|
|
18922
|
+
};
|
|
18923
|
+
function getMarker(debugId) {
|
|
18924
|
+
return DevToolsMarker.create(debugId);
|
|
18925
|
+
}
|
|
18926
|
+
|
|
18927
|
+
// src/components/InfiniteTable/types/Utility.ts
|
|
18928
|
+
function notNullable(value) {
|
|
18929
|
+
if (value === null || value === void 0) return false;
|
|
18930
|
+
const testDummyForCompileError = value;
|
|
18931
|
+
return true;
|
|
18932
|
+
}
|
|
18933
|
+
|
|
18695
18934
|
// src/components/DataSource/state/reducer.ts
|
|
18696
18935
|
function cleanupEmptyFilterValues(filterValue, filterTypes) {
|
|
18697
18936
|
if (!filterValue) {
|
|
@@ -18822,6 +19061,7 @@ function filterTreeDataSource(params) {
|
|
|
18822
19061
|
function filterDataArray(params) {
|
|
18823
19062
|
const {
|
|
18824
19063
|
filterTypes,
|
|
19064
|
+
marker,
|
|
18825
19065
|
operatorsByFilterType,
|
|
18826
19066
|
filterFunction,
|
|
18827
19067
|
toPrimaryKey,
|
|
@@ -18831,6 +19071,9 @@ function filterDataArray(params) {
|
|
|
18831
19071
|
isLeafNode
|
|
18832
19072
|
} = params;
|
|
18833
19073
|
let { dataArray } = params;
|
|
19074
|
+
marker?.start({
|
|
19075
|
+
details: [{ name: "Count before", value: dataArray.length }]
|
|
19076
|
+
});
|
|
18834
19077
|
if (filterFunction) {
|
|
18835
19078
|
dataArray = dataArray.filter(
|
|
18836
19079
|
(data, index, arr) => filterFunction({
|
|
@@ -18852,7 +19095,7 @@ function filterDataArray(params) {
|
|
|
18852
19095
|
}
|
|
18853
19096
|
const filterValueArray = cleanupEmptyFilterValues(params.filterValue, filterTypes) || [];
|
|
18854
19097
|
if (filterValueArray && filterValueArray.length) {
|
|
18855
|
-
|
|
19098
|
+
const result = dataArray.filter((data, index, arr) => {
|
|
18856
19099
|
const param = {
|
|
18857
19100
|
data,
|
|
18858
19101
|
index,
|
|
@@ -18889,11 +19132,24 @@ function filterDataArray(params) {
|
|
|
18889
19132
|
}
|
|
18890
19133
|
return true;
|
|
18891
19134
|
});
|
|
19135
|
+
marker?.end({
|
|
19136
|
+
details: [{ name: "Count after", value: result.length }]
|
|
19137
|
+
});
|
|
19138
|
+
return result;
|
|
18892
19139
|
}
|
|
19140
|
+
marker?.end({
|
|
19141
|
+
details: [{ name: "Count after", value: dataArray.length }]
|
|
19142
|
+
});
|
|
18893
19143
|
return dataArray;
|
|
18894
19144
|
}
|
|
18895
19145
|
function concludeReducer(params) {
|
|
19146
|
+
let marker;
|
|
18896
19147
|
const { state, previousState } = params;
|
|
19148
|
+
const debugId = state.debugId;
|
|
19149
|
+
let rootMarker;
|
|
19150
|
+
if (debugId) {
|
|
19151
|
+
rootMarker = getMarker(debugId).track.DataSource.label.PrepareData.start();
|
|
19152
|
+
}
|
|
18897
19153
|
const cacheAffectedParts = getCacheAffectedParts(state);
|
|
18898
19154
|
const sortInfo = state.sortInfo;
|
|
18899
19155
|
const sortMode = state.sortMode;
|
|
@@ -19037,6 +19293,9 @@ function concludeReducer(params) {
|
|
|
19037
19293
|
let dataArray = state.originalDataArray;
|
|
19038
19294
|
if (shouldTree && shouldTreeAgain) {
|
|
19039
19295
|
const treeParams = {
|
|
19296
|
+
marker: debugId ? getMarker(
|
|
19297
|
+
debugId
|
|
19298
|
+
).track.DataSource.label.TreeUnfilteredTreePaths.start() : void 0,
|
|
19040
19299
|
isLeafNode,
|
|
19041
19300
|
getNodeChildren,
|
|
19042
19301
|
toKey: toPrimaryKey
|
|
@@ -19054,6 +19313,7 @@ function concludeReducer(params) {
|
|
|
19054
19313
|
filterTimestamp = Date.now();
|
|
19055
19314
|
}
|
|
19056
19315
|
dataArray = filterDataArray({
|
|
19316
|
+
marker: debugId ? getMarker(debugId).track.DataSource.label.Filter.start() : void 0,
|
|
19057
19317
|
// tree-related stuff
|
|
19058
19318
|
getNodeChildren,
|
|
19059
19319
|
isLeafNode,
|
|
@@ -19086,11 +19346,21 @@ function concludeReducer(params) {
|
|
|
19086
19346
|
if (state.devToolsDetected) {
|
|
19087
19347
|
sortTimestamp = Date.now();
|
|
19088
19348
|
}
|
|
19349
|
+
if (debugId) {
|
|
19350
|
+
marker = getMarker(debugId).track.DataSource.label.Sort.start({
|
|
19351
|
+
details: [{ name: "Count", value: dataArray.length }]
|
|
19352
|
+
});
|
|
19353
|
+
}
|
|
19089
19354
|
if (state.sortFunction) {
|
|
19090
19355
|
dataArray = state.sortFunction(sortInfo, [...dataArray]);
|
|
19356
|
+
if (marker) {
|
|
19357
|
+
marker.end();
|
|
19358
|
+
marker = void 0;
|
|
19359
|
+
}
|
|
19091
19360
|
} else {
|
|
19092
19361
|
if (isTree) {
|
|
19093
19362
|
dataArray = multisortNested(sortInfo, dataArray, {
|
|
19363
|
+
marker,
|
|
19094
19364
|
inplace: false,
|
|
19095
19365
|
isLeafNode,
|
|
19096
19366
|
getNodeChildren,
|
|
@@ -19098,9 +19368,13 @@ function concludeReducer(params) {
|
|
|
19098
19368
|
nodesKey
|
|
19099
19369
|
});
|
|
19100
19370
|
} else {
|
|
19101
|
-
dataArray = multisort(sortInfo, [...dataArray]);
|
|
19371
|
+
dataArray = multisort(sortInfo, [...dataArray], { marker });
|
|
19102
19372
|
}
|
|
19103
19373
|
}
|
|
19374
|
+
if (debugId) {
|
|
19375
|
+
marker?.end();
|
|
19376
|
+
marker = void 0;
|
|
19377
|
+
}
|
|
19104
19378
|
if (state.devToolsDetected) {
|
|
19105
19379
|
const sortDuration = Date.now() - sortTimestamp;
|
|
19106
19380
|
state.debugTimings.set("sort", sortDuration);
|
|
@@ -19166,14 +19440,16 @@ function concludeReducer(params) {
|
|
|
19166
19440
|
reducers: aggregationReducers,
|
|
19167
19441
|
indexer: state.indexer,
|
|
19168
19442
|
toPrimaryKey,
|
|
19169
|
-
cache
|
|
19443
|
+
cache,
|
|
19444
|
+
marker: debugId ? getMarker(debugId).track.DataSource.label.LazyGroup.start() : void 0
|
|
19170
19445
|
},
|
|
19171
19446
|
state.originalLazyGroupData
|
|
19172
19447
|
) : group(
|
|
19173
19448
|
{
|
|
19174
19449
|
groupBy,
|
|
19175
19450
|
pivot: pivotBy,
|
|
19176
|
-
reducers: aggregationReducers
|
|
19451
|
+
reducers: aggregationReducers,
|
|
19452
|
+
marker: debugId ? getMarker(debugId).track.DataSource.label.Group.start() : void 0
|
|
19177
19453
|
},
|
|
19178
19454
|
dataArray
|
|
19179
19455
|
);
|
|
@@ -19207,6 +19483,7 @@ function concludeReducer(params) {
|
|
|
19207
19483
|
withRowInfoForCellSelection
|
|
19208
19484
|
) : void 0;
|
|
19209
19485
|
const flattenResult = enhancedFlatten({
|
|
19486
|
+
marker: debugId ? getMarker(debugId).track.DataSource.label.FlattenTree.start() : void 0,
|
|
19210
19487
|
groupResult,
|
|
19211
19488
|
lazyLoad: !!state.lazyLoad,
|
|
19212
19489
|
reducers: aggregationReducers,
|
|
@@ -19253,6 +19530,7 @@ function concludeReducer(params) {
|
|
|
19253
19530
|
}
|
|
19254
19531
|
let aggregationReducers = state.aggregationReducers;
|
|
19255
19532
|
const treeParams = {
|
|
19533
|
+
marker: debugId ? getMarker(debugId).track.DataSource.label.Tree.start() : void 0,
|
|
19256
19534
|
isLeafNode,
|
|
19257
19535
|
getNodeChildren,
|
|
19258
19536
|
toKey: toPrimaryKey,
|
|
@@ -19299,6 +19577,7 @@ function concludeReducer(params) {
|
|
|
19299
19577
|
} : void 0;
|
|
19300
19578
|
const repeatWrappedGroupRows = state.rowsPerPage != null ? state.repeatWrappedGroupRows : false;
|
|
19301
19579
|
const flattenResult = enhancedTreeFlatten({
|
|
19580
|
+
marker: debugId ? getMarker(debugId).track.DataSource.label.FlattenTree.start() : void 0,
|
|
19302
19581
|
treeResult,
|
|
19303
19582
|
treeParams,
|
|
19304
19583
|
dataArray,
|
|
@@ -19375,6 +19654,11 @@ function concludeReducer(params) {
|
|
|
19375
19654
|
state.reducedAt = now;
|
|
19376
19655
|
if (state.selectionMode === "multi-row") {
|
|
19377
19656
|
if (shouldGroup && state.lazyLoad) {
|
|
19657
|
+
if (debugId) {
|
|
19658
|
+
marker = getMarker(
|
|
19659
|
+
debugId
|
|
19660
|
+
).track.DataSource.label.ComputeSelectionCountLazy.start();
|
|
19661
|
+
}
|
|
19378
19662
|
let allRowsSelected = true;
|
|
19379
19663
|
let someRowsSelected = false;
|
|
19380
19664
|
state.dataArray.forEach((rowInfo) => {
|
|
@@ -19393,11 +19677,24 @@ function concludeReducer(params) {
|
|
|
19393
19677
|
});
|
|
19394
19678
|
state.allRowsSelected = allRowsSelected;
|
|
19395
19679
|
state.someRowsSelected = someRowsSelected;
|
|
19680
|
+
if (debugId) {
|
|
19681
|
+
marker?.end();
|
|
19682
|
+
marker = void 0;
|
|
19683
|
+
}
|
|
19396
19684
|
} else {
|
|
19685
|
+
if (debugId) {
|
|
19686
|
+
marker = getMarker(
|
|
19687
|
+
debugId
|
|
19688
|
+
).track.DataSource.label.ComputeSelectionCount.start();
|
|
19689
|
+
}
|
|
19397
19690
|
const dataArrayCount = state.isTree ? state.totalLeafNodesCount : state.filteredCount;
|
|
19398
19691
|
const selectedRowCount = state.isTree ? state.treeSelectionState ? state.treeSelectionState.getSelectedCount() : 0 : state.rowSelection.getSelectedCount();
|
|
19399
19692
|
state.allRowsSelected = dataArrayCount === selectedRowCount;
|
|
19400
19693
|
state.someRowsSelected = selectedRowCount > 0;
|
|
19694
|
+
if (debugId) {
|
|
19695
|
+
marker?.end();
|
|
19696
|
+
marker = void 0;
|
|
19697
|
+
}
|
|
19401
19698
|
}
|
|
19402
19699
|
}
|
|
19403
19700
|
if (false) {
|
|
@@ -19411,6 +19708,33 @@ function concludeReducer(params) {
|
|
|
19411
19708
|
treeMutations: treeMutations?.size ? treeMutations : void 0
|
|
19412
19709
|
};
|
|
19413
19710
|
}
|
|
19711
|
+
if (rootMarker) {
|
|
19712
|
+
rootMarker?.track.DataSource.label.PrepareData.end({
|
|
19713
|
+
details: [
|
|
19714
|
+
shouldFilterAgain || shouldSortAgain || shouldGroupAgain || shouldTreeAgain ? {
|
|
19715
|
+
name: "Performed operations",
|
|
19716
|
+
value: [
|
|
19717
|
+
shouldFilterAgain ? "filter" : null,
|
|
19718
|
+
shouldSortAgain ? "sort" : null,
|
|
19719
|
+
shouldGroupAgain ? "group" : null,
|
|
19720
|
+
shouldTreeAgain ? "tree" : null
|
|
19721
|
+
].filter(notNullable).join(", ")
|
|
19722
|
+
} : null,
|
|
19723
|
+
refetchKeyChanged ? {
|
|
19724
|
+
name: "Refetch key",
|
|
19725
|
+
value: `Old ${previousState.refetchKey} -> New ${state.refetchKey}`
|
|
19726
|
+
} : null,
|
|
19727
|
+
originalDataArrayChanged ? {
|
|
19728
|
+
name: "Original data array changed",
|
|
19729
|
+
value: ``
|
|
19730
|
+
} : null,
|
|
19731
|
+
{
|
|
19732
|
+
name: "Unfiltered data length",
|
|
19733
|
+
value: state.originalDataArray.length
|
|
19734
|
+
}
|
|
19735
|
+
].filter(notNullable)
|
|
19736
|
+
});
|
|
19737
|
+
}
|
|
19414
19738
|
return state;
|
|
19415
19739
|
}
|
|
19416
19740
|
|
|
@@ -20001,6 +20325,12 @@ function useLoadData(options) {
|
|
|
20001
20325
|
}
|
|
20002
20326
|
const componentState2 = getComponentState();
|
|
20003
20327
|
if (typeof componentState2.data === "function") {
|
|
20328
|
+
let marker;
|
|
20329
|
+
if (componentState2.debugId) {
|
|
20330
|
+
marker = getMarker(
|
|
20331
|
+
componentState2.debugId
|
|
20332
|
+
).track.DataSource.label.RemoteDataLoad.start();
|
|
20333
|
+
}
|
|
20004
20334
|
loadData(
|
|
20005
20335
|
componentState2.data,
|
|
20006
20336
|
componentState2,
|
|
@@ -20009,7 +20339,9 @@ function useLoadData(options) {
|
|
|
20009
20339
|
append: appendWhenLivePagination
|
|
20010
20340
|
},
|
|
20011
20341
|
masterContext
|
|
20012
|
-
)
|
|
20342
|
+
).then(() => {
|
|
20343
|
+
marker?.end();
|
|
20344
|
+
});
|
|
20013
20345
|
}
|
|
20014
20346
|
},
|
|
20015
20347
|
{ ...depsObject, data }
|
|
@@ -21317,13 +21649,6 @@ function realignColumnContextMenu(param) {
|
|
|
21317
21649
|
return colId;
|
|
21318
21650
|
}
|
|
21319
21651
|
|
|
21320
|
-
// src/components/InfiniteTable/types/Utility.ts
|
|
21321
|
-
function notNullable(value) {
|
|
21322
|
-
if (value === null || value === void 0) return false;
|
|
21323
|
-
const testDummyForCompileError = value;
|
|
21324
|
-
return true;
|
|
21325
|
-
}
|
|
21326
|
-
|
|
21327
21652
|
// src/components/types/CellPositionByIndex.ts
|
|
21328
21653
|
function ensureMinMaxCellPositionByIndex(start, end) {
|
|
21329
21654
|
let { rowIndex: startRowIndex, colIndex: startColIndex } = start;
|
|
@@ -25312,7 +25637,7 @@ var useLicense = (licenseKey = "") => {
|
|
|
25312
25637
|
}
|
|
25313
25638
|
let valid2 = isValidLicense(licenseKey, {
|
|
25314
25639
|
publishedAt: 1624970570587,
|
|
25315
|
-
version: "7.
|
|
25640
|
+
version: "7.4.1"
|
|
25316
25641
|
});
|
|
25317
25642
|
if (!licenseKey && !valid2 && isInsidePlayground) {
|
|
25318
25643
|
return true;
|