@pagopa/selfcare-common-frontend 1.12.2 → 1.12.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/CHANGELOG.md
CHANGED
|
@@ -4,8 +4,15 @@ All notable changes to this project will be documented in this file. Dates are d
|
|
|
4
4
|
|
|
5
5
|
Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
6
6
|
|
|
7
|
+
#### [v1.12.3](https://github.com/pagopa/selfcare-common-frontend/compare/v1.12.2...v1.12.3)
|
|
8
|
+
|
|
9
|
+
- SELC-1509 Added to checkCF one consonant case [`#102`](https://github.com/pagopa/selfcare-common-frontend/pull/102)
|
|
10
|
+
- SELC-1509 Added to checkCF one consonant case (#102) [`#1509`](https://pagopa.atlassian.net/browse/1509)
|
|
11
|
+
|
|
7
12
|
#### [v1.12.2](https://github.com/pagopa/selfcare-common-frontend/compare/v1.12.1...v1.12.2)
|
|
8
13
|
|
|
14
|
+
> 8 September 2022
|
|
15
|
+
|
|
9
16
|
- SELC-1509 Creation of utilities functions with description for easily usage in other repos [`#101`](https://github.com/pagopa/selfcare-common-frontend/pull/101)
|
|
10
17
|
- SELC-1509 Creation of utilities functions with description for easily usage in other repos (#101) [`#1509`](https://pagopa.atlassian.net/browse/1509)
|
|
11
18
|
|
package/build.info
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
remotes/origin/SELC-1407_usingEnableAssistanceProp
|
|
1
|
+
20220909.1 - selfcare-common-frontend.deploy(46565)
|
|
2
|
+
remotes/origin/SELC-1407_usingEnableAssistanceProp e8d12c68ca25067ad09e7514ecd2f399517921ae
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pagopa/selfcare-common-frontend",
|
|
3
3
|
"description": "Shared React components for the pagopa selfcare project",
|
|
4
|
-
"version": "1.12.
|
|
4
|
+
"version": "1.12.3",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": "https://github.com/pagopa/selfcare-common-frontend",
|
|
7
7
|
"author": "https://www.pagopa.gov.it",
|
|
@@ -6,8 +6,9 @@
|
|
|
6
6
|
* */
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
8
|
exports.verifyNameMatchWithTaxCode = void 0;
|
|
9
|
+
// eslint-disable-next-line sonarjs/cognitive-complexity
|
|
9
10
|
const verifyNameMatchWithTaxCode = (name, fiscalCode) => {
|
|
10
|
-
var _a, _b;
|
|
11
|
+
var _a, _b, _c;
|
|
11
12
|
const fiscalCodeName = fiscalCode === null || fiscalCode === void 0 ? void 0 : fiscalCode.substring(3, 6).toLocaleUpperCase();
|
|
12
13
|
const consonantsName = (_a = name
|
|
13
14
|
.match(/[^aeiou]/gi)) === null || _a === void 0 ? void 0 : _a.join('').replace(/\s/g, '').toLocaleUpperCase();
|
|
@@ -20,7 +21,7 @@ const verifyNameMatchWithTaxCode = (name, fiscalCode) => {
|
|
|
20
21
|
return false;
|
|
21
22
|
}
|
|
22
23
|
}
|
|
23
|
-
else if (consonantsName && (consonantsName === null || consonantsName === void 0 ? void 0 : consonantsName.length)
|
|
24
|
+
else if (consonantsName && (consonantsName === null || consonantsName === void 0 ? void 0 : consonantsName.length) === 2) {
|
|
24
25
|
const firstVocalFound = (_b = name
|
|
25
26
|
.match(/[aeiou]/gi)) === null || _b === void 0 ? void 0 : _b.join('').substring(0, 1).toLocaleUpperCase();
|
|
26
27
|
if (firstVocalFound) {
|
|
@@ -30,6 +31,16 @@ const verifyNameMatchWithTaxCode = (name, fiscalCode) => {
|
|
|
30
31
|
}
|
|
31
32
|
}
|
|
32
33
|
}
|
|
34
|
+
else if (consonantsName && (consonantsName === null || consonantsName === void 0 ? void 0 : consonantsName.length) === 1) {
|
|
35
|
+
const firstTwoVocalFound = (_c = name
|
|
36
|
+
.match(/[aeiou]/gi)) === null || _c === void 0 ? void 0 : _c.join('').substring(0, 2).toLocaleUpperCase();
|
|
37
|
+
if (firstTwoVocalFound) {
|
|
38
|
+
const threeNameLetters = consonantsName === null || consonantsName === void 0 ? void 0 : consonantsName.concat(firstTwoVocalFound);
|
|
39
|
+
if (fiscalCodeName === threeNameLetters) {
|
|
40
|
+
return false;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
33
44
|
else {
|
|
34
45
|
return true;
|
|
35
46
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verifyNameMatchWithTaxCode.js","sourceRoot":"","sources":["../../src/lib/utils/verifyNameMatchWithTaxCode.tsx"],"names":[],"mappings":";AAAA;;;;KAIK;;;
|
|
1
|
+
{"version":3,"file":"verifyNameMatchWithTaxCode.js","sourceRoot":"","sources":["../../src/lib/utils/verifyNameMatchWithTaxCode.tsx"],"names":[],"mappings":";AAAA;;;;KAIK;;;AAEL,wDAAwD;AACjD,MAAM,0BAA0B,GAAG,CAAC,IAAY,EAAE,UAAmB,EAAE,EAAE;;IAC9E,MAAM,cAAc,GAAG,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,SAAS,CAAC,CAAC,EAAE,CAAC,EAAE,iBAAiB,EAAE,CAAC;IACvE,MAAM,cAAc,GAAG,MAAA,IAAI;SACxB,KAAK,CAAC,YAAY,CAAC,0CAClB,IAAI,CAAC,EAAE,EACR,OAAO,CAAC,KAAK,EAAE,EAAE,EACjB,iBAAiB,EAAE,CAAC;IACvB,IAAI,CAAA,cAAc,aAAd,cAAc,uBAAd,cAAc,CAAE,MAAM,MAAK,CAAC,IAAI,cAAc,KAAK,cAAc,EAAE;QACrE,OAAO,KAAK,CAAC;KACd;SAAM,IAAI,cAAc,IAAI,CAAA,cAAc,aAAd,cAAc,uBAAd,cAAc,CAAE,MAAM,IAAG,CAAC,EAAE;QACvD,MAAM,gBAAgB,GAAG,CAAA,cAAc,aAAd,cAAc,uBAAd,cAAc,CAAE,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,KAAG,cAAc,aAAd,cA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