@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
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
|
|
3
3
|
*/
|
|
4
4
|
const NAMESPACE = 'peculiar';
|
|
5
|
+
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 };
|
|
5
6
|
|
|
6
7
|
/**
|
|
7
8
|
* Virtual DOM patching algorithm based on Snabbdom by
|
|
@@ -41,6 +42,13 @@ const HYDRATE_ID = 's-id';
|
|
|
41
42
|
const HYDRATED_STYLE_ID = 'sty-id';
|
|
42
43
|
const HYDRATE_CHILD_ID = 'c-id';
|
|
43
44
|
const HYDRATED_CSS = '{visibility:hidden}.hydrated{visibility:inherit}';
|
|
45
|
+
/**
|
|
46
|
+
* Constant for styles to be globally applied to `slot-fb` elements for pseudo-slot behavior.
|
|
47
|
+
*
|
|
48
|
+
* Two cascading rules must be used instead of a `:not()` selector due to Stencil browser
|
|
49
|
+
* support as of Stencil v4.
|
|
50
|
+
*/
|
|
51
|
+
const SLOT_FB_CSS = 'slot-fb{display:contents}slot-fb[hidden]{display:none}';
|
|
44
52
|
const XLINK_NS = 'http://www.w3.org/1999/xlink';
|
|
45
53
|
/**
|
|
46
54
|
* Default style mode id
|
|
@@ -245,6 +253,17 @@ const convertToPrivate = (node) => {
|
|
|
245
253
|
vnode.$name$ = node.vname;
|
|
246
254
|
return vnode;
|
|
247
255
|
};
|
|
256
|
+
/**
|
|
257
|
+
* Entrypoint of the client-side hydration process. Facilitates calls to hydrate the
|
|
258
|
+
* document and all its nodes.
|
|
259
|
+
*
|
|
260
|
+
* This process will also reconstruct the shadow root and slot DOM nodes for components using shadow DOM.
|
|
261
|
+
*
|
|
262
|
+
* @param hostElm The element to hydrate.
|
|
263
|
+
* @param tagName The element's tag name.
|
|
264
|
+
* @param hostId The host ID assigned to the element by the server.
|
|
265
|
+
* @param hostRef The host reference for the element.
|
|
266
|
+
*/
|
|
248
267
|
const initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
|
|
249
268
|
const endHydrate = createTime('hydrateClient', tagName);
|
|
250
269
|
const shadowRoot = hostElm.shadowRoot;
|
|
@@ -262,6 +281,8 @@ const initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
|
|
|
262
281
|
const orgLocationId = c.$hostId$ + '.' + c.$nodeId$;
|
|
263
282
|
const orgLocationNode = plt.$orgLocNodes$.get(orgLocationId);
|
|
264
283
|
const node = c.$elm$;
|
|
284
|
+
// Put the node back in its original location since the native Shadow DOM
|
|
285
|
+
// can handle rendering it its correct location now
|
|
265
286
|
if (orgLocationNode && supportsShadow && orgLocationNode['s-en'] === '') {
|
|
266
287
|
orgLocationNode.parentNode.insertBefore(node, orgLocationNode.nextSibling);
|
|
267
288
|
}
|
|
@@ -283,6 +304,22 @@ const initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
|
|
|
283
304
|
}
|
|
284
305
|
endHydrate();
|
|
285
306
|
};
|
|
307
|
+
/**
|
|
308
|
+
* Recursively constructs the virtual node tree for a host element and its children.
|
|
309
|
+
* The tree is constructed by parsing the annotations set on the nodes by the server.
|
|
310
|
+
*
|
|
311
|
+
* In addition to constructing the vNode tree, we also track information about the node's
|
|
312
|
+
* descendants like which are slots, which should exist in the shadow root, and which
|
|
313
|
+
* are nodes that should be rendered as children of the parent node.
|
|
314
|
+
*
|
|
315
|
+
* @param parentVNode The vNode representing the parent node.
|
|
316
|
+
* @param childRenderNodes An array of all child nodes in the parent's node tree.
|
|
317
|
+
* @param slotNodes An array of all slot nodes in the parent's node tree.
|
|
318
|
+
* @param shadowRootNodes An array all nodes that should be rendered in the shadow root in the parent's node tree.
|
|
319
|
+
* @param hostElm The parent element.
|
|
320
|
+
* @param node The node to construct the vNode tree for.
|
|
321
|
+
* @param hostId The host ID assigned to the element by the server.
|
|
322
|
+
*/
|
|
286
323
|
const clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, node, hostId) => {
|
|
287
324
|
let childNodeType;
|
|
288
325
|
let childIdSplt;
|
|
@@ -427,6 +464,13 @@ const clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes
|
|
|
427
464
|
parentVNode.$children$ = [vnode];
|
|
428
465
|
}
|
|
429
466
|
};
|
|
467
|
+
/**
|
|
468
|
+
* Recursively locate any comments representing an original location for a node in a node's
|
|
469
|
+
* children or shadowRoot children.
|
|
470
|
+
*
|
|
471
|
+
* @param node The node to search.
|
|
472
|
+
* @param orgLocNodes A map of the original location annotation and the current node being searched.
|
|
473
|
+
*/
|
|
430
474
|
const initializeDocumentHydrate = (node, orgLocNodes) => {
|
|
431
475
|
if (node.nodeType === 1 /* NODE_TYPE.ElementNode */) {
|
|
432
476
|
let i = 0;
|
|
@@ -571,6 +615,10 @@ const addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
571
615
|
}
|
|
572
616
|
styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector('link'));
|
|
573
617
|
}
|
|
618
|
+
// Add styles for `slot-fb` elements if we're using slots outside the Shadow DOM
|
|
619
|
+
if (cmpMeta.$flags$ & 4 /* CMP_FLAGS.hasSlotRelocation */) {
|
|
620
|
+
styleElm.innerHTML += SLOT_FB_CSS;
|
|
621
|
+
}
|
|
574
622
|
if (appliedStyles) {
|
|
575
623
|
appliedStyles.add(scopeId);
|
|
576
624
|
}
|
|
@@ -705,11 +753,19 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
705
753
|
// except for the first character, we keep the event name case
|
|
706
754
|
memberName = ln[2] + memberName.slice(3);
|
|
707
755
|
}
|
|
708
|
-
if (oldValue) {
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
756
|
+
if (oldValue || newValue) {
|
|
757
|
+
// Need to account for "capture" events.
|
|
758
|
+
// If the event name ends with "Capture", we'll update the name to remove
|
|
759
|
+
// the "Capture" suffix and make sure the event listener is setup to handle the capture event.
|
|
760
|
+
const capture = memberName.endsWith(CAPTURE_EVENT_SUFFIX);
|
|
761
|
+
// Make sure we only replace the last instance of "Capture"
|
|
762
|
+
memberName = memberName.replace(CAPTURE_EVENT_REGEX, '');
|
|
763
|
+
if (oldValue) {
|
|
764
|
+
plt.rel(elm, memberName, oldValue, capture);
|
|
765
|
+
}
|
|
766
|
+
if (newValue) {
|
|
767
|
+
plt.ael(elm, memberName, newValue, capture);
|
|
768
|
+
}
|
|
713
769
|
}
|
|
714
770
|
}
|
|
715
771
|
else {
|
|
@@ -731,7 +787,11 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
731
787
|
elm[memberName] = newValue;
|
|
732
788
|
}
|
|
733
789
|
}
|
|
734
|
-
catch (e) {
|
|
790
|
+
catch (e) {
|
|
791
|
+
/**
|
|
792
|
+
* in case someone tries to set a read-only property, e.g. "namespaceURI", we just ignore it
|
|
793
|
+
*/
|
|
794
|
+
}
|
|
735
795
|
}
|
|
736
796
|
/**
|
|
737
797
|
* Need to manually update attribute if:
|
|
@@ -770,7 +830,14 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
770
830
|
}
|
|
771
831
|
};
|
|
772
832
|
const parseClassListRegex = /\s/;
|
|
833
|
+
/**
|
|
834
|
+
* Parsed a string of classnames into an array
|
|
835
|
+
* @param value className string, e.g. "foo bar baz"
|
|
836
|
+
* @returns list of classes, e.g. ["foo", "bar", "baz"]
|
|
837
|
+
*/
|
|
773
838
|
const parseClassList = (value) => (!value ? [] : value.split(parseClassListRegex));
|
|
839
|
+
const CAPTURE_EVENT_SUFFIX = 'Capture';
|
|
840
|
+
const CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + '$');
|
|
774
841
|
const updateElement = (oldVnode, newVnode, isSvgMode, memberName) => {
|
|
775
842
|
// if the element passed in is a shadow root, which is a document fragment
|
|
776
843
|
// then we want to be adding attrs/props to the shadow root's "host" element
|
|
@@ -804,6 +871,7 @@ const updateElement = (oldVnode, newVnode, isSvgMode, memberName) => {
|
|
|
804
871
|
* @returns the newly created node
|
|
805
872
|
*/
|
|
806
873
|
const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
874
|
+
var _a;
|
|
807
875
|
// tslint:disable-next-line: prefer-const
|
|
808
876
|
const newVNode = newParentVNode.$children$[childIndex];
|
|
809
877
|
let i = 0;
|
|
@@ -877,8 +945,10 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
877
945
|
}
|
|
878
946
|
}
|
|
879
947
|
}
|
|
948
|
+
// This needs to always happen so we can hide nodes that are projected
|
|
949
|
+
// to another component but don't end up in a slot
|
|
950
|
+
elm['s-hn'] = hostTagName;
|
|
880
951
|
{
|
|
881
|
-
elm['s-hn'] = hostTagName;
|
|
882
952
|
if (newVNode.$flags$ & (2 /* VNODE_FLAGS.isSlotFallback */ | 1 /* VNODE_FLAGS.isSlotReference */)) {
|
|
883
953
|
// remember the content reference comment
|
|
884
954
|
elm['s-sr'] = true;
|
|
@@ -886,12 +956,16 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
886
956
|
elm['s-cr'] = contentRef;
|
|
887
957
|
// remember the slot name, or empty string for default slot
|
|
888
958
|
elm['s-sn'] = newVNode.$name$ || '';
|
|
959
|
+
// remember the ref callback function
|
|
960
|
+
elm['s-rf'] = (_a = newVNode.$attrs$) === null || _a === void 0 ? void 0 : _a.ref;
|
|
889
961
|
// check if we've got an old vnode for this slot
|
|
890
962
|
oldVNode = oldParentVNode && oldParentVNode.$children$ && oldParentVNode.$children$[childIndex];
|
|
891
963
|
if (oldVNode && oldVNode.$tag$ === newVNode.$tag$ && oldParentVNode.$elm$) {
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
964
|
+
{
|
|
965
|
+
// we've got an old slot vnode and the wrapper is being replaced
|
|
966
|
+
// so let's move the old slot content back to its original location
|
|
967
|
+
putBackInOriginalLocation(oldParentVNode.$elm$, false);
|
|
968
|
+
}
|
|
895
969
|
}
|
|
896
970
|
}
|
|
897
971
|
}
|
|
@@ -899,20 +973,27 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
899
973
|
};
|
|
900
974
|
const putBackInOriginalLocation = (parentElm, recursive) => {
|
|
901
975
|
plt.$flags$ |= 1 /* PLATFORM_FLAGS.isTmpDisconnected */;
|
|
902
|
-
const oldSlotChildNodes = parentElm.childNodes;
|
|
976
|
+
const oldSlotChildNodes = Array.from(parentElm.childNodes);
|
|
977
|
+
if (parentElm['s-sr'] && BUILD.experimentalSlotFixes) {
|
|
978
|
+
let node = parentElm;
|
|
979
|
+
while ((node = node.nextSibling)) {
|
|
980
|
+
if (node && node['s-sn'] === parentElm['s-sn'] && node['s-sh'] === hostTagName) {
|
|
981
|
+
oldSlotChildNodes.push(node);
|
|
982
|
+
}
|
|
983
|
+
}
|
|
984
|
+
}
|
|
903
985
|
for (let i = oldSlotChildNodes.length - 1; i >= 0; i--) {
|
|
904
986
|
const childNode = oldSlotChildNodes[i];
|
|
905
987
|
if (childNode['s-hn'] !== hostTagName && childNode['s-ol']) {
|
|
906
|
-
// // this child node in the old element is from another component
|
|
907
|
-
// // remove this node from the old slot's parent
|
|
908
|
-
// childNode.remove();
|
|
909
988
|
// and relocate it back to it's original location
|
|
910
989
|
parentReferenceNode(childNode).insertBefore(childNode, referenceNode(childNode));
|
|
911
990
|
// remove the old original location comment entirely
|
|
912
991
|
// later on the patch function will know what to do
|
|
913
|
-
// and move this to the correct spot
|
|
992
|
+
// and move this to the correct spot if need be
|
|
914
993
|
childNode['s-ol'].remove();
|
|
915
994
|
childNode['s-ol'] = undefined;
|
|
995
|
+
// Reset so we can correctly move the node around again.
|
|
996
|
+
childNode['s-sh'] = undefined;
|
|
916
997
|
checkSlotRelocate = true;
|
|
917
998
|
}
|
|
918
999
|
if (recursive) {
|
|
@@ -1057,8 +1138,9 @@ const removeVnodes = (vnodes, startIdx, endIdx) => {
|
|
|
1057
1138
|
* @param oldCh the old children of the parent node
|
|
1058
1139
|
* @param newVNode the new VNode which will replace the parent
|
|
1059
1140
|
* @param newCh the new children of the parent node
|
|
1141
|
+
* @param isInitialRender whether or not this is the first render of the vdom
|
|
1060
1142
|
*/
|
|
1061
|
-
const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
1143
|
+
const updateChildren = (parentElm, oldCh, newVNode, newCh, isInitialRender = false) => {
|
|
1062
1144
|
let oldStartIdx = 0;
|
|
1063
1145
|
let newStartIdx = 0;
|
|
1064
1146
|
let idxInOld = 0;
|
|
@@ -1085,24 +1167,24 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
|
1085
1167
|
else if (newEndVnode == null) {
|
|
1086
1168
|
newEndVnode = newCh[--newEndIdx];
|
|
1087
1169
|
}
|
|
1088
|
-
else if (isSameVnode(oldStartVnode, newStartVnode)) {
|
|
1170
|
+
else if (isSameVnode(oldStartVnode, newStartVnode, isInitialRender)) {
|
|
1089
1171
|
// if the start nodes are the same then we should patch the new VNode
|
|
1090
1172
|
// onto the old one, and increment our `newStartIdx` and `oldStartIdx`
|
|
1091
1173
|
// indices to reflect that. We don't need to move any DOM Nodes around
|
|
1092
1174
|
// since things are matched up in order.
|
|
1093
|
-
patch(oldStartVnode, newStartVnode);
|
|
1175
|
+
patch(oldStartVnode, newStartVnode, isInitialRender);
|
|
1094
1176
|
oldStartVnode = oldCh[++oldStartIdx];
|
|
1095
1177
|
newStartVnode = newCh[++newStartIdx];
|
|
1096
1178
|
}
|
|
1097
|
-
else if (isSameVnode(oldEndVnode, newEndVnode)) {
|
|
1179
|
+
else if (isSameVnode(oldEndVnode, newEndVnode, isInitialRender)) {
|
|
1098
1180
|
// likewise, if the end nodes are the same we patch new onto old and
|
|
1099
1181
|
// decrement our end indices, and also likewise in this case we don't
|
|
1100
1182
|
// need to move any DOM Nodes.
|
|
1101
|
-
patch(oldEndVnode, newEndVnode);
|
|
1183
|
+
patch(oldEndVnode, newEndVnode, isInitialRender);
|
|
1102
1184
|
oldEndVnode = oldCh[--oldEndIdx];
|
|
1103
1185
|
newEndVnode = newCh[--newEndIdx];
|
|
1104
1186
|
}
|
|
1105
|
-
else if (isSameVnode(oldStartVnode, newEndVnode)) {
|
|
1187
|
+
else if (isSameVnode(oldStartVnode, newEndVnode, isInitialRender)) {
|
|
1106
1188
|
// case: "Vnode moved right"
|
|
1107
1189
|
//
|
|
1108
1190
|
// We've found that the last node in our window on the new children is
|
|
@@ -1120,7 +1202,7 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
|
1120
1202
|
if ((oldStartVnode.$tag$ === 'slot' || newEndVnode.$tag$ === 'slot')) {
|
|
1121
1203
|
putBackInOriginalLocation(oldStartVnode.$elm$.parentNode, false);
|
|
1122
1204
|
}
|
|
1123
|
-
patch(oldStartVnode, newEndVnode);
|
|
1205
|
+
patch(oldStartVnode, newEndVnode, isInitialRender);
|
|
1124
1206
|
// We need to move the element for `oldStartVnode` into a position which
|
|
1125
1207
|
// will be appropriate for `newEndVnode`. For this we can use
|
|
1126
1208
|
// `.insertBefore` and `oldEndVnode.$elm$.nextSibling`. If there is a
|
|
@@ -1142,7 +1224,7 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
|
1142
1224
|
oldStartVnode = oldCh[++oldStartIdx];
|
|
1143
1225
|
newEndVnode = newCh[--newEndIdx];
|
|
1144
1226
|
}
|
|
1145
|
-
else if (isSameVnode(oldEndVnode, newStartVnode)) {
|
|
1227
|
+
else if (isSameVnode(oldEndVnode, newStartVnode, isInitialRender)) {
|
|
1146
1228
|
// case: "Vnode moved left"
|
|
1147
1229
|
//
|
|
1148
1230
|
// We've found that the first node in our window on the new children is
|
|
@@ -1161,7 +1243,7 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
|
1161
1243
|
if ((oldStartVnode.$tag$ === 'slot' || newEndVnode.$tag$ === 'slot')) {
|
|
1162
1244
|
putBackInOriginalLocation(oldEndVnode.$elm$.parentNode, false);
|
|
1163
1245
|
}
|
|
1164
|
-
patch(oldEndVnode, newStartVnode);
|
|
1246
|
+
patch(oldEndVnode, newStartVnode, isInitialRender);
|
|
1165
1247
|
// We've already checked above if `oldStartVnode` and `newStartVnode` are
|
|
1166
1248
|
// the same node, so since we're here we know that they are not. Thus we
|
|
1167
1249
|
// can move the element for `oldEndVnode` _before_ the element for
|
|
@@ -1198,7 +1280,7 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
|
1198
1280
|
node = createElm(oldCh && oldCh[newStartIdx], newVNode, idxInOld, parentElm);
|
|
1199
1281
|
}
|
|
1200
1282
|
else {
|
|
1201
|
-
patch(elmToMove, newStartVnode);
|
|
1283
|
+
patch(elmToMove, newStartVnode, isInitialRender);
|
|
1202
1284
|
// invalidate the matching old node so that we won't try to update it
|
|
1203
1285
|
// again later on
|
|
1204
1286
|
oldCh[idxInOld] = undefined;
|
|
@@ -1249,19 +1331,25 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
|
1249
1331
|
*
|
|
1250
1332
|
* @param leftVNode the first VNode to check
|
|
1251
1333
|
* @param rightVNode the second VNode to check
|
|
1334
|
+
* @param isInitialRender whether or not this is the first render of the vdom
|
|
1252
1335
|
* @returns whether they're equal or not
|
|
1253
1336
|
*/
|
|
1254
|
-
const isSameVnode = (leftVNode, rightVNode) => {
|
|
1337
|
+
const isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
|
|
1255
1338
|
// compare if two vnode to see if they're "technically" the same
|
|
1256
1339
|
// need to have the same element tag, and same key to be the same
|
|
1257
1340
|
if (leftVNode.$tag$ === rightVNode.$tag$) {
|
|
1258
1341
|
if (leftVNode.$tag$ === 'slot') {
|
|
1259
1342
|
return leftVNode.$name$ === rightVNode.$name$;
|
|
1260
1343
|
}
|
|
1261
|
-
// this will be set if
|
|
1262
|
-
|
|
1344
|
+
// this will be set if JSX tags in the build have `key` attrs set on them
|
|
1345
|
+
// we only want to check this if we're not on the first render since on
|
|
1346
|
+
// first render `leftVNode.$key$` will always be `null`, so we can be led
|
|
1347
|
+
// astray and, for instance, accidentally delete a DOM node that we want to
|
|
1348
|
+
// keep around.
|
|
1349
|
+
if (!isInitialRender) {
|
|
1263
1350
|
return leftVNode.$key$ === rightVNode.$key$;
|
|
1264
1351
|
}
|
|
1352
|
+
return true;
|
|
1265
1353
|
}
|
|
1266
1354
|
return false;
|
|
1267
1355
|
};
|
|
@@ -1280,8 +1368,9 @@ const parentReferenceNode = (node) => (node['s-ol'] ? node['s-ol'] : node).paren
|
|
|
1280
1368
|
*
|
|
1281
1369
|
* @param oldVNode an old VNode whose DOM element and children we want to update
|
|
1282
1370
|
* @param newVNode a new VNode representing an updated version of the old one
|
|
1371
|
+
* @param isInitialRender whether or not this is the first render of the vdom
|
|
1283
1372
|
*/
|
|
1284
|
-
const patch = (oldVNode, newVNode) => {
|
|
1373
|
+
const patch = (oldVNode, newVNode, isInitialRender = false) => {
|
|
1285
1374
|
const elm = (newVNode.$elm$ = oldVNode.$elm$);
|
|
1286
1375
|
const oldChildren = oldVNode.$children$;
|
|
1287
1376
|
const newChildren = newVNode.$children$;
|
|
@@ -1295,8 +1384,7 @@ const patch = (oldVNode, newVNode) => {
|
|
|
1295
1384
|
isSvgMode = tag === 'svg' ? true : tag === 'foreignObject' ? false : isSvgMode;
|
|
1296
1385
|
}
|
|
1297
1386
|
{
|
|
1298
|
-
if (tag === 'slot')
|
|
1299
|
-
;
|
|
1387
|
+
if (tag === 'slot' && !useNativeShadowDom) ;
|
|
1300
1388
|
else {
|
|
1301
1389
|
// either this is the first render of an element OR it's an update
|
|
1302
1390
|
// AND we already know it's possible it could have changed
|
|
@@ -1307,7 +1395,7 @@ const patch = (oldVNode, newVNode) => {
|
|
|
1307
1395
|
if (oldChildren !== null && newChildren !== null) {
|
|
1308
1396
|
// looks like there's child vnodes for both the old and new vnodes
|
|
1309
1397
|
// so we need to call `updateChildren` to reconcile them
|
|
1310
|
-
updateChildren(elm, oldChildren, newVNode, newChildren);
|
|
1398
|
+
updateChildren(elm, oldChildren, newVNode, newChildren, isInitialRender);
|
|
1311
1399
|
}
|
|
1312
1400
|
else if (newChildren !== null) {
|
|
1313
1401
|
// no old child vnodes, but there are new child vnodes to add
|
|
@@ -1336,42 +1424,53 @@ const patch = (oldVNode, newVNode) => {
|
|
|
1336
1424
|
elm.data = text;
|
|
1337
1425
|
}
|
|
1338
1426
|
};
|
|
1427
|
+
/**
|
|
1428
|
+
* Adjust the `.hidden` property as-needed on any nodes in a DOM subtree which
|
|
1429
|
+
* are slot fallbacks nodes.
|
|
1430
|
+
*
|
|
1431
|
+
* A slot fallback node should be visible by default. Then, it should be
|
|
1432
|
+
* conditionally hidden if:
|
|
1433
|
+
*
|
|
1434
|
+
* - it has a sibling with a `slot` property set to its slot name or if
|
|
1435
|
+
* - it is a default fallback slot node, in which case we hide if it has any
|
|
1436
|
+
* content
|
|
1437
|
+
*
|
|
1438
|
+
* @param elm the element of interest
|
|
1439
|
+
*/
|
|
1339
1440
|
const updateFallbackSlotVisibility = (elm) => {
|
|
1340
|
-
// tslint:disable-next-line: prefer-const
|
|
1341
1441
|
const childNodes = elm.childNodes;
|
|
1342
|
-
|
|
1343
|
-
let i;
|
|
1344
|
-
let ilen;
|
|
1345
|
-
let j;
|
|
1346
|
-
let slotNameAttr;
|
|
1347
|
-
let nodeType;
|
|
1348
|
-
for (i = 0, ilen = childNodes.length; i < ilen; i++) {
|
|
1349
|
-
childNode = childNodes[i];
|
|
1442
|
+
for (const childNode of childNodes) {
|
|
1350
1443
|
if (childNode.nodeType === 1 /* NODE_TYPE.ElementNode */) {
|
|
1351
1444
|
if (childNode['s-sr']) {
|
|
1352
1445
|
// this is a slot fallback node
|
|
1353
1446
|
// get the slot name for this slot reference node
|
|
1354
|
-
|
|
1447
|
+
const slotName = childNode['s-sn'];
|
|
1355
1448
|
// by default always show a fallback slot node
|
|
1356
1449
|
// then hide it if there are other slots in the light dom
|
|
1357
1450
|
childNode.hidden = false;
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1451
|
+
// we need to check all of its sibling nodes in order to see if
|
|
1452
|
+
// `childNode` should be hidden
|
|
1453
|
+
for (const siblingNode of childNodes) {
|
|
1454
|
+
// Don't check the node against itself
|
|
1455
|
+
if (siblingNode !== childNode) {
|
|
1456
|
+
if (siblingNode['s-hn'] !== childNode['s-hn'] || slotName !== '') {
|
|
1457
|
+
// this sibling node is from a different component OR is a named
|
|
1458
|
+
// fallback slot node
|
|
1459
|
+
if (siblingNode.nodeType === 1 /* NODE_TYPE.ElementNode */ &&
|
|
1460
|
+
(slotName === siblingNode.getAttribute('slot') || slotName === siblingNode['s-sn'])) {
|
|
1461
|
+
childNode.hidden = true;
|
|
1462
|
+
break;
|
|
1463
|
+
}
|
|
1365
1464
|
}
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1465
|
+
else {
|
|
1466
|
+
// this is a default fallback slot node
|
|
1467
|
+
// any element or text node (with content)
|
|
1468
|
+
// should hide the default fallback slot node
|
|
1469
|
+
if (siblingNode.nodeType === 1 /* NODE_TYPE.ElementNode */ ||
|
|
1470
|
+
(siblingNode.nodeType === 3 /* NODE_TYPE.TextNode */ && siblingNode.textContent.trim() !== '')) {
|
|
1471
|
+
childNode.hidden = true;
|
|
1472
|
+
break;
|
|
1473
|
+
}
|
|
1375
1474
|
}
|
|
1376
1475
|
}
|
|
1377
1476
|
}
|
|
@@ -1381,45 +1480,67 @@ const updateFallbackSlotVisibility = (elm) => {
|
|
|
1381
1480
|
}
|
|
1382
1481
|
}
|
|
1383
1482
|
};
|
|
1483
|
+
/**
|
|
1484
|
+
* Component-global information about nodes which are either currently being
|
|
1485
|
+
* relocated or will be shortly.
|
|
1486
|
+
*/
|
|
1384
1487
|
const relocateNodes = [];
|
|
1385
|
-
|
|
1488
|
+
/**
|
|
1489
|
+
* Mark the contents of a slot for relocation via adding references to them to
|
|
1490
|
+
* the {@link relocateNodes} data structure. The actual work of relocating them
|
|
1491
|
+
* will then be handled in {@link renderVdom}.
|
|
1492
|
+
*
|
|
1493
|
+
* @param elm a render node whose child nodes need to be relocated
|
|
1494
|
+
*/
|
|
1495
|
+
const markSlotContentForRelocation = (elm) => {
|
|
1386
1496
|
// tslint:disable-next-line: prefer-const
|
|
1387
|
-
let childNode;
|
|
1388
1497
|
let node;
|
|
1389
1498
|
let hostContentNodes;
|
|
1390
|
-
let slotNameAttr;
|
|
1391
|
-
let relocateNodeData;
|
|
1392
1499
|
let j;
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
for (; i < ilen; i++) {
|
|
1397
|
-
childNode = childNodes[i];
|
|
1500
|
+
for (const childNode of elm.childNodes) {
|
|
1501
|
+
// we need to find child nodes which are slot references so we can then try
|
|
1502
|
+
// to match them up with nodes that need to be relocated
|
|
1398
1503
|
if (childNode['s-sr'] && (node = childNode['s-cr']) && node.parentNode) {
|
|
1399
|
-
// first
|
|
1400
|
-
//
|
|
1504
|
+
// first get the content reference comment node ('s-cr'), then we get
|
|
1505
|
+
// its parent, which is where all the host content is now
|
|
1401
1506
|
hostContentNodes = node.parentNode.childNodes;
|
|
1402
|
-
|
|
1507
|
+
const slotName = childNode['s-sn'];
|
|
1508
|
+
// iterate through all the nodes under the location where the host was
|
|
1509
|
+
// originally rendered
|
|
1403
1510
|
for (j = hostContentNodes.length - 1; j >= 0; j--) {
|
|
1404
1511
|
node = hostContentNodes[j];
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1512
|
+
// check that the node is not a content reference node or a node
|
|
1513
|
+
// reference and then check that the host name does not match that of
|
|
1514
|
+
// childNode.
|
|
1515
|
+
// In addition, check that the slot either has not already been relocated, or
|
|
1516
|
+
// that its current location's host is not childNode's host. This is essentially
|
|
1517
|
+
// a check so that we don't try to relocate (and then hide) a node that is already
|
|
1518
|
+
// where it should be.
|
|
1519
|
+
if (!node['s-cn'] &&
|
|
1520
|
+
!node['s-nr'] &&
|
|
1521
|
+
node['s-hn'] !== childNode['s-hn'] &&
|
|
1522
|
+
(!BUILD.experimentalSlotFixes )) {
|
|
1523
|
+
// if `node` is located in the slot that `childNode` refers to (via the
|
|
1524
|
+
// `'s-sn'` property) then we need to relocate it from it's current spot
|
|
1525
|
+
// (under the host element parent) to the right slot location
|
|
1526
|
+
if (isNodeLocatedInSlot(node, slotName)) {
|
|
1410
1527
|
// it's possible we've already decided to relocate this node
|
|
1411
|
-
relocateNodeData = relocateNodes.find((r) => r.$nodeToRelocate$ === node);
|
|
1528
|
+
let relocateNodeData = relocateNodes.find((r) => r.$nodeToRelocate$ === node);
|
|
1412
1529
|
// made some changes to slots
|
|
1413
1530
|
// let's make sure we also double check
|
|
1414
1531
|
// fallbacks are correctly hidden or shown
|
|
1415
1532
|
checkSlotFallbackVisibility = true;
|
|
1416
|
-
|
|
1533
|
+
// ensure that the slot-name attr is correct
|
|
1534
|
+
node['s-sn'] = node['s-sn'] || slotName;
|
|
1417
1535
|
if (relocateNodeData) {
|
|
1418
|
-
|
|
1419
|
-
//
|
|
1536
|
+
relocateNodeData.$nodeToRelocate$['s-sh'] = childNode['s-hn'];
|
|
1537
|
+
// we marked this node for relocation previously but didn't find
|
|
1538
|
+
// out the slot reference node to which it needs to be relocated
|
|
1539
|
+
// so write it down now!
|
|
1420
1540
|
relocateNodeData.$slotRefNode$ = childNode;
|
|
1421
1541
|
}
|
|
1422
1542
|
else {
|
|
1543
|
+
node['s-sh'] = childNode['s-hn'];
|
|
1423
1544
|
// add to our list of nodes to relocate
|
|
1424
1545
|
relocateNodes.push({
|
|
1425
1546
|
$slotRefNode$: childNode,
|
|
@@ -1438,8 +1559,10 @@ const relocateSlotContent = (elm) => {
|
|
|
1438
1559
|
}
|
|
1439
1560
|
}
|
|
1440
1561
|
else if (!relocateNodes.some((r) => r.$nodeToRelocate$ === node)) {
|
|
1441
|
-
//
|
|
1442
|
-
//
|
|
1562
|
+
// the node is not found within the slot (`childNode`) that we're
|
|
1563
|
+
// currently looking at, so we stick it into `relocateNodes` to
|
|
1564
|
+
// handle later. If we never find a home for this element then
|
|
1565
|
+
// we'll need to hide it
|
|
1443
1566
|
relocateNodes.push({
|
|
1444
1567
|
$nodeToRelocate$: node,
|
|
1445
1568
|
});
|
|
@@ -1447,30 +1570,41 @@ const relocateSlotContent = (elm) => {
|
|
|
1447
1570
|
}
|
|
1448
1571
|
}
|
|
1449
1572
|
}
|
|
1573
|
+
// if we're dealing with any type of element (capable of itself being a
|
|
1574
|
+
// slot reference or containing one) then we recur
|
|
1450
1575
|
if (childNode.nodeType === 1 /* NODE_TYPE.ElementNode */) {
|
|
1451
|
-
|
|
1576
|
+
markSlotContentForRelocation(childNode);
|
|
1452
1577
|
}
|
|
1453
1578
|
}
|
|
1454
1579
|
};
|
|
1455
|
-
|
|
1580
|
+
/**
|
|
1581
|
+
* Check whether a node is located in a given named slot.
|
|
1582
|
+
*
|
|
1583
|
+
* @param nodeToRelocate the node of interest
|
|
1584
|
+
* @param slotName the slot name to check
|
|
1585
|
+
* @returns whether the node is located in the slot or not
|
|
1586
|
+
*/
|
|
1587
|
+
const isNodeLocatedInSlot = (nodeToRelocate, slotName) => {
|
|
1456
1588
|
if (nodeToRelocate.nodeType === 1 /* NODE_TYPE.ElementNode */) {
|
|
1457
|
-
if (nodeToRelocate.getAttribute('slot') === null &&
|
|
1589
|
+
if (nodeToRelocate.getAttribute('slot') === null && slotName === '') {
|
|
1590
|
+
// if the node doesn't have a slot attribute, and the slot we're checking
|
|
1591
|
+
// is not a named slot, then we assume the node should be within the slot
|
|
1458
1592
|
return true;
|
|
1459
1593
|
}
|
|
1460
|
-
if (nodeToRelocate.getAttribute('slot') ===
|
|
1594
|
+
if (nodeToRelocate.getAttribute('slot') === slotName) {
|
|
1461
1595
|
return true;
|
|
1462
1596
|
}
|
|
1463
1597
|
return false;
|
|
1464
1598
|
}
|
|
1465
|
-
if (nodeToRelocate['s-sn'] ===
|
|
1599
|
+
if (nodeToRelocate['s-sn'] === slotName) {
|
|
1466
1600
|
return true;
|
|
1467
1601
|
}
|
|
1468
|
-
return
|
|
1602
|
+
return slotName === '';
|
|
1469
1603
|
};
|
|
1470
1604
|
/**
|
|
1471
|
-
* 'Nullify' any VDom `ref` callbacks on a VDom node or its children by
|
|
1472
|
-
*
|
|
1473
|
-
*
|
|
1605
|
+
* 'Nullify' any VDom `ref` callbacks on a VDom node or its children by calling
|
|
1606
|
+
* them with `null`. This signals that the DOM element corresponding to the VDom
|
|
1607
|
+
* node has been removed from the DOM.
|
|
1474
1608
|
*
|
|
1475
1609
|
* @param vNode a virtual DOM node
|
|
1476
1610
|
*/
|
|
@@ -1494,6 +1628,7 @@ const nullifyVNodeRefs = (vNode) => {
|
|
|
1494
1628
|
* @param isInitialLoad whether or not this is the first call after page load
|
|
1495
1629
|
*/
|
|
1496
1630
|
const renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
1631
|
+
var _a, _b, _c, _d;
|
|
1497
1632
|
const hostElm = hostRef.$hostElement$;
|
|
1498
1633
|
const cmpMeta = hostRef.$cmpMeta$;
|
|
1499
1634
|
const oldVNode = hostRef.$vnode$ || newVNode(null, null);
|
|
@@ -1536,56 +1671,61 @@ const renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
1536
1671
|
{
|
|
1537
1672
|
scopeId = hostElm['s-sc'];
|
|
1538
1673
|
}
|
|
1674
|
+
useNativeShadowDom = (cmpMeta.$flags$ & 1 /* CMP_FLAGS.shadowDomEncapsulation */) !== 0;
|
|
1539
1675
|
{
|
|
1540
1676
|
contentRef = hostElm['s-cr'];
|
|
1541
|
-
useNativeShadowDom = (cmpMeta.$flags$ & 1 /* CMP_FLAGS.shadowDomEncapsulation */) !== 0;
|
|
1542
1677
|
// always reset
|
|
1543
1678
|
checkSlotFallbackVisibility = false;
|
|
1544
1679
|
}
|
|
1545
1680
|
// synchronous patch
|
|
1546
|
-
patch(oldVNode, rootVnode);
|
|
1681
|
+
patch(oldVNode, rootVnode, isInitialLoad);
|
|
1547
1682
|
{
|
|
1548
1683
|
// while we're moving nodes around existing nodes, temporarily disable
|
|
1549
1684
|
// the disconnectCallback from working
|
|
1550
1685
|
plt.$flags$ |= 1 /* PLATFORM_FLAGS.isTmpDisconnected */;
|
|
1551
1686
|
if (checkSlotRelocate) {
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
let orgLocationNode;
|
|
1556
|
-
let parentNodeRef;
|
|
1557
|
-
let insertBeforeNode;
|
|
1558
|
-
let refNode;
|
|
1559
|
-
let i = 0;
|
|
1560
|
-
for (; i < relocateNodes.length; i++) {
|
|
1561
|
-
relocateData = relocateNodes[i];
|
|
1562
|
-
nodeToRelocate = relocateData.$nodeToRelocate$;
|
|
1687
|
+
markSlotContentForRelocation(rootVnode.$elm$);
|
|
1688
|
+
for (const relocateData of relocateNodes) {
|
|
1689
|
+
const nodeToRelocate = relocateData.$nodeToRelocate$;
|
|
1563
1690
|
if (!nodeToRelocate['s-ol']) {
|
|
1564
1691
|
// add a reference node marking this node's original location
|
|
1565
1692
|
// keep a reference to this node for later lookups
|
|
1566
|
-
orgLocationNode =
|
|
1567
|
-
doc.createTextNode('');
|
|
1693
|
+
const orgLocationNode = doc.createTextNode('');
|
|
1568
1694
|
orgLocationNode['s-nr'] = nodeToRelocate;
|
|
1569
1695
|
nodeToRelocate.parentNode.insertBefore((nodeToRelocate['s-ol'] = orgLocationNode), nodeToRelocate);
|
|
1570
1696
|
}
|
|
1571
1697
|
}
|
|
1572
|
-
for (
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
if (
|
|
1576
|
-
|
|
1577
|
-
//
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1698
|
+
for (const relocateData of relocateNodes) {
|
|
1699
|
+
const nodeToRelocate = relocateData.$nodeToRelocate$;
|
|
1700
|
+
const slotRefNode = relocateData.$slotRefNode$;
|
|
1701
|
+
if (slotRefNode) {
|
|
1702
|
+
const parentNodeRef = slotRefNode.parentNode;
|
|
1703
|
+
// When determining where to insert content, the most simple case would be
|
|
1704
|
+
// to relocate the node immediately following the slot reference node. We do this
|
|
1705
|
+
// by getting a reference to the node immediately following the slot reference node
|
|
1706
|
+
// since we will use `insertBefore` to manipulate the DOM.
|
|
1707
|
+
//
|
|
1708
|
+
// If there is no node immediately following the slot reference node, then we will just
|
|
1709
|
+
// end up appending the node as the last child of the parent.
|
|
1710
|
+
let insertBeforeNode = slotRefNode.nextSibling;
|
|
1711
|
+
// If the node we're currently planning on inserting the new node before is an element,
|
|
1712
|
+
// we need to do some additional checks to make sure we're inserting the node in the correct order.
|
|
1713
|
+
// The use case here would be that we have multiple nodes being relocated to the same slot. So, we want
|
|
1714
|
+
// to make sure they get inserted into their new home in the same order they were declared in their original location.
|
|
1715
|
+
//
|
|
1716
|
+
// TODO(STENCIL-914): Remove `experimentalSlotFixes` check
|
|
1717
|
+
{
|
|
1718
|
+
let orgLocationNode = (_a = nodeToRelocate['s-ol']) === null || _a === void 0 ? void 0 : _a.previousSibling;
|
|
1719
|
+
while (orgLocationNode) {
|
|
1720
|
+
let refNode = (_b = orgLocationNode['s-nr']) !== null && _b !== void 0 ? _b : null;
|
|
1721
|
+
if (refNode && refNode['s-sn'] === nodeToRelocate['s-sn'] && parentNodeRef === refNode.parentNode) {
|
|
1722
|
+
refNode = refNode.nextSibling;
|
|
1723
|
+
if (!refNode || !refNode['s-nr']) {
|
|
1724
|
+
insertBeforeNode = refNode;
|
|
1725
|
+
break;
|
|
1726
|
+
}
|
|
1588
1727
|
}
|
|
1728
|
+
orgLocationNode = orgLocationNode.previousSibling;
|
|
1589
1729
|
}
|
|
1590
1730
|
}
|
|
1591
1731
|
if ((!insertBeforeNode && parentNodeRef !== nodeToRelocate.parentNode) ||
|
|
@@ -1598,14 +1738,30 @@ const renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
1598
1738
|
// probably a component in the index.html that doesn't have its hostname set
|
|
1599
1739
|
nodeToRelocate['s-hn'] = nodeToRelocate['s-ol'].parentNode.nodeName;
|
|
1600
1740
|
}
|
|
1601
|
-
//
|
|
1741
|
+
// Add it back to the dom but in its new home
|
|
1742
|
+
// If we get to this point and `insertBeforeNode` is `null`, that means
|
|
1743
|
+
// we're just going to append the node as the last child of the parent. Passing
|
|
1744
|
+
// `null` as the second arg here will trigger that behavior.
|
|
1602
1745
|
parentNodeRef.insertBefore(nodeToRelocate, insertBeforeNode);
|
|
1746
|
+
// Reset the `hidden` value back to what it was defined as originally
|
|
1747
|
+
// This solves a problem where a `slot` is dynamically rendered and `hidden` may have
|
|
1748
|
+
// been set on content originally, but now it has a slot to go to so it should have
|
|
1749
|
+
// the value it was defined as having in the DOM, not what we overrode it to.
|
|
1750
|
+
if (nodeToRelocate.nodeType === 1 /* NODE_TYPE.ElementNode */) {
|
|
1751
|
+
nodeToRelocate.hidden = (_c = nodeToRelocate['s-ih']) !== null && _c !== void 0 ? _c : false;
|
|
1752
|
+
}
|
|
1603
1753
|
}
|
|
1604
1754
|
}
|
|
1755
|
+
nodeToRelocate && typeof slotRefNode['s-rf'] === 'function' && slotRefNode['s-rf'](nodeToRelocate);
|
|
1605
1756
|
}
|
|
1606
1757
|
else {
|
|
1607
1758
|
// this node doesn't have a slot home to go to, so let's hide it
|
|
1608
1759
|
if (nodeToRelocate.nodeType === 1 /* NODE_TYPE.ElementNode */) {
|
|
1760
|
+
// Store the initial value of `hidden` so we can reset it later when
|
|
1761
|
+
// moving nodes around.
|
|
1762
|
+
if (isInitialLoad) {
|
|
1763
|
+
nodeToRelocate['s-ih'] = (_d = nodeToRelocate.hidden) !== null && _d !== void 0 ? _d : false;
|
|
1764
|
+
}
|
|
1609
1765
|
nodeToRelocate.hidden = true;
|
|
1610
1766
|
}
|
|
1611
1767
|
}
|
|
@@ -1620,6 +1776,8 @@ const renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
1620
1776
|
// always reset
|
|
1621
1777
|
relocateNodes.length = 0;
|
|
1622
1778
|
}
|
|
1779
|
+
// Clear the content ref so we don't create a memory leak
|
|
1780
|
+
contentRef = undefined;
|
|
1623
1781
|
};
|
|
1624
1782
|
const attachToAncestor = (hostRef, ancestorComponent) => {
|
|
1625
1783
|
if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent['s-p']) {
|
|
@@ -1768,6 +1926,10 @@ const updateComponent = async (hostRef, instance, isInitialLoad) => {
|
|
|
1768
1926
|
*/
|
|
1769
1927
|
const callRender = (hostRef, instance, elm, isInitialLoad) => {
|
|
1770
1928
|
try {
|
|
1929
|
+
/**
|
|
1930
|
+
* minification optimization: `allRenderFn` is `true` if all components have a `render`
|
|
1931
|
+
* method, so we can call the method immediately. If not, check before calling it.
|
|
1932
|
+
*/
|
|
1771
1933
|
instance = instance.render() ;
|
|
1772
1934
|
{
|
|
1773
1935
|
hostRef.$flags$ &= ~16 /* HOST_FLAGS.isQueuedForUpdate */;
|
|
@@ -1844,6 +2006,16 @@ const appDidLoad = (who) => {
|
|
|
1844
2006
|
}
|
|
1845
2007
|
nextTick(() => emitEvent(win, 'appload', { detail: { namespace: NAMESPACE } }));
|
|
1846
2008
|
};
|
|
2009
|
+
/**
|
|
2010
|
+
* Allows to safely call a method, e.g. `componentDidLoad`, on an instance,
|
|
2011
|
+
* e.g. custom element node. If a build figures out that e.g. no component
|
|
2012
|
+
* has a `componentDidLoad` method, the instance method gets removed from the
|
|
2013
|
+
* output bundle and this function returns `undefined`.
|
|
2014
|
+
* @param instance any object that may or may not contain methods
|
|
2015
|
+
* @param method method name
|
|
2016
|
+
* @param arg single arbitrary argument
|
|
2017
|
+
* @returns result of method call if it exists, otherwise `undefined`
|
|
2018
|
+
*/
|
|
1847
2019
|
const safeCall = (instance, method, arg) => {
|
|
1848
2020
|
if (instance && instance[method]) {
|
|
1849
2021
|
try {
|
|
@@ -1912,13 +2084,13 @@ const setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
1912
2084
|
*/
|
|
1913
2085
|
const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
1914
2086
|
var _a;
|
|
2087
|
+
const prototype = Cstr.prototype;
|
|
1915
2088
|
if (cmpMeta.$members$) {
|
|
1916
2089
|
if (Cstr.watchers) {
|
|
1917
2090
|
cmpMeta.$watchers$ = Cstr.watchers;
|
|
1918
2091
|
}
|
|
1919
2092
|
// It's better to have a const than two Object.entries()
|
|
1920
2093
|
const members = Object.entries(cmpMeta.$members$);
|
|
1921
|
-
const prototype = Cstr.prototype;
|
|
1922
2094
|
members.map(([memberName, [memberFlags]]) => {
|
|
1923
2095
|
if ((memberFlags & 31 /* MEMBER_FLAGS.Prop */ ||
|
|
1924
2096
|
((flags & 2 /* PROXY_FLAGS.proxyState */) && memberFlags & 32 /* MEMBER_FLAGS.State */))) {
|
|
@@ -1941,6 +2113,7 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1941
2113
|
const attrNameToPropName = new Map();
|
|
1942
2114
|
prototype.attributeChangedCallback = function (attrName, oldValue, newValue) {
|
|
1943
2115
|
plt.jmp(() => {
|
|
2116
|
+
var _a;
|
|
1944
2117
|
const propName = attrNameToPropName.get(attrName);
|
|
1945
2118
|
// In a web component lifecycle the attributeChangedCallback runs prior to connectedCallback
|
|
1946
2119
|
// in the case where an attribute was set inline.
|
|
@@ -1996,11 +2169,12 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1996
2169
|
// 1. The instance is ready
|
|
1997
2170
|
// 2. The watchers are ready
|
|
1998
2171
|
// 3. The value has changed
|
|
1999
|
-
if (
|
|
2172
|
+
if (flags &&
|
|
2173
|
+
!(flags & 8 /* HOST_FLAGS.isConstructingInstance */) &&
|
|
2000
2174
|
flags & 128 /* HOST_FLAGS.isWatchReady */ &&
|
|
2001
2175
|
newValue !== oldValue) {
|
|
2002
2176
|
const instance = hostRef.$lazyInstance$ ;
|
|
2003
|
-
const entry = cmpMeta.$watchers$[attrName];
|
|
2177
|
+
const entry = (_a = cmpMeta.$watchers$) === null || _a === void 0 ? void 0 : _a[attrName];
|
|
2004
2178
|
entry === null || entry === void 0 ? void 0 : entry.forEach((callbackName) => {
|
|
2005
2179
|
if (instance[callbackName] != null) {
|
|
2006
2180
|
instance[callbackName].call(instance, newValue, oldValue, attrName);
|
|
@@ -2022,10 +2196,11 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
2022
2196
|
...members
|
|
2023
2197
|
.filter(([_, m]) => m[0] & 15 /* MEMBER_FLAGS.HasAttribute */)
|
|
2024
2198
|
.map(([propName, m]) => {
|
|
2199
|
+
var _a;
|
|
2025
2200
|
const attrName = m[1] || propName;
|
|
2026
2201
|
attrNameToPropName.set(attrName, propName);
|
|
2027
2202
|
if (m[0] & 512 /* MEMBER_FLAGS.ReflectAttr */) {
|
|
2028
|
-
cmpMeta.$attrsToReflect
|
|
2203
|
+
(_a = cmpMeta.$attrsToReflect$) === null || _a === void 0 ? void 0 : _a.push([propName, attrName]);
|
|
2029
2204
|
}
|
|
2030
2205
|
return attrName;
|
|
2031
2206
|
}),
|
|
@@ -2034,12 +2209,24 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
2034
2209
|
}
|
|
2035
2210
|
return Cstr;
|
|
2036
2211
|
};
|
|
2037
|
-
|
|
2212
|
+
/**
|
|
2213
|
+
* Initialize a Stencil component given a reference to its host element, its
|
|
2214
|
+
* runtime bookkeeping data structure, runtime metadata about the component,
|
|
2215
|
+
* and (optionally) an HMR version ID.
|
|
2216
|
+
*
|
|
2217
|
+
* @param elm a host element
|
|
2218
|
+
* @param hostRef the element's runtime bookkeeping object
|
|
2219
|
+
* @param cmpMeta runtime metadata for the Stencil component
|
|
2220
|
+
* @param hmrVersionId an (optional) HMR version ID
|
|
2221
|
+
*/
|
|
2222
|
+
const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
2223
|
+
let Cstr;
|
|
2038
2224
|
// initializeComponent
|
|
2039
2225
|
if ((hostRef.$flags$ & 32 /* HOST_FLAGS.hasInitializedComponent */) === 0) {
|
|
2040
2226
|
// Let the runtime know that the component has been initialized
|
|
2041
2227
|
hostRef.$flags$ |= 32 /* HOST_FLAGS.hasInitializedComponent */;
|
|
2042
|
-
|
|
2228
|
+
const bundleId = cmpMeta.$lazyBundleId$;
|
|
2229
|
+
if (bundleId) {
|
|
2043
2230
|
// lazy loaded components
|
|
2044
2231
|
// request the component's implementation to be
|
|
2045
2232
|
// wired up with the host element
|
|
@@ -2085,6 +2272,14 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
|
|
|
2085
2272
|
}
|
|
2086
2273
|
endNewInstance();
|
|
2087
2274
|
}
|
|
2275
|
+
else {
|
|
2276
|
+
// sync constructor component
|
|
2277
|
+
Cstr = elm.constructor;
|
|
2278
|
+
// wait for the CustomElementRegistry to mark the component as ready before setting `isWatchReady`. Otherwise,
|
|
2279
|
+
// watchers may fire prematurely if `customElements.get()`/`customElements.whenDefined()` resolves _before_
|
|
2280
|
+
// Stencil has completed instantiating the component.
|
|
2281
|
+
customElements.whenDefined(cmpMeta.$tagName$).then(() => (hostRef.$flags$ |= 128 /* HOST_FLAGS.isWatchReady */));
|
|
2282
|
+
}
|
|
2088
2283
|
if (Cstr.style) {
|
|
2089
2284
|
// this component has styles but we haven't registered them yet
|
|
2090
2285
|
let style = Cstr.style;
|
|
@@ -2221,7 +2416,7 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
2221
2416
|
const customElements = win.customElements;
|
|
2222
2417
|
const head = doc.head;
|
|
2223
2418
|
const metaCharset = /*@__PURE__*/ head.querySelector('meta[charset]');
|
|
2224
|
-
const
|
|
2419
|
+
const dataStyles = /*@__PURE__*/ doc.createElement('style');
|
|
2225
2420
|
const deferredConnectedCallbacks = [];
|
|
2226
2421
|
const styles = /*@__PURE__*/ doc.querySelectorAll(`[${HYDRATED_STYLE_ID}]`);
|
|
2227
2422
|
let appLoadFallback;
|
|
@@ -2239,6 +2434,7 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
2239
2434
|
registerStyle(styles[i].getAttribute(HYDRATED_STYLE_ID), convertScopedToShadow(styles[i].innerHTML), true);
|
|
2240
2435
|
}
|
|
2241
2436
|
}
|
|
2437
|
+
let hasSlotRelocation = false;
|
|
2242
2438
|
lazyBundles.map((lazyBundle) => {
|
|
2243
2439
|
lazyBundle[1].map((compactMeta) => {
|
|
2244
2440
|
var _a;
|
|
@@ -2248,6 +2444,11 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
2248
2444
|
$members$: compactMeta[2],
|
|
2249
2445
|
$listeners$: compactMeta[3],
|
|
2250
2446
|
};
|
|
2447
|
+
// Check if we are using slots outside the shadow DOM in this component.
|
|
2448
|
+
// We'll use this information later to add styles for `slot-fb` elements
|
|
2449
|
+
if (cmpMeta.$flags$ & 4 /* CMP_FLAGS.hasSlotRelocation */) {
|
|
2450
|
+
hasSlotRelocation = true;
|
|
2451
|
+
}
|
|
2251
2452
|
{
|
|
2252
2453
|
cmpMeta.$members$ = compactMeta[2];
|
|
2253
2454
|
}
|
|
@@ -2304,15 +2505,29 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
2304
2505
|
}
|
|
2305
2506
|
});
|
|
2306
2507
|
});
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
//
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2508
|
+
// Only bother generating CSS if we have components
|
|
2509
|
+
// TODO(STENCIL-1118): Add test cases for CSS content based on conditionals
|
|
2510
|
+
if (cmpTags.length > 0) {
|
|
2511
|
+
// Add styles for `slot-fb` elements if any of our components are using slots outside the Shadow DOM
|
|
2512
|
+
if (hasSlotRelocation) {
|
|
2513
|
+
dataStyles.textContent += SLOT_FB_CSS;
|
|
2514
|
+
}
|
|
2515
|
+
// Add hydration styles
|
|
2516
|
+
{
|
|
2517
|
+
dataStyles.textContent += cmpTags + HYDRATED_CSS;
|
|
2518
|
+
}
|
|
2519
|
+
// If we have styles, add them to the DOM
|
|
2520
|
+
if (dataStyles.innerHTML.length) {
|
|
2521
|
+
dataStyles.setAttribute('data-styles', '');
|
|
2522
|
+
// Apply CSP nonce to the style tag if it exists
|
|
2523
|
+
const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);
|
|
2524
|
+
if (nonce != null) {
|
|
2525
|
+
dataStyles.setAttribute('nonce', nonce);
|
|
2526
|
+
}
|
|
2527
|
+
// Insert the styles into the document head
|
|
2528
|
+
// NOTE: this _needs_ to happen last so we can ensure the nonce (and other attributes) are applied
|
|
2529
|
+
head.insertBefore(dataStyles, metaCharset ? metaCharset.nextSibling : head.firstChild);
|
|
2314
2530
|
}
|
|
2315
|
-
head.insertBefore(visibilityStyle, metaCharset ? metaCharset.nextSibling : head.firstChild);
|
|
2316
2531
|
}
|
|
2317
2532
|
// Process deferred connectedCallbacks now all components have been registered
|
|
2318
2533
|
isBootstrapping = false;
|
|
@@ -2334,22 +2549,60 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
2334
2549
|
* @returns void
|
|
2335
2550
|
*/
|
|
2336
2551
|
const setNonce = (nonce) => (plt.$nonce$ = nonce);
|
|
2337
|
-
|
|
2552
|
+
/**
|
|
2553
|
+
* A WeakMap mapping runtime component references to their corresponding host reference
|
|
2554
|
+
* instances.
|
|
2555
|
+
*
|
|
2556
|
+
* **Note**: If we're in an HMR context we need to store a reference to this
|
|
2557
|
+
* value on `window` in order to maintain the mapping of {@link d.RuntimeRef}
|
|
2558
|
+
* to {@link d.HostRef} across HMR updates.
|
|
2559
|
+
*
|
|
2560
|
+
* This is necessary because when HMR updates for a component are processed by
|
|
2561
|
+
* the browser-side dev server client the JS bundle for that component is
|
|
2562
|
+
* re-fetched. Since the module containing {@link hostRefs} is included in
|
|
2563
|
+
* that bundle, if we do not store a reference to it the new iteration of the
|
|
2564
|
+
* component will not have access to the previous hostRef map, leading to a
|
|
2565
|
+
* bug where the new version of the component cannot properly initialize.
|
|
2566
|
+
*/
|
|
2567
|
+
const hostRefs = new WeakMap();
|
|
2568
|
+
/**
|
|
2569
|
+
* Given a {@link d.RuntimeRef} retrieve the corresponding {@link d.HostRef}
|
|
2570
|
+
*
|
|
2571
|
+
* @param ref the runtime ref of interest
|
|
2572
|
+
* @returns the Host reference (if found) or undefined
|
|
2573
|
+
*/
|
|
2338
2574
|
const getHostRef = (ref) => hostRefs.get(ref);
|
|
2575
|
+
/**
|
|
2576
|
+
* Register a lazy instance with the {@link hostRefs} object so it's
|
|
2577
|
+
* corresponding {@link d.HostRef} can be retrieved later.
|
|
2578
|
+
*
|
|
2579
|
+
* @param lazyInstance the lazy instance of interest
|
|
2580
|
+
* @param hostRef that instances `HostRef` object
|
|
2581
|
+
* @returns a reference to the host ref WeakMap
|
|
2582
|
+
*/
|
|
2339
2583
|
const registerInstance = (lazyInstance, hostRef) => hostRefs.set((hostRef.$lazyInstance$ = lazyInstance), hostRef);
|
|
2340
|
-
|
|
2584
|
+
/**
|
|
2585
|
+
* Register a host element for a Stencil component, setting up various metadata
|
|
2586
|
+
* and callbacks based on {@link BUILD} flags as well as the component's runtime
|
|
2587
|
+
* metadata.
|
|
2588
|
+
*
|
|
2589
|
+
* @param hostElement the host element to register
|
|
2590
|
+
* @param cmpMeta runtime metadata for that component
|
|
2591
|
+
* @returns a reference to the host ref WeakMap
|
|
2592
|
+
*/
|
|
2593
|
+
const registerHost = (hostElement, cmpMeta) => {
|
|
2341
2594
|
const hostRef = {
|
|
2342
2595
|
$flags$: 0,
|
|
2343
|
-
$hostElement$:
|
|
2596
|
+
$hostElement$: hostElement,
|
|
2344
2597
|
$cmpMeta$: cmpMeta,
|
|
2345
2598
|
$instanceValues$: new Map(),
|
|
2346
2599
|
};
|
|
2347
2600
|
{
|
|
2348
2601
|
hostRef.$onReadyPromise$ = new Promise((r) => (hostRef.$onReadyResolve$ = r));
|
|
2349
|
-
|
|
2350
|
-
|
|
2602
|
+
hostElement['s-p'] = [];
|
|
2603
|
+
hostElement['s-rc'] = [];
|
|
2351
2604
|
}
|
|
2352
|
-
return hostRefs.set(
|
|
2605
|
+
return hostRefs.set(hostElement, hostRef);
|
|
2353
2606
|
};
|
|
2354
2607
|
const isMemberInElement = (elm, memberName) => memberName in elm;
|
|
2355
2608
|
const consoleError = (e, el) => (0, console.error)(e, el);
|
|
@@ -2440,9 +2693,9 @@ const flush = () => {
|
|
|
2440
2693
|
}
|
|
2441
2694
|
}
|
|
2442
2695
|
};
|
|
2443
|
-
const nextTick =
|
|
2696
|
+
const nextTick = (cb) => promiseResolve().then(cb);
|
|
2444
2697
|
const writeTask = /*@__PURE__*/ queueTask(queueDomWrites, true);
|
|
2445
2698
|
|
|
2446
2699
|
export { Host as H, bootstrapLazy as b, createEvent as c, getElement as g, h, promiseResolve as p, registerInstance as r, setNonce as s };
|
|
2447
2700
|
|
|
2448
|
-
//# sourceMappingURL=index-
|
|
2701
|
+
//# sourceMappingURL=index-ae188432.js.map
|