@paperless/core 0.1.0-alpha.30 → 0.1.0-alpha.301
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 +2802 -0
- package/README.md +9 -1
- package/dist/assets/i18n/page-size-select.i18n.en.json +4 -0
- package/dist/assets/i18n/page-size-select.i18n.nl.json +4 -0
- package/dist/assets/i18n/table-footer.i18n.en.json +3 -0
- package/dist/assets/i18n/table-footer.i18n.nl.json +3 -0
- package/dist/assets/i18n/table-header.i18n.en.json +6 -0
- package/dist/assets/i18n/table-header.i18n.nl.json +6 -0
- package/dist/assets/i18n/table.i18n.en.json +13 -0
- package/dist/assets/i18n/table.i18n.nl.json +13 -0
- package/dist/assets/icons/camera.svg +10 -0
- package/dist/assets/icons/filter.svg +6 -13
- package/dist/assets/icons/menu.svg +25 -0
- package/dist/assets/icons/more.svg +18 -0
- package/dist/assets/icons/reload.svg +10 -0
- package/dist/assets/icons/signout.svg +23 -0
- package/dist/assets/icons/switch.svg +20 -0
- package/dist/assets/illustrations/e-mail.svg +1 -0
- package/dist/assets/illustrations/empty-state-overview.svg +65 -0
- package/dist/assets/illustrations/empty-state-search.svg +88 -0
- package/dist/build/index.esm.js +1 -0
- package/dist/build/p-003d104f.entry.js +1 -0
- package/dist/build/p-0688d548.entry.js +1 -0
- package/dist/build/p-07f28695.entry.js +1 -0
- package/dist/build/p-09ea2a1a.js +1 -0
- package/dist/build/p-12f5c483.entry.js +1 -0
- package/dist/build/p-1ba7cadc.entry.js +1 -0
- package/dist/build/p-226fd83c.entry.js +1 -0
- package/dist/build/p-2ca0cda1.entry.js +1 -0
- package/dist/build/p-2e47afc7.entry.js +1 -0
- package/dist/build/p-3946e0a3.entry.js +1 -0
- package/dist/build/p-3a98b145.entry.js +1 -0
- package/dist/build/p-4a3482c8.entry.js +1 -0
- package/dist/build/p-4e650fe4.js +1 -0
- package/dist/build/p-529ccaf7.entry.js +1 -0
- package/dist/build/p-62d49606.entry.js +1 -0
- package/dist/build/p-63de1c3d.entry.js +1 -0
- package/dist/build/p-681ed79b.entry.js +1 -0
- package/dist/build/p-6c60fd3d.js +1 -0
- package/dist/build/p-6cc16633.entry.js +1 -0
- package/dist/build/p-7df6230f.entry.js +1 -0
- package/dist/build/p-7efdf2a1.entry.js +1 -0
- package/dist/build/p-7f4b2d8e.entry.js +1 -0
- package/dist/build/p-80a032ae.entry.js +1 -0
- package/dist/build/p-8a6728d5.js +1 -0
- package/dist/build/p-8b09a126.entry.js +1 -0
- package/dist/build/p-91d032b2.entry.js +1 -0
- package/dist/build/p-9315c1e2.entry.js +1 -0
- package/dist/build/p-98e3dcd7.entry.js +1 -0
- package/dist/build/p-ac5a17c4.entry.js +1 -0
- package/dist/build/p-b4af4b21.entry.js +1 -0
- package/dist/build/p-b72559e4.entry.js +1 -0
- package/dist/build/p-b8dd503c.entry.js +1 -0
- package/dist/build/p-c9f2fa8f.js +2 -0
- package/dist/build/p-d2cf5ab2.entry.js +1 -0
- package/dist/build/p-d896ab0d.entry.js +1 -0
- package/dist/build/p-dbb409ab.entry.js +1 -0
- package/dist/build/p-e25ea1c8.entry.js +1 -0
- package/dist/build/p-f1867cb5.entry.js +1 -0
- package/dist/build/p-f499f696.entry.js +1 -0
- package/dist/build/p-f86fcdf4.js +1 -0
- package/dist/build/p-fa3216a5.entry.js +1 -0
- package/dist/build/p-fb1dc5e7.entry.js +1 -0
- package/dist/build/paperless.css +1 -81
- package/dist/build/paperless.esm.js +1 -1
- package/dist/cjs/child-of-e472f812.js +9 -0
- package/dist/cjs/constants-a4459ec9.js +7 -0
- package/dist/cjs/{index-a46a39a5.js → index-195002a8.js} +650 -261
- package/dist/cjs/index.cjs.js +17 -0
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/localization-9e2ac7f3.js +60 -0
- package/dist/cjs/object-get-by-path-6dc21ed5.js +12 -0
- package/dist/cjs/p-accordion.cjs.entry.js +34 -0
- package/dist/cjs/p-avatar-group.cjs.entry.js +20 -0
- package/dist/cjs/p-avatar.cjs.entry.js +22 -11
- package/dist/cjs/p-backdrop.cjs.entry.js +41 -0
- package/dist/cjs/p-button_3.cjs.entry.js +234 -96
- package/dist/cjs/p-card-body.cjs.entry.js +20 -0
- package/dist/cjs/p-card-container.cjs.entry.js +21 -0
- package/dist/cjs/p-card-header.cjs.entry.js +22 -0
- package/dist/cjs/p-content-slider.cjs.entry.js +210 -0
- package/dist/cjs/p-counter.cjs.entry.js +5 -3
- package/dist/cjs/p-divider.cjs.entry.js +6 -3
- package/dist/cjs/p-drawer-body_3.cjs.entry.js +49 -0
- package/dist/cjs/p-drawer.cjs.entry.js +63 -0
- package/dist/cjs/p-dropdown_3.cjs.entry.js +177 -0
- package/dist/cjs/p-helper_2.cjs.entry.js +139 -0
- package/dist/cjs/p-illustration_6.cjs.entry.js +2725 -0
- package/dist/cjs/p-info-panel.cjs.entry.js +4 -8
- package/dist/cjs/p-input-group_4.cjs.entry.js +125 -0
- package/dist/cjs/p-layout.cjs.entry.js +20 -0
- package/dist/cjs/p-modal-body_4.cjs.entry.js +77 -0
- package/dist/cjs/p-modal.cjs.entry.js +59 -0
- package/dist/cjs/p-navbar.cjs.entry.js +28 -0
- package/dist/cjs/p-navigation-item.cjs.entry.js +7 -6
- package/dist/cjs/p-page-size-select_3.cjs.entry.js +222 -0
- package/dist/cjs/p-profile.cjs.entry.js +43 -0
- package/dist/cjs/p-select.cjs.entry.js +183 -0
- package/dist/cjs/p-slider-indicator.cjs.entry.js +20 -0
- package/dist/cjs/p-status.cjs.entry.js +5 -5
- package/dist/cjs/p-stepper-item_2.cjs.entry.js +38 -0
- package/dist/cjs/p-stepper.cjs.entry.js +43 -0
- package/dist/cjs/p-tab-group.cjs.entry.js +19 -0
- package/dist/cjs/p-tab-item.cjs.entry.js +20 -0
- package/dist/cjs/p-table-column.cjs.entry.js +26 -0
- package/dist/cjs/p-table.cjs.entry.js +341 -0
- package/dist/cjs/p-toast-container.cjs.entry.js +20 -0
- package/dist/cjs/p-toast.cjs.entry.js +33 -0
- package/dist/cjs/paperless.cjs.js +3 -3
- package/dist/cjs/{popper-e0c4ed4c.js → popper-d7a0f999.js} +60 -49
- package/dist/collection/assets/icons/camera.svg +10 -0
- package/dist/collection/assets/icons/filter.svg +6 -13
- package/dist/collection/assets/icons/menu.svg +25 -0
- package/dist/collection/assets/icons/more.svg +18 -0
- package/dist/collection/assets/icons/reload.svg +10 -0
- package/dist/collection/assets/icons/signout.svg +23 -0
- package/dist/collection/assets/icons/switch.svg +20 -0
- package/dist/collection/assets/illustrations/e-mail.svg +1 -0
- package/dist/collection/assets/illustrations/empty-state-overview.svg +65 -0
- package/dist/collection/assets/illustrations/empty-state-search.svg +88 -0
- package/dist/collection/collection-manifest.json +41 -3
- package/dist/collection/components/atoms/avatar/avatar.component.css +1 -31
- package/dist/collection/components/atoms/avatar/avatar.component.js +110 -90
- package/dist/collection/components/atoms/avatar-group/avatar-group.component.css +1 -0
- package/dist/collection/components/atoms/avatar-group/avatar-group.component.js +41 -0
- package/dist/collection/components/atoms/backdrop/backdrop.component.css +1 -0
- package/dist/collection/components/atoms/backdrop/backdrop.component.js +148 -0
- package/dist/collection/components/atoms/button/button.component.css +1 -71
- package/dist/collection/components/atoms/button/button.component.js +307 -226
- package/dist/collection/components/atoms/card-body/card-body.component.css +1 -0
- package/dist/collection/components/atoms/card-body/card-body.component.js +42 -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 +62 -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 +61 -0
- package/dist/collection/components/atoms/counter/counter.component.css +1 -5
- package/dist/collection/components/atoms/counter/counter.component.js +56 -9
- package/dist/collection/components/atoms/divider/divider.component.css +1 -3
- package/dist/collection/components/atoms/divider/divider.component.js +15 -8
- package/dist/collection/components/atoms/drawer-body/drawer-body.component.css +1 -0
- package/dist/collection/components/atoms/drawer-body/drawer-body.component.js +43 -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 +47 -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 +65 -0
- package/dist/collection/components/atoms/dropdown-menu-container/dropdown-menu-container.component.css +1 -5
- package/dist/collection/components/atoms/dropdown-menu-container/dropdown-menu-container.component.js +37 -9
- package/dist/collection/components/atoms/dropdown-menu-item/dropdown-menu-item.component.css +1 -13
- package/dist/collection/components/atoms/dropdown-menu-item/dropdown-menu-item.component.js +74 -30
- package/dist/collection/components/atoms/helper/helper.component.css +1 -7
- package/dist/collection/components/atoms/helper/helper.component.js +42 -12
- package/dist/collection/components/atoms/icon/icon.component.css +1 -0
- package/dist/collection/components/atoms/icon/icon.component.js +138 -91
- package/dist/collection/components/atoms/illustration/illustration.component.js +28 -23
- package/dist/collection/components/atoms/info-panel/info-panel.component.css +1 -28
- package/dist/collection/components/atoms/info-panel/info-panel.component.js +85 -89
- package/dist/collection/components/atoms/label/label.component.css +1 -0
- package/dist/collection/components/atoms/label/label.component.js +170 -0
- package/dist/collection/components/atoms/layout/layout.component.css +1 -0
- package/dist/collection/components/atoms/layout/layout.component.js +43 -0
- package/dist/collection/components/atoms/loader/loader.component.css +1 -26
- package/dist/collection/components/atoms/loader/loader.component.js +112 -114
- package/dist/collection/components/atoms/modal-body/modal-body.component.css +1 -0
- package/dist/collection/components/atoms/modal-body/modal-body.component.js +62 -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 +74 -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 +18 -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 +65 -0
- package/dist/collection/components/atoms/pagination-item/pagination-item.component.css +1 -16
- package/dist/collection/components/atoms/pagination-item/pagination-item.component.js +34 -32
- package/dist/collection/components/atoms/segment-container/segment-container.component.css +1 -5
- package/dist/collection/components/atoms/segment-container/segment-container.component.js +12 -9
- package/dist/collection/components/atoms/segment-item/segment-item.component.css +1 -21
- package/dist/collection/components/atoms/segment-item/segment-item.component.js +98 -87
- package/dist/collection/components/atoms/slider-indicator/slider-indicator.component.css +1 -0
- package/dist/collection/components/atoms/slider-indicator/slider-indicator.component.js +43 -0
- package/dist/collection/components/atoms/status/status.component.css +1 -16
- package/dist/collection/components/atoms/status/status.component.js +98 -89
- package/dist/collection/components/atoms/stepper-item/stepper-item.component.css +1 -0
- package/dist/collection/components/atoms/stepper-item/stepper-item.component.js +100 -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 +62 -0
- package/dist/collection/components/atoms/tab-group/tab-group.component.css +1 -0
- package/dist/collection/components/atoms/tab-group/tab-group.component.js +18 -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 +43 -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 +18 -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 +43 -0
- package/dist/collection/components/atoms/tooltip/tooltip.component.css +1 -40
- package/dist/collection/components/atoms/tooltip/tooltip.component.js +196 -164
- package/dist/collection/components/helpers/table-column/table-column.component.js +150 -0
- package/dist/collection/components/molecules/accordion/accordion.component.css +1 -0
- package/dist/collection/components/molecules/accordion/accordion.component.js +127 -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 +316 -0
- package/dist/collection/components/molecules/dropdown/dropdown.component.css +1 -9
- package/dist/collection/components/molecules/dropdown/dropdown.component.js +238 -127
- package/dist/collection/components/molecules/input-group/input-group.component.css +1 -0
- package/dist/collection/components/molecules/input-group/input-group.component.js +334 -0
- package/dist/collection/components/molecules/navigation-item/navigation-item.component.css +1 -28
- package/dist/collection/components/molecules/navigation-item/navigation-item.component.js +106 -104
- package/dist/collection/components/molecules/page-size-select/constants.js +2 -0
- package/dist/collection/components/molecules/page-size-select/page-size-select.component.js +204 -0
- package/dist/collection/components/molecules/pagination/pagination.component.css +1 -3
- package/dist/collection/components/molecules/pagination/pagination.component.js +118 -94
- package/dist/collection/components/molecules/profile/profile.component.css +1 -0
- package/dist/collection/components/molecules/profile/profile.component.js +89 -0
- package/dist/collection/components/molecules/select/select.component.css +1 -0
- package/dist/collection/components/molecules/select/select.component.js +570 -0
- package/dist/collection/components/molecules/stepper/stepper.component.css +1 -0
- package/dist/collection/components/molecules/stepper/stepper.component.js +84 -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 +262 -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 +275 -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 +380 -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 +64 -0
- package/dist/collection/components/molecules/toast/toast.component.css +1 -0
- package/dist/collection/components/molecules/toast/toast.component.js +196 -0
- package/dist/collection/components/organisms/drawer/drawer.component.css +1 -0
- package/dist/collection/components/organisms/drawer/drawer.component.js +233 -0
- package/dist/collection/components/organisms/modal/modal.component.js +258 -0
- package/dist/collection/components/organisms/navbar/navbar.component.css +1 -0
- package/dist/collection/components/organisms/navbar/navbar.component.js +89 -0
- package/dist/collection/components/organisms/table/table.component.css +1 -0
- package/dist/collection/components/organisms/table/table.component.js +1164 -0
- package/dist/collection/index.js +2 -1
- package/dist/collection/tailwind/animation.js +87 -0
- package/dist/collection/tailwind/backdrop-blur.js +3 -0
- package/dist/collection/tailwind/height.js +3 -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 +18 -0
- package/dist/collection/tailwind/z-index.js +17 -0
- package/dist/collection/tailwind.config.js +28 -14
- package/dist/collection/types/index.js +2 -0
- package/dist/collection/types/table.js +1 -0
- package/dist/collection/types/tailwind.js +1 -0
- package/dist/collection/utils/icons.js +12 -0
- package/dist/collection/utils/illustrations.js +6 -0
- package/dist/collection/utils/index.js +6 -0
- package/dist/collection/utils/localization.js +55 -0
- package/dist/collection/utils/object-get-by-path.js +8 -0
- package/dist/collection/utils/transformers.js +4 -0
- package/dist/components/backdrop.component.js +57 -0
- package/dist/components/button.component.js +98 -0
- package/dist/components/counter.component.js +8 -3
- package/dist/components/divider.component.js +33 -0
- package/dist/components/drawer-body.component.js +33 -0
- package/dist/components/drawer-container.component.js +32 -0
- package/dist/components/drawer-header.component.js +52 -0
- package/dist/components/dropdown-menu-container.component.js +6 -3
- package/dist/components/dropdown-menu-item.component.js +43 -0
- package/dist/components/dropdown.component.js +178 -0
- package/dist/components/helper.component.js +39 -0
- package/dist/components/icon.component.js +170 -27
- package/dist/{cjs/p-illustration.cjs.entry.js → components/illustration.component.js} +188 -16
- package/dist/components/index.d.ts +57 -19
- package/dist/components/index.js +48 -0
- package/dist/components/input-group.component.js +113 -0
- package/dist/components/label.component.js +52 -0
- package/dist/components/loader.component.js +9 -13
- package/dist/components/localization.js +57 -0
- package/dist/components/modal-body.component.js +35 -0
- package/dist/components/modal-container.component.js +47 -0
- package/dist/components/modal-footer.component.js +36 -0
- package/dist/components/modal-header.component.js +52 -0
- package/dist/components/p-accordion.d.ts +11 -0
- package/dist/components/p-accordion.js +65 -0
- package/dist/components/p-avatar-group.d.ts +11 -0
- package/dist/components/p-avatar-group.js +35 -0
- package/dist/components/p-avatar.js +24 -14
- package/dist/components/p-backdrop.d.ts +11 -0
- package/dist/components/p-backdrop.js +6 -0
- package/dist/components/p-button.js +1 -93
- package/dist/components/p-card-body.d.ts +11 -0
- package/dist/components/p-card-body.js +35 -0
- package/dist/components/p-card-container.d.ts +11 -0
- package/dist/components/p-card-container.js +38 -0
- package/dist/components/p-card-header.d.ts +11 -0
- package/dist/components/p-card-header.js +44 -0
- package/dist/components/p-content-slider.d.ts +11 -0
- package/dist/components/p-content-slider.js +239 -0
- package/dist/components/p-divider.js +1 -28
- package/dist/components/p-drawer-body.d.ts +11 -0
- package/dist/components/p-drawer-body.js +6 -0
- package/dist/components/p-drawer-container.d.ts +11 -0
- package/dist/components/p-drawer-container.js +6 -0
- package/dist/components/p-drawer-header.d.ts +11 -0
- package/dist/components/p-drawer-header.js +6 -0
- package/dist/components/p-drawer.d.ts +11 -0
- package/dist/components/p-drawer.js +128 -0
- package/dist/components/p-dropdown-menu-item.js +1 -34
- package/dist/components/p-dropdown.js +1 -151
- package/dist/components/p-helper.js +1 -34
- package/dist/components/p-illustration.js +1 -1432
- package/dist/components/p-info-panel.js +3 -7
- package/dist/components/p-input-group.d.ts +11 -0
- package/dist/components/p-input-group.js +6 -0
- package/dist/components/p-label.d.ts +11 -0
- package/dist/components/p-label.js +6 -0
- package/dist/components/p-layout.d.ts +11 -0
- package/dist/components/p-layout.js +36 -0
- package/dist/components/p-modal-body.d.ts +11 -0
- package/dist/components/p-modal-body.js +6 -0
- package/dist/components/p-modal-container.d.ts +11 -0
- package/dist/components/p-modal-container.js +6 -0
- package/dist/components/p-modal-footer.d.ts +11 -0
- package/dist/components/p-modal-footer.js +6 -0
- package/dist/components/p-modal-header.d.ts +11 -0
- package/dist/components/p-modal-header.js +6 -0
- package/dist/components/p-modal.d.ts +11 -0
- package/dist/components/p-modal.js +138 -0
- package/dist/components/p-navbar.d.ts +11 -0
- package/dist/components/p-navbar.js +70 -0
- package/dist/components/p-navigation-item.js +6 -5
- package/dist/components/p-page-size-select.d.ts +11 -0
- package/dist/components/p-page-size-select.js +6 -0
- package/dist/components/p-pagination.js +1 -195
- package/dist/components/p-profile.d.ts +11 -0
- package/dist/components/p-profile.js +79 -0
- package/dist/components/p-segment-container.js +1 -27
- package/dist/components/p-segment-item.js +1 -49
- package/dist/components/p-select.d.ts +11 -0
- package/dist/components/p-select.js +265 -0
- package/dist/components/p-slider-indicator.d.ts +11 -0
- package/dist/components/p-slider-indicator.js +6 -0
- package/dist/components/p-status.js +4 -4
- package/dist/components/p-stepper-item.d.ts +11 -0
- package/dist/components/p-stepper-item.js +6 -0
- package/dist/components/p-stepper-line.d.ts +11 -0
- package/dist/components/p-stepper-line.js +6 -0
- package/dist/components/p-stepper.d.ts +11 -0
- package/dist/components/p-stepper.js +78 -0
- package/dist/components/p-tab-group.d.ts +11 -0
- package/dist/components/p-tab-group.js +39 -0
- package/dist/components/p-tab-item.d.ts +11 -0
- package/dist/components/p-tab-item.js +36 -0
- package/dist/components/p-table-cell.d.ts +11 -0
- package/dist/components/p-table-cell.js +6 -0
- package/dist/components/p-table-column.d.ts +11 -0
- package/dist/components/p-table-column.js +46 -0
- package/dist/components/p-table-container.d.ts +11 -0
- package/dist/components/p-table-container.js +6 -0
- package/dist/components/p-table-footer.d.ts +11 -0
- package/dist/components/p-table-footer.js +6 -0
- package/dist/components/p-table-header.d.ts +11 -0
- package/dist/components/p-table-header.js +6 -0
- package/dist/components/p-table-row.d.ts +11 -0
- package/dist/components/p-table-row.js +6 -0
- package/dist/components/p-table.d.ts +11 -0
- package/dist/components/p-table.js +521 -0
- package/dist/components/p-toast-container.d.ts +11 -0
- package/dist/components/p-toast-container.js +36 -0
- package/dist/components/p-toast.d.ts +11 -0
- package/dist/components/p-toast.js +73 -0
- package/dist/components/page-size-select.component.js +105 -0
- package/dist/components/pagination-item.component.js +1 -4
- package/dist/components/pagination.component.js +194 -0
- package/dist/components/popper.js +60 -49
- package/dist/components/segment-container.component.js +29 -0
- package/dist/components/segment-item.component.js +51 -0
- package/dist/components/slider-indicator.component.js +33 -0
- package/dist/components/stepper-item.component.js +45 -0
- package/dist/components/stepper-line.component.js +35 -0
- package/dist/components/table-cell.component.js +143 -0
- package/dist/components/table-container.component.js +30 -0
- package/dist/components/table-footer.component.js +127 -0
- package/dist/components/table-header.component.js +1048 -0
- package/dist/components/table-row.component.js +43 -0
- package/dist/components/tooltip.component.js +16 -27
- package/dist/esm/child-of-90a8c4b5.js +7 -0
- package/dist/esm/constants-826f9460.js +4 -0
- package/dist/esm/{index-a68e547b.js → index-8170b4fb.js} +650 -261
- package/dist/esm/index.js +9 -0
- package/dist/esm/loader.js +3 -3
- package/dist/esm/localization-901dc2d3.js +57 -0
- package/dist/esm/object-get-by-path-d6427a61.js +10 -0
- package/dist/esm/p-accordion.entry.js +30 -0
- package/dist/esm/p-avatar-group.entry.js +16 -0
- package/dist/esm/p-avatar.entry.js +22 -11
- package/dist/esm/p-backdrop.entry.js +37 -0
- package/dist/esm/p-button_3.entry.js +234 -96
- package/dist/esm/p-card-body.entry.js +16 -0
- package/dist/esm/p-card-container.entry.js +17 -0
- package/dist/esm/p-card-header.entry.js +18 -0
- package/dist/esm/p-content-slider.entry.js +206 -0
- package/dist/esm/p-counter.entry.js +5 -3
- package/dist/esm/p-divider.entry.js +6 -3
- package/dist/esm/p-drawer-body_3.entry.js +43 -0
- package/dist/esm/p-drawer.entry.js +59 -0
- package/dist/esm/p-dropdown_3.entry.js +171 -0
- package/dist/esm/p-helper_2.entry.js +134 -0
- package/dist/esm/{p-illustration.entry.js → p-illustration_6.entry.js} +1305 -8
- package/dist/esm/p-info-panel.entry.js +4 -8
- package/dist/esm/p-input-group_4.entry.js +118 -0
- package/dist/esm/p-layout.entry.js +16 -0
- package/dist/esm/p-modal-body_4.entry.js +70 -0
- package/dist/esm/p-modal.entry.js +55 -0
- package/dist/esm/p-navbar.entry.js +24 -0
- package/dist/esm/p-navigation-item.entry.js +7 -6
- package/dist/esm/p-page-size-select_3.entry.js +216 -0
- package/dist/esm/p-profile.entry.js +39 -0
- package/dist/esm/p-select.entry.js +179 -0
- package/dist/esm/p-slider-indicator.entry.js +16 -0
- package/dist/esm/p-status.entry.js +5 -5
- package/dist/esm/p-stepper-item_2.entry.js +33 -0
- package/dist/esm/p-stepper.entry.js +39 -0
- package/dist/esm/p-tab-group.entry.js +15 -0
- package/dist/esm/p-tab-item.entry.js +16 -0
- package/dist/esm/p-table-column.entry.js +22 -0
- package/dist/esm/p-table.entry.js +337 -0
- package/dist/esm/p-toast-container.entry.js +16 -0
- package/dist/esm/p-toast.entry.js +29 -0
- package/dist/esm/paperless.js +3 -3
- package/dist/esm/polyfills/core-js.js +0 -0
- package/dist/esm/polyfills/css-shim.js +1 -1
- package/dist/esm/polyfills/dom.js +0 -0
- package/dist/esm/polyfills/es5-html-element.js +0 -0
- package/dist/esm/polyfills/index.js +0 -0
- package/dist/esm/polyfills/system.js +0 -0
- package/dist/esm/{popper-41c6f9cd.js → popper-42db9fbd.js} +60 -49
- package/dist/index.html +1 -1
- package/dist/paperless/index.esm.js +1 -0
- package/dist/paperless/p-003d104f.entry.js +1 -0
- package/dist/paperless/p-0688d548.entry.js +1 -0
- package/dist/paperless/p-07f28695.entry.js +1 -0
- package/dist/paperless/p-09ea2a1a.js +1 -0
- package/dist/paperless/p-12f5c483.entry.js +1 -0
- package/dist/paperless/p-1ba7cadc.entry.js +1 -0
- package/dist/paperless/p-226fd83c.entry.js +1 -0
- package/dist/paperless/p-2ca0cda1.entry.js +1 -0
- package/dist/paperless/p-2e47afc7.entry.js +1 -0
- package/dist/paperless/p-3946e0a3.entry.js +1 -0
- package/dist/paperless/p-3a98b145.entry.js +1 -0
- package/dist/paperless/p-4a3482c8.entry.js +1 -0
- package/dist/paperless/p-4e650fe4.js +1 -0
- package/dist/paperless/p-529ccaf7.entry.js +1 -0
- package/dist/paperless/p-62d49606.entry.js +1 -0
- package/dist/paperless/p-63de1c3d.entry.js +1 -0
- package/dist/paperless/p-681ed79b.entry.js +1 -0
- package/dist/paperless/p-6c60fd3d.js +1 -0
- package/dist/paperless/p-6cc16633.entry.js +1 -0
- package/dist/paperless/p-7df6230f.entry.js +1 -0
- package/dist/paperless/p-7efdf2a1.entry.js +1 -0
- package/dist/paperless/p-7f4b2d8e.entry.js +1 -0
- package/dist/paperless/p-80a032ae.entry.js +1 -0
- package/dist/paperless/p-8a6728d5.js +1 -0
- package/dist/paperless/p-8b09a126.entry.js +1 -0
- package/dist/paperless/p-91d032b2.entry.js +1 -0
- package/dist/paperless/p-9315c1e2.entry.js +1 -0
- package/dist/paperless/p-98e3dcd7.entry.js +1 -0
- package/dist/paperless/p-ac5a17c4.entry.js +1 -0
- package/dist/paperless/p-b4af4b21.entry.js +1 -0
- package/dist/paperless/p-b72559e4.entry.js +1 -0
- package/dist/paperless/p-b8dd503c.entry.js +1 -0
- package/dist/paperless/p-c9f2fa8f.js +2 -0
- package/dist/paperless/p-d2cf5ab2.entry.js +1 -0
- package/dist/paperless/p-d896ab0d.entry.js +1 -0
- package/dist/paperless/p-dbb409ab.entry.js +1 -0
- package/dist/paperless/p-e25ea1c8.entry.js +1 -0
- package/dist/paperless/p-f1867cb5.entry.js +1 -0
- package/dist/paperless/p-f499f696.entry.js +1 -0
- package/dist/paperless/p-f86fcdf4.js +1 -0
- package/dist/paperless/p-fa3216a5.entry.js +1 -0
- package/dist/paperless/p-fb1dc5e7.entry.js +1 -0
- package/dist/paperless/paperless.css +596 -26775
- package/dist/paperless/paperless.esm.js +1 -1
- package/dist/style/_fonts.scss +70 -0
- package/dist/style/_helpers.scss +5 -0
- package/dist/style/_reset.scss +31 -0
- package/dist/style/_tailwind.scss +3 -0
- package/dist/style/_typograhpy.scss +29 -0
- package/dist/style/_variables.scss +2 -0
- package/dist/style/form/_checkbox.scss +62 -0
- package/dist/style/form/_input.scss +22 -0
- package/dist/style/form/_mixins.scss +107 -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 -644
- 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 +10 -0
- package/dist/tailwind/colors.js +52 -0
- package/dist/tailwind/height.js +3 -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 +18 -0
- package/dist/tailwind/z-index.js +17 -0
- package/dist/tailwind.config.js +28 -14
- package/dist/types/components/atoms/avatar/avatar.component.d.ts +3 -1
- package/dist/types/components/atoms/avatar-group/avatar-group.component.d.ts +7 -0
- package/dist/types/components/atoms/backdrop/backdrop.component.d.ts +31 -0
- package/dist/types/components/atoms/button/button.component.d.ts +18 -1
- package/dist/types/components/atoms/card-body/card-body.component.d.ts +7 -0
- package/dist/types/components/atoms/card-container/card-container.component.d.ts +11 -0
- package/dist/types/components/atoms/card-header/card-header.component.d.ts +11 -0
- package/dist/types/components/atoms/counter/counter.component.d.ts +8 -0
- package/dist/types/components/atoms/divider/divider.component.d.ts +4 -0
- package/dist/types/components/atoms/drawer-body/drawer-body.component.d.ts +7 -0
- package/dist/types/components/atoms/drawer-container/drawer-container.component.d.ts +7 -0
- package/dist/types/components/atoms/drawer-header/drawer-header.component.d.ts +12 -0
- package/dist/types/components/atoms/dropdown-menu-container/dropdown-menu-container.component.d.ts +4 -0
- package/dist/types/components/atoms/dropdown-menu-item/dropdown-menu-item.component.d.ts +9 -0
- package/dist/types/components/atoms/helper/helper.component.d.ts +5 -0
- package/dist/types/components/atoms/icon/icon.component.d.ts +3 -3
- package/dist/types/components/atoms/label/label.component.d.ts +33 -0
- package/dist/types/components/atoms/layout/layout.component.d.ts +7 -0
- package/dist/types/components/atoms/loader/loader.component.d.ts +1 -1
- package/dist/types/components/atoms/modal-body/modal-body.component.d.ts +11 -0
- package/dist/types/components/atoms/modal-container/modal-container.component.d.ts +11 -0
- package/dist/types/components/atoms/modal-footer/modal-footer.component.d.ts +3 -0
- package/dist/types/components/atoms/modal-header/modal-header.component.d.ts +12 -0
- package/dist/types/components/atoms/segment-item/segment-item.component.d.ts +2 -1
- package/dist/types/components/atoms/slider-indicator/slider-indicator.component.d.ts +7 -0
- package/dist/types/components/atoms/status/status.component.d.ts +2 -1
- package/dist/types/components/atoms/stepper-item/stepper-item.component.d.ts +19 -0
- package/dist/types/components/atoms/stepper-line/stepper-line.component.d.ts +11 -0
- package/dist/types/components/atoms/tab-group/tab-group.component.d.ts +3 -0
- package/dist/types/components/atoms/tab-item/tab-item.component.d.ts +7 -0
- package/dist/types/components/atoms/table-container/table-container.component.d.ts +3 -0
- package/dist/types/components/atoms/toast-container/toast-container.component.d.ts +7 -0
- package/dist/types/components/atoms/tooltip/tooltip.component.d.ts +11 -2
- package/dist/types/components/helpers/table-column/table-column.component.d.ts +34 -0
- package/dist/types/components/molecules/accordion/accordion.component.d.ts +25 -0
- package/dist/types/components/molecules/content-slider/content-slider.component.d.ts +53 -0
- package/dist/types/components/molecules/dropdown/dropdown.component.d.ts +23 -3
- package/dist/types/components/molecules/input-group/input-group.component.d.ts +67 -0
- package/dist/types/components/molecules/page-size-select/constants.d.ts +2 -0
- package/dist/types/components/molecules/page-size-select/page-size-select.component.d.ts +50 -0
- package/dist/types/components/molecules/pagination/pagination.component.d.ts +7 -0
- package/dist/types/components/molecules/profile/profile.component.d.ts +20 -0
- package/dist/types/components/molecules/select/select.component.d.ts +115 -0
- package/dist/types/components/molecules/stepper/stepper.component.d.ts +18 -0
- package/dist/types/components/molecules/table-cell/table-cell.component.d.ts +42 -0
- package/dist/types/components/molecules/table-footer/table-footer.component.d.ts +63 -0
- package/dist/types/components/molecules/table-header/table-header.component.d.ts +87 -0
- package/dist/types/components/molecules/table-row/table-row.component.d.ts +11 -0
- package/dist/types/components/molecules/toast/toast.component.d.ts +39 -0
- package/dist/types/components/organisms/drawer/drawer.component.d.ts +52 -0
- package/dist/types/components/organisms/modal/modal.component.d.ts +58 -0
- package/dist/types/components/organisms/navbar/navbar.component.d.ts +14 -0
- package/dist/types/components/organisms/table/table.component.d.ts +214 -0
- package/dist/types/components.d.ts +2539 -279
- package/dist/types/index.d.ts +2 -0
- package/dist/types/stencil-public-runtime.d.ts +20 -4
- package/dist/types/types/index.d.ts +2 -0
- package/dist/types/types/table.d.ts +27 -0
- package/dist/types/types/tailwind.d.ts +2 -0
- package/dist/types/utils/icons.d.ts +6 -0
- package/dist/types/utils/illustrations.d.ts +3 -0
- package/dist/types/utils/index.d.ts +6 -0
- package/dist/types/utils/localization.d.ts +2 -0
- package/dist/types/utils/object-get-by-path.d.ts +1 -0
- package/dist/types/utils/transformers.d.ts +2 -0
- package/dist/workbox-5b279812.js +2 -0
- package/dist/workbox-5b279812.js.map +1 -0
- package/loader/package.json +1 -0
- package/package.json +64 -61
- package/dist/build/p-17c11169.entry.js +0 -1
- package/dist/build/p-1d8fa6a1.entry.js +0 -1
- package/dist/build/p-41e5458b.entry.js +0 -1
- package/dist/build/p-42dab9d4.entry.js +0 -1
- package/dist/build/p-47b52f92.entry.js +0 -1
- package/dist/build/p-5ec6ea71.entry.js +0 -1
- package/dist/build/p-75f909ab.entry.js +0 -1
- package/dist/build/p-76464e0b.js +0 -2
- package/dist/build/p-8501ba07.entry.js +0 -1
- package/dist/build/p-a669807e.entry.js +0 -1
- package/dist/build/p-a7086ffa.js +0 -1
- package/dist/build/p-aa28fef8.entry.js +0 -1
- package/dist/build/p-aae3d4f0.entry.js +0 -1
- package/dist/build/p-adcb0b93.entry.js +0 -1
- package/dist/build/p-bbec0e86.entry.js +0 -1
- package/dist/build/p-d7c82962.entry.js +0 -1
- package/dist/build/p-e7019eab.entry.js +0 -1
- package/dist/build/p-f689996b.entry.js +0 -1
- package/dist/build/p-faa4ee42.entry.js +0 -1
- package/dist/cjs/p-dropdown-menu-container.cjs.entry.js +0 -19
- package/dist/cjs/p-dropdown-menu-item.cjs.entry.js +0 -23
- package/dist/cjs/p-dropdown.cjs.entry.js +0 -131
- package/dist/cjs/p-helper.cjs.entry.js +0 -19
- package/dist/cjs/p-pagination-item.cjs.entry.js +0 -23
- package/dist/cjs/p-pagination.cjs.entry.js +0 -171
- package/dist/cjs/p-segment-container.cjs.entry.js +0 -19
- package/dist/cjs/p-segment-item.cjs.entry.js +0 -29
- package/dist/cjs/p-tooltip.cjs.entry.js +0 -137
- package/dist/collection/tailwind/grid.js +0 -26
- package/dist/collection/utils/utils.js +0 -3
- package/dist/esm/p-dropdown-menu-container.entry.js +0 -15
- package/dist/esm/p-dropdown-menu-item.entry.js +0 -19
- package/dist/esm/p-dropdown.entry.js +0 -127
- package/dist/esm/p-helper.entry.js +0 -15
- package/dist/esm/p-pagination-item.entry.js +0 -19
- package/dist/esm/p-pagination.entry.js +0 -167
- package/dist/esm/p-segment-container.entry.js +0 -15
- package/dist/esm/p-segment-item.entry.js +0 -25
- package/dist/esm/p-tooltip.entry.js +0 -133
- package/dist/paperless/p-17c11169.entry.js +0 -1
- package/dist/paperless/p-1d8fa6a1.entry.js +0 -1
- package/dist/paperless/p-41e5458b.entry.js +0 -1
- package/dist/paperless/p-42dab9d4.entry.js +0 -1
- package/dist/paperless/p-47b52f92.entry.js +0 -1
- package/dist/paperless/p-5ec6ea71.entry.js +0 -1
- package/dist/paperless/p-75f909ab.entry.js +0 -1
- package/dist/paperless/p-76464e0b.js +0 -2
- package/dist/paperless/p-8501ba07.entry.js +0 -1
- package/dist/paperless/p-a669807e.entry.js +0 -1
- package/dist/paperless/p-a7086ffa.js +0 -1
- package/dist/paperless/p-aa28fef8.entry.js +0 -1
- package/dist/paperless/p-aae3d4f0.entry.js +0 -1
- package/dist/paperless/p-adcb0b93.entry.js +0 -1
- package/dist/paperless/p-bbec0e86.entry.js +0 -1
- package/dist/paperless/p-d7c82962.entry.js +0 -1
- package/dist/paperless/p-e7019eab.entry.js +0 -1
- package/dist/paperless/p-f689996b.entry.js +0 -1
- package/dist/paperless/p-faa4ee42.entry.js +0 -1
- package/dist/types/utils/utils.d.ts +0 -1
|
@@ -22,6 +22,14 @@ function _interopNamespace(e) {
|
|
|
22
22
|
|
|
23
23
|
const NAMESPACE = 'paperless';
|
|
24
24
|
|
|
25
|
+
/**
|
|
26
|
+
* Virtual DOM patching algorithm based on Snabbdom by
|
|
27
|
+
* Simon Friis Vindum (@paldepind)
|
|
28
|
+
* Licensed under the MIT License
|
|
29
|
+
* https://github.com/snabbdom/snabbdom/blob/master/LICENSE
|
|
30
|
+
*
|
|
31
|
+
* Modified for Stencil's renderer and slot projection
|
|
32
|
+
*/
|
|
25
33
|
let scopeId;
|
|
26
34
|
let contentRef;
|
|
27
35
|
let hostTagName;
|
|
@@ -30,62 +38,6 @@ let checkSlotFallbackVisibility = false;
|
|
|
30
38
|
let checkSlotRelocate = false;
|
|
31
39
|
let isSvgMode = false;
|
|
32
40
|
let queuePending = false;
|
|
33
|
-
const win = typeof window !== 'undefined' ? window : {};
|
|
34
|
-
const doc = win.document || { head: {} };
|
|
35
|
-
const plt = {
|
|
36
|
-
$flags$: 0,
|
|
37
|
-
$resourcesUrl$: '',
|
|
38
|
-
jmp: (h) => h(),
|
|
39
|
-
raf: (h) => requestAnimationFrame(h),
|
|
40
|
-
ael: (el, eventName, listener, opts) => el.addEventListener(eventName, listener, opts),
|
|
41
|
-
rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),
|
|
42
|
-
ce: (eventName, opts) => new CustomEvent(eventName, opts),
|
|
43
|
-
};
|
|
44
|
-
const promiseResolve = (v) => Promise.resolve(v);
|
|
45
|
-
const supportsConstructibleStylesheets = /*@__PURE__*/ (() => {
|
|
46
|
-
try {
|
|
47
|
-
new CSSStyleSheet();
|
|
48
|
-
return typeof new CSSStyleSheet().replace === 'function';
|
|
49
|
-
}
|
|
50
|
-
catch (e) { }
|
|
51
|
-
return false;
|
|
52
|
-
})()
|
|
53
|
-
;
|
|
54
|
-
const addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) => {
|
|
55
|
-
if (listeners) {
|
|
56
|
-
listeners.map(([flags, name, method]) => {
|
|
57
|
-
const target = getHostListenerTarget(elm, flags) ;
|
|
58
|
-
const handler = hostListenerProxy(hostRef, method);
|
|
59
|
-
const opts = hostListenerOpts(flags);
|
|
60
|
-
plt.ael(target, name, handler, opts);
|
|
61
|
-
(hostRef.$rmListeners$ = hostRef.$rmListeners$ || []).push(() => plt.rel(target, name, handler, opts));
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
};
|
|
65
|
-
const hostListenerProxy = (hostRef, methodName) => (ev) => {
|
|
66
|
-
try {
|
|
67
|
-
{
|
|
68
|
-
if (hostRef.$flags$ & 256 /* isListenReady */) {
|
|
69
|
-
// instance is ready, let's call it's member method for this event
|
|
70
|
-
hostRef.$lazyInstance$[methodName](ev);
|
|
71
|
-
}
|
|
72
|
-
else {
|
|
73
|
-
(hostRef.$queuedListeners$ = hostRef.$queuedListeners$ || []).push([methodName, ev]);
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
catch (e) {
|
|
78
|
-
consoleError(e);
|
|
79
|
-
}
|
|
80
|
-
};
|
|
81
|
-
const getHostListenerTarget = (elm, flags) => {
|
|
82
|
-
if (flags & 4 /* TargetDocument */)
|
|
83
|
-
return doc;
|
|
84
|
-
return elm;
|
|
85
|
-
};
|
|
86
|
-
// prettier-ignore
|
|
87
|
-
const hostListenerOpts = (flags) => (flags & 2 /* Capture */) !== 0;
|
|
88
|
-
const HYDRATED_CSS = '{visibility:hidden}.hydrated{visibility:inherit}';
|
|
89
41
|
const createTime = (fnName, tagName = '') => {
|
|
90
42
|
{
|
|
91
43
|
return () => {
|
|
@@ -100,71 +52,7 @@ const uniqueTime = (key, measureText) => {
|
|
|
100
52
|
};
|
|
101
53
|
}
|
|
102
54
|
};
|
|
103
|
-
const
|
|
104
|
-
const registerStyle = (scopeId, cssText, allowCS) => {
|
|
105
|
-
let style = styles.get(scopeId);
|
|
106
|
-
if (supportsConstructibleStylesheets && allowCS) {
|
|
107
|
-
style = (style || new CSSStyleSheet());
|
|
108
|
-
style.replace(cssText);
|
|
109
|
-
}
|
|
110
|
-
else {
|
|
111
|
-
style = cssText;
|
|
112
|
-
}
|
|
113
|
-
styles.set(scopeId, style);
|
|
114
|
-
};
|
|
115
|
-
const addStyle = (styleContainerNode, cmpMeta, mode, hostElm) => {
|
|
116
|
-
let scopeId = getScopeId(cmpMeta);
|
|
117
|
-
const style = styles.get(scopeId);
|
|
118
|
-
// if an element is NOT connected then getRootNode() will return the wrong root node
|
|
119
|
-
// so the fallback is to always use the document for the root node in those cases
|
|
120
|
-
styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : doc;
|
|
121
|
-
if (style) {
|
|
122
|
-
if (typeof style === 'string') {
|
|
123
|
-
styleContainerNode = styleContainerNode.head || styleContainerNode;
|
|
124
|
-
let appliedStyles = rootAppliedStyles.get(styleContainerNode);
|
|
125
|
-
let styleElm;
|
|
126
|
-
if (!appliedStyles) {
|
|
127
|
-
rootAppliedStyles.set(styleContainerNode, (appliedStyles = new Set()));
|
|
128
|
-
}
|
|
129
|
-
if (!appliedStyles.has(scopeId)) {
|
|
130
|
-
{
|
|
131
|
-
{
|
|
132
|
-
styleElm = doc.createElement('style');
|
|
133
|
-
styleElm.innerHTML = style;
|
|
134
|
-
}
|
|
135
|
-
styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector('link'));
|
|
136
|
-
}
|
|
137
|
-
if (appliedStyles) {
|
|
138
|
-
appliedStyles.add(scopeId);
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
else if (!styleContainerNode.adoptedStyleSheets.includes(style)) {
|
|
143
|
-
styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
return scopeId;
|
|
147
|
-
};
|
|
148
|
-
const attachStyles = (hostRef) => {
|
|
149
|
-
const cmpMeta = hostRef.$cmpMeta$;
|
|
150
|
-
const elm = hostRef.$hostElement$;
|
|
151
|
-
const flags = cmpMeta.$flags$;
|
|
152
|
-
const endAttachStyles = createTime('attachStyles', cmpMeta.$tagName$);
|
|
153
|
-
const scopeId = addStyle(elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(), cmpMeta);
|
|
154
|
-
if (flags & 10 /* needsScopedEncapsulation */) {
|
|
155
|
-
// only required when we're NOT using native shadow dom (slot)
|
|
156
|
-
// or this browser doesn't support native shadow dom
|
|
157
|
-
// and this host element was NOT created with SSR
|
|
158
|
-
// let's pick out the inner content for slot projection
|
|
159
|
-
// create a node to represent where the original
|
|
160
|
-
// content was first placed, which is useful later on
|
|
161
|
-
// DOM WRITE!!
|
|
162
|
-
elm['s-sc'] = scopeId;
|
|
163
|
-
elm.classList.add(scopeId + '-h');
|
|
164
|
-
}
|
|
165
|
-
endAttachStyles();
|
|
166
|
-
};
|
|
167
|
-
const getScopeId = (cmp, mode) => 'sc-' + (cmp.$tagName$);
|
|
55
|
+
const HYDRATED_CSS = '{visibility:hidden}.hydrated{visibility:inherit}';
|
|
168
56
|
/**
|
|
169
57
|
* Default style mode id
|
|
170
58
|
*/
|
|
@@ -297,6 +185,149 @@ const convertToPrivate = (node) => {
|
|
|
297
185
|
vnode.$name$ = node.vname;
|
|
298
186
|
return vnode;
|
|
299
187
|
};
|
|
188
|
+
/**
|
|
189
|
+
* Parse a new property value for a given property type.
|
|
190
|
+
*
|
|
191
|
+
* While the prop value can reasonably be expected to be of `any` type as far as TypeScript's type checker is concerned,
|
|
192
|
+
* it is not safe to assume that the string returned by evaluating `typeof propValue` matches:
|
|
193
|
+
* 1. `any`, the type given to `propValue` in the function signature
|
|
194
|
+
* 2. the type stored from `propType`.
|
|
195
|
+
*
|
|
196
|
+
* This function provides the capability to parse/coerce a property's value to potentially any other JavaScript type.
|
|
197
|
+
*
|
|
198
|
+
* Property values represented in TSX preserve their type information. In the example below, the number 0 is passed to
|
|
199
|
+
* a component. This `propValue` will preserve its type information (`typeof propValue === 'number'`). Note that is
|
|
200
|
+
* based on the type of the value being passed in, not the type declared of the class member decorated with `@Prop`.
|
|
201
|
+
* ```tsx
|
|
202
|
+
* <my-cmp prop-val={0}></my-cmp>
|
|
203
|
+
* ```
|
|
204
|
+
*
|
|
205
|
+
* HTML prop values on the other hand, will always a string
|
|
206
|
+
*
|
|
207
|
+
* @param propValue the new value to coerce to some type
|
|
208
|
+
* @param propType the type of the prop, expressed as a binary number
|
|
209
|
+
* @returns the parsed/coerced value
|
|
210
|
+
*/
|
|
211
|
+
const parsePropertyValue = (propValue, propType) => {
|
|
212
|
+
// ensure this value is of the correct prop type
|
|
213
|
+
if (propValue != null && !isComplexType(propValue)) {
|
|
214
|
+
if (propType & 4 /* MEMBER_FLAGS.Boolean */) {
|
|
215
|
+
// per the HTML spec, any string value means it is a boolean true value
|
|
216
|
+
// but we'll cheat here and say that the string "false" is the boolean false
|
|
217
|
+
return propValue === 'false' ? false : propValue === '' || !!propValue;
|
|
218
|
+
}
|
|
219
|
+
if (propType & 2 /* MEMBER_FLAGS.Number */) {
|
|
220
|
+
// force it to be a number
|
|
221
|
+
return parseFloat(propValue);
|
|
222
|
+
}
|
|
223
|
+
if (propType & 1 /* MEMBER_FLAGS.String */) {
|
|
224
|
+
// could have been passed as a number or boolean
|
|
225
|
+
// but we still want it as a string
|
|
226
|
+
return String(propValue);
|
|
227
|
+
}
|
|
228
|
+
// redundant return here for better minification
|
|
229
|
+
return propValue;
|
|
230
|
+
}
|
|
231
|
+
// not sure exactly what type we want
|
|
232
|
+
// so no need to change to a different type
|
|
233
|
+
return propValue;
|
|
234
|
+
};
|
|
235
|
+
const getElement = (ref) => (getHostRef(ref).$hostElement$ );
|
|
236
|
+
const createEvent = (ref, name, flags) => {
|
|
237
|
+
const elm = getElement(ref);
|
|
238
|
+
return {
|
|
239
|
+
emit: (detail) => {
|
|
240
|
+
return emitEvent(elm, name, {
|
|
241
|
+
bubbles: !!(flags & 4 /* EVENT_FLAGS.Bubbles */),
|
|
242
|
+
composed: !!(flags & 2 /* EVENT_FLAGS.Composed */),
|
|
243
|
+
cancelable: !!(flags & 1 /* EVENT_FLAGS.Cancellable */),
|
|
244
|
+
detail,
|
|
245
|
+
});
|
|
246
|
+
},
|
|
247
|
+
};
|
|
248
|
+
};
|
|
249
|
+
/**
|
|
250
|
+
* Helper function to create & dispatch a custom Event on a provided target
|
|
251
|
+
* @param elm the target of the Event
|
|
252
|
+
* @param name the name to give the custom Event
|
|
253
|
+
* @param opts options for configuring a custom Event
|
|
254
|
+
* @returns the custom Event
|
|
255
|
+
*/
|
|
256
|
+
const emitEvent = (elm, name, opts) => {
|
|
257
|
+
const ev = plt.ce(name, opts);
|
|
258
|
+
elm.dispatchEvent(ev);
|
|
259
|
+
return ev;
|
|
260
|
+
};
|
|
261
|
+
const rootAppliedStyles = /*@__PURE__*/ new WeakMap();
|
|
262
|
+
const registerStyle = (scopeId, cssText, allowCS) => {
|
|
263
|
+
let style = styles.get(scopeId);
|
|
264
|
+
if (supportsConstructableStylesheets && allowCS) {
|
|
265
|
+
style = (style || new CSSStyleSheet());
|
|
266
|
+
if (typeof style === 'string') {
|
|
267
|
+
style = cssText;
|
|
268
|
+
}
|
|
269
|
+
else {
|
|
270
|
+
style.replaceSync(cssText);
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
else {
|
|
274
|
+
style = cssText;
|
|
275
|
+
}
|
|
276
|
+
styles.set(scopeId, style);
|
|
277
|
+
};
|
|
278
|
+
const addStyle = (styleContainerNode, cmpMeta, mode, hostElm) => {
|
|
279
|
+
let scopeId = getScopeId(cmpMeta);
|
|
280
|
+
const style = styles.get(scopeId);
|
|
281
|
+
// if an element is NOT connected then getRootNode() will return the wrong root node
|
|
282
|
+
// so the fallback is to always use the document for the root node in those cases
|
|
283
|
+
styleContainerNode = styleContainerNode.nodeType === 11 /* NODE_TYPE.DocumentFragment */ ? styleContainerNode : doc;
|
|
284
|
+
if (style) {
|
|
285
|
+
if (typeof style === 'string') {
|
|
286
|
+
styleContainerNode = styleContainerNode.head || styleContainerNode;
|
|
287
|
+
let appliedStyles = rootAppliedStyles.get(styleContainerNode);
|
|
288
|
+
let styleElm;
|
|
289
|
+
if (!appliedStyles) {
|
|
290
|
+
rootAppliedStyles.set(styleContainerNode, (appliedStyles = new Set()));
|
|
291
|
+
}
|
|
292
|
+
if (!appliedStyles.has(scopeId)) {
|
|
293
|
+
{
|
|
294
|
+
{
|
|
295
|
+
styleElm = doc.createElement('style');
|
|
296
|
+
styleElm.innerHTML = style;
|
|
297
|
+
}
|
|
298
|
+
styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector('link'));
|
|
299
|
+
}
|
|
300
|
+
if (appliedStyles) {
|
|
301
|
+
appliedStyles.add(scopeId);
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
else if (!styleContainerNode.adoptedStyleSheets.includes(style)) {
|
|
306
|
+
styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
return scopeId;
|
|
310
|
+
};
|
|
311
|
+
const attachStyles = (hostRef) => {
|
|
312
|
+
const cmpMeta = hostRef.$cmpMeta$;
|
|
313
|
+
const elm = hostRef.$hostElement$;
|
|
314
|
+
const flags = cmpMeta.$flags$;
|
|
315
|
+
const endAttachStyles = createTime('attachStyles', cmpMeta.$tagName$);
|
|
316
|
+
const scopeId = addStyle(elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(), cmpMeta);
|
|
317
|
+
if (flags & 10 /* CMP_FLAGS.needsScopedEncapsulation */) {
|
|
318
|
+
// only required when we're NOT using native shadow dom (slot)
|
|
319
|
+
// or this browser doesn't support native shadow dom
|
|
320
|
+
// and this host element was NOT created with SSR
|
|
321
|
+
// let's pick out the inner content for slot projection
|
|
322
|
+
// create a node to represent where the original
|
|
323
|
+
// content was first placed, which is useful later on
|
|
324
|
+
// DOM WRITE!!
|
|
325
|
+
elm['s-sc'] = scopeId;
|
|
326
|
+
elm.classList.add(scopeId + '-h');
|
|
327
|
+
}
|
|
328
|
+
endAttachStyles();
|
|
329
|
+
};
|
|
330
|
+
const getScopeId = (cmp, mode) => 'sc-' + (cmp.$tagName$);
|
|
300
331
|
/**
|
|
301
332
|
* Production setAccessor() function based on Preact by
|
|
302
333
|
* Jason Miller (@developit)
|
|
@@ -316,6 +347,31 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
316
347
|
classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
|
|
317
348
|
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
318
349
|
}
|
|
350
|
+
else if (memberName === 'style') {
|
|
351
|
+
// update style attribute, css properties and values
|
|
352
|
+
{
|
|
353
|
+
for (const prop in oldValue) {
|
|
354
|
+
if (!newValue || newValue[prop] == null) {
|
|
355
|
+
if (prop.includes('-')) {
|
|
356
|
+
elm.style.removeProperty(prop);
|
|
357
|
+
}
|
|
358
|
+
else {
|
|
359
|
+
elm.style[prop] = '';
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
for (const prop in newValue) {
|
|
365
|
+
if (!oldValue || newValue[prop] !== oldValue[prop]) {
|
|
366
|
+
if (prop.includes('-')) {
|
|
367
|
+
elm.style.setProperty(prop, newValue[prop]);
|
|
368
|
+
}
|
|
369
|
+
else {
|
|
370
|
+
elm.style[prop] = newValue[prop];
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
}
|
|
319
375
|
else if (memberName === 'ref') {
|
|
320
376
|
// minifier will clean this up
|
|
321
377
|
if (newValue) {
|
|
@@ -389,7 +445,7 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
389
445
|
}
|
|
390
446
|
}
|
|
391
447
|
}
|
|
392
|
-
else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex) {
|
|
448
|
+
else if ((!isProp || flags & 4 /* VNODE_FLAGS.isHost */ || isSvg) && !isComplex) {
|
|
393
449
|
newValue = newValue === true ? '' : newValue;
|
|
394
450
|
{
|
|
395
451
|
elm.setAttribute(memberName, newValue);
|
|
@@ -404,7 +460,7 @@ const updateElement = (oldVnode, newVnode, isSvgMode, memberName) => {
|
|
|
404
460
|
// if the element passed in is a shadow root, which is a document fragment
|
|
405
461
|
// then we want to be adding attrs/props to the shadow root's "host" element
|
|
406
462
|
// if it's not a shadow root, then we add attrs/props to the same element
|
|
407
|
-
const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host
|
|
463
|
+
const elm = newVnode.$elm$.nodeType === 11 /* NODE_TYPE.DocumentFragment */ && newVnode.$elm$.host
|
|
408
464
|
? newVnode.$elm$.host
|
|
409
465
|
: newVnode.$elm$;
|
|
410
466
|
const oldVnodeAttrs = (oldVnode && oldVnode.$attrs$) || EMPTY_OBJ;
|
|
@@ -422,6 +478,16 @@ const updateElement = (oldVnode, newVnode, isSvgMode, memberName) => {
|
|
|
422
478
|
setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName], isSvgMode, newVnode.$flags$);
|
|
423
479
|
}
|
|
424
480
|
};
|
|
481
|
+
/**
|
|
482
|
+
* Create a DOM Node corresponding to one of the children of a given VNode.
|
|
483
|
+
*
|
|
484
|
+
* @param oldParentVNode the parent VNode from the previous render
|
|
485
|
+
* @param newParentVNode the parent VNode from the current render
|
|
486
|
+
* @param childIndex the index of the VNode, in the _new_ parent node's
|
|
487
|
+
* children, for which we will create a new DOM node
|
|
488
|
+
* @param parentElm the parent DOM node which our new node will be a child of
|
|
489
|
+
* @returns the newly created node
|
|
490
|
+
*/
|
|
425
491
|
const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
426
492
|
// tslint:disable-next-line: prefer-const
|
|
427
493
|
const newVNode = newParentVNode.$children$[childIndex];
|
|
@@ -439,23 +505,23 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
439
505
|
}
|
|
440
506
|
newVNode.$flags$ |= newVNode.$children$
|
|
441
507
|
? // slot element has fallback content
|
|
442
|
-
2 /* isSlotFallback */
|
|
508
|
+
2 /* VNODE_FLAGS.isSlotFallback */
|
|
443
509
|
: // slot element does not have fallback content
|
|
444
|
-
1 /* isSlotReference */;
|
|
510
|
+
1 /* VNODE_FLAGS.isSlotReference */;
|
|
445
511
|
}
|
|
446
512
|
}
|
|
447
513
|
if (newVNode.$text$ !== null) {
|
|
448
514
|
// create text node
|
|
449
515
|
elm = newVNode.$elm$ = doc.createTextNode(newVNode.$text$);
|
|
450
516
|
}
|
|
451
|
-
else if (newVNode.$flags$ & 1 /* isSlotReference */) {
|
|
517
|
+
else if (newVNode.$flags$ & 1 /* VNODE_FLAGS.isSlotReference */) {
|
|
452
518
|
// create a slot reference node
|
|
453
519
|
elm = newVNode.$elm$ =
|
|
454
520
|
doc.createTextNode('');
|
|
455
521
|
}
|
|
456
522
|
else {
|
|
457
523
|
// create element
|
|
458
|
-
elm = newVNode.$elm$ = (doc.createElement(newVNode.$flags$ & 2 /* isSlotFallback */
|
|
524
|
+
elm = newVNode.$elm$ = (doc.createElement(newVNode.$flags$ & 2 /* VNODE_FLAGS.isSlotFallback */
|
|
459
525
|
? 'slot-fb'
|
|
460
526
|
: newVNode.$tag$));
|
|
461
527
|
// add css classes, attrs, props, listeners, etc.
|
|
@@ -481,7 +547,7 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
481
547
|
}
|
|
482
548
|
{
|
|
483
549
|
elm['s-hn'] = hostTagName;
|
|
484
|
-
if (newVNode.$flags$ & (2 /* isSlotFallback */ | 1 /* isSlotReference */)) {
|
|
550
|
+
if (newVNode.$flags$ & (2 /* VNODE_FLAGS.isSlotFallback */ | 1 /* VNODE_FLAGS.isSlotReference */)) {
|
|
485
551
|
// remember the content reference comment
|
|
486
552
|
elm['s-sr'] = true;
|
|
487
553
|
// remember the content reference comment
|
|
@@ -500,7 +566,7 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
500
566
|
return elm;
|
|
501
567
|
};
|
|
502
568
|
const putBackInOriginalLocation = (parentElm, recursive) => {
|
|
503
|
-
plt.$flags$ |= 1 /* isTmpDisconnected */;
|
|
569
|
+
plt.$flags$ |= 1 /* PLATFORM_FLAGS.isTmpDisconnected */;
|
|
504
570
|
const oldSlotChildNodes = parentElm.childNodes;
|
|
505
571
|
for (let i = oldSlotChildNodes.length - 1; i >= 0; i--) {
|
|
506
572
|
const childNode = oldSlotChildNodes[i];
|
|
@@ -521,7 +587,7 @@ const putBackInOriginalLocation = (parentElm, recursive) => {
|
|
|
521
587
|
putBackInOriginalLocation(childNode, recursive);
|
|
522
588
|
}
|
|
523
589
|
}
|
|
524
|
-
plt.$flags$ &= ~1 /* isTmpDisconnected */;
|
|
590
|
+
plt.$flags$ &= ~1 /* PLATFORM_FLAGS.isTmpDisconnected */;
|
|
525
591
|
};
|
|
526
592
|
const addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
|
|
527
593
|
let containerElm = ((parentElm['s-cr'] && parentElm['s-cr'].parentNode) || parentElm);
|
|
@@ -563,6 +629,74 @@ const removeVnodes = (vnodes, startIdx, endIdx, vnode, elm) => {
|
|
|
563
629
|
}
|
|
564
630
|
}
|
|
565
631
|
};
|
|
632
|
+
/**
|
|
633
|
+
* Reconcile the children of a new VNode with the children of an old VNode by
|
|
634
|
+
* traversing the two collections of children, identifying nodes that are
|
|
635
|
+
* conserved or changed, calling out to `patch` to make any necessary
|
|
636
|
+
* updates to the DOM, and rearranging DOM nodes as needed.
|
|
637
|
+
*
|
|
638
|
+
* The algorithm for reconciling children works by analyzing two 'windows' onto
|
|
639
|
+
* the two arrays of children (`oldCh` and `newCh`). We keep track of the
|
|
640
|
+
* 'windows' by storing start and end indices and references to the
|
|
641
|
+
* corresponding array entries. Initially the two 'windows' are basically equal
|
|
642
|
+
* to the entire array, but we progressively narrow the windows until there are
|
|
643
|
+
* no children left to update by doing the following:
|
|
644
|
+
*
|
|
645
|
+
* 1. Skip any `null` entries at the beginning or end of the two arrays, so
|
|
646
|
+
* that if we have an initial array like the following we'll end up dealing
|
|
647
|
+
* only with a window bounded by the highlighted elements:
|
|
648
|
+
*
|
|
649
|
+
* [null, null, VNode1 , ... , VNode2, null, null]
|
|
650
|
+
* ^^^^^^ ^^^^^^
|
|
651
|
+
*
|
|
652
|
+
* 2. Check to see if the elements at the head and tail positions are equal
|
|
653
|
+
* across the windows. This will basically detect elements which haven't
|
|
654
|
+
* been added, removed, or changed position, i.e. if you had the following
|
|
655
|
+
* VNode elements (represented as HTML):
|
|
656
|
+
*
|
|
657
|
+
* oldVNode: `<div><p><span>HEY</span></p></div>`
|
|
658
|
+
* newVNode: `<div><p><span>THERE</span></p></div>`
|
|
659
|
+
*
|
|
660
|
+
* Then when comparing the children of the `<div>` tag we check the equality
|
|
661
|
+
* of the VNodes corresponding to the `<p>` tags and, since they are the
|
|
662
|
+
* same tag in the same position, we'd be able to avoid completely
|
|
663
|
+
* re-rendering the subtree under them with a new DOM element and would just
|
|
664
|
+
* call out to `patch` to handle reconciling their children and so on.
|
|
665
|
+
*
|
|
666
|
+
* 3. Check, for both windows, to see if the element at the beginning of the
|
|
667
|
+
* window corresponds to the element at the end of the other window. This is
|
|
668
|
+
* a heuristic which will let us identify _some_ situations in which
|
|
669
|
+
* elements have changed position, for instance it _should_ detect that the
|
|
670
|
+
* children nodes themselves have not changed but merely moved in the
|
|
671
|
+
* following example:
|
|
672
|
+
*
|
|
673
|
+
* oldVNode: `<div><element-one /><element-two /></div>`
|
|
674
|
+
* newVNode: `<div><element-two /><element-one /></div>`
|
|
675
|
+
*
|
|
676
|
+
* If we find cases like this then we also need to move the concrete DOM
|
|
677
|
+
* elements corresponding to the moved children to write the re-order to the
|
|
678
|
+
* DOM.
|
|
679
|
+
*
|
|
680
|
+
* 4. Finally, if VNodes have the `key` attribute set on them we check for any
|
|
681
|
+
* nodes in the old children which have the same key as the first element in
|
|
682
|
+
* our window on the new children. If we find such a node we handle calling
|
|
683
|
+
* out to `patch`, moving relevant DOM nodes, and so on, in accordance with
|
|
684
|
+
* what we find.
|
|
685
|
+
*
|
|
686
|
+
* Finally, once we've narrowed our 'windows' to the point that either of them
|
|
687
|
+
* collapse (i.e. they have length 0) we then handle any remaining VNode
|
|
688
|
+
* insertion or deletion that needs to happen to get a DOM state that correctly
|
|
689
|
+
* reflects the new child VNodes. If, for instance, after our window on the old
|
|
690
|
+
* children has collapsed we still have more nodes on the new children that
|
|
691
|
+
* we haven't dealt with yet then we need to add them, or if the new children
|
|
692
|
+
* collapse but we still have unhandled _old_ children then we need to make
|
|
693
|
+
* sure the corresponding DOM nodes are removed.
|
|
694
|
+
*
|
|
695
|
+
* @param parentElm the node into which the parent VNode is rendered
|
|
696
|
+
* @param oldCh the old children of the parent node
|
|
697
|
+
* @param newVNode the new VNode which will replace the parent
|
|
698
|
+
* @param newCh the new children of the parent node
|
|
699
|
+
*/
|
|
566
700
|
const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
567
701
|
let oldStartIdx = 0;
|
|
568
702
|
let newStartIdx = 0;
|
|
@@ -575,7 +709,7 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
|
575
709
|
let node;
|
|
576
710
|
while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {
|
|
577
711
|
if (oldStartVnode == null) {
|
|
578
|
-
//
|
|
712
|
+
// VNode might have been moved left
|
|
579
713
|
oldStartVnode = oldCh[++oldStartIdx];
|
|
580
714
|
}
|
|
581
715
|
else if (oldEndVnode == null) {
|
|
@@ -588,42 +722,102 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
|
588
722
|
newEndVnode = newCh[--newEndIdx];
|
|
589
723
|
}
|
|
590
724
|
else if (isSameVnode(oldStartVnode, newStartVnode)) {
|
|
725
|
+
// if the start nodes are the same then we should patch the new VNode
|
|
726
|
+
// onto the old one, and increment our `newStartIdx` and `oldStartIdx`
|
|
727
|
+
// indices to reflect that. We don't need to move any DOM Nodes around
|
|
728
|
+
// since things are matched up in order.
|
|
591
729
|
patch(oldStartVnode, newStartVnode);
|
|
592
730
|
oldStartVnode = oldCh[++oldStartIdx];
|
|
593
731
|
newStartVnode = newCh[++newStartIdx];
|
|
594
732
|
}
|
|
595
733
|
else if (isSameVnode(oldEndVnode, newEndVnode)) {
|
|
734
|
+
// likewise, if the end nodes are the same we patch new onto old and
|
|
735
|
+
// decrement our end indices, and also likewise in this case we don't
|
|
736
|
+
// need to move any DOM Nodes.
|
|
596
737
|
patch(oldEndVnode, newEndVnode);
|
|
597
738
|
oldEndVnode = oldCh[--oldEndIdx];
|
|
598
739
|
newEndVnode = newCh[--newEndIdx];
|
|
599
740
|
}
|
|
600
741
|
else if (isSameVnode(oldStartVnode, newEndVnode)) {
|
|
601
|
-
// Vnode moved right
|
|
742
|
+
// case: "Vnode moved right"
|
|
743
|
+
//
|
|
744
|
+
// We've found that the last node in our window on the new children is
|
|
745
|
+
// the same VNode as the _first_ node in our window on the old children
|
|
746
|
+
// we're dealing with now. Visually, this is the layout of these two
|
|
747
|
+
// nodes:
|
|
748
|
+
//
|
|
749
|
+
// newCh: [..., newStartVnode , ... , newEndVnode , ...]
|
|
750
|
+
// ^^^^^^^^^^^
|
|
751
|
+
// oldCh: [..., oldStartVnode , ... , oldEndVnode , ...]
|
|
752
|
+
// ^^^^^^^^^^^^^
|
|
753
|
+
//
|
|
754
|
+
// In this situation we need to patch `newEndVnode` onto `oldStartVnode`
|
|
755
|
+
// and move the DOM element for `oldStartVnode`.
|
|
602
756
|
if ((oldStartVnode.$tag$ === 'slot' || newEndVnode.$tag$ === 'slot')) {
|
|
603
757
|
putBackInOriginalLocation(oldStartVnode.$elm$.parentNode, false);
|
|
604
758
|
}
|
|
605
759
|
patch(oldStartVnode, newEndVnode);
|
|
760
|
+
// We need to move the element for `oldStartVnode` into a position which
|
|
761
|
+
// will be appropriate for `newEndVnode`. For this we can use
|
|
762
|
+
// `.insertBefore` and `oldEndVnode.$elm$.nextSibling`. If there is a
|
|
763
|
+
// sibling for `oldEndVnode.$elm$` then we want to move the DOM node for
|
|
764
|
+
// `oldStartVnode` between `oldEndVnode` and it's sibling, like so:
|
|
765
|
+
//
|
|
766
|
+
// <old-start-node />
|
|
767
|
+
// <some-intervening-node />
|
|
768
|
+
// <old-end-node />
|
|
769
|
+
// <!-- -> <-- `oldStartVnode.$elm$` should be inserted here
|
|
770
|
+
// <next-sibling />
|
|
771
|
+
//
|
|
772
|
+
// If instead `oldEndVnode.$elm$` has no sibling then we just want to put
|
|
773
|
+
// the node for `oldStartVnode` at the end of the children of
|
|
774
|
+
// `parentElm`. Luckily, `Node.nextSibling` will return `null` if there
|
|
775
|
+
// aren't any siblings, and passing `null` to `Node.insertBefore` will
|
|
776
|
+
// append it to the children of the parent element.
|
|
606
777
|
parentElm.insertBefore(oldStartVnode.$elm$, oldEndVnode.$elm$.nextSibling);
|
|
607
778
|
oldStartVnode = oldCh[++oldStartIdx];
|
|
608
779
|
newEndVnode = newCh[--newEndIdx];
|
|
609
780
|
}
|
|
610
781
|
else if (isSameVnode(oldEndVnode, newStartVnode)) {
|
|
611
|
-
// Vnode moved left
|
|
782
|
+
// case: "Vnode moved left"
|
|
783
|
+
//
|
|
784
|
+
// We've found that the first node in our window on the new children is
|
|
785
|
+
// the same VNode as the _last_ node in our window on the old children.
|
|
786
|
+
// Visually, this is the layout of these two nodes:
|
|
787
|
+
//
|
|
788
|
+
// newCh: [..., newStartVnode , ... , newEndVnode , ...]
|
|
789
|
+
// ^^^^^^^^^^^^^
|
|
790
|
+
// oldCh: [..., oldStartVnode , ... , oldEndVnode , ...]
|
|
791
|
+
// ^^^^^^^^^^^
|
|
792
|
+
//
|
|
793
|
+
// In this situation we need to patch `newStartVnode` onto `oldEndVnode`
|
|
794
|
+
// (which will handle updating any changed attributes, reconciling their
|
|
795
|
+
// children etc) but we also need to move the DOM node to which
|
|
796
|
+
// `oldEndVnode` corresponds.
|
|
612
797
|
if ((oldStartVnode.$tag$ === 'slot' || newEndVnode.$tag$ === 'slot')) {
|
|
613
798
|
putBackInOriginalLocation(oldEndVnode.$elm$.parentNode, false);
|
|
614
799
|
}
|
|
615
800
|
patch(oldEndVnode, newStartVnode);
|
|
801
|
+
// We've already checked above if `oldStartVnode` and `newStartVnode` are
|
|
802
|
+
// the same node, so since we're here we know that they are not. Thus we
|
|
803
|
+
// can move the element for `oldEndVnode` _before_ the element for
|
|
804
|
+
// `oldStartVnode`, leaving `oldStartVnode` to be reconciled in the
|
|
805
|
+
// future.
|
|
616
806
|
parentElm.insertBefore(oldEndVnode.$elm$, oldStartVnode.$elm$);
|
|
617
807
|
oldEndVnode = oldCh[--oldEndIdx];
|
|
618
808
|
newStartVnode = newCh[++newStartIdx];
|
|
619
809
|
}
|
|
620
810
|
else {
|
|
621
811
|
{
|
|
622
|
-
//
|
|
812
|
+
// We either didn't find an element in the old children that matches
|
|
813
|
+
// the key of the first new child OR the build is not using `key`
|
|
814
|
+
// attributes at all. In either case we need to create a new element
|
|
815
|
+
// for the new node.
|
|
623
816
|
node = createElm(oldCh && oldCh[newStartIdx], newVNode, newStartIdx, parentElm);
|
|
624
817
|
newStartVnode = newCh[++newStartIdx];
|
|
625
818
|
}
|
|
626
819
|
if (node) {
|
|
820
|
+
// if we created a new node then handle inserting it to the DOM
|
|
627
821
|
{
|
|
628
822
|
parentReferenceNode(oldStartVnode.$elm$).insertBefore(node, referenceNode(oldStartVnode.$elm$));
|
|
629
823
|
}
|
|
@@ -631,18 +825,39 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
|
631
825
|
}
|
|
632
826
|
}
|
|
633
827
|
if (oldStartIdx > oldEndIdx) {
|
|
828
|
+
// we have some more new nodes to add which don't match up with old nodes
|
|
634
829
|
addVnodes(parentElm, newCh[newEndIdx + 1] == null ? null : newCh[newEndIdx + 1].$elm$, newVNode, newCh, newStartIdx, newEndIdx);
|
|
635
830
|
}
|
|
636
831
|
else if (newStartIdx > newEndIdx) {
|
|
832
|
+
// there are nodes in the `oldCh` array which no longer correspond to nodes
|
|
833
|
+
// in the new array, so lets remove them (which entails cleaning up the
|
|
834
|
+
// relevant DOM nodes)
|
|
637
835
|
removeVnodes(oldCh, oldStartIdx, oldEndIdx);
|
|
638
836
|
}
|
|
639
837
|
};
|
|
640
|
-
|
|
838
|
+
/**
|
|
839
|
+
* Compare two VNodes to determine if they are the same
|
|
840
|
+
*
|
|
841
|
+
* **NB**: This function is an equality _heuristic_ based on the available
|
|
842
|
+
* information set on the two VNodes and can be misleading under certain
|
|
843
|
+
* circumstances. In particular, if the two nodes do not have `key` attrs
|
|
844
|
+
* (available under `$key$` on VNodes) then the function falls back on merely
|
|
845
|
+
* checking that they have the same tag.
|
|
846
|
+
*
|
|
847
|
+
* So, in other words, if `key` attrs are not set on VNodes which may be
|
|
848
|
+
* changing order within a `children` array or something along those lines then
|
|
849
|
+
* we could obtain a false positive and then have to do needless re-rendering.
|
|
850
|
+
*
|
|
851
|
+
* @param leftVNode the first VNode to check
|
|
852
|
+
* @param rightVNode the second VNode to check
|
|
853
|
+
* @returns whether they're equal or not
|
|
854
|
+
*/
|
|
855
|
+
const isSameVnode = (leftVNode, rightVNode) => {
|
|
641
856
|
// compare if two vnode to see if they're "technically" the same
|
|
642
857
|
// need to have the same element tag, and same key to be the same
|
|
643
|
-
if (
|
|
644
|
-
if (
|
|
645
|
-
return
|
|
858
|
+
if (leftVNode.$tag$ === rightVNode.$tag$) {
|
|
859
|
+
if (leftVNode.$tag$ === 'slot') {
|
|
860
|
+
return leftVNode.$name$ === rightVNode.$name$;
|
|
646
861
|
}
|
|
647
862
|
return true;
|
|
648
863
|
}
|
|
@@ -656,6 +871,14 @@ const referenceNode = (node) => {
|
|
|
656
871
|
return (node && node['s-ol']) || node;
|
|
657
872
|
};
|
|
658
873
|
const parentReferenceNode = (node) => (node['s-ol'] ? node['s-ol'] : node).parentNode;
|
|
874
|
+
/**
|
|
875
|
+
* Handle reconciling an outdated VNode with a new one which corresponds to
|
|
876
|
+
* it. This function handles flushing updates to the DOM and reconciling the
|
|
877
|
+
* children of the two nodes (if any).
|
|
878
|
+
*
|
|
879
|
+
* @param oldVNode an old VNode whose DOM element and children we want to update
|
|
880
|
+
* @param newVNode a new VNode representing an updated version of the old one
|
|
881
|
+
*/
|
|
659
882
|
const patch = (oldVNode, newVNode) => {
|
|
660
883
|
const elm = (newVNode.$elm$ = oldVNode.$elm$);
|
|
661
884
|
const oldChildren = oldVNode.$children$;
|
|
@@ -664,7 +887,6 @@ const patch = (oldVNode, newVNode) => {
|
|
|
664
887
|
const text = newVNode.$text$;
|
|
665
888
|
let defaultHolder;
|
|
666
889
|
if (text === null) {
|
|
667
|
-
// element node
|
|
668
890
|
{
|
|
669
891
|
if (tag === 'slot')
|
|
670
892
|
;
|
|
@@ -677,6 +899,7 @@ const patch = (oldVNode, newVNode) => {
|
|
|
677
899
|
}
|
|
678
900
|
if (oldChildren !== null && newChildren !== null) {
|
|
679
901
|
// looks like there's child vnodes for both the old and new vnodes
|
|
902
|
+
// so we need to call `updateChildren` to reconcile them
|
|
680
903
|
updateChildren(elm, oldChildren, newVNode, newChildren);
|
|
681
904
|
}
|
|
682
905
|
else if (newChildren !== null) {
|
|
@@ -714,7 +937,7 @@ const updateFallbackSlotVisibility = (elm) => {
|
|
|
714
937
|
let nodeType;
|
|
715
938
|
for (i = 0, ilen = childNodes.length; i < ilen; i++) {
|
|
716
939
|
childNode = childNodes[i];
|
|
717
|
-
if (childNode.nodeType === 1 /* ElementNode */) {
|
|
940
|
+
if (childNode.nodeType === 1 /* NODE_TYPE.ElementNode */) {
|
|
718
941
|
if (childNode['s-sr']) {
|
|
719
942
|
// this is a slot fallback node
|
|
720
943
|
// get the slot name for this slot reference node
|
|
@@ -726,7 +949,7 @@ const updateFallbackSlotVisibility = (elm) => {
|
|
|
726
949
|
nodeType = childNodes[j].nodeType;
|
|
727
950
|
if (childNodes[j]['s-hn'] !== childNode['s-hn'] || slotNameAttr !== '') {
|
|
728
951
|
// this sibling node is from a different component OR is a named fallback slot node
|
|
729
|
-
if (nodeType === 1 /* ElementNode */ && slotNameAttr === childNodes[j].getAttribute('slot')) {
|
|
952
|
+
if (nodeType === 1 /* NODE_TYPE.ElementNode */ && slotNameAttr === childNodes[j].getAttribute('slot')) {
|
|
730
953
|
childNode.hidden = true;
|
|
731
954
|
break;
|
|
732
955
|
}
|
|
@@ -735,8 +958,8 @@ const updateFallbackSlotVisibility = (elm) => {
|
|
|
735
958
|
// this is a default fallback slot node
|
|
736
959
|
// any element or text node (with content)
|
|
737
960
|
// should hide the default fallback slot node
|
|
738
|
-
if (nodeType === 1 /* ElementNode */ ||
|
|
739
|
-
(nodeType === 3 /* TextNode */ && childNodes[j].textContent.trim() !== '')) {
|
|
961
|
+
if (nodeType === 1 /* NODE_TYPE.ElementNode */ ||
|
|
962
|
+
(nodeType === 3 /* NODE_TYPE.TextNode */ && childNodes[j].textContent.trim() !== '')) {
|
|
740
963
|
childNode.hidden = true;
|
|
741
964
|
break;
|
|
742
965
|
}
|
|
@@ -814,13 +1037,13 @@ const relocateSlotContent = (elm) => {
|
|
|
814
1037
|
}
|
|
815
1038
|
}
|
|
816
1039
|
}
|
|
817
|
-
if (childNode.nodeType === 1 /* ElementNode */) {
|
|
1040
|
+
if (childNode.nodeType === 1 /* NODE_TYPE.ElementNode */) {
|
|
818
1041
|
relocateSlotContent(childNode);
|
|
819
1042
|
}
|
|
820
1043
|
}
|
|
821
1044
|
};
|
|
822
1045
|
const isNodeLocatedInSlot = (nodeToRelocate, slotNameAttr) => {
|
|
823
|
-
if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
|
1046
|
+
if (nodeToRelocate.nodeType === 1 /* NODE_TYPE.ElementNode */) {
|
|
824
1047
|
if (nodeToRelocate.getAttribute('slot') === null && slotNameAttr === '') {
|
|
825
1048
|
return true;
|
|
826
1049
|
}
|
|
@@ -851,7 +1074,7 @@ const renderVdom = (hostRef, renderFnResults) => {
|
|
|
851
1074
|
cmpMeta.$attrsToReflect$.map(([propName, attribute]) => (rootVnode.$attrs$[attribute] = hostElm[propName]));
|
|
852
1075
|
}
|
|
853
1076
|
rootVnode.$tag$ = null;
|
|
854
|
-
rootVnode.$flags$ |= 4 /* isHost */;
|
|
1077
|
+
rootVnode.$flags$ |= 4 /* VNODE_FLAGS.isHost */;
|
|
855
1078
|
hostRef.$vnode$ = rootVnode;
|
|
856
1079
|
rootVnode.$elm$ = oldVNode.$elm$ = (hostElm.shadowRoot || hostElm );
|
|
857
1080
|
{
|
|
@@ -859,7 +1082,7 @@ const renderVdom = (hostRef, renderFnResults) => {
|
|
|
859
1082
|
}
|
|
860
1083
|
{
|
|
861
1084
|
contentRef = hostElm['s-cr'];
|
|
862
|
-
useNativeShadowDom = (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) !== 0;
|
|
1085
|
+
useNativeShadowDom = (cmpMeta.$flags$ & 1 /* CMP_FLAGS.shadowDomEncapsulation */) !== 0;
|
|
863
1086
|
// always reset
|
|
864
1087
|
checkSlotFallbackVisibility = false;
|
|
865
1088
|
}
|
|
@@ -868,7 +1091,7 @@ const renderVdom = (hostRef, renderFnResults) => {
|
|
|
868
1091
|
{
|
|
869
1092
|
// while we're moving nodes around existing nodes, temporarily disable
|
|
870
1093
|
// the disconnectCallback from working
|
|
871
|
-
plt.$flags$ |= 1 /* isTmpDisconnected */;
|
|
1094
|
+
plt.$flags$ |= 1 /* PLATFORM_FLAGS.isTmpDisconnected */;
|
|
872
1095
|
if (checkSlotRelocate) {
|
|
873
1096
|
relocateSlotContent(rootVnode.$elm$);
|
|
874
1097
|
let relocateData;
|
|
@@ -926,7 +1149,7 @@ const renderVdom = (hostRef, renderFnResults) => {
|
|
|
926
1149
|
}
|
|
927
1150
|
else {
|
|
928
1151
|
// this node doesn't have a slot home to go to, so let's hide it
|
|
929
|
-
if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
|
1152
|
+
if (nodeToRelocate.nodeType === 1 /* NODE_TYPE.ElementNode */) {
|
|
930
1153
|
nodeToRelocate.hidden = true;
|
|
931
1154
|
}
|
|
932
1155
|
}
|
|
@@ -937,37 +1160,11 @@ const renderVdom = (hostRef, renderFnResults) => {
|
|
|
937
1160
|
}
|
|
938
1161
|
// done moving nodes around
|
|
939
1162
|
// allow the disconnect callback to work again
|
|
940
|
-
plt.$flags$ &= ~1 /* isTmpDisconnected */;
|
|
1163
|
+
plt.$flags$ &= ~1 /* PLATFORM_FLAGS.isTmpDisconnected */;
|
|
941
1164
|
// always reset
|
|
942
1165
|
relocateNodes.length = 0;
|
|
943
1166
|
}
|
|
944
1167
|
};
|
|
945
|
-
const getElement = (ref) => (getHostRef(ref).$hostElement$ );
|
|
946
|
-
const createEvent = (ref, name, flags) => {
|
|
947
|
-
const elm = getElement(ref);
|
|
948
|
-
return {
|
|
949
|
-
emit: (detail) => {
|
|
950
|
-
return emitEvent(elm, name, {
|
|
951
|
-
bubbles: !!(flags & 4 /* Bubbles */),
|
|
952
|
-
composed: !!(flags & 2 /* Composed */),
|
|
953
|
-
cancelable: !!(flags & 1 /* Cancellable */),
|
|
954
|
-
detail,
|
|
955
|
-
});
|
|
956
|
-
},
|
|
957
|
-
};
|
|
958
|
-
};
|
|
959
|
-
/**
|
|
960
|
-
* Helper function to create & dispatch a custom Event on a provided target
|
|
961
|
-
* @param elm the target of the Event
|
|
962
|
-
* @param name the name to give the custom Event
|
|
963
|
-
* @param opts options for configuring a custom Event
|
|
964
|
-
* @returns the custom Event
|
|
965
|
-
*/
|
|
966
|
-
const emitEvent = (elm, name, opts) => {
|
|
967
|
-
const ev = plt.ce(name, opts);
|
|
968
|
-
elm.dispatchEvent(ev);
|
|
969
|
-
return ev;
|
|
970
|
-
};
|
|
971
1168
|
const attachToAncestor = (hostRef, ancestorComponent) => {
|
|
972
1169
|
if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent['s-p']) {
|
|
973
1170
|
ancestorComponent['s-p'].push(new Promise((r) => (hostRef.$onRenderResolve$ = r)));
|
|
@@ -975,10 +1172,10 @@ const attachToAncestor = (hostRef, ancestorComponent) => {
|
|
|
975
1172
|
};
|
|
976
1173
|
const scheduleUpdate = (hostRef, isInitialLoad) => {
|
|
977
1174
|
{
|
|
978
|
-
hostRef.$flags$ |= 16 /* isQueuedForUpdate */;
|
|
1175
|
+
hostRef.$flags$ |= 16 /* HOST_FLAGS.isQueuedForUpdate */;
|
|
979
1176
|
}
|
|
980
|
-
if (hostRef.$flags$ & 4 /* isWaitingForChildren */) {
|
|
981
|
-
hostRef.$flags$ |= 512 /* needsRerender */;
|
|
1177
|
+
if (hostRef.$flags$ & 4 /* HOST_FLAGS.isWaitingForChildren */) {
|
|
1178
|
+
hostRef.$flags$ |= 512 /* HOST_FLAGS.needsRerender */;
|
|
982
1179
|
return;
|
|
983
1180
|
}
|
|
984
1181
|
attachToAncestor(hostRef, hostRef.$ancestorComponent$);
|
|
@@ -994,12 +1191,15 @@ const dispatchHooks = (hostRef, isInitialLoad) => {
|
|
|
994
1191
|
let promise;
|
|
995
1192
|
if (isInitialLoad) {
|
|
996
1193
|
{
|
|
997
|
-
hostRef.$flags$ |= 256 /* isListenReady */;
|
|
1194
|
+
hostRef.$flags$ |= 256 /* HOST_FLAGS.isListenReady */;
|
|
998
1195
|
if (hostRef.$queuedListeners$) {
|
|
999
1196
|
hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event));
|
|
1000
1197
|
hostRef.$queuedListeners$ = null;
|
|
1001
1198
|
}
|
|
1002
1199
|
}
|
|
1200
|
+
{
|
|
1201
|
+
promise = safeCall(instance, 'componentWillLoad');
|
|
1202
|
+
}
|
|
1003
1203
|
}
|
|
1004
1204
|
{
|
|
1005
1205
|
promise = then(promise, () => safeCall(instance, 'componentWillRender'));
|
|
@@ -1037,7 +1237,7 @@ const updateComponent = async (hostRef, instance, isInitialLoad) => {
|
|
|
1037
1237
|
}
|
|
1038
1238
|
else {
|
|
1039
1239
|
Promise.all(childrenPromises).then(postUpdate);
|
|
1040
|
-
hostRef.$flags$ |= 4 /* isWaitingForChildren */;
|
|
1240
|
+
hostRef.$flags$ |= 4 /* HOST_FLAGS.isWaitingForChildren */;
|
|
1041
1241
|
childrenPromises.length = 0;
|
|
1042
1242
|
}
|
|
1043
1243
|
}
|
|
@@ -1046,10 +1246,10 @@ const callRender = (hostRef, instance, elm) => {
|
|
|
1046
1246
|
try {
|
|
1047
1247
|
instance = instance.render() ;
|
|
1048
1248
|
{
|
|
1049
|
-
hostRef.$flags$ &= ~16 /* isQueuedForUpdate */;
|
|
1249
|
+
hostRef.$flags$ &= ~16 /* HOST_FLAGS.isQueuedForUpdate */;
|
|
1050
1250
|
}
|
|
1051
1251
|
{
|
|
1052
|
-
hostRef.$flags$ |= 2 /* hasRendered */;
|
|
1252
|
+
hostRef.$flags$ |= 2 /* HOST_FLAGS.hasRendered */;
|
|
1053
1253
|
}
|
|
1054
1254
|
{
|
|
1055
1255
|
{
|
|
@@ -1071,13 +1271,20 @@ const postUpdateComponent = (hostRef) => {
|
|
|
1071
1271
|
const tagName = hostRef.$cmpMeta$.$tagName$;
|
|
1072
1272
|
const elm = hostRef.$hostElement$;
|
|
1073
1273
|
const endPostUpdate = createTime('postUpdate', tagName);
|
|
1274
|
+
const instance = hostRef.$lazyInstance$ ;
|
|
1074
1275
|
const ancestorComponent = hostRef.$ancestorComponent$;
|
|
1075
|
-
|
|
1076
|
-
|
|
1276
|
+
{
|
|
1277
|
+
safeCall(instance, 'componentDidRender');
|
|
1278
|
+
}
|
|
1279
|
+
if (!(hostRef.$flags$ & 64 /* HOST_FLAGS.hasLoadedComponent */)) {
|
|
1280
|
+
hostRef.$flags$ |= 64 /* HOST_FLAGS.hasLoadedComponent */;
|
|
1077
1281
|
{
|
|
1078
1282
|
// DOM WRITE!
|
|
1079
1283
|
addHydratedFlag(elm);
|
|
1080
1284
|
}
|
|
1285
|
+
{
|
|
1286
|
+
safeCall(instance, 'componentDidLoad');
|
|
1287
|
+
}
|
|
1081
1288
|
endPostUpdate();
|
|
1082
1289
|
{
|
|
1083
1290
|
hostRef.$onReadyResolve$(elm);
|
|
@@ -1087,6 +1294,9 @@ const postUpdateComponent = (hostRef) => {
|
|
|
1087
1294
|
}
|
|
1088
1295
|
}
|
|
1089
1296
|
else {
|
|
1297
|
+
{
|
|
1298
|
+
safeCall(instance, 'componentDidUpdate');
|
|
1299
|
+
}
|
|
1090
1300
|
endPostUpdate();
|
|
1091
1301
|
}
|
|
1092
1302
|
// load events fire from bottom to top
|
|
@@ -1096,10 +1306,10 @@ const postUpdateComponent = (hostRef) => {
|
|
|
1096
1306
|
hostRef.$onRenderResolve$();
|
|
1097
1307
|
hostRef.$onRenderResolve$ = undefined;
|
|
1098
1308
|
}
|
|
1099
|
-
if (hostRef.$flags$ & 512 /* needsRerender */) {
|
|
1309
|
+
if (hostRef.$flags$ & 512 /* HOST_FLAGS.needsRerender */) {
|
|
1100
1310
|
nextTick(() => scheduleUpdate(hostRef, false));
|
|
1101
1311
|
}
|
|
1102
|
-
hostRef.$flags$ &= ~(4 /* isWaitingForChildren */ | 512 /* needsRerender */);
|
|
1312
|
+
hostRef.$flags$ &= ~(4 /* HOST_FLAGS.isWaitingForChildren */ | 512 /* HOST_FLAGS.needsRerender */);
|
|
1103
1313
|
}
|
|
1104
1314
|
// ( •_•)
|
|
1105
1315
|
// ( •_•)>⌐■-■
|
|
@@ -1129,53 +1339,6 @@ const then = (promise, thenFn) => {
|
|
|
1129
1339
|
};
|
|
1130
1340
|
const addHydratedFlag = (elm) => elm.classList.add('hydrated')
|
|
1131
1341
|
;
|
|
1132
|
-
/**
|
|
1133
|
-
* Parse a new property value for a given property type.
|
|
1134
|
-
*
|
|
1135
|
-
* While the prop value can reasonably be expected to be of `any` type as far as TypeScript's type checker is concerned,
|
|
1136
|
-
* it is not safe to assume that the string returned by evaluating `typeof propValue` matches:
|
|
1137
|
-
* 1. `any`, the type given to `propValue` in the function signature
|
|
1138
|
-
* 2. the type stored from `propType`.
|
|
1139
|
-
*
|
|
1140
|
-
* This function provides the capability to parse/coerce a property's value to potentially any other JavaScript type.
|
|
1141
|
-
*
|
|
1142
|
-
* Property values represented in TSX preserve their type information. In the example below, the number 0 is passed to
|
|
1143
|
-
* a component. This `propValue` will preserve its type information (`typeof propValue === 'number'`). Note that is
|
|
1144
|
-
* based on the type of the value being passed in, not the type declared of the class member decorated with `@Prop`.
|
|
1145
|
-
* ```tsx
|
|
1146
|
-
* <my-cmp prop-val={0}></my-cmp>
|
|
1147
|
-
* ```
|
|
1148
|
-
*
|
|
1149
|
-
* HTML prop values on the other hand, will always a string
|
|
1150
|
-
*
|
|
1151
|
-
* @param propValue the new value to coerce to some type
|
|
1152
|
-
* @param propType the type of the prop, expressed as a binary number
|
|
1153
|
-
* @returns the parsed/coerced value
|
|
1154
|
-
*/
|
|
1155
|
-
const parsePropertyValue = (propValue, propType) => {
|
|
1156
|
-
// ensure this value is of the correct prop type
|
|
1157
|
-
if (propValue != null && !isComplexType(propValue)) {
|
|
1158
|
-
if (propType & 4 /* Boolean */) {
|
|
1159
|
-
// per the HTML spec, any string value means it is a boolean true value
|
|
1160
|
-
// but we'll cheat here and say that the string "false" is the boolean false
|
|
1161
|
-
return propValue === 'false' ? false : propValue === '' || !!propValue;
|
|
1162
|
-
}
|
|
1163
|
-
if (propType & 2 /* Number */) {
|
|
1164
|
-
// force it to be a number
|
|
1165
|
-
return parseFloat(propValue);
|
|
1166
|
-
}
|
|
1167
|
-
if (propType & 1 /* String */) {
|
|
1168
|
-
// could have been passed as a number or boolean
|
|
1169
|
-
// but we still want it as a string
|
|
1170
|
-
return String(propValue);
|
|
1171
|
-
}
|
|
1172
|
-
// redundant return here for better minification
|
|
1173
|
-
return propValue;
|
|
1174
|
-
}
|
|
1175
|
-
// not sure exactly what type we want
|
|
1176
|
-
// so no need to change to a different type
|
|
1177
|
-
return propValue;
|
|
1178
|
-
};
|
|
1179
1342
|
const getValue = (ref, propName) => getHostRef(ref).$instanceValues$.get(propName);
|
|
1180
1343
|
const setValue = (ref, propName, newVal, cmpMeta) => {
|
|
1181
1344
|
// check our new property value against our internal value
|
|
@@ -1188,13 +1351,13 @@ const setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
1188
1351
|
// explicitly check for NaN on both sides, as `NaN === NaN` is always false
|
|
1189
1352
|
const areBothNaN = Number.isNaN(oldVal) && Number.isNaN(newVal);
|
|
1190
1353
|
const didValueChange = newVal !== oldVal && !areBothNaN;
|
|
1191
|
-
if ((!(flags & 8 /* isConstructingInstance */) || oldVal === undefined) && didValueChange) {
|
|
1354
|
+
if ((!(flags & 8 /* HOST_FLAGS.isConstructingInstance */) || oldVal === undefined) && didValueChange) {
|
|
1192
1355
|
// gadzooks! the property's value has changed!!
|
|
1193
1356
|
// set our new value!
|
|
1194
1357
|
hostRef.$instanceValues$.set(propName, newVal);
|
|
1195
1358
|
if (instance) {
|
|
1196
1359
|
// get an array of method names of watch functions to call
|
|
1197
|
-
if (cmpMeta.$watchers$ && flags & 128 /* isWatchReady */) {
|
|
1360
|
+
if (cmpMeta.$watchers$ && flags & 128 /* HOST_FLAGS.isWatchReady */) {
|
|
1198
1361
|
const watchMethods = cmpMeta.$watchers$[propName];
|
|
1199
1362
|
if (watchMethods) {
|
|
1200
1363
|
// this instance is watching for when this property changed
|
|
@@ -1209,7 +1372,7 @@ const setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
1209
1372
|
});
|
|
1210
1373
|
}
|
|
1211
1374
|
}
|
|
1212
|
-
if ((flags & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
|
|
1375
|
+
if ((flags & (2 /* HOST_FLAGS.hasRendered */ | 16 /* HOST_FLAGS.isQueuedForUpdate */)) === 2 /* HOST_FLAGS.hasRendered */) {
|
|
1213
1376
|
if (instance.componentShouldUpdate) {
|
|
1214
1377
|
if (instance.componentShouldUpdate(newVal, oldVal, propName) === false) {
|
|
1215
1378
|
return;
|
|
@@ -1224,6 +1387,16 @@ const setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
1224
1387
|
}
|
|
1225
1388
|
}
|
|
1226
1389
|
};
|
|
1390
|
+
/**
|
|
1391
|
+
* Attach a series of runtime constructs to a compiled Stencil component
|
|
1392
|
+
* constructor, including getters and setters for the `@Prop` and `@State`
|
|
1393
|
+
* decorators, callbacks for when attributes change, and so on.
|
|
1394
|
+
*
|
|
1395
|
+
* @param Cstr the constructor for a component that we need to process
|
|
1396
|
+
* @param cmpMeta metadata collected previously about the component
|
|
1397
|
+
* @param flags a number used to store a series of bit flags
|
|
1398
|
+
* @returns a reference to the same constructor passed in (but now mutated)
|
|
1399
|
+
*/
|
|
1227
1400
|
const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
1228
1401
|
if (cmpMeta.$members$) {
|
|
1229
1402
|
if (Cstr.watchers) {
|
|
@@ -1233,8 +1406,8 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1233
1406
|
const members = Object.entries(cmpMeta.$members$);
|
|
1234
1407
|
const prototype = Cstr.prototype;
|
|
1235
1408
|
members.map(([memberName, [memberFlags]]) => {
|
|
1236
|
-
if ((memberFlags & 31 /* Prop */ ||
|
|
1237
|
-
((flags & 2 /* proxyState */) && memberFlags & 32 /* State */))) {
|
|
1409
|
+
if ((memberFlags & 31 /* MEMBER_FLAGS.Prop */ ||
|
|
1410
|
+
((flags & 2 /* PROXY_FLAGS.proxyState */) && memberFlags & 32 /* MEMBER_FLAGS.State */))) {
|
|
1238
1411
|
// proxyComponent - prop
|
|
1239
1412
|
Object.defineProperty(prototype, memberName, {
|
|
1240
1413
|
get() {
|
|
@@ -1250,7 +1423,7 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1250
1423
|
});
|
|
1251
1424
|
}
|
|
1252
1425
|
});
|
|
1253
|
-
if ((flags & 1 /* isElementConstructor */)) {
|
|
1426
|
+
if ((flags & 1 /* PROXY_FLAGS.isElementConstructor */)) {
|
|
1254
1427
|
const attrNameToPropName = new Map();
|
|
1255
1428
|
prototype.attributeChangedCallback = function (attrName, _oldValue, newValue) {
|
|
1256
1429
|
plt.jmp(() => {
|
|
@@ -1306,11 +1479,11 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1306
1479
|
// create an array of attributes to observe
|
|
1307
1480
|
// and also create a map of html attribute name to js property name
|
|
1308
1481
|
Cstr.observedAttributes = members
|
|
1309
|
-
.filter(([_, m]) => m[0] & 15 /* HasAttribute */) // filter to only keep props that should match attributes
|
|
1482
|
+
.filter(([_, m]) => m[0] & 15 /* MEMBER_FLAGS.HasAttribute */) // filter to only keep props that should match attributes
|
|
1310
1483
|
.map(([propName, m]) => {
|
|
1311
1484
|
const attrName = m[1] || propName;
|
|
1312
1485
|
attrNameToPropName.set(attrName, propName);
|
|
1313
|
-
if (m[0] & 512 /* ReflectAttr */) {
|
|
1486
|
+
if (m[0] & 512 /* MEMBER_FLAGS.ReflectAttr */) {
|
|
1314
1487
|
cmpMeta.$attrsToReflect$.push([propName, attrName]);
|
|
1315
1488
|
}
|
|
1316
1489
|
return attrName;
|
|
@@ -1321,10 +1494,10 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1321
1494
|
};
|
|
1322
1495
|
const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) => {
|
|
1323
1496
|
// initializeComponent
|
|
1324
|
-
if ((hostRef.$flags$ & 32 /* hasInitializedComponent */) === 0) {
|
|
1497
|
+
if ((hostRef.$flags$ & 32 /* HOST_FLAGS.hasInitializedComponent */) === 0) {
|
|
1325
1498
|
{
|
|
1326
1499
|
// we haven't initialized this element yet
|
|
1327
|
-
hostRef.$flags$ |= 32 /* hasInitializedComponent */;
|
|
1500
|
+
hostRef.$flags$ |= 32 /* HOST_FLAGS.hasInitializedComponent */;
|
|
1328
1501
|
// lazy loaded components
|
|
1329
1502
|
// request the component's implementation to be
|
|
1330
1503
|
// wired up with the host element
|
|
@@ -1342,7 +1515,7 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
|
|
|
1342
1515
|
{
|
|
1343
1516
|
cmpMeta.$watchers$ = Cstr.watchers;
|
|
1344
1517
|
}
|
|
1345
|
-
proxyComponent(Cstr, cmpMeta, 2 /* proxyState */);
|
|
1518
|
+
proxyComponent(Cstr, cmpMeta, 2 /* PROXY_FLAGS.proxyState */);
|
|
1346
1519
|
Cstr.isProxied = true;
|
|
1347
1520
|
}
|
|
1348
1521
|
const endNewInstance = createTime('createInstance', cmpMeta.$tagName$);
|
|
@@ -1350,7 +1523,7 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
|
|
|
1350
1523
|
// but let's keep track of when we start and stop
|
|
1351
1524
|
// so that the getters/setters don't incorrectly step on data
|
|
1352
1525
|
{
|
|
1353
|
-
hostRef.$flags$ |= 8 /* isConstructingInstance */;
|
|
1526
|
+
hostRef.$flags$ |= 8 /* HOST_FLAGS.isConstructingInstance */;
|
|
1354
1527
|
}
|
|
1355
1528
|
// construct the lazy-loaded component implementation
|
|
1356
1529
|
// passing the hostRef is very important during
|
|
@@ -1363,10 +1536,10 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
|
|
|
1363
1536
|
consoleError(e);
|
|
1364
1537
|
}
|
|
1365
1538
|
{
|
|
1366
|
-
hostRef.$flags$ &= ~8 /* isConstructingInstance */;
|
|
1539
|
+
hostRef.$flags$ &= ~8 /* HOST_FLAGS.isConstructingInstance */;
|
|
1367
1540
|
}
|
|
1368
1541
|
{
|
|
1369
|
-
hostRef.$flags$ |= 128 /* isWatchReady */;
|
|
1542
|
+
hostRef.$flags$ |= 128 /* HOST_FLAGS.isWatchReady */;
|
|
1370
1543
|
}
|
|
1371
1544
|
endNewInstance();
|
|
1372
1545
|
}
|
|
@@ -1376,7 +1549,7 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
|
|
|
1376
1549
|
const scopeId = getScopeId(cmpMeta);
|
|
1377
1550
|
if (!styles.has(scopeId)) {
|
|
1378
1551
|
const endRegisterStyles = createTime('registerStyles', cmpMeta.$tagName$);
|
|
1379
|
-
registerStyle(scopeId, style, !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */));
|
|
1552
|
+
registerStyle(scopeId, style, !!(cmpMeta.$flags$ & 1 /* CMP_FLAGS.shadowDomEncapsulation */));
|
|
1380
1553
|
endRegisterStyles();
|
|
1381
1554
|
}
|
|
1382
1555
|
}
|
|
@@ -1398,19 +1571,19 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
|
|
|
1398
1571
|
}
|
|
1399
1572
|
};
|
|
1400
1573
|
const connectedCallback = (elm) => {
|
|
1401
|
-
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
|
|
1574
|
+
if ((plt.$flags$ & 1 /* PLATFORM_FLAGS.isTmpDisconnected */) === 0) {
|
|
1402
1575
|
const hostRef = getHostRef(elm);
|
|
1403
1576
|
const cmpMeta = hostRef.$cmpMeta$;
|
|
1404
1577
|
const endConnected = createTime('connectedCallback', cmpMeta.$tagName$);
|
|
1405
|
-
if (!(hostRef.$flags$ & 1 /* hasConnected */)) {
|
|
1578
|
+
if (!(hostRef.$flags$ & 1 /* HOST_FLAGS.hasConnected */)) {
|
|
1406
1579
|
// first time this component has connected
|
|
1407
|
-
hostRef.$flags$ |= 1 /* hasConnected */;
|
|
1580
|
+
hostRef.$flags$ |= 1 /* HOST_FLAGS.hasConnected */;
|
|
1408
1581
|
{
|
|
1409
1582
|
// initUpdate
|
|
1410
1583
|
// if the slot polyfill is required we'll need to put some nodes
|
|
1411
1584
|
// in here to act as original content anchors as we move nodes around
|
|
1412
1585
|
// host element has been connected to the DOM
|
|
1413
|
-
if ((cmpMeta.$flags$ & (4 /* hasSlotRelocation */ | 8 /* needsShadowDomShim */))) {
|
|
1586
|
+
if ((cmpMeta.$flags$ & (4 /* CMP_FLAGS.hasSlotRelocation */ | 8 /* CMP_FLAGS.needsShadowDomShim */))) {
|
|
1414
1587
|
setContentReference(elm);
|
|
1415
1588
|
}
|
|
1416
1589
|
}
|
|
@@ -1433,7 +1606,7 @@ const connectedCallback = (elm) => {
|
|
|
1433
1606
|
// https://developers.google.com/web/fundamentals/web-components/best-practices#lazy-properties
|
|
1434
1607
|
if (cmpMeta.$members$) {
|
|
1435
1608
|
Object.entries(cmpMeta.$members$).map(([memberName, [memberFlags]]) => {
|
|
1436
|
-
if (memberFlags & 31 /* Prop */ && elm.hasOwnProperty(memberName)) {
|
|
1609
|
+
if (memberFlags & 31 /* MEMBER_FLAGS.Prop */ && elm.hasOwnProperty(memberName)) {
|
|
1437
1610
|
const value = elm[memberName];
|
|
1438
1611
|
delete elm[memberName];
|
|
1439
1612
|
elm[memberName] = value;
|
|
@@ -1465,14 +1638,18 @@ const setContentReference = (elm) => {
|
|
|
1465
1638
|
elm.insertBefore(contentRefElm, elm.firstChild);
|
|
1466
1639
|
};
|
|
1467
1640
|
const disconnectedCallback = (elm) => {
|
|
1468
|
-
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
|
|
1641
|
+
if ((plt.$flags$ & 1 /* PLATFORM_FLAGS.isTmpDisconnected */) === 0) {
|
|
1469
1642
|
const hostRef = getHostRef(elm);
|
|
1643
|
+
const instance = hostRef.$lazyInstance$ ;
|
|
1470
1644
|
{
|
|
1471
1645
|
if (hostRef.$rmListeners$) {
|
|
1472
1646
|
hostRef.$rmListeners$.map((rmListener) => rmListener());
|
|
1473
1647
|
hostRef.$rmListeners$ = undefined;
|
|
1474
1648
|
}
|
|
1475
1649
|
}
|
|
1650
|
+
{
|
|
1651
|
+
safeCall(instance, 'disconnectedCallback');
|
|
1652
|
+
}
|
|
1476
1653
|
}
|
|
1477
1654
|
};
|
|
1478
1655
|
const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
@@ -1516,7 +1693,7 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1516
1693
|
super(self);
|
|
1517
1694
|
self = this;
|
|
1518
1695
|
registerHost(self, cmpMeta);
|
|
1519
|
-
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
|
|
1696
|
+
if (cmpMeta.$flags$ & 1 /* CMP_FLAGS.shadowDomEncapsulation */) {
|
|
1520
1697
|
// this component is using shadow dom
|
|
1521
1698
|
// and this browser supports shadow dom
|
|
1522
1699
|
// add the read-only property "shadowRoot" to the host element
|
|
@@ -1551,7 +1728,7 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1551
1728
|
cmpMeta.$lazyBundleId$ = lazyBundle[0];
|
|
1552
1729
|
if (!exclude.includes(tagName) && !customElements.get(tagName)) {
|
|
1553
1730
|
cmpTags.push(tagName);
|
|
1554
|
-
customElements.define(tagName, proxyComponent(HostElement, cmpMeta, 1 /* isElementConstructor */));
|
|
1731
|
+
customElements.define(tagName, proxyComponent(HostElement, cmpMeta, 1 /* PROXY_FLAGS.isElementConstructor */));
|
|
1555
1732
|
}
|
|
1556
1733
|
});
|
|
1557
1734
|
});
|
|
@@ -1573,7 +1750,45 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1573
1750
|
// Fallback appLoad event
|
|
1574
1751
|
endBootstrap();
|
|
1575
1752
|
};
|
|
1576
|
-
const
|
|
1753
|
+
const addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) => {
|
|
1754
|
+
if (listeners) {
|
|
1755
|
+
listeners.map(([flags, name, method]) => {
|
|
1756
|
+
const target = getHostListenerTarget(elm, flags) ;
|
|
1757
|
+
const handler = hostListenerProxy(hostRef, method);
|
|
1758
|
+
const opts = hostListenerOpts(flags);
|
|
1759
|
+
plt.ael(target, name, handler, opts);
|
|
1760
|
+
(hostRef.$rmListeners$ = hostRef.$rmListeners$ || []).push(() => plt.rel(target, name, handler, opts));
|
|
1761
|
+
});
|
|
1762
|
+
}
|
|
1763
|
+
};
|
|
1764
|
+
const hostListenerProxy = (hostRef, methodName) => (ev) => {
|
|
1765
|
+
try {
|
|
1766
|
+
{
|
|
1767
|
+
if (hostRef.$flags$ & 256 /* HOST_FLAGS.isListenReady */) {
|
|
1768
|
+
// instance is ready, let's call it's member method for this event
|
|
1769
|
+
hostRef.$lazyInstance$[methodName](ev);
|
|
1770
|
+
}
|
|
1771
|
+
else {
|
|
1772
|
+
(hostRef.$queuedListeners$ = hostRef.$queuedListeners$ || []).push([methodName, ev]);
|
|
1773
|
+
}
|
|
1774
|
+
}
|
|
1775
|
+
}
|
|
1776
|
+
catch (e) {
|
|
1777
|
+
consoleError(e);
|
|
1778
|
+
}
|
|
1779
|
+
};
|
|
1780
|
+
const getHostListenerTarget = (elm, flags) => {
|
|
1781
|
+
if (flags & 4 /* LISTENER_FLAGS.TargetDocument */)
|
|
1782
|
+
return doc;
|
|
1783
|
+
if (flags & 8 /* LISTENER_FLAGS.TargetWindow */)
|
|
1784
|
+
return win;
|
|
1785
|
+
if (flags & 16 /* LISTENER_FLAGS.TargetBody */)
|
|
1786
|
+
return doc.body;
|
|
1787
|
+
return elm;
|
|
1788
|
+
};
|
|
1789
|
+
// prettier-ignore
|
|
1790
|
+
const hostListenerOpts = (flags) => (flags & 2 /* LISTENER_FLAGS.Capture */) !== 0;
|
|
1791
|
+
const hostRefs = /*@__PURE__*/ new WeakMap();
|
|
1577
1792
|
const getHostRef = (ref) => hostRefs.get(ref);
|
|
1578
1793
|
const registerInstance = (lazyInstance, hostRef) => hostRefs.set((hostRef.$lazyInstance$ = lazyInstance), hostRef);
|
|
1579
1794
|
const registerHost = (elm, cmpMeta) => {
|
|
@@ -1602,7 +1817,160 @@ const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
1602
1817
|
if (module) {
|
|
1603
1818
|
return module[exportName];
|
|
1604
1819
|
}
|
|
1605
|
-
|
|
1820
|
+
|
|
1821
|
+
if (!hmrVersionId || !BUILD.hotModuleReplacement) {
|
|
1822
|
+
const processMod = importedModule => {
|
|
1823
|
+
cmpModules.set(bundleId, importedModule);
|
|
1824
|
+
return importedModule[exportName];
|
|
1825
|
+
}
|
|
1826
|
+
switch(bundleId) {
|
|
1827
|
+
|
|
1828
|
+
case 'p-button_3.cjs':
|
|
1829
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
1830
|
+
/* webpackMode: "lazy" */
|
|
1831
|
+
'./p-button_3.cjs.entry.js')); }).then(processMod, consoleError);
|
|
1832
|
+
case 'p-accordion.cjs':
|
|
1833
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
1834
|
+
/* webpackMode: "lazy" */
|
|
1835
|
+
'./p-accordion.cjs.entry.js')); }).then(processMod, consoleError);
|
|
1836
|
+
case 'p-avatar.cjs':
|
|
1837
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
1838
|
+
/* webpackMode: "lazy" */
|
|
1839
|
+
'./p-avatar.cjs.entry.js')); }).then(processMod, consoleError);
|
|
1840
|
+
case 'p-avatar-group.cjs':
|
|
1841
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
1842
|
+
/* webpackMode: "lazy" */
|
|
1843
|
+
'./p-avatar-group.cjs.entry.js')); }).then(processMod, consoleError);
|
|
1844
|
+
case 'p-card-body.cjs':
|
|
1845
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
1846
|
+
/* webpackMode: "lazy" */
|
|
1847
|
+
'./p-card-body.cjs.entry.js')); }).then(processMod, consoleError);
|
|
1848
|
+
case 'p-card-container.cjs':
|
|
1849
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
1850
|
+
/* webpackMode: "lazy" */
|
|
1851
|
+
'./p-card-container.cjs.entry.js')); }).then(processMod, consoleError);
|
|
1852
|
+
case 'p-card-header.cjs':
|
|
1853
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
1854
|
+
/* webpackMode: "lazy" */
|
|
1855
|
+
'./p-card-header.cjs.entry.js')); }).then(processMod, consoleError);
|
|
1856
|
+
case 'p-content-slider.cjs':
|
|
1857
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
1858
|
+
/* webpackMode: "lazy" */
|
|
1859
|
+
'./p-content-slider.cjs.entry.js')); }).then(processMod, consoleError);
|
|
1860
|
+
case 'p-drawer.cjs':
|
|
1861
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
1862
|
+
/* webpackMode: "lazy" */
|
|
1863
|
+
'./p-drawer.cjs.entry.js')); }).then(processMod, consoleError);
|
|
1864
|
+
case 'p-info-panel.cjs':
|
|
1865
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
1866
|
+
/* webpackMode: "lazy" */
|
|
1867
|
+
'./p-info-panel.cjs.entry.js')); }).then(processMod, consoleError);
|
|
1868
|
+
case 'p-layout.cjs':
|
|
1869
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
1870
|
+
/* webpackMode: "lazy" */
|
|
1871
|
+
'./p-layout.cjs.entry.js')); }).then(processMod, consoleError);
|
|
1872
|
+
case 'p-modal.cjs':
|
|
1873
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
1874
|
+
/* webpackMode: "lazy" */
|
|
1875
|
+
'./p-modal.cjs.entry.js')); }).then(processMod, consoleError);
|
|
1876
|
+
case 'p-navbar.cjs':
|
|
1877
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
1878
|
+
/* webpackMode: "lazy" */
|
|
1879
|
+
'./p-navbar.cjs.entry.js')); }).then(processMod, consoleError);
|
|
1880
|
+
case 'p-navigation-item.cjs':
|
|
1881
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
1882
|
+
/* webpackMode: "lazy" */
|
|
1883
|
+
'./p-navigation-item.cjs.entry.js')); }).then(processMod, consoleError);
|
|
1884
|
+
case 'p-profile.cjs':
|
|
1885
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
1886
|
+
/* webpackMode: "lazy" */
|
|
1887
|
+
'./p-profile.cjs.entry.js')); }).then(processMod, consoleError);
|
|
1888
|
+
case 'p-select.cjs':
|
|
1889
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
1890
|
+
/* webpackMode: "lazy" */
|
|
1891
|
+
'./p-select.cjs.entry.js')); }).then(processMod, consoleError);
|
|
1892
|
+
case 'p-status.cjs':
|
|
1893
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
1894
|
+
/* webpackMode: "lazy" */
|
|
1895
|
+
'./p-status.cjs.entry.js')); }).then(processMod, consoleError);
|
|
1896
|
+
case 'p-stepper.cjs':
|
|
1897
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
1898
|
+
/* webpackMode: "lazy" */
|
|
1899
|
+
'./p-stepper.cjs.entry.js')); }).then(processMod, consoleError);
|
|
1900
|
+
case 'p-tab-group.cjs':
|
|
1901
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
1902
|
+
/* webpackMode: "lazy" */
|
|
1903
|
+
'./p-tab-group.cjs.entry.js')); }).then(processMod, consoleError);
|
|
1904
|
+
case 'p-tab-item.cjs':
|
|
1905
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
1906
|
+
/* webpackMode: "lazy" */
|
|
1907
|
+
'./p-tab-item.cjs.entry.js')); }).then(processMod, consoleError);
|
|
1908
|
+
case 'p-table.cjs':
|
|
1909
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
1910
|
+
/* webpackMode: "lazy" */
|
|
1911
|
+
'./p-table.cjs.entry.js')); }).then(processMod, consoleError);
|
|
1912
|
+
case 'p-table-column.cjs':
|
|
1913
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
1914
|
+
/* webpackMode: "lazy" */
|
|
1915
|
+
'./p-table-column.cjs.entry.js')); }).then(processMod, consoleError);
|
|
1916
|
+
case 'p-toast.cjs':
|
|
1917
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
1918
|
+
/* webpackMode: "lazy" */
|
|
1919
|
+
'./p-toast.cjs.entry.js')); }).then(processMod, consoleError);
|
|
1920
|
+
case 'p-toast-container.cjs':
|
|
1921
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
1922
|
+
/* webpackMode: "lazy" */
|
|
1923
|
+
'./p-toast-container.cjs.entry.js')); }).then(processMod, consoleError);
|
|
1924
|
+
case 'p-counter.cjs':
|
|
1925
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
1926
|
+
/* webpackMode: "lazy" */
|
|
1927
|
+
'./p-counter.cjs.entry.js')); }).then(processMod, consoleError);
|
|
1928
|
+
case 'p-drawer-body_3.cjs':
|
|
1929
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
1930
|
+
/* webpackMode: "lazy" */
|
|
1931
|
+
'./p-drawer-body_3.cjs.entry.js')); }).then(processMod, consoleError);
|
|
1932
|
+
case 'p-illustration_6.cjs':
|
|
1933
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
1934
|
+
/* webpackMode: "lazy" */
|
|
1935
|
+
'./p-illustration_6.cjs.entry.js')); }).then(processMod, consoleError);
|
|
1936
|
+
case 'p-modal-body_4.cjs':
|
|
1937
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
1938
|
+
/* webpackMode: "lazy" */
|
|
1939
|
+
'./p-modal-body_4.cjs.entry.js')); }).then(processMod, consoleError);
|
|
1940
|
+
case 'p-slider-indicator.cjs':
|
|
1941
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
1942
|
+
/* webpackMode: "lazy" */
|
|
1943
|
+
'./p-slider-indicator.cjs.entry.js')); }).then(processMod, consoleError);
|
|
1944
|
+
case 'p-stepper-item_2.cjs':
|
|
1945
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
1946
|
+
/* webpackMode: "lazy" */
|
|
1947
|
+
'./p-stepper-item_2.cjs.entry.js')); }).then(processMod, consoleError);
|
|
1948
|
+
case 'p-input-group_4.cjs':
|
|
1949
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
1950
|
+
/* webpackMode: "lazy" */
|
|
1951
|
+
'./p-input-group_4.cjs.entry.js')); }).then(processMod, consoleError);
|
|
1952
|
+
case 'p-page-size-select_3.cjs':
|
|
1953
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
1954
|
+
/* webpackMode: "lazy" */
|
|
1955
|
+
'./p-page-size-select_3.cjs.entry.js')); }).then(processMod, consoleError);
|
|
1956
|
+
case 'p-backdrop.cjs':
|
|
1957
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
1958
|
+
/* webpackMode: "lazy" */
|
|
1959
|
+
'./p-backdrop.cjs.entry.js')); }).then(processMod, consoleError);
|
|
1960
|
+
case 'p-dropdown_3.cjs':
|
|
1961
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
1962
|
+
/* webpackMode: "lazy" */
|
|
1963
|
+
'./p-dropdown_3.cjs.entry.js')); }).then(processMod, consoleError);
|
|
1964
|
+
case 'p-helper_2.cjs':
|
|
1965
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
1966
|
+
/* webpackMode: "lazy" */
|
|
1967
|
+
'./p-helper_2.cjs.entry.js')); }).then(processMod, consoleError);
|
|
1968
|
+
case 'p-divider.cjs':
|
|
1969
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
1970
|
+
/* webpackMode: "lazy" */
|
|
1971
|
+
'./p-divider.cjs.entry.js')); }).then(processMod, consoleError);
|
|
1972
|
+
}
|
|
1973
|
+
}
|
|
1606
1974
|
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
1607
1975
|
/* @vite-ignore */
|
|
1608
1976
|
/* webpackInclude: /\.entry\.js$/ */
|
|
@@ -1615,14 +1983,35 @@ const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
1615
1983
|
return importedModule[exportName];
|
|
1616
1984
|
}, consoleError);
|
|
1617
1985
|
};
|
|
1618
|
-
const styles = new Map();
|
|
1986
|
+
const styles = /*@__PURE__*/ new Map();
|
|
1987
|
+
const win = typeof window !== 'undefined' ? window : {};
|
|
1988
|
+
const doc = win.document || { head: {} };
|
|
1989
|
+
const plt = {
|
|
1990
|
+
$flags$: 0,
|
|
1991
|
+
$resourcesUrl$: '',
|
|
1992
|
+
jmp: (h) => h(),
|
|
1993
|
+
raf: (h) => requestAnimationFrame(h),
|
|
1994
|
+
ael: (el, eventName, listener, opts) => el.addEventListener(eventName, listener, opts),
|
|
1995
|
+
rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),
|
|
1996
|
+
ce: (eventName, opts) => new CustomEvent(eventName, opts),
|
|
1997
|
+
};
|
|
1998
|
+
const promiseResolve = (v) => Promise.resolve(v);
|
|
1999
|
+
const supportsConstructableStylesheets = /*@__PURE__*/ (() => {
|
|
2000
|
+
try {
|
|
2001
|
+
new CSSStyleSheet();
|
|
2002
|
+
return typeof new CSSStyleSheet().replaceSync === 'function';
|
|
2003
|
+
}
|
|
2004
|
+
catch (e) { }
|
|
2005
|
+
return false;
|
|
2006
|
+
})()
|
|
2007
|
+
;
|
|
1619
2008
|
const queueDomReads = [];
|
|
1620
2009
|
const queueDomWrites = [];
|
|
1621
2010
|
const queueTask = (queue, write) => (cb) => {
|
|
1622
2011
|
queue.push(cb);
|
|
1623
2012
|
if (!queuePending) {
|
|
1624
2013
|
queuePending = true;
|
|
1625
|
-
if (write && plt.$flags$ & 4 /* queueSync */) {
|
|
2014
|
+
if (write && plt.$flags$ & 4 /* PLATFORM_FLAGS.queueSync */) {
|
|
1626
2015
|
nextTick(flush);
|
|
1627
2016
|
}
|
|
1628
2017
|
else {
|