@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
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
const NAMESPACE = 'paperless';
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* Virtual DOM patching algorithm based on Snabbdom by
|
|
5
|
+
* Simon Friis Vindum (@paldepind)
|
|
6
|
+
* Licensed under the MIT License
|
|
7
|
+
* https://github.com/snabbdom/snabbdom/blob/master/LICENSE
|
|
8
|
+
*
|
|
9
|
+
* Modified for Stencil's renderer and slot projection
|
|
10
|
+
*/
|
|
3
11
|
let scopeId;
|
|
4
12
|
let contentRef;
|
|
5
13
|
let hostTagName;
|
|
@@ -8,62 +16,6 @@ let checkSlotFallbackVisibility = false;
|
|
|
8
16
|
let checkSlotRelocate = false;
|
|
9
17
|
let isSvgMode = false;
|
|
10
18
|
let queuePending = false;
|
|
11
|
-
const win = typeof window !== 'undefined' ? window : {};
|
|
12
|
-
const doc = win.document || { head: {} };
|
|
13
|
-
const plt = {
|
|
14
|
-
$flags$: 0,
|
|
15
|
-
$resourcesUrl$: '',
|
|
16
|
-
jmp: (h) => h(),
|
|
17
|
-
raf: (h) => requestAnimationFrame(h),
|
|
18
|
-
ael: (el, eventName, listener, opts) => el.addEventListener(eventName, listener, opts),
|
|
19
|
-
rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),
|
|
20
|
-
ce: (eventName, opts) => new CustomEvent(eventName, opts),
|
|
21
|
-
};
|
|
22
|
-
const promiseResolve = (v) => Promise.resolve(v);
|
|
23
|
-
const supportsConstructibleStylesheets = /*@__PURE__*/ (() => {
|
|
24
|
-
try {
|
|
25
|
-
new CSSStyleSheet();
|
|
26
|
-
return typeof new CSSStyleSheet().replace === 'function';
|
|
27
|
-
}
|
|
28
|
-
catch (e) { }
|
|
29
|
-
return false;
|
|
30
|
-
})()
|
|
31
|
-
;
|
|
32
|
-
const addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) => {
|
|
33
|
-
if (listeners) {
|
|
34
|
-
listeners.map(([flags, name, method]) => {
|
|
35
|
-
const target = getHostListenerTarget(elm, flags) ;
|
|
36
|
-
const handler = hostListenerProxy(hostRef, method);
|
|
37
|
-
const opts = hostListenerOpts(flags);
|
|
38
|
-
plt.ael(target, name, handler, opts);
|
|
39
|
-
(hostRef.$rmListeners$ = hostRef.$rmListeners$ || []).push(() => plt.rel(target, name, handler, opts));
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
};
|
|
43
|
-
const hostListenerProxy = (hostRef, methodName) => (ev) => {
|
|
44
|
-
try {
|
|
45
|
-
{
|
|
46
|
-
if (hostRef.$flags$ & 256 /* isListenReady */) {
|
|
47
|
-
// instance is ready, let's call it's member method for this event
|
|
48
|
-
hostRef.$lazyInstance$[methodName](ev);
|
|
49
|
-
}
|
|
50
|
-
else {
|
|
51
|
-
(hostRef.$queuedListeners$ = hostRef.$queuedListeners$ || []).push([methodName, ev]);
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
catch (e) {
|
|
56
|
-
consoleError(e);
|
|
57
|
-
}
|
|
58
|
-
};
|
|
59
|
-
const getHostListenerTarget = (elm, flags) => {
|
|
60
|
-
if (flags & 4 /* TargetDocument */)
|
|
61
|
-
return doc;
|
|
62
|
-
return elm;
|
|
63
|
-
};
|
|
64
|
-
// prettier-ignore
|
|
65
|
-
const hostListenerOpts = (flags) => (flags & 2 /* Capture */) !== 0;
|
|
66
|
-
const HYDRATED_CSS = '{visibility:hidden}.hydrated{visibility:inherit}';
|
|
67
19
|
const createTime = (fnName, tagName = '') => {
|
|
68
20
|
{
|
|
69
21
|
return () => {
|
|
@@ -78,71 +30,14 @@ const uniqueTime = (key, measureText) => {
|
|
|
78
30
|
};
|
|
79
31
|
}
|
|
80
32
|
};
|
|
81
|
-
const
|
|
82
|
-
const
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
style = cssText;
|
|
90
|
-
}
|
|
91
|
-
styles.set(scopeId, style);
|
|
92
|
-
};
|
|
93
|
-
const addStyle = (styleContainerNode, cmpMeta, mode, hostElm) => {
|
|
94
|
-
let scopeId = getScopeId(cmpMeta);
|
|
95
|
-
const style = styles.get(scopeId);
|
|
96
|
-
// if an element is NOT connected then getRootNode() will return the wrong root node
|
|
97
|
-
// so the fallback is to always use the document for the root node in those cases
|
|
98
|
-
styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : doc;
|
|
99
|
-
if (style) {
|
|
100
|
-
if (typeof style === 'string') {
|
|
101
|
-
styleContainerNode = styleContainerNode.head || styleContainerNode;
|
|
102
|
-
let appliedStyles = rootAppliedStyles.get(styleContainerNode);
|
|
103
|
-
let styleElm;
|
|
104
|
-
if (!appliedStyles) {
|
|
105
|
-
rootAppliedStyles.set(styleContainerNode, (appliedStyles = new Set()));
|
|
106
|
-
}
|
|
107
|
-
if (!appliedStyles.has(scopeId)) {
|
|
108
|
-
{
|
|
109
|
-
{
|
|
110
|
-
styleElm = doc.createElement('style');
|
|
111
|
-
styleElm.innerHTML = style;
|
|
112
|
-
}
|
|
113
|
-
styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector('link'));
|
|
114
|
-
}
|
|
115
|
-
if (appliedStyles) {
|
|
116
|
-
appliedStyles.add(scopeId);
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
else if (!styleContainerNode.adoptedStyleSheets.includes(style)) {
|
|
121
|
-
styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
return scopeId;
|
|
125
|
-
};
|
|
126
|
-
const attachStyles = (hostRef) => {
|
|
127
|
-
const cmpMeta = hostRef.$cmpMeta$;
|
|
128
|
-
const elm = hostRef.$hostElement$;
|
|
129
|
-
const flags = cmpMeta.$flags$;
|
|
130
|
-
const endAttachStyles = createTime('attachStyles', cmpMeta.$tagName$);
|
|
131
|
-
const scopeId = addStyle(elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(), cmpMeta);
|
|
132
|
-
if (flags & 10 /* needsScopedEncapsulation */) {
|
|
133
|
-
// only required when we're NOT using native shadow dom (slot)
|
|
134
|
-
// or this browser doesn't support native shadow dom
|
|
135
|
-
// and this host element was NOT created with SSR
|
|
136
|
-
// let's pick out the inner content for slot projection
|
|
137
|
-
// create a node to represent where the original
|
|
138
|
-
// content was first placed, which is useful later on
|
|
139
|
-
// DOM WRITE!!
|
|
140
|
-
elm['s-sc'] = scopeId;
|
|
141
|
-
elm.classList.add(scopeId + '-h');
|
|
142
|
-
}
|
|
143
|
-
endAttachStyles();
|
|
144
|
-
};
|
|
145
|
-
const getScopeId = (cmp, mode) => 'sc-' + (cmp.$tagName$);
|
|
33
|
+
const CONTENT_REF_ID = 'r';
|
|
34
|
+
const ORG_LOCATION_ID = 'o';
|
|
35
|
+
const SLOT_NODE_ID = 's';
|
|
36
|
+
const TEXT_NODE_ID = 't';
|
|
37
|
+
const HYDRATE_ID = 's-id';
|
|
38
|
+
const HYDRATED_STYLE_ID = 'sty-id';
|
|
39
|
+
const HYDRATE_CHILD_ID = 'c-id';
|
|
40
|
+
const HYDRATED_CSS = '{visibility:hidden}.hydrated{visibility:inherit}';
|
|
146
41
|
/**
|
|
147
42
|
* Default style mode id
|
|
148
43
|
*/
|
|
@@ -157,6 +52,18 @@ const isComplexType = (o) => {
|
|
|
157
52
|
o = typeof o;
|
|
158
53
|
return o === 'object' || o === 'function';
|
|
159
54
|
};
|
|
55
|
+
/**
|
|
56
|
+
* Helper method for querying a `meta` tag that contains a nonce value
|
|
57
|
+
* out of a DOM's head.
|
|
58
|
+
*
|
|
59
|
+
* @param doc The DOM containing the `head` to query against
|
|
60
|
+
* @returns The content of the meta tag representing the nonce value, or `undefined` if no tag
|
|
61
|
+
* exists or the tag has no content.
|
|
62
|
+
*/
|
|
63
|
+
function queryNonceMetaTagContent(doc) {
|
|
64
|
+
var _a, _b, _c;
|
|
65
|
+
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;
|
|
66
|
+
}
|
|
160
67
|
/**
|
|
161
68
|
* Production h() function based on Preact by
|
|
162
69
|
* Jason Miller (@developit)
|
|
@@ -165,7 +72,6 @@ const isComplexType = (o) => {
|
|
|
165
72
|
*
|
|
166
73
|
* Modified for Stencil's compiler and vdom
|
|
167
74
|
*/
|
|
168
|
-
// const stack: any[] = [];
|
|
169
75
|
// export function h(nodeName: string | d.FunctionalComponent, vnodeData: d.PropsType, child?: d.ChildType): d.VNode;
|
|
170
76
|
// export function h(nodeName: string | d.FunctionalComponent, vnodeData: d.PropsType, ...children: d.ChildType[]): d.VNode;
|
|
171
77
|
const h = (nodeName, vnodeData, ...children) => {
|
|
@@ -227,6 +133,14 @@ const h = (nodeName, vnodeData, ...children) => {
|
|
|
227
133
|
}
|
|
228
134
|
return vnode;
|
|
229
135
|
};
|
|
136
|
+
/**
|
|
137
|
+
* A utility function for creating a virtual DOM node from a tag and some
|
|
138
|
+
* possible text content.
|
|
139
|
+
*
|
|
140
|
+
* @param tag the tag for this element
|
|
141
|
+
* @param text possible text content for the node
|
|
142
|
+
* @returns a newly-minted virtual DOM node
|
|
143
|
+
*/
|
|
230
144
|
const newVNode = (tag, text) => {
|
|
231
145
|
const vnode = {
|
|
232
146
|
$flags$: 0,
|
|
@@ -244,11 +158,31 @@ const newVNode = (tag, text) => {
|
|
|
244
158
|
return vnode;
|
|
245
159
|
};
|
|
246
160
|
const Host = {};
|
|
161
|
+
/**
|
|
162
|
+
* Check whether a given node is a Host node or not
|
|
163
|
+
*
|
|
164
|
+
* @param node the virtual DOM node to check
|
|
165
|
+
* @returns whether it's a Host node or not
|
|
166
|
+
*/
|
|
247
167
|
const isHost = (node) => node && node.$tag$ === Host;
|
|
168
|
+
/**
|
|
169
|
+
* Implementation of {@link d.FunctionalUtilities} for Stencil's VDom.
|
|
170
|
+
*
|
|
171
|
+
* Note that these functions convert from {@link d.VNode} to
|
|
172
|
+
* {@link d.ChildNode} to give functional component developers a friendly
|
|
173
|
+
* interface.
|
|
174
|
+
*/
|
|
248
175
|
const vdomFnUtils = {
|
|
249
176
|
forEach: (children, cb) => children.map(convertToPublic).forEach(cb),
|
|
250
177
|
map: (children, cb) => children.map(convertToPublic).map(cb).map(convertToPrivate),
|
|
251
178
|
};
|
|
179
|
+
/**
|
|
180
|
+
* Convert a {@link d.VNode} to a {@link d.ChildNode} in order to present a
|
|
181
|
+
* friendlier public interface (hence, 'convertToPublic').
|
|
182
|
+
*
|
|
183
|
+
* @param node the virtual DOM node to convert
|
|
184
|
+
* @returns a converted child node
|
|
185
|
+
*/
|
|
252
186
|
const convertToPublic = (node) => ({
|
|
253
187
|
vattrs: node.$attrs$,
|
|
254
188
|
vchildren: node.$children$,
|
|
@@ -257,6 +191,15 @@ const convertToPublic = (node) => ({
|
|
|
257
191
|
vtag: node.$tag$,
|
|
258
192
|
vtext: node.$text$,
|
|
259
193
|
});
|
|
194
|
+
/**
|
|
195
|
+
* Convert a {@link d.ChildNode} back to an equivalent {@link d.VNode} in
|
|
196
|
+
* order to use the resulting object in the virtual DOM. The initial object was
|
|
197
|
+
* likely created as part of presenting a public API, so converting it back
|
|
198
|
+
* involved making it 'private' again (hence, `convertToPrivate`).
|
|
199
|
+
*
|
|
200
|
+
* @param node the child node to convert
|
|
201
|
+
* @returns a converted virtual DOM node
|
|
202
|
+
*/
|
|
260
203
|
const convertToPrivate = (node) => {
|
|
261
204
|
if (typeof node.vtag === 'function') {
|
|
262
205
|
const vnodeData = Object.assign({}, node.vattrs);
|
|
@@ -275,6 +218,368 @@ const convertToPrivate = (node) => {
|
|
|
275
218
|
vnode.$name$ = node.vname;
|
|
276
219
|
return vnode;
|
|
277
220
|
};
|
|
221
|
+
const initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
|
|
222
|
+
const endHydrate = createTime('hydrateClient', tagName);
|
|
223
|
+
const shadowRoot = hostElm.shadowRoot;
|
|
224
|
+
const childRenderNodes = [];
|
|
225
|
+
const slotNodes = [];
|
|
226
|
+
const shadowRootNodes = shadowRoot ? [] : null;
|
|
227
|
+
const vnode = (hostRef.$vnode$ = newVNode(tagName, null));
|
|
228
|
+
if (!plt.$orgLocNodes$) {
|
|
229
|
+
initializeDocumentHydrate(doc.body, (plt.$orgLocNodes$ = new Map()));
|
|
230
|
+
}
|
|
231
|
+
hostElm[HYDRATE_ID] = hostId;
|
|
232
|
+
hostElm.removeAttribute(HYDRATE_ID);
|
|
233
|
+
clientHydrate(vnode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, hostElm, hostId);
|
|
234
|
+
childRenderNodes.map((c) => {
|
|
235
|
+
const orgLocationId = c.$hostId$ + '.' + c.$nodeId$;
|
|
236
|
+
const orgLocationNode = plt.$orgLocNodes$.get(orgLocationId);
|
|
237
|
+
const node = c.$elm$;
|
|
238
|
+
if (orgLocationNode && supportsShadow && orgLocationNode['s-en'] === '') {
|
|
239
|
+
orgLocationNode.parentNode.insertBefore(node, orgLocationNode.nextSibling);
|
|
240
|
+
}
|
|
241
|
+
if (!shadowRoot) {
|
|
242
|
+
node['s-hn'] = tagName;
|
|
243
|
+
if (orgLocationNode) {
|
|
244
|
+
node['s-ol'] = orgLocationNode;
|
|
245
|
+
node['s-ol']['s-nr'] = node;
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
plt.$orgLocNodes$.delete(orgLocationId);
|
|
249
|
+
});
|
|
250
|
+
if (shadowRoot) {
|
|
251
|
+
shadowRootNodes.map((shadowRootNode) => {
|
|
252
|
+
if (shadowRootNode) {
|
|
253
|
+
shadowRoot.appendChild(shadowRootNode);
|
|
254
|
+
}
|
|
255
|
+
});
|
|
256
|
+
}
|
|
257
|
+
endHydrate();
|
|
258
|
+
};
|
|
259
|
+
const clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, node, hostId) => {
|
|
260
|
+
let childNodeType;
|
|
261
|
+
let childIdSplt;
|
|
262
|
+
let childVNode;
|
|
263
|
+
let i;
|
|
264
|
+
if (node.nodeType === 1 /* NODE_TYPE.ElementNode */) {
|
|
265
|
+
childNodeType = node.getAttribute(HYDRATE_CHILD_ID);
|
|
266
|
+
if (childNodeType) {
|
|
267
|
+
// got the node data from the element's attribute
|
|
268
|
+
// `${hostId}.${nodeId}.${depth}.${index}`
|
|
269
|
+
childIdSplt = childNodeType.split('.');
|
|
270
|
+
if (childIdSplt[0] === hostId || childIdSplt[0] === '0') {
|
|
271
|
+
childVNode = {
|
|
272
|
+
$flags$: 0,
|
|
273
|
+
$hostId$: childIdSplt[0],
|
|
274
|
+
$nodeId$: childIdSplt[1],
|
|
275
|
+
$depth$: childIdSplt[2],
|
|
276
|
+
$index$: childIdSplt[3],
|
|
277
|
+
$tag$: node.tagName.toLowerCase(),
|
|
278
|
+
$elm$: node,
|
|
279
|
+
$attrs$: null,
|
|
280
|
+
$children$: null,
|
|
281
|
+
$key$: null,
|
|
282
|
+
$name$: null,
|
|
283
|
+
$text$: null,
|
|
284
|
+
};
|
|
285
|
+
childRenderNodes.push(childVNode);
|
|
286
|
+
node.removeAttribute(HYDRATE_CHILD_ID);
|
|
287
|
+
// this is a new child vnode
|
|
288
|
+
// so ensure its parent vnode has the vchildren array
|
|
289
|
+
if (!parentVNode.$children$) {
|
|
290
|
+
parentVNode.$children$ = [];
|
|
291
|
+
}
|
|
292
|
+
// add our child vnode to a specific index of the vnode's children
|
|
293
|
+
parentVNode.$children$[childVNode.$index$] = childVNode;
|
|
294
|
+
// this is now the new parent vnode for all the next child checks
|
|
295
|
+
parentVNode = childVNode;
|
|
296
|
+
if (shadowRootNodes && childVNode.$depth$ === '0') {
|
|
297
|
+
shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
// recursively drill down, end to start so we can remove nodes
|
|
302
|
+
for (i = node.childNodes.length - 1; i >= 0; i--) {
|
|
303
|
+
clientHydrate(parentVNode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, node.childNodes[i], hostId);
|
|
304
|
+
}
|
|
305
|
+
if (node.shadowRoot) {
|
|
306
|
+
// keep drilling down through the shadow root nodes
|
|
307
|
+
for (i = node.shadowRoot.childNodes.length - 1; i >= 0; i--) {
|
|
308
|
+
clientHydrate(parentVNode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, node.shadowRoot.childNodes[i], hostId);
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
else if (node.nodeType === 8 /* NODE_TYPE.CommentNode */) {
|
|
313
|
+
// `${COMMENT_TYPE}.${hostId}.${nodeId}.${depth}.${index}`
|
|
314
|
+
childIdSplt = node.nodeValue.split('.');
|
|
315
|
+
if (childIdSplt[1] === hostId || childIdSplt[1] === '0') {
|
|
316
|
+
// comment node for either the host id or a 0 host id
|
|
317
|
+
childNodeType = childIdSplt[0];
|
|
318
|
+
childVNode = {
|
|
319
|
+
$flags$: 0,
|
|
320
|
+
$hostId$: childIdSplt[1],
|
|
321
|
+
$nodeId$: childIdSplt[2],
|
|
322
|
+
$depth$: childIdSplt[3],
|
|
323
|
+
$index$: childIdSplt[4],
|
|
324
|
+
$elm$: node,
|
|
325
|
+
$attrs$: null,
|
|
326
|
+
$children$: null,
|
|
327
|
+
$key$: null,
|
|
328
|
+
$name$: null,
|
|
329
|
+
$tag$: null,
|
|
330
|
+
$text$: null,
|
|
331
|
+
};
|
|
332
|
+
if (childNodeType === TEXT_NODE_ID) {
|
|
333
|
+
childVNode.$elm$ = node.nextSibling;
|
|
334
|
+
if (childVNode.$elm$ && childVNode.$elm$.nodeType === 3 /* NODE_TYPE.TextNode */) {
|
|
335
|
+
childVNode.$text$ = childVNode.$elm$.textContent;
|
|
336
|
+
childRenderNodes.push(childVNode);
|
|
337
|
+
// remove the text comment since it's no longer needed
|
|
338
|
+
node.remove();
|
|
339
|
+
if (!parentVNode.$children$) {
|
|
340
|
+
parentVNode.$children$ = [];
|
|
341
|
+
}
|
|
342
|
+
parentVNode.$children$[childVNode.$index$] = childVNode;
|
|
343
|
+
if (shadowRootNodes && childVNode.$depth$ === '0') {
|
|
344
|
+
shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
else if (childVNode.$hostId$ === hostId) {
|
|
349
|
+
// this comment node is specifcally for this host id
|
|
350
|
+
if (childNodeType === SLOT_NODE_ID) {
|
|
351
|
+
// `${SLOT_NODE_ID}.${hostId}.${nodeId}.${depth}.${index}.${slotName}`;
|
|
352
|
+
childVNode.$tag$ = 'slot';
|
|
353
|
+
if (childIdSplt[5]) {
|
|
354
|
+
node['s-sn'] = childVNode.$name$ = childIdSplt[5];
|
|
355
|
+
}
|
|
356
|
+
else {
|
|
357
|
+
node['s-sn'] = '';
|
|
358
|
+
}
|
|
359
|
+
node['s-sr'] = true;
|
|
360
|
+
if (shadowRootNodes) {
|
|
361
|
+
// browser support shadowRoot and this is a shadow dom component
|
|
362
|
+
// create an actual slot element
|
|
363
|
+
childVNode.$elm$ = doc.createElement(childVNode.$tag$);
|
|
364
|
+
if (childVNode.$name$) {
|
|
365
|
+
// add the slot name attribute
|
|
366
|
+
childVNode.$elm$.setAttribute('name', childVNode.$name$);
|
|
367
|
+
}
|
|
368
|
+
// insert the new slot element before the slot comment
|
|
369
|
+
node.parentNode.insertBefore(childVNode.$elm$, node);
|
|
370
|
+
// remove the slot comment since it's not needed for shadow
|
|
371
|
+
node.remove();
|
|
372
|
+
if (childVNode.$depth$ === '0') {
|
|
373
|
+
shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
slotNodes.push(childVNode);
|
|
377
|
+
if (!parentVNode.$children$) {
|
|
378
|
+
parentVNode.$children$ = [];
|
|
379
|
+
}
|
|
380
|
+
parentVNode.$children$[childVNode.$index$] = childVNode;
|
|
381
|
+
}
|
|
382
|
+
else if (childNodeType === CONTENT_REF_ID) {
|
|
383
|
+
// `${CONTENT_REF_ID}.${hostId}`;
|
|
384
|
+
if (shadowRootNodes) {
|
|
385
|
+
// remove the content ref comment since it's not needed for shadow
|
|
386
|
+
node.remove();
|
|
387
|
+
}
|
|
388
|
+
else {
|
|
389
|
+
hostElm['s-cr'] = node;
|
|
390
|
+
node['s-cn'] = true;
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
else if (parentVNode && parentVNode.$tag$ === 'style') {
|
|
397
|
+
const vnode = newVNode(null, node.textContent);
|
|
398
|
+
vnode.$elm$ = node;
|
|
399
|
+
vnode.$index$ = '0';
|
|
400
|
+
parentVNode.$children$ = [vnode];
|
|
401
|
+
}
|
|
402
|
+
};
|
|
403
|
+
const initializeDocumentHydrate = (node, orgLocNodes) => {
|
|
404
|
+
if (node.nodeType === 1 /* NODE_TYPE.ElementNode */) {
|
|
405
|
+
let i = 0;
|
|
406
|
+
for (; i < node.childNodes.length; i++) {
|
|
407
|
+
initializeDocumentHydrate(node.childNodes[i], orgLocNodes);
|
|
408
|
+
}
|
|
409
|
+
if (node.shadowRoot) {
|
|
410
|
+
for (i = 0; i < node.shadowRoot.childNodes.length; i++) {
|
|
411
|
+
initializeDocumentHydrate(node.shadowRoot.childNodes[i], orgLocNodes);
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
else if (node.nodeType === 8 /* NODE_TYPE.CommentNode */) {
|
|
416
|
+
const childIdSplt = node.nodeValue.split('.');
|
|
417
|
+
if (childIdSplt[0] === ORG_LOCATION_ID) {
|
|
418
|
+
orgLocNodes.set(childIdSplt[1] + '.' + childIdSplt[2], node);
|
|
419
|
+
node.nodeValue = '';
|
|
420
|
+
// useful to know if the original location is
|
|
421
|
+
// the root light-dom of a shadow dom component
|
|
422
|
+
node['s-en'] = childIdSplt[3];
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
};
|
|
426
|
+
/**
|
|
427
|
+
* Parse a new property value for a given property type.
|
|
428
|
+
*
|
|
429
|
+
* While the prop value can reasonably be expected to be of `any` type as far as TypeScript's type checker is concerned,
|
|
430
|
+
* it is not safe to assume that the string returned by evaluating `typeof propValue` matches:
|
|
431
|
+
* 1. `any`, the type given to `propValue` in the function signature
|
|
432
|
+
* 2. the type stored from `propType`.
|
|
433
|
+
*
|
|
434
|
+
* This function provides the capability to parse/coerce a property's value to potentially any other JavaScript type.
|
|
435
|
+
*
|
|
436
|
+
* Property values represented in TSX preserve their type information. In the example below, the number 0 is passed to
|
|
437
|
+
* a component. This `propValue` will preserve its type information (`typeof propValue === 'number'`). Note that is
|
|
438
|
+
* based on the type of the value being passed in, not the type declared of the class member decorated with `@Prop`.
|
|
439
|
+
* ```tsx
|
|
440
|
+
* <my-cmp prop-val={0}></my-cmp>
|
|
441
|
+
* ```
|
|
442
|
+
*
|
|
443
|
+
* HTML prop values on the other hand, will always a string
|
|
444
|
+
*
|
|
445
|
+
* @param propValue the new value to coerce to some type
|
|
446
|
+
* @param propType the type of the prop, expressed as a binary number
|
|
447
|
+
* @returns the parsed/coerced value
|
|
448
|
+
*/
|
|
449
|
+
const parsePropertyValue = (propValue, propType) => {
|
|
450
|
+
// ensure this value is of the correct prop type
|
|
451
|
+
if (propValue != null && !isComplexType(propValue)) {
|
|
452
|
+
if (propType & 4 /* MEMBER_FLAGS.Boolean */) {
|
|
453
|
+
// per the HTML spec, any string value means it is a boolean true value
|
|
454
|
+
// but we'll cheat here and say that the string "false" is the boolean false
|
|
455
|
+
return propValue === 'false' ? false : propValue === '' || !!propValue;
|
|
456
|
+
}
|
|
457
|
+
if (propType & 2 /* MEMBER_FLAGS.Number */) {
|
|
458
|
+
// force it to be a number
|
|
459
|
+
return parseFloat(propValue);
|
|
460
|
+
}
|
|
461
|
+
if (propType & 1 /* MEMBER_FLAGS.String */) {
|
|
462
|
+
// could have been passed as a number or boolean
|
|
463
|
+
// but we still want it as a string
|
|
464
|
+
return String(propValue);
|
|
465
|
+
}
|
|
466
|
+
// redundant return here for better minification
|
|
467
|
+
return propValue;
|
|
468
|
+
}
|
|
469
|
+
// not sure exactly what type we want
|
|
470
|
+
// so no need to change to a different type
|
|
471
|
+
return propValue;
|
|
472
|
+
};
|
|
473
|
+
const getElement = (ref) => (getHostRef(ref).$hostElement$ );
|
|
474
|
+
const createEvent = (ref, name, flags) => {
|
|
475
|
+
const elm = getElement(ref);
|
|
476
|
+
return {
|
|
477
|
+
emit: (detail) => {
|
|
478
|
+
return emitEvent(elm, name, {
|
|
479
|
+
bubbles: !!(flags & 4 /* EVENT_FLAGS.Bubbles */),
|
|
480
|
+
composed: !!(flags & 2 /* EVENT_FLAGS.Composed */),
|
|
481
|
+
cancelable: !!(flags & 1 /* EVENT_FLAGS.Cancellable */),
|
|
482
|
+
detail,
|
|
483
|
+
});
|
|
484
|
+
},
|
|
485
|
+
};
|
|
486
|
+
};
|
|
487
|
+
/**
|
|
488
|
+
* Helper function to create & dispatch a custom Event on a provided target
|
|
489
|
+
* @param elm the target of the Event
|
|
490
|
+
* @param name the name to give the custom Event
|
|
491
|
+
* @param opts options for configuring a custom Event
|
|
492
|
+
* @returns the custom Event
|
|
493
|
+
*/
|
|
494
|
+
const emitEvent = (elm, name, opts) => {
|
|
495
|
+
const ev = plt.ce(name, opts);
|
|
496
|
+
elm.dispatchEvent(ev);
|
|
497
|
+
return ev;
|
|
498
|
+
};
|
|
499
|
+
const rootAppliedStyles = /*@__PURE__*/ new WeakMap();
|
|
500
|
+
const registerStyle = (scopeId, cssText, allowCS) => {
|
|
501
|
+
let style = styles.get(scopeId);
|
|
502
|
+
if (supportsConstructableStylesheets && allowCS) {
|
|
503
|
+
style = (style || new CSSStyleSheet());
|
|
504
|
+
if (typeof style === 'string') {
|
|
505
|
+
style = cssText;
|
|
506
|
+
}
|
|
507
|
+
else {
|
|
508
|
+
style.replaceSync(cssText);
|
|
509
|
+
}
|
|
510
|
+
}
|
|
511
|
+
else {
|
|
512
|
+
style = cssText;
|
|
513
|
+
}
|
|
514
|
+
styles.set(scopeId, style);
|
|
515
|
+
};
|
|
516
|
+
const addStyle = (styleContainerNode, cmpMeta, mode, hostElm) => {
|
|
517
|
+
var _a;
|
|
518
|
+
let scopeId = getScopeId(cmpMeta);
|
|
519
|
+
const style = styles.get(scopeId);
|
|
520
|
+
// if an element is NOT connected then getRootNode() will return the wrong root node
|
|
521
|
+
// so the fallback is to always use the document for the root node in those cases
|
|
522
|
+
styleContainerNode = styleContainerNode.nodeType === 11 /* NODE_TYPE.DocumentFragment */ ? styleContainerNode : doc;
|
|
523
|
+
if (style) {
|
|
524
|
+
if (typeof style === 'string') {
|
|
525
|
+
styleContainerNode = styleContainerNode.head || styleContainerNode;
|
|
526
|
+
let appliedStyles = rootAppliedStyles.get(styleContainerNode);
|
|
527
|
+
let styleElm;
|
|
528
|
+
if (!appliedStyles) {
|
|
529
|
+
rootAppliedStyles.set(styleContainerNode, (appliedStyles = new Set()));
|
|
530
|
+
}
|
|
531
|
+
if (!appliedStyles.has(scopeId)) {
|
|
532
|
+
if (styleContainerNode.host &&
|
|
533
|
+
(styleElm = styleContainerNode.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId}"]`))) {
|
|
534
|
+
// This is only happening on native shadow-dom, do not needs CSS var shim
|
|
535
|
+
styleElm.innerHTML = style;
|
|
536
|
+
}
|
|
537
|
+
else {
|
|
538
|
+
// TODO(STENCIL-659): Remove code implementing the CSS variable shim
|
|
539
|
+
{
|
|
540
|
+
styleElm = doc.createElement('style');
|
|
541
|
+
styleElm.innerHTML = style;
|
|
542
|
+
}
|
|
543
|
+
// Apply CSP nonce to the style tag if it exists
|
|
544
|
+
const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);
|
|
545
|
+
if (nonce != null) {
|
|
546
|
+
styleElm.setAttribute('nonce', nonce);
|
|
547
|
+
}
|
|
548
|
+
styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector('link'));
|
|
549
|
+
}
|
|
550
|
+
if (appliedStyles) {
|
|
551
|
+
appliedStyles.add(scopeId);
|
|
552
|
+
}
|
|
553
|
+
}
|
|
554
|
+
}
|
|
555
|
+
else if (!styleContainerNode.adoptedStyleSheets.includes(style)) {
|
|
556
|
+
styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
|
|
557
|
+
}
|
|
558
|
+
}
|
|
559
|
+
return scopeId;
|
|
560
|
+
};
|
|
561
|
+
const attachStyles = (hostRef) => {
|
|
562
|
+
const cmpMeta = hostRef.$cmpMeta$;
|
|
563
|
+
const elm = hostRef.$hostElement$;
|
|
564
|
+
const flags = cmpMeta.$flags$;
|
|
565
|
+
const endAttachStyles = createTime('attachStyles', cmpMeta.$tagName$);
|
|
566
|
+
const scopeId = addStyle(elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(), cmpMeta);
|
|
567
|
+
// TODO(STENCIL-662): Remove code related to deprecated shadowDomShim field
|
|
568
|
+
if (flags & 10 /* CMP_FLAGS.needsScopedEncapsulation */) {
|
|
569
|
+
// only required when we're NOT using native shadow dom (slot)
|
|
570
|
+
// or this browser doesn't support native shadow dom
|
|
571
|
+
// and this host element was NOT created with SSR
|
|
572
|
+
// let's pick out the inner content for slot projection
|
|
573
|
+
// create a node to represent where the original
|
|
574
|
+
// content was first placed, which is useful later on
|
|
575
|
+
// DOM WRITE!!
|
|
576
|
+
elm['s-sc'] = scopeId;
|
|
577
|
+
elm.classList.add(scopeId + '-h');
|
|
578
|
+
}
|
|
579
|
+
endAttachStyles();
|
|
580
|
+
};
|
|
581
|
+
const getScopeId = (cmp, mode) => 'sc-' + (cmp.$tagName$);
|
|
582
|
+
const convertScopedToShadow = (css) => css.replace(/\/\*!@([^\/]+)\*\/[^\{]+\{/g, '$1{');
|
|
278
583
|
/**
|
|
279
584
|
* Production setAccessor() function based on Preact by
|
|
280
585
|
* Jason Miller (@developit)
|
|
@@ -294,6 +599,31 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
294
599
|
classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
|
|
295
600
|
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
296
601
|
}
|
|
602
|
+
else if (memberName === 'style') {
|
|
603
|
+
// update style attribute, css properties and values
|
|
604
|
+
{
|
|
605
|
+
for (const prop in oldValue) {
|
|
606
|
+
if (!newValue || newValue[prop] == null) {
|
|
607
|
+
if (prop.includes('-')) {
|
|
608
|
+
elm.style.removeProperty(prop);
|
|
609
|
+
}
|
|
610
|
+
else {
|
|
611
|
+
elm.style[prop] = '';
|
|
612
|
+
}
|
|
613
|
+
}
|
|
614
|
+
}
|
|
615
|
+
}
|
|
616
|
+
for (const prop in newValue) {
|
|
617
|
+
if (!oldValue || newValue[prop] !== oldValue[prop]) {
|
|
618
|
+
if (prop.includes('-')) {
|
|
619
|
+
elm.style.setProperty(prop, newValue[prop]);
|
|
620
|
+
}
|
|
621
|
+
else {
|
|
622
|
+
elm.style[prop] = newValue[prop];
|
|
623
|
+
}
|
|
624
|
+
}
|
|
625
|
+
}
|
|
626
|
+
}
|
|
297
627
|
else if (memberName === 'ref') {
|
|
298
628
|
// minifier will clean this up
|
|
299
629
|
if (newValue) {
|
|
@@ -367,7 +697,7 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
367
697
|
}
|
|
368
698
|
}
|
|
369
699
|
}
|
|
370
|
-
else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex) {
|
|
700
|
+
else if ((!isProp || flags & 4 /* VNODE_FLAGS.isHost */ || isSvg) && !isComplex) {
|
|
371
701
|
newValue = newValue === true ? '' : newValue;
|
|
372
702
|
{
|
|
373
703
|
elm.setAttribute(memberName, newValue);
|
|
@@ -382,7 +712,7 @@ const updateElement = (oldVnode, newVnode, isSvgMode, memberName) => {
|
|
|
382
712
|
// if the element passed in is a shadow root, which is a document fragment
|
|
383
713
|
// then we want to be adding attrs/props to the shadow root's "host" element
|
|
384
714
|
// if it's not a shadow root, then we add attrs/props to the same element
|
|
385
|
-
const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host
|
|
715
|
+
const elm = newVnode.$elm$.nodeType === 11 /* NODE_TYPE.DocumentFragment */ && newVnode.$elm$.host
|
|
386
716
|
? newVnode.$elm$.host
|
|
387
717
|
: newVnode.$elm$;
|
|
388
718
|
const oldVnodeAttrs = (oldVnode && oldVnode.$attrs$) || EMPTY_OBJ;
|
|
@@ -400,6 +730,16 @@ const updateElement = (oldVnode, newVnode, isSvgMode, memberName) => {
|
|
|
400
730
|
setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName], isSvgMode, newVnode.$flags$);
|
|
401
731
|
}
|
|
402
732
|
};
|
|
733
|
+
/**
|
|
734
|
+
* Create a DOM Node corresponding to one of the children of a given VNode.
|
|
735
|
+
*
|
|
736
|
+
* @param oldParentVNode the parent VNode from the previous render
|
|
737
|
+
* @param newParentVNode the parent VNode from the current render
|
|
738
|
+
* @param childIndex the index of the VNode, in the _new_ parent node's
|
|
739
|
+
* children, for which we will create a new DOM node
|
|
740
|
+
* @param parentElm the parent DOM node which our new node will be a child of
|
|
741
|
+
* @returns the newly created node
|
|
742
|
+
*/
|
|
403
743
|
const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
404
744
|
// tslint:disable-next-line: prefer-const
|
|
405
745
|
const newVNode = newParentVNode.$children$[childIndex];
|
|
@@ -417,23 +757,23 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
417
757
|
}
|
|
418
758
|
newVNode.$flags$ |= newVNode.$children$
|
|
419
759
|
? // slot element has fallback content
|
|
420
|
-
2 /* isSlotFallback */
|
|
760
|
+
2 /* VNODE_FLAGS.isSlotFallback */
|
|
421
761
|
: // slot element does not have fallback content
|
|
422
|
-
1 /* isSlotReference */;
|
|
762
|
+
1 /* VNODE_FLAGS.isSlotReference */;
|
|
423
763
|
}
|
|
424
764
|
}
|
|
425
765
|
if (newVNode.$text$ !== null) {
|
|
426
766
|
// create text node
|
|
427
767
|
elm = newVNode.$elm$ = doc.createTextNode(newVNode.$text$);
|
|
428
768
|
}
|
|
429
|
-
else if (newVNode.$flags$ & 1 /* isSlotReference */) {
|
|
769
|
+
else if (newVNode.$flags$ & 1 /* VNODE_FLAGS.isSlotReference */) {
|
|
430
770
|
// create a slot reference node
|
|
431
771
|
elm = newVNode.$elm$ =
|
|
432
772
|
doc.createTextNode('');
|
|
433
773
|
}
|
|
434
774
|
else {
|
|
435
775
|
// create element
|
|
436
|
-
elm = newVNode.$elm$ = (doc.createElement(newVNode.$flags$ & 2 /* isSlotFallback */
|
|
776
|
+
elm = newVNode.$elm$ = (doc.createElement(newVNode.$flags$ & 2 /* VNODE_FLAGS.isSlotFallback */
|
|
437
777
|
? 'slot-fb'
|
|
438
778
|
: newVNode.$tag$));
|
|
439
779
|
// add css classes, attrs, props, listeners, etc.
|
|
@@ -459,7 +799,7 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
459
799
|
}
|
|
460
800
|
{
|
|
461
801
|
elm['s-hn'] = hostTagName;
|
|
462
|
-
if (newVNode.$flags$ & (2 /* isSlotFallback */ | 1 /* isSlotReference */)) {
|
|
802
|
+
if (newVNode.$flags$ & (2 /* VNODE_FLAGS.isSlotFallback */ | 1 /* VNODE_FLAGS.isSlotReference */)) {
|
|
463
803
|
// remember the content reference comment
|
|
464
804
|
elm['s-sr'] = true;
|
|
465
805
|
// remember the content reference comment
|
|
@@ -478,7 +818,7 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
478
818
|
return elm;
|
|
479
819
|
};
|
|
480
820
|
const putBackInOriginalLocation = (parentElm, recursive) => {
|
|
481
|
-
plt.$flags$ |= 1 /* isTmpDisconnected */;
|
|
821
|
+
plt.$flags$ |= 1 /* PLATFORM_FLAGS.isTmpDisconnected */;
|
|
482
822
|
const oldSlotChildNodes = parentElm.childNodes;
|
|
483
823
|
for (let i = oldSlotChildNodes.length - 1; i >= 0; i--) {
|
|
484
824
|
const childNode = oldSlotChildNodes[i];
|
|
@@ -499,8 +839,23 @@ const putBackInOriginalLocation = (parentElm, recursive) => {
|
|
|
499
839
|
putBackInOriginalLocation(childNode, recursive);
|
|
500
840
|
}
|
|
501
841
|
}
|
|
502
|
-
plt.$flags$ &= ~1 /* isTmpDisconnected */;
|
|
842
|
+
plt.$flags$ &= ~1 /* PLATFORM_FLAGS.isTmpDisconnected */;
|
|
503
843
|
};
|
|
844
|
+
/**
|
|
845
|
+
* Create DOM nodes corresponding to a list of {@link d.Vnode} objects and
|
|
846
|
+
* add them to the DOM in the appropriate place.
|
|
847
|
+
*
|
|
848
|
+
* @param parentElm the DOM node which should be used as a parent for the new
|
|
849
|
+
* DOM nodes
|
|
850
|
+
* @param before a child of the `parentElm` which the new children should be
|
|
851
|
+
* inserted before (optional)
|
|
852
|
+
* @param parentVNode the parent virtual DOM node
|
|
853
|
+
* @param vnodes the new child virtual DOM nodes to produce DOM nodes for
|
|
854
|
+
* @param startIdx the index in the child virtual DOM nodes at which to start
|
|
855
|
+
* creating DOM nodes (inclusive)
|
|
856
|
+
* @param endIdx the index in the child virtual DOM nodes at which to stop
|
|
857
|
+
* creating DOM nodes (inclusive)
|
|
858
|
+
*/
|
|
504
859
|
const addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
|
|
505
860
|
let containerElm = ((parentElm['s-cr'] && parentElm['s-cr'].parentNode) || parentElm);
|
|
506
861
|
let childNode;
|
|
@@ -517,6 +872,19 @@ const addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) =>
|
|
|
517
872
|
}
|
|
518
873
|
}
|
|
519
874
|
};
|
|
875
|
+
/**
|
|
876
|
+
* Remove the DOM elements corresponding to a list of {@link d.VNode} objects.
|
|
877
|
+
* This can be used to, for instance, clean up after a list of children which
|
|
878
|
+
* should no longer be shown.
|
|
879
|
+
*
|
|
880
|
+
* This function also handles some of Stencil's slot relocation logic.
|
|
881
|
+
*
|
|
882
|
+
* @param vnodes a list of virtual DOM nodes to remove
|
|
883
|
+
* @param startIdx the index at which to start removing nodes (inclusive)
|
|
884
|
+
* @param endIdx the index at which to stop removing nodes (inclusive)
|
|
885
|
+
* @param vnode a VNode
|
|
886
|
+
* @param elm an element
|
|
887
|
+
*/
|
|
520
888
|
const removeVnodes = (vnodes, startIdx, endIdx, vnode, elm) => {
|
|
521
889
|
for (; startIdx <= endIdx; ++startIdx) {
|
|
522
890
|
if ((vnode = vnodes[startIdx])) {
|
|
@@ -541,6 +909,74 @@ const removeVnodes = (vnodes, startIdx, endIdx, vnode, elm) => {
|
|
|
541
909
|
}
|
|
542
910
|
}
|
|
543
911
|
};
|
|
912
|
+
/**
|
|
913
|
+
* Reconcile the children of a new VNode with the children of an old VNode by
|
|
914
|
+
* traversing the two collections of children, identifying nodes that are
|
|
915
|
+
* conserved or changed, calling out to `patch` to make any necessary
|
|
916
|
+
* updates to the DOM, and rearranging DOM nodes as needed.
|
|
917
|
+
*
|
|
918
|
+
* The algorithm for reconciling children works by analyzing two 'windows' onto
|
|
919
|
+
* the two arrays of children (`oldCh` and `newCh`). We keep track of the
|
|
920
|
+
* 'windows' by storing start and end indices and references to the
|
|
921
|
+
* corresponding array entries. Initially the two 'windows' are basically equal
|
|
922
|
+
* to the entire array, but we progressively narrow the windows until there are
|
|
923
|
+
* no children left to update by doing the following:
|
|
924
|
+
*
|
|
925
|
+
* 1. Skip any `null` entries at the beginning or end of the two arrays, so
|
|
926
|
+
* that if we have an initial array like the following we'll end up dealing
|
|
927
|
+
* only with a window bounded by the highlighted elements:
|
|
928
|
+
*
|
|
929
|
+
* [null, null, VNode1 , ... , VNode2, null, null]
|
|
930
|
+
* ^^^^^^ ^^^^^^
|
|
931
|
+
*
|
|
932
|
+
* 2. Check to see if the elements at the head and tail positions are equal
|
|
933
|
+
* across the windows. This will basically detect elements which haven't
|
|
934
|
+
* been added, removed, or changed position, i.e. if you had the following
|
|
935
|
+
* VNode elements (represented as HTML):
|
|
936
|
+
*
|
|
937
|
+
* oldVNode: `<div><p><span>HEY</span></p></div>`
|
|
938
|
+
* newVNode: `<div><p><span>THERE</span></p></div>`
|
|
939
|
+
*
|
|
940
|
+
* Then when comparing the children of the `<div>` tag we check the equality
|
|
941
|
+
* of the VNodes corresponding to the `<p>` tags and, since they are the
|
|
942
|
+
* same tag in the same position, we'd be able to avoid completely
|
|
943
|
+
* re-rendering the subtree under them with a new DOM element and would just
|
|
944
|
+
* call out to `patch` to handle reconciling their children and so on.
|
|
945
|
+
*
|
|
946
|
+
* 3. Check, for both windows, to see if the element at the beginning of the
|
|
947
|
+
* window corresponds to the element at the end of the other window. This is
|
|
948
|
+
* a heuristic which will let us identify _some_ situations in which
|
|
949
|
+
* elements have changed position, for instance it _should_ detect that the
|
|
950
|
+
* children nodes themselves have not changed but merely moved in the
|
|
951
|
+
* following example:
|
|
952
|
+
*
|
|
953
|
+
* oldVNode: `<div><element-one /><element-two /></div>`
|
|
954
|
+
* newVNode: `<div><element-two /><element-one /></div>`
|
|
955
|
+
*
|
|
956
|
+
* If we find cases like this then we also need to move the concrete DOM
|
|
957
|
+
* elements corresponding to the moved children to write the re-order to the
|
|
958
|
+
* DOM.
|
|
959
|
+
*
|
|
960
|
+
* 4. Finally, if VNodes have the `key` attribute set on them we check for any
|
|
961
|
+
* nodes in the old children which have the same key as the first element in
|
|
962
|
+
* our window on the new children. If we find such a node we handle calling
|
|
963
|
+
* out to `patch`, moving relevant DOM nodes, and so on, in accordance with
|
|
964
|
+
* what we find.
|
|
965
|
+
*
|
|
966
|
+
* Finally, once we've narrowed our 'windows' to the point that either of them
|
|
967
|
+
* collapse (i.e. they have length 0) we then handle any remaining VNode
|
|
968
|
+
* insertion or deletion that needs to happen to get a DOM state that correctly
|
|
969
|
+
* reflects the new child VNodes. If, for instance, after our window on the old
|
|
970
|
+
* children has collapsed we still have more nodes on the new children that
|
|
971
|
+
* we haven't dealt with yet then we need to add them, or if the new children
|
|
972
|
+
* collapse but we still have unhandled _old_ children then we need to make
|
|
973
|
+
* sure the corresponding DOM nodes are removed.
|
|
974
|
+
*
|
|
975
|
+
* @param parentElm the node into which the parent VNode is rendered
|
|
976
|
+
* @param oldCh the old children of the parent node
|
|
977
|
+
* @param newVNode the new VNode which will replace the parent
|
|
978
|
+
* @param newCh the new children of the parent node
|
|
979
|
+
*/
|
|
544
980
|
const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
545
981
|
let oldStartIdx = 0;
|
|
546
982
|
let newStartIdx = 0;
|
|
@@ -553,7 +989,7 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
|
553
989
|
let node;
|
|
554
990
|
while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {
|
|
555
991
|
if (oldStartVnode == null) {
|
|
556
|
-
//
|
|
992
|
+
// VNode might have been moved left
|
|
557
993
|
oldStartVnode = oldCh[++oldStartIdx];
|
|
558
994
|
}
|
|
559
995
|
else if (oldEndVnode == null) {
|
|
@@ -566,42 +1002,102 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
|
566
1002
|
newEndVnode = newCh[--newEndIdx];
|
|
567
1003
|
}
|
|
568
1004
|
else if (isSameVnode(oldStartVnode, newStartVnode)) {
|
|
1005
|
+
// if the start nodes are the same then we should patch the new VNode
|
|
1006
|
+
// onto the old one, and increment our `newStartIdx` and `oldStartIdx`
|
|
1007
|
+
// indices to reflect that. We don't need to move any DOM Nodes around
|
|
1008
|
+
// since things are matched up in order.
|
|
569
1009
|
patch(oldStartVnode, newStartVnode);
|
|
570
1010
|
oldStartVnode = oldCh[++oldStartIdx];
|
|
571
1011
|
newStartVnode = newCh[++newStartIdx];
|
|
572
1012
|
}
|
|
573
1013
|
else if (isSameVnode(oldEndVnode, newEndVnode)) {
|
|
1014
|
+
// likewise, if the end nodes are the same we patch new onto old and
|
|
1015
|
+
// decrement our end indices, and also likewise in this case we don't
|
|
1016
|
+
// need to move any DOM Nodes.
|
|
574
1017
|
patch(oldEndVnode, newEndVnode);
|
|
575
1018
|
oldEndVnode = oldCh[--oldEndIdx];
|
|
576
1019
|
newEndVnode = newCh[--newEndIdx];
|
|
577
1020
|
}
|
|
578
1021
|
else if (isSameVnode(oldStartVnode, newEndVnode)) {
|
|
579
|
-
// Vnode moved right
|
|
1022
|
+
// case: "Vnode moved right"
|
|
1023
|
+
//
|
|
1024
|
+
// We've found that the last node in our window on the new children is
|
|
1025
|
+
// the same VNode as the _first_ node in our window on the old children
|
|
1026
|
+
// we're dealing with now. Visually, this is the layout of these two
|
|
1027
|
+
// nodes:
|
|
1028
|
+
//
|
|
1029
|
+
// newCh: [..., newStartVnode , ... , newEndVnode , ...]
|
|
1030
|
+
// ^^^^^^^^^^^
|
|
1031
|
+
// oldCh: [..., oldStartVnode , ... , oldEndVnode , ...]
|
|
1032
|
+
// ^^^^^^^^^^^^^
|
|
1033
|
+
//
|
|
1034
|
+
// In this situation we need to patch `newEndVnode` onto `oldStartVnode`
|
|
1035
|
+
// and move the DOM element for `oldStartVnode`.
|
|
580
1036
|
if ((oldStartVnode.$tag$ === 'slot' || newEndVnode.$tag$ === 'slot')) {
|
|
581
1037
|
putBackInOriginalLocation(oldStartVnode.$elm$.parentNode, false);
|
|
582
1038
|
}
|
|
583
1039
|
patch(oldStartVnode, newEndVnode);
|
|
1040
|
+
// We need to move the element for `oldStartVnode` into a position which
|
|
1041
|
+
// will be appropriate for `newEndVnode`. For this we can use
|
|
1042
|
+
// `.insertBefore` and `oldEndVnode.$elm$.nextSibling`. If there is a
|
|
1043
|
+
// sibling for `oldEndVnode.$elm$` then we want to move the DOM node for
|
|
1044
|
+
// `oldStartVnode` between `oldEndVnode` and it's sibling, like so:
|
|
1045
|
+
//
|
|
1046
|
+
// <old-start-node />
|
|
1047
|
+
// <some-intervening-node />
|
|
1048
|
+
// <old-end-node />
|
|
1049
|
+
// <!-- -> <-- `oldStartVnode.$elm$` should be inserted here
|
|
1050
|
+
// <next-sibling />
|
|
1051
|
+
//
|
|
1052
|
+
// If instead `oldEndVnode.$elm$` has no sibling then we just want to put
|
|
1053
|
+
// the node for `oldStartVnode` at the end of the children of
|
|
1054
|
+
// `parentElm`. Luckily, `Node.nextSibling` will return `null` if there
|
|
1055
|
+
// aren't any siblings, and passing `null` to `Node.insertBefore` will
|
|
1056
|
+
// append it to the children of the parent element.
|
|
584
1057
|
parentElm.insertBefore(oldStartVnode.$elm$, oldEndVnode.$elm$.nextSibling);
|
|
585
1058
|
oldStartVnode = oldCh[++oldStartIdx];
|
|
586
1059
|
newEndVnode = newCh[--newEndIdx];
|
|
587
1060
|
}
|
|
588
1061
|
else if (isSameVnode(oldEndVnode, newStartVnode)) {
|
|
589
|
-
// Vnode moved left
|
|
1062
|
+
// case: "Vnode moved left"
|
|
1063
|
+
//
|
|
1064
|
+
// We've found that the first node in our window on the new children is
|
|
1065
|
+
// the same VNode as the _last_ node in our window on the old children.
|
|
1066
|
+
// Visually, this is the layout of these two nodes:
|
|
1067
|
+
//
|
|
1068
|
+
// newCh: [..., newStartVnode , ... , newEndVnode , ...]
|
|
1069
|
+
// ^^^^^^^^^^^^^
|
|
1070
|
+
// oldCh: [..., oldStartVnode , ... , oldEndVnode , ...]
|
|
1071
|
+
// ^^^^^^^^^^^
|
|
1072
|
+
//
|
|
1073
|
+
// In this situation we need to patch `newStartVnode` onto `oldEndVnode`
|
|
1074
|
+
// (which will handle updating any changed attributes, reconciling their
|
|
1075
|
+
// children etc) but we also need to move the DOM node to which
|
|
1076
|
+
// `oldEndVnode` corresponds.
|
|
590
1077
|
if ((oldStartVnode.$tag$ === 'slot' || newEndVnode.$tag$ === 'slot')) {
|
|
591
1078
|
putBackInOriginalLocation(oldEndVnode.$elm$.parentNode, false);
|
|
592
1079
|
}
|
|
593
1080
|
patch(oldEndVnode, newStartVnode);
|
|
1081
|
+
// We've already checked above if `oldStartVnode` and `newStartVnode` are
|
|
1082
|
+
// the same node, so since we're here we know that they are not. Thus we
|
|
1083
|
+
// can move the element for `oldEndVnode` _before_ the element for
|
|
1084
|
+
// `oldStartVnode`, leaving `oldStartVnode` to be reconciled in the
|
|
1085
|
+
// future.
|
|
594
1086
|
parentElm.insertBefore(oldEndVnode.$elm$, oldStartVnode.$elm$);
|
|
595
1087
|
oldEndVnode = oldCh[--oldEndIdx];
|
|
596
1088
|
newStartVnode = newCh[++newStartIdx];
|
|
597
1089
|
}
|
|
598
1090
|
else {
|
|
599
1091
|
{
|
|
600
|
-
//
|
|
1092
|
+
// We either didn't find an element in the old children that matches
|
|
1093
|
+
// the key of the first new child OR the build is not using `key`
|
|
1094
|
+
// attributes at all. In either case we need to create a new element
|
|
1095
|
+
// for the new node.
|
|
601
1096
|
node = createElm(oldCh && oldCh[newStartIdx], newVNode, newStartIdx, parentElm);
|
|
602
1097
|
newStartVnode = newCh[++newStartIdx];
|
|
603
1098
|
}
|
|
604
1099
|
if (node) {
|
|
1100
|
+
// if we created a new node then handle inserting it to the DOM
|
|
605
1101
|
{
|
|
606
1102
|
parentReferenceNode(oldStartVnode.$elm$).insertBefore(node, referenceNode(oldStartVnode.$elm$));
|
|
607
1103
|
}
|
|
@@ -609,18 +1105,40 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
|
609
1105
|
}
|
|
610
1106
|
}
|
|
611
1107
|
if (oldStartIdx > oldEndIdx) {
|
|
1108
|
+
// we have some more new nodes to add which don't match up with old nodes
|
|
612
1109
|
addVnodes(parentElm, newCh[newEndIdx + 1] == null ? null : newCh[newEndIdx + 1].$elm$, newVNode, newCh, newStartIdx, newEndIdx);
|
|
613
1110
|
}
|
|
614
1111
|
else if (newStartIdx > newEndIdx) {
|
|
1112
|
+
// there are nodes in the `oldCh` array which no longer correspond to nodes
|
|
1113
|
+
// in the new array, so lets remove them (which entails cleaning up the
|
|
1114
|
+
// relevant DOM nodes)
|
|
615
1115
|
removeVnodes(oldCh, oldStartIdx, oldEndIdx);
|
|
616
1116
|
}
|
|
617
1117
|
};
|
|
618
|
-
|
|
1118
|
+
/**
|
|
1119
|
+
* Compare two VNodes to determine if they are the same
|
|
1120
|
+
*
|
|
1121
|
+
* **NB**: This function is an equality _heuristic_ based on the available
|
|
1122
|
+
* information set on the two VNodes and can be misleading under certain
|
|
1123
|
+
* circumstances. In particular, if the two nodes do not have `key` attrs
|
|
1124
|
+
* (available under `$key$` on VNodes) then the function falls back on merely
|
|
1125
|
+
* checking that they have the same tag.
|
|
1126
|
+
*
|
|
1127
|
+
* So, in other words, if `key` attrs are not set on VNodes which may be
|
|
1128
|
+
* changing order within a `children` array or something along those lines then
|
|
1129
|
+
* we could obtain a false negative and then have to do needless re-rendering
|
|
1130
|
+
* (i.e. we'd say two VNodes aren't equal when in fact they should be).
|
|
1131
|
+
*
|
|
1132
|
+
* @param leftVNode the first VNode to check
|
|
1133
|
+
* @param rightVNode the second VNode to check
|
|
1134
|
+
* @returns whether they're equal or not
|
|
1135
|
+
*/
|
|
1136
|
+
const isSameVnode = (leftVNode, rightVNode) => {
|
|
619
1137
|
// compare if two vnode to see if they're "technically" the same
|
|
620
1138
|
// need to have the same element tag, and same key to be the same
|
|
621
|
-
if (
|
|
622
|
-
if (
|
|
623
|
-
return
|
|
1139
|
+
if (leftVNode.$tag$ === rightVNode.$tag$) {
|
|
1140
|
+
if (leftVNode.$tag$ === 'slot') {
|
|
1141
|
+
return leftVNode.$name$ === rightVNode.$name$;
|
|
624
1142
|
}
|
|
625
1143
|
return true;
|
|
626
1144
|
}
|
|
@@ -634,6 +1152,14 @@ const referenceNode = (node) => {
|
|
|
634
1152
|
return (node && node['s-ol']) || node;
|
|
635
1153
|
};
|
|
636
1154
|
const parentReferenceNode = (node) => (node['s-ol'] ? node['s-ol'] : node).parentNode;
|
|
1155
|
+
/**
|
|
1156
|
+
* Handle reconciling an outdated VNode with a new one which corresponds to
|
|
1157
|
+
* it. This function handles flushing updates to the DOM and reconciling the
|
|
1158
|
+
* children of the two nodes (if any).
|
|
1159
|
+
*
|
|
1160
|
+
* @param oldVNode an old VNode whose DOM element and children we want to update
|
|
1161
|
+
* @param newVNode a new VNode representing an updated version of the old one
|
|
1162
|
+
*/
|
|
637
1163
|
const patch = (oldVNode, newVNode) => {
|
|
638
1164
|
const elm = (newVNode.$elm$ = oldVNode.$elm$);
|
|
639
1165
|
const oldChildren = oldVNode.$children$;
|
|
@@ -642,7 +1168,6 @@ const patch = (oldVNode, newVNode) => {
|
|
|
642
1168
|
const text = newVNode.$text$;
|
|
643
1169
|
let defaultHolder;
|
|
644
1170
|
if (text === null) {
|
|
645
|
-
// element node
|
|
646
1171
|
{
|
|
647
1172
|
if (tag === 'slot')
|
|
648
1173
|
;
|
|
@@ -655,6 +1180,7 @@ const patch = (oldVNode, newVNode) => {
|
|
|
655
1180
|
}
|
|
656
1181
|
if (oldChildren !== null && newChildren !== null) {
|
|
657
1182
|
// looks like there's child vnodes for both the old and new vnodes
|
|
1183
|
+
// so we need to call `updateChildren` to reconcile them
|
|
658
1184
|
updateChildren(elm, oldChildren, newVNode, newChildren);
|
|
659
1185
|
}
|
|
660
1186
|
else if (newChildren !== null) {
|
|
@@ -692,7 +1218,7 @@ const updateFallbackSlotVisibility = (elm) => {
|
|
|
692
1218
|
let nodeType;
|
|
693
1219
|
for (i = 0, ilen = childNodes.length; i < ilen; i++) {
|
|
694
1220
|
childNode = childNodes[i];
|
|
695
|
-
if (childNode.nodeType === 1 /* ElementNode */) {
|
|
1221
|
+
if (childNode.nodeType === 1 /* NODE_TYPE.ElementNode */) {
|
|
696
1222
|
if (childNode['s-sr']) {
|
|
697
1223
|
// this is a slot fallback node
|
|
698
1224
|
// get the slot name for this slot reference node
|
|
@@ -704,7 +1230,7 @@ const updateFallbackSlotVisibility = (elm) => {
|
|
|
704
1230
|
nodeType = childNodes[j].nodeType;
|
|
705
1231
|
if (childNodes[j]['s-hn'] !== childNode['s-hn'] || slotNameAttr !== '') {
|
|
706
1232
|
// this sibling node is from a different component OR is a named fallback slot node
|
|
707
|
-
if (nodeType === 1 /* ElementNode */ && slotNameAttr === childNodes[j].getAttribute('slot')) {
|
|
1233
|
+
if (nodeType === 1 /* NODE_TYPE.ElementNode */ && slotNameAttr === childNodes[j].getAttribute('slot')) {
|
|
708
1234
|
childNode.hidden = true;
|
|
709
1235
|
break;
|
|
710
1236
|
}
|
|
@@ -713,8 +1239,8 @@ const updateFallbackSlotVisibility = (elm) => {
|
|
|
713
1239
|
// this is a default fallback slot node
|
|
714
1240
|
// any element or text node (with content)
|
|
715
1241
|
// should hide the default fallback slot node
|
|
716
|
-
if (nodeType === 1 /* ElementNode */ ||
|
|
717
|
-
(nodeType === 3 /* TextNode */ && childNodes[j].textContent.trim() !== '')) {
|
|
1242
|
+
if (nodeType === 1 /* NODE_TYPE.ElementNode */ ||
|
|
1243
|
+
(nodeType === 3 /* NODE_TYPE.TextNode */ && childNodes[j].textContent.trim() !== '')) {
|
|
718
1244
|
childNode.hidden = true;
|
|
719
1245
|
break;
|
|
720
1246
|
}
|
|
@@ -792,13 +1318,13 @@ const relocateSlotContent = (elm) => {
|
|
|
792
1318
|
}
|
|
793
1319
|
}
|
|
794
1320
|
}
|
|
795
|
-
if (childNode.nodeType === 1 /* ElementNode */) {
|
|
1321
|
+
if (childNode.nodeType === 1 /* NODE_TYPE.ElementNode */) {
|
|
796
1322
|
relocateSlotContent(childNode);
|
|
797
1323
|
}
|
|
798
1324
|
}
|
|
799
1325
|
};
|
|
800
1326
|
const isNodeLocatedInSlot = (nodeToRelocate, slotNameAttr) => {
|
|
801
|
-
if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
|
1327
|
+
if (nodeToRelocate.nodeType === 1 /* NODE_TYPE.ElementNode */) {
|
|
802
1328
|
if (nodeToRelocate.getAttribute('slot') === null && slotNameAttr === '') {
|
|
803
1329
|
return true;
|
|
804
1330
|
}
|
|
@@ -818,6 +1344,18 @@ const callNodeRefs = (vNode) => {
|
|
|
818
1344
|
vNode.$children$ && vNode.$children$.map(callNodeRefs);
|
|
819
1345
|
}
|
|
820
1346
|
};
|
|
1347
|
+
/**
|
|
1348
|
+
* The main entry point for Stencil's virtual DOM-based rendering engine
|
|
1349
|
+
*
|
|
1350
|
+
* Given a {@link d.HostRef} container and some virtual DOM nodes, this
|
|
1351
|
+
* function will handle creating a virtual DOM tree with a single root, patching
|
|
1352
|
+
* the current virtual DOM tree onto an old one (if any), dealing with slot
|
|
1353
|
+
* relocation, and reflecting attributes.
|
|
1354
|
+
*
|
|
1355
|
+
* @param hostRef data needed to root and render the virtual DOM tree, such as
|
|
1356
|
+
* the DOM node into which it should be rendered.
|
|
1357
|
+
* @param renderFnResults the virtual DOM nodes to be rendered
|
|
1358
|
+
*/
|
|
821
1359
|
const renderVdom = (hostRef, renderFnResults) => {
|
|
822
1360
|
const hostElm = hostRef.$hostElement$;
|
|
823
1361
|
const cmpMeta = hostRef.$cmpMeta$;
|
|
@@ -829,7 +1367,7 @@ const renderVdom = (hostRef, renderFnResults) => {
|
|
|
829
1367
|
cmpMeta.$attrsToReflect$.map(([propName, attribute]) => (rootVnode.$attrs$[attribute] = hostElm[propName]));
|
|
830
1368
|
}
|
|
831
1369
|
rootVnode.$tag$ = null;
|
|
832
|
-
rootVnode.$flags$ |= 4 /* isHost */;
|
|
1370
|
+
rootVnode.$flags$ |= 4 /* VNODE_FLAGS.isHost */;
|
|
833
1371
|
hostRef.$vnode$ = rootVnode;
|
|
834
1372
|
rootVnode.$elm$ = oldVNode.$elm$ = (hostElm.shadowRoot || hostElm );
|
|
835
1373
|
{
|
|
@@ -837,7 +1375,7 @@ const renderVdom = (hostRef, renderFnResults) => {
|
|
|
837
1375
|
}
|
|
838
1376
|
{
|
|
839
1377
|
contentRef = hostElm['s-cr'];
|
|
840
|
-
useNativeShadowDom = (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) !== 0;
|
|
1378
|
+
useNativeShadowDom = (cmpMeta.$flags$ & 1 /* CMP_FLAGS.shadowDomEncapsulation */) !== 0;
|
|
841
1379
|
// always reset
|
|
842
1380
|
checkSlotFallbackVisibility = false;
|
|
843
1381
|
}
|
|
@@ -846,7 +1384,7 @@ const renderVdom = (hostRef, renderFnResults) => {
|
|
|
846
1384
|
{
|
|
847
1385
|
// while we're moving nodes around existing nodes, temporarily disable
|
|
848
1386
|
// the disconnectCallback from working
|
|
849
|
-
plt.$flags$ |= 1 /* isTmpDisconnected */;
|
|
1387
|
+
plt.$flags$ |= 1 /* PLATFORM_FLAGS.isTmpDisconnected */;
|
|
850
1388
|
if (checkSlotRelocate) {
|
|
851
1389
|
relocateSlotContent(rootVnode.$elm$);
|
|
852
1390
|
let relocateData;
|
|
@@ -904,7 +1442,7 @@ const renderVdom = (hostRef, renderFnResults) => {
|
|
|
904
1442
|
}
|
|
905
1443
|
else {
|
|
906
1444
|
// this node doesn't have a slot home to go to, so let's hide it
|
|
907
|
-
if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
|
1445
|
+
if (nodeToRelocate.nodeType === 1 /* NODE_TYPE.ElementNode */) {
|
|
908
1446
|
nodeToRelocate.hidden = true;
|
|
909
1447
|
}
|
|
910
1448
|
}
|
|
@@ -915,37 +1453,11 @@ const renderVdom = (hostRef, renderFnResults) => {
|
|
|
915
1453
|
}
|
|
916
1454
|
// done moving nodes around
|
|
917
1455
|
// allow the disconnect callback to work again
|
|
918
|
-
plt.$flags$ &= ~1 /* isTmpDisconnected */;
|
|
1456
|
+
plt.$flags$ &= ~1 /* PLATFORM_FLAGS.isTmpDisconnected */;
|
|
919
1457
|
// always reset
|
|
920
1458
|
relocateNodes.length = 0;
|
|
921
1459
|
}
|
|
922
1460
|
};
|
|
923
|
-
const getElement = (ref) => (getHostRef(ref).$hostElement$ );
|
|
924
|
-
const createEvent = (ref, name, flags) => {
|
|
925
|
-
const elm = getElement(ref);
|
|
926
|
-
return {
|
|
927
|
-
emit: (detail) => {
|
|
928
|
-
return emitEvent(elm, name, {
|
|
929
|
-
bubbles: !!(flags & 4 /* Bubbles */),
|
|
930
|
-
composed: !!(flags & 2 /* Composed */),
|
|
931
|
-
cancelable: !!(flags & 1 /* Cancellable */),
|
|
932
|
-
detail,
|
|
933
|
-
});
|
|
934
|
-
},
|
|
935
|
-
};
|
|
936
|
-
};
|
|
937
|
-
/**
|
|
938
|
-
* Helper function to create & dispatch a custom Event on a provided target
|
|
939
|
-
* @param elm the target of the Event
|
|
940
|
-
* @param name the name to give the custom Event
|
|
941
|
-
* @param opts options for configuring a custom Event
|
|
942
|
-
* @returns the custom Event
|
|
943
|
-
*/
|
|
944
|
-
const emitEvent = (elm, name, opts) => {
|
|
945
|
-
const ev = plt.ce(name, opts);
|
|
946
|
-
elm.dispatchEvent(ev);
|
|
947
|
-
return ev;
|
|
948
|
-
};
|
|
949
1461
|
const attachToAncestor = (hostRef, ancestorComponent) => {
|
|
950
1462
|
if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent['s-p']) {
|
|
951
1463
|
ancestorComponent['s-p'].push(new Promise((r) => (hostRef.$onRenderResolve$ = r)));
|
|
@@ -953,10 +1465,10 @@ const attachToAncestor = (hostRef, ancestorComponent) => {
|
|
|
953
1465
|
};
|
|
954
1466
|
const scheduleUpdate = (hostRef, isInitialLoad) => {
|
|
955
1467
|
{
|
|
956
|
-
hostRef.$flags$ |= 16 /* isQueuedForUpdate */;
|
|
1468
|
+
hostRef.$flags$ |= 16 /* HOST_FLAGS.isQueuedForUpdate */;
|
|
957
1469
|
}
|
|
958
|
-
if (hostRef.$flags$ & 4 /* isWaitingForChildren */) {
|
|
959
|
-
hostRef.$flags$ |= 512 /* needsRerender */;
|
|
1470
|
+
if (hostRef.$flags$ & 4 /* HOST_FLAGS.isWaitingForChildren */) {
|
|
1471
|
+
hostRef.$flags$ |= 512 /* HOST_FLAGS.needsRerender */;
|
|
960
1472
|
return;
|
|
961
1473
|
}
|
|
962
1474
|
attachToAncestor(hostRef, hostRef.$ancestorComponent$);
|
|
@@ -972,12 +1484,20 @@ const dispatchHooks = (hostRef, isInitialLoad) => {
|
|
|
972
1484
|
let promise;
|
|
973
1485
|
if (isInitialLoad) {
|
|
974
1486
|
{
|
|
975
|
-
hostRef.$flags$ |= 256 /* isListenReady */;
|
|
1487
|
+
hostRef.$flags$ |= 256 /* HOST_FLAGS.isListenReady */;
|
|
976
1488
|
if (hostRef.$queuedListeners$) {
|
|
977
1489
|
hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event));
|
|
978
1490
|
hostRef.$queuedListeners$ = null;
|
|
979
1491
|
}
|
|
980
1492
|
}
|
|
1493
|
+
{
|
|
1494
|
+
promise = safeCall(instance, 'componentWillLoad');
|
|
1495
|
+
}
|
|
1496
|
+
}
|
|
1497
|
+
else {
|
|
1498
|
+
{
|
|
1499
|
+
promise = safeCall(instance, 'componentWillUpdate');
|
|
1500
|
+
}
|
|
981
1501
|
}
|
|
982
1502
|
{
|
|
983
1503
|
promise = then(promise, () => safeCall(instance, 'componentWillRender'));
|
|
@@ -1015,7 +1535,7 @@ const updateComponent = async (hostRef, instance, isInitialLoad) => {
|
|
|
1015
1535
|
}
|
|
1016
1536
|
else {
|
|
1017
1537
|
Promise.all(childrenPromises).then(postUpdate);
|
|
1018
|
-
hostRef.$flags$ |= 4 /* isWaitingForChildren */;
|
|
1538
|
+
hostRef.$flags$ |= 4 /* HOST_FLAGS.isWaitingForChildren */;
|
|
1019
1539
|
childrenPromises.length = 0;
|
|
1020
1540
|
}
|
|
1021
1541
|
}
|
|
@@ -1024,10 +1544,10 @@ const callRender = (hostRef, instance, elm) => {
|
|
|
1024
1544
|
try {
|
|
1025
1545
|
instance = instance.render() ;
|
|
1026
1546
|
{
|
|
1027
|
-
hostRef.$flags$ &= ~16 /* isQueuedForUpdate */;
|
|
1547
|
+
hostRef.$flags$ &= ~16 /* HOST_FLAGS.isQueuedForUpdate */;
|
|
1028
1548
|
}
|
|
1029
1549
|
{
|
|
1030
|
-
hostRef.$flags$ |= 2 /* hasRendered */;
|
|
1550
|
+
hostRef.$flags$ |= 2 /* HOST_FLAGS.hasRendered */;
|
|
1031
1551
|
}
|
|
1032
1552
|
{
|
|
1033
1553
|
{
|
|
@@ -1049,13 +1569,20 @@ const postUpdateComponent = (hostRef) => {
|
|
|
1049
1569
|
const tagName = hostRef.$cmpMeta$.$tagName$;
|
|
1050
1570
|
const elm = hostRef.$hostElement$;
|
|
1051
1571
|
const endPostUpdate = createTime('postUpdate', tagName);
|
|
1572
|
+
const instance = hostRef.$lazyInstance$ ;
|
|
1052
1573
|
const ancestorComponent = hostRef.$ancestorComponent$;
|
|
1053
|
-
|
|
1054
|
-
|
|
1574
|
+
{
|
|
1575
|
+
safeCall(instance, 'componentDidRender');
|
|
1576
|
+
}
|
|
1577
|
+
if (!(hostRef.$flags$ & 64 /* HOST_FLAGS.hasLoadedComponent */)) {
|
|
1578
|
+
hostRef.$flags$ |= 64 /* HOST_FLAGS.hasLoadedComponent */;
|
|
1055
1579
|
{
|
|
1056
1580
|
// DOM WRITE!
|
|
1057
1581
|
addHydratedFlag(elm);
|
|
1058
1582
|
}
|
|
1583
|
+
{
|
|
1584
|
+
safeCall(instance, 'componentDidLoad');
|
|
1585
|
+
}
|
|
1059
1586
|
endPostUpdate();
|
|
1060
1587
|
{
|
|
1061
1588
|
hostRef.$onReadyResolve$(elm);
|
|
@@ -1065,6 +1592,9 @@ const postUpdateComponent = (hostRef) => {
|
|
|
1065
1592
|
}
|
|
1066
1593
|
}
|
|
1067
1594
|
else {
|
|
1595
|
+
{
|
|
1596
|
+
safeCall(instance, 'componentDidUpdate');
|
|
1597
|
+
}
|
|
1068
1598
|
endPostUpdate();
|
|
1069
1599
|
}
|
|
1070
1600
|
// load events fire from bottom to top
|
|
@@ -1074,10 +1604,10 @@ const postUpdateComponent = (hostRef) => {
|
|
|
1074
1604
|
hostRef.$onRenderResolve$();
|
|
1075
1605
|
hostRef.$onRenderResolve$ = undefined;
|
|
1076
1606
|
}
|
|
1077
|
-
if (hostRef.$flags$ & 512 /* needsRerender */) {
|
|
1607
|
+
if (hostRef.$flags$ & 512 /* HOST_FLAGS.needsRerender */) {
|
|
1078
1608
|
nextTick(() => scheduleUpdate(hostRef, false));
|
|
1079
1609
|
}
|
|
1080
|
-
hostRef.$flags$ &= ~(4 /* isWaitingForChildren */ | 512 /* needsRerender */);
|
|
1610
|
+
hostRef.$flags$ &= ~(4 /* HOST_FLAGS.isWaitingForChildren */ | 512 /* HOST_FLAGS.needsRerender */);
|
|
1081
1611
|
}
|
|
1082
1612
|
// ( •_•)
|
|
1083
1613
|
// ( •_•)>⌐■-■
|
|
@@ -1107,53 +1637,6 @@ const then = (promise, thenFn) => {
|
|
|
1107
1637
|
};
|
|
1108
1638
|
const addHydratedFlag = (elm) => elm.classList.add('hydrated')
|
|
1109
1639
|
;
|
|
1110
|
-
/**
|
|
1111
|
-
* Parse a new property value for a given property type.
|
|
1112
|
-
*
|
|
1113
|
-
* While the prop value can reasonably be expected to be of `any` type as far as TypeScript's type checker is concerned,
|
|
1114
|
-
* it is not safe to assume that the string returned by evaluating `typeof propValue` matches:
|
|
1115
|
-
* 1. `any`, the type given to `propValue` in the function signature
|
|
1116
|
-
* 2. the type stored from `propType`.
|
|
1117
|
-
*
|
|
1118
|
-
* This function provides the capability to parse/coerce a property's value to potentially any other JavaScript type.
|
|
1119
|
-
*
|
|
1120
|
-
* Property values represented in TSX preserve their type information. In the example below, the number 0 is passed to
|
|
1121
|
-
* a component. This `propValue` will preserve its type information (`typeof propValue === 'number'`). Note that is
|
|
1122
|
-
* based on the type of the value being passed in, not the type declared of the class member decorated with `@Prop`.
|
|
1123
|
-
* ```tsx
|
|
1124
|
-
* <my-cmp prop-val={0}></my-cmp>
|
|
1125
|
-
* ```
|
|
1126
|
-
*
|
|
1127
|
-
* HTML prop values on the other hand, will always a string
|
|
1128
|
-
*
|
|
1129
|
-
* @param propValue the new value to coerce to some type
|
|
1130
|
-
* @param propType the type of the prop, expressed as a binary number
|
|
1131
|
-
* @returns the parsed/coerced value
|
|
1132
|
-
*/
|
|
1133
|
-
const parsePropertyValue = (propValue, propType) => {
|
|
1134
|
-
// ensure this value is of the correct prop type
|
|
1135
|
-
if (propValue != null && !isComplexType(propValue)) {
|
|
1136
|
-
if (propType & 4 /* Boolean */) {
|
|
1137
|
-
// per the HTML spec, any string value means it is a boolean true value
|
|
1138
|
-
// but we'll cheat here and say that the string "false" is the boolean false
|
|
1139
|
-
return propValue === 'false' ? false : propValue === '' || !!propValue;
|
|
1140
|
-
}
|
|
1141
|
-
if (propType & 2 /* Number */) {
|
|
1142
|
-
// force it to be a number
|
|
1143
|
-
return parseFloat(propValue);
|
|
1144
|
-
}
|
|
1145
|
-
if (propType & 1 /* String */) {
|
|
1146
|
-
// could have been passed as a number or boolean
|
|
1147
|
-
// but we still want it as a string
|
|
1148
|
-
return String(propValue);
|
|
1149
|
-
}
|
|
1150
|
-
// redundant return here for better minification
|
|
1151
|
-
return propValue;
|
|
1152
|
-
}
|
|
1153
|
-
// not sure exactly what type we want
|
|
1154
|
-
// so no need to change to a different type
|
|
1155
|
-
return propValue;
|
|
1156
|
-
};
|
|
1157
1640
|
const getValue = (ref, propName) => getHostRef(ref).$instanceValues$.get(propName);
|
|
1158
1641
|
const setValue = (ref, propName, newVal, cmpMeta) => {
|
|
1159
1642
|
// check our new property value against our internal value
|
|
@@ -1166,13 +1649,13 @@ const setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
1166
1649
|
// explicitly check for NaN on both sides, as `NaN === NaN` is always false
|
|
1167
1650
|
const areBothNaN = Number.isNaN(oldVal) && Number.isNaN(newVal);
|
|
1168
1651
|
const didValueChange = newVal !== oldVal && !areBothNaN;
|
|
1169
|
-
if ((!(flags & 8 /* isConstructingInstance */) || oldVal === undefined) && didValueChange) {
|
|
1652
|
+
if ((!(flags & 8 /* HOST_FLAGS.isConstructingInstance */) || oldVal === undefined) && didValueChange) {
|
|
1170
1653
|
// gadzooks! the property's value has changed!!
|
|
1171
1654
|
// set our new value!
|
|
1172
1655
|
hostRef.$instanceValues$.set(propName, newVal);
|
|
1173
1656
|
if (instance) {
|
|
1174
1657
|
// get an array of method names of watch functions to call
|
|
1175
|
-
if (cmpMeta.$watchers$ && flags & 128 /* isWatchReady */) {
|
|
1658
|
+
if (cmpMeta.$watchers$ && flags & 128 /* HOST_FLAGS.isWatchReady */) {
|
|
1176
1659
|
const watchMethods = cmpMeta.$watchers$[propName];
|
|
1177
1660
|
if (watchMethods) {
|
|
1178
1661
|
// this instance is watching for when this property changed
|
|
@@ -1187,7 +1670,7 @@ const setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
1187
1670
|
});
|
|
1188
1671
|
}
|
|
1189
1672
|
}
|
|
1190
|
-
if ((flags & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
|
|
1673
|
+
if ((flags & (2 /* HOST_FLAGS.hasRendered */ | 16 /* HOST_FLAGS.isQueuedForUpdate */)) === 2 /* HOST_FLAGS.hasRendered */) {
|
|
1191
1674
|
if (instance.componentShouldUpdate) {
|
|
1192
1675
|
if (instance.componentShouldUpdate(newVal, oldVal, propName) === false) {
|
|
1193
1676
|
return;
|
|
@@ -1202,6 +1685,16 @@ const setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
1202
1685
|
}
|
|
1203
1686
|
}
|
|
1204
1687
|
};
|
|
1688
|
+
/**
|
|
1689
|
+
* Attach a series of runtime constructs to a compiled Stencil component
|
|
1690
|
+
* constructor, including getters and setters for the `@Prop` and `@State`
|
|
1691
|
+
* decorators, callbacks for when attributes change, and so on.
|
|
1692
|
+
*
|
|
1693
|
+
* @param Cstr the constructor for a component that we need to process
|
|
1694
|
+
* @param cmpMeta metadata collected previously about the component
|
|
1695
|
+
* @param flags a number used to store a series of bit flags
|
|
1696
|
+
* @returns a reference to the same constructor passed in (but now mutated)
|
|
1697
|
+
*/
|
|
1205
1698
|
const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
1206
1699
|
if (cmpMeta.$members$) {
|
|
1207
1700
|
if (Cstr.watchers) {
|
|
@@ -1211,8 +1704,8 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1211
1704
|
const members = Object.entries(cmpMeta.$members$);
|
|
1212
1705
|
const prototype = Cstr.prototype;
|
|
1213
1706
|
members.map(([memberName, [memberFlags]]) => {
|
|
1214
|
-
if ((memberFlags & 31 /* Prop */ ||
|
|
1215
|
-
((flags & 2 /* proxyState */) && memberFlags & 32 /* State */))) {
|
|
1707
|
+
if ((memberFlags & 31 /* MEMBER_FLAGS.Prop */ ||
|
|
1708
|
+
((flags & 2 /* PROXY_FLAGS.proxyState */) && memberFlags & 32 /* MEMBER_FLAGS.State */))) {
|
|
1216
1709
|
// proxyComponent - prop
|
|
1217
1710
|
Object.defineProperty(prototype, memberName, {
|
|
1218
1711
|
get() {
|
|
@@ -1228,7 +1721,7 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1228
1721
|
});
|
|
1229
1722
|
}
|
|
1230
1723
|
});
|
|
1231
|
-
if ((flags & 1 /* isElementConstructor */)) {
|
|
1724
|
+
if ((flags & 1 /* PROXY_FLAGS.isElementConstructor */)) {
|
|
1232
1725
|
const attrNameToPropName = new Map();
|
|
1233
1726
|
prototype.attributeChangedCallback = function (attrName, _oldValue, newValue) {
|
|
1234
1727
|
plt.jmp(() => {
|
|
@@ -1284,11 +1777,11 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1284
1777
|
// create an array of attributes to observe
|
|
1285
1778
|
// and also create a map of html attribute name to js property name
|
|
1286
1779
|
Cstr.observedAttributes = members
|
|
1287
|
-
.filter(([_, m]) => m[0] & 15 /* HasAttribute */) // filter to only keep props that should match attributes
|
|
1780
|
+
.filter(([_, m]) => m[0] & 15 /* MEMBER_FLAGS.HasAttribute */) // filter to only keep props that should match attributes
|
|
1288
1781
|
.map(([propName, m]) => {
|
|
1289
1782
|
const attrName = m[1] || propName;
|
|
1290
1783
|
attrNameToPropName.set(attrName, propName);
|
|
1291
|
-
if (m[0] & 512 /* ReflectAttr */) {
|
|
1784
|
+
if (m[0] & 512 /* MEMBER_FLAGS.ReflectAttr */) {
|
|
1292
1785
|
cmpMeta.$attrsToReflect$.push([propName, attrName]);
|
|
1293
1786
|
}
|
|
1294
1787
|
return attrName;
|
|
@@ -1299,10 +1792,10 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1299
1792
|
};
|
|
1300
1793
|
const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) => {
|
|
1301
1794
|
// initializeComponent
|
|
1302
|
-
if ((hostRef.$flags$ & 32 /* hasInitializedComponent */) === 0) {
|
|
1795
|
+
if ((hostRef.$flags$ & 32 /* HOST_FLAGS.hasInitializedComponent */) === 0) {
|
|
1303
1796
|
{
|
|
1304
1797
|
// we haven't initialized this element yet
|
|
1305
|
-
hostRef.$flags$ |= 32 /* hasInitializedComponent */;
|
|
1798
|
+
hostRef.$flags$ |= 32 /* HOST_FLAGS.hasInitializedComponent */;
|
|
1306
1799
|
// lazy loaded components
|
|
1307
1800
|
// request the component's implementation to be
|
|
1308
1801
|
// wired up with the host element
|
|
@@ -1320,7 +1813,7 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
|
|
|
1320
1813
|
{
|
|
1321
1814
|
cmpMeta.$watchers$ = Cstr.watchers;
|
|
1322
1815
|
}
|
|
1323
|
-
proxyComponent(Cstr, cmpMeta, 2 /* proxyState */);
|
|
1816
|
+
proxyComponent(Cstr, cmpMeta, 2 /* PROXY_FLAGS.proxyState */);
|
|
1324
1817
|
Cstr.isProxied = true;
|
|
1325
1818
|
}
|
|
1326
1819
|
const endNewInstance = createTime('createInstance', cmpMeta.$tagName$);
|
|
@@ -1328,7 +1821,7 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
|
|
|
1328
1821
|
// but let's keep track of when we start and stop
|
|
1329
1822
|
// so that the getters/setters don't incorrectly step on data
|
|
1330
1823
|
{
|
|
1331
|
-
hostRef.$flags$ |= 8 /* isConstructingInstance */;
|
|
1824
|
+
hostRef.$flags$ |= 8 /* HOST_FLAGS.isConstructingInstance */;
|
|
1332
1825
|
}
|
|
1333
1826
|
// construct the lazy-loaded component implementation
|
|
1334
1827
|
// passing the hostRef is very important during
|
|
@@ -1341,10 +1834,10 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
|
|
|
1341
1834
|
consoleError(e);
|
|
1342
1835
|
}
|
|
1343
1836
|
{
|
|
1344
|
-
hostRef.$flags$ &= ~8 /* isConstructingInstance */;
|
|
1837
|
+
hostRef.$flags$ &= ~8 /* HOST_FLAGS.isConstructingInstance */;
|
|
1345
1838
|
}
|
|
1346
1839
|
{
|
|
1347
|
-
hostRef.$flags$ |= 128 /* isWatchReady */;
|
|
1840
|
+
hostRef.$flags$ |= 128 /* HOST_FLAGS.isWatchReady */;
|
|
1348
1841
|
}
|
|
1349
1842
|
endNewInstance();
|
|
1350
1843
|
}
|
|
@@ -1354,7 +1847,7 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
|
|
|
1354
1847
|
const scopeId = getScopeId(cmpMeta);
|
|
1355
1848
|
if (!styles.has(scopeId)) {
|
|
1356
1849
|
const endRegisterStyles = createTime('registerStyles', cmpMeta.$tagName$);
|
|
1357
|
-
registerStyle(scopeId, style, !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */));
|
|
1850
|
+
registerStyle(scopeId, style, !!(cmpMeta.$flags$ & 1 /* CMP_FLAGS.shadowDomEncapsulation */));
|
|
1358
1851
|
endRegisterStyles();
|
|
1359
1852
|
}
|
|
1360
1853
|
}
|
|
@@ -1376,19 +1869,31 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
|
|
|
1376
1869
|
}
|
|
1377
1870
|
};
|
|
1378
1871
|
const connectedCallback = (elm) => {
|
|
1379
|
-
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
|
|
1872
|
+
if ((plt.$flags$ & 1 /* PLATFORM_FLAGS.isTmpDisconnected */) === 0) {
|
|
1380
1873
|
const hostRef = getHostRef(elm);
|
|
1381
1874
|
const cmpMeta = hostRef.$cmpMeta$;
|
|
1382
1875
|
const endConnected = createTime('connectedCallback', cmpMeta.$tagName$);
|
|
1383
|
-
if (!(hostRef.$flags$ & 1 /* hasConnected */)) {
|
|
1876
|
+
if (!(hostRef.$flags$ & 1 /* HOST_FLAGS.hasConnected */)) {
|
|
1384
1877
|
// first time this component has connected
|
|
1385
|
-
hostRef.$flags$ |= 1 /* hasConnected */;
|
|
1878
|
+
hostRef.$flags$ |= 1 /* HOST_FLAGS.hasConnected */;
|
|
1879
|
+
let hostId;
|
|
1386
1880
|
{
|
|
1881
|
+
hostId = elm.getAttribute(HYDRATE_ID);
|
|
1882
|
+
if (hostId) {
|
|
1883
|
+
if (cmpMeta.$flags$ & 1 /* CMP_FLAGS.shadowDomEncapsulation */) {
|
|
1884
|
+
const scopeId = addStyle(elm.shadowRoot, cmpMeta);
|
|
1885
|
+
elm.classList.remove(scopeId + '-h', scopeId + '-s');
|
|
1886
|
+
}
|
|
1887
|
+
initializeClientHydrate(elm, cmpMeta.$tagName$, hostId, hostRef);
|
|
1888
|
+
}
|
|
1889
|
+
}
|
|
1890
|
+
if (!hostId) {
|
|
1387
1891
|
// initUpdate
|
|
1388
1892
|
// if the slot polyfill is required we'll need to put some nodes
|
|
1389
1893
|
// in here to act as original content anchors as we move nodes around
|
|
1390
1894
|
// host element has been connected to the DOM
|
|
1391
|
-
if ((
|
|
1895
|
+
if ((// TODO(STENCIL-662): Remove code related to deprecated shadowDomShim field
|
|
1896
|
+
cmpMeta.$flags$ & (4 /* CMP_FLAGS.hasSlotRelocation */ | 8 /* CMP_FLAGS.needsShadowDomShim */))) {
|
|
1392
1897
|
setContentReference(elm);
|
|
1393
1898
|
}
|
|
1394
1899
|
}
|
|
@@ -1399,7 +1904,10 @@ const connectedCallback = (elm) => {
|
|
|
1399
1904
|
while ((ancestorComponent = ancestorComponent.parentNode || ancestorComponent.host)) {
|
|
1400
1905
|
// climb up the ancestors looking for the first
|
|
1401
1906
|
// component that hasn't finished its lifecycle update yet
|
|
1402
|
-
if (ancestorComponent
|
|
1907
|
+
if ((ancestorComponent.nodeType === 1 /* NODE_TYPE.ElementNode */ &&
|
|
1908
|
+
ancestorComponent.hasAttribute('s-id') &&
|
|
1909
|
+
ancestorComponent['s-p']) ||
|
|
1910
|
+
ancestorComponent['s-p']) {
|
|
1403
1911
|
// we found this components first ancestor component
|
|
1404
1912
|
// keep a reference to this component's ancestor component
|
|
1405
1913
|
attachToAncestor(hostRef, (hostRef.$ancestorComponent$ = ancestorComponent));
|
|
@@ -1411,7 +1919,7 @@ const connectedCallback = (elm) => {
|
|
|
1411
1919
|
// https://developers.google.com/web/fundamentals/web-components/best-practices#lazy-properties
|
|
1412
1920
|
if (cmpMeta.$members$) {
|
|
1413
1921
|
Object.entries(cmpMeta.$members$).map(([memberName, [memberFlags]]) => {
|
|
1414
|
-
if (memberFlags & 31 /* Prop */ && elm.hasOwnProperty(memberName)) {
|
|
1922
|
+
if (memberFlags & 31 /* MEMBER_FLAGS.Prop */ && elm.hasOwnProperty(memberName)) {
|
|
1415
1923
|
const value = elm[memberName];
|
|
1416
1924
|
delete elm[memberName];
|
|
1417
1925
|
elm[memberName] = value;
|
|
@@ -1443,17 +1951,22 @@ const setContentReference = (elm) => {
|
|
|
1443
1951
|
elm.insertBefore(contentRefElm, elm.firstChild);
|
|
1444
1952
|
};
|
|
1445
1953
|
const disconnectedCallback = (elm) => {
|
|
1446
|
-
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
|
|
1954
|
+
if ((plt.$flags$ & 1 /* PLATFORM_FLAGS.isTmpDisconnected */) === 0) {
|
|
1447
1955
|
const hostRef = getHostRef(elm);
|
|
1956
|
+
const instance = hostRef.$lazyInstance$ ;
|
|
1448
1957
|
{
|
|
1449
1958
|
if (hostRef.$rmListeners$) {
|
|
1450
1959
|
hostRef.$rmListeners$.map((rmListener) => rmListener());
|
|
1451
1960
|
hostRef.$rmListeners$ = undefined;
|
|
1452
1961
|
}
|
|
1453
1962
|
}
|
|
1963
|
+
{
|
|
1964
|
+
safeCall(instance, 'disconnectedCallback');
|
|
1965
|
+
}
|
|
1454
1966
|
}
|
|
1455
1967
|
};
|
|
1456
1968
|
const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
1969
|
+
var _a;
|
|
1457
1970
|
const endBootstrap = createTime();
|
|
1458
1971
|
const cmpTags = [];
|
|
1459
1972
|
const exclude = options.exclude || [];
|
|
@@ -1462,10 +1975,22 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1462
1975
|
const metaCharset = /*@__PURE__*/ head.querySelector('meta[charset]');
|
|
1463
1976
|
const visibilityStyle = /*@__PURE__*/ doc.createElement('style');
|
|
1464
1977
|
const deferredConnectedCallbacks = [];
|
|
1978
|
+
const styles = /*@__PURE__*/ doc.querySelectorAll(`[${HYDRATED_STYLE_ID}]`);
|
|
1465
1979
|
let appLoadFallback;
|
|
1466
1980
|
let isBootstrapping = true;
|
|
1981
|
+
let i = 0;
|
|
1467
1982
|
Object.assign(plt, options);
|
|
1468
1983
|
plt.$resourcesUrl$ = new URL(options.resourcesUrl || './', doc.baseURI).href;
|
|
1984
|
+
{
|
|
1985
|
+
// If the app is already hydrated there is not point to disable the
|
|
1986
|
+
// async queue. This will improve the first input delay
|
|
1987
|
+
plt.$flags$ |= 2 /* PLATFORM_FLAGS.appLoaded */;
|
|
1988
|
+
}
|
|
1989
|
+
{
|
|
1990
|
+
for (; i < styles.length; i++) {
|
|
1991
|
+
registerStyle(styles[i].getAttribute(HYDRATED_STYLE_ID), convertScopedToShadow(styles[i].innerHTML), true);
|
|
1992
|
+
}
|
|
1993
|
+
}
|
|
1469
1994
|
lazyBundles.map((lazyBundle) => {
|
|
1470
1995
|
lazyBundle[1].map((compactMeta) => {
|
|
1471
1996
|
const cmpMeta = {
|
|
@@ -1494,7 +2019,7 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1494
2019
|
super(self);
|
|
1495
2020
|
self = this;
|
|
1496
2021
|
registerHost(self, cmpMeta);
|
|
1497
|
-
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
|
|
2022
|
+
if (cmpMeta.$flags$ & 1 /* CMP_FLAGS.shadowDomEncapsulation */) {
|
|
1498
2023
|
// this component is using shadow dom
|
|
1499
2024
|
// and this browser supports shadow dom
|
|
1500
2025
|
// add the read-only property "shadowRoot" to the host element
|
|
@@ -1529,13 +2054,18 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1529
2054
|
cmpMeta.$lazyBundleId$ = lazyBundle[0];
|
|
1530
2055
|
if (!exclude.includes(tagName) && !customElements.get(tagName)) {
|
|
1531
2056
|
cmpTags.push(tagName);
|
|
1532
|
-
customElements.define(tagName, proxyComponent(HostElement, cmpMeta, 1 /* isElementConstructor */));
|
|
2057
|
+
customElements.define(tagName, proxyComponent(HostElement, cmpMeta, 1 /* PROXY_FLAGS.isElementConstructor */));
|
|
1533
2058
|
}
|
|
1534
2059
|
});
|
|
1535
2060
|
});
|
|
1536
2061
|
{
|
|
1537
2062
|
visibilityStyle.innerHTML = cmpTags + HYDRATED_CSS;
|
|
1538
2063
|
visibilityStyle.setAttribute('data-styles', '');
|
|
2064
|
+
// Apply CSP nonce to the style tag if it exists
|
|
2065
|
+
const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);
|
|
2066
|
+
if (nonce != null) {
|
|
2067
|
+
visibilityStyle.setAttribute('nonce', nonce);
|
|
2068
|
+
}
|
|
1539
2069
|
head.insertBefore(visibilityStyle, metaCharset ? metaCharset.nextSibling : head.firstChild);
|
|
1540
2070
|
}
|
|
1541
2071
|
// Process deferred connectedCallbacks now all components have been registered
|
|
@@ -1551,7 +2081,52 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1551
2081
|
// Fallback appLoad event
|
|
1552
2082
|
endBootstrap();
|
|
1553
2083
|
};
|
|
1554
|
-
const
|
|
2084
|
+
const addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) => {
|
|
2085
|
+
if (listeners) {
|
|
2086
|
+
listeners.map(([flags, name, method]) => {
|
|
2087
|
+
const target = getHostListenerTarget(elm, flags) ;
|
|
2088
|
+
const handler = hostListenerProxy(hostRef, method);
|
|
2089
|
+
const opts = hostListenerOpts(flags);
|
|
2090
|
+
plt.ael(target, name, handler, opts);
|
|
2091
|
+
(hostRef.$rmListeners$ = hostRef.$rmListeners$ || []).push(() => plt.rel(target, name, handler, opts));
|
|
2092
|
+
});
|
|
2093
|
+
}
|
|
2094
|
+
};
|
|
2095
|
+
const hostListenerProxy = (hostRef, methodName) => (ev) => {
|
|
2096
|
+
try {
|
|
2097
|
+
{
|
|
2098
|
+
if (hostRef.$flags$ & 256 /* HOST_FLAGS.isListenReady */) {
|
|
2099
|
+
// instance is ready, let's call it's member method for this event
|
|
2100
|
+
hostRef.$lazyInstance$[methodName](ev);
|
|
2101
|
+
}
|
|
2102
|
+
else {
|
|
2103
|
+
(hostRef.$queuedListeners$ = hostRef.$queuedListeners$ || []).push([methodName, ev]);
|
|
2104
|
+
}
|
|
2105
|
+
}
|
|
2106
|
+
}
|
|
2107
|
+
catch (e) {
|
|
2108
|
+
consoleError(e);
|
|
2109
|
+
}
|
|
2110
|
+
};
|
|
2111
|
+
const getHostListenerTarget = (elm, flags) => {
|
|
2112
|
+
if (flags & 4 /* LISTENER_FLAGS.TargetDocument */)
|
|
2113
|
+
return doc;
|
|
2114
|
+
if (flags & 8 /* LISTENER_FLAGS.TargetWindow */)
|
|
2115
|
+
return win;
|
|
2116
|
+
if (flags & 16 /* LISTENER_FLAGS.TargetBody */)
|
|
2117
|
+
return doc.body;
|
|
2118
|
+
return elm;
|
|
2119
|
+
};
|
|
2120
|
+
// prettier-ignore
|
|
2121
|
+
const hostListenerOpts = (flags) => (flags & 2 /* LISTENER_FLAGS.Capture */) !== 0;
|
|
2122
|
+
/**
|
|
2123
|
+
* Assigns the given value to the nonce property on the runtime platform object.
|
|
2124
|
+
* During runtime, this value is used to set the nonce attribute on all dynamically created script and style tags.
|
|
2125
|
+
* @param nonce The value to be assigned to the platform nonce property.
|
|
2126
|
+
* @returns void
|
|
2127
|
+
*/
|
|
2128
|
+
const setNonce = (nonce) => (plt.$nonce$ = nonce);
|
|
2129
|
+
const hostRefs = /*@__PURE__*/ new WeakMap();
|
|
1555
2130
|
const getHostRef = (ref) => hostRefs.get(ref);
|
|
1556
2131
|
const registerInstance = (lazyInstance, hostRef) => hostRefs.set((hostRef.$lazyInstance$ = lazyInstance), hostRef);
|
|
1557
2132
|
const registerHost = (elm, cmpMeta) => {
|
|
@@ -1580,7 +2155,180 @@ const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
1580
2155
|
if (module) {
|
|
1581
2156
|
return module[exportName];
|
|
1582
2157
|
}
|
|
1583
|
-
|
|
2158
|
+
|
|
2159
|
+
if (!hmrVersionId || !BUILD.hotModuleReplacement) {
|
|
2160
|
+
const processMod = importedModule => {
|
|
2161
|
+
cmpModules.set(bundleId, importedModule);
|
|
2162
|
+
return importedModule[exportName];
|
|
2163
|
+
}
|
|
2164
|
+
switch(bundleId) {
|
|
2165
|
+
|
|
2166
|
+
case 'p-button_3':
|
|
2167
|
+
return import(
|
|
2168
|
+
/* webpackMode: "lazy" */
|
|
2169
|
+
'./p-button_3.entry.js').then(processMod, consoleError);
|
|
2170
|
+
case 'p-accordion':
|
|
2171
|
+
return import(
|
|
2172
|
+
/* webpackMode: "lazy" */
|
|
2173
|
+
'./p-accordion.entry.js').then(processMod, consoleError);
|
|
2174
|
+
case 'p-attachment':
|
|
2175
|
+
return import(
|
|
2176
|
+
/* webpackMode: "lazy" */
|
|
2177
|
+
'./p-attachment.entry.js').then(processMod, consoleError);
|
|
2178
|
+
case 'p-avatar':
|
|
2179
|
+
return import(
|
|
2180
|
+
/* webpackMode: "lazy" */
|
|
2181
|
+
'./p-avatar.entry.js').then(processMod, consoleError);
|
|
2182
|
+
case 'p-avatar-group':
|
|
2183
|
+
return import(
|
|
2184
|
+
/* webpackMode: "lazy" */
|
|
2185
|
+
'./p-avatar-group.entry.js').then(processMod, consoleError);
|
|
2186
|
+
case 'p-card-body':
|
|
2187
|
+
return import(
|
|
2188
|
+
/* webpackMode: "lazy" */
|
|
2189
|
+
'./p-card-body.entry.js').then(processMod, consoleError);
|
|
2190
|
+
case 'p-card-container':
|
|
2191
|
+
return import(
|
|
2192
|
+
/* webpackMode: "lazy" */
|
|
2193
|
+
'./p-card-container.entry.js').then(processMod, consoleError);
|
|
2194
|
+
case 'p-card-header':
|
|
2195
|
+
return import(
|
|
2196
|
+
/* webpackMode: "lazy" */
|
|
2197
|
+
'./p-card-header.entry.js').then(processMod, consoleError);
|
|
2198
|
+
case 'p-content-slider':
|
|
2199
|
+
return import(
|
|
2200
|
+
/* webpackMode: "lazy" */
|
|
2201
|
+
'./p-content-slider.entry.js').then(processMod, consoleError);
|
|
2202
|
+
case 'p-datepicker':
|
|
2203
|
+
return import(
|
|
2204
|
+
/* webpackMode: "lazy" */
|
|
2205
|
+
'./p-datepicker.entry.js').then(processMod, consoleError);
|
|
2206
|
+
case 'p-drawer':
|
|
2207
|
+
return import(
|
|
2208
|
+
/* webpackMode: "lazy" */
|
|
2209
|
+
'./p-drawer.entry.js').then(processMod, consoleError);
|
|
2210
|
+
case 'p-info-panel':
|
|
2211
|
+
return import(
|
|
2212
|
+
/* webpackMode: "lazy" */
|
|
2213
|
+
'./p-info-panel.entry.js').then(processMod, consoleError);
|
|
2214
|
+
case 'p-layout':
|
|
2215
|
+
return import(
|
|
2216
|
+
/* webpackMode: "lazy" */
|
|
2217
|
+
'./p-layout.entry.js').then(processMod, consoleError);
|
|
2218
|
+
case 'p-modal':
|
|
2219
|
+
return import(
|
|
2220
|
+
/* webpackMode: "lazy" */
|
|
2221
|
+
'./p-modal.entry.js').then(processMod, consoleError);
|
|
2222
|
+
case 'p-navbar':
|
|
2223
|
+
return import(
|
|
2224
|
+
/* webpackMode: "lazy" */
|
|
2225
|
+
'./p-navbar.entry.js').then(processMod, consoleError);
|
|
2226
|
+
case 'p-navigation-item':
|
|
2227
|
+
return import(
|
|
2228
|
+
/* webpackMode: "lazy" */
|
|
2229
|
+
'./p-navigation-item.entry.js').then(processMod, consoleError);
|
|
2230
|
+
case 'p-profile':
|
|
2231
|
+
return import(
|
|
2232
|
+
/* webpackMode: "lazy" */
|
|
2233
|
+
'./p-profile.entry.js').then(processMod, consoleError);
|
|
2234
|
+
case 'p-select':
|
|
2235
|
+
return import(
|
|
2236
|
+
/* webpackMode: "lazy" */
|
|
2237
|
+
'./p-select.entry.js').then(processMod, consoleError);
|
|
2238
|
+
case 'p-status':
|
|
2239
|
+
return import(
|
|
2240
|
+
/* webpackMode: "lazy" */
|
|
2241
|
+
'./p-status.entry.js').then(processMod, consoleError);
|
|
2242
|
+
case 'p-stepper':
|
|
2243
|
+
return import(
|
|
2244
|
+
/* webpackMode: "lazy" */
|
|
2245
|
+
'./p-stepper.entry.js').then(processMod, consoleError);
|
|
2246
|
+
case 'p-tab-group':
|
|
2247
|
+
return import(
|
|
2248
|
+
/* webpackMode: "lazy" */
|
|
2249
|
+
'./p-tab-group.entry.js').then(processMod, consoleError);
|
|
2250
|
+
case 'p-tab-item':
|
|
2251
|
+
return import(
|
|
2252
|
+
/* webpackMode: "lazy" */
|
|
2253
|
+
'./p-tab-item.entry.js').then(processMod, consoleError);
|
|
2254
|
+
case 'p-table':
|
|
2255
|
+
return import(
|
|
2256
|
+
/* webpackMode: "lazy" */
|
|
2257
|
+
'./p-table.entry.js').then(processMod, consoleError);
|
|
2258
|
+
case 'p-table-column':
|
|
2259
|
+
return import(
|
|
2260
|
+
/* webpackMode: "lazy" */
|
|
2261
|
+
'./p-table-column.entry.js').then(processMod, consoleError);
|
|
2262
|
+
case 'p-toast':
|
|
2263
|
+
return import(
|
|
2264
|
+
/* webpackMode: "lazy" */
|
|
2265
|
+
'./p-toast.entry.js').then(processMod, consoleError);
|
|
2266
|
+
case 'p-toast-container':
|
|
2267
|
+
return import(
|
|
2268
|
+
/* webpackMode: "lazy" */
|
|
2269
|
+
'./p-toast-container.entry.js').then(processMod, consoleError);
|
|
2270
|
+
case 'p-calendar':
|
|
2271
|
+
return import(
|
|
2272
|
+
/* webpackMode: "lazy" */
|
|
2273
|
+
'./p-calendar.entry.js').then(processMod, consoleError);
|
|
2274
|
+
case 'p-counter':
|
|
2275
|
+
return import(
|
|
2276
|
+
/* webpackMode: "lazy" */
|
|
2277
|
+
'./p-counter.entry.js').then(processMod, consoleError);
|
|
2278
|
+
case 'p-drawer-body_3':
|
|
2279
|
+
return import(
|
|
2280
|
+
/* webpackMode: "lazy" */
|
|
2281
|
+
'./p-drawer-body_3.entry.js').then(processMod, consoleError);
|
|
2282
|
+
case 'p-illustration_6':
|
|
2283
|
+
return import(
|
|
2284
|
+
/* webpackMode: "lazy" */
|
|
2285
|
+
'./p-illustration_6.entry.js').then(processMod, consoleError);
|
|
2286
|
+
case 'p-modal-body_4':
|
|
2287
|
+
return import(
|
|
2288
|
+
/* webpackMode: "lazy" */
|
|
2289
|
+
'./p-modal-body_4.entry.js').then(processMod, consoleError);
|
|
2290
|
+
case 'p-slider-indicator':
|
|
2291
|
+
return import(
|
|
2292
|
+
/* webpackMode: "lazy" */
|
|
2293
|
+
'./p-slider-indicator.entry.js').then(processMod, consoleError);
|
|
2294
|
+
case 'p-stepper-item_2':
|
|
2295
|
+
return import(
|
|
2296
|
+
/* webpackMode: "lazy" */
|
|
2297
|
+
'./p-stepper-item_2.entry.js').then(processMod, consoleError);
|
|
2298
|
+
case 'p-label_3':
|
|
2299
|
+
return import(
|
|
2300
|
+
/* webpackMode: "lazy" */
|
|
2301
|
+
'./p-label_3.entry.js').then(processMod, consoleError);
|
|
2302
|
+
case 'p-page-size-select_3':
|
|
2303
|
+
return import(
|
|
2304
|
+
/* webpackMode: "lazy" */
|
|
2305
|
+
'./p-page-size-select_3.entry.js').then(processMod, consoleError);
|
|
2306
|
+
case 'p-backdrop':
|
|
2307
|
+
return import(
|
|
2308
|
+
/* webpackMode: "lazy" */
|
|
2309
|
+
'./p-backdrop.entry.js').then(processMod, consoleError);
|
|
2310
|
+
case 'p-dropdown_2':
|
|
2311
|
+
return import(
|
|
2312
|
+
/* webpackMode: "lazy" */
|
|
2313
|
+
'./p-dropdown_2.entry.js').then(processMod, consoleError);
|
|
2314
|
+
case 'p-helper_3':
|
|
2315
|
+
return import(
|
|
2316
|
+
/* webpackMode: "lazy" */
|
|
2317
|
+
'./p-helper_3.entry.js').then(processMod, consoleError);
|
|
2318
|
+
case 'p-divider':
|
|
2319
|
+
return import(
|
|
2320
|
+
/* webpackMode: "lazy" */
|
|
2321
|
+
'./p-divider.entry.js').then(processMod, consoleError);
|
|
2322
|
+
case 'p-dropdown-menu-container':
|
|
2323
|
+
return import(
|
|
2324
|
+
/* webpackMode: "lazy" */
|
|
2325
|
+
'./p-dropdown-menu-container.entry.js').then(processMod, consoleError);
|
|
2326
|
+
case 'p-tooltip':
|
|
2327
|
+
return import(
|
|
2328
|
+
/* webpackMode: "lazy" */
|
|
2329
|
+
'./p-tooltip.entry.js').then(processMod, consoleError);
|
|
2330
|
+
}
|
|
2331
|
+
}
|
|
1584
2332
|
return import(
|
|
1585
2333
|
/* @vite-ignore */
|
|
1586
2334
|
/* webpackInclude: /\.entry\.js$/ */
|
|
@@ -1593,14 +2341,38 @@ const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
1593
2341
|
return importedModule[exportName];
|
|
1594
2342
|
}, consoleError);
|
|
1595
2343
|
};
|
|
1596
|
-
const styles = new Map();
|
|
2344
|
+
const styles = /*@__PURE__*/ new Map();
|
|
2345
|
+
const win = typeof window !== 'undefined' ? window : {};
|
|
2346
|
+
const doc = win.document || { head: {} };
|
|
2347
|
+
const plt = {
|
|
2348
|
+
$flags$: 0,
|
|
2349
|
+
$resourcesUrl$: '',
|
|
2350
|
+
jmp: (h) => h(),
|
|
2351
|
+
raf: (h) => requestAnimationFrame(h),
|
|
2352
|
+
ael: (el, eventName, listener, opts) => el.addEventListener(eventName, listener, opts),
|
|
2353
|
+
rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),
|
|
2354
|
+
ce: (eventName, opts) => new CustomEvent(eventName, opts),
|
|
2355
|
+
};
|
|
2356
|
+
const supportsShadow =
|
|
2357
|
+
// TODO(STENCIL-662): Remove code related to deprecated shadowDomShim field
|
|
2358
|
+
true;
|
|
2359
|
+
const promiseResolve = (v) => Promise.resolve(v);
|
|
2360
|
+
const supportsConstructableStylesheets = /*@__PURE__*/ (() => {
|
|
2361
|
+
try {
|
|
2362
|
+
new CSSStyleSheet();
|
|
2363
|
+
return typeof new CSSStyleSheet().replaceSync === 'function';
|
|
2364
|
+
}
|
|
2365
|
+
catch (e) { }
|
|
2366
|
+
return false;
|
|
2367
|
+
})()
|
|
2368
|
+
;
|
|
1597
2369
|
const queueDomReads = [];
|
|
1598
2370
|
const queueDomWrites = [];
|
|
1599
2371
|
const queueTask = (queue, write) => (cb) => {
|
|
1600
2372
|
queue.push(cb);
|
|
1601
2373
|
if (!queuePending) {
|
|
1602
2374
|
queuePending = true;
|
|
1603
|
-
if (write && plt.$flags$ & 4 /* queueSync */) {
|
|
2375
|
+
if (write && plt.$flags$ & 4 /* PLATFORM_FLAGS.queueSync */) {
|
|
1604
2376
|
nextTick(flush);
|
|
1605
2377
|
}
|
|
1606
2378
|
else {
|
|
@@ -1637,4 +2409,6 @@ const flush = () => {
|
|
|
1637
2409
|
const nextTick = /*@__PURE__*/ (cb) => promiseResolve().then(cb);
|
|
1638
2410
|
const writeTask = /*@__PURE__*/ queueTask(queueDomWrites, true);
|
|
1639
2411
|
|
|
1640
|
-
export { Host as H, bootstrapLazy as b, createEvent as c, getElement as g, h, promiseResolve as p, registerInstance as r };
|
|
2412
|
+
export { Host as H, bootstrapLazy as b, createEvent as c, getElement as g, h, promiseResolve as p, registerInstance as r, setNonce as s };
|
|
2413
|
+
|
|
2414
|
+
//# sourceMappingURL=index-8a4a3f2a.js.map
|