table 3.8.2 → 3.8.3

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.
@@ -4,321 +4,6 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
 
7
- var cov_9n6q52jtc = function () {
8
- var path = '/Users/gajuskuizinas/Documents/dev/gajus/table/src/mapDataUsingRowHeightIndex.js',
9
- hash = 'ef60a93a63cc52a2b2024b7c01e8fc35b8ef865f',
10
- global = new Function('return this')(),
11
- gcv = '__coverage__',
12
- coverageData = {
13
- path: '/Users/gajuskuizinas/Documents/dev/gajus/table/src/mapDataUsingRowHeightIndex.js',
14
- statementMap: {
15
- '0': {
16
- start: {
17
- line: 12,
18
- column: 21
19
- },
20
- end: {
21
- line: 12,
22
- column: 43
23
- }
24
- },
25
- '1': {
26
- start: {
27
- line: 14,
28
- column: 21
29
- },
30
- end: {
31
- line: 38,
32
- column: 4
33
- }
34
- },
35
- '2': {
36
- start: {
37
- line: 15,
38
- column: 22
39
- },
40
- end: {
41
- line: 17,
42
- column: 6
43
- }
44
- },
45
- '3': {
46
- start: {
47
- line: 16,
48
- column: 6
49
- },
50
- end: {
51
- line: 16,
52
- column: 43
53
- }
54
- },
55
- '4': {
56
- start: {
57
- line: 23,
58
- column: 4
59
- },
60
- end: {
61
- line: 35,
62
- column: 7
63
- }
64
- },
65
- '5': {
66
- start: {
67
- line: 26,
68
- column: 6
69
- },
70
- end: {
71
- line: 30,
72
- column: 7
73
- }
74
- },
75
- '6': {
76
- start: {
77
- line: 27,
78
- column: 8
79
- },
80
- end: {
81
- line: 27,
82
- column: 69
83
- }
84
- },
85
- '7': {
86
- start: {
87
- line: 29,
88
- column: 8
89
- },
90
- end: {
91
- line: 29,
92
- column: 71
93
- }
94
- },
95
- '8': {
96
- start: {
97
- line: 32,
98
- column: 6
99
- },
100
- end: {
101
- line: 34,
102
- column: 9
103
- }
104
- },
105
- '9': {
106
- start: {
107
- line: 33,
108
- column: 8
109
- },
110
- end: {
111
- line: 33,
112
- column: 41
113
- }
114
- },
115
- '10': {
116
- start: {
117
- line: 37,
118
- column: 4
119
- },
120
- end: {
121
- line: 37,
122
- column: 21
123
- }
124
- },
125
- '11': {
126
- start: {
127
- line: 40,
128
- column: 2
129
- },
130
- end: {
131
- line: 40,
132
- column: 31
133
- }
134
- }
135
- },
136
- fnMap: {
137
- '0': {
138
- name: '(anonymous_0)',
139
- decl: {
140
- start: {
141
- line: 11,
142
- column: 15
143
- },
144
- end: {
145
- line: 11,
146
- column: 16
147
- }
148
- },
149
- loc: {
150
- start: {
151
- line: 11,
152
- column: 57
153
- },
154
- end: {
155
- line: 41,
156
- column: 1
157
- }
158
- }
159
- },
160
- '1': {
161
- name: '(anonymous_1)',
162
- decl: {
163
- start: {
164
- line: 14,
165
- column: 41
166
- },
167
- end: {
168
- line: 14,
169
- column: 42
170
- }
171
- },
172
- loc: {
173
- start: {
174
- line: 14,
175
- column: 60
176
- },
177
- end: {
178
- line: 38,
179
- column: 3
180
- }
181
- }
182
- },
183
- '2': {
184
- name: '(anonymous_2)',
185
- decl: {
186
- start: {
187
- line: 15,
188
- column: 54
189
- },
190
- end: {
191
- line: 15,
192
- column: 55
193
- }
194
- },
195
- loc: {
196
- start: {
197
- line: 15,
198
- column: 60
199
- },
200
- end: {
201
- line: 17,
202
- column: 5
203
- }
204
- }
205
- },
206
- '3': {
207
- name: '(anonymous_3)',
208
- decl: {
209
- start: {
210
- line: 23,
211
- column: 21
212
- },
213
- end: {
214
- line: 23,
215
- column: 22
216
- }
217
- },
218
- loc: {
219
- start: {
220
- line: 23,
221
- column: 40
222
- },
223
- end: {
224
- line: 35,
225
- column: 5
226
- }
227
- }
228
- },
229
- '4': {
230
- name: '(anonymous_4)',
231
- decl: {
232
- start: {
233
- line: 32,
234
- column: 30
235
- },
236
- end: {
237
- line: 32,
238
- column: 31
239
- }
240
- },
241
- loc: {
242
- start: {
243
- line: 32,
244
- column: 48
245
- },
246
- end: {
247
- line: 34,
248
- column: 7
249
- }
250
- }
251
- }
252
- },
253
- branchMap: {
254
- '0': {
255
- loc: {
256
- start: {
257
- line: 26,
258
- column: 6
259
- },
260
- end: {
261
- line: 30,
262
- column: 7
263
- }
264
- },
265
- type: 'if',
266
- locations: [{
267
- start: {
268
- line: 26,
269
- column: 6
270
- },
271
- end: {
272
- line: 30,
273
- column: 7
274
- }
275
- }, {
276
- start: {
277
- line: 26,
278
- column: 6
279
- },
280
- end: {
281
- line: 30,
282
- column: 7
283
- }
284
- }]
285
- }
286
- },
287
- s: {
288
- '0': 0,
289
- '1': 0,
290
- '2': 0,
291
- '3': 0,
292
- '4': 0,
293
- '5': 0,
294
- '6': 0,
295
- '7': 0,
296
- '8': 0,
297
- '9': 0,
298
- '10': 0,
299
- '11': 0
300
- },
301
- f: {
302
- '0': 0,
303
- '1': 0,
304
- '2': 0,
305
- '3': 0,
306
- '4': 0
307
- },
308
- b: {
309
- '0': [0, 0]
310
- }
311
- },
312
- coverage = global[gcv] || (global[gcv] = {});
313
-
314
- if (coverage[path] && coverage[path].hash === hash) {
315
- return coverage[path];
316
- }
317
-
318
- coverageData.hash = hash;
319
- return coverage[path] = coverageData;
320
- }();
321
-
322
7
  var _lodash = require('lodash');
323
8
 
324
9
  var _lodash2 = _interopRequireDefault(_lodash);
@@ -340,57 +25,34 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
340
25
  * @returns {Array}
341
26
  */
342
27
  exports.default = (unmappedRows, rowHeightIndex, config) => {
343
- ++cov_9n6q52jtc.f[0];
344
-
345
- const tableWidth = (++cov_9n6q52jtc.s[0], unmappedRows[0].length);
346
-
347
- const mappedRows = (++cov_9n6q52jtc.s[1], _lodash2.default.map(unmappedRows, (cells, index0) => {
348
- ++cov_9n6q52jtc.f[1];
349
-
350
- const rowHeight = (++cov_9n6q52jtc.s[2], _lodash2.default.times(rowHeightIndex[index0], () => {
351
- ++cov_9n6q52jtc.f[2];
352
- ++cov_9n6q52jtc.s[3];
28
+ const tableWidth = unmappedRows[0].length;
353
29
 
30
+ const mappedRows = _lodash2.default.map(unmappedRows, (cells, index0) => {
31
+ const rowHeight = _lodash2.default.times(rowHeightIndex[index0], () => {
354
32
  return _lodash2.default.fill(Array(tableWidth), '');
355
- }));
33
+ });
356
34
 
357
35
  // rowHeight
358
36
  // [{row index within rowSaw; index2}]
359
37
  // [{cell index within a virtual row; index1}]
360
38
 
361
- ++cov_9n6q52jtc.s[4];
362
39
  _lodash2.default.forEach(cells, (value, index1) => {
363
- ++cov_9n6q52jtc.f[3];
364
-
365
40
  let chunkedValue;
366
41
 
367
- ++cov_9n6q52jtc.s[5];
368
42
  if (config.columns[index1].wrapWord) {
369
- ++cov_9n6q52jtc.b[0][0];
370
- ++cov_9n6q52jtc.s[6];
371
-
372
43
  chunkedValue = (0, _wrapWord2.default)(value, config.columns[index1].width);
373
44
  } else {
374
- ++cov_9n6q52jtc.b[0][1];
375
- ++cov_9n6q52jtc.s[7];
376
-
377
45
  chunkedValue = (0, _wrapString2.default)(value, config.columns[index1].width);
378
46
  }
379
47
 
380
- ++cov_9n6q52jtc.s[8];
381
48
  _lodash2.default.forEach(chunkedValue, (part, index2) => {
382
- ++cov_9n6q52jtc.f[4];
383
- ++cov_9n6q52jtc.s[9];
384
-
385
49
  rowHeight[index2][index1] = part;
386
50
  });
387
51
  });
388
52
 
389
- ++cov_9n6q52jtc.s[10];
390
53
  return rowHeight;
391
- }));
54
+ });
392
55
 
393
- ++cov_9n6q52jtc.s[11];
394
56
  return _lodash2.default.flatten(mappedRows);
395
57
  };
396
58
 
@@ -4,150 +4,6 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
 
7
- var cov_twrxa7qlr = function () {
8
- var path = '/Users/gajuskuizinas/Documents/dev/gajus/table/src/padTableData.js',
9
- hash = '6e7c959e85570169d58cc4f337d2b17a58cea753',
10
- global = new Function('return this')(),
11
- gcv = '__coverage__',
12
- coverageData = {
13
- path: '/Users/gajuskuizinas/Documents/dev/gajus/table/src/padTableData.js',
14
- statementMap: {
15
- '0': {
16
- start: {
17
- line: 9,
18
- column: 2
19
- },
20
- end: {
21
- line: 15,
22
- column: 5
23
- }
24
- },
25
- '1': {
26
- start: {
27
- line: 10,
28
- column: 4
29
- },
30
- end: {
31
- line: 14,
32
- column: 7
33
- }
34
- },
35
- '2': {
36
- start: {
37
- line: 11,
38
- column: 21
39
- },
40
- end: {
41
- line: 11,
42
- column: 43
43
- }
44
- },
45
- '3': {
46
- start: {
47
- line: 13,
48
- column: 6
49
- },
50
- end: {
51
- line: 13,
52
- column: 92
53
- }
54
- }
55
- },
56
- fnMap: {
57
- '0': {
58
- name: '(anonymous_0)',
59
- decl: {
60
- start: {
61
- line: 8,
62
- column: 15
63
- },
64
- end: {
65
- line: 8,
66
- column: 16
67
- }
68
- },
69
- loc: {
70
- start: {
71
- line: 8,
72
- column: 33
73
- },
74
- end: {
75
- line: 16,
76
- column: 1
77
- }
78
- }
79
- },
80
- '1': {
81
- name: '(anonymous_1)',
82
- decl: {
83
- start: {
84
- line: 9,
85
- column: 21
86
- },
87
- end: {
88
- line: 9,
89
- column: 22
90
- }
91
- },
92
- loc: {
93
- start: {
94
- line: 9,
95
- column: 32
96
- },
97
- end: {
98
- line: 15,
99
- column: 3
100
- }
101
- }
102
- },
103
- '2': {
104
- name: '(anonymous_2)',
105
- decl: {
106
- start: {
107
- line: 10,
108
- column: 24
109
- },
110
- end: {
111
- line: 10,
112
- column: 25
113
- }
114
- },
115
- loc: {
116
- start: {
117
- line: 10,
118
- column: 43
119
- },
120
- end: {
121
- line: 14,
122
- column: 5
123
- }
124
- }
125
- }
126
- },
127
- branchMap: {},
128
- s: {
129
- '0': 0,
130
- '1': 0,
131
- '2': 0,
132
- '3': 0
133
- },
134
- f: {
135
- '0': 0,
136
- '1': 0,
137
- '2': 0
138
- },
139
- b: {}
140
- },
141
- coverage = global[gcv] || (global[gcv] = {});
142
-
143
- if (coverage[path] && coverage[path].hash === hash) {
144
- return coverage[path];
145
- }
146
-
147
- coverageData.hash = hash;
148
- return coverage[path] = coverageData;
149
- }();
150
-
151
7
  var _lodash = require('lodash');
152
8
 
153
9
  var _lodash2 = _interopRequireDefault(_lodash);
@@ -160,19 +16,10 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
160
16
  * @returns {table~row[]}
161
17
  */
162
18
  exports.default = (rows, config) => {
163
- ++cov_twrxa7qlr.f[0];
164
- ++cov_twrxa7qlr.s[0];
165
-
166
19
  return _lodash2.default.map(rows, cells => {
167
- ++cov_twrxa7qlr.f[1];
168
- ++cov_twrxa7qlr.s[1];
169
-
170
20
  return _lodash2.default.map(cells, (value, index1) => {
171
- ++cov_twrxa7qlr.f[2];
172
-
173
- const column = (++cov_twrxa7qlr.s[2], config.columns[index1]);
21
+ const column = config.columns[index1];
174
22
 
175
- ++cov_twrxa7qlr.s[3];
176
23
  return _lodash2.default.repeat(' ', column.paddingLeft) + value + _lodash2.default.repeat(' ', column.paddingRight);
177
24
  });
178
25
  });
@@ -4,104 +4,6 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
 
7
- var cov_1g1o2zo2a1 = function () {
8
- var path = '/Users/gajuskuizinas/Documents/dev/gajus/table/src/stringifyTableData.js',
9
- hash = '259c356ed61ccc108a62d2707db6e7eccf7f6c78',
10
- global = new Function('return this')(),
11
- gcv = '__coverage__',
12
- coverageData = {
13
- path: '/Users/gajuskuizinas/Documents/dev/gajus/table/src/stringifyTableData.js',
14
- statementMap: {
15
- '0': {
16
- start: {
17
- line: 10,
18
- column: 2
19
- },
20
- end: {
21
- line: 12,
22
- column: 5
23
- }
24
- },
25
- '1': {
26
- start: {
27
- line: 11,
28
- column: 4
29
- },
30
- end: {
31
- line: 11,
32
- column: 32
33
- }
34
- }
35
- },
36
- fnMap: {
37
- '0': {
38
- name: '(anonymous_0)',
39
- decl: {
40
- start: {
41
- line: 9,
42
- column: 15
43
- },
44
- end: {
45
- line: 9,
46
- column: 16
47
- }
48
- },
49
- loc: {
50
- start: {
51
- line: 9,
52
- column: 25
53
- },
54
- end: {
55
- line: 13,
56
- column: 1
57
- }
58
- }
59
- },
60
- '1': {
61
- name: '(anonymous_1)',
62
- decl: {
63
- start: {
64
- line: 10,
65
- column: 21
66
- },
67
- end: {
68
- line: 10,
69
- column: 22
70
- }
71
- },
72
- loc: {
73
- start: {
74
- line: 10,
75
- column: 32
76
- },
77
- end: {
78
- line: 12,
79
- column: 3
80
- }
81
- }
82
- }
83
- },
84
- branchMap: {},
85
- s: {
86
- '0': 0,
87
- '1': 0
88
- },
89
- f: {
90
- '0': 0,
91
- '1': 0
92
- },
93
- b: {}
94
- },
95
- coverage = global[gcv] || (global[gcv] = {});
96
-
97
- if (coverage[path] && coverage[path].hash === hash) {
98
- return coverage[path];
99
- }
100
-
101
- coverageData.hash = hash;
102
- return coverage[path] = coverageData;
103
- }();
104
-
105
7
  var _lodash = require('lodash');
106
8
 
107
9
  var _lodash2 = _interopRequireDefault(_lodash);
@@ -115,13 +17,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
115
17
  * @returns {table~row[]}
116
18
  */
117
19
  exports.default = rows => {
118
- ++cov_1g1o2zo2a1.f[0];
119
- ++cov_1g1o2zo2a1.s[0];
120
-
121
20
  return _lodash2.default.map(rows, cells => {
122
- ++cov_1g1o2zo2a1.f[1];
123
- ++cov_1g1o2zo2a1.s[1];
124
-
125
21
  return _lodash2.default.map(cells, String);
126
22
  });
127
23
  };