blixify-ui-web 1.3.41 → 1.3.43
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/lib/components/data/columnTypes/lookup.d.ts +7 -0
- package/lib/components/data/columnTypes/lookup.d.ts.map +1 -1
- package/lib/components/data/columnTypes/lookup.js +25 -1
- package/lib/components/data/columnTypes/lookup.js.map +1 -1
- package/lib/components/data/dataTemplate/dataStateModel.d.ts +4 -0
- package/lib/components/data/dataTemplate/dataStateModel.d.ts.map +1 -1
- package/lib/components/data/dataTemplate/dataStateModel.js.map +1 -1
- package/lib/components/data/dataTemplate/index.d.ts.map +1 -1
- package/lib/components/data/dataTemplate/index.js +368 -166
- package/lib/components/data/dataTemplate/index.js.map +1 -1
- package/lib/components/data/dataWrapper/index.d.ts +4 -3
- package/lib/components/data/dataWrapper/index.d.ts.map +1 -1
- package/lib/components/data/dataWrapper/index.js +18 -4
- package/lib/components/data/dataWrapper/index.js.map +1 -1
- package/lib/components/data/listModule.d.ts.map +1 -1
- package/lib/components/data/listModule.js +12 -3
- package/lib/components/data/listModule.js.map +1 -1
- package/lib/components/display/newTable/columnWindow.d.ts +14 -0
- package/lib/components/display/newTable/columnWindow.d.ts.map +1 -1
- package/lib/components/display/newTable/columnWindow.js +28 -2
- package/lib/components/display/newTable/columnWindow.js.map +1 -1
- package/lib/components/display/newTable/index.d.ts.map +1 -1
- package/lib/components/display/newTable/index.js +39 -3
- package/lib/components/display/newTable/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -900,6 +900,8 @@ var NewTable = function (rawProps) {
|
|
|
900
900
|
// as the columns it stands in for
|
|
901
901
|
var columnWidthsMeasuredRef = (0, react_2.useRef)({});
|
|
902
902
|
var columnFrameRef = (0, react_2.useRef)(0);
|
|
903
|
+
// INFO: narrows the drawn columns back to the view once scrolling stops
|
|
904
|
+
var columnSettleRef = (0, react_2.useRef)(null);
|
|
903
905
|
// INFO: set each draw — the scroll listener is set up once and reads these
|
|
904
906
|
var isColumnVirtualRef = (0, react_2.useRef)(false);
|
|
905
907
|
var columnWindowForRef = (0, react_2.useRef)(function () { return null; });
|
|
@@ -979,7 +981,11 @@ var NewTable = function (rawProps) {
|
|
|
979
981
|
// INFO: which unpinned columns a wide table draws, from where its scroller
|
|
980
982
|
// sits. The pinned columns before them may stick over its left edge or
|
|
981
983
|
// scroll away, so the view is widened by their width to cover either case
|
|
982
|
-
|
|
984
|
+
// INFO: while scrolling, the drawn columns only grow to cover the view, so a
|
|
985
|
+
// fast drag never shows a column taken away a moment ago; once scrolling
|
|
986
|
+
// has settled they narrow to the view again and are drawn a last time
|
|
987
|
+
var handleUpdateColumnWindow = function (isSettled) {
|
|
988
|
+
if (isSettled === void 0) { isSettled = false; }
|
|
983
989
|
var table = tableRef.current;
|
|
984
990
|
if (!table || !isColumnVirtualRef.current)
|
|
985
991
|
return;
|
|
@@ -987,15 +993,29 @@ var NewTable = function (rawProps) {
|
|
|
987
993
|
var spacer = table.querySelector('thead th[data-column-spacer="before"]');
|
|
988
994
|
if (!scroller || !spacer)
|
|
989
995
|
return;
|
|
996
|
+
var visibleWidth = scroller.clientWidth + spacer.offsetLeft;
|
|
990
997
|
var next = {
|
|
991
998
|
start: scroller.scrollLeft - spacer.offsetLeft,
|
|
992
|
-
width:
|
|
999
|
+
width: visibleWidth,
|
|
1000
|
+
visibleWidth: visibleWidth,
|
|
993
1001
|
};
|
|
994
1002
|
setColumnView(function (previous) {
|
|
995
1003
|
if (!previous)
|
|
996
1004
|
return next;
|
|
997
1005
|
var drawn = columnWindowForRef.current(previous);
|
|
998
|
-
|
|
1006
|
+
if (isSettled) {
|
|
1007
|
+
var settled = columnWindowForRef.current(next);
|
|
1008
|
+
return drawn &&
|
|
1009
|
+
settled &&
|
|
1010
|
+
drawn.start === settled.start &&
|
|
1011
|
+
drawn.end === settled.end
|
|
1012
|
+
? previous
|
|
1013
|
+
: next;
|
|
1014
|
+
}
|
|
1015
|
+
var margin = (0, columnWindow_1.handleGetColumnOverscan)(visibleWidth) / 3;
|
|
1016
|
+
if (drawn && (0, columnWindow_1.handleIsViewCovered)(drawn, next, margin))
|
|
1017
|
+
return previous;
|
|
1018
|
+
return (0, columnWindow_1.handleMergeColumnViews)(previous, next);
|
|
999
1019
|
});
|
|
1000
1020
|
};
|
|
1001
1021
|
var handleScheduleColumnWindow = function () {
|
|
@@ -1006,6 +1026,16 @@ var NewTable = function (rawProps) {
|
|
|
1006
1026
|
handleUpdateColumnWindow();
|
|
1007
1027
|
});
|
|
1008
1028
|
};
|
|
1029
|
+
var handleScheduleColumnSettle = function () {
|
|
1030
|
+
if (!isColumnVirtualRef.current)
|
|
1031
|
+
return;
|
|
1032
|
+
if (columnSettleRef.current)
|
|
1033
|
+
clearTimeout(columnSettleRef.current);
|
|
1034
|
+
columnSettleRef.current = setTimeout(function () {
|
|
1035
|
+
columnSettleRef.current = null;
|
|
1036
|
+
handleUpdateColumnWindow(true);
|
|
1037
|
+
}, columnWindow_1.COLUMN_VIRTUAL_SETTLE_MS);
|
|
1038
|
+
};
|
|
1009
1039
|
// INFO: after each draw, the drawn rows of large groups are measured, so the
|
|
1010
1040
|
// spacers match them, and the ranges are checked against the new layout
|
|
1011
1041
|
(0, react_2.useLayoutEffect)(function () {
|
|
@@ -1053,6 +1083,7 @@ var NewTable = function (rawProps) {
|
|
|
1053
1083
|
var handleScroll = function () {
|
|
1054
1084
|
handleScheduleVirtualRanges();
|
|
1055
1085
|
handleScheduleColumnWindow();
|
|
1086
|
+
handleScheduleColumnSettle();
|
|
1056
1087
|
};
|
|
1057
1088
|
window.addEventListener("scroll", handleScroll, {
|
|
1058
1089
|
capture: true,
|
|
@@ -1070,6 +1101,9 @@ var NewTable = function (rawProps) {
|
|
|
1070
1101
|
cancelAnimationFrame(virtualFrameRef.current);
|
|
1071
1102
|
if (columnFrameRef.current)
|
|
1072
1103
|
cancelAnimationFrame(columnFrameRef.current);
|
|
1104
|
+
if (columnSettleRef.current)
|
|
1105
|
+
clearTimeout(columnSettleRef.current);
|
|
1106
|
+
columnSettleRef.current = null;
|
|
1073
1107
|
virtualFrameRef.current = 0;
|
|
1074
1108
|
columnFrameRef.current = 0;
|
|
1075
1109
|
};
|
|
@@ -1978,6 +2012,7 @@ var NewTable = function (rawProps) {
|
|
|
1978
2012
|
});
|
|
1979
2013
|
};
|
|
1980
2014
|
var handleGetColumnWindowFor = function (view) {
|
|
2015
|
+
var _a;
|
|
1981
2016
|
if (!isColumnVirtual)
|
|
1982
2017
|
return null;
|
|
1983
2018
|
var editIndex = flatColumns.findIndex(function (col) { return col.key === editDataHeaderKey; }) -
|
|
@@ -1986,6 +2021,7 @@ var NewTable = function (rawProps) {
|
|
|
1986
2021
|
widths: handleGetMiddleWidths(),
|
|
1987
2022
|
viewStart: view.start,
|
|
1988
2023
|
viewWidth: view.width,
|
|
2024
|
+
overscan: (0, columnWindow_1.handleGetColumnOverscan)((_a = view.visibleWidth) !== null && _a !== void 0 ? _a : view.width),
|
|
1989
2025
|
keepIndex: editDataHeaderKey &&
|
|
1990
2026
|
editIndex >= 0 &&
|
|
1991
2027
|
editIndex < middleEnd - middleStart
|