@peculiar/certificates-viewer 4.2.1 → 4.3.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/components/attribute-certificate-viewer.js +17 -14
- package/components/attribute-certificate-viewer.js.map +1 -1
- package/components/attribute.js +53 -0
- package/components/attribute.js.map +1 -0
- package/components/certificate-viewer.js +15 -13
- package/components/certificate-viewer.js.map +1 -1
- package/components/crl-viewer.js +20 -18
- package/components/crl-viewer.js.map +1 -1
- package/components/csr-viewer.js +9 -99
- package/components/csr-viewer.js.map +1 -1
- package/components/download.js +12518 -9
- package/components/download.js.map +1 -1
- package/components/index.js +2 -0
- package/components/index.js.map +1 -1
- package/components/index2.js +3 -48
- package/components/index2.js.map +1 -1
- package/components/issuer_name.js +2 -2
- package/components/miscellaneous.js +41 -12555
- package/components/miscellaneous.js.map +1 -1
- package/components/peculiar-certificate-decoder.js +17 -105
- package/components/peculiar-certificate-decoder.js.map +1 -1
- package/components/peculiar-certificates-viewer.js +1 -2
- package/components/peculiar-certificates-viewer.js.map +1 -1
- package/components/peculiar-crl-viewer.js +1 -1
- package/components/peculiar-csr-viewer.js +1 -1
- package/components/pkcs10_certificate_request.js +102 -0
- package/components/pkcs10_certificate_request.js.map +1 -0
- package/components/read_file.js +110 -0
- package/components/read_file.js.map +1 -0
- package/components/subject_name.js +2 -2
- package/dist/cjs/{certification_request-b0d72620.js → certification_request-314859bb.js} +3266 -2810
- package/dist/cjs/certification_request-314859bb.js.map +1 -0
- package/dist/cjs/index.cjs.js +12 -5
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/{miscellaneous-dcb93a5b.js → miscellaneous-f1bc3a4b.js} +22 -23
- package/dist/cjs/miscellaneous-f1bc3a4b.js.map +1 -0
- package/dist/cjs/peculiar-attribute-certificate-viewer_3.cjs.entry.js +20 -20
- package/dist/cjs/peculiar-attribute-certificate-viewer_3.cjs.entry.js.map +1 -1
- package/dist/cjs/peculiar-certificate-decoder.cjs.entry.js +20 -108
- package/dist/cjs/peculiar-certificate-decoder.cjs.entry.js.map +1 -1
- package/dist/cjs/peculiar-certificate-viewer.cjs.entry.js +3 -4
- package/dist/cjs/peculiar-certificate-viewer.cjs.entry.js.map +1 -1
- package/dist/cjs/peculiar-certificates-viewer.cjs.entry.js +2 -3
- package/dist/cjs/peculiar-certificates-viewer.cjs.entry.js.map +1 -1
- package/dist/cjs/pkcs10_certificate_request-93c66ce7.js +149 -0
- package/dist/cjs/pkcs10_certificate_request-93c66ce7.js.map +1 -0
- package/dist/cjs/read_file-2e22a97e.js +115 -0
- package/dist/cjs/read_file-2e22a97e.js.map +1 -0
- package/dist/cjs/{x509_certificate-ebf4cbd4.js → x509_certificate-0776e3ec.js} +17 -16
- package/dist/cjs/x509_certificate-0776e3ec.js.map +1 -0
- package/dist/cjs/x509_crl-5326d209.js +179 -0
- package/dist/cjs/x509_crl-5326d209.js.map +1 -0
- package/dist/collection/components/certificate-decoder/certificate-decoder.js +15 -72
- package/dist/collection/components/certificate-decoder/certificate-decoder.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/miscellaneous.js.map +1 -1
- package/dist/collection/components/crl-viewer/crl-viewer.js +6 -6
- package/dist/collection/components/crl-viewer/crl-viewer.js.map +1 -1
- package/dist/collection/components/csr-viewer/csr-viewer.js +6 -6
- package/dist/collection/components/csr-viewer/csr-viewer.js.map +1 -1
- package/dist/collection/constants/oids.js +3 -0
- package/dist/collection/constants/oids.js.map +1 -1
- package/dist/collection/crypto/index.js +2 -2
- package/dist/collection/crypto/index.js.map +1 -1
- package/dist/collection/crypto/{csr.js → pkcs10_certificate_request.js} +14 -12
- package/dist/collection/crypto/pkcs10_certificate_request.js.map +1 -0
- package/dist/collection/crypto/x509_attribute_certificate.js +13 -11
- package/dist/collection/crypto/x509_attribute_certificate.js.map +1 -1
- package/dist/collection/crypto/x509_certificate.js +13 -11
- package/dist/collection/crypto/x509_certificate.js.map +1 -1
- package/dist/collection/crypto/{crl.js → x509_crl.js} +14 -12
- package/dist/collection/crypto/x509_crl.js.map +1 -0
- package/dist/collection/index.js +2 -0
- package/dist/collection/index.js.map +1 -1
- package/dist/collection/utils/download.js +8 -8
- package/dist/collection/utils/download.js.map +1 -1
- package/dist/collection/utils/validator.js +0 -8
- package/dist/collection/utils/validator.js.map +1 -1
- package/dist/esm/{certification_request-2c054ece.js → certification_request-b531916a.js} +3202 -2745
- package/dist/esm/certification_request-b531916a.js.map +1 -0
- package/dist/esm/index.js +3 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/{miscellaneous-0e98b5bc.js → miscellaneous-7fe71e3f.js} +2 -3
- package/dist/esm/miscellaneous-7fe71e3f.js.map +1 -0
- package/dist/esm/peculiar-attribute-certificate-viewer_3.entry.js +12 -12
- package/dist/esm/peculiar-attribute-certificate-viewer_3.entry.js.map +1 -1
- package/dist/esm/peculiar-certificate-decoder.entry.js +18 -106
- package/dist/esm/peculiar-certificate-decoder.entry.js.map +1 -1
- package/dist/esm/peculiar-certificate-viewer.entry.js +3 -4
- package/dist/esm/peculiar-certificate-viewer.entry.js.map +1 -1
- package/dist/esm/peculiar-certificates-viewer.entry.js +2 -3
- package/dist/esm/peculiar-certificates-viewer.entry.js.map +1 -1
- package/dist/esm/pkcs10_certificate_request-cca2ca68.js +146 -0
- package/dist/esm/pkcs10_certificate_request-cca2ca68.js.map +1 -0
- package/dist/esm/read_file-bb0b1450.js +110 -0
- package/dist/esm/read_file-bb0b1450.js.map +1 -0
- package/dist/esm/{x509_certificate-ad568d3a.js → x509_certificate-050175dd.js} +15 -14
- package/dist/esm/x509_certificate-050175dd.js.map +1 -0
- package/dist/esm/x509_crl-c497f907.js +176 -0
- package/dist/esm/x509_crl-c497f907.js.map +1 -0
- package/dist/esm-es5/{certification_request-2c054ece.js → certification_request-b531916a.js} +61 -23
- package/dist/esm-es5/certification_request-b531916a.js.map +1 -0
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/{miscellaneous-0e98b5bc.js → miscellaneous-7fe71e3f.js} +2 -2
- package/dist/esm-es5/{miscellaneous-0e98b5bc.js.map → miscellaneous-7fe71e3f.js.map} +1 -1
- package/dist/esm-es5/peculiar-attribute-certificate-viewer_3.entry.js +2 -2
- package/dist/esm-es5/peculiar-attribute-certificate-viewer_3.entry.js.map +1 -1
- package/dist/esm-es5/peculiar-certificate-decoder.entry.js +2 -9
- package/dist/esm-es5/peculiar-certificate-decoder.entry.js.map +1 -1
- package/dist/esm-es5/peculiar-certificate-viewer.entry.js +2 -2
- package/dist/esm-es5/peculiar-certificate-viewer.entry.js.map +1 -1
- package/dist/esm-es5/peculiar-certificates-viewer.entry.js +1 -1
- package/dist/esm-es5/pkcs10_certificate_request-cca2ca68.js +19 -0
- package/dist/esm-es5/pkcs10_certificate_request-cca2ca68.js.map +1 -0
- package/dist/esm-es5/read_file-bb0b1450.js +12 -0
- package/dist/esm-es5/read_file-bb0b1450.js.map +1 -0
- package/dist/esm-es5/x509_certificate-050175dd.js +12 -0
- package/dist/esm-es5/x509_certificate-050175dd.js.map +1 -0
- package/dist/esm-es5/x509_crl-c497f907.js +19 -0
- package/dist/esm-es5/x509_crl-c497f907.js.map +1 -0
- package/dist/peculiar/index.esm.js +1 -1
- package/dist/peculiar/p-05af3b74.system.js +13 -0
- package/dist/peculiar/p-05af3b74.system.js.map +1 -0
- package/dist/peculiar/p-163a3052.system.js +20 -0
- package/dist/peculiar/p-163a3052.system.js.map +1 -0
- package/dist/peculiar/p-25a532a3.js +12 -0
- package/dist/peculiar/p-25a532a3.js.map +1 -0
- package/dist/peculiar/{p-5cf4562f.system.entry.js → p-2d9c40d6.system.entry.js} +16 -16
- package/dist/peculiar/p-2d9c40d6.system.entry.js.map +1 -0
- package/dist/peculiar/p-494d26fb.entry.js +5 -0
- package/dist/peculiar/p-494d26fb.entry.js.map +1 -0
- package/dist/peculiar/{p-ff3ced3c.system.js → p-52f13c4a.system.js} +45 -45
- package/dist/peculiar/{p-ff3ced3c.system.js.map → p-52f13c4a.system.js.map} +1 -1
- package/dist/peculiar/p-55303453.system.js +12 -0
- package/dist/peculiar/p-55303453.system.js.map +1 -0
- package/dist/peculiar/p-5a699274.js +19 -0
- package/dist/peculiar/p-5a699274.js.map +1 -0
- package/dist/peculiar/p-6221d0a4.system.entry.js +5 -0
- package/dist/peculiar/p-6221d0a4.system.entry.js.map +1 -0
- package/dist/peculiar/p-666438a8.js +135 -0
- package/dist/peculiar/p-666438a8.js.map +1 -0
- package/dist/peculiar/{p-c23fd001.entry.js → p-7a5173be.entry.js} +16 -16
- package/dist/peculiar/p-7a5173be.entry.js.map +1 -0
- package/dist/peculiar/p-80477c05.js +12 -0
- package/dist/peculiar/p-80477c05.js.map +1 -0
- package/dist/peculiar/p-8393399a.system.js +1 -1
- package/dist/peculiar/p-8ff95ad8.entry.js +5 -0
- package/dist/peculiar/{p-54b37ef9.entry.js.map → p-8ff95ad8.entry.js.map} +1 -1
- package/dist/peculiar/p-a06f51a2.system.js +19 -0
- package/dist/peculiar/p-a06f51a2.system.js.map +1 -0
- package/dist/peculiar/{p-75166532.js → p-adf16adb.js} +21 -21
- package/dist/peculiar/{p-75166532.js.map → p-adf16adb.js.map} +1 -1
- package/dist/peculiar/p-b6d5e413.js +19 -0
- package/dist/peculiar/p-b6d5e413.js.map +1 -0
- package/dist/peculiar/p-bd7fb688.system.entry.js +5 -0
- package/dist/peculiar/{p-00302a20.system.entry.js.map → p-bd7fb688.system.entry.js.map} +1 -1
- package/dist/peculiar/{p-496449cf.system.entry.js → p-cc256004.system.entry.js} +2 -2
- package/dist/peculiar/p-d1066b51.system.js +135 -0
- package/dist/peculiar/p-d1066b51.system.js.map +1 -0
- package/dist/peculiar/p-d6229f42.system.js +5 -0
- package/dist/peculiar/{p-5f3b0fc7.entry.js → p-ddadcb44.entry.js} +3 -3
- package/dist/peculiar/peculiar.esm.js +1 -1
- package/dist/types/components/certificate-decoder/certificate-decoder.d.ts +3 -3
- package/dist/types/components/certificate-details-parts/miscellaneous.d.ts +2 -2
- package/dist/types/components/crl-viewer/crl-viewer.d.ts +2 -2
- package/dist/types/components/csr-viewer/csr-viewer.d.ts +2 -2
- package/dist/types/constants/oids.d.ts +3 -0
- package/dist/types/crypto/index.d.ts +2 -2
- package/dist/types/crypto/{csr.d.ts → pkcs10_certificate_request.d.ts} +4 -5
- package/dist/types/crypto/x509_attribute_certificate.d.ts +3 -4
- package/dist/types/crypto/x509_certificate.d.ts +3 -4
- package/dist/types/crypto/{crl.d.ts → x509_crl.d.ts} +4 -5
- package/dist/types/index.d.ts +2 -0
- package/dist/types/utils/download.d.ts +4 -4
- package/dist/types/utils/validator.d.ts +0 -4
- package/hydrate/index.js +84 -138
- package/package.json +4 -4
- package/dist/cjs/certification_request-b0d72620.js.map +0 -1
- package/dist/cjs/crl-812dd7a1.js +0 -312
- package/dist/cjs/crl-812dd7a1.js.map +0 -1
- package/dist/cjs/download-6f550549.js +0 -476
- package/dist/cjs/download-6f550549.js.map +0 -1
- package/dist/cjs/miscellaneous-dcb93a5b.js.map +0 -1
- package/dist/cjs/x509_certificate-ebf4cbd4.js.map +0 -1
- package/dist/collection/crypto/crl.js.map +0 -1
- package/dist/collection/crypto/csr.js.map +0 -1
- package/dist/esm/certification_request-2c054ece.js.map +0 -1
- package/dist/esm/crl-a7318483.js +0 -308
- package/dist/esm/crl-a7318483.js.map +0 -1
- package/dist/esm/download-8c128e2e.js +0 -470
- package/dist/esm/download-8c128e2e.js.map +0 -1
- package/dist/esm/miscellaneous-0e98b5bc.js.map +0 -1
- package/dist/esm/x509_certificate-ad568d3a.js.map +0 -1
- package/dist/esm-es5/certification_request-2c054ece.js.map +0 -1
- package/dist/esm-es5/crl-a7318483.js +0 -33
- package/dist/esm-es5/crl-a7318483.js.map +0 -1
- package/dist/esm-es5/download-8c128e2e.js +0 -43
- package/dist/esm-es5/download-8c128e2e.js.map +0 -1
- package/dist/esm-es5/x509_certificate-ad568d3a.js +0 -12
- package/dist/esm-es5/x509_certificate-ad568d3a.js.map +0 -1
- package/dist/peculiar/p-00302a20.system.entry.js +0 -5
- package/dist/peculiar/p-0dbc8238.system.js +0 -13
- package/dist/peculiar/p-0dbc8238.system.js.map +0 -1
- package/dist/peculiar/p-1302bd67.js +0 -97
- package/dist/peculiar/p-1302bd67.js.map +0 -1
- package/dist/peculiar/p-1f766dd5.js +0 -43
- package/dist/peculiar/p-1f766dd5.js.map +0 -1
- package/dist/peculiar/p-3d44cbd2.js +0 -12
- package/dist/peculiar/p-3d44cbd2.js.map +0 -1
- package/dist/peculiar/p-3f9af5f5.system.js +0 -97
- package/dist/peculiar/p-3f9af5f5.system.js.map +0 -1
- package/dist/peculiar/p-54b37ef9.entry.js +0 -5
- package/dist/peculiar/p-5c6f9a14.entry.js +0 -12
- package/dist/peculiar/p-5c6f9a14.entry.js.map +0 -1
- package/dist/peculiar/p-5cf4562f.system.entry.js.map +0 -1
- package/dist/peculiar/p-6680f277.system.entry.js +0 -13
- package/dist/peculiar/p-6680f277.system.entry.js.map +0 -1
- package/dist/peculiar/p-924790f5.js +0 -33
- package/dist/peculiar/p-924790f5.js.map +0 -1
- package/dist/peculiar/p-b2890eb8.system.js +0 -5
- package/dist/peculiar/p-c156b495.system.js +0 -33
- package/dist/peculiar/p-c156b495.system.js.map +0 -1
- package/dist/peculiar/p-c23fd001.entry.js.map +0 -1
- package/dist/peculiar/p-dde511c8.system.js +0 -43
- package/dist/peculiar/p-dde511c8.system.js.map +0 -1
- /package/dist/peculiar/{p-496449cf.system.entry.js.map → p-cc256004.system.entry.js.map} +0 -0
- /package/dist/peculiar/{p-b2890eb8.system.js.map → p-d6229f42.system.js.map} +0 -0
- /package/dist/peculiar/{p-5f3b0fc7.entry.js.map → p-ddadcb44.entry.js.map} +0 -0
package/components/index.js
CHANGED
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export { getAssetPath, setAssetPath, setNonce, setPlatformOptions } from '@stencil/core/internal/client';
|
|
5
5
|
export { D as Download, a as DownloadIcon, L as Link, d as downloadFromBuffer } from './download.js';
|
|
6
|
+
export { r as readAsArrayBuffer, a as readAsBinaryString, b as readAsDataUrl, c as readAsText } from './read_file.js';
|
|
7
|
+
export { P as Pkcs10CertificateRequest } from './pkcs10_certificate_request.js';
|
|
6
8
|
export { B as Button, T as Typography } from './button.js';
|
|
7
9
|
export { C as CrossIcon, D as DetailsIcon, L as LinkIcon } from './cross.js';
|
|
8
10
|
export { A as ActionsIcon } from './actions.js';
|
package/components/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"index.js","mappings":"
|
|
1
|
+
{"file":"index.js","mappings":";;;;;;;;;;","names":[],"sources":[],"sourcesContent":[],"version":3}
|
package/components/index2.js
CHANGED
|
@@ -1,54 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
|
|
3
3
|
*/
|
|
4
|
-
import { C as Convert_1 } from './download.js';
|
|
5
|
-
import { A as AsnData, p as Attribute$1, q as AsnParser, r as id_DomainNameBeneficiary, D as DomainNameBeneficiary, s as id_DomainNameLegalRepresentative, t as DomainNameLegalRepresentative, u as id_DomainNameOwner, v as DomainNameOwner, w as id_DomainNameTechnicalOperator, x as DomainNameTechnicalOperator, y as id_TypeRelationship, z as TypeRelationship, C as id_ActivityDescription, F as ActivityDescription, H as id_WebGDPR, W as WebGDPR, I as id_InsuranceValue, J as InsuranceValue, K as id_ValuationRanking, V as ValuationRanking, L as id_pkcs9_at_challengePassword, N as ChallengePassword, O as id_pkcs9_at_unstructuredName, U as UnstructuredName, P as id_pkcs9_at_extensionRequest, Q as ExtensionRequest, f as RowValue, i as getStringByOID, X as OIDs, Y as camelCaseToWords, T as TableRowTable, G as GeneralNamePart, l as l10n, R as RowTitle, Z as Name } from './miscellaneous.js';
|
|
6
4
|
import { h } from '@stencil/core/internal/client';
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
* @license
|
|
10
|
-
* Copyright (c) Peculiar Ventures, LLC.
|
|
11
|
-
*
|
|
12
|
-
* This source code is licensed under the MIT license found in the
|
|
13
|
-
* LICENSE file in the root directory of this source tree.
|
|
14
|
-
*/
|
|
15
|
-
const attributesParsers = {
|
|
16
|
-
[id_DomainNameBeneficiary]: DomainNameBeneficiary,
|
|
17
|
-
[id_DomainNameLegalRepresentative]: DomainNameLegalRepresentative,
|
|
18
|
-
[id_DomainNameOwner]: DomainNameOwner,
|
|
19
|
-
[id_DomainNameTechnicalOperator]: DomainNameTechnicalOperator,
|
|
20
|
-
[id_TypeRelationship]: TypeRelationship,
|
|
21
|
-
[id_ActivityDescription]: ActivityDescription,
|
|
22
|
-
[id_WebGDPR]: WebGDPR,
|
|
23
|
-
[id_InsuranceValue]: InsuranceValue,
|
|
24
|
-
[id_ValuationRanking]: ValuationRanking,
|
|
25
|
-
[id_pkcs9_at_challengePassword]: ChallengePassword,
|
|
26
|
-
[id_pkcs9_at_unstructuredName]: UnstructuredName,
|
|
27
|
-
[id_pkcs9_at_extensionRequest]: ExtensionRequest,
|
|
28
|
-
};
|
|
29
|
-
class Attribute extends AsnData {
|
|
30
|
-
getAsnExtnValue() {
|
|
31
|
-
return this.asn.values[0];
|
|
32
|
-
}
|
|
33
|
-
constructor(raw) {
|
|
34
|
-
super(raw, Attribute$1);
|
|
35
|
-
const asnExtnValue = this.getAsnExtnValue();
|
|
36
|
-
try {
|
|
37
|
-
const target = attributesParsers[this.asn.type];
|
|
38
|
-
if (target) {
|
|
39
|
-
this.value = AsnParser.parse(asnExtnValue, target);
|
|
40
|
-
}
|
|
41
|
-
else {
|
|
42
|
-
console.warn(`Didn't detect parser for "${this.asn.type}" attribute.`);
|
|
43
|
-
this.value = Convert_1.ToHex(asnExtnValue);
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
catch (error) {
|
|
47
|
-
console.error(`Error parse "${this.asn.type}" attribute:`, error.message);
|
|
48
|
-
this.value = Convert_1.ToHex(asnExtnValue);
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
}
|
|
5
|
+
import { Q as OIDs, P as l10n, X as Name, y as ActivityDescription, W as WebGDPR, I as InsuranceValue, T as TypeRelationship, V as ValuationRanking, U as UnstructuredName, H as ChallengePassword } from './download.js';
|
|
6
|
+
import { a as RowValue, g as getStringByOID, f as camelCaseToWords, T as TableRowTable, G as GeneralNamePart, R as RowTitle } from './miscellaneous.js';
|
|
52
7
|
|
|
53
8
|
/**
|
|
54
9
|
* @license
|
|
@@ -284,6 +239,6 @@ const Attributes = (props) => {
|
|
|
284
239
|
]);
|
|
285
240
|
};
|
|
286
241
|
|
|
287
|
-
export {
|
|
242
|
+
export { Attributes as A };
|
|
288
243
|
|
|
289
244
|
//# sourceMappingURL=index2.js.map
|
package/components/index2.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"index2.js","mappings":";;;;;;;AAAA;;;;;;;AAoDA,MAAM,iBAAiB,GAAG;IACxB,CAAC,wBAAwB,GAAG,qBAAqB;IACjD,CAAC,gCAAgC,GAAG,6BAA6B;IACjE,CAAC,kBAAkB,GAAG,eAAe;IACrC,CAAC,8BAA8B,GAAG,2BAA2B;IAC7D,CAAC,mBAAmB,GAAG,gBAAgB;IACvC,CAAC,sBAAsB,GAAG,mBAAmB;IAC7C,CAAC,UAAU,GAAG,OAAO;IACrB,CAAC,iBAAiB,GAAG,cAAc;IACnC,CAAC,mBAAmB,GAAG,gBAAgB;IACvC,CAAC,6BAA6B,GAAG,iBAAiB;IAClD,CAAC,4BAA4B,GAAG,gBAAgB;IAChD,CAAC,4BAA4B,GAAG,gBAAgB;CACjD,CAAC;MAKW,SAAqC,SAAQ,OAAqB;IAGrE,eAAe;QACrB,OAAO,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;KAC3B;IAED,YAAY,GAAiB;QAC3B,KAAK,CAAC,GAAG,EAAEA,WAAY,CAAC,CAAC;QAEzB,MAAM,YAAY,GAAG,IAAI,CAAC,eAAe,EAAE,CAAC;QA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EAAE;oBAChD,QACE,EAAC,0BAA0B,IACzB,SAAS,EAAE,SAAgB,GAC3B,EACF;iBACH;gBAED,IAAI,OAAO,SAAS,CAAC,KAAK,KAAK,QAAQ,EAAE;oBACvC,QACE,EAAC,iBAAiB,IAChB,SAAS,EAAE,SAAgB,GAC3B,EACF;iBACH;gBAED,QACE,EAAC,cAAc,IACb,SAAS,EAAE,SAAS,GACpB,EACF;aACH;YAAC,OAAO,KAAK,EAAE;gBACd,OAAO,CAAC,KAAK,CAAC,yBAAyB,EAAE,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;gBAE7D,OAAO,IAAI,CAAC;aACb;SACF,CAAC;KACH,EAAE;AACL;;;;","names":["AsnAttribute","Convert"],"sources":["src/crypto/attribute.ts","src/components/certificate-details-parts/attributes/basic_attribute.tsx","src/components/certificate-details-parts/attributes/name_part.tsx","src/components/certificate-details-parts/attributes/name_attribute.tsx","src/components/certificate-details-parts/attributes/activity_description_attribute.tsx","src/components/certificate-details-parts/attributes/web_gdpr_attribute.tsx","src/components/certificate-details-parts/attributes/insurance_value_attribute.tsx","src/components/certificate-details-parts/attributes/type_relationship_attribute.tsx","src/components/certificate-details-parts/attributes/valuation_ranking_attribute.tsx","src/components/certificate-details-parts/attributes/as_string_attribute.tsx","src/components/certificate-details-parts/attributes/unstructured_name_attribute.tsx","src/components/certificate-details-parts/attributes/challenge_password_attribute.tsx","src/components/certificate-details-parts/attributes/index.tsx"],"sourcesContent":["/**\n * @license\n * Copyright (c) Peculiar Ventures, LLC.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { Convert } from 'pvtsutils';\nimport { AsnParser } from '@peculiar/asn1-schema';\nimport { Attribute as AsnAttribute } from '@peculiar/asn1-x509';\nimport {\n id_DomainNameBeneficiary,\n DomainNameBeneficiary,\n\n id_DomainNameLegalRepresentative,\n DomainNameLegalRepresentative,\n\n id_DomainNameOwner,\n DomainNameOwner,\n\n id_DomainNameTechnicalOperator,\n DomainNameTechnicalOperator,\n\n id_TypeRelationship,\n TypeRelationship,\n\n id_ActivityDescription,\n ActivityDescription,\n\n id_WebGDPR,\n WebGDPR,\n\n id_InsuranceValue,\n InsuranceValue,\n\n id_ValuationRanking,\n ValuationRanking,\n} from '@peculiar/asn1-ntqwac';\nimport {\n id_pkcs9_at_extensionRequest,\n ExtensionRequest,\n\n id_pkcs9_at_challengePassword,\n ChallengePassword,\n\n id_pkcs9_at_unstructuredName,\n UnstructuredName,\n} from '@peculiar/asn1-pkcs9';\n\nimport { AsnData } from './asn_data';\n\nconst attributesParsers = {\n [id_DomainNameBeneficiary]: DomainNameBeneficiary,\n [id_DomainNameLegalRepresentative]: DomainNameLegalRepresentative,\n [id_DomainNameOwner]: DomainNameOwner,\n [id_DomainNameTechnicalOperator]: DomainNameTechnicalOperator,\n [id_TypeRelationship]: TypeRelationship,\n [id_ActivityDescription]: ActivityDescription,\n [id_WebGDPR]: WebGDPR,\n [id_InsuranceValue]: InsuranceValue,\n [id_ValuationRanking]: ValuationRanking,\n [id_pkcs9_at_challengePassword]: ChallengePassword,\n [id_pkcs9_at_unstructuredName]: UnstructuredName,\n [id_pkcs9_at_extensionRequest]: ExtensionRequest,\n};\n\ntype TAttributeKeys = keyof typeof attributesParsers;\nexport type TAttributeValue = InstanceType<typeof attributesParsers[TAttributeKeys]> | string;\n\nexport class Attribute<T extends TAttributeValue> extends AsnData<AsnAttribute> {\n public readonly value: T;\n\n private getAsnExtnValue() {\n return this.asn.values[0];\n }\n\n constructor(raw: BufferSource) {\n super(raw, AsnAttribute);\n\n const asnExtnValue = this.getAsnExtnValue();\n\n try {\n const target = attributesParsers[this.asn.type];\n\n if (target) {\n this.value = AsnParser.parse<T>(asnExtnValue, target);\n } else {\n console.warn(`Didn't detect parser for \"${this.asn.type}\" attribute.`);\n\n this.value = Convert.ToHex(asnExtnValue) as T;\n }\n } catch (error) {\n console.error(`Error parse \"${this.asn.type}\" attribute:`, error.message);\n\n this.value = Convert.ToHex(asnExtnValue) as T;\n }\n }\n}\n","/**\n * @license\n * Copyright (c) Peculiar Ventures, LLC.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { h, FunctionalComponent } from '@stencil/core';\n\nimport type { Attribute, TAttributeValue } from '../../../crypto/attribute';\nimport { getStringByOID } from '../../../utils';\nimport { RowValue } from '../row';\n\ninterface IBasicAttributeProps {\n attribute: Attribute<TAttributeValue>;\n}\n\nexport const BasicAttribute: FunctionalComponent<IBasicAttributeProps> = (props, children) => {\n const { attribute } = props;\n\n return ([\n <RowValue\n name=\"Name\"\n value={getStringByOID(attribute.asn.type)}\n />,\n children,\n <tr>\n <td colSpan={2} class=\"divider\">\n <span />\n </td>\n </tr>,\n ]);\n};\n","/**\n * @license\n * Copyright (c) Peculiar Ventures, LLC.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { h, FunctionalComponent } from '@stencil/core';\nimport type { Name } from '@peculiar/asn1-x509';\n\nimport { OIDs } from '../../../constants/oids';\nimport { RowValue } from '../row';\n\ninterface INamePartProps {\n name: Name;\n}\n\nexport const NamePart: FunctionalComponent<INamePartProps> = (props): any[] => {\n const { name } = props;\n\n if (!name) {\n return null;\n }\n\n return name.map((relativeDistinguishedName) => (\n relativeDistinguishedName.map((attributeTypeAndValue) => (\n <RowValue\n name={OIDs[attributeTypeAndValue.type] || attributeTypeAndValue.type}\n value={attributeTypeAndValue.value.toString()}\n />\n ))\n ));\n};\n","/**\n * @license\n * Copyright (c) Peculiar Ventures, LLC.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { h, FunctionalComponent } from '@stencil/core';\nimport type { Name } from '@peculiar/asn1-x509';\n\nimport type { Attribute } from '../../../crypto/attribute';\nimport { BasicAttribute } from './basic_attribute';\nimport { NamePart } from './name_part';\n\ninterface INameAttributeProps {\n attribute: Attribute<Name>;\n}\n\nexport const NameAttribute:\nFunctionalComponent<INameAttributeProps> = (props) => {\n const { attribute } = props;\n\n return (\n <BasicAttribute\n attribute={attribute}\n >\n <NamePart\n name={attribute.value}\n />\n </BasicAttribute>\n );\n};\n","/**\n * @license\n * Copyright (c) Peculiar Ventures, LLC.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { h, FunctionalComponent } from '@stencil/core';\nimport type { ActivityDescription } from '@peculiar/asn1-ntqwac';\n\nimport { Attribute } from '../../../crypto/attribute';\nimport { camelCaseToWords } from '../../../utils';\nimport { GeneralNamePart } from '../extensions/general_name_part';\nimport { RowValue, TableRowTable } from '../row';\nimport { BasicAttribute } from './basic_attribute';\n\ninterface IActivityDescriptionAttributeProps {\n attribute: Attribute<ActivityDescription>;\n}\n\nexport const ActivityDescriptionAttribute:\nFunctionalComponent<IActivityDescriptionAttributeProps> = (props) => {\n const { attribute } = props;\n\n return (\n <BasicAttribute\n attribute={attribute}\n >\n <RowValue\n name={camelCaseToWords('codeAuthority')}\n value=\"\"\n />\n <TableRowTable>\n <GeneralNamePart\n generalName={attribute.value.codeAuthority}\n getDNSNameLink={() => ''}\n getIPAddressLink={() => ''}\n />\n </TableRowTable>\n\n <RowValue\n name={camelCaseToWords('codeId')}\n value=\"\"\n />\n <TableRowTable>\n <GeneralNamePart\n generalName={attribute.value.codeId}\n getDNSNameLink={() => ''}\n getIPAddressLink={() => ''}\n />\n </TableRowTable>\n\n <RowValue\n name={camelCaseToWords('shortName')}\n value={attribute.value.shortName}\n />\n <RowValue\n name={camelCaseToWords('shortDescription')}\n value={attribute.value.shortDescription}\n />\n </BasicAttribute>\n );\n};\n","/**\n * @license\n * Copyright (c) Peculiar Ventures, LLC.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { h, FunctionalComponent } from '@stencil/core';\nimport type { WebGDPR } from '@peculiar/asn1-ntqwac';\n\nimport type { Attribute } from '../../../crypto/attribute';\nimport { camelCaseToWords } from '../../../utils';\nimport { GeneralNamePart } from '../extensions/general_name_part';\nimport { RowValue, TableRowTable } from '../row';\nimport { BasicAttribute } from './basic_attribute';\n\ninterface IWebGdprAttributeProps {\n attribute: Attribute<WebGDPR>;\n}\n\nexport const WebGdprAttribute:\nFunctionalComponent<IWebGdprAttributeProps> = (props) => {\n const { attribute } = props;\n\n return (\n <BasicAttribute\n attribute={attribute}\n >\n <RowValue\n name={camelCaseToWords('assessmentAuthority')}\n value=\"\"\n />\n <TableRowTable>\n <GeneralNamePart\n generalName={attribute.value.assessmentAuthority}\n getDNSNameLink={() => ''}\n getIPAddressLink={() => ''}\n />\n </TableRowTable>\n\n <RowValue\n name={camelCaseToWords('assessmentLocation')}\n value=\"\"\n />\n <TableRowTable>\n <GeneralNamePart\n generalName={attribute.value.assessmentLocation}\n getDNSNameLink={() => ''}\n getIPAddressLink={() => ''}\n />\n </TableRowTable>\n\n <RowValue\n name={camelCaseToWords('assessmentRef')}\n value=\"\"\n />\n <TableRowTable>\n <GeneralNamePart\n generalName={attribute.value.assessmentRef}\n getDNSNameLink={() => ''}\n getIPAddressLink={() => ''}\n />\n </TableRowTable>\n\n <RowValue\n name={camelCaseToWords('dataStorageTerritory')}\n value={attribute.value.dataStorageTerritory}\n />\n <RowValue\n name={camelCaseToWords('description')}\n value={attribute.value.description}\n />\n </BasicAttribute>\n );\n};\n","/**\n * @license\n * Copyright (c) Peculiar Ventures, LLC.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { h, FunctionalComponent } from '@stencil/core';\nimport type { InsuranceValue } from '@peculiar/asn1-ntqwac';\n\nimport type { Attribute } from '../../../crypto/attribute';\nimport { RowValue } from '../row';\nimport { BasicAttribute } from './basic_attribute';\n\ninterface IInsuranceValueAttributeProps {\n attribute: Attribute<InsuranceValue>;\n}\n\nexport const InsuranceValueAttribute:\nFunctionalComponent<IInsuranceValueAttributeProps> = (props) => {\n const { attribute } = props;\n const value = `${attribute.value.base} * 10^${attribute.value.degree} ${attribute.value.location}`;\n\n return (\n <BasicAttribute\n attribute={attribute}\n >\n <RowValue\n name=\"Value\"\n value={value}\n />\n </BasicAttribute>\n );\n};\n","/**\n * @license\n * Copyright (c) Peculiar Ventures, LLC.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { h, FunctionalComponent } from '@stencil/core';\nimport type { TypeRelationship } from '@peculiar/asn1-ntqwac';\n\nimport type { Attribute } from '../../../crypto/attribute';\nimport { l10n } from '../../../utils';\nimport { RowValue } from '../row';\nimport { BasicAttribute } from './basic_attribute';\n\ninterface ITypeRelationshipAttributeProps {\n attribute: Attribute<TypeRelationship>;\n}\n\nexport const TypeRelationshipAttribute:\nFunctionalComponent<ITypeRelationshipAttributeProps> = (props) => {\n const { attribute } = props;\n\n return (\n <BasicAttribute\n attribute={attribute}\n >\n {Object.keys(attribute.value).map((keyName) => (\n <RowValue\n name={keyName}\n value={attribute.value[keyName].toNumber() ? l10n.getString('yes') : l10n.getString('no')}\n />\n ))}\n </BasicAttribute>\n );\n};\n","/**\n * @license\n * Copyright (c) Peculiar Ventures, LLC.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { h, FunctionalComponent } from '@stencil/core';\nimport type { ValuationRanking } from '@peculiar/asn1-ntqwac';\n\nimport type { Attribute } from '../../../crypto/attribute';\nimport { RowValue } from '../row';\nimport { BasicAttribute } from './basic_attribute';\n\ninterface IValuationRankingAttributeProps {\n attribute: Attribute<ValuationRanking>;\n}\n\nconst getValueRank = (value: number): string => {\n let ratio = 1;\n\n if (value / 100 > 1) {\n ratio = 100;\n } else if (value / 10 > 1) {\n ratio = 10;\n }\n\n return `${value}/${5 * ratio}`;\n};\n\nexport const ValuationRankingAttribute:\nFunctionalComponent<IValuationRankingAttributeProps> = (props) => {\n const { attribute } = props;\n const values = Object.keys(attribute.value).map((keyName) => ([\n getValueRank(attribute.value[keyName]),\n <br />,\n ]));\n\n return (\n <BasicAttribute\n attribute={attribute}\n >\n <RowValue\n name=\"Value\"\n value={values as any}\n />\n </BasicAttribute>\n );\n};\n","/**\n * @license\n * Copyright (c) Peculiar Ventures, LLC.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { h, FunctionalComponent } from '@stencil/core';\n\nimport type { Attribute } from '../../../crypto/attribute';\nimport { RowValue } from '../row';\nimport { BasicAttribute } from './basic_attribute';\n\ninterface IAsStringAttributeProps {\n attribute: Attribute<string>;\n}\n\nexport const AsStringAttribute:\nFunctionalComponent<IAsStringAttributeProps> = (props) => {\n const { attribute } = props;\n\n return (\n <BasicAttribute\n attribute={attribute}\n >\n <RowValue\n name=\"Value\"\n value={attribute.value}\n monospace\n />\n </BasicAttribute>\n );\n};\n","/**\n * @license\n * Copyright (c) Peculiar Ventures, LLC.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { h, FunctionalComponent } from '@stencil/core';\nimport type { UnstructuredName } from '@peculiar/asn1-pkcs9';\n\nimport type { Attribute } from '../../../crypto/attribute';\nimport { RowValue } from '../row';\nimport { BasicAttribute } from './basic_attribute';\n\ninterface IUnstructuredNameAttributeProps {\n attribute: Attribute<UnstructuredName>;\n}\n\nexport const UnstructuredNameAttribute:\nFunctionalComponent<IUnstructuredNameAttributeProps> = (props) => {\n const { attribute } = props;\n\n return (\n <BasicAttribute\n attribute={attribute}\n >\n <RowValue\n name=\"Value\"\n value={attribute.value.utf8String}\n />\n </BasicAttribute>\n );\n};\n","/**\n * @license\n * Copyright (c) Peculiar Ventures, LLC.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { h, FunctionalComponent } from '@stencil/core';\nimport type { ChallengePassword } from '@peculiar/asn1-pkcs9';\n\nimport type { Attribute } from '../../../crypto/attribute';\nimport { RowValue } from '../row';\nimport { BasicAttribute } from './basic_attribute';\n\ninterface IChallengePasswordAttributeProps {\n attribute: Attribute<ChallengePassword>;\n}\n\nexport const ChallengePasswordAttribute:\nFunctionalComponent<IChallengePasswordAttributeProps> = (props) => {\n const { attribute } = props;\n\n return (\n <BasicAttribute\n attribute={attribute}\n >\n <RowValue\n name=\"Value\"\n value={attribute.value.toString()}\n />\n </BasicAttribute>\n );\n};\n","/**\n * @license\n * Copyright (c) Peculiar Ventures, LLC.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { h, FunctionalComponent } from '@stencil/core';\nimport { Name } from '@peculiar/asn1-x509';\nimport {\n TypeRelationship,\n ActivityDescription,\n WebGDPR,\n InsuranceValue,\n ValuationRanking,\n} from '@peculiar/asn1-ntqwac';\nimport {\n UnstructuredName,\n ChallengePassword,\n} from '@peculiar/asn1-pkcs9';\n\nimport type { Attribute, TAttributeValue } from '../../../crypto/attribute';\nimport { RowTitle } from '../row';\nimport { NameAttribute } from './name_attribute';\nimport { ActivityDescriptionAttribute } from './activity_description_attribute';\nimport { WebGdprAttribute } from './web_gdpr_attribute';\nimport { InsuranceValueAttribute } from './insurance_value_attribute';\nimport { TypeRelationshipAttribute } from './type_relationship_attribute';\nimport { ValuationRankingAttribute } from './valuation_ranking_attribute';\nimport { BasicAttribute } from './basic_attribute';\nimport { AsStringAttribute } from './as_string_attribute';\nimport { UnstructuredNameAttribute } from './unstructured_name_attribute';\nimport { ChallengePasswordAttribute } from './challenge_password_attribute';\n\ninterface IAttributesPtops extends\n IGeneralNameOptions,\n ILeiOptions,\n IAuthorityKeyIdentifierOptions,\n ISubjectKeyIdentifierOptions {\n attributes: Attribute<TAttributeValue>[];\n}\n\nexport const Attributes: FunctionalComponent<IAttributesPtops> = (props) => {\n const { attributes } = props;\n\n if (!attributes || !attributes.length) {\n return null;\n }\n\n return ([\n <RowTitle\n value=\"Attributes\"\n />,\n attributes.map((attribute) => {\n try {\n if (attribute.value instanceof Name) {\n return (\n <NameAttribute\n attribute={attribute as any}\n />\n );\n }\n\n if (attribute.value instanceof ActivityDescription) {\n return (\n <ActivityDescriptionAttribute\n attribute={attribute as any}\n />\n );\n }\n\n if (attribute.value instanceof WebGDPR) {\n return (\n <WebGdprAttribute\n attribute={attribute as any}\n />\n );\n }\n\n if (attribute.value instanceof InsuranceValue) {\n return (\n <InsuranceValueAttribute\n attribute={attribute as any}\n />\n );\n }\n\n if (attribute.value instanceof TypeRelationship) {\n return (\n <TypeRelationshipAttribute\n attribute={attribute as any}\n />\n );\n }\n\n if (attribute.value instanceof ValuationRanking) {\n return (\n <ValuationRankingAttribute\n attribute={attribute as any}\n />\n );\n }\n\n if (attribute.value instanceof UnstructuredName) {\n return (\n <UnstructuredNameAttribute\n attribute={attribute as any}\n />\n );\n }\n\n if (attribute.value instanceof ChallengePassword) {\n return (\n <ChallengePasswordAttribute\n attribute={attribute as any}\n />\n );\n }\n\n if (typeof attribute.value === 'string') {\n return (\n <AsStringAttribute\n attribute={attribute as any}\n />\n );\n }\n\n return (\n <BasicAttribute\n attribute={attribute}\n />\n );\n } catch (error) {\n console.error('Error render attribute:', attribute.asn.type);\n\n return null;\n }\n }),\n ]);\n};\n"],"version":3}
|
|
1
|
+
{"file":"index2.js","mappings":";;;;;;;AAAA;;;;;;;AAkBO,MAAM,cAAc,GAA8C,CAAC,KAAK,EAAE,QAAQ;IACvF,MAAM,EAAE,SAAS,EAAE,GAAG,KAAK,CAAC;IAE5B,QAAQ;QACN,EAAC,QAAQ,IACP,IAAI,EAAC,MAAM,EACX,KAAK,EAAE,cAAc,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,GACzC;QACF,QAAQ;QACR;YACE,UAAI,OAAO,EAAE,CAAC,EAAE,KAAK,EAAC,SAAS;gBAC7B,eAAQ,CACL,CACF;KACN,EAAE;AACL,CAAC;;ACjCD;;;;;;;AAkBO,MAAM,QAAQ,GAAwC,CAAC,KAAK;IACjE,MAAM,EAAE,IAAI,EAAE,GAAG,KAAK,CAAC;IAEvB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,SAAS,CAAC,KAAK,YAAY,gBAAgB,EAAE;oBAC/C,QACE,EAAC,yBAAyB,IACxB,SAAS,EAAE,SAAgB,GAC3B,EACF;iBACH;gBAED,IAAI,SAAS,CAAC,KAAK,YAAY,iBAAiB,EAAE;oBAChD,QACE,EAAC,0BAA0B,IACzB,SAAS,EAAE,SAAgB,GAC3B,EACF;iBACH;gBAED,IAAI,OAAO,SAAS,CAAC,KAAK,KAAK,QAAQ,EAAE;oBACvC,QACE,EAAC,iBAAiB,IAChB,SAAS,EAAE,SAAgB,GAC3B,EACF;iBACH;gBAED,QACE,EAAC,cAAc,IACb,SAAS,EAAE,SAAS,GACpB,EACF;aACH;YAAC,OAAO,KAAK,EAAE;gBACd,OAAO,CAAC,KAAK,CAAC,yBAAyB,EAAE,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;gBAE7D,OAAO,IAAI,CAAC;aACb;SACF,CAAC;KACH,EAAE;AACL;;;;","names":[],"sources":["src/components/certificate-details-parts/attributes/basic_attribute.tsx","src/components/certificate-details-parts/attributes/name_part.tsx","src/components/certificate-details-parts/attributes/name_attribute.tsx","src/components/certificate-details-parts/attributes/activity_description_attribute.tsx","src/components/certificate-details-parts/attributes/web_gdpr_attribute.tsx","src/components/certificate-details-parts/attributes/insurance_value_attribute.tsx","src/components/certificate-details-parts/attributes/type_relationship_attribute.tsx","src/components/certificate-details-parts/attributes/valuation_ranking_attribute.tsx","src/components/certificate-details-parts/attributes/as_string_attribute.tsx","src/components/certificate-details-parts/attributes/unstructured_name_attribute.tsx","src/components/certificate-details-parts/attributes/challenge_password_attribute.tsx","src/components/certificate-details-parts/attributes/index.tsx"],"sourcesContent":["/**\n * @license\n * Copyright (c) Peculiar Ventures, LLC.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { h, FunctionalComponent } from '@stencil/core';\n\nimport type { Attribute, TAttributeValue } from '../../../crypto/attribute';\nimport { getStringByOID } from '../../../utils';\nimport { RowValue } from '../row';\n\ninterface IBasicAttributeProps {\n attribute: Attribute<TAttributeValue>;\n}\n\nexport const BasicAttribute: FunctionalComponent<IBasicAttributeProps> = (props, children) => {\n const { attribute } = props;\n\n return ([\n <RowValue\n name=\"Name\"\n value={getStringByOID(attribute.asn.type)}\n />,\n children,\n <tr>\n <td colSpan={2} class=\"divider\">\n <span />\n </td>\n </tr>,\n ]);\n};\n","/**\n * @license\n * Copyright (c) Peculiar Ventures, LLC.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { h, FunctionalComponent } from '@stencil/core';\nimport type { Name } from '@peculiar/asn1-x509';\n\nimport { OIDs } from '../../../constants/oids';\nimport { RowValue } from '../row';\n\ninterface INamePartProps {\n name: Name;\n}\n\nexport const NamePart: FunctionalComponent<INamePartProps> = (props): any[] => {\n const { name } = props;\n\n if (!name) {\n return null;\n }\n\n return name.map((relativeDistinguishedName) => (\n relativeDistinguishedName.map((attributeTypeAndValue) => (\n <RowValue\n name={OIDs[attributeTypeAndValue.type] || attributeTypeAndValue.type}\n value={attributeTypeAndValue.value.toString()}\n />\n ))\n ));\n};\n","/**\n * @license\n * Copyright (c) Peculiar Ventures, LLC.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { h, FunctionalComponent } from '@stencil/core';\nimport type { Name } from '@peculiar/asn1-x509';\n\nimport type { Attribute } from '../../../crypto/attribute';\nimport { BasicAttribute } from './basic_attribute';\nimport { NamePart } from './name_part';\n\ninterface INameAttributeProps {\n attribute: Attribute<Name>;\n}\n\nexport const NameAttribute:\nFunctionalComponent<INameAttributeProps> = (props) => {\n const { attribute } = props;\n\n return (\n <BasicAttribute\n attribute={attribute}\n >\n <NamePart\n name={attribute.value}\n />\n </BasicAttribute>\n );\n};\n","/**\n * @license\n * Copyright (c) Peculiar Ventures, LLC.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { h, FunctionalComponent } from '@stencil/core';\nimport type { ActivityDescription } from '@peculiar/asn1-ntqwac';\n\nimport { Attribute } from '../../../crypto/attribute';\nimport { camelCaseToWords } from '../../../utils';\nimport { GeneralNamePart } from '../extensions/general_name_part';\nimport { RowValue, TableRowTable } from '../row';\nimport { BasicAttribute } from './basic_attribute';\n\ninterface IActivityDescriptionAttributeProps {\n attribute: Attribute<ActivityDescription>;\n}\n\nexport const ActivityDescriptionAttribute:\nFunctionalComponent<IActivityDescriptionAttributeProps> = (props) => {\n const { attribute } = props;\n\n return (\n <BasicAttribute\n attribute={attribute}\n >\n <RowValue\n name={camelCaseToWords('codeAuthority')}\n value=\"\"\n />\n <TableRowTable>\n <GeneralNamePart\n generalName={attribute.value.codeAuthority}\n getDNSNameLink={() => ''}\n getIPAddressLink={() => ''}\n />\n </TableRowTable>\n\n <RowValue\n name={camelCaseToWords('codeId')}\n value=\"\"\n />\n <TableRowTable>\n <GeneralNamePart\n generalName={attribute.value.codeId}\n getDNSNameLink={() => ''}\n getIPAddressLink={() => ''}\n />\n </TableRowTable>\n\n <RowValue\n name={camelCaseToWords('shortName')}\n value={attribute.value.shortName}\n />\n <RowValue\n name={camelCaseToWords('shortDescription')}\n value={attribute.value.shortDescription}\n />\n </BasicAttribute>\n );\n};\n","/**\n * @license\n * Copyright (c) Peculiar Ventures, LLC.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { h, FunctionalComponent } from '@stencil/core';\nimport type { WebGDPR } from '@peculiar/asn1-ntqwac';\n\nimport type { Attribute } from '../../../crypto/attribute';\nimport { camelCaseToWords } from '../../../utils';\nimport { GeneralNamePart } from '../extensions/general_name_part';\nimport { RowValue, TableRowTable } from '../row';\nimport { BasicAttribute } from './basic_attribute';\n\ninterface IWebGdprAttributeProps {\n attribute: Attribute<WebGDPR>;\n}\n\nexport const WebGdprAttribute:\nFunctionalComponent<IWebGdprAttributeProps> = (props) => {\n const { attribute } = props;\n\n return (\n <BasicAttribute\n attribute={attribute}\n >\n <RowValue\n name={camelCaseToWords('assessmentAuthority')}\n value=\"\"\n />\n <TableRowTable>\n <GeneralNamePart\n generalName={attribute.value.assessmentAuthority}\n getDNSNameLink={() => ''}\n getIPAddressLink={() => ''}\n />\n </TableRowTable>\n\n <RowValue\n name={camelCaseToWords('assessmentLocation')}\n value=\"\"\n />\n <TableRowTable>\n <GeneralNamePart\n generalName={attribute.value.assessmentLocation}\n getDNSNameLink={() => ''}\n getIPAddressLink={() => ''}\n />\n </TableRowTable>\n\n <RowValue\n name={camelCaseToWords('assessmentRef')}\n value=\"\"\n />\n <TableRowTable>\n <GeneralNamePart\n generalName={attribute.value.assessmentRef}\n getDNSNameLink={() => ''}\n getIPAddressLink={() => ''}\n />\n </TableRowTable>\n\n <RowValue\n name={camelCaseToWords('dataStorageTerritory')}\n value={attribute.value.dataStorageTerritory}\n />\n <RowValue\n name={camelCaseToWords('description')}\n value={attribute.value.description}\n />\n </BasicAttribute>\n );\n};\n","/**\n * @license\n * Copyright (c) Peculiar Ventures, LLC.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { h, FunctionalComponent } from '@stencil/core';\nimport type { InsuranceValue } from '@peculiar/asn1-ntqwac';\n\nimport type { Attribute } from '../../../crypto/attribute';\nimport { RowValue } from '../row';\nimport { BasicAttribute } from './basic_attribute';\n\ninterface IInsuranceValueAttributeProps {\n attribute: Attribute<InsuranceValue>;\n}\n\nexport const InsuranceValueAttribute:\nFunctionalComponent<IInsuranceValueAttributeProps> = (props) => {\n const { attribute } = props;\n const value = `${attribute.value.base} * 10^${attribute.value.degree} ${attribute.value.location}`;\n\n return (\n <BasicAttribute\n attribute={attribute}\n >\n <RowValue\n name=\"Value\"\n value={value}\n />\n </BasicAttribute>\n );\n};\n","/**\n * @license\n * Copyright (c) Peculiar Ventures, LLC.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { h, FunctionalComponent } from '@stencil/core';\nimport type { TypeRelationship } from '@peculiar/asn1-ntqwac';\n\nimport type { Attribute } from '../../../crypto/attribute';\nimport { l10n } from '../../../utils';\nimport { RowValue } from '../row';\nimport { BasicAttribute } from './basic_attribute';\n\ninterface ITypeRelationshipAttributeProps {\n attribute: Attribute<TypeRelationship>;\n}\n\nexport const TypeRelationshipAttribute:\nFunctionalComponent<ITypeRelationshipAttributeProps> = (props) => {\n const { attribute } = props;\n\n return (\n <BasicAttribute\n attribute={attribute}\n >\n {Object.keys(attribute.value).map((keyName) => (\n <RowValue\n name={keyName}\n value={attribute.value[keyName].toNumber() ? l10n.getString('yes') : l10n.getString('no')}\n />\n ))}\n </BasicAttribute>\n );\n};\n","/**\n * @license\n * Copyright (c) Peculiar Ventures, LLC.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { h, FunctionalComponent } from '@stencil/core';\nimport type { ValuationRanking } from '@peculiar/asn1-ntqwac';\n\nimport type { Attribute } from '../../../crypto/attribute';\nimport { RowValue } from '../row';\nimport { BasicAttribute } from './basic_attribute';\n\ninterface IValuationRankingAttributeProps {\n attribute: Attribute<ValuationRanking>;\n}\n\nconst getValueRank = (value: number): string => {\n let ratio = 1;\n\n if (value / 100 > 1) {\n ratio = 100;\n } else if (value / 10 > 1) {\n ratio = 10;\n }\n\n return `${value}/${5 * ratio}`;\n};\n\nexport const ValuationRankingAttribute:\nFunctionalComponent<IValuationRankingAttributeProps> = (props) => {\n const { attribute } = props;\n const values = Object.keys(attribute.value).map((keyName) => ([\n getValueRank(attribute.value[keyName]),\n <br />,\n ]));\n\n return (\n <BasicAttribute\n attribute={attribute}\n >\n <RowValue\n name=\"Value\"\n value={values as any}\n />\n </BasicAttribute>\n );\n};\n","/**\n * @license\n * Copyright (c) Peculiar Ventures, LLC.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { h, FunctionalComponent } from '@stencil/core';\n\nimport type { Attribute } from '../../../crypto/attribute';\nimport { RowValue } from '../row';\nimport { BasicAttribute } from './basic_attribute';\n\ninterface IAsStringAttributeProps {\n attribute: Attribute<string>;\n}\n\nexport const AsStringAttribute:\nFunctionalComponent<IAsStringAttributeProps> = (props) => {\n const { attribute } = props;\n\n return (\n <BasicAttribute\n attribute={attribute}\n >\n <RowValue\n name=\"Value\"\n value={attribute.value}\n monospace\n />\n </BasicAttribute>\n );\n};\n","/**\n * @license\n * Copyright (c) Peculiar Ventures, LLC.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { h, FunctionalComponent } from '@stencil/core';\nimport type { UnstructuredName } from '@peculiar/asn1-pkcs9';\n\nimport type { Attribute } from '../../../crypto/attribute';\nimport { RowValue } from '../row';\nimport { BasicAttribute } from './basic_attribute';\n\ninterface IUnstructuredNameAttributeProps {\n attribute: Attribute<UnstructuredName>;\n}\n\nexport const UnstructuredNameAttribute:\nFunctionalComponent<IUnstructuredNameAttributeProps> = (props) => {\n const { attribute } = props;\n\n return (\n <BasicAttribute\n attribute={attribute}\n >\n <RowValue\n name=\"Value\"\n value={attribute.value.utf8String}\n />\n </BasicAttribute>\n );\n};\n","/**\n * @license\n * Copyright (c) Peculiar Ventures, LLC.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { h, FunctionalComponent } from '@stencil/core';\nimport type { ChallengePassword } from '@peculiar/asn1-pkcs9';\n\nimport type { Attribute } from '../../../crypto/attribute';\nimport { RowValue } from '../row';\nimport { BasicAttribute } from './basic_attribute';\n\ninterface IChallengePasswordAttributeProps {\n attribute: Attribute<ChallengePassword>;\n}\n\nexport const ChallengePasswordAttribute:\nFunctionalComponent<IChallengePasswordAttributeProps> = (props) => {\n const { attribute } = props;\n\n return (\n <BasicAttribute\n attribute={attribute}\n >\n <RowValue\n name=\"Value\"\n value={attribute.value.toString()}\n />\n </BasicAttribute>\n );\n};\n","/**\n * @license\n * Copyright (c) Peculiar Ventures, LLC.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { h, FunctionalComponent } from '@stencil/core';\nimport { Name } from '@peculiar/asn1-x509';\nimport {\n TypeRelationship,\n ActivityDescription,\n WebGDPR,\n InsuranceValue,\n ValuationRanking,\n} from '@peculiar/asn1-ntqwac';\nimport {\n UnstructuredName,\n ChallengePassword,\n} from '@peculiar/asn1-pkcs9';\n\nimport type { Attribute, TAttributeValue } from '../../../crypto/attribute';\nimport { RowTitle } from '../row';\nimport { NameAttribute } from './name_attribute';\nimport { ActivityDescriptionAttribute } from './activity_description_attribute';\nimport { WebGdprAttribute } from './web_gdpr_attribute';\nimport { InsuranceValueAttribute } from './insurance_value_attribute';\nimport { TypeRelationshipAttribute } from './type_relationship_attribute';\nimport { ValuationRankingAttribute } from './valuation_ranking_attribute';\nimport { BasicAttribute } from './basic_attribute';\nimport { AsStringAttribute } from './as_string_attribute';\nimport { UnstructuredNameAttribute } from './unstructured_name_attribute';\nimport { ChallengePasswordAttribute } from './challenge_password_attribute';\n\ninterface IAttributesPtops extends\n IGeneralNameOptions,\n ILeiOptions,\n IAuthorityKeyIdentifierOptions,\n ISubjectKeyIdentifierOptions {\n attributes: Attribute<TAttributeValue>[];\n}\n\nexport const Attributes: FunctionalComponent<IAttributesPtops> = (props) => {\n const { attributes } = props;\n\n if (!attributes || !attributes.length) {\n return null;\n }\n\n return ([\n <RowTitle\n value=\"Attributes\"\n />,\n attributes.map((attribute) => {\n try {\n if (attribute.value instanceof Name) {\n return (\n <NameAttribute\n attribute={attribute as any}\n />\n );\n }\n\n if (attribute.value instanceof ActivityDescription) {\n return (\n <ActivityDescriptionAttribute\n attribute={attribute as any}\n />\n );\n }\n\n if (attribute.value instanceof WebGDPR) {\n return (\n <WebGdprAttribute\n attribute={attribute as any}\n />\n );\n }\n\n if (attribute.value instanceof InsuranceValue) {\n return (\n <InsuranceValueAttribute\n attribute={attribute as any}\n />\n );\n }\n\n if (attribute.value instanceof TypeRelationship) {\n return (\n <TypeRelationshipAttribute\n attribute={attribute as any}\n />\n );\n }\n\n if (attribute.value instanceof ValuationRanking) {\n return (\n <ValuationRankingAttribute\n attribute={attribute as any}\n />\n );\n }\n\n if (attribute.value instanceof UnstructuredName) {\n return (\n <UnstructuredNameAttribute\n attribute={attribute as any}\n />\n );\n }\n\n if (attribute.value instanceof ChallengePassword) {\n return (\n <ChallengePasswordAttribute\n attribute={attribute as any}\n />\n );\n }\n\n if (typeof attribute.value === 'string') {\n return (\n <AsStringAttribute\n attribute={attribute as any}\n />\n );\n }\n\n return (\n <BasicAttribute\n attribute={attribute}\n />\n );\n } catch (error) {\n console.error('Error render attribute:', attribute.asn.type);\n\n return null;\n }\n }),\n ]);\n};\n"],"version":3}
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
|
|
3
3
|
*/
|
|
4
4
|
import { h } from '@stencil/core/internal/client';
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { P as l10n, L as Link } from './download.js';
|
|
6
|
+
import { R as RowTitle, a as RowValue } from './miscellaneous.js';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* @license
|