@peculiar/certificates-viewer 3.10.1 → 4.0.1
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/README.md +40 -64
- 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-26981468.system.entry.js +5 -0
- package/dist/peculiar/p-26981468.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-43eb3721.js +33 -0
- package/dist/peculiar/p-43eb3721.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-74c241e7.js +97 -0
- package/dist/peculiar/p-74c241e7.js.map +1 -0
- package/dist/peculiar/p-7ed7cd97.system.entry.js +111 -0
- package/dist/peculiar/p-7ed7cd97.system.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/p-f3d85a5f.entry.js +110 -0
- package/dist/peculiar/p-f3d85a5f.entry.js.map +1 -0
- package/dist/peculiar/p-fd4b9a50.entry.js +5 -0
- package/dist/peculiar/p-fd4b9a50.entry.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 -1486
- 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 -1455
- 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
|
@@ -0,0 +1,382 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
|
|
3
|
+
*/
|
|
4
|
+
import { h, proxyCustomElement, HTMLElement, createEvent, Build, Host } from '@stencil/core/internal/client';
|
|
5
|
+
import { X as X509Certificate, d as defineCustomElement$4 } from './certificate-viewer.js';
|
|
6
|
+
import { l as l10n, ae as dateShort, ak as DownloadIcon, Q as OIDs } from './miscellaneous.js';
|
|
7
|
+
import './download.js';
|
|
8
|
+
import { T as Typography, B as Button } from './button.js';
|
|
9
|
+
import { A as ArrowTopIcon, a as ArrowBottomIcon } from './arrow_top.js';
|
|
10
|
+
import { d as defineCustomElement$5 } from './button-menu.js';
|
|
11
|
+
import { d as defineCustomElement$3 } from './circular-progress.js';
|
|
12
|
+
import { d as defineCustomElement$2 } from './highlight-words.js';
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* @license
|
|
16
|
+
* Copyright (c) Peculiar Ventures, LLC.
|
|
17
|
+
*
|
|
18
|
+
* This source code is licensed under the MIT license found in the
|
|
19
|
+
* LICENSE file in the root directory of this source tree.
|
|
20
|
+
*/
|
|
21
|
+
const DetailsIcon = (props) => {
|
|
22
|
+
const { color = 'secondary' } = props;
|
|
23
|
+
return (h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "30", height: "31", fill: "none" },
|
|
24
|
+
h("path", { fill: `var(--pv-color-${color})`, d: "M6.71 19.79a1 1 0 0 0-.33-.21 1 1 0 0 0-.76 0 1 1 0 0 0-.33.21 1 1 0 0 0-.21.33 1 1 0 0 0 .21 1.09c.097.088.209.16.33.21a.94.94 0 0 0 .76 0 1.15 1.15 0 0 0 .33-.21 1 1 0 0 0 .21-1.09 1 1 0 0 0-.21-.33ZM10 11.5h14a1 1 0 0 0 0-2H10a1 1 0 0 0 0 2Zm-3.29 3.29a1 1 0 0 0-1.09-.21 1.15 1.15 0 0 0-.33.21 1 1 0 0 0-.21.33.94.94 0 0 0 0 .76c.05.121.122.233.21.33.097.088.209.16.33.21a.94.94 0 0 0 .76 0 1.15 1.15 0 0 0 .33-.21 1.15 1.15 0 0 0 .21-.33.94.94 0 0 0 0-.76 1 1 0 0 0-.21-.33ZM24 14.5H10a1 1 0 0 0 0 2h14a1 1 0 0 0 0-2ZM6.71 9.79a1 1 0 0 0-.33-.21 1 1 0 0 0-1.09.21 1.15 1.15 0 0 0-.21.33.94.94 0 0 0 0 .76c.05.121.122.233.21.33.097.088.209.16.33.21a1 1 0 0 0 1.09-.21 1.15 1.15 0 0 0 .21-.33.94.94 0 0 0 0-.76 1.15 1.15 0 0 0-.21-.33ZM24 19.5H10a1 1 0 0 0 0 2h14a1 1 0 0 0 0-2Z" })));
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* @license
|
|
29
|
+
* Copyright (c) Peculiar Ventures, LLC.
|
|
30
|
+
*
|
|
31
|
+
* This source code is licensed under the MIT license found in the
|
|
32
|
+
* LICENSE file in the root directory of this source tree.
|
|
33
|
+
*/
|
|
34
|
+
const LinkIcon = (props) => {
|
|
35
|
+
const { color = 'secondary' } = props;
|
|
36
|
+
return (h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "30", height: "31", fill: "none" },
|
|
37
|
+
h("path", { fill: `var(--pv-color-${color})`, d: "M21 14.32a1 1 0 0 0-1 1v7.18a1 1 0 0 1-1 1H8a1 1 0 0 1-1-1v-11a1 1 0 0 1 1-1h7.18a1 1 0 0 0 0-2H8a3 3 0 0 0-3 3v11a3 3 0 0 0 3 3h11a3 3 0 0 0 3-3v-7.18a1 1 0 0 0-1-1Zm3.92-8.2a1 1 0 0 0-.54-.54A1 1 0 0 0 24 5.5h-6a1 1 0 1 0 0 2h3.59l-10.3 10.29a1.002 1.002 0 0 0 .325 1.639 1 1 0 0 0 1.095-.219L23 8.91v3.59a1 1 0 0 0 2 0v-6a1.001 1.001 0 0 0-.08-.38Z" })));
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* @license
|
|
42
|
+
* Copyright (c) Peculiar Ventures, LLC.
|
|
43
|
+
*
|
|
44
|
+
* This source code is licensed under the MIT license found in the
|
|
45
|
+
* LICENSE file in the root directory of this source tree.
|
|
46
|
+
*/
|
|
47
|
+
const CrossIcon = (props) => {
|
|
48
|
+
const { color = 'gray-9' } = props;
|
|
49
|
+
return (h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "30", height: "30", fill: "none" },
|
|
50
|
+
h("path", { fill: `var(--pv-color-${color})`, "fill-rule": "evenodd", d: "m16.37 15 5.442 5.44c.25.252.25.663 0 .914l-.459.457a.646.646 0 0 1-.913 0L15 16.371l-5.44 5.44a.648.648 0 0 1-.915 0l-.457-.457a.649.649 0 0 1 0-.913L13.63 15 8.188 9.56a.649.649 0 0 1 0-.914l.457-.457a.648.648 0 0 1 .915 0l5.44 5.44 5.44-5.44a.646.646 0 0 1 .913 0l.46.457c.25.25.25.662 0 .913L16.37 15Z", "clip-rule": "evenodd" })));
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* @license
|
|
55
|
+
* Copyright (c) Peculiar Ventures, LLC.
|
|
56
|
+
*
|
|
57
|
+
* This source code is licensed under the MIT license found in the
|
|
58
|
+
* LICENSE file in the root directory of this source tree.
|
|
59
|
+
*/
|
|
60
|
+
const CertificateSummary = (props) => {
|
|
61
|
+
const { certificate, showIssuer, } = props;
|
|
62
|
+
const renderRow = (name, value) => (h("tr", null,
|
|
63
|
+
h("td", null,
|
|
64
|
+
h(Typography, { variant: "b2", color: "gray-9" }, name)),
|
|
65
|
+
h("td", null,
|
|
66
|
+
h(Typography, { variant: "b2", color: "black" }, value))));
|
|
67
|
+
return (h("table", null,
|
|
68
|
+
h("tbody", null,
|
|
69
|
+
renderRow(l10n.getString('subjectName'), certificate.subjectToString()),
|
|
70
|
+
showIssuer && renderRow(l10n.getString('issuerName'), certificate.issuerToString()),
|
|
71
|
+
renderRow(l10n.getString('serialNumber'), certificate.serialNumber),
|
|
72
|
+
renderRow(l10n.getString('version'), certificate.version),
|
|
73
|
+
renderRow(l10n.getString('validity'), certificate.validity),
|
|
74
|
+
renderRow(l10n.getString('issued'), dateShort(certificate.notBefore)),
|
|
75
|
+
renderRow(l10n.getString('expired'), dateShort(certificate.notAfter)))));
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
const certificatesViewerCss = "*{-webkit-box-sizing:border-box;box-sizing:border-box;margin:0;padding:0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-moz-text-size-adjust:none;-ms-text-size-adjust:none;text-size-adjust:none;-webkit-text-size-adjust:none;-webkit-tap-highlight-color:transparent;font-family:var(--pv-font-family, inherit)}.t-h1{font-weight:var(--pv-text-h1-weight);font-size:var(--pv-text-h1-size);line-height:var(--pv-text-h1-height);letter-spacing:var(--pv-text-h1-spacing)}.t-h2{font-weight:var(--pv-text-h2-weight);font-size:var(--pv-text-h2-size);line-height:var(--pv-text-h2-height);letter-spacing:var(--pv-text-h2-spacing)}.t-h3{font-weight:var(--pv-text-h3-weight);font-size:var(--pv-text-h3-size);line-height:var(--pv-text-h3-height);letter-spacing:var(--pv-text-h3-spacing)}.t-h4{font-weight:var(--pv-text-h4-weight);font-size:var(--pv-text-h4-size);line-height:var(--pv-text-h4-height);letter-spacing:var(--pv-text-h4-spacing)}.t-h5{font-weight:var(--pv-text-h5-weight);font-size:var(--pv-text-h5-size);line-height:var(--pv-text-h5-height);letter-spacing:var(--pv-text-h5-spacing)}.t-s1{font-weight:var(--pv-text-s1-weight);font-size:var(--pv-text-s1-size);line-height:var(--pv-text-s1-height);letter-spacing:var(--pv-text-s1-spacing)}.t-s2{font-weight:var(--pv-text-s2-weight);font-size:var(--pv-text-s2-size);line-height:var(--pv-text-s2-height);letter-spacing:var(--pv-text-s2-spacing)}.t-b1{font-weight:var(--pv-text-b1-weight);font-size:var(--pv-text-b1-size);line-height:var(--pv-text-b1-height);letter-spacing:var(--pv-text-b1-spacing)}.t-b2{font-weight:var(--pv-text-b2-weight);font-size:var(--pv-text-b2-size);line-height:var(--pv-text-b2-height);letter-spacing:var(--pv-text-b2-spacing)}.t-b3{font-weight:var(--pv-text-b3-weight);font-size:var(--pv-text-b3-size);line-height:var(--pv-text-b3-height);letter-spacing:var(--pv-text-b3-spacing)}.t-btn1{font-weight:var(--pv-text-btn1-weight);font-size:var(--pv-text-btn1-size);line-height:var(--pv-text-btn1-height);letter-spacing:var(--pv-text-btn1-spacing)}.t-btn2{font-weight:var(--pv-text-btn2-weight);font-size:var(--pv-text-btn2-size);line-height:var(--pv-text-btn2-height);letter-spacing:var(--pv-text-btn2-spacing)}.t-c1{font-weight:var(--pv-text-c1-weight);font-size:var(--pv-text-c1-size);line-height:var(--pv-text-c1-height);letter-spacing:var(--pv-text-c1-spacing)}.t-c2{font-weight:var(--pv-text-c2-weight);font-size:var(--pv-text-c2-size);line-height:var(--pv-text-c2-height);letter-spacing:var(--pv-text-c2-spacing)}.c-primary-tint-5{--pv-color-base:var(--pv-color-primary-tint-5)}.c-primary-tint-4{--pv-color-base:var(--pv-color-primary-tint-4)}.c-primary-tint-3{--pv-color-base:var(--pv-color-primary-tint-3)}.c-primary-tint-2{--pv-color-base:var(--pv-color-primary-tint-2)}.c-primary-tint-1{--pv-color-base:var(--pv-color-primary-tint-1)}.c-primary{--pv-color-base:var(--pv-color-primary)}.c-primary-shade-1{--pv-color-base:var(--pv-color-primary-shade-1)}.c-primary-shade-2{--pv-color-base:var(--pv-color-primary-shade-2)}.c-primary-shade-3{--pv-color-base:var(--pv-color-primary-shade-3)}.c-primary-shade-4{--pv-color-base:var(--pv-color-primary-shade-4)}.c-primary-shade-5{--pv-color-base:var(--pv-color-primary-shade-5)}.c-primary-contrast{--pv-color-base:var(--pv-color-primary-contrast)}.c-secondary-tint-5{--pv-color-base:var(--pv-color-secondary-tint-5)}.c-secondary-tint-4{--pv-color-base:var(--pv-color-secondary-tint-4)}.c-secondary-tint-3{--pv-color-base:var(--pv-color-secondary-tint-3)}.c-secondary-tint-2{--pv-color-base:var(--pv-color-secondary-tint-2)}.c-secondary-tint-1{--pv-color-base:var(--pv-color-secondary-tint-1)}.c-secondary{--pv-color-base:var(--pv-color-secondary)}.c-secondary-shade-1{--pv-color-base:var(--pv-color-secondary-shade-1)}.c-secondary-shade-2{--pv-color-base:var(--pv-color-secondary-shade-2)}.c-secondary-shade-3{--pv-color-base:var(--pv-color-secondary-shade-3)}.c-secondary-shade-4{--pv-color-base:var(--pv-color-secondary-shade-4)}.c-secondary-shade-5{--pv-color-base:var(--pv-color-secondary-shade-5)}.c-secondary-contrast{--pv-color-base:var(--pv-color-secondary-contrast)}.c-wrong-tint-5{--pv-color-base:var(--pv-color-wrong-tint-5)}.c-wrong-tint-4{--pv-color-base:var(--pv-color-wrong-tint-4)}.c-wrong-tint-3{--pv-color-base:var(--pv-color-wrong-tint-3)}.c-wrong-tint-2{--pv-color-base:var(--pv-color-wrong-tint-2)}.c-wrong-tint-1{--pv-color-base:var(--pv-color-wrong-tint-1)}.c-wrong{--pv-color-base:var(--pv-color-wrong)}.c-wrong-shade-1{--pv-color-base:var(--pv-color-wrong-shade-1)}.c-wrong-shade-2{--pv-color-base:var(--pv-color-wrong-shade-2)}.c-wrong-shade-3{--pv-color-base:var(--pv-color-wrong-shade-3)}.c-wrong-shade-4{--pv-color-base:var(--pv-color-wrong-shade-4)}.c-wrong-shade-5{--pv-color-base:var(--pv-color-wrong-shade-5)}.c-wrong-contrast{--pv-color-base:var(--pv-color-wrong-contrast)}.c-attention-tint-5{--pv-color-base:var(--pv-color-attention-tint-5)}.c-attention-tint-4{--pv-color-base:var(--pv-color-attention-tint-4)}.c-attention-tint-3{--pv-color-base:var(--pv-color-attention-tint-3)}.c-attention-tint-2{--pv-color-base:var(--pv-color-attention-tint-2)}.c-attention-tint-1{--pv-color-base:var(--pv-color-attention-tint-1)}.c-attention{--pv-color-base:var(--pv-color-attention)}.c-attention-shade-1{--pv-color-base:var(--pv-color-attention-shade-1)}.c-attention-shade-2{--pv-color-base:var(--pv-color-attention-shade-2)}.c-attention-shade-3{--pv-color-base:var(--pv-color-attention-shade-3)}.c-attention-shade-4{--pv-color-base:var(--pv-color-attention-shade-4)}.c-attention-shade-5{--pv-color-base:var(--pv-color-attention-shade-5)}.c-success-tint-5{--pv-color-base:var(--pv-color-success-tint-5)}.c-success-tint-4{--pv-color-base:var(--pv-color-success-tint-4)}.c-success-tint-3{--pv-color-base:var(--pv-color-success-tint-3)}.c-success-tint-2{--pv-color-base:var(--pv-color-success-tint-2)}.c-success-tint-1{--pv-color-base:var(--pv-color-success-tint-1)}.c-success{--pv-color-base:var(--pv-color-success)}.c-success-shade-1{--pv-color-base:var(--pv-color-success-shade-1)}.c-success-shade-2{--pv-color-base:var(--pv-color-success-shade-2)}.c-success-shade-3{--pv-color-base:var(--pv-color-success-shade-3)}.c-success-shade-4{--pv-color-base:var(--pv-color-success-shade-4)}.c-success-shade-5{--pv-color-base:var(--pv-color-success-shade-5)}.c-black{--pv-color-base:var(--pv-color-black)}.c-gray-10{--pv-color-base:var(--pv-color-gray-10)}.c-gray-9{--pv-color-base:var(--pv-color-gray-9)}.c-gray-8{--pv-color-base:var(--pv-color-gray-8)}.c-gray-7{--pv-color-base:var(--pv-color-gray-7)}.c-gray-6{--pv-color-base:var(--pv-color-gray-6)}.c-gray-5{--pv-color-base:var(--pv-color-gray-5)}.c-gray-4{--pv-color-base:var(--pv-color-gray-4)}.c-gray-3{--pv-color-base:var(--pv-color-gray-3)}.c-gray-2{--pv-color-base:var(--pv-color-gray-2)}.c-gray-1{--pv-color-base:var(--pv-color-gray-1)}.c-white{--pv-color-base:var(--pv-color-white)}.c-extra-1{--pv-color-base:var(--pv-color-extra-1)}.c-extra-2{--pv-color-base:var(--pv-color-extra-2)}.typography{color:var(--pv-color-base)}.button{display:-ms-inline-flexbox;display:inline-flex;cursor:pointer;background:transparent;border:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:nowrap;text-decoration:none;outline:none;font-family:inherit;border-radius:4px;height:var(--pv-size-base-6);min-width:var(--pv-size-base-6);padding:0 var(--pv-size-base-2);-webkit-transition:background-color 200ms ease 0s;transition:background-color 200ms ease 0s;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;gap:var(--pv-size-base-2);font-size:0}.button.m_no_padding{padding:0}.button:hover{background-color:var(--pv-color-gray-3)}.button:focus{background-color:var(--pv-color-gray-4)}.button:active{background-color:var(--pv-color-gray-5)}:host{display:block;width:100%;word-wrap:break-word;min-width:280px;overflow:auto;position:relative}.search_section{padding:var(--pv-size-base-4);border-bottom:1px solid var(--pv-color-gray-4)}.input_search{height:var(--pv-size-base-8);width:100%;outline:none;background-color:var(--pv-color-gray-1);padding:0 var(--pv-size-base-2);border:1px solid var(--pv-color-gray-7);border-radius:4px;-webkit-transition:background-color 200ms ease 0s, color 200ms ease 0s, border-color 200ms ease 0s;transition:background-color 200ms ease 0s, color 200ms ease 0s, border-color 200ms ease 0s}.input_search::-webkit-input-placeholder{color:var(--pv-color-gray-9)}.input_search::-moz-placeholder{color:var(--pv-color-gray-9)}.input_search:-ms-input-placeholder{color:var(--pv-color-gray-9)}.input_search::-ms-input-placeholder{color:var(--pv-color-gray-9)}.input_search::placeholder{color:var(--pv-color-gray-9)}table{width:100%;table-layout:fixed;border-collapse:collapse;border-spacing:0}table td,table th{border-bottom:1px solid var(--pv-color-gray-4);vertical-align:top;text-align:left}table td:first-child,table th:first-child{padding-right:0;width:var(--pv-size-base-10)}table td:last-child,table th:last-child{padding-left:0;width:var(--pv-size-base-10)}table th{padding:var(--pv-size-base-2) var(--pv-size-base-4)}table th.col_action{padding:0}table td{padding:var(--pv-size-base-4)}table tr.m_expanded{background:var(--pv-color-gray-1)}table tr.m_expanded>td{border-bottom:none}table tr.expanded_summary{background:var(--pv-color-gray-1)}table tr.expanded_summary table{table-layout:initial}table tr.expanded_summary table td{border-bottom:none;padding:var(--pv-size-base-2)}table tr.expanded_summary table td:first-child{width:200px}table tr.expanded_summary table td:last-child{width:auto}.button_table_cell{margin-top:-3px}.status_wrapper{text-align:center;height:var(--pv-size-base-16);vertical-align:middle}.modal_wrapper{position:fixed;top:0;left:0;width:100%;height:100%;z-index:1;-webkit-animation:fadeIn 200ms;animation:fadeIn 200ms;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.modal_backdrop{background:var(--pv-color-black);z-index:-1;position:fixed;top:0;right:0;bottom:0;left:0;opacity:0.5}.modal_container{background:var(--pv-color-white);width:100%;display:-ms-flexbox;display:flex;max-height:calc(100% - 60px);-ms-flex-direction:column;flex-direction:column;margin:var(--pv-size-base-6);position:relative;outline:none;-webkit-box-shadow:var(--pv-shadow-dark-hight);box-shadow:var(--pv-shadow-dark-hight);overflow:hidden;border:0px;padding:0px;max-width:640px;border-radius:4px}.modal_header{padding:var(--pv-size-base-3) var(--pv-size-base-4);display:-ms-flexbox;display:flex;-ms-flex:0 0 auto;flex:0 0 auto;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;gap:var(--pv-size-base-2);border-bottom:1px solid var(--pv-color-gray-5)}.modal_content{-ms-flex:1 1 auto;flex:1 1 auto;overflow:auto}:host([data-mobile-screen-view=true]) table,:host([data-mobile-screen-view=true]) tbody,:host([data-mobile-screen-view=true]) tr,:host([data-mobile-screen-view=true]) td{display:block;width:100% !important;padding:0;border:none}:host([data-mobile-screen-view=true]) thead{display:none}:host([data-mobile-screen-view=true]) table tr{padding:var(--pv-size-base-2) 0}:host([data-mobile-screen-view=true]) table .expanded_summary{padding:0}:host([data-mobile-screen-view=true]) table .certificate_row{border-bottom:1px solid var(--pv-color-gray-5);padding:var(--pv-size-base-2) var(--pv-size-base-4)}:host([data-mobile-screen-view=true]) table .certificate_row_actions{padding-top:var(--pv-size-base-6)}:host([data-mobile-screen-view=true]) table .certificate_row_actions td{display:-ms-flexbox;display:flex;-ms-flex-pack:right;justify-content:right;gap:var(--pv-size-base-4)}:host([data-mobile-screen-view=true]) .button_table_cell{margin-top:0}";
|
|
79
|
+
|
|
80
|
+
const CertificatesViewer = /*@__PURE__*/ proxyCustomElement(class CertificatesViewer extends HTMLElement {
|
|
81
|
+
constructor() {
|
|
82
|
+
super();
|
|
83
|
+
this.__registerHost();
|
|
84
|
+
this.__attachShadow();
|
|
85
|
+
this.detailsOpen = createEvent(this, "detailsOpen", 7);
|
|
86
|
+
this.detailsClose = createEvent(this, "detailsClose", 7);
|
|
87
|
+
this.isHasRoots = false;
|
|
88
|
+
this.handleClickDetails = (certificate) => {
|
|
89
|
+
this.certificateSelectedForDetails = certificate;
|
|
90
|
+
this.detailsOpen.emit(certificate);
|
|
91
|
+
};
|
|
92
|
+
this.handleModalClose = () => {
|
|
93
|
+
this.certificateSelectedForDetails = undefined;
|
|
94
|
+
this.detailsClose.emit();
|
|
95
|
+
};
|
|
96
|
+
this.handleSearch = (event) => {
|
|
97
|
+
this.search = event.target.value.trim();
|
|
98
|
+
};
|
|
99
|
+
this.certificates = [];
|
|
100
|
+
this.filterWithSearch = true;
|
|
101
|
+
this.highlightWithSearch = true;
|
|
102
|
+
this.mobileMediaQueryString = '(max-width: 900px)';
|
|
103
|
+
this.mobileScreenView = false;
|
|
104
|
+
this.search = '';
|
|
105
|
+
this.certificatesDecoded = [];
|
|
106
|
+
this.expandedRow = undefined;
|
|
107
|
+
this.certificateSelectedForDetails = undefined;
|
|
108
|
+
this.isDecodeInProcess = true;
|
|
109
|
+
}
|
|
110
|
+
handleMediaQueryChange(event) {
|
|
111
|
+
this.mobileScreenView = event.matches;
|
|
112
|
+
}
|
|
113
|
+
componentWillLoad() {
|
|
114
|
+
this.certificatesDecodeAndSet();
|
|
115
|
+
if (Build.isBrowser) {
|
|
116
|
+
this.mobileMediaQuery = window.matchMedia(this.mobileMediaQueryString);
|
|
117
|
+
this.mobileMediaQuery.addEventListener('change', this.handleMediaQueryChange.bind(this));
|
|
118
|
+
this.mobileScreenView = this.mobileMediaQuery.matches;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
disconnectedCallback() {
|
|
122
|
+
this.mobileMediaQuery.removeEventListener('change', this.handleMediaQueryChange.bind(this));
|
|
123
|
+
}
|
|
124
|
+
watchCertificates(newValue, oldValue) {
|
|
125
|
+
/**
|
|
126
|
+
* Prevent rerender after set the same `certificates` prop.
|
|
127
|
+
*/
|
|
128
|
+
if (JSON.stringify(newValue) !== JSON.stringify(oldValue)) {
|
|
129
|
+
this.certificatesDecodeAndSet();
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
async certificatesDecodeAndSet() {
|
|
133
|
+
let hasRoots = false;
|
|
134
|
+
if (!Array.isArray(this.certificates)) {
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
137
|
+
const data = [];
|
|
138
|
+
// eslint-disable-next-line no-restricted-syntax
|
|
139
|
+
for (const certificate of this.certificates) {
|
|
140
|
+
try {
|
|
141
|
+
const decoded = new X509Certificate(certificate.value);
|
|
142
|
+
await decoded.getThumbprint('SHA-1');
|
|
143
|
+
data.push({
|
|
144
|
+
body: decoded,
|
|
145
|
+
tests: certificate.tests,
|
|
146
|
+
name: certificate.name,
|
|
147
|
+
});
|
|
148
|
+
if (!hasRoots && decoded.isRoot) {
|
|
149
|
+
hasRoots = true;
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
catch (error) {
|
|
153
|
+
console.error('Error certificate parse:', error);
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
this.isHasRoots = hasRoots;
|
|
157
|
+
this.isDecodeInProcess = false;
|
|
158
|
+
this.certificatesDecoded = data;
|
|
159
|
+
}
|
|
160
|
+
// eslint-disable-next-line class-methods-use-this
|
|
161
|
+
handleClickDownloadAsPem(certificate) {
|
|
162
|
+
certificate.body.downloadAsPEM(certificate.name || certificate.body.commonName);
|
|
163
|
+
}
|
|
164
|
+
// eslint-disable-next-line class-methods-use-this
|
|
165
|
+
handleClickDownloadAsDer(certificate) {
|
|
166
|
+
certificate.body.downloadAsDER(certificate.name || certificate.body.commonName);
|
|
167
|
+
}
|
|
168
|
+
handleClickRow(index) {
|
|
169
|
+
const isExpandedRowClicked = this.expandedRow === index;
|
|
170
|
+
this.expandedRow = isExpandedRowClicked
|
|
171
|
+
? undefined
|
|
172
|
+
: index;
|
|
173
|
+
}
|
|
174
|
+
getMaxColSpanValue() {
|
|
175
|
+
let colSpan = 5;
|
|
176
|
+
if (!this.isHasRoots) {
|
|
177
|
+
colSpan += 1;
|
|
178
|
+
}
|
|
179
|
+
return colSpan;
|
|
180
|
+
}
|
|
181
|
+
renderCertificateButtonActions(certificate) {
|
|
182
|
+
var _a, _b, _c;
|
|
183
|
+
const isHasTestURLs = certificate.tests
|
|
184
|
+
&& (certificate.tests.expired || certificate.tests.revoked || certificate.tests.valid);
|
|
185
|
+
return (h("peculiar-button-menu", { class: "button_table_cell", groups: [
|
|
186
|
+
{
|
|
187
|
+
title: l10n.getString('previewCertificate'),
|
|
188
|
+
options: [
|
|
189
|
+
{
|
|
190
|
+
text: l10n.getString('viewDetails'),
|
|
191
|
+
startIcon: h(DetailsIcon, null),
|
|
192
|
+
onClick: () => this.handleClickDetails(certificate.body),
|
|
193
|
+
},
|
|
194
|
+
],
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
title: l10n.getString('downloadOptions'),
|
|
198
|
+
options: [
|
|
199
|
+
{
|
|
200
|
+
text: l10n.getString('download.pem'),
|
|
201
|
+
startIcon: h(DownloadIcon, null),
|
|
202
|
+
onClick: () => this.handleClickDownloadAsPem(certificate),
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
text: l10n.getString('download.der'),
|
|
206
|
+
startIcon: h(DownloadIcon, null),
|
|
207
|
+
onClick: () => this.handleClickDownloadAsDer(certificate),
|
|
208
|
+
},
|
|
209
|
+
],
|
|
210
|
+
},
|
|
211
|
+
...(isHasTestURLs ? [{
|
|
212
|
+
title: l10n.getString('testURLs'),
|
|
213
|
+
options: [
|
|
214
|
+
...(((_a = certificate.tests) === null || _a === void 0 ? void 0 : _a.valid) ? [{
|
|
215
|
+
text: l10n.getString('valid'),
|
|
216
|
+
href: certificate.tests.valid,
|
|
217
|
+
startIcon: h(LinkIcon, null),
|
|
218
|
+
}] : []),
|
|
219
|
+
...(((_b = certificate.tests) === null || _b === void 0 ? void 0 : _b.revoked) ? [{
|
|
220
|
+
text: l10n.getString('revoked'),
|
|
221
|
+
href: certificate.tests.revoked,
|
|
222
|
+
startIcon: h(LinkIcon, null),
|
|
223
|
+
}] : []),
|
|
224
|
+
...(((_c = certificate.tests) === null || _c === void 0 ? void 0 : _c.expired) ? [{
|
|
225
|
+
text: l10n.getString('expired'),
|
|
226
|
+
href: certificate.tests.expired,
|
|
227
|
+
startIcon: h(LinkIcon, null),
|
|
228
|
+
}] : []),
|
|
229
|
+
],
|
|
230
|
+
}] : []),
|
|
231
|
+
] }));
|
|
232
|
+
}
|
|
233
|
+
renderExpandedRow(certificate) {
|
|
234
|
+
const colSpan = this.getMaxColSpanValue() - 2;
|
|
235
|
+
return (h("tr", { class: "expanded_summary" }, h("td", null), h("td", { colSpan: colSpan }, h(CertificateSummary, { certificate: certificate, showIssuer: !certificate.isRoot })), h("td", null)));
|
|
236
|
+
}
|
|
237
|
+
renderCertificatesRows() {
|
|
238
|
+
const searchHighlight = this.highlightWithSearch
|
|
239
|
+
? this.search
|
|
240
|
+
: '';
|
|
241
|
+
const content = [];
|
|
242
|
+
this.certificatesDecoded.forEach((certificate, index) => {
|
|
243
|
+
const isExpandedRow = index === this.expandedRow;
|
|
244
|
+
const publicKeyValue = OIDs[certificate.body.signature.algorithm]
|
|
245
|
+
|| certificate.body.signature.algorithm;
|
|
246
|
+
if (this.filterWithSearch && this.search) {
|
|
247
|
+
const certificateStringForSearch = [
|
|
248
|
+
publicKeyValue,
|
|
249
|
+
certificate.body.issuerCommonName,
|
|
250
|
+
certificate.name,
|
|
251
|
+
certificate.body.commonName,
|
|
252
|
+
certificate.body.thumbprints['SHA-1'],
|
|
253
|
+
]
|
|
254
|
+
.join(' ')
|
|
255
|
+
.toLowerCase();
|
|
256
|
+
if (certificateStringForSearch.indexOf(this.search.toLowerCase()) === -1) {
|
|
257
|
+
return;
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
if (this.mobileScreenView) {
|
|
261
|
+
content.push([
|
|
262
|
+
h("tr", { class: {
|
|
263
|
+
certificate_row: true,
|
|
264
|
+
m_expanded: isExpandedRow,
|
|
265
|
+
}, key: certificate.body.thumbprints['SHA-1'] }, h("td", null, h("table", null, h("tbody", null, !this.isHasRoots && (h("tr", null, h("td", null, h(Typography, { variant: "b2", color: "gray-9" }, l10n.getString('issuer'))), h("td", null, h(Typography, { variant: "b2", color: "black" }, h("peculiar-highlight-words", { search: searchHighlight }, certificate.body.issuerCommonName))))), h("tr", null, h("td", null, h(Typography, { variant: "b2", color: "gray-9" }, l10n.getString('name'))), h("td", null, h(Typography, { variant: "b2", color: "black" }, h("peculiar-highlight-words", { search: searchHighlight }, certificate.name || certificate.body.commonName)))), h("tr", null, h("td", null, h(Typography, { variant: "b2", color: "gray-9" }, l10n.getString('publicKey'))), h("td", null, h(Typography, { variant: "b2", color: "black" }, h("peculiar-highlight-words", { search: searchHighlight }, publicKeyValue)))), h("tr", null, h("td", null, h(Typography, { variant: "b2", color: "gray-9" }, l10n.getString('fingerprint'), "\u00A0 (SHA-1)")), h("td", null, h(Typography, { variant: "b2", color: "black" }, h("peculiar-highlight-words", { search: searchHighlight }, certificate.body.thumbprints['SHA-1'])))), isExpandedRow && this.renderExpandedRow(certificate.body), h("tr", { class: "certificate_row_actions" }, h("td", null, this.renderCertificateButtonActions(certificate), h(Button
|
|
266
|
+
// eslint-disable-next-line react/jsx-no-bind
|
|
267
|
+
, {
|
|
268
|
+
// eslint-disable-next-line react/jsx-no-bind
|
|
269
|
+
onClick: this.handleClickRow.bind(this, index), startIcon: isExpandedRow ? h(ArrowTopIcon, null) : h(ArrowBottomIcon, null)
|
|
270
|
+
}))))))),
|
|
271
|
+
]);
|
|
272
|
+
return;
|
|
273
|
+
}
|
|
274
|
+
content.push([
|
|
275
|
+
h("tr", { class: {
|
|
276
|
+
m_expanded: isExpandedRow,
|
|
277
|
+
}, key: certificate.body.thumbprints['SHA-1'] }, h("td", null, h(Button, { class: "button_table_cell",
|
|
278
|
+
// eslint-disable-next-line react/jsx-no-bind
|
|
279
|
+
onClick: this.handleClickRow.bind(this, index), startIcon: isExpandedRow ? h(ArrowTopIcon, null) : h(ArrowBottomIcon, null) })), !this.isHasRoots && (h("td", null, h(Typography, null, h("peculiar-highlight-words", { search: searchHighlight }, certificate.body.issuerCommonName)))), h("td", null, h(Typography, null, h("peculiar-highlight-words", { search: searchHighlight }, certificate.name || certificate.body.commonName))), h("td", null, h(Typography, null, h("peculiar-highlight-words", { search: searchHighlight }, publicKeyValue))), h("td", null, h(Typography, null, h("peculiar-highlight-words", { search: searchHighlight }, certificate.body.thumbprints['SHA-1']))), h("td", null, this.renderCertificateButtonActions(certificate))),
|
|
280
|
+
isExpandedRow && this.renderExpandedRow(certificate.body),
|
|
281
|
+
]);
|
|
282
|
+
});
|
|
283
|
+
return content;
|
|
284
|
+
}
|
|
285
|
+
renderCertificateDetailsModal() {
|
|
286
|
+
if (!this.certificateSelectedForDetails) {
|
|
287
|
+
return null;
|
|
288
|
+
}
|
|
289
|
+
return (h("div", { class: "modal_wrapper", role: "presentation", "aria-hidden": "false", part: "presentation" }, h("div", { class: "modal_backdrop", onClick: this.handleModalClose, "aria-hidden": "true" }), h("div", { class: "modal_container", role: "dialog", part: "presentation_container" }, h("header", { class: "modal_header" }, h(Typography, { variant: "h4" }, l10n.getString('certificateDetails')), h(Button, { onClick: this.handleModalClose, startIcon: h(CrossIcon, null) })), h("div", { class: "modal_content" }, h("peculiar-certificate-viewer", { certificate: this.certificateSelectedForDetails, mobileMediaQueryString: this.mobileMediaQueryString })))));
|
|
290
|
+
}
|
|
291
|
+
renderSearch() {
|
|
292
|
+
if (!this.filterWithSearch && !this.highlightWithSearch) {
|
|
293
|
+
return null;
|
|
294
|
+
}
|
|
295
|
+
return (h("div", { class: "search_section" }, h("input", { onInput: this.handleSearch, type: "search", value: "", class: "input_search t-b3 c-black", disabled: !this.certificatesDecoded.length, placeholder: "Search" })));
|
|
296
|
+
}
|
|
297
|
+
renderEmptyState() {
|
|
298
|
+
const colSpan = this.getMaxColSpanValue();
|
|
299
|
+
return (h("tr", null, h("td", { class: "status_wrapper", colSpan: colSpan }, h(Typography, { variant: "b1" }, "There are no certificates available."))));
|
|
300
|
+
}
|
|
301
|
+
renderEmptySearchState() {
|
|
302
|
+
const colSpan = this.getMaxColSpanValue();
|
|
303
|
+
return (h("tr", null, h("td", { class: "status_wrapper", colSpan: colSpan }, h(Typography, { variant: "b1" }, "No results found for \u201C", this.search, "\u201C"))));
|
|
304
|
+
}
|
|
305
|
+
// eslint-disable-next-line class-methods-use-this
|
|
306
|
+
renderLoadingState() {
|
|
307
|
+
return (h("div", { class: "loading_container" }, h("peculiar-circular-progress", null)));
|
|
308
|
+
}
|
|
309
|
+
renderTableBody() {
|
|
310
|
+
if (this.isDecodeInProcess) {
|
|
311
|
+
return null;
|
|
312
|
+
}
|
|
313
|
+
if (!this.certificatesDecoded.length) {
|
|
314
|
+
return this.renderEmptyState();
|
|
315
|
+
}
|
|
316
|
+
const certificatesRows = this.renderCertificatesRows();
|
|
317
|
+
if (this.search && !certificatesRows.length) {
|
|
318
|
+
return this.renderEmptySearchState();
|
|
319
|
+
}
|
|
320
|
+
return certificatesRows;
|
|
321
|
+
}
|
|
322
|
+
render() {
|
|
323
|
+
return (h(Host, { "data-mobile-screen-view": String(this.mobileScreenView) }, this.renderSearch(), h("table", null, !this.mobileScreenView && (h("thead", null, h("tr", null, h("th", null), !this.isHasRoots && (h("th", { class: "col_issuer" }, h(Typography, { variant: "s2" }, l10n.getString('issuer')))), h("th", { class: "col_name" }, h(Typography, { variant: "s2" }, l10n.getString('name'))), h("th", { class: "col_public_key" }, h(Typography, { variant: "s2" }, l10n.getString('publicKey'))), h("th", { class: "col_fingerprint" }, h(Typography, { variant: "s2" }, l10n.getString('fingerprint'), "\u00A0 (SHA-1)")), h("th", null)))), h("tbody", null, this.renderTableBody())), this.renderCertificateDetailsModal(), this.isDecodeInProcess && this.renderLoadingState()));
|
|
324
|
+
}
|
|
325
|
+
static get watchers() { return {
|
|
326
|
+
"certificates": ["watchCertificates"]
|
|
327
|
+
}; }
|
|
328
|
+
static get style() { return certificatesViewerCss; }
|
|
329
|
+
}, [1, "peculiar-certificates-viewer", {
|
|
330
|
+
"certificates": [16],
|
|
331
|
+
"filterWithSearch": [4, "filter-with-search"],
|
|
332
|
+
"highlightWithSearch": [4, "highlight-with-search"],
|
|
333
|
+
"mobileMediaQueryString": [1, "mobile-media-query-string"],
|
|
334
|
+
"mobileScreenView": [32],
|
|
335
|
+
"search": [32],
|
|
336
|
+
"certificatesDecoded": [32],
|
|
337
|
+
"expandedRow": [32],
|
|
338
|
+
"certificateSelectedForDetails": [32],
|
|
339
|
+
"isDecodeInProcess": [32]
|
|
340
|
+
}, undefined, {
|
|
341
|
+
"certificates": ["watchCertificates"]
|
|
342
|
+
}]);
|
|
343
|
+
function defineCustomElement$1() {
|
|
344
|
+
if (typeof customElements === "undefined") {
|
|
345
|
+
return;
|
|
346
|
+
}
|
|
347
|
+
const components = ["peculiar-certificates-viewer", "peculiar-button-menu", "peculiar-certificate-viewer", "peculiar-circular-progress", "peculiar-highlight-words"];
|
|
348
|
+
components.forEach(tagName => { switch (tagName) {
|
|
349
|
+
case "peculiar-certificates-viewer":
|
|
350
|
+
if (!customElements.get(tagName)) {
|
|
351
|
+
customElements.define(tagName, CertificatesViewer);
|
|
352
|
+
}
|
|
353
|
+
break;
|
|
354
|
+
case "peculiar-button-menu":
|
|
355
|
+
if (!customElements.get(tagName)) {
|
|
356
|
+
defineCustomElement$5();
|
|
357
|
+
}
|
|
358
|
+
break;
|
|
359
|
+
case "peculiar-certificate-viewer":
|
|
360
|
+
if (!customElements.get(tagName)) {
|
|
361
|
+
defineCustomElement$4();
|
|
362
|
+
}
|
|
363
|
+
break;
|
|
364
|
+
case "peculiar-circular-progress":
|
|
365
|
+
if (!customElements.get(tagName)) {
|
|
366
|
+
defineCustomElement$3();
|
|
367
|
+
}
|
|
368
|
+
break;
|
|
369
|
+
case "peculiar-highlight-words":
|
|
370
|
+
if (!customElements.get(tagName)) {
|
|
371
|
+
defineCustomElement$2();
|
|
372
|
+
}
|
|
373
|
+
break;
|
|
374
|
+
} });
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
const PeculiarCertificatesViewer = CertificatesViewer;
|
|
378
|
+
const defineCustomElement = defineCustomElement$1;
|
|
379
|
+
|
|
380
|
+
export { PeculiarCertificatesViewer, defineCustomElement };
|
|
381
|
+
|
|
382
|
+
//# sourceMappingURL=peculiar-certificates-viewer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"peculiar-certificates-viewer.js","mappings":";;;;;;;;;;;;;A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jB,CACF,EAEP,IAAI,CAAC,6BAA6B,EAAE,EACpC,IAAI,CAAC,iBAAiB,IAAI,IAAI,CAAC,kBAAkB,EAAE,CAC/C,EACP;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/icons/details.tsx","src/components/icons/link.tsx","src/components/icons/cross.tsx","src/components/certificate-summary/certificate-summary.tsx","src/components/certificates-viewer/certificates-viewer.scss?tag=peculiar-certificates-viewer&encapsulation=shadow","src/components/certificates-viewer/certificates-viewer.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 { FunctionalComponent, h } from '@stencil/core';\nimport type { ColorType } from '../../interface';\n\nexport const DetailsIcon: FunctionalComponent<{ color?: ColorType }> = (props) => {\n const { color = 'secondary' } = props;\n\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"30\"\n height=\"31\"\n fill=\"none\"\n >\n <path\n fill={`var(--pv-color-${color})`}\n d=\"M6.71 19.79a1 1 0 0 0-.33-.21 1 1 0 0 0-.76 0 1 1 0 0 0-.33.21 1 1 0 0 0-.21.33 1 1 0 0 0 .21 1.09c.097.088.209.16.33.21a.94.94 0 0 0 .76 0 1.15 1.15 0 0 0 .33-.21 1 1 0 0 0 .21-1.09 1 1 0 0 0-.21-.33ZM10 11.5h14a1 1 0 0 0 0-2H10a1 1 0 0 0 0 2Zm-3.29 3.29a1 1 0 0 0-1.09-.21 1.15 1.15 0 0 0-.33.21 1 1 0 0 0-.21.33.94.94 0 0 0 0 .76c.05.121.122.233.21.33.097.088.209.16.33.21a.94.94 0 0 0 .76 0 1.15 1.15 0 0 0 .33-.21 1.15 1.15 0 0 0 .21-.33.94.94 0 0 0 0-.76 1 1 0 0 0-.21-.33ZM24 14.5H10a1 1 0 0 0 0 2h14a1 1 0 0 0 0-2ZM6.71 9.79a1 1 0 0 0-.33-.21 1 1 0 0 0-1.09.21 1.15 1.15 0 0 0-.21.33.94.94 0 0 0 0 .76c.05.121.122.233.21.33.097.088.209.16.33.21a1 1 0 0 0 1.09-.21 1.15 1.15 0 0 0 .21-.33.94.94 0 0 0 0-.76 1.15 1.15 0 0 0-.21-.33ZM24 19.5H10a1 1 0 0 0 0 2h14a1 1 0 0 0 0-2Z\"\n />\n </svg>\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 { FunctionalComponent, h } from '@stencil/core';\nimport type { ColorType } from '../../interface';\n\nexport const LinkIcon: FunctionalComponent<{ color?: ColorType }> = (props) => {\n const { color = 'secondary' } = props;\n\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"30\"\n height=\"31\"\n fill=\"none\"\n >\n <path\n fill={`var(--pv-color-${color})`}\n d=\"M21 14.32a1 1 0 0 0-1 1v7.18a1 1 0 0 1-1 1H8a1 1 0 0 1-1-1v-11a1 1 0 0 1 1-1h7.18a1 1 0 0 0 0-2H8a3 3 0 0 0-3 3v11a3 3 0 0 0 3 3h11a3 3 0 0 0 3-3v-7.18a1 1 0 0 0-1-1Zm3.92-8.2a1 1 0 0 0-.54-.54A1 1 0 0 0 24 5.5h-6a1 1 0 1 0 0 2h3.59l-10.3 10.29a1.002 1.002 0 0 0 .325 1.639 1 1 0 0 0 1.095-.219L23 8.91v3.59a1 1 0 0 0 2 0v-6a1.001 1.001 0 0 0-.08-.38Z\"\n />\n </svg>\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 { FunctionalComponent, h } from '@stencil/core';\nimport type { ColorType } from '../../interface';\n\nexport const CrossIcon: FunctionalComponent<{ color?: ColorType }> = (props) => {\n const { color = 'gray-9' } = props;\n\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"30\"\n height=\"30\"\n fill=\"none\"\n >\n <path\n fill={`var(--pv-color-${color})`}\n fill-rule=\"evenodd\"\n d=\"m16.37 15 5.442 5.44c.25.252.25.663 0 .914l-.459.457a.646.646 0 0 1-.913 0L15 16.371l-5.44 5.44a.648.648 0 0 1-.915 0l-.457-.457a.649.649 0 0 1 0-.913L13.63 15 8.188 9.56a.649.649 0 0 1 0-.914l.457-.457a.648.648 0 0 1 .915 0l5.44 5.44 5.44-5.44a.646.646 0 0 1 .913 0l.46.457c.25.25.25.662 0 .913L16.37 15Z\"\n clip-rule=\"evenodd\"\n />\n </svg>\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 { FunctionalComponent, h } from '@stencil/core';\nimport type { X509Certificate } from '../../crypto';\nimport { dateShort, l10n } from '../../utils';\nimport { Typography } from '../typography';\n\ninterface CertificateSummaryProps {\n certificate: X509Certificate;\n showIssuer?: boolean;\n}\n\nexport const CertificateSummary: FunctionalComponent<CertificateSummaryProps> = (props) => {\n const {\n certificate,\n showIssuer,\n } = props;\n\n const renderRow = (name: string | string[], value: string | number) => (\n <tr>\n <td>\n <Typography\n variant=\"b2\"\n color=\"gray-9\"\n >\n {name}\n </Typography>\n </td>\n <td>\n <Typography\n variant=\"b2\"\n color=\"black\"\n >\n {value}\n </Typography>\n </td>\n </tr>\n );\n\n return (\n <table>\n <tbody>\n {renderRow(\n l10n.getString('subjectName'),\n certificate.subjectToString(),\n )}\n {showIssuer && renderRow(\n l10n.getString('issuerName'),\n certificate.issuerToString(),\n )}\n\n {renderRow(\n l10n.getString('serialNumber'),\n certificate.serialNumber,\n )}\n {renderRow(\n l10n.getString('version'),\n certificate.version,\n )}\n {renderRow(\n l10n.getString('validity'),\n certificate.validity,\n )}\n {renderRow(\n l10n.getString('issued'),\n dateShort(certificate.notBefore),\n )}\n {renderRow(\n l10n.getString('expired'),\n dateShort(certificate.notAfter),\n )}\n </tbody>\n </table>\n );\n};\n","@import '../../css/base.scss';\n\n:host {\n display: block;\n width: 100%;\n word-wrap: break-word;\n min-width: 280px;\n overflow: auto;\n position: relative;\n}\n\n.search_section {\n padding: var(--pv-size-base-4);\n border-bottom: 1px solid var(--pv-color-gray-4);\n}\n\n.input_search {\n height: var(--pv-size-base-8);\n width: 100%;\n outline: none;\n background-color: var(--pv-color-gray-1);\n padding: 0 var(--pv-size-base-2);\n border: 1px solid var(--pv-color-gray-7);\n border-radius: 4px;\n transition: background-color 200ms ease 0s, color 200ms ease 0s, border-color 200ms ease 0s;\n &::placeholder {\n color: var(--pv-color-gray-9);\n }\n}\n\ntable {\n width: 100%;\n table-layout: fixed;\n border-collapse: collapse;\n border-spacing: 0;\n\n td, th {\n border-bottom: 1px solid var(--pv-color-gray-4);\n vertical-align: top;\n text-align: left;\n\n &:first-child {\n padding-right: 0;\n width: var(--pv-size-base-10);\n }\n &:last-child {\n padding-left: 0;\n width: var(--pv-size-base-10);\n }\n }\n\n th {\n padding: var(--pv-size-base-2) var(--pv-size-base-4);\n\n &.col_action {\n padding: 0;\n }\n }\n\n td {\n padding: var(--pv-size-base-4);\n }\n\n tr {\n &.m_expanded {\n background: var(--pv-color-gray-1);\n\n > td {\n border-bottom: none;\n }\n }\n\n &.expanded_summary {\n background: var(--pv-color-gray-1);\n\n table {\n table-layout: initial;\n\n td {\n border-bottom: none;\n padding: var(--pv-size-base-2);\n\n &:first-child {\n width: 200px;\n }\n\n &:last-child {\n width: auto;\n }\n }\n }\n }\n }\n}\n\n.button_table_cell {\n margin-top: -3px;\n}\n\n.status_wrapper {\n text-align: center;\n height: var(--pv-size-base-16);\n vertical-align: middle;\n}\n\n.modal_wrapper {\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n z-index: 1;\n animation: fadeIn 200ms;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.modal_backdrop {\n background: var(--pv-color-black);\n z-index: -1;\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n opacity: 0.5;\n}\n\n.modal_container {\n background: var(--pv-color-white);\n width: 100%;\n display: flex;\n max-height: calc(100% - 60px);\n flex-direction: column;\n margin: var(--pv-size-base-6);\n position: relative;\n outline: none;\n box-shadow: var(--pv-shadow-dark-hight);\n overflow: hidden;\n border: 0px;\n padding: 0px;\n max-width: 640px;\n border-radius: 4px;\n}\n\n.modal_header {\n padding: var(--pv-size-base-3) var(--pv-size-base-4);\n display: flex;\n flex: 0 0 auto;\n -webkit-box-pack: justify;\n justify-content: space-between;\n gap: var(--pv-size-base-2);\n border-bottom: 1px solid var(--pv-color-gray-5);\n}\n\n.modal_content {\n flex: 1 1 auto;\n overflow: auto;\n}\n\n:host([data-mobile-screen-view=\"true\"]) {\n table, tbody, tr, td {\n display: block;\n width: 100% !important;\n padding: 0;\n border: none;\n }\n\n thead {\n display: none;\n }\n\n table {\n tr {\n padding: var(--pv-size-base-2) 0;\n }\n\n .expanded_summary {\n padding: 0;\n }\n\n .certificate_row {\n border-bottom: 1px solid var(--pv-color-gray-5);\n padding: var(--pv-size-base-2) var(--pv-size-base-4);\n }\n\n .certificate_row_actions {\n padding-top: var(--pv-size-base-6);\n\n td {\n display: flex;\n justify-content: right;\n gap: var(--pv-size-base-4);\n }\n }\n }\n\n .button_table_cell {\n margin-top: 0;\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 {\n Component,\n h,\n Prop,\n State,\n Watch,\n Host,\n Event,\n EventEmitter,\n Build,\n} from '@stencil/core';\n\nimport { X509Certificate } from '../../crypto';\nimport { OIDs } from '../../constants/oids';\nimport { l10n } from '../../utils';\nimport { Typography } from '../typography';\nimport { CertificateSummary } from '../certificate-summary';\nimport { Button } from '../button';\nimport {\n DownloadIcon,\n LinkIcon,\n DetailsIcon,\n ArrowBottomIcon,\n ArrowTopIcon,\n CrossIcon,\n} from '../icons';\n\nexport interface ICertificate {\n value: string;\n name?: string;\n tests?: {\n valid?: string;\n revoked?: string;\n expired?: string;\n };\n}\n\ninterface ICertificateDecoded {\n body: X509Certificate;\n tests?: ICertificate['tests'];\n name?: string;\n}\n\n@Component({\n tag: 'peculiar-certificates-viewer',\n styleUrl: 'certificates-viewer.scss',\n shadow: true,\n})\nexport class CertificatesViewer {\n private isHasRoots: boolean = false;\n\n private mobileMediaQuery: MediaQueryList;\n\n /**\n * List of certificates values for decode and show in the list.\n * <br />\n * **NOTE**: If you do not provide a `name` value when\n * invocing the component it will take the first Subject CN value.\n * <br />\n * **NOTE**: If you do not provide a `tests` this column will be ommited from the rendered page.\n * <br />\n * **NOTE**: If the supplied certificates are self-signed the issuer column will be ommited.\n */\n @Prop() certificates: ICertificate[] = [];\n\n /**\n * Use filter in the list when search is changed.\n */\n @Prop() filterWithSearch: boolean = true;\n\n /**\n * Use highlight chapters in the list when search is changed.\n */\n @Prop() highlightWithSearch: boolean = true;\n\n /**\n * Mobile media query string to control screen view change.\n * <br />\n * **NOTE**: Based on https://developer.mozilla.org/en-US/docs/Web/API/Window/matchMedia.\n * @example\n * (max-width: 900px)\n */\n @Prop({ reflect: false }) mobileMediaQueryString?: string = '(max-width: 900px)';\n\n /**\n * Emitted when the user open certificate details modal.\n */\n @Event() detailsOpen!: EventEmitter<X509Certificate>;\n\n /**\n * Emitted when the user close certificate details modal.\n */\n @Event() detailsClose!: EventEmitter<void>;\n\n @State() mobileScreenView: boolean = false;\n\n @State() search: string = '';\n\n @State() certificatesDecoded: ICertificateDecoded[] = [];\n\n @State() expandedRow?: number;\n\n @State() certificateSelectedForDetails?: X509Certificate;\n\n @State() isDecodeInProcess: boolean = true;\n\n private handleMediaQueryChange(event: MediaQueryListEvent) {\n this.mobileScreenView = event.matches;\n }\n\n componentWillLoad() {\n this.certificatesDecodeAndSet();\n\n if (Build.isBrowser) {\n this.mobileMediaQuery = window.matchMedia(this.mobileMediaQueryString);\n this.mobileMediaQuery.addEventListener('change', this.handleMediaQueryChange.bind(this));\n this.mobileScreenView = this.mobileMediaQuery.matches;\n }\n }\n\n disconnectedCallback() {\n this.mobileMediaQuery.removeEventListener('change', this.handleMediaQueryChange.bind(this));\n }\n\n @Watch('certificates')\n watchCertificates(newValue: ICertificate[], oldValue: ICertificate[]) {\n /**\n * Prevent rerender after set the same `certificates` prop.\n */\n if (JSON.stringify(newValue) !== JSON.stringify(oldValue)) {\n this.certificatesDecodeAndSet();\n }\n }\n\n async certificatesDecodeAndSet() {\n let hasRoots = false;\n\n if (!Array.isArray(this.certificates)) {\n return;\n }\n\n const data: ICertificateDecoded[] = [];\n\n // eslint-disable-next-line no-restricted-syntax\n for (const certificate of this.certificates) {\n try {\n const decoded = new X509Certificate(certificate.value);\n\n await decoded.getThumbprint('SHA-1');\n\n data.push({\n body: decoded,\n tests: certificate.tests,\n name: certificate.name,\n });\n\n if (!hasRoots && decoded.isRoot) {\n hasRoots = true;\n }\n } catch (error) {\n console.error('Error certificate parse:', error);\n }\n }\n\n this.isHasRoots = hasRoots;\n this.isDecodeInProcess = false;\n this.certificatesDecoded = data;\n }\n\n // eslint-disable-next-line class-methods-use-this\n private handleClickDownloadAsPem(certificate: ICertificateDecoded) {\n certificate.body.downloadAsPEM(certificate.name || certificate.body.commonName);\n }\n\n // eslint-disable-next-line class-methods-use-this\n private handleClickDownloadAsDer(certificate: ICertificateDecoded) {\n certificate.body.downloadAsDER(certificate.name || certificate.body.commonName);\n }\n\n private handleClickDetails = (certificate: X509Certificate) => {\n this.certificateSelectedForDetails = certificate;\n this.detailsOpen.emit(certificate);\n };\n\n private handleModalClose = () => {\n this.certificateSelectedForDetails = undefined;\n\n this.detailsClose.emit();\n };\n\n private handleClickRow(index: number) {\n const isExpandedRowClicked = this.expandedRow === index;\n\n this.expandedRow = isExpandedRowClicked\n ? undefined\n : index;\n }\n\n private handleSearch = (event: any) => {\n this.search = event.target.value.trim();\n };\n\n private getMaxColSpanValue() {\n let colSpan = 5;\n\n if (!this.isHasRoots) {\n colSpan += 1;\n }\n\n return colSpan;\n }\n\n private renderCertificateButtonActions(certificate: ICertificateDecoded) {\n const isHasTestURLs = certificate.tests\n && (certificate.tests.expired || certificate.tests.revoked || certificate.tests.valid);\n\n return (\n <peculiar-button-menu\n class=\"button_table_cell\"\n groups={[\n {\n title: l10n.getString('previewCertificate'),\n options: [\n {\n text: l10n.getString('viewDetails'),\n startIcon: <DetailsIcon />,\n onClick: () => this.handleClickDetails(certificate.body),\n },\n ],\n },\n {\n title: l10n.getString('downloadOptions'),\n options: [\n {\n text: l10n.getString('download.pem'),\n startIcon: <DownloadIcon />,\n onClick: () => this.handleClickDownloadAsPem(certificate),\n },\n {\n text: l10n.getString('download.der'),\n startIcon: <DownloadIcon />,\n onClick: () => this.handleClickDownloadAsDer(certificate),\n },\n ],\n },\n ...(isHasTestURLs ? [{\n title: l10n.getString('testURLs'),\n options: [\n ...(certificate.tests?.valid ? [{\n text: l10n.getString('valid'),\n href: certificate.tests.valid,\n startIcon: <LinkIcon />,\n }] : []),\n ...(certificate.tests?.revoked ? [{\n text: l10n.getString('revoked'),\n href: certificate.tests.revoked,\n startIcon: <LinkIcon />,\n }] : []),\n ...(certificate.tests?.expired ? [{\n text: l10n.getString('expired'),\n href: certificate.tests.expired,\n startIcon: <LinkIcon />,\n }] : []),\n ],\n }] : []),\n ]}\n />\n );\n }\n\n private renderExpandedRow(certificate: X509Certificate) {\n const colSpan = this.getMaxColSpanValue() - 2;\n\n return (\n <tr class=\"expanded_summary\">\n <td />\n <td colSpan={colSpan}>\n <CertificateSummary\n certificate={certificate}\n showIssuer={!certificate.isRoot}\n />\n </td>\n <td />\n </tr>\n );\n }\n\n private renderCertificatesRows() {\n const searchHighlight = this.highlightWithSearch\n ? this.search\n : '';\n const content = [];\n\n this.certificatesDecoded.forEach((certificate, index) => {\n const isExpandedRow = index === this.expandedRow;\n const publicKeyValue = OIDs[certificate.body.signature.algorithm]\n || certificate.body.signature.algorithm;\n\n if (this.filterWithSearch && this.search) {\n const certificateStringForSearch = [\n publicKeyValue,\n certificate.body.issuerCommonName,\n certificate.name,\n certificate.body.commonName,\n certificate.body.thumbprints['SHA-1'],\n ]\n .join(' ')\n .toLowerCase();\n\n if (certificateStringForSearch.indexOf(this.search.toLowerCase()) === -1) {\n return;\n }\n }\n\n if (this.mobileScreenView) {\n content.push([\n <tr\n class={{\n certificate_row: true,\n m_expanded: isExpandedRow,\n }}\n key={certificate.body.thumbprints['SHA-1']}\n >\n <td>\n <table>\n <tbody>\n {!this.isHasRoots && (\n <tr>\n <td>\n <Typography variant=\"b2\" color=\"gray-9\">\n {l10n.getString('issuer')}\n </Typography>\n </td>\n <td>\n <Typography variant=\"b2\" color=\"black\">\n <peculiar-highlight-words search={searchHighlight}>\n {certificate.body.issuerCommonName}\n </peculiar-highlight-words>\n </Typography>\n </td>\n </tr>\n )}\n <tr>\n <td>\n <Typography variant=\"b2\" color=\"gray-9\">\n {l10n.getString('name')}\n </Typography>\n </td>\n <td>\n <Typography variant=\"b2\" color=\"black\">\n <peculiar-highlight-words search={searchHighlight}>\n {certificate.name || certificate.body.commonName}\n </peculiar-highlight-words>\n </Typography>\n </td>\n </tr>\n <tr>\n <td>\n <Typography variant=\"b2\" color=\"gray-9\">\n {l10n.getString('publicKey')}\n </Typography>\n </td>\n <td>\n <Typography variant=\"b2\" color=\"black\">\n <peculiar-highlight-words search={searchHighlight}>\n {publicKeyValue}\n </peculiar-highlight-words>\n </Typography>\n </td>\n </tr>\n <tr>\n <td>\n <Typography variant=\"b2\" color=\"gray-9\">\n {l10n.getString('fingerprint')}\n (SHA-1)\n </Typography>\n </td>\n <td>\n <Typography variant=\"b2\" color=\"black\">\n <peculiar-highlight-words search={searchHighlight}>\n {certificate.body.thumbprints['SHA-1']}\n </peculiar-highlight-words>\n </Typography>\n </td>\n </tr>\n {isExpandedRow && this.renderExpandedRow(certificate.body)}\n <tr class=\"certificate_row_actions\">\n <td>\n {this.renderCertificateButtonActions(certificate)}\n <Button\n // eslint-disable-next-line react/jsx-no-bind\n onClick={this.handleClickRow.bind(this, index)}\n startIcon={isExpandedRow ? <ArrowTopIcon /> : <ArrowBottomIcon />}\n />\n </td>\n </tr>\n </tbody>\n </table>\n </td>\n </tr>,\n ]);\n\n return;\n }\n\n content.push([\n <tr\n class={{\n m_expanded: isExpandedRow,\n }}\n key={certificate.body.thumbprints['SHA-1']}\n >\n <td>\n <Button\n class=\"button_table_cell\"\n // eslint-disable-next-line react/jsx-no-bind\n onClick={this.handleClickRow.bind(this, index)}\n startIcon={isExpandedRow ? <ArrowTopIcon /> : <ArrowBottomIcon />}\n />\n </td>\n {!this.isHasRoots && (\n <td>\n <Typography>\n <peculiar-highlight-words search={searchHighlight}>\n {certificate.body.issuerCommonName}\n </peculiar-highlight-words>\n </Typography>\n </td>\n )}\n <td>\n <Typography>\n <peculiar-highlight-words search={searchHighlight}>\n {certificate.name || certificate.body.commonName}\n </peculiar-highlight-words>\n </Typography>\n </td>\n <td>\n <Typography>\n <peculiar-highlight-words search={searchHighlight}>\n {publicKeyValue}\n </peculiar-highlight-words>\n </Typography>\n </td>\n <td>\n <Typography>\n <peculiar-highlight-words search={searchHighlight}>\n {certificate.body.thumbprints['SHA-1']}\n </peculiar-highlight-words>\n </Typography>\n </td>\n <td>\n {this.renderCertificateButtonActions(certificate)}\n </td>\n </tr>,\n isExpandedRow && this.renderExpandedRow(certificate.body),\n ]);\n });\n\n return content;\n }\n\n private renderCertificateDetailsModal() {\n if (!this.certificateSelectedForDetails) {\n return null;\n }\n\n return (\n <div\n class=\"modal_wrapper\"\n role=\"presentation\"\n aria-hidden=\"false\"\n part=\"presentation\"\n >\n <div\n class=\"modal_backdrop\"\n onClick={this.handleModalClose}\n aria-hidden=\"true\"\n />\n <div\n class=\"modal_container\"\n role=\"dialog\"\n part=\"presentation_container\"\n >\n <header class=\"modal_header\">\n <Typography\n variant=\"h4\"\n >\n {l10n.getString('certificateDetails')}\n </Typography>\n <Button\n onClick={this.handleModalClose}\n startIcon={<CrossIcon />}\n />\n </header>\n <div class=\"modal_content\">\n <peculiar-certificate-viewer\n certificate={this.certificateSelectedForDetails}\n mobileMediaQueryString={this.mobileMediaQueryString}\n />\n </div>\n </div>\n </div>\n );\n }\n\n private renderSearch() {\n if (!this.filterWithSearch && !this.highlightWithSearch) {\n return null;\n }\n\n return (\n <div class=\"search_section\">\n <input\n onInput={this.handleSearch}\n type=\"search\"\n value=\"\"\n class=\"input_search t-b3 c-black\"\n disabled={!this.certificatesDecoded.length}\n placeholder=\"Search\"\n />\n </div>\n );\n }\n\n private renderEmptyState() {\n const colSpan = this.getMaxColSpanValue();\n\n return (\n <tr>\n <td\n class=\"status_wrapper\"\n colSpan={colSpan}\n >\n <Typography\n variant=\"b1\"\n >\n There are no certificates available.\n </Typography>\n </td>\n </tr>\n );\n }\n\n private renderEmptySearchState() {\n const colSpan = this.getMaxColSpanValue();\n\n return (\n <tr>\n <td\n class=\"status_wrapper\"\n colSpan={colSpan}\n >\n <Typography\n variant=\"b1\"\n >\n No results found for “\n {this.search}\n “\n </Typography>\n </td>\n </tr>\n );\n }\n\n // eslint-disable-next-line class-methods-use-this\n private renderLoadingState() {\n return (\n <div class=\"loading_container\">\n <peculiar-circular-progress />\n </div>\n );\n }\n\n private renderTableBody() {\n if (this.isDecodeInProcess) {\n return null;\n }\n\n if (!this.certificatesDecoded.length) {\n return this.renderEmptyState();\n }\n\n const certificatesRows = this.renderCertificatesRows();\n\n if (this.search && !certificatesRows.length) {\n return this.renderEmptySearchState();\n }\n\n return certificatesRows;\n }\n\n render() {\n return (\n <Host\n data-mobile-screen-view={String(this.mobileScreenView)}\n >\n {this.renderSearch()}\n <table>\n {!this.mobileScreenView && (\n <thead>\n <tr>\n {/* eslint-disable-next-line jsx-a11y/control-has-associated-label */}\n <th />\n {!this.isHasRoots && (\n <th class=\"col_issuer\">\n <Typography variant=\"s2\">\n {l10n.getString('issuer')}\n </Typography>\n </th>\n )}\n <th class=\"col_name\">\n <Typography variant=\"s2\">\n {l10n.getString('name')}\n </Typography>\n </th>\n <th class=\"col_public_key\">\n <Typography variant=\"s2\">\n {l10n.getString('publicKey')}\n </Typography>\n </th>\n <th class=\"col_fingerprint\">\n <Typography variant=\"s2\">\n {l10n.getString('fingerprint')}\n (SHA-1)\n </Typography>\n </th>\n {/* eslint-disable-next-line jsx-a11y/control-has-associated-label */}\n <th />\n </tr>\n </thead>\n )}\n <tbody>\n {this.renderTableBody()}\n </tbody>\n </table>\n\n {this.renderCertificateDetailsModal()}\n {this.isDecodeInProcess && this.renderLoadingState()}\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../dist/types/components";
|
|
2
|
+
|
|
3
|
+
interface PeculiarCircularProgress extends Components.PeculiarCircularProgress, HTMLElement {}
|
|
4
|
+
export const PeculiarCircularProgress: {
|
|
5
|
+
prototype: PeculiarCircularProgress;
|
|
6
|
+
new (): PeculiarCircularProgress;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
|
|
3
|
+
*/
|
|
4
|
+
import { C as CircularProgress, d as defineCustomElement$1 } from './circular-progress.js';
|
|
5
|
+
|
|
6
|
+
const PeculiarCircularProgress = CircularProgress;
|
|
7
|
+
const defineCustomElement = defineCustomElement$1;
|
|
8
|
+
|
|
9
|
+
export { PeculiarCircularProgress, defineCustomElement };
|
|
10
|
+
|
|
11
|
+
//# sourceMappingURL=peculiar-circular-progress.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"peculiar-circular-progress.js","mappings":";;;;;;;;;;","names":[],"sources":[],"sourcesContent":[],"version":3}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../dist/types/components";
|
|
2
|
+
|
|
3
|
+
interface PeculiarCrlViewer extends Components.PeculiarCrlViewer, HTMLElement {}
|
|
4
|
+
export const PeculiarCrlViewer: {
|
|
5
|
+
prototype: PeculiarCrlViewer;
|
|
6
|
+
new (): PeculiarCrlViewer;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
|
|
3
|
+
*/
|
|
4
|
+
import { a as CrlViewer, d as defineCustomElement$1 } from './crl-viewer.js';
|
|
5
|
+
|
|
6
|
+
const PeculiarCrlViewer = CrlViewer;
|
|
7
|
+
const defineCustomElement = defineCustomElement$1;
|
|
8
|
+
|
|
9
|
+
export { PeculiarCrlViewer, defineCustomElement };
|
|
10
|
+
|
|
11
|
+
//# sourceMappingURL=peculiar-crl-viewer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"peculiar-crl-viewer.js","mappings":";;;;;;;;;;","names":[],"sources":[],"sourcesContent":[],"version":3}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../dist/types/components";
|
|
2
|
+
|
|
3
|
+
interface PeculiarCsrViewer extends Components.PeculiarCsrViewer, HTMLElement {}
|
|
4
|
+
export const PeculiarCsrViewer: {
|
|
5
|
+
prototype: PeculiarCsrViewer;
|
|
6
|
+
new (): PeculiarCsrViewer;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
|
|
3
|
+
*/
|
|
4
|
+
import { a as CsrViewer, d as defineCustomElement$1 } from './csr-viewer.js';
|
|
5
|
+
|
|
6
|
+
const PeculiarCsrViewer = CsrViewer;
|
|
7
|
+
const defineCustomElement = defineCustomElement$1;
|
|
8
|
+
|
|
9
|
+
export { PeculiarCsrViewer, defineCustomElement };
|
|
10
|
+
|
|
11
|
+
//# sourceMappingURL=peculiar-csr-viewer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"peculiar-csr-viewer.js","mappings":";;;;;;;;;;","names":[],"sources":[],"sourcesContent":[],"version":3}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../dist/types/components";
|
|
2
|
+
|
|
3
|
+
interface PeculiarHighlightWords extends Components.PeculiarHighlightWords, HTMLElement {}
|
|
4
|
+
export const PeculiarHighlightWords: {
|
|
5
|
+
prototype: PeculiarHighlightWords;
|
|
6
|
+
new (): PeculiarHighlightWords;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
|
|
3
|
+
*/
|
|
4
|
+
import { H as HighlightWords, d as defineCustomElement$1 } from './highlight-words.js';
|
|
5
|
+
|
|
6
|
+
const PeculiarHighlightWords = HighlightWords;
|
|
7
|
+
const defineCustomElement = defineCustomElement$1;
|
|
8
|
+
|
|
9
|
+
export { PeculiarHighlightWords, defineCustomElement };
|
|
10
|
+
|
|
11
|
+
//# sourceMappingURL=peculiar-highlight-words.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"peculiar-highlight-words.js","mappings":";;;;;;;;;;","names":[],"sources":[],"sourcesContent":[],"version":3}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../dist/types/components";
|
|
2
|
+
|
|
3
|
+
interface PeculiarTextHider extends Components.PeculiarTextHider, HTMLElement {}
|
|
4
|
+
export const PeculiarTextHider: {
|
|
5
|
+
prototype: PeculiarTextHider;
|
|
6
|
+
new (): PeculiarTextHider;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|