@zanichelli/albe-web-components 5.5.5 → 5.6.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/dist/cjs/{index-3dd0f9bd.js → index-745c0423.js} +10 -0
- package/dist/cjs/{index-84b7063a.js → index-e3299e0a.js} +848 -278
- package/dist/cjs/index.cjs.js +14 -2
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/{utils-29f9ccf5.js → utils-4647eb06.js} +1 -1
- package/dist/cjs/{utils-4a419726.js → utils-dfe717c7.js} +1 -1
- package/dist/cjs/web-components-library.cjs.js +3 -3
- package/dist/cjs/z-alert.cjs.entry.js +1 -1
- package/dist/cjs/z-app-header.cjs.entry.js +1 -1
- package/dist/cjs/z-app-switcher_9.cjs.entry.js +4 -4
- package/dist/cjs/z-aria-alert.cjs.entry.js +2 -2
- package/dist/cjs/z-avatar.cjs.entry.js +2 -2
- package/dist/cjs/z-body_2.cjs.entry.js +1 -1
- package/dist/cjs/z-button-deprecated.cjs.entry.js +2 -2
- package/dist/cjs/z-button-filter.cjs.entry.js +1 -1
- package/dist/cjs/z-button-sort.cjs.entry.js +1 -1
- package/dist/cjs/z-button.cjs.entry.js +2 -2
- package/dist/cjs/z-candybar.cjs.entry.js +1 -1
- package/dist/cjs/z-card.cjs.entry.js +2 -2
- package/dist/cjs/z-carousel.cjs.entry.js +117 -5
- package/dist/cjs/z-chip-deprecated.cjs.entry.js +1 -1
- package/dist/cjs/z-chip.cjs.entry.js +3 -3
- package/dist/cjs/z-combobox.cjs.entry.js +3 -3
- package/dist/cjs/z-contextual-menu.cjs.entry.js +2 -2
- package/dist/cjs/z-cookiebar.cjs.entry.js +2 -2
- package/dist/cjs/z-cover-hero.cjs.entry.js +2 -2
- package/dist/cjs/z-date-picker.cjs.entry.js +3 -3
- package/dist/cjs/z-dragdrop-area_2.cjs.entry.js +1 -1
- package/dist/cjs/z-file-upload.cjs.entry.js +3 -3
- package/dist/cjs/z-file.cjs.entry.js +2 -2
- package/dist/cjs/z-footer-link_3.cjs.entry.js +1 -1
- package/dist/cjs/z-footer.cjs.entry.js +2 -2
- package/dist/cjs/z-ghost-loading.cjs.entry.js +1 -1
- package/dist/cjs/z-icon-package.cjs.entry.js +1 -1
- package/dist/cjs/z-info-box.cjs.entry.js +1 -1
- package/dist/cjs/z-info-reveal.cjs.entry.js +2 -2
- package/dist/cjs/z-input-deprecated.cjs.entry.js +3 -3
- package/dist/cjs/z-input-label_2.cjs.entry.js +3 -3
- package/dist/cjs/z-list-group.cjs.entry.js +2 -2
- package/dist/cjs/z-list_2.cjs.entry.js +2 -2
- package/dist/cjs/z-menu-dropdown_2.cjs.entry.js +3 -3
- package/dist/cjs/z-menu-section.cjs.entry.js +1 -1
- package/dist/cjs/z-menu.cjs.entry.js +1 -1
- package/dist/cjs/z-messages-pocket.cjs.entry.js +2 -2
- package/dist/cjs/z-modal-login.cjs.entry.js +2 -2
- package/dist/cjs/z-modal.cjs.entry.js +1 -1
- package/dist/cjs/z-myz-card-alert.cjs.entry.js +2 -2
- package/dist/cjs/z-myz-card-dictionary.cjs.entry.js +2 -2
- package/dist/cjs/z-myz-card-footer-sections.cjs.entry.js +1 -1
- package/dist/cjs/z-myz-card-footer.cjs.entry.js +2 -2
- package/dist/cjs/z-myz-card-icon.cjs.entry.js +1 -1
- package/dist/cjs/z-myz-card-info.cjs.entry.js +3 -3
- package/dist/cjs/z-myz-card-list.cjs.entry.js +1 -1
- package/dist/cjs/z-myz-card_4.cjs.entry.js +2 -2
- package/dist/cjs/z-myz-list-item.cjs.entry.js +3 -3
- package/dist/cjs/z-myz-topbar.cjs.entry.js +2 -2
- package/dist/cjs/z-navigation-tab-link.cjs.entry.js +2 -2
- package/dist/cjs/z-navigation-tab.cjs.entry.js +2 -2
- package/dist/cjs/z-navigation-tabs.cjs.entry.js +2 -2
- package/dist/cjs/z-notification.cjs.entry.js +1 -1
- package/dist/cjs/z-offcanvas.cjs.entry.js +2 -2
- package/dist/cjs/z-otp.cjs.entry.js +2 -2
- package/dist/cjs/z-pagination-bar.cjs.entry.js +3 -3
- package/dist/cjs/z-pagination-page.cjs.entry.js +1 -1
- package/dist/cjs/z-pagination.cjs.entry.js +1 -1
- package/dist/cjs/z-panel-elem.cjs.entry.js +1 -1
- package/dist/cjs/z-pocket-message.cjs.entry.js +1 -1
- package/dist/cjs/z-pocket_3.cjs.entry.js +3 -3
- package/dist/cjs/z-popover-deprecated.cjs.entry.js +3 -3
- package/dist/cjs/z-popover.cjs.entry.js +2 -2
- package/dist/cjs/z-section-title.cjs.entry.js +2 -2
- package/dist/cjs/z-skip-to-content.cjs.entry.js +3 -3
- package/dist/cjs/z-slideshow.cjs.entry.js +3 -3
- package/dist/cjs/z-status-tag.cjs.entry.js +2 -2
- package/dist/cjs/z-stepper-item.cjs.entry.js +1 -1
- package/dist/cjs/z-stepper.cjs.entry.js +1 -1
- package/dist/cjs/z-table-body.cjs.entry.js +1 -1
- package/dist/cjs/z-table-cell.cjs.entry.js +2 -2
- package/dist/cjs/z-table-empty-box.cjs.entry.js +1 -1
- package/dist/cjs/z-table-expanded-row.cjs.entry.js +1 -1
- package/dist/cjs/z-table-footer.cjs.entry.js +1 -1
- package/dist/cjs/z-table-head.cjs.entry.js +1 -1
- package/dist/cjs/z-table-header-row.cjs.entry.js +1 -1
- package/dist/cjs/z-table-header.cjs.entry.js +3 -3
- package/dist/cjs/z-table-row.cjs.entry.js +2 -2
- package/dist/cjs/z-table-sticky-footer.cjs.entry.js +1 -1
- package/dist/cjs/z-table.cjs.entry.js +2 -2
- package/dist/cjs/z-tag.cjs.entry.js +1 -1
- package/dist/cjs/z-toast-notification-list.cjs.entry.js +2 -2
- package/dist/cjs/z-toast-notification.cjs.entry.js +2 -2
- package/dist/cjs/z-toggle-button.cjs.entry.js +1 -1
- package/dist/cjs/z-toggle-switch.cjs.entry.js +3 -3
- package/dist/cjs/z-tooltip-deprecated.cjs.entry.js +2 -2
- package/dist/cjs/z-tooltip.cjs.entry.js +2 -2
- package/dist/cjs/z-user-dropdown.cjs.entry.js +1 -1
- package/dist/cjs/z-visually-hidden.cjs.entry.js +1 -1
- package/dist/collection/beans/index.js +10 -0
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/buttons/z-button/index.js +202 -200
- package/dist/collection/components/buttons/z-button-sort/index.js +178 -173
- package/dist/collection/components/buttons/z-chip/index.js +105 -102
- package/dist/collection/components/buttons/z-toggle-button/index.js +100 -94
- package/dist/collection/components/buttons/z-toggle-switch/index.js +110 -106
- package/dist/collection/components/date-picker/z-date-picker/index.js +129 -118
- package/dist/collection/components/date-picker/z-range-picker/index.js +168 -160
- package/dist/collection/components/file-upload/z-dragdrop-area/index.js +31 -29
- package/dist/collection/components/file-upload/z-file/index.js +93 -85
- package/dist/collection/components/file-upload/z-file-upload/index.js +193 -196
- package/dist/collection/components/footer/z-footer/index.js +165 -197
- package/dist/collection/components/footer/z-footer-link/index.js +33 -28
- package/dist/collection/components/footer/z-footer-section/index.js +39 -37
- package/dist/collection/components/footer/z-footer-social/index.js +65 -60
- package/dist/collection/components/icons/z-icon/index.js +96 -90
- package/dist/collection/components/icons/z-icon-package/index.js +12 -10
- package/dist/collection/components/indicators/z-stepper/index.js +11 -7
- package/dist/collection/components/indicators/z-stepper-item/index.js +82 -82
- package/dist/collection/components/inputs/z-combobox/index.js +319 -320
- package/dist/collection/components/inputs/z-input/index.js +522 -530
- package/dist/collection/components/inputs/z-input-message/index.js +53 -49
- package/dist/collection/components/inputs/z-select/index.js +333 -327
- package/dist/collection/components/list/z-list/index.js +38 -33
- package/dist/collection/components/list/z-list-element/index.js +287 -282
- package/dist/collection/components/list/z-list-group/index.js +100 -98
- package/dist/collection/components/list/z-toast-notification-list/index.js +60 -53
- package/dist/collection/components/logo/z-logo/index.js +113 -108
- package/dist/collection/components/modal/z-modal/index.js +129 -130
- package/dist/collection/components/modal/z-modal-login/index.js +170 -194
- package/dist/collection/components/navigation/tabs/z-navigation-tab/index.js +173 -163
- package/dist/collection/components/navigation/tabs/z-navigation-tab-link/index.js +205 -195
- package/dist/collection/components/navigation/tabs/z-navigation-tabs/index.js +93 -87
- package/dist/collection/components/navigation/z-app-header/index.js +136 -146
- package/dist/collection/components/navigation/z-app-switcher/index.js +60 -51
- package/dist/collection/components/navigation/z-app-topbar/index.js +120 -120
- package/dist/collection/components/navigation/z-link/index.js +243 -237
- package/dist/collection/components/navigation/z-menu/index.js +128 -123
- package/dist/collection/components/navigation/z-menu-dropdown/index.js +76 -76
- package/dist/collection/components/navigation/z-menu-section/index.js +80 -73
- package/dist/collection/components/navigation/z-user-dropdown/index.js +164 -167
- package/dist/collection/components/notification/z-candybar/index.js +12 -9
- package/dist/collection/components/notification/z-cookiebar/index.js +80 -80
- package/dist/collection/components/notification/z-info-box/index.js +67 -61
- package/dist/collection/components/notification/z-notification/index.js +157 -153
- package/dist/collection/components/notification/z-toast-notification/index.js +216 -215
- package/dist/collection/components/notification/z-tooltip/index.js +100 -93
- package/dist/collection/components/panel/z-panel-elem/index.js +172 -172
- package/dist/collection/components/typography/z-body/index.js +56 -55
- package/dist/collection/components/typography/z-heading/index.js +56 -55
- package/dist/collection/components/typography/z-typography/index.js +68 -62
- package/dist/collection/components/z-aria-alert/index.js +24 -23
- package/dist/collection/components/z-avatar/index.js +104 -100
- package/dist/collection/components/z-card/index.js +124 -126
- package/dist/collection/components/z-carousel/index.js +268 -47
- package/dist/collection/components/z-carousel/styles.css +107 -2
- package/dist/collection/components/z-contextual-menu/index.js +91 -92
- package/dist/collection/components/z-cover-hero/index.js +63 -65
- package/dist/collection/components/z-divider/index.js +75 -69
- package/dist/collection/components/z-ghost-loading/index.js +11 -7
- package/dist/collection/components/z-info-reveal/index.js +83 -80
- package/dist/collection/components/z-offcanvas/index.js +99 -91
- package/dist/collection/components/z-pagination/index.js +225 -237
- package/dist/collection/components/z-popover/index.js +185 -171
- package/dist/collection/components/z-section-title/index.js +54 -48
- package/dist/collection/components/z-skip-to-content/index.js +78 -68
- package/dist/collection/components/z-table/z-table/index.js +273 -284
- package/dist/collection/components/z-table/z-table-body/index.js +11 -7
- package/dist/collection/components/z-table/z-table-cell/index.js +63 -61
- package/dist/collection/components/z-table/z-table-empty-box/index.js +53 -53
- package/dist/collection/components/z-table/z-table-expanded-row/index.js +33 -29
- package/dist/collection/components/z-table/z-table-footer/index.js +11 -7
- package/dist/collection/components/z-table/z-table-head/index.js +11 -7
- package/dist/collection/components/z-table/z-table-header/index.js +162 -160
- package/dist/collection/components/z-table/z-table-header-row/index.js +33 -29
- package/dist/collection/components/z-table/z-table-row/index.js +63 -57
- package/dist/collection/components/z-table/z-table-sticky-footer/index.js +11 -7
- package/dist/collection/components/z-tag/index.js +49 -46
- package/dist/collection/components/z-visually-hidden/index.js +11 -7
- package/dist/collection/deprecated/pagination/z-pagination-bar/index.js +166 -159
- package/dist/collection/deprecated/pagination/z-pagination-page/index.js +115 -109
- package/dist/collection/deprecated/z-button-deprecated/index.js +189 -186
- package/dist/collection/deprecated/z-button-filter/index.js +118 -114
- package/dist/collection/deprecated/z-chip-deprecated/index.js +50 -48
- package/dist/collection/deprecated/z-input-deprecated/index.js +579 -584
- package/dist/collection/deprecated/z-input-label/index.js +65 -59
- package/dist/collection/deprecated/z-popover-deprecated/index.js +182 -174
- package/dist/collection/deprecated/z-status-tag/index.js +106 -102
- package/dist/collection/deprecated/z-tooltip-deprecated/index.js +127 -116
- package/dist/collection/snowflakes/myz/card/z-myz-card/index.js +87 -82
- package/dist/collection/snowflakes/myz/card/z-myz-card-alert/index.js +102 -99
- package/dist/collection/snowflakes/myz/card/z-myz-card-body/index.js +12 -10
- package/dist/collection/snowflakes/myz/card/z-myz-card-cover/index.js +80 -74
- package/dist/collection/snowflakes/myz/card/z-myz-card-dictionary/index.js +143 -143
- package/dist/collection/snowflakes/myz/card/z-myz-card-footer/index.js +150 -157
- package/dist/collection/snowflakes/myz/card/z-myz-card-footer-sections/index.js +12 -13
- package/dist/collection/snowflakes/myz/card/z-myz-card-header/index.js +74 -68
- package/dist/collection/snowflakes/myz/card/z-myz-card-icon/index.js +66 -62
- package/dist/collection/snowflakes/myz/card/z-myz-card-info/index.js +82 -106
- package/dist/collection/snowflakes/myz/card/z-myz-card-list/index.js +32 -26
- package/dist/collection/snowflakes/myz/list/z-myz-list/index.js +54 -46
- package/dist/collection/snowflakes/myz/list/z-myz-list-item/index.js +169 -165
- package/dist/collection/snowflakes/myz/pocket/z-messages-pocket/index.js +82 -83
- package/dist/collection/snowflakes/myz/pocket/z-pocket/index.js +124 -114
- package/dist/collection/snowflakes/myz/pocket/z-pocket-body/index.js +63 -56
- package/dist/collection/snowflakes/myz/pocket/z-pocket-header/index.js +65 -58
- package/dist/collection/snowflakes/myz/pocket/z-pocket-message/index.js +12 -13
- package/dist/collection/snowflakes/myz/topbar/index.js +230 -256
- package/dist/collection/snowflakes/myz/z-alert/index.js +37 -32
- package/dist/collection/snowflakes/myz/z-otp/index.js +99 -93
- package/dist/collection/snowflakes/myz/z-slideshow/index.js +64 -66
- package/dist/esm/{index-3c2d757b.js → index-8390ddaf.js} +11 -1
- package/dist/esm/{index-90e18641.js → index-a2ca4b97.js} +848 -278
- package/dist/esm/index.js +2 -2
- package/dist/esm/loader.js +3 -3
- package/dist/esm/polyfills/css-shim.js +1 -1
- package/dist/esm/{utils-57be09c8.js → utils-2c5dfb88.js} +1 -1
- package/dist/esm/{utils-729724da.js → utils-3ba1cfd4.js} +1 -1
- package/dist/esm/web-components-library.js +3 -3
- package/dist/esm/z-alert.entry.js +1 -1
- package/dist/esm/z-app-header.entry.js +1 -1
- package/dist/esm/z-app-switcher_9.entry.js +4 -4
- package/dist/esm/z-aria-alert.entry.js +2 -2
- package/dist/esm/z-avatar.entry.js +2 -2
- package/dist/esm/z-body_2.entry.js +1 -1
- package/dist/esm/z-button-deprecated.entry.js +2 -2
- package/dist/esm/z-button-filter.entry.js +1 -1
- package/dist/esm/z-button-sort.entry.js +1 -1
- package/dist/esm/z-button.entry.js +2 -2
- package/dist/esm/z-candybar.entry.js +1 -1
- package/dist/esm/z-card.entry.js +2 -2
- package/dist/esm/z-carousel.entry.js +117 -5
- package/dist/esm/z-chip-deprecated.entry.js +1 -1
- package/dist/esm/z-chip.entry.js +3 -3
- package/dist/esm/z-combobox.entry.js +3 -3
- package/dist/esm/z-contextual-menu.entry.js +2 -2
- package/dist/esm/z-cookiebar.entry.js +2 -2
- package/dist/esm/z-cover-hero.entry.js +2 -2
- package/dist/esm/z-date-picker.entry.js +3 -3
- package/dist/esm/z-dragdrop-area_2.entry.js +1 -1
- package/dist/esm/z-file-upload.entry.js +3 -3
- package/dist/esm/z-file.entry.js +2 -2
- package/dist/esm/z-footer-link_3.entry.js +1 -1
- package/dist/esm/z-footer.entry.js +2 -2
- package/dist/esm/z-ghost-loading.entry.js +1 -1
- package/dist/esm/z-icon-package.entry.js +1 -1
- package/dist/esm/z-info-box.entry.js +1 -1
- package/dist/esm/z-info-reveal.entry.js +2 -2
- package/dist/esm/z-input-deprecated.entry.js +3 -3
- package/dist/esm/z-input-label_2.entry.js +3 -3
- package/dist/esm/z-list-group.entry.js +2 -2
- package/dist/esm/z-list_2.entry.js +2 -2
- package/dist/esm/z-menu-dropdown_2.entry.js +3 -3
- package/dist/esm/z-menu-section.entry.js +1 -1
- package/dist/esm/z-menu.entry.js +1 -1
- package/dist/esm/z-messages-pocket.entry.js +2 -2
- package/dist/esm/z-modal-login.entry.js +2 -2
- package/dist/esm/z-modal.entry.js +1 -1
- package/dist/esm/z-myz-card-alert.entry.js +2 -2
- package/dist/esm/z-myz-card-dictionary.entry.js +2 -2
- package/dist/esm/z-myz-card-footer-sections.entry.js +1 -1
- package/dist/esm/z-myz-card-footer.entry.js +2 -2
- package/dist/esm/z-myz-card-icon.entry.js +1 -1
- package/dist/esm/z-myz-card-info.entry.js +3 -3
- package/dist/esm/z-myz-card-list.entry.js +1 -1
- package/dist/esm/z-myz-card_4.entry.js +2 -2
- package/dist/esm/z-myz-list-item.entry.js +3 -3
- package/dist/esm/z-myz-topbar.entry.js +2 -2
- package/dist/esm/z-navigation-tab-link.entry.js +2 -2
- package/dist/esm/z-navigation-tab.entry.js +2 -2
- package/dist/esm/z-navigation-tabs.entry.js +2 -2
- package/dist/esm/z-notification.entry.js +1 -1
- package/dist/esm/z-offcanvas.entry.js +2 -2
- package/dist/esm/z-otp.entry.js +2 -2
- package/dist/esm/z-pagination-bar.entry.js +3 -3
- package/dist/esm/z-pagination-page.entry.js +1 -1
- package/dist/esm/z-pagination.entry.js +1 -1
- package/dist/esm/z-panel-elem.entry.js +1 -1
- package/dist/esm/z-pocket-message.entry.js +1 -1
- package/dist/esm/z-pocket_3.entry.js +3 -3
- package/dist/esm/z-popover-deprecated.entry.js +3 -3
- package/dist/esm/z-popover.entry.js +2 -2
- package/dist/esm/z-section-title.entry.js +2 -2
- package/dist/esm/z-skip-to-content.entry.js +3 -3
- package/dist/esm/z-slideshow.entry.js +3 -3
- package/dist/esm/z-status-tag.entry.js +2 -2
- package/dist/esm/z-stepper-item.entry.js +1 -1
- package/dist/esm/z-stepper.entry.js +1 -1
- package/dist/esm/z-table-body.entry.js +1 -1
- package/dist/esm/z-table-cell.entry.js +2 -2
- package/dist/esm/z-table-empty-box.entry.js +1 -1
- package/dist/esm/z-table-expanded-row.entry.js +1 -1
- package/dist/esm/z-table-footer.entry.js +1 -1
- package/dist/esm/z-table-head.entry.js +1 -1
- package/dist/esm/z-table-header-row.entry.js +1 -1
- package/dist/esm/z-table-header.entry.js +3 -3
- package/dist/esm/z-table-row.entry.js +2 -2
- package/dist/esm/z-table-sticky-footer.entry.js +1 -1
- package/dist/esm/z-table.entry.js +2 -2
- package/dist/esm/z-tag.entry.js +1 -1
- package/dist/esm/z-toast-notification-list.entry.js +2 -2
- package/dist/esm/z-toast-notification.entry.js +2 -2
- package/dist/esm/z-toggle-button.entry.js +1 -1
- package/dist/esm/z-toggle-switch.entry.js +3 -3
- package/dist/esm/z-tooltip-deprecated.entry.js +2 -2
- package/dist/esm/z-tooltip.entry.js +2 -2
- package/dist/esm/z-user-dropdown.entry.js +1 -1
- package/dist/esm/z-visually-hidden.entry.js +1 -1
- package/dist/types/beans/index.d.ts +8 -0
- package/dist/types/components/z-carousel/index.d.ts +47 -3
- package/dist/types/components.d.ts +309 -77
- package/dist/types/stencil-public-runtime.d.ts +15 -4
- package/dist/web-components-library/index.esm.js +1 -1
- package/dist/web-components-library/{p-79408b00.entry.js → p-01a95ddd.entry.js} +1 -1
- package/dist/web-components-library/{p-f0d90cc2.entry.js → p-023e657c.entry.js} +1 -1
- package/dist/web-components-library/{p-5ae44c56.entry.js → p-03aa4a29.entry.js} +1 -1
- package/dist/web-components-library/{p-02681c05.entry.js → p-07af77be.entry.js} +1 -1
- package/dist/web-components-library/{p-9c7cf598.entry.js → p-0f0d8a17.entry.js} +1 -1
- package/dist/web-components-library/{p-104b70e5.entry.js → p-137c1289.entry.js} +1 -1
- package/dist/web-components-library/{p-1906915c.entry.js → p-145ef56b.entry.js} +1 -1
- package/{www/build/p-f31b8e83.js → dist/web-components-library/p-16c0ffce.js} +1 -1
- package/dist/web-components-library/{p-0aa9746a.entry.js → p-1c5cb6b6.entry.js} +1 -1
- package/dist/web-components-library/{p-d0d75b41.entry.js → p-1cb8f39f.entry.js} +1 -1
- package/{www/build/p-c730a93d.entry.js → dist/web-components-library/p-1efa8cfe.entry.js} +1 -1
- package/dist/web-components-library/{p-46a6341a.entry.js → p-204c6ec6.entry.js} +1 -1
- package/{www/build/p-aed2a8cf.entry.js → dist/web-components-library/p-213d7163.entry.js} +1 -1
- package/dist/web-components-library/{p-8e4d7f5d.entry.js → p-21a1b6a9.entry.js} +1 -1
- package/dist/web-components-library/{p-d34eccf8.entry.js → p-242e410f.entry.js} +1 -1
- package/dist/web-components-library/{p-2c836d42.entry.js → p-2b374cb0.entry.js} +1 -1
- package/dist/web-components-library/{p-2de00f19.entry.js → p-2ec1cc4b.entry.js} +1 -1
- package/dist/web-components-library/{p-6375f662.entry.js → p-33438244.entry.js} +1 -1
- package/dist/web-components-library/{p-6baa8e33.entry.js → p-37e050bd.entry.js} +1 -1
- package/dist/web-components-library/{p-a94f78b4.entry.js → p-3bdf4f63.entry.js} +1 -1
- package/dist/web-components-library/{p-0ab1b40f.entry.js → p-3c63af71.entry.js} +1 -1
- package/dist/web-components-library/{p-b574d5f6.entry.js → p-3c715e7d.entry.js} +1 -1
- package/dist/web-components-library/{p-bd772b8a.entry.js → p-3e60fa3d.entry.js} +1 -1
- package/dist/web-components-library/{p-953a07d5.entry.js → p-426c55e1.entry.js} +1 -1
- package/dist/web-components-library/{p-5789bbe7.entry.js → p-42d1707b.entry.js} +1 -1
- package/dist/web-components-library/p-46f66301.entry.js +1 -0
- package/dist/web-components-library/{p-fea2c39a.entry.js → p-470e984a.entry.js} +1 -1
- package/dist/web-components-library/{p-f6da32c4.entry.js → p-4725eda5.entry.js} +1 -1
- package/dist/web-components-library/{p-1e6aff0f.entry.js → p-478dd7a6.entry.js} +1 -1
- package/dist/web-components-library/{p-d4927410.entry.js → p-4f4930b5.entry.js} +1 -1
- package/dist/web-components-library/{p-71034a6f.entry.js → p-52ca86db.entry.js} +1 -1
- package/dist/web-components-library/{p-e2560604.entry.js → p-5a5dde20.entry.js} +1 -1
- package/dist/web-components-library/{p-1196b959.entry.js → p-5c30dfc5.entry.js} +1 -1
- package/dist/web-components-library/{p-a93d5b8c.entry.js → p-69fead44.entry.js} +1 -1
- package/dist/web-components-library/{p-cb13d050.entry.js → p-6ab40b8f.entry.js} +1 -1
- package/dist/web-components-library/{p-78e26102.entry.js → p-6aba4f0a.entry.js} +1 -1
- package/dist/web-components-library/p-6c7251f5.entry.js +1 -0
- package/dist/web-components-library/{p-41c5beec.entry.js → p-6d9d8a68.entry.js} +1 -1
- package/{www/build/p-7171717f.entry.js → dist/web-components-library/p-726b4fbd.entry.js} +1 -1
- package/dist/web-components-library/p-728a61a6.js +1 -0
- package/dist/web-components-library/{p-b543005a.entry.js → p-769ccc9f.entry.js} +1 -1
- package/dist/web-components-library/{p-02474663.entry.js → p-79d4e03b.entry.js} +1 -1
- package/dist/web-components-library/{p-4d9667dc.entry.js → p-872c8d25.entry.js} +1 -1
- package/dist/web-components-library/{p-fd2338b2.entry.js → p-8779fc5f.entry.js} +1 -1
- package/dist/web-components-library/{p-8f030e78.entry.js → p-8c703e92.entry.js} +1 -1
- package/dist/web-components-library/{p-3fc438b7.entry.js → p-8e480d71.entry.js} +1 -1
- package/dist/web-components-library/{p-a759ab46.entry.js → p-9124fe26.entry.js} +1 -1
- package/{www/build/p-7d37e4a8.entry.js → dist/web-components-library/p-951c50ad.entry.js} +1 -1
- package/{www/build/p-596da333.entry.js → dist/web-components-library/p-9b70eba4.entry.js} +1 -1
- package/dist/web-components-library/p-9bbb27f7.entry.js +1 -0
- package/dist/web-components-library/{p-c284139b.entry.js → p-9c83bf57.entry.js} +1 -1
- package/dist/web-components-library/{p-7b054eb2.entry.js → p-a30bbd0a.entry.js} +1 -1
- package/dist/web-components-library/{p-ab5f212d.entry.js → p-a3eeed2e.entry.js} +1 -1
- package/dist/web-components-library/{p-ae784c71.entry.js → p-a88046a0.entry.js} +1 -1
- package/dist/web-components-library/{p-71e8c2af.entry.js → p-a9d0b418.entry.js} +1 -1
- package/dist/web-components-library/{p-cf35d3cd.entry.js → p-aaa0752b.entry.js} +1 -1
- package/dist/web-components-library/{p-c9348925.entry.js → p-ad17a4a0.entry.js} +1 -1
- package/dist/web-components-library/{p-ae79ab08.entry.js → p-aee1f514.entry.js} +1 -1
- package/dist/web-components-library/{p-578a5ad1.entry.js → p-b02aa57c.entry.js} +1 -1
- package/dist/web-components-library/p-b54faa73.entry.js +1 -0
- package/dist/web-components-library/{p-51130281.entry.js → p-b622a7fd.entry.js} +1 -1
- package/dist/web-components-library/{p-1c413074.entry.js → p-b9bf1a8d.entry.js} +1 -1
- package/dist/web-components-library/{p-8468d87e.entry.js → p-baa877db.entry.js} +1 -1
- package/dist/web-components-library/{p-e6ddee24.entry.js → p-beec82d9.entry.js} +1 -1
- package/dist/web-components-library/{p-a5232d04.entry.js → p-bf7adc29.entry.js} +1 -1
- package/{www/build/p-b5916b42.entry.js → dist/web-components-library/p-c1da93ee.entry.js} +1 -1
- package/dist/web-components-library/{p-92cc171f.entry.js → p-c2a3f15d.entry.js} +1 -1
- package/dist/web-components-library/{p-105b82a6.entry.js → p-c4417a91.entry.js} +1 -1
- package/{www/build/p-bbeb6b3c.entry.js → dist/web-components-library/p-c4f778d7.entry.js} +1 -1
- package/dist/web-components-library/{p-1ff7bde5.entry.js → p-c633d2bb.entry.js} +1 -1
- package/dist/web-components-library/{p-9fb79d74.entry.js → p-c6b5ee23.entry.js} +1 -1
- package/dist/web-components-library/{p-6bb8de3e.entry.js → p-c89cbfcc.entry.js} +1 -1
- package/{www/build/p-cf73af9a.entry.js → dist/web-components-library/p-caa2c86c.entry.js} +1 -1
- package/dist/web-components-library/{p-bd886dd5.entry.js → p-cea7a294.entry.js} +1 -1
- package/dist/web-components-library/p-d17ebc2f.js +2 -0
- package/dist/web-components-library/{p-29e8a12c.entry.js → p-d1f8d75e.entry.js} +1 -1
- package/dist/web-components-library/{p-bfa3593e.js → p-d4681325.js} +1 -1
- package/dist/web-components-library/{p-9352da73.entry.js → p-d665ca6b.entry.js} +1 -1
- package/{www/build/p-c066ddf1.entry.js → dist/web-components-library/p-d8aac365.entry.js} +1 -1
- package/dist/web-components-library/{p-e17ca1a1.entry.js → p-e177dbef.entry.js} +1 -1
- package/dist/web-components-library/{p-7ebb03d8.entry.js → p-e527ef6d.entry.js} +1 -1
- package/dist/web-components-library/{p-9260abad.entry.js → p-e88ad497.entry.js} +1 -1
- package/dist/web-components-library/{p-4aaf3433.entry.js → p-eaa4eba8.entry.js} +1 -1
- package/dist/web-components-library/{p-7f2fa336.entry.js → p-eb2634d3.entry.js} +1 -1
- package/dist/web-components-library/p-eba1cdd9.entry.js +1 -0
- package/dist/web-components-library/{p-c6124ee4.entry.js → p-ed9dc5b7.entry.js} +1 -1
- package/{www/build/p-e293f91e.entry.js → dist/web-components-library/p-f0e73ccb.entry.js} +1 -1
- package/dist/web-components-library/{p-223566d6.entry.js → p-f4b9f544.entry.js} +1 -1
- package/dist/web-components-library/{p-710cec6d.entry.js → p-f5c3d332.entry.js} +1 -1
- package/dist/web-components-library/{p-33f74396.entry.js → p-f724f7a1.entry.js} +1 -1
- package/dist/web-components-library/{p-cc6a5872.entry.js → p-f77d7a3f.entry.js} +1 -1
- package/{www/build/p-e6ac4dc4.entry.js → dist/web-components-library/p-fd13128d.entry.js} +1 -1
- package/dist/web-components-library/{p-a9eea65b.entry.js → p-fdb6e67b.entry.js} +1 -1
- package/dist/web-components-library/web-components-library.esm.js +1 -1
- package/loader/package.json +1 -0
- package/package.json +2 -2
- package/www/build/index.esm.js +1 -1
- package/www/build/{p-79408b00.entry.js → p-01a95ddd.entry.js} +1 -1
- package/www/build/{p-f0d90cc2.entry.js → p-023e657c.entry.js} +1 -1
- package/www/build/{p-5ae44c56.entry.js → p-03aa4a29.entry.js} +1 -1
- package/www/build/{p-02681c05.entry.js → p-07af77be.entry.js} +1 -1
- package/www/build/{p-9c7cf598.entry.js → p-0f0d8a17.entry.js} +1 -1
- package/www/build/{p-104b70e5.entry.js → p-137c1289.entry.js} +1 -1
- package/www/build/{p-1906915c.entry.js → p-145ef56b.entry.js} +1 -1
- package/{dist/web-components-library/p-f31b8e83.js → www/build/p-16c0ffce.js} +1 -1
- package/www/build/{p-0aa9746a.entry.js → p-1c5cb6b6.entry.js} +1 -1
- package/www/build/{p-d0d75b41.entry.js → p-1cb8f39f.entry.js} +1 -1
- package/{dist/web-components-library/p-c730a93d.entry.js → www/build/p-1efa8cfe.entry.js} +1 -1
- package/www/build/{p-46a6341a.entry.js → p-204c6ec6.entry.js} +1 -1
- package/{dist/web-components-library/p-aed2a8cf.entry.js → www/build/p-213d7163.entry.js} +1 -1
- package/www/build/{p-8e4d7f5d.entry.js → p-21a1b6a9.entry.js} +1 -1
- package/www/build/{p-d34eccf8.entry.js → p-242e410f.entry.js} +1 -1
- package/www/build/{p-2c836d42.entry.js → p-2b374cb0.entry.js} +1 -1
- package/www/build/{p-2de00f19.entry.js → p-2ec1cc4b.entry.js} +1 -1
- package/www/build/{p-6375f662.entry.js → p-33438244.entry.js} +1 -1
- package/www/build/{p-6baa8e33.entry.js → p-37e050bd.entry.js} +1 -1
- package/www/build/{p-a94f78b4.entry.js → p-3bdf4f63.entry.js} +1 -1
- package/www/build/{p-0ab1b40f.entry.js → p-3c63af71.entry.js} +1 -1
- package/www/build/{p-b574d5f6.entry.js → p-3c715e7d.entry.js} +1 -1
- package/www/build/{p-bd772b8a.entry.js → p-3e60fa3d.entry.js} +1 -1
- package/www/build/{p-953a07d5.entry.js → p-426c55e1.entry.js} +1 -1
- package/www/build/{p-5789bbe7.entry.js → p-42d1707b.entry.js} +1 -1
- package/www/build/p-448b6156.js +1 -0
- package/www/build/p-46f66301.entry.js +1 -0
- package/www/build/{p-fea2c39a.entry.js → p-470e984a.entry.js} +1 -1
- package/www/build/{p-f6da32c4.entry.js → p-4725eda5.entry.js} +1 -1
- package/www/build/{p-1e6aff0f.entry.js → p-478dd7a6.entry.js} +1 -1
- package/www/build/p-4c9c83c0.css +1 -0
- package/www/build/{p-d4927410.entry.js → p-4f4930b5.entry.js} +1 -1
- package/www/build/{p-71034a6f.entry.js → p-52ca86db.entry.js} +1 -1
- package/www/build/{p-e2560604.entry.js → p-5a5dde20.entry.js} +1 -1
- package/www/build/{p-1196b959.entry.js → p-5c30dfc5.entry.js} +1 -1
- package/www/build/{p-a93d5b8c.entry.js → p-69fead44.entry.js} +1 -1
- package/www/build/{p-cb13d050.entry.js → p-6ab40b8f.entry.js} +1 -1
- package/www/build/{p-78e26102.entry.js → p-6aba4f0a.entry.js} +1 -1
- package/www/build/p-6c7251f5.entry.js +1 -0
- package/www/build/{p-41c5beec.entry.js → p-6d9d8a68.entry.js} +1 -1
- package/{dist/web-components-library/p-7171717f.entry.js → www/build/p-726b4fbd.entry.js} +1 -1
- package/www/build/p-728a61a6.js +1 -0
- package/www/build/{p-b543005a.entry.js → p-769ccc9f.entry.js} +1 -1
- package/www/build/{p-02474663.entry.js → p-79d4e03b.entry.js} +1 -1
- package/www/build/{p-4d9667dc.entry.js → p-872c8d25.entry.js} +1 -1
- package/www/build/{p-fd2338b2.entry.js → p-8779fc5f.entry.js} +1 -1
- package/www/build/{p-8f030e78.entry.js → p-8c703e92.entry.js} +1 -1
- package/www/build/{p-3fc438b7.entry.js → p-8e480d71.entry.js} +1 -1
- package/www/build/{p-a759ab46.entry.js → p-9124fe26.entry.js} +1 -1
- package/{dist/web-components-library/p-7d37e4a8.entry.js → www/build/p-951c50ad.entry.js} +1 -1
- package/{dist/web-components-library/p-596da333.entry.js → www/build/p-9b70eba4.entry.js} +1 -1
- package/www/build/p-9bbb27f7.entry.js +1 -0
- package/www/build/{p-c284139b.entry.js → p-9c83bf57.entry.js} +1 -1
- package/www/build/{p-7b054eb2.entry.js → p-a30bbd0a.entry.js} +1 -1
- package/www/build/{p-ab5f212d.entry.js → p-a3eeed2e.entry.js} +1 -1
- package/www/build/{p-ae784c71.entry.js → p-a88046a0.entry.js} +1 -1
- package/www/build/{p-71e8c2af.entry.js → p-a9d0b418.entry.js} +1 -1
- package/www/build/{p-cf35d3cd.entry.js → p-aaa0752b.entry.js} +1 -1
- package/www/build/{p-c9348925.entry.js → p-ad17a4a0.entry.js} +1 -1
- package/www/build/{p-ae79ab08.entry.js → p-aee1f514.entry.js} +1 -1
- package/www/build/{p-578a5ad1.entry.js → p-b02aa57c.entry.js} +1 -1
- package/www/build/p-b54faa73.entry.js +1 -0
- package/www/build/{p-51130281.entry.js → p-b622a7fd.entry.js} +1 -1
- package/www/build/{p-1c413074.entry.js → p-b9bf1a8d.entry.js} +1 -1
- package/www/build/{p-8468d87e.entry.js → p-baa877db.entry.js} +1 -1
- package/www/build/{p-e6ddee24.entry.js → p-beec82d9.entry.js} +1 -1
- package/www/build/{p-a5232d04.entry.js → p-bf7adc29.entry.js} +1 -1
- package/{dist/web-components-library/p-b5916b42.entry.js → www/build/p-c1da93ee.entry.js} +1 -1
- package/www/build/{p-92cc171f.entry.js → p-c2a3f15d.entry.js} +1 -1
- package/www/build/{p-105b82a6.entry.js → p-c4417a91.entry.js} +1 -1
- package/{dist/web-components-library/p-bbeb6b3c.entry.js → www/build/p-c4f778d7.entry.js} +1 -1
- package/www/build/{p-1ff7bde5.entry.js → p-c633d2bb.entry.js} +1 -1
- package/www/build/{p-9fb79d74.entry.js → p-c6b5ee23.entry.js} +1 -1
- package/www/build/{p-6bb8de3e.entry.js → p-c89cbfcc.entry.js} +1 -1
- package/{dist/web-components-library/p-cf73af9a.entry.js → www/build/p-caa2c86c.entry.js} +1 -1
- package/www/build/{p-bd886dd5.entry.js → p-cea7a294.entry.js} +1 -1
- package/www/build/p-d17ebc2f.js +2 -0
- package/www/build/{p-29e8a12c.entry.js → p-d1f8d75e.entry.js} +1 -1
- package/www/build/{p-bfa3593e.js → p-d4681325.js} +1 -1
- package/www/build/{p-9352da73.entry.js → p-d665ca6b.entry.js} +1 -1
- package/{dist/web-components-library/p-c066ddf1.entry.js → www/build/p-d8aac365.entry.js} +1 -1
- package/www/build/{p-e17ca1a1.entry.js → p-e177dbef.entry.js} +1 -1
- package/www/build/{p-7ebb03d8.entry.js → p-e527ef6d.entry.js} +1 -1
- package/www/build/{p-9260abad.entry.js → p-e88ad497.entry.js} +1 -1
- package/www/build/{p-4aaf3433.entry.js → p-eaa4eba8.entry.js} +1 -1
- package/www/build/{p-7f2fa336.entry.js → p-eb2634d3.entry.js} +1 -1
- package/www/build/p-eba1cdd9.entry.js +1 -0
- package/www/build/{p-c6124ee4.entry.js → p-ed9dc5b7.entry.js} +1 -1
- package/{dist/web-components-library/p-e293f91e.entry.js → www/build/p-f0e73ccb.entry.js} +1 -1
- package/www/build/{p-223566d6.entry.js → p-f4b9f544.entry.js} +1 -1
- package/www/build/{p-710cec6d.entry.js → p-f5c3d332.entry.js} +1 -1
- package/www/build/{p-33f74396.entry.js → p-f724f7a1.entry.js} +1 -1
- package/www/build/{p-cc6a5872.entry.js → p-f77d7a3f.entry.js} +1 -1
- package/{dist/web-components-library/p-e6ac4dc4.entry.js → www/build/p-fd13128d.entry.js} +1 -1
- package/www/build/{p-a9eea65b.entry.js → p-fdb6e67b.entry.js} +1 -1
- package/www/build/web-components-library.esm.js +1 -1
- package/www/index.html +1 -1
- package/CHANGELOG.md +0 -1911
- package/dist/web-components-library/p-8cf3798f.entry.js +0 -1
- package/dist/web-components-library/p-98268a57.js +0 -1
- package/dist/web-components-library/p-a54ef821.entry.js +0 -1
- package/dist/web-components-library/p-bb20020b.entry.js +0 -1
- package/dist/web-components-library/p-d0fea19f.entry.js +0 -1
- package/dist/web-components-library/p-d79f69f2.js +0 -1
- package/dist/web-components-library/p-f6a11970.entry.js +0 -1
- package/src-react/index.ts +0 -1
- package/www/build/p-8cf3798f.entry.js +0 -1
- package/www/build/p-98268a57.js +0 -1
- package/www/build/p-9ec1421c.css +0 -816
- package/www/build/p-a54ef821.entry.js +0 -1
- package/www/build/p-bb20020b.entry.js +0 -1
- package/www/build/p-d0fea19f.entry.js +0 -1
- package/www/build/p-d1358393.js +0 -129
- package/www/build/p-d79f69f2.js +0 -1
- package/www/build/p-f6a11970.entry.js +0 -1
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
const NAMESPACE = 'web-components-library';
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* Virtual DOM patching algorithm based on Snabbdom by
|
|
5
|
+
* Simon Friis Vindum (@paldepind)
|
|
6
|
+
* Licensed under the MIT License
|
|
7
|
+
* https://github.com/snabbdom/snabbdom/blob/master/LICENSE
|
|
8
|
+
*
|
|
9
|
+
* Modified for Stencil's renderer and slot projection
|
|
10
|
+
*/
|
|
3
11
|
let scopeId;
|
|
4
12
|
let contentRef;
|
|
5
13
|
let hostTagName;
|
|
@@ -8,67 +16,6 @@ let checkSlotFallbackVisibility = false;
|
|
|
8
16
|
let checkSlotRelocate = false;
|
|
9
17
|
let isSvgMode = false;
|
|
10
18
|
let queuePending = false;
|
|
11
|
-
const win = typeof window !== 'undefined' ? window : {};
|
|
12
|
-
const doc = win.document || { head: {} };
|
|
13
|
-
const plt = {
|
|
14
|
-
$flags$: 0,
|
|
15
|
-
$resourcesUrl$: '',
|
|
16
|
-
jmp: (h) => h(),
|
|
17
|
-
raf: (h) => requestAnimationFrame(h),
|
|
18
|
-
ael: (el, eventName, listener, opts) => el.addEventListener(eventName, listener, opts),
|
|
19
|
-
rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),
|
|
20
|
-
ce: (eventName, opts) => new CustomEvent(eventName, opts),
|
|
21
|
-
};
|
|
22
|
-
const promiseResolve = (v) => Promise.resolve(v);
|
|
23
|
-
const supportsConstructibleStylesheets = /*@__PURE__*/ (() => {
|
|
24
|
-
try {
|
|
25
|
-
new CSSStyleSheet();
|
|
26
|
-
return typeof new CSSStyleSheet().replace === 'function';
|
|
27
|
-
}
|
|
28
|
-
catch (e) { }
|
|
29
|
-
return false;
|
|
30
|
-
})()
|
|
31
|
-
;
|
|
32
|
-
const addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) => {
|
|
33
|
-
if (listeners) {
|
|
34
|
-
listeners.map(([flags, name, method]) => {
|
|
35
|
-
const target = getHostListenerTarget(elm, flags) ;
|
|
36
|
-
const handler = hostListenerProxy(hostRef, method);
|
|
37
|
-
const opts = hostListenerOpts(flags);
|
|
38
|
-
plt.ael(target, name, handler, opts);
|
|
39
|
-
(hostRef.$rmListeners$ = hostRef.$rmListeners$ || []).push(() => plt.rel(target, name, handler, opts));
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
};
|
|
43
|
-
const hostListenerProxy = (hostRef, methodName) => (ev) => {
|
|
44
|
-
try {
|
|
45
|
-
{
|
|
46
|
-
if (hostRef.$flags$ & 256 /* isListenReady */) {
|
|
47
|
-
// instance is ready, let's call it's member method for this event
|
|
48
|
-
hostRef.$lazyInstance$[methodName](ev);
|
|
49
|
-
}
|
|
50
|
-
else {
|
|
51
|
-
(hostRef.$queuedListeners$ = hostRef.$queuedListeners$ || []).push([methodName, ev]);
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
catch (e) {
|
|
56
|
-
consoleError(e);
|
|
57
|
-
}
|
|
58
|
-
};
|
|
59
|
-
const getHostListenerTarget = (elm, flags) => {
|
|
60
|
-
if (flags & 4 /* TargetDocument */)
|
|
61
|
-
return doc;
|
|
62
|
-
if (flags & 8 /* TargetWindow */)
|
|
63
|
-
return win;
|
|
64
|
-
if (flags & 16 /* TargetBody */)
|
|
65
|
-
return doc.body;
|
|
66
|
-
return elm;
|
|
67
|
-
};
|
|
68
|
-
// prettier-ignore
|
|
69
|
-
const hostListenerOpts = (flags) => (flags & 2 /* Capture */) !== 0;
|
|
70
|
-
const HYDRATED_CSS = '{visibility:hidden}.hydrated{visibility:inherit}';
|
|
71
|
-
const XLINK_NS = 'http://www.w3.org/1999/xlink';
|
|
72
19
|
const createTime = (fnName, tagName = '') => {
|
|
73
20
|
{
|
|
74
21
|
return () => {
|
|
@@ -83,74 +30,8 @@ const uniqueTime = (key, measureText) => {
|
|
|
83
30
|
};
|
|
84
31
|
}
|
|
85
32
|
};
|
|
86
|
-
const
|
|
87
|
-
const
|
|
88
|
-
let style = styles.get(scopeId);
|
|
89
|
-
if (supportsConstructibleStylesheets && allowCS) {
|
|
90
|
-
style = (style || new CSSStyleSheet());
|
|
91
|
-
style.replace(cssText);
|
|
92
|
-
}
|
|
93
|
-
else {
|
|
94
|
-
style = cssText;
|
|
95
|
-
}
|
|
96
|
-
styles.set(scopeId, style);
|
|
97
|
-
};
|
|
98
|
-
const addStyle = (styleContainerNode, cmpMeta, mode, hostElm) => {
|
|
99
|
-
let scopeId = getScopeId(cmpMeta);
|
|
100
|
-
let style = styles.get(scopeId);
|
|
101
|
-
// if an element is NOT connected then getRootNode() will return the wrong root node
|
|
102
|
-
// so the fallback is to always use the document for the root node in those cases
|
|
103
|
-
styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : doc;
|
|
104
|
-
if (style) {
|
|
105
|
-
if (typeof style === 'string') {
|
|
106
|
-
styleContainerNode = styleContainerNode.head || styleContainerNode;
|
|
107
|
-
let appliedStyles = rootAppliedStyles.get(styleContainerNode);
|
|
108
|
-
let styleElm;
|
|
109
|
-
if (!appliedStyles) {
|
|
110
|
-
rootAppliedStyles.set(styleContainerNode, (appliedStyles = new Set()));
|
|
111
|
-
}
|
|
112
|
-
if (!appliedStyles.has(scopeId)) {
|
|
113
|
-
{
|
|
114
|
-
{
|
|
115
|
-
styleElm = doc.createElement('style');
|
|
116
|
-
styleElm.innerHTML = style;
|
|
117
|
-
}
|
|
118
|
-
styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector('link'));
|
|
119
|
-
}
|
|
120
|
-
if (appliedStyles) {
|
|
121
|
-
appliedStyles.add(scopeId);
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
else if (!styleContainerNode.adoptedStyleSheets.includes(style)) {
|
|
126
|
-
styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
return scopeId;
|
|
130
|
-
};
|
|
131
|
-
const attachStyles = (hostRef) => {
|
|
132
|
-
const cmpMeta = hostRef.$cmpMeta$;
|
|
133
|
-
const elm = hostRef.$hostElement$;
|
|
134
|
-
const flags = cmpMeta.$flags$;
|
|
135
|
-
const endAttachStyles = createTime('attachStyles', cmpMeta.$tagName$);
|
|
136
|
-
const scopeId = addStyle(elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(), cmpMeta);
|
|
137
|
-
if (flags & 10 /* needsScopedEncapsulation */) {
|
|
138
|
-
// only required when we're NOT using native shadow dom (slot)
|
|
139
|
-
// or this browser doesn't support native shadow dom
|
|
140
|
-
// and this host element was NOT created with SSR
|
|
141
|
-
// let's pick out the inner content for slot projection
|
|
142
|
-
// create a node to represent where the original
|
|
143
|
-
// content was first placed, which is useful later on
|
|
144
|
-
// DOM WRITE!!
|
|
145
|
-
elm['s-sc'] = scopeId;
|
|
146
|
-
elm.classList.add(scopeId + '-h');
|
|
147
|
-
if (flags & 2 /* scopedCssEncapsulation */) {
|
|
148
|
-
elm.classList.add(scopeId + '-s');
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
endAttachStyles();
|
|
152
|
-
};
|
|
153
|
-
const getScopeId = (cmp, mode) => 'sc-' + (cmp.$tagName$);
|
|
33
|
+
const HYDRATED_CSS = '{visibility:hidden}.hydrated{visibility:inherit}';
|
|
34
|
+
const XLINK_NS = 'http://www.w3.org/1999/xlink';
|
|
154
35
|
/**
|
|
155
36
|
* Default style mode id
|
|
156
37
|
*/
|
|
@@ -187,7 +68,7 @@ const h = (nodeName, vnodeData, ...children) => {
|
|
|
187
68
|
let slotName = null;
|
|
188
69
|
let simple = false;
|
|
189
70
|
let lastSimple = false;
|
|
190
|
-
|
|
71
|
+
const vNodeChildren = [];
|
|
191
72
|
const walk = (c) => {
|
|
192
73
|
for (let i = 0; i < c.length; i++) {
|
|
193
74
|
child = c[i];
|
|
@@ -265,6 +146,152 @@ const newVNode = (tag, text) => {
|
|
|
265
146
|
};
|
|
266
147
|
const Host = {};
|
|
267
148
|
const isHost = (node) => node && node.$tag$ === Host;
|
|
149
|
+
/**
|
|
150
|
+
* Parse a new property value for a given property type.
|
|
151
|
+
*
|
|
152
|
+
* While the prop value can reasonably be expected to be of `any` type as far as TypeScript's type checker is concerned,
|
|
153
|
+
* it is not safe to assume that the string returned by evaluating `typeof propValue` matches:
|
|
154
|
+
* 1. `any`, the type given to `propValue` in the function signature
|
|
155
|
+
* 2. the type stored from `propType`.
|
|
156
|
+
*
|
|
157
|
+
* This function provides the capability to parse/coerce a property's value to potentially any other JavaScript type.
|
|
158
|
+
*
|
|
159
|
+
* Property values represented in TSX preserve their type information. In the example below, the number 0 is passed to
|
|
160
|
+
* a component. This `propValue` will preserve its type information (`typeof propValue === 'number'`). Note that is
|
|
161
|
+
* based on the type of the value being passed in, not the type declared of the class member decorated with `@Prop`.
|
|
162
|
+
* ```tsx
|
|
163
|
+
* <my-cmp prop-val={0}></my-cmp>
|
|
164
|
+
* ```
|
|
165
|
+
*
|
|
166
|
+
* HTML prop values on the other hand, will always a string
|
|
167
|
+
*
|
|
168
|
+
* @param propValue the new value to coerce to some type
|
|
169
|
+
* @param propType the type of the prop, expressed as a binary number
|
|
170
|
+
* @returns the parsed/coerced value
|
|
171
|
+
*/
|
|
172
|
+
const parsePropertyValue = (propValue, propType) => {
|
|
173
|
+
// ensure this value is of the correct prop type
|
|
174
|
+
if (propValue != null && !isComplexType(propValue)) {
|
|
175
|
+
if (propType & 4 /* MEMBER_FLAGS.Boolean */) {
|
|
176
|
+
// per the HTML spec, any string value means it is a boolean true value
|
|
177
|
+
// but we'll cheat here and say that the string "false" is the boolean false
|
|
178
|
+
return propValue === 'false' ? false : propValue === '' || !!propValue;
|
|
179
|
+
}
|
|
180
|
+
if (propType & 2 /* MEMBER_FLAGS.Number */) {
|
|
181
|
+
// force it to be a number
|
|
182
|
+
return parseFloat(propValue);
|
|
183
|
+
}
|
|
184
|
+
if (propType & 1 /* MEMBER_FLAGS.String */) {
|
|
185
|
+
// could have been passed as a number or boolean
|
|
186
|
+
// but we still want it as a string
|
|
187
|
+
return String(propValue);
|
|
188
|
+
}
|
|
189
|
+
// redundant return here for better minification
|
|
190
|
+
return propValue;
|
|
191
|
+
}
|
|
192
|
+
// not sure exactly what type we want
|
|
193
|
+
// so no need to change to a different type
|
|
194
|
+
return propValue;
|
|
195
|
+
};
|
|
196
|
+
const getElement = (ref) => (getHostRef(ref).$hostElement$ );
|
|
197
|
+
const createEvent = (ref, name, flags) => {
|
|
198
|
+
const elm = getElement(ref);
|
|
199
|
+
return {
|
|
200
|
+
emit: (detail) => {
|
|
201
|
+
return emitEvent(elm, name, {
|
|
202
|
+
bubbles: !!(flags & 4 /* EVENT_FLAGS.Bubbles */),
|
|
203
|
+
composed: !!(flags & 2 /* EVENT_FLAGS.Composed */),
|
|
204
|
+
cancelable: !!(flags & 1 /* EVENT_FLAGS.Cancellable */),
|
|
205
|
+
detail,
|
|
206
|
+
});
|
|
207
|
+
},
|
|
208
|
+
};
|
|
209
|
+
};
|
|
210
|
+
/**
|
|
211
|
+
* Helper function to create & dispatch a custom Event on a provided target
|
|
212
|
+
* @param elm the target of the Event
|
|
213
|
+
* @param name the name to give the custom Event
|
|
214
|
+
* @param opts options for configuring a custom Event
|
|
215
|
+
* @returns the custom Event
|
|
216
|
+
*/
|
|
217
|
+
const emitEvent = (elm, name, opts) => {
|
|
218
|
+
const ev = plt.ce(name, opts);
|
|
219
|
+
elm.dispatchEvent(ev);
|
|
220
|
+
return ev;
|
|
221
|
+
};
|
|
222
|
+
const rootAppliedStyles = /*@__PURE__*/ new WeakMap();
|
|
223
|
+
const registerStyle = (scopeId, cssText, allowCS) => {
|
|
224
|
+
let style = styles.get(scopeId);
|
|
225
|
+
if (supportsConstructableStylesheets && allowCS) {
|
|
226
|
+
style = (style || new CSSStyleSheet());
|
|
227
|
+
if (typeof style === 'string') {
|
|
228
|
+
style = cssText;
|
|
229
|
+
}
|
|
230
|
+
else {
|
|
231
|
+
style.replaceSync(cssText);
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
else {
|
|
235
|
+
style = cssText;
|
|
236
|
+
}
|
|
237
|
+
styles.set(scopeId, style);
|
|
238
|
+
};
|
|
239
|
+
const addStyle = (styleContainerNode, cmpMeta, mode, hostElm) => {
|
|
240
|
+
let scopeId = getScopeId(cmpMeta);
|
|
241
|
+
const style = styles.get(scopeId);
|
|
242
|
+
// if an element is NOT connected then getRootNode() will return the wrong root node
|
|
243
|
+
// so the fallback is to always use the document for the root node in those cases
|
|
244
|
+
styleContainerNode = styleContainerNode.nodeType === 11 /* NODE_TYPE.DocumentFragment */ ? styleContainerNode : doc;
|
|
245
|
+
if (style) {
|
|
246
|
+
if (typeof style === 'string') {
|
|
247
|
+
styleContainerNode = styleContainerNode.head || styleContainerNode;
|
|
248
|
+
let appliedStyles = rootAppliedStyles.get(styleContainerNode);
|
|
249
|
+
let styleElm;
|
|
250
|
+
if (!appliedStyles) {
|
|
251
|
+
rootAppliedStyles.set(styleContainerNode, (appliedStyles = new Set()));
|
|
252
|
+
}
|
|
253
|
+
if (!appliedStyles.has(scopeId)) {
|
|
254
|
+
{
|
|
255
|
+
{
|
|
256
|
+
styleElm = doc.createElement('style');
|
|
257
|
+
styleElm.innerHTML = style;
|
|
258
|
+
}
|
|
259
|
+
styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector('link'));
|
|
260
|
+
}
|
|
261
|
+
if (appliedStyles) {
|
|
262
|
+
appliedStyles.add(scopeId);
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
else if (!styleContainerNode.adoptedStyleSheets.includes(style)) {
|
|
267
|
+
styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
return scopeId;
|
|
271
|
+
};
|
|
272
|
+
const attachStyles = (hostRef) => {
|
|
273
|
+
const cmpMeta = hostRef.$cmpMeta$;
|
|
274
|
+
const elm = hostRef.$hostElement$;
|
|
275
|
+
const flags = cmpMeta.$flags$;
|
|
276
|
+
const endAttachStyles = createTime('attachStyles', cmpMeta.$tagName$);
|
|
277
|
+
const scopeId = addStyle(elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(), cmpMeta);
|
|
278
|
+
if (flags & 10 /* CMP_FLAGS.needsScopedEncapsulation */) {
|
|
279
|
+
// only required when we're NOT using native shadow dom (slot)
|
|
280
|
+
// or this browser doesn't support native shadow dom
|
|
281
|
+
// and this host element was NOT created with SSR
|
|
282
|
+
// let's pick out the inner content for slot projection
|
|
283
|
+
// create a node to represent where the original
|
|
284
|
+
// content was first placed, which is useful later on
|
|
285
|
+
// DOM WRITE!!
|
|
286
|
+
elm['s-sc'] = scopeId;
|
|
287
|
+
elm.classList.add(scopeId + '-h');
|
|
288
|
+
if (flags & 2 /* CMP_FLAGS.scopedCssEncapsulation */) {
|
|
289
|
+
elm.classList.add(scopeId + '-s');
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
endAttachStyles();
|
|
293
|
+
};
|
|
294
|
+
const getScopeId = (cmp, mode) => 'sc-' + (cmp.$tagName$);
|
|
268
295
|
/**
|
|
269
296
|
* Production setAccessor() function based on Preact by
|
|
270
297
|
* Jason Miller (@developit)
|
|
@@ -362,7 +389,7 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
362
389
|
if ((isProp || (isComplex && newValue !== null)) && !isSvg) {
|
|
363
390
|
try {
|
|
364
391
|
if (!elm.tagName.includes('-')) {
|
|
365
|
-
|
|
392
|
+
const n = newValue == null ? '' : newValue;
|
|
366
393
|
// Workaround for Safari, moving the <input> caret when re-assigning the same valued
|
|
367
394
|
if (memberName === 'list') {
|
|
368
395
|
isProp = false;
|
|
@@ -401,7 +428,7 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
401
428
|
}
|
|
402
429
|
}
|
|
403
430
|
}
|
|
404
|
-
else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex) {
|
|
431
|
+
else if ((!isProp || flags & 4 /* VNODE_FLAGS.isHost */ || isSvg) && !isComplex) {
|
|
405
432
|
newValue = newValue === true ? '' : newValue;
|
|
406
433
|
if (xlink) {
|
|
407
434
|
elm.setAttributeNS(XLINK_NS, memberName, newValue);
|
|
@@ -419,7 +446,7 @@ const updateElement = (oldVnode, newVnode, isSvgMode, memberName) => {
|
|
|
419
446
|
// if the element passed in is a shadow root, which is a document fragment
|
|
420
447
|
// then we want to be adding attrs/props to the shadow root's "host" element
|
|
421
448
|
// if it's not a shadow root, then we add attrs/props to the same element
|
|
422
|
-
const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host
|
|
449
|
+
const elm = newVnode.$elm$.nodeType === 11 /* NODE_TYPE.DocumentFragment */ && newVnode.$elm$.host
|
|
423
450
|
? newVnode.$elm$.host
|
|
424
451
|
: newVnode.$elm$;
|
|
425
452
|
const oldVnodeAttrs = (oldVnode && oldVnode.$attrs$) || EMPTY_OBJ;
|
|
@@ -437,9 +464,19 @@ const updateElement = (oldVnode, newVnode, isSvgMode, memberName) => {
|
|
|
437
464
|
setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName], isSvgMode, newVnode.$flags$);
|
|
438
465
|
}
|
|
439
466
|
};
|
|
467
|
+
/**
|
|
468
|
+
* Create a DOM Node corresponding to one of the children of a given VNode.
|
|
469
|
+
*
|
|
470
|
+
* @param oldParentVNode the parent VNode from the previous render
|
|
471
|
+
* @param newParentVNode the parent VNode from the current render
|
|
472
|
+
* @param childIndex the index of the VNode, in the _new_ parent node's
|
|
473
|
+
* children, for which we will create a new DOM node
|
|
474
|
+
* @param parentElm the parent DOM node which our new node will be a child of
|
|
475
|
+
* @returns the newly created node
|
|
476
|
+
*/
|
|
440
477
|
const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
441
478
|
// tslint:disable-next-line: prefer-const
|
|
442
|
-
|
|
479
|
+
const newVNode = newParentVNode.$children$[childIndex];
|
|
443
480
|
let i = 0;
|
|
444
481
|
let elm;
|
|
445
482
|
let childNode;
|
|
@@ -454,16 +491,16 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
454
491
|
}
|
|
455
492
|
newVNode.$flags$ |= newVNode.$children$
|
|
456
493
|
? // slot element has fallback content
|
|
457
|
-
2 /* isSlotFallback */
|
|
494
|
+
2 /* VNODE_FLAGS.isSlotFallback */
|
|
458
495
|
: // slot element does not have fallback content
|
|
459
|
-
1 /* isSlotReference */;
|
|
496
|
+
1 /* VNODE_FLAGS.isSlotReference */;
|
|
460
497
|
}
|
|
461
498
|
}
|
|
462
499
|
if (newVNode.$text$ !== null) {
|
|
463
500
|
// create text node
|
|
464
501
|
elm = newVNode.$elm$ = doc.createTextNode(newVNode.$text$);
|
|
465
502
|
}
|
|
466
|
-
else if (newVNode.$flags$ & 1 /* isSlotReference */) {
|
|
503
|
+
else if (newVNode.$flags$ & 1 /* VNODE_FLAGS.isSlotReference */) {
|
|
467
504
|
// create a slot reference node
|
|
468
505
|
elm = newVNode.$elm$ =
|
|
469
506
|
doc.createTextNode('');
|
|
@@ -473,7 +510,7 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
473
510
|
isSvgMode = newVNode.$tag$ === 'svg';
|
|
474
511
|
}
|
|
475
512
|
// create element
|
|
476
|
-
elm = newVNode.$elm$ = (doc.createElementNS(isSvgMode ? SVG_NS : HTML_NS, newVNode.$flags$ & 2 /* isSlotFallback */
|
|
513
|
+
elm = newVNode.$elm$ = (doc.createElementNS(isSvgMode ? SVG_NS : HTML_NS, newVNode.$flags$ & 2 /* VNODE_FLAGS.isSlotFallback */
|
|
477
514
|
? 'slot-fb'
|
|
478
515
|
: newVNode.$tag$)
|
|
479
516
|
);
|
|
@@ -513,7 +550,7 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
513
550
|
}
|
|
514
551
|
{
|
|
515
552
|
elm['s-hn'] = hostTagName;
|
|
516
|
-
if (newVNode.$flags$ & (2 /* isSlotFallback */ | 1 /* isSlotReference */)) {
|
|
553
|
+
if (newVNode.$flags$ & (2 /* VNODE_FLAGS.isSlotFallback */ | 1 /* VNODE_FLAGS.isSlotReference */)) {
|
|
517
554
|
// remember the content reference comment
|
|
518
555
|
elm['s-sr'] = true;
|
|
519
556
|
// remember the content reference comment
|
|
@@ -532,7 +569,7 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
532
569
|
return elm;
|
|
533
570
|
};
|
|
534
571
|
const putBackInOriginalLocation = (parentElm, recursive) => {
|
|
535
|
-
plt.$flags$ |= 1 /* isTmpDisconnected */;
|
|
572
|
+
plt.$flags$ |= 1 /* PLATFORM_FLAGS.isTmpDisconnected */;
|
|
536
573
|
const oldSlotChildNodes = parentElm.childNodes;
|
|
537
574
|
for (let i = oldSlotChildNodes.length - 1; i >= 0; i--) {
|
|
538
575
|
const childNode = oldSlotChildNodes[i];
|
|
@@ -553,7 +590,7 @@ const putBackInOriginalLocation = (parentElm, recursive) => {
|
|
|
553
590
|
putBackInOriginalLocation(childNode, recursive);
|
|
554
591
|
}
|
|
555
592
|
}
|
|
556
|
-
plt.$flags$ &= ~1 /* isTmpDisconnected */;
|
|
593
|
+
plt.$flags$ &= ~1 /* PLATFORM_FLAGS.isTmpDisconnected */;
|
|
557
594
|
};
|
|
558
595
|
const addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
|
|
559
596
|
let containerElm = ((parentElm['s-cr'] && parentElm['s-cr'].parentNode) || parentElm);
|
|
@@ -595,6 +632,74 @@ const removeVnodes = (vnodes, startIdx, endIdx, vnode, elm) => {
|
|
|
595
632
|
}
|
|
596
633
|
}
|
|
597
634
|
};
|
|
635
|
+
/**
|
|
636
|
+
* Reconcile the children of a new VNode with the children of an old VNode by
|
|
637
|
+
* traversing the two collections of children, identifying nodes that are
|
|
638
|
+
* conserved or changed, calling out to `patch` to make any necessary
|
|
639
|
+
* updates to the DOM, and rearranging DOM nodes as needed.
|
|
640
|
+
*
|
|
641
|
+
* The algorithm for reconciling children works by analyzing two 'windows' onto
|
|
642
|
+
* the two arrays of children (`oldCh` and `newCh`). We keep track of the
|
|
643
|
+
* 'windows' by storing start and end indices and references to the
|
|
644
|
+
* corresponding array entries. Initially the two 'windows' are basically equal
|
|
645
|
+
* to the entire array, but we progressively narrow the windows until there are
|
|
646
|
+
* no children left to update by doing the following:
|
|
647
|
+
*
|
|
648
|
+
* 1. Skip any `null` entries at the beginning or end of the two arrays, so
|
|
649
|
+
* that if we have an initial array like the following we'll end up dealing
|
|
650
|
+
* only with a window bounded by the highlighted elements:
|
|
651
|
+
*
|
|
652
|
+
* [null, null, VNode1 , ... , VNode2, null, null]
|
|
653
|
+
* ^^^^^^ ^^^^^^
|
|
654
|
+
*
|
|
655
|
+
* 2. Check to see if the elements at the head and tail positions are equal
|
|
656
|
+
* across the windows. This will basically detect elements which haven't
|
|
657
|
+
* been added, removed, or changed position, i.e. if you had the following
|
|
658
|
+
* VNode elements (represented as HTML):
|
|
659
|
+
*
|
|
660
|
+
* oldVNode: `<div><p><span>HEY</span></p></div>`
|
|
661
|
+
* newVNode: `<div><p><span>THERE</span></p></div>`
|
|
662
|
+
*
|
|
663
|
+
* Then when comparing the children of the `<div>` tag we check the equality
|
|
664
|
+
* of the VNodes corresponding to the `<p>` tags and, since they are the
|
|
665
|
+
* same tag in the same position, we'd be able to avoid completely
|
|
666
|
+
* re-rendering the subtree under them with a new DOM element and would just
|
|
667
|
+
* call out to `patch` to handle reconciling their children and so on.
|
|
668
|
+
*
|
|
669
|
+
* 3. Check, for both windows, to see if the element at the beginning of the
|
|
670
|
+
* window corresponds to the element at the end of the other window. This is
|
|
671
|
+
* a heuristic which will let us identify _some_ situations in which
|
|
672
|
+
* elements have changed position, for instance it _should_ detect that the
|
|
673
|
+
* children nodes themselves have not changed but merely moved in the
|
|
674
|
+
* following example:
|
|
675
|
+
*
|
|
676
|
+
* oldVNode: `<div><element-one /><element-two /></div>`
|
|
677
|
+
* newVNode: `<div><element-two /><element-one /></div>`
|
|
678
|
+
*
|
|
679
|
+
* If we find cases like this then we also need to move the concrete DOM
|
|
680
|
+
* elements corresponding to the moved children to write the re-order to the
|
|
681
|
+
* DOM.
|
|
682
|
+
*
|
|
683
|
+
* 4. Finally, if VNodes have the `key` attribute set on them we check for any
|
|
684
|
+
* nodes in the old children which have the same key as the first element in
|
|
685
|
+
* our window on the new children. If we find such a node we handle calling
|
|
686
|
+
* out to `patch`, moving relevant DOM nodes, and so on, in accordance with
|
|
687
|
+
* what we find.
|
|
688
|
+
*
|
|
689
|
+
* Finally, once we've narrowed our 'windows' to the point that either of them
|
|
690
|
+
* collapse (i.e. they have length 0) we then handle any remaining VNode
|
|
691
|
+
* insertion or deletion that needs to happen to get a DOM state that correctly
|
|
692
|
+
* reflects the new child VNodes. If, for instance, after our window on the old
|
|
693
|
+
* children has collapsed we still have more nodes on the new children that
|
|
694
|
+
* we haven't dealt with yet then we need to add them, or if the new children
|
|
695
|
+
* collapse but we still have unhandled _old_ children then we need to make
|
|
696
|
+
* sure the corresponding DOM nodes are removed.
|
|
697
|
+
*
|
|
698
|
+
* @param parentElm the node into which the parent VNode is rendered
|
|
699
|
+
* @param oldCh the old children of the parent node
|
|
700
|
+
* @param newVNode the new VNode which will replace the parent
|
|
701
|
+
* @param newCh the new children of the parent node
|
|
702
|
+
*/
|
|
598
703
|
const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
599
704
|
let oldStartIdx = 0;
|
|
600
705
|
let newStartIdx = 0;
|
|
@@ -610,7 +715,7 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
|
610
715
|
let elmToMove;
|
|
611
716
|
while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {
|
|
612
717
|
if (oldStartVnode == null) {
|
|
613
|
-
//
|
|
718
|
+
// VNode might have been moved left
|
|
614
719
|
oldStartVnode = oldCh[++oldStartIdx];
|
|
615
720
|
}
|
|
616
721
|
else if (oldEndVnode == null) {
|
|
@@ -623,37 +728,100 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
|
623
728
|
newEndVnode = newCh[--newEndIdx];
|
|
624
729
|
}
|
|
625
730
|
else if (isSameVnode(oldStartVnode, newStartVnode)) {
|
|
731
|
+
// if the start nodes are the same then we should patch the new VNode
|
|
732
|
+
// onto the old one, and increment our `newStartIdx` and `oldStartIdx`
|
|
733
|
+
// indices to reflect that. We don't need to move any DOM Nodes around
|
|
734
|
+
// since things are matched up in order.
|
|
626
735
|
patch(oldStartVnode, newStartVnode);
|
|
627
736
|
oldStartVnode = oldCh[++oldStartIdx];
|
|
628
737
|
newStartVnode = newCh[++newStartIdx];
|
|
629
738
|
}
|
|
630
739
|
else if (isSameVnode(oldEndVnode, newEndVnode)) {
|
|
740
|
+
// likewise, if the end nodes are the same we patch new onto old and
|
|
741
|
+
// decrement our end indices, and also likewise in this case we don't
|
|
742
|
+
// need to move any DOM Nodes.
|
|
631
743
|
patch(oldEndVnode, newEndVnode);
|
|
632
744
|
oldEndVnode = oldCh[--oldEndIdx];
|
|
633
745
|
newEndVnode = newCh[--newEndIdx];
|
|
634
746
|
}
|
|
635
747
|
else if (isSameVnode(oldStartVnode, newEndVnode)) {
|
|
636
|
-
// Vnode moved right
|
|
748
|
+
// case: "Vnode moved right"
|
|
749
|
+
//
|
|
750
|
+
// We've found that the last node in our window on the new children is
|
|
751
|
+
// the same VNode as the _first_ node in our window on the old children
|
|
752
|
+
// we're dealing with now. Visually, this is the layout of these two
|
|
753
|
+
// nodes:
|
|
754
|
+
//
|
|
755
|
+
// newCh: [..., newStartVnode , ... , newEndVnode , ...]
|
|
756
|
+
// ^^^^^^^^^^^
|
|
757
|
+
// oldCh: [..., oldStartVnode , ... , oldEndVnode , ...]
|
|
758
|
+
// ^^^^^^^^^^^^^
|
|
759
|
+
//
|
|
760
|
+
// In this situation we need to patch `newEndVnode` onto `oldStartVnode`
|
|
761
|
+
// and move the DOM element for `oldStartVnode`.
|
|
637
762
|
if ((oldStartVnode.$tag$ === 'slot' || newEndVnode.$tag$ === 'slot')) {
|
|
638
763
|
putBackInOriginalLocation(oldStartVnode.$elm$.parentNode, false);
|
|
639
764
|
}
|
|
640
765
|
patch(oldStartVnode, newEndVnode);
|
|
766
|
+
// We need to move the element for `oldStartVnode` into a position which
|
|
767
|
+
// will be appropriate for `newEndVnode`. For this we can use
|
|
768
|
+
// `.insertBefore` and `oldEndVnode.$elm$.nextSibling`. If there is a
|
|
769
|
+
// sibling for `oldEndVnode.$elm$` then we want to move the DOM node for
|
|
770
|
+
// `oldStartVnode` between `oldEndVnode` and it's sibling, like so:
|
|
771
|
+
//
|
|
772
|
+
// <old-start-node />
|
|
773
|
+
// <some-intervening-node />
|
|
774
|
+
// <old-end-node />
|
|
775
|
+
// <!-- -> <-- `oldStartVnode.$elm$` should be inserted here
|
|
776
|
+
// <next-sibling />
|
|
777
|
+
//
|
|
778
|
+
// If instead `oldEndVnode.$elm$` has no sibling then we just want to put
|
|
779
|
+
// the node for `oldStartVnode` at the end of the children of
|
|
780
|
+
// `parentElm`. Luckily, `Node.nextSibling` will return `null` if there
|
|
781
|
+
// aren't any siblings, and passing `null` to `Node.insertBefore` will
|
|
782
|
+
// append it to the children of the parent element.
|
|
641
783
|
parentElm.insertBefore(oldStartVnode.$elm$, oldEndVnode.$elm$.nextSibling);
|
|
642
784
|
oldStartVnode = oldCh[++oldStartIdx];
|
|
643
785
|
newEndVnode = newCh[--newEndIdx];
|
|
644
786
|
}
|
|
645
787
|
else if (isSameVnode(oldEndVnode, newStartVnode)) {
|
|
646
|
-
// Vnode moved left
|
|
788
|
+
// case: "Vnode moved left"
|
|
789
|
+
//
|
|
790
|
+
// We've found that the first node in our window on the new children is
|
|
791
|
+
// the same VNode as the _last_ node in our window on the old children.
|
|
792
|
+
// Visually, this is the layout of these two nodes:
|
|
793
|
+
//
|
|
794
|
+
// newCh: [..., newStartVnode , ... , newEndVnode , ...]
|
|
795
|
+
// ^^^^^^^^^^^^^
|
|
796
|
+
// oldCh: [..., oldStartVnode , ... , oldEndVnode , ...]
|
|
797
|
+
// ^^^^^^^^^^^
|
|
798
|
+
//
|
|
799
|
+
// In this situation we need to patch `newStartVnode` onto `oldEndVnode`
|
|
800
|
+
// (which will handle updating any changed attributes, reconciling their
|
|
801
|
+
// children etc) but we also need to move the DOM node to which
|
|
802
|
+
// `oldEndVnode` corresponds.
|
|
647
803
|
if ((oldStartVnode.$tag$ === 'slot' || newEndVnode.$tag$ === 'slot')) {
|
|
648
804
|
putBackInOriginalLocation(oldEndVnode.$elm$.parentNode, false);
|
|
649
805
|
}
|
|
650
806
|
patch(oldEndVnode, newStartVnode);
|
|
807
|
+
// We've already checked above if `oldStartVnode` and `newStartVnode` are
|
|
808
|
+
// the same node, so since we're here we know that they are not. Thus we
|
|
809
|
+
// can move the element for `oldEndVnode` _before_ the element for
|
|
810
|
+
// `oldStartVnode`, leaving `oldStartVnode` to be reconciled in the
|
|
811
|
+
// future.
|
|
651
812
|
parentElm.insertBefore(oldEndVnode.$elm$, oldStartVnode.$elm$);
|
|
652
813
|
oldEndVnode = oldCh[--oldEndIdx];
|
|
653
814
|
newStartVnode = newCh[++newStartIdx];
|
|
654
815
|
}
|
|
655
816
|
else {
|
|
656
|
-
//
|
|
817
|
+
// Here we do some checks to match up old and new nodes based on the
|
|
818
|
+
// `$key$` attribute, which is set by putting a `key="my-key"` attribute
|
|
819
|
+
// in the JSX for a DOM element in the implementation of a Stencil
|
|
820
|
+
// component.
|
|
821
|
+
//
|
|
822
|
+
// First we check to see if there are any nodes in the array of old
|
|
823
|
+
// children which have the same key as the first node in the new
|
|
824
|
+
// children.
|
|
657
825
|
idxInOld = -1;
|
|
658
826
|
{
|
|
659
827
|
for (i = oldStartIdx; i <= oldEndIdx; ++i) {
|
|
@@ -664,23 +832,32 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
|
664
832
|
}
|
|
665
833
|
}
|
|
666
834
|
if (idxInOld >= 0) {
|
|
835
|
+
// We found a node in the old children which matches up with the first
|
|
836
|
+
// node in the new children! So let's deal with that
|
|
667
837
|
elmToMove = oldCh[idxInOld];
|
|
668
838
|
if (elmToMove.$tag$ !== newStartVnode.$tag$) {
|
|
839
|
+
// the tag doesn't match so we'll need a new DOM element
|
|
669
840
|
node = createElm(oldCh && oldCh[newStartIdx], newVNode, idxInOld, parentElm);
|
|
670
841
|
}
|
|
671
842
|
else {
|
|
672
843
|
patch(elmToMove, newStartVnode);
|
|
844
|
+
// invalidate the matching old node so that we won't try to update it
|
|
845
|
+
// again later on
|
|
673
846
|
oldCh[idxInOld] = undefined;
|
|
674
847
|
node = elmToMove.$elm$;
|
|
675
848
|
}
|
|
676
849
|
newStartVnode = newCh[++newStartIdx];
|
|
677
850
|
}
|
|
678
851
|
else {
|
|
679
|
-
//
|
|
852
|
+
// We either didn't find an element in the old children that matches
|
|
853
|
+
// the key of the first new child OR the build is not using `key`
|
|
854
|
+
// attributes at all. In either case we need to create a new element
|
|
855
|
+
// for the new node.
|
|
680
856
|
node = createElm(oldCh && oldCh[newStartIdx], newVNode, newStartIdx, parentElm);
|
|
681
857
|
newStartVnode = newCh[++newStartIdx];
|
|
682
858
|
}
|
|
683
859
|
if (node) {
|
|
860
|
+
// if we created a new node then handle inserting it to the DOM
|
|
684
861
|
{
|
|
685
862
|
parentReferenceNode(oldStartVnode.$elm$).insertBefore(node, referenceNode(oldStartVnode.$elm$));
|
|
686
863
|
}
|
|
@@ -688,21 +865,43 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
|
688
865
|
}
|
|
689
866
|
}
|
|
690
867
|
if (oldStartIdx > oldEndIdx) {
|
|
868
|
+
// we have some more new nodes to add which don't match up with old nodes
|
|
691
869
|
addVnodes(parentElm, newCh[newEndIdx + 1] == null ? null : newCh[newEndIdx + 1].$elm$, newVNode, newCh, newStartIdx, newEndIdx);
|
|
692
870
|
}
|
|
693
871
|
else if (newStartIdx > newEndIdx) {
|
|
872
|
+
// there are nodes in the `oldCh` array which no longer correspond to nodes
|
|
873
|
+
// in the new array, so lets remove them (which entails cleaning up the
|
|
874
|
+
// relevant DOM nodes)
|
|
694
875
|
removeVnodes(oldCh, oldStartIdx, oldEndIdx);
|
|
695
876
|
}
|
|
696
877
|
};
|
|
697
|
-
|
|
878
|
+
/**
|
|
879
|
+
* Compare two VNodes to determine if they are the same
|
|
880
|
+
*
|
|
881
|
+
* **NB**: This function is an equality _heuristic_ based on the available
|
|
882
|
+
* information set on the two VNodes and can be misleading under certain
|
|
883
|
+
* circumstances. In particular, if the two nodes do not have `key` attrs
|
|
884
|
+
* (available under `$key$` on VNodes) then the function falls back on merely
|
|
885
|
+
* checking that they have the same tag.
|
|
886
|
+
*
|
|
887
|
+
* So, in other words, if `key` attrs are not set on VNodes which may be
|
|
888
|
+
* changing order within a `children` array or something along those lines then
|
|
889
|
+
* we could obtain a false positive and then have to do needless re-rendering.
|
|
890
|
+
*
|
|
891
|
+
* @param leftVNode the first VNode to check
|
|
892
|
+
* @param rightVNode the second VNode to check
|
|
893
|
+
* @returns whether they're equal or not
|
|
894
|
+
*/
|
|
895
|
+
const isSameVnode = (leftVNode, rightVNode) => {
|
|
698
896
|
// compare if two vnode to see if they're "technically" the same
|
|
699
897
|
// need to have the same element tag, and same key to be the same
|
|
700
|
-
if (
|
|
701
|
-
if (
|
|
702
|
-
return
|
|
898
|
+
if (leftVNode.$tag$ === rightVNode.$tag$) {
|
|
899
|
+
if (leftVNode.$tag$ === 'slot') {
|
|
900
|
+
return leftVNode.$name$ === rightVNode.$name$;
|
|
703
901
|
}
|
|
902
|
+
// this will be set if components in the build have `key` attrs set on them
|
|
704
903
|
{
|
|
705
|
-
return
|
|
904
|
+
return leftVNode.$key$ === rightVNode.$key$;
|
|
706
905
|
}
|
|
707
906
|
}
|
|
708
907
|
return false;
|
|
@@ -715,6 +914,14 @@ const referenceNode = (node) => {
|
|
|
715
914
|
return (node && node['s-ol']) || node;
|
|
716
915
|
};
|
|
717
916
|
const parentReferenceNode = (node) => (node['s-ol'] ? node['s-ol'] : node).parentNode;
|
|
917
|
+
/**
|
|
918
|
+
* Handle reconciling an outdated VNode with a new one which corresponds to
|
|
919
|
+
* it. This function handles flushing updates to the DOM and reconciling the
|
|
920
|
+
* children of the two nodes (if any).
|
|
921
|
+
*
|
|
922
|
+
* @param oldVNode an old VNode whose DOM element and children we want to update
|
|
923
|
+
* @param newVNode a new VNode representing an updated version of the old one
|
|
924
|
+
*/
|
|
718
925
|
const patch = (oldVNode, newVNode) => {
|
|
719
926
|
const elm = (newVNode.$elm$ = oldVNode.$elm$);
|
|
720
927
|
const oldChildren = oldVNode.$children$;
|
|
@@ -728,7 +935,6 @@ const patch = (oldVNode, newVNode) => {
|
|
|
728
935
|
// only add this to the when the compiler sees we're using an svg somewhere
|
|
729
936
|
isSvgMode = tag === 'svg' ? true : tag === 'foreignObject' ? false : isSvgMode;
|
|
730
937
|
}
|
|
731
|
-
// element node
|
|
732
938
|
{
|
|
733
939
|
if (tag === 'slot')
|
|
734
940
|
;
|
|
@@ -741,6 +947,7 @@ const patch = (oldVNode, newVNode) => {
|
|
|
741
947
|
}
|
|
742
948
|
if (oldChildren !== null && newChildren !== null) {
|
|
743
949
|
// looks like there's child vnodes for both the old and new vnodes
|
|
950
|
+
// so we need to call `updateChildren` to reconcile them
|
|
744
951
|
updateChildren(elm, oldChildren, newVNode, newChildren);
|
|
745
952
|
}
|
|
746
953
|
else if (newChildren !== null) {
|
|
@@ -772,7 +979,7 @@ const patch = (oldVNode, newVNode) => {
|
|
|
772
979
|
};
|
|
773
980
|
const updateFallbackSlotVisibility = (elm) => {
|
|
774
981
|
// tslint:disable-next-line: prefer-const
|
|
775
|
-
|
|
982
|
+
const childNodes = elm.childNodes;
|
|
776
983
|
let childNode;
|
|
777
984
|
let i;
|
|
778
985
|
let ilen;
|
|
@@ -781,7 +988,7 @@ const updateFallbackSlotVisibility = (elm) => {
|
|
|
781
988
|
let nodeType;
|
|
782
989
|
for (i = 0, ilen = childNodes.length; i < ilen; i++) {
|
|
783
990
|
childNode = childNodes[i];
|
|
784
|
-
if (childNode.nodeType === 1 /* ElementNode */) {
|
|
991
|
+
if (childNode.nodeType === 1 /* NODE_TYPE.ElementNode */) {
|
|
785
992
|
if (childNode['s-sr']) {
|
|
786
993
|
// this is a slot fallback node
|
|
787
994
|
// get the slot name for this slot reference node
|
|
@@ -793,7 +1000,7 @@ const updateFallbackSlotVisibility = (elm) => {
|
|
|
793
1000
|
nodeType = childNodes[j].nodeType;
|
|
794
1001
|
if (childNodes[j]['s-hn'] !== childNode['s-hn'] || slotNameAttr !== '') {
|
|
795
1002
|
// this sibling node is from a different component OR is a named fallback slot node
|
|
796
|
-
if (nodeType === 1 /* ElementNode */ && slotNameAttr === childNodes[j].getAttribute('slot')) {
|
|
1003
|
+
if (nodeType === 1 /* NODE_TYPE.ElementNode */ && slotNameAttr === childNodes[j].getAttribute('slot')) {
|
|
797
1004
|
childNode.hidden = true;
|
|
798
1005
|
break;
|
|
799
1006
|
}
|
|
@@ -802,8 +1009,8 @@ const updateFallbackSlotVisibility = (elm) => {
|
|
|
802
1009
|
// this is a default fallback slot node
|
|
803
1010
|
// any element or text node (with content)
|
|
804
1011
|
// should hide the default fallback slot node
|
|
805
|
-
if (nodeType === 1 /* ElementNode */ ||
|
|
806
|
-
(nodeType === 3 /* TextNode */ && childNodes[j].textContent.trim() !== '')) {
|
|
1012
|
+
if (nodeType === 1 /* NODE_TYPE.ElementNode */ ||
|
|
1013
|
+
(nodeType === 3 /* NODE_TYPE.TextNode */ && childNodes[j].textContent.trim() !== '')) {
|
|
807
1014
|
childNode.hidden = true;
|
|
808
1015
|
break;
|
|
809
1016
|
}
|
|
@@ -825,8 +1032,8 @@ const relocateSlotContent = (elm) => {
|
|
|
825
1032
|
let relocateNodeData;
|
|
826
1033
|
let j;
|
|
827
1034
|
let i = 0;
|
|
828
|
-
|
|
829
|
-
|
|
1035
|
+
const childNodes = elm.childNodes;
|
|
1036
|
+
const ilen = childNodes.length;
|
|
830
1037
|
for (; i < ilen; i++) {
|
|
831
1038
|
childNode = childNodes[i];
|
|
832
1039
|
if (childNode['s-sr'] && (node = childNode['s-cr']) && node.parentNode) {
|
|
@@ -881,13 +1088,13 @@ const relocateSlotContent = (elm) => {
|
|
|
881
1088
|
}
|
|
882
1089
|
}
|
|
883
1090
|
}
|
|
884
|
-
if (childNode.nodeType === 1 /* ElementNode */) {
|
|
1091
|
+
if (childNode.nodeType === 1 /* NODE_TYPE.ElementNode */) {
|
|
885
1092
|
relocateSlotContent(childNode);
|
|
886
1093
|
}
|
|
887
1094
|
}
|
|
888
1095
|
};
|
|
889
1096
|
const isNodeLocatedInSlot = (nodeToRelocate, slotNameAttr) => {
|
|
890
|
-
if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
|
1097
|
+
if (nodeToRelocate.nodeType === 1 /* NODE_TYPE.ElementNode */) {
|
|
891
1098
|
if (nodeToRelocate.getAttribute('slot') === null && slotNameAttr === '') {
|
|
892
1099
|
return true;
|
|
893
1100
|
}
|
|
@@ -918,7 +1125,7 @@ const renderVdom = (hostRef, renderFnResults) => {
|
|
|
918
1125
|
cmpMeta.$attrsToReflect$.map(([propName, attribute]) => (rootVnode.$attrs$[attribute] = hostElm[propName]));
|
|
919
1126
|
}
|
|
920
1127
|
rootVnode.$tag$ = null;
|
|
921
|
-
rootVnode.$flags$ |= 4 /* isHost */;
|
|
1128
|
+
rootVnode.$flags$ |= 4 /* VNODE_FLAGS.isHost */;
|
|
922
1129
|
hostRef.$vnode$ = rootVnode;
|
|
923
1130
|
rootVnode.$elm$ = oldVNode.$elm$ = (hostElm.shadowRoot || hostElm );
|
|
924
1131
|
{
|
|
@@ -926,7 +1133,7 @@ const renderVdom = (hostRef, renderFnResults) => {
|
|
|
926
1133
|
}
|
|
927
1134
|
{
|
|
928
1135
|
contentRef = hostElm['s-cr'];
|
|
929
|
-
useNativeShadowDom = (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) !== 0;
|
|
1136
|
+
useNativeShadowDom = (cmpMeta.$flags$ & 1 /* CMP_FLAGS.shadowDomEncapsulation */) !== 0;
|
|
930
1137
|
// always reset
|
|
931
1138
|
checkSlotFallbackVisibility = false;
|
|
932
1139
|
}
|
|
@@ -935,7 +1142,7 @@ const renderVdom = (hostRef, renderFnResults) => {
|
|
|
935
1142
|
{
|
|
936
1143
|
// while we're moving nodes around existing nodes, temporarily disable
|
|
937
1144
|
// the disconnectCallback from working
|
|
938
|
-
plt.$flags$ |= 1 /* isTmpDisconnected */;
|
|
1145
|
+
plt.$flags$ |= 1 /* PLATFORM_FLAGS.isTmpDisconnected */;
|
|
939
1146
|
if (checkSlotRelocate) {
|
|
940
1147
|
relocateSlotContent(rootVnode.$elm$);
|
|
941
1148
|
let relocateData;
|
|
@@ -993,7 +1200,7 @@ const renderVdom = (hostRef, renderFnResults) => {
|
|
|
993
1200
|
}
|
|
994
1201
|
else {
|
|
995
1202
|
// this node doesn't have a slot home to go to, so let's hide it
|
|
996
|
-
if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
|
1203
|
+
if (nodeToRelocate.nodeType === 1 /* NODE_TYPE.ElementNode */) {
|
|
997
1204
|
nodeToRelocate.hidden = true;
|
|
998
1205
|
}
|
|
999
1206
|
}
|
|
@@ -1004,37 +1211,11 @@ const renderVdom = (hostRef, renderFnResults) => {
|
|
|
1004
1211
|
}
|
|
1005
1212
|
// done moving nodes around
|
|
1006
1213
|
// allow the disconnect callback to work again
|
|
1007
|
-
plt.$flags$ &= ~1 /* isTmpDisconnected */;
|
|
1214
|
+
plt.$flags$ &= ~1 /* PLATFORM_FLAGS.isTmpDisconnected */;
|
|
1008
1215
|
// always reset
|
|
1009
1216
|
relocateNodes.length = 0;
|
|
1010
1217
|
}
|
|
1011
1218
|
};
|
|
1012
|
-
const getElement = (ref) => (getHostRef(ref).$hostElement$ );
|
|
1013
|
-
const createEvent = (ref, name, flags) => {
|
|
1014
|
-
const elm = getElement(ref);
|
|
1015
|
-
return {
|
|
1016
|
-
emit: (detail) => {
|
|
1017
|
-
return emitEvent(elm, name, {
|
|
1018
|
-
bubbles: !!(flags & 4 /* Bubbles */),
|
|
1019
|
-
composed: !!(flags & 2 /* Composed */),
|
|
1020
|
-
cancelable: !!(flags & 1 /* Cancellable */),
|
|
1021
|
-
detail,
|
|
1022
|
-
});
|
|
1023
|
-
},
|
|
1024
|
-
};
|
|
1025
|
-
};
|
|
1026
|
-
/**
|
|
1027
|
-
* Helper function to create & dispatch a custom Event on a provided target
|
|
1028
|
-
* @param elm the target of the Event
|
|
1029
|
-
* @param name the name to give the custom Event
|
|
1030
|
-
* @param opts options for configuring a custom Event
|
|
1031
|
-
* @returns the custom Event
|
|
1032
|
-
*/
|
|
1033
|
-
const emitEvent = (elm, name, opts) => {
|
|
1034
|
-
const ev = plt.ce(name, opts);
|
|
1035
|
-
elm.dispatchEvent(ev);
|
|
1036
|
-
return ev;
|
|
1037
|
-
};
|
|
1038
1219
|
const attachToAncestor = (hostRef, ancestorComponent) => {
|
|
1039
1220
|
if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent['s-p']) {
|
|
1040
1221
|
ancestorComponent['s-p'].push(new Promise((r) => (hostRef.$onRenderResolve$ = r)));
|
|
@@ -1042,10 +1223,10 @@ const attachToAncestor = (hostRef, ancestorComponent) => {
|
|
|
1042
1223
|
};
|
|
1043
1224
|
const scheduleUpdate = (hostRef, isInitialLoad) => {
|
|
1044
1225
|
{
|
|
1045
|
-
hostRef.$flags$ |= 16 /* isQueuedForUpdate */;
|
|
1226
|
+
hostRef.$flags$ |= 16 /* HOST_FLAGS.isQueuedForUpdate */;
|
|
1046
1227
|
}
|
|
1047
|
-
if (hostRef.$flags$ & 4 /* isWaitingForChildren */) {
|
|
1048
|
-
hostRef.$flags$ |= 512 /* needsRerender */;
|
|
1228
|
+
if (hostRef.$flags$ & 4 /* HOST_FLAGS.isWaitingForChildren */) {
|
|
1229
|
+
hostRef.$flags$ |= 512 /* HOST_FLAGS.needsRerender */;
|
|
1049
1230
|
return;
|
|
1050
1231
|
}
|
|
1051
1232
|
attachToAncestor(hostRef, hostRef.$ancestorComponent$);
|
|
@@ -1061,7 +1242,7 @@ const dispatchHooks = (hostRef, isInitialLoad) => {
|
|
|
1061
1242
|
let promise;
|
|
1062
1243
|
if (isInitialLoad) {
|
|
1063
1244
|
{
|
|
1064
|
-
hostRef.$flags$ |= 256 /* isListenReady */;
|
|
1245
|
+
hostRef.$flags$ |= 256 /* HOST_FLAGS.isListenReady */;
|
|
1065
1246
|
if (hostRef.$queuedListeners$) {
|
|
1066
1247
|
hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event));
|
|
1067
1248
|
hostRef.$queuedListeners$ = null;
|
|
@@ -1112,7 +1293,7 @@ const updateComponent = async (hostRef, instance, isInitialLoad) => {
|
|
|
1112
1293
|
}
|
|
1113
1294
|
else {
|
|
1114
1295
|
Promise.all(childrenPromises).then(postUpdate);
|
|
1115
|
-
hostRef.$flags$ |= 4 /* isWaitingForChildren */;
|
|
1296
|
+
hostRef.$flags$ |= 4 /* HOST_FLAGS.isWaitingForChildren */;
|
|
1116
1297
|
childrenPromises.length = 0;
|
|
1117
1298
|
}
|
|
1118
1299
|
}
|
|
@@ -1121,10 +1302,10 @@ const callRender = (hostRef, instance, elm) => {
|
|
|
1121
1302
|
try {
|
|
1122
1303
|
instance = instance.render() ;
|
|
1123
1304
|
{
|
|
1124
|
-
hostRef.$flags$ &= ~16 /* isQueuedForUpdate */;
|
|
1305
|
+
hostRef.$flags$ &= ~16 /* HOST_FLAGS.isQueuedForUpdate */;
|
|
1125
1306
|
}
|
|
1126
1307
|
{
|
|
1127
|
-
hostRef.$flags$ |= 2 /* hasRendered */;
|
|
1308
|
+
hostRef.$flags$ |= 2 /* HOST_FLAGS.hasRendered */;
|
|
1128
1309
|
}
|
|
1129
1310
|
{
|
|
1130
1311
|
{
|
|
@@ -1151,8 +1332,8 @@ const postUpdateComponent = (hostRef) => {
|
|
|
1151
1332
|
{
|
|
1152
1333
|
safeCall(instance, 'componentDidRender');
|
|
1153
1334
|
}
|
|
1154
|
-
if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
|
|
1155
|
-
hostRef.$flags$ |= 64 /* hasLoadedComponent */;
|
|
1335
|
+
if (!(hostRef.$flags$ & 64 /* HOST_FLAGS.hasLoadedComponent */)) {
|
|
1336
|
+
hostRef.$flags$ |= 64 /* HOST_FLAGS.hasLoadedComponent */;
|
|
1156
1337
|
{
|
|
1157
1338
|
// DOM WRITE!
|
|
1158
1339
|
addHydratedFlag(elm);
|
|
@@ -1184,10 +1365,10 @@ const postUpdateComponent = (hostRef) => {
|
|
|
1184
1365
|
hostRef.$onRenderResolve$();
|
|
1185
1366
|
hostRef.$onRenderResolve$ = undefined;
|
|
1186
1367
|
}
|
|
1187
|
-
if (hostRef.$flags$ & 512 /* needsRerender */) {
|
|
1368
|
+
if (hostRef.$flags$ & 512 /* HOST_FLAGS.needsRerender */) {
|
|
1188
1369
|
nextTick(() => scheduleUpdate(hostRef, false));
|
|
1189
1370
|
}
|
|
1190
|
-
hostRef.$flags$ &= ~(4 /* isWaitingForChildren */ | 512 /* needsRerender */);
|
|
1371
|
+
hostRef.$flags$ &= ~(4 /* HOST_FLAGS.isWaitingForChildren */ | 512 /* HOST_FLAGS.needsRerender */);
|
|
1191
1372
|
}
|
|
1192
1373
|
// ( •_•)
|
|
1193
1374
|
// ( •_•)>⌐■-■
|
|
@@ -1217,53 +1398,6 @@ const then = (promise, thenFn) => {
|
|
|
1217
1398
|
};
|
|
1218
1399
|
const addHydratedFlag = (elm) => elm.classList.add('hydrated')
|
|
1219
1400
|
;
|
|
1220
|
-
/**
|
|
1221
|
-
* Parse a new property value for a given property type.
|
|
1222
|
-
*
|
|
1223
|
-
* While the prop value can reasonably be expected to be of `any` type as far as TypeScript's type checker is concerned,
|
|
1224
|
-
* it is not safe to assume that the string returned by evaluating `typeof propValue` matches:
|
|
1225
|
-
* 1. `any`, the type given to `propValue` in the function signature
|
|
1226
|
-
* 2. the type stored from `propType`.
|
|
1227
|
-
*
|
|
1228
|
-
* This function provides the capability to parse/coerce a property's value to potentially any other JavaScript type.
|
|
1229
|
-
*
|
|
1230
|
-
* Property values represented in TSX preserve their type information. In the example below, the number 0 is passed to
|
|
1231
|
-
* a component. This `propValue` will preserve its type information (`typeof propValue === 'number'`). Note that is
|
|
1232
|
-
* based on the type of the value being passed in, not the type declared of the class member decorated with `@Prop`.
|
|
1233
|
-
* ```tsx
|
|
1234
|
-
* <my-cmp prop-val={0}></my-cmp>
|
|
1235
|
-
* ```
|
|
1236
|
-
*
|
|
1237
|
-
* HTML prop values on the other hand, will always a string
|
|
1238
|
-
*
|
|
1239
|
-
* @param propValue the new value to coerce to some type
|
|
1240
|
-
* @param propType the type of the prop, expressed as a binary number
|
|
1241
|
-
* @returns the parsed/coerced value
|
|
1242
|
-
*/
|
|
1243
|
-
const parsePropertyValue = (propValue, propType) => {
|
|
1244
|
-
// ensure this value is of the correct prop type
|
|
1245
|
-
if (propValue != null && !isComplexType(propValue)) {
|
|
1246
|
-
if (propType & 4 /* Boolean */) {
|
|
1247
|
-
// per the HTML spec, any string value means it is a boolean true value
|
|
1248
|
-
// but we'll cheat here and say that the string "false" is the boolean false
|
|
1249
|
-
return propValue === 'false' ? false : propValue === '' || !!propValue;
|
|
1250
|
-
}
|
|
1251
|
-
if (propType & 2 /* Number */) {
|
|
1252
|
-
// force it to be a number
|
|
1253
|
-
return parseFloat(propValue);
|
|
1254
|
-
}
|
|
1255
|
-
if (propType & 1 /* String */) {
|
|
1256
|
-
// could have been passed as a number or boolean
|
|
1257
|
-
// but we still want it as a string
|
|
1258
|
-
return String(propValue);
|
|
1259
|
-
}
|
|
1260
|
-
// redundant return here for better minification
|
|
1261
|
-
return propValue;
|
|
1262
|
-
}
|
|
1263
|
-
// not sure exactly what type we want
|
|
1264
|
-
// so no need to change to a different type
|
|
1265
|
-
return propValue;
|
|
1266
|
-
};
|
|
1267
1401
|
const getValue = (ref, propName) => getHostRef(ref).$instanceValues$.get(propName);
|
|
1268
1402
|
const setValue = (ref, propName, newVal, cmpMeta) => {
|
|
1269
1403
|
// check our new property value against our internal value
|
|
@@ -1276,13 +1410,13 @@ const setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
1276
1410
|
// explicitly check for NaN on both sides, as `NaN === NaN` is always false
|
|
1277
1411
|
const areBothNaN = Number.isNaN(oldVal) && Number.isNaN(newVal);
|
|
1278
1412
|
const didValueChange = newVal !== oldVal && !areBothNaN;
|
|
1279
|
-
if ((!(flags & 8 /* isConstructingInstance */) || oldVal === undefined) && didValueChange) {
|
|
1413
|
+
if ((!(flags & 8 /* HOST_FLAGS.isConstructingInstance */) || oldVal === undefined) && didValueChange) {
|
|
1280
1414
|
// gadzooks! the property's value has changed!!
|
|
1281
1415
|
// set our new value!
|
|
1282
1416
|
hostRef.$instanceValues$.set(propName, newVal);
|
|
1283
1417
|
if (instance) {
|
|
1284
1418
|
// get an array of method names of watch functions to call
|
|
1285
|
-
if (cmpMeta.$watchers$ && flags & 128 /* isWatchReady */) {
|
|
1419
|
+
if (cmpMeta.$watchers$ && flags & 128 /* HOST_FLAGS.isWatchReady */) {
|
|
1286
1420
|
const watchMethods = cmpMeta.$watchers$[propName];
|
|
1287
1421
|
if (watchMethods) {
|
|
1288
1422
|
// this instance is watching for when this property changed
|
|
@@ -1297,7 +1431,7 @@ const setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
1297
1431
|
});
|
|
1298
1432
|
}
|
|
1299
1433
|
}
|
|
1300
|
-
if ((flags & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
|
|
1434
|
+
if ((flags & (2 /* HOST_FLAGS.hasRendered */ | 16 /* HOST_FLAGS.isQueuedForUpdate */)) === 2 /* HOST_FLAGS.hasRendered */) {
|
|
1301
1435
|
// looks like this value actually changed, so we've got work to do!
|
|
1302
1436
|
// but only if we've already rendered, otherwise just chill out
|
|
1303
1437
|
// queue that we need to do an update, but don't worry about queuing
|
|
@@ -1307,6 +1441,16 @@ const setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
1307
1441
|
}
|
|
1308
1442
|
}
|
|
1309
1443
|
};
|
|
1444
|
+
/**
|
|
1445
|
+
* Attach a series of runtime constructs to a compiled Stencil component
|
|
1446
|
+
* constructor, including getters and setters for the `@Prop` and `@State`
|
|
1447
|
+
* decorators, callbacks for when attributes change, and so on.
|
|
1448
|
+
*
|
|
1449
|
+
* @param Cstr the constructor for a component that we need to process
|
|
1450
|
+
* @param cmpMeta metadata collected previously about the component
|
|
1451
|
+
* @param flags a number used to store a series of bit flags
|
|
1452
|
+
* @returns a reference to the same constructor passed in (but now mutated)
|
|
1453
|
+
*/
|
|
1310
1454
|
const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
1311
1455
|
if (cmpMeta.$members$) {
|
|
1312
1456
|
if (Cstr.watchers) {
|
|
@@ -1316,8 +1460,8 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1316
1460
|
const members = Object.entries(cmpMeta.$members$);
|
|
1317
1461
|
const prototype = Cstr.prototype;
|
|
1318
1462
|
members.map(([memberName, [memberFlags]]) => {
|
|
1319
|
-
if ((memberFlags & 31 /* Prop */ ||
|
|
1320
|
-
((flags & 2 /* proxyState */) && memberFlags & 32 /* State */))) {
|
|
1463
|
+
if ((memberFlags & 31 /* MEMBER_FLAGS.Prop */ ||
|
|
1464
|
+
((flags & 2 /* PROXY_FLAGS.proxyState */) && memberFlags & 32 /* MEMBER_FLAGS.State */))) {
|
|
1321
1465
|
// proxyComponent - prop
|
|
1322
1466
|
Object.defineProperty(prototype, memberName, {
|
|
1323
1467
|
get() {
|
|
@@ -1332,8 +1476,8 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1332
1476
|
enumerable: true,
|
|
1333
1477
|
});
|
|
1334
1478
|
}
|
|
1335
|
-
else if (flags & 1 /* isElementConstructor */ &&
|
|
1336
|
-
memberFlags & 64 /* Method */) {
|
|
1479
|
+
else if (flags & 1 /* PROXY_FLAGS.isElementConstructor */ &&
|
|
1480
|
+
memberFlags & 64 /* MEMBER_FLAGS.Method */) {
|
|
1337
1481
|
// proxyComponent - method
|
|
1338
1482
|
Object.defineProperty(prototype, memberName, {
|
|
1339
1483
|
value(...args) {
|
|
@@ -1343,7 +1487,7 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1343
1487
|
});
|
|
1344
1488
|
}
|
|
1345
1489
|
});
|
|
1346
|
-
if ((flags & 1 /* isElementConstructor */)) {
|
|
1490
|
+
if ((flags & 1 /* PROXY_FLAGS.isElementConstructor */)) {
|
|
1347
1491
|
const attrNameToPropName = new Map();
|
|
1348
1492
|
prototype.attributeChangedCallback = function (attrName, _oldValue, newValue) {
|
|
1349
1493
|
plt.jmp(() => {
|
|
@@ -1399,11 +1543,11 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1399
1543
|
// create an array of attributes to observe
|
|
1400
1544
|
// and also create a map of html attribute name to js property name
|
|
1401
1545
|
Cstr.observedAttributes = members
|
|
1402
|
-
.filter(([_, m]) => m[0] & 15 /* HasAttribute */) // filter to only keep props that should match attributes
|
|
1546
|
+
.filter(([_, m]) => m[0] & 15 /* MEMBER_FLAGS.HasAttribute */) // filter to only keep props that should match attributes
|
|
1403
1547
|
.map(([propName, m]) => {
|
|
1404
1548
|
const attrName = m[1] || propName;
|
|
1405
1549
|
attrNameToPropName.set(attrName, propName);
|
|
1406
|
-
if (m[0] & 512 /* ReflectAttr */) {
|
|
1550
|
+
if (m[0] & 512 /* MEMBER_FLAGS.ReflectAttr */) {
|
|
1407
1551
|
cmpMeta.$attrsToReflect$.push([propName, attrName]);
|
|
1408
1552
|
}
|
|
1409
1553
|
return attrName;
|
|
@@ -1414,10 +1558,10 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1414
1558
|
};
|
|
1415
1559
|
const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) => {
|
|
1416
1560
|
// initializeComponent
|
|
1417
|
-
if ((hostRef.$flags$ & 32 /* hasInitializedComponent */) === 0) {
|
|
1561
|
+
if ((hostRef.$flags$ & 32 /* HOST_FLAGS.hasInitializedComponent */) === 0) {
|
|
1418
1562
|
{
|
|
1419
1563
|
// we haven't initialized this element yet
|
|
1420
|
-
hostRef.$flags$ |= 32 /* hasInitializedComponent */;
|
|
1564
|
+
hostRef.$flags$ |= 32 /* HOST_FLAGS.hasInitializedComponent */;
|
|
1421
1565
|
// lazy loaded components
|
|
1422
1566
|
// request the component's implementation to be
|
|
1423
1567
|
// wired up with the host element
|
|
@@ -1435,7 +1579,7 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
|
|
|
1435
1579
|
{
|
|
1436
1580
|
cmpMeta.$watchers$ = Cstr.watchers;
|
|
1437
1581
|
}
|
|
1438
|
-
proxyComponent(Cstr, cmpMeta, 2 /* proxyState */);
|
|
1582
|
+
proxyComponent(Cstr, cmpMeta, 2 /* PROXY_FLAGS.proxyState */);
|
|
1439
1583
|
Cstr.isProxied = true;
|
|
1440
1584
|
}
|
|
1441
1585
|
const endNewInstance = createTime('createInstance', cmpMeta.$tagName$);
|
|
@@ -1443,7 +1587,7 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
|
|
|
1443
1587
|
// but let's keep track of when we start and stop
|
|
1444
1588
|
// so that the getters/setters don't incorrectly step on data
|
|
1445
1589
|
{
|
|
1446
|
-
hostRef.$flags$ |= 8 /* isConstructingInstance */;
|
|
1590
|
+
hostRef.$flags$ |= 8 /* HOST_FLAGS.isConstructingInstance */;
|
|
1447
1591
|
}
|
|
1448
1592
|
// construct the lazy-loaded component implementation
|
|
1449
1593
|
// passing the hostRef is very important during
|
|
@@ -1456,10 +1600,10 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
|
|
|
1456
1600
|
consoleError(e);
|
|
1457
1601
|
}
|
|
1458
1602
|
{
|
|
1459
|
-
hostRef.$flags$ &= ~8 /* isConstructingInstance */;
|
|
1603
|
+
hostRef.$flags$ &= ~8 /* HOST_FLAGS.isConstructingInstance */;
|
|
1460
1604
|
}
|
|
1461
1605
|
{
|
|
1462
|
-
hostRef.$flags$ |= 128 /* isWatchReady */;
|
|
1606
|
+
hostRef.$flags$ |= 128 /* HOST_FLAGS.isWatchReady */;
|
|
1463
1607
|
}
|
|
1464
1608
|
endNewInstance();
|
|
1465
1609
|
}
|
|
@@ -1469,7 +1613,7 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
|
|
|
1469
1613
|
const scopeId = getScopeId(cmpMeta);
|
|
1470
1614
|
if (!styles.has(scopeId)) {
|
|
1471
1615
|
const endRegisterStyles = createTime('registerStyles', cmpMeta.$tagName$);
|
|
1472
|
-
registerStyle(scopeId, style, !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */));
|
|
1616
|
+
registerStyle(scopeId, style, !!(cmpMeta.$flags$ & 1 /* CMP_FLAGS.shadowDomEncapsulation */));
|
|
1473
1617
|
endRegisterStyles();
|
|
1474
1618
|
}
|
|
1475
1619
|
}
|
|
@@ -1491,19 +1635,19 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
|
|
|
1491
1635
|
}
|
|
1492
1636
|
};
|
|
1493
1637
|
const connectedCallback = (elm) => {
|
|
1494
|
-
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
|
|
1638
|
+
if ((plt.$flags$ & 1 /* PLATFORM_FLAGS.isTmpDisconnected */) === 0) {
|
|
1495
1639
|
const hostRef = getHostRef(elm);
|
|
1496
1640
|
const cmpMeta = hostRef.$cmpMeta$;
|
|
1497
1641
|
const endConnected = createTime('connectedCallback', cmpMeta.$tagName$);
|
|
1498
|
-
if (!(hostRef.$flags$ & 1 /* hasConnected */)) {
|
|
1642
|
+
if (!(hostRef.$flags$ & 1 /* HOST_FLAGS.hasConnected */)) {
|
|
1499
1643
|
// first time this component has connected
|
|
1500
|
-
hostRef.$flags$ |= 1 /* hasConnected */;
|
|
1644
|
+
hostRef.$flags$ |= 1 /* HOST_FLAGS.hasConnected */;
|
|
1501
1645
|
{
|
|
1502
1646
|
// initUpdate
|
|
1503
1647
|
// if the slot polyfill is required we'll need to put some nodes
|
|
1504
1648
|
// in here to act as original content anchors as we move nodes around
|
|
1505
1649
|
// host element has been connected to the DOM
|
|
1506
|
-
if ((cmpMeta.$flags$ & (4 /* hasSlotRelocation */ | 8 /* needsShadowDomShim */))) {
|
|
1650
|
+
if ((cmpMeta.$flags$ & (4 /* CMP_FLAGS.hasSlotRelocation */ | 8 /* CMP_FLAGS.needsShadowDomShim */))) {
|
|
1507
1651
|
setContentReference(elm);
|
|
1508
1652
|
}
|
|
1509
1653
|
}
|
|
@@ -1526,7 +1670,7 @@ const connectedCallback = (elm) => {
|
|
|
1526
1670
|
// https://developers.google.com/web/fundamentals/web-components/best-practices#lazy-properties
|
|
1527
1671
|
if (cmpMeta.$members$) {
|
|
1528
1672
|
Object.entries(cmpMeta.$members$).map(([memberName, [memberFlags]]) => {
|
|
1529
|
-
if (memberFlags & 31 /* Prop */ && elm.hasOwnProperty(memberName)) {
|
|
1673
|
+
if (memberFlags & 31 /* MEMBER_FLAGS.Prop */ && elm.hasOwnProperty(memberName)) {
|
|
1530
1674
|
const value = elm[memberName];
|
|
1531
1675
|
delete elm[memberName];
|
|
1532
1676
|
elm[memberName] = value;
|
|
@@ -1558,7 +1702,7 @@ const setContentReference = (elm) => {
|
|
|
1558
1702
|
elm.insertBefore(contentRefElm, elm.firstChild);
|
|
1559
1703
|
};
|
|
1560
1704
|
const disconnectedCallback = (elm) => {
|
|
1561
|
-
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
|
|
1705
|
+
if ((plt.$flags$ & 1 /* PLATFORM_FLAGS.isTmpDisconnected */) === 0) {
|
|
1562
1706
|
const hostRef = getHostRef(elm);
|
|
1563
1707
|
const instance = hostRef.$lazyInstance$ ;
|
|
1564
1708
|
{
|
|
@@ -1613,7 +1757,7 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1613
1757
|
super(self);
|
|
1614
1758
|
self = this;
|
|
1615
1759
|
registerHost(self, cmpMeta);
|
|
1616
|
-
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
|
|
1760
|
+
if (cmpMeta.$flags$ & 1 /* CMP_FLAGS.shadowDomEncapsulation */) {
|
|
1617
1761
|
// this component is using shadow dom
|
|
1618
1762
|
// and this browser supports shadow dom
|
|
1619
1763
|
// add the read-only property "shadowRoot" to the host element
|
|
@@ -1648,7 +1792,7 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1648
1792
|
cmpMeta.$lazyBundleId$ = lazyBundle[0];
|
|
1649
1793
|
if (!exclude.includes(tagName) && !customElements.get(tagName)) {
|
|
1650
1794
|
cmpTags.push(tagName);
|
|
1651
|
-
customElements.define(tagName, proxyComponent(HostElement, cmpMeta, 1 /* isElementConstructor */));
|
|
1795
|
+
customElements.define(tagName, proxyComponent(HostElement, cmpMeta, 1 /* PROXY_FLAGS.isElementConstructor */));
|
|
1652
1796
|
}
|
|
1653
1797
|
});
|
|
1654
1798
|
});
|
|
@@ -1670,7 +1814,45 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1670
1814
|
// Fallback appLoad event
|
|
1671
1815
|
endBootstrap();
|
|
1672
1816
|
};
|
|
1673
|
-
const
|
|
1817
|
+
const addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) => {
|
|
1818
|
+
if (listeners) {
|
|
1819
|
+
listeners.map(([flags, name, method]) => {
|
|
1820
|
+
const target = getHostListenerTarget(elm, flags) ;
|
|
1821
|
+
const handler = hostListenerProxy(hostRef, method);
|
|
1822
|
+
const opts = hostListenerOpts(flags);
|
|
1823
|
+
plt.ael(target, name, handler, opts);
|
|
1824
|
+
(hostRef.$rmListeners$ = hostRef.$rmListeners$ || []).push(() => plt.rel(target, name, handler, opts));
|
|
1825
|
+
});
|
|
1826
|
+
}
|
|
1827
|
+
};
|
|
1828
|
+
const hostListenerProxy = (hostRef, methodName) => (ev) => {
|
|
1829
|
+
try {
|
|
1830
|
+
{
|
|
1831
|
+
if (hostRef.$flags$ & 256 /* HOST_FLAGS.isListenReady */) {
|
|
1832
|
+
// instance is ready, let's call it's member method for this event
|
|
1833
|
+
hostRef.$lazyInstance$[methodName](ev);
|
|
1834
|
+
}
|
|
1835
|
+
else {
|
|
1836
|
+
(hostRef.$queuedListeners$ = hostRef.$queuedListeners$ || []).push([methodName, ev]);
|
|
1837
|
+
}
|
|
1838
|
+
}
|
|
1839
|
+
}
|
|
1840
|
+
catch (e) {
|
|
1841
|
+
consoleError(e);
|
|
1842
|
+
}
|
|
1843
|
+
};
|
|
1844
|
+
const getHostListenerTarget = (elm, flags) => {
|
|
1845
|
+
if (flags & 4 /* LISTENER_FLAGS.TargetDocument */)
|
|
1846
|
+
return doc;
|
|
1847
|
+
if (flags & 8 /* LISTENER_FLAGS.TargetWindow */)
|
|
1848
|
+
return win;
|
|
1849
|
+
if (flags & 16 /* LISTENER_FLAGS.TargetBody */)
|
|
1850
|
+
return doc.body;
|
|
1851
|
+
return elm;
|
|
1852
|
+
};
|
|
1853
|
+
// prettier-ignore
|
|
1854
|
+
const hostListenerOpts = (flags) => (flags & 2 /* LISTENER_FLAGS.Capture */) !== 0;
|
|
1855
|
+
const hostRefs = /*@__PURE__*/ new WeakMap();
|
|
1674
1856
|
const getHostRef = (ref) => hostRefs.get(ref);
|
|
1675
1857
|
const registerInstance = (lazyInstance, hostRef) => hostRefs.set((hostRef.$lazyInstance$ = lazyInstance), hostRef);
|
|
1676
1858
|
const registerHost = (elm, cmpMeta) => {
|
|
@@ -1702,7 +1884,374 @@ const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
1702
1884
|
if (module) {
|
|
1703
1885
|
return module[exportName];
|
|
1704
1886
|
}
|
|
1887
|
+
|
|
1888
|
+
if (!hmrVersionId || !BUILD.hotModuleReplacement) {
|
|
1889
|
+
const processMod = importedModule => {
|
|
1890
|
+
cmpModules.set(bundleId, importedModule);
|
|
1891
|
+
return importedModule[exportName];
|
|
1892
|
+
}
|
|
1893
|
+
switch(bundleId) {
|
|
1894
|
+
|
|
1895
|
+
case 'z-app-switcher_9':
|
|
1896
|
+
return import(
|
|
1897
|
+
/* webpackMode: "lazy" */
|
|
1898
|
+
'./z-app-switcher_9.entry.js').then(processMod, consoleError);
|
|
1899
|
+
case 'z-app-header':
|
|
1900
|
+
return import(
|
|
1901
|
+
/* webpackMode: "lazy" */
|
|
1902
|
+
'./z-app-header.entry.js').then(processMod, consoleError);
|
|
1903
|
+
case 'z-aria-alert':
|
|
1904
|
+
return import(
|
|
1905
|
+
/* webpackMode: "lazy" */
|
|
1906
|
+
'./z-aria-alert.entry.js').then(processMod, consoleError);
|
|
1907
|
+
case 'z-avatar':
|
|
1908
|
+
return import(
|
|
1909
|
+
/* webpackMode: "lazy" */
|
|
1910
|
+
'./z-avatar.entry.js').then(processMod, consoleError);
|
|
1911
|
+
case 'z-button-deprecated':
|
|
1912
|
+
return import(
|
|
1913
|
+
/* webpackMode: "lazy" */
|
|
1914
|
+
'./z-button-deprecated.entry.js').then(processMod, consoleError);
|
|
1915
|
+
case 'z-button-filter':
|
|
1916
|
+
return import(
|
|
1917
|
+
/* webpackMode: "lazy" */
|
|
1918
|
+
'./z-button-filter.entry.js').then(processMod, consoleError);
|
|
1919
|
+
case 'z-button-sort':
|
|
1920
|
+
return import(
|
|
1921
|
+
/* webpackMode: "lazy" */
|
|
1922
|
+
'./z-button-sort.entry.js').then(processMod, consoleError);
|
|
1923
|
+
case 'z-card':
|
|
1924
|
+
return import(
|
|
1925
|
+
/* webpackMode: "lazy" */
|
|
1926
|
+
'./z-card.entry.js').then(processMod, consoleError);
|
|
1927
|
+
case 'z-carousel':
|
|
1928
|
+
return import(
|
|
1929
|
+
/* webpackMode: "lazy" */
|
|
1930
|
+
'./z-carousel.entry.js').then(processMod, consoleError);
|
|
1931
|
+
case 'z-chip-deprecated':
|
|
1932
|
+
return import(
|
|
1933
|
+
/* webpackMode: "lazy" */
|
|
1934
|
+
'./z-chip-deprecated.entry.js').then(processMod, consoleError);
|
|
1935
|
+
case 'z-combobox':
|
|
1936
|
+
return import(
|
|
1937
|
+
/* webpackMode: "lazy" */
|
|
1938
|
+
'./z-combobox.entry.js').then(processMod, consoleError);
|
|
1939
|
+
case 'z-contextual-menu':
|
|
1940
|
+
return import(
|
|
1941
|
+
/* webpackMode: "lazy" */
|
|
1942
|
+
'./z-contextual-menu.entry.js').then(processMod, consoleError);
|
|
1943
|
+
case 'z-cookiebar':
|
|
1944
|
+
return import(
|
|
1945
|
+
/* webpackMode: "lazy" */
|
|
1946
|
+
'./z-cookiebar.entry.js').then(processMod, consoleError);
|
|
1947
|
+
case 'z-cover-hero':
|
|
1948
|
+
return import(
|
|
1949
|
+
/* webpackMode: "lazy" */
|
|
1950
|
+
'./z-cover-hero.entry.js').then(processMod, consoleError);
|
|
1951
|
+
case 'z-date-picker':
|
|
1952
|
+
return import(
|
|
1953
|
+
/* webpackMode: "lazy" */
|
|
1954
|
+
'./z-date-picker.entry.js').then(processMod, consoleError);
|
|
1955
|
+
case 'z-file':
|
|
1956
|
+
return import(
|
|
1957
|
+
/* webpackMode: "lazy" */
|
|
1958
|
+
'./z-file.entry.js').then(processMod, consoleError);
|
|
1959
|
+
case 'z-file-upload':
|
|
1960
|
+
return import(
|
|
1961
|
+
/* webpackMode: "lazy" */
|
|
1962
|
+
'./z-file-upload.entry.js').then(processMod, consoleError);
|
|
1963
|
+
case 'z-footer':
|
|
1964
|
+
return import(
|
|
1965
|
+
/* webpackMode: "lazy" */
|
|
1966
|
+
'./z-footer.entry.js').then(processMod, consoleError);
|
|
1967
|
+
case 'z-icon-package':
|
|
1968
|
+
return import(
|
|
1969
|
+
/* webpackMode: "lazy" */
|
|
1970
|
+
'./z-icon-package.entry.js').then(processMod, consoleError);
|
|
1971
|
+
case 'z-info-box':
|
|
1972
|
+
return import(
|
|
1973
|
+
/* webpackMode: "lazy" */
|
|
1974
|
+
'./z-info-box.entry.js').then(processMod, consoleError);
|
|
1975
|
+
case 'z-info-reveal':
|
|
1976
|
+
return import(
|
|
1977
|
+
/* webpackMode: "lazy" */
|
|
1978
|
+
'./z-info-reveal.entry.js').then(processMod, consoleError);
|
|
1979
|
+
case 'z-input-deprecated':
|
|
1980
|
+
return import(
|
|
1981
|
+
/* webpackMode: "lazy" */
|
|
1982
|
+
'./z-input-deprecated.entry.js').then(processMod, consoleError);
|
|
1983
|
+
case 'z-menu':
|
|
1984
|
+
return import(
|
|
1985
|
+
/* webpackMode: "lazy" */
|
|
1986
|
+
'./z-menu.entry.js').then(processMod, consoleError);
|
|
1987
|
+
case 'z-menu-section':
|
|
1988
|
+
return import(
|
|
1989
|
+
/* webpackMode: "lazy" */
|
|
1990
|
+
'./z-menu-section.entry.js').then(processMod, consoleError);
|
|
1991
|
+
case 'z-messages-pocket':
|
|
1992
|
+
return import(
|
|
1993
|
+
/* webpackMode: "lazy" */
|
|
1994
|
+
'./z-messages-pocket.entry.js').then(processMod, consoleError);
|
|
1995
|
+
case 'z-modal-login':
|
|
1996
|
+
return import(
|
|
1997
|
+
/* webpackMode: "lazy" */
|
|
1998
|
+
'./z-modal-login.entry.js').then(processMod, consoleError);
|
|
1999
|
+
case 'z-myz-card-alert':
|
|
2000
|
+
return import(
|
|
2001
|
+
/* webpackMode: "lazy" */
|
|
2002
|
+
'./z-myz-card-alert.entry.js').then(processMod, consoleError);
|
|
2003
|
+
case 'z-myz-card-dictionary':
|
|
2004
|
+
return import(
|
|
2005
|
+
/* webpackMode: "lazy" */
|
|
2006
|
+
'./z-myz-card-dictionary.entry.js').then(processMod, consoleError);
|
|
2007
|
+
case 'z-myz-card-footer':
|
|
2008
|
+
return import(
|
|
2009
|
+
/* webpackMode: "lazy" */
|
|
2010
|
+
'./z-myz-card-footer.entry.js').then(processMod, consoleError);
|
|
2011
|
+
case 'z-myz-card-footer-sections':
|
|
2012
|
+
return import(
|
|
2013
|
+
/* webpackMode: "lazy" */
|
|
2014
|
+
'./z-myz-card-footer-sections.entry.js').then(processMod, consoleError);
|
|
2015
|
+
case 'z-myz-card-icon':
|
|
2016
|
+
return import(
|
|
2017
|
+
/* webpackMode: "lazy" */
|
|
2018
|
+
'./z-myz-card-icon.entry.js').then(processMod, consoleError);
|
|
2019
|
+
case 'z-myz-card-info':
|
|
2020
|
+
return import(
|
|
2021
|
+
/* webpackMode: "lazy" */
|
|
2022
|
+
'./z-myz-card-info.entry.js').then(processMod, consoleError);
|
|
2023
|
+
case 'z-myz-card-list':
|
|
2024
|
+
return import(
|
|
2025
|
+
/* webpackMode: "lazy" */
|
|
2026
|
+
'./z-myz-card-list.entry.js').then(processMod, consoleError);
|
|
2027
|
+
case 'z-myz-topbar':
|
|
2028
|
+
return import(
|
|
2029
|
+
/* webpackMode: "lazy" */
|
|
2030
|
+
'./z-myz-topbar.entry.js').then(processMod, consoleError);
|
|
2031
|
+
case 'z-navigation-tab':
|
|
2032
|
+
return import(
|
|
2033
|
+
/* webpackMode: "lazy" */
|
|
2034
|
+
'./z-navigation-tab.entry.js').then(processMod, consoleError);
|
|
2035
|
+
case 'z-navigation-tab-link':
|
|
2036
|
+
return import(
|
|
2037
|
+
/* webpackMode: "lazy" */
|
|
2038
|
+
'./z-navigation-tab-link.entry.js').then(processMod, consoleError);
|
|
2039
|
+
case 'z-navigation-tabs':
|
|
2040
|
+
return import(
|
|
2041
|
+
/* webpackMode: "lazy" */
|
|
2042
|
+
'./z-navigation-tabs.entry.js').then(processMod, consoleError);
|
|
2043
|
+
case 'z-notification':
|
|
2044
|
+
return import(
|
|
2045
|
+
/* webpackMode: "lazy" */
|
|
2046
|
+
'./z-notification.entry.js').then(processMod, consoleError);
|
|
2047
|
+
case 'z-offcanvas':
|
|
2048
|
+
return import(
|
|
2049
|
+
/* webpackMode: "lazy" */
|
|
2050
|
+
'./z-offcanvas.entry.js').then(processMod, consoleError);
|
|
2051
|
+
case 'z-otp':
|
|
2052
|
+
return import(
|
|
2053
|
+
/* webpackMode: "lazy" */
|
|
2054
|
+
'./z-otp.entry.js').then(processMod, consoleError);
|
|
2055
|
+
case 'z-pagination':
|
|
2056
|
+
return import(
|
|
2057
|
+
/* webpackMode: "lazy" */
|
|
2058
|
+
'./z-pagination.entry.js').then(processMod, consoleError);
|
|
2059
|
+
case 'z-pagination-bar':
|
|
2060
|
+
return import(
|
|
2061
|
+
/* webpackMode: "lazy" */
|
|
2062
|
+
'./z-pagination-bar.entry.js').then(processMod, consoleError);
|
|
2063
|
+
case 'z-panel-elem':
|
|
2064
|
+
return import(
|
|
2065
|
+
/* webpackMode: "lazy" */
|
|
2066
|
+
'./z-panel-elem.entry.js').then(processMod, consoleError);
|
|
2067
|
+
case 'z-pocket-message':
|
|
2068
|
+
return import(
|
|
2069
|
+
/* webpackMode: "lazy" */
|
|
2070
|
+
'./z-pocket-message.entry.js').then(processMod, consoleError);
|
|
2071
|
+
case 'z-popover-deprecated':
|
|
2072
|
+
return import(
|
|
2073
|
+
/* webpackMode: "lazy" */
|
|
2074
|
+
'./z-popover-deprecated.entry.js').then(processMod, consoleError);
|
|
2075
|
+
case 'z-section-title':
|
|
2076
|
+
return import(
|
|
2077
|
+
/* webpackMode: "lazy" */
|
|
2078
|
+
'./z-section-title.entry.js').then(processMod, consoleError);
|
|
2079
|
+
case 'z-skip-to-content':
|
|
2080
|
+
return import(
|
|
2081
|
+
/* webpackMode: "lazy" */
|
|
2082
|
+
'./z-skip-to-content.entry.js').then(processMod, consoleError);
|
|
2083
|
+
case 'z-slideshow':
|
|
2084
|
+
return import(
|
|
2085
|
+
/* webpackMode: "lazy" */
|
|
2086
|
+
'./z-slideshow.entry.js').then(processMod, consoleError);
|
|
2087
|
+
case 'z-status-tag':
|
|
2088
|
+
return import(
|
|
2089
|
+
/* webpackMode: "lazy" */
|
|
2090
|
+
'./z-status-tag.entry.js').then(processMod, consoleError);
|
|
2091
|
+
case 'z-stepper':
|
|
2092
|
+
return import(
|
|
2093
|
+
/* webpackMode: "lazy" */
|
|
2094
|
+
'./z-stepper.entry.js').then(processMod, consoleError);
|
|
2095
|
+
case 'z-stepper-item':
|
|
2096
|
+
return import(
|
|
2097
|
+
/* webpackMode: "lazy" */
|
|
2098
|
+
'./z-stepper-item.entry.js').then(processMod, consoleError);
|
|
2099
|
+
case 'z-table':
|
|
2100
|
+
return import(
|
|
2101
|
+
/* webpackMode: "lazy" */
|
|
2102
|
+
'./z-table.entry.js').then(processMod, consoleError);
|
|
2103
|
+
case 'z-table-body':
|
|
2104
|
+
return import(
|
|
2105
|
+
/* webpackMode: "lazy" */
|
|
2106
|
+
'./z-table-body.entry.js').then(processMod, consoleError);
|
|
2107
|
+
case 'z-table-expanded-row':
|
|
2108
|
+
return import(
|
|
2109
|
+
/* webpackMode: "lazy" */
|
|
2110
|
+
'./z-table-expanded-row.entry.js').then(processMod, consoleError);
|
|
2111
|
+
case 'z-table-footer':
|
|
2112
|
+
return import(
|
|
2113
|
+
/* webpackMode: "lazy" */
|
|
2114
|
+
'./z-table-footer.entry.js').then(processMod, consoleError);
|
|
2115
|
+
case 'z-table-head':
|
|
2116
|
+
return import(
|
|
2117
|
+
/* webpackMode: "lazy" */
|
|
2118
|
+
'./z-table-head.entry.js').then(processMod, consoleError);
|
|
2119
|
+
case 'z-table-header-row':
|
|
2120
|
+
return import(
|
|
2121
|
+
/* webpackMode: "lazy" */
|
|
2122
|
+
'./z-table-header-row.entry.js').then(processMod, consoleError);
|
|
2123
|
+
case 'z-table-row':
|
|
2124
|
+
return import(
|
|
2125
|
+
/* webpackMode: "lazy" */
|
|
2126
|
+
'./z-table-row.entry.js').then(processMod, consoleError);
|
|
2127
|
+
case 'z-table-sticky-footer':
|
|
2128
|
+
return import(
|
|
2129
|
+
/* webpackMode: "lazy" */
|
|
2130
|
+
'./z-table-sticky-footer.entry.js').then(processMod, consoleError);
|
|
2131
|
+
case 'z-tag':
|
|
2132
|
+
return import(
|
|
2133
|
+
/* webpackMode: "lazy" */
|
|
2134
|
+
'./z-tag.entry.js').then(processMod, consoleError);
|
|
2135
|
+
case 'z-toast-notification':
|
|
2136
|
+
return import(
|
|
2137
|
+
/* webpackMode: "lazy" */
|
|
2138
|
+
'./z-toast-notification.entry.js').then(processMod, consoleError);
|
|
2139
|
+
case 'z-toast-notification-list':
|
|
2140
|
+
return import(
|
|
2141
|
+
/* webpackMode: "lazy" */
|
|
2142
|
+
'./z-toast-notification-list.entry.js').then(processMod, consoleError);
|
|
2143
|
+
case 'z-toggle-button':
|
|
2144
|
+
return import(
|
|
2145
|
+
/* webpackMode: "lazy" */
|
|
2146
|
+
'./z-toggle-button.entry.js').then(processMod, consoleError);
|
|
2147
|
+
case 'z-toggle-switch':
|
|
2148
|
+
return import(
|
|
2149
|
+
/* webpackMode: "lazy" */
|
|
2150
|
+
'./z-toggle-switch.entry.js').then(processMod, consoleError);
|
|
2151
|
+
case 'z-tooltip':
|
|
2152
|
+
return import(
|
|
2153
|
+
/* webpackMode: "lazy" */
|
|
2154
|
+
'./z-tooltip.entry.js').then(processMod, consoleError);
|
|
2155
|
+
case 'z-tooltip-deprecated':
|
|
2156
|
+
return import(
|
|
2157
|
+
/* webpackMode: "lazy" */
|
|
2158
|
+
'./z-tooltip-deprecated.entry.js').then(processMod, consoleError);
|
|
2159
|
+
case 'z-user-dropdown':
|
|
2160
|
+
return import(
|
|
2161
|
+
/* webpackMode: "lazy" */
|
|
2162
|
+
'./z-user-dropdown.entry.js').then(processMod, consoleError);
|
|
2163
|
+
case 'z-visually-hidden':
|
|
2164
|
+
return import(
|
|
2165
|
+
/* webpackMode: "lazy" */
|
|
2166
|
+
'./z-visually-hidden.entry.js').then(processMod, consoleError);
|
|
2167
|
+
case 'z-alert':
|
|
2168
|
+
return import(
|
|
2169
|
+
/* webpackMode: "lazy" */
|
|
2170
|
+
'./z-alert.entry.js').then(processMod, consoleError);
|
|
2171
|
+
case 'z-candybar':
|
|
2172
|
+
return import(
|
|
2173
|
+
/* webpackMode: "lazy" */
|
|
2174
|
+
'./z-candybar.entry.js').then(processMod, consoleError);
|
|
2175
|
+
case 'z-chip':
|
|
2176
|
+
return import(
|
|
2177
|
+
/* webpackMode: "lazy" */
|
|
2178
|
+
'./z-chip.entry.js').then(processMod, consoleError);
|
|
2179
|
+
case 'z-dragdrop-area_2':
|
|
2180
|
+
return import(
|
|
2181
|
+
/* webpackMode: "lazy" */
|
|
2182
|
+
'./z-dragdrop-area_2.entry.js').then(processMod, consoleError);
|
|
2183
|
+
case 'z-footer-link_3':
|
|
2184
|
+
return import(
|
|
2185
|
+
/* webpackMode: "lazy" */
|
|
2186
|
+
'./z-footer-link_3.entry.js').then(processMod, consoleError);
|
|
2187
|
+
case 'z-ghost-loading':
|
|
2188
|
+
return import(
|
|
2189
|
+
/* webpackMode: "lazy" */
|
|
2190
|
+
'./z-ghost-loading.entry.js').then(processMod, consoleError);
|
|
2191
|
+
case 'z-input-label_2':
|
|
2192
|
+
return import(
|
|
2193
|
+
/* webpackMode: "lazy" */
|
|
2194
|
+
'./z-input-label_2.entry.js').then(processMod, consoleError);
|
|
2195
|
+
case 'z-list-group':
|
|
2196
|
+
return import(
|
|
2197
|
+
/* webpackMode: "lazy" */
|
|
2198
|
+
'./z-list-group.entry.js').then(processMod, consoleError);
|
|
2199
|
+
case 'z-menu-dropdown_2':
|
|
2200
|
+
return import(
|
|
2201
|
+
/* webpackMode: "lazy" */
|
|
2202
|
+
'./z-menu-dropdown_2.entry.js').then(processMod, consoleError);
|
|
2203
|
+
case 'z-myz-card_4':
|
|
2204
|
+
return import(
|
|
2205
|
+
/* webpackMode: "lazy" */
|
|
2206
|
+
'./z-myz-card_4.entry.js').then(processMod, consoleError);
|
|
2207
|
+
case 'z-pagination-page':
|
|
2208
|
+
return import(
|
|
2209
|
+
/* webpackMode: "lazy" */
|
|
2210
|
+
'./z-pagination-page.entry.js').then(processMod, consoleError);
|
|
2211
|
+
case 'z-pocket_3':
|
|
2212
|
+
return import(
|
|
2213
|
+
/* webpackMode: "lazy" */
|
|
2214
|
+
'./z-pocket_3.entry.js').then(processMod, consoleError);
|
|
2215
|
+
case 'z-table-cell':
|
|
2216
|
+
return import(
|
|
2217
|
+
/* webpackMode: "lazy" */
|
|
2218
|
+
'./z-table-cell.entry.js').then(processMod, consoleError);
|
|
2219
|
+
case 'z-table-empty-box':
|
|
2220
|
+
return import(
|
|
2221
|
+
/* webpackMode: "lazy" */
|
|
2222
|
+
'./z-table-empty-box.entry.js').then(processMod, consoleError);
|
|
2223
|
+
case 'z-table-header':
|
|
2224
|
+
return import(
|
|
2225
|
+
/* webpackMode: "lazy" */
|
|
2226
|
+
'./z-table-header.entry.js').then(processMod, consoleError);
|
|
2227
|
+
case 'z-modal':
|
|
2228
|
+
return import(
|
|
2229
|
+
/* webpackMode: "lazy" */
|
|
2230
|
+
'./z-modal.entry.js').then(processMod, consoleError);
|
|
2231
|
+
case 'z-list_2':
|
|
2232
|
+
return import(
|
|
2233
|
+
/* webpackMode: "lazy" */
|
|
2234
|
+
'./z-list_2.entry.js').then(processMod, consoleError);
|
|
2235
|
+
case 'z-myz-list-item':
|
|
2236
|
+
return import(
|
|
2237
|
+
/* webpackMode: "lazy" */
|
|
2238
|
+
'./z-myz-list-item.entry.js').then(processMod, consoleError);
|
|
2239
|
+
case 'z-popover':
|
|
2240
|
+
return import(
|
|
2241
|
+
/* webpackMode: "lazy" */
|
|
2242
|
+
'./z-popover.entry.js').then(processMod, consoleError);
|
|
2243
|
+
case 'z-body_2':
|
|
2244
|
+
return import(
|
|
2245
|
+
/* webpackMode: "lazy" */
|
|
2246
|
+
'./z-body_2.entry.js').then(processMod, consoleError);
|
|
2247
|
+
case 'z-button':
|
|
2248
|
+
return import(
|
|
2249
|
+
/* webpackMode: "lazy" */
|
|
2250
|
+
'./z-button.entry.js').then(processMod, consoleError);
|
|
2251
|
+
}
|
|
2252
|
+
}
|
|
1705
2253
|
return import(
|
|
2254
|
+
/* @vite-ignore */
|
|
1706
2255
|
/* webpackInclude: /\.entry\.js$/ */
|
|
1707
2256
|
/* webpackExclude: /\.system\.entry\.js$/ */
|
|
1708
2257
|
/* webpackMode: "lazy" */
|
|
@@ -1713,14 +2262,35 @@ const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
1713
2262
|
return importedModule[exportName];
|
|
1714
2263
|
}, consoleError);
|
|
1715
2264
|
};
|
|
1716
|
-
const styles = new Map();
|
|
2265
|
+
const styles = /*@__PURE__*/ new Map();
|
|
2266
|
+
const win = typeof window !== 'undefined' ? window : {};
|
|
2267
|
+
const doc = win.document || { head: {} };
|
|
2268
|
+
const plt = {
|
|
2269
|
+
$flags$: 0,
|
|
2270
|
+
$resourcesUrl$: '',
|
|
2271
|
+
jmp: (h) => h(),
|
|
2272
|
+
raf: (h) => requestAnimationFrame(h),
|
|
2273
|
+
ael: (el, eventName, listener, opts) => el.addEventListener(eventName, listener, opts),
|
|
2274
|
+
rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),
|
|
2275
|
+
ce: (eventName, opts) => new CustomEvent(eventName, opts),
|
|
2276
|
+
};
|
|
2277
|
+
const promiseResolve = (v) => Promise.resolve(v);
|
|
2278
|
+
const supportsConstructableStylesheets = /*@__PURE__*/ (() => {
|
|
2279
|
+
try {
|
|
2280
|
+
new CSSStyleSheet();
|
|
2281
|
+
return typeof new CSSStyleSheet().replaceSync === 'function';
|
|
2282
|
+
}
|
|
2283
|
+
catch (e) { }
|
|
2284
|
+
return false;
|
|
2285
|
+
})()
|
|
2286
|
+
;
|
|
1717
2287
|
const queueDomReads = [];
|
|
1718
2288
|
const queueDomWrites = [];
|
|
1719
2289
|
const queueTask = (queue, write) => (cb) => {
|
|
1720
2290
|
queue.push(cb);
|
|
1721
2291
|
if (!queuePending) {
|
|
1722
2292
|
queuePending = true;
|
|
1723
|
-
if (write && plt.$flags$ & 4 /* queueSync */) {
|
|
2293
|
+
if (write && plt.$flags$ & 4 /* PLATFORM_FLAGS.queueSync */) {
|
|
1724
2294
|
nextTick(flush);
|
|
1725
2295
|
}
|
|
1726
2296
|
else {
|