@paperless/core 0.1.0-alpha.98 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +3816 -0
- package/README.md +9 -1
- package/dist/assets/i18n/page-size-select.i18n.en.json +4 -0
- package/dist/assets/i18n/page-size-select.i18n.nl.json +4 -0
- package/dist/assets/i18n/table-footer.i18n.en.json +3 -0
- package/dist/assets/i18n/table-footer.i18n.nl.json +3 -0
- package/dist/assets/i18n/table-header.i18n.en.json +6 -0
- package/dist/assets/i18n/table-header.i18n.nl.json +6 -0
- package/dist/assets/i18n/table.i18n.en.json +13 -0
- package/dist/assets/i18n/table.i18n.nl.json +13 -0
- package/dist/assets/icons/bread.svg +5 -12
- package/dist/assets/icons/camera.svg +10 -0
- package/dist/assets/icons/car.svg +5 -12
- package/dist/assets/icons/filter.svg +6 -13
- package/dist/assets/icons/notification.svg +10 -0
- package/dist/assets/icons/reload.svg +10 -0
- package/dist/assets/icons/search.svg +5 -12
- package/dist/assets/illustrations/empty-state-add.svg +65 -0
- package/dist/assets/illustrations/empty-state-overview.svg +58 -0
- package/dist/assets/illustrations/empty-state-search.svg +88 -0
- package/dist/assets/images/helper/helper-hover.svg +6 -6
- package/dist/assets/images/helper/helper.svg +2 -2
- package/dist/build/index.esm.js +2 -0
- package/dist/build/index.esm.js.map +1 -0
- package/dist/build/p-07259c61.entry.js +2 -0
- package/dist/build/p-07259c61.entry.js.map +1 -0
- package/dist/build/p-10106f7d.entry.js +2 -0
- package/dist/build/p-10106f7d.entry.js.map +1 -0
- package/dist/build/p-158f1e1a.entry.js +2 -0
- package/dist/build/p-158f1e1a.entry.js.map +1 -0
- package/dist/build/p-195632a8.entry.js +2 -0
- package/dist/build/p-195632a8.entry.js.map +1 -0
- package/dist/build/p-1f55126f.entry.js +2 -0
- package/dist/build/p-1f55126f.entry.js.map +1 -0
- package/dist/build/p-26da620b.entry.js +2 -0
- package/dist/build/p-26da620b.entry.js.map +1 -0
- package/dist/build/p-350d452b.entry.js +2 -0
- package/dist/build/p-350d452b.entry.js.map +1 -0
- package/dist/build/p-47e461b7.entry.js +2 -0
- package/dist/build/p-47e461b7.entry.js.map +1 -0
- package/dist/build/p-4c51a801.entry.js +2 -0
- package/dist/build/p-4c51a801.entry.js.map +1 -0
- package/dist/build/p-4e650fe4.js +2 -0
- package/dist/build/p-4e650fe4.js.map +1 -0
- package/dist/build/p-51408aca.entry.js +2 -0
- package/dist/build/p-51408aca.entry.js.map +1 -0
- package/dist/build/p-594b28a7.entry.js +2 -0
- package/dist/build/p-594b28a7.entry.js.map +1 -0
- package/dist/build/p-5c7b20a3.entry.js +2 -0
- package/dist/build/p-5c7b20a3.entry.js.map +1 -0
- package/dist/build/p-66c83538.entry.js +2 -0
- package/dist/build/p-66c83538.entry.js.map +1 -0
- package/dist/build/p-66cb2b3e.entry.js +2 -0
- package/dist/build/p-66cb2b3e.entry.js.map +1 -0
- package/dist/build/p-66f77c63.entry.js +2 -0
- package/dist/build/p-66f77c63.entry.js.map +1 -0
- package/dist/build/p-6c60fd3d.js +2 -0
- package/dist/build/p-6c60fd3d.js.map +1 -0
- package/dist/build/p-6ccf5cdd.js +3 -0
- package/dist/build/p-6ccf5cdd.js.map +1 -0
- package/dist/build/p-6d5aa646.entry.js +2 -0
- package/dist/build/p-6d5aa646.entry.js.map +1 -0
- package/dist/build/p-6f1352e0.entry.js +2 -0
- package/dist/build/p-6f1352e0.entry.js.map +1 -0
- package/dist/build/p-70122dbc.entry.js +2 -0
- package/dist/build/p-70122dbc.entry.js.map +1 -0
- package/dist/build/p-7818a850.entry.js +2 -0
- package/dist/build/p-7818a850.entry.js.map +1 -0
- package/dist/build/p-872b50b6.entry.js +2 -0
- package/dist/build/p-872b50b6.entry.js.map +1 -0
- package/dist/build/p-8a6728d5.js +2 -0
- package/dist/build/p-8a6728d5.js.map +1 -0
- package/dist/build/p-910bd6bc.entry.js +2 -0
- package/dist/build/p-910bd6bc.entry.js.map +1 -0
- package/dist/build/p-91725831.entry.js +2 -0
- package/dist/build/p-91725831.entry.js.map +1 -0
- package/dist/build/p-a1c1d95b.entry.js +2 -0
- package/dist/build/p-a1c1d95b.entry.js.map +1 -0
- package/dist/build/p-a23ea8fe.entry.js +2 -0
- package/dist/build/p-a23ea8fe.entry.js.map +1 -0
- package/dist/build/p-abcd80e9.entry.js +2 -0
- package/dist/build/p-abcd80e9.entry.js.map +1 -0
- package/dist/build/p-ae248aef.js +2 -0
- package/dist/build/p-ae248aef.js.map +1 -0
- package/dist/build/p-b5ce8cd4.entry.js +2 -0
- package/dist/build/p-b5ce8cd4.entry.js.map +1 -0
- package/dist/build/p-b7c41365.entry.js +2 -0
- package/dist/build/p-b7c41365.entry.js.map +1 -0
- package/dist/build/p-bf0eca4f.entry.js +2 -0
- package/dist/build/p-bf0eca4f.entry.js.map +1 -0
- package/dist/build/p-c667366d.entry.js +2 -0
- package/dist/build/p-c667366d.entry.js.map +1 -0
- package/dist/build/p-cbdabede.entry.js +2 -0
- package/dist/build/p-cbdabede.entry.js.map +1 -0
- package/dist/build/p-ce1abd74.entry.js +2 -0
- package/dist/build/p-ce1abd74.entry.js.map +1 -0
- package/dist/build/p-ce443f5b.entry.js +2 -0
- package/dist/build/p-ce443f5b.entry.js.map +1 -0
- package/dist/build/p-d393493c.entry.js +2 -0
- package/dist/build/p-d393493c.entry.js.map +1 -0
- package/dist/build/p-da0dd04e.entry.js +2 -0
- package/dist/build/p-da0dd04e.entry.js.map +1 -0
- package/dist/build/p-da2426c7.js +2 -0
- package/dist/build/p-da2426c7.js.map +1 -0
- package/dist/build/p-da6e5abd.entry.js +2 -0
- package/dist/build/p-da6e5abd.entry.js.map +1 -0
- package/dist/build/p-e17560e6.entry.js +2 -0
- package/dist/build/p-e17560e6.entry.js.map +1 -0
- package/dist/build/p-e1da7376.entry.js +2 -0
- package/dist/build/p-e1da7376.entry.js.map +1 -0
- package/dist/build/p-e9a1b51e.entry.js +2 -0
- package/dist/build/p-e9a1b51e.entry.js.map +1 -0
- package/dist/build/p-ec850aca.entry.js +2 -0
- package/dist/build/p-ec850aca.entry.js.map +1 -0
- package/dist/build/p-ed6edf0a.entry.js +2 -0
- package/dist/build/p-ed6edf0a.entry.js.map +1 -0
- package/dist/build/p-f7d67c36.entry.js +2 -0
- package/dist/build/p-f7d67c36.entry.js.map +1 -0
- package/dist/build/p-faee8450.entry.js +2 -0
- package/dist/build/p-faee8450.entry.js.map +1 -0
- package/dist/build/p-fef32402.js +2 -0
- package/dist/build/p-fef32402.js.map +1 -0
- package/dist/build/paperless.css +1 -253
- package/dist/build/paperless.esm.js +2 -1
- package/dist/build/paperless.esm.js.map +1 -0
- package/dist/cjs/child-of-e472f812.js +11 -0
- package/dist/cjs/child-of-e472f812.js.map +1 -0
- package/dist/cjs/constants-a4459ec9.js +9 -0
- package/dist/cjs/constants-a4459ec9.js.map +1 -0
- package/dist/cjs/floating-ui.dom.esm-62336770.js +1334 -0
- package/dist/cjs/floating-ui.dom.esm-62336770.js.map +1 -0
- package/dist/cjs/index-b59a0544.js +2324 -0
- package/dist/cjs/index-b59a0544.js.map +1 -0
- package/dist/cjs/{index-5fdb82a1.js → index-dfc4dfec.js} +981 -339
- package/dist/cjs/index-dfc4dfec.js.map +1 -0
- package/dist/cjs/index.cjs.js +20 -0
- package/dist/cjs/index.cjs.js.map +1 -0
- package/dist/cjs/loader.cjs.js +6 -3
- package/dist/cjs/loader.cjs.js.map +1 -0
- package/dist/cjs/localization-9e2ac7f3.js +62 -0
- package/dist/cjs/localization-9e2ac7f3.js.map +1 -0
- package/dist/cjs/object-get-by-path-ee5540a5.js +19 -0
- package/dist/cjs/object-get-by-path-ee5540a5.js.map +1 -0
- package/dist/cjs/p-accordion.cjs.entry.js +5 -11
- package/dist/cjs/p-accordion.cjs.entry.js.map +1 -0
- package/dist/cjs/p-attachment.cjs.entry.js +39 -0
- package/dist/cjs/p-attachment.cjs.entry.js.map +1 -0
- package/dist/cjs/p-avatar-group.cjs.entry.js +5 -2
- package/dist/cjs/p-avatar-group.cjs.entry.js.map +1 -0
- package/dist/cjs/p-avatar.cjs.entry.js +45 -0
- package/dist/cjs/p-avatar.cjs.entry.js.map +1 -0
- package/dist/cjs/p-backdrop.cjs.entry.js +43 -0
- package/dist/cjs/p-backdrop.cjs.entry.js.map +1 -0
- package/dist/cjs/p-button_3.cjs.entry.js +127 -148
- package/dist/cjs/p-button_3.cjs.entry.js.map +1 -0
- package/dist/cjs/p-calendar.cjs.entry.js +703 -0
- package/dist/cjs/p-calendar.cjs.entry.js.map +1 -0
- package/dist/cjs/p-card-body.cjs.entry.js +4 -5
- package/dist/cjs/p-card-body.cjs.entry.js.map +1 -0
- package/dist/cjs/p-card-container.cjs.entry.js +4 -8
- package/dist/cjs/p-card-container.cjs.entry.js.map +1 -0
- package/dist/cjs/p-card-header.cjs.entry.js +5 -5
- package/dist/cjs/p-card-header.cjs.entry.js.map +1 -0
- package/dist/cjs/p-content-slider.cjs.entry.js +126 -57
- package/dist/cjs/p-content-slider.cjs.entry.js.map +1 -0
- package/dist/cjs/p-counter.cjs.entry.js +4 -8
- package/dist/cjs/p-counter.cjs.entry.js.map +1 -0
- package/dist/cjs/p-datepicker.cjs.entry.js +3043 -0
- package/dist/cjs/p-datepicker.cjs.entry.js.map +1 -0
- package/dist/cjs/p-divider.cjs.entry.js +4 -2
- package/dist/cjs/p-divider.cjs.entry.js.map +1 -0
- package/dist/cjs/p-drawer-body_3.cjs.entry.js +51 -0
- package/dist/cjs/p-drawer-body_3.cjs.entry.js.map +1 -0
- package/dist/cjs/p-drawer.cjs.entry.js +65 -0
- package/dist/cjs/p-drawer.cjs.entry.js.map +1 -0
- package/dist/cjs/p-dropdown-menu-container.cjs.entry.js +7 -3
- package/dist/cjs/p-dropdown-menu-container.cjs.entry.js.map +1 -0
- package/dist/cjs/p-dropdown_2.cjs.entry.js +163 -0
- package/dist/cjs/p-dropdown_2.cjs.entry.js.map +1 -0
- package/dist/cjs/p-helper_3.cjs.entry.js +150 -0
- package/dist/cjs/p-helper_3.cjs.entry.js.map +1 -0
- package/dist/cjs/p-illustration_6.cjs.entry.js +2840 -0
- package/dist/cjs/p-illustration_6.cjs.entry.js.map +1 -0
- package/dist/cjs/p-info-panel.cjs.entry.js +6 -8
- package/dist/cjs/p-info-panel.cjs.entry.js.map +1 -0
- package/dist/cjs/p-label_3.cjs.entry.js +65 -0
- package/dist/cjs/p-label_3.cjs.entry.js.map +1 -0
- package/dist/cjs/p-layout.cjs.entry.js +4 -5
- package/dist/cjs/p-layout.cjs.entry.js.map +1 -0
- package/dist/cjs/p-modal-body_4.cjs.entry.js +79 -0
- package/dist/cjs/p-modal-body_4.cjs.entry.js.map +1 -0
- package/dist/cjs/p-modal.cjs.entry.js +34 -21
- package/dist/cjs/p-modal.cjs.entry.js.map +1 -0
- package/dist/cjs/p-navbar.cjs.entry.js +5 -9
- package/dist/cjs/p-navbar.cjs.entry.js.map +1 -0
- package/dist/cjs/p-navigation-item.cjs.entry.js +8 -5
- package/dist/cjs/p-navigation-item.cjs.entry.js.map +1 -0
- package/dist/cjs/p-page-size-select_3.cjs.entry.js +224 -0
- package/dist/cjs/p-page-size-select_3.cjs.entry.js.map +1 -0
- package/dist/cjs/p-profile.cjs.entry.js +14 -15
- package/dist/cjs/p-profile.cjs.entry.js.map +1 -0
- package/dist/cjs/p-select.cjs.entry.js +245 -0
- package/dist/cjs/p-select.cjs.entry.js.map +1 -0
- package/dist/cjs/p-slider-indicator.cjs.entry.js +4 -5
- package/dist/cjs/p-slider-indicator.cjs.entry.js.map +1 -0
- package/dist/cjs/p-status.cjs.entry.js +7 -5
- package/dist/cjs/p-status.cjs.entry.js.map +1 -0
- package/dist/cjs/p-stepper-item.cjs.entry.js +26 -0
- package/dist/cjs/p-stepper-item.cjs.entry.js.map +1 -0
- package/dist/cjs/p-stepper-line.cjs.entry.js +23 -0
- package/dist/cjs/p-stepper-line.cjs.entry.js.map +1 -0
- package/dist/cjs/p-stepper.cjs.entry.js +53 -44
- package/dist/cjs/p-stepper.cjs.entry.js.map +1 -0
- package/dist/cjs/p-tab-group.cjs.entry.js +11 -10
- package/dist/cjs/p-tab-group.cjs.entry.js.map +1 -0
- package/dist/cjs/p-tab-item.cjs.entry.js +4 -5
- package/dist/cjs/p-tab-item.cjs.entry.js.map +1 -0
- package/dist/cjs/p-table-column.cjs.entry.js +30 -0
- package/dist/cjs/p-table-column.cjs.entry.js.map +1 -0
- package/dist/cjs/p-table.cjs.entry.js +360 -0
- package/dist/cjs/p-table.cjs.entry.js.map +1 -0
- package/dist/cjs/p-toast-container.cjs.entry.js +22 -0
- package/dist/cjs/p-toast-container.cjs.entry.js.map +1 -0
- package/dist/cjs/p-toast.cjs.entry.js +35 -0
- package/dist/cjs/p-toast.cjs.entry.js.map +1 -0
- package/dist/cjs/p-tooltip.cjs.entry.js +59 -61
- package/dist/cjs/p-tooltip.cjs.entry.js.map +1 -0
- package/dist/cjs/paperless.cjs.js +12 -3
- package/dist/cjs/paperless.cjs.js.map +1 -0
- package/dist/collection/assets/icons/bread.svg +5 -12
- package/dist/collection/assets/icons/camera.svg +10 -0
- package/dist/collection/assets/icons/car.svg +5 -12
- package/dist/collection/assets/icons/filter.svg +6 -13
- package/dist/collection/assets/icons/notification.svg +10 -0
- package/dist/collection/assets/icons/reload.svg +10 -0
- package/dist/collection/assets/icons/search.svg +5 -12
- package/dist/collection/assets/illustrations/empty-state-add.svg +65 -0
- package/dist/collection/assets/illustrations/empty-state-overview.svg +58 -0
- package/dist/collection/assets/illustrations/empty-state-search.svg +88 -0
- package/dist/collection/assets/images/helper/helper-hover.svg +6 -6
- package/dist/collection/assets/images/helper/helper.svg +2 -2
- package/dist/collection/collection-manifest.json +23 -4
- package/dist/collection/components/atoms/avatar/avatar.component.css +1 -24
- package/dist/collection/components/atoms/avatar/avatar.component.js +105 -89
- package/dist/collection/components/atoms/avatar/avatar.component.js.map +1 -0
- package/dist/collection/components/atoms/avatar-group/avatar-group.component.css +1 -18
- package/dist/collection/components/atoms/avatar-group/avatar-group.component.js +37 -31
- package/dist/collection/components/atoms/avatar-group/avatar-group.component.js.map +1 -0
- package/dist/collection/components/atoms/backdrop/backdrop.component.css +1 -0
- package/dist/collection/components/atoms/backdrop/backdrop.component.js +149 -0
- package/dist/collection/components/atoms/backdrop/backdrop.component.js.map +1 -0
- package/dist/collection/components/atoms/button/button.component.css +1 -95
- package/dist/collection/components/atoms/button/button.component.js +305 -319
- package/dist/collection/components/atoms/button/button.component.js.map +1 -0
- package/dist/collection/components/atoms/card-body/card-body.component.css +1 -9
- package/dist/collection/components/atoms/card-body/card-body.component.js +35 -32
- package/dist/collection/components/atoms/card-body/card-body.component.js.map +1 -0
- package/dist/collection/components/atoms/card-container/card-container.component.css +1 -17
- package/dist/collection/components/atoms/card-container/card-container.component.js +52 -52
- package/dist/collection/components/atoms/card-container/card-container.component.js.map +1 -0
- package/dist/collection/components/atoms/card-header/card-header.component.css +1 -17
- package/dist/collection/components/atoms/card-header/card-header.component.js +52 -51
- package/dist/collection/components/atoms/card-header/card-header.component.js.map +1 -0
- package/dist/collection/components/atoms/counter/counter.component.css +1 -30
- package/dist/collection/components/atoms/counter/counter.component.js +52 -52
- package/dist/collection/components/atoms/counter/counter.component.js.map +1 -0
- package/dist/collection/components/atoms/divider/divider.component.css +1 -10
- package/dist/collection/components/atoms/divider/divider.component.js +13 -11
- package/dist/collection/components/atoms/divider/divider.component.js.map +1 -0
- package/dist/collection/components/atoms/drawer-body/drawer-body.component.css +1 -0
- package/dist/collection/components/atoms/drawer-body/drawer-body.component.js +44 -0
- package/dist/collection/components/atoms/drawer-body/drawer-body.component.js.map +1 -0
- package/dist/collection/components/atoms/drawer-container/drawer-container.component.css +1 -0
- package/dist/collection/components/atoms/drawer-container/drawer-container.component.js +48 -0
- package/dist/collection/components/atoms/drawer-container/drawer-container.component.js.map +1 -0
- package/dist/collection/components/atoms/drawer-header/drawer-header.component.css +1 -0
- package/dist/collection/components/atoms/drawer-header/drawer-header.component.js +66 -0
- package/dist/collection/components/atoms/drawer-header/drawer-header.component.js.map +1 -0
- package/dist/collection/components/atoms/dropdown-menu-container/dropdown-menu-container.component.css +1 -6
- package/dist/collection/components/atoms/dropdown-menu-container/dropdown-menu-container.component.js +57 -9
- package/dist/collection/components/atoms/dropdown-menu-container/dropdown-menu-container.component.js.map +1 -0
- package/dist/collection/components/atoms/dropdown-menu-item/dropdown-menu-item.component.css +1 -13
- package/dist/collection/components/atoms/dropdown-menu-item/dropdown-menu-item.component.js +74 -52
- package/dist/collection/components/atoms/dropdown-menu-item/dropdown-menu-item.component.js.map +1 -0
- package/dist/collection/components/atoms/helper/helper.component.css +1 -7
- package/dist/collection/components/atoms/helper/helper.component.js +39 -39
- package/dist/collection/components/atoms/helper/helper.component.js.map +1 -0
- package/dist/collection/components/atoms/icon/icon.component.css +1 -1
- package/dist/collection/components/atoms/icon/icon.component.js +101 -100
- package/dist/collection/components/atoms/icon/icon.component.js.map +1 -0
- package/dist/collection/components/atoms/illustration/illustration.component.js +30 -23
- package/dist/collection/components/atoms/illustration/illustration.component.js.map +1 -0
- package/dist/collection/components/atoms/info-panel/info-panel.component.css +1 -28
- package/dist/collection/components/atoms/info-panel/info-panel.component.js +86 -89
- package/dist/collection/components/atoms/info-panel/info-panel.component.js.map +1 -0
- package/dist/collection/components/atoms/label/label.component.css +1 -0
- package/dist/collection/components/atoms/label/label.component.js +171 -0
- package/dist/collection/components/atoms/label/label.component.js.map +1 -0
- package/dist/collection/components/atoms/layout/layout.component.css +1 -73
- package/dist/collection/components/atoms/layout/layout.component.js +35 -38
- package/dist/collection/components/atoms/layout/layout.component.js.map +1 -0
- package/dist/collection/components/atoms/loader/loader.component.css +1 -26
- package/dist/collection/components/atoms/loader/loader.component.js +113 -114
- package/dist/collection/components/atoms/loader/loader.component.js.map +1 -0
- package/dist/collection/components/atoms/modal-body/modal-body.component.css +1 -7
- package/dist/collection/components/atoms/modal-body/modal-body.component.js +53 -31
- package/dist/collection/components/atoms/modal-body/modal-body.component.js.map +1 -0
- package/dist/collection/components/atoms/modal-container/modal-container.component.css +1 -6
- package/dist/collection/components/atoms/modal-container/modal-container.component.js +53 -31
- package/dist/collection/components/atoms/modal-container/modal-container.component.js.map +1 -0
- package/dist/collection/components/atoms/modal-footer/modal-footer.component.css +1 -8
- package/dist/collection/components/atoms/modal-footer/modal-footer.component.js +13 -36
- package/dist/collection/components/atoms/modal-footer/modal-footer.component.js.map +1 -0
- package/dist/collection/components/atoms/modal-header/modal-header.component.css +1 -16
- package/dist/collection/components/atoms/modal-header/modal-header.component.js +56 -54
- package/dist/collection/components/atoms/modal-header/modal-header.component.js.map +1 -0
- package/dist/collection/components/atoms/pagination-item/pagination-item.component.css +1 -16
- package/dist/collection/components/atoms/pagination-item/pagination-item.component.js +35 -32
- package/dist/collection/components/atoms/pagination-item/pagination-item.component.js.map +1 -0
- package/dist/collection/components/atoms/segment-container/segment-container.component.css +1 -5
- package/dist/collection/components/atoms/segment-container/segment-container.component.js +13 -9
- package/dist/collection/components/atoms/segment-container/segment-container.component.js.map +1 -0
- package/dist/collection/components/atoms/segment-item/segment-item.component.css +1 -21
- package/dist/collection/components/atoms/segment-item/segment-item.component.js +97 -90
- package/dist/collection/components/atoms/segment-item/segment-item.component.js.map +1 -0
- package/dist/collection/components/atoms/slider-indicator/slider-indicator.component.css +1 -7
- package/dist/collection/components/atoms/slider-indicator/slider-indicator.component.js +34 -30
- package/dist/collection/components/atoms/slider-indicator/slider-indicator.component.js.map +1 -0
- package/dist/collection/components/atoms/status/status.component.css +1 -16
- package/dist/collection/components/atoms/status/status.component.js +98 -93
- package/dist/collection/components/atoms/status/status.component.js.map +1 -0
- package/dist/collection/components/atoms/stepper-item/stepper-item.component.css +1 -59
- package/dist/collection/components/atoms/stepper-item/stepper-item.component.js +104 -93
- package/dist/collection/components/atoms/stepper-item/stepper-item.component.js.map +1 -0
- package/dist/collection/components/atoms/stepper-line/stepper-line.component.css +1 -18
- package/dist/collection/components/atoms/stepper-line/stepper-line.component.js +51 -50
- package/dist/collection/components/atoms/stepper-line/stepper-line.component.js.map +1 -0
- package/dist/collection/components/atoms/tab-group/tab-group.component.js +3 -11
- package/dist/collection/components/atoms/tab-group/tab-group.component.js.map +1 -0
- package/dist/collection/components/atoms/tab-item/tab-item.component.css +1 -10
- package/dist/collection/components/atoms/tab-item/tab-item.component.js +35 -32
- package/dist/collection/components/atoms/tab-item/tab-item.component.js.map +1 -0
- package/dist/collection/components/atoms/table-container/table-container.component.css +1 -0
- package/dist/collection/components/atoms/table-container/table-container.component.js +19 -0
- package/dist/collection/components/atoms/table-container/table-container.component.js.map +1 -0
- package/dist/collection/components/atoms/toast-container/toast-container.component.css +1 -0
- package/dist/collection/components/atoms/toast-container/toast-container.component.js +44 -0
- package/dist/collection/components/atoms/toast-container/toast-container.component.js.map +1 -0
- package/dist/collection/components/atoms/tooltip/tooltip.component.css +1 -43
- package/dist/collection/components/atoms/tooltip/tooltip.component.js +255 -235
- package/dist/collection/components/atoms/tooltip/tooltip.component.js.map +1 -0
- package/dist/collection/components/helpers/table-column/table-column.component.js +189 -0
- package/dist/collection/components/helpers/table-column/table-column.component.js.map +1 -0
- package/dist/collection/components/molecules/accordion/accordion.component.css +1 -3
- package/dist/collection/components/molecules/accordion/accordion.component.js +103 -108
- package/dist/collection/components/molecules/accordion/accordion.component.js.map +1 -0
- package/dist/collection/components/molecules/attachment/attachment.component.css +1 -0
- package/dist/collection/components/molecules/attachment/attachment.component.js +145 -0
- package/dist/collection/components/molecules/attachment/attachment.component.js.map +1 -0
- package/dist/collection/components/molecules/calendar/calendar.component.css +1 -0
- package/dist/collection/components/molecules/calendar/calendar.component.js +515 -0
- package/dist/collection/components/molecules/calendar/calendar.component.js.map +1 -0
- package/dist/collection/components/molecules/content-slider/content-slider.component.css +1 -26
- package/dist/collection/components/molecules/content-slider/content-slider.component.js +238 -140
- package/dist/collection/components/molecules/content-slider/content-slider.component.js.map +1 -0
- package/dist/collection/components/molecules/datepicker/datepicker.component.css +1 -0
- package/dist/collection/components/molecules/datepicker/datepicker.component.js +527 -0
- package/dist/collection/components/molecules/datepicker/datepicker.component.js.map +1 -0
- package/dist/collection/components/molecules/dropdown/dropdown.component.css +1 -12
- package/dist/collection/components/molecules/dropdown/dropdown.component.js +289 -187
- package/dist/collection/components/molecules/dropdown/dropdown.component.js.map +1 -0
- package/dist/collection/components/molecules/input-error/input-error.component.js +60 -0
- package/dist/collection/components/molecules/input-error/input-error.component.js.map +1 -0
- package/dist/collection/components/molecules/input-group/input-group.component.css +1 -204
- package/dist/collection/components/molecules/input-group/input-group.component.js +366 -227
- package/dist/collection/components/molecules/input-group/input-group.component.js.map +1 -0
- package/dist/collection/components/molecules/navigation-item/navigation-item.component.css +1 -22
- package/dist/collection/components/molecules/navigation-item/navigation-item.component.js +107 -104
- package/dist/collection/components/molecules/navigation-item/navigation-item.component.js.map +1 -0
- package/dist/collection/components/molecules/page-size-select/constants.js +3 -0
- package/dist/collection/components/molecules/page-size-select/constants.js.map +1 -0
- package/dist/collection/components/molecules/page-size-select/page-size-select.component.js +207 -0
- package/dist/collection/components/molecules/page-size-select/page-size-select.component.js.map +1 -0
- package/dist/collection/components/molecules/pagination/pagination.component.css +1 -3
- package/dist/collection/components/molecules/pagination/pagination.component.js +119 -94
- package/dist/collection/components/molecules/pagination/pagination.component.js.map +1 -0
- package/dist/collection/components/molecules/profile/profile.component.css +1 -36
- package/dist/collection/components/molecules/profile/profile.component.js +66 -68
- package/dist/collection/components/molecules/profile/profile.component.js.map +1 -0
- package/dist/collection/components/molecules/select/select.component.css +1 -0
- package/dist/collection/components/molecules/select/select.component.js +739 -0
- package/dist/collection/components/molecules/select/select.component.js.map +1 -0
- package/dist/collection/components/molecules/stepper/stepper.component.css +1 -12
- package/dist/collection/components/molecules/stepper/stepper.component.js +120 -85
- package/dist/collection/components/molecules/stepper/stepper.component.js.map +1 -0
- package/dist/collection/components/molecules/table-cell/table-cell.component.css +1 -0
- package/dist/collection/components/molecules/table-cell/table-cell.component.js +306 -0
- package/dist/collection/components/molecules/table-cell/table-cell.component.js.map +1 -0
- package/dist/collection/components/molecules/table-footer/table-footer.component.css +1 -0
- package/dist/collection/components/molecules/table-footer/table-footer.component.js +276 -0
- package/dist/collection/components/molecules/table-footer/table-footer.component.js.map +1 -0
- package/dist/collection/components/molecules/table-header/table-header.component.css +1 -0
- package/dist/collection/components/molecules/table-header/table-header.component.js +452 -0
- package/dist/collection/components/molecules/table-header/table-header.component.js.map +1 -0
- package/dist/collection/components/molecules/table-row/table-row.component.css +1 -0
- package/dist/collection/components/molecules/table-row/table-row.component.js +65 -0
- package/dist/collection/components/molecules/table-row/table-row.component.js.map +1 -0
- package/dist/collection/components/molecules/toast/toast.component.css +1 -0
- package/dist/collection/components/molecules/toast/toast.component.js +197 -0
- package/dist/collection/components/molecules/toast/toast.component.js.map +1 -0
- package/dist/collection/components/organisms/drawer/drawer.component.css +1 -0
- package/dist/collection/components/organisms/drawer/drawer.component.js +234 -0
- package/dist/collection/components/organisms/drawer/drawer.component.js.map +1 -0
- package/dist/collection/components/organisms/modal/modal.component.js +228 -144
- package/dist/collection/components/organisms/modal/modal.component.js.map +1 -0
- package/dist/collection/components/organisms/navbar/navbar.component.css +1 -56
- package/dist/collection/components/organisms/navbar/navbar.component.js +72 -81
- package/dist/collection/components/organisms/navbar/navbar.component.js.map +1 -0
- package/dist/collection/components/organisms/table/table.component.css +1 -0
- package/dist/collection/components/organisms/table/table.component.js +1300 -0
- package/dist/collection/components/organisms/table/table.component.js.map +1 -0
- package/dist/collection/index.js +3 -1
- package/dist/collection/index.js.map +1 -0
- package/dist/collection/tailwind/animation.js +72 -2
- package/dist/collection/tailwind/border-radius.js +1 -0
- package/dist/collection/tailwind/height.js +5 -0
- package/dist/collection/tailwind/plugins/safe-area.js +98 -0
- package/dist/collection/tailwind/screens.js +6 -6
- package/dist/collection/tailwind/shadows.js +2 -0
- package/dist/collection/tailwind/width.js +15 -13
- package/dist/collection/tailwind/z-index.js +15 -1
- package/dist/collection/tailwind.config.js +9 -2
- package/dist/collection/types/index.js +3 -0
- package/dist/collection/types/index.js.map +1 -0
- package/dist/collection/types/table.js +4 -0
- package/dist/collection/types/table.js.map +1 -0
- package/dist/collection/types/tailwind.js +2 -0
- package/dist/collection/types/tailwind.js.map +1 -0
- package/dist/collection/utils/child-of.js +1 -0
- package/dist/collection/utils/child-of.js.map +1 -0
- package/dist/collection/utils/icons.js +7 -0
- package/dist/collection/utils/icons.js.map +1 -0
- package/dist/collection/utils/illustrations.js +7 -0
- package/dist/collection/utils/illustrations.js.map +1 -0
- package/dist/collection/utils/index.js +7 -0
- package/dist/collection/utils/index.js.map +1 -0
- package/dist/collection/utils/localization.js +56 -0
- package/dist/collection/utils/localization.js.map +1 -0
- package/dist/collection/utils/object-get-by-path.js +9 -0
- package/dist/collection/utils/object-get-by-path.js.map +1 -0
- package/dist/collection/utils/transformers.js +5 -0
- package/dist/collection/utils/transformers.js.map +1 -0
- package/dist/components/backdrop.component.js +59 -0
- package/dist/components/backdrop.component.js.map +1 -0
- package/dist/components/button.component.js +16 -33
- package/dist/components/button.component.js.map +1 -0
- package/dist/components/calendar.component.js +3031 -0
- package/dist/components/calendar.component.js.map +1 -0
- package/dist/components/child-of.js +9 -0
- package/dist/components/child-of.js.map +1 -0
- package/dist/components/counter.component.js +4 -8
- package/dist/components/counter.component.js.map +1 -0
- package/dist/components/divider.component.js +4 -2
- package/dist/components/divider.component.js.map +1 -0
- package/dist/components/drawer-body.component.js +35 -0
- package/dist/components/drawer-body.component.js.map +1 -0
- package/dist/components/drawer-container.component.js +34 -0
- package/dist/components/drawer-container.component.js.map +1 -0
- package/dist/components/drawer-header.component.js +54 -0
- package/dist/components/drawer-header.component.js.map +1 -0
- package/dist/components/dropdown-menu-container.component.js +11 -4
- package/dist/components/dropdown-menu-container.component.js.map +1 -0
- package/dist/components/dropdown-menu-item.component.js +45 -0
- package/dist/components/dropdown-menu-item.component.js.map +1 -0
- package/dist/components/dropdown.component.js +77 -72
- package/dist/components/dropdown.component.js.map +1 -0
- package/dist/components/floating-ui.dom.esm.js +1327 -0
- package/dist/components/floating-ui.dom.esm.js.map +1 -0
- package/dist/components/helper.component.js +4 -5
- package/dist/components/helper.component.js.map +1 -0
- package/dist/components/icon.component.js +62 -60
- package/dist/components/icon.component.js.map +1 -0
- package/dist/{cjs/p-illustration.cjs.entry.js → components/illustration.component.js} +247 -16
- package/dist/components/illustration.component.js.map +1 -0
- package/dist/components/index.d.ts +9 -45
- package/dist/components/index.js +13 -43
- package/dist/components/index.js.map +1 -0
- package/dist/components/input-error.component.js +50 -0
- package/dist/components/input-error.component.js.map +1 -0
- package/dist/components/input-group.component.js +172 -0
- package/dist/components/input-group.component.js.map +1 -0
- package/dist/components/label.component.js +54 -0
- package/dist/components/label.component.js.map +1 -0
- package/dist/components/loader.component.js +12 -14
- package/dist/components/loader.component.js.map +1 -0
- package/dist/components/localization.js +59 -0
- package/dist/components/localization.js.map +1 -0
- package/dist/components/modal-body.component.js +8 -7
- package/dist/components/modal-body.component.js.map +1 -0
- package/dist/components/modal-container.component.js +8 -7
- package/dist/components/modal-container.component.js.map +1 -0
- package/dist/components/modal-footer.component.js +6 -10
- package/dist/components/modal-footer.component.js.map +1 -0
- package/dist/components/modal-header.component.js +21 -10
- package/dist/components/modal-header.component.js.map +1 -0
- package/dist/components/object-get-by-path.js +16 -0
- package/dist/components/object-get-by-path.js.map +1 -0
- package/dist/components/p-accordion.js +5 -11
- package/dist/components/p-accordion.js.map +1 -0
- package/dist/components/{p-modal-backdrop.d.ts → p-attachment.d.ts} +4 -4
- package/dist/components/p-attachment.js +88 -0
- package/dist/components/p-attachment.js.map +1 -0
- package/dist/components/p-avatar-group.js +5 -2
- package/dist/components/p-avatar-group.js.map +1 -0
- package/dist/components/p-avatar.js +59 -1
- package/dist/components/p-avatar.js.map +1 -0
- package/dist/components/p-backdrop.d.ts +11 -0
- package/dist/components/p-backdrop.js +8 -0
- package/dist/components/p-backdrop.js.map +1 -0
- package/dist/components/p-button.js +2 -0
- package/dist/components/p-button.js.map +1 -0
- package/dist/components/p-calendar.d.ts +11 -0
- package/dist/components/p-calendar.js +8 -0
- package/dist/components/p-calendar.js.map +1 -0
- package/dist/components/p-card-body.js +4 -5
- package/dist/components/p-card-body.js.map +1 -0
- package/dist/components/p-card-container.js +4 -8
- package/dist/components/p-card-container.js.map +1 -0
- package/dist/components/p-card-header.js +5 -5
- package/dist/components/p-card-header.js.map +1 -0
- package/dist/components/p-content-slider.js +128 -58
- package/dist/components/p-content-slider.js.map +1 -0
- package/dist/components/p-counter.js +2 -0
- package/dist/components/p-counter.js.map +1 -0
- package/dist/components/p-datepicker.d.ts +11 -0
- package/dist/components/p-datepicker.js +3125 -0
- package/dist/components/p-datepicker.js.map +1 -0
- package/dist/components/p-divider.js +2 -0
- package/dist/components/p-divider.js.map +1 -0
- package/dist/components/p-drawer-body.d.ts +11 -0
- package/dist/components/p-drawer-body.js +8 -0
- package/dist/components/p-drawer-body.js.map +1 -0
- package/dist/components/p-drawer-container.d.ts +11 -0
- package/dist/components/p-drawer-container.js +8 -0
- package/dist/components/p-drawer-container.js.map +1 -0
- package/dist/components/p-drawer-header.d.ts +11 -0
- package/dist/components/p-drawer-header.js +8 -0
- package/dist/components/p-drawer-header.js.map +1 -0
- package/dist/components/p-drawer.d.ts +11 -0
- package/dist/components/p-drawer.js +130 -0
- package/dist/components/p-drawer.js.map +1 -0
- package/dist/components/p-dropdown-menu-container.js +2 -0
- package/dist/components/p-dropdown-menu-container.js.map +1 -0
- package/dist/components/p-dropdown-menu-item.js +3 -41
- package/dist/components/p-dropdown-menu-item.js.map +1 -0
- package/dist/components/p-dropdown.js +2 -0
- package/dist/components/p-dropdown.js.map +1 -0
- package/dist/components/p-helper.js +2 -0
- package/dist/components/p-helper.js.map +1 -0
- package/dist/components/p-icon.js +2 -0
- package/dist/components/p-icon.js.map +1 -0
- package/dist/components/p-illustration.js +3 -1435
- package/dist/components/p-illustration.js.map +1 -0
- package/dist/components/p-info-panel.js +6 -8
- package/dist/components/p-info-panel.js.map +1 -0
- package/dist/components/p-input-error.d.ts +11 -0
- package/dist/components/p-input-error.js +8 -0
- package/dist/components/p-input-error.js.map +1 -0
- package/dist/components/p-input-group.js +3 -91
- package/dist/components/p-input-group.js.map +1 -0
- package/dist/components/{p-tag.d.ts → p-label.d.ts} +4 -4
- package/dist/components/p-label.js +8 -0
- package/dist/components/p-label.js.map +1 -0
- package/dist/components/p-layout.js +4 -5
- package/dist/components/p-layout.js.map +1 -0
- package/dist/components/p-loader.js +2 -0
- package/dist/components/p-loader.js.map +1 -0
- package/dist/components/p-modal-body.js +2 -0
- package/dist/components/p-modal-body.js.map +1 -0
- package/dist/components/p-modal-container.js +2 -0
- package/dist/components/p-modal-container.js.map +1 -0
- package/dist/components/p-modal-footer.js +2 -0
- package/dist/components/p-modal-footer.js.map +1 -0
- package/dist/components/p-modal-header.js +2 -0
- package/dist/components/p-modal-header.js.map +1 -0
- package/dist/components/p-modal.js +55 -26
- package/dist/components/p-modal.js.map +1 -0
- package/dist/components/p-navbar.js +12 -10
- package/dist/components/p-navbar.js.map +1 -0
- package/dist/components/p-navigation-item.js +8 -5
- package/dist/components/p-navigation-item.js.map +1 -0
- package/dist/components/p-page-size-select.d.ts +11 -0
- package/dist/components/p-page-size-select.js +8 -0
- package/dist/components/p-page-size-select.js.map +1 -0
- package/dist/components/p-pagination-item.js +2 -0
- package/dist/components/p-pagination-item.js.map +1 -0
- package/dist/components/p-pagination.js +3 -195
- package/dist/components/p-pagination.js.map +1 -0
- package/dist/components/p-profile.js +15 -22
- package/dist/components/p-profile.js.map +1 -0
- package/dist/components/p-segment-container.js +3 -27
- package/dist/components/p-segment-container.js.map +1 -0
- package/dist/components/p-segment-item.js +3 -49
- package/dist/components/p-segment-item.js.map +1 -0
- package/dist/components/p-select.d.ts +11 -0
- package/dist/components/p-select.js +340 -0
- package/dist/components/p-select.js.map +1 -0
- package/dist/components/p-slider-indicator.js +2 -0
- package/dist/components/p-slider-indicator.js.map +1 -0
- package/dist/components/p-status.js +7 -5
- package/dist/components/p-status.js.map +1 -0
- package/dist/components/p-stepper-item.js +47 -1
- package/dist/components/p-stepper-item.js.map +1 -0
- package/dist/components/p-stepper-line.js +2 -0
- package/dist/components/p-stepper-line.js.map +1 -0
- package/dist/components/p-stepper.js +56 -58
- package/dist/components/p-stepper.js.map +1 -0
- package/dist/components/p-tab-group.js +4 -5
- package/dist/components/p-tab-group.js.map +1 -0
- package/dist/components/p-tab-item.js +4 -5
- package/dist/components/p-tab-item.js.map +1 -0
- package/dist/components/p-table-cell.d.ts +11 -0
- package/dist/components/p-table-cell.js +8 -0
- package/dist/components/p-table-cell.js.map +1 -0
- package/dist/components/p-table-column.d.ts +11 -0
- package/dist/components/p-table-column.js +52 -0
- package/dist/components/p-table-column.js.map +1 -0
- package/dist/components/p-table-container.d.ts +11 -0
- package/dist/components/p-table-container.js +8 -0
- package/dist/components/p-table-container.js.map +1 -0
- package/dist/components/p-table-footer.d.ts +11 -0
- package/dist/components/p-table-footer.js +8 -0
- package/dist/components/p-table-footer.js.map +1 -0
- package/dist/components/p-table-header.d.ts +11 -0
- package/dist/components/p-table-header.js +8 -0
- package/dist/components/p-table-header.js.map +1 -0
- package/dist/components/p-table-row.d.ts +11 -0
- package/dist/components/p-table-row.js +8 -0
- package/dist/components/p-table-row.js.map +1 -0
- package/dist/components/p-table.d.ts +11 -0
- package/dist/components/p-table.js +552 -0
- package/dist/components/p-table.js.map +1 -0
- package/dist/components/p-toast-container.d.ts +11 -0
- package/dist/components/p-toast-container.js +38 -0
- package/dist/components/p-toast-container.js.map +1 -0
- package/dist/components/p-toast.d.ts +11 -0
- package/dist/components/p-toast.js +75 -0
- package/dist/components/p-toast.js.map +1 -0
- package/dist/components/p-tooltip.js +2 -0
- package/dist/components/p-tooltip.js.map +1 -0
- package/dist/components/page-size-select.component.js +107 -0
- package/dist/components/page-size-select.component.js.map +1 -0
- package/dist/components/pagination-item.component.js +4 -5
- package/dist/components/pagination-item.component.js.map +1 -0
- package/dist/components/pagination.component.js +196 -0
- package/dist/components/pagination.component.js.map +1 -0
- package/dist/components/segment-container.component.js +31 -0
- package/dist/components/segment-container.component.js.map +1 -0
- package/dist/components/segment-item.component.js +53 -0
- package/dist/components/segment-item.component.js.map +1 -0
- package/dist/components/slider-indicator.component.js +4 -5
- package/dist/components/slider-indicator.component.js.map +1 -0
- package/dist/components/stepper-line.component.js +4 -8
- package/dist/components/stepper-line.component.js.map +1 -0
- package/dist/components/table-cell.component.js +179 -0
- package/dist/components/table-cell.component.js.map +1 -0
- package/dist/components/table-container.component.js +32 -0
- package/dist/components/table-container.component.js.map +1 -0
- package/dist/components/table-footer.component.js +129 -0
- package/dist/components/table-footer.component.js.map +1 -0
- package/dist/components/table-header.component.js +1070 -0
- package/dist/components/table-header.component.js.map +1 -0
- package/dist/components/table-row.component.js +45 -0
- package/dist/components/table-row.component.js.map +1 -0
- package/dist/components/tooltip.component.js +60 -61
- package/dist/components/tooltip.component.js.map +1 -0
- package/dist/esm/child-of-90a8c4b5.js +9 -0
- package/dist/esm/child-of-90a8c4b5.js.map +1 -0
- package/dist/esm/constants-826f9460.js +6 -0
- package/dist/esm/constants-826f9460.js.map +1 -0
- package/dist/esm/floating-ui.dom.esm-314a52b2.js +1327 -0
- package/dist/esm/floating-ui.dom.esm-314a52b2.js.map +1 -0
- package/dist/esm/{index-ba915982.js → index-2c1bdb40.js} +981 -340
- package/dist/esm/index-2c1bdb40.js.map +1 -0
- package/dist/esm/index-934ac6da.js +2300 -0
- package/dist/esm/index-934ac6da.js.map +1 -0
- package/dist/esm/index.js +11 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/loader.js +6 -3
- package/dist/esm/loader.js.map +1 -0
- package/dist/esm/localization-901dc2d3.js +59 -0
- package/dist/esm/localization-901dc2d3.js.map +1 -0
- package/dist/esm/object-get-by-path-8f4f94b8.js +16 -0
- package/dist/esm/object-get-by-path-8f4f94b8.js.map +1 -0
- package/dist/esm/p-accordion.entry.js +5 -11
- package/dist/esm/p-accordion.entry.js.map +1 -0
- package/dist/esm/p-attachment.entry.js +35 -0
- package/dist/esm/p-attachment.entry.js.map +1 -0
- package/dist/esm/p-avatar-group.entry.js +5 -2
- package/dist/esm/p-avatar-group.entry.js.map +1 -0
- package/dist/esm/p-avatar.entry.js +41 -0
- package/dist/esm/p-avatar.entry.js.map +1 -0
- package/dist/esm/p-backdrop.entry.js +39 -0
- package/dist/esm/p-backdrop.entry.js.map +1 -0
- package/dist/esm/p-button_3.entry.js +127 -148
- package/dist/esm/p-button_3.entry.js.map +1 -0
- package/dist/esm/p-calendar.entry.js +699 -0
- package/dist/esm/p-calendar.entry.js.map +1 -0
- package/dist/esm/p-card-body.entry.js +4 -5
- package/dist/esm/p-card-body.entry.js.map +1 -0
- package/dist/esm/p-card-container.entry.js +4 -8
- package/dist/esm/p-card-container.entry.js.map +1 -0
- package/dist/esm/p-card-header.entry.js +5 -5
- package/dist/esm/p-card-header.entry.js.map +1 -0
- package/dist/esm/p-content-slider.entry.js +126 -57
- package/dist/esm/p-content-slider.entry.js.map +1 -0
- package/dist/esm/p-counter.entry.js +4 -8
- package/dist/esm/p-counter.entry.js.map +1 -0
- package/dist/esm/p-datepicker.entry.js +3039 -0
- package/dist/esm/p-datepicker.entry.js.map +1 -0
- package/dist/esm/p-divider.entry.js +4 -2
- package/dist/esm/p-divider.entry.js.map +1 -0
- package/dist/esm/p-drawer-body_3.entry.js +45 -0
- package/dist/esm/p-drawer-body_3.entry.js.map +1 -0
- package/dist/esm/p-drawer.entry.js +61 -0
- package/dist/esm/p-drawer.entry.js.map +1 -0
- package/dist/esm/p-dropdown-menu-container.entry.js +7 -3
- package/dist/esm/p-dropdown-menu-container.entry.js.map +1 -0
- package/dist/esm/p-dropdown_2.entry.js +158 -0
- package/dist/esm/p-dropdown_2.entry.js.map +1 -0
- package/dist/esm/p-helper_3.entry.js +144 -0
- package/dist/esm/p-helper_3.entry.js.map +1 -0
- package/dist/esm/{p-illustration.entry.js → p-illustration_6.entry.js} +1417 -8
- package/dist/esm/p-illustration_6.entry.js.map +1 -0
- package/dist/esm/p-info-panel.entry.js +6 -8
- package/dist/esm/p-info-panel.entry.js.map +1 -0
- package/dist/esm/p-label_3.entry.js +59 -0
- package/dist/esm/p-label_3.entry.js.map +1 -0
- package/dist/esm/p-layout.entry.js +4 -5
- package/dist/esm/p-layout.entry.js.map +1 -0
- package/dist/esm/p-modal-body_4.entry.js +72 -0
- package/dist/esm/p-modal-body_4.entry.js.map +1 -0
- package/dist/esm/p-modal.entry.js +34 -21
- package/dist/esm/p-modal.entry.js.map +1 -0
- package/dist/esm/p-navbar.entry.js +5 -9
- package/dist/esm/p-navbar.entry.js.map +1 -0
- package/dist/esm/p-navigation-item.entry.js +8 -5
- package/dist/esm/p-navigation-item.entry.js.map +1 -0
- package/dist/esm/p-page-size-select_3.entry.js +218 -0
- package/dist/esm/p-page-size-select_3.entry.js.map +1 -0
- package/dist/esm/p-profile.entry.js +14 -15
- package/dist/esm/p-profile.entry.js.map +1 -0
- package/dist/esm/p-select.entry.js +241 -0
- package/dist/esm/p-select.entry.js.map +1 -0
- package/dist/esm/p-slider-indicator.entry.js +4 -5
- package/dist/esm/p-slider-indicator.entry.js.map +1 -0
- package/dist/esm/p-status.entry.js +7 -5
- package/dist/esm/p-status.entry.js.map +1 -0
- package/dist/esm/p-stepper-item.entry.js +22 -0
- package/dist/esm/p-stepper-item.entry.js.map +1 -0
- package/dist/esm/p-stepper-line.entry.js +19 -0
- package/dist/esm/p-stepper-line.entry.js.map +1 -0
- package/dist/esm/p-stepper.entry.js +53 -44
- package/dist/esm/p-stepper.entry.js.map +1 -0
- package/dist/esm/p-tab-group.entry.js +11 -10
- package/dist/esm/p-tab-group.entry.js.map +1 -0
- package/dist/esm/p-tab-item.entry.js +4 -5
- package/dist/esm/p-tab-item.entry.js.map +1 -0
- package/dist/esm/p-table-column.entry.js +26 -0
- package/dist/esm/p-table-column.entry.js.map +1 -0
- package/dist/esm/p-table.entry.js +356 -0
- package/dist/esm/p-table.entry.js.map +1 -0
- package/dist/esm/p-toast-container.entry.js +18 -0
- package/dist/esm/p-toast-container.entry.js.map +1 -0
- package/dist/esm/p-toast.entry.js +31 -0
- package/dist/esm/p-toast.entry.js.map +1 -0
- package/dist/esm/p-tooltip.entry.js +59 -61
- package/dist/esm/p-tooltip.entry.js.map +1 -0
- package/dist/esm/paperless.js +9 -3
- package/dist/esm/paperless.js.map +1 -0
- package/dist/esm/polyfills/css-shim.js +1 -1
- package/dist/index.html +1 -1
- package/dist/paperless/index.esm.js +2 -0
- package/dist/paperless/index.esm.js.map +1 -0
- package/dist/paperless/p-07259c61.entry.js +2 -0
- package/dist/paperless/p-07259c61.entry.js.map +1 -0
- package/dist/paperless/p-10106f7d.entry.js +2 -0
- package/dist/paperless/p-10106f7d.entry.js.map +1 -0
- package/dist/paperless/p-158f1e1a.entry.js +2 -0
- package/dist/paperless/p-158f1e1a.entry.js.map +1 -0
- package/dist/paperless/p-195632a8.entry.js +2 -0
- package/dist/paperless/p-195632a8.entry.js.map +1 -0
- package/dist/paperless/p-1f55126f.entry.js +2 -0
- package/dist/paperless/p-1f55126f.entry.js.map +1 -0
- package/dist/paperless/p-26da620b.entry.js +2 -0
- package/dist/paperless/p-26da620b.entry.js.map +1 -0
- package/dist/paperless/p-350d452b.entry.js +2 -0
- package/dist/paperless/p-350d452b.entry.js.map +1 -0
- package/dist/paperless/p-47e461b7.entry.js +2 -0
- package/dist/paperless/p-47e461b7.entry.js.map +1 -0
- package/dist/paperless/p-4c51a801.entry.js +2 -0
- package/dist/paperless/p-4c51a801.entry.js.map +1 -0
- package/dist/paperless/p-4e650fe4.js +2 -0
- package/dist/paperless/p-4e650fe4.js.map +1 -0
- package/dist/paperless/p-51408aca.entry.js +2 -0
- package/dist/paperless/p-51408aca.entry.js.map +1 -0
- package/dist/paperless/p-594b28a7.entry.js +2 -0
- package/dist/paperless/p-594b28a7.entry.js.map +1 -0
- package/dist/paperless/p-5c7b20a3.entry.js +2 -0
- package/dist/paperless/p-5c7b20a3.entry.js.map +1 -0
- package/dist/paperless/p-66c83538.entry.js +2 -0
- package/dist/paperless/p-66c83538.entry.js.map +1 -0
- package/dist/paperless/p-66cb2b3e.entry.js +2 -0
- package/dist/paperless/p-66cb2b3e.entry.js.map +1 -0
- package/dist/paperless/p-66f77c63.entry.js +2 -0
- package/dist/paperless/p-66f77c63.entry.js.map +1 -0
- package/dist/paperless/p-6c60fd3d.js +2 -0
- package/dist/paperless/p-6c60fd3d.js.map +1 -0
- package/dist/paperless/p-6ccf5cdd.js +3 -0
- package/dist/paperless/p-6ccf5cdd.js.map +1 -0
- package/dist/paperless/p-6d5aa646.entry.js +2 -0
- package/dist/paperless/p-6d5aa646.entry.js.map +1 -0
- package/dist/paperless/p-6f1352e0.entry.js +2 -0
- package/dist/paperless/p-6f1352e0.entry.js.map +1 -0
- package/dist/paperless/p-70122dbc.entry.js +2 -0
- package/dist/paperless/p-70122dbc.entry.js.map +1 -0
- package/dist/paperless/p-7818a850.entry.js +2 -0
- package/dist/paperless/p-7818a850.entry.js.map +1 -0
- package/dist/paperless/p-872b50b6.entry.js +2 -0
- package/dist/paperless/p-872b50b6.entry.js.map +1 -0
- package/dist/paperless/p-8a6728d5.js +2 -0
- package/dist/paperless/p-8a6728d5.js.map +1 -0
- package/dist/paperless/p-910bd6bc.entry.js +2 -0
- package/dist/paperless/p-910bd6bc.entry.js.map +1 -0
- package/dist/paperless/p-91725831.entry.js +2 -0
- package/dist/paperless/p-91725831.entry.js.map +1 -0
- package/dist/paperless/p-a1c1d95b.entry.js +2 -0
- package/dist/paperless/p-a1c1d95b.entry.js.map +1 -0
- package/dist/paperless/p-a23ea8fe.entry.js +2 -0
- package/dist/paperless/p-a23ea8fe.entry.js.map +1 -0
- package/dist/paperless/p-abcd80e9.entry.js +2 -0
- package/dist/paperless/p-abcd80e9.entry.js.map +1 -0
- package/dist/paperless/p-ae248aef.js +2 -0
- package/dist/paperless/p-ae248aef.js.map +1 -0
- package/dist/paperless/p-b5ce8cd4.entry.js +2 -0
- package/dist/paperless/p-b5ce8cd4.entry.js.map +1 -0
- package/dist/paperless/p-b7c41365.entry.js +2 -0
- package/dist/paperless/p-b7c41365.entry.js.map +1 -0
- package/dist/paperless/p-bf0eca4f.entry.js +2 -0
- package/dist/paperless/p-bf0eca4f.entry.js.map +1 -0
- package/dist/paperless/p-c667366d.entry.js +2 -0
- package/dist/paperless/p-c667366d.entry.js.map +1 -0
- package/dist/paperless/p-cbdabede.entry.js +2 -0
- package/dist/paperless/p-cbdabede.entry.js.map +1 -0
- package/dist/paperless/p-ce1abd74.entry.js +2 -0
- package/dist/paperless/p-ce1abd74.entry.js.map +1 -0
- package/dist/paperless/p-ce443f5b.entry.js +2 -0
- package/dist/paperless/p-ce443f5b.entry.js.map +1 -0
- package/dist/paperless/p-d393493c.entry.js +2 -0
- package/dist/paperless/p-d393493c.entry.js.map +1 -0
- package/dist/paperless/p-da0dd04e.entry.js +2 -0
- package/dist/paperless/p-da0dd04e.entry.js.map +1 -0
- package/dist/paperless/p-da2426c7.js +2 -0
- package/dist/paperless/p-da2426c7.js.map +1 -0
- package/dist/paperless/p-da6e5abd.entry.js +2 -0
- package/dist/paperless/p-da6e5abd.entry.js.map +1 -0
- package/dist/paperless/p-e17560e6.entry.js +2 -0
- package/dist/paperless/p-e17560e6.entry.js.map +1 -0
- package/dist/paperless/p-e1da7376.entry.js +2 -0
- package/dist/paperless/p-e1da7376.entry.js.map +1 -0
- package/dist/paperless/p-e9a1b51e.entry.js +2 -0
- package/dist/paperless/p-e9a1b51e.entry.js.map +1 -0
- package/dist/paperless/p-ec850aca.entry.js +2 -0
- package/dist/paperless/p-ec850aca.entry.js.map +1 -0
- package/dist/paperless/p-ed6edf0a.entry.js +2 -0
- package/dist/paperless/p-ed6edf0a.entry.js.map +1 -0
- package/dist/paperless/p-f7d67c36.entry.js +2 -0
- package/dist/paperless/p-f7d67c36.entry.js.map +1 -0
- package/dist/paperless/p-faee8450.entry.js +2 -0
- package/dist/paperless/p-faee8450.entry.js.map +1 -0
- package/dist/paperless/p-fef32402.js +2 -0
- package/dist/paperless/p-fef32402.js.map +1 -0
- package/dist/paperless/paperless.css +1003 -801
- package/dist/paperless/paperless.esm.js +2 -1
- package/dist/paperless/paperless.esm.js.map +1 -0
- package/dist/style/_fonts.scss +70 -0
- package/dist/style/_helpers.scss +5 -0
- package/dist/style/_mixins.scss +1 -0
- package/dist/style/_reset.scss +30 -0
- package/dist/style/_tailwind.scss +3 -0
- package/dist/style/_typograhpy.scss +29 -0
- package/dist/style/_variables.scss +2 -0
- package/dist/style/form/_checkbox.scss +111 -0
- package/dist/style/form/_input.scss +31 -0
- package/dist/style/form/_mixins.scss +114 -0
- package/dist/style/form/_radio.scss +58 -0
- package/dist/style/form/_textarea.scss +18 -0
- package/dist/style/form/index.scss +4 -0
- package/dist/style/mixins/_scrollbar.scss +32 -0
- package/dist/style/paperless.scss +12 -0
- package/dist/sw.js +1 -1
- package/dist/sw.js.map +1 -1
- package/dist/tailwind/animation.js +72 -2
- package/dist/tailwind/border-radius.js +1 -0
- package/dist/tailwind/height.js +5 -0
- package/dist/tailwind/plugins/safe-area.js +98 -0
- package/dist/tailwind/screens.js +6 -6
- package/dist/tailwind/shadows.js +2 -0
- package/dist/tailwind/width.js +15 -13
- package/dist/tailwind/z-index.js +15 -1
- package/dist/tailwind.config.js +9 -2
- package/dist/types/components/atoms/avatar/avatar.component.d.ts +3 -1
- package/dist/types/components/atoms/backdrop/backdrop.component.d.ts +31 -0
- package/dist/types/components/atoms/button/button.component.d.ts +5 -5
- package/dist/types/components/atoms/drawer-body/drawer-body.component.d.ts +7 -0
- package/dist/types/components/atoms/drawer-container/drawer-container.component.d.ts +7 -0
- package/dist/types/components/atoms/drawer-header/drawer-header.component.d.ts +12 -0
- package/dist/types/components/atoms/dropdown-menu-container/dropdown-menu-container.component.d.ts +8 -0
- package/dist/types/components/atoms/dropdown-menu-item/dropdown-menu-item.component.d.ts +4 -0
- package/dist/types/components/atoms/helper/helper.component.d.ts +1 -1
- package/dist/types/components/atoms/icon/icon.component.d.ts +3 -3
- package/dist/types/components/atoms/illustration/illustration.component.d.ts +1 -1
- package/dist/types/components/atoms/label/label.component.d.ts +33 -0
- package/dist/types/components/atoms/loader/loader.component.d.ts +1 -1
- package/dist/types/components/atoms/modal-body/modal-body.component.d.ts +4 -0
- package/dist/types/components/atoms/modal-container/modal-container.component.d.ts +4 -0
- package/dist/types/components/atoms/modal-footer/modal-footer.component.d.ts +0 -4
- package/dist/types/components/atoms/modal-header/modal-header.component.d.ts +1 -1
- package/dist/types/components/atoms/segment-item/segment-item.component.d.ts +1 -1
- package/dist/types/components/atoms/status/status.component.d.ts +1 -1
- package/dist/types/components/atoms/stepper-item/stepper-item.component.d.ts +4 -0
- package/dist/types/components/atoms/table-container/table-container.component.d.ts +3 -0
- package/dist/types/components/atoms/toast-container/toast-container.component.d.ts +7 -0
- package/dist/types/components/atoms/tooltip/tooltip.component.d.ts +10 -5
- package/dist/types/components/helpers/table-column/table-column.component.d.ts +42 -0
- package/dist/types/components/molecules/attachment/attachment.component.d.ts +28 -0
- package/dist/types/components/molecules/calendar/calendar.component.d.ts +76 -0
- package/dist/types/components/molecules/content-slider/content-slider.component.d.ts +17 -5
- package/dist/types/components/molecules/datepicker/datepicker.component.d.ts +97 -0
- package/dist/types/components/molecules/dropdown/dropdown.component.d.ts +29 -6
- package/dist/types/components/molecules/input-error/input-error.component.d.ts +12 -0
- package/dist/types/components/molecules/input-group/input-group.component.d.ts +22 -3
- package/dist/types/components/molecules/page-size-select/constants.d.ts +2 -0
- package/dist/types/components/molecules/page-size-select/page-size-select.component.d.ts +50 -0
- package/dist/types/components/molecules/pagination/pagination.component.d.ts +7 -0
- package/dist/types/components/molecules/profile/profile.component.d.ts +2 -1
- package/dist/types/components/molecules/select/select.component.d.ts +141 -0
- package/dist/types/components/molecules/stepper/stepper.component.d.ts +5 -2
- package/dist/types/components/molecules/table-cell/table-cell.component.d.ts +42 -0
- package/dist/types/components/molecules/table-footer/table-footer.component.d.ts +63 -0
- package/dist/types/components/molecules/table-header/table-header.component.d.ts +101 -0
- package/dist/types/components/molecules/table-row/table-row.component.d.ts +11 -0
- package/dist/types/components/molecules/toast/toast.component.d.ts +39 -0
- package/dist/types/components/organisms/drawer/drawer.component.d.ts +52 -0
- package/dist/types/components/organisms/modal/modal.component.d.ts +24 -4
- package/dist/types/components/organisms/table/table.component.d.ts +240 -0
- package/dist/types/components.d.ts +2507 -534
- package/dist/types/index.d.ts +2 -0
- package/dist/types/stencil-public-runtime.d.ts +92 -19
- package/dist/types/types/index.d.ts +2 -0
- package/dist/types/types/table.d.ts +29 -0
- package/dist/types/types/tailwind.d.ts +2 -0
- package/dist/types/utils/icons.d.ts +3 -0
- package/dist/types/utils/illustrations.d.ts +3 -0
- package/dist/types/utils/index.d.ts +6 -0
- package/dist/types/utils/localization.d.ts +2 -0
- package/dist/types/utils/object-get-by-path.d.ts +1 -0
- package/dist/types/utils/transformers.d.ts +2 -0
- package/dist/{workbox-5fe694da.js → workbox-bc53c9ad.js} +2 -2
- package/dist/workbox-bc53c9ad.js.map +1 -0
- package/hydrate/index.d.ts +218 -0
- package/hydrate/index.js +21121 -0
- package/hydrate/package.json +6 -0
- package/loader/index.d.ts +9 -0
- package/loader/package.json +1 -0
- package/package.json +24 -18
- package/dist/build/p-1b98288f.entry.js +0 -1
- package/dist/build/p-25198b24.entry.js +0 -1
- package/dist/build/p-2a0959e5.entry.js +0 -1
- package/dist/build/p-2dd556e2.entry.js +0 -1
- package/dist/build/p-407db966.entry.js +0 -1
- package/dist/build/p-4d70ec7d.js +0 -2
- package/dist/build/p-5a1c29a0.entry.js +0 -1
- package/dist/build/p-5ad4da43.entry.js +0 -1
- package/dist/build/p-5cf00406.entry.js +0 -1
- package/dist/build/p-5f8b8548.entry.js +0 -1
- package/dist/build/p-647a5ce0.entry.js +0 -1
- package/dist/build/p-699ee4c5.entry.js +0 -1
- package/dist/build/p-727d7075.entry.js +0 -1
- package/dist/build/p-737b61be.entry.js +0 -1
- package/dist/build/p-769abdaf.entry.js +0 -1
- package/dist/build/p-99fbfb12.entry.js +0 -1
- package/dist/build/p-9dc4800e.entry.js +0 -1
- package/dist/build/p-9ed56df0.entry.js +0 -1
- package/dist/build/p-a7086ffa.js +0 -1
- package/dist/build/p-a8f73335.entry.js +0 -1
- package/dist/build/p-aff4af15.entry.js +0 -1
- package/dist/build/p-b4afb81b.entry.js +0 -1
- package/dist/build/p-b54edf07.entry.js +0 -1
- package/dist/build/p-b626b4bc.entry.js +0 -1
- package/dist/build/p-baba639b.entry.js +0 -1
- package/dist/build/p-c4c7c07b.entry.js +0 -1
- package/dist/build/p-d676fecf.entry.js +0 -1
- package/dist/build/p-d7f022ac.entry.js +0 -1
- package/dist/build/p-db62fa0f.entry.js +0 -1
- package/dist/build/p-e1937315.entry.js +0 -1
- package/dist/build/p-e879da02.entry.js +0 -1
- package/dist/build/p-eedc960d.entry.js +0 -1
- package/dist/build/p-f560b80f.entry.js +0 -1
- package/dist/build/p-f9ef9d25.entry.js +0 -1
- package/dist/build/p-fa6d3cee.entry.js +0 -1
- package/dist/build/p-faf607d9.entry.js +0 -1
- package/dist/cjs/p-avatar_2.cjs.entry.js +0 -179
- package/dist/cjs/p-dropdown-menu-item.cjs.entry.js +0 -23
- package/dist/cjs/p-helper.cjs.entry.js +0 -23
- package/dist/cjs/p-input-group.cjs.entry.js +0 -51
- package/dist/cjs/p-modal-backdrop_5.cjs.entry.js +0 -101
- package/dist/cjs/p-pagination-item.cjs.entry.js +0 -23
- package/dist/cjs/p-pagination.cjs.entry.js +0 -171
- package/dist/cjs/p-segment-container.cjs.entry.js +0 -19
- package/dist/cjs/p-segment-item.cjs.entry.js +0 -29
- package/dist/cjs/p-stepper-item_2.cjs.entry.js +0 -56
- package/dist/cjs/p-tag.cjs.entry.js +0 -27
- package/dist/cjs/popper-e0c4ed4c.js +0 -1790
- package/dist/collection/components/atoms/modal-backdrop/modal-backdrop.component.css +0 -7
- package/dist/collection/components/atoms/modal-backdrop/modal-backdrop.component.js +0 -15
- package/dist/collection/components/atoms/tab-group/tab-group.component.css +0 -9
- package/dist/collection/components/atoms/tag/tag.component.css +0 -51
- package/dist/collection/components/atoms/tag/tag.component.js +0 -64
- package/dist/collection/utils/types.js +0 -1
- package/dist/collection/utils/utils.js +0 -3
- package/dist/components/avatar.component.js +0 -54
- package/dist/components/modal-backdrop.component.js +0 -30
- package/dist/components/p-modal-backdrop.js +0 -6
- package/dist/components/p-tag.js +0 -44
- package/dist/components/popper.js +0 -1788
- package/dist/components/stepper-item.component.js +0 -57
- package/dist/esm/p-avatar_2.entry.js +0 -174
- package/dist/esm/p-dropdown-menu-item.entry.js +0 -19
- package/dist/esm/p-helper.entry.js +0 -19
- package/dist/esm/p-input-group.entry.js +0 -47
- package/dist/esm/p-modal-backdrop_5.entry.js +0 -93
- package/dist/esm/p-pagination-item.entry.js +0 -19
- package/dist/esm/p-pagination.entry.js +0 -167
- package/dist/esm/p-segment-container.entry.js +0 -15
- package/dist/esm/p-segment-item.entry.js +0 -25
- package/dist/esm/p-stepper-item_2.entry.js +0 -51
- package/dist/esm/p-tag.entry.js +0 -23
- package/dist/esm/popper-41c6f9cd.js +0 -1788
- package/dist/paperless/p-1b98288f.entry.js +0 -1
- package/dist/paperless/p-25198b24.entry.js +0 -1
- package/dist/paperless/p-2a0959e5.entry.js +0 -1
- package/dist/paperless/p-2dd556e2.entry.js +0 -1
- package/dist/paperless/p-407db966.entry.js +0 -1
- package/dist/paperless/p-4d70ec7d.js +0 -2
- package/dist/paperless/p-5a1c29a0.entry.js +0 -1
- package/dist/paperless/p-5ad4da43.entry.js +0 -1
- package/dist/paperless/p-5cf00406.entry.js +0 -1
- package/dist/paperless/p-5f8b8548.entry.js +0 -1
- package/dist/paperless/p-647a5ce0.entry.js +0 -1
- package/dist/paperless/p-699ee4c5.entry.js +0 -1
- package/dist/paperless/p-727d7075.entry.js +0 -1
- package/dist/paperless/p-737b61be.entry.js +0 -1
- package/dist/paperless/p-769abdaf.entry.js +0 -1
- package/dist/paperless/p-99fbfb12.entry.js +0 -1
- package/dist/paperless/p-9dc4800e.entry.js +0 -1
- package/dist/paperless/p-9ed56df0.entry.js +0 -1
- package/dist/paperless/p-a7086ffa.js +0 -1
- package/dist/paperless/p-a8f73335.entry.js +0 -1
- package/dist/paperless/p-aff4af15.entry.js +0 -1
- package/dist/paperless/p-b4afb81b.entry.js +0 -1
- package/dist/paperless/p-b54edf07.entry.js +0 -1
- package/dist/paperless/p-b626b4bc.entry.js +0 -1
- package/dist/paperless/p-baba639b.entry.js +0 -1
- package/dist/paperless/p-c4c7c07b.entry.js +0 -1
- package/dist/paperless/p-d676fecf.entry.js +0 -1
- package/dist/paperless/p-d7f022ac.entry.js +0 -1
- package/dist/paperless/p-db62fa0f.entry.js +0 -1
- package/dist/paperless/p-e1937315.entry.js +0 -1
- package/dist/paperless/p-e879da02.entry.js +0 -1
- package/dist/paperless/p-eedc960d.entry.js +0 -1
- package/dist/paperless/p-f560b80f.entry.js +0 -1
- package/dist/paperless/p-f9ef9d25.entry.js +0 -1
- package/dist/paperless/p-fa6d3cee.entry.js +0 -1
- package/dist/paperless/p-faf607d9.entry.js +0 -1
- package/dist/types/components/atoms/modal-backdrop/modal-backdrop.component.d.ts +0 -3
- package/dist/types/components/atoms/tag/tag.component.d.ts +0 -11
- package/dist/types/utils/types.d.ts +0 -2
- package/dist/types/utils/utils.d.ts +0 -1
- package/dist/workbox-5fe694da.js.map +0 -1
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
const NAMESPACE = 'paperless';
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* Virtual DOM patching algorithm based on Snabbdom by
|
|
5
|
+
* Simon Friis Vindum (@paldepind)
|
|
6
|
+
* Licensed under the MIT License
|
|
7
|
+
* https://github.com/snabbdom/snabbdom/blob/master/LICENSE
|
|
8
|
+
*
|
|
9
|
+
* Modified for Stencil's renderer and slot projection
|
|
10
|
+
*/
|
|
3
11
|
let scopeId;
|
|
4
12
|
let contentRef;
|
|
5
13
|
let hostTagName;
|
|
@@ -8,64 +16,6 @@ let checkSlotFallbackVisibility = false;
|
|
|
8
16
|
let checkSlotRelocate = false;
|
|
9
17
|
let isSvgMode = false;
|
|
10
18
|
let queuePending = false;
|
|
11
|
-
const win = typeof window !== 'undefined' ? window : {};
|
|
12
|
-
const doc = win.document || { head: {} };
|
|
13
|
-
const plt = {
|
|
14
|
-
$flags$: 0,
|
|
15
|
-
$resourcesUrl$: '',
|
|
16
|
-
jmp: (h) => h(),
|
|
17
|
-
raf: (h) => requestAnimationFrame(h),
|
|
18
|
-
ael: (el, eventName, listener, opts) => el.addEventListener(eventName, listener, opts),
|
|
19
|
-
rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),
|
|
20
|
-
ce: (eventName, opts) => new CustomEvent(eventName, opts),
|
|
21
|
-
};
|
|
22
|
-
const promiseResolve = (v) => Promise.resolve(v);
|
|
23
|
-
const supportsConstructableStylesheets = /*@__PURE__*/ (() => {
|
|
24
|
-
try {
|
|
25
|
-
new CSSStyleSheet();
|
|
26
|
-
return typeof new CSSStyleSheet().replaceSync === 'function';
|
|
27
|
-
}
|
|
28
|
-
catch (e) { }
|
|
29
|
-
return false;
|
|
30
|
-
})()
|
|
31
|
-
;
|
|
32
|
-
const addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) => {
|
|
33
|
-
if (listeners) {
|
|
34
|
-
listeners.map(([flags, name, method]) => {
|
|
35
|
-
const target = getHostListenerTarget(elm, flags) ;
|
|
36
|
-
const handler = hostListenerProxy(hostRef, method);
|
|
37
|
-
const opts = hostListenerOpts(flags);
|
|
38
|
-
plt.ael(target, name, handler, opts);
|
|
39
|
-
(hostRef.$rmListeners$ = hostRef.$rmListeners$ || []).push(() => plt.rel(target, name, handler, opts));
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
};
|
|
43
|
-
const hostListenerProxy = (hostRef, methodName) => (ev) => {
|
|
44
|
-
try {
|
|
45
|
-
{
|
|
46
|
-
if (hostRef.$flags$ & 256 /* isListenReady */) {
|
|
47
|
-
// instance is ready, let's call it's member method for this event
|
|
48
|
-
hostRef.$lazyInstance$[methodName](ev);
|
|
49
|
-
}
|
|
50
|
-
else {
|
|
51
|
-
(hostRef.$queuedListeners$ = hostRef.$queuedListeners$ || []).push([methodName, ev]);
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
catch (e) {
|
|
56
|
-
consoleError(e);
|
|
57
|
-
}
|
|
58
|
-
};
|
|
59
|
-
const getHostListenerTarget = (elm, flags) => {
|
|
60
|
-
if (flags & 4 /* TargetDocument */)
|
|
61
|
-
return doc;
|
|
62
|
-
if (flags & 8 /* TargetWindow */)
|
|
63
|
-
return win;
|
|
64
|
-
return elm;
|
|
65
|
-
};
|
|
66
|
-
// prettier-ignore
|
|
67
|
-
const hostListenerOpts = (flags) => (flags & 2 /* Capture */) !== 0;
|
|
68
|
-
const HYDRATED_CSS = '{visibility:hidden}.hydrated{visibility:inherit}';
|
|
69
19
|
const createTime = (fnName, tagName = '') => {
|
|
70
20
|
{
|
|
71
21
|
return () => {
|
|
@@ -80,76 +30,14 @@ const uniqueTime = (key, measureText) => {
|
|
|
80
30
|
};
|
|
81
31
|
}
|
|
82
32
|
};
|
|
83
|
-
const
|
|
84
|
-
const
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
else {
|
|
92
|
-
style.replaceSync(cssText);
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
else {
|
|
96
|
-
style = cssText;
|
|
97
|
-
}
|
|
98
|
-
styles.set(scopeId, style);
|
|
99
|
-
};
|
|
100
|
-
const addStyle = (styleContainerNode, cmpMeta, mode, hostElm) => {
|
|
101
|
-
let scopeId = getScopeId(cmpMeta);
|
|
102
|
-
const style = styles.get(scopeId);
|
|
103
|
-
// if an element is NOT connected then getRootNode() will return the wrong root node
|
|
104
|
-
// so the fallback is to always use the document for the root node in those cases
|
|
105
|
-
styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : doc;
|
|
106
|
-
if (style) {
|
|
107
|
-
if (typeof style === 'string') {
|
|
108
|
-
styleContainerNode = styleContainerNode.head || styleContainerNode;
|
|
109
|
-
let appliedStyles = rootAppliedStyles.get(styleContainerNode);
|
|
110
|
-
let styleElm;
|
|
111
|
-
if (!appliedStyles) {
|
|
112
|
-
rootAppliedStyles.set(styleContainerNode, (appliedStyles = new Set()));
|
|
113
|
-
}
|
|
114
|
-
if (!appliedStyles.has(scopeId)) {
|
|
115
|
-
{
|
|
116
|
-
{
|
|
117
|
-
styleElm = doc.createElement('style');
|
|
118
|
-
styleElm.innerHTML = style;
|
|
119
|
-
}
|
|
120
|
-
styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector('link'));
|
|
121
|
-
}
|
|
122
|
-
if (appliedStyles) {
|
|
123
|
-
appliedStyles.add(scopeId);
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
else if (!styleContainerNode.adoptedStyleSheets.includes(style)) {
|
|
128
|
-
styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
return scopeId;
|
|
132
|
-
};
|
|
133
|
-
const attachStyles = (hostRef) => {
|
|
134
|
-
const cmpMeta = hostRef.$cmpMeta$;
|
|
135
|
-
const elm = hostRef.$hostElement$;
|
|
136
|
-
const flags = cmpMeta.$flags$;
|
|
137
|
-
const endAttachStyles = createTime('attachStyles', cmpMeta.$tagName$);
|
|
138
|
-
const scopeId = addStyle(elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(), cmpMeta);
|
|
139
|
-
if (flags & 10 /* needsScopedEncapsulation */) {
|
|
140
|
-
// only required when we're NOT using native shadow dom (slot)
|
|
141
|
-
// or this browser doesn't support native shadow dom
|
|
142
|
-
// and this host element was NOT created with SSR
|
|
143
|
-
// let's pick out the inner content for slot projection
|
|
144
|
-
// create a node to represent where the original
|
|
145
|
-
// content was first placed, which is useful later on
|
|
146
|
-
// DOM WRITE!!
|
|
147
|
-
elm['s-sc'] = scopeId;
|
|
148
|
-
elm.classList.add(scopeId + '-h');
|
|
149
|
-
}
|
|
150
|
-
endAttachStyles();
|
|
151
|
-
};
|
|
152
|
-
const getScopeId = (cmp, mode) => 'sc-' + (cmp.$tagName$);
|
|
33
|
+
const CONTENT_REF_ID = 'r';
|
|
34
|
+
const ORG_LOCATION_ID = 'o';
|
|
35
|
+
const SLOT_NODE_ID = 's';
|
|
36
|
+
const TEXT_NODE_ID = 't';
|
|
37
|
+
const HYDRATE_ID = 's-id';
|
|
38
|
+
const HYDRATED_STYLE_ID = 'sty-id';
|
|
39
|
+
const HYDRATE_CHILD_ID = 'c-id';
|
|
40
|
+
const HYDRATED_CSS = '{visibility:hidden}.hydrated{visibility:inherit}';
|
|
153
41
|
/**
|
|
154
42
|
* Default style mode id
|
|
155
43
|
*/
|
|
@@ -159,11 +47,30 @@ const getScopeId = (cmp, mode) => 'sc-' + (cmp.$tagName$);
|
|
|
159
47
|
*/
|
|
160
48
|
const EMPTY_OBJ = {};
|
|
161
49
|
const isDef = (v) => v != null;
|
|
50
|
+
/**
|
|
51
|
+
* Check whether a value is a 'complex type', defined here as an object or a
|
|
52
|
+
* function.
|
|
53
|
+
*
|
|
54
|
+
* @param o the value to check
|
|
55
|
+
* @returns whether it's a complex type or not
|
|
56
|
+
*/
|
|
162
57
|
const isComplexType = (o) => {
|
|
163
58
|
// https://jsperf.com/typeof-fn-object/5
|
|
164
59
|
o = typeof o;
|
|
165
60
|
return o === 'object' || o === 'function';
|
|
166
61
|
};
|
|
62
|
+
/**
|
|
63
|
+
* Helper method for querying a `meta` tag that contains a nonce value
|
|
64
|
+
* out of a DOM's head.
|
|
65
|
+
*
|
|
66
|
+
* @param doc The DOM containing the `head` to query against
|
|
67
|
+
* @returns The content of the meta tag representing the nonce value, or `undefined` if no tag
|
|
68
|
+
* exists or the tag has no content.
|
|
69
|
+
*/
|
|
70
|
+
function queryNonceMetaTagContent(doc) {
|
|
71
|
+
var _a, _b, _c;
|
|
72
|
+
return (_c = (_b = (_a = doc.head) === null || _a === void 0 ? void 0 : _a.querySelector('meta[name="csp-nonce"]')) === null || _b === void 0 ? void 0 : _b.getAttribute('content')) !== null && _c !== void 0 ? _c : undefined;
|
|
73
|
+
}
|
|
167
74
|
/**
|
|
168
75
|
* Production h() function based on Preact by
|
|
169
76
|
* Jason Miller (@developit)
|
|
@@ -172,7 +79,6 @@ const isComplexType = (o) => {
|
|
|
172
79
|
*
|
|
173
80
|
* Modified for Stencil's compiler and vdom
|
|
174
81
|
*/
|
|
175
|
-
// const stack: any[] = [];
|
|
176
82
|
// export function h(nodeName: string | d.FunctionalComponent, vnodeData: d.PropsType, child?: d.ChildType): d.VNode;
|
|
177
83
|
// export function h(nodeName: string | d.FunctionalComponent, vnodeData: d.PropsType, ...children: d.ChildType[]): d.VNode;
|
|
178
84
|
const h = (nodeName, vnodeData, ...children) => {
|
|
@@ -234,6 +140,14 @@ const h = (nodeName, vnodeData, ...children) => {
|
|
|
234
140
|
}
|
|
235
141
|
return vnode;
|
|
236
142
|
};
|
|
143
|
+
/**
|
|
144
|
+
* A utility function for creating a virtual DOM node from a tag and some
|
|
145
|
+
* possible text content.
|
|
146
|
+
*
|
|
147
|
+
* @param tag the tag for this element
|
|
148
|
+
* @param text possible text content for the node
|
|
149
|
+
* @returns a newly-minted virtual DOM node
|
|
150
|
+
*/
|
|
237
151
|
const newVNode = (tag, text) => {
|
|
238
152
|
const vnode = {
|
|
239
153
|
$flags$: 0,
|
|
@@ -251,11 +165,31 @@ const newVNode = (tag, text) => {
|
|
|
251
165
|
return vnode;
|
|
252
166
|
};
|
|
253
167
|
const Host = {};
|
|
168
|
+
/**
|
|
169
|
+
* Check whether a given node is a Host node or not
|
|
170
|
+
*
|
|
171
|
+
* @param node the virtual DOM node to check
|
|
172
|
+
* @returns whether it's a Host node or not
|
|
173
|
+
*/
|
|
254
174
|
const isHost = (node) => node && node.$tag$ === Host;
|
|
175
|
+
/**
|
|
176
|
+
* Implementation of {@link d.FunctionalUtilities} for Stencil's VDom.
|
|
177
|
+
*
|
|
178
|
+
* Note that these functions convert from {@link d.VNode} to
|
|
179
|
+
* {@link d.ChildNode} to give functional component developers a friendly
|
|
180
|
+
* interface.
|
|
181
|
+
*/
|
|
255
182
|
const vdomFnUtils = {
|
|
256
183
|
forEach: (children, cb) => children.map(convertToPublic).forEach(cb),
|
|
257
184
|
map: (children, cb) => children.map(convertToPublic).map(cb).map(convertToPrivate),
|
|
258
185
|
};
|
|
186
|
+
/**
|
|
187
|
+
* Convert a {@link d.VNode} to a {@link d.ChildNode} in order to present a
|
|
188
|
+
* friendlier public interface (hence, 'convertToPublic').
|
|
189
|
+
*
|
|
190
|
+
* @param node the virtual DOM node to convert
|
|
191
|
+
* @returns a converted child node
|
|
192
|
+
*/
|
|
259
193
|
const convertToPublic = (node) => ({
|
|
260
194
|
vattrs: node.$attrs$,
|
|
261
195
|
vchildren: node.$children$,
|
|
@@ -264,6 +198,15 @@ const convertToPublic = (node) => ({
|
|
|
264
198
|
vtag: node.$tag$,
|
|
265
199
|
vtext: node.$text$,
|
|
266
200
|
});
|
|
201
|
+
/**
|
|
202
|
+
* Convert a {@link d.ChildNode} back to an equivalent {@link d.VNode} in
|
|
203
|
+
* order to use the resulting object in the virtual DOM. The initial object was
|
|
204
|
+
* likely created as part of presenting a public API, so converting it back
|
|
205
|
+
* involved making it 'private' again (hence, `convertToPrivate`).
|
|
206
|
+
*
|
|
207
|
+
* @param node the child node to convert
|
|
208
|
+
* @returns a converted virtual DOM node
|
|
209
|
+
*/
|
|
267
210
|
const convertToPrivate = (node) => {
|
|
268
211
|
if (typeof node.vtag === 'function') {
|
|
269
212
|
const vnodeData = Object.assign({}, node.vattrs);
|
|
@@ -275,13 +218,375 @@ const convertToPrivate = (node) => {
|
|
|
275
218
|
}
|
|
276
219
|
return h(node.vtag, vnodeData, ...(node.vchildren || []));
|
|
277
220
|
}
|
|
278
|
-
const vnode = newVNode(node.vtag, node.vtext);
|
|
279
|
-
vnode.$attrs$ = node.vattrs;
|
|
280
|
-
vnode.$children$ = node.vchildren;
|
|
281
|
-
vnode.$key$ = node.vkey;
|
|
282
|
-
vnode.$name$ = node.vname;
|
|
283
|
-
return vnode;
|
|
221
|
+
const vnode = newVNode(node.vtag, node.vtext);
|
|
222
|
+
vnode.$attrs$ = node.vattrs;
|
|
223
|
+
vnode.$children$ = node.vchildren;
|
|
224
|
+
vnode.$key$ = node.vkey;
|
|
225
|
+
vnode.$name$ = node.vname;
|
|
226
|
+
return vnode;
|
|
227
|
+
};
|
|
228
|
+
const initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
|
|
229
|
+
const endHydrate = createTime('hydrateClient', tagName);
|
|
230
|
+
const shadowRoot = hostElm.shadowRoot;
|
|
231
|
+
const childRenderNodes = [];
|
|
232
|
+
const slotNodes = [];
|
|
233
|
+
const shadowRootNodes = shadowRoot ? [] : null;
|
|
234
|
+
const vnode = (hostRef.$vnode$ = newVNode(tagName, null));
|
|
235
|
+
if (!plt.$orgLocNodes$) {
|
|
236
|
+
initializeDocumentHydrate(doc.body, (plt.$orgLocNodes$ = new Map()));
|
|
237
|
+
}
|
|
238
|
+
hostElm[HYDRATE_ID] = hostId;
|
|
239
|
+
hostElm.removeAttribute(HYDRATE_ID);
|
|
240
|
+
clientHydrate(vnode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, hostElm, hostId);
|
|
241
|
+
childRenderNodes.map((c) => {
|
|
242
|
+
const orgLocationId = c.$hostId$ + '.' + c.$nodeId$;
|
|
243
|
+
const orgLocationNode = plt.$orgLocNodes$.get(orgLocationId);
|
|
244
|
+
const node = c.$elm$;
|
|
245
|
+
if (orgLocationNode && supportsShadow && orgLocationNode['s-en'] === '') {
|
|
246
|
+
orgLocationNode.parentNode.insertBefore(node, orgLocationNode.nextSibling);
|
|
247
|
+
}
|
|
248
|
+
if (!shadowRoot) {
|
|
249
|
+
node['s-hn'] = tagName;
|
|
250
|
+
if (orgLocationNode) {
|
|
251
|
+
node['s-ol'] = orgLocationNode;
|
|
252
|
+
node['s-ol']['s-nr'] = node;
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
plt.$orgLocNodes$.delete(orgLocationId);
|
|
256
|
+
});
|
|
257
|
+
if (shadowRoot) {
|
|
258
|
+
shadowRootNodes.map((shadowRootNode) => {
|
|
259
|
+
if (shadowRootNode) {
|
|
260
|
+
shadowRoot.appendChild(shadowRootNode);
|
|
261
|
+
}
|
|
262
|
+
});
|
|
263
|
+
}
|
|
264
|
+
endHydrate();
|
|
265
|
+
};
|
|
266
|
+
const clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, node, hostId) => {
|
|
267
|
+
let childNodeType;
|
|
268
|
+
let childIdSplt;
|
|
269
|
+
let childVNode;
|
|
270
|
+
let i;
|
|
271
|
+
if (node.nodeType === 1 /* NODE_TYPE.ElementNode */) {
|
|
272
|
+
childNodeType = node.getAttribute(HYDRATE_CHILD_ID);
|
|
273
|
+
if (childNodeType) {
|
|
274
|
+
// got the node data from the element's attribute
|
|
275
|
+
// `${hostId}.${nodeId}.${depth}.${index}`
|
|
276
|
+
childIdSplt = childNodeType.split('.');
|
|
277
|
+
if (childIdSplt[0] === hostId || childIdSplt[0] === '0') {
|
|
278
|
+
childVNode = {
|
|
279
|
+
$flags$: 0,
|
|
280
|
+
$hostId$: childIdSplt[0],
|
|
281
|
+
$nodeId$: childIdSplt[1],
|
|
282
|
+
$depth$: childIdSplt[2],
|
|
283
|
+
$index$: childIdSplt[3],
|
|
284
|
+
$tag$: node.tagName.toLowerCase(),
|
|
285
|
+
$elm$: node,
|
|
286
|
+
$attrs$: null,
|
|
287
|
+
$children$: null,
|
|
288
|
+
$key$: null,
|
|
289
|
+
$name$: null,
|
|
290
|
+
$text$: null,
|
|
291
|
+
};
|
|
292
|
+
childRenderNodes.push(childVNode);
|
|
293
|
+
node.removeAttribute(HYDRATE_CHILD_ID);
|
|
294
|
+
// this is a new child vnode
|
|
295
|
+
// so ensure its parent vnode has the vchildren array
|
|
296
|
+
if (!parentVNode.$children$) {
|
|
297
|
+
parentVNode.$children$ = [];
|
|
298
|
+
}
|
|
299
|
+
// add our child vnode to a specific index of the vnode's children
|
|
300
|
+
parentVNode.$children$[childVNode.$index$] = childVNode;
|
|
301
|
+
// this is now the new parent vnode for all the next child checks
|
|
302
|
+
parentVNode = childVNode;
|
|
303
|
+
if (shadowRootNodes && childVNode.$depth$ === '0') {
|
|
304
|
+
shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
// recursively drill down, end to start so we can remove nodes
|
|
309
|
+
for (i = node.childNodes.length - 1; i >= 0; i--) {
|
|
310
|
+
clientHydrate(parentVNode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, node.childNodes[i], hostId);
|
|
311
|
+
}
|
|
312
|
+
if (node.shadowRoot) {
|
|
313
|
+
// keep drilling down through the shadow root nodes
|
|
314
|
+
for (i = node.shadowRoot.childNodes.length - 1; i >= 0; i--) {
|
|
315
|
+
clientHydrate(parentVNode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, node.shadowRoot.childNodes[i], hostId);
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
else if (node.nodeType === 8 /* NODE_TYPE.CommentNode */) {
|
|
320
|
+
// `${COMMENT_TYPE}.${hostId}.${nodeId}.${depth}.${index}`
|
|
321
|
+
childIdSplt = node.nodeValue.split('.');
|
|
322
|
+
if (childIdSplt[1] === hostId || childIdSplt[1] === '0') {
|
|
323
|
+
// comment node for either the host id or a 0 host id
|
|
324
|
+
childNodeType = childIdSplt[0];
|
|
325
|
+
childVNode = {
|
|
326
|
+
$flags$: 0,
|
|
327
|
+
$hostId$: childIdSplt[1],
|
|
328
|
+
$nodeId$: childIdSplt[2],
|
|
329
|
+
$depth$: childIdSplt[3],
|
|
330
|
+
$index$: childIdSplt[4],
|
|
331
|
+
$elm$: node,
|
|
332
|
+
$attrs$: null,
|
|
333
|
+
$children$: null,
|
|
334
|
+
$key$: null,
|
|
335
|
+
$name$: null,
|
|
336
|
+
$tag$: null,
|
|
337
|
+
$text$: null,
|
|
338
|
+
};
|
|
339
|
+
if (childNodeType === TEXT_NODE_ID) {
|
|
340
|
+
childVNode.$elm$ = node.nextSibling;
|
|
341
|
+
if (childVNode.$elm$ && childVNode.$elm$.nodeType === 3 /* NODE_TYPE.TextNode */) {
|
|
342
|
+
childVNode.$text$ = childVNode.$elm$.textContent;
|
|
343
|
+
childRenderNodes.push(childVNode);
|
|
344
|
+
// remove the text comment since it's no longer needed
|
|
345
|
+
node.remove();
|
|
346
|
+
if (!parentVNode.$children$) {
|
|
347
|
+
parentVNode.$children$ = [];
|
|
348
|
+
}
|
|
349
|
+
parentVNode.$children$[childVNode.$index$] = childVNode;
|
|
350
|
+
if (shadowRootNodes && childVNode.$depth$ === '0') {
|
|
351
|
+
shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
else if (childVNode.$hostId$ === hostId) {
|
|
356
|
+
// this comment node is specifcally for this host id
|
|
357
|
+
if (childNodeType === SLOT_NODE_ID) {
|
|
358
|
+
// `${SLOT_NODE_ID}.${hostId}.${nodeId}.${depth}.${index}.${slotName}`;
|
|
359
|
+
childVNode.$tag$ = 'slot';
|
|
360
|
+
if (childIdSplt[5]) {
|
|
361
|
+
node['s-sn'] = childVNode.$name$ = childIdSplt[5];
|
|
362
|
+
}
|
|
363
|
+
else {
|
|
364
|
+
node['s-sn'] = '';
|
|
365
|
+
}
|
|
366
|
+
node['s-sr'] = true;
|
|
367
|
+
if (shadowRootNodes) {
|
|
368
|
+
// browser support shadowRoot and this is a shadow dom component
|
|
369
|
+
// create an actual slot element
|
|
370
|
+
childVNode.$elm$ = doc.createElement(childVNode.$tag$);
|
|
371
|
+
if (childVNode.$name$) {
|
|
372
|
+
// add the slot name attribute
|
|
373
|
+
childVNode.$elm$.setAttribute('name', childVNode.$name$);
|
|
374
|
+
}
|
|
375
|
+
// insert the new slot element before the slot comment
|
|
376
|
+
node.parentNode.insertBefore(childVNode.$elm$, node);
|
|
377
|
+
// remove the slot comment since it's not needed for shadow
|
|
378
|
+
node.remove();
|
|
379
|
+
if (childVNode.$depth$ === '0') {
|
|
380
|
+
shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
slotNodes.push(childVNode);
|
|
384
|
+
if (!parentVNode.$children$) {
|
|
385
|
+
parentVNode.$children$ = [];
|
|
386
|
+
}
|
|
387
|
+
parentVNode.$children$[childVNode.$index$] = childVNode;
|
|
388
|
+
}
|
|
389
|
+
else if (childNodeType === CONTENT_REF_ID) {
|
|
390
|
+
// `${CONTENT_REF_ID}.${hostId}`;
|
|
391
|
+
if (shadowRootNodes) {
|
|
392
|
+
// remove the content ref comment since it's not needed for shadow
|
|
393
|
+
node.remove();
|
|
394
|
+
}
|
|
395
|
+
else {
|
|
396
|
+
hostElm['s-cr'] = node;
|
|
397
|
+
node['s-cn'] = true;
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
else if (parentVNode && parentVNode.$tag$ === 'style') {
|
|
404
|
+
const vnode = newVNode(null, node.textContent);
|
|
405
|
+
vnode.$elm$ = node;
|
|
406
|
+
vnode.$index$ = '0';
|
|
407
|
+
parentVNode.$children$ = [vnode];
|
|
408
|
+
}
|
|
409
|
+
};
|
|
410
|
+
const initializeDocumentHydrate = (node, orgLocNodes) => {
|
|
411
|
+
if (node.nodeType === 1 /* NODE_TYPE.ElementNode */) {
|
|
412
|
+
let i = 0;
|
|
413
|
+
for (; i < node.childNodes.length; i++) {
|
|
414
|
+
initializeDocumentHydrate(node.childNodes[i], orgLocNodes);
|
|
415
|
+
}
|
|
416
|
+
if (node.shadowRoot) {
|
|
417
|
+
for (i = 0; i < node.shadowRoot.childNodes.length; i++) {
|
|
418
|
+
initializeDocumentHydrate(node.shadowRoot.childNodes[i], orgLocNodes);
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
else if (node.nodeType === 8 /* NODE_TYPE.CommentNode */) {
|
|
423
|
+
const childIdSplt = node.nodeValue.split('.');
|
|
424
|
+
if (childIdSplt[0] === ORG_LOCATION_ID) {
|
|
425
|
+
orgLocNodes.set(childIdSplt[1] + '.' + childIdSplt[2], node);
|
|
426
|
+
node.nodeValue = '';
|
|
427
|
+
// useful to know if the original location is
|
|
428
|
+
// the root light-dom of a shadow dom component
|
|
429
|
+
node['s-en'] = childIdSplt[3];
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
};
|
|
433
|
+
/**
|
|
434
|
+
* Parse a new property value for a given property type.
|
|
435
|
+
*
|
|
436
|
+
* While the prop value can reasonably be expected to be of `any` type as far as TypeScript's type checker is concerned,
|
|
437
|
+
* it is not safe to assume that the string returned by evaluating `typeof propValue` matches:
|
|
438
|
+
* 1. `any`, the type given to `propValue` in the function signature
|
|
439
|
+
* 2. the type stored from `propType`.
|
|
440
|
+
*
|
|
441
|
+
* This function provides the capability to parse/coerce a property's value to potentially any other JavaScript type.
|
|
442
|
+
*
|
|
443
|
+
* Property values represented in TSX preserve their type information. In the example below, the number 0 is passed to
|
|
444
|
+
* a component. This `propValue` will preserve its type information (`typeof propValue === 'number'`). Note that is
|
|
445
|
+
* based on the type of the value being passed in, not the type declared of the class member decorated with `@Prop`.
|
|
446
|
+
* ```tsx
|
|
447
|
+
* <my-cmp prop-val={0}></my-cmp>
|
|
448
|
+
* ```
|
|
449
|
+
*
|
|
450
|
+
* HTML prop values on the other hand, will always a string
|
|
451
|
+
*
|
|
452
|
+
* @param propValue the new value to coerce to some type
|
|
453
|
+
* @param propType the type of the prop, expressed as a binary number
|
|
454
|
+
* @returns the parsed/coerced value
|
|
455
|
+
*/
|
|
456
|
+
const parsePropertyValue = (propValue, propType) => {
|
|
457
|
+
// ensure this value is of the correct prop type
|
|
458
|
+
if (propValue != null && !isComplexType(propValue)) {
|
|
459
|
+
if (propType & 4 /* MEMBER_FLAGS.Boolean */) {
|
|
460
|
+
// per the HTML spec, any string value means it is a boolean true value
|
|
461
|
+
// but we'll cheat here and say that the string "false" is the boolean false
|
|
462
|
+
return propValue === 'false' ? false : propValue === '' || !!propValue;
|
|
463
|
+
}
|
|
464
|
+
if (propType & 2 /* MEMBER_FLAGS.Number */) {
|
|
465
|
+
// force it to be a number
|
|
466
|
+
return parseFloat(propValue);
|
|
467
|
+
}
|
|
468
|
+
if (propType & 1 /* MEMBER_FLAGS.String */) {
|
|
469
|
+
// could have been passed as a number or boolean
|
|
470
|
+
// but we still want it as a string
|
|
471
|
+
return String(propValue);
|
|
472
|
+
}
|
|
473
|
+
// redundant return here for better minification
|
|
474
|
+
return propValue;
|
|
475
|
+
}
|
|
476
|
+
// not sure exactly what type we want
|
|
477
|
+
// so no need to change to a different type
|
|
478
|
+
return propValue;
|
|
479
|
+
};
|
|
480
|
+
const getElement = (ref) => (getHostRef(ref).$hostElement$ );
|
|
481
|
+
const createEvent = (ref, name, flags) => {
|
|
482
|
+
const elm = getElement(ref);
|
|
483
|
+
return {
|
|
484
|
+
emit: (detail) => {
|
|
485
|
+
return emitEvent(elm, name, {
|
|
486
|
+
bubbles: !!(flags & 4 /* EVENT_FLAGS.Bubbles */),
|
|
487
|
+
composed: !!(flags & 2 /* EVENT_FLAGS.Composed */),
|
|
488
|
+
cancelable: !!(flags & 1 /* EVENT_FLAGS.Cancellable */),
|
|
489
|
+
detail,
|
|
490
|
+
});
|
|
491
|
+
},
|
|
492
|
+
};
|
|
493
|
+
};
|
|
494
|
+
/**
|
|
495
|
+
* Helper function to create & dispatch a custom Event on a provided target
|
|
496
|
+
* @param elm the target of the Event
|
|
497
|
+
* @param name the name to give the custom Event
|
|
498
|
+
* @param opts options for configuring a custom Event
|
|
499
|
+
* @returns the custom Event
|
|
500
|
+
*/
|
|
501
|
+
const emitEvent = (elm, name, opts) => {
|
|
502
|
+
const ev = plt.ce(name, opts);
|
|
503
|
+
elm.dispatchEvent(ev);
|
|
504
|
+
return ev;
|
|
505
|
+
};
|
|
506
|
+
const rootAppliedStyles = /*@__PURE__*/ new WeakMap();
|
|
507
|
+
const registerStyle = (scopeId, cssText, allowCS) => {
|
|
508
|
+
let style = styles.get(scopeId);
|
|
509
|
+
if (supportsConstructableStylesheets && allowCS) {
|
|
510
|
+
style = (style || new CSSStyleSheet());
|
|
511
|
+
if (typeof style === 'string') {
|
|
512
|
+
style = cssText;
|
|
513
|
+
}
|
|
514
|
+
else {
|
|
515
|
+
style.replaceSync(cssText);
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
else {
|
|
519
|
+
style = cssText;
|
|
520
|
+
}
|
|
521
|
+
styles.set(scopeId, style);
|
|
522
|
+
};
|
|
523
|
+
const addStyle = (styleContainerNode, cmpMeta, mode, hostElm) => {
|
|
524
|
+
var _a;
|
|
525
|
+
let scopeId = getScopeId(cmpMeta);
|
|
526
|
+
const style = styles.get(scopeId);
|
|
527
|
+
// if an element is NOT connected then getRootNode() will return the wrong root node
|
|
528
|
+
// so the fallback is to always use the document for the root node in those cases
|
|
529
|
+
styleContainerNode = styleContainerNode.nodeType === 11 /* NODE_TYPE.DocumentFragment */ ? styleContainerNode : doc;
|
|
530
|
+
if (style) {
|
|
531
|
+
if (typeof style === 'string') {
|
|
532
|
+
styleContainerNode = styleContainerNode.head || styleContainerNode;
|
|
533
|
+
let appliedStyles = rootAppliedStyles.get(styleContainerNode);
|
|
534
|
+
let styleElm;
|
|
535
|
+
if (!appliedStyles) {
|
|
536
|
+
rootAppliedStyles.set(styleContainerNode, (appliedStyles = new Set()));
|
|
537
|
+
}
|
|
538
|
+
if (!appliedStyles.has(scopeId)) {
|
|
539
|
+
if (styleContainerNode.host &&
|
|
540
|
+
(styleElm = styleContainerNode.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId}"]`))) {
|
|
541
|
+
// This is only happening on native shadow-dom, do not needs CSS var shim
|
|
542
|
+
styleElm.innerHTML = style;
|
|
543
|
+
}
|
|
544
|
+
else {
|
|
545
|
+
// TODO(STENCIL-659): Remove code implementing the CSS variable shim
|
|
546
|
+
{
|
|
547
|
+
styleElm = doc.createElement('style');
|
|
548
|
+
styleElm.innerHTML = style;
|
|
549
|
+
}
|
|
550
|
+
// Apply CSP nonce to the style tag if it exists
|
|
551
|
+
const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);
|
|
552
|
+
if (nonce != null) {
|
|
553
|
+
styleElm.setAttribute('nonce', nonce);
|
|
554
|
+
}
|
|
555
|
+
styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector('link'));
|
|
556
|
+
}
|
|
557
|
+
if (appliedStyles) {
|
|
558
|
+
appliedStyles.add(scopeId);
|
|
559
|
+
}
|
|
560
|
+
}
|
|
561
|
+
}
|
|
562
|
+
else if (!styleContainerNode.adoptedStyleSheets.includes(style)) {
|
|
563
|
+
styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
|
|
564
|
+
}
|
|
565
|
+
}
|
|
566
|
+
return scopeId;
|
|
567
|
+
};
|
|
568
|
+
const attachStyles = (hostRef) => {
|
|
569
|
+
const cmpMeta = hostRef.$cmpMeta$;
|
|
570
|
+
const elm = hostRef.$hostElement$;
|
|
571
|
+
const flags = cmpMeta.$flags$;
|
|
572
|
+
const endAttachStyles = createTime('attachStyles', cmpMeta.$tagName$);
|
|
573
|
+
const scopeId = addStyle(elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(), cmpMeta);
|
|
574
|
+
// TODO(STENCIL-662): Remove code related to deprecated shadowDomShim field
|
|
575
|
+
if (flags & 10 /* CMP_FLAGS.needsScopedEncapsulation */) {
|
|
576
|
+
// only required when we're NOT using native shadow dom (slot)
|
|
577
|
+
// or this browser doesn't support native shadow dom
|
|
578
|
+
// and this host element was NOT created with SSR
|
|
579
|
+
// let's pick out the inner content for slot projection
|
|
580
|
+
// create a node to represent where the original
|
|
581
|
+
// content was first placed, which is useful later on
|
|
582
|
+
// DOM WRITE!!
|
|
583
|
+
elm['s-sc'] = scopeId;
|
|
584
|
+
elm.classList.add(scopeId + '-h');
|
|
585
|
+
}
|
|
586
|
+
endAttachStyles();
|
|
284
587
|
};
|
|
588
|
+
const getScopeId = (cmp, mode) => 'sc-' + (cmp.$tagName$);
|
|
589
|
+
const convertScopedToShadow = (css) => css.replace(/\/\*!@([^\/]+)\*\/[^\{]+\{/g, '$1{');
|
|
285
590
|
/**
|
|
286
591
|
* Production setAccessor() function based on Preact by
|
|
287
592
|
* Jason Miller (@developit)
|
|
@@ -399,7 +704,7 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
399
704
|
}
|
|
400
705
|
}
|
|
401
706
|
}
|
|
402
|
-
else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex) {
|
|
707
|
+
else if ((!isProp || flags & 4 /* VNODE_FLAGS.isHost */ || isSvg) && !isComplex) {
|
|
403
708
|
newValue = newValue === true ? '' : newValue;
|
|
404
709
|
{
|
|
405
710
|
elm.setAttribute(memberName, newValue);
|
|
@@ -414,7 +719,7 @@ const updateElement = (oldVnode, newVnode, isSvgMode, memberName) => {
|
|
|
414
719
|
// if the element passed in is a shadow root, which is a document fragment
|
|
415
720
|
// then we want to be adding attrs/props to the shadow root's "host" element
|
|
416
721
|
// if it's not a shadow root, then we add attrs/props to the same element
|
|
417
|
-
const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host
|
|
722
|
+
const elm = newVnode.$elm$.nodeType === 11 /* NODE_TYPE.DocumentFragment */ && newVnode.$elm$.host
|
|
418
723
|
? newVnode.$elm$.host
|
|
419
724
|
: newVnode.$elm$;
|
|
420
725
|
const oldVnodeAttrs = (oldVnode && oldVnode.$attrs$) || EMPTY_OBJ;
|
|
@@ -432,6 +737,16 @@ const updateElement = (oldVnode, newVnode, isSvgMode, memberName) => {
|
|
|
432
737
|
setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName], isSvgMode, newVnode.$flags$);
|
|
433
738
|
}
|
|
434
739
|
};
|
|
740
|
+
/**
|
|
741
|
+
* Create a DOM Node corresponding to one of the children of a given VNode.
|
|
742
|
+
*
|
|
743
|
+
* @param oldParentVNode the parent VNode from the previous render
|
|
744
|
+
* @param newParentVNode the parent VNode from the current render
|
|
745
|
+
* @param childIndex the index of the VNode, in the _new_ parent node's
|
|
746
|
+
* children, for which we will create a new DOM node
|
|
747
|
+
* @param parentElm the parent DOM node which our new node will be a child of
|
|
748
|
+
* @returns the newly created node
|
|
749
|
+
*/
|
|
435
750
|
const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
436
751
|
// tslint:disable-next-line: prefer-const
|
|
437
752
|
const newVNode = newParentVNode.$children$[childIndex];
|
|
@@ -449,23 +764,23 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
449
764
|
}
|
|
450
765
|
newVNode.$flags$ |= newVNode.$children$
|
|
451
766
|
? // slot element has fallback content
|
|
452
|
-
2 /* isSlotFallback */
|
|
767
|
+
2 /* VNODE_FLAGS.isSlotFallback */
|
|
453
768
|
: // slot element does not have fallback content
|
|
454
|
-
1 /* isSlotReference */;
|
|
769
|
+
1 /* VNODE_FLAGS.isSlotReference */;
|
|
455
770
|
}
|
|
456
771
|
}
|
|
457
772
|
if (newVNode.$text$ !== null) {
|
|
458
773
|
// create text node
|
|
459
774
|
elm = newVNode.$elm$ = doc.createTextNode(newVNode.$text$);
|
|
460
775
|
}
|
|
461
|
-
else if (newVNode.$flags$ & 1 /* isSlotReference */) {
|
|
776
|
+
else if (newVNode.$flags$ & 1 /* VNODE_FLAGS.isSlotReference */) {
|
|
462
777
|
// create a slot reference node
|
|
463
778
|
elm = newVNode.$elm$ =
|
|
464
779
|
doc.createTextNode('');
|
|
465
780
|
}
|
|
466
781
|
else {
|
|
467
782
|
// create element
|
|
468
|
-
elm = newVNode.$elm$ = (doc.createElement(newVNode.$flags$ & 2 /* isSlotFallback */
|
|
783
|
+
elm = newVNode.$elm$ = (doc.createElement(newVNode.$flags$ & 2 /* VNODE_FLAGS.isSlotFallback */
|
|
469
784
|
? 'slot-fb'
|
|
470
785
|
: newVNode.$tag$));
|
|
471
786
|
// add css classes, attrs, props, listeners, etc.
|
|
@@ -491,7 +806,7 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
491
806
|
}
|
|
492
807
|
{
|
|
493
808
|
elm['s-hn'] = hostTagName;
|
|
494
|
-
if (newVNode.$flags$ & (2 /* isSlotFallback */ | 1 /* isSlotReference */)) {
|
|
809
|
+
if (newVNode.$flags$ & (2 /* VNODE_FLAGS.isSlotFallback */ | 1 /* VNODE_FLAGS.isSlotReference */)) {
|
|
495
810
|
// remember the content reference comment
|
|
496
811
|
elm['s-sr'] = true;
|
|
497
812
|
// remember the content reference comment
|
|
@@ -510,7 +825,7 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
510
825
|
return elm;
|
|
511
826
|
};
|
|
512
827
|
const putBackInOriginalLocation = (parentElm, recursive) => {
|
|
513
|
-
plt.$flags$ |= 1 /* isTmpDisconnected */;
|
|
828
|
+
plt.$flags$ |= 1 /* PLATFORM_FLAGS.isTmpDisconnected */;
|
|
514
829
|
const oldSlotChildNodes = parentElm.childNodes;
|
|
515
830
|
for (let i = oldSlotChildNodes.length - 1; i >= 0; i--) {
|
|
516
831
|
const childNode = oldSlotChildNodes[i];
|
|
@@ -531,8 +846,23 @@ const putBackInOriginalLocation = (parentElm, recursive) => {
|
|
|
531
846
|
putBackInOriginalLocation(childNode, recursive);
|
|
532
847
|
}
|
|
533
848
|
}
|
|
534
|
-
plt.$flags$ &= ~1 /* isTmpDisconnected */;
|
|
849
|
+
plt.$flags$ &= ~1 /* PLATFORM_FLAGS.isTmpDisconnected */;
|
|
535
850
|
};
|
|
851
|
+
/**
|
|
852
|
+
* Create DOM nodes corresponding to a list of {@link d.Vnode} objects and
|
|
853
|
+
* add them to the DOM in the appropriate place.
|
|
854
|
+
*
|
|
855
|
+
* @param parentElm the DOM node which should be used as a parent for the new
|
|
856
|
+
* DOM nodes
|
|
857
|
+
* @param before a child of the `parentElm` which the new children should be
|
|
858
|
+
* inserted before (optional)
|
|
859
|
+
* @param parentVNode the parent virtual DOM node
|
|
860
|
+
* @param vnodes the new child virtual DOM nodes to produce DOM nodes for
|
|
861
|
+
* @param startIdx the index in the child virtual DOM nodes at which to start
|
|
862
|
+
* creating DOM nodes (inclusive)
|
|
863
|
+
* @param endIdx the index in the child virtual DOM nodes at which to stop
|
|
864
|
+
* creating DOM nodes (inclusive)
|
|
865
|
+
*/
|
|
536
866
|
const addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
|
|
537
867
|
let containerElm = ((parentElm['s-cr'] && parentElm['s-cr'].parentNode) || parentElm);
|
|
538
868
|
let childNode;
|
|
@@ -549,30 +879,112 @@ const addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) =>
|
|
|
549
879
|
}
|
|
550
880
|
}
|
|
551
881
|
};
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
882
|
+
/**
|
|
883
|
+
* Remove the DOM elements corresponding to a list of {@link d.VNode} objects.
|
|
884
|
+
* This can be used to, for instance, clean up after a list of children which
|
|
885
|
+
* should no longer be shown.
|
|
886
|
+
*
|
|
887
|
+
* This function also handles some of Stencil's slot relocation logic.
|
|
888
|
+
*
|
|
889
|
+
* @param vnodes a list of virtual DOM nodes to remove
|
|
890
|
+
* @param startIdx the index at which to start removing nodes (inclusive)
|
|
891
|
+
* @param endIdx the index at which to stop removing nodes (inclusive)
|
|
892
|
+
*/
|
|
893
|
+
const removeVnodes = (vnodes, startIdx, endIdx) => {
|
|
894
|
+
for (let index = startIdx; index <= endIdx; ++index) {
|
|
895
|
+
const vnode = vnodes[index];
|
|
896
|
+
if (vnode) {
|
|
897
|
+
const elm = vnode.$elm$;
|
|
898
|
+
nullifyVNodeRefs(vnode);
|
|
899
|
+
if (elm) {
|
|
900
|
+
{
|
|
901
|
+
// we're removing this element
|
|
902
|
+
// so it's possible we need to show slot fallback content now
|
|
903
|
+
checkSlotFallbackVisibility = true;
|
|
904
|
+
if (elm['s-ol']) {
|
|
905
|
+
// remove the original location comment
|
|
906
|
+
elm['s-ol'].remove();
|
|
907
|
+
}
|
|
908
|
+
else {
|
|
909
|
+
// it's possible that child nodes of the node
|
|
910
|
+
// that's being removed are slot nodes
|
|
911
|
+
putBackInOriginalLocation(elm, true);
|
|
912
|
+
}
|
|
569
913
|
}
|
|
914
|
+
// remove the vnode's element from the dom
|
|
915
|
+
elm.remove();
|
|
570
916
|
}
|
|
571
|
-
// remove the vnode's element from the dom
|
|
572
|
-
elm.remove();
|
|
573
917
|
}
|
|
574
918
|
}
|
|
575
919
|
};
|
|
920
|
+
/**
|
|
921
|
+
* Reconcile the children of a new VNode with the children of an old VNode by
|
|
922
|
+
* traversing the two collections of children, identifying nodes that are
|
|
923
|
+
* conserved or changed, calling out to `patch` to make any necessary
|
|
924
|
+
* updates to the DOM, and rearranging DOM nodes as needed.
|
|
925
|
+
*
|
|
926
|
+
* The algorithm for reconciling children works by analyzing two 'windows' onto
|
|
927
|
+
* the two arrays of children (`oldCh` and `newCh`). We keep track of the
|
|
928
|
+
* 'windows' by storing start and end indices and references to the
|
|
929
|
+
* corresponding array entries. Initially the two 'windows' are basically equal
|
|
930
|
+
* to the entire array, but we progressively narrow the windows until there are
|
|
931
|
+
* no children left to update by doing the following:
|
|
932
|
+
*
|
|
933
|
+
* 1. Skip any `null` entries at the beginning or end of the two arrays, so
|
|
934
|
+
* that if we have an initial array like the following we'll end up dealing
|
|
935
|
+
* only with a window bounded by the highlighted elements:
|
|
936
|
+
*
|
|
937
|
+
* [null, null, VNode1 , ... , VNode2, null, null]
|
|
938
|
+
* ^^^^^^ ^^^^^^
|
|
939
|
+
*
|
|
940
|
+
* 2. Check to see if the elements at the head and tail positions are equal
|
|
941
|
+
* across the windows. This will basically detect elements which haven't
|
|
942
|
+
* been added, removed, or changed position, i.e. if you had the following
|
|
943
|
+
* VNode elements (represented as HTML):
|
|
944
|
+
*
|
|
945
|
+
* oldVNode: `<div><p><span>HEY</span></p></div>`
|
|
946
|
+
* newVNode: `<div><p><span>THERE</span></p></div>`
|
|
947
|
+
*
|
|
948
|
+
* Then when comparing the children of the `<div>` tag we check the equality
|
|
949
|
+
* of the VNodes corresponding to the `<p>` tags and, since they are the
|
|
950
|
+
* same tag in the same position, we'd be able to avoid completely
|
|
951
|
+
* re-rendering the subtree under them with a new DOM element and would just
|
|
952
|
+
* call out to `patch` to handle reconciling their children and so on.
|
|
953
|
+
*
|
|
954
|
+
* 3. Check, for both windows, to see if the element at the beginning of the
|
|
955
|
+
* window corresponds to the element at the end of the other window. This is
|
|
956
|
+
* a heuristic which will let us identify _some_ situations in which
|
|
957
|
+
* elements have changed position, for instance it _should_ detect that the
|
|
958
|
+
* children nodes themselves have not changed but merely moved in the
|
|
959
|
+
* following example:
|
|
960
|
+
*
|
|
961
|
+
* oldVNode: `<div><element-one /><element-two /></div>`
|
|
962
|
+
* newVNode: `<div><element-two /><element-one /></div>`
|
|
963
|
+
*
|
|
964
|
+
* If we find cases like this then we also need to move the concrete DOM
|
|
965
|
+
* elements corresponding to the moved children to write the re-order to the
|
|
966
|
+
* DOM.
|
|
967
|
+
*
|
|
968
|
+
* 4. Finally, if VNodes have the `key` attribute set on them we check for any
|
|
969
|
+
* nodes in the old children which have the same key as the first element in
|
|
970
|
+
* our window on the new children. If we find such a node we handle calling
|
|
971
|
+
* out to `patch`, moving relevant DOM nodes, and so on, in accordance with
|
|
972
|
+
* what we find.
|
|
973
|
+
*
|
|
974
|
+
* Finally, once we've narrowed our 'windows' to the point that either of them
|
|
975
|
+
* collapse (i.e. they have length 0) we then handle any remaining VNode
|
|
976
|
+
* insertion or deletion that needs to happen to get a DOM state that correctly
|
|
977
|
+
* reflects the new child VNodes. If, for instance, after our window on the old
|
|
978
|
+
* children has collapsed we still have more nodes on the new children that
|
|
979
|
+
* we haven't dealt with yet then we need to add them, or if the new children
|
|
980
|
+
* collapse but we still have unhandled _old_ children then we need to make
|
|
981
|
+
* sure the corresponding DOM nodes are removed.
|
|
982
|
+
*
|
|
983
|
+
* @param parentElm the node into which the parent VNode is rendered
|
|
984
|
+
* @param oldCh the old children of the parent node
|
|
985
|
+
* @param newVNode the new VNode which will replace the parent
|
|
986
|
+
* @param newCh the new children of the parent node
|
|
987
|
+
*/
|
|
576
988
|
const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
577
989
|
let oldStartIdx = 0;
|
|
578
990
|
let newStartIdx = 0;
|
|
@@ -585,7 +997,7 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
|
585
997
|
let node;
|
|
586
998
|
while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {
|
|
587
999
|
if (oldStartVnode == null) {
|
|
588
|
-
//
|
|
1000
|
+
// VNode might have been moved left
|
|
589
1001
|
oldStartVnode = oldCh[++oldStartIdx];
|
|
590
1002
|
}
|
|
591
1003
|
else if (oldEndVnode == null) {
|
|
@@ -598,42 +1010,102 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
|
598
1010
|
newEndVnode = newCh[--newEndIdx];
|
|
599
1011
|
}
|
|
600
1012
|
else if (isSameVnode(oldStartVnode, newStartVnode)) {
|
|
1013
|
+
// if the start nodes are the same then we should patch the new VNode
|
|
1014
|
+
// onto the old one, and increment our `newStartIdx` and `oldStartIdx`
|
|
1015
|
+
// indices to reflect that. We don't need to move any DOM Nodes around
|
|
1016
|
+
// since things are matched up in order.
|
|
601
1017
|
patch(oldStartVnode, newStartVnode);
|
|
602
1018
|
oldStartVnode = oldCh[++oldStartIdx];
|
|
603
1019
|
newStartVnode = newCh[++newStartIdx];
|
|
604
1020
|
}
|
|
605
1021
|
else if (isSameVnode(oldEndVnode, newEndVnode)) {
|
|
1022
|
+
// likewise, if the end nodes are the same we patch new onto old and
|
|
1023
|
+
// decrement our end indices, and also likewise in this case we don't
|
|
1024
|
+
// need to move any DOM Nodes.
|
|
606
1025
|
patch(oldEndVnode, newEndVnode);
|
|
607
1026
|
oldEndVnode = oldCh[--oldEndIdx];
|
|
608
1027
|
newEndVnode = newCh[--newEndIdx];
|
|
609
1028
|
}
|
|
610
1029
|
else if (isSameVnode(oldStartVnode, newEndVnode)) {
|
|
611
|
-
// Vnode moved right
|
|
1030
|
+
// case: "Vnode moved right"
|
|
1031
|
+
//
|
|
1032
|
+
// We've found that the last node in our window on the new children is
|
|
1033
|
+
// the same VNode as the _first_ node in our window on the old children
|
|
1034
|
+
// we're dealing with now. Visually, this is the layout of these two
|
|
1035
|
+
// nodes:
|
|
1036
|
+
//
|
|
1037
|
+
// newCh: [..., newStartVnode , ... , newEndVnode , ...]
|
|
1038
|
+
// ^^^^^^^^^^^
|
|
1039
|
+
// oldCh: [..., oldStartVnode , ... , oldEndVnode , ...]
|
|
1040
|
+
// ^^^^^^^^^^^^^
|
|
1041
|
+
//
|
|
1042
|
+
// In this situation we need to patch `newEndVnode` onto `oldStartVnode`
|
|
1043
|
+
// and move the DOM element for `oldStartVnode`.
|
|
612
1044
|
if ((oldStartVnode.$tag$ === 'slot' || newEndVnode.$tag$ === 'slot')) {
|
|
613
1045
|
putBackInOriginalLocation(oldStartVnode.$elm$.parentNode, false);
|
|
614
1046
|
}
|
|
615
1047
|
patch(oldStartVnode, newEndVnode);
|
|
1048
|
+
// We need to move the element for `oldStartVnode` into a position which
|
|
1049
|
+
// will be appropriate for `newEndVnode`. For this we can use
|
|
1050
|
+
// `.insertBefore` and `oldEndVnode.$elm$.nextSibling`. If there is a
|
|
1051
|
+
// sibling for `oldEndVnode.$elm$` then we want to move the DOM node for
|
|
1052
|
+
// `oldStartVnode` between `oldEndVnode` and it's sibling, like so:
|
|
1053
|
+
//
|
|
1054
|
+
// <old-start-node />
|
|
1055
|
+
// <some-intervening-node />
|
|
1056
|
+
// <old-end-node />
|
|
1057
|
+
// <!-- -> <-- `oldStartVnode.$elm$` should be inserted here
|
|
1058
|
+
// <next-sibling />
|
|
1059
|
+
//
|
|
1060
|
+
// If instead `oldEndVnode.$elm$` has no sibling then we just want to put
|
|
1061
|
+
// the node for `oldStartVnode` at the end of the children of
|
|
1062
|
+
// `parentElm`. Luckily, `Node.nextSibling` will return `null` if there
|
|
1063
|
+
// aren't any siblings, and passing `null` to `Node.insertBefore` will
|
|
1064
|
+
// append it to the children of the parent element.
|
|
616
1065
|
parentElm.insertBefore(oldStartVnode.$elm$, oldEndVnode.$elm$.nextSibling);
|
|
617
1066
|
oldStartVnode = oldCh[++oldStartIdx];
|
|
618
1067
|
newEndVnode = newCh[--newEndIdx];
|
|
619
1068
|
}
|
|
620
1069
|
else if (isSameVnode(oldEndVnode, newStartVnode)) {
|
|
621
|
-
// Vnode moved left
|
|
1070
|
+
// case: "Vnode moved left"
|
|
1071
|
+
//
|
|
1072
|
+
// We've found that the first node in our window on the new children is
|
|
1073
|
+
// the same VNode as the _last_ node in our window on the old children.
|
|
1074
|
+
// Visually, this is the layout of these two nodes:
|
|
1075
|
+
//
|
|
1076
|
+
// newCh: [..., newStartVnode , ... , newEndVnode , ...]
|
|
1077
|
+
// ^^^^^^^^^^^^^
|
|
1078
|
+
// oldCh: [..., oldStartVnode , ... , oldEndVnode , ...]
|
|
1079
|
+
// ^^^^^^^^^^^
|
|
1080
|
+
//
|
|
1081
|
+
// In this situation we need to patch `newStartVnode` onto `oldEndVnode`
|
|
1082
|
+
// (which will handle updating any changed attributes, reconciling their
|
|
1083
|
+
// children etc) but we also need to move the DOM node to which
|
|
1084
|
+
// `oldEndVnode` corresponds.
|
|
622
1085
|
if ((oldStartVnode.$tag$ === 'slot' || newEndVnode.$tag$ === 'slot')) {
|
|
623
1086
|
putBackInOriginalLocation(oldEndVnode.$elm$.parentNode, false);
|
|
624
1087
|
}
|
|
625
1088
|
patch(oldEndVnode, newStartVnode);
|
|
1089
|
+
// We've already checked above if `oldStartVnode` and `newStartVnode` are
|
|
1090
|
+
// the same node, so since we're here we know that they are not. Thus we
|
|
1091
|
+
// can move the element for `oldEndVnode` _before_ the element for
|
|
1092
|
+
// `oldStartVnode`, leaving `oldStartVnode` to be reconciled in the
|
|
1093
|
+
// future.
|
|
626
1094
|
parentElm.insertBefore(oldEndVnode.$elm$, oldStartVnode.$elm$);
|
|
627
1095
|
oldEndVnode = oldCh[--oldEndIdx];
|
|
628
1096
|
newStartVnode = newCh[++newStartIdx];
|
|
629
1097
|
}
|
|
630
1098
|
else {
|
|
631
1099
|
{
|
|
632
|
-
//
|
|
1100
|
+
// We either didn't find an element in the old children that matches
|
|
1101
|
+
// the key of the first new child OR the build is not using `key`
|
|
1102
|
+
// attributes at all. In either case we need to create a new element
|
|
1103
|
+
// for the new node.
|
|
633
1104
|
node = createElm(oldCh && oldCh[newStartIdx], newVNode, newStartIdx, parentElm);
|
|
634
1105
|
newStartVnode = newCh[++newStartIdx];
|
|
635
1106
|
}
|
|
636
1107
|
if (node) {
|
|
1108
|
+
// if we created a new node then handle inserting it to the DOM
|
|
637
1109
|
{
|
|
638
1110
|
parentReferenceNode(oldStartVnode.$elm$).insertBefore(node, referenceNode(oldStartVnode.$elm$));
|
|
639
1111
|
}
|
|
@@ -641,18 +1113,40 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
|
641
1113
|
}
|
|
642
1114
|
}
|
|
643
1115
|
if (oldStartIdx > oldEndIdx) {
|
|
1116
|
+
// we have some more new nodes to add which don't match up with old nodes
|
|
644
1117
|
addVnodes(parentElm, newCh[newEndIdx + 1] == null ? null : newCh[newEndIdx + 1].$elm$, newVNode, newCh, newStartIdx, newEndIdx);
|
|
645
1118
|
}
|
|
646
1119
|
else if (newStartIdx > newEndIdx) {
|
|
1120
|
+
// there are nodes in the `oldCh` array which no longer correspond to nodes
|
|
1121
|
+
// in the new array, so lets remove them (which entails cleaning up the
|
|
1122
|
+
// relevant DOM nodes)
|
|
647
1123
|
removeVnodes(oldCh, oldStartIdx, oldEndIdx);
|
|
648
1124
|
}
|
|
649
1125
|
};
|
|
650
|
-
|
|
1126
|
+
/**
|
|
1127
|
+
* Compare two VNodes to determine if they are the same
|
|
1128
|
+
*
|
|
1129
|
+
* **NB**: This function is an equality _heuristic_ based on the available
|
|
1130
|
+
* information set on the two VNodes and can be misleading under certain
|
|
1131
|
+
* circumstances. In particular, if the two nodes do not have `key` attrs
|
|
1132
|
+
* (available under `$key$` on VNodes) then the function falls back on merely
|
|
1133
|
+
* checking that they have the same tag.
|
|
1134
|
+
*
|
|
1135
|
+
* So, in other words, if `key` attrs are not set on VNodes which may be
|
|
1136
|
+
* changing order within a `children` array or something along those lines then
|
|
1137
|
+
* we could obtain a false negative and then have to do needless re-rendering
|
|
1138
|
+
* (i.e. we'd say two VNodes aren't equal when in fact they should be).
|
|
1139
|
+
*
|
|
1140
|
+
* @param leftVNode the first VNode to check
|
|
1141
|
+
* @param rightVNode the second VNode to check
|
|
1142
|
+
* @returns whether they're equal or not
|
|
1143
|
+
*/
|
|
1144
|
+
const isSameVnode = (leftVNode, rightVNode) => {
|
|
651
1145
|
// compare if two vnode to see if they're "technically" the same
|
|
652
1146
|
// need to have the same element tag, and same key to be the same
|
|
653
|
-
if (
|
|
654
|
-
if (
|
|
655
|
-
return
|
|
1147
|
+
if (leftVNode.$tag$ === rightVNode.$tag$) {
|
|
1148
|
+
if (leftVNode.$tag$ === 'slot') {
|
|
1149
|
+
return leftVNode.$name$ === rightVNode.$name$;
|
|
656
1150
|
}
|
|
657
1151
|
return true;
|
|
658
1152
|
}
|
|
@@ -666,6 +1160,14 @@ const referenceNode = (node) => {
|
|
|
666
1160
|
return (node && node['s-ol']) || node;
|
|
667
1161
|
};
|
|
668
1162
|
const parentReferenceNode = (node) => (node['s-ol'] ? node['s-ol'] : node).parentNode;
|
|
1163
|
+
/**
|
|
1164
|
+
* Handle reconciling an outdated VNode with a new one which corresponds to
|
|
1165
|
+
* it. This function handles flushing updates to the DOM and reconciling the
|
|
1166
|
+
* children of the two nodes (if any).
|
|
1167
|
+
*
|
|
1168
|
+
* @param oldVNode an old VNode whose DOM element and children we want to update
|
|
1169
|
+
* @param newVNode a new VNode representing an updated version of the old one
|
|
1170
|
+
*/
|
|
669
1171
|
const patch = (oldVNode, newVNode) => {
|
|
670
1172
|
const elm = (newVNode.$elm$ = oldVNode.$elm$);
|
|
671
1173
|
const oldChildren = oldVNode.$children$;
|
|
@@ -674,7 +1176,6 @@ const patch = (oldVNode, newVNode) => {
|
|
|
674
1176
|
const text = newVNode.$text$;
|
|
675
1177
|
let defaultHolder;
|
|
676
1178
|
if (text === null) {
|
|
677
|
-
// element node
|
|
678
1179
|
{
|
|
679
1180
|
if (tag === 'slot')
|
|
680
1181
|
;
|
|
@@ -687,6 +1188,7 @@ const patch = (oldVNode, newVNode) => {
|
|
|
687
1188
|
}
|
|
688
1189
|
if (oldChildren !== null && newChildren !== null) {
|
|
689
1190
|
// looks like there's child vnodes for both the old and new vnodes
|
|
1191
|
+
// so we need to call `updateChildren` to reconcile them
|
|
690
1192
|
updateChildren(elm, oldChildren, newVNode, newChildren);
|
|
691
1193
|
}
|
|
692
1194
|
else if (newChildren !== null) {
|
|
@@ -724,7 +1226,7 @@ const updateFallbackSlotVisibility = (elm) => {
|
|
|
724
1226
|
let nodeType;
|
|
725
1227
|
for (i = 0, ilen = childNodes.length; i < ilen; i++) {
|
|
726
1228
|
childNode = childNodes[i];
|
|
727
|
-
if (childNode.nodeType === 1 /* ElementNode */) {
|
|
1229
|
+
if (childNode.nodeType === 1 /* NODE_TYPE.ElementNode */) {
|
|
728
1230
|
if (childNode['s-sr']) {
|
|
729
1231
|
// this is a slot fallback node
|
|
730
1232
|
// get the slot name for this slot reference node
|
|
@@ -736,7 +1238,7 @@ const updateFallbackSlotVisibility = (elm) => {
|
|
|
736
1238
|
nodeType = childNodes[j].nodeType;
|
|
737
1239
|
if (childNodes[j]['s-hn'] !== childNode['s-hn'] || slotNameAttr !== '') {
|
|
738
1240
|
// this sibling node is from a different component OR is a named fallback slot node
|
|
739
|
-
if (nodeType === 1 /* ElementNode */ && slotNameAttr === childNodes[j].getAttribute('slot')) {
|
|
1241
|
+
if (nodeType === 1 /* NODE_TYPE.ElementNode */ && slotNameAttr === childNodes[j].getAttribute('slot')) {
|
|
740
1242
|
childNode.hidden = true;
|
|
741
1243
|
break;
|
|
742
1244
|
}
|
|
@@ -745,8 +1247,8 @@ const updateFallbackSlotVisibility = (elm) => {
|
|
|
745
1247
|
// this is a default fallback slot node
|
|
746
1248
|
// any element or text node (with content)
|
|
747
1249
|
// should hide the default fallback slot node
|
|
748
|
-
if (nodeType === 1 /* ElementNode */ ||
|
|
749
|
-
(nodeType === 3 /* TextNode */ && childNodes[j].textContent.trim() !== '')) {
|
|
1250
|
+
if (nodeType === 1 /* NODE_TYPE.ElementNode */ ||
|
|
1251
|
+
(nodeType === 3 /* NODE_TYPE.TextNode */ && childNodes[j].textContent.trim() !== '')) {
|
|
750
1252
|
childNode.hidden = true;
|
|
751
1253
|
break;
|
|
752
1254
|
}
|
|
@@ -824,13 +1326,13 @@ const relocateSlotContent = (elm) => {
|
|
|
824
1326
|
}
|
|
825
1327
|
}
|
|
826
1328
|
}
|
|
827
|
-
if (childNode.nodeType === 1 /* ElementNode */) {
|
|
1329
|
+
if (childNode.nodeType === 1 /* NODE_TYPE.ElementNode */) {
|
|
828
1330
|
relocateSlotContent(childNode);
|
|
829
1331
|
}
|
|
830
1332
|
}
|
|
831
1333
|
};
|
|
832
1334
|
const isNodeLocatedInSlot = (nodeToRelocate, slotNameAttr) => {
|
|
833
|
-
if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
|
1335
|
+
if (nodeToRelocate.nodeType === 1 /* NODE_TYPE.ElementNode */) {
|
|
834
1336
|
if (nodeToRelocate.getAttribute('slot') === null && slotNameAttr === '') {
|
|
835
1337
|
return true;
|
|
836
1338
|
}
|
|
@@ -844,12 +1346,31 @@ const isNodeLocatedInSlot = (nodeToRelocate, slotNameAttr) => {
|
|
|
844
1346
|
}
|
|
845
1347
|
return slotNameAttr === '';
|
|
846
1348
|
};
|
|
847
|
-
|
|
1349
|
+
/**
|
|
1350
|
+
* 'Nullify' any VDom `ref` callbacks on a VDom node or its children by
|
|
1351
|
+
* calling them with `null`. This signals that the DOM element corresponding to
|
|
1352
|
+
* the VDom node has been removed from the DOM.
|
|
1353
|
+
*
|
|
1354
|
+
* @param vNode a virtual DOM node
|
|
1355
|
+
*/
|
|
1356
|
+
const nullifyVNodeRefs = (vNode) => {
|
|
848
1357
|
{
|
|
849
1358
|
vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
|
|
850
|
-
vNode.$children$ && vNode.$children$.map(
|
|
1359
|
+
vNode.$children$ && vNode.$children$.map(nullifyVNodeRefs);
|
|
851
1360
|
}
|
|
852
1361
|
};
|
|
1362
|
+
/**
|
|
1363
|
+
* The main entry point for Stencil's virtual DOM-based rendering engine
|
|
1364
|
+
*
|
|
1365
|
+
* Given a {@link d.HostRef} container and some virtual DOM nodes, this
|
|
1366
|
+
* function will handle creating a virtual DOM tree with a single root, patching
|
|
1367
|
+
* the current virtual DOM tree onto an old one (if any), dealing with slot
|
|
1368
|
+
* relocation, and reflecting attributes.
|
|
1369
|
+
*
|
|
1370
|
+
* @param hostRef data needed to root and render the virtual DOM tree, such as
|
|
1371
|
+
* the DOM node into which it should be rendered.
|
|
1372
|
+
* @param renderFnResults the virtual DOM nodes to be rendered
|
|
1373
|
+
*/
|
|
853
1374
|
const renderVdom = (hostRef, renderFnResults) => {
|
|
854
1375
|
const hostElm = hostRef.$hostElement$;
|
|
855
1376
|
const cmpMeta = hostRef.$cmpMeta$;
|
|
@@ -861,7 +1382,7 @@ const renderVdom = (hostRef, renderFnResults) => {
|
|
|
861
1382
|
cmpMeta.$attrsToReflect$.map(([propName, attribute]) => (rootVnode.$attrs$[attribute] = hostElm[propName]));
|
|
862
1383
|
}
|
|
863
1384
|
rootVnode.$tag$ = null;
|
|
864
|
-
rootVnode.$flags$ |= 4 /* isHost */;
|
|
1385
|
+
rootVnode.$flags$ |= 4 /* VNODE_FLAGS.isHost */;
|
|
865
1386
|
hostRef.$vnode$ = rootVnode;
|
|
866
1387
|
rootVnode.$elm$ = oldVNode.$elm$ = (hostElm.shadowRoot || hostElm );
|
|
867
1388
|
{
|
|
@@ -869,7 +1390,7 @@ const renderVdom = (hostRef, renderFnResults) => {
|
|
|
869
1390
|
}
|
|
870
1391
|
{
|
|
871
1392
|
contentRef = hostElm['s-cr'];
|
|
872
|
-
useNativeShadowDom = (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) !== 0;
|
|
1393
|
+
useNativeShadowDom = (cmpMeta.$flags$ & 1 /* CMP_FLAGS.shadowDomEncapsulation */) !== 0;
|
|
873
1394
|
// always reset
|
|
874
1395
|
checkSlotFallbackVisibility = false;
|
|
875
1396
|
}
|
|
@@ -878,7 +1399,7 @@ const renderVdom = (hostRef, renderFnResults) => {
|
|
|
878
1399
|
{
|
|
879
1400
|
// while we're moving nodes around existing nodes, temporarily disable
|
|
880
1401
|
// the disconnectCallback from working
|
|
881
|
-
plt.$flags$ |= 1 /* isTmpDisconnected */;
|
|
1402
|
+
plt.$flags$ |= 1 /* PLATFORM_FLAGS.isTmpDisconnected */;
|
|
882
1403
|
if (checkSlotRelocate) {
|
|
883
1404
|
relocateSlotContent(rootVnode.$elm$);
|
|
884
1405
|
let relocateData;
|
|
@@ -936,7 +1457,7 @@ const renderVdom = (hostRef, renderFnResults) => {
|
|
|
936
1457
|
}
|
|
937
1458
|
else {
|
|
938
1459
|
// this node doesn't have a slot home to go to, so let's hide it
|
|
939
|
-
if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
|
1460
|
+
if (nodeToRelocate.nodeType === 1 /* NODE_TYPE.ElementNode */) {
|
|
940
1461
|
nodeToRelocate.hidden = true;
|
|
941
1462
|
}
|
|
942
1463
|
}
|
|
@@ -947,37 +1468,11 @@ const renderVdom = (hostRef, renderFnResults) => {
|
|
|
947
1468
|
}
|
|
948
1469
|
// done moving nodes around
|
|
949
1470
|
// allow the disconnect callback to work again
|
|
950
|
-
plt.$flags$ &= ~1 /* isTmpDisconnected */;
|
|
1471
|
+
plt.$flags$ &= ~1 /* PLATFORM_FLAGS.isTmpDisconnected */;
|
|
951
1472
|
// always reset
|
|
952
1473
|
relocateNodes.length = 0;
|
|
953
1474
|
}
|
|
954
1475
|
};
|
|
955
|
-
const getElement = (ref) => (getHostRef(ref).$hostElement$ );
|
|
956
|
-
const createEvent = (ref, name, flags) => {
|
|
957
|
-
const elm = getElement(ref);
|
|
958
|
-
return {
|
|
959
|
-
emit: (detail) => {
|
|
960
|
-
return emitEvent(elm, name, {
|
|
961
|
-
bubbles: !!(flags & 4 /* Bubbles */),
|
|
962
|
-
composed: !!(flags & 2 /* Composed */),
|
|
963
|
-
cancelable: !!(flags & 1 /* Cancellable */),
|
|
964
|
-
detail,
|
|
965
|
-
});
|
|
966
|
-
},
|
|
967
|
-
};
|
|
968
|
-
};
|
|
969
|
-
/**
|
|
970
|
-
* Helper function to create & dispatch a custom Event on a provided target
|
|
971
|
-
* @param elm the target of the Event
|
|
972
|
-
* @param name the name to give the custom Event
|
|
973
|
-
* @param opts options for configuring a custom Event
|
|
974
|
-
* @returns the custom Event
|
|
975
|
-
*/
|
|
976
|
-
const emitEvent = (elm, name, opts) => {
|
|
977
|
-
const ev = plt.ce(name, opts);
|
|
978
|
-
elm.dispatchEvent(ev);
|
|
979
|
-
return ev;
|
|
980
|
-
};
|
|
981
1476
|
const attachToAncestor = (hostRef, ancestorComponent) => {
|
|
982
1477
|
if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent['s-p']) {
|
|
983
1478
|
ancestorComponent['s-p'].push(new Promise((r) => (hostRef.$onRenderResolve$ = r)));
|
|
@@ -985,10 +1480,10 @@ const attachToAncestor = (hostRef, ancestorComponent) => {
|
|
|
985
1480
|
};
|
|
986
1481
|
const scheduleUpdate = (hostRef, isInitialLoad) => {
|
|
987
1482
|
{
|
|
988
|
-
hostRef.$flags$ |= 16 /* isQueuedForUpdate */;
|
|
1483
|
+
hostRef.$flags$ |= 16 /* HOST_FLAGS.isQueuedForUpdate */;
|
|
989
1484
|
}
|
|
990
|
-
if (hostRef.$flags$ & 4 /* isWaitingForChildren */) {
|
|
991
|
-
hostRef.$flags$ |= 512 /* needsRerender */;
|
|
1485
|
+
if (hostRef.$flags$ & 4 /* HOST_FLAGS.isWaitingForChildren */) {
|
|
1486
|
+
hostRef.$flags$ |= 512 /* HOST_FLAGS.needsRerender */;
|
|
992
1487
|
return;
|
|
993
1488
|
}
|
|
994
1489
|
attachToAncestor(hostRef, hostRef.$ancestorComponent$);
|
|
@@ -998,30 +1493,73 @@ const scheduleUpdate = (hostRef, isInitialLoad) => {
|
|
|
998
1493
|
const dispatch = () => dispatchHooks(hostRef, isInitialLoad);
|
|
999
1494
|
return writeTask(dispatch) ;
|
|
1000
1495
|
};
|
|
1496
|
+
/**
|
|
1497
|
+
* Dispatch initial-render and update lifecycle hooks, enqueuing calls to
|
|
1498
|
+
* component lifecycle methods like `componentWillLoad` as well as
|
|
1499
|
+
* {@link updateComponent}, which will kick off the virtual DOM re-render.
|
|
1500
|
+
*
|
|
1501
|
+
* @param hostRef a reference to a host DOM node
|
|
1502
|
+
* @param isInitialLoad whether we're on the initial load or not
|
|
1503
|
+
* @returns an empty Promise which is used to enqueue a series of operations for
|
|
1504
|
+
* the component
|
|
1505
|
+
*/
|
|
1001
1506
|
const dispatchHooks = (hostRef, isInitialLoad) => {
|
|
1002
1507
|
const endSchedule = createTime('scheduleUpdate', hostRef.$cmpMeta$.$tagName$);
|
|
1003
1508
|
const instance = hostRef.$lazyInstance$ ;
|
|
1004
|
-
|
|
1509
|
+
// We're going to use this variable together with `enqueue` to implement a
|
|
1510
|
+
// little promise-based queue. We start out with it `undefined`. When we add
|
|
1511
|
+
// the first function to the queue we'll set this variable to be that
|
|
1512
|
+
// function's return value. When we attempt to add subsequent values to the
|
|
1513
|
+
// queue we'll check that value and, if it was a `Promise`, we'll then chain
|
|
1514
|
+
// the new function off of that `Promise` using `.then()`. This will give our
|
|
1515
|
+
// queue two nice properties:
|
|
1516
|
+
//
|
|
1517
|
+
// 1. If all functions added to the queue are synchronous they'll be called
|
|
1518
|
+
// synchronously right away.
|
|
1519
|
+
// 2. If all functions added to the queue are asynchronous they'll all be
|
|
1520
|
+
// called in order after `dispatchHooks` exits.
|
|
1521
|
+
let maybePromise;
|
|
1005
1522
|
if (isInitialLoad) {
|
|
1006
1523
|
{
|
|
1007
|
-
hostRef.$flags$ |= 256 /* isListenReady */;
|
|
1524
|
+
hostRef.$flags$ |= 256 /* HOST_FLAGS.isListenReady */;
|
|
1008
1525
|
if (hostRef.$queuedListeners$) {
|
|
1009
1526
|
hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event));
|
|
1010
1527
|
hostRef.$queuedListeners$ = null;
|
|
1011
1528
|
}
|
|
1012
1529
|
}
|
|
1013
1530
|
{
|
|
1014
|
-
|
|
1531
|
+
// If `componentWillLoad` returns a `Promise` then we want to wait on
|
|
1532
|
+
// whatever's going on in that `Promise` before we launch into
|
|
1533
|
+
// rendering the component, doing other lifecycle stuff, etc. So
|
|
1534
|
+
// in that case we assign the returned promise to the variable we
|
|
1535
|
+
// declared above to hold a possible 'queueing' Promise
|
|
1536
|
+
maybePromise = safeCall(instance, 'componentWillLoad');
|
|
1015
1537
|
}
|
|
1016
1538
|
}
|
|
1017
1539
|
{
|
|
1018
|
-
|
|
1540
|
+
maybePromise = enqueue(maybePromise, () => safeCall(instance, 'componentWillRender'));
|
|
1019
1541
|
}
|
|
1020
1542
|
endSchedule();
|
|
1021
|
-
return
|
|
1543
|
+
return enqueue(maybePromise, () => updateComponent(hostRef, instance, isInitialLoad));
|
|
1022
1544
|
};
|
|
1545
|
+
/**
|
|
1546
|
+
* This function uses a Promise to implement a simple first-in, first-out queue
|
|
1547
|
+
* of functions to be called.
|
|
1548
|
+
*
|
|
1549
|
+
* The queue is ordered on the basis of the first argument. If it's
|
|
1550
|
+
* `undefined`, then nothing is on the queue yet, so the provided function can
|
|
1551
|
+
* be called synchronously (although note that this function may return a
|
|
1552
|
+
* `Promise`). The idea is that then the return value of that enqueueing
|
|
1553
|
+
* operation is kept around, so that if it was a `Promise` then subsequent
|
|
1554
|
+
* functions can be enqueued by calling this function again with that `Promise`
|
|
1555
|
+
* as the first argument.
|
|
1556
|
+
*
|
|
1557
|
+
* @param maybePromise either a `Promise` which should resolve before the next function is called or an 'empty' sentinel
|
|
1558
|
+
* @param fn a function to enqueue
|
|
1559
|
+
* @returns either a `Promise` or the return value of the provided function
|
|
1560
|
+
*/
|
|
1561
|
+
const enqueue = (maybePromise, fn) => maybePromise instanceof Promise ? maybePromise.then(fn) : fn();
|
|
1023
1562
|
const updateComponent = async (hostRef, instance, isInitialLoad) => {
|
|
1024
|
-
// updateComponent
|
|
1025
1563
|
const elm = hostRef.$hostElement$;
|
|
1026
1564
|
const endUpdate = createTime('update', hostRef.$cmpMeta$.$tagName$);
|
|
1027
1565
|
const rc = elm['s-rc'];
|
|
@@ -1050,7 +1588,7 @@ const updateComponent = async (hostRef, instance, isInitialLoad) => {
|
|
|
1050
1588
|
}
|
|
1051
1589
|
else {
|
|
1052
1590
|
Promise.all(childrenPromises).then(postUpdate);
|
|
1053
|
-
hostRef.$flags$ |= 4 /* isWaitingForChildren */;
|
|
1591
|
+
hostRef.$flags$ |= 4 /* HOST_FLAGS.isWaitingForChildren */;
|
|
1054
1592
|
childrenPromises.length = 0;
|
|
1055
1593
|
}
|
|
1056
1594
|
}
|
|
@@ -1059,10 +1597,10 @@ const callRender = (hostRef, instance, elm) => {
|
|
|
1059
1597
|
try {
|
|
1060
1598
|
instance = instance.render() ;
|
|
1061
1599
|
{
|
|
1062
|
-
hostRef.$flags$ &= ~16 /* isQueuedForUpdate */;
|
|
1600
|
+
hostRef.$flags$ &= ~16 /* HOST_FLAGS.isQueuedForUpdate */;
|
|
1063
1601
|
}
|
|
1064
1602
|
{
|
|
1065
|
-
hostRef.$flags$ |= 2 /* hasRendered */;
|
|
1603
|
+
hostRef.$flags$ |= 2 /* HOST_FLAGS.hasRendered */;
|
|
1066
1604
|
}
|
|
1067
1605
|
{
|
|
1068
1606
|
{
|
|
@@ -1089,8 +1627,8 @@ const postUpdateComponent = (hostRef) => {
|
|
|
1089
1627
|
{
|
|
1090
1628
|
safeCall(instance, 'componentDidRender');
|
|
1091
1629
|
}
|
|
1092
|
-
if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
|
|
1093
|
-
hostRef.$flags$ |= 64 /* hasLoadedComponent */;
|
|
1630
|
+
if (!(hostRef.$flags$ & 64 /* HOST_FLAGS.hasLoadedComponent */)) {
|
|
1631
|
+
hostRef.$flags$ |= 64 /* HOST_FLAGS.hasLoadedComponent */;
|
|
1094
1632
|
{
|
|
1095
1633
|
// DOM WRITE!
|
|
1096
1634
|
addHydratedFlag(elm);
|
|
@@ -1107,6 +1645,9 @@ const postUpdateComponent = (hostRef) => {
|
|
|
1107
1645
|
}
|
|
1108
1646
|
}
|
|
1109
1647
|
else {
|
|
1648
|
+
{
|
|
1649
|
+
safeCall(instance, 'componentDidUpdate');
|
|
1650
|
+
}
|
|
1110
1651
|
endPostUpdate();
|
|
1111
1652
|
}
|
|
1112
1653
|
// load events fire from bottom to top
|
|
@@ -1116,10 +1657,10 @@ const postUpdateComponent = (hostRef) => {
|
|
|
1116
1657
|
hostRef.$onRenderResolve$();
|
|
1117
1658
|
hostRef.$onRenderResolve$ = undefined;
|
|
1118
1659
|
}
|
|
1119
|
-
if (hostRef.$flags$ & 512 /* needsRerender */) {
|
|
1660
|
+
if (hostRef.$flags$ & 512 /* HOST_FLAGS.needsRerender */) {
|
|
1120
1661
|
nextTick(() => scheduleUpdate(hostRef, false));
|
|
1121
1662
|
}
|
|
1122
|
-
hostRef.$flags$ &= ~(4 /* isWaitingForChildren */ | 512 /* needsRerender */);
|
|
1663
|
+
hostRef.$flags$ &= ~(4 /* HOST_FLAGS.isWaitingForChildren */ | 512 /* HOST_FLAGS.needsRerender */);
|
|
1123
1664
|
}
|
|
1124
1665
|
// ( •_•)
|
|
1125
1666
|
// ( •_•)>⌐■-■
|
|
@@ -1144,58 +1685,8 @@ const safeCall = (instance, method, arg) => {
|
|
|
1144
1685
|
}
|
|
1145
1686
|
return undefined;
|
|
1146
1687
|
};
|
|
1147
|
-
const then = (promise, thenFn) => {
|
|
1148
|
-
return promise && promise.then ? promise.then(thenFn) : thenFn();
|
|
1149
|
-
};
|
|
1150
1688
|
const addHydratedFlag = (elm) => elm.classList.add('hydrated')
|
|
1151
1689
|
;
|
|
1152
|
-
/**
|
|
1153
|
-
* Parse a new property value for a given property type.
|
|
1154
|
-
*
|
|
1155
|
-
* While the prop value can reasonably be expected to be of `any` type as far as TypeScript's type checker is concerned,
|
|
1156
|
-
* it is not safe to assume that the string returned by evaluating `typeof propValue` matches:
|
|
1157
|
-
* 1. `any`, the type given to `propValue` in the function signature
|
|
1158
|
-
* 2. the type stored from `propType`.
|
|
1159
|
-
*
|
|
1160
|
-
* This function provides the capability to parse/coerce a property's value to potentially any other JavaScript type.
|
|
1161
|
-
*
|
|
1162
|
-
* Property values represented in TSX preserve their type information. In the example below, the number 0 is passed to
|
|
1163
|
-
* a component. This `propValue` will preserve its type information (`typeof propValue === 'number'`). Note that is
|
|
1164
|
-
* based on the type of the value being passed in, not the type declared of the class member decorated with `@Prop`.
|
|
1165
|
-
* ```tsx
|
|
1166
|
-
* <my-cmp prop-val={0}></my-cmp>
|
|
1167
|
-
* ```
|
|
1168
|
-
*
|
|
1169
|
-
* HTML prop values on the other hand, will always a string
|
|
1170
|
-
*
|
|
1171
|
-
* @param propValue the new value to coerce to some type
|
|
1172
|
-
* @param propType the type of the prop, expressed as a binary number
|
|
1173
|
-
* @returns the parsed/coerced value
|
|
1174
|
-
*/
|
|
1175
|
-
const parsePropertyValue = (propValue, propType) => {
|
|
1176
|
-
// ensure this value is of the correct prop type
|
|
1177
|
-
if (propValue != null && !isComplexType(propValue)) {
|
|
1178
|
-
if (propType & 4 /* Boolean */) {
|
|
1179
|
-
// per the HTML spec, any string value means it is a boolean true value
|
|
1180
|
-
// but we'll cheat here and say that the string "false" is the boolean false
|
|
1181
|
-
return propValue === 'false' ? false : propValue === '' || !!propValue;
|
|
1182
|
-
}
|
|
1183
|
-
if (propType & 2 /* Number */) {
|
|
1184
|
-
// force it to be a number
|
|
1185
|
-
return parseFloat(propValue);
|
|
1186
|
-
}
|
|
1187
|
-
if (propType & 1 /* String */) {
|
|
1188
|
-
// could have been passed as a number or boolean
|
|
1189
|
-
// but we still want it as a string
|
|
1190
|
-
return String(propValue);
|
|
1191
|
-
}
|
|
1192
|
-
// redundant return here for better minification
|
|
1193
|
-
return propValue;
|
|
1194
|
-
}
|
|
1195
|
-
// not sure exactly what type we want
|
|
1196
|
-
// so no need to change to a different type
|
|
1197
|
-
return propValue;
|
|
1198
|
-
};
|
|
1199
1690
|
const getValue = (ref, propName) => getHostRef(ref).$instanceValues$.get(propName);
|
|
1200
1691
|
const setValue = (ref, propName, newVal, cmpMeta) => {
|
|
1201
1692
|
// check our new property value against our internal value
|
|
@@ -1208,13 +1699,13 @@ const setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
1208
1699
|
// explicitly check for NaN on both sides, as `NaN === NaN` is always false
|
|
1209
1700
|
const areBothNaN = Number.isNaN(oldVal) && Number.isNaN(newVal);
|
|
1210
1701
|
const didValueChange = newVal !== oldVal && !areBothNaN;
|
|
1211
|
-
if ((!(flags & 8 /* isConstructingInstance */) || oldVal === undefined) && didValueChange) {
|
|
1702
|
+
if ((!(flags & 8 /* HOST_FLAGS.isConstructingInstance */) || oldVal === undefined) && didValueChange) {
|
|
1212
1703
|
// gadzooks! the property's value has changed!!
|
|
1213
1704
|
// set our new value!
|
|
1214
1705
|
hostRef.$instanceValues$.set(propName, newVal);
|
|
1215
1706
|
if (instance) {
|
|
1216
1707
|
// get an array of method names of watch functions to call
|
|
1217
|
-
if (cmpMeta.$watchers$ && flags & 128 /* isWatchReady */) {
|
|
1708
|
+
if (cmpMeta.$watchers$ && flags & 128 /* HOST_FLAGS.isWatchReady */) {
|
|
1218
1709
|
const watchMethods = cmpMeta.$watchers$[propName];
|
|
1219
1710
|
if (watchMethods) {
|
|
1220
1711
|
// this instance is watching for when this property changed
|
|
@@ -1229,7 +1720,7 @@ const setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
1229
1720
|
});
|
|
1230
1721
|
}
|
|
1231
1722
|
}
|
|
1232
|
-
if ((flags & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
|
|
1723
|
+
if ((flags & (2 /* HOST_FLAGS.hasRendered */ | 16 /* HOST_FLAGS.isQueuedForUpdate */)) === 2 /* HOST_FLAGS.hasRendered */) {
|
|
1233
1724
|
if (instance.componentShouldUpdate) {
|
|
1234
1725
|
if (instance.componentShouldUpdate(newVal, oldVal, propName) === false) {
|
|
1235
1726
|
return;
|
|
@@ -1244,6 +1735,16 @@ const setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
1244
1735
|
}
|
|
1245
1736
|
}
|
|
1246
1737
|
};
|
|
1738
|
+
/**
|
|
1739
|
+
* Attach a series of runtime constructs to a compiled Stencil component
|
|
1740
|
+
* constructor, including getters and setters for the `@Prop` and `@State`
|
|
1741
|
+
* decorators, callbacks for when attributes change, and so on.
|
|
1742
|
+
*
|
|
1743
|
+
* @param Cstr the constructor for a component that we need to process
|
|
1744
|
+
* @param cmpMeta metadata collected previously about the component
|
|
1745
|
+
* @param flags a number used to store a series of bit flags
|
|
1746
|
+
* @returns a reference to the same constructor passed in (but now mutated)
|
|
1747
|
+
*/
|
|
1247
1748
|
const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
1248
1749
|
if (cmpMeta.$members$) {
|
|
1249
1750
|
if (Cstr.watchers) {
|
|
@@ -1253,8 +1754,8 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1253
1754
|
const members = Object.entries(cmpMeta.$members$);
|
|
1254
1755
|
const prototype = Cstr.prototype;
|
|
1255
1756
|
members.map(([memberName, [memberFlags]]) => {
|
|
1256
|
-
if ((memberFlags & 31 /* Prop */ ||
|
|
1257
|
-
((flags & 2 /* proxyState */) && memberFlags & 32 /* State */))) {
|
|
1757
|
+
if ((memberFlags & 31 /* MEMBER_FLAGS.Prop */ ||
|
|
1758
|
+
((flags & 2 /* PROXY_FLAGS.proxyState */) && memberFlags & 32 /* MEMBER_FLAGS.State */))) {
|
|
1258
1759
|
// proxyComponent - prop
|
|
1259
1760
|
Object.defineProperty(prototype, memberName, {
|
|
1260
1761
|
get() {
|
|
@@ -1270,7 +1771,7 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1270
1771
|
});
|
|
1271
1772
|
}
|
|
1272
1773
|
});
|
|
1273
|
-
if ((flags & 1 /* isElementConstructor */)) {
|
|
1774
|
+
if ((flags & 1 /* PROXY_FLAGS.isElementConstructor */)) {
|
|
1274
1775
|
const attrNameToPropName = new Map();
|
|
1275
1776
|
prototype.attributeChangedCallback = function (attrName, _oldValue, newValue) {
|
|
1276
1777
|
plt.jmp(() => {
|
|
@@ -1326,11 +1827,11 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1326
1827
|
// create an array of attributes to observe
|
|
1327
1828
|
// and also create a map of html attribute name to js property name
|
|
1328
1829
|
Cstr.observedAttributes = members
|
|
1329
|
-
.filter(([_, m]) => m[0] & 15 /* HasAttribute */) // filter to only keep props that should match attributes
|
|
1830
|
+
.filter(([_, m]) => m[0] & 15 /* MEMBER_FLAGS.HasAttribute */) // filter to only keep props that should match attributes
|
|
1330
1831
|
.map(([propName, m]) => {
|
|
1331
1832
|
const attrName = m[1] || propName;
|
|
1332
1833
|
attrNameToPropName.set(attrName, propName);
|
|
1333
|
-
if (m[0] & 512 /* ReflectAttr */) {
|
|
1834
|
+
if (m[0] & 512 /* MEMBER_FLAGS.ReflectAttr */) {
|
|
1334
1835
|
cmpMeta.$attrsToReflect$.push([propName, attrName]);
|
|
1335
1836
|
}
|
|
1336
1837
|
return attrName;
|
|
@@ -1341,10 +1842,10 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1341
1842
|
};
|
|
1342
1843
|
const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) => {
|
|
1343
1844
|
// initializeComponent
|
|
1344
|
-
if ((hostRef.$flags$ & 32 /* hasInitializedComponent */) === 0) {
|
|
1845
|
+
if ((hostRef.$flags$ & 32 /* HOST_FLAGS.hasInitializedComponent */) === 0) {
|
|
1846
|
+
// Let the runtime know that the component has been initialized
|
|
1847
|
+
hostRef.$flags$ |= 32 /* HOST_FLAGS.hasInitializedComponent */;
|
|
1345
1848
|
{
|
|
1346
|
-
// we haven't initialized this element yet
|
|
1347
|
-
hostRef.$flags$ |= 32 /* hasInitializedComponent */;
|
|
1348
1849
|
// lazy loaded components
|
|
1349
1850
|
// request the component's implementation to be
|
|
1350
1851
|
// wired up with the host element
|
|
@@ -1362,7 +1863,7 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
|
|
|
1362
1863
|
{
|
|
1363
1864
|
cmpMeta.$watchers$ = Cstr.watchers;
|
|
1364
1865
|
}
|
|
1365
|
-
proxyComponent(Cstr, cmpMeta, 2 /* proxyState */);
|
|
1866
|
+
proxyComponent(Cstr, cmpMeta, 2 /* PROXY_FLAGS.proxyState */);
|
|
1366
1867
|
Cstr.isProxied = true;
|
|
1367
1868
|
}
|
|
1368
1869
|
const endNewInstance = createTime('createInstance', cmpMeta.$tagName$);
|
|
@@ -1370,7 +1871,7 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
|
|
|
1370
1871
|
// but let's keep track of when we start and stop
|
|
1371
1872
|
// so that the getters/setters don't incorrectly step on data
|
|
1372
1873
|
{
|
|
1373
|
-
hostRef.$flags$ |= 8 /* isConstructingInstance */;
|
|
1874
|
+
hostRef.$flags$ |= 8 /* HOST_FLAGS.isConstructingInstance */;
|
|
1374
1875
|
}
|
|
1375
1876
|
// construct the lazy-loaded component implementation
|
|
1376
1877
|
// passing the hostRef is very important during
|
|
@@ -1383,10 +1884,10 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
|
|
|
1383
1884
|
consoleError(e);
|
|
1384
1885
|
}
|
|
1385
1886
|
{
|
|
1386
|
-
hostRef.$flags$ &= ~8 /* isConstructingInstance */;
|
|
1887
|
+
hostRef.$flags$ &= ~8 /* HOST_FLAGS.isConstructingInstance */;
|
|
1387
1888
|
}
|
|
1388
1889
|
{
|
|
1389
|
-
hostRef.$flags$ |= 128 /* isWatchReady */;
|
|
1890
|
+
hostRef.$flags$ |= 128 /* HOST_FLAGS.isWatchReady */;
|
|
1390
1891
|
}
|
|
1391
1892
|
endNewInstance();
|
|
1392
1893
|
}
|
|
@@ -1396,7 +1897,7 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
|
|
|
1396
1897
|
const scopeId = getScopeId(cmpMeta);
|
|
1397
1898
|
if (!styles.has(scopeId)) {
|
|
1398
1899
|
const endRegisterStyles = createTime('registerStyles', cmpMeta.$tagName$);
|
|
1399
|
-
registerStyle(scopeId, style, !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */));
|
|
1900
|
+
registerStyle(scopeId, style, !!(cmpMeta.$flags$ & 1 /* CMP_FLAGS.shadowDomEncapsulation */));
|
|
1400
1901
|
endRegisterStyles();
|
|
1401
1902
|
}
|
|
1402
1903
|
}
|
|
@@ -1418,19 +1919,31 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
|
|
|
1418
1919
|
}
|
|
1419
1920
|
};
|
|
1420
1921
|
const connectedCallback = (elm) => {
|
|
1421
|
-
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
|
|
1922
|
+
if ((plt.$flags$ & 1 /* PLATFORM_FLAGS.isTmpDisconnected */) === 0) {
|
|
1422
1923
|
const hostRef = getHostRef(elm);
|
|
1423
1924
|
const cmpMeta = hostRef.$cmpMeta$;
|
|
1424
1925
|
const endConnected = createTime('connectedCallback', cmpMeta.$tagName$);
|
|
1425
|
-
if (!(hostRef.$flags$ & 1 /* hasConnected */)) {
|
|
1926
|
+
if (!(hostRef.$flags$ & 1 /* HOST_FLAGS.hasConnected */)) {
|
|
1426
1927
|
// first time this component has connected
|
|
1427
|
-
hostRef.$flags$ |= 1 /* hasConnected */;
|
|
1928
|
+
hostRef.$flags$ |= 1 /* HOST_FLAGS.hasConnected */;
|
|
1929
|
+
let hostId;
|
|
1428
1930
|
{
|
|
1931
|
+
hostId = elm.getAttribute(HYDRATE_ID);
|
|
1932
|
+
if (hostId) {
|
|
1933
|
+
if (cmpMeta.$flags$ & 1 /* CMP_FLAGS.shadowDomEncapsulation */) {
|
|
1934
|
+
const scopeId = addStyle(elm.shadowRoot, cmpMeta);
|
|
1935
|
+
elm.classList.remove(scopeId + '-h', scopeId + '-s');
|
|
1936
|
+
}
|
|
1937
|
+
initializeClientHydrate(elm, cmpMeta.$tagName$, hostId, hostRef);
|
|
1938
|
+
}
|
|
1939
|
+
}
|
|
1940
|
+
if (!hostId) {
|
|
1429
1941
|
// initUpdate
|
|
1430
1942
|
// if the slot polyfill is required we'll need to put some nodes
|
|
1431
1943
|
// in here to act as original content anchors as we move nodes around
|
|
1432
1944
|
// host element has been connected to the DOM
|
|
1433
|
-
if ((
|
|
1945
|
+
if ((// TODO(STENCIL-662): Remove code related to deprecated shadowDomShim field
|
|
1946
|
+
cmpMeta.$flags$ & (4 /* CMP_FLAGS.hasSlotRelocation */ | 8 /* CMP_FLAGS.needsShadowDomShim */))) {
|
|
1434
1947
|
setContentReference(elm);
|
|
1435
1948
|
}
|
|
1436
1949
|
}
|
|
@@ -1441,7 +1954,10 @@ const connectedCallback = (elm) => {
|
|
|
1441
1954
|
while ((ancestorComponent = ancestorComponent.parentNode || ancestorComponent.host)) {
|
|
1442
1955
|
// climb up the ancestors looking for the first
|
|
1443
1956
|
// component that hasn't finished its lifecycle update yet
|
|
1444
|
-
if (ancestorComponent
|
|
1957
|
+
if ((ancestorComponent.nodeType === 1 /* NODE_TYPE.ElementNode */ &&
|
|
1958
|
+
ancestorComponent.hasAttribute('s-id') &&
|
|
1959
|
+
ancestorComponent['s-p']) ||
|
|
1960
|
+
ancestorComponent['s-p']) {
|
|
1445
1961
|
// we found this components first ancestor component
|
|
1446
1962
|
// keep a reference to this component's ancestor component
|
|
1447
1963
|
attachToAncestor(hostRef, (hostRef.$ancestorComponent$ = ancestorComponent));
|
|
@@ -1453,7 +1969,7 @@ const connectedCallback = (elm) => {
|
|
|
1453
1969
|
// https://developers.google.com/web/fundamentals/web-components/best-practices#lazy-properties
|
|
1454
1970
|
if (cmpMeta.$members$) {
|
|
1455
1971
|
Object.entries(cmpMeta.$members$).map(([memberName, [memberFlags]]) => {
|
|
1456
|
-
if (memberFlags & 31 /* Prop */ && elm.hasOwnProperty(memberName)) {
|
|
1972
|
+
if (memberFlags & 31 /* MEMBER_FLAGS.Prop */ && elm.hasOwnProperty(memberName)) {
|
|
1457
1973
|
const value = elm[memberName];
|
|
1458
1974
|
delete elm[memberName];
|
|
1459
1975
|
elm[memberName] = value;
|
|
@@ -1485,17 +2001,22 @@ const setContentReference = (elm) => {
|
|
|
1485
2001
|
elm.insertBefore(contentRefElm, elm.firstChild);
|
|
1486
2002
|
};
|
|
1487
2003
|
const disconnectedCallback = (elm) => {
|
|
1488
|
-
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
|
|
2004
|
+
if ((plt.$flags$ & 1 /* PLATFORM_FLAGS.isTmpDisconnected */) === 0) {
|
|
1489
2005
|
const hostRef = getHostRef(elm);
|
|
2006
|
+
const instance = hostRef.$lazyInstance$ ;
|
|
1490
2007
|
{
|
|
1491
2008
|
if (hostRef.$rmListeners$) {
|
|
1492
2009
|
hostRef.$rmListeners$.map((rmListener) => rmListener());
|
|
1493
2010
|
hostRef.$rmListeners$ = undefined;
|
|
1494
2011
|
}
|
|
1495
2012
|
}
|
|
2013
|
+
{
|
|
2014
|
+
safeCall(instance, 'disconnectedCallback');
|
|
2015
|
+
}
|
|
1496
2016
|
}
|
|
1497
2017
|
};
|
|
1498
2018
|
const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
2019
|
+
var _a;
|
|
1499
2020
|
const endBootstrap = createTime();
|
|
1500
2021
|
const cmpTags = [];
|
|
1501
2022
|
const exclude = options.exclude || [];
|
|
@@ -1504,10 +2025,22 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1504
2025
|
const metaCharset = /*@__PURE__*/ head.querySelector('meta[charset]');
|
|
1505
2026
|
const visibilityStyle = /*@__PURE__*/ doc.createElement('style');
|
|
1506
2027
|
const deferredConnectedCallbacks = [];
|
|
2028
|
+
const styles = /*@__PURE__*/ doc.querySelectorAll(`[${HYDRATED_STYLE_ID}]`);
|
|
1507
2029
|
let appLoadFallback;
|
|
1508
2030
|
let isBootstrapping = true;
|
|
2031
|
+
let i = 0;
|
|
1509
2032
|
Object.assign(plt, options);
|
|
1510
2033
|
plt.$resourcesUrl$ = new URL(options.resourcesUrl || './', doc.baseURI).href;
|
|
2034
|
+
{
|
|
2035
|
+
// If the app is already hydrated there is not point to disable the
|
|
2036
|
+
// async queue. This will improve the first input delay
|
|
2037
|
+
plt.$flags$ |= 2 /* PLATFORM_FLAGS.appLoaded */;
|
|
2038
|
+
}
|
|
2039
|
+
{
|
|
2040
|
+
for (; i < styles.length; i++) {
|
|
2041
|
+
registerStyle(styles[i].getAttribute(HYDRATED_STYLE_ID), convertScopedToShadow(styles[i].innerHTML), true);
|
|
2042
|
+
}
|
|
2043
|
+
}
|
|
1511
2044
|
lazyBundles.map((lazyBundle) => {
|
|
1512
2045
|
lazyBundle[1].map((compactMeta) => {
|
|
1513
2046
|
const cmpMeta = {
|
|
@@ -1536,7 +2069,7 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1536
2069
|
super(self);
|
|
1537
2070
|
self = this;
|
|
1538
2071
|
registerHost(self, cmpMeta);
|
|
1539
|
-
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
|
|
2072
|
+
if (cmpMeta.$flags$ & 1 /* CMP_FLAGS.shadowDomEncapsulation */) {
|
|
1540
2073
|
// this component is using shadow dom
|
|
1541
2074
|
// and this browser supports shadow dom
|
|
1542
2075
|
// add the read-only property "shadowRoot" to the host element
|
|
@@ -1571,13 +2104,18 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1571
2104
|
cmpMeta.$lazyBundleId$ = lazyBundle[0];
|
|
1572
2105
|
if (!exclude.includes(tagName) && !customElements.get(tagName)) {
|
|
1573
2106
|
cmpTags.push(tagName);
|
|
1574
|
-
customElements.define(tagName, proxyComponent(HostElement, cmpMeta, 1 /* isElementConstructor */));
|
|
2107
|
+
customElements.define(tagName, proxyComponent(HostElement, cmpMeta, 1 /* PROXY_FLAGS.isElementConstructor */));
|
|
1575
2108
|
}
|
|
1576
2109
|
});
|
|
1577
2110
|
});
|
|
1578
2111
|
{
|
|
1579
2112
|
visibilityStyle.innerHTML = cmpTags + HYDRATED_CSS;
|
|
1580
2113
|
visibilityStyle.setAttribute('data-styles', '');
|
|
2114
|
+
// Apply CSP nonce to the style tag if it exists
|
|
2115
|
+
const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);
|
|
2116
|
+
if (nonce != null) {
|
|
2117
|
+
visibilityStyle.setAttribute('nonce', nonce);
|
|
2118
|
+
}
|
|
1581
2119
|
head.insertBefore(visibilityStyle, metaCharset ? metaCharset.nextSibling : head.firstChild);
|
|
1582
2120
|
}
|
|
1583
2121
|
// Process deferred connectedCallbacks now all components have been registered
|
|
@@ -1593,7 +2131,52 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1593
2131
|
// Fallback appLoad event
|
|
1594
2132
|
endBootstrap();
|
|
1595
2133
|
};
|
|
1596
|
-
const
|
|
2134
|
+
const addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) => {
|
|
2135
|
+
if (listeners) {
|
|
2136
|
+
listeners.map(([flags, name, method]) => {
|
|
2137
|
+
const target = getHostListenerTarget(elm, flags) ;
|
|
2138
|
+
const handler = hostListenerProxy(hostRef, method);
|
|
2139
|
+
const opts = hostListenerOpts(flags);
|
|
2140
|
+
plt.ael(target, name, handler, opts);
|
|
2141
|
+
(hostRef.$rmListeners$ = hostRef.$rmListeners$ || []).push(() => plt.rel(target, name, handler, opts));
|
|
2142
|
+
});
|
|
2143
|
+
}
|
|
2144
|
+
};
|
|
2145
|
+
const hostListenerProxy = (hostRef, methodName) => (ev) => {
|
|
2146
|
+
try {
|
|
2147
|
+
{
|
|
2148
|
+
if (hostRef.$flags$ & 256 /* HOST_FLAGS.isListenReady */) {
|
|
2149
|
+
// instance is ready, let's call it's member method for this event
|
|
2150
|
+
hostRef.$lazyInstance$[methodName](ev);
|
|
2151
|
+
}
|
|
2152
|
+
else {
|
|
2153
|
+
(hostRef.$queuedListeners$ = hostRef.$queuedListeners$ || []).push([methodName, ev]);
|
|
2154
|
+
}
|
|
2155
|
+
}
|
|
2156
|
+
}
|
|
2157
|
+
catch (e) {
|
|
2158
|
+
consoleError(e);
|
|
2159
|
+
}
|
|
2160
|
+
};
|
|
2161
|
+
const getHostListenerTarget = (elm, flags) => {
|
|
2162
|
+
if (flags & 4 /* LISTENER_FLAGS.TargetDocument */)
|
|
2163
|
+
return doc;
|
|
2164
|
+
if (flags & 8 /* LISTENER_FLAGS.TargetWindow */)
|
|
2165
|
+
return win;
|
|
2166
|
+
if (flags & 16 /* LISTENER_FLAGS.TargetBody */)
|
|
2167
|
+
return doc.body;
|
|
2168
|
+
return elm;
|
|
2169
|
+
};
|
|
2170
|
+
// prettier-ignore
|
|
2171
|
+
const hostListenerOpts = (flags) => (flags & 2 /* LISTENER_FLAGS.Capture */) !== 0;
|
|
2172
|
+
/**
|
|
2173
|
+
* Assigns the given value to the nonce property on the runtime platform object.
|
|
2174
|
+
* During runtime, this value is used to set the nonce attribute on all dynamically created script and style tags.
|
|
2175
|
+
* @param nonce The value to be assigned to the platform nonce property.
|
|
2176
|
+
* @returns void
|
|
2177
|
+
*/
|
|
2178
|
+
const setNonce = (nonce) => (plt.$nonce$ = nonce);
|
|
2179
|
+
const hostRefs = /*@__PURE__*/ new WeakMap();
|
|
1597
2180
|
const getHostRef = (ref) => hostRefs.get(ref);
|
|
1598
2181
|
const registerInstance = (lazyInstance, hostRef) => hostRefs.set((hostRef.$lazyInstance$ = lazyInstance), hostRef);
|
|
1599
2182
|
const registerHost = (elm, cmpMeta) => {
|
|
@@ -1638,6 +2221,14 @@ const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
1638
2221
|
return import(
|
|
1639
2222
|
/* webpackMode: "lazy" */
|
|
1640
2223
|
'./p-accordion.entry.js').then(processMod, consoleError);
|
|
2224
|
+
case 'p-attachment':
|
|
2225
|
+
return import(
|
|
2226
|
+
/* webpackMode: "lazy" */
|
|
2227
|
+
'./p-attachment.entry.js').then(processMod, consoleError);
|
|
2228
|
+
case 'p-avatar':
|
|
2229
|
+
return import(
|
|
2230
|
+
/* webpackMode: "lazy" */
|
|
2231
|
+
'./p-avatar.entry.js').then(processMod, consoleError);
|
|
1641
2232
|
case 'p-avatar-group':
|
|
1642
2233
|
return import(
|
|
1643
2234
|
/* webpackMode: "lazy" */
|
|
@@ -1658,22 +2249,18 @@ const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
1658
2249
|
return import(
|
|
1659
2250
|
/* webpackMode: "lazy" */
|
|
1660
2251
|
'./p-content-slider.entry.js').then(processMod, consoleError);
|
|
1661
|
-
case 'p-
|
|
2252
|
+
case 'p-datepicker':
|
|
1662
2253
|
return import(
|
|
1663
2254
|
/* webpackMode: "lazy" */
|
|
1664
|
-
'./p-
|
|
1665
|
-
case 'p-
|
|
2255
|
+
'./p-datepicker.entry.js').then(processMod, consoleError);
|
|
2256
|
+
case 'p-drawer':
|
|
1666
2257
|
return import(
|
|
1667
2258
|
/* webpackMode: "lazy" */
|
|
1668
|
-
'./p-
|
|
2259
|
+
'./p-drawer.entry.js').then(processMod, consoleError);
|
|
1669
2260
|
case 'p-info-panel':
|
|
1670
2261
|
return import(
|
|
1671
2262
|
/* webpackMode: "lazy" */
|
|
1672
2263
|
'./p-info-panel.entry.js').then(processMod, consoleError);
|
|
1673
|
-
case 'p-input-group':
|
|
1674
|
-
return import(
|
|
1675
|
-
/* webpackMode: "lazy" */
|
|
1676
|
-
'./p-input-group.entry.js').then(processMod, consoleError);
|
|
1677
2264
|
case 'p-layout':
|
|
1678
2265
|
return import(
|
|
1679
2266
|
/* webpackMode: "lazy" */
|
|
@@ -1690,22 +2277,14 @@ const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
1690
2277
|
return import(
|
|
1691
2278
|
/* webpackMode: "lazy" */
|
|
1692
2279
|
'./p-navigation-item.entry.js').then(processMod, consoleError);
|
|
1693
|
-
case 'p-pagination':
|
|
1694
|
-
return import(
|
|
1695
|
-
/* webpackMode: "lazy" */
|
|
1696
|
-
'./p-pagination.entry.js').then(processMod, consoleError);
|
|
1697
2280
|
case 'p-profile':
|
|
1698
2281
|
return import(
|
|
1699
2282
|
/* webpackMode: "lazy" */
|
|
1700
2283
|
'./p-profile.entry.js').then(processMod, consoleError);
|
|
1701
|
-
case 'p-
|
|
1702
|
-
return import(
|
|
1703
|
-
/* webpackMode: "lazy" */
|
|
1704
|
-
'./p-segment-container.entry.js').then(processMod, consoleError);
|
|
1705
|
-
case 'p-segment-item':
|
|
2284
|
+
case 'p-select':
|
|
1706
2285
|
return import(
|
|
1707
2286
|
/* webpackMode: "lazy" */
|
|
1708
|
-
'./p-
|
|
2287
|
+
'./p-select.entry.js').then(processMod, consoleError);
|
|
1709
2288
|
case 'p-status':
|
|
1710
2289
|
return import(
|
|
1711
2290
|
/* webpackMode: "lazy" */
|
|
@@ -1714,6 +2293,10 @@ const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
1714
2293
|
return import(
|
|
1715
2294
|
/* webpackMode: "lazy" */
|
|
1716
2295
|
'./p-stepper.entry.js').then(processMod, consoleError);
|
|
2296
|
+
case 'p-stepper-item':
|
|
2297
|
+
return import(
|
|
2298
|
+
/* webpackMode: "lazy" */
|
|
2299
|
+
'./p-stepper-item.entry.js').then(processMod, consoleError);
|
|
1717
2300
|
case 'p-tab-group':
|
|
1718
2301
|
return import(
|
|
1719
2302
|
/* webpackMode: "lazy" */
|
|
@@ -1722,50 +2305,82 @@ const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
1722
2305
|
return import(
|
|
1723
2306
|
/* webpackMode: "lazy" */
|
|
1724
2307
|
'./p-tab-item.entry.js').then(processMod, consoleError);
|
|
1725
|
-
case 'p-
|
|
2308
|
+
case 'p-table':
|
|
2309
|
+
return import(
|
|
2310
|
+
/* webpackMode: "lazy" */
|
|
2311
|
+
'./p-table.entry.js').then(processMod, consoleError);
|
|
2312
|
+
case 'p-table-column':
|
|
2313
|
+
return import(
|
|
2314
|
+
/* webpackMode: "lazy" */
|
|
2315
|
+
'./p-table-column.entry.js').then(processMod, consoleError);
|
|
2316
|
+
case 'p-toast':
|
|
2317
|
+
return import(
|
|
2318
|
+
/* webpackMode: "lazy" */
|
|
2319
|
+
'./p-toast.entry.js').then(processMod, consoleError);
|
|
2320
|
+
case 'p-toast-container':
|
|
1726
2321
|
return import(
|
|
1727
2322
|
/* webpackMode: "lazy" */
|
|
1728
|
-
'./p-
|
|
1729
|
-
case 'p-
|
|
2323
|
+
'./p-toast-container.entry.js').then(processMod, consoleError);
|
|
2324
|
+
case 'p-calendar':
|
|
1730
2325
|
return import(
|
|
1731
2326
|
/* webpackMode: "lazy" */
|
|
1732
|
-
'./p-
|
|
2327
|
+
'./p-calendar.entry.js').then(processMod, consoleError);
|
|
1733
2328
|
case 'p-counter':
|
|
1734
2329
|
return import(
|
|
1735
2330
|
/* webpackMode: "lazy" */
|
|
1736
2331
|
'./p-counter.entry.js').then(processMod, consoleError);
|
|
1737
|
-
case 'p-
|
|
2332
|
+
case 'p-drawer-body_3':
|
|
1738
2333
|
return import(
|
|
1739
2334
|
/* webpackMode: "lazy" */
|
|
1740
|
-
'./p-
|
|
1741
|
-
case 'p-
|
|
2335
|
+
'./p-drawer-body_3.entry.js').then(processMod, consoleError);
|
|
2336
|
+
case 'p-illustration_6':
|
|
1742
2337
|
return import(
|
|
1743
2338
|
/* webpackMode: "lazy" */
|
|
1744
|
-
'./p-
|
|
1745
|
-
case 'p-
|
|
2339
|
+
'./p-illustration_6.entry.js').then(processMod, consoleError);
|
|
2340
|
+
case 'p-modal-body_4':
|
|
1746
2341
|
return import(
|
|
1747
2342
|
/* webpackMode: "lazy" */
|
|
1748
|
-
'./p-
|
|
2343
|
+
'./p-modal-body_4.entry.js').then(processMod, consoleError);
|
|
1749
2344
|
case 'p-slider-indicator':
|
|
1750
2345
|
return import(
|
|
1751
2346
|
/* webpackMode: "lazy" */
|
|
1752
2347
|
'./p-slider-indicator.entry.js').then(processMod, consoleError);
|
|
1753
|
-
case 'p-stepper-
|
|
2348
|
+
case 'p-stepper-line':
|
|
1754
2349
|
return import(
|
|
1755
2350
|
/* webpackMode: "lazy" */
|
|
1756
|
-
'./p-stepper-
|
|
1757
|
-
case 'p-
|
|
2351
|
+
'./p-stepper-line.entry.js').then(processMod, consoleError);
|
|
2352
|
+
case 'p-label_3':
|
|
1758
2353
|
return import(
|
|
1759
2354
|
/* webpackMode: "lazy" */
|
|
1760
|
-
'./p-
|
|
1761
|
-
case 'p-
|
|
2355
|
+
'./p-label_3.entry.js').then(processMod, consoleError);
|
|
2356
|
+
case 'p-page-size-select_3':
|
|
1762
2357
|
return import(
|
|
1763
2358
|
/* webpackMode: "lazy" */
|
|
1764
|
-
'./p-
|
|
2359
|
+
'./p-page-size-select_3.entry.js').then(processMod, consoleError);
|
|
2360
|
+
case 'p-backdrop':
|
|
2361
|
+
return import(
|
|
2362
|
+
/* webpackMode: "lazy" */
|
|
2363
|
+
'./p-backdrop.entry.js').then(processMod, consoleError);
|
|
2364
|
+
case 'p-dropdown_2':
|
|
2365
|
+
return import(
|
|
2366
|
+
/* webpackMode: "lazy" */
|
|
2367
|
+
'./p-dropdown_2.entry.js').then(processMod, consoleError);
|
|
2368
|
+
case 'p-helper_3':
|
|
2369
|
+
return import(
|
|
2370
|
+
/* webpackMode: "lazy" */
|
|
2371
|
+
'./p-helper_3.entry.js').then(processMod, consoleError);
|
|
1765
2372
|
case 'p-divider':
|
|
1766
2373
|
return import(
|
|
1767
2374
|
/* webpackMode: "lazy" */
|
|
1768
2375
|
'./p-divider.entry.js').then(processMod, consoleError);
|
|
2376
|
+
case 'p-dropdown-menu-container':
|
|
2377
|
+
return import(
|
|
2378
|
+
/* webpackMode: "lazy" */
|
|
2379
|
+
'./p-dropdown-menu-container.entry.js').then(processMod, consoleError);
|
|
2380
|
+
case 'p-tooltip':
|
|
2381
|
+
return import(
|
|
2382
|
+
/* webpackMode: "lazy" */
|
|
2383
|
+
'./p-tooltip.entry.js').then(processMod, consoleError);
|
|
1769
2384
|
}
|
|
1770
2385
|
}
|
|
1771
2386
|
return import(
|
|
@@ -1780,14 +2395,38 @@ const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
1780
2395
|
return importedModule[exportName];
|
|
1781
2396
|
}, consoleError);
|
|
1782
2397
|
};
|
|
1783
|
-
const styles = new Map();
|
|
2398
|
+
const styles = /*@__PURE__*/ new Map();
|
|
2399
|
+
const win = typeof window !== 'undefined' ? window : {};
|
|
2400
|
+
const doc = win.document || { head: {} };
|
|
2401
|
+
const plt = {
|
|
2402
|
+
$flags$: 0,
|
|
2403
|
+
$resourcesUrl$: '',
|
|
2404
|
+
jmp: (h) => h(),
|
|
2405
|
+
raf: (h) => requestAnimationFrame(h),
|
|
2406
|
+
ael: (el, eventName, listener, opts) => el.addEventListener(eventName, listener, opts),
|
|
2407
|
+
rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),
|
|
2408
|
+
ce: (eventName, opts) => new CustomEvent(eventName, opts),
|
|
2409
|
+
};
|
|
2410
|
+
const supportsShadow =
|
|
2411
|
+
// TODO(STENCIL-662): Remove code related to deprecated shadowDomShim field
|
|
2412
|
+
true;
|
|
2413
|
+
const promiseResolve = (v) => Promise.resolve(v);
|
|
2414
|
+
const supportsConstructableStylesheets = /*@__PURE__*/ (() => {
|
|
2415
|
+
try {
|
|
2416
|
+
new CSSStyleSheet();
|
|
2417
|
+
return typeof new CSSStyleSheet().replaceSync === 'function';
|
|
2418
|
+
}
|
|
2419
|
+
catch (e) { }
|
|
2420
|
+
return false;
|
|
2421
|
+
})()
|
|
2422
|
+
;
|
|
1784
2423
|
const queueDomReads = [];
|
|
1785
2424
|
const queueDomWrites = [];
|
|
1786
2425
|
const queueTask = (queue, write) => (cb) => {
|
|
1787
2426
|
queue.push(cb);
|
|
1788
2427
|
if (!queuePending) {
|
|
1789
2428
|
queuePending = true;
|
|
1790
|
-
if (write && plt.$flags$ & 4 /* queueSync */) {
|
|
2429
|
+
if (write && plt.$flags$ & 4 /* PLATFORM_FLAGS.queueSync */) {
|
|
1791
2430
|
nextTick(flush);
|
|
1792
2431
|
}
|
|
1793
2432
|
else {
|
|
@@ -1824,4 +2463,6 @@ const flush = () => {
|
|
|
1824
2463
|
const nextTick = /*@__PURE__*/ (cb) => promiseResolve().then(cb);
|
|
1825
2464
|
const writeTask = /*@__PURE__*/ queueTask(queueDomWrites, true);
|
|
1826
2465
|
|
|
1827
|
-
export { Host as H, bootstrapLazy as b, createEvent as c, getElement as g, h, promiseResolve as p, registerInstance as r };
|
|
2466
|
+
export { Host as H, bootstrapLazy as b, createEvent as c, getElement as g, h, promiseResolve as p, registerInstance as r, setNonce as s };
|
|
2467
|
+
|
|
2468
|
+
//# sourceMappingURL=index-2c1bdb40.js.map
|