@peculiar/certificates-viewer 2.0.1 → 2.0.2-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (304) hide show
  1. package/README.md +3 -3
  2. package/dist/cjs/_commonjsHelpers-cb1f949a.js +23 -0
  3. package/dist/cjs/{download-cd98aa01.js → certification_request-96951e7b.js} +2880 -3313
  4. package/dist/cjs/{dom-760f300f.js → dom-f57e260e.js} +4 -1
  5. package/dist/cjs/download-5e7d5455.js +438 -0
  6. package/dist/cjs/{index-2973f90a.js → index-064e95c7.js} +287 -634
  7. package/dist/cjs/index.cjs.js +12 -0
  8. package/dist/cjs/{l10n-e971a5ac.js → l10n-2e7def18.js} +72 -90
  9. package/dist/cjs/loader.cjs.js +12 -3
  10. package/dist/cjs/peculiar-attribute-certificate-viewer_9.cjs.entry.js +1426 -1391
  11. package/dist/cjs/peculiar-certificate-summary_3.cjs.entry.js +66 -62
  12. package/dist/cjs/peculiar-certificates-viewer.cjs.entry.js +222 -217
  13. package/dist/cjs/peculiar.cjs.js +70 -3
  14. package/dist/collection/collection-manifest.json +2 -2
  15. package/dist/collection/components/attribute-certificate-viewer/attribute-certificate-viewer.js +220 -205
  16. package/dist/collection/components/attribute-certificate-viewer/holder.js +27 -24
  17. package/dist/collection/components/attribute-certificate-viewer/issuer.js +11 -8
  18. package/dist/collection/components/button/button.css +2 -7
  19. package/dist/collection/components/button/button.js +125 -122
  20. package/dist/collection/components/button-split/button-split.js +103 -100
  21. package/dist/collection/components/certificate-decoder/certificate-decoder.css +1 -3
  22. package/dist/collection/components/certificate-decoder/certificate-decoder.js +158 -155
  23. package/dist/collection/components/certificate-summary/certificate-summary.js +75 -72
  24. package/dist/collection/components/certificate-viewer/attributes/activity_description_attribute.js +11 -8
  25. package/dist/collection/components/certificate-viewer/attributes/as_string_attribute.js +6 -3
  26. package/dist/collection/components/certificate-viewer/attributes/basic_attribute.js +11 -8
  27. package/dist/collection/components/certificate-viewer/attributes/challenge_password_attribute.js +6 -3
  28. package/dist/collection/components/certificate-viewer/attributes/index.js +45 -42
  29. package/dist/collection/components/certificate-viewer/attributes/insurance_value_attribute.js +7 -4
  30. package/dist/collection/components/certificate-viewer/attributes/name_attribute.js +6 -3
  31. package/dist/collection/components/certificate-viewer/attributes/name_part.js +8 -5
  32. package/dist/collection/components/certificate-viewer/attributes/type_relationship_attribute.js +5 -2
  33. package/dist/collection/components/certificate-viewer/attributes/unstructured_name_attribute.js +6 -3
  34. package/dist/collection/components/certificate-viewer/attributes/valuation_ranking_attribute.js +18 -15
  35. package/dist/collection/components/certificate-viewer/attributes/web_gdpr_attribute.js +13 -10
  36. package/dist/collection/components/certificate-viewer/basic_information.js +13 -10
  37. package/dist/collection/components/certificate-viewer/certificate-viewer.js +255 -240
  38. package/dist/collection/components/certificate-viewer/extensions/archive_rev_info_extension.js +6 -3
  39. package/dist/collection/components/certificate-viewer/extensions/as_string_extension.js +6 -3
  40. package/dist/collection/components/certificate-viewer/extensions/attribute_value.js +4 -1
  41. package/dist/collection/components/certificate-viewer/extensions/authority_key_identifier_extension.js +18 -15
  42. package/dist/collection/components/certificate-viewer/extensions/basic_constraints_extension.js +7 -4
  43. package/dist/collection/components/certificate-viewer/extensions/basic_extension.js +12 -9
  44. package/dist/collection/components/certificate-viewer/extensions/biometric_syntax_extension.js +12 -9
  45. package/dist/collection/components/certificate-viewer/extensions/ca_version_extension.js +8 -5
  46. package/dist/collection/components/certificate-viewer/extensions/certificate_policies_extension.js +28 -25
  47. package/dist/collection/components/certificate-viewer/extensions/certificate_template_extension.js +8 -5
  48. package/dist/collection/components/certificate-viewer/extensions/certificate_transparency_extension.js +13 -10
  49. package/dist/collection/components/certificate-viewer/extensions/crl_distribution_points_extension.js +11 -8
  50. package/dist/collection/components/certificate-viewer/extensions/crl_reason_extension.js +6 -3
  51. package/dist/collection/components/certificate-viewer/extensions/enroll_cert_type_extension.js +6 -3
  52. package/dist/collection/components/certificate-viewer/extensions/entrust_version_info_extension.js +7 -4
  53. package/dist/collection/components/certificate-viewer/extensions/extended_key_usage_extension.js +5 -2
  54. package/dist/collection/components/certificate-viewer/extensions/general_name_part.js +55 -52
  55. package/dist/collection/components/certificate-viewer/extensions/index.js +112 -109
  56. package/dist/collection/components/certificate-viewer/extensions/info_access_syntax_extension.js +9 -6
  57. package/dist/collection/components/certificate-viewer/extensions/key_usage_extension.js +6 -3
  58. package/dist/collection/components/certificate-viewer/extensions/lei_extension.js +6 -3
  59. package/dist/collection/components/certificate-viewer/extensions/lei_role_extennsion.js +6 -3
  60. package/dist/collection/components/certificate-viewer/extensions/logotype_extension.js +49 -46
  61. package/dist/collection/components/certificate-viewer/extensions/name_constraints_extension.js +8 -5
  62. package/dist/collection/components/certificate-viewer/extensions/netscape_cert_type_extension.js +6 -3
  63. package/dist/collection/components/certificate-viewer/extensions/netscape_comment_extension.js +6 -3
  64. package/dist/collection/components/certificate-viewer/extensions/policy_constraints_extension.js +7 -4
  65. package/dist/collection/components/certificate-viewer/extensions/policy_mappings_extension.js +9 -6
  66. package/dist/collection/components/certificate-viewer/extensions/private_key_usage_period_extension.js +7 -4
  67. package/dist/collection/components/certificate-viewer/extensions/qc_statements_extension.js +9 -6
  68. package/dist/collection/components/certificate-viewer/extensions/subject_alternative_name_extension.js +5 -2
  69. package/dist/collection/components/certificate-viewer/extensions/subject_directory_attributes_extension.js +9 -6
  70. package/dist/collection/components/certificate-viewer/extensions/subject_key_identifier_extension.js +18 -15
  71. package/dist/collection/components/certificate-viewer/extensions/timestamp_extension.js +8 -5
  72. package/dist/collection/components/certificate-viewer/extensions/tn_auth_list_extension.js +10 -7
  73. package/dist/collection/components/certificate-viewer/get_string_by_oid.js +8 -5
  74. package/dist/collection/components/certificate-viewer/issuer_name.js +9 -6
  75. package/dist/collection/components/certificate-viewer/miscellaneous.js +29 -26
  76. package/dist/collection/components/certificate-viewer/public_key.js +31 -28
  77. package/dist/collection/components/certificate-viewer/row.js +35 -32
  78. package/dist/collection/components/certificate-viewer/signature.js +12 -9
  79. package/dist/collection/components/certificate-viewer/subject_name.js +8 -5
  80. package/dist/collection/components/certificate-viewer/thumbprints.js +15 -12
  81. package/dist/collection/components/certificates-viewer/certificates-viewer.css +1 -19
  82. package/dist/collection/components/certificates-viewer/certificates-viewer.js +384 -381
  83. package/dist/collection/components/circular-progress/circular-progress.css +2 -24
  84. package/dist/collection/components/circular-progress/circular-progress.js +73 -70
  85. package/dist/collection/components/csr-viewer/csr-viewer.js +197 -188
  86. package/dist/collection/components/highlight-words/highlight-words.js +56 -53
  87. package/dist/collection/components/link/link.css +1 -3
  88. package/dist/collection/components/link/link.js +60 -57
  89. package/dist/collection/components/text-hider/text-hider.js +75 -72
  90. package/dist/collection/components/typography/typography.css +1 -3
  91. package/dist/collection/components/typography/typography.js +126 -123
  92. package/dist/collection/constants/logs.js +79 -76
  93. package/dist/collection/constants/oids.js +2301 -2298
  94. package/dist/collection/crypto/asn_data.js +33 -32
  95. package/dist/collection/crypto/attribute.js +52 -49
  96. package/dist/collection/crypto/csr.js +64 -61
  97. package/dist/collection/crypto/extension.js +126 -123
  98. package/dist/collection/crypto/index.js +3 -0
  99. package/dist/collection/crypto/name.js +33 -32
  100. package/dist/collection/crypto/provider.js +28 -25
  101. package/dist/collection/crypto/utils.js +24 -21
  102. package/dist/collection/crypto/x509_attribute_certificate.js +61 -58
  103. package/dist/collection/crypto/x509_certificate.js +107 -104
  104. package/dist/collection/index.js +5 -1
  105. package/dist/collection/utils/date_formatter.js +19 -16
  106. package/dist/collection/utils/download.js +18 -15
  107. package/dist/collection/utils/download_from_buffer.js +30 -25
  108. package/dist/collection/utils/history.js +5 -2
  109. package/dist/collection/utils/index.js +3 -0
  110. package/dist/collection/utils/is_link.js +4 -1
  111. package/dist/collection/utils/l10n.js +28 -25
  112. package/dist/collection/utils/parse_hash.js +16 -13
  113. package/dist/collection/utils/query_stringify.js +12 -9
  114. package/dist/collection/utils/read_file.js +43 -40
  115. package/dist/collection/utils/third_party_links.js +3 -0
  116. package/dist/collection/utils/validator.js +15 -12
  117. package/dist/esm/_commonjsHelpers-bfbd2ad8.js +20 -0
  118. package/dist/esm/{download-1ff0a3be.js → certification_request-48e8b956.js} +2898 -3328
  119. package/dist/esm/{dom-91ed8d21.js → dom-f1b08a97.js} +4 -1
  120. package/dist/esm/download-cf68ac2c.js +434 -0
  121. package/dist/esm/{index-5ef692cc.js → index-bbd484d9.js} +278 -624
  122. package/dist/esm/index.js +5 -0
  123. package/dist/esm/{l10n-c8cf6930.js → l10n-ead9928b.js} +71 -86
  124. package/dist/esm/{loader.mjs → loader.js} +11 -2
  125. package/dist/esm/peculiar-attribute-certificate-viewer_9.entry.js +1425 -1390
  126. package/dist/esm/peculiar-certificate-summary_3.entry.js +66 -62
  127. package/dist/esm/peculiar-certificates-viewer.entry.js +222 -217
  128. package/dist/esm/peculiar.js +73 -0
  129. package/dist/esm/polyfills/css-shim.js +1 -1
  130. package/dist/esm/polyfills/index.js +2 -2
  131. package/dist/esm-es5/_commonjsHelpers-bfbd2ad8.js +4 -0
  132. package/dist/esm-es5/certification_request-48e8b956.js +89 -0
  133. package/dist/esm-es5/dom-f1b08a97.js +24 -0
  134. package/dist/esm-es5/download-cf68ac2c.js +18 -0
  135. package/dist/esm-es5/index-bbd484d9.js +5 -0
  136. package/dist/esm-es5/index.js +4 -0
  137. package/dist/esm-es5/l10n-ead9928b.js +39 -0
  138. package/dist/esm-es5/loader.js +4 -0
  139. package/dist/esm-es5/peculiar-attribute-certificate-viewer_9.entry.js +198 -1907
  140. package/dist/esm-es5/peculiar-certificate-summary_3.entry.js +4 -83
  141. package/dist/esm-es5/peculiar-certificates-viewer.entry.js +4 -290
  142. package/dist/esm-es5/peculiar.js +4 -0
  143. package/dist/index.cjs.js +1 -0
  144. package/dist/index.js +1 -1
  145. package/dist/peculiar/index.esm.js +4 -0
  146. package/dist/peculiar/p-047b12d9.system.js +89 -0
  147. package/dist/peculiar/p-13e9d17d.system.entry.js +460 -0
  148. package/dist/peculiar/p-29cdd256.system.js +18 -0
  149. package/dist/peculiar/{p-75076c56.system.js → p-3929074b.system.js} +18 -15
  150. package/dist/peculiar/p-452d69af.entry.js +113 -0
  151. package/dist/peculiar/p-4f52a24f.system.js +39 -0
  152. package/dist/peculiar/p-5f7fbf05.system.entry.js +4 -0
  153. package/dist/peculiar/p-82033e2e.system.entry.js +4 -0
  154. package/dist/peculiar/p-886e9c53.js +87 -0
  155. package/dist/peculiar/p-88fbaf05.system.js +4 -0
  156. package/dist/peculiar/p-8df391dc.system.js +4 -0
  157. package/dist/peculiar/p-9837be14.system.js +5 -0
  158. package/dist/peculiar/p-9ae6b1f8.entry.js +4 -0
  159. package/dist/peculiar/{p-3d1015c2.js → p-9f4ee110.js} +5 -2
  160. package/dist/peculiar/p-c774ec0b.js +18 -0
  161. package/dist/peculiar/p-d09b762f.js +33 -0
  162. package/dist/peculiar/p-d0b55fbb.js +4 -0
  163. package/dist/peculiar/p-e5f99586.entry.js +4 -0
  164. package/dist/peculiar/p-ee0e2707.system.js +4 -0
  165. package/dist/peculiar/p-f7683ba5.js +5 -0
  166. package/dist/peculiar/peculiar.esm.js +4 -1
  167. package/dist/peculiar/peculiar.js +1 -3
  168. package/dist/types/components/attribute-certificate-viewer/attribute-certificate-viewer.d.ts +56 -56
  169. package/dist/types/components/attribute-certificate-viewer/holder.d.ts +1 -1
  170. package/dist/types/components/attribute-certificate-viewer/issuer.d.ts +1 -1
  171. package/dist/types/components/button/button.d.ts +17 -17
  172. package/dist/types/components/button-split/button-split.d.ts +10 -10
  173. package/dist/types/components/certificate-decoder/certificate-decoder.d.ts +16 -16
  174. package/dist/types/components/certificate-summary/certificate-summary.d.ts +4 -4
  175. package/dist/types/components/certificate-viewer/attributes/activity_description_attribute.d.ts +1 -1
  176. package/dist/types/components/certificate-viewer/attributes/as_string_attribute.d.ts +1 -1
  177. package/dist/types/components/certificate-viewer/attributes/basic_attribute.d.ts +1 -1
  178. package/dist/types/components/certificate-viewer/attributes/challenge_password_attribute.d.ts +1 -1
  179. package/dist/types/components/certificate-viewer/attributes/index.d.ts +1 -1
  180. package/dist/types/components/certificate-viewer/attributes/insurance_value_attribute.d.ts +1 -1
  181. package/dist/types/components/certificate-viewer/attributes/name_attribute.d.ts +1 -1
  182. package/dist/types/components/certificate-viewer/attributes/name_part.d.ts +1 -1
  183. package/dist/types/components/certificate-viewer/attributes/type_relationship_attribute.d.ts +1 -1
  184. package/dist/types/components/certificate-viewer/attributes/unstructured_name_attribute.d.ts +1 -1
  185. package/dist/types/components/certificate-viewer/attributes/valuation_ranking_attribute.d.ts +1 -1
  186. package/dist/types/components/certificate-viewer/attributes/web_gdpr_attribute.d.ts +1 -1
  187. package/dist/types/components/certificate-viewer/basic_information.d.ts +6 -6
  188. package/dist/types/components/certificate-viewer/certificate-viewer.d.ts +66 -66
  189. package/dist/types/components/certificate-viewer/extensions/archive_rev_info_extension.d.ts +1 -1
  190. package/dist/types/components/certificate-viewer/extensions/as_string_extension.d.ts +1 -1
  191. package/dist/types/components/certificate-viewer/extensions/authority_key_identifier_extension.d.ts +1 -1
  192. package/dist/types/components/certificate-viewer/extensions/basic_constraints_extension.d.ts +1 -1
  193. package/dist/types/components/certificate-viewer/extensions/basic_extension.d.ts +1 -1
  194. package/dist/types/components/certificate-viewer/extensions/biometric_syntax_extension.d.ts +1 -1
  195. package/dist/types/components/certificate-viewer/extensions/ca_version_extension.d.ts +1 -1
  196. package/dist/types/components/certificate-viewer/extensions/certificate_policies_extension.d.ts +1 -1
  197. package/dist/types/components/certificate-viewer/extensions/certificate_template_extension.d.ts +1 -1
  198. package/dist/types/components/certificate-viewer/extensions/certificate_transparency_extension.d.ts +1 -1
  199. package/dist/types/components/certificate-viewer/extensions/crl_distribution_points_extension.d.ts +1 -1
  200. package/dist/types/components/certificate-viewer/extensions/crl_reason_extension.d.ts +1 -1
  201. package/dist/types/components/certificate-viewer/extensions/enroll_cert_type_extension.d.ts +1 -1
  202. package/dist/types/components/certificate-viewer/extensions/entrust_version_info_extension.d.ts +1 -1
  203. package/dist/types/components/certificate-viewer/extensions/extended_key_usage_extension.d.ts +1 -1
  204. package/dist/types/components/certificate-viewer/extensions/general_name_part.d.ts +1 -1
  205. package/dist/types/components/certificate-viewer/extensions/index.d.ts +2 -2
  206. package/dist/types/components/certificate-viewer/extensions/info_access_syntax_extension.d.ts +1 -1
  207. package/dist/types/components/certificate-viewer/extensions/key_usage_extension.d.ts +1 -1
  208. package/dist/types/components/certificate-viewer/extensions/lei_extension.d.ts +1 -1
  209. package/dist/types/components/certificate-viewer/extensions/lei_role_extennsion.d.ts +1 -1
  210. package/dist/types/components/certificate-viewer/extensions/logotype_extension.d.ts +1 -1
  211. package/dist/types/components/certificate-viewer/extensions/name_constraints_extension.d.ts +1 -1
  212. package/dist/types/components/certificate-viewer/extensions/netscape_cert_type_extension.d.ts +1 -1
  213. package/dist/types/components/certificate-viewer/extensions/netscape_comment_extension.d.ts +1 -1
  214. package/dist/types/components/certificate-viewer/extensions/policy_constraints_extension.d.ts +1 -1
  215. package/dist/types/components/certificate-viewer/extensions/policy_mappings_extension.d.ts +1 -1
  216. package/dist/types/components/certificate-viewer/extensions/private_key_usage_period_extension.d.ts +1 -1
  217. package/dist/types/components/certificate-viewer/extensions/qc_statements_extension.d.ts +1 -1
  218. package/dist/types/components/certificate-viewer/extensions/subject_alternative_name_extension.d.ts +1 -1
  219. package/dist/types/components/certificate-viewer/extensions/subject_directory_attributes_extension.d.ts +1 -1
  220. package/dist/types/components/certificate-viewer/extensions/subject_key_identifier_extension.d.ts +1 -1
  221. package/dist/types/components/certificate-viewer/extensions/timestamp_extension.d.ts +1 -1
  222. package/dist/types/components/certificate-viewer/extensions/tn_auth_list_extension.d.ts +1 -1
  223. package/dist/types/components/certificate-viewer/issuer_name.d.ts +2 -2
  224. package/dist/types/components/certificate-viewer/miscellaneous.d.ts +1 -1
  225. package/dist/types/components/certificate-viewer/public_key.d.ts +1 -1
  226. package/dist/types/components/certificate-viewer/row.d.ts +7 -7
  227. package/dist/types/components/certificate-viewer/signature.d.ts +1 -1
  228. package/dist/types/components/certificate-viewer/subject_name.d.ts +1 -1
  229. package/dist/types/components/certificate-viewer/thumbprints.d.ts +1 -1
  230. package/dist/types/components/certificate-viewer/types.d.ts +26 -0
  231. package/dist/types/components/certificates-viewer/certificates-viewer.d.ts +64 -64
  232. package/dist/types/components/circular-progress/circular-progress.d.ts +10 -10
  233. package/dist/types/components/csr-viewer/csr-viewer.d.ts +45 -45
  234. package/dist/types/components/highlight-words/highlight-words.d.ts +8 -8
  235. package/dist/types/components/link/link.d.ts +6 -6
  236. package/dist/types/components/text-hider/text-hider.d.ts +4 -4
  237. package/dist/types/components/typography/typography.d.ts +18 -18
  238. package/dist/types/components.d.ts +11 -3
  239. package/dist/types/constants/logs.d.ts +76 -76
  240. package/dist/types/constants/oids.d.ts +2293 -2293
  241. package/dist/types/crypto/asn_data.d.ts +6 -6
  242. package/dist/types/crypto/attribute.d.ts +3 -3
  243. package/dist/types/crypto/csr.d.ts +19 -19
  244. package/dist/types/crypto/extension.d.ts +3 -3
  245. package/dist/types/crypto/name.d.ts +7 -7
  246. package/dist/types/crypto/provider.d.ts +15 -15
  247. package/dist/types/crypto/x509_attribute_certificate.d.ts +22 -22
  248. package/dist/types/crypto/x509_certificate.d.ts +28 -28
  249. package/dist/types/index.d.ts +2 -1
  250. package/dist/types/interface.d.ts +3 -0
  251. package/dist/types/stencil-public-runtime.d.ts +230 -217
  252. package/dist/types/utils/download.d.ts +8 -8
  253. package/dist/types/utils/download_from_buffer.d.ts +3 -3
  254. package/dist/types/utils/l10n.d.ts +43 -43
  255. package/dist/types/utils/read_file.d.ts +7 -7
  256. package/loader/cdn.js +3 -1
  257. package/loader/index.cjs.js +3 -1
  258. package/loader/index.d.ts +0 -1
  259. package/loader/index.es2017.js +5 -0
  260. package/loader/{index.mjs → index.js} +4 -2
  261. package/loader/package.json +4 -5
  262. package/package.json +15 -16
  263. package/dist/cjs/css-shim-1b988199.js +0 -6
  264. package/dist/cjs/patch-15ea31af.js +0 -112
  265. package/dist/cjs/shadow-css-376763e9.js +0 -385
  266. package/dist/esm/css-shim-5ce2b5c4.js +0 -4
  267. package/dist/esm/index.mjs +0 -1
  268. package/dist/esm/patch-f8a17185.js +0 -109
  269. package/dist/esm/peculiar.mjs +0 -6
  270. package/dist/esm/shadow-css-95922619.js +0 -383
  271. package/dist/esm-es5/css-shim-5ce2b5c4.js +0 -122
  272. package/dist/esm-es5/dom-91ed8d21.js +0 -468
  273. package/dist/esm-es5/download-1ff0a3be.js +0 -12692
  274. package/dist/esm-es5/index-5ef692cc.js +0 -1839
  275. package/dist/esm-es5/index.mjs +0 -0
  276. package/dist/esm-es5/l10n-c8cf6930.js +0 -758
  277. package/dist/esm-es5/loader.mjs +0 -10
  278. package/dist/esm-es5/patch-f8a17185.js +0 -106
  279. package/dist/esm-es5/peculiar.mjs +0 -5
  280. package/dist/esm-es5/shadow-css-95922619.js +0 -408
  281. package/dist/index.mjs +0 -1
  282. package/dist/peculiar/p-0ad0b6e8.js +0 -1
  283. package/dist/peculiar/p-198d9121.js +0 -1
  284. package/dist/peculiar/p-294c4ef9.entry.js +0 -1
  285. package/dist/peculiar/p-3d339152.system.entry.js +0 -1
  286. package/dist/peculiar/p-4b7cd42f.js +0 -12
  287. package/dist/peculiar/p-50ea2036.system.js +0 -1
  288. package/dist/peculiar/p-557d912f.system.js +0 -1
  289. package/dist/peculiar/p-84e8326d.entry.js +0 -110
  290. package/dist/peculiar/p-94f96303.system.js +0 -100
  291. package/dist/peculiar/p-983b5210.system.entry.js +0 -1
  292. package/dist/peculiar/p-9f815f76.system.js +0 -1
  293. package/dist/peculiar/p-aa0a9b36.system.js +0 -1
  294. package/dist/peculiar/p-bd1f9066.system.js +0 -36
  295. package/dist/peculiar/p-bd949790.js +0 -1
  296. package/dist/peculiar/p-cf1841f8.js +0 -30
  297. package/dist/peculiar/p-dbdd61e7.entry.js +0 -1
  298. package/dist/peculiar/p-dc6b70b2.js +0 -100
  299. package/dist/peculiar/p-fb53799e.system.js +0 -1
  300. package/dist/peculiar/p-fc92385a.system.entry.js +0 -457
  301. package/dist/peculiar/p-fdad110e.system.js +0 -13
  302. package/dist/peculiar.js +0 -30
  303. package/loader/index.es2017.mjs +0 -3
  304. package/loader/node-main.js +0 -3
@@ -1,231 +1,236 @@
1
+ /*!
2
+ * © Peculiar Ventures https://peculiarventures.com/ - MIT License
3
+ */
1
4
  'use strict';
2
5
 
3
6
  Object.defineProperty(exports, '__esModule', { value: true });
4
7
 
5
- const index = require('./index-2973f90a.js');
6
- const l10n = require('./l10n-e971a5ac.js');
7
- const download = require('./download-cd98aa01.js');
8
+ const index = require('./index-064e95c7.js');
9
+ const certification_request = require('./certification_request-96951e7b.js');
10
+ const download = require('./download-5e7d5455.js');
11
+ const l10n = require('./l10n-2e7def18.js');
12
+ require('./_commonjsHelpers-cb1f949a.js');
8
13
 
9
- const certificatesViewerCss = ":host{-webkit-box-sizing:border-box;box-sizing:border-box}:host *,:host *:before,:host *:after{-webkit-box-sizing:inherit;box-sizing:inherit}:host{display:block;width:100%;word-wrap:break-word;min-width:280px;overflow:auto;position:relative;background:white;background:rgba(var(--pv-color-light-rgb), 1)}table{width:100%;table-layout:fixed;border-collapse:collapse;border-spacing:0}table thead{background-color:rgba(53, 132, 247, 0.07);background-color:rgba(var(--pv-color-primary-rgb), 0.07)}table tr td{vertical-align:middle}table tbody tr:not(.expanded_summary){cursor:pointer}table tr{border-color:#d1d5d9;border-color:rgba(var(--pv-color-grey_3-rgb), 1)}table th{padding:15px 10px;border-width:1px;border-style:solid;border-color:#d1d5d9;border-color:rgba(var(--pv-color-grey_3-rgb), 1)}table td{padding:8px 10px;border-width:1px;border-style:solid;border-color:#d1d5d9;border-color:rgba(var(--pv-color-grey_3-rgb), 1)}table .col_issuer,table .col_name,table .col_public_key{width:16%}table .col_actions,table .col_tests{width:18%}table.m_extra .col_issuer,table.m_extra .col_name,table.m_extra .col_public_key{width:12%}table.m_extra .col_actions,table.m_extra .col_tests{width:17%}table tr.expanded td:not(:last-child){border-right-color:transparent}table tr.expanded td{border-bottom-color:transparent}.expanded{border-bottom-color:transparent;background-color:rgba(53, 132, 247, 0.04);background-color:rgba(var(--pv-color-primary-rgb), 0.04)}table tr.expanded_summary{background-color:rgba(53, 132, 247, 0.04);background-color:rgba(var(--pv-color-primary-rgb), 0.04)}table tr.expanded_summary td{vertical-align:top;padding:10px 20px 26px}@-webkit-keyframes fadeIn{0%{opacity:0.001}100%{opacity:1}}@keyframes fadeIn{0%{opacity:0.001}100%{opacity:1}}.modal_wrapper{position:fixed;top:0;left:0;width:100%;height:100%;z-index:1;overflow:auto;text-align:center;-webkit-animation:fadeIn 200ms;animation:fadeIn 200ms;padding:30px 10px}.modal_wrapper:before{display:inline-block;vertical-align:middle;width:0;height:100%;content:\"\"}.modal_backdrop{background:rgba(42, 49, 52, 0.5);background:rgba(var(--pv-color-dark-rgb), 0.5);z-index:-1;position:fixed;top:0;right:0;bottom:0;left:0}.modal_container{position:relative;display:inline-block;vertical-align:middle;width:100%;max-width:900px;text-align:left;border-radius:3px;overflow:hidden;background-color:white;background-color:rgba(var(--pv-color-light-rgb), 1);height:100%}.modal_title{background-color:rgba(53, 132, 247, 0.07);background-color:rgba(var(--pv-color-primary-rgb), 0.07);border-color:#d1d5d9;border-color:rgba(var(--pv-color-grey_3-rgb), 1);border-bottom-width:1px;border-bottom-style:solid;padding:20px 60px 16px 20px;position:relative;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;height:60px}.modal_content{height:calc(100% - 60px);overflow-y:auto}.modal_close{cursor:pointer;border:none;background-color:transparent;position:absolute;top:0;bottom:0;right:0;padding:0 12px;-webkit-transition:opacity 100ms;transition:opacity 100ms;outline:none}.modal_close:hover{opacity:0.6}.modal_close svg{fill:#2a3134;fill:rgba(var(--pv-color-dark-rgb), 1)}.button_table_action{margin:2px}.mobile_title{display:none}.status_wrapper{height:85px;text-align:center;pointer-events:none}.search_section{background-color:rgba(53, 132, 247, 0.07);background-color:rgba(var(--pv-color-primary-rgb), 0.07);border-color:#d1d5d9;border-color:rgba(var(--pv-color-grey_3-rgb), 1);height:50px;padding:10px;border-width:1px 1px 0 1px;border-style:solid}.input_search{height:100%;width:100%;border-radius:3px;border-width:1px;border-style:solid;padding:0 14px;font-size:12px;outline:none;border-color:#d1d5d9;border-color:rgba(var(--pv-color-grey_3-rgb), 1);color:#2a3134;color:rgba(var(--pv-color-dark-rgb), 1)}.input_search::-moz-placeholder{color:#d1d5d9;color:rgba(var(--pv-color-grey_3-rgb), 1)}.input_search:-ms-input-placeholder{color:#d1d5d9;color:rgba(var(--pv-color-grey_3-rgb), 1)}.input_search::-webkit-input-placeholder{color:#d1d5d9;color:rgba(var(--pv-color-grey_3-rgb), 1)}.input_search::-ms-input-placeholder{color:#d1d5d9;color:rgba(var(--pv-color-grey_3-rgb), 1)}.input_search::placeholder{color:#d1d5d9;color:rgba(var(--pv-color-grey_3-rgb), 1)}.loading_container{position:absolute;top:0;left:0;width:100%;height:100%;background:rgba(42, 49, 52, 0.3);background:rgba(var(--pv-color-dark-rgb), 0.3);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.align_center{text-align:center}@media (hover: hover){table tbody tr:not(.expanded_summary):hover{background-color:rgba(53, 132, 247, 0.04);background-color:rgba(var(--pv-color-primary-rgb), 0.04)}}@media (max-width: 900px){table,tbody,tr,td{display:block}thead{display:none}tr{padding:0 15px;border-width:1px;border-style:solid}tr:not(:first-child){margin-top:-1px}tr:not(.expanded_summary) td:first-child{border:none !important}table td{padding-left:0;padding-right:0;border-width:1px 0 0 0 !important;border-color:rgba(209, 213, 217, 0.5);border-color:rgba(var(--pv-color-grey_3-rgb), 0.5)}table tr.expanded_summary td{padding:15px 0}.mobile_title{display:inline-block;width:90px;vertical-align:middle}.modal_title{padding:17px 60px 17px 15px}.content{display:inline-block;width:calc(100% - 90px);vertical-align:middle;text-align:left}.expanded_summary{border-top-color:transparent;padding-bottom:10px}.expanded_summary td:before{content:none}.status_wrapper{height:266px;display:table-cell}.search_section{height:60px;padding:15px}.align_center{text-align:inherit}}";
14
+ const certificatesViewerCss = ":host{-webkit-box-sizing:border-box;box-sizing:border-box}:host *,:host *:before,:host *:after{-webkit-box-sizing:inherit;box-sizing:inherit}:host{display:block;width:100%;word-wrap:break-word;min-width:280px;overflow:auto;position:relative;background:white;background:rgba(var(--pv-color-light-rgb), 1)}table{width:100%;table-layout:fixed;border-collapse:collapse;border-spacing:0}table thead{background-color:rgba(53, 132, 247, 0.07);background-color:rgba(var(--pv-color-primary-rgb), 0.07)}table tr td{vertical-align:middle}table tbody tr:not(.expanded_summary){cursor:pointer}table tr{border-color:#d1d5d9;border-color:rgba(var(--pv-color-grey_3-rgb), 1)}table th{padding:15px 10px;border-width:1px;border-style:solid;border-color:#d1d5d9;border-color:rgba(var(--pv-color-grey_3-rgb), 1)}table td{padding:8px 10px;border-width:1px;border-style:solid;border-color:#d1d5d9;border-color:rgba(var(--pv-color-grey_3-rgb), 1)}table .col_issuer,table .col_name,table .col_public_key{width:16%}table .col_actions,table .col_tests{width:18%}table.m_extra .col_issuer,table.m_extra .col_name,table.m_extra .col_public_key{width:12%}table.m_extra .col_actions,table.m_extra .col_tests{width:17%}table tr.expanded td:not(:last-child){border-right-color:transparent}table tr.expanded td{border-bottom-color:transparent}.expanded{border-bottom-color:transparent;background-color:rgba(53, 132, 247, 0.04);background-color:rgba(var(--pv-color-primary-rgb), 0.04)}table tr.expanded_summary{background-color:rgba(53, 132, 247, 0.04);background-color:rgba(var(--pv-color-primary-rgb), 0.04)}table tr.expanded_summary td{vertical-align:top;padding:10px 20px 26px}@-webkit-keyframes fadeIn{0%{opacity:0.001}100%{opacity:1}}@keyframes fadeIn{0%{opacity:0.001}100%{opacity:1}}.modal_wrapper{position:fixed;top:0;left:0;width:100%;height:100%;z-index:1;overflow:auto;text-align:center;-webkit-animation:fadeIn 200ms;animation:fadeIn 200ms;padding:30px 10px}.modal_wrapper:before{display:inline-block;vertical-align:middle;width:0;height:100%;content:\"\"}.modal_backdrop{background:rgba(42, 49, 52, 0.5);background:rgba(var(--pv-color-dark-rgb), 0.5);z-index:-1;position:fixed;top:0;right:0;bottom:0;left:0}.modal_container{position:relative;display:inline-block;vertical-align:middle;width:100%;max-width:900px;text-align:left;border-radius:3px;overflow:hidden;background-color:white;background-color:rgba(var(--pv-color-light-rgb), 1);height:100%}.modal_title{background-color:rgba(53, 132, 247, 0.07);background-color:rgba(var(--pv-color-primary-rgb), 0.07);border-color:#d1d5d9;border-color:rgba(var(--pv-color-grey_3-rgb), 1);border-bottom-width:1px;border-bottom-style:solid;padding:20px 60px 16px 20px;position:relative;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;height:60px}.modal_content{height:calc(100% - 60px);overflow-y:auto}.modal_close{cursor:pointer;border:none;background-color:transparent;position:absolute;top:0;bottom:0;right:0;padding:0 12px;-webkit-transition:opacity 100ms;transition:opacity 100ms;outline:none}.modal_close:hover{opacity:0.6}.modal_close svg{fill:#2a3134;fill:rgba(var(--pv-color-dark-rgb), 1)}.button_table_action{margin:2px}.mobile_title{display:none}.status_wrapper{height:85px;text-align:center;pointer-events:none}.search_section{background-color:rgba(53, 132, 247, 0.07);background-color:rgba(var(--pv-color-primary-rgb), 0.07);border-color:#d1d5d9;border-color:rgba(var(--pv-color-grey_3-rgb), 1);height:50px;padding:10px;border-width:1px 1px 0 1px;border-style:solid}.input_search{height:100%;width:100%;border-radius:3px;border-width:1px;border-style:solid;padding:0 14px;font-size:12px;outline:none;border-color:#d1d5d9;border-color:rgba(var(--pv-color-grey_3-rgb), 1);color:#2a3134;color:rgba(var(--pv-color-dark-rgb), 1)}.input_search::-webkit-input-placeholder{color:#d1d5d9;color:rgba(var(--pv-color-grey_3-rgb), 1)}.input_search::-moz-placeholder{color:#d1d5d9;color:rgba(var(--pv-color-grey_3-rgb), 1)}.input_search:-ms-input-placeholder{color:#d1d5d9;color:rgba(var(--pv-color-grey_3-rgb), 1)}.input_search::-ms-input-placeholder{color:#d1d5d9;color:rgba(var(--pv-color-grey_3-rgb), 1)}.input_search::placeholder{color:#d1d5d9;color:rgba(var(--pv-color-grey_3-rgb), 1)}.loading_container{position:absolute;top:0;left:0;width:100%;height:100%;background:rgba(42, 49, 52, 0.3);background:rgba(var(--pv-color-dark-rgb), 0.3);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.align_center{text-align:center}@media (hover: hover){table tbody tr:not(.expanded_summary):hover{background-color:rgba(53, 132, 247, 0.04);background-color:rgba(var(--pv-color-primary-rgb), 0.04)}}@media (max-width: 900px){table,tbody,tr,td{display:block}thead{display:none}tr{padding:0 15px;border-width:1px;border-style:solid}tr:not(:first-child){margin-top:-1px}tr:not(.expanded_summary) td:first-child{border:none !important}table td{padding-left:0;padding-right:0;border-width:1px 0 0 0 !important;border-color:rgba(209, 213, 217, 0.5);border-color:rgba(var(--pv-color-grey_3-rgb), 0.5)}table tr.expanded_summary td{padding:15px 0}.mobile_title{display:inline-block;width:90px;vertical-align:middle}.modal_title{padding:17px 60px 17px 15px}.content{display:inline-block;width:calc(100% - 90px);vertical-align:middle;text-align:left}.expanded_summary{border-top-color:transparent;padding-bottom:10px}.expanded_summary td:before{content:none}.status_wrapper{height:266px;display:table-cell}.search_section{height:60px;padding:15px}.align_center{text-align:inherit}}";
10
15
 
11
16
  const CertificatesViewer = class {
12
- constructor(hostRef) {
13
- index.registerInstance(this, hostRef);
14
- this.detailsOpen = index.createEvent(this, "detailsOpen", 7);
15
- this.detailsClose = index.createEvent(this, "detailsClose", 7);
16
- /**
17
- * List of certificates values for decode and show in the list.
18
- * <br />
19
- * **NOTE**: If you do not provide a `name` value when
20
- * invocing the component it will take the first Subject CN value.
21
- * <br />
22
- * **NOTE**: If you do not provide a `tests` this column will be ommited from the rendered page.
23
- * <br />
24
- * **NOTE**: If the supplied certificates are self-signed the issuer column will be ommited.
25
- */
26
- this.certificates = [];
27
- /**
28
- * Use filter in the list when search is changed.
29
- */
30
- this.filterWithSearch = true;
31
- /**
32
- * Use highlight chapters in the list when search is changed.
33
- */
34
- this.highlightWithSearch = true;
35
- this.search = '';
36
- this.certificatesDecoded = [];
37
- this.isDecodeInProcess = true;
38
- this.isHasTests = false;
39
- this.isHasRoots = false;
40
- this.handleClickDetails = (certificate, e) => {
41
- e.stopPropagation();
42
- this.certificateSelectedForDetails = certificate;
43
- this.detailsOpen.emit(certificate);
44
- };
45
- this.handleModalClose = () => {
46
- this.certificateSelectedForDetails = undefined;
47
- this.detailsClose.emit();
48
- };
49
- this.handleSearch = (e) => {
50
- this.search = e.target.value.trim();
51
- };
52
- }
53
- componentWillLoad() {
54
- this.certificatesDecodeAndSet();
55
- }
56
- watchCertificates(newValue, oldValue) {
57
- /**
58
- * Prevent rerender after set the same `certificates` prop.
59
- */
60
- if (JSON.stringify(newValue) !== JSON.stringify(oldValue)) {
61
- this.certificatesDecodeAndSet();
62
- }
63
- }
64
- async certificatesDecodeAndSet() {
65
- let hasTests = false;
66
- let hasRoots = false;
67
- if (!Array.isArray(this.certificates)) {
68
- return;
69
- }
70
- const data = [];
71
- // eslint-disable-next-line no-restricted-syntax
72
- for (const certificate of this.certificates) {
73
- try {
74
- const decoded = new download.X509Certificate(certificate.value);
75
- await decoded.getThumbprint('SHA-1');
76
- data.push({
77
- body: decoded,
78
- tests: certificate.tests,
79
- name: certificate.name,
80
- });
81
- if (!hasRoots && decoded.isRoot) {
82
- hasRoots = true;
83
- }
84
- if (!hasTests) {
85
- if (certificate.tests
86
- && (certificate.tests.expired || certificate.tests.revoked || certificate.tests.valid)) {
87
- hasTests = true;
88
- }
89
- }
90
- }
91
- catch (error) {
92
- console.error('Error certificate parse:', error);
93
- }
94
- }
95
- this.isHasTests = hasTests;
96
- this.isHasRoots = hasRoots;
97
- this.isDecodeInProcess = false;
98
- this.certificatesDecoded = data;
99
- }
100
- // eslint-disable-next-line class-methods-use-this
101
- handleClickDownloadAsPem(certificate, e) {
102
- e.stopPropagation();
103
- download.Download.certificate.asPEM(certificate.body.exportAsPemFormatted(), certificate.name || certificate.body.commonName);
104
- }
105
- // eslint-disable-next-line class-methods-use-this
106
- handleClickDownloadAsDer(certificate, e) {
107
- e.stopPropagation();
108
- download.Download.certificate.asPEM(certificate.body.exportAsHexFormatted(), certificate.name || certificate.body.commonName);
109
- }
110
- handleClickRow(index) {
111
- const isExpandedRowClicked = this.expandedRow === index;
112
- this.expandedRow = isExpandedRowClicked
113
- ? undefined
114
- : index;
115
- }
116
- getMaxColSpanValue() {
117
- let colSpan = 4;
118
- if (this.isHasTests) {
119
- colSpan += 1;
120
- }
121
- if (!this.isHasRoots) {
122
- colSpan += 1;
123
- }
124
- return colSpan;
125
- }
126
- renderExpandedRow(certificate) {
127
- const colSpan = this.getMaxColSpanValue();
128
- return (index.h("tr", { class: "expanded_summary" }, index.h("td", { colSpan: colSpan }, index.h("peculiar-certificate-summary", { certificate: certificate, showIssuer: !certificate.isRoot }))));
129
- }
130
- // eslint-disable-next-line class-methods-use-this
131
- renderCertificateTests(tests) {
132
- if (!tests) {
133
- return null;
134
- }
135
- const elems = [];
136
- if (tests.valid) {
137
- elems.push((index.h("peculiar-button", { class: "button_table_action", href: tests.valid, target: "_blank" }, l10n.l10n.getString('valid'))));
138
- }
139
- if (tests.revoked) {
140
- elems.push((index.h("peculiar-button", { class: "button_table_action", href: tests.revoked, target: "_blank" }, l10n.l10n.getString('revoked'))));
141
- }
142
- if (tests.expired) {
143
- elems.push((index.h("peculiar-button", { class: "button_table_action", href: tests.expired, target: "_blank" }, l10n.l10n.getString('expired'))));
144
- }
145
- return elems;
146
- }
147
- renderContentState() {
148
- const searchHighlight = this.highlightWithSearch
149
- ? this.search
150
- : '';
151
- const content = [];
152
- this.certificatesDecoded.forEach((certificate, index$1) => {
153
- const isExpandedRow = index$1 === this.expandedRow;
154
- const publicKeyValue = download.OIDs[certificate.body.signature.algorithm]
155
- || certificate.body.signature.algorithm;
156
- if (this.filterWithSearch && this.search) {
157
- const certificateStringForSearch = [
158
- publicKeyValue,
159
- certificate.body.issuerCommonName,
160
- certificate.name,
161
- certificate.body.commonName,
162
- certificate.body.thumbprints['SHA-1'],
163
- ]
164
- .join(' ')
165
- .toLowerCase();
166
- if (certificateStringForSearch.indexOf(this.search.toLowerCase()) === -1) {
167
- return;
168
- }
169
- }
170
- content.push([
171
- index.h("tr", { class: {
172
- expanded: isExpandedRow,
173
- }, onClick: this.handleClickRow.bind(this, index$1),
174
- // eslint-disable-next-line react/no-array-index-key
175
- key: index$1 }, !this.isHasRoots && (index.h("td", null, index.h("peculiar-typography", { class: "mobile_title", color: "grey_5" }, l10n.l10n.getString('issuer'), ":"), index.h("peculiar-typography", { class: "content" }, index.h("peculiar-highlight-words", { search: searchHighlight }, certificate.body.issuerCommonName)))), index.h("td", null, index.h("peculiar-typography", { class: "mobile_title", color: "grey_5" }, l10n.l10n.getString('name'), ":"), index.h("peculiar-typography", { class: "content" }, index.h("peculiar-highlight-words", { search: searchHighlight }, certificate.name || certificate.body.commonName))), index.h("td", null, index.h("peculiar-typography", { class: "mobile_title", color: "grey_5" }, l10n.l10n.getString('publicKey'), ":"), index.h("peculiar-typography", { class: "content" }, index.h("peculiar-highlight-words", { search: searchHighlight }, publicKeyValue))), index.h("td", null, index.h("peculiar-typography", { class: "mobile_title", color: "grey_5" }, l10n.l10n.getString('fingerprint'), "\u00A0 (SHA-1):"), index.h("peculiar-typography", { class: "content", monospace: true }, index.h("peculiar-highlight-words", { search: searchHighlight }, certificate.body.thumbprints['SHA-1']))), index.h("td", { class: "align_center" }, index.h("peculiar-typography", { class: "mobile_title", color: "grey_5" }, l10n.l10n.getString('actions'), ":"), index.h("span", { class: "content" }, index.h("peculiar-button", { onClick: this.handleClickDetails.bind(this, certificate.body), class: "button_table_action" }, l10n.l10n.getString('details')), index.h("peculiar-button-split", { onClick: this.handleClickDownloadAsPem.bind(this, certificate), actions: [{
176
- text: l10n.l10n.getString('download.der'),
177
- onClick: this.handleClickDownloadAsDer.bind(this, certificate),
178
- }], class: "button_table_action" }, l10n.l10n.getString('download.pem')))), this.isHasTests && (index.h("td", { class: "align_center" }, index.h("peculiar-typography", { class: "mobile_title", color: "grey_5" }, l10n.l10n.getString('testURLs'), ":"), index.h("span", { class: "content" }, this.renderCertificateTests(certificate.tests))))),
179
- isExpandedRow && this.renderExpandedRow(certificate.body),
180
- ]);
17
+ constructor(hostRef) {
18
+ index.registerInstance(this, hostRef);
19
+ this.detailsOpen = index.createEvent(this, "detailsOpen", 7);
20
+ this.detailsClose = index.createEvent(this, "detailsClose", 7);
21
+ /**
22
+ * List of certificates values for decode and show in the list.
23
+ * <br />
24
+ * **NOTE**: If you do not provide a `name` value when
25
+ * invocing the component it will take the first Subject CN value.
26
+ * <br />
27
+ * **NOTE**: If you do not provide a `tests` this column will be ommited from the rendered page.
28
+ * <br />
29
+ * **NOTE**: If the supplied certificates are self-signed the issuer column will be ommited.
30
+ */
31
+ this.certificates = [];
32
+ /**
33
+ * Use filter in the list when search is changed.
34
+ */
35
+ this.filterWithSearch = true;
36
+ /**
37
+ * Use highlight chapters in the list when search is changed.
38
+ */
39
+ this.highlightWithSearch = true;
40
+ this.search = '';
41
+ this.certificatesDecoded = [];
42
+ this.isDecodeInProcess = true;
43
+ this.isHasTests = false;
44
+ this.isHasRoots = false;
45
+ this.handleClickDetails = (certificate, e) => {
46
+ e.stopPropagation();
47
+ this.certificateSelectedForDetails = certificate;
48
+ this.detailsOpen.emit(certificate);
49
+ };
50
+ this.handleModalClose = () => {
51
+ this.certificateSelectedForDetails = undefined;
52
+ this.detailsClose.emit();
53
+ };
54
+ this.handleSearch = (e) => {
55
+ this.search = e.target.value.trim();
56
+ };
57
+ }
58
+ componentWillLoad() {
59
+ this.certificatesDecodeAndSet();
60
+ }
61
+ watchCertificates(newValue, oldValue) {
62
+ /**
63
+ * Prevent rerender after set the same `certificates` prop.
64
+ */
65
+ if (JSON.stringify(newValue) !== JSON.stringify(oldValue)) {
66
+ this.certificatesDecodeAndSet();
67
+ }
68
+ }
69
+ async certificatesDecodeAndSet() {
70
+ let hasTests = false;
71
+ let hasRoots = false;
72
+ if (!Array.isArray(this.certificates)) {
73
+ return;
74
+ }
75
+ const data = [];
76
+ // eslint-disable-next-line no-restricted-syntax
77
+ for (const certificate of this.certificates) {
78
+ try {
79
+ const decoded = new certification_request.X509Certificate(certificate.value);
80
+ await decoded.getThumbprint('SHA-1');
81
+ data.push({
82
+ body: decoded,
83
+ tests: certificate.tests,
84
+ name: certificate.name,
181
85
  });
182
- return content;
183
- }
184
- renderCertificateDetailsModal() {
185
- if (!this.certificateSelectedForDetails) {
186
- return null;
187
- }
188
- return (index.h("div", { class: "modal_wrapper", role: "presentation", "aria-hidden": "false", part: "presentation" }, index.h("div", { class: "modal_backdrop", onClick: this.handleModalClose, "aria-hidden": "true" }), index.h("div", { class: "modal_container", role: "dialog", part: "presentation_container" }, index.h("header", { class: "modal_title" }, index.h("peculiar-typography", { type: "h4" }, l10n.l10n.getString('certificateDetails')), index.h("button", { class: "modal_close", onClick: this.handleModalClose, type: "button", "aria-label": "Close", title: "Close" }, index.h("svg", { width: "30", height: "30", viewBox: "0 0 30 30", xmlns: "http://www.w3.org/2000/svg" }, index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M15.7204 14.375L21.0654 19.7185C21.3115 19.9658 21.3115 20.3693 21.0654 20.6154L20.615 21.0645C20.3689 21.3118 19.9667 21.3118 19.7181 21.0645L14.3744 15.721L9.03194 21.0645C8.78327 21.3118 8.3811 21.3118 8.13371 21.0645L7.68459 20.6154C7.43847 20.3693 7.43847 19.9658 7.68459 19.7185L13.0296 14.375L7.68459 9.03155C7.43847 8.78417 7.43847 8.38074 7.68459 8.13463L8.13371 7.68554C8.3811 7.43815 8.78327 7.43815 9.03194 7.68554L14.3744 13.029L19.7181 7.68554C19.9667 7.43815 20.3689 7.43815 20.615 7.68554L21.0654 8.13463C21.3115 8.38074 21.3115 8.78417 21.0654 9.03155L15.7204 14.375Z" })))), index.h("div", { class: "modal_content" }, index.h("peculiar-certificate-viewer", { certificate: this.certificateSelectedForDetails })))));
189
- }
190
- renderSearch() {
191
- if (!this.filterWithSearch && !this.highlightWithSearch) {
192
- return null;
86
+ if (!hasRoots && decoded.isRoot) {
87
+ hasRoots = true;
193
88
  }
194
- return (index.h("div", { class: "search_section" }, index.h("input", { onInput: this.handleSearch, type: "search", value: "", class: "input_search", disabled: !this.certificatesDecoded.length, placeholder: "Search" })));
195
- }
196
- renderEmptyState() {
197
- const colSpan = this.getMaxColSpanValue();
198
- return (index.h("tr", null, index.h("td", { class: "status_wrapper", colSpan: colSpan }, index.h("peculiar-typography", { type: "b1", align: "center" }, "There are no certificates available."))));
199
- }
200
- renderEmptySearchState() {
201
- const colSpan = this.getMaxColSpanValue();
202
- return (index.h("tr", null, index.h("td", { class: "status_wrapper", colSpan: colSpan }, index.h("peculiar-typography", { type: "b1", align: "center" }, "No results found for \u201C", this.search, "\u201C"))));
203
- }
204
- // eslint-disable-next-line class-methods-use-this
205
- renderLoadingState() {
206
- return (index.h("div", { class: "loading_container" }, index.h("peculiar-circular-progress", null)));
207
- }
208
- renderBody() {
209
- if (this.isDecodeInProcess) {
210
- return null;
89
+ if (!hasTests) {
90
+ if (certificate.tests
91
+ && (certificate.tests.expired || certificate.tests.revoked || certificate.tests.valid)) {
92
+ hasTests = true;
93
+ }
211
94
  }
212
- if (!this.certificatesDecoded.length) {
213
- return this.renderEmptyState();
95
+ }
96
+ catch (error) {
97
+ console.error('Error certificate parse:', error);
98
+ }
99
+ }
100
+ this.isHasTests = hasTests;
101
+ this.isHasRoots = hasRoots;
102
+ this.isDecodeInProcess = false;
103
+ this.certificatesDecoded = data;
104
+ }
105
+ // eslint-disable-next-line class-methods-use-this
106
+ handleClickDownloadAsPem(certificate, e) {
107
+ e.stopPropagation();
108
+ download.Download.x509.asPEM(certificate.body.exportAsPemFormatted(), certificate.name || certificate.body.commonName);
109
+ }
110
+ // eslint-disable-next-line class-methods-use-this
111
+ handleClickDownloadAsDer(certificate, e) {
112
+ e.stopPropagation();
113
+ download.Download.x509.asPEM(certificate.body.exportAsHexFormatted(), certificate.name || certificate.body.commonName);
114
+ }
115
+ handleClickRow(index) {
116
+ const isExpandedRowClicked = this.expandedRow === index;
117
+ this.expandedRow = isExpandedRowClicked
118
+ ? undefined
119
+ : index;
120
+ }
121
+ getMaxColSpanValue() {
122
+ let colSpan = 4;
123
+ if (this.isHasTests) {
124
+ colSpan += 1;
125
+ }
126
+ if (!this.isHasRoots) {
127
+ colSpan += 1;
128
+ }
129
+ return colSpan;
130
+ }
131
+ renderExpandedRow(certificate) {
132
+ const colSpan = this.getMaxColSpanValue();
133
+ return (index.h("tr", { class: "expanded_summary" }, index.h("td", { colSpan: colSpan }, index.h("peculiar-certificate-summary", { certificate: certificate, showIssuer: !certificate.isRoot }))));
134
+ }
135
+ // eslint-disable-next-line class-methods-use-this
136
+ renderCertificateTests(tests) {
137
+ if (!tests) {
138
+ return null;
139
+ }
140
+ const elems = [];
141
+ if (tests.valid) {
142
+ elems.push((index.h("peculiar-button", { class: "button_table_action", href: tests.valid, target: "_blank" }, l10n.l10n.getString('valid'))));
143
+ }
144
+ if (tests.revoked) {
145
+ elems.push((index.h("peculiar-button", { class: "button_table_action", href: tests.revoked, target: "_blank" }, l10n.l10n.getString('revoked'))));
146
+ }
147
+ if (tests.expired) {
148
+ elems.push((index.h("peculiar-button", { class: "button_table_action", href: tests.expired, target: "_blank" }, l10n.l10n.getString('expired'))));
149
+ }
150
+ return elems;
151
+ }
152
+ renderContentState() {
153
+ const searchHighlight = this.highlightWithSearch
154
+ ? this.search
155
+ : '';
156
+ const content = [];
157
+ this.certificatesDecoded.forEach((certificate, index$1) => {
158
+ const isExpandedRow = index$1 === this.expandedRow;
159
+ const publicKeyValue = certification_request.OIDs[certificate.body.signature.algorithm]
160
+ || certificate.body.signature.algorithm;
161
+ if (this.filterWithSearch && this.search) {
162
+ const certificateStringForSearch = [
163
+ publicKeyValue,
164
+ certificate.body.issuerCommonName,
165
+ certificate.name,
166
+ certificate.body.commonName,
167
+ certificate.body.thumbprints['SHA-1'],
168
+ ]
169
+ .join(' ')
170
+ .toLowerCase();
171
+ if (certificateStringForSearch.indexOf(this.search.toLowerCase()) === -1) {
172
+ return;
214
173
  }
215
- const contentState = this.renderContentState();
216
- if (this.search && !contentState.length) {
217
- return this.renderEmptySearchState();
218
- }
219
- return contentState;
220
- }
221
- render() {
222
- return (index.h(index.Host, null, this.renderSearch(), index.h("table", { class: {
223
- m_extra: this.isHasTests || !this.isHasRoots,
224
- } }, index.h("thead", null, index.h("tr", null, !this.isHasRoots && (index.h("th", { class: "col_issuer" }, index.h("peculiar-typography", { type: "h7", align: "left" }, l10n.l10n.getString('issuer')))), index.h("th", { class: "col_name" }, index.h("peculiar-typography", { type: "h7", align: "left" }, l10n.l10n.getString('name'))), index.h("th", { class: "col_public_key" }, index.h("peculiar-typography", { type: "h7", align: "left" }, l10n.l10n.getString('publicKey'))), index.h("th", { class: "col_fingerprint" }, index.h("peculiar-typography", { type: "h7", align: "left" }, l10n.l10n.getString('fingerprint'), "\u00A0 (SHA-1)")), index.h("th", { class: "col_actions" }, index.h("peculiar-typography", { type: "h7", align: "center" }, l10n.l10n.getString('actions'))), this.isHasTests && (index.h("th", { class: "col_tests" }, index.h("peculiar-typography", { type: "h7", align: "center" }, l10n.l10n.getString('testURLs')))))), index.h("tbody", null, this.renderBody())), this.renderCertificateDetailsModal(), this.isDecodeInProcess && this.renderLoadingState()));
225
- }
226
- static get watchers() { return {
227
- "certificates": ["watchCertificates"]
228
- }; }
174
+ }
175
+ content.push([
176
+ index.h("tr", { class: {
177
+ expanded: isExpandedRow,
178
+ }, onClick: this.handleClickRow.bind(this, index$1),
179
+ // eslint-disable-next-line react/no-array-index-key
180
+ key: index$1 }, !this.isHasRoots && (index.h("td", null, index.h("peculiar-typography", { class: "mobile_title", color: "grey_5" }, l10n.l10n.getString('issuer'), ":"), index.h("peculiar-typography", { class: "content" }, index.h("peculiar-highlight-words", { search: searchHighlight }, certificate.body.issuerCommonName)))), index.h("td", null, index.h("peculiar-typography", { class: "mobile_title", color: "grey_5" }, l10n.l10n.getString('name'), ":"), index.h("peculiar-typography", { class: "content" }, index.h("peculiar-highlight-words", { search: searchHighlight }, certificate.name || certificate.body.commonName))), index.h("td", null, index.h("peculiar-typography", { class: "mobile_title", color: "grey_5" }, l10n.l10n.getString('publicKey'), ":"), index.h("peculiar-typography", { class: "content" }, index.h("peculiar-highlight-words", { search: searchHighlight }, publicKeyValue))), index.h("td", null, index.h("peculiar-typography", { class: "mobile_title", color: "grey_5" }, l10n.l10n.getString('fingerprint'), "\u00A0 (SHA-1):"), index.h("peculiar-typography", { class: "content", monospace: true }, index.h("peculiar-highlight-words", { search: searchHighlight }, certificate.body.thumbprints['SHA-1']))), index.h("td", { class: "align_center" }, index.h("peculiar-typography", { class: "mobile_title", color: "grey_5" }, l10n.l10n.getString('actions'), ":"), index.h("span", { class: "content" }, index.h("peculiar-button", { onClick: this.handleClickDetails.bind(this, certificate.body), class: "button_table_action" }, l10n.l10n.getString('details')), index.h("peculiar-button-split", { onClick: this.handleClickDownloadAsPem.bind(this, certificate), actions: [{
181
+ text: l10n.l10n.getString('download.der'),
182
+ onClick: this.handleClickDownloadAsDer.bind(this, certificate),
183
+ }], class: "button_table_action" }, l10n.l10n.getString('download.pem')))), this.isHasTests && (index.h("td", { class: "align_center" }, index.h("peculiar-typography", { class: "mobile_title", color: "grey_5" }, l10n.l10n.getString('testURLs'), ":"), index.h("span", { class: "content" }, this.renderCertificateTests(certificate.tests))))),
184
+ isExpandedRow && this.renderExpandedRow(certificate.body),
185
+ ]);
186
+ });
187
+ return content;
188
+ }
189
+ renderCertificateDetailsModal() {
190
+ if (!this.certificateSelectedForDetails) {
191
+ return null;
192
+ }
193
+ return (index.h("div", { class: "modal_wrapper", role: "presentation", "aria-hidden": "false", part: "presentation" }, index.h("div", { class: "modal_backdrop", onClick: this.handleModalClose, "aria-hidden": "true" }), index.h("div", { class: "modal_container", role: "dialog", part: "presentation_container" }, index.h("header", { class: "modal_title" }, index.h("peculiar-typography", { type: "h4" }, l10n.l10n.getString('certificateDetails')), index.h("button", { class: "modal_close", onClick: this.handleModalClose, type: "button", "aria-label": "Close", title: "Close" }, index.h("svg", { width: "30", height: "30", viewBox: "0 0 30 30", xmlns: "http://www.w3.org/2000/svg" }, index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M15.7204 14.375L21.0654 19.7185C21.3115 19.9658 21.3115 20.3693 21.0654 20.6154L20.615 21.0645C20.3689 21.3118 19.9667 21.3118 19.7181 21.0645L14.3744 15.721L9.03194 21.0645C8.78327 21.3118 8.3811 21.3118 8.13371 21.0645L7.68459 20.6154C7.43847 20.3693 7.43847 19.9658 7.68459 19.7185L13.0296 14.375L7.68459 9.03155C7.43847 8.78417 7.43847 8.38074 7.68459 8.13463L8.13371 7.68554C8.3811 7.43815 8.78327 7.43815 9.03194 7.68554L14.3744 13.029L19.7181 7.68554C19.9667 7.43815 20.3689 7.43815 20.615 7.68554L21.0654 8.13463C21.3115 8.38074 21.3115 8.78417 21.0654 9.03155L15.7204 14.375Z" })))), index.h("div", { class: "modal_content" }, index.h("peculiar-certificate-viewer", { certificate: this.certificateSelectedForDetails })))));
194
+ }
195
+ renderSearch() {
196
+ if (!this.filterWithSearch && !this.highlightWithSearch) {
197
+ return null;
198
+ }
199
+ return (index.h("div", { class: "search_section" }, index.h("input", { onInput: this.handleSearch, type: "search", value: "", class: "input_search", disabled: !this.certificatesDecoded.length, placeholder: "Search" })));
200
+ }
201
+ renderEmptyState() {
202
+ const colSpan = this.getMaxColSpanValue();
203
+ return (index.h("tr", null, index.h("td", { class: "status_wrapper", colSpan: colSpan }, index.h("peculiar-typography", { type: "b1", align: "center" }, "There are no certificates available."))));
204
+ }
205
+ renderEmptySearchState() {
206
+ const colSpan = this.getMaxColSpanValue();
207
+ return (index.h("tr", null, index.h("td", { class: "status_wrapper", colSpan: colSpan }, index.h("peculiar-typography", { type: "b1", align: "center" }, "No results found for \u201C", this.search, "\u201C"))));
208
+ }
209
+ // eslint-disable-next-line class-methods-use-this
210
+ renderLoadingState() {
211
+ return (index.h("div", { class: "loading_container" }, index.h("peculiar-circular-progress", null)));
212
+ }
213
+ renderBody() {
214
+ if (this.isDecodeInProcess) {
215
+ return null;
216
+ }
217
+ if (!this.certificatesDecoded.length) {
218
+ return this.renderEmptyState();
219
+ }
220
+ const contentState = this.renderContentState();
221
+ if (this.search && !contentState.length) {
222
+ return this.renderEmptySearchState();
223
+ }
224
+ return contentState;
225
+ }
226
+ render() {
227
+ return (index.h(index.Host, null, this.renderSearch(), index.h("table", { class: {
228
+ m_extra: this.isHasTests || !this.isHasRoots,
229
+ } }, index.h("thead", null, index.h("tr", null, !this.isHasRoots && (index.h("th", { class: "col_issuer" }, index.h("peculiar-typography", { type: "h7", align: "left" }, l10n.l10n.getString('issuer')))), index.h("th", { class: "col_name" }, index.h("peculiar-typography", { type: "h7", align: "left" }, l10n.l10n.getString('name'))), index.h("th", { class: "col_public_key" }, index.h("peculiar-typography", { type: "h7", align: "left" }, l10n.l10n.getString('publicKey'))), index.h("th", { class: "col_fingerprint" }, index.h("peculiar-typography", { type: "h7", align: "left" }, l10n.l10n.getString('fingerprint'), "\u00A0 (SHA-1)")), index.h("th", { class: "col_actions" }, index.h("peculiar-typography", { type: "h7", align: "center" }, l10n.l10n.getString('actions'))), this.isHasTests && (index.h("th", { class: "col_tests" }, index.h("peculiar-typography", { type: "h7", align: "center" }, l10n.l10n.getString('testURLs')))))), index.h("tbody", null, this.renderBody())), this.renderCertificateDetailsModal(), this.isDecodeInProcess && this.renderLoadingState()));
230
+ }
231
+ static get watchers() { return {
232
+ "certificates": ["watchCertificates"]
233
+ }; }
229
234
  };
230
235
  CertificatesViewer.style = certificatesViewerCss;
231
236
 
@@ -1,8 +1,75 @@
1
+ /*!
2
+ * © Peculiar Ventures https://peculiarventures.com/ - MIT License
3
+ */
1
4
  'use strict';
2
5
 
3
- const index = require('./index-2973f90a.js');
4
- const patch = require('./patch-15ea31af.js');
6
+ const index = require('./index-064e95c7.js');
5
7
 
6
- patch.patchBrowser().then(options => {
8
+ /*
9
+ Stencil Client Patch Browser v2.17.0 | MIT Licensed | https://stenciljs.com
10
+ */
11
+ const getDynamicImportFunction = (namespace) => `__sc_import_${namespace.replace(/\s|-/g, '_')}`;
12
+ 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
+ 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'] || {} ;
19
+ if (importMeta !== '') {
20
+ opts.resourcesUrl = new URL('.', importMeta).href;
21
+ }
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
+ return index.promiseResolve(opts);
34
+ };
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
+
73
+ patchBrowser().then(options => {
7
74
  return index.bootstrapLazy([["peculiar-attribute-certificate-viewer_9.cjs",[[1,"peculiar-certificate-decoder",{"certificateExample":[1,"certificate-example"],"certificateDecoded":[32]}],[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-csr-viewer",{"certificate":[513],"download":[4],"subjectKeyIdChildrenLink":[513,"subject-key-id-children-link"],"subjectKeyIdSiblingsLink":[513,"subject-key-id-siblings-link"],"view":[513],"isDecodeInProcess":[32]}],[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]}],[1,"peculiar-button-split",{"onClick":[16],"fill":[1],"actions":[16],"open":[32]}],[1,"peculiar-text-hider",{"opened":[1540]},[[0,"textExpand","textExpandHandler"]]],[1,"peculiar-link",{"href":[513],"type":[513]}],[1,"peculiar-typography",{"type":[513],"color":[1],"align":[1],"ellipsis":[4],"monospace":[4]}],[1,"peculiar-button",{"fill":[1],"disabled":[516],"href":[1],"target":[1],"onClick":[16]}]]],["peculiar-certificate-summary_3.cjs",[[1,"peculiar-certificate-summary",{"certificate":[16],"showIssuer":[4,"show-issuer"]}],[1,"peculiar-circular-progress",{"size":[2],"width":[2]}],[1,"peculiar-highlight-words",{"search":[1]}]]],["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]}]]]], options);
8
75
  });
@@ -16,8 +16,8 @@
16
16
  ],
17
17
  "compiler": {
18
18
  "name": "@stencil/core",
19
- "version": "1.17.4",
20
- "typescriptVersion": "3.9.7"
19
+ "version": "2.17.0",
20
+ "typescriptVersion": "4.5.4"
21
21
  },
22
22
  "collections": [],
23
23
  "bundles": []