@paperless/core 0.1.0-alpha.34 → 0.1.0-alpha.340
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 +3209 -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/camera.svg +10 -0
- package/dist/assets/icons/filter.svg +6 -13
- package/dist/assets/icons/menu.svg +25 -0
- package/dist/assets/icons/more.svg +18 -0
- package/dist/assets/icons/notification.svg +10 -0
- package/dist/assets/icons/reload.svg +10 -0
- package/dist/assets/icons/signout.svg +23 -0
- package/dist/assets/icons/switch.svg +20 -0
- package/dist/assets/illustrations/e-mail.svg +1 -0
- package/dist/assets/illustrations/empty-state-overview.svg +65 -0
- package/dist/assets/illustrations/empty-state-search.svg +88 -0
- package/dist/build/index.esm.js +2 -0
- package/dist/build/index.esm.js.map +1 -0
- package/dist/build/p-004340ec.entry.js +2 -0
- package/dist/build/p-004340ec.entry.js.map +1 -0
- package/dist/build/p-04756580.entry.js +2 -0
- package/dist/build/p-04756580.entry.js.map +1 -0
- package/dist/build/p-09ea2a1a.js +2 -0
- package/dist/build/p-09ea2a1a.js.map +1 -0
- package/dist/build/p-0b9838ca.entry.js +2 -0
- package/dist/build/p-0b9838ca.entry.js.map +1 -0
- package/dist/build/p-0f3bd28b.entry.js +2 -0
- package/dist/build/p-0f3bd28b.entry.js.map +1 -0
- package/dist/build/p-10ba43ed.entry.js +2 -0
- package/dist/build/p-10ba43ed.entry.js.map +1 -0
- package/dist/build/p-11929d70.entry.js +2 -0
- package/dist/build/p-11929d70.entry.js.map +1 -0
- package/dist/build/p-19c08855.entry.js +2 -0
- package/dist/build/p-19c08855.entry.js.map +1 -0
- package/dist/build/p-25ac3f10.entry.js +2 -0
- package/dist/build/p-25ac3f10.entry.js.map +1 -0
- package/dist/build/p-268227ff.entry.js +2 -0
- package/dist/build/p-268227ff.entry.js.map +1 -0
- package/dist/build/p-2cb5c7fc.entry.js +2 -0
- package/dist/build/p-2cb5c7fc.entry.js.map +1 -0
- package/dist/build/p-3d68b72f.entry.js +2 -0
- package/dist/build/p-3d68b72f.entry.js.map +1 -0
- package/dist/build/p-3e858d20.entry.js +2 -0
- package/dist/build/p-3e858d20.entry.js.map +1 -0
- package/dist/build/p-430834bb.entry.js +2 -0
- package/dist/build/p-430834bb.entry.js.map +1 -0
- package/dist/build/p-4c3d6a7f.entry.js +2 -0
- package/dist/build/p-4c3d6a7f.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-594d1cf6.entry.js +2 -0
- package/dist/build/p-594d1cf6.entry.js.map +1 -0
- package/dist/build/p-5ab56199.entry.js +2 -0
- package/dist/build/p-5ab56199.entry.js.map +1 -0
- package/dist/build/p-5dfab26d.entry.js +2 -0
- package/dist/build/p-5dfab26d.entry.js.map +1 -0
- package/dist/build/p-6645532b.entry.js +2 -0
- package/dist/build/p-6645532b.entry.js.map +1 -0
- package/dist/build/p-6966b84f.entry.js +2 -0
- package/dist/build/p-6966b84f.entry.js.map +1 -0
- package/dist/build/p-69d43b9d.js +3 -0
- package/dist/build/p-69d43b9d.js.map +1 -0
- package/dist/build/p-6a5f5cc4.entry.js +2 -0
- package/dist/build/p-6a5f5cc4.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-7171690b.entry.js +2 -0
- package/dist/build/p-7171690b.entry.js.map +1 -0
- package/dist/build/p-71b442d7.entry.js +2 -0
- package/dist/build/p-71b442d7.entry.js.map +1 -0
- package/dist/build/p-804acc89.entry.js +2 -0
- package/dist/build/p-804acc89.entry.js.map +1 -0
- package/dist/build/p-8120c40f.entry.js +2 -0
- package/dist/build/p-8120c40f.entry.js.map +1 -0
- package/dist/build/p-83f1ceef.entry.js +2 -0
- package/dist/build/p-83f1ceef.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-966917a1.entry.js +2 -0
- package/dist/build/p-966917a1.entry.js.map +1 -0
- package/dist/build/p-96d2ed80.entry.js +2 -0
- package/dist/build/p-96d2ed80.entry.js.map +1 -0
- package/dist/build/p-98646043.entry.js +2 -0
- package/dist/build/p-98646043.entry.js.map +1 -0
- package/dist/build/p-a094d5da.entry.js +2 -0
- package/dist/build/p-a094d5da.entry.js.map +1 -0
- package/dist/build/p-a0a27d24.entry.js +2 -0
- package/dist/build/p-a0a27d24.entry.js.map +1 -0
- package/dist/build/p-a0d40482.entry.js +2 -0
- package/dist/build/p-a0d40482.entry.js.map +1 -0
- package/dist/build/p-a46af8b4.entry.js +2 -0
- package/dist/build/p-a46af8b4.entry.js.map +1 -0
- package/dist/build/p-b131d8d5.entry.js +2 -0
- package/dist/build/p-b131d8d5.entry.js.map +1 -0
- package/dist/build/p-b273ac6d.js +2 -0
- package/dist/build/p-b273ac6d.js.map +1 -0
- package/dist/build/p-b2af2dd2.entry.js +2 -0
- package/dist/build/p-b2af2dd2.entry.js.map +1 -0
- package/dist/build/p-b7d606d4.entry.js +2 -0
- package/dist/build/p-b7d606d4.entry.js.map +1 -0
- package/dist/build/p-bd13aa1f.entry.js +2 -0
- package/dist/build/p-bd13aa1f.entry.js.map +1 -0
- package/dist/build/p-bff2caf8.entry.js +2 -0
- package/dist/build/p-bff2caf8.entry.js.map +1 -0
- package/dist/build/p-c5c03f6e.entry.js +2 -0
- package/dist/build/p-c5c03f6e.entry.js.map +1 -0
- package/dist/build/p-d38740b6.entry.js +2 -0
- package/dist/build/p-d38740b6.entry.js.map +1 -0
- package/dist/build/p-e20ff8c8.entry.js +2 -0
- package/dist/build/p-e20ff8c8.entry.js.map +1 -0
- package/dist/build/p-f1284018.entry.js +2 -0
- package/dist/build/p-f1284018.entry.js.map +1 -0
- package/dist/build/p-f86fcdf4.js +2 -0
- package/dist/build/p-f86fcdf4.js.map +1 -0
- package/dist/build/paperless.css +1 -107
- 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/index-040ec3f9.js +2483 -0
- package/dist/cjs/index-040ec3f9.js.map +1 -0
- package/dist/cjs/{index-a46a39a5.js → index-19716b9c.js} +1047 -272
- package/dist/cjs/index-19716b9c.js.map +1 -0
- package/dist/cjs/index.cjs.js +19 -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-6dc21ed5.js +14 -0
- package/dist/cjs/object-get-by-path-6dc21ed5.js.map +1 -0
- package/dist/cjs/p-accordion.cjs.entry.js +36 -0
- package/dist/cjs/p-accordion.cjs.entry.js.map +1 -0
- package/dist/cjs/p-attachment.cjs.entry.js +38 -0
- package/dist/cjs/p-attachment.cjs.entry.js.map +1 -0
- package/dist/cjs/p-avatar-group.cjs.entry.js +22 -0
- package/dist/cjs/p-avatar-group.cjs.entry.js.map +1 -0
- package/dist/cjs/p-avatar.cjs.entry.js +24 -11
- 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 +248 -104
- package/dist/cjs/p-button_3.cjs.entry.js.map +1 -0
- package/dist/cjs/p-calendar.cjs.entry.js +711 -0
- package/dist/cjs/p-calendar.cjs.entry.js.map +1 -0
- package/dist/cjs/p-card-body.cjs.entry.js +22 -0
- package/dist/cjs/p-card-body.cjs.entry.js.map +1 -0
- package/dist/cjs/p-card-container.cjs.entry.js +23 -0
- package/dist/cjs/p-card-container.cjs.entry.js.map +1 -0
- package/dist/cjs/p-card-header.cjs.entry.js +24 -0
- package/dist/cjs/p-card-header.cjs.entry.js.map +1 -0
- package/dist/cjs/p-content-slider.cjs.entry.js +212 -0
- package/dist/cjs/p-content-slider.cjs.entry.js.map +1 -0
- package/dist/cjs/p-counter.cjs.entry.js +7 -3
- package/dist/cjs/p-counter.cjs.entry.js.map +1 -0
- package/dist/cjs/p-datepicker.cjs.entry.js +4090 -0
- package/dist/cjs/p-datepicker.cjs.entry.js.map +1 -0
- package/dist/cjs/p-divider.cjs.entry.js +8 -3
- 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 +167 -0
- package/dist/cjs/p-dropdown_2.cjs.entry.js.map +1 -0
- package/dist/cjs/p-helper_3.cjs.entry.js +128 -0
- package/dist/cjs/p-helper_3.cjs.entry.js.map +1 -0
- package/dist/cjs/p-illustration_6.cjs.entry.js +2727 -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 +22 -0
- 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 +61 -0
- package/dist/cjs/p-modal.cjs.entry.js.map +1 -0
- package/dist/cjs/p-navbar.cjs.entry.js +30 -0
- package/dist/cjs/p-navbar.cjs.entry.js.map +1 -0
- package/dist/cjs/p-navigation-item.cjs.entry.js +9 -6
- 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 +45 -0
- package/dist/cjs/p-profile.cjs.entry.js.map +1 -0
- package/dist/cjs/p-select.cjs.entry.js +187 -0
- package/dist/cjs/p-select.cjs.entry.js.map +1 -0
- package/dist/cjs/p-slider-indicator.cjs.entry.js +22 -0
- 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_2.cjs.entry.js +41 -0
- package/dist/cjs/p-stepper-item_2.cjs.entry.js.map +1 -0
- package/dist/cjs/p-stepper.cjs.entry.js +47 -0
- package/dist/cjs/p-stepper.cjs.entry.js.map +1 -0
- package/dist/cjs/p-tab-group.cjs.entry.js +21 -0
- package/dist/cjs/p-tab-group.cjs.entry.js.map +1 -0
- package/dist/cjs/p-tab-item.cjs.entry.js +22 -0
- package/dist/cjs/p-tab-item.cjs.entry.js.map +1 -0
- package/dist/cjs/p-table-column.cjs.entry.js +28 -0
- package/dist/cjs/p-table-column.cjs.entry.js.map +1 -0
- package/dist/cjs/p-table.cjs.entry.js +343 -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 +18 -28
- 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/cjs/{popper-e0c4ed4c.js → popper-d7a0f999.js} +62 -49
- package/dist/cjs/popper-d7a0f999.js.map +1 -0
- package/dist/collection/assets/icons/camera.svg +10 -0
- package/dist/collection/assets/icons/filter.svg +6 -13
- package/dist/collection/assets/icons/menu.svg +25 -0
- package/dist/collection/assets/icons/more.svg +18 -0
- package/dist/collection/assets/icons/notification.svg +10 -0
- package/dist/collection/assets/icons/reload.svg +10 -0
- package/dist/collection/assets/icons/signout.svg +23 -0
- package/dist/collection/assets/icons/switch.svg +20 -0
- package/dist/collection/assets/illustrations/e-mail.svg +1 -0
- package/dist/collection/assets/illustrations/empty-state-overview.svg +65 -0
- package/dist/collection/assets/illustrations/empty-state-search.svg +88 -0
- package/dist/collection/collection-manifest.json +45 -3
- package/dist/collection/components/atoms/avatar/avatar.component.css +1 -31
- package/dist/collection/components/atoms/avatar/avatar.component.js +111 -90
- package/dist/collection/components/atoms/avatar/avatar.component.js.map +1 -0
- package/dist/collection/components/atoms/avatar-group/avatar-group.component.css +1 -0
- package/dist/collection/components/atoms/avatar-group/avatar-group.component.js +42 -0
- 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 -79
- package/dist/collection/components/atoms/button/button.component.js +306 -251
- package/dist/collection/components/atoms/button/button.component.js.map +1 -0
- package/dist/collection/components/atoms/card-body/card-body.component.css +1 -0
- package/dist/collection/components/atoms/card-body/card-body.component.js +43 -0
- 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 -0
- package/dist/collection/components/atoms/card-container/card-container.component.js +63 -0
- 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 -0
- package/dist/collection/components/atoms/card-header/card-header.component.js +62 -0
- package/dist/collection/components/atoms/card-header/card-header.component.js.map +1 -0
- package/dist/collection/components/atoms/counter/counter.component.css +1 -5
- package/dist/collection/components/atoms/counter/counter.component.js +57 -9
- package/dist/collection/components/atoms/counter/counter.component.js.map +1 -0
- package/dist/collection/components/atoms/divider/divider.component.css +1 -3
- package/dist/collection/components/atoms/divider/divider.component.js +16 -8
- 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 -5
- 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 +75 -30
- 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 +43 -12
- package/dist/collection/components/atoms/helper/helper.component.js.map +1 -0
- package/dist/collection/components/atoms/icon/icon.component.css +1 -0
- package/dist/collection/components/atoms/icon/icon.component.js +141 -91
- 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 -0
- package/dist/collection/components/atoms/layout/layout.component.js +44 -0
- 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 -0
- package/dist/collection/components/atoms/modal-body/modal-body.component.js +63 -0
- 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 -0
- package/dist/collection/components/atoms/modal-container/modal-container.component.js +75 -0
- 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 -0
- package/dist/collection/components/atoms/modal-footer/modal-footer.component.js +19 -0
- 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 -0
- package/dist/collection/components/atoms/modal-header/modal-header.component.js +66 -0
- 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 +99 -87
- 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 -0
- package/dist/collection/components/atoms/slider-indicator/slider-indicator.component.js +44 -0
- 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 +99 -89
- package/dist/collection/components/atoms/status/status.component.js.map +1 -0
- package/dist/collection/components/atoms/stepper-item/stepper-item.component.css +1 -0
- package/dist/collection/components/atoms/stepper-item/stepper-item.component.js +120 -0
- 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 -0
- package/dist/collection/components/atoms/stepper-line/stepper-line.component.js +63 -0
- package/dist/collection/components/atoms/stepper-line/stepper-line.component.js.map +1 -0
- package/dist/collection/components/atoms/tab-group/tab-group.component.css +1 -0
- package/dist/collection/components/atoms/tab-group/tab-group.component.js +19 -0
- 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 -0
- package/dist/collection/components/atoms/tab-item/tab-item.component.js +44 -0
- 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 -40
- package/dist/collection/components/atoms/tooltip/tooltip.component.js +197 -164
- package/dist/collection/components/atoms/tooltip/tooltip.component.js.map +1 -0
- package/dist/collection/components/helpers/table-column/table-column.component.js +151 -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 -0
- package/dist/collection/components/molecules/accordion/accordion.component.js +128 -0
- 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 +126 -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 +504 -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 -0
- package/dist/collection/components/molecules/content-slider/content-slider.component.js +317 -0
- 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 +514 -0
- package/dist/collection/components/molecules/datepicker/datepicker.component.js.map +1 -0
- package/dist/collection/components/molecules/dropdown/dropdown.component.css +1 -9
- package/dist/collection/components/molecules/dropdown/dropdown.component.js +267 -127
- 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 -0
- package/dist/collection/components/molecules/input-group/input-group.component.js +363 -0
- 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 -28
- 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 -0
- package/dist/collection/components/molecules/profile/profile.component.js +90 -0
- 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 +613 -0
- package/dist/collection/components/molecules/select/select.component.js.map +1 -0
- package/dist/collection/components/molecules/stepper/stepper.component.css +1 -0
- package/dist/collection/components/molecules/stepper/stepper.component.js +105 -0
- 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 +263 -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 +383 -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 +259 -0
- package/dist/collection/components/organisms/modal/modal.component.js.map +1 -0
- package/dist/collection/components/organisms/navbar/navbar.component.css +1 -0
- package/dist/collection/components/organisms/navbar/navbar.component.js +90 -0
- 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 +1171 -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 +87 -0
- package/dist/collection/tailwind/backdrop-blur.js +3 -0
- package/dist/collection/tailwind/border-radius.js +1 -0
- package/dist/collection/tailwind/height.js +5 -0
- package/dist/collection/tailwind/screens.js +8 -0
- package/dist/collection/tailwind/shadows.js +11 -5
- package/dist/collection/tailwind/spacing.js +10 -0
- package/dist/collection/tailwind/width.js +23 -0
- package/dist/collection/tailwind/z-index.js +17 -0
- package/dist/collection/tailwind.config.js +28 -16
- package/dist/collection/types/index.js +3 -0
- package/dist/collection/types/index.js.map +1 -0
- package/dist/collection/types/table.js +2 -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 +15 -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 +100 -0
- package/dist/components/button.component.js.map +1 -0
- package/dist/components/calendar.component.js +3199 -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 +10 -3
- package/dist/components/counter.component.js.map +1 -0
- package/dist/components/divider.component.js +35 -0
- 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 +10 -3
- 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 +179 -0
- package/dist/components/dropdown.component.js.map +1 -0
- package/dist/components/helper.component.js +41 -0
- package/dist/components/helper.component.js.map +1 -0
- package/dist/components/icon.component.js +184 -27
- package/dist/components/icon.component.js.map +1 -0
- package/dist/{cjs/p-illustration.cjs.entry.js → components/illustration.component.js} +190 -16
- package/dist/components/illustration.component.js.map +1 -0
- package/dist/components/index.d.ts +9 -22
- package/dist/components/index.js +13 -20
- 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 +149 -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 +11 -13
- 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 +37 -0
- package/dist/components/modal-body.component.js.map +1 -0
- package/dist/components/modal-container.component.js +49 -0
- package/dist/components/modal-container.component.js.map +1 -0
- package/dist/components/modal-footer.component.js +38 -0
- package/dist/components/modal-footer.component.js.map +1 -0
- package/dist/components/modal-header.component.js +54 -0
- package/dist/components/modal-header.component.js.map +1 -0
- package/dist/components/object-get-by-path.js +12 -0
- package/dist/components/object-get-by-path.js.map +1 -0
- package/dist/components/p-accordion.d.ts +11 -0
- package/dist/components/p-accordion.js +67 -0
- package/dist/components/p-accordion.js.map +1 -0
- package/dist/components/p-attachment.d.ts +11 -0
- package/dist/components/p-attachment.js +86 -0
- package/dist/components/p-attachment.js.map +1 -0
- package/dist/components/p-avatar-group.d.ts +11 -0
- package/dist/components/p-avatar-group.js +37 -0
- package/dist/components/p-avatar-group.js.map +1 -0
- package/dist/components/p-avatar.js +26 -14
- 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 +3 -102
- 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.d.ts +11 -0
- package/dist/components/p-card-body.js +37 -0
- package/dist/components/p-card-body.js.map +1 -0
- package/dist/components/p-card-container.d.ts +11 -0
- package/dist/components/p-card-container.js +40 -0
- package/dist/components/p-card-container.js.map +1 -0
- package/dist/components/p-card-header.d.ts +11 -0
- package/dist/components/p-card-header.js +46 -0
- package/dist/components/p-card-header.js.map +1 -0
- package/dist/components/p-content-slider.d.ts +11 -0
- package/dist/components/p-content-slider.js +241 -0
- 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 +4171 -0
- package/dist/components/p-datepicker.js.map +1 -0
- package/dist/components/p-divider.js +3 -28
- 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 -34
- package/dist/components/p-dropdown-menu-item.js.map +1 -0
- package/dist/components/p-dropdown.js +3 -161
- package/dist/components/p-dropdown.js.map +1 -0
- package/dist/components/p-helper.js +3 -34
- 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 -1432
- package/dist/components/p-illustration.js.map +1 -0
- package/dist/components/p-info-panel.js +5 -7
- 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.d.ts +11 -0
- package/dist/components/p-input-group.js +8 -0
- package/dist/components/p-input-group.js.map +1 -0
- package/dist/components/p-label.d.ts +11 -0
- package/dist/components/p-label.js +8 -0
- package/dist/components/p-label.js.map +1 -0
- package/dist/components/p-layout.d.ts +11 -0
- package/dist/components/p-layout.js +38 -0
- 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.d.ts +11 -0
- package/dist/components/p-modal-body.js +8 -0
- package/dist/components/p-modal-body.js.map +1 -0
- package/dist/components/p-modal-container.d.ts +11 -0
- package/dist/components/p-modal-container.js +8 -0
- package/dist/components/p-modal-container.js.map +1 -0
- package/dist/components/p-modal-footer.d.ts +11 -0
- package/dist/components/p-modal-footer.js +8 -0
- package/dist/components/p-modal-footer.js.map +1 -0
- package/dist/components/p-modal-header.d.ts +11 -0
- package/dist/components/p-modal-header.js +8 -0
- package/dist/components/p-modal-header.js.map +1 -0
- package/dist/components/p-modal.d.ts +11 -0
- package/dist/components/p-modal.js +140 -0
- package/dist/components/p-modal.js.map +1 -0
- package/dist/components/p-navbar.d.ts +11 -0
- package/dist/components/p-navbar.js +72 -0
- 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.d.ts +11 -0
- package/dist/components/p-profile.js +81 -0
- 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 +278 -0
- package/dist/components/p-select.js.map +1 -0
- package/dist/components/p-slider-indicator.d.ts +11 -0
- package/dist/components/p-slider-indicator.js +8 -0
- package/dist/components/p-slider-indicator.js.map +1 -0
- package/dist/components/p-status.js +6 -4
- package/dist/components/p-status.js.map +1 -0
- package/dist/components/p-stepper-item.d.ts +11 -0
- package/dist/components/p-stepper-item.js +8 -0
- package/dist/components/p-stepper-item.js.map +1 -0
- package/dist/components/p-stepper-line.d.ts +11 -0
- package/dist/components/p-stepper-line.js +8 -0
- package/dist/components/p-stepper-line.js.map +1 -0
- package/dist/components/p-stepper.d.ts +11 -0
- package/dist/components/p-stepper.js +83 -0
- package/dist/components/p-stepper.js.map +1 -0
- package/dist/components/p-tab-group.d.ts +11 -0
- package/dist/components/p-tab-group.js +41 -0
- package/dist/components/p-tab-group.js.map +1 -0
- package/dist/components/p-tab-item.d.ts +11 -0
- package/dist/components/p-tab-item.js +38 -0
- 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 +48 -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 +529 -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 +3 -4
- 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/popper.js +62 -49
- package/dist/components/popper.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 +35 -0
- package/dist/components/slider-indicator.component.js.map +1 -0
- package/dist/components/stepper-item.component.js +49 -0
- package/dist/components/stepper-item.component.js.map +1 -0
- package/dist/components/stepper-line.component.js +37 -0
- package/dist/components/stepper-line.component.js.map +1 -0
- package/dist/components/table-cell.component.js +137 -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 +1056 -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 +18 -27
- 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/index-340e085c.js +2460 -0
- package/dist/esm/index-340e085c.js.map +1 -0
- package/dist/esm/{index-a68e547b.js → index-8a4a3f2a.js} +1038 -264
- package/dist/esm/index-8a4a3f2a.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-d6427a61.js +12 -0
- package/dist/esm/object-get-by-path-d6427a61.js.map +1 -0
- package/dist/esm/p-accordion.entry.js +32 -0
- package/dist/esm/p-accordion.entry.js.map +1 -0
- package/dist/esm/p-attachment.entry.js +34 -0
- package/dist/esm/p-attachment.entry.js.map +1 -0
- package/dist/esm/p-avatar-group.entry.js +18 -0
- package/dist/esm/p-avatar-group.entry.js.map +1 -0
- package/dist/esm/p-avatar.entry.js +24 -11
- 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 +248 -104
- package/dist/esm/p-button_3.entry.js.map +1 -0
- package/dist/esm/p-calendar.entry.js +707 -0
- package/dist/esm/p-calendar.entry.js.map +1 -0
- package/dist/esm/p-card-body.entry.js +18 -0
- package/dist/esm/p-card-body.entry.js.map +1 -0
- package/dist/esm/p-card-container.entry.js +19 -0
- package/dist/esm/p-card-container.entry.js.map +1 -0
- package/dist/esm/p-card-header.entry.js +20 -0
- package/dist/esm/p-card-header.entry.js.map +1 -0
- package/dist/esm/p-content-slider.entry.js +208 -0
- package/dist/esm/p-content-slider.entry.js.map +1 -0
- package/dist/esm/p-counter.entry.js +7 -3
- package/dist/esm/p-counter.entry.js.map +1 -0
- package/dist/esm/p-datepicker.entry.js +4086 -0
- package/dist/esm/p-datepicker.entry.js.map +1 -0
- package/dist/esm/p-divider.entry.js +8 -3
- 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 +162 -0
- package/dist/esm/p-dropdown_2.entry.js.map +1 -0
- package/dist/esm/p-helper_3.entry.js +122 -0
- package/dist/esm/p-helper_3.entry.js.map +1 -0
- package/dist/esm/{p-illustration.entry.js → p-illustration_6.entry.js} +1307 -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 +18 -0
- 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 +57 -0
- package/dist/esm/p-modal.entry.js.map +1 -0
- package/dist/esm/p-navbar.entry.js +26 -0
- package/dist/esm/p-navbar.entry.js.map +1 -0
- package/dist/esm/p-navigation-item.entry.js +9 -6
- 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 +41 -0
- package/dist/esm/p-profile.entry.js.map +1 -0
- package/dist/esm/p-select.entry.js +183 -0
- package/dist/esm/p-select.entry.js.map +1 -0
- package/dist/esm/p-slider-indicator.entry.js +18 -0
- 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_2.entry.js +36 -0
- package/dist/esm/p-stepper-item_2.entry.js.map +1 -0
- package/dist/esm/p-stepper.entry.js +43 -0
- package/dist/esm/p-stepper.entry.js.map +1 -0
- package/dist/esm/p-tab-group.entry.js +17 -0
- package/dist/esm/p-tab-group.entry.js.map +1 -0
- package/dist/esm/p-tab-item.entry.js +18 -0
- package/dist/esm/p-tab-item.entry.js.map +1 -0
- package/dist/esm/p-table-column.entry.js +24 -0
- package/dist/esm/p-table-column.entry.js.map +1 -0
- package/dist/esm/p-table.entry.js +339 -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 +18 -28
- 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/core-js.js +0 -0
- package/dist/esm/polyfills/css-shim.js +1 -1
- package/dist/esm/polyfills/dom.js +0 -0
- package/dist/esm/polyfills/es5-html-element.js +0 -0
- package/dist/esm/polyfills/index.js +0 -0
- package/dist/esm/polyfills/system.js +0 -0
- package/dist/esm/{popper-41c6f9cd.js → popper-42db9fbd.js} +62 -49
- package/dist/esm/popper-42db9fbd.js.map +1 -0
- 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-004340ec.entry.js +2 -0
- package/dist/paperless/p-004340ec.entry.js.map +1 -0
- package/dist/paperless/p-04756580.entry.js +2 -0
- package/dist/paperless/p-04756580.entry.js.map +1 -0
- package/dist/paperless/p-09ea2a1a.js +2 -0
- package/dist/paperless/p-09ea2a1a.js.map +1 -0
- package/dist/paperless/p-0b9838ca.entry.js +2 -0
- package/dist/paperless/p-0b9838ca.entry.js.map +1 -0
- package/dist/paperless/p-0f3bd28b.entry.js +2 -0
- package/dist/paperless/p-0f3bd28b.entry.js.map +1 -0
- package/dist/paperless/p-10ba43ed.entry.js +2 -0
- package/dist/paperless/p-10ba43ed.entry.js.map +1 -0
- package/dist/paperless/p-11929d70.entry.js +2 -0
- package/dist/paperless/p-11929d70.entry.js.map +1 -0
- package/dist/paperless/p-19c08855.entry.js +2 -0
- package/dist/paperless/p-19c08855.entry.js.map +1 -0
- package/dist/paperless/p-25ac3f10.entry.js +2 -0
- package/dist/paperless/p-25ac3f10.entry.js.map +1 -0
- package/dist/paperless/p-268227ff.entry.js +2 -0
- package/dist/paperless/p-268227ff.entry.js.map +1 -0
- package/dist/paperless/p-2cb5c7fc.entry.js +2 -0
- package/dist/paperless/p-2cb5c7fc.entry.js.map +1 -0
- package/dist/paperless/p-3d68b72f.entry.js +2 -0
- package/dist/paperless/p-3d68b72f.entry.js.map +1 -0
- package/dist/paperless/p-3e858d20.entry.js +2 -0
- package/dist/paperless/p-3e858d20.entry.js.map +1 -0
- package/dist/paperless/p-430834bb.entry.js +2 -0
- package/dist/paperless/p-430834bb.entry.js.map +1 -0
- package/dist/paperless/p-4c3d6a7f.entry.js +2 -0
- package/dist/paperless/p-4c3d6a7f.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-594d1cf6.entry.js +2 -0
- package/dist/paperless/p-594d1cf6.entry.js.map +1 -0
- package/dist/paperless/p-5ab56199.entry.js +2 -0
- package/dist/paperless/p-5ab56199.entry.js.map +1 -0
- package/dist/paperless/p-5dfab26d.entry.js +2 -0
- package/dist/paperless/p-5dfab26d.entry.js.map +1 -0
- package/dist/paperless/p-6645532b.entry.js +2 -0
- package/dist/paperless/p-6645532b.entry.js.map +1 -0
- package/dist/paperless/p-6966b84f.entry.js +2 -0
- package/dist/paperless/p-6966b84f.entry.js.map +1 -0
- package/dist/paperless/p-69d43b9d.js +3 -0
- package/dist/paperless/p-69d43b9d.js.map +1 -0
- package/dist/paperless/p-6a5f5cc4.entry.js +2 -0
- package/dist/paperless/p-6a5f5cc4.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-7171690b.entry.js +2 -0
- package/dist/paperless/p-7171690b.entry.js.map +1 -0
- package/dist/paperless/p-71b442d7.entry.js +2 -0
- package/dist/paperless/p-71b442d7.entry.js.map +1 -0
- package/dist/paperless/p-804acc89.entry.js +2 -0
- package/dist/paperless/p-804acc89.entry.js.map +1 -0
- package/dist/paperless/p-8120c40f.entry.js +2 -0
- package/dist/paperless/p-8120c40f.entry.js.map +1 -0
- package/dist/paperless/p-83f1ceef.entry.js +2 -0
- package/dist/paperless/p-83f1ceef.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-966917a1.entry.js +2 -0
- package/dist/paperless/p-966917a1.entry.js.map +1 -0
- package/dist/paperless/p-96d2ed80.entry.js +2 -0
- package/dist/paperless/p-96d2ed80.entry.js.map +1 -0
- package/dist/paperless/p-98646043.entry.js +2 -0
- package/dist/paperless/p-98646043.entry.js.map +1 -0
- package/dist/paperless/p-a094d5da.entry.js +2 -0
- package/dist/paperless/p-a094d5da.entry.js.map +1 -0
- package/dist/paperless/p-a0a27d24.entry.js +2 -0
- package/dist/paperless/p-a0a27d24.entry.js.map +1 -0
- package/dist/paperless/p-a0d40482.entry.js +2 -0
- package/dist/paperless/p-a0d40482.entry.js.map +1 -0
- package/dist/paperless/p-a46af8b4.entry.js +2 -0
- package/dist/paperless/p-a46af8b4.entry.js.map +1 -0
- package/dist/paperless/p-b131d8d5.entry.js +2 -0
- package/dist/paperless/p-b131d8d5.entry.js.map +1 -0
- package/dist/paperless/p-b273ac6d.js +2 -0
- package/dist/paperless/p-b273ac6d.js.map +1 -0
- package/dist/paperless/p-b2af2dd2.entry.js +2 -0
- package/dist/paperless/p-b2af2dd2.entry.js.map +1 -0
- package/dist/paperless/p-b7d606d4.entry.js +2 -0
- package/dist/paperless/p-b7d606d4.entry.js.map +1 -0
- package/dist/paperless/p-bd13aa1f.entry.js +2 -0
- package/dist/paperless/p-bd13aa1f.entry.js.map +1 -0
- package/dist/paperless/p-bff2caf8.entry.js +2 -0
- package/dist/paperless/p-bff2caf8.entry.js.map +1 -0
- package/dist/paperless/p-c5c03f6e.entry.js +2 -0
- package/dist/paperless/p-c5c03f6e.entry.js.map +1 -0
- package/dist/paperless/p-d38740b6.entry.js +2 -0
- package/dist/paperless/p-d38740b6.entry.js.map +1 -0
- package/dist/paperless/p-e20ff8c8.entry.js +2 -0
- package/dist/paperless/p-e20ff8c8.entry.js.map +1 -0
- package/dist/paperless/p-f1284018.entry.js +2 -0
- package/dist/paperless/p-f1284018.entry.js.map +1 -0
- package/dist/paperless/p-f86fcdf4.js +2 -0
- package/dist/paperless/p-f86fcdf4.js.map +1 -0
- package/dist/paperless/paperless.css +682 -26821
- 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/_reset.scss +31 -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 +22 -0
- package/dist/style/form/_mixins.scss +108 -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/paperless.scss +12 -0
- package/dist/sw.js +2 -648
- package/dist/sw.js.map +1 -0
- package/dist/tailwind/animation.js +87 -0
- package/dist/tailwind/backdrop-blur.js +3 -0
- package/dist/tailwind/border-radius.js +11 -0
- package/dist/tailwind/colors.js +52 -0
- package/dist/tailwind/height.js +5 -0
- package/dist/tailwind/rotate.js +8 -0
- package/dist/tailwind/scale.js +3 -0
- package/dist/tailwind/screens.js +8 -0
- package/dist/tailwind/shadows.js +13 -0
- package/dist/tailwind/spacing.js +10 -0
- package/dist/tailwind/typography.js +21 -0
- package/dist/tailwind/width.js +23 -0
- package/dist/tailwind/z-index.js +17 -0
- package/dist/tailwind.config.js +28 -16
- package/dist/types/components/atoms/avatar/avatar.component.d.ts +3 -1
- package/dist/types/components/atoms/avatar-group/avatar-group.component.d.ts +7 -0
- package/dist/types/components/atoms/backdrop/backdrop.component.d.ts +31 -0
- package/dist/types/components/atoms/button/button.component.d.ts +14 -1
- package/dist/types/components/atoms/card-body/card-body.component.d.ts +7 -0
- package/dist/types/components/atoms/card-container/card-container.component.d.ts +11 -0
- package/dist/types/components/atoms/card-header/card-header.component.d.ts +11 -0
- package/dist/types/components/atoms/counter/counter.component.d.ts +8 -0
- package/dist/types/components/atoms/divider/divider.component.d.ts +4 -0
- 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 +9 -0
- package/dist/types/components/atoms/helper/helper.component.d.ts +5 -0
- package/dist/types/components/atoms/icon/icon.component.d.ts +5 -5
- 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/layout/layout.component.d.ts +7 -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 +11 -0
- package/dist/types/components/atoms/modal-container/modal-container.component.d.ts +11 -0
- package/dist/types/components/atoms/modal-footer/modal-footer.component.d.ts +3 -0
- package/dist/types/components/atoms/modal-header/modal-header.component.d.ts +12 -0
- package/dist/types/components/atoms/segment-item/segment-item.component.d.ts +2 -1
- package/dist/types/components/atoms/slider-indicator/slider-indicator.component.d.ts +7 -0
- package/dist/types/components/atoms/status/status.component.d.ts +2 -1
- package/dist/types/components/atoms/stepper-item/stepper-item.component.d.ts +23 -0
- package/dist/types/components/atoms/stepper-line/stepper-line.component.d.ts +11 -0
- package/dist/types/components/atoms/tab-group/tab-group.component.d.ts +3 -0
- package/dist/types/components/atoms/tab-item/tab-item.component.d.ts +7 -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 +11 -2
- package/dist/types/components/helpers/table-column/table-column.component.d.ts +34 -0
- package/dist/types/components/molecules/accordion/accordion.component.d.ts +25 -0
- package/dist/types/components/molecules/attachment/attachment.component.d.ts +24 -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 +53 -0
- package/dist/types/components/molecules/datepicker/datepicker.component.d.ts +95 -0
- package/dist/types/components/molecules/dropdown/dropdown.component.d.ts +30 -3
- 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 +67 -0
- 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 +20 -0
- package/dist/types/components/molecules/select/select.component.d.ts +124 -0
- package/dist/types/components/molecules/stepper/stepper.component.d.ts +22 -0
- 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 +87 -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 +58 -0
- package/dist/types/components/organisms/navbar/navbar.component.d.ts +14 -0
- package/dist/types/components/organisms/table/table.component.d.ts +214 -0
- package/dist/types/components.d.ts +2954 -329
- package/dist/types/index.d.ts +2 -0
- package/dist/types/stencil-public-runtime.d.ts +91 -19
- package/dist/types/types/index.d.ts +2 -0
- package/dist/types/types/table.d.ts +27 -0
- package/dist/types/types/tailwind.d.ts +2 -0
- package/dist/types/utils/icons.d.ts +7 -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-5b279812.js +2 -0
- package/dist/workbox-5b279812.js.map +1 -0
- package/hydrate/index.d.ts +218 -0
- package/hydrate/index.js +22542 -0
- package/hydrate/package.json +6 -0
- package/loader/index.d.ts +9 -0
- package/loader/package.json +1 -0
- package/package.json +66 -61
- package/dist/build/p-17c11169.entry.js +0 -1
- package/dist/build/p-41e5458b.entry.js +0 -1
- package/dist/build/p-42dab9d4.entry.js +0 -1
- package/dist/build/p-47b52f92.entry.js +0 -1
- package/dist/build/p-5ec6ea71.entry.js +0 -1
- package/dist/build/p-75f909ab.entry.js +0 -1
- package/dist/build/p-76464e0b.js +0 -2
- package/dist/build/p-8501ba07.entry.js +0 -1
- package/dist/build/p-87356769.entry.js +0 -1
- package/dist/build/p-9513868f.entry.js +0 -1
- package/dist/build/p-a669807e.entry.js +0 -1
- package/dist/build/p-a7086ffa.js +0 -1
- package/dist/build/p-aa28fef8.entry.js +0 -1
- package/dist/build/p-aae3d4f0.entry.js +0 -1
- package/dist/build/p-adcb0b93.entry.js +0 -1
- package/dist/build/p-bbec0e86.entry.js +0 -1
- package/dist/build/p-e7019eab.entry.js +0 -1
- package/dist/build/p-f689996b.entry.js +0 -1
- package/dist/build/p-faa4ee42.entry.js +0 -1
- package/dist/cjs/p-dropdown-menu-item.cjs.entry.js +0 -23
- package/dist/cjs/p-dropdown.cjs.entry.js +0 -141
- package/dist/cjs/p-helper.cjs.entry.js +0 -19
- 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/collection/tailwind/grid.js +0 -26
- package/dist/collection/utils/utils.js +0 -3
- package/dist/esm/p-dropdown-menu-item.entry.js +0 -19
- package/dist/esm/p-dropdown.entry.js +0 -137
- package/dist/esm/p-helper.entry.js +0 -15
- 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/paperless/p-17c11169.entry.js +0 -1
- package/dist/paperless/p-41e5458b.entry.js +0 -1
- package/dist/paperless/p-42dab9d4.entry.js +0 -1
- package/dist/paperless/p-47b52f92.entry.js +0 -1
- package/dist/paperless/p-5ec6ea71.entry.js +0 -1
- package/dist/paperless/p-75f909ab.entry.js +0 -1
- package/dist/paperless/p-76464e0b.js +0 -2
- package/dist/paperless/p-8501ba07.entry.js +0 -1
- package/dist/paperless/p-87356769.entry.js +0 -1
- package/dist/paperless/p-9513868f.entry.js +0 -1
- package/dist/paperless/p-a669807e.entry.js +0 -1
- package/dist/paperless/p-a7086ffa.js +0 -1
- package/dist/paperless/p-aa28fef8.entry.js +0 -1
- package/dist/paperless/p-aae3d4f0.entry.js +0 -1
- package/dist/paperless/p-adcb0b93.entry.js +0 -1
- package/dist/paperless/p-bbec0e86.entry.js +0 -1
- package/dist/paperless/p-e7019eab.entry.js +0 -1
- package/dist/paperless/p-f689996b.entry.js +0 -1
- package/dist/paperless/p-faa4ee42.entry.js +0 -1
- package/dist/types/utils/utils.d.ts +0 -1
|
@@ -22,6 +22,14 @@ function _interopNamespace(e) {
|
|
|
22
22
|
|
|
23
23
|
const NAMESPACE = 'paperless';
|
|
24
24
|
|
|
25
|
+
/**
|
|
26
|
+
* Virtual DOM patching algorithm based on Snabbdom by
|
|
27
|
+
* Simon Friis Vindum (@paldepind)
|
|
28
|
+
* Licensed under the MIT License
|
|
29
|
+
* https://github.com/snabbdom/snabbdom/blob/master/LICENSE
|
|
30
|
+
*
|
|
31
|
+
* Modified for Stencil's renderer and slot projection
|
|
32
|
+
*/
|
|
25
33
|
let scopeId;
|
|
26
34
|
let contentRef;
|
|
27
35
|
let hostTagName;
|
|
@@ -30,62 +38,6 @@ let checkSlotFallbackVisibility = false;
|
|
|
30
38
|
let checkSlotRelocate = false;
|
|
31
39
|
let isSvgMode = false;
|
|
32
40
|
let queuePending = false;
|
|
33
|
-
const win = typeof window !== 'undefined' ? window : {};
|
|
34
|
-
const doc = win.document || { head: {} };
|
|
35
|
-
const plt = {
|
|
36
|
-
$flags$: 0,
|
|
37
|
-
$resourcesUrl$: '',
|
|
38
|
-
jmp: (h) => h(),
|
|
39
|
-
raf: (h) => requestAnimationFrame(h),
|
|
40
|
-
ael: (el, eventName, listener, opts) => el.addEventListener(eventName, listener, opts),
|
|
41
|
-
rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),
|
|
42
|
-
ce: (eventName, opts) => new CustomEvent(eventName, opts),
|
|
43
|
-
};
|
|
44
|
-
const promiseResolve = (v) => Promise.resolve(v);
|
|
45
|
-
const supportsConstructibleStylesheets = /*@__PURE__*/ (() => {
|
|
46
|
-
try {
|
|
47
|
-
new CSSStyleSheet();
|
|
48
|
-
return typeof new CSSStyleSheet().replace === 'function';
|
|
49
|
-
}
|
|
50
|
-
catch (e) { }
|
|
51
|
-
return false;
|
|
52
|
-
})()
|
|
53
|
-
;
|
|
54
|
-
const addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) => {
|
|
55
|
-
if (listeners) {
|
|
56
|
-
listeners.map(([flags, name, method]) => {
|
|
57
|
-
const target = getHostListenerTarget(elm, flags) ;
|
|
58
|
-
const handler = hostListenerProxy(hostRef, method);
|
|
59
|
-
const opts = hostListenerOpts(flags);
|
|
60
|
-
plt.ael(target, name, handler, opts);
|
|
61
|
-
(hostRef.$rmListeners$ = hostRef.$rmListeners$ || []).push(() => plt.rel(target, name, handler, opts));
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
};
|
|
65
|
-
const hostListenerProxy = (hostRef, methodName) => (ev) => {
|
|
66
|
-
try {
|
|
67
|
-
{
|
|
68
|
-
if (hostRef.$flags$ & 256 /* isListenReady */) {
|
|
69
|
-
// instance is ready, let's call it's member method for this event
|
|
70
|
-
hostRef.$lazyInstance$[methodName](ev);
|
|
71
|
-
}
|
|
72
|
-
else {
|
|
73
|
-
(hostRef.$queuedListeners$ = hostRef.$queuedListeners$ || []).push([methodName, ev]);
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
catch (e) {
|
|
78
|
-
consoleError(e);
|
|
79
|
-
}
|
|
80
|
-
};
|
|
81
|
-
const getHostListenerTarget = (elm, flags) => {
|
|
82
|
-
if (flags & 4 /* TargetDocument */)
|
|
83
|
-
return doc;
|
|
84
|
-
return elm;
|
|
85
|
-
};
|
|
86
|
-
// prettier-ignore
|
|
87
|
-
const hostListenerOpts = (flags) => (flags & 2 /* Capture */) !== 0;
|
|
88
|
-
const HYDRATED_CSS = '{visibility:hidden}.hydrated{visibility:inherit}';
|
|
89
41
|
const createTime = (fnName, tagName = '') => {
|
|
90
42
|
{
|
|
91
43
|
return () => {
|
|
@@ -100,71 +52,14 @@ const uniqueTime = (key, measureText) => {
|
|
|
100
52
|
};
|
|
101
53
|
}
|
|
102
54
|
};
|
|
103
|
-
const
|
|
104
|
-
const
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
style = cssText;
|
|
112
|
-
}
|
|
113
|
-
styles.set(scopeId, style);
|
|
114
|
-
};
|
|
115
|
-
const addStyle = (styleContainerNode, cmpMeta, mode, hostElm) => {
|
|
116
|
-
let scopeId = getScopeId(cmpMeta);
|
|
117
|
-
const style = styles.get(scopeId);
|
|
118
|
-
// if an element is NOT connected then getRootNode() will return the wrong root node
|
|
119
|
-
// so the fallback is to always use the document for the root node in those cases
|
|
120
|
-
styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : doc;
|
|
121
|
-
if (style) {
|
|
122
|
-
if (typeof style === 'string') {
|
|
123
|
-
styleContainerNode = styleContainerNode.head || styleContainerNode;
|
|
124
|
-
let appliedStyles = rootAppliedStyles.get(styleContainerNode);
|
|
125
|
-
let styleElm;
|
|
126
|
-
if (!appliedStyles) {
|
|
127
|
-
rootAppliedStyles.set(styleContainerNode, (appliedStyles = new Set()));
|
|
128
|
-
}
|
|
129
|
-
if (!appliedStyles.has(scopeId)) {
|
|
130
|
-
{
|
|
131
|
-
{
|
|
132
|
-
styleElm = doc.createElement('style');
|
|
133
|
-
styleElm.innerHTML = style;
|
|
134
|
-
}
|
|
135
|
-
styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector('link'));
|
|
136
|
-
}
|
|
137
|
-
if (appliedStyles) {
|
|
138
|
-
appliedStyles.add(scopeId);
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
else if (!styleContainerNode.adoptedStyleSheets.includes(style)) {
|
|
143
|
-
styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
return scopeId;
|
|
147
|
-
};
|
|
148
|
-
const attachStyles = (hostRef) => {
|
|
149
|
-
const cmpMeta = hostRef.$cmpMeta$;
|
|
150
|
-
const elm = hostRef.$hostElement$;
|
|
151
|
-
const flags = cmpMeta.$flags$;
|
|
152
|
-
const endAttachStyles = createTime('attachStyles', cmpMeta.$tagName$);
|
|
153
|
-
const scopeId = addStyle(elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(), cmpMeta);
|
|
154
|
-
if (flags & 10 /* needsScopedEncapsulation */) {
|
|
155
|
-
// only required when we're NOT using native shadow dom (slot)
|
|
156
|
-
// or this browser doesn't support native shadow dom
|
|
157
|
-
// and this host element was NOT created with SSR
|
|
158
|
-
// let's pick out the inner content for slot projection
|
|
159
|
-
// create a node to represent where the original
|
|
160
|
-
// content was first placed, which is useful later on
|
|
161
|
-
// DOM WRITE!!
|
|
162
|
-
elm['s-sc'] = scopeId;
|
|
163
|
-
elm.classList.add(scopeId + '-h');
|
|
164
|
-
}
|
|
165
|
-
endAttachStyles();
|
|
166
|
-
};
|
|
167
|
-
const getScopeId = (cmp, mode) => 'sc-' + (cmp.$tagName$);
|
|
55
|
+
const CONTENT_REF_ID = 'r';
|
|
56
|
+
const ORG_LOCATION_ID = 'o';
|
|
57
|
+
const SLOT_NODE_ID = 's';
|
|
58
|
+
const TEXT_NODE_ID = 't';
|
|
59
|
+
const HYDRATE_ID = 's-id';
|
|
60
|
+
const HYDRATED_STYLE_ID = 'sty-id';
|
|
61
|
+
const HYDRATE_CHILD_ID = 'c-id';
|
|
62
|
+
const HYDRATED_CSS = '{visibility:hidden}.hydrated{visibility:inherit}';
|
|
168
63
|
/**
|
|
169
64
|
* Default style mode id
|
|
170
65
|
*/
|
|
@@ -179,6 +74,18 @@ const isComplexType = (o) => {
|
|
|
179
74
|
o = typeof o;
|
|
180
75
|
return o === 'object' || o === 'function';
|
|
181
76
|
};
|
|
77
|
+
/**
|
|
78
|
+
* Helper method for querying a `meta` tag that contains a nonce value
|
|
79
|
+
* out of a DOM's head.
|
|
80
|
+
*
|
|
81
|
+
* @param doc The DOM containing the `head` to query against
|
|
82
|
+
* @returns The content of the meta tag representing the nonce value, or `undefined` if no tag
|
|
83
|
+
* exists or the tag has no content.
|
|
84
|
+
*/
|
|
85
|
+
function queryNonceMetaTagContent(doc) {
|
|
86
|
+
var _a, _b, _c;
|
|
87
|
+
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;
|
|
88
|
+
}
|
|
182
89
|
/**
|
|
183
90
|
* Production h() function based on Preact by
|
|
184
91
|
* Jason Miller (@developit)
|
|
@@ -187,7 +94,6 @@ const isComplexType = (o) => {
|
|
|
187
94
|
*
|
|
188
95
|
* Modified for Stencil's compiler and vdom
|
|
189
96
|
*/
|
|
190
|
-
// const stack: any[] = [];
|
|
191
97
|
// export function h(nodeName: string | d.FunctionalComponent, vnodeData: d.PropsType, child?: d.ChildType): d.VNode;
|
|
192
98
|
// export function h(nodeName: string | d.FunctionalComponent, vnodeData: d.PropsType, ...children: d.ChildType[]): d.VNode;
|
|
193
99
|
const h = (nodeName, vnodeData, ...children) => {
|
|
@@ -249,6 +155,14 @@ const h = (nodeName, vnodeData, ...children) => {
|
|
|
249
155
|
}
|
|
250
156
|
return vnode;
|
|
251
157
|
};
|
|
158
|
+
/**
|
|
159
|
+
* A utility function for creating a virtual DOM node from a tag and some
|
|
160
|
+
* possible text content.
|
|
161
|
+
*
|
|
162
|
+
* @param tag the tag for this element
|
|
163
|
+
* @param text possible text content for the node
|
|
164
|
+
* @returns a newly-minted virtual DOM node
|
|
165
|
+
*/
|
|
252
166
|
const newVNode = (tag, text) => {
|
|
253
167
|
const vnode = {
|
|
254
168
|
$flags$: 0,
|
|
@@ -266,11 +180,31 @@ const newVNode = (tag, text) => {
|
|
|
266
180
|
return vnode;
|
|
267
181
|
};
|
|
268
182
|
const Host = {};
|
|
183
|
+
/**
|
|
184
|
+
* Check whether a given node is a Host node or not
|
|
185
|
+
*
|
|
186
|
+
* @param node the virtual DOM node to check
|
|
187
|
+
* @returns whether it's a Host node or not
|
|
188
|
+
*/
|
|
269
189
|
const isHost = (node) => node && node.$tag$ === Host;
|
|
190
|
+
/**
|
|
191
|
+
* Implementation of {@link d.FunctionalUtilities} for Stencil's VDom.
|
|
192
|
+
*
|
|
193
|
+
* Note that these functions convert from {@link d.VNode} to
|
|
194
|
+
* {@link d.ChildNode} to give functional component developers a friendly
|
|
195
|
+
* interface.
|
|
196
|
+
*/
|
|
270
197
|
const vdomFnUtils = {
|
|
271
198
|
forEach: (children, cb) => children.map(convertToPublic).forEach(cb),
|
|
272
199
|
map: (children, cb) => children.map(convertToPublic).map(cb).map(convertToPrivate),
|
|
273
200
|
};
|
|
201
|
+
/**
|
|
202
|
+
* Convert a {@link d.VNode} to a {@link d.ChildNode} in order to present a
|
|
203
|
+
* friendlier public interface (hence, 'convertToPublic').
|
|
204
|
+
*
|
|
205
|
+
* @param node the virtual DOM node to convert
|
|
206
|
+
* @returns a converted child node
|
|
207
|
+
*/
|
|
274
208
|
const convertToPublic = (node) => ({
|
|
275
209
|
vattrs: node.$attrs$,
|
|
276
210
|
vchildren: node.$children$,
|
|
@@ -279,24 +213,395 @@ const convertToPublic = (node) => ({
|
|
|
279
213
|
vtag: node.$tag$,
|
|
280
214
|
vtext: node.$text$,
|
|
281
215
|
});
|
|
216
|
+
/**
|
|
217
|
+
* Convert a {@link d.ChildNode} back to an equivalent {@link d.VNode} in
|
|
218
|
+
* order to use the resulting object in the virtual DOM. The initial object was
|
|
219
|
+
* likely created as part of presenting a public API, so converting it back
|
|
220
|
+
* involved making it 'private' again (hence, `convertToPrivate`).
|
|
221
|
+
*
|
|
222
|
+
* @param node the child node to convert
|
|
223
|
+
* @returns a converted virtual DOM node
|
|
224
|
+
*/
|
|
282
225
|
const convertToPrivate = (node) => {
|
|
283
226
|
if (typeof node.vtag === 'function') {
|
|
284
227
|
const vnodeData = Object.assign({}, node.vattrs);
|
|
285
228
|
if (node.vkey) {
|
|
286
229
|
vnodeData.key = node.vkey;
|
|
287
230
|
}
|
|
288
|
-
if (node.vname) {
|
|
289
|
-
vnodeData.name = node.vname;
|
|
231
|
+
if (node.vname) {
|
|
232
|
+
vnodeData.name = node.vname;
|
|
233
|
+
}
|
|
234
|
+
return h(node.vtag, vnodeData, ...(node.vchildren || []));
|
|
235
|
+
}
|
|
236
|
+
const vnode = newVNode(node.vtag, node.vtext);
|
|
237
|
+
vnode.$attrs$ = node.vattrs;
|
|
238
|
+
vnode.$children$ = node.vchildren;
|
|
239
|
+
vnode.$key$ = node.vkey;
|
|
240
|
+
vnode.$name$ = node.vname;
|
|
241
|
+
return vnode;
|
|
242
|
+
};
|
|
243
|
+
const initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
|
|
244
|
+
const endHydrate = createTime('hydrateClient', tagName);
|
|
245
|
+
const shadowRoot = hostElm.shadowRoot;
|
|
246
|
+
const childRenderNodes = [];
|
|
247
|
+
const slotNodes = [];
|
|
248
|
+
const shadowRootNodes = shadowRoot ? [] : null;
|
|
249
|
+
const vnode = (hostRef.$vnode$ = newVNode(tagName, null));
|
|
250
|
+
if (!plt.$orgLocNodes$) {
|
|
251
|
+
initializeDocumentHydrate(doc.body, (plt.$orgLocNodes$ = new Map()));
|
|
252
|
+
}
|
|
253
|
+
hostElm[HYDRATE_ID] = hostId;
|
|
254
|
+
hostElm.removeAttribute(HYDRATE_ID);
|
|
255
|
+
clientHydrate(vnode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, hostElm, hostId);
|
|
256
|
+
childRenderNodes.map((c) => {
|
|
257
|
+
const orgLocationId = c.$hostId$ + '.' + c.$nodeId$;
|
|
258
|
+
const orgLocationNode = plt.$orgLocNodes$.get(orgLocationId);
|
|
259
|
+
const node = c.$elm$;
|
|
260
|
+
if (orgLocationNode && supportsShadow && orgLocationNode['s-en'] === '') {
|
|
261
|
+
orgLocationNode.parentNode.insertBefore(node, orgLocationNode.nextSibling);
|
|
262
|
+
}
|
|
263
|
+
if (!shadowRoot) {
|
|
264
|
+
node['s-hn'] = tagName;
|
|
265
|
+
if (orgLocationNode) {
|
|
266
|
+
node['s-ol'] = orgLocationNode;
|
|
267
|
+
node['s-ol']['s-nr'] = node;
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
plt.$orgLocNodes$.delete(orgLocationId);
|
|
271
|
+
});
|
|
272
|
+
if (shadowRoot) {
|
|
273
|
+
shadowRootNodes.map((shadowRootNode) => {
|
|
274
|
+
if (shadowRootNode) {
|
|
275
|
+
shadowRoot.appendChild(shadowRootNode);
|
|
276
|
+
}
|
|
277
|
+
});
|
|
278
|
+
}
|
|
279
|
+
endHydrate();
|
|
280
|
+
};
|
|
281
|
+
const clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, node, hostId) => {
|
|
282
|
+
let childNodeType;
|
|
283
|
+
let childIdSplt;
|
|
284
|
+
let childVNode;
|
|
285
|
+
let i;
|
|
286
|
+
if (node.nodeType === 1 /* NODE_TYPE.ElementNode */) {
|
|
287
|
+
childNodeType = node.getAttribute(HYDRATE_CHILD_ID);
|
|
288
|
+
if (childNodeType) {
|
|
289
|
+
// got the node data from the element's attribute
|
|
290
|
+
// `${hostId}.${nodeId}.${depth}.${index}`
|
|
291
|
+
childIdSplt = childNodeType.split('.');
|
|
292
|
+
if (childIdSplt[0] === hostId || childIdSplt[0] === '0') {
|
|
293
|
+
childVNode = {
|
|
294
|
+
$flags$: 0,
|
|
295
|
+
$hostId$: childIdSplt[0],
|
|
296
|
+
$nodeId$: childIdSplt[1],
|
|
297
|
+
$depth$: childIdSplt[2],
|
|
298
|
+
$index$: childIdSplt[3],
|
|
299
|
+
$tag$: node.tagName.toLowerCase(),
|
|
300
|
+
$elm$: node,
|
|
301
|
+
$attrs$: null,
|
|
302
|
+
$children$: null,
|
|
303
|
+
$key$: null,
|
|
304
|
+
$name$: null,
|
|
305
|
+
$text$: null,
|
|
306
|
+
};
|
|
307
|
+
childRenderNodes.push(childVNode);
|
|
308
|
+
node.removeAttribute(HYDRATE_CHILD_ID);
|
|
309
|
+
// this is a new child vnode
|
|
310
|
+
// so ensure its parent vnode has the vchildren array
|
|
311
|
+
if (!parentVNode.$children$) {
|
|
312
|
+
parentVNode.$children$ = [];
|
|
313
|
+
}
|
|
314
|
+
// add our child vnode to a specific index of the vnode's children
|
|
315
|
+
parentVNode.$children$[childVNode.$index$] = childVNode;
|
|
316
|
+
// this is now the new parent vnode for all the next child checks
|
|
317
|
+
parentVNode = childVNode;
|
|
318
|
+
if (shadowRootNodes && childVNode.$depth$ === '0') {
|
|
319
|
+
shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
// recursively drill down, end to start so we can remove nodes
|
|
324
|
+
for (i = node.childNodes.length - 1; i >= 0; i--) {
|
|
325
|
+
clientHydrate(parentVNode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, node.childNodes[i], hostId);
|
|
326
|
+
}
|
|
327
|
+
if (node.shadowRoot) {
|
|
328
|
+
// keep drilling down through the shadow root nodes
|
|
329
|
+
for (i = node.shadowRoot.childNodes.length - 1; i >= 0; i--) {
|
|
330
|
+
clientHydrate(parentVNode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, node.shadowRoot.childNodes[i], hostId);
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
else if (node.nodeType === 8 /* NODE_TYPE.CommentNode */) {
|
|
335
|
+
// `${COMMENT_TYPE}.${hostId}.${nodeId}.${depth}.${index}`
|
|
336
|
+
childIdSplt = node.nodeValue.split('.');
|
|
337
|
+
if (childIdSplt[1] === hostId || childIdSplt[1] === '0') {
|
|
338
|
+
// comment node for either the host id or a 0 host id
|
|
339
|
+
childNodeType = childIdSplt[0];
|
|
340
|
+
childVNode = {
|
|
341
|
+
$flags$: 0,
|
|
342
|
+
$hostId$: childIdSplt[1],
|
|
343
|
+
$nodeId$: childIdSplt[2],
|
|
344
|
+
$depth$: childIdSplt[3],
|
|
345
|
+
$index$: childIdSplt[4],
|
|
346
|
+
$elm$: node,
|
|
347
|
+
$attrs$: null,
|
|
348
|
+
$children$: null,
|
|
349
|
+
$key$: null,
|
|
350
|
+
$name$: null,
|
|
351
|
+
$tag$: null,
|
|
352
|
+
$text$: null,
|
|
353
|
+
};
|
|
354
|
+
if (childNodeType === TEXT_NODE_ID) {
|
|
355
|
+
childVNode.$elm$ = node.nextSibling;
|
|
356
|
+
if (childVNode.$elm$ && childVNode.$elm$.nodeType === 3 /* NODE_TYPE.TextNode */) {
|
|
357
|
+
childVNode.$text$ = childVNode.$elm$.textContent;
|
|
358
|
+
childRenderNodes.push(childVNode);
|
|
359
|
+
// remove the text comment since it's no longer needed
|
|
360
|
+
node.remove();
|
|
361
|
+
if (!parentVNode.$children$) {
|
|
362
|
+
parentVNode.$children$ = [];
|
|
363
|
+
}
|
|
364
|
+
parentVNode.$children$[childVNode.$index$] = childVNode;
|
|
365
|
+
if (shadowRootNodes && childVNode.$depth$ === '0') {
|
|
366
|
+
shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
else if (childVNode.$hostId$ === hostId) {
|
|
371
|
+
// this comment node is specifcally for this host id
|
|
372
|
+
if (childNodeType === SLOT_NODE_ID) {
|
|
373
|
+
// `${SLOT_NODE_ID}.${hostId}.${nodeId}.${depth}.${index}.${slotName}`;
|
|
374
|
+
childVNode.$tag$ = 'slot';
|
|
375
|
+
if (childIdSplt[5]) {
|
|
376
|
+
node['s-sn'] = childVNode.$name$ = childIdSplt[5];
|
|
377
|
+
}
|
|
378
|
+
else {
|
|
379
|
+
node['s-sn'] = '';
|
|
380
|
+
}
|
|
381
|
+
node['s-sr'] = true;
|
|
382
|
+
if (shadowRootNodes) {
|
|
383
|
+
// browser support shadowRoot and this is a shadow dom component
|
|
384
|
+
// create an actual slot element
|
|
385
|
+
childVNode.$elm$ = doc.createElement(childVNode.$tag$);
|
|
386
|
+
if (childVNode.$name$) {
|
|
387
|
+
// add the slot name attribute
|
|
388
|
+
childVNode.$elm$.setAttribute('name', childVNode.$name$);
|
|
389
|
+
}
|
|
390
|
+
// insert the new slot element before the slot comment
|
|
391
|
+
node.parentNode.insertBefore(childVNode.$elm$, node);
|
|
392
|
+
// remove the slot comment since it's not needed for shadow
|
|
393
|
+
node.remove();
|
|
394
|
+
if (childVNode.$depth$ === '0') {
|
|
395
|
+
shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
slotNodes.push(childVNode);
|
|
399
|
+
if (!parentVNode.$children$) {
|
|
400
|
+
parentVNode.$children$ = [];
|
|
401
|
+
}
|
|
402
|
+
parentVNode.$children$[childVNode.$index$] = childVNode;
|
|
403
|
+
}
|
|
404
|
+
else if (childNodeType === CONTENT_REF_ID) {
|
|
405
|
+
// `${CONTENT_REF_ID}.${hostId}`;
|
|
406
|
+
if (shadowRootNodes) {
|
|
407
|
+
// remove the content ref comment since it's not needed for shadow
|
|
408
|
+
node.remove();
|
|
409
|
+
}
|
|
410
|
+
else {
|
|
411
|
+
hostElm['s-cr'] = node;
|
|
412
|
+
node['s-cn'] = true;
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
else if (parentVNode && parentVNode.$tag$ === 'style') {
|
|
419
|
+
const vnode = newVNode(null, node.textContent);
|
|
420
|
+
vnode.$elm$ = node;
|
|
421
|
+
vnode.$index$ = '0';
|
|
422
|
+
parentVNode.$children$ = [vnode];
|
|
423
|
+
}
|
|
424
|
+
};
|
|
425
|
+
const initializeDocumentHydrate = (node, orgLocNodes) => {
|
|
426
|
+
if (node.nodeType === 1 /* NODE_TYPE.ElementNode */) {
|
|
427
|
+
let i = 0;
|
|
428
|
+
for (; i < node.childNodes.length; i++) {
|
|
429
|
+
initializeDocumentHydrate(node.childNodes[i], orgLocNodes);
|
|
430
|
+
}
|
|
431
|
+
if (node.shadowRoot) {
|
|
432
|
+
for (i = 0; i < node.shadowRoot.childNodes.length; i++) {
|
|
433
|
+
initializeDocumentHydrate(node.shadowRoot.childNodes[i], orgLocNodes);
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
else if (node.nodeType === 8 /* NODE_TYPE.CommentNode */) {
|
|
438
|
+
const childIdSplt = node.nodeValue.split('.');
|
|
439
|
+
if (childIdSplt[0] === ORG_LOCATION_ID) {
|
|
440
|
+
orgLocNodes.set(childIdSplt[1] + '.' + childIdSplt[2], node);
|
|
441
|
+
node.nodeValue = '';
|
|
442
|
+
// useful to know if the original location is
|
|
443
|
+
// the root light-dom of a shadow dom component
|
|
444
|
+
node['s-en'] = childIdSplt[3];
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
};
|
|
448
|
+
/**
|
|
449
|
+
* Parse a new property value for a given property type.
|
|
450
|
+
*
|
|
451
|
+
* While the prop value can reasonably be expected to be of `any` type as far as TypeScript's type checker is concerned,
|
|
452
|
+
* it is not safe to assume that the string returned by evaluating `typeof propValue` matches:
|
|
453
|
+
* 1. `any`, the type given to `propValue` in the function signature
|
|
454
|
+
* 2. the type stored from `propType`.
|
|
455
|
+
*
|
|
456
|
+
* This function provides the capability to parse/coerce a property's value to potentially any other JavaScript type.
|
|
457
|
+
*
|
|
458
|
+
* Property values represented in TSX preserve their type information. In the example below, the number 0 is passed to
|
|
459
|
+
* a component. This `propValue` will preserve its type information (`typeof propValue === 'number'`). Note that is
|
|
460
|
+
* based on the type of the value being passed in, not the type declared of the class member decorated with `@Prop`.
|
|
461
|
+
* ```tsx
|
|
462
|
+
* <my-cmp prop-val={0}></my-cmp>
|
|
463
|
+
* ```
|
|
464
|
+
*
|
|
465
|
+
* HTML prop values on the other hand, will always a string
|
|
466
|
+
*
|
|
467
|
+
* @param propValue the new value to coerce to some type
|
|
468
|
+
* @param propType the type of the prop, expressed as a binary number
|
|
469
|
+
* @returns the parsed/coerced value
|
|
470
|
+
*/
|
|
471
|
+
const parsePropertyValue = (propValue, propType) => {
|
|
472
|
+
// ensure this value is of the correct prop type
|
|
473
|
+
if (propValue != null && !isComplexType(propValue)) {
|
|
474
|
+
if (propType & 4 /* MEMBER_FLAGS.Boolean */) {
|
|
475
|
+
// per the HTML spec, any string value means it is a boolean true value
|
|
476
|
+
// but we'll cheat here and say that the string "false" is the boolean false
|
|
477
|
+
return propValue === 'false' ? false : propValue === '' || !!propValue;
|
|
478
|
+
}
|
|
479
|
+
if (propType & 2 /* MEMBER_FLAGS.Number */) {
|
|
480
|
+
// force it to be a number
|
|
481
|
+
return parseFloat(propValue);
|
|
482
|
+
}
|
|
483
|
+
if (propType & 1 /* MEMBER_FLAGS.String */) {
|
|
484
|
+
// could have been passed as a number or boolean
|
|
485
|
+
// but we still want it as a string
|
|
486
|
+
return String(propValue);
|
|
487
|
+
}
|
|
488
|
+
// redundant return here for better minification
|
|
489
|
+
return propValue;
|
|
490
|
+
}
|
|
491
|
+
// not sure exactly what type we want
|
|
492
|
+
// so no need to change to a different type
|
|
493
|
+
return propValue;
|
|
494
|
+
};
|
|
495
|
+
const getElement = (ref) => (getHostRef(ref).$hostElement$ );
|
|
496
|
+
const createEvent = (ref, name, flags) => {
|
|
497
|
+
const elm = getElement(ref);
|
|
498
|
+
return {
|
|
499
|
+
emit: (detail) => {
|
|
500
|
+
return emitEvent(elm, name, {
|
|
501
|
+
bubbles: !!(flags & 4 /* EVENT_FLAGS.Bubbles */),
|
|
502
|
+
composed: !!(flags & 2 /* EVENT_FLAGS.Composed */),
|
|
503
|
+
cancelable: !!(flags & 1 /* EVENT_FLAGS.Cancellable */),
|
|
504
|
+
detail,
|
|
505
|
+
});
|
|
506
|
+
},
|
|
507
|
+
};
|
|
508
|
+
};
|
|
509
|
+
/**
|
|
510
|
+
* Helper function to create & dispatch a custom Event on a provided target
|
|
511
|
+
* @param elm the target of the Event
|
|
512
|
+
* @param name the name to give the custom Event
|
|
513
|
+
* @param opts options for configuring a custom Event
|
|
514
|
+
* @returns the custom Event
|
|
515
|
+
*/
|
|
516
|
+
const emitEvent = (elm, name, opts) => {
|
|
517
|
+
const ev = plt.ce(name, opts);
|
|
518
|
+
elm.dispatchEvent(ev);
|
|
519
|
+
return ev;
|
|
520
|
+
};
|
|
521
|
+
const rootAppliedStyles = /*@__PURE__*/ new WeakMap();
|
|
522
|
+
const registerStyle = (scopeId, cssText, allowCS) => {
|
|
523
|
+
let style = styles.get(scopeId);
|
|
524
|
+
if (supportsConstructableStylesheets && allowCS) {
|
|
525
|
+
style = (style || new CSSStyleSheet());
|
|
526
|
+
if (typeof style === 'string') {
|
|
527
|
+
style = cssText;
|
|
528
|
+
}
|
|
529
|
+
else {
|
|
530
|
+
style.replaceSync(cssText);
|
|
531
|
+
}
|
|
532
|
+
}
|
|
533
|
+
else {
|
|
534
|
+
style = cssText;
|
|
535
|
+
}
|
|
536
|
+
styles.set(scopeId, style);
|
|
537
|
+
};
|
|
538
|
+
const addStyle = (styleContainerNode, cmpMeta, mode, hostElm) => {
|
|
539
|
+
var _a;
|
|
540
|
+
let scopeId = getScopeId(cmpMeta);
|
|
541
|
+
const style = styles.get(scopeId);
|
|
542
|
+
// if an element is NOT connected then getRootNode() will return the wrong root node
|
|
543
|
+
// so the fallback is to always use the document for the root node in those cases
|
|
544
|
+
styleContainerNode = styleContainerNode.nodeType === 11 /* NODE_TYPE.DocumentFragment */ ? styleContainerNode : doc;
|
|
545
|
+
if (style) {
|
|
546
|
+
if (typeof style === 'string') {
|
|
547
|
+
styleContainerNode = styleContainerNode.head || styleContainerNode;
|
|
548
|
+
let appliedStyles = rootAppliedStyles.get(styleContainerNode);
|
|
549
|
+
let styleElm;
|
|
550
|
+
if (!appliedStyles) {
|
|
551
|
+
rootAppliedStyles.set(styleContainerNode, (appliedStyles = new Set()));
|
|
552
|
+
}
|
|
553
|
+
if (!appliedStyles.has(scopeId)) {
|
|
554
|
+
if (styleContainerNode.host &&
|
|
555
|
+
(styleElm = styleContainerNode.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId}"]`))) {
|
|
556
|
+
// This is only happening on native shadow-dom, do not needs CSS var shim
|
|
557
|
+
styleElm.innerHTML = style;
|
|
558
|
+
}
|
|
559
|
+
else {
|
|
560
|
+
// TODO(STENCIL-659): Remove code implementing the CSS variable shim
|
|
561
|
+
{
|
|
562
|
+
styleElm = doc.createElement('style');
|
|
563
|
+
styleElm.innerHTML = style;
|
|
564
|
+
}
|
|
565
|
+
// Apply CSP nonce to the style tag if it exists
|
|
566
|
+
const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);
|
|
567
|
+
if (nonce != null) {
|
|
568
|
+
styleElm.setAttribute('nonce', nonce);
|
|
569
|
+
}
|
|
570
|
+
styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector('link'));
|
|
571
|
+
}
|
|
572
|
+
if (appliedStyles) {
|
|
573
|
+
appliedStyles.add(scopeId);
|
|
574
|
+
}
|
|
575
|
+
}
|
|
576
|
+
}
|
|
577
|
+
else if (!styleContainerNode.adoptedStyleSheets.includes(style)) {
|
|
578
|
+
styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
|
|
290
579
|
}
|
|
291
|
-
return h(node.vtag, vnodeData, ...(node.vchildren || []));
|
|
292
580
|
}
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
581
|
+
return scopeId;
|
|
582
|
+
};
|
|
583
|
+
const attachStyles = (hostRef) => {
|
|
584
|
+
const cmpMeta = hostRef.$cmpMeta$;
|
|
585
|
+
const elm = hostRef.$hostElement$;
|
|
586
|
+
const flags = cmpMeta.$flags$;
|
|
587
|
+
const endAttachStyles = createTime('attachStyles', cmpMeta.$tagName$);
|
|
588
|
+
const scopeId = addStyle(elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(), cmpMeta);
|
|
589
|
+
// TODO(STENCIL-662): Remove code related to deprecated shadowDomShim field
|
|
590
|
+
if (flags & 10 /* CMP_FLAGS.needsScopedEncapsulation */) {
|
|
591
|
+
// only required when we're NOT using native shadow dom (slot)
|
|
592
|
+
// or this browser doesn't support native shadow dom
|
|
593
|
+
// and this host element was NOT created with SSR
|
|
594
|
+
// let's pick out the inner content for slot projection
|
|
595
|
+
// create a node to represent where the original
|
|
596
|
+
// content was first placed, which is useful later on
|
|
597
|
+
// DOM WRITE!!
|
|
598
|
+
elm['s-sc'] = scopeId;
|
|
599
|
+
elm.classList.add(scopeId + '-h');
|
|
600
|
+
}
|
|
601
|
+
endAttachStyles();
|
|
299
602
|
};
|
|
603
|
+
const getScopeId = (cmp, mode) => 'sc-' + (cmp.$tagName$);
|
|
604
|
+
const convertScopedToShadow = (css) => css.replace(/\/\*!@([^\/]+)\*\/[^\{]+\{/g, '$1{');
|
|
300
605
|
/**
|
|
301
606
|
* Production setAccessor() function based on Preact by
|
|
302
607
|
* Jason Miller (@developit)
|
|
@@ -316,6 +621,31 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
316
621
|
classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
|
|
317
622
|
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
318
623
|
}
|
|
624
|
+
else if (memberName === 'style') {
|
|
625
|
+
// update style attribute, css properties and values
|
|
626
|
+
{
|
|
627
|
+
for (const prop in oldValue) {
|
|
628
|
+
if (!newValue || newValue[prop] == null) {
|
|
629
|
+
if (prop.includes('-')) {
|
|
630
|
+
elm.style.removeProperty(prop);
|
|
631
|
+
}
|
|
632
|
+
else {
|
|
633
|
+
elm.style[prop] = '';
|
|
634
|
+
}
|
|
635
|
+
}
|
|
636
|
+
}
|
|
637
|
+
}
|
|
638
|
+
for (const prop in newValue) {
|
|
639
|
+
if (!oldValue || newValue[prop] !== oldValue[prop]) {
|
|
640
|
+
if (prop.includes('-')) {
|
|
641
|
+
elm.style.setProperty(prop, newValue[prop]);
|
|
642
|
+
}
|
|
643
|
+
else {
|
|
644
|
+
elm.style[prop] = newValue[prop];
|
|
645
|
+
}
|
|
646
|
+
}
|
|
647
|
+
}
|
|
648
|
+
}
|
|
319
649
|
else if (memberName === 'ref') {
|
|
320
650
|
// minifier will clean this up
|
|
321
651
|
if (newValue) {
|
|
@@ -389,7 +719,7 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
389
719
|
}
|
|
390
720
|
}
|
|
391
721
|
}
|
|
392
|
-
else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex) {
|
|
722
|
+
else if ((!isProp || flags & 4 /* VNODE_FLAGS.isHost */ || isSvg) && !isComplex) {
|
|
393
723
|
newValue = newValue === true ? '' : newValue;
|
|
394
724
|
{
|
|
395
725
|
elm.setAttribute(memberName, newValue);
|
|
@@ -404,7 +734,7 @@ const updateElement = (oldVnode, newVnode, isSvgMode, memberName) => {
|
|
|
404
734
|
// if the element passed in is a shadow root, which is a document fragment
|
|
405
735
|
// then we want to be adding attrs/props to the shadow root's "host" element
|
|
406
736
|
// if it's not a shadow root, then we add attrs/props to the same element
|
|
407
|
-
const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host
|
|
737
|
+
const elm = newVnode.$elm$.nodeType === 11 /* NODE_TYPE.DocumentFragment */ && newVnode.$elm$.host
|
|
408
738
|
? newVnode.$elm$.host
|
|
409
739
|
: newVnode.$elm$;
|
|
410
740
|
const oldVnodeAttrs = (oldVnode && oldVnode.$attrs$) || EMPTY_OBJ;
|
|
@@ -422,6 +752,16 @@ const updateElement = (oldVnode, newVnode, isSvgMode, memberName) => {
|
|
|
422
752
|
setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName], isSvgMode, newVnode.$flags$);
|
|
423
753
|
}
|
|
424
754
|
};
|
|
755
|
+
/**
|
|
756
|
+
* Create a DOM Node corresponding to one of the children of a given VNode.
|
|
757
|
+
*
|
|
758
|
+
* @param oldParentVNode the parent VNode from the previous render
|
|
759
|
+
* @param newParentVNode the parent VNode from the current render
|
|
760
|
+
* @param childIndex the index of the VNode, in the _new_ parent node's
|
|
761
|
+
* children, for which we will create a new DOM node
|
|
762
|
+
* @param parentElm the parent DOM node which our new node will be a child of
|
|
763
|
+
* @returns the newly created node
|
|
764
|
+
*/
|
|
425
765
|
const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
426
766
|
// tslint:disable-next-line: prefer-const
|
|
427
767
|
const newVNode = newParentVNode.$children$[childIndex];
|
|
@@ -439,23 +779,23 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
439
779
|
}
|
|
440
780
|
newVNode.$flags$ |= newVNode.$children$
|
|
441
781
|
? // slot element has fallback content
|
|
442
|
-
2 /* isSlotFallback */
|
|
782
|
+
2 /* VNODE_FLAGS.isSlotFallback */
|
|
443
783
|
: // slot element does not have fallback content
|
|
444
|
-
1 /* isSlotReference */;
|
|
784
|
+
1 /* VNODE_FLAGS.isSlotReference */;
|
|
445
785
|
}
|
|
446
786
|
}
|
|
447
787
|
if (newVNode.$text$ !== null) {
|
|
448
788
|
// create text node
|
|
449
789
|
elm = newVNode.$elm$ = doc.createTextNode(newVNode.$text$);
|
|
450
790
|
}
|
|
451
|
-
else if (newVNode.$flags$ & 1 /* isSlotReference */) {
|
|
791
|
+
else if (newVNode.$flags$ & 1 /* VNODE_FLAGS.isSlotReference */) {
|
|
452
792
|
// create a slot reference node
|
|
453
793
|
elm = newVNode.$elm$ =
|
|
454
794
|
doc.createTextNode('');
|
|
455
795
|
}
|
|
456
796
|
else {
|
|
457
797
|
// create element
|
|
458
|
-
elm = newVNode.$elm$ = (doc.createElement(newVNode.$flags$ & 2 /* isSlotFallback */
|
|
798
|
+
elm = newVNode.$elm$ = (doc.createElement(newVNode.$flags$ & 2 /* VNODE_FLAGS.isSlotFallback */
|
|
459
799
|
? 'slot-fb'
|
|
460
800
|
: newVNode.$tag$));
|
|
461
801
|
// add css classes, attrs, props, listeners, etc.
|
|
@@ -481,7 +821,7 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
481
821
|
}
|
|
482
822
|
{
|
|
483
823
|
elm['s-hn'] = hostTagName;
|
|
484
|
-
if (newVNode.$flags$ & (2 /* isSlotFallback */ | 1 /* isSlotReference */)) {
|
|
824
|
+
if (newVNode.$flags$ & (2 /* VNODE_FLAGS.isSlotFallback */ | 1 /* VNODE_FLAGS.isSlotReference */)) {
|
|
485
825
|
// remember the content reference comment
|
|
486
826
|
elm['s-sr'] = true;
|
|
487
827
|
// remember the content reference comment
|
|
@@ -500,7 +840,7 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
500
840
|
return elm;
|
|
501
841
|
};
|
|
502
842
|
const putBackInOriginalLocation = (parentElm, recursive) => {
|
|
503
|
-
plt.$flags$ |= 1 /* isTmpDisconnected */;
|
|
843
|
+
plt.$flags$ |= 1 /* PLATFORM_FLAGS.isTmpDisconnected */;
|
|
504
844
|
const oldSlotChildNodes = parentElm.childNodes;
|
|
505
845
|
for (let i = oldSlotChildNodes.length - 1; i >= 0; i--) {
|
|
506
846
|
const childNode = oldSlotChildNodes[i];
|
|
@@ -521,8 +861,23 @@ const putBackInOriginalLocation = (parentElm, recursive) => {
|
|
|
521
861
|
putBackInOriginalLocation(childNode, recursive);
|
|
522
862
|
}
|
|
523
863
|
}
|
|
524
|
-
plt.$flags$ &= ~1 /* isTmpDisconnected */;
|
|
864
|
+
plt.$flags$ &= ~1 /* PLATFORM_FLAGS.isTmpDisconnected */;
|
|
525
865
|
};
|
|
866
|
+
/**
|
|
867
|
+
* Create DOM nodes corresponding to a list of {@link d.Vnode} objects and
|
|
868
|
+
* add them to the DOM in the appropriate place.
|
|
869
|
+
*
|
|
870
|
+
* @param parentElm the DOM node which should be used as a parent for the new
|
|
871
|
+
* DOM nodes
|
|
872
|
+
* @param before a child of the `parentElm` which the new children should be
|
|
873
|
+
* inserted before (optional)
|
|
874
|
+
* @param parentVNode the parent virtual DOM node
|
|
875
|
+
* @param vnodes the new child virtual DOM nodes to produce DOM nodes for
|
|
876
|
+
* @param startIdx the index in the child virtual DOM nodes at which to start
|
|
877
|
+
* creating DOM nodes (inclusive)
|
|
878
|
+
* @param endIdx the index in the child virtual DOM nodes at which to stop
|
|
879
|
+
* creating DOM nodes (inclusive)
|
|
880
|
+
*/
|
|
526
881
|
const addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
|
|
527
882
|
let containerElm = ((parentElm['s-cr'] && parentElm['s-cr'].parentNode) || parentElm);
|
|
528
883
|
let childNode;
|
|
@@ -539,6 +894,19 @@ const addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) =>
|
|
|
539
894
|
}
|
|
540
895
|
}
|
|
541
896
|
};
|
|
897
|
+
/**
|
|
898
|
+
* Remove the DOM elements corresponding to a list of {@link d.VNode} objects.
|
|
899
|
+
* This can be used to, for instance, clean up after a list of children which
|
|
900
|
+
* should no longer be shown.
|
|
901
|
+
*
|
|
902
|
+
* This function also handles some of Stencil's slot relocation logic.
|
|
903
|
+
*
|
|
904
|
+
* @param vnodes a list of virtual DOM nodes to remove
|
|
905
|
+
* @param startIdx the index at which to start removing nodes (inclusive)
|
|
906
|
+
* @param endIdx the index at which to stop removing nodes (inclusive)
|
|
907
|
+
* @param vnode a VNode
|
|
908
|
+
* @param elm an element
|
|
909
|
+
*/
|
|
542
910
|
const removeVnodes = (vnodes, startIdx, endIdx, vnode, elm) => {
|
|
543
911
|
for (; startIdx <= endIdx; ++startIdx) {
|
|
544
912
|
if ((vnode = vnodes[startIdx])) {
|
|
@@ -563,6 +931,74 @@ const removeVnodes = (vnodes, startIdx, endIdx, vnode, elm) => {
|
|
|
563
931
|
}
|
|
564
932
|
}
|
|
565
933
|
};
|
|
934
|
+
/**
|
|
935
|
+
* Reconcile the children of a new VNode with the children of an old VNode by
|
|
936
|
+
* traversing the two collections of children, identifying nodes that are
|
|
937
|
+
* conserved or changed, calling out to `patch` to make any necessary
|
|
938
|
+
* updates to the DOM, and rearranging DOM nodes as needed.
|
|
939
|
+
*
|
|
940
|
+
* The algorithm for reconciling children works by analyzing two 'windows' onto
|
|
941
|
+
* the two arrays of children (`oldCh` and `newCh`). We keep track of the
|
|
942
|
+
* 'windows' by storing start and end indices and references to the
|
|
943
|
+
* corresponding array entries. Initially the two 'windows' are basically equal
|
|
944
|
+
* to the entire array, but we progressively narrow the windows until there are
|
|
945
|
+
* no children left to update by doing the following:
|
|
946
|
+
*
|
|
947
|
+
* 1. Skip any `null` entries at the beginning or end of the two arrays, so
|
|
948
|
+
* that if we have an initial array like the following we'll end up dealing
|
|
949
|
+
* only with a window bounded by the highlighted elements:
|
|
950
|
+
*
|
|
951
|
+
* [null, null, VNode1 , ... , VNode2, null, null]
|
|
952
|
+
* ^^^^^^ ^^^^^^
|
|
953
|
+
*
|
|
954
|
+
* 2. Check to see if the elements at the head and tail positions are equal
|
|
955
|
+
* across the windows. This will basically detect elements which haven't
|
|
956
|
+
* been added, removed, or changed position, i.e. if you had the following
|
|
957
|
+
* VNode elements (represented as HTML):
|
|
958
|
+
*
|
|
959
|
+
* oldVNode: `<div><p><span>HEY</span></p></div>`
|
|
960
|
+
* newVNode: `<div><p><span>THERE</span></p></div>`
|
|
961
|
+
*
|
|
962
|
+
* Then when comparing the children of the `<div>` tag we check the equality
|
|
963
|
+
* of the VNodes corresponding to the `<p>` tags and, since they are the
|
|
964
|
+
* same tag in the same position, we'd be able to avoid completely
|
|
965
|
+
* re-rendering the subtree under them with a new DOM element and would just
|
|
966
|
+
* call out to `patch` to handle reconciling their children and so on.
|
|
967
|
+
*
|
|
968
|
+
* 3. Check, for both windows, to see if the element at the beginning of the
|
|
969
|
+
* window corresponds to the element at the end of the other window. This is
|
|
970
|
+
* a heuristic which will let us identify _some_ situations in which
|
|
971
|
+
* elements have changed position, for instance it _should_ detect that the
|
|
972
|
+
* children nodes themselves have not changed but merely moved in the
|
|
973
|
+
* following example:
|
|
974
|
+
*
|
|
975
|
+
* oldVNode: `<div><element-one /><element-two /></div>`
|
|
976
|
+
* newVNode: `<div><element-two /><element-one /></div>`
|
|
977
|
+
*
|
|
978
|
+
* If we find cases like this then we also need to move the concrete DOM
|
|
979
|
+
* elements corresponding to the moved children to write the re-order to the
|
|
980
|
+
* DOM.
|
|
981
|
+
*
|
|
982
|
+
* 4. Finally, if VNodes have the `key` attribute set on them we check for any
|
|
983
|
+
* nodes in the old children which have the same key as the first element in
|
|
984
|
+
* our window on the new children. If we find such a node we handle calling
|
|
985
|
+
* out to `patch`, moving relevant DOM nodes, and so on, in accordance with
|
|
986
|
+
* what we find.
|
|
987
|
+
*
|
|
988
|
+
* Finally, once we've narrowed our 'windows' to the point that either of them
|
|
989
|
+
* collapse (i.e. they have length 0) we then handle any remaining VNode
|
|
990
|
+
* insertion or deletion that needs to happen to get a DOM state that correctly
|
|
991
|
+
* reflects the new child VNodes. If, for instance, after our window on the old
|
|
992
|
+
* children has collapsed we still have more nodes on the new children that
|
|
993
|
+
* we haven't dealt with yet then we need to add them, or if the new children
|
|
994
|
+
* collapse but we still have unhandled _old_ children then we need to make
|
|
995
|
+
* sure the corresponding DOM nodes are removed.
|
|
996
|
+
*
|
|
997
|
+
* @param parentElm the node into which the parent VNode is rendered
|
|
998
|
+
* @param oldCh the old children of the parent node
|
|
999
|
+
* @param newVNode the new VNode which will replace the parent
|
|
1000
|
+
* @param newCh the new children of the parent node
|
|
1001
|
+
*/
|
|
566
1002
|
const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
567
1003
|
let oldStartIdx = 0;
|
|
568
1004
|
let newStartIdx = 0;
|
|
@@ -575,7 +1011,7 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
|
575
1011
|
let node;
|
|
576
1012
|
while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {
|
|
577
1013
|
if (oldStartVnode == null) {
|
|
578
|
-
//
|
|
1014
|
+
// VNode might have been moved left
|
|
579
1015
|
oldStartVnode = oldCh[++oldStartIdx];
|
|
580
1016
|
}
|
|
581
1017
|
else if (oldEndVnode == null) {
|
|
@@ -588,42 +1024,102 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
|
588
1024
|
newEndVnode = newCh[--newEndIdx];
|
|
589
1025
|
}
|
|
590
1026
|
else if (isSameVnode(oldStartVnode, newStartVnode)) {
|
|
1027
|
+
// if the start nodes are the same then we should patch the new VNode
|
|
1028
|
+
// onto the old one, and increment our `newStartIdx` and `oldStartIdx`
|
|
1029
|
+
// indices to reflect that. We don't need to move any DOM Nodes around
|
|
1030
|
+
// since things are matched up in order.
|
|
591
1031
|
patch(oldStartVnode, newStartVnode);
|
|
592
1032
|
oldStartVnode = oldCh[++oldStartIdx];
|
|
593
1033
|
newStartVnode = newCh[++newStartIdx];
|
|
594
1034
|
}
|
|
595
1035
|
else if (isSameVnode(oldEndVnode, newEndVnode)) {
|
|
1036
|
+
// likewise, if the end nodes are the same we patch new onto old and
|
|
1037
|
+
// decrement our end indices, and also likewise in this case we don't
|
|
1038
|
+
// need to move any DOM Nodes.
|
|
596
1039
|
patch(oldEndVnode, newEndVnode);
|
|
597
1040
|
oldEndVnode = oldCh[--oldEndIdx];
|
|
598
1041
|
newEndVnode = newCh[--newEndIdx];
|
|
599
1042
|
}
|
|
600
1043
|
else if (isSameVnode(oldStartVnode, newEndVnode)) {
|
|
601
|
-
// Vnode moved right
|
|
1044
|
+
// case: "Vnode moved right"
|
|
1045
|
+
//
|
|
1046
|
+
// We've found that the last node in our window on the new children is
|
|
1047
|
+
// the same VNode as the _first_ node in our window on the old children
|
|
1048
|
+
// we're dealing with now. Visually, this is the layout of these two
|
|
1049
|
+
// nodes:
|
|
1050
|
+
//
|
|
1051
|
+
// newCh: [..., newStartVnode , ... , newEndVnode , ...]
|
|
1052
|
+
// ^^^^^^^^^^^
|
|
1053
|
+
// oldCh: [..., oldStartVnode , ... , oldEndVnode , ...]
|
|
1054
|
+
// ^^^^^^^^^^^^^
|
|
1055
|
+
//
|
|
1056
|
+
// In this situation we need to patch `newEndVnode` onto `oldStartVnode`
|
|
1057
|
+
// and move the DOM element for `oldStartVnode`.
|
|
602
1058
|
if ((oldStartVnode.$tag$ === 'slot' || newEndVnode.$tag$ === 'slot')) {
|
|
603
1059
|
putBackInOriginalLocation(oldStartVnode.$elm$.parentNode, false);
|
|
604
1060
|
}
|
|
605
1061
|
patch(oldStartVnode, newEndVnode);
|
|
1062
|
+
// We need to move the element for `oldStartVnode` into a position which
|
|
1063
|
+
// will be appropriate for `newEndVnode`. For this we can use
|
|
1064
|
+
// `.insertBefore` and `oldEndVnode.$elm$.nextSibling`. If there is a
|
|
1065
|
+
// sibling for `oldEndVnode.$elm$` then we want to move the DOM node for
|
|
1066
|
+
// `oldStartVnode` between `oldEndVnode` and it's sibling, like so:
|
|
1067
|
+
//
|
|
1068
|
+
// <old-start-node />
|
|
1069
|
+
// <some-intervening-node />
|
|
1070
|
+
// <old-end-node />
|
|
1071
|
+
// <!-- -> <-- `oldStartVnode.$elm$` should be inserted here
|
|
1072
|
+
// <next-sibling />
|
|
1073
|
+
//
|
|
1074
|
+
// If instead `oldEndVnode.$elm$` has no sibling then we just want to put
|
|
1075
|
+
// the node for `oldStartVnode` at the end of the children of
|
|
1076
|
+
// `parentElm`. Luckily, `Node.nextSibling` will return `null` if there
|
|
1077
|
+
// aren't any siblings, and passing `null` to `Node.insertBefore` will
|
|
1078
|
+
// append it to the children of the parent element.
|
|
606
1079
|
parentElm.insertBefore(oldStartVnode.$elm$, oldEndVnode.$elm$.nextSibling);
|
|
607
1080
|
oldStartVnode = oldCh[++oldStartIdx];
|
|
608
1081
|
newEndVnode = newCh[--newEndIdx];
|
|
609
1082
|
}
|
|
610
1083
|
else if (isSameVnode(oldEndVnode, newStartVnode)) {
|
|
611
|
-
// Vnode moved left
|
|
1084
|
+
// case: "Vnode moved left"
|
|
1085
|
+
//
|
|
1086
|
+
// We've found that the first node in our window on the new children is
|
|
1087
|
+
// the same VNode as the _last_ node in our window on the old children.
|
|
1088
|
+
// Visually, this is the layout of these two nodes:
|
|
1089
|
+
//
|
|
1090
|
+
// newCh: [..., newStartVnode , ... , newEndVnode , ...]
|
|
1091
|
+
// ^^^^^^^^^^^^^
|
|
1092
|
+
// oldCh: [..., oldStartVnode , ... , oldEndVnode , ...]
|
|
1093
|
+
// ^^^^^^^^^^^
|
|
1094
|
+
//
|
|
1095
|
+
// In this situation we need to patch `newStartVnode` onto `oldEndVnode`
|
|
1096
|
+
// (which will handle updating any changed attributes, reconciling their
|
|
1097
|
+
// children etc) but we also need to move the DOM node to which
|
|
1098
|
+
// `oldEndVnode` corresponds.
|
|
612
1099
|
if ((oldStartVnode.$tag$ === 'slot' || newEndVnode.$tag$ === 'slot')) {
|
|
613
1100
|
putBackInOriginalLocation(oldEndVnode.$elm$.parentNode, false);
|
|
614
1101
|
}
|
|
615
1102
|
patch(oldEndVnode, newStartVnode);
|
|
1103
|
+
// We've already checked above if `oldStartVnode` and `newStartVnode` are
|
|
1104
|
+
// the same node, so since we're here we know that they are not. Thus we
|
|
1105
|
+
// can move the element for `oldEndVnode` _before_ the element for
|
|
1106
|
+
// `oldStartVnode`, leaving `oldStartVnode` to be reconciled in the
|
|
1107
|
+
// future.
|
|
616
1108
|
parentElm.insertBefore(oldEndVnode.$elm$, oldStartVnode.$elm$);
|
|
617
1109
|
oldEndVnode = oldCh[--oldEndIdx];
|
|
618
1110
|
newStartVnode = newCh[++newStartIdx];
|
|
619
1111
|
}
|
|
620
1112
|
else {
|
|
621
1113
|
{
|
|
622
|
-
//
|
|
1114
|
+
// We either didn't find an element in the old children that matches
|
|
1115
|
+
// the key of the first new child OR the build is not using `key`
|
|
1116
|
+
// attributes at all. In either case we need to create a new element
|
|
1117
|
+
// for the new node.
|
|
623
1118
|
node = createElm(oldCh && oldCh[newStartIdx], newVNode, newStartIdx, parentElm);
|
|
624
1119
|
newStartVnode = newCh[++newStartIdx];
|
|
625
1120
|
}
|
|
626
1121
|
if (node) {
|
|
1122
|
+
// if we created a new node then handle inserting it to the DOM
|
|
627
1123
|
{
|
|
628
1124
|
parentReferenceNode(oldStartVnode.$elm$).insertBefore(node, referenceNode(oldStartVnode.$elm$));
|
|
629
1125
|
}
|
|
@@ -631,18 +1127,40 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
|
631
1127
|
}
|
|
632
1128
|
}
|
|
633
1129
|
if (oldStartIdx > oldEndIdx) {
|
|
1130
|
+
// we have some more new nodes to add which don't match up with old nodes
|
|
634
1131
|
addVnodes(parentElm, newCh[newEndIdx + 1] == null ? null : newCh[newEndIdx + 1].$elm$, newVNode, newCh, newStartIdx, newEndIdx);
|
|
635
1132
|
}
|
|
636
1133
|
else if (newStartIdx > newEndIdx) {
|
|
1134
|
+
// there are nodes in the `oldCh` array which no longer correspond to nodes
|
|
1135
|
+
// in the new array, so lets remove them (which entails cleaning up the
|
|
1136
|
+
// relevant DOM nodes)
|
|
637
1137
|
removeVnodes(oldCh, oldStartIdx, oldEndIdx);
|
|
638
1138
|
}
|
|
639
1139
|
};
|
|
640
|
-
|
|
1140
|
+
/**
|
|
1141
|
+
* Compare two VNodes to determine if they are the same
|
|
1142
|
+
*
|
|
1143
|
+
* **NB**: This function is an equality _heuristic_ based on the available
|
|
1144
|
+
* information set on the two VNodes and can be misleading under certain
|
|
1145
|
+
* circumstances. In particular, if the two nodes do not have `key` attrs
|
|
1146
|
+
* (available under `$key$` on VNodes) then the function falls back on merely
|
|
1147
|
+
* checking that they have the same tag.
|
|
1148
|
+
*
|
|
1149
|
+
* So, in other words, if `key` attrs are not set on VNodes which may be
|
|
1150
|
+
* changing order within a `children` array or something along those lines then
|
|
1151
|
+
* we could obtain a false negative and then have to do needless re-rendering
|
|
1152
|
+
* (i.e. we'd say two VNodes aren't equal when in fact they should be).
|
|
1153
|
+
*
|
|
1154
|
+
* @param leftVNode the first VNode to check
|
|
1155
|
+
* @param rightVNode the second VNode to check
|
|
1156
|
+
* @returns whether they're equal or not
|
|
1157
|
+
*/
|
|
1158
|
+
const isSameVnode = (leftVNode, rightVNode) => {
|
|
641
1159
|
// compare if two vnode to see if they're "technically" the same
|
|
642
1160
|
// need to have the same element tag, and same key to be the same
|
|
643
|
-
if (
|
|
644
|
-
if (
|
|
645
|
-
return
|
|
1161
|
+
if (leftVNode.$tag$ === rightVNode.$tag$) {
|
|
1162
|
+
if (leftVNode.$tag$ === 'slot') {
|
|
1163
|
+
return leftVNode.$name$ === rightVNode.$name$;
|
|
646
1164
|
}
|
|
647
1165
|
return true;
|
|
648
1166
|
}
|
|
@@ -656,6 +1174,14 @@ const referenceNode = (node) => {
|
|
|
656
1174
|
return (node && node['s-ol']) || node;
|
|
657
1175
|
};
|
|
658
1176
|
const parentReferenceNode = (node) => (node['s-ol'] ? node['s-ol'] : node).parentNode;
|
|
1177
|
+
/**
|
|
1178
|
+
* Handle reconciling an outdated VNode with a new one which corresponds to
|
|
1179
|
+
* it. This function handles flushing updates to the DOM and reconciling the
|
|
1180
|
+
* children of the two nodes (if any).
|
|
1181
|
+
*
|
|
1182
|
+
* @param oldVNode an old VNode whose DOM element and children we want to update
|
|
1183
|
+
* @param newVNode a new VNode representing an updated version of the old one
|
|
1184
|
+
*/
|
|
659
1185
|
const patch = (oldVNode, newVNode) => {
|
|
660
1186
|
const elm = (newVNode.$elm$ = oldVNode.$elm$);
|
|
661
1187
|
const oldChildren = oldVNode.$children$;
|
|
@@ -664,7 +1190,6 @@ const patch = (oldVNode, newVNode) => {
|
|
|
664
1190
|
const text = newVNode.$text$;
|
|
665
1191
|
let defaultHolder;
|
|
666
1192
|
if (text === null) {
|
|
667
|
-
// element node
|
|
668
1193
|
{
|
|
669
1194
|
if (tag === 'slot')
|
|
670
1195
|
;
|
|
@@ -677,6 +1202,7 @@ const patch = (oldVNode, newVNode) => {
|
|
|
677
1202
|
}
|
|
678
1203
|
if (oldChildren !== null && newChildren !== null) {
|
|
679
1204
|
// looks like there's child vnodes for both the old and new vnodes
|
|
1205
|
+
// so we need to call `updateChildren` to reconcile them
|
|
680
1206
|
updateChildren(elm, oldChildren, newVNode, newChildren);
|
|
681
1207
|
}
|
|
682
1208
|
else if (newChildren !== null) {
|
|
@@ -714,7 +1240,7 @@ const updateFallbackSlotVisibility = (elm) => {
|
|
|
714
1240
|
let nodeType;
|
|
715
1241
|
for (i = 0, ilen = childNodes.length; i < ilen; i++) {
|
|
716
1242
|
childNode = childNodes[i];
|
|
717
|
-
if (childNode.nodeType === 1 /* ElementNode */) {
|
|
1243
|
+
if (childNode.nodeType === 1 /* NODE_TYPE.ElementNode */) {
|
|
718
1244
|
if (childNode['s-sr']) {
|
|
719
1245
|
// this is a slot fallback node
|
|
720
1246
|
// get the slot name for this slot reference node
|
|
@@ -726,7 +1252,7 @@ const updateFallbackSlotVisibility = (elm) => {
|
|
|
726
1252
|
nodeType = childNodes[j].nodeType;
|
|
727
1253
|
if (childNodes[j]['s-hn'] !== childNode['s-hn'] || slotNameAttr !== '') {
|
|
728
1254
|
// this sibling node is from a different component OR is a named fallback slot node
|
|
729
|
-
if (nodeType === 1 /* ElementNode */ && slotNameAttr === childNodes[j].getAttribute('slot')) {
|
|
1255
|
+
if (nodeType === 1 /* NODE_TYPE.ElementNode */ && slotNameAttr === childNodes[j].getAttribute('slot')) {
|
|
730
1256
|
childNode.hidden = true;
|
|
731
1257
|
break;
|
|
732
1258
|
}
|
|
@@ -735,8 +1261,8 @@ const updateFallbackSlotVisibility = (elm) => {
|
|
|
735
1261
|
// this is a default fallback slot node
|
|
736
1262
|
// any element or text node (with content)
|
|
737
1263
|
// should hide the default fallback slot node
|
|
738
|
-
if (nodeType === 1 /* ElementNode */ ||
|
|
739
|
-
(nodeType === 3 /* TextNode */ && childNodes[j].textContent.trim() !== '')) {
|
|
1264
|
+
if (nodeType === 1 /* NODE_TYPE.ElementNode */ ||
|
|
1265
|
+
(nodeType === 3 /* NODE_TYPE.TextNode */ && childNodes[j].textContent.trim() !== '')) {
|
|
740
1266
|
childNode.hidden = true;
|
|
741
1267
|
break;
|
|
742
1268
|
}
|
|
@@ -814,13 +1340,13 @@ const relocateSlotContent = (elm) => {
|
|
|
814
1340
|
}
|
|
815
1341
|
}
|
|
816
1342
|
}
|
|
817
|
-
if (childNode.nodeType === 1 /* ElementNode */) {
|
|
1343
|
+
if (childNode.nodeType === 1 /* NODE_TYPE.ElementNode */) {
|
|
818
1344
|
relocateSlotContent(childNode);
|
|
819
1345
|
}
|
|
820
1346
|
}
|
|
821
1347
|
};
|
|
822
1348
|
const isNodeLocatedInSlot = (nodeToRelocate, slotNameAttr) => {
|
|
823
|
-
if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
|
1349
|
+
if (nodeToRelocate.nodeType === 1 /* NODE_TYPE.ElementNode */) {
|
|
824
1350
|
if (nodeToRelocate.getAttribute('slot') === null && slotNameAttr === '') {
|
|
825
1351
|
return true;
|
|
826
1352
|
}
|
|
@@ -840,6 +1366,18 @@ const callNodeRefs = (vNode) => {
|
|
|
840
1366
|
vNode.$children$ && vNode.$children$.map(callNodeRefs);
|
|
841
1367
|
}
|
|
842
1368
|
};
|
|
1369
|
+
/**
|
|
1370
|
+
* The main entry point for Stencil's virtual DOM-based rendering engine
|
|
1371
|
+
*
|
|
1372
|
+
* Given a {@link d.HostRef} container and some virtual DOM nodes, this
|
|
1373
|
+
* function will handle creating a virtual DOM tree with a single root, patching
|
|
1374
|
+
* the current virtual DOM tree onto an old one (if any), dealing with slot
|
|
1375
|
+
* relocation, and reflecting attributes.
|
|
1376
|
+
*
|
|
1377
|
+
* @param hostRef data needed to root and render the virtual DOM tree, such as
|
|
1378
|
+
* the DOM node into which it should be rendered.
|
|
1379
|
+
* @param renderFnResults the virtual DOM nodes to be rendered
|
|
1380
|
+
*/
|
|
843
1381
|
const renderVdom = (hostRef, renderFnResults) => {
|
|
844
1382
|
const hostElm = hostRef.$hostElement$;
|
|
845
1383
|
const cmpMeta = hostRef.$cmpMeta$;
|
|
@@ -851,7 +1389,7 @@ const renderVdom = (hostRef, renderFnResults) => {
|
|
|
851
1389
|
cmpMeta.$attrsToReflect$.map(([propName, attribute]) => (rootVnode.$attrs$[attribute] = hostElm[propName]));
|
|
852
1390
|
}
|
|
853
1391
|
rootVnode.$tag$ = null;
|
|
854
|
-
rootVnode.$flags$ |= 4 /* isHost */;
|
|
1392
|
+
rootVnode.$flags$ |= 4 /* VNODE_FLAGS.isHost */;
|
|
855
1393
|
hostRef.$vnode$ = rootVnode;
|
|
856
1394
|
rootVnode.$elm$ = oldVNode.$elm$ = (hostElm.shadowRoot || hostElm );
|
|
857
1395
|
{
|
|
@@ -859,7 +1397,7 @@ const renderVdom = (hostRef, renderFnResults) => {
|
|
|
859
1397
|
}
|
|
860
1398
|
{
|
|
861
1399
|
contentRef = hostElm['s-cr'];
|
|
862
|
-
useNativeShadowDom = (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) !== 0;
|
|
1400
|
+
useNativeShadowDom = (cmpMeta.$flags$ & 1 /* CMP_FLAGS.shadowDomEncapsulation */) !== 0;
|
|
863
1401
|
// always reset
|
|
864
1402
|
checkSlotFallbackVisibility = false;
|
|
865
1403
|
}
|
|
@@ -868,7 +1406,7 @@ const renderVdom = (hostRef, renderFnResults) => {
|
|
|
868
1406
|
{
|
|
869
1407
|
// while we're moving nodes around existing nodes, temporarily disable
|
|
870
1408
|
// the disconnectCallback from working
|
|
871
|
-
plt.$flags$ |= 1 /* isTmpDisconnected */;
|
|
1409
|
+
plt.$flags$ |= 1 /* PLATFORM_FLAGS.isTmpDisconnected */;
|
|
872
1410
|
if (checkSlotRelocate) {
|
|
873
1411
|
relocateSlotContent(rootVnode.$elm$);
|
|
874
1412
|
let relocateData;
|
|
@@ -926,7 +1464,7 @@ const renderVdom = (hostRef, renderFnResults) => {
|
|
|
926
1464
|
}
|
|
927
1465
|
else {
|
|
928
1466
|
// this node doesn't have a slot home to go to, so let's hide it
|
|
929
|
-
if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
|
1467
|
+
if (nodeToRelocate.nodeType === 1 /* NODE_TYPE.ElementNode */) {
|
|
930
1468
|
nodeToRelocate.hidden = true;
|
|
931
1469
|
}
|
|
932
1470
|
}
|
|
@@ -937,37 +1475,11 @@ const renderVdom = (hostRef, renderFnResults) => {
|
|
|
937
1475
|
}
|
|
938
1476
|
// done moving nodes around
|
|
939
1477
|
// allow the disconnect callback to work again
|
|
940
|
-
plt.$flags$ &= ~1 /* isTmpDisconnected */;
|
|
1478
|
+
plt.$flags$ &= ~1 /* PLATFORM_FLAGS.isTmpDisconnected */;
|
|
941
1479
|
// always reset
|
|
942
1480
|
relocateNodes.length = 0;
|
|
943
1481
|
}
|
|
944
1482
|
};
|
|
945
|
-
const getElement = (ref) => (getHostRef(ref).$hostElement$ );
|
|
946
|
-
const createEvent = (ref, name, flags) => {
|
|
947
|
-
const elm = getElement(ref);
|
|
948
|
-
return {
|
|
949
|
-
emit: (detail) => {
|
|
950
|
-
return emitEvent(elm, name, {
|
|
951
|
-
bubbles: !!(flags & 4 /* Bubbles */),
|
|
952
|
-
composed: !!(flags & 2 /* Composed */),
|
|
953
|
-
cancelable: !!(flags & 1 /* Cancellable */),
|
|
954
|
-
detail,
|
|
955
|
-
});
|
|
956
|
-
},
|
|
957
|
-
};
|
|
958
|
-
};
|
|
959
|
-
/**
|
|
960
|
-
* Helper function to create & dispatch a custom Event on a provided target
|
|
961
|
-
* @param elm the target of the Event
|
|
962
|
-
* @param name the name to give the custom Event
|
|
963
|
-
* @param opts options for configuring a custom Event
|
|
964
|
-
* @returns the custom Event
|
|
965
|
-
*/
|
|
966
|
-
const emitEvent = (elm, name, opts) => {
|
|
967
|
-
const ev = plt.ce(name, opts);
|
|
968
|
-
elm.dispatchEvent(ev);
|
|
969
|
-
return ev;
|
|
970
|
-
};
|
|
971
1483
|
const attachToAncestor = (hostRef, ancestorComponent) => {
|
|
972
1484
|
if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent['s-p']) {
|
|
973
1485
|
ancestorComponent['s-p'].push(new Promise((r) => (hostRef.$onRenderResolve$ = r)));
|
|
@@ -975,10 +1487,10 @@ const attachToAncestor = (hostRef, ancestorComponent) => {
|
|
|
975
1487
|
};
|
|
976
1488
|
const scheduleUpdate = (hostRef, isInitialLoad) => {
|
|
977
1489
|
{
|
|
978
|
-
hostRef.$flags$ |= 16 /* isQueuedForUpdate */;
|
|
1490
|
+
hostRef.$flags$ |= 16 /* HOST_FLAGS.isQueuedForUpdate */;
|
|
979
1491
|
}
|
|
980
|
-
if (hostRef.$flags$ & 4 /* isWaitingForChildren */) {
|
|
981
|
-
hostRef.$flags$ |= 512 /* needsRerender */;
|
|
1492
|
+
if (hostRef.$flags$ & 4 /* HOST_FLAGS.isWaitingForChildren */) {
|
|
1493
|
+
hostRef.$flags$ |= 512 /* HOST_FLAGS.needsRerender */;
|
|
982
1494
|
return;
|
|
983
1495
|
}
|
|
984
1496
|
attachToAncestor(hostRef, hostRef.$ancestorComponent$);
|
|
@@ -994,12 +1506,20 @@ const dispatchHooks = (hostRef, isInitialLoad) => {
|
|
|
994
1506
|
let promise;
|
|
995
1507
|
if (isInitialLoad) {
|
|
996
1508
|
{
|
|
997
|
-
hostRef.$flags$ |= 256 /* isListenReady */;
|
|
1509
|
+
hostRef.$flags$ |= 256 /* HOST_FLAGS.isListenReady */;
|
|
998
1510
|
if (hostRef.$queuedListeners$) {
|
|
999
1511
|
hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event));
|
|
1000
1512
|
hostRef.$queuedListeners$ = null;
|
|
1001
1513
|
}
|
|
1002
1514
|
}
|
|
1515
|
+
{
|
|
1516
|
+
promise = safeCall(instance, 'componentWillLoad');
|
|
1517
|
+
}
|
|
1518
|
+
}
|
|
1519
|
+
else {
|
|
1520
|
+
{
|
|
1521
|
+
promise = safeCall(instance, 'componentWillUpdate');
|
|
1522
|
+
}
|
|
1003
1523
|
}
|
|
1004
1524
|
{
|
|
1005
1525
|
promise = then(promise, () => safeCall(instance, 'componentWillRender'));
|
|
@@ -1037,7 +1557,7 @@ const updateComponent = async (hostRef, instance, isInitialLoad) => {
|
|
|
1037
1557
|
}
|
|
1038
1558
|
else {
|
|
1039
1559
|
Promise.all(childrenPromises).then(postUpdate);
|
|
1040
|
-
hostRef.$flags$ |= 4 /* isWaitingForChildren */;
|
|
1560
|
+
hostRef.$flags$ |= 4 /* HOST_FLAGS.isWaitingForChildren */;
|
|
1041
1561
|
childrenPromises.length = 0;
|
|
1042
1562
|
}
|
|
1043
1563
|
}
|
|
@@ -1046,10 +1566,10 @@ const callRender = (hostRef, instance, elm) => {
|
|
|
1046
1566
|
try {
|
|
1047
1567
|
instance = instance.render() ;
|
|
1048
1568
|
{
|
|
1049
|
-
hostRef.$flags$ &= ~16 /* isQueuedForUpdate */;
|
|
1569
|
+
hostRef.$flags$ &= ~16 /* HOST_FLAGS.isQueuedForUpdate */;
|
|
1050
1570
|
}
|
|
1051
1571
|
{
|
|
1052
|
-
hostRef.$flags$ |= 2 /* hasRendered */;
|
|
1572
|
+
hostRef.$flags$ |= 2 /* HOST_FLAGS.hasRendered */;
|
|
1053
1573
|
}
|
|
1054
1574
|
{
|
|
1055
1575
|
{
|
|
@@ -1071,13 +1591,20 @@ const postUpdateComponent = (hostRef) => {
|
|
|
1071
1591
|
const tagName = hostRef.$cmpMeta$.$tagName$;
|
|
1072
1592
|
const elm = hostRef.$hostElement$;
|
|
1073
1593
|
const endPostUpdate = createTime('postUpdate', tagName);
|
|
1594
|
+
const instance = hostRef.$lazyInstance$ ;
|
|
1074
1595
|
const ancestorComponent = hostRef.$ancestorComponent$;
|
|
1075
|
-
|
|
1076
|
-
|
|
1596
|
+
{
|
|
1597
|
+
safeCall(instance, 'componentDidRender');
|
|
1598
|
+
}
|
|
1599
|
+
if (!(hostRef.$flags$ & 64 /* HOST_FLAGS.hasLoadedComponent */)) {
|
|
1600
|
+
hostRef.$flags$ |= 64 /* HOST_FLAGS.hasLoadedComponent */;
|
|
1077
1601
|
{
|
|
1078
1602
|
// DOM WRITE!
|
|
1079
1603
|
addHydratedFlag(elm);
|
|
1080
1604
|
}
|
|
1605
|
+
{
|
|
1606
|
+
safeCall(instance, 'componentDidLoad');
|
|
1607
|
+
}
|
|
1081
1608
|
endPostUpdate();
|
|
1082
1609
|
{
|
|
1083
1610
|
hostRef.$onReadyResolve$(elm);
|
|
@@ -1087,6 +1614,9 @@ const postUpdateComponent = (hostRef) => {
|
|
|
1087
1614
|
}
|
|
1088
1615
|
}
|
|
1089
1616
|
else {
|
|
1617
|
+
{
|
|
1618
|
+
safeCall(instance, 'componentDidUpdate');
|
|
1619
|
+
}
|
|
1090
1620
|
endPostUpdate();
|
|
1091
1621
|
}
|
|
1092
1622
|
// load events fire from bottom to top
|
|
@@ -1096,10 +1626,10 @@ const postUpdateComponent = (hostRef) => {
|
|
|
1096
1626
|
hostRef.$onRenderResolve$();
|
|
1097
1627
|
hostRef.$onRenderResolve$ = undefined;
|
|
1098
1628
|
}
|
|
1099
|
-
if (hostRef.$flags$ & 512 /* needsRerender */) {
|
|
1629
|
+
if (hostRef.$flags$ & 512 /* HOST_FLAGS.needsRerender */) {
|
|
1100
1630
|
nextTick(() => scheduleUpdate(hostRef, false));
|
|
1101
1631
|
}
|
|
1102
|
-
hostRef.$flags$ &= ~(4 /* isWaitingForChildren */ | 512 /* needsRerender */);
|
|
1632
|
+
hostRef.$flags$ &= ~(4 /* HOST_FLAGS.isWaitingForChildren */ | 512 /* HOST_FLAGS.needsRerender */);
|
|
1103
1633
|
}
|
|
1104
1634
|
// ( •_•)
|
|
1105
1635
|
// ( •_•)>⌐■-■
|
|
@@ -1129,53 +1659,6 @@ const then = (promise, thenFn) => {
|
|
|
1129
1659
|
};
|
|
1130
1660
|
const addHydratedFlag = (elm) => elm.classList.add('hydrated')
|
|
1131
1661
|
;
|
|
1132
|
-
/**
|
|
1133
|
-
* Parse a new property value for a given property type.
|
|
1134
|
-
*
|
|
1135
|
-
* While the prop value can reasonably be expected to be of `any` type as far as TypeScript's type checker is concerned,
|
|
1136
|
-
* it is not safe to assume that the string returned by evaluating `typeof propValue` matches:
|
|
1137
|
-
* 1. `any`, the type given to `propValue` in the function signature
|
|
1138
|
-
* 2. the type stored from `propType`.
|
|
1139
|
-
*
|
|
1140
|
-
* This function provides the capability to parse/coerce a property's value to potentially any other JavaScript type.
|
|
1141
|
-
*
|
|
1142
|
-
* Property values represented in TSX preserve their type information. In the example below, the number 0 is passed to
|
|
1143
|
-
* a component. This `propValue` will preserve its type information (`typeof propValue === 'number'`). Note that is
|
|
1144
|
-
* based on the type of the value being passed in, not the type declared of the class member decorated with `@Prop`.
|
|
1145
|
-
* ```tsx
|
|
1146
|
-
* <my-cmp prop-val={0}></my-cmp>
|
|
1147
|
-
* ```
|
|
1148
|
-
*
|
|
1149
|
-
* HTML prop values on the other hand, will always a string
|
|
1150
|
-
*
|
|
1151
|
-
* @param propValue the new value to coerce to some type
|
|
1152
|
-
* @param propType the type of the prop, expressed as a binary number
|
|
1153
|
-
* @returns the parsed/coerced value
|
|
1154
|
-
*/
|
|
1155
|
-
const parsePropertyValue = (propValue, propType) => {
|
|
1156
|
-
// ensure this value is of the correct prop type
|
|
1157
|
-
if (propValue != null && !isComplexType(propValue)) {
|
|
1158
|
-
if (propType & 4 /* Boolean */) {
|
|
1159
|
-
// per the HTML spec, any string value means it is a boolean true value
|
|
1160
|
-
// but we'll cheat here and say that the string "false" is the boolean false
|
|
1161
|
-
return propValue === 'false' ? false : propValue === '' || !!propValue;
|
|
1162
|
-
}
|
|
1163
|
-
if (propType & 2 /* Number */) {
|
|
1164
|
-
// force it to be a number
|
|
1165
|
-
return parseFloat(propValue);
|
|
1166
|
-
}
|
|
1167
|
-
if (propType & 1 /* String */) {
|
|
1168
|
-
// could have been passed as a number or boolean
|
|
1169
|
-
// but we still want it as a string
|
|
1170
|
-
return String(propValue);
|
|
1171
|
-
}
|
|
1172
|
-
// redundant return here for better minification
|
|
1173
|
-
return propValue;
|
|
1174
|
-
}
|
|
1175
|
-
// not sure exactly what type we want
|
|
1176
|
-
// so no need to change to a different type
|
|
1177
|
-
return propValue;
|
|
1178
|
-
};
|
|
1179
1662
|
const getValue = (ref, propName) => getHostRef(ref).$instanceValues$.get(propName);
|
|
1180
1663
|
const setValue = (ref, propName, newVal, cmpMeta) => {
|
|
1181
1664
|
// check our new property value against our internal value
|
|
@@ -1188,13 +1671,13 @@ const setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
1188
1671
|
// explicitly check for NaN on both sides, as `NaN === NaN` is always false
|
|
1189
1672
|
const areBothNaN = Number.isNaN(oldVal) && Number.isNaN(newVal);
|
|
1190
1673
|
const didValueChange = newVal !== oldVal && !areBothNaN;
|
|
1191
|
-
if ((!(flags & 8 /* isConstructingInstance */) || oldVal === undefined) && didValueChange) {
|
|
1674
|
+
if ((!(flags & 8 /* HOST_FLAGS.isConstructingInstance */) || oldVal === undefined) && didValueChange) {
|
|
1192
1675
|
// gadzooks! the property's value has changed!!
|
|
1193
1676
|
// set our new value!
|
|
1194
1677
|
hostRef.$instanceValues$.set(propName, newVal);
|
|
1195
1678
|
if (instance) {
|
|
1196
1679
|
// get an array of method names of watch functions to call
|
|
1197
|
-
if (cmpMeta.$watchers$ && flags & 128 /* isWatchReady */) {
|
|
1680
|
+
if (cmpMeta.$watchers$ && flags & 128 /* HOST_FLAGS.isWatchReady */) {
|
|
1198
1681
|
const watchMethods = cmpMeta.$watchers$[propName];
|
|
1199
1682
|
if (watchMethods) {
|
|
1200
1683
|
// this instance is watching for when this property changed
|
|
@@ -1209,7 +1692,7 @@ const setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
1209
1692
|
});
|
|
1210
1693
|
}
|
|
1211
1694
|
}
|
|
1212
|
-
if ((flags & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
|
|
1695
|
+
if ((flags & (2 /* HOST_FLAGS.hasRendered */ | 16 /* HOST_FLAGS.isQueuedForUpdate */)) === 2 /* HOST_FLAGS.hasRendered */) {
|
|
1213
1696
|
if (instance.componentShouldUpdate) {
|
|
1214
1697
|
if (instance.componentShouldUpdate(newVal, oldVal, propName) === false) {
|
|
1215
1698
|
return;
|
|
@@ -1224,6 +1707,16 @@ const setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
1224
1707
|
}
|
|
1225
1708
|
}
|
|
1226
1709
|
};
|
|
1710
|
+
/**
|
|
1711
|
+
* Attach a series of runtime constructs to a compiled Stencil component
|
|
1712
|
+
* constructor, including getters and setters for the `@Prop` and `@State`
|
|
1713
|
+
* decorators, callbacks for when attributes change, and so on.
|
|
1714
|
+
*
|
|
1715
|
+
* @param Cstr the constructor for a component that we need to process
|
|
1716
|
+
* @param cmpMeta metadata collected previously about the component
|
|
1717
|
+
* @param flags a number used to store a series of bit flags
|
|
1718
|
+
* @returns a reference to the same constructor passed in (but now mutated)
|
|
1719
|
+
*/
|
|
1227
1720
|
const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
1228
1721
|
if (cmpMeta.$members$) {
|
|
1229
1722
|
if (Cstr.watchers) {
|
|
@@ -1233,8 +1726,8 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1233
1726
|
const members = Object.entries(cmpMeta.$members$);
|
|
1234
1727
|
const prototype = Cstr.prototype;
|
|
1235
1728
|
members.map(([memberName, [memberFlags]]) => {
|
|
1236
|
-
if ((memberFlags & 31 /* Prop */ ||
|
|
1237
|
-
((flags & 2 /* proxyState */) && memberFlags & 32 /* State */))) {
|
|
1729
|
+
if ((memberFlags & 31 /* MEMBER_FLAGS.Prop */ ||
|
|
1730
|
+
((flags & 2 /* PROXY_FLAGS.proxyState */) && memberFlags & 32 /* MEMBER_FLAGS.State */))) {
|
|
1238
1731
|
// proxyComponent - prop
|
|
1239
1732
|
Object.defineProperty(prototype, memberName, {
|
|
1240
1733
|
get() {
|
|
@@ -1250,7 +1743,7 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1250
1743
|
});
|
|
1251
1744
|
}
|
|
1252
1745
|
});
|
|
1253
|
-
if ((flags & 1 /* isElementConstructor */)) {
|
|
1746
|
+
if ((flags & 1 /* PROXY_FLAGS.isElementConstructor */)) {
|
|
1254
1747
|
const attrNameToPropName = new Map();
|
|
1255
1748
|
prototype.attributeChangedCallback = function (attrName, _oldValue, newValue) {
|
|
1256
1749
|
plt.jmp(() => {
|
|
@@ -1306,11 +1799,11 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1306
1799
|
// create an array of attributes to observe
|
|
1307
1800
|
// and also create a map of html attribute name to js property name
|
|
1308
1801
|
Cstr.observedAttributes = members
|
|
1309
|
-
.filter(([_, m]) => m[0] & 15 /* HasAttribute */) // filter to only keep props that should match attributes
|
|
1802
|
+
.filter(([_, m]) => m[0] & 15 /* MEMBER_FLAGS.HasAttribute */) // filter to only keep props that should match attributes
|
|
1310
1803
|
.map(([propName, m]) => {
|
|
1311
1804
|
const attrName = m[1] || propName;
|
|
1312
1805
|
attrNameToPropName.set(attrName, propName);
|
|
1313
|
-
if (m[0] & 512 /* ReflectAttr */) {
|
|
1806
|
+
if (m[0] & 512 /* MEMBER_FLAGS.ReflectAttr */) {
|
|
1314
1807
|
cmpMeta.$attrsToReflect$.push([propName, attrName]);
|
|
1315
1808
|
}
|
|
1316
1809
|
return attrName;
|
|
@@ -1321,10 +1814,10 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1321
1814
|
};
|
|
1322
1815
|
const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) => {
|
|
1323
1816
|
// initializeComponent
|
|
1324
|
-
if ((hostRef.$flags$ & 32 /* hasInitializedComponent */) === 0) {
|
|
1817
|
+
if ((hostRef.$flags$ & 32 /* HOST_FLAGS.hasInitializedComponent */) === 0) {
|
|
1325
1818
|
{
|
|
1326
1819
|
// we haven't initialized this element yet
|
|
1327
|
-
hostRef.$flags$ |= 32 /* hasInitializedComponent */;
|
|
1820
|
+
hostRef.$flags$ |= 32 /* HOST_FLAGS.hasInitializedComponent */;
|
|
1328
1821
|
// lazy loaded components
|
|
1329
1822
|
// request the component's implementation to be
|
|
1330
1823
|
// wired up with the host element
|
|
@@ -1342,7 +1835,7 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
|
|
|
1342
1835
|
{
|
|
1343
1836
|
cmpMeta.$watchers$ = Cstr.watchers;
|
|
1344
1837
|
}
|
|
1345
|
-
proxyComponent(Cstr, cmpMeta, 2 /* proxyState */);
|
|
1838
|
+
proxyComponent(Cstr, cmpMeta, 2 /* PROXY_FLAGS.proxyState */);
|
|
1346
1839
|
Cstr.isProxied = true;
|
|
1347
1840
|
}
|
|
1348
1841
|
const endNewInstance = createTime('createInstance', cmpMeta.$tagName$);
|
|
@@ -1350,7 +1843,7 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
|
|
|
1350
1843
|
// but let's keep track of when we start and stop
|
|
1351
1844
|
// so that the getters/setters don't incorrectly step on data
|
|
1352
1845
|
{
|
|
1353
|
-
hostRef.$flags$ |= 8 /* isConstructingInstance */;
|
|
1846
|
+
hostRef.$flags$ |= 8 /* HOST_FLAGS.isConstructingInstance */;
|
|
1354
1847
|
}
|
|
1355
1848
|
// construct the lazy-loaded component implementation
|
|
1356
1849
|
// passing the hostRef is very important during
|
|
@@ -1363,10 +1856,10 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
|
|
|
1363
1856
|
consoleError(e);
|
|
1364
1857
|
}
|
|
1365
1858
|
{
|
|
1366
|
-
hostRef.$flags$ &= ~8 /* isConstructingInstance */;
|
|
1859
|
+
hostRef.$flags$ &= ~8 /* HOST_FLAGS.isConstructingInstance */;
|
|
1367
1860
|
}
|
|
1368
1861
|
{
|
|
1369
|
-
hostRef.$flags$ |= 128 /* isWatchReady */;
|
|
1862
|
+
hostRef.$flags$ |= 128 /* HOST_FLAGS.isWatchReady */;
|
|
1370
1863
|
}
|
|
1371
1864
|
endNewInstance();
|
|
1372
1865
|
}
|
|
@@ -1376,7 +1869,7 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
|
|
|
1376
1869
|
const scopeId = getScopeId(cmpMeta);
|
|
1377
1870
|
if (!styles.has(scopeId)) {
|
|
1378
1871
|
const endRegisterStyles = createTime('registerStyles', cmpMeta.$tagName$);
|
|
1379
|
-
registerStyle(scopeId, style, !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */));
|
|
1872
|
+
registerStyle(scopeId, style, !!(cmpMeta.$flags$ & 1 /* CMP_FLAGS.shadowDomEncapsulation */));
|
|
1380
1873
|
endRegisterStyles();
|
|
1381
1874
|
}
|
|
1382
1875
|
}
|
|
@@ -1398,19 +1891,31 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
|
|
|
1398
1891
|
}
|
|
1399
1892
|
};
|
|
1400
1893
|
const connectedCallback = (elm) => {
|
|
1401
|
-
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
|
|
1894
|
+
if ((plt.$flags$ & 1 /* PLATFORM_FLAGS.isTmpDisconnected */) === 0) {
|
|
1402
1895
|
const hostRef = getHostRef(elm);
|
|
1403
1896
|
const cmpMeta = hostRef.$cmpMeta$;
|
|
1404
1897
|
const endConnected = createTime('connectedCallback', cmpMeta.$tagName$);
|
|
1405
|
-
if (!(hostRef.$flags$ & 1 /* hasConnected */)) {
|
|
1898
|
+
if (!(hostRef.$flags$ & 1 /* HOST_FLAGS.hasConnected */)) {
|
|
1406
1899
|
// first time this component has connected
|
|
1407
|
-
hostRef.$flags$ |= 1 /* hasConnected */;
|
|
1900
|
+
hostRef.$flags$ |= 1 /* HOST_FLAGS.hasConnected */;
|
|
1901
|
+
let hostId;
|
|
1408
1902
|
{
|
|
1903
|
+
hostId = elm.getAttribute(HYDRATE_ID);
|
|
1904
|
+
if (hostId) {
|
|
1905
|
+
if (cmpMeta.$flags$ & 1 /* CMP_FLAGS.shadowDomEncapsulation */) {
|
|
1906
|
+
const scopeId = addStyle(elm.shadowRoot, cmpMeta);
|
|
1907
|
+
elm.classList.remove(scopeId + '-h', scopeId + '-s');
|
|
1908
|
+
}
|
|
1909
|
+
initializeClientHydrate(elm, cmpMeta.$tagName$, hostId, hostRef);
|
|
1910
|
+
}
|
|
1911
|
+
}
|
|
1912
|
+
if (!hostId) {
|
|
1409
1913
|
// initUpdate
|
|
1410
1914
|
// if the slot polyfill is required we'll need to put some nodes
|
|
1411
1915
|
// in here to act as original content anchors as we move nodes around
|
|
1412
1916
|
// host element has been connected to the DOM
|
|
1413
|
-
if ((
|
|
1917
|
+
if ((// TODO(STENCIL-662): Remove code related to deprecated shadowDomShim field
|
|
1918
|
+
cmpMeta.$flags$ & (4 /* CMP_FLAGS.hasSlotRelocation */ | 8 /* CMP_FLAGS.needsShadowDomShim */))) {
|
|
1414
1919
|
setContentReference(elm);
|
|
1415
1920
|
}
|
|
1416
1921
|
}
|
|
@@ -1421,7 +1926,10 @@ const connectedCallback = (elm) => {
|
|
|
1421
1926
|
while ((ancestorComponent = ancestorComponent.parentNode || ancestorComponent.host)) {
|
|
1422
1927
|
// climb up the ancestors looking for the first
|
|
1423
1928
|
// component that hasn't finished its lifecycle update yet
|
|
1424
|
-
if (ancestorComponent
|
|
1929
|
+
if ((ancestorComponent.nodeType === 1 /* NODE_TYPE.ElementNode */ &&
|
|
1930
|
+
ancestorComponent.hasAttribute('s-id') &&
|
|
1931
|
+
ancestorComponent['s-p']) ||
|
|
1932
|
+
ancestorComponent['s-p']) {
|
|
1425
1933
|
// we found this components first ancestor component
|
|
1426
1934
|
// keep a reference to this component's ancestor component
|
|
1427
1935
|
attachToAncestor(hostRef, (hostRef.$ancestorComponent$ = ancestorComponent));
|
|
@@ -1433,7 +1941,7 @@ const connectedCallback = (elm) => {
|
|
|
1433
1941
|
// https://developers.google.com/web/fundamentals/web-components/best-practices#lazy-properties
|
|
1434
1942
|
if (cmpMeta.$members$) {
|
|
1435
1943
|
Object.entries(cmpMeta.$members$).map(([memberName, [memberFlags]]) => {
|
|
1436
|
-
if (memberFlags & 31 /* Prop */ && elm.hasOwnProperty(memberName)) {
|
|
1944
|
+
if (memberFlags & 31 /* MEMBER_FLAGS.Prop */ && elm.hasOwnProperty(memberName)) {
|
|
1437
1945
|
const value = elm[memberName];
|
|
1438
1946
|
delete elm[memberName];
|
|
1439
1947
|
elm[memberName] = value;
|
|
@@ -1465,17 +1973,22 @@ const setContentReference = (elm) => {
|
|
|
1465
1973
|
elm.insertBefore(contentRefElm, elm.firstChild);
|
|
1466
1974
|
};
|
|
1467
1975
|
const disconnectedCallback = (elm) => {
|
|
1468
|
-
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
|
|
1976
|
+
if ((plt.$flags$ & 1 /* PLATFORM_FLAGS.isTmpDisconnected */) === 0) {
|
|
1469
1977
|
const hostRef = getHostRef(elm);
|
|
1978
|
+
const instance = hostRef.$lazyInstance$ ;
|
|
1470
1979
|
{
|
|
1471
1980
|
if (hostRef.$rmListeners$) {
|
|
1472
1981
|
hostRef.$rmListeners$.map((rmListener) => rmListener());
|
|
1473
1982
|
hostRef.$rmListeners$ = undefined;
|
|
1474
1983
|
}
|
|
1475
1984
|
}
|
|
1985
|
+
{
|
|
1986
|
+
safeCall(instance, 'disconnectedCallback');
|
|
1987
|
+
}
|
|
1476
1988
|
}
|
|
1477
1989
|
};
|
|
1478
1990
|
const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
1991
|
+
var _a;
|
|
1479
1992
|
const endBootstrap = createTime();
|
|
1480
1993
|
const cmpTags = [];
|
|
1481
1994
|
const exclude = options.exclude || [];
|
|
@@ -1484,10 +1997,22 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1484
1997
|
const metaCharset = /*@__PURE__*/ head.querySelector('meta[charset]');
|
|
1485
1998
|
const visibilityStyle = /*@__PURE__*/ doc.createElement('style');
|
|
1486
1999
|
const deferredConnectedCallbacks = [];
|
|
2000
|
+
const styles = /*@__PURE__*/ doc.querySelectorAll(`[${HYDRATED_STYLE_ID}]`);
|
|
1487
2001
|
let appLoadFallback;
|
|
1488
2002
|
let isBootstrapping = true;
|
|
2003
|
+
let i = 0;
|
|
1489
2004
|
Object.assign(plt, options);
|
|
1490
2005
|
plt.$resourcesUrl$ = new URL(options.resourcesUrl || './', doc.baseURI).href;
|
|
2006
|
+
{
|
|
2007
|
+
// If the app is already hydrated there is not point to disable the
|
|
2008
|
+
// async queue. This will improve the first input delay
|
|
2009
|
+
plt.$flags$ |= 2 /* PLATFORM_FLAGS.appLoaded */;
|
|
2010
|
+
}
|
|
2011
|
+
{
|
|
2012
|
+
for (; i < styles.length; i++) {
|
|
2013
|
+
registerStyle(styles[i].getAttribute(HYDRATED_STYLE_ID), convertScopedToShadow(styles[i].innerHTML), true);
|
|
2014
|
+
}
|
|
2015
|
+
}
|
|
1491
2016
|
lazyBundles.map((lazyBundle) => {
|
|
1492
2017
|
lazyBundle[1].map((compactMeta) => {
|
|
1493
2018
|
const cmpMeta = {
|
|
@@ -1516,7 +2041,7 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1516
2041
|
super(self);
|
|
1517
2042
|
self = this;
|
|
1518
2043
|
registerHost(self, cmpMeta);
|
|
1519
|
-
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
|
|
2044
|
+
if (cmpMeta.$flags$ & 1 /* CMP_FLAGS.shadowDomEncapsulation */) {
|
|
1520
2045
|
// this component is using shadow dom
|
|
1521
2046
|
// and this browser supports shadow dom
|
|
1522
2047
|
// add the read-only property "shadowRoot" to the host element
|
|
@@ -1551,13 +2076,18 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1551
2076
|
cmpMeta.$lazyBundleId$ = lazyBundle[0];
|
|
1552
2077
|
if (!exclude.includes(tagName) && !customElements.get(tagName)) {
|
|
1553
2078
|
cmpTags.push(tagName);
|
|
1554
|
-
customElements.define(tagName, proxyComponent(HostElement, cmpMeta, 1 /* isElementConstructor */));
|
|
2079
|
+
customElements.define(tagName, proxyComponent(HostElement, cmpMeta, 1 /* PROXY_FLAGS.isElementConstructor */));
|
|
1555
2080
|
}
|
|
1556
2081
|
});
|
|
1557
2082
|
});
|
|
1558
2083
|
{
|
|
1559
2084
|
visibilityStyle.innerHTML = cmpTags + HYDRATED_CSS;
|
|
1560
2085
|
visibilityStyle.setAttribute('data-styles', '');
|
|
2086
|
+
// Apply CSP nonce to the style tag if it exists
|
|
2087
|
+
const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);
|
|
2088
|
+
if (nonce != null) {
|
|
2089
|
+
visibilityStyle.setAttribute('nonce', nonce);
|
|
2090
|
+
}
|
|
1561
2091
|
head.insertBefore(visibilityStyle, metaCharset ? metaCharset.nextSibling : head.firstChild);
|
|
1562
2092
|
}
|
|
1563
2093
|
// Process deferred connectedCallbacks now all components have been registered
|
|
@@ -1573,7 +2103,52 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1573
2103
|
// Fallback appLoad event
|
|
1574
2104
|
endBootstrap();
|
|
1575
2105
|
};
|
|
1576
|
-
const
|
|
2106
|
+
const addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) => {
|
|
2107
|
+
if (listeners) {
|
|
2108
|
+
listeners.map(([flags, name, method]) => {
|
|
2109
|
+
const target = getHostListenerTarget(elm, flags) ;
|
|
2110
|
+
const handler = hostListenerProxy(hostRef, method);
|
|
2111
|
+
const opts = hostListenerOpts(flags);
|
|
2112
|
+
plt.ael(target, name, handler, opts);
|
|
2113
|
+
(hostRef.$rmListeners$ = hostRef.$rmListeners$ || []).push(() => plt.rel(target, name, handler, opts));
|
|
2114
|
+
});
|
|
2115
|
+
}
|
|
2116
|
+
};
|
|
2117
|
+
const hostListenerProxy = (hostRef, methodName) => (ev) => {
|
|
2118
|
+
try {
|
|
2119
|
+
{
|
|
2120
|
+
if (hostRef.$flags$ & 256 /* HOST_FLAGS.isListenReady */) {
|
|
2121
|
+
// instance is ready, let's call it's member method for this event
|
|
2122
|
+
hostRef.$lazyInstance$[methodName](ev);
|
|
2123
|
+
}
|
|
2124
|
+
else {
|
|
2125
|
+
(hostRef.$queuedListeners$ = hostRef.$queuedListeners$ || []).push([methodName, ev]);
|
|
2126
|
+
}
|
|
2127
|
+
}
|
|
2128
|
+
}
|
|
2129
|
+
catch (e) {
|
|
2130
|
+
consoleError(e);
|
|
2131
|
+
}
|
|
2132
|
+
};
|
|
2133
|
+
const getHostListenerTarget = (elm, flags) => {
|
|
2134
|
+
if (flags & 4 /* LISTENER_FLAGS.TargetDocument */)
|
|
2135
|
+
return doc;
|
|
2136
|
+
if (flags & 8 /* LISTENER_FLAGS.TargetWindow */)
|
|
2137
|
+
return win;
|
|
2138
|
+
if (flags & 16 /* LISTENER_FLAGS.TargetBody */)
|
|
2139
|
+
return doc.body;
|
|
2140
|
+
return elm;
|
|
2141
|
+
};
|
|
2142
|
+
// prettier-ignore
|
|
2143
|
+
const hostListenerOpts = (flags) => (flags & 2 /* LISTENER_FLAGS.Capture */) !== 0;
|
|
2144
|
+
/**
|
|
2145
|
+
* Assigns the given value to the nonce property on the runtime platform object.
|
|
2146
|
+
* During runtime, this value is used to set the nonce attribute on all dynamically created script and style tags.
|
|
2147
|
+
* @param nonce The value to be assigned to the platform nonce property.
|
|
2148
|
+
* @returns void
|
|
2149
|
+
*/
|
|
2150
|
+
const setNonce = (nonce) => (plt.$nonce$ = nonce);
|
|
2151
|
+
const hostRefs = /*@__PURE__*/ new WeakMap();
|
|
1577
2152
|
const getHostRef = (ref) => hostRefs.get(ref);
|
|
1578
2153
|
const registerInstance = (lazyInstance, hostRef) => hostRefs.set((hostRef.$lazyInstance$ = lazyInstance), hostRef);
|
|
1579
2154
|
const registerHost = (elm, cmpMeta) => {
|
|
@@ -1602,7 +2177,180 @@ const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
1602
2177
|
if (module) {
|
|
1603
2178
|
return module[exportName];
|
|
1604
2179
|
}
|
|
1605
|
-
|
|
2180
|
+
|
|
2181
|
+
if (!hmrVersionId || !BUILD.hotModuleReplacement) {
|
|
2182
|
+
const processMod = importedModule => {
|
|
2183
|
+
cmpModules.set(bundleId, importedModule);
|
|
2184
|
+
return importedModule[exportName];
|
|
2185
|
+
}
|
|
2186
|
+
switch(bundleId) {
|
|
2187
|
+
|
|
2188
|
+
case 'p-button_3.cjs':
|
|
2189
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2190
|
+
/* webpackMode: "lazy" */
|
|
2191
|
+
'./p-button_3.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2192
|
+
case 'p-accordion.cjs':
|
|
2193
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2194
|
+
/* webpackMode: "lazy" */
|
|
2195
|
+
'./p-accordion.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2196
|
+
case 'p-attachment.cjs':
|
|
2197
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2198
|
+
/* webpackMode: "lazy" */
|
|
2199
|
+
'./p-attachment.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2200
|
+
case 'p-avatar.cjs':
|
|
2201
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2202
|
+
/* webpackMode: "lazy" */
|
|
2203
|
+
'./p-avatar.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2204
|
+
case 'p-avatar-group.cjs':
|
|
2205
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2206
|
+
/* webpackMode: "lazy" */
|
|
2207
|
+
'./p-avatar-group.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2208
|
+
case 'p-card-body.cjs':
|
|
2209
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2210
|
+
/* webpackMode: "lazy" */
|
|
2211
|
+
'./p-card-body.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2212
|
+
case 'p-card-container.cjs':
|
|
2213
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2214
|
+
/* webpackMode: "lazy" */
|
|
2215
|
+
'./p-card-container.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2216
|
+
case 'p-card-header.cjs':
|
|
2217
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2218
|
+
/* webpackMode: "lazy" */
|
|
2219
|
+
'./p-card-header.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2220
|
+
case 'p-content-slider.cjs':
|
|
2221
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2222
|
+
/* webpackMode: "lazy" */
|
|
2223
|
+
'./p-content-slider.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2224
|
+
case 'p-datepicker.cjs':
|
|
2225
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2226
|
+
/* webpackMode: "lazy" */
|
|
2227
|
+
'./p-datepicker.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2228
|
+
case 'p-drawer.cjs':
|
|
2229
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2230
|
+
/* webpackMode: "lazy" */
|
|
2231
|
+
'./p-drawer.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2232
|
+
case 'p-info-panel.cjs':
|
|
2233
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2234
|
+
/* webpackMode: "lazy" */
|
|
2235
|
+
'./p-info-panel.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2236
|
+
case 'p-layout.cjs':
|
|
2237
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2238
|
+
/* webpackMode: "lazy" */
|
|
2239
|
+
'./p-layout.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2240
|
+
case 'p-modal.cjs':
|
|
2241
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2242
|
+
/* webpackMode: "lazy" */
|
|
2243
|
+
'./p-modal.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2244
|
+
case 'p-navbar.cjs':
|
|
2245
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2246
|
+
/* webpackMode: "lazy" */
|
|
2247
|
+
'./p-navbar.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2248
|
+
case 'p-navigation-item.cjs':
|
|
2249
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2250
|
+
/* webpackMode: "lazy" */
|
|
2251
|
+
'./p-navigation-item.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2252
|
+
case 'p-profile.cjs':
|
|
2253
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2254
|
+
/* webpackMode: "lazy" */
|
|
2255
|
+
'./p-profile.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2256
|
+
case 'p-select.cjs':
|
|
2257
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2258
|
+
/* webpackMode: "lazy" */
|
|
2259
|
+
'./p-select.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2260
|
+
case 'p-status.cjs':
|
|
2261
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2262
|
+
/* webpackMode: "lazy" */
|
|
2263
|
+
'./p-status.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2264
|
+
case 'p-stepper.cjs':
|
|
2265
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2266
|
+
/* webpackMode: "lazy" */
|
|
2267
|
+
'./p-stepper.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2268
|
+
case 'p-tab-group.cjs':
|
|
2269
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2270
|
+
/* webpackMode: "lazy" */
|
|
2271
|
+
'./p-tab-group.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2272
|
+
case 'p-tab-item.cjs':
|
|
2273
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2274
|
+
/* webpackMode: "lazy" */
|
|
2275
|
+
'./p-tab-item.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2276
|
+
case 'p-table.cjs':
|
|
2277
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2278
|
+
/* webpackMode: "lazy" */
|
|
2279
|
+
'./p-table.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2280
|
+
case 'p-table-column.cjs':
|
|
2281
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2282
|
+
/* webpackMode: "lazy" */
|
|
2283
|
+
'./p-table-column.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2284
|
+
case 'p-toast.cjs':
|
|
2285
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2286
|
+
/* webpackMode: "lazy" */
|
|
2287
|
+
'./p-toast.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2288
|
+
case 'p-toast-container.cjs':
|
|
2289
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2290
|
+
/* webpackMode: "lazy" */
|
|
2291
|
+
'./p-toast-container.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2292
|
+
case 'p-calendar.cjs':
|
|
2293
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2294
|
+
/* webpackMode: "lazy" */
|
|
2295
|
+
'./p-calendar.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2296
|
+
case 'p-counter.cjs':
|
|
2297
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2298
|
+
/* webpackMode: "lazy" */
|
|
2299
|
+
'./p-counter.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2300
|
+
case 'p-drawer-body_3.cjs':
|
|
2301
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2302
|
+
/* webpackMode: "lazy" */
|
|
2303
|
+
'./p-drawer-body_3.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2304
|
+
case 'p-illustration_6.cjs':
|
|
2305
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2306
|
+
/* webpackMode: "lazy" */
|
|
2307
|
+
'./p-illustration_6.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2308
|
+
case 'p-modal-body_4.cjs':
|
|
2309
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2310
|
+
/* webpackMode: "lazy" */
|
|
2311
|
+
'./p-modal-body_4.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2312
|
+
case 'p-slider-indicator.cjs':
|
|
2313
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2314
|
+
/* webpackMode: "lazy" */
|
|
2315
|
+
'./p-slider-indicator.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2316
|
+
case 'p-stepper-item_2.cjs':
|
|
2317
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2318
|
+
/* webpackMode: "lazy" */
|
|
2319
|
+
'./p-stepper-item_2.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2320
|
+
case 'p-label_3.cjs':
|
|
2321
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2322
|
+
/* webpackMode: "lazy" */
|
|
2323
|
+
'./p-label_3.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2324
|
+
case 'p-page-size-select_3.cjs':
|
|
2325
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2326
|
+
/* webpackMode: "lazy" */
|
|
2327
|
+
'./p-page-size-select_3.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2328
|
+
case 'p-backdrop.cjs':
|
|
2329
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2330
|
+
/* webpackMode: "lazy" */
|
|
2331
|
+
'./p-backdrop.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2332
|
+
case 'p-dropdown_2.cjs':
|
|
2333
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2334
|
+
/* webpackMode: "lazy" */
|
|
2335
|
+
'./p-dropdown_2.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2336
|
+
case 'p-helper_3.cjs':
|
|
2337
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2338
|
+
/* webpackMode: "lazy" */
|
|
2339
|
+
'./p-helper_3.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2340
|
+
case 'p-divider.cjs':
|
|
2341
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2342
|
+
/* webpackMode: "lazy" */
|
|
2343
|
+
'./p-divider.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2344
|
+
case 'p-dropdown-menu-container.cjs':
|
|
2345
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2346
|
+
/* webpackMode: "lazy" */
|
|
2347
|
+
'./p-dropdown-menu-container.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2348
|
+
case 'p-tooltip.cjs':
|
|
2349
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
2350
|
+
/* webpackMode: "lazy" */
|
|
2351
|
+
'./p-tooltip.cjs.entry.js')); }).then(processMod, consoleError);
|
|
2352
|
+
}
|
|
2353
|
+
}
|
|
1606
2354
|
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
1607
2355
|
/* @vite-ignore */
|
|
1608
2356
|
/* webpackInclude: /\.entry\.js$/ */
|
|
@@ -1615,14 +2363,38 @@ const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
1615
2363
|
return importedModule[exportName];
|
|
1616
2364
|
}, consoleError);
|
|
1617
2365
|
};
|
|
1618
|
-
const styles = new Map();
|
|
2366
|
+
const styles = /*@__PURE__*/ new Map();
|
|
2367
|
+
const win = typeof window !== 'undefined' ? window : {};
|
|
2368
|
+
const doc = win.document || { head: {} };
|
|
2369
|
+
const plt = {
|
|
2370
|
+
$flags$: 0,
|
|
2371
|
+
$resourcesUrl$: '',
|
|
2372
|
+
jmp: (h) => h(),
|
|
2373
|
+
raf: (h) => requestAnimationFrame(h),
|
|
2374
|
+
ael: (el, eventName, listener, opts) => el.addEventListener(eventName, listener, opts),
|
|
2375
|
+
rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),
|
|
2376
|
+
ce: (eventName, opts) => new CustomEvent(eventName, opts),
|
|
2377
|
+
};
|
|
2378
|
+
const supportsShadow =
|
|
2379
|
+
// TODO(STENCIL-662): Remove code related to deprecated shadowDomShim field
|
|
2380
|
+
true;
|
|
2381
|
+
const promiseResolve = (v) => Promise.resolve(v);
|
|
2382
|
+
const supportsConstructableStylesheets = /*@__PURE__*/ (() => {
|
|
2383
|
+
try {
|
|
2384
|
+
new CSSStyleSheet();
|
|
2385
|
+
return typeof new CSSStyleSheet().replaceSync === 'function';
|
|
2386
|
+
}
|
|
2387
|
+
catch (e) { }
|
|
2388
|
+
return false;
|
|
2389
|
+
})()
|
|
2390
|
+
;
|
|
1619
2391
|
const queueDomReads = [];
|
|
1620
2392
|
const queueDomWrites = [];
|
|
1621
2393
|
const queueTask = (queue, write) => (cb) => {
|
|
1622
2394
|
queue.push(cb);
|
|
1623
2395
|
if (!queuePending) {
|
|
1624
2396
|
queuePending = true;
|
|
1625
|
-
if (write && plt.$flags$ & 4 /* queueSync */) {
|
|
2397
|
+
if (write && plt.$flags$ & 4 /* PLATFORM_FLAGS.queueSync */) {
|
|
1626
2398
|
nextTick(flush);
|
|
1627
2399
|
}
|
|
1628
2400
|
else {
|
|
@@ -1666,3 +2438,6 @@ exports.getElement = getElement;
|
|
|
1666
2438
|
exports.h = h;
|
|
1667
2439
|
exports.promiseResolve = promiseResolve;
|
|
1668
2440
|
exports.registerInstance = registerInstance;
|
|
2441
|
+
exports.setNonce = setNonce;
|
|
2442
|
+
|
|
2443
|
+
//# sourceMappingURL=index-19716b9c.js.map
|