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.
package/dist/drawTable.js CHANGED
@@ -4,434 +4,6 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
 
7
- var cov_ju3qj393e = function () {
8
- var path = '/Users/gajuskuizinas/Documents/dev/gajus/table/src/drawTable.js',
9
- hash = '6094a56cd4ea760b5f41ea29d3e5d124edb7067e',
10
- global = new Function('return this')(),
11
- gcv = '__coverage__',
12
- coverageData = {
13
- path: '/Users/gajuskuizinas/Documents/dev/gajus/table/src/drawTable.js',
14
- statementMap: {
15
- '0': {
16
- start: {
17
- line: 22,
18
- column: 19
19
- },
20
- end: {
21
- line: 22,
22
- column: 30
23
- }
24
- },
25
- '1': {
26
- start: {
27
- line: 24,
28
- column: 2
29
- },
30
- end: {
31
- line: 24,
32
- column: 19
33
- }
34
- },
35
- '2': {
36
- start: {
37
- line: 26,
38
- column: 2
39
- },
40
- end: {
41
- line: 26,
42
- column: 14
43
- }
44
- },
45
- '3': {
46
- start: {
47
- line: 28,
48
- column: 2
49
- },
50
- end: {
51
- line: 30,
52
- column: 3
53
- }
54
- },
55
- '4': {
56
- start: {
57
- line: 29,
58
- column: 4
59
- },
60
- end: {
61
- line: 29,
62
- column: 53
63
- }
64
- },
65
- '5': {
66
- start: {
67
- line: 32,
68
- column: 2
69
- },
70
- end: {
71
- line: 46,
72
- column: 5
73
- }
74
- },
75
- '6': {
76
- start: {
77
- line: 33,
78
- column: 4
79
- },
80
- end: {
81
- line: 33,
82
- column: 35
83
- }
84
- },
85
- '7': {
86
- start: {
87
- line: 35,
88
- column: 4
89
- },
90
- end: {
91
- line: 39,
92
- column: 5
93
- }
94
- },
95
- '8': {
96
- start: {
97
- line: 36,
98
- column: 6
99
- },
100
- end: {
101
- line: 36,
102
- column: 45
103
- }
104
- },
105
- '9': {
106
- start: {
107
- line: 38,
108
- column: 6
109
- },
110
- end: {
111
- line: 38,
112
- column: 21
113
- }
114
- },
115
- '10': {
116
- start: {
117
- line: 41,
118
- column: 4
119
- },
120
- end: {
121
- line: 41,
122
- column: 16
123
- }
124
- },
125
- '11': {
126
- start: {
127
- line: 43,
128
- column: 4
129
- },
130
- end: {
131
- line: 45,
132
- column: 5
133
- }
134
- },
135
- '12': {
136
- start: {
137
- line: 44,
138
- column: 6
139
- },
140
- end: {
141
- line: 44,
142
- column: 56
143
- }
144
- },
145
- '13': {
146
- start: {
147
- line: 48,
148
- column: 2
149
- },
150
- end: {
151
- line: 50,
152
- column: 3
153
- }
154
- },
155
- '14': {
156
- start: {
157
- line: 49,
158
- column: 4
159
- },
160
- end: {
161
- line: 49,
162
- column: 56
163
- }
164
- },
165
- '15': {
166
- start: {
167
- line: 52,
168
- column: 2
169
- },
170
- end: {
171
- line: 52,
172
- column: 16
173
- }
174
- }
175
- },
176
- fnMap: {
177
- '0': {
178
- name: '(anonymous_0)',
179
- decl: {
180
- start: {
181
- line: 17,
182
- column: 15
183
- },
184
- end: {
185
- line: 17,
186
- column: 16
187
- }
188
- },
189
- loc: {
190
- start: {
191
- line: 17,
192
- column: 84
193
- },
194
- end: {
195
- line: 53,
196
- column: 1
197
- }
198
- }
199
- },
200
- '1': {
201
- name: '(anonymous_1)',
202
- decl: {
203
- start: {
204
- line: 32,
205
- column: 18
206
- },
207
- end: {
208
- line: 32,
209
- column: 19
210
- }
211
- },
212
- loc: {
213
- start: {
214
- line: 32,
215
- column: 35
216
- },
217
- end: {
218
- line: 46,
219
- column: 3
220
- }
221
- }
222
- }
223
- },
224
- branchMap: {
225
- '0': {
226
- loc: {
227
- start: {
228
- line: 28,
229
- column: 2
230
- },
231
- end: {
232
- line: 30,
233
- column: 3
234
- }
235
- },
236
- type: 'if',
237
- locations: [{
238
- start: {
239
- line: 28,
240
- column: 2
241
- },
242
- end: {
243
- line: 30,
244
- column: 3
245
- }
246
- }, {
247
- start: {
248
- line: 28,
249
- column: 2
250
- },
251
- end: {
252
- line: 30,
253
- column: 3
254
- }
255
- }]
256
- },
257
- '1': {
258
- loc: {
259
- start: {
260
- line: 35,
261
- column: 4
262
- },
263
- end: {
264
- line: 39,
265
- column: 5
266
- }
267
- },
268
- type: 'if',
269
- locations: [{
270
- start: {
271
- line: 35,
272
- column: 4
273
- },
274
- end: {
275
- line: 39,
276
- column: 5
277
- }
278
- }, {
279
- start: {
280
- line: 35,
281
- column: 4
282
- },
283
- end: {
284
- line: 39,
285
- column: 5
286
- }
287
- }]
288
- },
289
- '2': {
290
- loc: {
291
- start: {
292
- line: 43,
293
- column: 4
294
- },
295
- end: {
296
- line: 45,
297
- column: 5
298
- }
299
- },
300
- type: 'if',
301
- locations: [{
302
- start: {
303
- line: 43,
304
- column: 4
305
- },
306
- end: {
307
- line: 45,
308
- column: 5
309
- }
310
- }, {
311
- start: {
312
- line: 43,
313
- column: 4
314
- },
315
- end: {
316
- line: 45,
317
- column: 5
318
- }
319
- }]
320
- },
321
- '3': {
322
- loc: {
323
- start: {
324
- line: 43,
325
- column: 8
326
- },
327
- end: {
328
- line: 43,
329
- column: 96
330
- }
331
- },
332
- type: 'binary-expr',
333
- locations: [{
334
- start: {
335
- line: 43,
336
- column: 8
337
- },
338
- end: {
339
- line: 43,
340
- column: 23
341
- }
342
- }, {
343
- start: {
344
- line: 43,
345
- column: 27
346
- },
347
- end: {
348
- line: 43,
349
- column: 50
350
- }
351
- }, {
352
- start: {
353
- line: 43,
354
- column: 54
355
- },
356
- end: {
357
- line: 43,
358
- column: 96
359
- }
360
- }]
361
- },
362
- '4': {
363
- loc: {
364
- start: {
365
- line: 48,
366
- column: 2
367
- },
368
- end: {
369
- line: 50,
370
- column: 3
371
- }
372
- },
373
- type: 'if',
374
- locations: [{
375
- start: {
376
- line: 48,
377
- column: 2
378
- },
379
- end: {
380
- line: 50,
381
- column: 3
382
- }
383
- }, {
384
- start: {
385
- line: 48,
386
- column: 2
387
- },
388
- end: {
389
- line: 50,
390
- column: 3
391
- }
392
- }]
393
- }
394
- },
395
- s: {
396
- '0': 0,
397
- '1': 0,
398
- '2': 0,
399
- '3': 0,
400
- '4': 0,
401
- '5': 0,
402
- '6': 0,
403
- '7': 0,
404
- '8': 0,
405
- '9': 0,
406
- '10': 0,
407
- '11': 0,
408
- '12': 0,
409
- '13': 0,
410
- '14': 0,
411
- '15': 0
412
- },
413
- f: {
414
- '0': 0,
415
- '1': 0
416
- },
417
- b: {
418
- '0': [0, 0],
419
- '1': [0, 0],
420
- '2': [0, 0],
421
- '3': [0, 0, 0],
422
- '4': [0, 0]
423
- }
424
- },
425
- coverage = global[gcv] || (global[gcv] = {});
426
-
427
- if (coverage[path] && coverage[path].hash === hash) {
428
- return coverage[path];
429
- }
430
-
431
- coverageData.hash = hash;
432
- return coverage[path] = coverageData;
433
- }();
434
-
435
7
  var _lodash = require('lodash');
436
8
 
437
9
  var _lodash2 = _interopRequireDefault(_lodash);
@@ -453,73 +25,38 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
453
25
  * @returns {string}
454
26
  */
455
27
  exports.default = (rows, border, columnSizeIndex, rowSpanIndex, drawHorizontalLine) => {
456
- ++cov_ju3qj393e.f[0];
457
-
458
28
  let output, realRowIndex, rowHeight;
459
29
 
460
- const rowCount = (++cov_ju3qj393e.s[0], rows.length);
30
+ const rowCount = rows.length;
461
31
 
462
- ++cov_ju3qj393e.s[1];
463
32
  realRowIndex = 0;
464
33
 
465
- ++cov_ju3qj393e.s[2];
466
34
  output = '';
467
35
 
468
- ++cov_ju3qj393e.s[3];
469
36
  if (drawHorizontalLine(realRowIndex, rowCount)) {
470
- ++cov_ju3qj393e.b[0][0];
471
- ++cov_ju3qj393e.s[4];
472
-
473
37
  output += (0, _drawBorder.drawBorderTop)(columnSizeIndex, border);
474
- } else {
475
- ++cov_ju3qj393e.b[0][1];
476
38
  }
477
39
 
478
- ++cov_ju3qj393e.s[5];
479
40
  _lodash2.default.forEach(rows, (row, index0) => {
480
- ++cov_ju3qj393e.f[1];
481
- ++cov_ju3qj393e.s[6];
482
-
483
41
  output += (0, _drawRow2.default)(row, border);
484
42
 
485
- ++cov_ju3qj393e.s[7];
486
43
  if (!rowHeight) {
487
- ++cov_ju3qj393e.b[1][0];
488
- ++cov_ju3qj393e.s[8];
489
-
490
44
  rowHeight = rowSpanIndex[realRowIndex];
491
45
 
492
- ++cov_ju3qj393e.s[9];
493
46
  realRowIndex++;
494
- } else {
495
- ++cov_ju3qj393e.b[1][1];
496
47
  }
497
48
 
498
- ++cov_ju3qj393e.s[10];
499
49
  rowHeight--;
500
50
 
501
- ++cov_ju3qj393e.s[11];
502
- if ((++cov_ju3qj393e.b[3][0], rowHeight === 0) && (++cov_ju3qj393e.b[3][1], index0 !== rowCount - 1) && (++cov_ju3qj393e.b[3][2], drawHorizontalLine(realRowIndex, rowCount))) {
503
- ++cov_ju3qj393e.b[2][0];
504
- ++cov_ju3qj393e.s[12];
505
-
51
+ if (rowHeight === 0 && index0 !== rowCount - 1 && drawHorizontalLine(realRowIndex, rowCount)) {
506
52
  output += (0, _drawBorder.drawBorderJoin)(columnSizeIndex, border);
507
- } else {
508
- ++cov_ju3qj393e.b[2][1];
509
53
  }
510
54
  });
511
55
 
512
- ++cov_ju3qj393e.s[13];
513
56
  if (drawHorizontalLine(realRowIndex, rowCount)) {
514
- ++cov_ju3qj393e.b[4][0];
515
- ++cov_ju3qj393e.s[14];
516
-
517
57
  output += (0, _drawBorder.drawBorderBottom)(columnSizeIndex, border);
518
- } else {
519
- ++cov_ju3qj393e.b[4][1];
520
58
  }
521
59
 
522
- ++cov_ju3qj393e.s[15];
523
60
  return output;
524
61
  };
525
62