@peculiar/certificates-viewer 4.2.0 → 4.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/actions.js +3 -3
- package/components/actions.js.map +1 -1
- package/components/arrow_top.js +6 -6
- package/components/arrow_top.js.map +1 -1
- package/components/attribute-certificate-viewer.js +222 -220
- package/components/attribute-certificate-viewer.js.map +1 -1
- package/components/button-menu.js +36 -35
- package/components/button-menu.js.map +1 -1
- package/components/button.js +42 -42
- package/components/button.js.map +1 -1
- package/components/certificate-viewer.js +250 -249
- package/components/certificate-viewer.js.map +1 -1
- package/components/circular-progress.js +34 -33
- package/components/circular-progress.js.map +1 -1
- package/components/crl-viewer.js +214 -213
- package/components/crl-viewer.js.map +1 -1
- package/components/cross.js +9 -9
- package/components/cross.js.map +1 -1
- package/components/csr-viewer.js +200 -202
- package/components/csr-viewer.js.map +1 -1
- package/components/download.js +56 -56
- package/components/download.js.map +1 -1
- package/components/highlight-words.js +45 -44
- package/components/highlight-words.js.map +1 -1
- package/components/index2.js +146 -156
- package/components/index2.js.map +1 -1
- package/components/issuer_name.js +6 -6
- package/components/issuer_name.js.map +1 -1
- package/components/miscellaneous.js +3335 -3403
- package/components/miscellaneous.js.map +1 -1
- package/components/peculiar-attribute-certificate-viewer.d.ts +2 -2
- package/components/peculiar-button-menu.d.ts +2 -2
- package/components/peculiar-certificate-decoder.d.ts +2 -2
- package/components/peculiar-certificate-decoder.js +183 -182
- package/components/peculiar-certificate-decoder.js.map +1 -1
- package/components/peculiar-certificate-viewer.d.ts +2 -2
- package/components/peculiar-certificates-viewer.d.ts +2 -2
- package/components/peculiar-certificates-viewer.js +297 -296
- package/components/peculiar-certificates-viewer.js.map +1 -1
- package/components/peculiar-circular-progress.d.ts +2 -2
- package/components/peculiar-crl-viewer.d.ts +2 -2
- package/components/peculiar-csr-viewer.d.ts +2 -2
- package/components/peculiar-highlight-words.d.ts +2 -2
- package/components/peculiar-text-hider.d.ts +2 -2
- package/components/peculiar-text-hider.js +23 -22
- package/components/peculiar-text-hider.js.map +1 -1
- package/components/subject_name.js +35 -35
- package/components/subject_name.js.map +1 -1
- package/dist/cjs/actions-789906f5.js +23 -0
- package/dist/cjs/{actions-19013d4a.js.map → actions-789906f5.js.map} +1 -1
- package/dist/cjs/app-globals-c20ffa41.js +10 -0
- package/dist/cjs/app-globals-c20ffa41.js.map +1 -0
- package/dist/cjs/arrow_top-76e4261e.js +37 -0
- package/dist/cjs/{arrow_top-834fb7ec.js.map → arrow_top-76e4261e.js.map} +1 -1
- package/dist/cjs/button-87086210.js +77 -0
- package/dist/cjs/{button-14e2b73f.js.map → button-87086210.js.map} +1 -1
- package/dist/cjs/{certification_request-5672c667.js → certification_request-b0d72620.js} +2636 -2706
- package/dist/cjs/certification_request-b0d72620.js.map +1 -0
- package/dist/cjs/crl-812dd7a1.js +312 -0
- package/dist/cjs/crl-812dd7a1.js.map +1 -0
- package/dist/cjs/cross-bd099933.js +51 -0
- package/dist/cjs/{cross-9872c473.js.map → cross-bd099933.js.map} +1 -1
- package/dist/cjs/{download-0fa5b33c.js → download-6f550549.js} +50 -50
- package/dist/cjs/download-6f550549.js.map +1 -0
- package/dist/cjs/download-820d66ba.js +23 -0
- package/dist/cjs/{download-254ddc57.js.map → download-820d66ba.js.map} +1 -1
- package/dist/cjs/{index-efd561e9.js → index-e2ae280a.js} +398 -145
- package/dist/cjs/index-e2ae280a.js.map +1 -0
- package/dist/cjs/index.cjs.js +8 -8
- package/dist/cjs/link-a3d3799d.js +25 -0
- package/dist/cjs/{link-6aea0be4.js.map → link-a3d3799d.js.map} +1 -1
- package/dist/cjs/loader.cjs.js +4 -2
- package/dist/cjs/loader.cjs.js.map +1 -1
- package/dist/cjs/miscellaneous-dcb93a5b.js +1419 -0
- package/dist/cjs/miscellaneous-dcb93a5b.js.map +1 -0
- package/dist/cjs/peculiar-attribute-certificate-viewer_3.cjs.entry.js +481 -480
- package/dist/cjs/peculiar-attribute-certificate-viewer_3.cjs.entry.js.map +1 -1
- package/dist/cjs/peculiar-button-menu_3.cjs.entry.js +72 -69
- package/dist/cjs/peculiar-button-menu_3.cjs.entry.js.map +1 -1
- package/dist/cjs/peculiar-certificate-decoder.cjs.entry.js +151 -150
- package/dist/cjs/peculiar-certificate-decoder.cjs.entry.js.map +1 -1
- package/dist/cjs/peculiar-certificate-viewer.cjs.entry.js +107 -106
- package/dist/cjs/peculiar-certificate-viewer.cjs.entry.js.map +1 -1
- package/dist/cjs/peculiar-certificates-viewer.cjs.entry.js +258 -257
- package/dist/cjs/peculiar-certificates-viewer.cjs.entry.js.map +1 -1
- package/dist/cjs/peculiar-text-hider.cjs.entry.js +12 -11
- package/dist/cjs/peculiar-text-hider.cjs.entry.js.map +1 -1
- package/dist/cjs/peculiar.cjs.js +5 -3
- package/dist/cjs/peculiar.cjs.js.map +1 -1
- package/dist/cjs/x509_certificate-ebf4cbd4.js +160 -0
- package/dist/cjs/x509_certificate-ebf4cbd4.js.map +1 -0
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/attribute-certificate-viewer/attribute-certificate-viewer.js +259 -259
- package/dist/collection/components/attribute-certificate-viewer/attribute-certificate-viewer.js.map +1 -1
- package/dist/collection/components/button/button.js +9 -9
- package/dist/collection/components/button/button.js.map +1 -1
- package/dist/collection/components/button-menu/button-menu.js +60 -60
- package/dist/collection/components/button-menu/button-menu.js.map +1 -1
- package/dist/collection/components/certificate-decoder/certificate-decoder.js +211 -211
- package/dist/collection/components/certificate-decoder/certificate-decoder.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/attributes/activity_description_attribute.js +4 -3
- package/dist/collection/components/certificate-details-parts/attributes/activity_description_attribute.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/attributes/as_string_attribute.js +2 -2
- package/dist/collection/components/certificate-details-parts/attributes/as_string_attribute.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/attributes/basic_attribute.js +6 -6
- package/dist/collection/components/certificate-details-parts/attributes/basic_attribute.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/attributes/challenge_password_attribute.js +2 -2
- package/dist/collection/components/certificate-details-parts/attributes/challenge_password_attribute.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/attributes/index.js +42 -42
- package/dist/collection/components/certificate-details-parts/attributes/index.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/attributes/insurance_value_attribute.js +3 -3
- package/dist/collection/components/certificate-details-parts/attributes/insurance_value_attribute.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/attributes/name_attribute.js +2 -2
- package/dist/collection/components/certificate-details-parts/attributes/name_attribute.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/attributes/name_part.js +5 -5
- package/dist/collection/components/certificate-details-parts/attributes/name_part.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/attributes/type_relationship_attribute.js +2 -2
- package/dist/collection/components/certificate-details-parts/attributes/type_relationship_attribute.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/attributes/unstructured_name_attribute.js +2 -2
- package/dist/collection/components/certificate-details-parts/attributes/unstructured_name_attribute.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/attributes/valuation_ranking_attribute.js +14 -14
- package/dist/collection/components/certificate-details-parts/attributes/valuation_ranking_attribute.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/attributes/web_gdpr_attribute.js +4 -3
- package/dist/collection/components/certificate-details-parts/attributes/web_gdpr_attribute.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/basic_information.js +12 -12
- package/dist/collection/components/certificate-details-parts/basic_information.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/extensions/archive_rev_info_extension.js +2 -2
- package/dist/collection/components/certificate-details-parts/extensions/archive_rev_info_extension.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/extensions/as_string_extension.js +2 -2
- package/dist/collection/components/certificate-details-parts/extensions/as_string_extension.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/extensions/attribute_value.js +1 -1
- package/dist/collection/components/certificate-details-parts/extensions/attribute_value.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/extensions/authority_key_identifier_extension.js +8 -8
- package/dist/collection/components/certificate-details-parts/extensions/authority_key_identifier_extension.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/extensions/basic_constraints_extension.js +2 -2
- package/dist/collection/components/certificate-details-parts/extensions/basic_constraints_extension.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/extensions/basic_extension.js +7 -7
- package/dist/collection/components/certificate-details-parts/extensions/basic_extension.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/extensions/biometric_syntax_extension.js +5 -5
- package/dist/collection/components/certificate-details-parts/extensions/biometric_syntax_extension.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/extensions/ca_version_extension.js +3 -3
- package/dist/collection/components/certificate-details-parts/extensions/ca_version_extension.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/extensions/cabforganization_identifier_extension.js +2 -2
- package/dist/collection/components/certificate-details-parts/extensions/cabforganization_identifier_extension.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/extensions/certificate_policies_extension.js +23 -23
- package/dist/collection/components/certificate-details-parts/extensions/certificate_policies_extension.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/extensions/certificate_template_extension.js +2 -2
- package/dist/collection/components/certificate-details-parts/extensions/certificate_template_extension.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/extensions/certificate_transparency_extension.js +5 -5
- package/dist/collection/components/certificate-details-parts/extensions/certificate_transparency_extension.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/extensions/crl_distribution_points_extension.js +8 -8
- package/dist/collection/components/certificate-details-parts/extensions/crl_distribution_points_extension.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/extensions/crl_number_extension.js +2 -2
- package/dist/collection/components/certificate-details-parts/extensions/crl_number_extension.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/extensions/crl_reason_extension.js +2 -2
- package/dist/collection/components/certificate-details-parts/extensions/crl_reason_extension.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/extensions/enroll_cert_type_extension.js +2 -2
- package/dist/collection/components/certificate-details-parts/extensions/enroll_cert_type_extension.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/extensions/entrust_version_info_extension.js +2 -2
- package/dist/collection/components/certificate-details-parts/extensions/entrust_version_info_extension.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/extensions/extended_key_usage_extension.js +5 -5
- package/dist/collection/components/certificate-details-parts/extensions/extended_key_usage_extension.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/extensions/general_name_part.js +52 -52
- package/dist/collection/components/certificate-details-parts/extensions/general_name_part.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/extensions/index.js +121 -121
- package/dist/collection/components/certificate-details-parts/extensions/index.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/extensions/info_access_syntax_extension.js +5 -5
- package/dist/collection/components/certificate-details-parts/extensions/info_access_syntax_extension.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/extensions/issuing_distribution_point_extension.js +4 -4
- package/dist/collection/components/certificate-details-parts/extensions/issuing_distribution_point_extension.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/extensions/key_description_extension.js +58 -58
- package/dist/collection/components/certificate-details-parts/extensions/key_description_extension.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/extensions/key_usage_extension.js +2 -2
- package/dist/collection/components/certificate-details-parts/extensions/key_usage_extension.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/extensions/lei_extension.js +2 -2
- package/dist/collection/components/certificate-details-parts/extensions/lei_extension.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/extensions/lei_role_extennsion.js +2 -2
- package/dist/collection/components/certificate-details-parts/extensions/lei_role_extennsion.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/extensions/logotype_extension.js +42 -42
- package/dist/collection/components/certificate-details-parts/extensions/logotype_extension.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/extensions/name_constraints_extension.js +5 -5
- package/dist/collection/components/certificate-details-parts/extensions/name_constraints_extension.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/extensions/netscape_cert_type_extension.js +2 -2
- package/dist/collection/components/certificate-details-parts/extensions/netscape_cert_type_extension.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/extensions/netscape_comment_extension.js +2 -2
- package/dist/collection/components/certificate-details-parts/extensions/netscape_comment_extension.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/extensions/policy_constraints_extension.js +2 -2
- package/dist/collection/components/certificate-details-parts/extensions/policy_constraints_extension.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/extensions/policy_mappings_extension.js +6 -7
- package/dist/collection/components/certificate-details-parts/extensions/policy_mappings_extension.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/extensions/private_key_usage_period_extension.js +2 -2
- package/dist/collection/components/certificate-details-parts/extensions/private_key_usage_period_extension.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/extensions/qc_statements_extension.js +29 -29
- package/dist/collection/components/certificate-details-parts/extensions/qc_statements_extension.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/extensions/subject_alternative_name_extension.js +2 -2
- package/dist/collection/components/certificate-details-parts/extensions/subject_alternative_name_extension.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/extensions/subject_directory_attributes_extension.js +5 -5
- package/dist/collection/components/certificate-details-parts/extensions/subject_directory_attributes_extension.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/extensions/subject_key_identifier_extension.js +8 -8
- package/dist/collection/components/certificate-details-parts/extensions/subject_key_identifier_extension.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/extensions/timestamp_extension.js +2 -2
- package/dist/collection/components/certificate-details-parts/extensions/timestamp_extension.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/extensions/tn_auth_list_extension.js +6 -8
- package/dist/collection/components/certificate-details-parts/extensions/tn_auth_list_extension.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/holder.js +19 -21
- package/dist/collection/components/certificate-details-parts/holder.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/issuer.js +8 -8
- package/dist/collection/components/certificate-details-parts/issuer.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/issuer_name.js +6 -6
- package/dist/collection/components/certificate-details-parts/issuer_name.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/miscellaneous.js +6 -6
- package/dist/collection/components/certificate-details-parts/miscellaneous.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/public_key.js +29 -29
- package/dist/collection/components/certificate-details-parts/public_key.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/revoked_certificates.js +30 -30
- package/dist/collection/components/certificate-details-parts/revoked_certificates.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/row.js +26 -26
- package/dist/collection/components/certificate-details-parts/row.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/signature.js +13 -13
- package/dist/collection/components/certificate-details-parts/signature.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/subject_name.js +5 -5
- package/dist/collection/components/certificate-details-parts/subject_name.js.map +1 -1
- package/dist/collection/components/certificate-details-parts/thumbprints.js +12 -12
- package/dist/collection/components/certificate-details-parts/thumbprints.js.map +1 -1
- package/dist/collection/components/certificate-summary/certificate-summary.js +3 -3
- package/dist/collection/components/certificate-summary/certificate-summary.js.map +1 -1
- package/dist/collection/components/certificate-viewer/certificate-viewer.js +278 -278
- package/dist/collection/components/certificate-viewer/certificate-viewer.js.map +1 -1
- package/dist/collection/components/certificates-viewer/certificates-viewer.js +374 -374
- package/dist/collection/components/certificates-viewer/certificates-viewer.js.map +1 -1
- package/dist/collection/components/circular-progress/circular-progress.js +67 -67
- package/dist/collection/components/circular-progress/circular-progress.js.map +1 -1
- package/dist/collection/components/crl-viewer/crl-viewer.js +229 -229
- package/dist/collection/components/crl-viewer/crl-viewer.js.map +1 -1
- package/dist/collection/components/csr-viewer/csr-viewer.js +211 -219
- package/dist/collection/components/csr-viewer/csr-viewer.js.map +1 -1
- package/dist/collection/components/highlight-words/highlight-words.js +60 -60
- package/dist/collection/components/highlight-words/highlight-words.js.map +1 -1
- package/dist/collection/components/icons/actions.js +2 -2
- package/dist/collection/components/icons/actions.js.map +1 -1
- package/dist/collection/components/icons/arrow_bottom.js +2 -2
- package/dist/collection/components/icons/arrow_bottom.js.map +1 -1
- package/dist/collection/components/icons/arrow_top.js +2 -2
- package/dist/collection/components/icons/arrow_top.js.map +1 -1
- package/dist/collection/components/icons/cross.js +2 -2
- package/dist/collection/components/icons/cross.js.map +1 -1
- package/dist/collection/components/icons/details.js +2 -2
- package/dist/collection/components/icons/details.js.map +1 -1
- package/dist/collection/components/icons/download.js +2 -2
- package/dist/collection/components/icons/download.js.map +1 -1
- package/dist/collection/components/icons/link.js +2 -2
- package/dist/collection/components/icons/link.js.map +1 -1
- package/dist/collection/components/link/link.js +4 -4
- package/dist/collection/components/link/link.js.map +1 -1
- package/dist/collection/components/text-hider/text-hider.js +23 -23
- package/dist/collection/components/text-hider/text-hider.js.map +1 -1
- package/dist/collection/components/typography/typography.js +32 -32
- package/dist/collection/components/typography/typography.js.map +1 -1
- package/dist/collection/constants/logs.js +77 -77
- package/dist/collection/constants/logs.js.map +1 -1
- package/dist/collection/constants/oids.js +2334 -2334
- package/dist/collection/constants/oids.js.map +1 -1
- package/dist/collection/crypto/asn_data.js +31 -31
- package/dist/collection/crypto/asn_data.js.map +1 -1
- package/dist/collection/crypto/attribute.js +35 -51
- package/dist/collection/crypto/attribute.js.map +1 -1
- package/dist/collection/crypto/crl.js +66 -66
- package/dist/collection/crypto/crl.js.map +1 -1
- package/dist/collection/crypto/csr.js +76 -69
- package/dist/collection/crypto/csr.js.map +1 -1
- package/dist/collection/crypto/extension.js +63 -138
- package/dist/collection/crypto/extension.js.map +1 -1
- package/dist/collection/crypto/extensions/cabforganization_identifier.js +20 -15
- package/dist/collection/crypto/extensions/cabforganization_identifier.js.map +1 -1
- package/dist/collection/crypto/name.js +31 -31
- package/dist/collection/crypto/name.js.map +1 -1
- package/dist/collection/crypto/provider.js +26 -26
- package/dist/collection/crypto/provider.js.map +1 -1
- package/dist/collection/crypto/utils.js +23 -23
- package/dist/collection/crypto/utils.js.map +1 -1
- package/dist/collection/crypto/x509_attribute_certificate.js +66 -66
- package/dist/collection/crypto/x509_attribute_certificate.js.map +1 -1
- package/dist/collection/crypto/x509_certificate.js +139 -139
- package/dist/collection/crypto/x509_certificate.js.map +1 -1
- package/dist/collection/utils/camel_case_to_words.js +2 -2
- package/dist/collection/utils/camel_case_to_words.js.map +1 -1
- package/dist/collection/utils/date_formatter.js +6 -6
- package/dist/collection/utils/date_formatter.js.map +1 -1
- package/dist/collection/utils/download.js +24 -24
- package/dist/collection/utils/download.js.map +1 -1
- package/dist/collection/utils/download_from_buffer.js +25 -25
- package/dist/collection/utils/download_from_buffer.js.map +1 -1
- package/dist/collection/utils/get_string_by_oid.js +5 -5
- package/dist/collection/utils/get_string_by_oid.js.map +1 -1
- package/dist/collection/utils/is_link.js +1 -1
- package/dist/collection/utils/is_link.js.map +1 -1
- package/dist/collection/utils/l10n.js +25 -25
- package/dist/collection/utils/l10n.js.map +1 -1
- package/dist/collection/utils/read_file.js +40 -40
- package/dist/collection/utils/read_file.js.map +1 -1
- package/dist/collection/utils/validator.js +13 -13
- package/dist/collection/utils/validator.js.map +1 -1
- package/dist/esm/actions-aebcbc9d.js +21 -0
- package/dist/esm/{actions-8d745b2a.js.map → actions-aebcbc9d.js.map} +1 -1
- package/dist/esm/app-globals-5e9b67e0.js +8 -0
- package/dist/esm/app-globals-5e9b67e0.js.map +1 -0
- package/dist/esm/arrow_top-aee1ee02.js +34 -0
- package/dist/esm/{arrow_top-fc298828.js.map → arrow_top-aee1ee02.js.map} +1 -1
- package/dist/esm/button-a2fabf9a.js +74 -0
- package/dist/esm/{button-35146bdd.js.map → button-a2fabf9a.js.map} +1 -1
- package/dist/esm/{certification_request-d5ea5973.js → certification_request-2c054ece.js} +2637 -2707
- package/dist/esm/certification_request-2c054ece.js.map +1 -0
- package/dist/esm/crl-a7318483.js +308 -0
- package/dist/esm/crl-a7318483.js.map +1 -0
- package/dist/esm/cross-1377606f.js +47 -0
- package/dist/esm/{cross-9ec9a759.js.map → cross-1377606f.js.map} +1 -1
- package/dist/esm/download-14dc1047.js +21 -0
- package/dist/esm/{download-0cc3077a.js.map → download-14dc1047.js.map} +1 -1
- package/dist/esm/{download-aacb6eff.js → download-8c128e2e.js} +50 -50
- package/dist/esm/download-8c128e2e.js.map +1 -0
- package/dist/esm/{index-4079bbb5.js → index-ae188432.js} +398 -145
- package/dist/esm/index-ae188432.js.map +1 -0
- package/dist/esm/index.js +8 -8
- package/dist/esm/link-7e4e9060.js +23 -0
- package/dist/esm/{link-ad24c3be.js.map → link-7e4e9060.js.map} +1 -1
- package/dist/esm/loader.js +5 -3
- package/dist/esm/loader.js.map +1 -1
- package/dist/esm/miscellaneous-0e98b5bc.js +1401 -0
- package/dist/esm/miscellaneous-0e98b5bc.js.map +1 -0
- package/dist/esm/peculiar-attribute-certificate-viewer_3.entry.js +481 -480
- package/dist/esm/peculiar-attribute-certificate-viewer_3.entry.js.map +1 -1
- package/dist/esm/peculiar-button-menu_3.entry.js +72 -69
- package/dist/esm/peculiar-button-menu_3.entry.js.map +1 -1
- package/dist/esm/peculiar-certificate-decoder.entry.js +151 -150
- package/dist/esm/peculiar-certificate-decoder.entry.js.map +1 -1
- package/dist/esm/peculiar-certificate-viewer.entry.js +107 -106
- package/dist/esm/peculiar-certificate-viewer.entry.js.map +1 -1
- package/dist/esm/peculiar-certificates-viewer.entry.js +258 -257
- package/dist/esm/peculiar-certificates-viewer.entry.js.map +1 -1
- package/dist/esm/peculiar-text-hider.entry.js +12 -11
- package/dist/esm/peculiar-text-hider.entry.js.map +1 -1
- package/dist/esm/peculiar.js +6 -4
- package/dist/esm/peculiar.js.map +1 -1
- package/dist/esm/x509_certificate-ad568d3a.js +158 -0
- package/dist/esm/x509_certificate-ad568d3a.js.map +1 -0
- package/dist/esm-es5/{actions-8d745b2a.js → actions-aebcbc9d.js} +2 -2
- package/dist/esm-es5/app-globals-5e9b67e0.js +5 -0
- package/dist/esm-es5/app-globals-5e9b67e0.js.map +1 -0
- package/dist/esm-es5/{arrow_top-fc298828.js → arrow_top-aee1ee02.js} +2 -2
- package/dist/esm-es5/button-a2fabf9a.js +19 -0
- package/dist/esm-es5/{certification_request-d5ea5973.js → certification_request-2c054ece.js} +12 -12
- package/dist/esm-es5/certification_request-2c054ece.js.map +1 -0
- package/dist/esm-es5/crl-a7318483.js +33 -0
- package/dist/esm-es5/crl-a7318483.js.map +1 -0
- package/dist/esm-es5/{cross-9ec9a759.js → cross-1377606f.js} +2 -2
- package/dist/esm-es5/{download-0cc3077a.js → download-14dc1047.js} +2 -2
- package/dist/esm-es5/{download-aacb6eff.js → download-8c128e2e.js} +3 -3
- package/dist/esm-es5/{download-aacb6eff.js.map → download-8c128e2e.js.map} +1 -1
- package/dist/esm-es5/index-ae188432.js +6 -0
- package/dist/esm-es5/index-ae188432.js.map +1 -0
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/{link-ad24c3be.js → link-7e4e9060.js} +3 -3
- package/dist/esm-es5/loader.js +2 -2
- package/dist/esm-es5/loader.js.map +1 -1
- package/dist/esm-es5/{miscellaneous-cdfd8905.js → miscellaneous-0e98b5bc.js} +51 -51
- package/dist/esm-es5/miscellaneous-0e98b5bc.js.map +1 -0
- package/dist/esm-es5/peculiar-attribute-certificate-viewer_3.entry.js +17 -17
- package/dist/esm-es5/peculiar-attribute-certificate-viewer_3.entry.js.map +1 -1
- package/dist/esm-es5/peculiar-button-menu_3.entry.js +1 -1
- package/dist/esm-es5/peculiar-button-menu_3.entry.js.map +1 -1
- package/dist/esm-es5/peculiar-certificate-decoder.entry.js +3 -3
- package/dist/esm-es5/peculiar-certificate-decoder.entry.js.map +1 -1
- package/dist/esm-es5/peculiar-certificate-viewer.entry.js +2 -2
- package/dist/esm-es5/peculiar-certificate-viewer.entry.js.map +1 -1
- package/dist/esm-es5/peculiar-certificates-viewer.entry.js +3 -3
- package/dist/esm-es5/peculiar-certificates-viewer.entry.js.map +1 -1
- package/dist/esm-es5/peculiar-text-hider.entry.js +1 -1
- package/dist/esm-es5/peculiar-text-hider.entry.js.map +1 -1
- package/dist/esm-es5/peculiar.js +2 -2
- package/dist/esm-es5/peculiar.js.map +1 -1
- package/dist/esm-es5/x509_certificate-ad568d3a.js +12 -0
- package/dist/esm-es5/{x509_certificate-a9fcab55.js.map → x509_certificate-ad568d3a.js.map} +1 -1
- package/dist/peculiar/index.esm.js +1 -1
- package/dist/peculiar/{p-3b395604.system.entry.js → p-00302a20.system.entry.js} +3 -3
- package/dist/peculiar/p-00302a20.system.entry.js.map +1 -0
- package/dist/peculiar/p-0dbc8238.system.js +13 -0
- package/dist/peculiar/{p-ab7dc738.system.js.map → p-0dbc8238.system.js.map} +1 -1
- package/dist/peculiar/{p-4a6ceeda.js → p-1302bd67.js} +11 -11
- package/dist/peculiar/p-1302bd67.js.map +1 -0
- package/dist/peculiar/{p-59e5ac12.js → p-1f766dd5.js} +1 -1
- package/dist/peculiar/p-243244af.system.js +13 -0
- package/dist/peculiar/{p-0fc2e2b4.js → p-27ca6743.js} +2 -2
- package/dist/peculiar/p-3cb79cd9.js +6 -0
- package/dist/peculiar/p-3cb79cd9.js.map +1 -0
- package/dist/peculiar/{p-48474b8d.js → p-3d44cbd2.js} +3 -3
- package/dist/peculiar/p-3f9af5f5.system.js +97 -0
- package/dist/peculiar/p-3f9af5f5.system.js.map +1 -0
- package/dist/peculiar/{p-a67b8793.system.entry.js → p-496449cf.system.entry.js} +10 -10
- package/dist/peculiar/p-496449cf.system.entry.js.map +1 -0
- package/dist/peculiar/p-4bc5ddbe.js +19 -0
- package/dist/peculiar/{p-609ee9f0.entry.js → p-54b37ef9.entry.js} +2 -2
- package/dist/peculiar/p-54b37ef9.entry.js.map +1 -0
- package/dist/peculiar/p-5a662d6f.system.js +13 -0
- package/dist/peculiar/{p-a7386b78.entry.js → p-5c6f9a14.entry.js} +3 -3
- package/dist/peculiar/p-5c6f9a14.entry.js.map +1 -0
- package/dist/peculiar/p-5cf4562f.system.entry.js +111 -0
- package/dist/peculiar/p-5cf4562f.system.entry.js.map +1 -0
- package/dist/peculiar/{p-c35b180c.entry.js → p-5f3b0fc7.entry.js} +3 -3
- package/dist/peculiar/p-5f3b0fc7.entry.js.map +1 -0
- package/dist/peculiar/{p-a720c0a5.system.entry.js → p-6680f277.system.entry.js} +10 -10
- package/dist/peculiar/p-6680f277.system.entry.js.map +1 -0
- package/dist/peculiar/p-713563fb.entry.js +5 -0
- package/dist/peculiar/p-713563fb.entry.js.map +1 -0
- package/dist/peculiar/{p-67156853.js → p-75166532.js} +5 -5
- package/dist/peculiar/p-75166532.js.map +1 -0
- package/dist/peculiar/p-821bdcdc.system.js +6 -0
- package/dist/peculiar/p-821bdcdc.system.js.map +1 -0
- package/dist/peculiar/p-8393399a.system.js +5 -0
- package/dist/peculiar/p-8393399a.system.js.map +1 -0
- package/dist/peculiar/p-8bbee8f4.system.js +13 -0
- package/dist/peculiar/p-924790f5.js +33 -0
- package/dist/peculiar/p-924790f5.js.map +1 -0
- package/dist/peculiar/p-9712b827.system.js +20 -0
- package/dist/peculiar/{p-2fcad8cb.system.js.map → p-9712b827.system.js.map} +1 -1
- package/dist/peculiar/{p-370cee20.js → p-99efefea.js} +2 -2
- package/dist/peculiar/{p-1ceb0fe3.js → p-a9487007.js} +2 -2
- package/dist/peculiar/{p-17e3c47b.js → p-ae91d778.js} +2 -2
- package/dist/peculiar/p-afbd1c8e.entry.js +5 -0
- package/dist/peculiar/p-afbd1c8e.entry.js.map +1 -0
- package/dist/peculiar/p-b2890eb8.system.js +5 -0
- package/dist/peculiar/p-b5389885.system.entry.js +5 -0
- package/dist/peculiar/p-b5389885.system.entry.js.map +1 -0
- package/dist/peculiar/p-c156b495.system.js +33 -0
- package/dist/peculiar/p-c156b495.system.js.map +1 -0
- package/dist/peculiar/p-c23fd001.entry.js +110 -0
- package/dist/peculiar/p-c23fd001.entry.js.map +1 -0
- package/dist/peculiar/p-c241e4ba.system.js +20 -0
- package/dist/peculiar/{p-c99507d4.system.js.map → p-c241e4ba.system.js.map} +1 -1
- package/dist/peculiar/p-c2995a63.system.js +5 -0
- package/dist/peculiar/p-c2995a63.system.js.map +1 -0
- package/dist/peculiar/p-dac867e8.js +5 -0
- package/dist/peculiar/p-dac867e8.js.map +1 -0
- package/dist/peculiar/p-dde511c8.system.js +43 -0
- package/dist/{cjs/download-0fa5b33c.js.map → peculiar/p-dde511c8.system.js.map} +1 -1
- package/dist/peculiar/p-e4ad4f13.system.entry.js +5 -0
- package/dist/peculiar/p-e4ad4f13.system.entry.js.map +1 -0
- package/dist/peculiar/p-e6a6e602.js +12 -0
- package/dist/peculiar/p-eea904d7.system.js +27 -0
- package/dist/peculiar/{p-ddae2f8e.system.js.map → p-eea904d7.system.js.map} +1 -1
- package/dist/peculiar/p-ff3ced3c.system.js +369 -0
- package/dist/peculiar/p-ff3ced3c.system.js.map +1 -0
- package/dist/peculiar/peculiar.esm.js +1 -1
- package/dist/peculiar/peculiar.esm.js.map +1 -1
- package/dist/peculiar/peculiar.js +15 -15
- package/dist/types/components/attribute-certificate-viewer/attribute-certificate-viewer.d.ts +68 -68
- package/dist/types/components/button/button.d.ts +4 -4
- package/dist/types/components/button-menu/button-menu.d.ts +7 -7
- package/dist/types/components/certificate-decoder/certificate-decoder.d.ts +31 -31
- package/dist/types/components/certificate-details-parts/attributes/activity_description_attribute.d.ts +1 -1
- package/dist/types/components/certificate-details-parts/attributes/as_string_attribute.d.ts +1 -1
- package/dist/types/components/certificate-details-parts/attributes/basic_attribute.d.ts +1 -1
- package/dist/types/components/certificate-details-parts/attributes/challenge_password_attribute.d.ts +1 -1
- package/dist/types/components/certificate-details-parts/attributes/index.d.ts +1 -1
- package/dist/types/components/certificate-details-parts/attributes/insurance_value_attribute.d.ts +1 -1
- package/dist/types/components/certificate-details-parts/attributes/name_attribute.d.ts +1 -1
- package/dist/types/components/certificate-details-parts/attributes/name_part.d.ts +1 -1
- package/dist/types/components/certificate-details-parts/attributes/type_relationship_attribute.d.ts +1 -1
- package/dist/types/components/certificate-details-parts/attributes/unstructured_name_attribute.d.ts +1 -1
- package/dist/types/components/certificate-details-parts/attributes/valuation_ranking_attribute.d.ts +1 -1
- package/dist/types/components/certificate-details-parts/attributes/web_gdpr_attribute.d.ts +1 -1
- package/dist/types/components/certificate-details-parts/basic_information.d.ts +8 -8
- package/dist/types/components/certificate-details-parts/extensions/archive_rev_info_extension.d.ts +1 -1
- package/dist/types/components/certificate-details-parts/extensions/as_string_extension.d.ts +1 -1
- package/dist/types/components/certificate-details-parts/extensions/authority_key_identifier_extension.d.ts +1 -1
- package/dist/types/components/certificate-details-parts/extensions/basic_constraints_extension.d.ts +1 -1
- package/dist/types/components/certificate-details-parts/extensions/basic_extension.d.ts +1 -1
- package/dist/types/components/certificate-details-parts/extensions/biometric_syntax_extension.d.ts +1 -1
- package/dist/types/components/certificate-details-parts/extensions/ca_version_extension.d.ts +1 -1
- package/dist/types/components/certificate-details-parts/extensions/cabforganization_identifier_extension.d.ts +1 -1
- package/dist/types/components/certificate-details-parts/extensions/certificate_policies_extension.d.ts +1 -1
- package/dist/types/components/certificate-details-parts/extensions/certificate_template_extension.d.ts +1 -1
- package/dist/types/components/certificate-details-parts/extensions/certificate_transparency_extension.d.ts +1 -1
- package/dist/types/components/certificate-details-parts/extensions/crl_distribution_points_extension.d.ts +1 -1
- package/dist/types/components/certificate-details-parts/extensions/crl_number_extension.d.ts +1 -1
- package/dist/types/components/certificate-details-parts/extensions/crl_reason_extension.d.ts +1 -1
- package/dist/types/components/certificate-details-parts/extensions/enroll_cert_type_extension.d.ts +1 -1
- package/dist/types/components/certificate-details-parts/extensions/entrust_version_info_extension.d.ts +1 -1
- package/dist/types/components/certificate-details-parts/extensions/extended_key_usage_extension.d.ts +1 -1
- package/dist/types/components/certificate-details-parts/extensions/general_name_part.d.ts +1 -1
- package/dist/types/components/certificate-details-parts/extensions/index.d.ts +2 -2
- package/dist/types/components/certificate-details-parts/extensions/info_access_syntax_extension.d.ts +1 -1
- package/dist/types/components/certificate-details-parts/extensions/issuing_distribution_point_extension.d.ts +1 -1
- package/dist/types/components/certificate-details-parts/extensions/key_description_extension.d.ts +1 -1
- package/dist/types/components/certificate-details-parts/extensions/key_usage_extension.d.ts +1 -1
- package/dist/types/components/certificate-details-parts/extensions/lei_extension.d.ts +1 -1
- package/dist/types/components/certificate-details-parts/extensions/lei_role_extennsion.d.ts +1 -1
- package/dist/types/components/certificate-details-parts/extensions/logotype_extension.d.ts +1 -1
- package/dist/types/components/certificate-details-parts/extensions/name_constraints_extension.d.ts +1 -1
- package/dist/types/components/certificate-details-parts/extensions/netscape_cert_type_extension.d.ts +1 -1
- package/dist/types/components/certificate-details-parts/extensions/netscape_comment_extension.d.ts +1 -1
- package/dist/types/components/certificate-details-parts/extensions/policy_constraints_extension.d.ts +1 -1
- package/dist/types/components/certificate-details-parts/extensions/policy_mappings_extension.d.ts +1 -1
- package/dist/types/components/certificate-details-parts/extensions/private_key_usage_period_extension.d.ts +1 -1
- package/dist/types/components/certificate-details-parts/extensions/qc_statements_extension.d.ts +1 -1
- package/dist/types/components/certificate-details-parts/extensions/subject_alternative_name_extension.d.ts +1 -1
- package/dist/types/components/certificate-details-parts/extensions/subject_directory_attributes_extension.d.ts +1 -1
- package/dist/types/components/certificate-details-parts/extensions/subject_key_identifier_extension.d.ts +1 -1
- package/dist/types/components/certificate-details-parts/extensions/timestamp_extension.d.ts +1 -1
- package/dist/types/components/certificate-details-parts/extensions/tn_auth_list_extension.d.ts +1 -1
- package/dist/types/components/certificate-details-parts/holder.d.ts +1 -1
- package/dist/types/components/certificate-details-parts/issuer.d.ts +1 -1
- package/dist/types/components/certificate-details-parts/issuer_name.d.ts +2 -2
- package/dist/types/components/certificate-details-parts/miscellaneous.d.ts +1 -1
- package/dist/types/components/certificate-details-parts/public_key.d.ts +1 -1
- package/dist/types/components/certificate-details-parts/revoked_certificates.d.ts +1 -1
- package/dist/types/components/certificate-details-parts/row.d.ts +7 -7
- package/dist/types/components/certificate-details-parts/signature.d.ts +1 -1
- package/dist/types/components/certificate-details-parts/subject_name.d.ts +1 -1
- package/dist/types/components/certificate-details-parts/thumbprints.d.ts +1 -1
- package/dist/types/components/certificate-summary/certificate-summary.d.ts +2 -2
- package/dist/types/components/certificate-viewer/certificate-viewer.d.ts +74 -74
- package/dist/types/components/certificates-viewer/certificates-viewer.d.ts +75 -75
- package/dist/types/components/circular-progress/circular-progress.d.ts +10 -10
- package/dist/types/components/crl-viewer/crl-viewer.d.ts +56 -56
- package/dist/types/components/csr-viewer/csr-viewer.d.ts +52 -53
- package/dist/types/components/highlight-words/highlight-words.d.ts +8 -8
- package/dist/types/components/icons/actions.d.ts +1 -1
- package/dist/types/components/icons/arrow_bottom.d.ts +1 -1
- package/dist/types/components/icons/arrow_top.d.ts +1 -1
- package/dist/types/components/icons/cross.d.ts +1 -1
- package/dist/types/components/icons/details.d.ts +1 -1
- package/dist/types/components/icons/download.d.ts +1 -1
- package/dist/types/components/icons/link.d.ts +1 -1
- package/dist/types/components/link/link.d.ts +2 -2
- package/dist/types/components/text-hider/text-hider.d.ts +2 -2
- package/dist/types/components/typography/typography.d.ts +4 -4
- package/dist/types/components.d.ts +24 -0
- package/dist/types/constants/logs.d.ts +77 -77
- package/dist/types/constants/oids.d.ts +2326 -2326
- package/dist/types/crypto/asn_data.d.ts +6 -6
- package/dist/types/crypto/attribute.d.ts +21 -6
- package/dist/types/crypto/crl.d.ts +23 -23
- package/dist/types/crypto/csr.d.ts +23 -21
- package/dist/types/crypto/extension.d.ts +51 -5
- package/dist/types/crypto/extensions/cabforganization_identifier.d.ts +5 -5
- package/dist/types/crypto/name.d.ts +7 -7
- package/dist/types/crypto/provider.d.ts +15 -15
- package/dist/types/crypto/x509_attribute_certificate.d.ts +24 -24
- package/dist/types/crypto/x509_certificate.d.ts +33 -33
- package/dist/types/stencil-public-runtime.d.ts +29 -0
- package/dist/types/utils/download.d.ts +16 -16
- package/dist/types/utils/l10n.d.ts +56 -56
- package/dist/types/utils/read_file.d.ts +7 -7
- package/hydrate/index.d.ts +2 -2
- package/hydrate/index.js +11363 -9541
- package/package.json +21 -13
- package/dist/cjs/actions-19013d4a.js +0 -23
- package/dist/cjs/arrow_top-834fb7ec.js +0 -37
- package/dist/cjs/button-14e2b73f.js +0 -77
- package/dist/cjs/certification_request-5672c667.js.map +0 -1
- package/dist/cjs/crl-3f681d44.js +0 -322
- package/dist/cjs/crl-3f681d44.js.map +0 -1
- package/dist/cjs/cross-9872c473.js +0 -51
- package/dist/cjs/download-254ddc57.js +0 -23
- package/dist/cjs/index-efd561e9.js.map +0 -1
- package/dist/cjs/link-6aea0be4.js +0 -25
- package/dist/cjs/miscellaneous-905ec852.js +0 -1416
- package/dist/cjs/miscellaneous-905ec852.js.map +0 -1
- package/dist/cjs/x509_certificate-69764c52.js +0 -160
- package/dist/cjs/x509_certificate-69764c52.js.map +0 -1
- package/dist/esm/actions-8d745b2a.js +0 -21
- package/dist/esm/arrow_top-fc298828.js +0 -34
- package/dist/esm/button-35146bdd.js +0 -74
- package/dist/esm/certification_request-d5ea5973.js.map +0 -1
- package/dist/esm/crl-d13d9ec5.js +0 -318
- package/dist/esm/crl-d13d9ec5.js.map +0 -1
- package/dist/esm/cross-9ec9a759.js +0 -47
- package/dist/esm/download-0cc3077a.js +0 -21
- package/dist/esm/download-aacb6eff.js.map +0 -1
- package/dist/esm/index-4079bbb5.js.map +0 -1
- package/dist/esm/link-ad24c3be.js +0 -23
- package/dist/esm/miscellaneous-cdfd8905.js +0 -1399
- package/dist/esm/miscellaneous-cdfd8905.js.map +0 -1
- package/dist/esm/x509_certificate-a9fcab55.js +0 -158
- package/dist/esm/x509_certificate-a9fcab55.js.map +0 -1
- package/dist/esm-es5/button-35146bdd.js +0 -19
- package/dist/esm-es5/certification_request-d5ea5973.js.map +0 -1
- package/dist/esm-es5/crl-d13d9ec5.js +0 -33
- package/dist/esm-es5/crl-d13d9ec5.js.map +0 -1
- package/dist/esm-es5/index-4079bbb5.js +0 -6
- package/dist/esm-es5/index-4079bbb5.js.map +0 -1
- package/dist/esm-es5/miscellaneous-cdfd8905.js.map +0 -1
- package/dist/esm-es5/x509_certificate-a9fcab55.js +0 -12
- package/dist/peculiar/p-0b356bb5.js +0 -6
- package/dist/peculiar/p-0b356bb5.js.map +0 -1
- package/dist/peculiar/p-14f281b0.system.js +0 -43
- package/dist/peculiar/p-14f281b0.system.js.map +0 -1
- package/dist/peculiar/p-2fcad8cb.system.js +0 -20
- package/dist/peculiar/p-33196289.entry.js +0 -5
- package/dist/peculiar/p-33196289.entry.js.map +0 -1
- package/dist/peculiar/p-3b395604.system.entry.js.map +0 -1
- package/dist/peculiar/p-4a6ceeda.js.map +0 -1
- package/dist/peculiar/p-5151cb6f.system.entry.js +0 -5
- package/dist/peculiar/p-5151cb6f.system.entry.js.map +0 -1
- package/dist/peculiar/p-53784f15.system.entry.js +0 -5
- package/dist/peculiar/p-53784f15.system.entry.js.map +0 -1
- package/dist/peculiar/p-5aabeba7.system.js +0 -6
- package/dist/peculiar/p-5aabeba7.system.js.map +0 -1
- package/dist/peculiar/p-5ab007e9.entry.js +0 -5
- package/dist/peculiar/p-5ab007e9.entry.js.map +0 -1
- package/dist/peculiar/p-609ee9f0.entry.js.map +0 -1
- package/dist/peculiar/p-67156853.js.map +0 -1
- package/dist/peculiar/p-6cb88fd6.system.js +0 -13
- package/dist/peculiar/p-6daee4d7.system.js +0 -369
- package/dist/peculiar/p-6daee4d7.system.js.map +0 -1
- package/dist/peculiar/p-6e48afc4.system.js +0 -34
- package/dist/peculiar/p-6e48afc4.system.js.map +0 -1
- package/dist/peculiar/p-718982f4.system.entry.js +0 -111
- package/dist/peculiar/p-718982f4.system.entry.js.map +0 -1
- package/dist/peculiar/p-7f9beaa8.js +0 -19
- package/dist/peculiar/p-80832207.system.js +0 -5
- package/dist/peculiar/p-80832207.system.js.map +0 -1
- package/dist/peculiar/p-8fac1d56.js +0 -33
- package/dist/peculiar/p-8fac1d56.js.map +0 -1
- package/dist/peculiar/p-94a453d7.js +0 -12
- package/dist/peculiar/p-a3eeb94b.system.js +0 -5
- package/dist/peculiar/p-a67b8793.system.entry.js.map +0 -1
- package/dist/peculiar/p-a720c0a5.system.entry.js.map +0 -1
- package/dist/peculiar/p-a7386b78.entry.js.map +0 -1
- package/dist/peculiar/p-ab7dc738.system.js +0 -13
- package/dist/peculiar/p-b313be9e.system.js +0 -13
- package/dist/peculiar/p-c35b180c.entry.js.map +0 -1
- package/dist/peculiar/p-c99507d4.system.js +0 -20
- package/dist/peculiar/p-ddae2f8e.system.js +0 -27
- package/dist/peculiar/p-e0f4bda5.system.js +0 -97
- package/dist/peculiar/p-e0f4bda5.system.js.map +0 -1
- package/dist/peculiar/p-e6a3b4d4.system.js +0 -13
- package/dist/peculiar/p-f86279f6.entry.js +0 -110
- package/dist/peculiar/p-f86279f6.entry.js.map +0 -1
- /package/dist/esm-es5/{actions-8d745b2a.js.map → actions-aebcbc9d.js.map} +0 -0
- /package/dist/esm-es5/{arrow_top-fc298828.js.map → arrow_top-aee1ee02.js.map} +0 -0
- /package/dist/esm-es5/{button-35146bdd.js.map → button-a2fabf9a.js.map} +0 -0
- /package/dist/esm-es5/{cross-9ec9a759.js.map → cross-1377606f.js.map} +0 -0
- /package/dist/esm-es5/{download-0cc3077a.js.map → download-14dc1047.js.map} +0 -0
- /package/dist/esm-es5/{link-ad24c3be.js.map → link-7e4e9060.js.map} +0 -0
- /package/dist/peculiar/{p-59e5ac12.js.map → p-1f766dd5.js.map} +0 -0
- /package/dist/peculiar/{p-6cb88fd6.system.js.map → p-243244af.system.js.map} +0 -0
- /package/dist/peculiar/{p-0fc2e2b4.js.map → p-27ca6743.js.map} +0 -0
- /package/dist/peculiar/{p-48474b8d.js.map → p-3d44cbd2.js.map} +0 -0
- /package/dist/peculiar/{p-7f9beaa8.js.map → p-4bc5ddbe.js.map} +0 -0
- /package/dist/peculiar/{p-b313be9e.system.js.map → p-5a662d6f.system.js.map} +0 -0
- /package/dist/peculiar/{p-e6a3b4d4.system.js.map → p-8bbee8f4.system.js.map} +0 -0
- /package/dist/peculiar/{p-370cee20.js.map → p-99efefea.js.map} +0 -0
- /package/dist/peculiar/{p-1ceb0fe3.js.map → p-a9487007.js.map} +0 -0
- /package/dist/peculiar/{p-17e3c47b.js.map → p-ae91d778.js.map} +0 -0
- /package/dist/peculiar/{p-a3eeb94b.system.js.map → p-b2890eb8.system.js.map} +0 -0
- /package/dist/peculiar/{p-94a453d7.js.map → p-e6a6e602.js.map} +0 -0
|
@@ -24,6 +24,7 @@ function _interopNamespace(e) {
|
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
const NAMESPACE = 'peculiar';
|
|
27
|
+
const BUILD = /* peculiar */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: false, cmpDidUnload: false, cmpDidUpdate: true, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: true, element: false, event: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: false, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: true, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: false, mode: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: false, propNumber: true, propString: true, reflect: true, scoped: true, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: true, slotChildNodesFix: false, slotRelocation: true, state: true, style: true, svg: true, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: true, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: true, watchCallback: true };
|
|
27
28
|
|
|
28
29
|
/**
|
|
29
30
|
* Virtual DOM patching algorithm based on Snabbdom by
|
|
@@ -63,6 +64,13 @@ const HYDRATE_ID = 's-id';
|
|
|
63
64
|
const HYDRATED_STYLE_ID = 'sty-id';
|
|
64
65
|
const HYDRATE_CHILD_ID = 'c-id';
|
|
65
66
|
const HYDRATED_CSS = '{visibility:hidden}.hydrated{visibility:inherit}';
|
|
67
|
+
/**
|
|
68
|
+
* Constant for styles to be globally applied to `slot-fb` elements for pseudo-slot behavior.
|
|
69
|
+
*
|
|
70
|
+
* Two cascading rules must be used instead of a `:not()` selector due to Stencil browser
|
|
71
|
+
* support as of Stencil v4.
|
|
72
|
+
*/
|
|
73
|
+
const SLOT_FB_CSS = 'slot-fb{display:contents}slot-fb[hidden]{display:none}';
|
|
66
74
|
const XLINK_NS = 'http://www.w3.org/1999/xlink';
|
|
67
75
|
/**
|
|
68
76
|
* Default style mode id
|
|
@@ -267,6 +275,17 @@ const convertToPrivate = (node) => {
|
|
|
267
275
|
vnode.$name$ = node.vname;
|
|
268
276
|
return vnode;
|
|
269
277
|
};
|
|
278
|
+
/**
|
|
279
|
+
* Entrypoint of the client-side hydration process. Facilitates calls to hydrate the
|
|
280
|
+
* document and all its nodes.
|
|
281
|
+
*
|
|
282
|
+
* This process will also reconstruct the shadow root and slot DOM nodes for components using shadow DOM.
|
|
283
|
+
*
|
|
284
|
+
* @param hostElm The element to hydrate.
|
|
285
|
+
* @param tagName The element's tag name.
|
|
286
|
+
* @param hostId The host ID assigned to the element by the server.
|
|
287
|
+
* @param hostRef The host reference for the element.
|
|
288
|
+
*/
|
|
270
289
|
const initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
|
|
271
290
|
const endHydrate = createTime('hydrateClient', tagName);
|
|
272
291
|
const shadowRoot = hostElm.shadowRoot;
|
|
@@ -284,6 +303,8 @@ const initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
|
|
|
284
303
|
const orgLocationId = c.$hostId$ + '.' + c.$nodeId$;
|
|
285
304
|
const orgLocationNode = plt.$orgLocNodes$.get(orgLocationId);
|
|
286
305
|
const node = c.$elm$;
|
|
306
|
+
// Put the node back in its original location since the native Shadow DOM
|
|
307
|
+
// can handle rendering it its correct location now
|
|
287
308
|
if (orgLocationNode && supportsShadow && orgLocationNode['s-en'] === '') {
|
|
288
309
|
orgLocationNode.parentNode.insertBefore(node, orgLocationNode.nextSibling);
|
|
289
310
|
}
|
|
@@ -305,6 +326,22 @@ const initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
|
|
|
305
326
|
}
|
|
306
327
|
endHydrate();
|
|
307
328
|
};
|
|
329
|
+
/**
|
|
330
|
+
* Recursively constructs the virtual node tree for a host element and its children.
|
|
331
|
+
* The tree is constructed by parsing the annotations set on the nodes by the server.
|
|
332
|
+
*
|
|
333
|
+
* In addition to constructing the vNode tree, we also track information about the node's
|
|
334
|
+
* descendants like which are slots, which should exist in the shadow root, and which
|
|
335
|
+
* are nodes that should be rendered as children of the parent node.
|
|
336
|
+
*
|
|
337
|
+
* @param parentVNode The vNode representing the parent node.
|
|
338
|
+
* @param childRenderNodes An array of all child nodes in the parent's node tree.
|
|
339
|
+
* @param slotNodes An array of all slot nodes in the parent's node tree.
|
|
340
|
+
* @param shadowRootNodes An array all nodes that should be rendered in the shadow root in the parent's node tree.
|
|
341
|
+
* @param hostElm The parent element.
|
|
342
|
+
* @param node The node to construct the vNode tree for.
|
|
343
|
+
* @param hostId The host ID assigned to the element by the server.
|
|
344
|
+
*/
|
|
308
345
|
const clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, node, hostId) => {
|
|
309
346
|
let childNodeType;
|
|
310
347
|
let childIdSplt;
|
|
@@ -449,6 +486,13 @@ const clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes
|
|
|
449
486
|
parentVNode.$children$ = [vnode];
|
|
450
487
|
}
|
|
451
488
|
};
|
|
489
|
+
/**
|
|
490
|
+
* Recursively locate any comments representing an original location for a node in a node's
|
|
491
|
+
* children or shadowRoot children.
|
|
492
|
+
*
|
|
493
|
+
* @param node The node to search.
|
|
494
|
+
* @param orgLocNodes A map of the original location annotation and the current node being searched.
|
|
495
|
+
*/
|
|
452
496
|
const initializeDocumentHydrate = (node, orgLocNodes) => {
|
|
453
497
|
if (node.nodeType === 1 /* NODE_TYPE.ElementNode */) {
|
|
454
498
|
let i = 0;
|
|
@@ -593,6 +637,10 @@ const addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
593
637
|
}
|
|
594
638
|
styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector('link'));
|
|
595
639
|
}
|
|
640
|
+
// Add styles for `slot-fb` elements if we're using slots outside the Shadow DOM
|
|
641
|
+
if (cmpMeta.$flags$ & 4 /* CMP_FLAGS.hasSlotRelocation */) {
|
|
642
|
+
styleElm.innerHTML += SLOT_FB_CSS;
|
|
643
|
+
}
|
|
596
644
|
if (appliedStyles) {
|
|
597
645
|
appliedStyles.add(scopeId);
|
|
598
646
|
}
|
|
@@ -727,11 +775,19 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
727
775
|
// except for the first character, we keep the event name case
|
|
728
776
|
memberName = ln[2] + memberName.slice(3);
|
|
729
777
|
}
|
|
730
|
-
if (oldValue) {
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
778
|
+
if (oldValue || newValue) {
|
|
779
|
+
// Need to account for "capture" events.
|
|
780
|
+
// If the event name ends with "Capture", we'll update the name to remove
|
|
781
|
+
// the "Capture" suffix and make sure the event listener is setup to handle the capture event.
|
|
782
|
+
const capture = memberName.endsWith(CAPTURE_EVENT_SUFFIX);
|
|
783
|
+
// Make sure we only replace the last instance of "Capture"
|
|
784
|
+
memberName = memberName.replace(CAPTURE_EVENT_REGEX, '');
|
|
785
|
+
if (oldValue) {
|
|
786
|
+
plt.rel(elm, memberName, oldValue, capture);
|
|
787
|
+
}
|
|
788
|
+
if (newValue) {
|
|
789
|
+
plt.ael(elm, memberName, newValue, capture);
|
|
790
|
+
}
|
|
735
791
|
}
|
|
736
792
|
}
|
|
737
793
|
else {
|
|
@@ -753,7 +809,11 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
753
809
|
elm[memberName] = newValue;
|
|
754
810
|
}
|
|
755
811
|
}
|
|
756
|
-
catch (e) {
|
|
812
|
+
catch (e) {
|
|
813
|
+
/**
|
|
814
|
+
* in case someone tries to set a read-only property, e.g. "namespaceURI", we just ignore it
|
|
815
|
+
*/
|
|
816
|
+
}
|
|
757
817
|
}
|
|
758
818
|
/**
|
|
759
819
|
* Need to manually update attribute if:
|
|
@@ -792,7 +852,14 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
792
852
|
}
|
|
793
853
|
};
|
|
794
854
|
const parseClassListRegex = /\s/;
|
|
855
|
+
/**
|
|
856
|
+
* Parsed a string of classnames into an array
|
|
857
|
+
* @param value className string, e.g. "foo bar baz"
|
|
858
|
+
* @returns list of classes, e.g. ["foo", "bar", "baz"]
|
|
859
|
+
*/
|
|
795
860
|
const parseClassList = (value) => (!value ? [] : value.split(parseClassListRegex));
|
|
861
|
+
const CAPTURE_EVENT_SUFFIX = 'Capture';
|
|
862
|
+
const CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + '$');
|
|
796
863
|
const updateElement = (oldVnode, newVnode, isSvgMode, memberName) => {
|
|
797
864
|
// if the element passed in is a shadow root, which is a document fragment
|
|
798
865
|
// then we want to be adding attrs/props to the shadow root's "host" element
|
|
@@ -826,6 +893,7 @@ const updateElement = (oldVnode, newVnode, isSvgMode, memberName) => {
|
|
|
826
893
|
* @returns the newly created node
|
|
827
894
|
*/
|
|
828
895
|
const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
896
|
+
var _a;
|
|
829
897
|
// tslint:disable-next-line: prefer-const
|
|
830
898
|
const newVNode = newParentVNode.$children$[childIndex];
|
|
831
899
|
let i = 0;
|
|
@@ -899,8 +967,10 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
899
967
|
}
|
|
900
968
|
}
|
|
901
969
|
}
|
|
970
|
+
// This needs to always happen so we can hide nodes that are projected
|
|
971
|
+
// to another component but don't end up in a slot
|
|
972
|
+
elm['s-hn'] = hostTagName;
|
|
902
973
|
{
|
|
903
|
-
elm['s-hn'] = hostTagName;
|
|
904
974
|
if (newVNode.$flags$ & (2 /* VNODE_FLAGS.isSlotFallback */ | 1 /* VNODE_FLAGS.isSlotReference */)) {
|
|
905
975
|
// remember the content reference comment
|
|
906
976
|
elm['s-sr'] = true;
|
|
@@ -908,12 +978,16 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
908
978
|
elm['s-cr'] = contentRef;
|
|
909
979
|
// remember the slot name, or empty string for default slot
|
|
910
980
|
elm['s-sn'] = newVNode.$name$ || '';
|
|
981
|
+
// remember the ref callback function
|
|
982
|
+
elm['s-rf'] = (_a = newVNode.$attrs$) === null || _a === void 0 ? void 0 : _a.ref;
|
|
911
983
|
// check if we've got an old vnode for this slot
|
|
912
984
|
oldVNode = oldParentVNode && oldParentVNode.$children$ && oldParentVNode.$children$[childIndex];
|
|
913
985
|
if (oldVNode && oldVNode.$tag$ === newVNode.$tag$ && oldParentVNode.$elm$) {
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
986
|
+
{
|
|
987
|
+
// we've got an old slot vnode and the wrapper is being replaced
|
|
988
|
+
// so let's move the old slot content back to its original location
|
|
989
|
+
putBackInOriginalLocation(oldParentVNode.$elm$, false);
|
|
990
|
+
}
|
|
917
991
|
}
|
|
918
992
|
}
|
|
919
993
|
}
|
|
@@ -921,20 +995,27 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
921
995
|
};
|
|
922
996
|
const putBackInOriginalLocation = (parentElm, recursive) => {
|
|
923
997
|
plt.$flags$ |= 1 /* PLATFORM_FLAGS.isTmpDisconnected */;
|
|
924
|
-
const oldSlotChildNodes = parentElm.childNodes;
|
|
998
|
+
const oldSlotChildNodes = Array.from(parentElm.childNodes);
|
|
999
|
+
if (parentElm['s-sr'] && BUILD.experimentalSlotFixes) {
|
|
1000
|
+
let node = parentElm;
|
|
1001
|
+
while ((node = node.nextSibling)) {
|
|
1002
|
+
if (node && node['s-sn'] === parentElm['s-sn'] && node['s-sh'] === hostTagName) {
|
|
1003
|
+
oldSlotChildNodes.push(node);
|
|
1004
|
+
}
|
|
1005
|
+
}
|
|
1006
|
+
}
|
|
925
1007
|
for (let i = oldSlotChildNodes.length - 1; i >= 0; i--) {
|
|
926
1008
|
const childNode = oldSlotChildNodes[i];
|
|
927
1009
|
if (childNode['s-hn'] !== hostTagName && childNode['s-ol']) {
|
|
928
|
-
// // this child node in the old element is from another component
|
|
929
|
-
// // remove this node from the old slot's parent
|
|
930
|
-
// childNode.remove();
|
|
931
1010
|
// and relocate it back to it's original location
|
|
932
1011
|
parentReferenceNode(childNode).insertBefore(childNode, referenceNode(childNode));
|
|
933
1012
|
// remove the old original location comment entirely
|
|
934
1013
|
// later on the patch function will know what to do
|
|
935
|
-
// and move this to the correct spot
|
|
1014
|
+
// and move this to the correct spot if need be
|
|
936
1015
|
childNode['s-ol'].remove();
|
|
937
1016
|
childNode['s-ol'] = undefined;
|
|
1017
|
+
// Reset so we can correctly move the node around again.
|
|
1018
|
+
childNode['s-sh'] = undefined;
|
|
938
1019
|
checkSlotRelocate = true;
|
|
939
1020
|
}
|
|
940
1021
|
if (recursive) {
|
|
@@ -1079,8 +1160,9 @@ const removeVnodes = (vnodes, startIdx, endIdx) => {
|
|
|
1079
1160
|
* @param oldCh the old children of the parent node
|
|
1080
1161
|
* @param newVNode the new VNode which will replace the parent
|
|
1081
1162
|
* @param newCh the new children of the parent node
|
|
1163
|
+
* @param isInitialRender whether or not this is the first render of the vdom
|
|
1082
1164
|
*/
|
|
1083
|
-
const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
1165
|
+
const updateChildren = (parentElm, oldCh, newVNode, newCh, isInitialRender = false) => {
|
|
1084
1166
|
let oldStartIdx = 0;
|
|
1085
1167
|
let newStartIdx = 0;
|
|
1086
1168
|
let idxInOld = 0;
|
|
@@ -1107,24 +1189,24 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
|
1107
1189
|
else if (newEndVnode == null) {
|
|
1108
1190
|
newEndVnode = newCh[--newEndIdx];
|
|
1109
1191
|
}
|
|
1110
|
-
else if (isSameVnode(oldStartVnode, newStartVnode)) {
|
|
1192
|
+
else if (isSameVnode(oldStartVnode, newStartVnode, isInitialRender)) {
|
|
1111
1193
|
// if the start nodes are the same then we should patch the new VNode
|
|
1112
1194
|
// onto the old one, and increment our `newStartIdx` and `oldStartIdx`
|
|
1113
1195
|
// indices to reflect that. We don't need to move any DOM Nodes around
|
|
1114
1196
|
// since things are matched up in order.
|
|
1115
|
-
patch(oldStartVnode, newStartVnode);
|
|
1197
|
+
patch(oldStartVnode, newStartVnode, isInitialRender);
|
|
1116
1198
|
oldStartVnode = oldCh[++oldStartIdx];
|
|
1117
1199
|
newStartVnode = newCh[++newStartIdx];
|
|
1118
1200
|
}
|
|
1119
|
-
else if (isSameVnode(oldEndVnode, newEndVnode)) {
|
|
1201
|
+
else if (isSameVnode(oldEndVnode, newEndVnode, isInitialRender)) {
|
|
1120
1202
|
// likewise, if the end nodes are the same we patch new onto old and
|
|
1121
1203
|
// decrement our end indices, and also likewise in this case we don't
|
|
1122
1204
|
// need to move any DOM Nodes.
|
|
1123
|
-
patch(oldEndVnode, newEndVnode);
|
|
1205
|
+
patch(oldEndVnode, newEndVnode, isInitialRender);
|
|
1124
1206
|
oldEndVnode = oldCh[--oldEndIdx];
|
|
1125
1207
|
newEndVnode = newCh[--newEndIdx];
|
|
1126
1208
|
}
|
|
1127
|
-
else if (isSameVnode(oldStartVnode, newEndVnode)) {
|
|
1209
|
+
else if (isSameVnode(oldStartVnode, newEndVnode, isInitialRender)) {
|
|
1128
1210
|
// case: "Vnode moved right"
|
|
1129
1211
|
//
|
|
1130
1212
|
// We've found that the last node in our window on the new children is
|
|
@@ -1142,7 +1224,7 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
|
1142
1224
|
if ((oldStartVnode.$tag$ === 'slot' || newEndVnode.$tag$ === 'slot')) {
|
|
1143
1225
|
putBackInOriginalLocation(oldStartVnode.$elm$.parentNode, false);
|
|
1144
1226
|
}
|
|
1145
|
-
patch(oldStartVnode, newEndVnode);
|
|
1227
|
+
patch(oldStartVnode, newEndVnode, isInitialRender);
|
|
1146
1228
|
// We need to move the element for `oldStartVnode` into a position which
|
|
1147
1229
|
// will be appropriate for `newEndVnode`. For this we can use
|
|
1148
1230
|
// `.insertBefore` and `oldEndVnode.$elm$.nextSibling`. If there is a
|
|
@@ -1164,7 +1246,7 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
|
1164
1246
|
oldStartVnode = oldCh[++oldStartIdx];
|
|
1165
1247
|
newEndVnode = newCh[--newEndIdx];
|
|
1166
1248
|
}
|
|
1167
|
-
else if (isSameVnode(oldEndVnode, newStartVnode)) {
|
|
1249
|
+
else if (isSameVnode(oldEndVnode, newStartVnode, isInitialRender)) {
|
|
1168
1250
|
// case: "Vnode moved left"
|
|
1169
1251
|
//
|
|
1170
1252
|
// We've found that the first node in our window on the new children is
|
|
@@ -1183,7 +1265,7 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
|
1183
1265
|
if ((oldStartVnode.$tag$ === 'slot' || newEndVnode.$tag$ === 'slot')) {
|
|
1184
1266
|
putBackInOriginalLocation(oldEndVnode.$elm$.parentNode, false);
|
|
1185
1267
|
}
|
|
1186
|
-
patch(oldEndVnode, newStartVnode);
|
|
1268
|
+
patch(oldEndVnode, newStartVnode, isInitialRender);
|
|
1187
1269
|
// We've already checked above if `oldStartVnode` and `newStartVnode` are
|
|
1188
1270
|
// the same node, so since we're here we know that they are not. Thus we
|
|
1189
1271
|
// can move the element for `oldEndVnode` _before_ the element for
|
|
@@ -1220,7 +1302,7 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
|
1220
1302
|
node = createElm(oldCh && oldCh[newStartIdx], newVNode, idxInOld, parentElm);
|
|
1221
1303
|
}
|
|
1222
1304
|
else {
|
|
1223
|
-
patch(elmToMove, newStartVnode);
|
|
1305
|
+
patch(elmToMove, newStartVnode, isInitialRender);
|
|
1224
1306
|
// invalidate the matching old node so that we won't try to update it
|
|
1225
1307
|
// again later on
|
|
1226
1308
|
oldCh[idxInOld] = undefined;
|
|
@@ -1271,19 +1353,25 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
|
1271
1353
|
*
|
|
1272
1354
|
* @param leftVNode the first VNode to check
|
|
1273
1355
|
* @param rightVNode the second VNode to check
|
|
1356
|
+
* @param isInitialRender whether or not this is the first render of the vdom
|
|
1274
1357
|
* @returns whether they're equal or not
|
|
1275
1358
|
*/
|
|
1276
|
-
const isSameVnode = (leftVNode, rightVNode) => {
|
|
1359
|
+
const isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
|
|
1277
1360
|
// compare if two vnode to see if they're "technically" the same
|
|
1278
1361
|
// need to have the same element tag, and same key to be the same
|
|
1279
1362
|
if (leftVNode.$tag$ === rightVNode.$tag$) {
|
|
1280
1363
|
if (leftVNode.$tag$ === 'slot') {
|
|
1281
1364
|
return leftVNode.$name$ === rightVNode.$name$;
|
|
1282
1365
|
}
|
|
1283
|
-
// this will be set if
|
|
1284
|
-
|
|
1366
|
+
// this will be set if JSX tags in the build have `key` attrs set on them
|
|
1367
|
+
// we only want to check this if we're not on the first render since on
|
|
1368
|
+
// first render `leftVNode.$key$` will always be `null`, so we can be led
|
|
1369
|
+
// astray and, for instance, accidentally delete a DOM node that we want to
|
|
1370
|
+
// keep around.
|
|
1371
|
+
if (!isInitialRender) {
|
|
1285
1372
|
return leftVNode.$key$ === rightVNode.$key$;
|
|
1286
1373
|
}
|
|
1374
|
+
return true;
|
|
1287
1375
|
}
|
|
1288
1376
|
return false;
|
|
1289
1377
|
};
|
|
@@ -1302,8 +1390,9 @@ const parentReferenceNode = (node) => (node['s-ol'] ? node['s-ol'] : node).paren
|
|
|
1302
1390
|
*
|
|
1303
1391
|
* @param oldVNode an old VNode whose DOM element and children we want to update
|
|
1304
1392
|
* @param newVNode a new VNode representing an updated version of the old one
|
|
1393
|
+
* @param isInitialRender whether or not this is the first render of the vdom
|
|
1305
1394
|
*/
|
|
1306
|
-
const patch = (oldVNode, newVNode) => {
|
|
1395
|
+
const patch = (oldVNode, newVNode, isInitialRender = false) => {
|
|
1307
1396
|
const elm = (newVNode.$elm$ = oldVNode.$elm$);
|
|
1308
1397
|
const oldChildren = oldVNode.$children$;
|
|
1309
1398
|
const newChildren = newVNode.$children$;
|
|
@@ -1317,8 +1406,7 @@ const patch = (oldVNode, newVNode) => {
|
|
|
1317
1406
|
isSvgMode = tag === 'svg' ? true : tag === 'foreignObject' ? false : isSvgMode;
|
|
1318
1407
|
}
|
|
1319
1408
|
{
|
|
1320
|
-
if (tag === 'slot')
|
|
1321
|
-
;
|
|
1409
|
+
if (tag === 'slot' && !useNativeShadowDom) ;
|
|
1322
1410
|
else {
|
|
1323
1411
|
// either this is the first render of an element OR it's an update
|
|
1324
1412
|
// AND we already know it's possible it could have changed
|
|
@@ -1329,7 +1417,7 @@ const patch = (oldVNode, newVNode) => {
|
|
|
1329
1417
|
if (oldChildren !== null && newChildren !== null) {
|
|
1330
1418
|
// looks like there's child vnodes for both the old and new vnodes
|
|
1331
1419
|
// so we need to call `updateChildren` to reconcile them
|
|
1332
|
-
updateChildren(elm, oldChildren, newVNode, newChildren);
|
|
1420
|
+
updateChildren(elm, oldChildren, newVNode, newChildren, isInitialRender);
|
|
1333
1421
|
}
|
|
1334
1422
|
else if (newChildren !== null) {
|
|
1335
1423
|
// no old child vnodes, but there are new child vnodes to add
|
|
@@ -1358,42 +1446,53 @@ const patch = (oldVNode, newVNode) => {
|
|
|
1358
1446
|
elm.data = text;
|
|
1359
1447
|
}
|
|
1360
1448
|
};
|
|
1449
|
+
/**
|
|
1450
|
+
* Adjust the `.hidden` property as-needed on any nodes in a DOM subtree which
|
|
1451
|
+
* are slot fallbacks nodes.
|
|
1452
|
+
*
|
|
1453
|
+
* A slot fallback node should be visible by default. Then, it should be
|
|
1454
|
+
* conditionally hidden if:
|
|
1455
|
+
*
|
|
1456
|
+
* - it has a sibling with a `slot` property set to its slot name or if
|
|
1457
|
+
* - it is a default fallback slot node, in which case we hide if it has any
|
|
1458
|
+
* content
|
|
1459
|
+
*
|
|
1460
|
+
* @param elm the element of interest
|
|
1461
|
+
*/
|
|
1361
1462
|
const updateFallbackSlotVisibility = (elm) => {
|
|
1362
|
-
// tslint:disable-next-line: prefer-const
|
|
1363
1463
|
const childNodes = elm.childNodes;
|
|
1364
|
-
|
|
1365
|
-
let i;
|
|
1366
|
-
let ilen;
|
|
1367
|
-
let j;
|
|
1368
|
-
let slotNameAttr;
|
|
1369
|
-
let nodeType;
|
|
1370
|
-
for (i = 0, ilen = childNodes.length; i < ilen; i++) {
|
|
1371
|
-
childNode = childNodes[i];
|
|
1464
|
+
for (const childNode of childNodes) {
|
|
1372
1465
|
if (childNode.nodeType === 1 /* NODE_TYPE.ElementNode */) {
|
|
1373
1466
|
if (childNode['s-sr']) {
|
|
1374
1467
|
// this is a slot fallback node
|
|
1375
1468
|
// get the slot name for this slot reference node
|
|
1376
|
-
|
|
1469
|
+
const slotName = childNode['s-sn'];
|
|
1377
1470
|
// by default always show a fallback slot node
|
|
1378
1471
|
// then hide it if there are other slots in the light dom
|
|
1379
1472
|
childNode.hidden = false;
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1473
|
+
// we need to check all of its sibling nodes in order to see if
|
|
1474
|
+
// `childNode` should be hidden
|
|
1475
|
+
for (const siblingNode of childNodes) {
|
|
1476
|
+
// Don't check the node against itself
|
|
1477
|
+
if (siblingNode !== childNode) {
|
|
1478
|
+
if (siblingNode['s-hn'] !== childNode['s-hn'] || slotName !== '') {
|
|
1479
|
+
// this sibling node is from a different component OR is a named
|
|
1480
|
+
// fallback slot node
|
|
1481
|
+
if (siblingNode.nodeType === 1 /* NODE_TYPE.ElementNode */ &&
|
|
1482
|
+
(slotName === siblingNode.getAttribute('slot') || slotName === siblingNode['s-sn'])) {
|
|
1483
|
+
childNode.hidden = true;
|
|
1484
|
+
break;
|
|
1485
|
+
}
|
|
1387
1486
|
}
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1487
|
+
else {
|
|
1488
|
+
// this is a default fallback slot node
|
|
1489
|
+
// any element or text node (with content)
|
|
1490
|
+
// should hide the default fallback slot node
|
|
1491
|
+
if (siblingNode.nodeType === 1 /* NODE_TYPE.ElementNode */ ||
|
|
1492
|
+
(siblingNode.nodeType === 3 /* NODE_TYPE.TextNode */ && siblingNode.textContent.trim() !== '')) {
|
|
1493
|
+
childNode.hidden = true;
|
|
1494
|
+
break;
|
|
1495
|
+
}
|
|
1397
1496
|
}
|
|
1398
1497
|
}
|
|
1399
1498
|
}
|
|
@@ -1403,45 +1502,67 @@ const updateFallbackSlotVisibility = (elm) => {
|
|
|
1403
1502
|
}
|
|
1404
1503
|
}
|
|
1405
1504
|
};
|
|
1505
|
+
/**
|
|
1506
|
+
* Component-global information about nodes which are either currently being
|
|
1507
|
+
* relocated or will be shortly.
|
|
1508
|
+
*/
|
|
1406
1509
|
const relocateNodes = [];
|
|
1407
|
-
|
|
1510
|
+
/**
|
|
1511
|
+
* Mark the contents of a slot for relocation via adding references to them to
|
|
1512
|
+
* the {@link relocateNodes} data structure. The actual work of relocating them
|
|
1513
|
+
* will then be handled in {@link renderVdom}.
|
|
1514
|
+
*
|
|
1515
|
+
* @param elm a render node whose child nodes need to be relocated
|
|
1516
|
+
*/
|
|
1517
|
+
const markSlotContentForRelocation = (elm) => {
|
|
1408
1518
|
// tslint:disable-next-line: prefer-const
|
|
1409
|
-
let childNode;
|
|
1410
1519
|
let node;
|
|
1411
1520
|
let hostContentNodes;
|
|
1412
|
-
let slotNameAttr;
|
|
1413
|
-
let relocateNodeData;
|
|
1414
1521
|
let j;
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
for (; i < ilen; i++) {
|
|
1419
|
-
childNode = childNodes[i];
|
|
1522
|
+
for (const childNode of elm.childNodes) {
|
|
1523
|
+
// we need to find child nodes which are slot references so we can then try
|
|
1524
|
+
// to match them up with nodes that need to be relocated
|
|
1420
1525
|
if (childNode['s-sr'] && (node = childNode['s-cr']) && node.parentNode) {
|
|
1421
|
-
// first
|
|
1422
|
-
//
|
|
1526
|
+
// first get the content reference comment node ('s-cr'), then we get
|
|
1527
|
+
// its parent, which is where all the host content is now
|
|
1423
1528
|
hostContentNodes = node.parentNode.childNodes;
|
|
1424
|
-
|
|
1529
|
+
const slotName = childNode['s-sn'];
|
|
1530
|
+
// iterate through all the nodes under the location where the host was
|
|
1531
|
+
// originally rendered
|
|
1425
1532
|
for (j = hostContentNodes.length - 1; j >= 0; j--) {
|
|
1426
1533
|
node = hostContentNodes[j];
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1534
|
+
// check that the node is not a content reference node or a node
|
|
1535
|
+
// reference and then check that the host name does not match that of
|
|
1536
|
+
// childNode.
|
|
1537
|
+
// In addition, check that the slot either has not already been relocated, or
|
|
1538
|
+
// that its current location's host is not childNode's host. This is essentially
|
|
1539
|
+
// a check so that we don't try to relocate (and then hide) a node that is already
|
|
1540
|
+
// where it should be.
|
|
1541
|
+
if (!node['s-cn'] &&
|
|
1542
|
+
!node['s-nr'] &&
|
|
1543
|
+
node['s-hn'] !== childNode['s-hn'] &&
|
|
1544
|
+
(!BUILD.experimentalSlotFixes )) {
|
|
1545
|
+
// if `node` is located in the slot that `childNode` refers to (via the
|
|
1546
|
+
// `'s-sn'` property) then we need to relocate it from it's current spot
|
|
1547
|
+
// (under the host element parent) to the right slot location
|
|
1548
|
+
if (isNodeLocatedInSlot(node, slotName)) {
|
|
1432
1549
|
// it's possible we've already decided to relocate this node
|
|
1433
|
-
relocateNodeData = relocateNodes.find((r) => r.$nodeToRelocate$ === node);
|
|
1550
|
+
let relocateNodeData = relocateNodes.find((r) => r.$nodeToRelocate$ === node);
|
|
1434
1551
|
// made some changes to slots
|
|
1435
1552
|
// let's make sure we also double check
|
|
1436
1553
|
// fallbacks are correctly hidden or shown
|
|
1437
1554
|
checkSlotFallbackVisibility = true;
|
|
1438
|
-
|
|
1555
|
+
// ensure that the slot-name attr is correct
|
|
1556
|
+
node['s-sn'] = node['s-sn'] || slotName;
|
|
1439
1557
|
if (relocateNodeData) {
|
|
1440
|
-
|
|
1441
|
-
//
|
|
1558
|
+
relocateNodeData.$nodeToRelocate$['s-sh'] = childNode['s-hn'];
|
|
1559
|
+
// we marked this node for relocation previously but didn't find
|
|
1560
|
+
// out the slot reference node to which it needs to be relocated
|
|
1561
|
+
// so write it down now!
|
|
1442
1562
|
relocateNodeData.$slotRefNode$ = childNode;
|
|
1443
1563
|
}
|
|
1444
1564
|
else {
|
|
1565
|
+
node['s-sh'] = childNode['s-hn'];
|
|
1445
1566
|
// add to our list of nodes to relocate
|
|
1446
1567
|
relocateNodes.push({
|
|
1447
1568
|
$slotRefNode$: childNode,
|
|
@@ -1460,8 +1581,10 @@ const relocateSlotContent = (elm) => {
|
|
|
1460
1581
|
}
|
|
1461
1582
|
}
|
|
1462
1583
|
else if (!relocateNodes.some((r) => r.$nodeToRelocate$ === node)) {
|
|
1463
|
-
//
|
|
1464
|
-
//
|
|
1584
|
+
// the node is not found within the slot (`childNode`) that we're
|
|
1585
|
+
// currently looking at, so we stick it into `relocateNodes` to
|
|
1586
|
+
// handle later. If we never find a home for this element then
|
|
1587
|
+
// we'll need to hide it
|
|
1465
1588
|
relocateNodes.push({
|
|
1466
1589
|
$nodeToRelocate$: node,
|
|
1467
1590
|
});
|
|
@@ -1469,30 +1592,41 @@ const relocateSlotContent = (elm) => {
|
|
|
1469
1592
|
}
|
|
1470
1593
|
}
|
|
1471
1594
|
}
|
|
1595
|
+
// if we're dealing with any type of element (capable of itself being a
|
|
1596
|
+
// slot reference or containing one) then we recur
|
|
1472
1597
|
if (childNode.nodeType === 1 /* NODE_TYPE.ElementNode */) {
|
|
1473
|
-
|
|
1598
|
+
markSlotContentForRelocation(childNode);
|
|
1474
1599
|
}
|
|
1475
1600
|
}
|
|
1476
1601
|
};
|
|
1477
|
-
|
|
1602
|
+
/**
|
|
1603
|
+
* Check whether a node is located in a given named slot.
|
|
1604
|
+
*
|
|
1605
|
+
* @param nodeToRelocate the node of interest
|
|
1606
|
+
* @param slotName the slot name to check
|
|
1607
|
+
* @returns whether the node is located in the slot or not
|
|
1608
|
+
*/
|
|
1609
|
+
const isNodeLocatedInSlot = (nodeToRelocate, slotName) => {
|
|
1478
1610
|
if (nodeToRelocate.nodeType === 1 /* NODE_TYPE.ElementNode */) {
|
|
1479
|
-
if (nodeToRelocate.getAttribute('slot') === null &&
|
|
1611
|
+
if (nodeToRelocate.getAttribute('slot') === null && slotName === '') {
|
|
1612
|
+
// if the node doesn't have a slot attribute, and the slot we're checking
|
|
1613
|
+
// is not a named slot, then we assume the node should be within the slot
|
|
1480
1614
|
return true;
|
|
1481
1615
|
}
|
|
1482
|
-
if (nodeToRelocate.getAttribute('slot') ===
|
|
1616
|
+
if (nodeToRelocate.getAttribute('slot') === slotName) {
|
|
1483
1617
|
return true;
|
|
1484
1618
|
}
|
|
1485
1619
|
return false;
|
|
1486
1620
|
}
|
|
1487
|
-
if (nodeToRelocate['s-sn'] ===
|
|
1621
|
+
if (nodeToRelocate['s-sn'] === slotName) {
|
|
1488
1622
|
return true;
|
|
1489
1623
|
}
|
|
1490
|
-
return
|
|
1624
|
+
return slotName === '';
|
|
1491
1625
|
};
|
|
1492
1626
|
/**
|
|
1493
|
-
* 'Nullify' any VDom `ref` callbacks on a VDom node or its children by
|
|
1494
|
-
*
|
|
1495
|
-
*
|
|
1627
|
+
* 'Nullify' any VDom `ref` callbacks on a VDom node or its children by calling
|
|
1628
|
+
* them with `null`. This signals that the DOM element corresponding to the VDom
|
|
1629
|
+
* node has been removed from the DOM.
|
|
1496
1630
|
*
|
|
1497
1631
|
* @param vNode a virtual DOM node
|
|
1498
1632
|
*/
|
|
@@ -1516,6 +1650,7 @@ const nullifyVNodeRefs = (vNode) => {
|
|
|
1516
1650
|
* @param isInitialLoad whether or not this is the first call after page load
|
|
1517
1651
|
*/
|
|
1518
1652
|
const renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
1653
|
+
var _a, _b, _c, _d;
|
|
1519
1654
|
const hostElm = hostRef.$hostElement$;
|
|
1520
1655
|
const cmpMeta = hostRef.$cmpMeta$;
|
|
1521
1656
|
const oldVNode = hostRef.$vnode$ || newVNode(null, null);
|
|
@@ -1558,56 +1693,61 @@ const renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
1558
1693
|
{
|
|
1559
1694
|
scopeId = hostElm['s-sc'];
|
|
1560
1695
|
}
|
|
1696
|
+
useNativeShadowDom = (cmpMeta.$flags$ & 1 /* CMP_FLAGS.shadowDomEncapsulation */) !== 0;
|
|
1561
1697
|
{
|
|
1562
1698
|
contentRef = hostElm['s-cr'];
|
|
1563
|
-
useNativeShadowDom = (cmpMeta.$flags$ & 1 /* CMP_FLAGS.shadowDomEncapsulation */) !== 0;
|
|
1564
1699
|
// always reset
|
|
1565
1700
|
checkSlotFallbackVisibility = false;
|
|
1566
1701
|
}
|
|
1567
1702
|
// synchronous patch
|
|
1568
|
-
patch(oldVNode, rootVnode);
|
|
1703
|
+
patch(oldVNode, rootVnode, isInitialLoad);
|
|
1569
1704
|
{
|
|
1570
1705
|
// while we're moving nodes around existing nodes, temporarily disable
|
|
1571
1706
|
// the disconnectCallback from working
|
|
1572
1707
|
plt.$flags$ |= 1 /* PLATFORM_FLAGS.isTmpDisconnected */;
|
|
1573
1708
|
if (checkSlotRelocate) {
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
let orgLocationNode;
|
|
1578
|
-
let parentNodeRef;
|
|
1579
|
-
let insertBeforeNode;
|
|
1580
|
-
let refNode;
|
|
1581
|
-
let i = 0;
|
|
1582
|
-
for (; i < relocateNodes.length; i++) {
|
|
1583
|
-
relocateData = relocateNodes[i];
|
|
1584
|
-
nodeToRelocate = relocateData.$nodeToRelocate$;
|
|
1709
|
+
markSlotContentForRelocation(rootVnode.$elm$);
|
|
1710
|
+
for (const relocateData of relocateNodes) {
|
|
1711
|
+
const nodeToRelocate = relocateData.$nodeToRelocate$;
|
|
1585
1712
|
if (!nodeToRelocate['s-ol']) {
|
|
1586
1713
|
// add a reference node marking this node's original location
|
|
1587
1714
|
// keep a reference to this node for later lookups
|
|
1588
|
-
orgLocationNode =
|
|
1589
|
-
doc.createTextNode('');
|
|
1715
|
+
const orgLocationNode = doc.createTextNode('');
|
|
1590
1716
|
orgLocationNode['s-nr'] = nodeToRelocate;
|
|
1591
1717
|
nodeToRelocate.parentNode.insertBefore((nodeToRelocate['s-ol'] = orgLocationNode), nodeToRelocate);
|
|
1592
1718
|
}
|
|
1593
1719
|
}
|
|
1594
|
-
for (
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
if (
|
|
1598
|
-
|
|
1599
|
-
//
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1720
|
+
for (const relocateData of relocateNodes) {
|
|
1721
|
+
const nodeToRelocate = relocateData.$nodeToRelocate$;
|
|
1722
|
+
const slotRefNode = relocateData.$slotRefNode$;
|
|
1723
|
+
if (slotRefNode) {
|
|
1724
|
+
const parentNodeRef = slotRefNode.parentNode;
|
|
1725
|
+
// When determining where to insert content, the most simple case would be
|
|
1726
|
+
// to relocate the node immediately following the slot reference node. We do this
|
|
1727
|
+
// by getting a reference to the node immediately following the slot reference node
|
|
1728
|
+
// since we will use `insertBefore` to manipulate the DOM.
|
|
1729
|
+
//
|
|
1730
|
+
// If there is no node immediately following the slot reference node, then we will just
|
|
1731
|
+
// end up appending the node as the last child of the parent.
|
|
1732
|
+
let insertBeforeNode = slotRefNode.nextSibling;
|
|
1733
|
+
// If the node we're currently planning on inserting the new node before is an element,
|
|
1734
|
+
// we need to do some additional checks to make sure we're inserting the node in the correct order.
|
|
1735
|
+
// The use case here would be that we have multiple nodes being relocated to the same slot. So, we want
|
|
1736
|
+
// to make sure they get inserted into their new home in the same order they were declared in their original location.
|
|
1737
|
+
//
|
|
1738
|
+
// TODO(STENCIL-914): Remove `experimentalSlotFixes` check
|
|
1739
|
+
{
|
|
1740
|
+
let orgLocationNode = (_a = nodeToRelocate['s-ol']) === null || _a === void 0 ? void 0 : _a.previousSibling;
|
|
1741
|
+
while (orgLocationNode) {
|
|
1742
|
+
let refNode = (_b = orgLocationNode['s-nr']) !== null && _b !== void 0 ? _b : null;
|
|
1743
|
+
if (refNode && refNode['s-sn'] === nodeToRelocate['s-sn'] && parentNodeRef === refNode.parentNode) {
|
|
1744
|
+
refNode = refNode.nextSibling;
|
|
1745
|
+
if (!refNode || !refNode['s-nr']) {
|
|
1746
|
+
insertBeforeNode = refNode;
|
|
1747
|
+
break;
|
|
1748
|
+
}
|
|
1610
1749
|
}
|
|
1750
|
+
orgLocationNode = orgLocationNode.previousSibling;
|
|
1611
1751
|
}
|
|
1612
1752
|
}
|
|
1613
1753
|
if ((!insertBeforeNode && parentNodeRef !== nodeToRelocate.parentNode) ||
|
|
@@ -1620,14 +1760,30 @@ const renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
1620
1760
|
// probably a component in the index.html that doesn't have its hostname set
|
|
1621
1761
|
nodeToRelocate['s-hn'] = nodeToRelocate['s-ol'].parentNode.nodeName;
|
|
1622
1762
|
}
|
|
1623
|
-
//
|
|
1763
|
+
// Add it back to the dom but in its new home
|
|
1764
|
+
// If we get to this point and `insertBeforeNode` is `null`, that means
|
|
1765
|
+
// we're just going to append the node as the last child of the parent. Passing
|
|
1766
|
+
// `null` as the second arg here will trigger that behavior.
|
|
1624
1767
|
parentNodeRef.insertBefore(nodeToRelocate, insertBeforeNode);
|
|
1768
|
+
// Reset the `hidden` value back to what it was defined as originally
|
|
1769
|
+
// This solves a problem where a `slot` is dynamically rendered and `hidden` may have
|
|
1770
|
+
// been set on content originally, but now it has a slot to go to so it should have
|
|
1771
|
+
// the value it was defined as having in the DOM, not what we overrode it to.
|
|
1772
|
+
if (nodeToRelocate.nodeType === 1 /* NODE_TYPE.ElementNode */) {
|
|
1773
|
+
nodeToRelocate.hidden = (_c = nodeToRelocate['s-ih']) !== null && _c !== void 0 ? _c : false;
|
|
1774
|
+
}
|
|
1625
1775
|
}
|
|
1626
1776
|
}
|
|
1777
|
+
nodeToRelocate && typeof slotRefNode['s-rf'] === 'function' && slotRefNode['s-rf'](nodeToRelocate);
|
|
1627
1778
|
}
|
|
1628
1779
|
else {
|
|
1629
1780
|
// this node doesn't have a slot home to go to, so let's hide it
|
|
1630
1781
|
if (nodeToRelocate.nodeType === 1 /* NODE_TYPE.ElementNode */) {
|
|
1782
|
+
// Store the initial value of `hidden` so we can reset it later when
|
|
1783
|
+
// moving nodes around.
|
|
1784
|
+
if (isInitialLoad) {
|
|
1785
|
+
nodeToRelocate['s-ih'] = (_d = nodeToRelocate.hidden) !== null && _d !== void 0 ? _d : false;
|
|
1786
|
+
}
|
|
1631
1787
|
nodeToRelocate.hidden = true;
|
|
1632
1788
|
}
|
|
1633
1789
|
}
|
|
@@ -1642,6 +1798,8 @@ const renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
1642
1798
|
// always reset
|
|
1643
1799
|
relocateNodes.length = 0;
|
|
1644
1800
|
}
|
|
1801
|
+
// Clear the content ref so we don't create a memory leak
|
|
1802
|
+
contentRef = undefined;
|
|
1645
1803
|
};
|
|
1646
1804
|
const attachToAncestor = (hostRef, ancestorComponent) => {
|
|
1647
1805
|
if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent['s-p']) {
|
|
@@ -1790,6 +1948,10 @@ const updateComponent = async (hostRef, instance, isInitialLoad) => {
|
|
|
1790
1948
|
*/
|
|
1791
1949
|
const callRender = (hostRef, instance, elm, isInitialLoad) => {
|
|
1792
1950
|
try {
|
|
1951
|
+
/**
|
|
1952
|
+
* minification optimization: `allRenderFn` is `true` if all components have a `render`
|
|
1953
|
+
* method, so we can call the method immediately. If not, check before calling it.
|
|
1954
|
+
*/
|
|
1793
1955
|
instance = instance.render() ;
|
|
1794
1956
|
{
|
|
1795
1957
|
hostRef.$flags$ &= ~16 /* HOST_FLAGS.isQueuedForUpdate */;
|
|
@@ -1866,6 +2028,16 @@ const appDidLoad = (who) => {
|
|
|
1866
2028
|
}
|
|
1867
2029
|
nextTick(() => emitEvent(win, 'appload', { detail: { namespace: NAMESPACE } }));
|
|
1868
2030
|
};
|
|
2031
|
+
/**
|
|
2032
|
+
* Allows to safely call a method, e.g. `componentDidLoad`, on an instance,
|
|
2033
|
+
* e.g. custom element node. If a build figures out that e.g. no component
|
|
2034
|
+
* has a `componentDidLoad` method, the instance method gets removed from the
|
|
2035
|
+
* output bundle and this function returns `undefined`.
|
|
2036
|
+
* @param instance any object that may or may not contain methods
|
|
2037
|
+
* @param method method name
|
|
2038
|
+
* @param arg single arbitrary argument
|
|
2039
|
+
* @returns result of method call if it exists, otherwise `undefined`
|
|
2040
|
+
*/
|
|
1869
2041
|
const safeCall = (instance, method, arg) => {
|
|
1870
2042
|
if (instance && instance[method]) {
|
|
1871
2043
|
try {
|
|
@@ -1934,13 +2106,13 @@ const setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
1934
2106
|
*/
|
|
1935
2107
|
const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
1936
2108
|
var _a;
|
|
2109
|
+
const prototype = Cstr.prototype;
|
|
1937
2110
|
if (cmpMeta.$members$) {
|
|
1938
2111
|
if (Cstr.watchers) {
|
|
1939
2112
|
cmpMeta.$watchers$ = Cstr.watchers;
|
|
1940
2113
|
}
|
|
1941
2114
|
// It's better to have a const than two Object.entries()
|
|
1942
2115
|
const members = Object.entries(cmpMeta.$members$);
|
|
1943
|
-
const prototype = Cstr.prototype;
|
|
1944
2116
|
members.map(([memberName, [memberFlags]]) => {
|
|
1945
2117
|
if ((memberFlags & 31 /* MEMBER_FLAGS.Prop */ ||
|
|
1946
2118
|
((flags & 2 /* PROXY_FLAGS.proxyState */) && memberFlags & 32 /* MEMBER_FLAGS.State */))) {
|
|
@@ -1963,6 +2135,7 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1963
2135
|
const attrNameToPropName = new Map();
|
|
1964
2136
|
prototype.attributeChangedCallback = function (attrName, oldValue, newValue) {
|
|
1965
2137
|
plt.jmp(() => {
|
|
2138
|
+
var _a;
|
|
1966
2139
|
const propName = attrNameToPropName.get(attrName);
|
|
1967
2140
|
// In a web component lifecycle the attributeChangedCallback runs prior to connectedCallback
|
|
1968
2141
|
// in the case where an attribute was set inline.
|
|
@@ -2018,11 +2191,12 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
2018
2191
|
// 1. The instance is ready
|
|
2019
2192
|
// 2. The watchers are ready
|
|
2020
2193
|
// 3. The value has changed
|
|
2021
|
-
if (
|
|
2194
|
+
if (flags &&
|
|
2195
|
+
!(flags & 8 /* HOST_FLAGS.isConstructingInstance */) &&
|
|
2022
2196
|
flags & 128 /* HOST_FLAGS.isWatchReady */ &&
|
|
2023
2197
|
newValue !== oldValue) {
|
|
2024
2198
|
const instance = hostRef.$lazyInstance$ ;
|
|
2025
|
-
const entry = cmpMeta.$watchers$[attrName];
|
|
2199
|
+
const entry = (_a = cmpMeta.$watchers$) === null || _a === void 0 ? void 0 : _a[attrName];
|
|
2026
2200
|
entry === null || entry === void 0 ? void 0 : entry.forEach((callbackName) => {
|
|
2027
2201
|
if (instance[callbackName] != null) {
|
|
2028
2202
|
instance[callbackName].call(instance, newValue, oldValue, attrName);
|
|
@@ -2044,10 +2218,11 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
2044
2218
|
...members
|
|
2045
2219
|
.filter(([_, m]) => m[0] & 15 /* MEMBER_FLAGS.HasAttribute */)
|
|
2046
2220
|
.map(([propName, m]) => {
|
|
2221
|
+
var _a;
|
|
2047
2222
|
const attrName = m[1] || propName;
|
|
2048
2223
|
attrNameToPropName.set(attrName, propName);
|
|
2049
2224
|
if (m[0] & 512 /* MEMBER_FLAGS.ReflectAttr */) {
|
|
2050
|
-
cmpMeta.$attrsToReflect
|
|
2225
|
+
(_a = cmpMeta.$attrsToReflect$) === null || _a === void 0 ? void 0 : _a.push([propName, attrName]);
|
|
2051
2226
|
}
|
|
2052
2227
|
return attrName;
|
|
2053
2228
|
}),
|
|
@@ -2056,12 +2231,24 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
2056
2231
|
}
|
|
2057
2232
|
return Cstr;
|
|
2058
2233
|
};
|
|
2059
|
-
|
|
2234
|
+
/**
|
|
2235
|
+
* Initialize a Stencil component given a reference to its host element, its
|
|
2236
|
+
* runtime bookkeeping data structure, runtime metadata about the component,
|
|
2237
|
+
* and (optionally) an HMR version ID.
|
|
2238
|
+
*
|
|
2239
|
+
* @param elm a host element
|
|
2240
|
+
* @param hostRef the element's runtime bookkeeping object
|
|
2241
|
+
* @param cmpMeta runtime metadata for the Stencil component
|
|
2242
|
+
* @param hmrVersionId an (optional) HMR version ID
|
|
2243
|
+
*/
|
|
2244
|
+
const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
2245
|
+
let Cstr;
|
|
2060
2246
|
// initializeComponent
|
|
2061
2247
|
if ((hostRef.$flags$ & 32 /* HOST_FLAGS.hasInitializedComponent */) === 0) {
|
|
2062
2248
|
// Let the runtime know that the component has been initialized
|
|
2063
2249
|
hostRef.$flags$ |= 32 /* HOST_FLAGS.hasInitializedComponent */;
|
|
2064
|
-
|
|
2250
|
+
const bundleId = cmpMeta.$lazyBundleId$;
|
|
2251
|
+
if (bundleId) {
|
|
2065
2252
|
// lazy loaded components
|
|
2066
2253
|
// request the component's implementation to be
|
|
2067
2254
|
// wired up with the host element
|
|
@@ -2107,6 +2294,14 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
|
|
|
2107
2294
|
}
|
|
2108
2295
|
endNewInstance();
|
|
2109
2296
|
}
|
|
2297
|
+
else {
|
|
2298
|
+
// sync constructor component
|
|
2299
|
+
Cstr = elm.constructor;
|
|
2300
|
+
// wait for the CustomElementRegistry to mark the component as ready before setting `isWatchReady`. Otherwise,
|
|
2301
|
+
// watchers may fire prematurely if `customElements.get()`/`customElements.whenDefined()` resolves _before_
|
|
2302
|
+
// Stencil has completed instantiating the component.
|
|
2303
|
+
customElements.whenDefined(cmpMeta.$tagName$).then(() => (hostRef.$flags$ |= 128 /* HOST_FLAGS.isWatchReady */));
|
|
2304
|
+
}
|
|
2110
2305
|
if (Cstr.style) {
|
|
2111
2306
|
// this component has styles but we haven't registered them yet
|
|
2112
2307
|
let style = Cstr.style;
|
|
@@ -2243,7 +2438,7 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
2243
2438
|
const customElements = win.customElements;
|
|
2244
2439
|
const head = doc.head;
|
|
2245
2440
|
const metaCharset = /*@__PURE__*/ head.querySelector('meta[charset]');
|
|
2246
|
-
const
|
|
2441
|
+
const dataStyles = /*@__PURE__*/ doc.createElement('style');
|
|
2247
2442
|
const deferredConnectedCallbacks = [];
|
|
2248
2443
|
const styles = /*@__PURE__*/ doc.querySelectorAll(`[${HYDRATED_STYLE_ID}]`);
|
|
2249
2444
|
let appLoadFallback;
|
|
@@ -2261,6 +2456,7 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
2261
2456
|
registerStyle(styles[i].getAttribute(HYDRATED_STYLE_ID), convertScopedToShadow(styles[i].innerHTML), true);
|
|
2262
2457
|
}
|
|
2263
2458
|
}
|
|
2459
|
+
let hasSlotRelocation = false;
|
|
2264
2460
|
lazyBundles.map((lazyBundle) => {
|
|
2265
2461
|
lazyBundle[1].map((compactMeta) => {
|
|
2266
2462
|
var _a;
|
|
@@ -2270,6 +2466,11 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
2270
2466
|
$members$: compactMeta[2],
|
|
2271
2467
|
$listeners$: compactMeta[3],
|
|
2272
2468
|
};
|
|
2469
|
+
// Check if we are using slots outside the shadow DOM in this component.
|
|
2470
|
+
// We'll use this information later to add styles for `slot-fb` elements
|
|
2471
|
+
if (cmpMeta.$flags$ & 4 /* CMP_FLAGS.hasSlotRelocation */) {
|
|
2472
|
+
hasSlotRelocation = true;
|
|
2473
|
+
}
|
|
2273
2474
|
{
|
|
2274
2475
|
cmpMeta.$members$ = compactMeta[2];
|
|
2275
2476
|
}
|
|
@@ -2326,15 +2527,29 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
2326
2527
|
}
|
|
2327
2528
|
});
|
|
2328
2529
|
});
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
//
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
|
|
2530
|
+
// Only bother generating CSS if we have components
|
|
2531
|
+
// TODO(STENCIL-1118): Add test cases for CSS content based on conditionals
|
|
2532
|
+
if (cmpTags.length > 0) {
|
|
2533
|
+
// Add styles for `slot-fb` elements if any of our components are using slots outside the Shadow DOM
|
|
2534
|
+
if (hasSlotRelocation) {
|
|
2535
|
+
dataStyles.textContent += SLOT_FB_CSS;
|
|
2536
|
+
}
|
|
2537
|
+
// Add hydration styles
|
|
2538
|
+
{
|
|
2539
|
+
dataStyles.textContent += cmpTags + HYDRATED_CSS;
|
|
2540
|
+
}
|
|
2541
|
+
// If we have styles, add them to the DOM
|
|
2542
|
+
if (dataStyles.innerHTML.length) {
|
|
2543
|
+
dataStyles.setAttribute('data-styles', '');
|
|
2544
|
+
// Apply CSP nonce to the style tag if it exists
|
|
2545
|
+
const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);
|
|
2546
|
+
if (nonce != null) {
|
|
2547
|
+
dataStyles.setAttribute('nonce', nonce);
|
|
2548
|
+
}
|
|
2549
|
+
// Insert the styles into the document head
|
|
2550
|
+
// NOTE: this _needs_ to happen last so we can ensure the nonce (and other attributes) are applied
|
|
2551
|
+
head.insertBefore(dataStyles, metaCharset ? metaCharset.nextSibling : head.firstChild);
|
|
2336
2552
|
}
|
|
2337
|
-
head.insertBefore(visibilityStyle, metaCharset ? metaCharset.nextSibling : head.firstChild);
|
|
2338
2553
|
}
|
|
2339
2554
|
// Process deferred connectedCallbacks now all components have been registered
|
|
2340
2555
|
isBootstrapping = false;
|
|
@@ -2356,22 +2571,60 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
2356
2571
|
* @returns void
|
|
2357
2572
|
*/
|
|
2358
2573
|
const setNonce = (nonce) => (plt.$nonce$ = nonce);
|
|
2359
|
-
|
|
2574
|
+
/**
|
|
2575
|
+
* A WeakMap mapping runtime component references to their corresponding host reference
|
|
2576
|
+
* instances.
|
|
2577
|
+
*
|
|
2578
|
+
* **Note**: If we're in an HMR context we need to store a reference to this
|
|
2579
|
+
* value on `window` in order to maintain the mapping of {@link d.RuntimeRef}
|
|
2580
|
+
* to {@link d.HostRef} across HMR updates.
|
|
2581
|
+
*
|
|
2582
|
+
* This is necessary because when HMR updates for a component are processed by
|
|
2583
|
+
* the browser-side dev server client the JS bundle for that component is
|
|
2584
|
+
* re-fetched. Since the module containing {@link hostRefs} is included in
|
|
2585
|
+
* that bundle, if we do not store a reference to it the new iteration of the
|
|
2586
|
+
* component will not have access to the previous hostRef map, leading to a
|
|
2587
|
+
* bug where the new version of the component cannot properly initialize.
|
|
2588
|
+
*/
|
|
2589
|
+
const hostRefs = new WeakMap();
|
|
2590
|
+
/**
|
|
2591
|
+
* Given a {@link d.RuntimeRef} retrieve the corresponding {@link d.HostRef}
|
|
2592
|
+
*
|
|
2593
|
+
* @param ref the runtime ref of interest
|
|
2594
|
+
* @returns the Host reference (if found) or undefined
|
|
2595
|
+
*/
|
|
2360
2596
|
const getHostRef = (ref) => hostRefs.get(ref);
|
|
2597
|
+
/**
|
|
2598
|
+
* Register a lazy instance with the {@link hostRefs} object so it's
|
|
2599
|
+
* corresponding {@link d.HostRef} can be retrieved later.
|
|
2600
|
+
*
|
|
2601
|
+
* @param lazyInstance the lazy instance of interest
|
|
2602
|
+
* @param hostRef that instances `HostRef` object
|
|
2603
|
+
* @returns a reference to the host ref WeakMap
|
|
2604
|
+
*/
|
|
2361
2605
|
const registerInstance = (lazyInstance, hostRef) => hostRefs.set((hostRef.$lazyInstance$ = lazyInstance), hostRef);
|
|
2362
|
-
|
|
2606
|
+
/**
|
|
2607
|
+
* Register a host element for a Stencil component, setting up various metadata
|
|
2608
|
+
* and callbacks based on {@link BUILD} flags as well as the component's runtime
|
|
2609
|
+
* metadata.
|
|
2610
|
+
*
|
|
2611
|
+
* @param hostElement the host element to register
|
|
2612
|
+
* @param cmpMeta runtime metadata for that component
|
|
2613
|
+
* @returns a reference to the host ref WeakMap
|
|
2614
|
+
*/
|
|
2615
|
+
const registerHost = (hostElement, cmpMeta) => {
|
|
2363
2616
|
const hostRef = {
|
|
2364
2617
|
$flags$: 0,
|
|
2365
|
-
$hostElement$:
|
|
2618
|
+
$hostElement$: hostElement,
|
|
2366
2619
|
$cmpMeta$: cmpMeta,
|
|
2367
2620
|
$instanceValues$: new Map(),
|
|
2368
2621
|
};
|
|
2369
2622
|
{
|
|
2370
2623
|
hostRef.$onReadyPromise$ = new Promise((r) => (hostRef.$onReadyResolve$ = r));
|
|
2371
|
-
|
|
2372
|
-
|
|
2624
|
+
hostElement['s-p'] = [];
|
|
2625
|
+
hostElement['s-rc'] = [];
|
|
2373
2626
|
}
|
|
2374
|
-
return hostRefs.set(
|
|
2627
|
+
return hostRefs.set(hostElement, hostRef);
|
|
2375
2628
|
};
|
|
2376
2629
|
const isMemberInElement = (elm, memberName) => memberName in elm;
|
|
2377
2630
|
const consoleError = (e, el) => (0, console.error)(e, el);
|
|
@@ -2462,7 +2715,7 @@ const flush = () => {
|
|
|
2462
2715
|
}
|
|
2463
2716
|
}
|
|
2464
2717
|
};
|
|
2465
|
-
const nextTick =
|
|
2718
|
+
const nextTick = (cb) => promiseResolve().then(cb);
|
|
2466
2719
|
const writeTask = /*@__PURE__*/ queueTask(queueDomWrites, true);
|
|
2467
2720
|
|
|
2468
2721
|
exports.Host = Host;
|
|
@@ -2474,4 +2727,4 @@ exports.promiseResolve = promiseResolve;
|
|
|
2474
2727
|
exports.registerInstance = registerInstance;
|
|
2475
2728
|
exports.setNonce = setNonce;
|
|
2476
2729
|
|
|
2477
|
-
//# sourceMappingURL=index-
|
|
2730
|
+
//# sourceMappingURL=index-e2ae280a.js.map
|