@zanichelli/albe-web-components 18.6.3 → 18.6.5
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 +4 -0
- package/dist/cjs/{index-c48948bf.js → index-0d3de93e.js} +2 -2
- package/dist/cjs/{index-c48948bf.js.map → index-0d3de93e.js.map} +1 -1
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{utils-93961cb6.js → utils-3dc316f8.js} +56 -1
- package/dist/cjs/utils-3dc316f8.js.map +1 -0
- package/dist/cjs/web-components-library.cjs.js +1 -1
- package/dist/cjs/z-anchor-navigation.cjs.entry.js +1 -1
- package/dist/cjs/z-anchor-navigation.cjs.entry.js.map +1 -1
- package/dist/cjs/z-app-header_12.cjs.entry.js +2 -2
- package/dist/cjs/z-app-header_12.cjs.entry.js.map +1 -1
- package/dist/cjs/z-book-card-deprecated.cjs.entry.js +1 -1
- package/dist/cjs/z-breadcrumb.cjs.entry.js +1 -1
- package/dist/cjs/z-card.cjs.entry.js +1 -1
- package/dist/cjs/z-card.cjs.entry.js.map +1 -1
- package/dist/cjs/z-combobox.cjs.entry.js +1 -1
- package/dist/cjs/z-menu.cjs.entry.js +1 -1
- package/dist/cjs/z-myz-card-info.cjs.entry.js +1 -1
- package/dist/cjs/z-myz-list-item.cjs.entry.js +1 -1
- package/dist/cjs/z-popover.cjs.entry.js +232 -264
- package/dist/cjs/z-popover.cjs.entry.js.map +1 -1
- package/dist/cjs/z-select.cjs.entry.js +6 -8
- package/dist/cjs/z-select.cjs.entry.js.map +1 -1
- package/dist/cjs/z-skip-to-content.cjs.entry.js +1 -1
- package/dist/cjs/z-slideshow.cjs.entry.js +1 -1
- package/dist/cjs/z-table.cjs.entry.js +2 -2
- package/dist/cjs/z-toggle-switch.cjs.entry.js +1 -1
- package/dist/cjs/z-tr.cjs.entry.js +2 -2
- package/dist/collection/components/list/z-list-element/styles.css +2 -4
- package/dist/collection/components/z-anchor-navigation/index.js +1 -1
- package/dist/collection/components/z-anchor-navigation/index.js.map +1 -1
- package/dist/collection/components/z-card/index.js +6 -4
- package/dist/collection/components/z-card/index.js.map +1 -1
- package/dist/collection/components/z-card/styles.css +23 -20
- package/dist/collection/components/z-popover/index.js +236 -268
- package/dist/collection/components/z-popover/index.js.map +1 -1
- package/dist/collection/components/z-popover/index.stories.js +92 -45
- package/dist/collection/components/z-popover/index.stories.js.map +1 -1
- package/dist/collection/components/z-popover/styles.css +4 -14
- package/dist/collection/components/z-select/index.js +5 -7
- package/dist/collection/components/z-select/index.js.map +1 -1
- package/dist/collection/components/z-select/styles.css +2 -6
- package/dist/collection/utils/utils.js +53 -0
- package/dist/collection/utils/utils.js.map +1 -1
- package/dist/components/index14.js +1 -1
- package/dist/components/index14.js.map +1 -1
- package/dist/components/index23.js +234 -266
- package/dist/components/index23.js.map +1 -1
- package/dist/components/index24.js +1 -1
- package/dist/components/utils.js +55 -2
- package/dist/components/utils.js.map +1 -1
- package/dist/components/z-anchor-navigation.js +1 -1
- package/dist/components/z-anchor-navigation.js.map +1 -1
- package/dist/components/z-card.js +1 -1
- package/dist/components/z-card.js.map +1 -1
- package/dist/components/z-select.js +6 -8
- package/dist/components/z-select.js.map +1 -1
- package/dist/esm/{index-10473b87.js → index-328b69a7.js} +2 -2
- package/dist/esm/{index-10473b87.js.map → index-328b69a7.js.map} +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{utils-c8abef2f.js → utils-6e2be2b6.js} +55 -2
- package/dist/esm/utils-6e2be2b6.js.map +1 -0
- package/dist/esm/web-components-library.js +1 -1
- package/dist/esm/z-anchor-navigation.entry.js +1 -1
- package/dist/esm/z-anchor-navigation.entry.js.map +1 -1
- package/dist/esm/z-app-header_12.entry.js +2 -2
- package/dist/esm/z-app-header_12.entry.js.map +1 -1
- package/dist/esm/z-book-card-deprecated.entry.js +1 -1
- package/dist/esm/z-breadcrumb.entry.js +1 -1
- package/dist/esm/z-card.entry.js +1 -1
- package/dist/esm/z-card.entry.js.map +1 -1
- package/dist/esm/z-combobox.entry.js +1 -1
- package/dist/esm/z-menu.entry.js +1 -1
- package/dist/esm/z-myz-card-info.entry.js +1 -1
- package/dist/esm/z-myz-list-item.entry.js +1 -1
- package/dist/esm/z-popover.entry.js +233 -265
- package/dist/esm/z-popover.entry.js.map +1 -1
- package/dist/esm/z-select.entry.js +6 -8
- package/dist/esm/z-select.entry.js.map +1 -1
- package/dist/esm/z-skip-to-content.entry.js +1 -1
- package/dist/esm/z-slideshow.entry.js +1 -1
- package/dist/esm/z-table.entry.js +2 -2
- package/dist/esm/z-toggle-switch.entry.js +1 -1
- package/dist/esm/z-tr.entry.js +2 -2
- package/dist/types/components/z-card/index.d.ts +9 -4
- package/dist/types/components/z-popover/index.d.ts +47 -45
- package/dist/types/components/z-popover/index.stories.d.ts +18 -7
- package/dist/types/components.d.ts +19 -19
- package/dist/types/utils/utils.d.ts +17 -0
- package/dist/web-components-library/index.esm.js +1 -1
- package/dist/web-components-library/{p-8b93bc6d.entry.js → p-01302e57.entry.js} +2 -2
- package/dist/web-components-library/{p-14f0bdf4.entry.js → p-1ad8810a.entry.js} +2 -2
- package/{www/build/p-c2ba8a6c.entry.js → dist/web-components-library/p-2e0923bd.entry.js} +2 -2
- package/dist/web-components-library/p-3284e37b.entry.js +2 -0
- package/dist/web-components-library/p-403d780a.entry.js +2 -0
- package/dist/web-components-library/p-403d780a.entry.js.map +1 -0
- package/dist/web-components-library/{p-61f76cab.js → p-43bc482a.js} +2 -2
- package/{www/build/p-2fb52cd0.entry.js → dist/web-components-library/p-539f99db.entry.js} +2 -2
- package/dist/web-components-library/p-625e2cee.js +2 -0
- package/dist/web-components-library/p-625e2cee.js.map +1 -0
- package/dist/web-components-library/p-62e1d867.entry.js +2 -0
- package/dist/web-components-library/p-62e1d867.entry.js.map +1 -0
- package/dist/web-components-library/p-63d220da.entry.js +2 -0
- package/dist/web-components-library/{p-8d5e3396.entry.js.map → p-63d220da.entry.js.map} +1 -1
- package/dist/web-components-library/{p-25935be3.entry.js → p-6d0fa7c1.entry.js} +2 -2
- package/dist/web-components-library/{p-25935be3.entry.js.map → p-6d0fa7c1.entry.js.map} +1 -1
- package/dist/web-components-library/{p-c8814ae1.entry.js → p-7916e0f7.entry.js} +2 -2
- package/{www/build/p-f5efb3fc.entry.js → dist/web-components-library/p-8bd4a2aa.entry.js} +2 -2
- package/dist/web-components-library/{p-c962e854.entry.js → p-8dec332e.entry.js} +2 -2
- package/dist/web-components-library/{p-72a7eb26.entry.js → p-966cbf03.entry.js} +2 -2
- package/{www/build/p-30575221.entry.js → dist/web-components-library/p-a0ed0c63.entry.js} +2 -2
- package/{www/build/p-e41442e0.entry.js → dist/web-components-library/p-b7b972c0.entry.js} +2 -2
- package/{www/build/p-e41442e0.entry.js.map → dist/web-components-library/p-b7b972c0.entry.js.map} +1 -1
- package/dist/web-components-library/p-d47fcf2b.entry.js +2 -0
- package/dist/web-components-library/p-d47fcf2b.entry.js.map +1 -0
- package/dist/web-components-library/web-components-library.esm.js +1 -1
- package/dist/web-components-library/web-components-library.esm.js.map +1 -1
- package/package.json +1 -1
- package/www/build/index.esm.js +1 -1
- package/www/build/{p-8b93bc6d.entry.js → p-01302e57.entry.js} +2 -2
- package/www/build/{p-14f0bdf4.entry.js → p-1ad8810a.entry.js} +2 -2
- package/{dist/web-components-library/p-c2ba8a6c.entry.js → www/build/p-2e0923bd.entry.js} +2 -2
- package/www/build/{p-2870add3.js → p-2f7bcbb3.js} +1 -1
- package/www/build/p-3284e37b.entry.js +2 -0
- package/www/build/p-403d780a.entry.js +2 -0
- package/www/build/p-403d780a.entry.js.map +1 -0
- package/www/build/{p-61f76cab.js → p-43bc482a.js} +2 -2
- package/{dist/web-components-library/p-2fb52cd0.entry.js → www/build/p-539f99db.entry.js} +2 -2
- package/www/build/p-625e2cee.js +2 -0
- package/www/build/p-625e2cee.js.map +1 -0
- package/www/build/p-62e1d867.entry.js +2 -0
- package/www/build/p-62e1d867.entry.js.map +1 -0
- package/www/build/p-63d220da.entry.js +2 -0
- package/www/build/{p-8d5e3396.entry.js.map → p-63d220da.entry.js.map} +1 -1
- package/www/build/{p-25935be3.entry.js → p-6d0fa7c1.entry.js} +2 -2
- package/www/build/{p-25935be3.entry.js.map → p-6d0fa7c1.entry.js.map} +1 -1
- package/www/build/{p-c8814ae1.entry.js → p-7916e0f7.entry.js} +2 -2
- package/{dist/web-components-library/p-f5efb3fc.entry.js → www/build/p-8bd4a2aa.entry.js} +2 -2
- package/www/build/{p-c962e854.entry.js → p-8dec332e.entry.js} +2 -2
- package/www/build/{p-72a7eb26.entry.js → p-966cbf03.entry.js} +2 -2
- package/{dist/web-components-library/p-30575221.entry.js → www/build/p-a0ed0c63.entry.js} +2 -2
- package/{dist/web-components-library/p-e41442e0.entry.js → www/build/p-b7b972c0.entry.js} +2 -2
- package/{dist/web-components-library/p-e41442e0.entry.js.map → www/build/p-b7b972c0.entry.js.map} +1 -1
- package/www/build/p-d47fcf2b.entry.js +2 -0
- package/www/build/p-d47fcf2b.entry.js.map +1 -0
- package/www/build/web-components-library.esm.js +1 -1
- package/www/build/web-components-library.esm.js.map +1 -1
- package/www/index.html +1 -1
- package/dist/cjs/utils-93961cb6.js.map +0 -1
- package/dist/esm/utils-c8abef2f.js.map +0 -1
- package/dist/web-components-library/p-37f271c8.entry.js +0 -2
- package/dist/web-components-library/p-37f271c8.entry.js.map +0 -1
- package/dist/web-components-library/p-57b8bd19.entry.js +0 -2
- package/dist/web-components-library/p-57b8bd19.entry.js.map +0 -1
- package/dist/web-components-library/p-69a1a67a.entry.js +0 -2
- package/dist/web-components-library/p-8d5e3396.entry.js +0 -2
- package/dist/web-components-library/p-a06fbbc0.js +0 -2
- package/dist/web-components-library/p-a06fbbc0.js.map +0 -1
- package/dist/web-components-library/p-da30a6cb.entry.js +0 -2
- package/dist/web-components-library/p-da30a6cb.entry.js.map +0 -1
- package/www/build/p-37f271c8.entry.js +0 -2
- package/www/build/p-37f271c8.entry.js.map +0 -1
- package/www/build/p-57b8bd19.entry.js +0 -2
- package/www/build/p-57b8bd19.entry.js.map +0 -1
- package/www/build/p-69a1a67a.entry.js +0 -2
- package/www/build/p-8d5e3396.entry.js +0 -2
- package/www/build/p-a06fbbc0.js +0 -2
- package/www/build/p-a06fbbc0.js.map +0 -1
- package/www/build/p-da30a6cb.entry.js +0 -2
- package/www/build/p-da30a6cb.entry.js.map +0 -1
- /package/dist/web-components-library/{p-8b93bc6d.entry.js.map → p-01302e57.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-14f0bdf4.entry.js.map → p-1ad8810a.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-c2ba8a6c.entry.js.map → p-2e0923bd.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-69a1a67a.entry.js.map → p-3284e37b.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-61f76cab.js.map → p-43bc482a.js.map} +0 -0
- /package/dist/web-components-library/{p-2fb52cd0.entry.js.map → p-539f99db.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-c8814ae1.entry.js.map → p-7916e0f7.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-f5efb3fc.entry.js.map → p-8bd4a2aa.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-c962e854.entry.js.map → p-8dec332e.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-72a7eb26.entry.js.map → p-966cbf03.entry.js.map} +0 -0
- /package/dist/web-components-library/{p-30575221.entry.js.map → p-a0ed0c63.entry.js.map} +0 -0
- /package/www/build/{p-8b93bc6d.entry.js.map → p-01302e57.entry.js.map} +0 -0
- /package/www/build/{p-14f0bdf4.entry.js.map → p-1ad8810a.entry.js.map} +0 -0
- /package/www/build/{p-c2ba8a6c.entry.js.map → p-2e0923bd.entry.js.map} +0 -0
- /package/www/build/{p-69a1a67a.entry.js.map → p-3284e37b.entry.js.map} +0 -0
- /package/www/build/{p-61f76cab.js.map → p-43bc482a.js.map} +0 -0
- /package/www/build/{p-2fb52cd0.entry.js.map → p-539f99db.entry.js.map} +0 -0
- /package/www/build/{p-c8814ae1.entry.js.map → p-7916e0f7.entry.js.map} +0 -0
- /package/www/build/{p-f5efb3fc.entry.js.map → p-8bd4a2aa.entry.js.map} +0 -0
- /package/www/build/{p-c962e854.entry.js.map → p-8dec332e.entry.js.map} +0 -0
- /package/www/build/{p-72a7eb26.entry.js.map → p-966cbf03.entry.js.map} +0 -0
- /package/www/build/{p-30575221.entry.js.map → p-a0ed0c63.entry.js.map} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as t,c as i,h as e,a as s,g as o}from"./p-75c4a726.js";import{g as n}from"./p-17af7fb2.js";import{a}from"./p-
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{r as t,c as i,h as e,a as s,g as o}from"./p-75c4a726.js";import{g as n}from"./p-17af7fb2.js";import{a}from"./p-625e2cee.js";import"./p-5145a606.js";const r=':host,::slotted(*),*{box-sizing:border-box;outline:none}:host{position:relative;display:inline-flex;height:fit-content;flex-direction:column}::slotted(a){text-decoration:none}::slotted(*){color:var(--color-default-text);font-family:var(--font-family-sans);font-weight:var(--font-rg)}.menu-label{position:relative;display:flex;width:100%;align-items:center;padding:0;border:0;border-bottom:var(--border-size-large) solid transparent;margin:0;background:transparent;border-radius:0;color:inherit;text-align:left}button.menu-label{cursor:pointer}.menu-label:focus-visible,div.menu-label:focus-within{box-shadow:var(--shadow-focus-primary)}:host(:is([active],[open])) .menu-label ::slotted(*),.menu-label:focus-visible ::slotted(*),div.menu-label:focus-within ::slotted(*){color:var(--color-primary01);font-weight:var(--font-bd)}:host([vertical-context]) .menu-label{padding:var(--space-unit) 0;border-width:var(--border-size-small);border-color:var(--color-surface03)}:host(:is([active],[open])) .menu-label,.menu-label:hover,.menu-label:focus-visible,div.menu-label:focus-within{border-color:var(--color-primary01)}:host([vertical-context]:is([active],[open])) .menu-label::after,:host([vertical-context]) .menu-label:hover::after,:host([vertical-context]) .menu-label:focus-visible::after,:host([vertical-context]) div.menu-label:focus-within::after{position:absolute;bottom:calc(var(--border-size-small) * -1);left:0;width:100%;height:var(--border-size-large);background-color:var(--color-primary01);content:""}:host([vertical-context]) .menu-label ::slotted(*){padding:0}.menu-label ::slotted(*){display:inline-flex;width:100%;min-width:fit-content;padding-bottom:2px;margin:0;appearance:none;color:var(--z-menu-label-color, var(--color-default-text));font-family:var(--font-family-sans);font-size:var(--font-size-3);font-weight:inherit;line-height:1.5;white-space:nowrap}.menu-label z-icon{margin-left:calc(var(--space-unit) * 1.5);fill:var(--color-default-icon)}::slotted([data-text]:not([slot]))::after{height:0;content:attr(data-text);content:attr(data-text) / "";font-weight:var(--font-bd);letter-spacing:normal;pointer-events:none;user-select:none;visibility:hidden}@media speech{::slotted([data-text]:not([slot]))::after{display:none}}::slotted([data-text]:not([slot])){display:inline-flex;flex-direction:column}.content{background:var(--color-surface01)}:host(:not([open])) .content{display:none}:host([floating]:not([vertical-context])) .content{position:absolute;top:100%;left:0;width:375px;min-width:100%;max-width:100vw;padding:0 calc(var(--space-unit) * 2);box-shadow:var(--shadow-2)}:host(:not([floating])) .content{width:100%}.header{display:flex;align-items:center;padding:var(--space-unit) 0 calc(var(--space-unit) * 2)}.header ::slotted(img[slot="header"]){width:calc(var(--space-unit) * 11.25);height:auto;object-fit:contain}.header ::slotted([slot="header"]:not(:first-child)){margin:auto 0;margin-left:calc(var(--space-unit) * 2.5);font-size:var(--font-size-3);font-weight:var(--font-sb);line-height:1.5}.items{display:flex;flex-direction:column;align-items:flex-start;background:inherit}.items>::slotted([slot="item"]){width:100%;margin:0;font-size:var(--font-size-3);line-height:1.5}.items>::slotted([slot="item"]:focus:focus-visible){box-shadow:var(--shadow-focus-primary)}.items>::slotted([slot="item"]:not(z-menu-section)){padding:var(--space-unit) 0;border-bottom:var(--border-size-small) solid var(--color-surface03)}:host(:not([vertical-context])) .items>::slotted([slot="item"]:last-child){border-bottom:0}.items>::slotted([slot="item"]:hover),.items>::slotted([slot="item"]:focus:focus-visible),.items>::slotted([slot="item"]:active),.items>::slotted([slot="item"][active]),.items>::slotted([slot="item"][data-active]){border-color:var(--color-primary01);font-weight:var(--font-bd)}';const h=r;const l=t=>(t===null||t===void 0?void 0:t.tagName)==="Z-MENU-SECTION";const c=class{get focusableItem(){return this.items.find((t=>l(t)?t.htmlTabindex===0:t.tabIndex===0))}toggle(){if(!this.hasContent){return}this.open=!this.open}onLabelSlotChange(t){const i=t.target.assignedElements()[0];i.dataset.text=i===null||i===void 0?void 0:i.textContent;this.setLabelA11yAttrs()}reflow(t=false){if(!this.floating){return}if(this.content&&this.hasContent){const{style:t}=this.content;const{left:i}=this.host.getBoundingClientRect();const e=getComputedStyle(this.content).width;const s=e?parseFloat(e.replace("px","")):375;const o=30;t.left=`${Math.min(window.innerWidth-i-s-o,0)}px`}if(t){this.raf=requestAnimationFrame(this.reflow.bind(this,t))}}checkContent(){this.hasHeader=!!this.host.querySelectorAll("[slot=header]").length;this.hasContent=!!this.host.querySelectorAll("[slot=item]").length||this.hasHeader}setItemTabindex(t,i){if(l(t)){t.htmlTabindex=i}else{t.tabIndex=i}}setItemsA11yAttrs(){this.items.forEach(((t,i)=>{const e=i===0?0:-1;this.setItemTabindex(t,e);if(!l(t)){t.setAttribute("role","menuitem")}}))}onItemsChange(){this.checkContent();this.items=Array.from(this.host.children).filter((({slot:t})=>t==="item"));this.setItemsA11yAttrs();this.items.forEach((t=>{if(!l(t)){t.dataset.text=t.textContent}}))}moveFocus(t,i){if(l(t)){t.setFocus()}else{t.tabIndex=0;setTimeout((()=>{t.focus()}),100)}if(!i){return}this.setItemTabindex(i,-1)}onLabelClick(){this.toggle();this.setFocus()}onLabelKeydown(t){if(t.key===n.ENTER||t.key===n.SPACE){t.preventDefault();t.stopPropagation();this.toggle();if(this.open){this.moveFocus(this.items[0])}return}if(!this.verticalContext){return}if(t.key===n.ARROW_RIGHT&&!this.open){t.preventDefault();t.stopPropagation();this.open=true;this.moveFocus(this.items[0])}}async setFocus(){this.htmlTabindex=0;const t=this.hasContent?this.labelButton:this.host.firstElementChild;t.focus()}async focusLastItem(){const t=this.items[this.items.length-1];if(l(t)&&t.open){t.focusLastItem();return}this.moveFocus(t)}onOpenChanged(){if(!this.open){cancelAnimationFrame(this.raf);this.closed.emit();this.items.forEach((t=>{if(l(t)&&t.open){t.open=false}}));return}this.setItemsA11yAttrs();this.opened.emit();if(this.floating){this.reflow(true)}}setLabelA11yAttrs(){if(this.hasContent&&this.labelButton){this.labelButton.tabIndex=this.htmlTabindex;return}const t=this.host.firstElementChild;t.role="menuitem";t.tabIndex=this.htmlTabindex}onItemClick(t){const i=this.items.find((i=>a(i,t.target)));if(i){this.items.forEach((t=>{if(t===i){return}if(l(t)){t.htmlTabindex=-1}else{t.tabIndex=-1}}))}}onKeyDown(t){var i;if(!this.hasContent){return}switch(t.key){case n.ESC:if(!this.open){break}t.stopPropagation();t.preventDefault();this.open=false;this.setFocus();break;case n.ARROW_DOWN:{if(document.activeElement===this.host){if(this.verticalContext&&!this.open){break}t.stopPropagation();t.preventDefault();if(!this.open){this.open=true}this.moveFocus(this.items[0]);break}const i=this.items.indexOf(this.focusableItem);if(this.verticalContext&&i===this.items.length-1){this.setItemTabindex(this.items[i],-1);this.htmlTabindex=0;break}t.stopPropagation();t.preventDefault();const e=this.items[i+1];this.moveFocus(e!==null&&e!==void 0?e:this.items[0],this.focusableItem);break}case n.ARROW_UP:{if(document.activeElement===this.host){if(this.verticalContext){break}t.stopPropagation();t.preventDefault();if(!this.open){this.open=true}this.moveFocus(this.items[this.items.length-1],this.focusableItem);break}t.stopPropagation();t.preventDefault();const e=this.items.indexOf(this.focusableItem);if(e===0&&this.verticalContext){this.setItemTabindex(this.focusableItem,-1);this.setFocus();break}const s=(i=this.items[e-1])!==null&&i!==void 0?i:this.items[this.items.length-1];if(l(s)&&s.open){this.setItemTabindex(this.focusableItem,-1);s.focusLastItem();break}this.moveFocus(s,this.focusableItem);break}case n.ARROW_LEFT:if(!this.open||!this.verticalContext){break}t.preventDefault();t.stopPropagation();this.open=false;this.setFocus()}}constructor(e){t(this,e);this.opened=i(this,"opened",7);this.closed=i(this,"closed",7);this.items=[];this.active=undefined;this.floating=true;this.open=false;this.verticalContext=false;this.htmlTabindex=-1;this.hasHeader=undefined;this.hasContent=undefined;this.toggle=this.toggle.bind(this);this.checkContent=this.checkContent.bind(this);this.onLabelSlotChange=this.onLabelSlotChange.bind(this);this.onLabelClick=this.onLabelClick.bind(this);this.onItemsChange=this.onItemsChange.bind(this);this.onLabelKeydown=this.onLabelKeydown.bind(this)}componentWillLoad(){this.setLabelA11yAttrs();this.onItemsChange()}render(){if(!this.hasContent){return e("div",{class:"menu-label"},e("slot",{onSlotchange:this.onLabelSlotChange}))}return e(s,null,e("button",{ref:t=>this.labelButton=t,class:"menu-label","aria-expanded":`${!!this.open}`,"aria-haspopup":`${this.hasContent}`,"aria-label":this.open?"Chiudi menù":"Apri menù",role:"menuitem",tabIndex:this.htmlTabindex,onClick:this.onLabelClick,onKeyDown:this.onLabelKeydown},e("slot",{onSlotchange:this.onLabelSlotChange}),e("z-icon",{name:this.open?"chevron-up":"chevron-down"})),e("div",{class:"content",ref:t=>this.content=t},this.hasHeader&&e("header",{class:"header"},e("slot",{name:"header",onSlotchange:this.checkContent})),e("div",{class:"items",role:"menu"},e("slot",{name:"item",onSlotchange:this.onItemsChange}))))}get host(){return o(this)}static get watchers(){return{open:["onOpenChanged"],htmlTabindex:["setLabelA11yAttrs"]}}};c.style=h;export{c as z_menu};
|
|
2
|
+
//# sourceMappingURL=p-2e0923bd.entry.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as e,H as a,b as t}from"./p-75c4a726.js";export{s as setNonce}from"./p-75c4a726.js";import{g as o}from"./p-e1255160.js";var i=()=>{{l(a.prototype)}const t=import.meta.url;const o={};if(t!==""){o.resourcesUrl=new URL(".",t).href}return e(o)};var l=e=>{const a=e.cloneNode;e.cloneNode=function(e){if(this.nodeName==="TEMPLATE"){return a.call(this,e)}const t=a.call(this,false);const o=this.childNodes;if(e){for(let e=0;e<o.length;e++){if(o[e].nodeType!==2){t.appendChild(o[e].cloneNode(true))}}}return t}};i().then((async e=>{await o();return t(JSON.parse('[["p-25935be3",[[1,"z-app-header",{"stuck":[516],"enableOffcanvas":[1540,"enable-offcanvas"],"enableSearch":[516,"enable-search"],"searchPlaceholder":[1,"search-placeholder"],"searchString":[1025,"search-string"],"searchPageUrl":[1,"search-page-url"],"enableZLogo":[516,"enable-z-logo"],"drawerOpen":[1028,"drawer-open"],"_stuck":[32],"menuLength":[32],"isMobile":[32],"isTablet":[32]},[[5,"focusin","manageMenus"],[5,"click","manageMenus"],[1,"keydown","handleKeydown"]],{"_stuck":["onStuck"],"drawerOpen":["setMenuFloatingMode"],"stuck":["onStuckChange"]}],[1,"z-searchbar",{"htmlid":[513],"preventSubmit":[4,"prevent-submit"],"value":[1],"placeholder":[1],"autocomplete":[4],"autocompleteMinChars":[2,"autocomplete-min-chars"],"resultsCount":[2,"results-count"],"searchHelperLabel":[1,"search-helper-label"],"resultsItems":[1,"results-items"],"sortResultsItems":[4,"sort-results-items"],"showSearchButton":[4,"show-search-button"],"searchButtonIconOnly":[4,"search-button-icon-only"],"size":[1],"variant":[1],"searchString":[32],"currResultsCount":[32],"showResults":[32],"isMobile":[32],"selectedItem":[32]},[[4,"click","handleOutsideClick"]],{"resultsItems":["watchItems"],"resultsCount":["watchResultsCount"],"value":["watchValue"],"searchString":["watchSearchString"],"showResults":["watchShowResults"]}],[6,"z-offcanvas",{"variant":[513],"open":[1540],"transitiondirection":[513],"skipLoadAnimation":[4,"skip-load-animation"],"skipAnimation":[32]},[[2,"click","stopEvent"],[2,"focusin","stopEvent"]],{"variant":["handlePageOverflow"],"open":["onOpenChanged"]}],[6,"z-tag",{"icon":[1],"expandable":[4]}],[1,"z-list-group",{"size":[513],"dividerType":[513,"divider-type"],"dividerSize":[513,"divider-size"],"dividerColor":[513,"divider-color"],"listType":[513,"list-type"],"hasTreeItems":[4,"has-tree-items"]}],[1,"z-list",{"size":[513],"listType":[513,"list-type"],"role":[513]}],[1,"z-list-element",{"alignButton":[513,"align-button"],"clickable":[516],"dividerColor":[1,"divider-color"],"dividerType":[1,"divider-type"],"dividerSize":[1,"divider-size"],"expandable":[516],"expandableStyle":[1,"expandable-style"],"listElementId":[514,"list-element-id"],"size":[513],"color":[513],"disabled":[516],"listElementPosition":[513,"list-element-position"],"listType":[513,"list-type"],"hasTreeItems":[4,"has-tree-items"],"role":[513],"htmlTabindex":[2,"html-tabindex"],"showInnerContent":[32]},[[4,"accessibleFocus","accessibleFocusHandler"]]],[2,"z-input",{"htmlid":[1],"type":[1],"name":[1],"label":[1],"ariaLabel":[1,"aria-label"],"ariaExpanded":[1,"aria-expanded"],"ariaControls":[1,"aria-controls"],"ariaAutocomplete":[1,"aria-autocomplete"],"ariaActivedescendant":[1,"aria-activedescendant"],"value":[1025],"disabled":[516],"readonly":[4],"required":[4],"checked":[1028],"placeholder":[1],"htmltitle":[1],"status":[1],"message":[8],"labelPosition":[1,"label-position"],"autocomplete":[1],"role":[1],"hasclearicon":[4],"icon":[1],"min":[2],"minlength":[2],"max":[2],"maxlength":[2],"step":[2],"pattern":[1],"size":[513],"isTyping":[32],"passwordHidden":[32],"isChecked":[64]},[[4,"inputCheck","inputCheckListener"]]],[1,"z-input-message",{"message":[1],"status":[513],"disabled":[516],"statusRole":[32]},null,{"message":["onMessageChange"],"status":["onMessageChange"]}],[2,"z-divider",{"size":[1],"color":[1],"orientation":[1]}],[6,"z-button",{"ariaLabel":[1,"aria-label"],"role":[1],"htmlrole":[1],"href":[1],"target":[1],"htmlid":[1],"name":[1],"disabled":[516],"type":[1],"variant":[513],"icon":[1],"iconPosition":[513,"icon-position"],"size":[513]}],[1,"z-icon",{"name":[1],"height":[8],"width":[8],"iconid":[1],"fill":[1]}]]],["p-b63c8e8b",[[1,"z-app-header-deprecated",{"stuck":[516],"hero":[1],"overlay":[516],"flow":[513],"drawerOpen":[516,"drawer-open"],"enableSearch":[516,"enable-search"],"searchPlaceholder":[1,"search-placeholder"],"searchString":[1025,"search-string"],"searchPageUrl":[1,"search-page-url"],"_stuck":[32],"currentViewport":[32],"menuLength":[32]},[[9,"resize","evaluateViewport"]],{"_stuck":["onStuck"],"drawerOpen":["setMenuFloatingMode"],"stuck":["onStuckMode"]}]]],["p-da30a6cb",[[2,"z-select",{"htmlid":[1],"items":[1],"name":[1],"label":[1],"ariaLabel":[1,"aria-label"],"disabled":[4],"readonly":[4],"placeholder":[1],"htmltitle":[1],"status":[1],"message":[8],"autocomplete":[4],"noresultslabel":[1],"hasGroupItems":[4,"has-group-items"],"hasTreeItems":[4,"has-tree-items"],"showChildrenOfMatchingParent":[4,"show-children-of-matching-parent"],"isfixed":[4],"resetItem":[1,"reset-item"],"size":[1],"isOpen":[32],"selectedItem":[32],"focusedItemId":[32],"searchString":[32],"flattenedList":[32],"getSelectedItem":[64],"getValue":[64],"setValue":[64]},[[0,"ariaDescendantFocus","getFocusedItemHandler"]],{"items":["watchItems"]}]]],["p-14f0bdf4",[[1,"z-breadcrumb",{"pathStyle":[513,"path-style"],"homepageVariant":[1,"homepage-variant"],"maxNodesToShow":[2,"max-nodes-to-show"],"preventFollowUrl":[4,"prevent-follow-url"],"overflowMenuItemRows":[2,"overflow-menu-item-rows"],"truncateChar":[2,"truncate-char"],"viewPortWidth":[32],"hasOverflow":[32],"popoverEllipsisOpen":[32]},[[9,"resize","handleResize"]],{"maxNodesToShow":["handlePropChange"],"viewPortWidth":["handleResizeUp"]}]]],["p-30575221",[[1,"z-combobox",{"inputid":[1],"items":[1],"label":[1],"disabled":[516],"hassearch":[4],"searchlabel":[1],"searchplaceholder":[1],"searchtitle":[1],"noresultslabel":[1],"isopen":[1028],"isfixed":[4],"closesearchtext":[1],"hascheckall":[4],"checkalltext":[1],"uncheckalltext":[1],"maxcheckableitems":[2],"hasgroupitems":[4],"size":[1],"searchValue":[32],"selectedCounter":[32],"renderItemsList":[32],"focusedItemId":[32],"checkboxes":[32]},null,{"items":["watchItems"],"searchValue":["watchSearchValue"],"checkboxes":["watchCheckboxes"]}]]],["p-e231e811",[[1,"z-myz-card-dictionary",{"name":[1],"cover":[1],"disabled":[4],"flipped":[1028],"flipbuttonlabel":[1],"hideinfobtn":[4]},[[0,"flipCard","handleFlipCard"]]]]],["p-757415e9",[[6,"z-file-upload",{"type":[513],"buttonVariant":[1,"button-variant"],"acceptedFormat":[1,"accepted-format"],"fileMaxSize":[2,"file-max-size"],"mainTitle":[1,"main-title"],"description":[1],"uploadBtnLabel":[1,"upload-btn-label"],"dragAndDropLabel":[1,"drag-and-drop-label"],"allowedFilesMessage":[1,"allowed-files-message"],"uploadClickableMessage":[1,"upload-clickable-message"],"uploadMessage":[1,"upload-message"],"errorModalTitle":[1,"error-modal-title"],"errorModalMessage":[1,"error-modal-message"],"uploadedFilesLabel":[1,"uploaded-files-label"],"hasFileSection":[4,"has-file-section"],"inputName":[1,"input-name"],"showErrors":[4,"show-errors"],"_type":[32],"files":[32],"invalidFiles":[32],"input":[32],"getFiles":[64],"removeFile":[64]},[[0,"removeFile","onFileRemoved"],[0,"fileDropped","fileDroppedListener"]]]]],["p-8c164e0d",[[0,"z-pagination",{"label":[1],"navArrows":[4,"nav-arrows"],"totalPages":[2,"total-pages"],"skip":[2],"edges":[4],"split":[2],"visiblePages":[2,"visible-pages"],"currentPage":[1026,"current-page"],"goToPage":[4,"go-to-page"],"_visiblePages":[32],"isMobile":[32],"goToPageValue":[32]},[[9,"resize","onResize"]],{"_visiblePages":["setPagesContainerWidth"],"visiblePages":["setVisiblePages"],"currentPage":["onPageChanged"],"split":["onSplitChanged"]}]]],["p-4cec3345",[[1,"z-tree-list",{"items":[1],"htmlAriaLabelledby":[513,"html-aria-labelledby"],"htmlSectionTitle":[513,"html-section-title"]},null,{"items":["watchItems"]}]]],["p-342b0eb0",[[1,"z-carousel",{"isLoading":[4,"is-loading"],"label":[1],"single":[516],"arrowsPosition":[513,"arrows-position"],"progressMode":[1,"progress-mode"],"fixedArrows":[516,"fixed-arrows"],"ghostLoadingHeight":[2,"ghost-loading-height"],"infinite":[4],"current":[32],"items":[32],"highlightedIndicator":[32],"canNavigatePrev":[32],"canNavigateNext":[32]},null,{"current":["onIndexChange"],"single":["onSingleModeChange"],"infinite":["onInfiniteModeChange"]}]]],["p-817689d5",[[4,"z-date-picker",{"datePickerId":[1,"date-picker-id"],"ariaLabel":[1,"aria-label"],"label":[1],"mode":[1],"name":[1],"value":[1],"flatpickrPosition":[32],"inputError":[32]},[[2,"keydown","handleKeyDown"]],{"mode":["setupPickers"]}]]],["p-a905df88",[[2,"z-file",{"fileNumber":[2,"file-number"],"fileName":[1,"file-name"],"allowPopover":[32],"popoverVisible":[32]},[[1,"mouseover","onMouseOver"],[1,"mouseleave","onMouseLeave"],[0,"interactiveIconClick","onInteractiveIconClick"]]]]],["p-e3b82454",[[0,"z-range-picker",{"rangePickerId":[1,"range-picker-id"],"firstAriaLabel":[1,"first-aria-label"],"firstLabel":[1,"first-label"],"secondAriaLabel":[1,"second-aria-label"],"secondLabel":[1,"second-label"],"mode":[1],"firstPickerReadOnly":[4,"first-picker-read-only"],"lastPickerReadOnly":[4,"last-picker-read-only"],"firstPickerPlaceholder":[1,"first-picker-placeholder"],"lastPickerPlaceholder":[1,"last-picker-placeholder"],"flatpickrPosition":[32],"activeInput":[32],"firstInputError":[32],"lastInputError":[32]},[[18,"click","handleClick"],[18,"keyup","handleKeyDown"]],{"firstPickerReadOnly":["setupFirstPickersReadOnly"],"lastPickerReadOnly":["setupLastPickersReadOnly"],"mode":["setupPickers"]}]]],["p-e5407cc1",[[1,"z-td",{"colspan":[2],"sticky":[516],"showMenu":[513,"show-menu"],"popoverPosition":[1,"popover-position"],"isMenuOpen":[32]},null,{"colspan":["updateColspan"]}]]],["p-d90d2698",[[1,"z-th",{"colspan":[2],"showMenu":[513,"show-menu"],"showSorting":[513,"show-sorting"],"sticky":[516],"sortDirection":[1025,"sort-direction"],"sorted":[1540],"popoverPosition":[1,"popover-position"],"isMenuOpen":[32]},null,{"colspan":["updateColspan"]}]]],["p-e41442e0",[[4,"z-anchor-navigation",{"hideUnselected":[516,"hide-unselected"],"autoCurrent":[4,"auto-current"],"collapsedLabel":[1,"collapsed-label"],"isCollapsed":[516,"is-collapsed"],"collapsed":[32]}]]],["p-7c3ebd97",[[1,"z-book-card",{"variant":[513],"cover":[1],"operaTitle":[1,"opera-title"],"volumeTitle":[1,"volume-title"],"authors":[1],"isbn":[1],"isbnLabel":[1,"isbn-label"],"year":[1],"ebookUrl":[1,"ebook-url"],"fallbackCover":[1,"fallback-cover"],"titleHtmlTag":[1,"title-html-tag"]}]]],["p-cebc9451",[[1,"z-book-card-app",{"logo":[1],"name":[1],"link":[1],"laz":[4],"info":[1]}]]],["p-63c1bde5",[[1,"z-myz-card-alert",{"iconname":[1],"contenttext":[1],"actiontext":[1],"type":[1]}]]],["p-8b93bc6d",[[1,"z-myz-card-info",{"data":[1],"htmltabindex":[2],"hiddenContent":[32],"tooltip":[32]}]]],["p-3ed25564",[[1,"z-myz-list",{"inputrawdata":[1],"list":[1040]},null,{"inputrawdata":["oninputrawdataChange"]}]]],["p-cb1de7b4",[[1,"z-otp",{"inputNum":[2,"input-num"],"status":[1],"message":[1]}]]],["p-d6a7b7f3",[[1,"z-accordion",{"label":[1],"icon":[1],"size":[513],"isDisabled":[516,"is-disabled"],"open":[1540],"highlight":[516],"variant":[513],"shadow":[516]},null,{"isDisabled":["onDisabledChange"]}]]],["p-2fb52cd0",[[1,"z-book-card-deprecated",{"variant":[1],"cover":[1],"operaTitle":[1,"opera-title"],"volumeTitle":[1,"volume-title"],"authors":[1],"isbn":[1],"isbnLabel":[1,"isbn-label"],"ribbon":[1],"ribbonIcon":[1,"ribbon-icon"],"ribbonInteractive":[4,"ribbon-interactive"],"borderless":[4],"fallbackCover":[1,"fallback-cover"],"operaTitleTag":[1,"opera-title-tag"],"isMobile":[32],"hasResources":[32],"showResources":[32]}]]],["p-4c730d4a",[[1,"z-button-sort",{"buttonid":[1],"label":[1],"desclabel":[1],"counter":[2],"sortlabelasc":[1],"sortlabeldesc":[1],"isselected":[1028],"sortasc":[1028],"allowTooltip":[32]}]]],["p-57b8bd19",[[1,"z-card",{"variant":[513],"coverIcon":[1,"cover-icon"],"showShadow":[516,"show-shadow"],"clickable":[516],"hasCoverImage":[32]}]]],["p-4fbcf534",[[1,"z-info-box",{"boxid":[1],"isclosable":[4]}]]],["p-c2ba8a6c",[[1,"z-menu",{"active":[516],"floating":[516],"open":[1540],"verticalContext":[516,"vertical-context"],"htmlTabindex":[2,"html-tabindex"],"hasHeader":[32],"hasContent":[32],"setFocus":[64],"focusLastItem":[64]},[[4,"click","onItemClick"],[0,"keydown","onKeyDown"]],{"open":["onOpenChanged"],"htmlTabindex":["setLabelA11yAttrs"]}]]],["p-5a24e268",[[1,"z-menu-deprecated",{"active":[516],"floating":[516],"open":[1540],"verticalContext":[516,"vertical-context"],"hasHeader":[32],"hasContent":[32]},[[4,"click","handleClick"]],{"open":["onOpenChanged"]}]]],["p-962c7f6b",[[1,"z-menu-section",{"active":[516],"htmlTabindex":[2,"html-tabindex"],"open":[1028],"hasItems":[32],"items":[32],"focusLastItem":[64],"setFocus":[64]},[[0,"keydown","onItemsKeydown"]],{"open":["onOpenChange"],"htmlTabindex":["onTabindexChange"]}]]],["p-816fd6dc",[[1,"z-menu-section-deprecated",{"active":[516],"open":[32],"hasContent":[32]},[[4,"click","handleClick"]]]]],["p-e639e1bc",[[1,"z-myz-card-icon",{"icon":[1],"isdisabled":[4],"ariaLabel":[1,"aria-label"]}]]],["p-8117a929",[[4,"z-navigation-tabs",{"ariaLabel":[1,"aria-label"],"orientation":[513],"size":[513],"selectedTab":[1026,"selected-tab"],"canNavigate":[32],"canNavigatePrev":[32],"canNavigateNext":[32]},[[0,"click","handleTabClick"],[0,"focusin","onTabFocusIn"],[0,"keydown","navigateThroughTabs"],[0,"focusout","onTabFocusOut"]],{"canNavigate":["checkScrollEnabled"],"selectedTab":["onTabSelected"]}]]],["p-ac585bcd",[[1,"z-notification",{"contenticonname":[1],"actiontext":[1],"type":[513],"showclose":[4],"showshadow":[516],"sticky":[516]}]]],["p-caa491ca",[[6,"z-panel-elem",{"elemid":[1],"imgurl":[1],"imgalt":[1],"linkicon":[1],"linklabel":[1],"url":[1],"target":[1],"isdisabled":[4],"descrSlotName":[1,"descr-slot-name"]}]]],["p-302041ec",[[1,"z-result-card",{"cardTitle":[1,"card-title"],"cardSubtitle":[1,"card-subtitle"],"authors":[1],"cover":[1],"hasMultipleCovers":[4,"has-multiple-covers"],"isInfoCard":[4,"is-info-card"]}]]],["p-fb232d07",[[1,"z-section-title",{"dividerPosition":[1,"divider-position"],"uppercase":[516]}]]],["p-f5efb3fc",[[1,"z-slideshow",{"slideshowid":[1],"data":[1],"device":[32],"currentSlide":[32]},null,{"data":["watchData"]}]]],["p-6793061a",[[1,"z-stepper-item",{"index":[514],"href":[513],"pressed":[516],"checked":[516],"disabled":[516]}]]],["p-6a62a0a7",[[1,"z-toast-notification",{"heading":[1],"message":[1],"closebutton":[4],"autoclose":[2],"pauseonfocusloss":[4],"type":[1],"isdraggable":[4],"draggablepercentage":[2],"transition":[1],"percentage":[32]},null,{"isdraggable":["watchPropIsdraggable"],"autoclose":["watchPropAutoclose"],"pauseonfocusloss":["watchPropPauseonfocusloss"]}]]],["p-6273db7f",[[1,"z-toggle-button",{"label":[1],"isdisabled":[4],"avoidclick":[4],"opened":[1028],"ariaLabel":[1,"aria-label"]}]]],["p-c962e854",[[6,"z-toggle-switch",{"disabled":[516],"labelPosition":[513,"label-position"],"checked":[1028],"htmlid":[1]}]]],["p-badd98ad",[[1,"z-tooltip",{"position":[513],"dark":[516],"open":[1540],"bindTo":[1,"bind-to"],"closable":[4]},[[0,"openChange","onPopoverOpenChange"]]]]],["p-69a1a67a",[[1,"z-tr",{"expandable":[516],"expanded":[32],"expandableContentId":[32]},[[0,"colspanchange","updateColumns"]],{"expandable":["updateColumns"]}]]],["p-74819cbe",[[4,"z-aria-alert",{"mode":[1]}]]],["p-cbab66f7",[[1,"z-avatar",{"size":[1],"text":[1],"textColor":[1,"text-color"],"backgroundColor":[1,"background-color"],"image":[1025]}]]],["p-09ba466b",[[1,"z-cover-hero",{"variant":[513],"contentPosition":[513,"content-position"],"preserveAspectRatio":[516,"preserve-aspect-ratio"]},[[2,"load","onImgLoad"]]]]],["p-5cf3a797",[[1,"z-logo",{"width":[2],"height":[2],"imageAlt":[1,"image-alt"],"link":[1],"targetBlank":[4,"target-blank"],"mobileLogo":[4,"mobile-logo"]}]]],["p-0756fe6f",[[1,"z-myz-card-footer",{"titolo":[1],"autori":[1],"isbn":[1],"faded":[4],"cardtype":[1],"opened":[4],"customContent":[4,"custom-content"],"isOpen":[32],"allowTooltipAuthors":[32]},[[0,"toggleClick","handleToggle"]]]]],["p-67edb420",[[1,"z-myz-card-footer-sections"]]],["p-f1c55eda",[[1,"z-myz-card-list",{"listdata":[1]}]]],["p-c8814ae1",[[2,"z-skip-to-content",{"variant":[513],"links":[1025],"visible":[32],"visibleLink":[32]},[[4,"focusout","handleFocusOutSkipToContent"],[4,"focusin","handleFocusSkipToContent"]]]]],["p-97608d16",[[1,"z-stepper"]]],["p-8d5e3396",[[1,"z-table",{"bordered":[516],"expandable":[32]}]]],["p-237fcaa9",[[1,"z-tbody"]]],["p-d75f8bbb",[[1,"z-tfoot",{"sticky":[516]}]]],["p-9e3da0b7",[[1,"z-thead",{"sticky":[516],"isFocusable":[516,"is-focusable"]}]]],["p-6ca0ee2f",[[1,"z-toast-notification-list",{"position":[513],"newestontop":[4]},null,{"newestontop":["watchPropNewestontop"]}]]],["p-8c52635e",[[1,"z-visually-hidden"]]],["p-d8aa6afa",[[6,"z-chip",{"icon":[1],"type":[513],"interactiveIcon":[513,"interactive-icon"],"disabled":[516],"ariaLabel":[1,"aria-label"]}]]],["p-dc5ba112",[[1,"z-info-reveal",{"icon":[1],"position":[513],"label":[1],"ariaLabel":[1,"aria-label"],"size":[513],"open":[32]},[[9,"resize","adjustPanelPosition"],[10,"keydown","handleEscapeKey"]],{"position":["adjustPanelPosition"],"open":["adjustPanelPosition"]}]]],["p-72a7eb26",[[1,"z-myz-list-item",{"text":[1],"link":[1],"linktarget":[1],"icon":[1],"listitemid":[1],"action":[1],"underlined":[4]}]]],["p-e8419614",[[1,"z-alert",{"type":[1]}]]],["p-d6d3a92a",[[1,"z-ghost-loading"]]],["p-689b0280",[[1,"z-dragdrop-area",{"dragAndDropLabel":[1,"drag-and-drop-label"],"dragging":[32]}],[1,"z-modal",{"modalid":[1],"modaltitle":[1],"modalsubtitle":[1],"closeButtonLabel":[1,"close-button-label"],"alertdialog":[4],"closable":[4],"scrollInside":[4,"scroll-inside"],"lockPageScroll":[4,"lock-page-scroll"],"open":[64],"close":[64]},[[0,"keydown","handleKeyDown"]]]]],["p-d0d54d42",[[1,"z-myz-card",{"faded":[4],"cardtype":[1],"ispressed":[4],"ishighlighted":[4]}],[1,"z-myz-card-body"],[1,"z-myz-card-cover",{"img":[1],"titolo":[1],"faded":[4],"defaultimg":[1]}],[1,"z-myz-card-header",{"titolo":[1],"faded":[4],"cardtype":[1],"allowTooltip":[32]}]]],["p-37f271c8",[[1,"z-popover",{"position":[1537],"open":[1540],"bindTo":[1,"bind-to"],"showArrow":[516,"show-arrow"],"center":[516],"closable":[4],"currentPosition":[32]},[[8,"keyup","closePopoverWithKeyboard"],[18,"click","handleOutsideClick"]],{"position":["validatePosition"],"open":["onOpen"]}]]]]'),e)}));
|
|
1
|
+
import{p as e,H as a,b as t}from"./p-75c4a726.js";export{s as setNonce}from"./p-75c4a726.js";import{g as o}from"./p-e1255160.js";var i=()=>{{l(a.prototype)}const t=import.meta.url;const o={};if(t!==""){o.resourcesUrl=new URL(".",t).href}return e(o)};var l=e=>{const a=e.cloneNode;e.cloneNode=function(e){if(this.nodeName==="TEMPLATE"){return a.call(this,e)}const t=a.call(this,false);const o=this.childNodes;if(e){for(let e=0;e<o.length;e++){if(o[e].nodeType!==2){t.appendChild(o[e].cloneNode(true))}}}return t}};i().then((async e=>{await o();return t(JSON.parse('[["p-6d0fa7c1",[[1,"z-app-header",{"stuck":[516],"enableOffcanvas":[1540,"enable-offcanvas"],"enableSearch":[516,"enable-search"],"searchPlaceholder":[1,"search-placeholder"],"searchString":[1025,"search-string"],"searchPageUrl":[1,"search-page-url"],"enableZLogo":[516,"enable-z-logo"],"drawerOpen":[1028,"drawer-open"],"_stuck":[32],"menuLength":[32],"isMobile":[32],"isTablet":[32]},[[5,"focusin","manageMenus"],[5,"click","manageMenus"],[1,"keydown","handleKeydown"]],{"_stuck":["onStuck"],"drawerOpen":["setMenuFloatingMode"],"stuck":["onStuckChange"]}],[1,"z-searchbar",{"htmlid":[513],"preventSubmit":[4,"prevent-submit"],"value":[1],"placeholder":[1],"autocomplete":[4],"autocompleteMinChars":[2,"autocomplete-min-chars"],"resultsCount":[2,"results-count"],"searchHelperLabel":[1,"search-helper-label"],"resultsItems":[1,"results-items"],"sortResultsItems":[4,"sort-results-items"],"showSearchButton":[4,"show-search-button"],"searchButtonIconOnly":[4,"search-button-icon-only"],"size":[1],"variant":[1],"searchString":[32],"currResultsCount":[32],"showResults":[32],"isMobile":[32],"selectedItem":[32]},[[4,"click","handleOutsideClick"]],{"resultsItems":["watchItems"],"resultsCount":["watchResultsCount"],"value":["watchValue"],"searchString":["watchSearchString"],"showResults":["watchShowResults"]}],[6,"z-offcanvas",{"variant":[513],"open":[1540],"transitiondirection":[513],"skipLoadAnimation":[4,"skip-load-animation"],"skipAnimation":[32]},[[2,"click","stopEvent"],[2,"focusin","stopEvent"]],{"variant":["handlePageOverflow"],"open":["onOpenChanged"]}],[6,"z-tag",{"icon":[1],"expandable":[4]}],[1,"z-list-group",{"size":[513],"dividerType":[513,"divider-type"],"dividerSize":[513,"divider-size"],"dividerColor":[513,"divider-color"],"listType":[513,"list-type"],"hasTreeItems":[4,"has-tree-items"]}],[1,"z-list",{"size":[513],"listType":[513,"list-type"],"role":[513]}],[1,"z-list-element",{"alignButton":[513,"align-button"],"clickable":[516],"dividerColor":[1,"divider-color"],"dividerType":[1,"divider-type"],"dividerSize":[1,"divider-size"],"expandable":[516],"expandableStyle":[1,"expandable-style"],"listElementId":[514,"list-element-id"],"size":[513],"color":[513],"disabled":[516],"listElementPosition":[513,"list-element-position"],"listType":[513,"list-type"],"hasTreeItems":[4,"has-tree-items"],"role":[513],"htmlTabindex":[2,"html-tabindex"],"showInnerContent":[32]},[[4,"accessibleFocus","accessibleFocusHandler"]]],[2,"z-input",{"htmlid":[1],"type":[1],"name":[1],"label":[1],"ariaLabel":[1,"aria-label"],"ariaExpanded":[1,"aria-expanded"],"ariaControls":[1,"aria-controls"],"ariaAutocomplete":[1,"aria-autocomplete"],"ariaActivedescendant":[1,"aria-activedescendant"],"value":[1025],"disabled":[516],"readonly":[4],"required":[4],"checked":[1028],"placeholder":[1],"htmltitle":[1],"status":[1],"message":[8],"labelPosition":[1,"label-position"],"autocomplete":[1],"role":[1],"hasclearicon":[4],"icon":[1],"min":[2],"minlength":[2],"max":[2],"maxlength":[2],"step":[2],"pattern":[1],"size":[513],"isTyping":[32],"passwordHidden":[32],"isChecked":[64]},[[4,"inputCheck","inputCheckListener"]]],[1,"z-input-message",{"message":[1],"status":[513],"disabled":[516],"statusRole":[32]},null,{"message":["onMessageChange"],"status":["onMessageChange"]}],[2,"z-divider",{"size":[1],"color":[1],"orientation":[1]}],[6,"z-button",{"ariaLabel":[1,"aria-label"],"role":[1],"htmlrole":[1],"href":[1],"target":[1],"htmlid":[1],"name":[1],"disabled":[516],"type":[1],"variant":[513],"icon":[1],"iconPosition":[513,"icon-position"],"size":[513]}],[1,"z-icon",{"name":[1],"height":[8],"width":[8],"iconid":[1],"fill":[1]}]]],["p-b63c8e8b",[[1,"z-app-header-deprecated",{"stuck":[516],"hero":[1],"overlay":[516],"flow":[513],"drawerOpen":[516,"drawer-open"],"enableSearch":[516,"enable-search"],"searchPlaceholder":[1,"search-placeholder"],"searchString":[1025,"search-string"],"searchPageUrl":[1,"search-page-url"],"_stuck":[32],"currentViewport":[32],"menuLength":[32]},[[9,"resize","evaluateViewport"]],{"_stuck":["onStuck"],"drawerOpen":["setMenuFloatingMode"],"stuck":["onStuckMode"]}]]],["p-403d780a",[[2,"z-select",{"htmlid":[1],"items":[1],"name":[1],"label":[1],"ariaLabel":[1,"aria-label"],"disabled":[4],"readonly":[4],"placeholder":[1],"htmltitle":[1],"status":[1],"message":[8],"autocomplete":[4],"noresultslabel":[1],"hasGroupItems":[4,"has-group-items"],"hasTreeItems":[4,"has-tree-items"],"showChildrenOfMatchingParent":[4,"show-children-of-matching-parent"],"isfixed":[4],"resetItem":[1,"reset-item"],"size":[1],"isOpen":[32],"selectedItem":[32],"focusedItemId":[32],"searchString":[32],"flattenedList":[32],"getSelectedItem":[64],"getValue":[64],"setValue":[64]},[[0,"ariaDescendantFocus","getFocusedItemHandler"]],{"items":["watchItems"]}]]],["p-1ad8810a",[[1,"z-breadcrumb",{"pathStyle":[513,"path-style"],"homepageVariant":[1,"homepage-variant"],"maxNodesToShow":[2,"max-nodes-to-show"],"preventFollowUrl":[4,"prevent-follow-url"],"overflowMenuItemRows":[2,"overflow-menu-item-rows"],"truncateChar":[2,"truncate-char"],"viewPortWidth":[32],"hasOverflow":[32],"popoverEllipsisOpen":[32]},[[9,"resize","handleResize"]],{"maxNodesToShow":["handlePropChange"],"viewPortWidth":["handleResizeUp"]}]]],["p-a0ed0c63",[[1,"z-combobox",{"inputid":[1],"items":[1],"label":[1],"disabled":[516],"hassearch":[4],"searchlabel":[1],"searchplaceholder":[1],"searchtitle":[1],"noresultslabel":[1],"isopen":[1028],"isfixed":[4],"closesearchtext":[1],"hascheckall":[4],"checkalltext":[1],"uncheckalltext":[1],"maxcheckableitems":[2],"hasgroupitems":[4],"size":[1],"searchValue":[32],"selectedCounter":[32],"renderItemsList":[32],"focusedItemId":[32],"checkboxes":[32]},null,{"items":["watchItems"],"searchValue":["watchSearchValue"],"checkboxes":["watchCheckboxes"]}]]],["p-e231e811",[[1,"z-myz-card-dictionary",{"name":[1],"cover":[1],"disabled":[4],"flipped":[1028],"flipbuttonlabel":[1],"hideinfobtn":[4]},[[0,"flipCard","handleFlipCard"]]]]],["p-757415e9",[[6,"z-file-upload",{"type":[513],"buttonVariant":[1,"button-variant"],"acceptedFormat":[1,"accepted-format"],"fileMaxSize":[2,"file-max-size"],"mainTitle":[1,"main-title"],"description":[1],"uploadBtnLabel":[1,"upload-btn-label"],"dragAndDropLabel":[1,"drag-and-drop-label"],"allowedFilesMessage":[1,"allowed-files-message"],"uploadClickableMessage":[1,"upload-clickable-message"],"uploadMessage":[1,"upload-message"],"errorModalTitle":[1,"error-modal-title"],"errorModalMessage":[1,"error-modal-message"],"uploadedFilesLabel":[1,"uploaded-files-label"],"hasFileSection":[4,"has-file-section"],"inputName":[1,"input-name"],"showErrors":[4,"show-errors"],"_type":[32],"files":[32],"invalidFiles":[32],"input":[32],"getFiles":[64],"removeFile":[64]},[[0,"removeFile","onFileRemoved"],[0,"fileDropped","fileDroppedListener"]]]]],["p-8c164e0d",[[0,"z-pagination",{"label":[1],"navArrows":[4,"nav-arrows"],"totalPages":[2,"total-pages"],"skip":[2],"edges":[4],"split":[2],"visiblePages":[2,"visible-pages"],"currentPage":[1026,"current-page"],"goToPage":[4,"go-to-page"],"_visiblePages":[32],"isMobile":[32],"goToPageValue":[32]},[[9,"resize","onResize"]],{"_visiblePages":["setPagesContainerWidth"],"visiblePages":["setVisiblePages"],"currentPage":["onPageChanged"],"split":["onSplitChanged"]}]]],["p-4cec3345",[[1,"z-tree-list",{"items":[1],"htmlAriaLabelledby":[513,"html-aria-labelledby"],"htmlSectionTitle":[513,"html-section-title"]},null,{"items":["watchItems"]}]]],["p-342b0eb0",[[1,"z-carousel",{"isLoading":[4,"is-loading"],"label":[1],"single":[516],"arrowsPosition":[513,"arrows-position"],"progressMode":[1,"progress-mode"],"fixedArrows":[516,"fixed-arrows"],"ghostLoadingHeight":[2,"ghost-loading-height"],"infinite":[4],"current":[32],"items":[32],"highlightedIndicator":[32],"canNavigatePrev":[32],"canNavigateNext":[32]},null,{"current":["onIndexChange"],"single":["onSingleModeChange"],"infinite":["onInfiniteModeChange"]}]]],["p-817689d5",[[4,"z-date-picker",{"datePickerId":[1,"date-picker-id"],"ariaLabel":[1,"aria-label"],"label":[1],"mode":[1],"name":[1],"value":[1],"flatpickrPosition":[32],"inputError":[32]},[[2,"keydown","handleKeyDown"]],{"mode":["setupPickers"]}]]],["p-a905df88",[[2,"z-file",{"fileNumber":[2,"file-number"],"fileName":[1,"file-name"],"allowPopover":[32],"popoverVisible":[32]},[[1,"mouseover","onMouseOver"],[1,"mouseleave","onMouseLeave"],[0,"interactiveIconClick","onInteractiveIconClick"]]]]],["p-e3b82454",[[0,"z-range-picker",{"rangePickerId":[1,"range-picker-id"],"firstAriaLabel":[1,"first-aria-label"],"firstLabel":[1,"first-label"],"secondAriaLabel":[1,"second-aria-label"],"secondLabel":[1,"second-label"],"mode":[1],"firstPickerReadOnly":[4,"first-picker-read-only"],"lastPickerReadOnly":[4,"last-picker-read-only"],"firstPickerPlaceholder":[1,"first-picker-placeholder"],"lastPickerPlaceholder":[1,"last-picker-placeholder"],"flatpickrPosition":[32],"activeInput":[32],"firstInputError":[32],"lastInputError":[32]},[[18,"click","handleClick"],[18,"keyup","handleKeyDown"]],{"firstPickerReadOnly":["setupFirstPickersReadOnly"],"lastPickerReadOnly":["setupLastPickersReadOnly"],"mode":["setupPickers"]}]]],["p-e5407cc1",[[1,"z-td",{"colspan":[2],"sticky":[516],"showMenu":[513,"show-menu"],"popoverPosition":[1,"popover-position"],"isMenuOpen":[32]},null,{"colspan":["updateColspan"]}]]],["p-d90d2698",[[1,"z-th",{"colspan":[2],"showMenu":[513,"show-menu"],"showSorting":[513,"show-sorting"],"sticky":[516],"sortDirection":[1025,"sort-direction"],"sorted":[1540],"popoverPosition":[1,"popover-position"],"isMenuOpen":[32]},null,{"colspan":["updateColspan"]}]]],["p-b7b972c0",[[4,"z-anchor-navigation",{"hideUnselected":[516,"hide-unselected"],"autoCurrent":[4,"auto-current"],"collapsedLabel":[1,"collapsed-label"],"isCollapsed":[516,"is-collapsed"],"collapsed":[32]}]]],["p-7c3ebd97",[[1,"z-book-card",{"variant":[513],"cover":[1],"operaTitle":[1,"opera-title"],"volumeTitle":[1,"volume-title"],"authors":[1],"isbn":[1],"isbnLabel":[1,"isbn-label"],"year":[1],"ebookUrl":[1,"ebook-url"],"fallbackCover":[1,"fallback-cover"],"titleHtmlTag":[1,"title-html-tag"]}]]],["p-cebc9451",[[1,"z-book-card-app",{"logo":[1],"name":[1],"link":[1],"laz":[4],"info":[1]}]]],["p-63c1bde5",[[1,"z-myz-card-alert",{"iconname":[1],"contenttext":[1],"actiontext":[1],"type":[1]}]]],["p-01302e57",[[1,"z-myz-card-info",{"data":[1],"htmltabindex":[2],"hiddenContent":[32],"tooltip":[32]}]]],["p-3ed25564",[[1,"z-myz-list",{"inputrawdata":[1],"list":[1040]},null,{"inputrawdata":["oninputrawdataChange"]}]]],["p-cb1de7b4",[[1,"z-otp",{"inputNum":[2,"input-num"],"status":[1],"message":[1]}]]],["p-d6a7b7f3",[[1,"z-accordion",{"label":[1],"icon":[1],"size":[513],"isDisabled":[516,"is-disabled"],"open":[1540],"highlight":[516],"variant":[513],"shadow":[516]},null,{"isDisabled":["onDisabledChange"]}]]],["p-539f99db",[[1,"z-book-card-deprecated",{"variant":[1],"cover":[1],"operaTitle":[1,"opera-title"],"volumeTitle":[1,"volume-title"],"authors":[1],"isbn":[1],"isbnLabel":[1,"isbn-label"],"ribbon":[1],"ribbonIcon":[1,"ribbon-icon"],"ribbonInteractive":[4,"ribbon-interactive"],"borderless":[4],"fallbackCover":[1,"fallback-cover"],"operaTitleTag":[1,"opera-title-tag"],"isMobile":[32],"hasResources":[32],"showResources":[32]}]]],["p-4c730d4a",[[1,"z-button-sort",{"buttonid":[1],"label":[1],"desclabel":[1],"counter":[2],"sortlabelasc":[1],"sortlabeldesc":[1],"isselected":[1028],"sortasc":[1028],"allowTooltip":[32]}]]],["p-d47fcf2b",[[1,"z-card",{"variant":[513],"coverIcon":[1,"cover-icon"],"showShadow":[516,"show-shadow"],"clickable":[516],"hasCoverImage":[32]}]]],["p-4fbcf534",[[1,"z-info-box",{"boxid":[1],"isclosable":[4]}]]],["p-2e0923bd",[[1,"z-menu",{"active":[516],"floating":[516],"open":[1540],"verticalContext":[516,"vertical-context"],"htmlTabindex":[2,"html-tabindex"],"hasHeader":[32],"hasContent":[32],"setFocus":[64],"focusLastItem":[64]},[[4,"click","onItemClick"],[0,"keydown","onKeyDown"]],{"open":["onOpenChanged"],"htmlTabindex":["setLabelA11yAttrs"]}]]],["p-5a24e268",[[1,"z-menu-deprecated",{"active":[516],"floating":[516],"open":[1540],"verticalContext":[516,"vertical-context"],"hasHeader":[32],"hasContent":[32]},[[4,"click","handleClick"]],{"open":["onOpenChanged"]}]]],["p-962c7f6b",[[1,"z-menu-section",{"active":[516],"htmlTabindex":[2,"html-tabindex"],"open":[1028],"hasItems":[32],"items":[32],"focusLastItem":[64],"setFocus":[64]},[[0,"keydown","onItemsKeydown"]],{"open":["onOpenChange"],"htmlTabindex":["onTabindexChange"]}]]],["p-816fd6dc",[[1,"z-menu-section-deprecated",{"active":[516],"open":[32],"hasContent":[32]},[[4,"click","handleClick"]]]]],["p-e639e1bc",[[1,"z-myz-card-icon",{"icon":[1],"isdisabled":[4],"ariaLabel":[1,"aria-label"]}]]],["p-8117a929",[[4,"z-navigation-tabs",{"ariaLabel":[1,"aria-label"],"orientation":[513],"size":[513],"selectedTab":[1026,"selected-tab"],"canNavigate":[32],"canNavigatePrev":[32],"canNavigateNext":[32]},[[0,"click","handleTabClick"],[0,"focusin","onTabFocusIn"],[0,"keydown","navigateThroughTabs"],[0,"focusout","onTabFocusOut"]],{"canNavigate":["checkScrollEnabled"],"selectedTab":["onTabSelected"]}]]],["p-ac585bcd",[[1,"z-notification",{"contenticonname":[1],"actiontext":[1],"type":[513],"showclose":[4],"showshadow":[516],"sticky":[516]}]]],["p-caa491ca",[[6,"z-panel-elem",{"elemid":[1],"imgurl":[1],"imgalt":[1],"linkicon":[1],"linklabel":[1],"url":[1],"target":[1],"isdisabled":[4],"descrSlotName":[1,"descr-slot-name"]}]]],["p-302041ec",[[1,"z-result-card",{"cardTitle":[1,"card-title"],"cardSubtitle":[1,"card-subtitle"],"authors":[1],"cover":[1],"hasMultipleCovers":[4,"has-multiple-covers"],"isInfoCard":[4,"is-info-card"]}]]],["p-fb232d07",[[1,"z-section-title",{"dividerPosition":[1,"divider-position"],"uppercase":[516]}]]],["p-8bd4a2aa",[[1,"z-slideshow",{"slideshowid":[1],"data":[1],"device":[32],"currentSlide":[32]},null,{"data":["watchData"]}]]],["p-6793061a",[[1,"z-stepper-item",{"index":[514],"href":[513],"pressed":[516],"checked":[516],"disabled":[516]}]]],["p-6a62a0a7",[[1,"z-toast-notification",{"heading":[1],"message":[1],"closebutton":[4],"autoclose":[2],"pauseonfocusloss":[4],"type":[1],"isdraggable":[4],"draggablepercentage":[2],"transition":[1],"percentage":[32]},null,{"isdraggable":["watchPropIsdraggable"],"autoclose":["watchPropAutoclose"],"pauseonfocusloss":["watchPropPauseonfocusloss"]}]]],["p-6273db7f",[[1,"z-toggle-button",{"label":[1],"isdisabled":[4],"avoidclick":[4],"opened":[1028],"ariaLabel":[1,"aria-label"]}]]],["p-8dec332e",[[6,"z-toggle-switch",{"disabled":[516],"labelPosition":[513,"label-position"],"checked":[1028],"htmlid":[1]}]]],["p-badd98ad",[[1,"z-tooltip",{"position":[513],"dark":[516],"open":[1540],"bindTo":[1,"bind-to"],"closable":[4]},[[0,"openChange","onPopoverOpenChange"]]]]],["p-3284e37b",[[1,"z-tr",{"expandable":[516],"expanded":[32],"expandableContentId":[32]},[[0,"colspanchange","updateColumns"]],{"expandable":["updateColumns"]}]]],["p-74819cbe",[[4,"z-aria-alert",{"mode":[1]}]]],["p-cbab66f7",[[1,"z-avatar",{"size":[1],"text":[1],"textColor":[1,"text-color"],"backgroundColor":[1,"background-color"],"image":[1025]}]]],["p-09ba466b",[[1,"z-cover-hero",{"variant":[513],"contentPosition":[513,"content-position"],"preserveAspectRatio":[516,"preserve-aspect-ratio"]},[[2,"load","onImgLoad"]]]]],["p-5cf3a797",[[1,"z-logo",{"width":[2],"height":[2],"imageAlt":[1,"image-alt"],"link":[1],"targetBlank":[4,"target-blank"],"mobileLogo":[4,"mobile-logo"]}]]],["p-0756fe6f",[[1,"z-myz-card-footer",{"titolo":[1],"autori":[1],"isbn":[1],"faded":[4],"cardtype":[1],"opened":[4],"customContent":[4,"custom-content"],"isOpen":[32],"allowTooltipAuthors":[32]},[[0,"toggleClick","handleToggle"]]]]],["p-67edb420",[[1,"z-myz-card-footer-sections"]]],["p-f1c55eda",[[1,"z-myz-card-list",{"listdata":[1]}]]],["p-7916e0f7",[[2,"z-skip-to-content",{"variant":[513],"links":[1025],"visible":[32],"visibleLink":[32]},[[4,"focusout","handleFocusOutSkipToContent"],[4,"focusin","handleFocusSkipToContent"]]]]],["p-97608d16",[[1,"z-stepper"]]],["p-63d220da",[[1,"z-table",{"bordered":[516],"expandable":[32]}]]],["p-237fcaa9",[[1,"z-tbody"]]],["p-d75f8bbb",[[1,"z-tfoot",{"sticky":[516]}]]],["p-9e3da0b7",[[1,"z-thead",{"sticky":[516],"isFocusable":[516,"is-focusable"]}]]],["p-6ca0ee2f",[[1,"z-toast-notification-list",{"position":[513],"newestontop":[4]},null,{"newestontop":["watchPropNewestontop"]}]]],["p-8c52635e",[[1,"z-visually-hidden"]]],["p-d8aa6afa",[[6,"z-chip",{"icon":[1],"type":[513],"interactiveIcon":[513,"interactive-icon"],"disabled":[516],"ariaLabel":[1,"aria-label"]}]]],["p-dc5ba112",[[1,"z-info-reveal",{"icon":[1],"position":[513],"label":[1],"ariaLabel":[1,"aria-label"],"size":[513],"open":[32]},[[9,"resize","adjustPanelPosition"],[10,"keydown","handleEscapeKey"]],{"position":["adjustPanelPosition"],"open":["adjustPanelPosition"]}]]],["p-966cbf03",[[1,"z-myz-list-item",{"text":[1],"link":[1],"linktarget":[1],"icon":[1],"listitemid":[1],"action":[1],"underlined":[4]}]]],["p-e8419614",[[1,"z-alert",{"type":[1]}]]],["p-d6d3a92a",[[1,"z-ghost-loading"]]],["p-689b0280",[[1,"z-dragdrop-area",{"dragAndDropLabel":[1,"drag-and-drop-label"],"dragging":[32]}],[1,"z-modal",{"modalid":[1],"modaltitle":[1],"modalsubtitle":[1],"closeButtonLabel":[1,"close-button-label"],"alertdialog":[4],"closable":[4],"scrollInside":[4,"scroll-inside"],"lockPageScroll":[4,"lock-page-scroll"],"open":[64],"close":[64]},[[0,"keydown","handleKeyDown"]]]]],["p-d0d54d42",[[1,"z-myz-card",{"faded":[4],"cardtype":[1],"ispressed":[4],"ishighlighted":[4]}],[1,"z-myz-card-body"],[1,"z-myz-card-cover",{"img":[1],"titolo":[1],"faded":[4],"defaultimg":[1]}],[1,"z-myz-card-header",{"titolo":[1],"faded":[4],"cardtype":[1],"allowTooltip":[32]}]]],["p-62e1d867",[[1,"z-popover",{"position":[1537],"open":[1540],"bindTo":[1,"bind-to"],"showArrow":[516,"show-arrow"],"center":[516],"closable":[4],"currentPosition":[32]},[[8,"keyup","closePopoverWithKeyboard"],[18,"click","handleOutsideClick"]],{"position":["validatePosition"],"open":["onOpen"],"bindTo":["onBindingChange"]}]]]]'),e)}));
|
|
2
2
|
//# sourceMappingURL=web-components-library.esm.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{r as e,c as t,h as s,g as i}from"./p-75c4a726.js";import{e as l,g as c,l as r,i as n}from"./p-17af7fb2.js";import{r as o,b as a,e as h,f as d}from"./p-625e2cee.js";import"./p-5145a606.js";const z='.sc-z-select-h{display:inline-block;width:inherit;color:var(--color-form-default-text);font-family:var(--font-family-sans);font-size:var(--font-size-3);font-weight:var(--font-rg)}[size="small"].sc-z-select-h,[size="x-small"].sc-z-select-h{font-size:var(--font-size-2)}.select-wrapper.sc-z-select>z-input.sc-z-select{width:100%}.select-wrapper.sc-z-select>z-input.sc-z-select .input-icon.sc-z-select{cursor:pointer}.select-wrapper.sc-z-select>div.sc-z-select{position:relative}.select-wrapper.sc-z-select>div.closed.sc-z-select{overflow:hidden;height:0}.select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select{position:absolute;width:100%;box-sizing:border-box;border-top:none;background:var(--color-form-background);box-shadow:var(--shadow-2);outline:none}.select-wrapper.sc-z-select .closed.sc-z-select .ul-scroll-wrapper.sc-z-select{z-index:10}.select-wrapper.sc-z-select .open.sc-z-select .ul-scroll-wrapper.sc-z-select{z-index:20}.select-wrapper.sc-z-select .ul-scroll-wrapper.fixed.sc-z-select{position:static}.select-wrapper.sc-z-select z-list.sc-z-select{--background-color-list-element:var(--color-form-background);--background-hover-color-list-element:var(--color-form-surface03);--background-active-color-list-element:var(--color-form-surface03)}.select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select>z-list.sc-z-select{position:relative;overflow:auto;max-height:240px;padding:var(--space-unit) calc(var(--space-unit) * 1.5);margin:calc(var(--space-unit) * -1) 0;outline:none}.select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select z-list.sc-z-select z-list-element[disabled].sc-z-select{color:var(--color-form-disabled03)}.select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select z-list.sc-z-select z-list-element.sc-z-select .list-element-container.sc-z-select{display:flex;align-items:center;padding:calc(var(--space-unit) / 2) var(--space-unit);column-gap:var(--space-unit)}.select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select z-list.sc-z-select z-list-element.sc-z-select .list-element-container.sc-z-select .list-element-content.sc-z-select{margin-right:auto}.select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select z-list.sc-z-select z-list-element.sc-z-select .list-element-container.sc-z-select>z-icon.sc-z-select+.list-element-content.sc-z-select{padding:calc(var(--space-unit) * 0.5) var(--space-unit)}[size="x-small"].sc-z-select-h .select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select z-list.sc-z-select z-list-element.sc-z-select .list-element-container.sc-z-select .list-element-content.sc-z-select{padding:0}[size="small"].sc-z-select-h .select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select z-list.sc-z-select z-list-element.sc-z-select .list-element-container.sc-z-select>z-icon.sc-z-select{--z-icon-width:16px;--z-icon-height:16px}[size="x-small"].sc-z-select-h .select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select z-list.sc-z-select z-list-element.sc-z-select .list-element-container.sc-z-select>z-icon.sc-z-select{--z-icon-width:14px;--z-icon-height:14px}[size="x-small"].sc-z-select-h .select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select z-list.sc-z-select z-list-element.sc-z-select .list-element-container.sc-z-select>z-icon.sc-z-select+.list-element-content.sc-z-select{padding:0 var(--space-unit)}.select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select z-list.sc-z-select z-list-element.sc-z-select .list-element-container.sc-z-select .list-element-content.selected.sc-z-select{font-weight:var(--font-sb)}.select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select .no-results.sc-z-select z-icon.sc-z-select{margin-right:var(--space-unit)}.z-list-group-title.sc-z-select{color:var(--color-form-default-text)}.reset-item.sc-z-select{color:var(--color-form-active-primary);fill:var(--color-form-active-primary)}.reset-item-content.sc-z-select{display:flex;align-items:center}.reset-item.reset-item-margin.sc-z-select .reset-item-content.sc-z-select{margin-left:var(--space-unit)}.reset-item.sc-z-select .reset-item-content.sc-z-select>z-icon.sc-z-select{margin-right:var(--space-unit)}.reset-item.hide.sc-z-select{display:none}.tree-list-reset-item.sc-z-select{padding:var(--space-unit) 0}z-list-element.sc-z-select{position:relative;display:block}z-list.sc-z-select z-list-element.sc-z-select::before{position:absolute;z-index:100;top:3px;left:-15px;width:8px;height:1em;border-bottom:1px solid var(--color-form-disabled01-icon);border-left:1px solid var(--color-form-disabled01-icon);content:"";cursor:pointer}z-list.sc-z-select z-list-element.sc-z-select::after{position:absolute;z-index:100;top:5px;left:-15px;width:8px;height:100%;border-left:1px solid var(--color-form-disabled01-icon);content:"";cursor:pointer}z-list.sc-z-select z-list-element.sc-z-select:last-child::after{display:none}z-list.sc-z-select>z-list-element.sc-z-select::before,z-list.sc-z-select>z-list-element.sc-z-select::after,z-list.sc-z-select>z-list-group.sc-z-select>z-list-element.sc-z-select::before,z-list.sc-z-select>z-list-group.sc-z-select>z-list-element.sc-z-select::after{display:none}z-list.sc-z-select>div.children-node.sc-z-select{padding-left:calc(var(--space-unit) * 2)}z-list-element.grouped-tree-parent-node.sc-z-select{padding-top:0;padding-left:calc(var(--space-unit) * 2)}z-list-element.sc-z-select>.list-element.sc-z-select{display:flex;justify-content:space-between;padding:calc(var(--space-unit) * 1.25) 0;cursor:pointer}z-list-element.sc-z-select>.list-element.sc-z-select:focus:focus-visible{box-shadow:var(--shadow-focus-primary);outline:none}z-list-element.sc-z-select>.list-element.sc-z-select .item.ellipsis.sc-z-select{overflow:hidden}z-list-element.sc-z-select .list-element.sc-z-select::after{position:absolute;top:0;right:-1px;display:block;width:100%;height:40px;content:"";transform:translateX(-100%)}z-list-element.tree-search-item.sc-z-select{padding-top:0}z-list-element.tree-search-item.sc-z-select .list-element.sc-z-select::after{position:absolute;top:8px;right:-25px;display:block;width:100%;height:40px;content:"";transform:translateX(-100%)}z-list-element.grouped-tree-parent-node.sc-z-select .list-element.sc-z-select::after{position:absolute;top:8px;right:-25px;display:block;width:100%;height:40px;content:"";transform:translateX(-100%)}z-list-element.sc-z-select:not([disabled])>.list-element.sc-z-select:hover,z-list-element.sc-z-select:not([disabled])>.list-element.sc-z-select:hover::after{z-index:-1;background-color:var(--color-form-surface03);cursor:pointer}.item-label.selected.sc-z-select{font-weight:bold}.item.ellipsis.sc-z-select{display:inline-block;overflow:hidden;max-width:100%;text-overflow:ellipsis;white-space:nowrap}z-list.sc-z-select>z-list-element.grouped-tree-parent-node.sc-z-select>.list-element.sc-z-select:hover::after,z-list-element.tree-search-item.sc-z-select .list-element.sc-z-select:hover::after,z-list.sc-z-select>z-list-group.sc-z-select>z-list-element.grouped-tree-parent-node.sc-z-select>.list-element.sc-z-select:hover::after{position:absolute;z-index:-1;top:8px;right:-18px;display:block;width:100%;height:40px;content:"";transform:translateX(-100%)}z-list-element.sc-z-select>.list-element.sc-z-select:hover::after{position:absolute;z-index:-1;top:0;right:0;display:block;width:100%;height:40px;content:"";transform:translateX(-100%)}.children-node.sc-z-select z-list-element.sc-z-select::before,.children-node.sc-z-select z-list-element.sc-z-select::after{left:-15px}.children-node.sc-z-select .children-node.sc-z-select z-list-element.sc-z-select::before,.children-node.sc-z-select .children-node.sc-z-select z-list-element.sc-z-select::after{left:-15px}.children-node.sc-z-select>z-list-element.sc-z-select{padding:0}';const p=z;const u=class{constructor(s){e(this,s);this.optionSelect=t(this,"optionSelect",7);this.resetSelect=t(this,"resetSelect",7);this.itemsList=[];this.itemIdKeyMap={};this.resetKey=-1;this.htmlid=`id-${o()}`;this.items=undefined;this.name=undefined;this.label=undefined;this.ariaLabel="";this.disabled=false;this.readonly=false;this.placeholder=undefined;this.htmltitle=undefined;this.status=undefined;this.message=true;this.autocomplete=false;this.noresultslabel="Nessun risultato";this.hasGroupItems=undefined;this.hasTreeItems=undefined;this.showChildrenOfMatchingParent=undefined;this.isfixed=false;this.resetItem=undefined;this.size=l.BIG;this.isOpen=false;this.selectedItem=null;this.focusedItemId=undefined;this.searchString=undefined;this.flattenedList=[];this.toggleSelectUl=this.toggleSelectUl.bind(this);this.handleSelectFocus=this.handleSelectFocus.bind(this)}watchItems(){this.itemsList=this.getInitialItemsArray();this.selectedItem=this.findSelectedItem(this.itemsList);this.flattenedList=this.flattenTreeItems(this.itemsList);this.itemIdKeyMap={};this.flattenedList.forEach((({item:e,key:t})=>{this.itemIdKeyMap[e.id]=t}))}getFocusedItemHandler(e){this.focusedItemId=e.target.id}async getSelectedItem(){return this.selectedItem}async getValue(){return this.getSelectedValue()}async setValue(e){let t=[];if(typeof e==="string"){t.push(e)}else{t=e}this.itemsList=this.getInitialItemsArray();if(t.length){this.updateSelection(this.itemsList,t[0])}this.selectedItem=this.findSelectedItem(this.itemsList)}emitOptionSelect(){this.optionSelect.emit({id:this.htmlid,selected:this.getSelectedValue()})}emitResetSelect(){this.resetSelect.emit({id:this.htmlid})}componentWillLoad(){this.watchItems()}componentWillRender(){this.filterItems(this.searchString)}getInitialItemsArray(){return typeof this.items==="string"?JSON.parse(this.items):this.items}mapSelectedItemToItemsArray(){const e=this.getInitialItemsArray();return e.map((e=>{var t;e.selected=e.id===((t=this.selectedItem)===null||t===void 0?void 0:t.id);return e}))}getSelectedValue(){var e;return(e=this.selectedItem)===null||e===void 0?void 0:e.id}filterItems(e){const t=this.mapSelectedItemToItemsArray();if(!(e===null||e===void 0?void 0:e.length)){this.itemsList=t;return}if(this.hasTreeItems){this.itemsList=this.filterTree(t,e,false)}else{this.itemsList=t.filter((t=>t.name.toUpperCase().includes(e.toUpperCase()))).map((t=>{t.name=this.getHighlightedText(t.name,e);return t}))}this.flattenedList=this.flattenTreeItems(this.itemsList);this.itemIdKeyMap={};this.flattenedList.forEach((({item:e,key:t})=>{this.itemIdKeyMap[e.id]=t}))}filterTree(e,t,s){if(!e){return[]}return e.map((e=>{const i=e.name.toUpperCase().includes(t.toUpperCase());const l=Object.assign({},e);if(l.children&&l.children.length>0){l.children=this.filterTree(l.children,t,i)}if(i){l.name=this.getHighlightedText(l.name,t)}if(i||l.children&&l.children.length>0||this.showChildrenOfMatchingParent&&s){return l}return null})).filter((e=>e!==null))}getHighlightedText(e,t){const s=e.toUpperCase();const i=t.toUpperCase();const l=s.indexOf(i);if(l===-1){return e}const c=l+t.length;return e.substring(0,l)+`<strong>${e.substring(l,c)}</strong>`+e.substring(c)}hasAutocomplete(){return a(this.autocomplete)===true}handleInputChange(e){this.searchString=e.detail.value;if(!this.isOpen){this.toggleSelectUl()}}updateSelection(e,t){if(e){e.forEach((e=>{e.selected=e.id===t;if(e.children&&e.children.length>0){this.updateSelection(e.children,t)}}))}}findSelectedItem(e){if(e){for(const t of e){if(t.selected){return t}if(t.children&&t.children.length>0){const e=this.findSelectedItem(t.children);if(e){return e}}}}return null}selectItem(e){if(e===null||e===void 0?void 0:e.disabled){return}this.itemsList=this.getInitialItemsArray();if(e){this.updateSelection(this.itemsList,e.id)}this.selectedItem=this.findSelectedItem(this.itemsList);this.emitOptionSelect();this.toggleSelectUl(true);if(this.searchString){this.searchString=null}}flattenTreeItems(e){const t=[];let s=0;const i=e=>{e.forEach((e=>{t.push({item:e,key:s++});if(e.children&&e.children.length>0){i(e.children)}}))};if(e){i(e)}return t}arrowsSelectNav(e,t){const s=this.resetItem&&!!this.selectedItem;const i=[c.ARROW_DOWN,c.ARROW_UP];if(!i.includes(e.key)){return}e.preventDefault();e.stopPropagation();const l=[...this.flattenedList].filter((e=>!e.item.disabled));if(this.resetItem&&s){l.unshift({item:{id:"__RESET_ITEM__"},key:this.resetKey})}let r;if(typeof t==="number"){r=l.findIndex((e=>e.key===t))}else{const e=this.itemIdKeyMap[t];r=l.findIndex((t=>t.key===e))}if(!this.isOpen){this.toggleSelectUl();if(r===-1){r=-1}}const n=l.length-1;let o=r;if(e.key===c.ARROW_DOWN){do{o=o===n?0:o+1}while(l[o].item.disabled)}else{do{o=o<=0?n:o-1}while(l[o].item.disabled)}this.focusSelectItem(l[o].key)}focusSelectItem(e){var t;(t=this.host.querySelector(`#${this.htmlid}_key_${e}`))===null||t===void 0?void 0:t.focus()}toggleSelectUl(e=false){var t;if(this.disabled||this.readonly){return}if(!this.isOpen){document.addEventListener("click",this.handleSelectFocus);document.addEventListener("keyup",this.handleSelectFocus)}else{document.removeEventListener("click",this.handleSelectFocus);document.removeEventListener("keyup",this.handleSelectFocus);if(e){(t=this.host.querySelector(`#${this.htmlid}_input`))===null||t===void 0?void 0:t.focus()}}this.focusedItemId="";this.isOpen=!this.isOpen}handleInputClick(e){if(e.target.closest(".reset-icon")){e.stopPropagation();return}this.toggleSelectUl()}handleSelectFocus(e){const t=d();if(t===null||t===void 0?void 0:t.hasAttribute("disabled")){return}if(e instanceof KeyboardEvent&&e.key===c.ESC){e.stopPropagation();return this.toggleSelectUl(true)}if(e instanceof KeyboardEvent&&(e.key===c.ENTER||e.key!==c.TAB)){return}if(!h(t).find((e=>e.nodeName.toLowerCase()==="z-input"&&e.id===`${this.htmlid}_input`))){this.toggleSelectUl(e instanceof MouseEvent)}}scrollToLetter(e){const t=this.itemsList.findIndex((t=>t.name.charAt(0)===e));if(t>-1){this.focusSelectItem(this.itemIdKeyMap[this.itemsList[t].id])}}renderInput(){return s("z-input",{class:{"active-select":this.isOpen,"cursor-select":!this.autocomplete},id:`${this.htmlid}_input`,htmlid:`${this.htmlid}_select_input`,placeholder:this.placeholder,value:!this.isOpen&&this.selectedItem?this.selectedItem.name.replace(/<[^>]+>/g,""):null,label:this.label,autocomplete:"off","aria-expanded":this.isOpen?"true":"false","aria-label":this.ariaLabel,"aria-controls":`${this.htmlid}_list`,"aria-autocomplete":this.hasAutocomplete()?"list":"none","aria-activedescendant":this.isOpen?this.focusedItemId:"",icon:this.isOpen?"caret-up":"caret-down",hasclearicon:this.hasAutocomplete(),message:false,name:this.name,disabled:this.disabled,readonly:this.readonly||!this.hasAutocomplete()&&this.isOpen,status:this.isOpen?undefined:this.status,role:"combobox",size:this.size,onClick:e=>{this.handleInputClick(e)},onKeyUp:e=>{e.preventDefault();this.toggleSelectUl()},onKeyDown:e=>{const t=this.selectedItem?this.itemIdKeyMap[this.selectedItem.id]:this.resetItem?this.resetKey:"";return this.arrowsSelectNav(e,t)},onInputChange:e=>{this.handleInputChange(e)},onKeyPress:e=>{if(!this.hasAutocomplete()){e.preventDefault();this.scrollToLetter(String.fromCharCode(e.keyCode))}}})}renderSelectUl(){return s("div",{class:this.isOpen?"open":"closed"},s("div",{class:{"ul-scroll-wrapper":true,fixed:this.isfixed}},s("z-list",{role:"listbox","aria-label":this.ariaLabel||this.label,tabindex:this.disabled||this.readonly||!this.isOpen?-1:0,id:`${this.htmlid}_list`,"aria-multiselectable":false,size:this.listSizeType(),class:{disabled:this.disabled,readonly:this.readonly,[`input-${this.status}`]:!this.isOpen&&!!this.status,"z-scrollbar":true}},this.resetItem&&this.renderResetItem(),this.renderSelectUlItems())))}renderResetItem(){return s("z-list-element",{class:{hide:!this.selectedItem||!this.resetItem,"reset-item":true,"reset-item-margin":!this.hasGroupItems},clickable:true,disabled:false,dividerType:r.ELEMENT,role:"option",tabindex:"0","aria-selected":"false",id:`${this.htmlid}_key_${this.resetKey}`,size:this.hasTreeItems?n.MEDIUM:this.listSizeType(),onClickItem:()=>{this.selectedItem=null;this.searchString=null;this.emitResetSelect()},onKeyDown:e=>this.arrowsSelectNav(e,this.resetKey)},s("div",{class:{"reset-item-content":true,"tree-list-reset-item":this.hasTreeItems}},s("z-icon",{name:"multiply-circled"}),s("span",null,this.resetItem)))}renderItem(e,t){const i=this.itemIdKeyMap[e.id];return s("z-list-element",{clickable:!e.disabled,disabled:e.disabled,dividerType:t?r.HEADER:r.ELEMENT,role:"option",tabindex:e.disabled||!this.isOpen?-1:0,"aria-selected":e.selected?"true":"false",id:`${this.htmlid}_key_${i}`,size:this.listSizeType(),onClickItem:()=>this.selectItem(e),onKeyDown:e=>this.arrowsSelectNav(e,i)},s("div",{class:"list-element-container"},s("div",{class:{selected:!!e.selected,"list-element-content":true},innerHTML:e.name}),e.icon&&s("z-tag",{icon:e.icon})))}listSizeType(){if(this.hasTreeItems){return n.NONE}if(this.size===l.SMALL||this.size===l.X_SMALL){return n.SMALL}return n.MEDIUM}renderSelectUlItems(){if(!this.itemsList.length){return this.renderNoSearchResults()}if(this.hasGroupItems&&!this.hasTreeItems){return this.renderSelectGroupItems()}else if(this.hasGroupItems&&this.hasTreeItems){return this.renderGroupedTree()}return this.itemsList.map(((e,t,s)=>{const i=t===s.length-1;const l=s.length>1;if(this.hasTreeItems){return this.renderTreeItems(e,i,l,true)}return this.renderItem(e,i)}))}renderTreeItems(e,t,i,l){var n,o;const a=this.itemIdKeyMap[e.id];const h=this.hasGroupItems?undefined:this.hasGroupItems?t&&!i?r.ELEMENT:undefined:l&&i&&!t?r.ELEMENT:undefined;return s("z-list-element",{clickable:!e.disabled,disabled:e.disabled,class:{"grouped-tree-parent-node":this.hasGroupItems&&!!((n=e.children)===null||n===void 0?void 0:n.length),"tree-search-item":this.hasGroupItems&&l&&!((o=e.children)===null||o===void 0?void 0:o.length)&&!!this.searchString},size:this.listSizeType(),dividerType:h,hasTreeItems:this.hasTreeItems},s("div",{id:`${this.htmlid}_key_${a}`,role:"option",class:"list-element",tabIndex:0,onClick:()=>this.selectItem(e),onKeyDown:t=>{this.arrowsSelectNav(t,a);if(t.key===c.ENTER){this.selectItem(e)}}},s("span",{class:"item ellipsis"},s("span",{class:{"item-label":true,selected:!!e.selected},title:e.name,innerHTML:e.selected?`<strong>${e.name}</strong>`:e.name})),e.icon&&s("z-tag",{icon:e.icon})),e.children&&e.children.length>0?s("z-list",null,s("div",{class:"children-node"},e.children.map(((e,t,s)=>this.renderTreeItems(e,t===s.length-1,s.length>1,false))))):null)}renderGroupedTree(){const e=this.itemsList.reduce(((e,t)=>{const s=t.category||"Altra categoria";e[s]=e[s]||[];e[s].push(t);return e}),{});return Object.entries(e).map((([t,i],l,c)=>{const n=Object.values(e).some((e=>e.length>1));return s("z-list-group",{"divider-type":l===c.length-1?undefined:r.ELEMENT,hasTreeItems:true},s("span",{class:"body-3-sb z-list-group-title",slot:"header-title"},t),s("z-list",null,i.map(((e,t,i)=>[this.renderTreeItems(e,t===i.length-1,n,true),t<i.length-1?s("z-divider",{key:`divider-${t}`,style:{zIndex:"100",height:"var(--border-size-small)"}}):null]))),l!==c.length-1&&s("z-divider",{style:{zIndex:"100",height:"var(--border-size-small)"}}))}))}renderSelectGroupItems(){const e=this.itemsList.reduce(((e,t,s,i)=>{var l;const{category:c}=t;const r=i.length===s+1;const n=this.renderItem(t,r);e[c]=(l=e[c])!==null&&l!==void 0?l:[];e[c].push(n);return e}),{});return Object.entries(e).map((([e,t])=>s("z-list-group",{"divider-type":r.ELEMENT},s("span",{class:"body-3-sb z-list-group-title",slot:"header-title"},e),t.map((e=>e)))))}renderNoSearchResults(){return s("z-list-element",{color:"color-primary01",class:"no-results",size:this.hasTreeItems?n.MEDIUM:this.listSizeType()},s("z-icon",{name:"multiply-circle",fill:"color-primary01-icon"}),this.noresultslabel)}renderMessage(){if(a(this.message)===false){return}return s("z-input-message",{message:a(this.message)===true?undefined:this.message,status:this.status,class:this.size,disabled:this.disabled})}render(){return s("div",{key:"39dd9ec3698c8c420b0341351e47ff615e7ba704",class:"select-wrapper"},this.renderInput(),this.renderSelectUl(),this.renderMessage())}get host(){return i(this)}static get watchers(){return{items:["watchItems"]}}};u.style=p;export{u as z_select};
|
|
2
|
+
//# sourceMappingURL=p-403d780a.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["stylesCss","ZSelectStyle0","ZSelect","constructor","hostRef","this","itemsList","itemIdKeyMap","resetKey","randomId","ControlSize","BIG","toggleSelectUl","bind","handleSelectFocus","watchItems","getInitialItemsArray","selectedItem","findSelectedItem","flattenedList","flattenTreeItems","forEach","item","key","id","getFocusedItemHandler","e","focusedItemId","target","getSelectedItem","getValue","getSelectedValue","setValue","value","values","push","length","updateSelection","emitOptionSelect","optionSelect","emit","htmlid","selected","emitResetSelect","resetSelect","componentWillLoad","componentWillRender","filterItems","searchString","items","JSON","parse","mapSelectedItemToItemsArray","initialItemsList","map","_a","prevList","hasTreeItems","filterTree","filter","name","toUpperCase","includes","getHighlightedText","matchingParent","match","newItem","Object","assign","children","showChildrenOfMatchingParent","text","search","upperText","upperSearch","start","indexOf","end","substring","hasAutocomplete","boolean","autocomplete","handleInputChange","detail","isOpen","selectedId","found","selectItem","disabled","flatItems","index","flatten","subItems","itm","arrowsSelectNav","idOrReset","showResetIcon","resetItem","arrows","KeyboardCode","ARROW_DOWN","ARROW_UP","preventDefault","stopPropagation","f","unshift","currentIndex","findIndex","k","lastIndex","newIndex","focusSelectItem","host","querySelector","focus","selfFocusOnClose","readonly","document","addEventListener","removeEventListener","handleInputClick","closest","clickedElement","getClickedElement","hasAttribute","KeyboardEvent","ESC","ENTER","TAB","getElementTree","find","elem","nodeName","toLowerCase","MouseEvent","scrollToLetter","letter","foundItem","charAt","renderInput","h","class","placeholder","replace","label","ariaLabel","icon","hasclearicon","message","status","undefined","role","size","onClick","onKeyUp","onKeyDown","current","onInputChange","onKeyPress","String","fromCharCode","keyCode","renderSelectUl","fixed","isfixed","tabindex","listSizeType","renderResetItem","renderSelectUlItems","hide","hasGroupItems","clickable","dividerType","ListDividerType","ELEMENT","ListSize","MEDIUM","onClickItem","renderItem","lastItem","thisItemKey","HEADER","innerHTML","NONE","SMALL","X_SMALL","renderNoSearchResults","renderSelectGroupItems","renderGroupedTree","array","isLastItem","parentHasSiblings","renderTreeItems","isLastChild","isTopLevel","hasDivider","_b","tabIndex","title","child","arr","grouped","reduce","acc","category","entries","some","groupItems","slot","i","style","zIndex","height","newData","group","zListItem","color","fill","noresultslabel","renderMessage","render"],"sources":["src/components/z-select/styles.css?tag=z-select&encapsulation=scoped","src/components/z-select/index.tsx"],"sourcesContent":[":host {\n display: inline-block;\n width: inherit;\n color: var(--color-form-default-text);\n font-family: var(--font-family-sans);\n font-size: var(--font-size-3);\n font-weight: var(--font-rg);\n}\n\n:host([size=\"small\"]),\n:host([size=\"x-small\"]) {\n font-size: var(--font-size-2);\n}\n\n.select-wrapper > z-input {\n width: 100%;\n}\n\n.select-wrapper > z-input .input-icon {\n cursor: pointer;\n}\n\n.select-wrapper > div {\n position: relative;\n}\n\n.select-wrapper > div.closed {\n overflow: hidden;\n height: 0;\n}\n\n.select-wrapper .ul-scroll-wrapper {\n position: absolute;\n width: 100%;\n box-sizing: border-box;\n border-top: none;\n background: var(--color-form-background);\n box-shadow: var(--shadow-2);\n outline: none;\n}\n\n.select-wrapper .closed .ul-scroll-wrapper {\n z-index: 10;\n}\n\n.select-wrapper .open .ul-scroll-wrapper {\n z-index: 20;\n}\n\n.select-wrapper .ul-scroll-wrapper.fixed {\n position: static;\n}\n\n.select-wrapper z-list {\n --background-color-list-element: var(--color-form-background);\n --background-hover-color-list-element: var(--color-form-surface03);\n --background-active-color-list-element: var(--color-form-surface03);\n}\n\n.select-wrapper .ul-scroll-wrapper > z-list {\n position: relative;\n overflow: auto;\n max-height: 240px;\n padding: var(--space-unit) calc(var(--space-unit) * 1.5);\n margin: calc(var(--space-unit) * -1) 0;\n outline: none;\n}\n\n.select-wrapper .ul-scroll-wrapper z-list z-list-element[disabled] {\n color: var(--color-form-disabled03);\n}\n\n.select-wrapper .ul-scroll-wrapper z-list z-list-element .list-element-container {\n display: flex;\n align-items: center;\n padding: calc(var(--space-unit) / 2) var(--space-unit);\n column-gap: var(--space-unit);\n}\n\n.select-wrapper .ul-scroll-wrapper z-list z-list-element .list-element-container .list-element-content {\n margin-right: auto;\n}\n\n.select-wrapper .ul-scroll-wrapper z-list z-list-element .list-element-container > z-icon + .list-element-content {\n padding: calc(var(--space-unit) * 0.5) var(--space-unit);\n}\n\n:host([size=\"x-small\"])\n .select-wrapper\n .ul-scroll-wrapper\n z-list\n z-list-element\n .list-element-container\n .list-element-content {\n padding: 0;\n}\n\n:host([size=\"small\"]) .select-wrapper .ul-scroll-wrapper z-list z-list-element .list-element-container > z-icon {\n --z-icon-width: 16px;\n --z-icon-height: 16px;\n}\n\n:host([size=\"x-small\"]) .select-wrapper .ul-scroll-wrapper z-list z-list-element .list-element-container > z-icon {\n --z-icon-width: 14px;\n --z-icon-height: 14px;\n}\n\n:host([size=\"x-small\"])\n .select-wrapper\n .ul-scroll-wrapper\n z-list\n z-list-element\n .list-element-container\n > z-icon\n + .list-element-content {\n padding: 0 var(--space-unit);\n}\n\n.select-wrapper .ul-scroll-wrapper z-list z-list-element .list-element-container .list-element-content.selected {\n font-weight: var(--font-sb);\n}\n\n.select-wrapper .ul-scroll-wrapper .no-results z-icon {\n margin-right: var(--space-unit);\n}\n\n.z-list-group-title {\n color: var(--color-form-default-text);\n}\n\n.reset-item {\n color: var(--color-form-active-primary);\n fill: var(--color-form-active-primary);\n}\n\n.reset-item-content {\n display: flex;\n align-items: center;\n}\n\n.reset-item.reset-item-margin .reset-item-content {\n margin-left: var(--space-unit);\n}\n\n.reset-item .reset-item-content > z-icon {\n margin-right: var(--space-unit);\n}\n\n.reset-item.hide {\n display: none;\n}\n\n.tree-list-reset-item {\n padding: var(--space-unit) 0;\n}\n\nz-list-element {\n position: relative;\n display: block;\n}\n\nz-list z-list-element::before {\n position: absolute;\n z-index: 100;\n top: 3px;\n left: -15px;\n width: 8px;\n height: 1em;\n border-bottom: 1px solid var(--color-form-disabled01-icon);\n border-left: 1px solid var(--color-form-disabled01-icon);\n content: \"\";\n cursor: pointer;\n}\n\nz-list z-list-element::after {\n position: absolute;\n z-index: 100;\n top: 5px;\n left: -15px;\n width: 8px;\n height: 100%;\n border-left: 1px solid var(--color-form-disabled01-icon);\n content: \"\";\n cursor: pointer;\n}\n\nz-list z-list-element:last-child::after {\n display: none;\n}\n\nz-list > z-list-element::before,\nz-list > z-list-element::after,\nz-list > z-list-group > z-list-element::before,\nz-list > z-list-group > z-list-element::after {\n display: none;\n}\n\nz-list > div.children-node {\n padding-left: calc(var(--space-unit) * 2);\n}\n\nz-list-element.grouped-tree-parent-node {\n padding-top: 0;\n padding-left: calc(var(--space-unit) * 2);\n}\n\nz-list-element > .list-element {\n display: flex;\n justify-content: space-between;\n padding: calc(var(--space-unit) * 1.25) 0;\n cursor: pointer;\n}\n\nz-list-element > .list-element:focus:focus-visible {\n box-shadow: var(--shadow-focus-primary);\n outline: none;\n}\n\nz-list-element > .list-element .item.ellipsis {\n overflow: hidden;\n}\n\nz-list-element .list-element::after {\n position: absolute;\n top: 0;\n right: -1px;\n display: block;\n width: 100%;\n height: 40px;\n content: \"\";\n transform: translateX(-100%);\n}\n\nz-list-element.tree-search-item {\n padding-top: 0;\n}\n\nz-list-element.tree-search-item .list-element::after {\n position: absolute;\n top: 8px;\n right: -25px;\n display: block;\n width: 100%;\n height: 40px;\n content: \"\";\n transform: translateX(-100%);\n}\n\nz-list-element.grouped-tree-parent-node .list-element::after {\n position: absolute;\n top: 8px;\n right: -25px;\n display: block;\n width: 100%;\n height: 40px;\n content: \"\";\n transform: translateX(-100%);\n}\n\nz-list-element:not([disabled]) > .list-element:hover,\nz-list-element:not([disabled]) > .list-element:hover::after {\n z-index: -1;\n background-color: var(--color-form-surface03);\n cursor: pointer;\n}\n\n.item-label.selected {\n font-weight: bold;\n}\n\n.item.ellipsis {\n display: inline-block;\n overflow: hidden;\n max-width: 100%;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\nz-list > z-list-element.grouped-tree-parent-node > .list-element:hover::after,\nz-list-element.tree-search-item .list-element:hover::after,\nz-list > z-list-group > z-list-element.grouped-tree-parent-node > .list-element:hover::after {\n position: absolute;\n z-index: -1;\n top: 8px;\n right: -18px;\n display: block;\n width: 100%;\n height: 40px;\n content: \"\";\n transform: translateX(-100%);\n}\n\nz-list-element > .list-element:hover::after {\n position: absolute;\n z-index: -1;\n top: 0;\n right: 0;\n display: block;\n width: 100%;\n height: 40px;\n content: \"\";\n transform: translateX(-100%);\n}\n\n.children-node z-list-element::before,\n.children-node z-list-element::after {\n left: -15px;\n}\n\n.children-node .children-node z-list-element::before,\n.children-node .children-node z-list-element::after {\n left: -15px;\n}\n\n.children-node > z-list-element {\n padding: 0;\n}\n","import {Component, Element, Event, EventEmitter, Listen, Method, Prop, State, Watch, h} from \"@stencil/core\";\nimport {ControlSize, InputStatus, KeyboardCode, ListDividerType, ListSize, SelectItem} from \"../../beans\";\nimport {boolean, getClickedElement, getElementTree, randomId} from \"../../utils/utils\";\n\n@Component({\n tag: \"z-select\",\n styleUrl: \"styles.css\",\n shadow: false,\n scoped: true,\n})\nexport class ZSelect {\n @Element() host: HTMLZSelectElement;\n\n /** the id of the input element */\n @Prop()\n htmlid = `id-${randomId()}`;\n\n /** the input select options */\n @Prop()\n items: SelectItem[] | string;\n\n /** the input name */\n @Prop()\n name?: string;\n\n /** the input label */\n @Prop()\n label?: string;\n\n /** the input aria-label */\n @Prop()\n ariaLabel = \"\";\n\n /** the input is disabled */\n @Prop()\n disabled?: boolean = false;\n\n /** the input is readonly */\n @Prop()\n readonly?: boolean = false;\n\n /** the input placeholder (optional) */\n @Prop()\n placeholder?: string;\n\n /** the input html title (optional) */\n @Prop()\n htmltitle?: string;\n\n /** the input status (optional) */\n @Prop()\n status?: InputStatus;\n\n /** input helper message (optional) - if set to `false` message won't be displayed */\n @Prop()\n message?: string | boolean = true;\n\n /** the input has autocomplete option */\n @Prop()\n autocomplete?: boolean = false;\n\n /** no result text message */\n @Prop()\n noresultslabel?: string = \"Nessun risultato\";\n\n /** */\n @Prop()\n hasGroupItems?: boolean;\n\n /** */\n @Prop()\n hasTreeItems?: boolean;\n\n /** If true and an item matches the search string, children of matching item are shown even if they don't match the search string */\n @Prop()\n showChildrenOfMatchingParent?: boolean;\n\n /** When fixed, it occupies space and pushes down next elements. */\n @Prop()\n isfixed?: boolean = false;\n\n /** */\n @Prop()\n resetItem?: string;\n\n /** Available sizes: `big`, `small` and `x-small`. Defaults to `big`. */\n @Prop()\n size?: ControlSize = ControlSize.BIG;\n\n @State()\n isOpen = false;\n\n @State()\n selectedItem: null | SelectItem = null;\n\n @State()\n focusedItemId: string;\n\n @State()\n searchString: null | string;\n\n @State()\n private flattenedList: {item: SelectItem; key: number}[] = [];\n\n private itemsList: SelectItem[] = [];\n\n private itemIdKeyMap: Record<string, number> = {};\n\n private readonly resetKey = -1;\n\n constructor() {\n this.toggleSelectUl = this.toggleSelectUl.bind(this);\n this.handleSelectFocus = this.handleSelectFocus.bind(this);\n }\n\n @Watch(\"items\")\n watchItems(): void {\n this.itemsList = this.getInitialItemsArray();\n\n this.selectedItem = this.findSelectedItem(this.itemsList);\n\n this.flattenedList = this.flattenTreeItems(this.itemsList);\n this.itemIdKeyMap = {};\n this.flattenedList.forEach(({item, key}) => {\n this.itemIdKeyMap[item.id] = key;\n });\n }\n\n @Listen(\"ariaDescendantFocus\")\n getFocusedItemHandler(e: CustomEvent): void {\n this.focusedItemId = (e.target as Element).id;\n }\n\n /** get the input selected options */\n @Method()\n async getSelectedItem(): Promise<SelectItem> {\n return this.selectedItem;\n }\n\n /** get the input value */\n @Method()\n async getValue(): Promise<string> {\n return this.getSelectedValue();\n }\n\n /** set the input value */\n @Method()\n async setValue(value: string | string[]): Promise<void> {\n let values: string[] = [];\n if (typeof value === \"string\") {\n values.push(value);\n } else {\n values = value;\n }\n\n this.itemsList = this.getInitialItemsArray();\n if (values.length) {\n this.updateSelection(this.itemsList, values[0]);\n }\n this.selectedItem = this.findSelectedItem(this.itemsList);\n }\n\n /** Emitted on select option selection, returns select id, selected item id */\n @Event()\n optionSelect: EventEmitter;\n\n private emitOptionSelect(): void {\n this.optionSelect.emit({\n id: this.htmlid,\n selected: this.getSelectedValue(),\n });\n }\n\n /** Emitted on reset selected item, returns select id, selected item id */\n @Event()\n resetSelect: EventEmitter;\n\n private emitResetSelect(): void {\n this.resetSelect.emit({\n id: this.htmlid,\n });\n }\n\n componentWillLoad(): void {\n this.watchItems();\n }\n\n componentWillRender(): void {\n this.filterItems(this.searchString);\n }\n\n private getInitialItemsArray(): SelectItem[] {\n return typeof this.items === \"string\" ? JSON.parse(this.items) : this.items;\n }\n\n private mapSelectedItemToItemsArray(): SelectItem[] {\n const initialItemsList = this.getInitialItemsArray();\n\n return initialItemsList.map((item: SelectItem) => {\n item.selected = item.id === this.selectedItem?.id;\n\n return item;\n });\n }\n\n private getSelectedValue(): string {\n return this.selectedItem?.id;\n }\n\n private filterItems(searchString: string): void {\n const prevList = this.mapSelectedItemToItemsArray();\n\n if (!searchString?.length) {\n this.itemsList = prevList;\n\n return;\n }\n\n if (this.hasTreeItems) {\n this.itemsList = this.filterTree(prevList, searchString, false);\n } else {\n this.itemsList = prevList\n .filter((item: SelectItem) => item.name.toUpperCase().includes(searchString.toUpperCase()))\n .map((item: SelectItem) => {\n item.name = this.getHighlightedText(item.name, searchString);\n\n return item;\n });\n }\n\n this.flattenedList = this.flattenTreeItems(this.itemsList);\n this.itemIdKeyMap = {};\n this.flattenedList.forEach(({item, key}) => {\n this.itemIdKeyMap[item.id] = key;\n });\n }\n\n private filterTree(items: SelectItem[], searchString: string, matchingParent: boolean): SelectItem[] {\n if (!items) {\n return [];\n }\n\n return items\n .map((item) => {\n const match = item.name.toUpperCase().includes(searchString.toUpperCase());\n\n const newItem: SelectItem = {...item};\n if (newItem.children && newItem.children.length > 0) {\n newItem.children = this.filterTree(newItem.children, searchString, match);\n }\n\n if (match) {\n newItem.name = this.getHighlightedText(newItem.name, searchString);\n }\n if (\n match ||\n (newItem.children && newItem.children.length > 0) ||\n (this.showChildrenOfMatchingParent && matchingParent)\n ) {\n return newItem;\n }\n\n return null;\n })\n .filter((item) => item !== null) as SelectItem[];\n }\n\n private getHighlightedText(text: string, search: string): string {\n const upperText = text.toUpperCase();\n const upperSearch = search.toUpperCase();\n const start = upperText.indexOf(upperSearch);\n\n if (start === -1) {\n return text;\n }\n\n const end = start + search.length;\n\n return text.substring(0, start) + `<strong>${text.substring(start, end)}</strong>` + text.substring(end);\n }\n\n private hasAutocomplete(): boolean {\n return boolean(this.autocomplete) === true;\n }\n\n private handleInputChange(e: CustomEvent): void {\n this.searchString = e.detail.value;\n if (!this.isOpen) {\n this.toggleSelectUl();\n }\n }\n\n private updateSelection(items: SelectItem[], selectedId: string): void {\n if (items) {\n items.forEach((item) => {\n item.selected = item.id === selectedId;\n if (item.children && item.children.length > 0) {\n this.updateSelection(item.children, selectedId);\n }\n });\n }\n }\n\n private findSelectedItem(items: SelectItem[]): SelectItem | null {\n if (items) {\n for (const item of items) {\n if (item.selected) {\n return item;\n }\n if (item.children && item.children.length > 0) {\n const found = this.findSelectedItem(item.children);\n if (found) {\n return found;\n }\n }\n }\n }\n\n return null;\n }\n\n private selectItem(selected: null | SelectItem): void {\n if (selected?.disabled) {\n return;\n }\n\n this.itemsList = this.getInitialItemsArray();\n\n if (selected) {\n this.updateSelection(this.itemsList, selected.id);\n }\n\n this.selectedItem = this.findSelectedItem(this.itemsList);\n this.emitOptionSelect();\n this.toggleSelectUl(true);\n\n if (this.searchString) {\n this.searchString = null;\n }\n }\n\n private flattenTreeItems(items: SelectItem[]): {item: SelectItem; key: number}[] {\n const flatItems: {item: SelectItem; key: number}[] = [];\n let index = 0;\n\n const flatten = (subItems: SelectItem[]): void => {\n subItems.forEach((itm) => {\n flatItems.push({item: itm, key: index++});\n if (itm.children && itm.children.length > 0) {\n flatten(itm.children);\n }\n });\n };\n\n if (items) {\n flatten(items);\n }\n\n return flatItems;\n }\n\n private arrowsSelectNav(e: KeyboardEvent, idOrReset: string | number): void {\n const showResetIcon = this.resetItem && !!this.selectedItem;\n const arrows = [KeyboardCode.ARROW_DOWN, KeyboardCode.ARROW_UP];\n\n if (!arrows.includes(e.key as KeyboardCode)) {\n return;\n }\n\n e.preventDefault();\n e.stopPropagation();\n\n const flatItems = [...this.flattenedList].filter((f) => !f.item.disabled);\n\n if (this.resetItem && showResetIcon) {\n flatItems.unshift({\n item: {id: \"__RESET_ITEM__\"} as SelectItem,\n key: this.resetKey,\n });\n }\n\n let currentIndex: number;\n if (typeof idOrReset === \"number\") {\n currentIndex = flatItems.findIndex((f) => f.key === idOrReset);\n } else {\n const k = this.itemIdKeyMap[idOrReset];\n currentIndex = flatItems.findIndex((f) => f.key === k);\n }\n\n if (!this.isOpen) {\n this.toggleSelectUl();\n\n if (currentIndex === -1) {\n currentIndex = -1;\n }\n }\n\n const lastIndex = flatItems.length - 1;\n\n let newIndex = currentIndex;\n\n if (e.key === KeyboardCode.ARROW_DOWN) {\n do {\n newIndex = newIndex === lastIndex ? 0 : newIndex + 1;\n } while (flatItems[newIndex].item.disabled);\n } else {\n do {\n newIndex = newIndex <= 0 ? lastIndex : newIndex - 1;\n } while (flatItems[newIndex].item.disabled);\n }\n\n this.focusSelectItem(flatItems[newIndex].key);\n }\n\n private focusSelectItem(key: number): void {\n this.host.querySelector<HTMLDivElement>(`#${this.htmlid}_key_${key}`)?.focus();\n }\n\n private toggleSelectUl(selfFocusOnClose = false): void {\n if (this.disabled || this.readonly) {\n return;\n }\n\n if (!this.isOpen) {\n document.addEventListener(\"click\", this.handleSelectFocus);\n document.addEventListener(\"keyup\", this.handleSelectFocus);\n } else {\n document.removeEventListener(\"click\", this.handleSelectFocus);\n document.removeEventListener(\"keyup\", this.handleSelectFocus);\n if (selfFocusOnClose) {\n (this.host.querySelector(`#${this.htmlid}_input`) as HTMLInputElement)?.focus();\n }\n }\n\n this.focusedItemId = \"\";\n this.isOpen = !this.isOpen;\n }\n\n private handleInputClick(e: MouseEvent | KeyboardEvent): void {\n if ((e.target as HTMLElement).closest(\".reset-icon\")) {\n e.stopPropagation();\n\n return;\n }\n\n this.toggleSelectUl();\n }\n\n private handleSelectFocus(e: MouseEvent | KeyboardEvent): void {\n const clickedElement = getClickedElement();\n if (clickedElement?.hasAttribute(\"disabled\")) {\n return;\n }\n\n if (e instanceof KeyboardEvent && e.key === KeyboardCode.ESC) {\n e.stopPropagation();\n\n return this.toggleSelectUl(true);\n }\n\n if (e instanceof KeyboardEvent && (e.key === KeyboardCode.ENTER || e.key !== KeyboardCode.TAB)) {\n return;\n }\n\n if (\n !getElementTree(clickedElement).find(\n (elem: HTMLElement) => elem.nodeName.toLowerCase() === \"z-input\" && elem.id === `${this.htmlid}_input`\n )\n ) {\n this.toggleSelectUl(e instanceof MouseEvent);\n }\n }\n\n private scrollToLetter(letter: string): void {\n const foundItem = this.itemsList.findIndex((item: SelectItem) => item.name.charAt(0) === letter);\n if (foundItem > -1) {\n this.focusSelectItem(this.itemIdKeyMap[this.itemsList[foundItem].id]);\n }\n }\n\n private renderInput(): HTMLZInputElement {\n return (\n <z-input\n class={{\n \"active-select\": this.isOpen,\n \"cursor-select\": !this.autocomplete,\n }}\n id={`${this.htmlid}_input`}\n htmlid={`${this.htmlid}_select_input`}\n placeholder={this.placeholder}\n value={!this.isOpen && this.selectedItem ? this.selectedItem.name.replace(/<[^>]+>/g, \"\") : null}\n label={this.label}\n autocomplete=\"off\"\n aria-expanded={this.isOpen ? \"true\" : \"false\"}\n aria-label={this.ariaLabel}\n aria-controls={`${this.htmlid}_list`}\n aria-autocomplete={this.hasAutocomplete() ? \"list\" : \"none\"}\n aria-activedescendant={this.isOpen ? this.focusedItemId : \"\"}\n icon={this.isOpen ? \"caret-up\" : \"caret-down\"}\n hasclearicon={this.hasAutocomplete()}\n message={false}\n name={this.name}\n disabled={this.disabled}\n readonly={this.readonly || (!this.hasAutocomplete() && this.isOpen)}\n status={this.isOpen ? undefined : this.status}\n role=\"combobox\"\n size={this.size}\n onClick={(e: MouseEvent) => {\n this.handleInputClick(e);\n }}\n onKeyUp={(e: KeyboardEvent) => {\n e.preventDefault();\n this.toggleSelectUl();\n }}\n onKeyDown={(e: KeyboardEvent) => {\n const current = this.selectedItem\n ? this.itemIdKeyMap[this.selectedItem.id]\n : this.resetItem\n ? this.resetKey\n : \"\";\n\n return this.arrowsSelectNav(e, current);\n }}\n onInputChange={(e: CustomEvent) => {\n this.handleInputChange(e);\n }}\n onKeyPress={(e: KeyboardEvent) => {\n if (!this.hasAutocomplete()) {\n e.preventDefault();\n this.scrollToLetter(String.fromCharCode(e.keyCode));\n }\n }}\n />\n );\n }\n\n private renderSelectUl(): HTMLDivElement {\n return (\n <div class={this.isOpen ? \"open\" : \"closed\"}>\n <div\n class={{\n \"ul-scroll-wrapper\": true,\n \"fixed\": this.isfixed,\n }}\n >\n <z-list\n role=\"listbox\"\n aria-label={this.ariaLabel || this.label}\n tabindex={this.disabled || this.readonly || !this.isOpen ? -1 : 0}\n id={`${this.htmlid}_list`}\n aria-multiselectable={false}\n size={this.listSizeType()}\n class={{\n \"disabled\": this.disabled,\n \"readonly\": this.readonly,\n [`input-${this.status}`]: !this.isOpen && !!this.status,\n \"z-scrollbar\": true,\n }}\n >\n {this.resetItem && this.renderResetItem()}\n {this.renderSelectUlItems()}\n </z-list>\n </div>\n </div>\n );\n }\n\n private renderResetItem(): HTMLZListElementElement {\n return (\n <z-list-element\n class={{\n \"hide\": !this.selectedItem || !this.resetItem,\n \"reset-item\": true,\n \"reset-item-margin\": !this.hasGroupItems,\n }}\n clickable={true}\n disabled={false}\n dividerType={ListDividerType.ELEMENT}\n role=\"option\"\n tabindex=\"0\"\n aria-selected=\"false\"\n id={`${this.htmlid}_key_${this.resetKey}`}\n size={this.hasTreeItems ? ListSize.MEDIUM : this.listSizeType()}\n onClickItem={() => {\n this.selectedItem = null;\n this.searchString = null;\n this.emitResetSelect();\n }}\n onKeyDown={(e: KeyboardEvent) => this.arrowsSelectNav(e, this.resetKey)}\n >\n <div\n class={{\n \"reset-item-content\": true,\n \"tree-list-reset-item\": this.hasTreeItems,\n }}\n >\n <z-icon name=\"multiply-circled\" />\n <span>{this.resetItem}</span>\n </div>\n </z-list-element>\n );\n }\n\n private renderItem(item: SelectItem, lastItem: boolean): HTMLZListElementElement {\n const thisItemKey = this.itemIdKeyMap[item.id];\n\n return (\n <z-list-element\n clickable={!item.disabled}\n disabled={item.disabled}\n dividerType={lastItem ? ListDividerType.HEADER : ListDividerType.ELEMENT}\n role=\"option\"\n tabindex={item.disabled || !this.isOpen ? -1 : 0}\n aria-selected={item.selected ? \"true\" : \"false\"}\n id={`${this.htmlid}_key_${thisItemKey}`}\n size={this.listSizeType()}\n onClickItem={() => this.selectItem(item)}\n onKeyDown={(e: KeyboardEvent) => this.arrowsSelectNav(e, thisItemKey)}\n >\n <div class=\"list-element-container\">\n <div\n class={{\n \"selected\": !!item.selected,\n \"list-element-content\": true,\n }}\n innerHTML={item.name}\n />\n {item.icon && <z-tag icon={item.icon}></z-tag>}\n </div>\n </z-list-element>\n );\n }\n\n private listSizeType(): ListSize {\n if (this.hasTreeItems) {\n return ListSize.NONE;\n }\n\n if (this.size === ControlSize.SMALL || this.size === ControlSize.X_SMALL) {\n return ListSize.SMALL;\n }\n\n return ListSize.MEDIUM;\n }\n\n //eslint-disable-next-line\n private renderSelectUlItems(): any {\n if (!this.itemsList.length) {\n return this.renderNoSearchResults();\n }\n\n if (this.hasGroupItems && !this.hasTreeItems) {\n return this.renderSelectGroupItems();\n } else if (this.hasGroupItems && this.hasTreeItems) {\n return this.renderGroupedTree();\n }\n\n return this.itemsList.map((item: SelectItem, index, array) => {\n const isLastItem = index === array.length - 1;\n const parentHasSiblings = array.length > 1;\n\n if (this.hasTreeItems) {\n return this.renderTreeItems(item, isLastItem, parentHasSiblings, true);\n }\n\n return this.renderItem(item, isLastItem);\n });\n }\n\n private renderTreeItems(\n item: SelectItem,\n isLastChild: boolean,\n parentHasSiblings: boolean,\n isTopLevel?: boolean\n ): HTMLZListElementElement[] {\n const thisItemKey = this.itemIdKeyMap[item.id];\n\n const hasDivider = this.hasGroupItems\n ? undefined\n : this.hasGroupItems\n ? isLastChild && !parentHasSiblings\n ? ListDividerType.ELEMENT\n : undefined\n : isTopLevel && parentHasSiblings && !isLastChild\n ? ListDividerType.ELEMENT\n : undefined;\n\n return (\n <z-list-element\n clickable={!item.disabled}\n disabled={item.disabled}\n class={{\n \"grouped-tree-parent-node\": this.hasGroupItems && !!item.children?.length,\n \"tree-search-item\": this.hasGroupItems && isTopLevel && !item.children?.length && !!this.searchString,\n }}\n size={this.listSizeType()}\n dividerType={hasDivider}\n hasTreeItems={this.hasTreeItems}\n >\n <div\n id={`${this.htmlid}_key_${thisItemKey}`}\n role=\"option\"\n class=\"list-element\"\n tabIndex={0}\n onClick={() => this.selectItem(item)}\n onKeyDown={(e: KeyboardEvent) => {\n this.arrowsSelectNav(e, thisItemKey);\n if (e.key === KeyboardCode.ENTER) {\n this.selectItem(item);\n }\n }}\n >\n <span class=\"item ellipsis\">\n <span\n class={{\n \"item-label\": true,\n \"selected\": !!item.selected,\n }}\n title={item.name}\n innerHTML={item.selected ? `<strong>${item.name}</strong>` : item.name}\n />\n </span>\n {item.icon && <z-tag icon={item.icon}></z-tag>}\n </div>\n {item.children && item.children.length > 0 ? (\n <z-list>\n <div class=\"children-node\">\n {item.children.map((child, index, arr) =>\n this.renderTreeItems(\n child,\n index === arr.length - 1,\n arr.length > 1,\n false // isTopLevel = false for children\n )\n )}\n </div>\n </z-list>\n ) : null}\n </z-list-element>\n );\n }\n\n private renderGroupedTree(): HTMLZListGroupElement[] {\n const grouped = this.itemsList.reduce(\n (acc, item) => {\n const category = item.category || \"Altra categoria\";\n acc[category] = acc[category] || [];\n acc[category].push(item);\n\n return acc;\n },\n {} as Record<string, SelectItem[]>\n );\n\n return Object.entries(grouped).map(([category, items], index, entries) => {\n const parentHasSiblings = Object.values(grouped).some((groupItems) => groupItems.length > 1);\n // const parentHasSiblings = items.length > 1;\n\n return (\n <z-list-group\n divider-type={index === entries.length - 1 ? undefined : ListDividerType.ELEMENT}\n hasTreeItems={true}\n >\n <span\n class=\"body-3-sb z-list-group-title\"\n slot=\"header-title\"\n >\n {category}\n </span>\n <z-list>\n {items.map((item, i, arr) => [\n this.renderTreeItems(item, i === arr.length - 1, parentHasSiblings, true),\n i < arr.length - 1 ? (\n <z-divider\n key={`divider-${i}`}\n style={{zIndex: \"100\", height: \"var(--border-size-small)\"}}\n />\n ) : null,\n ])}\n </z-list>\n {index !== entries.length - 1 && <z-divider style={{zIndex: \"100\", height: \"var(--border-size-small)\"}} />}\n </z-list-group>\n );\n });\n }\n\n private renderSelectGroupItems(): HTMLZListElementElement[] {\n const newData = this.itemsList.reduce(\n (group, item, index, array) => {\n const {category} = item;\n const lastItem = array.length === index + 1;\n const zListItem = this.renderItem(item, lastItem);\n\n group[category] = group[category] ?? [];\n group[category].push(zListItem);\n\n return group;\n },\n {} as Record<string, HTMLZListElementElement[]>\n );\n\n return Object.entries(newData).map(([key, value]) => {\n return (\n <z-list-group divider-type={ListDividerType.ELEMENT}>\n <span\n class=\"body-3-sb z-list-group-title\"\n slot=\"header-title\"\n >\n {key}\n </span>\n {value.map((item) => item)}\n </z-list-group>\n );\n });\n }\n\n private renderNoSearchResults(): HTMLZListElementElement {\n return (\n <z-list-element\n color=\"color-primary01\"\n class=\"no-results\"\n size={this.hasTreeItems ? ListSize.MEDIUM : this.listSizeType()}\n >\n <z-icon\n name=\"multiply-circle\"\n fill=\"color-primary01-icon\"\n />\n {this.noresultslabel}\n </z-list-element>\n );\n }\n\n private renderMessage(): HTMLZInputMessageElement {\n if (boolean(this.message) === false) {\n return;\n }\n\n return (\n <z-input-message\n message={boolean(this.message) === true ? undefined : (this.message as string)}\n status={this.status}\n class={this.size}\n disabled={this.disabled}\n />\n );\n }\n\n render(): HTMLDivElement {\n return (\n <div class=\"select-wrapper\">\n {this.renderInput()}\n {this.renderSelectUl()}\n {this.renderMessage()}\n </div>\n );\n }\n}\n"],"mappings":"mMAAA,MAAMA,EAAY,8+OAClB,MAAAC,EAAeD,E,MCSFE,EAAO,MAoGlB,WAAAC,CAAAC,G,8FANQC,KAAAC,UAA0B,GAE1BD,KAAAE,aAAuC,GAE9BF,KAAAG,UAAY,E,YA7FpB,MAAMC,M,6EAgBH,G,cAIS,M,cAIA,M,uFAgBQ,K,kBAIJ,M,oBAIC,mB,kHAgBN,M,mCAQCC,EAAYC,I,YAGxB,M,kBAGyB,K,4EASyB,GASzDN,KAAKO,eAAiBP,KAAKO,eAAeC,KAAKR,MAC/CA,KAAKS,kBAAoBT,KAAKS,kBAAkBD,KAAKR,K,CAIvD,UAAAU,GACEV,KAAKC,UAAYD,KAAKW,uBAEtBX,KAAKY,aAAeZ,KAAKa,iBAAiBb,KAAKC,WAE/CD,KAAKc,cAAgBd,KAAKe,iBAAiBf,KAAKC,WAChDD,KAAKE,aAAe,GACpBF,KAAKc,cAAcE,SAAQ,EAAEC,OAAMC,UACjClB,KAAKE,aAAae,EAAKE,IAAMD,CAAG,G,CAKpC,qBAAAE,CAAsBC,GACpBrB,KAAKsB,cAAiB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GAErB,OAAOD,CAAK,GAEd,IAGF,OAAOnJ,OAAO0I,QAAQQ,GAAS/J,KAAI,EAAE/B,EAAKU,KAEtC2G,EAAA,+BAA4BiC,EAAgBC,SAC1ClC,EAAA,QACEC,MAAM,+BACNmE,KAAK,gBAEJzL,GAEFU,EAAMqB,KAAKhC,GAASA,M,CAMrB,qBAAAoK,GACN,OACE9C,EAAA,kBACE4E,MAAM,kBACN3E,MAAM,aACNW,KAAMnJ,KAAKoD,aAAesH,EAASC,OAAS3K,KAAKiK,gBAEjD1B,EAAA,UACEhF,KAAK,kBACL6J,KAAK,yBAENpN,KAAKqN,e,CAKJ,aAAAC,GACN,GAAI3I,EAAQ3E,KAAK+I,WAAa,MAAO,CACnC,M,CAGF,OACER,EAAA,mBACEQ,QAASpE,EAAQ3E,KAAK+I,WAAa,KAAOE,UAAajJ,KAAK+I,QAC5DC,OAAQhJ,KAAKgJ,OACbR,MAAOxI,KAAKmJ,KACZhE,SAAUnF,KAAKmF,U,CAKrB,MAAAoI,GACE,OACEhF,EAAA,OAAArH,IAAA,2CAAKsH,MAAM,kBACRxI,KAAKsI,cACLtI,KAAK6J,iBACL7J,KAAKsN,gB","ignoreList":[]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as t,c as o,h as e,a as n,g as a}from"./p-75c4a726.js";import{r as s}from"./p-
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{r as t,c as o,h as e,a as n,g as a}from"./p-75c4a726.js";import{r as s}from"./p-625e2cee.js";import"./p-f19f12b1.js";import"./p-748fa3ae.js";const r=":host{position:relative;display:grid;width:100%;box-sizing:border-box;grid-auto-flow:column;grid-template-columns:var(--z-table--expand-button-size, 0) repeat(var(--columns), minmax(128px, 1fr));--columns:1}*{box-sizing:border-box}.z-tr--expand-button-container,::slotted(*){border-bottom:var(--z-table--cells-bottom-border-size, var(--border-size-small)) solid var(--color-surface03)}::slotted(*:not(:last-child)){border-right:var(--z-table--cell-left-border, none)}:host([expandable]){--show-expandable-button:visible;cursor:pointer}:host([expandable]) ::slotted(*){grid-row:1}:host([expandable]) ::slotted(:nth-last-child(2)){border-right:none}:host([expandable]) ::slotted(*:last-child){border-left:0;grid-column:1 / span calc(var(--columns) + 1);grid-row:2}:host([expandable]:not([expanded])) ::slotted(*:last-child){display:none}:host([expanded]){margin-bottom:4px;box-shadow:0 4px 4px -2px var(--shadow-color-base)}:host([expanded]) .z-tr--expand-button-container,:host([expanded]) ::slotted(*){background-color:var(--color-background)}:host(:hover){position:relative;z-index:10;box-shadow:0 4px 4px -2px var(--shadow-color-base, rgb(0 0 0 / 20%))}:host(:focus){position:relative;z-index:20;box-shadow:var(--shadow-focus-primary);outline:none}.z-tr--expand-button-container{display:flex;align-items:center;justify-content:center;background-color:var(--z-table--cells-background, var(--color-surface01))}.z-tr--expand-button-container button{display:flex;align-items:center;justify-content:center;padding:0;border:none;margin:auto;appearance:none;background:transparent;cursor:pointer;visibility:var(--show-expandable-button, hidden)}.z-tr--expand-button-container button z-icon{--z-icon-width:16px;--z-icon-height:16px}.z-tr--focus-overlay{position:absolute;z-index:30;right:0;left:0;width:100%;border-radius:4px;box-shadow:none;inset:0;outline:none;pointer-events:none;transition:box-shadow 0.2s}:host(:focus) .z-tr--focus-overlay{box-shadow:0 0 0 2px var(--shadow-focus-primary),\n var(--shadow-focus-primary);outline:none}:host(:focus) ::slotted(*){border-bottom:none}:host(:focus) .z-tr--expand-button-container{border-bottom:none}";const i=r;const d=class{constructor(e){t(this,e);this.expand=o(this,"expand",7);this.expandable=false;this.expanded=false;this.expandableContentId=undefined}updateColumns(){const t=Array.from(this.host.querySelectorAll("z-td, z-th"));if(this.expandable){t.pop()}const o=t.map((t=>t.colspan||1)).reduce(((t,o)=>t+o),0);this.host.style.setProperty("--columns",`${o}`);if(this.expandable){const o=t.pop();o.id=o.id||`z-tr-expandable-content-${s()}`;this.expandableContentId=o.id}}onRowClick(t){const o=t.target.closest(".prevent-expand");if(!this.expandable||o){return}this.expanded=!this.expanded;this.expand.emit({expanded:this.expanded})}onKeyDown(t){if(!this.expandable){return}const o=document.activeElement;if(o!==this.host){return}if(t.key==="Enter"||t.key===" "){t.preventDefault();this.expanded=!this.expanded;this.expand.emit({expanded:this.expanded})}}componentWillLoad(){this.updateColumns()}render(){return e(n,{key:"5a8cbf39900a7569b0fb31d225be6fade59c82ea",role:"row",tabIndex:0,expanded:this.expanded,onClick:this.onRowClick.bind(this),onKeyDown:this.onKeyDown.bind(this)},e("div",{key:"75f7a74a6eda8f50d40beedbe387da74d58c276b",class:"z-tr--focus-overlay","aria-hidden":"true"}),e("div",{key:"d34b5aa1778f3d830fd80354c79cd93a9b703737",class:"z-tr--expand-button-container"},this.expandable&&e("button",{key:"fef99c968e191fe7970665b9a45721fada207db0",tabIndex:-1,"aria-expanded":this.expanded?"true":"false","aria-label":this.expanded?"Comprimi riga":"Espandi riga","aria-controls":this.expandableContentId,type:"button"},e("z-icon",{key:"f1cf676da370f0c2500914decdc5f09e1e647b7f",name:this.expanded?"minus-circled":"plus-circled"}))),e("slot",{key:"cd09d8ed8cf0a33137d4d1d91ec9720227f359ba",onSlotchange:this.updateColumns.bind(this)}))}get host(){return a(this)}static get watchers(){return{expandable:["updateColumns"]}}};d.style=i;export{d as Z};
|
|
2
|
+
//# sourceMappingURL=p-43bc482a.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as t,c as e,h as i,g as r}from"./p-75c4a726.js";import{Y as a}from"./p-17af7fb2.js";import{B as o}from"./p-5145a606.js";import{r as s}from"./p-a06fbbc0.js";const n=':host{--z-book-card-ribbon-background-color:var(--avatar-C08);--z-book-card-ribbon-shadow-color:var(--green950);--z-book-card-compact-width:262px;--z-book-card-compact-height:568px}:host>article{display:block;width:100%;max-width:360px;box-sizing:border-box;border:var(--border-size-medium) solid var(--color-surface03);background-color:var(--color-surface01);border-radius:var(--border-radius);font-family:var(--font-family-sans);font-weight:var(--font-rg)}:host>article div.cover{position:relative}:host>article div.cover div.img-wrapper{display:flex;overflow:hidden;border:var(--border-size-small) solid var(--color-surface03);line-height:0}:host>article div.cover div.img-wrapper img{width:auto;max-width:100%;height:auto;max-height:100%;align-self:flex-end}:host>article div.cover .ribbon{position:absolute;z-index:10;top:calc(var(--space-unit) * 2);left:calc(var(--space-unit) * -2);display:flex;max-width:100%;height:calc(var(--space-unit) * 4);box-sizing:border-box;align-items:center;padding:0 calc(var(--space-unit) * 2);border:var(--border-size-medium) solid var(--color-surface01);background:var(--z-book-card-ribbon-background-color);border-radius:0 var(--border-radius) var(--border-radius) 0;box-shadow:var(--shadow-2);color:var(--color-text-inverse);font-family:var(--font-family-sans);font-size:var(--font-size-2);font-weight:var(--font-sb);line-height:initial}:host>article div.cover .ribbon.interactive:hover{cursor:pointer}:host>article div.cover .ribbon.interactive:focus{box-shadow:var(--shadow-focus-primary);outline:none !important}:host>article div.cover .ribbon span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;word-wrap:nowrap}:host>article div.cover .ribbon::before{position:absolute;bottom:-12px;left:-2px;width:0;height:0;border-top:10px solid var(--z-book-card-ribbon-shadow-color);border-left:16px solid transparent;content:""}:host>article div.cover .ribbon z-icon{margin-right:var(--space-unit)}:host>article div.content{margin:var(--space-unit) 0;border-radius:var(--border-radius)}:host>article .title{display:flex;height:100%;align-self:center;color:var(--color-default-text);font-size:var(--font-size-4);font-weight:var(--font-sb);line-height:1.5}:host>article .title *{all:unset}:host>article div.subtitle{color:var(--color-default-text);font-size:var(--font-size-2);font-weight:var(--font-rg);line-height:1.4}:host>article div.authors{color:var(--color-default-text);font-size:var(--font-size-1);font-weight:var(--font-rg);line-height:1.33}:host>article div.isbn{overflow:hidden;color:var(--color-default-text);font-size:var(--font-size-2);line-height:1.33;text-overflow:ellipsis;white-space:nowrap;word-wrap:nowrap}:host>article div.isbn>.code{font-weight:var(--font-sb)}:host>article div.tags{display:flex;overflow:hidden;max-height:32px;flex-flow:row wrap;align-content:stretch;align-items:stretch;justify-content:flex-start;gap:calc(var(--space-unit) / 2)}:host>article ::slotted([slot="tags"]){margin-bottom:var(--space-unit)}:host>article ::slotted([slot="header-cta"]){--z-icon-width:20px;--z-icon-height:20px;padding:var(--space-unit);cursor:pointer;fill:var(--color-primary01-icon)}:host>article ::slotted([slot="header-cta"]:focus){box-shadow:var(--shadow-focus-primary);outline:none !important}:host>article.expanded{width:100%;min-width:328px;padding:calc(var(--space-unit) * 2);padding-bottom:0}:host>article.expanded div.header{display:flex;flex-flow:row nowrap;align-content:stretch;align-items:top;justify-content:space-between;margin-bottom:var(--space-unit);white-space:nowrap}:host>article.expanded div.cover div.img-wrapper{border-radius:var(--border-radius)}:host>article.expanded div.cover div.img-wrapper img{width:100%}:host>article.expanded .title,:host>article.expanded .subtitle,:host>article.expanded .authors{display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:2;white-space:initial}:host>article.expanded div.footer{border-top:var(--border-size-small) solid var(--color-surface03);margin-bottom:calc(var(--space-unit) * 1.5)}:host>article.expanded div.footer.open{padding-top:calc(var(--space-unit) * 1.5)}:host>article.expanded div.footer.open div.resources{display:initial}:host>article.expanded div.footer.close div.resources{display:none}:host>article.expanded button.show-resources{--z-icon-height:16px;--z-icon-width:16px;all:unset;display:flex;width:100%;flex-flow:row nowrap;align-content:center;align-items:center;justify-content:center;padding:calc(var(--space-unit) * 1) 0;color:var(--color-text-link-blue);cursor:pointer;fill:var(--color-text-link-blue);font-size:var(--font-size-2);font-weight:var(--font-sb);gap:var(--space-unit)}:host>article.expanded button.show-resources:focus{box-shadow:var(--shadow-focus-primary)}:host>article.search{width:262px;height:616px;padding:calc(var(--space-unit) * 2);padding-bottom:0}:host>article.search .wrapper-container{display:flex;height:100%;flex-direction:column;justify-content:space-between}:host>article.search .wrapper-container .wrapper{height:451px}:host>article.search .wrapper-container .action-container{padding-bottom:calc(var(--space-unit) * 2)}:host>article.search div.header{display:flex;height:24px;flex-flow:row nowrap;align-content:stretch;align-items:center;justify-content:space-between;margin-bottom:calc(var(--space-unit) * 1.5);white-space:nowrap}:host>article.search div.cover div.img-wrapper{height:314px;border-radius:var(--border-radius)}:host>article.search .title{display:block;height:initial;align-self:unset;font-size:var(--font-size-3)}:host>article.search .title,:host>article.search .subtitle,:host>article.search .authors{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host>article.compact{width:var(--z-book-card-compact-width);height:var(--z-book-card-compact-height)}:host>article.compact.borderless{border:none}:host>article.compact div.cover div.img-wrapper{width:100%;height:calc(var(--z-book-card-compact-width) * 1.36);box-sizing:border-box;border:none;background:var(--color-white);border-radius:var(--border-radius) var(--border-radius) 0 0;box-shadow:var(--shadow-2)}:host>article.compact div.wrapper{display:flex;height:100%;flex-flow:column nowrap;align-content:stretch;align-items:stretch;justify-content:flex-start}:host>article.compact div.content{display:flex;box-sizing:border-box;flex-flow:column nowrap;align-content:stretch;align-items:stretch;justify-content:space-between;padding:calc(var(--space-unit) * 2);padding-top:var(--space-unit);margin:0}:host>article.compact div.action-container{padding:calc(var(--space-unit) * 2);padding-top:0;margin-top:auto}:host>article.compact.borderless div.cover div.img-wrapper{width:var(--z-book-card-compact-width)}:host>article.compact.borderless div.content{padding:0;padding-top:var(--space-unit)}:host>article.compact.borderless div.action-container{padding:0;padding-bottom:calc(var(--space-unit) * 2)}:host>article.compact .title{display:block;height:initial;align-self:unset}:host>article.compact .title,:host>article.compact .subtitle,:host>article.compact .authors{display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:2;white-space:initial}@media (min-width: 768px){:host>article{width:100%;max-width:initial}:host>article .title{display:block;height:initial;align-self:unset}:host>article.expanded{width:100%;min-width:initial;max-width:initial;height:360px;padding:0;border:0}:host>article.expanded div.wrapper{display:flex;flex-flow:row nowrap;align-content:stretch;align-items:stretch;justify-content:flex-start}:host>article.expanded div.cover div.img-wrapper{width:262px;height:356px;border:0;border:var(--border-size-medium) solid var(--color-surface03);border-right:none;background:var(--color-surface01);border-radius:var(--border-radius) 0 0 var(--border-radius)}:host>article.expanded div.cover div.img-wrapper img{width:auto;border-radius:0}:host>article.expanded div.content{display:flex;overflow:hidden;width:100%;height:356px;flex-flow:column nowrap;align-content:stretch;align-items:stretch;justify-content:space-between;border:var(--border-size-medium) solid var(--color-surface03);border-left:none;margin:0;background:var(--color-surface01);border-radius:0 var(--border-radius) var(--border-radius) 0}:host>article.expanded div.content div.top{padding:calc(var(--space-unit) * 2);padding-bottom:0}:host>article.expanded div.content div.top div.info{display:flex;flex-flow:row nowrap;align-content:stretch;align-items:stretch;justify-content:space-between;margin-bottom:calc(var(--space-unit) / 2)}:host>article.expanded div.content div.top div.info>div.left{width:100%}:host>article.expanded div.content div.bottom{padding:calc(var(--space-unit) * 2);padding-bottom:0}}@media (min-width: 1152px){:host>article{width:fit-content;max-width:initial}}@media (min-width: 1366px){:host>article.expanded{width:635px}:host>article.expanded div.content{width:369px}}';const d=n;const c=class{constructor(i){t(this,i);this.ribbonClick=e(this,"ribbonClick",7);this.variant=undefined;this.cover=undefined;this.operaTitle=undefined;this.volumeTitle=undefined;this.authors=undefined;this.isbn=undefined;this.isbnLabel="";this.ribbon=undefined;this.ribbonIcon=undefined;this.ribbonInteractive=undefined;this.borderless=undefined;this.fallbackCover=undefined;this.operaTitleTag=undefined;this.isMobile=false;this.hasResources=false;this.showResources=false}emitRibbonClick(){this.ribbonClick.emit()}componentWillLoad(){this.id=`id-${s()}`;const t=window.matchMedia(`(max-width: ${o.MOBILE}px)`);this.isMobile=t.matches;t.onchange=t=>this.isMobile=t.matches}componentDidLoad(){this.handleResources()}handleResources(){var t;if(this.variant!==a.EXPANDED||!this.isMobile){return}this.hasResources=((t=this.hostElement.querySelectorAll("[slot=resources]"))===null||t===void 0?void 0:t.length)>0}toggleResources(){this.showResources=!this.showResources}renderCard(){switch(this.variant){case a.EXPANDED:return this.isMobile?this.renderMobileExpandedCard():this.renderExpandedCard();case a.COMPACT:return this.renderCompactCard();case a.SEARCH:return this.renderSearchCard()}}renderExpandedCard(){return i("div",{class:"wrapper"},this.renderCover(),i("div",{class:"content"},i("div",{class:"top"},i("div",{class:"info"},i("div",{class:"left"},this.renderAuthors(),this.renderOperaTitle(),this.renderVolumeTitle(),this.renderIsbn()),i("div",{class:"right"},this.renderHeaderCtaSlot())),this.renderTagsSlot()),i("div",{class:"bottom"},this.renderResourcesSlot())))}renderMobileExpandedCard(){return i("div",{class:"wrapper"},i("div",{class:"header"},this.renderOperaTitle(),this.renderHeaderCtaSlot()),this.renderCover(),i("div",{class:"content"},this.renderTagsSlot(),this.renderAuthors(),this.renderVolumeTitle(),this.renderIsbn()),this.hasResources&&i("div",{class:{footer:true,open:this.showResources,close:!this.showResources}},!this.showResources&&this.renderShowResources(),this.renderResourcesSlot(),this.showResources&&this.renderShowResources()))}renderSearchCard(){return i("div",{class:"wrapper-container"},i("div",{class:"wrapper"},i("div",{class:"header"},this.renderOperaTitle(),this.renderHeaderCtaSlot()),this.renderCover(),i("div",{class:"content"},this.renderTagsSlot(),this.renderAuthors(),this.renderVolumeTitle(),this.renderIsbn())),this.renderFooterCtaSlot())}renderCompactCard(){return i("div",{class:"wrapper"},this.renderCover(),i("div",{class:"content"},this.renderAuthors(),this.renderOperaTitle(),this.renderVolumeTitle(),this.renderIsbn()),this.renderFooterCtaSlot())}renderCover(){return i("div",{class:"cover"},this.ribbon&&this.variant!==a.COMPACT&&this.renderRibbon(),i("div",{class:"img-wrapper"},i("img",{src:this.cover,onError:()=>{if(this.fallbackCover){this.cover=this.fallbackCover}},"aria-hidden":"true"})))}renderRibbon(){const t=[this.ribbonIcon&&i("z-icon",{name:this.ribbonIcon,width:16,height:16,fill:"color-inverse-icon"}),i("span",null,this.ribbon)];return this.ribbonInteractive?i("button",{class:"ribbon interactive",onClick:()=>this.emitRibbonClick()},t):i("div",{class:"ribbon"},t)}renderOperaTitle(){const t=this.operaTitleTag?`<${this.operaTitleTag}>${this.operaTitle}</${this.operaTitleTag}>`:this.operaTitle;return i("div",{class:"title",innerHTML:t})}renderVolumeTitle(){return this.volumeTitle?i("div",{class:"subtitle"},this.volumeTitle):null}renderAuthors(){return this.authors?i("div",{class:"authors","aria-description":"Autori"},this.authors):null}renderIsbn(){return this.isbn?i("div",{class:"isbn"},i("span",{class:"code","aria-description":`ISBN ${this.isbnLabel}`},this.isbn),this.isbnLabel?i("span",{class:"label"}," ",this.isbnLabel):null):null}renderShowResources(){return i("button",{class:"show-resources","aria-label":`Risorse del libro ${this.operaTitle}`,"aria-expanded":this.showResources.toString(),"aria-controls":`resources-${this.id}`,onClick:()=>this.toggleResources()},this.showResources?"Chiudi":"Vedi tutto",i("z-icon",{name:this.showResources?"chevron-up":"chevron-down"}))}renderTagsSlot(){return i("div",{class:"tags"},i("slot",{name:"tags"}))}renderHeaderCtaSlot(){return i("slot",{name:"header-cta"})}renderResourcesSlot(){return i("div",{id:`resources-${this.id}`,class:"resources"},i("slot",{name:"resources",onSlotchange:()=>this.handleResources()}))}renderFooterCtaSlot(){return i("div",{class:"action-container"},i("slot",{name:"footer-cta"}))}render(){return i("article",{key:"237f8f14bccc2e44371b1a9f4cb08904802f1d2d",class:{[this.variant]:true,borderless:!!this.borderless}},this.renderCard())}get hostElement(){return r(this)}};c.style=d;export{c as z_book_card_deprecated};
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{r as t,c as e,h as i,g as r}from"./p-75c4a726.js";import{Y as o}from"./p-17af7fb2.js";import{B as a}from"./p-5145a606.js";import{r as s}from"./p-625e2cee.js";const n=':host{--z-book-card-ribbon-background-color:var(--avatar-C08);--z-book-card-ribbon-shadow-color:var(--green950);--z-book-card-compact-width:262px;--z-book-card-compact-height:568px}:host>article{display:block;width:100%;max-width:360px;box-sizing:border-box;border:var(--border-size-medium) solid var(--color-surface03);background-color:var(--color-surface01);border-radius:var(--border-radius);font-family:var(--font-family-sans);font-weight:var(--font-rg)}:host>article div.cover{position:relative}:host>article div.cover div.img-wrapper{display:flex;overflow:hidden;border:var(--border-size-small) solid var(--color-surface03);line-height:0}:host>article div.cover div.img-wrapper img{width:auto;max-width:100%;height:auto;max-height:100%;align-self:flex-end}:host>article div.cover .ribbon{position:absolute;z-index:10;top:calc(var(--space-unit) * 2);left:calc(var(--space-unit) * -2);display:flex;max-width:100%;height:calc(var(--space-unit) * 4);box-sizing:border-box;align-items:center;padding:0 calc(var(--space-unit) * 2);border:var(--border-size-medium) solid var(--color-surface01);background:var(--z-book-card-ribbon-background-color);border-radius:0 var(--border-radius) var(--border-radius) 0;box-shadow:var(--shadow-2);color:var(--color-text-inverse);font-family:var(--font-family-sans);font-size:var(--font-size-2);font-weight:var(--font-sb);line-height:initial}:host>article div.cover .ribbon.interactive:hover{cursor:pointer}:host>article div.cover .ribbon.interactive:focus{box-shadow:var(--shadow-focus-primary);outline:none !important}:host>article div.cover .ribbon span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;word-wrap:nowrap}:host>article div.cover .ribbon::before{position:absolute;bottom:-12px;left:-2px;width:0;height:0;border-top:10px solid var(--z-book-card-ribbon-shadow-color);border-left:16px solid transparent;content:""}:host>article div.cover .ribbon z-icon{margin-right:var(--space-unit)}:host>article div.content{margin:var(--space-unit) 0;border-radius:var(--border-radius)}:host>article .title{display:flex;height:100%;align-self:center;color:var(--color-default-text);font-size:var(--font-size-4);font-weight:var(--font-sb);line-height:1.5}:host>article .title *{all:unset}:host>article div.subtitle{color:var(--color-default-text);font-size:var(--font-size-2);font-weight:var(--font-rg);line-height:1.4}:host>article div.authors{color:var(--color-default-text);font-size:var(--font-size-1);font-weight:var(--font-rg);line-height:1.33}:host>article div.isbn{overflow:hidden;color:var(--color-default-text);font-size:var(--font-size-2);line-height:1.33;text-overflow:ellipsis;white-space:nowrap;word-wrap:nowrap}:host>article div.isbn>.code{font-weight:var(--font-sb)}:host>article div.tags{display:flex;overflow:hidden;max-height:32px;flex-flow:row wrap;align-content:stretch;align-items:stretch;justify-content:flex-start;gap:calc(var(--space-unit) / 2)}:host>article ::slotted([slot="tags"]){margin-bottom:var(--space-unit)}:host>article ::slotted([slot="header-cta"]){--z-icon-width:20px;--z-icon-height:20px;padding:var(--space-unit);cursor:pointer;fill:var(--color-primary01-icon)}:host>article ::slotted([slot="header-cta"]:focus){box-shadow:var(--shadow-focus-primary);outline:none !important}:host>article.expanded{width:100%;min-width:328px;padding:calc(var(--space-unit) * 2);padding-bottom:0}:host>article.expanded div.header{display:flex;flex-flow:row nowrap;align-content:stretch;align-items:top;justify-content:space-between;margin-bottom:var(--space-unit);white-space:nowrap}:host>article.expanded div.cover div.img-wrapper{border-radius:var(--border-radius)}:host>article.expanded div.cover div.img-wrapper img{width:100%}:host>article.expanded .title,:host>article.expanded .subtitle,:host>article.expanded .authors{display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:2;white-space:initial}:host>article.expanded div.footer{border-top:var(--border-size-small) solid var(--color-surface03);margin-bottom:calc(var(--space-unit) * 1.5)}:host>article.expanded div.footer.open{padding-top:calc(var(--space-unit) * 1.5)}:host>article.expanded div.footer.open div.resources{display:initial}:host>article.expanded div.footer.close div.resources{display:none}:host>article.expanded button.show-resources{--z-icon-height:16px;--z-icon-width:16px;all:unset;display:flex;width:100%;flex-flow:row nowrap;align-content:center;align-items:center;justify-content:center;padding:calc(var(--space-unit) * 1) 0;color:var(--color-text-link-blue);cursor:pointer;fill:var(--color-text-link-blue);font-size:var(--font-size-2);font-weight:var(--font-sb);gap:var(--space-unit)}:host>article.expanded button.show-resources:focus{box-shadow:var(--shadow-focus-primary)}:host>article.search{width:262px;height:616px;padding:calc(var(--space-unit) * 2);padding-bottom:0}:host>article.search .wrapper-container{display:flex;height:100%;flex-direction:column;justify-content:space-between}:host>article.search .wrapper-container .wrapper{height:451px}:host>article.search .wrapper-container .action-container{padding-bottom:calc(var(--space-unit) * 2)}:host>article.search div.header{display:flex;height:24px;flex-flow:row nowrap;align-content:stretch;align-items:center;justify-content:space-between;margin-bottom:calc(var(--space-unit) * 1.5);white-space:nowrap}:host>article.search div.cover div.img-wrapper{height:314px;border-radius:var(--border-radius)}:host>article.search .title{display:block;height:initial;align-self:unset;font-size:var(--font-size-3)}:host>article.search .title,:host>article.search .subtitle,:host>article.search .authors{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host>article.compact{width:var(--z-book-card-compact-width);height:var(--z-book-card-compact-height)}:host>article.compact.borderless{border:none}:host>article.compact div.cover div.img-wrapper{width:100%;height:calc(var(--z-book-card-compact-width) * 1.36);box-sizing:border-box;border:none;background:var(--color-white);border-radius:var(--border-radius) var(--border-radius) 0 0;box-shadow:var(--shadow-2)}:host>article.compact div.wrapper{display:flex;height:100%;flex-flow:column nowrap;align-content:stretch;align-items:stretch;justify-content:flex-start}:host>article.compact div.content{display:flex;box-sizing:border-box;flex-flow:column nowrap;align-content:stretch;align-items:stretch;justify-content:space-between;padding:calc(var(--space-unit) * 2);padding-top:var(--space-unit);margin:0}:host>article.compact div.action-container{padding:calc(var(--space-unit) * 2);padding-top:0;margin-top:auto}:host>article.compact.borderless div.cover div.img-wrapper{width:var(--z-book-card-compact-width)}:host>article.compact.borderless div.content{padding:0;padding-top:var(--space-unit)}:host>article.compact.borderless div.action-container{padding:0;padding-bottom:calc(var(--space-unit) * 2)}:host>article.compact .title{display:block;height:initial;align-self:unset}:host>article.compact .title,:host>article.compact .subtitle,:host>article.compact .authors{display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:2;white-space:initial}@media (min-width: 768px){:host>article{width:100%;max-width:initial}:host>article .title{display:block;height:initial;align-self:unset}:host>article.expanded{width:100%;min-width:initial;max-width:initial;height:360px;padding:0;border:0}:host>article.expanded div.wrapper{display:flex;flex-flow:row nowrap;align-content:stretch;align-items:stretch;justify-content:flex-start}:host>article.expanded div.cover div.img-wrapper{width:262px;height:356px;border:0;border:var(--border-size-medium) solid var(--color-surface03);border-right:none;background:var(--color-surface01);border-radius:var(--border-radius) 0 0 var(--border-radius)}:host>article.expanded div.cover div.img-wrapper img{width:auto;border-radius:0}:host>article.expanded div.content{display:flex;overflow:hidden;width:100%;height:356px;flex-flow:column nowrap;align-content:stretch;align-items:stretch;justify-content:space-between;border:var(--border-size-medium) solid var(--color-surface03);border-left:none;margin:0;background:var(--color-surface01);border-radius:0 var(--border-radius) var(--border-radius) 0}:host>article.expanded div.content div.top{padding:calc(var(--space-unit) * 2);padding-bottom:0}:host>article.expanded div.content div.top div.info{display:flex;flex-flow:row nowrap;align-content:stretch;align-items:stretch;justify-content:space-between;margin-bottom:calc(var(--space-unit) / 2)}:host>article.expanded div.content div.top div.info>div.left{width:100%}:host>article.expanded div.content div.bottom{padding:calc(var(--space-unit) * 2);padding-bottom:0}}@media (min-width: 1152px){:host>article{width:fit-content;max-width:initial}}@media (min-width: 1366px){:host>article.expanded{width:635px}:host>article.expanded div.content{width:369px}}';const d=n;const c=class{constructor(i){t(this,i);this.ribbonClick=e(this,"ribbonClick",7);this.variant=undefined;this.cover=undefined;this.operaTitle=undefined;this.volumeTitle=undefined;this.authors=undefined;this.isbn=undefined;this.isbnLabel="";this.ribbon=undefined;this.ribbonIcon=undefined;this.ribbonInteractive=undefined;this.borderless=undefined;this.fallbackCover=undefined;this.operaTitleTag=undefined;this.isMobile=false;this.hasResources=false;this.showResources=false}emitRibbonClick(){this.ribbonClick.emit()}componentWillLoad(){this.id=`id-${s()}`;const t=window.matchMedia(`(max-width: ${a.MOBILE}px)`);this.isMobile=t.matches;t.onchange=t=>this.isMobile=t.matches}componentDidLoad(){this.handleResources()}handleResources(){var t;if(this.variant!==o.EXPANDED||!this.isMobile){return}this.hasResources=((t=this.hostElement.querySelectorAll("[slot=resources]"))===null||t===void 0?void 0:t.length)>0}toggleResources(){this.showResources=!this.showResources}renderCard(){switch(this.variant){case o.EXPANDED:return this.isMobile?this.renderMobileExpandedCard():this.renderExpandedCard();case o.COMPACT:return this.renderCompactCard();case o.SEARCH:return this.renderSearchCard()}}renderExpandedCard(){return i("div",{class:"wrapper"},this.renderCover(),i("div",{class:"content"},i("div",{class:"top"},i("div",{class:"info"},i("div",{class:"left"},this.renderAuthors(),this.renderOperaTitle(),this.renderVolumeTitle(),this.renderIsbn()),i("div",{class:"right"},this.renderHeaderCtaSlot())),this.renderTagsSlot()),i("div",{class:"bottom"},this.renderResourcesSlot())))}renderMobileExpandedCard(){return i("div",{class:"wrapper"},i("div",{class:"header"},this.renderOperaTitle(),this.renderHeaderCtaSlot()),this.renderCover(),i("div",{class:"content"},this.renderTagsSlot(),this.renderAuthors(),this.renderVolumeTitle(),this.renderIsbn()),this.hasResources&&i("div",{class:{footer:true,open:this.showResources,close:!this.showResources}},!this.showResources&&this.renderShowResources(),this.renderResourcesSlot(),this.showResources&&this.renderShowResources()))}renderSearchCard(){return i("div",{class:"wrapper-container"},i("div",{class:"wrapper"},i("div",{class:"header"},this.renderOperaTitle(),this.renderHeaderCtaSlot()),this.renderCover(),i("div",{class:"content"},this.renderTagsSlot(),this.renderAuthors(),this.renderVolumeTitle(),this.renderIsbn())),this.renderFooterCtaSlot())}renderCompactCard(){return i("div",{class:"wrapper"},this.renderCover(),i("div",{class:"content"},this.renderAuthors(),this.renderOperaTitle(),this.renderVolumeTitle(),this.renderIsbn()),this.renderFooterCtaSlot())}renderCover(){return i("div",{class:"cover"},this.ribbon&&this.variant!==o.COMPACT&&this.renderRibbon(),i("div",{class:"img-wrapper"},i("img",{src:this.cover,onError:()=>{if(this.fallbackCover){this.cover=this.fallbackCover}},"aria-hidden":"true"})))}renderRibbon(){const t=[this.ribbonIcon&&i("z-icon",{name:this.ribbonIcon,width:16,height:16,fill:"color-inverse-icon"}),i("span",null,this.ribbon)];return this.ribbonInteractive?i("button",{class:"ribbon interactive",onClick:()=>this.emitRibbonClick()},t):i("div",{class:"ribbon"},t)}renderOperaTitle(){const t=this.operaTitleTag?`<${this.operaTitleTag}>${this.operaTitle}</${this.operaTitleTag}>`:this.operaTitle;return i("div",{class:"title",innerHTML:t})}renderVolumeTitle(){return this.volumeTitle?i("div",{class:"subtitle"},this.volumeTitle):null}renderAuthors(){return this.authors?i("div",{class:"authors","aria-description":"Autori"},this.authors):null}renderIsbn(){return this.isbn?i("div",{class:"isbn"},i("span",{class:"code","aria-description":`ISBN ${this.isbnLabel}`},this.isbn),this.isbnLabel?i("span",{class:"label"}," ",this.isbnLabel):null):null}renderShowResources(){return i("button",{class:"show-resources","aria-label":`Risorse del libro ${this.operaTitle}`,"aria-expanded":this.showResources.toString(),"aria-controls":`resources-${this.id}`,onClick:()=>this.toggleResources()},this.showResources?"Chiudi":"Vedi tutto",i("z-icon",{name:this.showResources?"chevron-up":"chevron-down"}))}renderTagsSlot(){return i("div",{class:"tags"},i("slot",{name:"tags"}))}renderHeaderCtaSlot(){return i("slot",{name:"header-cta"})}renderResourcesSlot(){return i("div",{id:`resources-${this.id}`,class:"resources"},i("slot",{name:"resources",onSlotchange:()=>this.handleResources()}))}renderFooterCtaSlot(){return i("div",{class:"action-container"},i("slot",{name:"footer-cta"}))}render(){return i("article",{key:"237f8f14bccc2e44371b1a9f4cb08904802f1d2d",class:{[this.variant]:true,borderless:!!this.borderless}},this.renderCard())}get hostElement(){return r(this)}};c.style=d;export{c as z_book_card_deprecated};
|
|
2
|
+
//# sourceMappingURL=p-539f99db.entry.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{g as n,p as t}from"./p-17af7fb2.js";import{B as e}from"./p-5145a606.js";function r(n){switch(n){case true:case"true":case 1:case"1":case"on":case"yes":return true;case false:case"false":case 0:case"0":case"off":case"no":return false;default:return n}}function s(){return Math.random().toString(36).replace("0.","")}function a(t,e,...r){if(t.code===n.ENTER||t.code===n.SPACE){t.preventDefault();e(...r)}}function o(t,e,...r){if(t.code===n.ENTER){t.preventDefault();e(...r)}}function c(n=null){if(!n){n=document.activeElement}if(n&&n.shadowRoot&&n.shadowRoot.activeElement){n=n.shadowRoot.activeElement;return c(n)}return n}function i(n,t=[]){t.push(n);if(n.parentElement){n=n.parentElement;return i(n,t)}else if(n.parentNode&&n.parentNode.host){n=n.parentNode.host;return i(n,t)}return t}function u(){switch(true){case window.innerWidth<=e.MOBILE:return t.MOBILE;case window.innerWidth<=e.TABLET:return t.TABLET;case window.innerWidth<=e.DESKTOP:return t.DESKTOP;default:return t.DESKTOP_WIDE}}function f(n){try{return JSON.parse(n)}catch(n){return false}}function l(n){const t="avatar-C";const e=19;const r=Math.ceil(2**31-1)*parseFloat(`0.${n}`);let s=Math.ceil(e*(r%1));if(s===0){s=1}return`${t}${s.toString().padStart(2,"0")}`}function d(n,t){var e;return n.contains(t)||!!((e=n.shadowRoot)===null||e===void 0?void 0:e.contains(t))}function w(n){if(n.parentNode===n.shadowRoot){return n.shadowRoot.host}return n.parentElement}function h(n){let t=w(n);while(t&&t!==n.ownerDocument.documentElement){const n=window.getComputedStyle(t);const{overflow:e,overflowX:r,overflowY:s}=n;const a=e==="hidden"||s==="hidden"||r==="hidden";const o=t.scrollHeight>t.clientHeight&&e!=="visible"&&s!=="visible"||t.scrollWidth>t.clientWidth&&e!=="visible"&&r!=="visible";if(!a&&o){return t}t=w(t)}return n.ownerDocument.documentElement}function v(n,t){const e=n.getBoundingClientRect();const r=n.ownerDocument.documentElement.clientWidth;const s=n.ownerDocument.documentElement.clientHeight;const a=e.bottom>0&&e.top<s&&e.right>0&&e.left<r;if(t===n.ownerDocument.documentElement||t===n.ownerDocument.body){return a}const o=t.getBoundingClientRect();const c=e.bottom>o.top&&e.top<o.bottom&&e.right>o.left&&e.left<o.right;return c&&a}export{d as a,r as b,l as c,a as d,i as e,c as f,u as g,o as h,f as i,h as j,v as k,s as r};
|
|
2
|
+
//# sourceMappingURL=p-625e2cee.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["boolean","value","randomId","Math","random","toString","replace","handleKeyboardSubmit","ev","callback","args","code","KeyboardCode","ENTER","SPACE","preventDefault","handleEnterKeydSubmit","getClickedElement","elem","document","activeElement","shadowRoot","getElementTree","tree","push","parentElement","parentNode","host","getDevice","window","innerWidth","Breakpoints","MOBILE","Device","TABLET","DESKTOP","DESKTOP_WIDE","convertJson","data","JSON","parse","_a","colorFromId","id","prefix","colorsCount","seed","ceil","parseFloat","color","padStart","containsElement","ancestor","descendant","contains","getParentElement","element","findScrollableParent","parent","ownerDocument","documentElement","style","getComputedStyle","overflow","overflowX","overflowY","hasHiddenOverflow","isScrollable","scrollHeight","clientHeight","scrollWidth","clientWidth","isElementVisibleInContainer","container","elemRect","getBoundingClientRect","documentWidth","documentHeight","isVisibleInViewport","bottom","top","right","left","body","containerRect","isVisibleInContainer"],"sources":["src/utils/utils.ts"],"sourcesContent":["import {ChildNode} from \"@stencil/core\";\nimport {Device, KeyboardCode} from \"../beans/index\";\nimport {Breakpoints} from \"../constants/breakpoints\";\n\n/**\n * Return boolean value for passed value if a boolean corresponding value is found\n * Return passed value otherwise\n */\nexport function boolean(value: string | number | boolean): boolean | string | number {\n switch (value) {\n case true:\n case \"true\":\n case 1:\n case \"1\":\n case \"on\":\n case \"yes\":\n return true;\n case false:\n case \"false\":\n case 0:\n case \"0\":\n case \"off\":\n case \"no\":\n return false;\n default:\n return value;\n }\n}\n\nexport function retrieveAsset(assetName: string): string {\n return assetName && \"assets/images/png/\" + assetName;\n}\n\nexport function randomId(): string {\n return Math.random().toString(36).replace(\"0.\", \"\");\n}\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function handleKeyboardSubmit(ev: KeyboardEvent, callback: (...args) => void, ...args: any[]): void {\n if (ev.code === KeyboardCode.ENTER || ev.code === KeyboardCode.SPACE) {\n ev.preventDefault();\n callback(...args);\n }\n}\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function handleEnterKeydSubmit(ev: KeyboardEvent, callback: (...args) => void, ...args: any[]): void {\n if (ev.code === KeyboardCode.ENTER) {\n ev.preventDefault();\n callback(...args);\n }\n}\n\nexport function getClickedElement(elem: null | Element = null): null | Element {\n if (!elem) {\n elem = document.activeElement;\n }\n\n if (elem && elem.shadowRoot && elem.shadowRoot.activeElement) {\n elem = elem.shadowRoot.activeElement;\n\n return getClickedElement(elem);\n }\n\n return elem;\n}\n\nexport function getElementTree(elem: Element, tree: Element[] = []): null | Element[] {\n tree.push(elem);\n\n if (elem.parentElement) {\n elem = elem.parentElement;\n\n return getElementTree(elem, tree);\n } else if (elem.parentNode && (elem.parentNode as ShadowRoot).host) {\n elem = (elem.parentNode as ShadowRoot).host;\n\n return getElementTree(elem, tree);\n }\n\n return tree;\n}\n\nexport function getSiblings(elem: HTMLElement): ChildNode[] {\n const siblings = [];\n if (!elem || !elem.parentNode || !elem.parentNode.childNodes) {\n return siblings;\n }\n\n elem.parentNode.childNodes.forEach((child) => {\n if (child.nodeType === 1 && child !== elem) {\n siblings.push(child);\n }\n });\n\n return siblings;\n}\n\n/**\n * Get the current device type based on the window width.\n * @returns {Device} - The current device type\n */\nexport function getDevice(): Device {\n switch (true) {\n case window.innerWidth <= Breakpoints.MOBILE:\n return Device.MOBILE;\n case window.innerWidth <= Breakpoints.TABLET:\n return Device.TABLET;\n case window.innerWidth <= Breakpoints.DESKTOP:\n return Device.DESKTOP;\n default:\n return Device.DESKTOP_WIDE;\n }\n}\n\ntype JSONValue = string | number | boolean | JSONObject | JSONArray;\ninterface JSONObject {\n [x: string]: JSONValue;\n}\ntype JSONArray = JSONValue[];\n\nexport function convertJson(data: string): JSONValue {\n try {\n return JSON.parse(data);\n } catch {\n return false;\n }\n}\n\nexport function colorFromId(id: number): string {\n const prefix = \"avatar-C\"; // prefix for color vars name\n const colorsCount = 19; // available colors\n const seed = Math.ceil(2 ** 31 - 1) * parseFloat(`0.${id}`);\n let color = Math.ceil(colorsCount * (seed % 1));\n\n // if result of mc is 0\n // es.: 3895229\n if (color === 0) {\n color = 1;\n }\n\n return `${prefix}${color.toString().padStart(2, \"0\")}`;\n}\n\n/**\n * Check if the passed CSS selector is valid.\n * @param selector CSS selector to validate\n */\nexport function isSelectorValid(selector: string): boolean {\n try {\n document.createDocumentFragment().querySelector(selector);\n\n return true;\n } catch {\n return false;\n }\n}\n\n/**\n * Check if an element contains another element, checking both light and shadow DOM.\n * @param ancestor Ancestor element\n * @param descendant Descendant element\n */\nexport function containsElement(ancestor: HTMLElement, descendant: Node): boolean {\n return ancestor.contains(descendant) || !!ancestor.shadowRoot?.contains(descendant);\n}\n\n/** Get the parent of passed element, accounting for shadow DOM.\n * @param element The element whose parent is to be found.\n */\nexport function getParentElement(element: Element): Element {\n if (element.parentNode === element.shadowRoot) {\n return element.shadowRoot.host;\n }\n\n return element.parentElement;\n}\n\n/**\n * Find the nearest ancestor of an element to take as a reference for positioning.\n * The chosen ancestor is the first to have an overflow set to hidden or is scrollable.\n * Falls back to the `offsetParent` of the element (the closest positioned ancestor, for example the one with `position: relative`).\n * @link https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/offsetParent\n */\nexport function findScrollableParent(element: HTMLElement): HTMLElement {\n let parent = getParentElement(element);\n\n while (parent && parent !== element.ownerDocument.documentElement) {\n const style = window.getComputedStyle(parent);\n const {overflow, overflowX, overflowY} = style;\n const hasHiddenOverflow = overflow === \"hidden\" || overflowY === \"hidden\" || overflowX === \"hidden\";\n const isScrollable =\n (parent.scrollHeight > parent.clientHeight && overflow !== \"visible\" && overflowY !== \"visible\") ||\n (parent.scrollWidth > parent.clientWidth && overflow !== \"visible\" && overflowX !== \"visible\");\n\n if (!hasHiddenOverflow && isScrollable) {\n return parent as HTMLElement;\n }\n\n parent = getParentElement(parent);\n }\n\n return element.ownerDocument.documentElement;\n}\n\n/**\n * Check if the element is visible within the container or in the viewport.\n * @param element The element to check.\n * @param container The container to check against, which must be the nearest scrollable ancestor.\n */\nexport function isElementVisibleInContainer(element: HTMLElement, container: HTMLElement): boolean {\n const elemRect = element.getBoundingClientRect();\n const documentWidth = element.ownerDocument.documentElement.clientWidth;\n const documentHeight = element.ownerDocument.documentElement.clientHeight;\n\n // Check if element is visible in viewport\n const isVisibleInViewport =\n elemRect.bottom > 0 && elemRect.top < documentHeight && elemRect.right > 0 && elemRect.left < documentWidth;\n\n // If container is the document element, only check viewport visibility\n if (container === element.ownerDocument.documentElement || container === element.ownerDocument.body) {\n return isVisibleInViewport;\n }\n\n // For other containers, check both container and viewport visibility\n const containerRect = container.getBoundingClientRect();\n const isVisibleInContainer =\n elemRect.bottom > containerRect.top &&\n elemRect.top < containerRect.bottom &&\n elemRect.right > containerRect.left &&\n elemRect.left < containerRect.right;\n\n return isVisibleInContainer && isVisibleInViewport;\n}\n"],"mappings":"wFAQgBA,EAAQC,GACtB,OAAQA,GACN,KAAK,KACL,IAAK,OACL,KAAK,EACL,IAAK,IACL,IAAK,KACL,IAAK,MACH,OAAO,KACT,KAAK,MACL,IAAK,QACL,KAAK,EACL,IAAK,IACL,IAAK,MACL,IAAK,KACH,OAAO,MACT,QACE,OAAOA,EAEb,C,SAMgBC,IACd,OAAOC,KAAKC,SAASC,SAAS,IAAIC,QAAQ,KAAM,GAClD,C,SAGgBC,EAAqBC,EAAmBC,KAAgCC,GACtF,GAAIF,EAAGG,OAASC,EAAaC,OAASL,EAAGG,OAASC,EAAaE,MAAO,CACpEN,EAAGO,iBACHN,KAAYC,E,CAEhB,C,SAGgBM,EAAsBR,EAAmBC,KAAgCC,GACvF,GAAIF,EAAGG,OAASC,EAAaC,MAAO,CAClCL,EAAGO,iBACHN,KAAYC,E,CAEhB,C,SAEgBO,EAAkBC,EAAuB,MACvD,IAAKA,EAAM,CACTA,EAAOC,SAASC,a,CAGlB,GAAIF,GAAQA,EAAKG,YAAcH,EAAKG,WAAWD,cAAe,CAC5DF,EAAOA,EAAKG,WAAWD,cAEvB,OAAOH,EAAkBC,E,CAG3B,OAAOA,CACT,C,SAEgBI,EAAeJ,EAAeK,EAAkB,IAC9DA,EAAKC,KAAKN,GAEV,GAAIA,EAAKO,cAAe,CACtBP,EAAOA,EAAKO,cAEZ,OAAOH,EAAeJ,EAAMK,E,MACvB,GAAIL,EAAKQ,YAAeR,EAAKQ,WAA0BC,KAAM,CAClET,EAAQA,EAAKQ,WAA0BC,KAEvC,OAAOL,EAAe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AAeR,IAAa,WAAaC,IAAc,UAEtF,IAAKE,GAAqBC,EAAc,CACtC,OAAOT,C,CAGTA,EAASH,EAAiBG,E,CAG5B,OAAOF,EAAQG,cAAcC,eAC/B,C,SAOgBY,EAA4BhB,EAAsBiB,GAChE,MAAMC,EAAWlB,EAAQmB,wBACzB,MAAMC,EAAgBpB,EAAQG,cAAcC,gBAAgBW,YAC5D,MAAMM,EAAiBrB,EAAQG,cAAcC,gBAAgBS,aAG7D,MAAMS,EACJJ,EAASK,OAAS,GAAKL,EAASM,IAAMH,GAAkBH,EAASO,MAAQ,GAAKP,EAASQ,KAAON,EAGhG,GAAIH,IAAcjB,EAAQG,cAAcC,iBAAmBa,IAAcjB,EAAQG,cAAcwB,KAAM,CACnG,OAAOL,C,CAIT,MAAMM,EAAgBX,EAAUE,wBAChC,MAAMU,EACJX,EAASK,OAASK,EAAcJ,KAChCN,EAASM,IAAMI,EAAcL,QAC7BL,EAASO,MAAQG,EAAcF,MAC/BR,EAASQ,KAAOE,EAAcH,MAEhC,OAAOI,GAAwBP,CACjC,Q","ignoreList":[]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{r as t,c as e,h as o,a as s,g as r}from"./p-75c4a726.js";import{P as i,g as n,p as a}from"./p-17af7fb2.js";import{a as h,j as c,g as f,k as p}from"./p-625e2cee.js";import"./p-5145a606.js";const u=':host{position:fixed;display:none;max-width:calc(100% - var(--grid-margin) * 2);max-height:calc(100% - var(--grid-margin) * 2);padding:var(--z-popover-padding, 0);background:var(--z-popover-theme--surface, var(--color-surface01));border-radius:var(--border-radius-small);color:var(--z-popover-theme--text, var(--color-default-text));fill:currentcolor;filter:var(--z-popover-shadow-filter, drop-shadow(0 1px 2px var(--shadow-color-base)));text-align:center}:host([open]:not([current-position])){visibility:hidden}:host([open][current-position]),:host([open="true"][current-position]){display:block}:host([center][current-position="top"]),:host([center][current-position="bottom"]){transform:translateX(-50%)}:host([center][current-position="right"]),:host([center][current-position="left"]){transform:translateY(-50%)}:host([current-position^="top"]){margin:0 0 var(--space-unit)}:host([current-position^="bottom"]){margin:var(--space-unit) 0 0}:host([current-position^="left"]){margin:0 var(--space-unit) 0 0}:host([current-position^="right"]){margin:0 0 0 var(--space-unit)}:host([current-position])::before{--arrow-size:6px;--arrow-edge-offset:calc(100% - var(--space-unit) - (var(--arrow-size) / 2));--arrow-center-x-offset:calc(50% - (var(--arrow-size) / 2));--arrow-center-y-offset:calc(100% - (var(--arrow-size) / 2));position:absolute;display:block;width:var(--arrow-size);height:var(--arrow-size);background:var(--z-popover-theme--surface, var(--color-surface01));content:"";transform:rotate(45deg)}:host([show-arrow="false"])::before,:host(:not([show-arrow]))::before{display:none}:host([current-position^="top"])::before{top:var(--arrow-center-y-offset)}:host([current-position^="bottom"])::before{bottom:var(--arrow-center-y-offset)}:host([current-position="top"])::before,:host([current-position="bottom"])::before{right:var(--arrow-edge-offset)}:host([current-position="right"])::before,:host([current-position="left"])::before{bottom:var(--arrow-edge-offset)}:host([current-position="right"])::before{right:var(--arrow-center-y-offset)}:host([current-position="left"])::before{left:var(--arrow-center-y-offset)}:host([current-position="top_right"])::before,:host([current-position="bottom_right"])::before{right:var(--arrow-edge-offset)}:host([current-position="top_left"])::before,:host([current-position="bottom_left"])::before{left:var(--arrow-edge-offset)}:host([current-position="right_top"])::before,:host([current-position="left_top"])::before{top:var(--arrow-edge-offset)}:host([current-position="right_top"])::before,:host([current-position="right_bottom"])::before{right:var(--arrow-center-y-offset)}:host([current-position="left_top"])::before,:host([current-position="left_bottom"])::before{left:var(--arrow-center-y-offset)}:host([current-position="right_bottom"])::before,:host([current-position="left_bottom"])::before{bottom:var(--arrow-edge-offset)}:host([center][current-position="top"])::before,:host([center][current-position="bottom"])::before{right:auto;left:var(--arrow-center-x-offset)}:host([center][current-position="right"])::before,:host([center][current-position="left"])::before{top:var(--arrow-center-x-offset);bottom:auto}';const l=u;const b=class{constructor(o){t(this,o);this.positionChange=e(this,"positionChange",7);this.openChange=e(this,"openChange",7);this.spaceTolerance=3;this.position=i.TOP;this.open=false;this.bindTo=undefined;this.showArrow=false;this.center=false;this.closable=true;this.currentPosition=undefined}closePopoverWithKeyboard(t){if(this.closable&&t.key===n.ESC){this.open=false}}handleOutsideClick(t){const e=t.target;if(!this.closable||!this.open||h(this.host,e)){return}if(h(this.boundElement,e)){t.stopPropagation()}this.open=false}validatePosition(t){if(!Object.values(i).includes(t)||t===i.AUTO){t=i.TOP;this.position=t}this.currentPosition=t;if(this.open){this.setPosition()}}onOpen(){cancelAnimationFrame(this.animationFrameRequestId);this.openChange.emit({open:this.open});if(!this.open){return}const t=()=>{if(!this.open){return}this.setPosition();this.animationFrameRequestId=requestAnimationFrame(t)};setTimeout((()=>{t()}),0)}onBindingChange(){this.findBoundElement()}get offsetModifier(){return this.center?.5:0}findBoundElement(){if(typeof this.bindTo==="string"){this.boundElement=this.host.ownerDocument.querySelector(this.bindTo)}else if(this.bindTo){this.boundElement=this.bindTo}else{this.boundElement=this.host.parentElement}}hasCenteredHorizontalSpace(t,e,o,s){const r=(o-s)*(1-this.offsetModifier);if(!this.center){return e>=r-this.spaceTolerance}return e>=r-this.spaceTolerance&&t>=r-this.spaceTolerance}hasCenteredVerticalSpace(t,e,o,s){const r=(o-s)*(1-this.offsetModifier);if(!this.center){return e>=r-this.spaceTolerance}return t>=r-this.spaceTolerance&&e>=r-this.spaceTolerance}hasEnoughSideSpace(t,e,o,s){return t>=e-o*(1-s)-this.spaceTolerance}getOptimalPopoverPosition(t,e){const o=this.host.offsetWidth;const s=this.host.offsetHeight;const r=this.boundElement.getBoundingClientRect().width;const n=this.boundElement.getBoundingClientRect().height;const a=this.offsetModifier;const h=t=>{switch(t){case i.TOP:return e.top>=s-this.spaceTolerance&&this.hasCenteredHorizontalSpace(e.left,e.right,o,r);case i.TOP_RIGHT:return e.top>=s&&this.hasEnoughSideSpace(e.right,o,r,a);case i.TOP_LEFT:return e.top>=s&&this.hasEnoughSideSpace(e.left,o,r,a);case i.RIGHT:return e.right>=o&&this.hasCenteredVerticalSpace(e.top,e.bottom,s,n);case i.RIGHT_BOTTOM:return e.right>=o&&this.hasEnoughSideSpace(e.bottom,s,n,a);case i.RIGHT_TOP:return e.right>=o&&this.hasEnoughSideSpace(e.top,s,n,a);case i.BOTTOM:return e.bottom>=s&&this.hasCenteredHorizontalSpace(e.left,e.right,o,r);case i.BOTTOM_LEFT:return e.bottom>=s&&this.hasEnoughSideSpace(e.left,o,r,a);case i.BOTTOM_RIGHT:return e.bottom>=s&&this.hasEnoughSideSpace(e.right,o,r,a);case i.LEFT:return e.left>=o&&this.hasCenteredVerticalSpace(e.top,e.bottom,s,n);case i.LEFT_TOP:return e.left>=o&&this.hasEnoughSideSpace(e.top,s,n,a);case i.LEFT_BOTTOM:return e.left>=o&&this.hasEnoughSideSpace(e.bottom,s,n,a);default:return false}};if(h(t)){return t}const c=b.positionOrder;const f=c.indexOf(t);if(f===-1){return t}for(let t=1;t<c.length;t++){const e=(f+t)%c.length;const o=c[e];if(h(o)){return o}}return this.findBestFallbackPosition(e)}findBestFallbackPosition(t){const e=t.right>=t.left?i.RIGHT:i.LEFT;const o=t.bottom>=t.top?i.BOTTOM:i.TOP;const s=Math.max(t.right,t.left);const r=Math.max(t.bottom,t.top);const n=r>=s?o:e;let a=false;if(n===o){const e=Math.min(t.right,t.left);a=s>=e*2}else{const e=Math.min(t.bottom,t.top);a=r>=e*2}if(!a){return n}const h=n===o?e:o;return`${n}_${h}`}calculateAvailableSpace(){const t=this.boundElement.getBoundingClientRect();if(this.lastBoundRect&&this.lastBoundRect.x===t.x&&this.lastBoundRect.y===t.y&&this.lastBoundRect.width===t.width&&this.lastBoundRect.height===t.height&&this.cachedAvailableSpace){return this.cachedAvailableSpace}this.lastBoundRect=t;const e=c(this.boundElement);const o=e.getBoundingClientRect();const s=e!==this.boundElement.ownerDocument.documentElement;const r=this.boundElement.ownerDocument.documentElement.clientWidth;const i=this.boundElement.ownerDocument.documentElement.clientHeight;const n=8;const a=s?o.top:0;const h=s?r-o.right:0;const f=s?i-o.bottom:0;const p=s?o.left:0;this.cachedAvailableSpace={top:t.top-a-n,right:r-t.right-h-n,bottom:i-t.bottom-f-n,left:t.left-p-n};return this.cachedAvailableSpace}calculateElementOffsets(t){const e=t.getBoundingClientRect();const o=t.ownerDocument.documentElement.clientWidth;const s=t.ownerDocument.documentElement.clientHeight;return{top:e.top,right:o-e.right,bottom:s-e.bottom,left:e.left}}applyPositionStyles(t,e){const o=this.boundElement.offsetWidth;const s=this.boundElement.offsetHeight;const r=8;const n=this.offsetModifier;const h=this.showArrow&&this.center?8:0;const c=this.host.style;const p=this.calculateElementOffsets(this.boundElement);let u;let l;switch(t){case i.TOP:case i.TOP_RIGHT:c.bottom=`${p.bottom+s}px`;c.left=`${p.left+o*n-(t===i.TOP_RIGHT?h:0)}px`;l=e.top-r;if(t===i.TOP_RIGHT){u=e.right+o*n}break;case i.TOP_LEFT:c.right=`${p.right+o*n-h}px`;c.bottom=`${p.bottom+s}px`;u=e.left+o*n;l=e.top-r;break;case i.BOTTOM:case i.BOTTOM_RIGHT:c.top=`${p.top+s}px`;c.left=`${p.left+o*n-(t===i.BOTTOM_RIGHT?h:0)}px`;l=e.bottom-r;if(t===i.BOTTOM_RIGHT){u=e.right+o*n}break;case i.BOTTOM_LEFT:c.top=`${p.top+s}px`;c.right=`${p.right+o*n-h}px`;u=e.left+o*n;l=e.bottom-r;break;case i.RIGHT:case i.RIGHT_BOTTOM:c.top=`${p.top+s*n-(t===i.RIGHT_BOTTOM?h:0)}px`;c.left=`${p.left+o}px`;u=e.right-r;if(t===i.RIGHT){l=e.top+e.bottom+s}else{l=e.bottom+s*n}break;case i.RIGHT_TOP:c.bottom=`${p.bottom+s*n-h}px`;c.left=`${p.left+o}px`;u=e.right-r;l=e.top+s*n;break;case i.LEFT:case i.LEFT_BOTTOM:c.top=`${p.top+s*n-(t===i.LEFT_BOTTOM?h:0)}px`;c.right=`${p.right+o}px`;u=e.left-r;if(t===i.LEFT_BOTTOM){l=e.bottom+s*n}break;case i.LEFT_TOP:c.right=`${p.right+o}px`;c.bottom=`${p.bottom+s*n-h}px`;u=e.left-r;l=e.top+s*n;break}if(f()!==a.MOBILE){c.maxWidth=u?`${u}px`:"";c.maxHeight=l?`${l}px`:""}}setPosition(){if(!this.boundElement){return}if(!p(this.boundElement,c(this.boundElement))){this.open=false;return}Object.assign(this.host.style,{top:"auto",right:"auto",bottom:"auto",left:"auto",maxWidth:"",maxHeight:"",visibility:"hidden"});const t=this.calculateAvailableSpace();const e=this.getOptimalPopoverPosition(this.position,t);this.applyPositionStyles(e,t);this.currentPosition=e;this.positionChange.emit({position:this.currentPosition});this.host.style.visibility="visible"}componentWillLoad(){this.validatePosition(this.position)}componentDidLoad(){this.findBoundElement();if(this.open){this.onOpen()}}disconnectedCallback(){cancelAnimationFrame(this.animationFrameRequestId)}render(){return o(s,{key:"1eafd1bd08aa31a81378354542b0e74edc4cb0ce","current-position":this.currentPosition},o("slot",{key:"2ad916cf0e13766e2e5f92f4f964a4fe909cdc7a"}))}get host(){return r(this)}static get watchers(){return{position:["validatePosition"],open:["onOpen"],bindTo:["onBindingChange"]}}};b.positionOrder=[i.TOP,i.TOP_RIGHT,i.TOP_LEFT,i.RIGHT,i.RIGHT_BOTTOM,i.RIGHT_TOP,i.BOTTOM,i.BOTTOM_LEFT,i.BOTTOM_RIGHT,i.LEFT,i.LEFT_TOP,i.LEFT_BOTTOM];b.style=l;export{b as z_popover};
|
|
2
|
+
//# sourceMappingURL=p-62e1d867.entry.js.map
|