@peculiar/certificates-viewer 3.10.0 → 3.10.1-alpha.14
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/arrow_top.js +34 -0
- package/components/arrow_top.js.map +1 -0
- package/components/attribute-certificate-viewer.js +281 -0
- package/components/attribute-certificate-viewer.js.map +1 -0
- package/components/button-menu.js +64 -0
- package/components/button-menu.js.map +1 -0
- package/components/button.js +74 -0
- package/components/button.js.map +1 -0
- package/components/certificate-viewer.js +300 -0
- package/components/certificate-viewer.js.map +1 -0
- package/components/circular-progress.js +48 -0
- package/components/circular-progress.js.map +1 -0
- package/components/crl-viewer.js +263 -0
- package/components/crl-viewer.js.map +1 -0
- package/components/csr-viewer.js +233 -0
- package/components/csr-viewer.js.map +1 -0
- package/components/custom-elements.d.ts +2 -0
- package/{dist/esm/download-91511aeb.js → components/download.js} +2 -0
- package/components/download.js.map +1 -0
- package/components/highlight-words.js +60 -0
- package/components/highlight-words.js.map +1 -0
- package/components/index.d.ts +33 -0
- package/components/index.js +7 -0
- package/components/index.js.map +1 -0
- package/components/index2.js +299 -0
- package/components/index2.js.map +1 -0
- package/components/issuer_name.js +26 -0
- package/components/issuer_name.js.map +1 -0
- package/components/miscellaneous.js +13420 -0
- package/components/miscellaneous.js.map +1 -0
- package/components/package.json +9 -0
- package/components/peculiar-attribute-certificate-viewer.d.ts +11 -0
- package/components/peculiar-attribute-certificate-viewer.js +11 -0
- package/components/peculiar-attribute-certificate-viewer.js.map +1 -0
- package/components/peculiar-button-menu.d.ts +11 -0
- package/components/peculiar-button-menu.js +11 -0
- package/components/peculiar-button-menu.js.map +1 -0
- package/components/peculiar-certificate-decoder.d.ts +11 -0
- package/components/peculiar-certificate-decoder.js +234 -0
- package/components/peculiar-certificate-decoder.js.map +1 -0
- package/components/peculiar-certificate-viewer.d.ts +11 -0
- package/components/peculiar-certificate-viewer.js +11 -0
- package/components/peculiar-certificate-viewer.js.map +1 -0
- package/components/peculiar-certificates-viewer.d.ts +11 -0
- package/components/peculiar-certificates-viewer.js +382 -0
- package/components/peculiar-certificates-viewer.js.map +1 -0
- package/components/peculiar-circular-progress.d.ts +11 -0
- package/components/peculiar-circular-progress.js +11 -0
- package/components/peculiar-circular-progress.js.map +1 -0
- package/components/peculiar-crl-viewer.d.ts +11 -0
- package/components/peculiar-crl-viewer.js +11 -0
- package/components/peculiar-crl-viewer.js.map +1 -0
- package/components/peculiar-csr-viewer.d.ts +11 -0
- package/components/peculiar-csr-viewer.js +11 -0
- package/components/peculiar-csr-viewer.js.map +1 -0
- package/components/peculiar-highlight-words.d.ts +11 -0
- package/components/peculiar-highlight-words.js +11 -0
- package/components/peculiar-highlight-words.js.map +1 -0
- package/components/peculiar-text-hider.d.ts +11 -0
- package/components/peculiar-text-hider.js +42 -0
- package/components/peculiar-text-hider.js.map +1 -0
- package/components/subject_name.js +71 -0
- package/components/subject_name.js.map +1 -0
- package/dist/cjs/arrow_top-834fb7ec.js +37 -0
- package/dist/cjs/arrow_top-834fb7ec.js.map +1 -0
- package/dist/cjs/button-14e2b73f.js +77 -0
- package/dist/cjs/button-14e2b73f.js.map +1 -0
- package/dist/cjs/{certification_request-d5c6e32d.js → certification_request-c0cafa72.js} +236 -71
- package/dist/cjs/certification_request-c0cafa72.js.map +1 -0
- package/dist/cjs/{crl-5bce64c4.js → crl-b4322166.js} +8 -7
- package/dist/cjs/crl-b4322166.js.map +1 -0
- package/dist/cjs/download-254ddc57.js +23 -0
- package/dist/cjs/download-254ddc57.js.map +1 -0
- package/dist/cjs/{download-93f7b773.js → download-972dda8a.js} +2 -0
- package/dist/cjs/download-972dda8a.js.map +1 -0
- package/dist/cjs/index-efd561e9.js +2477 -0
- package/dist/cjs/index-efd561e9.js.map +1 -0
- package/dist/cjs/index.cjs.js +3 -1
- package/dist/cjs/index.cjs.js.map +1 -0
- package/dist/cjs/loader.cjs.js +6 -12
- package/dist/cjs/loader.cjs.js.map +1 -0
- package/dist/cjs/{miscellaneous-cac1cd8b.js → miscellaneous-806a04a5.js} +86 -70
- package/dist/cjs/miscellaneous-806a04a5.js.map +1 -0
- package/dist/cjs/peculiar-attribute-certificate-viewer_3.cjs.entry.js +92 -35
- package/dist/cjs/peculiar-attribute-certificate-viewer_3.cjs.entry.js.map +1 -0
- package/dist/cjs/peculiar-button-menu_3.cjs.entry.js +110 -0
- package/dist/cjs/peculiar-button-menu_3.cjs.entry.js.map +1 -0
- package/dist/cjs/peculiar-certificate-decoder.cjs.entry.js +30 -19
- package/dist/cjs/peculiar-certificate-decoder.cjs.entry.js.map +1 -0
- package/dist/cjs/peculiar-certificate-viewer.cjs.entry.js +34 -11
- package/dist/cjs/peculiar-certificate-viewer.cjs.entry.js.map +1 -0
- package/dist/cjs/peculiar-certificates-viewer.cjs.entry.js +183 -85
- package/dist/cjs/peculiar-certificates-viewer.cjs.entry.js.map +1 -0
- package/dist/cjs/peculiar-text-hider.cjs.entry.js +7 -13
- package/dist/cjs/peculiar-text-hider.cjs.entry.js.map +1 -0
- package/dist/cjs/peculiar.cjs.js +10 -57
- package/dist/cjs/peculiar.cjs.js.map +1 -0
- package/dist/cjs/{x509_certificate-3760e0a8.js → x509_certificate-989b1435.js} +5 -4
- package/dist/cjs/x509_certificate-989b1435.js.map +1 -0
- package/dist/collection/collection-manifest.json +12 -16
- package/dist/collection/components/attribute-certificate-viewer/attribute-certificate-viewer.js +189 -145
- package/dist/collection/components/attribute-certificate-viewer/attribute-certificate-viewer.js.map +1 -0
- package/dist/collection/components/button/button.js +14 -126
- package/dist/collection/components/button/button.js.map +1 -0
- package/dist/collection/components/button/index.js +5 -0
- package/dist/collection/components/button/index.js.map +1 -0
- package/dist/collection/components/button-menu/button-menu.css +46 -0
- package/dist/collection/components/button-menu/button-menu.js +78 -0
- package/dist/collection/components/button-menu/button-menu.js.map +1 -0
- package/dist/collection/components/certificate-decoder/certificate-decoder.css +456 -44
- package/dist/collection/components/certificate-decoder/certificate-decoder.js +109 -101
- package/dist/collection/components/certificate-decoder/certificate-decoder.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/attributes/activity_description_attribute.js +6 -11
- package/dist/collection/components/certificate-details-parts/attributes/activity_description_attribute.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/attributes/as_string_attribute.js +5 -5
- package/dist/collection/components/certificate-details-parts/attributes/as_string_attribute.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/attributes/basic_attribute.js +5 -6
- package/dist/collection/components/certificate-details-parts/attributes/basic_attribute.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/attributes/challenge_password_attribute.js +5 -5
- package/dist/collection/components/certificate-details-parts/attributes/challenge_password_attribute.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/attributes/index.js +16 -15
- package/dist/collection/components/certificate-details-parts/attributes/index.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/attributes/insurance_value_attribute.js +5 -5
- package/dist/collection/components/certificate-details-parts/attributes/insurance_value_attribute.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/attributes/name_attribute.js +5 -5
- package/dist/collection/components/certificate-details-parts/attributes/name_attribute.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/attributes/name_part.js +4 -3
- package/dist/collection/components/certificate-details-parts/attributes/name_part.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/attributes/type_relationship_attribute.js +5 -4
- package/dist/collection/components/certificate-details-parts/attributes/type_relationship_attribute.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/attributes/unstructured_name_attribute.js +5 -5
- package/dist/collection/components/certificate-details-parts/attributes/unstructured_name_attribute.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/attributes/valuation_ranking_attribute.js +5 -5
- package/dist/collection/components/certificate-details-parts/attributes/valuation_ranking_attribute.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/attributes/web_gdpr_attribute.js +6 -13
- package/dist/collection/components/certificate-details-parts/attributes/web_gdpr_attribute.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/basic_information.js +4 -3
- package/dist/collection/components/certificate-details-parts/basic_information.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/extensions/archive_rev_info_extension.js +5 -5
- package/dist/collection/components/certificate-details-parts/extensions/archive_rev_info_extension.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/extensions/as_string_extension.js +5 -5
- package/dist/collection/components/certificate-details-parts/extensions/as_string_extension.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/extensions/attribute_value.js +2 -1
- package/dist/collection/components/certificate-details-parts/extensions/attribute_value.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/extensions/authority_key_identifier_extension.js +10 -15
- package/dist/collection/components/certificate-details-parts/extensions/authority_key_identifier_extension.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/extensions/basic_constraints_extension.js +6 -7
- package/dist/collection/components/certificate-details-parts/extensions/basic_constraints_extension.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/extensions/basic_extension.js +5 -6
- package/dist/collection/components/certificate-details-parts/extensions/basic_extension.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/extensions/biometric_syntax_extension.js +8 -12
- package/dist/collection/components/certificate-details-parts/extensions/biometric_syntax_extension.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/extensions/ca_version_extension.js +5 -6
- package/dist/collection/components/certificate-details-parts/extensions/ca_version_extension.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/extensions/certificate_policies_extension.js +26 -27
- package/dist/collection/components/certificate-details-parts/extensions/certificate_policies_extension.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/extensions/certificate_template_extension.js +5 -7
- package/dist/collection/components/certificate-details-parts/extensions/certificate_template_extension.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/extensions/certificate_transparency_extension.js +8 -13
- package/dist/collection/components/certificate-details-parts/extensions/certificate_transparency_extension.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/extensions/crl_distribution_points_extension.js +4 -3
- package/dist/collection/components/certificate-details-parts/extensions/crl_distribution_points_extension.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/extensions/crl_number_extension.js +6 -6
- package/dist/collection/components/certificate-details-parts/extensions/crl_number_extension.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/extensions/crl_reason_extension.js +5 -5
- package/dist/collection/components/certificate-details-parts/extensions/crl_reason_extension.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/extensions/enroll_cert_type_extension.js +5 -5
- package/dist/collection/components/certificate-details-parts/extensions/enroll_cert_type_extension.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/extensions/entrust_version_info_extension.js +5 -6
- package/dist/collection/components/certificate-details-parts/extensions/entrust_version_info_extension.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/extensions/extended_key_usage_extension.js +7 -7
- package/dist/collection/components/certificate-details-parts/extensions/extended_key_usage_extension.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/extensions/general_name_part.js +7 -6
- package/dist/collection/components/certificate-details-parts/extensions/general_name_part.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/extensions/index.js +46 -45
- package/dist/collection/components/certificate-details-parts/extensions/index.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/extensions/info_access_syntax_extension.js +8 -9
- package/dist/collection/components/certificate-details-parts/extensions/info_access_syntax_extension.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/extensions/issuing_distribution_point_extension.js +7 -11
- package/dist/collection/components/certificate-details-parts/extensions/issuing_distribution_point_extension.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/extensions/key_usage_extension.js +5 -5
- package/dist/collection/components/certificate-details-parts/extensions/key_usage_extension.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/extensions/lei_extension.js +5 -5
- package/dist/collection/components/certificate-details-parts/extensions/lei_extension.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/extensions/lei_role_extennsion.js +5 -5
- package/dist/collection/components/certificate-details-parts/extensions/lei_role_extennsion.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/extensions/logotype_extension.js +8 -11
- package/dist/collection/components/certificate-details-parts/extensions/logotype_extension.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/extensions/name_constraints_extension.js +4 -3
- package/dist/collection/components/certificate-details-parts/extensions/name_constraints_extension.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/extensions/netscape_cert_type_extension.js +5 -5
- package/dist/collection/components/certificate-details-parts/extensions/netscape_cert_type_extension.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/extensions/netscape_comment_extension.js +5 -5
- package/dist/collection/components/certificate-details-parts/extensions/netscape_comment_extension.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/extensions/policy_constraints_extension.js +6 -7
- package/dist/collection/components/certificate-details-parts/extensions/policy_constraints_extension.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/extensions/policy_mappings_extension.js +5 -4
- package/dist/collection/components/certificate-details-parts/extensions/policy_mappings_extension.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/extensions/private_key_usage_period_extension.js +6 -7
- package/dist/collection/components/certificate-details-parts/extensions/private_key_usage_period_extension.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/extensions/qc_statements_extension.js +13 -16
- package/dist/collection/components/certificate-details-parts/extensions/qc_statements_extension.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/extensions/subject_alternative_name_extension.js +4 -3
- package/dist/collection/components/certificate-details-parts/extensions/subject_alternative_name_extension.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/extensions/subject_directory_attributes_extension.js +8 -9
- package/dist/collection/components/certificate-details-parts/extensions/subject_directory_attributes_extension.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/extensions/subject_key_identifier_extension.js +10 -15
- package/dist/collection/components/certificate-details-parts/extensions/subject_key_identifier_extension.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/extensions/timestamp_extension.js +7 -9
- package/dist/collection/components/certificate-details-parts/extensions/timestamp_extension.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/extensions/tn_auth_list_extension.js +4 -3
- package/dist/collection/components/certificate-details-parts/extensions/tn_auth_list_extension.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/holder.js +8 -11
- package/dist/collection/components/certificate-details-parts/holder.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/index.js +1 -0
- package/dist/collection/components/certificate-details-parts/index.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/issuer.js +5 -4
- package/dist/collection/components/certificate-details-parts/issuer.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/issuer_name.js +6 -4
- package/dist/collection/components/certificate-details-parts/issuer_name.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/miscellaneous.js +8 -13
- package/dist/collection/components/certificate-details-parts/miscellaneous.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/public_key.js +8 -7
- package/dist/collection/components/certificate-details-parts/public_key.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/revoked_certificates.js +9 -11
- package/dist/collection/components/certificate-details-parts/revoked_certificates.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/row.js +13 -18
- package/dist/collection/components/certificate-details-parts/row.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/signature.js +5 -4
- package/dist/collection/components/certificate-details-parts/signature.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/subject_name.js +4 -3
- package/dist/collection/components/certificate-details-parts/subject_name.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/thumbprints.js +4 -3
- package/dist/collection/components/certificate-details-parts/thumbprints.js.map +1 -0
- package/dist/collection/components/certificate-summary/certificate-summary.js +9 -77
- package/dist/collection/components/certificate-summary/certificate-summary.js.map +1 -0
- package/dist/collection/components/certificate-summary/index.js +5 -0
- package/dist/collection/components/certificate-summary/index.js.map +1 -0
- package/dist/collection/components/certificate-viewer/certificate-viewer.css +471 -104
- package/dist/collection/components/certificate-viewer/certificate-viewer.js +206 -178
- package/dist/collection/components/certificate-viewer/certificate-viewer.js.map +1 -0
- package/dist/collection/components/certificates-viewer/certificates-viewer.css +540 -267
- package/dist/collection/components/certificates-viewer/certificates-viewer.js +261 -266
- package/dist/collection/components/certificates-viewer/certificates-viewer.js.map +1 -0
- package/dist/collection/components/circular-progress/circular-progress.css +2 -11
- package/dist/collection/components/circular-progress/circular-progress.js +60 -63
- package/dist/collection/components/circular-progress/circular-progress.js.map +1 -0
- package/dist/collection/components/crl-viewer/crl-viewer.js +166 -139
- package/dist/collection/components/crl-viewer/crl-viewer.js.map +1 -0
- package/dist/collection/components/csr-viewer/csr-viewer.js +149 -124
- package/dist/collection/components/csr-viewer/csr-viewer.js.map +1 -0
- package/dist/collection/components/highlight-words/highlight-words.css +1 -9
- package/dist/collection/components/highlight-words/highlight-words.js +35 -28
- package/dist/collection/components/highlight-words/highlight-words.js.map +1 -0
- package/dist/collection/components/icons/actions.js +16 -0
- package/dist/collection/components/icons/actions.js.map +1 -0
- package/dist/collection/components/icons/arrow_bottom.js +16 -0
- package/dist/collection/components/icons/arrow_bottom.js.map +1 -0
- package/dist/collection/components/icons/arrow_top.js +16 -0
- package/dist/collection/components/icons/arrow_top.js.map +1 -0
- package/dist/collection/components/icons/cross.js +16 -0
- package/dist/collection/components/icons/cross.js.map +1 -0
- package/dist/collection/components/icons/details.js +16 -0
- package/dist/collection/components/icons/details.js.map +1 -0
- package/dist/collection/components/icons/download.js +16 -0
- package/dist/collection/components/icons/download.js.map +1 -0
- package/dist/collection/components/icons/index.js +11 -0
- package/dist/collection/components/icons/index.js.map +1 -0
- package/dist/collection/components/icons/link.js +16 -0
- package/dist/collection/components/icons/link.js.map +1 -0
- package/dist/collection/components/link/index.js +5 -0
- package/dist/collection/components/link/index.js.map +1 -0
- package/dist/collection/components/link/link.js +9 -61
- package/dist/collection/components/link/link.js.map +1 -0
- package/dist/collection/components/text-hider/text-hider.css +9 -36
- package/dist/collection/components/text-hider/text-hider.js +21 -68
- package/dist/collection/components/text-hider/text-hider.js.map +1 -0
- package/dist/collection/components/typography/index.js +5 -0
- package/dist/collection/components/typography/index.js.map +1 -0
- package/dist/collection/components/typography/typography.js +39 -126
- package/dist/collection/components/typography/typography.js.map +1 -0
- package/dist/collection/constants/logs.js +1 -0
- package/dist/collection/constants/logs.js.map +1 -0
- package/dist/collection/constants/oids.js +1 -0
- package/dist/collection/constants/oids.js.map +1 -0
- package/dist/collection/crypto/asn_data.js +13 -7
- package/dist/collection/crypto/asn_data.js.map +1 -0
- package/dist/collection/crypto/attribute.js +11 -10
- package/dist/collection/crypto/attribute.js.map +1 -0
- package/dist/collection/crypto/crl.js +9 -8
- package/dist/collection/crypto/crl.js.map +1 -0
- package/dist/collection/crypto/csr.js +11 -10
- package/dist/collection/crypto/csr.js.map +1 -0
- package/dist/collection/crypto/extension.js +16 -15
- package/dist/collection/crypto/extension.js.map +1 -0
- package/dist/collection/crypto/index.js +1 -0
- package/dist/collection/crypto/index.js.map +1 -0
- package/dist/collection/crypto/name.js +15 -9
- package/dist/collection/crypto/name.js.map +1 -0
- package/dist/collection/crypto/provider.js +4 -3
- package/dist/collection/crypto/provider.js.map +1 -0
- package/dist/collection/crypto/utils.js +4 -3
- package/dist/collection/crypto/utils.js.map +1 -0
- package/dist/collection/crypto/x509_attribute_certificate.js +9 -8
- package/dist/collection/crypto/x509_attribute_certificate.js.map +1 -0
- package/dist/collection/crypto/x509_certificate.js +12 -11
- package/dist/collection/crypto/x509_certificate.js.map +1 -0
- package/dist/collection/index.js +1 -0
- package/dist/collection/index.js.map +1 -0
- package/dist/collection/locales/en.json +4 -3
- package/dist/collection/utils/date_formatter.js +3 -2
- package/dist/collection/utils/date_formatter.js.map +1 -0
- package/dist/collection/utils/download.js +3 -2
- package/dist/collection/utils/download.js.map +1 -0
- package/dist/collection/utils/download_from_buffer.js +1 -0
- package/dist/collection/utils/download_from_buffer.js.map +1 -0
- package/dist/collection/utils/get_string_by_oid.js +2 -1
- package/dist/collection/utils/get_string_by_oid.js.map +1 -0
- package/dist/collection/utils/index.js +2 -1
- package/dist/collection/utils/index.js.map +1 -0
- package/dist/collection/utils/is_link.js +1 -0
- package/dist/collection/utils/is_link.js.map +1 -0
- package/dist/collection/utils/l10n.js +2 -1
- package/dist/collection/utils/l10n.js.map +1 -0
- package/dist/collection/utils/read_file.js +1 -0
- package/dist/collection/utils/read_file.js.map +1 -0
- package/dist/collection/utils/third_party_links.js +1 -0
- package/dist/collection/utils/third_party_links.js.map +1 -0
- package/dist/collection/utils/validator.js +1 -0
- package/dist/collection/utils/validator.js.map +1 -0
- package/dist/collection/www-copy/index.js +138 -32
- package/dist/esm/arrow_top-efd3a56d.js +34 -0
- package/dist/esm/arrow_top-efd3a56d.js.map +1 -0
- package/dist/esm/button-35146bdd.js +74 -0
- package/dist/esm/button-35146bdd.js.map +1 -0
- package/dist/esm/{certification_request-23cd5124.js → certification_request-5cadde9f.js} +171 -9
- package/dist/esm/certification_request-5cadde9f.js.map +1 -0
- package/dist/esm/{crl-7f23c111.js → crl-11670c3e.js} +7 -6
- package/dist/esm/crl-11670c3e.js.map +1 -0
- package/dist/esm/download-0cc3077a.js +21 -0
- package/dist/esm/download-0cc3077a.js.map +1 -0
- package/dist/esm/download-57c5bf8f.js +470 -0
- package/dist/esm/download-57c5bf8f.js.map +1 -0
- package/dist/esm/index-4079bbb5.js +2448 -0
- package/dist/esm/index-4079bbb5.js.map +1 -0
- package/dist/esm/index.js +3 -1
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/loader.js +6 -12
- package/dist/esm/loader.js.map +1 -0
- package/dist/esm/{miscellaneous-c7c0d04a.js → miscellaneous-1d4e8b41.js} +53 -37
- package/dist/esm/miscellaneous-1d4e8b41.js.map +1 -0
- package/dist/esm/peculiar-attribute-certificate-viewer_3.entry.js +80 -23
- package/dist/esm/peculiar-attribute-certificate-viewer_3.entry.js.map +1 -0
- package/dist/esm/peculiar-button-menu_3.entry.js +104 -0
- package/dist/esm/peculiar-button-menu_3.entry.js.map +1 -0
- package/dist/esm/peculiar-certificate-decoder.entry.js +30 -19
- package/dist/esm/peculiar-certificate-decoder.entry.js.map +1 -0
- package/dist/esm/peculiar-certificate-viewer.entry.js +34 -11
- package/dist/esm/peculiar-certificate-viewer.entry.js.map +1 -0
- package/dist/esm/peculiar-certificates-viewer.entry.js +183 -85
- package/dist/esm/peculiar-certificates-viewer.entry.js.map +1 -0
- package/dist/esm/peculiar-text-hider.entry.js +7 -13
- package/dist/esm/peculiar-text-hider.entry.js.map +1 -0
- package/dist/esm/peculiar.js +8 -58
- package/dist/esm/peculiar.js.map +1 -0
- package/dist/esm/{x509_certificate-d8e0af2d.js → x509_certificate-dfae6999.js} +4 -3
- package/dist/esm/x509_certificate-dfae6999.js.map +1 -0
- package/dist/esm-es5/arrow_top-efd3a56d.js +19 -0
- package/dist/esm-es5/arrow_top-efd3a56d.js.map +1 -0
- package/dist/esm-es5/button-35146bdd.js +19 -0
- package/dist/esm-es5/button-35146bdd.js.map +1 -0
- package/dist/esm-es5/certification_request-5cadde9f.js +97 -0
- package/dist/esm-es5/certification_request-5cadde9f.js.map +1 -0
- package/dist/esm-es5/crl-11670c3e.js +33 -0
- package/dist/esm-es5/crl-11670c3e.js.map +1 -0
- package/dist/esm-es5/download-0cc3077a.js +12 -0
- package/dist/esm-es5/download-0cc3077a.js.map +1 -0
- package/dist/esm-es5/download-57c5bf8f.js +19 -0
- package/dist/esm-es5/download-57c5bf8f.js.map +1 -0
- package/dist/esm-es5/index-4079bbb5.js +6 -0
- package/dist/esm-es5/index-4079bbb5.js.map +1 -0
- package/dist/esm-es5/index.js +5 -0
- package/dist/esm-es5/index.js.map +1 -0
- package/dist/esm-es5/loader.js +5 -0
- package/dist/esm-es5/loader.js.map +1 -0
- package/dist/esm-es5/miscellaneous-1d4e8b41.js +355 -0
- package/dist/esm-es5/miscellaneous-1d4e8b41.js.map +1 -0
- package/dist/esm-es5/peculiar-attribute-certificate-viewer_3.entry.js +110 -0
- package/dist/esm-es5/peculiar-attribute-certificate-viewer_3.entry.js.map +1 -0
- package/dist/esm-es5/peculiar-button-menu_3.entry.js +12 -0
- package/dist/esm-es5/peculiar-button-menu_3.entry.js.map +1 -0
- package/dist/esm-es5/peculiar-certificate-decoder.entry.js +12 -0
- package/dist/esm-es5/peculiar-certificate-decoder.entry.js.map +1 -0
- package/dist/esm-es5/peculiar-certificate-viewer.entry.js +5 -0
- package/dist/esm-es5/peculiar-certificate-viewer.entry.js.map +1 -0
- package/dist/esm-es5/peculiar-certificates-viewer.entry.js +33 -0
- package/dist/esm-es5/peculiar-certificates-viewer.entry.js.map +1 -0
- package/dist/esm-es5/peculiar-text-hider.entry.js +5 -0
- package/dist/esm-es5/peculiar-text-hider.entry.js.map +1 -0
- package/dist/esm-es5/peculiar.js +5 -0
- package/dist/esm-es5/peculiar.js.map +1 -0
- package/dist/esm-es5/x509_certificate-dfae6999.js +12 -0
- package/dist/esm-es5/x509_certificate-dfae6999.js.map +1 -0
- package/dist/index.js +1 -1
- package/dist/peculiar/index.esm.js +2 -1
- package/dist/peculiar/index.esm.js.map +1 -0
- package/dist/peculiar/locales/en.json +4 -3
- package/dist/peculiar/p-0b356bb5.js +6 -0
- package/dist/peculiar/p-0b356bb5.js.map +1 -0
- package/dist/peculiar/p-0bdcdbf7.system.js +355 -0
- package/dist/peculiar/p-0bdcdbf7.system.js.map +1 -0
- package/dist/peculiar/p-17e3c47b.js +12 -0
- package/dist/peculiar/p-17e3c47b.js.map +1 -0
- package/dist/peculiar/p-23555789.system.entry.js +34 -0
- package/dist/peculiar/p-23555789.system.entry.js.map +1 -0
- package/dist/peculiar/p-2fcad8cb.system.js +20 -0
- package/dist/peculiar/p-2fcad8cb.system.js.map +1 -0
- package/dist/peculiar/p-31586b23.system.js +13 -0
- package/dist/peculiar/p-31586b23.system.js.map +1 -0
- package/dist/peculiar/p-3788176f.system.entry.js +111 -0
- package/dist/peculiar/p-3788176f.system.entry.js.map +1 -0
- package/dist/peculiar/p-43eb3721.js +33 -0
- package/dist/peculiar/p-43eb3721.js.map +1 -0
- package/dist/peculiar/p-4562ae8b.system.entry.js +5 -0
- package/dist/peculiar/p-4562ae8b.system.entry.js.map +1 -0
- package/dist/peculiar/p-5823e6e8.entry.js +12 -0
- package/dist/peculiar/p-5823e6e8.entry.js.map +1 -0
- package/dist/peculiar/p-596836a7.entry.js +33 -0
- package/dist/peculiar/p-596836a7.entry.js.map +1 -0
- package/dist/peculiar/p-5aabeba7.system.js +6 -0
- package/dist/peculiar/p-5aabeba7.system.js.map +1 -0
- package/dist/peculiar/p-6667fe6e.system.js +34 -0
- package/dist/peculiar/p-6667fe6e.system.js.map +1 -0
- package/dist/peculiar/p-6e79b9c8.js +12 -0
- package/dist/peculiar/p-6e79b9c8.js.map +1 -0
- package/dist/peculiar/p-709994c1.js +19 -0
- package/dist/peculiar/p-709994c1.js.map +1 -0
- package/dist/peculiar/p-7215de9c.entry.js +5 -0
- package/dist/peculiar/p-7215de9c.entry.js.map +1 -0
- package/dist/peculiar/p-74c241e7.js +97 -0
- package/dist/peculiar/p-74c241e7.js.map +1 -0
- package/dist/peculiar/p-79d470a8.entry.js +110 -0
- package/dist/peculiar/p-79d470a8.entry.js.map +1 -0
- package/dist/peculiar/p-7f9beaa8.js +19 -0
- package/dist/peculiar/p-7f9beaa8.js.map +1 -0
- package/dist/peculiar/p-80832207.system.js +5 -0
- package/dist/peculiar/p-80832207.system.js.map +1 -0
- package/dist/peculiar/p-8748391f.system.entry.js +5 -0
- package/dist/peculiar/p-8748391f.system.entry.js.map +1 -0
- package/dist/peculiar/p-882e1281.entry.js +12 -0
- package/dist/peculiar/p-882e1281.entry.js.map +1 -0
- package/dist/peculiar/p-90459cec.entry.js +5 -0
- package/dist/peculiar/p-90459cec.entry.js.map +1 -0
- package/dist/peculiar/p-97688065.js +355 -0
- package/dist/peculiar/p-97688065.js.map +1 -0
- package/dist/peculiar/p-a053c132.js +19 -0
- package/dist/peculiar/p-a053c132.js.map +1 -0
- package/dist/peculiar/p-ae9189f6.system.js +19 -0
- package/dist/peculiar/p-ae9189f6.system.js.map +1 -0
- package/dist/peculiar/p-bd485115.system.entry.js +13 -0
- package/dist/peculiar/p-bd485115.system.entry.js.map +1 -0
- package/dist/peculiar/p-c0a298fd.system.js +97 -0
- package/dist/peculiar/p-c0a298fd.system.js.map +1 -0
- package/dist/peculiar/p-daf23673.system.js +20 -0
- package/dist/peculiar/p-daf23673.system.js.map +1 -0
- package/dist/peculiar/p-e1960173.system.js +5 -0
- package/dist/peculiar/p-e1960173.system.js.map +1 -0
- package/dist/peculiar/p-e39de121.system.entry.js +13 -0
- package/dist/peculiar/p-e39de121.system.entry.js.map +1 -0
- package/dist/peculiar/p-e6a3b4d4.system.js +13 -0
- package/dist/peculiar/p-e6a3b4d4.system.js.map +1 -0
- package/dist/peculiar/peculiar.css +1 -1
- package/dist/peculiar/peculiar.esm.js +2 -1
- package/dist/peculiar/peculiar.esm.js.map +1 -0
- package/dist/peculiar/peculiar.js +127 -0
- package/dist/types/components/attribute-certificate-viewer/attribute-certificate-viewer.d.ts +15 -3
- package/dist/types/components/button/button.d.ts +5 -16
- package/dist/types/components/button/index.d.ts +2 -0
- package/dist/types/components/button-menu/button-menu.d.ts +21 -0
- package/dist/types/components/certificate-decoder/certificate-decoder.d.ts +9 -6
- package/dist/types/components/certificate-details-parts/miscellaneous.d.ts +1 -1
- package/dist/types/components/certificate-summary/certificate-summary.d.ts +4 -3
- package/dist/types/components/certificate-summary/index.d.ts +1 -0
- package/dist/types/components/certificate-viewer/certificate-viewer.d.ts +13 -5
- package/dist/types/components/certificates-viewer/certificates-viewer.d.ts +22 -11
- package/dist/types/components/crl-viewer/crl-viewer.d.ts +13 -5
- package/dist/types/components/csr-viewer/csr-viewer.d.ts +13 -5
- package/dist/types/components/icons/actions.d.ts +12 -0
- package/dist/types/components/icons/arrow_bottom.d.ts +12 -0
- package/dist/types/components/icons/arrow_top.d.ts +12 -0
- package/dist/types/components/icons/cross.d.ts +12 -0
- package/dist/types/components/icons/details.d.ts +12 -0
- package/dist/types/components/icons/download.d.ts +12 -0
- package/dist/types/components/icons/index.d.ts +7 -0
- package/dist/types/components/icons/link.d.ts +12 -0
- package/dist/types/components/link/index.d.ts +1 -0
- package/dist/types/components/link/link.d.ts +6 -6
- package/dist/types/components/text-hider/text-hider.d.ts +0 -3
- package/dist/types/components/typography/index.d.ts +1 -0
- package/dist/types/components/typography/typography.d.ts +10 -20
- package/dist/types/components.d.ts +74 -175
- package/dist/types/crypto/attribute.d.ts +1 -1
- package/dist/types/crypto/extension.d.ts +1 -1
- package/dist/types/interface.d.ts +98 -6
- package/dist/types/stencil-public-runtime.d.ts +110 -23
- package/dist/types/utils/l10n.d.ts +5 -4
- package/dist/types/utils/read_file.d.ts +1 -1
- package/hydrate/index.d.ts +218 -0
- package/hydrate/index.js +22549 -0
- package/hydrate/package.json +6 -0
- package/loader/index.d.ts +10 -1
- package/loader/index.js +1 -1
- package/loader/package.json +1 -0
- package/package.json +6 -4
- package/dist/cjs/dom-f57e260e.js +0 -78
- package/dist/cjs/index-064e95c7.js +0 -1441
- package/dist/cjs/l10n-ddc7cff9.js +0 -169
- package/dist/cjs/peculiar-button-split_4.cjs.entry.js +0 -128
- package/dist/cjs/peculiar-button.cjs.entry.js +0 -40
- package/dist/cjs/peculiar-link.cjs.entry.js +0 -29
- package/dist/cjs/peculiar-typography.cjs.entry.js +0 -38
- package/dist/collection/components/button/button.css +0 -81
- package/dist/collection/components/button-split/button-split.css +0 -57
- package/dist/collection/components/button-split/button-split.js +0 -116
- package/dist/collection/components/certificate-summary/certificate-summary.css +0 -49
- package/dist/collection/components/link/link.css +0 -59
- package/dist/collection/components/typography/typography.css +0 -95
- package/dist/esm/dom-f1b08a97.js +0 -76
- package/dist/esm/index-bbd484d9.js +0 -1410
- package/dist/esm/l10n-d48f35ff.js +0 -165
- package/dist/esm/peculiar-button-split_4.entry.js +0 -121
- package/dist/esm/peculiar-button.entry.js +0 -36
- package/dist/esm/peculiar-link.entry.js +0 -25
- package/dist/esm/peculiar-typography.entry.js +0 -34
- package/dist/esm/polyfills/css-shim.js +0 -1
- package/dist/peculiar/p-01cea5c0.entry.js +0 -11
- package/dist/peculiar/p-3bfefa4a.entry.js +0 -18
- package/dist/peculiar/p-4e8169cb.entry.js +0 -4
- package/dist/peculiar/p-57b89412.entry.js +0 -4
- package/dist/peculiar/p-5b4eed12.entry.js +0 -4
- package/dist/peculiar/p-610b85e3.entry.js +0 -4
- package/dist/peculiar/p-6d37c8b5.entry.js +0 -4
- package/dist/peculiar/p-711b4e1e.js +0 -18
- package/dist/peculiar/p-81a88a33.js +0 -11
- package/dist/peculiar/p-918aeee4.entry.js +0 -4
- package/dist/peculiar/p-9f4ee110.js +0 -22
- package/dist/peculiar/p-a050e184.js +0 -69
- package/dist/peculiar/p-c24c26c2.js +0 -32
- package/dist/peculiar/p-df53fbcc.entry.js +0 -4
- package/dist/peculiar/p-ec250cc4.js +0 -12
- package/dist/peculiar/p-f7683ba5.js +0 -5
- package/dist/peculiar/p-fe05f51e.js +0 -79
- package/dist/types/components/button-split/button-split.d.ts +0 -21
|
@@ -8,25 +8,24 @@
|
|
|
8
8
|
* This source code is licensed under the MIT license found in the
|
|
9
9
|
* LICENSE file in the root directory of this source tree.
|
|
10
10
|
*/
|
|
11
|
-
import {
|
|
12
|
-
import { validator, readAsBinaryString } from
|
|
13
|
-
import { X509Certificate, X509AttributeCertificate, CSR, CRL, } from
|
|
11
|
+
import { Host, h, } from "@stencil/core";
|
|
12
|
+
import { validator, readAsBinaryString } from "../../utils";
|
|
13
|
+
import { X509Certificate, X509AttributeCertificate, CSR, CRL, } from "../../crypto";
|
|
14
|
+
import { Button } from "../button";
|
|
15
|
+
import { Typography } from "../typography";
|
|
14
16
|
export class CertificateDecoder {
|
|
15
17
|
constructor() {
|
|
16
|
-
this.
|
|
18
|
+
this.handleClickDecode = () => {
|
|
17
19
|
const { value } = this.inputPaste;
|
|
18
20
|
if (value) {
|
|
19
21
|
this.decode(value);
|
|
20
22
|
}
|
|
21
23
|
};
|
|
22
|
-
this.
|
|
23
|
-
this.decode(this.certificateExample);
|
|
24
|
-
};
|
|
25
|
-
this.onClickClear = () => {
|
|
24
|
+
this.handleClickClear = () => {
|
|
26
25
|
this.clearValue();
|
|
27
26
|
};
|
|
28
|
-
this.
|
|
29
|
-
const element =
|
|
27
|
+
this.handleChangeInputFile = async (event) => {
|
|
28
|
+
const element = event.target;
|
|
30
29
|
if (element.files) {
|
|
31
30
|
const file = await readAsBinaryString(element.files[0]);
|
|
32
31
|
if (typeof file.value === 'string') {
|
|
@@ -35,10 +34,18 @@ export class CertificateDecoder {
|
|
|
35
34
|
element.value = '';
|
|
36
35
|
}
|
|
37
36
|
};
|
|
38
|
-
this.
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
37
|
+
this.handleChangeExample = (event) => {
|
|
38
|
+
if (event.target.value) {
|
|
39
|
+
this.decode(event.target.value);
|
|
40
|
+
}
|
|
41
|
+
else {
|
|
42
|
+
this.clearValue();
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
this.handleDropFile = async (event) => {
|
|
46
|
+
event.stopPropagation();
|
|
47
|
+
event.preventDefault();
|
|
48
|
+
const element = event.dataTransfer;
|
|
42
49
|
if (element.files) {
|
|
43
50
|
const file = await readAsBinaryString(element.files[0]);
|
|
44
51
|
if (typeof file.value === 'string') {
|
|
@@ -46,6 +53,9 @@ export class CertificateDecoder {
|
|
|
46
53
|
}
|
|
47
54
|
}
|
|
48
55
|
};
|
|
56
|
+
this.certificateExamples = undefined;
|
|
57
|
+
this.defaultCertificate = undefined;
|
|
58
|
+
this.certificateDecoded = undefined;
|
|
49
59
|
}
|
|
50
60
|
componentDidLoad() {
|
|
51
61
|
if (this.defaultCertificate) {
|
|
@@ -137,96 +147,94 @@ export class CertificateDecoder {
|
|
|
137
147
|
}
|
|
138
148
|
}
|
|
139
149
|
render() {
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
h("div", { class: "controls" },
|
|
143
|
-
h("peculiar-button", { fill: "fill", class: "button", onClick: this.onClickDecode }, "Decode"),
|
|
144
|
-
h("peculiar-button", { class: "button" },
|
|
145
|
-
"Choose file",
|
|
146
|
-
h("input", { type: "file", class: "input_file", accept: "application/pkix-cert,application/x-x509-ca-cert,application/x-x509-user-cert,application/pkcs10,application/pkix-crl,.csr,.req,.crl", onChange: this.onChangeInputFile, value: "" })),
|
|
147
|
-
h("peculiar-button", { class: "button", onClick: this.onClickClear }, "Clear"),
|
|
148
|
-
this.certificateExample && (h("peculiar-button", { class: "button", onClick: this.onClickExample }, "Example"))),
|
|
149
|
-
this.certificateDecoded instanceof X509Certificate && (h("peculiar-certificate-viewer", { certificate: this.certificateDecoded, class: "viewer", download: true })),
|
|
150
|
-
this.certificateDecoded instanceof X509AttributeCertificate && (h("peculiar-attribute-certificate-viewer", { certificate: this.certificateDecoded, class: "viewer", download: true })),
|
|
151
|
-
this.certificateDecoded instanceof CSR && (h("peculiar-csr-viewer", { certificate: this.certificateDecoded, class: "viewer", download: true })),
|
|
152
|
-
this.certificateDecoded instanceof CRL && (h("peculiar-crl-viewer", { certificate: this.certificateDecoded, class: "viewer", download: true }))));
|
|
150
|
+
var _a;
|
|
151
|
+
return (h(Host, null, h("textarea", { placeholder: "Certificate DER or PEM", class: "textarea t-b2 c-black", ref: (el) => { this.inputPaste = el; }, onDrop: this.handleDropFile }), h("div", { class: "controls" }, h("div", { class: "control_row" }, h(Typography, { variant: "b3", color: "secondary-tint-2" }, "Drag or load file:"), h("input", { type: "file", accept: "application/pkix-cert,application/x-x509-ca-cert,application/x-x509-user-cert,application/pkcs10,application/pkix-crl,.csr,.req,.crl", onChange: this.handleChangeInputFile, value: "" })), ((_a = this.certificateExamples) === null || _a === void 0 ? void 0 : _a.length) && (h("div", { class: "control_row" }, h(Typography, { variant: "b3", color: "secondary-tint-2" }, "Load examples:"), h("select", { onChange: this.handleChangeExample }, h("option", { value: "" }, "None"), this.certificateExamples.map((example) => (h("option", { value: example.value }, example.title)))))), h("div", { class: "control_row" }, h(Button, { onClick: this.handleClickDecode }, "Decode"), h(Button, { onClick: this.handleClickClear }, "Clear"))), this.certificateDecoded instanceof X509Certificate && (h("peculiar-certificate-viewer", { certificate: this.certificateDecoded, class: "viewer", download: true })), this.certificateDecoded instanceof X509AttributeCertificate && (h("peculiar-attribute-certificate-viewer", { certificate: this.certificateDecoded, class: "viewer", download: true })), this.certificateDecoded instanceof CSR && (h("peculiar-csr-viewer", { certificate: this.certificateDecoded, class: "viewer", download: true })), this.certificateDecoded instanceof CRL && (h("peculiar-crl-viewer", { certificate: this.certificateDecoded, class: "viewer", download: true }))));
|
|
153
152
|
}
|
|
154
153
|
static get is() { return "peculiar-certificate-decoder"; }
|
|
155
154
|
static get encapsulation() { return "shadow"; }
|
|
156
|
-
static get originalStyleUrls() {
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
"
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
"mutable": false,
|
|
183
|
-
"complexType": {
|
|
184
|
-
"original": "string",
|
|
185
|
-
"resolved": "string",
|
|
186
|
-
"references": {}
|
|
187
|
-
},
|
|
188
|
-
"required": false,
|
|
189
|
-
"optional": true,
|
|
190
|
-
"docs": {
|
|
191
|
-
"tags": [],
|
|
192
|
-
"text": "The default certificate value for decode and show details. Use PEM or DER."
|
|
193
|
-
},
|
|
194
|
-
"attribute": "default-certificate",
|
|
195
|
-
"reflect": false
|
|
196
|
-
}
|
|
197
|
-
}; }
|
|
198
|
-
static get states() { return {
|
|
199
|
-
"certificateDecoded": {}
|
|
200
|
-
}; }
|
|
201
|
-
static get events() { return [{
|
|
202
|
-
"method": "successParse",
|
|
203
|
-
"name": "successParse",
|
|
204
|
-
"bubbles": true,
|
|
205
|
-
"cancelable": true,
|
|
206
|
-
"composed": true,
|
|
207
|
-
"docs": {
|
|
208
|
-
"tags": [],
|
|
209
|
-
"text": "Emitted when the certificate has been successfully parsed."
|
|
210
|
-
},
|
|
211
|
-
"complexType": {
|
|
212
|
-
"original": "string",
|
|
213
|
-
"resolved": "string",
|
|
214
|
-
"references": {}
|
|
215
|
-
}
|
|
216
|
-
}, {
|
|
217
|
-
"method": "clearCertificate",
|
|
218
|
-
"name": "clearCertificate",
|
|
219
|
-
"bubbles": true,
|
|
220
|
-
"cancelable": true,
|
|
221
|
-
"composed": true,
|
|
222
|
-
"docs": {
|
|
223
|
-
"tags": [],
|
|
224
|
-
"text": "Emitted when the certificate has been removed."
|
|
155
|
+
static get originalStyleUrls() {
|
|
156
|
+
return {
|
|
157
|
+
"$": ["certificate-decoder.scss"]
|
|
158
|
+
};
|
|
159
|
+
}
|
|
160
|
+
static get styleUrls() {
|
|
161
|
+
return {
|
|
162
|
+
"$": ["certificate-decoder.css"]
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
static get properties() {
|
|
166
|
+
return {
|
|
167
|
+
"certificateExamples": {
|
|
168
|
+
"type": "unknown",
|
|
169
|
+
"mutable": false,
|
|
170
|
+
"complexType": {
|
|
171
|
+
"original": "{\n title: string;\n value: string;\n }[]",
|
|
172
|
+
"resolved": "{ title: string; value: string; }[]",
|
|
173
|
+
"references": {}
|
|
174
|
+
},
|
|
175
|
+
"required": false,
|
|
176
|
+
"optional": true,
|
|
177
|
+
"docs": {
|
|
178
|
+
"tags": [],
|
|
179
|
+
"text": "The example certificate value for decode and show details. Use PEM or DER."
|
|
180
|
+
}
|
|
225
181
|
},
|
|
226
|
-
"
|
|
227
|
-
"
|
|
228
|
-
"
|
|
229
|
-
"
|
|
182
|
+
"defaultCertificate": {
|
|
183
|
+
"type": "string",
|
|
184
|
+
"mutable": false,
|
|
185
|
+
"complexType": {
|
|
186
|
+
"original": "string",
|
|
187
|
+
"resolved": "string",
|
|
188
|
+
"references": {}
|
|
189
|
+
},
|
|
190
|
+
"required": false,
|
|
191
|
+
"optional": true,
|
|
192
|
+
"docs": {
|
|
193
|
+
"tags": [],
|
|
194
|
+
"text": "The default certificate value for decode and show details. Use PEM or DER."
|
|
195
|
+
},
|
|
196
|
+
"attribute": "default-certificate",
|
|
197
|
+
"reflect": false
|
|
230
198
|
}
|
|
231
|
-
}
|
|
199
|
+
};
|
|
200
|
+
}
|
|
201
|
+
static get states() {
|
|
202
|
+
return {
|
|
203
|
+
"certificateDecoded": {}
|
|
204
|
+
};
|
|
205
|
+
}
|
|
206
|
+
static get events() {
|
|
207
|
+
return [{
|
|
208
|
+
"method": "successParse",
|
|
209
|
+
"name": "successParse",
|
|
210
|
+
"bubbles": true,
|
|
211
|
+
"cancelable": true,
|
|
212
|
+
"composed": true,
|
|
213
|
+
"docs": {
|
|
214
|
+
"tags": [],
|
|
215
|
+
"text": "Emitted when the certificate has been successfully parsed."
|
|
216
|
+
},
|
|
217
|
+
"complexType": {
|
|
218
|
+
"original": "string",
|
|
219
|
+
"resolved": "string",
|
|
220
|
+
"references": {}
|
|
221
|
+
}
|
|
222
|
+
}, {
|
|
223
|
+
"method": "clearCertificate",
|
|
224
|
+
"name": "clearCertificate",
|
|
225
|
+
"bubbles": true,
|
|
226
|
+
"cancelable": true,
|
|
227
|
+
"composed": true,
|
|
228
|
+
"docs": {
|
|
229
|
+
"tags": [],
|
|
230
|
+
"text": "Emitted when the certificate has been removed."
|
|
231
|
+
},
|
|
232
|
+
"complexType": {
|
|
233
|
+
"original": "void",
|
|
234
|
+
"resolved": "void",
|
|
235
|
+
"references": {}
|
|
236
|
+
}
|
|
237
|
+
}];
|
|
238
|
+
}
|
|
232
239
|
}
|
|
240
|
+
//# sourceMappingURL=certificate-decoder.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"certificate-decoder.js","sourceRoot":"","sources":["../../../src/components/certificate-decoder/certificate-decoder.tsx"],"names":[],"mappings":"AAAA;;;;;;G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,cAAQ,QAAQ,EAAE,IAAI,CAAC,mBAAmB;YACxC,cAAQ,KAAK,EAAC,EAAE,WAAc;YAC7B,IAAI,CAAC,mBAAmB,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CACzC,cAAQ,KAAK,EAAE,OAAO,CAAC,KAAK,IACzB,OAAO,CAAC,KAAK,CACP,CACV,CAAC,CACK,CACL,CACP;QACD,WAAK,KAAK,EAAC,aAAa;UACtB,EAAC,MAAM,IACL,OAAO,EAAE,IAAI,CAAC,iBAAiB,aAGxB;UACT,EAAC,MAAM,IACL,OAAO,EAAE,IAAI,CAAC,gBAAgB,YAGvB,CACL,CACF;MACL,IAAI,CAAC,kBAAkB,YAAY,eAAe,IAAI,CACrD,mCACE,WAAW,EAAE,IAAI,CAAC,kBAAkB,EACpC,KAAK,EAAC,QAAQ,EACd,QAAQ,SACR,CACH;MACA,IAAI,CAAC,kBAAkB,YAAY,wBAAwB,IAAI,CAC9D,6CACE,WAAW,EAAE,IAAI,CAAC,kBAAkB,EACpC,KAAK,EAAC,QAAQ,EACd,QAAQ,SACR,CACH;MACA,IAAI,CAAC,kBAAkB,YAAY,GAAG,IAAI,CACzC,2BACE,WAAW,EAAE,IAAI,CAAC,kBAAkB,EACpC,KAAK,EAAC,QAAQ,EACd,QAAQ,SACR,CACH;MACA,IAAI,CAAC,kBAAkB,YAAY,GAAG,IAAI,CACzC,2BACE,WAAW,EAAE,IAAI,CAAC,kBAAkB,EACpC,KAAK,EAAC,QAAQ,EACd,QAAQ,SACR,CACH,CACI,CACR,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","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 {\n Component,\n Host,\n h,\n State,\n Prop,\n Event,\n EventEmitter,\n} from '@stencil/core';\n\nimport { validator, readAsBinaryString } from '../../utils';\nimport {\n X509Certificate,\n X509AttributeCertificate,\n CSR,\n CRL,\n} from '../../crypto';\nimport { Button } from '../button';\nimport { Typography } from '../typography';\n\n@Component({\n tag: 'peculiar-certificate-decoder',\n styleUrl: 'certificate-decoder.scss',\n shadow: true,\n})\nexport class CertificateDecoder {\n private inputPaste?: HTMLTextAreaElement;\n\n /**\n * The example certificate value for decode and show details. Use PEM or DER.\n */\n @Prop() certificateExamples?: {\n title: string;\n value: string;\n }[];\n\n /**\n * The default certificate value for decode and show details. Use PEM or DER.\n */\n @Prop() defaultCertificate?: string;\n\n @State() certificateDecoded: X509Certificate | X509AttributeCertificate | CSR | CRL;\n\n /**\n * Emitted when the certificate has been successfully parsed.\n */\n @Event() successParse!: EventEmitter<string>;\n\n /**\n * Emitted when the certificate has been removed.\n */\n @Event() clearCertificate!: EventEmitter<void>;\n\n componentDidLoad() {\n if (this.defaultCertificate) {\n /**\n * Prevent Stencil warning about re-render\n */\n setTimeout(() => this.decode(this.defaultCertificate), 100);\n }\n }\n\n private handleClickDecode = () => {\n const { value } = this.inputPaste;\n\n if (value) {\n this.decode(value);\n }\n };\n\n private handleClickClear = () => {\n this.clearValue();\n };\n\n private handleChangeInputFile = async (event: any) => {\n const element = event.target;\n\n if (element.files) {\n const file = await readAsBinaryString(element.files[0]);\n\n if (typeof file.value === 'string') {\n this.decode(file.value);\n }\n\n element.value = '';\n }\n };\n\n private handleChangeExample = (event: any) => {\n if (event.target.value) {\n this.decode(event.target.value);\n } else {\n this.clearValue();\n }\n };\n\n private handleDropFile = async (event: any) => {\n event.stopPropagation();\n event.preventDefault();\n\n const element = event.dataTransfer;\n\n if (element.files) {\n const file = await readAsBinaryString(element.files[0]);\n\n if (typeof file.value === 'string') {\n this.decode(file.value);\n }\n }\n };\n\n clearValue() {\n this.inputPaste.value = '';\n this.certificateDecoded = null;\n this.clearCertificate.emit();\n }\n\n setValue(value: X509Certificate | X509AttributeCertificate | CSR | CRL) {\n this.certificateDecoded = value;\n this.inputPaste.value = value.exportAsPemFormatted();\n this.successParse.emit(value.exportAsBase64());\n }\n\n decode(certificate: string) {\n const isPem = validator.isPem(certificate);\n const isX509Pem = validator.isX509Pem(certificate);\n const isPkcs10Pem = validator.isPkcs10Pem(certificate);\n const isX509AttributePem = validator.isX509AttributePem(certificate);\n const isX509CRLPem = validator.isX509CRLPem(certificate);\n let decoded: X509Certificate | X509AttributeCertificate | CSR | CRL;\n let decodeError: Error;\n\n if (isPem && !(isX509Pem || isX509AttributePem || isPkcs10Pem || isX509CRLPem)) {\n this.clearValue();\n\n alert('Unsupported file type. Please try to use Certificate/AttributeCertificate/CertificateRequest/CRL.');\n\n return;\n }\n\n try {\n if (isX509Pem) {\n decoded = new X509Certificate(certificate);\n }\n\n if (isX509AttributePem) {\n decoded = new X509AttributeCertificate(certificate);\n }\n\n if (isPkcs10Pem) {\n decoded = new CSR(certificate);\n }\n\n if (isX509CRLPem) {\n decoded = new CRL(certificate);\n }\n } catch (error) {\n decodeError = error;\n }\n\n if (!decoded) {\n try {\n decoded = new X509Certificate(certificate);\n } catch (error) {\n decodeError = error;\n }\n }\n\n if (!decoded) {\n try {\n decoded = new X509AttributeCertificate(certificate);\n } catch (error) {\n decodeError = error;\n }\n }\n\n if (!decoded) {\n try {\n decoded = new CSR(certificate);\n } catch (error) {\n decodeError = error;\n }\n }\n\n if (!decoded) {\n try {\n decoded = new CRL(certificate);\n } catch (error) {\n decodeError = error;\n }\n }\n\n if (!decoded) {\n this.clearValue();\n\n console.log(decodeError);\n alert('Error decoding file. Please try to use Certificate/AttributeCertificate/CertificateRequest/CRL.');\n } else {\n this.setValue(decoded);\n }\n }\n\n render() {\n return (\n <Host>\n <textarea\n placeholder=\"Certificate DER or PEM\"\n class=\"textarea t-b2 c-black\"\n ref={(el) => { this.inputPaste = el; }}\n onDrop={this.handleDropFile}\n />\n <div class=\"controls\">\n <div class=\"control_row\">\n <Typography\n variant=\"b3\"\n color=\"secondary-tint-2\"\n >\n Drag or load file:\n </Typography>\n <input\n type=\"file\"\n accept=\"application/pkix-cert,application/x-x509-ca-cert,application/x-x509-user-cert,application/pkcs10,application/pkix-crl,.csr,.req,.crl\"\n onChange={this.handleChangeInputFile}\n value=\"\"\n />\n </div>\n {this.certificateExamples?.length && (\n <div class=\"control_row\">\n <Typography\n variant=\"b3\"\n color=\"secondary-tint-2\"\n >\n Load examples:\n </Typography>\n <select onChange={this.handleChangeExample}>\n <option value=\"\">None</option>\n {this.certificateExamples.map((example) => (\n <option value={example.value}>\n {example.title}\n </option>\n ))}\n </select>\n </div>\n )}\n <div class=\"control_row\">\n <Button\n onClick={this.handleClickDecode}\n >\n Decode\n </Button>\n <Button\n onClick={this.handleClickClear}\n >\n Clear\n </Button>\n </div>\n </div>\n {this.certificateDecoded instanceof X509Certificate && (\n <peculiar-certificate-viewer\n certificate={this.certificateDecoded}\n class=\"viewer\"\n download\n />\n )}\n {this.certificateDecoded instanceof X509AttributeCertificate && (\n <peculiar-attribute-certificate-viewer\n certificate={this.certificateDecoded}\n class=\"viewer\"\n download\n />\n )}\n {this.certificateDecoded instanceof CSR && (\n <peculiar-csr-viewer\n certificate={this.certificateDecoded}\n class=\"viewer\"\n download\n />\n )}\n {this.certificateDecoded instanceof CRL && (\n <peculiar-crl-viewer\n certificate={this.certificateDecoded}\n class=\"viewer\"\n download\n />\n )}\n </Host>\n );\n }\n}\n"]}
|
|
@@ -8,17 +8,12 @@
|
|
|
8
8
|
* This source code is licensed under the MIT license found in the
|
|
9
9
|
* LICENSE file in the root directory of this source tree.
|
|
10
10
|
*/
|
|
11
|
-
import { h } from
|
|
12
|
-
import { GeneralNamePart } from
|
|
13
|
-
import { RowValue } from
|
|
14
|
-
import { BasicAttribute } from
|
|
11
|
+
import { h } from "@stencil/core";
|
|
12
|
+
import { GeneralNamePart } from "../extensions/general_name_part";
|
|
13
|
+
import { RowValue } from "../row";
|
|
14
|
+
import { BasicAttribute } from "./basic_attribute";
|
|
15
15
|
export const ActivityDescriptionAttribute = (props) => {
|
|
16
16
|
const { attribute } = props;
|
|
17
|
-
return (h(BasicAttribute, { attribute: attribute },
|
|
18
|
-
h(RowValue, { name: "Code Authority", value: "" }),
|
|
19
|
-
h(GeneralNamePart, { generalName: attribute.value.codeAuthority, getDNSNameLink: () => '', getIPAddressLink: () => '' }),
|
|
20
|
-
h(RowValue, { name: "Code Id", value: "" }),
|
|
21
|
-
h(GeneralNamePart, { generalName: attribute.value.codeId, getDNSNameLink: () => '', getIPAddressLink: () => '' }),
|
|
22
|
-
h(RowValue, { name: "Short Name", value: attribute.value.shortName }),
|
|
23
|
-
h(RowValue, { name: "Short Description", value: attribute.value.shortDescription })));
|
|
17
|
+
return (h(BasicAttribute, { attribute: attribute }, h(RowValue, { name: "Code Authority", value: "" }), h(GeneralNamePart, { generalName: attribute.value.codeAuthority, getDNSNameLink: () => '', getIPAddressLink: () => '' }), h(RowValue, { name: "Code Id", value: "" }), h(GeneralNamePart, { generalName: attribute.value.codeId, getDNSNameLink: () => '', getIPAddressLink: () => '' }), h(RowValue, { name: "Short Name", value: attribute.value.shortName }), h(RowValue, { name: "Short Description", value: attribute.value.shortDescription })));
|
|
24
18
|
};
|
|
19
|
+
//# sourceMappingURL=activity_description_attribute.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"activity_description_attribute.js","sourceRoot":"","sources":["../../../../src/components/certificate-details-parts/attributes/activity_description_attribute.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,CAAC,EAAuB,MAAM,eAAe,CAAC;AAIvD,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAClC,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAMnD,MAAM,CAAC,MAAM,4BAA4B,GACiB,CAAC,KAAK,EAAE,EAAE;EAClE,MAAM,EAAE,SAAS,EAAE,GAAG,KAAK,CAAC;EAE5B,OAAO,CACL,EAAC,cAAc,IACb,SAAS,EAAE,SAAS;IAEpB,EAAC,QAAQ,IACP,IAAI,EAAC,gBAAgB,EACrB,KAAK,EAAC,EAAE,GACR;IACF,EAAC,eAAe,IACd,WAAW,EAAE,SAAS,CAAC,KAAK,CAAC,aAAa,EAC1C,cAAc,EAAE,GAAG,EAAE,CAAC,EAAE,EACxB,gBAAgB,EAAE,GAAG,EAAE,CAAC,EAAE,GAC1B;IAEF,EAAC,QAAQ,IACP,IAAI,EAAC,SAAS,EACd,KAAK,EAAC,EAAE,GACR;IACF,EAAC,eAAe,IACd,WAAW,EAAE,SAAS,CAAC,KAAK,CAAC,MAAM,EACnC,cAAc,EAAE,GAAG,EAAE,CAAC,EAAE,EACxB,gBAAgB,EAAE,GAAG,EAAE,CAAC,EAAE,GAC1B;IAEF,EAAC,QAAQ,IACP,IAAI,EAAC,YAAY,EACjB,KAAK,EAAE,SAAS,CAAC,KAAK,CAAC,SAAS,GAChC;IACF,EAAC,QAAQ,IACP,IAAI,EAAC,mBAAmB,EACxB,KAAK,EAAE,SAAS,CAAC,KAAK,CAAC,gBAAgB,GACvC,CACa,CAClB,CAAC;AACJ,CAAC,CAAC","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';\nimport type { ActivityDescription } from '@peculiar/asn1-ntqwac';\n\nimport { Attribute } from '../../../crypto/attribute';\nimport { GeneralNamePart } from '../extensions/general_name_part';\nimport { RowValue } 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=\"Code Authority\"\n value=\"\"\n />\n <GeneralNamePart\n generalName={attribute.value.codeAuthority}\n getDNSNameLink={() => ''}\n getIPAddressLink={() => ''}\n />\n\n <RowValue\n name=\"Code Id\"\n value=\"\"\n />\n <GeneralNamePart\n generalName={attribute.value.codeId}\n getDNSNameLink={() => ''}\n getIPAddressLink={() => ''}\n />\n\n <RowValue\n name=\"Short Name\"\n value={attribute.value.shortName}\n />\n <RowValue\n name=\"Short Description\"\n value={attribute.value.shortDescription}\n />\n </BasicAttribute>\n );\n};\n"]}
|
package/dist/collection/components/certificate-details-parts/attributes/as_string_attribute.js
CHANGED
|
@@ -8,11 +8,11 @@
|
|
|
8
8
|
* This source code is licensed under the MIT license found in the
|
|
9
9
|
* LICENSE file in the root directory of this source tree.
|
|
10
10
|
*/
|
|
11
|
-
import { h } from
|
|
12
|
-
import { RowValue } from
|
|
13
|
-
import { BasicAttribute } from
|
|
11
|
+
import { h } from "@stencil/core";
|
|
12
|
+
import { RowValue } from "../row";
|
|
13
|
+
import { BasicAttribute } from "./basic_attribute";
|
|
14
14
|
export const AsStringAttribute = (props) => {
|
|
15
15
|
const { attribute } = props;
|
|
16
|
-
return (h(BasicAttribute, { attribute: attribute },
|
|
17
|
-
h(RowValue, { name: "Value", value: attribute.value, monospace: true })));
|
|
16
|
+
return (h(BasicAttribute, { attribute: attribute }, h(RowValue, { name: "Value", value: attribute.value, monospace: true })));
|
|
18
17
|
};
|
|
18
|
+
//# sourceMappingURL=as_string_attribute.js.map
|
package/dist/collection/components/certificate-details-parts/attributes/as_string_attribute.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"as_string_attribute.js","sourceRoot":"","sources":["../../../../src/components/certificate-details-parts/attributes/as_string_attribute.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,CAAC,EAAuB,MAAM,eAAe,CAAC;AAGvD,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAClC,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAMnD,MAAM,CAAC,MAAM,iBAAiB,GACiB,CAAC,KAAK,EAAE,EAAE;EACvD,MAAM,EAAE,SAAS,EAAE,GAAG,KAAK,CAAC;EAE5B,OAAO,CACL,EAAC,cAAc,IACb,SAAS,EAAE,SAAS;IAEpB,EAAC,QAAQ,IACP,IAAI,EAAC,OAAO,EACZ,KAAK,EAAE,SAAS,CAAC,KAAK,EACtB,SAAS,SACT,CACa,CAClB,CAAC;AACJ,CAAC,CAAC","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 } 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"]}
|
|
@@ -8,16 +8,15 @@
|
|
|
8
8
|
* This source code is licensed under the MIT license found in the
|
|
9
9
|
* LICENSE file in the root directory of this source tree.
|
|
10
10
|
*/
|
|
11
|
-
import { h } from
|
|
12
|
-
import { getStringByOID } from
|
|
13
|
-
import { RowValue } from
|
|
11
|
+
import { h } from "@stencil/core";
|
|
12
|
+
import { getStringByOID } from "../../../utils";
|
|
13
|
+
import { RowValue } from "../row";
|
|
14
14
|
export const BasicAttribute = (props, children) => {
|
|
15
15
|
const { attribute } = props;
|
|
16
16
|
return ([
|
|
17
17
|
h(RowValue, { name: "Name", value: getStringByOID(attribute.asn.type) }),
|
|
18
18
|
children,
|
|
19
|
-
h("tr", null,
|
|
20
|
-
h("td", { colSpan: 2, class: "divider" },
|
|
21
|
-
h("span", { class: "bg_fill" }))),
|
|
19
|
+
h("tr", null, h("td", { colSpan: 2, class: "divider" }, h("span", null))),
|
|
22
20
|
]);
|
|
23
21
|
};
|
|
22
|
+
//# sourceMappingURL=basic_attribute.js.map
|
package/dist/collection/components/certificate-details-parts/attributes/basic_attribute.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"basic_attribute.js","sourceRoot":"","sources":["../../../../src/components/certificate-details-parts/attributes/basic_attribute.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,CAAC,EAAuB,MAAM,eAAe,CAAC;AAGvD,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAMlC,MAAM,CAAC,MAAM,cAAc,GAA8C,CAAC,KAAK,EAAE,QAAQ,EAAE,EAAE;EAC3F,MAAM,EAAE,SAAS,EAAE,GAAG,KAAK,CAAC;EAE5B,OAAO,CAAC;IACN,EAAC,QAAQ,IACP,IAAI,EAAC,MAAM,EACX,KAAK,EAAE,cAAc,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,GACzC;IACF,QAAQ;IACR;MACE,UAAI,OAAO,EAAE,CAAC,EAAE,KAAK,EAAC,SAAS;QAC7B,eAAQ,CACL,CACF;GACN,CAAC,CAAC;AACL,CAAC,CAAC","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"]}
|
|
@@ -8,11 +8,11 @@
|
|
|
8
8
|
* This source code is licensed under the MIT license found in the
|
|
9
9
|
* LICENSE file in the root directory of this source tree.
|
|
10
10
|
*/
|
|
11
|
-
import { h } from
|
|
12
|
-
import { RowValue } from
|
|
13
|
-
import { BasicAttribute } from
|
|
11
|
+
import { h } from "@stencil/core";
|
|
12
|
+
import { RowValue } from "../row";
|
|
13
|
+
import { BasicAttribute } from "./basic_attribute";
|
|
14
14
|
export const ChallengePasswordAttribute = (props) => {
|
|
15
15
|
const { attribute } = props;
|
|
16
|
-
return (h(BasicAttribute, { attribute: attribute },
|
|
17
|
-
h(RowValue, { name: "Value", value: attribute.value.toString() })));
|
|
16
|
+
return (h(BasicAttribute, { attribute: attribute }, h(RowValue, { name: "Value", value: attribute.value.toString() })));
|
|
18
17
|
};
|
|
18
|
+
//# sourceMappingURL=challenge_password_attribute.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"challenge_password_attribute.js","sourceRoot":"","sources":["../../../../src/components/certificate-details-parts/attributes/challenge_password_attribute.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,CAAC,EAAuB,MAAM,eAAe,CAAC;AAIvD,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAClC,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAMnD,MAAM,CAAC,MAAM,0BAA0B,GACiB,CAAC,KAAK,EAAE,EAAE;EAChE,MAAM,EAAE,SAAS,EAAE,GAAG,KAAK,CAAC;EAE5B,OAAO,CACL,EAAC,cAAc,IACb,SAAS,EAAE,SAAS;IAEpB,EAAC,QAAQ,IACP,IAAI,EAAC,OAAO,EACZ,KAAK,EAAE,SAAS,CAAC,KAAK,CAAC,QAAQ,EAAE,GACjC,CACa,CAClB,CAAC;AACJ,CAAC,CAAC","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';\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"]}
|
|
@@ -8,21 +8,21 @@
|
|
|
8
8
|
* This source code is licensed under the MIT license found in the
|
|
9
9
|
* LICENSE file in the root directory of this source tree.
|
|
10
10
|
*/
|
|
11
|
-
import { h } from
|
|
12
|
-
import { Name } from
|
|
13
|
-
import { TypeRelationship, ActivityDescription, WebGDPR, InsuranceValue, ValuationRanking, } from
|
|
14
|
-
import { UnstructuredName, ChallengePassword, } from
|
|
15
|
-
import { RowTitle } from
|
|
16
|
-
import { NameAttribute } from
|
|
17
|
-
import { ActivityDescriptionAttribute } from
|
|
18
|
-
import { WebGdprAttribute } from
|
|
19
|
-
import { InsuranceValueAttribute } from
|
|
20
|
-
import { TypeRelationshipAttribute } from
|
|
21
|
-
import { ValuationRankingAttribute } from
|
|
22
|
-
import { BasicAttribute } from
|
|
23
|
-
import { AsStringAttribute } from
|
|
24
|
-
import { UnstructuredNameAttribute } from
|
|
25
|
-
import { ChallengePasswordAttribute } from
|
|
11
|
+
import { h } from "@stencil/core";
|
|
12
|
+
import { Name } from "@peculiar/asn1-x509";
|
|
13
|
+
import { TypeRelationship, ActivityDescription, WebGDPR, InsuranceValue, ValuationRanking, } from "@peculiar/asn1-ntqwac";
|
|
14
|
+
import { UnstructuredName, ChallengePassword, } from "@peculiar/asn1-pkcs9";
|
|
15
|
+
import { RowTitle } from "../row";
|
|
16
|
+
import { NameAttribute } from "./name_attribute";
|
|
17
|
+
import { ActivityDescriptionAttribute } from "./activity_description_attribute";
|
|
18
|
+
import { WebGdprAttribute } from "./web_gdpr_attribute";
|
|
19
|
+
import { InsuranceValueAttribute } from "./insurance_value_attribute";
|
|
20
|
+
import { TypeRelationshipAttribute } from "./type_relationship_attribute";
|
|
21
|
+
import { ValuationRankingAttribute } from "./valuation_ranking_attribute";
|
|
22
|
+
import { BasicAttribute } from "./basic_attribute";
|
|
23
|
+
import { AsStringAttribute } from "./as_string_attribute";
|
|
24
|
+
import { UnstructuredNameAttribute } from "./unstructured_name_attribute";
|
|
25
|
+
import { ChallengePasswordAttribute } from "./challenge_password_attribute";
|
|
26
26
|
export const Attributes = (props) => {
|
|
27
27
|
const { attributes } = props;
|
|
28
28
|
if (!attributes || !attributes.length) {
|
|
@@ -68,3 +68,4 @@ export const Attributes = (props) => {
|
|
|
68
68
|
}),
|
|
69
69
|
]);
|
|
70
70
|
};
|
|
71
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/certificate-details-parts/attributes/index.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,CAAC,EAAuB,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAC3C,OAAO,EACL,gBAAgB,EAChB,mBAAmB,EACnB,OAAO,EACP,cAAc,EACd,gBAAgB,GACjB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,gBAAgB,EAChB,iBAAiB,GAClB,MAAM,sBAAsB,CAAC;AAG9B,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAClC,OAAO,EAAE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,SAAS,CAAC,KAAK,YAAY,cAAc,EAAE;UAC7C,OAAO,CACL,EAAC,uBAAuB,IACtB,SAAS,EAAE,SAAgB,GAC3B,CACH,CAAC;SACH;QAED,IAAI,SAAS,CAAC,KAAK,YAAY,gBAAgB,EAAE;UAC/C,OAAO,CACL,EAAC,yBAAyB,IACxB,SAAS,EAAE,SAAgB,GAC3B,CACH,CAAC;SACH;QAED,IAAI,SAAS,CAAC,KAAK,YAAY,gBAAgB,EAAE;UAC/C,OAAO,CACL,EAAC,yBAAyB,IACxB,SAAS,EAAE,SAAgB,GAC3B,CACH,CAAC;SACH;QAED,IAAI,SAAS,CAAC,KAAK,YAAY,gBAAgB,EAAE;UAC/C,OAAO,CACL,EAAC,yBAAyB,IACxB,SAAS,EAAE,SAAgB,GAC3B,CACH,CAAC;SACH;QAED,IAAI,SAAS,CAAC,KAAK,YAAY,iBAAiB,EAAE;UAChD,OAAO,CACL,EAAC,0BAA0B,IACzB,SAAS,EAAE,SAAgB,GAC3B,CACH,CAAC;SACH;QAED,IAAI,OAAO,SAAS,CAAC,KAAK,KAAK,QAAQ,EAAE;UACvC,OAAO,CACL,EAAC,iBAAiB,IAChB,SAAS,EAAE,SAAgB,GAC3B,CACH,CAAC;SACH;QAED,OAAO,CACL,EAAC,cAAc,IACb,SAAS,EAAE,SAAS,GACpB,CACH,CAAC;OACH;MAAC,OAAO,KAAK,EAAE;QACd,OAAO,CAAC,KAAK,CAAC,yBAAyB,EAAE,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QAE7D,OAAO,IAAI,CAAC;OACb;IACH,CAAC,CAAC;GACH,CAAC,CAAC;AACL,CAAC,CAAC","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';\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"]}
|
package/dist/collection/components/certificate-details-parts/attributes/insurance_value_attribute.js
CHANGED
|
@@ -8,12 +8,12 @@
|
|
|
8
8
|
* This source code is licensed under the MIT license found in the
|
|
9
9
|
* LICENSE file in the root directory of this source tree.
|
|
10
10
|
*/
|
|
11
|
-
import { h } from
|
|
12
|
-
import { RowValue } from
|
|
13
|
-
import { BasicAttribute } from
|
|
11
|
+
import { h } from "@stencil/core";
|
|
12
|
+
import { RowValue } from "../row";
|
|
13
|
+
import { BasicAttribute } from "./basic_attribute";
|
|
14
14
|
export const InsuranceValueAttribute = (props) => {
|
|
15
15
|
const { attribute } = props;
|
|
16
16
|
const value = `${attribute.value.base} * 10^${attribute.value.degree} ${attribute.value.location}`;
|
|
17
|
-
return (h(BasicAttribute, { attribute: attribute },
|
|
18
|
-
h(RowValue, { name: "Value", value: value })));
|
|
17
|
+
return (h(BasicAttribute, { attribute: attribute }, h(RowValue, { name: "Value", value: value })));
|
|
19
18
|
};
|
|
19
|
+
//# sourceMappingURL=insurance_value_attribute.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"insurance_value_attribute.js","sourceRoot":"","sources":["../../../../src/components/certificate-details-parts/attributes/insurance_value_attribute.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,CAAC,EAAuB,MAAM,eAAe,CAAC;AAIvD,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAClC,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAMnD,MAAM,CAAC,MAAM,uBAAuB,GACiB,CAAC,KAAK,EAAE,EAAE;EAC7D,MAAM,EAAE,SAAS,EAAE,GAAG,KAAK,CAAC;EAC5B,MAAM,KAAK,GAAG,GAAG,SAAS,CAAC,KAAK,CAAC,IAAI,SAAS,SAAS,CAAC,KAAK,CAAC,MAAM,IAAI,SAAS,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC;EAEnG,OAAO,CACL,EAAC,cAAc,IACb,SAAS,EAAE,SAAS;IAEpB,EAAC,QAAQ,IACP,IAAI,EAAC,OAAO,EACZ,KAAK,EAAE,KAAK,GACZ,CACa,CAClB,CAAC;AACJ,CAAC,CAAC","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';\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"]}
|
|
@@ -8,11 +8,11 @@
|
|
|
8
8
|
* This source code is licensed under the MIT license found in the
|
|
9
9
|
* LICENSE file in the root directory of this source tree.
|
|
10
10
|
*/
|
|
11
|
-
import { h } from
|
|
12
|
-
import { BasicAttribute } from
|
|
13
|
-
import { NamePart } from
|
|
11
|
+
import { h } from "@stencil/core";
|
|
12
|
+
import { BasicAttribute } from "./basic_attribute";
|
|
13
|
+
import { NamePart } from "./name_part";
|
|
14
14
|
export const NameAttribute = (props) => {
|
|
15
15
|
const { attribute } = props;
|
|
16
|
-
return (h(BasicAttribute, { attribute: attribute },
|
|
17
|
-
h(NamePart, { name: attribute.value })));
|
|
16
|
+
return (h(BasicAttribute, { attribute: attribute }, h(NamePart, { name: attribute.value })));
|
|
18
17
|
};
|
|
18
|
+
//# sourceMappingURL=name_attribute.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"name_attribute.js","sourceRoot":"","sources":["../../../../src/components/certificate-details-parts/attributes/name_attribute.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,CAAC,EAAuB,MAAM,eAAe,CAAC;AAIvD,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAMvC,MAAM,CAAC,MAAM,aAAa,GACiB,CAAC,KAAK,EAAE,EAAE;EACnD,MAAM,EAAE,SAAS,EAAE,GAAG,KAAK,CAAC;EAE5B,OAAO,CACL,EAAC,cAAc,IACb,SAAS,EAAE,SAAS;IAEpB,EAAC,QAAQ,IACP,IAAI,EAAE,SAAS,CAAC,KAAK,GACrB,CACa,CAClB,CAAC;AACJ,CAAC,CAAC","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';\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"]}
|
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
* This source code is licensed under the MIT license found in the
|
|
9
9
|
* LICENSE file in the root directory of this source tree.
|
|
10
10
|
*/
|
|
11
|
-
import { h } from
|
|
12
|
-
import { OIDs } from
|
|
13
|
-
import { RowValue } from
|
|
11
|
+
import { h } from "@stencil/core";
|
|
12
|
+
import { OIDs } from "../../../constants/oids";
|
|
13
|
+
import { RowValue } from "../row";
|
|
14
14
|
export const NamePart = (props) => {
|
|
15
15
|
const { name } = props;
|
|
16
16
|
if (!name) {
|
|
@@ -18,3 +18,4 @@ export const NamePart = (props) => {
|
|
|
18
18
|
}
|
|
19
19
|
return name.map((relativeDistinguishedName) => (relativeDistinguishedName.map((attributeTypeAndValue) => (h(RowValue, { name: OIDs[attributeTypeAndValue.type] || attributeTypeAndValue.type, value: attributeTypeAndValue.value.toString() })))));
|
|
20
20
|
};
|
|
21
|
+
//# sourceMappingURL=name_part.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"name_part.js","sourceRoot":"","sources":["../../../../src/components/certificate-details-parts/attributes/name_part.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,CAAC,EAAuB,MAAM,eAAe,CAAC;AAGvD,OAAO,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAMlC,MAAM,CAAC,MAAM,QAAQ,GAAwC,CAAC,KAAK,EAAS,EAAE;EAC5E,MAAM,EAAE,IAAI,EAAE,GAAG,KAAK,CAAC;EAEvB,IAAI,CAAC,IAAI,EAAE;IACT,OAAO,IAAI,CAAC;GACb;EAED,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,yBAAyB,EAAE,EAAE,CAAC,CAC7C,yBAAyB,CAAC,GAAG,CAAC,CAAC,qBAAqB,EAAE,EAAE,CAAC,CACvD,EAAC,QAAQ,IACP,IAAI,EAAE,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,IAAI,qBAAqB,CAAC,IAAI,EACpE,KAAK,EAAE,qBAAqB,CAAC,KAAK,CAAC,QAAQ,EAAE,GAC7C,CACH,CAAC,CACH,CAAC,CAAC;AACL,CAAC,CAAC","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';\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"]}
|
|
@@ -8,11 +8,12 @@
|
|
|
8
8
|
* This source code is licensed under the MIT license found in the
|
|
9
9
|
* LICENSE file in the root directory of this source tree.
|
|
10
10
|
*/
|
|
11
|
-
import { h } from
|
|
12
|
-
import { l10n } from
|
|
13
|
-
import { RowValue } from
|
|
14
|
-
import { BasicAttribute } from
|
|
11
|
+
import { h } from "@stencil/core";
|
|
12
|
+
import { l10n } from "../../../utils";
|
|
13
|
+
import { RowValue } from "../row";
|
|
14
|
+
import { BasicAttribute } from "./basic_attribute";
|
|
15
15
|
export const TypeRelationshipAttribute = (props) => {
|
|
16
16
|
const { attribute } = props;
|
|
17
17
|
return (h(BasicAttribute, { attribute: attribute }, Object.keys(attribute.value).map((keyName) => (h(RowValue, { name: keyName, value: attribute.value[keyName].toNumber() ? l10n.getString('yes') : l10n.getString('no') })))));
|
|
18
18
|
};
|
|
19
|
+
//# sourceMappingURL=type_relationship_attribute.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"type_relationship_attribute.js","sourceRoot":"","sources":["../../../../src/components/certificate-details-parts/attributes/type_relationship_attribute.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,CAAC,EAAuB,MAAM,eAAe,CAAC;AAIvD,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AACtC,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAClC,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAMnD,MAAM,CAAC,MAAM,yBAAyB,GACiB,CAAC,KAAK,EAAE,EAAE;EAC/D,MAAM,EAAE,SAAS,EAAE,GAAG,KAAK,CAAC;EAE5B,OAAO,CACL,EAAC,cAAc,IACb,SAAS,EAAE,SAAS,IAEnB,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAC7C,EAAC,QAAQ,IACP,IAAI,EAAE,OAAO,EACb,KAAK,EAAE,SAAS,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,GACzF,CACH,CAAC,CACa,CAClB,CAAC;AACJ,CAAC,CAAC","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';\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"]}
|
|
@@ -8,11 +8,11 @@
|
|
|
8
8
|
* This source code is licensed under the MIT license found in the
|
|
9
9
|
* LICENSE file in the root directory of this source tree.
|
|
10
10
|
*/
|
|
11
|
-
import { h } from
|
|
12
|
-
import { RowValue } from
|
|
13
|
-
import { BasicAttribute } from
|
|
11
|
+
import { h } from "@stencil/core";
|
|
12
|
+
import { RowValue } from "../row";
|
|
13
|
+
import { BasicAttribute } from "./basic_attribute";
|
|
14
14
|
export const UnstructuredNameAttribute = (props) => {
|
|
15
15
|
const { attribute } = props;
|
|
16
|
-
return (h(BasicAttribute, { attribute: attribute },
|
|
17
|
-
h(RowValue, { name: "Value", value: attribute.value.utf8String })));
|
|
16
|
+
return (h(BasicAttribute, { attribute: attribute }, h(RowValue, { name: "Value", value: attribute.value.utf8String })));
|
|
18
17
|
};
|
|
18
|
+
//# sourceMappingURL=unstructured_name_attribute.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unstructured_name_attribute.js","sourceRoot":"","sources":["../../../../src/components/certificate-details-parts/attributes/unstructured_name_attribute.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,CAAC,EAAuB,MAAM,eAAe,CAAC;AAIvD,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAClC,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAMnD,MAAM,CAAC,MAAM,yBAAyB,GACiB,CAAC,KAAK,EAAE,EAAE;EAC/D,MAAM,EAAE,SAAS,EAAE,GAAG,KAAK,CAAC;EAE5B,OAAO,CACL,EAAC,cAAc,IACb,SAAS,EAAE,SAAS;IAEpB,EAAC,QAAQ,IACP,IAAI,EAAC,OAAO,EACZ,KAAK,EAAE,SAAS,CAAC,KAAK,CAAC,UAAU,GACjC,CACa,CAClB,CAAC;AACJ,CAAC,CAAC","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';\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"]}
|
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
* This source code is licensed under the MIT license found in the
|
|
9
9
|
* LICENSE file in the root directory of this source tree.
|
|
10
10
|
*/
|
|
11
|
-
import { h } from
|
|
12
|
-
import { RowValue } from
|
|
13
|
-
import { BasicAttribute } from
|
|
11
|
+
import { h } from "@stencil/core";
|
|
12
|
+
import { RowValue } from "../row";
|
|
13
|
+
import { BasicAttribute } from "./basic_attribute";
|
|
14
14
|
const getValueRank = (value) => {
|
|
15
15
|
let ratio = 1;
|
|
16
16
|
if (value / 100 > 1) {
|
|
@@ -27,6 +27,6 @@ export const ValuationRankingAttribute = (props) => {
|
|
|
27
27
|
getValueRank(attribute.value[keyName]),
|
|
28
28
|
h("br", null),
|
|
29
29
|
]));
|
|
30
|
-
return (h(BasicAttribute, { attribute: attribute },
|
|
31
|
-
h(RowValue, { name: "Value", value: values })));
|
|
30
|
+
return (h(BasicAttribute, { attribute: attribute }, h(RowValue, { name: "Value", value: values })));
|
|
32
31
|
};
|
|
32
|
+
//# sourceMappingURL=valuation_ranking_attribute.js.map
|