@paperless/core 0.1.0-alpha.4 → 0.1.0-alpha.400
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 +4157 -0
- package/README.md +27 -2
- 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/checklist.svg +17 -0
- package/dist/assets/icons/filter.svg +6 -13
- package/dist/assets/icons/folder.svg +19 -0
- package/dist/assets/icons/integration.svg +17 -0
- 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/icons/task.svg +17 -0
- package/dist/assets/icons/template.svg +17 -0
- package/dist/assets/illustrations/e-mail.svg +1 -0
- package/dist/assets/illustrations/empty-state-add.svg +65 -0
- package/dist/assets/illustrations/empty-state-overview.svg +58 -0
- package/dist/assets/illustrations/empty-state-search.svg +88 -0
- package/dist/assets/images/avatar/company-default.svg +12 -0
- package/dist/assets/images/avatar/user-default.svg +12 -0
- package/dist/assets/images/helper/helper-hover.svg +15 -0
- package/dist/assets/images/helper/helper.svg +15 -0
- package/dist/build/index.esm.js +2 -0
- package/dist/build/index.esm.js.map +1 -0
- package/dist/build/p-01d3c545.entry.js +2 -0
- package/dist/build/p-01d3c545.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-0a3f2fe8.entry.js +2 -0
- package/dist/build/p-0a3f2fe8.entry.js.map +1 -0
- package/dist/build/p-0cb97c5e.entry.js +2 -0
- package/dist/build/p-0cb97c5e.entry.js.map +1 -0
- package/dist/build/p-18aadbd0.entry.js +2 -0
- package/dist/build/p-18aadbd0.entry.js.map +1 -0
- package/dist/build/p-1b5292a3.entry.js +2 -0
- package/dist/build/p-1b5292a3.entry.js.map +1 -0
- package/dist/build/p-1c793c3d.entry.js +2 -0
- package/dist/build/p-1c793c3d.entry.js.map +1 -0
- package/dist/build/p-24182b62.entry.js +2 -0
- package/dist/build/p-24182b62.entry.js.map +1 -0
- package/dist/build/p-2d74bc9b.entry.js +2 -0
- package/dist/build/p-2d74bc9b.entry.js.map +1 -0
- package/dist/build/p-3d8b5cc4.entry.js +2 -0
- package/dist/build/p-3d8b5cc4.entry.js.map +1 -0
- package/dist/build/p-45dfd940.entry.js +2 -0
- package/dist/build/p-45dfd940.entry.js.map +1 -0
- package/dist/build/p-464569dc.entry.js +2 -0
- package/dist/build/p-464569dc.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-4e66f19d.entry.js +2 -0
- package/dist/build/p-4e66f19d.entry.js.map +1 -0
- package/dist/build/p-5236b565.entry.js +2 -0
- package/dist/build/p-5236b565.entry.js.map +1 -0
- package/dist/build/p-57411b2b.entry.js +2 -0
- package/dist/build/p-57411b2b.entry.js.map +1 -0
- package/dist/build/p-58b52568.entry.js +2 -0
- package/dist/build/p-58b52568.entry.js.map +1 -0
- package/dist/build/p-5d118f66.entry.js +2 -0
- package/dist/build/p-5d118f66.entry.js.map +1 -0
- package/dist/build/p-5e6f0675.entry.js +2 -0
- package/dist/build/p-5e6f0675.entry.js.map +1 -0
- package/dist/build/p-63ed6e4b.entry.js +2 -0
- package/dist/build/p-63ed6e4b.entry.js.map +1 -0
- package/dist/build/p-63fb9af7.entry.js +2 -0
- package/dist/build/p-63fb9af7.entry.js.map +1 -0
- package/dist/build/p-6636d43c.entry.js +2 -0
- package/dist/build/p-6636d43c.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-73528e6b.entry.js +2 -0
- package/dist/build/p-73528e6b.entry.js.map +1 -0
- package/dist/build/p-78ce77d2.entry.js +2 -0
- package/dist/build/p-78ce77d2.entry.js.map +1 -0
- package/dist/build/p-7b94bc6a.entry.js +2 -0
- package/dist/build/p-7b94bc6a.entry.js.map +1 -0
- package/dist/build/p-85dc760d.entry.js +2 -0
- package/dist/build/p-85dc760d.entry.js.map +1 -0
- package/dist/build/p-89017d64.entry.js +2 -0
- package/dist/build/p-89017d64.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-93fb216c.entry.js +2 -0
- package/dist/build/p-93fb216c.entry.js.map +1 -0
- package/dist/build/p-a9ec7e54.entry.js +2 -0
- package/dist/build/p-a9ec7e54.entry.js.map +1 -0
- package/dist/build/p-ab749612.entry.js +2 -0
- package/dist/build/p-ab749612.entry.js.map +1 -0
- package/dist/build/p-ac1af618.js +3 -0
- package/dist/build/p-ac1af618.js.map +1 -0
- package/dist/build/p-ac7b48ff.entry.js +2 -0
- package/dist/build/p-ac7b48ff.entry.js.map +1 -0
- package/dist/build/p-aef8219f.entry.js +2 -0
- package/dist/build/p-aef8219f.entry.js.map +1 -0
- package/dist/build/p-b13a0ee4.entry.js +2 -0
- package/dist/build/p-b13a0ee4.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-b57850f5.entry.js +2 -0
- package/dist/build/p-b57850f5.entry.js.map +1 -0
- package/dist/build/p-b7b1de31.entry.js +2 -0
- package/dist/build/p-b7b1de31.entry.js.map +1 -0
- package/dist/build/p-c52020cc.entry.js +2 -0
- package/dist/build/p-c52020cc.entry.js.map +1 -0
- package/dist/build/p-c6ef7b79.entry.js +2 -0
- package/dist/build/p-c6ef7b79.entry.js.map +1 -0
- package/dist/build/p-d6fde0eb.entry.js +2 -0
- package/dist/build/p-d6fde0eb.entry.js.map +1 -0
- package/dist/build/p-dc01e9eb.entry.js +2 -0
- package/dist/build/p-dc01e9eb.entry.js.map +1 -0
- package/dist/build/p-e0d7a4ee.entry.js +2 -0
- package/dist/build/p-e0d7a4ee.entry.js.map +1 -0
- package/dist/build/p-ea824ef3.entry.js +2 -0
- package/dist/build/p-ea824ef3.entry.js.map +1 -0
- package/dist/build/p-ebc2ae62.entry.js +2 -0
- package/dist/build/p-ebc2ae62.entry.js.map +1 -0
- package/dist/build/p-f07793f6.entry.js +2 -0
- package/dist/build/p-f07793f6.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/p-f8c3fff9.entry.js +2 -0
- package/dist/build/p-f8c3fff9.entry.js.map +1 -0
- package/dist/build/paperless.css +1 -81
- 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-a2da05ae.js → index-13ea09e0.js} +1132 -265
- package/dist/cjs/index-13ea09e0.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 +39 -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 +45 -0
- package/dist/cjs/p-avatar.cjs.entry.js.map +1 -0
- package/dist/cjs/p-backdrop.cjs.entry.js +43 -0
- package/dist/cjs/p-backdrop.cjs.entry.js.map +1 -0
- package/dist/cjs/p-button_3.cjs.entry.js +342 -94
- 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 +23 -0
- package/dist/cjs/p-counter.cjs.entry.js.map +1 -0
- package/dist/cjs/p-datepicker.cjs.entry.js +4083 -0
- package/dist/cjs/p-datepicker.cjs.entry.js.map +1 -0
- package/dist/cjs/p-divider.cjs.entry.js +24 -0
- 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 +23 -0
- 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 +135 -0
- package/dist/cjs/p-helper_3.cjs.entry.js.map +1 -0
- package/dist/cjs/{p-illustration.cjs.entry.js → p-illustration_6.cjs.entry.js} +1377 -5
- package/dist/cjs/p-illustration_6.cjs.entry.js.map +1 -0
- package/dist/cjs/p-info-panel.cjs.entry.js +29 -0
- 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 +26 -0
- 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 +216 -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 +51 -0
- package/dist/cjs/p-status.cjs.entry.js.map +1 -0
- package/dist/cjs/p-stepper-item.cjs.entry.js +26 -0
- package/dist/cjs/p-stepper-item.cjs.entry.js.map +1 -0
- package/dist/cjs/p-stepper-line.cjs.entry.js +23 -0
- package/dist/cjs/p-stepper-line.cjs.entry.js.map +1 -0
- package/dist/cjs/p-stepper.cjs.entry.js +80 -0
- package/dist/cjs/p-stepper.cjs.entry.js.map +1 -0
- package/dist/cjs/p-tab-group.cjs.entry.js +20 -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 +352 -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 +70 -1816
- 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-d7a0f999.js +1803 -0
- package/dist/cjs/popper-d7a0f999.js.map +1 -0
- package/dist/collection/assets/icons/camera.svg +10 -0
- package/dist/collection/assets/icons/checklist.svg +17 -0
- package/dist/collection/assets/icons/filter.svg +6 -13
- package/dist/collection/assets/icons/folder.svg +19 -0
- package/dist/collection/assets/icons/integration.svg +17 -0
- 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/icons/task.svg +17 -0
- package/dist/collection/assets/icons/template.svg +17 -0
- package/dist/collection/assets/illustrations/e-mail.svg +1 -0
- package/dist/collection/assets/illustrations/empty-state-add.svg +65 -0
- package/dist/collection/assets/illustrations/empty-state-overview.svg +58 -0
- package/dist/collection/assets/illustrations/empty-state-search.svg +88 -0
- package/dist/collection/assets/images/avatar/company-default.svg +12 -0
- package/dist/collection/assets/images/avatar/user-default.svg +12 -0
- package/dist/collection/assets/images/helper/helper-hover.svg +15 -0
- package/dist/collection/assets/images/helper/helper.svg +15 -0
- package/dist/collection/collection-manifest.json +59 -3
- package/dist/collection/components/atoms/avatar/avatar.component.css +1 -0
- package/dist/collection/components/atoms/avatar/avatar.component.js +126 -0
- 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 -71
- package/dist/collection/components/atoms/button/button.component.js +311 -227
- 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 -0
- package/dist/collection/components/atoms/counter/counter.component.js +63 -0
- package/dist/collection/components/atoms/counter/counter.component.js.map +1 -0
- package/dist/collection/components/atoms/divider/divider.component.css +1 -0
- package/dist/collection/components/atoms/divider/divider.component.js +22 -0
- 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 -0
- package/dist/collection/components/atoms/dropdown-menu-container/dropdown-menu-container.component.js +62 -0
- 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 -0
- package/dist/collection/components/atoms/dropdown-menu-item/dropdown-menu-item.component.js +86 -0
- 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 -0
- package/dist/collection/components/atoms/helper/helper.component.js +49 -0
- 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 -96
- package/dist/collection/components/atoms/icon/icon.component.js.map +1 -0
- package/dist/collection/components/atoms/illustration/illustration.component.js +28 -28
- package/dist/collection/components/atoms/illustration/illustration.component.js.map +1 -0
- package/dist/collection/components/atoms/info-panel/info-panel.component.css +1 -0
- package/dist/collection/components/atoms/info-panel/info-panel.component.js +103 -0
- 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 +115 -115
- 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 -0
- package/dist/collection/components/atoms/pagination-item/pagination-item.component.js +44 -0
- 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 -0
- package/dist/collection/components/atoms/segment-container/segment-container.component.js +18 -0
- 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 -0
- package/dist/collection/components/atoms/segment-item/segment-item.component.js +119 -0
- 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 -0
- package/dist/collection/components/atoms/status/status.component.js +138 -0
- 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.js +9 -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 -34
- package/dist/collection/components/atoms/tooltip/tooltip.component.js +253 -122
- 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 +145 -0
- package/dist/collection/components/molecules/attachment/attachment.component.js.map +1 -0
- package/dist/collection/components/molecules/calendar/calendar.component.css +1 -0
- package/dist/collection/components/molecules/calendar/calendar.component.js +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 +507 -0
- package/dist/collection/components/molecules/datepicker/datepicker.component.js.map +1 -0
- package/dist/collection/components/molecules/dropdown/dropdown.component.css +1 -0
- package/dist/collection/components/molecules/dropdown/dropdown.component.js +373 -0
- 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 +370 -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 -0
- package/dist/collection/components/molecules/navigation-item/navigation-item.component.js +121 -0
- 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 -0
- package/dist/collection/components/molecules/pagination/pagination.component.js +267 -0
- 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 +675 -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 +141 -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 +452 -0
- package/dist/collection/components/molecules/table-header/table-header.component.js.map +1 -0
- package/dist/collection/components/molecules/table-row/table-row.component.css +1 -0
- package/dist/collection/components/molecules/table-row/table-row.component.js +65 -0
- package/dist/collection/components/molecules/table-row/table-row.component.js.map +1 -0
- package/dist/collection/components/molecules/toast/toast.component.css +1 -0
- package/dist/collection/components/molecules/toast/toast.component.js +197 -0
- package/dist/collection/components/molecules/toast/toast.component.js.map +1 -0
- package/dist/collection/components/organisms/drawer/drawer.component.css +1 -0
- package/dist/collection/components/organisms/drawer/drawer.component.js +234 -0
- package/dist/collection/components/organisms/drawer/drawer.component.js.map +1 -0
- package/dist/collection/components/organisms/modal/modal.component.js +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 +1292 -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 +9 -6
- package/dist/collection/tailwind/height.js +5 -0
- package/dist/collection/tailwind/plugins/safe-area.js +100 -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/typography.js +21 -0
- package/dist/collection/tailwind/width.js +20 -0
- package/dist/collection/tailwind/z-index.js +17 -0
- package/dist/collection/tailwind.config.js +33 -14
- 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 +6 -0
- package/dist/collection/utils/child-of.js.map +1 -0
- package/dist/collection/utils/icons.js +25 -0
- package/dist/collection/utils/icons.js.map +1 -0
- package/dist/collection/utils/illustrations.js +9 -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 +102 -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 +37 -0
- 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 +36 -0
- 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 +273 -23
- package/dist/components/icon.component.js.map +1 -0
- package/dist/{esm/p-illustration.entry.js → components/illustration.component.js} +245 -10
- package/dist/components/illustration.component.js.map +1 -0
- package/dist/components/index.d.ts +9 -8
- package/dist/components/index.js +13 -6
- 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 +156 -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 +14 -15
- 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 +88 -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.d.ts +11 -0
- package/dist/components/p-avatar.js +64 -0
- 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 -93
- 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.d.ts +11 -0
- package/dist/components/p-counter.js +8 -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 +4164 -0
- package/dist/components/p-datepicker.js.map +1 -0
- package/dist/components/p-divider.d.ts +11 -0
- package/dist/components/p-divider.js +8 -0
- package/dist/components/p-divider.js.map +1 -0
- package/dist/components/p-drawer-body.d.ts +11 -0
- package/dist/components/p-drawer-body.js +8 -0
- package/dist/components/p-drawer-body.js.map +1 -0
- package/dist/components/p-drawer-container.d.ts +11 -0
- package/dist/components/p-drawer-container.js +8 -0
- package/dist/components/p-drawer-container.js.map +1 -0
- package/dist/components/p-drawer-header.d.ts +11 -0
- package/dist/components/p-drawer-header.js +8 -0
- package/dist/components/p-drawer-header.js.map +1 -0
- package/dist/components/p-drawer.d.ts +11 -0
- package/dist/components/p-drawer.js +130 -0
- package/dist/components/p-drawer.js.map +1 -0
- package/dist/components/p-dropdown-menu-container.d.ts +11 -0
- package/dist/components/p-dropdown-menu-container.js +8 -0
- package/dist/components/p-dropdown-menu-container.js.map +1 -0
- package/dist/components/p-dropdown-menu-item.d.ts +11 -0
- package/dist/components/p-dropdown-menu-item.js +8 -0
- package/dist/components/p-dropdown-menu-item.js.map +1 -0
- package/dist/components/p-dropdown.d.ts +11 -0
- package/dist/components/p-dropdown.js +8 -0
- package/dist/components/p-dropdown.js.map +1 -0
- package/dist/components/p-helper.d.ts +11 -0
- package/dist/components/p-helper.js +8 -0
- package/dist/components/p-helper.js.map +1 -0
- package/dist/components/p-icon.js +2 -0
- package/dist/components/p-icon.js.map +1 -0
- package/dist/components/p-illustration.js +3 -1436
- package/dist/components/p-illustration.js.map +1 -0
- package/dist/components/p-info-panel.d.ts +11 -0
- package/dist/components/p-info-panel.js +54 -0
- 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.d.ts +11 -0
- package/dist/components/p-navigation-item.js +58 -0
- 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.d.ts +11 -0
- package/dist/components/p-pagination-item.js +8 -0
- package/dist/components/p-pagination-item.js.map +1 -0
- package/dist/components/p-pagination.d.ts +11 -0
- package/dist/components/p-pagination.js +8 -0
- 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.d.ts +11 -0
- package/dist/components/p-segment-container.js +8 -0
- package/dist/components/p-segment-container.js.map +1 -0
- package/dist/components/p-segment-item.d.ts +11 -0
- package/dist/components/p-segment-item.js +8 -0
- 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 +308 -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.d.ts +11 -0
- package/dist/components/p-status.js +75 -0
- 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 +52 -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 +104 -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 +38 -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 +544 -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 +3 -1886
- 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 +35 -0
- 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 +1801 -0
- 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-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 +1070 -0
- package/dist/components/table-header.component.js.map +1 -0
- package/dist/components/table-row.component.js +45 -0
- package/dist/components/table-row.component.js.map +1 -0
- package/dist/components/tooltip.component.js +145 -0
- 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-d08bfe75.js → index-94339e77.js} +1132 -266
- package/dist/esm/index-94339e77.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 +35 -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 +41 -0
- package/dist/esm/p-avatar.entry.js.map +1 -0
- package/dist/esm/p-backdrop.entry.js +39 -0
- package/dist/esm/p-backdrop.entry.js.map +1 -0
- package/dist/esm/p-button_3.entry.js +342 -94
- 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 +19 -0
- package/dist/esm/p-counter.entry.js.map +1 -0
- package/dist/esm/p-datepicker.entry.js +4079 -0
- package/dist/esm/p-datepicker.entry.js.map +1 -0
- package/dist/esm/p-divider.entry.js +20 -0
- 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 +19 -0
- 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 +129 -0
- package/dist/esm/p-helper_3.entry.js.map +1 -0
- package/dist/esm/p-illustration_6.entry.js +2789 -0
- package/dist/esm/p-illustration_6.entry.js.map +1 -0
- package/dist/esm/p-info-panel.entry.js +25 -0
- 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 +22 -0
- 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 +212 -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 +47 -0
- package/dist/esm/p-status.entry.js.map +1 -0
- package/dist/esm/p-stepper-item.entry.js +22 -0
- package/dist/esm/p-stepper-item.entry.js.map +1 -0
- package/dist/esm/p-stepper-line.entry.js +19 -0
- package/dist/esm/p-stepper-line.entry.js.map +1 -0
- package/dist/esm/p-stepper.entry.js +76 -0
- package/dist/esm/p-stepper.entry.js.map +1 -0
- package/dist/esm/p-tab-group.entry.js +16 -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 +348 -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 +70 -1816
- 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-42db9fbd.js +1801 -0
- 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-01d3c545.entry.js +2 -0
- package/dist/paperless/p-01d3c545.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-0a3f2fe8.entry.js +2 -0
- package/dist/paperless/p-0a3f2fe8.entry.js.map +1 -0
- package/dist/paperless/p-0cb97c5e.entry.js +2 -0
- package/dist/paperless/p-0cb97c5e.entry.js.map +1 -0
- package/dist/paperless/p-18aadbd0.entry.js +2 -0
- package/dist/paperless/p-18aadbd0.entry.js.map +1 -0
- package/dist/paperless/p-1b5292a3.entry.js +2 -0
- package/dist/paperless/p-1b5292a3.entry.js.map +1 -0
- package/dist/paperless/p-1c793c3d.entry.js +2 -0
- package/dist/paperless/p-1c793c3d.entry.js.map +1 -0
- package/dist/paperless/p-24182b62.entry.js +2 -0
- package/dist/paperless/p-24182b62.entry.js.map +1 -0
- package/dist/paperless/p-2d74bc9b.entry.js +2 -0
- package/dist/paperless/p-2d74bc9b.entry.js.map +1 -0
- package/dist/paperless/p-3d8b5cc4.entry.js +2 -0
- package/dist/paperless/p-3d8b5cc4.entry.js.map +1 -0
- package/dist/paperless/p-45dfd940.entry.js +2 -0
- package/dist/paperless/p-45dfd940.entry.js.map +1 -0
- package/dist/paperless/p-464569dc.entry.js +2 -0
- package/dist/paperless/p-464569dc.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-4e66f19d.entry.js +2 -0
- package/dist/paperless/p-4e66f19d.entry.js.map +1 -0
- package/dist/paperless/p-5236b565.entry.js +2 -0
- package/dist/paperless/p-5236b565.entry.js.map +1 -0
- package/dist/paperless/p-57411b2b.entry.js +2 -0
- package/dist/paperless/p-57411b2b.entry.js.map +1 -0
- package/dist/paperless/p-58b52568.entry.js +2 -0
- package/dist/paperless/p-58b52568.entry.js.map +1 -0
- package/dist/paperless/p-5d118f66.entry.js +2 -0
- package/dist/paperless/p-5d118f66.entry.js.map +1 -0
- package/dist/paperless/p-5e6f0675.entry.js +2 -0
- package/dist/paperless/p-5e6f0675.entry.js.map +1 -0
- package/dist/paperless/p-63ed6e4b.entry.js +2 -0
- package/dist/paperless/p-63ed6e4b.entry.js.map +1 -0
- package/dist/paperless/p-63fb9af7.entry.js +2 -0
- package/dist/paperless/p-63fb9af7.entry.js.map +1 -0
- package/dist/paperless/p-6636d43c.entry.js +2 -0
- package/dist/paperless/p-6636d43c.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-73528e6b.entry.js +2 -0
- package/dist/paperless/p-73528e6b.entry.js.map +1 -0
- package/dist/paperless/p-78ce77d2.entry.js +2 -0
- package/dist/paperless/p-78ce77d2.entry.js.map +1 -0
- package/dist/paperless/p-7b94bc6a.entry.js +2 -0
- package/dist/paperless/p-7b94bc6a.entry.js.map +1 -0
- package/dist/paperless/p-85dc760d.entry.js +2 -0
- package/dist/paperless/p-85dc760d.entry.js.map +1 -0
- package/dist/paperless/p-89017d64.entry.js +2 -0
- package/dist/paperless/p-89017d64.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-93fb216c.entry.js +2 -0
- package/dist/paperless/p-93fb216c.entry.js.map +1 -0
- package/dist/paperless/p-a9ec7e54.entry.js +2 -0
- package/dist/paperless/p-a9ec7e54.entry.js.map +1 -0
- package/dist/paperless/p-ab749612.entry.js +2 -0
- package/dist/paperless/p-ab749612.entry.js.map +1 -0
- package/dist/paperless/p-ac1af618.js +3 -0
- package/dist/paperless/p-ac1af618.js.map +1 -0
- package/dist/paperless/p-ac7b48ff.entry.js +2 -0
- package/dist/paperless/p-ac7b48ff.entry.js.map +1 -0
- package/dist/paperless/p-aef8219f.entry.js +2 -0
- package/dist/paperless/p-aef8219f.entry.js.map +1 -0
- package/dist/paperless/p-b13a0ee4.entry.js +2 -0
- package/dist/paperless/p-b13a0ee4.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-b57850f5.entry.js +2 -0
- package/dist/paperless/p-b57850f5.entry.js.map +1 -0
- package/dist/paperless/p-b7b1de31.entry.js +2 -0
- package/dist/paperless/p-b7b1de31.entry.js.map +1 -0
- package/dist/paperless/p-c52020cc.entry.js +2 -0
- package/dist/paperless/p-c52020cc.entry.js.map +1 -0
- package/dist/paperless/p-c6ef7b79.entry.js +2 -0
- package/dist/paperless/p-c6ef7b79.entry.js.map +1 -0
- package/dist/paperless/p-d6fde0eb.entry.js +2 -0
- package/dist/paperless/p-d6fde0eb.entry.js.map +1 -0
- package/dist/paperless/p-dc01e9eb.entry.js +2 -0
- package/dist/paperless/p-dc01e9eb.entry.js.map +1 -0
- package/dist/paperless/p-e0d7a4ee.entry.js +2 -0
- package/dist/paperless/p-e0d7a4ee.entry.js.map +1 -0
- package/dist/paperless/p-ea824ef3.entry.js +2 -0
- package/dist/paperless/p-ea824ef3.entry.js.map +1 -0
- package/dist/paperless/p-ebc2ae62.entry.js +2 -0
- package/dist/paperless/p-ebc2ae62.entry.js.map +1 -0
- package/dist/paperless/p-f07793f6.entry.js +2 -0
- package/dist/paperless/p-f07793f6.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/p-f8c3fff9.entry.js +2 -0
- package/dist/paperless/p-f8c3fff9.entry.js.map +1 -0
- package/dist/paperless/paperless.css +683 -26595
- 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 +30 -0
- package/dist/style/_tailwind.scss +3 -0
- package/dist/style/_typograhpy.scss +29 -0
- package/dist/style/_variables.scss +2 -0
- package/dist/style/form/_checkbox.scss +111 -0
- package/dist/style/form/_input.scss +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 -260
- 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/plugins/safe-area.js +100 -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 +20 -0
- package/dist/tailwind/z-index.js +17 -0
- package/dist/tailwind.config.js +33 -14
- package/dist/types/components/atoms/avatar/avatar.component.d.ts +23 -0
- 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 +20 -3
- 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 +11 -0
- package/dist/types/components/atoms/divider/divider.component.d.ts +7 -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 +11 -0
- package/dist/types/components/atoms/dropdown-menu-item/dropdown-menu-item.component.d.ts +16 -0
- package/dist/types/components/atoms/helper/helper.component.d.ts +8 -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/info-panel/info-panel.component.d.ts +24 -0
- 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/pagination-item/pagination-item.component.d.ts +7 -0
- package/dist/types/components/atoms/segment-container/segment-container.component.d.ts +3 -0
- package/dist/types/components/atoms/segment-item/segment-item.component.d.ts +22 -0
- package/dist/types/components/atoms/slider-indicator/slider-indicator.component.d.ts +7 -0
- package/dist/types/components/atoms/status/status.component.d.ts +23 -0
- 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 +30 -9
- 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 +28 -0
- package/dist/types/components/molecules/calendar/calendar.component.d.ts +76 -0
- package/dist/types/components/molecules/content-slider/content-slider.component.d.ts +53 -0
- package/dist/types/components/molecules/datepicker/datepicker.component.d.ts +93 -0
- package/dist/types/components/molecules/dropdown/dropdown.component.d.ts +69 -0
- 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 +68 -0
- package/dist/types/components/molecules/navigation-item/navigation-item.component.d.ts +24 -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 +35 -0
- package/dist/types/components/molecules/profile/profile.component.d.ts +20 -0
- package/dist/types/components/molecules/select/select.component.d.ts +134 -0
- package/dist/types/components/molecules/stepper/stepper.component.d.ts +21 -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 +101 -0
- package/dist/types/components/molecules/table-row/table-row.component.d.ts +11 -0
- package/dist/types/components/molecules/toast/toast.component.d.ts +39 -0
- package/dist/types/components/organisms/drawer/drawer.component.d.ts +52 -0
- package/dist/types/components/organisms/modal/modal.component.d.ts +58 -0
- package/dist/types/components/organisms/navbar/navbar.component.d.ts +14 -0
- package/dist/types/components/organisms/table/table.component.d.ts +240 -0
- package/dist/types/components.d.ts +3296 -118
- 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/child-of.d.ts +1 -0
- package/dist/types/utils/icons.d.ts +12 -0
- package/dist/types/utils/illustrations.d.ts +4 -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 +22695 -0
- package/hydrate/package.json +6 -0
- package/loader/index.d.ts +9 -0
- package/loader/package.json +1 -0
- package/package.json +67 -61
- package/dist/build/p-31acefc4.entry.js +0 -1
- package/dist/build/p-4144f8a0.entry.js +0 -1
- package/dist/build/p-f04c4de0.entry.js +0 -1
- package/dist/build/p-f33e1285.js +0 -2
- package/dist/collection/tailwind/grid.js +0 -6
- package/dist/collection/utils/utils.js +0 -3
- package/dist/paperless/p-31acefc4.entry.js +0 -1
- package/dist/paperless/p-4144f8a0.entry.js +0 -1
- package/dist/paperless/p-f04c4de0.entry.js +0 -1
- package/dist/paperless/p-f33e1285.js +0 -2
- 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,57 +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 = elm;
|
|
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
|
-
// prettier-ignore
|
|
60
|
-
const hostListenerOpts = (flags) => (flags & 2 /* Capture */) !== 0;
|
|
61
|
-
const HYDRATED_CSS = '{visibility:hidden}.hydrated{visibility:inherit}';
|
|
62
19
|
const createTime = (fnName, tagName = '') => {
|
|
63
20
|
{
|
|
64
21
|
return () => {
|
|
@@ -73,71 +30,14 @@ const uniqueTime = (key, measureText) => {
|
|
|
73
30
|
};
|
|
74
31
|
}
|
|
75
32
|
};
|
|
76
|
-
const
|
|
77
|
-
const
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
style = cssText;
|
|
85
|
-
}
|
|
86
|
-
styles.set(scopeId, style);
|
|
87
|
-
};
|
|
88
|
-
const addStyle = (styleContainerNode, cmpMeta, mode, hostElm) => {
|
|
89
|
-
let scopeId = getScopeId(cmpMeta);
|
|
90
|
-
const style = styles.get(scopeId);
|
|
91
|
-
// if an element is NOT connected then getRootNode() will return the wrong root node
|
|
92
|
-
// so the fallback is to always use the document for the root node in those cases
|
|
93
|
-
styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : doc;
|
|
94
|
-
if (style) {
|
|
95
|
-
if (typeof style === 'string') {
|
|
96
|
-
styleContainerNode = styleContainerNode.head || styleContainerNode;
|
|
97
|
-
let appliedStyles = rootAppliedStyles.get(styleContainerNode);
|
|
98
|
-
let styleElm;
|
|
99
|
-
if (!appliedStyles) {
|
|
100
|
-
rootAppliedStyles.set(styleContainerNode, (appliedStyles = new Set()));
|
|
101
|
-
}
|
|
102
|
-
if (!appliedStyles.has(scopeId)) {
|
|
103
|
-
{
|
|
104
|
-
{
|
|
105
|
-
styleElm = doc.createElement('style');
|
|
106
|
-
styleElm.innerHTML = style;
|
|
107
|
-
}
|
|
108
|
-
styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector('link'));
|
|
109
|
-
}
|
|
110
|
-
if (appliedStyles) {
|
|
111
|
-
appliedStyles.add(scopeId);
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
else if (!styleContainerNode.adoptedStyleSheets.includes(style)) {
|
|
116
|
-
styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
return scopeId;
|
|
120
|
-
};
|
|
121
|
-
const attachStyles = (hostRef) => {
|
|
122
|
-
const cmpMeta = hostRef.$cmpMeta$;
|
|
123
|
-
const elm = hostRef.$hostElement$;
|
|
124
|
-
const flags = cmpMeta.$flags$;
|
|
125
|
-
const endAttachStyles = createTime('attachStyles', cmpMeta.$tagName$);
|
|
126
|
-
const scopeId = addStyle(elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(), cmpMeta);
|
|
127
|
-
if (flags & 10 /* needsScopedEncapsulation */) {
|
|
128
|
-
// only required when we're NOT using native shadow dom (slot)
|
|
129
|
-
// or this browser doesn't support native shadow dom
|
|
130
|
-
// and this host element was NOT created with SSR
|
|
131
|
-
// let's pick out the inner content for slot projection
|
|
132
|
-
// create a node to represent where the original
|
|
133
|
-
// content was first placed, which is useful later on
|
|
134
|
-
// DOM WRITE!!
|
|
135
|
-
elm['s-sc'] = scopeId;
|
|
136
|
-
elm.classList.add(scopeId + '-h');
|
|
137
|
-
}
|
|
138
|
-
endAttachStyles();
|
|
139
|
-
};
|
|
140
|
-
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}';
|
|
141
41
|
/**
|
|
142
42
|
* Default style mode id
|
|
143
43
|
*/
|
|
@@ -147,11 +47,30 @@ const getScopeId = (cmp, mode) => 'sc-' + (cmp.$tagName$);
|
|
|
147
47
|
*/
|
|
148
48
|
const EMPTY_OBJ = {};
|
|
149
49
|
const isDef = (v) => v != null;
|
|
50
|
+
/**
|
|
51
|
+
* Check whether a value is a 'complex type', defined here as an object or a
|
|
52
|
+
* function.
|
|
53
|
+
*
|
|
54
|
+
* @param o the value to check
|
|
55
|
+
* @returns whether it's a complex type or not
|
|
56
|
+
*/
|
|
150
57
|
const isComplexType = (o) => {
|
|
151
58
|
// https://jsperf.com/typeof-fn-object/5
|
|
152
59
|
o = typeof o;
|
|
153
60
|
return o === 'object' || o === 'function';
|
|
154
61
|
};
|
|
62
|
+
/**
|
|
63
|
+
* Helper method for querying a `meta` tag that contains a nonce value
|
|
64
|
+
* out of a DOM's head.
|
|
65
|
+
*
|
|
66
|
+
* @param doc The DOM containing the `head` to query against
|
|
67
|
+
* @returns The content of the meta tag representing the nonce value, or `undefined` if no tag
|
|
68
|
+
* exists or the tag has no content.
|
|
69
|
+
*/
|
|
70
|
+
function queryNonceMetaTagContent(doc) {
|
|
71
|
+
var _a, _b, _c;
|
|
72
|
+
return (_c = (_b = (_a = doc.head) === null || _a === void 0 ? void 0 : _a.querySelector('meta[name="csp-nonce"]')) === null || _b === void 0 ? void 0 : _b.getAttribute('content')) !== null && _c !== void 0 ? _c : undefined;
|
|
73
|
+
}
|
|
155
74
|
/**
|
|
156
75
|
* Production h() function based on Preact by
|
|
157
76
|
* Jason Miller (@developit)
|
|
@@ -160,7 +79,6 @@ const isComplexType = (o) => {
|
|
|
160
79
|
*
|
|
161
80
|
* Modified for Stencil's compiler and vdom
|
|
162
81
|
*/
|
|
163
|
-
// const stack: any[] = [];
|
|
164
82
|
// export function h(nodeName: string | d.FunctionalComponent, vnodeData: d.PropsType, child?: d.ChildType): d.VNode;
|
|
165
83
|
// export function h(nodeName: string | d.FunctionalComponent, vnodeData: d.PropsType, ...children: d.ChildType[]): d.VNode;
|
|
166
84
|
const h = (nodeName, vnodeData, ...children) => {
|
|
@@ -222,6 +140,14 @@ const h = (nodeName, vnodeData, ...children) => {
|
|
|
222
140
|
}
|
|
223
141
|
return vnode;
|
|
224
142
|
};
|
|
143
|
+
/**
|
|
144
|
+
* A utility function for creating a virtual DOM node from a tag and some
|
|
145
|
+
* possible text content.
|
|
146
|
+
*
|
|
147
|
+
* @param tag the tag for this element
|
|
148
|
+
* @param text possible text content for the node
|
|
149
|
+
* @returns a newly-minted virtual DOM node
|
|
150
|
+
*/
|
|
225
151
|
const newVNode = (tag, text) => {
|
|
226
152
|
const vnode = {
|
|
227
153
|
$flags$: 0,
|
|
@@ -239,11 +165,31 @@ const newVNode = (tag, text) => {
|
|
|
239
165
|
return vnode;
|
|
240
166
|
};
|
|
241
167
|
const Host = {};
|
|
168
|
+
/**
|
|
169
|
+
* Check whether a given node is a Host node or not
|
|
170
|
+
*
|
|
171
|
+
* @param node the virtual DOM node to check
|
|
172
|
+
* @returns whether it's a Host node or not
|
|
173
|
+
*/
|
|
242
174
|
const isHost = (node) => node && node.$tag$ === Host;
|
|
175
|
+
/**
|
|
176
|
+
* Implementation of {@link d.FunctionalUtilities} for Stencil's VDom.
|
|
177
|
+
*
|
|
178
|
+
* Note that these functions convert from {@link d.VNode} to
|
|
179
|
+
* {@link d.ChildNode} to give functional component developers a friendly
|
|
180
|
+
* interface.
|
|
181
|
+
*/
|
|
243
182
|
const vdomFnUtils = {
|
|
244
183
|
forEach: (children, cb) => children.map(convertToPublic).forEach(cb),
|
|
245
184
|
map: (children, cb) => children.map(convertToPublic).map(cb).map(convertToPrivate),
|
|
246
185
|
};
|
|
186
|
+
/**
|
|
187
|
+
* Convert a {@link d.VNode} to a {@link d.ChildNode} in order to present a
|
|
188
|
+
* friendlier public interface (hence, 'convertToPublic').
|
|
189
|
+
*
|
|
190
|
+
* @param node the virtual DOM node to convert
|
|
191
|
+
* @returns a converted child node
|
|
192
|
+
*/
|
|
247
193
|
const convertToPublic = (node) => ({
|
|
248
194
|
vattrs: node.$attrs$,
|
|
249
195
|
vchildren: node.$children$,
|
|
@@ -252,24 +198,395 @@ const convertToPublic = (node) => ({
|
|
|
252
198
|
vtag: node.$tag$,
|
|
253
199
|
vtext: node.$text$,
|
|
254
200
|
});
|
|
201
|
+
/**
|
|
202
|
+
* Convert a {@link d.ChildNode} back to an equivalent {@link d.VNode} in
|
|
203
|
+
* order to use the resulting object in the virtual DOM. The initial object was
|
|
204
|
+
* likely created as part of presenting a public API, so converting it back
|
|
205
|
+
* involved making it 'private' again (hence, `convertToPrivate`).
|
|
206
|
+
*
|
|
207
|
+
* @param node the child node to convert
|
|
208
|
+
* @returns a converted virtual DOM node
|
|
209
|
+
*/
|
|
255
210
|
const convertToPrivate = (node) => {
|
|
256
211
|
if (typeof node.vtag === 'function') {
|
|
257
212
|
const vnodeData = Object.assign({}, node.vattrs);
|
|
258
213
|
if (node.vkey) {
|
|
259
214
|
vnodeData.key = node.vkey;
|
|
260
215
|
}
|
|
261
|
-
if (node.vname) {
|
|
262
|
-
vnodeData.name = node.vname;
|
|
216
|
+
if (node.vname) {
|
|
217
|
+
vnodeData.name = node.vname;
|
|
218
|
+
}
|
|
219
|
+
return h(node.vtag, vnodeData, ...(node.vchildren || []));
|
|
220
|
+
}
|
|
221
|
+
const vnode = newVNode(node.vtag, node.vtext);
|
|
222
|
+
vnode.$attrs$ = node.vattrs;
|
|
223
|
+
vnode.$children$ = node.vchildren;
|
|
224
|
+
vnode.$key$ = node.vkey;
|
|
225
|
+
vnode.$name$ = node.vname;
|
|
226
|
+
return vnode;
|
|
227
|
+
};
|
|
228
|
+
const initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
|
|
229
|
+
const endHydrate = createTime('hydrateClient', tagName);
|
|
230
|
+
const shadowRoot = hostElm.shadowRoot;
|
|
231
|
+
const childRenderNodes = [];
|
|
232
|
+
const slotNodes = [];
|
|
233
|
+
const shadowRootNodes = shadowRoot ? [] : null;
|
|
234
|
+
const vnode = (hostRef.$vnode$ = newVNode(tagName, null));
|
|
235
|
+
if (!plt.$orgLocNodes$) {
|
|
236
|
+
initializeDocumentHydrate(doc.body, (plt.$orgLocNodes$ = new Map()));
|
|
237
|
+
}
|
|
238
|
+
hostElm[HYDRATE_ID] = hostId;
|
|
239
|
+
hostElm.removeAttribute(HYDRATE_ID);
|
|
240
|
+
clientHydrate(vnode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, hostElm, hostId);
|
|
241
|
+
childRenderNodes.map((c) => {
|
|
242
|
+
const orgLocationId = c.$hostId$ + '.' + c.$nodeId$;
|
|
243
|
+
const orgLocationNode = plt.$orgLocNodes$.get(orgLocationId);
|
|
244
|
+
const node = c.$elm$;
|
|
245
|
+
if (orgLocationNode && supportsShadow && orgLocationNode['s-en'] === '') {
|
|
246
|
+
orgLocationNode.parentNode.insertBefore(node, orgLocationNode.nextSibling);
|
|
247
|
+
}
|
|
248
|
+
if (!shadowRoot) {
|
|
249
|
+
node['s-hn'] = tagName;
|
|
250
|
+
if (orgLocationNode) {
|
|
251
|
+
node['s-ol'] = orgLocationNode;
|
|
252
|
+
node['s-ol']['s-nr'] = node;
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
plt.$orgLocNodes$.delete(orgLocationId);
|
|
256
|
+
});
|
|
257
|
+
if (shadowRoot) {
|
|
258
|
+
shadowRootNodes.map((shadowRootNode) => {
|
|
259
|
+
if (shadowRootNode) {
|
|
260
|
+
shadowRoot.appendChild(shadowRootNode);
|
|
261
|
+
}
|
|
262
|
+
});
|
|
263
|
+
}
|
|
264
|
+
endHydrate();
|
|
265
|
+
};
|
|
266
|
+
const clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, node, hostId) => {
|
|
267
|
+
let childNodeType;
|
|
268
|
+
let childIdSplt;
|
|
269
|
+
let childVNode;
|
|
270
|
+
let i;
|
|
271
|
+
if (node.nodeType === 1 /* NODE_TYPE.ElementNode */) {
|
|
272
|
+
childNodeType = node.getAttribute(HYDRATE_CHILD_ID);
|
|
273
|
+
if (childNodeType) {
|
|
274
|
+
// got the node data from the element's attribute
|
|
275
|
+
// `${hostId}.${nodeId}.${depth}.${index}`
|
|
276
|
+
childIdSplt = childNodeType.split('.');
|
|
277
|
+
if (childIdSplt[0] === hostId || childIdSplt[0] === '0') {
|
|
278
|
+
childVNode = {
|
|
279
|
+
$flags$: 0,
|
|
280
|
+
$hostId$: childIdSplt[0],
|
|
281
|
+
$nodeId$: childIdSplt[1],
|
|
282
|
+
$depth$: childIdSplt[2],
|
|
283
|
+
$index$: childIdSplt[3],
|
|
284
|
+
$tag$: node.tagName.toLowerCase(),
|
|
285
|
+
$elm$: node,
|
|
286
|
+
$attrs$: null,
|
|
287
|
+
$children$: null,
|
|
288
|
+
$key$: null,
|
|
289
|
+
$name$: null,
|
|
290
|
+
$text$: null,
|
|
291
|
+
};
|
|
292
|
+
childRenderNodes.push(childVNode);
|
|
293
|
+
node.removeAttribute(HYDRATE_CHILD_ID);
|
|
294
|
+
// this is a new child vnode
|
|
295
|
+
// so ensure its parent vnode has the vchildren array
|
|
296
|
+
if (!parentVNode.$children$) {
|
|
297
|
+
parentVNode.$children$ = [];
|
|
298
|
+
}
|
|
299
|
+
// add our child vnode to a specific index of the vnode's children
|
|
300
|
+
parentVNode.$children$[childVNode.$index$] = childVNode;
|
|
301
|
+
// this is now the new parent vnode for all the next child checks
|
|
302
|
+
parentVNode = childVNode;
|
|
303
|
+
if (shadowRootNodes && childVNode.$depth$ === '0') {
|
|
304
|
+
shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
// recursively drill down, end to start so we can remove nodes
|
|
309
|
+
for (i = node.childNodes.length - 1; i >= 0; i--) {
|
|
310
|
+
clientHydrate(parentVNode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, node.childNodes[i], hostId);
|
|
311
|
+
}
|
|
312
|
+
if (node.shadowRoot) {
|
|
313
|
+
// keep drilling down through the shadow root nodes
|
|
314
|
+
for (i = node.shadowRoot.childNodes.length - 1; i >= 0; i--) {
|
|
315
|
+
clientHydrate(parentVNode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, node.shadowRoot.childNodes[i], hostId);
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
else if (node.nodeType === 8 /* NODE_TYPE.CommentNode */) {
|
|
320
|
+
// `${COMMENT_TYPE}.${hostId}.${nodeId}.${depth}.${index}`
|
|
321
|
+
childIdSplt = node.nodeValue.split('.');
|
|
322
|
+
if (childIdSplt[1] === hostId || childIdSplt[1] === '0') {
|
|
323
|
+
// comment node for either the host id or a 0 host id
|
|
324
|
+
childNodeType = childIdSplt[0];
|
|
325
|
+
childVNode = {
|
|
326
|
+
$flags$: 0,
|
|
327
|
+
$hostId$: childIdSplt[1],
|
|
328
|
+
$nodeId$: childIdSplt[2],
|
|
329
|
+
$depth$: childIdSplt[3],
|
|
330
|
+
$index$: childIdSplt[4],
|
|
331
|
+
$elm$: node,
|
|
332
|
+
$attrs$: null,
|
|
333
|
+
$children$: null,
|
|
334
|
+
$key$: null,
|
|
335
|
+
$name$: null,
|
|
336
|
+
$tag$: null,
|
|
337
|
+
$text$: null,
|
|
338
|
+
};
|
|
339
|
+
if (childNodeType === TEXT_NODE_ID) {
|
|
340
|
+
childVNode.$elm$ = node.nextSibling;
|
|
341
|
+
if (childVNode.$elm$ && childVNode.$elm$.nodeType === 3 /* NODE_TYPE.TextNode */) {
|
|
342
|
+
childVNode.$text$ = childVNode.$elm$.textContent;
|
|
343
|
+
childRenderNodes.push(childVNode);
|
|
344
|
+
// remove the text comment since it's no longer needed
|
|
345
|
+
node.remove();
|
|
346
|
+
if (!parentVNode.$children$) {
|
|
347
|
+
parentVNode.$children$ = [];
|
|
348
|
+
}
|
|
349
|
+
parentVNode.$children$[childVNode.$index$] = childVNode;
|
|
350
|
+
if (shadowRootNodes && childVNode.$depth$ === '0') {
|
|
351
|
+
shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
else if (childVNode.$hostId$ === hostId) {
|
|
356
|
+
// this comment node is specifcally for this host id
|
|
357
|
+
if (childNodeType === SLOT_NODE_ID) {
|
|
358
|
+
// `${SLOT_NODE_ID}.${hostId}.${nodeId}.${depth}.${index}.${slotName}`;
|
|
359
|
+
childVNode.$tag$ = 'slot';
|
|
360
|
+
if (childIdSplt[5]) {
|
|
361
|
+
node['s-sn'] = childVNode.$name$ = childIdSplt[5];
|
|
362
|
+
}
|
|
363
|
+
else {
|
|
364
|
+
node['s-sn'] = '';
|
|
365
|
+
}
|
|
366
|
+
node['s-sr'] = true;
|
|
367
|
+
if (shadowRootNodes) {
|
|
368
|
+
// browser support shadowRoot and this is a shadow dom component
|
|
369
|
+
// create an actual slot element
|
|
370
|
+
childVNode.$elm$ = doc.createElement(childVNode.$tag$);
|
|
371
|
+
if (childVNode.$name$) {
|
|
372
|
+
// add the slot name attribute
|
|
373
|
+
childVNode.$elm$.setAttribute('name', childVNode.$name$);
|
|
374
|
+
}
|
|
375
|
+
// insert the new slot element before the slot comment
|
|
376
|
+
node.parentNode.insertBefore(childVNode.$elm$, node);
|
|
377
|
+
// remove the slot comment since it's not needed for shadow
|
|
378
|
+
node.remove();
|
|
379
|
+
if (childVNode.$depth$ === '0') {
|
|
380
|
+
shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
slotNodes.push(childVNode);
|
|
384
|
+
if (!parentVNode.$children$) {
|
|
385
|
+
parentVNode.$children$ = [];
|
|
386
|
+
}
|
|
387
|
+
parentVNode.$children$[childVNode.$index$] = childVNode;
|
|
388
|
+
}
|
|
389
|
+
else if (childNodeType === CONTENT_REF_ID) {
|
|
390
|
+
// `${CONTENT_REF_ID}.${hostId}`;
|
|
391
|
+
if (shadowRootNodes) {
|
|
392
|
+
// remove the content ref comment since it's not needed for shadow
|
|
393
|
+
node.remove();
|
|
394
|
+
}
|
|
395
|
+
else {
|
|
396
|
+
hostElm['s-cr'] = node;
|
|
397
|
+
node['s-cn'] = true;
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
else if (parentVNode && parentVNode.$tag$ === 'style') {
|
|
404
|
+
const vnode = newVNode(null, node.textContent);
|
|
405
|
+
vnode.$elm$ = node;
|
|
406
|
+
vnode.$index$ = '0';
|
|
407
|
+
parentVNode.$children$ = [vnode];
|
|
408
|
+
}
|
|
409
|
+
};
|
|
410
|
+
const initializeDocumentHydrate = (node, orgLocNodes) => {
|
|
411
|
+
if (node.nodeType === 1 /* NODE_TYPE.ElementNode */) {
|
|
412
|
+
let i = 0;
|
|
413
|
+
for (; i < node.childNodes.length; i++) {
|
|
414
|
+
initializeDocumentHydrate(node.childNodes[i], orgLocNodes);
|
|
415
|
+
}
|
|
416
|
+
if (node.shadowRoot) {
|
|
417
|
+
for (i = 0; i < node.shadowRoot.childNodes.length; i++) {
|
|
418
|
+
initializeDocumentHydrate(node.shadowRoot.childNodes[i], orgLocNodes);
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
else if (node.nodeType === 8 /* NODE_TYPE.CommentNode */) {
|
|
423
|
+
const childIdSplt = node.nodeValue.split('.');
|
|
424
|
+
if (childIdSplt[0] === ORG_LOCATION_ID) {
|
|
425
|
+
orgLocNodes.set(childIdSplt[1] + '.' + childIdSplt[2], node);
|
|
426
|
+
node.nodeValue = '';
|
|
427
|
+
// useful to know if the original location is
|
|
428
|
+
// the root light-dom of a shadow dom component
|
|
429
|
+
node['s-en'] = childIdSplt[3];
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
};
|
|
433
|
+
/**
|
|
434
|
+
* Parse a new property value for a given property type.
|
|
435
|
+
*
|
|
436
|
+
* While the prop value can reasonably be expected to be of `any` type as far as TypeScript's type checker is concerned,
|
|
437
|
+
* it is not safe to assume that the string returned by evaluating `typeof propValue` matches:
|
|
438
|
+
* 1. `any`, the type given to `propValue` in the function signature
|
|
439
|
+
* 2. the type stored from `propType`.
|
|
440
|
+
*
|
|
441
|
+
* This function provides the capability to parse/coerce a property's value to potentially any other JavaScript type.
|
|
442
|
+
*
|
|
443
|
+
* Property values represented in TSX preserve their type information. In the example below, the number 0 is passed to
|
|
444
|
+
* a component. This `propValue` will preserve its type information (`typeof propValue === 'number'`). Note that is
|
|
445
|
+
* based on the type of the value being passed in, not the type declared of the class member decorated with `@Prop`.
|
|
446
|
+
* ```tsx
|
|
447
|
+
* <my-cmp prop-val={0}></my-cmp>
|
|
448
|
+
* ```
|
|
449
|
+
*
|
|
450
|
+
* HTML prop values on the other hand, will always a string
|
|
451
|
+
*
|
|
452
|
+
* @param propValue the new value to coerce to some type
|
|
453
|
+
* @param propType the type of the prop, expressed as a binary number
|
|
454
|
+
* @returns the parsed/coerced value
|
|
455
|
+
*/
|
|
456
|
+
const parsePropertyValue = (propValue, propType) => {
|
|
457
|
+
// ensure this value is of the correct prop type
|
|
458
|
+
if (propValue != null && !isComplexType(propValue)) {
|
|
459
|
+
if (propType & 4 /* MEMBER_FLAGS.Boolean */) {
|
|
460
|
+
// per the HTML spec, any string value means it is a boolean true value
|
|
461
|
+
// but we'll cheat here and say that the string "false" is the boolean false
|
|
462
|
+
return propValue === 'false' ? false : propValue === '' || !!propValue;
|
|
463
|
+
}
|
|
464
|
+
if (propType & 2 /* MEMBER_FLAGS.Number */) {
|
|
465
|
+
// force it to be a number
|
|
466
|
+
return parseFloat(propValue);
|
|
467
|
+
}
|
|
468
|
+
if (propType & 1 /* MEMBER_FLAGS.String */) {
|
|
469
|
+
// could have been passed as a number or boolean
|
|
470
|
+
// but we still want it as a string
|
|
471
|
+
return String(propValue);
|
|
472
|
+
}
|
|
473
|
+
// redundant return here for better minification
|
|
474
|
+
return propValue;
|
|
475
|
+
}
|
|
476
|
+
// not sure exactly what type we want
|
|
477
|
+
// so no need to change to a different type
|
|
478
|
+
return propValue;
|
|
479
|
+
};
|
|
480
|
+
const getElement = (ref) => (getHostRef(ref).$hostElement$ );
|
|
481
|
+
const createEvent = (ref, name, flags) => {
|
|
482
|
+
const elm = getElement(ref);
|
|
483
|
+
return {
|
|
484
|
+
emit: (detail) => {
|
|
485
|
+
return emitEvent(elm, name, {
|
|
486
|
+
bubbles: !!(flags & 4 /* EVENT_FLAGS.Bubbles */),
|
|
487
|
+
composed: !!(flags & 2 /* EVENT_FLAGS.Composed */),
|
|
488
|
+
cancelable: !!(flags & 1 /* EVENT_FLAGS.Cancellable */),
|
|
489
|
+
detail,
|
|
490
|
+
});
|
|
491
|
+
},
|
|
492
|
+
};
|
|
493
|
+
};
|
|
494
|
+
/**
|
|
495
|
+
* Helper function to create & dispatch a custom Event on a provided target
|
|
496
|
+
* @param elm the target of the Event
|
|
497
|
+
* @param name the name to give the custom Event
|
|
498
|
+
* @param opts options for configuring a custom Event
|
|
499
|
+
* @returns the custom Event
|
|
500
|
+
*/
|
|
501
|
+
const emitEvent = (elm, name, opts) => {
|
|
502
|
+
const ev = plt.ce(name, opts);
|
|
503
|
+
elm.dispatchEvent(ev);
|
|
504
|
+
return ev;
|
|
505
|
+
};
|
|
506
|
+
const rootAppliedStyles = /*@__PURE__*/ new WeakMap();
|
|
507
|
+
const registerStyle = (scopeId, cssText, allowCS) => {
|
|
508
|
+
let style = styles.get(scopeId);
|
|
509
|
+
if (supportsConstructableStylesheets && allowCS) {
|
|
510
|
+
style = (style || new CSSStyleSheet());
|
|
511
|
+
if (typeof style === 'string') {
|
|
512
|
+
style = cssText;
|
|
513
|
+
}
|
|
514
|
+
else {
|
|
515
|
+
style.replaceSync(cssText);
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
else {
|
|
519
|
+
style = cssText;
|
|
520
|
+
}
|
|
521
|
+
styles.set(scopeId, style);
|
|
522
|
+
};
|
|
523
|
+
const addStyle = (styleContainerNode, cmpMeta, mode, hostElm) => {
|
|
524
|
+
var _a;
|
|
525
|
+
let scopeId = getScopeId(cmpMeta);
|
|
526
|
+
const style = styles.get(scopeId);
|
|
527
|
+
// if an element is NOT connected then getRootNode() will return the wrong root node
|
|
528
|
+
// so the fallback is to always use the document for the root node in those cases
|
|
529
|
+
styleContainerNode = styleContainerNode.nodeType === 11 /* NODE_TYPE.DocumentFragment */ ? styleContainerNode : doc;
|
|
530
|
+
if (style) {
|
|
531
|
+
if (typeof style === 'string') {
|
|
532
|
+
styleContainerNode = styleContainerNode.head || styleContainerNode;
|
|
533
|
+
let appliedStyles = rootAppliedStyles.get(styleContainerNode);
|
|
534
|
+
let styleElm;
|
|
535
|
+
if (!appliedStyles) {
|
|
536
|
+
rootAppliedStyles.set(styleContainerNode, (appliedStyles = new Set()));
|
|
537
|
+
}
|
|
538
|
+
if (!appliedStyles.has(scopeId)) {
|
|
539
|
+
if (styleContainerNode.host &&
|
|
540
|
+
(styleElm = styleContainerNode.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId}"]`))) {
|
|
541
|
+
// This is only happening on native shadow-dom, do not needs CSS var shim
|
|
542
|
+
styleElm.innerHTML = style;
|
|
543
|
+
}
|
|
544
|
+
else {
|
|
545
|
+
// TODO(STENCIL-659): Remove code implementing the CSS variable shim
|
|
546
|
+
{
|
|
547
|
+
styleElm = doc.createElement('style');
|
|
548
|
+
styleElm.innerHTML = style;
|
|
549
|
+
}
|
|
550
|
+
// Apply CSP nonce to the style tag if it exists
|
|
551
|
+
const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);
|
|
552
|
+
if (nonce != null) {
|
|
553
|
+
styleElm.setAttribute('nonce', nonce);
|
|
554
|
+
}
|
|
555
|
+
styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector('link'));
|
|
556
|
+
}
|
|
557
|
+
if (appliedStyles) {
|
|
558
|
+
appliedStyles.add(scopeId);
|
|
559
|
+
}
|
|
560
|
+
}
|
|
561
|
+
}
|
|
562
|
+
else if (!styleContainerNode.adoptedStyleSheets.includes(style)) {
|
|
563
|
+
styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
|
|
263
564
|
}
|
|
264
|
-
return h(node.vtag, vnodeData, ...(node.vchildren || []));
|
|
265
565
|
}
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
566
|
+
return scopeId;
|
|
567
|
+
};
|
|
568
|
+
const attachStyles = (hostRef) => {
|
|
569
|
+
const cmpMeta = hostRef.$cmpMeta$;
|
|
570
|
+
const elm = hostRef.$hostElement$;
|
|
571
|
+
const flags = cmpMeta.$flags$;
|
|
572
|
+
const endAttachStyles = createTime('attachStyles', cmpMeta.$tagName$);
|
|
573
|
+
const scopeId = addStyle(elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(), cmpMeta);
|
|
574
|
+
// TODO(STENCIL-662): Remove code related to deprecated shadowDomShim field
|
|
575
|
+
if (flags & 10 /* CMP_FLAGS.needsScopedEncapsulation */) {
|
|
576
|
+
// only required when we're NOT using native shadow dom (slot)
|
|
577
|
+
// or this browser doesn't support native shadow dom
|
|
578
|
+
// and this host element was NOT created with SSR
|
|
579
|
+
// let's pick out the inner content for slot projection
|
|
580
|
+
// create a node to represent where the original
|
|
581
|
+
// content was first placed, which is useful later on
|
|
582
|
+
// DOM WRITE!!
|
|
583
|
+
elm['s-sc'] = scopeId;
|
|
584
|
+
elm.classList.add(scopeId + '-h');
|
|
585
|
+
}
|
|
586
|
+
endAttachStyles();
|
|
272
587
|
};
|
|
588
|
+
const getScopeId = (cmp, mode) => 'sc-' + (cmp.$tagName$);
|
|
589
|
+
const convertScopedToShadow = (css) => css.replace(/\/\*!@([^\/]+)\*\/[^\{]+\{/g, '$1{');
|
|
273
590
|
/**
|
|
274
591
|
* Production setAccessor() function based on Preact by
|
|
275
592
|
* Jason Miller (@developit)
|
|
@@ -281,7 +598,7 @@ const convertToPrivate = (node) => {
|
|
|
281
598
|
const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
282
599
|
if (oldValue !== newValue) {
|
|
283
600
|
let isProp = isMemberInElement(elm, memberName);
|
|
284
|
-
memberName.toLowerCase();
|
|
601
|
+
let ln = memberName.toLowerCase();
|
|
285
602
|
if (memberName === 'class') {
|
|
286
603
|
const classList = elm.classList;
|
|
287
604
|
const oldClasses = parseClassList(oldValue);
|
|
@@ -289,12 +606,76 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
289
606
|
classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
|
|
290
607
|
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
291
608
|
}
|
|
609
|
+
else if (memberName === 'style') {
|
|
610
|
+
// update style attribute, css properties and values
|
|
611
|
+
{
|
|
612
|
+
for (const prop in oldValue) {
|
|
613
|
+
if (!newValue || newValue[prop] == null) {
|
|
614
|
+
if (prop.includes('-')) {
|
|
615
|
+
elm.style.removeProperty(prop);
|
|
616
|
+
}
|
|
617
|
+
else {
|
|
618
|
+
elm.style[prop] = '';
|
|
619
|
+
}
|
|
620
|
+
}
|
|
621
|
+
}
|
|
622
|
+
}
|
|
623
|
+
for (const prop in newValue) {
|
|
624
|
+
if (!oldValue || newValue[prop] !== oldValue[prop]) {
|
|
625
|
+
if (prop.includes('-')) {
|
|
626
|
+
elm.style.setProperty(prop, newValue[prop]);
|
|
627
|
+
}
|
|
628
|
+
else {
|
|
629
|
+
elm.style[prop] = newValue[prop];
|
|
630
|
+
}
|
|
631
|
+
}
|
|
632
|
+
}
|
|
633
|
+
}
|
|
292
634
|
else if (memberName === 'ref') {
|
|
293
635
|
// minifier will clean this up
|
|
294
636
|
if (newValue) {
|
|
295
637
|
newValue(elm);
|
|
296
638
|
}
|
|
297
639
|
}
|
|
640
|
+
else if ((!isProp ) &&
|
|
641
|
+
memberName[0] === 'o' &&
|
|
642
|
+
memberName[1] === 'n') {
|
|
643
|
+
// Event Handlers
|
|
644
|
+
// so if the member name starts with "on" and the 3rd characters is
|
|
645
|
+
// a capital letter, and it's not already a member on the element,
|
|
646
|
+
// then we're assuming it's an event listener
|
|
647
|
+
if (memberName[2] === '-') {
|
|
648
|
+
// on- prefixed events
|
|
649
|
+
// allows to be explicit about the dom event to listen without any magic
|
|
650
|
+
// under the hood:
|
|
651
|
+
// <my-cmp on-click> // listens for "click"
|
|
652
|
+
// <my-cmp on-Click> // listens for "Click"
|
|
653
|
+
// <my-cmp on-ionChange> // listens for "ionChange"
|
|
654
|
+
// <my-cmp on-EVENTS> // listens for "EVENTS"
|
|
655
|
+
memberName = memberName.slice(3);
|
|
656
|
+
}
|
|
657
|
+
else if (isMemberInElement(win, ln)) {
|
|
658
|
+
// standard event
|
|
659
|
+
// the JSX attribute could have been "onMouseOver" and the
|
|
660
|
+
// member name "onmouseover" is on the window's prototype
|
|
661
|
+
// so let's add the listener "mouseover", which is all lowercased
|
|
662
|
+
memberName = ln.slice(2);
|
|
663
|
+
}
|
|
664
|
+
else {
|
|
665
|
+
// custom event
|
|
666
|
+
// the JSX attribute could have been "onMyCustomEvent"
|
|
667
|
+
// so let's trim off the "on" prefix and lowercase the first character
|
|
668
|
+
// and add the listener "myCustomEvent"
|
|
669
|
+
// except for the first character, we keep the event name case
|
|
670
|
+
memberName = ln[2] + memberName.slice(3);
|
|
671
|
+
}
|
|
672
|
+
if (oldValue) {
|
|
673
|
+
plt.rel(elm, memberName, oldValue, false);
|
|
674
|
+
}
|
|
675
|
+
if (newValue) {
|
|
676
|
+
plt.ael(elm, memberName, newValue, false);
|
|
677
|
+
}
|
|
678
|
+
}
|
|
298
679
|
else {
|
|
299
680
|
// Set property if it exists and it's not a SVG
|
|
300
681
|
const isComplex = isComplexType(newValue);
|
|
@@ -323,7 +704,7 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
323
704
|
}
|
|
324
705
|
}
|
|
325
706
|
}
|
|
326
|
-
else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex) {
|
|
707
|
+
else if ((!isProp || flags & 4 /* VNODE_FLAGS.isHost */ || isSvg) && !isComplex) {
|
|
327
708
|
newValue = newValue === true ? '' : newValue;
|
|
328
709
|
{
|
|
329
710
|
elm.setAttribute(memberName, newValue);
|
|
@@ -338,7 +719,7 @@ const updateElement = (oldVnode, newVnode, isSvgMode, memberName) => {
|
|
|
338
719
|
// if the element passed in is a shadow root, which is a document fragment
|
|
339
720
|
// then we want to be adding attrs/props to the shadow root's "host" element
|
|
340
721
|
// if it's not a shadow root, then we add attrs/props to the same element
|
|
341
|
-
const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host
|
|
722
|
+
const elm = newVnode.$elm$.nodeType === 11 /* NODE_TYPE.DocumentFragment */ && newVnode.$elm$.host
|
|
342
723
|
? newVnode.$elm$.host
|
|
343
724
|
: newVnode.$elm$;
|
|
344
725
|
const oldVnodeAttrs = (oldVnode && oldVnode.$attrs$) || EMPTY_OBJ;
|
|
@@ -356,6 +737,16 @@ const updateElement = (oldVnode, newVnode, isSvgMode, memberName) => {
|
|
|
356
737
|
setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName], isSvgMode, newVnode.$flags$);
|
|
357
738
|
}
|
|
358
739
|
};
|
|
740
|
+
/**
|
|
741
|
+
* Create a DOM Node corresponding to one of the children of a given VNode.
|
|
742
|
+
*
|
|
743
|
+
* @param oldParentVNode the parent VNode from the previous render
|
|
744
|
+
* @param newParentVNode the parent VNode from the current render
|
|
745
|
+
* @param childIndex the index of the VNode, in the _new_ parent node's
|
|
746
|
+
* children, for which we will create a new DOM node
|
|
747
|
+
* @param parentElm the parent DOM node which our new node will be a child of
|
|
748
|
+
* @returns the newly created node
|
|
749
|
+
*/
|
|
359
750
|
const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
360
751
|
// tslint:disable-next-line: prefer-const
|
|
361
752
|
const newVNode = newParentVNode.$children$[childIndex];
|
|
@@ -373,23 +764,23 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
373
764
|
}
|
|
374
765
|
newVNode.$flags$ |= newVNode.$children$
|
|
375
766
|
? // slot element has fallback content
|
|
376
|
-
2 /* isSlotFallback */
|
|
767
|
+
2 /* VNODE_FLAGS.isSlotFallback */
|
|
377
768
|
: // slot element does not have fallback content
|
|
378
|
-
1 /* isSlotReference */;
|
|
769
|
+
1 /* VNODE_FLAGS.isSlotReference */;
|
|
379
770
|
}
|
|
380
771
|
}
|
|
381
772
|
if (newVNode.$text$ !== null) {
|
|
382
773
|
// create text node
|
|
383
774
|
elm = newVNode.$elm$ = doc.createTextNode(newVNode.$text$);
|
|
384
775
|
}
|
|
385
|
-
else if (newVNode.$flags$ & 1 /* isSlotReference */) {
|
|
776
|
+
else if (newVNode.$flags$ & 1 /* VNODE_FLAGS.isSlotReference */) {
|
|
386
777
|
// create a slot reference node
|
|
387
778
|
elm = newVNode.$elm$ =
|
|
388
779
|
doc.createTextNode('');
|
|
389
780
|
}
|
|
390
781
|
else {
|
|
391
782
|
// create element
|
|
392
|
-
elm = newVNode.$elm$ = (doc.createElement(newVNode.$flags$ & 2 /* isSlotFallback */
|
|
783
|
+
elm = newVNode.$elm$ = (doc.createElement(newVNode.$flags$ & 2 /* VNODE_FLAGS.isSlotFallback */
|
|
393
784
|
? 'slot-fb'
|
|
394
785
|
: newVNode.$tag$));
|
|
395
786
|
// add css classes, attrs, props, listeners, etc.
|
|
@@ -415,7 +806,7 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
415
806
|
}
|
|
416
807
|
{
|
|
417
808
|
elm['s-hn'] = hostTagName;
|
|
418
|
-
if (newVNode.$flags$ & (2 /* isSlotFallback */ | 1 /* isSlotReference */)) {
|
|
809
|
+
if (newVNode.$flags$ & (2 /* VNODE_FLAGS.isSlotFallback */ | 1 /* VNODE_FLAGS.isSlotReference */)) {
|
|
419
810
|
// remember the content reference comment
|
|
420
811
|
elm['s-sr'] = true;
|
|
421
812
|
// remember the content reference comment
|
|
@@ -434,7 +825,7 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
434
825
|
return elm;
|
|
435
826
|
};
|
|
436
827
|
const putBackInOriginalLocation = (parentElm, recursive) => {
|
|
437
|
-
plt.$flags$ |= 1 /* isTmpDisconnected */;
|
|
828
|
+
plt.$flags$ |= 1 /* PLATFORM_FLAGS.isTmpDisconnected */;
|
|
438
829
|
const oldSlotChildNodes = parentElm.childNodes;
|
|
439
830
|
for (let i = oldSlotChildNodes.length - 1; i >= 0; i--) {
|
|
440
831
|
const childNode = oldSlotChildNodes[i];
|
|
@@ -455,8 +846,23 @@ const putBackInOriginalLocation = (parentElm, recursive) => {
|
|
|
455
846
|
putBackInOriginalLocation(childNode, recursive);
|
|
456
847
|
}
|
|
457
848
|
}
|
|
458
|
-
plt.$flags$ &= ~1 /* isTmpDisconnected */;
|
|
849
|
+
plt.$flags$ &= ~1 /* PLATFORM_FLAGS.isTmpDisconnected */;
|
|
459
850
|
};
|
|
851
|
+
/**
|
|
852
|
+
* Create DOM nodes corresponding to a list of {@link d.Vnode} objects and
|
|
853
|
+
* add them to the DOM in the appropriate place.
|
|
854
|
+
*
|
|
855
|
+
* @param parentElm the DOM node which should be used as a parent for the new
|
|
856
|
+
* DOM nodes
|
|
857
|
+
* @param before a child of the `parentElm` which the new children should be
|
|
858
|
+
* inserted before (optional)
|
|
859
|
+
* @param parentVNode the parent virtual DOM node
|
|
860
|
+
* @param vnodes the new child virtual DOM nodes to produce DOM nodes for
|
|
861
|
+
* @param startIdx the index in the child virtual DOM nodes at which to start
|
|
862
|
+
* creating DOM nodes (inclusive)
|
|
863
|
+
* @param endIdx the index in the child virtual DOM nodes at which to stop
|
|
864
|
+
* creating DOM nodes (inclusive)
|
|
865
|
+
*/
|
|
460
866
|
const addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
|
|
461
867
|
let containerElm = ((parentElm['s-cr'] && parentElm['s-cr'].parentNode) || parentElm);
|
|
462
868
|
let childNode;
|
|
@@ -473,6 +879,19 @@ const addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) =>
|
|
|
473
879
|
}
|
|
474
880
|
}
|
|
475
881
|
};
|
|
882
|
+
/**
|
|
883
|
+
* Remove the DOM elements corresponding to a list of {@link d.VNode} objects.
|
|
884
|
+
* This can be used to, for instance, clean up after a list of children which
|
|
885
|
+
* should no longer be shown.
|
|
886
|
+
*
|
|
887
|
+
* This function also handles some of Stencil's slot relocation logic.
|
|
888
|
+
*
|
|
889
|
+
* @param vnodes a list of virtual DOM nodes to remove
|
|
890
|
+
* @param startIdx the index at which to start removing nodes (inclusive)
|
|
891
|
+
* @param endIdx the index at which to stop removing nodes (inclusive)
|
|
892
|
+
* @param vnode a VNode
|
|
893
|
+
* @param elm an element
|
|
894
|
+
*/
|
|
476
895
|
const removeVnodes = (vnodes, startIdx, endIdx, vnode, elm) => {
|
|
477
896
|
for (; startIdx <= endIdx; ++startIdx) {
|
|
478
897
|
if ((vnode = vnodes[startIdx])) {
|
|
@@ -497,6 +916,74 @@ const removeVnodes = (vnodes, startIdx, endIdx, vnode, elm) => {
|
|
|
497
916
|
}
|
|
498
917
|
}
|
|
499
918
|
};
|
|
919
|
+
/**
|
|
920
|
+
* Reconcile the children of a new VNode with the children of an old VNode by
|
|
921
|
+
* traversing the two collections of children, identifying nodes that are
|
|
922
|
+
* conserved or changed, calling out to `patch` to make any necessary
|
|
923
|
+
* updates to the DOM, and rearranging DOM nodes as needed.
|
|
924
|
+
*
|
|
925
|
+
* The algorithm for reconciling children works by analyzing two 'windows' onto
|
|
926
|
+
* the two arrays of children (`oldCh` and `newCh`). We keep track of the
|
|
927
|
+
* 'windows' by storing start and end indices and references to the
|
|
928
|
+
* corresponding array entries. Initially the two 'windows' are basically equal
|
|
929
|
+
* to the entire array, but we progressively narrow the windows until there are
|
|
930
|
+
* no children left to update by doing the following:
|
|
931
|
+
*
|
|
932
|
+
* 1. Skip any `null` entries at the beginning or end of the two arrays, so
|
|
933
|
+
* that if we have an initial array like the following we'll end up dealing
|
|
934
|
+
* only with a window bounded by the highlighted elements:
|
|
935
|
+
*
|
|
936
|
+
* [null, null, VNode1 , ... , VNode2, null, null]
|
|
937
|
+
* ^^^^^^ ^^^^^^
|
|
938
|
+
*
|
|
939
|
+
* 2. Check to see if the elements at the head and tail positions are equal
|
|
940
|
+
* across the windows. This will basically detect elements which haven't
|
|
941
|
+
* been added, removed, or changed position, i.e. if you had the following
|
|
942
|
+
* VNode elements (represented as HTML):
|
|
943
|
+
*
|
|
944
|
+
* oldVNode: `<div><p><span>HEY</span></p></div>`
|
|
945
|
+
* newVNode: `<div><p><span>THERE</span></p></div>`
|
|
946
|
+
*
|
|
947
|
+
* Then when comparing the children of the `<div>` tag we check the equality
|
|
948
|
+
* of the VNodes corresponding to the `<p>` tags and, since they are the
|
|
949
|
+
* same tag in the same position, we'd be able to avoid completely
|
|
950
|
+
* re-rendering the subtree under them with a new DOM element and would just
|
|
951
|
+
* call out to `patch` to handle reconciling their children and so on.
|
|
952
|
+
*
|
|
953
|
+
* 3. Check, for both windows, to see if the element at the beginning of the
|
|
954
|
+
* window corresponds to the element at the end of the other window. This is
|
|
955
|
+
* a heuristic which will let us identify _some_ situations in which
|
|
956
|
+
* elements have changed position, for instance it _should_ detect that the
|
|
957
|
+
* children nodes themselves have not changed but merely moved in the
|
|
958
|
+
* following example:
|
|
959
|
+
*
|
|
960
|
+
* oldVNode: `<div><element-one /><element-two /></div>`
|
|
961
|
+
* newVNode: `<div><element-two /><element-one /></div>`
|
|
962
|
+
*
|
|
963
|
+
* If we find cases like this then we also need to move the concrete DOM
|
|
964
|
+
* elements corresponding to the moved children to write the re-order to the
|
|
965
|
+
* DOM.
|
|
966
|
+
*
|
|
967
|
+
* 4. Finally, if VNodes have the `key` attribute set on them we check for any
|
|
968
|
+
* nodes in the old children which have the same key as the first element in
|
|
969
|
+
* our window on the new children. If we find such a node we handle calling
|
|
970
|
+
* out to `patch`, moving relevant DOM nodes, and so on, in accordance with
|
|
971
|
+
* what we find.
|
|
972
|
+
*
|
|
973
|
+
* Finally, once we've narrowed our 'windows' to the point that either of them
|
|
974
|
+
* collapse (i.e. they have length 0) we then handle any remaining VNode
|
|
975
|
+
* insertion or deletion that needs to happen to get a DOM state that correctly
|
|
976
|
+
* reflects the new child VNodes. If, for instance, after our window on the old
|
|
977
|
+
* children has collapsed we still have more nodes on the new children that
|
|
978
|
+
* we haven't dealt with yet then we need to add them, or if the new children
|
|
979
|
+
* collapse but we still have unhandled _old_ children then we need to make
|
|
980
|
+
* sure the corresponding DOM nodes are removed.
|
|
981
|
+
*
|
|
982
|
+
* @param parentElm the node into which the parent VNode is rendered
|
|
983
|
+
* @param oldCh the old children of the parent node
|
|
984
|
+
* @param newVNode the new VNode which will replace the parent
|
|
985
|
+
* @param newCh the new children of the parent node
|
|
986
|
+
*/
|
|
500
987
|
const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
501
988
|
let oldStartIdx = 0;
|
|
502
989
|
let newStartIdx = 0;
|
|
@@ -509,7 +996,7 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
|
509
996
|
let node;
|
|
510
997
|
while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {
|
|
511
998
|
if (oldStartVnode == null) {
|
|
512
|
-
//
|
|
999
|
+
// VNode might have been moved left
|
|
513
1000
|
oldStartVnode = oldCh[++oldStartIdx];
|
|
514
1001
|
}
|
|
515
1002
|
else if (oldEndVnode == null) {
|
|
@@ -522,42 +1009,102 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
|
522
1009
|
newEndVnode = newCh[--newEndIdx];
|
|
523
1010
|
}
|
|
524
1011
|
else if (isSameVnode(oldStartVnode, newStartVnode)) {
|
|
1012
|
+
// if the start nodes are the same then we should patch the new VNode
|
|
1013
|
+
// onto the old one, and increment our `newStartIdx` and `oldStartIdx`
|
|
1014
|
+
// indices to reflect that. We don't need to move any DOM Nodes around
|
|
1015
|
+
// since things are matched up in order.
|
|
525
1016
|
patch(oldStartVnode, newStartVnode);
|
|
526
1017
|
oldStartVnode = oldCh[++oldStartIdx];
|
|
527
1018
|
newStartVnode = newCh[++newStartIdx];
|
|
528
1019
|
}
|
|
529
1020
|
else if (isSameVnode(oldEndVnode, newEndVnode)) {
|
|
1021
|
+
// likewise, if the end nodes are the same we patch new onto old and
|
|
1022
|
+
// decrement our end indices, and also likewise in this case we don't
|
|
1023
|
+
// need to move any DOM Nodes.
|
|
530
1024
|
patch(oldEndVnode, newEndVnode);
|
|
531
1025
|
oldEndVnode = oldCh[--oldEndIdx];
|
|
532
1026
|
newEndVnode = newCh[--newEndIdx];
|
|
533
1027
|
}
|
|
534
1028
|
else if (isSameVnode(oldStartVnode, newEndVnode)) {
|
|
535
|
-
// Vnode moved right
|
|
1029
|
+
// case: "Vnode moved right"
|
|
1030
|
+
//
|
|
1031
|
+
// We've found that the last node in our window on the new children is
|
|
1032
|
+
// the same VNode as the _first_ node in our window on the old children
|
|
1033
|
+
// we're dealing with now. Visually, this is the layout of these two
|
|
1034
|
+
// nodes:
|
|
1035
|
+
//
|
|
1036
|
+
// newCh: [..., newStartVnode , ... , newEndVnode , ...]
|
|
1037
|
+
// ^^^^^^^^^^^
|
|
1038
|
+
// oldCh: [..., oldStartVnode , ... , oldEndVnode , ...]
|
|
1039
|
+
// ^^^^^^^^^^^^^
|
|
1040
|
+
//
|
|
1041
|
+
// In this situation we need to patch `newEndVnode` onto `oldStartVnode`
|
|
1042
|
+
// and move the DOM element for `oldStartVnode`.
|
|
536
1043
|
if ((oldStartVnode.$tag$ === 'slot' || newEndVnode.$tag$ === 'slot')) {
|
|
537
1044
|
putBackInOriginalLocation(oldStartVnode.$elm$.parentNode, false);
|
|
538
1045
|
}
|
|
539
1046
|
patch(oldStartVnode, newEndVnode);
|
|
1047
|
+
// We need to move the element for `oldStartVnode` into a position which
|
|
1048
|
+
// will be appropriate for `newEndVnode`. For this we can use
|
|
1049
|
+
// `.insertBefore` and `oldEndVnode.$elm$.nextSibling`. If there is a
|
|
1050
|
+
// sibling for `oldEndVnode.$elm$` then we want to move the DOM node for
|
|
1051
|
+
// `oldStartVnode` between `oldEndVnode` and it's sibling, like so:
|
|
1052
|
+
//
|
|
1053
|
+
// <old-start-node />
|
|
1054
|
+
// <some-intervening-node />
|
|
1055
|
+
// <old-end-node />
|
|
1056
|
+
// <!-- -> <-- `oldStartVnode.$elm$` should be inserted here
|
|
1057
|
+
// <next-sibling />
|
|
1058
|
+
//
|
|
1059
|
+
// If instead `oldEndVnode.$elm$` has no sibling then we just want to put
|
|
1060
|
+
// the node for `oldStartVnode` at the end of the children of
|
|
1061
|
+
// `parentElm`. Luckily, `Node.nextSibling` will return `null` if there
|
|
1062
|
+
// aren't any siblings, and passing `null` to `Node.insertBefore` will
|
|
1063
|
+
// append it to the children of the parent element.
|
|
540
1064
|
parentElm.insertBefore(oldStartVnode.$elm$, oldEndVnode.$elm$.nextSibling);
|
|
541
1065
|
oldStartVnode = oldCh[++oldStartIdx];
|
|
542
1066
|
newEndVnode = newCh[--newEndIdx];
|
|
543
1067
|
}
|
|
544
1068
|
else if (isSameVnode(oldEndVnode, newStartVnode)) {
|
|
545
|
-
// Vnode moved left
|
|
1069
|
+
// case: "Vnode moved left"
|
|
1070
|
+
//
|
|
1071
|
+
// We've found that the first node in our window on the new children is
|
|
1072
|
+
// the same VNode as the _last_ node in our window on the old children.
|
|
1073
|
+
// Visually, this is the layout of these two nodes:
|
|
1074
|
+
//
|
|
1075
|
+
// newCh: [..., newStartVnode , ... , newEndVnode , ...]
|
|
1076
|
+
// ^^^^^^^^^^^^^
|
|
1077
|
+
// oldCh: [..., oldStartVnode , ... , oldEndVnode , ...]
|
|
1078
|
+
// ^^^^^^^^^^^
|
|
1079
|
+
//
|
|
1080
|
+
// In this situation we need to patch `newStartVnode` onto `oldEndVnode`
|
|
1081
|
+
// (which will handle updating any changed attributes, reconciling their
|
|
1082
|
+
// children etc) but we also need to move the DOM node to which
|
|
1083
|
+
// `oldEndVnode` corresponds.
|
|
546
1084
|
if ((oldStartVnode.$tag$ === 'slot' || newEndVnode.$tag$ === 'slot')) {
|
|
547
1085
|
putBackInOriginalLocation(oldEndVnode.$elm$.parentNode, false);
|
|
548
1086
|
}
|
|
549
1087
|
patch(oldEndVnode, newStartVnode);
|
|
1088
|
+
// We've already checked above if `oldStartVnode` and `newStartVnode` are
|
|
1089
|
+
// the same node, so since we're here we know that they are not. Thus we
|
|
1090
|
+
// can move the element for `oldEndVnode` _before_ the element for
|
|
1091
|
+
// `oldStartVnode`, leaving `oldStartVnode` to be reconciled in the
|
|
1092
|
+
// future.
|
|
550
1093
|
parentElm.insertBefore(oldEndVnode.$elm$, oldStartVnode.$elm$);
|
|
551
1094
|
oldEndVnode = oldCh[--oldEndIdx];
|
|
552
1095
|
newStartVnode = newCh[++newStartIdx];
|
|
553
1096
|
}
|
|
554
1097
|
else {
|
|
555
1098
|
{
|
|
556
|
-
//
|
|
1099
|
+
// We either didn't find an element in the old children that matches
|
|
1100
|
+
// the key of the first new child OR the build is not using `key`
|
|
1101
|
+
// attributes at all. In either case we need to create a new element
|
|
1102
|
+
// for the new node.
|
|
557
1103
|
node = createElm(oldCh && oldCh[newStartIdx], newVNode, newStartIdx, parentElm);
|
|
558
1104
|
newStartVnode = newCh[++newStartIdx];
|
|
559
1105
|
}
|
|
560
1106
|
if (node) {
|
|
1107
|
+
// if we created a new node then handle inserting it to the DOM
|
|
561
1108
|
{
|
|
562
1109
|
parentReferenceNode(oldStartVnode.$elm$).insertBefore(node, referenceNode(oldStartVnode.$elm$));
|
|
563
1110
|
}
|
|
@@ -565,18 +1112,40 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
|
565
1112
|
}
|
|
566
1113
|
}
|
|
567
1114
|
if (oldStartIdx > oldEndIdx) {
|
|
1115
|
+
// we have some more new nodes to add which don't match up with old nodes
|
|
568
1116
|
addVnodes(parentElm, newCh[newEndIdx + 1] == null ? null : newCh[newEndIdx + 1].$elm$, newVNode, newCh, newStartIdx, newEndIdx);
|
|
569
1117
|
}
|
|
570
1118
|
else if (newStartIdx > newEndIdx) {
|
|
1119
|
+
// there are nodes in the `oldCh` array which no longer correspond to nodes
|
|
1120
|
+
// in the new array, so lets remove them (which entails cleaning up the
|
|
1121
|
+
// relevant DOM nodes)
|
|
571
1122
|
removeVnodes(oldCh, oldStartIdx, oldEndIdx);
|
|
572
1123
|
}
|
|
573
1124
|
};
|
|
574
|
-
|
|
1125
|
+
/**
|
|
1126
|
+
* Compare two VNodes to determine if they are the same
|
|
1127
|
+
*
|
|
1128
|
+
* **NB**: This function is an equality _heuristic_ based on the available
|
|
1129
|
+
* information set on the two VNodes and can be misleading under certain
|
|
1130
|
+
* circumstances. In particular, if the two nodes do not have `key` attrs
|
|
1131
|
+
* (available under `$key$` on VNodes) then the function falls back on merely
|
|
1132
|
+
* checking that they have the same tag.
|
|
1133
|
+
*
|
|
1134
|
+
* So, in other words, if `key` attrs are not set on VNodes which may be
|
|
1135
|
+
* changing order within a `children` array or something along those lines then
|
|
1136
|
+
* we could obtain a false negative and then have to do needless re-rendering
|
|
1137
|
+
* (i.e. we'd say two VNodes aren't equal when in fact they should be).
|
|
1138
|
+
*
|
|
1139
|
+
* @param leftVNode the first VNode to check
|
|
1140
|
+
* @param rightVNode the second VNode to check
|
|
1141
|
+
* @returns whether they're equal or not
|
|
1142
|
+
*/
|
|
1143
|
+
const isSameVnode = (leftVNode, rightVNode) => {
|
|
575
1144
|
// compare if two vnode to see if they're "technically" the same
|
|
576
1145
|
// need to have the same element tag, and same key to be the same
|
|
577
|
-
if (
|
|
578
|
-
if (
|
|
579
|
-
return
|
|
1146
|
+
if (leftVNode.$tag$ === rightVNode.$tag$) {
|
|
1147
|
+
if (leftVNode.$tag$ === 'slot') {
|
|
1148
|
+
return leftVNode.$name$ === rightVNode.$name$;
|
|
580
1149
|
}
|
|
581
1150
|
return true;
|
|
582
1151
|
}
|
|
@@ -590,6 +1159,14 @@ const referenceNode = (node) => {
|
|
|
590
1159
|
return (node && node['s-ol']) || node;
|
|
591
1160
|
};
|
|
592
1161
|
const parentReferenceNode = (node) => (node['s-ol'] ? node['s-ol'] : node).parentNode;
|
|
1162
|
+
/**
|
|
1163
|
+
* Handle reconciling an outdated VNode with a new one which corresponds to
|
|
1164
|
+
* it. This function handles flushing updates to the DOM and reconciling the
|
|
1165
|
+
* children of the two nodes (if any).
|
|
1166
|
+
*
|
|
1167
|
+
* @param oldVNode an old VNode whose DOM element and children we want to update
|
|
1168
|
+
* @param newVNode a new VNode representing an updated version of the old one
|
|
1169
|
+
*/
|
|
593
1170
|
const patch = (oldVNode, newVNode) => {
|
|
594
1171
|
const elm = (newVNode.$elm$ = oldVNode.$elm$);
|
|
595
1172
|
const oldChildren = oldVNode.$children$;
|
|
@@ -598,7 +1175,6 @@ const patch = (oldVNode, newVNode) => {
|
|
|
598
1175
|
const text = newVNode.$text$;
|
|
599
1176
|
let defaultHolder;
|
|
600
1177
|
if (text === null) {
|
|
601
|
-
// element node
|
|
602
1178
|
{
|
|
603
1179
|
if (tag === 'slot')
|
|
604
1180
|
;
|
|
@@ -611,6 +1187,7 @@ const patch = (oldVNode, newVNode) => {
|
|
|
611
1187
|
}
|
|
612
1188
|
if (oldChildren !== null && newChildren !== null) {
|
|
613
1189
|
// looks like there's child vnodes for both the old and new vnodes
|
|
1190
|
+
// so we need to call `updateChildren` to reconcile them
|
|
614
1191
|
updateChildren(elm, oldChildren, newVNode, newChildren);
|
|
615
1192
|
}
|
|
616
1193
|
else if (newChildren !== null) {
|
|
@@ -648,7 +1225,7 @@ const updateFallbackSlotVisibility = (elm) => {
|
|
|
648
1225
|
let nodeType;
|
|
649
1226
|
for (i = 0, ilen = childNodes.length; i < ilen; i++) {
|
|
650
1227
|
childNode = childNodes[i];
|
|
651
|
-
if (childNode.nodeType === 1 /* ElementNode */) {
|
|
1228
|
+
if (childNode.nodeType === 1 /* NODE_TYPE.ElementNode */) {
|
|
652
1229
|
if (childNode['s-sr']) {
|
|
653
1230
|
// this is a slot fallback node
|
|
654
1231
|
// get the slot name for this slot reference node
|
|
@@ -660,7 +1237,7 @@ const updateFallbackSlotVisibility = (elm) => {
|
|
|
660
1237
|
nodeType = childNodes[j].nodeType;
|
|
661
1238
|
if (childNodes[j]['s-hn'] !== childNode['s-hn'] || slotNameAttr !== '') {
|
|
662
1239
|
// this sibling node is from a different component OR is a named fallback slot node
|
|
663
|
-
if (nodeType === 1 /* ElementNode */ && slotNameAttr === childNodes[j].getAttribute('slot')) {
|
|
1240
|
+
if (nodeType === 1 /* NODE_TYPE.ElementNode */ && slotNameAttr === childNodes[j].getAttribute('slot')) {
|
|
664
1241
|
childNode.hidden = true;
|
|
665
1242
|
break;
|
|
666
1243
|
}
|
|
@@ -669,8 +1246,8 @@ const updateFallbackSlotVisibility = (elm) => {
|
|
|
669
1246
|
// this is a default fallback slot node
|
|
670
1247
|
// any element or text node (with content)
|
|
671
1248
|
// should hide the default fallback slot node
|
|
672
|
-
if (nodeType === 1 /* ElementNode */ ||
|
|
673
|
-
(nodeType === 3 /* TextNode */ && childNodes[j].textContent.trim() !== '')) {
|
|
1249
|
+
if (nodeType === 1 /* NODE_TYPE.ElementNode */ ||
|
|
1250
|
+
(nodeType === 3 /* NODE_TYPE.TextNode */ && childNodes[j].textContent.trim() !== '')) {
|
|
674
1251
|
childNode.hidden = true;
|
|
675
1252
|
break;
|
|
676
1253
|
}
|
|
@@ -748,13 +1325,13 @@ const relocateSlotContent = (elm) => {
|
|
|
748
1325
|
}
|
|
749
1326
|
}
|
|
750
1327
|
}
|
|
751
|
-
if (childNode.nodeType === 1 /* ElementNode */) {
|
|
1328
|
+
if (childNode.nodeType === 1 /* NODE_TYPE.ElementNode */) {
|
|
752
1329
|
relocateSlotContent(childNode);
|
|
753
1330
|
}
|
|
754
1331
|
}
|
|
755
1332
|
};
|
|
756
1333
|
const isNodeLocatedInSlot = (nodeToRelocate, slotNameAttr) => {
|
|
757
|
-
if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
|
1334
|
+
if (nodeToRelocate.nodeType === 1 /* NODE_TYPE.ElementNode */) {
|
|
758
1335
|
if (nodeToRelocate.getAttribute('slot') === null && slotNameAttr === '') {
|
|
759
1336
|
return true;
|
|
760
1337
|
}
|
|
@@ -774,14 +1351,30 @@ const callNodeRefs = (vNode) => {
|
|
|
774
1351
|
vNode.$children$ && vNode.$children$.map(callNodeRefs);
|
|
775
1352
|
}
|
|
776
1353
|
};
|
|
1354
|
+
/**
|
|
1355
|
+
* The main entry point for Stencil's virtual DOM-based rendering engine
|
|
1356
|
+
*
|
|
1357
|
+
* Given a {@link d.HostRef} container and some virtual DOM nodes, this
|
|
1358
|
+
* function will handle creating a virtual DOM tree with a single root, patching
|
|
1359
|
+
* the current virtual DOM tree onto an old one (if any), dealing with slot
|
|
1360
|
+
* relocation, and reflecting attributes.
|
|
1361
|
+
*
|
|
1362
|
+
* @param hostRef data needed to root and render the virtual DOM tree, such as
|
|
1363
|
+
* the DOM node into which it should be rendered.
|
|
1364
|
+
* @param renderFnResults the virtual DOM nodes to be rendered
|
|
1365
|
+
*/
|
|
777
1366
|
const renderVdom = (hostRef, renderFnResults) => {
|
|
778
1367
|
const hostElm = hostRef.$hostElement$;
|
|
779
1368
|
const cmpMeta = hostRef.$cmpMeta$;
|
|
780
1369
|
const oldVNode = hostRef.$vnode$ || newVNode(null, null);
|
|
781
1370
|
const rootVnode = isHost(renderFnResults) ? renderFnResults : h(null, null, renderFnResults);
|
|
782
1371
|
hostTagName = hostElm.tagName;
|
|
1372
|
+
if (cmpMeta.$attrsToReflect$) {
|
|
1373
|
+
rootVnode.$attrs$ = rootVnode.$attrs$ || {};
|
|
1374
|
+
cmpMeta.$attrsToReflect$.map(([propName, attribute]) => (rootVnode.$attrs$[attribute] = hostElm[propName]));
|
|
1375
|
+
}
|
|
783
1376
|
rootVnode.$tag$ = null;
|
|
784
|
-
rootVnode.$flags$ |= 4 /* isHost */;
|
|
1377
|
+
rootVnode.$flags$ |= 4 /* VNODE_FLAGS.isHost */;
|
|
785
1378
|
hostRef.$vnode$ = rootVnode;
|
|
786
1379
|
rootVnode.$elm$ = oldVNode.$elm$ = (hostElm.shadowRoot || hostElm );
|
|
787
1380
|
{
|
|
@@ -789,7 +1382,7 @@ const renderVdom = (hostRef, renderFnResults) => {
|
|
|
789
1382
|
}
|
|
790
1383
|
{
|
|
791
1384
|
contentRef = hostElm['s-cr'];
|
|
792
|
-
useNativeShadowDom = (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) !== 0;
|
|
1385
|
+
useNativeShadowDom = (cmpMeta.$flags$ & 1 /* CMP_FLAGS.shadowDomEncapsulation */) !== 0;
|
|
793
1386
|
// always reset
|
|
794
1387
|
checkSlotFallbackVisibility = false;
|
|
795
1388
|
}
|
|
@@ -798,7 +1391,7 @@ const renderVdom = (hostRef, renderFnResults) => {
|
|
|
798
1391
|
{
|
|
799
1392
|
// while we're moving nodes around existing nodes, temporarily disable
|
|
800
1393
|
// the disconnectCallback from working
|
|
801
|
-
plt.$flags$ |= 1 /* isTmpDisconnected */;
|
|
1394
|
+
plt.$flags$ |= 1 /* PLATFORM_FLAGS.isTmpDisconnected */;
|
|
802
1395
|
if (checkSlotRelocate) {
|
|
803
1396
|
relocateSlotContent(rootVnode.$elm$);
|
|
804
1397
|
let relocateData;
|
|
@@ -856,7 +1449,7 @@ const renderVdom = (hostRef, renderFnResults) => {
|
|
|
856
1449
|
}
|
|
857
1450
|
else {
|
|
858
1451
|
// this node doesn't have a slot home to go to, so let's hide it
|
|
859
|
-
if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
|
1452
|
+
if (nodeToRelocate.nodeType === 1 /* NODE_TYPE.ElementNode */) {
|
|
860
1453
|
nodeToRelocate.hidden = true;
|
|
861
1454
|
}
|
|
862
1455
|
}
|
|
@@ -867,37 +1460,11 @@ const renderVdom = (hostRef, renderFnResults) => {
|
|
|
867
1460
|
}
|
|
868
1461
|
// done moving nodes around
|
|
869
1462
|
// allow the disconnect callback to work again
|
|
870
|
-
plt.$flags$ &= ~1 /* isTmpDisconnected */;
|
|
1463
|
+
plt.$flags$ &= ~1 /* PLATFORM_FLAGS.isTmpDisconnected */;
|
|
871
1464
|
// always reset
|
|
872
1465
|
relocateNodes.length = 0;
|
|
873
1466
|
}
|
|
874
1467
|
};
|
|
875
|
-
const getElement = (ref) => (getHostRef(ref).$hostElement$ );
|
|
876
|
-
const createEvent = (ref, name, flags) => {
|
|
877
|
-
const elm = getElement(ref);
|
|
878
|
-
return {
|
|
879
|
-
emit: (detail) => {
|
|
880
|
-
return emitEvent(elm, name, {
|
|
881
|
-
bubbles: !!(flags & 4 /* Bubbles */),
|
|
882
|
-
composed: !!(flags & 2 /* Composed */),
|
|
883
|
-
cancelable: !!(flags & 1 /* Cancellable */),
|
|
884
|
-
detail,
|
|
885
|
-
});
|
|
886
|
-
},
|
|
887
|
-
};
|
|
888
|
-
};
|
|
889
|
-
/**
|
|
890
|
-
* Helper function to create & dispatch a custom Event on a provided target
|
|
891
|
-
* @param elm the target of the Event
|
|
892
|
-
* @param name the name to give the custom Event
|
|
893
|
-
* @param opts options for configuring a custom Event
|
|
894
|
-
* @returns the custom Event
|
|
895
|
-
*/
|
|
896
|
-
const emitEvent = (elm, name, opts) => {
|
|
897
|
-
const ev = plt.ce(name, opts);
|
|
898
|
-
elm.dispatchEvent(ev);
|
|
899
|
-
return ev;
|
|
900
|
-
};
|
|
901
1468
|
const attachToAncestor = (hostRef, ancestorComponent) => {
|
|
902
1469
|
if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent['s-p']) {
|
|
903
1470
|
ancestorComponent['s-p'].push(new Promise((r) => (hostRef.$onRenderResolve$ = r)));
|
|
@@ -905,10 +1472,10 @@ const attachToAncestor = (hostRef, ancestorComponent) => {
|
|
|
905
1472
|
};
|
|
906
1473
|
const scheduleUpdate = (hostRef, isInitialLoad) => {
|
|
907
1474
|
{
|
|
908
|
-
hostRef.$flags$ |= 16 /* isQueuedForUpdate */;
|
|
1475
|
+
hostRef.$flags$ |= 16 /* HOST_FLAGS.isQueuedForUpdate */;
|
|
909
1476
|
}
|
|
910
|
-
if (hostRef.$flags$ & 4 /* isWaitingForChildren */) {
|
|
911
|
-
hostRef.$flags$ |= 512 /* needsRerender */;
|
|
1477
|
+
if (hostRef.$flags$ & 4 /* HOST_FLAGS.isWaitingForChildren */) {
|
|
1478
|
+
hostRef.$flags$ |= 512 /* HOST_FLAGS.needsRerender */;
|
|
912
1479
|
return;
|
|
913
1480
|
}
|
|
914
1481
|
attachToAncestor(hostRef, hostRef.$ancestorComponent$);
|
|
@@ -924,12 +1491,15 @@ const dispatchHooks = (hostRef, isInitialLoad) => {
|
|
|
924
1491
|
let promise;
|
|
925
1492
|
if (isInitialLoad) {
|
|
926
1493
|
{
|
|
927
|
-
hostRef.$flags$ |= 256 /* isListenReady */;
|
|
1494
|
+
hostRef.$flags$ |= 256 /* HOST_FLAGS.isListenReady */;
|
|
928
1495
|
if (hostRef.$queuedListeners$) {
|
|
929
1496
|
hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event));
|
|
930
1497
|
hostRef.$queuedListeners$ = null;
|
|
931
1498
|
}
|
|
932
1499
|
}
|
|
1500
|
+
{
|
|
1501
|
+
promise = safeCall(instance, 'componentWillLoad');
|
|
1502
|
+
}
|
|
933
1503
|
}
|
|
934
1504
|
{
|
|
935
1505
|
promise = then(promise, () => safeCall(instance, 'componentWillRender'));
|
|
@@ -967,7 +1537,7 @@ const updateComponent = async (hostRef, instance, isInitialLoad) => {
|
|
|
967
1537
|
}
|
|
968
1538
|
else {
|
|
969
1539
|
Promise.all(childrenPromises).then(postUpdate);
|
|
970
|
-
hostRef.$flags$ |= 4 /* isWaitingForChildren */;
|
|
1540
|
+
hostRef.$flags$ |= 4 /* HOST_FLAGS.isWaitingForChildren */;
|
|
971
1541
|
childrenPromises.length = 0;
|
|
972
1542
|
}
|
|
973
1543
|
}
|
|
@@ -976,10 +1546,10 @@ const callRender = (hostRef, instance, elm) => {
|
|
|
976
1546
|
try {
|
|
977
1547
|
instance = instance.render() ;
|
|
978
1548
|
{
|
|
979
|
-
hostRef.$flags$ &= ~16 /* isQueuedForUpdate */;
|
|
1549
|
+
hostRef.$flags$ &= ~16 /* HOST_FLAGS.isQueuedForUpdate */;
|
|
980
1550
|
}
|
|
981
1551
|
{
|
|
982
|
-
hostRef.$flags$ |= 2 /* hasRendered */;
|
|
1552
|
+
hostRef.$flags$ |= 2 /* HOST_FLAGS.hasRendered */;
|
|
983
1553
|
}
|
|
984
1554
|
{
|
|
985
1555
|
{
|
|
@@ -1001,13 +1571,20 @@ const postUpdateComponent = (hostRef) => {
|
|
|
1001
1571
|
const tagName = hostRef.$cmpMeta$.$tagName$;
|
|
1002
1572
|
const elm = hostRef.$hostElement$;
|
|
1003
1573
|
const endPostUpdate = createTime('postUpdate', tagName);
|
|
1574
|
+
const instance = hostRef.$lazyInstance$ ;
|
|
1004
1575
|
const ancestorComponent = hostRef.$ancestorComponent$;
|
|
1005
|
-
|
|
1006
|
-
|
|
1576
|
+
{
|
|
1577
|
+
safeCall(instance, 'componentDidRender');
|
|
1578
|
+
}
|
|
1579
|
+
if (!(hostRef.$flags$ & 64 /* HOST_FLAGS.hasLoadedComponent */)) {
|
|
1580
|
+
hostRef.$flags$ |= 64 /* HOST_FLAGS.hasLoadedComponent */;
|
|
1007
1581
|
{
|
|
1008
1582
|
// DOM WRITE!
|
|
1009
1583
|
addHydratedFlag(elm);
|
|
1010
1584
|
}
|
|
1585
|
+
{
|
|
1586
|
+
safeCall(instance, 'componentDidLoad');
|
|
1587
|
+
}
|
|
1011
1588
|
endPostUpdate();
|
|
1012
1589
|
{
|
|
1013
1590
|
hostRef.$onReadyResolve$(elm);
|
|
@@ -1017,6 +1594,9 @@ const postUpdateComponent = (hostRef) => {
|
|
|
1017
1594
|
}
|
|
1018
1595
|
}
|
|
1019
1596
|
else {
|
|
1597
|
+
{
|
|
1598
|
+
safeCall(instance, 'componentDidUpdate');
|
|
1599
|
+
}
|
|
1020
1600
|
endPostUpdate();
|
|
1021
1601
|
}
|
|
1022
1602
|
// load events fire from bottom to top
|
|
@@ -1026,10 +1606,10 @@ const postUpdateComponent = (hostRef) => {
|
|
|
1026
1606
|
hostRef.$onRenderResolve$();
|
|
1027
1607
|
hostRef.$onRenderResolve$ = undefined;
|
|
1028
1608
|
}
|
|
1029
|
-
if (hostRef.$flags$ & 512 /* needsRerender */) {
|
|
1609
|
+
if (hostRef.$flags$ & 512 /* HOST_FLAGS.needsRerender */) {
|
|
1030
1610
|
nextTick(() => scheduleUpdate(hostRef, false));
|
|
1031
1611
|
}
|
|
1032
|
-
hostRef.$flags$ &= ~(4 /* isWaitingForChildren */ | 512 /* needsRerender */);
|
|
1612
|
+
hostRef.$flags$ &= ~(4 /* HOST_FLAGS.isWaitingForChildren */ | 512 /* HOST_FLAGS.needsRerender */);
|
|
1033
1613
|
}
|
|
1034
1614
|
// ( •_•)
|
|
1035
1615
|
// ( •_•)>⌐■-■
|
|
@@ -1059,57 +1639,11 @@ const then = (promise, thenFn) => {
|
|
|
1059
1639
|
};
|
|
1060
1640
|
const addHydratedFlag = (elm) => elm.classList.add('hydrated')
|
|
1061
1641
|
;
|
|
1062
|
-
/**
|
|
1063
|
-
* Parse a new property value for a given property type.
|
|
1064
|
-
*
|
|
1065
|
-
* While the prop value can reasonably be expected to be of `any` type as far as TypeScript's type checker is concerned,
|
|
1066
|
-
* it is not safe to assume that the string returned by evaluating `typeof propValue` matches:
|
|
1067
|
-
* 1. `any`, the type given to `propValue` in the function signature
|
|
1068
|
-
* 2. the type stored from `propType`.
|
|
1069
|
-
*
|
|
1070
|
-
* This function provides the capability to parse/coerce a property's value to potentially any other JavaScript type.
|
|
1071
|
-
*
|
|
1072
|
-
* Property values represented in TSX preserve their type information. In the example below, the number 0 is passed to
|
|
1073
|
-
* a component. This `propValue` will preserve its type information (`typeof propValue === 'number'`). Note that is
|
|
1074
|
-
* based on the type of the value being passed in, not the type declared of the class member decorated with `@Prop`.
|
|
1075
|
-
* ```tsx
|
|
1076
|
-
* <my-cmp prop-val={0}></my-cmp>
|
|
1077
|
-
* ```
|
|
1078
|
-
*
|
|
1079
|
-
* HTML prop values on the other hand, will always a string
|
|
1080
|
-
*
|
|
1081
|
-
* @param propValue the new value to coerce to some type
|
|
1082
|
-
* @param propType the type of the prop, expressed as a binary number
|
|
1083
|
-
* @returns the parsed/coerced value
|
|
1084
|
-
*/
|
|
1085
|
-
const parsePropertyValue = (propValue, propType) => {
|
|
1086
|
-
// ensure this value is of the correct prop type
|
|
1087
|
-
if (propValue != null && !isComplexType(propValue)) {
|
|
1088
|
-
if (propType & 4 /* Boolean */) {
|
|
1089
|
-
// per the HTML spec, any string value means it is a boolean true value
|
|
1090
|
-
// but we'll cheat here and say that the string "false" is the boolean false
|
|
1091
|
-
return propValue === 'false' ? false : propValue === '' || !!propValue;
|
|
1092
|
-
}
|
|
1093
|
-
if (propType & 2 /* Number */) {
|
|
1094
|
-
// force it to be a number
|
|
1095
|
-
return parseFloat(propValue);
|
|
1096
|
-
}
|
|
1097
|
-
if (propType & 1 /* String */) {
|
|
1098
|
-
// could have been passed as a number or boolean
|
|
1099
|
-
// but we still want it as a string
|
|
1100
|
-
return String(propValue);
|
|
1101
|
-
}
|
|
1102
|
-
// redundant return here for better minification
|
|
1103
|
-
return propValue;
|
|
1104
|
-
}
|
|
1105
|
-
// not sure exactly what type we want
|
|
1106
|
-
// so no need to change to a different type
|
|
1107
|
-
return propValue;
|
|
1108
|
-
};
|
|
1109
1642
|
const getValue = (ref, propName) => getHostRef(ref).$instanceValues$.get(propName);
|
|
1110
1643
|
const setValue = (ref, propName, newVal, cmpMeta) => {
|
|
1111
1644
|
// check our new property value against our internal value
|
|
1112
1645
|
const hostRef = getHostRef(ref);
|
|
1646
|
+
const elm = hostRef.$hostElement$ ;
|
|
1113
1647
|
const oldVal = hostRef.$instanceValues$.get(propName);
|
|
1114
1648
|
const flags = hostRef.$flags$;
|
|
1115
1649
|
const instance = hostRef.$lazyInstance$ ;
|
|
@@ -1117,12 +1651,28 @@ const setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
1117
1651
|
// explicitly check for NaN on both sides, as `NaN === NaN` is always false
|
|
1118
1652
|
const areBothNaN = Number.isNaN(oldVal) && Number.isNaN(newVal);
|
|
1119
1653
|
const didValueChange = newVal !== oldVal && !areBothNaN;
|
|
1120
|
-
if ((!(flags & 8 /* isConstructingInstance */) || oldVal === undefined) && didValueChange) {
|
|
1654
|
+
if ((!(flags & 8 /* HOST_FLAGS.isConstructingInstance */) || oldVal === undefined) && didValueChange) {
|
|
1121
1655
|
// gadzooks! the property's value has changed!!
|
|
1122
1656
|
// set our new value!
|
|
1123
1657
|
hostRef.$instanceValues$.set(propName, newVal);
|
|
1124
1658
|
if (instance) {
|
|
1125
|
-
|
|
1659
|
+
// get an array of method names of watch functions to call
|
|
1660
|
+
if (cmpMeta.$watchers$ && flags & 128 /* HOST_FLAGS.isWatchReady */) {
|
|
1661
|
+
const watchMethods = cmpMeta.$watchers$[propName];
|
|
1662
|
+
if (watchMethods) {
|
|
1663
|
+
// this instance is watching for when this property changed
|
|
1664
|
+
watchMethods.map((watchMethodName) => {
|
|
1665
|
+
try {
|
|
1666
|
+
// fire off each of the watch methods that are watching this property
|
|
1667
|
+
instance[watchMethodName](newVal, oldVal, propName);
|
|
1668
|
+
}
|
|
1669
|
+
catch (e) {
|
|
1670
|
+
consoleError(e, elm);
|
|
1671
|
+
}
|
|
1672
|
+
});
|
|
1673
|
+
}
|
|
1674
|
+
}
|
|
1675
|
+
if ((flags & (2 /* HOST_FLAGS.hasRendered */ | 16 /* HOST_FLAGS.isQueuedForUpdate */)) === 2 /* HOST_FLAGS.hasRendered */) {
|
|
1126
1676
|
if (instance.componentShouldUpdate) {
|
|
1127
1677
|
if (instance.componentShouldUpdate(newVal, oldVal, propName) === false) {
|
|
1128
1678
|
return;
|
|
@@ -1137,14 +1687,27 @@ const setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
1137
1687
|
}
|
|
1138
1688
|
}
|
|
1139
1689
|
};
|
|
1690
|
+
/**
|
|
1691
|
+
* Attach a series of runtime constructs to a compiled Stencil component
|
|
1692
|
+
* constructor, including getters and setters for the `@Prop` and `@State`
|
|
1693
|
+
* decorators, callbacks for when attributes change, and so on.
|
|
1694
|
+
*
|
|
1695
|
+
* @param Cstr the constructor for a component that we need to process
|
|
1696
|
+
* @param cmpMeta metadata collected previously about the component
|
|
1697
|
+
* @param flags a number used to store a series of bit flags
|
|
1698
|
+
* @returns a reference to the same constructor passed in (but now mutated)
|
|
1699
|
+
*/
|
|
1140
1700
|
const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
1141
1701
|
if (cmpMeta.$members$) {
|
|
1702
|
+
if (Cstr.watchers) {
|
|
1703
|
+
cmpMeta.$watchers$ = Cstr.watchers;
|
|
1704
|
+
}
|
|
1142
1705
|
// It's better to have a const than two Object.entries()
|
|
1143
1706
|
const members = Object.entries(cmpMeta.$members$);
|
|
1144
1707
|
const prototype = Cstr.prototype;
|
|
1145
1708
|
members.map(([memberName, [memberFlags]]) => {
|
|
1146
|
-
if ((memberFlags & 31 /* Prop */ ||
|
|
1147
|
-
((flags & 2 /* proxyState */) && memberFlags & 32 /* State */))) {
|
|
1709
|
+
if ((memberFlags & 31 /* MEMBER_FLAGS.Prop */ ||
|
|
1710
|
+
((flags & 2 /* PROXY_FLAGS.proxyState */) && memberFlags & 32 /* MEMBER_FLAGS.State */))) {
|
|
1148
1711
|
// proxyComponent - prop
|
|
1149
1712
|
Object.defineProperty(prototype, memberName, {
|
|
1150
1713
|
get() {
|
|
@@ -1160,7 +1723,7 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1160
1723
|
});
|
|
1161
1724
|
}
|
|
1162
1725
|
});
|
|
1163
|
-
if ((flags & 1 /* isElementConstructor */)) {
|
|
1726
|
+
if ((flags & 1 /* PROXY_FLAGS.isElementConstructor */)) {
|
|
1164
1727
|
const attrNameToPropName = new Map();
|
|
1165
1728
|
prototype.attributeChangedCallback = function (attrName, _oldValue, newValue) {
|
|
1166
1729
|
plt.jmp(() => {
|
|
@@ -1216,10 +1779,13 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1216
1779
|
// create an array of attributes to observe
|
|
1217
1780
|
// and also create a map of html attribute name to js property name
|
|
1218
1781
|
Cstr.observedAttributes = members
|
|
1219
|
-
.filter(([_, m]) => m[0] & 15 /* HasAttribute */) // filter to only keep props that should match attributes
|
|
1782
|
+
.filter(([_, m]) => m[0] & 15 /* MEMBER_FLAGS.HasAttribute */) // filter to only keep props that should match attributes
|
|
1220
1783
|
.map(([propName, m]) => {
|
|
1221
1784
|
const attrName = m[1] || propName;
|
|
1222
1785
|
attrNameToPropName.set(attrName, propName);
|
|
1786
|
+
if (m[0] & 512 /* MEMBER_FLAGS.ReflectAttr */) {
|
|
1787
|
+
cmpMeta.$attrsToReflect$.push([propName, attrName]);
|
|
1788
|
+
}
|
|
1223
1789
|
return attrName;
|
|
1224
1790
|
});
|
|
1225
1791
|
}
|
|
@@ -1228,10 +1794,10 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1228
1794
|
};
|
|
1229
1795
|
const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) => {
|
|
1230
1796
|
// initializeComponent
|
|
1231
|
-
if ((hostRef.$flags$ & 32 /* hasInitializedComponent */) === 0) {
|
|
1797
|
+
if ((hostRef.$flags$ & 32 /* HOST_FLAGS.hasInitializedComponent */) === 0) {
|
|
1232
1798
|
{
|
|
1233
1799
|
// we haven't initialized this element yet
|
|
1234
|
-
hostRef.$flags$ |= 32 /* hasInitializedComponent */;
|
|
1800
|
+
hostRef.$flags$ |= 32 /* HOST_FLAGS.hasInitializedComponent */;
|
|
1235
1801
|
// lazy loaded components
|
|
1236
1802
|
// request the component's implementation to be
|
|
1237
1803
|
// wired up with the host element
|
|
@@ -1243,7 +1809,13 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
|
|
|
1243
1809
|
endLoad();
|
|
1244
1810
|
}
|
|
1245
1811
|
if (!Cstr.isProxied) {
|
|
1246
|
-
|
|
1812
|
+
// we've never proxied this Constructor before
|
|
1813
|
+
// let's add the getters/setters to its prototype before
|
|
1814
|
+
// the first time we create an instance of the implementation
|
|
1815
|
+
{
|
|
1816
|
+
cmpMeta.$watchers$ = Cstr.watchers;
|
|
1817
|
+
}
|
|
1818
|
+
proxyComponent(Cstr, cmpMeta, 2 /* PROXY_FLAGS.proxyState */);
|
|
1247
1819
|
Cstr.isProxied = true;
|
|
1248
1820
|
}
|
|
1249
1821
|
const endNewInstance = createTime('createInstance', cmpMeta.$tagName$);
|
|
@@ -1251,7 +1823,7 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
|
|
|
1251
1823
|
// but let's keep track of when we start and stop
|
|
1252
1824
|
// so that the getters/setters don't incorrectly step on data
|
|
1253
1825
|
{
|
|
1254
|
-
hostRef.$flags$ |= 8 /* isConstructingInstance */;
|
|
1826
|
+
hostRef.$flags$ |= 8 /* HOST_FLAGS.isConstructingInstance */;
|
|
1255
1827
|
}
|
|
1256
1828
|
// construct the lazy-loaded component implementation
|
|
1257
1829
|
// passing the hostRef is very important during
|
|
@@ -1264,7 +1836,10 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
|
|
|
1264
1836
|
consoleError(e);
|
|
1265
1837
|
}
|
|
1266
1838
|
{
|
|
1267
|
-
hostRef.$flags$ &= ~8 /* isConstructingInstance */;
|
|
1839
|
+
hostRef.$flags$ &= ~8 /* HOST_FLAGS.isConstructingInstance */;
|
|
1840
|
+
}
|
|
1841
|
+
{
|
|
1842
|
+
hostRef.$flags$ |= 128 /* HOST_FLAGS.isWatchReady */;
|
|
1268
1843
|
}
|
|
1269
1844
|
endNewInstance();
|
|
1270
1845
|
}
|
|
@@ -1274,7 +1849,7 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
|
|
|
1274
1849
|
const scopeId = getScopeId(cmpMeta);
|
|
1275
1850
|
if (!styles.has(scopeId)) {
|
|
1276
1851
|
const endRegisterStyles = createTime('registerStyles', cmpMeta.$tagName$);
|
|
1277
|
-
registerStyle(scopeId, style, !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */));
|
|
1852
|
+
registerStyle(scopeId, style, !!(cmpMeta.$flags$ & 1 /* CMP_FLAGS.shadowDomEncapsulation */));
|
|
1278
1853
|
endRegisterStyles();
|
|
1279
1854
|
}
|
|
1280
1855
|
}
|
|
@@ -1296,19 +1871,31 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
|
|
|
1296
1871
|
}
|
|
1297
1872
|
};
|
|
1298
1873
|
const connectedCallback = (elm) => {
|
|
1299
|
-
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
|
|
1874
|
+
if ((plt.$flags$ & 1 /* PLATFORM_FLAGS.isTmpDisconnected */) === 0) {
|
|
1300
1875
|
const hostRef = getHostRef(elm);
|
|
1301
1876
|
const cmpMeta = hostRef.$cmpMeta$;
|
|
1302
1877
|
const endConnected = createTime('connectedCallback', cmpMeta.$tagName$);
|
|
1303
|
-
if (!(hostRef.$flags$ & 1 /* hasConnected */)) {
|
|
1878
|
+
if (!(hostRef.$flags$ & 1 /* HOST_FLAGS.hasConnected */)) {
|
|
1304
1879
|
// first time this component has connected
|
|
1305
|
-
hostRef.$flags$ |= 1 /* hasConnected */;
|
|
1880
|
+
hostRef.$flags$ |= 1 /* HOST_FLAGS.hasConnected */;
|
|
1881
|
+
let hostId;
|
|
1306
1882
|
{
|
|
1883
|
+
hostId = elm.getAttribute(HYDRATE_ID);
|
|
1884
|
+
if (hostId) {
|
|
1885
|
+
if (cmpMeta.$flags$ & 1 /* CMP_FLAGS.shadowDomEncapsulation */) {
|
|
1886
|
+
const scopeId = addStyle(elm.shadowRoot, cmpMeta);
|
|
1887
|
+
elm.classList.remove(scopeId + '-h', scopeId + '-s');
|
|
1888
|
+
}
|
|
1889
|
+
initializeClientHydrate(elm, cmpMeta.$tagName$, hostId, hostRef);
|
|
1890
|
+
}
|
|
1891
|
+
}
|
|
1892
|
+
if (!hostId) {
|
|
1307
1893
|
// initUpdate
|
|
1308
1894
|
// if the slot polyfill is required we'll need to put some nodes
|
|
1309
1895
|
// in here to act as original content anchors as we move nodes around
|
|
1310
1896
|
// host element has been connected to the DOM
|
|
1311
|
-
if ((
|
|
1897
|
+
if ((// TODO(STENCIL-662): Remove code related to deprecated shadowDomShim field
|
|
1898
|
+
cmpMeta.$flags$ & (4 /* CMP_FLAGS.hasSlotRelocation */ | 8 /* CMP_FLAGS.needsShadowDomShim */))) {
|
|
1312
1899
|
setContentReference(elm);
|
|
1313
1900
|
}
|
|
1314
1901
|
}
|
|
@@ -1319,7 +1906,10 @@ const connectedCallback = (elm) => {
|
|
|
1319
1906
|
while ((ancestorComponent = ancestorComponent.parentNode || ancestorComponent.host)) {
|
|
1320
1907
|
// climb up the ancestors looking for the first
|
|
1321
1908
|
// component that hasn't finished its lifecycle update yet
|
|
1322
|
-
if (ancestorComponent
|
|
1909
|
+
if ((ancestorComponent.nodeType === 1 /* NODE_TYPE.ElementNode */ &&
|
|
1910
|
+
ancestorComponent.hasAttribute('s-id') &&
|
|
1911
|
+
ancestorComponent['s-p']) ||
|
|
1912
|
+
ancestorComponent['s-p']) {
|
|
1323
1913
|
// we found this components first ancestor component
|
|
1324
1914
|
// keep a reference to this component's ancestor component
|
|
1325
1915
|
attachToAncestor(hostRef, (hostRef.$ancestorComponent$ = ancestorComponent));
|
|
@@ -1331,7 +1921,7 @@ const connectedCallback = (elm) => {
|
|
|
1331
1921
|
// https://developers.google.com/web/fundamentals/web-components/best-practices#lazy-properties
|
|
1332
1922
|
if (cmpMeta.$members$) {
|
|
1333
1923
|
Object.entries(cmpMeta.$members$).map(([memberName, [memberFlags]]) => {
|
|
1334
|
-
if (memberFlags & 31 /* Prop */ && elm.hasOwnProperty(memberName)) {
|
|
1924
|
+
if (memberFlags & 31 /* MEMBER_FLAGS.Prop */ && elm.hasOwnProperty(memberName)) {
|
|
1335
1925
|
const value = elm[memberName];
|
|
1336
1926
|
delete elm[memberName];
|
|
1337
1927
|
elm[memberName] = value;
|
|
@@ -1363,17 +1953,22 @@ const setContentReference = (elm) => {
|
|
|
1363
1953
|
elm.insertBefore(contentRefElm, elm.firstChild);
|
|
1364
1954
|
};
|
|
1365
1955
|
const disconnectedCallback = (elm) => {
|
|
1366
|
-
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
|
|
1956
|
+
if ((plt.$flags$ & 1 /* PLATFORM_FLAGS.isTmpDisconnected */) === 0) {
|
|
1367
1957
|
const hostRef = getHostRef(elm);
|
|
1958
|
+
const instance = hostRef.$lazyInstance$ ;
|
|
1368
1959
|
{
|
|
1369
1960
|
if (hostRef.$rmListeners$) {
|
|
1370
1961
|
hostRef.$rmListeners$.map((rmListener) => rmListener());
|
|
1371
1962
|
hostRef.$rmListeners$ = undefined;
|
|
1372
1963
|
}
|
|
1373
1964
|
}
|
|
1965
|
+
{
|
|
1966
|
+
safeCall(instance, 'disconnectedCallback');
|
|
1967
|
+
}
|
|
1374
1968
|
}
|
|
1375
1969
|
};
|
|
1376
1970
|
const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
1971
|
+
var _a;
|
|
1377
1972
|
const endBootstrap = createTime();
|
|
1378
1973
|
const cmpTags = [];
|
|
1379
1974
|
const exclude = options.exclude || [];
|
|
@@ -1382,10 +1977,22 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1382
1977
|
const metaCharset = /*@__PURE__*/ head.querySelector('meta[charset]');
|
|
1383
1978
|
const visibilityStyle = /*@__PURE__*/ doc.createElement('style');
|
|
1384
1979
|
const deferredConnectedCallbacks = [];
|
|
1980
|
+
const styles = /*@__PURE__*/ doc.querySelectorAll(`[${HYDRATED_STYLE_ID}]`);
|
|
1385
1981
|
let appLoadFallback;
|
|
1386
1982
|
let isBootstrapping = true;
|
|
1983
|
+
let i = 0;
|
|
1387
1984
|
Object.assign(plt, options);
|
|
1388
1985
|
plt.$resourcesUrl$ = new URL(options.resourcesUrl || './', doc.baseURI).href;
|
|
1986
|
+
{
|
|
1987
|
+
// If the app is already hydrated there is not point to disable the
|
|
1988
|
+
// async queue. This will improve the first input delay
|
|
1989
|
+
plt.$flags$ |= 2 /* PLATFORM_FLAGS.appLoaded */;
|
|
1990
|
+
}
|
|
1991
|
+
{
|
|
1992
|
+
for (; i < styles.length; i++) {
|
|
1993
|
+
registerStyle(styles[i].getAttribute(HYDRATED_STYLE_ID), convertScopedToShadow(styles[i].innerHTML), true);
|
|
1994
|
+
}
|
|
1995
|
+
}
|
|
1389
1996
|
lazyBundles.map((lazyBundle) => {
|
|
1390
1997
|
lazyBundle[1].map((compactMeta) => {
|
|
1391
1998
|
const cmpMeta = {
|
|
@@ -1400,6 +2007,12 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1400
2007
|
{
|
|
1401
2008
|
cmpMeta.$listeners$ = compactMeta[3];
|
|
1402
2009
|
}
|
|
2010
|
+
{
|
|
2011
|
+
cmpMeta.$attrsToReflect$ = [];
|
|
2012
|
+
}
|
|
2013
|
+
{
|
|
2014
|
+
cmpMeta.$watchers$ = {};
|
|
2015
|
+
}
|
|
1403
2016
|
const tagName = cmpMeta.$tagName$;
|
|
1404
2017
|
const HostElement = class extends HTMLElement {
|
|
1405
2018
|
// StencilLazyHost
|
|
@@ -1408,7 +2021,7 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1408
2021
|
super(self);
|
|
1409
2022
|
self = this;
|
|
1410
2023
|
registerHost(self, cmpMeta);
|
|
1411
|
-
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
|
|
2024
|
+
if (cmpMeta.$flags$ & 1 /* CMP_FLAGS.shadowDomEncapsulation */) {
|
|
1412
2025
|
// this component is using shadow dom
|
|
1413
2026
|
// and this browser supports shadow dom
|
|
1414
2027
|
// add the read-only property "shadowRoot" to the host element
|
|
@@ -1443,13 +2056,18 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1443
2056
|
cmpMeta.$lazyBundleId$ = lazyBundle[0];
|
|
1444
2057
|
if (!exclude.includes(tagName) && !customElements.get(tagName)) {
|
|
1445
2058
|
cmpTags.push(tagName);
|
|
1446
|
-
customElements.define(tagName, proxyComponent(HostElement, cmpMeta, 1 /* isElementConstructor */));
|
|
2059
|
+
customElements.define(tagName, proxyComponent(HostElement, cmpMeta, 1 /* PROXY_FLAGS.isElementConstructor */));
|
|
1447
2060
|
}
|
|
1448
2061
|
});
|
|
1449
2062
|
});
|
|
1450
2063
|
{
|
|
1451
2064
|
visibilityStyle.innerHTML = cmpTags + HYDRATED_CSS;
|
|
1452
2065
|
visibilityStyle.setAttribute('data-styles', '');
|
|
2066
|
+
// Apply CSP nonce to the style tag if it exists
|
|
2067
|
+
const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);
|
|
2068
|
+
if (nonce != null) {
|
|
2069
|
+
visibilityStyle.setAttribute('nonce', nonce);
|
|
2070
|
+
}
|
|
1453
2071
|
head.insertBefore(visibilityStyle, metaCharset ? metaCharset.nextSibling : head.firstChild);
|
|
1454
2072
|
}
|
|
1455
2073
|
// Process deferred connectedCallbacks now all components have been registered
|
|
@@ -1465,7 +2083,52 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1465
2083
|
// Fallback appLoad event
|
|
1466
2084
|
endBootstrap();
|
|
1467
2085
|
};
|
|
1468
|
-
const
|
|
2086
|
+
const addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) => {
|
|
2087
|
+
if (listeners) {
|
|
2088
|
+
listeners.map(([flags, name, method]) => {
|
|
2089
|
+
const target = getHostListenerTarget(elm, flags) ;
|
|
2090
|
+
const handler = hostListenerProxy(hostRef, method);
|
|
2091
|
+
const opts = hostListenerOpts(flags);
|
|
2092
|
+
plt.ael(target, name, handler, opts);
|
|
2093
|
+
(hostRef.$rmListeners$ = hostRef.$rmListeners$ || []).push(() => plt.rel(target, name, handler, opts));
|
|
2094
|
+
});
|
|
2095
|
+
}
|
|
2096
|
+
};
|
|
2097
|
+
const hostListenerProxy = (hostRef, methodName) => (ev) => {
|
|
2098
|
+
try {
|
|
2099
|
+
{
|
|
2100
|
+
if (hostRef.$flags$ & 256 /* HOST_FLAGS.isListenReady */) {
|
|
2101
|
+
// instance is ready, let's call it's member method for this event
|
|
2102
|
+
hostRef.$lazyInstance$[methodName](ev);
|
|
2103
|
+
}
|
|
2104
|
+
else {
|
|
2105
|
+
(hostRef.$queuedListeners$ = hostRef.$queuedListeners$ || []).push([methodName, ev]);
|
|
2106
|
+
}
|
|
2107
|
+
}
|
|
2108
|
+
}
|
|
2109
|
+
catch (e) {
|
|
2110
|
+
consoleError(e);
|
|
2111
|
+
}
|
|
2112
|
+
};
|
|
2113
|
+
const getHostListenerTarget = (elm, flags) => {
|
|
2114
|
+
if (flags & 4 /* LISTENER_FLAGS.TargetDocument */)
|
|
2115
|
+
return doc;
|
|
2116
|
+
if (flags & 8 /* LISTENER_FLAGS.TargetWindow */)
|
|
2117
|
+
return win;
|
|
2118
|
+
if (flags & 16 /* LISTENER_FLAGS.TargetBody */)
|
|
2119
|
+
return doc.body;
|
|
2120
|
+
return elm;
|
|
2121
|
+
};
|
|
2122
|
+
// prettier-ignore
|
|
2123
|
+
const hostListenerOpts = (flags) => (flags & 2 /* LISTENER_FLAGS.Capture */) !== 0;
|
|
2124
|
+
/**
|
|
2125
|
+
* Assigns the given value to the nonce property on the runtime platform object.
|
|
2126
|
+
* During runtime, this value is used to set the nonce attribute on all dynamically created script and style tags.
|
|
2127
|
+
* @param nonce The value to be assigned to the platform nonce property.
|
|
2128
|
+
* @returns void
|
|
2129
|
+
*/
|
|
2130
|
+
const setNonce = (nonce) => (plt.$nonce$ = nonce);
|
|
2131
|
+
const hostRefs = /*@__PURE__*/ new WeakMap();
|
|
1469
2132
|
const getHostRef = (ref) => hostRefs.get(ref);
|
|
1470
2133
|
const registerInstance = (lazyInstance, hostRef) => hostRefs.set((hostRef.$lazyInstance$ = lazyInstance), hostRef);
|
|
1471
2134
|
const registerHost = (elm, cmpMeta) => {
|
|
@@ -1494,7 +2157,184 @@ const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
1494
2157
|
if (module) {
|
|
1495
2158
|
return module[exportName];
|
|
1496
2159
|
}
|
|
1497
|
-
|
|
2160
|
+
|
|
2161
|
+
if (!hmrVersionId || !BUILD.hotModuleReplacement) {
|
|
2162
|
+
const processMod = importedModule => {
|
|
2163
|
+
cmpModules.set(bundleId, importedModule);
|
|
2164
|
+
return importedModule[exportName];
|
|
2165
|
+
}
|
|
2166
|
+
switch(bundleId) {
|
|
2167
|
+
|
|
2168
|
+
case 'p-button_3':
|
|
2169
|
+
return import(
|
|
2170
|
+
/* webpackMode: "lazy" */
|
|
2171
|
+
'./p-button_3.entry.js').then(processMod, consoleError);
|
|
2172
|
+
case 'p-accordion':
|
|
2173
|
+
return import(
|
|
2174
|
+
/* webpackMode: "lazy" */
|
|
2175
|
+
'./p-accordion.entry.js').then(processMod, consoleError);
|
|
2176
|
+
case 'p-attachment':
|
|
2177
|
+
return import(
|
|
2178
|
+
/* webpackMode: "lazy" */
|
|
2179
|
+
'./p-attachment.entry.js').then(processMod, consoleError);
|
|
2180
|
+
case 'p-avatar':
|
|
2181
|
+
return import(
|
|
2182
|
+
/* webpackMode: "lazy" */
|
|
2183
|
+
'./p-avatar.entry.js').then(processMod, consoleError);
|
|
2184
|
+
case 'p-avatar-group':
|
|
2185
|
+
return import(
|
|
2186
|
+
/* webpackMode: "lazy" */
|
|
2187
|
+
'./p-avatar-group.entry.js').then(processMod, consoleError);
|
|
2188
|
+
case 'p-card-body':
|
|
2189
|
+
return import(
|
|
2190
|
+
/* webpackMode: "lazy" */
|
|
2191
|
+
'./p-card-body.entry.js').then(processMod, consoleError);
|
|
2192
|
+
case 'p-card-container':
|
|
2193
|
+
return import(
|
|
2194
|
+
/* webpackMode: "lazy" */
|
|
2195
|
+
'./p-card-container.entry.js').then(processMod, consoleError);
|
|
2196
|
+
case 'p-card-header':
|
|
2197
|
+
return import(
|
|
2198
|
+
/* webpackMode: "lazy" */
|
|
2199
|
+
'./p-card-header.entry.js').then(processMod, consoleError);
|
|
2200
|
+
case 'p-content-slider':
|
|
2201
|
+
return import(
|
|
2202
|
+
/* webpackMode: "lazy" */
|
|
2203
|
+
'./p-content-slider.entry.js').then(processMod, consoleError);
|
|
2204
|
+
case 'p-datepicker':
|
|
2205
|
+
return import(
|
|
2206
|
+
/* webpackMode: "lazy" */
|
|
2207
|
+
'./p-datepicker.entry.js').then(processMod, consoleError);
|
|
2208
|
+
case 'p-drawer':
|
|
2209
|
+
return import(
|
|
2210
|
+
/* webpackMode: "lazy" */
|
|
2211
|
+
'./p-drawer.entry.js').then(processMod, consoleError);
|
|
2212
|
+
case 'p-info-panel':
|
|
2213
|
+
return import(
|
|
2214
|
+
/* webpackMode: "lazy" */
|
|
2215
|
+
'./p-info-panel.entry.js').then(processMod, consoleError);
|
|
2216
|
+
case 'p-layout':
|
|
2217
|
+
return import(
|
|
2218
|
+
/* webpackMode: "lazy" */
|
|
2219
|
+
'./p-layout.entry.js').then(processMod, consoleError);
|
|
2220
|
+
case 'p-modal':
|
|
2221
|
+
return import(
|
|
2222
|
+
/* webpackMode: "lazy" */
|
|
2223
|
+
'./p-modal.entry.js').then(processMod, consoleError);
|
|
2224
|
+
case 'p-navbar':
|
|
2225
|
+
return import(
|
|
2226
|
+
/* webpackMode: "lazy" */
|
|
2227
|
+
'./p-navbar.entry.js').then(processMod, consoleError);
|
|
2228
|
+
case 'p-navigation-item':
|
|
2229
|
+
return import(
|
|
2230
|
+
/* webpackMode: "lazy" */
|
|
2231
|
+
'./p-navigation-item.entry.js').then(processMod, consoleError);
|
|
2232
|
+
case 'p-profile':
|
|
2233
|
+
return import(
|
|
2234
|
+
/* webpackMode: "lazy" */
|
|
2235
|
+
'./p-profile.entry.js').then(processMod, consoleError);
|
|
2236
|
+
case 'p-select':
|
|
2237
|
+
return import(
|
|
2238
|
+
/* webpackMode: "lazy" */
|
|
2239
|
+
'./p-select.entry.js').then(processMod, consoleError);
|
|
2240
|
+
case 'p-status':
|
|
2241
|
+
return import(
|
|
2242
|
+
/* webpackMode: "lazy" */
|
|
2243
|
+
'./p-status.entry.js').then(processMod, consoleError);
|
|
2244
|
+
case 'p-stepper':
|
|
2245
|
+
return import(
|
|
2246
|
+
/* webpackMode: "lazy" */
|
|
2247
|
+
'./p-stepper.entry.js').then(processMod, consoleError);
|
|
2248
|
+
case 'p-stepper-item':
|
|
2249
|
+
return import(
|
|
2250
|
+
/* webpackMode: "lazy" */
|
|
2251
|
+
'./p-stepper-item.entry.js').then(processMod, consoleError);
|
|
2252
|
+
case 'p-tab-group':
|
|
2253
|
+
return import(
|
|
2254
|
+
/* webpackMode: "lazy" */
|
|
2255
|
+
'./p-tab-group.entry.js').then(processMod, consoleError);
|
|
2256
|
+
case 'p-tab-item':
|
|
2257
|
+
return import(
|
|
2258
|
+
/* webpackMode: "lazy" */
|
|
2259
|
+
'./p-tab-item.entry.js').then(processMod, consoleError);
|
|
2260
|
+
case 'p-table':
|
|
2261
|
+
return import(
|
|
2262
|
+
/* webpackMode: "lazy" */
|
|
2263
|
+
'./p-table.entry.js').then(processMod, consoleError);
|
|
2264
|
+
case 'p-table-column':
|
|
2265
|
+
return import(
|
|
2266
|
+
/* webpackMode: "lazy" */
|
|
2267
|
+
'./p-table-column.entry.js').then(processMod, consoleError);
|
|
2268
|
+
case 'p-toast':
|
|
2269
|
+
return import(
|
|
2270
|
+
/* webpackMode: "lazy" */
|
|
2271
|
+
'./p-toast.entry.js').then(processMod, consoleError);
|
|
2272
|
+
case 'p-toast-container':
|
|
2273
|
+
return import(
|
|
2274
|
+
/* webpackMode: "lazy" */
|
|
2275
|
+
'./p-toast-container.entry.js').then(processMod, consoleError);
|
|
2276
|
+
case 'p-calendar':
|
|
2277
|
+
return import(
|
|
2278
|
+
/* webpackMode: "lazy" */
|
|
2279
|
+
'./p-calendar.entry.js').then(processMod, consoleError);
|
|
2280
|
+
case 'p-counter':
|
|
2281
|
+
return import(
|
|
2282
|
+
/* webpackMode: "lazy" */
|
|
2283
|
+
'./p-counter.entry.js').then(processMod, consoleError);
|
|
2284
|
+
case 'p-drawer-body_3':
|
|
2285
|
+
return import(
|
|
2286
|
+
/* webpackMode: "lazy" */
|
|
2287
|
+
'./p-drawer-body_3.entry.js').then(processMod, consoleError);
|
|
2288
|
+
case 'p-illustration_6':
|
|
2289
|
+
return import(
|
|
2290
|
+
/* webpackMode: "lazy" */
|
|
2291
|
+
'./p-illustration_6.entry.js').then(processMod, consoleError);
|
|
2292
|
+
case 'p-modal-body_4':
|
|
2293
|
+
return import(
|
|
2294
|
+
/* webpackMode: "lazy" */
|
|
2295
|
+
'./p-modal-body_4.entry.js').then(processMod, consoleError);
|
|
2296
|
+
case 'p-slider-indicator':
|
|
2297
|
+
return import(
|
|
2298
|
+
/* webpackMode: "lazy" */
|
|
2299
|
+
'./p-slider-indicator.entry.js').then(processMod, consoleError);
|
|
2300
|
+
case 'p-stepper-line':
|
|
2301
|
+
return import(
|
|
2302
|
+
/* webpackMode: "lazy" */
|
|
2303
|
+
'./p-stepper-line.entry.js').then(processMod, consoleError);
|
|
2304
|
+
case 'p-label_3':
|
|
2305
|
+
return import(
|
|
2306
|
+
/* webpackMode: "lazy" */
|
|
2307
|
+
'./p-label_3.entry.js').then(processMod, consoleError);
|
|
2308
|
+
case 'p-page-size-select_3':
|
|
2309
|
+
return import(
|
|
2310
|
+
/* webpackMode: "lazy" */
|
|
2311
|
+
'./p-page-size-select_3.entry.js').then(processMod, consoleError);
|
|
2312
|
+
case 'p-backdrop':
|
|
2313
|
+
return import(
|
|
2314
|
+
/* webpackMode: "lazy" */
|
|
2315
|
+
'./p-backdrop.entry.js').then(processMod, consoleError);
|
|
2316
|
+
case 'p-dropdown_2':
|
|
2317
|
+
return import(
|
|
2318
|
+
/* webpackMode: "lazy" */
|
|
2319
|
+
'./p-dropdown_2.entry.js').then(processMod, consoleError);
|
|
2320
|
+
case 'p-helper_3':
|
|
2321
|
+
return import(
|
|
2322
|
+
/* webpackMode: "lazy" */
|
|
2323
|
+
'./p-helper_3.entry.js').then(processMod, consoleError);
|
|
2324
|
+
case 'p-divider':
|
|
2325
|
+
return import(
|
|
2326
|
+
/* webpackMode: "lazy" */
|
|
2327
|
+
'./p-divider.entry.js').then(processMod, consoleError);
|
|
2328
|
+
case 'p-dropdown-menu-container':
|
|
2329
|
+
return import(
|
|
2330
|
+
/* webpackMode: "lazy" */
|
|
2331
|
+
'./p-dropdown-menu-container.entry.js').then(processMod, consoleError);
|
|
2332
|
+
case 'p-tooltip':
|
|
2333
|
+
return import(
|
|
2334
|
+
/* webpackMode: "lazy" */
|
|
2335
|
+
'./p-tooltip.entry.js').then(processMod, consoleError);
|
|
2336
|
+
}
|
|
2337
|
+
}
|
|
1498
2338
|
return import(
|
|
1499
2339
|
/* @vite-ignore */
|
|
1500
2340
|
/* webpackInclude: /\.entry\.js$/ */
|
|
@@ -1507,14 +2347,38 @@ const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
1507
2347
|
return importedModule[exportName];
|
|
1508
2348
|
}, consoleError);
|
|
1509
2349
|
};
|
|
1510
|
-
const styles = new Map();
|
|
2350
|
+
const styles = /*@__PURE__*/ new Map();
|
|
2351
|
+
const win = typeof window !== 'undefined' ? window : {};
|
|
2352
|
+
const doc = win.document || { head: {} };
|
|
2353
|
+
const plt = {
|
|
2354
|
+
$flags$: 0,
|
|
2355
|
+
$resourcesUrl$: '',
|
|
2356
|
+
jmp: (h) => h(),
|
|
2357
|
+
raf: (h) => requestAnimationFrame(h),
|
|
2358
|
+
ael: (el, eventName, listener, opts) => el.addEventListener(eventName, listener, opts),
|
|
2359
|
+
rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),
|
|
2360
|
+
ce: (eventName, opts) => new CustomEvent(eventName, opts),
|
|
2361
|
+
};
|
|
2362
|
+
const supportsShadow =
|
|
2363
|
+
// TODO(STENCIL-662): Remove code related to deprecated shadowDomShim field
|
|
2364
|
+
true;
|
|
2365
|
+
const promiseResolve = (v) => Promise.resolve(v);
|
|
2366
|
+
const supportsConstructableStylesheets = /*@__PURE__*/ (() => {
|
|
2367
|
+
try {
|
|
2368
|
+
new CSSStyleSheet();
|
|
2369
|
+
return typeof new CSSStyleSheet().replaceSync === 'function';
|
|
2370
|
+
}
|
|
2371
|
+
catch (e) { }
|
|
2372
|
+
return false;
|
|
2373
|
+
})()
|
|
2374
|
+
;
|
|
1511
2375
|
const queueDomReads = [];
|
|
1512
2376
|
const queueDomWrites = [];
|
|
1513
2377
|
const queueTask = (queue, write) => (cb) => {
|
|
1514
2378
|
queue.push(cb);
|
|
1515
2379
|
if (!queuePending) {
|
|
1516
2380
|
queuePending = true;
|
|
1517
|
-
if (write && plt.$flags$ & 4 /* queueSync */) {
|
|
2381
|
+
if (write && plt.$flags$ & 4 /* PLATFORM_FLAGS.queueSync */) {
|
|
1518
2382
|
nextTick(flush);
|
|
1519
2383
|
}
|
|
1520
2384
|
else {
|
|
@@ -1551,4 +2415,6 @@ const flush = () => {
|
|
|
1551
2415
|
const nextTick = /*@__PURE__*/ (cb) => promiseResolve().then(cb);
|
|
1552
2416
|
const writeTask = /*@__PURE__*/ queueTask(queueDomWrites, true);
|
|
1553
2417
|
|
|
1554
|
-
export { Host as H, bootstrapLazy as b, createEvent as c, getElement as g, h, promiseResolve as p, registerInstance as r };
|
|
2418
|
+
export { Host as H, bootstrapLazy as b, createEvent as c, getElement as g, h, promiseResolve as p, registerInstance as r, setNonce as s };
|
|
2419
|
+
|
|
2420
|
+
//# sourceMappingURL=index-94339e77.js.map
|