@zanichelli/albe-web-components 12.4.0-RC → 12.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index-195ca522.js +10 -18
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/web-components-library.cjs.js +1 -1
- package/dist/cjs/z-app-header_11.cjs.entry.js +1077 -0
- package/dist/cjs/{z-button_6.cjs.entry.js → z-dragdrop-area_2.cjs.entry.js} +2 -259
- package/dist/cjs/z-file-upload.cjs.entry.js +189 -0
- package/dist/cjs/z-select.cjs.entry.js +3 -3
- package/dist/collection/components/file-upload/z-file-upload/index.js +3 -3
- package/dist/collection/components/inputs/z-select/index.js +2 -2
- package/dist/collection/components/inputs/z-select/styles.css +43 -5
- package/dist/esm/index-4968ce56.js +10 -18
- package/dist/esm/{index-df06f147.js → index-4d1853ea.js} +1 -1
- package/dist/esm/{index-e44342f3.js → index-fb19ca57.js} +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{utils-3d2372eb.js → utils-2a4ef29d.js} +1 -1
- package/dist/esm/web-components-library.js +1 -1
- package/dist/esm/z-app-header_11.entry.js +1063 -0
- package/dist/esm/z-book-card.entry.js +1 -1
- package/dist/esm/z-breadcrumb.entry.js +1 -1
- package/dist/esm/z-combobox.entry.js +1 -1
- package/dist/esm/{z-button_6.entry.js → z-dragdrop-area_2.entry.js} +5 -258
- package/dist/esm/z-file-upload.entry.js +185 -0
- 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-pocket_3.entry.js +1 -1
- package/dist/esm/z-select.entry.js +4 -4
- 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-deprecated.entry.js +2 -2
- package/dist/esm/z-table-header.entry.js +2 -2
- 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/beans/index.d.ts +1 -0
- package/dist/web-components-library/index.esm.js +1 -1
- package/dist/web-components-library/p-03b13390.entry.js +1 -0
- package/dist/web-components-library/{p-0495fb84.entry.js → p-100207d8.entry.js} +1 -1
- package/dist/web-components-library/p-3327e5f0.entry.js +1 -0
- package/dist/web-components-library/{p-6f281905.entry.js → p-485fd3db.entry.js} +1 -1
- package/dist/web-components-library/{p-29377b57.entry.js → p-5944a8f2.entry.js} +1 -1
- package/dist/web-components-library/p-5c63b09c.entry.js +1 -0
- package/dist/web-components-library/p-5d19e5ef.entry.js +1 -0
- package/dist/web-components-library/p-7907bdf7.entry.js +1 -0
- package/dist/web-components-library/p-8053b752.entry.js +1 -0
- package/dist/web-components-library/{p-d51d7b44.entry.js → p-8c31e60b.entry.js} +1 -1
- package/dist/web-components-library/{p-28b2868e.js → p-98badafc.js} +1 -1
- package/dist/web-components-library/p-9b0bcd43.entry.js +1 -0
- package/dist/web-components-library/{p-b921dc8d.js → p-a01baa71.js} +1 -1
- package/{www/build/p-76e7d402.entry.js → dist/web-components-library/p-a1663ab1.entry.js} +1 -1
- package/dist/web-components-library/{p-17d4f729.entry.js → p-cc009af8.entry.js} +1 -1
- package/dist/web-components-library/{p-d12d4dcd.js → p-cd561d69.js} +1 -1
- package/dist/web-components-library/p-ed42ceca.entry.js +1 -0
- package/dist/web-components-library/{p-b0f9cf23.entry.js → p-f3cc3f27.entry.js} +1 -1
- package/dist/web-components-library/{p-a6af3c1d.entry.js → p-f5bc7dda.entry.js} +1 -1
- package/dist/web-components-library/p-ff5a6e34.entry.js +1 -0
- package/dist/web-components-library/web-components-library.esm.js +1 -1
- package/package.json +1 -1
- package/www/build/index.esm.js +1 -1
- package/www/build/p-03b13390.entry.js +1 -0
- package/www/build/{p-0495fb84.entry.js → p-100207d8.entry.js} +1 -1
- package/www/build/p-21a94605.css +3 -0
- package/www/build/p-3327e5f0.entry.js +1 -0
- package/www/build/{p-6f281905.entry.js → p-485fd3db.entry.js} +1 -1
- package/www/build/{p-29377b57.entry.js → p-5944a8f2.entry.js} +1 -1
- package/www/build/p-5c63b09c.entry.js +1 -0
- package/www/build/p-5d19e5ef.entry.js +1 -0
- package/www/build/p-7907bdf7.entry.js +1 -0
- package/www/build/p-8053b752.entry.js +1 -0
- package/www/build/{p-d51d7b44.entry.js → p-8c31e60b.entry.js} +1 -1
- package/www/build/p-8c5fa7fd.js +1 -0
- package/www/build/{p-28b2868e.js → p-98badafc.js} +1 -1
- package/www/build/p-9b0bcd43.entry.js +1 -0
- package/www/build/{p-b921dc8d.js → p-a01baa71.js} +1 -1
- package/{dist/web-components-library/p-76e7d402.entry.js → www/build/p-a1663ab1.entry.js} +1 -1
- package/www/build/{p-17d4f729.entry.js → p-cc009af8.entry.js} +1 -1
- package/www/build/{p-d12d4dcd.js → p-cd561d69.js} +1 -1
- package/www/build/p-ed42ceca.entry.js +1 -0
- package/www/build/{p-b0f9cf23.entry.js → p-f3cc3f27.entry.js} +1 -1
- package/www/build/{p-a6af3c1d.entry.js → p-f5bc7dda.entry.js} +1 -1
- package/www/build/p-ff5a6e34.entry.js +1 -0
- package/www/build/web-components-library.esm.js +1 -1
- package/www/index.html +1 -10
- package/CHANGELOG.md +0 -2865
- package/dist/cjs/z-app-header.cjs.entry.js +0 -185
- package/dist/cjs/z-input_2.cjs.entry.js +0 -289
- package/dist/cjs/z-list_3.cjs.entry.js +0 -270
- package/dist/cjs/z-offcanvas_2.cjs.entry.js +0 -281
- package/dist/esm/z-app-header.entry.js +0 -181
- package/dist/esm/z-input_2.entry.js +0 -284
- package/dist/esm/z-list_3.entry.js +0 -264
- package/dist/esm/z-offcanvas_2.entry.js +0 -276
- package/dist/web-components-library/p-07854026.entry.js +0 -1
- package/dist/web-components-library/p-13762a32.entry.js +0 -1
- package/dist/web-components-library/p-1b342136.entry.js +0 -1
- package/dist/web-components-library/p-1c541078.entry.js +0 -1
- package/dist/web-components-library/p-207467d2.entry.js +0 -1
- package/dist/web-components-library/p-285ec5fc.entry.js +0 -1
- package/dist/web-components-library/p-29d45fe5.entry.js +0 -1
- package/dist/web-components-library/p-49d22e92.entry.js +0 -1
- package/dist/web-components-library/p-570e1a2e.entry.js +0 -1
- package/dist/web-components-library/p-8aaa0c34.entry.js +0 -1
- package/dist/web-components-library/p-d00d2e95.entry.js +0 -1
- package/src-react/index.ts +0 -1
- package/www/build/p-07854026.entry.js +0 -1
- package/www/build/p-13762a32.entry.js +0 -1
- package/www/build/p-1b342136.entry.js +0 -1
- package/www/build/p-1c541078.entry.js +0 -1
- package/www/build/p-207467d2.entry.js +0 -1
- package/www/build/p-285ec5fc.entry.js +0 -1
- package/www/build/p-29d45fe5.entry.js +0 -1
- package/www/build/p-49d22e92.entry.js +0 -1
- package/www/build/p-4a7a94e2.css +0 -1576
- package/www/build/p-570e1a2e.entry.js +0 -1
- package/www/build/p-8aaa0c34.entry.js +0 -1
- package/www/build/p-ce656c1c.js +0 -129
- package/www/build/p-d00d2e95.entry.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as i,h as e,g as r}from"./p-81006561.js";import{Y as o}from"./p-f976f29f.js";import{m as a}from"./p-b497e33e.js";import{r as s}from"./p-b921dc8d.js";const n=class{constructor(e){t(this,e),this.ribbonClick=i(this,"ribbonClick",7),this.isbnLabel="",this.isMobile=!1,this.hasResources=!1,this.showResources=!1}emitRibbonClick(){this.ribbonClick.emit()}componentWillLoad(){this.id=`id-${s()}`;const t=window.matchMedia(`(max-width: ${a}px)`);this.isMobile=t.matches,t.onchange=t=>this.isMobile=t.matches}componentDidLoad(){this.handleResources()}handleResources(){var t;this.variant===o.EXPANDED&&this.isMobile&&(this.hasResources=(null===(t=this.hostElement.querySelectorAll("[slot=resources]"))||void 0===t?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 e("div",{class:"wrapper"},this.renderCover(),e("div",{class:"content"},e("div",{class:"top"},e("div",{class:"info"},e("div",{class:"left"},this.renderAuthors(),this.renderOperaTitle(),this.renderVolumeTitle(),this.renderIsbn()),e("div",{class:"right"},this.renderHeaderCtaSlot())),this.renderTagsSlot()),e("div",{class:"bottom"},this.renderResourcesSlot())))}renderMobileExpandedCard(){return e("div",{class:"wrapper"},e("div",{class:"header"},this.renderOperaTitle(),this.renderHeaderCtaSlot()),this.renderCover(),e("div",{class:"content"},this.renderTagsSlot(),this.renderAuthors(),this.renderVolumeTitle(),this.renderIsbn()),this.hasResources&&e("div",{class:{footer:!0,open:this.showResources,close:!this.showResources}},!this.showResources&&this.renderShowResources(),this.renderResourcesSlot(),this.showResources&&this.renderShowResources()))}renderSearchCard(){return e("div",{class:"wrapper-container"},e("div",{class:"wrapper"},e("div",{class:"header"},this.renderOperaTitle(),this.renderHeaderCtaSlot()),this.renderCover(),e("div",{class:"content"},this.renderTagsSlot(),this.renderAuthors(),this.renderVolumeTitle(),this.renderIsbn())),this.renderFooterCtaSlot())}renderCompactCard(){return e("div",{class:"wrapper"},this.renderCover(),e("div",{class:"content"},this.renderAuthors(),this.renderOperaTitle(),this.renderVolumeTitle(),this.renderIsbn()),this.renderFooterCtaSlot())}renderCover(){return e("div",{class:"cover"},this.ribbon&&this.variant!==o.COMPACT&&this.renderRibbon(),e("div",{class:"img-wrapper"},e("img",{src:this.cover,onError:()=>{this.fallbackCover&&(this.cover=this.fallbackCover)},"aria-hidden":"true"})))}renderRibbon(){const t=[this.ribbonIcon&&e("z-icon",{name:this.ribbonIcon,width:16,height:16,fill:"color-icon03"}),e("span",null,this.ribbon)];return this.ribbonInteractive?e("button",{class:"ribbon interactive",onClick:()=>this.emitRibbonClick()},t):e("div",{class:"ribbon"},t)}renderOperaTitle(){return e("div",{class:"title",innerHTML:this.operaTitleTag?`<${this.operaTitleTag}>${this.operaTitle}</${this.operaTitleTag}>`:this.operaTitle})}renderVolumeTitle(){return this.volumeTitle?e("div",{class:"subtitle"},this.volumeTitle):null}renderAuthors(){return this.authors?e("div",{class:"authors","aria-description":"Autori"},this.authors):null}renderIsbn(){return this.isbn?e("div",{class:"isbn"},e("span",{class:"code","aria-description":`ISBN ${this.isbnLabel}`},this.isbn),this.isbnLabel?e("span",{class:"label"}," ",this.isbnLabel):null):null}renderShowResources(){return e("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",e("z-icon",{name:this.showResources?"chevron-up":"chevron-down"}))}renderTagsSlot(){return e("div",{class:"tags"},e("slot",{name:"tags"}))}renderHeaderCtaSlot(){return e("slot",{name:"header-cta"})}renderResourcesSlot(){return e("div",{id:`resources-${this.id}`,class:"resources"},e("slot",{name:"resources",onSlotchange:()=>this.handleResources()}))}renderFooterCtaSlot(){return e("div",{class:"action-container"},e("slot",{name:"footer-cta"}))}render(){return e("article",{class:{[this.variant]:!0,borderless:!!this.borderless}},this.renderCard())}get hostElement(){return r(this)}};n.style=':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-text04);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 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-text02);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-text02);font-size:var(--font-size-2);font-weight:var(--font-rg);line-height:1.4}:host>article div.authors{color:var(--color-text02);font-size:var(--font-size-1);font-weight:var(--font-rg);line-height:1.33}:host>article div.isbn{overflow:hidden;color:var(--color-text02);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-icon01)}: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-link-primary);cursor:pointer;fill:var(--color-link-primary);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}}';export{n as z_book_card}
|
|
1
|
+
import{r as t,c as i,h as e,g as r}from"./p-81006561.js";import{Y as a}from"./p-f976f29f.js";import{m as o}from"./p-b497e33e.js";import{r as s}from"./p-a01baa71.js";const n=class{constructor(e){t(this,e),this.ribbonClick=i(this,"ribbonClick",7),this.isbnLabel="",this.isMobile=!1,this.hasResources=!1,this.showResources=!1}emitRibbonClick(){this.ribbonClick.emit()}componentWillLoad(){this.id=`id-${s()}`;const t=window.matchMedia(`(max-width: ${o}px)`);this.isMobile=t.matches,t.onchange=t=>this.isMobile=t.matches}componentDidLoad(){this.handleResources()}handleResources(){var t;this.variant===a.EXPANDED&&this.isMobile&&(this.hasResources=(null===(t=this.hostElement.querySelectorAll("[slot=resources]"))||void 0===t?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 e("div",{class:"wrapper"},this.renderCover(),e("div",{class:"content"},e("div",{class:"top"},e("div",{class:"info"},e("div",{class:"left"},this.renderAuthors(),this.renderOperaTitle(),this.renderVolumeTitle(),this.renderIsbn()),e("div",{class:"right"},this.renderHeaderCtaSlot())),this.renderTagsSlot()),e("div",{class:"bottom"},this.renderResourcesSlot())))}renderMobileExpandedCard(){return e("div",{class:"wrapper"},e("div",{class:"header"},this.renderOperaTitle(),this.renderHeaderCtaSlot()),this.renderCover(),e("div",{class:"content"},this.renderTagsSlot(),this.renderAuthors(),this.renderVolumeTitle(),this.renderIsbn()),this.hasResources&&e("div",{class:{footer:!0,open:this.showResources,close:!this.showResources}},!this.showResources&&this.renderShowResources(),this.renderResourcesSlot(),this.showResources&&this.renderShowResources()))}renderSearchCard(){return e("div",{class:"wrapper-container"},e("div",{class:"wrapper"},e("div",{class:"header"},this.renderOperaTitle(),this.renderHeaderCtaSlot()),this.renderCover(),e("div",{class:"content"},this.renderTagsSlot(),this.renderAuthors(),this.renderVolumeTitle(),this.renderIsbn())),this.renderFooterCtaSlot())}renderCompactCard(){return e("div",{class:"wrapper"},this.renderCover(),e("div",{class:"content"},this.renderAuthors(),this.renderOperaTitle(),this.renderVolumeTitle(),this.renderIsbn()),this.renderFooterCtaSlot())}renderCover(){return e("div",{class:"cover"},this.ribbon&&this.variant!==a.COMPACT&&this.renderRibbon(),e("div",{class:"img-wrapper"},e("img",{src:this.cover,onError:()=>{this.fallbackCover&&(this.cover=this.fallbackCover)},"aria-hidden":"true"})))}renderRibbon(){const t=[this.ribbonIcon&&e("z-icon",{name:this.ribbonIcon,width:16,height:16,fill:"color-icon03"}),e("span",null,this.ribbon)];return this.ribbonInteractive?e("button",{class:"ribbon interactive",onClick:()=>this.emitRibbonClick()},t):e("div",{class:"ribbon"},t)}renderOperaTitle(){return e("div",{class:"title",innerHTML:this.operaTitleTag?`<${this.operaTitleTag}>${this.operaTitle}</${this.operaTitleTag}>`:this.operaTitle})}renderVolumeTitle(){return this.volumeTitle?e("div",{class:"subtitle"},this.volumeTitle):null}renderAuthors(){return this.authors?e("div",{class:"authors","aria-description":"Autori"},this.authors):null}renderIsbn(){return this.isbn?e("div",{class:"isbn"},e("span",{class:"code","aria-description":`ISBN ${this.isbnLabel}`},this.isbn),this.isbnLabel?e("span",{class:"label"}," ",this.isbnLabel):null):null}renderShowResources(){return e("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",e("z-icon",{name:this.showResources?"chevron-up":"chevron-down"}))}renderTagsSlot(){return e("div",{class:"tags"},e("slot",{name:"tags"}))}renderHeaderCtaSlot(){return e("slot",{name:"header-cta"})}renderResourcesSlot(){return e("div",{id:`resources-${this.id}`,class:"resources"},e("slot",{name:"resources",onSlotchange:()=>this.handleResources()}))}renderFooterCtaSlot(){return e("div",{class:"action-container"},e("slot",{name:"footer-cta"}))}render(){return e("article",{class:{[this.variant]:!0,borderless:!!this.borderless}},this.renderCard())}get hostElement(){return r(this)}};n.style=':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-text04);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 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-text02);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-text02);font-size:var(--font-size-2);font-weight:var(--font-rg);line-height:1.4}:host>article div.authors{color:var(--color-text02);font-size:var(--font-size-1);font-weight:var(--font-rg);line-height:1.33}:host>article div.isbn{overflow:hidden;color:var(--color-text02);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-icon01)}: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-link-primary);cursor:pointer;fill:var(--color-link-primary);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}}';export{n as z_book_card}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,h as i,H as n,g as o}from"./p-81006561.js";import{
|
|
1
|
+
import{r as t,h as i,H as n,g as o}from"./p-81006561.js";import{d as s,a as c}from"./p-a01baa71.js";import{T as e}from"./p-f976f29f.js";import"./p-b497e33e.js";const r=class{constructor(i){t(this,i),this.links=[],this.visible=!1,this.visibleLink=""}handleFocusOutSkipToContent(t){this.isInSkipToContent(t.target)&&(this.visible=!1)}handleFocusSkipToContent(t){this.isInSkipToContent(t.target)&&(this.visible=!0)}componentDidLoad(){this.showFirstChild()}componentWillRender(){this.links&&(this.links="string"==typeof this.links?JSON.parse(this.links):this.links)}isInSkipToContent(t){return!!s(t).find((t=>"z-skip-to-content"===t.nodeName.toLowerCase()))}showFirstChild(){var t;const i=null===(t=this.hostElement.children)||void 0===t?void 0:t[0];i&&(this.visibleLink=i.id)}handleLinkClick(){this.visible=!1}render(){return i(n,{class:{[this.variant]:!0,"skip-to-content-visible":this.visible}},this.links.map(((t,n)=>{const o=`skip-to-content-${n}`;return i("div",{class:"link-container"},i("a",{id:o,class:{"body-1-sb":!0,"z-link":!0,"z-link-underline":!0,"z-link-white":this.variant===e.DARK,"z-link-black":this.variant!==e.DARK,"link-visible":o==this.visibleLink,"link-invisible":o!=this.visibleLink},"aria-label":t.ariaLabel||t.label,href:t.href,onFocus:()=>this.visibleLink=o,onClick:()=>this.handleLinkClick(),onKeyUp:t=>c(t,this.handleLinkClick.bind(this))},t.label))})))}get hostElement(){return o(this)}};r.style=".sc-z-skip-to-content-h{position:absolute;left:-100%;height:60px;box-sizing:border-box;padding:calc(var(--space-unit) * 1.25) calc(var(--space-unit) * 3);background-color:#24f4ff;font-family:var(--font-family-sans);font-weight:var(--font-rg);text-align:center}.sc-z-skip-to-content-h>.link-container.sc-z-skip-to-content{display:inline-flex;height:100%;align-items:center}.skip-to-content-visible.sc-z-skip-to-content-h,.sc-z-skip-to-content-h:focus{position:static;display:block}.sc-z-skip-to-content-h>.link-container.sc-z-skip-to-content>a.z-link.link-invisible.sc-z-skip-to-content{overflow:hidden;width:0;height:0}.sc-z-skip-to-content-h>.link-container.sc-z-skip-to-content>a.z-link.link-visible.sc-z-skip-to-content{width:initial;height:initial}.dark.sc-z-skip-to-content-h{background-color:var(--color-surface05);color:var(--color-surface01)}.light.sc-z-skip-to-content-h{border:var(--border-size-medium) solid var(--color-surface05);background-color:var(--color-surface01);color:var(--color-text01)}@media (min-width: 768px){.sc-z-skip-to-content-h{text-align:start}}@media (min-width: 1152px){.sc-z-skip-to-content-h>.link-container.sc-z-skip-to-content{padding:0 calc(var(--space-unit) * 3);border-right:var(--border-size-small) solid var(--color-surface05)}.sc-z-skip-to-content-h>.link-container.sc-z-skip-to-content>a.z-link.link-invisible.sc-z-skip-to-content{overflow:initial;width:initial;height:initial}.sc-z-skip-to-content-h>.link-container.sc-z-skip-to-content:first-child{padding-left:0}.sc-z-skip-to-content-h>.link-container.sc-z-skip-to-content:last-child,.dark.sc-z-skip-to-content-h>.link-container.sc-z-skip-to-content:last-child,.light.sc-z-skip-to-content-h>.link-container.sc-z-skip-to-content:last-child{padding-right:0;border-right:none}.dark.sc-z-skip-to-content-h>.link-container.sc-z-skip-to-content{border-right:var(--border-size-small) solid var(--color-surface01)}}";export{r as z_skip_to_content}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as o,h as i,g as e}from"./p-81006561.js";import{g as n}from"./p-f976f29f.js";const r=class{constructor(i){t(this,i),this.fileDropped=o(this,"fileDropped",7)}fileDroppedHandler(t){this.fileDropped.emit(t)}renderOnDragOverMessage(){return i("div",{class:"dragover-container"},i("div",{class:"dragover-message"},i("span",{class:"body-2-sb"},this.dragAndDropLabel)))}render(){return i("div",{tabIndex:0,ref:t=>this.dragDropContainer=t,class:"dragdrop",onDragOver:t=>{t.preventDefault(),this.dragDropContainer.classList.add("dragover")},onDragLeave:()=>{this.dragDropContainer.classList.remove("dragover")},onDrop:t=>{t.preventDefault(),t.dataTransfer.files.length&&(this.dragDropContainer.classList.remove("dragover"),this.fileDroppedHandler(t.dataTransfer.files))}},this.renderOnDragOverMessage(),i("slot",null))}};r.style=":host{font-family:var(--font-family-sans);font-weight:var(--font-rg)}:host>.dragdrop{position:relative;display:flex;height:228px;flex-direction:column;padding:calc(var(--space-unit) * 2);border-color:var(--color-surface04);background-color:var(--color-surface02);background-image:url(\"data:image/svg+xml,%3csvg width='100%25' height='100%25' xmlns='http://www.w3.org/2000/svg'%3e%3crect width='100%25' height='100%25' fill='none' rx='2' ry='2' stroke='%23CACCCEFF' stroke-width='2' stroke-dasharray='15%2c 10%2c 14%2c 11' stroke-dashoffset='3' stroke-linecap='square'/%3e%3c/svg%3e\");border-radius:2px;color:var(--color-text01)}:host>.dragdrop.dragover *{pointer-events:none}:host>.dragdrop .dragover-container{position:absolute;z-index:10;top:0;left:0;display:none;width:100%;height:100%;background-color:var(--color-primary03);box-shadow:var(--shadow-focus-primary)}:host>.dragdrop .dragover-container .dragover-message{padding:10px 28px;background-color:var(--color-link-primary);color:var(--color-text04)}:host>.dragdrop.dragover .dragover-container{display:flex;align-items:center;justify-content:center}";var a=window.CustomEvent;function s(t,o){var i="on"+o.type.toLowerCase();return"function"==typeof t[i]&&t[i](o),t.dispatchEvent(o)}function d(t){for(;t;){if("dialog"===t.localName)return t;t=t.parentElement?t.parentElement:t.parentNode?t.parentNode.host:null}return null}function l(t){for(;t&&t.shadowRoot&&t.shadowRoot.activeElement;)t=t.shadowRoot.activeElement;t&&t.blur&&t!==document.body&&t.blur()}function c(t,o){for(var i=0;i<t.length;++i)if(t[i]===o)return!0;return!1}function h(t){return!(!t||!t.hasAttribute("method"))&&"dialog"===t.getAttribute("method").toLowerCase()}function u(t){var o=["button","input","keygen","select","textarea"].map((function(t){return t+":not([disabled])"}));o.push('[tabindex]:not([disabled]):not([tabindex=""])');var i=t.querySelector(o.join(", "));if(!i&&"attachShadow"in Element.prototype)for(var e=t.querySelectorAll("*"),n=0;n<e.length&&!(e[n].tagName&&e[n].shadowRoot&&(i=u(e[n].shadowRoot)));n++);return i}function m(t){return t.isConnected||document.body.contains(t)}function f(t){if(t.submitter)return t.submitter;var o=t.target;if(!(o instanceof HTMLFormElement))return null;var i=p.formSubmitter;if(!i){var e=t.target;i=("getRootNode"in e&&e.getRootNode()||document).activeElement}return i&&i.form===o?i:null}function v(t){if(!t.defaultPrevented){var o=t.target,i=p.imagemapUseValue,e=f(t);null===i&&e&&(i=e.value);var n=d(o);n&&"dialog"===(e&&e.getAttribute("formmethod")||o.getAttribute("method"))&&(t.preventDefault(),null!=i?n.close(i):n.close())}}function g(t){if(this.dialog_=t,this.replacedStyleTop_=!1,this.openAsModal_=!1,t.hasAttribute("role")||t.setAttribute("role","dialog"),t.show=this.show.bind(this),t.showModal=this.showModal.bind(this),t.close=this.close.bind(this),t.addEventListener("submit",v,!1),"returnValue"in t||(t.returnValue=""),"MutationObserver"in window)new MutationObserver(this.maybeHideModal.bind(this)).observe(t,{attributes:!0,attributeFilter:["open"]});else{var o,i=!1,e=function(){i?this.downgradeModal():this.maybeHideModal(),i=!1}.bind(this),n=function(n){if(n.target===t){var r="DOMNodeRemoved";i|=n.type.substr(0,r.length)===r,window.clearTimeout(o),o=window.setTimeout(e,0)}};["DOMAttrModified","DOMNodeRemoved","DOMNodeRemovedFromDocument"].forEach((function(o){t.addEventListener(o,n)}))}Object.defineProperty(t,"open",{set:this.setOpen.bind(this),get:t.hasAttribute.bind(t,"open")}),this.backdrop_=document.createElement("div"),this.backdrop_.className="backdrop",this.backdrop_.addEventListener("mouseup",this.backdropMouseEvent_.bind(this)),this.backdrop_.addEventListener("mousedown",this.backdropMouseEvent_.bind(this)),this.backdrop_.addEventListener("click",this.backdropMouseEvent_.bind(this))}a&&"object"!=typeof a||((a=function(t,o){o=o||{};var i=document.createEvent("CustomEvent");return i.initCustomEvent(t,!!o.bubbles,!!o.cancelable,o.detail||null),i}).prototype=window.Event.prototype),g.prototype={get dialog(){return this.dialog_},maybeHideModal:function(){this.dialog_.hasAttribute("open")&&m(this.dialog_)||this.downgradeModal()},downgradeModal:function(){this.openAsModal_&&(this.openAsModal_=!1,this.dialog_.style.zIndex="",this.replacedStyleTop_&&(this.dialog_.style.top="",this.replacedStyleTop_=!1),this.backdrop_.parentNode&&this.backdrop_.parentNode.removeChild(this.backdrop_),p.dm.removeDialog(this))},setOpen:function(t){t?this.dialog_.hasAttribute("open")||this.dialog_.setAttribute("open",""):(this.dialog_.removeAttribute("open"),this.maybeHideModal())},backdropMouseEvent_:function(t){if(this.dialog_.hasAttribute("tabindex"))this.dialog_.focus();else{var o=document.createElement("div");this.dialog_.insertBefore(o,this.dialog_.firstChild),o.tabIndex=-1,o.focus(),this.dialog_.removeChild(o)}var i=document.createEvent("MouseEvents");i.initMouseEvent(t.type,t.bubbles,t.cancelable,window,t.detail,t.screenX,t.screenY,t.clientX,t.clientY,t.ctrlKey,t.altKey,t.shiftKey,t.metaKey,t.button,t.relatedTarget),this.dialog_.dispatchEvent(i),t.stopPropagation()},focus_:function(){var t=this.dialog_.querySelector("[autofocus]:not([disabled])");!t&&this.dialog_.tabIndex>=0&&(t=this.dialog_),t||(t=u(this.dialog_)),l(document.activeElement),t&&t.focus()},updateZIndex:function(t,o){if(t<o)throw new Error("dialogZ should never be < backdropZ");this.dialog_.style.zIndex=t,this.backdrop_.style.zIndex=o},show:function(){this.dialog_.open||(this.setOpen(!0),this.focus_())},showModal:function(){if(this.dialog_.hasAttribute("open"))throw new Error("Failed to execute 'showModal' on dialog: The element is already open, and therefore cannot be opened modally.");if(!m(this.dialog_))throw new Error("Failed to execute 'showModal' on dialog: The element is not in a Document.");if(!p.dm.pushDialog(this))throw new Error("Failed to execute 'showModal' on dialog: There are too many open modal dialogs.");(function(t){for(;t&&t!==document.body;){var o=window.getComputedStyle(t),i=function(t,i){return!(void 0===o[t]||o[t]===i)};if(o.opacity<1||i("zIndex","auto")||i("transform","none")||i("mixBlendMode","normal")||i("filter","none")||i("perspective","none")||"isolate"===o.isolation||"fixed"===o.position||"touch"===o.webkitOverflowScrolling)return!0;t=t.parentElement}return!1})(this.dialog_.parentElement)&&console.warn("A dialog is being shown inside a stacking context. This may cause it to be unusable. For more information, see this link: https://github.com/GoogleChrome/dialog-polyfill/#stacking-context"),this.setOpen(!0),this.openAsModal_=!0,p.needsCentering(this.dialog_)?(p.reposition(this.dialog_),this.replacedStyleTop_=!0):this.replacedStyleTop_=!1,this.dialog_.parentNode.insertBefore(this.backdrop_,this.dialog_.nextSibling),this.focus_()},close:function(t){if(!this.dialog_.hasAttribute("open"))throw new Error("Failed to execute 'close' on dialog: The element does not have an 'open' attribute, and therefore cannot be closed.");this.setOpen(!1),void 0!==t&&(this.dialog_.returnValue=t);var o=new a("close",{bubbles:!1,cancelable:!1});s(this.dialog_,o)}};var p={reposition:function(t){var o=document.body.scrollTop||document.documentElement.scrollTop,i=o+(window.innerHeight-t.offsetHeight)/2;t.style.top=Math.max(o,i)+"px"},isInlinePositionSetByStylesheet:function(t){for(var o=0;o<document.styleSheets.length;++o){var i=document.styleSheets[o],e=null;try{e=i.cssRules}catch(t){}if(e)for(var n=0;n<e.length;++n){var r=e[n],a=null;try{a=document.querySelectorAll(r.selectorText)}catch(t){}if(a&&c(a,t)){var s=r.style.getPropertyValue("top"),d=r.style.getPropertyValue("bottom");if(s&&"auto"!==s||d&&"auto"!==d)return!0}}}return!1},needsCentering:function(t){return!("absolute"!==window.getComputedStyle(t).position||"auto"!==t.style.top&&""!==t.style.top||"auto"!==t.style.bottom&&""!==t.style.bottom||p.isInlinePositionSetByStylesheet(t))},forceRegisterDialog:function(t){if((window.HTMLDialogElement||t.showModal)&&console.warn("This browser already supports <dialog>, the polyfill may not work correctly",t),"dialog"!==t.localName)throw new Error("Failed to register dialog: The element is not a dialog.");new g(t)},registerDialog:function(t){t.showModal||p.forceRegisterDialog(t)},DialogManager:function(){this.pendingDialogStack=[];var t=this.checkDOM_.bind(this);this.overlay=document.createElement("div"),this.overlay.className="_dialog_overlay",this.overlay.addEventListener("click",function(o){this.forwardTab_=void 0,o.stopPropagation(),t([])}.bind(this)),this.handleKey_=this.handleKey_.bind(this),this.handleFocus_=this.handleFocus_.bind(this),this.zIndexLow_=1e5,this.zIndexHigh_=100150,this.forwardTab_=void 0,"MutationObserver"in window&&(this.mo_=new MutationObserver((function(o){var i=[];o.forEach((function(t){for(var o,e=0;o=t.removedNodes[e];++e)o instanceof Element&&("dialog"===o.localName&&i.push(o),i=i.concat(o.querySelectorAll("dialog")))})),i.length&&t(i)})))}};if(p.DialogManager.prototype.blockDocument=function(){document.documentElement.addEventListener("focus",this.handleFocus_,!0),document.addEventListener("keydown",this.handleKey_),this.mo_&&this.mo_.observe(document,{childList:!0,subtree:!0})},p.DialogManager.prototype.unblockDocument=function(){document.documentElement.removeEventListener("focus",this.handleFocus_,!0),document.removeEventListener("keydown",this.handleKey_),this.mo_&&this.mo_.disconnect()},p.DialogManager.prototype.updateStacking=function(){for(var t,o=this.zIndexHigh_,i=0;t=this.pendingDialogStack[i];++i)t.updateZIndex(--o,--o),0===i&&(this.overlay.style.zIndex=--o);var e=this.pendingDialogStack[0];e?(e.dialog.parentNode||document.body).appendChild(this.overlay):this.overlay.parentNode&&this.overlay.parentNode.removeChild(this.overlay)},p.DialogManager.prototype.containedByTopDialog_=function(t){for(;t=d(t);){for(var o,i=0;o=this.pendingDialogStack[i];++i)if(o.dialog===t)return 0===i;t=t.parentElement}return!1},p.DialogManager.prototype.handleFocus_=function(t){var o=t.composedPath?t.composedPath()[0]:t.target;if(!this.containedByTopDialog_(o)&&document.activeElement!==document.documentElement&&(t.preventDefault(),t.stopPropagation(),l(o),void 0!==this.forwardTab_)){var i=this.pendingDialogStack[0];return i.dialog.compareDocumentPosition(o)&Node.DOCUMENT_POSITION_PRECEDING&&(this.forwardTab_?i.focus_():o!==document.documentElement&&document.documentElement.focus()),!1}},p.DialogManager.prototype.handleKey_=function(t){if(this.forwardTab_=void 0,27===t.keyCode){t.preventDefault(),t.stopPropagation();var o=new a("cancel",{bubbles:!1,cancelable:!0}),i=this.pendingDialogStack[0];i&&s(i.dialog,o)&&i.dialog.close()}else 9===t.keyCode&&(this.forwardTab_=!t.shiftKey)},p.DialogManager.prototype.checkDOM_=function(t){this.pendingDialogStack.slice().forEach((function(o){-1!==t.indexOf(o.dialog)?o.downgradeModal():o.maybeHideModal()}))},p.DialogManager.prototype.pushDialog=function(t){return!(this.pendingDialogStack.length>=(this.zIndexHigh_-this.zIndexLow_)/2-1||(1===this.pendingDialogStack.unshift(t)&&this.blockDocument(),this.updateStacking(),0))},p.DialogManager.prototype.removeDialog=function(t){var o=this.pendingDialogStack.indexOf(t);-1!==o&&(this.pendingDialogStack.splice(o,1),0===this.pendingDialogStack.length&&this.unblockDocument(),this.updateStacking())},p.dm=new p.DialogManager,p.formSubmitter=null,p.imagemapUseValue=null,void 0===window.HTMLDialogElement){var b=document.createElement("form");if(b.setAttribute("method","dialog"),"dialog"!==b.method){var w=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"method");if(w){var y=w.get;w.get=function(){return h(this)?"dialog":y.call(this)};var x=w.set;w.set=function(t){return"string"==typeof t&&"dialog"===t.toLowerCase()?this.setAttribute("method",t):x.call(this,t)},Object.defineProperty(HTMLFormElement.prototype,"method",w)}}document.addEventListener("click",(function(t){if(p.formSubmitter=null,p.imagemapUseValue=null,!t.defaultPrevented){var o=t.target;if("composedPath"in t&&(o=t.composedPath().shift()||o),o&&h(o.form)){if(!("submit"===o.type&&["button","input"].indexOf(o.localName)>-1)){if("input"!==o.localName||"image"!==o.type)return;p.imagemapUseValue=t.offsetX+","+t.offsetY}d(o)&&(p.formSubmitter=o)}}}),!1),document.addEventListener("submit",(function(t){var o=t.target;if(!d(o)){var i=f(t);"dialog"===(i&&i.getAttribute("formmethod")||o.getAttribute("method"))&&t.preventDefault()}}));var k=HTMLFormElement.prototype.submit;HTMLFormElement.prototype.submit=function(){if(!h(this))return k.call(this);var t=d(this);t&&t.close()}}const M=':is(button, input, select, textarea, [contenteditable=""], [contenteditable="true"], a[href], [tabindex], summary):not([disabled], [disabled=""], [tabindex="-1"], [aria-hidden="true"], [hidden])',z=class{constructor(i){t(this,i),this.modalClose=o(this,"modalClose",7),this.modalHeaderActive=o(this,"modalHeaderActive",7),this.modalBackgroundClick=o(this,"modalBackgroundClick",7),this.closeButtonLabel="chiudi modale",this.alertdialog=!1,this.closable=!0,this.scrollInside=!0}emitModalClose(){this.closable&&this.modalClose.emit({modalid:this.modalid})}emitModalHeaderActive(){this.modalHeaderActive.emit({modalid:this.modalid})}emitBackgroundClick(){this.closable&&this.modalBackgroundClick.emit({modalid:this.modalid})}componentDidLoad(){"function"!=typeof HTMLDialogElement?(p.registerDialog(this.dialog),this.dialog.setAttribute("open","true")):this.open()}async open(){var t;null===(t=this.dialog)||void 0===t||t.showModal()}async close(){var t;this.closable&&(null===(t=this.dialog)||void 0===t||t.close())}get focusableElements(){return[...Array.from(this.host.shadowRoot.querySelectorAll(M)),...Array.from(this.host.querySelectorAll(M))].filter((t=>"none"!==getComputedStyle(t).display))}handleKeyDown(t){if(t.code!==n.TAB)return;const o=this.focusableElements,i=this.host.shadowRoot.activeElement,e=this.host.ownerDocument.activeElement,r=o[0],a=o[o.length-1];!t.shiftKey||i!=r&&e!=r?t.shiftKey||i!=a&&e!=a||(t.preventDefault(),r.focus()):(t.preventDefault(),a.focus())}closeButtonSlot(){if(this.closable)return i("slot",{name:"modalCloseButton"},i("button",{"aria-label":this.closeButtonLabel,onClick:()=>this.close()},i("z-icon",{name:"multiply-circle-filled"})))}handleEscape(t){this.closable||t.preventDefault()}render(){return i("dialog",{class:{"modal-dialog":!this.scrollInside},"aria-labelledby":"modal-title","aria-describedby":"modal-content",role:this.alertdialog?"alertdialog":void 0,ref:t=>this.dialog=t,onClose:()=>this.emitModalClose(),onCancel:t=>this.handleEscape(t)},i("div",{class:{"modal-container":!0,"modal-container-scroll-inside":this.scrollInside,"modal-container-scroll-outside":!this.scrollInside},id:this.modalid},i("header",{onClick:this.emitModalHeaderActive.bind(this)},i("div",null,this.modaltitle&&i("h1",{id:"modal-title"},this.modaltitle),this.closeButtonSlot()),this.modalsubtitle&&i("h2",{id:"modal-subtitle"},this.modalsubtitle)),i("div",{class:{"modal-content-scroll-inside":this.scrollInside,"modal-content-scroll-outside":!this.scrollInside},id:"modal-content"},i("slot",{name:"modalContent"}))),i("div",{class:{"modal-background":!0,"modal-background-scroll-outside":!this.scrollInside},"data-action":"modalBackground","data-modal":this.modalid,onClick:()=>{this.emitBackgroundClick(),this.close()}}))}get host(){return e(this)}};z.style=':host{font-family:var(--font-family-sans);font-weight:var(--font-rg)}:host>dialog{padding:0;border:none;margin:0;background-color:transparent}:host>dialog:modal{width:100%;max-width:100%;max-height:100%}:host>dialog::backdrop{display:none}:host>dialog+.backdrop{display:none}:host>dialog:not([open]){display:none}:host>dialog[open]{display:block}.modal-container{z-index:1010;display:flex;overflow:-moz-scrollbars-none;width:100%;height:100vh;flex-direction:column}.modal-container>.modal-content-scroll-outside{overflow:auto;background:var(--color-surface01)}.modal-container>header{padding:calc(var(--space-unit) * 2 - 2px) calc(var(--space-unit) * 2);background:var(--color-surface02)}.modal-container>header button{padding:0;border:none;margin:0;margin-left:auto;background:transparent;cursor:pointer}.modal-container>header z-icon{--z-icon-width:calc(var(--space-unit) * 2.5);--z-icon-height:calc(var(--space-unit) * 2.5);display:flex;fill:var(--color-icon01)}.modal-container>header>div{display:flex;width:100%;align-items:center;margin-right:calc(var(--space-unit) * 2)}.modal-container>header h1,.modal-container>header h2{padding:0;margin:0;color:var(--color-text01);font-weight:var(--font-rg)}.modal-container>header h1{font-size:var(--font-size-5);letter-spacing:0;line-height:1.4}.modal-container>header h2{font-size:var(--font-size-3);letter-spacing:0;line-height:1.5}.modal-container>header>div>h1 *:empty{display:none}.modal-container>header h1+h2{margin-top:calc(var(--space-unit) * 0.5)}.modal-container-scroll-inside>.modal-content-scroll-inside{overflow:hidden auto;flex:1 auto;background:var(--color-surface01)}.modal-container-scroll-inside>.modal-content-scroll-inside::-webkit-scrollbar,.modal-container-scroll-outside>.modal-content-scroll-outside::-webkit-scrollbar{width:10px;background:linear-gradient(to right, transparent 0 3px, var(--gray200) 3px 7px, transparent 7px 10px);border-radius:var(--border-radius)}.modal-container-scroll-inside>.modal-content-scroll-inside::-webkit-scrollbar-thumb,.modal-container-scroll-outside>.modal-content-scroll-outside::-webkit-scrollbar-thumb{width:10px;background-color:var(--color-primary01)}.modal-container-scroll-inside>.modal-content-scroll-inside::-webkit-scrollbar-thumb:hover,.modal-container-scroll-outside>.modal-content-scroll-outside::-webkit-scrollbar-thumb:hover{background-color:var(--color-hover-primary)}.modal-container-scroll-inside .modal-content-scroll-inside,.modal-container-scroll-outside .modal-content-scroll-outside{scrollbar-color:var(--color-primary01) transparent}@media only screen and (min-width: 768px){.modal-background{position:fixed;top:0;left:0;overflow:hidden;width:100vw;height:100vh;background-color:var(--gray900);opacity:0.7}.modal-background.modal-background-scroll-outside{position:sticky}.modal-container-scroll-inside{position:fixed;top:calc(var(--space-unit) * 6);left:50%;overflow:hidden;width:auto;min-width:calc(var(--space-unit) * 40);height:auto;min-height:calc(var(--space-unit) * 40);max-height:calc(100vh - calc(var(--space-unit) * 6 * 2));border-radius:var(--border-radius);transform:translateX(-50%)}.modal-container-scroll-outside{position:absolute;top:calc(var(--space-unit) * 6);left:50%;display:block;overflow:initial;width:auto;min-width:calc(var(--space-unit) * 40);height:auto;min-height:calc(var(--space-unit) * 40);max-height:calc(100vh - calc(var(--space-unit) * 6 * 2));transform:translateX(-50%)}.modal-container>.modal-content-scroll-outside{overflow:initial}.modal-container-scroll-outside>header,.modal-container-scroll-inside>header{border-top-left-radius:var(--border-radius);border-top-right-radius:var(--border-radius)}.modal-container-scroll-outside::after{display:block;height:calc(var(--space-unit) * 6);content:" "}.modal-dialog{position:fixed;top:0;left:0;height:auto;overflow-x:hidden;overflow-y:auto}.modal-content-scroll-outside{border-bottom-left-radius:var(--border-radius);border-bottom-right-radius:var(--border-radius)}.modal-dialog::-webkit-scrollbar{display:none}.modal-container>header z-icon{--z-icon-width:calc(var(--space-unit) * 3);--z-icon-height:calc(var(--space-unit) * 3)}}@media only screen and (min-width: 768px) and (max-width: 1151px){.modal-container>header{padding:calc(var(--space-unit) * 3 - 2px) calc(var(--space-unit) * 3)}}@media only screen and (min-width: 1152px){.modal-container>header{padding:calc(var(--space-unit) * 4 - 4px) calc(var(--space-unit) * 4)}.modal-container>header h1{font-size:var(--font-size-6);letter-spacing:0;line-height:1.33}.modal-container>header h2{font-size:var(--font-size-4);letter-spacing:0;line-height:1.5}.modal-container>header h1+h2{margin-top:0}}';export{r as z_dragdrop_area,z as z_modal}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e,c as t,h as s,g as i}from"./p-81006561.js";import{e as l,g as c,l as r,i as n}from"./p-f976f29f.js";import{r as a,b as o,d as h,a as p,e as z}from"./p-a01baa71.js";import"./p-b497e33e.js";const d=class{constructor(s){e(this,s),this.optionSelect=t(this,"optionSelect",7),this.resetSelect=t(this,"resetSelect",7),this.htmlid=`id-${a()}`,this.ariaLabel="",this.disabled=!1,this.readonly=!1,this.message=!0,this.autocomplete=!1,this.noresultslabel="Nessun risultato",this.isfixed=!1,this.size=l.BIG,this.isOpen=!1,this.selectedItem=null,this.itemsList=[],this.toggleSelectUl=this.toggleSelectUl.bind(this),this.selectItem=this.selectItem.bind(this),this.handleSelectFocus=this.handleSelectFocus.bind(this)}watchItems(){this.itemsList=this.getInitialItemsArray(),this.selectedItem=this.itemsList.find((e=>e.selected))}getFocusedItemHandler(e){this.focusedItemId=e.target.id}async getSelectedItem(){return this.selectedItem}async getValue(){return this.getSelectedValue()}async setValue(e){let t=[];"string"==typeof e?t.push(e):t=e,this.selectedItem=this.itemsList.find((e=>t.includes(e.id)))}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"string"==typeof this.items?JSON.parse(this.items):this.items}mapSelectedItemToItemsArray(){return this.getInitialItemsArray().map((e=>{var t;return e.selected=e.id===(null===(t=this.selectedItem)||void 0===t?void 0:t.id),e}))}getSelectedValue(){var e;return null===(e=this.selectedItem)||void 0===e?void 0:e.id}filterItems(e){const t=this.mapSelectedItemToItemsArray();this.itemsList=(null==e?void 0:e.length)?t.filter((t=>t.name.toUpperCase().includes(e.toUpperCase()))).map((t=>{const s=t.name.toUpperCase().indexOf(e.toUpperCase()),i=s+e.length,l=t.name.substring(0,s)+`<strong>${t.name.substring(s,i)}</strong>`+t.name.substring(i,t.name.length);return t.name=l,t})):t}hasAutocomplete(){return!0===o(this.autocomplete)}handleInputChange(e){this.searchString=e.detail.value,this.isOpen||this.toggleSelectUl()}selectItem(e,t){e&&e.disabled||(this.itemsList=this.mapSelectedItemToItemsArray(),this.itemsList=this.itemsList.map((s=>(s.selected=!1,s.id===(null==e?void 0:e.id)&&(s.selected=t),s))),this.selectedItem=this.itemsList.find((e=>e.selected)),this.emitOptionSelect(),this.searchString&&(this.searchString=null))}arrowsSelectNav(e,t){const s=this.resetItem&&!!this.selectedItem;if(![c.ARROW_DOWN,c.ARROW_UP].includes(e.key))return;let i;e.preventDefault(),e.stopPropagation(),this.isOpen||this.toggleSelectUl(),this.resetItem&&(e.key===c.ARROW_DOWN?i=t+1===this.itemsList.length+1?+!s:t+1:e.key===c.ARROW_UP&&(i=t<=+!s?this.itemsList.length:t-1)),this.resetItem||(e.key===c.ARROW_DOWN?i=t+1===this.itemsList.length?0:t+1:e.key===c.ARROW_UP&&(i=t<=0?this.itemsList.length-1:t-1)),this.focusSelectItem(i)}focusSelectItem(e){const t=this.element.querySelector(`#${this.htmlid}_${e}`);t&&t.focus()}toggleSelectUl(e=!1){this.disabled||this.readonly||(this.isOpen?(document.removeEventListener("click",this.handleSelectFocus),document.removeEventListener("keyup",this.handleSelectFocus),e&&this.element.querySelector(`#${this.htmlid}_input`).focus()):(document.addEventListener("click",this.handleSelectFocus),document.addEventListener("keyup",this.handleSelectFocus)),this.focusedItemId="",this.isOpen=!this.isOpen)}handleInputClick(e){e.composedPath().find((e=>e.classList&&e.classList.contains("reset-icon")))?e.stopPropagation():this.toggleSelectUl()}handleSelectFocus(e){if(e instanceof KeyboardEvent&&e.key===c.ESC)return e.stopPropagation(),this.toggleSelectUl(!0);e instanceof KeyboardEvent&&e.key!==c.TAB&&e.key!==c.ENTER||h(z()).find((e=>"z-input"===e.nodeName.toLowerCase()&&e.id===`${this.htmlid}_input`))||this.toggleSelectUl(e instanceof MouseEvent)}scrollToLetter(e){const t=this.itemsList.find((t=>t.name.charAt(0)===e));t&&this.focusSelectItem(this.itemsList.indexOf(t))}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,"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:!1,disabled:this.disabled,readonly:this.readonly||!this.hasAutocomplete()&&this.isOpen,status:this.isOpen?void 0:this.status,role:"combobox",size:this.size,onClick:e=>{this.handleInputClick(e)},onKeyUp:e=>{13!==e.keyCode&&e.preventDefault(),p(e,this.toggleSelectUl)},onKeyDown:e=>this.arrowsSelectNav(e,this.selectedItem?this.itemsList.indexOf(this.selectedItem):this.resetItem?0:-1),onInputChange:e=>{this.handleInputChange(e)},onKeyPress:e=>{this.hasAutocomplete()||(e.preventDefault(),this.scrollToLetter(String.fromCharCode(e.keyCode)))}})}renderSelectUl(){return s("div",{class:this.isOpen?"open":"closed",tabindex:"-1"},s("div",{class:{"ul-scroll-wrapper":!0,fixed:this.isfixed},tabindex:"-1"},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":!1,size:this.listSizeType(),class:{disabled:this.disabled,readonly:this.readonly,filled:!!this.selectedItem,[`input-${this.status}`]:!this.isOpen&&!!this.status}},this.resetItem&&this.renderResetItem(),this.renderSelectUlItems())))}renderResetItem(){return s("z-list-element",{class:{hide:!this.selectedItem||!this.resetItem,"reset-item":!0,"reset-item-margin":!this.hasGroupItems},clickable:!0,disabled:!1,dividerType:r.ELEMENT,role:"option",tabindex:"0","aria-selected":"false",id:`${this.htmlid}_${this.resetItem?"0":"none"}`,size:this.listSizeType(),onClickItem:()=>{this.selectedItem=null,this.searchString=null,this.emitResetSelect()},onKeyDown:e=>this.arrowsSelectNav(e,0)},s("div",{class:"reset-item-content"},s("z-icon",{name:"multiply-circled"}),s("span",null,this.resetItem)))}renderItem(e,t,i){return s("z-list-element",{clickable:!e.disabled,disabled:e.disabled,dividerType:i?r.HEADER:r.ELEMENT,role:"option",tabindex:e.disabled||!this.isOpen?-1:0,"aria-selected":e.selected?"true":"false",id:`${this.htmlid}_${t}`,size:this.listSizeType(),onClickItem:()=>this.selectItem(e,!0),onKeyDown:e=>this.arrowsSelectNav(e,t)},s("div",{class:"list-element-container"},e.icon&&s("z-icon",{name:e.icon}),s("span",{class:{selected:!!e.selected,"list-element-content":!0},innerHTML:e.name})))}listSizeType(){return this.size===l.SMALL||this.size===l.X_SMALL?n.SMALL:n.MEDIUM}renderSelectUlItems(){return this.itemsList.length?this.hasGroupItems?this.renderSelectGroupItems():this.itemsList.map(((e,t,s)=>this.renderItem(e,this.resetItem?t+1:t,s.length===t+1))):this.renderNoSearchResults()}renderSelectGroupItems(){const e=this.itemsList.reduce(((e,t,s,i)=>{var l;const{category:c}=t,r=this.renderItem(t,this.resetItem?s+1:s,i.length===s+1);return e[c]=null!==(l=e[c])&&void 0!==l?l:[],e[c].push(r),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:"blue500",class:"no-results",size:this.listSizeType()},s("z-icon",{name:"multiply-circle",fill:"blue500"}),this.noresultslabel)}renderMessage(){if(!1!==o(this.message))return s("z-input-message",{message:!0===o(this.message)?void 0:this.message,status:this.status,class:this.size})}render(){return s("div",{class:"select-wrapper"},this.renderInput(),this.renderSelectUl(),this.renderMessage())}get element(){return i(this)}static get watchers(){return{items:["watchItems"]}}};d.style='.sc-z-select-h{display:inline-block;width:inherit;color:var(--color-text02);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>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;padding:calc(var(--space-unit) * 0.5) var(--space-unit);border:var(--border-size-small) solid var(--gray200);border-top:none;background:var(--color-surface01);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 .ul-scroll-wrapper.sc-z-select>z-list.sc-z-select{position:relative;overflow:auto;max-height:240px;padding:calc(var(--space-unit) * 0.5);outline:none;scrollbar-color:var(--color-primary01) transparent}.select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select>z-list.sc-z-select::-webkit-scrollbar{width:10px;background:linear-gradient(to right, transparent 0 3px, var(--gray200) 3px 7px, transparent 7px 10px);border-radius:var(--border-radius)}.select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select>z-list.sc-z-select::-webkit-scrollbar-track{background-color:transparent}.select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select>z-list.sc-z-select::-webkit-scrollbar-thumb{width:10px;background-color:var(--color-primary01);border-radius:var(--border-radius)}.select-wrapper.sc-z-select .ul-scroll-wrapper.sc-z-select>z-list.sc-z-select::-webkit-scrollbar-thumb:hover{background-color:var(--color-hover-primary)}.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-left:calc(var(--space-unit) * 1.5)}.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{display:block;padding:calc(var(--space-unit) * 0.5) 0}.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{display:block;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:bold}.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(--gray800)}.reset-item.sc-z-select{color:var(--color-primary01);fill:var(--color-primary01)}.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:calc(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}';export{d as z_select}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as i,c as t,h as s}from"./p-81006561.js";import{a}from"./p-a01baa71.js";import"./p-f976f29f.js";import"./p-b497e33e.js";const o=class{constructor(s){i(this,s),this.zListItemLinkClick=t(this,"zListItemLinkClick",7),this.zListItemClick=t(this,"zListItemClick",7),this.linktarget="_self",this.underlined=!0,this.emitZListItemLinkClick=this.emitZListItemLinkClick.bind(this),this.emitZListItemClick=this.emitZListItemClick.bind(this)}emitZListItemLinkClick(i,t){this.zListItemLinkClick.emit({e:i,linkId:t})}emitZListItemClick(i,t){this.zListItemClick.emit({e:i,listitemid:t})}render(){const i=this.listitemid?`link_${this.listitemid}`:"";return s("li",{role:"button",id:this.listitemid,"data-action":this.action,onClick:i=>this.emitZListItemClick(i,this.listitemid),onKeyPress:i=>a(i,this.emitZListItemClick,this.listitemid)},s("span",{class:this.underlined&&"border"},this.icon&&s("z-icon",{name:this.icon}),this.link?s("a",{href:this.link?this.link:null,target:this.linktarget,id:i,onClick:t=>this.emitZListItemLinkClick(t,i),onKeyPress:t=>a(t,this.emitZListItemLinkClick,i),role:this.link?"link":"button",tabindex:"0"},this.text):s("span",{innerHTML:this.text}),s("slot",null)))}};o.style=":host li{all:unset;all:reset;width:100%;line-height:14px;list-style-type:none}:host li>span{display:flex;padding:calc(var(--space-unit) * 2) 0;color:var(--color-text01);fill:var(--color-icon02);font-family:var(--font-family-sans);font-size:16px;font-weight:var(--font-rg);letter-spacing:0.23px;line-height:14px}:host(.small) li>span{padding:calc(var(--space-unit) * 1.5) 0;font-size:var(--font-size-2)}:host(.x-small) li>span{padding:var(--space-unit) 0;font-size:var(--font-size-2)}:host(.small) li>span>z-icon,:host(.x-small) li>span>z-icon{--z-icon-width:16px;--z-icon-height:16px;--z-icon-right-margin:calc(var(--space-unit) * 0.5);padding:0}:host li>span.border{border-bottom:2px solid var(--color-surface03)}:host li span:hover,a:hover{color:var(--color-primary01);fill:var(--color-primary01)}a,a:visited,a:active{color:inherit;fill:inherit;text-decoration:none}:host li span z-icon{width:calc(var(--space-unit) * 2);height:calc(var(--space-unit) * 2);padding:0 calc(var(--space-unit) * 1.5) 0 0;background-repeat:no-repeat;background-size:contain;color:var(--color-primary01);fill:var(--color-primary01)}";export{o as z_myz_list_item}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as i,h as e,H as a,g as n}from"./p-81006561.js";import{w as s,p as r,D as o}from"./p-f976f29f.js";import{g as l}from"./p-a01baa71.js";import"./p-b497e33e.js";const c=class{constructor(e){t(this,e),this.fileInput=i(this,"fileInput",7),this.type=s.DEFAULT,this.files=[],this.uploadBtnLabel="allega",this.dragAndDropLabel="Rilascia i file in questa area per allegarli.",this.inputAttributes={type:"file",id:"file-elem",multiple:!0}}removeFileListener(t){const i=this.files,e=i.find((i=>i.name===t.detail.fileName));if(e){const t=i.indexOf(e);t>=0&&(i.splice(t,1),this.files=[...i])}}fileDroppedListener(t){this.input.files=t.detail,this.fileInputHandler()}componentDidUpdate(){this.handleAccessibility(),this.invalidFiles.size&&this.errorModal.focus()}componentWillLoad(){this.invalidFiles=new Map}fileInputHandler(){this.input.files.length&&(this.invalidFiles=this.checkFiles(Array.from(this.input.files)))}async getFiles(){return this.files}getType(){return l()!==r.DESKTOP&&l()!==r.DESKTOP_WIDE?s.DEFAULT:this.type}handleAccessibility(){const t=this.el.querySelector("z-file:last-child z-chip button");this.files.length>0&&t?t.focus():this.getType()===s.DEFAULT?this.button.querySelector("button").focus():this.uploadLink.focus()}checkFiles(t){const i=new Map,e=`supera il limite di ${this.fileMaxSize}MB`;return t.forEach((t=>{const a=t.size/1024/1024,n=this.acceptedFormat.split(",").some((i=>t.name.toLowerCase().endsWith(i.trim()))),s=a<=this.fileMaxSize;s&&n?this.files.find((i=>i.name===t.name))||(this.files.push(t),this.fileInput.emit(t),this.input.value=""):(i.set(t.name,[]),s||i.get(t.name).push(e),n||i.get(t.name).push(" ha un'estensione non prevista"))})),i}renderTitle(){return e("span",{id:"title"},this.mainTitle)}renderDescription(t){return e("span",{class:t},this.description)}renderAllowedFileExtensions(){let t="",i="";return this.acceptedFormat&&(t=` nei formati ${this.acceptedFormat.split(", ").map((t=>t.substring(1).toUpperCase())).join(", ")}`),this.fileMaxSize&&(i=` per un massimo di ${this.fileMaxSize}MB di peso`),e("span",{class:"body-3"},t||i?`Puoi allegare file${t}${i}.`:null)}renderFileSection(){return e("section",{class:"files-container "+(this.files.length?"":"hidden")},e("span",{class:"heading-4-sb"},"File appena caricati"),e("div",{class:"files-wrapper"},e("slot",{name:"files"})),e("z-divider",{size:o.MEDIUM}))}renderInput(){return e("input",Object.assign({},this.inputAttributes,{onChange:()=>this.fileInputHandler(),accept:this.acceptedFormat,ref:t=>this.input=t}))}renderUploadButton(){return[this.renderInput(),e("z-button",{onClick:()=>this.input.click(),onKeyPress:t=>{"Space"!=t.code&&"Enter"!=t.code||(t.preventDefault(),this.input.click())},id:"fileSelect",variant:this.buttonVariant,icon:"upload",ref:t=>this.button=t},this.uploadBtnLabel)]}renderUploadLink(){return[this.renderInput(),e("span",{class:"body-1 upload-link-text"},"Trascina o"," ",e("span",{tabIndex:0,class:"body-1-sb upload-link",onClick:()=>this.input.click(),onKeyPress:t=>{"Space"!=t.code&&"Enter"!=t.code||(t.preventDefault(),this.input.click())},ref:t=>this.uploadLink=t},"carica")," ","dal tuo computer")]}renderDefaultMode(){return[this.renderDescription("body-3-sb"),this.renderAllowedFileExtensions(),this.renderFileSection(),this.renderUploadButton()]}renderDragDropMode(){return[this.renderFileSection(),e("z-dragdrop-area",{"drag-and-drop-label":this.dragAndDropLabel},e("div",{class:"text-container"},this.renderDescription("body-1"),this.renderUploadLink(),this.renderAllowedFileExtensions()))]}formatErrorString(t,i){var e,a;return`Il file ${t} ${null!==(e=i[0])&&void 0!==e?e:""}${i[0]&&i[1]?", ed ":""}${null!==(a=i[1])&&void 0!==a?a:""}.`}handleErrorModalContent(){return e("div",{slot:"modalContent"},e("div",{class:"modal-wrapper"},e("div",{class:"files"},Array.from(this.invalidFiles).map((([t,i])=>e("span",{class:"body-3"},this.formatErrorString(t,i)))))))}render(){return e(a,null,e("div",{tabIndex:0,class:`container ${this.getType()}`},this.mainTitle&&this.renderTitle(),this.getType()==s.DEFAULT?this.renderDefaultMode():this.renderDragDropMode()),!!this.invalidFiles.size&&e("z-modal",{modalid:`file-upload-${this.type}-error-modal`,tabIndex:0,ref:t=>this.errorModal=t,modaltitle:"Attenzione",onModalClose:()=>this.invalidFiles=new Map,onModalBackgroundClick:()=>this.invalidFiles=new Map},this.handleErrorModalContent()))}get el(){return n(this)}};c.style=':host{color:var(--color-text01);font-family:var(--font-family-sans);font-weight:var(--font-rg)}:host>.container{display:flex;flex-direction:column}:host .modal-wrapper{display:flex;align-items:center;justify-content:center;padding:calc(var(--space-unit) * 2)}:host .modal-wrapper>.files-wrapper{display:flex;flex-direction:column;margin:calc(var(--space-unit) * 4);gap:var(--space-unit)}:host .text-container{display:flex;flex-direction:column;margin:auto}:host .text-container .body-1{text-align:center}:host .text-container .upload-link{color:var(--color-link-primary);cursor:pointer}:host .text-container .upload-link-text{margin-bottom:var(--space-unit)}input#file-elem{display:none}#title{display:inline-block;margin:calc(var(--space-unit) * 2.5) 0 calc(var(--space-unit) * 4);font-size:calc(var(--space-unit) * 3);font-weight:var(--font-sb)}:host>.container>z-button{display:inline-block;margin-top:calc(var(--space-unit) * 3)}:host>.container>.files-container.hidden{display:none}:host>.container>.files-container>.heading-4-sb{display:inline-block;margin:calc(var(--space-unit) * 3) 0;font-size:calc(var(--space-unit) * 2);font-weight:var(--font-sb)}:host([type="dragdrop"])>.container>.files-container>.heading-4-sb{margin-top:0;margin-bottom:calc(var(--space-unit) * 3)}:host>.container>.files-container>.files-wrapper{display:flex;flex-wrap:wrap;column-gap:calc(var(--space-unit) * 2);row-gap:calc(var(--space-unit) * 2)}:host>.container>.files-container>z-divider{margin-top:calc(var(--space-unit) * 3);margin-bottom:0}:host([type="dragdrop"])>.container>.files-container>z-divider{margin:calc(var(--space-unit) * 3) 0}@media only screen and (min-width: 768px){:host>.container>z-button{align-self:flex-start}:host .modal-wrapper{padding:calc(var(--space-unit) * 3)}}@media only screen and (min-width: 1152px){:host .modal-wrapper{padding:calc(var(--space-unit) * 4)}}';export{c as z_file_upload}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as s,c as t,h as i,H as e}from"./p-81006561.js";import{r as c}from"./p-
|
|
1
|
+
import{r as s,c as t,h as i,H as e}from"./p-81006561.js";import{r as c}from"./p-a01baa71.js";import{k as l}from"./p-f976f29f.js";import"./p-b497e33e.js";const o=class{constructor(i){s(this,i),this.toggleClick=t(this,"toggleClick",7),this.disabled=!1,this.labelPosition=l.LEFT,this.checked=!1,this.htmlid=`toggle-switch-id-${c()}`}emitToggleClick(){this.toggleClick.emit({id:this.htmlid,checked:this.checked})}handleClick(s){this.disabled||(this.checked=s.target.checked,this.emitToggleClick())}render(){return i(e,null,i("input",{id:this.htmlid,type:"checkbox",checked:this.checked,disabled:this.disabled,onChange:this.handleClick.bind(this)}),i("label",{htmlFor:this.htmlid,class:{[this.labelPosition]:!0,disabled:this.disabled}},i("span",null,i("slot",null)),i("span",{class:{container:!0,disabled:this.disabled,checked:this.checked}},i("span",{class:"circle"},this.checked&&i("z-icon",{width:12,height:12,name:"checkmark"})))))}};o.style='.sc-z-toggle-switch-h{position:relative;display:inline-flex;font-family:var(--font-family-sans);font-weight:var(--font-rg)}label.sc-z-toggle-switch{display:flex;flex-direction:row;align-items:center;cursor:pointer}label.disabled.sc-z-toggle-switch{cursor:default}label.right.sc-z-toggle-switch{flex-direction:row-reverse}label.sc-z-toggle-switch>span.sc-z-toggle-switch:first-child{color:var(--color-text01);letter-spacing:0}label.left.sc-z-toggle-switch>span.sc-z-toggle-switch:first-child{margin-right:var(--space-unit)}label.right.sc-z-toggle-switch>span.sc-z-toggle-switch:first-child{margin-left:var(--space-unit)}label.sc-z-toggle-switch>span.container.sc-z-toggle-switch{position:relative;top:1px;left:1px;display:flex;width:calc(var(--space-unit) * 4);height:18px;align-items:center;background-color:var(--gray500);border-radius:var(--space-unit);color:var(--gray500);cursor:pointer}label.sc-z-toggle-switch>span.container.disabled.sc-z-toggle-switch,label.sc-z-toggle-switch>span.container.checked.disabled.sc-z-toggle-switch{background-color:var(--color-disabled01);cursor:default}label.sc-z-toggle-switch>span.container.checked.disabled.sc-z-toggle-switch>span.circle.sc-z-toggle-switch>z-icon.sc-z-toggle-switch{fill:var(--color-disabled01)}label.sc-z-toggle-switch>span.container.checked.sc-z-toggle-switch{background-color:var(--color-primary01);fill:var(--color-primary01)}input.sc-z-toggle-switch:focus:focus-visible+label.sc-z-toggle-switch>span.container.sc-z-toggle-switch:not(.disabled){box-shadow:var(--shadow-focus-primary);outline:none}input.sc-z-toggle-switch:focus:focus-visible+label.sc-z-toggle-switch>span.container.disabled.sc-z-toggle-switch{outline:none}label.sc-z-toggle-switch>span.container.sc-z-toggle-switch:not(.disabled):hover{background-color:var(--color-hover-primary);fill:var(--color-hover-primary)}label.sc-z-toggle-switch>span.container.sc-z-toggle-switch>span.circle.sc-z-toggle-switch{position:absolute;top:1px;left:1px;display:flex;width:calc(var(--space-unit) * 2);height:calc(var(--space-unit) * 2);align-items:center;justify-content:center;margin:0;background-color:var(--color-white);border-radius:7px;box-shadow:var(--shadow-1);transition:transform 0.3s ease}label.sc-z-toggle-switch>span.container.checked.sc-z-toggle-switch>span.circle.sc-z-toggle-switch{transform:translateX(calc(100% - 2px))}input[type="checkbox"].sc-z-toggle-switch{position:absolute;z-index:-1;opacity:0;pointer-events:none}';export{o as z_toggle_switch}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{p as e,b as a}from"./p-81006561.js";(()=>{const a=import.meta.url,t={};return""!==a&&(t.resourcesUrl=new URL(".",a).href),e(t)})().then((e=>a(JSON.parse('[["p-3327e5f0",[[1,"z-app-header",{"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"]]],[1,"z-searchbar",{"htmlid":[513],"preventSubmit":[4,"prevent-submit"],"value":[1],"placeholder":[1],"autocomplete":[4],"autocompleteMinChars":[2,"autocomplete-min-chars"],"resultsCount":[2,"results-count"],"resultsEllipsis":[4,"results-ellipsis"],"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]},[[4,"click","handleOutsideClick"]]],[6,"z-offcanvas",{"variant":[513],"open":[1540],"transitiondirection":[513],"skipLoadAnimation":[1028,"skip-load-animation"]}],[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],"isContextualMenu":[516,"is-contextual-menu"],"listElementPosition":[513,"list-element-position"],"listType":[513,"list-type"],"role":[513],"showInnerContent":[32]},[[4,"accessibleFocus","accessibleFocusHandler"]]],[1,"z-list",{"size":[513],"listType":[513,"list-type"],"role":[513]}],[1,"z-list-group",{"size":[513],"dividerType":[513,"divider-type"],"dividerSize":[513,"divider-size"],"dividerColor":[513,"divider-color"],"listType":[513,"list-type"]}],[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],"statusRole":[32]}],[2,"z-divider",{"size":[1],"color":[1],"orientation":[1]}],[6,"z-button",{"ariaLabel":[513,"aria-label"],"role":[1],"href":[1],"target":[1],"htmlid":[1],"name":[1],"disabled":[516],"type":[1],"variant":[513],"icon":[1],"size":[513]}],[1,"z-icon",{"name":[1],"height":[2],"width":[2],"iconid":[1],"fill":[1]}]]],["p-5d19e5ef",[[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"],"isfixed":[4],"resetItem":[1,"reset-item"],"size":[1],"isOpen":[32],"selectedItem":[32],"focusedItemId":[32],"searchString":[32],"getSelectedItem":[64],"getValue":[64],"setValue":[64]},[[0,"ariaDescendantFocus","getFocusedItemHandler"]]]]],["p-a1663ab1",[[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"]]]]],["p-ff5a6e34",[[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]},[[0,"inputCheck","inputCheckListener"]]]]],["p-e54d4ef9",[[1,"z-contextual-menu",{"elements":[1],"color":[1],"popoverPosition":[513,"popover-position"]}]]],["p-5338cc37",[[1,"z-myz-card-dictionary",{"name":[1],"cover":[1],"disabled":[4],"flipped":[1028],"flipbuttonlabel":[1],"hideinfobtn":[4]},[[0,"flipCard","handleFlipCard"]]]]],["p-8053b752",[[1,"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"],"files":[32],"invalidFiles":[32],"getFiles":[64]},[[0,"removeFile","removeFileListener"],[0,"fileDropped","fileDroppedListener"]]]]],["p-a862a070",[[1,"z-messages-pocket",{"pocketid":[1],"messages":[2],"status":[1025]},[[16,"pocketToggle","handlePocketToggle"]]]]],["p-c6e7991f",[[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"]]]]],["p-3636078a",[[4,"z-table-header-row",{"expandable":[516]}]]],["p-86758f78",[[4,"z-carousel",{"isLoading":[4,"is-loading"],"label":[1],"single":[4],"arrowsPosition":[1,"arrows-position"],"progressMode":[1,"progress-mode"],"ghostLoadingHeight":[2,"ghost-loading-height"],"current":[32],"items":[32],"highlightedIndicator":[32],"canNavigatePrev":[32],"canNavigateNext":[32]}]]],["p-a3587fd6",[[4,"z-date-picker",{"datePickerId":[1,"date-picker-id"],"ariaLabel":[1,"aria-label"],"label":[1],"mode":[1],"flatpickrPosition":[32],"inputError":[32]},[[18,"keydown","handleKeyDown"]]]]],["p-f4e2e76b",[[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-5f202970",[[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"]]]]],["p-100207d8",[[4,"z-table-deprecated",{"lines":[514],"errorMessage":[1,"error-message"],"bordered":[4],"callToActionLabel":[1,"call-to-action-label"],"callToActionTwoLabel":[1,"call-to-action-two-label"],"columnSticky":[4,"column-sticky"],"empty":[4],"error":[4],"errorLink":[1,"error-link"],"headerSticky":[4,"header-sticky"],"message":[1],"subtitle":[1],"hasTableBody":[32],"isMobile":[32]},[[9,"resize","handleResize"],[8,"orientationchange","handleOrientationChange"]]]]],["p-acb89afa",[[4,"z-table-row",{"expandedType":[513,"expanded-type"],"expanded":[32]}]]],["p-06c94384",[[1,"z-td",{"colspan":[2],"sticky":[516],"showMenu":[513,"show-menu"],"isMenuOpen":[32]}]]],["p-6a4403c6",[[1,"z-th",{"colspan":[2],"showMenu":[513,"show-menu"],"sticky":[516],"sortDirection":[1025,"sort-direction"],"popoverPosition":[1,"popover-position"],"isMenuOpen":[32]}]]],["p-49f4e9a0",[[4,"z-anchor-navigation",{"hideUnselected":[516,"hide-unselected"],"collapsed":[32]}]]],["p-2cb45213",[[1,"z-myz-card-alert",{"iconname":[1],"contenttext":[1],"actiontext":[1],"type":[1]}]]],["p-f5bc7dda",[[1,"z-myz-card-info",{"data":[1],"htmltabindex":[2],"hiddenContent":[32],"tooltip":[32]}]]],["p-50f78a81",[[1,"z-myz-list",{"inputrawdata":[1],"list":[1040]}]]],["p-035fbb3e",[[1,"z-otp",{"inputNum":[2,"input-num"],"status":[1],"message":[1]}]]],["p-fd58b7a2",[[1,"z-accordion",{"label":[1],"icon":[1],"size":[513],"isDisabled":[516,"is-disabled"],"open":[1540],"highlight":[516],"variant":[513],"shadow":[516]}]]],["p-485fd3db",[[1,"z-book-card",{"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-f5ae1514",[[1,"z-button-sort",{"buttonid":[1],"label":[1],"desclabel":[1],"counter":[2],"sortlabelasc":[1],"sortlabeldesc":[1],"isselected":[1028],"sortasc":[1028],"allowTooltip":[32]}]]],["p-b2527ca1",[[1,"z-card",{"variant":[513],"coverIcon":[1,"cover-icon"],"showShadow":[516,"show-shadow"],"clickable":[516],"hasCoverImage":[32]}]]],["p-de5688e9",[[1,"z-info-box",{"boxid":[1],"isclosable":[4]}]]],["p-392899e9",[[1,"z-info-reveal",{"icon":[1],"position":[513],"label":[1],"open":[32],"currentIndex":[32]}]]],["p-15a606ce",[[1,"z-link",{"htmlid":[1],"href":[1],"target":[1],"htmltabindex":[2],"isdisabled":[4],"isactive":[4],"iswhite":[4],"textcolor":[1],"icon":[1],"big":[516],"iconposition":[1],"underline":[4],"iconSize":[32]}]]],["p-33305cc8",[[1,"z-menu",{"active":[516],"floating":[516],"open":[1540],"verticalContext":[516,"vertical-context"],"hasHeader":[32],"hasContent":[32]},[[4,"click","handleClick"]]]]],["p-f14105c6",[[1,"z-menu-section",{"active":[516],"open":[32],"hasContent":[32]},[[4,"click","handleClick"]]]]],["p-a50262e8",[[1,"z-myz-card-icon",{"icon":[1],"isdisabled":[4],"ariaLabel":[1,"aria-label"]}]]],["p-3bb2d909",[[0,"z-navigation-tab",{"ariaControls":[1,"aria-controls"],"tabId":[1,"tab-id"],"selected":[1540],"disabled":[516],"orientation":[513],"size":[513],"icon":[1],"label":[1],"htmlTitle":[1,"html-title"]},[[0,"click","onClick"]]]]],["p-5c177ba5",[[0,"z-navigation-tab-link",{"ariaControls":[1,"aria-controls"],"tabId":[1,"tab-id"],"selected":[1540],"disabled":[516],"orientation":[513],"size":[513],"htmlTitle":[1,"html-title"],"target":[1],"href":[1],"icon":[1],"label":[1]},[[0,"click","onClick"]]]]],["p-e7c6d651",[[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"]]]]],["p-9ff2fc8e",[[1,"z-notification",{"contenticonname":[1],"actiontext":[1],"type":[513],"showclose":[4],"showshadow":[516],"sticky":[516]}]]],["p-decbd59d",[[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-ffde06d1",[[1,"z-pocket-message"]]],["p-94afe4dd",[[1,"z-section-title",{"dividerPosition":[1,"divider-position"],"uppercase":[516]}]]],["p-cc009af8",[[1,"z-slideshow",{"slideshowid":[1],"data":[1],"device":[32],"currentSlide":[32]}]]],["p-138bc87e",[[6,"z-tag",{"icon":[1],"expandable":[4]}]]],["p-4d0d5d93",[[1,"z-toast-notification",{"heading":[1],"message":[1],"closebutton":[4],"autoclose":[2],"pauseonfocusloss":[4],"type":[1],"isdraggable":[4],"draggablepercentage":[2],"transition":[1],"percentage":[32]}]]],["p-dd4fc386",[[1,"z-toggle-button",{"label":[1],"isdisabled":[4],"avoidclick":[4],"opened":[1028],"ariaLabel":[1,"aria-label"]}]]],["p-8c31e60b",[[6,"z-toggle-switch",{"disabled":[516],"labelPosition":[513,"label-position"],"checked":[1028],"htmlid":[1]}]]],["p-04b2ab0d",[[1,"z-tooltip",{"position":[513],"dark":[516],"open":[1540],"bindTo":[1,"bind-to"],"closable":[4]},[[0,"openChange","onPopoverOpenChange"]]]]],["p-ed42ceca",[[1,"z-tr",{"expandable":[516],"expanded":[32],"expandableContentId":[32]},[[0,"colspanchange","updateColumns"]]]]],["p-ca472d1c",[[4,"z-aria-alert",{"mode":[1]}]]],["p-f9873cb9",[[1,"z-avatar",{"size":[1],"text":[1],"textColor":[1,"text-color"],"backgroundColor":[1,"background-color"],"image":[1025]}]]],["p-98204840",[[1,"z-cover-hero",{"variant":[513],"contentPosition":[513,"content-position"],"preserveAspectRatio":[516,"preserve-aspect-ratio"]},[[2,"load","onImgLoad"]]]]],["p-39b7ad4f",[[1,"z-logo",{"width":[2],"height":[2],"imageAlt":[1,"image-alt"],"link":[1],"targetBlank":[4,"target-blank"],"mobileLogo":[4,"mobile-logo"]}]]],["p-01e2e8d4",[[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-96fc8078",[[1,"z-myz-card-footer-sections"]]],["p-9c1ed1e8",[[1,"z-myz-card-list",{"listdata":[1]}]]],["p-5944a8f2",[[2,"z-skip-to-content",{"variant":[513],"links":[1025],"visible":[32],"visibleLink":[32]},[[4,"focusout","handleFocusOutSkipToContent"],[4,"focusin","handleFocusSkipToContent"]]]]],["p-1d805413",[[1,"z-stepper"]]],["p-d2946762",[[1,"z-stepper-item",{"index":[2],"href":[1],"pressed":[4],"disabled":[4]}]]],["p-f3cc3f27",[[1,"z-table",{"bordered":[516],"expandable":[32]}]]],["p-f058316f",[[6,"z-table-body"]]],["p-29fa362c",[[1,"z-table-expanded-row",{"colSpan":[2,"col-span"]}]]],["p-61c00383",[[6,"z-table-footer"]]],["p-6ed0aaab",[[6,"z-table-head"]]],["p-a9d2edee",[[6,"z-table-sticky-footer"]]],["p-57c6d414",[[1,"z-tbody"]]],["p-376f2928",[[1,"z-tfoot",{"sticky":[516]}]]],["p-f8383e14",[[1,"z-thead",{"sticky":[516]}]]],["p-a48e5c46",[[1,"z-toast-notification-list",{"position":[513],"newestontop":[4]}]]],["p-1086a0fa",[[1,"z-visually-hidden"]]],["p-03b13390",[[1,"z-table-header",{"columnId":[1,"column-id"],"padding":[513],"sortable":[4],"showButton":[4,"show-button"],"defaultSortDirection":[1,"default-sort-direction"],"sortDirection":[1025,"sort-direction"]},[[18,"click","handleOutsideClick"],[18,"click","handleClickHeaders"]]]]],["p-8a45ae2a",[[1,"z-table-cell",{"showButton":[4,"show-button"],"padding":[513],"isMenuOpened":[32]}]]],["p-dc854830",[[6,"z-chip",{"icon":[1],"type":[513],"interactiveIcon":[513,"interactive-icon"],"disabled":[516],"ariaLabel":[1,"aria-label"]}]]],["p-f46fa177",[[1,"z-alert",{"type":[1]}]]],["p-19876b0d",[[1,"z-ghost-loading"]]],["p-a4502b1e",[[6,"z-table-empty-box",{"message":[1],"subtitle":[1]}]]],["p-5c63b09c",[[1,"z-modal",{"modalid":[1],"modaltitle":[1],"modalsubtitle":[1],"closeButtonLabel":[1,"close-button-label"],"alertdialog":[4],"closable":[4],"scrollInside":[4,"scroll-inside"],"open":[64],"close":[64]},[[0,"keydown","handleKeyDown"]]],[1,"z-dragdrop-area",{"dragAndDropLabel":[1,"drag-and-drop-label"]}]]],["p-7907bdf7",[[1,"z-myz-list-item",{"text":[1],"link":[1],"linktarget":[1],"icon":[1],"listitemid":[1],"action":[1],"underlined":[4]}]]],["p-9b0bcd43",[[1,"z-pocket",{"pocketid":[1],"status":[1025],"open":[64],"close":[64]},[[0,"pocketHeaderClick","handlePocketHeaderClick"],[0,"pocketHeaderPan","handlePocketHeaderPan"]]],[1,"z-pocket-body",{"pocketid":[1],"status":[1025]},[[16,"pocketToggle","handlePocketToggle"]]],[1,"z-pocket-header",{"pocketid":[1]}]]],["p-5d274fcc",[[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-5fd3ed9c",[[1,"z-popover",{"position":[513],"open":[1540],"bindTo":[1,"bind-to"],"showArrow":[516,"show-arrow"],"center":[516],"closable":[4],"currentPosition":[32]},[[8,"keyup","closePopoverWithKeyboard"],[18,"click","handleOutsideClick"]]]]]]'),e)));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as o,h as e,H as n,g as a}from"./p-81006561.js";import{r}from"./p-
|
|
1
|
+
import{r as t,c as o,h as e,H as n,g as a}from"./p-81006561.js";import{r}from"./p-a01baa71.js";import"./p-571b55dc.js";import"./p-9021c92a.js";const s=class{constructor(e){t(this,e),this.expand=o(this,"expand",7),this.expandable=!1,this.expanded=!1}updateColumns(){const t=Array.from(this.host.querySelectorAll("z-td, z-th"));this.expandable&&t.pop();const o=t.map((t=>t.colspan||1)).reduce(((t,o)=>t+o),0);if(this.host.style.setProperty("--columns",`${o}`),this.expandable){const o=t.pop();o.id=o.id||`z-tr-expandable-content-${r()}`,this.expandableContentId=o.id}}onRowClick(t){const o=t.target.closest(".prevent-expand");this.expandable&&!o&&(this.expanded=!this.expanded,this.expand.emit({expanded:this.expanded}))}componentWillLoad(){this.updateColumns()}render(){return e(n,{role:"row",onClick:this.onRowClick.bind(this),expanded:this.expanded},e("div",{class:"z-tr--expand-button-container"},this.expandable&&e("button",{"aria-expanded":this.expanded?"true":"false","aria-label":this.expanded?"Comprimi riga":"Espandi riga","aria-controls":this.expandableContentId,type:"button"},e("z-icon",{name:this.expanded?"minus-circled":"plus-circled"}))),e("slot",{onSlotchange:this.updateColumns.bind(this)}))}get host(){return a(this)}static get watchers(){return{expandable:["updateColumns"]}}};s.style=":host{--columns:1;display:grid;min-width:max-content;box-sizing:border-box;grid-auto-flow:column;grid-template-columns:var(--z-table--expand-button-size, 0) repeat(var(--columns), minmax(128px, 1fr))}*{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-surface02)}.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:focus{box-shadow:var(--shadow-focus-primary);outline:none}.z-tr--expand-button-container button z-icon{--z-icon-width:16px;--z-icon-height:16px}";export{s as Z}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as i,h as s,g as e}from"./p-81006561.js";import{q as o}from"./p-f976f29f.js";import{a}from"./p-a01baa71.js";import{h as r}from"./p-e43e61ac.js";import"./p-b497e33e.js";import"./p-112455b1.js";const n=class{constructor(s){t(this,s),this.pocketToggle=i(this,"pocketToggle",7),this.status=o.PREVIEW}async open(){this.status=o.OPEN}async close(){this.status=o.CLOSED}emitPocketToggle(t,i){this.pocketToggle.emit({id:t,status:i})}handlePocketHeaderClick(t){if(t.detail.id&&t.detail.id===this.pocketid)switch(this.status){case o.PREVIEW:case o.CLOSED:this.status=o.OPEN;break;case o.OPEN:this.status=o.CLOSED}}handlePocketHeaderPan(t){t.detail.id&&t.detail.id===this.pocketid&&("up"===t.detail.direction?this.status=o.OPEN:"down"===t.detail.direction&&(this.status=o.CLOSED))}watchStatusHandler(t){this.emitPocketToggle(this.pocketid,t)}componentWillLoad(){this.emitPocketToggle(this.pocketid,this.status)}handleBackgroundClick(t){"pocketBackground"==t.target.dataset.action&&this.close()}render(){return s("div",null,s("div",{"data-action":"pocketBackground","data-pocket":this.pocketid,class:`background ${this.status}`,onClick:t=>this.handleBackgroundClick(t)}),s("div",{id:this.pocketid,class:"content-wrapper"},s("div",null,s("slot",null))))}get hostElement(){return e(this)}static get watchers(){return{status:["watchStatusHandler"]}}};n.style=":host{width:inherit;height:100%;margin:inherit;font-family:var(--font-family-sans);font-weight:var(--font-rg)}:host>div{width:inherit;height:100%;margin:inherit}:host>div>div.background{position:fixed;z-index:998;top:0;right:0;bottom:0;left:0;width:0;height:0}:host>div>div.background.open{width:100%;height:100%}:host>div>div.content-wrapper{position:fixed;z-index:999;bottom:0;left:0;width:inherit;margin:inherit}:host>div>div.content-wrapper>div{margin:calc(var(--space-unit) * 0.5) calc(var(--space-unit) * 0.5) 0 calc(var(--space-unit) * 0.5);border-radius:var(--space-unit) var(--space-unit) 0 0;box-shadow:0 -2px calc(var(--space-unit) * 0.5) 0 rgb(66 69 72 / 40%)}";const h=class{constructor(i){t(this,i),this.status=o.PREVIEW}handlePocketToggle(t){t.detail.id&&t.detail.id===this.pocketid&&(this.status=t.detail.status)}render(){return s("main",{class:this.status},s("slot",null))}};h.style=":host{display:block;width:100%;box-sizing:border-box;font-family:var(--font-family-sans);font-weight:var(--font-rg)}:host>main{overflow:auto;border-right:var(--border-size-small) solid var(--color-surface03);border-left:var(--border-size-small) solid var(--color-surface03);background:var(--color-surface01);scrollbar-width:none}:host>main.preview{max-height:225px;transition:all 200ms ease-in-out, top 200ms ease-in-out}:host>main.open{max-height:calc(100vh - 48px);transition:all 200ms ease-in-out, top 200ms ease-in-out}:host>main.closed{height:0;transition:all 200ms ease-in-out, top 200ms ease-in-out}:host ::-webkit-scrollbar{width:0}@media only screen and (min-width: 768px){:host>main.preview{max-height:157px}}";const c=class{constructor(s){t(this,s),this.pocketHeaderClick=i(this,"pocketHeaderClick",7),this.pocketHeaderPan=i(this,"pocketHeaderPan",7),this.emitPocketHeaderClick=this.emitPocketHeaderClick.bind(this)}emitPocketHeaderClick(){this.pocketHeaderClick.emit({id:this.pocketid})}emitPocketHeaderPan(t){this.pocketHeaderPan.emit({id:this.pocketid,direction:t})}componentDidLoad(){const t=new r(this.swipeWrap);t.get("pan").set({direction:r.DIRECTION_VERTICAL}),t.on("panup",(()=>this.emitPocketHeaderPan("up"))),t.on("pandown",(()=>this.emitPocketHeaderPan("down")))}render(){return s("header",{role:"button",tabindex:0,onClick:()=>this.emitPocketHeaderClick(),onKeyPress:t=>a(t,this.emitPocketHeaderClick),ref:t=>this.swipeWrap=t},s("slot",null))}};c.style=":host{display:block;width:100%;box-sizing:border-box;font-family:var(--font-family-sans);font-weight:var(--font-rg)}:host>header{display:flex;height:36px;flex-flow:row nowrap;align-items:center;justify-content:center;border:var(--border-size-small) solid var(--color-surface03);background:var(--color-surface01);border-radius:var(--space-unit) var(--space-unit) 0 0;cursor:pointer}:host>header:focus{outline:none}:host>header::-moz-focus-inner{border:0}";export{n as z_pocket,h as z_pocket_body,c as z_pocket_header}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as a,p as t}from"./p-f976f29f.js";import{d as e,t as n,m as s}from"./p-b497e33e.js";function r(a){switch(a){case!0:case"true":case 1:case"1":case"on":case"yes":return!0;case!1:case"false":case 0:case"0":case"off":case"no":return!1;default:return a}}function c(){return Math.random().toString(36).replace("0.","")}function u(t,e,...n){t.code!==a.ENTER&&t.code!==a.SPACE||(t.preventDefault(),e(...n))}function o(t,e,...n){t.code===a.ENTER&&(t.preventDefault(),e(...n))}function f(a=null){return a||(a=document.activeElement),a&&a.shadowRoot&&a.shadowRoot.activeElement?f(a=a.shadowRoot.activeElement):a}function i(a,t=[]){return t.push(a),a.parentElement?i(a=a.parentElement,t):a.parentNode&&a.parentNode.host?i(a=a.parentNode.host,t):t}function d(){switch(!0){case window.innerWidth<=s:return t.MOBILE;case window.innerWidth<=n:return t.TABLET;case window.innerWidth<=e:return t.DESKTOP;default:return t.DESKTOP_WIDE}}function w(a){try{return JSON.parse(a)}catch(a){return!1}}function h(a){const t=Math.ceil(2**31-1)*parseFloat(`0.${a}`);let e=Math.ceil(t%1*19);return 0===e&&(e=1),`avatar-C${e.toString().padStart(2,"0")}`}export{
|
|
1
|
+
import{g as a,p as t}from"./p-f976f29f.js";import{d as e,t as n,m as s}from"./p-b497e33e.js";function r(a){switch(a){case!0:case"true":case 1:case"1":case"on":case"yes":return!0;case!1:case"false":case 0:case"0":case"off":case"no":return!1;default:return a}}function c(){return Math.random().toString(36).replace("0.","")}function u(t,e,...n){t.code!==a.ENTER&&t.code!==a.SPACE||(t.preventDefault(),e(...n))}function o(t,e,...n){t.code===a.ENTER&&(t.preventDefault(),e(...n))}function f(a=null){return a||(a=document.activeElement),a&&a.shadowRoot&&a.shadowRoot.activeElement?f(a=a.shadowRoot.activeElement):a}function i(a,t=[]){return t.push(a),a.parentElement?i(a=a.parentElement,t):a.parentNode&&a.parentNode.host?i(a=a.parentNode.host,t):t}function d(){switch(!0){case window.innerWidth<=s:return t.MOBILE;case window.innerWidth<=n:return t.TABLET;case window.innerWidth<=e:return t.DESKTOP;default:return t.DESKTOP_WIDE}}function w(a){try{return JSON.parse(a)}catch(a){return!1}}function h(a){const t=Math.ceil(2**31-1)*parseFloat(`0.${a}`);let e=Math.ceil(t%1*19);return 0===e&&(e=1),`avatar-C${e.toString().padStart(2,"0")}`}export{u as a,r as b,h as c,i as d,f as e,w as f,d as g,o as h,c as r}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as i,h as s,H as e,g as o}from"./p-81006561.js";import{V as h,W as r,p as
|
|
1
|
+
import{r as t,c as i,h as s,H as e,g as o}from"./p-81006561.js";import{V as h,W as r,p as a,P as n,g as l,i as p}from"./p-f976f29f.js";import{g as c,a as d}from"./p-a01baa71.js";import"./p-b497e33e.js";const u=class{constructor(s){t(this,s),this.clickOnNode=i(this,"clickOnNode",7),this.pathStyle=h.UNDERLINED,this.homepageVariant=r.ICON,this.maxNodesToShow=5,this.preventFollowUrl=!1,this.overflowMenuItemRows=0,this.truncateChar=30,this.hasOverflow=!1,this.popoverEllipsisOpen=!1,this.collapsedElements=[],this.currentIndex=0,this.truncatePosition=null}handleResize(){this.viewPortWidth=c(),this.viewPortWidth!==a.MOBILE&&this.wrapElement&&this.wrapElement.scrollWidth>this.wrapElement.clientWidth&&(this.hasOverflow=!0)}handlePropChange(){this.initializeBreadcrumb(this.viewPortWidth===a.MOBILE)}handleResizeUp(t,i){(t===a.MOBILE||i===a.MOBILE&&t===a.TABLET||i===a.MOBILE&&t===a.DESKTOP||i===a.MOBILE&&t===a.DESKTOP_WIDE||i===a.TABLET&&t===a.DESKTOP||i===a.TABLET&&t===a.DESKTOP_WIDE||i===a.DESKTOP&&t===a.DESKTOP_WIDE)&&this.initializeBreadcrumb(this.viewPortWidth===a.MOBILE)}componentWillLoad(){this.viewPortWidth=c(),this.initializeBreadcrumb(this.viewPortWidth===a.MOBILE)}componentWillRender(){this.viewPortWidth!==a.MOBILE&&this.hasOverflow&&(this.checkEllipsisOrOverflowMenu(),this.hasOverflow=!1)}componentDidRender(){this.collapsedElementsRef&&(this.anchorElements=Array.from(this.hostElement.shadowRoot.querySelectorAll("z-list-group a"))),this.viewPortWidth!==a.MOBILE&&this.wrapElement.scrollWidth>this.wrapElement.clientWidth&&(this.hasOverflow=!0)}initializeBreadcrumb(t){this.pathsList=t?this.getPathsItemsList().filter((t=>!!t.path)):this.getPathsItemsList(),this.totalLenght=this.pathsList.length,this.homepageNode=this.pathsList.shift(),this.pathListCopy=JSON.parse(JSON.stringify(this.pathsList)),this.collapsedElements=[],this.totalLenght>this.maxNodesToShow&&(this.collapsedElements=this.pathsList.splice(0,this.pathsList.length-2))}checkEllipsisOrOverflowMenu(){if(this.pathListCopy.length>0)for(let t=0;t<this.pathsList.length;t++)if(this.pathsList[t].text.length>this.truncateChar){if(null!==this.truncatePosition){if(this.truncatePosition>0)return this.pathListCopy.splice(0,this.truncatePosition).forEach((t=>{this.collapsedElements.push(t)})),this.pathsList.splice(0,this.truncatePosition),void(this.truncatePosition=0);if(0===this.truncatePosition){const t=this.pathListCopy.splice(0,this.truncatePosition+1);return this.collapsedElements.push(...t),this.pathsList.splice(0,this.truncatePosition+1),void(this.truncatePosition=null)}}if(t!==this.pathsList.length-1){const i=this.truncateWithEllipsis(this.pathsList[t].text,this.truncateChar);return this.currentEllipsisText=this.pathsList[t].text,this.pathsList[t].text=i,this.pathsList[t].hasTooltip=!0,void(this.truncatePosition=t)}}}truncateWithEllipsis(t,i){return t.length>i?t.substring(0,i-1)+"…":t}getPathsItemsList(){return Array.from(this.hostElement.children).map((t=>({text:t.textContent,path:t.href,hasTooltip:!1})))}renderMobileBreadcrumb(){return s("nav",{"aria-label":"Breadcrumb",class:{underlined:this.pathStyle===h.UNDERLINED,semibold:this.pathStyle===h.SEMIBOLD}},s("ol",null,this.renderNode(this.pathsList[this.pathsList.length-1],!0)))}renderHomepageNode(t){return s("li",null,s("a",{class:{"homepage-icon":this.homepageVariant===r.ICON,"homepage-text":this.homepageVariant===r.TEXT},href:t.path,onClick:i=>this.handlePreventFollowUrl(i,t)},this.homepageVariant===r.ICON?s("z-icon",{name:"home",fill:"color-link-primary",height:16,width:16}):"Home"))}renderNode(t,i){return s("li",null,t.hasTooltip&&s("z-popover",{class:"full-path-tooltip","bind-to":this.triggerEllipsis,open:this.popoverEllipsisOpen,position:n.BOTTOM_RIGHT,closable:!1,showArrow:!0},s("span",{class:"tooltip-content"},this.currentEllipsisText)),s("a",{class:{"missing-path":!t.path,"text-ellipsis":i},ref:t=>this.triggerEllipsis=t,"aria-current":t.path?void 0:"page",href:t.path,onClick:i=>this.handlePreventFollowUrl(i,t),onMouseOver:()=>{t.hasTooltip&&(this.popoverEllipsisOpen=!0)},onMouseLeave:()=>{t.hasTooltip&&(this.popoverEllipsisOpen=!1)},innerHTML:i?`<z-icon fill="color-link-primary" name="chevron-left"></z-icon>${t.text}`:t.text}))}renderBreadcrumb(){return s("nav",{ref:t=>this.wrapElement=t,"aria-label":"Breadcrumb",class:{underlined:this.pathStyle===h.UNDERLINED,semibold:this.pathStyle===h.SEMIBOLD}},s("ol",null,this.renderHomepageNode(this.homepageNode),this.collapsedElements.length?this.renderOverflowMenu():"",this.pathsList.map((t=>this.renderNode(t,!1)))))}togglePopover(){this.collapsedElementsRef.open||(this.collapsedElementsRef.open=!0)}handlePreventFollowUrl(t,i){this.preventFollowUrl&&(t.preventDefault(),this.clickOnNode.emit(i.path))}handleOverflowMenuAccessibility(t){const i=this.anchorElements.length;t.key!==l.TAB?(t.stopPropagation(),[l.ARROW_DOWN,l.ARROW_UP].includes(t.key)&&(t.preventDefault(),t.key===l.ARROW_DOWN&&(this.currentIndex=i===this.currentIndex+1?0:this.currentIndex+1),t.key===l.ARROW_UP&&(this.currentIndex=this.currentIndex<=0?i-1:this.currentIndex-1),this.anchorElements[this.currentIndex].focus()),t.key===l.ESC&&this.triggerButton.focus()):t.preventDefault()}renderOverflowMenu(){if(this.collapsedElements.length)return s("li",null,s("z-popover",{class:"hidden-paths-popover",ref:t=>this.collapsedElementsRef=t,"bind-to":this.triggerButton,position:n.BOTTOM_RIGHT,closable:!0,showArrow:!0},s("div",{class:"popover-content"},s("z-list",null,s("z-list-group",{size:p.SMALL},this.collapsedElements.map(((t,i,e)=>s("div",null,s("z-list-element",{clickable:!0},s("a",{class:"text-ellipsis",href:t.path,onClick:i=>this.handlePreventFollowUrl(i,t),onKeyDown:t=>this.handleOverflowMenuAccessibility(t)},t.text)),i<e.length-1&&s("z-divider",{color:"color-surface03"})))))))),s("button",{"aria-label":"Mostra più breadcrumb","aria-haspopup":"true",ref:t=>this.triggerButton=t,class:"dots",onClick:()=>{this.togglePopover()},onKeyDown:t=>{d(t,this.togglePopover.bind(this)),setTimeout((()=>{this.anchorElements[0].focus()}),100)}},"..."))}render(){return s(e,{style:{"--line-clamp-popover":`${this.overflowMenuItemRows}`}},this.viewPortWidth===a.MOBILE?this.renderMobileBreadcrumb():this.renderBreadcrumb())}get hostElement(){return o(this)}static get watchers(){return{maxNodesToShow:["handlePropChange"],viewPortWidth:["handleResizeUp"]}}};u.style=':host{font-family:var(--font-family-sans);font-weight:var(--font-rg);--line-clamp-popover:0;--line-clamp-mobile:1}button{padding:0;border:none;margin:0;background-color:transparent}nav{display:flex;height:30px;align-items:center;padding-left:calc(var(--space-unit) / 2);overflow-x:hidden}li{display:flex;align-items:baseline}:host a:focus,:host button:focus{box-shadow:var(--shadow-focus-primary);outline:0}:host a{color:var(--color-link-primary);font-size:var(--font-size-2);text-decoration:none;white-space:nowrap}:host a.homepage-icon{display:list-item}:host a.homepage-text{display:initial;margin-top:calc(var(--space-unit) / 4);margin-right:var(--space-unit)}:host a.missing-path{color:var(--color-text01)}:host a.text-ellipsis{display:-webkit-box !important;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:var(--line-clamp-mobile);text-overflow:ellipsis;white-space:normal}:host ol{display:flex;padding:0;margin:0;list-style-type:none}:host ol>li:not(:first-child,:last-child){margin-right:var(--space-unit)}nav.underlined>ol>li a:not(.missing-path),nav.underlined>ol>li button{text-decoration:underline}nav.semibold>ol>li a:not(.missing-path),nav.semibold>ol>li button{font-weight:var(--font-sb)}:host z-icon{margin-right:var(--space-unit);--z-icon-width:12px;--z-icon-height:12px}:host button.dots{display:inline-block;color:var(--color-link-primary);cursor:pointer}:host .hidden-paths-popover .popover-content{max-width:302px;padding:calc(var(--space-unit) / 2) var(--space-unit);text-align:left}:host .hidden-paths-popover .popover-content a{font-weight:var(--font-rg);text-decoration:none}:host .hidden-paths-popover{--z-popover-theme--surface:var(--color-surface02);--z-popover-padding:0}:host .hidden-paths-popover::before,.full-path-tooltip::before{--arrow-edge-offset:calc(100% - (var(--space-unit) * 2.55))}:host .full-path-tooltip{--z-popover-theme--surface:var(--color-surface05);--z-popover-theme--text:var(--color-text-inverse);--z-popover-padding:0}:host .tooltip-content{padding:0 var(--space-unit);font-size:var(--font-size-2)}@media (min-width: 768px){:host ol>li+li::before{display:inline-block;width:10px;height:10px;flex:1;margin-right:2px;color:var(--color-disabled03);content:"\\203A"}:host a.text-ellipsis{-webkit-line-clamp:var(--line-clamp-popover)}}';export{u as z_breadcrumb}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,h as e,g as i}from"./p-81006561.js";import{p as r}from"./p-f976f29f.js";import{
|
|
1
|
+
import{r as t,h as e,g as i}from"./p-81006561.js";import{p as r}from"./p-f976f29f.js";import{f as s,g as o,a as n}from"./p-a01baa71.js";import"./p-b497e33e.js";const a=class{constructor(e){t(this,e),this.currentSlide=0}watchData(){this.parseLinks()}componentWillLoad(){this.parseLinks(),this.setDevice(),window.addEventListener("resize",this.handleResize.bind(this))}componentDidRender(){this.setStyle()}handleResize(){this.setDevice(),this.setStyle()}parseLinks(){var t,e;switch(typeof this.data){case"string":{const i=null!==(t=s(this.data))&&void 0!==t?t:[];if(e=i,!Array.isArray(e)||!e.every((t=>"string"==typeof t)))throw new Error("Passed data is invalid");this.links=i;break}default:this.links=this.data}}setStyle(){const t=this.el.shadowRoot.querySelector("#slides");if(!t)return;const e=this.el.shadowRoot.querySelectorAll(".slide"),i=this.el.offsetWidth;t.style.width=i*this.links.length+"px",t.style.transform=`translate(-${i*this.currentSlide}px)`,e.forEach((t=>{t.querySelector("img").style.width=`${i}px`}))}setDevice(){this.device=o()}setCurrentSlide(t){this.currentSlide=t}getBulletDimension(){switch(this.device){case r.MOBILE:return 24;case r.TABLET:return 32;default:return 40}}renderSlides(t){return e("div",{id:"slides"},t.map(((t,i)=>e("div",{id:"slide"+i,class:`slide ${this.currentSlide!==i&&"hide"}`},e("img",{src:t})))))}renderScroll(t){let i=!1,r=this.currentSlide;return"left"===t?(i=0===this.currentSlide,r--):"right"===t&&(i=this.currentSlide===this.links.length-1,r++),e("z-icon",{class:`scroll ${t} ${i&&"disabled"}`,width:this.getBulletDimension(),height:this.getBulletDimension(),name:`chevron-${t}-circle`,onClick:()=>{!i&&this.setCurrentSlide(r)},onKeyUp:t=>!i&&n(t,(()=>{this.setCurrentSlide(r)})),tabindex:0,role:"button"})}renderSlideshowMain(){return e("main",null,this.renderScroll("left"),this.renderSlides(this.links),this.renderScroll("right"))}renderBullet(t){return e("a",{class:`bullet ${this.currentSlide===t&&"selected"}`,onClick:()=>this.setCurrentSlide(t),onKeyUp:e=>n(e,(()=>this.setCurrentSlide(t))),tabindex:0,role:"button"})}renderSlideshowFooter(){return e("footer",null,e("div",{class:"footer-left"},e("slot",{name:"footer-left"})),e("div",{class:"footer-center"},e("div",{class:"bullet-container"},Object.keys(this.links).map((t=>this.renderBullet(parseInt(t)))))),e("div",{class:"footer-right"},e("slot",{name:"footer-right"})))}render(){return this.links&&this.links.length?e("div",{id:this.slideshowid},this.renderSlideshowMain(),this.renderSlideshowFooter()):e("div",null)}get el(){return i(this)}static get watchers(){return{data:["watchData"]}}};a.style=':host{display:block;width:inherit;font-family:var(--font-family-sans);font-weight:var(--font-rg)}:host>div{display:flex;width:inherit;flex-direction:column}main{position:relative;overflow:hidden;width:100%}main z-icon.scroll{position:absolute;z-index:10;top:50%;width:auto;margin:0 var(--space-unit);cursor:pointer;fill:var(--color-primary01);transition:0.6s ease}main .scroll.disabled{opacity:0.5;pointer-events:none}main .scroll.right{right:0}#slides{display:flex;flex-wrap:wrap;line-height:0px;overflow-y:hidden;transition:all 300ms}footer{display:grid;width:100%;height:56px;align-items:center;border-top:var(--border-size-medium) solid var(--color-surface02);grid-template:2 / 2;grid-template-areas:"center center" "left right"}footer>div{width:100%;align-items:center}footer .footer-center{grid-area:center}footer .footer-left{grid-area:left}footer .footer-right{grid-area:right}footer .bullet-container{display:flex;min-height:60px;align-items:center;justify-content:center;margin:0 auto}footer .bullet-container .bullet{width:8px;height:8px;margin:var(--space-unit) 2px;background-color:var(--gray200);border-radius:50%;pointer-events:none}footer .bullet-container .bullet.selected{background-color:var(--gray400)}@media only screen and (min-width: 768px){footer{height:76px;border-top:var(--border-size-medium) solid var(--color-surface02);grid-template:1 / 1fr 2fr 1fr;grid-template-areas:"left center right"}footer .bullet-container .bullet{width:10px;height:10px;margin:var(--space-unit) 3px}}@media only screen and (min-width: 1025px){main z-icon.scroll{margin:0 10px}footer .bullet-container .bullet{width:16px;height:16px;margin:var(--space-unit) calc(var(--space-unit) * 0.5);cursor:pointer;pointer-events:auto}}';export{a as z_slideshow}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as s,h as i,H as a,g as o}from"./p-81006561.js";import{B as e,d as n,P as r}from"./p-f976f29f.js";import{
|
|
1
|
+
import{r as t,c as s,h as i,H as a,g as o}from"./p-81006561.js";import{B as e,d as n,P as r}from"./p-f976f29f.js";import{d as c}from"./p-a01baa71.js";const l=class{constructor(i){t(this,i),this.sort=s(this,"sort",7),this.padding="medium",this.defaultSortDirection="asc",this.sortDirection="none",this.emitOnSort=this.emitOnSort.bind(this)}emitOnSort(){this.sort.emit({columnId:this.columnId,sortDirection:this.sortDirection})}handleSort(){this.sortable&&(this.sortDirection=(()=>{switch(this.sortDirection){case"asc":return"desc";case"desc":return"asc";case"none":return this.defaultSortDirection;default:return"none"}})(),this.emitOnSort())}handleMenuClick(){this.popover.open=!this.popover.open}handleOutsideClick(t){!c(t.target).find((t=>"z-popover"===t.nodeName.toLowerCase()))&&this.popover&&(this.popover.open=!1)}handleClickHeaders(t){const s=t.target,i=c(s).find((t=>"z-table-header"===t.nodeName.toLowerCase()));this.sortable&&i&&i.attributes.getNamedItem("column-id").value!==this.columnId&&(s.parentNode.sortable||s.sortable)&&(this.sortDirection="none")}componentWillRender(){this.host.setAttribute("role","columnheader")}render(){return i(a,{class:{sortable:this.sortable},onClick:()=>this.handleSort()},i("div",{class:"container"},i("slot",null),this.sortable&&"none"!==this.sortDirection&&i("z-icon",{name:"asc"===this.sortDirection?"arrow-up":"arrow-down",class:"arrow"})),this.showButton&&i("div",{class:"popover-container"},i("z-button",{ref:t=>this.triggerButton=t,class:"contextual-popover-button",icon:"contextual-menu",variant:e.TERTIARY,size:n.X_SMALL,onClick:()=>this.handleMenuClick()}),i("z-popover",{ref:t=>this.popover=t,position:r.BOTTOM,center:!0,bindTo:this.triggerButton},i("div",null,i("slot",{name:"contextual-menu"})))))}get host(){return o(this)}};l.style=':host{position:relative;display:table-cell;border-bottom:var(--border-size-medium) solid var(--gray200);background-color:var(--gray50);font-family:var(--font-family-sans);font-weight:var(--font-sb);text-align:start}.container{display:flex;align-items:flex-end}:host(.sortable){cursor:pointer}:host([padding="x-small"]){padding:calc(var(--space-unit) * 0.5)}:host([padding="small"]){padding:calc(var(--space-unit))}:host([padding="medium"]){padding:calc(var(--space-unit) * 2)}:host([padding="large"]){padding:calc(var(--space-unit) * 2.5)}:host([padding="special"]){padding:0}.arrow{padding-left:var(--space-unit);opacity:1}.popover-container{position:absolute;top:var(--space-unit);right:var(--space-unit);display:none}.popover-container z-popover{--z-popover-theme--surface:var(--gray200);position:relative;z-index:1}.popover-container.visible{display:block}:host(:hover) .popover-container{display:block}';export{l as Z}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{Z as z_tr}from"./p-98badafc.js";import"./p-81006561.js";import"./p-a01baa71.js";import"./p-f976f29f.js";import"./p-b497e33e.js";import"./p-571b55dc.js";import"./p-9021c92a.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,h as e,H as
|
|
1
|
+
import{r as t,h as e,H as a,g as s}from"./p-81006561.js";import"./p-9508cd3e.js";import"./p-c298cb2f.js";import"./p-98badafc.js";import"./p-fde82dc3.js";import"./p-a01baa71.js";import"./p-f976f29f.js";import"./p-b497e33e.js";import"./p-571b55dc.js";import"./p-9021c92a.js";const o=class{constructor(e){t(this,e),this.bordered=!1,this.expandable=!1}updateExpandable(){this.expandable=this.host.querySelectorAll("z-tr[expandable]").length>0}componentWillLoad(){this.expandableMutationObserver=new MutationObserver((()=>{this.updateExpandable()})),this.expandableMutationObserver.observe(this.host,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["expandable"],attributeOldValue:!1})}disconnectedCallback(){this.expandableMutationObserver.disconnect()}render(){return e(a,{expandable:this.expandable},e("div",{class:"table",role:"table"},e("slot",null)))}get host(){return s(this)}};o.style=":host{--z-table--cells-padding:calc(var(--space-unit) * 2);position:relative;display:block;overflow:auto;max-width:100%;box-sizing:border-box;background-color:var(--color-surface01)}:host([expandable]){--z-table--expand-button-size:40px}:host([bordered]){--z-table--cell-left-border:1px solid var(--color-surface03)}.table{min-width:max-content}";export{o as z_table}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as i,c as t,h as n}from"./p-81006561.js";import{P as e}from"./p-f976f29f.js";import{
|
|
1
|
+
import{r as i,c as t,h as n}from"./p-81006561.js";import{P as e}from"./p-f976f29f.js";import{a as s}from"./p-a01baa71.js";import"./p-b497e33e.js";const o=class{constructor(n){i(this,n),this.flipCard=t(this,"flipCard",7),this.htmltabindex=0,this.hiddenContent=!1,this.tooltip=!1,this.emitFlipCard=this.emitFlipCard.bind(this)}emitFlipCard(i=!1){this.flipCard.emit(i)}componentWillLoad(){this.setStringOrArray()}componentWillUpdate(){this.setStringOrArray()}componentDidRender(){this.handleContentHeight()}handleContentHeight(){if(this.contentWrapper||this.infoWrapper){if(this.contentWrapper.scrollHeight>this.contentWrapper.offsetHeight||this.infoWrapper.scrollHeight>this.infoWrapper.offsetHeight)return this.infoWrapper.style.height=this.contentWrapper.offsetHeight-this.onlineLicenseWrapper.offsetHeight-this.offlineLicenseWrapper.offsetHeight+"px",void(this.hiddenContent=!0);this.hiddenContent=!1}else this.hiddenContent=!1}setStringOrArray(){this.cardData="string"==typeof this.data?JSON.parse(this.data):this.data}renderCloseIcon(){return n("z-icon",{name:"multiply-circled-filled",height:18,width:18,onClick:()=>this.emitFlipCard(!1),tabindex:this.htmltabindex,onKeyUp:i=>{s(i,this.emitFlipCard,!1)}})}renderGeneralSection(){var i,t;const e=null===(i=null==this?void 0:this.cardData)||void 0===i?void 0:i.title,s=null===(t=null==this?void 0:this.cardData)||void 0===t?void 0:t.description;return n("section",{class:"info-wrapper "+(this.hiddenContent?"hidden":""),onClick:()=>{this.hiddenContent&&(this.tooltip=!this.tooltip)},ref:i=>this.infoWrapper=i},this.renderAuthor(),this.renderYear(),e,n("br",null),s)}renderAuthor(){var i;const t=null===(i=null==this?void 0:this.cardData)||void 0===i?void 0:i.author;return t?n("span",null,"Autore: ",n("b",null,t),n("br",null)):null}renderYear(){var i;const t=null===(i=null==this?void 0:this.cardData)||void 0===i?void 0:i.year;return t?n("span",null,"Anno: ",n("b",null,t),n("br",null)):null}renderTooltip(){if(!this.tooltip)return;if(!this.cardData)return;const{title:i,year:t,author:s,description:o}=this.cardData;return n("z-popover",{position:e.RIGHT,onClick:()=>this.tooltip=!1},`${i} ${t} ${s} ${o}`)}setExpirationLicenseMessage(i){return"online"===i&&this.cardData.onlineLicense.expired||"offline"===i&&this.cardData.offlineLicense.expired?n("span",{class:"expired"},"SCADUTA"):"online"===i&&this.cardData.onlineLicense.expiring||"offline"===i&&this.cardData.offlineLicense.expiring?n("span",{class:"expiring"},"IN SCADENZA"):void 0}renderOnlineLicenseSection(){var i;if(null===(i=null==this?void 0:this.cardData)||void 0===i?void 0:i.onlineLicense)return n("section",{ref:i=>this.onlineLicenseWrapper=i},n("span",{class:"license-heading"},n("span",null,"Licenza online"),this.setExpirationLicenseMessage("online")),"Scadenza il ",n("b",null,this.cardData.onlineLicense.expiration),n("br",null))}renderOfflineLicenseSection(){var i;if(null===(i=null==this?void 0:this.cardData)||void 0===i?void 0:i.offlineLicense)return n("section",{ref:i=>this.offlineLicenseWrapper=i},n("span",{class:"license-heading"},n("span",null,"Licenza offline"),this.setExpirationLicenseMessage("offline")),"Scadenza il ",n("b",null,this.cardData.offlineLicense.expiration),n("br",null),"Installazioni disponibili: ",n("b",null,this.cardData.offlineLicense.installations))}render(){return n("div",null,this.renderCloseIcon(),n("div",{class:"content-wrapper",ref:i=>this.contentWrapper=i},this.renderGeneralSection(),this.renderTooltip(),this.renderOnlineLicenseSection(),this.renderOfflineLicenseSection()),n("div",{class:"cta-wrapper"},n("slot",null)))}};o.style=':host{width:100%;font-family:var(--font-family-sans);font-weight:var(--font-rg)}:host>div{position:relative;display:grid;width:calc(100% + calc(var(--space-unit) * 2));height:402px;box-sizing:border-box;padding:calc(var(--space-unit) * 2) calc(var(--space-unit) * 3);border:var(--border-size-small) solid var(--color-primary01);margin-left:calc(-1 * var(--space-unit));background:var(--color-surface01);border-radius:0;box-shadow:0 2px 4px 0 rgb(66 69 72 / 35%)}:host>div>z-icon{position:absolute;top:var(--space-unit);right:var(--space-unit);cursor:pointer;fill:var(--color-primary01)}:host>div>div.cta-wrapper{display:flex;flex-flow:column nowrap;align-self:end;justify-content:space-between}:host>div>div.content-wrapper{position:relative;overflow:hidden;align-self:stretch}:host>div>div.content-wrapper>section{box-sizing:border-box;padding:var(--space-unit) 0;border-bottom:var(--border-size-small) solid var(--color-surface04);color:var(--color-surface05);font-size:14px;line-height:20px}:host>div>div.content-wrapper>section:last-child{border-bottom:none}:host>div>div.content-wrapper>section.info-wrapper{position:relative;overflow:hidden;box-sizing:border-box}:host>div>div.content-wrapper>section.info-wrapper.hidden::after{position:absolute;top:0;right:0;bottom:0;left:0;background:linear-gradient(180deg, rgb(255 0 0 / 0%), rgb(255 0 0 / 0%) 60%, white);content:"";pointer-events:none}:host>div>div.content-wrapper>section>span.license-heading{display:flex;justify-content:space-between}:host>div>div.content-wrapper>section>span.license-heading>span.expired{color:var(--color-secondary02);font-size:12px;font-weight:600}:host>div>div.content-wrapper>section>span.license-heading>span.expiring{color:var(--color-warning01);font-size:12px;font-weight:600}:host>div>div.content-wrapper>z-popover{position:absolute;top:0;left:calc(var(--space-unit) * 4)}';export{o as z_myz_card_info}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as i,c as t,h as e}from"./p-81006561.js";import{e as s,I as o,K as r,l as a}from"./p-f976f29f.js";import{a as h}from"./p-a01baa71.js";import"./p-b497e33e.js";const d=class{constructor(e){i(this,e),this.comboboxChange=t(this,"comboboxChange",7),this.disabled=!1,this.hassearch=!1,this.noresultslabel="Nessun risultato",this.isopen=!1,this.isfixed=!1,this.closesearchtext="Chiudi",this.hascheckall=!1,this.checkalltext="Seleziona tutti",this.uncheckalltext="Deseleziona tutti",this.maxcheckableitems=0,this.size=s.BIG,this.renderItemsList=[],this.itemsList=[],this.inputType=o.TEXT,this.toggleComboBox=this.toggleComboBox.bind(this),this.closeFilterItems=this.closeFilterItems.bind(this)}watchItems(){this.itemsList="string"==typeof this.items?JSON.parse(this.items):this.items,this.selectedCounter=this.itemsList.filter((i=>i.checked)).length,this.updateRenderItemsList()}watchSearchValue(){this.filterItems(this.searchValue)}inputCheckListener(i){const t=i.detail.id.replace(`combo-checkbox-${this.inputid}-`,"");if("check-all"===t&&(!this.maxcheckableitems||this.maxcheckableitems>=this.itemsList.length))return this.checkAll(i.detail.checked);this.itemsList=this.itemsList.map((e=>(e.id===t&&(e.checked=i.detail.checked),e))),this.updateRenderItemsList(),this.emitComboboxChange()}emitComboboxChange(){this.comboboxChange.emit({id:this.inputid,items:this.itemsList})}componentWillLoad(){this.watchItems()}componentWillRender(){this.selectedCounter=this.itemsList.filter((i=>i.checked)).length}updateRenderItemsList(){this.searchValue?this.filterItems(this.searchValue):this.resetRenderItemsList()}resetRenderItemsList(){const i=[];this.itemsList.forEach((t=>{i.push(Object.assign({},t))})),this.renderItemsList=i}filterItems(i){if(!i)return this.closeFilterItems();this.resetRenderItemsList(),this.renderItemsList=this.renderItemsList.filter((t=>{const e=t.name.toUpperCase().indexOf(i.toUpperCase()),s=e+i.length,o=t.name.substring(0,e)+t.name.substring(e,s).bold()+t.name.substring(s,t.name.length);return t.name=o,e>=0}))}checkAll(i=!0){this.itemsList=this.itemsList.map((t=>Object.assign(Object.assign({},t),{checked:i}))),this.resetRenderItemsList(),this.emitComboboxChange()}closeFilterItems(){this.searchValue="",this.resetRenderItemsList()}toggleComboBox(){this.isopen=!this.isopen}renderHeader(){return e("div",{class:"header",onClick:()=>this.toggleComboBox(),onKeyDown:i=>{i.keyCode===r.SPACE&&i.preventDefault()},onKeyUp:i=>h(i,this.toggleComboBox),role:"button",tabindex:0},e("p",{class:"body-3"},this.label,e("span",null,this.selectedCounter>0&&` (${this.selectedCounter})`)),e("z-icon",{name:"caret-down",class:this.size}))}renderContent(){if(this.isopen)return e("div",{class:"open-combo-data"},this.hassearch&&this.renderSearchInput(),this.hascheckall&&this.renderCheckAll(),this.renderItems())}renderItems(){if(this.isopen)return e("div",{class:this.searchValue&&"search",tabindex:-1},this.renderList(this.renderItemsList),this.searchValue&&this.renderCloseButton())}renderItem(i,t,r){return e("z-myz-list-item",{id:i.id,listitemid:i.id,action:`combo-li-${this.inputid}`,underlined:t!==r-1,class:this.size},e("z-input",{type:o.CHECKBOX,checked:i.checked,htmlid:`combo-checkbox-${this.inputid}-${i.id}`,label:i.name,disabled:!i.checked&&this.maxcheckableitems&&this.maxcheckableitems===this.selectedCounter,size:this.size===s.X_SMALL?s.SMALL:this.size}))}renderList(i){if(i)return!i.length&&this.searchValue?this.renderNoSearchResults():this.hasgroupitems?this.renderGroups(this.itemsList):e("ul",null,i.map(((t,e)=>this.renderItem(t,e,i.length))))}renderGroups(i){const t=i.reduce(((t,e,s)=>{var o;const{category:r}=e,a=this.renderItem(e,s,i.length);return t[r]=null!==(o=t[r])&&void 0!==o?o:[],t[r].push(a),t}),{}),s=Object.entries(t).map((([i,t])=>e("z-list-group",{"divider-type":a.ELEMENT},e("span",{class:"body-3-sb z-list-group-title",slot:"header-title"},i),t.map((i=>i)))));return e("ul",null,s)}renderNoSearchResults(){return e("ul",null,e("z-myz-list-item",{id:"no-results",text:this.noresultslabel,listitemid:"no-results",icon:"multiply-circle",class:this.size}))}renderCloseButton(){return e("div",null,e("a",{onClick:()=>this.closeFilterItems(),onKeyUp:i=>h(i,this.closeFilterItems),role:"button",tabindex:0},this.closesearchtext))}renderSearchInput(){if(this.isopen)return e("z-input",{htmlid:`${this.inputid}_search`,label:this.searchlabel,placeholder:this.searchplaceholder,htmltitle:this.searchtitle,type:this.inputType,value:this.searchValue,message:!1,size:this.size,onInputChange:i=>{if(27===i.detail.keycode)return this.closeFilterItems();this.searchValue=i.detail.value}})}renderCheckAll(){if(this.searchValue)return;const i=this.selectedCounter===this.itemsList.length;return e("div",{class:"check-all-wrapper"},e("z-input",{type:o.CHECKBOX,checked:i,htmlid:`combo-checkbox-${this.inputid}-check-all`,label:i?this.uncheckalltext:this.checkalltext,disabled:this.maxcheckableitems&&this.maxcheckableitems<this.itemsList.length,size:this.size===s.X_SMALL?s.SMALL:this.size}))}render(){return e("div",{"data-action":`combo-${this.inputid}`,class:{open:this.isopen,fixed:this.isfixed,disabled:this.disabled},id:this.inputid},this.renderHeader(),!this.disabled&&this.renderContent())}static get watchers(){return{items:["watchItems"],searchValue:["watchSearchValue"]}}};d.style=':host{display:block}:host>div.fixed{position:relative}:host>div>.header{position:relative;z-index:10;display:flex;min-height:42px;align-items:center;justify-content:space-between;padding:0 calc(var(--space-unit) * 1.5);border:var(--border-size-small) solid var(--color-surface04);margin:0;background-color:var(--color-input-field01);border-radius:var(--border-radius-small);cursor:pointer}:host([size="small"])>div>.header{min-height:34px;font-size:var(--font-size-2)}:host([size="x-small"])>div>.header{min-height:30px;font-size:var(--font-size-2)}:host([size="x-small"])>div>.header p.body-3{padding:calc(var(--space-unit) * 0.5) 0}:host>div>.header:hover{outline:var(--border-size-medium) solid var(--color-surface04);outline-offset:-2px}:host>div.open>div.header:focus:focus-visible{box-shadow:none}:host>div>div.header:focus:focus-visible{box-shadow:var(--shadow-focus-primary);outline:none}:host>div>.header>p.body-3{padding:var(--space-unit) 0;margin:0;color:var(--color-text01)}:host>div>.header>p.body-3>span{font-weight:var(--font-sb)}:host>div>.header>z-icon{fill:var(--color-icon02);transform:rotate(360deg);transition:all 200ms linear}:host>div>.header>z-icon.small,:host>div>.header>z-icon.x-small{--z-icon-width:16px;--z-icon-height:16px}:host>div.open>.header{border:var(--border-size-small) solid var(--color-primary01);border-radius:var(--border-radius-small) var(--border-radius-small) 0 0}:host>div.disabled{pointer-events:none}:host>div.disabled .header{border-color:var(--color-disabled01);fill:var(--color-disabled01)}:host>div.disabled .header>p.body-3{color:var(--color-disabled02)}:host>div.disabled .header>z-icon:last-child{fill:var(--color-disabled01)}:host>div.open>.header>z-icon{fill:var(--color-icon02);transform:rotate(180deg);transition:all 200ms linear}:host>div.open>div.open-combo-data{position:relative;z-index:12;padding:var(--space-unit) calc(var(--space-unit) * 2);border:var(--border-size-small) solid var(--gray200);border-top:0;background-color:var(--color-input-field01);border-radius:0}:host>div.open>div.open-combo-data>div{overflow:auto;max-height:235px;padding:0;scrollbar-color:var(--color-primary01) transparent}:host>div.open>div.open-combo-data>z-input{width:100%;margin-bottom:calc(var(--space-unit) * 2)}:host>div.open>div.open-combo-data>div>ul{max-height:235px;padding:0 3px;margin:0}::-webkit-scrollbar{width:10px;background:linear-gradient(to right, transparent 0 3px, var(--gray200) 3px 7px, transparent 7px 10px);border-radius:var(--border-radius)}::-webkit-scrollbar-thumb{width:10px;background-color:var(--color-primary01)}:host>div.open>z-input{position:relative;z-index:1;width:238px;margin:0 calc(var(--space-unit) * 2);color:var(--color-primary01)}:host>div.open>div.open-combo-data>div.search{overflow:hidden;max-height:auto;margin-top:0;box-shadow:1px 1px 4px 2px rgb(217 222 227 / 50%)}:host>div.open>div.open-combo-data>div.search>ul{overflow:auto;max-height:180px;padding:var(--space-unit) calc(var(--space-unit) * 2);scrollbar-color:var(--color-primary01) transparent}:host>div.open>div.open-combo-data>div.search>div{display:flex;justify-content:center}:host>div.open>div.open-combo-data>div.search>div>a{display:inline-block;height:44px;color:var(--color-primary01);cursor:pointer;font-family:var(--font-family-sans);font-size:14px;font-weight:var(--font-sb);line-height:44px;text-align:center;text-transform:uppercase}:host>div.open>div.open-combo-data>div.check-all-wrapper{padding:calc(var(--space-unit) * 2) calc(var(--space-unit) * 0.5);border-bottom:var(--border-size-small) solid var(--gray800);margin-bottom:var(--space-unit);text-align:left}:host([size="small"])>div.open>div.open-combo-data>div.check-all-wrapper{padding:calc(var(--space-unit) * 1.5) calc(var(--space-unit) * 0.5)}:host([size="x-small"])>div.open>div.open-combo-data>div.check-all-wrapper{padding:var(--space-unit) calc(var(--space-unit) * 0.5)}';export{d as z_combobox}
|