react-resizable 3.0.0 → 3.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,170 +0,0 @@
1
- /* eslint-disable */
2
- var addSorting = (function() {
3
- 'use strict';
4
- var cols,
5
- currentSort = {
6
- index: 0,
7
- desc: false
8
- };
9
-
10
- // returns the summary table element
11
- function getTable() {
12
- return document.querySelector('.coverage-summary');
13
- }
14
- // returns the thead element of the summary table
15
- function getTableHeader() {
16
- return getTable().querySelector('thead tr');
17
- }
18
- // returns the tbody element of the summary table
19
- function getTableBody() {
20
- return getTable().querySelector('tbody');
21
- }
22
- // returns the th element for nth column
23
- function getNthColumn(n) {
24
- return getTableHeader().querySelectorAll('th')[n];
25
- }
26
-
27
- // loads all columns
28
- function loadColumns() {
29
- var colNodes = getTableHeader().querySelectorAll('th'),
30
- colNode,
31
- cols = [],
32
- col,
33
- i;
34
-
35
- for (i = 0; i < colNodes.length; i += 1) {
36
- colNode = colNodes[i];
37
- col = {
38
- key: colNode.getAttribute('data-col'),
39
- sortable: !colNode.getAttribute('data-nosort'),
40
- type: colNode.getAttribute('data-type') || 'string'
41
- };
42
- cols.push(col);
43
- if (col.sortable) {
44
- col.defaultDescSort = col.type === 'number';
45
- colNode.innerHTML =
46
- colNode.innerHTML + '<span class="sorter"></span>';
47
- }
48
- }
49
- return cols;
50
- }
51
- // attaches a data attribute to every tr element with an object
52
- // of data values keyed by column name
53
- function loadRowData(tableRow) {
54
- var tableCols = tableRow.querySelectorAll('td'),
55
- colNode,
56
- col,
57
- data = {},
58
- i,
59
- val;
60
- for (i = 0; i < tableCols.length; i += 1) {
61
- colNode = tableCols[i];
62
- col = cols[i];
63
- val = colNode.getAttribute('data-value');
64
- if (col.type === 'number') {
65
- val = Number(val);
66
- }
67
- data[col.key] = val;
68
- }
69
- return data;
70
- }
71
- // loads all row data
72
- function loadData() {
73
- var rows = getTableBody().querySelectorAll('tr'),
74
- i;
75
-
76
- for (i = 0; i < rows.length; i += 1) {
77
- rows[i].data = loadRowData(rows[i]);
78
- }
79
- }
80
- // sorts the table using the data for the ith column
81
- function sortByIndex(index, desc) {
82
- var key = cols[index].key,
83
- sorter = function(a, b) {
84
- a = a.data[key];
85
- b = b.data[key];
86
- return a < b ? -1 : a > b ? 1 : 0;
87
- },
88
- finalSorter = sorter,
89
- tableBody = document.querySelector('.coverage-summary tbody'),
90
- rowNodes = tableBody.querySelectorAll('tr'),
91
- rows = [],
92
- i;
93
-
94
- if (desc) {
95
- finalSorter = function(a, b) {
96
- return -1 * sorter(a, b);
97
- };
98
- }
99
-
100
- for (i = 0; i < rowNodes.length; i += 1) {
101
- rows.push(rowNodes[i]);
102
- tableBody.removeChild(rowNodes[i]);
103
- }
104
-
105
- rows.sort(finalSorter);
106
-
107
- for (i = 0; i < rows.length; i += 1) {
108
- tableBody.appendChild(rows[i]);
109
- }
110
- }
111
- // removes sort indicators for current column being sorted
112
- function removeSortIndicators() {
113
- var col = getNthColumn(currentSort.index),
114
- cls = col.className;
115
-
116
- cls = cls.replace(/ sorted$/, '').replace(/ sorted-desc$/, '');
117
- col.className = cls;
118
- }
119
- // adds sort indicators for current column being sorted
120
- function addSortIndicators() {
121
- getNthColumn(currentSort.index).className += currentSort.desc
122
- ? ' sorted-desc'
123
- : ' sorted';
124
- }
125
- // adds event listeners for all sorter widgets
126
- function enableUI() {
127
- var i,
128
- el,
129
- ithSorter = function ithSorter(i) {
130
- var col = cols[i];
131
-
132
- return function() {
133
- var desc = col.defaultDescSort;
134
-
135
- if (currentSort.index === i) {
136
- desc = !currentSort.desc;
137
- }
138
- sortByIndex(i, desc);
139
- removeSortIndicators();
140
- currentSort.index = i;
141
- currentSort.desc = desc;
142
- addSortIndicators();
143
- };
144
- };
145
- for (i = 0; i < cols.length; i += 1) {
146
- if (cols[i].sortable) {
147
- // add the click event handler on the th so users
148
- // dont have to click on those tiny arrows
149
- el = getNthColumn(i).querySelector('.sorter').parentElement;
150
- if (el.addEventListener) {
151
- el.addEventListener('click', ithSorter(i));
152
- } else {
153
- el.attachEvent('onclick', ithSorter(i));
154
- }
155
- }
156
- }
157
- }
158
- // adds sorting functionality to the UI
159
- return function() {
160
- if (!getTable()) {
161
- return;
162
- }
163
- cols = loadColumns();
164
- loadData();
165
- addSortIndicators();
166
- enableUI();
167
- };
168
- })();
169
-
170
- window.addEventListener('load', addSorting);
@@ -1,122 +0,0 @@
1
-
2
- <!doctype html>
3
- <html lang="en">
4
-
5
- <head>
6
- <title>Code coverage report for utils.js</title>
7
- <meta charset="utf-8" />
8
- <link rel="stylesheet" href="prettify.css" />
9
- <link rel="stylesheet" href="base.css" />
10
- <link rel="shortcut icon" type="image/x-icon" href="favicon.png" />
11
- <meta name="viewport" content="width=device-width, initial-scale=1" />
12
- <style type='text/css'>
13
- .coverage-summary .sorter {
14
- background-image: url(sort-arrow-sprite.png);
15
- }
16
- </style>
17
- </head>
18
-
19
- <body>
20
- <div class='wrapper'>
21
- <div class='pad1'>
22
- <h1><a href="index.html">All files</a> utils.js</h1>
23
- <div class='clearfix'>
24
-
25
- <div class='fl pad1y space-right2'>
26
- <span class="strong">80% </span>
27
- <span class="quiet">Statements</span>
28
- <span class='fraction'>4/5</span>
29
- </div>
30
-
31
-
32
- <div class='fl pad1y space-right2'>
33
- <span class="strong">75% </span>
34
- <span class="quiet">Branches</span>
35
- <span class='fraction'>6/8</span>
36
- </div>
37
-
38
-
39
- <div class='fl pad1y space-right2'>
40
- <span class="strong">100% </span>
41
- <span class="quiet">Functions</span>
42
- <span class='fraction'>1/1</span>
43
- </div>
44
-
45
-
46
- <div class='fl pad1y space-right2'>
47
- <span class="strong">80% </span>
48
- <span class="quiet">Lines</span>
49
- <span class='fraction'>4/5</span>
50
- </div>
51
-
52
-
53
- </div>
54
- <p class="quiet">
55
- Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
56
- </p>
57
- </div>
58
- <div class='status-line high'></div>
59
- <pre><table class="coverage">
60
- <tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
61
- <a name='L2'></a><a href='#L2'>2</a>
62
- <a name='L3'></a><a href='#L3'>3</a>
63
- <a name='L4'></a><a href='#L4'>4</a>
64
- <a name='L5'></a><a href='#L5'>5</a>
65
- <a name='L6'></a><a href='#L6'>6</a>
66
- <a name='L7'></a><a href='#L7'>7</a>
67
- <a name='L8'></a><a href='#L8'>8</a>
68
- <a name='L9'></a><a href='#L9'>9</a>
69
- <a name='L10'></a><a href='#L10'>10</a>
70
- <a name='L11'></a><a href='#L11'>11</a>
71
- <a name='L12'></a><a href='#L12'>12</a>
72
- <a name='L13'></a><a href='#L13'>13</a>
73
- <a name='L14'></a><a href='#L14'>14</a>
74
- <a name='L15'></a><a href='#L15'>15</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral">&nbsp;</span>
75
- <span class="cline-any cline-neutral">&nbsp;</span>
76
- <span class="cline-any cline-neutral">&nbsp;</span>
77
- <span class="cline-any cline-neutral">&nbsp;</span>
78
- <span class="cline-any cline-neutral">&nbsp;</span>
79
- <span class="cline-any cline-neutral">&nbsp;</span>
80
- <span class="cline-any cline-yes">11x</span>
81
- <span class="cline-any cline-no">&nbsp;</span>
82
- <span class="cline-any cline-neutral">&nbsp;</span>
83
- <span class="cline-any cline-yes">11x</span>
84
- <span class="cline-any cline-yes">2x</span>
85
- <span class="cline-any cline-neutral">&nbsp;</span>
86
- <span class="cline-any cline-yes">11x</span>
87
- <span class="cline-any cline-neutral">&nbsp;</span>
88
- <span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">// @flow
89
- import React from 'react';
90
- import type {Element as ReactElement} from 'react';
91
- &nbsp;
92
- // React.addons.cloneWithProps look-alike that merges style &amp; className.
93
- export function cloneElement(element: ReactElement&lt;any&gt;, props: Object): ReactElement&lt;any&gt; {
94
- <span class="missing-if-branch" title="if path not taken" >I</span>if (props.style &amp;&amp; <span class="branch-1 cbranch-no" title="branch not covered" >element.props.style)</span> {
95
- <span class="cstat-no" title="statement not covered" > props.style = {...element.props.style, ...props.style};</span>
96
- }
97
- if (props.className &amp;&amp; element.props.className) {
98
- props.className = `${element.props.className} ${props.className}`;
99
- }
100
- return React.cloneElement(element, props);
101
- }
102
- &nbsp;</pre></td></tr></table></pre>
103
-
104
- <div class='push'></div><!-- for sticky footer -->
105
- </div><!-- /wrapper -->
106
- <div class='footer quiet pad2 space-top1 center small'>
107
- Code coverage generated by
108
- <a href="https://istanbul.js.org/" target="_blank">istanbul</a>
109
- at Mon May 10 2021 11:36:10 GMT-0400 (Eastern Daylight Time)
110
- </div>
111
- </div>
112
- <script src="prettify.js"></script>
113
- <script>
114
- window.onload = function () {
115
- prettyPrint();
116
- };
117
- </script>
118
- <script src="sorter.js"></script>
119
- <script src="block-navigation.js"></script>
120
- </body>
121
- </html>
122
-
@@ -1,236 +0,0 @@
1
- TN:
2
- SF:lib/Resizable.js
3
- FN:28,(anonymous_0)
4
- FN:32,(anonymous_1)
5
- FN:38,(anonymous_2)
6
- FN:43,(anonymous_3)
7
- FN:93,(anonymous_4)
8
- FN:94,(anonymous_5)
9
- FN:156,(anonymous_6)
10
- FN:167,(anonymous_7)
11
- FN:183,(anonymous_8)
12
- FNF:9
13
- FNH:6
14
- FNDA:0,(anonymous_0)
15
- FNDA:0,(anonymous_1)
16
- FNDA:0,(anonymous_2)
17
- FNDA:10,(anonymous_3)
18
- FNDA:111,(anonymous_4)
19
- FNDA:10,(anonymous_5)
20
- FNDA:37,(anonymous_6)
21
- FNDA:11,(anonymous_7)
22
- FNDA:37,(anonymous_8)
23
- DA:12,2
24
- DA:14,2
25
- DA:24,11
26
- DA:25,11
27
- DA:26,11
28
- DA:29,0
29
- DA:33,0
30
- DA:34,0
31
- DA:35,0
32
- DA:39,0
33
- DA:44,10
34
- DA:45,10
35
- DA:48,10
36
- DA:49,0
37
- DA:50,0
38
- DA:51,0
39
- DA:52,0
40
- DA:53,0
41
- DA:57,0
42
- DA:58,0
43
- DA:59,0
44
- DA:63,10
45
- DA:68,10
46
- DA:69,10
47
- DA:70,10
48
- DA:72,10
49
- DA:73,10
50
- DA:74,10
51
- DA:76,10
52
- DA:77,10
53
- DA:78,10
54
- DA:82,10
55
- DA:84,10
56
- DA:94,111
57
- DA:96,10
58
- DA:99,10
59
- DA:100,10
60
- DA:102,10
61
- DA:105,10
62
- DA:106,10
63
- DA:111,10
64
- DA:112,10
65
- DA:116,7
66
- DA:117,5
67
- DA:118,5
68
- DA:120,7
69
- DA:121,5
70
- DA:122,5
71
- DA:126,10
72
- DA:129,10
73
- DA:130,10
74
- DA:133,10
75
- DA:134,10
76
- DA:137,10
77
- DA:139,10
78
- DA:142,10
79
- DA:144,10
80
- DA:145,10
81
- DA:146,9
82
- DA:147,9
83
- DA:151,10
84
- DA:157,37
85
- DA:158,37
86
- DA:159,9
87
- DA:160,4
88
- DA:162,5
89
- DA:164,28
90
- DA:172,11
91
- DA:178,11
92
- DA:185,37
93
- DA:186,37
94
- LF:71
95
- LH:58
96
- BRDA:45,0,0,0
97
- BRDA:45,0,1,10
98
- BRDA:45,1,0,10
99
- BRDA:45,1,1,0
100
- BRDA:48,2,0,0
101
- BRDA:48,2,1,10
102
- BRDA:50,3,0,0
103
- BRDA:50,3,1,0
104
- BRDA:68,4,0,10
105
- BRDA:68,4,1,3
106
- BRDA:72,5,0,10
107
- BRDA:72,5,1,0
108
- BRDA:76,6,0,10
109
- BRDA:76,6,1,0
110
- BRDA:96,7,0,0
111
- BRDA:96,7,1,10
112
- BRDA:99,8,0,10
113
- BRDA:99,8,1,0
114
- BRDA:99,8,2,10
115
- BRDA:99,8,3,10
116
- BRDA:100,9,0,10
117
- BRDA:100,9,1,0
118
- BRDA:100,9,2,10
119
- BRDA:100,9,3,10
120
- BRDA:102,10,0,0
121
- BRDA:102,10,1,10
122
- BRDA:102,11,0,10
123
- BRDA:102,11,1,0
124
- BRDA:112,12,0,7
125
- BRDA:112,12,1,3
126
- BRDA:116,13,0,5
127
- BRDA:116,13,1,2
128
- BRDA:120,14,0,5
129
- BRDA:120,14,1,2
130
- BRDA:129,15,0,8
131
- BRDA:129,15,1,2
132
- BRDA:130,16,0,8
133
- BRDA:130,16,1,2
134
- BRDA:133,17,0,10
135
- BRDA:133,17,1,0
136
- BRDA:134,18,0,10
137
- BRDA:134,18,1,0
138
- BRDA:139,19,0,10
139
- BRDA:139,19,1,2
140
- BRDA:142,20,0,10
141
- BRDA:142,20,1,0
142
- BRDA:144,21,0,10
143
- BRDA:144,21,1,10
144
- BRDA:145,22,0,9
145
- BRDA:145,22,1,1
146
- BRDA:145,23,0,10
147
- BRDA:145,23,1,10
148
- BRDA:146,24,0,0
149
- BRDA:146,24,1,9
150
- BRDA:151,25,0,0
151
- BRDA:151,25,1,10
152
- BRDA:158,26,0,9
153
- BRDA:158,26,1,28
154
- BRDA:159,27,0,4
155
- BRDA:159,27,1,5
156
- BRDA:180,28,0,10
157
- BRDA:180,28,1,1
158
- BRDA:185,29,0,37
159
- BRDA:185,29,1,37
160
- BRF:64
161
- BRH:47
162
- end_of_record
163
- TN:
164
- SF:lib/ResizableBox.js
165
- FN:31,(anonymous_0)
166
- FN:44,(anonymous_1)
167
- FN:48,(anonymous_2)
168
- FN:54,(anonymous_3)
169
- FNF:4
170
- FNH:4
171
- FNDA:7,(anonymous_0)
172
- FNDA:1,(anonymous_1)
173
- FNDA:1,(anonymous_2)
174
- FNDA:7,(anonymous_3)
175
- DA:19,1
176
- DA:24,6
177
- DA:33,7
178
- DA:34,0
179
- DA:41,7
180
- DA:44,6
181
- DA:45,1
182
- DA:46,1
183
- DA:47,1
184
- DA:48,1
185
- DA:50,0
186
- DA:75,7
187
- DA:77,7
188
- LF:13
189
- LH:11
190
- BRDA:33,0,0,0
191
- BRDA:33,0,1,7
192
- BRDA:33,1,0,7
193
- BRDA:33,1,1,7
194
- BRDA:46,2,0,1
195
- BRDA:46,2,1,0
196
- BRDA:47,3,0,1
197
- BRDA:47,3,1,1
198
- BRDA:48,4,0,1
199
- BRDA:48,4,1,1
200
- BRF:10
201
- BRH:8
202
- end_of_record
203
- TN:
204
- SF:lib/propTypes.js
205
- FNF:0
206
- FNH:0
207
- DA:55,2
208
- LF:1
209
- LH:1
210
- BRF:0
211
- BRH:0
212
- end_of_record
213
- TN:
214
- SF:lib/utils.js
215
- FN:6,cloneElement
216
- FNF:1
217
- FNH:1
218
- FNDA:11,cloneElement
219
- DA:7,11
220
- DA:8,0
221
- DA:10,11
222
- DA:11,2
223
- DA:13,11
224
- LF:5
225
- LH:4
226
- BRDA:7,0,0,0
227
- BRDA:7,0,1,11
228
- BRDA:7,1,0,11
229
- BRDA:7,1,1,0
230
- BRDA:10,2,0,2
231
- BRDA:10,2,1,9
232
- BRDA:10,3,0,11
233
- BRDA:10,3,1,11
234
- BRF:8
235
- BRH:6
236
- end_of_record