@ionic/core 8.5.7-dev.11746044124.147aab6c → 8.5.7-dev.11747180955.1e468923
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/action-sheet.js +37 -23
- package/components/alert.js +42 -26
- package/components/animation.js +2 -2
- package/components/backdrop.js +11 -4
- package/components/button-active.js +1 -1
- package/components/button.js +30 -24
- package/components/buttons.js +14 -4
- package/components/capacitor.js +1 -1
- package/components/checkbox.js +43 -26
- package/components/config.js +1 -1
- package/components/content.js +24 -5
- package/components/data.js +31 -6
- package/components/gesture-controller.js +1 -1
- package/components/haptic.js +1 -1
- package/components/hardware-back-button.js +2 -2
- package/components/header.js +12 -7
- package/components/helpers.js +3 -6
- package/components/icon.js +1 -2
- package/components/index2.js +1 -1
- package/components/index3.js +3 -5
- package/components/index4.js +1 -1
- package/components/index5.js +2 -2
- package/components/index6.js +28 -3
- package/components/index7.js +163 -27
- package/components/index8.js +1 -1
- package/components/index9.js +3 -163
- package/components/input-shims.js +20 -2
- package/components/input.utils.js +2 -2
- package/components/ion-accordion-group.js +20 -7
- package/components/ion-accordion.js +32 -14
- package/components/ion-app.js +4 -5
- package/components/ion-avatar.js +2 -4
- package/components/ion-back-button.js +12 -13
- package/components/ion-badge.js +2 -5
- package/components/ion-breadcrumb.js +22 -20
- package/components/ion-breadcrumbs.js +14 -10
- package/components/ion-card-content.js +2 -4
- package/components/ion-card-header.js +7 -5
- package/components/ion-card-subtitle.js +2 -5
- package/components/ion-card-title.js +2 -5
- package/components/ion-card.js +16 -11
- package/components/ion-chip.js +8 -5
- package/components/ion-col.js +1 -26
- package/components/ion-datetime-button.js +16 -14
- package/components/ion-datetime.js +197 -82
- package/components/ion-fab-button.js +37 -20
- package/components/ion-fab-list.js +7 -2
- package/components/ion-fab.js +10 -4
- package/components/ion-footer.js +13 -8
- package/components/ion-grid.js +4 -2
- package/components/ion-img.js +1 -6
- package/components/ion-infinite-scroll-content.js +2 -6
- package/components/ion-infinite-scroll.js +27 -6
- package/components/ion-input-password-toggle.js +8 -10
- package/components/ion-input.js +80 -63
- package/components/ion-item-divider.js +9 -5
- package/components/ion-item-group.js +2 -4
- package/components/ion-item-option.js +14 -12
- package/components/ion-item-options.js +6 -4
- package/components/ion-item-sliding.js +5 -3
- package/components/ion-loading.js +36 -19
- package/components/ion-menu-button.js +15 -10
- package/components/ion-menu-toggle.js +9 -5
- package/components/ion-menu.js +26 -10
- package/components/ion-nav-link.js +6 -6
- package/components/ion-nav.js +8 -11
- package/components/ion-note.js +2 -5
- package/components/ion-picker-legacy.js +45 -25
- package/components/ion-progress-bar.js +19 -6
- package/components/ion-range.js +66 -26
- package/components/ion-refresher-content.js +1 -5
- package/components/ion-refresher.js +55 -7
- package/components/ion-reorder-group.js +6 -4
- package/components/ion-reorder.js +3 -5
- package/components/ion-route-redirect.js +0 -2
- package/components/ion-route.js +9 -7
- package/components/ion-router-link.js +7 -9
- package/components/ion-router-outlet.js +11 -9
- package/components/ion-router.js +19 -1
- package/components/ion-row.js +1 -2
- package/components/ion-searchbar.js +78 -29
- package/components/ion-segment-button.js +20 -11
- package/components/ion-segment-content.js +1 -2
- package/components/ion-segment-view.js +5 -5
- package/components/ion-segment.js +22 -11
- package/components/ion-select-option.js +4 -3
- package/components/ion-select.js +68 -45
- package/components/ion-skeleton-text.js +4 -2
- package/components/ion-split-pane.js +11 -6
- package/components/ion-tab-bar.js +7 -6
- package/components/ion-tab-button.js +10 -12
- package/components/ion-tab.js +3 -6
- package/components/ion-tabs.js +4 -5
- package/components/ion-text.js +1 -3
- package/components/ion-textarea.js +72 -47
- package/components/ion-thumbnail.js +1 -2
- package/components/ion-toast.js +56 -33
- package/components/ion-toggle.js +55 -31
- package/components/ionic-global.js +1 -1
- package/components/item.js +20 -14
- package/components/keyboard-controller.js +2 -2
- package/components/keyboard.js +134 -69
- package/components/keyboard2.js +69 -134
- package/components/label.js +2 -6
- package/components/list-header.js +2 -6
- package/components/list.js +5 -5
- package/components/modal.js +118 -40
- package/components/notch-controller.js +1 -1
- package/components/overlays.js +3 -3
- package/components/picker-column-option.js +18 -5
- package/components/picker-column.js +25 -10
- package/components/picker-column2.js +5 -8
- package/components/picker.js +2 -4
- package/components/popover.js +130 -38
- package/components/radio-group.js +10 -10
- package/components/radio.js +27 -13
- package/components/refresher.utils.js +2 -2
- package/components/ripple-effect.js +10 -2
- package/components/select-modal.js +3 -8
- package/components/select-popover.js +5 -8
- package/components/spinner.js +4 -5
- package/components/swipe-back.js +1 -1
- package/components/title.js +2 -6
- package/components/toolbar.js +2 -5
- package/css/global.bundle.css +1 -1
- package/css/global.bundle.css.map +1 -1
- package/css/ionic.bundle.css +1 -1
- package/css/ionic.bundle.css.map +1 -1
- package/css/structure.css +1 -1
- package/css/structure.css.map +1 -1
- package/dist/cjs/{animation-ab2d3449.js → animation-CIZtxug4.js} +2 -2
- package/dist/cjs/{app-globals-ddceb1f4.js → app-globals-CWtQHdcK.js} +1 -1
- package/dist/cjs/{button-active-43e2b419.js → button-active-BzpKQ5zN.js} +3 -3
- package/dist/cjs/{capacitor-c04564bf.js → capacitor-DmA66EwP.js} +1 -1
- package/dist/cjs/{config-f6225ae7.js → config-ByqNVsV-.js} +1 -1
- package/dist/cjs/{data-94e8d392.js → data-BOIdk4ZX.js} +30 -5
- package/dist/cjs/{framework-delegate-862d9d00.js → framework-delegate-BZr8Dger.js} +1 -1
- package/dist/cjs/{gesture-controller-9436f482.js → gesture-controller-dtqlP_q4.js} +1 -1
- package/dist/cjs/{haptic-f6b37aa3.js → haptic-ClPPQ_PS.js} +1 -1
- package/dist/cjs/{hardware-back-button-3d2b1004.js → hardware-back-button-BhLS9ov9.js} +2 -2
- package/dist/cjs/{helpers-8a48fdea.js → helpers-BWWnt1yc.js} +2 -5
- package/dist/cjs/{index-1eff7149.js → index-C6GLB0dQ.js} +5 -5
- package/dist/cjs/{index-ee07ed59.js → index-CAvQ7Tka.js} +3 -4
- package/dist/cjs/{index-073c7cdc.js → index-CPbAsnJK.js} +1 -0
- package/dist/cjs/{index-31b07b9c.js → index-CfS4TqIo.js} +3 -3
- package/dist/cjs/{index-a96d31ae.js → index-CrE5792q.js} +9 -9
- package/dist/cjs/{index-dbe01e08.js → index-CrVjA49i.js} +3 -3
- package/dist/cjs/{index-2e236a04.js → index-qOuhvt-6.js} +1395 -671
- package/dist/cjs/index.cjs.js +20 -24
- package/dist/cjs/{input-shims-415be7ee.js → input-shims-BIfSj_O3.js} +24 -6
- package/dist/cjs/{input.utils-a7957fd6.js → input.utils-DQKGaXXm.js} +3 -3
- package/dist/cjs/ion-accordion_2.cjs.entry.js +56 -27
- package/dist/cjs/ion-action-sheet.cjs.entry.js +50 -38
- package/dist/cjs/ion-alert.cjs.entry.js +55 -41
- package/dist/cjs/ion-app_8.cjs.entry.js +96 -65
- package/dist/cjs/ion-avatar_3.cjs.entry.js +9 -17
- package/dist/cjs/ion-back-button.cjs.entry.js +16 -19
- package/dist/cjs/ion-backdrop.cjs.entry.js +14 -9
- package/dist/cjs/ion-breadcrumb_2.cjs.entry.js +39 -35
- package/dist/cjs/ion-button_2.cjs.entry.js +33 -30
- package/dist/cjs/ion-card_5.cjs.entry.js +33 -36
- package/dist/cjs/ion-checkbox.cjs.entry.js +48 -33
- package/dist/cjs/ion-chip.cjs.entry.js +12 -11
- package/dist/cjs/ion-col_3.cjs.entry.js +9 -35
- package/dist/cjs/ion-datetime-button.cjs.entry.js +20 -20
- package/dist/cjs/ion-datetime_3.cjs.entry.js +251 -122
- package/dist/cjs/ion-fab_3.cjs.entry.js +58 -32
- package/dist/cjs/ion-img.cjs.entry.js +5 -12
- package/dist/cjs/ion-infinite-scroll_2.cjs.entry.js +35 -20
- package/dist/cjs/ion-input-password-toggle.cjs.entry.js +11 -15
- package/dist/cjs/ion-input.cjs.entry.js +87 -72
- package/dist/cjs/ion-item-option_3.cjs.entry.js +32 -28
- package/dist/cjs/ion-item_8.cjs.entry.js +50 -53
- package/dist/cjs/ion-loading.cjs.entry.js +46 -31
- package/dist/cjs/ion-menu_3.cjs.entry.js +62 -39
- package/dist/cjs/ion-modal.cjs.entry.js +128 -52
- package/dist/cjs/ion-nav_2.cjs.entry.js +17 -22
- package/dist/cjs/ion-picker-column-option.cjs.entry.js +23 -12
- package/dist/cjs/ion-picker-column.cjs.entry.js +31 -18
- package/dist/cjs/ion-picker.cjs.entry.js +5 -9
- package/dist/cjs/ion-popover.cjs.entry.js +137 -47
- package/dist/cjs/ion-progress-bar.cjs.entry.js +23 -12
- package/dist/cjs/ion-radio_2.cjs.entry.js +43 -31
- package/dist/cjs/ion-range.cjs.entry.js +71 -33
- package/dist/cjs/ion-refresher_2.cjs.entry.js +68 -26
- package/dist/cjs/ion-reorder_2.cjs.entry.js +17 -19
- package/dist/cjs/ion-ripple-effect.cjs.entry.js +13 -7
- package/dist/cjs/ion-route_4.cjs.entry.js +35 -21
- package/dist/cjs/ion-searchbar.cjs.entry.js +84 -37
- package/dist/cjs/ion-segment-content.cjs.entry.js +2 -5
- package/dist/cjs/ion-segment-view.cjs.entry.js +6 -8
- package/dist/cjs/ion-segment_2.cjs.entry.js +48 -30
- package/dist/cjs/ion-select-modal.cjs.entry.js +13 -20
- package/dist/cjs/ion-select_3.cjs.entry.js +88 -69
- package/dist/cjs/ion-spinner.cjs.entry.js +9 -12
- package/dist/cjs/ion-split-pane.cjs.entry.js +13 -10
- package/dist/cjs/ion-tab-bar_2.cjs.entry.js +26 -29
- package/dist/cjs/ion-tab_2.cjs.entry.js +9 -15
- package/dist/cjs/ion-text.cjs.entry.js +5 -9
- package/dist/cjs/ion-textarea.cjs.entry.js +79 -56
- package/dist/cjs/ion-toast.cjs.entry.js +65 -44
- package/dist/cjs/ion-toggle.cjs.entry.js +66 -44
- package/dist/cjs/{ionic-global-6dea5a96.js → ionic-global-BC3ee-Wa.js} +2 -2
- package/dist/cjs/ionic.cjs.js +9 -9
- package/dist/cjs/{ios.transition-a131cd4d.js → ios.transition-C9J4bBGV.js} +6 -6
- package/dist/cjs/{keyboard-0272231f.js → keyboard-UuAS4D_9.js} +1 -1
- package/dist/cjs/{keyboard-controller-c05e747a.js → keyboard-controller-GXBiBRKS.js} +2 -2
- package/dist/cjs/{keyboard-af1bb365.js → keyboard-hHzlEQpk.js} +3 -3
- package/dist/cjs/loader.cjs.js +5 -7
- package/dist/cjs/{md.transition-e018ebe5.js → md.transition-DT8PB4eS.js} +6 -6
- package/dist/cjs/{notch-controller-09b7f358.js → notch-controller-CARhSI1k.js} +2 -2
- package/dist/cjs/{overlays-4c291a05.js → overlays-B4rlyxhY.js} +7 -7
- package/dist/cjs/{status-tap-f1acefac.js → status-tap-B8fjNFjq.js} +4 -4
- package/dist/cjs/{swipe-back-4918e56b.js → swipe-back-N5-bJv4m.js} +5 -5
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/accordion/accordion.js +43 -13
- package/dist/collection/components/accordion-group/accordion-group.js +35 -8
- package/dist/collection/components/action-sheet/action-sheet.js +84 -31
- package/dist/collection/components/alert/alert.js +94 -34
- package/dist/collection/components/back-button/back-button.js +30 -14
- package/dist/collection/components/backdrop/backdrop.js +18 -3
- package/dist/collection/components/badge/badge.js +3 -4
- package/dist/collection/components/breadcrumb/breadcrumb.js +57 -26
- package/dist/collection/components/breadcrumbs/breadcrumbs.js +24 -10
- package/dist/collection/components/button/button.js +74 -33
- package/dist/collection/components/buttons/buttons.js +15 -1
- package/dist/collection/components/card/card.js +44 -16
- package/dist/collection/components/card-header/card-header.js +11 -3
- package/dist/collection/components/card-subtitle/card-subtitle.js +3 -4
- package/dist/collection/components/card-title/card-title.js +3 -4
- package/dist/collection/components/checkbox/checkbox.js +77 -34
- package/dist/collection/components/chip/chip.js +15 -4
- package/dist/collection/components/col/col.js +72 -50
- package/dist/collection/components/content/content.js +43 -9
- package/dist/collection/components/datetime/datetime.ios.css +7 -2
- package/dist/collection/components/datetime/datetime.js +298 -98
- package/dist/collection/components/datetime/datetime.md.css +9 -3
- package/dist/collection/components/datetime/utils/data.js +29 -4
- package/dist/collection/components/datetime-button/datetime-button.js +21 -11
- package/dist/collection/components/fab/fab.js +21 -6
- package/dist/collection/components/fab-button/fab-button.js +76 -28
- package/dist/collection/components/fab-list/fab-list.js +12 -2
- package/dist/collection/components/footer/footer.js +16 -5
- package/dist/collection/components/grid/grid.js +6 -1
- package/dist/collection/components/header/header.js +15 -4
- package/dist/collection/components/img/img.js +6 -6
- package/dist/collection/components/infinite-scroll/infinite-scroll.js +35 -7
- package/dist/collection/components/infinite-scroll-content/infinite-scroll-content.js +6 -4
- package/dist/collection/components/input/input.js +179 -91
- package/dist/collection/components/input-password-toggle/input-password-toggle.js +16 -8
- package/dist/collection/components/item/item.js +56 -21
- package/dist/collection/components/item-divider/item-divider.js +13 -3
- package/dist/collection/components/item-option/item-option.js +36 -16
- package/dist/collection/components/item-options/item-options.js +7 -1
- package/dist/collection/components/item-sliding/item-sliding.js +6 -1
- package/dist/collection/components/label/label.js +6 -4
- package/dist/collection/components/list/list.js +9 -3
- package/dist/collection/components/list-header/list-header.js +6 -6
- package/dist/collection/components/loading/loading.js +86 -29
- package/dist/collection/components/menu/menu.js +42 -10
- package/dist/collection/components/menu-button/menu-button.js +27 -10
- package/dist/collection/components/menu-toggle/menu-toggle.js +14 -5
- package/dist/collection/components/modal/modal.js +188 -51
- package/dist/collection/components/nav/nav.js +24 -11
- package/dist/collection/components/nav-link/nav-link.js +18 -8
- package/dist/collection/components/note/note.js +3 -4
- package/dist/collection/components/picker-column/picker-column.js +34 -10
- package/dist/collection/components/picker-column-option/picker-column-option.js +25 -4
- package/dist/collection/components/picker-legacy/picker.js +91 -31
- package/dist/collection/components/picker-legacy-column/picker-column.js +4 -2
- package/dist/collection/components/popover/popover.js +208 -55
- package/dist/collection/components/progress-bar/progress-bar.js +31 -6
- package/dist/collection/components/radio/radio.js +46 -16
- package/dist/collection/components/radio-group/radio-group.js +26 -12
- package/dist/collection/components/range/range.js +109 -34
- package/dist/collection/components/refresher/refresher.js +68 -6
- package/dist/collection/components/refresher-content/refresher-content.js +12 -8
- package/dist/collection/components/reorder-group/reorder-group.js +6 -1
- package/dist/collection/components/ripple-effect/ripple-effect.js +12 -1
- package/dist/collection/components/route/route.js +24 -9
- package/dist/collection/components/route-redirect/route-redirect.js +6 -6
- package/dist/collection/components/router/router.js +24 -2
- package/dist/collection/components/router-link/router-link.js +24 -12
- package/dist/collection/components/router-outlet/router-outlet.js +24 -8
- package/dist/collection/components/searchbar/searchbar.js +141 -46
- package/dist/collection/components/segment/segment.js +38 -13
- package/dist/collection/components/segment-button/segment-button.js +32 -11
- package/dist/collection/components/segment-view/segment-view.js +6 -2
- package/dist/collection/components/select/select.js +128 -59
- package/dist/collection/components/select-modal/select-modal.js +9 -4
- package/dist/collection/components/select-option/select-option.js +9 -3
- package/dist/collection/components/select-popover/select-popover.js +18 -8
- package/dist/collection/components/skeleton-text/skeleton-text.js +6 -1
- package/dist/collection/components/spinner/spinner.js +15 -7
- package/dist/collection/components/split-pane/split-pane.js +17 -4
- package/dist/collection/components/tab/tab.js +14 -7
- package/dist/collection/components/tab-bar/tab-bar.js +14 -5
- package/dist/collection/components/tab-button/tab-button.js +32 -16
- package/dist/collection/components/tabs/tabs.js +5 -3
- package/dist/collection/components/text/text.js +3 -4
- package/dist/collection/components/textarea/textarea.js +154 -70
- package/dist/collection/components/title/title.js +6 -6
- package/dist/collection/components/toast/toast.js +119 -45
- package/dist/collection/components/toggle/toggle.js +86 -35
- package/dist/collection/components/toolbar/toolbar.js +3 -2
- package/dist/collection/utils/input-shims/hacks/scroll-assist.js +18 -0
- package/dist/docs.d.ts +8 -0
- package/dist/docs.json +1823 -584
- package/dist/esm/{animation-8b25e105.js → animation-D4bve5rR.js} +2 -2
- package/dist/esm/{app-globals-dbdbb3df.js → app-globals-Ts_E1ch0.js} +1 -1
- package/dist/esm/{button-active-90f1dbc4.js → button-active-BQqkZ_sm.js} +3 -3
- package/dist/esm/{capacitor-59395cbd.js → capacitor-CFERIeaU.js} +1 -1
- package/dist/esm/{config-9898ed97.js → config-DTWRsyX5.js} +1 -1
- package/dist/esm/{data-0d7ea6eb.js → data-Iz8JZ8Jy.js} +31 -6
- package/dist/esm/{framework-delegate-56b467ad.js → framework-delegate-BEwxd9AM.js} +1 -1
- package/dist/esm/{gesture-controller-314a54f6.js → gesture-controller-BTEOs1at.js} +1 -1
- package/dist/esm/{haptic-ac164e4c.js → haptic-DzAMWJuk.js} +2 -2
- package/dist/esm/{hardware-back-button-a7eb8233.js → hardware-back-button-pnZ0X1YR.js} +2 -2
- package/dist/esm/{helpers-d94bc8ad.js → helpers-CzIihwFO.js} +3 -6
- package/dist/esm/{index-68c0d151.js → index-B83thFnh.js} +5 -5
- package/dist/esm/{index-e2cf2ceb.js → index-BLV6ykCk.js} +2 -1
- package/dist/esm/{index-be190feb.js → index-BjwCqtOY.js} +3 -3
- package/dist/esm/{index-cfd9c1f2.js → index-CEo1SqXS.js} +1 -1
- package/dist/esm/{index-39782642.js → index-CfgBF1SE.js} +4 -6
- package/dist/esm/{index-527b9e34.js → index-EP3pwcdb.js} +1395 -651
- package/dist/esm/{index-9a17db3d.js → index-M5ufqlzF.js} +3 -3
- package/dist/esm/{index-18f31305.js → index-RyWq7qIc.js} +6 -6
- package/dist/esm/index.js +18 -18
- package/dist/esm/{input-shims-279903e2.js → input-shims-BbXgvAcA.js} +24 -6
- package/dist/esm/{input.utils-40504d6d.js → input.utils-CWgOv5Mm.js} +3 -3
- package/dist/esm/ion-accordion_2.entry.js +54 -23
- package/dist/esm/ion-action-sheet.entry.js +50 -36
- package/dist/esm/ion-alert.entry.js +55 -39
- package/dist/esm/ion-app_8.entry.js +96 -63
- package/dist/esm/ion-avatar_3.entry.js +9 -15
- package/dist/esm/ion-back-button.entry.js +16 -17
- package/dist/esm/ion-backdrop.entry.js +14 -7
- package/dist/esm/ion-breadcrumb_2.entry.js +39 -33
- package/dist/esm/ion-button_2.entry.js +33 -28
- package/dist/esm/ion-card_5.entry.js +33 -34
- package/dist/esm/ion-checkbox.entry.js +48 -31
- package/dist/esm/ion-chip.entry.js +12 -9
- package/dist/esm/ion-col_3.entry.js +9 -33
- package/dist/esm/ion-datetime-button.entry.js +20 -18
- package/dist/esm/ion-datetime_3.entry.js +251 -120
- package/dist/esm/ion-fab_3.entry.js +58 -30
- package/dist/esm/ion-img.entry.js +5 -10
- package/dist/esm/ion-infinite-scroll_2.entry.js +35 -18
- package/dist/esm/ion-input-password-toggle.entry.js +11 -13
- package/dist/esm/ion-input.entry.js +87 -70
- package/dist/esm/ion-item-option_3.entry.js +32 -26
- package/dist/esm/ion-item_8.entry.js +50 -51
- package/dist/esm/ion-loading.entry.js +46 -29
- package/dist/esm/ion-menu_3.entry.js +62 -37
- package/dist/esm/ion-modal.entry.js +128 -50
- package/dist/esm/ion-nav_2.entry.js +17 -20
- package/dist/esm/ion-picker-column-option.entry.js +23 -10
- package/dist/esm/ion-picker-column.entry.js +31 -16
- package/dist/esm/ion-picker.entry.js +5 -7
- package/dist/esm/ion-popover.entry.js +137 -45
- package/dist/esm/ion-progress-bar.entry.js +23 -10
- package/dist/esm/ion-radio_2.entry.js +43 -29
- package/dist/esm/ion-range.entry.js +71 -31
- package/dist/esm/ion-refresher_2.entry.js +68 -24
- package/dist/esm/ion-reorder_2.entry.js +17 -17
- package/dist/esm/ion-ripple-effect.entry.js +13 -5
- package/dist/esm/ion-route_4.entry.js +35 -19
- package/dist/esm/ion-searchbar.entry.js +84 -35
- package/dist/esm/ion-segment-content.entry.js +2 -3
- package/dist/esm/ion-segment-view.entry.js +6 -6
- package/dist/esm/ion-segment_2.entry.js +48 -28
- package/dist/esm/ion-select-modal.entry.js +13 -18
- package/dist/esm/ion-select_3.entry.js +88 -67
- package/dist/esm/ion-spinner.entry.js +9 -10
- package/dist/esm/ion-split-pane.entry.js +13 -8
- package/dist/esm/ion-tab-bar_2.entry.js +26 -27
- package/dist/esm/ion-tab_2.entry.js +9 -13
- package/dist/esm/ion-text.entry.js +5 -7
- package/dist/esm/ion-textarea.entry.js +79 -54
- package/dist/esm/ion-toast.entry.js +65 -42
- package/dist/esm/ion-toggle.entry.js +64 -40
- package/dist/esm/{ionic-global-b26f573e.js → ionic-global-DapnXdYs.js} +2 -2
- package/dist/esm/ionic.js +8 -7
- package/dist/esm/{ios.transition-4047cb68.js → ios.transition-DN6Dy4K4.js} +6 -6
- package/dist/esm/{keyboard-73175e24.js → keyboard-CUw4ekVy.js} +1 -1
- package/dist/esm/{keyboard-controller-ec5c2bfa.js → keyboard-controller-BaaVITYt.js} +2 -2
- package/dist/esm/{keyboard-52278bd7.js → keyboard-ywgs5efA.js} +3 -3
- package/dist/esm/loader.js +6 -6
- package/dist/esm/{md.transition-30ce8d1b.js → md.transition-DR8zuFnL.js} +6 -6
- package/dist/esm/{notch-controller-1a1f7183.js → notch-controller-B3wZOqJe.js} +2 -2
- package/dist/esm/{overlays-d99dcb0a.js → overlays-Blhb_0oI.js} +7 -7
- package/dist/esm/{status-tap-42a8af65.js → status-tap-CZEjiztV.js} +4 -4
- package/dist/esm/{swipe-back-0184f6b3.js → swipe-back-DKV4csu9.js} +5 -5
- package/dist/html.html-data.json +216 -0
- package/dist/index.js +1 -1
- package/dist/ionic/index.esm.js +1 -1
- package/dist/ionic/ionic.esm.js +1 -1
- package/dist/ionic/p-030daf32.entry.js +4 -0
- package/dist/ionic/p-0434efbb.entry.js +4 -0
- package/dist/ionic/p-07a47eb6.entry.js +4 -0
- package/dist/ionic/p-08232f2d.entry.js +4 -0
- package/dist/ionic/{p-393ffcc2.entry.js → p-0c2a069d.entry.js} +1 -1
- package/dist/ionic/p-112af08b.entry.js +4 -0
- package/dist/ionic/{p-2469240b.entry.js → p-12b44c66.entry.js} +1 -1
- package/dist/ionic/p-1a19090e.entry.js +4 -0
- package/dist/ionic/p-306eab7a.entry.js +4 -0
- package/dist/ionic/p-38598652.entry.js +4 -0
- package/dist/ionic/p-38921e2f.entry.js +4 -0
- package/dist/ionic/p-38dcbd40.entry.js +4 -0
- package/dist/ionic/{p-b445ff65.entry.js → p-3edb2346.entry.js} +1 -1
- package/dist/ionic/p-4119d144.entry.js +4 -0
- package/dist/ionic/p-46a1ce99.entry.js +4 -0
- package/dist/ionic/p-46c15fe2.entry.js +4 -0
- package/dist/ionic/{p-e8245753.entry.js → p-46f82b82.entry.js} +1 -1
- package/dist/ionic/p-484073b5.entry.js +4 -0
- package/dist/ionic/p-49122d48.entry.js +4 -0
- package/dist/ionic/p-4a5cf7ac.entry.js +4 -0
- package/dist/ionic/p-5459e444.entry.js +4 -0
- package/dist/ionic/{p-12914457.entry.js → p-5b8abc2f.entry.js} +1 -1
- package/dist/ionic/p-5fb997f8.entry.js +4 -0
- package/dist/ionic/p-61f52724.entry.js +4 -0
- package/dist/ionic/{p-0f5e6225.js → p-7QgQi64o.js} +1 -1
- package/dist/ionic/p-83fdd9f6.entry.js +4 -0
- package/dist/ionic/p-89e3b3c6.entry.js +4 -0
- package/dist/ionic/p-8dda7cd4.entry.js +4 -0
- package/dist/ionic/p-93996b12.entry.js +4 -0
- package/dist/ionic/p-99c93730.entry.js +4 -0
- package/dist/ionic/p-9a0bde6e.entry.js +4 -0
- package/dist/ionic/p-9eeaBrnk.js +4 -0
- package/dist/ionic/p-B0af2jd_.js +4 -0
- package/dist/ionic/{p-da2b833b.js → p-BLV6ykCk.js} +1 -1
- package/dist/ionic/p-BNIA2meb.js +4 -0
- package/dist/ionic/{p-aded71ec.js → p-BSMFLyVh.js} +1 -1
- package/dist/ionic/{p-2bb55ebc.js → p-Bj2C9kIj.js} +1 -1
- package/dist/ionic/{p-b6d324f0.js → p-BoW9sZxI.js} +1 -1
- package/dist/ionic/{p-10a1bddc.js → p-C719rkLH.js} +1 -1
- package/dist/ionic/{p-17e21141.js → p-CEo1SqXS.js} +1 -1
- package/dist/ionic/p-CG4wBMWx.js +4 -0
- package/dist/ionic/p-CGDL9pFJ.js +4 -0
- package/dist/ionic/p-CIGNaXM1.js +4 -0
- package/dist/ionic/{p-89b61afc.js → p-CKvCXMs9.js} +1 -1
- package/dist/ionic/{p-8d2d39d0.js → p-CgRZM5_E.js} +1 -1
- package/dist/ionic/{p-ed005d9c.js → p-Ck7uSZOL.js} +1 -1
- package/dist/ionic/p-Cl0B-RWe.js +4 -0
- package/dist/ionic/p-CqNf-A5G.js +4 -0
- package/dist/ionic/p-CtWGkNnJ.js +4 -0
- package/dist/ionic/{p-f08a92cc.js → p-D-bDfEy0.js} +1 -1
- package/dist/ionic/{p-27281edd.js → p-D13Eaw-8.js} +1 -1
- package/dist/ionic/{p-809483ac.js → p-DCstKNei.js} +1 -1
- package/dist/ionic/p-DPhSdjFK.js +4 -0
- package/dist/ionic/p-DWFxQD6t.js +4 -0
- package/dist/ionic/{p-5b67b447.js → p-Dnc554yu.js} +1 -1
- package/dist/ionic/p-EP3pwcdb.js +5 -0
- package/dist/ionic/p-EglNvYQn.js +4 -0
- package/dist/ionic/{p-95001a19.js → p-LpklIrOy.js} +1 -1
- package/dist/ionic/{p-b7b1d91a.js → p-RuOFleJd.js} +1 -1
- package/dist/ionic/p-Uz6zKimy.js +4 -0
- package/dist/ionic/p-a178af33.entry.js +4 -0
- package/dist/ionic/p-a26637b1.entry.js +4 -0
- package/dist/ionic/p-a4bcf305.entry.js +4 -0
- package/dist/ionic/p-a9997b1b.entry.js +4 -0
- package/dist/ionic/p-ade7bda6.entry.js +4 -0
- package/dist/ionic/p-aeb7297a.entry.js +4 -0
- package/dist/ionic/p-b2b0f539.entry.js +4 -0
- package/dist/ionic/p-bc9feb4b.entry.js +4 -0
- package/dist/ionic/p-c19bc276.entry.js +4 -0
- package/dist/ionic/p-c3abde95.entry.js +4 -0
- package/dist/ionic/p-ce26cd7d.entry.js +4 -0
- package/dist/ionic/p-d77d0b41.entry.js +4 -0
- package/dist/ionic/p-d887000e.entry.js +4 -0
- package/dist/ionic/p-d9c08f93.entry.js +4 -0
- package/dist/ionic/p-df87cf2d.entry.js +4 -0
- package/dist/ionic/p-e2e4b1f1.entry.js +4 -0
- package/dist/ionic/p-e426331f.entry.js +4 -0
- package/dist/ionic/p-e471e1e5.entry.js +4 -0
- package/dist/ionic/p-e5e82fa5.entry.js +4 -0
- package/dist/ionic/p-f0c5ea4c.entry.js +4 -0
- package/dist/ionic/{p-481e0885.entry.js → p-ff362ebc.entry.js} +1 -1
- package/dist/types/components/checkbox/checkbox.d.ts +0 -5
- package/dist/types/components/datetime/datetime-interface.d.ts +1 -0
- package/dist/types/components/datetime/datetime.d.ts +6 -0
- package/dist/types/components/datetime/utils/data.d.ts +3 -1
- package/dist/types/components/datetime/utils/manipulation.d.ts +1 -0
- package/dist/types/components/input/input.d.ts +0 -5
- package/dist/types/components/select/select.d.ts +0 -5
- package/dist/types/components/textarea/textarea.d.ts +0 -5
- package/dist/types/components/toggle/toggle.d.ts +0 -5
- package/dist/types/components.d.ts +8 -0
- package/dist/types/stencil-public-runtime.d.ts +9 -0
- package/hydrate/index.d.ts +40 -5
- package/hydrate/index.js +4753 -2320
- package/hydrate/index.mjs +4752 -2319
- package/loader/cdn.js +1 -2
- package/loader/index.cjs.js +1 -2
- package/loader/index.es2017.js +0 -1
- package/loader/index.js +1 -2
- package/package.json +2 -2
- package/dist/esm/polyfills/core-js.js +0 -11
- package/dist/esm/polyfills/dom.js +0 -79
- package/dist/esm/polyfills/es5-html-element.js +0 -1
- package/dist/esm/polyfills/index.js +0 -34
- package/dist/esm/polyfills/system.js +0 -6
- package/dist/esm-es5/animation-8b25e105.js +0 -4
- package/dist/esm-es5/app-globals-dbdbb3df.js +0 -4
- package/dist/esm-es5/button-active-90f1dbc4.js +0 -4
- package/dist/esm-es5/capacitor-59395cbd.js +0 -4
- package/dist/esm-es5/compare-with-utils-a96ff2ea.js +0 -4
- package/dist/esm-es5/config-9898ed97.js +0 -4
- package/dist/esm-es5/cubic-bezier-fe2083dc.js +0 -4
- package/dist/esm-es5/data-0d7ea6eb.js +0 -4
- package/dist/esm-es5/dir-babeabeb.js +0 -4
- package/dist/esm-es5/focus-visible-dd40d69f.js +0 -4
- package/dist/esm-es5/framework-delegate-56b467ad.js +0 -4
- package/dist/esm-es5/gesture-controller-314a54f6.js +0 -4
- package/dist/esm-es5/haptic-ac164e4c.js +0 -4
- package/dist/esm-es5/hardware-back-button-a7eb8233.js +0 -4
- package/dist/esm-es5/helpers-d94bc8ad.js +0 -4
- package/dist/esm-es5/index-18f31305.js +0 -4
- package/dist/esm-es5/index-39782642.js +0 -4
- package/dist/esm-es5/index-527b9e34.js +0 -5
- package/dist/esm-es5/index-68c0d151.js +0 -4
- package/dist/esm-es5/index-9a17db3d.js +0 -4
- package/dist/esm-es5/index-a5d50daf.js +0 -4
- package/dist/esm-es5/index-be190feb.js +0 -4
- package/dist/esm-es5/index-cfd9c1f2.js +0 -5
- package/dist/esm-es5/index-e2cf2ceb.js +0 -4
- package/dist/esm-es5/index.js +0 -4
- package/dist/esm-es5/input-shims-279903e2.js +0 -4
- package/dist/esm-es5/input.utils-40504d6d.js +0 -4
- package/dist/esm-es5/ion-accordion_2.entry.js +0 -4
- package/dist/esm-es5/ion-action-sheet.entry.js +0 -4
- package/dist/esm-es5/ion-alert.entry.js +0 -4
- package/dist/esm-es5/ion-app_8.entry.js +0 -4
- package/dist/esm-es5/ion-avatar_3.entry.js +0 -4
- package/dist/esm-es5/ion-back-button.entry.js +0 -4
- package/dist/esm-es5/ion-backdrop.entry.js +0 -4
- package/dist/esm-es5/ion-breadcrumb_2.entry.js +0 -4
- package/dist/esm-es5/ion-button_2.entry.js +0 -4
- package/dist/esm-es5/ion-card_5.entry.js +0 -4
- package/dist/esm-es5/ion-checkbox.entry.js +0 -4
- package/dist/esm-es5/ion-chip.entry.js +0 -4
- package/dist/esm-es5/ion-col_3.entry.js +0 -4
- package/dist/esm-es5/ion-datetime-button.entry.js +0 -4
- package/dist/esm-es5/ion-datetime_3.entry.js +0 -4
- package/dist/esm-es5/ion-fab_3.entry.js +0 -4
- package/dist/esm-es5/ion-img.entry.js +0 -4
- package/dist/esm-es5/ion-infinite-scroll_2.entry.js +0 -4
- package/dist/esm-es5/ion-input-password-toggle.entry.js +0 -4
- package/dist/esm-es5/ion-input.entry.js +0 -4
- package/dist/esm-es5/ion-item-option_3.entry.js +0 -4
- package/dist/esm-es5/ion-item_8.entry.js +0 -4
- package/dist/esm-es5/ion-loading.entry.js +0 -4
- package/dist/esm-es5/ion-menu_3.entry.js +0 -4
- package/dist/esm-es5/ion-modal.entry.js +0 -4
- package/dist/esm-es5/ion-nav_2.entry.js +0 -4
- package/dist/esm-es5/ion-picker-column-option.entry.js +0 -4
- package/dist/esm-es5/ion-picker-column.entry.js +0 -4
- package/dist/esm-es5/ion-picker.entry.js +0 -4
- package/dist/esm-es5/ion-popover.entry.js +0 -4
- package/dist/esm-es5/ion-progress-bar.entry.js +0 -4
- package/dist/esm-es5/ion-radio_2.entry.js +0 -4
- package/dist/esm-es5/ion-range.entry.js +0 -4
- package/dist/esm-es5/ion-refresher_2.entry.js +0 -4
- package/dist/esm-es5/ion-reorder_2.entry.js +0 -4
- package/dist/esm-es5/ion-ripple-effect.entry.js +0 -4
- package/dist/esm-es5/ion-route_4.entry.js +0 -4
- package/dist/esm-es5/ion-searchbar.entry.js +0 -4
- package/dist/esm-es5/ion-segment-content.entry.js +0 -4
- package/dist/esm-es5/ion-segment-view.entry.js +0 -4
- package/dist/esm-es5/ion-segment_2.entry.js +0 -4
- package/dist/esm-es5/ion-select-modal.entry.js +0 -4
- package/dist/esm-es5/ion-select_3.entry.js +0 -4
- package/dist/esm-es5/ion-spinner.entry.js +0 -4
- package/dist/esm-es5/ion-split-pane.entry.js +0 -4
- package/dist/esm-es5/ion-tab-bar_2.entry.js +0 -4
- package/dist/esm-es5/ion-tab_2.entry.js +0 -4
- package/dist/esm-es5/ion-text.entry.js +0 -4
- package/dist/esm-es5/ion-textarea.entry.js +0 -4
- package/dist/esm-es5/ion-toast.entry.js +0 -4
- package/dist/esm-es5/ion-toggle.entry.js +0 -4
- package/dist/esm-es5/ionic-global-b26f573e.js +0 -4
- package/dist/esm-es5/ionic.js +0 -4
- package/dist/esm-es5/ios.transition-4047cb68.js +0 -4
- package/dist/esm-es5/keyboard-52278bd7.js +0 -4
- package/dist/esm-es5/keyboard-73175e24.js +0 -4
- package/dist/esm-es5/keyboard-controller-ec5c2bfa.js +0 -4
- package/dist/esm-es5/loader.js +0 -4
- package/dist/esm-es5/lock-controller-316928be.js +0 -4
- package/dist/esm-es5/md.transition-30ce8d1b.js +0 -4
- package/dist/esm-es5/notch-controller-1a1f7183.js +0 -4
- package/dist/esm-es5/overlays-d99dcb0a.js +0 -4
- package/dist/esm-es5/spinner-configs-964f7cf3.js +0 -4
- package/dist/esm-es5/status-tap-42a8af65.js +0 -4
- package/dist/esm-es5/swipe-back-0184f6b3.js +0 -4
- package/dist/esm-es5/theme-01f3f29c.js +0 -4
- package/dist/esm-es5/watch-options-c2911ace.js +0 -4
- package/dist/ionic/ionic.js +0 -127
- package/dist/ionic/p-00023f5a.system.js +0 -4
- package/dist/ionic/p-012c3ceb.system.js +0 -4
- package/dist/ionic/p-019e30a3.system.entry.js +0 -4
- package/dist/ionic/p-03480b95.system.entry.js +0 -4
- package/dist/ionic/p-08cef0b1.entry.js +0 -4
- package/dist/ionic/p-08e01816.system.js +0 -4
- package/dist/ionic/p-105b2e8b.entry.js +0 -4
- package/dist/ionic/p-117d0013.system.entry.js +0 -4
- package/dist/ionic/p-11dca959.entry.js +0 -4
- package/dist/ionic/p-12193821.system.js +0 -4
- package/dist/ionic/p-12830298.system.entry.js +0 -4
- package/dist/ionic/p-14154301.system.entry.js +0 -4
- package/dist/ionic/p-14bdb5aa.entry.js +0 -4
- package/dist/ionic/p-1706b406.system.entry.js +0 -4
- package/dist/ionic/p-171ca87d.system.js +0 -4
- package/dist/ionic/p-19494658.system.entry.js +0 -4
- package/dist/ionic/p-1966a13c.system.js +0 -4
- package/dist/ionic/p-1974d5b2.system.js +0 -4
- package/dist/ionic/p-1a81ac09.system.js +0 -4
- package/dist/ionic/p-1b9c59ab.js +0 -4
- package/dist/ionic/p-1d307396.system.js +0 -4
- package/dist/ionic/p-1dfc11b3.system.js +0 -4
- package/dist/ionic/p-1e4371bd.js +0 -4
- package/dist/ionic/p-1e955a45.system.js +0 -4
- package/dist/ionic/p-20d469d0.system.js +0 -4
- package/dist/ionic/p-21891ead.js +0 -4
- package/dist/ionic/p-2233344a.system.js +0 -4
- package/dist/ionic/p-24a6c8a3.system.entry.js +0 -4
- package/dist/ionic/p-257fb777.entry.js +0 -4
- package/dist/ionic/p-25b10f81.js +0 -4
- package/dist/ionic/p-2b7827c7.js +0 -4
- package/dist/ionic/p-2bff0e69.system.entry.js +0 -4
- package/dist/ionic/p-31dc303d.entry.js +0 -4
- package/dist/ionic/p-3535d6b5.entry.js +0 -4
- package/dist/ionic/p-35cdfd77.system.entry.js +0 -4
- package/dist/ionic/p-39fa7dd1.system.entry.js +0 -4
- package/dist/ionic/p-3a30f31b.system.entry.js +0 -4
- package/dist/ionic/p-3e1e14d9.system.js +0 -4
- package/dist/ionic/p-42f08b26.system.entry.js +0 -4
- package/dist/ionic/p-4609d030.system.js +0 -4
- package/dist/ionic/p-4a5be299.system.entry.js +0 -4
- package/dist/ionic/p-4c667fce.js +0 -4
- package/dist/ionic/p-4cf4172e.entry.js +0 -4
- package/dist/ionic/p-4da92dac.entry.js +0 -4
- package/dist/ionic/p-4ed5db19.system.js +0 -4
- package/dist/ionic/p-4f255d5a.system.js +0 -4
- package/dist/ionic/p-50cb2e8b.system.entry.js +0 -4
- package/dist/ionic/p-57957c0f.entry.js +0 -4
- package/dist/ionic/p-57d6e18e.entry.js +0 -4
- package/dist/ionic/p-57e55ecb.system.js +0 -4
- package/dist/ionic/p-5c9feddc.system.entry.js +0 -4
- package/dist/ionic/p-5fac20aa.system.entry.js +0 -4
- package/dist/ionic/p-612096e6.system.entry.js +0 -4
- package/dist/ionic/p-6201c4ba.entry.js +0 -4
- package/dist/ionic/p-625248d0.system.js +0 -4
- package/dist/ionic/p-663413be.system.js +0 -4
- package/dist/ionic/p-6636a436.js +0 -4
- package/dist/ionic/p-66a5d6a8.js +0 -5
- package/dist/ionic/p-66df5468.system.entry.js +0 -4
- package/dist/ionic/p-67077d48.entry.js +0 -4
- package/dist/ionic/p-6835ebdd.system.entry.js +0 -4
- package/dist/ionic/p-6a03fc0f.entry.js +0 -4
- package/dist/ionic/p-6b8530f5.system.entry.js +0 -4
- package/dist/ionic/p-6c474e87.entry.js +0 -4
- package/dist/ionic/p-6dd86ff5.system.entry.js +0 -4
- package/dist/ionic/p-6ec0c94a.entry.js +0 -4
- package/dist/ionic/p-6f832afe.system.entry.js +0 -4
- package/dist/ionic/p-707408c5.system.entry.js +0 -4
- package/dist/ionic/p-712c0131.entry.js +0 -4
- package/dist/ionic/p-721f43f9.entry.js +0 -4
- package/dist/ionic/p-72b3050b.system.entry.js +0 -4
- package/dist/ionic/p-7445a2e5.system.js +0 -4
- package/dist/ionic/p-7611ede3.system.entry.js +0 -4
- package/dist/ionic/p-781e2dbb.system.js +0 -4
- package/dist/ionic/p-792919fd.system.js +0 -4
- package/dist/ionic/p-7b8c12c3.entry.js +0 -4
- package/dist/ionic/p-7c5c7ae1.system.entry.js +0 -4
- package/dist/ionic/p-7e3e6ed2.entry.js +0 -4
- package/dist/ionic/p-7ffedf77.system.entry.js +0 -4
- package/dist/ionic/p-81904a80.entry.js +0 -4
- package/dist/ionic/p-84096b45.system.js +0 -4
- package/dist/ionic/p-8450f761.entry.js +0 -4
- package/dist/ionic/p-8460d95a.entry.js +0 -4
- package/dist/ionic/p-85b01465.js +0 -4
- package/dist/ionic/p-865fe95c.entry.js +0 -4
- package/dist/ionic/p-8674af94.entry.js +0 -4
- package/dist/ionic/p-890a4ee2.entry.js +0 -4
- package/dist/ionic/p-891553d8.entry.js +0 -4
- package/dist/ionic/p-8985cdb6.system.js +0 -4
- package/dist/ionic/p-8ab2f7a4.system.entry.js +0 -4
- package/dist/ionic/p-8b050e84.system.js +0 -4
- package/dist/ionic/p-8dacf4e2.entry.js +0 -4
- package/dist/ionic/p-8ededb41.js +0 -4
- package/dist/ionic/p-94551927.js +0 -4
- package/dist/ionic/p-965287fb.system.entry.js +0 -4
- package/dist/ionic/p-979d4f5c.system.js +0 -4
- package/dist/ionic/p-98fd942b.system.entry.js +0 -4
- package/dist/ionic/p-9df5043e.system.entry.js +0 -4
- package/dist/ionic/p-a0fd2fe5.system.entry.js +0 -4
- package/dist/ionic/p-a4866e3e.system.js +0 -4
- package/dist/ionic/p-a5dbe0ff.system.entry.js +0 -4
- package/dist/ionic/p-a7a97bf4.system.entry.js +0 -4
- package/dist/ionic/p-a835aca8.entry.js +0 -4
- package/dist/ionic/p-a83e3290.system.js +0 -4
- package/dist/ionic/p-a93873de.system.js +0 -4
- package/dist/ionic/p-aad57e35.entry.js +0 -4
- package/dist/ionic/p-ab7337e1.entry.js +0 -4
- package/dist/ionic/p-abe101da.system.js +0 -4
- package/dist/ionic/p-ad592db9.entry.js +0 -4
- package/dist/ionic/p-ae039072.entry.js +0 -4
- package/dist/ionic/p-aebfab05.system.entry.js +0 -4
- package/dist/ionic/p-b06ac4a5.system.js +0 -4
- package/dist/ionic/p-b22ab9f4.js +0 -4
- package/dist/ionic/p-b2e7eda0.system.entry.js +0 -4
- package/dist/ionic/p-b4d17da0.system.entry.js +0 -4
- package/dist/ionic/p-b5432d15.entry.js +0 -4
- package/dist/ionic/p-b8050298.system.entry.js +0 -4
- package/dist/ionic/p-b904cfe2.system.entry.js +0 -4
- package/dist/ionic/p-b9c793d4.entry.js +0 -4
- package/dist/ionic/p-bafc3eae.system.entry.js +0 -4
- package/dist/ionic/p-bf184319.system.entry.js +0 -4
- package/dist/ionic/p-c16443a8.system.js +0 -4
- package/dist/ionic/p-c1b7d311.system.entry.js +0 -4
- package/dist/ionic/p-c2160d8c.entry.js +0 -4
- package/dist/ionic/p-c468af8a.system.js +0 -4
- package/dist/ionic/p-c5b77054.entry.js +0 -4
- package/dist/ionic/p-c5bfa3e9.entry.js +0 -4
- package/dist/ionic/p-c61cc894.js +0 -4
- package/dist/ionic/p-cad82569.entry.js +0 -4
- package/dist/ionic/p-cec902a0.system.entry.js +0 -4
- package/dist/ionic/p-d16fab3f.entry.js +0 -4
- package/dist/ionic/p-d1eb2d7f.entry.js +0 -4
- package/dist/ionic/p-d382f09c.system.js +0 -4
- package/dist/ionic/p-d8d84afa.system.js +0 -4
- package/dist/ionic/p-d984c1ab.system.entry.js +0 -4
- package/dist/ionic/p-dabe3bd4.js +0 -4
- package/dist/ionic/p-df069a0d.entry.js +0 -4
- package/dist/ionic/p-e1678e42.entry.js +0 -4
- package/dist/ionic/p-e673a0a2.system.js +0 -4
- package/dist/ionic/p-e727e32d.system.entry.js +0 -4
- package/dist/ionic/p-e887b6a9.system.js +0 -4
- package/dist/ionic/p-edd2e3c7.entry.js +0 -4
- package/dist/ionic/p-f0c9f8e3.system.entry.js +0 -4
- package/dist/ionic/p-f0ef39ab.entry.js +0 -4
- package/dist/ionic/p-f11a9436.system.js +0 -5
- package/dist/ionic/p-f22490a7.system.entry.js +0 -4
- package/dist/ionic/p-f6bb9be7.system.entry.js +0 -4
- package/dist/ionic/p-f6e7d104.system.js +0 -4
- package/dist/ionic/p-f725bf9e.system.js +0 -4
- package/dist/ionic/p-f9a87db2.system.entry.js +0 -4
- package/dist/ionic/p-fa3f4b96.system.js +0 -4
- package/dist/ionic/p-fe063952.system.entry.js +0 -4
- package/loader/package.json +0 -11
- /package/dist/cjs/{compare-with-utils-df1001d7.js → compare-with-utils-DSicavqM.js} +0 -0
- /package/dist/cjs/{cubic-bezier-f2dccc53.js → cubic-bezier-DAjy1V-e.js} +0 -0
- /package/dist/cjs/{dir-94c21456.js → dir-Cn0z1rJH.js} +0 -0
- /package/dist/cjs/{focus-visible-7a0ce04f.js → focus-visible-CCvKiLh3.js} +0 -0
- /package/dist/cjs/{index-cc858e97.js → index-CAT7dkq1.js} +0 -0
- /package/dist/cjs/{index-c8d52405.js → index-DkNv4J_i.js} +0 -0
- /package/dist/cjs/{lock-controller-6585a42a.js → lock-controller-aDB9wrEf.js} +0 -0
- /package/dist/cjs/{spinner-configs-282fd50a.js → spinner-configs-DxHKnd3-.js} +0 -0
- /package/dist/cjs/{theme-d1c573d2.js → theme-CeDs6Hcv.js} +0 -0
- /package/dist/cjs/{watch-options-f5f3e158.js → watch-options-CviOsrTS.js} +0 -0
- /package/dist/esm/{compare-with-utils-a96ff2ea.js → compare-with-utils-sObYyvOy.js} +0 -0
- /package/dist/esm/{cubic-bezier-fe2083dc.js → cubic-bezier-hHmYLOfE.js} +0 -0
- /package/dist/esm/{dir-babeabeb.js → dir-C53feagD.js} +0 -0
- /package/dist/esm/{focus-visible-dd40d69f.js → focus-visible-BmVRXR1y.js} +0 -0
- /package/dist/esm/{index-a5d50daf.js → index-ZjP4CjeZ.js} +0 -0
- /package/dist/esm/{lock-controller-316928be.js → lock-controller-B-hirT0v.js} +0 -0
- /package/dist/esm/{spinner-configs-964f7cf3.js → spinner-configs-D4RIp70E.js} +0 -0
- /package/dist/esm/{theme-01f3f29c.js → theme-DiVJyqlX.js} +0 -0
- /package/dist/esm/{watch-options-c2911ace.js → watch-options-Dtdm8lKC.js} +0 -0
- /package/dist/ionic/{p-ccd02320.js → p-B-hirT0v.js} +0 -0
- /package/dist/ionic/{p-9b97df10.js → p-BTEOs1at.js} +0 -0
- /package/dist/ionic/{p-d47265c8.js → p-BmVRXR1y.js} +0 -0
- /package/dist/ionic/{p-fb813dab.js → p-C53feagD.js} +0 -0
- /package/dist/ionic/{p-f0c2a614.js → p-D4RIp70E.js} +0 -0
- /package/dist/ionic/{p-47794def.js → p-DiVJyqlX.js} +0 -0
- /package/dist/ionic/{p-459d13d5.js → p-Dtdm8lKC.js} +0 -0
- /package/dist/ionic/{p-7b30edcc.js → p-ZjP4CjeZ.js} +0 -0
- /package/dist/ionic/{p-2408c236.js → p-hHmYLOfE.js} +0 -0
- /package/dist/ionic/{p-de756e5c.js → p-sObYyvOy.js} +0 -0
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
3
|
*/
|
|
4
4
|
const NAMESPACE = 'ionic';
|
|
5
|
-
const BUILD = /* ionic */ {
|
|
5
|
+
const BUILD = /* ionic */ { experimentalSlotFixes: true, hydratedSelectorName: "hydrated", lazyLoad: true, shadowDom: true, slotRelocation: true, updatable: true};
|
|
6
6
|
|
|
7
7
|
/*
|
|
8
|
-
Stencil Client Platform v4.
|
|
8
|
+
Stencil Client Platform v4.29.3 | MIT Licensed | https://stenciljs.com
|
|
9
9
|
*/
|
|
10
10
|
var __defProp = Object.defineProperty;
|
|
11
11
|
var __export = (target, all) => {
|
|
@@ -13,14 +13,47 @@ var __export = (target, all) => {
|
|
|
13
13
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
14
14
|
};
|
|
15
15
|
var Build = {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
var
|
|
22
|
-
|
|
23
|
-
|
|
16
|
+
isBrowser: true};
|
|
17
|
+
|
|
18
|
+
// src/utils/constants.ts
|
|
19
|
+
var SVG_NS = "http://www.w3.org/2000/svg";
|
|
20
|
+
var HTML_NS = "http://www.w3.org/1999/xhtml";
|
|
21
|
+
var PrimitiveType = /* @__PURE__ */ ((PrimitiveType2) => {
|
|
22
|
+
PrimitiveType2["Undefined"] = "undefined";
|
|
23
|
+
PrimitiveType2["Null"] = "null";
|
|
24
|
+
PrimitiveType2["String"] = "string";
|
|
25
|
+
PrimitiveType2["Number"] = "number";
|
|
26
|
+
PrimitiveType2["SpecialNumber"] = "number";
|
|
27
|
+
PrimitiveType2["Boolean"] = "boolean";
|
|
28
|
+
PrimitiveType2["BigInt"] = "bigint";
|
|
29
|
+
return PrimitiveType2;
|
|
30
|
+
})(PrimitiveType || {});
|
|
31
|
+
var NonPrimitiveType = /* @__PURE__ */ ((NonPrimitiveType2) => {
|
|
32
|
+
NonPrimitiveType2["Array"] = "array";
|
|
33
|
+
NonPrimitiveType2["Date"] = "date";
|
|
34
|
+
NonPrimitiveType2["Map"] = "map";
|
|
35
|
+
NonPrimitiveType2["Object"] = "object";
|
|
36
|
+
NonPrimitiveType2["RegularExpression"] = "regexp";
|
|
37
|
+
NonPrimitiveType2["Set"] = "set";
|
|
38
|
+
NonPrimitiveType2["Channel"] = "channel";
|
|
39
|
+
NonPrimitiveType2["Symbol"] = "symbol";
|
|
40
|
+
return NonPrimitiveType2;
|
|
41
|
+
})(NonPrimitiveType || {});
|
|
42
|
+
var TYPE_CONSTANT = "type";
|
|
43
|
+
var VALUE_CONSTANT = "value";
|
|
44
|
+
var SERIALIZED_PREFIX = "serialized:";
|
|
45
|
+
|
|
46
|
+
// src/client/client-host-ref.ts
|
|
47
|
+
var getHostRef = (ref) => {
|
|
48
|
+
if (ref.__stencil__getHostRef) {
|
|
49
|
+
return ref.__stencil__getHostRef();
|
|
50
|
+
}
|
|
51
|
+
return void 0;
|
|
52
|
+
};
|
|
53
|
+
var registerInstance = (lazyInstance, hostRef) => {
|
|
54
|
+
lazyInstance.__stencil__getHostRef = () => hostRef;
|
|
55
|
+
hostRef.$lazyInstance$ = lazyInstance;
|
|
56
|
+
};
|
|
24
57
|
var registerHost = (hostElement, cmpMeta) => {
|
|
25
58
|
const hostRef = {
|
|
26
59
|
$flags$: 0,
|
|
@@ -36,7 +69,9 @@ var registerHost = (hostElement, cmpMeta) => {
|
|
|
36
69
|
hostElement["s-p"] = [];
|
|
37
70
|
hostElement["s-rc"] = [];
|
|
38
71
|
}
|
|
39
|
-
|
|
72
|
+
const ref = hostRef;
|
|
73
|
+
hostElement.__stencil__getHostRef = () => ref;
|
|
74
|
+
return ref;
|
|
40
75
|
};
|
|
41
76
|
var isMemberInElement = (elm, memberName) => memberName in elm;
|
|
42
77
|
var consoleError = (e, el) => (0, console.error)(e, el);
|
|
@@ -60,12 +95,17 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
60
95
|
/* webpackExclude: /\.system\.entry\.js$/ */
|
|
61
96
|
/* webpackMode: "lazy" */
|
|
62
97
|
`./${bundleId}.entry.js${""}`
|
|
63
|
-
).then(
|
|
64
|
-
{
|
|
65
|
-
|
|
98
|
+
).then(
|
|
99
|
+
(importedModule) => {
|
|
100
|
+
{
|
|
101
|
+
cmpModules.set(bundleId, importedModule);
|
|
102
|
+
}
|
|
103
|
+
return importedModule[exportName];
|
|
104
|
+
},
|
|
105
|
+
(e) => {
|
|
106
|
+
consoleError(e, hostRef.$hostElement$);
|
|
66
107
|
}
|
|
67
|
-
|
|
68
|
-
}, consoleError);
|
|
108
|
+
);
|
|
69
109
|
};
|
|
70
110
|
|
|
71
111
|
// src/client/client-style.ts
|
|
@@ -77,6 +117,7 @@ var CONTENT_REF_ID = "r";
|
|
|
77
117
|
var ORG_LOCATION_ID = "o";
|
|
78
118
|
var SLOT_NODE_ID = "s";
|
|
79
119
|
var TEXT_NODE_ID = "t";
|
|
120
|
+
var COMMENT_NODE_ID = "c";
|
|
80
121
|
var HYDRATE_ID = "s-id";
|
|
81
122
|
var HYDRATED_STYLE_ID = "sty-id";
|
|
82
123
|
var HYDRATE_CHILD_ID = "c-id";
|
|
@@ -84,7 +125,6 @@ var HYDRATED_CSS = "{visibility:hidden}.hydrated{visibility:inherit}";
|
|
|
84
125
|
var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
|
|
85
126
|
var XLINK_NS = "http://www.w3.org/1999/xlink";
|
|
86
127
|
var win = typeof window !== "undefined" ? window : {};
|
|
87
|
-
var doc = win.document || { head: {} };
|
|
88
128
|
var H = win.HTMLElement || class {
|
|
89
129
|
};
|
|
90
130
|
var plt = {
|
|
@@ -98,9 +138,10 @@ var plt = {
|
|
|
98
138
|
};
|
|
99
139
|
var supportsShadow = BUILD.shadowDom;
|
|
100
140
|
var supportsListenerOptions = /* @__PURE__ */ (() => {
|
|
141
|
+
var _a;
|
|
101
142
|
let supportsListenerOptions2 = false;
|
|
102
143
|
try {
|
|
103
|
-
|
|
144
|
+
(_a = win.document) == null ? void 0 : _a.addEventListener(
|
|
104
145
|
"e",
|
|
105
146
|
null,
|
|
106
147
|
Object.defineProperty({}, "passive", {
|
|
@@ -165,24 +206,119 @@ var getAssetPath = (path) => {
|
|
|
165
206
|
return assetUrl.origin !== win.location.origin ? assetUrl.href : assetUrl.pathname;
|
|
166
207
|
};
|
|
167
208
|
|
|
168
|
-
// src/utils/constants.ts
|
|
169
|
-
var EMPTY_OBJ = {};
|
|
170
|
-
var SVG_NS = "http://www.w3.org/2000/svg";
|
|
171
|
-
var HTML_NS = "http://www.w3.org/1999/xhtml";
|
|
172
|
-
|
|
173
209
|
// src/utils/helpers.ts
|
|
174
|
-
var isDef = (v) => v != null;
|
|
210
|
+
var isDef = (v) => v != null && v !== void 0;
|
|
175
211
|
var isComplexType = (o) => {
|
|
176
212
|
o = typeof o;
|
|
177
213
|
return o === "object" || o === "function";
|
|
178
214
|
};
|
|
179
215
|
|
|
180
216
|
// src/utils/query-nonce-meta-tag-content.ts
|
|
181
|
-
function queryNonceMetaTagContent(
|
|
217
|
+
function queryNonceMetaTagContent(doc) {
|
|
182
218
|
var _a, _b, _c;
|
|
183
|
-
return (_c = (_b = (_a =
|
|
219
|
+
return (_c = (_b = (_a = doc.head) == null ? void 0 : _a.querySelector('meta[name="csp-nonce"]')) == null ? void 0 : _b.getAttribute("content")) != null ? _c : void 0;
|
|
184
220
|
}
|
|
185
221
|
|
|
222
|
+
// src/utils/regular-expression.ts
|
|
223
|
+
var escapeRegExpSpecialCharacters = (text) => {
|
|
224
|
+
return text.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
225
|
+
};
|
|
226
|
+
|
|
227
|
+
// src/utils/remote-value.ts
|
|
228
|
+
var RemoteValue = class _RemoteValue {
|
|
229
|
+
/**
|
|
230
|
+
* Deserializes a LocalValue serialized object back to its original JavaScript representation
|
|
231
|
+
*
|
|
232
|
+
* @param serialized The serialized LocalValue object
|
|
233
|
+
* @returns The original JavaScript value/object
|
|
234
|
+
*/
|
|
235
|
+
static fromLocalValue(serialized) {
|
|
236
|
+
const type = serialized[TYPE_CONSTANT];
|
|
237
|
+
const value = VALUE_CONSTANT in serialized ? serialized[VALUE_CONSTANT] : void 0;
|
|
238
|
+
switch (type) {
|
|
239
|
+
case "string" /* String */:
|
|
240
|
+
return value;
|
|
241
|
+
case "boolean" /* Boolean */:
|
|
242
|
+
return value;
|
|
243
|
+
case "bigint" /* BigInt */:
|
|
244
|
+
return BigInt(value);
|
|
245
|
+
case "undefined" /* Undefined */:
|
|
246
|
+
return void 0;
|
|
247
|
+
case "null" /* Null */:
|
|
248
|
+
return null;
|
|
249
|
+
case "number" /* Number */:
|
|
250
|
+
if (value === "NaN") return NaN;
|
|
251
|
+
if (value === "-0") return -0;
|
|
252
|
+
if (value === "Infinity") return Infinity;
|
|
253
|
+
if (value === "-Infinity") return -Infinity;
|
|
254
|
+
return value;
|
|
255
|
+
case "array" /* Array */:
|
|
256
|
+
return value.map((item) => _RemoteValue.fromLocalValue(item));
|
|
257
|
+
case "date" /* Date */:
|
|
258
|
+
return new Date(value);
|
|
259
|
+
case "map" /* Map */:
|
|
260
|
+
const map2 = /* @__PURE__ */ new Map();
|
|
261
|
+
for (const [key, val] of value) {
|
|
262
|
+
const deserializedKey = typeof key === "object" && key !== null ? _RemoteValue.fromLocalValue(key) : key;
|
|
263
|
+
const deserializedValue = _RemoteValue.fromLocalValue(val);
|
|
264
|
+
map2.set(deserializedKey, deserializedValue);
|
|
265
|
+
}
|
|
266
|
+
return map2;
|
|
267
|
+
case "object" /* Object */:
|
|
268
|
+
const obj = {};
|
|
269
|
+
for (const [key, val] of value) {
|
|
270
|
+
obj[key] = _RemoteValue.fromLocalValue(val);
|
|
271
|
+
}
|
|
272
|
+
return obj;
|
|
273
|
+
case "regexp" /* RegularExpression */:
|
|
274
|
+
const { pattern, flags } = value;
|
|
275
|
+
return new RegExp(pattern, flags);
|
|
276
|
+
case "set" /* Set */:
|
|
277
|
+
const set = /* @__PURE__ */ new Set();
|
|
278
|
+
for (const item of value) {
|
|
279
|
+
set.add(_RemoteValue.fromLocalValue(item));
|
|
280
|
+
}
|
|
281
|
+
return set;
|
|
282
|
+
case "symbol" /* Symbol */:
|
|
283
|
+
return Symbol(value);
|
|
284
|
+
default:
|
|
285
|
+
throw new Error(`Unsupported type: ${type}`);
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
/**
|
|
289
|
+
* Utility method to deserialize multiple LocalValues at once
|
|
290
|
+
*
|
|
291
|
+
* @param serializedValues Array of serialized LocalValue objects
|
|
292
|
+
* @returns Array of deserialized JavaScript values
|
|
293
|
+
*/
|
|
294
|
+
static fromLocalValueArray(serializedValues) {
|
|
295
|
+
return serializedValues.map((value) => _RemoteValue.fromLocalValue(value));
|
|
296
|
+
}
|
|
297
|
+
/**
|
|
298
|
+
* Verifies if the given object matches the structure of a serialized LocalValue
|
|
299
|
+
*
|
|
300
|
+
* @param obj Object to verify
|
|
301
|
+
* @returns boolean indicating if the object has LocalValue structure
|
|
302
|
+
*/
|
|
303
|
+
static isLocalValueObject(obj) {
|
|
304
|
+
if (typeof obj !== "object" || obj === null) {
|
|
305
|
+
return false;
|
|
306
|
+
}
|
|
307
|
+
if (!obj.hasOwnProperty(TYPE_CONSTANT)) {
|
|
308
|
+
return false;
|
|
309
|
+
}
|
|
310
|
+
const type = obj[TYPE_CONSTANT];
|
|
311
|
+
const hasTypeProperty = Object.values({ ...PrimitiveType, ...NonPrimitiveType }).includes(type);
|
|
312
|
+
if (!hasTypeProperty) {
|
|
313
|
+
return false;
|
|
314
|
+
}
|
|
315
|
+
if (type !== "null" /* Null */ && type !== "undefined" /* Undefined */) {
|
|
316
|
+
return obj.hasOwnProperty(VALUE_CONSTANT);
|
|
317
|
+
}
|
|
318
|
+
return true;
|
|
319
|
+
}
|
|
320
|
+
};
|
|
321
|
+
|
|
186
322
|
// src/utils/result.ts
|
|
187
323
|
var result_exports = {};
|
|
188
324
|
__export(result_exports, {
|
|
@@ -231,6 +367,527 @@ var unwrapErr = (result) => {
|
|
|
231
367
|
throw result.value;
|
|
232
368
|
}
|
|
233
369
|
};
|
|
370
|
+
|
|
371
|
+
// src/utils/serialize.ts
|
|
372
|
+
function deserializeProperty(value) {
|
|
373
|
+
if (typeof value !== "string" || !value.startsWith(SERIALIZED_PREFIX)) {
|
|
374
|
+
return value;
|
|
375
|
+
}
|
|
376
|
+
return RemoteValue.fromLocalValue(JSON.parse(atob(value.slice(SERIALIZED_PREFIX.length))));
|
|
377
|
+
}
|
|
378
|
+
var updateFallbackSlotVisibility = (elm) => {
|
|
379
|
+
const childNodes = internalCall(elm, "childNodes");
|
|
380
|
+
if (elm.tagName && elm.tagName.includes("-") && elm["s-cr"] && elm.tagName !== "SLOT-FB") {
|
|
381
|
+
getHostSlotNodes(childNodes, elm.tagName).forEach((slotNode) => {
|
|
382
|
+
if (slotNode.nodeType === 1 /* ElementNode */ && slotNode.tagName === "SLOT-FB") {
|
|
383
|
+
if (getSlotChildSiblings(slotNode, getSlotName(slotNode), false).length) {
|
|
384
|
+
slotNode.hidden = true;
|
|
385
|
+
} else {
|
|
386
|
+
slotNode.hidden = false;
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
});
|
|
390
|
+
}
|
|
391
|
+
let i2 = 0;
|
|
392
|
+
for (i2 = 0; i2 < childNodes.length; i2++) {
|
|
393
|
+
const childNode = childNodes[i2];
|
|
394
|
+
if (childNode.nodeType === 1 /* ElementNode */ && internalCall(childNode, "childNodes").length) {
|
|
395
|
+
updateFallbackSlotVisibility(childNode);
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
};
|
|
399
|
+
var getSlottedChildNodes = (childNodes) => {
|
|
400
|
+
const result = [];
|
|
401
|
+
for (let i2 = 0; i2 < childNodes.length; i2++) {
|
|
402
|
+
const slottedNode = childNodes[i2]["s-nr"] || void 0;
|
|
403
|
+
if (slottedNode && slottedNode.isConnected) {
|
|
404
|
+
result.push(slottedNode);
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
return result;
|
|
408
|
+
};
|
|
409
|
+
function getHostSlotNodes(childNodes, hostName, slotName) {
|
|
410
|
+
let i2 = 0;
|
|
411
|
+
let slottedNodes = [];
|
|
412
|
+
let childNode;
|
|
413
|
+
for (; i2 < childNodes.length; i2++) {
|
|
414
|
+
childNode = childNodes[i2];
|
|
415
|
+
if (childNode["s-sr"] && (!hostName || childNode["s-hn"] === hostName) && (slotName === void 0 || getSlotName(childNode) === slotName)) {
|
|
416
|
+
slottedNodes.push(childNode);
|
|
417
|
+
if (typeof slotName !== "undefined") return slottedNodes;
|
|
418
|
+
}
|
|
419
|
+
slottedNodes = [...slottedNodes, ...getHostSlotNodes(childNode.childNodes, hostName, slotName)];
|
|
420
|
+
}
|
|
421
|
+
return slottedNodes;
|
|
422
|
+
}
|
|
423
|
+
var getSlotChildSiblings = (slot, slotName, includeSlot = true) => {
|
|
424
|
+
const childNodes = [];
|
|
425
|
+
if (includeSlot && slot["s-sr"] || !slot["s-sr"]) childNodes.push(slot);
|
|
426
|
+
let node = slot;
|
|
427
|
+
while (node = node.nextSibling) {
|
|
428
|
+
if (getSlotName(node) === slotName && (includeSlot || !node["s-sr"])) childNodes.push(node);
|
|
429
|
+
}
|
|
430
|
+
return childNodes;
|
|
431
|
+
};
|
|
432
|
+
var isNodeLocatedInSlot = (nodeToRelocate, slotName) => {
|
|
433
|
+
if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
|
434
|
+
if (nodeToRelocate.getAttribute("slot") === null && slotName === "") {
|
|
435
|
+
return true;
|
|
436
|
+
}
|
|
437
|
+
if (nodeToRelocate.getAttribute("slot") === slotName) {
|
|
438
|
+
return true;
|
|
439
|
+
}
|
|
440
|
+
return false;
|
|
441
|
+
}
|
|
442
|
+
if (nodeToRelocate["s-sn"] === slotName) {
|
|
443
|
+
return true;
|
|
444
|
+
}
|
|
445
|
+
return slotName === "";
|
|
446
|
+
};
|
|
447
|
+
var addSlotRelocateNode = (newChild, slotNode, prepend, position) => {
|
|
448
|
+
if (newChild["s-ol"] && newChild["s-ol"].isConnected) {
|
|
449
|
+
return;
|
|
450
|
+
}
|
|
451
|
+
const slottedNodeLocation = document.createTextNode("");
|
|
452
|
+
slottedNodeLocation["s-nr"] = newChild;
|
|
453
|
+
if (!slotNode["s-cr"] || !slotNode["s-cr"].parentNode) return;
|
|
454
|
+
const parent = slotNode["s-cr"].parentNode;
|
|
455
|
+
const appendMethod = prepend ? internalCall(parent, "prepend") : internalCall(parent, "appendChild");
|
|
456
|
+
if (typeof position !== "undefined") {
|
|
457
|
+
slottedNodeLocation["s-oo"] = position;
|
|
458
|
+
const childNodes = internalCall(parent, "childNodes");
|
|
459
|
+
const slotRelocateNodes = [slottedNodeLocation];
|
|
460
|
+
childNodes.forEach((n) => {
|
|
461
|
+
if (n["s-nr"]) slotRelocateNodes.push(n);
|
|
462
|
+
});
|
|
463
|
+
slotRelocateNodes.sort((a, b) => {
|
|
464
|
+
if (!a["s-oo"] || a["s-oo"] < (b["s-oo"] || 0)) return -1;
|
|
465
|
+
else if (!b["s-oo"] || b["s-oo"] < a["s-oo"]) return 1;
|
|
466
|
+
return 0;
|
|
467
|
+
});
|
|
468
|
+
slotRelocateNodes.forEach((n) => appendMethod.call(parent, n));
|
|
469
|
+
} else {
|
|
470
|
+
appendMethod.call(parent, slottedNodeLocation);
|
|
471
|
+
}
|
|
472
|
+
newChild["s-ol"] = slottedNodeLocation;
|
|
473
|
+
newChild["s-sh"] = slotNode["s-hn"];
|
|
474
|
+
};
|
|
475
|
+
var getSlotName = (node) => typeof node["s-sn"] === "string" ? node["s-sn"] : node.nodeType === 1 && node.getAttribute("slot") || void 0;
|
|
476
|
+
function patchSlotNode(node) {
|
|
477
|
+
if (node.assignedElements || node.assignedNodes || !node["s-sr"]) return;
|
|
478
|
+
const assignedFactory = (elementsOnly) => (function(opts) {
|
|
479
|
+
const toReturn = [];
|
|
480
|
+
const slotName = this["s-sn"];
|
|
481
|
+
if (opts == null ? void 0 : opts.flatten) {
|
|
482
|
+
console.error(`
|
|
483
|
+
Flattening is not supported for Stencil non-shadow slots.
|
|
484
|
+
You can use \`.childNodes\` to nested slot fallback content.
|
|
485
|
+
If you have a particular use case, please open an issue on the Stencil repo.
|
|
486
|
+
`);
|
|
487
|
+
}
|
|
488
|
+
const parent = this["s-cr"].parentElement;
|
|
489
|
+
const slottedNodes = parent.__childNodes ? parent.childNodes : getSlottedChildNodes(parent.childNodes);
|
|
490
|
+
slottedNodes.forEach((n) => {
|
|
491
|
+
if (slotName === getSlotName(n)) {
|
|
492
|
+
toReturn.push(n);
|
|
493
|
+
}
|
|
494
|
+
});
|
|
495
|
+
if (elementsOnly) {
|
|
496
|
+
return toReturn.filter((n) => n.nodeType === 1 /* ElementNode */);
|
|
497
|
+
}
|
|
498
|
+
return toReturn;
|
|
499
|
+
}).bind(node);
|
|
500
|
+
node.assignedElements = assignedFactory(true);
|
|
501
|
+
node.assignedNodes = assignedFactory(false);
|
|
502
|
+
}
|
|
503
|
+
function dispatchSlotChangeEvent(elm) {
|
|
504
|
+
elm.dispatchEvent(new CustomEvent("slotchange", { bubbles: false, cancelable: false, composed: false }));
|
|
505
|
+
}
|
|
506
|
+
function findSlotFromSlottedNode(slottedNode, parentHost) {
|
|
507
|
+
var _a;
|
|
508
|
+
parentHost = parentHost || ((_a = slottedNode["s-ol"]) == null ? void 0 : _a.parentElement);
|
|
509
|
+
if (!parentHost) return { slotNode: null, slotName: "" };
|
|
510
|
+
const slotName = slottedNode["s-sn"] = getSlotName(slottedNode) || "";
|
|
511
|
+
const childNodes = internalCall(parentHost, "childNodes");
|
|
512
|
+
const slotNode = getHostSlotNodes(childNodes, parentHost.tagName, slotName)[0];
|
|
513
|
+
return { slotNode, slotName };
|
|
514
|
+
}
|
|
515
|
+
|
|
516
|
+
// src/runtime/dom-extras.ts
|
|
517
|
+
var patchPseudoShadowDom = (hostElementPrototype) => {
|
|
518
|
+
patchCloneNode(hostElementPrototype);
|
|
519
|
+
patchSlotAppendChild(hostElementPrototype);
|
|
520
|
+
patchSlotAppend(hostElementPrototype);
|
|
521
|
+
patchSlotPrepend(hostElementPrototype);
|
|
522
|
+
patchSlotInsertAdjacentElement(hostElementPrototype);
|
|
523
|
+
patchSlotInsertAdjacentHTML(hostElementPrototype);
|
|
524
|
+
patchSlotInsertAdjacentText(hostElementPrototype);
|
|
525
|
+
patchInsertBefore(hostElementPrototype);
|
|
526
|
+
patchTextContent(hostElementPrototype);
|
|
527
|
+
patchChildSlotNodes(hostElementPrototype);
|
|
528
|
+
patchSlotRemoveChild(hostElementPrototype);
|
|
529
|
+
};
|
|
530
|
+
var patchCloneNode = (HostElementPrototype) => {
|
|
531
|
+
const orgCloneNode = HostElementPrototype.cloneNode;
|
|
532
|
+
HostElementPrototype.cloneNode = function(deep) {
|
|
533
|
+
const srcNode = this;
|
|
534
|
+
const isShadowDom = srcNode.shadowRoot && supportsShadow ;
|
|
535
|
+
const clonedNode = orgCloneNode.call(srcNode, isShadowDom ? deep : false);
|
|
536
|
+
if (!isShadowDom && deep) {
|
|
537
|
+
let i2 = 0;
|
|
538
|
+
let slotted, nonStencilNode;
|
|
539
|
+
const stencilPrivates = [
|
|
540
|
+
"s-id",
|
|
541
|
+
"s-cr",
|
|
542
|
+
"s-lr",
|
|
543
|
+
"s-rc",
|
|
544
|
+
"s-sc",
|
|
545
|
+
"s-p",
|
|
546
|
+
"s-cn",
|
|
547
|
+
"s-sr",
|
|
548
|
+
"s-sn",
|
|
549
|
+
"s-hn",
|
|
550
|
+
"s-ol",
|
|
551
|
+
"s-nr",
|
|
552
|
+
"s-si",
|
|
553
|
+
"s-rf",
|
|
554
|
+
"s-scs"
|
|
555
|
+
];
|
|
556
|
+
const childNodes = this.__childNodes || this.childNodes;
|
|
557
|
+
for (; i2 < childNodes.length; i2++) {
|
|
558
|
+
slotted = childNodes[i2]["s-nr"];
|
|
559
|
+
nonStencilNode = stencilPrivates.every((privateField) => !childNodes[i2][privateField]);
|
|
560
|
+
if (slotted) {
|
|
561
|
+
if (clonedNode.__appendChild) {
|
|
562
|
+
clonedNode.__appendChild(slotted.cloneNode(true));
|
|
563
|
+
} else {
|
|
564
|
+
clonedNode.appendChild(slotted.cloneNode(true));
|
|
565
|
+
}
|
|
566
|
+
}
|
|
567
|
+
if (nonStencilNode) {
|
|
568
|
+
clonedNode.appendChild(childNodes[i2].cloneNode(true));
|
|
569
|
+
}
|
|
570
|
+
}
|
|
571
|
+
}
|
|
572
|
+
return clonedNode;
|
|
573
|
+
};
|
|
574
|
+
};
|
|
575
|
+
var patchSlotAppendChild = (HostElementPrototype) => {
|
|
576
|
+
HostElementPrototype.__appendChild = HostElementPrototype.appendChild;
|
|
577
|
+
HostElementPrototype.appendChild = function(newChild) {
|
|
578
|
+
const { slotName, slotNode } = findSlotFromSlottedNode(newChild, this);
|
|
579
|
+
if (slotNode) {
|
|
580
|
+
addSlotRelocateNode(newChild, slotNode);
|
|
581
|
+
const slotChildNodes = getSlotChildSiblings(slotNode, slotName);
|
|
582
|
+
const appendAfter = slotChildNodes[slotChildNodes.length - 1];
|
|
583
|
+
const parent = internalCall(appendAfter, "parentNode");
|
|
584
|
+
const insertedNode = internalCall(parent, "insertBefore")(newChild, appendAfter.nextSibling);
|
|
585
|
+
dispatchSlotChangeEvent(slotNode);
|
|
586
|
+
updateFallbackSlotVisibility(this);
|
|
587
|
+
return insertedNode;
|
|
588
|
+
}
|
|
589
|
+
return this.__appendChild(newChild);
|
|
590
|
+
};
|
|
591
|
+
};
|
|
592
|
+
var patchSlotRemoveChild = (ElementPrototype) => {
|
|
593
|
+
ElementPrototype.__removeChild = ElementPrototype.removeChild;
|
|
594
|
+
ElementPrototype.removeChild = function(toRemove) {
|
|
595
|
+
if (toRemove && typeof toRemove["s-sn"] !== "undefined") {
|
|
596
|
+
const childNodes = this.__childNodes || this.childNodes;
|
|
597
|
+
const slotNode = getHostSlotNodes(childNodes, this.tagName, toRemove["s-sn"]);
|
|
598
|
+
if (slotNode && toRemove.isConnected) {
|
|
599
|
+
toRemove.remove();
|
|
600
|
+
updateFallbackSlotVisibility(this);
|
|
601
|
+
return;
|
|
602
|
+
}
|
|
603
|
+
}
|
|
604
|
+
return this.__removeChild(toRemove);
|
|
605
|
+
};
|
|
606
|
+
};
|
|
607
|
+
var patchSlotPrepend = (HostElementPrototype) => {
|
|
608
|
+
HostElementPrototype.__prepend = HostElementPrototype.prepend;
|
|
609
|
+
HostElementPrototype.prepend = function(...newChildren) {
|
|
610
|
+
newChildren.forEach((newChild) => {
|
|
611
|
+
if (typeof newChild === "string") {
|
|
612
|
+
newChild = this.ownerDocument.createTextNode(newChild);
|
|
613
|
+
}
|
|
614
|
+
const slotName = (newChild["s-sn"] = getSlotName(newChild)) || "";
|
|
615
|
+
const childNodes = internalCall(this, "childNodes");
|
|
616
|
+
const slotNode = getHostSlotNodes(childNodes, this.tagName, slotName)[0];
|
|
617
|
+
if (slotNode) {
|
|
618
|
+
addSlotRelocateNode(newChild, slotNode, true);
|
|
619
|
+
const slotChildNodes = getSlotChildSiblings(slotNode, slotName);
|
|
620
|
+
const appendAfter = slotChildNodes[0];
|
|
621
|
+
const parent = internalCall(appendAfter, "parentNode");
|
|
622
|
+
const toReturn = internalCall(parent, "insertBefore")(newChild, internalCall(appendAfter, "nextSibling"));
|
|
623
|
+
dispatchSlotChangeEvent(slotNode);
|
|
624
|
+
return toReturn;
|
|
625
|
+
}
|
|
626
|
+
if (newChild.nodeType === 1 && !!newChild.getAttribute("slot")) {
|
|
627
|
+
newChild.hidden = true;
|
|
628
|
+
}
|
|
629
|
+
return HostElementPrototype.__prepend(newChild);
|
|
630
|
+
});
|
|
631
|
+
};
|
|
632
|
+
};
|
|
633
|
+
var patchSlotAppend = (HostElementPrototype) => {
|
|
634
|
+
HostElementPrototype.__append = HostElementPrototype.append;
|
|
635
|
+
HostElementPrototype.append = function(...newChildren) {
|
|
636
|
+
newChildren.forEach((newChild) => {
|
|
637
|
+
if (typeof newChild === "string") {
|
|
638
|
+
newChild = this.ownerDocument.createTextNode(newChild);
|
|
639
|
+
}
|
|
640
|
+
this.appendChild(newChild);
|
|
641
|
+
});
|
|
642
|
+
};
|
|
643
|
+
};
|
|
644
|
+
var patchSlotInsertAdjacentHTML = (HostElementPrototype) => {
|
|
645
|
+
const originalInsertAdjacentHtml = HostElementPrototype.insertAdjacentHTML;
|
|
646
|
+
HostElementPrototype.insertAdjacentHTML = function(position, text) {
|
|
647
|
+
if (position !== "afterbegin" && position !== "beforeend") {
|
|
648
|
+
return originalInsertAdjacentHtml.call(this, position, text);
|
|
649
|
+
}
|
|
650
|
+
const container = this.ownerDocument.createElement("_");
|
|
651
|
+
let node;
|
|
652
|
+
container.innerHTML = text;
|
|
653
|
+
if (position === "afterbegin") {
|
|
654
|
+
while (node = container.firstChild) {
|
|
655
|
+
this.prepend(node);
|
|
656
|
+
}
|
|
657
|
+
} else if (position === "beforeend") {
|
|
658
|
+
while (node = container.firstChild) {
|
|
659
|
+
this.append(node);
|
|
660
|
+
}
|
|
661
|
+
}
|
|
662
|
+
};
|
|
663
|
+
};
|
|
664
|
+
var patchSlotInsertAdjacentText = (HostElementPrototype) => {
|
|
665
|
+
HostElementPrototype.insertAdjacentText = function(position, text) {
|
|
666
|
+
this.insertAdjacentHTML(position, text);
|
|
667
|
+
};
|
|
668
|
+
};
|
|
669
|
+
var patchInsertBefore = (HostElementPrototype) => {
|
|
670
|
+
const eleProto = HostElementPrototype;
|
|
671
|
+
if (eleProto.__insertBefore) return;
|
|
672
|
+
eleProto.__insertBefore = HostElementPrototype.insertBefore;
|
|
673
|
+
HostElementPrototype.insertBefore = function(newChild, currentChild) {
|
|
674
|
+
const { slotName, slotNode } = findSlotFromSlottedNode(newChild, this);
|
|
675
|
+
const slottedNodes = this.__childNodes ? this.childNodes : getSlottedChildNodes(this.childNodes);
|
|
676
|
+
if (slotNode) {
|
|
677
|
+
let found = false;
|
|
678
|
+
slottedNodes.forEach((childNode) => {
|
|
679
|
+
if (childNode === currentChild || currentChild === null) {
|
|
680
|
+
found = true;
|
|
681
|
+
if (currentChild === null || slotName !== currentChild["s-sn"]) {
|
|
682
|
+
this.appendChild(newChild);
|
|
683
|
+
return;
|
|
684
|
+
}
|
|
685
|
+
if (slotName === currentChild["s-sn"]) {
|
|
686
|
+
addSlotRelocateNode(newChild, slotNode);
|
|
687
|
+
const parent = internalCall(currentChild, "parentNode");
|
|
688
|
+
internalCall(parent, "insertBefore")(newChild, currentChild);
|
|
689
|
+
dispatchSlotChangeEvent(slotNode);
|
|
690
|
+
}
|
|
691
|
+
return;
|
|
692
|
+
}
|
|
693
|
+
});
|
|
694
|
+
if (found) return newChild;
|
|
695
|
+
}
|
|
696
|
+
const parentNode = currentChild == null ? void 0 : currentChild.__parentNode;
|
|
697
|
+
if (parentNode && !this.isSameNode(parentNode)) {
|
|
698
|
+
return this.appendChild(newChild);
|
|
699
|
+
}
|
|
700
|
+
return this.__insertBefore(newChild, currentChild);
|
|
701
|
+
};
|
|
702
|
+
};
|
|
703
|
+
var patchSlotInsertAdjacentElement = (HostElementPrototype) => {
|
|
704
|
+
const originalInsertAdjacentElement = HostElementPrototype.insertAdjacentElement;
|
|
705
|
+
HostElementPrototype.insertAdjacentElement = function(position, element) {
|
|
706
|
+
if (position !== "afterbegin" && position !== "beforeend") {
|
|
707
|
+
return originalInsertAdjacentElement.call(this, position, element);
|
|
708
|
+
}
|
|
709
|
+
if (position === "afterbegin") {
|
|
710
|
+
this.prepend(element);
|
|
711
|
+
return element;
|
|
712
|
+
} else if (position === "beforeend") {
|
|
713
|
+
this.append(element);
|
|
714
|
+
return element;
|
|
715
|
+
}
|
|
716
|
+
return element;
|
|
717
|
+
};
|
|
718
|
+
};
|
|
719
|
+
var patchTextContent = (hostElementPrototype) => {
|
|
720
|
+
patchHostOriginalAccessor("textContent", hostElementPrototype);
|
|
721
|
+
Object.defineProperty(hostElementPrototype, "textContent", {
|
|
722
|
+
get: function() {
|
|
723
|
+
let text = "";
|
|
724
|
+
const childNodes = this.__childNodes ? this.childNodes : getSlottedChildNodes(this.childNodes);
|
|
725
|
+
childNodes.forEach((node) => text += node.textContent || "");
|
|
726
|
+
return text;
|
|
727
|
+
},
|
|
728
|
+
set: function(value) {
|
|
729
|
+
const childNodes = this.__childNodes ? this.childNodes : getSlottedChildNodes(this.childNodes);
|
|
730
|
+
childNodes.forEach((node) => {
|
|
731
|
+
if (node["s-ol"]) node["s-ol"].remove();
|
|
732
|
+
node.remove();
|
|
733
|
+
});
|
|
734
|
+
this.insertAdjacentHTML("beforeend", value);
|
|
735
|
+
}
|
|
736
|
+
});
|
|
737
|
+
};
|
|
738
|
+
var patchChildSlotNodes = (elm) => {
|
|
739
|
+
class FakeNodeList extends Array {
|
|
740
|
+
item(n) {
|
|
741
|
+
return this[n];
|
|
742
|
+
}
|
|
743
|
+
}
|
|
744
|
+
patchHostOriginalAccessor("children", elm);
|
|
745
|
+
Object.defineProperty(elm, "children", {
|
|
746
|
+
get() {
|
|
747
|
+
return this.childNodes.filter((n) => n.nodeType === 1);
|
|
748
|
+
}
|
|
749
|
+
});
|
|
750
|
+
Object.defineProperty(elm, "childElementCount", {
|
|
751
|
+
get() {
|
|
752
|
+
return this.children.length;
|
|
753
|
+
}
|
|
754
|
+
});
|
|
755
|
+
patchHostOriginalAccessor("firstChild", elm);
|
|
756
|
+
Object.defineProperty(elm, "firstChild", {
|
|
757
|
+
get() {
|
|
758
|
+
return this.childNodes[0];
|
|
759
|
+
}
|
|
760
|
+
});
|
|
761
|
+
patchHostOriginalAccessor("lastChild", elm);
|
|
762
|
+
Object.defineProperty(elm, "lastChild", {
|
|
763
|
+
get() {
|
|
764
|
+
return this.childNodes[this.childNodes.length - 1];
|
|
765
|
+
}
|
|
766
|
+
});
|
|
767
|
+
patchHostOriginalAccessor("childNodes", elm);
|
|
768
|
+
Object.defineProperty(elm, "childNodes", {
|
|
769
|
+
get() {
|
|
770
|
+
const result = new FakeNodeList();
|
|
771
|
+
result.push(...getSlottedChildNodes(this.__childNodes));
|
|
772
|
+
return result;
|
|
773
|
+
}
|
|
774
|
+
});
|
|
775
|
+
};
|
|
776
|
+
var patchSlottedNode = (node) => {
|
|
777
|
+
if (!node || node.__nextSibling !== void 0 || !globalThis.Node) return;
|
|
778
|
+
patchNextSibling(node);
|
|
779
|
+
patchPreviousSibling(node);
|
|
780
|
+
patchParentNode(node);
|
|
781
|
+
if (node.nodeType === Node.ELEMENT_NODE) {
|
|
782
|
+
patchNextElementSibling(node);
|
|
783
|
+
patchPreviousElementSibling(node);
|
|
784
|
+
}
|
|
785
|
+
};
|
|
786
|
+
var patchNextSibling = (node) => {
|
|
787
|
+
if (!node || node.__nextSibling) return;
|
|
788
|
+
patchHostOriginalAccessor("nextSibling", node);
|
|
789
|
+
Object.defineProperty(node, "nextSibling", {
|
|
790
|
+
get: function() {
|
|
791
|
+
var _a;
|
|
792
|
+
const parentNodes = (_a = this["s-ol"]) == null ? void 0 : _a.parentNode.childNodes;
|
|
793
|
+
const index = parentNodes == null ? void 0 : parentNodes.indexOf(this);
|
|
794
|
+
if (parentNodes && index > -1) {
|
|
795
|
+
return parentNodes[index + 1];
|
|
796
|
+
}
|
|
797
|
+
return this.__nextSibling;
|
|
798
|
+
}
|
|
799
|
+
});
|
|
800
|
+
};
|
|
801
|
+
var patchNextElementSibling = (element) => {
|
|
802
|
+
if (!element || element.__nextElementSibling) return;
|
|
803
|
+
patchHostOriginalAccessor("nextElementSibling", element);
|
|
804
|
+
Object.defineProperty(element, "nextElementSibling", {
|
|
805
|
+
get: function() {
|
|
806
|
+
var _a;
|
|
807
|
+
const parentEles = (_a = this["s-ol"]) == null ? void 0 : _a.parentNode.children;
|
|
808
|
+
const index = parentEles == null ? void 0 : parentEles.indexOf(this);
|
|
809
|
+
if (parentEles && index > -1) {
|
|
810
|
+
return parentEles[index + 1];
|
|
811
|
+
}
|
|
812
|
+
return this.__nextElementSibling;
|
|
813
|
+
}
|
|
814
|
+
});
|
|
815
|
+
};
|
|
816
|
+
var patchPreviousSibling = (node) => {
|
|
817
|
+
if (!node || node.__previousSibling) return;
|
|
818
|
+
patchHostOriginalAccessor("previousSibling", node);
|
|
819
|
+
Object.defineProperty(node, "previousSibling", {
|
|
820
|
+
get: function() {
|
|
821
|
+
var _a;
|
|
822
|
+
const parentNodes = (_a = this["s-ol"]) == null ? void 0 : _a.parentNode.childNodes;
|
|
823
|
+
const index = parentNodes == null ? void 0 : parentNodes.indexOf(this);
|
|
824
|
+
if (parentNodes && index > -1) {
|
|
825
|
+
return parentNodes[index - 1];
|
|
826
|
+
}
|
|
827
|
+
return this.__previousSibling;
|
|
828
|
+
}
|
|
829
|
+
});
|
|
830
|
+
};
|
|
831
|
+
var patchPreviousElementSibling = (element) => {
|
|
832
|
+
if (!element || element.__previousElementSibling) return;
|
|
833
|
+
patchHostOriginalAccessor("previousElementSibling", element);
|
|
834
|
+
Object.defineProperty(element, "previousElementSibling", {
|
|
835
|
+
get: function() {
|
|
836
|
+
var _a;
|
|
837
|
+
const parentNodes = (_a = this["s-ol"]) == null ? void 0 : _a.parentNode.children;
|
|
838
|
+
const index = parentNodes == null ? void 0 : parentNodes.indexOf(this);
|
|
839
|
+
if (parentNodes && index > -1) {
|
|
840
|
+
return parentNodes[index - 1];
|
|
841
|
+
}
|
|
842
|
+
return this.__previousElementSibling;
|
|
843
|
+
}
|
|
844
|
+
});
|
|
845
|
+
};
|
|
846
|
+
var patchParentNode = (node) => {
|
|
847
|
+
if (!node || node.__parentNode) return;
|
|
848
|
+
patchHostOriginalAccessor("parentNode", node);
|
|
849
|
+
Object.defineProperty(node, "parentNode", {
|
|
850
|
+
get: function() {
|
|
851
|
+
var _a;
|
|
852
|
+
return ((_a = this["s-ol"]) == null ? void 0 : _a.parentNode) || this.__parentNode;
|
|
853
|
+
},
|
|
854
|
+
set: function(value) {
|
|
855
|
+
this.__parentNode = value;
|
|
856
|
+
}
|
|
857
|
+
});
|
|
858
|
+
};
|
|
859
|
+
var validElementPatches = ["children", "nextElementSibling", "previousElementSibling"];
|
|
860
|
+
var validNodesPatches = [
|
|
861
|
+
"childNodes",
|
|
862
|
+
"firstChild",
|
|
863
|
+
"lastChild",
|
|
864
|
+
"nextSibling",
|
|
865
|
+
"previousSibling",
|
|
866
|
+
"textContent",
|
|
867
|
+
"parentNode"
|
|
868
|
+
];
|
|
869
|
+
function patchHostOriginalAccessor(accessorName, node) {
|
|
870
|
+
let accessor;
|
|
871
|
+
if (validElementPatches.includes(accessorName)) {
|
|
872
|
+
accessor = Object.getOwnPropertyDescriptor(Element.prototype, accessorName);
|
|
873
|
+
} else if (validNodesPatches.includes(accessorName)) {
|
|
874
|
+
accessor = Object.getOwnPropertyDescriptor(Node.prototype, accessorName);
|
|
875
|
+
}
|
|
876
|
+
if (!accessor) {
|
|
877
|
+
accessor = Object.getOwnPropertyDescriptor(node, accessorName);
|
|
878
|
+
}
|
|
879
|
+
if (accessor) Object.defineProperty(node, "__" + accessorName, accessor);
|
|
880
|
+
}
|
|
881
|
+
function internalCall(node, method) {
|
|
882
|
+
if ("__" + method in node) {
|
|
883
|
+
const toReturn = node["__" + method];
|
|
884
|
+
if (typeof toReturn !== "function") return toReturn;
|
|
885
|
+
return toReturn.bind(node);
|
|
886
|
+
} else {
|
|
887
|
+
if (typeof node[method] !== "function") return node[method];
|
|
888
|
+
return node[method].bind(node);
|
|
889
|
+
}
|
|
890
|
+
}
|
|
234
891
|
var createTime = (fnName, tagName = "") => {
|
|
235
892
|
{
|
|
236
893
|
return () => {
|
|
@@ -359,54 +1016,166 @@ var convertToPrivate = (node) => {
|
|
|
359
1016
|
|
|
360
1017
|
// src/runtime/client-hydrate.ts
|
|
361
1018
|
var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
|
|
1019
|
+
var _a;
|
|
362
1020
|
const endHydrate = createTime("hydrateClient", tagName);
|
|
363
1021
|
const shadowRoot = hostElm.shadowRoot;
|
|
364
1022
|
const childRenderNodes = [];
|
|
365
1023
|
const slotNodes = [];
|
|
1024
|
+
const slottedNodes = [];
|
|
366
1025
|
const shadowRootNodes = shadowRoot ? [] : null;
|
|
367
|
-
const vnode =
|
|
368
|
-
|
|
369
|
-
|
|
1026
|
+
const vnode = newVNode(tagName, null);
|
|
1027
|
+
vnode.$elm$ = hostElm;
|
|
1028
|
+
const members = Object.entries(((_a = hostRef.$cmpMeta$) == null ? void 0 : _a.$members$) || {});
|
|
1029
|
+
members.forEach(([memberName, [memberFlags, metaAttributeName]]) => {
|
|
1030
|
+
var _a2;
|
|
1031
|
+
if (!(memberFlags & 31 /* Prop */)) {
|
|
1032
|
+
return;
|
|
1033
|
+
}
|
|
1034
|
+
const attributeName = metaAttributeName || memberName;
|
|
1035
|
+
const attrVal = hostElm.getAttribute(attributeName);
|
|
1036
|
+
if (attrVal !== null) {
|
|
1037
|
+
const attrPropVal = parsePropertyValue(attrVal, memberFlags);
|
|
1038
|
+
(_a2 = hostRef == null ? void 0 : hostRef.$instanceValues$) == null ? void 0 : _a2.set(memberName, attrPropVal);
|
|
1039
|
+
}
|
|
1040
|
+
});
|
|
1041
|
+
let scopeId2;
|
|
1042
|
+
{
|
|
1043
|
+
const cmpMeta = hostRef.$cmpMeta$;
|
|
1044
|
+
if (cmpMeta && cmpMeta.$flags$ & 10 /* needsScopedEncapsulation */ && hostElm["s-sc"]) {
|
|
1045
|
+
scopeId2 = hostElm["s-sc"];
|
|
1046
|
+
hostElm.classList.add(scopeId2 + "-h");
|
|
1047
|
+
} else if (hostElm["s-sc"]) {
|
|
1048
|
+
delete hostElm["s-sc"];
|
|
1049
|
+
}
|
|
1050
|
+
}
|
|
1051
|
+
if (win.document && (!plt.$orgLocNodes$ || !plt.$orgLocNodes$.size)) {
|
|
1052
|
+
initializeDocumentHydrate(win.document.body, plt.$orgLocNodes$ = /* @__PURE__ */ new Map());
|
|
370
1053
|
}
|
|
371
1054
|
hostElm[HYDRATE_ID] = hostId;
|
|
372
1055
|
hostElm.removeAttribute(HYDRATE_ID);
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
1056
|
+
hostRef.$vnode$ = clientHydrate(
|
|
1057
|
+
vnode,
|
|
1058
|
+
childRenderNodes,
|
|
1059
|
+
slotNodes,
|
|
1060
|
+
shadowRootNodes,
|
|
1061
|
+
hostElm,
|
|
1062
|
+
hostElm,
|
|
1063
|
+
hostId,
|
|
1064
|
+
slottedNodes
|
|
1065
|
+
);
|
|
1066
|
+
let crIndex = 0;
|
|
1067
|
+
const crLength = childRenderNodes.length;
|
|
1068
|
+
let childRenderNode;
|
|
1069
|
+
for (crIndex; crIndex < crLength; crIndex++) {
|
|
1070
|
+
childRenderNode = childRenderNodes[crIndex];
|
|
1071
|
+
const orgLocationId = childRenderNode.$hostId$ + "." + childRenderNode.$nodeId$;
|
|
376
1072
|
const orgLocationNode = plt.$orgLocNodes$.get(orgLocationId);
|
|
377
|
-
const node =
|
|
378
|
-
if (orgLocationNode && supportsShadow && orgLocationNode["s-en"] === "") {
|
|
379
|
-
orgLocationNode.parentNode.insertBefore(node, orgLocationNode.nextSibling);
|
|
380
|
-
}
|
|
1073
|
+
const node = childRenderNode.$elm$;
|
|
381
1074
|
if (!shadowRoot) {
|
|
382
|
-
node["s-hn"] = tagName;
|
|
383
|
-
if (
|
|
384
|
-
node["s-
|
|
385
|
-
|
|
1075
|
+
node["s-hn"] = tagName.toUpperCase();
|
|
1076
|
+
if (childRenderNode.$tag$ === "slot") {
|
|
1077
|
+
node["s-cr"] = hostElm["s-cr"];
|
|
1078
|
+
}
|
|
1079
|
+
}
|
|
1080
|
+
if (childRenderNode.$tag$ === "slot") {
|
|
1081
|
+
childRenderNode.$name$ = childRenderNode.$elm$["s-sn"] || childRenderNode.$elm$["name"] || null;
|
|
1082
|
+
if (childRenderNode.$children$) {
|
|
1083
|
+
childRenderNode.$flags$ |= 2 /* isSlotFallback */;
|
|
1084
|
+
if (!childRenderNode.$elm$.childNodes.length) {
|
|
1085
|
+
childRenderNode.$children$.forEach((c) => {
|
|
1086
|
+
childRenderNode.$elm$.appendChild(c.$elm$);
|
|
1087
|
+
});
|
|
1088
|
+
}
|
|
1089
|
+
} else {
|
|
1090
|
+
childRenderNode.$flags$ |= 1 /* isSlotReference */;
|
|
1091
|
+
}
|
|
1092
|
+
}
|
|
1093
|
+
if (orgLocationNode && orgLocationNode.isConnected) {
|
|
1094
|
+
if (shadowRoot && orgLocationNode["s-en"] === "") {
|
|
1095
|
+
orgLocationNode.parentNode.insertBefore(node, orgLocationNode.nextSibling);
|
|
1096
|
+
}
|
|
1097
|
+
orgLocationNode.parentNode.removeChild(orgLocationNode);
|
|
1098
|
+
if (!shadowRoot) {
|
|
1099
|
+
node["s-oo"] = parseInt(childRenderNode.$nodeId$);
|
|
386
1100
|
}
|
|
387
1101
|
}
|
|
388
1102
|
plt.$orgLocNodes$.delete(orgLocationId);
|
|
389
|
-
}
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
1103
|
+
}
|
|
1104
|
+
const hosts = [];
|
|
1105
|
+
const snLen = slottedNodes.length;
|
|
1106
|
+
let snIndex = 0;
|
|
1107
|
+
let slotGroup;
|
|
1108
|
+
let snGroupIdx;
|
|
1109
|
+
let snGroupLen;
|
|
1110
|
+
let slottedItem;
|
|
1111
|
+
for (snIndex; snIndex < snLen; snIndex++) {
|
|
1112
|
+
slotGroup = slottedNodes[snIndex];
|
|
1113
|
+
if (!slotGroup || !slotGroup.length) continue;
|
|
1114
|
+
snGroupLen = slotGroup.length;
|
|
1115
|
+
snGroupIdx = 0;
|
|
1116
|
+
for (snGroupIdx; snGroupIdx < snGroupLen; snGroupIdx++) {
|
|
1117
|
+
slottedItem = slotGroup[snGroupIdx];
|
|
1118
|
+
if (!hosts[slottedItem.hostId]) {
|
|
1119
|
+
hosts[slottedItem.hostId] = plt.$orgLocNodes$.get(slottedItem.hostId);
|
|
1120
|
+
}
|
|
1121
|
+
if (!hosts[slottedItem.hostId]) continue;
|
|
1122
|
+
const hostEle = hosts[slottedItem.hostId];
|
|
1123
|
+
if (!hostEle.shadowRoot || !shadowRoot) {
|
|
1124
|
+
slottedItem.slot["s-cr"] = hostEle["s-cr"];
|
|
1125
|
+
if (!slottedItem.slot["s-cr"] && hostEle.shadowRoot) {
|
|
1126
|
+
slottedItem.slot["s-cr"] = hostEle;
|
|
1127
|
+
} else {
|
|
1128
|
+
slottedItem.slot["s-cr"] = (hostEle.__childNodes || hostEle.childNodes)[0];
|
|
1129
|
+
}
|
|
1130
|
+
addSlotRelocateNode(slottedItem.node, slottedItem.slot, false, slottedItem.node["s-oo"]);
|
|
1131
|
+
{
|
|
1132
|
+
patchSlottedNode(slottedItem.node);
|
|
1133
|
+
}
|
|
394
1134
|
}
|
|
1135
|
+
if (hostEle.shadowRoot && slottedItem.node.parentElement !== hostEle) {
|
|
1136
|
+
hostEle.appendChild(slottedItem.node);
|
|
1137
|
+
}
|
|
1138
|
+
}
|
|
1139
|
+
}
|
|
1140
|
+
if (scopeId2 && slotNodes.length) {
|
|
1141
|
+
slotNodes.forEach((slot) => {
|
|
1142
|
+
slot.$elm$.parentElement.classList.add(scopeId2 + "-s");
|
|
395
1143
|
});
|
|
396
1144
|
}
|
|
1145
|
+
if (shadowRoot && !shadowRoot.childNodes.length) {
|
|
1146
|
+
let rnIdex = 0;
|
|
1147
|
+
const rnLen = shadowRootNodes.length;
|
|
1148
|
+
if (rnLen) {
|
|
1149
|
+
for (rnIdex; rnIdex < rnLen; rnIdex++) {
|
|
1150
|
+
shadowRoot.appendChild(shadowRootNodes[rnIdex]);
|
|
1151
|
+
}
|
|
1152
|
+
Array.from(hostElm.childNodes).forEach((node) => {
|
|
1153
|
+
if (typeof node["s-sn"] !== "string") {
|
|
1154
|
+
if (node.nodeType === 1 /* ElementNode */ && node.slot && node.hidden) {
|
|
1155
|
+
node.removeAttribute("hidden");
|
|
1156
|
+
} else if (node.nodeType === 8 /* CommentNode */ || node.nodeType === 3 /* TextNode */ && !node.wholeText.trim()) {
|
|
1157
|
+
node.parentNode.removeChild(node);
|
|
1158
|
+
}
|
|
1159
|
+
}
|
|
1160
|
+
});
|
|
1161
|
+
}
|
|
1162
|
+
}
|
|
1163
|
+
plt.$orgLocNodes$.delete(hostElm["s-id"]);
|
|
1164
|
+
hostRef.$hostElement$ = hostElm;
|
|
397
1165
|
endHydrate();
|
|
398
1166
|
};
|
|
399
|
-
var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, node, hostId) => {
|
|
1167
|
+
var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, node, hostId, slottedNodes = []) => {
|
|
400
1168
|
let childNodeType;
|
|
401
1169
|
let childIdSplt;
|
|
402
1170
|
let childVNode;
|
|
403
1171
|
let i2;
|
|
1172
|
+
const scopeId2 = hostElm["s-sc"];
|
|
404
1173
|
if (node.nodeType === 1 /* ElementNode */) {
|
|
405
1174
|
childNodeType = node.getAttribute(HYDRATE_CHILD_ID);
|
|
406
1175
|
if (childNodeType) {
|
|
407
1176
|
childIdSplt = childNodeType.split(".");
|
|
408
1177
|
if (childIdSplt[0] === hostId || childIdSplt[0] === "0") {
|
|
409
|
-
childVNode = {
|
|
1178
|
+
childVNode = createSimpleVNode({
|
|
410
1179
|
$flags$: 0,
|
|
411
1180
|
$hostId$: childIdSplt[0],
|
|
412
1181
|
$nodeId$: childIdSplt[1],
|
|
@@ -414,18 +1183,43 @@ var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes,
|
|
|
414
1183
|
$index$: childIdSplt[3],
|
|
415
1184
|
$tag$: node.tagName.toLowerCase(),
|
|
416
1185
|
$elm$: node,
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
$
|
|
420
|
-
|
|
421
|
-
$text$: null
|
|
422
|
-
};
|
|
1186
|
+
// If we don't add the initial classes to the VNode, the first `vdom-render.ts` patch
|
|
1187
|
+
// won't try to reconcile them. Classes set on the node will be blown away.
|
|
1188
|
+
$attrs$: { class: node.className || "" }
|
|
1189
|
+
});
|
|
423
1190
|
childRenderNodes.push(childVNode);
|
|
424
1191
|
node.removeAttribute(HYDRATE_CHILD_ID);
|
|
425
1192
|
if (!parentVNode.$children$) {
|
|
426
1193
|
parentVNode.$children$ = [];
|
|
427
1194
|
}
|
|
428
|
-
|
|
1195
|
+
if (scopeId2) {
|
|
1196
|
+
node["s-si"] = scopeId2;
|
|
1197
|
+
childVNode.$attrs$.class += " " + scopeId2;
|
|
1198
|
+
}
|
|
1199
|
+
const slotName = childVNode.$elm$.getAttribute("s-sn");
|
|
1200
|
+
if (typeof slotName === "string") {
|
|
1201
|
+
if (childVNode.$tag$ === "slot-fb") {
|
|
1202
|
+
addSlot(
|
|
1203
|
+
slotName,
|
|
1204
|
+
childIdSplt[2],
|
|
1205
|
+
childVNode,
|
|
1206
|
+
node,
|
|
1207
|
+
parentVNode,
|
|
1208
|
+
childRenderNodes,
|
|
1209
|
+
slotNodes,
|
|
1210
|
+
shadowRootNodes,
|
|
1211
|
+
slottedNodes
|
|
1212
|
+
);
|
|
1213
|
+
if (scopeId2) {
|
|
1214
|
+
node.classList.add(scopeId2);
|
|
1215
|
+
}
|
|
1216
|
+
}
|
|
1217
|
+
childVNode.$elm$["s-sn"] = slotName;
|
|
1218
|
+
childVNode.$elm$.removeAttribute("s-sn");
|
|
1219
|
+
}
|
|
1220
|
+
if (childVNode.$index$ !== void 0) {
|
|
1221
|
+
parentVNode.$children$[childVNode.$index$] = childVNode;
|
|
1222
|
+
}
|
|
429
1223
|
parentVNode = childVNode;
|
|
430
1224
|
if (shadowRootNodes && childVNode.$depth$ === "0") {
|
|
431
1225
|
shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
|
|
@@ -441,31 +1235,33 @@ var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes,
|
|
|
441
1235
|
shadowRootNodes,
|
|
442
1236
|
hostElm,
|
|
443
1237
|
node.shadowRoot.childNodes[i2],
|
|
444
|
-
hostId
|
|
1238
|
+
hostId,
|
|
1239
|
+
slottedNodes
|
|
445
1240
|
);
|
|
446
1241
|
}
|
|
447
1242
|
}
|
|
448
|
-
|
|
1243
|
+
const nonShadowNodes = node.__childNodes || node.childNodes;
|
|
1244
|
+
for (i2 = nonShadowNodes.length - 1; i2 >= 0; i2--) {
|
|
449
1245
|
clientHydrate(
|
|
450
1246
|
parentVNode,
|
|
451
1247
|
childRenderNodes,
|
|
452
1248
|
slotNodes,
|
|
453
1249
|
shadowRootNodes,
|
|
454
1250
|
hostElm,
|
|
455
|
-
|
|
456
|
-
hostId
|
|
1251
|
+
nonShadowNodes[i2],
|
|
1252
|
+
hostId,
|
|
1253
|
+
slottedNodes
|
|
457
1254
|
);
|
|
458
1255
|
}
|
|
459
1256
|
} else if (node.nodeType === 8 /* CommentNode */) {
|
|
460
1257
|
childIdSplt = node.nodeValue.split(".");
|
|
461
1258
|
if (childIdSplt[1] === hostId || childIdSplt[1] === "0") {
|
|
462
1259
|
childNodeType = childIdSplt[0];
|
|
463
|
-
childVNode = {
|
|
464
|
-
$flags$: 0,
|
|
1260
|
+
childVNode = createSimpleVNode({
|
|
465
1261
|
$hostId$: childIdSplt[1],
|
|
466
1262
|
$nodeId$: childIdSplt[2],
|
|
467
1263
|
$depth$: childIdSplt[3],
|
|
468
|
-
$index$: childIdSplt[4],
|
|
1264
|
+
$index$: childIdSplt[4] || "0",
|
|
469
1265
|
$elm$: node,
|
|
470
1266
|
$attrs$: null,
|
|
471
1267
|
$children$: null,
|
|
@@ -473,46 +1269,43 @@ var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes,
|
|
|
473
1269
|
$name$: null,
|
|
474
1270
|
$tag$: null,
|
|
475
1271
|
$text$: null
|
|
476
|
-
};
|
|
1272
|
+
});
|
|
477
1273
|
if (childNodeType === TEXT_NODE_ID) {
|
|
478
|
-
childVNode.$elm$ = node
|
|
1274
|
+
childVNode.$elm$ = findCorrespondingNode(node, 3 /* TextNode */);
|
|
479
1275
|
if (childVNode.$elm$ && childVNode.$elm$.nodeType === 3 /* TextNode */) {
|
|
480
1276
|
childVNode.$text$ = childVNode.$elm$.textContent;
|
|
481
1277
|
childRenderNodes.push(childVNode);
|
|
482
1278
|
node.remove();
|
|
483
|
-
if (
|
|
484
|
-
parentVNode.$children$
|
|
1279
|
+
if (hostId === childVNode.$hostId$) {
|
|
1280
|
+
if (!parentVNode.$children$) {
|
|
1281
|
+
parentVNode.$children$ = [];
|
|
1282
|
+
}
|
|
1283
|
+
parentVNode.$children$[childVNode.$index$] = childVNode;
|
|
485
1284
|
}
|
|
486
|
-
parentVNode.$children$[childVNode.$index$] = childVNode;
|
|
487
1285
|
if (shadowRootNodes && childVNode.$depth$ === "0") {
|
|
488
1286
|
shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
|
|
489
1287
|
}
|
|
490
1288
|
}
|
|
1289
|
+
} else if (childNodeType === COMMENT_NODE_ID) {
|
|
1290
|
+
childVNode.$elm$ = findCorrespondingNode(node, 8 /* CommentNode */);
|
|
1291
|
+
if (childVNode.$elm$ && childVNode.$elm$.nodeType === 8 /* CommentNode */) {
|
|
1292
|
+
childRenderNodes.push(childVNode);
|
|
1293
|
+
node.remove();
|
|
1294
|
+
}
|
|
491
1295
|
} else if (childVNode.$hostId$ === hostId) {
|
|
492
1296
|
if (childNodeType === SLOT_NODE_ID) {
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
node.parentNode.insertBefore(childVNode.$elm$, node);
|
|
506
|
-
node.remove();
|
|
507
|
-
if (childVNode.$depth$ === "0") {
|
|
508
|
-
shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
|
|
509
|
-
}
|
|
510
|
-
}
|
|
511
|
-
slotNodes.push(childVNode);
|
|
512
|
-
if (!parentVNode.$children$) {
|
|
513
|
-
parentVNode.$children$ = [];
|
|
514
|
-
}
|
|
515
|
-
parentVNode.$children$[childVNode.$index$] = childVNode;
|
|
1297
|
+
const slotName = node["s-sn"] = childIdSplt[5] || "";
|
|
1298
|
+
addSlot(
|
|
1299
|
+
slotName,
|
|
1300
|
+
childIdSplt[2],
|
|
1301
|
+
childVNode,
|
|
1302
|
+
node,
|
|
1303
|
+
parentVNode,
|
|
1304
|
+
childRenderNodes,
|
|
1305
|
+
slotNodes,
|
|
1306
|
+
shadowRootNodes,
|
|
1307
|
+
slottedNodes
|
|
1308
|
+
);
|
|
516
1309
|
} else if (childNodeType === CONTENT_REF_ID) {
|
|
517
1310
|
if (shadowRootNodes) {
|
|
518
1311
|
node.remove();
|
|
@@ -528,18 +1321,28 @@ var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes,
|
|
|
528
1321
|
vnode.$elm$ = node;
|
|
529
1322
|
vnode.$index$ = "0";
|
|
530
1323
|
parentVNode.$children$ = [vnode];
|
|
1324
|
+
} else {
|
|
1325
|
+
if (node.nodeType === 3 /* TextNode */ && !node.wholeText.trim()) {
|
|
1326
|
+
node.remove();
|
|
1327
|
+
}
|
|
531
1328
|
}
|
|
1329
|
+
return parentVNode;
|
|
532
1330
|
};
|
|
533
1331
|
var initializeDocumentHydrate = (node, orgLocNodes) => {
|
|
534
1332
|
if (node.nodeType === 1 /* ElementNode */) {
|
|
1333
|
+
const componentId = node[HYDRATE_ID] || node.getAttribute(HYDRATE_ID);
|
|
1334
|
+
if (componentId) {
|
|
1335
|
+
orgLocNodes.set(componentId, node);
|
|
1336
|
+
}
|
|
535
1337
|
let i2 = 0;
|
|
536
1338
|
if (node.shadowRoot) {
|
|
537
1339
|
for (; i2 < node.shadowRoot.childNodes.length; i2++) {
|
|
538
1340
|
initializeDocumentHydrate(node.shadowRoot.childNodes[i2], orgLocNodes);
|
|
539
1341
|
}
|
|
540
1342
|
}
|
|
541
|
-
|
|
542
|
-
|
|
1343
|
+
const nonShadowNodes = node.__childNodes || node.childNodes;
|
|
1344
|
+
for (i2 = 0; i2 < nonShadowNodes.length; i2++) {
|
|
1345
|
+
initializeDocumentHydrate(nonShadowNodes[i2], orgLocNodes);
|
|
543
1346
|
}
|
|
544
1347
|
} else if (node.nodeType === 8 /* CommentNode */) {
|
|
545
1348
|
const childIdSplt = node.nodeValue.split(".");
|
|
@@ -550,18 +1353,110 @@ var initializeDocumentHydrate = (node, orgLocNodes) => {
|
|
|
550
1353
|
}
|
|
551
1354
|
}
|
|
552
1355
|
};
|
|
1356
|
+
var createSimpleVNode = (vnode) => {
|
|
1357
|
+
const defaultVNode = {
|
|
1358
|
+
$flags$: 0,
|
|
1359
|
+
$hostId$: null,
|
|
1360
|
+
$nodeId$: null,
|
|
1361
|
+
$depth$: null,
|
|
1362
|
+
$index$: "0",
|
|
1363
|
+
$elm$: null,
|
|
1364
|
+
$attrs$: null,
|
|
1365
|
+
$children$: null,
|
|
1366
|
+
$key$: null,
|
|
1367
|
+
$name$: null,
|
|
1368
|
+
$tag$: null,
|
|
1369
|
+
$text$: null
|
|
1370
|
+
};
|
|
1371
|
+
return { ...defaultVNode, ...vnode };
|
|
1372
|
+
};
|
|
1373
|
+
function addSlot(slotName, slotId, childVNode, node, parentVNode, childRenderNodes, slotNodes, shadowRootNodes, slottedNodes) {
|
|
1374
|
+
node["s-sr"] = true;
|
|
1375
|
+
childVNode.$name$ = slotName || null;
|
|
1376
|
+
childVNode.$tag$ = "slot";
|
|
1377
|
+
const parentNodeId = (parentVNode == null ? void 0 : parentVNode.$elm$) ? parentVNode.$elm$["s-id"] || parentVNode.$elm$.getAttribute("s-id") : "";
|
|
1378
|
+
if (shadowRootNodes && win.document) {
|
|
1379
|
+
const slot = childVNode.$elm$ = win.document.createElement(childVNode.$tag$);
|
|
1380
|
+
if (childVNode.$name$) {
|
|
1381
|
+
childVNode.$elm$.setAttribute("name", slotName);
|
|
1382
|
+
}
|
|
1383
|
+
if (parentNodeId && parentNodeId !== childVNode.$hostId$) {
|
|
1384
|
+
parentVNode.$elm$.insertBefore(slot, parentVNode.$elm$.children[0]);
|
|
1385
|
+
} else {
|
|
1386
|
+
node.parentNode.insertBefore(childVNode.$elm$, node);
|
|
1387
|
+
}
|
|
1388
|
+
addSlottedNodes(slottedNodes, slotId, slotName, node, childVNode.$hostId$);
|
|
1389
|
+
node.remove();
|
|
1390
|
+
if (childVNode.$depth$ === "0") {
|
|
1391
|
+
shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
|
|
1392
|
+
}
|
|
1393
|
+
} else {
|
|
1394
|
+
const slot = childVNode.$elm$;
|
|
1395
|
+
const shouldMove = parentNodeId && parentNodeId !== childVNode.$hostId$ && parentVNode.$elm$.shadowRoot;
|
|
1396
|
+
addSlottedNodes(slottedNodes, slotId, slotName, node, shouldMove ? parentNodeId : childVNode.$hostId$);
|
|
1397
|
+
patchSlotNode(node);
|
|
1398
|
+
if (shouldMove) {
|
|
1399
|
+
parentVNode.$elm$.insertBefore(slot, parentVNode.$elm$.children[0]);
|
|
1400
|
+
}
|
|
1401
|
+
childRenderNodes.push(childVNode);
|
|
1402
|
+
}
|
|
1403
|
+
slotNodes.push(childVNode);
|
|
1404
|
+
if (!parentVNode.$children$) {
|
|
1405
|
+
parentVNode.$children$ = [];
|
|
1406
|
+
}
|
|
1407
|
+
parentVNode.$children$[childVNode.$index$] = childVNode;
|
|
1408
|
+
}
|
|
1409
|
+
var addSlottedNodes = (slottedNodes, slotNodeId, slotName, slotNode, hostId) => {
|
|
1410
|
+
let slottedNode = slotNode.nextSibling;
|
|
1411
|
+
slottedNodes[slotNodeId] = slottedNodes[slotNodeId] || [];
|
|
1412
|
+
while (slottedNode && ((slottedNode["getAttribute"] && slottedNode.getAttribute("slot") || slottedNode["s-sn"]) === slotName || slotName === "" && !slottedNode["s-sn"] && (slottedNode.nodeType === 8 /* CommentNode */ && slottedNode.nodeValue.indexOf(".") !== 1 || slottedNode.nodeType === 3 /* TextNode */))) {
|
|
1413
|
+
slottedNode["s-sn"] = slotName;
|
|
1414
|
+
slottedNodes[slotNodeId].push({ slot: slotNode, node: slottedNode, hostId });
|
|
1415
|
+
slottedNode = slottedNode.nextSibling;
|
|
1416
|
+
}
|
|
1417
|
+
};
|
|
1418
|
+
var findCorrespondingNode = (node, type) => {
|
|
1419
|
+
let sibling = node;
|
|
1420
|
+
do {
|
|
1421
|
+
sibling = sibling.nextSibling;
|
|
1422
|
+
} while (sibling && (sibling.nodeType !== type || !sibling.nodeValue));
|
|
1423
|
+
return sibling;
|
|
1424
|
+
};
|
|
1425
|
+
var createSupportsRuleRe = (selector) => {
|
|
1426
|
+
const safeSelector2 = escapeRegExpSpecialCharacters(selector);
|
|
1427
|
+
return new RegExp(
|
|
1428
|
+
// First capture group: match any context before the selector that's not inside @supports selector()
|
|
1429
|
+
// Using negative lookahead to avoid matching inside @supports selector(...) condition
|
|
1430
|
+
`(^|[^@]|@(?!supports\\s+selector\\s*\\([^{]*?${safeSelector2}))(${safeSelector2}\\b)`,
|
|
1431
|
+
"g"
|
|
1432
|
+
);
|
|
1433
|
+
};
|
|
1434
|
+
createSupportsRuleRe("::slotted");
|
|
1435
|
+
createSupportsRuleRe(":host");
|
|
1436
|
+
createSupportsRuleRe(":host-context");
|
|
553
1437
|
|
|
554
1438
|
// src/runtime/mode.ts
|
|
555
1439
|
var computeMode = (elm) => modeResolutionChain.map((h2) => h2(elm)).find((m) => !!m);
|
|
556
1440
|
var setMode = (handler) => modeResolutionChain.push(handler);
|
|
557
1441
|
var getMode = (ref) => getHostRef(ref).$modeName$;
|
|
558
1442
|
var parsePropertyValue = (propValue, propType) => {
|
|
1443
|
+
if (typeof propValue === "string" && (propValue.startsWith("{") && propValue.endsWith("}") || propValue.startsWith("[") && propValue.endsWith("]"))) {
|
|
1444
|
+
try {
|
|
1445
|
+
propValue = JSON.parse(propValue);
|
|
1446
|
+
return propValue;
|
|
1447
|
+
} catch (e) {
|
|
1448
|
+
}
|
|
1449
|
+
}
|
|
1450
|
+
if (typeof propValue === "string" && propValue.startsWith(SERIALIZED_PREFIX)) {
|
|
1451
|
+
propValue = deserializeProperty(propValue);
|
|
1452
|
+
return propValue;
|
|
1453
|
+
}
|
|
559
1454
|
if (propValue != null && !isComplexType(propValue)) {
|
|
560
1455
|
if (propType & 4 /* Boolean */) {
|
|
561
1456
|
return propValue === "false" ? false : propValue === "" || !!propValue;
|
|
562
1457
|
}
|
|
563
1458
|
if (propType & 2 /* Number */) {
|
|
564
|
-
return parseFloat(propValue);
|
|
1459
|
+
return typeof propValue === "string" ? parseFloat(propValue) : typeof propValue === "number" ? propValue : NaN;
|
|
565
1460
|
}
|
|
566
1461
|
if (propType & 1 /* String */) {
|
|
567
1462
|
return String(propValue);
|
|
@@ -610,7 +1505,10 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
610
1505
|
var _a;
|
|
611
1506
|
const scopeId2 = getScopeId(cmpMeta, mode);
|
|
612
1507
|
const style = styles.get(scopeId2);
|
|
613
|
-
|
|
1508
|
+
if (!win.document) {
|
|
1509
|
+
return scopeId2;
|
|
1510
|
+
}
|
|
1511
|
+
styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : win.document;
|
|
614
1512
|
if (style) {
|
|
615
1513
|
if (typeof style === "string") {
|
|
616
1514
|
styleContainerNode = styleContainerNode.head || styleContainerNode;
|
|
@@ -623,23 +1521,39 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
623
1521
|
if (styleContainerNode.host && (styleElm = styleContainerNode.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`))) {
|
|
624
1522
|
styleElm.innerHTML = style;
|
|
625
1523
|
} else {
|
|
626
|
-
styleElm =
|
|
1524
|
+
styleElm = document.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`) || win.document.createElement("style");
|
|
627
1525
|
styleElm.innerHTML = style;
|
|
628
|
-
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(
|
|
1526
|
+
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(win.document);
|
|
629
1527
|
if (nonce != null) {
|
|
630
1528
|
styleElm.setAttribute("nonce", nonce);
|
|
631
1529
|
}
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
1530
|
+
if (!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */)) {
|
|
1531
|
+
if (styleContainerNode.nodeName === "HEAD") {
|
|
1532
|
+
const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
|
|
1533
|
+
const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
|
|
1534
|
+
styleContainerNode.insertBefore(
|
|
1535
|
+
styleElm,
|
|
1536
|
+
(referenceNode2 == null ? void 0 : referenceNode2.parentNode) === styleContainerNode ? referenceNode2 : null
|
|
1537
|
+
);
|
|
1538
|
+
} else if ("host" in styleContainerNode) {
|
|
1539
|
+
if (supportsConstructableStylesheets) {
|
|
1540
|
+
const stylesheet = new CSSStyleSheet();
|
|
1541
|
+
stylesheet.replaceSync(style);
|
|
1542
|
+
styleContainerNode.adoptedStyleSheets = [stylesheet, ...styleContainerNode.adoptedStyleSheets];
|
|
1543
|
+
} else {
|
|
1544
|
+
const existingStyleContainer = styleContainerNode.querySelector("style");
|
|
1545
|
+
if (existingStyleContainer) {
|
|
1546
|
+
existingStyleContainer.innerHTML = style + existingStyleContainer.innerHTML;
|
|
1547
|
+
} else {
|
|
1548
|
+
styleContainerNode.prepend(styleElm);
|
|
1549
|
+
}
|
|
1550
|
+
}
|
|
1551
|
+
} else {
|
|
1552
|
+
styleContainerNode.append(styleElm);
|
|
1553
|
+
}
|
|
1554
|
+
}
|
|
1555
|
+
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
|
|
1556
|
+
styleContainerNode.insertBefore(styleElm, null);
|
|
643
1557
|
}
|
|
644
1558
|
}
|
|
645
1559
|
if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
|
|
@@ -665,131 +1579,177 @@ var attachStyles = (hostRef) => {
|
|
|
665
1579
|
cmpMeta,
|
|
666
1580
|
hostRef.$modeName$
|
|
667
1581
|
);
|
|
668
|
-
if (flags & 10 /* needsScopedEncapsulation */
|
|
1582
|
+
if (flags & 10 /* needsScopedEncapsulation */) {
|
|
669
1583
|
elm["s-sc"] = scopeId2;
|
|
670
1584
|
elm.classList.add(scopeId2 + "-h");
|
|
671
|
-
if (flags & 2 /* scopedCssEncapsulation */) {
|
|
672
|
-
elm.classList.add(scopeId2 + "-s");
|
|
673
|
-
}
|
|
674
1585
|
}
|
|
675
1586
|
endAttachStyles();
|
|
676
1587
|
};
|
|
677
1588
|
var getScopeId = (cmp, mode) => "sc-" + (mode && cmp.$flags$ & 32 /* hasMode */ ? cmp.$tagName$ + "-" + mode : cmp.$tagName$);
|
|
678
|
-
var
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
1589
|
+
var convertScopedToShadow = (css) => css.replace(/\/\*!@([^\/]+)\*\/[^\{]+\{/g, "$1{");
|
|
1590
|
+
var hydrateScopedToShadow = () => {
|
|
1591
|
+
if (!win.document) {
|
|
1592
|
+
return;
|
|
1593
|
+
}
|
|
1594
|
+
const styles2 = win.document.querySelectorAll(`[${HYDRATED_STYLE_ID}]`);
|
|
1595
|
+
let i2 = 0;
|
|
1596
|
+
for (; i2 < styles2.length; i2++) {
|
|
1597
|
+
registerStyle(styles2[i2].getAttribute(HYDRATED_STYLE_ID), convertScopedToShadow(styles2[i2].innerHTML), true);
|
|
1598
|
+
}
|
|
1599
|
+
};
|
|
1600
|
+
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRender) => {
|
|
1601
|
+
if (oldValue === newValue) {
|
|
1602
|
+
return;
|
|
1603
|
+
}
|
|
1604
|
+
let isProp = isMemberInElement(elm, memberName);
|
|
1605
|
+
let ln = memberName.toLowerCase();
|
|
1606
|
+
if (memberName === "class") {
|
|
1607
|
+
const classList = elm.classList;
|
|
1608
|
+
const oldClasses = parseClassList(oldValue);
|
|
1609
|
+
let newClasses = parseClassList(newValue);
|
|
1610
|
+
if (elm["s-si"] && initialRender) {
|
|
1611
|
+
newClasses.push(elm["s-si"]);
|
|
1612
|
+
oldClasses.forEach((c) => {
|
|
1613
|
+
if (c.startsWith(elm["s-si"])) newClasses.push(c);
|
|
1614
|
+
});
|
|
1615
|
+
newClasses = [...new Set(newClasses)];
|
|
1616
|
+
classList.add(...newClasses);
|
|
1617
|
+
} else {
|
|
686
1618
|
classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
|
|
687
1619
|
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
688
|
-
}
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
elm.style.removeProperty(prop);
|
|
694
|
-
} else {
|
|
695
|
-
elm.style[prop] = "";
|
|
696
|
-
}
|
|
697
|
-
}
|
|
698
|
-
}
|
|
699
|
-
}
|
|
700
|
-
for (const prop in newValue) {
|
|
701
|
-
if (!oldValue || newValue[prop] !== oldValue[prop]) {
|
|
1620
|
+
}
|
|
1621
|
+
} else if (memberName === "style") {
|
|
1622
|
+
{
|
|
1623
|
+
for (const prop in oldValue) {
|
|
1624
|
+
if (!newValue || newValue[prop] == null) {
|
|
702
1625
|
if (prop.includes("-")) {
|
|
703
|
-
elm.style.
|
|
1626
|
+
elm.style.removeProperty(prop);
|
|
704
1627
|
} else {
|
|
705
|
-
elm.style[prop] =
|
|
1628
|
+
elm.style[prop] = "";
|
|
706
1629
|
}
|
|
707
1630
|
}
|
|
708
1631
|
}
|
|
709
|
-
}
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
} else if (isMemberInElement(win, ln)) {
|
|
717
|
-
memberName = ln.slice(2);
|
|
718
|
-
} else {
|
|
719
|
-
memberName = ln[2] + memberName.slice(3);
|
|
720
|
-
}
|
|
721
|
-
if (oldValue || newValue) {
|
|
722
|
-
const capture = memberName.endsWith(CAPTURE_EVENT_SUFFIX);
|
|
723
|
-
memberName = memberName.replace(CAPTURE_EVENT_REGEX, "");
|
|
724
|
-
if (oldValue) {
|
|
725
|
-
plt.rel(elm, memberName, oldValue, capture);
|
|
726
|
-
}
|
|
727
|
-
if (newValue) {
|
|
728
|
-
plt.ael(elm, memberName, newValue, capture);
|
|
1632
|
+
}
|
|
1633
|
+
for (const prop in newValue) {
|
|
1634
|
+
if (!oldValue || newValue[prop] !== oldValue[prop]) {
|
|
1635
|
+
if (prop.includes("-")) {
|
|
1636
|
+
elm.style.setProperty(prop, newValue[prop]);
|
|
1637
|
+
} else {
|
|
1638
|
+
elm.style[prop] = newValue[prop];
|
|
729
1639
|
}
|
|
730
1640
|
}
|
|
1641
|
+
}
|
|
1642
|
+
} else if (memberName === "key") ; else if (memberName === "ref") {
|
|
1643
|
+
if (newValue) {
|
|
1644
|
+
newValue(elm);
|
|
1645
|
+
}
|
|
1646
|
+
} else if ((!isProp ) && memberName[0] === "o" && memberName[1] === "n") {
|
|
1647
|
+
if (memberName[2] === "-") {
|
|
1648
|
+
memberName = memberName.slice(3);
|
|
1649
|
+
} else if (isMemberInElement(win, ln)) {
|
|
1650
|
+
memberName = ln.slice(2);
|
|
731
1651
|
} else {
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
1652
|
+
memberName = ln[2] + memberName.slice(3);
|
|
1653
|
+
}
|
|
1654
|
+
if (oldValue || newValue) {
|
|
1655
|
+
const capture = memberName.endsWith(CAPTURE_EVENT_SUFFIX);
|
|
1656
|
+
memberName = memberName.replace(CAPTURE_EVENT_REGEX, "");
|
|
1657
|
+
if (oldValue) {
|
|
1658
|
+
plt.rel(elm, memberName, oldValue, capture);
|
|
1659
|
+
}
|
|
1660
|
+
if (newValue) {
|
|
1661
|
+
plt.ael(elm, memberName, newValue, capture);
|
|
1662
|
+
}
|
|
1663
|
+
}
|
|
1664
|
+
} else {
|
|
1665
|
+
const isComplex = isComplexType(newValue);
|
|
1666
|
+
if ((isProp || isComplex && newValue !== null) && !isSvg) {
|
|
1667
|
+
try {
|
|
1668
|
+
if (!elm.tagName.includes("-")) {
|
|
1669
|
+
const n = newValue == null ? "" : newValue;
|
|
1670
|
+
if (memberName === "list") {
|
|
1671
|
+
isProp = false;
|
|
1672
|
+
} else if (oldValue == null || elm[memberName] != n) {
|
|
1673
|
+
if (typeof elm.__lookupSetter__(memberName) === "function") {
|
|
740
1674
|
elm[memberName] = n;
|
|
1675
|
+
} else {
|
|
1676
|
+
elm.setAttribute(memberName, n);
|
|
741
1677
|
}
|
|
742
|
-
} else {
|
|
743
|
-
elm[memberName] = newValue;
|
|
744
1678
|
}
|
|
745
|
-
}
|
|
1679
|
+
} else if (elm[memberName] !== newValue) {
|
|
1680
|
+
elm[memberName] = newValue;
|
|
746
1681
|
}
|
|
1682
|
+
} catch (e) {
|
|
747
1683
|
}
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
1684
|
+
}
|
|
1685
|
+
let xlink = false;
|
|
1686
|
+
{
|
|
1687
|
+
if (ln !== (ln = ln.replace(/^xlink\:?/, ""))) {
|
|
1688
|
+
memberName = ln;
|
|
1689
|
+
xlink = true;
|
|
754
1690
|
}
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
elm.removeAttributeNS(XLINK_NS, memberName);
|
|
759
|
-
} else {
|
|
760
|
-
elm.removeAttribute(memberName);
|
|
761
|
-
}
|
|
762
|
-
}
|
|
763
|
-
} else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex) {
|
|
764
|
-
newValue = newValue === true ? "" : newValue;
|
|
1691
|
+
}
|
|
1692
|
+
if (newValue == null || newValue === false) {
|
|
1693
|
+
if (newValue !== false || elm.getAttribute(memberName) === "") {
|
|
765
1694
|
if (xlink) {
|
|
766
|
-
elm.
|
|
1695
|
+
elm.removeAttributeNS(XLINK_NS, memberName);
|
|
767
1696
|
} else {
|
|
768
|
-
elm.
|
|
1697
|
+
elm.removeAttribute(memberName);
|
|
769
1698
|
}
|
|
770
1699
|
}
|
|
1700
|
+
} else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex && elm.nodeType === 1 /* ElementNode */) {
|
|
1701
|
+
newValue = newValue === true ? "" : newValue;
|
|
1702
|
+
if (xlink) {
|
|
1703
|
+
elm.setAttributeNS(XLINK_NS, memberName, newValue);
|
|
1704
|
+
} else {
|
|
1705
|
+
elm.setAttribute(memberName, newValue);
|
|
1706
|
+
}
|
|
771
1707
|
}
|
|
772
1708
|
}
|
|
773
1709
|
};
|
|
774
1710
|
var parseClassListRegex = /\s/;
|
|
775
|
-
var parseClassList = (value) =>
|
|
1711
|
+
var parseClassList = (value) => {
|
|
1712
|
+
if (typeof value === "object" && value && "baseVal" in value) {
|
|
1713
|
+
value = value.baseVal;
|
|
1714
|
+
}
|
|
1715
|
+
if (!value || typeof value !== "string") {
|
|
1716
|
+
return [];
|
|
1717
|
+
}
|
|
1718
|
+
return value.split(parseClassListRegex);
|
|
1719
|
+
};
|
|
776
1720
|
var CAPTURE_EVENT_SUFFIX = "Capture";
|
|
777
1721
|
var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
|
|
778
1722
|
|
|
779
1723
|
// src/runtime/vdom/update-element.ts
|
|
780
|
-
var updateElement = (oldVnode, newVnode, isSvgMode2) => {
|
|
1724
|
+
var updateElement = (oldVnode, newVnode, isSvgMode2, isInitialRender) => {
|
|
781
1725
|
const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
|
|
782
|
-
const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ ||
|
|
783
|
-
const newVnodeAttrs = newVnode.$attrs$ ||
|
|
1726
|
+
const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || {};
|
|
1727
|
+
const newVnodeAttrs = newVnode.$attrs$ || {};
|
|
784
1728
|
{
|
|
785
1729
|
for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
|
|
786
1730
|
if (!(memberName in newVnodeAttrs)) {
|
|
787
|
-
setAccessor(
|
|
1731
|
+
setAccessor(
|
|
1732
|
+
elm,
|
|
1733
|
+
memberName,
|
|
1734
|
+
oldVnodeAttrs[memberName],
|
|
1735
|
+
void 0,
|
|
1736
|
+
isSvgMode2,
|
|
1737
|
+
newVnode.$flags$,
|
|
1738
|
+
isInitialRender
|
|
1739
|
+
);
|
|
788
1740
|
}
|
|
789
1741
|
}
|
|
790
1742
|
}
|
|
791
1743
|
for (const memberName of sortedAttrNames(Object.keys(newVnodeAttrs))) {
|
|
792
|
-
setAccessor(
|
|
1744
|
+
setAccessor(
|
|
1745
|
+
elm,
|
|
1746
|
+
memberName,
|
|
1747
|
+
oldVnodeAttrs[memberName],
|
|
1748
|
+
newVnodeAttrs[memberName],
|
|
1749
|
+
isSvgMode2,
|
|
1750
|
+
newVnode.$flags$,
|
|
1751
|
+
isInitialRender
|
|
1752
|
+
);
|
|
793
1753
|
}
|
|
794
1754
|
};
|
|
795
1755
|
function sortedAttrNames(attrNames) {
|
|
@@ -810,7 +1770,7 @@ var useNativeShadowDom = false;
|
|
|
810
1770
|
var checkSlotFallbackVisibility = false;
|
|
811
1771
|
var checkSlotRelocate = false;
|
|
812
1772
|
var isSvgMode = false;
|
|
813
|
-
var createElm = (oldParentVNode, newParentVNode, childIndex
|
|
1773
|
+
var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
814
1774
|
var _a;
|
|
815
1775
|
const newVNode2 = newParentVNode.$children$[childIndex];
|
|
816
1776
|
let i2 = 0;
|
|
@@ -820,9 +1780,6 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
820
1780
|
if (!useNativeShadowDom) {
|
|
821
1781
|
checkSlotRelocate = true;
|
|
822
1782
|
if (newVNode2.$tag$ === "slot") {
|
|
823
|
-
if (scopeId) {
|
|
824
|
-
parentElm.classList.add(scopeId + "-s");
|
|
825
|
-
}
|
|
826
1783
|
newVNode2.$flags$ |= newVNode2.$children$ ? (
|
|
827
1784
|
// slot element has fallback content
|
|
828
1785
|
// still create an element that "mocks" the slot element
|
|
@@ -836,14 +1793,22 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
836
1793
|
}
|
|
837
1794
|
}
|
|
838
1795
|
if (newVNode2.$text$ !== null) {
|
|
839
|
-
elm = newVNode2.$elm$ =
|
|
1796
|
+
elm = newVNode2.$elm$ = win.document.createTextNode(newVNode2.$text$);
|
|
840
1797
|
} else if (newVNode2.$flags$ & 1 /* isSlotReference */) {
|
|
841
|
-
elm = newVNode2.$elm$ =
|
|
1798
|
+
elm = newVNode2.$elm$ = win.document.createTextNode("");
|
|
1799
|
+
{
|
|
1800
|
+
updateElement(null, newVNode2, isSvgMode);
|
|
1801
|
+
}
|
|
842
1802
|
} else {
|
|
843
1803
|
if (!isSvgMode) {
|
|
844
1804
|
isSvgMode = newVNode2.$tag$ === "svg";
|
|
845
1805
|
}
|
|
846
|
-
|
|
1806
|
+
if (!win.document) {
|
|
1807
|
+
throw new Error(
|
|
1808
|
+
"You are trying to render a Stencil component in an environment that doesn't support the DOM. Make sure to populate the [`window`](https://developer.mozilla.org/en-US/docs/Web/API/Window/window) object before rendering a component."
|
|
1809
|
+
);
|
|
1810
|
+
}
|
|
1811
|
+
elm = newVNode2.$elm$ = win.document.createElementNS(
|
|
847
1812
|
isSvgMode ? SVG_NS : HTML_NS,
|
|
848
1813
|
!useNativeShadowDom && BUILD.slotRelocation && newVNode2.$flags$ & 2 /* isSlotFallback */ ? "slot-fb" : newVNode2.$tag$
|
|
849
1814
|
) ;
|
|
@@ -853,17 +1818,12 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
853
1818
|
{
|
|
854
1819
|
updateElement(null, newVNode2, isSvgMode);
|
|
855
1820
|
}
|
|
856
|
-
|
|
857
|
-
const isElementWithinShadowRoot = !rootNode.querySelector("body");
|
|
858
|
-
if (!isElementWithinShadowRoot && BUILD.scoped && isDef(scopeId) && elm["s-si"] !== scopeId) {
|
|
1821
|
+
if (isDef(scopeId) && elm["s-si"] !== scopeId) {
|
|
859
1822
|
elm.classList.add(elm["s-si"] = scopeId);
|
|
860
1823
|
}
|
|
861
|
-
{
|
|
862
|
-
updateElementScopeIds(elm, parentElm);
|
|
863
|
-
}
|
|
864
1824
|
if (newVNode2.$children$) {
|
|
865
1825
|
for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
|
|
866
|
-
childNode = createElm(oldParentVNode, newVNode2, i2
|
|
1826
|
+
childNode = createElm(oldParentVNode, newVNode2, i2);
|
|
867
1827
|
if (childNode) {
|
|
868
1828
|
elm.appendChild(childNode);
|
|
869
1829
|
}
|
|
@@ -884,12 +1844,16 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
884
1844
|
elm["s-cr"] = contentRef;
|
|
885
1845
|
elm["s-sn"] = newVNode2.$name$ || "";
|
|
886
1846
|
elm["s-rf"] = (_a = newVNode2.$attrs$) == null ? void 0 : _a.ref;
|
|
1847
|
+
patchSlotNode(elm);
|
|
887
1848
|
oldVNode = oldParentVNode && oldParentVNode.$children$ && oldParentVNode.$children$[childIndex];
|
|
888
1849
|
if (oldVNode && oldVNode.$tag$ === newVNode2.$tag$ && oldParentVNode.$elm$) {
|
|
889
1850
|
{
|
|
890
1851
|
relocateToHostRoot(oldParentVNode.$elm$);
|
|
891
1852
|
}
|
|
892
1853
|
}
|
|
1854
|
+
{
|
|
1855
|
+
addRemoveSlotScopedClass(contentRef, elm, newParentVNode.$elm$, oldParentVNode == null ? void 0 : oldParentVNode.$elm$);
|
|
1856
|
+
}
|
|
893
1857
|
}
|
|
894
1858
|
}
|
|
895
1859
|
return elm;
|
|
@@ -898,8 +1862,12 @@ var relocateToHostRoot = (parentElm) => {
|
|
|
898
1862
|
plt.$flags$ |= 1 /* isTmpDisconnected */;
|
|
899
1863
|
const host = parentElm.closest(hostTagName.toLowerCase());
|
|
900
1864
|
if (host != null) {
|
|
901
|
-
const contentRefNode = Array.from(host.childNodes).find(
|
|
902
|
-
|
|
1865
|
+
const contentRefNode = Array.from(host.__childNodes || host.childNodes).find(
|
|
1866
|
+
(ref) => ref["s-cr"]
|
|
1867
|
+
);
|
|
1868
|
+
const childNodeArray = Array.from(
|
|
1869
|
+
parentElm.__childNodes || parentElm.childNodes
|
|
1870
|
+
);
|
|
903
1871
|
for (const childNode of contentRefNode ? childNodeArray.reverse() : childNodeArray) {
|
|
904
1872
|
if (childNode["s-sh"] != null) {
|
|
905
1873
|
insertBefore(host, childNode, contentRefNode != null ? contentRefNode : null);
|
|
@@ -908,11 +1876,11 @@ var relocateToHostRoot = (parentElm) => {
|
|
|
908
1876
|
}
|
|
909
1877
|
}
|
|
910
1878
|
}
|
|
911
|
-
plt.$flags$ &=
|
|
1879
|
+
plt.$flags$ &= -2 /* isTmpDisconnected */;
|
|
912
1880
|
};
|
|
913
1881
|
var putBackInOriginalLocation = (parentElm, recursive) => {
|
|
914
1882
|
plt.$flags$ |= 1 /* isTmpDisconnected */;
|
|
915
|
-
const oldSlotChildNodes = Array.from(parentElm.childNodes);
|
|
1883
|
+
const oldSlotChildNodes = Array.from(parentElm.__childNodes || parentElm.childNodes);
|
|
916
1884
|
if (parentElm["s-sr"] && BUILD.experimentalSlotFixes) {
|
|
917
1885
|
let node = parentElm;
|
|
918
1886
|
while (node = node.nextSibling) {
|
|
@@ -924,7 +1892,7 @@ var putBackInOriginalLocation = (parentElm, recursive) => {
|
|
|
924
1892
|
for (let i2 = oldSlotChildNodes.length - 1; i2 >= 0; i2--) {
|
|
925
1893
|
const childNode = oldSlotChildNodes[i2];
|
|
926
1894
|
if (childNode["s-hn"] !== hostTagName && childNode["s-ol"]) {
|
|
927
|
-
insertBefore(
|
|
1895
|
+
insertBefore(referenceNode(childNode).parentNode, childNode, referenceNode(childNode));
|
|
928
1896
|
childNode["s-ol"].remove();
|
|
929
1897
|
childNode["s-ol"] = void 0;
|
|
930
1898
|
childNode["s-sh"] = void 0;
|
|
@@ -934,7 +1902,7 @@ var putBackInOriginalLocation = (parentElm, recursive) => {
|
|
|
934
1902
|
putBackInOriginalLocation(childNode, recursive);
|
|
935
1903
|
}
|
|
936
1904
|
}
|
|
937
|
-
plt.$flags$ &=
|
|
1905
|
+
plt.$flags$ &= -2 /* isTmpDisconnected */;
|
|
938
1906
|
};
|
|
939
1907
|
var addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
|
|
940
1908
|
let containerElm = parentElm["s-cr"] && parentElm["s-cr"].parentNode || parentElm;
|
|
@@ -944,7 +1912,7 @@ var addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
|
|
|
944
1912
|
}
|
|
945
1913
|
for (; startIdx <= endIdx; ++startIdx) {
|
|
946
1914
|
if (vnodes[startIdx]) {
|
|
947
|
-
childNode = createElm(null, parentVNode, startIdx
|
|
1915
|
+
childNode = createElm(null, parentVNode, startIdx);
|
|
948
1916
|
if (childNode) {
|
|
949
1917
|
vnodes[startIdx].$elm$ = childNode;
|
|
950
1918
|
insertBefore(containerElm, childNode, referenceNode(before) );
|
|
@@ -1031,7 +1999,7 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
|
|
|
1031
1999
|
if (idxInOld >= 0) {
|
|
1032
2000
|
elmToMove = oldCh[idxInOld];
|
|
1033
2001
|
if (elmToMove.$tag$ !== newStartVnode.$tag$) {
|
|
1034
|
-
node = createElm(oldCh && oldCh[newStartIdx], newVNode2, idxInOld
|
|
2002
|
+
node = createElm(oldCh && oldCh[newStartIdx], newVNode2, idxInOld);
|
|
1035
2003
|
} else {
|
|
1036
2004
|
patch(elmToMove, newStartVnode, isInitialRender);
|
|
1037
2005
|
oldCh[idxInOld] = void 0;
|
|
@@ -1039,12 +2007,16 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
|
|
|
1039
2007
|
}
|
|
1040
2008
|
newStartVnode = newCh[++newStartIdx];
|
|
1041
2009
|
} else {
|
|
1042
|
-
node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx
|
|
2010
|
+
node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx);
|
|
1043
2011
|
newStartVnode = newCh[++newStartIdx];
|
|
1044
2012
|
}
|
|
1045
2013
|
if (node) {
|
|
1046
2014
|
{
|
|
1047
|
-
insertBefore(
|
|
2015
|
+
insertBefore(
|
|
2016
|
+
referenceNode(oldStartVnode.$elm$).parentNode,
|
|
2017
|
+
node,
|
|
2018
|
+
referenceNode(oldStartVnode.$elm$)
|
|
2019
|
+
);
|
|
1048
2020
|
}
|
|
1049
2021
|
}
|
|
1050
2022
|
}
|
|
@@ -1065,28 +2037,19 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
|
|
|
1065
2037
|
var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
|
|
1066
2038
|
if (leftVNode.$tag$ === rightVNode.$tag$) {
|
|
1067
2039
|
if (leftVNode.$tag$ === "slot") {
|
|
1068
|
-
if (
|
|
1069
|
-
// The component gets hydrated and no VDOM has been initialized.
|
|
1070
|
-
// Here the comparison can't happen as $name$ property is not set for `leftNode`.
|
|
1071
|
-
"$nodeId$" in leftVNode && isInitialRender && // `leftNode` is not from type HTMLComment which would cause many
|
|
1072
|
-
// hydration comments to be removed
|
|
1073
|
-
leftVNode.$elm$.nodeType !== 8
|
|
1074
|
-
) {
|
|
1075
|
-
return false;
|
|
1076
|
-
}
|
|
1077
2040
|
return leftVNode.$name$ === rightVNode.$name$;
|
|
1078
2041
|
}
|
|
1079
2042
|
if (!isInitialRender) {
|
|
1080
2043
|
return leftVNode.$key$ === rightVNode.$key$;
|
|
1081
2044
|
}
|
|
2045
|
+
if (isInitialRender && !leftVNode.$key$ && rightVNode.$key$) {
|
|
2046
|
+
leftVNode.$key$ = rightVNode.$key$;
|
|
2047
|
+
}
|
|
1082
2048
|
return true;
|
|
1083
2049
|
}
|
|
1084
2050
|
return false;
|
|
1085
2051
|
};
|
|
1086
|
-
var referenceNode = (node) =>
|
|
1087
|
-
return node && node["s-ol"] || node;
|
|
1088
|
-
};
|
|
1089
|
-
var parentReferenceNode = (node) => (node["s-ol"] ? node["s-ol"] : node).parentNode;
|
|
2052
|
+
var referenceNode = (node) => node && node["s-ol"] || node;
|
|
1090
2053
|
var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
1091
2054
|
const elm = newVNode2.$elm$ = oldVNode.$elm$;
|
|
1092
2055
|
const oldChildren = oldVNode.$children$;
|
|
@@ -1104,9 +2067,8 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
|
1104
2067
|
newVNode2.$elm$["s-sn"] = newVNode2.$name$ || "";
|
|
1105
2068
|
relocateToHostRoot(newVNode2.$elm$.parentElement);
|
|
1106
2069
|
}
|
|
1107
|
-
} else {
|
|
1108
|
-
updateElement(oldVNode, newVNode2, isSvgMode);
|
|
1109
2070
|
}
|
|
2071
|
+
updateElement(oldVNode, newVNode2, isSvgMode, isInitialRender);
|
|
1110
2072
|
}
|
|
1111
2073
|
if (oldChildren !== null && newChildren !== null) {
|
|
1112
2074
|
updateChildren(elm, oldChildren, newVNode2, newChildren, isInitialRender);
|
|
@@ -1125,36 +2087,9 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
|
1125
2087
|
isSvgMode = false;
|
|
1126
2088
|
}
|
|
1127
2089
|
} else if ((defaultHolder = elm["s-cr"])) {
|
|
1128
|
-
defaultHolder.parentNode.textContent = text;
|
|
1129
|
-
} else if (oldVNode.$text$ !== text) {
|
|
1130
|
-
elm.data = text;
|
|
1131
|
-
}
|
|
1132
|
-
};
|
|
1133
|
-
var updateFallbackSlotVisibility = (elm) => {
|
|
1134
|
-
const childNodes = elm.childNodes;
|
|
1135
|
-
for (const childNode of childNodes) {
|
|
1136
|
-
if (childNode.nodeType === 1 /* ElementNode */) {
|
|
1137
|
-
if (childNode["s-sr"]) {
|
|
1138
|
-
const slotName = childNode["s-sn"];
|
|
1139
|
-
childNode.hidden = false;
|
|
1140
|
-
for (const siblingNode of childNodes) {
|
|
1141
|
-
if (siblingNode !== childNode) {
|
|
1142
|
-
if (siblingNode["s-hn"] !== childNode["s-hn"] || slotName !== "") {
|
|
1143
|
-
if (siblingNode.nodeType === 1 /* ElementNode */ && (slotName === siblingNode.getAttribute("slot") || slotName === siblingNode["s-sn"]) || siblingNode.nodeType === 3 /* TextNode */ && slotName === siblingNode["s-sn"]) {
|
|
1144
|
-
childNode.hidden = true;
|
|
1145
|
-
break;
|
|
1146
|
-
}
|
|
1147
|
-
} else {
|
|
1148
|
-
if (siblingNode.nodeType === 1 /* ElementNode */ || siblingNode.nodeType === 3 /* TextNode */ && siblingNode.textContent.trim() !== "") {
|
|
1149
|
-
childNode.hidden = true;
|
|
1150
|
-
break;
|
|
1151
|
-
}
|
|
1152
|
-
}
|
|
1153
|
-
}
|
|
1154
|
-
}
|
|
1155
|
-
}
|
|
1156
|
-
updateFallbackSlotVisibility(childNode);
|
|
1157
|
-
}
|
|
2090
|
+
defaultHolder.parentNode.textContent = text;
|
|
2091
|
+
} else if (oldVNode.$text$ !== text) {
|
|
2092
|
+
elm.data = text;
|
|
1158
2093
|
}
|
|
1159
2094
|
};
|
|
1160
2095
|
var relocateNodes = [];
|
|
@@ -1162,9 +2097,10 @@ var markSlotContentForRelocation = (elm) => {
|
|
|
1162
2097
|
let node;
|
|
1163
2098
|
let hostContentNodes;
|
|
1164
2099
|
let j;
|
|
1165
|
-
|
|
2100
|
+
const children = elm.__childNodes || elm.childNodes;
|
|
2101
|
+
for (const childNode of children) {
|
|
1166
2102
|
if (childNode["s-sr"] && (node = childNode["s-cr"]) && node.parentNode) {
|
|
1167
|
-
hostContentNodes = node.parentNode.childNodes;
|
|
2103
|
+
hostContentNodes = node.parentNode.__childNodes || node.parentNode.childNodes;
|
|
1168
2104
|
const slotName = childNode["s-sn"];
|
|
1169
2105
|
for (j = hostContentNodes.length - 1; j >= 0; j--) {
|
|
1170
2106
|
node = hostContentNodes[j];
|
|
@@ -1206,21 +2142,6 @@ var markSlotContentForRelocation = (elm) => {
|
|
|
1206
2142
|
}
|
|
1207
2143
|
}
|
|
1208
2144
|
};
|
|
1209
|
-
var isNodeLocatedInSlot = (nodeToRelocate, slotName) => {
|
|
1210
|
-
if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
|
1211
|
-
if (nodeToRelocate.getAttribute("slot") === null && slotName === "") {
|
|
1212
|
-
return true;
|
|
1213
|
-
}
|
|
1214
|
-
if (nodeToRelocate.getAttribute("slot") === slotName) {
|
|
1215
|
-
return true;
|
|
1216
|
-
}
|
|
1217
|
-
return false;
|
|
1218
|
-
}
|
|
1219
|
-
if (nodeToRelocate["s-sn"] === slotName) {
|
|
1220
|
-
return true;
|
|
1221
|
-
}
|
|
1222
|
-
return slotName === "";
|
|
1223
|
-
};
|
|
1224
2145
|
var nullifyVNodeRefs = (vNode) => {
|
|
1225
2146
|
{
|
|
1226
2147
|
vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
|
|
@@ -1228,44 +2149,51 @@ var nullifyVNodeRefs = (vNode) => {
|
|
|
1228
2149
|
}
|
|
1229
2150
|
};
|
|
1230
2151
|
var insertBefore = (parent, newNode, reference) => {
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
}
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
);
|
|
2152
|
+
if (typeof newNode["s-sn"] === "string" && !!newNode["s-sr"] && !!newNode["s-cr"]) {
|
|
2153
|
+
addRemoveSlotScopedClass(newNode["s-cr"], newNode, parent, newNode.parentElement);
|
|
2154
|
+
} else if (typeof newNode["s-sn"] === "string") {
|
|
2155
|
+
if (parent.getRootNode().nodeType !== 11 /* DOCUMENT_FRAGMENT_NODE */) {
|
|
2156
|
+
patchParentNode(newNode);
|
|
2157
|
+
}
|
|
2158
|
+
parent.insertBefore(newNode, reference);
|
|
2159
|
+
const { slotNode } = findSlotFromSlottedNode(newNode);
|
|
2160
|
+
if (slotNode) dispatchSlotChangeEvent(slotNode);
|
|
2161
|
+
return newNode;
|
|
2162
|
+
}
|
|
2163
|
+
if (parent.__insertBefore) {
|
|
2164
|
+
return parent.__insertBefore(newNode, reference);
|
|
2165
|
+
} else {
|
|
2166
|
+
return parent == null ? void 0 : parent.insertBefore(newNode, reference);
|
|
1246
2167
|
}
|
|
1247
|
-
return scopeIds;
|
|
1248
2168
|
};
|
|
1249
|
-
|
|
1250
|
-
var _a;
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
2169
|
+
function addRemoveSlotScopedClass(reference, slotNode, newParent, oldParent) {
|
|
2170
|
+
var _a, _b;
|
|
2171
|
+
let scopeId2;
|
|
2172
|
+
if (reference && typeof slotNode["s-sn"] === "string" && !!slotNode["s-sr"] && reference.parentNode && reference.parentNode["s-sc"] && (scopeId2 = slotNode["s-si"] || reference.parentNode["s-sc"])) {
|
|
2173
|
+
const scopeName = slotNode["s-sn"];
|
|
2174
|
+
const hostName = slotNode["s-hn"];
|
|
2175
|
+
(_a = newParent.classList) == null ? void 0 : _a.add(scopeId2 + "-s");
|
|
2176
|
+
if (oldParent && ((_b = oldParent.classList) == null ? void 0 : _b.contains(scopeId2 + "-s"))) {
|
|
2177
|
+
let child = (oldParent.__childNodes || oldParent.childNodes)[0];
|
|
2178
|
+
let found = false;
|
|
2179
|
+
while (child) {
|
|
2180
|
+
if (child["s-sn"] !== scopeName && child["s-hn"] === hostName && !!child["s-sr"]) {
|
|
2181
|
+
found = true;
|
|
2182
|
+
break;
|
|
1258
2183
|
}
|
|
2184
|
+
child = child.nextSibling;
|
|
1259
2185
|
}
|
|
2186
|
+
if (!found) oldParent.classList.remove(scopeId2 + "-s");
|
|
1260
2187
|
}
|
|
1261
2188
|
}
|
|
1262
|
-
}
|
|
2189
|
+
}
|
|
1263
2190
|
var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
1264
2191
|
var _a, _b, _c, _d, _e;
|
|
1265
2192
|
const hostElm = hostRef.$hostElement$;
|
|
1266
2193
|
const cmpMeta = hostRef.$cmpMeta$;
|
|
1267
2194
|
const oldVNode = hostRef.$vnode$ || newVNode(null, null);
|
|
1268
|
-
const
|
|
2195
|
+
const isHostElement = isHost(renderFnResults);
|
|
2196
|
+
const rootVnode = isHostElement ? renderFnResults : h(null, null, renderFnResults);
|
|
1269
2197
|
hostTagName = hostElm.tagName;
|
|
1270
2198
|
if (cmpMeta.$attrsToReflect$) {
|
|
1271
2199
|
rootVnode.$attrs$ = rootVnode.$attrs$ || {};
|
|
@@ -1287,7 +2215,7 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
1287
2215
|
{
|
|
1288
2216
|
scopeId = hostElm["s-sc"];
|
|
1289
2217
|
}
|
|
1290
|
-
useNativeShadowDom = (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */)
|
|
2218
|
+
useNativeShadowDom = !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) && !(cmpMeta.$flags$ & 128 /* shadowNeedsScopedCss */);
|
|
1291
2219
|
{
|
|
1292
2220
|
contentRef = hostElm["s-cr"];
|
|
1293
2221
|
checkSlotFallbackVisibility = false;
|
|
@@ -1299,8 +2227,8 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
1299
2227
|
markSlotContentForRelocation(rootVnode.$elm$);
|
|
1300
2228
|
for (const relocateData of relocateNodes) {
|
|
1301
2229
|
const nodeToRelocate = relocateData.$nodeToRelocate$;
|
|
1302
|
-
if (!nodeToRelocate["s-ol"]) {
|
|
1303
|
-
const orgLocationNode =
|
|
2230
|
+
if (!nodeToRelocate["s-ol"] && win.document) {
|
|
2231
|
+
const orgLocationNode = win.document.createTextNode("");
|
|
1304
2232
|
orgLocationNode["s-nr"] = nodeToRelocate;
|
|
1305
2233
|
insertBefore(nodeToRelocate.parentNode, nodeToRelocate["s-ol"] = orgLocationNode, nodeToRelocate);
|
|
1306
2234
|
}
|
|
@@ -1311,11 +2239,11 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
1311
2239
|
if (slotRefNode) {
|
|
1312
2240
|
const parentNodeRef = slotRefNode.parentNode;
|
|
1313
2241
|
let insertBeforeNode = slotRefNode.nextSibling;
|
|
1314
|
-
if (insertBeforeNode && insertBeforeNode.nodeType === 1 /* ElementNode */) {
|
|
2242
|
+
if ((insertBeforeNode && insertBeforeNode.nodeType === 1 /* ElementNode */)) {
|
|
1315
2243
|
let orgLocationNode = (_a = nodeToRelocate["s-ol"]) == null ? void 0 : _a.previousSibling;
|
|
1316
2244
|
while (orgLocationNode) {
|
|
1317
2245
|
let refNode = (_b = orgLocationNode["s-nr"]) != null ? _b : null;
|
|
1318
|
-
if (refNode && refNode["s-sn"] === nodeToRelocate["s-sn"] && parentNodeRef === refNode.parentNode) {
|
|
2246
|
+
if (refNode && refNode["s-sn"] === nodeToRelocate["s-sn"] && parentNodeRef === (refNode.__parentNode || refNode.parentNode)) {
|
|
1319
2247
|
refNode = refNode.nextSibling;
|
|
1320
2248
|
while (refNode === nodeToRelocate || (refNode == null ? void 0 : refNode["s-sr"])) {
|
|
1321
2249
|
refNode = refNode == null ? void 0 : refNode.nextSibling;
|
|
@@ -1328,15 +2256,17 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
1328
2256
|
orgLocationNode = orgLocationNode.previousSibling;
|
|
1329
2257
|
}
|
|
1330
2258
|
}
|
|
1331
|
-
|
|
2259
|
+
const parent = nodeToRelocate.__parentNode || nodeToRelocate.parentNode;
|
|
2260
|
+
const nextSibling = nodeToRelocate.__nextSibling || nodeToRelocate.nextSibling;
|
|
2261
|
+
if (!insertBeforeNode && parentNodeRef !== parent || nextSibling !== insertBeforeNode) {
|
|
1332
2262
|
if (nodeToRelocate !== insertBeforeNode) {
|
|
1333
2263
|
insertBefore(parentNodeRef, nodeToRelocate, insertBeforeNode);
|
|
1334
|
-
if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
|
2264
|
+
if (nodeToRelocate.nodeType === 1 /* ElementNode */ && nodeToRelocate.tagName !== "SLOT-FB") {
|
|
1335
2265
|
nodeToRelocate.hidden = (_c = nodeToRelocate["s-ih"]) != null ? _c : false;
|
|
1336
2266
|
}
|
|
1337
2267
|
}
|
|
1338
2268
|
}
|
|
1339
|
-
nodeToRelocate && typeof slotRefNode["s-rf"] === "function" && slotRefNode["s-rf"](
|
|
2269
|
+
nodeToRelocate && typeof slotRefNode["s-rf"] === "function" && slotRefNode["s-rf"](slotRefNode);
|
|
1340
2270
|
} else {
|
|
1341
2271
|
if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
|
1342
2272
|
if (isInitialLoad) {
|
|
@@ -1350,11 +2280,12 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
1350
2280
|
if (checkSlotFallbackVisibility) {
|
|
1351
2281
|
updateFallbackSlotVisibility(rootVnode.$elm$);
|
|
1352
2282
|
}
|
|
1353
|
-
plt.$flags$ &=
|
|
2283
|
+
plt.$flags$ &= -2 /* isTmpDisconnected */;
|
|
1354
2284
|
relocateNodes.length = 0;
|
|
1355
2285
|
}
|
|
1356
2286
|
if (cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
|
|
1357
|
-
|
|
2287
|
+
const children = rootVnode.$elm$.__childNodes || rootVnode.$elm$.childNodes;
|
|
2288
|
+
for (const childNode of children) {
|
|
1358
2289
|
if (childNode["s-hn"] !== hostTagName && !childNode["s-sh"]) {
|
|
1359
2290
|
if (isInitialLoad && childNode["s-ih"] == null) {
|
|
1360
2291
|
childNode["s-ih"] = (_e = childNode.hidden) != null ? _e : false;
|
|
@@ -1369,7 +2300,14 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
1369
2300
|
// src/runtime/update-component.ts
|
|
1370
2301
|
var attachToAncestor = (hostRef, ancestorComponent) => {
|
|
1371
2302
|
if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent["s-p"]) {
|
|
1372
|
-
ancestorComponent["s-p"].push(
|
|
2303
|
+
const index = ancestorComponent["s-p"].push(
|
|
2304
|
+
new Promise(
|
|
2305
|
+
(r) => hostRef.$onRenderResolve$ = () => {
|
|
2306
|
+
ancestorComponent["s-p"].splice(index - 1, 1);
|
|
2307
|
+
r();
|
|
2308
|
+
}
|
|
2309
|
+
)
|
|
2310
|
+
);
|
|
1373
2311
|
}
|
|
1374
2312
|
};
|
|
1375
2313
|
var scheduleUpdate = (hostRef, isInitialLoad) => {
|
|
@@ -1398,17 +2336,15 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
|
|
|
1398
2336
|
{
|
|
1399
2337
|
hostRef.$flags$ |= 256 /* isListenReady */;
|
|
1400
2338
|
if (hostRef.$queuedListeners$) {
|
|
1401
|
-
hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event));
|
|
2339
|
+
hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event, elm));
|
|
1402
2340
|
hostRef.$queuedListeners$ = void 0;
|
|
1403
2341
|
}
|
|
1404
2342
|
}
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
}
|
|
1409
|
-
{
|
|
1410
|
-
maybePromise = enqueue(maybePromise, () => safeCall(instance, "componentWillRender"));
|
|
2343
|
+
maybePromise = safeCall(instance, "componentWillLoad", void 0, elm);
|
|
2344
|
+
} else {
|
|
2345
|
+
maybePromise = safeCall(instance, "componentWillUpdate", void 0, elm);
|
|
1411
2346
|
}
|
|
2347
|
+
maybePromise = enqueue(maybePromise, () => safeCall(instance, "componentWillRender", void 0, elm));
|
|
1412
2348
|
endSchedule();
|
|
1413
2349
|
return enqueue(maybePromise, () => updateComponent(hostRef, instance, isInitialLoad));
|
|
1414
2350
|
};
|
|
@@ -1451,7 +2387,7 @@ var callRender = (hostRef, instance, elm, isInitialLoad) => {
|
|
|
1451
2387
|
try {
|
|
1452
2388
|
instance = instance.render && instance.render();
|
|
1453
2389
|
{
|
|
1454
|
-
hostRef.$flags$ &=
|
|
2390
|
+
hostRef.$flags$ &= -17 /* isQueuedForUpdate */;
|
|
1455
2391
|
}
|
|
1456
2392
|
{
|
|
1457
2393
|
hostRef.$flags$ |= 2 /* hasRendered */;
|
|
@@ -1474,17 +2410,13 @@ var postUpdateComponent = (hostRef) => {
|
|
|
1474
2410
|
const endPostUpdate = createTime("postUpdate", tagName);
|
|
1475
2411
|
const instance = hostRef.$lazyInstance$ ;
|
|
1476
2412
|
const ancestorComponent = hostRef.$ancestorComponent$;
|
|
1477
|
-
|
|
1478
|
-
safeCall(instance, "componentDidRender");
|
|
1479
|
-
}
|
|
2413
|
+
safeCall(instance, "componentDidRender", void 0, elm);
|
|
1480
2414
|
if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
|
|
1481
2415
|
hostRef.$flags$ |= 64 /* hasLoadedComponent */;
|
|
1482
2416
|
{
|
|
1483
2417
|
addHydratedFlag(elm);
|
|
1484
2418
|
}
|
|
1485
|
-
|
|
1486
|
-
safeCall(instance, "componentDidLoad");
|
|
1487
|
-
}
|
|
2419
|
+
safeCall(instance, "componentDidLoad", void 0, elm);
|
|
1488
2420
|
endPostUpdate();
|
|
1489
2421
|
{
|
|
1490
2422
|
hostRef.$onReadyResolve$(elm);
|
|
@@ -1493,9 +2425,7 @@ var postUpdateComponent = (hostRef) => {
|
|
|
1493
2425
|
}
|
|
1494
2426
|
}
|
|
1495
2427
|
} else {
|
|
1496
|
-
|
|
1497
|
-
safeCall(instance, "componentDidUpdate");
|
|
1498
|
-
}
|
|
2428
|
+
safeCall(instance, "componentDidUpdate", void 0, elm);
|
|
1499
2429
|
endPostUpdate();
|
|
1500
2430
|
}
|
|
1501
2431
|
{
|
|
@@ -1509,7 +2439,7 @@ var postUpdateComponent = (hostRef) => {
|
|
|
1509
2439
|
if (hostRef.$flags$ & 512 /* needsRerender */) {
|
|
1510
2440
|
nextTick(() => scheduleUpdate(hostRef, false));
|
|
1511
2441
|
}
|
|
1512
|
-
hostRef.$flags$ &=
|
|
2442
|
+
hostRef.$flags$ &= -517;
|
|
1513
2443
|
}
|
|
1514
2444
|
};
|
|
1515
2445
|
var forceUpdate = (ref) => {
|
|
@@ -1523,17 +2453,14 @@ var forceUpdate = (ref) => {
|
|
|
1523
2453
|
}
|
|
1524
2454
|
};
|
|
1525
2455
|
var appDidLoad = (who) => {
|
|
1526
|
-
{
|
|
1527
|
-
addHydratedFlag(doc.documentElement);
|
|
1528
|
-
}
|
|
1529
2456
|
nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
|
|
1530
2457
|
};
|
|
1531
|
-
var safeCall = (instance, method, arg) => {
|
|
2458
|
+
var safeCall = (instance, method, arg, elm) => {
|
|
1532
2459
|
if (instance && instance[method]) {
|
|
1533
2460
|
try {
|
|
1534
2461
|
return instance[method](arg);
|
|
1535
2462
|
} catch (e) {
|
|
1536
|
-
consoleError(e);
|
|
2463
|
+
consoleError(e, elm);
|
|
1537
2464
|
}
|
|
1538
2465
|
}
|
|
1539
2466
|
return void 0;
|
|
@@ -1549,7 +2476,7 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
1549
2476
|
const hostRef = getHostRef(ref);
|
|
1550
2477
|
if (!hostRef) {
|
|
1551
2478
|
throw new Error(
|
|
1552
|
-
`Couldn't find host element for "${cmpMeta.$tagName$}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/
|
|
2479
|
+
`Couldn't find host element for "${cmpMeta.$tagName$}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/stenciljs/core/issues/5457).`
|
|
1553
2480
|
);
|
|
1554
2481
|
}
|
|
1555
2482
|
const elm = hostRef.$hostElement$ ;
|
|
@@ -1575,6 +2502,11 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
1575
2502
|
}
|
|
1576
2503
|
}
|
|
1577
2504
|
if ((flags & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
|
|
2505
|
+
if (instance.componentShouldUpdate) {
|
|
2506
|
+
if (instance.componentShouldUpdate(newVal, oldVal, propName) === false) {
|
|
2507
|
+
return;
|
|
2508
|
+
}
|
|
2509
|
+
}
|
|
1578
2510
|
scheduleUpdate(hostRef, false);
|
|
1579
2511
|
}
|
|
1580
2512
|
}
|
|
@@ -1592,15 +2524,68 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1592
2524
|
const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
|
|
1593
2525
|
members.map(([memberName, [memberFlags]]) => {
|
|
1594
2526
|
if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
|
|
2527
|
+
const { get: origGetter, set: origSetter } = Object.getOwnPropertyDescriptor(prototype, memberName) || {};
|
|
2528
|
+
if (origGetter) cmpMeta.$members$[memberName][0] |= 2048 /* Getter */;
|
|
2529
|
+
if (origSetter) cmpMeta.$members$[memberName][0] |= 4096 /* Setter */;
|
|
2530
|
+
if (flags & 1 /* isElementConstructor */ || !origGetter) {
|
|
2531
|
+
Object.defineProperty(prototype, memberName, {
|
|
2532
|
+
get() {
|
|
2533
|
+
{
|
|
2534
|
+
if ((cmpMeta.$members$[memberName][0] & 2048 /* Getter */) === 0) {
|
|
2535
|
+
return getValue(this, memberName);
|
|
2536
|
+
}
|
|
2537
|
+
const ref = getHostRef(this);
|
|
2538
|
+
const instance = ref ? ref.$lazyInstance$ : prototype;
|
|
2539
|
+
if (!instance) return;
|
|
2540
|
+
return instance[memberName];
|
|
2541
|
+
}
|
|
2542
|
+
},
|
|
2543
|
+
configurable: true,
|
|
2544
|
+
enumerable: true
|
|
2545
|
+
});
|
|
2546
|
+
}
|
|
1595
2547
|
Object.defineProperty(prototype, memberName, {
|
|
1596
|
-
get() {
|
|
1597
|
-
return getValue(this, memberName);
|
|
1598
|
-
},
|
|
1599
2548
|
set(newValue) {
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
2549
|
+
const ref = getHostRef(this);
|
|
2550
|
+
if (origSetter) {
|
|
2551
|
+
const currentValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
|
|
2552
|
+
if (typeof currentValue === "undefined" && ref.$instanceValues$.get(memberName)) {
|
|
2553
|
+
newValue = ref.$instanceValues$.get(memberName);
|
|
2554
|
+
} else if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
2555
|
+
ref.$instanceValues$.set(memberName, currentValue);
|
|
2556
|
+
}
|
|
2557
|
+
origSetter.apply(this, [parsePropertyValue(newValue, memberFlags)]);
|
|
2558
|
+
newValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
|
|
2559
|
+
setValue(this, memberName, newValue, cmpMeta);
|
|
2560
|
+
return;
|
|
2561
|
+
}
|
|
2562
|
+
{
|
|
2563
|
+
if ((flags & 1 /* isElementConstructor */) === 0 || (cmpMeta.$members$[memberName][0] & 4096 /* Setter */) === 0) {
|
|
2564
|
+
setValue(this, memberName, newValue, cmpMeta);
|
|
2565
|
+
if (flags & 1 /* isElementConstructor */ && !ref.$lazyInstance$) {
|
|
2566
|
+
ref.$onReadyPromise$.then(() => {
|
|
2567
|
+
if (cmpMeta.$members$[memberName][0] & 4096 /* Setter */ && ref.$lazyInstance$[memberName] !== ref.$instanceValues$.get(memberName)) {
|
|
2568
|
+
ref.$lazyInstance$[memberName] = newValue;
|
|
2569
|
+
}
|
|
2570
|
+
});
|
|
2571
|
+
}
|
|
2572
|
+
return;
|
|
2573
|
+
}
|
|
2574
|
+
const setterSetVal = () => {
|
|
2575
|
+
const currentValue = ref.$lazyInstance$[memberName];
|
|
2576
|
+
if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
2577
|
+
ref.$instanceValues$.set(memberName, currentValue);
|
|
2578
|
+
}
|
|
2579
|
+
ref.$lazyInstance$[memberName] = parsePropertyValue(newValue, memberFlags);
|
|
2580
|
+
setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
|
|
2581
|
+
};
|
|
2582
|
+
if (ref.$lazyInstance$) {
|
|
2583
|
+
setterSetVal();
|
|
2584
|
+
} else {
|
|
2585
|
+
ref.$onReadyPromise$.then(() => setterSetVal());
|
|
2586
|
+
}
|
|
2587
|
+
}
|
|
2588
|
+
}
|
|
1604
2589
|
});
|
|
1605
2590
|
} else if (flags & 1 /* isElementConstructor */ && memberFlags & 64 /* Method */) {
|
|
1606
2591
|
Object.defineProperty(prototype, memberName, {
|
|
@@ -1621,7 +2606,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1621
2606
|
plt.jmp(() => {
|
|
1622
2607
|
var _a2;
|
|
1623
2608
|
const propName = attrNameToPropName.get(attrName);
|
|
1624
|
-
if (this.hasOwnProperty(propName)) {
|
|
2609
|
+
if (this.hasOwnProperty(propName) && BUILD.lazyLoad) {
|
|
1625
2610
|
newValue = this[propName];
|
|
1626
2611
|
delete this[propName];
|
|
1627
2612
|
} else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && // cast type to number to avoid TS compiler issues
|
|
@@ -1641,7 +2626,11 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1641
2626
|
}
|
|
1642
2627
|
return;
|
|
1643
2628
|
}
|
|
1644
|
-
|
|
2629
|
+
const propDesc = Object.getOwnPropertyDescriptor(prototype, propName);
|
|
2630
|
+
newValue = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
|
|
2631
|
+
if (newValue !== this[propName] && (!propDesc.get || !!propDesc.set)) {
|
|
2632
|
+
this[propName] = newValue;
|
|
2633
|
+
}
|
|
1645
2634
|
});
|
|
1646
2635
|
};
|
|
1647
2636
|
Cstr.observedAttributes = Array.from(
|
|
@@ -1670,7 +2659,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1670
2659
|
hostRef.$flags$ |= 32 /* hasInitializedComponent */;
|
|
1671
2660
|
const bundleId = cmpMeta.$lazyBundleId$;
|
|
1672
2661
|
if (bundleId) {
|
|
1673
|
-
const CstrImport = loadModule(cmpMeta);
|
|
2662
|
+
const CstrImport = loadModule(cmpMeta, hostRef);
|
|
1674
2663
|
if (CstrImport && "then" in CstrImport) {
|
|
1675
2664
|
const endLoad = uniqueTime();
|
|
1676
2665
|
Cstr = await CstrImport;
|
|
@@ -1695,16 +2684,16 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1695
2684
|
try {
|
|
1696
2685
|
new Cstr(hostRef);
|
|
1697
2686
|
} catch (e) {
|
|
1698
|
-
consoleError(e);
|
|
2687
|
+
consoleError(e, elm);
|
|
1699
2688
|
}
|
|
1700
2689
|
{
|
|
1701
|
-
hostRef.$flags$ &=
|
|
2690
|
+
hostRef.$flags$ &= -9 /* isConstructingInstance */;
|
|
1702
2691
|
}
|
|
1703
2692
|
{
|
|
1704
2693
|
hostRef.$flags$ |= 128 /* isWatchReady */;
|
|
1705
2694
|
}
|
|
1706
2695
|
endNewInstance();
|
|
1707
|
-
fireConnectedCallback(hostRef.$lazyInstance
|
|
2696
|
+
fireConnectedCallback(hostRef.$lazyInstance$, elm);
|
|
1708
2697
|
} else {
|
|
1709
2698
|
Cstr = elm.constructor;
|
|
1710
2699
|
const cmpTag = elm.localName;
|
|
@@ -1736,9 +2725,9 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1736
2725
|
schedule();
|
|
1737
2726
|
}
|
|
1738
2727
|
};
|
|
1739
|
-
var fireConnectedCallback = (instance) => {
|
|
2728
|
+
var fireConnectedCallback = (instance, elm) => {
|
|
1740
2729
|
{
|
|
1741
|
-
safeCall(instance, "connectedCallback");
|
|
2730
|
+
safeCall(instance, "connectedCallback", void 0, elm);
|
|
1742
2731
|
}
|
|
1743
2732
|
};
|
|
1744
2733
|
|
|
@@ -1757,6 +2746,9 @@ var connectedCallback = (elm) => {
|
|
|
1757
2746
|
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
|
|
1758
2747
|
const scopeId2 = addStyle(elm.shadowRoot, cmpMeta, elm.getAttribute("s-mode")) ;
|
|
1759
2748
|
elm.classList.remove(scopeId2 + "-h", scopeId2 + "-s");
|
|
2749
|
+
} else if (cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
|
|
2750
|
+
const scopeId2 = getScopeId(cmpMeta, elm.getAttribute("s-mode") );
|
|
2751
|
+
elm["s-sc"] = scopeId2;
|
|
1760
2752
|
}
|
|
1761
2753
|
initializeClientHydrate(elm, cmpMeta.$tagName$, hostId, hostRef);
|
|
1762
2754
|
}
|
|
@@ -1791,24 +2783,27 @@ var connectedCallback = (elm) => {
|
|
|
1791
2783
|
} else {
|
|
1792
2784
|
addHostEventListeners(elm, hostRef, cmpMeta.$listeners$);
|
|
1793
2785
|
if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
|
|
1794
|
-
fireConnectedCallback(hostRef.$lazyInstance
|
|
2786
|
+
fireConnectedCallback(hostRef.$lazyInstance$, elm);
|
|
1795
2787
|
} else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
|
|
1796
|
-
hostRef.$onReadyPromise$.then(() => fireConnectedCallback(hostRef.$lazyInstance
|
|
2788
|
+
hostRef.$onReadyPromise$.then(() => fireConnectedCallback(hostRef.$lazyInstance$, elm));
|
|
1797
2789
|
}
|
|
1798
2790
|
}
|
|
1799
2791
|
endConnected();
|
|
1800
2792
|
}
|
|
1801
2793
|
};
|
|
1802
2794
|
var setContentReference = (elm) => {
|
|
1803
|
-
|
|
2795
|
+
if (!win.document) {
|
|
2796
|
+
return;
|
|
2797
|
+
}
|
|
2798
|
+
const contentRefElm = elm["s-cr"] = win.document.createComment(
|
|
1804
2799
|
""
|
|
1805
2800
|
);
|
|
1806
2801
|
contentRefElm["s-cn"] = true;
|
|
1807
2802
|
insertBefore(elm, contentRefElm, elm.firstChild);
|
|
1808
2803
|
};
|
|
1809
|
-
var disconnectInstance = (instance) => {
|
|
2804
|
+
var disconnectInstance = (instance, elm) => {
|
|
1810
2805
|
{
|
|
1811
|
-
safeCall(instance, "disconnectedCallback");
|
|
2806
|
+
safeCall(instance, "disconnectedCallback", void 0, elm || instance);
|
|
1812
2807
|
}
|
|
1813
2808
|
};
|
|
1814
2809
|
var disconnectedCallback = async (elm) => {
|
|
@@ -1821,312 +2816,44 @@ var disconnectedCallback = async (elm) => {
|
|
|
1821
2816
|
}
|
|
1822
2817
|
}
|
|
1823
2818
|
if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
|
|
1824
|
-
disconnectInstance(hostRef.$lazyInstance
|
|
2819
|
+
disconnectInstance(hostRef.$lazyInstance$, elm);
|
|
1825
2820
|
} else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
|
|
1826
|
-
hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance
|
|
1827
|
-
}
|
|
1828
|
-
}
|
|
1829
|
-
};
|
|
1830
|
-
var patchPseudoShadowDom = (hostElementPrototype, descriptorPrototype) => {
|
|
1831
|
-
patchCloneNode(hostElementPrototype);
|
|
1832
|
-
patchSlotAppendChild(hostElementPrototype);
|
|
1833
|
-
patchSlotAppend(hostElementPrototype);
|
|
1834
|
-
patchSlotPrepend(hostElementPrototype);
|
|
1835
|
-
patchSlotInsertAdjacentElement(hostElementPrototype);
|
|
1836
|
-
patchSlotInsertAdjacentHTML(hostElementPrototype);
|
|
1837
|
-
patchSlotInsertAdjacentText(hostElementPrototype);
|
|
1838
|
-
patchTextContent(hostElementPrototype);
|
|
1839
|
-
patchChildSlotNodes(hostElementPrototype, descriptorPrototype);
|
|
1840
|
-
patchSlotRemoveChild(hostElementPrototype);
|
|
1841
|
-
};
|
|
1842
|
-
var patchCloneNode = (HostElementPrototype) => {
|
|
1843
|
-
const orgCloneNode = HostElementPrototype.cloneNode;
|
|
1844
|
-
HostElementPrototype.cloneNode = function(deep) {
|
|
1845
|
-
const srcNode = this;
|
|
1846
|
-
const isShadowDom = srcNode.shadowRoot && supportsShadow ;
|
|
1847
|
-
const clonedNode = orgCloneNode.call(srcNode, isShadowDom ? deep : false);
|
|
1848
|
-
if (!isShadowDom && deep) {
|
|
1849
|
-
let i2 = 0;
|
|
1850
|
-
let slotted, nonStencilNode;
|
|
1851
|
-
const stencilPrivates = [
|
|
1852
|
-
"s-id",
|
|
1853
|
-
"s-cr",
|
|
1854
|
-
"s-lr",
|
|
1855
|
-
"s-rc",
|
|
1856
|
-
"s-sc",
|
|
1857
|
-
"s-p",
|
|
1858
|
-
"s-cn",
|
|
1859
|
-
"s-sr",
|
|
1860
|
-
"s-sn",
|
|
1861
|
-
"s-hn",
|
|
1862
|
-
"s-ol",
|
|
1863
|
-
"s-nr",
|
|
1864
|
-
"s-si",
|
|
1865
|
-
"s-rf",
|
|
1866
|
-
"s-scs"
|
|
1867
|
-
];
|
|
1868
|
-
for (; i2 < srcNode.childNodes.length; i2++) {
|
|
1869
|
-
slotted = srcNode.childNodes[i2]["s-nr"];
|
|
1870
|
-
nonStencilNode = stencilPrivates.every((privateField) => !srcNode.childNodes[i2][privateField]);
|
|
1871
|
-
if (slotted) {
|
|
1872
|
-
if (clonedNode.__appendChild) {
|
|
1873
|
-
clonedNode.__appendChild(slotted.cloneNode(true));
|
|
1874
|
-
} else {
|
|
1875
|
-
clonedNode.appendChild(slotted.cloneNode(true));
|
|
1876
|
-
}
|
|
1877
|
-
}
|
|
1878
|
-
if (nonStencilNode) {
|
|
1879
|
-
clonedNode.appendChild(srcNode.childNodes[i2].cloneNode(true));
|
|
1880
|
-
}
|
|
1881
|
-
}
|
|
1882
|
-
}
|
|
1883
|
-
return clonedNode;
|
|
1884
|
-
};
|
|
1885
|
-
};
|
|
1886
|
-
var patchSlotAppendChild = (HostElementPrototype) => {
|
|
1887
|
-
HostElementPrototype.__appendChild = HostElementPrototype.appendChild;
|
|
1888
|
-
HostElementPrototype.appendChild = function(newChild) {
|
|
1889
|
-
const slotName = newChild["s-sn"] = getSlotName(newChild);
|
|
1890
|
-
const slotNode = getHostSlotNode(this.childNodes, slotName, this.tagName);
|
|
1891
|
-
if (slotNode) {
|
|
1892
|
-
const slotChildNodes = getHostSlotChildNodes(slotNode, slotName);
|
|
1893
|
-
const appendAfter = slotChildNodes[slotChildNodes.length - 1];
|
|
1894
|
-
const insertedNode = insertBefore(appendAfter.parentNode, newChild, appendAfter.nextSibling);
|
|
1895
|
-
updateFallbackSlotVisibility(this);
|
|
1896
|
-
return insertedNode;
|
|
1897
|
-
}
|
|
1898
|
-
return this.__appendChild(newChild);
|
|
1899
|
-
};
|
|
1900
|
-
};
|
|
1901
|
-
var patchSlotRemoveChild = (ElementPrototype) => {
|
|
1902
|
-
ElementPrototype.__removeChild = ElementPrototype.removeChild;
|
|
1903
|
-
ElementPrototype.removeChild = function(toRemove) {
|
|
1904
|
-
if (toRemove && typeof toRemove["s-sn"] !== "undefined") {
|
|
1905
|
-
const slotNode = getHostSlotNode(this.childNodes, toRemove["s-sn"], this.tagName);
|
|
1906
|
-
if (slotNode) {
|
|
1907
|
-
const slotChildNodes = getHostSlotChildNodes(slotNode, toRemove["s-sn"]);
|
|
1908
|
-
const existingNode = slotChildNodes.find((n) => n === toRemove);
|
|
1909
|
-
if (existingNode) {
|
|
1910
|
-
existingNode.remove();
|
|
1911
|
-
updateFallbackSlotVisibility(this);
|
|
1912
|
-
return;
|
|
1913
|
-
}
|
|
1914
|
-
}
|
|
1915
|
-
}
|
|
1916
|
-
return this.__removeChild(toRemove);
|
|
1917
|
-
};
|
|
1918
|
-
};
|
|
1919
|
-
var patchSlotPrepend = (HostElementPrototype) => {
|
|
1920
|
-
const originalPrepend = HostElementPrototype.prepend;
|
|
1921
|
-
HostElementPrototype.prepend = function(...newChildren) {
|
|
1922
|
-
newChildren.forEach((newChild) => {
|
|
1923
|
-
if (typeof newChild === "string") {
|
|
1924
|
-
newChild = this.ownerDocument.createTextNode(newChild);
|
|
1925
|
-
}
|
|
1926
|
-
const slotName = newChild["s-sn"] = getSlotName(newChild);
|
|
1927
|
-
const slotNode = getHostSlotNode(this.childNodes, slotName, this.tagName);
|
|
1928
|
-
if (slotNode) {
|
|
1929
|
-
const slotPlaceholder = document.createTextNode("");
|
|
1930
|
-
slotPlaceholder["s-nr"] = newChild;
|
|
1931
|
-
slotNode["s-cr"].parentNode.__appendChild(slotPlaceholder);
|
|
1932
|
-
newChild["s-ol"] = slotPlaceholder;
|
|
1933
|
-
const slotChildNodes = getHostSlotChildNodes(slotNode, slotName);
|
|
1934
|
-
const appendAfter = slotChildNodes[0];
|
|
1935
|
-
return insertBefore(appendAfter.parentNode, newChild, appendAfter.nextSibling);
|
|
1936
|
-
}
|
|
1937
|
-
if (newChild.nodeType === 1 && !!newChild.getAttribute("slot")) {
|
|
1938
|
-
newChild.hidden = true;
|
|
1939
|
-
}
|
|
1940
|
-
return originalPrepend.call(this, newChild);
|
|
1941
|
-
});
|
|
1942
|
-
};
|
|
1943
|
-
};
|
|
1944
|
-
var patchSlotAppend = (HostElementPrototype) => {
|
|
1945
|
-
HostElementPrototype.append = function(...newChildren) {
|
|
1946
|
-
newChildren.forEach((newChild) => {
|
|
1947
|
-
if (typeof newChild === "string") {
|
|
1948
|
-
newChild = this.ownerDocument.createTextNode(newChild);
|
|
1949
|
-
}
|
|
1950
|
-
this.appendChild(newChild);
|
|
1951
|
-
});
|
|
1952
|
-
};
|
|
1953
|
-
};
|
|
1954
|
-
var patchSlotInsertAdjacentHTML = (HostElementPrototype) => {
|
|
1955
|
-
const originalInsertAdjacentHtml = HostElementPrototype.insertAdjacentHTML;
|
|
1956
|
-
HostElementPrototype.insertAdjacentHTML = function(position, text) {
|
|
1957
|
-
if (position !== "afterbegin" && position !== "beforeend") {
|
|
1958
|
-
return originalInsertAdjacentHtml.call(this, position, text);
|
|
1959
|
-
}
|
|
1960
|
-
const container = this.ownerDocument.createElement("_");
|
|
1961
|
-
let node;
|
|
1962
|
-
container.innerHTML = text;
|
|
1963
|
-
if (position === "afterbegin") {
|
|
1964
|
-
while (node = container.firstChild) {
|
|
1965
|
-
this.prepend(node);
|
|
1966
|
-
}
|
|
1967
|
-
} else if (position === "beforeend") {
|
|
1968
|
-
while (node = container.firstChild) {
|
|
1969
|
-
this.append(node);
|
|
1970
|
-
}
|
|
1971
|
-
}
|
|
1972
|
-
};
|
|
1973
|
-
};
|
|
1974
|
-
var patchSlotInsertAdjacentText = (HostElementPrototype) => {
|
|
1975
|
-
HostElementPrototype.insertAdjacentText = function(position, text) {
|
|
1976
|
-
this.insertAdjacentHTML(position, text);
|
|
1977
|
-
};
|
|
1978
|
-
};
|
|
1979
|
-
var patchSlotInsertAdjacentElement = (HostElementPrototype) => {
|
|
1980
|
-
const originalInsertAdjacentElement = HostElementPrototype.insertAdjacentElement;
|
|
1981
|
-
HostElementPrototype.insertAdjacentElement = function(position, element) {
|
|
1982
|
-
if (position !== "afterbegin" && position !== "beforeend") {
|
|
1983
|
-
return originalInsertAdjacentElement.call(this, position, element);
|
|
1984
|
-
}
|
|
1985
|
-
if (position === "afterbegin") {
|
|
1986
|
-
this.prepend(element);
|
|
1987
|
-
return element;
|
|
1988
|
-
} else if (position === "beforeend") {
|
|
1989
|
-
this.append(element);
|
|
1990
|
-
return element;
|
|
1991
|
-
}
|
|
1992
|
-
return element;
|
|
1993
|
-
};
|
|
1994
|
-
};
|
|
1995
|
-
var patchTextContent = (hostElementPrototype) => {
|
|
1996
|
-
const descriptor = Object.getOwnPropertyDescriptor(Node.prototype, "textContent");
|
|
1997
|
-
Object.defineProperty(hostElementPrototype, "__textContent", descriptor);
|
|
1998
|
-
{
|
|
1999
|
-
Object.defineProperty(hostElementPrototype, "textContent", {
|
|
2000
|
-
// To mimic shadow root behavior, we need to return the text content of all
|
|
2001
|
-
// nodes in a slot reference node
|
|
2002
|
-
get() {
|
|
2003
|
-
const slotRefNodes = getAllChildSlotNodes(this.childNodes);
|
|
2004
|
-
const textContent = slotRefNodes.map((node) => {
|
|
2005
|
-
var _a, _b;
|
|
2006
|
-
const text = [];
|
|
2007
|
-
let slotContent = node.nextSibling;
|
|
2008
|
-
while (slotContent && slotContent["s-sn"] === node["s-sn"]) {
|
|
2009
|
-
if (slotContent.nodeType === 3 /* TEXT_NODE */ || slotContent.nodeType === 1 /* ELEMENT_NODE */) {
|
|
2010
|
-
text.push((_b = (_a = slotContent.textContent) == null ? void 0 : _a.trim()) != null ? _b : "");
|
|
2011
|
-
}
|
|
2012
|
-
slotContent = slotContent.nextSibling;
|
|
2013
|
-
}
|
|
2014
|
-
return text.filter((ref) => ref !== "").join(" ");
|
|
2015
|
-
}).filter((text) => text !== "").join(" ");
|
|
2016
|
-
return " " + textContent + " ";
|
|
2017
|
-
},
|
|
2018
|
-
// To mimic shadow root behavior, we need to overwrite all nodes in a slot
|
|
2019
|
-
// reference node. If a default slot reference node exists, the text content will be
|
|
2020
|
-
// placed there. Otherwise, the new text node will be hidden
|
|
2021
|
-
set(value) {
|
|
2022
|
-
const slotRefNodes = getAllChildSlotNodes(this.childNodes);
|
|
2023
|
-
slotRefNodes.forEach((node) => {
|
|
2024
|
-
let slotContent = node.nextSibling;
|
|
2025
|
-
while (slotContent && slotContent["s-sn"] === node["s-sn"]) {
|
|
2026
|
-
const tmp = slotContent;
|
|
2027
|
-
slotContent = slotContent.nextSibling;
|
|
2028
|
-
tmp.remove();
|
|
2029
|
-
}
|
|
2030
|
-
if (node["s-sn"] === "") {
|
|
2031
|
-
const textNode = this.ownerDocument.createTextNode(value);
|
|
2032
|
-
textNode["s-sn"] = "";
|
|
2033
|
-
insertBefore(node.parentElement, textNode, node.nextSibling);
|
|
2034
|
-
} else {
|
|
2035
|
-
node.remove();
|
|
2036
|
-
}
|
|
2037
|
-
});
|
|
2038
|
-
}
|
|
2039
|
-
});
|
|
2040
|
-
}
|
|
2041
|
-
};
|
|
2042
|
-
var patchChildSlotNodes = (elm, cmpMeta) => {
|
|
2043
|
-
class FakeNodeList extends Array {
|
|
2044
|
-
item(n) {
|
|
2045
|
-
return this[n];
|
|
2046
|
-
}
|
|
2047
|
-
}
|
|
2048
|
-
if (cmpMeta.$flags$ & 8 /* needsShadowDomShim */) {
|
|
2049
|
-
const childNodesFn = elm.__lookupGetter__("childNodes");
|
|
2050
|
-
Object.defineProperty(elm, "children", {
|
|
2051
|
-
get() {
|
|
2052
|
-
return this.childNodes.map((n) => n.nodeType === 1);
|
|
2053
|
-
}
|
|
2054
|
-
});
|
|
2055
|
-
Object.defineProperty(elm, "childElementCount", {
|
|
2056
|
-
get() {
|
|
2057
|
-
return elm.children.length;
|
|
2058
|
-
}
|
|
2059
|
-
});
|
|
2060
|
-
Object.defineProperty(elm, "childNodes", {
|
|
2061
|
-
get() {
|
|
2062
|
-
const childNodes = childNodesFn.call(this);
|
|
2063
|
-
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0 && getHostRef(this).$flags$ & 2 /* hasRendered */) {
|
|
2064
|
-
const result = new FakeNodeList();
|
|
2065
|
-
for (let i2 = 0; i2 < childNodes.length; i2++) {
|
|
2066
|
-
const slot = childNodes[i2]["s-nr"];
|
|
2067
|
-
if (slot) {
|
|
2068
|
-
result.push(slot);
|
|
2069
|
-
}
|
|
2070
|
-
}
|
|
2071
|
-
return result;
|
|
2072
|
-
}
|
|
2073
|
-
return FakeNodeList.from(childNodes);
|
|
2074
|
-
}
|
|
2075
|
-
});
|
|
2076
|
-
}
|
|
2077
|
-
};
|
|
2078
|
-
var getAllChildSlotNodes = (childNodes) => {
|
|
2079
|
-
const slotRefNodes = [];
|
|
2080
|
-
for (const childNode of Array.from(childNodes)) {
|
|
2081
|
-
if (childNode["s-sr"]) {
|
|
2082
|
-
slotRefNodes.push(childNode);
|
|
2821
|
+
hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance$, elm));
|
|
2083
2822
|
}
|
|
2084
|
-
slotRefNodes.push(...getAllChildSlotNodes(childNode.childNodes));
|
|
2085
2823
|
}
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
var getSlotName = (node) => node["s-sn"] || node.nodeType === 1 && node.getAttribute("slot") || "";
|
|
2089
|
-
var getHostSlotNode = (childNodes, slotName, hostName) => {
|
|
2090
|
-
let i2 = 0;
|
|
2091
|
-
let childNode;
|
|
2092
|
-
for (; i2 < childNodes.length; i2++) {
|
|
2093
|
-
childNode = childNodes[i2];
|
|
2094
|
-
if (childNode["s-sr"] && childNode["s-sn"] === slotName && childNode["s-hn"] === hostName) {
|
|
2095
|
-
return childNode;
|
|
2096
|
-
}
|
|
2097
|
-
childNode = getHostSlotNode(childNode.childNodes, slotName, hostName);
|
|
2098
|
-
if (childNode) {
|
|
2099
|
-
return childNode;
|
|
2100
|
-
}
|
|
2824
|
+
if (rootAppliedStyles.has(elm)) {
|
|
2825
|
+
rootAppliedStyles.delete(elm);
|
|
2101
2826
|
}
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
var getHostSlotChildNodes = (n, slotName) => {
|
|
2105
|
-
const childNodes = [n];
|
|
2106
|
-
while ((n = n.nextSibling) && n["s-sn"] === slotName) {
|
|
2107
|
-
childNodes.push(n);
|
|
2827
|
+
if (elm.shadowRoot && rootAppliedStyles.has(elm.shadowRoot)) {
|
|
2828
|
+
rootAppliedStyles.delete(elm.shadowRoot);
|
|
2108
2829
|
}
|
|
2109
|
-
return childNodes;
|
|
2110
2830
|
};
|
|
2111
2831
|
|
|
2112
2832
|
// src/runtime/bootstrap-lazy.ts
|
|
2113
2833
|
var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
2114
2834
|
var _a;
|
|
2835
|
+
if (!win.document) {
|
|
2836
|
+
console.warn("Stencil: No document found. Skipping bootstrapping lazy components.");
|
|
2837
|
+
return;
|
|
2838
|
+
}
|
|
2115
2839
|
const endBootstrap = createTime();
|
|
2116
2840
|
const cmpTags = [];
|
|
2117
2841
|
const exclude = options.exclude || [];
|
|
2118
2842
|
const customElements2 = win.customElements;
|
|
2119
|
-
const head =
|
|
2843
|
+
const head = win.document.head;
|
|
2120
2844
|
const metaCharset = /* @__PURE__ */ head.querySelector("meta[charset]");
|
|
2121
|
-
const dataStyles = /* @__PURE__ */
|
|
2845
|
+
const dataStyles = /* @__PURE__ */ win.document.createElement("style");
|
|
2122
2846
|
const deferredConnectedCallbacks = [];
|
|
2123
2847
|
let appLoadFallback;
|
|
2124
2848
|
let isBootstrapping = true;
|
|
2125
2849
|
Object.assign(plt, options);
|
|
2126
|
-
plt.$resourcesUrl$ = new URL(options.resourcesUrl || "./",
|
|
2850
|
+
plt.$resourcesUrl$ = new URL(options.resourcesUrl || "./", win.document.baseURI).href;
|
|
2127
2851
|
{
|
|
2128
2852
|
plt.$flags$ |= 2 /* appLoaded */;
|
|
2129
2853
|
}
|
|
2854
|
+
{
|
|
2855
|
+
hydrateScopedToShadow();
|
|
2856
|
+
}
|
|
2130
2857
|
let hasSlotRelocation = false;
|
|
2131
2858
|
lazyBundles.map((lazyBundle) => {
|
|
2132
2859
|
lazyBundle[1].map((compactMeta) => {
|
|
@@ -2197,6 +2924,17 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
2197
2924
|
}
|
|
2198
2925
|
disconnectedCallback() {
|
|
2199
2926
|
plt.jmp(() => disconnectedCallback(this));
|
|
2927
|
+
plt.raf(() => {
|
|
2928
|
+
var _a3;
|
|
2929
|
+
const hostRef = getHostRef(this);
|
|
2930
|
+
const i2 = deferredConnectedCallbacks.findIndex((host) => host === this);
|
|
2931
|
+
if (i2 > -1) {
|
|
2932
|
+
deferredConnectedCallbacks.splice(i2, 1);
|
|
2933
|
+
}
|
|
2934
|
+
if (((_a3 = hostRef == null ? void 0 : hostRef.$vnode$) == null ? void 0 : _a3.$elm$) instanceof Node && !hostRef.$vnode$.$elm$.isConnected) {
|
|
2935
|
+
delete hostRef.$vnode$.$elm$;
|
|
2936
|
+
}
|
|
2937
|
+
});
|
|
2200
2938
|
}
|
|
2201
2939
|
componentOnReady() {
|
|
2202
2940
|
return getHostRef(this).$onReadyPromise$;
|
|
@@ -2204,7 +2942,7 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
2204
2942
|
};
|
|
2205
2943
|
{
|
|
2206
2944
|
if (cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
|
|
2207
|
-
patchPseudoShadowDom(HostElement.prototype
|
|
2945
|
+
patchPseudoShadowDom(HostElement.prototype);
|
|
2208
2946
|
}
|
|
2209
2947
|
}
|
|
2210
2948
|
cmpMeta.$lazyBundleId$ = lazyBundle[0];
|
|
@@ -2226,7 +2964,7 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
2226
2964
|
}
|
|
2227
2965
|
if (dataStyles.innerHTML.length) {
|
|
2228
2966
|
dataStyles.setAttribute("data-styles", "");
|
|
2229
|
-
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(
|
|
2967
|
+
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(win.document);
|
|
2230
2968
|
if (nonce != null) {
|
|
2231
2969
|
dataStyles.setAttribute("nonce", nonce);
|
|
2232
2970
|
}
|
|
@@ -2244,9 +2982,9 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
2244
2982
|
endBootstrap();
|
|
2245
2983
|
};
|
|
2246
2984
|
var addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) => {
|
|
2247
|
-
if (listeners) {
|
|
2985
|
+
if (listeners && win.document) {
|
|
2248
2986
|
listeners.map(([flags, name, method]) => {
|
|
2249
|
-
const target = getHostListenerTarget(elm, flags) ;
|
|
2987
|
+
const target = getHostListenerTarget(win.document, elm, flags) ;
|
|
2250
2988
|
const handler = hostListenerProxy(hostRef, method);
|
|
2251
2989
|
const opts = hostListenerOpts(flags);
|
|
2252
2990
|
plt.ael(target, name, handler, opts);
|
|
@@ -2265,13 +3003,19 @@ var hostListenerProxy = (hostRef, methodName) => (ev) => {
|
|
|
2265
3003
|
}
|
|
2266
3004
|
}
|
|
2267
3005
|
} catch (e) {
|
|
2268
|
-
consoleError(e);
|
|
3006
|
+
consoleError(e, hostRef.$hostElement$);
|
|
2269
3007
|
}
|
|
2270
3008
|
};
|
|
2271
|
-
var getHostListenerTarget = (elm, flags) => {
|
|
2272
|
-
if (flags & 4 /* TargetDocument */)
|
|
2273
|
-
|
|
2274
|
-
|
|
3009
|
+
var getHostListenerTarget = (doc, elm, flags) => {
|
|
3010
|
+
if (flags & 4 /* TargetDocument */) {
|
|
3011
|
+
return doc;
|
|
3012
|
+
}
|
|
3013
|
+
if (flags & 8 /* TargetWindow */) {
|
|
3014
|
+
return win;
|
|
3015
|
+
}
|
|
3016
|
+
if (flags & 16 /* TargetBody */) {
|
|
3017
|
+
return doc.body;
|
|
3018
|
+
}
|
|
2275
3019
|
return elm;
|
|
2276
3020
|
};
|
|
2277
3021
|
var hostListenerOpts = (flags) => supportsListenerOptions ? {
|
|
@@ -2282,4 +3026,4 @@ var hostListenerOpts = (flags) => supportsListenerOptions ? {
|
|
|
2282
3026
|
// src/runtime/nonce.ts
|
|
2283
3027
|
var setNonce = (nonce) => plt.$nonce$ = nonce;
|
|
2284
3028
|
|
|
2285
|
-
export { Build as B, H,
|
|
3029
|
+
export { Build as B, H, readTask as a, bootstrapLazy as b, createEvent as c, Host as d, getAssetPath as e, forceUpdate as f, getElement as g, h, getMode as i, setMode as j, promiseResolve as p, registerInstance as r, setNonce as s, writeTask as w };
|