@postnord/pn-marketweb-components 2.0.148 → 2.0.150-test
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/cjs/{index-95e5b7f9.js → index-28bbc937.js} +1 -1
- package/cjs/{index-4199ff85.js → index-e3e27c79.js} +278 -595
- package/cjs/loader.cjs.js +3 -4
- package/cjs/pn-bonus-progressbar-level.cjs.entry.js +2 -2
- package/cjs/pn-bonus-progressbar.cjs.entry.js +2 -2
- package/cjs/pn-breakpoints.cjs.entry.js +2 -2
- package/cjs/pn-chart.cjs.entry.js +2 -3
- package/cjs/pn-charts-card.cjs.entry.js +2 -9
- package/cjs/pn-choice-button.cjs.entry.js +2 -5
- package/cjs/pn-customernumber-selector-option.cjs.entry.js +2 -2
- package/cjs/pn-customernumber-selector.cjs.entry.js +2 -2
- package/cjs/pn-filter-checkbox.cjs.entry.js +2 -5
- package/cjs/pn-find-price-result.cjs.entry.js +4 -7
- package/cjs/{pn-find-price-store-6b418730.js → pn-find-price-store-0b8c195c.js} +1 -1
- package/cjs/pn-find-price.cjs.entry.js +4 -4
- package/cjs/pn-find-service-and-price-result.cjs.entry.js +4 -4
- package/cjs/{pn-find-service-and-price-store-6e26630d.js → pn-find-service-and-price-store-16a7936c.js} +1 -1
- package/cjs/pn-find-service-and-price.cjs.entry.js +4 -4
- package/cjs/pn-language-selector_9.cjs.entry.js +436 -49
- package/cjs/pn-line-shape.cjs.entry.js +2 -2
- package/cjs/pn-mainnav-link.cjs.entry.js +10 -4
- package/cjs/{pn-mainnav-store-8c337865.js → pn-mainnav-store-61a75ea0.js} +1 -1
- package/cjs/pn-market-web-components.cjs.js +3 -7
- package/cjs/pn-marketweb-input.cjs.entry.js +7 -2
- package/cjs/pn-marketweb-search.cjs.entry.js +6 -2
- package/cjs/pn-marketweb-sitefooter.cjs.entry.js +15 -10
- package/cjs/{pn-marketweb-siteheader-login-links_2.cjs.entry.js → pn-marketweb-siteheader-login-button_3.cjs.entry.js} +52 -18
- package/cjs/pn-marketweb-siteheader-login-linklist.cjs.entry.js +5 -4
- package/cjs/pn-marketweb-siteheader-store-e29ad918.js +10 -0
- package/cjs/pn-marketweb-siteheader.cjs.entry.js +46 -14
- package/cjs/pn-parcel-tracker.cjs.entry.js +2 -2
- package/cjs/pn-pex-pricefinder.cjs.entry.js +5 -2
- package/cjs/pn-product-card_4.cjs.entry.js +7 -16
- package/cjs/pn-product-pricelist-result.cjs.entry.js +3 -3
- package/cjs/pn-product-pricelist.cjs.entry.js +4 -4
- package/cjs/pn-product-tile-info_2.cjs.entry.js +3 -10
- package/cjs/pn-product-tile.cjs.entry.js +2 -2
- package/cjs/pn-profile-modal-customernumber.cjs.entry.js +2 -2
- package/cjs/pn-profile-modal-profile.cjs.entry.js +4 -4
- package/cjs/{pn-profile-modal-store-947b08ae.js → pn-profile-modal-store-6117e304.js} +1 -1
- package/cjs/pn-profile-modal-type.cjs.entry.js +4 -4
- package/cjs/pn-profile-modal.cjs.entry.js +4 -4
- package/cjs/pn-profile-selector-option.cjs.entry.js +2 -2
- package/cjs/pn-profile-selector.cjs.entry.js +5 -5
- package/cjs/pn-proxio-pricegroup.cjs.entry.js +5 -3
- package/cjs/pn-proxio-productcard_4.cjs.entry.js +5 -12
- package/cjs/pn-quick-cta.cjs.entry.js +2 -2
- package/cjs/pn-quote-card.cjs.entry.js +3 -2
- package/cjs/pn-sidenav-level.cjs.entry.js +4 -4
- package/cjs/pn-sidenav-link.cjs.entry.js +12 -4
- package/cjs/{pn-sidenav-store-d2389306.js → pn-sidenav-store-d9bd9e00.js} +1 -1
- package/cjs/pn-sidenav-togglebutton.cjs.entry.js +5 -4
- package/cjs/pn-sidenav.cjs.entry.js +6 -4
- package/cjs/pn-site-footer_2.cjs.entry.js +4 -3
- package/cjs/pn-spotlight.cjs.entry.js +2 -2
- package/cjs/pn-stats-info-data.cjs.entry.js +8 -8
- package/cjs/pn-stats-info.cjs.entry.js +2 -2
- package/cjs/pn-teaser-card.cjs.entry.js +4 -3
- package/collection/collection-manifest.json +3 -2
- package/collection/components/cards/pn-quote-card/pn-line-shape/pn-line-shape.js +11 -12
- package/collection/components/cards/pn-quote-card/pn-quote-card.js +79 -68
- package/collection/components/cards/pn-teaser-card/pn-teaser-card.js +113 -109
- package/collection/components/charts/pn-chart/pn-chart.js +74 -83
- package/collection/components/charts/pn-charts-card/pn-charts-card.js +146 -142
- package/collection/components/cta/pn-parcel-tracker/pn-parcel-tracker.js +128 -133
- package/collection/components/cta/pn-quick-cta/pn-quick-cta.js +49 -51
- package/collection/components/cta/pn-spotlight/pn-spotlight.js +51 -51
- package/collection/components/data-visualization/pn-stats-info/pn-stats-info-data/pn-stats-info-data.js +115 -120
- package/collection/components/data-visualization/pn-stats-info/pn-stats-info.js +79 -82
- package/collection/components/input/pn-bonus-progressbar/pn-bonus-progressbar-level.js +87 -93
- package/collection/components/input/pn-bonus-progressbar/pn-bonus-progressbar.js +195 -193
- package/collection/components/input/pn-choice-button/pn-choice-button.js +137 -145
- package/collection/components/input/pn-filter-checkbox/pn-filter-checkbox.js +122 -128
- package/collection/components/input/pn-marketweb-input/pn-marketweb-input.js +355 -347
- package/collection/components/input/pn-marketweb-search/pn-marketweb-search.js +260 -258
- package/collection/components/layout-components/pn-marketweb-sitefooter/pn-marketweb-sitefooter-types.js +3 -0
- package/collection/components/layout-components/pn-marketweb-sitefooter/pn-marketweb-sitefooter.js +221 -201
- package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login-button.css +3 -0
- package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login-button.js +69 -0
- package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login-linklist.js +71 -97
- package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login-links.js +102 -128
- package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login-profileselection.js +186 -200
- package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login.js +263 -240
- package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-search.js +173 -171
- package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-store.js +7 -0
- package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader.js +550 -479
- package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader.stories.js +13 -1
- package/collection/components/minor/pn-titletag/pn-titletag.js +49 -51
- package/collection/components/navigation/pn-language-selector/pn-language-selector-option.js +123 -119
- package/collection/components/navigation/pn-language-selector/pn-language-selector.js +64 -71
- package/collection/components/navigation/pn-mainnav/pn-mainnav-level.js +58 -58
- package/collection/components/navigation/pn-mainnav/pn-mainnav-link.js +97 -92
- package/collection/components/navigation/pn-mainnav/pn-mainnav-list.js +33 -39
- package/collection/components/navigation/pn-mainnav/pn-mainnav.js +183 -182
- package/collection/components/navigation/pn-sidenav/pn-sidenav-level.js +22 -29
- package/collection/components/navigation/pn-sidenav/pn-sidenav-link.js +134 -128
- package/collection/components/navigation/pn-sidenav/pn-sidenav-togglebutton.js +34 -39
- package/collection/components/navigation/pn-sidenav/pn-sidenav.js +66 -71
- package/collection/components/navigation/pn-site-footer/pn-site-footer-col.js +29 -34
- package/collection/components/navigation/pn-site-footer/pn-site-footer.js +75 -68
- package/collection/components/navigation/pn-site-selector/pn-site-selector-item.js +89 -85
- package/collection/components/navigation/pn-site-selector/pn-site-selector.js +73 -73
- package/collection/components/profile/pn-customernumber-selector/pn-customernumber-selector-option.js +67 -68
- package/collection/components/profile/pn-customernumber-selector/pn-customernumber-selector.js +90 -90
- package/collection/components/profile/pn-profile-modal/pn-profile-modal-customernumber.js +79 -85
- package/collection/components/profile/pn-profile-modal/pn-profile-modal-profile.js +188 -182
- package/collection/components/profile/pn-profile-modal/pn-profile-modal-type.js +84 -91
- package/collection/components/profile/pn-profile-modal/pn-profile-modal.js +115 -116
- package/collection/components/profile/pn-profile-selector/pn-profile-selector-option.js +67 -68
- package/collection/components/profile/pn-profile-selector/pn-profile-selector.js +76 -78
- package/collection/components/utilities/pn-breakpoints/pn-breakpoints.js +42 -48
- package/collection/components/widgets/pn-find-price/pn-find-price-result.js +179 -163
- package/collection/components/widgets/pn-find-price/pn-find-price.js +113 -99
- package/collection/components/widgets/pn-find-service-and-price/pn-find-service-and-price-result.js +67 -66
- package/collection/components/widgets/pn-find-service-and-price/pn-find-service-and-price.js +148 -133
- package/collection/components/widgets/pn-pex-pricefinder/pn-pex-pricefinder.js +102 -87
- package/collection/components/widgets/pn-product-card/pn-product-card-info.js +94 -92
- package/collection/components/widgets/pn-product-card/pn-product-card-price.js +131 -138
- package/collection/components/widgets/pn-product-card/pn-product-card.js +21 -12
- package/collection/components/widgets/pn-product-pricelist/pn-product-pricelist-result.js +108 -101
- package/collection/components/widgets/pn-product-pricelist/pn-product-pricelist.js +140 -137
- package/collection/components/widgets/pn-product-tile/pn-product-tile-info.js +62 -70
- package/collection/components/widgets/pn-product-tile/pn-product-tile-price.js +83 -87
- package/collection/components/widgets/pn-product-tile/pn-product-tile.js +16 -12
- package/collection/components/widgets/pn-proxio-pricegroup/pn-proxio-pricegroup.js +145 -130
- package/collection/components/widgets/pn-proxio-productcard/pn-proxio-productcard-description.js +82 -87
- package/collection/components/widgets/pn-proxio-productcard/pn-proxio-productcard-information.js +57 -55
- package/collection/components/widgets/pn-proxio-productcard/pn-proxio-productcard-pricelink.js +61 -70
- package/collection/components/widgets/pn-proxio-productcard/pn-proxio-productcard.js +20 -12
- package/collection/globals/MarketWebLoginManager.js +77 -0
- package/custom-elements/index.d.ts +6 -0
- package/custom-elements/index.js +966 -789
- package/esm/{index-c118284d.js → index-5397620b.js} +279 -595
- package/esm/{index-7f77b0ba.js → index-7b21ecff.js} +1 -1
- package/esm/loader.js +3 -4
- package/esm/pn-bonus-progressbar-level.entry.js +2 -2
- package/esm/pn-bonus-progressbar.entry.js +2 -2
- package/esm/pn-breakpoints.entry.js +2 -2
- package/esm/pn-chart.entry.js +2 -3
- package/esm/pn-charts-card.entry.js +2 -9
- package/esm/pn-choice-button.entry.js +2 -5
- package/esm/pn-customernumber-selector-option.entry.js +2 -2
- package/esm/pn-customernumber-selector.entry.js +2 -2
- package/esm/pn-filter-checkbox.entry.js +2 -5
- package/esm/pn-find-price-result.entry.js +4 -7
- package/esm/{pn-find-price-store-2cef65c5.js → pn-find-price-store-b4556c9b.js} +1 -1
- package/esm/pn-find-price.entry.js +4 -4
- package/esm/pn-find-service-and-price-result.entry.js +4 -4
- package/esm/{pn-find-service-and-price-store-f09ca219.js → pn-find-service-and-price-store-65df46a0.js} +1 -1
- package/esm/pn-find-service-and-price.entry.js +4 -4
- package/esm/pn-language-selector_9.entry.js +436 -49
- package/esm/pn-line-shape.entry.js +2 -2
- package/esm/pn-mainnav-link.entry.js +10 -4
- package/esm/{pn-mainnav-store-5d91f523.js → pn-mainnav-store-28571e54.js} +1 -1
- package/esm/pn-market-web-components.js +3 -4
- package/esm/pn-marketweb-input.entry.js +7 -2
- package/esm/pn-marketweb-search.entry.js +6 -2
- package/esm/pn-marketweb-sitefooter.entry.js +15 -10
- package/esm/{pn-marketweb-siteheader-login-links_2.entry.js → pn-marketweb-siteheader-login-button_3.entry.js} +52 -19
- package/esm/pn-marketweb-siteheader-login-linklist.entry.js +5 -4
- package/esm/pn-marketweb-siteheader-store-cd0a1dab.js +8 -0
- package/esm/pn-marketweb-siteheader.entry.js +46 -14
- package/esm/pn-parcel-tracker.entry.js +2 -2
- package/esm/pn-pex-pricefinder.entry.js +5 -2
- package/esm/pn-product-card_4.entry.js +7 -16
- package/esm/pn-product-pricelist-result.entry.js +3 -3
- package/esm/pn-product-pricelist.entry.js +4 -4
- package/esm/pn-product-tile-info_2.entry.js +3 -10
- package/esm/pn-product-tile.entry.js +2 -2
- package/esm/pn-profile-modal-customernumber.entry.js +2 -2
- package/esm/pn-profile-modal-profile.entry.js +4 -4
- package/esm/{pn-profile-modal-store-81f53310.js → pn-profile-modal-store-ae9e0d5a.js} +1 -1
- package/esm/pn-profile-modal-type.entry.js +4 -4
- package/esm/pn-profile-modal.entry.js +4 -4
- package/esm/pn-profile-selector-option.entry.js +2 -2
- package/esm/pn-profile-selector.entry.js +5 -5
- package/esm/pn-proxio-pricegroup.entry.js +5 -3
- package/esm/pn-proxio-productcard_4.entry.js +5 -12
- package/esm/pn-quick-cta.entry.js +2 -2
- package/esm/pn-quote-card.entry.js +3 -2
- package/esm/pn-sidenav-level.entry.js +4 -4
- package/esm/pn-sidenav-link.entry.js +12 -4
- package/esm/{pn-sidenav-store-94be19c8.js → pn-sidenav-store-50b186d6.js} +1 -1
- package/esm/pn-sidenav-togglebutton.entry.js +5 -4
- package/esm/pn-sidenav.entry.js +6 -4
- package/esm/pn-site-footer_2.entry.js +4 -3
- package/esm/pn-spotlight.entry.js +2 -2
- package/esm/pn-stats-info-data.entry.js +8 -8
- package/esm/pn-stats-info.entry.js +2 -2
- package/esm/pn-teaser-card.entry.js +4 -3
- package/esm/polyfills/css-shim.js +1 -1
- package/esm-es5/MarketWebContextService-872043cc.js +1 -1
- package/esm-es5/convert-f6377d13.js +1 -1
- package/esm-es5/index-5397620b.js +1 -0
- package/esm-es5/{index-7f77b0ba.js → index-7b21ecff.js} +1 -1
- package/esm-es5/loader.js +1 -1
- package/esm-es5/pn-bonus-progressbar-level.entry.js +1 -1
- package/esm-es5/pn-bonus-progressbar.entry.js +1 -1
- package/esm-es5/pn-breakpoints.entry.js +1 -1
- package/esm-es5/pn-chart.entry.js +2 -2
- package/esm-es5/pn-charts-card.entry.js +1 -1
- package/esm-es5/pn-choice-button.entry.js +1 -1
- package/esm-es5/pn-customernumber-selector-option.entry.js +1 -1
- package/esm-es5/pn-customernumber-selector.entry.js +1 -1
- package/esm-es5/pn-filter-checkbox.entry.js +1 -1
- package/esm-es5/pn-find-price-result.entry.js +1 -1
- package/esm-es5/{pn-find-price-store-2cef65c5.js → pn-find-price-store-b4556c9b.js} +1 -1
- package/esm-es5/pn-find-price.entry.js +1 -1
- package/esm-es5/pn-find-service-and-price-result.entry.js +1 -1
- package/esm-es5/{pn-find-service-and-price-store-f09ca219.js → pn-find-service-and-price-store-65df46a0.js} +1 -1
- package/esm-es5/pn-find-service-and-price.entry.js +1 -1
- package/esm-es5/pn-language-selector_9.entry.js +1 -1
- package/esm-es5/pn-line-shape.entry.js +1 -1
- package/esm-es5/pn-mainnav-link.entry.js +1 -1
- package/esm-es5/{pn-mainnav-store-5d91f523.js → pn-mainnav-store-28571e54.js} +1 -1
- package/esm-es5/pn-market-web-components.js +1 -1
- package/esm-es5/pn-marketweb-input.entry.js +1 -1
- package/esm-es5/pn-marketweb-search.entry.js +1 -1
- package/esm-es5/pn-marketweb-sitefooter.entry.js +1 -1
- package/esm-es5/pn-marketweb-siteheader-login-button_3.entry.js +1 -0
- package/esm-es5/pn-marketweb-siteheader-login-linklist.entry.js +1 -1
- package/esm-es5/pn-marketweb-siteheader-store-cd0a1dab.js +1 -0
- package/esm-es5/pn-marketweb-siteheader.entry.js +1 -1
- package/esm-es5/pn-parcel-tracker.entry.js +1 -1
- package/esm-es5/pn-pex-pricefinder.entry.js +1 -1
- package/esm-es5/pn-product-card_4.entry.js +1 -1
- package/esm-es5/pn-product-pricelist-result.entry.js +1 -1
- package/esm-es5/pn-product-pricelist.entry.js +1 -1
- package/esm-es5/pn-product-tile-info_2.entry.js +1 -1
- package/esm-es5/pn-product-tile.entry.js +1 -1
- package/esm-es5/pn-profile-modal-customernumber.entry.js +1 -1
- package/esm-es5/pn-profile-modal-profile.entry.js +1 -1
- package/esm-es5/{pn-profile-modal-store-81f53310.js → pn-profile-modal-store-ae9e0d5a.js} +1 -1
- package/esm-es5/pn-profile-modal-type.entry.js +1 -1
- package/esm-es5/pn-profile-modal.entry.js +1 -1
- package/esm-es5/pn-profile-selector-option.entry.js +1 -1
- package/esm-es5/pn-profile-selector.entry.js +1 -1
- package/esm-es5/pn-proxio-pricegroup.entry.js +1 -1
- package/esm-es5/pn-proxio-productcard_4.entry.js +1 -1
- package/esm-es5/pn-quick-cta.entry.js +1 -1
- package/esm-es5/pn-quote-card.entry.js +1 -1
- package/esm-es5/pn-sidenav-level.entry.js +1 -1
- package/esm-es5/pn-sidenav-link.entry.js +1 -1
- package/esm-es5/{pn-sidenav-store-94be19c8.js → pn-sidenav-store-50b186d6.js} +1 -1
- package/esm-es5/pn-sidenav-togglebutton.entry.js +1 -1
- package/esm-es5/pn-sidenav.entry.js +1 -1
- package/esm-es5/pn-site-footer_2.entry.js +1 -1
- package/esm-es5/pn-spotlight.entry.js +1 -1
- package/esm-es5/pn-stats-info-data.entry.js +1 -1
- package/esm-es5/pn-stats-info.entry.js +1 -1
- package/esm-es5/pn-teaser-card.entry.js +1 -1
- package/package.json +2 -3
- package/pn-market-web-components/p-022d9a78.entry.js +1 -0
- package/pn-market-web-components/{p-6f1d6a1a.system.js → p-02ea55ad.system.js} +1 -1
- package/pn-market-web-components/p-0796f9b2.entry.js +1 -0
- package/pn-market-web-components/p-0862b4b6.entry.js +1 -0
- package/pn-market-web-components/{p-a1a58fe4.js → p-0cacf9fb.js} +1 -1
- package/pn-market-web-components/{p-f7cb2ef9.system.entry.js → p-1151bf60.system.entry.js} +1 -1
- package/pn-market-web-components/p-15112837.entry.js +1 -0
- package/pn-market-web-components/p-16c4bc50.entry.js +1 -0
- package/pn-market-web-components/p-17c4004f.entry.js +1 -0
- package/pn-market-web-components/{p-4ccf1b55.system.entry.js → p-198d9c77.system.entry.js} +1 -1
- package/pn-market-web-components/{p-0c46847e.system.entry.js → p-1c38553b.system.entry.js} +1 -1
- package/pn-market-web-components/p-1ca41ab1.entry.js +1 -0
- package/pn-market-web-components/{p-1fb4eae4.system.entry.js → p-1ce871c5.system.entry.js} +1 -1
- package/pn-market-web-components/p-227e1d46.entry.js +1 -0
- package/pn-market-web-components/p-249964b5.entry.js +1 -0
- package/pn-market-web-components/{p-abfed655.system.entry.js → p-2718b89a.system.entry.js} +1 -1
- package/pn-market-web-components/{p-7d463116.system.entry.js → p-28c4b4d9.system.entry.js} +1 -1
- package/pn-market-web-components/{p-853e6559.system.entry.js → p-290d5824.system.entry.js} +1 -1
- package/pn-market-web-components/p-2a598ee8.entry.js +1 -0
- package/pn-market-web-components/p-2da8e5e8.system.entry.js +1 -0
- package/pn-market-web-components/p-31fd7a95.system.js +1 -1
- package/pn-market-web-components/p-332e9005.entry.js +1 -0
- package/pn-market-web-components/p-35fcd76c.system.entry.js +1 -0
- package/pn-market-web-components/p-36654f2a.system.js +1 -0
- package/pn-market-web-components/{p-e4961116.system.entry.js → p-36a1b8e1.system.entry.js} +1 -1
- package/pn-market-web-components/{p-f4a6d005.system.js → p-37017f68.system.js} +1 -1
- package/pn-market-web-components/p-381b3ec0.entry.js +1 -0
- package/pn-market-web-components/p-3ae38e63.entry.js +1 -0
- package/pn-market-web-components/p-3c0d63fb.system.entry.js +1 -0
- package/pn-market-web-components/{p-c576ac3e.system.entry.js → p-447ef543.system.entry.js} +1 -1
- package/pn-market-web-components/{p-8ca063a9.system.entry.js → p-450cbe76.system.entry.js} +1 -1
- package/pn-market-web-components/p-479b970a.entry.js +1 -0
- package/pn-market-web-components/p-4a026c9d.system.entry.js +1 -0
- package/pn-market-web-components/p-4bef1bf3.entry.js +1 -0
- package/pn-market-web-components/{p-9f95b3c9.system.entry.js → p-4f67721e.system.entry.js} +1 -1
- package/pn-market-web-components/{p-66b4a71f.system.entry.js → p-5703e89b.system.entry.js} +1 -1
- package/pn-market-web-components/p-5882d613.entry.js +1 -0
- package/pn-market-web-components/{p-8fee0115.system.entry.js → p-58a57436.system.entry.js} +1 -1
- package/pn-market-web-components/p-58e8d7d5.js +1 -0
- package/pn-market-web-components/p-61dbe832.entry.js +1 -0
- package/pn-market-web-components/{p-b890f3f9.system.entry.js → p-625fb7fb.system.entry.js} +1 -1
- package/pn-market-web-components/p-67380aa4.entry.js +1 -0
- package/pn-market-web-components/p-67887512.system.js +1 -0
- package/pn-market-web-components/{p-8a834594.system.entry.js → p-679ebd2a.system.entry.js} +1 -1
- package/pn-market-web-components/p-6b33db5b.system.entry.js +1 -0
- package/pn-market-web-components/{p-4d561de4.system.entry.js → p-7079df88.system.entry.js} +1 -1
- package/pn-market-web-components/p-715d1ef7.entry.js +1 -0
- package/pn-market-web-components/{p-5a506356.system.entry.js → p-723b9901.system.entry.js} +1 -1
- package/pn-market-web-components/p-736e5b84.system.entry.js +1 -0
- package/pn-market-web-components/{p-545a40a7.system.entry.js → p-74d35edf.system.entry.js} +1 -1
- package/pn-market-web-components/p-77557da8.entry.js +1 -0
- package/pn-market-web-components/{p-6d050c3a.system.entry.js → p-7b9fb94f.system.entry.js} +1 -1
- package/pn-market-web-components/p-7ce41d14.entry.js +1 -0
- package/pn-market-web-components/p-7fd8b012.entry.js +1 -0
- package/pn-market-web-components/{p-2145d5e0.system.entry.js → p-80dce81e.system.entry.js} +1 -1
- package/pn-market-web-components/{p-68324e6f.system.entry.js → p-8117b79e.system.entry.js} +1 -1
- package/pn-market-web-components/p-81426cd9.entry.js +1 -0
- package/pn-market-web-components/p-81d764a0.entry.js +1 -0
- package/pn-market-web-components/{p-d34c9be2.system.js → p-825b8fb8.system.js} +1 -1
- package/pn-market-web-components/{p-c5727e83.js → p-84699999.js} +1 -1
- package/pn-market-web-components/{p-ecaad0c1.js → p-86f06e26.js} +1 -1
- package/pn-market-web-components/p-8766fa86.system.js +1 -1
- package/pn-market-web-components/p-88185835.entry.js +1 -0
- package/pn-market-web-components/p-885bc8d7.system.entry.js +1 -0
- package/pn-market-web-components/p-8a05dbb6.entry.js +1 -0
- package/pn-market-web-components/p-8e146205.entry.js +1 -0
- package/pn-market-web-components/p-8e38c337.entry.js +1 -0
- package/pn-market-web-components/p-8e4d292f.entry.js +1 -0
- package/pn-market-web-components/p-8ef45246.entry.js +1 -0
- package/pn-market-web-components/p-92fd28e6.entry.js +1 -0
- package/pn-market-web-components/p-9344cd23.js +1 -0
- package/pn-market-web-components/{p-e737c51d.system.entry.js → p-93cecc43.system.entry.js} +1 -1
- package/pn-market-web-components/{p-3a450371.system.js → p-94958580.system.js} +1 -1
- package/pn-market-web-components/p-996d8a6a.entry.js +1 -0
- package/pn-market-web-components/p-9aa09635.entry.js +1 -0
- package/pn-market-web-components/p-9b855b11.entry.js +24 -0
- package/pn-market-web-components/{p-8cefd900.system.entry.js → p-9edaf6b6.system.entry.js} +1 -1
- package/pn-market-web-components/p-a119cb8e.entry.js +1 -0
- package/pn-market-web-components/p-a247058b.system.entry.js +1 -0
- package/pn-market-web-components/{p-6e43a937.system.entry.js → p-a275bffb.system.entry.js} +1 -1
- package/pn-market-web-components/{p-396b254a.system.js → p-a5f75560.system.js} +1 -1
- package/pn-market-web-components/p-a7bb94a0.entry.js +1 -0
- package/pn-market-web-components/p-a921d3fd.system.entry.js +1 -0
- package/pn-market-web-components/{p-9010c32a.system.entry.js → p-aa271997.system.entry.js} +1 -1
- package/pn-market-web-components/p-aab2e28f.entry.js +1 -0
- package/pn-market-web-components/p-ac0e3c22.system.entry.js +1 -0
- package/pn-market-web-components/{p-441249d9.system.js → p-add7d76c.system.js} +1 -1
- package/pn-market-web-components/{p-ca1f0abc.system.entry.js → p-af415c1a.system.entry.js} +1 -1
- package/pn-market-web-components/{p-ffe18938.system.entry.js → p-b88337dd.system.entry.js} +1 -1
- package/pn-market-web-components/p-bb626ab4.js +1 -0
- package/pn-market-web-components/p-bd22aaac.entry.js +1 -0
- package/pn-market-web-components/p-bfe239ca.js +1 -1
- package/pn-market-web-components/{p-f04afb39.js → p-c4254e9e.js} +1 -1
- package/pn-market-web-components/{p-5a41c1bb.system.entry.js → p-c62a91ba.system.entry.js} +1 -1
- package/pn-market-web-components/p-c714a790.entry.js +1 -0
- package/pn-market-web-components/{p-2e507907.system.entry.js → p-c9fb0f01.system.entry.js} +2 -2
- package/pn-market-web-components/p-d0155ddf.entry.js +1 -0
- package/pn-market-web-components/p-d11a5fbb.system.entry.js +1 -0
- package/pn-market-web-components/p-d542a52b.system.entry.js +1 -0
- package/pn-market-web-components/p-d57f4246.system.entry.js +1 -0
- package/pn-market-web-components/p-d775d725.entry.js +1 -0
- package/pn-market-web-components/p-d7e3d918.entry.js +1 -0
- package/pn-market-web-components/p-dbe032f7.system.js +1 -0
- package/pn-market-web-components/{p-a62ddaaa.system.entry.js → p-def0a6a2.system.entry.js} +1 -1
- package/pn-market-web-components/p-e32dc098.entry.js +1 -0
- package/pn-market-web-components/p-e4a4e68f.system.entry.js +1 -0
- package/pn-market-web-components/{p-ef721555.system.entry.js → p-e6fa11ad.system.entry.js} +1 -1
- package/pn-market-web-components/p-e9576f26.entry.js +1 -0
- package/pn-market-web-components/p-e9fe5c54.entry.js +1 -0
- package/pn-market-web-components/{p-939b5792.system.entry.js → p-f312ff98.system.entry.js} +1 -1
- package/pn-market-web-components/p-f61342c3.js +1 -0
- package/pn-market-web-components/{p-4b85fd2b.system.entry.js → p-f6ea7c38.system.entry.js} +1 -1
- package/pn-market-web-components/p-f774e2cc.entry.js +1 -0
- package/pn-market-web-components/{p-1d50340b.system.entry.js → p-fc1083d2.system.entry.js} +1 -1
- package/pn-market-web-components/p-fc974bca.entry.js +1 -0
- package/pn-market-web-components/p-fea72975.entry.js +1 -0
- package/pn-market-web-components/pn-market-web-components.esm.js +1 -1
- package/pn-market-web-components/pn-market-web-components.js +1 -2
- package/types/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login-button.d.ts +9 -0
- package/types/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login-linklist.d.ts +0 -2
- package/types/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login-links.d.ts +0 -2
- package/types/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login-profileselection.d.ts +1 -2
- package/types/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login.d.ts +4 -4
- package/types/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-store.d.ts +7 -0
- package/types/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader.d.ts +3 -3
- package/types/components/widgets/pn-proxio-pricegroup/pn-proxio-pricegroup.d.ts +1 -1
- package/types/components.d.ts +54 -60
- package/types/globals/MarketWebLoginManager.d.ts +8 -0
- package/types/stencil-public-runtime.d.ts +7 -79
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/LICENSE.md +27 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/bin/stencil +57 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/cli/config-flags.d.ts +122 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/cli/index.cjs +2609 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/cli/index.d.ts +19 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/cli/index.js +2583 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/cli/package.json +14 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.d.ts +24 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.dom.d.ts +18505 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.dom.iterable.d.ts +341 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2015.collection.d.ts +150 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2015.core.d.ts +559 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2015.d.ts +30 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2015.generator.d.ts +79 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2015.iterable.d.ts +498 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2015.promise.d.ts +83 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2015.proxy.d.ts +130 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2015.reflect.d.ts +146 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2015.symbol.d.ts +48 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2015.symbol.wellknown.d.ts +324 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2016.array.include.d.ts +118 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2016.d.ts +22 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2016.full.d.ts +25 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2017.d.ts +26 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2017.full.d.ts +25 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2017.intl.d.ts +47 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2017.object.d.ts +51 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2017.sharedmemory.d.ts +137 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2017.string.d.ts +47 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2017.typedarrays.d.ts +55 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2018.asyncgenerator.d.ts +79 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2018.asynciterable.d.ts +45 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2018.d.ts +26 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2018.full.d.ts +25 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2018.intl.d.ts +73 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2018.promise.d.ts +32 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2018.regexp.d.ts +39 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2019.array.d.ts +85 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2019.d.ts +26 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2019.full.d.ts +25 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2019.intl.d.ts +25 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2019.object.d.ts +35 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2019.string.d.ts +39 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2019.symbol.d.ts +26 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2020.bigint.d.ts +730 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2020.d.ts +29 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2020.date.d.ts +44 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2020.full.d.ts +25 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2020.intl.d.ts +433 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2020.number.d.ts +30 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2020.promise.d.ts +49 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2020.sharedmemory.d.ts +99 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2020.string.d.ts +30 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2020.symbol.wellknown.d.ts +39 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2021.d.ts +25 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2021.full.d.ts +25 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2021.intl.d.ts +154 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2021.promise.d.ts +50 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2021.string.d.ts +35 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2021.weakref.d.ts +75 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2022.array.d.ts +123 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2022.d.ts +27 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2022.error.d.ts +75 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2022.full.d.ts +25 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2022.intl.d.ts +111 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2022.object.d.ts +28 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2022.sharedmemory.d.ts +27 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es2022.string.d.ts +27 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es5.d.ts +4526 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.es6.d.ts +25 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.esnext.d.ts +22 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.esnext.full.d.ts +25 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.esnext.intl.d.ts +30 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.esnext.promise.d.ts +43 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.esnext.string.d.ts +35 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.esnext.weakref.d.ts +75 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.scripthost.d.ts +327 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.webworker.d.ts +6192 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.webworker.importscripts.d.ts +26 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/lib.webworker.iterable.d.ts +175 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/package.json +8 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/stencil.d.ts +73 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/stencil.js +70673 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/stencil.min.js +4 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/sys/in-memory-fs.d.ts +218 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/compiler/transpile.d.ts +32 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dependencies.json +120 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/client/app-error.d.ts +18 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/client/events.d.ts +6 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/client/hmr-components.d.ts +1 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/client/hmr-external-styles.d.ts +1 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/client/hmr-images.d.ts +1 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/client/hmr-inline-styles.d.ts +1 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/client/hmr-util.d.ts +9 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/client/hmr-window.d.ts +10 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/client/index.d.ts +6 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/client/index.js +808 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/client/logger.d.ts +5 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/client/package.json +8 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/client/progress.d.ts +3 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/client/status.d.ts +4 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/client/test/hmr-util.spec.d.ts +1 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/client/test/status.spec.d.ts +1 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/connector.html +6 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/index.d.ts +3 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/index.js +264 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/open-in-editor-api.js +1 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/package.json +8 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/server-process.js +1799 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/server-worker-thread.js +39 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/static/favicon.ico +0 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/templates/directory-index.html +132 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/templates/initial-load.html +160 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/visualstudio.vbs +82 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/ws.js +1 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/dev-server/xdg-open +1066 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/app-data/index.cjs +92 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/app-data/index.d.ts +4 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/app-data/index.js +88 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/app-data/package.json +15 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/client/css-shim.js +4 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/client/dom.js +73 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/client/index.js +3371 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/client/package.json +8 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/client/patch-browser.js +142 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/client/patch-esm.js +23 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/client/polyfills/core-js.js +11 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/client/polyfills/css-shim.js +1 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/client/polyfills/dom.js +79 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/client/polyfills/es5-html-element.js +1 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/client/polyfills/index.js +34 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/client/polyfills/system.js +6 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/client/shadow-css.js +387 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/hydrate/index.js +1143 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/hydrate/package.json +7 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/hydrate/runner.d.ts +217 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/hydrate/runner.js +777 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/hydrate/shadow-css.js +143 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/index.d.ts +4 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/index.js +2 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/package.json +9 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/stencil-core/index.cjs +1 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/stencil-core/index.d.ts +51 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/stencil-core/index.js +16 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/stencil-ext-modules.d.ts +41 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/stencil-private.d.ts +2268 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/stencil-public-compiler.d.ts +2338 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/stencil-public-docs.d.ts +140 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/stencil-public-runtime.d.ts +1637 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/testing/index.js +1105 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/testing/package.json +7 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/internal/testing/shadow-css.js +143 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/mock-doc/index.cjs +4858 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/mock-doc/index.d.ts +1020 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/mock-doc/index.js +4822 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/mock-doc/package.json +15 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/package.json +190 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/readme.md +99 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/assets/favicon.ico +0 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/assets/logo.png +0 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/build/app.css +1 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/build/app.esm.js +1 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/build/app.js +33 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/build/index.esm.js +0 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/build/p-081b0641.js +1 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/build/p-227a1e18.entry.js +1 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/build/p-2c298727.entry.js +1 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/build/p-5479268c.entry.js +1 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/build/p-573ec8a4.entry.js +1 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/build/p-6ba08604.entry.js +1 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/build/p-6bc63295.entry.js +1 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/build/p-7a3759fd.entry.js +1 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/build/p-7b4e3ba7.js +1 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/build/p-988eb362.css +1 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/build/p-9b6a9315.js +1 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/build/p-b4cc611c.entry.js +1 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/build/p-d1bf53f5.entry.js +1 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/build/p-e2efe0df.js +1 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/build/p-e8ca6d97.entry.js +1 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/build/p-ec2f13e0.entry.js +1 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/build/p-f0b99977.entry.js +1 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/build/p-f4745c2f.entry.js +1 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/build/p-fbbae598.js +1 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/host.config.json +15 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/index.html +1 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/compare/manifest.json +13 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/connector.js +2 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/index.js +661 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/local-connector.js +2 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/package.json +15 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/screenshot/pixel-match.js +2807 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/sys/node/autoprefixer.js +8 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/sys/node/glob.js +1 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/sys/node/graceful-fs.js +1 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/sys/node/index.d.ts +22 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/sys/node/index.js +6121 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/sys/node/node-fetch.js +1 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/sys/node/package.json +8 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/sys/node/prompts.js +1 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/sys/node/worker.js +52 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/index.d.ts +12 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/index.js +4155 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/jest/jest-config.d.ts +16 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/jest/jest-environment.d.ts +15 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/jest/jest-preprocessor.d.ts +59 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/jest/jest-runner.d.ts +10 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/jest/jest-screenshot.d.ts +2 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/jest/jest-serializer.d.ts +4 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/jest/jest-setup-test-framework.d.ts +1 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/jest/test/jest-config.spec.d.ts +1 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/jest/test/jest-preprocessor.spec.d.ts +1 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/jest/test/jest-runner.spec.d.ts +1 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/jest/test/jest-serializer.spec.d.ts +1 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/jest-environment.js +3 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/jest-preprocessor.js +3 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/jest-preset.js +37 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/jest-runner.js +3 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/jest-setuptestframework.js +3 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/matchers/attributes.d.ts +14 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/matchers/class-list.d.ts +12 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/matchers/events.d.ts +21 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/matchers/html.d.ts +12 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/matchers/index.d.ts +23 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/matchers/screenshot.d.ts +5 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/matchers/text.d.ts +4 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/mock-fetch.d.ts +11 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/mocks.d.ts +56 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/package.json +8 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/puppeteer/index.d.ts +2 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/puppeteer/puppeteer-browser.d.ts +6 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/puppeteer/puppeteer-declarations.d.ts +429 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/puppeteer/puppeteer-element.d.ts +67 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/puppeteer/puppeteer-emulate.d.ts +2 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/puppeteer/puppeteer-events.d.ts +21 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/puppeteer/puppeteer-page.d.ts +2 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/puppeteer/puppeteer-screenshot.d.ts +4 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/reset-build-conditionals.d.ts +2 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/spec-page.d.ts +2 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/test/testing-utils.spec.d.ts +1 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/test-transpile.d.ts +2 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/testing-logger.d.ts +25 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/testing-sys.d.ts +6 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/testing-utils.d.ts +79 -0
- package/umd/modules/@postnord/web-components/node_modules/@stencil/core/testing/testing.d.ts +2 -0
- package/umd/pn-marketweb-init.js +1 -1
- package/umd/pn-marketweb-salesforce.js +2 -2
- package/cjs/MarketWebLoginManager-2e2c83c4.js +0 -281
- package/esm/MarketWebLoginManager-9499bd89.js +0 -279
- package/esm-es5/MarketWebLoginManager-9499bd89.js +0 -1
- package/esm-es5/index-c118284d.js +0 -2
- package/esm-es5/pn-marketweb-siteheader-login-links_2.entry.js +0 -1
- package/pn-market-web-components/p-09d66012.system.entry.js +0 -1
- package/pn-market-web-components/p-0e7900e0.system.entry.js +0 -1
- package/pn-market-web-components/p-0fbcacf3.system.entry.js +0 -1
- package/pn-market-web-components/p-1545fb34.entry.js +0 -1
- package/pn-market-web-components/p-156fedd7.entry.js +0 -1
- package/pn-market-web-components/p-15e680a8.entry.js +0 -1
- package/pn-market-web-components/p-17fb8d9e.entry.js +0 -1
- package/pn-market-web-components/p-1a9b2a0e.system.entry.js +0 -1
- package/pn-market-web-components/p-1c382898.entry.js +0 -1
- package/pn-market-web-components/p-1f8423d6.entry.js +0 -1
- package/pn-market-web-components/p-22a60cb6.system.entry.js +0 -1
- package/pn-market-web-components/p-247cd393.entry.js +0 -1
- package/pn-market-web-components/p-2967a563.entry.js +0 -1
- package/pn-market-web-components/p-2e4361e7.entry.js +0 -1
- package/pn-market-web-components/p-34c0b146.entry.js +0 -1
- package/pn-market-web-components/p-34fefe22.entry.js +0 -1
- package/pn-market-web-components/p-37d26cef.entry.js +0 -1
- package/pn-market-web-components/p-38f135fd.entry.js +0 -1
- package/pn-market-web-components/p-3e3298fe.entry.js +0 -1
- package/pn-market-web-components/p-41b34b21.entry.js +0 -1
- package/pn-market-web-components/p-4293e33c.js +0 -1
- package/pn-market-web-components/p-44c05fba.entry.js +0 -1
- package/pn-market-web-components/p-44f58f15.js +0 -1
- package/pn-market-web-components/p-4653f5db.system.entry.js +0 -1
- package/pn-market-web-components/p-47d717a3.entry.js +0 -1
- package/pn-market-web-components/p-48c74c53.entry.js +0 -1
- package/pn-market-web-components/p-49f60496.entry.js +0 -1
- package/pn-market-web-components/p-4a8e35d3.system.entry.js +0 -1
- package/pn-market-web-components/p-4ef54288.entry.js +0 -1
- package/pn-market-web-components/p-507f8886.entry.js +0 -1
- package/pn-market-web-components/p-5a6761da.js +0 -1
- package/pn-market-web-components/p-73ee3141.entry.js +0 -1
- package/pn-market-web-components/p-773b59c0.entry.js +0 -24
- package/pn-market-web-components/p-7c1b31e8.js +0 -2
- package/pn-market-web-components/p-7cb63135.entry.js +0 -1
- package/pn-market-web-components/p-7d992089.entry.js +0 -1
- package/pn-market-web-components/p-7dff99ed.entry.js +0 -1
- package/pn-market-web-components/p-8079dfd5.system.entry.js +0 -1
- package/pn-market-web-components/p-82db879c.entry.js +0 -1
- package/pn-market-web-components/p-833bab34.entry.js +0 -1
- package/pn-market-web-components/p-8acb60c5.entry.js +0 -1
- package/pn-market-web-components/p-8b28ac30.entry.js +0 -1
- package/pn-market-web-components/p-8f0a682f.entry.js +0 -1
- package/pn-market-web-components/p-9a6af82e.entry.js +0 -1
- package/pn-market-web-components/p-a3b8ec51.system.entry.js +0 -1
- package/pn-market-web-components/p-a5faec68.system.js +0 -2
- package/pn-market-web-components/p-a781c8dd.entry.js +0 -1
- package/pn-market-web-components/p-a799fee1.entry.js +0 -1
- package/pn-market-web-components/p-ad1f57dc.entry.js +0 -1
- package/pn-market-web-components/p-b0102ff6.entry.js +0 -1
- package/pn-market-web-components/p-beefd9f7.entry.js +0 -1
- package/pn-market-web-components/p-c668f453.entry.js +0 -1
- package/pn-market-web-components/p-c7e8ab14.entry.js +0 -1
- package/pn-market-web-components/p-cd6b402e.system.entry.js +0 -1
- package/pn-market-web-components/p-ced9727b.system.js +0 -1
- package/pn-market-web-components/p-d295ef71.system.js +0 -1
- package/pn-market-web-components/p-d5ae9797.entry.js +0 -1
- package/pn-market-web-components/p-d70e685c.entry.js +0 -1
- package/pn-market-web-components/p-d9dec5b8.entry.js +0 -1
- package/pn-market-web-components/p-dbd7837e.entry.js +0 -1
- package/pn-market-web-components/p-dc598ef8.entry.js +0 -1
- package/pn-market-web-components/p-e0e45eb0.system.entry.js +0 -1
- package/pn-market-web-components/p-e1513762.entry.js +0 -1
- package/pn-market-web-components/p-e4754d3b.system.entry.js +0 -1
- package/pn-market-web-components/p-e4fbd06c.entry.js +0 -1
- package/pn-market-web-components/p-ed5e91eb.system.entry.js +0 -1
- package/pn-market-web-components/p-f9725e57.system.entry.js +0 -1
- package/pn-market-web-components/p-fba88e93.entry.js +0 -1
- package/pn-market-web-components/p-ff975b67.entry.js +0 -1
|
@@ -1,13 +1,5 @@
|
|
|
1
1
|
const NAMESPACE = 'pn-market-web-components';
|
|
2
2
|
|
|
3
|
-
/**
|
|
4
|
-
* Virtual DOM patching algorithm based on Snabbdom by
|
|
5
|
-
* Simon Friis Vindum (@paldepind)
|
|
6
|
-
* Licensed under the MIT License
|
|
7
|
-
* https://github.com/snabbdom/snabbdom/blob/master/LICENSE
|
|
8
|
-
*
|
|
9
|
-
* Modified for Stencil's renderer and slot projection
|
|
10
|
-
*/
|
|
11
3
|
let scopeId;
|
|
12
4
|
let contentRef;
|
|
13
5
|
let hostTagName;
|
|
@@ -17,6 +9,66 @@ let checkSlotRelocate = false;
|
|
|
17
9
|
let isSvgMode = false;
|
|
18
10
|
let renderingRef = null;
|
|
19
11
|
let queuePending = false;
|
|
12
|
+
const win = typeof window !== 'undefined' ? window : {};
|
|
13
|
+
const doc = win.document || { head: {} };
|
|
14
|
+
const H = (win.HTMLElement || class {
|
|
15
|
+
});
|
|
16
|
+
const plt = {
|
|
17
|
+
$flags$: 0,
|
|
18
|
+
$resourcesUrl$: '',
|
|
19
|
+
jmp: (h) => h(),
|
|
20
|
+
raf: (h) => requestAnimationFrame(h),
|
|
21
|
+
ael: (el, eventName, listener, opts) => el.addEventListener(eventName, listener, opts),
|
|
22
|
+
rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),
|
|
23
|
+
ce: (eventName, opts) => new CustomEvent(eventName, opts),
|
|
24
|
+
};
|
|
25
|
+
const supportsShadow = true;
|
|
26
|
+
const promiseResolve = (v) => Promise.resolve(v);
|
|
27
|
+
const supportsConstructibleStylesheets = /*@__PURE__*/ (() => {
|
|
28
|
+
try {
|
|
29
|
+
new CSSStyleSheet();
|
|
30
|
+
return typeof new CSSStyleSheet().replace === 'function';
|
|
31
|
+
}
|
|
32
|
+
catch (e) { }
|
|
33
|
+
return false;
|
|
34
|
+
})()
|
|
35
|
+
;
|
|
36
|
+
const addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) => {
|
|
37
|
+
if (listeners) {
|
|
38
|
+
listeners.map(([flags, name, method]) => {
|
|
39
|
+
const target = getHostListenerTarget(elm, flags) ;
|
|
40
|
+
const handler = hostListenerProxy(hostRef, method);
|
|
41
|
+
const opts = hostListenerOpts(flags);
|
|
42
|
+
plt.ael(target, name, handler, opts);
|
|
43
|
+
(hostRef.$rmListeners$ = hostRef.$rmListeners$ || []).push(() => plt.rel(target, name, handler, opts));
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
const hostListenerProxy = (hostRef, methodName) => (ev) => {
|
|
48
|
+
try {
|
|
49
|
+
{
|
|
50
|
+
if (hostRef.$flags$ & 256 /* isListenReady */) {
|
|
51
|
+
// instance is ready, let's call it's member method for this event
|
|
52
|
+
hostRef.$lazyInstance$[methodName](ev);
|
|
53
|
+
}
|
|
54
|
+
else {
|
|
55
|
+
(hostRef.$queuedListeners$ = hostRef.$queuedListeners$ || []).push([methodName, ev]);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
catch (e) {
|
|
60
|
+
consoleError(e);
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
const getHostListenerTarget = (elm, flags) => {
|
|
64
|
+
if (flags & 8 /* TargetWindow */)
|
|
65
|
+
return win;
|
|
66
|
+
return elm;
|
|
67
|
+
};
|
|
68
|
+
// prettier-ignore
|
|
69
|
+
const hostListenerOpts = (flags) => (flags & 2 /* Capture */) !== 0;
|
|
70
|
+
const HYDRATED_CSS = '{visibility:hidden}.hydrated{visibility:inherit}';
|
|
71
|
+
const XLINK_NS = 'http://www.w3.org/1999/xlink';
|
|
20
72
|
const createTime = (fnName, tagName = '') => {
|
|
21
73
|
{
|
|
22
74
|
return () => {
|
|
@@ -31,8 +83,71 @@ const uniqueTime = (key, measureText) => {
|
|
|
31
83
|
};
|
|
32
84
|
}
|
|
33
85
|
};
|
|
34
|
-
const
|
|
35
|
-
const
|
|
86
|
+
const rootAppliedStyles = new WeakMap();
|
|
87
|
+
const registerStyle = (scopeId, cssText, allowCS) => {
|
|
88
|
+
let style = styles.get(scopeId);
|
|
89
|
+
if (supportsConstructibleStylesheets && allowCS) {
|
|
90
|
+
style = (style || new CSSStyleSheet());
|
|
91
|
+
style.replace(cssText);
|
|
92
|
+
}
|
|
93
|
+
else {
|
|
94
|
+
style = cssText;
|
|
95
|
+
}
|
|
96
|
+
styles.set(scopeId, style);
|
|
97
|
+
};
|
|
98
|
+
const addStyle = (styleContainerNode, cmpMeta, mode, hostElm) => {
|
|
99
|
+
let scopeId = getScopeId(cmpMeta);
|
|
100
|
+
let style = styles.get(scopeId);
|
|
101
|
+
// if an element is NOT connected then getRootNode() will return the wrong root node
|
|
102
|
+
// so the fallback is to always use the document for the root node in those cases
|
|
103
|
+
styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : doc;
|
|
104
|
+
if (style) {
|
|
105
|
+
if (typeof style === 'string') {
|
|
106
|
+
styleContainerNode = styleContainerNode.head || styleContainerNode;
|
|
107
|
+
let appliedStyles = rootAppliedStyles.get(styleContainerNode);
|
|
108
|
+
let styleElm;
|
|
109
|
+
if (!appliedStyles) {
|
|
110
|
+
rootAppliedStyles.set(styleContainerNode, (appliedStyles = new Set()));
|
|
111
|
+
}
|
|
112
|
+
if (!appliedStyles.has(scopeId)) {
|
|
113
|
+
{
|
|
114
|
+
{
|
|
115
|
+
styleElm = doc.createElement('style');
|
|
116
|
+
styleElm.innerHTML = style;
|
|
117
|
+
}
|
|
118
|
+
styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector('link'));
|
|
119
|
+
}
|
|
120
|
+
if (appliedStyles) {
|
|
121
|
+
appliedStyles.add(scopeId);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
else if (!styleContainerNode.adoptedStyleSheets.includes(style)) {
|
|
126
|
+
styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
return scopeId;
|
|
130
|
+
};
|
|
131
|
+
const attachStyles = (hostRef) => {
|
|
132
|
+
const cmpMeta = hostRef.$cmpMeta$;
|
|
133
|
+
const elm = hostRef.$hostElement$;
|
|
134
|
+
const flags = cmpMeta.$flags$;
|
|
135
|
+
const endAttachStyles = createTime('attachStyles', cmpMeta.$tagName$);
|
|
136
|
+
const scopeId = addStyle(elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(), cmpMeta);
|
|
137
|
+
if (flags & 10 /* needsScopedEncapsulation */) {
|
|
138
|
+
// only required when we're NOT using native shadow dom (slot)
|
|
139
|
+
// or this browser doesn't support native shadow dom
|
|
140
|
+
// and this host element was NOT created with SSR
|
|
141
|
+
// let's pick out the inner content for slot projection
|
|
142
|
+
// create a node to represent where the original
|
|
143
|
+
// content was first placed, which is useful later on
|
|
144
|
+
// DOM WRITE!!
|
|
145
|
+
elm['s-sc'] = scopeId;
|
|
146
|
+
elm.classList.add(scopeId + '-h');
|
|
147
|
+
}
|
|
148
|
+
endAttachStyles();
|
|
149
|
+
};
|
|
150
|
+
const getScopeId = (cmp, mode) => 'sc-' + (cmp.$tagName$);
|
|
36
151
|
/**
|
|
37
152
|
* Default style mode id
|
|
38
153
|
*/
|
|
@@ -52,18 +167,6 @@ const isComplexType = (o) => {
|
|
|
52
167
|
o = typeof o;
|
|
53
168
|
return o === 'object' || o === 'function';
|
|
54
169
|
};
|
|
55
|
-
/**
|
|
56
|
-
* Helper method for querying a `meta` tag that contains a nonce value
|
|
57
|
-
* out of a DOM's head.
|
|
58
|
-
*
|
|
59
|
-
* @param doc The DOM containing the `head` to query against
|
|
60
|
-
* @returns The content of the meta tag representing the nonce value, or `undefined` if no tag
|
|
61
|
-
* exists or the tag has no content.
|
|
62
|
-
*/
|
|
63
|
-
function queryNonceMetaTagContent(doc) {
|
|
64
|
-
var _a, _b, _c;
|
|
65
|
-
return (_c = (_b = (_a = doc.head) === null || _a === void 0 ? void 0 : _a.querySelector('meta[name="csp-nonce"]')) === null || _b === void 0 ? void 0 : _b.getAttribute('content')) !== null && _c !== void 0 ? _c : undefined;
|
|
66
|
-
}
|
|
67
170
|
/**
|
|
68
171
|
* Production h() function based on Preact by
|
|
69
172
|
* Jason Miller (@developit)
|
|
@@ -72,6 +175,7 @@ function queryNonceMetaTagContent(doc) {
|
|
|
72
175
|
*
|
|
73
176
|
* Modified for Stencil's compiler and vdom
|
|
74
177
|
*/
|
|
178
|
+
// const stack: any[] = [];
|
|
75
179
|
// export function h(nodeName: string | d.FunctionalComponent, vnodeData: d.PropsType, child?: d.ChildType): d.VNode;
|
|
76
180
|
// export function h(nodeName: string | d.FunctionalComponent, vnodeData: d.PropsType, ...children: d.ChildType[]): d.VNode;
|
|
77
181
|
const h = (nodeName, vnodeData, ...children) => {
|
|
@@ -80,7 +184,7 @@ const h = (nodeName, vnodeData, ...children) => {
|
|
|
80
184
|
let slotName = null;
|
|
81
185
|
let simple = false;
|
|
82
186
|
let lastSimple = false;
|
|
83
|
-
|
|
187
|
+
let vNodeChildren = [];
|
|
84
188
|
const walk = (c) => {
|
|
85
189
|
for (let i = 0; i < c.length; i++) {
|
|
86
190
|
child = c[i];
|
|
@@ -141,14 +245,6 @@ const h = (nodeName, vnodeData, ...children) => {
|
|
|
141
245
|
}
|
|
142
246
|
return vnode;
|
|
143
247
|
};
|
|
144
|
-
/**
|
|
145
|
-
* A utility function for creating a virtual DOM node from a tag and some
|
|
146
|
-
* possible text content.
|
|
147
|
-
*
|
|
148
|
-
* @param tag the tag for this element
|
|
149
|
-
* @param text possible text content for the node
|
|
150
|
-
* @returns a newly-minted virtual DOM node
|
|
151
|
-
*/
|
|
152
248
|
const newVNode = (tag, text) => {
|
|
153
249
|
const vnode = {
|
|
154
250
|
$flags$: 0,
|
|
@@ -169,31 +265,11 @@ const newVNode = (tag, text) => {
|
|
|
169
265
|
return vnode;
|
|
170
266
|
};
|
|
171
267
|
const Host = {};
|
|
172
|
-
/**
|
|
173
|
-
* Check whether a given node is a Host node or not
|
|
174
|
-
*
|
|
175
|
-
* @param node the virtual DOM node to check
|
|
176
|
-
* @returns whether it's a Host node or not
|
|
177
|
-
*/
|
|
178
268
|
const isHost = (node) => node && node.$tag$ === Host;
|
|
179
|
-
/**
|
|
180
|
-
* Implementation of {@link d.FunctionalUtilities} for Stencil's VDom.
|
|
181
|
-
*
|
|
182
|
-
* Note that these functions convert from {@link d.VNode} to
|
|
183
|
-
* {@link d.ChildNode} to give functional component developers a friendly
|
|
184
|
-
* interface.
|
|
185
|
-
*/
|
|
186
269
|
const vdomFnUtils = {
|
|
187
270
|
forEach: (children, cb) => children.map(convertToPublic).forEach(cb),
|
|
188
271
|
map: (children, cb) => children.map(convertToPublic).map(cb).map(convertToPrivate),
|
|
189
272
|
};
|
|
190
|
-
/**
|
|
191
|
-
* Convert a {@link d.VNode} to a {@link d.ChildNode} in order to present a
|
|
192
|
-
* friendlier public interface (hence, 'convertToPublic').
|
|
193
|
-
*
|
|
194
|
-
* @param node the virtual DOM node to convert
|
|
195
|
-
* @returns a converted child node
|
|
196
|
-
*/
|
|
197
273
|
const convertToPublic = (node) => ({
|
|
198
274
|
vattrs: node.$attrs$,
|
|
199
275
|
vchildren: node.$children$,
|
|
@@ -202,15 +278,6 @@ const convertToPublic = (node) => ({
|
|
|
202
278
|
vtag: node.$tag$,
|
|
203
279
|
vtext: node.$text$,
|
|
204
280
|
});
|
|
205
|
-
/**
|
|
206
|
-
* Convert a {@link d.ChildNode} back to an equivalent {@link d.VNode} in
|
|
207
|
-
* order to use the resulting object in the virtual DOM. The initial object was
|
|
208
|
-
* likely created as part of presenting a public API, so converting it back
|
|
209
|
-
* involved making it 'private' again (hence, `convertToPrivate`).
|
|
210
|
-
*
|
|
211
|
-
* @param node the child node to convert
|
|
212
|
-
* @returns a converted virtual DOM node
|
|
213
|
-
*/
|
|
214
281
|
const convertToPrivate = (node) => {
|
|
215
282
|
if (typeof node.vtag === 'function') {
|
|
216
283
|
const vnodeData = Object.assign({}, node.vattrs);
|
|
@@ -229,155 +296,6 @@ const convertToPrivate = (node) => {
|
|
|
229
296
|
vnode.$name$ = node.vname;
|
|
230
297
|
return vnode;
|
|
231
298
|
};
|
|
232
|
-
/**
|
|
233
|
-
* Parse a new property value for a given property type.
|
|
234
|
-
*
|
|
235
|
-
* While the prop value can reasonably be expected to be of `any` type as far as TypeScript's type checker is concerned,
|
|
236
|
-
* it is not safe to assume that the string returned by evaluating `typeof propValue` matches:
|
|
237
|
-
* 1. `any`, the type given to `propValue` in the function signature
|
|
238
|
-
* 2. the type stored from `propType`.
|
|
239
|
-
*
|
|
240
|
-
* This function provides the capability to parse/coerce a property's value to potentially any other JavaScript type.
|
|
241
|
-
*
|
|
242
|
-
* Property values represented in TSX preserve their type information. In the example below, the number 0 is passed to
|
|
243
|
-
* a component. This `propValue` will preserve its type information (`typeof propValue === 'number'`). Note that is
|
|
244
|
-
* based on the type of the value being passed in, not the type declared of the class member decorated with `@Prop`.
|
|
245
|
-
* ```tsx
|
|
246
|
-
* <my-cmp prop-val={0}></my-cmp>
|
|
247
|
-
* ```
|
|
248
|
-
*
|
|
249
|
-
* HTML prop values on the other hand, will always a string
|
|
250
|
-
*
|
|
251
|
-
* @param propValue the new value to coerce to some type
|
|
252
|
-
* @param propType the type of the prop, expressed as a binary number
|
|
253
|
-
* @returns the parsed/coerced value
|
|
254
|
-
*/
|
|
255
|
-
const parsePropertyValue = (propValue, propType) => {
|
|
256
|
-
// ensure this value is of the correct prop type
|
|
257
|
-
if (propValue != null && !isComplexType(propValue)) {
|
|
258
|
-
if (propType & 4 /* MEMBER_FLAGS.Boolean */) {
|
|
259
|
-
// per the HTML spec, any string value means it is a boolean true value
|
|
260
|
-
// but we'll cheat here and say that the string "false" is the boolean false
|
|
261
|
-
return propValue === 'false' ? false : propValue === '' || !!propValue;
|
|
262
|
-
}
|
|
263
|
-
if (propType & 2 /* MEMBER_FLAGS.Number */) {
|
|
264
|
-
// force it to be a number
|
|
265
|
-
return parseFloat(propValue);
|
|
266
|
-
}
|
|
267
|
-
if (propType & 1 /* MEMBER_FLAGS.String */) {
|
|
268
|
-
// could have been passed as a number or boolean
|
|
269
|
-
// but we still want it as a string
|
|
270
|
-
return String(propValue);
|
|
271
|
-
}
|
|
272
|
-
// redundant return here for better minification
|
|
273
|
-
return propValue;
|
|
274
|
-
}
|
|
275
|
-
// not sure exactly what type we want
|
|
276
|
-
// so no need to change to a different type
|
|
277
|
-
return propValue;
|
|
278
|
-
};
|
|
279
|
-
const getElement = (ref) => (getHostRef(ref).$hostElement$ );
|
|
280
|
-
const createEvent = (ref, name, flags) => {
|
|
281
|
-
const elm = getElement(ref);
|
|
282
|
-
return {
|
|
283
|
-
emit: (detail) => {
|
|
284
|
-
return emitEvent(elm, name, {
|
|
285
|
-
bubbles: !!(flags & 4 /* EVENT_FLAGS.Bubbles */),
|
|
286
|
-
composed: !!(flags & 2 /* EVENT_FLAGS.Composed */),
|
|
287
|
-
cancelable: !!(flags & 1 /* EVENT_FLAGS.Cancellable */),
|
|
288
|
-
detail,
|
|
289
|
-
});
|
|
290
|
-
},
|
|
291
|
-
};
|
|
292
|
-
};
|
|
293
|
-
/**
|
|
294
|
-
* Helper function to create & dispatch a custom Event on a provided target
|
|
295
|
-
* @param elm the target of the Event
|
|
296
|
-
* @param name the name to give the custom Event
|
|
297
|
-
* @param opts options for configuring a custom Event
|
|
298
|
-
* @returns the custom Event
|
|
299
|
-
*/
|
|
300
|
-
const emitEvent = (elm, name, opts) => {
|
|
301
|
-
const ev = plt.ce(name, opts);
|
|
302
|
-
elm.dispatchEvent(ev);
|
|
303
|
-
return ev;
|
|
304
|
-
};
|
|
305
|
-
const rootAppliedStyles = /*@__PURE__*/ new WeakMap();
|
|
306
|
-
const registerStyle = (scopeId, cssText, allowCS) => {
|
|
307
|
-
let style = styles.get(scopeId);
|
|
308
|
-
if (supportsConstructableStylesheets && allowCS) {
|
|
309
|
-
style = (style || new CSSStyleSheet());
|
|
310
|
-
if (typeof style === 'string') {
|
|
311
|
-
style = cssText;
|
|
312
|
-
}
|
|
313
|
-
else {
|
|
314
|
-
style.replaceSync(cssText);
|
|
315
|
-
}
|
|
316
|
-
}
|
|
317
|
-
else {
|
|
318
|
-
style = cssText;
|
|
319
|
-
}
|
|
320
|
-
styles.set(scopeId, style);
|
|
321
|
-
};
|
|
322
|
-
const addStyle = (styleContainerNode, cmpMeta, mode, hostElm) => {
|
|
323
|
-
var _a;
|
|
324
|
-
let scopeId = getScopeId(cmpMeta);
|
|
325
|
-
const style = styles.get(scopeId);
|
|
326
|
-
// if an element is NOT connected then getRootNode() will return the wrong root node
|
|
327
|
-
// so the fallback is to always use the document for the root node in those cases
|
|
328
|
-
styleContainerNode = styleContainerNode.nodeType === 11 /* NODE_TYPE.DocumentFragment */ ? styleContainerNode : doc;
|
|
329
|
-
if (style) {
|
|
330
|
-
if (typeof style === 'string') {
|
|
331
|
-
styleContainerNode = styleContainerNode.head || styleContainerNode;
|
|
332
|
-
let appliedStyles = rootAppliedStyles.get(styleContainerNode);
|
|
333
|
-
let styleElm;
|
|
334
|
-
if (!appliedStyles) {
|
|
335
|
-
rootAppliedStyles.set(styleContainerNode, (appliedStyles = new Set()));
|
|
336
|
-
}
|
|
337
|
-
if (!appliedStyles.has(scopeId)) {
|
|
338
|
-
{
|
|
339
|
-
{
|
|
340
|
-
styleElm = doc.createElement('style');
|
|
341
|
-
styleElm.innerHTML = style;
|
|
342
|
-
}
|
|
343
|
-
// Apply CSP nonce to the style tag if it exists
|
|
344
|
-
const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);
|
|
345
|
-
if (nonce != null) {
|
|
346
|
-
styleElm.setAttribute('nonce', nonce);
|
|
347
|
-
}
|
|
348
|
-
styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector('link'));
|
|
349
|
-
}
|
|
350
|
-
if (appliedStyles) {
|
|
351
|
-
appliedStyles.add(scopeId);
|
|
352
|
-
}
|
|
353
|
-
}
|
|
354
|
-
}
|
|
355
|
-
else if (!styleContainerNode.adoptedStyleSheets.includes(style)) {
|
|
356
|
-
styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
|
|
357
|
-
}
|
|
358
|
-
}
|
|
359
|
-
return scopeId;
|
|
360
|
-
};
|
|
361
|
-
const attachStyles = (hostRef) => {
|
|
362
|
-
const cmpMeta = hostRef.$cmpMeta$;
|
|
363
|
-
const elm = hostRef.$hostElement$;
|
|
364
|
-
const flags = cmpMeta.$flags$;
|
|
365
|
-
const endAttachStyles = createTime('attachStyles', cmpMeta.$tagName$);
|
|
366
|
-
const scopeId = addStyle(elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(), cmpMeta);
|
|
367
|
-
if (flags & 10 /* CMP_FLAGS.needsScopedEncapsulation */) {
|
|
368
|
-
// only required when we're NOT using native shadow dom (slot)
|
|
369
|
-
// or this browser doesn't support native shadow dom
|
|
370
|
-
// and this host element was NOT created with SSR
|
|
371
|
-
// let's pick out the inner content for slot projection
|
|
372
|
-
// create a node to represent where the original
|
|
373
|
-
// content was first placed, which is useful later on
|
|
374
|
-
// DOM WRITE!!
|
|
375
|
-
elm['s-sc'] = scopeId;
|
|
376
|
-
elm.classList.add(scopeId + '-h');
|
|
377
|
-
}
|
|
378
|
-
endAttachStyles();
|
|
379
|
-
};
|
|
380
|
-
const getScopeId = (cmp, mode) => 'sc-' + (cmp.$tagName$);
|
|
381
299
|
/**
|
|
382
300
|
* Production setAccessor() function based on Preact by
|
|
383
301
|
* Jason Miller (@developit)
|
|
@@ -475,7 +393,7 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
475
393
|
if ((isProp || (isComplex && newValue !== null)) && !isSvg) {
|
|
476
394
|
try {
|
|
477
395
|
if (!elm.tagName.includes('-')) {
|
|
478
|
-
|
|
396
|
+
let n = newValue == null ? '' : newValue;
|
|
479
397
|
// Workaround for Safari, moving the <input> caret when re-assigning the same valued
|
|
480
398
|
if (memberName === 'list') {
|
|
481
399
|
isProp = false;
|
|
@@ -514,7 +432,7 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
514
432
|
}
|
|
515
433
|
}
|
|
516
434
|
}
|
|
517
|
-
else if ((!isProp || flags & 4 /*
|
|
435
|
+
else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex) {
|
|
518
436
|
newValue = newValue === true ? '' : newValue;
|
|
519
437
|
if (xlink) {
|
|
520
438
|
elm.setAttributeNS(XLINK_NS, memberName, newValue);
|
|
@@ -532,7 +450,7 @@ const updateElement = (oldVnode, newVnode, isSvgMode, memberName) => {
|
|
|
532
450
|
// if the element passed in is a shadow root, which is a document fragment
|
|
533
451
|
// then we want to be adding attrs/props to the shadow root's "host" element
|
|
534
452
|
// if it's not a shadow root, then we add attrs/props to the same element
|
|
535
|
-
const elm = newVnode.$elm$.nodeType === 11 /*
|
|
453
|
+
const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host
|
|
536
454
|
? newVnode.$elm$.host
|
|
537
455
|
: newVnode.$elm$;
|
|
538
456
|
const oldVnodeAttrs = (oldVnode && oldVnode.$attrs$) || EMPTY_OBJ;
|
|
@@ -550,19 +468,9 @@ const updateElement = (oldVnode, newVnode, isSvgMode, memberName) => {
|
|
|
550
468
|
setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName], isSvgMode, newVnode.$flags$);
|
|
551
469
|
}
|
|
552
470
|
};
|
|
553
|
-
/**
|
|
554
|
-
* Create a DOM Node corresponding to one of the children of a given VNode.
|
|
555
|
-
*
|
|
556
|
-
* @param oldParentVNode the parent VNode from the previous render
|
|
557
|
-
* @param newParentVNode the parent VNode from the current render
|
|
558
|
-
* @param childIndex the index of the VNode, in the _new_ parent node's
|
|
559
|
-
* children, for which we will create a new DOM node
|
|
560
|
-
* @param parentElm the parent DOM node which our new node will be a child of
|
|
561
|
-
* @returns the newly created node
|
|
562
|
-
*/
|
|
563
471
|
const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
564
472
|
// tslint:disable-next-line: prefer-const
|
|
565
|
-
|
|
473
|
+
let newVNode = newParentVNode.$children$[childIndex];
|
|
566
474
|
let i = 0;
|
|
567
475
|
let elm;
|
|
568
476
|
let childNode;
|
|
@@ -577,16 +485,16 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
577
485
|
}
|
|
578
486
|
newVNode.$flags$ |= newVNode.$children$
|
|
579
487
|
? // slot element has fallback content
|
|
580
|
-
2 /*
|
|
488
|
+
2 /* isSlotFallback */
|
|
581
489
|
: // slot element does not have fallback content
|
|
582
|
-
1 /*
|
|
490
|
+
1 /* isSlotReference */;
|
|
583
491
|
}
|
|
584
492
|
}
|
|
585
493
|
if (newVNode.$text$ !== null) {
|
|
586
494
|
// create text node
|
|
587
495
|
elm = newVNode.$elm$ = doc.createTextNode(newVNode.$text$);
|
|
588
496
|
}
|
|
589
|
-
else if (newVNode.$flags$ & 1 /*
|
|
497
|
+
else if (newVNode.$flags$ & 1 /* isSlotReference */) {
|
|
590
498
|
// create a slot reference node
|
|
591
499
|
elm = newVNode.$elm$ =
|
|
592
500
|
doc.createTextNode('');
|
|
@@ -596,7 +504,7 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
596
504
|
isSvgMode = newVNode.$tag$ === 'svg';
|
|
597
505
|
}
|
|
598
506
|
// create element
|
|
599
|
-
elm = newVNode.$elm$ = (doc.createElementNS(isSvgMode ? SVG_NS : HTML_NS, newVNode.$flags$ & 2 /*
|
|
507
|
+
elm = newVNode.$elm$ = (doc.createElementNS(isSvgMode ? SVG_NS : HTML_NS, newVNode.$flags$ & 2 /* isSlotFallback */
|
|
600
508
|
? 'slot-fb'
|
|
601
509
|
: newVNode.$tag$)
|
|
602
510
|
);
|
|
@@ -636,7 +544,7 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
636
544
|
}
|
|
637
545
|
{
|
|
638
546
|
elm['s-hn'] = hostTagName;
|
|
639
|
-
if (newVNode.$flags$ & (2 /*
|
|
547
|
+
if (newVNode.$flags$ & (2 /* isSlotFallback */ | 1 /* isSlotReference */)) {
|
|
640
548
|
// remember the content reference comment
|
|
641
549
|
elm['s-sr'] = true;
|
|
642
550
|
// remember the content reference comment
|
|
@@ -655,7 +563,7 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
655
563
|
return elm;
|
|
656
564
|
};
|
|
657
565
|
const putBackInOriginalLocation = (parentElm, recursive) => {
|
|
658
|
-
plt.$flags$ |= 1 /*
|
|
566
|
+
plt.$flags$ |= 1 /* isTmpDisconnected */;
|
|
659
567
|
const oldSlotChildNodes = parentElm.childNodes;
|
|
660
568
|
for (let i = oldSlotChildNodes.length - 1; i >= 0; i--) {
|
|
661
569
|
const childNode = oldSlotChildNodes[i];
|
|
@@ -676,23 +584,8 @@ const putBackInOriginalLocation = (parentElm, recursive) => {
|
|
|
676
584
|
putBackInOriginalLocation(childNode, recursive);
|
|
677
585
|
}
|
|
678
586
|
}
|
|
679
|
-
plt.$flags$ &= ~1 /*
|
|
587
|
+
plt.$flags$ &= ~1 /* isTmpDisconnected */;
|
|
680
588
|
};
|
|
681
|
-
/**
|
|
682
|
-
* Create DOM nodes corresponding to a list of {@link d.Vnode} objects and
|
|
683
|
-
* add them to the DOM in the appropriate place.
|
|
684
|
-
*
|
|
685
|
-
* @param parentElm the DOM node which should be used as a parent for the new
|
|
686
|
-
* DOM nodes
|
|
687
|
-
* @param before a child of the `parentElm` which the new children should be
|
|
688
|
-
* inserted before (optional)
|
|
689
|
-
* @param parentVNode the parent virtual DOM node
|
|
690
|
-
* @param vnodes the new child virtual DOM nodes to produce DOM nodes for
|
|
691
|
-
* @param startIdx the index in the child virtual DOM nodes at which to start
|
|
692
|
-
* creating DOM nodes (inclusive)
|
|
693
|
-
* @param endIdx the index in the child virtual DOM nodes at which to stop
|
|
694
|
-
* creating DOM nodes (inclusive)
|
|
695
|
-
*/
|
|
696
589
|
const addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
|
|
697
590
|
let containerElm = ((parentElm['s-cr'] && parentElm['s-cr'].parentNode) || parentElm);
|
|
698
591
|
let childNode;
|
|
@@ -709,19 +602,6 @@ const addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) =>
|
|
|
709
602
|
}
|
|
710
603
|
}
|
|
711
604
|
};
|
|
712
|
-
/**
|
|
713
|
-
* Remove the DOM elements corresponding to a list of {@link d.VNode} objects.
|
|
714
|
-
* This can be used to, for instance, clean up after a list of children which
|
|
715
|
-
* should no longer be shown.
|
|
716
|
-
*
|
|
717
|
-
* This function also handles some of Stencil's slot relocation logic.
|
|
718
|
-
*
|
|
719
|
-
* @param vnodes a list of virtual DOM nodes to remove
|
|
720
|
-
* @param startIdx the index at which to start removing nodes (inclusive)
|
|
721
|
-
* @param endIdx the index at which to stop removing nodes (inclusive)
|
|
722
|
-
* @param vnode a VNode
|
|
723
|
-
* @param elm an element
|
|
724
|
-
*/
|
|
725
605
|
const removeVnodes = (vnodes, startIdx, endIdx, vnode, elm) => {
|
|
726
606
|
for (; startIdx <= endIdx; ++startIdx) {
|
|
727
607
|
if ((vnode = vnodes[startIdx])) {
|
|
@@ -746,74 +626,6 @@ const removeVnodes = (vnodes, startIdx, endIdx, vnode, elm) => {
|
|
|
746
626
|
}
|
|
747
627
|
}
|
|
748
628
|
};
|
|
749
|
-
/**
|
|
750
|
-
* Reconcile the children of a new VNode with the children of an old VNode by
|
|
751
|
-
* traversing the two collections of children, identifying nodes that are
|
|
752
|
-
* conserved or changed, calling out to `patch` to make any necessary
|
|
753
|
-
* updates to the DOM, and rearranging DOM nodes as needed.
|
|
754
|
-
*
|
|
755
|
-
* The algorithm for reconciling children works by analyzing two 'windows' onto
|
|
756
|
-
* the two arrays of children (`oldCh` and `newCh`). We keep track of the
|
|
757
|
-
* 'windows' by storing start and end indices and references to the
|
|
758
|
-
* corresponding array entries. Initially the two 'windows' are basically equal
|
|
759
|
-
* to the entire array, but we progressively narrow the windows until there are
|
|
760
|
-
* no children left to update by doing the following:
|
|
761
|
-
*
|
|
762
|
-
* 1. Skip any `null` entries at the beginning or end of the two arrays, so
|
|
763
|
-
* that if we have an initial array like the following we'll end up dealing
|
|
764
|
-
* only with a window bounded by the highlighted elements:
|
|
765
|
-
*
|
|
766
|
-
* [null, null, VNode1 , ... , VNode2, null, null]
|
|
767
|
-
* ^^^^^^ ^^^^^^
|
|
768
|
-
*
|
|
769
|
-
* 2. Check to see if the elements at the head and tail positions are equal
|
|
770
|
-
* across the windows. This will basically detect elements which haven't
|
|
771
|
-
* been added, removed, or changed position, i.e. if you had the following
|
|
772
|
-
* VNode elements (represented as HTML):
|
|
773
|
-
*
|
|
774
|
-
* oldVNode: `<div><p><span>HEY</span></p></div>`
|
|
775
|
-
* newVNode: `<div><p><span>THERE</span></p></div>`
|
|
776
|
-
*
|
|
777
|
-
* Then when comparing the children of the `<div>` tag we check the equality
|
|
778
|
-
* of the VNodes corresponding to the `<p>` tags and, since they are the
|
|
779
|
-
* same tag in the same position, we'd be able to avoid completely
|
|
780
|
-
* re-rendering the subtree under them with a new DOM element and would just
|
|
781
|
-
* call out to `patch` to handle reconciling their children and so on.
|
|
782
|
-
*
|
|
783
|
-
* 3. Check, for both windows, to see if the element at the beginning of the
|
|
784
|
-
* window corresponds to the element at the end of the other window. This is
|
|
785
|
-
* a heuristic which will let us identify _some_ situations in which
|
|
786
|
-
* elements have changed position, for instance it _should_ detect that the
|
|
787
|
-
* children nodes themselves have not changed but merely moved in the
|
|
788
|
-
* following example:
|
|
789
|
-
*
|
|
790
|
-
* oldVNode: `<div><element-one /><element-two /></div>`
|
|
791
|
-
* newVNode: `<div><element-two /><element-one /></div>`
|
|
792
|
-
*
|
|
793
|
-
* If we find cases like this then we also need to move the concrete DOM
|
|
794
|
-
* elements corresponding to the moved children to write the re-order to the
|
|
795
|
-
* DOM.
|
|
796
|
-
*
|
|
797
|
-
* 4. Finally, if VNodes have the `key` attribute set on them we check for any
|
|
798
|
-
* nodes in the old children which have the same key as the first element in
|
|
799
|
-
* our window on the new children. If we find such a node we handle calling
|
|
800
|
-
* out to `patch`, moving relevant DOM nodes, and so on, in accordance with
|
|
801
|
-
* what we find.
|
|
802
|
-
*
|
|
803
|
-
* Finally, once we've narrowed our 'windows' to the point that either of them
|
|
804
|
-
* collapse (i.e. they have length 0) we then handle any remaining VNode
|
|
805
|
-
* insertion or deletion that needs to happen to get a DOM state that correctly
|
|
806
|
-
* reflects the new child VNodes. If, for instance, after our window on the old
|
|
807
|
-
* children has collapsed we still have more nodes on the new children that
|
|
808
|
-
* we haven't dealt with yet then we need to add them, or if the new children
|
|
809
|
-
* collapse but we still have unhandled _old_ children then we need to make
|
|
810
|
-
* sure the corresponding DOM nodes are removed.
|
|
811
|
-
*
|
|
812
|
-
* @param parentElm the node into which the parent VNode is rendered
|
|
813
|
-
* @param oldCh the old children of the parent node
|
|
814
|
-
* @param newVNode the new VNode which will replace the parent
|
|
815
|
-
* @param newCh the new children of the parent node
|
|
816
|
-
*/
|
|
817
629
|
const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
818
630
|
let oldStartIdx = 0;
|
|
819
631
|
let newStartIdx = 0;
|
|
@@ -829,7 +641,7 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
|
829
641
|
let elmToMove;
|
|
830
642
|
while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {
|
|
831
643
|
if (oldStartVnode == null) {
|
|
832
|
-
//
|
|
644
|
+
// Vnode might have been moved left
|
|
833
645
|
oldStartVnode = oldCh[++oldStartIdx];
|
|
834
646
|
}
|
|
835
647
|
else if (oldEndVnode == null) {
|
|
@@ -842,100 +654,37 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
|
842
654
|
newEndVnode = newCh[--newEndIdx];
|
|
843
655
|
}
|
|
844
656
|
else if (isSameVnode(oldStartVnode, newStartVnode)) {
|
|
845
|
-
// if the start nodes are the same then we should patch the new VNode
|
|
846
|
-
// onto the old one, and increment our `newStartIdx` and `oldStartIdx`
|
|
847
|
-
// indices to reflect that. We don't need to move any DOM Nodes around
|
|
848
|
-
// since things are matched up in order.
|
|
849
657
|
patch(oldStartVnode, newStartVnode);
|
|
850
658
|
oldStartVnode = oldCh[++oldStartIdx];
|
|
851
659
|
newStartVnode = newCh[++newStartIdx];
|
|
852
660
|
}
|
|
853
661
|
else if (isSameVnode(oldEndVnode, newEndVnode)) {
|
|
854
|
-
// likewise, if the end nodes are the same we patch new onto old and
|
|
855
|
-
// decrement our end indices, and also likewise in this case we don't
|
|
856
|
-
// need to move any DOM Nodes.
|
|
857
662
|
patch(oldEndVnode, newEndVnode);
|
|
858
663
|
oldEndVnode = oldCh[--oldEndIdx];
|
|
859
664
|
newEndVnode = newCh[--newEndIdx];
|
|
860
665
|
}
|
|
861
666
|
else if (isSameVnode(oldStartVnode, newEndVnode)) {
|
|
862
|
-
//
|
|
863
|
-
//
|
|
864
|
-
// We've found that the last node in our window on the new children is
|
|
865
|
-
// the same VNode as the _first_ node in our window on the old children
|
|
866
|
-
// we're dealing with now. Visually, this is the layout of these two
|
|
867
|
-
// nodes:
|
|
868
|
-
//
|
|
869
|
-
// newCh: [..., newStartVnode , ... , newEndVnode , ...]
|
|
870
|
-
// ^^^^^^^^^^^
|
|
871
|
-
// oldCh: [..., oldStartVnode , ... , oldEndVnode , ...]
|
|
872
|
-
// ^^^^^^^^^^^^^
|
|
873
|
-
//
|
|
874
|
-
// In this situation we need to patch `newEndVnode` onto `oldStartVnode`
|
|
875
|
-
// and move the DOM element for `oldStartVnode`.
|
|
667
|
+
// Vnode moved right
|
|
876
668
|
if ((oldStartVnode.$tag$ === 'slot' || newEndVnode.$tag$ === 'slot')) {
|
|
877
669
|
putBackInOriginalLocation(oldStartVnode.$elm$.parentNode, false);
|
|
878
670
|
}
|
|
879
671
|
patch(oldStartVnode, newEndVnode);
|
|
880
|
-
// We need to move the element for `oldStartVnode` into a position which
|
|
881
|
-
// will be appropriate for `newEndVnode`. For this we can use
|
|
882
|
-
// `.insertBefore` and `oldEndVnode.$elm$.nextSibling`. If there is a
|
|
883
|
-
// sibling for `oldEndVnode.$elm$` then we want to move the DOM node for
|
|
884
|
-
// `oldStartVnode` between `oldEndVnode` and it's sibling, like so:
|
|
885
|
-
//
|
|
886
|
-
// <old-start-node />
|
|
887
|
-
// <some-intervening-node />
|
|
888
|
-
// <old-end-node />
|
|
889
|
-
// <!-- -> <-- `oldStartVnode.$elm$` should be inserted here
|
|
890
|
-
// <next-sibling />
|
|
891
|
-
//
|
|
892
|
-
// If instead `oldEndVnode.$elm$` has no sibling then we just want to put
|
|
893
|
-
// the node for `oldStartVnode` at the end of the children of
|
|
894
|
-
// `parentElm`. Luckily, `Node.nextSibling` will return `null` if there
|
|
895
|
-
// aren't any siblings, and passing `null` to `Node.insertBefore` will
|
|
896
|
-
// append it to the children of the parent element.
|
|
897
672
|
parentElm.insertBefore(oldStartVnode.$elm$, oldEndVnode.$elm$.nextSibling);
|
|
898
673
|
oldStartVnode = oldCh[++oldStartIdx];
|
|
899
674
|
newEndVnode = newCh[--newEndIdx];
|
|
900
675
|
}
|
|
901
676
|
else if (isSameVnode(oldEndVnode, newStartVnode)) {
|
|
902
|
-
//
|
|
903
|
-
//
|
|
904
|
-
// We've found that the first node in our window on the new children is
|
|
905
|
-
// the same VNode as the _last_ node in our window on the old children.
|
|
906
|
-
// Visually, this is the layout of these two nodes:
|
|
907
|
-
//
|
|
908
|
-
// newCh: [..., newStartVnode , ... , newEndVnode , ...]
|
|
909
|
-
// ^^^^^^^^^^^^^
|
|
910
|
-
// oldCh: [..., oldStartVnode , ... , oldEndVnode , ...]
|
|
911
|
-
// ^^^^^^^^^^^
|
|
912
|
-
//
|
|
913
|
-
// In this situation we need to patch `newStartVnode` onto `oldEndVnode`
|
|
914
|
-
// (which will handle updating any changed attributes, reconciling their
|
|
915
|
-
// children etc) but we also need to move the DOM node to which
|
|
916
|
-
// `oldEndVnode` corresponds.
|
|
677
|
+
// Vnode moved left
|
|
917
678
|
if ((oldStartVnode.$tag$ === 'slot' || newEndVnode.$tag$ === 'slot')) {
|
|
918
679
|
putBackInOriginalLocation(oldEndVnode.$elm$.parentNode, false);
|
|
919
680
|
}
|
|
920
681
|
patch(oldEndVnode, newStartVnode);
|
|
921
|
-
// We've already checked above if `oldStartVnode` and `newStartVnode` are
|
|
922
|
-
// the same node, so since we're here we know that they are not. Thus we
|
|
923
|
-
// can move the element for `oldEndVnode` _before_ the element for
|
|
924
|
-
// `oldStartVnode`, leaving `oldStartVnode` to be reconciled in the
|
|
925
|
-
// future.
|
|
926
682
|
parentElm.insertBefore(oldEndVnode.$elm$, oldStartVnode.$elm$);
|
|
927
683
|
oldEndVnode = oldCh[--oldEndIdx];
|
|
928
684
|
newStartVnode = newCh[++newStartIdx];
|
|
929
685
|
}
|
|
930
686
|
else {
|
|
931
|
-
//
|
|
932
|
-
// `$key$` attribute, which is set by putting a `key="my-key"` attribute
|
|
933
|
-
// in the JSX for a DOM element in the implementation of a Stencil
|
|
934
|
-
// component.
|
|
935
|
-
//
|
|
936
|
-
// First we check to see if there are any nodes in the array of old
|
|
937
|
-
// children which have the same key as the first node in the new
|
|
938
|
-
// children.
|
|
687
|
+
// createKeyToOldIdx
|
|
939
688
|
idxInOld = -1;
|
|
940
689
|
{
|
|
941
690
|
for (i = oldStartIdx; i <= oldEndIdx; ++i) {
|
|
@@ -946,32 +695,23 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
|
946
695
|
}
|
|
947
696
|
}
|
|
948
697
|
if (idxInOld >= 0) {
|
|
949
|
-
// We found a node in the old children which matches up with the first
|
|
950
|
-
// node in the new children! So let's deal with that
|
|
951
698
|
elmToMove = oldCh[idxInOld];
|
|
952
699
|
if (elmToMove.$tag$ !== newStartVnode.$tag$) {
|
|
953
|
-
// the tag doesn't match so we'll need a new DOM element
|
|
954
700
|
node = createElm(oldCh && oldCh[newStartIdx], newVNode, idxInOld, parentElm);
|
|
955
701
|
}
|
|
956
702
|
else {
|
|
957
703
|
patch(elmToMove, newStartVnode);
|
|
958
|
-
// invalidate the matching old node so that we won't try to update it
|
|
959
|
-
// again later on
|
|
960
704
|
oldCh[idxInOld] = undefined;
|
|
961
705
|
node = elmToMove.$elm$;
|
|
962
706
|
}
|
|
963
707
|
newStartVnode = newCh[++newStartIdx];
|
|
964
708
|
}
|
|
965
709
|
else {
|
|
966
|
-
//
|
|
967
|
-
// the key of the first new child OR the build is not using `key`
|
|
968
|
-
// attributes at all. In either case we need to create a new element
|
|
969
|
-
// for the new node.
|
|
710
|
+
// new element
|
|
970
711
|
node = createElm(oldCh && oldCh[newStartIdx], newVNode, newStartIdx, parentElm);
|
|
971
712
|
newStartVnode = newCh[++newStartIdx];
|
|
972
713
|
}
|
|
973
714
|
if (node) {
|
|
974
|
-
// if we created a new node then handle inserting it to the DOM
|
|
975
715
|
{
|
|
976
716
|
parentReferenceNode(oldStartVnode.$elm$).insertBefore(node, referenceNode(oldStartVnode.$elm$));
|
|
977
717
|
}
|
|
@@ -979,44 +719,21 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
|
979
719
|
}
|
|
980
720
|
}
|
|
981
721
|
if (oldStartIdx > oldEndIdx) {
|
|
982
|
-
// we have some more new nodes to add which don't match up with old nodes
|
|
983
722
|
addVnodes(parentElm, newCh[newEndIdx + 1] == null ? null : newCh[newEndIdx + 1].$elm$, newVNode, newCh, newStartIdx, newEndIdx);
|
|
984
723
|
}
|
|
985
724
|
else if (newStartIdx > newEndIdx) {
|
|
986
|
-
// there are nodes in the `oldCh` array which no longer correspond to nodes
|
|
987
|
-
// in the new array, so lets remove them (which entails cleaning up the
|
|
988
|
-
// relevant DOM nodes)
|
|
989
725
|
removeVnodes(oldCh, oldStartIdx, oldEndIdx);
|
|
990
726
|
}
|
|
991
727
|
};
|
|
992
|
-
|
|
993
|
-
* Compare two VNodes to determine if they are the same
|
|
994
|
-
*
|
|
995
|
-
* **NB**: This function is an equality _heuristic_ based on the available
|
|
996
|
-
* information set on the two VNodes and can be misleading under certain
|
|
997
|
-
* circumstances. In particular, if the two nodes do not have `key` attrs
|
|
998
|
-
* (available under `$key$` on VNodes) then the function falls back on merely
|
|
999
|
-
* checking that they have the same tag.
|
|
1000
|
-
*
|
|
1001
|
-
* So, in other words, if `key` attrs are not set on VNodes which may be
|
|
1002
|
-
* changing order within a `children` array or something along those lines then
|
|
1003
|
-
* we could obtain a false negative and then have to do needless re-rendering
|
|
1004
|
-
* (i.e. we'd say two VNodes aren't equal when in fact they should be).
|
|
1005
|
-
*
|
|
1006
|
-
* @param leftVNode the first VNode to check
|
|
1007
|
-
* @param rightVNode the second VNode to check
|
|
1008
|
-
* @returns whether they're equal or not
|
|
1009
|
-
*/
|
|
1010
|
-
const isSameVnode = (leftVNode, rightVNode) => {
|
|
728
|
+
const isSameVnode = (vnode1, vnode2) => {
|
|
1011
729
|
// compare if two vnode to see if they're "technically" the same
|
|
1012
730
|
// need to have the same element tag, and same key to be the same
|
|
1013
|
-
if (
|
|
1014
|
-
if (
|
|
1015
|
-
return
|
|
731
|
+
if (vnode1.$tag$ === vnode2.$tag$) {
|
|
732
|
+
if (vnode1.$tag$ === 'slot') {
|
|
733
|
+
return vnode1.$name$ === vnode2.$name$;
|
|
1016
734
|
}
|
|
1017
|
-
// this will be set if components in the build have `key` attrs set on them
|
|
1018
735
|
{
|
|
1019
|
-
return
|
|
736
|
+
return vnode1.$key$ === vnode2.$key$;
|
|
1020
737
|
}
|
|
1021
738
|
}
|
|
1022
739
|
return false;
|
|
@@ -1029,14 +746,6 @@ const referenceNode = (node) => {
|
|
|
1029
746
|
return (node && node['s-ol']) || node;
|
|
1030
747
|
};
|
|
1031
748
|
const parentReferenceNode = (node) => (node['s-ol'] ? node['s-ol'] : node).parentNode;
|
|
1032
|
-
/**
|
|
1033
|
-
* Handle reconciling an outdated VNode with a new one which corresponds to
|
|
1034
|
-
* it. This function handles flushing updates to the DOM and reconciling the
|
|
1035
|
-
* children of the two nodes (if any).
|
|
1036
|
-
*
|
|
1037
|
-
* @param oldVNode an old VNode whose DOM element and children we want to update
|
|
1038
|
-
* @param newVNode a new VNode representing an updated version of the old one
|
|
1039
|
-
*/
|
|
1040
749
|
const patch = (oldVNode, newVNode) => {
|
|
1041
750
|
const elm = (newVNode.$elm$ = oldVNode.$elm$);
|
|
1042
751
|
const oldChildren = oldVNode.$children$;
|
|
@@ -1050,6 +759,7 @@ const patch = (oldVNode, newVNode) => {
|
|
|
1050
759
|
// only add this to the when the compiler sees we're using an svg somewhere
|
|
1051
760
|
isSvgMode = tag === 'svg' ? true : tag === 'foreignObject' ? false : isSvgMode;
|
|
1052
761
|
}
|
|
762
|
+
// element node
|
|
1053
763
|
{
|
|
1054
764
|
if (tag === 'slot')
|
|
1055
765
|
;
|
|
@@ -1062,7 +772,6 @@ const patch = (oldVNode, newVNode) => {
|
|
|
1062
772
|
}
|
|
1063
773
|
if (oldChildren !== null && newChildren !== null) {
|
|
1064
774
|
// looks like there's child vnodes for both the old and new vnodes
|
|
1065
|
-
// so we need to call `updateChildren` to reconcile them
|
|
1066
775
|
updateChildren(elm, oldChildren, newVNode, newChildren);
|
|
1067
776
|
}
|
|
1068
777
|
else if (newChildren !== null) {
|
|
@@ -1094,7 +803,7 @@ const patch = (oldVNode, newVNode) => {
|
|
|
1094
803
|
};
|
|
1095
804
|
const updateFallbackSlotVisibility = (elm) => {
|
|
1096
805
|
// tslint:disable-next-line: prefer-const
|
|
1097
|
-
|
|
806
|
+
let childNodes = elm.childNodes;
|
|
1098
807
|
let childNode;
|
|
1099
808
|
let i;
|
|
1100
809
|
let ilen;
|
|
@@ -1103,7 +812,7 @@ const updateFallbackSlotVisibility = (elm) => {
|
|
|
1103
812
|
let nodeType;
|
|
1104
813
|
for (i = 0, ilen = childNodes.length; i < ilen; i++) {
|
|
1105
814
|
childNode = childNodes[i];
|
|
1106
|
-
if (childNode.nodeType === 1 /*
|
|
815
|
+
if (childNode.nodeType === 1 /* ElementNode */) {
|
|
1107
816
|
if (childNode['s-sr']) {
|
|
1108
817
|
// this is a slot fallback node
|
|
1109
818
|
// get the slot name for this slot reference node
|
|
@@ -1115,7 +824,7 @@ const updateFallbackSlotVisibility = (elm) => {
|
|
|
1115
824
|
nodeType = childNodes[j].nodeType;
|
|
1116
825
|
if (childNodes[j]['s-hn'] !== childNode['s-hn'] || slotNameAttr !== '') {
|
|
1117
826
|
// this sibling node is from a different component OR is a named fallback slot node
|
|
1118
|
-
if (nodeType === 1 /*
|
|
827
|
+
if (nodeType === 1 /* ElementNode */ && slotNameAttr === childNodes[j].getAttribute('slot')) {
|
|
1119
828
|
childNode.hidden = true;
|
|
1120
829
|
break;
|
|
1121
830
|
}
|
|
@@ -1124,8 +833,8 @@ const updateFallbackSlotVisibility = (elm) => {
|
|
|
1124
833
|
// this is a default fallback slot node
|
|
1125
834
|
// any element or text node (with content)
|
|
1126
835
|
// should hide the default fallback slot node
|
|
1127
|
-
if (nodeType === 1 /*
|
|
1128
|
-
(nodeType === 3 /*
|
|
836
|
+
if (nodeType === 1 /* ElementNode */ ||
|
|
837
|
+
(nodeType === 3 /* TextNode */ && childNodes[j].textContent.trim() !== '')) {
|
|
1129
838
|
childNode.hidden = true;
|
|
1130
839
|
break;
|
|
1131
840
|
}
|
|
@@ -1147,8 +856,8 @@ const relocateSlotContent = (elm) => {
|
|
|
1147
856
|
let relocateNodeData;
|
|
1148
857
|
let j;
|
|
1149
858
|
let i = 0;
|
|
1150
|
-
|
|
1151
|
-
|
|
859
|
+
let childNodes = elm.childNodes;
|
|
860
|
+
let ilen = childNodes.length;
|
|
1152
861
|
for (; i < ilen; i++) {
|
|
1153
862
|
childNode = childNodes[i];
|
|
1154
863
|
if (childNode['s-sr'] && (node = childNode['s-cr']) && node.parentNode) {
|
|
@@ -1203,13 +912,13 @@ const relocateSlotContent = (elm) => {
|
|
|
1203
912
|
}
|
|
1204
913
|
}
|
|
1205
914
|
}
|
|
1206
|
-
if (childNode.nodeType === 1 /*
|
|
915
|
+
if (childNode.nodeType === 1 /* ElementNode */) {
|
|
1207
916
|
relocateSlotContent(childNode);
|
|
1208
917
|
}
|
|
1209
918
|
}
|
|
1210
919
|
};
|
|
1211
920
|
const isNodeLocatedInSlot = (nodeToRelocate, slotNameAttr) => {
|
|
1212
|
-
if (nodeToRelocate.nodeType === 1 /*
|
|
921
|
+
if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
|
1213
922
|
if (nodeToRelocate.getAttribute('slot') === null && slotNameAttr === '') {
|
|
1214
923
|
return true;
|
|
1215
924
|
}
|
|
@@ -1229,18 +938,6 @@ const callNodeRefs = (vNode) => {
|
|
|
1229
938
|
vNode.$children$ && vNode.$children$.map(callNodeRefs);
|
|
1230
939
|
}
|
|
1231
940
|
};
|
|
1232
|
-
/**
|
|
1233
|
-
* The main entry point for Stencil's virtual DOM-based rendering engine
|
|
1234
|
-
*
|
|
1235
|
-
* Given a {@link d.HostRef} container and some virtual DOM nodes, this
|
|
1236
|
-
* function will handle creating a virtual DOM tree with a single root, patching
|
|
1237
|
-
* the current virtual DOM tree onto an old one (if any), dealing with slot
|
|
1238
|
-
* relocation, and reflecting attributes.
|
|
1239
|
-
*
|
|
1240
|
-
* @param hostRef data needed to root and render the virtual DOM tree, such as
|
|
1241
|
-
* the DOM node into which it should be rendered.
|
|
1242
|
-
* @param renderFnResults the virtual DOM nodes to be rendered
|
|
1243
|
-
*/
|
|
1244
941
|
const renderVdom = (hostRef, renderFnResults) => {
|
|
1245
942
|
const hostElm = hostRef.$hostElement$;
|
|
1246
943
|
const cmpMeta = hostRef.$cmpMeta$;
|
|
@@ -1252,7 +949,7 @@ const renderVdom = (hostRef, renderFnResults) => {
|
|
|
1252
949
|
cmpMeta.$attrsToReflect$.map(([propName, attribute]) => (rootVnode.$attrs$[attribute] = hostElm[propName]));
|
|
1253
950
|
}
|
|
1254
951
|
rootVnode.$tag$ = null;
|
|
1255
|
-
rootVnode.$flags$ |= 4 /*
|
|
952
|
+
rootVnode.$flags$ |= 4 /* isHost */;
|
|
1256
953
|
hostRef.$vnode$ = rootVnode;
|
|
1257
954
|
rootVnode.$elm$ = oldVNode.$elm$ = (hostElm.shadowRoot || hostElm );
|
|
1258
955
|
{
|
|
@@ -1260,7 +957,7 @@ const renderVdom = (hostRef, renderFnResults) => {
|
|
|
1260
957
|
}
|
|
1261
958
|
{
|
|
1262
959
|
contentRef = hostElm['s-cr'];
|
|
1263
|
-
useNativeShadowDom = (cmpMeta.$flags$ & 1 /*
|
|
960
|
+
useNativeShadowDom = (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) !== 0;
|
|
1264
961
|
// always reset
|
|
1265
962
|
checkSlotFallbackVisibility = false;
|
|
1266
963
|
}
|
|
@@ -1269,7 +966,7 @@ const renderVdom = (hostRef, renderFnResults) => {
|
|
|
1269
966
|
{
|
|
1270
967
|
// while we're moving nodes around existing nodes, temporarily disable
|
|
1271
968
|
// the disconnectCallback from working
|
|
1272
|
-
plt.$flags$ |= 1 /*
|
|
969
|
+
plt.$flags$ |= 1 /* isTmpDisconnected */;
|
|
1273
970
|
if (checkSlotRelocate) {
|
|
1274
971
|
relocateSlotContent(rootVnode.$elm$);
|
|
1275
972
|
let relocateData;
|
|
@@ -1327,7 +1024,7 @@ const renderVdom = (hostRef, renderFnResults) => {
|
|
|
1327
1024
|
}
|
|
1328
1025
|
else {
|
|
1329
1026
|
// this node doesn't have a slot home to go to, so let's hide it
|
|
1330
|
-
if (nodeToRelocate.nodeType === 1 /*
|
|
1027
|
+
if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
|
1331
1028
|
nodeToRelocate.hidden = true;
|
|
1332
1029
|
}
|
|
1333
1030
|
}
|
|
@@ -1338,11 +1035,37 @@ const renderVdom = (hostRef, renderFnResults) => {
|
|
|
1338
1035
|
}
|
|
1339
1036
|
// done moving nodes around
|
|
1340
1037
|
// allow the disconnect callback to work again
|
|
1341
|
-
plt.$flags$ &= ~1 /*
|
|
1038
|
+
plt.$flags$ &= ~1 /* isTmpDisconnected */;
|
|
1342
1039
|
// always reset
|
|
1343
1040
|
relocateNodes.length = 0;
|
|
1344
1041
|
}
|
|
1345
1042
|
};
|
|
1043
|
+
const getElement = (ref) => (getHostRef(ref).$hostElement$ );
|
|
1044
|
+
const createEvent = (ref, name, flags) => {
|
|
1045
|
+
const elm = getElement(ref);
|
|
1046
|
+
return {
|
|
1047
|
+
emit: (detail) => {
|
|
1048
|
+
return emitEvent(elm, name, {
|
|
1049
|
+
bubbles: !!(flags & 4 /* Bubbles */),
|
|
1050
|
+
composed: !!(flags & 2 /* Composed */),
|
|
1051
|
+
cancelable: !!(flags & 1 /* Cancellable */),
|
|
1052
|
+
detail,
|
|
1053
|
+
});
|
|
1054
|
+
},
|
|
1055
|
+
};
|
|
1056
|
+
};
|
|
1057
|
+
/**
|
|
1058
|
+
* Helper function to create & dispatch a custom Event on a provided target
|
|
1059
|
+
* @param elm the target of the Event
|
|
1060
|
+
* @param name the name to give the custom Event
|
|
1061
|
+
* @param opts options for configuring a custom Event
|
|
1062
|
+
* @returns the custom Event
|
|
1063
|
+
*/
|
|
1064
|
+
const emitEvent = (elm, name, opts) => {
|
|
1065
|
+
const ev = plt.ce(name, opts);
|
|
1066
|
+
elm.dispatchEvent(ev);
|
|
1067
|
+
return ev;
|
|
1068
|
+
};
|
|
1346
1069
|
const attachToAncestor = (hostRef, ancestorComponent) => {
|
|
1347
1070
|
if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent['s-p']) {
|
|
1348
1071
|
ancestorComponent['s-p'].push(new Promise((r) => (hostRef.$onRenderResolve$ = r)));
|
|
@@ -1350,10 +1073,10 @@ const attachToAncestor = (hostRef, ancestorComponent) => {
|
|
|
1350
1073
|
};
|
|
1351
1074
|
const scheduleUpdate = (hostRef, isInitialLoad) => {
|
|
1352
1075
|
{
|
|
1353
|
-
hostRef.$flags$ |= 16 /*
|
|
1076
|
+
hostRef.$flags$ |= 16 /* isQueuedForUpdate */;
|
|
1354
1077
|
}
|
|
1355
|
-
if (hostRef.$flags$ & 4 /*
|
|
1356
|
-
hostRef.$flags$ |= 512 /*
|
|
1078
|
+
if (hostRef.$flags$ & 4 /* isWaitingForChildren */) {
|
|
1079
|
+
hostRef.$flags$ |= 512 /* needsRerender */;
|
|
1357
1080
|
return;
|
|
1358
1081
|
}
|
|
1359
1082
|
attachToAncestor(hostRef, hostRef.$ancestorComponent$);
|
|
@@ -1369,7 +1092,7 @@ const dispatchHooks = (hostRef, isInitialLoad) => {
|
|
|
1369
1092
|
let promise;
|
|
1370
1093
|
if (isInitialLoad) {
|
|
1371
1094
|
{
|
|
1372
|
-
hostRef.$flags$ |= 256 /*
|
|
1095
|
+
hostRef.$flags$ |= 256 /* isListenReady */;
|
|
1373
1096
|
if (hostRef.$queuedListeners$) {
|
|
1374
1097
|
hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event));
|
|
1375
1098
|
hostRef.$queuedListeners$ = null;
|
|
@@ -1415,7 +1138,7 @@ const updateComponent = async (hostRef, instance, isInitialLoad) => {
|
|
|
1415
1138
|
}
|
|
1416
1139
|
else {
|
|
1417
1140
|
Promise.all(childrenPromises).then(postUpdate);
|
|
1418
|
-
hostRef.$flags$ |= 4 /*
|
|
1141
|
+
hostRef.$flags$ |= 4 /* isWaitingForChildren */;
|
|
1419
1142
|
childrenPromises.length = 0;
|
|
1420
1143
|
}
|
|
1421
1144
|
}
|
|
@@ -1425,10 +1148,10 @@ const callRender = (hostRef, instance, elm) => {
|
|
|
1425
1148
|
renderingRef = instance;
|
|
1426
1149
|
instance = instance.render() ;
|
|
1427
1150
|
{
|
|
1428
|
-
hostRef.$flags$ &= ~16 /*
|
|
1151
|
+
hostRef.$flags$ &= ~16 /* isQueuedForUpdate */;
|
|
1429
1152
|
}
|
|
1430
1153
|
{
|
|
1431
|
-
hostRef.$flags$ |= 2 /*
|
|
1154
|
+
hostRef.$flags$ |= 2 /* hasRendered */;
|
|
1432
1155
|
}
|
|
1433
1156
|
{
|
|
1434
1157
|
{
|
|
@@ -1457,8 +1180,8 @@ const postUpdateComponent = (hostRef) => {
|
|
|
1457
1180
|
{
|
|
1458
1181
|
safeCall(instance, 'componentDidRender');
|
|
1459
1182
|
}
|
|
1460
|
-
if (!(hostRef.$flags$ & 64 /*
|
|
1461
|
-
hostRef.$flags$ |= 64 /*
|
|
1183
|
+
if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
|
|
1184
|
+
hostRef.$flags$ |= 64 /* hasLoadedComponent */;
|
|
1462
1185
|
{
|
|
1463
1186
|
// DOM WRITE!
|
|
1464
1187
|
addHydratedFlag(elm);
|
|
@@ -1487,10 +1210,10 @@ const postUpdateComponent = (hostRef) => {
|
|
|
1487
1210
|
hostRef.$onRenderResolve$();
|
|
1488
1211
|
hostRef.$onRenderResolve$ = undefined;
|
|
1489
1212
|
}
|
|
1490
|
-
if (hostRef.$flags$ & 512 /*
|
|
1213
|
+
if (hostRef.$flags$ & 512 /* needsRerender */) {
|
|
1491
1214
|
nextTick(() => scheduleUpdate(hostRef, false));
|
|
1492
1215
|
}
|
|
1493
|
-
hostRef.$flags$ &= ~(4 /*
|
|
1216
|
+
hostRef.$flags$ &= ~(4 /* isWaitingForChildren */ | 512 /* needsRerender */);
|
|
1494
1217
|
}
|
|
1495
1218
|
// ( •_•)
|
|
1496
1219
|
// ( •_•)>⌐■-■
|
|
@@ -1501,7 +1224,7 @@ const forceUpdate = (ref) => {
|
|
|
1501
1224
|
const hostRef = getHostRef(ref);
|
|
1502
1225
|
const isConnected = hostRef.$hostElement$.isConnected;
|
|
1503
1226
|
if (isConnected &&
|
|
1504
|
-
(hostRef.$flags$ & (2 /*
|
|
1227
|
+
(hostRef.$flags$ & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
|
|
1505
1228
|
scheduleUpdate(hostRef, false);
|
|
1506
1229
|
}
|
|
1507
1230
|
// Returns "true" when the forced update was successfully scheduled
|
|
@@ -1532,6 +1255,53 @@ const then = (promise, thenFn) => {
|
|
|
1532
1255
|
};
|
|
1533
1256
|
const addHydratedFlag = (elm) => elm.classList.add('hydrated')
|
|
1534
1257
|
;
|
|
1258
|
+
/**
|
|
1259
|
+
* Parse a new property value for a given property type.
|
|
1260
|
+
*
|
|
1261
|
+
* While the prop value can reasonably be expected to be of `any` type as far as TypeScript's type checker is concerned,
|
|
1262
|
+
* it is not safe to assume that the string returned by evaluating `typeof propValue` matches:
|
|
1263
|
+
* 1. `any`, the type given to `propValue` in the function signature
|
|
1264
|
+
* 2. the type stored from `propType`.
|
|
1265
|
+
*
|
|
1266
|
+
* This function provides the capability to parse/coerce a property's value to potentially any other JavaScript type.
|
|
1267
|
+
*
|
|
1268
|
+
* Property values represented in TSX preserve their type information. In the example below, the number 0 is passed to
|
|
1269
|
+
* a component. This `propValue` will preserve its type information (`typeof propValue === 'number'`). Note that is
|
|
1270
|
+
* based on the type of the value being passed in, not the type declared of the class member decorated with `@Prop`.
|
|
1271
|
+
* ```tsx
|
|
1272
|
+
* <my-cmp prop-val={0}></my-cmp>
|
|
1273
|
+
* ```
|
|
1274
|
+
*
|
|
1275
|
+
* HTML prop values on the other hand, will always a string
|
|
1276
|
+
*
|
|
1277
|
+
* @param propValue the new value to coerce to some type
|
|
1278
|
+
* @param propType the type of the prop, expressed as a binary number
|
|
1279
|
+
* @returns the parsed/coerced value
|
|
1280
|
+
*/
|
|
1281
|
+
const parsePropertyValue = (propValue, propType) => {
|
|
1282
|
+
// ensure this value is of the correct prop type
|
|
1283
|
+
if (propValue != null && !isComplexType(propValue)) {
|
|
1284
|
+
if (propType & 4 /* Boolean */) {
|
|
1285
|
+
// per the HTML spec, any string value means it is a boolean true value
|
|
1286
|
+
// but we'll cheat here and say that the string "false" is the boolean false
|
|
1287
|
+
return propValue === 'false' ? false : propValue === '' || !!propValue;
|
|
1288
|
+
}
|
|
1289
|
+
if (propType & 2 /* Number */) {
|
|
1290
|
+
// force it to be a number
|
|
1291
|
+
return parseFloat(propValue);
|
|
1292
|
+
}
|
|
1293
|
+
if (propType & 1 /* String */) {
|
|
1294
|
+
// could have been passed as a number or boolean
|
|
1295
|
+
// but we still want it as a string
|
|
1296
|
+
return String(propValue);
|
|
1297
|
+
}
|
|
1298
|
+
// redundant return here for better minification
|
|
1299
|
+
return propValue;
|
|
1300
|
+
}
|
|
1301
|
+
// not sure exactly what type we want
|
|
1302
|
+
// so no need to change to a different type
|
|
1303
|
+
return propValue;
|
|
1304
|
+
};
|
|
1535
1305
|
const getValue = (ref, propName) => getHostRef(ref).$instanceValues$.get(propName);
|
|
1536
1306
|
const setValue = (ref, propName, newVal, cmpMeta) => {
|
|
1537
1307
|
// check our new property value against our internal value
|
|
@@ -1541,16 +1311,13 @@ const setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
1541
1311
|
const flags = hostRef.$flags$;
|
|
1542
1312
|
const instance = hostRef.$lazyInstance$ ;
|
|
1543
1313
|
newVal = parsePropertyValue(newVal, cmpMeta.$members$[propName][0]);
|
|
1544
|
-
|
|
1545
|
-
const areBothNaN = Number.isNaN(oldVal) && Number.isNaN(newVal);
|
|
1546
|
-
const didValueChange = newVal !== oldVal && !areBothNaN;
|
|
1547
|
-
if ((!(flags & 8 /* HOST_FLAGS.isConstructingInstance */) || oldVal === undefined) && didValueChange) {
|
|
1314
|
+
if ((!(flags & 8 /* isConstructingInstance */) || oldVal === undefined) && newVal !== oldVal) {
|
|
1548
1315
|
// gadzooks! the property's value has changed!!
|
|
1549
1316
|
// set our new value!
|
|
1550
1317
|
hostRef.$instanceValues$.set(propName, newVal);
|
|
1551
1318
|
if (instance) {
|
|
1552
1319
|
// get an array of method names of watch functions to call
|
|
1553
|
-
if (cmpMeta.$watchers$ && flags & 128 /*
|
|
1320
|
+
if (cmpMeta.$watchers$ && flags & 128 /* isWatchReady */) {
|
|
1554
1321
|
const watchMethods = cmpMeta.$watchers$[propName];
|
|
1555
1322
|
if (watchMethods) {
|
|
1556
1323
|
// this instance is watching for when this property changed
|
|
@@ -1565,7 +1332,7 @@ const setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
1565
1332
|
});
|
|
1566
1333
|
}
|
|
1567
1334
|
}
|
|
1568
|
-
if ((flags & (2 /*
|
|
1335
|
+
if ((flags & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
|
|
1569
1336
|
// looks like this value actually changed, so we've got work to do!
|
|
1570
1337
|
// but only if we've already rendered, otherwise just chill out
|
|
1571
1338
|
// queue that we need to do an update, but don't worry about queuing
|
|
@@ -1575,16 +1342,6 @@ const setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
1575
1342
|
}
|
|
1576
1343
|
}
|
|
1577
1344
|
};
|
|
1578
|
-
/**
|
|
1579
|
-
* Attach a series of runtime constructs to a compiled Stencil component
|
|
1580
|
-
* constructor, including getters and setters for the `@Prop` and `@State`
|
|
1581
|
-
* decorators, callbacks for when attributes change, and so on.
|
|
1582
|
-
*
|
|
1583
|
-
* @param Cstr the constructor for a component that we need to process
|
|
1584
|
-
* @param cmpMeta metadata collected previously about the component
|
|
1585
|
-
* @param flags a number used to store a series of bit flags
|
|
1586
|
-
* @returns a reference to the same constructor passed in (but now mutated)
|
|
1587
|
-
*/
|
|
1588
1345
|
const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
1589
1346
|
if (cmpMeta.$members$) {
|
|
1590
1347
|
if (Cstr.watchers) {
|
|
@@ -1594,8 +1351,8 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1594
1351
|
const members = Object.entries(cmpMeta.$members$);
|
|
1595
1352
|
const prototype = Cstr.prototype;
|
|
1596
1353
|
members.map(([memberName, [memberFlags]]) => {
|
|
1597
|
-
if ((memberFlags & 31 /*
|
|
1598
|
-
((flags & 2 /*
|
|
1354
|
+
if ((memberFlags & 31 /* Prop */ ||
|
|
1355
|
+
((flags & 2 /* proxyState */) && memberFlags & 32 /* State */))) {
|
|
1599
1356
|
// proxyComponent - prop
|
|
1600
1357
|
Object.defineProperty(prototype, memberName, {
|
|
1601
1358
|
get() {
|
|
@@ -1611,7 +1368,7 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1611
1368
|
});
|
|
1612
1369
|
}
|
|
1613
1370
|
});
|
|
1614
|
-
if ((flags & 1 /*
|
|
1371
|
+
if ((flags & 1 /* isElementConstructor */)) {
|
|
1615
1372
|
const attrNameToPropName = new Map();
|
|
1616
1373
|
prototype.attributeChangedCallback = function (attrName, _oldValue, newValue) {
|
|
1617
1374
|
plt.jmp(() => {
|
|
@@ -1667,11 +1424,11 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1667
1424
|
// create an array of attributes to observe
|
|
1668
1425
|
// and also create a map of html attribute name to js property name
|
|
1669
1426
|
Cstr.observedAttributes = members
|
|
1670
|
-
.filter(([_, m]) => m[0] & 15 /*
|
|
1427
|
+
.filter(([_, m]) => m[0] & 15 /* HasAttribute */) // filter to only keep props that should match attributes
|
|
1671
1428
|
.map(([propName, m]) => {
|
|
1672
1429
|
const attrName = m[1] || propName;
|
|
1673
1430
|
attrNameToPropName.set(attrName, propName);
|
|
1674
|
-
if (m[0] & 512 /*
|
|
1431
|
+
if (m[0] & 512 /* ReflectAttr */) {
|
|
1675
1432
|
cmpMeta.$attrsToReflect$.push([propName, attrName]);
|
|
1676
1433
|
}
|
|
1677
1434
|
return attrName;
|
|
@@ -1682,10 +1439,10 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1682
1439
|
};
|
|
1683
1440
|
const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) => {
|
|
1684
1441
|
// initializeComponent
|
|
1685
|
-
if ((hostRef.$flags$ & 32 /*
|
|
1442
|
+
if ((hostRef.$flags$ & 32 /* hasInitializedComponent */) === 0) {
|
|
1686
1443
|
{
|
|
1687
1444
|
// we haven't initialized this element yet
|
|
1688
|
-
hostRef.$flags$ |= 32 /*
|
|
1445
|
+
hostRef.$flags$ |= 32 /* hasInitializedComponent */;
|
|
1689
1446
|
// lazy loaded components
|
|
1690
1447
|
// request the component's implementation to be
|
|
1691
1448
|
// wired up with the host element
|
|
@@ -1703,7 +1460,7 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
|
|
|
1703
1460
|
{
|
|
1704
1461
|
cmpMeta.$watchers$ = Cstr.watchers;
|
|
1705
1462
|
}
|
|
1706
|
-
proxyComponent(Cstr, cmpMeta, 2 /*
|
|
1463
|
+
proxyComponent(Cstr, cmpMeta, 2 /* proxyState */);
|
|
1707
1464
|
Cstr.isProxied = true;
|
|
1708
1465
|
}
|
|
1709
1466
|
const endNewInstance = createTime('createInstance', cmpMeta.$tagName$);
|
|
@@ -1711,7 +1468,7 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
|
|
|
1711
1468
|
// but let's keep track of when we start and stop
|
|
1712
1469
|
// so that the getters/setters don't incorrectly step on data
|
|
1713
1470
|
{
|
|
1714
|
-
hostRef.$flags$ |= 8 /*
|
|
1471
|
+
hostRef.$flags$ |= 8 /* isConstructingInstance */;
|
|
1715
1472
|
}
|
|
1716
1473
|
// construct the lazy-loaded component implementation
|
|
1717
1474
|
// passing the hostRef is very important during
|
|
@@ -1724,10 +1481,10 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
|
|
|
1724
1481
|
consoleError(e);
|
|
1725
1482
|
}
|
|
1726
1483
|
{
|
|
1727
|
-
hostRef.$flags$ &= ~8 /*
|
|
1484
|
+
hostRef.$flags$ &= ~8 /* isConstructingInstance */;
|
|
1728
1485
|
}
|
|
1729
1486
|
{
|
|
1730
|
-
hostRef.$flags$ |= 128 /*
|
|
1487
|
+
hostRef.$flags$ |= 128 /* isWatchReady */;
|
|
1731
1488
|
}
|
|
1732
1489
|
endNewInstance();
|
|
1733
1490
|
}
|
|
@@ -1737,7 +1494,7 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
|
|
|
1737
1494
|
const scopeId = getScopeId(cmpMeta);
|
|
1738
1495
|
if (!styles.has(scopeId)) {
|
|
1739
1496
|
const endRegisterStyles = createTime('registerStyles', cmpMeta.$tagName$);
|
|
1740
|
-
registerStyle(scopeId, style, !!(cmpMeta.$flags$ & 1 /*
|
|
1497
|
+
registerStyle(scopeId, style, !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */));
|
|
1741
1498
|
endRegisterStyles();
|
|
1742
1499
|
}
|
|
1743
1500
|
}
|
|
@@ -1759,19 +1516,19 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
|
|
|
1759
1516
|
}
|
|
1760
1517
|
};
|
|
1761
1518
|
const connectedCallback = (elm) => {
|
|
1762
|
-
if ((plt.$flags$ & 1 /*
|
|
1519
|
+
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
|
|
1763
1520
|
const hostRef = getHostRef(elm);
|
|
1764
1521
|
const cmpMeta = hostRef.$cmpMeta$;
|
|
1765
1522
|
const endConnected = createTime('connectedCallback', cmpMeta.$tagName$);
|
|
1766
|
-
if (!(hostRef.$flags$ & 1 /*
|
|
1523
|
+
if (!(hostRef.$flags$ & 1 /* hasConnected */)) {
|
|
1767
1524
|
// first time this component has connected
|
|
1768
|
-
hostRef.$flags$ |= 1 /*
|
|
1525
|
+
hostRef.$flags$ |= 1 /* hasConnected */;
|
|
1769
1526
|
{
|
|
1770
1527
|
// initUpdate
|
|
1771
1528
|
// if the slot polyfill is required we'll need to put some nodes
|
|
1772
1529
|
// in here to act as original content anchors as we move nodes around
|
|
1773
1530
|
// host element has been connected to the DOM
|
|
1774
|
-
if ((cmpMeta.$flags$ & (4 /*
|
|
1531
|
+
if ((cmpMeta.$flags$ & (4 /* hasSlotRelocation */ | 8 /* needsShadowDomShim */))) {
|
|
1775
1532
|
setContentReference(elm);
|
|
1776
1533
|
}
|
|
1777
1534
|
}
|
|
@@ -1794,7 +1551,7 @@ const connectedCallback = (elm) => {
|
|
|
1794
1551
|
// https://developers.google.com/web/fundamentals/web-components/best-practices#lazy-properties
|
|
1795
1552
|
if (cmpMeta.$members$) {
|
|
1796
1553
|
Object.entries(cmpMeta.$members$).map(([memberName, [memberFlags]]) => {
|
|
1797
|
-
if (memberFlags & 31 /*
|
|
1554
|
+
if (memberFlags & 31 /* Prop */ && elm.hasOwnProperty(memberName)) {
|
|
1798
1555
|
const value = elm[memberName];
|
|
1799
1556
|
delete elm[memberName];
|
|
1800
1557
|
elm[memberName] = value;
|
|
@@ -1826,7 +1583,7 @@ const setContentReference = (elm) => {
|
|
|
1826
1583
|
elm.insertBefore(contentRefElm, elm.firstChild);
|
|
1827
1584
|
};
|
|
1828
1585
|
const disconnectedCallback = (elm) => {
|
|
1829
|
-
if ((plt.$flags$ & 1 /*
|
|
1586
|
+
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
|
|
1830
1587
|
const hostRef = getHostRef(elm);
|
|
1831
1588
|
{
|
|
1832
1589
|
if (hostRef.$rmListeners$) {
|
|
@@ -1845,7 +1602,7 @@ const patchCloneNode = (HostElementPrototype) => {
|
|
|
1845
1602
|
if (!isShadowDom && deep) {
|
|
1846
1603
|
let i = 0;
|
|
1847
1604
|
let slotted, nonStencilNode;
|
|
1848
|
-
|
|
1605
|
+
let stencilPrivates = [
|
|
1849
1606
|
's-id',
|
|
1850
1607
|
's-cr',
|
|
1851
1608
|
's-lr',
|
|
@@ -1882,7 +1639,7 @@ const patchChildSlotNodes = (elm, cmpMeta) => {
|
|
|
1882
1639
|
return this[n];
|
|
1883
1640
|
}
|
|
1884
1641
|
}
|
|
1885
|
-
if (cmpMeta.$flags$ & 8 /*
|
|
1642
|
+
if (cmpMeta.$flags$ & 8 /* needsShadowDomShim */) {
|
|
1886
1643
|
const childNodesFn = elm.__lookupGetter__('childNodes');
|
|
1887
1644
|
Object.defineProperty(elm, 'children', {
|
|
1888
1645
|
get() {
|
|
@@ -1897,8 +1654,8 @@ const patchChildSlotNodes = (elm, cmpMeta) => {
|
|
|
1897
1654
|
Object.defineProperty(elm, 'childNodes', {
|
|
1898
1655
|
get() {
|
|
1899
1656
|
const childNodes = childNodesFn.call(this);
|
|
1900
|
-
if ((plt.$flags$ & 1 /*
|
|
1901
|
-
getHostRef(this).$flags$ & 2 /*
|
|
1657
|
+
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0 &&
|
|
1658
|
+
getHostRef(this).$flags$ & 2 /* hasRendered */) {
|
|
1902
1659
|
const result = new FakeNodeList();
|
|
1903
1660
|
for (let i = 0; i < childNodes.length; i++) {
|
|
1904
1661
|
const slot = childNodes[i]['s-nr'];
|
|
@@ -1914,7 +1671,6 @@ const patchChildSlotNodes = (elm, cmpMeta) => {
|
|
|
1914
1671
|
}
|
|
1915
1672
|
};
|
|
1916
1673
|
const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
1917
|
-
var _a;
|
|
1918
1674
|
const endBootstrap = createTime();
|
|
1919
1675
|
const cmpTags = [];
|
|
1920
1676
|
const exclude = options.exclude || [];
|
|
@@ -1955,7 +1711,7 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1955
1711
|
super(self);
|
|
1956
1712
|
self = this;
|
|
1957
1713
|
registerHost(self, cmpMeta);
|
|
1958
|
-
if (cmpMeta.$flags$ & 1 /*
|
|
1714
|
+
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
|
|
1959
1715
|
// this component is using shadow dom
|
|
1960
1716
|
// and this browser supports shadow dom
|
|
1961
1717
|
// add the read-only property "shadowRoot" to the host element
|
|
@@ -1996,18 +1752,13 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1996
1752
|
cmpMeta.$lazyBundleId$ = lazyBundle[0];
|
|
1997
1753
|
if (!exclude.includes(tagName) && !customElements.get(tagName)) {
|
|
1998
1754
|
cmpTags.push(tagName);
|
|
1999
|
-
customElements.define(tagName, proxyComponent(HostElement, cmpMeta, 1 /*
|
|
1755
|
+
customElements.define(tagName, proxyComponent(HostElement, cmpMeta, 1 /* isElementConstructor */));
|
|
2000
1756
|
}
|
|
2001
1757
|
});
|
|
2002
1758
|
});
|
|
2003
1759
|
{
|
|
2004
1760
|
visibilityStyle.innerHTML = cmpTags + HYDRATED_CSS;
|
|
2005
1761
|
visibilityStyle.setAttribute('data-styles', '');
|
|
2006
|
-
// Apply CSP nonce to the style tag if it exists
|
|
2007
|
-
const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);
|
|
2008
|
-
if (nonce != null) {
|
|
2009
|
-
visibilityStyle.setAttribute('nonce', nonce);
|
|
2010
|
-
}
|
|
2011
1762
|
head.insertBefore(visibilityStyle, metaCharset ? metaCharset.nextSibling : head.firstChild);
|
|
2012
1763
|
}
|
|
2013
1764
|
// Process deferred connectedCallbacks now all components have been registered
|
|
@@ -2023,48 +1774,7 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
2023
1774
|
// Fallback appLoad event
|
|
2024
1775
|
endBootstrap();
|
|
2025
1776
|
};
|
|
2026
|
-
const
|
|
2027
|
-
if (listeners) {
|
|
2028
|
-
listeners.map(([flags, name, method]) => {
|
|
2029
|
-
const target = getHostListenerTarget(elm, flags) ;
|
|
2030
|
-
const handler = hostListenerProxy(hostRef, method);
|
|
2031
|
-
const opts = hostListenerOpts(flags);
|
|
2032
|
-
plt.ael(target, name, handler, opts);
|
|
2033
|
-
(hostRef.$rmListeners$ = hostRef.$rmListeners$ || []).push(() => plt.rel(target, name, handler, opts));
|
|
2034
|
-
});
|
|
2035
|
-
}
|
|
2036
|
-
};
|
|
2037
|
-
const hostListenerProxy = (hostRef, methodName) => (ev) => {
|
|
2038
|
-
try {
|
|
2039
|
-
{
|
|
2040
|
-
if (hostRef.$flags$ & 256 /* HOST_FLAGS.isListenReady */) {
|
|
2041
|
-
// instance is ready, let's call it's member method for this event
|
|
2042
|
-
hostRef.$lazyInstance$[methodName](ev);
|
|
2043
|
-
}
|
|
2044
|
-
else {
|
|
2045
|
-
(hostRef.$queuedListeners$ = hostRef.$queuedListeners$ || []).push([methodName, ev]);
|
|
2046
|
-
}
|
|
2047
|
-
}
|
|
2048
|
-
}
|
|
2049
|
-
catch (e) {
|
|
2050
|
-
consoleError(e);
|
|
2051
|
-
}
|
|
2052
|
-
};
|
|
2053
|
-
const getHostListenerTarget = (elm, flags) => {
|
|
2054
|
-
if (flags & 8 /* LISTENER_FLAGS.TargetWindow */)
|
|
2055
|
-
return win;
|
|
2056
|
-
return elm;
|
|
2057
|
-
};
|
|
2058
|
-
// prettier-ignore
|
|
2059
|
-
const hostListenerOpts = (flags) => (flags & 2 /* LISTENER_FLAGS.Capture */) !== 0;
|
|
2060
|
-
/**
|
|
2061
|
-
* Assigns the given value to the nonce property on the runtime platform object.
|
|
2062
|
-
* During runtime, this value is used to set the nonce attribute on all dynamically created script and style tags.
|
|
2063
|
-
* @param nonce The value to be assigned to the platform nonce property.
|
|
2064
|
-
* @returns void
|
|
2065
|
-
*/
|
|
2066
|
-
const setNonce = (nonce) => (plt.$nonce$ = nonce);
|
|
2067
|
-
const hostRefs = /*@__PURE__*/ new WeakMap();
|
|
1777
|
+
const hostRefs = new WeakMap();
|
|
2068
1778
|
const getHostRef = (ref) => hostRefs.get(ref);
|
|
2069
1779
|
const registerInstance = (lazyInstance, hostRef) => hostRefs.set((hostRef.$lazyInstance$ = lazyInstance), hostRef);
|
|
2070
1780
|
const registerHost = (elm, cmpMeta) => {
|
|
@@ -2093,9 +1803,7 @@ const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
2093
1803
|
if (module) {
|
|
2094
1804
|
return module[exportName];
|
|
2095
1805
|
}
|
|
2096
|
-
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/
|
|
2097
1806
|
return import(
|
|
2098
|
-
/* @vite-ignore */
|
|
2099
1807
|
/* webpackInclude: /\.entry\.js$/ */
|
|
2100
1808
|
/* webpackExclude: /\.system\.entry\.js$/ */
|
|
2101
1809
|
/* webpackMode: "lazy" */
|
|
@@ -2106,38 +1814,14 @@ const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
2106
1814
|
return importedModule[exportName];
|
|
2107
1815
|
}, consoleError);
|
|
2108
1816
|
};
|
|
2109
|
-
const styles =
|
|
2110
|
-
const win = typeof window !== 'undefined' ? window : {};
|
|
2111
|
-
const doc = win.document || { head: {} };
|
|
2112
|
-
const H = (win.HTMLElement || class {
|
|
2113
|
-
});
|
|
2114
|
-
const plt = {
|
|
2115
|
-
$flags$: 0,
|
|
2116
|
-
$resourcesUrl$: '',
|
|
2117
|
-
jmp: (h) => h(),
|
|
2118
|
-
raf: (h) => requestAnimationFrame(h),
|
|
2119
|
-
ael: (el, eventName, listener, opts) => el.addEventListener(eventName, listener, opts),
|
|
2120
|
-
rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),
|
|
2121
|
-
ce: (eventName, opts) => new CustomEvent(eventName, opts),
|
|
2122
|
-
};
|
|
2123
|
-
const supportsShadow = true;
|
|
2124
|
-
const promiseResolve = (v) => Promise.resolve(v);
|
|
2125
|
-
const supportsConstructableStylesheets = /*@__PURE__*/ (() => {
|
|
2126
|
-
try {
|
|
2127
|
-
new CSSStyleSheet();
|
|
2128
|
-
return typeof new CSSStyleSheet().replaceSync === 'function';
|
|
2129
|
-
}
|
|
2130
|
-
catch (e) { }
|
|
2131
|
-
return false;
|
|
2132
|
-
})()
|
|
2133
|
-
;
|
|
1817
|
+
const styles = new Map();
|
|
2134
1818
|
const queueDomReads = [];
|
|
2135
1819
|
const queueDomWrites = [];
|
|
2136
1820
|
const queueTask = (queue, write) => (cb) => {
|
|
2137
1821
|
queue.push(cb);
|
|
2138
1822
|
if (!queuePending) {
|
|
2139
1823
|
queuePending = true;
|
|
2140
|
-
if (write && plt.$flags$ & 4 /*
|
|
1824
|
+
if (write && plt.$flags$ & 4 /* queueSync */) {
|
|
2141
1825
|
nextTick(flush);
|
|
2142
1826
|
}
|
|
2143
1827
|
else {
|
|
@@ -2174,4 +1858,4 @@ const flush = () => {
|
|
|
2174
1858
|
const nextTick = /*@__PURE__*/ (cb) => promiseResolve().then(cb);
|
|
2175
1859
|
const writeTask = /*@__PURE__*/ queueTask(queueDomWrites, true);
|
|
2176
1860
|
|
|
2177
|
-
export { H, NAMESPACE as N, Host as a, bootstrapLazy as b, getRenderingRef as c, doc as d, createEvent as e, forceUpdate as f, getElement as g, h, promiseResolve as p, registerInstance as r,
|
|
1861
|
+
export { H, NAMESPACE as N, Host as a, bootstrapLazy as b, getRenderingRef as c, doc as d, createEvent as e, forceUpdate as f, getElement as g, h, promiseResolve as p, registerInstance as r, win as w };
|