@npm_leadtech/legal-lib-components 0.18.2 → 0.19.0
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/README.md +1 -0
- package/build/index.js +1 -1
- package/coverage/clover.xml +36 -13
- package/coverage/coverage-final.json +846 -11
- package/coverage/lcov-report/block-navigation.js +56 -68
- package/coverage/lcov-report/components/atoms/AddButton/AddButton.js.html +1 -1
- package/coverage/lcov-report/components/atoms/AddButton/index.html +1 -1
- package/coverage/lcov-report/components/atoms/Button/Button.js.html +551 -0
- package/coverage/lcov-report/components/atoms/Button/index.html +117 -0
- package/coverage/lcov-report/components/atoms/CardPane/CardPane.js.html +1 -1
- package/coverage/lcov-report/components/atoms/CardPane/index.html +1 -1
- package/coverage/lcov-report/components/atoms/Checkbox/Checkbox.js.html +1 -1
- package/coverage/lcov-report/components/atoms/Checkbox/index.html +1 -1
- package/coverage/lcov-report/components/atoms/Disclaimer/Disclaimer.js.html +1 -1
- package/coverage/lcov-report/components/atoms/Disclaimer/index.html +1 -1
- package/coverage/lcov-report/components/atoms/DocumentStatus/DocumentStatus.js.html +1 -1
- package/coverage/lcov-report/components/atoms/DocumentStatus/index.html +1 -1
- package/coverage/lcov-report/components/atoms/LogoText/LogoText.js.html +1 -1
- package/coverage/lcov-report/components/atoms/LogoText/index.html +1 -1
- package/coverage/lcov-report/components/atoms/Message/Message.js.html +1 -1
- package/coverage/lcov-report/components/atoms/Message/index.html +1 -1
- package/coverage/lcov-report/components/atoms/RemoveButton/RemoveButton.js.html +1 -1
- package/coverage/lcov-report/components/atoms/RemoveButton/index.html +1 -1
- package/coverage/lcov-report/components/atoms/SearchSelect/SearchSelect.js.html +10 -25
- package/coverage/lcov-report/components/atoms/SearchSelect/index.html +15 -15
- package/coverage/lcov-report/components/atoms/Toggle/Toggle.js.html +1 -1
- package/coverage/lcov-report/components/atoms/Toggle/index.html +1 -1
- package/coverage/lcov-report/index.html +32 -17
- package/coverage/lcov-report/prettify.js +895 -1
- package/coverage/lcov-report/sorter.js +165 -172
- package/coverage/lcov-report/utils/envVariables.js.html +1 -1
- package/coverage/lcov-report/utils/index.html +1 -1
- package/coverage/lcov.info +82 -28
- package/package.json +1 -1
|
@@ -1,87 +1,75 @@
|
|
|
1
1
|
/* eslint-disable */
|
|
2
2
|
var jumpToCode = (function init() {
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
// Classes of code we would like to highlight in the file view
|
|
4
|
+
var missingCoverageClasses = ['.cbranch-no', '.cstat-no', '.fstat-no'];
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
// Elements to highlight in the file listing view
|
|
7
|
+
var fileListingElements = ['td.pct.low'];
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
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
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
fileListingElements.join(', ') +
|
|
15
|
-
', ' +
|
|
16
|
-
notSelector +
|
|
17
|
-
missingCoverageClasses.join(', ' + notSelector); // becomes `:not(a):not(b) > a, :not(a):not(b) > b`
|
|
12
|
+
// Selecter that finds elements on the page to which we can jump
|
|
13
|
+
var selector = fileListingElements.join(', ') + ', ' + notSelector + missingCoverageClasses.join(', ' + notSelector); // becomes `:not(a):not(b) > a, :not(a):not(b) > b`
|
|
18
14
|
|
|
19
|
-
|
|
20
|
-
|
|
15
|
+
// The NodeList of matching elements
|
|
16
|
+
var missingCoverageElements = document.querySelectorAll(selector);
|
|
21
17
|
|
|
22
|
-
|
|
18
|
+
var currentIndex;
|
|
23
19
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
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
|
-
}
|
|
20
|
+
function toggleClass(index) {
|
|
21
|
+
missingCoverageElements.item(currentIndex).classList.remove('highlighted');
|
|
22
|
+
missingCoverageElements.item(index).classList.add('highlighted');
|
|
23
|
+
}
|
|
40
24
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
25
|
+
function makeCurrent(index) {
|
|
26
|
+
toggleClass(index);
|
|
27
|
+
currentIndex = index;
|
|
28
|
+
missingCoverageElements.item(index).scrollIntoView({
|
|
29
|
+
behavior: 'smooth',
|
|
30
|
+
block: 'center',
|
|
31
|
+
inline: 'center',
|
|
32
|
+
});
|
|
33
|
+
}
|
|
48
34
|
|
|
49
|
-
|
|
35
|
+
function goToPrevious() {
|
|
36
|
+
var nextIndex = 0;
|
|
37
|
+
if (typeof currentIndex !== 'number' || currentIndex === 0) {
|
|
38
|
+
nextIndex = missingCoverageElements.length - 1;
|
|
39
|
+
} else if (missingCoverageElements.length > 1) {
|
|
40
|
+
nextIndex = currentIndex - 1;
|
|
50
41
|
}
|
|
51
42
|
|
|
52
|
-
|
|
53
|
-
|
|
43
|
+
makeCurrent(nextIndex);
|
|
44
|
+
}
|
|
54
45
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
currentIndex < missingCoverageElements.length - 1
|
|
58
|
-
) {
|
|
59
|
-
nextIndex = currentIndex + 1;
|
|
60
|
-
}
|
|
46
|
+
function goToNext() {
|
|
47
|
+
var nextIndex = 0;
|
|
61
48
|
|
|
62
|
-
|
|
49
|
+
if (typeof currentIndex === 'number' && currentIndex < missingCoverageElements.length - 1) {
|
|
50
|
+
nextIndex = currentIndex + 1;
|
|
63
51
|
}
|
|
64
52
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
document.getElementById('fileSearch') === document.activeElement &&
|
|
68
|
-
document.activeElement != null
|
|
69
|
-
) {
|
|
70
|
-
// if we're currently focused on the search input, we don't want to navigate
|
|
71
|
-
return;
|
|
72
|
-
}
|
|
53
|
+
makeCurrent(nextIndex);
|
|
54
|
+
}
|
|
73
55
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
56
|
+
return function jump(event) {
|
|
57
|
+
if (document.getElementById('fileSearch') === document.activeElement && document.activeElement != null) {
|
|
58
|
+
// if we're currently focused on the search input, we don't want to navigate
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
switch (event.which) {
|
|
63
|
+
case 78: // n
|
|
64
|
+
case 74: // j
|
|
65
|
+
goToNext();
|
|
66
|
+
break;
|
|
67
|
+
case 66: // b
|
|
68
|
+
case 75: // k
|
|
69
|
+
case 80: // p
|
|
70
|
+
goToPrevious();
|
|
71
|
+
break;
|
|
72
|
+
}
|
|
73
|
+
};
|
|
86
74
|
})();
|
|
87
75
|
window.addEventListener('keydown', jumpToCode);
|
|
@@ -214,7 +214,7 @@ AddButton.propTypes = {
|
|
|
214
214
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
215
215
|
Code coverage generated by
|
|
216
216
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener">istanbul</a>
|
|
217
|
-
at
|
|
217
|
+
at Thu Dec 23 2021 14:38:30 GMT+0100 (GMT+01:00)
|
|
218
218
|
</div>
|
|
219
219
|
</div>
|
|
220
220
|
<script src="../../../prettify.js"></script>
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
102
102
|
Code coverage generated by
|
|
103
103
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener">istanbul</a>
|
|
104
|
-
at
|
|
104
|
+
at Thu Dec 23 2021 14:38:30 GMT+0100 (GMT+01:00)
|
|
105
105
|
</div>
|
|
106
106
|
</div>
|
|
107
107
|
<script src="../../../prettify.js"></script>
|