@zanichelli/albe-web-components 6.6.10-test → 6.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/dist/cjs/_commonjsHelpers-537d719a.js +20 -0
- package/dist/cjs/breakpoints-88c4fd6c.js +7 -0
- package/{www/build/hammer-782a2043.js → dist/cjs/hammer-4f20813e.js} +6 -5
- package/{www/build/icons-85e529a3.js → dist/cjs/icons-9e555ff7.js} +3 -1
- package/{www/build/index-291c96fb.js → dist/cjs/index-e3299e0a.js} +521 -1473
- package/dist/cjs/index-fa110f37.js +311 -0
- package/dist/cjs/index.cjs.js +295 -0
- package/dist/cjs/loader.cjs.js +21 -0
- package/dist/cjs/utils-600bad93.js +100 -0
- package/{www/build/utils-d783f6be.js → dist/cjs/utils-8bc9056f.js} +22 -38
- package/dist/cjs/web-components-library.cjs.js +19 -0
- package/dist/{web-components-library/z-alert.entry.js → cjs/z-alert.cjs.entry.js} +8 -4
- package/{www/build/z-anchor-navigation.entry.js → dist/cjs/z-anchor-navigation.cjs.entry.js} +9 -5
- package/dist/cjs/z-app-header_2.cjs.entry.js +153 -0
- package/dist/{web-components-library/z-app-switcher.entry.js → cjs/z-app-switcher.cjs.entry.js} +11 -7
- package/dist/cjs/z-aria-alert.cjs.entry.js +19 -0
- package/dist/{web-components-library/z-avatar.entry.js → cjs/z-avatar.cjs.entry.js} +14 -10
- package/dist/{web-components-library/z-typography.entry.js → cjs/z-body_2.cjs.entry.js} +21 -5
- package/dist/{web-components-library/z-button-sort.entry.js → cjs/z-button-sort.cjs.entry.js} +11 -7
- package/{www/build/z-button.entry.js → dist/cjs/z-button.cjs.entry.js} +14 -10
- package/dist/{web-components-library/z-card.entry.js → cjs/z-card.cjs.entry.js} +21 -17
- package/dist/{web-components-library/z-carousel.entry.js → cjs/z-carousel.cjs.entry.js} +15 -11
- package/{www/build/z-chip.entry.js → dist/cjs/z-chip.cjs.entry.js} +16 -12
- package/dist/{web-components-library/z-combobox.entry.js → cjs/z-combobox.cjs.entry.js} +27 -23
- package/{www/build/z-contextual-menu.entry.js → dist/cjs/z-contextual-menu.cjs.entry.js} +11 -7
- package/dist/{web-components-library/z-cover-hero.entry.js → cjs/z-cover-hero.cjs.entry.js} +16 -12
- package/dist/{web-components-library/z-date-picker.entry.js → cjs/z-date-picker.cjs.entry.js} +39 -41
- package/{www/build/z-divider.entry.js → dist/cjs/z-divider.cjs.entry.js} +11 -7
- package/dist/cjs/z-dragdrop-area_3.cjs.entry.js +76 -0
- package/{www/build/z-file-upload.entry.js → dist/cjs/z-file-upload.cjs.entry.js} +27 -23
- package/{www/build/z-file.entry.js → dist/cjs/z-file.cjs.entry.js} +13 -9
- package/{www/build/z-ghost-loading.entry.js → dist/cjs/z-ghost-loading.cjs.entry.js} +8 -4
- package/{www/build/z-info-box.entry.js → dist/cjs/z-info-box.cjs.entry.js} +9 -5
- package/dist/{web-components-library/z-info-reveal.entry.js → cjs/z-info-reveal.cjs.entry.js} +11 -7
- package/dist/cjs/z-input_2.cjs.entry.js +253 -0
- package/{www/build/z-link.entry.js → dist/cjs/z-link.cjs.entry.js} +12 -8
- package/dist/cjs/z-list_3.cjs.entry.js +261 -0
- package/dist/{web-components-library/z-logo.entry.js → cjs/z-logo.cjs.entry.js} +8 -4
- package/dist/{web-components-library/z-menu-section.entry.js → cjs/z-menu-section.cjs.entry.js} +11 -7
- package/dist/{web-components-library/z-menu.entry.js → cjs/z-menu.cjs.entry.js} +14 -10
- package/{www/build/z-messages-pocket.entry.js → dist/cjs/z-messages-pocket.cjs.entry.js} +17 -13
- package/dist/{web-components-library/z-myz-card-alert.entry.js → cjs/z-myz-card-alert.cjs.entry.js} +12 -8
- package/dist/{web-components-library/z-myz-card-dictionary.entry.js → cjs/z-myz-card-dictionary.cjs.entry.js} +10 -6
- package/{www/build/z-myz-card-footer-sections.entry.js → dist/cjs/z-myz-card-footer-sections.cjs.entry.js} +8 -4
- package/{www/build/z-myz-card-footer.entry.js → dist/cjs/z-myz-card-footer.cjs.entry.js} +12 -8
- package/{www/build/z-myz-card-icon.entry.js → dist/cjs/z-myz-card-icon.cjs.entry.js} +8 -4
- package/{www/build/z-myz-card-info.entry.js → dist/cjs/z-myz-card-info.cjs.entry.js} +23 -19
- package/{www/build/z-myz-card-list.entry.js → dist/cjs/z-myz-card-list.cjs.entry.js} +11 -7
- package/dist/cjs/z-myz-card_4.cjs.entry.js +108 -0
- package/{www/build/z-myz-list-item.entry.js → dist/cjs/z-myz-list-item.cjs.entry.js} +13 -9
- package/{www/build/z-myz-list.entry.js → dist/cjs/z-myz-list.cjs.entry.js} +9 -5
- package/{www/build/z-navigation-tab-link.entry.js → dist/cjs/z-navigation-tab-link.cjs.entry.js} +16 -12
- package/dist/{web-components-library/z-navigation-tab.entry.js → cjs/z-navigation-tab.cjs.entry.js} +16 -12
- package/dist/{web-components-library/z-navigation-tabs.entry.js → cjs/z-navigation-tabs.cjs.entry.js} +17 -13
- package/{www/build/z-notification.entry.js → dist/cjs/z-notification.cjs.entry.js} +10 -6
- package/{www/build/z-offcanvas.entry.js → dist/cjs/z-offcanvas.cjs.entry.js} +16 -12
- package/{www/build/z-otp.entry.js → dist/cjs/z-otp.cjs.entry.js} +11 -7
- package/{www/build/z-pagination.entry.js → dist/cjs/z-pagination.cjs.entry.js} +23 -19
- package/dist/cjs/z-panel-elem.cjs.entry.js +30 -0
- package/dist/{web-components-library/z-pocket-message.entry.js → cjs/z-pocket-message.cjs.entry.js} +8 -4
- package/dist/cjs/z-pocket_3.cjs.entry.js +125 -0
- package/dist/{web-components-library/z-popover.entry.js → cjs/z-popover.cjs.entry.js} +33 -29
- package/{www/build/z-range-picker.entry.js → dist/cjs/z-range-picker.cjs.entry.js} +32 -28
- package/dist/{web-components-library/z-searchbar.entry.js → cjs/z-searchbar.cjs.entry.js} +27 -23
- package/{www/build/z-section-title.entry.js → dist/cjs/z-section-title.cjs.entry.js} +11 -7
- package/{www/build/z-select.entry.js → dist/cjs/z-select.cjs.entry.js} +29 -25
- package/dist/{web-components-library/z-skip-to-content.entry.js → cjs/z-skip-to-content.cjs.entry.js} +14 -10
- package/{www/build/z-slideshow.entry.js → dist/cjs/z-slideshow.cjs.entry.js} +23 -19
- package/{www/build/z-stepper-item.entry.js → dist/cjs/z-stepper-item.cjs.entry.js} +9 -5
- package/dist/{web-components-library/z-stepper.entry.js → cjs/z-stepper.cjs.entry.js} +8 -4
- package/{www/build/z-table-body.entry.js → dist/cjs/z-table-body.cjs.entry.js} +9 -5
- package/{www/build/z-table-cell.entry.js → dist/cjs/z-table-cell.cjs.entry.js} +13 -9
- package/{www/build/z-table-empty-box.entry.js → dist/cjs/z-table-empty-box.cjs.entry.js} +10 -6
- package/dist/cjs/z-table-expanded-row.cjs.entry.js +19 -0
- package/{www/build/z-table-footer.entry.js → dist/cjs/z-table-footer.cjs.entry.js} +9 -5
- package/{www/build/z-table-head.entry.js → dist/cjs/z-table-head.cjs.entry.js} +9 -5
- package/dist/{web-components-library/z-table-header-row.entry.js → cjs/z-table-header-row.cjs.entry.js} +9 -5
- package/dist/{web-components-library/z-table-header.entry.js → cjs/z-table-header.cjs.entry.js} +26 -22
- package/dist/{web-components-library/z-table-row.entry.js → cjs/z-table-row.cjs.entry.js} +16 -12
- package/dist/{web-components-library/z-table-sticky-footer.entry.js → cjs/z-table-sticky-footer.cjs.entry.js} +8 -4
- package/dist/{web-components-library/z-table.entry.js → cjs/z-table.cjs.entry.js} +20 -16
- package/{www/build/z-tag.entry.js → dist/cjs/z-tag.cjs.entry.js} +9 -5
- package/dist/{web-components-library/z-toast-notification-list.entry.js → cjs/z-toast-notification-list.cjs.entry.js} +11 -7
- package/{www/build/z-toast-notification.entry.js → dist/cjs/z-toast-notification.cjs.entry.js} +34 -30
- package/dist/{web-components-library/z-toggle-button.entry.js → cjs/z-toggle-button.cjs.entry.js} +10 -6
- package/{www/build/z-toggle-switch.entry.js → dist/cjs/z-toggle-switch.cjs.entry.js} +16 -12
- package/{www/build/z-tooltip.entry.js → dist/cjs/z-tooltip.cjs.entry.js} +10 -6
- package/dist/{web-components-library/z-visually-hidden.entry.js → cjs/z-visually-hidden.cjs.entry.js} +8 -4
- package/{www/build/index-968a240f.js → dist/collection/beans/index.js} +47 -49
- package/dist/collection/collection-manifest.json +100 -0
- package/dist/collection/components/buttons/z-button/index.js +241 -0
- package/dist/collection/components/buttons/z-button/styles.css +149 -0
- package/dist/collection/components/buttons/z-button-sort/index.js +220 -0
- package/dist/collection/components/buttons/z-button-sort/styles.css +101 -0
- package/dist/collection/components/buttons/z-chip/index.js +133 -0
- package/dist/collection/components/buttons/z-chip/styles.css +131 -0
- package/dist/collection/components/buttons/z-toggle-button/index.js +126 -0
- package/dist/collection/components/buttons/z-toggle-button/styles.css +62 -0
- package/dist/collection/components/buttons/z-toggle-switch/index.js +144 -0
- package/dist/collection/components/buttons/z-toggle-switch/styles.css +104 -0
- package/dist/collection/components/date-picker/styles.css +565 -0
- package/dist/collection/components/date-picker/utils.js +76 -0
- package/dist/collection/components/date-picker/z-date-picker/index.js +295 -0
- package/dist/collection/components/date-picker/z-range-picker/index.js +499 -0
- package/dist/collection/components/file-upload/z-dragdrop-area/index.js +53 -0
- package/dist/collection/components/file-upload/z-dragdrop-area/styles.css +51 -0
- package/dist/collection/components/file-upload/z-file/index.js +131 -0
- package/dist/collection/components/file-upload/z-file/styles.css +23 -0
- package/dist/collection/components/file-upload/z-file-upload/index.js +363 -0
- package/dist/collection/components/file-upload/z-file-upload/styles.css +84 -0
- package/dist/collection/components/icons/icons.js +747 -0
- package/dist/collection/components/icons/z-icon/index.js +114 -0
- package/dist/collection/components/icons/z-icon/styles.css +14 -0
- package/dist/collection/components/index.js +8 -0
- package/dist/collection/components/indicators/z-stepper/index.js +21 -0
- package/dist/collection/components/indicators/z-stepper/styles.css +19 -0
- package/dist/collection/components/indicators/z-stepper-item/index.js +93 -0
- package/dist/collection/components/indicators/z-stepper-item/styles.css +114 -0
- package/dist/collection/components/inputs/z-combobox/index.js +545 -0
- package/dist/collection/components/inputs/z-combobox/styles.css +159 -0
- package/dist/collection/components/inputs/z-input/index.js +731 -0
- package/dist/collection/components/inputs/z-input/styles.css +327 -0
- package/dist/collection/components/inputs/z-input-message/index.js +68 -0
- package/dist/collection/components/inputs/z-input-message/styles.css +33 -0
- package/dist/collection/components/inputs/z-searchbar/index.js +516 -0
- package/dist/collection/components/inputs/z-searchbar/styles.css +211 -0
- package/dist/collection/components/inputs/z-select/index.js +633 -0
- package/dist/collection/components/inputs/z-select/styles.css +88 -0
- package/dist/collection/components/list/z-list/index.js +91 -0
- package/dist/collection/components/list/z-list/styles.css +6 -0
- package/dist/collection/components/list/z-list-element/index.js +508 -0
- package/dist/collection/components/list/z-list-element/styles.css +121 -0
- package/dist/collection/components/list/z-list-group/index.js +175 -0
- package/dist/collection/components/list/z-list-group/styles.css +21 -0
- package/dist/collection/components/list/z-toast-notification-list/index.js +105 -0
- package/dist/collection/components/list/z-toast-notification-list/styles.css +100 -0
- package/dist/collection/components/logo/z-logo/index.js +131 -0
- package/dist/collection/components/logo/z-logo/styles.css +29 -0
- package/dist/collection/components/modal/z-modal/index.js +156 -0
- package/dist/collection/components/modal/z-modal/styles.css +179 -0
- package/dist/collection/components/navigation/tabs/navigation-tab.css +136 -0
- package/dist/collection/components/navigation/tabs/z-navigation-tab/index.js +242 -0
- package/dist/collection/components/navigation/tabs/z-navigation-tab-link/index.js +264 -0
- package/dist/collection/components/navigation/tabs/z-navigation-tabs/index.js +200 -0
- package/dist/collection/components/navigation/tabs/z-navigation-tabs/styles.css +104 -0
- package/dist/collection/components/navigation/z-app-header/index.js +306 -0
- package/dist/collection/components/navigation/z-app-header/styles.css +420 -0
- package/dist/collection/components/navigation/z-app-switcher/index.js +79 -0
- package/dist/collection/components/navigation/z-app-switcher/styles.css +23 -0
- package/dist/collection/components/navigation/z-link/index.js +317 -0
- package/dist/collection/components/navigation/z-link/styles.css +167 -0
- package/dist/collection/components/navigation/z-menu/index.js +225 -0
- package/dist/collection/components/navigation/z-menu/styles.css +146 -0
- package/dist/collection/components/navigation/z-menu-section/index.js +116 -0
- package/dist/collection/components/navigation/z-menu-section/styles.css +91 -0
- package/dist/collection/components/notification/z-info-box/index.js +85 -0
- package/dist/collection/components/notification/z-info-box/styles.css +23 -0
- package/dist/collection/components/notification/z-notification/index.js +195 -0
- package/dist/collection/components/notification/z-notification/styles.css +114 -0
- package/dist/collection/components/notification/z-toast-notification/index.js +399 -0
- package/dist/collection/components/notification/z-toast-notification/styles.css +254 -0
- package/dist/collection/components/notification/z-tooltip/index.js +133 -0
- package/dist/collection/components/notification/z-tooltip/styles.css +16 -0
- package/dist/collection/components/panel/z-panel-elem/index.js +193 -0
- package/dist/collection/components/panel/z-panel-elem/styles.css +39 -0
- package/dist/collection/components/typography/z-body/index.js +68 -0
- package/dist/collection/components/typography/z-heading/index.js +68 -0
- package/dist/collection/components/typography/z-typography/index.js +91 -0
- package/dist/collection/components/typography/z-typography/styles.css +65 -0
- package/dist/collection/components/z-anchor-navigation/index.js +95 -0
- package/dist/collection/components/z-anchor-navigation/styles.css +129 -0
- package/dist/collection/components/z-aria-alert/index.js +39 -0
- package/dist/collection/components/z-avatar/index.js +142 -0
- package/dist/collection/components/z-avatar/styles.css +32 -0
- package/dist/collection/components/z-card/index.js +177 -0
- package/dist/collection/components/z-card/styles.css +206 -0
- package/dist/collection/components/z-carousel/index.js +300 -0
- package/dist/collection/components/z-carousel/styles.css +129 -0
- package/dist/collection/components/z-contextual-menu/index.js +126 -0
- package/dist/collection/components/z-contextual-menu/styles.css +60 -0
- package/dist/collection/components/z-cover-hero/index.js +103 -0
- package/dist/collection/components/z-cover-hero/styles.css +78 -0
- package/dist/collection/components/z-divider/index.js +95 -0
- package/dist/collection/components/z-divider/styles.css +37 -0
- package/dist/collection/components/z-ghost-loading/index.js +18 -0
- package/dist/collection/components/z-ghost-loading/styles.css +34 -0
- package/dist/collection/components/z-info-reveal/index.js +147 -0
- package/dist/collection/components/z-info-reveal/styles.css +103 -0
- package/dist/collection/components/z-offcanvas/index.js +162 -0
- package/dist/collection/components/z-offcanvas/styles.css +191 -0
- package/dist/collection/components/z-pagination/index.js +435 -0
- package/dist/collection/components/z-pagination/styles.css +199 -0
- package/dist/collection/components/z-popover/index.js +512 -0
- package/dist/collection/components/z-popover/styles.css +147 -0
- package/dist/collection/components/z-section-title/index.js +88 -0
- package/dist/collection/components/z-section-title/styles.css +44 -0
- package/dist/collection/components/z-skip-to-content/index.js +139 -0
- package/dist/collection/components/z-skip-to-content/styles.css +80 -0
- package/dist/collection/components/z-table/z-table/index.js +352 -0
- package/dist/collection/components/z-table/z-table/styles.css +115 -0
- package/dist/collection/components/z-table/z-table-body/index.js +23 -0
- package/dist/collection/components/z-table/z-table-body/styles.css +9 -0
- package/dist/collection/components/z-table/z-table-cell/index.js +86 -0
- package/dist/collection/components/z-table/z-table-cell/styles.css +58 -0
- package/dist/collection/components/z-table/z-table-empty-box/index.js +72 -0
- package/dist/collection/components/z-table/z-table-empty-box/styles.css +38 -0
- package/dist/collection/components/z-table/z-table-expanded-row/index.js +39 -0
- package/dist/collection/components/z-table/z-table-expanded-row/styles.css +9 -0
- package/dist/collection/components/z-table/z-table-footer/index.js +22 -0
- package/dist/collection/components/z-table/z-table-footer/styles.css +5 -0
- package/dist/collection/components/z-table/z-table-head/index.js +22 -0
- package/dist/collection/components/z-table/z-table-head/styles.css +5 -0
- package/dist/collection/components/z-table/z-table-header/index.js +238 -0
- package/dist/collection/components/z-table/z-table-header/styles.css +71 -0
- package/dist/collection/components/z-table/z-table-header-row/index.js +41 -0
- package/dist/collection/components/z-table/z-table-header-row/styles.css +13 -0
- package/dist/collection/components/z-table/z-table-row/index.js +92 -0
- package/dist/collection/components/z-table/z-table-row/styles.css +45 -0
- package/dist/collection/components/z-table/z-table-sticky-footer/index.js +21 -0
- package/dist/collection/components/z-table/z-table-sticky-footer/styles.css +11 -0
- package/dist/collection/components/z-tag/index.js +65 -0
- package/dist/collection/components/z-tag/styles.css +46 -0
- package/dist/collection/components/z-visually-hidden/index.js +18 -0
- package/dist/collection/components/z-visually-hidden/styles.css +12 -0
- package/{www/build/breakpoints-c386984e.js → dist/collection/constants/breakpoints.js} +1 -2
- package/dist/collection/constants/icons.js +6 -0
- package/dist/collection/index.js +7 -0
- package/dist/collection/snowflakes/myz/card/z-myz-card/index.js +129 -0
- package/dist/collection/snowflakes/myz/card/z-myz-card/styles.css +44 -0
- package/dist/collection/snowflakes/myz/card/z-myz-card-alert/index.js +151 -0
- package/dist/collection/snowflakes/myz/card/z-myz-card-alert/styles.css +62 -0
- package/dist/collection/snowflakes/myz/card/z-myz-card-body/index.js +22 -0
- package/dist/collection/snowflakes/myz/card/z-myz-card-body/styles.css +13 -0
- package/dist/collection/snowflakes/myz/card/z-myz-card-cover/index.js +93 -0
- package/dist/collection/snowflakes/myz/card/z-myz-card-cover/styles.css +11 -0
- package/dist/collection/snowflakes/myz/card/z-myz-card-dictionary/index.js +177 -0
- package/dist/collection/snowflakes/myz/card/z-myz-card-dictionary/styles.css +72 -0
- package/dist/collection/snowflakes/myz/card/z-myz-card-footer/index.js +207 -0
- package/dist/collection/snowflakes/myz/card/z-myz-card-footer/styles.css +182 -0
- package/dist/collection/snowflakes/myz/card/z-myz-card-footer-sections/index.js +22 -0
- package/dist/collection/snowflakes/myz/card/z-myz-card-footer-sections/styles.css +20 -0
- package/dist/collection/snowflakes/myz/card/z-myz-card-header/index.js +109 -0
- package/dist/collection/snowflakes/myz/card/z-myz-card-header/styles.css +47 -0
- package/dist/collection/snowflakes/myz/card/z-myz-card-icon/index.js +81 -0
- package/dist/collection/snowflakes/myz/card/z-myz-card-icon/styles.css +69 -0
- package/dist/collection/snowflakes/myz/card/z-myz-card-info/index.js +199 -0
- package/dist/collection/snowflakes/myz/card/z-myz-card-info/styles.css +93 -0
- package/dist/collection/snowflakes/myz/card/z-myz-card-list/index.js +60 -0
- package/dist/collection/snowflakes/myz/card/z-myz-card-list/styles.css +41 -0
- package/dist/collection/snowflakes/myz/list/z-myz-list/index.js +78 -0
- package/dist/collection/snowflakes/myz/list/z-myz-list/styles.css +4 -0
- package/dist/collection/snowflakes/myz/list/z-myz-list-item/index.js +192 -0
- package/dist/collection/snowflakes/myz/list/z-myz-list-item/styles.css +47 -0
- package/dist/collection/snowflakes/myz/pocket/z-messages-pocket/index.js +120 -0
- package/dist/collection/snowflakes/myz/pocket/z-messages-pocket/styles.css +102 -0
- package/dist/collection/snowflakes/myz/pocket/z-pocket/index.js +191 -0
- package/dist/collection/snowflakes/myz/pocket/z-pocket/styles.css +44 -0
- package/dist/collection/snowflakes/myz/pocket/z-pocket-body/index.js +84 -0
- package/dist/collection/snowflakes/myz/pocket/z-pocket-body/styles.css +41 -0
- package/dist/collection/snowflakes/myz/pocket/z-pocket-header/index.js +93 -0
- package/dist/collection/snowflakes/myz/pocket/z-pocket-header/styles.css +27 -0
- package/dist/collection/snowflakes/myz/pocket/z-pocket-message/index.js +22 -0
- package/dist/collection/snowflakes/myz/pocket/z-pocket-message/styles.css +44 -0
- package/dist/collection/snowflakes/myz/z-alert/index.js +47 -0
- package/dist/collection/snowflakes/myz/z-alert/styles.css +28 -0
- package/dist/collection/snowflakes/myz/z-otp/index.js +120 -0
- package/dist/collection/snowflakes/myz/z-otp/styles.css +47 -0
- package/dist/collection/snowflakes/myz/z-slideshow/index.js +180 -0
- package/dist/collection/snowflakes/myz/z-slideshow/styles.css +127 -0
- package/dist/collection/utils/storybook-utils.js +51 -0
- package/{www/build/utils-b96780be.js → dist/collection/utils/utils.js} +13 -16
- package/dist/esm/_commonjsHelpers-9943807e.js +17 -0
- package/dist/{web-components-library → esm}/breakpoints-c386984e.js +0 -0
- package/dist/{web-components-library/hammer-782a2043.js → esm/hammer-c3266b17.js} +2 -3
- package/dist/{web-components-library → esm}/icons-85e529a3.js +0 -0
- package/dist/{web-components-library → esm}/index-968a240f.js +0 -0
- package/dist/{web-components-library/index-291c96fb.js → esm/index-a2ca4b97.js} +492 -1472
- package/dist/esm/index.js +9 -0
- package/dist/esm/loader.js +17 -0
- package/dist/esm/polyfills/core-js.js +11 -0
- package/dist/esm/polyfills/css-shim.js +1 -0
- package/dist/esm/polyfills/dom.js +79 -0
- package/dist/esm/polyfills/es5-html-element.js +1 -0
- package/dist/esm/polyfills/index.js +34 -0
- package/dist/esm/polyfills/system.js +6 -0
- package/dist/{web-components-library/utils-d783f6be.js → esm/utils-151f0ab4.js} +4 -26
- package/dist/{web-components-library/utils-b96780be.js → esm/utils-6cf7efe2.js} +0 -18
- package/dist/esm/web-components-library.js +17 -0
- package/{www/build → dist/esm}/z-alert.entry.js +1 -1
- package/dist/{web-components-library → esm}/z-anchor-navigation.entry.js +1 -1
- package/dist/esm/z-app-header_2.entry.js +148 -0
- package/{www/build → dist/esm}/z-app-switcher.entry.js +1 -1
- package/{www/build → dist/esm}/z-aria-alert.entry.js +1 -1
- package/{www/build → dist/esm}/z-avatar.entry.js +1 -1
- package/{www/build/z-typography.entry.js → dist/esm/z-body_2.entry.js} +13 -2
- package/{www/build → dist/esm}/z-button-sort.entry.js +1 -1
- package/dist/{web-components-library → esm}/z-button.entry.js +1 -1
- package/{www/build → dist/esm}/z-card.entry.js +1 -1
- package/{www/build → dist/esm}/z-carousel.entry.js +1 -1
- package/dist/{web-components-library → esm}/z-chip.entry.js +2 -2
- package/{www/build → dist/esm}/z-combobox.entry.js +2 -2
- package/dist/{web-components-library → esm}/z-contextual-menu.entry.js +1 -1
- package/{www/build → dist/esm}/z-cover-hero.entry.js +1 -1
- package/{www/build → dist/esm}/z-date-picker.entry.js +6 -12
- package/dist/{web-components-library → esm}/z-divider.entry.js +1 -1
- package/{www/build/z-modal.entry.js → dist/esm/z-dragdrop-area_3.entry.js} +43 -2
- package/dist/{web-components-library → esm}/z-file-upload.entry.js +2 -2
- package/dist/{web-components-library → esm}/z-file.entry.js +2 -2
- package/dist/{web-components-library → esm}/z-ghost-loading.entry.js +1 -1
- package/dist/{web-components-library → esm}/z-info-box.entry.js +1 -1
- package/{www/build → dist/esm}/z-info-reveal.entry.js +1 -1
- package/dist/esm/z-input_2.entry.js +248 -0
- package/dist/{web-components-library → esm}/z-link.entry.js +1 -1
- package/dist/esm/z-list_3.entry.js +255 -0
- package/{www/build → dist/esm}/z-logo.entry.js +1 -1
- package/{www/build → dist/esm}/z-menu-section.entry.js +1 -1
- package/{www/build → dist/esm}/z-menu.entry.js +1 -1
- package/dist/{web-components-library → esm}/z-messages-pocket.entry.js +1 -1
- package/{www/build → dist/esm}/z-myz-card-alert.entry.js +1 -1
- package/{www/build → dist/esm}/z-myz-card-dictionary.entry.js +1 -1
- package/dist/{web-components-library → esm}/z-myz-card-footer-sections.entry.js +1 -1
- package/dist/{web-components-library → esm}/z-myz-card-footer.entry.js +1 -1
- package/dist/{web-components-library → esm}/z-myz-card-icon.entry.js +1 -1
- package/dist/{web-components-library → esm}/z-myz-card-info.entry.js +2 -2
- package/dist/{web-components-library → esm}/z-myz-card-list.entry.js +1 -1
- package/dist/esm/z-myz-card_4.entry.js +101 -0
- package/dist/{web-components-library → esm}/z-myz-list-item.entry.js +2 -2
- package/dist/{web-components-library → esm}/z-myz-list.entry.js +1 -1
- package/dist/{web-components-library → esm}/z-navigation-tab-link.entry.js +1 -1
- package/{www/build → dist/esm}/z-navigation-tab.entry.js +1 -1
- package/{www/build → dist/esm}/z-navigation-tabs.entry.js +1 -1
- package/dist/{web-components-library → esm}/z-notification.entry.js +1 -1
- package/dist/{web-components-library → esm}/z-offcanvas.entry.js +1 -1
- package/dist/{web-components-library → esm}/z-otp.entry.js +1 -1
- package/dist/{web-components-library → esm}/z-pagination.entry.js +1 -1
- package/dist/{web-components-library → esm}/z-panel-elem.entry.js +1 -1
- package/{www/build → dist/esm}/z-pocket-message.entry.js +1 -1
- package/dist/esm/z-pocket_3.entry.js +119 -0
- package/{www/build → dist/esm}/z-popover.entry.js +1 -1
- package/dist/{web-components-library → esm}/z-range-picker.entry.js +3 -3
- package/{www/build → dist/esm}/z-searchbar.entry.js +3 -3
- package/dist/{web-components-library → esm}/z-section-title.entry.js +1 -1
- package/dist/{web-components-library → esm}/z-select.entry.js +2 -2
- package/{www/build → dist/esm}/z-skip-to-content.entry.js +2 -2
- package/dist/{web-components-library → esm}/z-slideshow.entry.js +2 -2
- package/dist/{web-components-library → esm}/z-stepper-item.entry.js +1 -1
- package/{www/build → dist/esm}/z-stepper.entry.js +1 -1
- package/dist/{web-components-library → esm}/z-table-body.entry.js +1 -1
- package/dist/{web-components-library → esm}/z-table-cell.entry.js +1 -1
- package/dist/{web-components-library → esm}/z-table-empty-box.entry.js +1 -1
- package/{www/build → dist/esm}/z-table-expanded-row.entry.js +1 -1
- package/dist/{web-components-library → esm}/z-table-footer.entry.js +1 -1
- package/dist/{web-components-library → esm}/z-table-head.entry.js +1 -1
- package/{www/build → dist/esm}/z-table-header-row.entry.js +1 -1
- package/{www/build → dist/esm}/z-table-header.entry.js +2 -2
- package/{www/build → dist/esm}/z-table-row.entry.js +1 -1
- package/{www/build → dist/esm}/z-table-sticky-footer.entry.js +1 -1
- package/{www/build → dist/esm}/z-table.entry.js +2 -2
- package/dist/{web-components-library → esm}/z-tag.entry.js +1 -1
- package/{www/build → dist/esm}/z-toast-notification-list.entry.js +1 -1
- package/dist/{web-components-library → esm}/z-toast-notification.entry.js +3 -3
- package/{www/build → dist/esm}/z-toggle-button.entry.js +1 -1
- package/dist/{web-components-library → esm}/z-toggle-switch.entry.js +2 -2
- package/dist/{web-components-library → esm}/z-tooltip.entry.js +1 -1
- package/{www/build → dist/esm}/z-visually-hidden.entry.js +1 -1
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/web-components-library/index.esm.js +1 -9
- package/dist/web-components-library/p-009c9f67.entry.js +1 -0
- package/dist/web-components-library/p-01f001fd.entry.js +1 -0
- package/dist/web-components-library/p-05ced71c.entry.js +1 -0
- package/dist/web-components-library/p-074ea569.entry.js +1 -0
- package/dist/web-components-library/p-07e18572.entry.js +1 -0
- package/dist/web-components-library/p-0843b0e7.entry.js +1 -0
- package/dist/web-components-library/p-0fa4b50b.entry.js +1 -0
- package/dist/web-components-library/p-112455b1.js +1 -0
- package/dist/web-components-library/p-1d66b265.entry.js +1 -0
- package/dist/web-components-library/p-214b6cee.entry.js +1 -0
- package/dist/web-components-library/p-26033729.entry.js +1 -0
- package/dist/web-components-library/p-26f834e5.entry.js +1 -0
- package/dist/web-components-library/p-2acd6a51.entry.js +1 -0
- package/dist/web-components-library/p-2d1b6c3c.entry.js +1 -0
- package/dist/web-components-library/p-2efedcf4.entry.js +1 -0
- package/dist/web-components-library/p-32509af7.entry.js +1 -0
- package/dist/web-components-library/p-33352f9e.entry.js +1 -0
- package/dist/web-components-library/p-344e7ae7.entry.js +1 -0
- package/dist/web-components-library/p-34c26207.entry.js +1 -0
- package/dist/web-components-library/p-37e050bd.entry.js +1 -0
- package/dist/web-components-library/p-38a3cf3b.entry.js +1 -0
- package/dist/web-components-library/p-3a468aa9.entry.js +1 -0
- package/dist/web-components-library/p-3be171d0.entry.js +1 -0
- package/dist/web-components-library/p-3eb60c95.entry.js +1 -0
- package/dist/web-components-library/p-3f55dce6.entry.js +1 -0
- package/dist/web-components-library/p-4423b00c.entry.js +1 -0
- package/dist/web-components-library/p-475ca461.entry.js +1 -0
- package/dist/web-components-library/p-51e308ca.entry.js +1 -0
- package/dist/web-components-library/p-53065788.entry.js +1 -0
- package/dist/web-components-library/p-540c7d73.entry.js +1 -0
- package/dist/web-components-library/p-5624a127.entry.js +1 -0
- package/dist/web-components-library/p-59cfee8d.entry.js +1 -0
- package/dist/web-components-library/p-5c62387a.entry.js +1 -0
- package/dist/web-components-library/p-5dd9a2c6.entry.js +1 -0
- package/dist/web-components-library/p-61424b8a.entry.js +1 -0
- package/dist/web-components-library/p-6289c4bd.entry.js +1 -0
- package/dist/web-components-library/p-6b1a5309.entry.js +1 -0
- package/dist/web-components-library/p-6c163539.entry.js +1 -0
- package/dist/web-components-library/p-735bdfa3.entry.js +1 -0
- package/dist/web-components-library/p-73c91de3.entry.js +1 -0
- package/dist/web-components-library/p-7b3b99ee.entry.js +1 -0
- package/dist/web-components-library/p-7ea553e9.entry.js +1 -0
- package/dist/web-components-library/p-810bd730.entry.js +1 -0
- package/dist/web-components-library/p-8b15b30c.entry.js +1 -0
- package/dist/web-components-library/p-8c105bd1.entry.js +1 -0
- package/dist/web-components-library/p-8ebe4adf.js +1 -0
- package/dist/web-components-library/p-91a74348.entry.js +1 -0
- package/dist/web-components-library/p-93142fac.entry.js +1 -0
- package/dist/web-components-library/p-95b8f109.entry.js +1 -0
- package/dist/web-components-library/p-9c28b8fc.entry.js +1 -0
- package/dist/web-components-library/p-9c338aeb.entry.js +1 -0
- package/dist/web-components-library/p-9d03a7d6.entry.js +1 -0
- package/dist/web-components-library/p-9d57a84c.entry.js +1 -0
- package/dist/web-components-library/p-9f543b6a.entry.js +1 -0
- package/dist/web-components-library/p-a05ce0a6.entry.js +1 -0
- package/dist/web-components-library/p-a0e2715e.entry.js +1 -0
- package/dist/web-components-library/p-a23e9115.js +1 -0
- package/dist/web-components-library/p-a6c0f149.entry.js +1 -0
- package/dist/web-components-library/p-a79d1412.entry.js +1 -0
- package/dist/web-components-library/p-a82ea410.entry.js +1 -0
- package/dist/web-components-library/p-ae6197f4.entry.js +1 -0
- package/dist/web-components-library/p-ae79573a.entry.js +1 -0
- package/dist/web-components-library/p-af4d1987.entry.js +1 -0
- package/dist/web-components-library/p-b33f5e6a.entry.js +1 -0
- package/dist/web-components-library/p-b3c29822.js +1 -0
- package/dist/web-components-library/p-b6f36170.entry.js +16 -0
- package/dist/web-components-library/p-bb0fe7bc.entry.js +1 -0
- package/dist/web-components-library/p-bdefe224.entry.js +1 -0
- package/dist/web-components-library/p-beba3e67.entry.js +1 -0
- package/dist/web-components-library/p-c4417a91.entry.js +1 -0
- package/dist/web-components-library/p-ce83ce18.entry.js +1 -0
- package/dist/web-components-library/p-d17ebc2f.js +2 -0
- package/dist/web-components-library/p-d2127d84.entry.js +1 -0
- package/dist/web-components-library/p-d69e14fb.js +1 -0
- package/dist/web-components-library/p-de55c171.entry.js +1 -0
- package/dist/web-components-library/p-e40b16fa.entry.js +1 -0
- package/dist/web-components-library/p-e43e61ac.js +7 -0
- package/dist/web-components-library/p-e45cf758.entry.js +1 -0
- package/dist/web-components-library/p-eaa4eba8.entry.js +1 -0
- package/dist/web-components-library/p-ede9fbf5.entry.js +1 -0
- package/dist/web-components-library/p-f0653e72.entry.js +1 -0
- package/dist/web-components-library/p-f158d205.entry.js +1 -0
- package/dist/web-components-library/p-f425f188.js +1 -0
- package/dist/web-components-library/p-f54f63e1.entry.js +1 -0
- package/dist/web-components-library/p-f95cc914.entry.js +1 -0
- package/dist/web-components-library/web-components-library.css +1 -1636
- package/dist/web-components-library/web-components-library.esm.js +1 -129
- package/package.json +1 -1
- package/react/components.d.ts +1 -22
- package/react/components.js +3 -25
- package/react/components.js.map +1 -1
- package/www/build/index.esm.js +1 -9
- package/www/build/p-009c9f67.entry.js +1 -0
- package/www/build/p-01f001fd.entry.js +1 -0
- package/www/build/p-05ced71c.entry.js +1 -0
- package/www/build/p-074ea569.entry.js +1 -0
- package/www/build/p-07e18572.entry.js +1 -0
- package/www/build/p-0843b0e7.entry.js +1 -0
- package/www/build/p-0fa4b50b.entry.js +1 -0
- package/www/build/p-112455b1.js +1 -0
- package/www/build/p-1d66b265.entry.js +1 -0
- package/www/build/p-214b6cee.entry.js +1 -0
- package/www/build/p-26033729.entry.js +1 -0
- package/www/build/p-26f834e5.entry.js +1 -0
- package/www/build/p-275801c6.css +1 -0
- package/www/build/p-2acd6a51.entry.js +1 -0
- package/www/build/p-2d1b6c3c.entry.js +1 -0
- package/www/build/p-2efedcf4.entry.js +1 -0
- package/www/build/p-32509af7.entry.js +1 -0
- package/www/build/p-33352f9e.entry.js +1 -0
- package/www/build/p-344e7ae7.entry.js +1 -0
- package/www/build/p-34c26207.entry.js +1 -0
- package/www/build/p-37e050bd.entry.js +1 -0
- package/www/build/p-38a3cf3b.entry.js +1 -0
- package/www/build/p-3a468aa9.entry.js +1 -0
- package/www/build/p-3be171d0.entry.js +1 -0
- package/www/build/p-3eb60c95.entry.js +1 -0
- package/www/build/p-3f55dce6.entry.js +1 -0
- package/www/build/p-4423b00c.entry.js +1 -0
- package/www/build/p-475ca461.entry.js +1 -0
- package/www/build/p-51e308ca.entry.js +1 -0
- package/www/build/p-53065788.entry.js +1 -0
- package/www/build/p-540c7d73.entry.js +1 -0
- package/www/build/p-5624a127.entry.js +1 -0
- package/www/build/p-59cfee8d.entry.js +1 -0
- package/www/build/p-5c62387a.entry.js +1 -0
- package/www/build/p-5dd9a2c6.entry.js +1 -0
- package/www/build/p-61424b8a.entry.js +1 -0
- package/www/build/p-6289c4bd.entry.js +1 -0
- package/www/build/p-6b1a5309.entry.js +1 -0
- package/www/build/p-6c163539.entry.js +1 -0
- package/www/build/p-735bdfa3.entry.js +1 -0
- package/www/build/p-73c91de3.entry.js +1 -0
- package/www/build/p-7b3b99ee.entry.js +1 -0
- package/www/build/p-7ea553e9.entry.js +1 -0
- package/www/build/p-810bd730.entry.js +1 -0
- package/www/build/p-8b15b30c.entry.js +1 -0
- package/www/build/p-8c105bd1.entry.js +1 -0
- package/www/build/p-8ebe4adf.js +1 -0
- package/www/build/p-91a74348.entry.js +1 -0
- package/www/build/p-93142fac.entry.js +1 -0
- package/www/build/p-95b8f109.entry.js +1 -0
- package/www/build/p-9c28b8fc.entry.js +1 -0
- package/www/build/p-9c338aeb.entry.js +1 -0
- package/www/build/p-9d03a7d6.entry.js +1 -0
- package/www/build/p-9d57a84c.entry.js +1 -0
- package/www/build/p-9f543b6a.entry.js +1 -0
- package/www/build/p-a05ce0a6.entry.js +1 -0
- package/www/build/p-a0e2715e.entry.js +1 -0
- package/www/build/p-a23e9115.js +1 -0
- package/www/build/p-a6c0f149.entry.js +1 -0
- package/www/build/p-a79d1412.entry.js +1 -0
- package/www/build/p-a82ea410.entry.js +1 -0
- package/www/build/p-ae6197f4.entry.js +1 -0
- package/www/build/p-ae79573a.entry.js +1 -0
- package/www/build/p-af4d1987.entry.js +1 -0
- package/www/build/p-b33f5e6a.entry.js +1 -0
- package/www/build/p-b3c29822.js +1 -0
- package/www/build/p-b6f36170.entry.js +16 -0
- package/www/build/p-bb0fe7bc.entry.js +1 -0
- package/www/build/p-bdefe224.entry.js +1 -0
- package/www/build/p-beba3e67.entry.js +1 -0
- package/www/build/p-c07f6065.js +1 -0
- package/www/build/p-c4417a91.entry.js +1 -0
- package/www/build/p-ce83ce18.entry.js +1 -0
- package/www/build/p-d17ebc2f.js +2 -0
- package/www/build/p-d2127d84.entry.js +1 -0
- package/www/build/p-d69e14fb.js +1 -0
- package/www/build/p-de55c171.entry.js +1 -0
- package/www/build/p-e40b16fa.entry.js +1 -0
- package/www/build/p-e43e61ac.js +7 -0
- package/www/build/p-e45cf758.entry.js +1 -0
- package/www/build/p-eaa4eba8.entry.js +1 -0
- package/www/build/p-ede9fbf5.entry.js +1 -0
- package/www/build/p-f0653e72.entry.js +1 -0
- package/www/build/p-f158d205.entry.js +1 -0
- package/www/build/p-f425f188.js +1 -0
- package/www/build/p-f54f63e1.entry.js +1 -0
- package/www/build/p-f95cc914.entry.js +1 -0
- package/www/build/web-components-library.css +1 -1636
- package/www/build/web-components-library.esm.js +1 -129
- package/www/index.html +1 -10
- package/dist/web-components-library/_commonjsHelpers-8fe71198.js +0 -44
- package/dist/web-components-library/app-globals-0f993ce5.js +0 -3
- package/dist/web-components-library/css-shim-b3f2ee8d.js +0 -4
- package/dist/web-components-library/dom-665d6011.js +0 -73
- package/dist/web-components-library/shadow-css-b18e99d7.js +0 -387
- package/dist/web-components-library/z-app-header.entry.js +0 -129
- package/dist/web-components-library/z-aria-alert.entry.js +0 -15
- package/dist/web-components-library/z-body.entry.js +0 -14
- package/dist/web-components-library/z-dragdrop-area.entry.js +0 -33
- package/dist/web-components-library/z-heading.entry.js +0 -14
- package/dist/web-components-library/z-icon.entry.js +0 -22
- package/dist/web-components-library/z-input-message.entry.js +0 -20
- package/dist/web-components-library/z-input.entry.js +0 -231
- package/dist/web-components-library/z-list-element.entry.js +0 -173
- package/dist/web-components-library/z-list-group.entry.js +0 -56
- package/dist/web-components-library/z-list.entry.js +0 -36
- package/dist/web-components-library/z-modal.entry.js +0 -29
- package/dist/web-components-library/z-myz-card-body.entry.js +0 -15
- package/dist/web-components-library/z-myz-card-cover.entry.js +0 -18
- package/dist/web-components-library/z-myz-card-header.entry.js +0 -36
- package/dist/web-components-library/z-myz-card.entry.js +0 -42
- package/dist/web-components-library/z-pocket-body.entry.js +0 -23
- package/dist/web-components-library/z-pocket-header.entry.js +0 -36
- package/dist/web-components-library/z-pocket.entry.js +0 -68
- package/dist/web-components-library/z-table-expanded-row.entry.js +0 -15
- package/www/build/_commonjsHelpers-8fe71198.js +0 -44
- package/www/build/app-globals-0f993ce5.js +0 -3
- package/www/build/css-shim-b3f2ee8d.js +0 -4
- package/www/build/dom-665d6011.js +0 -73
- package/www/build/shadow-css-b18e99d7.js +0 -387
- package/www/build/z-app-header.entry.js +0 -129
- package/www/build/z-body.entry.js +0 -14
- package/www/build/z-dragdrop-area.entry.js +0 -33
- package/www/build/z-heading.entry.js +0 -14
- package/www/build/z-icon.entry.js +0 -22
- package/www/build/z-input-message.entry.js +0 -20
- package/www/build/z-input.entry.js +0 -231
- package/www/build/z-list-element.entry.js +0 -173
- package/www/build/z-list-group.entry.js +0 -56
- package/www/build/z-list.entry.js +0 -36
- package/www/build/z-myz-card-body.entry.js +0 -15
- package/www/build/z-myz-card-cover.entry.js +0 -18
- package/www/build/z-myz-card-header.entry.js +0 -36
- package/www/build/z-myz-card.entry.js +0 -42
- package/www/build/z-panel-elem.entry.js +0 -26
- package/www/build/z-pocket-body.entry.js +0 -23
- package/www/build/z-pocket-header.entry.js +0 -36
- package/www/build/z-pocket.entry.js +0 -68
|
@@ -1,6 +1,26 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
function _interopNamespace(e) {
|
|
4
|
+
if (e && e.__esModule) return e;
|
|
5
|
+
var n = Object.create(null);
|
|
6
|
+
if (e) {
|
|
7
|
+
Object.keys(e).forEach(function (k) {
|
|
8
|
+
if (k !== 'default') {
|
|
9
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
10
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () {
|
|
13
|
+
return e[k];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
n['default'] = e;
|
|
20
|
+
return Object.freeze(n);
|
|
21
|
+
}
|
|
22
|
+
|
|
1
23
|
const NAMESPACE = 'web-components-library';
|
|
2
|
-
const BUILD = /* web-components-library */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: true, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: true, cmpWillUpdate: true, connectedCallback: false, constructableCSS: false, cssAnnotations: true, cssVarShim: false, devTools: true, disconnectedCallback: true, dynamicImportShim: false, element: false, event: true, hasRenderFn: true, hostListener: true, hostListenerTarget: true, hostListenerTargetBody: true, hostListenerTargetDocument: true, hostListenerTargetParent: false, hostListenerTargetWindow: true, hotModuleReplacement: true, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: true, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: true, mode: false, observeAttribute: true, profile: true, prop: true, propBoolean: true, propMutable: true, propNumber: true, propString: true, reflect: true, safari10: false, scoped: true, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, shadowDomShim: false, slot: true, slotChildNodesFix: false, slotRelocation: true, state: true, style: true, svg: true, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: true, watchCallback: true };
|
|
3
|
-
const Env = /* web-components-library */ {};
|
|
4
24
|
|
|
5
25
|
/**
|
|
6
26
|
* Virtual DOM patching algorithm based on Snabbdom by
|
|
@@ -13,120 +33,25 @@ const Env = /* web-components-library */ {};
|
|
|
13
33
|
let scopeId;
|
|
14
34
|
let contentRef;
|
|
15
35
|
let hostTagName;
|
|
16
|
-
let customError;
|
|
17
|
-
let i = 0;
|
|
18
36
|
let useNativeShadowDom = false;
|
|
19
37
|
let checkSlotFallbackVisibility = false;
|
|
20
38
|
let checkSlotRelocate = false;
|
|
21
39
|
let isSvgMode = false;
|
|
22
|
-
let renderingRef = null;
|
|
23
|
-
let queueCongestion = 0;
|
|
24
40
|
let queuePending = false;
|
|
25
|
-
const Build = {
|
|
26
|
-
isDev: BUILD.isDev ? true : false,
|
|
27
|
-
isBrowser: true,
|
|
28
|
-
isServer: false,
|
|
29
|
-
isTesting: BUILD.isTesting ? true : false,
|
|
30
|
-
};
|
|
31
|
-
const Context = {};
|
|
32
|
-
const getAssetPath = (path) => {
|
|
33
|
-
const assetUrl = new URL(path, plt.$resourcesUrl$);
|
|
34
|
-
return assetUrl.origin !== win.location.origin ? assetUrl.href : assetUrl.pathname;
|
|
35
|
-
};
|
|
36
|
-
const setAssetPath = (path) => (plt.$resourcesUrl$ = path);
|
|
37
41
|
const createTime = (fnName, tagName = '') => {
|
|
38
|
-
|
|
39
|
-
const key = `st:${fnName}:${tagName}:${i++}`;
|
|
40
|
-
// Start
|
|
41
|
-
performance.mark(key);
|
|
42
|
-
// End
|
|
43
|
-
return () => performance.measure(`[Stencil] ${fnName}() <${tagName}>`, key);
|
|
44
|
-
}
|
|
45
|
-
else {
|
|
42
|
+
{
|
|
46
43
|
return () => {
|
|
47
44
|
return;
|
|
48
45
|
};
|
|
49
46
|
}
|
|
50
47
|
};
|
|
51
48
|
const uniqueTime = (key, measureText) => {
|
|
52
|
-
|
|
53
|
-
if (performance.getEntriesByName(key).length === 0) {
|
|
54
|
-
performance.mark(key);
|
|
55
|
-
}
|
|
56
|
-
return () => {
|
|
57
|
-
if (performance.getEntriesByName(measureText).length === 0) {
|
|
58
|
-
performance.measure(measureText, key);
|
|
59
|
-
}
|
|
60
|
-
};
|
|
61
|
-
}
|
|
62
|
-
else {
|
|
49
|
+
{
|
|
63
50
|
return () => {
|
|
64
51
|
return;
|
|
65
52
|
};
|
|
66
53
|
}
|
|
67
54
|
};
|
|
68
|
-
const inspect = (ref) => {
|
|
69
|
-
const hostRef = getHostRef(ref);
|
|
70
|
-
if (!hostRef) {
|
|
71
|
-
return undefined;
|
|
72
|
-
}
|
|
73
|
-
const flags = hostRef.$flags$;
|
|
74
|
-
const hostElement = hostRef.$hostElement$;
|
|
75
|
-
return {
|
|
76
|
-
renderCount: hostRef.$renderCount$,
|
|
77
|
-
flags: {
|
|
78
|
-
hasRendered: !!(flags & 2 /* HOST_FLAGS.hasRendered */),
|
|
79
|
-
hasConnected: !!(flags & 1 /* HOST_FLAGS.hasConnected */),
|
|
80
|
-
isWaitingForChildren: !!(flags & 4 /* HOST_FLAGS.isWaitingForChildren */),
|
|
81
|
-
isConstructingInstance: !!(flags & 8 /* HOST_FLAGS.isConstructingInstance */),
|
|
82
|
-
isQueuedForUpdate: !!(flags & 16 /* HOST_FLAGS.isQueuedForUpdate */),
|
|
83
|
-
hasInitializedComponent: !!(flags & 32 /* HOST_FLAGS.hasInitializedComponent */),
|
|
84
|
-
hasLoadedComponent: !!(flags & 64 /* HOST_FLAGS.hasLoadedComponent */),
|
|
85
|
-
isWatchReady: !!(flags & 128 /* HOST_FLAGS.isWatchReady */),
|
|
86
|
-
isListenReady: !!(flags & 256 /* HOST_FLAGS.isListenReady */),
|
|
87
|
-
needsRerender: !!(flags & 512 /* HOST_FLAGS.needsRerender */),
|
|
88
|
-
},
|
|
89
|
-
instanceValues: hostRef.$instanceValues$,
|
|
90
|
-
ancestorComponent: hostRef.$ancestorComponent$,
|
|
91
|
-
hostElement,
|
|
92
|
-
lazyInstance: hostRef.$lazyInstance$,
|
|
93
|
-
vnode: hostRef.$vnode$,
|
|
94
|
-
modeName: hostRef.$modeName$,
|
|
95
|
-
onReadyPromise: hostRef.$onReadyPromise$,
|
|
96
|
-
onReadyResolve: hostRef.$onReadyResolve$,
|
|
97
|
-
onInstancePromise: hostRef.$onInstancePromise$,
|
|
98
|
-
onInstanceResolve: hostRef.$onInstanceResolve$,
|
|
99
|
-
onRenderResolve: hostRef.$onRenderResolve$,
|
|
100
|
-
queuedListeners: hostRef.$queuedListeners$,
|
|
101
|
-
rmListeners: hostRef.$rmListeners$,
|
|
102
|
-
['s-id']: hostElement['s-id'],
|
|
103
|
-
['s-cr']: hostElement['s-cr'],
|
|
104
|
-
['s-lr']: hostElement['s-lr'],
|
|
105
|
-
['s-p']: hostElement['s-p'],
|
|
106
|
-
['s-rc']: hostElement['s-rc'],
|
|
107
|
-
['s-sc']: hostElement['s-sc'],
|
|
108
|
-
};
|
|
109
|
-
};
|
|
110
|
-
const installDevTools = () => {
|
|
111
|
-
if (BUILD.devTools) {
|
|
112
|
-
const stencil = (win.stencil = win.stencil || {});
|
|
113
|
-
const originalInspect = stencil.inspect;
|
|
114
|
-
stencil.inspect = (ref) => {
|
|
115
|
-
let result = inspect(ref);
|
|
116
|
-
if (!result && typeof originalInspect === 'function') {
|
|
117
|
-
result = originalInspect(ref);
|
|
118
|
-
}
|
|
119
|
-
return result;
|
|
120
|
-
};
|
|
121
|
-
}
|
|
122
|
-
};
|
|
123
|
-
const CONTENT_REF_ID = 'r';
|
|
124
|
-
const ORG_LOCATION_ID = 'o';
|
|
125
|
-
const SLOT_NODE_ID = 's';
|
|
126
|
-
const TEXT_NODE_ID = 't';
|
|
127
|
-
const HYDRATE_ID = 's-id';
|
|
128
|
-
const HYDRATED_STYLE_ID = 'sty-id';
|
|
129
|
-
const HYDRATE_CHILD_ID = 'c-id';
|
|
130
55
|
const HYDRATED_CSS = '{visibility:hidden}.hydrated{visibility:inherit}';
|
|
131
56
|
const XLINK_NS = 'http://www.w3.org/1999/xlink';
|
|
132
57
|
/**
|
|
@@ -176,11 +101,6 @@ const h = (nodeName, vnodeData, ...children) => {
|
|
|
176
101
|
if ((simple = typeof nodeName !== 'function' && !isComplexType(child))) {
|
|
177
102
|
child = String(child);
|
|
178
103
|
}
|
|
179
|
-
else if (BUILD.isDev && typeof nodeName !== 'function' && child.$flags$ === undefined) {
|
|
180
|
-
consoleDevError(`vNode passed as children has unexpected type.
|
|
181
|
-
Make sure it's using the correct h() function.
|
|
182
|
-
Empty objects can also be the cause, look for JSX comments that became objects.`);
|
|
183
|
-
}
|
|
184
104
|
if (simple && lastSimple) {
|
|
185
105
|
// If the previous child was simple (string), we merge both
|
|
186
106
|
vNodeChildren[vNodeChildren.length - 1].$text$ += child;
|
|
@@ -195,17 +115,14 @@ Empty objects can also be the cause, look for JSX comments that became objects.`
|
|
|
195
115
|
};
|
|
196
116
|
walk(children);
|
|
197
117
|
if (vnodeData) {
|
|
198
|
-
if (BUILD.isDev && nodeName === 'input') {
|
|
199
|
-
validateInputProperties(vnodeData);
|
|
200
|
-
}
|
|
201
118
|
// normalize class / classname attributes
|
|
202
|
-
if (
|
|
119
|
+
if (vnodeData.key) {
|
|
203
120
|
key = vnodeData.key;
|
|
204
121
|
}
|
|
205
|
-
if (
|
|
122
|
+
if (vnodeData.name) {
|
|
206
123
|
slotName = vnodeData.name;
|
|
207
124
|
}
|
|
208
|
-
|
|
125
|
+
{
|
|
209
126
|
const classData = vnodeData.className || vnodeData.class;
|
|
210
127
|
if (classData) {
|
|
211
128
|
vnodeData.class =
|
|
@@ -217,24 +134,15 @@ Empty objects can also be the cause, look for JSX comments that became objects.`
|
|
|
217
134
|
}
|
|
218
135
|
}
|
|
219
136
|
}
|
|
220
|
-
if (BUILD.isDev && vNodeChildren.some(isHost)) {
|
|
221
|
-
consoleDevError(`The <Host> must be the single root component. Make sure:
|
|
222
|
-
- You are NOT using hostData() and <Host> in the same component.
|
|
223
|
-
- <Host> is used once, and it's the single root component of the render() function.`);
|
|
224
|
-
}
|
|
225
|
-
if (BUILD.vdomFunctional && typeof nodeName === 'function') {
|
|
226
|
-
// nodeName is a functional component
|
|
227
|
-
return nodeName(vnodeData === null ? {} : vnodeData, vNodeChildren, vdomFnUtils);
|
|
228
|
-
}
|
|
229
137
|
const vnode = newVNode(nodeName, null);
|
|
230
138
|
vnode.$attrs$ = vnodeData;
|
|
231
139
|
if (vNodeChildren.length > 0) {
|
|
232
140
|
vnode.$children$ = vNodeChildren;
|
|
233
141
|
}
|
|
234
|
-
|
|
142
|
+
{
|
|
235
143
|
vnode.$key$ = key;
|
|
236
144
|
}
|
|
237
|
-
|
|
145
|
+
{
|
|
238
146
|
vnode.$name$ = slotName;
|
|
239
147
|
}
|
|
240
148
|
return vnode;
|
|
@@ -247,277 +155,19 @@ const newVNode = (tag, text) => {
|
|
|
247
155
|
$elm$: null,
|
|
248
156
|
$children$: null,
|
|
249
157
|
};
|
|
250
|
-
|
|
158
|
+
{
|
|
251
159
|
vnode.$attrs$ = null;
|
|
252
160
|
}
|
|
253
|
-
|
|
161
|
+
{
|
|
254
162
|
vnode.$key$ = null;
|
|
255
163
|
}
|
|
256
|
-
|
|
164
|
+
{
|
|
257
165
|
vnode.$name$ = null;
|
|
258
166
|
}
|
|
259
167
|
return vnode;
|
|
260
168
|
};
|
|
261
169
|
const Host = {};
|
|
262
170
|
const isHost = (node) => node && node.$tag$ === Host;
|
|
263
|
-
const vdomFnUtils = {
|
|
264
|
-
forEach: (children, cb) => children.map(convertToPublic).forEach(cb),
|
|
265
|
-
map: (children, cb) => children.map(convertToPublic).map(cb).map(convertToPrivate),
|
|
266
|
-
};
|
|
267
|
-
const convertToPublic = (node) => ({
|
|
268
|
-
vattrs: node.$attrs$,
|
|
269
|
-
vchildren: node.$children$,
|
|
270
|
-
vkey: node.$key$,
|
|
271
|
-
vname: node.$name$,
|
|
272
|
-
vtag: node.$tag$,
|
|
273
|
-
vtext: node.$text$,
|
|
274
|
-
});
|
|
275
|
-
const convertToPrivate = (node) => {
|
|
276
|
-
if (typeof node.vtag === 'function') {
|
|
277
|
-
const vnodeData = Object.assign({}, node.vattrs);
|
|
278
|
-
if (node.vkey) {
|
|
279
|
-
vnodeData.key = node.vkey;
|
|
280
|
-
}
|
|
281
|
-
if (node.vname) {
|
|
282
|
-
vnodeData.name = node.vname;
|
|
283
|
-
}
|
|
284
|
-
return h(node.vtag, vnodeData, ...(node.vchildren || []));
|
|
285
|
-
}
|
|
286
|
-
const vnode = newVNode(node.vtag, node.vtext);
|
|
287
|
-
vnode.$attrs$ = node.vattrs;
|
|
288
|
-
vnode.$children$ = node.vchildren;
|
|
289
|
-
vnode.$key$ = node.vkey;
|
|
290
|
-
vnode.$name$ = node.vname;
|
|
291
|
-
return vnode;
|
|
292
|
-
};
|
|
293
|
-
/**
|
|
294
|
-
* Validates the ordering of attributes on an input element
|
|
295
|
-
* @param inputElm the element to validate
|
|
296
|
-
*/
|
|
297
|
-
const validateInputProperties = (inputElm) => {
|
|
298
|
-
const props = Object.keys(inputElm);
|
|
299
|
-
const value = props.indexOf('value');
|
|
300
|
-
if (value === -1) {
|
|
301
|
-
return;
|
|
302
|
-
}
|
|
303
|
-
const typeIndex = props.indexOf('type');
|
|
304
|
-
const minIndex = props.indexOf('min');
|
|
305
|
-
const maxIndex = props.indexOf('max');
|
|
306
|
-
const stepIndex = props.indexOf('step');
|
|
307
|
-
if (value < typeIndex || value < minIndex || value < maxIndex || value < stepIndex) {
|
|
308
|
-
consoleDevWarn(`The "value" prop of <input> should be set after "min", "max", "type" and "step"`);
|
|
309
|
-
}
|
|
310
|
-
};
|
|
311
|
-
const initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
|
|
312
|
-
const endHydrate = createTime('hydrateClient', tagName);
|
|
313
|
-
const shadowRoot = hostElm.shadowRoot;
|
|
314
|
-
const childRenderNodes = [];
|
|
315
|
-
const slotNodes = [];
|
|
316
|
-
const shadowRootNodes = BUILD.shadowDom && shadowRoot ? [] : null;
|
|
317
|
-
const vnode = (hostRef.$vnode$ = newVNode(tagName, null));
|
|
318
|
-
if (!plt.$orgLocNodes$) {
|
|
319
|
-
initializeDocumentHydrate(doc.body, (plt.$orgLocNodes$ = new Map()));
|
|
320
|
-
}
|
|
321
|
-
hostElm[HYDRATE_ID] = hostId;
|
|
322
|
-
hostElm.removeAttribute(HYDRATE_ID);
|
|
323
|
-
clientHydrate(vnode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, hostElm, hostId);
|
|
324
|
-
childRenderNodes.map((c) => {
|
|
325
|
-
const orgLocationId = c.$hostId$ + '.' + c.$nodeId$;
|
|
326
|
-
const orgLocationNode = plt.$orgLocNodes$.get(orgLocationId);
|
|
327
|
-
const node = c.$elm$;
|
|
328
|
-
if (orgLocationNode && supportsShadow && orgLocationNode['s-en'] === '') {
|
|
329
|
-
orgLocationNode.parentNode.insertBefore(node, orgLocationNode.nextSibling);
|
|
330
|
-
}
|
|
331
|
-
if (!shadowRoot) {
|
|
332
|
-
node['s-hn'] = tagName;
|
|
333
|
-
if (orgLocationNode) {
|
|
334
|
-
node['s-ol'] = orgLocationNode;
|
|
335
|
-
node['s-ol']['s-nr'] = node;
|
|
336
|
-
}
|
|
337
|
-
}
|
|
338
|
-
plt.$orgLocNodes$.delete(orgLocationId);
|
|
339
|
-
});
|
|
340
|
-
if (BUILD.shadowDom && shadowRoot) {
|
|
341
|
-
shadowRootNodes.map((shadowRootNode) => {
|
|
342
|
-
if (shadowRootNode) {
|
|
343
|
-
shadowRoot.appendChild(shadowRootNode);
|
|
344
|
-
}
|
|
345
|
-
});
|
|
346
|
-
}
|
|
347
|
-
endHydrate();
|
|
348
|
-
};
|
|
349
|
-
const clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, node, hostId) => {
|
|
350
|
-
let childNodeType;
|
|
351
|
-
let childIdSplt;
|
|
352
|
-
let childVNode;
|
|
353
|
-
let i;
|
|
354
|
-
if (node.nodeType === 1 /* NODE_TYPE.ElementNode */) {
|
|
355
|
-
childNodeType = node.getAttribute(HYDRATE_CHILD_ID);
|
|
356
|
-
if (childNodeType) {
|
|
357
|
-
// got the node data from the element's attribute
|
|
358
|
-
// `${hostId}.${nodeId}.${depth}.${index}`
|
|
359
|
-
childIdSplt = childNodeType.split('.');
|
|
360
|
-
if (childIdSplt[0] === hostId || childIdSplt[0] === '0') {
|
|
361
|
-
childVNode = {
|
|
362
|
-
$flags$: 0,
|
|
363
|
-
$hostId$: childIdSplt[0],
|
|
364
|
-
$nodeId$: childIdSplt[1],
|
|
365
|
-
$depth$: childIdSplt[2],
|
|
366
|
-
$index$: childIdSplt[3],
|
|
367
|
-
$tag$: node.tagName.toLowerCase(),
|
|
368
|
-
$elm$: node,
|
|
369
|
-
$attrs$: null,
|
|
370
|
-
$children$: null,
|
|
371
|
-
$key$: null,
|
|
372
|
-
$name$: null,
|
|
373
|
-
$text$: null,
|
|
374
|
-
};
|
|
375
|
-
childRenderNodes.push(childVNode);
|
|
376
|
-
node.removeAttribute(HYDRATE_CHILD_ID);
|
|
377
|
-
// this is a new child vnode
|
|
378
|
-
// so ensure its parent vnode has the vchildren array
|
|
379
|
-
if (!parentVNode.$children$) {
|
|
380
|
-
parentVNode.$children$ = [];
|
|
381
|
-
}
|
|
382
|
-
// add our child vnode to a specific index of the vnode's children
|
|
383
|
-
parentVNode.$children$[childVNode.$index$] = childVNode;
|
|
384
|
-
// this is now the new parent vnode for all the next child checks
|
|
385
|
-
parentVNode = childVNode;
|
|
386
|
-
if (shadowRootNodes && childVNode.$depth$ === '0') {
|
|
387
|
-
shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
|
|
388
|
-
}
|
|
389
|
-
}
|
|
390
|
-
}
|
|
391
|
-
// recursively drill down, end to start so we can remove nodes
|
|
392
|
-
for (i = node.childNodes.length - 1; i >= 0; i--) {
|
|
393
|
-
clientHydrate(parentVNode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, node.childNodes[i], hostId);
|
|
394
|
-
}
|
|
395
|
-
if (node.shadowRoot) {
|
|
396
|
-
// keep drilling down through the shadow root nodes
|
|
397
|
-
for (i = node.shadowRoot.childNodes.length - 1; i >= 0; i--) {
|
|
398
|
-
clientHydrate(parentVNode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, node.shadowRoot.childNodes[i], hostId);
|
|
399
|
-
}
|
|
400
|
-
}
|
|
401
|
-
}
|
|
402
|
-
else if (node.nodeType === 8 /* NODE_TYPE.CommentNode */) {
|
|
403
|
-
// `${COMMENT_TYPE}.${hostId}.${nodeId}.${depth}.${index}`
|
|
404
|
-
childIdSplt = node.nodeValue.split('.');
|
|
405
|
-
if (childIdSplt[1] === hostId || childIdSplt[1] === '0') {
|
|
406
|
-
// comment node for either the host id or a 0 host id
|
|
407
|
-
childNodeType = childIdSplt[0];
|
|
408
|
-
childVNode = {
|
|
409
|
-
$flags$: 0,
|
|
410
|
-
$hostId$: childIdSplt[1],
|
|
411
|
-
$nodeId$: childIdSplt[2],
|
|
412
|
-
$depth$: childIdSplt[3],
|
|
413
|
-
$index$: childIdSplt[4],
|
|
414
|
-
$elm$: node,
|
|
415
|
-
$attrs$: null,
|
|
416
|
-
$children$: null,
|
|
417
|
-
$key$: null,
|
|
418
|
-
$name$: null,
|
|
419
|
-
$tag$: null,
|
|
420
|
-
$text$: null,
|
|
421
|
-
};
|
|
422
|
-
if (childNodeType === TEXT_NODE_ID) {
|
|
423
|
-
childVNode.$elm$ = node.nextSibling;
|
|
424
|
-
if (childVNode.$elm$ && childVNode.$elm$.nodeType === 3 /* NODE_TYPE.TextNode */) {
|
|
425
|
-
childVNode.$text$ = childVNode.$elm$.textContent;
|
|
426
|
-
childRenderNodes.push(childVNode);
|
|
427
|
-
// remove the text comment since it's no longer needed
|
|
428
|
-
node.remove();
|
|
429
|
-
if (!parentVNode.$children$) {
|
|
430
|
-
parentVNode.$children$ = [];
|
|
431
|
-
}
|
|
432
|
-
parentVNode.$children$[childVNode.$index$] = childVNode;
|
|
433
|
-
if (shadowRootNodes && childVNode.$depth$ === '0') {
|
|
434
|
-
shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
|
|
435
|
-
}
|
|
436
|
-
}
|
|
437
|
-
}
|
|
438
|
-
else if (childVNode.$hostId$ === hostId) {
|
|
439
|
-
// this comment node is specifcally for this host id
|
|
440
|
-
if (childNodeType === SLOT_NODE_ID) {
|
|
441
|
-
// `${SLOT_NODE_ID}.${hostId}.${nodeId}.${depth}.${index}.${slotName}`;
|
|
442
|
-
childVNode.$tag$ = 'slot';
|
|
443
|
-
if (childIdSplt[5]) {
|
|
444
|
-
node['s-sn'] = childVNode.$name$ = childIdSplt[5];
|
|
445
|
-
}
|
|
446
|
-
else {
|
|
447
|
-
node['s-sn'] = '';
|
|
448
|
-
}
|
|
449
|
-
node['s-sr'] = true;
|
|
450
|
-
if (BUILD.shadowDom && shadowRootNodes) {
|
|
451
|
-
// browser support shadowRoot and this is a shadow dom component
|
|
452
|
-
// create an actual slot element
|
|
453
|
-
childVNode.$elm$ = doc.createElement(childVNode.$tag$);
|
|
454
|
-
if (childVNode.$name$) {
|
|
455
|
-
// add the slot name attribute
|
|
456
|
-
childVNode.$elm$.setAttribute('name', childVNode.$name$);
|
|
457
|
-
}
|
|
458
|
-
// insert the new slot element before the slot comment
|
|
459
|
-
node.parentNode.insertBefore(childVNode.$elm$, node);
|
|
460
|
-
// remove the slot comment since it's not needed for shadow
|
|
461
|
-
node.remove();
|
|
462
|
-
if (childVNode.$depth$ === '0') {
|
|
463
|
-
shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
|
|
464
|
-
}
|
|
465
|
-
}
|
|
466
|
-
slotNodes.push(childVNode);
|
|
467
|
-
if (!parentVNode.$children$) {
|
|
468
|
-
parentVNode.$children$ = [];
|
|
469
|
-
}
|
|
470
|
-
parentVNode.$children$[childVNode.$index$] = childVNode;
|
|
471
|
-
}
|
|
472
|
-
else if (childNodeType === CONTENT_REF_ID) {
|
|
473
|
-
// `${CONTENT_REF_ID}.${hostId}`;
|
|
474
|
-
if (BUILD.shadowDom && shadowRootNodes) {
|
|
475
|
-
// remove the content ref comment since it's not needed for shadow
|
|
476
|
-
node.remove();
|
|
477
|
-
}
|
|
478
|
-
else if (BUILD.slotRelocation) {
|
|
479
|
-
hostElm['s-cr'] = node;
|
|
480
|
-
node['s-cn'] = true;
|
|
481
|
-
}
|
|
482
|
-
}
|
|
483
|
-
}
|
|
484
|
-
}
|
|
485
|
-
}
|
|
486
|
-
else if (parentVNode && parentVNode.$tag$ === 'style') {
|
|
487
|
-
const vnode = newVNode(null, node.textContent);
|
|
488
|
-
vnode.$elm$ = node;
|
|
489
|
-
vnode.$index$ = '0';
|
|
490
|
-
parentVNode.$children$ = [vnode];
|
|
491
|
-
}
|
|
492
|
-
};
|
|
493
|
-
const initializeDocumentHydrate = (node, orgLocNodes) => {
|
|
494
|
-
if (node.nodeType === 1 /* NODE_TYPE.ElementNode */) {
|
|
495
|
-
let i = 0;
|
|
496
|
-
for (; i < node.childNodes.length; i++) {
|
|
497
|
-
initializeDocumentHydrate(node.childNodes[i], orgLocNodes);
|
|
498
|
-
}
|
|
499
|
-
if (node.shadowRoot) {
|
|
500
|
-
for (i = 0; i < node.shadowRoot.childNodes.length; i++) {
|
|
501
|
-
initializeDocumentHydrate(node.shadowRoot.childNodes[i], orgLocNodes);
|
|
502
|
-
}
|
|
503
|
-
}
|
|
504
|
-
}
|
|
505
|
-
else if (node.nodeType === 8 /* NODE_TYPE.CommentNode */) {
|
|
506
|
-
const childIdSplt = node.nodeValue.split('.');
|
|
507
|
-
if (childIdSplt[0] === ORG_LOCATION_ID) {
|
|
508
|
-
orgLocNodes.set(childIdSplt[1] + '.' + childIdSplt[2], node);
|
|
509
|
-
node.nodeValue = '';
|
|
510
|
-
// useful to know if the original location is
|
|
511
|
-
// the root light-dom of a shadow dom component
|
|
512
|
-
node['s-en'] = childIdSplt[3];
|
|
513
|
-
}
|
|
514
|
-
}
|
|
515
|
-
};
|
|
516
|
-
// Private
|
|
517
|
-
const computeMode = (elm) => modeResolutionChain.map((h) => h(elm)).find((m) => !!m);
|
|
518
|
-
// Public
|
|
519
|
-
const setMode = (handler) => modeResolutionChain.push(handler);
|
|
520
|
-
const getMode = (ref) => getHostRef(ref).$modeName$;
|
|
521
171
|
/**
|
|
522
172
|
* Parse a new property value for a given property type.
|
|
523
173
|
*
|
|
@@ -544,16 +194,16 @@ const getMode = (ref) => getHostRef(ref).$modeName$;
|
|
|
544
194
|
const parsePropertyValue = (propValue, propType) => {
|
|
545
195
|
// ensure this value is of the correct prop type
|
|
546
196
|
if (propValue != null && !isComplexType(propValue)) {
|
|
547
|
-
if (
|
|
197
|
+
if (propType & 4 /* MEMBER_FLAGS.Boolean */) {
|
|
548
198
|
// per the HTML spec, any string value means it is a boolean true value
|
|
549
199
|
// but we'll cheat here and say that the string "false" is the boolean false
|
|
550
200
|
return propValue === 'false' ? false : propValue === '' || !!propValue;
|
|
551
201
|
}
|
|
552
|
-
if (
|
|
202
|
+
if (propType & 2 /* MEMBER_FLAGS.Number */) {
|
|
553
203
|
// force it to be a number
|
|
554
204
|
return parseFloat(propValue);
|
|
555
205
|
}
|
|
556
|
-
if (
|
|
206
|
+
if (propType & 1 /* MEMBER_FLAGS.String */) {
|
|
557
207
|
// could have been passed as a number or boolean
|
|
558
208
|
// but we still want it as a string
|
|
559
209
|
return String(propValue);
|
|
@@ -565,14 +215,11 @@ const parsePropertyValue = (propValue, propType) => {
|
|
|
565
215
|
// so no need to change to a different type
|
|
566
216
|
return propValue;
|
|
567
217
|
};
|
|
568
|
-
const getElement = (ref) => (
|
|
218
|
+
const getElement = (ref) => (getHostRef(ref).$hostElement$ );
|
|
569
219
|
const createEvent = (ref, name, flags) => {
|
|
570
220
|
const elm = getElement(ref);
|
|
571
221
|
return {
|
|
572
222
|
emit: (detail) => {
|
|
573
|
-
if (BUILD.isDev && !elm.isConnected) {
|
|
574
|
-
consoleDevWarn(`The "${name}" event was emitted, but the dispatcher node is no longer connected to the dom.`);
|
|
575
|
-
}
|
|
576
223
|
return emitEvent(elm, name, {
|
|
577
224
|
bubbles: !!(flags & 4 /* EVENT_FLAGS.Bubbles */),
|
|
578
225
|
composed: !!(flags & 2 /* EVENT_FLAGS.Composed */),
|
|
@@ -612,11 +259,8 @@ const registerStyle = (scopeId, cssText, allowCS) => {
|
|
|
612
259
|
styles.set(scopeId, style);
|
|
613
260
|
};
|
|
614
261
|
const addStyle = (styleContainerNode, cmpMeta, mode, hostElm) => {
|
|
615
|
-
let scopeId = getScopeId(cmpMeta
|
|
262
|
+
let scopeId = getScopeId(cmpMeta);
|
|
616
263
|
const style = styles.get(scopeId);
|
|
617
|
-
if (!BUILD.attachStyles) {
|
|
618
|
-
return scopeId;
|
|
619
|
-
}
|
|
620
264
|
// if an element is NOT connected then getRootNode() will return the wrong root node
|
|
621
265
|
// so the fallback is to always use the document for the root node in those cases
|
|
622
266
|
styleContainerNode = styleContainerNode.nodeType === 11 /* NODE_TYPE.DocumentFragment */ ? styleContainerNode : doc;
|
|
@@ -629,31 +273,11 @@ const addStyle = (styleContainerNode, cmpMeta, mode, hostElm) => {
|
|
|
629
273
|
rootAppliedStyles.set(styleContainerNode, (appliedStyles = new Set()));
|
|
630
274
|
}
|
|
631
275
|
if (!appliedStyles.has(scopeId)) {
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
(styleElm = styleContainerNode.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId}"]`))) {
|
|
635
|
-
// This is only happening on native shadow-dom, do not needs CSS var shim
|
|
636
|
-
styleElm.innerHTML = style;
|
|
637
|
-
}
|
|
638
|
-
else {
|
|
639
|
-
if (BUILD.cssVarShim && plt.$cssShim$) {
|
|
640
|
-
styleElm = plt.$cssShim$.createHostStyle(hostElm, scopeId, style, !!(cmpMeta.$flags$ & 10 /* CMP_FLAGS.needsScopedEncapsulation */));
|
|
641
|
-
const newScopeId = styleElm['s-sc'];
|
|
642
|
-
if (newScopeId) {
|
|
643
|
-
scopeId = newScopeId;
|
|
644
|
-
// we don't want to add this styleID to the appliedStyles Set
|
|
645
|
-
// since the cssVarShim might need to apply several different
|
|
646
|
-
// stylesheets for the same component
|
|
647
|
-
appliedStyles = null;
|
|
648
|
-
}
|
|
649
|
-
}
|
|
650
|
-
else {
|
|
276
|
+
{
|
|
277
|
+
{
|
|
651
278
|
styleElm = doc.createElement('style');
|
|
652
279
|
styleElm.innerHTML = style;
|
|
653
280
|
}
|
|
654
|
-
if (BUILD.hydrateServerSide || BUILD.hotModuleReplacement) {
|
|
655
|
-
styleElm.setAttribute(HYDRATED_STYLE_ID, scopeId);
|
|
656
|
-
}
|
|
657
281
|
styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector('link'));
|
|
658
282
|
}
|
|
659
283
|
if (appliedStyles) {
|
|
@@ -661,7 +285,7 @@ const addStyle = (styleContainerNode, cmpMeta, mode, hostElm) => {
|
|
|
661
285
|
}
|
|
662
286
|
}
|
|
663
287
|
}
|
|
664
|
-
else if (
|
|
288
|
+
else if (!styleContainerNode.adoptedStyleSheets.includes(style)) {
|
|
665
289
|
styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
|
|
666
290
|
}
|
|
667
291
|
}
|
|
@@ -672,8 +296,8 @@ const attachStyles = (hostRef) => {
|
|
|
672
296
|
const elm = hostRef.$hostElement$;
|
|
673
297
|
const flags = cmpMeta.$flags$;
|
|
674
298
|
const endAttachStyles = createTime('attachStyles', cmpMeta.$tagName$);
|
|
675
|
-
const scopeId = addStyle(
|
|
676
|
-
if (
|
|
299
|
+
const scopeId = addStyle(elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(), cmpMeta);
|
|
300
|
+
if (flags & 10 /* CMP_FLAGS.needsScopedEncapsulation */) {
|
|
677
301
|
// only required when we're NOT using native shadow dom (slot)
|
|
678
302
|
// or this browser doesn't support native shadow dom
|
|
679
303
|
// and this host element was NOT created with SSR
|
|
@@ -683,14 +307,13 @@ const attachStyles = (hostRef) => {
|
|
|
683
307
|
// DOM WRITE!!
|
|
684
308
|
elm['s-sc'] = scopeId;
|
|
685
309
|
elm.classList.add(scopeId + '-h');
|
|
686
|
-
if (
|
|
310
|
+
if (flags & 2 /* CMP_FLAGS.scopedCssEncapsulation */) {
|
|
687
311
|
elm.classList.add(scopeId + '-s');
|
|
688
312
|
}
|
|
689
313
|
}
|
|
690
314
|
endAttachStyles();
|
|
691
315
|
};
|
|
692
|
-
const getScopeId = (cmp, mode) => 'sc-' + (
|
|
693
|
-
const convertScopedToShadow = (css) => css.replace(/\/\*!@([^\/]+)\*\/[^\{]+\{/g, '$1{');
|
|
316
|
+
const getScopeId = (cmp, mode) => 'sc-' + (cmp.$tagName$);
|
|
694
317
|
/**
|
|
695
318
|
* Production setAccessor() function based on Preact by
|
|
696
319
|
* Jason Miller (@developit)
|
|
@@ -703,19 +326,19 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
703
326
|
if (oldValue !== newValue) {
|
|
704
327
|
let isProp = isMemberInElement(elm, memberName);
|
|
705
328
|
let ln = memberName.toLowerCase();
|
|
706
|
-
if (
|
|
329
|
+
if (memberName === 'class') {
|
|
707
330
|
const classList = elm.classList;
|
|
708
331
|
const oldClasses = parseClassList(oldValue);
|
|
709
332
|
const newClasses = parseClassList(newValue);
|
|
710
333
|
classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
|
|
711
334
|
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
712
335
|
}
|
|
713
|
-
else if (
|
|
336
|
+
else if (memberName === 'style') {
|
|
714
337
|
// update style attribute, css properties and values
|
|
715
|
-
|
|
338
|
+
{
|
|
716
339
|
for (const prop in oldValue) {
|
|
717
340
|
if (!newValue || newValue[prop] == null) {
|
|
718
|
-
if (
|
|
341
|
+
if (prop.includes('-')) {
|
|
719
342
|
elm.style.removeProperty(prop);
|
|
720
343
|
}
|
|
721
344
|
else {
|
|
@@ -726,7 +349,7 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
726
349
|
}
|
|
727
350
|
for (const prop in newValue) {
|
|
728
351
|
if (!oldValue || newValue[prop] !== oldValue[prop]) {
|
|
729
|
-
if (
|
|
352
|
+
if (prop.includes('-')) {
|
|
730
353
|
elm.style.setProperty(prop, newValue[prop]);
|
|
731
354
|
}
|
|
732
355
|
else {
|
|
@@ -735,16 +358,15 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
735
358
|
}
|
|
736
359
|
}
|
|
737
360
|
}
|
|
738
|
-
else if (
|
|
361
|
+
else if (memberName === 'key')
|
|
739
362
|
;
|
|
740
|
-
else if (
|
|
363
|
+
else if (memberName === 'ref') {
|
|
741
364
|
// minifier will clean this up
|
|
742
365
|
if (newValue) {
|
|
743
366
|
newValue(elm);
|
|
744
367
|
}
|
|
745
368
|
}
|
|
746
|
-
else if (
|
|
747
|
-
(BUILD.lazyLoad ? !isProp : !elm.__lookupSetter__(memberName)) &&
|
|
369
|
+
else if ((!isProp ) &&
|
|
748
370
|
memberName[0] === 'o' &&
|
|
749
371
|
memberName[1] === 'n') {
|
|
750
372
|
// Event Handlers
|
|
@@ -783,7 +405,7 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
783
405
|
plt.ael(elm, memberName, newValue, false);
|
|
784
406
|
}
|
|
785
407
|
}
|
|
786
|
-
else
|
|
408
|
+
else {
|
|
787
409
|
// Set property if it exists and it's not a SVG
|
|
788
410
|
const isComplex = isComplexType(newValue);
|
|
789
411
|
if ((isProp || (isComplex && newValue !== null)) && !isSvg) {
|
|
@@ -812,7 +434,7 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
812
434
|
* - if the newValue is null/undefined or 'false'.
|
|
813
435
|
*/
|
|
814
436
|
let xlink = false;
|
|
815
|
-
|
|
437
|
+
{
|
|
816
438
|
if (ln !== (ln = ln.replace(/^xlink\:?/, ''))) {
|
|
817
439
|
memberName = ln;
|
|
818
440
|
xlink = true;
|
|
@@ -820,7 +442,7 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
820
442
|
}
|
|
821
443
|
if (newValue == null || newValue === false) {
|
|
822
444
|
if (newValue !== false || elm.getAttribute(memberName) === '') {
|
|
823
|
-
if (
|
|
445
|
+
if (xlink) {
|
|
824
446
|
elm.removeAttributeNS(XLINK_NS, memberName);
|
|
825
447
|
}
|
|
826
448
|
else {
|
|
@@ -830,7 +452,7 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
830
452
|
}
|
|
831
453
|
else if ((!isProp || flags & 4 /* VNODE_FLAGS.isHost */ || isSvg) && !isComplex) {
|
|
832
454
|
newValue = newValue === true ? '' : newValue;
|
|
833
|
-
if (
|
|
455
|
+
if (xlink) {
|
|
834
456
|
elm.setAttributeNS(XLINK_NS, memberName, newValue);
|
|
835
457
|
}
|
|
836
458
|
else {
|
|
@@ -851,7 +473,7 @@ const updateElement = (oldVnode, newVnode, isSvgMode, memberName) => {
|
|
|
851
473
|
: newVnode.$elm$;
|
|
852
474
|
const oldVnodeAttrs = (oldVnode && oldVnode.$attrs$) || EMPTY_OBJ;
|
|
853
475
|
const newVnodeAttrs = newVnode.$attrs$ || EMPTY_OBJ;
|
|
854
|
-
|
|
476
|
+
{
|
|
855
477
|
// remove attributes no longer present on the vnode by setting them to undefined
|
|
856
478
|
for (memberName in oldVnodeAttrs) {
|
|
857
479
|
if (!(memberName in newVnodeAttrs)) {
|
|
@@ -881,7 +503,7 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
881
503
|
let elm;
|
|
882
504
|
let childNode;
|
|
883
505
|
let oldVNode;
|
|
884
|
-
if (
|
|
506
|
+
if (!useNativeShadowDom) {
|
|
885
507
|
// remember for later we need to check to relocate nodes
|
|
886
508
|
checkSlotRelocate = true;
|
|
887
509
|
if (newVNode.$tag$ === 'slot') {
|
|
@@ -896,38 +518,32 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
896
518
|
1 /* VNODE_FLAGS.isSlotReference */;
|
|
897
519
|
}
|
|
898
520
|
}
|
|
899
|
-
if (
|
|
900
|
-
consoleDevError(`The JSX ${newVNode.$text$ !== null ? `"${newVNode.$text$}" text` : `"${newVNode.$tag$}" element`} node should not be shared within the same renderer. The renderer caches element lookups in order to improve performance. However, a side effect from this is that the exact same JSX node should not be reused. For more information please see https://stenciljs.com/docs/templating-jsx#avoid-shared-jsx-nodes`);
|
|
901
|
-
}
|
|
902
|
-
if (BUILD.vdomText && newVNode.$text$ !== null) {
|
|
521
|
+
if (newVNode.$text$ !== null) {
|
|
903
522
|
// create text node
|
|
904
523
|
elm = newVNode.$elm$ = doc.createTextNode(newVNode.$text$);
|
|
905
524
|
}
|
|
906
|
-
else if (
|
|
525
|
+
else if (newVNode.$flags$ & 1 /* VNODE_FLAGS.isSlotReference */) {
|
|
907
526
|
// create a slot reference node
|
|
908
527
|
elm = newVNode.$elm$ =
|
|
909
|
-
|
|
528
|
+
doc.createTextNode('');
|
|
910
529
|
}
|
|
911
530
|
else {
|
|
912
|
-
if (
|
|
531
|
+
if (!isSvgMode) {
|
|
913
532
|
isSvgMode = newVNode.$tag$ === 'svg';
|
|
914
533
|
}
|
|
915
534
|
// create element
|
|
916
|
-
elm = newVNode.$elm$ = (
|
|
917
|
-
? doc.createElementNS(isSvgMode ? SVG_NS : HTML_NS, BUILD.slotRelocation && newVNode.$flags$ & 2 /* VNODE_FLAGS.isSlotFallback */
|
|
535
|
+
elm = newVNode.$elm$ = (doc.createElementNS(isSvgMode ? SVG_NS : HTML_NS, newVNode.$flags$ & 2 /* VNODE_FLAGS.isSlotFallback */
|
|
918
536
|
? 'slot-fb'
|
|
919
537
|
: newVNode.$tag$)
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
: newVNode.$tag$));
|
|
923
|
-
if (BUILD.svg && isSvgMode && newVNode.$tag$ === 'foreignObject') {
|
|
538
|
+
);
|
|
539
|
+
if (isSvgMode && newVNode.$tag$ === 'foreignObject') {
|
|
924
540
|
isSvgMode = false;
|
|
925
541
|
}
|
|
926
542
|
// add css classes, attrs, props, listeners, etc.
|
|
927
|
-
|
|
543
|
+
{
|
|
928
544
|
updateElement(null, newVNode, isSvgMode);
|
|
929
545
|
}
|
|
930
|
-
if (
|
|
546
|
+
if (isDef(scopeId) && elm['s-si'] !== scopeId) {
|
|
931
547
|
// if there is a scopeId and this is the initial render
|
|
932
548
|
// then let's add the scopeId as a css class
|
|
933
549
|
elm.classList.add((elm['s-si'] = scopeId));
|
|
@@ -943,7 +559,7 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
943
559
|
}
|
|
944
560
|
}
|
|
945
561
|
}
|
|
946
|
-
|
|
562
|
+
{
|
|
947
563
|
if (newVNode.$tag$ === 'svg') {
|
|
948
564
|
// Only reset the SVG context when we're exiting <svg> element
|
|
949
565
|
isSvgMode = false;
|
|
@@ -954,7 +570,7 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
954
570
|
}
|
|
955
571
|
}
|
|
956
572
|
}
|
|
957
|
-
|
|
573
|
+
{
|
|
958
574
|
elm['s-hn'] = hostTagName;
|
|
959
575
|
if (newVNode.$flags$ & (2 /* VNODE_FLAGS.isSlotFallback */ | 1 /* VNODE_FLAGS.isSlotReference */)) {
|
|
960
576
|
// remember the content reference comment
|
|
@@ -999,9 +615,9 @@ const putBackInOriginalLocation = (parentElm, recursive) => {
|
|
|
999
615
|
plt.$flags$ &= ~1 /* PLATFORM_FLAGS.isTmpDisconnected */;
|
|
1000
616
|
};
|
|
1001
617
|
const addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
|
|
1002
|
-
let containerElm = ((
|
|
618
|
+
let containerElm = ((parentElm['s-cr'] && parentElm['s-cr'].parentNode) || parentElm);
|
|
1003
619
|
let childNode;
|
|
1004
|
-
if (
|
|
620
|
+
if (containerElm.shadowRoot && containerElm.tagName === hostTagName) {
|
|
1005
621
|
containerElm = containerElm.shadowRoot;
|
|
1006
622
|
}
|
|
1007
623
|
for (; startIdx <= endIdx; ++startIdx) {
|
|
@@ -1009,7 +625,7 @@ const addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) =>
|
|
|
1009
625
|
childNode = createElm(null, parentVNode, startIdx, parentElm);
|
|
1010
626
|
if (childNode) {
|
|
1011
627
|
vnodes[startIdx].$elm$ = childNode;
|
|
1012
|
-
containerElm.insertBefore(childNode,
|
|
628
|
+
containerElm.insertBefore(childNode, referenceNode(before) );
|
|
1013
629
|
}
|
|
1014
630
|
}
|
|
1015
631
|
}
|
|
@@ -1019,7 +635,7 @@ const removeVnodes = (vnodes, startIdx, endIdx, vnode, elm) => {
|
|
|
1019
635
|
if ((vnode = vnodes[startIdx])) {
|
|
1020
636
|
elm = vnode.$elm$;
|
|
1021
637
|
callNodeRefs(vnode);
|
|
1022
|
-
|
|
638
|
+
{
|
|
1023
639
|
// we're removing this element
|
|
1024
640
|
// so it's possible we need to show slot fallback content now
|
|
1025
641
|
checkSlotFallbackVisibility = true;
|
|
@@ -1165,7 +781,7 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
|
1165
781
|
//
|
|
1166
782
|
// In this situation we need to patch `newEndVnode` onto `oldStartVnode`
|
|
1167
783
|
// and move the DOM element for `oldStartVnode`.
|
|
1168
|
-
if (
|
|
784
|
+
if ((oldStartVnode.$tag$ === 'slot' || newEndVnode.$tag$ === 'slot')) {
|
|
1169
785
|
putBackInOriginalLocation(oldStartVnode.$elm$.parentNode, false);
|
|
1170
786
|
}
|
|
1171
787
|
patch(oldStartVnode, newEndVnode);
|
|
@@ -1206,7 +822,7 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
|
1206
822
|
// (which will handle updating any changed attributes, reconciling their
|
|
1207
823
|
// children etc) but we also need to move the DOM node to which
|
|
1208
824
|
// `oldEndVnode` corresponds.
|
|
1209
|
-
if (
|
|
825
|
+
if ((oldStartVnode.$tag$ === 'slot' || newEndVnode.$tag$ === 'slot')) {
|
|
1210
826
|
putBackInOriginalLocation(oldEndVnode.$elm$.parentNode, false);
|
|
1211
827
|
}
|
|
1212
828
|
patch(oldEndVnode, newStartVnode);
|
|
@@ -1229,7 +845,7 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
|
1229
845
|
// children which have the same key as the first node in the new
|
|
1230
846
|
// children.
|
|
1231
847
|
idxInOld = -1;
|
|
1232
|
-
|
|
848
|
+
{
|
|
1233
849
|
for (i = oldStartIdx; i <= oldEndIdx; ++i) {
|
|
1234
850
|
if (oldCh[i] && oldCh[i].$key$ !== null && oldCh[i].$key$ === newStartVnode.$key$) {
|
|
1235
851
|
idxInOld = i;
|
|
@@ -1237,7 +853,7 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
|
1237
853
|
}
|
|
1238
854
|
}
|
|
1239
855
|
}
|
|
1240
|
-
if (
|
|
856
|
+
if (idxInOld >= 0) {
|
|
1241
857
|
// We found a node in the old children which matches up with the first
|
|
1242
858
|
// node in the new children! So let's deal with that
|
|
1243
859
|
elmToMove = oldCh[idxInOld];
|
|
@@ -1264,12 +880,9 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
|
1264
880
|
}
|
|
1265
881
|
if (node) {
|
|
1266
882
|
// if we created a new node then handle inserting it to the DOM
|
|
1267
|
-
|
|
883
|
+
{
|
|
1268
884
|
parentReferenceNode(oldStartVnode.$elm$).insertBefore(node, referenceNode(oldStartVnode.$elm$));
|
|
1269
885
|
}
|
|
1270
|
-
else {
|
|
1271
|
-
oldStartVnode.$elm$.parentNode.insertBefore(node, oldStartVnode.$elm$);
|
|
1272
|
-
}
|
|
1273
886
|
}
|
|
1274
887
|
}
|
|
1275
888
|
}
|
|
@@ -1277,7 +890,7 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
|
1277
890
|
// we have some more new nodes to add which don't match up with old nodes
|
|
1278
891
|
addVnodes(parentElm, newCh[newEndIdx + 1] == null ? null : newCh[newEndIdx + 1].$elm$, newVNode, newCh, newStartIdx, newEndIdx);
|
|
1279
892
|
}
|
|
1280
|
-
else if (
|
|
893
|
+
else if (newStartIdx > newEndIdx) {
|
|
1281
894
|
// there are nodes in the `oldCh` array which no longer correspond to nodes
|
|
1282
895
|
// in the new array, so lets remove them (which entails cleaning up the
|
|
1283
896
|
// relevant DOM nodes)
|
|
@@ -1305,14 +918,13 @@ const isSameVnode = (leftVNode, rightVNode) => {
|
|
|
1305
918
|
// compare if two vnode to see if they're "technically" the same
|
|
1306
919
|
// need to have the same element tag, and same key to be the same
|
|
1307
920
|
if (leftVNode.$tag$ === rightVNode.$tag$) {
|
|
1308
|
-
if (
|
|
921
|
+
if (leftVNode.$tag$ === 'slot') {
|
|
1309
922
|
return leftVNode.$name$ === rightVNode.$name$;
|
|
1310
923
|
}
|
|
1311
924
|
// this will be set if components in the build have `key` attrs set on them
|
|
1312
|
-
|
|
925
|
+
{
|
|
1313
926
|
return leftVNode.$key$ === rightVNode.$key$;
|
|
1314
927
|
}
|
|
1315
|
-
return true;
|
|
1316
928
|
}
|
|
1317
929
|
return false;
|
|
1318
930
|
};
|
|
@@ -1339,14 +951,14 @@ const patch = (oldVNode, newVNode) => {
|
|
|
1339
951
|
const tag = newVNode.$tag$;
|
|
1340
952
|
const text = newVNode.$text$;
|
|
1341
953
|
let defaultHolder;
|
|
1342
|
-
if (
|
|
1343
|
-
|
|
954
|
+
if (text === null) {
|
|
955
|
+
{
|
|
1344
956
|
// test if we're rendering an svg element, or still rendering nodes inside of one
|
|
1345
957
|
// only add this to the when the compiler sees we're using an svg somewhere
|
|
1346
958
|
isSvgMode = tag === 'svg' ? true : tag === 'foreignObject' ? false : isSvgMode;
|
|
1347
959
|
}
|
|
1348
|
-
|
|
1349
|
-
if (
|
|
960
|
+
{
|
|
961
|
+
if (tag === 'slot')
|
|
1350
962
|
;
|
|
1351
963
|
else {
|
|
1352
964
|
// either this is the first render of an element OR it's an update
|
|
@@ -1355,33 +967,33 @@ const patch = (oldVNode, newVNode) => {
|
|
|
1355
967
|
updateElement(oldVNode, newVNode, isSvgMode);
|
|
1356
968
|
}
|
|
1357
969
|
}
|
|
1358
|
-
if (
|
|
970
|
+
if (oldChildren !== null && newChildren !== null) {
|
|
1359
971
|
// looks like there's child vnodes for both the old and new vnodes
|
|
1360
972
|
// so we need to call `updateChildren` to reconcile them
|
|
1361
973
|
updateChildren(elm, oldChildren, newVNode, newChildren);
|
|
1362
974
|
}
|
|
1363
975
|
else if (newChildren !== null) {
|
|
1364
976
|
// no old child vnodes, but there are new child vnodes to add
|
|
1365
|
-
if (
|
|
977
|
+
if (oldVNode.$text$ !== null) {
|
|
1366
978
|
// the old vnode was text, so be sure to clear it out
|
|
1367
979
|
elm.textContent = '';
|
|
1368
980
|
}
|
|
1369
981
|
// add the new vnode children
|
|
1370
982
|
addVnodes(elm, null, newVNode, newChildren, 0, newChildren.length - 1);
|
|
1371
983
|
}
|
|
1372
|
-
else if (
|
|
984
|
+
else if (oldChildren !== null) {
|
|
1373
985
|
// no new child vnodes, but there are old child vnodes to remove
|
|
1374
986
|
removeVnodes(oldChildren, 0, oldChildren.length - 1);
|
|
1375
987
|
}
|
|
1376
|
-
if (
|
|
988
|
+
if (isSvgMode && tag === 'svg') {
|
|
1377
989
|
isSvgMode = false;
|
|
1378
990
|
}
|
|
1379
991
|
}
|
|
1380
|
-
else if (
|
|
992
|
+
else if ((defaultHolder = elm['s-cr'])) {
|
|
1381
993
|
// this element has slotted content
|
|
1382
994
|
defaultHolder.parentNode.textContent = text;
|
|
1383
995
|
}
|
|
1384
|
-
else if (
|
|
996
|
+
else if (oldVNode.$text$ !== text) {
|
|
1385
997
|
// update the text content for the text only vnode
|
|
1386
998
|
// and also only if the text is different than before
|
|
1387
999
|
elm.data = text;
|
|
@@ -1519,7 +1131,7 @@ const isNodeLocatedInSlot = (nodeToRelocate, slotNameAttr) => {
|
|
|
1519
1131
|
return slotNameAttr === '';
|
|
1520
1132
|
};
|
|
1521
1133
|
const callNodeRefs = (vNode) => {
|
|
1522
|
-
|
|
1134
|
+
{
|
|
1523
1135
|
vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
|
|
1524
1136
|
vNode.$children$ && vNode.$children$.map(callNodeRefs);
|
|
1525
1137
|
}
|
|
@@ -1530,41 +1142,26 @@ const renderVdom = (hostRef, renderFnResults) => {
|
|
|
1530
1142
|
const oldVNode = hostRef.$vnode$ || newVNode(null, null);
|
|
1531
1143
|
const rootVnode = isHost(renderFnResults) ? renderFnResults : h(null, null, renderFnResults);
|
|
1532
1144
|
hostTagName = hostElm.tagName;
|
|
1533
|
-
|
|
1534
|
-
if (BUILD.isDev && Array.isArray(renderFnResults) && renderFnResults.some(isHost)) {
|
|
1535
|
-
throw new Error(`The <Host> must be the single root component.
|
|
1536
|
-
Looks like the render() function of "${hostTagName.toLowerCase()}" is returning an array that contains the <Host>.
|
|
1537
|
-
|
|
1538
|
-
The render() function should look like this instead:
|
|
1539
|
-
|
|
1540
|
-
render() {
|
|
1541
|
-
// Do not return an array
|
|
1542
|
-
return (
|
|
1543
|
-
<Host>{content}</Host>
|
|
1544
|
-
);
|
|
1545
|
-
}
|
|
1546
|
-
`);
|
|
1547
|
-
}
|
|
1548
|
-
if (BUILD.reflect && cmpMeta.$attrsToReflect$) {
|
|
1145
|
+
if (cmpMeta.$attrsToReflect$) {
|
|
1549
1146
|
rootVnode.$attrs$ = rootVnode.$attrs$ || {};
|
|
1550
1147
|
cmpMeta.$attrsToReflect$.map(([propName, attribute]) => (rootVnode.$attrs$[attribute] = hostElm[propName]));
|
|
1551
1148
|
}
|
|
1552
1149
|
rootVnode.$tag$ = null;
|
|
1553
1150
|
rootVnode.$flags$ |= 4 /* VNODE_FLAGS.isHost */;
|
|
1554
1151
|
hostRef.$vnode$ = rootVnode;
|
|
1555
|
-
rootVnode.$elm$ = oldVNode.$elm$ = (
|
|
1556
|
-
|
|
1152
|
+
rootVnode.$elm$ = oldVNode.$elm$ = (hostElm.shadowRoot || hostElm );
|
|
1153
|
+
{
|
|
1557
1154
|
scopeId = hostElm['s-sc'];
|
|
1558
1155
|
}
|
|
1559
|
-
|
|
1156
|
+
{
|
|
1560
1157
|
contentRef = hostElm['s-cr'];
|
|
1561
|
-
useNativeShadowDom =
|
|
1158
|
+
useNativeShadowDom = (cmpMeta.$flags$ & 1 /* CMP_FLAGS.shadowDomEncapsulation */) !== 0;
|
|
1562
1159
|
// always reset
|
|
1563
1160
|
checkSlotFallbackVisibility = false;
|
|
1564
1161
|
}
|
|
1565
1162
|
// synchronous patch
|
|
1566
1163
|
patch(oldVNode, rootVnode);
|
|
1567
|
-
|
|
1164
|
+
{
|
|
1568
1165
|
// while we're moving nodes around existing nodes, temporarily disable
|
|
1569
1166
|
// the disconnectCallback from working
|
|
1570
1167
|
plt.$flags$ |= 1 /* PLATFORM_FLAGS.isTmpDisconnected */;
|
|
@@ -1584,9 +1181,7 @@ render() {
|
|
|
1584
1181
|
// add a reference node marking this node's original location
|
|
1585
1182
|
// keep a reference to this node for later lookups
|
|
1586
1183
|
orgLocationNode =
|
|
1587
|
-
|
|
1588
|
-
? originalLocationDebugNode(nodeToRelocate)
|
|
1589
|
-
: doc.createTextNode('');
|
|
1184
|
+
doc.createTextNode('');
|
|
1590
1185
|
orgLocationNode['s-nr'] = nodeToRelocate;
|
|
1591
1186
|
nodeToRelocate.parentNode.insertBefore((nodeToRelocate['s-ol'] = orgLocationNode), nodeToRelocate);
|
|
1592
1187
|
}
|
|
@@ -1643,23 +1238,16 @@ render() {
|
|
|
1643
1238
|
relocateNodes.length = 0;
|
|
1644
1239
|
}
|
|
1645
1240
|
};
|
|
1646
|
-
// slot comment debug nodes only created with the `--debug` flag
|
|
1647
|
-
// otherwise these nodes are text nodes w/out content
|
|
1648
|
-
const slotReferenceDebugNode = (slotVNode) => doc.createComment(`<slot${slotVNode.$name$ ? ' name="' + slotVNode.$name$ + '"' : ''}> (host=${hostTagName.toLowerCase()})`);
|
|
1649
|
-
const originalLocationDebugNode = (nodeToRelocate) => doc.createComment(`org-location for ` +
|
|
1650
|
-
(nodeToRelocate.localName
|
|
1651
|
-
? `<${nodeToRelocate.localName}> (host=${nodeToRelocate['s-hn']})`
|
|
1652
|
-
: `[${nodeToRelocate.textContent}]`));
|
|
1653
1241
|
const attachToAncestor = (hostRef, ancestorComponent) => {
|
|
1654
|
-
if (
|
|
1242
|
+
if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent['s-p']) {
|
|
1655
1243
|
ancestorComponent['s-p'].push(new Promise((r) => (hostRef.$onRenderResolve$ = r)));
|
|
1656
1244
|
}
|
|
1657
1245
|
};
|
|
1658
1246
|
const scheduleUpdate = (hostRef, isInitialLoad) => {
|
|
1659
|
-
|
|
1247
|
+
{
|
|
1660
1248
|
hostRef.$flags$ |= 16 /* HOST_FLAGS.isQueuedForUpdate */;
|
|
1661
1249
|
}
|
|
1662
|
-
if (
|
|
1250
|
+
if (hostRef.$flags$ & 4 /* HOST_FLAGS.isWaitingForChildren */) {
|
|
1663
1251
|
hostRef.$flags$ |= 512 /* HOST_FLAGS.needsRerender */;
|
|
1664
1252
|
return;
|
|
1665
1253
|
}
|
|
@@ -1668,34 +1256,30 @@ const scheduleUpdate = (hostRef, isInitialLoad) => {
|
|
|
1668
1256
|
// has already fired off its lifecycle update then
|
|
1669
1257
|
// fire off the initial update
|
|
1670
1258
|
const dispatch = () => dispatchHooks(hostRef, isInitialLoad);
|
|
1671
|
-
return
|
|
1259
|
+
return writeTask(dispatch) ;
|
|
1672
1260
|
};
|
|
1673
1261
|
const dispatchHooks = (hostRef, isInitialLoad) => {
|
|
1674
|
-
const elm = hostRef.$hostElement$;
|
|
1675
1262
|
const endSchedule = createTime('scheduleUpdate', hostRef.$cmpMeta$.$tagName$);
|
|
1676
|
-
const instance =
|
|
1263
|
+
const instance = hostRef.$lazyInstance$ ;
|
|
1677
1264
|
let promise;
|
|
1678
1265
|
if (isInitialLoad) {
|
|
1679
|
-
|
|
1266
|
+
{
|
|
1680
1267
|
hostRef.$flags$ |= 256 /* HOST_FLAGS.isListenReady */;
|
|
1681
1268
|
if (hostRef.$queuedListeners$) {
|
|
1682
1269
|
hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event));
|
|
1683
1270
|
hostRef.$queuedListeners$ = null;
|
|
1684
1271
|
}
|
|
1685
1272
|
}
|
|
1686
|
-
|
|
1687
|
-
if (BUILD.cmpWillLoad) {
|
|
1273
|
+
{
|
|
1688
1274
|
promise = safeCall(instance, 'componentWillLoad');
|
|
1689
1275
|
}
|
|
1690
1276
|
}
|
|
1691
1277
|
else {
|
|
1692
|
-
|
|
1693
|
-
if (BUILD.cmpWillUpdate) {
|
|
1278
|
+
{
|
|
1694
1279
|
promise = safeCall(instance, 'componentWillUpdate');
|
|
1695
1280
|
}
|
|
1696
1281
|
}
|
|
1697
|
-
|
|
1698
|
-
if (BUILD.cmpWillRender) {
|
|
1282
|
+
{
|
|
1699
1283
|
promise = then(promise, () => safeCall(instance, 'componentWillRender'));
|
|
1700
1284
|
}
|
|
1701
1285
|
endSchedule();
|
|
@@ -1706,46 +1290,15 @@ const updateComponent = async (hostRef, instance, isInitialLoad) => {
|
|
|
1706
1290
|
const elm = hostRef.$hostElement$;
|
|
1707
1291
|
const endUpdate = createTime('update', hostRef.$cmpMeta$.$tagName$);
|
|
1708
1292
|
const rc = elm['s-rc'];
|
|
1709
|
-
if (
|
|
1293
|
+
if (isInitialLoad) {
|
|
1710
1294
|
// DOM WRITE!
|
|
1711
1295
|
attachStyles(hostRef);
|
|
1712
1296
|
}
|
|
1713
1297
|
const endRender = createTime('render', hostRef.$cmpMeta$.$tagName$);
|
|
1714
|
-
|
|
1715
|
-
hostRef
|
|
1716
|
-
}
|
|
1717
|
-
if (BUILD.hydrateServerSide) {
|
|
1718
|
-
await callRender(hostRef, instance, elm);
|
|
1719
|
-
}
|
|
1720
|
-
else {
|
|
1721
|
-
callRender(hostRef, instance, elm);
|
|
1722
|
-
}
|
|
1723
|
-
if (BUILD.cssVarShim && plt.$cssShim$) {
|
|
1724
|
-
plt.$cssShim$.updateHost(elm);
|
|
1725
|
-
}
|
|
1726
|
-
if (BUILD.isDev) {
|
|
1727
|
-
hostRef.$renderCount$++;
|
|
1728
|
-
hostRef.$flags$ &= ~1024 /* HOST_FLAGS.devOnRender */;
|
|
1729
|
-
}
|
|
1730
|
-
if (BUILD.hydrateServerSide) {
|
|
1731
|
-
try {
|
|
1732
|
-
// manually connected child components during server-side hydrate
|
|
1733
|
-
serverSideConnected(elm);
|
|
1734
|
-
if (isInitialLoad) {
|
|
1735
|
-
// using only during server-side hydrate
|
|
1736
|
-
if (hostRef.$cmpMeta$.$flags$ & 1 /* CMP_FLAGS.shadowDomEncapsulation */) {
|
|
1737
|
-
elm['s-en'] = '';
|
|
1738
|
-
}
|
|
1739
|
-
else if (hostRef.$cmpMeta$.$flags$ & 2 /* CMP_FLAGS.scopedCssEncapsulation */) {
|
|
1740
|
-
elm['s-en'] = 'c';
|
|
1741
|
-
}
|
|
1742
|
-
}
|
|
1743
|
-
}
|
|
1744
|
-
catch (e) {
|
|
1745
|
-
consoleError(e, elm);
|
|
1746
|
-
}
|
|
1298
|
+
{
|
|
1299
|
+
callRender(hostRef, instance);
|
|
1747
1300
|
}
|
|
1748
|
-
if (
|
|
1301
|
+
if (rc) {
|
|
1749
1302
|
// ok, so turns out there are some child host elements
|
|
1750
1303
|
// waiting on this parent element to load
|
|
1751
1304
|
// let's fire off all update callbacks waiting
|
|
@@ -1754,7 +1307,7 @@ const updateComponent = async (hostRef, instance, isInitialLoad) => {
|
|
|
1754
1307
|
}
|
|
1755
1308
|
endRender();
|
|
1756
1309
|
endUpdate();
|
|
1757
|
-
|
|
1310
|
+
{
|
|
1758
1311
|
const childrenPromises = elm['s-p'];
|
|
1759
1312
|
const postUpdate = () => postUpdateComponent(hostRef);
|
|
1760
1313
|
if (childrenPromises.length === 0) {
|
|
@@ -1766,117 +1319,70 @@ const updateComponent = async (hostRef, instance, isInitialLoad) => {
|
|
|
1766
1319
|
childrenPromises.length = 0;
|
|
1767
1320
|
}
|
|
1768
1321
|
}
|
|
1769
|
-
else {
|
|
1770
|
-
postUpdateComponent(hostRef);
|
|
1771
|
-
}
|
|
1772
1322
|
};
|
|
1773
1323
|
const callRender = (hostRef, instance, elm) => {
|
|
1774
|
-
// in order for bundlers to correctly treeshake the BUILD object
|
|
1775
|
-
// we need to ensure BUILD is not deoptimized within a try/catch
|
|
1776
|
-
// https://rollupjs.org/guide/en/#treeshake tryCatchDeoptimization
|
|
1777
|
-
const allRenderFn = BUILD.allRenderFn ? true : false;
|
|
1778
|
-
const lazyLoad = BUILD.lazyLoad ? true : false;
|
|
1779
|
-
const taskQueue = BUILD.taskQueue ? true : false;
|
|
1780
|
-
const updatable = BUILD.updatable ? true : false;
|
|
1781
1324
|
try {
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
if (updatable && taskQueue) {
|
|
1325
|
+
instance = instance.render() ;
|
|
1326
|
+
{
|
|
1785
1327
|
hostRef.$flags$ &= ~16 /* HOST_FLAGS.isQueuedForUpdate */;
|
|
1786
1328
|
}
|
|
1787
|
-
|
|
1329
|
+
{
|
|
1788
1330
|
hostRef.$flags$ |= 2 /* HOST_FLAGS.hasRendered */;
|
|
1789
1331
|
}
|
|
1790
|
-
|
|
1791
|
-
|
|
1332
|
+
{
|
|
1333
|
+
{
|
|
1792
1334
|
// looks like we've got child nodes to render into this host element
|
|
1793
1335
|
// or we need to update the css class/attrs on the host element
|
|
1794
1336
|
// DOM WRITE!
|
|
1795
|
-
|
|
1796
|
-
return Promise.resolve(instance).then((value) => renderVdom(hostRef, value));
|
|
1797
|
-
}
|
|
1798
|
-
else {
|
|
1337
|
+
{
|
|
1799
1338
|
renderVdom(hostRef, instance);
|
|
1800
1339
|
}
|
|
1801
1340
|
}
|
|
1802
|
-
else {
|
|
1803
|
-
elm.textContent = instance;
|
|
1804
|
-
}
|
|
1805
1341
|
}
|
|
1806
1342
|
}
|
|
1807
1343
|
catch (e) {
|
|
1808
1344
|
consoleError(e, hostRef.$hostElement$);
|
|
1809
1345
|
}
|
|
1810
|
-
renderingRef = null;
|
|
1811
1346
|
return null;
|
|
1812
1347
|
};
|
|
1813
|
-
const getRenderingRef = () => renderingRef;
|
|
1814
1348
|
const postUpdateComponent = (hostRef) => {
|
|
1815
1349
|
const tagName = hostRef.$cmpMeta$.$tagName$;
|
|
1816
1350
|
const elm = hostRef.$hostElement$;
|
|
1817
1351
|
const endPostUpdate = createTime('postUpdate', tagName);
|
|
1818
|
-
const instance =
|
|
1352
|
+
const instance = hostRef.$lazyInstance$ ;
|
|
1819
1353
|
const ancestorComponent = hostRef.$ancestorComponent$;
|
|
1820
|
-
|
|
1821
|
-
if (BUILD.isDev) {
|
|
1822
|
-
hostRef.$flags$ |= 1024 /* HOST_FLAGS.devOnRender */;
|
|
1823
|
-
}
|
|
1354
|
+
{
|
|
1824
1355
|
safeCall(instance, 'componentDidRender');
|
|
1825
|
-
if (BUILD.isDev) {
|
|
1826
|
-
hostRef.$flags$ &= ~1024 /* HOST_FLAGS.devOnRender */;
|
|
1827
|
-
}
|
|
1828
1356
|
}
|
|
1829
|
-
emitLifecycleEvent(elm, 'componentDidRender');
|
|
1830
1357
|
if (!(hostRef.$flags$ & 64 /* HOST_FLAGS.hasLoadedComponent */)) {
|
|
1831
1358
|
hostRef.$flags$ |= 64 /* HOST_FLAGS.hasLoadedComponent */;
|
|
1832
|
-
|
|
1359
|
+
{
|
|
1833
1360
|
// DOM WRITE!
|
|
1834
1361
|
addHydratedFlag(elm);
|
|
1835
1362
|
}
|
|
1836
|
-
|
|
1837
|
-
if (BUILD.isDev) {
|
|
1838
|
-
hostRef.$flags$ |= 2048 /* HOST_FLAGS.devOnDidLoad */;
|
|
1839
|
-
}
|
|
1363
|
+
{
|
|
1840
1364
|
safeCall(instance, 'componentDidLoad');
|
|
1841
|
-
if (BUILD.isDev) {
|
|
1842
|
-
hostRef.$flags$ &= ~2048 /* HOST_FLAGS.devOnDidLoad */;
|
|
1843
|
-
}
|
|
1844
1365
|
}
|
|
1845
|
-
emitLifecycleEvent(elm, 'componentDidLoad');
|
|
1846
1366
|
endPostUpdate();
|
|
1847
|
-
|
|
1367
|
+
{
|
|
1848
1368
|
hostRef.$onReadyResolve$(elm);
|
|
1849
1369
|
if (!ancestorComponent) {
|
|
1850
|
-
appDidLoad(
|
|
1370
|
+
appDidLoad();
|
|
1851
1371
|
}
|
|
1852
1372
|
}
|
|
1853
1373
|
}
|
|
1854
1374
|
else {
|
|
1855
|
-
|
|
1856
|
-
// we've already loaded this component
|
|
1857
|
-
// fire off the user's componentDidUpdate method (if one was provided)
|
|
1858
|
-
// componentDidUpdate runs AFTER render() has been called
|
|
1859
|
-
// and all child components have finished updating
|
|
1860
|
-
if (BUILD.isDev) {
|
|
1861
|
-
hostRef.$flags$ |= 1024 /* HOST_FLAGS.devOnRender */;
|
|
1862
|
-
}
|
|
1375
|
+
{
|
|
1863
1376
|
safeCall(instance, 'componentDidUpdate');
|
|
1864
|
-
if (BUILD.isDev) {
|
|
1865
|
-
hostRef.$flags$ &= ~1024 /* HOST_FLAGS.devOnRender */;
|
|
1866
|
-
}
|
|
1867
1377
|
}
|
|
1868
|
-
emitLifecycleEvent(elm, 'componentDidUpdate');
|
|
1869
1378
|
endPostUpdate();
|
|
1870
1379
|
}
|
|
1871
|
-
|
|
1872
|
-
elm['s-hmr-load'] && elm['s-hmr-load']();
|
|
1873
|
-
}
|
|
1874
|
-
if (BUILD.method && BUILD.lazyLoad) {
|
|
1380
|
+
{
|
|
1875
1381
|
hostRef.$onInstanceResolve$(elm);
|
|
1876
1382
|
}
|
|
1877
1383
|
// load events fire from bottom to top
|
|
1878
1384
|
// the deepest elements load first then bubbles up
|
|
1879
|
-
|
|
1385
|
+
{
|
|
1880
1386
|
if (hostRef.$onRenderResolve$) {
|
|
1881
1387
|
hostRef.$onRenderResolve$();
|
|
1882
1388
|
hostRef.$onRenderResolve$ = undefined;
|
|
@@ -1890,32 +1396,13 @@ const postUpdateComponent = (hostRef) => {
|
|
|
1890
1396
|
// ( •_•)>⌐■-■
|
|
1891
1397
|
// (⌐■_■)
|
|
1892
1398
|
};
|
|
1893
|
-
const forceUpdate = (ref) => {
|
|
1894
|
-
if (BUILD.updatable) {
|
|
1895
|
-
const hostRef = getHostRef(ref);
|
|
1896
|
-
const isConnected = hostRef.$hostElement$.isConnected;
|
|
1897
|
-
if (isConnected &&
|
|
1898
|
-
(hostRef.$flags$ & (2 /* HOST_FLAGS.hasRendered */ | 16 /* HOST_FLAGS.isQueuedForUpdate */)) === 2 /* HOST_FLAGS.hasRendered */) {
|
|
1899
|
-
scheduleUpdate(hostRef, false);
|
|
1900
|
-
}
|
|
1901
|
-
// Returns "true" when the forced update was successfully scheduled
|
|
1902
|
-
return isConnected;
|
|
1903
|
-
}
|
|
1904
|
-
return false;
|
|
1905
|
-
};
|
|
1906
1399
|
const appDidLoad = (who) => {
|
|
1907
1400
|
// on appload
|
|
1908
1401
|
// we have finish the first big initial render
|
|
1909
|
-
|
|
1402
|
+
{
|
|
1910
1403
|
addHydratedFlag(doc.documentElement);
|
|
1911
1404
|
}
|
|
1912
|
-
if (BUILD.asyncQueue) {
|
|
1913
|
-
plt.$flags$ |= 2 /* PLATFORM_FLAGS.appLoaded */;
|
|
1914
|
-
}
|
|
1915
1405
|
nextTick(() => emitEvent(win, 'appload', { detail: { namespace: NAMESPACE } }));
|
|
1916
|
-
if (BUILD.profile && performance.measure) {
|
|
1917
|
-
performance.measure(`[Stencil] ${NAMESPACE} initial load (by ${who})`, 'st:app:start');
|
|
1918
|
-
}
|
|
1919
1406
|
};
|
|
1920
1407
|
const safeCall = (instance, method, arg) => {
|
|
1921
1408
|
if (instance && instance[method]) {
|
|
@@ -1931,61 +1418,27 @@ const safeCall = (instance, method, arg) => {
|
|
|
1931
1418
|
const then = (promise, thenFn) => {
|
|
1932
1419
|
return promise && promise.then ? promise.then(thenFn) : thenFn();
|
|
1933
1420
|
};
|
|
1934
|
-
const
|
|
1935
|
-
|
|
1936
|
-
emitEvent(elm, 'stencil_' + lifecycleName, {
|
|
1937
|
-
bubbles: true,
|
|
1938
|
-
composed: true,
|
|
1939
|
-
detail: {
|
|
1940
|
-
namespace: NAMESPACE,
|
|
1941
|
-
},
|
|
1942
|
-
});
|
|
1943
|
-
}
|
|
1944
|
-
};
|
|
1945
|
-
const addHydratedFlag = (elm) => BUILD.hydratedClass
|
|
1946
|
-
? elm.classList.add('hydrated')
|
|
1947
|
-
: BUILD.hydratedAttribute
|
|
1948
|
-
? elm.setAttribute('hydrated', '')
|
|
1949
|
-
: undefined;
|
|
1950
|
-
const serverSideConnected = (elm) => {
|
|
1951
|
-
const children = elm.children;
|
|
1952
|
-
if (children != null) {
|
|
1953
|
-
for (let i = 0, ii = children.length; i < ii; i++) {
|
|
1954
|
-
const childElm = children[i];
|
|
1955
|
-
if (typeof childElm.connectedCallback === 'function') {
|
|
1956
|
-
childElm.connectedCallback();
|
|
1957
|
-
}
|
|
1958
|
-
serverSideConnected(childElm);
|
|
1959
|
-
}
|
|
1960
|
-
}
|
|
1961
|
-
};
|
|
1421
|
+
const addHydratedFlag = (elm) => elm.classList.add('hydrated')
|
|
1422
|
+
;
|
|
1962
1423
|
const getValue = (ref, propName) => getHostRef(ref).$instanceValues$.get(propName);
|
|
1963
1424
|
const setValue = (ref, propName, newVal, cmpMeta) => {
|
|
1964
1425
|
// check our new property value against our internal value
|
|
1965
1426
|
const hostRef = getHostRef(ref);
|
|
1966
|
-
const elm =
|
|
1427
|
+
const elm = hostRef.$hostElement$ ;
|
|
1967
1428
|
const oldVal = hostRef.$instanceValues$.get(propName);
|
|
1968
1429
|
const flags = hostRef.$flags$;
|
|
1969
|
-
const instance =
|
|
1430
|
+
const instance = hostRef.$lazyInstance$ ;
|
|
1970
1431
|
newVal = parsePropertyValue(newVal, cmpMeta.$members$[propName][0]);
|
|
1971
1432
|
// explicitly check for NaN on both sides, as `NaN === NaN` is always false
|
|
1972
1433
|
const areBothNaN = Number.isNaN(oldVal) && Number.isNaN(newVal);
|
|
1973
1434
|
const didValueChange = newVal !== oldVal && !areBothNaN;
|
|
1974
|
-
if ((!
|
|
1435
|
+
if ((!(flags & 8 /* HOST_FLAGS.isConstructingInstance */) || oldVal === undefined) && didValueChange) {
|
|
1975
1436
|
// gadzooks! the property's value has changed!!
|
|
1976
1437
|
// set our new value!
|
|
1977
1438
|
hostRef.$instanceValues$.set(propName, newVal);
|
|
1978
|
-
if (
|
|
1979
|
-
if (hostRef.$flags$ & 1024 /* HOST_FLAGS.devOnRender */) {
|
|
1980
|
-
consoleDevWarn(`The state/prop "${propName}" changed during rendering. This can potentially lead to infinite-loops and other bugs.`, '\nElement', elm, '\nNew value', newVal, '\nOld value', oldVal);
|
|
1981
|
-
}
|
|
1982
|
-
else if (hostRef.$flags$ & 2048 /* HOST_FLAGS.devOnDidLoad */) {
|
|
1983
|
-
consoleDevWarn(`The state/prop "${propName}" changed during "componentDidLoad()", this triggers extra re-renders, try to setup on "componentWillLoad()"`, '\nElement', elm, '\nNew value', newVal, '\nOld value', oldVal);
|
|
1984
|
-
}
|
|
1985
|
-
}
|
|
1986
|
-
if (!BUILD.lazyLoad || instance) {
|
|
1439
|
+
if (instance) {
|
|
1987
1440
|
// get an array of method names of watch functions to call
|
|
1988
|
-
if (
|
|
1441
|
+
if (cmpMeta.$watchers$ && flags & 128 /* HOST_FLAGS.isWatchReady */) {
|
|
1989
1442
|
const watchMethods = cmpMeta.$watchers$[propName];
|
|
1990
1443
|
if (watchMethods) {
|
|
1991
1444
|
// this instance is watching for when this property changed
|
|
@@ -2000,13 +1453,7 @@ const setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
2000
1453
|
});
|
|
2001
1454
|
}
|
|
2002
1455
|
}
|
|
2003
|
-
if (
|
|
2004
|
-
(flags & (2 /* HOST_FLAGS.hasRendered */ | 16 /* HOST_FLAGS.isQueuedForUpdate */)) === 2 /* HOST_FLAGS.hasRendered */) {
|
|
2005
|
-
if (BUILD.cmpShouldUpdate && instance.componentShouldUpdate) {
|
|
2006
|
-
if (instance.componentShouldUpdate(newVal, oldVal, propName) === false) {
|
|
2007
|
-
return;
|
|
2008
|
-
}
|
|
2009
|
-
}
|
|
1456
|
+
if ((flags & (2 /* HOST_FLAGS.hasRendered */ | 16 /* HOST_FLAGS.isQueuedForUpdate */)) === 2 /* HOST_FLAGS.hasRendered */) {
|
|
2010
1457
|
// looks like this value actually changed, so we've got work to do!
|
|
2011
1458
|
// but only if we've already rendered, otherwise just chill out
|
|
2012
1459
|
// queue that we need to do an update, but don't worry about queuing
|
|
@@ -2027,17 +1474,16 @@ const setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
2027
1474
|
* @returns a reference to the same constructor passed in (but now mutated)
|
|
2028
1475
|
*/
|
|
2029
1476
|
const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
2030
|
-
if (
|
|
2031
|
-
if (
|
|
1477
|
+
if (cmpMeta.$members$) {
|
|
1478
|
+
if (Cstr.watchers) {
|
|
2032
1479
|
cmpMeta.$watchers$ = Cstr.watchers;
|
|
2033
1480
|
}
|
|
2034
1481
|
// It's better to have a const than two Object.entries()
|
|
2035
1482
|
const members = Object.entries(cmpMeta.$members$);
|
|
2036
1483
|
const prototype = Cstr.prototype;
|
|
2037
1484
|
members.map(([memberName, [memberFlags]]) => {
|
|
2038
|
-
if ((
|
|
2039
|
-
|
|
2040
|
-
((!BUILD.lazyLoad || flags & 2 /* PROXY_FLAGS.proxyState */) && memberFlags & 32 /* MEMBER_FLAGS.State */))) {
|
|
1485
|
+
if ((memberFlags & 31 /* MEMBER_FLAGS.Prop */ ||
|
|
1486
|
+
((flags & 2 /* PROXY_FLAGS.proxyState */) && memberFlags & 32 /* MEMBER_FLAGS.State */))) {
|
|
2041
1487
|
// proxyComponent - prop
|
|
2042
1488
|
Object.defineProperty(prototype, memberName, {
|
|
2043
1489
|
get() {
|
|
@@ -2045,21 +1491,6 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
2045
1491
|
return getValue(this, memberName);
|
|
2046
1492
|
},
|
|
2047
1493
|
set(newValue) {
|
|
2048
|
-
// only during dev time
|
|
2049
|
-
if (BUILD.isDev) {
|
|
2050
|
-
const ref = getHostRef(this);
|
|
2051
|
-
if (
|
|
2052
|
-
// we are proxying the instance (not element)
|
|
2053
|
-
(flags & 1 /* PROXY_FLAGS.isElementConstructor */) === 0 &&
|
|
2054
|
-
// the element is not constructing
|
|
2055
|
-
(ref.$flags$ & 8 /* HOST_FLAGS.isConstructingInstance */) === 0 &&
|
|
2056
|
-
// the member is a prop
|
|
2057
|
-
(memberFlags & 31 /* MEMBER_FLAGS.Prop */) !== 0 &&
|
|
2058
|
-
// the member is not mutable
|
|
2059
|
-
(memberFlags & 1024 /* MEMBER_FLAGS.Mutable */) === 0) {
|
|
2060
|
-
consoleDevWarn(`@Prop() "${memberName}" on <${cmpMeta.$tagName$}> is immutable but was modified from within the component.\nMore information: https://stenciljs.com/docs/properties#prop-mutability`);
|
|
2061
|
-
}
|
|
2062
|
-
}
|
|
2063
1494
|
// proxyComponent, set value
|
|
2064
1495
|
setValue(this, memberName, newValue, cmpMeta);
|
|
2065
1496
|
},
|
|
@@ -2067,9 +1498,7 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
2067
1498
|
enumerable: true,
|
|
2068
1499
|
});
|
|
2069
1500
|
}
|
|
2070
|
-
else if (
|
|
2071
|
-
BUILD.method &&
|
|
2072
|
-
flags & 1 /* PROXY_FLAGS.isElementConstructor */ &&
|
|
1501
|
+
else if (flags & 1 /* PROXY_FLAGS.isElementConstructor */ &&
|
|
2073
1502
|
memberFlags & 64 /* MEMBER_FLAGS.Method */) {
|
|
2074
1503
|
// proxyComponent - method
|
|
2075
1504
|
Object.defineProperty(prototype, memberName, {
|
|
@@ -2080,7 +1509,7 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
2080
1509
|
});
|
|
2081
1510
|
}
|
|
2082
1511
|
});
|
|
2083
|
-
if (
|
|
1512
|
+
if ((flags & 1 /* PROXY_FLAGS.isElementConstructor */)) {
|
|
2084
1513
|
const attrNameToPropName = new Map();
|
|
2085
1514
|
prototype.attributeChangedCallback = function (attrName, _oldValue, newValue) {
|
|
2086
1515
|
plt.jmp(() => {
|
|
@@ -2140,7 +1569,7 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
2140
1569
|
.map(([propName, m]) => {
|
|
2141
1570
|
const attrName = m[1] || propName;
|
|
2142
1571
|
attrNameToPropName.set(attrName, propName);
|
|
2143
|
-
if (
|
|
1572
|
+
if (m[0] & 512 /* MEMBER_FLAGS.ReflectAttr */) {
|
|
2144
1573
|
cmpMeta.$attrsToReflect$.push([propName, attrName]);
|
|
2145
1574
|
}
|
|
2146
1575
|
return attrName;
|
|
@@ -2151,29 +1580,25 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
2151
1580
|
};
|
|
2152
1581
|
const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) => {
|
|
2153
1582
|
// initializeComponent
|
|
2154
|
-
if ((
|
|
2155
|
-
|
|
2156
|
-
if (BUILD.lazyLoad || BUILD.hydrateClientSide) {
|
|
1583
|
+
if ((hostRef.$flags$ & 32 /* HOST_FLAGS.hasInitializedComponent */) === 0) {
|
|
1584
|
+
{
|
|
2157
1585
|
// we haven't initialized this element yet
|
|
2158
1586
|
hostRef.$flags$ |= 32 /* HOST_FLAGS.hasInitializedComponent */;
|
|
2159
1587
|
// lazy loaded components
|
|
2160
1588
|
// request the component's implementation to be
|
|
2161
1589
|
// wired up with the host element
|
|
2162
|
-
Cstr = loadModule(cmpMeta
|
|
1590
|
+
Cstr = loadModule(cmpMeta);
|
|
2163
1591
|
if (Cstr.then) {
|
|
2164
1592
|
// Await creates a micro-task avoid if possible
|
|
2165
|
-
const endLoad = uniqueTime(
|
|
1593
|
+
const endLoad = uniqueTime();
|
|
2166
1594
|
Cstr = await Cstr;
|
|
2167
1595
|
endLoad();
|
|
2168
1596
|
}
|
|
2169
|
-
if (
|
|
2170
|
-
throw new Error(`Constructor for "${cmpMeta.$tagName$}#${hostRef.$modeName$}" was not found`);
|
|
2171
|
-
}
|
|
2172
|
-
if (BUILD.member && !Cstr.isProxied) {
|
|
1597
|
+
if (!Cstr.isProxied) {
|
|
2173
1598
|
// we've never proxied this Constructor before
|
|
2174
1599
|
// let's add the getters/setters to its prototype before
|
|
2175
1600
|
// the first time we create an instance of the implementation
|
|
2176
|
-
|
|
1601
|
+
{
|
|
2177
1602
|
cmpMeta.$watchers$ = Cstr.watchers;
|
|
2178
1603
|
}
|
|
2179
1604
|
proxyComponent(Cstr, cmpMeta, 2 /* PROXY_FLAGS.proxyState */);
|
|
@@ -2183,7 +1608,7 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
|
|
|
2183
1608
|
// ok, time to construct the instance
|
|
2184
1609
|
// but let's keep track of when we start and stop
|
|
2185
1610
|
// so that the getters/setters don't incorrectly step on data
|
|
2186
|
-
|
|
1611
|
+
{
|
|
2187
1612
|
hostRef.$flags$ |= 8 /* HOST_FLAGS.isConstructingInstance */;
|
|
2188
1613
|
}
|
|
2189
1614
|
// construct the lazy-loaded component implementation
|
|
@@ -2196,42 +1621,20 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
|
|
|
2196
1621
|
catch (e) {
|
|
2197
1622
|
consoleError(e);
|
|
2198
1623
|
}
|
|
2199
|
-
|
|
1624
|
+
{
|
|
2200
1625
|
hostRef.$flags$ &= ~8 /* HOST_FLAGS.isConstructingInstance */;
|
|
2201
1626
|
}
|
|
2202
|
-
|
|
1627
|
+
{
|
|
2203
1628
|
hostRef.$flags$ |= 128 /* HOST_FLAGS.isWatchReady */;
|
|
2204
1629
|
}
|
|
2205
1630
|
endNewInstance();
|
|
2206
|
-
fireConnectedCallback(hostRef.$lazyInstance$);
|
|
2207
|
-
}
|
|
2208
|
-
else {
|
|
2209
|
-
// sync constructor component
|
|
2210
|
-
Cstr = elm.constructor;
|
|
2211
|
-
hostRef.$flags$ |= 32 /* HOST_FLAGS.hasInitializedComponent */;
|
|
2212
|
-
// wait for the CustomElementRegistry to mark the component as ready before setting `isWatchReady`. Otherwise,
|
|
2213
|
-
// watchers may fire prematurely if `customElements.get()`/`customElements.whenDefined()` resolves _before_
|
|
2214
|
-
// Stencil has completed instantiating the component.
|
|
2215
|
-
customElements.whenDefined(cmpMeta.$tagName$).then(() => (hostRef.$flags$ |= 128 /* HOST_FLAGS.isWatchReady */));
|
|
2216
1631
|
}
|
|
2217
|
-
if (
|
|
1632
|
+
if (Cstr.style) {
|
|
2218
1633
|
// this component has styles but we haven't registered them yet
|
|
2219
1634
|
let style = Cstr.style;
|
|
2220
|
-
|
|
2221
|
-
style = style[(hostRef.$modeName$ = computeMode(elm))];
|
|
2222
|
-
if (BUILD.hydrateServerSide && hostRef.$modeName$) {
|
|
2223
|
-
elm.setAttribute('s-mode', hostRef.$modeName$);
|
|
2224
|
-
}
|
|
2225
|
-
}
|
|
2226
|
-
const scopeId = getScopeId(cmpMeta, hostRef.$modeName$);
|
|
1635
|
+
const scopeId = getScopeId(cmpMeta);
|
|
2227
1636
|
if (!styles.has(scopeId)) {
|
|
2228
1637
|
const endRegisterStyles = createTime('registerStyles', cmpMeta.$tagName$);
|
|
2229
|
-
if (!BUILD.hydrateServerSide &&
|
|
2230
|
-
BUILD.shadowDom &&
|
|
2231
|
-
BUILD.shadowDomShim &&
|
|
2232
|
-
cmpMeta.$flags$ & 8 /* CMP_FLAGS.needsShadowDomShim */) {
|
|
2233
|
-
style = await import('./shadow-css-b18e99d7.js').then((m) => m.scopeCss(style, scopeId, false));
|
|
2234
|
-
}
|
|
2235
1638
|
registerStyle(scopeId, style, !!(cmpMeta.$flags$ & 1 /* CMP_FLAGS.shadowDomEncapsulation */));
|
|
2236
1639
|
endRegisterStyles();
|
|
2237
1640
|
}
|
|
@@ -2240,7 +1643,7 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
|
|
|
2240
1643
|
// we've successfully created a lazy instance
|
|
2241
1644
|
const ancestorComponent = hostRef.$ancestorComponent$;
|
|
2242
1645
|
const schedule = () => scheduleUpdate(hostRef, true);
|
|
2243
|
-
if (
|
|
1646
|
+
if (ancestorComponent && ancestorComponent['s-rc']) {
|
|
2244
1647
|
// this is the initial load and this component it has an ancestor component
|
|
2245
1648
|
// but the ancestor component has NOT fired its will update lifecycle yet
|
|
2246
1649
|
// so let's just cool our jets and wait for the ancestor to continue first
|
|
@@ -2253,59 +1656,31 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
|
|
|
2253
1656
|
schedule();
|
|
2254
1657
|
}
|
|
2255
1658
|
};
|
|
2256
|
-
const fireConnectedCallback = (instance) => {
|
|
2257
|
-
if (BUILD.lazyLoad && BUILD.connectedCallback) {
|
|
2258
|
-
safeCall(instance, 'connectedCallback');
|
|
2259
|
-
}
|
|
2260
|
-
};
|
|
2261
1659
|
const connectedCallback = (elm) => {
|
|
2262
1660
|
if ((plt.$flags$ & 1 /* PLATFORM_FLAGS.isTmpDisconnected */) === 0) {
|
|
2263
1661
|
const hostRef = getHostRef(elm);
|
|
2264
1662
|
const cmpMeta = hostRef.$cmpMeta$;
|
|
2265
1663
|
const endConnected = createTime('connectedCallback', cmpMeta.$tagName$);
|
|
2266
|
-
if (BUILD.hostListenerTargetParent) {
|
|
2267
|
-
// only run if we have listeners being attached to a parent
|
|
2268
|
-
addHostEventListeners(elm, hostRef, cmpMeta.$listeners$, true);
|
|
2269
|
-
}
|
|
2270
1664
|
if (!(hostRef.$flags$ & 1 /* HOST_FLAGS.hasConnected */)) {
|
|
2271
1665
|
// first time this component has connected
|
|
2272
1666
|
hostRef.$flags$ |= 1 /* HOST_FLAGS.hasConnected */;
|
|
2273
|
-
|
|
2274
|
-
if (BUILD.hydrateClientSide) {
|
|
2275
|
-
hostId = elm.getAttribute(HYDRATE_ID);
|
|
2276
|
-
if (hostId) {
|
|
2277
|
-
if (BUILD.shadowDom && supportsShadow && cmpMeta.$flags$ & 1 /* CMP_FLAGS.shadowDomEncapsulation */) {
|
|
2278
|
-
const scopeId = BUILD.mode
|
|
2279
|
-
? addStyle(elm.shadowRoot, cmpMeta, elm.getAttribute('s-mode'))
|
|
2280
|
-
: addStyle(elm.shadowRoot, cmpMeta);
|
|
2281
|
-
elm.classList.remove(scopeId + '-h', scopeId + '-s');
|
|
2282
|
-
}
|
|
2283
|
-
initializeClientHydrate(elm, cmpMeta.$tagName$, hostId, hostRef);
|
|
2284
|
-
}
|
|
2285
|
-
}
|
|
2286
|
-
if (BUILD.slotRelocation && !hostId) {
|
|
1667
|
+
{
|
|
2287
1668
|
// initUpdate
|
|
2288
1669
|
// if the slot polyfill is required we'll need to put some nodes
|
|
2289
1670
|
// in here to act as original content anchors as we move nodes around
|
|
2290
1671
|
// host element has been connected to the DOM
|
|
2291
|
-
if (
|
|
2292
|
-
((BUILD.slot || BUILD.shadowDom) &&
|
|
2293
|
-
cmpMeta.$flags$ & (4 /* CMP_FLAGS.hasSlotRelocation */ | 8 /* CMP_FLAGS.needsShadowDomShim */))) {
|
|
1672
|
+
if ((cmpMeta.$flags$ & (4 /* CMP_FLAGS.hasSlotRelocation */ | 8 /* CMP_FLAGS.needsShadowDomShim */))) {
|
|
2294
1673
|
setContentReference(elm);
|
|
2295
1674
|
}
|
|
2296
1675
|
}
|
|
2297
|
-
|
|
1676
|
+
{
|
|
2298
1677
|
// find the first ancestor component (if there is one) and register
|
|
2299
1678
|
// this component as one of the actively loading child components for its ancestor
|
|
2300
1679
|
let ancestorComponent = elm;
|
|
2301
1680
|
while ((ancestorComponent = ancestorComponent.parentNode || ancestorComponent.host)) {
|
|
2302
1681
|
// climb up the ancestors looking for the first
|
|
2303
1682
|
// component that hasn't finished its lifecycle update yet
|
|
2304
|
-
if (
|
|
2305
|
-
ancestorComponent.nodeType === 1 /* NODE_TYPE.ElementNode */ &&
|
|
2306
|
-
ancestorComponent.hasAttribute('s-id') &&
|
|
2307
|
-
ancestorComponent['s-p']) ||
|
|
2308
|
-
ancestorComponent['s-p']) {
|
|
1683
|
+
if (ancestorComponent['s-p']) {
|
|
2309
1684
|
// we found this components first ancestor component
|
|
2310
1685
|
// keep a reference to this component's ancestor component
|
|
2311
1686
|
attachToAncestor(hostRef, (hostRef.$ancestorComponent$ = ancestorComponent));
|
|
@@ -2315,7 +1690,7 @@ const connectedCallback = (elm) => {
|
|
|
2315
1690
|
}
|
|
2316
1691
|
// Lazy properties
|
|
2317
1692
|
// https://developers.google.com/web/fundamentals/web-components/best-practices#lazy-properties
|
|
2318
|
-
if (
|
|
1693
|
+
if (cmpMeta.$members$) {
|
|
2319
1694
|
Object.entries(cmpMeta.$members$).map(([memberName, [memberFlags]]) => {
|
|
2320
1695
|
if (memberFlags & 31 /* MEMBER_FLAGS.Prop */ && elm.hasOwnProperty(memberName)) {
|
|
2321
1696
|
const value = elm[memberName];
|
|
@@ -2324,14 +1699,7 @@ const connectedCallback = (elm) => {
|
|
|
2324
1699
|
}
|
|
2325
1700
|
});
|
|
2326
1701
|
}
|
|
2327
|
-
|
|
2328
|
-
// connectedCallback, taskQueue, initialLoad
|
|
2329
|
-
// angular sets attribute AFTER connectCallback
|
|
2330
|
-
// https://github.com/angular/angular/issues/18909
|
|
2331
|
-
// https://github.com/angular/angular/issues/19940
|
|
2332
|
-
nextTick(() => initializeComponent(elm, hostRef, cmpMeta));
|
|
2333
|
-
}
|
|
2334
|
-
else {
|
|
1702
|
+
{
|
|
2335
1703
|
initializeComponent(elm, hostRef, cmpMeta);
|
|
2336
1704
|
}
|
|
2337
1705
|
}
|
|
@@ -2339,9 +1707,7 @@ const connectedCallback = (elm) => {
|
|
|
2339
1707
|
// not the first time this has connected
|
|
2340
1708
|
// reattach any event listeners to the host
|
|
2341
1709
|
// since they would have been removed when disconnected
|
|
2342
|
-
addHostEventListeners(elm, hostRef, cmpMeta.$listeners
|
|
2343
|
-
// fire off connectedCallback() on component instance
|
|
2344
|
-
fireConnectedCallback(hostRef.$lazyInstance$);
|
|
1710
|
+
addHostEventListeners(elm, hostRef, cmpMeta.$listeners$);
|
|
2345
1711
|
}
|
|
2346
1712
|
endConnected();
|
|
2347
1713
|
}
|
|
@@ -2353,316 +1719,27 @@ const setContentReference = (elm) => {
|
|
|
2353
1719
|
// let's pick out the inner content for slot projection
|
|
2354
1720
|
// create a node to represent where the original
|
|
2355
1721
|
// content was first placed, which is useful later on
|
|
2356
|
-
const contentRefElm = (elm['s-cr'] = doc.createComment(
|
|
1722
|
+
const contentRefElm = (elm['s-cr'] = doc.createComment(''));
|
|
2357
1723
|
contentRefElm['s-cn'] = true;
|
|
2358
1724
|
elm.insertBefore(contentRefElm, elm.firstChild);
|
|
2359
1725
|
};
|
|
2360
1726
|
const disconnectedCallback = (elm) => {
|
|
2361
1727
|
if ((plt.$flags$ & 1 /* PLATFORM_FLAGS.isTmpDisconnected */) === 0) {
|
|
2362
1728
|
const hostRef = getHostRef(elm);
|
|
2363
|
-
const instance =
|
|
2364
|
-
|
|
1729
|
+
const instance = hostRef.$lazyInstance$ ;
|
|
1730
|
+
{
|
|
2365
1731
|
if (hostRef.$rmListeners$) {
|
|
2366
1732
|
hostRef.$rmListeners$.map((rmListener) => rmListener());
|
|
2367
1733
|
hostRef.$rmListeners$ = undefined;
|
|
2368
1734
|
}
|
|
2369
1735
|
}
|
|
2370
|
-
|
|
2371
|
-
if (BUILD.cssVarShim && plt.$cssShim$) {
|
|
2372
|
-
plt.$cssShim$.removeHost(elm);
|
|
2373
|
-
}
|
|
2374
|
-
if (BUILD.lazyLoad && BUILD.disconnectedCallback) {
|
|
1736
|
+
{
|
|
2375
1737
|
safeCall(instance, 'disconnectedCallback');
|
|
2376
1738
|
}
|
|
2377
|
-
if (BUILD.cmpDidUnload) {
|
|
2378
|
-
safeCall(instance, 'componentDidUnload');
|
|
2379
|
-
}
|
|
2380
1739
|
}
|
|
2381
1740
|
};
|
|
2382
|
-
const defineCustomElement = (Cstr, compactMeta) => {
|
|
2383
|
-
customElements.define(compactMeta[1], proxyCustomElement(Cstr, compactMeta));
|
|
2384
|
-
};
|
|
2385
|
-
const proxyCustomElement = (Cstr, compactMeta) => {
|
|
2386
|
-
const cmpMeta = {
|
|
2387
|
-
$flags$: compactMeta[0],
|
|
2388
|
-
$tagName$: compactMeta[1],
|
|
2389
|
-
};
|
|
2390
|
-
if (BUILD.member) {
|
|
2391
|
-
cmpMeta.$members$ = compactMeta[2];
|
|
2392
|
-
}
|
|
2393
|
-
if (BUILD.hostListener) {
|
|
2394
|
-
cmpMeta.$listeners$ = compactMeta[3];
|
|
2395
|
-
}
|
|
2396
|
-
if (BUILD.watchCallback) {
|
|
2397
|
-
cmpMeta.$watchers$ = Cstr.$watchers$;
|
|
2398
|
-
}
|
|
2399
|
-
if (BUILD.reflect) {
|
|
2400
|
-
cmpMeta.$attrsToReflect$ = [];
|
|
2401
|
-
}
|
|
2402
|
-
if (BUILD.shadowDom && !supportsShadow && cmpMeta.$flags$ & 1 /* CMP_FLAGS.shadowDomEncapsulation */) {
|
|
2403
|
-
cmpMeta.$flags$ |= 8 /* CMP_FLAGS.needsShadowDomShim */;
|
|
2404
|
-
}
|
|
2405
|
-
const originalConnectedCallback = Cstr.prototype.connectedCallback;
|
|
2406
|
-
const originalDisconnectedCallback = Cstr.prototype.disconnectedCallback;
|
|
2407
|
-
Object.assign(Cstr.prototype, {
|
|
2408
|
-
__registerHost() {
|
|
2409
|
-
registerHost(this, cmpMeta);
|
|
2410
|
-
},
|
|
2411
|
-
connectedCallback() {
|
|
2412
|
-
connectedCallback(this);
|
|
2413
|
-
if (BUILD.connectedCallback && originalConnectedCallback) {
|
|
2414
|
-
originalConnectedCallback.call(this);
|
|
2415
|
-
}
|
|
2416
|
-
},
|
|
2417
|
-
disconnectedCallback() {
|
|
2418
|
-
disconnectedCallback(this);
|
|
2419
|
-
if (BUILD.disconnectedCallback && originalDisconnectedCallback) {
|
|
2420
|
-
originalDisconnectedCallback.call(this);
|
|
2421
|
-
}
|
|
2422
|
-
},
|
|
2423
|
-
__attachShadow() {
|
|
2424
|
-
if (supportsShadow) {
|
|
2425
|
-
if (BUILD.shadowDelegatesFocus) {
|
|
2426
|
-
this.attachShadow({
|
|
2427
|
-
mode: 'open',
|
|
2428
|
-
delegatesFocus: !!(cmpMeta.$flags$ & 16 /* CMP_FLAGS.shadowDelegatesFocus */),
|
|
2429
|
-
});
|
|
2430
|
-
}
|
|
2431
|
-
else {
|
|
2432
|
-
this.attachShadow({ mode: 'open' });
|
|
2433
|
-
}
|
|
2434
|
-
}
|
|
2435
|
-
else {
|
|
2436
|
-
this.shadowRoot = this;
|
|
2437
|
-
}
|
|
2438
|
-
},
|
|
2439
|
-
});
|
|
2440
|
-
Cstr.is = cmpMeta.$tagName$;
|
|
2441
|
-
return proxyComponent(Cstr, cmpMeta, 1 /* PROXY_FLAGS.isElementConstructor */ | 2 /* PROXY_FLAGS.proxyState */);
|
|
2442
|
-
};
|
|
2443
|
-
const forceModeUpdate = (elm) => {
|
|
2444
|
-
if (BUILD.style && BUILD.mode && !BUILD.lazyLoad) {
|
|
2445
|
-
const mode = computeMode(elm);
|
|
2446
|
-
const hostRef = getHostRef(elm);
|
|
2447
|
-
if (hostRef.$modeName$ !== mode) {
|
|
2448
|
-
const cmpMeta = hostRef.$cmpMeta$;
|
|
2449
|
-
const oldScopeId = elm['s-sc'];
|
|
2450
|
-
const scopeId = getScopeId(cmpMeta, mode);
|
|
2451
|
-
const style = elm.constructor.style[mode];
|
|
2452
|
-
const flags = cmpMeta.$flags$;
|
|
2453
|
-
if (style) {
|
|
2454
|
-
if (!styles.has(scopeId)) {
|
|
2455
|
-
registerStyle(scopeId, style, !!(flags & 1 /* CMP_FLAGS.shadowDomEncapsulation */));
|
|
2456
|
-
}
|
|
2457
|
-
hostRef.$modeName$ = mode;
|
|
2458
|
-
elm.classList.remove(oldScopeId + '-h', oldScopeId + '-s');
|
|
2459
|
-
attachStyles(hostRef);
|
|
2460
|
-
forceUpdate(elm);
|
|
2461
|
-
}
|
|
2462
|
-
}
|
|
2463
|
-
}
|
|
2464
|
-
};
|
|
2465
|
-
const patchCloneNode = (HostElementPrototype) => {
|
|
2466
|
-
const orgCloneNode = HostElementPrototype.cloneNode;
|
|
2467
|
-
HostElementPrototype.cloneNode = function (deep) {
|
|
2468
|
-
const srcNode = this;
|
|
2469
|
-
const isShadowDom = BUILD.shadowDom ? srcNode.shadowRoot && supportsShadow : false;
|
|
2470
|
-
const clonedNode = orgCloneNode.call(srcNode, isShadowDom ? deep : false);
|
|
2471
|
-
if (BUILD.slot && !isShadowDom && deep) {
|
|
2472
|
-
let i = 0;
|
|
2473
|
-
let slotted, nonStencilNode;
|
|
2474
|
-
const stencilPrivates = [
|
|
2475
|
-
's-id',
|
|
2476
|
-
's-cr',
|
|
2477
|
-
's-lr',
|
|
2478
|
-
's-rc',
|
|
2479
|
-
's-sc',
|
|
2480
|
-
's-p',
|
|
2481
|
-
's-cn',
|
|
2482
|
-
's-sr',
|
|
2483
|
-
's-sn',
|
|
2484
|
-
's-hn',
|
|
2485
|
-
's-ol',
|
|
2486
|
-
's-nr',
|
|
2487
|
-
's-si',
|
|
2488
|
-
];
|
|
2489
|
-
for (; i < srcNode.childNodes.length; i++) {
|
|
2490
|
-
slotted = srcNode.childNodes[i]['s-nr'];
|
|
2491
|
-
nonStencilNode = stencilPrivates.every((privateField) => !srcNode.childNodes[i][privateField]);
|
|
2492
|
-
if (slotted) {
|
|
2493
|
-
if (BUILD.appendChildSlotFix && clonedNode.__appendChild) {
|
|
2494
|
-
clonedNode.__appendChild(slotted.cloneNode(true));
|
|
2495
|
-
}
|
|
2496
|
-
else {
|
|
2497
|
-
clonedNode.appendChild(slotted.cloneNode(true));
|
|
2498
|
-
}
|
|
2499
|
-
}
|
|
2500
|
-
if (nonStencilNode) {
|
|
2501
|
-
clonedNode.appendChild(srcNode.childNodes[i].cloneNode(true));
|
|
2502
|
-
}
|
|
2503
|
-
}
|
|
2504
|
-
}
|
|
2505
|
-
return clonedNode;
|
|
2506
|
-
};
|
|
2507
|
-
};
|
|
2508
|
-
const patchSlotAppendChild = (HostElementPrototype) => {
|
|
2509
|
-
HostElementPrototype.__appendChild = HostElementPrototype.appendChild;
|
|
2510
|
-
HostElementPrototype.appendChild = function (newChild) {
|
|
2511
|
-
const slotName = (newChild['s-sn'] = getSlotName(newChild));
|
|
2512
|
-
const slotNode = getHostSlotNode(this.childNodes, slotName);
|
|
2513
|
-
if (slotNode) {
|
|
2514
|
-
const slotChildNodes = getHostSlotChildNodes(slotNode, slotName);
|
|
2515
|
-
const appendAfter = slotChildNodes[slotChildNodes.length - 1];
|
|
2516
|
-
return appendAfter.parentNode.insertBefore(newChild, appendAfter.nextSibling);
|
|
2517
|
-
}
|
|
2518
|
-
return this.__appendChild(newChild);
|
|
2519
|
-
};
|
|
2520
|
-
};
|
|
2521
|
-
/**
|
|
2522
|
-
* Patches the text content of an unnamed slotted node inside a scoped component
|
|
2523
|
-
* @param hostElementPrototype the `Element` to be patched
|
|
2524
|
-
* @param cmpMeta component runtime metadata used to determine if the component should be patched or not
|
|
2525
|
-
*/
|
|
2526
|
-
const patchTextContent = (hostElementPrototype, cmpMeta) => {
|
|
2527
|
-
if (BUILD.scoped && cmpMeta.$flags$ & 2 /* CMP_FLAGS.scopedCssEncapsulation */) {
|
|
2528
|
-
const descriptor = Object.getOwnPropertyDescriptor(Node.prototype, 'textContent');
|
|
2529
|
-
Object.defineProperty(hostElementPrototype, '__textContent', descriptor);
|
|
2530
|
-
Object.defineProperty(hostElementPrototype, 'textContent', {
|
|
2531
|
-
get() {
|
|
2532
|
-
var _a;
|
|
2533
|
-
// get the 'default slot', which would be the first slot in a shadow tree (if we were using one), whose name is
|
|
2534
|
-
// the empty string
|
|
2535
|
-
const slotNode = getHostSlotNode(this.childNodes, '');
|
|
2536
|
-
// when a slot node is found, the textContent _may_ be found in the next sibling (text) node, depending on how
|
|
2537
|
-
// nodes were reordered during the vdom render. first try to get the text content from the sibling.
|
|
2538
|
-
if (((_a = slotNode === null || slotNode === void 0 ? void 0 : slotNode.nextSibling) === null || _a === void 0 ? void 0 : _a.nodeType) === 3 /* NODE_TYPES.TEXT_NODE */) {
|
|
2539
|
-
return slotNode.nextSibling.textContent;
|
|
2540
|
-
}
|
|
2541
|
-
else if (slotNode) {
|
|
2542
|
-
return slotNode.textContent;
|
|
2543
|
-
}
|
|
2544
|
-
else {
|
|
2545
|
-
// fallback to the original implementation
|
|
2546
|
-
return this.__textContent;
|
|
2547
|
-
}
|
|
2548
|
-
},
|
|
2549
|
-
set(value) {
|
|
2550
|
-
var _a;
|
|
2551
|
-
// get the 'default slot', which would be the first slot in a shadow tree (if we were using one), whose name is
|
|
2552
|
-
// the empty string
|
|
2553
|
-
const slotNode = getHostSlotNode(this.childNodes, '');
|
|
2554
|
-
// when a slot node is found, the textContent _may_ need to be placed in the next sibling (text) node,
|
|
2555
|
-
// depending on how nodes were reordered during the vdom render. first try to set the text content on the
|
|
2556
|
-
// sibling.
|
|
2557
|
-
if (((_a = slotNode === null || slotNode === void 0 ? void 0 : slotNode.nextSibling) === null || _a === void 0 ? void 0 : _a.nodeType) === 3 /* NODE_TYPES.TEXT_NODE */) {
|
|
2558
|
-
slotNode.nextSibling.textContent = value;
|
|
2559
|
-
}
|
|
2560
|
-
else if (slotNode) {
|
|
2561
|
-
slotNode.textContent = value;
|
|
2562
|
-
}
|
|
2563
|
-
else {
|
|
2564
|
-
// we couldn't find a slot, but that doesn't mean that there isn't one. if this check ran before the DOM
|
|
2565
|
-
// loaded, we could have missed it. check for a content reference element on the scoped component and insert
|
|
2566
|
-
// it there
|
|
2567
|
-
this.__textContent = value;
|
|
2568
|
-
const contentRefElm = this['s-cr'];
|
|
2569
|
-
if (contentRefElm) {
|
|
2570
|
-
this.insertBefore(contentRefElm, this.firstChild);
|
|
2571
|
-
}
|
|
2572
|
-
}
|
|
2573
|
-
},
|
|
2574
|
-
});
|
|
2575
|
-
}
|
|
2576
|
-
};
|
|
2577
|
-
const patchChildSlotNodes = (elm, cmpMeta) => {
|
|
2578
|
-
class FakeNodeList extends Array {
|
|
2579
|
-
item(n) {
|
|
2580
|
-
return this[n];
|
|
2581
|
-
}
|
|
2582
|
-
}
|
|
2583
|
-
if (cmpMeta.$flags$ & 8 /* CMP_FLAGS.needsShadowDomShim */) {
|
|
2584
|
-
const childNodesFn = elm.__lookupGetter__('childNodes');
|
|
2585
|
-
Object.defineProperty(elm, 'children', {
|
|
2586
|
-
get() {
|
|
2587
|
-
return this.childNodes.map((n) => n.nodeType === 1);
|
|
2588
|
-
},
|
|
2589
|
-
});
|
|
2590
|
-
Object.defineProperty(elm, 'childElementCount', {
|
|
2591
|
-
get() {
|
|
2592
|
-
return elm.children.length;
|
|
2593
|
-
},
|
|
2594
|
-
});
|
|
2595
|
-
Object.defineProperty(elm, 'childNodes', {
|
|
2596
|
-
get() {
|
|
2597
|
-
const childNodes = childNodesFn.call(this);
|
|
2598
|
-
if ((plt.$flags$ & 1 /* PLATFORM_FLAGS.isTmpDisconnected */) === 0 &&
|
|
2599
|
-
getHostRef(this).$flags$ & 2 /* HOST_FLAGS.hasRendered */) {
|
|
2600
|
-
const result = new FakeNodeList();
|
|
2601
|
-
for (let i = 0; i < childNodes.length; i++) {
|
|
2602
|
-
const slot = childNodes[i]['s-nr'];
|
|
2603
|
-
if (slot) {
|
|
2604
|
-
result.push(slot);
|
|
2605
|
-
}
|
|
2606
|
-
}
|
|
2607
|
-
return result;
|
|
2608
|
-
}
|
|
2609
|
-
return FakeNodeList.from(childNodes);
|
|
2610
|
-
},
|
|
2611
|
-
});
|
|
2612
|
-
}
|
|
2613
|
-
};
|
|
2614
|
-
const getSlotName = (node) => node['s-sn'] || (node.nodeType === 1 && node.getAttribute('slot')) || '';
|
|
2615
|
-
/**
|
|
2616
|
-
* Recursively searches a series of child nodes for a slot with the provided name.
|
|
2617
|
-
* @param childNodes the nodes to search for a slot with a specific name.
|
|
2618
|
-
* @param slotName the name of the slot to match on.
|
|
2619
|
-
* @returns a reference to the slot node that matches the provided name, `null` otherwise
|
|
2620
|
-
*/
|
|
2621
|
-
const getHostSlotNode = (childNodes, slotName) => {
|
|
2622
|
-
let i = 0;
|
|
2623
|
-
let childNode;
|
|
2624
|
-
for (; i < childNodes.length; i++) {
|
|
2625
|
-
childNode = childNodes[i];
|
|
2626
|
-
if (childNode['s-sr'] && childNode['s-sn'] === slotName) {
|
|
2627
|
-
return childNode;
|
|
2628
|
-
}
|
|
2629
|
-
childNode = getHostSlotNode(childNode.childNodes, slotName);
|
|
2630
|
-
if (childNode) {
|
|
2631
|
-
return childNode;
|
|
2632
|
-
}
|
|
2633
|
-
}
|
|
2634
|
-
return null;
|
|
2635
|
-
};
|
|
2636
|
-
const getHostSlotChildNodes = (n, slotName) => {
|
|
2637
|
-
const childNodes = [n];
|
|
2638
|
-
while ((n = n.nextSibling) && n['s-sn'] === slotName) {
|
|
2639
|
-
childNodes.push(n);
|
|
2640
|
-
}
|
|
2641
|
-
return childNodes;
|
|
2642
|
-
};
|
|
2643
|
-
const hmrStart = (elm, cmpMeta, hmrVersionId) => {
|
|
2644
|
-
// ¯\_(ツ)_/¯
|
|
2645
|
-
const hostRef = getHostRef(elm);
|
|
2646
|
-
// reset state flags to only have been connected
|
|
2647
|
-
hostRef.$flags$ = 1 /* HOST_FLAGS.hasConnected */;
|
|
2648
|
-
// TODO
|
|
2649
|
-
// detatch any event listeners that may have been added
|
|
2650
|
-
// because we're not passing an exact event name it'll
|
|
2651
|
-
// remove all of this element's event, which is good
|
|
2652
|
-
// create a callback for when this component finishes hmr
|
|
2653
|
-
elm['s-hmr-load'] = () => {
|
|
2654
|
-
// finished hmr for this element
|
|
2655
|
-
delete elm['s-hmr-load'];
|
|
2656
|
-
};
|
|
2657
|
-
// re-initialize the component
|
|
2658
|
-
initializeComponent(elm, hostRef, cmpMeta, hmrVersionId);
|
|
2659
|
-
};
|
|
2660
1741
|
const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
2661
|
-
|
|
2662
|
-
performance.mark('st:app:start');
|
|
2663
|
-
}
|
|
2664
|
-
installDevTools();
|
|
2665
|
-
const endBootstrap = createTime('bootstrapLazy');
|
|
1742
|
+
const endBootstrap = createTime();
|
|
2666
1743
|
const cmpTags = [];
|
|
2667
1744
|
const exclude = options.exclude || [];
|
|
2668
1745
|
const customElements = win.customElements;
|
|
@@ -2670,27 +1747,10 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
2670
1747
|
const metaCharset = /*@__PURE__*/ head.querySelector('meta[charset]');
|
|
2671
1748
|
const visibilityStyle = /*@__PURE__*/ doc.createElement('style');
|
|
2672
1749
|
const deferredConnectedCallbacks = [];
|
|
2673
|
-
const styles = /*@__PURE__*/ doc.querySelectorAll(`[${HYDRATED_STYLE_ID}]`);
|
|
2674
1750
|
let appLoadFallback;
|
|
2675
1751
|
let isBootstrapping = true;
|
|
2676
|
-
let i = 0;
|
|
2677
1752
|
Object.assign(plt, options);
|
|
2678
1753
|
plt.$resourcesUrl$ = new URL(options.resourcesUrl || './', doc.baseURI).href;
|
|
2679
|
-
if (BUILD.asyncQueue) {
|
|
2680
|
-
if (options.syncQueue) {
|
|
2681
|
-
plt.$flags$ |= 4 /* PLATFORM_FLAGS.queueSync */;
|
|
2682
|
-
}
|
|
2683
|
-
}
|
|
2684
|
-
if (BUILD.hydrateClientSide) {
|
|
2685
|
-
// If the app is already hydrated there is not point to disable the
|
|
2686
|
-
// async queue. This will improve the first input delay
|
|
2687
|
-
plt.$flags$ |= 2 /* PLATFORM_FLAGS.appLoaded */;
|
|
2688
|
-
}
|
|
2689
|
-
if (BUILD.hydrateClientSide && BUILD.shadowDom) {
|
|
2690
|
-
for (; i < styles.length; i++) {
|
|
2691
|
-
registerStyle(styles[i].getAttribute(HYDRATED_STYLE_ID), convertScopedToShadow(styles[i].innerHTML), true);
|
|
2692
|
-
}
|
|
2693
|
-
}
|
|
2694
1754
|
lazyBundles.map((lazyBundle) => {
|
|
2695
1755
|
lazyBundle[1].map((compactMeta) => {
|
|
2696
1756
|
const cmpMeta = {
|
|
@@ -2699,24 +1759,19 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
2699
1759
|
$members$: compactMeta[2],
|
|
2700
1760
|
$listeners$: compactMeta[3],
|
|
2701
1761
|
};
|
|
2702
|
-
|
|
1762
|
+
{
|
|
2703
1763
|
cmpMeta.$members$ = compactMeta[2];
|
|
2704
1764
|
}
|
|
2705
|
-
|
|
1765
|
+
{
|
|
2706
1766
|
cmpMeta.$listeners$ = compactMeta[3];
|
|
2707
1767
|
}
|
|
2708
|
-
|
|
1768
|
+
{
|
|
2709
1769
|
cmpMeta.$attrsToReflect$ = [];
|
|
2710
1770
|
}
|
|
2711
|
-
|
|
1771
|
+
{
|
|
2712
1772
|
cmpMeta.$watchers$ = {};
|
|
2713
1773
|
}
|
|
2714
|
-
|
|
2715
|
-
cmpMeta.$flags$ |= 8 /* CMP_FLAGS.needsShadowDomShim */;
|
|
2716
|
-
}
|
|
2717
|
-
const tagName = BUILD.transformTagName && options.transformTagName
|
|
2718
|
-
? options.transformTagName(cmpMeta.$tagName$)
|
|
2719
|
-
: cmpMeta.$tagName$;
|
|
1774
|
+
const tagName = cmpMeta.$tagName$;
|
|
2720
1775
|
const HostElement = class extends HTMLElement {
|
|
2721
1776
|
// StencilLazyHost
|
|
2722
1777
|
constructor(self) {
|
|
@@ -2724,28 +1779,16 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
2724
1779
|
super(self);
|
|
2725
1780
|
self = this;
|
|
2726
1781
|
registerHost(self, cmpMeta);
|
|
2727
|
-
if (
|
|
1782
|
+
if (cmpMeta.$flags$ & 1 /* CMP_FLAGS.shadowDomEncapsulation */) {
|
|
2728
1783
|
// this component is using shadow dom
|
|
2729
1784
|
// and this browser supports shadow dom
|
|
2730
1785
|
// add the read-only property "shadowRoot" to the host element
|
|
2731
1786
|
// adding the shadow root build conditionals to minimize runtime
|
|
2732
|
-
|
|
2733
|
-
|
|
2734
|
-
self.attachShadow({
|
|
2735
|
-
mode: 'open',
|
|
2736
|
-
delegatesFocus: !!(cmpMeta.$flags$ & 16 /* CMP_FLAGS.shadowDelegatesFocus */),
|
|
2737
|
-
});
|
|
2738
|
-
}
|
|
2739
|
-
else {
|
|
1787
|
+
{
|
|
1788
|
+
{
|
|
2740
1789
|
self.attachShadow({ mode: 'open' });
|
|
2741
1790
|
}
|
|
2742
1791
|
}
|
|
2743
|
-
else if (!BUILD.hydrateServerSide && !('shadowRoot' in self)) {
|
|
2744
|
-
self.shadowRoot = self;
|
|
2745
|
-
}
|
|
2746
|
-
}
|
|
2747
|
-
if (BUILD.slotChildNodesFix) {
|
|
2748
|
-
patchChildSlotNodes(self, cmpMeta);
|
|
2749
1792
|
}
|
|
2750
1793
|
}
|
|
2751
1794
|
connectedCallback() {
|
|
@@ -2768,20 +1811,6 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
2768
1811
|
return getHostRef(this).$onReadyPromise$;
|
|
2769
1812
|
}
|
|
2770
1813
|
};
|
|
2771
|
-
if (BUILD.cloneNodeFix) {
|
|
2772
|
-
patchCloneNode(HostElement.prototype);
|
|
2773
|
-
}
|
|
2774
|
-
if (BUILD.appendChildSlotFix) {
|
|
2775
|
-
patchSlotAppendChild(HostElement.prototype);
|
|
2776
|
-
}
|
|
2777
|
-
if (BUILD.hotModuleReplacement) {
|
|
2778
|
-
HostElement.prototype['s-hmr'] = function (hmrVersionId) {
|
|
2779
|
-
hmrStart(this, cmpMeta, hmrVersionId);
|
|
2780
|
-
};
|
|
2781
|
-
}
|
|
2782
|
-
if (BUILD.scopedSlotTextContentFix) {
|
|
2783
|
-
patchTextContent(HostElement.prototype, cmpMeta);
|
|
2784
|
-
}
|
|
2785
1814
|
cmpMeta.$lazyBundleId$ = lazyBundle[0];
|
|
2786
1815
|
if (!exclude.includes(tagName) && !customElements.get(tagName)) {
|
|
2787
1816
|
cmpTags.push(tagName);
|
|
@@ -2789,7 +1818,7 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
2789
1818
|
}
|
|
2790
1819
|
});
|
|
2791
1820
|
});
|
|
2792
|
-
|
|
1821
|
+
{
|
|
2793
1822
|
visibilityStyle.innerHTML = cmpTags + HYDRATED_CSS;
|
|
2794
1823
|
visibilityStyle.setAttribute('data-styles', '');
|
|
2795
1824
|
head.insertBefore(visibilityStyle, metaCharset ? metaCharset.nextSibling : head.firstChild);
|
|
@@ -2800,89 +1829,17 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
2800
1829
|
deferredConnectedCallbacks.map((host) => host.connectedCallback());
|
|
2801
1830
|
}
|
|
2802
1831
|
else {
|
|
2803
|
-
|
|
2804
|
-
plt.jmp(() => (appLoadFallback = setTimeout(appDidLoad, 30, 'timeout')));
|
|
2805
|
-
}
|
|
2806
|
-
else {
|
|
1832
|
+
{
|
|
2807
1833
|
plt.jmp(() => (appLoadFallback = setTimeout(appDidLoad, 30)));
|
|
2808
1834
|
}
|
|
2809
1835
|
}
|
|
2810
1836
|
// Fallback appLoad event
|
|
2811
1837
|
endBootstrap();
|
|
2812
1838
|
};
|
|
2813
|
-
const getConnect = (_ref, tagName) => {
|
|
2814
|
-
const componentOnReady = () => {
|
|
2815
|
-
let elm = doc.querySelector(tagName);
|
|
2816
|
-
if (!elm) {
|
|
2817
|
-
elm = doc.createElement(tagName);
|
|
2818
|
-
doc.body.appendChild(elm);
|
|
2819
|
-
}
|
|
2820
|
-
return typeof elm.componentOnReady === 'function' ? elm.componentOnReady() : Promise.resolve(elm);
|
|
2821
|
-
};
|
|
2822
|
-
const create = (...args) => {
|
|
2823
|
-
return componentOnReady().then((el) => el.create(...args));
|
|
2824
|
-
};
|
|
2825
|
-
return {
|
|
2826
|
-
create,
|
|
2827
|
-
componentOnReady,
|
|
2828
|
-
};
|
|
2829
|
-
};
|
|
2830
|
-
const getContext = (_elm, context) => {
|
|
2831
|
-
if (context in Context) {
|
|
2832
|
-
return Context[context];
|
|
2833
|
-
}
|
|
2834
|
-
else if (context === 'window') {
|
|
2835
|
-
return win;
|
|
2836
|
-
}
|
|
2837
|
-
else if (context === 'document') {
|
|
2838
|
-
return doc;
|
|
2839
|
-
}
|
|
2840
|
-
else if (context === 'isServer' || context === 'isPrerender') {
|
|
2841
|
-
return BUILD.hydrateServerSide ? true : false;
|
|
2842
|
-
}
|
|
2843
|
-
else if (context === 'isClient') {
|
|
2844
|
-
return BUILD.hydrateServerSide ? false : true;
|
|
2845
|
-
}
|
|
2846
|
-
else if (context === 'resourcesUrl' || context === 'publicPath') {
|
|
2847
|
-
return getAssetPath('.');
|
|
2848
|
-
}
|
|
2849
|
-
else if (context === 'queue') {
|
|
2850
|
-
return {
|
|
2851
|
-
write: writeTask,
|
|
2852
|
-
read: readTask,
|
|
2853
|
-
tick: {
|
|
2854
|
-
then(cb) {
|
|
2855
|
-
return nextTick(cb);
|
|
2856
|
-
},
|
|
2857
|
-
},
|
|
2858
|
-
};
|
|
2859
|
-
}
|
|
2860
|
-
return undefined;
|
|
2861
|
-
};
|
|
2862
|
-
const Fragment = (_, children) => children;
|
|
2863
1839
|
const addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) => {
|
|
2864
|
-
if (
|
|
2865
|
-
// this is called immediately within the element's constructor
|
|
2866
|
-
// initialize our event listeners on the host element
|
|
2867
|
-
// we do this now so that we can listen to events that may
|
|
2868
|
-
// have fired even before the instance is ready
|
|
2869
|
-
if (BUILD.hostListenerTargetParent) {
|
|
2870
|
-
// this component may have event listeners that should be attached to the parent
|
|
2871
|
-
if (attachParentListeners) {
|
|
2872
|
-
// this is being ran from within the connectedCallback
|
|
2873
|
-
// which is important so that we know the host element actually has a parent element
|
|
2874
|
-
// filter out the listeners to only have the ones that ARE being attached to the parent
|
|
2875
|
-
listeners = listeners.filter(([flags]) => flags & 32 /* LISTENER_FLAGS.TargetParent */);
|
|
2876
|
-
}
|
|
2877
|
-
else {
|
|
2878
|
-
// this is being ran from within the component constructor
|
|
2879
|
-
// everything BUT the parent element listeners should be attached at this time
|
|
2880
|
-
// filter out the listeners that are NOT being attached to the parent
|
|
2881
|
-
listeners = listeners.filter(([flags]) => !(flags & 32 /* LISTENER_FLAGS.TargetParent */));
|
|
2882
|
-
}
|
|
2883
|
-
}
|
|
1840
|
+
if (listeners) {
|
|
2884
1841
|
listeners.map(([flags, name, method]) => {
|
|
2885
|
-
const target =
|
|
1842
|
+
const target = getHostListenerTarget(elm, flags) ;
|
|
2886
1843
|
const handler = hostListenerProxy(hostRef, method);
|
|
2887
1844
|
const opts = hostListenerOpts(flags);
|
|
2888
1845
|
plt.ael(target, name, handler, opts);
|
|
@@ -2892,7 +1849,7 @@ const addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) =
|
|
|
2892
1849
|
};
|
|
2893
1850
|
const hostListenerProxy = (hostRef, methodName) => (ev) => {
|
|
2894
1851
|
try {
|
|
2895
|
-
|
|
1852
|
+
{
|
|
2896
1853
|
if (hostRef.$flags$ & 256 /* HOST_FLAGS.isListenReady */) {
|
|
2897
1854
|
// instance is ready, let's call it's member method for this event
|
|
2898
1855
|
hostRef.$lazyInstance$[methodName](ev);
|
|
@@ -2901,172 +1858,22 @@ const hostListenerProxy = (hostRef, methodName) => (ev) => {
|
|
|
2901
1858
|
(hostRef.$queuedListeners$ = hostRef.$queuedListeners$ || []).push([methodName, ev]);
|
|
2902
1859
|
}
|
|
2903
1860
|
}
|
|
2904
|
-
else {
|
|
2905
|
-
hostRef.$hostElement$[methodName](ev);
|
|
2906
|
-
}
|
|
2907
1861
|
}
|
|
2908
1862
|
catch (e) {
|
|
2909
1863
|
consoleError(e);
|
|
2910
1864
|
}
|
|
2911
1865
|
};
|
|
2912
1866
|
const getHostListenerTarget = (elm, flags) => {
|
|
2913
|
-
if (
|
|
1867
|
+
if (flags & 4 /* LISTENER_FLAGS.TargetDocument */)
|
|
2914
1868
|
return doc;
|
|
2915
|
-
if (
|
|
1869
|
+
if (flags & 8 /* LISTENER_FLAGS.TargetWindow */)
|
|
2916
1870
|
return win;
|
|
2917
|
-
if (
|
|
1871
|
+
if (flags & 16 /* LISTENER_FLAGS.TargetBody */)
|
|
2918
1872
|
return doc.body;
|
|
2919
|
-
if (BUILD.hostListenerTargetParent && flags & 32 /* LISTENER_FLAGS.TargetParent */)
|
|
2920
|
-
return elm.parentElement;
|
|
2921
1873
|
return elm;
|
|
2922
1874
|
};
|
|
2923
1875
|
// prettier-ignore
|
|
2924
|
-
const hostListenerOpts = (flags) =>
|
|
2925
|
-
? ({
|
|
2926
|
-
passive: (flags & 1 /* LISTENER_FLAGS.Passive */) !== 0,
|
|
2927
|
-
capture: (flags & 2 /* LISTENER_FLAGS.Capture */) !== 0,
|
|
2928
|
-
})
|
|
2929
|
-
: (flags & 2 /* LISTENER_FLAGS.Capture */) !== 0;
|
|
2930
|
-
const setPlatformOptions = (opts) => Object.assign(plt, opts);
|
|
2931
|
-
const insertVdomAnnotations = (doc, staticComponents) => {
|
|
2932
|
-
if (doc != null) {
|
|
2933
|
-
const docData = {
|
|
2934
|
-
hostIds: 0,
|
|
2935
|
-
rootLevelIds: 0,
|
|
2936
|
-
staticComponents: new Set(staticComponents),
|
|
2937
|
-
};
|
|
2938
|
-
const orgLocationNodes = [];
|
|
2939
|
-
parseVNodeAnnotations(doc, doc.body, docData, orgLocationNodes);
|
|
2940
|
-
orgLocationNodes.forEach((orgLocationNode) => {
|
|
2941
|
-
if (orgLocationNode != null) {
|
|
2942
|
-
const nodeRef = orgLocationNode['s-nr'];
|
|
2943
|
-
let hostId = nodeRef['s-host-id'];
|
|
2944
|
-
let nodeId = nodeRef['s-node-id'];
|
|
2945
|
-
let childId = `${hostId}.${nodeId}`;
|
|
2946
|
-
if (hostId == null) {
|
|
2947
|
-
hostId = 0;
|
|
2948
|
-
docData.rootLevelIds++;
|
|
2949
|
-
nodeId = docData.rootLevelIds;
|
|
2950
|
-
childId = `${hostId}.${nodeId}`;
|
|
2951
|
-
if (nodeRef.nodeType === 1 /* NODE_TYPE.ElementNode */) {
|
|
2952
|
-
nodeRef.setAttribute(HYDRATE_CHILD_ID, childId);
|
|
2953
|
-
}
|
|
2954
|
-
else if (nodeRef.nodeType === 3 /* NODE_TYPE.TextNode */) {
|
|
2955
|
-
if (hostId === 0) {
|
|
2956
|
-
const textContent = nodeRef.nodeValue.trim();
|
|
2957
|
-
if (textContent === '') {
|
|
2958
|
-
// useless whitespace node at the document root
|
|
2959
|
-
orgLocationNode.remove();
|
|
2960
|
-
return;
|
|
2961
|
-
}
|
|
2962
|
-
}
|
|
2963
|
-
const commentBeforeTextNode = doc.createComment(childId);
|
|
2964
|
-
commentBeforeTextNode.nodeValue = `${TEXT_NODE_ID}.${childId}`;
|
|
2965
|
-
nodeRef.parentNode.insertBefore(commentBeforeTextNode, nodeRef);
|
|
2966
|
-
}
|
|
2967
|
-
}
|
|
2968
|
-
let orgLocationNodeId = `${ORG_LOCATION_ID}.${childId}`;
|
|
2969
|
-
const orgLocationParentNode = orgLocationNode.parentElement;
|
|
2970
|
-
if (orgLocationParentNode) {
|
|
2971
|
-
if (orgLocationParentNode['s-en'] === '') {
|
|
2972
|
-
// ending with a "." means that the parent element
|
|
2973
|
-
// of this node's original location is a SHADOW dom element
|
|
2974
|
-
// and this node is apart of the root level light dom
|
|
2975
|
-
orgLocationNodeId += `.`;
|
|
2976
|
-
}
|
|
2977
|
-
else if (orgLocationParentNode['s-en'] === 'c') {
|
|
2978
|
-
// ending with a ".c" means that the parent element
|
|
2979
|
-
// of this node's original location is a SCOPED element
|
|
2980
|
-
// and this node is apart of the root level light dom
|
|
2981
|
-
orgLocationNodeId += `.c`;
|
|
2982
|
-
}
|
|
2983
|
-
}
|
|
2984
|
-
orgLocationNode.nodeValue = orgLocationNodeId;
|
|
2985
|
-
}
|
|
2986
|
-
});
|
|
2987
|
-
}
|
|
2988
|
-
};
|
|
2989
|
-
const parseVNodeAnnotations = (doc, node, docData, orgLocationNodes) => {
|
|
2990
|
-
if (node == null) {
|
|
2991
|
-
return;
|
|
2992
|
-
}
|
|
2993
|
-
if (node['s-nr'] != null) {
|
|
2994
|
-
orgLocationNodes.push(node);
|
|
2995
|
-
}
|
|
2996
|
-
if (node.nodeType === 1 /* NODE_TYPE.ElementNode */) {
|
|
2997
|
-
node.childNodes.forEach((childNode) => {
|
|
2998
|
-
const hostRef = getHostRef(childNode);
|
|
2999
|
-
if (hostRef != null && !docData.staticComponents.has(childNode.nodeName.toLowerCase())) {
|
|
3000
|
-
const cmpData = {
|
|
3001
|
-
nodeIds: 0,
|
|
3002
|
-
};
|
|
3003
|
-
insertVNodeAnnotations(doc, childNode, hostRef.$vnode$, docData, cmpData);
|
|
3004
|
-
}
|
|
3005
|
-
parseVNodeAnnotations(doc, childNode, docData, orgLocationNodes);
|
|
3006
|
-
});
|
|
3007
|
-
}
|
|
3008
|
-
};
|
|
3009
|
-
const insertVNodeAnnotations = (doc, hostElm, vnode, docData, cmpData) => {
|
|
3010
|
-
if (vnode != null) {
|
|
3011
|
-
const hostId = ++docData.hostIds;
|
|
3012
|
-
hostElm.setAttribute(HYDRATE_ID, hostId);
|
|
3013
|
-
if (hostElm['s-cr'] != null) {
|
|
3014
|
-
hostElm['s-cr'].nodeValue = `${CONTENT_REF_ID}.${hostId}`;
|
|
3015
|
-
}
|
|
3016
|
-
if (vnode.$children$ != null) {
|
|
3017
|
-
const depth = 0;
|
|
3018
|
-
vnode.$children$.forEach((vnodeChild, index) => {
|
|
3019
|
-
insertChildVNodeAnnotations(doc, vnodeChild, cmpData, hostId, depth, index);
|
|
3020
|
-
});
|
|
3021
|
-
}
|
|
3022
|
-
if (hostElm && vnode && vnode.$elm$ && !hostElm.hasAttribute('c-id')) {
|
|
3023
|
-
const parent = hostElm.parentElement;
|
|
3024
|
-
if (parent && parent.childNodes) {
|
|
3025
|
-
const parentChildNodes = Array.from(parent.childNodes);
|
|
3026
|
-
const comment = parentChildNodes.find((node) => node.nodeType === 8 /* NODE_TYPE.CommentNode */ && node['s-sr']);
|
|
3027
|
-
if (comment) {
|
|
3028
|
-
const index = parentChildNodes.indexOf(hostElm) - 1;
|
|
3029
|
-
vnode.$elm$.setAttribute(HYDRATE_CHILD_ID, `${comment['s-host-id']}.${comment['s-node-id']}.0.${index}`);
|
|
3030
|
-
}
|
|
3031
|
-
}
|
|
3032
|
-
}
|
|
3033
|
-
}
|
|
3034
|
-
};
|
|
3035
|
-
const insertChildVNodeAnnotations = (doc, vnodeChild, cmpData, hostId, depth, index) => {
|
|
3036
|
-
const childElm = vnodeChild.$elm$;
|
|
3037
|
-
if (childElm == null) {
|
|
3038
|
-
return;
|
|
3039
|
-
}
|
|
3040
|
-
const nodeId = cmpData.nodeIds++;
|
|
3041
|
-
const childId = `${hostId}.${nodeId}.${depth}.${index}`;
|
|
3042
|
-
childElm['s-host-id'] = hostId;
|
|
3043
|
-
childElm['s-node-id'] = nodeId;
|
|
3044
|
-
if (childElm.nodeType === 1 /* NODE_TYPE.ElementNode */) {
|
|
3045
|
-
childElm.setAttribute(HYDRATE_CHILD_ID, childId);
|
|
3046
|
-
}
|
|
3047
|
-
else if (childElm.nodeType === 3 /* NODE_TYPE.TextNode */) {
|
|
3048
|
-
const parentNode = childElm.parentNode;
|
|
3049
|
-
const nodeName = parentNode.nodeName;
|
|
3050
|
-
if (nodeName !== 'STYLE' && nodeName !== 'SCRIPT') {
|
|
3051
|
-
const textNodeId = `${TEXT_NODE_ID}.${childId}`;
|
|
3052
|
-
const commentBeforeTextNode = doc.createComment(textNodeId);
|
|
3053
|
-
parentNode.insertBefore(commentBeforeTextNode, childElm);
|
|
3054
|
-
}
|
|
3055
|
-
}
|
|
3056
|
-
else if (childElm.nodeType === 8 /* NODE_TYPE.CommentNode */) {
|
|
3057
|
-
if (childElm['s-sr']) {
|
|
3058
|
-
const slotName = childElm['s-sn'] || '';
|
|
3059
|
-
const slotNodeId = `${SLOT_NODE_ID}.${childId}.${slotName}`;
|
|
3060
|
-
childElm.nodeValue = slotNodeId;
|
|
3061
|
-
}
|
|
3062
|
-
}
|
|
3063
|
-
if (vnodeChild.$children$ != null) {
|
|
3064
|
-
const childDepth = depth + 1;
|
|
3065
|
-
vnodeChild.$children$.forEach((vnode, index) => {
|
|
3066
|
-
insertChildVNodeAnnotations(doc, vnode, cmpData, hostId, childDepth, index);
|
|
3067
|
-
});
|
|
3068
|
-
}
|
|
3069
|
-
};
|
|
1876
|
+
const hostListenerOpts = (flags) => (flags & 2 /* LISTENER_FLAGS.Capture */) !== 0;
|
|
3070
1877
|
const hostRefs = /*@__PURE__*/ new WeakMap();
|
|
3071
1878
|
const getHostRef = (ref) => hostRefs.get(ref);
|
|
3072
1879
|
const registerInstance = (lazyInstance, hostRef) => hostRefs.set((hostRef.$lazyInstance$ = lazyInstance), hostRef);
|
|
@@ -3077,65 +1884,361 @@ const registerHost = (elm, cmpMeta) => {
|
|
|
3077
1884
|
$cmpMeta$: cmpMeta,
|
|
3078
1885
|
$instanceValues$: new Map(),
|
|
3079
1886
|
};
|
|
3080
|
-
|
|
3081
|
-
hostRef.$renderCount$ = 0;
|
|
3082
|
-
}
|
|
3083
|
-
if (BUILD.method && BUILD.lazyLoad) {
|
|
1887
|
+
{
|
|
3084
1888
|
hostRef.$onInstancePromise$ = new Promise((r) => (hostRef.$onInstanceResolve$ = r));
|
|
3085
1889
|
}
|
|
3086
|
-
|
|
1890
|
+
{
|
|
3087
1891
|
hostRef.$onReadyPromise$ = new Promise((r) => (hostRef.$onReadyResolve$ = r));
|
|
3088
1892
|
elm['s-p'] = [];
|
|
3089
1893
|
elm['s-rc'] = [];
|
|
3090
1894
|
}
|
|
3091
|
-
addHostEventListeners(elm, hostRef, cmpMeta.$listeners
|
|
1895
|
+
addHostEventListeners(elm, hostRef, cmpMeta.$listeners$);
|
|
3092
1896
|
return hostRefs.set(elm, hostRef);
|
|
3093
1897
|
};
|
|
3094
1898
|
const isMemberInElement = (elm, memberName) => memberName in elm;
|
|
3095
|
-
const consoleError = (e, el) => (
|
|
3096
|
-
const STENCIL_DEV_MODE = BUILD.isTesting
|
|
3097
|
-
? ['STENCIL:'] // E2E testing
|
|
3098
|
-
: [
|
|
3099
|
-
'%cstencil',
|
|
3100
|
-
'color: white;background:#4c47ff;font-weight: bold; font-size:10px; padding:2px 6px; border-radius: 5px',
|
|
3101
|
-
];
|
|
3102
|
-
const consoleDevError = (...m) => console.error(...STENCIL_DEV_MODE, ...m);
|
|
3103
|
-
const consoleDevWarn = (...m) => console.warn(...STENCIL_DEV_MODE, ...m);
|
|
3104
|
-
const consoleDevInfo = (...m) => console.info(...STENCIL_DEV_MODE, ...m);
|
|
3105
|
-
const setErrorHandler = (handler) => (customError = handler);
|
|
1899
|
+
const consoleError = (e, el) => (0, console.error)(e, el);
|
|
3106
1900
|
const cmpModules = /*@__PURE__*/ new Map();
|
|
3107
1901
|
const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
3108
1902
|
// loadModuleImport
|
|
3109
1903
|
const exportName = cmpMeta.$tagName$.replace(/-/g, '_');
|
|
3110
1904
|
const bundleId = cmpMeta.$lazyBundleId$;
|
|
3111
|
-
|
|
3112
|
-
consoleDevError(`Trying to lazily load component <${cmpMeta.$tagName$}> with style mode "${hostRef.$modeName$}", but it does not exist.`);
|
|
3113
|
-
return undefined;
|
|
3114
|
-
}
|
|
3115
|
-
const module = !BUILD.hotModuleReplacement ? cmpModules.get(bundleId) : false;
|
|
1905
|
+
const module = cmpModules.get(bundleId) ;
|
|
3116
1906
|
if (module) {
|
|
3117
1907
|
return module[exportName];
|
|
3118
1908
|
}
|
|
3119
|
-
|
|
3120
|
-
|
|
1909
|
+
|
|
1910
|
+
if (!hmrVersionId || !BUILD.hotModuleReplacement) {
|
|
1911
|
+
const processMod = importedModule => {
|
|
1912
|
+
cmpModules.set(bundleId, importedModule);
|
|
1913
|
+
return importedModule[exportName];
|
|
1914
|
+
}
|
|
1915
|
+
switch(bundleId) {
|
|
1916
|
+
|
|
1917
|
+
case 'z-app-header_2.cjs':
|
|
1918
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
1919
|
+
/* webpackMode: "lazy" */
|
|
1920
|
+
'./z-app-header_2.cjs.entry.js')); }).then(processMod, consoleError);
|
|
1921
|
+
case 'z-anchor-navigation.cjs':
|
|
1922
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
1923
|
+
/* webpackMode: "lazy" */
|
|
1924
|
+
'./z-anchor-navigation.cjs.entry.js')); }).then(processMod, consoleError);
|
|
1925
|
+
case 'z-app-switcher.cjs':
|
|
1926
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
1927
|
+
/* webpackMode: "lazy" */
|
|
1928
|
+
'./z-app-switcher.cjs.entry.js')); }).then(processMod, consoleError);
|
|
1929
|
+
case 'z-aria-alert.cjs':
|
|
1930
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
1931
|
+
/* webpackMode: "lazy" */
|
|
1932
|
+
'./z-aria-alert.cjs.entry.js')); }).then(processMod, consoleError);
|
|
1933
|
+
case 'z-avatar.cjs':
|
|
1934
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
1935
|
+
/* webpackMode: "lazy" */
|
|
1936
|
+
'./z-avatar.cjs.entry.js')); }).then(processMod, consoleError);
|
|
1937
|
+
case 'z-button-sort.cjs':
|
|
1938
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
1939
|
+
/* webpackMode: "lazy" */
|
|
1940
|
+
'./z-button-sort.cjs.entry.js')); }).then(processMod, consoleError);
|
|
1941
|
+
case 'z-card.cjs':
|
|
1942
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
1943
|
+
/* webpackMode: "lazy" */
|
|
1944
|
+
'./z-card.cjs.entry.js')); }).then(processMod, consoleError);
|
|
1945
|
+
case 'z-carousel.cjs':
|
|
1946
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
1947
|
+
/* webpackMode: "lazy" */
|
|
1948
|
+
'./z-carousel.cjs.entry.js')); }).then(processMod, consoleError);
|
|
1949
|
+
case 'z-combobox.cjs':
|
|
1950
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
1951
|
+
/* webpackMode: "lazy" */
|
|
1952
|
+
'./z-combobox.cjs.entry.js')); }).then(processMod, consoleError);
|
|
1953
|
+
case 'z-contextual-menu.cjs':
|
|
1954
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
1955
|
+
/* webpackMode: "lazy" */
|
|
1956
|
+
'./z-contextual-menu.cjs.entry.js')); }).then(processMod, consoleError);
|
|
1957
|
+
case 'z-cover-hero.cjs':
|
|
1958
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
1959
|
+
/* webpackMode: "lazy" */
|
|
1960
|
+
'./z-cover-hero.cjs.entry.js')); }).then(processMod, consoleError);
|
|
1961
|
+
case 'z-date-picker.cjs':
|
|
1962
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
1963
|
+
/* webpackMode: "lazy" */
|
|
1964
|
+
'./z-date-picker.cjs.entry.js')); }).then(processMod, consoleError);
|
|
1965
|
+
case 'z-file.cjs':
|
|
1966
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
1967
|
+
/* webpackMode: "lazy" */
|
|
1968
|
+
'./z-file.cjs.entry.js')); }).then(processMod, consoleError);
|
|
1969
|
+
case 'z-file-upload.cjs':
|
|
1970
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
1971
|
+
/* webpackMode: "lazy" */
|
|
1972
|
+
'./z-file-upload.cjs.entry.js')); }).then(processMod, consoleError);
|
|
1973
|
+
case 'z-info-box.cjs':
|
|
1974
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
1975
|
+
/* webpackMode: "lazy" */
|
|
1976
|
+
'./z-info-box.cjs.entry.js')); }).then(processMod, consoleError);
|
|
1977
|
+
case 'z-info-reveal.cjs':
|
|
1978
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
1979
|
+
/* webpackMode: "lazy" */
|
|
1980
|
+
'./z-info-reveal.cjs.entry.js')); }).then(processMod, consoleError);
|
|
1981
|
+
case 'z-logo.cjs':
|
|
1982
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
1983
|
+
/* webpackMode: "lazy" */
|
|
1984
|
+
'./z-logo.cjs.entry.js')); }).then(processMod, consoleError);
|
|
1985
|
+
case 'z-menu.cjs':
|
|
1986
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
1987
|
+
/* webpackMode: "lazy" */
|
|
1988
|
+
'./z-menu.cjs.entry.js')); }).then(processMod, consoleError);
|
|
1989
|
+
case 'z-menu-section.cjs':
|
|
1990
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
1991
|
+
/* webpackMode: "lazy" */
|
|
1992
|
+
'./z-menu-section.cjs.entry.js')); }).then(processMod, consoleError);
|
|
1993
|
+
case 'z-messages-pocket.cjs':
|
|
1994
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
1995
|
+
/* webpackMode: "lazy" */
|
|
1996
|
+
'./z-messages-pocket.cjs.entry.js')); }).then(processMod, consoleError);
|
|
1997
|
+
case 'z-myz-card-alert.cjs':
|
|
1998
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
1999
|
+
/* webpackMode: "lazy" */
|
|
2000
|
+
'./z-myz-card-alert.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2001
|
+
case 'z-myz-card-dictionary.cjs':
|
|
2002
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2003
|
+
/* webpackMode: "lazy" */
|
|
2004
|
+
'./z-myz-card-dictionary.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2005
|
+
case 'z-myz-card-footer.cjs':
|
|
2006
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2007
|
+
/* webpackMode: "lazy" */
|
|
2008
|
+
'./z-myz-card-footer.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2009
|
+
case 'z-myz-card-footer-sections.cjs':
|
|
2010
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2011
|
+
/* webpackMode: "lazy" */
|
|
2012
|
+
'./z-myz-card-footer-sections.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2013
|
+
case 'z-myz-card-icon.cjs':
|
|
2014
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2015
|
+
/* webpackMode: "lazy" */
|
|
2016
|
+
'./z-myz-card-icon.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2017
|
+
case 'z-myz-card-info.cjs':
|
|
2018
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2019
|
+
/* webpackMode: "lazy" */
|
|
2020
|
+
'./z-myz-card-info.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2021
|
+
case 'z-myz-card-list.cjs':
|
|
2022
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2023
|
+
/* webpackMode: "lazy" */
|
|
2024
|
+
'./z-myz-card-list.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2025
|
+
case 'z-myz-list.cjs':
|
|
2026
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2027
|
+
/* webpackMode: "lazy" */
|
|
2028
|
+
'./z-myz-list.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2029
|
+
case 'z-navigation-tab.cjs':
|
|
2030
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2031
|
+
/* webpackMode: "lazy" */
|
|
2032
|
+
'./z-navigation-tab.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2033
|
+
case 'z-navigation-tab-link.cjs':
|
|
2034
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2035
|
+
/* webpackMode: "lazy" */
|
|
2036
|
+
'./z-navigation-tab-link.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2037
|
+
case 'z-navigation-tabs.cjs':
|
|
2038
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2039
|
+
/* webpackMode: "lazy" */
|
|
2040
|
+
'./z-navigation-tabs.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2041
|
+
case 'z-notification.cjs':
|
|
2042
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2043
|
+
/* webpackMode: "lazy" */
|
|
2044
|
+
'./z-notification.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2045
|
+
case 'z-offcanvas.cjs':
|
|
2046
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2047
|
+
/* webpackMode: "lazy" */
|
|
2048
|
+
'./z-offcanvas.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2049
|
+
case 'z-otp.cjs':
|
|
2050
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2051
|
+
/* webpackMode: "lazy" */
|
|
2052
|
+
'./z-otp.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2053
|
+
case 'z-pagination.cjs':
|
|
2054
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2055
|
+
/* webpackMode: "lazy" */
|
|
2056
|
+
'./z-pagination.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2057
|
+
case 'z-panel-elem.cjs':
|
|
2058
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2059
|
+
/* webpackMode: "lazy" */
|
|
2060
|
+
'./z-panel-elem.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2061
|
+
case 'z-pocket-message.cjs':
|
|
2062
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2063
|
+
/* webpackMode: "lazy" */
|
|
2064
|
+
'./z-pocket-message.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2065
|
+
case 'z-range-picker.cjs':
|
|
2066
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2067
|
+
/* webpackMode: "lazy" */
|
|
2068
|
+
'./z-range-picker.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2069
|
+
case 'z-searchbar.cjs':
|
|
2070
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2071
|
+
/* webpackMode: "lazy" */
|
|
2072
|
+
'./z-searchbar.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2073
|
+
case 'z-section-title.cjs':
|
|
2074
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2075
|
+
/* webpackMode: "lazy" */
|
|
2076
|
+
'./z-section-title.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2077
|
+
case 'z-select.cjs':
|
|
2078
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2079
|
+
/* webpackMode: "lazy" */
|
|
2080
|
+
'./z-select.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2081
|
+
case 'z-skip-to-content.cjs':
|
|
2082
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2083
|
+
/* webpackMode: "lazy" */
|
|
2084
|
+
'./z-skip-to-content.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2085
|
+
case 'z-slideshow.cjs':
|
|
2086
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2087
|
+
/* webpackMode: "lazy" */
|
|
2088
|
+
'./z-slideshow.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2089
|
+
case 'z-stepper.cjs':
|
|
2090
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2091
|
+
/* webpackMode: "lazy" */
|
|
2092
|
+
'./z-stepper.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2093
|
+
case 'z-stepper-item.cjs':
|
|
2094
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2095
|
+
/* webpackMode: "lazy" */
|
|
2096
|
+
'./z-stepper-item.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2097
|
+
case 'z-table.cjs':
|
|
2098
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2099
|
+
/* webpackMode: "lazy" */
|
|
2100
|
+
'./z-table.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2101
|
+
case 'z-table-body.cjs':
|
|
2102
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2103
|
+
/* webpackMode: "lazy" */
|
|
2104
|
+
'./z-table-body.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2105
|
+
case 'z-table-expanded-row.cjs':
|
|
2106
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2107
|
+
/* webpackMode: "lazy" */
|
|
2108
|
+
'./z-table-expanded-row.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2109
|
+
case 'z-table-footer.cjs':
|
|
2110
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2111
|
+
/* webpackMode: "lazy" */
|
|
2112
|
+
'./z-table-footer.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2113
|
+
case 'z-table-head.cjs':
|
|
2114
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2115
|
+
/* webpackMode: "lazy" */
|
|
2116
|
+
'./z-table-head.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2117
|
+
case 'z-table-header-row.cjs':
|
|
2118
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2119
|
+
/* webpackMode: "lazy" */
|
|
2120
|
+
'./z-table-header-row.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2121
|
+
case 'z-table-row.cjs':
|
|
2122
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2123
|
+
/* webpackMode: "lazy" */
|
|
2124
|
+
'./z-table-row.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2125
|
+
case 'z-table-sticky-footer.cjs':
|
|
2126
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2127
|
+
/* webpackMode: "lazy" */
|
|
2128
|
+
'./z-table-sticky-footer.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2129
|
+
case 'z-tag.cjs':
|
|
2130
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2131
|
+
/* webpackMode: "lazy" */
|
|
2132
|
+
'./z-tag.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2133
|
+
case 'z-toast-notification.cjs':
|
|
2134
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2135
|
+
/* webpackMode: "lazy" */
|
|
2136
|
+
'./z-toast-notification.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2137
|
+
case 'z-toast-notification-list.cjs':
|
|
2138
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2139
|
+
/* webpackMode: "lazy" */
|
|
2140
|
+
'./z-toast-notification-list.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2141
|
+
case 'z-toggle-button.cjs':
|
|
2142
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2143
|
+
/* webpackMode: "lazy" */
|
|
2144
|
+
'./z-toggle-button.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2145
|
+
case 'z-toggle-switch.cjs':
|
|
2146
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2147
|
+
/* webpackMode: "lazy" */
|
|
2148
|
+
'./z-toggle-switch.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2149
|
+
case 'z-tooltip.cjs':
|
|
2150
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2151
|
+
/* webpackMode: "lazy" */
|
|
2152
|
+
'./z-tooltip.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2153
|
+
case 'z-visually-hidden.cjs':
|
|
2154
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2155
|
+
/* webpackMode: "lazy" */
|
|
2156
|
+
'./z-visually-hidden.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2157
|
+
case 'z-alert.cjs':
|
|
2158
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2159
|
+
/* webpackMode: "lazy" */
|
|
2160
|
+
'./z-alert.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2161
|
+
case 'z-chip.cjs':
|
|
2162
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2163
|
+
/* webpackMode: "lazy" */
|
|
2164
|
+
'./z-chip.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2165
|
+
case 'z-dragdrop-area_3.cjs':
|
|
2166
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2167
|
+
/* webpackMode: "lazy" */
|
|
2168
|
+
'./z-dragdrop-area_3.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2169
|
+
case 'z-ghost-loading.cjs':
|
|
2170
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2171
|
+
/* webpackMode: "lazy" */
|
|
2172
|
+
'./z-ghost-loading.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2173
|
+
case 'z-myz-card_4.cjs':
|
|
2174
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2175
|
+
/* webpackMode: "lazy" */
|
|
2176
|
+
'./z-myz-card_4.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2177
|
+
case 'z-pocket_3.cjs':
|
|
2178
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2179
|
+
/* webpackMode: "lazy" */
|
|
2180
|
+
'./z-pocket_3.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2181
|
+
case 'z-table-cell.cjs':
|
|
2182
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2183
|
+
/* webpackMode: "lazy" */
|
|
2184
|
+
'./z-table-cell.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2185
|
+
case 'z-table-empty-box.cjs':
|
|
2186
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2187
|
+
/* webpackMode: "lazy" */
|
|
2188
|
+
'./z-table-empty-box.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2189
|
+
case 'z-table-header.cjs':
|
|
2190
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2191
|
+
/* webpackMode: "lazy" */
|
|
2192
|
+
'./z-table-header.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2193
|
+
case 'z-myz-list-item.cjs':
|
|
2194
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2195
|
+
/* webpackMode: "lazy" */
|
|
2196
|
+
'./z-myz-list-item.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2197
|
+
case 'z-link.cjs':
|
|
2198
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2199
|
+
/* webpackMode: "lazy" */
|
|
2200
|
+
'./z-link.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2201
|
+
case 'z-list_3.cjs':
|
|
2202
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2203
|
+
/* webpackMode: "lazy" */
|
|
2204
|
+
'./z-list_3.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2205
|
+
case 'z-body_2.cjs':
|
|
2206
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2207
|
+
/* webpackMode: "lazy" */
|
|
2208
|
+
'./z-body_2.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2209
|
+
case 'z-input_2.cjs':
|
|
2210
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2211
|
+
/* webpackMode: "lazy" */
|
|
2212
|
+
'./z-input_2.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2213
|
+
case 'z-popover.cjs':
|
|
2214
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2215
|
+
/* webpackMode: "lazy" */
|
|
2216
|
+
'./z-popover.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2217
|
+
case 'z-divider.cjs':
|
|
2218
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2219
|
+
/* webpackMode: "lazy" */
|
|
2220
|
+
'./z-divider.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2221
|
+
case 'z-button.cjs':
|
|
2222
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2223
|
+
/* webpackMode: "lazy" */
|
|
2224
|
+
'./z-button.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2225
|
+
}
|
|
2226
|
+
}
|
|
2227
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
3121
2228
|
/* @vite-ignore */
|
|
3122
2229
|
/* webpackInclude: /\.entry\.js$/ */
|
|
3123
2230
|
/* webpackExclude: /\.system\.entry\.js$/ */
|
|
3124
2231
|
/* webpackMode: "lazy" */
|
|
3125
|
-
`./${bundleId}.entry.js${
|
|
3126
|
-
|
|
2232
|
+
`./${bundleId}.entry.js${''}`)); }).then((importedModule) => {
|
|
2233
|
+
{
|
|
3127
2234
|
cmpModules.set(bundleId, importedModule);
|
|
3128
2235
|
}
|
|
3129
2236
|
return importedModule[exportName];
|
|
3130
2237
|
}, consoleError);
|
|
3131
2238
|
};
|
|
3132
2239
|
const styles = /*@__PURE__*/ new Map();
|
|
3133
|
-
const modeResolutionChain = [];
|
|
3134
2240
|
const win = typeof window !== 'undefined' ? window : {};
|
|
3135
|
-
const CSS = BUILD.cssVarShim ? win.CSS : null;
|
|
3136
2241
|
const doc = win.document || { head: {} };
|
|
3137
|
-
const H = (win.HTMLElement || class {
|
|
3138
|
-
});
|
|
3139
2242
|
const plt = {
|
|
3140
2243
|
$flags$: 0,
|
|
3141
2244
|
$resourcesUrl$: '',
|
|
@@ -3145,27 +2248,8 @@ const plt = {
|
|
|
3145
2248
|
rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),
|
|
3146
2249
|
ce: (eventName, opts) => new CustomEvent(eventName, opts),
|
|
3147
2250
|
};
|
|
3148
|
-
const setPlatformHelpers = (helpers) => {
|
|
3149
|
-
Object.assign(plt, helpers);
|
|
3150
|
-
};
|
|
3151
|
-
const supportsShadow = BUILD.shadowDomShim && BUILD.shadowDom
|
|
3152
|
-
? /*@__PURE__*/ (() => (doc.head.attachShadow + '').indexOf('[native') > -1)()
|
|
3153
|
-
: true;
|
|
3154
|
-
const supportsListenerOptions = /*@__PURE__*/ (() => {
|
|
3155
|
-
let supportsListenerOptions = false;
|
|
3156
|
-
try {
|
|
3157
|
-
doc.addEventListener('e', null, Object.defineProperty({}, 'passive', {
|
|
3158
|
-
get() {
|
|
3159
|
-
supportsListenerOptions = true;
|
|
3160
|
-
},
|
|
3161
|
-
}));
|
|
3162
|
-
}
|
|
3163
|
-
catch (e) { }
|
|
3164
|
-
return supportsListenerOptions;
|
|
3165
|
-
})();
|
|
3166
2251
|
const promiseResolve = (v) => Promise.resolve(v);
|
|
3167
|
-
const supportsConstructableStylesheets =
|
|
3168
|
-
? /*@__PURE__*/ (() => {
|
|
2252
|
+
const supportsConstructableStylesheets = /*@__PURE__*/ (() => {
|
|
3169
2253
|
try {
|
|
3170
2254
|
new CSSStyleSheet();
|
|
3171
2255
|
return typeof new CSSStyleSheet().replaceSync === 'function';
|
|
@@ -3173,10 +2257,9 @@ const supportsConstructableStylesheets = BUILD.constructableCSS
|
|
|
3173
2257
|
catch (e) { }
|
|
3174
2258
|
return false;
|
|
3175
2259
|
})()
|
|
3176
|
-
|
|
2260
|
+
;
|
|
3177
2261
|
const queueDomReads = [];
|
|
3178
2262
|
const queueDomWrites = [];
|
|
3179
|
-
const queueDomWritesLow = [];
|
|
3180
2263
|
const queueTask = (queue, write) => (cb) => {
|
|
3181
2264
|
queue.push(cb);
|
|
3182
2265
|
if (!queuePending) {
|
|
@@ -3200,53 +2283,13 @@ const consume = (queue) => {
|
|
|
3200
2283
|
}
|
|
3201
2284
|
queue.length = 0;
|
|
3202
2285
|
};
|
|
3203
|
-
const consumeTimeout = (queue, timeout) => {
|
|
3204
|
-
let i = 0;
|
|
3205
|
-
let ts = 0;
|
|
3206
|
-
while (i < queue.length && (ts = performance.now()) < timeout) {
|
|
3207
|
-
try {
|
|
3208
|
-
queue[i++](ts);
|
|
3209
|
-
}
|
|
3210
|
-
catch (e) {
|
|
3211
|
-
consoleError(e);
|
|
3212
|
-
}
|
|
3213
|
-
}
|
|
3214
|
-
if (i === queue.length) {
|
|
3215
|
-
queue.length = 0;
|
|
3216
|
-
}
|
|
3217
|
-
else if (i !== 0) {
|
|
3218
|
-
queue.splice(0, i);
|
|
3219
|
-
}
|
|
3220
|
-
};
|
|
3221
2286
|
const flush = () => {
|
|
3222
|
-
if (BUILD.asyncQueue) {
|
|
3223
|
-
queueCongestion++;
|
|
3224
|
-
}
|
|
3225
2287
|
// always force a bunch of medium callbacks to run, but still have
|
|
3226
2288
|
// a throttle on how many can run in a certain time
|
|
3227
2289
|
// DOM READS!!!
|
|
3228
2290
|
consume(queueDomReads);
|
|
3229
2291
|
// DOM WRITES!!!
|
|
3230
|
-
|
|
3231
|
-
const timeout = (plt.$flags$ & 6 /* PLATFORM_FLAGS.queueMask */) === 2 /* PLATFORM_FLAGS.appLoaded */
|
|
3232
|
-
? performance.now() + 14 * Math.ceil(queueCongestion * (1.0 / 10.0))
|
|
3233
|
-
: Infinity;
|
|
3234
|
-
consumeTimeout(queueDomWrites, timeout);
|
|
3235
|
-
consumeTimeout(queueDomWritesLow, timeout);
|
|
3236
|
-
if (queueDomWrites.length > 0) {
|
|
3237
|
-
queueDomWritesLow.push(...queueDomWrites);
|
|
3238
|
-
queueDomWrites.length = 0;
|
|
3239
|
-
}
|
|
3240
|
-
if ((queuePending = queueDomReads.length + queueDomWrites.length + queueDomWritesLow.length > 0)) {
|
|
3241
|
-
// still more to do yet, but we've run out of time
|
|
3242
|
-
// let's let this thing cool off and try again in the next tick
|
|
3243
|
-
plt.raf(flush);
|
|
3244
|
-
}
|
|
3245
|
-
else {
|
|
3246
|
-
queueCongestion = 0;
|
|
3247
|
-
}
|
|
3248
|
-
}
|
|
3249
|
-
else {
|
|
2292
|
+
{
|
|
3250
2293
|
consume(queueDomWrites);
|
|
3251
2294
|
if ((queuePending = queueDomReads.length > 0)) {
|
|
3252
2295
|
// still more to do yet, but we've run out of time
|
|
@@ -3256,7 +2299,12 @@ const flush = () => {
|
|
|
3256
2299
|
}
|
|
3257
2300
|
};
|
|
3258
2301
|
const nextTick = /*@__PURE__*/ (cb) => promiseResolve().then(cb);
|
|
3259
|
-
const readTask = /*@__PURE__*/ queueTask(queueDomReads, false);
|
|
3260
2302
|
const writeTask = /*@__PURE__*/ queueTask(queueDomWrites, true);
|
|
3261
2303
|
|
|
3262
|
-
|
|
2304
|
+
exports.Host = Host;
|
|
2305
|
+
exports.bootstrapLazy = bootstrapLazy;
|
|
2306
|
+
exports.createEvent = createEvent;
|
|
2307
|
+
exports.getElement = getElement;
|
|
2308
|
+
exports.h = h;
|
|
2309
|
+
exports.promiseResolve = promiseResolve;
|
|
2310
|
+
exports.registerInstance = registerInstance;
|