Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

rc-virtual-list

Package Overview
Dependencies
Maintainers
1
Versions
128
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rc-virtual-list - npm Package Compare versions

Comparing version 0.0.0-alpha.14 to 0.0.0-alpha.15

1

es/Filler.d.ts
import * as React from 'react';
interface FillerProps {
prefixCls?: string;
/** Virtual filler height. Should be `count * itemMinHeight` */

@@ -4,0 +5,0 @@ height: number;

7

es/Filler.js

@@ -8,2 +8,3 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { keys.push.apply(keys, Object.getOwnPropertySymbols(object)); } if (enumerableOnly) keys = keys.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); return keys; }

import * as React from 'react';
import classNames from 'classnames';
/**

@@ -16,3 +17,4 @@ * Fill component to provided the scroll content real height.

offset = _ref.offset,
children = _ref.children;
children = _ref.children,
prefixCls = _ref.prefixCls;
var outerStyle = {};

@@ -43,3 +45,4 @@ var innerStyle = {

}, React.createElement("div", {
style: innerStyle
style: innerStyle,
className: classNames(_defineProperty({}, "".concat(prefixCls, "-holder-inner"), prefixCls))
}, children));

@@ -46,0 +49,0 @@ };

@@ -15,2 +15,3 @@ import * as React from 'react';

export interface ListProps<T> extends React.HTMLAttributes<any> {
prefixCls?: string;
children: RenderFunc<T>;

@@ -17,0 +18,0 @@ data: T[];

@@ -30,2 +30,3 @@ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }

import * as React from 'react';
import classNames from 'classnames';
import Filler from './Filler';

@@ -528,3 +529,5 @@ import { getElementScrollPercentage, getScrollPercentage, getNodeHeight, getRangeIndex, getItemAbsoluteTop, GHOST_ITEM_KEY, getItemRelativeTop, getCompareItemRelativeTop, alignScrollTop, requireVirtual } from './utils/itemUtil';

var _this$props4 = this.props,
prefixCls = _this$props4.prefixCls,
style = _this$props4.style,
className = _this$props4.className,
_this$props4$componen = _this$props4.component,

@@ -538,4 +541,5 @@ Component = _this$props4$componen === void 0 ? 'div' : _this$props4$componen,

onSkipRender = _this$props4.onSkipRender,
restProps = _objectWithoutProperties(_this$props4, ["style", "component", "height", "itemHeight", "data", "children", "itemKey", "onSkipRender"]); // Render pure list if not set height or height is enough for all items
restProps = _objectWithoutProperties(_this$props4, ["prefixCls", "style", "className", "component", "height", "itemHeight", "data", "children", "itemKey", "onSkipRender"]);
var mergedClassName = classNames(prefixCls, className); // Render pure list if not set height or height is enough for all items

@@ -546,3 +550,4 @@ if (!isVirtual) {

height: height
}, ScrollStyle) : style
}, ScrollStyle) : style,
className: mergedClassName
}, restProps, {

@@ -552,2 +557,3 @@ onScroll: this.onRawScroll,

}), React.createElement(Filler, {
prefixCls: prefixCls,
height: height

@@ -569,3 +575,4 @@ }, this.renderChildren(data, 0, children)));

return React.createElement(Component, Object.assign({
style: mergedStyle
style: mergedStyle,
className: mergedClassName
}, restProps, {

@@ -575,2 +582,3 @@ onScroll: this.onScroll,

}), React.createElement(Filler, {
prefixCls: prefixCls,
height: contentHeight,

@@ -577,0 +585,0 @@ offset: status === 'MEASURE_DONE' ? startItemTop : 0

@@ -30,2 +30,3 @@ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }

import * as React from 'react';
import classNames from 'classnames';
import OriginList from './List';

@@ -53,3 +54,5 @@ import Filler from './Filler';

var _this$props = this.props,
prefixCls = _this$props.prefixCls,
style = _this$props.style,
className = _this$props.className,
_this$props$component = _this$props.component,

@@ -63,9 +66,12 @@ Component = _this$props$component === void 0 ? 'div' : _this$props$component,

onSkipRender = _this$props.onSkipRender,
restProps = _objectWithoutProperties(_this$props, ["style", "component", "height", "itemHeight", "data", "children", "itemKey", "onSkipRender"]);
restProps = _objectWithoutProperties(_this$props, ["prefixCls", "style", "className", "component", "height", "itemHeight", "data", "children", "itemKey", "onSkipRender"]);
var mergedClassName = classNames(prefixCls, className);
return React.createElement(Component, Object.assign({
style: _objectSpread({}, style, {
height: height
})
}),
className: mergedClassName
}, restProps), React.createElement(Filler, {
prefixCls: prefixCls,
height: height

@@ -72,0 +78,0 @@ }, this.renderChildren(data, 0, children)));

import * as React from 'react';
interface FillerProps {
prefixCls?: string;
/** Virtual filler height. Should be `count * itemMinHeight` */

@@ -4,0 +5,0 @@ height: number;

@@ -10,2 +10,6 @@ "use strict";

var _classnames = _interopRequireDefault(require("classnames"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }

@@ -25,3 +29,4 @@

offset = _ref.offset,
children = _ref.children;
children = _ref.children,
prefixCls = _ref.prefixCls;
var outerStyle = {};

@@ -52,3 +57,4 @@ var innerStyle = {

}, React.createElement("div", {
style: innerStyle
style: innerStyle,
className: (0, _classnames.default)(_defineProperty({}, "".concat(prefixCls, "-holder-inner"), prefixCls))
}, children));

@@ -55,0 +61,0 @@ };

@@ -15,2 +15,3 @@ import * as React from 'react';

export interface ListProps<T> extends React.HTMLAttributes<any> {
prefixCls?: string;
children: RenderFunc<T>;

@@ -17,0 +18,0 @@ data: T[];

@@ -10,2 +10,4 @@ "use strict";

var _classnames = _interopRequireDefault(require("classnames"));
var _Filler = _interopRequireDefault(require("./Filler"));

@@ -543,3 +545,5 @@

var _this$props4 = this.props,
prefixCls = _this$props4.prefixCls,
style = _this$props4.style,
className = _this$props4.className,
_this$props4$componen = _this$props4.component,

@@ -553,4 +557,5 @@ Component = _this$props4$componen === void 0 ? 'div' : _this$props4$componen,

onSkipRender = _this$props4.onSkipRender,
restProps = _objectWithoutProperties(_this$props4, ["style", "component", "height", "itemHeight", "data", "children", "itemKey", "onSkipRender"]); // Render pure list if not set height or height is enough for all items
restProps = _objectWithoutProperties(_this$props4, ["prefixCls", "style", "className", "component", "height", "itemHeight", "data", "children", "itemKey", "onSkipRender"]);
var mergedClassName = (0, _classnames.default)(prefixCls, className); // Render pure list if not set height or height is enough for all items

@@ -561,3 +566,4 @@ if (!isVirtual) {

height: height
}, ScrollStyle) : style
}, ScrollStyle) : style,
className: mergedClassName
}, restProps, {

@@ -567,2 +573,3 @@ onScroll: this.onRawScroll,

}), React.createElement(_Filler.default, {
prefixCls: prefixCls,
height: height

@@ -584,3 +591,4 @@ }, this.renderChildren(data, 0, children)));

return React.createElement(Component, Object.assign({
style: mergedStyle
style: mergedStyle,
className: mergedClassName
}, restProps, {

@@ -590,2 +598,3 @@ onScroll: this.onScroll,

}), React.createElement(_Filler.default, {
prefixCls: prefixCls,
height: contentHeight,

@@ -592,0 +601,0 @@ offset: status === 'MEASURE_DONE' ? startItemTop : 0

@@ -10,2 +10,4 @@ "use strict";

var _classnames = _interopRequireDefault(require("classnames"));
var _List = _interopRequireDefault(require("./List"));

@@ -66,3 +68,5 @@

var _this$props = this.props,
prefixCls = _this$props.prefixCls,
style = _this$props.style,
className = _this$props.className,
_this$props$component = _this$props.component,

@@ -76,9 +80,12 @@ Component = _this$props$component === void 0 ? 'div' : _this$props$component,

onSkipRender = _this$props.onSkipRender,
restProps = _objectWithoutProperties(_this$props, ["style", "component", "height", "itemHeight", "data", "children", "itemKey", "onSkipRender"]);
restProps = _objectWithoutProperties(_this$props, ["prefixCls", "style", "className", "component", "height", "itemHeight", "data", "children", "itemKey", "onSkipRender"]);
var mergedClassName = (0, _classnames.default)(prefixCls, className);
return React.createElement(Component, Object.assign({
style: _objectSpread({}, style, {
height: height
})
}),
className: mergedClassName
}, restProps), React.createElement(_Filler.default, {
prefixCls: prefixCls,
height: height

@@ -85,0 +92,0 @@ }, this.renderChildren(data, 0, children)));

{
"name": "rc-virtual-list",
"version": "0.0.0-alpha.14",
"version": "0.0.0-alpha.15",
"description": "React Virtual List Component",

@@ -45,3 +45,2 @@ "keywords": [

"@types/warning": "^3.0.0",
"classnames": "^2.2.6",
"cross-env": "^5.2.0",

@@ -59,4 +58,5 @@ "enzyme": "^3.1.0",

"dependencies": {
"classnames": "^2.2.6",
"rc-util": "^4.8.0"
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc