@pagopa/selfcare-common-frontend 1.19.0 → 1.21.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/CHANGELOG.md
CHANGED
|
@@ -4,8 +4,22 @@ 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.21.0](https://github.com/pagopa/selfcare-common-frontend/compare/v1.20.0...v1.21.0)
|
|
8
|
+
|
|
9
|
+
#### [v1.20.0](https://github.com/pagopa/selfcare-common-frontend/compare/v1.19.0...v1.20.0)
|
|
10
|
+
|
|
11
|
+
> 28 March 2023
|
|
12
|
+
|
|
13
|
+
- SELC-2156 - added tax code check with name and surname with two letters [`#156`](https://github.com/pagopa/selfcare-common-frontend/pull/156)
|
|
14
|
+
- SELC-2156 - added tax code check with name and surname with two letters (#156) [`#2156`](https://pagopa.atlassian.net/browse/2156)
|
|
15
|
+
- SELC-2156 [`#2156`](https://pagopa.atlassian.net/browse/2156)
|
|
16
|
+
- SELC-2156 - added control to tax code check with name and surname with two letters [`#2156`](https://pagopa.atlassian.net/browse/2156)
|
|
17
|
+
- SELC-2156 - temp fix [`#2156`](https://pagopa.atlassian.net/browse/2156)
|
|
18
|
+
|
|
7
19
|
#### [v1.19.0](https://github.com/pagopa/selfcare-common-frontend/compare/v1.18.0...v1.19.0)
|
|
8
20
|
|
|
21
|
+
> 21 March 2023
|
|
22
|
+
|
|
9
23
|
- SELC-2124 - added no mandatory paragraph [`#155`](https://github.com/pagopa/selfcare-common-frontend/pull/155)
|
|
10
24
|
- SELC-2124 - added no mandatory paragraph (#155) [`#2124`](https://pagopa.atlassian.net/browse/2124)
|
|
11
25
|
- SELC-2124 - added no mandatory paragraph [`#2124`](https://pagopa.atlassian.net/browse/2124)
|
package/build.info
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
remotes/origin/dependabot/npm_and_yarn/emotion/styled-11.10.6
|
|
1
|
+
20230419.1 - selfcare-common-frontend.deploy(88926)
|
|
2
|
+
remotes/origin/dependabot/npm_and_yarn/emotion/styled-11.10.6 fdc2aa873bc2f5922c9f3737269026657e39cde0
|
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.
|
|
4
|
+
"version": "1.21.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": "https://github.com/pagopa/selfcare-common-frontend",
|
|
7
7
|
"author": "https://www.pagopa.gov.it",
|
|
@@ -6,45 +6,20 @@
|
|
|
6
6
|
* */
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
8
|
exports.verifyNameMatchWithTaxCode = void 0;
|
|
9
|
-
// eslint-disable-next-line sonarjs/cognitive-complexity
|
|
10
9
|
const verifyNameMatchWithTaxCode = (name, fiscalCode) => {
|
|
11
|
-
var _a, _b
|
|
12
|
-
const fiscalCodeName = fiscalCode === null || fiscalCode === void 0 ? void 0 : fiscalCode.substring(3, 6).
|
|
13
|
-
const consonantsName = (
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
const firstVocalFound = (_b = name === null || name === void 0 ? void 0 : name.match(/[aeiou]/gi)) === null || _b === void 0 ? void 0 : _b.join('').substring(0, 1).toLocaleUpperCase();
|
|
25
|
-
if (firstVocalFound) {
|
|
26
|
-
const threeNameLetters = consonantsName === null || consonantsName === void 0 ? void 0 : consonantsName.concat(firstVocalFound);
|
|
27
|
-
if (fiscalCodeName === threeNameLetters) {
|
|
28
|
-
return false;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
else if (consonantsName && (consonantsName === null || consonantsName === void 0 ? void 0 : consonantsName.length) === 1) {
|
|
33
|
-
const firstTwoVocalFound = (_c = name === null || name === void 0 ? void 0 : name.match(/[aeiou]/gi)) === null || _c === void 0 ? void 0 : _c.join('').substring(0, 2).toLocaleUpperCase();
|
|
34
|
-
if (firstTwoVocalFound) {
|
|
35
|
-
const threeNameLetters = consonantsName === null || consonantsName === void 0 ? void 0 : consonantsName.concat(firstTwoVocalFound);
|
|
36
|
-
if (fiscalCodeName === threeNameLetters) {
|
|
37
|
-
return false;
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
else {
|
|
42
|
-
const firstThreeVocalFound = (_d = name === null || name === void 0 ? void 0 : name.match(/[aeiou]/gi)) === null || _d === void 0 ? void 0 : _d.join('').substring(0, 3).toLocaleUpperCase();
|
|
43
|
-
if (fiscalCodeName === firstThreeVocalFound) {
|
|
44
|
-
return false;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
return fiscalCode;
|
|
10
|
+
var _a, _b;
|
|
11
|
+
const fiscalCodeName = fiscalCode === null || fiscalCode === void 0 ? void 0 : fiscalCode.substring(3, 6).toUpperCase();
|
|
12
|
+
const consonantsName = (name === null || name === void 0 ? void 0 : name.match(/[^aeiou]/gi))
|
|
13
|
+
? (_a = name === null || name === void 0 ? void 0 : name.match(/[^aeiou]/gi)) === null || _a === void 0 ? void 0 : _a.join('').replace(/\s/g, '').replace(/'/g, '').toUpperCase()
|
|
14
|
+
: '';
|
|
15
|
+
const consonantsNameFiltered = consonantsName && consonantsName.length >= 4
|
|
16
|
+
? `${consonantsName === null || consonantsName === void 0 ? void 0 : consonantsName.slice(0, 1)}${consonantsName === null || consonantsName === void 0 ? void 0 : consonantsName.slice(2, 4)}`
|
|
17
|
+
: consonantsName;
|
|
18
|
+
const vowelsName = (name === null || name === void 0 ? void 0 : name.match(/[aeiou]/gi))
|
|
19
|
+
? (_b = name === null || name === void 0 ? void 0 : name.match(/[aeiou]/gi)) === null || _b === void 0 ? void 0 : _b.join('').toUpperCase()
|
|
20
|
+
: '';
|
|
21
|
+
const calculatedName = `${consonantsNameFiltered}${vowelsName}XX`.substring(0, 3);
|
|
22
|
+
return calculatedName === fiscalCodeName ? false : fiscalCode;
|
|
48
23
|
};
|
|
49
24
|
exports.verifyNameMatchWithTaxCode = verifyNameMatchWithTaxCode;
|
|
50
25
|
//# sourceMappingURL=verifyNameMatchWithTaxCode.js.map
|
|
@@ -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;;;AAEE,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,WAAW,EAAE,CAAC;IAEjE,MAAM,cAAc,GAAG,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,KAAK,CAAC,YAAY,CAAC;QAC9C,CAAC,CAAC,MAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CACA,KAAK,CAAC,YAAY,CAAC,0CACnB,IAAI,CAAC,EAAE,EACR,OAAO,CAAC,KAAK,EAAE,EAAE,EACjB,OAAO,CAAC,IAAI,EAAE,EAAE,EAChB,WAAW,EAAE;QAClB,CAAC,CAAC,EAAE,CAAC;IAEP,MAAM,sBAAsB,GAC1B,cAAc,IAAI,cAAc,CAAC,MAAM,IAAI,CAAC;QAC1C,CAAC,CAAC,GAAG,cAAc,aAAd,cAAc,uBAAd,cAAc,CAAE,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,cAAc,aAAd,cAAc,uBAAd,cAAc,CAAE,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE;QAChE,CAAC,CAAC,cAAc,CAAC;IAErB,MAAM,UAAU,GAAG,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,KAAK,CAAC,WAAW,CAAC;QACzC,CAAC,CAAC,MAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CACA,KAAK,CAAC,WAAW,CAAC,0CAClB,IAAI,CAAC,EAAE,EACR,WAAW,EAAE;QAClB,CAAC,CAAC,EAAE,CAAC;IAEP,MAAM,cAAc,GAAG,GAAG,sBAAsB,GAAG,UAAU,IAAI,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAElF,OAAO,cAAc,KAAK,cAAc,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,UAAU,CAAC;AAChE,CAAC,CAAC;AA3BW,QAAA,0BAA0B,8BA2BrC"}
|
|
@@ -6,42 +6,17 @@
|
|
|
6
6
|
* */
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
8
|
exports.verifySurnameMatchWithTaxCode = void 0;
|
|
9
|
-
// eslint-disable-next-line sonarjs/cognitive-complexity
|
|
10
9
|
const verifySurnameMatchWithTaxCode = (surname, fiscalCode) => {
|
|
11
|
-
var _a, _b
|
|
12
|
-
const fiscalCodeSurname = fiscalCode === null || fiscalCode === void 0 ? void 0 : fiscalCode.substring(0, 3).
|
|
13
|
-
const consonantsSurname = (
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
const firstVocalFound = (_b = surname === null || surname === void 0 ? void 0 : surname.match(/[aeiou]/gi)) === null || _b === void 0 ? void 0 : _b.join('').substring(0, 1).toLocaleUpperCase();
|
|
22
|
-
if (firstVocalFound) {
|
|
23
|
-
const threeSurnameLetters = consonantsSurname === null || consonantsSurname === void 0 ? void 0 : consonantsSurname.concat(firstVocalFound);
|
|
24
|
-
if (fiscalCodeSurname === threeSurnameLetters) {
|
|
25
|
-
return false;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
else if (consonantsSurname && (consonantsSurname === null || consonantsSurname === void 0 ? void 0 : consonantsSurname.length) === 1) {
|
|
30
|
-
const firstTwoVocalFound = (_c = surname === null || surname === void 0 ? void 0 : surname.match(/[aeiou]/gi)) === null || _c === void 0 ? void 0 : _c.join('').substring(0, 2).toLocaleUpperCase();
|
|
31
|
-
if (firstTwoVocalFound) {
|
|
32
|
-
const threeNameLetters = consonantsSurname === null || consonantsSurname === void 0 ? void 0 : consonantsSurname.concat(firstTwoVocalFound);
|
|
33
|
-
if (fiscalCodeSurname === threeNameLetters) {
|
|
34
|
-
return false;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
else {
|
|
39
|
-
const firstThreeVocalFound = (_d = surname === null || surname === void 0 ? void 0 : surname.match(/[aeiou]/gi)) === null || _d === void 0 ? void 0 : _d.join('').substring(0, 3).toLocaleUpperCase();
|
|
40
|
-
if (fiscalCodeSurname === firstThreeVocalFound) {
|
|
41
|
-
return false;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
return fiscalCode;
|
|
10
|
+
var _a, _b;
|
|
11
|
+
const fiscalCodeSurname = fiscalCode === null || fiscalCode === void 0 ? void 0 : fiscalCode.substring(0, 3).toUpperCase();
|
|
12
|
+
const consonantsSurname = (surname === null || surname === void 0 ? void 0 : surname.match(/[^aeiou]/gi))
|
|
13
|
+
? (_a = surname === null || surname === void 0 ? void 0 : surname.match(/[^aeiou]/gi)) === null || _a === void 0 ? void 0 : _a.join('').replace(/\s/g, '').replace(/'/g, '').toUpperCase()
|
|
14
|
+
: '';
|
|
15
|
+
const vowelsSurname = (surname === null || surname === void 0 ? void 0 : surname.match(/[aeiou]/gi))
|
|
16
|
+
? (_b = surname === null || surname === void 0 ? void 0 : surname.match(/[aeiou]/gi)) === null || _b === void 0 ? void 0 : _b.join('').toUpperCase()
|
|
17
|
+
: '';
|
|
18
|
+
const calculatedSurname = `${consonantsSurname}${vowelsSurname}XX`.substring(0, 3);
|
|
19
|
+
return calculatedSurname === fiscalCodeSurname ? false : fiscalCode;
|
|
45
20
|
};
|
|
46
21
|
exports.verifySurnameMatchWithTaxCode = verifySurnameMatchWithTaxCode;
|
|
47
22
|
//# sourceMappingURL=verifySurnameMatchWithTaxCode.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verifySurnameMatchWithTaxCode.js","sourceRoot":"","sources":["../../src/lib/utils/verifySurnameMatchWithTaxCode.tsx"],"names":[],"mappings":";AAAA;;;;KAIK;;;
|
|
1
|
+
{"version":3,"file":"verifySurnameMatchWithTaxCode.js","sourceRoot":"","sources":["../../src/lib/utils/verifySurnameMatchWithTaxCode.tsx"],"names":[],"mappings":";AAAA;;;;KAIK;;;AAEE,MAAM,6BAA6B,GAAG,CAAC,OAAe,EAAE,UAAmB,EAAE,EAAE;;IACpF,MAAM,iBAAiB,GAAG,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,SAAS,CAAC,CAAC,EAAE,CAAC,EAAE,WAAW,EAAE,CAAC;IAEpE,MAAM,iBAAiB,GAAG,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,KAAK,CAAC,YAAY,CAAC;QACpD,CAAC,CAAC,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CACH,KAAK,CAAC,YAAY,CAAC,0CACnB,IAAI,CAAC,EAAE,EACR,OAAO,CAAC,KAAK,EAAE,EAAE,EACjB,OAAO,CAAC,IAAI,EAAE,EAAE,EAChB,WAAW,EAAE;QAClB,CAAC,CAAC,EAAE,CAAC;IAEP,MAAM,aAAa,GAAG,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,KAAK,CAAC,WAAW,CAAC;QAC/C,CAAC,CAAC,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CACH,KAAK,CAAC,WAAW,CAAC,0CAClB,IAAI,CAAC,EAAE,EACR,WAAW,EAAE;QAClB,CAAC,CAAC,EAAE,CAAC;IAEP,MAAM,iBAAiB,GAAG,GAAG,iBAAiB,GAAG,aAAa,IAAI,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAEnF,OAAO,iBAAiB,KAAK,iBAAiB,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,UAAU,CAAC;AACtE,CAAC,CAAC;AAtBW,QAAA,6BAA6B,iCAsBxC"}
|