@peculiar/certificates-viewer 3.9.0 → 3.10.1-alpha.12

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.
Files changed (554) hide show
  1. package/components/arrow_top.js +34 -0
  2. package/components/arrow_top.js.map +1 -0
  3. package/components/attribute-certificate-viewer.js +281 -0
  4. package/components/attribute-certificate-viewer.js.map +1 -0
  5. package/components/button-menu.js +64 -0
  6. package/components/button-menu.js.map +1 -0
  7. package/components/button.js +74 -0
  8. package/components/button.js.map +1 -0
  9. package/components/certificate-viewer.js +300 -0
  10. package/components/certificate-viewer.js.map +1 -0
  11. package/components/circular-progress.js +48 -0
  12. package/components/circular-progress.js.map +1 -0
  13. package/components/crl-viewer.js +263 -0
  14. package/components/crl-viewer.js.map +1 -0
  15. package/components/csr-viewer.js +233 -0
  16. package/components/csr-viewer.js.map +1 -0
  17. package/components/custom-elements.d.ts +2 -0
  18. package/{dist/esm/download-91511aeb.js → components/download.js} +2 -0
  19. package/components/download.js.map +1 -0
  20. package/components/highlight-words.js +60 -0
  21. package/components/highlight-words.js.map +1 -0
  22. package/components/index.d.ts +33 -0
  23. package/components/index.js +7 -0
  24. package/components/index.js.map +1 -0
  25. package/components/index2.js +299 -0
  26. package/components/index2.js.map +1 -0
  27. package/components/issuer_name.js +26 -0
  28. package/components/issuer_name.js.map +1 -0
  29. package/components/miscellaneous.js +13420 -0
  30. package/components/miscellaneous.js.map +1 -0
  31. package/components/package.json +9 -0
  32. package/components/peculiar-attribute-certificate-viewer.d.ts +11 -0
  33. package/components/peculiar-attribute-certificate-viewer.js +11 -0
  34. package/components/peculiar-attribute-certificate-viewer.js.map +1 -0
  35. package/components/peculiar-button-menu.d.ts +11 -0
  36. package/components/peculiar-button-menu.js +11 -0
  37. package/components/peculiar-button-menu.js.map +1 -0
  38. package/components/peculiar-certificate-decoder.d.ts +11 -0
  39. package/components/peculiar-certificate-decoder.js +234 -0
  40. package/components/peculiar-certificate-decoder.js.map +1 -0
  41. package/components/peculiar-certificate-viewer.d.ts +11 -0
  42. package/components/peculiar-certificate-viewer.js +11 -0
  43. package/components/peculiar-certificate-viewer.js.map +1 -0
  44. package/components/peculiar-certificates-viewer.d.ts +11 -0
  45. package/components/peculiar-certificates-viewer.js +382 -0
  46. package/components/peculiar-certificates-viewer.js.map +1 -0
  47. package/components/peculiar-circular-progress.d.ts +11 -0
  48. package/components/peculiar-circular-progress.js +11 -0
  49. package/components/peculiar-circular-progress.js.map +1 -0
  50. package/components/peculiar-crl-viewer.d.ts +11 -0
  51. package/components/peculiar-crl-viewer.js +11 -0
  52. package/components/peculiar-crl-viewer.js.map +1 -0
  53. package/components/peculiar-csr-viewer.d.ts +11 -0
  54. package/components/peculiar-csr-viewer.js +11 -0
  55. package/components/peculiar-csr-viewer.js.map +1 -0
  56. package/components/peculiar-highlight-words.d.ts +11 -0
  57. package/components/peculiar-highlight-words.js +11 -0
  58. package/components/peculiar-highlight-words.js.map +1 -0
  59. package/components/peculiar-text-hider.d.ts +11 -0
  60. package/components/peculiar-text-hider.js +42 -0
  61. package/components/peculiar-text-hider.js.map +1 -0
  62. package/components/subject_name.js +71 -0
  63. package/components/subject_name.js.map +1 -0
  64. package/dist/cjs/arrow_top-834fb7ec.js +37 -0
  65. package/dist/cjs/arrow_top-834fb7ec.js.map +1 -0
  66. package/dist/cjs/button-14e2b73f.js +77 -0
  67. package/dist/cjs/button-14e2b73f.js.map +1 -0
  68. package/dist/cjs/{certification_request-b9ac73f2.js → certification_request-c0cafa72.js} +240 -73
  69. package/dist/cjs/certification_request-c0cafa72.js.map +1 -0
  70. package/dist/cjs/{crl-57727a07.js → crl-b4322166.js} +8 -7
  71. package/dist/cjs/crl-b4322166.js.map +1 -0
  72. package/dist/cjs/download-254ddc57.js +23 -0
  73. package/dist/cjs/download-254ddc57.js.map +1 -0
  74. package/dist/cjs/{download-93f7b773.js → download-972dda8a.js} +2 -0
  75. package/dist/cjs/download-972dda8a.js.map +1 -0
  76. package/dist/cjs/index-efd561e9.js +2477 -0
  77. package/dist/cjs/index-efd561e9.js.map +1 -0
  78. package/dist/cjs/index.cjs.js +3 -1
  79. package/dist/cjs/index.cjs.js.map +1 -0
  80. package/dist/cjs/loader.cjs.js +6 -12
  81. package/dist/cjs/loader.cjs.js.map +1 -0
  82. package/dist/cjs/{miscellaneous-07184a47.js → miscellaneous-806a04a5.js} +87 -71
  83. package/dist/cjs/miscellaneous-806a04a5.js.map +1 -0
  84. package/dist/cjs/peculiar-attribute-certificate-viewer_3.cjs.entry.js +92 -35
  85. package/dist/cjs/peculiar-attribute-certificate-viewer_3.cjs.entry.js.map +1 -0
  86. package/dist/cjs/peculiar-button-menu_3.cjs.entry.js +110 -0
  87. package/dist/cjs/peculiar-button-menu_3.cjs.entry.js.map +1 -0
  88. package/dist/cjs/peculiar-certificate-decoder.cjs.entry.js +30 -19
  89. package/dist/cjs/peculiar-certificate-decoder.cjs.entry.js.map +1 -0
  90. package/dist/cjs/peculiar-certificate-viewer.cjs.entry.js +34 -11
  91. package/dist/cjs/peculiar-certificate-viewer.cjs.entry.js.map +1 -0
  92. package/dist/cjs/peculiar-certificates-viewer.cjs.entry.js +183 -85
  93. package/dist/cjs/peculiar-certificates-viewer.cjs.entry.js.map +1 -0
  94. package/dist/cjs/peculiar-text-hider.cjs.entry.js +7 -13
  95. package/dist/cjs/peculiar-text-hider.cjs.entry.js.map +1 -0
  96. package/dist/cjs/peculiar.cjs.js +10 -57
  97. package/dist/cjs/peculiar.cjs.js.map +1 -0
  98. package/dist/cjs/{x509_certificate-da0fc87d.js → x509_certificate-989b1435.js} +5 -4
  99. package/dist/cjs/x509_certificate-989b1435.js.map +1 -0
  100. package/dist/collection/collection-manifest.json +12 -16
  101. package/dist/collection/components/attribute-certificate-viewer/attribute-certificate-viewer.js +189 -145
  102. package/dist/collection/components/attribute-certificate-viewer/attribute-certificate-viewer.js.map +1 -0
  103. package/dist/collection/components/button/button.js +14 -126
  104. package/dist/collection/components/button/button.js.map +1 -0
  105. package/dist/collection/components/button/index.js +5 -0
  106. package/dist/collection/components/button/index.js.map +1 -0
  107. package/dist/collection/components/button-menu/button-menu.css +46 -0
  108. package/dist/collection/components/button-menu/button-menu.js +78 -0
  109. package/dist/collection/components/button-menu/button-menu.js.map +1 -0
  110. package/dist/collection/components/certificate-decoder/certificate-decoder.css +456 -44
  111. package/dist/collection/components/certificate-decoder/certificate-decoder.js +109 -101
  112. package/dist/collection/components/certificate-decoder/certificate-decoder.js.map +1 -0
  113. package/dist/collection/components/certificate-details-parts/attributes/activity_description_attribute.js +6 -11
  114. package/dist/collection/components/certificate-details-parts/attributes/activity_description_attribute.js.map +1 -0
  115. package/dist/collection/components/certificate-details-parts/attributes/as_string_attribute.js +5 -5
  116. package/dist/collection/components/certificate-details-parts/attributes/as_string_attribute.js.map +1 -0
  117. package/dist/collection/components/certificate-details-parts/attributes/basic_attribute.js +5 -6
  118. package/dist/collection/components/certificate-details-parts/attributes/basic_attribute.js.map +1 -0
  119. package/dist/collection/components/certificate-details-parts/attributes/challenge_password_attribute.js +5 -5
  120. package/dist/collection/components/certificate-details-parts/attributes/challenge_password_attribute.js.map +1 -0
  121. package/dist/collection/components/certificate-details-parts/attributes/index.js +16 -15
  122. package/dist/collection/components/certificate-details-parts/attributes/index.js.map +1 -0
  123. package/dist/collection/components/certificate-details-parts/attributes/insurance_value_attribute.js +5 -5
  124. package/dist/collection/components/certificate-details-parts/attributes/insurance_value_attribute.js.map +1 -0
  125. package/dist/collection/components/certificate-details-parts/attributes/name_attribute.js +5 -5
  126. package/dist/collection/components/certificate-details-parts/attributes/name_attribute.js.map +1 -0
  127. package/dist/collection/components/certificate-details-parts/attributes/name_part.js +4 -3
  128. package/dist/collection/components/certificate-details-parts/attributes/name_part.js.map +1 -0
  129. package/dist/collection/components/certificate-details-parts/attributes/type_relationship_attribute.js +5 -4
  130. package/dist/collection/components/certificate-details-parts/attributes/type_relationship_attribute.js.map +1 -0
  131. package/dist/collection/components/certificate-details-parts/attributes/unstructured_name_attribute.js +5 -5
  132. package/dist/collection/components/certificate-details-parts/attributes/unstructured_name_attribute.js.map +1 -0
  133. package/dist/collection/components/certificate-details-parts/attributes/valuation_ranking_attribute.js +5 -5
  134. package/dist/collection/components/certificate-details-parts/attributes/valuation_ranking_attribute.js.map +1 -0
  135. package/dist/collection/components/certificate-details-parts/attributes/web_gdpr_attribute.js +6 -13
  136. package/dist/collection/components/certificate-details-parts/attributes/web_gdpr_attribute.js.map +1 -0
  137. package/dist/collection/components/certificate-details-parts/basic_information.js +4 -3
  138. package/dist/collection/components/certificate-details-parts/basic_information.js.map +1 -0
  139. package/dist/collection/components/certificate-details-parts/extensions/archive_rev_info_extension.js +5 -5
  140. package/dist/collection/components/certificate-details-parts/extensions/archive_rev_info_extension.js.map +1 -0
  141. package/dist/collection/components/certificate-details-parts/extensions/as_string_extension.js +5 -5
  142. package/dist/collection/components/certificate-details-parts/extensions/as_string_extension.js.map +1 -0
  143. package/dist/collection/components/certificate-details-parts/extensions/attribute_value.js +2 -1
  144. package/dist/collection/components/certificate-details-parts/extensions/attribute_value.js.map +1 -0
  145. package/dist/collection/components/certificate-details-parts/extensions/authority_key_identifier_extension.js +10 -15
  146. package/dist/collection/components/certificate-details-parts/extensions/authority_key_identifier_extension.js.map +1 -0
  147. package/dist/collection/components/certificate-details-parts/extensions/basic_constraints_extension.js +6 -7
  148. package/dist/collection/components/certificate-details-parts/extensions/basic_constraints_extension.js.map +1 -0
  149. package/dist/collection/components/certificate-details-parts/extensions/basic_extension.js +5 -6
  150. package/dist/collection/components/certificate-details-parts/extensions/basic_extension.js.map +1 -0
  151. package/dist/collection/components/certificate-details-parts/extensions/biometric_syntax_extension.js +8 -12
  152. package/dist/collection/components/certificate-details-parts/extensions/biometric_syntax_extension.js.map +1 -0
  153. package/dist/collection/components/certificate-details-parts/extensions/ca_version_extension.js +5 -6
  154. package/dist/collection/components/certificate-details-parts/extensions/ca_version_extension.js.map +1 -0
  155. package/dist/collection/components/certificate-details-parts/extensions/certificate_policies_extension.js +26 -27
  156. package/dist/collection/components/certificate-details-parts/extensions/certificate_policies_extension.js.map +1 -0
  157. package/dist/collection/components/certificate-details-parts/extensions/certificate_template_extension.js +5 -7
  158. package/dist/collection/components/certificate-details-parts/extensions/certificate_template_extension.js.map +1 -0
  159. package/dist/collection/components/certificate-details-parts/extensions/certificate_transparency_extension.js +8 -13
  160. package/dist/collection/components/certificate-details-parts/extensions/certificate_transparency_extension.js.map +1 -0
  161. package/dist/collection/components/certificate-details-parts/extensions/crl_distribution_points_extension.js +4 -3
  162. package/dist/collection/components/certificate-details-parts/extensions/crl_distribution_points_extension.js.map +1 -0
  163. package/dist/collection/components/certificate-details-parts/extensions/crl_number_extension.js +6 -6
  164. package/dist/collection/components/certificate-details-parts/extensions/crl_number_extension.js.map +1 -0
  165. package/dist/collection/components/certificate-details-parts/extensions/crl_reason_extension.js +5 -5
  166. package/dist/collection/components/certificate-details-parts/extensions/crl_reason_extension.js.map +1 -0
  167. package/dist/collection/components/certificate-details-parts/extensions/enroll_cert_type_extension.js +5 -5
  168. package/dist/collection/components/certificate-details-parts/extensions/enroll_cert_type_extension.js.map +1 -0
  169. package/dist/collection/components/certificate-details-parts/extensions/entrust_version_info_extension.js +5 -6
  170. package/dist/collection/components/certificate-details-parts/extensions/entrust_version_info_extension.js.map +1 -0
  171. package/dist/collection/components/certificate-details-parts/extensions/extended_key_usage_extension.js +7 -7
  172. package/dist/collection/components/certificate-details-parts/extensions/extended_key_usage_extension.js.map +1 -0
  173. package/dist/collection/components/certificate-details-parts/extensions/general_name_part.js +8 -7
  174. package/dist/collection/components/certificate-details-parts/extensions/general_name_part.js.map +1 -0
  175. package/dist/collection/components/certificate-details-parts/extensions/index.js +46 -45
  176. package/dist/collection/components/certificate-details-parts/extensions/index.js.map +1 -0
  177. package/dist/collection/components/certificate-details-parts/extensions/info_access_syntax_extension.js +8 -9
  178. package/dist/collection/components/certificate-details-parts/extensions/info_access_syntax_extension.js.map +1 -0
  179. package/dist/collection/components/certificate-details-parts/extensions/issuing_distribution_point_extension.js +7 -11
  180. package/dist/collection/components/certificate-details-parts/extensions/issuing_distribution_point_extension.js.map +1 -0
  181. package/dist/collection/components/certificate-details-parts/extensions/key_usage_extension.js +5 -5
  182. package/dist/collection/components/certificate-details-parts/extensions/key_usage_extension.js.map +1 -0
  183. package/dist/collection/components/certificate-details-parts/extensions/lei_extension.js +5 -5
  184. package/dist/collection/components/certificate-details-parts/extensions/lei_extension.js.map +1 -0
  185. package/dist/collection/components/certificate-details-parts/extensions/lei_role_extennsion.js +5 -5
  186. package/dist/collection/components/certificate-details-parts/extensions/lei_role_extennsion.js.map +1 -0
  187. package/dist/collection/components/certificate-details-parts/extensions/logotype_extension.js +8 -11
  188. package/dist/collection/components/certificate-details-parts/extensions/logotype_extension.js.map +1 -0
  189. package/dist/collection/components/certificate-details-parts/extensions/name_constraints_extension.js +4 -3
  190. package/dist/collection/components/certificate-details-parts/extensions/name_constraints_extension.js.map +1 -0
  191. package/dist/collection/components/certificate-details-parts/extensions/netscape_cert_type_extension.js +5 -5
  192. package/dist/collection/components/certificate-details-parts/extensions/netscape_cert_type_extension.js.map +1 -0
  193. package/dist/collection/components/certificate-details-parts/extensions/netscape_comment_extension.js +5 -5
  194. package/dist/collection/components/certificate-details-parts/extensions/netscape_comment_extension.js.map +1 -0
  195. package/dist/collection/components/certificate-details-parts/extensions/policy_constraints_extension.js +6 -7
  196. package/dist/collection/components/certificate-details-parts/extensions/policy_constraints_extension.js.map +1 -0
  197. package/dist/collection/components/certificate-details-parts/extensions/policy_mappings_extension.js +5 -4
  198. package/dist/collection/components/certificate-details-parts/extensions/policy_mappings_extension.js.map +1 -0
  199. package/dist/collection/components/certificate-details-parts/extensions/private_key_usage_period_extension.js +6 -7
  200. package/dist/collection/components/certificate-details-parts/extensions/private_key_usage_period_extension.js.map +1 -0
  201. package/dist/collection/components/certificate-details-parts/extensions/qc_statements_extension.js +13 -16
  202. package/dist/collection/components/certificate-details-parts/extensions/qc_statements_extension.js.map +1 -0
  203. package/dist/collection/components/certificate-details-parts/extensions/subject_alternative_name_extension.js +4 -3
  204. package/dist/collection/components/certificate-details-parts/extensions/subject_alternative_name_extension.js.map +1 -0
  205. package/dist/collection/components/certificate-details-parts/extensions/subject_directory_attributes_extension.js +8 -9
  206. package/dist/collection/components/certificate-details-parts/extensions/subject_directory_attributes_extension.js.map +1 -0
  207. package/dist/collection/components/certificate-details-parts/extensions/subject_key_identifier_extension.js +10 -15
  208. package/dist/collection/components/certificate-details-parts/extensions/subject_key_identifier_extension.js.map +1 -0
  209. package/dist/collection/components/certificate-details-parts/extensions/timestamp_extension.js +7 -9
  210. package/dist/collection/components/certificate-details-parts/extensions/timestamp_extension.js.map +1 -0
  211. package/dist/collection/components/certificate-details-parts/extensions/tn_auth_list_extension.js +4 -3
  212. package/dist/collection/components/certificate-details-parts/extensions/tn_auth_list_extension.js.map +1 -0
  213. package/dist/collection/components/certificate-details-parts/holder.js +8 -11
  214. package/dist/collection/components/certificate-details-parts/holder.js.map +1 -0
  215. package/dist/collection/components/certificate-details-parts/index.js +1 -0
  216. package/dist/collection/components/certificate-details-parts/index.js.map +1 -0
  217. package/dist/collection/components/certificate-details-parts/issuer.js +5 -4
  218. package/dist/collection/components/certificate-details-parts/issuer.js.map +1 -0
  219. package/dist/collection/components/certificate-details-parts/issuer_name.js +6 -4
  220. package/dist/collection/components/certificate-details-parts/issuer_name.js.map +1 -0
  221. package/dist/collection/components/certificate-details-parts/miscellaneous.js +8 -13
  222. package/dist/collection/components/certificate-details-parts/miscellaneous.js.map +1 -0
  223. package/dist/collection/components/certificate-details-parts/public_key.js +8 -7
  224. package/dist/collection/components/certificate-details-parts/public_key.js.map +1 -0
  225. package/dist/collection/components/certificate-details-parts/revoked_certificates.js +9 -11
  226. package/dist/collection/components/certificate-details-parts/revoked_certificates.js.map +1 -0
  227. package/dist/collection/components/certificate-details-parts/row.js +13 -18
  228. package/dist/collection/components/certificate-details-parts/row.js.map +1 -0
  229. package/dist/collection/components/certificate-details-parts/signature.js +5 -4
  230. package/dist/collection/components/certificate-details-parts/signature.js.map +1 -0
  231. package/dist/collection/components/certificate-details-parts/subject_name.js +4 -3
  232. package/dist/collection/components/certificate-details-parts/subject_name.js.map +1 -0
  233. package/dist/collection/components/certificate-details-parts/thumbprints.js +4 -3
  234. package/dist/collection/components/certificate-details-parts/thumbprints.js.map +1 -0
  235. package/dist/collection/components/certificate-summary/certificate-summary.js +9 -77
  236. package/dist/collection/components/certificate-summary/certificate-summary.js.map +1 -0
  237. package/dist/collection/components/certificate-summary/index.js +5 -0
  238. package/dist/collection/components/certificate-summary/index.js.map +1 -0
  239. package/dist/collection/components/certificate-viewer/certificate-viewer.css +470 -104
  240. package/dist/collection/components/certificate-viewer/certificate-viewer.js +206 -178
  241. package/dist/collection/components/certificate-viewer/certificate-viewer.js.map +1 -0
  242. package/dist/collection/components/certificates-viewer/certificates-viewer.css +540 -267
  243. package/dist/collection/components/certificates-viewer/certificates-viewer.js +261 -266
  244. package/dist/collection/components/certificates-viewer/certificates-viewer.js.map +1 -0
  245. package/dist/collection/components/circular-progress/circular-progress.css +2 -11
  246. package/dist/collection/components/circular-progress/circular-progress.js +60 -63
  247. package/dist/collection/components/circular-progress/circular-progress.js.map +1 -0
  248. package/dist/collection/components/crl-viewer/crl-viewer.js +166 -139
  249. package/dist/collection/components/crl-viewer/crl-viewer.js.map +1 -0
  250. package/dist/collection/components/csr-viewer/csr-viewer.js +149 -124
  251. package/dist/collection/components/csr-viewer/csr-viewer.js.map +1 -0
  252. package/dist/collection/components/highlight-words/highlight-words.css +1 -9
  253. package/dist/collection/components/highlight-words/highlight-words.js +35 -28
  254. package/dist/collection/components/highlight-words/highlight-words.js.map +1 -0
  255. package/dist/collection/components/icons/actions.js +16 -0
  256. package/dist/collection/components/icons/actions.js.map +1 -0
  257. package/dist/collection/components/icons/arrow_bottom.js +16 -0
  258. package/dist/collection/components/icons/arrow_bottom.js.map +1 -0
  259. package/dist/collection/components/icons/arrow_top.js +16 -0
  260. package/dist/collection/components/icons/arrow_top.js.map +1 -0
  261. package/dist/collection/components/icons/cross.js +16 -0
  262. package/dist/collection/components/icons/cross.js.map +1 -0
  263. package/dist/collection/components/icons/details.js +16 -0
  264. package/dist/collection/components/icons/details.js.map +1 -0
  265. package/dist/collection/components/icons/download.js +16 -0
  266. package/dist/collection/components/icons/download.js.map +1 -0
  267. package/dist/collection/components/icons/index.js +11 -0
  268. package/dist/collection/components/icons/index.js.map +1 -0
  269. package/dist/collection/components/icons/link.js +16 -0
  270. package/dist/collection/components/icons/link.js.map +1 -0
  271. package/dist/collection/components/link/index.js +5 -0
  272. package/dist/collection/components/link/index.js.map +1 -0
  273. package/dist/collection/components/link/link.js +9 -61
  274. package/dist/collection/components/link/link.js.map +1 -0
  275. package/dist/collection/components/text-hider/text-hider.css +9 -36
  276. package/dist/collection/components/text-hider/text-hider.js +21 -68
  277. package/dist/collection/components/text-hider/text-hider.js.map +1 -0
  278. package/dist/collection/components/typography/index.js +5 -0
  279. package/dist/collection/components/typography/index.js.map +1 -0
  280. package/dist/collection/components/typography/typography.js +39 -126
  281. package/dist/collection/components/typography/typography.js.map +1 -0
  282. package/dist/collection/constants/logs.js +1 -0
  283. package/dist/collection/constants/logs.js.map +1 -0
  284. package/dist/collection/constants/oids.js +5 -2
  285. package/dist/collection/constants/oids.js.map +1 -0
  286. package/dist/collection/crypto/asn_data.js +13 -7
  287. package/dist/collection/crypto/asn_data.js.map +1 -0
  288. package/dist/collection/crypto/attribute.js +11 -10
  289. package/dist/collection/crypto/attribute.js.map +1 -0
  290. package/dist/collection/crypto/crl.js +9 -8
  291. package/dist/collection/crypto/crl.js.map +1 -0
  292. package/dist/collection/crypto/csr.js +11 -10
  293. package/dist/collection/crypto/csr.js.map +1 -0
  294. package/dist/collection/crypto/extension.js +16 -15
  295. package/dist/collection/crypto/extension.js.map +1 -0
  296. package/dist/collection/crypto/index.js +1 -0
  297. package/dist/collection/crypto/index.js.map +1 -0
  298. package/dist/collection/crypto/name.js +15 -9
  299. package/dist/collection/crypto/name.js.map +1 -0
  300. package/dist/collection/crypto/provider.js +4 -3
  301. package/dist/collection/crypto/provider.js.map +1 -0
  302. package/dist/collection/crypto/utils.js +4 -3
  303. package/dist/collection/crypto/utils.js.map +1 -0
  304. package/dist/collection/crypto/x509_attribute_certificate.js +9 -8
  305. package/dist/collection/crypto/x509_attribute_certificate.js.map +1 -0
  306. package/dist/collection/crypto/x509_certificate.js +12 -11
  307. package/dist/collection/crypto/x509_certificate.js.map +1 -0
  308. package/dist/collection/index.js +1 -0
  309. package/dist/collection/index.js.map +1 -0
  310. package/dist/collection/locales/en.json +4 -3
  311. package/dist/collection/utils/date_formatter.js +3 -2
  312. package/dist/collection/utils/date_formatter.js.map +1 -0
  313. package/dist/collection/utils/download.js +3 -2
  314. package/dist/collection/utils/download.js.map +1 -0
  315. package/dist/collection/utils/download_from_buffer.js +1 -0
  316. package/dist/collection/utils/download_from_buffer.js.map +1 -0
  317. package/dist/collection/utils/get_string_by_oid.js +2 -1
  318. package/dist/collection/utils/get_string_by_oid.js.map +1 -0
  319. package/dist/collection/utils/index.js +2 -1
  320. package/dist/collection/utils/index.js.map +1 -0
  321. package/dist/collection/utils/is_link.js +1 -0
  322. package/dist/collection/utils/is_link.js.map +1 -0
  323. package/dist/collection/utils/l10n.js +2 -1
  324. package/dist/collection/utils/l10n.js.map +1 -0
  325. package/dist/collection/utils/read_file.js +1 -0
  326. package/dist/collection/utils/read_file.js.map +1 -0
  327. package/dist/collection/utils/third_party_links.js +1 -0
  328. package/dist/collection/utils/third_party_links.js.map +1 -0
  329. package/dist/collection/utils/validator.js +1 -0
  330. package/dist/collection/utils/validator.js.map +1 -0
  331. package/dist/collection/www-copy/index.js +138 -32
  332. package/dist/esm/arrow_top-efd3a56d.js +34 -0
  333. package/dist/esm/arrow_top-efd3a56d.js.map +1 -0
  334. package/dist/esm/button-35146bdd.js +74 -0
  335. package/dist/esm/button-35146bdd.js.map +1 -0
  336. package/dist/esm/{certification_request-db83dd19.js → certification_request-5cadde9f.js} +175 -11
  337. package/dist/esm/certification_request-5cadde9f.js.map +1 -0
  338. package/dist/esm/{crl-34288843.js → crl-11670c3e.js} +7 -6
  339. package/dist/esm/crl-11670c3e.js.map +1 -0
  340. package/dist/esm/download-0cc3077a.js +21 -0
  341. package/dist/esm/download-0cc3077a.js.map +1 -0
  342. package/dist/esm/download-57c5bf8f.js +470 -0
  343. package/dist/esm/download-57c5bf8f.js.map +1 -0
  344. package/dist/esm/index-4079bbb5.js +2448 -0
  345. package/dist/esm/index-4079bbb5.js.map +1 -0
  346. package/dist/esm/index.js +3 -1
  347. package/dist/esm/index.js.map +1 -0
  348. package/dist/esm/loader.js +6 -12
  349. package/dist/esm/loader.js.map +1 -0
  350. package/dist/esm/{miscellaneous-ee8e1994.js → miscellaneous-1d4e8b41.js} +54 -38
  351. package/dist/esm/miscellaneous-1d4e8b41.js.map +1 -0
  352. package/dist/esm/peculiar-attribute-certificate-viewer_3.entry.js +80 -23
  353. package/dist/esm/peculiar-attribute-certificate-viewer_3.entry.js.map +1 -0
  354. package/dist/esm/peculiar-button-menu_3.entry.js +104 -0
  355. package/dist/esm/peculiar-button-menu_3.entry.js.map +1 -0
  356. package/dist/esm/peculiar-certificate-decoder.entry.js +30 -19
  357. package/dist/esm/peculiar-certificate-decoder.entry.js.map +1 -0
  358. package/dist/esm/peculiar-certificate-viewer.entry.js +34 -11
  359. package/dist/esm/peculiar-certificate-viewer.entry.js.map +1 -0
  360. package/dist/esm/peculiar-certificates-viewer.entry.js +183 -85
  361. package/dist/esm/peculiar-certificates-viewer.entry.js.map +1 -0
  362. package/dist/esm/peculiar-text-hider.entry.js +7 -13
  363. package/dist/esm/peculiar-text-hider.entry.js.map +1 -0
  364. package/dist/esm/peculiar.js +8 -58
  365. package/dist/esm/peculiar.js.map +1 -0
  366. package/dist/esm/{x509_certificate-1acb3564.js → x509_certificate-dfae6999.js} +4 -3
  367. package/dist/esm/x509_certificate-dfae6999.js.map +1 -0
  368. package/dist/esm-es5/arrow_top-efd3a56d.js +19 -0
  369. package/dist/esm-es5/arrow_top-efd3a56d.js.map +1 -0
  370. package/dist/esm-es5/button-35146bdd.js +19 -0
  371. package/dist/esm-es5/button-35146bdd.js.map +1 -0
  372. package/dist/esm-es5/certification_request-5cadde9f.js +97 -0
  373. package/dist/esm-es5/certification_request-5cadde9f.js.map +1 -0
  374. package/dist/esm-es5/crl-11670c3e.js +33 -0
  375. package/dist/esm-es5/crl-11670c3e.js.map +1 -0
  376. package/dist/esm-es5/download-0cc3077a.js +12 -0
  377. package/dist/esm-es5/download-0cc3077a.js.map +1 -0
  378. package/dist/esm-es5/download-57c5bf8f.js +19 -0
  379. package/dist/esm-es5/download-57c5bf8f.js.map +1 -0
  380. package/dist/esm-es5/index-4079bbb5.js +6 -0
  381. package/dist/esm-es5/index-4079bbb5.js.map +1 -0
  382. package/dist/esm-es5/index.js +5 -0
  383. package/dist/esm-es5/index.js.map +1 -0
  384. package/dist/esm-es5/loader.js +5 -0
  385. package/dist/esm-es5/loader.js.map +1 -0
  386. package/dist/esm-es5/miscellaneous-1d4e8b41.js +355 -0
  387. package/dist/esm-es5/miscellaneous-1d4e8b41.js.map +1 -0
  388. package/dist/esm-es5/peculiar-attribute-certificate-viewer_3.entry.js +110 -0
  389. package/dist/esm-es5/peculiar-attribute-certificate-viewer_3.entry.js.map +1 -0
  390. package/dist/esm-es5/peculiar-button-menu_3.entry.js +12 -0
  391. package/dist/esm-es5/peculiar-button-menu_3.entry.js.map +1 -0
  392. package/dist/esm-es5/peculiar-certificate-decoder.entry.js +12 -0
  393. package/dist/esm-es5/peculiar-certificate-decoder.entry.js.map +1 -0
  394. package/dist/esm-es5/peculiar-certificate-viewer.entry.js +5 -0
  395. package/dist/esm-es5/peculiar-certificate-viewer.entry.js.map +1 -0
  396. package/dist/esm-es5/peculiar-certificates-viewer.entry.js +33 -0
  397. package/dist/esm-es5/peculiar-certificates-viewer.entry.js.map +1 -0
  398. package/dist/esm-es5/peculiar-text-hider.entry.js +5 -0
  399. package/dist/esm-es5/peculiar-text-hider.entry.js.map +1 -0
  400. package/dist/esm-es5/peculiar.js +5 -0
  401. package/dist/esm-es5/peculiar.js.map +1 -0
  402. package/dist/esm-es5/x509_certificate-dfae6999.js +12 -0
  403. package/dist/esm-es5/x509_certificate-dfae6999.js.map +1 -0
  404. package/dist/index.js +1 -1
  405. package/dist/peculiar/index.esm.js +2 -1
  406. package/dist/peculiar/index.esm.js.map +1 -0
  407. package/dist/peculiar/locales/en.json +4 -3
  408. package/dist/peculiar/p-0b356bb5.js +6 -0
  409. package/dist/peculiar/p-0b356bb5.js.map +1 -0
  410. package/dist/peculiar/p-0bdcdbf7.system.js +355 -0
  411. package/dist/peculiar/p-0bdcdbf7.system.js.map +1 -0
  412. package/dist/peculiar/p-17e3c47b.js +12 -0
  413. package/dist/peculiar/p-17e3c47b.js.map +1 -0
  414. package/dist/peculiar/p-23555789.system.entry.js +34 -0
  415. package/dist/peculiar/p-23555789.system.entry.js.map +1 -0
  416. package/dist/peculiar/p-2fcad8cb.system.js +20 -0
  417. package/dist/peculiar/p-2fcad8cb.system.js.map +1 -0
  418. package/dist/peculiar/p-31586b23.system.js +13 -0
  419. package/dist/peculiar/p-31586b23.system.js.map +1 -0
  420. package/dist/peculiar/p-43eb3721.js +33 -0
  421. package/dist/peculiar/p-43eb3721.js.map +1 -0
  422. package/dist/peculiar/p-5823e6e8.entry.js +12 -0
  423. package/dist/peculiar/p-5823e6e8.entry.js.map +1 -0
  424. package/dist/peculiar/p-596836a7.entry.js +33 -0
  425. package/dist/peculiar/p-596836a7.entry.js.map +1 -0
  426. package/dist/peculiar/p-5aabeba7.system.js +6 -0
  427. package/dist/peculiar/p-5aabeba7.system.js.map +1 -0
  428. package/dist/peculiar/p-6667fe6e.system.js +34 -0
  429. package/dist/peculiar/p-6667fe6e.system.js.map +1 -0
  430. package/dist/peculiar/p-6e79b9c8.js +12 -0
  431. package/dist/peculiar/p-6e79b9c8.js.map +1 -0
  432. package/dist/peculiar/p-709994c1.js +19 -0
  433. package/dist/peculiar/p-709994c1.js.map +1 -0
  434. package/dist/peculiar/p-74c241e7.js +97 -0
  435. package/dist/peculiar/p-74c241e7.js.map +1 -0
  436. package/dist/peculiar/p-7f9beaa8.js +19 -0
  437. package/dist/peculiar/p-7f9beaa8.js.map +1 -0
  438. package/dist/peculiar/p-80832207.system.js +5 -0
  439. package/dist/peculiar/p-80832207.system.js.map +1 -0
  440. package/dist/peculiar/p-8748391f.system.entry.js +5 -0
  441. package/dist/peculiar/p-8748391f.system.entry.js.map +1 -0
  442. package/dist/peculiar/p-882e1281.entry.js +12 -0
  443. package/dist/peculiar/p-882e1281.entry.js.map +1 -0
  444. package/dist/peculiar/p-90459cec.entry.js +5 -0
  445. package/dist/peculiar/p-90459cec.entry.js.map +1 -0
  446. package/dist/peculiar/p-97688065.js +355 -0
  447. package/dist/peculiar/p-97688065.js.map +1 -0
  448. package/dist/peculiar/p-99e3aa0c.system.entry.js +111 -0
  449. package/dist/peculiar/p-99e3aa0c.system.entry.js.map +1 -0
  450. package/dist/peculiar/p-9b4a8101.system.entry.js +5 -0
  451. package/dist/peculiar/p-9b4a8101.system.entry.js.map +1 -0
  452. package/dist/peculiar/p-a053c132.js +19 -0
  453. package/dist/peculiar/p-a053c132.js.map +1 -0
  454. package/dist/peculiar/p-a41ecd82.entry.js +5 -0
  455. package/dist/peculiar/p-a41ecd82.entry.js.map +1 -0
  456. package/dist/peculiar/p-ae9189f6.system.js +19 -0
  457. package/dist/peculiar/p-ae9189f6.system.js.map +1 -0
  458. package/dist/peculiar/p-bd485115.system.entry.js +13 -0
  459. package/dist/peculiar/p-bd485115.system.entry.js.map +1 -0
  460. package/dist/peculiar/p-c0a298fd.system.js +97 -0
  461. package/dist/peculiar/p-c0a298fd.system.js.map +1 -0
  462. package/dist/peculiar/p-daf23673.system.js +20 -0
  463. package/dist/peculiar/p-daf23673.system.js.map +1 -0
  464. package/dist/peculiar/p-e1960173.system.js +5 -0
  465. package/dist/peculiar/p-e1960173.system.js.map +1 -0
  466. package/dist/peculiar/p-e2cc7410.entry.js +110 -0
  467. package/dist/peculiar/p-e2cc7410.entry.js.map +1 -0
  468. package/dist/peculiar/p-e39de121.system.entry.js +13 -0
  469. package/dist/peculiar/p-e39de121.system.entry.js.map +1 -0
  470. package/dist/peculiar/p-e6a3b4d4.system.js +13 -0
  471. package/dist/peculiar/p-e6a3b4d4.system.js.map +1 -0
  472. package/dist/peculiar/peculiar.css +1 -1
  473. package/dist/peculiar/peculiar.esm.js +2 -1
  474. package/dist/peculiar/peculiar.esm.js.map +1 -0
  475. package/dist/peculiar/peculiar.js +127 -0
  476. package/dist/types/components/attribute-certificate-viewer/attribute-certificate-viewer.d.ts +15 -3
  477. package/dist/types/components/button/button.d.ts +5 -16
  478. package/dist/types/components/button/index.d.ts +2 -0
  479. package/dist/types/components/button-menu/button-menu.d.ts +21 -0
  480. package/dist/types/components/certificate-decoder/certificate-decoder.d.ts +9 -6
  481. package/dist/types/components/certificate-details-parts/miscellaneous.d.ts +1 -1
  482. package/dist/types/components/certificate-summary/certificate-summary.d.ts +4 -3
  483. package/dist/types/components/certificate-summary/index.d.ts +1 -0
  484. package/dist/types/components/certificate-viewer/certificate-viewer.d.ts +13 -5
  485. package/dist/types/components/certificates-viewer/certificates-viewer.d.ts +22 -11
  486. package/dist/types/components/crl-viewer/crl-viewer.d.ts +13 -5
  487. package/dist/types/components/csr-viewer/csr-viewer.d.ts +13 -5
  488. package/dist/types/components/icons/actions.d.ts +12 -0
  489. package/dist/types/components/icons/arrow_bottom.d.ts +12 -0
  490. package/dist/types/components/icons/arrow_top.d.ts +12 -0
  491. package/dist/types/components/icons/cross.d.ts +12 -0
  492. package/dist/types/components/icons/details.d.ts +12 -0
  493. package/dist/types/components/icons/download.d.ts +12 -0
  494. package/dist/types/components/icons/index.d.ts +7 -0
  495. package/dist/types/components/icons/link.d.ts +12 -0
  496. package/dist/types/components/link/index.d.ts +1 -0
  497. package/dist/types/components/link/link.d.ts +6 -6
  498. package/dist/types/components/text-hider/text-hider.d.ts +0 -3
  499. package/dist/types/components/typography/index.d.ts +1 -0
  500. package/dist/types/components/typography/typography.d.ts +10 -20
  501. package/dist/types/components.d.ts +74 -175
  502. package/dist/types/constants/oids.d.ts +3 -1
  503. package/dist/types/crypto/attribute.d.ts +1 -1
  504. package/dist/types/crypto/extension.d.ts +1 -1
  505. package/dist/types/interface.d.ts +98 -6
  506. package/dist/types/stencil-public-runtime.d.ts +110 -23
  507. package/dist/types/utils/l10n.d.ts +5 -4
  508. package/dist/types/utils/read_file.d.ts +1 -1
  509. package/hydrate/index.d.ts +218 -0
  510. package/hydrate/index.js +22549 -0
  511. package/hydrate/package.json +6 -0
  512. package/loader/index.d.ts +10 -1
  513. package/loader/index.js +1 -1
  514. package/loader/package.json +1 -0
  515. package/package.json +6 -4
  516. package/dist/cjs/dom-f57e260e.js +0 -78
  517. package/dist/cjs/index-064e95c7.js +0 -1441
  518. package/dist/cjs/l10n-ddc7cff9.js +0 -169
  519. package/dist/cjs/peculiar-button-split_4.cjs.entry.js +0 -128
  520. package/dist/cjs/peculiar-button.cjs.entry.js +0 -40
  521. package/dist/cjs/peculiar-link.cjs.entry.js +0 -29
  522. package/dist/cjs/peculiar-typography.cjs.entry.js +0 -38
  523. package/dist/collection/components/button/button.css +0 -81
  524. package/dist/collection/components/button-split/button-split.css +0 -57
  525. package/dist/collection/components/button-split/button-split.js +0 -116
  526. package/dist/collection/components/certificate-summary/certificate-summary.css +0 -49
  527. package/dist/collection/components/link/link.css +0 -59
  528. package/dist/collection/components/typography/typography.css +0 -95
  529. package/dist/esm/dom-f1b08a97.js +0 -76
  530. package/dist/esm/index-bbd484d9.js +0 -1410
  531. package/dist/esm/l10n-d48f35ff.js +0 -165
  532. package/dist/esm/peculiar-button-split_4.entry.js +0 -121
  533. package/dist/esm/peculiar-button.entry.js +0 -36
  534. package/dist/esm/peculiar-link.entry.js +0 -25
  535. package/dist/esm/peculiar-typography.entry.js +0 -34
  536. package/dist/esm/polyfills/css-shim.js +0 -1
  537. package/dist/peculiar/p-08aba71b.js +0 -69
  538. package/dist/peculiar/p-0f7868b1.js +0 -11
  539. package/dist/peculiar/p-2f213160.entry.js +0 -11
  540. package/dist/peculiar/p-3c4e4245.js +0 -79
  541. package/dist/peculiar/p-48a620ff.js +0 -32
  542. package/dist/peculiar/p-57b89412.entry.js +0 -4
  543. package/dist/peculiar/p-610b85e3.entry.js +0 -4
  544. package/dist/peculiar/p-6d37c8b5.entry.js +0 -4
  545. package/dist/peculiar/p-711b4e1e.js +0 -18
  546. package/dist/peculiar/p-81ae1305.entry.js +0 -4
  547. package/dist/peculiar/p-81d33fb4.entry.js +0 -4
  548. package/dist/peculiar/p-918aeee4.entry.js +0 -4
  549. package/dist/peculiar/p-9bfd4f58.entry.js +0 -18
  550. package/dist/peculiar/p-9f4ee110.js +0 -22
  551. package/dist/peculiar/p-df53fbcc.entry.js +0 -4
  552. package/dist/peculiar/p-ec250cc4.js +0 -12
  553. package/dist/peculiar/p-f7683ba5.js +0 -5
  554. package/dist/types/components/button-split/button-split.d.ts +0 -21
@@ -3,73 +3,26 @@
3
3
  */
4
4
  'use strict';
5
5
 
6
- const index = require('./index-064e95c7.js');
6
+ Object.defineProperty(exports, '__esModule', { value: true });
7
+
8
+ const index = require('./index-efd561e9.js');
7
9
 
8
10
  /*
9
- Stencil Client Patch Browser v2.17.0 | MIT Licensed | https://stenciljs.com
11
+ Stencil Client Patch Browser v4.3.0 | MIT Licensed | https://stenciljs.com
10
12
  */
11
- const getDynamicImportFunction = (namespace) => `__sc_import_${namespace.replace(/\s|-/g, '_')}`;
12
13
  const patchBrowser = () => {
13
- // @ts-ignore
14
- const scriptElm = Array.from(index.doc.querySelectorAll('script')).find((s) => new RegExp(`\/${index.NAMESPACE}(\\.esm)?\\.js($|\\?|#)`).test(s.src) ||
15
- s.getAttribute('data-stencil-namespace') === index.NAMESPACE)
16
- ;
17
14
  const importMeta = (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('peculiar.cjs.js', document.baseURI).href));
18
- const opts = scriptElm['data-opts'] || {} ;
15
+ const opts = {};
19
16
  if (importMeta !== '') {
20
17
  opts.resourcesUrl = new URL('.', importMeta).href;
21
18
  }
22
- else {
23
- opts.resourcesUrl = new URL('.', new URL(scriptElm.getAttribute('data-resources-url') || scriptElm.src, index.win.location.href)).href;
24
- {
25
- patchDynamicImport(opts.resourcesUrl, scriptElm);
26
- }
27
- if (!index.win.customElements) {
28
- // module support, but no custom elements support (Old Edge)
29
- // @ts-ignore
30
- return Promise.resolve().then(function () { return require(/* webpackChunkName: "polyfills-dom" */ './dom-f57e260e.js'); }).then(() => opts);
31
- }
32
- }
33
19
  return index.promiseResolve(opts);
34
20
  };
35
- const patchDynamicImport = (base, orgScriptElm) => {
36
- const importFunctionName = getDynamicImportFunction(index.NAMESPACE);
37
- try {
38
- // test if this browser supports dynamic imports
39
- // There is a caching issue in V8, that breaks using import() in Function
40
- // By generating a random string, we can workaround it
41
- // Check https://bugs.chromium.org/p/chromium/issues/detail?id=990810 for more info
42
- index.win[importFunctionName] = new Function('w', `return import(w);//${Math.random()}`);
43
- }
44
- catch (e) {
45
- // this shim is specifically for browsers that do support "esm" imports
46
- // however, they do NOT support "dynamic" imports
47
- // basically this code is for old Edge, v18 and below
48
- const moduleMap = new Map();
49
- index.win[importFunctionName] = (src) => {
50
- const url = new URL(src, base).href;
51
- let mod = moduleMap.get(url);
52
- if (!mod) {
53
- const script = index.doc.createElement('script');
54
- script.type = 'module';
55
- script.crossOrigin = orgScriptElm.crossOrigin;
56
- script.src = URL.createObjectURL(new Blob([`import * as m from '${url}'; window.${importFunctionName}.m = m;`], {
57
- type: 'application/javascript',
58
- }));
59
- mod = new Promise((resolve) => {
60
- script.onload = () => {
61
- resolve(index.win[importFunctionName].m);
62
- script.remove();
63
- };
64
- });
65
- moduleMap.set(url, mod);
66
- index.doc.head.appendChild(script);
67
- }
68
- return mod;
69
- };
70
- }
71
- };
72
21
 
73
22
  patchBrowser().then(options => {
74
- return index.bootstrapLazy([["peculiar-certificates-viewer.cjs",[[1,"peculiar-certificates-viewer",{"certificates":[16],"filterWithSearch":[4,"filter-with-search"],"highlightWithSearch":[4,"highlight-with-search"],"search":[32],"certificatesDecoded":[32],"expandedRow":[32],"certificateSelectedForDetails":[32],"isDecodeInProcess":[32]}]]],["peculiar-certificate-decoder.cjs",[[1,"peculiar-certificate-decoder",{"certificateExample":[1,"certificate-example"],"defaultCertificate":[1,"default-certificate"],"certificateDecoded":[32]}]]],["peculiar-text-hider.cjs",[[1,"peculiar-text-hider",{"opened":[1540]},[[0,"textExpand","textExpandHandler"]]]]],["peculiar-link.cjs",[[1,"peculiar-link",{"href":[513],"type":[513]}]]],["peculiar-typography.cjs",[[1,"peculiar-typography",{"type":[513],"color":[1],"align":[1],"ellipsis":[4],"monospace":[4]}]]],["peculiar-certificate-viewer.cjs",[[1,"peculiar-certificate-viewer",{"certificate":[513],"download":[516],"authKeyIdParentLink":[513,"auth-key-id-parent-link"],"authKeyIdSiblingsLink":[513,"auth-key-id-siblings-link"],"subjectKeyIdChildrenLink":[513,"subject-key-id-children-link"],"subjectKeyIdSiblingsLink":[513,"subject-key-id-siblings-link"],"issuerDnLink":[513,"issuer-dn-link"],"view":[513],"isDecodeInProcess":[32]}]]],["peculiar-attribute-certificate-viewer_3.cjs",[[1,"peculiar-attribute-certificate-viewer",{"certificate":[1],"download":[4],"authKeyIdParentLink":[513,"auth-key-id-parent-link"],"authKeyIdSiblingsLink":[513,"auth-key-id-siblings-link"],"subjectKeyIdChildrenLink":[513,"subject-key-id-children-link"],"subjectKeyIdSiblingsLink":[513,"subject-key-id-siblings-link"],"isDecodeInProcess":[32]}],[1,"peculiar-crl-viewer",{"certificate":[513],"download":[4],"authKeyIdParentLink":[513,"auth-key-id-parent-link"],"authKeyIdSiblingsLink":[513,"auth-key-id-siblings-link"],"issuerDnLink":[513,"issuer-dn-link"],"view":[513],"isDecodeInProcess":[32]}],[1,"peculiar-csr-viewer",{"certificate":[513],"download":[4],"subjectKeyIdChildrenLink":[513,"subject-key-id-children-link"],"subjectKeyIdSiblingsLink":[513,"subject-key-id-siblings-link"],"view":[513],"isDecodeInProcess":[32]}]]],["peculiar-button.cjs",[[1,"peculiar-button",{"fill":[1],"disabled":[516],"href":[1],"target":[1],"onClick":[16]}]]],["peculiar-button-split_4.cjs",[[1,"peculiar-button-split",{"onClick":[16],"fill":[1],"actions":[16],"open":[32]}],[1,"peculiar-certificate-summary",{"certificate":[16],"showIssuer":[4,"show-issuer"]}],[1,"peculiar-circular-progress",{"size":[2],"width":[2]}],[1,"peculiar-highlight-words",{"search":[1]}]]]], options);
23
+ return index.bootstrapLazy([["peculiar-certificate-decoder.cjs",[[1,"peculiar-certificate-decoder",{"certificateExamples":[16],"defaultCertificate":[1,"default-certificate"],"certificateDecoded":[32]}]]],["peculiar-certificates-viewer.cjs",[[1,"peculiar-certificates-viewer",{"certificates":[16],"filterWithSearch":[4,"filter-with-search"],"highlightWithSearch":[4,"highlight-with-search"],"mobileMediaQueryString":[1,"mobile-media-query-string"],"mobileScreenView":[32],"search":[32],"certificatesDecoded":[32],"expandedRow":[32],"certificateSelectedForDetails":[32],"isDecodeInProcess":[32]},null,{"certificates":["watchCertificates"]}]]],["peculiar-text-hider.cjs",[[6,"peculiar-text-hider",{"opened":[32]}]]],["peculiar-certificate-viewer.cjs",[[1,"peculiar-certificate-viewer",{"certificate":[513],"download":[516],"authKeyIdParentLink":[513,"auth-key-id-parent-link"],"authKeyIdSiblingsLink":[513,"auth-key-id-siblings-link"],"subjectKeyIdChildrenLink":[513,"subject-key-id-children-link"],"subjectKeyIdSiblingsLink":[513,"subject-key-id-siblings-link"],"issuerDnLink":[513,"issuer-dn-link"],"mobileMediaQueryString":[1,"mobile-media-query-string"],"mobileScreenView":[32],"isDecodeInProcess":[32]},null,{"certificate":["watchCertificateAndDecode"]}]]],["peculiar-attribute-certificate-viewer_3.cjs",[[1,"peculiar-attribute-certificate-viewer",{"certificate":[1],"download":[4],"authKeyIdParentLink":[513,"auth-key-id-parent-link"],"authKeyIdSiblingsLink":[513,"auth-key-id-siblings-link"],"subjectKeyIdChildrenLink":[513,"subject-key-id-children-link"],"subjectKeyIdSiblingsLink":[513,"subject-key-id-siblings-link"],"mobileMediaQueryString":[1,"mobile-media-query-string"],"mobileScreenView":[32],"isDecodeInProcess":[32]},null,{"certificate":["watchCertificateAndDecode"]}],[1,"peculiar-crl-viewer",{"certificate":[513],"download":[4],"authKeyIdParentLink":[513,"auth-key-id-parent-link"],"authKeyIdSiblingsLink":[513,"auth-key-id-siblings-link"],"issuerDnLink":[513,"issuer-dn-link"],"mobileMediaQueryString":[1,"mobile-media-query-string"],"mobileScreenView":[32],"isDecodeInProcess":[32]},null,{"certificate":["watchCertificateAndDecode"]}],[1,"peculiar-csr-viewer",{"certificate":[513],"download":[4],"subjectKeyIdChildrenLink":[513,"subject-key-id-children-link"],"subjectKeyIdSiblingsLink":[513,"subject-key-id-siblings-link"],"mobileMediaQueryString":[1,"mobile-media-query-string"],"mobileScreenView":[32],"isDecodeInProcess":[32]},null,{"certificate":["watchCertificateAndDecode"]}]]],["peculiar-button-menu_3.cjs",[[2,"peculiar-button-menu",{"groups":[16],"open":[32]}],[1,"peculiar-circular-progress",{"size":[2],"width":[2]}],[1,"peculiar-highlight-words",{"search":[1]}]]]], options);
75
24
  });
25
+
26
+ exports.setNonce = index.setNonce;
27
+
28
+ //# sourceMappingURL=peculiar.cjs.js.map
@@ -0,0 +1 @@
1
+ {"file":"peculiar.cjs.js","mappings":";;;;;;;;;AAAA;AACA;AACA;AAGA,MAAM,YAAY,GAAG,MAAM;AAyB3B,IAAI,MAAM,UAAU,GAAG,0MAAe,CAAC;AACvC,IAAI,MAAM,IAAI,GAAiE,EAAE,CAAC;AAClF,IAAI,IAAI,UAAU,KAAK,EAAE,EAAE;AAC3B,QAAQ,IAAI,CAAC,YAAY,GAAG,IAAI,GAAG,CAAC,GAAG,EAAE,UAAU,CAAC,CAAC,IAAI,CAAC;AAC1D,KAAK;AACL,IAAI,OAAOA,oBAAc,CAAC,IAAI,CAAC,CAAC;AAChC,CAAC;;AChCD,YAAY,EAAE,CAAC,IAAI,CAAC,OAAO,IAAI;AAE/B,EAAE,OAAOC,mBAAa,CAAC,4BAA4B,EAAE,OAAO,CAAC,CAAC;AAC9D,CAAC,CAAC;;;;","names":["promiseResolve","bootstrapLazy"],"sources":["../../node_modules/@stencil/core/internal/client/patch-browser.js","@lazy-browser-entrypoint?app-data=conditional"],"sourcesContent":["/*\n Stencil Client Patch Browser v4.3.0 | MIT Licensed | https://stenciljs.com\n */\nimport { BUILD, NAMESPACE } from '@stencil/core/internal/app-data';\nimport { consoleDevInfo, doc, promiseResolve, H } from '@stencil/core';\nconst patchBrowser = () => {\n // NOTE!! This fn cannot use async/await!\n if (BUILD.isDev && !BUILD.isTesting) {\n consoleDevInfo('Running in development mode.');\n }\n if (BUILD.cloneNodeFix) {\n // opted-in to polyfill cloneNode() for slot polyfilled components\n patchCloneNodeFix(H.prototype);\n }\n if (BUILD.profile && !performance.mark) {\n // not all browsers support performance.mark/measure (Safari 10)\n // because the mark/measure APIs are designed to write entries to a buffer in the browser that does not exist,\n // simply stub the implementations out.\n // TODO(STENCIL-323): Remove this patch when support for older browsers is removed (breaking)\n // @ts-ignore\n performance.mark = performance.measure = () => {\n /*noop*/\n };\n performance.getEntriesByName = () => [];\n }\n // @ts-ignore\n const scriptElm = BUILD.scriptDataOpts\n ? Array.from(doc.querySelectorAll('script')).find((s) => new RegExp(`\\/${NAMESPACE}(\\\\.esm)?\\\\.js($|\\\\?|#)`).test(s.src) ||\n s.getAttribute('data-stencil-namespace') === NAMESPACE)\n : null;\n const importMeta = import.meta.url;\n const opts = BUILD.scriptDataOpts ? (scriptElm || {})['data-opts'] || {} : {};\n if (importMeta !== '') {\n opts.resourcesUrl = new URL('.', importMeta).href;\n }\n return promiseResolve(opts);\n};\nconst patchCloneNodeFix = (HTMLElementPrototype) => {\n const nativeCloneNodeFn = HTMLElementPrototype.cloneNode;\n HTMLElementPrototype.cloneNode = function (deep) {\n if (this.nodeName === 'TEMPLATE') {\n return nativeCloneNodeFn.call(this, deep);\n }\n const clonedNode = nativeCloneNodeFn.call(this, false);\n const srcChildNodes = this.childNodes;\n if (deep) {\n for (let i = 0; i < srcChildNodes.length; i++) {\n // Node.ATTRIBUTE_NODE === 2, and checking because IE11\n if (srcChildNodes[i].nodeType !== 2) {\n clonedNode.appendChild(srcChildNodes[i].cloneNode(true));\n }\n }\n }\n return clonedNode;\n };\n};\nexport { patchBrowser };\n","export { setNonce } from '@stencil/core';\nimport { bootstrapLazy } from '@stencil/core';\nimport { patchBrowser } from '@stencil/core/internal/client/patch-browser';\nimport { globalScripts } from '@stencil/core/internal/app-globals';\npatchBrowser().then(options => {\n globalScripts();\n return bootstrapLazy([/*!__STENCIL_LAZY_DATA__*/], options);\n});\n"],"version":3}
@@ -3,9 +3,8 @@
3
3
  */
4
4
  'use strict';
5
5
 
6
- const certification_request = require('./certification_request-b9ac73f2.js');
7
- const download = require('./download-93f7b773.js');
8
- const l10n = require('./l10n-ddc7cff9.js');
6
+ const certification_request = require('./certification_request-c0cafa72.js');
7
+ const download = require('./download-972dda8a.js');
9
8
 
10
9
  /**
11
10
  * @license
@@ -36,7 +35,7 @@ class X509Certificate extends certification_request.AsnData {
36
35
  throw new Error("Cannot get 'notAfter' value");
37
36
  }
38
37
  this.notAfter = notAfter;
39
- this.validity = l10n.dateDiff(this.notBefore, this.notAfter);
38
+ this.validity = certification_request.dateDiff(this.notBefore, this.notAfter);
40
39
  }
41
40
  parseExtensions() {
42
41
  const { tbsCertificate } = this.asn;
@@ -157,3 +156,5 @@ class X509Certificate extends certification_request.AsnData {
157
156
  }
158
157
 
159
158
  exports.X509Certificate = X509Certificate;
159
+
160
+ //# sourceMappingURL=x509_certificate-989b1435.js.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I,CAAC,OAAO,EAAE;MACjB,OAAO,EAAE,CAAC;KACX;IAED,OAAO,IAAI,CAAC,OAAO;OAChB,GAAG,CAAC,CAAC,IAAI,MACR,GAAG,IAAI,CAAC,SAAS,IAAI,IAAI,CAAC,KAAK,EAAE,CAClC,CAAC;OACD,IAAI,CAAC,IAAI,CAAC,CAAC;GACf;EAEM,cAAc;IACnB,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE;MAChB,OAAO,EAAE,CAAC;KACX;IAED,OAAO,IAAI,CAAC,MAAM;OACf,GAAG,CAAC,CAAC,IAAI,MACR,GAAG,IAAI,CAAC,SAAS,IAAI,IAAI,CAAC,KAAK,EAAE,CAClC,CAAC;OACD,IAAI,CAAC,IAAI,CAAC,CAAC;GACf;EAEM,aAAa,CAAC,IAAa;IAChCiB,iBAAQ,CAAC,IAAI,CAAC,KAAK,CACjB,IAAI,CAAC,oBAAoB,EAAE,EAC3B,IAAI,IAAI,IAAI,CAAC,UAAU,CACxB,CAAC;GACH;EAEM,aAAa,CAAC,IAAa;IAChCA,iBAAQ,CAAC,IAAI,CAAC,KAAK,CACjB,IAAI,CAAC,oBAAoB,EAAE,EAC3B,IAAI,IAAI,IAAI,CAAC,UAAU,CACxB,CAAC;GACH;;;;;","names":["AsnData","certificateRawToBuffer","Certificate","Convert","Name","dateDiff","Extension","AsnConvert","id_ecPublicKey","ECParameters","id_rsaEncryption","RSAPublicKey","id_composite_key","CompositePublicKey","id_alg_composite","CompositeSignatureValue","CompositeParams","hexFormat","base64Format","getCertificateThumbprint","Download"],"sources":["src/crypto/x509_certificate.ts"],"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 { AsnConvert } from '@peculiar/asn1-schema';\nimport { ECParameters, id_ecPublicKey } from '@peculiar/asn1-ecc';\nimport { id_rsaEncryption, RSAPublicKey } from '@peculiar/asn1-rsa';\nimport {\n id_composite_key,\n id_alg_composite,\n CompositePublicKey,\n CompositeSignatureValue,\n CompositeParams,\n} from '@peculiar/asn1-x509-post-quantum';\nimport { Certificate, SubjectPublicKeyInfo } from '@peculiar/asn1-x509';\nimport { Convert } from 'pvtsutils';\n\nimport { dateDiff, Download } from '../utils';\n\nimport { Name, INameJSON } from './name';\nimport { Extension, TExtensionValue } from './extension';\nimport { AsnData } from './asn_data';\nimport {\n certificateRawToBuffer,\n hexFormat,\n base64Format,\n getCertificateThumbprint,\n} from './utils';\n\nexport interface ISignature {\n algorithm: string;\n value: BufferSource;\n params?: {\n algorithm: string;\n value: BufferSource;\n }[];\n}\n\nexport interface IPublicKey {\n algorithm: string;\n value: BufferSource;\n params?: ECParameters | RSAPublicKey | IPublicKey[];\n}\n\nexport class X509Certificate extends AsnData<Certificate> {\n public readonly serialNumber: string;\n\n public readonly subject: INameJSON[];\n\n public readonly issuer: INameJSON[];\n\n public readonly notBefore: Date;\n\n public readonly notAfter: Date;\n\n public readonly validity: string;\n\n public extensions: Extension<TExtensionValue>[];\n\n public readonly version: number;\n\n public thumbprints: Record<string, string> = {};\n\n public type: string = 'X.509 Certificate';\n\n constructor(raw: string) {\n super(certificateRawToBuffer(raw), Certificate);\n\n const { tbsCertificate } = this.asn;\n\n this.serialNumber = Convert.ToHex(tbsCertificate.serialNumber);\n this.subject = new Name(tbsCertificate.subject).toJSON();\n this.issuer = new Name(tbsCertificate.issuer).toJSON();\n this.version = tbsCertificate.version + 1;\n\n const notBefore = tbsCertificate.validity.notBefore.utcTime\n || tbsCertificate.validity.notBefore.generalTime;\n\n if (!notBefore) {\n throw new Error(\"Cannot get 'notBefore' value\");\n }\n\n this.notBefore = notBefore;\n\n const notAfter = tbsCertificate.validity.notAfter.utcTime\n || tbsCertificate.validity.notAfter.generalTime;\n\n if (!notAfter) {\n throw new Error(\"Cannot get 'notAfter' value\");\n }\n\n this.notAfter = notAfter;\n this.validity = dateDiff(this.notBefore, this.notAfter);\n }\n\n public parseExtensions() {\n const { tbsCertificate } = this.asn;\n\n if (tbsCertificate.extensions) {\n this.extensions = tbsCertificate.extensions\n .map((e) => new Extension(AsnConvert.serialize(e)));\n }\n }\n\n private getPublicKeyInfo(publicKeyInfo: SubjectPublicKeyInfo) {\n const { subjectPublicKey, algorithm } = publicKeyInfo;\n let params;\n\n if (algorithm.algorithm === id_ecPublicKey && algorithm.parameters) {\n params = AsnConvert.parse(algorithm.parameters, ECParameters);\n }\n\n if (algorithm.algorithm === id_rsaEncryption) {\n params = AsnConvert.parse(subjectPublicKey, RSAPublicKey);\n }\n\n if (algorithm.algorithm === id_composite_key) {\n params = AsnConvert.parse(subjectPublicKey, CompositePublicKey);\n\n params = params.map((param) => this.getPublicKeyInfo(param));\n }\n\n const spki = AsnConvert.serialize(publicKeyInfo);\n\n return {\n params,\n value: spki,\n algorithm: algorithm.algorithm,\n };\n }\n\n public get publicKey(): IPublicKey {\n return this.getPublicKeyInfo(this.asn.tbsCertificate.subjectPublicKeyInfo);\n }\n\n public get signature(): ISignature {\n const { signatureValue, signatureAlgorithm } = this.asn;\n let params;\n\n if (signatureAlgorithm.algorithm === id_alg_composite) {\n const compositeSignatureValues = AsnConvert.parse(signatureValue, CompositeSignatureValue);\n const compositeParams = AsnConvert.parse(signatureAlgorithm.parameters, CompositeParams);\n\n params = compositeParams.map((param, index) => ({\n ...param,\n value: compositeSignatureValues[index],\n }));\n }\n\n return {\n params,\n value: signatureValue,\n algorithm: signatureAlgorithm.algorithm,\n };\n }\n\n public exportAsBase64() {\n return Convert.ToBase64(this.raw);\n }\n\n public exportAsHexFormatted() {\n return hexFormat(Convert.ToHex(this.raw));\n }\n\n public exportAsPemFormatted() {\n return `-----BEGIN CERTIFICATE-----\\n${base64Format(this.exportAsBase64())}\\n-----END CERTIFICATE-----`;\n }\n\n public async getThumbprint(\n algorithm: string = 'SHA-1',\n ): Promise<void> {\n try {\n const thumbprint = await getCertificateThumbprint(algorithm, this.raw);\n\n if (thumbprint) {\n this.thumbprints[algorithm] = Convert.ToHex(thumbprint);\n }\n } catch (error) {\n console.error('Error thumbprint get:', error);\n }\n }\n\n public get commonName(): string {\n if (!this.subject) {\n return '';\n }\n\n for (let i = 0; i < this.subject.length; i += 1) {\n const name = this.subject[i];\n\n if (name.shortName === 'CN' || name.shortName === 'E' || name.shortName === 'O') {\n return name.value;\n }\n }\n\n return '';\n }\n\n public get issuerCommonName(): string {\n if (!this.issuer) {\n return '';\n }\n\n for (let i = 0; i < this.issuer.length; i += 1) {\n const name = this.issuer[i];\n\n if (name.shortName === 'CN') {\n return name.value;\n }\n\n if (name.shortName === 'E') {\n return name.value;\n }\n }\n\n return '';\n }\n\n public get isRoot(): boolean {\n return JSON.stringify(this.issuer) === JSON.stringify(this.subject);\n }\n\n public subjectToString() {\n if (!this.subject) {\n return '';\n }\n\n return this.subject\n .map((name) => (\n `${name.shortName}=${name.value}`\n ))\n .join(', ');\n }\n\n public issuerToString() {\n if (!this.issuer) {\n return '';\n }\n\n return this.issuer\n .map((name) => (\n `${name.shortName}=${name.value}`\n ))\n .join(', ');\n }\n\n public downloadAsPEM(name?: string) {\n Download.cert.asPEM(\n this.exportAsPemFormatted(),\n name || this.commonName,\n );\n }\n\n public downloadAsDER(name?: string) {\n Download.cert.asDER(\n this.exportAsHexFormatted(),\n name || this.commonName,\n );\n }\n}\n"],"version":3}
@@ -1,24 +1,20 @@
1
1
  {
2
2
  "entries": [
3
- "./components/attribute-certificate-viewer/attribute-certificate-viewer.js",
4
- "./components/button-split/button-split.js",
5
- "./components/certificate-viewer/certificate-viewer.js",
6
- "./components/certificates-viewer/certificates-viewer.js",
7
- "./components/crl-viewer/crl-viewer.js",
8
- "./components/csr-viewer/csr-viewer.js",
9
- "./components/button/button.js",
10
- "./components/certificate-decoder/certificate-decoder.js",
11
- "./components/certificate-summary/certificate-summary.js",
12
- "./components/circular-progress/circular-progress.js",
13
- "./components/highlight-words/highlight-words.js",
14
- "./components/link/link.js",
15
- "./components/text-hider/text-hider.js",
16
- "./components/typography/typography.js"
3
+ "components/attribute-certificate-viewer/attribute-certificate-viewer.js",
4
+ "components/button-menu/button-menu.js",
5
+ "components/certificate-viewer/certificate-viewer.js",
6
+ "components/certificates-viewer/certificates-viewer.js",
7
+ "components/crl-viewer/crl-viewer.js",
8
+ "components/csr-viewer/csr-viewer.js",
9
+ "components/certificate-decoder/certificate-decoder.js",
10
+ "components/circular-progress/circular-progress.js",
11
+ "components/highlight-words/highlight-words.js",
12
+ "components/text-hider/text-hider.js"
17
13
  ],
18
14
  "compiler": {
19
15
  "name": "@stencil/core",
20
- "version": "2.17.0",
21
- "typescriptVersion": "4.5.4"
16
+ "version": "4.3.0",
17
+ "typescriptVersion": "5.1.6"
22
18
  },
23
19
  "collections": [],
24
20
  "bundles": []
@@ -8,13 +8,13 @@
8
8
  * This source code is licensed under the MIT license found in the
9
9
  * LICENSE file in the root directory of this source tree.
10
10
  */
11
- import { Component, Host, h, Prop, State, Watch, } from '@stencil/core';
12
- import { X509AttributeCertificate } from '../../crypto';
13
- import { getDNSNameLink, getIPAddressLink, getLEILink } from '../../utils/third_party_links';
14
- import { BasicInformation, Signature, Thumbprints, Extensions, Miscellaneous, Attributes, Holder, Issuer, } from '../certificate-details-parts';
11
+ import { Host, h, Build, } from "@stencil/core";
12
+ import { X509AttributeCertificate } from "../../crypto";
13
+ import { getDNSNameLink, getIPAddressLink, getLEILink } from "../../utils/third_party_links";
14
+ import { BasicInformation, Signature, Thumbprints, Extensions, Miscellaneous, Attributes, Holder, Issuer, } from "../certificate-details-parts";
15
+ import { Typography } from "../typography";
15
16
  export class AttributeCertificateViewer {
16
17
  constructor() {
17
- this.isDecodeInProcess = true;
18
18
  this.getAuthKeyIdParentLink = (value) => {
19
19
  var _a;
20
20
  return (_a = this.authKeyIdParentLink) === null || _a === void 0 ? void 0 : _a.replace('{{authKeyId}}', value);
@@ -31,9 +31,29 @@ export class AttributeCertificateViewer {
31
31
  var _a;
32
32
  return (_a = this.subjectKeyIdSiblingsLink) === null || _a === void 0 ? void 0 : _a.replace('{{subjectKeyId}}', value);
33
33
  };
34
+ this.certificate = undefined;
35
+ this.download = undefined;
36
+ this.authKeyIdParentLink = undefined;
37
+ this.authKeyIdSiblingsLink = undefined;
38
+ this.subjectKeyIdChildrenLink = undefined;
39
+ this.subjectKeyIdSiblingsLink = undefined;
40
+ this.mobileMediaQueryString = '(max-width: 900px)';
41
+ this.mobileScreenView = false;
42
+ this.isDecodeInProcess = true;
43
+ }
44
+ handleMediaQueryChange(event) {
45
+ this.mobileScreenView = event.matches;
34
46
  }
35
47
  componentWillLoad() {
36
48
  this.decodeCertificate(this.certificate);
49
+ if (Build.isBrowser) {
50
+ this.mobileMediaQuery = window.matchMedia(this.mobileMediaQueryString);
51
+ this.mobileMediaQuery.addEventListener('change', this.handleMediaQueryChange.bind(this));
52
+ this.mobileScreenView = this.mobileMediaQuery.matches;
53
+ }
54
+ }
55
+ disconnectedCallback() {
56
+ this.mobileMediaQuery.removeEventListener('change', this.handleMediaQueryChange.bind(this));
37
57
  }
38
58
  async decodeCertificate(certificate) {
39
59
  this.isDecodeInProcess = true;
@@ -77,13 +97,11 @@ export class AttributeCertificateViewer {
77
97
  }
78
98
  // eslint-disable-next-line class-methods-use-this
79
99
  renderErrorState() {
80
- return (h("div", { class: "status_wrapper" },
81
- h("peculiar-typography", { type: "b1", class: "interaction_text" }, "There was an error decoding this attribute certificate.")));
100
+ return (h("div", { class: "status_wrapper" }, h(Typography, null, "There was an error decoding this attribute certificate.")));
82
101
  }
83
102
  // eslint-disable-next-line class-methods-use-this
84
103
  renderEmptyState() {
85
- return (h("div", { class: "status_wrapper" },
86
- h("peculiar-typography", { type: "b1", class: "interaction_text" }, "There is no attribute certificate available.")));
104
+ return (h("div", { class: "status_wrapper" }, h(Typography, null, "There is no attribute certificate available.")));
87
105
  }
88
106
  render() {
89
107
  if (this.certificateDecodeError) {
@@ -92,150 +110,176 @@ export class AttributeCertificateViewer {
92
110
  if (!this.certificateDecoded) {
93
111
  return this.renderEmptyState();
94
112
  }
95
- return (h(Host, null,
96
- h("table", null,
97
- h(BasicInformation, Object.assign({}, this.certificateDecoded)),
98
- h(Issuer, { issuer: this.certificateDecoded.issuer }),
99
- h(Holder, { holder: this.certificateDecoded.holder }),
100
- h(Signature, { signature: this.certificateDecoded.signature }),
101
- h(Thumbprints, { thumbprints: this.certificateDecoded.thumbprints }),
102
- h(Attributes, { attributes: this.certificateDecoded.attributes, getLEILink: getLEILink, getDNSNameLink: getDNSNameLink, getIPAddressLink: getIPAddressLink, getAuthKeyIdParentLink: this.getAuthKeyIdParentLink, getAuthKeyIdSiblingsLink: this.getAuthKeyIdSiblingsLink, getSubjectKeyIdChildrenLink: this.getSubjectKeyIdChildrenLink, getSubjectKeyIdSiblingsLink: this.getSubjectKeyIdSiblingsLink }),
103
- h(Extensions, { extensions: this.certificateDecoded.extensions, getLEILink: getLEILink, getDNSNameLink: getDNSNameLink, getIPAddressLink: getIPAddressLink, getAuthKeyIdParentLink: this.getAuthKeyIdParentLink, getAuthKeyIdSiblingsLink: this.getAuthKeyIdSiblingsLink, getSubjectKeyIdChildrenLink: this.getSubjectKeyIdChildrenLink, getSubjectKeyIdSiblingsLink: this.getSubjectKeyIdSiblingsLink }),
104
- this.download && (h(Miscellaneous, { certificate: this.certificateDecoded })))));
113
+ return (h(Host, { "data-mobile-screen-view": String(this.mobileScreenView) }, h("table", null, h(BasicInformation, Object.assign({}, this.certificateDecoded)), h(Issuer, { issuer: this.certificateDecoded.issuer }), h(Holder, { holder: this.certificateDecoded.holder }), h(Signature, { signature: this.certificateDecoded.signature }), h(Thumbprints, { thumbprints: this.certificateDecoded.thumbprints }), h(Attributes, { attributes: this.certificateDecoded.attributes, getLEILink: getLEILink, getDNSNameLink: getDNSNameLink, getIPAddressLink: getIPAddressLink, getAuthKeyIdParentLink: this.getAuthKeyIdParentLink, getAuthKeyIdSiblingsLink: this.getAuthKeyIdSiblingsLink, getSubjectKeyIdChildrenLink: this.getSubjectKeyIdChildrenLink, getSubjectKeyIdSiblingsLink: this.getSubjectKeyIdSiblingsLink }), h(Extensions, { extensions: this.certificateDecoded.extensions, getLEILink: getLEILink, getDNSNameLink: getDNSNameLink, getIPAddressLink: getIPAddressLink, getAuthKeyIdParentLink: this.getAuthKeyIdParentLink, getAuthKeyIdSiblingsLink: this.getAuthKeyIdSiblingsLink, getSubjectKeyIdChildrenLink: this.getSubjectKeyIdChildrenLink, getSubjectKeyIdSiblingsLink: this.getSubjectKeyIdSiblingsLink }), this.download && (h(Miscellaneous, { certificate: this.certificateDecoded })))));
105
114
  }
106
115
  static get is() { return "peculiar-attribute-certificate-viewer"; }
107
116
  static get encapsulation() { return "shadow"; }
108
- static get originalStyleUrls() { return {
109
- "$": ["../certificate-viewer/certificate-viewer.scss"]
110
- }; }
111
- static get styleUrls() { return {
112
- "$": ["../certificate-viewer/certificate-viewer.css"]
113
- }; }
114
- static get properties() { return {
115
- "certificate": {
116
- "type": "string",
117
- "mutable": false,
118
- "complexType": {
119
- "original": "AttributeCertificateProp",
120
- "resolved": "X509AttributeCertificate | string",
121
- "references": {
122
- "AttributeCertificateProp": {
123
- "location": "local"
117
+ static get originalStyleUrls() {
118
+ return {
119
+ "$": ["../certificate-viewer/certificate-viewer.scss"]
120
+ };
121
+ }
122
+ static get styleUrls() {
123
+ return {
124
+ "$": ["../certificate-viewer/certificate-viewer.css"]
125
+ };
126
+ }
127
+ static get properties() {
128
+ return {
129
+ "certificate": {
130
+ "type": "string",
131
+ "mutable": false,
132
+ "complexType": {
133
+ "original": "AttributeCertificateProp",
134
+ "resolved": "X509AttributeCertificate | string",
135
+ "references": {
136
+ "AttributeCertificateProp": {
137
+ "location": "local",
138
+ "path": "/Users/donskov/Documents/work/pv/pv-certificates-viewer/packages/webcomponents/src/components/attribute-certificate-viewer/attribute-certificate-viewer.tsx",
139
+ "id": "src/components/attribute-certificate-viewer/attribute-certificate-viewer.tsx::AttributeCertificateProp"
140
+ }
124
141
  }
125
- }
126
- },
127
- "required": false,
128
- "optional": false,
129
- "docs": {
130
- "tags": [],
131
- "text": "The certificate value for decode and show details. Use PEM or DER."
132
- },
133
- "attribute": "certificate",
134
- "reflect": false
135
- },
136
- "download": {
137
- "type": "boolean",
138
- "mutable": false,
139
- "complexType": {
140
- "original": "boolean",
141
- "resolved": "boolean",
142
- "references": {}
142
+ },
143
+ "required": false,
144
+ "optional": false,
145
+ "docs": {
146
+ "tags": [],
147
+ "text": "The certificate value for decode and show details. Use PEM or DER."
148
+ },
149
+ "attribute": "certificate",
150
+ "reflect": false
143
151
  },
144
- "required": false,
145
- "optional": true,
146
- "docs": {
147
- "tags": [],
148
- "text": "If `true` - component will show split-button to download certificate as PEM or DER."
152
+ "download": {
153
+ "type": "boolean",
154
+ "mutable": false,
155
+ "complexType": {
156
+ "original": "boolean",
157
+ "resolved": "boolean",
158
+ "references": {}
159
+ },
160
+ "required": false,
161
+ "optional": true,
162
+ "docs": {
163
+ "tags": [],
164
+ "text": "If `true` - component will show split-button to download certificate as PEM or DER."
165
+ },
166
+ "attribute": "download",
167
+ "reflect": false
149
168
  },
150
- "attribute": "download",
151
- "reflect": false
152
- },
153
- "authKeyIdParentLink": {
154
- "type": "string",
155
- "mutable": false,
156
- "complexType": {
157
- "original": "string",
158
- "resolved": "string",
159
- "references": {}
169
+ "authKeyIdParentLink": {
170
+ "type": "string",
171
+ "mutable": false,
172
+ "complexType": {
173
+ "original": "string",
174
+ "resolved": "string",
175
+ "references": {}
176
+ },
177
+ "required": false,
178
+ "optional": true,
179
+ "docs": {
180
+ "tags": [{
181
+ "name": "example",
182
+ "text": " https://censys.io/certificates?q=parsed.extensions.subject_key_id:%20{{authKeyId}}"
183
+ }],
184
+ "text": "Authority Key Identifier extension parent link.\n<br />\n**NOTE**: `{{authKeyId}}` will be replaced to value from the extension."
185
+ },
186
+ "attribute": "auth-key-id-parent-link",
187
+ "reflect": true
160
188
  },
161
- "required": false,
162
- "optional": true,
163
- "docs": {
164
- "tags": [{
165
- "name": "example",
166
- "text": " https://censys.io/certificates?q=parsed.extensions.subject_key_id:%20{{authKeyId}}"
167
- }],
168
- "text": "Authority Key Identifier extension parent link.\n<br />\n**NOTE**: `{{authKeyId}}` will be replaced to value from the extension."
189
+ "authKeyIdSiblingsLink": {
190
+ "type": "string",
191
+ "mutable": false,
192
+ "complexType": {
193
+ "original": "string",
194
+ "resolved": "string",
195
+ "references": {}
196
+ },
197
+ "required": false,
198
+ "optional": true,
199
+ "docs": {
200
+ "tags": [{
201
+ "name": "example",
202
+ "text": " https://censys.io/certificates?q=parsed.extensions.authority_key_id:%20{{authKeyId}}"
203
+ }],
204
+ "text": "Authority Key Identifier extension siblings link.\n<br />\n**NOTE**: `{{authKeyId}}` will be replaced to value from the extension."
205
+ },
206
+ "attribute": "auth-key-id-siblings-link",
207
+ "reflect": true
169
208
  },
170
- "attribute": "auth-key-id-parent-link",
171
- "reflect": true
172
- },
173
- "authKeyIdSiblingsLink": {
174
- "type": "string",
175
- "mutable": false,
176
- "complexType": {
177
- "original": "string",
178
- "resolved": "string",
179
- "references": {}
209
+ "subjectKeyIdChildrenLink": {
210
+ "type": "string",
211
+ "mutable": false,
212
+ "complexType": {
213
+ "original": "string",
214
+ "resolved": "string",
215
+ "references": {}
216
+ },
217
+ "required": false,
218
+ "optional": true,
219
+ "docs": {
220
+ "tags": [{
221
+ "name": "example",
222
+ "text": " https://censys.io/certificates?q=parsed.extensions.authority_key_id:%20{{subjectKeyId}}"
223
+ }],
224
+ "text": "Subject Key Identifier extension children link.\n<br />\n**NOTE**: `{{subjectKeyId}}` will be replaced to value from the extension."
225
+ },
226
+ "attribute": "subject-key-id-children-link",
227
+ "reflect": true
180
228
  },
181
- "required": false,
182
- "optional": true,
183
- "docs": {
184
- "tags": [{
185
- "name": "example",
186
- "text": " https://censys.io/certificates?q=parsed.extensions.authority_key_id:%20{{authKeyId}}"
187
- }],
188
- "text": "Authority Key Identifier extension siblings link.\n<br />\n**NOTE**: `{{authKeyId}}` will be replaced to value from the extension."
229
+ "subjectKeyIdSiblingsLink": {
230
+ "type": "string",
231
+ "mutable": false,
232
+ "complexType": {
233
+ "original": "string",
234
+ "resolved": "string",
235
+ "references": {}
236
+ },
237
+ "required": false,
238
+ "optional": true,
239
+ "docs": {
240
+ "tags": [{
241
+ "name": "example",
242
+ "text": " https://some.com/{{subjectKeyId}}"
243
+ }],
244
+ "text": "Subject Key Identifier extension siblings link.\n<br />\n**NOTE**: `{{subjectKeyId}}` will be replaced to value from the extension."
245
+ },
246
+ "attribute": "subject-key-id-siblings-link",
247
+ "reflect": true
189
248
  },
190
- "attribute": "auth-key-id-siblings-link",
191
- "reflect": true
192
- },
193
- "subjectKeyIdChildrenLink": {
194
- "type": "string",
195
- "mutable": false,
196
- "complexType": {
197
- "original": "string",
198
- "resolved": "string",
199
- "references": {}
200
- },
201
- "required": false,
202
- "optional": true,
203
- "docs": {
204
- "tags": [{
205
- "name": "example",
206
- "text": " https://censys.io/certificates?q=parsed.extensions.authority_key_id:%20{{subjectKeyId}}"
207
- }],
208
- "text": "Subject Key Identifier extension children link.\n<br />\n**NOTE**: `{{subjectKeyId}}` will be replaced to value from the extension."
209
- },
210
- "attribute": "subject-key-id-children-link",
211
- "reflect": true
212
- },
213
- "subjectKeyIdSiblingsLink": {
214
- "type": "string",
215
- "mutable": false,
216
- "complexType": {
217
- "original": "string",
218
- "resolved": "string",
219
- "references": {}
220
- },
221
- "required": false,
222
- "optional": true,
223
- "docs": {
224
- "tags": [{
225
- "name": "example",
226
- "text": " https://some.com/{{subjectKeyId}}"
227
- }],
228
- "text": "Subject Key Identifier extension siblings link.\n<br />\n**NOTE**: `{{subjectKeyId}}` will be replaced to value from the extension."
229
- },
230
- "attribute": "subject-key-id-siblings-link",
231
- "reflect": true
232
- }
233
- }; }
234
- static get states() { return {
235
- "isDecodeInProcess": {}
236
- }; }
237
- static get watchers() { return [{
238
- "propName": "certificate",
239
- "methodName": "watchCertificateAndDecode"
240
- }]; }
249
+ "mobileMediaQueryString": {
250
+ "type": "string",
251
+ "mutable": false,
252
+ "complexType": {
253
+ "original": "string",
254
+ "resolved": "string",
255
+ "references": {}
256
+ },
257
+ "required": false,
258
+ "optional": true,
259
+ "docs": {
260
+ "tags": [{
261
+ "name": "example",
262
+ "text": " (max-width: 900px)"
263
+ }],
264
+ "text": "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."
265
+ },
266
+ "attribute": "mobile-media-query-string",
267
+ "reflect": false,
268
+ "defaultValue": "'(max-width: 900px)'"
269
+ }
270
+ };
271
+ }
272
+ static get states() {
273
+ return {
274
+ "mobileScreenView": {},
275
+ "isDecodeInProcess": {}
276
+ };
277
+ }
278
+ static get watchers() {
279
+ return [{
280
+ "propName": "certificate",
281
+ "methodName": "watchCertificateAndDecode"
282
+ }];
283
+ }
241
284
  }
285
+ //# sourceMappingURL=attribute-certificate-viewer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"attribute-certificate-viewer.js","sourceRoot":"","sources":["../../../src/components/attribute-certificate-viewer/attribute-certificate-viewer.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,SAAS,EACT,IAAI,EACJ,CAAC,EACD,IAAI,EACJ,KAAK,EACL,KAAK,EACL,KAAK,GACN,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,wBAAwB,EAAE,MAAM,cAAc,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAC7F,OAAO,EACL,gBAAgB,EAChB,SAAS,EACT,WAAW,EACX,UAAU,EACV,aAAa,EACb,UAAU,EACV,MAAM,EACN,MAAM,GACP,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAS3C,MAAM,OAAO,0BAA0B;;IAuI7B,2BAAsB,GAAG,CAAC,KAAa,EAAE,EAAE;;MAAC,OAAA,MAAA,IAAI,CAAC,mBAAm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9C,UAAU,EAAE,UAAU,EACtB,cAAc,EAAE,cAAc,EAC9B,gBAAgB,EAAE,gBAAgB,EAClC,sBAAsB,EAAE,IAAI,CAAC,sBAAsB,EACnD,wBAAwB,EAAE,IAAI,CAAC,wBAAwB,EACvD,2BAA2B,EAAE,IAAI,CAAC,2BAA2B,EAC7D,2BAA2B,EAAE,IAAI,CAAC,2BAA2B,GAC7D;QAED,IAAI,CAAC,QAAQ,IAAI,CAChB,EAAC,aAAa,IACZ,WAAW,EAAE,IAAI,CAAC,kBAAkB,GACpC,CACH,CACK,CACH,CACR,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["/**\n * @license\n * Copyright (c) Peculiar Ventures, LLC.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {\n Component,\n Host,\n h,\n Prop,\n State,\n Watch,\n Build,\n} from '@stencil/core';\n\nimport { X509AttributeCertificate } from '../../crypto';\nimport { getDNSNameLink, getIPAddressLink, getLEILink } from '../../utils/third_party_links';\nimport {\n BasicInformation,\n Signature,\n Thumbprints,\n Extensions,\n Miscellaneous,\n Attributes,\n Holder,\n Issuer,\n} from '../certificate-details-parts';\nimport { Typography } from '../typography';\n\nexport type AttributeCertificateProp = string | X509AttributeCertificate;\n\n@Component({\n tag: 'peculiar-attribute-certificate-viewer',\n styleUrl: '../certificate-viewer/certificate-viewer.scss',\n shadow: true,\n})\nexport class AttributeCertificateViewer {\n private certificateDecoded: X509AttributeCertificate;\n\n private certificateDecodeError: Error;\n\n private mobileMediaQuery: MediaQueryList;\n\n /**\n * The certificate value for decode and show details. Use PEM or DER.\n */\n @Prop() certificate: AttributeCertificateProp;\n\n /**\n * If `true` - component will show split-button to download certificate as PEM or DER.\n */\n @Prop() download?: boolean;\n\n /**\n * Authority Key Identifier extension parent link.\n * <br />\n * **NOTE**: `{{authKeyId}}` will be replaced to value from the extension.\n * @example\n * https://censys.io/certificates?q=parsed.extensions.subject_key_id:%20{{authKeyId}}\n */\n @Prop({ reflect: true }) authKeyIdParentLink?: string;\n\n /**\n * Authority Key Identifier extension siblings link.\n * <br />\n * **NOTE**: `{{authKeyId}}` will be replaced to value from the extension.\n * @example\n * https://censys.io/certificates?q=parsed.extensions.authority_key_id:%20{{authKeyId}}\n */\n @Prop({ reflect: true }) authKeyIdSiblingsLink?: string;\n\n /**\n * Subject Key Identifier extension children link.\n * <br />\n * **NOTE**: `{{subjectKeyId}}` will be replaced to value from the extension.\n * @example\n * https://censys.io/certificates?q=parsed.extensions.authority_key_id:%20{{subjectKeyId}}\n */\n @Prop({ reflect: true }) subjectKeyIdChildrenLink?: string;\n\n /**\n * Subject Key Identifier extension siblings link.\n * <br />\n * **NOTE**: `{{subjectKeyId}}` will be replaced to value from the extension.\n * @example\n * https://some.com/{{subjectKeyId}}\n */\n @Prop({ reflect: true }) subjectKeyIdSiblingsLink?: string;\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 @State() mobileScreenView: boolean = false;\n\n @State() isDecodeInProcess: boolean = true;\n\n private handleMediaQueryChange(event: MediaQueryListEvent) {\n this.mobileScreenView = event.matches;\n }\n\n componentWillLoad() {\n this.decodeCertificate(this.certificate);\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 private async decodeCertificate(certificate: AttributeCertificateProp) {\n this.isDecodeInProcess = true;\n\n try {\n if (certificate instanceof X509AttributeCertificate) {\n this.certificateDecoded = certificate;\n } else if (typeof certificate === 'string') {\n this.certificateDecoded = new X509AttributeCertificate(certificate);\n } else {\n return;\n }\n\n this.certificateDecoded.parseExtensions();\n this.certificateDecoded.parseAttributes();\n await this.certificateDecoded.getThumbprint('SHA-1');\n await this.certificateDecoded.getThumbprint('SHA-256');\n } catch (error) {\n this.certificateDecodeError = error;\n\n console.error('Error certificate parse:', error);\n }\n\n this.isDecodeInProcess = false;\n }\n\n /**\n * Rerun decodeCertificate if previuos value not equal current value\n */\n @Watch('certificate')\n watchCertificateAndDecode(\n newValue: AttributeCertificateProp,\n oldValue: AttributeCertificateProp,\n ) {\n if (typeof newValue === 'string' && typeof oldValue === 'string') {\n if (newValue !== oldValue) {\n this.decodeCertificate(newValue);\n }\n\n return;\n }\n\n if (\n newValue instanceof X509AttributeCertificate\n && oldValue instanceof X509AttributeCertificate\n ) {\n if (newValue.serialNumber !== oldValue.serialNumber) {\n this.decodeCertificate(newValue);\n }\n }\n }\n\n private getAuthKeyIdParentLink = (value: string) => this.authKeyIdParentLink\n ?.replace('{{authKeyId}}', value);\n\n private getAuthKeyIdSiblingsLink = (value: string) => this.authKeyIdSiblingsLink\n ?.replace('{{authKeyId}}', value);\n\n private getSubjectKeyIdChildrenLink = (value: string) => this.subjectKeyIdChildrenLink\n ?.replace('{{subjectKeyId}}', value);\n\n private getSubjectKeyIdSiblingsLink = (value: string) => this.subjectKeyIdSiblingsLink\n ?.replace('{{subjectKeyId}}', value);\n\n // eslint-disable-next-line class-methods-use-this\n private renderErrorState() {\n return (\n <div class=\"status_wrapper\">\n <Typography>\n There was an error decoding this attribute certificate.\n </Typography>\n </div>\n );\n }\n\n // eslint-disable-next-line class-methods-use-this\n private renderEmptyState() {\n return (\n <div class=\"status_wrapper\">\n <Typography>\n There is no attribute certificate available.\n </Typography>\n </div>\n );\n }\n\n render() {\n if (this.certificateDecodeError) {\n return this.renderErrorState();\n }\n\n if (!this.certificateDecoded) {\n return this.renderEmptyState();\n }\n\n return (\n <Host\n data-mobile-screen-view={String(this.mobileScreenView)}\n >\n <table>\n <BasicInformation\n {...this.certificateDecoded}\n />\n\n <Issuer\n issuer={this.certificateDecoded.issuer}\n />\n\n <Holder\n holder={this.certificateDecoded.holder}\n />\n\n <Signature\n signature={this.certificateDecoded.signature}\n />\n\n <Thumbprints\n thumbprints={this.certificateDecoded.thumbprints}\n />\n\n <Attributes\n attributes={this.certificateDecoded.attributes}\n getLEILink={getLEILink}\n getDNSNameLink={getDNSNameLink}\n getIPAddressLink={getIPAddressLink}\n getAuthKeyIdParentLink={this.getAuthKeyIdParentLink}\n getAuthKeyIdSiblingsLink={this.getAuthKeyIdSiblingsLink}\n getSubjectKeyIdChildrenLink={this.getSubjectKeyIdChildrenLink}\n getSubjectKeyIdSiblingsLink={this.getSubjectKeyIdSiblingsLink}\n />\n\n <Extensions\n extensions={this.certificateDecoded.extensions}\n getLEILink={getLEILink}\n getDNSNameLink={getDNSNameLink}\n getIPAddressLink={getIPAddressLink}\n getAuthKeyIdParentLink={this.getAuthKeyIdParentLink}\n getAuthKeyIdSiblingsLink={this.getAuthKeyIdSiblingsLink}\n getSubjectKeyIdChildrenLink={this.getSubjectKeyIdChildrenLink}\n getSubjectKeyIdSiblingsLink={this.getSubjectKeyIdSiblingsLink}\n />\n\n {this.download && (\n <Miscellaneous\n certificate={this.certificateDecoded}\n />\n )}\n </table>\n </Host>\n );\n }\n}\n"]}