@npm_leadtech/legal-lib-components 0.22.0 → 0.24.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.
Files changed (35) hide show
  1. package/build/index.js +1 -1
  2. package/coverage/clover.xml +43 -12
  3. package/coverage/coverage-final.json +13 -748
  4. package/coverage/lcov-report/block-navigation.js +68 -56
  5. package/coverage/lcov-report/components/atoms/AddButton/AddButton.js.html +1 -2
  6. package/coverage/lcov-report/components/atoms/AddButton/index.html +1 -2
  7. package/coverage/lcov-report/components/atoms/Button/Button.js.html +550 -0
  8. package/coverage/lcov-report/components/atoms/Button/index.html +116 -0
  9. package/coverage/lcov-report/components/atoms/CardPane/CardPane.js.html +74 -18
  10. package/coverage/lcov-report/components/atoms/CardPane/index.html +15 -16
  11. package/coverage/lcov-report/components/atoms/Checkbox/Checkbox.js.html +1 -2
  12. package/coverage/lcov-report/components/atoms/Checkbox/index.html +1 -2
  13. package/coverage/lcov-report/components/atoms/Disclaimer/Disclaimer.js.html +1 -2
  14. package/coverage/lcov-report/components/atoms/Disclaimer/index.html +1 -2
  15. package/coverage/lcov-report/components/atoms/DocumentStatus/DocumentStatus.js.html +1 -2
  16. package/coverage/lcov-report/components/atoms/DocumentStatus/index.html +1 -2
  17. package/coverage/lcov-report/components/atoms/FormFaq/FormFaq.js.html +9 -4
  18. package/coverage/lcov-report/components/atoms/FormFaq/index.html +1 -2
  19. package/coverage/lcov-report/components/atoms/LogoText/LogoText.js.html +1 -2
  20. package/coverage/lcov-report/components/atoms/LogoText/index.html +1 -2
  21. package/coverage/lcov-report/components/atoms/Message/Message.js.html +1 -2
  22. package/coverage/lcov-report/components/atoms/Message/index.html +1 -2
  23. package/coverage/lcov-report/components/atoms/RemoveButton/RemoveButton.js.html +1 -2
  24. package/coverage/lcov-report/components/atoms/RemoveButton/index.html +1 -2
  25. package/coverage/lcov-report/components/atoms/SearchSelect/SearchSelect.js.html +1 -2
  26. package/coverage/lcov-report/components/atoms/SearchSelect/index.html +1 -2
  27. package/coverage/lcov-report/components/atoms/Toggle/Toggle.js.html +1 -2
  28. package/coverage/lcov-report/components/atoms/Toggle/index.html +1 -2
  29. package/coverage/lcov-report/index.html +32 -18
  30. package/coverage/lcov-report/prettify.js +1 -895
  31. package/coverage/lcov-report/sorter.js +172 -165
  32. package/coverage/lcov-report/utils/envVariables.js.html +1 -2
  33. package/coverage/lcov-report/utils/index.html +1 -2
  34. package/coverage/lcov.info +90 -16
  35. package/package.json +3 -3
@@ -1,189 +1,196 @@
1
1
  /* eslint-disable */
2
- var addSorting = (function () {
3
- 'use strict';
4
- var cols,
5
- currentSort = {
6
- index: 0,
7
- desc: false,
8
- };
2
+ var addSorting = (function() {
3
+ 'use strict';
4
+ var cols,
5
+ currentSort = {
6
+ index: 0,
7
+ desc: false
8
+ };
9
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
- }
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
26
 
27
- function onFilterInput() {
28
- const searchValue = document.getElementById('fileSearch').value;
29
- const rows = document.getElementsByTagName('tbody')[0].children;
30
- for (let i = 0; i < rows.length; i++) {
31
- const row = rows[i];
32
- if (row.textContent.toLowerCase().includes(searchValue.toLowerCase())) {
33
- row.style.display = '';
34
- } else {
35
- row.style.display = 'none';
36
- }
27
+ function onFilterInput() {
28
+ const searchValue = document.getElementById('fileSearch').value;
29
+ const rows = document.getElementsByTagName('tbody')[0].children;
30
+ for (let i = 0; i < rows.length; i++) {
31
+ const row = rows[i];
32
+ if (
33
+ row.textContent
34
+ .toLowerCase()
35
+ .includes(searchValue.toLowerCase())
36
+ ) {
37
+ row.style.display = '';
38
+ } else {
39
+ row.style.display = 'none';
40
+ }
41
+ }
37
42
  }
38
- }
39
43
 
40
- // loads the search box
41
- function addSearchBox() {
42
- var template = document.getElementById('filterTemplate');
43
- var templateClone = template.content.cloneNode(true);
44
- templateClone.getElementById('fileSearch').oninput = onFilterInput;
45
- template.parentElement.appendChild(templateClone);
46
- }
44
+ // loads the search box
45
+ function addSearchBox() {
46
+ var template = document.getElementById('filterTemplate');
47
+ var templateClone = template.content.cloneNode(true);
48
+ templateClone.getElementById('fileSearch').oninput = onFilterInput;
49
+ template.parentElement.appendChild(templateClone);
50
+ }
47
51
 
48
- // loads all columns
49
- function loadColumns() {
50
- var colNodes = getTableHeader().querySelectorAll('th'),
51
- colNode,
52
- cols = [],
53
- col,
54
- i;
52
+ // loads all columns
53
+ function loadColumns() {
54
+ var colNodes = getTableHeader().querySelectorAll('th'),
55
+ colNode,
56
+ cols = [],
57
+ col,
58
+ i;
55
59
 
56
- for (i = 0; i < colNodes.length; i += 1) {
57
- colNode = colNodes[i];
58
- col = {
59
- key: colNode.getAttribute('data-col'),
60
- sortable: !colNode.getAttribute('data-nosort'),
61
- type: colNode.getAttribute('data-type') || 'string',
62
- };
63
- cols.push(col);
64
- if (col.sortable) {
65
- col.defaultDescSort = col.type === 'number';
66
- colNode.innerHTML = colNode.innerHTML + '<span class="sorter"></span>';
67
- }
60
+ for (i = 0; i < colNodes.length; i += 1) {
61
+ colNode = colNodes[i];
62
+ col = {
63
+ key: colNode.getAttribute('data-col'),
64
+ sortable: !colNode.getAttribute('data-nosort'),
65
+ type: colNode.getAttribute('data-type') || 'string'
66
+ };
67
+ cols.push(col);
68
+ if (col.sortable) {
69
+ col.defaultDescSort = col.type === 'number';
70
+ colNode.innerHTML =
71
+ colNode.innerHTML + '<span class="sorter"></span>';
72
+ }
73
+ }
74
+ return cols;
68
75
  }
69
- return cols;
70
- }
71
- // attaches a data attribute to every tr element with an object
72
- // of data values keyed by column name
73
- function loadRowData(tableRow) {
74
- var tableCols = tableRow.querySelectorAll('td'),
75
- colNode,
76
- col,
77
- data = {},
78
- i,
79
- val;
80
- for (i = 0; i < tableCols.length; i += 1) {
81
- colNode = tableCols[i];
82
- col = cols[i];
83
- val = colNode.getAttribute('data-value');
84
- if (col.type === 'number') {
85
- val = Number(val);
86
- }
87
- data[col.key] = val;
76
+ // attaches a data attribute to every tr element with an object
77
+ // of data values keyed by column name
78
+ function loadRowData(tableRow) {
79
+ var tableCols = tableRow.querySelectorAll('td'),
80
+ colNode,
81
+ col,
82
+ data = {},
83
+ i,
84
+ val;
85
+ for (i = 0; i < tableCols.length; i += 1) {
86
+ colNode = tableCols[i];
87
+ col = cols[i];
88
+ val = colNode.getAttribute('data-value');
89
+ if (col.type === 'number') {
90
+ val = Number(val);
91
+ }
92
+ data[col.key] = val;
93
+ }
94
+ return data;
88
95
  }
89
- return data;
90
- }
91
- // loads all row data
92
- function loadData() {
93
- var rows = getTableBody().querySelectorAll('tr'),
94
- i;
96
+ // loads all row data
97
+ function loadData() {
98
+ var rows = getTableBody().querySelectorAll('tr'),
99
+ i;
95
100
 
96
- for (i = 0; i < rows.length; i += 1) {
97
- rows[i].data = loadRowData(rows[i]);
101
+ for (i = 0; i < rows.length; i += 1) {
102
+ rows[i].data = loadRowData(rows[i]);
103
+ }
98
104
  }
99
- }
100
- // sorts the table using the data for the ith column
101
- function sortByIndex(index, desc) {
102
- var key = cols[index].key,
103
- sorter = function (a, b) {
104
- a = a.data[key];
105
- b = b.data[key];
106
- return a < b ? -1 : a > b ? 1 : 0;
107
- },
108
- finalSorter = sorter,
109
- tableBody = document.querySelector('.coverage-summary tbody'),
110
- rowNodes = tableBody.querySelectorAll('tr'),
111
- rows = [],
112
- i;
105
+ // sorts the table using the data for the ith column
106
+ function sortByIndex(index, desc) {
107
+ var key = cols[index].key,
108
+ sorter = function(a, b) {
109
+ a = a.data[key];
110
+ b = b.data[key];
111
+ return a < b ? -1 : a > b ? 1 : 0;
112
+ },
113
+ finalSorter = sorter,
114
+ tableBody = document.querySelector('.coverage-summary tbody'),
115
+ rowNodes = tableBody.querySelectorAll('tr'),
116
+ rows = [],
117
+ i;
113
118
 
114
- if (desc) {
115
- finalSorter = function (a, b) {
116
- return -1 * sorter(a, b);
117
- };
118
- }
119
+ if (desc) {
120
+ finalSorter = function(a, b) {
121
+ return -1 * sorter(a, b);
122
+ };
123
+ }
119
124
 
120
- for (i = 0; i < rowNodes.length; i += 1) {
121
- rows.push(rowNodes[i]);
122
- tableBody.removeChild(rowNodes[i]);
123
- }
125
+ for (i = 0; i < rowNodes.length; i += 1) {
126
+ rows.push(rowNodes[i]);
127
+ tableBody.removeChild(rowNodes[i]);
128
+ }
124
129
 
125
- rows.sort(finalSorter);
130
+ rows.sort(finalSorter);
126
131
 
127
- for (i = 0; i < rows.length; i += 1) {
128
- tableBody.appendChild(rows[i]);
132
+ for (i = 0; i < rows.length; i += 1) {
133
+ tableBody.appendChild(rows[i]);
134
+ }
129
135
  }
130
- }
131
- // removes sort indicators for current column being sorted
132
- function removeSortIndicators() {
133
- var col = getNthColumn(currentSort.index),
134
- cls = col.className;
136
+ // removes sort indicators for current column being sorted
137
+ function removeSortIndicators() {
138
+ var col = getNthColumn(currentSort.index),
139
+ cls = col.className;
135
140
 
136
- cls = cls.replace(/ sorted$/, '').replace(/ sorted-desc$/, '');
137
- col.className = cls;
138
- }
139
- // adds sort indicators for current column being sorted
140
- function addSortIndicators() {
141
- getNthColumn(currentSort.index).className += currentSort.desc ? ' sorted-desc' : ' sorted';
142
- }
143
- // adds event listeners for all sorter widgets
144
- function enableUI() {
145
- var i,
146
- el,
147
- ithSorter = function ithSorter(i) {
148
- var col = cols[i];
141
+ cls = cls.replace(/ sorted$/, '').replace(/ sorted-desc$/, '');
142
+ col.className = cls;
143
+ }
144
+ // adds sort indicators for current column being sorted
145
+ function addSortIndicators() {
146
+ getNthColumn(currentSort.index).className += currentSort.desc
147
+ ? ' sorted-desc'
148
+ : ' sorted';
149
+ }
150
+ // adds event listeners for all sorter widgets
151
+ function enableUI() {
152
+ var i,
153
+ el,
154
+ ithSorter = function ithSorter(i) {
155
+ var col = cols[i];
149
156
 
150
- return function () {
151
- var desc = col.defaultDescSort;
157
+ return function() {
158
+ var desc = col.defaultDescSort;
152
159
 
153
- if (currentSort.index === i) {
154
- desc = !currentSort.desc;
155
- }
156
- sortByIndex(i, desc);
157
- removeSortIndicators();
158
- currentSort.index = i;
159
- currentSort.desc = desc;
160
- addSortIndicators();
161
- };
162
- };
163
- for (i = 0; i < cols.length; i += 1) {
164
- if (cols[i].sortable) {
165
- // add the click event handler on the th so users
166
- // dont have to click on those tiny arrows
167
- el = getNthColumn(i).querySelector('.sorter').parentElement;
168
- if (el.addEventListener) {
169
- el.addEventListener('click', ithSorter(i));
170
- } else {
171
- el.attachEvent('onclick', ithSorter(i));
160
+ if (currentSort.index === i) {
161
+ desc = !currentSort.desc;
162
+ }
163
+ sortByIndex(i, desc);
164
+ removeSortIndicators();
165
+ currentSort.index = i;
166
+ currentSort.desc = desc;
167
+ addSortIndicators();
168
+ };
169
+ };
170
+ for (i = 0; i < cols.length; i += 1) {
171
+ if (cols[i].sortable) {
172
+ // add the click event handler on the th so users
173
+ // dont have to click on those tiny arrows
174
+ el = getNthColumn(i).querySelector('.sorter').parentElement;
175
+ if (el.addEventListener) {
176
+ el.addEventListener('click', ithSorter(i));
177
+ } else {
178
+ el.attachEvent('onclick', ithSorter(i));
179
+ }
180
+ }
172
181
  }
173
- }
174
- }
175
- }
176
- // adds sorting functionality to the UI
177
- return function () {
178
- if (!getTable()) {
179
- return;
180
182
  }
181
- cols = loadColumns();
182
- loadData();
183
- addSearchBox();
184
- addSortIndicators();
185
- enableUI();
186
- };
183
+ // adds sorting functionality to the UI
184
+ return function() {
185
+ if (!getTable()) {
186
+ return;
187
+ }
188
+ cols = loadColumns();
189
+ loadData();
190
+ addSearchBox();
191
+ addSortIndicators();
192
+ enableUI();
193
+ };
187
194
  })();
188
195
 
189
196
  window.addEventListener('load', addSorting);
@@ -73,9 +73,8 @@
73
73
  <div class='footer quiet pad2 space-top1 center small'>
74
74
  Code coverage generated by
75
75
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener">istanbul</a>
76
- at Tue Dec 28 2021 13:21:15 GMT+0100 (GMT+01:00)
76
+ at Tue Dec 28 2021 16:21:31 GMT+0100 (GMT+01:00)
77
77
  </div>
78
- </div>
79
78
  <script src="../prettify.js"></script>
80
79
  <script>
81
80
  window.onload = function () {
@@ -101,9 +101,8 @@
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 Tue Dec 28 2021 13:21:15 GMT+0100 (GMT+01:00)
104
+ at Tue Dec 28 2021 16:21:31 GMT+0100 (GMT+01:00)
105
105
  </div>
106
- </div>
107
106
  <script src="../prettify.js"></script>
108
107
  <script>
109
108
  window.onload = function () {
@@ -20,26 +20,100 @@ BRF:6
20
20
  BRH:5
21
21
  end_of_record
22
22
  TN:
23
+ SF:src/components/atoms/Button/Button.js
24
+ FN:6,(anonymous_0)
25
+ FN:66,(anonymous_1)
26
+ FNF:2
27
+ FNH:2
28
+ FNDA:15,(anonymous_0)
29
+ FNDA:3,(anonymous_1)
30
+ DA:6,1
31
+ DA:39,15
32
+ DA:44,15
33
+ DA:46,15
34
+ DA:66,15
35
+ DA:67,3
36
+ DA:68,3
37
+ DA:69,1
38
+ DA:70,1
39
+ DA:72,1
40
+ DA:79,15
41
+ DA:92,15
42
+ DA:93,11
43
+ DA:100,4
44
+ DA:101,1
45
+ DA:108,3
46
+ DA:109,3
47
+ DA:116,0
48
+ DA:123,1
49
+ LF:19
50
+ LH:18
51
+ BRDA:44,0,0,0
52
+ BRDA:44,0,1,15
53
+ BRDA:46,1,0,0
54
+ BRDA:46,1,1,15
55
+ BRDA:67,2,0,3
56
+ BRDA:67,2,1,0
57
+ BRDA:68,3,0,1
58
+ BRDA:68,3,1,2
59
+ BRDA:69,4,0,1
60
+ BRDA:69,4,1,0
61
+ BRDA:70,5,0,1
62
+ BRDA:70,5,1,1
63
+ BRDA:80,6,0,0
64
+ BRDA:80,6,1,15
65
+ BRDA:81,7,0,15
66
+ BRDA:81,7,1,0
67
+ BRDA:92,8,0,11
68
+ BRDA:92,8,1,4
69
+ BRDA:100,9,0,1
70
+ BRDA:100,9,1,3
71
+ BRDA:108,10,0,3
72
+ BRDA:108,10,1,0
73
+ BRDA:108,11,0,3
74
+ BRDA:108,11,1,2
75
+ BRDA:110,12,0,3
76
+ BRDA:110,12,1,0
77
+ BRDA:117,13,0,0
78
+ BRDA:117,13,1,0
79
+ BRF:28
80
+ BRH:18
81
+ end_of_record
82
+ TN:
23
83
  SF:src/components/atoms/CardPane/CardPane.js
24
84
  FN:5,(anonymous_0)
25
- FN:14,(anonymous_1)
85
+ FN:33,(anonymous_1)
26
86
  FNF:2
27
87
  FNH:2
28
- FNDA:5,(anonymous_0)
29
- FNDA:3,(anonymous_1)
88
+ FNDA:7,(anonymous_0)
89
+ FNDA:6,(anonymous_1)
30
90
  DA:5,1
31
- DA:6,5
32
- DA:14,1
33
- DA:15,3
34
- DA:16,0
35
- DA:19,3
36
- DA:22,1
37
- LF:7
38
- LH:6
39
- BRDA:15,0,0,0
40
- BRDA:15,0,1,3
41
- BRF:2
42
- BRH:1
91
+ DA:6,7
92
+ DA:8,7
93
+ DA:9,1
94
+ DA:10,6
95
+ DA:11,1
96
+ DA:13,7
97
+ DA:25,0
98
+ DA:33,1
99
+ DA:34,6
100
+ DA:35,1
101
+ DA:38,5
102
+ DA:41,1
103
+ LF:13
104
+ LH:12
105
+ BRDA:6,0,0,7
106
+ BRDA:6,0,1,0
107
+ BRDA:6,1,0,7
108
+ BRDA:6,1,1,6
109
+ BRDA:8,2,0,1
110
+ BRDA:8,2,1,6
111
+ BRDA:10,3,0,1
112
+ BRDA:10,3,1,5
113
+ BRDA:34,4,0,1
114
+ BRDA:34,4,1,5
115
+ BRF:10
116
+ BRH:9
43
117
  end_of_record
44
118
  TN:
45
119
  SF:src/components/atoms/Checkbox/Checkbox.js
@@ -143,7 +217,7 @@ DA:24,6
143
217
  DA:31,4
144
218
  DA:32,4
145
219
  DA:36,5
146
- DA:48,1
220
+ DA:50,1
147
221
  LF:13
148
222
  LH:10
149
223
  BRDA:10,0,0,0
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@npm_leadtech/legal-lib-components",
3
- "version": "0.22.0",
3
+ "version": "0.24.0",
4
4
  "dependencies": {
5
5
  "@testing-library/jest-dom": "^5.14.1",
6
6
  "postcss-url": "^10.1.3",
7
- "react": "^17.0.1",
8
- "react-dom": "^17.0.1",
7
+ "react": "^16.12.0",
8
+ "react-dom": "^16.12.0",
9
9
  "react-select": "^5.2.1",
10
10
  "sanitize-html": "^2.4.0"
11
11
  },