├── .babelrc
├── .editorconfig
├── .gitattributes
├── .gitignore
├── .npmignore
├── .prettierrc
├── .travis.yml
├── LICENSE
├── README.md
├── coverage
├── clover.xml
├── coverage-final.json
├── lcov-report
│ ├── ReactVirtualizedScroll.tsx.html
│ ├── base.css
│ ├── block-navigation.js
│ ├── index.html
│ ├── index.tsx.html
│ ├── lib
│ │ └── component
│ │ │ └── ReactVirtualizedScroll
│ │ │ ├── ReactVirtualizedScroll.js.html
│ │ │ ├── index.html
│ │ │ ├── index.js.html
│ │ │ ├── svg.js.html
│ │ │ └── utils.js.html
│ ├── prettify.css
│ ├── prettify.js
│ ├── sort-arrow-sprite.png
│ ├── sorter.js
│ ├── src
│ │ └── component
│ │ │ └── ReactVirtualizedScroll
│ │ │ ├── ReactVirtualizedScroll.tsx.html
│ │ │ ├── index.html
│ │ │ ├── index.tsx.html
│ │ │ ├── svg.ts.html
│ │ │ └── utils.js.html
│ └── svg.ts.html
└── lcov.info
├── example
└── src
│ ├── app.tsx
│ ├── index.html
│ ├── index.tsx
│ └── utils.ts
├── jestconfig.json
├── lib
├── README.md
├── __tests__
│ └── demo.test.js
├── assets
│ ├── iconfont.css
│ ├── iconfont.eot
│ ├── iconfont.js
│ ├── iconfont.svg
│ ├── iconfont.ts
│ ├── iconfont.ttf
│ ├── iconfont.woff
│ └── iconfont.woff2
├── component
│ └── ReactVirtualizedScroll
│ │ ├── ReactVirtualizedScroll.js
│ │ ├── Row.js
│ │ ├── index.d.ts
│ │ ├── index.js
│ │ ├── style.css
│ │ ├── svg.js
│ │ └── utils.js
└── package.json
├── package.json
├── src
├── __tests__
│ └── demo.test.tsx
├── assets
│ ├── iconfont.css
│ ├── iconfont.eot
│ ├── iconfont.js
│ ├── iconfont.svg
│ ├── iconfont.ttf
│ ├── iconfont.woff
│ └── iconfont.woff2
├── component
│ └── ReactVirtualizedScroll
│ │ ├── ReactVirtualizedScroll.tsx
│ │ ├── index.tsx
│ │ ├── style.css
│ │ └── svg.ts
└── types
│ ├── demo
│ └── index.d.ts
│ └── global.d.ts
├── test.gif
├── tsconfig.json
├── tslint.json
└── webpack.config.js
/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": [
3 | ["env", {
4 | "modules": false,
5 | "targets": {
6 | "browsers": ["> 1%", "last 2 versions", "not ie <= 8"]
7 | }
8 | }],
9 | "stage-2"
10 | ],
11 | "plugins": ["transform-vue-jsx", "transform-runtime"]
12 | }
13 |
--------------------------------------------------------------------------------
/.editorconfig:
--------------------------------------------------------------------------------
1 | # EditorConfig is awesome: https://EditorConfig.org
2 |
3 | # top-most EditorConfig file
4 | root = true
5 |
6 | # Unix-style newlines with a newline ending every file
7 | [*]
8 | end_of_line = lf
9 | insert_final_newline = true
10 | charset = utf-8
11 | indent_style = space
12 | indent_size = 4
13 |
14 | [{*.json,*.md,*.yml,*.*rc}]
15 | indent_style = space
16 | indent_size = 2
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | *.html linguist-language=JavaScript
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | /node_modules/
2 | /dist/
3 | /coverage/
4 | *.log
5 |
--------------------------------------------------------------------------------
/.npmignore:
--------------------------------------------------------------------------------
1 | /.git/
2 | /.vscode/
3 | /node_modules/
4 | .gitignore
5 | .npmignore
6 | .prettierrc
7 | .editorconfig
8 | tslint.json
9 | tsconfig.json
10 | note.md
11 | *.log
12 |
--------------------------------------------------------------------------------
/.prettierrc:
--------------------------------------------------------------------------------
1 | {
2 | "trailingComma": "all",
3 | "tabWidth": 4,
4 | "semi": false,
5 | "singleQuote": true,
6 | "endOfLine": "lf",
7 | "printWidth": 120,
8 | "overrides": [
9 | {
10 | "files": ["*.md", "*.json", "*.yml", "*.yaml"],
11 | "options": {
12 | "tabWidth": 2
13 | }
14 | }
15 | ]
16 | }
17 |
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | language: node_js
2 | node_js:
3 | - '12'
4 | install:
5 | - npm install
6 | script:
7 | - npm run test
8 | - npm run lint
9 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2013-present, DavidWong9785(Zhaokang Huang)
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # react-virtualized-scroll
2 | 虚拟滚动搭配上拉下滑加载的scroll组件
3 |
4 | [](https://github.com/DavidWong9785/react-virtualized-scroll)
5 | [](https://github.com/DavidWong9785/react-virtualized-scroll/issues)
6 | [](https://github.com/DavidWong9785/react-virtualized-scroll)
7 | [](https://github.com/DavidWong9785/react-virtualized-scroll)
8 | [](https://www.npmjs.com/package/react-virtualized-scroll)
9 | [](https://www.npmjs.com/package/react-virtualized-scroll)
10 | [](https://www.npmjs.com/package/react-virtualized-scroll)
11 | 
12 | 
13 |
14 | 
15 |
16 | ### 简介
17 |
18 | - 搭配 typescript
和 react-hooks
编写的虚拟滚动组件
19 | - 基于 react-virtualized
进行再封装。
20 | - 暴露了 react-virtualized
的 ref,可调用 react-virtualized
的方法
21 | - 除了渲染列表,你还可以传入其他的子组件(如悬浮球~等),只需要把定位设为 fixed
22 |
23 | ### 安装导入
24 |
25 | > cnpm i react-virtualized react-virtualized-scroll --save
26 |
27 | > import ReactVirtualizedScroll from 'react-virtualized-scroll'
28 |
29 | ### 使用
30 |
31 | ```
32 |
43 | fixed element
44 |
45 | ```
46 |
47 | ### 属性
48 |
49 |
50 | 名称 |
51 | 类型 |
52 | 说明 |
53 |
54 |
55 | width、height |
56 | string |
57 | 列表宽高,带单位 |
58 |
59 | 可选
60 | 默认100vw/vh
61 | |
62 |
63 |
64 | hasMore |
65 | boolean |
66 | 判断是否还可以下滑加载 |
67 | 必传,默认true |
68 |
69 |
70 | data |
71 | array |
72 | 用于渲染列表的目标数 |
73 | 必传,默认 [] |
74 |
75 |
76 | info |
77 | object |
78 | 需要传入 row 渲染函数作为参数的数据 |
79 | 可选 |
80 |
81 |
82 | logo |
83 | object |
84 | 加载时展示的 loading 图案,四个属性 |
85 |
86 | 可选
87 | 有默认logo
88 | |
89 |
90 |
91 | onPullDown |
92 | function |
93 |
94 |
95 | 下拉加载回调
96 |
97 |
98 | 该方法必须返回一个 promise 对象 ( 用于控制下拉 loading 状态 )
99 |
100 |
101 | 可以使用 async 方法或者直接返回 promise 对象
102 |
103 |
104 | 当 promise 状态完成之后 ( resolve/reject ),下拉加载状态结束
105 |
106 | |
107 | 可选 |
108 |
109 |
110 | onPullUp |
111 | function |
112 |
113 | 上滑加载回调,目的同上,该方法需要返回一个 promise 对象
114 | |
115 | 可选 |
116 |
117 |
118 | onScroll |
119 | function |
120 |
121 | 滑动回调
122 | 参数1: clientHeight
123 | 参数2: scrollTop
124 | 参数3: scrollHeight
125 | |
126 | 可选 |
127 |
128 |
129 | row |
130 | function |
131 |
132 | 列表每一行的渲染函数
133 | 参数1:类型为object,属性包含该行索引 index 和自定义传入的 info 属性
134 | 参数2:用于渲染列表的目标数组data
135 | |
136 | 必传 |
137 |
138 |
139 |
140 | ### logo属性(字符串,图片等等,只要是JSX.Element即可)
141 |
142 | | 属性 | 说明 |
143 | | ---------------- | --------------------- |
144 | | pulldown_loading | 下拉加载 loading 的 logo |
145 | | pulldown_success | 下拉加载 成功 的 logo |
146 | | pullup_loading | 上滑加载 loading 的 logo |
147 | | pullup_success | 上滑加载 成功 的 logo |
--------------------------------------------------------------------------------
/coverage/clover.xml:
--------------------------------------------------------------------------------
1 |
2 | <<<<<<< Updated upstream
3 |
4 |
5 | =======
6 |
7 |
8 | >>>>>>> Stashed changes
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 |
147 |
148 |
149 |
150 |
151 |
152 |
153 |
154 |
155 |
156 |
157 |
158 |
159 |
160 |
161 |
162 |
163 |
164 |
165 |
166 |
167 |
168 |
169 |
170 |
171 |
172 |
173 |
174 |
175 |
176 |
177 |
178 |
179 |
180 |
181 |
182 |
183 |
184 |
185 |
186 |
187 |
188 |
189 |
190 |
191 |
192 |
193 |
194 |
195 |
196 |
197 |
198 |
199 |
200 |
201 |
202 |
203 |
204 |
205 |
206 |
207 |
208 |
209 |
210 |
211 |
212 |
213 |
214 |
215 |
216 |
217 |
218 |
219 |
220 |
221 |
222 |
223 |
224 |
225 |
226 |
227 |
228 |
229 |
230 |
231 |
232 |
233 |
234 |
235 |
236 |
237 |
238 |
239 |
240 |
241 |
242 |
243 |
244 |
245 |
246 |
247 |
248 |
249 |
250 |
251 |
252 |
253 |
254 |
255 |
256 |
257 |
258 |
259 |
260 |
261 |
262 |
263 |
264 |
265 |
266 |
267 |
268 |
269 |
270 |
271 |
272 |
273 |
274 |
275 |
276 |
277 |
278 |
279 |
280 |
281 |
--------------------------------------------------------------------------------
/coverage/lcov-report/base.css:
--------------------------------------------------------------------------------
1 | body, html {
2 | margin:0; padding: 0;
3 | height: 100%;
4 | }
5 | body {
6 | font-family: Helvetica Neue, Helvetica, Arial;
7 | font-size: 14px;
8 | color:#333;
9 | }
10 | .small { font-size: 12px; }
11 | *, *:after, *:before {
12 | -webkit-box-sizing:border-box;
13 | -moz-box-sizing:border-box;
14 | box-sizing:border-box;
15 | }
16 | h1 { font-size: 20px; margin: 0;}
17 | h2 { font-size: 14px; }
18 | pre {
19 | font: 12px/1.4 Consolas, "Liberation Mono", Menlo, Courier, monospace;
20 | margin: 0;
21 | padding: 0;
22 | -moz-tab-size: 2;
23 | -o-tab-size: 2;
24 | tab-size: 2;
25 | }
26 | a { color:#0074D9; text-decoration:none; }
27 | a:hover { text-decoration:underline; }
28 | .strong { font-weight: bold; }
29 | .space-top1 { padding: 10px 0 0 0; }
30 | .pad2y { padding: 20px 0; }
31 | .pad1y { padding: 10px 0; }
32 | .pad2x { padding: 0 20px; }
33 | .pad2 { padding: 20px; }
34 | .pad1 { padding: 10px; }
35 | .space-left2 { padding-left:55px; }
36 | .space-right2 { padding-right:20px; }
37 | .center { text-align:center; }
38 | .clearfix { display:block; }
39 | .clearfix:after {
40 | content:'';
41 | display:block;
42 | height:0;
43 | clear:both;
44 | visibility:hidden;
45 | }
46 | .fl { float: left; }
47 | @media only screen and (max-width:640px) {
48 | .col3 { width:100%; max-width:100%; }
49 | .hide-mobile { display:none!important; }
50 | }
51 |
52 | .quiet {
53 | color: #7f7f7f;
54 | color: rgba(0,0,0,0.5);
55 | }
56 | .quiet a { opacity: 0.7; }
57 |
58 | .fraction {
59 | font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace;
60 | font-size: 10px;
61 | color: #555;
62 | background: #E8E8E8;
63 | padding: 4px 5px;
64 | border-radius: 3px;
65 | vertical-align: middle;
66 | }
67 |
68 | div.path a:link, div.path a:visited { color: #333; }
69 | table.coverage {
70 | border-collapse: collapse;
71 | margin: 10px 0 0 0;
72 | padding: 0;
73 | }
74 |
75 | table.coverage td {
76 | margin: 0;
77 | padding: 0;
78 | vertical-align: top;
79 | }
80 | table.coverage td.line-count {
81 | text-align: right;
82 | padding: 0 5px 0 20px;
83 | }
84 | table.coverage td.line-coverage {
85 | text-align: right;
86 | padding-right: 10px;
87 | min-width:20px;
88 | }
89 |
90 | table.coverage td span.cline-any {
91 | display: inline-block;
92 | padding: 0 5px;
93 | width: 100%;
94 | }
95 | .missing-if-branch {
96 | display: inline-block;
97 | margin-right: 5px;
98 | border-radius: 3px;
99 | position: relative;
100 | padding: 0 4px;
101 | background: #333;
102 | color: yellow;
103 | }
104 |
105 | .skip-if-branch {
106 | display: none;
107 | margin-right: 10px;
108 | position: relative;
109 | padding: 0 4px;
110 | background: #ccc;
111 | color: white;
112 | }
113 | .missing-if-branch .typ, .skip-if-branch .typ {
114 | color: inherit !important;
115 | }
116 | .coverage-summary {
117 | border-collapse: collapse;
118 | width: 100%;
119 | }
120 | .coverage-summary tr { border-bottom: 1px solid #bbb; }
121 | .keyline-all { border: 1px solid #ddd; }
122 | .coverage-summary td, .coverage-summary th { padding: 10px; }
123 | .coverage-summary tbody { border: 1px solid #bbb; }
124 | .coverage-summary td { border-right: 1px solid #bbb; }
125 | .coverage-summary td:last-child { border-right: none; }
126 | .coverage-summary th {
127 | text-align: left;
128 | font-weight: normal;
129 | white-space: nowrap;
130 | }
131 | .coverage-summary th.file { border-right: none !important; }
132 | .coverage-summary th.pct { }
133 | .coverage-summary th.pic,
134 | .coverage-summary th.abs,
135 | .coverage-summary td.pct,
136 | .coverage-summary td.abs { text-align: right; }
137 | .coverage-summary td.file { white-space: nowrap; }
138 | .coverage-summary td.pic { min-width: 120px !important; }
139 | .coverage-summary tfoot td { }
140 |
141 | .coverage-summary .sorter {
142 | height: 10px;
143 | width: 7px;
144 | display: inline-block;
145 | margin-left: 0.5em;
146 | background: url(sort-arrow-sprite.png) no-repeat scroll 0 0 transparent;
147 | }
148 | .coverage-summary .sorted .sorter {
149 | background-position: 0 -20px;
150 | }
151 | .coverage-summary .sorted-desc .sorter {
152 | background-position: 0 -10px;
153 | }
154 | .status-line { height: 10px; }
155 | /* yellow */
156 | .cbranch-no { background: yellow !important; color: #111; }
157 | /* dark red */
158 | .red.solid, .status-line.low, .low .cover-fill { background:#C21F39 }
159 | .low .chart { border:1px solid #C21F39 }
160 | .highlighted,
161 | .highlighted .cstat-no, .highlighted .fstat-no, .highlighted .cbranch-no{
162 | background: #C21F39 !important;
163 | }
164 | /* medium red */
165 | .cstat-no, .fstat-no, .cbranch-no, .cbranch-no { background:#F6C6CE }
166 | /* light red */
167 | .low, .cline-no { background:#FCE1E5 }
168 | /* light green */
169 | .high, .cline-yes { background:rgb(230,245,208) }
170 | /* medium green */
171 | .cstat-yes { background:rgb(161,215,106) }
172 | /* dark green */
173 | .status-line.high, .high .cover-fill { background:rgb(77,146,33) }
174 | .high .chart { border:1px solid rgb(77,146,33) }
175 | /* dark yellow (gold) */
176 | .status-line.medium, .medium .cover-fill { background: #f9cd0b; }
177 | .medium .chart { border:1px solid #f9cd0b; }
178 | /* light yellow */
179 | .medium { background: #fff4c2; }
180 |
181 | .cstat-skip { background: #ddd; color: #111; }
182 | .fstat-skip { background: #ddd; color: #111 !important; }
183 | .cbranch-skip { background: #ddd !important; color: #111; }
184 |
185 | span.cline-neutral { background: #eaeaea; }
186 |
187 | .coverage-summary td.empty {
188 | opacity: .5;
189 | padding-top: 4px;
190 | padding-bottom: 4px;
191 | line-height: 1;
192 | color: #888;
193 | }
194 |
195 | .cover-fill, .cover-empty {
196 | display:inline-block;
197 | height: 12px;
198 | }
199 | .chart {
200 | line-height: 0;
201 | }
202 | .cover-empty {
203 | background: white;
204 | }
205 | .cover-full {
206 | border-right: none !important;
207 | }
208 | pre.prettyprint {
209 | border: none !important;
210 | padding: 0 !important;
211 | margin: 0 !important;
212 | }
213 | .com { color: #999 !important; }
214 | .ignore-none { color: #999; font-weight: normal; }
215 |
216 | .wrapper {
217 | min-height: 100%;
218 | height: auto !important;
219 | height: 100%;
220 | margin: 0 auto -48px;
221 | }
222 | .footer, .push {
223 | height: 48px;
224 | }
225 |
--------------------------------------------------------------------------------
/coverage/lcov-report/block-navigation.js:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 | var jumpToCode = (function init() {
3 | // Classes of code we would like to highlight in the file view
4 | var missingCoverageClasses = ['.cbranch-no', '.cstat-no', '.fstat-no'];
5 |
6 | // Elements to highlight in the file listing view
7 | var fileListingElements = ['td.pct.low'];
8 |
9 | // We don't want to select elements that are direct descendants of another match
10 | var notSelector = ':not(' + missingCoverageClasses.join('):not(') + ') > '; // becomes `:not(a):not(b) > `
11 |
12 | // Selecter that finds elements on the page to which we can jump
13 | var selector =
14 | fileListingElements.join(', ') +
15 | ', ' +
16 | notSelector +
17 | missingCoverageClasses.join(', ' + notSelector); // becomes `:not(a):not(b) > a, :not(a):not(b) > b`
18 |
19 | // The NodeList of matching elements
20 | var missingCoverageElements = document.querySelectorAll(selector);
21 |
22 | var currentIndex;
23 |
24 | function toggleClass(index) {
25 | missingCoverageElements
26 | .item(currentIndex)
27 | .classList.remove('highlighted');
28 | missingCoverageElements.item(index).classList.add('highlighted');
29 | }
30 |
31 | function makeCurrent(index) {
32 | toggleClass(index);
33 | currentIndex = index;
34 | missingCoverageElements.item(index).scrollIntoView({
35 | behavior: 'smooth',
36 | block: 'center',
37 | inline: 'center'
38 | });
39 | }
40 |
41 | function goToPrevious() {
42 | var nextIndex = 0;
43 | if (typeof currentIndex !== 'number' || currentIndex === 0) {
44 | nextIndex = missingCoverageElements.length - 1;
45 | } else if (missingCoverageElements.length > 1) {
46 | nextIndex = currentIndex - 1;
47 | }
48 |
49 | makeCurrent(nextIndex);
50 | }
51 |
52 | function goToNext() {
53 | var nextIndex = 0;
54 |
55 | if (
56 | typeof currentIndex === 'number' &&
57 | currentIndex < missingCoverageElements.length - 1
58 | ) {
59 | nextIndex = currentIndex + 1;
60 | }
61 |
62 | makeCurrent(nextIndex);
63 | }
64 |
65 | return function jump(event) {
66 | switch (event.which) {
67 | case 78: // n
68 | case 74: // j
69 | goToNext();
70 | break;
71 | case 66: // b
72 | case 75: // k
73 | case 80: // p
74 | goToPrevious();
75 | break;
76 | }
77 | };
78 | })();
79 | window.addEventListener('keydown', jumpToCode);
80 |
--------------------------------------------------------------------------------
/coverage/lcov-report/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Code coverage report for All files
7 |
8 |
9 |
10 |
11 |
16 |
17 |
18 |
19 |
20 |
21 |
All files
22 |
23 |
24 |
25 | 46.73%
26 | Statements
27 | 157/336
28 |
29 |
30 |
31 |
32 | 28.69%
33 | Branches
34 | 68/237
35 |
36 |
37 |
38 |
39 | 16.98%
40 | Functions
41 | 9/53
42 |
43 |
44 |
45 |
46 | 44.77%
47 | Lines
48 | 107/239
49 |
50 |
51 |
52 |
53 |
54 | Press n or j to go to the next uncovered block, b, p or k for the previous block.
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 | File |
63 | |
64 | Statements |
65 | |
66 | Branches |
67 | |
68 | Functions |
69 | |
70 | Lines |
71 | |
72 |
73 |
74 |
75 | lib/component/ReactVirtualizedScroll |
76 |
77 |
78 | |
79 | 48.4% |
80 | 91/188 |
81 | 34.06% |
82 | 47/138 |
83 | 22.58% |
84 | 7/31 |
85 | 41.91% |
86 | 57/136 |
87 |
88 |
89 |
90 | src/component/ReactVirtualizedScroll |
91 |
92 |
93 | |
94 | 44.59% |
95 | 66/148 |
96 | 21.21% |
97 | 21/99 |
98 | 9.09% |
99 | 2/22 |
100 | 48.54% |
101 | 50/103 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
118 |
119 |
120 |
125 |
126 |
127 |
128 |
129 |
--------------------------------------------------------------------------------
/coverage/lcov-report/index.tsx.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Code coverage report for index.tsx
7 |
8 |
9 |
10 |
11 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 | 100%
26 | Statements
27 | 2/2
28 |
29 |
30 |
31 |
32 | 100%
33 | Branches
34 | 0/0
35 |
36 |
37 |
38 |
39 | 100%
40 | Functions
41 | 0/0
42 |
43 |
44 |
45 |
46 | 100%
47 | Lines
48 | 2/2
49 |
50 |
51 |
52 |
53 |
54 | Press n or j to go to the next uncovered block, b, p or k for the previous block.
55 |
56 |
57 |
58 |
59 | 1
60 | 2
61 | 3
62 | 4 | 1x
63 |
64 | 1x
65 | | import ReactVirtualizedScroll from './ReactVirtualizedScroll'
66 |
67 | export { ReactVirtualizedScroll }
68 | |
69 |
70 |
71 |
72 |
77 |
78 |
79 |
84 |
85 |
86 |
87 |
88 |
--------------------------------------------------------------------------------
/coverage/lcov-report/lib/component/ReactVirtualizedScroll/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Code coverage report for lib/component/ReactVirtualizedScroll
7 |
8 |
9 |
10 |
11 |
16 |
17 |
18 |
19 |
20 |
21 |
All files lib/component/ReactVirtualizedScroll
22 |
23 |
24 |
25 | 48.4%
26 | Statements
27 | 91/188
28 |
29 |
30 |
31 |
32 | 34.06%
33 | Branches
34 | 47/138
35 |
36 |
37 |
38 |
39 | 22.58%
40 | Functions
41 | 7/31
42 |
43 |
44 |
45 |
46 | 41.91%
47 | Lines
48 | 57/136
49 |
50 |
51 |
52 |
53 |
54 | Press n or j to go to the next uncovered block, b, p or k for the previous block.
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 | File |
63 | |
64 | Statements |
65 | |
66 | Branches |
67 | |
68 | Functions |
69 | |
70 | Lines |
71 | |
72 |
73 |
74 |
75 | ReactVirtualizedScroll.js |
76 |
77 |
78 | |
79 | 46.43% |
80 | 78/168 |
81 | 31.3% |
82 | 41/131 |
83 | 21.43% |
84 | 6/28 |
85 | 37.29% |
86 | 44/118 |
87 |
88 |
89 |
90 | index.js |
91 |
92 |
93 | |
94 | 100% |
95 | 6/6 |
96 | 85.71% |
97 | 6/7 |
98 | 100% |
99 | 1/1 |
100 | 100% |
101 | 6/6 |
102 |
103 |
104 |
105 | svg.js |
106 |
107 |
108 | |
109 | 100% |
110 | 3/3 |
111 | 100% |
112 | 0/0 |
113 | 100% |
114 | 0/0 |
115 | 100% |
116 | 3/3 |
117 |
118 |
119 |
120 | utils.js |
121 |
122 |
123 | |
124 | 36.36% |
125 | 4/11 |
126 | 100% |
127 | 0/0 |
128 | 0% |
129 | 0/2 |
130 | 44.44% |
131 | 4/9 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
148 |
149 |
150 |
155 |
156 |
157 |
158 |
159 |
--------------------------------------------------------------------------------
/coverage/lcov-report/lib/component/ReactVirtualizedScroll/index.js.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Code coverage report for lib/component/ReactVirtualizedScroll/index.js
7 |
8 |
9 |
10 |
11 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 | 100%
26 | Statements
27 | 6/6
28 |
29 |
30 |
31 |
32 | 85.71%
33 | Branches
34 | 6/7
35 |
36 |
37 |
38 |
39 | 100%
40 | Functions
41 | 1/1
42 |
43 |
44 |
45 |
46 | 100%
47 | Lines
48 | 6/6
49 |
50 |
51 |
52 |
53 |
54 | Press n or j to go to the next uncovered block, b, p or k for the previous block.
55 |
56 |
57 |
58 |
59 | 1
60 | 2
61 | 3
62 | 4
63 | 5
64 | 6
65 | 7
66 | 8
67 | 9 |
68 | 1x
69 | 1x
70 |
71 | 1x
72 | 1x
73 | 1x
74 | 1x
75 | | "use strict";
76 | var __importDefault = (this && this.__importDefault) || function (mod) {
77 | return (mod && mod.__esModule) ? mod : { "default": mod };
78 | };
79 | Object.defineProperty(exports, "__esModule", { value: true });
80 | var ReactVirtualizedScroll_1 = __importDefault(require("./ReactVirtualizedScroll"));
81 | var utils_js_1 = require("./utils.js");
82 | exports.default = { ReactVirtualizedScroll: ReactVirtualizedScroll_1.default, useStateAndRef: utils_js_1.useStateAndRef };
83 | |
84 |
85 |
86 |
87 |
96 |
97 |
98 |
103 |
104 |
105 |
106 |
107 |
--------------------------------------------------------------------------------
/coverage/lcov-report/lib/component/ReactVirtualizedScroll/svg.js.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Code coverage report for lib/component/ReactVirtualizedScroll/svg.js
7 |
8 |
9 |
10 |
11 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 | 100%
26 | Statements
27 | 3/3
28 |
29 |
30 |
31 |
32 | 100%
33 | Branches
34 | 0/0
35 |
36 |
37 |
38 |
39 | 100%
40 | Functions
41 | 0/0
42 |
43 |
44 |
45 |
46 | 100%
47 | Lines
48 | 3/3
49 |
50 |
51 |
52 |
53 |
54 | Press n or j to go to the next uncovered block, b, p or k for the previous block.
55 |
56 |
57 |
58 |
59 | 1
60 | 2
61 | 3
62 | 4
63 | 5 |
64 | 1x
65 | 1x
66 | 1x
67 | | "use strict";
68 | Object.defineProperty(exports, "__esModule", { value: true });
69 | exports.loading_pullup = void 0;
70 | exports.loading_pullup = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3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I+DQogIDxhbmltYXRlIGF0dHJpYnV0ZU5hbWU9InIiIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIiBkdXI9IjEuNDQ5Mjc1MzYyMzE4ODQwNHMiIGNhbGNNb2RlPSJzcGxpbmUiIGtleVRpbWVzPSIwOzAuMjU7MC41OzAuNzU7MSIgdmFsdWVzPSIwOzA7MTA7MTA7MTAiIGtleVNwbGluZXM9IjAgMC41IDAuNSAxOzAgMC41IDAuNSAxOzAgMC41IDAuNSAxOzAgMC41IDAuNSAxIiBiZWdpbj0iLTEuMDg2OTU2NTIxNzM5MTMwNHMiPjwvYW5pbWF0ZT4NCiAgPGFuaW1hdGUgYXR0cmlidXRlTmFtZT0iY3giIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIiBkdXI9IjEuNDQ5Mjc1MzYyMzE4ODQwNHMiIGNhbGNNb2RlPSJzcGxpbmUiIGtleVRpbWVzPSIwOzAuMjU7MC41OzAuNzU7MSIgdmFsdWVzPSIxNjsxNjsxNjs1MDs4NCIga2V5U3BsaW5lcz0iMCAwLjUgMC41IDE7MCAwLjUgMC41IDE7MCAwLjUgMC41IDE7MCAwLjUgMC41IDEiIGJlZ2luPSItMS4wODY5NTY1MjE3MzkxMzA0cyI+PC9hbmltYXRlPg0KPC9jaXJjbGU+DQo8L3N2Zz4=';
71 | |
72 |
73 |
74 |
75 |
84 |
85 |
86 |
91 |
92 |
93 |
94 |
95 |
--------------------------------------------------------------------------------
/coverage/lcov-report/lib/component/ReactVirtualizedScroll/utils.js.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Code coverage report for lib/component/ReactVirtualizedScroll/utils.js
7 |
8 |
9 |
10 |
11 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 | 36.36%
26 | Statements
27 | 4/11
28 |
29 |
30 |
31 |
32 | 100%
33 | Branches
34 | 0/0
35 |
36 |
37 |
38 |
39 | 0%
40 | Functions
41 | 0/2
42 |
43 |
44 |
45 |
46 | 44.44%
47 | Lines
48 | 4/9
49 |
50 |
51 |
52 |
53 |
54 | Press n or j to go to the next uncovered block, b, p or k for the previous block.
55 |
56 |
57 |
58 |
59 | 1
60 | 2
61 | 3
62 | 4
63 | 5
64 | 6
65 | 7
66 | 8
67 | 9
68 | 10
69 | 11
70 | 12
71 | 13 |
72 | 1x
73 | 1x
74 | 1x
75 | 1x
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 | | "use strict";
84 | Object.defineProperty(exports, "__esModule", { value: true });
85 | exports.useStateAndRef = void 0;
86 | var react_1 = require("react");
87 | exports.useStateAndRef = function (data) {
88 | var _a = react_1.useState(data), data = _a[0], setData = _a[1];
89 | var dataRef = react_1.useRef(data);
90 | react_1.useEffect(function () {
91 | dataRef.current = data;
92 | }, [data]);
93 | return [data, setData, dataRef];
94 | };
95 | |
96 |
97 |
98 |
99 |
108 |
109 |
110 |
115 |
116 |
117 |
118 |
119 |
--------------------------------------------------------------------------------
/coverage/lcov-report/prettify.css:
--------------------------------------------------------------------------------
1 | .pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.pun,.opn,.clo{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.str{color:#060}.kwd{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:bold}.lit{color:#044}.pun,.opn,.clo{color:#440}.tag{color:#006;font-weight:bold}.atn{color:#404}.atv{color:#060}}pre.prettyprint{padding:2px;border:1px solid #888}ol.linenums{margin-top:0;margin-bottom:0}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee}
2 |
--------------------------------------------------------------------------------
/coverage/lcov-report/prettify.js:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 | window.PR_SHOULD_USE_CONTINUATION=true;(function(){var h=["break,continue,do,else,for,if,return,while"];var u=[h,"auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"];var p=[u,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"];var l=[p,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,export,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"];var x=[p,"abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"];var R=[x,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,interface,internal,into,is,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var"];var r="all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,true,try,unless,until,when,while,yes";var w=[p,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"];var s="caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END";var I=[h,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"];var f=[h,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"];var H=[h,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"];var A=[l,R,w,s+I,f,H];var e=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/;var C="str";var z="kwd";var j="com";var O="typ";var G="lit";var L="pun";var F="pln";var m="tag";var E="dec";var J="src";var P="atn";var n="atv";var N="nocode";var M="(?:^^\\.?|[+-]|\\!|\\!=|\\!==|\\#|\\%|\\%=|&|&&|&&=|&=|\\(|\\*|\\*=|\\+=|\\,|\\-=|\\->|\\/|\\/=|:|::|\\;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|\\?|\\@|\\[|\\^|\\^=|\\^\\^|\\^\\^=|\\{|\\||\\|=|\\|\\||\\|\\|=|\\~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function k(Z){var ad=0;var S=false;var ac=false;for(var V=0,U=Z.length;V122)){if(!(al<65||ag>90)){af.push([Math.max(65,ag)|32,Math.min(al,90)|32])}if(!(al<97||ag>122)){af.push([Math.max(97,ag)&~32,Math.min(al,122)&~32])}}}}af.sort(function(av,au){return(av[0]-au[0])||(au[1]-av[1])});var ai=[];var ap=[NaN,NaN];for(var ar=0;arat[0]){if(at[1]+1>at[0]){an.push("-")}an.push(T(at[1]))}}an.push("]");return an.join("")}function W(al){var aj=al.source.match(new RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)","g"));var ah=aj.length;var an=[];for(var ak=0,am=0;ak=2&&ai==="["){aj[ak]=X(ag)}else{if(ai!=="\\"){aj[ak]=ag.replace(/[a-zA-Z]/g,function(ao){var ap=ao.charCodeAt(0);return"["+String.fromCharCode(ap&~32,ap|32)+"]"})}}}}return aj.join("")}var aa=[];for(var V=0,U=Z.length;V=0;){S[ac.charAt(ae)]=Y}}var af=Y[1];var aa=""+af;if(!ag.hasOwnProperty(aa)){ah.push(af);ag[aa]=null}}ah.push(/[\0-\uffff]/);V=k(ah)})();var X=T.length;var W=function(ah){var Z=ah.sourceCode,Y=ah.basePos;var ad=[Y,F];var af=0;var an=Z.match(V)||[];var aj={};for(var ae=0,aq=an.length;ae=5&&"lang-"===ap.substring(0,5);if(am&&!(ai&&typeof ai[1]==="string")){am=false;ap=J}if(!am){aj[ag]=ap}}var ab=af;af+=ag.length;if(!am){ad.push(Y+ab,ap)}else{var al=ai[1];var ak=ag.indexOf(al);var ac=ak+al.length;if(ai[2]){ac=ag.length-ai[2].length;ak=ac-al.length}var ar=ap.substring(5);B(Y+ab,ag.substring(0,ak),W,ad);B(Y+ab+ak,al,q(ar,al),ad);B(Y+ab+ac,ag.substring(ac),W,ad)}}ah.decorations=ad};return W}function i(T){var W=[],S=[];if(T.tripleQuotedStrings){W.push([C,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,"'\""])}else{if(T.multiLineStrings){W.push([C,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"])}else{W.push([C,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,"\"'"])}}if(T.verbatimStrings){S.push([C,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null])}var Y=T.hashComments;if(Y){if(T.cStyleComments){if(Y>1){W.push([j,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"])}else{W.push([j,/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"])}S.push([C,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,null])}else{W.push([j,/^#[^\r\n]*/,null,"#"])}}if(T.cStyleComments){S.push([j,/^\/\/[^\r\n]*/,null]);S.push([j,/^\/\*[\s\S]*?(?:\*\/|$)/,null])}if(T.regexLiterals){var X=("/(?=[^/*])(?:[^/\\x5B\\x5C]|\\x5C[\\s\\S]|\\x5B(?:[^\\x5C\\x5D]|\\x5C[\\s\\S])*(?:\\x5D|$))+/");S.push(["lang-regex",new RegExp("^"+M+"("+X+")")])}var V=T.types;if(V){S.push([O,V])}var U=(""+T.keywords).replace(/^ | $/g,"");if(U.length){S.push([z,new RegExp("^(?:"+U.replace(/[\s,]+/g,"|")+")\\b"),null])}W.push([F,/^\s+/,null," \r\n\t\xA0"]);S.push([G,/^@[a-z_$][a-z_$@0-9]*/i,null],[O,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[F,/^[a-z_$][a-z_$@0-9]*/i,null],[G,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[F,/^\\[\s\S]?/,null],[L,/^.[^\s\w\.$@\'\"\`\/\#\\]*/,null]);return g(W,S)}var K=i({keywords:A,hashComments:true,cStyleComments:true,multiLineStrings:true,regexLiterals:true});function Q(V,ag){var U=/(?:^|\s)nocode(?:\s|$)/;var ab=/\r\n?|\n/;var ac=V.ownerDocument;var S;if(V.currentStyle){S=V.currentStyle.whiteSpace}else{if(window.getComputedStyle){S=ac.defaultView.getComputedStyle(V,null).getPropertyValue("white-space")}}var Z=S&&"pre"===S.substring(0,3);var af=ac.createElement("LI");while(V.firstChild){af.appendChild(V.firstChild)}var W=[af];function ae(al){switch(al.nodeType){case 1:if(U.test(al.className)){break}if("BR"===al.nodeName){ad(al);if(al.parentNode){al.parentNode.removeChild(al)}}else{for(var an=al.firstChild;an;an=an.nextSibling){ae(an)}}break;case 3:case 4:if(Z){var am=al.nodeValue;var aj=am.match(ab);if(aj){var ai=am.substring(0,aj.index);al.nodeValue=ai;var ah=am.substring(aj.index+aj[0].length);if(ah){var ak=al.parentNode;ak.insertBefore(ac.createTextNode(ah),al.nextSibling)}ad(al);if(!ai){al.parentNode.removeChild(al)}}}break}}function ad(ak){while(!ak.nextSibling){ak=ak.parentNode;if(!ak){return}}function ai(al,ar){var aq=ar?al.cloneNode(false):al;var ao=al.parentNode;if(ao){var ap=ai(ao,1);var an=al.nextSibling;ap.appendChild(aq);for(var am=an;am;am=an){an=am.nextSibling;ap.appendChild(am)}}return aq}var ah=ai(ak.nextSibling,0);for(var aj;(aj=ah.parentNode)&&aj.nodeType===1;){ah=aj}W.push(ah)}for(var Y=0;Y=S){ah+=2}if(V>=ap){Z+=2}}}var t={};function c(U,V){for(var S=V.length;--S>=0;){var T=V[S];if(!t.hasOwnProperty(T)){t[T]=U}else{if(window.console){console.warn("cannot override language handler %s",T)}}}}function q(T,S){if(!(T&&t.hasOwnProperty(T))){T=/^\s*]*(?:>|$)/],[j,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[L,/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^
150 |
155 |
156 |
157 |