@thirstie/thirstievalidators 1.5.0 → 1.5.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.
- package/CHANGELOG.md +20 -0
- package/coverage/clover.xml +2 -2
- package/coverage/lcov-report/agegate.js.html +1 -1
- package/coverage/lcov-report/block-navigation.js +1 -1
- package/coverage/lcov-report/emailLists.js.html +1 -1
- package/coverage/lcov-report/index.html +1 -1
- package/coverage/lcov-report/index.js.html +1 -1
- package/coverage/lcov-report/iso3166codes.js.html +1 -1
- package/coverage/lcov-report/passwordcheck.js.html +1 -1
- package/coverage/lcov-report/sorter.js +21 -7
- package/dist/bundle.cjs +118 -726
- package/dist/bundle.iife.js +1 -1
- package/dist/bundle.mjs +118 -726
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,26 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [1.5.1](https://github.com/ThirstieAdmin/thirstiejs-monorepo/compare/@thirstie/thirstievalidators@0.0.3...@thirstie/thirstievalidators@1.5.1) (2026-01-13)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* age gate validation ([6f88a6f](https://github.com/ThirstieAdmin/thirstiejs-monorepo/commit/6f88a6fb88d4a2b02807eb457efbf28e95d2b232))
|
|
12
|
+
* SUPPORT-851 update email validator ([d883a16](https://github.com/ThirstieAdmin/thirstiejs-monorepo/commit/d883a1653b0da2d7431d3237fc4f44d9e2fc9e66))
|
|
13
|
+
* TH-5534 use age gate checker from thirstievalidators ([6e7ada1](https://github.com/ThirstieAdmin/thirstiejs-monorepo/commit/6e7ada1f7289e652273fcab7f67b3b958d6d1607))
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### Features
|
|
17
|
+
|
|
18
|
+
* add state code, email domain checkers ([e5590ba](https://github.com/ThirstieAdmin/thirstiejs-monorepo/commit/e5590ba6f3e2dd5b6f0952a39ca0b595aa08ed21))
|
|
19
|
+
* trusted email domain ([bd36a3c](https://github.com/ThirstieAdmin/thirstiejs-monorepo/commit/bd36a3c6b2044d0acfa1d3c0250c68d3b46975fa))
|
|
20
|
+
* validator package ([7cc609a](https://github.com/ThirstieAdmin/thirstiejs-monorepo/commit/7cc609a78cd030c866542a629d6bf307ad9b08c8))
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
6
26
|
# [1.5.0](https://github.com/ThirstieAdmin/thirstiejs-monorepo/compare/@thirstie/thirstievalidators@0.0.3...@thirstie/thirstievalidators@1.5.0) (2026-01-06)
|
|
7
27
|
|
|
8
28
|
|
package/coverage/clover.xml
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<coverage generated="
|
|
3
|
-
<project timestamp="
|
|
2
|
+
<coverage generated="1768334503328" clover="3.2.0">
|
|
3
|
+
<project timestamp="1768334503328" name="All files">
|
|
4
4
|
<metrics statements="94" coveredstatements="78" conditionals="71" coveredconditionals="48" methods="16" coveredmethods="13" elements="181" coveredelements="139" complexity="0" loc="94" ncloc="94" packages="1" files="5" classes="5"/>
|
|
5
5
|
<file name="agegate.js" path="/home/circleci/thirstiejs-monorepo/packages/thirstievalidators/src/agegate.js">
|
|
6
6
|
<metrics statements="21" coveredstatements="20" conditionals="13" coveredconditionals="11" methods="1" coveredmethods="1"/>
|
|
@@ -166,7 +166,7 @@ export const ageGate = (ageGateType, ageGateValue, legalAge = null) => {
|
|
|
166
166
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
167
167
|
Code coverage generated by
|
|
168
168
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
169
|
-
at 2026-01-
|
|
169
|
+
at 2026-01-13T20:01:43.308Z
|
|
170
170
|
</div>
|
|
171
171
|
<script src="prettify.js"></script>
|
|
172
172
|
<script>
|
|
@@ -9,7 +9,7 @@ var jumpToCode = (function init() {
|
|
|
9
9
|
// We don't want to select elements that are direct descendants of another match
|
|
10
10
|
var notSelector = ':not(' + missingCoverageClasses.join('):not(') + ') > '; // becomes `:not(a):not(b) > `
|
|
11
11
|
|
|
12
|
-
//
|
|
12
|
+
// Selector that finds elements on the page to which we can jump
|
|
13
13
|
var selector =
|
|
14
14
|
fileListingElements.join(', ') +
|
|
15
15
|
', ' +
|
|
@@ -244,7 +244,7 @@ export const trustedEmailDomains = [
|
|
|
244
244
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
245
245
|
Code coverage generated by
|
|
246
246
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
247
|
-
at 2026-01-
|
|
247
|
+
at 2026-01-13T20:01:43.308Z
|
|
248
248
|
</div>
|
|
249
249
|
<script src="prettify.js"></script>
|
|
250
250
|
<script>
|
|
@@ -161,7 +161,7 @@
|
|
|
161
161
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
162
162
|
Code coverage generated by
|
|
163
163
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
164
|
-
at 2026-01-
|
|
164
|
+
at 2026-01-13T20:01:43.308Z
|
|
165
165
|
</div>
|
|
166
166
|
<script src="prettify.js"></script>
|
|
167
167
|
<script>
|
|
@@ -328,7 +328,7 @@ export { Validators, Checkers };
|
|
|
328
328
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
329
329
|
Code coverage generated by
|
|
330
330
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
331
|
-
at 2026-01-
|
|
331
|
+
at 2026-01-13T20:01:43.308Z
|
|
332
332
|
</div>
|
|
333
333
|
<script src="prettify.js"></script>
|
|
334
334
|
<script>
|
|
@@ -316,7 +316,7 @@ export const getAdministrativeArea = (value, countryCode = <span class="branch-0
|
|
|
316
316
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
317
317
|
Code coverage generated by
|
|
318
318
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
319
|
-
at 2026-01-
|
|
319
|
+
at 2026-01-13T20:01:43.308Z
|
|
320
320
|
</div>
|
|
321
321
|
<script src="prettify.js"></script>
|
|
322
322
|
<script>
|
|
@@ -163,7 +163,7 @@ export default passwordcheck;
|
|
|
163
163
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
164
164
|
Code coverage generated by
|
|
165
165
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
166
|
-
at 2026-01-
|
|
166
|
+
at 2026-01-13T20:01:43.308Z
|
|
167
167
|
</div>
|
|
168
168
|
<script src="prettify.js"></script>
|
|
169
169
|
<script>
|
|
@@ -27,17 +27,31 @@ var addSorting = (function() {
|
|
|
27
27
|
function onFilterInput() {
|
|
28
28
|
const searchValue = document.getElementById('fileSearch').value;
|
|
29
29
|
const rows = document.getElementsByTagName('tbody')[0].children;
|
|
30
|
+
|
|
31
|
+
// Try to create a RegExp from the searchValue. If it fails (invalid regex),
|
|
32
|
+
// it will be treated as a plain text search
|
|
33
|
+
let searchRegex;
|
|
34
|
+
try {
|
|
35
|
+
searchRegex = new RegExp(searchValue, 'i'); // 'i' for case-insensitive
|
|
36
|
+
} catch (error) {
|
|
37
|
+
searchRegex = null;
|
|
38
|
+
}
|
|
39
|
+
|
|
30
40
|
for (let i = 0; i < rows.length; i++) {
|
|
31
41
|
const row = rows[i];
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
row.style.display = '';
|
|
42
|
+
let isMatch = false;
|
|
43
|
+
|
|
44
|
+
if (searchRegex) {
|
|
45
|
+
// If a valid regex was created, use it for matching
|
|
46
|
+
isMatch = searchRegex.test(row.textContent);
|
|
38
47
|
} else {
|
|
39
|
-
|
|
48
|
+
// Otherwise, fall back to the original plain text search
|
|
49
|
+
isMatch = row.textContent
|
|
50
|
+
.toLowerCase()
|
|
51
|
+
.includes(searchValue.toLowerCase());
|
|
40
52
|
}
|
|
53
|
+
|
|
54
|
+
row.style.display = isMatch ? '' : 'none';
|
|
41
55
|
}
|
|
42
56
|
}
|
|
43
57
|
|