You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1676 lines
58 KiB
1676 lines
58 KiB
"use strict";
|
|
(self["webpackChunk"] = self["webpackChunk"] || []).push([[6790],{
|
|
|
|
/***/ 6790:
|
|
/*!***************************************************************************************!*\
|
|
!*** ./node_modules/_rc-virtual-list@3.19.1@rc-virtual-list/es/index.js + 17 modules ***!
|
|
\***************************************************************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
// EXPORTS
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
Z: function() { return /* binding */ _rc_virtual_list_3_19_1_rc_virtual_list_es; }
|
|
});
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.27.6@@babel/runtime/helpers/esm/extends.js
|
|
var esm_extends = __webpack_require__(14809);
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.27.6@@babel/runtime/helpers/esm/typeof.js
|
|
var esm_typeof = __webpack_require__(93664);
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.27.6@@babel/runtime/helpers/esm/objectSpread2.js
|
|
var objectSpread2 = __webpack_require__(20439);
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.27.6@@babel/runtime/helpers/esm/defineProperty.js
|
|
var defineProperty = __webpack_require__(4635);
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.27.6@@babel/runtime/helpers/esm/slicedToArray.js + 1 modules
|
|
var slicedToArray = __webpack_require__(50298);
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.27.6@@babel/runtime/helpers/esm/objectWithoutProperties.js
|
|
var objectWithoutProperties = __webpack_require__(62646);
|
|
// EXTERNAL MODULE: ./node_modules/_classnames@2.5.1@classnames/index.js
|
|
var _classnames_2_5_1_classnames = __webpack_require__(92310);
|
|
var _classnames_2_5_1_classnames_default = /*#__PURE__*/__webpack_require__.n(_classnames_2_5_1_classnames);
|
|
// EXTERNAL MODULE: ./node_modules/_rc-resize-observer@1.4.3@rc-resize-observer/es/index.js + 4 modules
|
|
var es = __webpack_require__(29301);
|
|
// EXTERNAL MODULE: ./node_modules/_rc-util@5.44.4@rc-util/es/index.js
|
|
var _rc_util_5_44_4_rc_util_es = __webpack_require__(70425);
|
|
// EXTERNAL MODULE: ./node_modules/_rc-util@5.44.4@rc-util/es/hooks/useLayoutEffect.js
|
|
var useLayoutEffect = __webpack_require__(34280);
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
|
|
var _react_17_0_2_react = __webpack_require__(59301);
|
|
// EXTERNAL MODULE: ./node_modules/_react-dom@17.0.2@react-dom/index.js
|
|
var _react_dom_17_0_2_react_dom = __webpack_require__(4676);
|
|
;// CONCATENATED MODULE: ./node_modules/_rc-virtual-list@3.19.1@rc-virtual-list/es/Filler.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
* Fill component to provided the scroll content real height.
|
|
*/
|
|
var Filler = /*#__PURE__*/_react_17_0_2_react.forwardRef(function (_ref, ref) {
|
|
var height = _ref.height,
|
|
offsetY = _ref.offsetY,
|
|
offsetX = _ref.offsetX,
|
|
children = _ref.children,
|
|
prefixCls = _ref.prefixCls,
|
|
onInnerResize = _ref.onInnerResize,
|
|
innerProps = _ref.innerProps,
|
|
rtl = _ref.rtl,
|
|
extra = _ref.extra;
|
|
var outerStyle = {};
|
|
var innerStyle = {
|
|
display: 'flex',
|
|
flexDirection: 'column'
|
|
};
|
|
if (offsetY !== undefined) {
|
|
// Not set `width` since this will break `sticky: right`
|
|
outerStyle = {
|
|
height: height,
|
|
position: 'relative',
|
|
overflow: 'hidden'
|
|
};
|
|
innerStyle = (0,objectSpread2/* default */.Z)((0,objectSpread2/* default */.Z)({}, innerStyle), {}, (0,defineProperty/* default */.Z)((0,defineProperty/* default */.Z)((0,defineProperty/* default */.Z)((0,defineProperty/* default */.Z)((0,defineProperty/* default */.Z)({
|
|
transform: "translateY(".concat(offsetY, "px)")
|
|
}, rtl ? 'marginRight' : 'marginLeft', -offsetX), "position", 'absolute'), "left", 0), "right", 0), "top", 0));
|
|
}
|
|
return /*#__PURE__*/_react_17_0_2_react.createElement("div", {
|
|
style: outerStyle
|
|
}, /*#__PURE__*/_react_17_0_2_react.createElement(es/* default */.Z, {
|
|
onResize: function onResize(_ref2) {
|
|
var offsetHeight = _ref2.offsetHeight;
|
|
if (offsetHeight && onInnerResize) {
|
|
onInnerResize();
|
|
}
|
|
}
|
|
}, /*#__PURE__*/_react_17_0_2_react.createElement("div", (0,esm_extends/* default */.Z)({
|
|
style: innerStyle,
|
|
className: _classnames_2_5_1_classnames_default()((0,defineProperty/* default */.Z)({}, "".concat(prefixCls, "-holder-inner"), prefixCls)),
|
|
ref: ref
|
|
}, innerProps), children, extra)));
|
|
});
|
|
Filler.displayName = 'Filler';
|
|
/* harmony default export */ var es_Filler = (Filler);
|
|
;// CONCATENATED MODULE: ./node_modules/_rc-virtual-list@3.19.1@rc-virtual-list/es/Item.js
|
|
|
|
function Item(_ref) {
|
|
var children = _ref.children,
|
|
setRef = _ref.setRef;
|
|
var refFunc = _react_17_0_2_react.useCallback(function (node) {
|
|
setRef(node);
|
|
}, []);
|
|
return /*#__PURE__*/_react_17_0_2_react.cloneElement(children, {
|
|
ref: refFunc
|
|
});
|
|
}
|
|
;// CONCATENATED MODULE: ./node_modules/_rc-virtual-list@3.19.1@rc-virtual-list/es/hooks/useChildren.js
|
|
|
|
|
|
function useChildren(list, startIndex, endIndex, scrollWidth, offsetX, setNodeRef, renderFunc, _ref) {
|
|
var getKey = _ref.getKey;
|
|
return list.slice(startIndex, endIndex + 1).map(function (item, index) {
|
|
var eleIndex = startIndex + index;
|
|
var node = renderFunc(item, eleIndex, {
|
|
style: {
|
|
width: scrollWidth
|
|
},
|
|
offsetX: offsetX
|
|
});
|
|
var key = getKey(item);
|
|
return /*#__PURE__*/_react_17_0_2_react.createElement(Item, {
|
|
key: key,
|
|
setRef: function setRef(ele) {
|
|
return setNodeRef(item, ele);
|
|
}
|
|
}, node);
|
|
});
|
|
}
|
|
;// CONCATENATED MODULE: ./node_modules/_rc-virtual-list@3.19.1@rc-virtual-list/es/utils/algorithmUtil.js
|
|
/**
|
|
* Get index with specific start index one by one. e.g.
|
|
* min: 3, max: 9, start: 6
|
|
*
|
|
* Return index is:
|
|
* [0]: 6
|
|
* [1]: 7
|
|
* [2]: 5
|
|
* [3]: 8
|
|
* [4]: 4
|
|
* [5]: 9
|
|
* [6]: 3
|
|
*/
|
|
function getIndexByStartLoc(min, max, start, index) {
|
|
var beforeCount = start - min;
|
|
var afterCount = max - start;
|
|
var balanceCount = Math.min(beforeCount, afterCount) * 2;
|
|
|
|
// Balance
|
|
if (index <= balanceCount) {
|
|
var stepIndex = Math.floor(index / 2);
|
|
if (index % 2) {
|
|
return start + stepIndex + 1;
|
|
}
|
|
return start - stepIndex;
|
|
}
|
|
|
|
// One is out of range
|
|
if (beforeCount > afterCount) {
|
|
return start - (index - afterCount);
|
|
}
|
|
return start + (index - beforeCount);
|
|
}
|
|
|
|
/**
|
|
* We assume that 2 list has only 1 item diff and others keeping the order.
|
|
* So we can use dichotomy algorithm to find changed one.
|
|
*/
|
|
function findListDiffIndex(originList, targetList, getKey) {
|
|
var originLen = originList.length;
|
|
var targetLen = targetList.length;
|
|
var shortList;
|
|
var longList;
|
|
if (originLen === 0 && targetLen === 0) {
|
|
return null;
|
|
}
|
|
if (originLen < targetLen) {
|
|
shortList = originList;
|
|
longList = targetList;
|
|
} else {
|
|
shortList = targetList;
|
|
longList = originList;
|
|
}
|
|
var notExistKey = {
|
|
__EMPTY_ITEM__: true
|
|
};
|
|
function getItemKey(item) {
|
|
if (item !== undefined) {
|
|
return getKey(item);
|
|
}
|
|
return notExistKey;
|
|
}
|
|
|
|
// Loop to find diff one
|
|
var diffIndex = null;
|
|
var multiple = Math.abs(originLen - targetLen) !== 1;
|
|
for (var i = 0; i < longList.length; i += 1) {
|
|
var shortKey = getItemKey(shortList[i]);
|
|
var longKey = getItemKey(longList[i]);
|
|
if (shortKey !== longKey) {
|
|
diffIndex = i;
|
|
multiple = multiple || shortKey !== getItemKey(longList[i + 1]);
|
|
break;
|
|
}
|
|
}
|
|
return diffIndex === null ? null : {
|
|
index: diffIndex,
|
|
multiple: multiple
|
|
};
|
|
}
|
|
;// CONCATENATED MODULE: ./node_modules/_rc-virtual-list@3.19.1@rc-virtual-list/es/hooks/useDiffItem.js
|
|
|
|
|
|
|
|
function useDiffItem(data, getKey, onDiff) {
|
|
var _React$useState = _react_17_0_2_react.useState(data),
|
|
_React$useState2 = (0,slicedToArray/* default */.Z)(_React$useState, 2),
|
|
prevData = _React$useState2[0],
|
|
setPrevData = _React$useState2[1];
|
|
var _React$useState3 = _react_17_0_2_react.useState(null),
|
|
_React$useState4 = (0,slicedToArray/* default */.Z)(_React$useState3, 2),
|
|
diffItem = _React$useState4[0],
|
|
setDiffItem = _React$useState4[1];
|
|
_react_17_0_2_react.useEffect(function () {
|
|
var diff = findListDiffIndex(prevData || [], data || [], getKey);
|
|
if ((diff === null || diff === void 0 ? void 0 : diff.index) !== undefined) {
|
|
onDiff === null || onDiff === void 0 || onDiff(diff.index);
|
|
setDiffItem(data[diff.index]);
|
|
}
|
|
setPrevData(data);
|
|
}, [data]);
|
|
return [diffItem];
|
|
}
|
|
// EXTERNAL MODULE: ./node_modules/_rc-util@5.44.4@rc-util/es/raf.js
|
|
var raf = __webpack_require__(16089);
|
|
;// CONCATENATED MODULE: ./node_modules/_rc-virtual-list@3.19.1@rc-virtual-list/es/utils/isFirefox.js
|
|
|
|
var isFF = (typeof navigator === "undefined" ? "undefined" : (0,esm_typeof/* default */.Z)(navigator)) === 'object' && /Firefox/i.test(navigator.userAgent);
|
|
/* harmony default export */ var isFirefox = (isFF);
|
|
;// CONCATENATED MODULE: ./node_modules/_rc-virtual-list@3.19.1@rc-virtual-list/es/hooks/useOriginScroll.js
|
|
|
|
/* harmony default export */ var useOriginScroll = (function (isScrollAtTop, isScrollAtBottom, isScrollAtLeft, isScrollAtRight) {
|
|
// Do lock for a wheel when scrolling
|
|
var lockRef = (0,_react_17_0_2_react.useRef)(false);
|
|
var lockTimeoutRef = (0,_react_17_0_2_react.useRef)(null);
|
|
function lockScroll() {
|
|
clearTimeout(lockTimeoutRef.current);
|
|
lockRef.current = true;
|
|
lockTimeoutRef.current = setTimeout(function () {
|
|
lockRef.current = false;
|
|
}, 50);
|
|
}
|
|
|
|
// Pass to ref since global add is in closure
|
|
var scrollPingRef = (0,_react_17_0_2_react.useRef)({
|
|
top: isScrollAtTop,
|
|
bottom: isScrollAtBottom,
|
|
left: isScrollAtLeft,
|
|
right: isScrollAtRight
|
|
});
|
|
scrollPingRef.current.top = isScrollAtTop;
|
|
scrollPingRef.current.bottom = isScrollAtBottom;
|
|
scrollPingRef.current.left = isScrollAtLeft;
|
|
scrollPingRef.current.right = isScrollAtRight;
|
|
return function (isHorizontal, delta) {
|
|
var smoothOffset = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
var originScroll = isHorizontal ?
|
|
// Pass origin wheel when on the left
|
|
delta < 0 && scrollPingRef.current.left ||
|
|
// Pass origin wheel when on the right
|
|
delta > 0 && scrollPingRef.current.right // Pass origin wheel when on the top
|
|
: delta < 0 && scrollPingRef.current.top ||
|
|
// Pass origin wheel when on the bottom
|
|
delta > 0 && scrollPingRef.current.bottom;
|
|
if (smoothOffset && originScroll) {
|
|
// No need lock anymore when it's smooth offset from touchMove interval
|
|
clearTimeout(lockTimeoutRef.current);
|
|
lockRef.current = false;
|
|
} else if (!originScroll || lockRef.current) {
|
|
lockScroll();
|
|
}
|
|
return !lockRef.current && originScroll;
|
|
};
|
|
});
|
|
;// CONCATENATED MODULE: ./node_modules/_rc-virtual-list@3.19.1@rc-virtual-list/es/hooks/useFrameWheel.js
|
|
|
|
|
|
|
|
|
|
function useFrameWheel(inVirtual, isScrollAtTop, isScrollAtBottom, isScrollAtLeft, isScrollAtRight, horizontalScroll,
|
|
/***
|
|
* Return `true` when you need to prevent default event
|
|
*/
|
|
onWheelDelta) {
|
|
var offsetRef = (0,_react_17_0_2_react.useRef)(0);
|
|
var nextFrameRef = (0,_react_17_0_2_react.useRef)(null);
|
|
|
|
// Firefox patch
|
|
var wheelValueRef = (0,_react_17_0_2_react.useRef)(null);
|
|
var isMouseScrollRef = (0,_react_17_0_2_react.useRef)(false);
|
|
|
|
// Scroll status sync
|
|
var originScroll = useOriginScroll(isScrollAtTop, isScrollAtBottom, isScrollAtLeft, isScrollAtRight);
|
|
function onWheelY(e, deltaY) {
|
|
raf/* default */.Z.cancel(nextFrameRef.current);
|
|
|
|
// Do nothing when scroll at the edge, Skip check when is in scroll
|
|
if (originScroll(false, deltaY)) return;
|
|
|
|
// Skip if nest List has handled this event
|
|
var event = e;
|
|
if (!event._virtualHandled) {
|
|
event._virtualHandled = true;
|
|
} else {
|
|
return;
|
|
}
|
|
offsetRef.current += deltaY;
|
|
wheelValueRef.current = deltaY;
|
|
|
|
// Proxy of scroll events
|
|
if (!isFirefox) {
|
|
event.preventDefault();
|
|
}
|
|
nextFrameRef.current = (0,raf/* default */.Z)(function () {
|
|
// Patch a multiple for Firefox to fix wheel number too small
|
|
// ref: https://github.com/ant-design/ant-design/issues/26372#issuecomment-679460266
|
|
var patchMultiple = isMouseScrollRef.current ? 10 : 1;
|
|
onWheelDelta(offsetRef.current * patchMultiple, false);
|
|
offsetRef.current = 0;
|
|
});
|
|
}
|
|
function onWheelX(event, deltaX) {
|
|
onWheelDelta(deltaX, true);
|
|
if (!isFirefox) {
|
|
event.preventDefault();
|
|
}
|
|
}
|
|
|
|
// Check for which direction does wheel do. `sx` means `shift + wheel`
|
|
var wheelDirectionRef = (0,_react_17_0_2_react.useRef)(null);
|
|
var wheelDirectionCleanRef = (0,_react_17_0_2_react.useRef)(null);
|
|
function onWheel(event) {
|
|
if (!inVirtual) return;
|
|
|
|
// Wait for 2 frame to clean direction
|
|
raf/* default */.Z.cancel(wheelDirectionCleanRef.current);
|
|
wheelDirectionCleanRef.current = (0,raf/* default */.Z)(function () {
|
|
wheelDirectionRef.current = null;
|
|
}, 2);
|
|
var deltaX = event.deltaX,
|
|
deltaY = event.deltaY,
|
|
shiftKey = event.shiftKey;
|
|
var mergedDeltaX = deltaX;
|
|
var mergedDeltaY = deltaY;
|
|
if (wheelDirectionRef.current === 'sx' || !wheelDirectionRef.current && (shiftKey || false) && deltaY && !deltaX) {
|
|
mergedDeltaX = deltaY;
|
|
mergedDeltaY = 0;
|
|
wheelDirectionRef.current = 'sx';
|
|
}
|
|
var absX = Math.abs(mergedDeltaX);
|
|
var absY = Math.abs(mergedDeltaY);
|
|
if (wheelDirectionRef.current === null) {
|
|
wheelDirectionRef.current = horizontalScroll && absX > absY ? 'x' : 'y';
|
|
}
|
|
if (wheelDirectionRef.current === 'y') {
|
|
onWheelY(event, mergedDeltaY);
|
|
} else {
|
|
onWheelX(event, mergedDeltaX);
|
|
}
|
|
}
|
|
|
|
// A patch for firefox
|
|
function onFireFoxScroll(event) {
|
|
if (!inVirtual) return;
|
|
isMouseScrollRef.current = event.detail === wheelValueRef.current;
|
|
}
|
|
return [onWheel, onFireFoxScroll];
|
|
}
|
|
;// CONCATENATED MODULE: ./node_modules/_rc-virtual-list@3.19.1@rc-virtual-list/es/hooks/useGetSize.js
|
|
|
|
|
|
|
|
/**
|
|
* Size info need loop query for the `heights` which will has the perf issue.
|
|
* Let cache result for each render phase.
|
|
*/
|
|
function useGetSize(mergedData, getKey, heights, itemHeight) {
|
|
var _React$useMemo = _react_17_0_2_react.useMemo(function () {
|
|
return [new Map(), []];
|
|
}, [mergedData, heights.id, itemHeight]),
|
|
_React$useMemo2 = (0,slicedToArray/* default */.Z)(_React$useMemo, 2),
|
|
key2Index = _React$useMemo2[0],
|
|
bottomList = _React$useMemo2[1];
|
|
var getSize = function getSize(startKey) {
|
|
var endKey = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : startKey;
|
|
// Get from cache first
|
|
var startIndex = key2Index.get(startKey);
|
|
var endIndex = key2Index.get(endKey);
|
|
|
|
// Loop to fill the cache
|
|
if (startIndex === undefined || endIndex === undefined) {
|
|
var dataLen = mergedData.length;
|
|
for (var i = bottomList.length; i < dataLen; i += 1) {
|
|
var _heights$get;
|
|
var item = mergedData[i];
|
|
var key = getKey(item);
|
|
key2Index.set(key, i);
|
|
var cacheHeight = (_heights$get = heights.get(key)) !== null && _heights$get !== void 0 ? _heights$get : itemHeight;
|
|
bottomList[i] = (bottomList[i - 1] || 0) + cacheHeight;
|
|
if (key === startKey) {
|
|
startIndex = i;
|
|
}
|
|
if (key === endKey) {
|
|
endIndex = i;
|
|
}
|
|
if (startIndex !== undefined && endIndex !== undefined) {
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
return {
|
|
top: bottomList[startIndex - 1] || 0,
|
|
bottom: bottomList[endIndex]
|
|
};
|
|
};
|
|
return getSize;
|
|
}
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.27.6@@babel/runtime/helpers/esm/classCallCheck.js
|
|
var classCallCheck = __webpack_require__(99153);
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.27.6@@babel/runtime/helpers/esm/createClass.js
|
|
var createClass = __webpack_require__(84851);
|
|
;// CONCATENATED MODULE: ./node_modules/_rc-virtual-list@3.19.1@rc-virtual-list/es/utils/CacheMap.js
|
|
|
|
|
|
|
|
// Firefox has low performance of map.
|
|
var CacheMap = /*#__PURE__*/function () {
|
|
function CacheMap() {
|
|
(0,classCallCheck/* default */.Z)(this, CacheMap);
|
|
(0,defineProperty/* default */.Z)(this, "maps", void 0);
|
|
// Used for cache key
|
|
// `useMemo` no need to update if `id` not change
|
|
(0,defineProperty/* default */.Z)(this, "id", 0);
|
|
(0,defineProperty/* default */.Z)(this, "diffRecords", new Map());
|
|
this.maps = Object.create(null);
|
|
}
|
|
(0,createClass/* default */.Z)(CacheMap, [{
|
|
key: "set",
|
|
value: function set(key, value) {
|
|
// Record prev value
|
|
this.diffRecords.set(key, this.maps[key]);
|
|
this.maps[key] = value;
|
|
this.id += 1;
|
|
}
|
|
}, {
|
|
key: "get",
|
|
value: function get(key) {
|
|
return this.maps[key];
|
|
}
|
|
|
|
/**
|
|
* CacheMap will record the key changed.
|
|
* To help to know what's update in the next render.
|
|
*/
|
|
}, {
|
|
key: "resetRecord",
|
|
value: function resetRecord() {
|
|
this.diffRecords.clear();
|
|
}
|
|
}, {
|
|
key: "getRecord",
|
|
value: function getRecord() {
|
|
return this.diffRecords;
|
|
}
|
|
}]);
|
|
return CacheMap;
|
|
}();
|
|
/* harmony default export */ var utils_CacheMap = (CacheMap);
|
|
;// CONCATENATED MODULE: ./node_modules/_rc-virtual-list@3.19.1@rc-virtual-list/es/hooks/useHeights.js
|
|
|
|
|
|
|
|
|
|
function parseNumber(value) {
|
|
var num = parseFloat(value);
|
|
return isNaN(num) ? 0 : num;
|
|
}
|
|
function useHeights(getKey, onItemAdd, onItemRemove) {
|
|
var _React$useState = _react_17_0_2_react.useState(0),
|
|
_React$useState2 = (0,slicedToArray/* default */.Z)(_React$useState, 2),
|
|
updatedMark = _React$useState2[0],
|
|
setUpdatedMark = _React$useState2[1];
|
|
var instanceRef = (0,_react_17_0_2_react.useRef)(new Map());
|
|
var heightsRef = (0,_react_17_0_2_react.useRef)(new utils_CacheMap());
|
|
var promiseIdRef = (0,_react_17_0_2_react.useRef)(0);
|
|
function cancelRaf() {
|
|
promiseIdRef.current += 1;
|
|
}
|
|
function collectHeight() {
|
|
var sync = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
cancelRaf();
|
|
var doCollect = function doCollect() {
|
|
var changed = false;
|
|
instanceRef.current.forEach(function (element, key) {
|
|
if (element && element.offsetParent) {
|
|
var offsetHeight = element.offsetHeight;
|
|
var _getComputedStyle = getComputedStyle(element),
|
|
marginTop = _getComputedStyle.marginTop,
|
|
marginBottom = _getComputedStyle.marginBottom;
|
|
var marginTopNum = parseNumber(marginTop);
|
|
var marginBottomNum = parseNumber(marginBottom);
|
|
var totalHeight = offsetHeight + marginTopNum + marginBottomNum;
|
|
if (heightsRef.current.get(key) !== totalHeight) {
|
|
heightsRef.current.set(key, totalHeight);
|
|
changed = true;
|
|
}
|
|
}
|
|
});
|
|
|
|
// Always trigger update mark to tell parent that should re-calculate heights when resized
|
|
if (changed) {
|
|
setUpdatedMark(function (c) {
|
|
return c + 1;
|
|
});
|
|
}
|
|
};
|
|
if (sync) {
|
|
doCollect();
|
|
} else {
|
|
promiseIdRef.current += 1;
|
|
var id = promiseIdRef.current;
|
|
Promise.resolve().then(function () {
|
|
if (id === promiseIdRef.current) {
|
|
doCollect();
|
|
}
|
|
});
|
|
}
|
|
}
|
|
function setInstanceRef(item, instance) {
|
|
var key = getKey(item);
|
|
var origin = instanceRef.current.get(key);
|
|
if (instance) {
|
|
instanceRef.current.set(key, instance);
|
|
collectHeight();
|
|
} else {
|
|
instanceRef.current.delete(key);
|
|
}
|
|
|
|
// Instance changed
|
|
if (!origin !== !instance) {
|
|
if (instance) {
|
|
onItemAdd === null || onItemAdd === void 0 || onItemAdd(item);
|
|
} else {
|
|
onItemRemove === null || onItemRemove === void 0 || onItemRemove(item);
|
|
}
|
|
}
|
|
}
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
return cancelRaf;
|
|
}, []);
|
|
return [setInstanceRef, collectHeight, heightsRef.current, updatedMark];
|
|
}
|
|
;// CONCATENATED MODULE: ./node_modules/_rc-virtual-list@3.19.1@rc-virtual-list/es/hooks/useMobileTouchMove.js
|
|
|
|
|
|
var SMOOTH_PTG = 14 / 15;
|
|
function useMobileTouchMove(inVirtual, listRef, callback) {
|
|
var touchedRef = (0,_react_17_0_2_react.useRef)(false);
|
|
var touchXRef = (0,_react_17_0_2_react.useRef)(0);
|
|
var touchYRef = (0,_react_17_0_2_react.useRef)(0);
|
|
var elementRef = (0,_react_17_0_2_react.useRef)(null);
|
|
|
|
// Smooth scroll
|
|
var intervalRef = (0,_react_17_0_2_react.useRef)(null);
|
|
|
|
/* eslint-disable prefer-const */
|
|
var cleanUpEvents;
|
|
var onTouchMove = function onTouchMove(e) {
|
|
if (touchedRef.current) {
|
|
var currentX = Math.ceil(e.touches[0].pageX);
|
|
var currentY = Math.ceil(e.touches[0].pageY);
|
|
var offsetX = touchXRef.current - currentX;
|
|
var offsetY = touchYRef.current - currentY;
|
|
var _isHorizontal = Math.abs(offsetX) > Math.abs(offsetY);
|
|
if (_isHorizontal) {
|
|
touchXRef.current = currentX;
|
|
} else {
|
|
touchYRef.current = currentY;
|
|
}
|
|
var scrollHandled = callback(_isHorizontal, _isHorizontal ? offsetX : offsetY, false, e);
|
|
if (scrollHandled) {
|
|
e.preventDefault();
|
|
}
|
|
|
|
// Smooth interval
|
|
clearInterval(intervalRef.current);
|
|
if (scrollHandled) {
|
|
intervalRef.current = setInterval(function () {
|
|
if (_isHorizontal) {
|
|
offsetX *= SMOOTH_PTG;
|
|
} else {
|
|
offsetY *= SMOOTH_PTG;
|
|
}
|
|
var offset = Math.floor(_isHorizontal ? offsetX : offsetY);
|
|
if (!callback(_isHorizontal, offset, true) || Math.abs(offset) <= 0.1) {
|
|
clearInterval(intervalRef.current);
|
|
}
|
|
}, 16);
|
|
}
|
|
}
|
|
};
|
|
var onTouchEnd = function onTouchEnd() {
|
|
touchedRef.current = false;
|
|
cleanUpEvents();
|
|
};
|
|
var onTouchStart = function onTouchStart(e) {
|
|
cleanUpEvents();
|
|
if (e.touches.length === 1 && !touchedRef.current) {
|
|
touchedRef.current = true;
|
|
touchXRef.current = Math.ceil(e.touches[0].pageX);
|
|
touchYRef.current = Math.ceil(e.touches[0].pageY);
|
|
elementRef.current = e.target;
|
|
elementRef.current.addEventListener('touchmove', onTouchMove, {
|
|
passive: false
|
|
});
|
|
elementRef.current.addEventListener('touchend', onTouchEnd, {
|
|
passive: true
|
|
});
|
|
}
|
|
};
|
|
cleanUpEvents = function cleanUpEvents() {
|
|
if (elementRef.current) {
|
|
elementRef.current.removeEventListener('touchmove', onTouchMove);
|
|
elementRef.current.removeEventListener('touchend', onTouchEnd);
|
|
}
|
|
};
|
|
(0,useLayoutEffect/* default */.Z)(function () {
|
|
if (inVirtual) {
|
|
listRef.current.addEventListener('touchstart', onTouchStart, {
|
|
passive: true
|
|
});
|
|
}
|
|
return function () {
|
|
var _listRef$current;
|
|
(_listRef$current = listRef.current) === null || _listRef$current === void 0 || _listRef$current.removeEventListener('touchstart', onTouchStart);
|
|
cleanUpEvents();
|
|
clearInterval(intervalRef.current);
|
|
};
|
|
}, [inVirtual]);
|
|
}
|
|
;// CONCATENATED MODULE: ./node_modules/_rc-virtual-list@3.19.1@rc-virtual-list/es/hooks/useScrollDrag.js
|
|
|
|
|
|
function smoothScrollOffset(offset) {
|
|
return Math.floor(Math.pow(offset, 0.5));
|
|
}
|
|
function getPageXY(e, horizontal) {
|
|
var obj = 'touches' in e ? e.touches[0] : e;
|
|
return obj[horizontal ? 'pageX' : 'pageY'] - window[horizontal ? 'scrollX' : 'scrollY'];
|
|
}
|
|
function useScrollDrag(inVirtual, componentRef, onScrollOffset) {
|
|
_react_17_0_2_react.useEffect(function () {
|
|
var ele = componentRef.current;
|
|
if (inVirtual && ele) {
|
|
var mouseDownLock = false;
|
|
var rafId;
|
|
var _offset;
|
|
var stopScroll = function stopScroll() {
|
|
raf/* default */.Z.cancel(rafId);
|
|
};
|
|
var continueScroll = function continueScroll() {
|
|
stopScroll();
|
|
rafId = (0,raf/* default */.Z)(function () {
|
|
onScrollOffset(_offset);
|
|
continueScroll();
|
|
});
|
|
};
|
|
var onMouseDown = function onMouseDown(e) {
|
|
// Skip if element set draggable
|
|
if (e.target.draggable || e.button !== 0) {
|
|
return;
|
|
}
|
|
// Skip if nest List has handled this event
|
|
var event = e;
|
|
if (!event._virtualHandled) {
|
|
event._virtualHandled = true;
|
|
mouseDownLock = true;
|
|
}
|
|
};
|
|
var onMouseUp = function onMouseUp() {
|
|
mouseDownLock = false;
|
|
stopScroll();
|
|
};
|
|
var onMouseMove = function onMouseMove(e) {
|
|
if (mouseDownLock) {
|
|
var mouseY = getPageXY(e, false);
|
|
var _ele$getBoundingClien = ele.getBoundingClientRect(),
|
|
top = _ele$getBoundingClien.top,
|
|
bottom = _ele$getBoundingClien.bottom;
|
|
if (mouseY <= top) {
|
|
var diff = top - mouseY;
|
|
_offset = -smoothScrollOffset(diff);
|
|
continueScroll();
|
|
} else if (mouseY >= bottom) {
|
|
var _diff = mouseY - bottom;
|
|
_offset = smoothScrollOffset(_diff);
|
|
continueScroll();
|
|
} else {
|
|
stopScroll();
|
|
}
|
|
}
|
|
};
|
|
ele.addEventListener('mousedown', onMouseDown);
|
|
ele.ownerDocument.addEventListener('mouseup', onMouseUp);
|
|
ele.ownerDocument.addEventListener('mousemove', onMouseMove);
|
|
return function () {
|
|
ele.removeEventListener('mousedown', onMouseDown);
|
|
ele.ownerDocument.removeEventListener('mouseup', onMouseUp);
|
|
ele.ownerDocument.removeEventListener('mousemove', onMouseMove);
|
|
stopScroll();
|
|
};
|
|
}
|
|
}, [inVirtual]);
|
|
}
|
|
;// CONCATENATED MODULE: ./node_modules/_rc-virtual-list@3.19.1@rc-virtual-list/es/hooks/useScrollTo.js
|
|
|
|
|
|
|
|
/* eslint-disable no-param-reassign */
|
|
|
|
|
|
|
|
|
|
var MAX_TIMES = 10;
|
|
function useScrollTo(containerRef, data, heights, itemHeight, getKey, collectHeight, syncScrollTop, triggerFlash) {
|
|
var scrollRef = _react_17_0_2_react.useRef();
|
|
var _React$useState = _react_17_0_2_react.useState(null),
|
|
_React$useState2 = (0,slicedToArray/* default */.Z)(_React$useState, 2),
|
|
syncState = _React$useState2[0],
|
|
setSyncState = _React$useState2[1];
|
|
|
|
// ========================== Sync Scroll ==========================
|
|
(0,useLayoutEffect/* default */.Z)(function () {
|
|
if (syncState && syncState.times < MAX_TIMES) {
|
|
// Never reach
|
|
if (!containerRef.current) {
|
|
setSyncState(function (ori) {
|
|
return (0,objectSpread2/* default */.Z)({}, ori);
|
|
});
|
|
return;
|
|
}
|
|
collectHeight();
|
|
var targetAlign = syncState.targetAlign,
|
|
originAlign = syncState.originAlign,
|
|
index = syncState.index,
|
|
offset = syncState.offset;
|
|
var height = containerRef.current.clientHeight;
|
|
var needCollectHeight = false;
|
|
var newTargetAlign = targetAlign;
|
|
var targetTop = null;
|
|
|
|
// Go to next frame if height not exist
|
|
if (height) {
|
|
var mergedAlign = targetAlign || originAlign;
|
|
|
|
// Get top & bottom
|
|
var stackTop = 0;
|
|
var itemTop = 0;
|
|
var itemBottom = 0;
|
|
var maxLen = Math.min(data.length - 1, index);
|
|
for (var i = 0; i <= maxLen; i += 1) {
|
|
var key = getKey(data[i]);
|
|
itemTop = stackTop;
|
|
var cacheHeight = heights.get(key);
|
|
itemBottom = itemTop + (cacheHeight === undefined ? itemHeight : cacheHeight);
|
|
stackTop = itemBottom;
|
|
}
|
|
|
|
// Check if need sync height (visible range has item not record height)
|
|
var leftHeight = mergedAlign === 'top' ? offset : height - offset;
|
|
for (var _i = maxLen; _i >= 0; _i -= 1) {
|
|
var _key = getKey(data[_i]);
|
|
var _cacheHeight = heights.get(_key);
|
|
if (_cacheHeight === undefined) {
|
|
needCollectHeight = true;
|
|
break;
|
|
}
|
|
leftHeight -= _cacheHeight;
|
|
if (leftHeight <= 0) {
|
|
break;
|
|
}
|
|
}
|
|
|
|
// Scroll to
|
|
switch (mergedAlign) {
|
|
case 'top':
|
|
targetTop = itemTop - offset;
|
|
break;
|
|
case 'bottom':
|
|
targetTop = itemBottom - height + offset;
|
|
break;
|
|
default:
|
|
{
|
|
var scrollTop = containerRef.current.scrollTop;
|
|
var scrollBottom = scrollTop + height;
|
|
if (itemTop < scrollTop) {
|
|
newTargetAlign = 'top';
|
|
} else if (itemBottom > scrollBottom) {
|
|
newTargetAlign = 'bottom';
|
|
}
|
|
}
|
|
}
|
|
if (targetTop !== null) {
|
|
syncScrollTop(targetTop);
|
|
}
|
|
|
|
// One more time for sync
|
|
if (targetTop !== syncState.lastTop) {
|
|
needCollectHeight = true;
|
|
}
|
|
}
|
|
|
|
// Trigger next effect
|
|
if (needCollectHeight) {
|
|
setSyncState((0,objectSpread2/* default */.Z)((0,objectSpread2/* default */.Z)({}, syncState), {}, {
|
|
times: syncState.times + 1,
|
|
targetAlign: newTargetAlign,
|
|
lastTop: targetTop
|
|
}));
|
|
}
|
|
} else if (false) {}
|
|
}, [syncState, containerRef.current]);
|
|
|
|
// =========================== Scroll To ===========================
|
|
return function (arg) {
|
|
// When not argument provided, we think dev may want to show the scrollbar
|
|
if (arg === null || arg === undefined) {
|
|
triggerFlash();
|
|
return;
|
|
}
|
|
|
|
// Normal scroll logic
|
|
raf/* default */.Z.cancel(scrollRef.current);
|
|
if (typeof arg === 'number') {
|
|
syncScrollTop(arg);
|
|
} else if (arg && (0,esm_typeof/* default */.Z)(arg) === 'object') {
|
|
var index;
|
|
var align = arg.align;
|
|
if ('index' in arg) {
|
|
index = arg.index;
|
|
} else {
|
|
index = data.findIndex(function (item) {
|
|
return getKey(item) === arg.key;
|
|
});
|
|
}
|
|
var _arg$offset = arg.offset,
|
|
offset = _arg$offset === void 0 ? 0 : _arg$offset;
|
|
setSyncState({
|
|
times: 0,
|
|
index: index,
|
|
offset: offset,
|
|
originAlign: align
|
|
});
|
|
}
|
|
};
|
|
}
|
|
;// CONCATENATED MODULE: ./node_modules/_rc-virtual-list@3.19.1@rc-virtual-list/es/ScrollBar.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var ScrollBar = /*#__PURE__*/_react_17_0_2_react.forwardRef(function (props, ref) {
|
|
var prefixCls = props.prefixCls,
|
|
rtl = props.rtl,
|
|
scrollOffset = props.scrollOffset,
|
|
scrollRange = props.scrollRange,
|
|
onStartMove = props.onStartMove,
|
|
onStopMove = props.onStopMove,
|
|
onScroll = props.onScroll,
|
|
horizontal = props.horizontal,
|
|
spinSize = props.spinSize,
|
|
containerSize = props.containerSize,
|
|
style = props.style,
|
|
propsThumbStyle = props.thumbStyle,
|
|
showScrollBar = props.showScrollBar;
|
|
var _React$useState = _react_17_0_2_react.useState(false),
|
|
_React$useState2 = (0,slicedToArray/* default */.Z)(_React$useState, 2),
|
|
dragging = _React$useState2[0],
|
|
setDragging = _React$useState2[1];
|
|
var _React$useState3 = _react_17_0_2_react.useState(null),
|
|
_React$useState4 = (0,slicedToArray/* default */.Z)(_React$useState3, 2),
|
|
pageXY = _React$useState4[0],
|
|
setPageXY = _React$useState4[1];
|
|
var _React$useState5 = _react_17_0_2_react.useState(null),
|
|
_React$useState6 = (0,slicedToArray/* default */.Z)(_React$useState5, 2),
|
|
startTop = _React$useState6[0],
|
|
setStartTop = _React$useState6[1];
|
|
var isLTR = !rtl;
|
|
|
|
// ========================= Refs =========================
|
|
var scrollbarRef = _react_17_0_2_react.useRef();
|
|
var thumbRef = _react_17_0_2_react.useRef();
|
|
|
|
// ======================= Visible ========================
|
|
var _React$useState7 = _react_17_0_2_react.useState(showScrollBar),
|
|
_React$useState8 = (0,slicedToArray/* default */.Z)(_React$useState7, 2),
|
|
visible = _React$useState8[0],
|
|
setVisible = _React$useState8[1];
|
|
var visibleTimeoutRef = _react_17_0_2_react.useRef();
|
|
var delayHidden = function delayHidden() {
|
|
if (showScrollBar === true || showScrollBar === false) return;
|
|
clearTimeout(visibleTimeoutRef.current);
|
|
setVisible(true);
|
|
visibleTimeoutRef.current = setTimeout(function () {
|
|
setVisible(false);
|
|
}, 3000);
|
|
};
|
|
|
|
// ======================== Range =========================
|
|
var enableScrollRange = scrollRange - containerSize || 0;
|
|
var enableOffsetRange = containerSize - spinSize || 0;
|
|
|
|
// ========================= Top ==========================
|
|
var top = _react_17_0_2_react.useMemo(function () {
|
|
if (scrollOffset === 0 || enableScrollRange === 0) {
|
|
return 0;
|
|
}
|
|
var ptg = scrollOffset / enableScrollRange;
|
|
return ptg * enableOffsetRange;
|
|
}, [scrollOffset, enableScrollRange, enableOffsetRange]);
|
|
|
|
// ====================== Container =======================
|
|
var onContainerMouseDown = function onContainerMouseDown(e) {
|
|
e.stopPropagation();
|
|
e.preventDefault();
|
|
};
|
|
|
|
// ======================== Thumb =========================
|
|
var stateRef = _react_17_0_2_react.useRef({
|
|
top: top,
|
|
dragging: dragging,
|
|
pageY: pageXY,
|
|
startTop: startTop
|
|
});
|
|
stateRef.current = {
|
|
top: top,
|
|
dragging: dragging,
|
|
pageY: pageXY,
|
|
startTop: startTop
|
|
};
|
|
var onThumbMouseDown = function onThumbMouseDown(e) {
|
|
setDragging(true);
|
|
setPageXY(getPageXY(e, horizontal));
|
|
setStartTop(stateRef.current.top);
|
|
onStartMove();
|
|
e.stopPropagation();
|
|
e.preventDefault();
|
|
};
|
|
|
|
// ======================== Effect ========================
|
|
|
|
// React make event as passive, but we need to preventDefault
|
|
// Add event on dom directly instead.
|
|
// ref: https://github.com/facebook/react/issues/9809
|
|
_react_17_0_2_react.useEffect(function () {
|
|
var onScrollbarTouchStart = function onScrollbarTouchStart(e) {
|
|
e.preventDefault();
|
|
};
|
|
var scrollbarEle = scrollbarRef.current;
|
|
var thumbEle = thumbRef.current;
|
|
scrollbarEle.addEventListener('touchstart', onScrollbarTouchStart, {
|
|
passive: false
|
|
});
|
|
thumbEle.addEventListener('touchstart', onThumbMouseDown, {
|
|
passive: false
|
|
});
|
|
return function () {
|
|
scrollbarEle.removeEventListener('touchstart', onScrollbarTouchStart);
|
|
thumbEle.removeEventListener('touchstart', onThumbMouseDown);
|
|
};
|
|
}, []);
|
|
|
|
// Pass to effect
|
|
var enableScrollRangeRef = _react_17_0_2_react.useRef();
|
|
enableScrollRangeRef.current = enableScrollRange;
|
|
var enableOffsetRangeRef = _react_17_0_2_react.useRef();
|
|
enableOffsetRangeRef.current = enableOffsetRange;
|
|
_react_17_0_2_react.useEffect(function () {
|
|
if (dragging) {
|
|
var moveRafId;
|
|
var onMouseMove = function onMouseMove(e) {
|
|
var _stateRef$current = stateRef.current,
|
|
stateDragging = _stateRef$current.dragging,
|
|
statePageY = _stateRef$current.pageY,
|
|
stateStartTop = _stateRef$current.startTop;
|
|
raf/* default */.Z.cancel(moveRafId);
|
|
var rect = scrollbarRef.current.getBoundingClientRect();
|
|
var scale = containerSize / (horizontal ? rect.width : rect.height);
|
|
if (stateDragging) {
|
|
var offset = (getPageXY(e, horizontal) - statePageY) * scale;
|
|
var newTop = stateStartTop;
|
|
if (!isLTR && horizontal) {
|
|
newTop -= offset;
|
|
} else {
|
|
newTop += offset;
|
|
}
|
|
var tmpEnableScrollRange = enableScrollRangeRef.current;
|
|
var tmpEnableOffsetRange = enableOffsetRangeRef.current;
|
|
var ptg = tmpEnableOffsetRange ? newTop / tmpEnableOffsetRange : 0;
|
|
var newScrollTop = Math.ceil(ptg * tmpEnableScrollRange);
|
|
newScrollTop = Math.max(newScrollTop, 0);
|
|
newScrollTop = Math.min(newScrollTop, tmpEnableScrollRange);
|
|
moveRafId = (0,raf/* default */.Z)(function () {
|
|
onScroll(newScrollTop, horizontal);
|
|
});
|
|
}
|
|
};
|
|
var onMouseUp = function onMouseUp() {
|
|
setDragging(false);
|
|
onStopMove();
|
|
};
|
|
window.addEventListener('mousemove', onMouseMove, {
|
|
passive: true
|
|
});
|
|
window.addEventListener('touchmove', onMouseMove, {
|
|
passive: true
|
|
});
|
|
window.addEventListener('mouseup', onMouseUp, {
|
|
passive: true
|
|
});
|
|
window.addEventListener('touchend', onMouseUp, {
|
|
passive: true
|
|
});
|
|
return function () {
|
|
window.removeEventListener('mousemove', onMouseMove);
|
|
window.removeEventListener('touchmove', onMouseMove);
|
|
window.removeEventListener('mouseup', onMouseUp);
|
|
window.removeEventListener('touchend', onMouseUp);
|
|
raf/* default */.Z.cancel(moveRafId);
|
|
};
|
|
}
|
|
}, [dragging]);
|
|
_react_17_0_2_react.useEffect(function () {
|
|
delayHidden();
|
|
return function () {
|
|
clearTimeout(visibleTimeoutRef.current);
|
|
};
|
|
}, [scrollOffset]);
|
|
|
|
// ====================== Imperative ======================
|
|
_react_17_0_2_react.useImperativeHandle(ref, function () {
|
|
return {
|
|
delayHidden: delayHidden
|
|
};
|
|
});
|
|
|
|
// ======================== Render ========================
|
|
var scrollbarPrefixCls = "".concat(prefixCls, "-scrollbar");
|
|
var containerStyle = {
|
|
position: 'absolute',
|
|
visibility: visible ? null : 'hidden'
|
|
};
|
|
var thumbStyle = {
|
|
position: 'absolute',
|
|
borderRadius: 99,
|
|
background: 'var(--rc-virtual-list-scrollbar-bg, rgba(0, 0, 0, 0.5))',
|
|
cursor: 'pointer',
|
|
userSelect: 'none'
|
|
};
|
|
if (horizontal) {
|
|
Object.assign(containerStyle, {
|
|
height: 8,
|
|
left: 0,
|
|
right: 0,
|
|
bottom: 0
|
|
});
|
|
Object.assign(thumbStyle, (0,defineProperty/* default */.Z)({
|
|
height: '100%',
|
|
width: spinSize
|
|
}, isLTR ? 'left' : 'right', top));
|
|
} else {
|
|
Object.assign(containerStyle, (0,defineProperty/* default */.Z)({
|
|
width: 8,
|
|
top: 0,
|
|
bottom: 0
|
|
}, isLTR ? 'right' : 'left', 0));
|
|
Object.assign(thumbStyle, {
|
|
width: '100%',
|
|
height: spinSize,
|
|
top: top
|
|
});
|
|
}
|
|
return /*#__PURE__*/_react_17_0_2_react.createElement("div", {
|
|
ref: scrollbarRef,
|
|
className: _classnames_2_5_1_classnames_default()(scrollbarPrefixCls, (0,defineProperty/* default */.Z)((0,defineProperty/* default */.Z)((0,defineProperty/* default */.Z)({}, "".concat(scrollbarPrefixCls, "-horizontal"), horizontal), "".concat(scrollbarPrefixCls, "-vertical"), !horizontal), "".concat(scrollbarPrefixCls, "-visible"), visible)),
|
|
style: (0,objectSpread2/* default */.Z)((0,objectSpread2/* default */.Z)({}, containerStyle), style),
|
|
onMouseDown: onContainerMouseDown,
|
|
onMouseMove: delayHidden
|
|
}, /*#__PURE__*/_react_17_0_2_react.createElement("div", {
|
|
ref: thumbRef,
|
|
className: _classnames_2_5_1_classnames_default()("".concat(scrollbarPrefixCls, "-thumb"), (0,defineProperty/* default */.Z)({}, "".concat(scrollbarPrefixCls, "-thumb-moving"), dragging)),
|
|
style: (0,objectSpread2/* default */.Z)((0,objectSpread2/* default */.Z)({}, thumbStyle), propsThumbStyle),
|
|
onMouseDown: onThumbMouseDown
|
|
}));
|
|
});
|
|
if (false) {}
|
|
/* harmony default export */ var es_ScrollBar = (ScrollBar);
|
|
;// CONCATENATED MODULE: ./node_modules/_rc-virtual-list@3.19.1@rc-virtual-list/es/utils/scrollbarUtil.js
|
|
var MIN_SIZE = 20;
|
|
function getSpinSize() {
|
|
var containerSize = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
|
|
var scrollRange = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
var baseSize = containerSize / scrollRange * containerSize;
|
|
if (isNaN(baseSize)) {
|
|
baseSize = 0;
|
|
}
|
|
baseSize = Math.max(baseSize, MIN_SIZE);
|
|
return Math.floor(baseSize);
|
|
}
|
|
;// CONCATENATED MODULE: ./node_modules/_rc-virtual-list@3.19.1@rc-virtual-list/es/List.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var _excluded = ["prefixCls", "className", "height", "itemHeight", "fullHeight", "style", "data", "children", "itemKey", "virtual", "direction", "scrollWidth", "component", "onScroll", "onVirtualScroll", "onVisibleChange", "innerProps", "extraRender", "styles", "showScrollBar"];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var EMPTY_DATA = [];
|
|
var ScrollStyle = {
|
|
overflowY: 'auto',
|
|
overflowAnchor: 'none'
|
|
};
|
|
function RawList(props, ref) {
|
|
var _props$prefixCls = props.prefixCls,
|
|
prefixCls = _props$prefixCls === void 0 ? 'rc-virtual-list' : _props$prefixCls,
|
|
className = props.className,
|
|
height = props.height,
|
|
itemHeight = props.itemHeight,
|
|
_props$fullHeight = props.fullHeight,
|
|
fullHeight = _props$fullHeight === void 0 ? true : _props$fullHeight,
|
|
style = props.style,
|
|
data = props.data,
|
|
children = props.children,
|
|
itemKey = props.itemKey,
|
|
virtual = props.virtual,
|
|
direction = props.direction,
|
|
scrollWidth = props.scrollWidth,
|
|
_props$component = props.component,
|
|
Component = _props$component === void 0 ? 'div' : _props$component,
|
|
onScroll = props.onScroll,
|
|
onVirtualScroll = props.onVirtualScroll,
|
|
onVisibleChange = props.onVisibleChange,
|
|
innerProps = props.innerProps,
|
|
extraRender = props.extraRender,
|
|
styles = props.styles,
|
|
_props$showScrollBar = props.showScrollBar,
|
|
showScrollBar = _props$showScrollBar === void 0 ? 'optional' : _props$showScrollBar,
|
|
restProps = (0,objectWithoutProperties/* default */.Z)(props, _excluded);
|
|
|
|
// =============================== Item Key ===============================
|
|
var getKey = _react_17_0_2_react.useCallback(function (item) {
|
|
if (typeof itemKey === 'function') {
|
|
return itemKey(item);
|
|
}
|
|
return item === null || item === void 0 ? void 0 : item[itemKey];
|
|
}, [itemKey]);
|
|
|
|
// ================================ Height ================================
|
|
var _useHeights = useHeights(getKey, null, null),
|
|
_useHeights2 = (0,slicedToArray/* default */.Z)(_useHeights, 4),
|
|
setInstanceRef = _useHeights2[0],
|
|
collectHeight = _useHeights2[1],
|
|
heights = _useHeights2[2],
|
|
heightUpdatedMark = _useHeights2[3];
|
|
|
|
// ================================= MISC =================================
|
|
var useVirtual = !!(virtual !== false && height && itemHeight);
|
|
var containerHeight = _react_17_0_2_react.useMemo(function () {
|
|
return Object.values(heights.maps).reduce(function (total, curr) {
|
|
return total + curr;
|
|
}, 0);
|
|
}, [heights.id, heights.maps]);
|
|
var inVirtual = useVirtual && data && (Math.max(itemHeight * data.length, containerHeight) > height || !!scrollWidth);
|
|
var isRTL = direction === 'rtl';
|
|
var mergedClassName = _classnames_2_5_1_classnames_default()(prefixCls, (0,defineProperty/* default */.Z)({}, "".concat(prefixCls, "-rtl"), isRTL), className);
|
|
var mergedData = data || EMPTY_DATA;
|
|
var componentRef = (0,_react_17_0_2_react.useRef)();
|
|
var fillerInnerRef = (0,_react_17_0_2_react.useRef)();
|
|
var containerRef = (0,_react_17_0_2_react.useRef)();
|
|
|
|
// =============================== Item Key ===============================
|
|
|
|
var _useState = (0,_react_17_0_2_react.useState)(0),
|
|
_useState2 = (0,slicedToArray/* default */.Z)(_useState, 2),
|
|
offsetTop = _useState2[0],
|
|
setOffsetTop = _useState2[1];
|
|
var _useState3 = (0,_react_17_0_2_react.useState)(0),
|
|
_useState4 = (0,slicedToArray/* default */.Z)(_useState3, 2),
|
|
offsetLeft = _useState4[0],
|
|
setOffsetLeft = _useState4[1];
|
|
var _useState5 = (0,_react_17_0_2_react.useState)(false),
|
|
_useState6 = (0,slicedToArray/* default */.Z)(_useState5, 2),
|
|
scrollMoving = _useState6[0],
|
|
setScrollMoving = _useState6[1];
|
|
var onScrollbarStartMove = function onScrollbarStartMove() {
|
|
setScrollMoving(true);
|
|
};
|
|
var onScrollbarStopMove = function onScrollbarStopMove() {
|
|
setScrollMoving(false);
|
|
};
|
|
var sharedConfig = {
|
|
getKey: getKey
|
|
};
|
|
|
|
// ================================ Scroll ================================
|
|
function syncScrollTop(newTop) {
|
|
setOffsetTop(function (origin) {
|
|
var value;
|
|
if (typeof newTop === 'function') {
|
|
value = newTop(origin);
|
|
} else {
|
|
value = newTop;
|
|
}
|
|
var alignedTop = keepInRange(value);
|
|
componentRef.current.scrollTop = alignedTop;
|
|
return alignedTop;
|
|
});
|
|
}
|
|
|
|
// ================================ Legacy ================================
|
|
// Put ref here since the range is generate by follow
|
|
var rangeRef = (0,_react_17_0_2_react.useRef)({
|
|
start: 0,
|
|
end: mergedData.length
|
|
});
|
|
var diffItemRef = (0,_react_17_0_2_react.useRef)();
|
|
var _useDiffItem = useDiffItem(mergedData, getKey),
|
|
_useDiffItem2 = (0,slicedToArray/* default */.Z)(_useDiffItem, 1),
|
|
diffItem = _useDiffItem2[0];
|
|
diffItemRef.current = diffItem;
|
|
|
|
// ========================== Visible Calculation =========================
|
|
var _React$useMemo = _react_17_0_2_react.useMemo(function () {
|
|
if (!useVirtual) {
|
|
return {
|
|
scrollHeight: undefined,
|
|
start: 0,
|
|
end: mergedData.length - 1,
|
|
offset: undefined
|
|
};
|
|
}
|
|
|
|
// Always use virtual scroll bar in avoid shaking
|
|
if (!inVirtual) {
|
|
var _fillerInnerRef$curre;
|
|
return {
|
|
scrollHeight: ((_fillerInnerRef$curre = fillerInnerRef.current) === null || _fillerInnerRef$curre === void 0 ? void 0 : _fillerInnerRef$curre.offsetHeight) || 0,
|
|
start: 0,
|
|
end: mergedData.length - 1,
|
|
offset: undefined
|
|
};
|
|
}
|
|
var itemTop = 0;
|
|
var startIndex;
|
|
var startOffset;
|
|
var endIndex;
|
|
var dataLen = mergedData.length;
|
|
for (var i = 0; i < dataLen; i += 1) {
|
|
var _item = mergedData[i];
|
|
var key = getKey(_item);
|
|
var cacheHeight = heights.get(key);
|
|
var currentItemBottom = itemTop + (cacheHeight === undefined ? itemHeight : cacheHeight);
|
|
|
|
// Check item top in the range
|
|
if (currentItemBottom >= offsetTop && startIndex === undefined) {
|
|
startIndex = i;
|
|
startOffset = itemTop;
|
|
}
|
|
|
|
// Check item bottom in the range. We will render additional one item for motion usage
|
|
if (currentItemBottom > offsetTop + height && endIndex === undefined) {
|
|
endIndex = i;
|
|
}
|
|
itemTop = currentItemBottom;
|
|
}
|
|
|
|
// When scrollTop at the end but data cut to small count will reach this
|
|
if (startIndex === undefined) {
|
|
startIndex = 0;
|
|
startOffset = 0;
|
|
endIndex = Math.ceil(height / itemHeight);
|
|
}
|
|
if (endIndex === undefined) {
|
|
endIndex = mergedData.length - 1;
|
|
}
|
|
|
|
// Give cache to improve scroll experience
|
|
endIndex = Math.min(endIndex + 1, mergedData.length - 1);
|
|
return {
|
|
scrollHeight: itemTop,
|
|
start: startIndex,
|
|
end: endIndex,
|
|
offset: startOffset
|
|
};
|
|
}, [inVirtual, useVirtual, offsetTop, mergedData, heightUpdatedMark, height]),
|
|
scrollHeight = _React$useMemo.scrollHeight,
|
|
start = _React$useMemo.start,
|
|
end = _React$useMemo.end,
|
|
fillerOffset = _React$useMemo.offset;
|
|
rangeRef.current.start = start;
|
|
rangeRef.current.end = end;
|
|
|
|
// When scroll up, first visible item get real height may not same as `itemHeight`,
|
|
// Which will make scroll jump.
|
|
// Let's sync scroll top to avoid jump
|
|
_react_17_0_2_react.useLayoutEffect(function () {
|
|
var changedRecord = heights.getRecord();
|
|
if (changedRecord.size === 1) {
|
|
var recordKey = Array.from(changedRecord.keys())[0];
|
|
var prevCacheHeight = changedRecord.get(recordKey);
|
|
|
|
// Quick switch data may cause `start` not in `mergedData` anymore
|
|
var startItem = mergedData[start];
|
|
if (startItem && prevCacheHeight === undefined) {
|
|
var startIndexKey = getKey(startItem);
|
|
if (startIndexKey === recordKey) {
|
|
var realStartHeight = heights.get(recordKey);
|
|
var diffHeight = realStartHeight - itemHeight;
|
|
syncScrollTop(function (ori) {
|
|
return ori + diffHeight;
|
|
});
|
|
}
|
|
}
|
|
}
|
|
heights.resetRecord();
|
|
}, [scrollHeight]);
|
|
|
|
// ================================= Size =================================
|
|
var _React$useState = _react_17_0_2_react.useState({
|
|
width: 0,
|
|
height: height
|
|
}),
|
|
_React$useState2 = (0,slicedToArray/* default */.Z)(_React$useState, 2),
|
|
size = _React$useState2[0],
|
|
setSize = _React$useState2[1];
|
|
var onHolderResize = function onHolderResize(sizeInfo) {
|
|
setSize({
|
|
width: sizeInfo.offsetWidth,
|
|
height: sizeInfo.offsetHeight
|
|
});
|
|
};
|
|
|
|
// Hack on scrollbar to enable flash call
|
|
var verticalScrollBarRef = (0,_react_17_0_2_react.useRef)();
|
|
var horizontalScrollBarRef = (0,_react_17_0_2_react.useRef)();
|
|
var horizontalScrollBarSpinSize = _react_17_0_2_react.useMemo(function () {
|
|
return getSpinSize(size.width, scrollWidth);
|
|
}, [size.width, scrollWidth]);
|
|
var verticalScrollBarSpinSize = _react_17_0_2_react.useMemo(function () {
|
|
return getSpinSize(size.height, scrollHeight);
|
|
}, [size.height, scrollHeight]);
|
|
|
|
// =============================== In Range ===============================
|
|
var maxScrollHeight = scrollHeight - height;
|
|
var maxScrollHeightRef = (0,_react_17_0_2_react.useRef)(maxScrollHeight);
|
|
maxScrollHeightRef.current = maxScrollHeight;
|
|
function keepInRange(newScrollTop) {
|
|
var newTop = newScrollTop;
|
|
if (!Number.isNaN(maxScrollHeightRef.current)) {
|
|
newTop = Math.min(newTop, maxScrollHeightRef.current);
|
|
}
|
|
newTop = Math.max(newTop, 0);
|
|
return newTop;
|
|
}
|
|
var isScrollAtTop = offsetTop <= 0;
|
|
var isScrollAtBottom = offsetTop >= maxScrollHeight;
|
|
var isScrollAtLeft = offsetLeft <= 0;
|
|
var isScrollAtRight = offsetLeft >= scrollWidth;
|
|
var originScroll = useOriginScroll(isScrollAtTop, isScrollAtBottom, isScrollAtLeft, isScrollAtRight);
|
|
|
|
// ================================ Scroll ================================
|
|
var getVirtualScrollInfo = function getVirtualScrollInfo() {
|
|
return {
|
|
x: isRTL ? -offsetLeft : offsetLeft,
|
|
y: offsetTop
|
|
};
|
|
};
|
|
var lastVirtualScrollInfoRef = (0,_react_17_0_2_react.useRef)(getVirtualScrollInfo());
|
|
var triggerScroll = (0,_rc_util_5_44_4_rc_util_es.useEvent)(function (params) {
|
|
if (onVirtualScroll) {
|
|
var nextInfo = (0,objectSpread2/* default */.Z)((0,objectSpread2/* default */.Z)({}, getVirtualScrollInfo()), params);
|
|
|
|
// Trigger when offset changed
|
|
if (lastVirtualScrollInfoRef.current.x !== nextInfo.x || lastVirtualScrollInfoRef.current.y !== nextInfo.y) {
|
|
onVirtualScroll(nextInfo);
|
|
lastVirtualScrollInfoRef.current = nextInfo;
|
|
}
|
|
}
|
|
});
|
|
function onScrollBar(newScrollOffset, horizontal) {
|
|
var newOffset = newScrollOffset;
|
|
if (horizontal) {
|
|
(0,_react_dom_17_0_2_react_dom.flushSync)(function () {
|
|
setOffsetLeft(newOffset);
|
|
});
|
|
triggerScroll();
|
|
} else {
|
|
syncScrollTop(newOffset);
|
|
}
|
|
}
|
|
|
|
// When data size reduce. It may trigger native scroll event back to fit scroll position
|
|
function onFallbackScroll(e) {
|
|
var newScrollTop = e.currentTarget.scrollTop;
|
|
if (newScrollTop !== offsetTop) {
|
|
syncScrollTop(newScrollTop);
|
|
}
|
|
|
|
// Trigger origin onScroll
|
|
onScroll === null || onScroll === void 0 || onScroll(e);
|
|
triggerScroll();
|
|
}
|
|
var keepInHorizontalRange = function keepInHorizontalRange(nextOffsetLeft) {
|
|
var tmpOffsetLeft = nextOffsetLeft;
|
|
var max = !!scrollWidth ? scrollWidth - size.width : 0;
|
|
tmpOffsetLeft = Math.max(tmpOffsetLeft, 0);
|
|
tmpOffsetLeft = Math.min(tmpOffsetLeft, max);
|
|
return tmpOffsetLeft;
|
|
};
|
|
var onWheelDelta = (0,_rc_util_5_44_4_rc_util_es.useEvent)(function (offsetXY, fromHorizontal) {
|
|
if (fromHorizontal) {
|
|
(0,_react_dom_17_0_2_react_dom.flushSync)(function () {
|
|
setOffsetLeft(function (left) {
|
|
var nextOffsetLeft = left + (isRTL ? -offsetXY : offsetXY);
|
|
return keepInHorizontalRange(nextOffsetLeft);
|
|
});
|
|
});
|
|
triggerScroll();
|
|
} else {
|
|
syncScrollTop(function (top) {
|
|
var newTop = top + offsetXY;
|
|
return newTop;
|
|
});
|
|
}
|
|
});
|
|
|
|
// Since this added in global,should use ref to keep update
|
|
var _useFrameWheel = useFrameWheel(useVirtual, isScrollAtTop, isScrollAtBottom, isScrollAtLeft, isScrollAtRight, !!scrollWidth, onWheelDelta),
|
|
_useFrameWheel2 = (0,slicedToArray/* default */.Z)(_useFrameWheel, 2),
|
|
onRawWheel = _useFrameWheel2[0],
|
|
onFireFoxScroll = _useFrameWheel2[1];
|
|
|
|
// Mobile touch move
|
|
useMobileTouchMove(useVirtual, componentRef, function (isHorizontal, delta, smoothOffset, e) {
|
|
var event = e;
|
|
if (originScroll(isHorizontal, delta, smoothOffset)) {
|
|
return false;
|
|
}
|
|
|
|
// Fix nest List trigger TouchMove event
|
|
if (!event || !event._virtualHandled) {
|
|
if (event) {
|
|
event._virtualHandled = true;
|
|
}
|
|
onRawWheel({
|
|
preventDefault: function preventDefault() {},
|
|
deltaX: isHorizontal ? delta : 0,
|
|
deltaY: isHorizontal ? 0 : delta
|
|
});
|
|
return true;
|
|
}
|
|
return false;
|
|
});
|
|
|
|
// MouseDown drag for scroll
|
|
useScrollDrag(inVirtual, componentRef, function (offset) {
|
|
syncScrollTop(function (top) {
|
|
return top + offset;
|
|
});
|
|
});
|
|
(0,useLayoutEffect/* default */.Z)(function () {
|
|
// Firefox only
|
|
function onMozMousePixelScroll(e) {
|
|
// scrolling at top/bottom limit
|
|
var scrollingUpAtTop = isScrollAtTop && e.detail < 0;
|
|
var scrollingDownAtBottom = isScrollAtBottom && e.detail > 0;
|
|
if (useVirtual && !scrollingUpAtTop && !scrollingDownAtBottom) {
|
|
e.preventDefault();
|
|
}
|
|
}
|
|
var componentEle = componentRef.current;
|
|
componentEle.addEventListener('wheel', onRawWheel, {
|
|
passive: false
|
|
});
|
|
componentEle.addEventListener('DOMMouseScroll', onFireFoxScroll, {
|
|
passive: true
|
|
});
|
|
componentEle.addEventListener('MozMousePixelScroll', onMozMousePixelScroll, {
|
|
passive: false
|
|
});
|
|
return function () {
|
|
componentEle.removeEventListener('wheel', onRawWheel);
|
|
componentEle.removeEventListener('DOMMouseScroll', onFireFoxScroll);
|
|
componentEle.removeEventListener('MozMousePixelScroll', onMozMousePixelScroll);
|
|
};
|
|
}, [useVirtual, isScrollAtTop, isScrollAtBottom]);
|
|
|
|
// Sync scroll left
|
|
(0,useLayoutEffect/* default */.Z)(function () {
|
|
if (scrollWidth) {
|
|
var newOffsetLeft = keepInHorizontalRange(offsetLeft);
|
|
setOffsetLeft(newOffsetLeft);
|
|
triggerScroll({
|
|
x: newOffsetLeft
|
|
});
|
|
}
|
|
}, [size.width, scrollWidth]);
|
|
|
|
// ================================= Ref ==================================
|
|
var delayHideScrollBar = function delayHideScrollBar() {
|
|
var _verticalScrollBarRef, _horizontalScrollBarR;
|
|
(_verticalScrollBarRef = verticalScrollBarRef.current) === null || _verticalScrollBarRef === void 0 || _verticalScrollBarRef.delayHidden();
|
|
(_horizontalScrollBarR = horizontalScrollBarRef.current) === null || _horizontalScrollBarR === void 0 || _horizontalScrollBarR.delayHidden();
|
|
};
|
|
var _scrollTo = useScrollTo(componentRef, mergedData, heights, itemHeight, getKey, function () {
|
|
return collectHeight(true);
|
|
}, syncScrollTop, delayHideScrollBar);
|
|
_react_17_0_2_react.useImperativeHandle(ref, function () {
|
|
return {
|
|
nativeElement: containerRef.current,
|
|
getScrollInfo: getVirtualScrollInfo,
|
|
scrollTo: function scrollTo(config) {
|
|
function isPosScroll(arg) {
|
|
return arg && (0,esm_typeof/* default */.Z)(arg) === 'object' && ('left' in arg || 'top' in arg);
|
|
}
|
|
if (isPosScroll(config)) {
|
|
// Scroll X
|
|
if (config.left !== undefined) {
|
|
setOffsetLeft(keepInHorizontalRange(config.left));
|
|
}
|
|
|
|
// Scroll Y
|
|
_scrollTo(config.top);
|
|
} else {
|
|
_scrollTo(config);
|
|
}
|
|
}
|
|
};
|
|
});
|
|
|
|
// ================================ Effect ================================
|
|
/** We need told outside that some list not rendered */
|
|
(0,useLayoutEffect/* default */.Z)(function () {
|
|
if (onVisibleChange) {
|
|
var renderList = mergedData.slice(start, end + 1);
|
|
onVisibleChange(renderList, mergedData);
|
|
}
|
|
}, [start, end, mergedData]);
|
|
|
|
// ================================ Extra =================================
|
|
var getSize = useGetSize(mergedData, getKey, heights, itemHeight);
|
|
var extraContent = extraRender === null || extraRender === void 0 ? void 0 : extraRender({
|
|
start: start,
|
|
end: end,
|
|
virtual: inVirtual,
|
|
offsetX: offsetLeft,
|
|
offsetY: fillerOffset,
|
|
rtl: isRTL,
|
|
getSize: getSize
|
|
});
|
|
|
|
// ================================ Render ================================
|
|
var listChildren = useChildren(mergedData, start, end, scrollWidth, offsetLeft, setInstanceRef, children, sharedConfig);
|
|
var componentStyle = null;
|
|
if (height) {
|
|
componentStyle = (0,objectSpread2/* default */.Z)((0,defineProperty/* default */.Z)({}, fullHeight ? 'height' : 'maxHeight', height), ScrollStyle);
|
|
if (useVirtual) {
|
|
componentStyle.overflowY = 'hidden';
|
|
if (scrollWidth) {
|
|
componentStyle.overflowX = 'hidden';
|
|
}
|
|
if (scrollMoving) {
|
|
componentStyle.pointerEvents = 'none';
|
|
}
|
|
}
|
|
}
|
|
var containerProps = {};
|
|
if (isRTL) {
|
|
containerProps.dir = 'rtl';
|
|
}
|
|
return /*#__PURE__*/_react_17_0_2_react.createElement("div", (0,esm_extends/* default */.Z)({
|
|
ref: containerRef,
|
|
style: (0,objectSpread2/* default */.Z)((0,objectSpread2/* default */.Z)({}, style), {}, {
|
|
position: 'relative'
|
|
}),
|
|
className: mergedClassName
|
|
}, containerProps, restProps), /*#__PURE__*/_react_17_0_2_react.createElement(es/* default */.Z, {
|
|
onResize: onHolderResize
|
|
}, /*#__PURE__*/_react_17_0_2_react.createElement(Component, {
|
|
className: "".concat(prefixCls, "-holder"),
|
|
style: componentStyle,
|
|
ref: componentRef,
|
|
onScroll: onFallbackScroll,
|
|
onMouseEnter: delayHideScrollBar
|
|
}, /*#__PURE__*/_react_17_0_2_react.createElement(es_Filler, {
|
|
prefixCls: prefixCls,
|
|
height: scrollHeight,
|
|
offsetX: offsetLeft,
|
|
offsetY: fillerOffset,
|
|
scrollWidth: scrollWidth,
|
|
onInnerResize: collectHeight,
|
|
ref: fillerInnerRef,
|
|
innerProps: innerProps,
|
|
rtl: isRTL,
|
|
extra: extraContent
|
|
}, listChildren))), inVirtual && scrollHeight > height && /*#__PURE__*/_react_17_0_2_react.createElement(es_ScrollBar, {
|
|
ref: verticalScrollBarRef,
|
|
prefixCls: prefixCls,
|
|
scrollOffset: offsetTop,
|
|
scrollRange: scrollHeight,
|
|
rtl: isRTL,
|
|
onScroll: onScrollBar,
|
|
onStartMove: onScrollbarStartMove,
|
|
onStopMove: onScrollbarStopMove,
|
|
spinSize: verticalScrollBarSpinSize,
|
|
containerSize: size.height,
|
|
style: styles === null || styles === void 0 ? void 0 : styles.verticalScrollBar,
|
|
thumbStyle: styles === null || styles === void 0 ? void 0 : styles.verticalScrollBarThumb,
|
|
showScrollBar: showScrollBar
|
|
}), inVirtual && scrollWidth > size.width && /*#__PURE__*/_react_17_0_2_react.createElement(es_ScrollBar, {
|
|
ref: horizontalScrollBarRef,
|
|
prefixCls: prefixCls,
|
|
scrollOffset: offsetLeft,
|
|
scrollRange: scrollWidth,
|
|
rtl: isRTL,
|
|
onScroll: onScrollBar,
|
|
onStartMove: onScrollbarStartMove,
|
|
onStopMove: onScrollbarStopMove,
|
|
spinSize: horizontalScrollBarSpinSize,
|
|
containerSize: size.width,
|
|
horizontal: true,
|
|
style: styles === null || styles === void 0 ? void 0 : styles.horizontalScrollBar,
|
|
thumbStyle: styles === null || styles === void 0 ? void 0 : styles.horizontalScrollBarThumb,
|
|
showScrollBar: showScrollBar
|
|
}));
|
|
}
|
|
var List = /*#__PURE__*/_react_17_0_2_react.forwardRef(RawList);
|
|
List.displayName = 'List';
|
|
/* harmony default export */ var es_List = (List);
|
|
;// CONCATENATED MODULE: ./node_modules/_rc-virtual-list@3.19.1@rc-virtual-list/es/index.js
|
|
|
|
/* harmony default export */ var _rc_virtual_list_3_19_1_rc_virtual_list_es = (es_List);
|
|
|
|
/***/ })
|
|
|
|
}]); |