@pagopa/selfcare-common-frontend 1.18.0 → 1.20.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 +18 -0
- package/build.info +2 -2
- package/components/EndingPage.d.ts +3 -1
- package/components/EndingPage.js +1 -1
- package/components/EndingPage.js.map +1 -1
- package/package.json +1 -1
- package/utils/verifyNameMatchWithTaxCode.js +13 -38
- package/utils/verifyNameMatchWithTaxCode.js.map +1 -1
- package/utils/verifySurnameMatchWithTaxCode.js +10 -35
- package/utils/verifySurnameMatchWithTaxCode.js.map +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,8 +4,26 @@ 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.20.0](https://github.com/pagopa/selfcare-common-frontend/compare/v1.19.0...v1.20.0)
|
|
8
|
+
|
|
9
|
+
- SELC-2156 - added tax code check with name and surname with two letters [`#156`](https://github.com/pagopa/selfcare-common-frontend/pull/156)
|
|
10
|
+
- SELC-2156 - added tax code check with name and surname with two letters (#156) [`#2156`](https://pagopa.atlassian.net/browse/2156)
|
|
11
|
+
- SELC-2156 [`#2156`](https://pagopa.atlassian.net/browse/2156)
|
|
12
|
+
- SELC-2156 - added control to tax code check with name and surname with two letters [`#2156`](https://pagopa.atlassian.net/browse/2156)
|
|
13
|
+
- SELC-2156 - temp fix [`#2156`](https://pagopa.atlassian.net/browse/2156)
|
|
14
|
+
|
|
15
|
+
#### [v1.19.0](https://github.com/pagopa/selfcare-common-frontend/compare/v1.18.0...v1.19.0)
|
|
16
|
+
|
|
17
|
+
> 21 March 2023
|
|
18
|
+
|
|
19
|
+
- SELC-2124 - added no mandatory paragraph [`#155`](https://github.com/pagopa/selfcare-common-frontend/pull/155)
|
|
20
|
+
- SELC-2124 - added no mandatory paragraph (#155) [`#2124`](https://pagopa.atlassian.net/browse/2124)
|
|
21
|
+
- SELC-2124 - added no mandatory paragraph [`#2124`](https://pagopa.atlassian.net/browse/2124)
|
|
22
|
+
|
|
7
23
|
#### [v1.18.0](https://github.com/pagopa/selfcare-common-frontend/compare/v1.17.0...v1.18.0)
|
|
8
24
|
|
|
25
|
+
> 11 March 2023
|
|
26
|
+
|
|
9
27
|
#### [v1.17.0](https://github.com/pagopa/selfcare-common-frontend/compare/v1.16.1...v1.17.0)
|
|
10
28
|
|
|
11
29
|
> 11 March 2023
|
package/build.info
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
20230328.1 - selfcare-common-frontend.deploy(84806)
|
|
2
|
+
remotes/origin/dependabot/npm_and_yarn/emotion/styled-11.10.6 debfcd80a5182cf0b4dbce030d1f123b8becb926
|
|
@@ -17,7 +17,9 @@ declare type Props = {
|
|
|
17
17
|
variantTitle?: 'button' | 'caption' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'inherit' | 'subtitle1' | 'subtitle2' | 'body1' | 'body2' | 'overline' | undefined;
|
|
18
18
|
/** Set the variant of the description */
|
|
19
19
|
variantDescription?: 'button' | 'caption' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'inherit' | 'subtitle1' | 'subtitle2' | 'body1' | 'body2' | 'overline' | undefined;
|
|
20
|
+
paragraph?: React.ReactNode;
|
|
21
|
+
isParagraphPresent?: boolean;
|
|
20
22
|
};
|
|
21
|
-
declare const _default: ({ minHeight, description, onButtonClick, icon, title, buttonLabel, variantTitle, variantDescription, }: Props) => JSX.Element;
|
|
23
|
+
declare const _default: ({ minHeight, description, onButtonClick, icon, title, buttonLabel, variantTitle, variantDescription, paragraph, isParagraphPresent, }: Props) => JSX.Element;
|
|
22
24
|
/** Selfcare's Ending Page */
|
|
23
25
|
export default _default;
|
package/components/EndingPage.js
CHANGED
|
@@ -3,5 +3,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
4
4
|
const material_1 = require("@mui/material");
|
|
5
5
|
/** Selfcare's Ending Page */
|
|
6
|
-
exports.default = ({ minHeight, description, onButtonClick, icon, title, buttonLabel, variantTitle, variantDescription, }) => ((0, jsx_runtime_1.jsx)(material_1.Box, { sx: { minHeight, position: 'static' }, display: "flex", flexGrow: 1, children: (0, jsx_runtime_1.jsxs)(material_1.Grid, { container: true, direction: "column", style: { textAlign: 'center' }, margin: 'auto', children: [(0, jsx_runtime_1.jsx)(material_1.Grid, { container: true, item: true, justifyContent: "center", mb: 3, children: (0, jsx_runtime_1.jsx)(material_1.Grid, { item: true, xs: 6, children: icon }) }), (0, jsx_runtime_1.jsx)(material_1.Grid, { container: true, item: true, justifyContent: "center", children: (0, jsx_runtime_1.jsx)(material_1.Grid, { item: true, xs: 6, children: (0, jsx_runtime_1.jsx)(material_1.Typography, { variant: variantTitle, children: title }) }) }), (0, jsx_runtime_1.jsx)(material_1.Grid, { container: true, item: true, justifyContent: "center", mb: 4, mt: 1, children: (0, jsx_runtime_1.jsx)(material_1.Grid, { item: true, xs: 6, children: (0, jsx_runtime_1.jsx)(material_1.Typography, { variant: variantDescription, children: description }) }) }), onButtonClick && ((0, jsx_runtime_1.jsx)(material_1.Grid, { container: true, item: true, justifyContent: "center", children: (0, jsx_runtime_1.jsx)(material_1.Grid, { item: true, xs: 4, children: (0, jsx_runtime_1.jsx)(material_1.Button, { variant: "contained", sx: { alignSelf: 'center' }, onClick: onButtonClick, children: buttonLabel }) }) }))] }, "0") }));
|
|
6
|
+
exports.default = ({ minHeight, description, onButtonClick, icon, title, buttonLabel, variantTitle, variantDescription, paragraph, isParagraphPresent, }) => ((0, jsx_runtime_1.jsx)(material_1.Box, { sx: { minHeight, position: 'static' }, display: "flex", flexGrow: 1, children: (0, jsx_runtime_1.jsxs)(material_1.Grid, { container: true, direction: "column", style: { textAlign: 'center' }, margin: 'auto', children: [(0, jsx_runtime_1.jsx)(material_1.Grid, { container: true, item: true, justifyContent: "center", mb: 3, children: (0, jsx_runtime_1.jsx)(material_1.Grid, { item: true, xs: 6, children: icon }) }), (0, jsx_runtime_1.jsx)(material_1.Grid, { container: true, item: true, justifyContent: "center", children: (0, jsx_runtime_1.jsx)(material_1.Grid, { item: true, xs: 6, children: (0, jsx_runtime_1.jsx)(material_1.Typography, { variant: variantTitle, children: title }) }) }), (0, jsx_runtime_1.jsx)(material_1.Grid, { container: true, item: true, justifyContent: "center", mb: 4, mt: 1, children: (0, jsx_runtime_1.jsx)(material_1.Grid, { item: true, xs: 6, children: (0, jsx_runtime_1.jsx)(material_1.Typography, { variant: variantDescription, children: description }) }) }), onButtonClick && ((0, jsx_runtime_1.jsx)(material_1.Grid, { container: true, item: true, justifyContent: "center", children: (0, jsx_runtime_1.jsx)(material_1.Grid, { item: true, xs: 4, children: (0, jsx_runtime_1.jsx)(material_1.Button, { variant: "contained", sx: { alignSelf: 'center' }, onClick: onButtonClick, children: buttonLabel }) }) })), isParagraphPresent && ((0, jsx_runtime_1.jsx)(material_1.Grid, { container: true, item: true, justifyContent: "center", mb: 4, mt: 6, children: (0, jsx_runtime_1.jsx)(material_1.Grid, { item: true, xs: 6, children: (0, jsx_runtime_1.jsx)(material_1.Typography, { variant: variantDescription, children: paragraph }) }) }))] }, "0") }));
|
|
7
7
|
//# sourceMappingURL=EndingPage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EndingPage.js","sourceRoot":"","sources":["../../src/lib/components/EndingPage.tsx"],"names":[],"mappings":";;;AAAA,4CAA4E;
|
|
1
|
+
{"version":3,"file":"EndingPage.js","sourceRoot":"","sources":["../../src/lib/components/EndingPage.tsx"],"names":[],"mappings":";;;AAAA,4CAA4E;AAsD5E,6BAA6B;AAC7B,kBAAe,CAAC,EACd,SAAS,EACT,WAAW,EACX,aAAa,EACb,IAAI,EACJ,KAAK,EACL,WAAW,EACX,YAAY,EACZ,kBAAkB,EAClB,SAAS,EACT,kBAAkB,GACZ,EAAE,EAAE,CAAC,CACX,uBAAC,cAAG,IAAC,EAAE,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,OAAO,EAAC,MAAM,EAAC,QAAQ,EAAE,CAAC,YACpE,wBAAC,eAAI,IAAC,SAAS,QAAC,SAAS,EAAC,QAAQ,EAAS,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,MAAM,EAAE,MAAM,aACvF,uBAAC,eAAI,IAAC,SAAS,QAAC,IAAI,QAAC,cAAc,EAAC,QAAQ,EAAC,EAAE,EAAE,CAAC,YAChD,uBAAC,eAAI,IAAC,IAAI,QAAC,EAAE,EAAE,CAAC,YACb,IAAI,GACA,GACF,EACP,uBAAC,eAAI,IAAC,SAAS,QAAC,IAAI,QAAC,cAAc,EAAC,QAAQ,YAC1C,uBAAC,eAAI,IAAC,IAAI,QAAC,EAAE,EAAE,CAAC,YACd,uBAAC,qBAAU,IAAC,OAAO,EAAE,YAAY,YAAG,KAAK,GAAc,GAClD,GACF,EACP,uBAAC,eAAI,IAAC,SAAS,QAAC,IAAI,QAAC,cAAc,EAAC,QAAQ,EAAC,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,YACvD,uBAAC,eAAI,IAAC,IAAI,QAAC,EAAE,EAAE,CAAC,YACd,uBAAC,qBAAU,IAAC,OAAO,EAAE,kBAAkB,YAAG,WAAW,GAAc,GAC9D,GACF,EACN,aAAa,IAAI,CAChB,uBAAC,eAAI,IAAC,SAAS,QAAC,IAAI,QAAC,cAAc,EAAC,QAAQ,YAC1C,uBAAC,eAAI,IAAC,IAAI,QAAC,EAAE,EAAE,CAAC,YACd,uBAAC,iBAAM,IAAC,OAAO,EAAC,WAAW,EAAC,EAAE,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,OAAO,EAAE,aAAa,YAC5E,WAAW,GACL,GACJ,GACF,CACR,EAEA,kBAAkB,IAAI,CACrB,uBAAC,eAAI,IAAC,SAAS,QAAC,IAAI,QAAC,cAAc,EAAC,QAAQ,EAAC,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,YACvD,uBAAC,eAAI,IAAC,IAAI,QAAC,EAAE,EAAE,CAAC,YACd,uBAAC,qBAAU,IAAC,OAAO,EAAE,kBAAkB,YAAG,SAAS,GAAc,GAC5D,GACF,CACR,KAhCoC,GAAG,CAiCnC,GACH,CACP,CAAC"}
|
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.20.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"}
|