@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
|
@@ -22,6 +22,14 @@ function _interopNamespace(e) {
|
|
|
22
22
|
|
|
23
23
|
const NAMESPACE = 'web-components-library';
|
|
24
24
|
|
|
25
|
+
/**
|
|
26
|
+
* Virtual DOM patching algorithm based on Snabbdom by
|
|
27
|
+
* Simon Friis Vindum (@paldepind)
|
|
28
|
+
* Licensed under the MIT License
|
|
29
|
+
* https://github.com/snabbdom/snabbdom/blob/master/LICENSE
|
|
30
|
+
*
|
|
31
|
+
* Modified for Stencil's renderer and slot projection
|
|
32
|
+
*/
|
|
25
33
|
let scopeId;
|
|
26
34
|
let contentRef;
|
|
27
35
|
let hostTagName;
|
|
@@ -30,67 +38,6 @@ let checkSlotFallbackVisibility = false;
|
|
|
30
38
|
let checkSlotRelocate = false;
|
|
31
39
|
let isSvgMode = false;
|
|
32
40
|
let queuePending = false;
|
|
33
|
-
const win = typeof window !== 'undefined' ? window : {};
|
|
34
|
-
const doc = win.document || { head: {} };
|
|
35
|
-
const plt = {
|
|
36
|
-
$flags$: 0,
|
|
37
|
-
$resourcesUrl$: '',
|
|
38
|
-
jmp: (h) => h(),
|
|
39
|
-
raf: (h) => requestAnimationFrame(h),
|
|
40
|
-
ael: (el, eventName, listener, opts) => el.addEventListener(eventName, listener, opts),
|
|
41
|
-
rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),
|
|
42
|
-
ce: (eventName, opts) => new CustomEvent(eventName, opts),
|
|
43
|
-
};
|
|
44
|
-
const promiseResolve = (v) => Promise.resolve(v);
|
|
45
|
-
const supportsConstructibleStylesheets = /*@__PURE__*/ (() => {
|
|
46
|
-
try {
|
|
47
|
-
new CSSStyleSheet();
|
|
48
|
-
return typeof new CSSStyleSheet().replace === 'function';
|
|
49
|
-
}
|
|
50
|
-
catch (e) { }
|
|
51
|
-
return false;
|
|
52
|
-
})()
|
|
53
|
-
;
|
|
54
|
-
const addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) => {
|
|
55
|
-
if (listeners) {
|
|
56
|
-
listeners.map(([flags, name, method]) => {
|
|
57
|
-
const target = getHostListenerTarget(elm, flags) ;
|
|
58
|
-
const handler = hostListenerProxy(hostRef, method);
|
|
59
|
-
const opts = hostListenerOpts(flags);
|
|
60
|
-
plt.ael(target, name, handler, opts);
|
|
61
|
-
(hostRef.$rmListeners$ = hostRef.$rmListeners$ || []).push(() => plt.rel(target, name, handler, opts));
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
};
|
|
65
|
-
const hostListenerProxy = (hostRef, methodName) => (ev) => {
|
|
66
|
-
try {
|
|
67
|
-
{
|
|
68
|
-
if (hostRef.$flags$ & 256 /* isListenReady */) {
|
|
69
|
-
// instance is ready, let's call it's member method for this event
|
|
70
|
-
hostRef.$lazyInstance$[methodName](ev);
|
|
71
|
-
}
|
|
72
|
-
else {
|
|
73
|
-
(hostRef.$queuedListeners$ = hostRef.$queuedListeners$ || []).push([methodName, ev]);
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
catch (e) {
|
|
78
|
-
consoleError(e);
|
|
79
|
-
}
|
|
80
|
-
};
|
|
81
|
-
const getHostListenerTarget = (elm, flags) => {
|
|
82
|
-
if (flags & 4 /* TargetDocument */)
|
|
83
|
-
return doc;
|
|
84
|
-
if (flags & 8 /* TargetWindow */)
|
|
85
|
-
return win;
|
|
86
|
-
if (flags & 16 /* TargetBody */)
|
|
87
|
-
return doc.body;
|
|
88
|
-
return elm;
|
|
89
|
-
};
|
|
90
|
-
// prettier-ignore
|
|
91
|
-
const hostListenerOpts = (flags) => (flags & 2 /* Capture */) !== 0;
|
|
92
|
-
const HYDRATED_CSS = '{visibility:hidden}.hydrated{visibility:inherit}';
|
|
93
|
-
const XLINK_NS = 'http://www.w3.org/1999/xlink';
|
|
94
41
|
const createTime = (fnName, tagName = '') => {
|
|
95
42
|
{
|
|
96
43
|
return () => {
|
|
@@ -105,74 +52,8 @@ const uniqueTime = (key, measureText) => {
|
|
|
105
52
|
};
|
|
106
53
|
}
|
|
107
54
|
};
|
|
108
|
-
const
|
|
109
|
-
const
|
|
110
|
-
let style = styles.get(scopeId);
|
|
111
|
-
if (supportsConstructibleStylesheets && allowCS) {
|
|
112
|
-
style = (style || new CSSStyleSheet());
|
|
113
|
-
style.replace(cssText);
|
|
114
|
-
}
|
|
115
|
-
else {
|
|
116
|
-
style = cssText;
|
|
117
|
-
}
|
|
118
|
-
styles.set(scopeId, style);
|
|
119
|
-
};
|
|
120
|
-
const addStyle = (styleContainerNode, cmpMeta, mode, hostElm) => {
|
|
121
|
-
let scopeId = getScopeId(cmpMeta);
|
|
122
|
-
let style = styles.get(scopeId);
|
|
123
|
-
// if an element is NOT connected then getRootNode() will return the wrong root node
|
|
124
|
-
// so the fallback is to always use the document for the root node in those cases
|
|
125
|
-
styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : doc;
|
|
126
|
-
if (style) {
|
|
127
|
-
if (typeof style === 'string') {
|
|
128
|
-
styleContainerNode = styleContainerNode.head || styleContainerNode;
|
|
129
|
-
let appliedStyles = rootAppliedStyles.get(styleContainerNode);
|
|
130
|
-
let styleElm;
|
|
131
|
-
if (!appliedStyles) {
|
|
132
|
-
rootAppliedStyles.set(styleContainerNode, (appliedStyles = new Set()));
|
|
133
|
-
}
|
|
134
|
-
if (!appliedStyles.has(scopeId)) {
|
|
135
|
-
{
|
|
136
|
-
{
|
|
137
|
-
styleElm = doc.createElement('style');
|
|
138
|
-
styleElm.innerHTML = style;
|
|
139
|
-
}
|
|
140
|
-
styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector('link'));
|
|
141
|
-
}
|
|
142
|
-
if (appliedStyles) {
|
|
143
|
-
appliedStyles.add(scopeId);
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
else if (!styleContainerNode.adoptedStyleSheets.includes(style)) {
|
|
148
|
-
styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
return scopeId;
|
|
152
|
-
};
|
|
153
|
-
const attachStyles = (hostRef) => {
|
|
154
|
-
const cmpMeta = hostRef.$cmpMeta$;
|
|
155
|
-
const elm = hostRef.$hostElement$;
|
|
156
|
-
const flags = cmpMeta.$flags$;
|
|
157
|
-
const endAttachStyles = createTime('attachStyles', cmpMeta.$tagName$);
|
|
158
|
-
const scopeId = addStyle(elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(), cmpMeta);
|
|
159
|
-
if (flags & 10 /* needsScopedEncapsulation */) {
|
|
160
|
-
// only required when we're NOT using native shadow dom (slot)
|
|
161
|
-
// or this browser doesn't support native shadow dom
|
|
162
|
-
// and this host element was NOT created with SSR
|
|
163
|
-
// let's pick out the inner content for slot projection
|
|
164
|
-
// create a node to represent where the original
|
|
165
|
-
// content was first placed, which is useful later on
|
|
166
|
-
// DOM WRITE!!
|
|
167
|
-
elm['s-sc'] = scopeId;
|
|
168
|
-
elm.classList.add(scopeId + '-h');
|
|
169
|
-
if (flags & 2 /* scopedCssEncapsulation */) {
|
|
170
|
-
elm.classList.add(scopeId + '-s');
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
endAttachStyles();
|
|
174
|
-
};
|
|
175
|
-
const getScopeId = (cmp, mode) => 'sc-' + (cmp.$tagName$);
|
|
55
|
+
const HYDRATED_CSS = '{visibility:hidden}.hydrated{visibility:inherit}';
|
|
56
|
+
const XLINK_NS = 'http://www.w3.org/1999/xlink';
|
|
176
57
|
/**
|
|
177
58
|
* Default style mode id
|
|
178
59
|
*/
|
|
@@ -209,7 +90,7 @@ const h = (nodeName, vnodeData, ...children) => {
|
|
|
209
90
|
let slotName = null;
|
|
210
91
|
let simple = false;
|
|
211
92
|
let lastSimple = false;
|
|
212
|
-
|
|
93
|
+
const vNodeChildren = [];
|
|
213
94
|
const walk = (c) => {
|
|
214
95
|
for (let i = 0; i < c.length; i++) {
|
|
215
96
|
child = c[i];
|
|
@@ -287,6 +168,152 @@ const newVNode = (tag, text) => {
|
|
|
287
168
|
};
|
|
288
169
|
const Host = {};
|
|
289
170
|
const isHost = (node) => node && node.$tag$ === Host;
|
|
171
|
+
/**
|
|
172
|
+
* Parse a new property value for a given property type.
|
|
173
|
+
*
|
|
174
|
+
* While the prop value can reasonably be expected to be of `any` type as far as TypeScript's type checker is concerned,
|
|
175
|
+
* it is not safe to assume that the string returned by evaluating `typeof propValue` matches:
|
|
176
|
+
* 1. `any`, the type given to `propValue` in the function signature
|
|
177
|
+
* 2. the type stored from `propType`.
|
|
178
|
+
*
|
|
179
|
+
* This function provides the capability to parse/coerce a property's value to potentially any other JavaScript type.
|
|
180
|
+
*
|
|
181
|
+
* Property values represented in TSX preserve their type information. In the example below, the number 0 is passed to
|
|
182
|
+
* a component. This `propValue` will preserve its type information (`typeof propValue === 'number'`). Note that is
|
|
183
|
+
* based on the type of the value being passed in, not the type declared of the class member decorated with `@Prop`.
|
|
184
|
+
* ```tsx
|
|
185
|
+
* <my-cmp prop-val={0}></my-cmp>
|
|
186
|
+
* ```
|
|
187
|
+
*
|
|
188
|
+
* HTML prop values on the other hand, will always a string
|
|
189
|
+
*
|
|
190
|
+
* @param propValue the new value to coerce to some type
|
|
191
|
+
* @param propType the type of the prop, expressed as a binary number
|
|
192
|
+
* @returns the parsed/coerced value
|
|
193
|
+
*/
|
|
194
|
+
const parsePropertyValue = (propValue, propType) => {
|
|
195
|
+
// ensure this value is of the correct prop type
|
|
196
|
+
if (propValue != null && !isComplexType(propValue)) {
|
|
197
|
+
if (propType & 4 /* MEMBER_FLAGS.Boolean */) {
|
|
198
|
+
// per the HTML spec, any string value means it is a boolean true value
|
|
199
|
+
// but we'll cheat here and say that the string "false" is the boolean false
|
|
200
|
+
return propValue === 'false' ? false : propValue === '' || !!propValue;
|
|
201
|
+
}
|
|
202
|
+
if (propType & 2 /* MEMBER_FLAGS.Number */) {
|
|
203
|
+
// force it to be a number
|
|
204
|
+
return parseFloat(propValue);
|
|
205
|
+
}
|
|
206
|
+
if (propType & 1 /* MEMBER_FLAGS.String */) {
|
|
207
|
+
// could have been passed as a number or boolean
|
|
208
|
+
// but we still want it as a string
|
|
209
|
+
return String(propValue);
|
|
210
|
+
}
|
|
211
|
+
// redundant return here for better minification
|
|
212
|
+
return propValue;
|
|
213
|
+
}
|
|
214
|
+
// not sure exactly what type we want
|
|
215
|
+
// so no need to change to a different type
|
|
216
|
+
return propValue;
|
|
217
|
+
};
|
|
218
|
+
const getElement = (ref) => (getHostRef(ref).$hostElement$ );
|
|
219
|
+
const createEvent = (ref, name, flags) => {
|
|
220
|
+
const elm = getElement(ref);
|
|
221
|
+
return {
|
|
222
|
+
emit: (detail) => {
|
|
223
|
+
return emitEvent(elm, name, {
|
|
224
|
+
bubbles: !!(flags & 4 /* EVENT_FLAGS.Bubbles */),
|
|
225
|
+
composed: !!(flags & 2 /* EVENT_FLAGS.Composed */),
|
|
226
|
+
cancelable: !!(flags & 1 /* EVENT_FLAGS.Cancellable */),
|
|
227
|
+
detail,
|
|
228
|
+
});
|
|
229
|
+
},
|
|
230
|
+
};
|
|
231
|
+
};
|
|
232
|
+
/**
|
|
233
|
+
* Helper function to create & dispatch a custom Event on a provided target
|
|
234
|
+
* @param elm the target of the Event
|
|
235
|
+
* @param name the name to give the custom Event
|
|
236
|
+
* @param opts options for configuring a custom Event
|
|
237
|
+
* @returns the custom Event
|
|
238
|
+
*/
|
|
239
|
+
const emitEvent = (elm, name, opts) => {
|
|
240
|
+
const ev = plt.ce(name, opts);
|
|
241
|
+
elm.dispatchEvent(ev);
|
|
242
|
+
return ev;
|
|
243
|
+
};
|
|
244
|
+
const rootAppliedStyles = /*@__PURE__*/ new WeakMap();
|
|
245
|
+
const registerStyle = (scopeId, cssText, allowCS) => {
|
|
246
|
+
let style = styles.get(scopeId);
|
|
247
|
+
if (supportsConstructableStylesheets && allowCS) {
|
|
248
|
+
style = (style || new CSSStyleSheet());
|
|
249
|
+
if (typeof style === 'string') {
|
|
250
|
+
style = cssText;
|
|
251
|
+
}
|
|
252
|
+
else {
|
|
253
|
+
style.replaceSync(cssText);
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
else {
|
|
257
|
+
style = cssText;
|
|
258
|
+
}
|
|
259
|
+
styles.set(scopeId, style);
|
|
260
|
+
};
|
|
261
|
+
const addStyle = (styleContainerNode, cmpMeta, mode, hostElm) => {
|
|
262
|
+
let scopeId = getScopeId(cmpMeta);
|
|
263
|
+
const style = styles.get(scopeId);
|
|
264
|
+
// if an element is NOT connected then getRootNode() will return the wrong root node
|
|
265
|
+
// so the fallback is to always use the document for the root node in those cases
|
|
266
|
+
styleContainerNode = styleContainerNode.nodeType === 11 /* NODE_TYPE.DocumentFragment */ ? styleContainerNode : doc;
|
|
267
|
+
if (style) {
|
|
268
|
+
if (typeof style === 'string') {
|
|
269
|
+
styleContainerNode = styleContainerNode.head || styleContainerNode;
|
|
270
|
+
let appliedStyles = rootAppliedStyles.get(styleContainerNode);
|
|
271
|
+
let styleElm;
|
|
272
|
+
if (!appliedStyles) {
|
|
273
|
+
rootAppliedStyles.set(styleContainerNode, (appliedStyles = new Set()));
|
|
274
|
+
}
|
|
275
|
+
if (!appliedStyles.has(scopeId)) {
|
|
276
|
+
{
|
|
277
|
+
{
|
|
278
|
+
styleElm = doc.createElement('style');
|
|
279
|
+
styleElm.innerHTML = style;
|
|
280
|
+
}
|
|
281
|
+
styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector('link'));
|
|
282
|
+
}
|
|
283
|
+
if (appliedStyles) {
|
|
284
|
+
appliedStyles.add(scopeId);
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
else if (!styleContainerNode.adoptedStyleSheets.includes(style)) {
|
|
289
|
+
styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
return scopeId;
|
|
293
|
+
};
|
|
294
|
+
const attachStyles = (hostRef) => {
|
|
295
|
+
const cmpMeta = hostRef.$cmpMeta$;
|
|
296
|
+
const elm = hostRef.$hostElement$;
|
|
297
|
+
const flags = cmpMeta.$flags$;
|
|
298
|
+
const endAttachStyles = createTime('attachStyles', cmpMeta.$tagName$);
|
|
299
|
+
const scopeId = addStyle(elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(), cmpMeta);
|
|
300
|
+
if (flags & 10 /* CMP_FLAGS.needsScopedEncapsulation */) {
|
|
301
|
+
// only required when we're NOT using native shadow dom (slot)
|
|
302
|
+
// or this browser doesn't support native shadow dom
|
|
303
|
+
// and this host element was NOT created with SSR
|
|
304
|
+
// let's pick out the inner content for slot projection
|
|
305
|
+
// create a node to represent where the original
|
|
306
|
+
// content was first placed, which is useful later on
|
|
307
|
+
// DOM WRITE!!
|
|
308
|
+
elm['s-sc'] = scopeId;
|
|
309
|
+
elm.classList.add(scopeId + '-h');
|
|
310
|
+
if (flags & 2 /* CMP_FLAGS.scopedCssEncapsulation */) {
|
|
311
|
+
elm.classList.add(scopeId + '-s');
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
endAttachStyles();
|
|
315
|
+
};
|
|
316
|
+
const getScopeId = (cmp, mode) => 'sc-' + (cmp.$tagName$);
|
|
290
317
|
/**
|
|
291
318
|
* Production setAccessor() function based on Preact by
|
|
292
319
|
* Jason Miller (@developit)
|
|
@@ -384,7 +411,7 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
384
411
|
if ((isProp || (isComplex && newValue !== null)) && !isSvg) {
|
|
385
412
|
try {
|
|
386
413
|
if (!elm.tagName.includes('-')) {
|
|
387
|
-
|
|
414
|
+
const n = newValue == null ? '' : newValue;
|
|
388
415
|
// Workaround for Safari, moving the <input> caret when re-assigning the same valued
|
|
389
416
|
if (memberName === 'list') {
|
|
390
417
|
isProp = false;
|
|
@@ -423,7 +450,7 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
423
450
|
}
|
|
424
451
|
}
|
|
425
452
|
}
|
|
426
|
-
else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex) {
|
|
453
|
+
else if ((!isProp || flags & 4 /* VNODE_FLAGS.isHost */ || isSvg) && !isComplex) {
|
|
427
454
|
newValue = newValue === true ? '' : newValue;
|
|
428
455
|
if (xlink) {
|
|
429
456
|
elm.setAttributeNS(XLINK_NS, memberName, newValue);
|
|
@@ -441,7 +468,7 @@ const updateElement = (oldVnode, newVnode, isSvgMode, memberName) => {
|
|
|
441
468
|
// if the element passed in is a shadow root, which is a document fragment
|
|
442
469
|
// then we want to be adding attrs/props to the shadow root's "host" element
|
|
443
470
|
// if it's not a shadow root, then we add attrs/props to the same element
|
|
444
|
-
const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host
|
|
471
|
+
const elm = newVnode.$elm$.nodeType === 11 /* NODE_TYPE.DocumentFragment */ && newVnode.$elm$.host
|
|
445
472
|
? newVnode.$elm$.host
|
|
446
473
|
: newVnode.$elm$;
|
|
447
474
|
const oldVnodeAttrs = (oldVnode && oldVnode.$attrs$) || EMPTY_OBJ;
|
|
@@ -459,9 +486,19 @@ const updateElement = (oldVnode, newVnode, isSvgMode, memberName) => {
|
|
|
459
486
|
setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName], isSvgMode, newVnode.$flags$);
|
|
460
487
|
}
|
|
461
488
|
};
|
|
489
|
+
/**
|
|
490
|
+
* Create a DOM Node corresponding to one of the children of a given VNode.
|
|
491
|
+
*
|
|
492
|
+
* @param oldParentVNode the parent VNode from the previous render
|
|
493
|
+
* @param newParentVNode the parent VNode from the current render
|
|
494
|
+
* @param childIndex the index of the VNode, in the _new_ parent node's
|
|
495
|
+
* children, for which we will create a new DOM node
|
|
496
|
+
* @param parentElm the parent DOM node which our new node will be a child of
|
|
497
|
+
* @returns the newly created node
|
|
498
|
+
*/
|
|
462
499
|
const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
463
500
|
// tslint:disable-next-line: prefer-const
|
|
464
|
-
|
|
501
|
+
const newVNode = newParentVNode.$children$[childIndex];
|
|
465
502
|
let i = 0;
|
|
466
503
|
let elm;
|
|
467
504
|
let childNode;
|
|
@@ -476,16 +513,16 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
476
513
|
}
|
|
477
514
|
newVNode.$flags$ |= newVNode.$children$
|
|
478
515
|
? // slot element has fallback content
|
|
479
|
-
2 /* isSlotFallback */
|
|
516
|
+
2 /* VNODE_FLAGS.isSlotFallback */
|
|
480
517
|
: // slot element does not have fallback content
|
|
481
|
-
1 /* isSlotReference */;
|
|
518
|
+
1 /* VNODE_FLAGS.isSlotReference */;
|
|
482
519
|
}
|
|
483
520
|
}
|
|
484
521
|
if (newVNode.$text$ !== null) {
|
|
485
522
|
// create text node
|
|
486
523
|
elm = newVNode.$elm$ = doc.createTextNode(newVNode.$text$);
|
|
487
524
|
}
|
|
488
|
-
else if (newVNode.$flags$ & 1 /* isSlotReference */) {
|
|
525
|
+
else if (newVNode.$flags$ & 1 /* VNODE_FLAGS.isSlotReference */) {
|
|
489
526
|
// create a slot reference node
|
|
490
527
|
elm = newVNode.$elm$ =
|
|
491
528
|
doc.createTextNode('');
|
|
@@ -495,7 +532,7 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
495
532
|
isSvgMode = newVNode.$tag$ === 'svg';
|
|
496
533
|
}
|
|
497
534
|
// create element
|
|
498
|
-
elm = newVNode.$elm$ = (doc.createElementNS(isSvgMode ? SVG_NS : HTML_NS, newVNode.$flags$ & 2 /* isSlotFallback */
|
|
535
|
+
elm = newVNode.$elm$ = (doc.createElementNS(isSvgMode ? SVG_NS : HTML_NS, newVNode.$flags$ & 2 /* VNODE_FLAGS.isSlotFallback */
|
|
499
536
|
? 'slot-fb'
|
|
500
537
|
: newVNode.$tag$)
|
|
501
538
|
);
|
|
@@ -535,7 +572,7 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
535
572
|
}
|
|
536
573
|
{
|
|
537
574
|
elm['s-hn'] = hostTagName;
|
|
538
|
-
if (newVNode.$flags$ & (2 /* isSlotFallback */ | 1 /* isSlotReference */)) {
|
|
575
|
+
if (newVNode.$flags$ & (2 /* VNODE_FLAGS.isSlotFallback */ | 1 /* VNODE_FLAGS.isSlotReference */)) {
|
|
539
576
|
// remember the content reference comment
|
|
540
577
|
elm['s-sr'] = true;
|
|
541
578
|
// remember the content reference comment
|
|
@@ -554,7 +591,7 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
554
591
|
return elm;
|
|
555
592
|
};
|
|
556
593
|
const putBackInOriginalLocation = (parentElm, recursive) => {
|
|
557
|
-
plt.$flags$ |= 1 /* isTmpDisconnected */;
|
|
594
|
+
plt.$flags$ |= 1 /* PLATFORM_FLAGS.isTmpDisconnected */;
|
|
558
595
|
const oldSlotChildNodes = parentElm.childNodes;
|
|
559
596
|
for (let i = oldSlotChildNodes.length - 1; i >= 0; i--) {
|
|
560
597
|
const childNode = oldSlotChildNodes[i];
|
|
@@ -575,7 +612,7 @@ const putBackInOriginalLocation = (parentElm, recursive) => {
|
|
|
575
612
|
putBackInOriginalLocation(childNode, recursive);
|
|
576
613
|
}
|
|
577
614
|
}
|
|
578
|
-
plt.$flags$ &= ~1 /* isTmpDisconnected */;
|
|
615
|
+
plt.$flags$ &= ~1 /* PLATFORM_FLAGS.isTmpDisconnected */;
|
|
579
616
|
};
|
|
580
617
|
const addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
|
|
581
618
|
let containerElm = ((parentElm['s-cr'] && parentElm['s-cr'].parentNode) || parentElm);
|
|
@@ -617,6 +654,74 @@ const removeVnodes = (vnodes, startIdx, endIdx, vnode, elm) => {
|
|
|
617
654
|
}
|
|
618
655
|
}
|
|
619
656
|
};
|
|
657
|
+
/**
|
|
658
|
+
* Reconcile the children of a new VNode with the children of an old VNode by
|
|
659
|
+
* traversing the two collections of children, identifying nodes that are
|
|
660
|
+
* conserved or changed, calling out to `patch` to make any necessary
|
|
661
|
+
* updates to the DOM, and rearranging DOM nodes as needed.
|
|
662
|
+
*
|
|
663
|
+
* The algorithm for reconciling children works by analyzing two 'windows' onto
|
|
664
|
+
* the two arrays of children (`oldCh` and `newCh`). We keep track of the
|
|
665
|
+
* 'windows' by storing start and end indices and references to the
|
|
666
|
+
* corresponding array entries. Initially the two 'windows' are basically equal
|
|
667
|
+
* to the entire array, but we progressively narrow the windows until there are
|
|
668
|
+
* no children left to update by doing the following:
|
|
669
|
+
*
|
|
670
|
+
* 1. Skip any `null` entries at the beginning or end of the two arrays, so
|
|
671
|
+
* that if we have an initial array like the following we'll end up dealing
|
|
672
|
+
* only with a window bounded by the highlighted elements:
|
|
673
|
+
*
|
|
674
|
+
* [null, null, VNode1 , ... , VNode2, null, null]
|
|
675
|
+
* ^^^^^^ ^^^^^^
|
|
676
|
+
*
|
|
677
|
+
* 2. Check to see if the elements at the head and tail positions are equal
|
|
678
|
+
* across the windows. This will basically detect elements which haven't
|
|
679
|
+
* been added, removed, or changed position, i.e. if you had the following
|
|
680
|
+
* VNode elements (represented as HTML):
|
|
681
|
+
*
|
|
682
|
+
* oldVNode: `<div><p><span>HEY</span></p></div>`
|
|
683
|
+
* newVNode: `<div><p><span>THERE</span></p></div>`
|
|
684
|
+
*
|
|
685
|
+
* Then when comparing the children of the `<div>` tag we check the equality
|
|
686
|
+
* of the VNodes corresponding to the `<p>` tags and, since they are the
|
|
687
|
+
* same tag in the same position, we'd be able to avoid completely
|
|
688
|
+
* re-rendering the subtree under them with a new DOM element and would just
|
|
689
|
+
* call out to `patch` to handle reconciling their children and so on.
|
|
690
|
+
*
|
|
691
|
+
* 3. Check, for both windows, to see if the element at the beginning of the
|
|
692
|
+
* window corresponds to the element at the end of the other window. This is
|
|
693
|
+
* a heuristic which will let us identify _some_ situations in which
|
|
694
|
+
* elements have changed position, for instance it _should_ detect that the
|
|
695
|
+
* children nodes themselves have not changed but merely moved in the
|
|
696
|
+
* following example:
|
|
697
|
+
*
|
|
698
|
+
* oldVNode: `<div><element-one /><element-two /></div>`
|
|
699
|
+
* newVNode: `<div><element-two /><element-one /></div>`
|
|
700
|
+
*
|
|
701
|
+
* If we find cases like this then we also need to move the concrete DOM
|
|
702
|
+
* elements corresponding to the moved children to write the re-order to the
|
|
703
|
+
* DOM.
|
|
704
|
+
*
|
|
705
|
+
* 4. Finally, if VNodes have the `key` attribute set on them we check for any
|
|
706
|
+
* nodes in the old children which have the same key as the first element in
|
|
707
|
+
* our window on the new children. If we find such a node we handle calling
|
|
708
|
+
* out to `patch`, moving relevant DOM nodes, and so on, in accordance with
|
|
709
|
+
* what we find.
|
|
710
|
+
*
|
|
711
|
+
* Finally, once we've narrowed our 'windows' to the point that either of them
|
|
712
|
+
* collapse (i.e. they have length 0) we then handle any remaining VNode
|
|
713
|
+
* insertion or deletion that needs to happen to get a DOM state that correctly
|
|
714
|
+
* reflects the new child VNodes. If, for instance, after our window on the old
|
|
715
|
+
* children has collapsed we still have more nodes on the new children that
|
|
716
|
+
* we haven't dealt with yet then we need to add them, or if the new children
|
|
717
|
+
* collapse but we still have unhandled _old_ children then we need to make
|
|
718
|
+
* sure the corresponding DOM nodes are removed.
|
|
719
|
+
*
|
|
720
|
+
* @param parentElm the node into which the parent VNode is rendered
|
|
721
|
+
* @param oldCh the old children of the parent node
|
|
722
|
+
* @param newVNode the new VNode which will replace the parent
|
|
723
|
+
* @param newCh the new children of the parent node
|
|
724
|
+
*/
|
|
620
725
|
const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
621
726
|
let oldStartIdx = 0;
|
|
622
727
|
let newStartIdx = 0;
|
|
@@ -632,7 +737,7 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
|
632
737
|
let elmToMove;
|
|
633
738
|
while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {
|
|
634
739
|
if (oldStartVnode == null) {
|
|
635
|
-
//
|
|
740
|
+
// VNode might have been moved left
|
|
636
741
|
oldStartVnode = oldCh[++oldStartIdx];
|
|
637
742
|
}
|
|
638
743
|
else if (oldEndVnode == null) {
|
|
@@ -645,37 +750,100 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
|
645
750
|
newEndVnode = newCh[--newEndIdx];
|
|
646
751
|
}
|
|
647
752
|
else if (isSameVnode(oldStartVnode, newStartVnode)) {
|
|
753
|
+
// if the start nodes are the same then we should patch the new VNode
|
|
754
|
+
// onto the old one, and increment our `newStartIdx` and `oldStartIdx`
|
|
755
|
+
// indices to reflect that. We don't need to move any DOM Nodes around
|
|
756
|
+
// since things are matched up in order.
|
|
648
757
|
patch(oldStartVnode, newStartVnode);
|
|
649
758
|
oldStartVnode = oldCh[++oldStartIdx];
|
|
650
759
|
newStartVnode = newCh[++newStartIdx];
|
|
651
760
|
}
|
|
652
761
|
else if (isSameVnode(oldEndVnode, newEndVnode)) {
|
|
762
|
+
// likewise, if the end nodes are the same we patch new onto old and
|
|
763
|
+
// decrement our end indices, and also likewise in this case we don't
|
|
764
|
+
// need to move any DOM Nodes.
|
|
653
765
|
patch(oldEndVnode, newEndVnode);
|
|
654
766
|
oldEndVnode = oldCh[--oldEndIdx];
|
|
655
767
|
newEndVnode = newCh[--newEndIdx];
|
|
656
768
|
}
|
|
657
769
|
else if (isSameVnode(oldStartVnode, newEndVnode)) {
|
|
658
|
-
// Vnode moved right
|
|
770
|
+
// case: "Vnode moved right"
|
|
771
|
+
//
|
|
772
|
+
// We've found that the last node in our window on the new children is
|
|
773
|
+
// the same VNode as the _first_ node in our window on the old children
|
|
774
|
+
// we're dealing with now. Visually, this is the layout of these two
|
|
775
|
+
// nodes:
|
|
776
|
+
//
|
|
777
|
+
// newCh: [..., newStartVnode , ... , newEndVnode , ...]
|
|
778
|
+
// ^^^^^^^^^^^
|
|
779
|
+
// oldCh: [..., oldStartVnode , ... , oldEndVnode , ...]
|
|
780
|
+
// ^^^^^^^^^^^^^
|
|
781
|
+
//
|
|
782
|
+
// In this situation we need to patch `newEndVnode` onto `oldStartVnode`
|
|
783
|
+
// and move the DOM element for `oldStartVnode`.
|
|
659
784
|
if ((oldStartVnode.$tag$ === 'slot' || newEndVnode.$tag$ === 'slot')) {
|
|
660
785
|
putBackInOriginalLocation(oldStartVnode.$elm$.parentNode, false);
|
|
661
786
|
}
|
|
662
787
|
patch(oldStartVnode, newEndVnode);
|
|
788
|
+
// We need to move the element for `oldStartVnode` into a position which
|
|
789
|
+
// will be appropriate for `newEndVnode`. For this we can use
|
|
790
|
+
// `.insertBefore` and `oldEndVnode.$elm$.nextSibling`. If there is a
|
|
791
|
+
// sibling for `oldEndVnode.$elm$` then we want to move the DOM node for
|
|
792
|
+
// `oldStartVnode` between `oldEndVnode` and it's sibling, like so:
|
|
793
|
+
//
|
|
794
|
+
// <old-start-node />
|
|
795
|
+
// <some-intervening-node />
|
|
796
|
+
// <old-end-node />
|
|
797
|
+
// <!-- -> <-- `oldStartVnode.$elm$` should be inserted here
|
|
798
|
+
// <next-sibling />
|
|
799
|
+
//
|
|
800
|
+
// If instead `oldEndVnode.$elm$` has no sibling then we just want to put
|
|
801
|
+
// the node for `oldStartVnode` at the end of the children of
|
|
802
|
+
// `parentElm`. Luckily, `Node.nextSibling` will return `null` if there
|
|
803
|
+
// aren't any siblings, and passing `null` to `Node.insertBefore` will
|
|
804
|
+
// append it to the children of the parent element.
|
|
663
805
|
parentElm.insertBefore(oldStartVnode.$elm$, oldEndVnode.$elm$.nextSibling);
|
|
664
806
|
oldStartVnode = oldCh[++oldStartIdx];
|
|
665
807
|
newEndVnode = newCh[--newEndIdx];
|
|
666
808
|
}
|
|
667
809
|
else if (isSameVnode(oldEndVnode, newStartVnode)) {
|
|
668
|
-
// Vnode moved left
|
|
810
|
+
// case: "Vnode moved left"
|
|
811
|
+
//
|
|
812
|
+
// We've found that the first node in our window on the new children is
|
|
813
|
+
// the same VNode as the _last_ node in our window on the old children.
|
|
814
|
+
// Visually, this is the layout of these two nodes:
|
|
815
|
+
//
|
|
816
|
+
// newCh: [..., newStartVnode , ... , newEndVnode , ...]
|
|
817
|
+
// ^^^^^^^^^^^^^
|
|
818
|
+
// oldCh: [..., oldStartVnode , ... , oldEndVnode , ...]
|
|
819
|
+
// ^^^^^^^^^^^
|
|
820
|
+
//
|
|
821
|
+
// In this situation we need to patch `newStartVnode` onto `oldEndVnode`
|
|
822
|
+
// (which will handle updating any changed attributes, reconciling their
|
|
823
|
+
// children etc) but we also need to move the DOM node to which
|
|
824
|
+
// `oldEndVnode` corresponds.
|
|
669
825
|
if ((oldStartVnode.$tag$ === 'slot' || newEndVnode.$tag$ === 'slot')) {
|
|
670
826
|
putBackInOriginalLocation(oldEndVnode.$elm$.parentNode, false);
|
|
671
827
|
}
|
|
672
828
|
patch(oldEndVnode, newStartVnode);
|
|
829
|
+
// We've already checked above if `oldStartVnode` and `newStartVnode` are
|
|
830
|
+
// the same node, so since we're here we know that they are not. Thus we
|
|
831
|
+
// can move the element for `oldEndVnode` _before_ the element for
|
|
832
|
+
// `oldStartVnode`, leaving `oldStartVnode` to be reconciled in the
|
|
833
|
+
// future.
|
|
673
834
|
parentElm.insertBefore(oldEndVnode.$elm$, oldStartVnode.$elm$);
|
|
674
835
|
oldEndVnode = oldCh[--oldEndIdx];
|
|
675
836
|
newStartVnode = newCh[++newStartIdx];
|
|
676
837
|
}
|
|
677
838
|
else {
|
|
678
|
-
//
|
|
839
|
+
// Here we do some checks to match up old and new nodes based on the
|
|
840
|
+
// `$key$` attribute, which is set by putting a `key="my-key"` attribute
|
|
841
|
+
// in the JSX for a DOM element in the implementation of a Stencil
|
|
842
|
+
// component.
|
|
843
|
+
//
|
|
844
|
+
// First we check to see if there are any nodes in the array of old
|
|
845
|
+
// children which have the same key as the first node in the new
|
|
846
|
+
// children.
|
|
679
847
|
idxInOld = -1;
|
|
680
848
|
{
|
|
681
849
|
for (i = oldStartIdx; i <= oldEndIdx; ++i) {
|
|
@@ -686,23 +854,32 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
|
686
854
|
}
|
|
687
855
|
}
|
|
688
856
|
if (idxInOld >= 0) {
|
|
857
|
+
// We found a node in the old children which matches up with the first
|
|
858
|
+
// node in the new children! So let's deal with that
|
|
689
859
|
elmToMove = oldCh[idxInOld];
|
|
690
860
|
if (elmToMove.$tag$ !== newStartVnode.$tag$) {
|
|
861
|
+
// the tag doesn't match so we'll need a new DOM element
|
|
691
862
|
node = createElm(oldCh && oldCh[newStartIdx], newVNode, idxInOld, parentElm);
|
|
692
863
|
}
|
|
693
864
|
else {
|
|
694
865
|
patch(elmToMove, newStartVnode);
|
|
866
|
+
// invalidate the matching old node so that we won't try to update it
|
|
867
|
+
// again later on
|
|
695
868
|
oldCh[idxInOld] = undefined;
|
|
696
869
|
node = elmToMove.$elm$;
|
|
697
870
|
}
|
|
698
871
|
newStartVnode = newCh[++newStartIdx];
|
|
699
872
|
}
|
|
700
873
|
else {
|
|
701
|
-
//
|
|
874
|
+
// We either didn't find an element in the old children that matches
|
|
875
|
+
// the key of the first new child OR the build is not using `key`
|
|
876
|
+
// attributes at all. In either case we need to create a new element
|
|
877
|
+
// for the new node.
|
|
702
878
|
node = createElm(oldCh && oldCh[newStartIdx], newVNode, newStartIdx, parentElm);
|
|
703
879
|
newStartVnode = newCh[++newStartIdx];
|
|
704
880
|
}
|
|
705
881
|
if (node) {
|
|
882
|
+
// if we created a new node then handle inserting it to the DOM
|
|
706
883
|
{
|
|
707
884
|
parentReferenceNode(oldStartVnode.$elm$).insertBefore(node, referenceNode(oldStartVnode.$elm$));
|
|
708
885
|
}
|
|
@@ -710,21 +887,43 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
|
710
887
|
}
|
|
711
888
|
}
|
|
712
889
|
if (oldStartIdx > oldEndIdx) {
|
|
890
|
+
// we have some more new nodes to add which don't match up with old nodes
|
|
713
891
|
addVnodes(parentElm, newCh[newEndIdx + 1] == null ? null : newCh[newEndIdx + 1].$elm$, newVNode, newCh, newStartIdx, newEndIdx);
|
|
714
892
|
}
|
|
715
893
|
else if (newStartIdx > newEndIdx) {
|
|
894
|
+
// there are nodes in the `oldCh` array which no longer correspond to nodes
|
|
895
|
+
// in the new array, so lets remove them (which entails cleaning up the
|
|
896
|
+
// relevant DOM nodes)
|
|
716
897
|
removeVnodes(oldCh, oldStartIdx, oldEndIdx);
|
|
717
898
|
}
|
|
718
899
|
};
|
|
719
|
-
|
|
900
|
+
/**
|
|
901
|
+
* Compare two VNodes to determine if they are the same
|
|
902
|
+
*
|
|
903
|
+
* **NB**: This function is an equality _heuristic_ based on the available
|
|
904
|
+
* information set on the two VNodes and can be misleading under certain
|
|
905
|
+
* circumstances. In particular, if the two nodes do not have `key` attrs
|
|
906
|
+
* (available under `$key$` on VNodes) then the function falls back on merely
|
|
907
|
+
* checking that they have the same tag.
|
|
908
|
+
*
|
|
909
|
+
* So, in other words, if `key` attrs are not set on VNodes which may be
|
|
910
|
+
* changing order within a `children` array or something along those lines then
|
|
911
|
+
* we could obtain a false positive and then have to do needless re-rendering.
|
|
912
|
+
*
|
|
913
|
+
* @param leftVNode the first VNode to check
|
|
914
|
+
* @param rightVNode the second VNode to check
|
|
915
|
+
* @returns whether they're equal or not
|
|
916
|
+
*/
|
|
917
|
+
const isSameVnode = (leftVNode, rightVNode) => {
|
|
720
918
|
// compare if two vnode to see if they're "technically" the same
|
|
721
919
|
// need to have the same element tag, and same key to be the same
|
|
722
|
-
if (
|
|
723
|
-
if (
|
|
724
|
-
return
|
|
920
|
+
if (leftVNode.$tag$ === rightVNode.$tag$) {
|
|
921
|
+
if (leftVNode.$tag$ === 'slot') {
|
|
922
|
+
return leftVNode.$name$ === rightVNode.$name$;
|
|
725
923
|
}
|
|
924
|
+
// this will be set if components in the build have `key` attrs set on them
|
|
726
925
|
{
|
|
727
|
-
return
|
|
926
|
+
return leftVNode.$key$ === rightVNode.$key$;
|
|
728
927
|
}
|
|
729
928
|
}
|
|
730
929
|
return false;
|
|
@@ -737,6 +936,14 @@ const referenceNode = (node) => {
|
|
|
737
936
|
return (node && node['s-ol']) || node;
|
|
738
937
|
};
|
|
739
938
|
const parentReferenceNode = (node) => (node['s-ol'] ? node['s-ol'] : node).parentNode;
|
|
939
|
+
/**
|
|
940
|
+
* Handle reconciling an outdated VNode with a new one which corresponds to
|
|
941
|
+
* it. This function handles flushing updates to the DOM and reconciling the
|
|
942
|
+
* children of the two nodes (if any).
|
|
943
|
+
*
|
|
944
|
+
* @param oldVNode an old VNode whose DOM element and children we want to update
|
|
945
|
+
* @param newVNode a new VNode representing an updated version of the old one
|
|
946
|
+
*/
|
|
740
947
|
const patch = (oldVNode, newVNode) => {
|
|
741
948
|
const elm = (newVNode.$elm$ = oldVNode.$elm$);
|
|
742
949
|
const oldChildren = oldVNode.$children$;
|
|
@@ -750,7 +957,6 @@ const patch = (oldVNode, newVNode) => {
|
|
|
750
957
|
// only add this to the when the compiler sees we're using an svg somewhere
|
|
751
958
|
isSvgMode = tag === 'svg' ? true : tag === 'foreignObject' ? false : isSvgMode;
|
|
752
959
|
}
|
|
753
|
-
// element node
|
|
754
960
|
{
|
|
755
961
|
if (tag === 'slot')
|
|
756
962
|
;
|
|
@@ -763,6 +969,7 @@ const patch = (oldVNode, newVNode) => {
|
|
|
763
969
|
}
|
|
764
970
|
if (oldChildren !== null && newChildren !== null) {
|
|
765
971
|
// looks like there's child vnodes for both the old and new vnodes
|
|
972
|
+
// so we need to call `updateChildren` to reconcile them
|
|
766
973
|
updateChildren(elm, oldChildren, newVNode, newChildren);
|
|
767
974
|
}
|
|
768
975
|
else if (newChildren !== null) {
|
|
@@ -794,7 +1001,7 @@ const patch = (oldVNode, newVNode) => {
|
|
|
794
1001
|
};
|
|
795
1002
|
const updateFallbackSlotVisibility = (elm) => {
|
|
796
1003
|
// tslint:disable-next-line: prefer-const
|
|
797
|
-
|
|
1004
|
+
const childNodes = elm.childNodes;
|
|
798
1005
|
let childNode;
|
|
799
1006
|
let i;
|
|
800
1007
|
let ilen;
|
|
@@ -803,7 +1010,7 @@ const updateFallbackSlotVisibility = (elm) => {
|
|
|
803
1010
|
let nodeType;
|
|
804
1011
|
for (i = 0, ilen = childNodes.length; i < ilen; i++) {
|
|
805
1012
|
childNode = childNodes[i];
|
|
806
|
-
if (childNode.nodeType === 1 /* ElementNode */) {
|
|
1013
|
+
if (childNode.nodeType === 1 /* NODE_TYPE.ElementNode */) {
|
|
807
1014
|
if (childNode['s-sr']) {
|
|
808
1015
|
// this is a slot fallback node
|
|
809
1016
|
// get the slot name for this slot reference node
|
|
@@ -815,7 +1022,7 @@ const updateFallbackSlotVisibility = (elm) => {
|
|
|
815
1022
|
nodeType = childNodes[j].nodeType;
|
|
816
1023
|
if (childNodes[j]['s-hn'] !== childNode['s-hn'] || slotNameAttr !== '') {
|
|
817
1024
|
// this sibling node is from a different component OR is a named fallback slot node
|
|
818
|
-
if (nodeType === 1 /* ElementNode */ && slotNameAttr === childNodes[j].getAttribute('slot')) {
|
|
1025
|
+
if (nodeType === 1 /* NODE_TYPE.ElementNode */ && slotNameAttr === childNodes[j].getAttribute('slot')) {
|
|
819
1026
|
childNode.hidden = true;
|
|
820
1027
|
break;
|
|
821
1028
|
}
|
|
@@ -824,8 +1031,8 @@ const updateFallbackSlotVisibility = (elm) => {
|
|
|
824
1031
|
// this is a default fallback slot node
|
|
825
1032
|
// any element or text node (with content)
|
|
826
1033
|
// should hide the default fallback slot node
|
|
827
|
-
if (nodeType === 1 /* ElementNode */ ||
|
|
828
|
-
(nodeType === 3 /* TextNode */ && childNodes[j].textContent.trim() !== '')) {
|
|
1034
|
+
if (nodeType === 1 /* NODE_TYPE.ElementNode */ ||
|
|
1035
|
+
(nodeType === 3 /* NODE_TYPE.TextNode */ && childNodes[j].textContent.trim() !== '')) {
|
|
829
1036
|
childNode.hidden = true;
|
|
830
1037
|
break;
|
|
831
1038
|
}
|
|
@@ -847,8 +1054,8 @@ const relocateSlotContent = (elm) => {
|
|
|
847
1054
|
let relocateNodeData;
|
|
848
1055
|
let j;
|
|
849
1056
|
let i = 0;
|
|
850
|
-
|
|
851
|
-
|
|
1057
|
+
const childNodes = elm.childNodes;
|
|
1058
|
+
const ilen = childNodes.length;
|
|
852
1059
|
for (; i < ilen; i++) {
|
|
853
1060
|
childNode = childNodes[i];
|
|
854
1061
|
if (childNode['s-sr'] && (node = childNode['s-cr']) && node.parentNode) {
|
|
@@ -903,13 +1110,13 @@ const relocateSlotContent = (elm) => {
|
|
|
903
1110
|
}
|
|
904
1111
|
}
|
|
905
1112
|
}
|
|
906
|
-
if (childNode.nodeType === 1 /* ElementNode */) {
|
|
1113
|
+
if (childNode.nodeType === 1 /* NODE_TYPE.ElementNode */) {
|
|
907
1114
|
relocateSlotContent(childNode);
|
|
908
1115
|
}
|
|
909
1116
|
}
|
|
910
1117
|
};
|
|
911
1118
|
const isNodeLocatedInSlot = (nodeToRelocate, slotNameAttr) => {
|
|
912
|
-
if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
|
1119
|
+
if (nodeToRelocate.nodeType === 1 /* NODE_TYPE.ElementNode */) {
|
|
913
1120
|
if (nodeToRelocate.getAttribute('slot') === null && slotNameAttr === '') {
|
|
914
1121
|
return true;
|
|
915
1122
|
}
|
|
@@ -940,7 +1147,7 @@ const renderVdom = (hostRef, renderFnResults) => {
|
|
|
940
1147
|
cmpMeta.$attrsToReflect$.map(([propName, attribute]) => (rootVnode.$attrs$[attribute] = hostElm[propName]));
|
|
941
1148
|
}
|
|
942
1149
|
rootVnode.$tag$ = null;
|
|
943
|
-
rootVnode.$flags$ |= 4 /* isHost */;
|
|
1150
|
+
rootVnode.$flags$ |= 4 /* VNODE_FLAGS.isHost */;
|
|
944
1151
|
hostRef.$vnode$ = rootVnode;
|
|
945
1152
|
rootVnode.$elm$ = oldVNode.$elm$ = (hostElm.shadowRoot || hostElm );
|
|
946
1153
|
{
|
|
@@ -948,7 +1155,7 @@ const renderVdom = (hostRef, renderFnResults) => {
|
|
|
948
1155
|
}
|
|
949
1156
|
{
|
|
950
1157
|
contentRef = hostElm['s-cr'];
|
|
951
|
-
useNativeShadowDom = (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) !== 0;
|
|
1158
|
+
useNativeShadowDom = (cmpMeta.$flags$ & 1 /* CMP_FLAGS.shadowDomEncapsulation */) !== 0;
|
|
952
1159
|
// always reset
|
|
953
1160
|
checkSlotFallbackVisibility = false;
|
|
954
1161
|
}
|
|
@@ -957,7 +1164,7 @@ const renderVdom = (hostRef, renderFnResults) => {
|
|
|
957
1164
|
{
|
|
958
1165
|
// while we're moving nodes around existing nodes, temporarily disable
|
|
959
1166
|
// the disconnectCallback from working
|
|
960
|
-
plt.$flags$ |= 1 /* isTmpDisconnected */;
|
|
1167
|
+
plt.$flags$ |= 1 /* PLATFORM_FLAGS.isTmpDisconnected */;
|
|
961
1168
|
if (checkSlotRelocate) {
|
|
962
1169
|
relocateSlotContent(rootVnode.$elm$);
|
|
963
1170
|
let relocateData;
|
|
@@ -1015,7 +1222,7 @@ const renderVdom = (hostRef, renderFnResults) => {
|
|
|
1015
1222
|
}
|
|
1016
1223
|
else {
|
|
1017
1224
|
// this node doesn't have a slot home to go to, so let's hide it
|
|
1018
|
-
if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
|
1225
|
+
if (nodeToRelocate.nodeType === 1 /* NODE_TYPE.ElementNode */) {
|
|
1019
1226
|
nodeToRelocate.hidden = true;
|
|
1020
1227
|
}
|
|
1021
1228
|
}
|
|
@@ -1026,37 +1233,11 @@ const renderVdom = (hostRef, renderFnResults) => {
|
|
|
1026
1233
|
}
|
|
1027
1234
|
// done moving nodes around
|
|
1028
1235
|
// allow the disconnect callback to work again
|
|
1029
|
-
plt.$flags$ &= ~1 /* isTmpDisconnected */;
|
|
1236
|
+
plt.$flags$ &= ~1 /* PLATFORM_FLAGS.isTmpDisconnected */;
|
|
1030
1237
|
// always reset
|
|
1031
1238
|
relocateNodes.length = 0;
|
|
1032
1239
|
}
|
|
1033
1240
|
};
|
|
1034
|
-
const getElement = (ref) => (getHostRef(ref).$hostElement$ );
|
|
1035
|
-
const createEvent = (ref, name, flags) => {
|
|
1036
|
-
const elm = getElement(ref);
|
|
1037
|
-
return {
|
|
1038
|
-
emit: (detail) => {
|
|
1039
|
-
return emitEvent(elm, name, {
|
|
1040
|
-
bubbles: !!(flags & 4 /* Bubbles */),
|
|
1041
|
-
composed: !!(flags & 2 /* Composed */),
|
|
1042
|
-
cancelable: !!(flags & 1 /* Cancellable */),
|
|
1043
|
-
detail,
|
|
1044
|
-
});
|
|
1045
|
-
},
|
|
1046
|
-
};
|
|
1047
|
-
};
|
|
1048
|
-
/**
|
|
1049
|
-
* Helper function to create & dispatch a custom Event on a provided target
|
|
1050
|
-
* @param elm the target of the Event
|
|
1051
|
-
* @param name the name to give the custom Event
|
|
1052
|
-
* @param opts options for configuring a custom Event
|
|
1053
|
-
* @returns the custom Event
|
|
1054
|
-
*/
|
|
1055
|
-
const emitEvent = (elm, name, opts) => {
|
|
1056
|
-
const ev = plt.ce(name, opts);
|
|
1057
|
-
elm.dispatchEvent(ev);
|
|
1058
|
-
return ev;
|
|
1059
|
-
};
|
|
1060
1241
|
const attachToAncestor = (hostRef, ancestorComponent) => {
|
|
1061
1242
|
if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent['s-p']) {
|
|
1062
1243
|
ancestorComponent['s-p'].push(new Promise((r) => (hostRef.$onRenderResolve$ = r)));
|
|
@@ -1064,10 +1245,10 @@ const attachToAncestor = (hostRef, ancestorComponent) => {
|
|
|
1064
1245
|
};
|
|
1065
1246
|
const scheduleUpdate = (hostRef, isInitialLoad) => {
|
|
1066
1247
|
{
|
|
1067
|
-
hostRef.$flags$ |= 16 /* isQueuedForUpdate */;
|
|
1248
|
+
hostRef.$flags$ |= 16 /* HOST_FLAGS.isQueuedForUpdate */;
|
|
1068
1249
|
}
|
|
1069
|
-
if (hostRef.$flags$ & 4 /* isWaitingForChildren */) {
|
|
1070
|
-
hostRef.$flags$ |= 512 /* needsRerender */;
|
|
1250
|
+
if (hostRef.$flags$ & 4 /* HOST_FLAGS.isWaitingForChildren */) {
|
|
1251
|
+
hostRef.$flags$ |= 512 /* HOST_FLAGS.needsRerender */;
|
|
1071
1252
|
return;
|
|
1072
1253
|
}
|
|
1073
1254
|
attachToAncestor(hostRef, hostRef.$ancestorComponent$);
|
|
@@ -1083,7 +1264,7 @@ const dispatchHooks = (hostRef, isInitialLoad) => {
|
|
|
1083
1264
|
let promise;
|
|
1084
1265
|
if (isInitialLoad) {
|
|
1085
1266
|
{
|
|
1086
|
-
hostRef.$flags$ |= 256 /* isListenReady */;
|
|
1267
|
+
hostRef.$flags$ |= 256 /* HOST_FLAGS.isListenReady */;
|
|
1087
1268
|
if (hostRef.$queuedListeners$) {
|
|
1088
1269
|
hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event));
|
|
1089
1270
|
hostRef.$queuedListeners$ = null;
|
|
@@ -1134,7 +1315,7 @@ const updateComponent = async (hostRef, instance, isInitialLoad) => {
|
|
|
1134
1315
|
}
|
|
1135
1316
|
else {
|
|
1136
1317
|
Promise.all(childrenPromises).then(postUpdate);
|
|
1137
|
-
hostRef.$flags$ |= 4 /* isWaitingForChildren */;
|
|
1318
|
+
hostRef.$flags$ |= 4 /* HOST_FLAGS.isWaitingForChildren */;
|
|
1138
1319
|
childrenPromises.length = 0;
|
|
1139
1320
|
}
|
|
1140
1321
|
}
|
|
@@ -1143,10 +1324,10 @@ const callRender = (hostRef, instance, elm) => {
|
|
|
1143
1324
|
try {
|
|
1144
1325
|
instance = instance.render() ;
|
|
1145
1326
|
{
|
|
1146
|
-
hostRef.$flags$ &= ~16 /* isQueuedForUpdate */;
|
|
1327
|
+
hostRef.$flags$ &= ~16 /* HOST_FLAGS.isQueuedForUpdate */;
|
|
1147
1328
|
}
|
|
1148
1329
|
{
|
|
1149
|
-
hostRef.$flags$ |= 2 /* hasRendered */;
|
|
1330
|
+
hostRef.$flags$ |= 2 /* HOST_FLAGS.hasRendered */;
|
|
1150
1331
|
}
|
|
1151
1332
|
{
|
|
1152
1333
|
{
|
|
@@ -1173,8 +1354,8 @@ const postUpdateComponent = (hostRef) => {
|
|
|
1173
1354
|
{
|
|
1174
1355
|
safeCall(instance, 'componentDidRender');
|
|
1175
1356
|
}
|
|
1176
|
-
if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
|
|
1177
|
-
hostRef.$flags$ |= 64 /* hasLoadedComponent */;
|
|
1357
|
+
if (!(hostRef.$flags$ & 64 /* HOST_FLAGS.hasLoadedComponent */)) {
|
|
1358
|
+
hostRef.$flags$ |= 64 /* HOST_FLAGS.hasLoadedComponent */;
|
|
1178
1359
|
{
|
|
1179
1360
|
// DOM WRITE!
|
|
1180
1361
|
addHydratedFlag(elm);
|
|
@@ -1206,10 +1387,10 @@ const postUpdateComponent = (hostRef) => {
|
|
|
1206
1387
|
hostRef.$onRenderResolve$();
|
|
1207
1388
|
hostRef.$onRenderResolve$ = undefined;
|
|
1208
1389
|
}
|
|
1209
|
-
if (hostRef.$flags$ & 512 /* needsRerender */) {
|
|
1390
|
+
if (hostRef.$flags$ & 512 /* HOST_FLAGS.needsRerender */) {
|
|
1210
1391
|
nextTick(() => scheduleUpdate(hostRef, false));
|
|
1211
1392
|
}
|
|
1212
|
-
hostRef.$flags$ &= ~(4 /* isWaitingForChildren */ | 512 /* needsRerender */);
|
|
1393
|
+
hostRef.$flags$ &= ~(4 /* HOST_FLAGS.isWaitingForChildren */ | 512 /* HOST_FLAGS.needsRerender */);
|
|
1213
1394
|
}
|
|
1214
1395
|
// ( •_•)
|
|
1215
1396
|
// ( •_•)>⌐■-■
|
|
@@ -1239,53 +1420,6 @@ const then = (promise, thenFn) => {
|
|
|
1239
1420
|
};
|
|
1240
1421
|
const addHydratedFlag = (elm) => elm.classList.add('hydrated')
|
|
1241
1422
|
;
|
|
1242
|
-
/**
|
|
1243
|
-
* Parse a new property value for a given property type.
|
|
1244
|
-
*
|
|
1245
|
-
* While the prop value can reasonably be expected to be of `any` type as far as TypeScript's type checker is concerned,
|
|
1246
|
-
* it is not safe to assume that the string returned by evaluating `typeof propValue` matches:
|
|
1247
|
-
* 1. `any`, the type given to `propValue` in the function signature
|
|
1248
|
-
* 2. the type stored from `propType`.
|
|
1249
|
-
*
|
|
1250
|
-
* This function provides the capability to parse/coerce a property's value to potentially any other JavaScript type.
|
|
1251
|
-
*
|
|
1252
|
-
* Property values represented in TSX preserve their type information. In the example below, the number 0 is passed to
|
|
1253
|
-
* a component. This `propValue` will preserve its type information (`typeof propValue === 'number'`). Note that is
|
|
1254
|
-
* based on the type of the value being passed in, not the type declared of the class member decorated with `@Prop`.
|
|
1255
|
-
* ```tsx
|
|
1256
|
-
* <my-cmp prop-val={0}></my-cmp>
|
|
1257
|
-
* ```
|
|
1258
|
-
*
|
|
1259
|
-
* HTML prop values on the other hand, will always a string
|
|
1260
|
-
*
|
|
1261
|
-
* @param propValue the new value to coerce to some type
|
|
1262
|
-
* @param propType the type of the prop, expressed as a binary number
|
|
1263
|
-
* @returns the parsed/coerced value
|
|
1264
|
-
*/
|
|
1265
|
-
const parsePropertyValue = (propValue, propType) => {
|
|
1266
|
-
// ensure this value is of the correct prop type
|
|
1267
|
-
if (propValue != null && !isComplexType(propValue)) {
|
|
1268
|
-
if (propType & 4 /* Boolean */) {
|
|
1269
|
-
// per the HTML spec, any string value means it is a boolean true value
|
|
1270
|
-
// but we'll cheat here and say that the string "false" is the boolean false
|
|
1271
|
-
return propValue === 'false' ? false : propValue === '' || !!propValue;
|
|
1272
|
-
}
|
|
1273
|
-
if (propType & 2 /* Number */) {
|
|
1274
|
-
// force it to be a number
|
|
1275
|
-
return parseFloat(propValue);
|
|
1276
|
-
}
|
|
1277
|
-
if (propType & 1 /* String */) {
|
|
1278
|
-
// could have been passed as a number or boolean
|
|
1279
|
-
// but we still want it as a string
|
|
1280
|
-
return String(propValue);
|
|
1281
|
-
}
|
|
1282
|
-
// redundant return here for better minification
|
|
1283
|
-
return propValue;
|
|
1284
|
-
}
|
|
1285
|
-
// not sure exactly what type we want
|
|
1286
|
-
// so no need to change to a different type
|
|
1287
|
-
return propValue;
|
|
1288
|
-
};
|
|
1289
1423
|
const getValue = (ref, propName) => getHostRef(ref).$instanceValues$.get(propName);
|
|
1290
1424
|
const setValue = (ref, propName, newVal, cmpMeta) => {
|
|
1291
1425
|
// check our new property value against our internal value
|
|
@@ -1298,13 +1432,13 @@ const setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
1298
1432
|
// explicitly check for NaN on both sides, as `NaN === NaN` is always false
|
|
1299
1433
|
const areBothNaN = Number.isNaN(oldVal) && Number.isNaN(newVal);
|
|
1300
1434
|
const didValueChange = newVal !== oldVal && !areBothNaN;
|
|
1301
|
-
if ((!(flags & 8 /* isConstructingInstance */) || oldVal === undefined) && didValueChange) {
|
|
1435
|
+
if ((!(flags & 8 /* HOST_FLAGS.isConstructingInstance */) || oldVal === undefined) && didValueChange) {
|
|
1302
1436
|
// gadzooks! the property's value has changed!!
|
|
1303
1437
|
// set our new value!
|
|
1304
1438
|
hostRef.$instanceValues$.set(propName, newVal);
|
|
1305
1439
|
if (instance) {
|
|
1306
1440
|
// get an array of method names of watch functions to call
|
|
1307
|
-
if (cmpMeta.$watchers$ && flags & 128 /* isWatchReady */) {
|
|
1441
|
+
if (cmpMeta.$watchers$ && flags & 128 /* HOST_FLAGS.isWatchReady */) {
|
|
1308
1442
|
const watchMethods = cmpMeta.$watchers$[propName];
|
|
1309
1443
|
if (watchMethods) {
|
|
1310
1444
|
// this instance is watching for when this property changed
|
|
@@ -1319,7 +1453,7 @@ const setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
1319
1453
|
});
|
|
1320
1454
|
}
|
|
1321
1455
|
}
|
|
1322
|
-
if ((flags & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
|
|
1456
|
+
if ((flags & (2 /* HOST_FLAGS.hasRendered */ | 16 /* HOST_FLAGS.isQueuedForUpdate */)) === 2 /* HOST_FLAGS.hasRendered */) {
|
|
1323
1457
|
// looks like this value actually changed, so we've got work to do!
|
|
1324
1458
|
// but only if we've already rendered, otherwise just chill out
|
|
1325
1459
|
// queue that we need to do an update, but don't worry about queuing
|
|
@@ -1329,6 +1463,16 @@ const setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
1329
1463
|
}
|
|
1330
1464
|
}
|
|
1331
1465
|
};
|
|
1466
|
+
/**
|
|
1467
|
+
* Attach a series of runtime constructs to a compiled Stencil component
|
|
1468
|
+
* constructor, including getters and setters for the `@Prop` and `@State`
|
|
1469
|
+
* decorators, callbacks for when attributes change, and so on.
|
|
1470
|
+
*
|
|
1471
|
+
* @param Cstr the constructor for a component that we need to process
|
|
1472
|
+
* @param cmpMeta metadata collected previously about the component
|
|
1473
|
+
* @param flags a number used to store a series of bit flags
|
|
1474
|
+
* @returns a reference to the same constructor passed in (but now mutated)
|
|
1475
|
+
*/
|
|
1332
1476
|
const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
1333
1477
|
if (cmpMeta.$members$) {
|
|
1334
1478
|
if (Cstr.watchers) {
|
|
@@ -1338,8 +1482,8 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1338
1482
|
const members = Object.entries(cmpMeta.$members$);
|
|
1339
1483
|
const prototype = Cstr.prototype;
|
|
1340
1484
|
members.map(([memberName, [memberFlags]]) => {
|
|
1341
|
-
if ((memberFlags & 31 /* Prop */ ||
|
|
1342
|
-
((flags & 2 /* proxyState */) && memberFlags & 32 /* State */))) {
|
|
1485
|
+
if ((memberFlags & 31 /* MEMBER_FLAGS.Prop */ ||
|
|
1486
|
+
((flags & 2 /* PROXY_FLAGS.proxyState */) && memberFlags & 32 /* MEMBER_FLAGS.State */))) {
|
|
1343
1487
|
// proxyComponent - prop
|
|
1344
1488
|
Object.defineProperty(prototype, memberName, {
|
|
1345
1489
|
get() {
|
|
@@ -1354,8 +1498,8 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1354
1498
|
enumerable: true,
|
|
1355
1499
|
});
|
|
1356
1500
|
}
|
|
1357
|
-
else if (flags & 1 /* isElementConstructor */ &&
|
|
1358
|
-
memberFlags & 64 /* Method */) {
|
|
1501
|
+
else if (flags & 1 /* PROXY_FLAGS.isElementConstructor */ &&
|
|
1502
|
+
memberFlags & 64 /* MEMBER_FLAGS.Method */) {
|
|
1359
1503
|
// proxyComponent - method
|
|
1360
1504
|
Object.defineProperty(prototype, memberName, {
|
|
1361
1505
|
value(...args) {
|
|
@@ -1365,7 +1509,7 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1365
1509
|
});
|
|
1366
1510
|
}
|
|
1367
1511
|
});
|
|
1368
|
-
if ((flags & 1 /* isElementConstructor */)) {
|
|
1512
|
+
if ((flags & 1 /* PROXY_FLAGS.isElementConstructor */)) {
|
|
1369
1513
|
const attrNameToPropName = new Map();
|
|
1370
1514
|
prototype.attributeChangedCallback = function (attrName, _oldValue, newValue) {
|
|
1371
1515
|
plt.jmp(() => {
|
|
@@ -1421,11 +1565,11 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1421
1565
|
// create an array of attributes to observe
|
|
1422
1566
|
// and also create a map of html attribute name to js property name
|
|
1423
1567
|
Cstr.observedAttributes = members
|
|
1424
|
-
.filter(([_, m]) => m[0] & 15 /* HasAttribute */) // filter to only keep props that should match attributes
|
|
1568
|
+
.filter(([_, m]) => m[0] & 15 /* MEMBER_FLAGS.HasAttribute */) // filter to only keep props that should match attributes
|
|
1425
1569
|
.map(([propName, m]) => {
|
|
1426
1570
|
const attrName = m[1] || propName;
|
|
1427
1571
|
attrNameToPropName.set(attrName, propName);
|
|
1428
|
-
if (m[0] & 512 /* ReflectAttr */) {
|
|
1572
|
+
if (m[0] & 512 /* MEMBER_FLAGS.ReflectAttr */) {
|
|
1429
1573
|
cmpMeta.$attrsToReflect$.push([propName, attrName]);
|
|
1430
1574
|
}
|
|
1431
1575
|
return attrName;
|
|
@@ -1436,10 +1580,10 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1436
1580
|
};
|
|
1437
1581
|
const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) => {
|
|
1438
1582
|
// initializeComponent
|
|
1439
|
-
if ((hostRef.$flags$ & 32 /* hasInitializedComponent */) === 0) {
|
|
1583
|
+
if ((hostRef.$flags$ & 32 /* HOST_FLAGS.hasInitializedComponent */) === 0) {
|
|
1440
1584
|
{
|
|
1441
1585
|
// we haven't initialized this element yet
|
|
1442
|
-
hostRef.$flags$ |= 32 /* hasInitializedComponent */;
|
|
1586
|
+
hostRef.$flags$ |= 32 /* HOST_FLAGS.hasInitializedComponent */;
|
|
1443
1587
|
// lazy loaded components
|
|
1444
1588
|
// request the component's implementation to be
|
|
1445
1589
|
// wired up with the host element
|
|
@@ -1457,7 +1601,7 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
|
|
|
1457
1601
|
{
|
|
1458
1602
|
cmpMeta.$watchers$ = Cstr.watchers;
|
|
1459
1603
|
}
|
|
1460
|
-
proxyComponent(Cstr, cmpMeta, 2 /* proxyState */);
|
|
1604
|
+
proxyComponent(Cstr, cmpMeta, 2 /* PROXY_FLAGS.proxyState */);
|
|
1461
1605
|
Cstr.isProxied = true;
|
|
1462
1606
|
}
|
|
1463
1607
|
const endNewInstance = createTime('createInstance', cmpMeta.$tagName$);
|
|
@@ -1465,7 +1609,7 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
|
|
|
1465
1609
|
// but let's keep track of when we start and stop
|
|
1466
1610
|
// so that the getters/setters don't incorrectly step on data
|
|
1467
1611
|
{
|
|
1468
|
-
hostRef.$flags$ |= 8 /* isConstructingInstance */;
|
|
1612
|
+
hostRef.$flags$ |= 8 /* HOST_FLAGS.isConstructingInstance */;
|
|
1469
1613
|
}
|
|
1470
1614
|
// construct the lazy-loaded component implementation
|
|
1471
1615
|
// passing the hostRef is very important during
|
|
@@ -1478,10 +1622,10 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
|
|
|
1478
1622
|
consoleError(e);
|
|
1479
1623
|
}
|
|
1480
1624
|
{
|
|
1481
|
-
hostRef.$flags$ &= ~8 /* isConstructingInstance */;
|
|
1625
|
+
hostRef.$flags$ &= ~8 /* HOST_FLAGS.isConstructingInstance */;
|
|
1482
1626
|
}
|
|
1483
1627
|
{
|
|
1484
|
-
hostRef.$flags$ |= 128 /* isWatchReady */;
|
|
1628
|
+
hostRef.$flags$ |= 128 /* HOST_FLAGS.isWatchReady */;
|
|
1485
1629
|
}
|
|
1486
1630
|
endNewInstance();
|
|
1487
1631
|
}
|
|
@@ -1491,7 +1635,7 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
|
|
|
1491
1635
|
const scopeId = getScopeId(cmpMeta);
|
|
1492
1636
|
if (!styles.has(scopeId)) {
|
|
1493
1637
|
const endRegisterStyles = createTime('registerStyles', cmpMeta.$tagName$);
|
|
1494
|
-
registerStyle(scopeId, style, !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */));
|
|
1638
|
+
registerStyle(scopeId, style, !!(cmpMeta.$flags$ & 1 /* CMP_FLAGS.shadowDomEncapsulation */));
|
|
1495
1639
|
endRegisterStyles();
|
|
1496
1640
|
}
|
|
1497
1641
|
}
|
|
@@ -1513,19 +1657,19 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
|
|
|
1513
1657
|
}
|
|
1514
1658
|
};
|
|
1515
1659
|
const connectedCallback = (elm) => {
|
|
1516
|
-
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
|
|
1660
|
+
if ((plt.$flags$ & 1 /* PLATFORM_FLAGS.isTmpDisconnected */) === 0) {
|
|
1517
1661
|
const hostRef = getHostRef(elm);
|
|
1518
1662
|
const cmpMeta = hostRef.$cmpMeta$;
|
|
1519
1663
|
const endConnected = createTime('connectedCallback', cmpMeta.$tagName$);
|
|
1520
|
-
if (!(hostRef.$flags$ & 1 /* hasConnected */)) {
|
|
1664
|
+
if (!(hostRef.$flags$ & 1 /* HOST_FLAGS.hasConnected */)) {
|
|
1521
1665
|
// first time this component has connected
|
|
1522
|
-
hostRef.$flags$ |= 1 /* hasConnected */;
|
|
1666
|
+
hostRef.$flags$ |= 1 /* HOST_FLAGS.hasConnected */;
|
|
1523
1667
|
{
|
|
1524
1668
|
// initUpdate
|
|
1525
1669
|
// if the slot polyfill is required we'll need to put some nodes
|
|
1526
1670
|
// in here to act as original content anchors as we move nodes around
|
|
1527
1671
|
// host element has been connected to the DOM
|
|
1528
|
-
if ((cmpMeta.$flags$ & (4 /* hasSlotRelocation */ | 8 /* needsShadowDomShim */))) {
|
|
1672
|
+
if ((cmpMeta.$flags$ & (4 /* CMP_FLAGS.hasSlotRelocation */ | 8 /* CMP_FLAGS.needsShadowDomShim */))) {
|
|
1529
1673
|
setContentReference(elm);
|
|
1530
1674
|
}
|
|
1531
1675
|
}
|
|
@@ -1548,7 +1692,7 @@ const connectedCallback = (elm) => {
|
|
|
1548
1692
|
// https://developers.google.com/web/fundamentals/web-components/best-practices#lazy-properties
|
|
1549
1693
|
if (cmpMeta.$members$) {
|
|
1550
1694
|
Object.entries(cmpMeta.$members$).map(([memberName, [memberFlags]]) => {
|
|
1551
|
-
if (memberFlags & 31 /* Prop */ && elm.hasOwnProperty(memberName)) {
|
|
1695
|
+
if (memberFlags & 31 /* MEMBER_FLAGS.Prop */ && elm.hasOwnProperty(memberName)) {
|
|
1552
1696
|
const value = elm[memberName];
|
|
1553
1697
|
delete elm[memberName];
|
|
1554
1698
|
elm[memberName] = value;
|
|
@@ -1580,7 +1724,7 @@ const setContentReference = (elm) => {
|
|
|
1580
1724
|
elm.insertBefore(contentRefElm, elm.firstChild);
|
|
1581
1725
|
};
|
|
1582
1726
|
const disconnectedCallback = (elm) => {
|
|
1583
|
-
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
|
|
1727
|
+
if ((plt.$flags$ & 1 /* PLATFORM_FLAGS.isTmpDisconnected */) === 0) {
|
|
1584
1728
|
const hostRef = getHostRef(elm);
|
|
1585
1729
|
const instance = hostRef.$lazyInstance$ ;
|
|
1586
1730
|
{
|
|
@@ -1635,7 +1779,7 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1635
1779
|
super(self);
|
|
1636
1780
|
self = this;
|
|
1637
1781
|
registerHost(self, cmpMeta);
|
|
1638
|
-
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
|
|
1782
|
+
if (cmpMeta.$flags$ & 1 /* CMP_FLAGS.shadowDomEncapsulation */) {
|
|
1639
1783
|
// this component is using shadow dom
|
|
1640
1784
|
// and this browser supports shadow dom
|
|
1641
1785
|
// add the read-only property "shadowRoot" to the host element
|
|
@@ -1670,7 +1814,7 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1670
1814
|
cmpMeta.$lazyBundleId$ = lazyBundle[0];
|
|
1671
1815
|
if (!exclude.includes(tagName) && !customElements.get(tagName)) {
|
|
1672
1816
|
cmpTags.push(tagName);
|
|
1673
|
-
customElements.define(tagName, proxyComponent(HostElement, cmpMeta, 1 /* isElementConstructor */));
|
|
1817
|
+
customElements.define(tagName, proxyComponent(HostElement, cmpMeta, 1 /* PROXY_FLAGS.isElementConstructor */));
|
|
1674
1818
|
}
|
|
1675
1819
|
});
|
|
1676
1820
|
});
|
|
@@ -1692,7 +1836,45 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1692
1836
|
// Fallback appLoad event
|
|
1693
1837
|
endBootstrap();
|
|
1694
1838
|
};
|
|
1695
|
-
const
|
|
1839
|
+
const addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) => {
|
|
1840
|
+
if (listeners) {
|
|
1841
|
+
listeners.map(([flags, name, method]) => {
|
|
1842
|
+
const target = getHostListenerTarget(elm, flags) ;
|
|
1843
|
+
const handler = hostListenerProxy(hostRef, method);
|
|
1844
|
+
const opts = hostListenerOpts(flags);
|
|
1845
|
+
plt.ael(target, name, handler, opts);
|
|
1846
|
+
(hostRef.$rmListeners$ = hostRef.$rmListeners$ || []).push(() => plt.rel(target, name, handler, opts));
|
|
1847
|
+
});
|
|
1848
|
+
}
|
|
1849
|
+
};
|
|
1850
|
+
const hostListenerProxy = (hostRef, methodName) => (ev) => {
|
|
1851
|
+
try {
|
|
1852
|
+
{
|
|
1853
|
+
if (hostRef.$flags$ & 256 /* HOST_FLAGS.isListenReady */) {
|
|
1854
|
+
// instance is ready, let's call it's member method for this event
|
|
1855
|
+
hostRef.$lazyInstance$[methodName](ev);
|
|
1856
|
+
}
|
|
1857
|
+
else {
|
|
1858
|
+
(hostRef.$queuedListeners$ = hostRef.$queuedListeners$ || []).push([methodName, ev]);
|
|
1859
|
+
}
|
|
1860
|
+
}
|
|
1861
|
+
}
|
|
1862
|
+
catch (e) {
|
|
1863
|
+
consoleError(e);
|
|
1864
|
+
}
|
|
1865
|
+
};
|
|
1866
|
+
const getHostListenerTarget = (elm, flags) => {
|
|
1867
|
+
if (flags & 4 /* LISTENER_FLAGS.TargetDocument */)
|
|
1868
|
+
return doc;
|
|
1869
|
+
if (flags & 8 /* LISTENER_FLAGS.TargetWindow */)
|
|
1870
|
+
return win;
|
|
1871
|
+
if (flags & 16 /* LISTENER_FLAGS.TargetBody */)
|
|
1872
|
+
return doc.body;
|
|
1873
|
+
return elm;
|
|
1874
|
+
};
|
|
1875
|
+
// prettier-ignore
|
|
1876
|
+
const hostListenerOpts = (flags) => (flags & 2 /* LISTENER_FLAGS.Capture */) !== 0;
|
|
1877
|
+
const hostRefs = /*@__PURE__*/ new WeakMap();
|
|
1696
1878
|
const getHostRef = (ref) => hostRefs.get(ref);
|
|
1697
1879
|
const registerInstance = (lazyInstance, hostRef) => hostRefs.set((hostRef.$lazyInstance$ = lazyInstance), hostRef);
|
|
1698
1880
|
const registerHost = (elm, cmpMeta) => {
|
|
@@ -1724,7 +1906,374 @@ const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
1724
1906
|
if (module) {
|
|
1725
1907
|
return module[exportName];
|
|
1726
1908
|
}
|
|
1909
|
+
|
|
1910
|
+
if (!hmrVersionId || !BUILD.hotModuleReplacement) {
|
|
1911
|
+
const processMod = importedModule => {
|
|
1912
|
+
cmpModules.set(bundleId, importedModule);
|
|
1913
|
+
return importedModule[exportName];
|
|
1914
|
+
}
|
|
1915
|
+
switch(bundleId) {
|
|
1916
|
+
|
|
1917
|
+
case 'z-app-switcher_9.cjs':
|
|
1918
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
1919
|
+
/* webpackMode: "lazy" */
|
|
1920
|
+
'./z-app-switcher_9.cjs.entry.js')); }).then(processMod, consoleError);
|
|
1921
|
+
case 'z-app-header.cjs':
|
|
1922
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
1923
|
+
/* webpackMode: "lazy" */
|
|
1924
|
+
'./z-app-header.cjs.entry.js')); }).then(processMod, consoleError);
|
|
1925
|
+
case 'z-aria-alert.cjs':
|
|
1926
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
1927
|
+
/* webpackMode: "lazy" */
|
|
1928
|
+
'./z-aria-alert.cjs.entry.js')); }).then(processMod, consoleError);
|
|
1929
|
+
case 'z-avatar.cjs':
|
|
1930
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
1931
|
+
/* webpackMode: "lazy" */
|
|
1932
|
+
'./z-avatar.cjs.entry.js')); }).then(processMod, consoleError);
|
|
1933
|
+
case 'z-button-deprecated.cjs':
|
|
1934
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
1935
|
+
/* webpackMode: "lazy" */
|
|
1936
|
+
'./z-button-deprecated.cjs.entry.js')); }).then(processMod, consoleError);
|
|
1937
|
+
case 'z-button-filter.cjs':
|
|
1938
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
1939
|
+
/* webpackMode: "lazy" */
|
|
1940
|
+
'./z-button-filter.cjs.entry.js')); }).then(processMod, consoleError);
|
|
1941
|
+
case 'z-button-sort.cjs':
|
|
1942
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
1943
|
+
/* webpackMode: "lazy" */
|
|
1944
|
+
'./z-button-sort.cjs.entry.js')); }).then(processMod, consoleError);
|
|
1945
|
+
case 'z-card.cjs':
|
|
1946
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
1947
|
+
/* webpackMode: "lazy" */
|
|
1948
|
+
'./z-card.cjs.entry.js')); }).then(processMod, consoleError);
|
|
1949
|
+
case 'z-carousel.cjs':
|
|
1950
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
1951
|
+
/* webpackMode: "lazy" */
|
|
1952
|
+
'./z-carousel.cjs.entry.js')); }).then(processMod, consoleError);
|
|
1953
|
+
case 'z-chip-deprecated.cjs':
|
|
1954
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
1955
|
+
/* webpackMode: "lazy" */
|
|
1956
|
+
'./z-chip-deprecated.cjs.entry.js')); }).then(processMod, consoleError);
|
|
1957
|
+
case 'z-combobox.cjs':
|
|
1958
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
1959
|
+
/* webpackMode: "lazy" */
|
|
1960
|
+
'./z-combobox.cjs.entry.js')); }).then(processMod, consoleError);
|
|
1961
|
+
case 'z-contextual-menu.cjs':
|
|
1962
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
1963
|
+
/* webpackMode: "lazy" */
|
|
1964
|
+
'./z-contextual-menu.cjs.entry.js')); }).then(processMod, consoleError);
|
|
1965
|
+
case 'z-cookiebar.cjs':
|
|
1966
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
1967
|
+
/* webpackMode: "lazy" */
|
|
1968
|
+
'./z-cookiebar.cjs.entry.js')); }).then(processMod, consoleError);
|
|
1969
|
+
case 'z-cover-hero.cjs':
|
|
1970
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
1971
|
+
/* webpackMode: "lazy" */
|
|
1972
|
+
'./z-cover-hero.cjs.entry.js')); }).then(processMod, consoleError);
|
|
1973
|
+
case 'z-date-picker.cjs':
|
|
1974
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
1975
|
+
/* webpackMode: "lazy" */
|
|
1976
|
+
'./z-date-picker.cjs.entry.js')); }).then(processMod, consoleError);
|
|
1977
|
+
case 'z-file.cjs':
|
|
1978
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
1979
|
+
/* webpackMode: "lazy" */
|
|
1980
|
+
'./z-file.cjs.entry.js')); }).then(processMod, consoleError);
|
|
1981
|
+
case 'z-file-upload.cjs':
|
|
1982
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
1983
|
+
/* webpackMode: "lazy" */
|
|
1984
|
+
'./z-file-upload.cjs.entry.js')); }).then(processMod, consoleError);
|
|
1985
|
+
case 'z-footer.cjs':
|
|
1986
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
1987
|
+
/* webpackMode: "lazy" */
|
|
1988
|
+
'./z-footer.cjs.entry.js')); }).then(processMod, consoleError);
|
|
1989
|
+
case 'z-icon-package.cjs':
|
|
1990
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
1991
|
+
/* webpackMode: "lazy" */
|
|
1992
|
+
'./z-icon-package.cjs.entry.js')); }).then(processMod, consoleError);
|
|
1993
|
+
case 'z-info-box.cjs':
|
|
1994
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
1995
|
+
/* webpackMode: "lazy" */
|
|
1996
|
+
'./z-info-box.cjs.entry.js')); }).then(processMod, consoleError);
|
|
1997
|
+
case 'z-info-reveal.cjs':
|
|
1998
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
1999
|
+
/* webpackMode: "lazy" */
|
|
2000
|
+
'./z-info-reveal.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2001
|
+
case 'z-input-deprecated.cjs':
|
|
2002
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2003
|
+
/* webpackMode: "lazy" */
|
|
2004
|
+
'./z-input-deprecated.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2005
|
+
case 'z-menu.cjs':
|
|
2006
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2007
|
+
/* webpackMode: "lazy" */
|
|
2008
|
+
'./z-menu.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2009
|
+
case 'z-menu-section.cjs':
|
|
2010
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2011
|
+
/* webpackMode: "lazy" */
|
|
2012
|
+
'./z-menu-section.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2013
|
+
case 'z-messages-pocket.cjs':
|
|
2014
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2015
|
+
/* webpackMode: "lazy" */
|
|
2016
|
+
'./z-messages-pocket.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2017
|
+
case 'z-modal-login.cjs':
|
|
2018
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2019
|
+
/* webpackMode: "lazy" */
|
|
2020
|
+
'./z-modal-login.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2021
|
+
case 'z-myz-card-alert.cjs':
|
|
2022
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2023
|
+
/* webpackMode: "lazy" */
|
|
2024
|
+
'./z-myz-card-alert.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2025
|
+
case 'z-myz-card-dictionary.cjs':
|
|
2026
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2027
|
+
/* webpackMode: "lazy" */
|
|
2028
|
+
'./z-myz-card-dictionary.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2029
|
+
case 'z-myz-card-footer.cjs':
|
|
2030
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2031
|
+
/* webpackMode: "lazy" */
|
|
2032
|
+
'./z-myz-card-footer.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2033
|
+
case 'z-myz-card-footer-sections.cjs':
|
|
2034
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2035
|
+
/* webpackMode: "lazy" */
|
|
2036
|
+
'./z-myz-card-footer-sections.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2037
|
+
case 'z-myz-card-icon.cjs':
|
|
2038
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2039
|
+
/* webpackMode: "lazy" */
|
|
2040
|
+
'./z-myz-card-icon.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2041
|
+
case 'z-myz-card-info.cjs':
|
|
2042
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2043
|
+
/* webpackMode: "lazy" */
|
|
2044
|
+
'./z-myz-card-info.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2045
|
+
case 'z-myz-card-list.cjs':
|
|
2046
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2047
|
+
/* webpackMode: "lazy" */
|
|
2048
|
+
'./z-myz-card-list.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2049
|
+
case 'z-myz-topbar.cjs':
|
|
2050
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2051
|
+
/* webpackMode: "lazy" */
|
|
2052
|
+
'./z-myz-topbar.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2053
|
+
case 'z-navigation-tab.cjs':
|
|
2054
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2055
|
+
/* webpackMode: "lazy" */
|
|
2056
|
+
'./z-navigation-tab.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2057
|
+
case 'z-navigation-tab-link.cjs':
|
|
2058
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2059
|
+
/* webpackMode: "lazy" */
|
|
2060
|
+
'./z-navigation-tab-link.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2061
|
+
case 'z-navigation-tabs.cjs':
|
|
2062
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2063
|
+
/* webpackMode: "lazy" */
|
|
2064
|
+
'./z-navigation-tabs.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2065
|
+
case 'z-notification.cjs':
|
|
2066
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2067
|
+
/* webpackMode: "lazy" */
|
|
2068
|
+
'./z-notification.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2069
|
+
case 'z-offcanvas.cjs':
|
|
2070
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2071
|
+
/* webpackMode: "lazy" */
|
|
2072
|
+
'./z-offcanvas.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2073
|
+
case 'z-otp.cjs':
|
|
2074
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2075
|
+
/* webpackMode: "lazy" */
|
|
2076
|
+
'./z-otp.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2077
|
+
case 'z-pagination.cjs':
|
|
2078
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2079
|
+
/* webpackMode: "lazy" */
|
|
2080
|
+
'./z-pagination.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2081
|
+
case 'z-pagination-bar.cjs':
|
|
2082
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2083
|
+
/* webpackMode: "lazy" */
|
|
2084
|
+
'./z-pagination-bar.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2085
|
+
case 'z-panel-elem.cjs':
|
|
2086
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2087
|
+
/* webpackMode: "lazy" */
|
|
2088
|
+
'./z-panel-elem.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2089
|
+
case 'z-pocket-message.cjs':
|
|
2090
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2091
|
+
/* webpackMode: "lazy" */
|
|
2092
|
+
'./z-pocket-message.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2093
|
+
case 'z-popover-deprecated.cjs':
|
|
2094
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2095
|
+
/* webpackMode: "lazy" */
|
|
2096
|
+
'./z-popover-deprecated.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2097
|
+
case 'z-section-title.cjs':
|
|
2098
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2099
|
+
/* webpackMode: "lazy" */
|
|
2100
|
+
'./z-section-title.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2101
|
+
case 'z-skip-to-content.cjs':
|
|
2102
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2103
|
+
/* webpackMode: "lazy" */
|
|
2104
|
+
'./z-skip-to-content.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2105
|
+
case 'z-slideshow.cjs':
|
|
2106
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2107
|
+
/* webpackMode: "lazy" */
|
|
2108
|
+
'./z-slideshow.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2109
|
+
case 'z-status-tag.cjs':
|
|
2110
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2111
|
+
/* webpackMode: "lazy" */
|
|
2112
|
+
'./z-status-tag.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2113
|
+
case 'z-stepper.cjs':
|
|
2114
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2115
|
+
/* webpackMode: "lazy" */
|
|
2116
|
+
'./z-stepper.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2117
|
+
case 'z-stepper-item.cjs':
|
|
2118
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2119
|
+
/* webpackMode: "lazy" */
|
|
2120
|
+
'./z-stepper-item.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2121
|
+
case 'z-table.cjs':
|
|
2122
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2123
|
+
/* webpackMode: "lazy" */
|
|
2124
|
+
'./z-table.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2125
|
+
case 'z-table-body.cjs':
|
|
2126
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2127
|
+
/* webpackMode: "lazy" */
|
|
2128
|
+
'./z-table-body.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2129
|
+
case 'z-table-expanded-row.cjs':
|
|
2130
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2131
|
+
/* webpackMode: "lazy" */
|
|
2132
|
+
'./z-table-expanded-row.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2133
|
+
case 'z-table-footer.cjs':
|
|
2134
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2135
|
+
/* webpackMode: "lazy" */
|
|
2136
|
+
'./z-table-footer.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2137
|
+
case 'z-table-head.cjs':
|
|
2138
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2139
|
+
/* webpackMode: "lazy" */
|
|
2140
|
+
'./z-table-head.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2141
|
+
case 'z-table-header-row.cjs':
|
|
2142
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2143
|
+
/* webpackMode: "lazy" */
|
|
2144
|
+
'./z-table-header-row.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2145
|
+
case 'z-table-row.cjs':
|
|
2146
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2147
|
+
/* webpackMode: "lazy" */
|
|
2148
|
+
'./z-table-row.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2149
|
+
case 'z-table-sticky-footer.cjs':
|
|
2150
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2151
|
+
/* webpackMode: "lazy" */
|
|
2152
|
+
'./z-table-sticky-footer.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2153
|
+
case 'z-tag.cjs':
|
|
2154
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2155
|
+
/* webpackMode: "lazy" */
|
|
2156
|
+
'./z-tag.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2157
|
+
case 'z-toast-notification.cjs':
|
|
2158
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2159
|
+
/* webpackMode: "lazy" */
|
|
2160
|
+
'./z-toast-notification.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2161
|
+
case 'z-toast-notification-list.cjs':
|
|
2162
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2163
|
+
/* webpackMode: "lazy" */
|
|
2164
|
+
'./z-toast-notification-list.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2165
|
+
case 'z-toggle-button.cjs':
|
|
2166
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2167
|
+
/* webpackMode: "lazy" */
|
|
2168
|
+
'./z-toggle-button.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2169
|
+
case 'z-toggle-switch.cjs':
|
|
2170
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2171
|
+
/* webpackMode: "lazy" */
|
|
2172
|
+
'./z-toggle-switch.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2173
|
+
case 'z-tooltip.cjs':
|
|
2174
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2175
|
+
/* webpackMode: "lazy" */
|
|
2176
|
+
'./z-tooltip.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2177
|
+
case 'z-tooltip-deprecated.cjs':
|
|
2178
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2179
|
+
/* webpackMode: "lazy" */
|
|
2180
|
+
'./z-tooltip-deprecated.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2181
|
+
case 'z-user-dropdown.cjs':
|
|
2182
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2183
|
+
/* webpackMode: "lazy" */
|
|
2184
|
+
'./z-user-dropdown.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2185
|
+
case 'z-visually-hidden.cjs':
|
|
2186
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2187
|
+
/* webpackMode: "lazy" */
|
|
2188
|
+
'./z-visually-hidden.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2189
|
+
case 'z-alert.cjs':
|
|
2190
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2191
|
+
/* webpackMode: "lazy" */
|
|
2192
|
+
'./z-alert.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2193
|
+
case 'z-candybar.cjs':
|
|
2194
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2195
|
+
/* webpackMode: "lazy" */
|
|
2196
|
+
'./z-candybar.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2197
|
+
case 'z-chip.cjs':
|
|
2198
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2199
|
+
/* webpackMode: "lazy" */
|
|
2200
|
+
'./z-chip.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2201
|
+
case 'z-dragdrop-area_2.cjs':
|
|
2202
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2203
|
+
/* webpackMode: "lazy" */
|
|
2204
|
+
'./z-dragdrop-area_2.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2205
|
+
case 'z-footer-link_3.cjs':
|
|
2206
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2207
|
+
/* webpackMode: "lazy" */
|
|
2208
|
+
'./z-footer-link_3.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2209
|
+
case 'z-ghost-loading.cjs':
|
|
2210
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2211
|
+
/* webpackMode: "lazy" */
|
|
2212
|
+
'./z-ghost-loading.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2213
|
+
case 'z-input-label_2.cjs':
|
|
2214
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2215
|
+
/* webpackMode: "lazy" */
|
|
2216
|
+
'./z-input-label_2.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2217
|
+
case 'z-list-group.cjs':
|
|
2218
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2219
|
+
/* webpackMode: "lazy" */
|
|
2220
|
+
'./z-list-group.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2221
|
+
case 'z-menu-dropdown_2.cjs':
|
|
2222
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2223
|
+
/* webpackMode: "lazy" */
|
|
2224
|
+
'./z-menu-dropdown_2.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2225
|
+
case 'z-myz-card_4.cjs':
|
|
2226
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2227
|
+
/* webpackMode: "lazy" */
|
|
2228
|
+
'./z-myz-card_4.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2229
|
+
case 'z-pagination-page.cjs':
|
|
2230
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2231
|
+
/* webpackMode: "lazy" */
|
|
2232
|
+
'./z-pagination-page.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2233
|
+
case 'z-pocket_3.cjs':
|
|
2234
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2235
|
+
/* webpackMode: "lazy" */
|
|
2236
|
+
'./z-pocket_3.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2237
|
+
case 'z-table-cell.cjs':
|
|
2238
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2239
|
+
/* webpackMode: "lazy" */
|
|
2240
|
+
'./z-table-cell.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2241
|
+
case 'z-table-empty-box.cjs':
|
|
2242
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2243
|
+
/* webpackMode: "lazy" */
|
|
2244
|
+
'./z-table-empty-box.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2245
|
+
case 'z-table-header.cjs':
|
|
2246
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2247
|
+
/* webpackMode: "lazy" */
|
|
2248
|
+
'./z-table-header.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2249
|
+
case 'z-modal.cjs':
|
|
2250
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2251
|
+
/* webpackMode: "lazy" */
|
|
2252
|
+
'./z-modal.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2253
|
+
case 'z-list_2.cjs':
|
|
2254
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2255
|
+
/* webpackMode: "lazy" */
|
|
2256
|
+
'./z-list_2.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2257
|
+
case 'z-myz-list-item.cjs':
|
|
2258
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2259
|
+
/* webpackMode: "lazy" */
|
|
2260
|
+
'./z-myz-list-item.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2261
|
+
case 'z-popover.cjs':
|
|
2262
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2263
|
+
/* webpackMode: "lazy" */
|
|
2264
|
+
'./z-popover.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2265
|
+
case 'z-body_2.cjs':
|
|
2266
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2267
|
+
/* webpackMode: "lazy" */
|
|
2268
|
+
'./z-body_2.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2269
|
+
case 'z-button.cjs':
|
|
2270
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2271
|
+
/* webpackMode: "lazy" */
|
|
2272
|
+
'./z-button.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2273
|
+
}
|
|
2274
|
+
}
|
|
1727
2275
|
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2276
|
+
/* @vite-ignore */
|
|
1728
2277
|
/* webpackInclude: /\.entry\.js$/ */
|
|
1729
2278
|
/* webpackExclude: /\.system\.entry\.js$/ */
|
|
1730
2279
|
/* webpackMode: "lazy" */
|
|
@@ -1735,14 +2284,35 @@ const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
1735
2284
|
return importedModule[exportName];
|
|
1736
2285
|
}, consoleError);
|
|
1737
2286
|
};
|
|
1738
|
-
const styles = new Map();
|
|
2287
|
+
const styles = /*@__PURE__*/ new Map();
|
|
2288
|
+
const win = typeof window !== 'undefined' ? window : {};
|
|
2289
|
+
const doc = win.document || { head: {} };
|
|
2290
|
+
const plt = {
|
|
2291
|
+
$flags$: 0,
|
|
2292
|
+
$resourcesUrl$: '',
|
|
2293
|
+
jmp: (h) => h(),
|
|
2294
|
+
raf: (h) => requestAnimationFrame(h),
|
|
2295
|
+
ael: (el, eventName, listener, opts) => el.addEventListener(eventName, listener, opts),
|
|
2296
|
+
rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),
|
|
2297
|
+
ce: (eventName, opts) => new CustomEvent(eventName, opts),
|
|
2298
|
+
};
|
|
2299
|
+
const promiseResolve = (v) => Promise.resolve(v);
|
|
2300
|
+
const supportsConstructableStylesheets = /*@__PURE__*/ (() => {
|
|
2301
|
+
try {
|
|
2302
|
+
new CSSStyleSheet();
|
|
2303
|
+
return typeof new CSSStyleSheet().replaceSync === 'function';
|
|
2304
|
+
}
|
|
2305
|
+
catch (e) { }
|
|
2306
|
+
return false;
|
|
2307
|
+
})()
|
|
2308
|
+
;
|
|
1739
2309
|
const queueDomReads = [];
|
|
1740
2310
|
const queueDomWrites = [];
|
|
1741
2311
|
const queueTask = (queue, write) => (cb) => {
|
|
1742
2312
|
queue.push(cb);
|
|
1743
2313
|
if (!queuePending) {
|
|
1744
2314
|
queuePending = true;
|
|
1745
|
-
if (write && plt.$flags$ & 4 /* queueSync */) {
|
|
2315
|
+
if (write && plt.$flags$ & 4 /* PLATFORM_FLAGS.queueSync */) {
|
|
1746
2316
|
nextTick(flush);
|
|
1747
2317
|
}
|
|
1748
2318
|
else {
|