@zanichelli/albe-web-components 4.0.4 → 4.2.0
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 +66 -0
- package/dist/cjs/{index-6b6a3299.js → index-0e75c8cc.js} +16 -45
- package/dist/cjs/index.cjs.js +2 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/utils-155eec04.js +2706 -0
- package/dist/cjs/{utils-8cc414c9.js → utils-97262bbd.js} +1 -1
- package/dist/cjs/web-components-library.cjs.js +1 -1
- package/dist/cjs/z-app-switcher_9.cjs.entry.js +736 -0
- package/dist/cjs/z-aria-alert.cjs.entry.js +1 -1
- package/dist/cjs/z-avatar.cjs.entry.js +1 -1
- package/dist/cjs/z-button-deprecated.cjs.entry.js +1 -1
- package/dist/cjs/z-button.cjs.entry.js +44 -0
- package/dist/cjs/z-card.cjs.entry.js +69 -0
- package/dist/cjs/z-carousel.cjs.entry.js +24 -0
- package/dist/cjs/z-chip.cjs.entry.js +2 -2
- package/dist/cjs/z-combobox.cjs.entry.js +2 -2
- package/dist/cjs/z-contextual-menu.cjs.entry.js +18 -7
- package/dist/cjs/z-cookiebar.cjs.entry.js +1 -1
- package/dist/cjs/z-date-picker.cjs.entry.js +10 -2701
- package/dist/cjs/z-file-upload.cjs.entry.js +2 -2
- package/dist/cjs/z-file.cjs.entry.js +10 -9
- package/dist/cjs/z-footer.cjs.entry.js +1 -1
- package/dist/cjs/z-ghost-loading.cjs.entry.js +19 -0
- package/dist/cjs/z-input-deprecated.cjs.entry.js +2 -2
- package/dist/cjs/z-input-label_2.cjs.entry.js +2 -2
- package/dist/cjs/z-list-group.cjs.entry.js +1 -1
- package/dist/cjs/z-list_2.cjs.entry.js +1 -1
- package/dist/cjs/z-menu-dropdown_2.cjs.entry.js +2 -2
- package/dist/cjs/z-messages-pocket.cjs.entry.js +1 -1
- package/dist/cjs/z-modal-login.cjs.entry.js +1 -1
- package/dist/cjs/z-myz-card-alert.cjs.entry.js +1 -1
- package/dist/cjs/z-myz-card-dictionary.cjs.entry.js +1 -1
- package/dist/cjs/z-myz-card-footer.cjs.entry.js +1 -1
- package/dist/cjs/z-myz-card-info.cjs.entry.js +4 -4
- package/dist/cjs/z-myz-card_4.cjs.entry.js +1 -1
- package/dist/cjs/z-myz-list-item.cjs.entry.js +2 -2
- package/dist/cjs/z-myz-topbar.cjs.entry.js +1 -1
- package/dist/cjs/z-navigation-tab-link.cjs.entry.js +1 -1
- package/dist/cjs/z-navigation-tab.cjs.entry.js +1 -1
- package/dist/cjs/z-navigation-tabs.cjs.entry.js +1 -1
- package/dist/cjs/z-offcanvas.cjs.entry.js +63 -0
- package/dist/cjs/z-otp.cjs.entry.js +1 -1
- package/dist/cjs/z-pagination-bar.cjs.entry.js +2 -2
- package/dist/cjs/z-pocket_3.cjs.entry.js +2 -2
- package/dist/cjs/z-popover-deprecated.cjs.entry.js +338 -0
- package/dist/cjs/z-popover.cjs.entry.js +304 -97
- package/dist/cjs/z-section-title.cjs.entry.js +1 -1
- package/dist/cjs/z-skip-to-content.cjs.entry.js +2 -2
- package/dist/cjs/z-slideshow.cjs.entry.js +2 -2
- package/dist/cjs/z-status-tag.cjs.entry.js +1 -1
- package/dist/cjs/z-table-cell.cjs.entry.js +1 -1
- package/dist/cjs/z-table-header.cjs.entry.js +8 -11
- package/dist/cjs/z-table-row.cjs.entry.js +1 -1
- package/dist/cjs/z-table.cjs.entry.js +1 -1
- package/dist/cjs/z-toast-notification-list.cjs.entry.js +1 -1
- package/dist/cjs/z-toast-notification.cjs.entry.js +1 -1
- package/dist/cjs/z-toggle-switch.cjs.entry.js +2 -2
- package/dist/cjs/z-tooltip-deprecated.cjs.entry.js +274 -0
- package/dist/cjs/z-tooltip.cjs.entry.js +8 -251
- package/dist/collection/beans/index.js +16 -45
- package/dist/collection/collection-manifest.json +4 -1
- package/dist/collection/components/{z-date-picker → date-picker}/styles.css +69 -17
- package/dist/collection/components/date-picker/utils.js +76 -0
- package/dist/collection/components/{z-date-picker → date-picker/z-date-picker}/index.js +13 -84
- package/dist/collection/components/date-picker/z-range-picker/index.js +483 -0
- package/dist/collection/components/file-upload/z-file/index.js +13 -13
- package/dist/collection/components/file-upload/z-file/styles.css +2 -2
- package/dist/collection/components/inputs/z-input/styles.css +2 -0
- package/dist/collection/components/notification/z-tooltip/index.js +45 -298
- package/dist/collection/components/notification/z-tooltip/styles.css +8 -120
- package/dist/collection/components/z-contextual-menu/index.js +26 -16
- package/dist/collection/components/z-contextual-menu/styles.css +16 -5
- package/dist/collection/components/z-popover/index.js +381 -166
- package/dist/collection/components/z-popover/styles.css +91 -180
- package/dist/collection/components/z-table/z-table-header/index.js +10 -16
- package/dist/collection/components/z-table/z-table-header/styles.css +7 -1
- package/dist/collection/deprecated/z-popover-deprecated/index.js +489 -0
- package/dist/collection/deprecated/z-popover-deprecated/styles.css +134 -0
- package/dist/collection/deprecated/z-tooltip-deprecated/index.js +379 -0
- package/dist/collection/deprecated/z-tooltip-deprecated/styles.css +128 -0
- package/dist/collection/snowflakes/myz/card/z-myz-card-info/index.js +2 -2
- package/dist/collection/snowflakes/myz/card/z-myz-card-info/styles.css +1 -1
- package/dist/esm/{index-46ca649a.js → index-c1ce8cab.js} +17 -46
- package/dist/esm/index.js +2 -2
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{utils-5d5963ef.js → utils-99c70c57.js} +2 -2
- package/dist/esm/utils-fa9f38ec.js +2701 -0
- package/dist/esm/web-components-library.js +1 -1
- package/dist/esm/z-app-switcher_9.entry.js +724 -0
- package/dist/esm/z-aria-alert.entry.js +1 -1
- package/dist/esm/z-avatar.entry.js +1 -1
- package/dist/esm/z-button-deprecated.entry.js +1 -1
- package/dist/esm/z-button.entry.js +40 -0
- package/dist/esm/z-card.entry.js +65 -0
- package/dist/esm/z-carousel.entry.js +20 -0
- package/dist/esm/z-chip.entry.js +2 -2
- package/dist/esm/z-combobox.entry.js +2 -2
- package/dist/esm/z-contextual-menu.entry.js +19 -8
- package/dist/esm/z-cookiebar.entry.js +1 -1
- package/dist/esm/z-date-picker.entry.js +9 -2700
- package/dist/esm/z-file-upload.entry.js +2 -2
- package/dist/esm/z-file.entry.js +10 -9
- package/dist/esm/z-footer.entry.js +1 -1
- package/dist/esm/z-ghost-loading.entry.js +15 -0
- package/dist/esm/z-input-deprecated.entry.js +2 -2
- package/dist/esm/z-input-label_2.entry.js +2 -2
- package/dist/esm/z-list-group.entry.js +1 -1
- package/dist/esm/z-list_2.entry.js +1 -1
- package/dist/esm/z-menu-dropdown_2.entry.js +2 -2
- package/dist/esm/z-messages-pocket.entry.js +1 -1
- package/dist/esm/z-modal-login.entry.js +1 -1
- package/dist/esm/z-myz-card-alert.entry.js +1 -1
- package/dist/esm/z-myz-card-dictionary.entry.js +1 -1
- package/dist/esm/z-myz-card-footer.entry.js +1 -1
- package/dist/esm/z-myz-card-info.entry.js +4 -4
- package/dist/esm/z-myz-card_4.entry.js +1 -1
- package/dist/esm/z-myz-list-item.entry.js +2 -2
- package/dist/esm/z-myz-topbar.entry.js +1 -1
- package/dist/esm/z-navigation-tab-link.entry.js +1 -1
- package/dist/esm/z-navigation-tab.entry.js +1 -1
- package/dist/esm/z-navigation-tabs.entry.js +1 -1
- package/dist/esm/z-offcanvas.entry.js +59 -0
- package/dist/esm/z-otp.entry.js +1 -1
- package/dist/esm/z-pagination-bar.entry.js +2 -2
- package/dist/esm/z-pocket_3.entry.js +2 -2
- package/dist/esm/z-popover-deprecated.entry.js +334 -0
- package/dist/esm/z-popover.entry.js +305 -98
- package/dist/esm/z-section-title.entry.js +1 -1
- package/dist/esm/z-skip-to-content.entry.js +2 -2
- package/dist/esm/z-slideshow.entry.js +2 -2
- package/dist/esm/z-status-tag.entry.js +1 -1
- package/dist/esm/z-table-cell.entry.js +1 -1
- package/dist/esm/z-table-header.entry.js +8 -11
- package/dist/esm/z-table-row.entry.js +1 -1
- package/dist/esm/z-table.entry.js +1 -1
- package/dist/esm/z-toast-notification-list.entry.js +1 -1
- package/dist/esm/z-toast-notification.entry.js +1 -1
- package/dist/esm/z-toggle-switch.entry.js +2 -2
- package/dist/esm/z-tooltip-deprecated.entry.js +270 -0
- package/dist/esm/z-tooltip.entry.js +9 -252
- package/dist/types/beans/index.d.ts +7 -33
- package/dist/types/components/date-picker/utils.d.ts +3 -0
- package/dist/types/components/{z-date-picker → date-picker/z-date-picker}/index.d.ts +3 -8
- package/dist/types/components/date-picker/z-range-picker/index.d.ts +43 -0
- package/dist/types/components/file-upload/z-file/index.d.ts +3 -3
- package/dist/types/components/notification/z-tooltip/index.d.ts +14 -29
- package/dist/types/components/z-contextual-menu/index.d.ts +8 -4
- package/dist/types/components/z-popover/index.d.ts +57 -28
- package/dist/types/components/z-table/z-table-header/index.d.ts +2 -1
- package/dist/types/components.d.ts +210 -35
- package/dist/types/deprecated/z-popover-deprecated/index.d.ts +57 -0
- package/dist/types/deprecated/z-tooltip-deprecated/index.d.ts +41 -0
- package/dist/web-components-library/index.esm.js +1 -1
- package/dist/web-components-library/{p-4af112a7.entry.js → p-053846df.entry.js} +1 -1
- package/dist/web-components-library/{p-e2102da3.entry.js → p-0f6edb58.entry.js} +1 -1
- package/dist/web-components-library/p-10be0462.entry.js +1 -0
- package/dist/web-components-library/{p-b15efba3.entry.js → p-15fa8ca4.entry.js} +1 -1
- package/dist/web-components-library/{p-02ea7e49.entry.js → p-1a76a57d.entry.js} +1 -1
- package/{www/build/p-1f73a6d8.entry.js → dist/web-components-library/p-1b1717c9.entry.js} +1 -1
- package/{www/build/p-3edbd35c.entry.js → dist/web-components-library/p-1d5aa37b.entry.js} +1 -1
- package/dist/web-components-library/{p-9074e1a5.entry.js → p-1eb357e8.entry.js} +1 -1
- package/dist/web-components-library/{p-57d1acdc.entry.js → p-28e4abc4.entry.js} +1 -1
- package/dist/web-components-library/p-41f33f7b.entry.js +1 -0
- package/dist/web-components-library/{p-d33fea26.entry.js → p-46aecb12.entry.js} +1 -1
- package/dist/web-components-library/{p-63ccb013.entry.js → p-4be52491.entry.js} +1 -1
- package/{www/build/p-55ddbfe9.entry.js → dist/web-components-library/p-4d6f2f01.entry.js} +1 -1
- package/dist/web-components-library/p-514719d2.entry.js +1 -0
- package/dist/web-components-library/p-53dade4b.entry.js +16 -0
- package/{www/build/p-df4e963b.entry.js → dist/web-components-library/p-55f09348.entry.js} +1 -1
- package/dist/web-components-library/p-5789bbe7.entry.js +1 -0
- package/dist/web-components-library/{p-de25c7f0.entry.js → p-5dcbba4e.entry.js} +1 -1
- package/dist/web-components-library/{p-9f9e4266.entry.js → p-659fc25e.entry.js} +1 -1
- package/dist/web-components-library/{p-8fbc2ce9.entry.js → p-6bbd53ec.entry.js} +1 -1
- package/dist/web-components-library/{p-5be162d5.entry.js → p-6c52ed1b.entry.js} +1 -1
- package/dist/web-components-library/p-78df5dbf.entry.js +1 -0
- package/dist/web-components-library/{p-b9da171f.js → p-7f1cc90f.js} +1 -1
- package/dist/web-components-library/{p-0f17db30.entry.js → p-805af37b.entry.js} +1 -1
- package/dist/web-components-library/p-870dabdc.entry.js +1 -0
- package/dist/web-components-library/{p-43329b81.entry.js → p-897f9491.entry.js} +1 -1
- package/dist/web-components-library/{p-3c111c2a.entry.js → p-8ce4b2c4.entry.js} +1 -1
- package/dist/web-components-library/p-8cf3798f.entry.js +1 -0
- package/dist/web-components-library/p-8ddbbe24.entry.js +1 -0
- package/{www/build/p-dffdf60a.entry.js → dist/web-components-library/p-91ec5eb4.entry.js} +1 -1
- package/dist/web-components-library/{p-292bc0c4.entry.js → p-92895bce.entry.js} +1 -1
- package/dist/web-components-library/p-970bd07c.entry.js +1 -0
- package/dist/web-components-library/{p-6c6b4e80.entry.js → p-990b8236.entry.js} +1 -1
- package/dist/web-components-library/{p-51cdabeb.entry.js → p-99a562cb.entry.js} +1 -1
- package/dist/web-components-library/p-b359a3b4.entry.js +1 -0
- package/dist/web-components-library/p-b6cd034b.js +1 -0
- package/dist/web-components-library/{p-edb8d2ab.entry.js → p-b9cc2dfc.entry.js} +1 -1
- package/dist/web-components-library/p-bfc78a89.entry.js +1 -0
- package/dist/web-components-library/{p-d995d9dc.entry.js → p-c042e745.entry.js} +1 -1
- package/dist/web-components-library/{p-ccdebe3f.entry.js → p-c8383456.entry.js} +1 -1
- package/dist/web-components-library/{p-0e256fdc.entry.js → p-caa21a6f.entry.js} +1 -1
- package/{www/build/p-bfe5693d.entry.js → dist/web-components-library/p-cd88cead.entry.js} +1 -1
- package/dist/web-components-library/p-d04f3cb6.entry.js +1 -0
- package/{www/build/p-9a5ee6c2.entry.js → dist/web-components-library/p-d6361790.entry.js} +1 -1
- package/dist/web-components-library/{p-69ef6ddc.entry.js → p-dd0efdbf.entry.js} +1 -1
- package/dist/web-components-library/p-e007cd0b.entry.js +1 -0
- package/dist/web-components-library/{p-0a0aee35.entry.js → p-e74b3fd9.entry.js} +1 -1
- package/{www/build/p-d97a2db9.entry.js → dist/web-components-library/p-eca4cb15.entry.js} +1 -1
- package/dist/web-components-library/p-ed1cd6b1.js +1 -0
- package/dist/web-components-library/p-f26251dd.entry.js +1 -0
- package/dist/web-components-library/p-f61fd81e.entry.js +1 -0
- package/dist/web-components-library/{p-1727c1c8.entry.js → p-f78d6123.entry.js} +1 -1
- package/dist/web-components-library/p-fbfaa699.entry.js +1 -0
- package/dist/web-components-library/{p-ba29bc12.entry.js → p-fdd91263.entry.js} +1 -1
- package/dist/web-components-library/{p-fe927bf4.entry.js → p-ff4a0f6f.entry.js} +1 -1
- package/dist/web-components-library/web-components-library.esm.js +1 -1
- package/package.json +1 -1
- package/react/components.d.ts +3 -0
- package/react/components.js +5 -2
- package/react/components.js.map +1 -1
- package/www/build/index.esm.js +1 -1
- package/www/build/{p-4af112a7.entry.js → p-053846df.entry.js} +1 -1
- package/www/build/{p-e2102da3.entry.js → p-0f6edb58.entry.js} +1 -1
- package/www/build/p-10be0462.entry.js +1 -0
- package/www/build/{p-b15efba3.entry.js → p-15fa8ca4.entry.js} +1 -1
- package/www/build/{p-02ea7e49.entry.js → p-1a76a57d.entry.js} +1 -1
- package/{dist/web-components-library/p-1f73a6d8.entry.js → www/build/p-1b1717c9.entry.js} +1 -1
- package/{dist/web-components-library/p-3edbd35c.entry.js → www/build/p-1d5aa37b.entry.js} +1 -1
- package/www/build/{p-9074e1a5.entry.js → p-1eb357e8.entry.js} +1 -1
- package/www/build/{p-57d1acdc.entry.js → p-28e4abc4.entry.js} +1 -1
- package/www/build/p-41f33f7b.entry.js +1 -0
- package/www/build/{p-d33fea26.entry.js → p-46aecb12.entry.js} +1 -1
- package/www/build/{p-63ccb013.entry.js → p-4be52491.entry.js} +1 -1
- package/{dist/web-components-library/p-55ddbfe9.entry.js → www/build/p-4d6f2f01.entry.js} +1 -1
- package/www/build/p-514719d2.entry.js +1 -0
- package/www/build/p-53dade4b.entry.js +16 -0
- package/{dist/web-components-library/p-df4e963b.entry.js → www/build/p-55f09348.entry.js} +1 -1
- package/www/build/p-5789bbe7.entry.js +1 -0
- package/www/build/{p-de25c7f0.entry.js → p-5dcbba4e.entry.js} +1 -1
- package/www/build/{p-9f9e4266.entry.js → p-659fc25e.entry.js} +1 -1
- package/www/build/{p-8fbc2ce9.entry.js → p-6bbd53ec.entry.js} +1 -1
- package/www/build/{p-5be162d5.entry.js → p-6c52ed1b.entry.js} +1 -1
- package/www/build/p-78df5dbf.entry.js +1 -0
- package/www/build/{p-b9da171f.js → p-7f1cc90f.js} +1 -1
- package/www/build/{p-0f17db30.entry.js → p-805af37b.entry.js} +1 -1
- package/www/build/p-870dabdc.entry.js +1 -0
- package/www/build/{p-43329b81.entry.js → p-897f9491.entry.js} +1 -1
- package/www/build/{p-3c111c2a.entry.js → p-8ce4b2c4.entry.js} +1 -1
- package/www/build/p-8cf3798f.entry.js +1 -0
- package/www/build/p-8ddbbe24.entry.js +1 -0
- package/{dist/web-components-library/p-dffdf60a.entry.js → www/build/p-91ec5eb4.entry.js} +1 -1
- package/www/build/{p-292bc0c4.entry.js → p-92895bce.entry.js} +1 -1
- package/www/build/p-970bd07c.entry.js +1 -0
- package/www/build/p-975e9d42.js +129 -0
- package/www/build/{p-6c6b4e80.entry.js → p-990b8236.entry.js} +1 -1
- package/www/build/{p-51cdabeb.entry.js → p-99a562cb.entry.js} +1 -1
- package/www/build/p-b359a3b4.entry.js +1 -0
- package/www/build/p-b6cd034b.js +1 -0
- package/www/build/{p-edb8d2ab.entry.js → p-b9cc2dfc.entry.js} +1 -1
- package/www/build/p-bfc78a89.entry.js +1 -0
- package/www/build/{p-d995d9dc.entry.js → p-c042e745.entry.js} +1 -1
- package/www/build/{p-ccdebe3f.entry.js → p-c8383456.entry.js} +1 -1
- package/www/build/{p-0e256fdc.entry.js → p-caa21a6f.entry.js} +1 -1
- package/{dist/web-components-library/p-bfe5693d.entry.js → www/build/p-cd88cead.entry.js} +1 -1
- package/www/build/p-d04f3cb6.entry.js +1 -0
- package/{dist/web-components-library/p-9a5ee6c2.entry.js → www/build/p-d6361790.entry.js} +1 -1
- package/www/build/{p-69ef6ddc.entry.js → p-dd0efdbf.entry.js} +1 -1
- package/www/build/p-e007cd0b.entry.js +1 -0
- package/www/build/{p-0a0aee35.entry.js → p-e74b3fd9.entry.js} +1 -1
- package/{dist/web-components-library/p-d97a2db9.entry.js → www/build/p-eca4cb15.entry.js} +1 -1
- package/www/build/p-ed1cd6b1.js +1 -0
- package/www/build/p-f26251dd.entry.js +1 -0
- package/www/build/p-f61fd81e.entry.js +1 -0
- package/www/build/{p-1727c1c8.entry.js → p-f78d6123.entry.js} +1 -1
- package/www/build/p-fbfaa699.entry.js +1 -0
- package/www/build/p-fcff1237.css +812 -0
- package/www/build/{p-ba29bc12.entry.js → p-fdd91263.entry.js} +1 -1
- package/www/build/{p-fe927bf4.entry.js → p-ff4a0f6f.entry.js} +1 -1
- package/www/build/web-components-library.esm.js +1 -1
- package/www/index.html +6 -70
- package/dist/cjs/z-app-switcher_11.cjs.entry.js +0 -377
- package/dist/cjs/z-input_2.cjs.entry.js +0 -228
- package/dist/esm/z-app-switcher_11.entry.js +0 -363
- package/dist/esm/z-input_2.entry.js +0 -223
- package/dist/web-components-library/p-0d29d851.entry.js +0 -1
- package/dist/web-components-library/p-0e408871.entry.js +0 -1
- package/dist/web-components-library/p-0ef6c549.entry.js +0 -1
- package/dist/web-components-library/p-20d62443.entry.js +0 -1
- package/dist/web-components-library/p-562e2d52.entry.js +0 -1
- package/dist/web-components-library/p-5eacbfc7.entry.js +0 -1
- package/dist/web-components-library/p-6218514a.entry.js +0 -1
- package/dist/web-components-library/p-71accd8e.entry.js +0 -1
- package/dist/web-components-library/p-7c6d4440.entry.js +0 -1
- package/dist/web-components-library/p-9f5d707a.js +0 -1
- package/dist/web-components-library/p-a8875b97.entry.js +0 -16
- package/dist/web-components-library/p-e2431b92.entry.js +0 -1
- package/www/build/p-0d29d851.entry.js +0 -1
- package/www/build/p-0e408871.entry.js +0 -1
- package/www/build/p-0ef6c549.entry.js +0 -1
- package/www/build/p-20d62443.entry.js +0 -1
- package/www/build/p-562e2d52.entry.js +0 -1
- package/www/build/p-5eacbfc7.entry.js +0 -1
- package/www/build/p-6218514a.entry.js +0 -1
- package/www/build/p-71accd8e.entry.js +0 -1
- package/www/build/p-7614383b.js +0 -1
- package/www/build/p-7c6d4440.entry.js +0 -1
- package/www/build/p-88b56b6e.css +0 -1
- package/www/build/p-9f5d707a.js +0 -1
- package/www/build/p-a8875b97.entry.js +0 -16
- package/www/build/p-e2431b92.entry.js +0 -1
|
@@ -1,126 +1,332 @@
|
|
|
1
|
-
import { Component, Prop, h,
|
|
2
|
-
import
|
|
3
|
-
import { PopoverPosition, PopoverBorderRadius, PopoverShadow, KeyboardKeys, } from "../../beans";
|
|
1
|
+
import { Component, Prop, h, Watch, Listen, Element, State, Event, } from "@stencil/core";
|
|
2
|
+
import { PopoverPositions, KeyboardKeys } from "../../beans";
|
|
4
3
|
import { getElementTree } from "../../utils/utils";
|
|
4
|
+
const documentElement = document.documentElement;
|
|
5
|
+
function getParentElement(element) {
|
|
6
|
+
if (element.parentNode.host) {
|
|
7
|
+
return element.parentNode.host;
|
|
8
|
+
}
|
|
9
|
+
return element.parentNode;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Find the closest scrollable parent of a node.
|
|
13
|
+
*
|
|
14
|
+
* @param {Element} element The node
|
|
15
|
+
*/
|
|
16
|
+
function findScrollableParent(element) {
|
|
17
|
+
let parent = getParentElement(element);
|
|
18
|
+
while (parent && parent !== documentElement) {
|
|
19
|
+
const { overflow, overflowX, overflowY } = window.getComputedStyle(parent);
|
|
20
|
+
if (overflow === "hidden" ||
|
|
21
|
+
overflowY === "hidden" ||
|
|
22
|
+
overflowX === "hidden") {
|
|
23
|
+
return parent;
|
|
24
|
+
}
|
|
25
|
+
if ((parent.scrollHeight > parent.clientHeight &&
|
|
26
|
+
overflow !== "visible" &&
|
|
27
|
+
overflowY !== "visible") ||
|
|
28
|
+
(parent.scrollWidth > parent.clientWidth &&
|
|
29
|
+
overflow !== "visible" &&
|
|
30
|
+
overflowX !== "visible")) {
|
|
31
|
+
return parent;
|
|
32
|
+
}
|
|
33
|
+
parent = getParentElement(parent);
|
|
34
|
+
}
|
|
35
|
+
return documentElement;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Calculate computed offset.
|
|
39
|
+
* It includes matrix transformations.
|
|
40
|
+
* @param element The target element.
|
|
41
|
+
* @param targetParentOffset The relative offset parent.
|
|
42
|
+
* @return A client rect object.
|
|
43
|
+
*/
|
|
44
|
+
function computeOffset(element, targetParentOffset) {
|
|
45
|
+
const rect = element.getBoundingClientRect();
|
|
46
|
+
const width = rect.width;
|
|
47
|
+
const height = rect.height;
|
|
48
|
+
let top = 0;
|
|
49
|
+
let left = 0;
|
|
50
|
+
let offsetParent = element;
|
|
51
|
+
while (offsetParent && offsetParent != targetParentOffset) {
|
|
52
|
+
left += offsetParent.offsetLeft;
|
|
53
|
+
// document.body sometimes has offsetTop == 0 but still has an
|
|
54
|
+
// offset because of children margins!
|
|
55
|
+
if (offsetParent === document.body) {
|
|
56
|
+
top += offsetParent.getBoundingClientRect().top + window.scrollY;
|
|
57
|
+
}
|
|
58
|
+
else {
|
|
59
|
+
top += offsetParent.offsetTop;
|
|
60
|
+
}
|
|
61
|
+
if (window.DOMMatrix) {
|
|
62
|
+
const style = window.getComputedStyle(offsetParent);
|
|
63
|
+
const transform = style.transform || style.webkitTransform;
|
|
64
|
+
const domMatrix = new DOMMatrix(transform);
|
|
65
|
+
if (domMatrix) {
|
|
66
|
+
left += domMatrix.m41;
|
|
67
|
+
if (offsetParent !== document.body) {
|
|
68
|
+
top += domMatrix.m42;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
if (!offsetParent.offsetParent) {
|
|
73
|
+
break;
|
|
74
|
+
}
|
|
75
|
+
offsetParent = offsetParent.offsetParent;
|
|
76
|
+
}
|
|
77
|
+
let parentWidth;
|
|
78
|
+
let parentHeight;
|
|
79
|
+
if (offsetParent === document.body) {
|
|
80
|
+
parentWidth = window.innerWidth;
|
|
81
|
+
parentHeight = window.innerHeight;
|
|
82
|
+
}
|
|
83
|
+
else {
|
|
84
|
+
parentWidth = offsetParent.offsetWidth;
|
|
85
|
+
parentHeight = offsetParent.offsetHeight;
|
|
86
|
+
}
|
|
87
|
+
const right = parentWidth - left - rect.width;
|
|
88
|
+
const bottom = parentHeight - top - rect.height;
|
|
89
|
+
return { top, right, bottom, left, width, height };
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Popover component.
|
|
93
|
+
*
|
|
94
|
+
* @cssprop --z-popover-theme--surface - background color of the popover.
|
|
95
|
+
* @cssprop --z-popover-theme--text - foreground color of the popover.
|
|
96
|
+
* @cssprop --z-popover-padding - padding of the popover.
|
|
97
|
+
* @cssprop --z-popover-shadow-filter - drop-shadow filter of the popover. Defaults to `drop-shadow(0 1px 2px var(--shadow-color-base))`.
|
|
98
|
+
*/
|
|
5
99
|
export class ZPopover {
|
|
6
|
-
/**
|
|
7
|
-
* Constructor.
|
|
8
|
-
*/
|
|
9
100
|
constructor() {
|
|
10
|
-
/**
|
|
11
|
-
this.position =
|
|
12
|
-
/**
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
this.
|
|
16
|
-
/**
|
|
17
|
-
|
|
18
|
-
|
|
101
|
+
/** Popover position. */
|
|
102
|
+
this.position = PopoverPositions.AUTO;
|
|
103
|
+
/**
|
|
104
|
+
* The open state of the popover.
|
|
105
|
+
*/
|
|
106
|
+
this.open = false;
|
|
107
|
+
/**
|
|
108
|
+
* Whether to show popover's arrow.
|
|
109
|
+
*/
|
|
19
110
|
this.showArrow = false;
|
|
20
|
-
/**
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
this.
|
|
24
|
-
|
|
111
|
+
/**
|
|
112
|
+
* Whether to center the popup on the main side (according to "position").
|
|
113
|
+
*/
|
|
114
|
+
this.center = false;
|
|
115
|
+
/**
|
|
116
|
+
* Whether the popover should be closed when the user clicks outside of it or hit "ESC".
|
|
117
|
+
*/
|
|
118
|
+
this.closable = true;
|
|
25
119
|
}
|
|
26
|
-
|
|
27
|
-
this.
|
|
28
|
-
|
|
29
|
-
}
|
|
120
|
+
closePopoverWithKeyboard(e) {
|
|
121
|
+
if (this.closable && e.key === KeyboardKeys.ESC) {
|
|
122
|
+
this.open = false;
|
|
123
|
+
}
|
|
30
124
|
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
const
|
|
36
|
-
const
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
125
|
+
handleOutsideClick(e) {
|
|
126
|
+
if (!this.closable) {
|
|
127
|
+
return;
|
|
128
|
+
}
|
|
129
|
+
const tree = getElementTree(e.target);
|
|
130
|
+
const parent = tree.find((elem) => elem.nodeName.toLowerCase() === "z-popover");
|
|
131
|
+
if (!parent) {
|
|
132
|
+
this.open = false;
|
|
133
|
+
this.positionChange.emit({ position: this.currentPosition });
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
validatePosition(newValue) {
|
|
137
|
+
if (newValue &&
|
|
138
|
+
Object.values(PopoverPositions).every((position) => newValue !== position)) {
|
|
139
|
+
this.position = PopoverPositions.AUTO;
|
|
140
|
+
}
|
|
141
|
+
this.currentPosition = this.position;
|
|
142
|
+
this.positionChange.emit({ position: this.currentPosition });
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* Setup popover behaviors on opening.
|
|
146
|
+
*/
|
|
147
|
+
onOpen() {
|
|
148
|
+
cancelAnimationFrame(this.animationFrameRequestId);
|
|
149
|
+
if (this.open) {
|
|
150
|
+
const setPosition = () => {
|
|
151
|
+
if (this.open) {
|
|
152
|
+
this.setPosition();
|
|
153
|
+
this.animationFrameRequestId = requestAnimationFrame(setPosition);
|
|
154
|
+
}
|
|
155
|
+
};
|
|
156
|
+
setPosition();
|
|
157
|
+
}
|
|
158
|
+
else if (this.host.hasAttribute('current-position')) {
|
|
159
|
+
this.host.removeAttribute('current-position');
|
|
160
|
+
this.currentPosition = undefined;
|
|
161
|
+
}
|
|
162
|
+
this.openChange.emit({ open: this.open });
|
|
163
|
+
}
|
|
164
|
+
disconnectedCallback() {
|
|
165
|
+
cancelAnimationFrame(this.animationFrameRequestId);
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* Set the position of the popover.
|
|
169
|
+
*/
|
|
170
|
+
setPosition() {
|
|
171
|
+
let element;
|
|
172
|
+
if (typeof this.bindTo === "string") {
|
|
173
|
+
element = this.host.ownerDocument.querySelector(this.bindTo);
|
|
174
|
+
}
|
|
175
|
+
else if (this.bindTo) {
|
|
176
|
+
element = this.bindTo;
|
|
177
|
+
}
|
|
178
|
+
else {
|
|
179
|
+
element = this.host.parentElement;
|
|
180
|
+
}
|
|
181
|
+
if (!element) {
|
|
182
|
+
return;
|
|
183
|
+
}
|
|
184
|
+
const scrollContainer = findScrollableParent(element);
|
|
185
|
+
const scrollingBoundingRect = scrollContainer.getBoundingClientRect();
|
|
186
|
+
const offsetContainer = this.host.offsetParent;
|
|
187
|
+
const relativeBoundingRect = offsetContainer
|
|
188
|
+
? computeOffset(offsetContainer, scrollContainer)
|
|
189
|
+
: { top: 0, right: 0, bottom: 0, left: 0 };
|
|
190
|
+
const boundingRect = computeOffset(element, scrollContainer);
|
|
191
|
+
const top = boundingRect.top - scrollContainer.scrollTop;
|
|
192
|
+
const bottom = scrollingBoundingRect.height -
|
|
193
|
+
(boundingRect.top + boundingRect.height) +
|
|
194
|
+
scrollContainer.scrollTop;
|
|
195
|
+
const left = boundingRect.left - scrollContainer.scrollLeft;
|
|
196
|
+
const right = scrollingBoundingRect.width -
|
|
197
|
+
(boundingRect.left + boundingRect.width) +
|
|
198
|
+
scrollContainer.scrollLeft;
|
|
199
|
+
const overflowBottom = Math.max(0, scrollingBoundingRect.top +
|
|
200
|
+
scrollingBoundingRect.height -
|
|
201
|
+
window.innerHeight);
|
|
202
|
+
const overflowRight = Math.max(0, scrollingBoundingRect.left +
|
|
203
|
+
scrollingBoundingRect.width -
|
|
204
|
+
window.innerWidth);
|
|
205
|
+
const availableTop = Math.min(top, top + scrollingBoundingRect.top);
|
|
206
|
+
const availableBottom = Math.min(bottom, bottom - overflowBottom);
|
|
207
|
+
const availableLeft = Math.min(left, left + scrollingBoundingRect.left);
|
|
208
|
+
const availableRight = Math.min(right, right - overflowRight);
|
|
209
|
+
const availableHeight = availableTop + availableBottom + boundingRect.height;
|
|
210
|
+
const availableWidth = availableLeft + availableRight + boundingRect.width;
|
|
211
|
+
let position = this.currentPosition;
|
|
212
|
+
const positions = [];
|
|
213
|
+
if (this.position === PopoverPositions.AUTO) {
|
|
214
|
+
/**
|
|
215
|
+
* The `AUTO` position tries to place the popover in the 'safest' area,
|
|
216
|
+
* where there's more space available.
|
|
217
|
+
*/
|
|
218
|
+
if (availableLeft / availableWidth > 0.6) {
|
|
219
|
+
positions.push(PopoverPositions.LEFT);
|
|
45
220
|
}
|
|
46
|
-
else {
|
|
47
|
-
|
|
221
|
+
else if (availableLeft / availableWidth < 0.4) {
|
|
222
|
+
positions.push(PopoverPositions.RIGHT);
|
|
48
223
|
}
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
if (b > height) {
|
|
52
|
-
if (this.position.startsWith("below")) {
|
|
53
|
-
firstSide = "above";
|
|
224
|
+
if (availableTop / availableHeight > 0.9) {
|
|
225
|
+
positions.unshift(PopoverPositions.TOP);
|
|
54
226
|
}
|
|
55
|
-
else {
|
|
56
|
-
|
|
227
|
+
else if (availableTop / availableHeight > 0.6) {
|
|
228
|
+
positions.push(PopoverPositions.TOP);
|
|
57
229
|
}
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
if (r > width) {
|
|
61
|
-
if (this.position.startsWith("above") ||
|
|
62
|
-
this.position.startsWith("below")) {
|
|
63
|
-
secondSide = "left";
|
|
230
|
+
else if (availableTop / availableHeight < 0.1) {
|
|
231
|
+
positions.unshift(PopoverPositions.BOTTOM);
|
|
64
232
|
}
|
|
65
233
|
else {
|
|
66
|
-
|
|
234
|
+
positions.push(PopoverPositions.BOTTOM);
|
|
67
235
|
}
|
|
236
|
+
position = positions.join("_");
|
|
68
237
|
}
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
238
|
+
const style = this.host.style;
|
|
239
|
+
style.position = "absolute";
|
|
240
|
+
const offsetTop = boundingRect.top - relativeBoundingRect.top;
|
|
241
|
+
const offsetRight = boundingRect.right - relativeBoundingRect.right;
|
|
242
|
+
const offsetBottom = boundingRect.bottom - relativeBoundingRect.bottom;
|
|
243
|
+
const offsetLeft = boundingRect.left - relativeBoundingRect.left;
|
|
244
|
+
const offsetModifier = this.center ? 0.5 : 0;
|
|
245
|
+
const sizeModifier = this.center ? 0.5 : 0;
|
|
246
|
+
if (position === PopoverPositions.TOP ||
|
|
247
|
+
position === PopoverPositions.TOP_RIGHT) {
|
|
248
|
+
style.top = "auto";
|
|
249
|
+
style.right = "auto";
|
|
250
|
+
style.bottom = `${offsetBottom + boundingRect.height}px`;
|
|
251
|
+
style.left = `${offsetLeft + boundingRect.width * offsetModifier}px`;
|
|
252
|
+
style.maxHeight = `${availableTop}px`;
|
|
253
|
+
if (position === PopoverPositions.TOP_RIGHT) {
|
|
254
|
+
style.maxWidth = `${availableRight + boundingRect.width * sizeModifier}px`;
|
|
74
255
|
}
|
|
75
|
-
|
|
76
|
-
|
|
256
|
+
}
|
|
257
|
+
else if (position === PopoverPositions.TOP_LEFT) {
|
|
258
|
+
style.top = "auto";
|
|
259
|
+
style.right = `${offsetRight + boundingRect.width * offsetModifier}px`;
|
|
260
|
+
style.bottom = `${offsetBottom + boundingRect.height}px`;
|
|
261
|
+
style.left = "auto";
|
|
262
|
+
style.maxWidth = `${availableLeft}px`;
|
|
263
|
+
style.maxHeight = `${availableTop}px`;
|
|
264
|
+
}
|
|
265
|
+
else if (position === PopoverPositions.BOTTOM ||
|
|
266
|
+
position === PopoverPositions.BOTTOM_RIGHT) {
|
|
267
|
+
style.top = `${offsetTop + boundingRect.height}px`;
|
|
268
|
+
style.right = "auto";
|
|
269
|
+
style.bottom = "auto";
|
|
270
|
+
style.left = `${offsetLeft + boundingRect.width * offsetModifier}px`;
|
|
271
|
+
style.maxHeight = `${availableBottom}px`;
|
|
272
|
+
if (position === PopoverPositions.BOTTOM_RIGHT) {
|
|
273
|
+
style.maxWidth = `${availableRight + boundingRect.width * sizeModifier}px`;
|
|
77
274
|
}
|
|
78
275
|
}
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
closePopoverWithKeyboard(e) {
|
|
87
|
-
if (e.key === KeyboardKeys.ESC) {
|
|
88
|
-
this.closePopover();
|
|
276
|
+
else if (position === PopoverPositions.BOTTOM_LEFT) {
|
|
277
|
+
style.top = `${offsetTop + boundingRect.height}px`;
|
|
278
|
+
style.right = `${offsetRight + boundingRect.width * offsetModifier}px`;
|
|
279
|
+
style.bottom = "auto";
|
|
280
|
+
style.left = "auto";
|
|
281
|
+
style.maxWidth = `${availableLeft}px`;
|
|
282
|
+
style.maxHeight = `${availableBottom}px`;
|
|
89
283
|
}
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
this.isVisible ? this.closePopover() : this.openPopover();
|
|
284
|
+
else if (position === PopoverPositions.RIGHT ||
|
|
285
|
+
position === PopoverPositions.RIGHT_BOTTOM) {
|
|
286
|
+
style.top = `${offsetTop + boundingRect.height * offsetModifier}px`;
|
|
287
|
+
style.right = "auto";
|
|
288
|
+
style.bottom = "auto";
|
|
289
|
+
style.left = `${offsetLeft + boundingRect.width}px`;
|
|
290
|
+
style.maxWidth = `${availableRight}px`;
|
|
291
|
+
style.maxHeight = `${availableBottom + boundingRect.height * sizeModifier}px`;
|
|
99
292
|
}
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
293
|
+
else if (position === PopoverPositions.RIGHT_TOP) {
|
|
294
|
+
style.top = "auto";
|
|
295
|
+
style.right = "auto";
|
|
296
|
+
style.bottom = `${offsetBottom + boundingRect.height * offsetModifier}px`;
|
|
297
|
+
style.left = `${offsetLeft + boundingRect.width}px`;
|
|
298
|
+
style.maxWidth = `${availableRight}px`;
|
|
299
|
+
style.maxHeight = `${availableTop + boundingRect.height * sizeModifier}px`;
|
|
106
300
|
}
|
|
301
|
+
else if (position === PopoverPositions.LEFT ||
|
|
302
|
+
position === PopoverPositions.LEFT_BOTTOM) {
|
|
303
|
+
style.top = `${offsetTop + boundingRect.height * offsetModifier}px`;
|
|
304
|
+
style.right = `${offsetRight + boundingRect.width}px`;
|
|
305
|
+
style.bottom = "auto";
|
|
306
|
+
style.left = "auto";
|
|
307
|
+
style.maxWidth = `${availableLeft}px`;
|
|
308
|
+
style.maxHeight = `${availableBottom + boundingRect.height * sizeModifier}px`;
|
|
309
|
+
}
|
|
310
|
+
else if (position === PopoverPositions.LEFT_TOP) {
|
|
311
|
+
style.top = "auto";
|
|
312
|
+
style.right = `${offsetRight + boundingRect.width}px`;
|
|
313
|
+
style.bottom = `${offsetBottom + boundingRect.height * offsetModifier}px`;
|
|
314
|
+
style.left = "auto";
|
|
315
|
+
style.maxWidth = `${availableLeft}px`;
|
|
316
|
+
style.maxHeight = `${availableTop + boundingRect.height * sizeModifier}px`;
|
|
317
|
+
}
|
|
318
|
+
this.currentPosition = position || this.position;
|
|
319
|
+
this.host.setAttribute('current-position', this.currentPosition);
|
|
320
|
+
}
|
|
321
|
+
componentWillLoad() {
|
|
322
|
+
this.validatePosition(this.position);
|
|
323
|
+
this.onOpen();
|
|
107
324
|
}
|
|
108
325
|
render() {
|
|
109
|
-
return
|
|
110
|
-
h("div", { tabindex: "0", onClick: (event) => this.handleClick(event), onKeyDown: (event) => {
|
|
111
|
-
if (event.key === KeyboardKeys.ENTER) {
|
|
112
|
-
this.handleClick(event);
|
|
113
|
-
}
|
|
114
|
-
} },
|
|
115
|
-
h("slot", { name: "trigger" })),
|
|
116
|
-
h("div", { ref: (e) => (this.popoverElem = e), class: classNames("popover-content-container", this.popoverPosition, `border-radius-${this.borderRadius}`, this.boxShadow, { "show-arrow": this.showArrow }, { visible: this.isVisible }), style: {
|
|
117
|
-
backgroundColor: `var(--${this.backgroundColor})`,
|
|
118
|
-
padding: this.padding,
|
|
119
|
-
} },
|
|
120
|
-
h("slot", { name: "popover" }))));
|
|
326
|
+
return h("slot", null);
|
|
121
327
|
}
|
|
122
328
|
static get is() { return "z-popover"; }
|
|
123
|
-
static get encapsulation() { return "
|
|
329
|
+
static get encapsulation() { return "shadow"; }
|
|
124
330
|
static get originalStyleUrls() { return {
|
|
125
331
|
"$": ["styles.css"]
|
|
126
332
|
}; }
|
|
@@ -130,55 +336,54 @@ export class ZPopover {
|
|
|
130
336
|
static get properties() { return {
|
|
131
337
|
"position": {
|
|
132
338
|
"type": "string",
|
|
133
|
-
"mutable":
|
|
339
|
+
"mutable": true,
|
|
134
340
|
"complexType": {
|
|
135
|
-
"original": "
|
|
136
|
-
"resolved": "
|
|
341
|
+
"original": "PopoverPositions",
|
|
342
|
+
"resolved": "PopoverPositions.AUTO | PopoverPositions.BOTTOM | PopoverPositions.BOTTOM_LEFT | PopoverPositions.BOTTOM_RIGHT | PopoverPositions.LEFT | PopoverPositions.LEFT_BOTTOM | PopoverPositions.LEFT_TOP | PopoverPositions.RIGHT | PopoverPositions.RIGHT_BOTTOM | PopoverPositions.RIGHT_TOP | PopoverPositions.TOP | PopoverPositions.TOP_LEFT | PopoverPositions.TOP_RIGHT",
|
|
137
343
|
"references": {
|
|
138
|
-
"
|
|
344
|
+
"PopoverPositions": {
|
|
139
345
|
"location": "import",
|
|
140
346
|
"path": "../../beans"
|
|
141
347
|
}
|
|
142
348
|
}
|
|
143
349
|
},
|
|
144
350
|
"required": false,
|
|
145
|
-
"optional":
|
|
351
|
+
"optional": false,
|
|
146
352
|
"docs": {
|
|
147
353
|
"tags": [],
|
|
148
|
-
"text": "
|
|
354
|
+
"text": "Popover position."
|
|
149
355
|
},
|
|
150
356
|
"attribute": "position",
|
|
151
|
-
"reflect":
|
|
152
|
-
"defaultValue": "
|
|
357
|
+
"reflect": true,
|
|
358
|
+
"defaultValue": "PopoverPositions.AUTO"
|
|
153
359
|
},
|
|
154
|
-
"
|
|
155
|
-
"type": "
|
|
156
|
-
"mutable":
|
|
360
|
+
"open": {
|
|
361
|
+
"type": "boolean",
|
|
362
|
+
"mutable": true,
|
|
157
363
|
"complexType": {
|
|
158
|
-
"original": "
|
|
159
|
-
"resolved": "
|
|
364
|
+
"original": "boolean",
|
|
365
|
+
"resolved": "boolean",
|
|
160
366
|
"references": {}
|
|
161
367
|
},
|
|
162
368
|
"required": false,
|
|
163
|
-
"optional":
|
|
369
|
+
"optional": false,
|
|
164
370
|
"docs": {
|
|
165
371
|
"tags": [],
|
|
166
|
-
"text": "
|
|
372
|
+
"text": "The open state of the popover."
|
|
167
373
|
},
|
|
168
|
-
"attribute": "
|
|
169
|
-
"reflect":
|
|
170
|
-
"defaultValue": "
|
|
374
|
+
"attribute": "open",
|
|
375
|
+
"reflect": true,
|
|
376
|
+
"defaultValue": "false"
|
|
171
377
|
},
|
|
172
|
-
"
|
|
378
|
+
"bindTo": {
|
|
173
379
|
"type": "string",
|
|
174
380
|
"mutable": false,
|
|
175
381
|
"complexType": {
|
|
176
|
-
"original": "
|
|
177
|
-
"resolved": "
|
|
382
|
+
"original": "string | HTMLElement",
|
|
383
|
+
"resolved": "HTMLElement | string",
|
|
178
384
|
"references": {
|
|
179
|
-
"
|
|
180
|
-
"location": "
|
|
181
|
-
"path": "../../beans"
|
|
385
|
+
"HTMLElement": {
|
|
386
|
+
"location": "global"
|
|
182
387
|
}
|
|
183
388
|
}
|
|
184
389
|
},
|
|
@@ -186,36 +391,30 @@ export class ZPopover {
|
|
|
186
391
|
"optional": true,
|
|
187
392
|
"docs": {
|
|
188
393
|
"tags": [],
|
|
189
|
-
"text": "
|
|
394
|
+
"text": "The selector or the element bound with the popover."
|
|
190
395
|
},
|
|
191
|
-
"attribute": "
|
|
192
|
-
"reflect": false
|
|
193
|
-
"defaultValue": "PopoverBorderRadius.small"
|
|
396
|
+
"attribute": "bind-to",
|
|
397
|
+
"reflect": false
|
|
194
398
|
},
|
|
195
|
-
"
|
|
196
|
-
"type": "
|
|
399
|
+
"showArrow": {
|
|
400
|
+
"type": "boolean",
|
|
197
401
|
"mutable": false,
|
|
198
402
|
"complexType": {
|
|
199
|
-
"original": "
|
|
200
|
-
"resolved": "
|
|
201
|
-
"references": {
|
|
202
|
-
"PopoverShadow": {
|
|
203
|
-
"location": "import",
|
|
204
|
-
"path": "../../beans"
|
|
205
|
-
}
|
|
206
|
-
}
|
|
403
|
+
"original": "boolean",
|
|
404
|
+
"resolved": "boolean",
|
|
405
|
+
"references": {}
|
|
207
406
|
},
|
|
208
407
|
"required": false,
|
|
209
|
-
"optional":
|
|
408
|
+
"optional": false,
|
|
210
409
|
"docs": {
|
|
211
410
|
"tags": [],
|
|
212
|
-
"text": "
|
|
411
|
+
"text": "Whether to show popover's arrow."
|
|
213
412
|
},
|
|
214
|
-
"attribute": "
|
|
215
|
-
"reflect":
|
|
216
|
-
"defaultValue": "
|
|
413
|
+
"attribute": "show-arrow",
|
|
414
|
+
"reflect": true,
|
|
415
|
+
"defaultValue": "false"
|
|
217
416
|
},
|
|
218
|
-
"
|
|
417
|
+
"center": {
|
|
219
418
|
"type": "boolean",
|
|
220
419
|
"mutable": false,
|
|
221
420
|
"complexType": {
|
|
@@ -224,47 +423,61 @@ export class ZPopover {
|
|
|
224
423
|
"references": {}
|
|
225
424
|
},
|
|
226
425
|
"required": false,
|
|
227
|
-
"optional":
|
|
426
|
+
"optional": false,
|
|
228
427
|
"docs": {
|
|
229
428
|
"tags": [],
|
|
230
|
-
"text": "
|
|
429
|
+
"text": "Whether to center the popup on the main side (according to \"position\")."
|
|
231
430
|
},
|
|
232
|
-
"attribute": "
|
|
233
|
-
"reflect":
|
|
431
|
+
"attribute": "center",
|
|
432
|
+
"reflect": true,
|
|
234
433
|
"defaultValue": "false"
|
|
235
434
|
},
|
|
236
|
-
"
|
|
237
|
-
"type": "
|
|
435
|
+
"closable": {
|
|
436
|
+
"type": "boolean",
|
|
238
437
|
"mutable": false,
|
|
239
438
|
"complexType": {
|
|
240
|
-
"original": "
|
|
241
|
-
"resolved": "
|
|
439
|
+
"original": "boolean",
|
|
440
|
+
"resolved": "boolean",
|
|
242
441
|
"references": {}
|
|
243
442
|
},
|
|
244
443
|
"required": false,
|
|
245
|
-
"optional":
|
|
444
|
+
"optional": false,
|
|
246
445
|
"docs": {
|
|
247
446
|
"tags": [],
|
|
248
|
-
"text": "
|
|
447
|
+
"text": "Whether the popover should be closed when the user clicks outside of it or hit \"ESC\"."
|
|
249
448
|
},
|
|
250
|
-
"attribute": "
|
|
449
|
+
"attribute": "closable",
|
|
251
450
|
"reflect": false,
|
|
252
|
-
"defaultValue": "
|
|
451
|
+
"defaultValue": "true"
|
|
253
452
|
}
|
|
254
453
|
}; }
|
|
255
454
|
static get states() { return {
|
|
256
|
-
"
|
|
257
|
-
"popoverPosition": {}
|
|
455
|
+
"currentPosition": {}
|
|
258
456
|
}; }
|
|
259
457
|
static get events() { return [{
|
|
260
|
-
"method": "
|
|
261
|
-
"name": "
|
|
458
|
+
"method": "positionChange",
|
|
459
|
+
"name": "positionChange",
|
|
262
460
|
"bubbles": true,
|
|
263
461
|
"cancelable": true,
|
|
264
462
|
"composed": true,
|
|
265
463
|
"docs": {
|
|
266
464
|
"tags": [],
|
|
267
|
-
"text": "
|
|
465
|
+
"text": "Position change event."
|
|
466
|
+
},
|
|
467
|
+
"complexType": {
|
|
468
|
+
"original": "any",
|
|
469
|
+
"resolved": "any",
|
|
470
|
+
"references": {}
|
|
471
|
+
}
|
|
472
|
+
}, {
|
|
473
|
+
"method": "openChange",
|
|
474
|
+
"name": "openChange",
|
|
475
|
+
"bubbles": true,
|
|
476
|
+
"cancelable": true,
|
|
477
|
+
"composed": true,
|
|
478
|
+
"docs": {
|
|
479
|
+
"tags": [],
|
|
480
|
+
"text": "Open change event."
|
|
268
481
|
},
|
|
269
482
|
"complexType": {
|
|
270
483
|
"original": "any",
|
|
@@ -272,13 +485,15 @@ export class ZPopover {
|
|
|
272
485
|
"references": {}
|
|
273
486
|
}
|
|
274
487
|
}]; }
|
|
275
|
-
static get
|
|
276
|
-
|
|
277
|
-
"
|
|
278
|
-
"
|
|
279
|
-
"capture": false,
|
|
280
|
-
"passive": false
|
|
488
|
+
static get elementRef() { return "host"; }
|
|
489
|
+
static get watchers() { return [{
|
|
490
|
+
"propName": "position",
|
|
491
|
+
"methodName": "validatePosition"
|
|
281
492
|
}, {
|
|
493
|
+
"propName": "open",
|
|
494
|
+
"methodName": "onOpen"
|
|
495
|
+
}]; }
|
|
496
|
+
static get listeners() { return [{
|
|
282
497
|
"name": "keyup",
|
|
283
498
|
"method": "closePopoverWithKeyboard",
|
|
284
499
|
"target": "window",
|