@jumpgroup/jump-design-system 0.3.85 → 0.3.86
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/jump-card-ecommerce-option.cjs.entry.js +14 -10
- package/dist/cjs/jump-card-ecommerce-option.cjs.entry.js.map +1 -1
- package/dist/cjs/jump-card-ecommerce.cjs.entry.js +13 -4
- package/dist/cjs/jump-card-ecommerce.cjs.entry.js.map +1 -1
- package/dist/collection/components/jump-card-ecommerce/jump-card-ecommerce.js +13 -4
- package/dist/collection/components/jump-card-ecommerce/jump-card-ecommerce.js.map +1 -1
- package/dist/collection/components/jump-card-ecommerce-option/jump-card-ecommerce-option.js +14 -10
- package/dist/collection/components/jump-card-ecommerce-option/jump-card-ecommerce-option.js.map +1 -1
- package/dist/collection/components/jump-card-ecommerce-option/jump-card-ecommerce-option.stories.js +1 -1
- package/dist/collection/components/jump-card-ecommerce-option/jump-card-ecommerce-option.stories.js.map +1 -1
- package/dist/components/jump-card-ecommerce-option.js +14 -10
- package/dist/components/jump-card-ecommerce-option.js.map +1 -1
- package/dist/components/jump-card-ecommerce.js +13 -4
- package/dist/components/jump-card-ecommerce.js.map +1 -1
- package/dist/esm/jump-card-ecommerce-option.entry.js +14 -10
- package/dist/esm/jump-card-ecommerce-option.entry.js.map +1 -1
- package/dist/esm/jump-card-ecommerce.entry.js +13 -4
- package/dist/esm/jump-card-ecommerce.entry.js.map +1 -1
- package/dist/jump-design-system/jump-design-system.esm.js +1 -1
- package/dist/jump-design-system/{p-84fc27d9.entry.js → p-aa90572b.entry.js} +2 -2
- package/dist/jump-design-system/p-aa90572b.entry.js.map +1 -0
- package/dist/jump-design-system/p-f7310fd5.entry.js +2 -0
- package/dist/jump-design-system/p-f7310fd5.entry.js.map +1 -0
- package/dist/types/components/jump-card-ecommerce/jump-card-ecommerce.d.ts +2 -0
- package/dist/types/components/jump-card-ecommerce-option/jump-card-ecommerce-option.d.ts +1 -1
- package/package.json +1 -1
- package/dist/jump-design-system/p-5eace99b.entry.js +0 -2
- package/dist/jump-design-system/p-5eace99b.entry.js.map +0 -1
- package/dist/jump-design-system/p-84fc27d9.entry.js.map +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as t,c as i,h as s,H as o,g as e}from"./p-98d5dd1f.js";const a=":host{--card-max-width:450px;--jump-card-max-width-horizontal:100%;--jump-card-color:var(--neutral-grey-primary);--jump-card-background:transparent;--jump-card-border-color:var(--neutral-grey-background);--jump-card-padding:0.5rem;--jump-card-commerce-out-of-stock-color:var(--status-danger-standard);--jump-card-ecommerce-discount-color:var(--status-danger-standard);--image-object-fit:cover;max-width:var(--card-max-width);overflow:hidden;display:flex;flex-direction:column;position:relative;width:100%;font-family:var(--ff-primary, \"Arial\"), sans-serif;line-height:var(--lh-400, 1.3);background-color:var(--jump-card-background);color:var(--jump-card-color)}:host .Footer,:host .Body{display:flex;width:100%}:host jump-badge{position:absolute;top:1rem;left:1rem;z-index:2}:host jump-badge.hasBackground.iconOnly{top:calc(1rem + 8px);left:calc(1rem + 8px)}:host .Favorite{position:absolute;top:1rem;right:1rem;z-index:2}:host .Favorite.hasBackground.iconOnly{top:calc(1rem + 8px);right:calc(1rem + 8px)}:host .Media{overflow:hidden;position:relative;border-radius:3px;aspect-ratio:1/1}:host .Media .Images{height:100%;margin:0;position:relative}:host .Media .Images img{height:100%;width:100%;position:absolute;top:0;left:0;overflow:hidden;object-fit:var(--image-object-fit, cover)}:host .Media .Images__Front{z-index:1;transition:opacity 0.5s linear;cursor:pointer}:host .Media .Images.has-hover-image:hover .Images__Front{opacity:0}:host .Media .Images.enable-zoom{overflow:hidden}:host .Media .Images.enable-zoom .Images__Front{transition:transform 0s ease-out;cursor:zoom-in}:host .Media .Images.enable-zoom:hover .Images__Front{transform:scale(1.5)}:host .Media.hasBackground{background-color:var(--neutral-white)}:host .Media.hasBackground.iconOnly{border-top-left-radius:6px;border-top-right-radius:6px;padding:var(--jump-card-padding) var(--jump-card-padding) 0}:host .Media.hasBackground.iconOnly img{border-radius:6px}:host .Media.iconOnly{border-bottom-right-radius:0}:host .Media.is-mini{max-width:180px}:host .NotificationCart{display:none;position:absolute;bottom:0px;width:100%;padding:2rem 1rem;background-color:hsla(0, 0%, 0%, 0.35);box-sizing:border-box;z-index:2;transform:translate3d(0, 0, 0)}:host .NotificationCart.is-active{display:flex;align-items:center;justify-content:center}:host .Content.hasBackground{background-color:var(--neutral-white);padding:calc(var(--jump-card-padding) * 2)}:host .Content.iconOnly{padding:calc(var(--jump-card-padding) * 2) var(--jump-card-padding)}:host .Content.is-mini{max-width:180px}:host .Body{display:flex;flex-direction:column;gap:0.75rem;padding:var(--jump-card-padding) 0}:host .Body>*{display:flex;flex-direction:row;justify-content:space-between}:host .Body>*>*{flex:0 1 auto}:host .Body.hasBackground{padding:0 0 var(--jump-card-padding)}:host .Body.iconOnly{padding:0}:host .Body.is-mini{padding:calc(var(--jump-card-padding) / 2) 0}:host .Body.is-mini>*{flex-direction:column}:host .Product{font-size:var(--fs-400);color:var(--neutral-grey-primary);text-decoration:none}:host .Subtitle{font-size:var(--fs-300);color:var(--neutral-grey-secondary);line-height:1.2}:host .Footer{line-height:var(--lh-400);justify-content:end;padding:var(--jump-card-padding) 0;align-items:flex-end}:host .Footer.justify-between{justify-content:space-between}:host .Footer.hasBackground{padding-bottom:0}:host .Footer.iconOnly{padding:0}:host .Footer.is-mini{padding:calc(var(--jump-card-padding) / 2) 0}:host .Footer__AddToCart{--jump-button-color:var(--jump-card-ecommerce-add-to-cart-color);--jump-button-background:var(--jump-card-ecommerce-add-to-cart-background);--jump-button-color-hover:var(--jump-card-ecommerce-add-to-cart-color-hover);--jump-button-background-hover:var(--jump-card-ecommerce-add-to-cart-background-hover)}:host .OutOfStock{justify-items:start;font-size:var(--fs-300);font-weight:var(--fw-900);color:var(--jump-card-commerce-out-of-stock-color)}:host .OnlyIconButton{position:absolute;bottom:0;right:0;background:var(--neutral-white);border-top-left-radius:20px;padding:8px 8px 0px 8px;z-index:2}:host .Price{position:relative;display:grid;grid-template-columns:auto auto;grid-template-rows:1.5rem 1.5rem auto;justify-items:end;align-items:end;column-gap:0.5rem;font-size:var(--fs-500);font-weight:var(--fw-900);line-height:var(--lh-400)}:host .Price>*{display:inline-flex}:host .Price__Regular{text-align:right}:host .Price__Regular.sale{text-decoration:line-through;color:var(--neutral-grey-secondary);font-weight:var(--fw-400);font-size:var(--fs-400);grid-column:2;grid-row:1}:host .Price__Sale{grid-column:2;grid-row:2}:host .Price__Discount{color:var(--jump-card-ecommerce-discount-color);font-weight:var(--fw-400);font-size:var(--fs-300);grid-column:1;grid-row:1}:host .Price.is-mini{display:flex;font-size:var(--fs-400)}:host .SelectVariations{display:flex;align-items:flex-end;max-width:calc(50% - 1rem)}:host .SelectVariations select{appearance:none;background-color:transparent;border:1px solid var(--neutral-grey-secondary);border-radius:3px;color:var(--neutral-grey-secondary);font-size:var(--fs-300);padding:0.5rem 0.75rem;max-width:100%;background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236B7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3E%3C/svg%3E\");background-position:right 0.5rem center;background-repeat:no-repeat;background-size:1.5em 1.5em;padding-right:2.5rem;-webkit-print-color-adjust:exact}.slide-in-bottom{animation:slide-in-bottom 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) both}.slide-out-bottom{animation:slide-out-bottom 0.5s cubic-bezier(0.55, 0.085, 0.68, 0.53) both}.fade-in-out{animation-name:fade-in-out;animation-duration:6s;animation-timing-function:ease-in-out}@keyframes fade-in-out{from{opacity:0;transform:translateY(100px)}50%{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(100px)}}";const r=a;const n=class{constructor(s){t(this,s);this.toggleFavorite=i(this,"jump-toggle-favorite",7);this.productAddToCart=i(this,"jump-add-to-cart",7);this.productWaitingList=i(this,"jump-add-to-waiting-list",7);this.variationSelected=i(this,"jump-variation-selected",7);this.goToProductPage=i(this,"jump-card-go-to-product-page",7);this.handleMouseMove=t=>{if(!this.enableZoom||!this.imageEl)return;const{left:i,top:s,width:o,height:e}=t.currentTarget.getBoundingClientRect();const a=t.clientX-i;const r=t.clientY-s;const n=(a/o-.5)*-80;const d=(r/e-.5)*-80;this.imageEl.style.transform=`scale(1.5) translate(${n}px, ${d}px)`};this.handleMouseLeave=()=>{if(!this.enableZoom||!this.imageEl)return;this.imageEl.style.transform="scale(1) translate(0, 0)"};this.onlyIconButton=false;this.hasBackground=false;this.badge=undefined;this.favorite=false;this.hasFavorite=false;this.hasSlotForFavorite=false;this.hasSlotAddToCart=false;this.link=undefined;this.img=undefined;this.imgAlt=undefined;this.hoverImg=undefined;this.hoverImgAlt=undefined;this.videoSrc=undefined;this.notificationUrl=undefined;this.notificationText="Aggiunto al carrello";this.productName=undefined;this.subtitle=undefined;this.productId=undefined;this.price=undefined;this.salePrice=undefined;this.currency="€";this.addToCartColor="secondary";this.badgeColor="secondary";this.outOfStock=false;this.outOfStockText=undefined;this.addToCartText="Aggiungi al carrello";this.waitingListText="Notifica disponibilità";this.addToWaitingList=false;this.isMini=false;this.disallowAddToCart=false;this.disallowAddToCartLabel="Scopri";this.enableZoom=false;this.imageObjectFit="cover";this.addedToCart=false;this.endAddedToCart=false;this.variations=[];this.selectedVariation=undefined;this.priceFormatted=undefined;this.salePriceFormatted=undefined}async setPrice(t,i){let s=false;if(t&&t>0){s=true;this.price=t}if(i&&i>0){this.salePrice=i}if(s){this.formatPrices()}}getSortedVariations(){return[...this.variations].sort(((t,i)=>{const s=t.order||999;const o=i.order||999;if(s!==o){return s-o}return t.code.localeCompare(i.code)}))}addOption(t){let i=t.detail;this.variations=[...this.variations,Object.assign({},i)]}onVariationSelected(){let t=this.variationSelectEl.value;let i=this.getSortedVariations().find((i=>i.code==t));this.selectedVariation=i;this.variationSelected.emit(i)}componentWillLoad(){}componentDidLoad(){this.jumpQuantityEl=this.JumpCardEcommerce.querySelector("jump-quantity");if(this.jumpQuantityEl){this.jumpQuantityEl.addEventListener("jump-change",this.onQuantityChange.bind(this));this.quantity=this.jumpQuantityEl.getValue().then((t=>{this.quantity=t}))}this.formatPrices()}disconnectedCallback(){this.jumpQuantityEl=this.JumpCardEcommerce.querySelector("jump-quantity");if(this.jumpQuantityEl){this.jumpQuantityEl.removeEventListener("jump-change",this.onQuantityChange)}}onQuantityChange(t){var i;this.quantity=(i=t.detail.value)!==null&&i!==void 0?i:false}onToggleFavorite(){this.favorite=!this.favorite;this.toggleFavorite.emit({productId:this.productId,favorite:this.favorite})}goToProduct(){this.goToProductPage.emit({productId:this.productId,link:this.link})}addProductToCart(){var t;this.addedToCart=true;let i=this.selectedVariation;if(!i&&this.getSortedVariations().length>0){i=this.getSortedVariations()[0]}const s={productId:this.productId,addedToCart:this.addedToCart,quantity:(t=this.quantity)!==null&&t!==void 0?t:null,variation:i!==null&&i!==void 0?i:null};this.productAddToCart.emit(s);setTimeout((()=>{this.addedToCart=false}),6e3)}waitingList(){this.addToWaitingList=true;this.productWaitingList.emit({productId:this.productId,addToWaitingList:this.addToWaitingList})}formatPrices(){var t;let i=(t=document.documentElement.lang)!==null&&t!==void 0?t:"it-IT";if(i.length==2){i=`${i}-${i.toUpperCase()}`}this.priceFormatted=this.price.toLocaleString(i,{minimumFractionDigits:2,maximumFractionDigits:2});this.salePriceFormatted=this.salePrice.toLocaleString(i,{minimumFractionDigits:2,maximumFractionDigits:2})}render(){const t=this.hasBackground&&!this.isMini?"hasBackground":"";const i=this.onlyIconButton&&!this.isMini?"iconOnly":"";const e=this.outOfStock?"justify-between":"";const a=this.hoverImg?"has-hover-image":"";const r=this.isMini?"is-mini":"";const n=this.enableZoom?"enable-zoom":"";function d(t,i){const s=(t-i)/t*100;return s.toFixed(0)}return s(o,{style:{"--image-object-fit":this.imageObjectFit}},!this.isMini&&this.badge?s("jump-badge",{class:`${t} ${i}`,variant:this.badgeColor,dimension:"small",label:this.badge}):"",!this.isMini&&this.hasFavorite?s("jump-button",{onClick:()=>this.onToggleFavorite(),class:`Favorite ${t} ${i}`,variant:this.favorite?"primary":"neutral",size:"small",text:true,onlyIcon:true},s("jump-icon",{slot:"prefix",name:"heart",category:this.favorite?"solid":"light",size:"medium"})):this.hasSlotForFavorite?s("div",{class:"Favorite"},s("slot",{name:"favorite"})):null,s("div",{class:`Media ${i} ${t} ${r}`,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave},s("a",{href:this.link},s("figure",{class:`Images ${a} ${n}`},this.img&&!this.videoSrc?s("img",{class:"Images__Front",src:this.img,alt:this.imgAlt,ref:t=>this.imageEl=t}):"",this.hoverImg&&!this.videoSrc?s("img",{class:"Images__OnHover",src:this.hoverImg,alt:this.hoverImgAlt}):""),this.videoSrc&&!this.img?s("video",{autoplay:true},s("source",{src:this.videoSrc,type:"video/mp4"}),s("source",{src:this.videoSrc,type:"video/mov"}),s("source",{src:this.videoSrc,type:"video/webm"})):""),!this.isMini?s("div",{class:`NotificationCart ${this.addedToCart==true?"is-active fade-in-out":""}`},s("jump-button",{href:this.notificationUrl,variant:"white",text:true},s("jump-icon",{slot:"prefix",name:"check"}),s("span",null," ",this.notificationText," "))):null,!this.isMini&&this.onlyIconButton&&!this.hasSlotAddToCart?s("div",{class:"OnlyIconButton"},s("jump-button",{variant:"secondary",size:"large",pill:true,onlyIcon:true,onClick:()=>this.addProductToCart()},s("jump-icon",{slot:"prefix",name:"cart-shopping",category:"regular"}))):"",!this.isMini&&this.onlyIconButton&&this.hasSlotAddToCart?s("div",{class:"OnlyIconButton"},s("slot",{name:"add-to-cart"})):""),s("div",{class:`Content ${t} ${i} ${r}`},s("div",{class:`Body ${t} ${i} ${r}`},s("div",null,s("div",{class:"Info"},s("a",{href:this.link,class:"Product"},this.productName),this.subtitle?s("div",{class:"Subtitle"},this.subtitle):null),this.price?s("div",{class:`Price ${r}`},!this.isMini&&this.salePrice&&this.salePrice<this.price?s("div",{class:"Price__Discount"}," ",d(this.price,this.salePrice),"% "):null,!this.isMini?s("div",{class:`Price__Regular ${this.salePrice&&this.salePrice<this.price?"sale":""}`},this.currency,this.priceFormatted):s("div",{class:`Price__Regular`},this.currency,this.salePrice&&this.salePrice<this.price?this.salePriceFormatted:this.priceFormatted),!this.isMini&&this.salePrice&&this.salePrice<this.price?s("div",{class:"Price__Sale"},this.currency,this.salePriceFormatted):null):null),!this.isMini||this.variations.length!=0?s("div",null,this.variations.length!=0?s("div",{class:"SelectVariations"},s("select",{ref:t=>this.variationSelectEl=t,onChange:()=>{this.onVariationSelected()}},this.getSortedVariations().filter((t=>!t.imgUrl)).map((t=>s("option",{value:t.code},t.label))))):null,s("slot",{name:"quantity"})):null),s("div",{class:`Footer ${e} ${t} ${i} ${r}`},this.outOfStock&&!this.isMini?s("div",{class:"OutOfStock"},this.outOfStockText?this.outOfStockText:"Esaurito"):"",this.outOfStock?s("jump-button",{class:"Footer__AddToCart",variant:this.addToCartColor,size:"small",text:true,onClick:()=>this.waitingList()},s("jump-icon",{slot:"prefix",name:"bell",category:"regular",size:"small"}),this.waitingListText):"",!this.outOfStock&&!this.onlyIconButton&&!this.hasSlotAddToCart&&!this.disallowAddToCart?s("jump-button",{class:"Footer__AddToCart",variant:this.addToCartColor,size:"small",text:true,onClick:()=>this.addProductToCart()},s("jump-icon",{slot:"prefix",name:"cart-shopping",category:"regular",size:"small"}),this.addToCartText):"",!this.outOfStock&&!this.onlyIconButton&&this.hasSlotAddToCart?s("slot",{name:"add-to-cart"}):null,!this.outOfStock&&this.disallowAddToCart?s("jump-button",{class:"Footer__AddToCart",variant:this.addToCartColor,size:"small",text:true,onClick:()=>this.goToProduct()},s("jump-icon",{slot:"suffix",name:"arrow-right"})," ",this.disallowAddToCartLabel):"")))}get JumpCardEcommerce(){return e(this)}};n.style=r;export{n as jump_card_ecommerce};
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{r as t,c as i,h as s,H as o,g as e}from"./p-98d5dd1f.js";const a=":host{--card-max-width:450px;--jump-card-max-width-horizontal:100%;--jump-card-color:var(--neutral-grey-primary);--jump-card-background:transparent;--jump-card-border-color:var(--neutral-grey-background);--jump-card-padding:0.5rem;--jump-card-commerce-out-of-stock-color:var(--status-danger-standard);--jump-card-ecommerce-discount-color:var(--status-danger-standard);--image-object-fit:cover;max-width:var(--card-max-width);overflow:hidden;display:flex;flex-direction:column;position:relative;width:100%;font-family:var(--ff-primary, \"Arial\"), sans-serif;line-height:var(--lh-400, 1.3);background-color:var(--jump-card-background);color:var(--jump-card-color)}:host .Footer,:host .Body{display:flex;width:100%}:host jump-badge{position:absolute;top:1rem;left:1rem;z-index:2}:host jump-badge.hasBackground.iconOnly{top:calc(1rem + 8px);left:calc(1rem + 8px)}:host .Favorite{position:absolute;top:1rem;right:1rem;z-index:2}:host .Favorite.hasBackground.iconOnly{top:calc(1rem + 8px);right:calc(1rem + 8px)}:host .Media{overflow:hidden;position:relative;border-radius:3px;aspect-ratio:1/1}:host .Media .Images{height:100%;margin:0;position:relative}:host .Media .Images img{height:100%;width:100%;position:absolute;top:0;left:0;overflow:hidden;object-fit:var(--image-object-fit, cover)}:host .Media .Images__Front{z-index:1;transition:opacity 0.5s linear;cursor:pointer}:host .Media .Images.has-hover-image:hover .Images__Front{opacity:0}:host .Media .Images.enable-zoom{overflow:hidden}:host .Media .Images.enable-zoom .Images__Front{transition:transform 0s ease-out;cursor:zoom-in}:host .Media .Images.enable-zoom:hover .Images__Front{transform:scale(1.5)}:host .Media.hasBackground{background-color:var(--neutral-white)}:host .Media.hasBackground.iconOnly{border-top-left-radius:6px;border-top-right-radius:6px;padding:var(--jump-card-padding) var(--jump-card-padding) 0}:host .Media.hasBackground.iconOnly img{border-radius:6px}:host .Media.iconOnly{border-bottom-right-radius:0}:host .Media.is-mini{max-width:180px}:host .NotificationCart{display:none;position:absolute;bottom:0px;width:100%;padding:2rem 1rem;background-color:hsla(0, 0%, 0%, 0.35);box-sizing:border-box;z-index:2;transform:translate3d(0, 0, 0)}:host .NotificationCart.is-active{display:flex;align-items:center;justify-content:center}:host .Content.hasBackground{background-color:var(--neutral-white);padding:calc(var(--jump-card-padding) * 2)}:host .Content.iconOnly{padding:calc(var(--jump-card-padding) * 2) var(--jump-card-padding)}:host .Content.is-mini{max-width:180px}:host .Body{display:flex;flex-direction:column;gap:0.75rem;padding:var(--jump-card-padding) 0}:host .Body>*{display:flex;flex-direction:row;justify-content:space-between}:host .Body>*>*{flex:0 1 auto}:host .Body.hasBackground{padding:0 0 var(--jump-card-padding)}:host .Body.iconOnly{padding:0}:host .Body.is-mini{padding:calc(var(--jump-card-padding) / 2) 0}:host .Body.is-mini>*{flex-direction:column}:host .Product{font-size:var(--fs-400);color:var(--neutral-grey-primary);text-decoration:none}:host .Subtitle{font-size:var(--fs-300);color:var(--neutral-grey-secondary);line-height:1.2}:host .Footer{line-height:var(--lh-400);justify-content:end;padding:var(--jump-card-padding) 0;align-items:flex-end}:host .Footer.justify-between{justify-content:space-between}:host .Footer.hasBackground{padding-bottom:0}:host .Footer.iconOnly{padding:0}:host .Footer.is-mini{padding:calc(var(--jump-card-padding) / 2) 0}:host .Footer__AddToCart{--jump-button-color:var(--jump-card-ecommerce-add-to-cart-color);--jump-button-background:var(--jump-card-ecommerce-add-to-cart-background);--jump-button-color-hover:var(--jump-card-ecommerce-add-to-cart-color-hover);--jump-button-background-hover:var(--jump-card-ecommerce-add-to-cart-background-hover)}:host .OutOfStock{justify-items:start;font-size:var(--fs-300);font-weight:var(--fw-900);color:var(--jump-card-commerce-out-of-stock-color)}:host .OnlyIconButton{position:absolute;bottom:0;right:0;background:var(--neutral-white);border-top-left-radius:20px;padding:8px 8px 0px 8px;z-index:2}:host .Price{position:relative;display:grid;grid-template-columns:auto auto;grid-template-rows:1.5rem 1.5rem auto;justify-items:end;align-items:end;column-gap:0.5rem;font-size:var(--fs-500);font-weight:var(--fw-900);line-height:var(--lh-400)}:host .Price>*{display:inline-flex}:host .Price__Regular{text-align:right}:host .Price__Regular.sale{text-decoration:line-through;color:var(--neutral-grey-secondary);font-weight:var(--fw-400);font-size:var(--fs-400);grid-column:2;grid-row:1}:host .Price__Sale{grid-column:2;grid-row:2}:host .Price__Discount{color:var(--jump-card-ecommerce-discount-color);font-weight:var(--fw-400);font-size:var(--fs-300);grid-column:1;grid-row:1}:host .Price.is-mini{display:flex;font-size:var(--fs-400)}:host .SelectVariations{display:flex;align-items:flex-end;max-width:calc(50% - 1rem)}:host .SelectVariations select{appearance:none;background-color:transparent;border:1px solid var(--neutral-grey-secondary);border-radius:3px;color:var(--neutral-grey-secondary);font-size:var(--fs-300);padding:0.5rem 0.75rem;max-width:100%;background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236B7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3E%3C/svg%3E\");background-position:right 0.5rem center;background-repeat:no-repeat;background-size:1.5em 1.5em;padding-right:2.5rem;-webkit-print-color-adjust:exact}.slide-in-bottom{animation:slide-in-bottom 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) both}.slide-out-bottom{animation:slide-out-bottom 0.5s cubic-bezier(0.55, 0.085, 0.68, 0.53) both}.fade-in-out{animation-name:fade-in-out;animation-duration:6s;animation-timing-function:ease-in-out}@keyframes fade-in-out{from{opacity:0;transform:translateY(100px)}50%{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(100px)}}";const r=a;const n=class{constructor(s){t(this,s);this.toggleFavorite=i(this,"jump-toggle-favorite",7);this.productAddToCart=i(this,"jump-add-to-cart",7);this.productWaitingList=i(this,"jump-add-to-waiting-list",7);this.variationSelected=i(this,"jump-variation-selected",7);this.goToProductPage=i(this,"jump-card-go-to-product-page",7);this.handleMouseMove=t=>{if(!this.enableZoom||!this.imageEl)return;const{left:i,top:s,width:o,height:e}=t.currentTarget.getBoundingClientRect();const a=t.clientX-i;const r=t.clientY-s;const n=(a/o-.5)*-80;const d=(r/e-.5)*-80;this.imageEl.style.transform=`scale(1.5) translate(${n}px, ${d}px)`};this.handleMouseLeave=()=>{if(!this.enableZoom||!this.imageEl)return;this.imageEl.style.transform="scale(1) translate(0, 0)"};this.onlyIconButton=false;this.hasBackground=false;this.badge=undefined;this.favorite=false;this.hasFavorite=false;this.hasSlotForFavorite=false;this.hasSlotAddToCart=false;this.link=undefined;this.img=undefined;this.imgAlt=undefined;this.hoverImg=undefined;this.hoverImgAlt=undefined;this.videoSrc=undefined;this.notificationUrl=undefined;this.notificationText="Aggiunto al carrello";this.productName=undefined;this.subtitle=undefined;this.productId=undefined;this.price=undefined;this.salePrice=undefined;this.currency="€";this.addToCartColor="secondary";this.badgeColor="secondary";this.outOfStock=false;this.outOfStockText=undefined;this.addToCartText="Aggiungi al carrello";this.waitingListText="Notifica disponibilità";this.addToWaitingList=false;this.isMini=false;this.disallowAddToCart=false;this.disallowAddToCartLabel="Scopri";this.enableZoom=false;this.imageObjectFit="cover";this.addedToCart=false;this.endAddedToCart=false;this.variations=[];this.selectedVariation=undefined;this.priceFormatted=undefined;this.salePriceFormatted=undefined}async setPrice(t,i){let s=false;if(t&&t>0){s=true;this.price=t}if(i&&i>0){this.salePrice=i}if(s){this.formatPrices()}}getSortedVariations(){return[...this.variations].sort(((t,i)=>{const s=t.order||999;const o=i.order||999;if(s!==o){return s-o}return t.code.localeCompare(i.code)}))}addOption(t){let i=t.detail;this.variations=[...this.variations,Object.assign({},i)];if(this.optionsCollectionTimeout){clearTimeout(this.optionsCollectionTimeout)}this.optionsCollectionTimeout=setTimeout((()=>{this.variations=this.getSortedVariations()}),50)}onVariationSelected(){let t=this.variationSelectEl.value;let i=this.variations.find((i=>i.code==t));this.selectedVariation=i;this.variationSelected.emit(i)}componentWillLoad(){}componentDidLoad(){this.jumpQuantityEl=this.JumpCardEcommerce.querySelector("jump-quantity");if(this.jumpQuantityEl){this.jumpQuantityEl.addEventListener("jump-change",this.onQuantityChange.bind(this));this.quantity=this.jumpQuantityEl.getValue().then((t=>{this.quantity=t}))}this.formatPrices()}disconnectedCallback(){this.jumpQuantityEl=this.JumpCardEcommerce.querySelector("jump-quantity");if(this.jumpQuantityEl){this.jumpQuantityEl.removeEventListener("jump-change",this.onQuantityChange)}}onQuantityChange(t){var i;this.quantity=(i=t.detail.value)!==null&&i!==void 0?i:false}onToggleFavorite(){this.favorite=!this.favorite;this.toggleFavorite.emit({productId:this.productId,favorite:this.favorite})}goToProduct(){this.goToProductPage.emit({productId:this.productId,link:this.link})}addProductToCart(){var t;this.addedToCart=true;let i=this.selectedVariation;if(!i&&this.variations.length>0){i=this.variations[0]}const s={productId:this.productId,addedToCart:this.addedToCart,quantity:(t=this.quantity)!==null&&t!==void 0?t:null,variation:i!==null&&i!==void 0?i:null};this.productAddToCart.emit(s);setTimeout((()=>{this.addedToCart=false}),6e3)}waitingList(){this.addToWaitingList=true;this.productWaitingList.emit({productId:this.productId,addToWaitingList:this.addToWaitingList})}formatPrices(){var t;let i=(t=document.documentElement.lang)!==null&&t!==void 0?t:"it-IT";if(i.length==2){i=`${i}-${i.toUpperCase()}`}this.priceFormatted=this.price.toLocaleString(i,{minimumFractionDigits:2,maximumFractionDigits:2});this.salePriceFormatted=this.salePrice.toLocaleString(i,{minimumFractionDigits:2,maximumFractionDigits:2})}render(){const t=this.hasBackground&&!this.isMini?"hasBackground":"";const i=this.onlyIconButton&&!this.isMini?"iconOnly":"";const e=this.outOfStock?"justify-between":"";const a=this.hoverImg?"has-hover-image":"";const r=this.isMini?"is-mini":"";const n=this.enableZoom?"enable-zoom":"";function d(t,i){const s=(t-i)/t*100;return s.toFixed(0)}return s(o,{style:{"--image-object-fit":this.imageObjectFit}},!this.isMini&&this.badge?s("jump-badge",{class:`${t} ${i}`,variant:this.badgeColor,dimension:"small",label:this.badge}):"",!this.isMini&&this.hasFavorite?s("jump-button",{onClick:()=>this.onToggleFavorite(),class:`Favorite ${t} ${i}`,variant:this.favorite?"primary":"neutral",size:"small",text:true,onlyIcon:true},s("jump-icon",{slot:"prefix",name:"heart",category:this.favorite?"solid":"light",size:"medium"})):this.hasSlotForFavorite?s("div",{class:"Favorite"},s("slot",{name:"favorite"})):null,s("div",{class:`Media ${i} ${t} ${r}`,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave},s("a",{href:this.link},s("figure",{class:`Images ${a} ${n}`},this.img&&!this.videoSrc?s("img",{class:"Images__Front",src:this.img,alt:this.imgAlt,ref:t=>this.imageEl=t}):"",this.hoverImg&&!this.videoSrc?s("img",{class:"Images__OnHover",src:this.hoverImg,alt:this.hoverImgAlt}):""),this.videoSrc&&!this.img?s("video",{autoplay:true},s("source",{src:this.videoSrc,type:"video/mp4"}),s("source",{src:this.videoSrc,type:"video/mov"}),s("source",{src:this.videoSrc,type:"video/webm"})):""),!this.isMini?s("div",{class:`NotificationCart ${this.addedToCart==true?"is-active fade-in-out":""}`},s("jump-button",{href:this.notificationUrl,variant:"white",text:true},s("jump-icon",{slot:"prefix",name:"check"}),s("span",null," ",this.notificationText," "))):null,!this.isMini&&this.onlyIconButton&&!this.hasSlotAddToCart?s("div",{class:"OnlyIconButton"},s("jump-button",{variant:"secondary",size:"large",pill:true,onlyIcon:true,onClick:()=>this.addProductToCart()},s("jump-icon",{slot:"prefix",name:"cart-shopping",category:"regular"}))):"",!this.isMini&&this.onlyIconButton&&this.hasSlotAddToCart?s("div",{class:"OnlyIconButton"},s("slot",{name:"add-to-cart"})):""),s("div",{class:`Content ${t} ${i} ${r}`},s("div",{class:`Body ${t} ${i} ${r}`},s("div",null,s("div",{class:"Info"},s("a",{href:this.link,class:"Product"},this.productName),this.subtitle?s("div",{class:"Subtitle"},this.subtitle):null),this.price?s("div",{class:`Price ${r}`},!this.isMini&&this.salePrice&&this.salePrice<this.price?s("div",{class:"Price__Discount"}," ",d(this.price,this.salePrice),"% "):null,!this.isMini?s("div",{class:`Price__Regular ${this.salePrice&&this.salePrice<this.price?"sale":""}`},this.currency,this.priceFormatted):s("div",{class:`Price__Regular`},this.currency,this.salePrice&&this.salePrice<this.price?this.salePriceFormatted:this.priceFormatted),!this.isMini&&this.salePrice&&this.salePrice<this.price?s("div",{class:"Price__Sale"},this.currency,this.salePriceFormatted):null):null),!this.isMini||this.variations.length!=0?s("div",null,this.variations.length!=0?s("div",{class:"SelectVariations"},s("select",{ref:t=>this.variationSelectEl=t,onChange:()=>{this.onVariationSelected()}},this.variations.filter((t=>!t.imgUrl)).map((t=>s("option",{value:t.code},t.label))))):null,s("slot",{name:"quantity"})):null),s("div",{class:`Footer ${e} ${t} ${i} ${r}`},this.outOfStock&&!this.isMini?s("div",{class:"OutOfStock"},this.outOfStockText?this.outOfStockText:"Esaurito"):"",this.outOfStock?s("jump-button",{class:"Footer__AddToCart",variant:this.addToCartColor,size:"small",text:true,onClick:()=>this.waitingList()},s("jump-icon",{slot:"prefix",name:"bell",category:"regular",size:"small"}),this.waitingListText):"",!this.outOfStock&&!this.onlyIconButton&&!this.hasSlotAddToCart&&!this.disallowAddToCart?s("jump-button",{class:"Footer__AddToCart",variant:this.addToCartColor,size:"small",text:true,onClick:()=>this.addProductToCart()},s("jump-icon",{slot:"prefix",name:"cart-shopping",category:"regular",size:"small"}),this.addToCartText):"",!this.outOfStock&&!this.onlyIconButton&&this.hasSlotAddToCart?s("slot",{name:"add-to-cart"}):null,!this.outOfStock&&this.disallowAddToCart?s("jump-button",{class:"Footer__AddToCart",variant:this.addToCartColor,size:"small",text:true,onClick:()=>this.goToProduct()},s("jump-icon",{slot:"suffix",name:"arrow-right"})," ",this.disallowAddToCartLabel):"")))}get JumpCardEcommerce(){return e(this)}};n.style=r;export{n as jump_card_ecommerce};
|
|
2
|
+
//# sourceMappingURL=p-aa90572b.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["jumpCardEcommerceCss","JumpCardEcommerceStyle0","JumpCardEcommerce","this","handleMouseMove","e","enableZoom","imageEl","left","top","width","height","currentTarget","getBoundingClientRect","x","clientX","y","clientY","moveX","moveY","style","transform","handleMouseLeave","setPrice","price","salePrice","shouldFormat","formatPrices","getSortedVariations","variations","sort","a","b","orderA","order","orderB","code","localeCompare","addOption","props","detail","Object","assign","optionsCollectionTimeout","clearTimeout","setTimeout","onVariationSelected","currentValue","variationSelectEl","value","variation","find","selectedVariation","variationSelected","emit","componentWillLoad","componentDidLoad","jumpQuantityEl","querySelector","addEventListener","onQuantityChange","bind","quantity","getValue","then","disconnectedCallback","removeEventListener","_a","onToggleFavorite","favorite","toggleFavorite","productId","goToProduct","goToProductPage","link","addProductToCart","addedToCart","length","payload","productAddToCart","waitingList","addToWaitingList","productWaitingList","locale","document","documentElement","lang","toUpperCase","priceFormatted","toLocaleString","minimumFractionDigits","maximumFractionDigits","salePriceFormatted","render","backgroundClass","hasBackground","isMini","iconOnlyClass","onlyIconButton","justifyClass","outOfStock","hasImageOnHover","hoverImg","miniCard","enableZoomClass","calculateDiscount","discount","toFixed","h","Host","imageObjectFit","badge","class","variant","badgeColor","dimension","label","hasFavorite","onClick","size","text","onlyIcon","slot","name","category","hasSlotForFavorite","onMouseMove","onMouseLeave","href","img","videoSrc","src","alt","imgAlt","ref","el","hoverImgAlt","autoplay","type","notificationUrl","notificationText","hasSlotAddToCart","pill","productName","subtitle","currency","onChange","filter","imgUrl","map","outOfStockText","addToCartColor","waitingListText","disallowAddToCart","addToCartText","disallowAddToCartLabel"],"sources":["src/components/jump-card-ecommerce/jump-card-ecommerce.scss?tag=jump-card-ecommerce&encapsulation=shadow","src/components/jump-card-ecommerce/jump-card-ecommerce.tsx"],"sourcesContent":[":host {\n --card-max-width: 450px;\n --jump-card-max-width-horizontal: 100%;\n --jump-card-color: var(--neutral-grey-primary);\n --jump-card-background: transparent;\n --jump-card-border-color: var(--neutral-grey-background);\n --jump-card-padding: 0.5rem;\n --jump-card-commerce-out-of-stock-color: var(--status-danger-standard);\n --jump-card-ecommerce-discount-color: var(--status-danger-standard);\n --image-object-fit: cover;\n\n max-width: var(--card-max-width);\n overflow: hidden;\n display: flex;\n flex-direction: column;\n position: relative;\n width: 100%;\n font-family: var(--ff-primary, 'Arial'), sans-serif;\n line-height: var(--lh-400, 1.3);\n background-color: var(--jump-card-background);\n color: var(--jump-card-color);\n\n .Footer,\n .Body {\n display: flex;\n width: 100%;\n }\n\n jump-badge {\n position: absolute;\n top: 1rem;\n left: 1rem;\n z-index: 2;\n\n &.hasBackground.iconOnly {\n top: calc(1rem + 8px);\n left: calc(1rem + 8px);\n }\n }\n\n .Favorite {\n position: absolute;\n top: 1rem;\n right: 1rem;\n z-index: 2;\n\n &.hasBackground.iconOnly {\n top: calc(1rem + 8px);\n right: calc(1rem + 8px);\n }\n }\n\n .Media {\n // aspect-ratio: 3/4;\n overflow: hidden;\n position: relative;\n border-radius: 3px;\n aspect-ratio: 1/1;\n\n .Images {\n height: 100%;\n margin: 0;\n position: relative;\n\n img {\n height: 100%;\n width: 100%;\n position: absolute;\n top: 0;\n left: 0;\n overflow: hidden;\n object-fit: var(--image-object-fit, cover);\n }\n\n &__Front {\n z-index: 1;\n transition: opacity 0.5s linear;\n cursor: pointer;\n }\n\n &.has-hover-image {\n &:hover .Images__Front {\n opacity: 0;\n }\n }\n\n &.enable-zoom {\n overflow: hidden;\n\n .Images__Front {\n transition: transform 0s ease-out;\n cursor: zoom-in;\n }\n\n &:hover {\n .Images__Front {\n transform: scale(1.5);\n }\n }\n }\n }\n\n &.hasBackground {\n background-color: var(--neutral-white);\n\n &.iconOnly {\n border-top-left-radius: 6px;\n border-top-right-radius: 6px;\n padding: var(--jump-card-padding) var(--jump-card-padding) 0;\n\n img {\n border-radius: 6px;\n }\n }\n }\n\n &.iconOnly {\n border-bottom-right-radius: 0;\n }\n\n &.is-mini {\n max-width: 180px;\n }\n }\n\n .NotificationCart {\n display: none;\n position: absolute;\n bottom: 0px;\n width: 100%;\n padding: 2rem 1rem;\n background-color: hsl(0 0% 0% / 35%);\n box-sizing: border-box;\n z-index: 2;\n transform: translate3d(0, 0, 0);\n\n &.is-active {\n display: flex;\n align-items: center;\n justify-content: center;\n }\n }\n\n .Content {\n &.hasBackground {\n background-color: var(--neutral-white);\n padding: calc(var(--jump-card-padding) * 2);\n }\n\n &.iconOnly {\n padding: calc(var(--jump-card-padding) * 2) var(--jump-card-padding);\n }\n\n &.is-mini {\n max-width: 180px;\n }\n }\n\n .Body {\n display: flex;\n flex-direction: column;\n gap: 0.75rem;\n padding: var(--jump-card-padding) 0;\n\n & > * {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n\n & > * {\n flex: 0 1 auto;\n }\n }\n\n &.hasBackground {\n padding: 0 0 var(--jump-card-padding);\n }\n\n &.iconOnly {\n padding: 0;\n }\n\n &.is-mini {\n & > * {\n flex-direction: column;\n }\n\n padding: calc(var(--jump-card-padding) / 2) 0;\n }\n }\n\n .Product {\n font-size: var(--fs-400);\n color: var(--neutral-grey-primary);\n text-decoration: none;\n }\n\n .Subtitle {\n font-size: var(--fs-300);\n color: var(--neutral-grey-secondary);\n line-height: 1.2;\n }\n\n .Footer {\n line-height: var(--lh-400);\n justify-content: end;\n padding: var(--jump-card-padding) 0;\n align-items: flex-end;\n\n &.justify-between {\n justify-content: space-between;\n }\n\n &.hasBackground {\n padding-bottom: 0;\n }\n\n &.iconOnly {\n padding: 0;\n }\n\n &.is-mini {\n padding: calc(var(--jump-card-padding) / 2) 0;\n }\n\n &__AddToCart {\n --jump-button-color: var(--jump-card-ecommerce-add-to-cart-color);\n --jump-button-background: var(--jump-card-ecommerce-add-to-cart-background);\n --jump-button-color-hover: var(--jump-card-ecommerce-add-to-cart-color-hover);\n --jump-button-background-hover: var(--jump-card-ecommerce-add-to-cart-background-hover);\n }\n }\n\n .OutOfStock {\n justify-items: start;\n font-size: var(--fs-300);\n font-weight: var(--fw-900);\n color: var(--jump-card-commerce-out-of-stock-color);\n }\n\n .OnlyIconButton {\n position: absolute;\n bottom: 0;\n right: 0;\n background: var(--neutral-white);\n border-top-left-radius: 20px;\n padding: 8px 8px 0px 8px;\n z-index: 2;\n }\n\n .Price {\n position: relative;\n display: grid;\n grid-template-columns: auto auto;\n grid-template-rows: 1.5rem 1.5rem auto;\n justify-items: end;\n align-items: end;\n column-gap: 0.5rem;\n\n font-size: var(--fs-500);\n font-weight: var(--fw-900);\n line-height: var(--lh-400);\n\n & > * {\n display: inline-flex;\n }\n\n &__Regular {\n text-align: right;\n\n &.sale {\n text-decoration: line-through;\n color: var(--neutral-grey-secondary);\n font-weight: var(--fw-400);\n font-size: var(--fs-400);\n grid-column: 2;\n grid-row: 1;\n }\n }\n\n &__Sale {\n grid-column: 2;\n grid-row: 2;\n }\n\n &__Discount {\n color: var(--jump-card-ecommerce-discount-color);\n font-weight: var(--fw-400);\n font-size: var(--fs-300);\n grid-column: 1;\n grid-row: 1;\n }\n\n &.is-mini {\n display: flex;\n font-size: var(--fs-400);\n }\n }\n\n .SelectVariations {\n display: flex;\n align-items: flex-end;\n max-width: calc(50% - 1rem);\n\n select {\n appearance: none;\n background-color: transparent;\n border: 1px solid var(--neutral-grey-secondary);\n border-radius: 3px;\n color: var(--neutral-grey-secondary);\n font-size: var(--fs-300);\n padding: 0.5rem 0.75rem;\n max-width: 100%;\n background-image: url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236B7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3E%3C/svg%3E\");\n background-position: right 0.5rem center;\n background-repeat: no-repeat;\n background-size: 1.5em 1.5em;\n padding-right: 2.5rem;\n -webkit-print-color-adjust: exact;\n }\n }\n}\n\n.slide-in-bottom {\n animation: slide-in-bottom 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;\n}\n\n.slide-out-bottom {\n animation: slide-out-bottom 0.5s cubic-bezier(0.55, 0.085, 0.68, 0.53) both;\n}\n\n.fade-in-out {\n animation-name: fade-in-out;\n animation-duration: 6s;\n animation-timing-function: ease-in-out;\n}\n\n@keyframes fade-in-out {\n from {\n opacity: 0;\n transform: translateY(100px);\n }\n\n 50% {\n opacity: 1;\n transform: translateY(0);\n }\n\n to {\n opacity: 0;\n transform: translateY(100px);\n }\n}\n","import { Component, Host, h, Prop, Event, EventEmitter, Element, State, Listen, Method } from '@stencil/core';\n\ninterface Variation {\n code: string;\n imgUrl: string;\n label: string;\n taxonomy: string;\n order?: number; // Aggiunta proprietà order\n // Add more keys as needed\n}\n\n@Component({\n tag: 'jump-card-ecommerce',\n styleUrl: 'jump-card-ecommerce.scss',\n shadow: true,\n})\nexport class JumpCardEcommerce {\n\n @Element() JumpCardEcommerce: HTMLElement;\n jumpQuantityEl;\n private imageEl: HTMLImageElement;\n\n /* ---------------------- @PROPERTIES ------------------------- */\n\n /** Indicate if card has only icon button*/\n @Prop() onlyIconButton: boolean = false;\n\n /** Indicate if card has background*/\n @Prop() hasBackground: boolean = false;\n\n /** Indicates the badge of the card*/\n @Prop() badge: string;\n\n /** Indicates if the product is favorite */\n @Prop({ mutable: true, reflect: true }) favorite: boolean = false;\n\n /** Indicate if the whislist is active in shop*/\n @Prop() hasFavorite: boolean = false;\n\n /** Indicate if the whislist will be slotted*/\n @Prop() hasSlotForFavorite: boolean = false;\n\n /** Indicate if the add to cart btn will be slotted*/\n @Prop() hasSlotAddToCart: boolean = false;\n\n /** Indicates the link of the card*/\n @Prop() link: string;\n\n /** Indicates the image's src of the card*/\n @Prop() img: string;\n\n /** Indicates the img's alt of the card*/\n @Prop() imgAlt: string;\n\n /** Indicates the over image's src of the card*/\n @Prop() hoverImg: string;\n\n /** Indicates the hover img's alt of the card*/\n @Prop() hoverImgAlt: string;\n\n /** Indicates the videoSrc of the card*/\n @Prop() videoSrc: string;\n\n /** Indicates the notificationUrl of the card*/\n @Prop() notificationUrl: string;\n\n /** Indicates the notificationText of the card*/\n @Prop() notificationText: string = 'Aggiunto al carrello';\n\n /** Indicates the title of the card*/\n @Prop() productName: string;\n\n /** Indicates the subtitle of the card*/\n @Prop() subtitle: string;\n\n /** Indicates the ID of the product, can be also a SKU*/\n @Prop() productId: string;\n\n /** Indicates the price of the card */\n @Prop() price: number;\n\n /** Indicates the sale price of the card */\n @Prop() salePrice: number;\n\n /** Indicates the currency of the card */\n @Prop() currency: string = '€';\n\n /** Indicates the variant of the button */\n @Prop() addToCartColor: 'primary' | 'secondary'|'white'|'neutral' = 'secondary';\n\n /** Indicates the variant of the button */\n @Prop() badgeColor: 'primary' | 'secondary' | 'neutral' | 'warning' | 'success' | 'danger' = 'secondary';\n\n /** Indicates if the product is outOfStock */\n @Prop({ mutable: true, reflect: true }) outOfStock: boolean = false;\n\n /** Indicates the outOfStockText of the product*/\n @Prop() outOfStockText: string;\n\n /** Indicates the button class of the add to cart / notification button */\n @Prop() addToCartText: string = 'Aggiungi al carrello';\n\n /** Indicates the button class of the add to cart / notification button */\n @Prop() waitingListText: string = 'Notifica disponibilità';\n\n /** Indicate if the user request to be notified when te product is avaible*/\n @Prop() addToWaitingList: boolean = false;\n\n /** Indicate if the card is Mini Card*/\n @Prop() isMini: boolean = false;\n\n /** Indica se si tratta di un prodotto che può essere aggiunto al carrello solo dalla pagina prodotto */\n @Prop() disallowAddToCart: boolean = false;\n\n /** Label del pulsante che appare quando il prodotto non può essere aggiunto al carrello */\n @Prop() disallowAddToCartLabel: string = 'Scopri';\n\n /** Indica se è attivo lo zoom all'hover */\n @Prop() enableZoom: boolean = false;\n\n /** Controlla il comportamento dell'object-fit delle immagini */\n @Prop() imageObjectFit: 'cover' | 'scale-down' | 'contain' | 'fill' | 'none' = 'cover';\n\n /* ---------------------- @STATE ------------------------- */\n\n /** Indicate if the product is added to cart --> non deve esserci nelle storie! */\n @Prop() addedToCart: boolean = false;\n\n @Prop() endAddedToCart: boolean = false;\n\n @State() variations: Variation[] = [];\n\n @State() selectedVariation: Variation;\n\n @State() priceFormatted: string;\n\n @State() salePriceFormatted: string;\n\n /** Timeout per raccogliere tutte le opzioni prima di ordinarle */\n private optionsCollectionTimeout: any;\n\n // è una proprietà che viene cambiata solo da dentro\n quantity: number;\n\n variationSelectEl: HTMLSelectElement;\n\n /* ---------------------- @EVENTS ------------------------- */\n\n @Event({ eventName: 'jump-toggle-favorite' }) toggleFavorite: EventEmitter;\n\n @Event({ eventName: 'jump-add-to-cart' }) productAddToCart: EventEmitter;\n\n @Event({ eventName: 'jump-add-to-waiting-list' }) productWaitingList: EventEmitter;\n\n @Event({ eventName: 'jump-variation-selected' }) variationSelected: EventEmitter; // verificare se corretto: aggiungo un evento\n\n @Event({ eventName: 'jump-card-go-to-product-page' }) goToProductPage: EventEmitter;\n\n /**\n * Set the price of the product\n * @param price\n * @param salePrice\n */\n @Method()\n async setPrice(price: number, salePrice: number) {\n let shouldFormat = false;\n if (price && price > 0) {\n shouldFormat = true;\n this.price = price;\n }\n\n if (salePrice && salePrice > 0) {\n this.salePrice = salePrice;\n }\n\n if (shouldFormat) {\n this.formatPrices();\n }\n }\n\n /**\n * Ottiene le variazioni ordinate per order e poi per codice\n */\n private getSortedVariations(): Variation[] {\n return [...this.variations].sort((a, b) => {\n const orderA = a.order || 999;\n const orderB = b.order || 999;\n \n if (orderA !== orderB) {\n return orderA - orderB;\n }\n \n // Se order è uguale, ordina per codice alfanumericamente\n return a.code.localeCompare(b.code);\n });\n }\n\n @Listen('jump-card-ecommerce-option-connected')\n addOption(e) {\n let props = e.detail; // es {code: 'sku1', imageUrl: 'https://google.com/', order: 1}\n this.variations = [...this.variations, { ...props }];\n \n // Resettiamo il timeout ogni volta che arriva una nuova opzione\n if (this.optionsCollectionTimeout) {\n clearTimeout(this.optionsCollectionTimeout);\n }\n \n // Aspettiamo 50ms dopo l'ultima opzione ricevuta per ordinare tutto\n this.optionsCollectionTimeout = setTimeout(() => {\n // Ordiniamo le variazioni una volta per tutte\n this.variations = this.getSortedVariations();\n }, 50);\n }\n\n onVariationSelected() {\n let currentValue = this.variationSelectEl.value;\n let variation = this.variations.find(\n (variation) => variation.code == currentValue,\n );\n this.selectedVariation = variation;\n this.variationSelected.emit(variation); // verificare se corretto: emetto l'evento\n }\n\n /* ---------------------- @LIFECYCLE ------------------------- */\n\n componentWillLoad() {\n }\n\n componentDidLoad() {\n this.jumpQuantityEl = this.JumpCardEcommerce.querySelector('jump-quantity');\n\n if (this.jumpQuantityEl) {\n this.jumpQuantityEl.addEventListener('jump-change', this.onQuantityChange.bind(this));\n this.quantity = this.jumpQuantityEl.getValue().then((quantity) => {\n this.quantity = quantity;\n });\n }\n\n this.formatPrices();\n }\n\n disconnectedCallback() {\n this.jumpQuantityEl = this.JumpCardEcommerce.querySelector('jump-quantity');\n if (this.jumpQuantityEl) {\n this.jumpQuantityEl.removeEventListener('jump-change', this.onQuantityChange);\n }\n }\n\n /* ---------------------- @METHODS ------------------------- */\n\n private handleMouseMove = (e: MouseEvent) => {\n if (!this.enableZoom || !this.imageEl) return;\n\n const { left, top, width, height } = (e.currentTarget as HTMLElement).getBoundingClientRect();\n const x = e.clientX - left;\n const y = e.clientY - top;\n\n const moveX = (x / width - 0.5) * -80; // Controlla l'ampiezza del movimento\n const moveY = (y / height - 0.5) * -80; // Controlla l'ampiezza del movimento\n\n this.imageEl.style.transform = `scale(1.5) translate(${moveX}px, ${moveY}px)`;\n };\n\n private handleMouseLeave = () => {\n if (!this.enableZoom || !this.imageEl) return;\n this.imageEl.style.transform = 'scale(1) translate(0, 0)';\n };\n\n onQuantityChange(e) {\n this.quantity = e.detail.value ?? false;\n }\n\n onToggleFavorite() {\n this.favorite = !this.favorite;\n this.toggleFavorite.emit(\n {\n productId: this.productId,\n favorite: this.favorite,\n },\n );\n }\n\n goToProduct(){\n this.goToProductPage.emit({\n productId: this.productId,\n link: this.link,\n });\n }\n\n addProductToCart() {\n this.addedToCart = true;\n let variations = this.selectedVariation;\n if (!variations && this.variations.length > 0) {\n variations = this.variations[0];\n }\n\n const payload = {\n productId: this.productId,\n addedToCart: this.addedToCart,\n quantity: this.quantity ?? null,\n variation: variations ?? null,\n };\n this.productAddToCart.emit(payload);\n\n setTimeout(() => {\n this.addedToCart = false;\n }, 6000);\n }\n\n waitingList() {\n this.addToWaitingList = true;\n this.productWaitingList.emit(\n {\n productId: this.productId,\n addToWaitingList: this.addToWaitingList,\n },\n );\n }\n\n formatPrices() {\n let locale = document.documentElement.lang ?? 'it-IT';\n if (locale.length == 2) {\n locale = `${locale}-${locale.toUpperCase()}`;\n }\n\n // Format price with 2 decimal digits and in locale\n this.priceFormatted = this.price.toLocaleString(locale, { minimumFractionDigits: 2, maximumFractionDigits: 2 });\n this.salePriceFormatted = this.salePrice.toLocaleString(locale, {\n minimumFractionDigits: 2,\n maximumFractionDigits: 2,\n });\n }\n\n render() {\n const backgroundClass = this.hasBackground && !this.isMini ? 'hasBackground' : '';\n const iconOnlyClass = this.onlyIconButton && !this.isMini ? 'iconOnly' : '';\n const justifyClass = this.outOfStock ? 'justify-between' : '';\n const hasImageOnHover = this.hoverImg ? 'has-hover-image' : '';\n const miniCard = this.isMini ? 'is-mini' : '';\n const enableZoomClass = this.enableZoom ? 'enable-zoom' : '';\n\n function calculateDiscount(price: number, salePrice: number): string {\n const discount = ((price - salePrice) / price) * 100;\n return discount.toFixed(0);\n };\n\n return (\n <Host style={{'--image-object-fit': this.imageObjectFit}}>\n {!this.isMini && this.badge ?\n <jump-badge class={`${backgroundClass} ${iconOnlyClass}`} variant={this.badgeColor} dimension=\"small\"\n label={this.badge}></jump-badge> : ''}\n\n {!this.isMini && this.hasFavorite ?\n <jump-button onClick={() => this.onToggleFavorite()} class={`Favorite ${backgroundClass} ${iconOnlyClass}`}\n variant={this.favorite ? 'primary' : 'neutral'} size=\"small\" text onlyIcon>\n <jump-icon slot=\"prefix\" name=\"heart\" category={this.favorite ? 'solid' : 'light'}\n size=\"medium\"></jump-icon>\n </jump-button>\n :\n this.hasSlotForFavorite ? <div class=\"Favorite\">\n <slot name=\"favorite\"></slot>\n </div> : null\n }\n\n <div\n class={`Media ${iconOnlyClass} ${backgroundClass} ${miniCard}`}\n onMouseMove={this.handleMouseMove}\n onMouseLeave={this.handleMouseLeave}\n >\n <a href={this.link}>\n <figure class={`Images ${hasImageOnHover} ${enableZoomClass}`}>\n {this.img && !this.videoSrc ? <img class=\"Images__Front\" src={this.img} alt={this.imgAlt} ref={el => this.imageEl = el as HTMLImageElement}></img> : ''}\n {this.hoverImg && !this.videoSrc ?\n <img class=\"Images__OnHover\" src={this.hoverImg} alt={this.hoverImgAlt}></img> : ''}\n </figure>\n {this.videoSrc && !this.img ?\n <video autoplay>\n <source src={this.videoSrc} type=\"video/mp4\" />\n <source src={this.videoSrc} type=\"video/mov\" />\n <source src={this.videoSrc} type=\"video/webm\" />\n </video> : ''}\n </a>\n {!this.isMini ?\n <div class={`NotificationCart ${this.addedToCart == true ? 'is-active fade-in-out' : ''}`}>\n <jump-button href={this.notificationUrl} variant=\"white\" text>\n <jump-icon slot=\"prefix\" name=\"check\"></jump-icon>\n <span> {this.notificationText} </span>\n </jump-button>\n </div>\n : null\n }\n\n {!this.isMini && this.onlyIconButton && !this.hasSlotAddToCart ?\n <div class=\"OnlyIconButton\">\n <jump-button variant=\"secondary\" size=\"large\" pill onlyIcon onClick={() => this.addProductToCart()}>\n <jump-icon slot=\"prefix\" name=\"cart-shopping\" category=\"regular\"></jump-icon>\n </jump-button>\n </div>\n : ''\n }\n\n {!this.isMini && this.onlyIconButton && this.hasSlotAddToCart ?\n <div class=\"OnlyIconButton\">\n <slot name=\"add-to-cart\"></slot>\n </div>\n : ''\n }\n\n \n </div>\n\n <div class={`Content ${backgroundClass} ${iconOnlyClass} ${miniCard}`}>\n <div class={`Body ${backgroundClass} ${iconOnlyClass} ${miniCard}`}>\n <div>\n <div class=\"Info\">\n <a href={this.link} class=\"Product\">{this.productName}</a>\n {this.subtitle ? <div class=\"Subtitle\">{this.subtitle}</div> : null}\n </div>\n\n {this.price ?\n <div class={`Price ${miniCard}`}>\n {!this.isMini && this.salePrice && this.salePrice < this.price ?\n <div class=\"Price__Discount\"> {calculateDiscount(this.price, this.salePrice)}% </div>\n : null}\n\n {!this.isMini ?\n <div class={`Price__Regular ${this.salePrice && this.salePrice < this.price ? 'sale' : ''}`}>\n {this.currency}{this.priceFormatted}\n </div>\n :\n <div class={`Price__Regular`}>\n {this.currency}{this.salePrice && this.salePrice < this.price ? this.salePriceFormatted : this.priceFormatted}\n </div>\n }\n\n {!this.isMini && this.salePrice && this.salePrice < this.price ?\n <div class=\"Price__Sale\">{this.currency}{this.salePriceFormatted}</div>\n : null}\n </div>\n : null}\n </div>\n\n {!this.isMini || this.variations.length != 0 ?\n <div>\n {this.variations.length != 0 ?\n <div class=\"SelectVariations\">\n <select\n ref={(el) => (this.variationSelectEl = el)} //salvo questo elemento in this.variationSelectEl\n onChange={() => {\n this.onVariationSelected();\n }}\n >\n {this.variations\n .filter((variation) => !variation.imgUrl)\n .map((variation) => (\n <option value={variation.code}>{variation.label}</option>\n ))}\n </select>\n </div>\n : null}\n <slot name=\"quantity\"></slot>\n </div>\n : null}\n </div>\n\n <div class={`Footer ${justifyClass} ${backgroundClass} ${iconOnlyClass} ${miniCard}`}>\n\n {this.outOfStock && !this.isMini?\n <div class=\"OutOfStock\">{this.outOfStockText ? this.outOfStockText : 'Esaurito'}</div> : ''}\n\n {this.outOfStock ?\n <jump-button class=\"Footer__AddToCart\" variant={this.addToCartColor} size=\"small\" text onClick={() => this.waitingList()}>\n <jump-icon slot=\"prefix\" name=\"bell\" category=\"regular\" size=\"small\"></jump-icon>\n {this.waitingListText}\n </jump-button> : ''\n }\n\n {!this.outOfStock && !this.onlyIconButton && !this.hasSlotAddToCart && !this.disallowAddToCart ?\n <jump-button class=\"Footer__AddToCart\" variant={this.addToCartColor} size=\"small\" text onClick={() => this.addProductToCart()}>\n <jump-icon slot=\"prefix\" name=\"cart-shopping\" category=\"regular\" size=\"small\"></jump-icon>\n {this.addToCartText}\n </jump-button> : ''\n }\n\n {!this.outOfStock && !this.onlyIconButton && this.hasSlotAddToCart ?\n <slot name=\"add-to-cart\"></slot>\n : null\n }\n\n {!this.outOfStock && this.disallowAddToCart ?\n <jump-button class=\"Footer__AddToCart\" variant={this.addToCartColor} size=\"small\" text onClick={() => this.goToProduct()}>\n <jump-icon slot=\"suffix\" name=\"arrow-right\"></jump-icon> {this.disallowAddToCartLabel}\n </jump-button> : ''\n }\n </div>\n </div>\n </Host>\n );\n }\n\n}\n"],"mappings":"gEAAA,MAAMA,EAAuB,o1LAC7B,MAAAC,EAAeD,E,MCeFE,EAAiB,M,uTA0OpBC,KAAAC,gBAAmBC,IACzB,IAAKF,KAAKG,aAAeH,KAAKI,QAAS,OAEvC,MAAMC,KAAEA,EAAIC,IAAEA,EAAGC,MAAEA,EAAKC,OAAEA,GAAYN,EAAEO,cAA8BC,wBACtE,MAAMC,EAAIT,EAAEU,QAAUP,EACtB,MAAMQ,EAAIX,EAAEY,QAAUR,EAEtB,MAAMS,GAASJ,EAAIJ,EAAQ,KAAQ,GACnC,MAAMS,GAASH,EAAIL,EAAS,KAAQ,GAEpCR,KAAKI,QAAQa,MAAMC,UAAY,wBAAwBH,QAAYC,MAAU,EAGvEhB,KAAAmB,iBAAmB,KACzB,IAAKnB,KAAKG,aAAeH,KAAKI,QAAS,OACvCJ,KAAKI,QAAQa,MAAMC,UAAY,0BAA0B,E,oBAhPzB,M,mBAGD,M,mCAM2B,M,iBAG7B,M,wBAGO,M,sBAGF,M,6LAwBD,uB,wIAkBR,I,oBAGyC,Y,gBAGyB,Y,gBAG/B,M,iDAM9B,uB,qBAGE,yB,sBAGE,M,YAGV,M,uBAGW,M,4BAGI,S,gBAGX,M,oBAGiD,Q,iBAKhD,M,oBAEG,M,gBAEC,G,iGAkCnC,cAAME,CAASC,EAAeC,GAC5B,IAAIC,EAAe,MACnB,GAAIF,GAASA,EAAQ,EAAG,CACtBE,EAAe,KACfvB,KAAKqB,MAAQA,C,CAGf,GAAIC,GAAaA,EAAY,EAAG,CAC9BtB,K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AAKmJ,eAAiB,YAAoB,GAE1FnJ,KAAKiG,WACJQ,EAAA,eAAaI,MAAM,oBAAoBC,QAAS9G,KAAKoJ,eAAgBhC,KAAK,QAAQC,KAAI,KAACF,QAAS,IAAMnH,KAAK6E,eACzG4B,EAAA,aAAWc,KAAK,SAASC,KAAK,OAAOC,SAAS,UAAUL,KAAK,UAC5DpH,KAAKqJ,iBACS,IAGjBrJ,KAAKiG,aAAejG,KAAK+F,iBAAmB/F,KAAK0I,mBAAqB1I,KAAKsJ,kBAC3E7C,EAAA,eAAaI,MAAM,oBAAoBC,QAAS9G,KAAKoJ,eAAgBhC,KAAK,QAAQC,KAAI,KAACF,QAAS,IAAMnH,KAAKwE,oBACzGiC,EAAA,aAAWc,KAAK,SAASC,KAAK,gBAAgBC,SAAS,UAAUL,KAAK,UACrEpH,KAAKuJ,eACS,IAGjBvJ,KAAKiG,aAAejG,KAAK+F,gBAAkB/F,KAAK0I,iBAC9CjC,EAAA,QAAMe,KAAK,gBACX,MAGFxH,KAAKiG,YAAcjG,KAAKsJ,kBACxB7C,EAAA,eAAaI,MAAM,oBAAoBC,QAAS9G,KAAKoJ,eAAgBhC,KAAK,QAAQC,KAAI,KAACF,QAAS,IAAMnH,KAAKqE,eACxGoC,EAAA,aAAWc,KAAK,SAASC,KAAK,gBAA0B,IAAExH,KAAKwJ,wBACjD,K"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{r as e,c as t,h as s,H as i}from"./p-98d5dd1f.js";const n=":host{display:none}";const d=n;const o=class{constructor(s){e(this,s);this.connectedEvent=t(this,"jump-card-ecommerce-option-connected",7);this.code=undefined;this.imgUrl=undefined;this.label=undefined;this.sku=undefined;this.taxonomy=undefined;this.order=undefined}componentDidLoad(){setTimeout((()=>{this.connectedEvent.emit({code:this.code,label:this.label,imgUrl:this.imgUrl,sku:this.sku,taxonomy:this.taxonomy,order:this.order||999})}),10)}render(){return s(i,{key:"7998cf7d2c658f0e6814ece360ef8452370b37ab"})}};o.style=d;export{o as jump_card_ecommerce_option};
|
|
2
|
+
//# sourceMappingURL=p-f7310fd5.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["jumpCardEcommerceOptionCss","JumpCardEcommerceOptionStyle0","CardEcommerceOption","componentDidLoad","setTimeout","this","connectedEvent","emit","code","label","imgUrl","sku","taxonomy","order","render","h","Host","key"],"sources":["src/components/jump-card-ecommerce-option/jump-card-ecommerce-option.scss?tag=jump-card-ecommerce-option&encapsulation=shadow","src/components/jump-card-ecommerce-option/jump-card-ecommerce-option.tsx"],"sourcesContent":[":host {\n display: none;\n}\n","import { Component, Host, Event, Prop, h } from \"@stencil/core\";\n\n@Component({\n tag: \"jump-card-ecommerce-option\",\n styleUrl: \"jump-card-ecommerce-option.scss\",\n shadow: true,\n})\nexport class CardEcommerceOption {\n @Prop() code: string;\n @Prop() imgUrl: string;\n @Prop() label: string;\n @Prop() sku: string;\n @Prop() taxonomy: string;\n /** Ordine di visualizzazione dell'opzione (opzionale) */\n @Prop() order: number;\n\n @Event({ eventName: \"jump-card-ecommerce-option-connected\" }) connectedEvent;\n\n componentDidLoad() {\n // Emettiamo l'evento dopo che il componente è completamente caricato\n // con un piccolo delay per permettere a tutti i componenti di caricarsi\n setTimeout(() => {\n this.connectedEvent.emit({\n code: this.code,\n label: this.label,\n imgUrl: this.imgUrl,\n sku: this.sku,\n taxonomy: this.taxonomy,\n order: this.order || 999, // default a 999 se non specificato, così va alla fine\n });\n }, 10); // Delay fisso piccolo per tutti\n }\n\n render() {\n return <Host></Host>;\n }\n}\n"],"mappings":"yDAAA,MAAMA,EAA6B,sBACnC,MAAAC,EAAeD,E,MCMFE,EAAmB,M,6NAW9B,gBAAAC,GAGEC,YAAW,KACTC,KAAKC,eAAeC,KAAK,CACvBC,KAAMH,KAAKG,KACXC,MAAOJ,KAAKI,MACZC,OAAQL,KAAKK,OACbC,IAAKN,KAAKM,IACVC,SAAUP,KAAKO,SACfC,MAAOR,KAAKQ,OAAS,KACrB,GACD,G,CAGL,MAAAC,GACE,OAAOC,EAACC,EAAI,CAAAC,IAAA,4C"}
|
|
@@ -83,6 +83,8 @@ export declare class JumpCardEcommerce {
|
|
|
83
83
|
selectedVariation: Variation;
|
|
84
84
|
priceFormatted: string;
|
|
85
85
|
salePriceFormatted: string;
|
|
86
|
+
/** Timeout per raccogliere tutte le opzioni prima di ordinarle */
|
|
87
|
+
private optionsCollectionTimeout;
|
|
86
88
|
quantity: number;
|
|
87
89
|
variationSelectEl: HTMLSelectElement;
|
|
88
90
|
toggleFavorite: EventEmitter;
|
package/package.json
CHANGED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r as e,c as s,h as t,H as i}from"./p-98d5dd1f.js";const n=":host{display:none}";const d=n;const o=class{constructor(t){e(this,t);this.connectedEvent=s(this,"jump-card-ecommerce-option-connected",7);this.code=undefined;this.imgUrl=undefined;this.label=undefined;this.sku=undefined;this.taxonomy=undefined;this.order=undefined}componentWillLoad(){this.connectedEvent.emit({code:this.code,label:this.label,imgUrl:this.imgUrl,sku:this.sku,taxonomy:this.taxonomy,order:this.order||999})}render(){return t(i,{key:"68983ba0d384f78768a905a84cceca2c014e647d"})}};o.style=d;export{o as jump_card_ecommerce_option};
|
|
2
|
-
//# sourceMappingURL=p-5eace99b.entry.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["jumpCardEcommerceOptionCss","JumpCardEcommerceOptionStyle0","CardEcommerceOption","componentWillLoad","this","connectedEvent","emit","code","label","imgUrl","sku","taxonomy","order","render","h","Host","key"],"sources":["src/components/jump-card-ecommerce-option/jump-card-ecommerce-option.scss?tag=jump-card-ecommerce-option&encapsulation=shadow","src/components/jump-card-ecommerce-option/jump-card-ecommerce-option.tsx"],"sourcesContent":[":host {\n display: none;\n}\n","import { Component, Host, Event, Prop, h } from \"@stencil/core\";\n\n@Component({\n tag: \"jump-card-ecommerce-option\",\n styleUrl: \"jump-card-ecommerce-option.scss\",\n shadow: true,\n})\nexport class CardEcommerceOption {\n @Prop() code: string;\n @Prop() imgUrl: string;\n @Prop() label: string;\n @Prop() sku: string;\n @Prop() taxonomy: string;\n /** Ordine di visualizzazione dell'opzione (opzionale) */\n @Prop() order: number;\n\n @Event({ eventName: \"jump-card-ecommerce-option-connected\" }) connectedEvent;\n\n componentWillLoad() {\n this.connectedEvent.emit({\n code: this.code,\n label: this.label,\n imgUrl: this.imgUrl,\n sku: this.sku,\n taxonomy: this.taxonomy,\n order: this.order || 999, // default a 999 se non specificato, così va alla fine\n });\n }\n\n render() {\n return <Host></Host>;\n }\n}\n"],"mappings":"yDAAA,MAAMA,EAA6B,sBACnC,MAAAC,EAAeD,E,MCMFE,EAAmB,M,6NAW9B,iBAAAC,GACEC,KAAKC,eAAeC,KAAK,CACvBC,KAAMH,KAAKG,KACXC,MAAOJ,KAAKI,MACZC,OAAQL,KAAKK,OACbC,IAAKN,KAAKM,IACVC,SAAUP,KAAKO,SACfC,MAAOR,KAAKQ,OAAS,K,CAIzB,MAAAC,GACE,OAAOC,EAACC,EAAI,CAAAC,IAAA,4C"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["jumpCardEcommerceCss","JumpCardEcommerceStyle0","JumpCardEcommerce","this","handleMouseMove","e","enableZoom","imageEl","left","top","width","height","currentTarget","getBoundingClientRect","x","clientX","y","clientY","moveX","moveY","style","transform","handleMouseLeave","setPrice","price","salePrice","shouldFormat","formatPrices","getSortedVariations","variations","sort","a","b","orderA","order","orderB","code","localeCompare","addOption","props","detail","Object","assign","onVariationSelected","currentValue","variationSelectEl","value","variation","find","selectedVariation","variationSelected","emit","componentWillLoad","componentDidLoad","jumpQuantityEl","querySelector","addEventListener","onQuantityChange","bind","quantity","getValue","then","disconnectedCallback","removeEventListener","_a","onToggleFavorite","favorite","toggleFavorite","productId","goToProduct","goToProductPage","link","addProductToCart","addedToCart","length","payload","productAddToCart","setTimeout","waitingList","addToWaitingList","productWaitingList","locale","document","documentElement","lang","toUpperCase","priceFormatted","toLocaleString","minimumFractionDigits","maximumFractionDigits","salePriceFormatted","render","backgroundClass","hasBackground","isMini","iconOnlyClass","onlyIconButton","justifyClass","outOfStock","hasImageOnHover","hoverImg","miniCard","enableZoomClass","calculateDiscount","discount","toFixed","h","Host","imageObjectFit","badge","class","variant","badgeColor","dimension","label","hasFavorite","onClick","size","text","onlyIcon","slot","name","category","hasSlotForFavorite","onMouseMove","onMouseLeave","href","img","videoSrc","src","alt","imgAlt","ref","el","hoverImgAlt","autoplay","type","notificationUrl","notificationText","hasSlotAddToCart","pill","productName","subtitle","currency","onChange","filter","imgUrl","map","outOfStockText","addToCartColor","waitingListText","disallowAddToCart","addToCartText","disallowAddToCartLabel"],"sources":["src/components/jump-card-ecommerce/jump-card-ecommerce.scss?tag=jump-card-ecommerce&encapsulation=shadow","src/components/jump-card-ecommerce/jump-card-ecommerce.tsx"],"sourcesContent":[":host {\n --card-max-width: 450px;\n --jump-card-max-width-horizontal: 100%;\n --jump-card-color: var(--neutral-grey-primary);\n --jump-card-background: transparent;\n --jump-card-border-color: var(--neutral-grey-background);\n --jump-card-padding: 0.5rem;\n --jump-card-commerce-out-of-stock-color: var(--status-danger-standard);\n --jump-card-ecommerce-discount-color: var(--status-danger-standard);\n --image-object-fit: cover;\n\n max-width: var(--card-max-width);\n overflow: hidden;\n display: flex;\n flex-direction: column;\n position: relative;\n width: 100%;\n font-family: var(--ff-primary, 'Arial'), sans-serif;\n line-height: var(--lh-400, 1.3);\n background-color: var(--jump-card-background);\n color: var(--jump-card-color);\n\n .Footer,\n .Body {\n display: flex;\n width: 100%;\n }\n\n jump-badge {\n position: absolute;\n top: 1rem;\n left: 1rem;\n z-index: 2;\n\n &.hasBackground.iconOnly {\n top: calc(1rem + 8px);\n left: calc(1rem + 8px);\n }\n }\n\n .Favorite {\n position: absolute;\n top: 1rem;\n right: 1rem;\n z-index: 2;\n\n &.hasBackground.iconOnly {\n top: calc(1rem + 8px);\n right: calc(1rem + 8px);\n }\n }\n\n .Media {\n // aspect-ratio: 3/4;\n overflow: hidden;\n position: relative;\n border-radius: 3px;\n aspect-ratio: 1/1;\n\n .Images {\n height: 100%;\n margin: 0;\n position: relative;\n\n img {\n height: 100%;\n width: 100%;\n position: absolute;\n top: 0;\n left: 0;\n overflow: hidden;\n object-fit: var(--image-object-fit, cover);\n }\n\n &__Front {\n z-index: 1;\n transition: opacity 0.5s linear;\n cursor: pointer;\n }\n\n &.has-hover-image {\n &:hover .Images__Front {\n opacity: 0;\n }\n }\n\n &.enable-zoom {\n overflow: hidden;\n\n .Images__Front {\n transition: transform 0s ease-out;\n cursor: zoom-in;\n }\n\n &:hover {\n .Images__Front {\n transform: scale(1.5);\n }\n }\n }\n }\n\n &.hasBackground {\n background-color: var(--neutral-white);\n\n &.iconOnly {\n border-top-left-radius: 6px;\n border-top-right-radius: 6px;\n padding: var(--jump-card-padding) var(--jump-card-padding) 0;\n\n img {\n border-radius: 6px;\n }\n }\n }\n\n &.iconOnly {\n border-bottom-right-radius: 0;\n }\n\n &.is-mini {\n max-width: 180px;\n }\n }\n\n .NotificationCart {\n display: none;\n position: absolute;\n bottom: 0px;\n width: 100%;\n padding: 2rem 1rem;\n background-color: hsl(0 0% 0% / 35%);\n box-sizing: border-box;\n z-index: 2;\n transform: translate3d(0, 0, 0);\n\n &.is-active {\n display: flex;\n align-items: center;\n justify-content: center;\n }\n }\n\n .Content {\n &.hasBackground {\n background-color: var(--neutral-white);\n padding: calc(var(--jump-card-padding) * 2);\n }\n\n &.iconOnly {\n padding: calc(var(--jump-card-padding) * 2) var(--jump-card-padding);\n }\n\n &.is-mini {\n max-width: 180px;\n }\n }\n\n .Body {\n display: flex;\n flex-direction: column;\n gap: 0.75rem;\n padding: var(--jump-card-padding) 0;\n\n & > * {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n\n & > * {\n flex: 0 1 auto;\n }\n }\n\n &.hasBackground {\n padding: 0 0 var(--jump-card-padding);\n }\n\n &.iconOnly {\n padding: 0;\n }\n\n &.is-mini {\n & > * {\n flex-direction: column;\n }\n\n padding: calc(var(--jump-card-padding) / 2) 0;\n }\n }\n\n .Product {\n font-size: var(--fs-400);\n color: var(--neutral-grey-primary);\n text-decoration: none;\n }\n\n .Subtitle {\n font-size: var(--fs-300);\n color: var(--neutral-grey-secondary);\n line-height: 1.2;\n }\n\n .Footer {\n line-height: var(--lh-400);\n justify-content: end;\n padding: var(--jump-card-padding) 0;\n align-items: flex-end;\n\n &.justify-between {\n justify-content: space-between;\n }\n\n &.hasBackground {\n padding-bottom: 0;\n }\n\n &.iconOnly {\n padding: 0;\n }\n\n &.is-mini {\n padding: calc(var(--jump-card-padding) / 2) 0;\n }\n\n &__AddToCart {\n --jump-button-color: var(--jump-card-ecommerce-add-to-cart-color);\n --jump-button-background: var(--jump-card-ecommerce-add-to-cart-background);\n --jump-button-color-hover: var(--jump-card-ecommerce-add-to-cart-color-hover);\n --jump-button-background-hover: var(--jump-card-ecommerce-add-to-cart-background-hover);\n }\n }\n\n .OutOfStock {\n justify-items: start;\n font-size: var(--fs-300);\n font-weight: var(--fw-900);\n color: var(--jump-card-commerce-out-of-stock-color);\n }\n\n .OnlyIconButton {\n position: absolute;\n bottom: 0;\n right: 0;\n background: var(--neutral-white);\n border-top-left-radius: 20px;\n padding: 8px 8px 0px 8px;\n z-index: 2;\n }\n\n .Price {\n position: relative;\n display: grid;\n grid-template-columns: auto auto;\n grid-template-rows: 1.5rem 1.5rem auto;\n justify-items: end;\n align-items: end;\n column-gap: 0.5rem;\n\n font-size: var(--fs-500);\n font-weight: var(--fw-900);\n line-height: var(--lh-400);\n\n & > * {\n display: inline-flex;\n }\n\n &__Regular {\n text-align: right;\n\n &.sale {\n text-decoration: line-through;\n color: var(--neutral-grey-secondary);\n font-weight: var(--fw-400);\n font-size: var(--fs-400);\n grid-column: 2;\n grid-row: 1;\n }\n }\n\n &__Sale {\n grid-column: 2;\n grid-row: 2;\n }\n\n &__Discount {\n color: var(--jump-card-ecommerce-discount-color);\n font-weight: var(--fw-400);\n font-size: var(--fs-300);\n grid-column: 1;\n grid-row: 1;\n }\n\n &.is-mini {\n display: flex;\n font-size: var(--fs-400);\n }\n }\n\n .SelectVariations {\n display: flex;\n align-items: flex-end;\n max-width: calc(50% - 1rem);\n\n select {\n appearance: none;\n background-color: transparent;\n border: 1px solid var(--neutral-grey-secondary);\n border-radius: 3px;\n color: var(--neutral-grey-secondary);\n font-size: var(--fs-300);\n padding: 0.5rem 0.75rem;\n max-width: 100%;\n background-image: url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236B7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3E%3C/svg%3E\");\n background-position: right 0.5rem center;\n background-repeat: no-repeat;\n background-size: 1.5em 1.5em;\n padding-right: 2.5rem;\n -webkit-print-color-adjust: exact;\n }\n }\n}\n\n.slide-in-bottom {\n animation: slide-in-bottom 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;\n}\n\n.slide-out-bottom {\n animation: slide-out-bottom 0.5s cubic-bezier(0.55, 0.085, 0.68, 0.53) both;\n}\n\n.fade-in-out {\n animation-name: fade-in-out;\n animation-duration: 6s;\n animation-timing-function: ease-in-out;\n}\n\n@keyframes fade-in-out {\n from {\n opacity: 0;\n transform: translateY(100px);\n }\n\n 50% {\n opacity: 1;\n transform: translateY(0);\n }\n\n to {\n opacity: 0;\n transform: translateY(100px);\n }\n}\n","import { Component, Host, h, Prop, Event, EventEmitter, Element, State, Listen, Method } from '@stencil/core';\n\ninterface Variation {\n code: string;\n imgUrl: string;\n label: string;\n taxonomy: string;\n order?: number; // Aggiunta proprietà order\n // Add more keys as needed\n}\n\n@Component({\n tag: 'jump-card-ecommerce',\n styleUrl: 'jump-card-ecommerce.scss',\n shadow: true,\n})\nexport class JumpCardEcommerce {\n\n @Element() JumpCardEcommerce: HTMLElement;\n jumpQuantityEl;\n private imageEl: HTMLImageElement;\n\n /* ---------------------- @PROPERTIES ------------------------- */\n\n /** Indicate if card has only icon button*/\n @Prop() onlyIconButton: boolean = false;\n\n /** Indicate if card has background*/\n @Prop() hasBackground: boolean = false;\n\n /** Indicates the badge of the card*/\n @Prop() badge: string;\n\n /** Indicates if the product is favorite */\n @Prop({ mutable: true, reflect: true }) favorite: boolean = false;\n\n /** Indicate if the whislist is active in shop*/\n @Prop() hasFavorite: boolean = false;\n\n /** Indicate if the whislist will be slotted*/\n @Prop() hasSlotForFavorite: boolean = false;\n\n /** Indicate if the add to cart btn will be slotted*/\n @Prop() hasSlotAddToCart: boolean = false;\n\n /** Indicates the link of the card*/\n @Prop() link: string;\n\n /** Indicates the image's src of the card*/\n @Prop() img: string;\n\n /** Indicates the img's alt of the card*/\n @Prop() imgAlt: string;\n\n /** Indicates the over image's src of the card*/\n @Prop() hoverImg: string;\n\n /** Indicates the hover img's alt of the card*/\n @Prop() hoverImgAlt: string;\n\n /** Indicates the videoSrc of the card*/\n @Prop() videoSrc: string;\n\n /** Indicates the notificationUrl of the card*/\n @Prop() notificationUrl: string;\n\n /** Indicates the notificationText of the card*/\n @Prop() notificationText: string = 'Aggiunto al carrello';\n\n /** Indicates the title of the card*/\n @Prop() productName: string;\n\n /** Indicates the subtitle of the card*/\n @Prop() subtitle: string;\n\n /** Indicates the ID of the product, can be also a SKU*/\n @Prop() productId: string;\n\n /** Indicates the price of the card */\n @Prop() price: number;\n\n /** Indicates the sale price of the card */\n @Prop() salePrice: number;\n\n /** Indicates the currency of the card */\n @Prop() currency: string = '€';\n\n /** Indicates the variant of the button */\n @Prop() addToCartColor: 'primary' | 'secondary'|'white'|'neutral' = 'secondary';\n\n /** Indicates the variant of the button */\n @Prop() badgeColor: 'primary' | 'secondary' | 'neutral' | 'warning' | 'success' | 'danger' = 'secondary';\n\n /** Indicates if the product is outOfStock */\n @Prop({ mutable: true, reflect: true }) outOfStock: boolean = false;\n\n /** Indicates the outOfStockText of the product*/\n @Prop() outOfStockText: string;\n\n /** Indicates the button class of the add to cart / notification button */\n @Prop() addToCartText: string = 'Aggiungi al carrello';\n\n /** Indicates the button class of the add to cart / notification button */\n @Prop() waitingListText: string = 'Notifica disponibilità';\n\n /** Indicate if the user request to be notified when te product is avaible*/\n @Prop() addToWaitingList: boolean = false;\n\n /** Indicate if the card is Mini Card*/\n @Prop() isMini: boolean = false;\n\n /** Indica se si tratta di un prodotto che può essere aggiunto al carrello solo dalla pagina prodotto */\n @Prop() disallowAddToCart: boolean = false;\n\n /** Label del pulsante che appare quando il prodotto non può essere aggiunto al carrello */\n @Prop() disallowAddToCartLabel: string = 'Scopri';\n\n /** Indica se è attivo lo zoom all'hover */\n @Prop() enableZoom: boolean = false;\n\n /** Controlla il comportamento dell'object-fit delle immagini */\n @Prop() imageObjectFit: 'cover' | 'scale-down' | 'contain' | 'fill' | 'none' = 'cover';\n\n /* ---------------------- @STATE ------------------------- */\n\n /** Indicate if the product is added to cart --> non deve esserci nelle storie! */\n @Prop() addedToCart: boolean = false;\n\n @Prop() endAddedToCart: boolean = false;\n\n @State() variations: Variation[] = [];\n\n @State() selectedVariation: Variation;\n\n @State() priceFormatted: string;\n\n @State() salePriceFormatted: string;\n\n // è una proprietà che viene cambiata solo da dentro\n quantity: number;\n\n variationSelectEl: HTMLSelectElement;\n\n /* ---------------------- @EVENTS ------------------------- */\n\n @Event({ eventName: 'jump-toggle-favorite' }) toggleFavorite: EventEmitter;\n\n @Event({ eventName: 'jump-add-to-cart' }) productAddToCart: EventEmitter;\n\n @Event({ eventName: 'jump-add-to-waiting-list' }) productWaitingList: EventEmitter;\n\n @Event({ eventName: 'jump-variation-selected' }) variationSelected: EventEmitter; // verificare se corretto: aggiungo un evento\n\n @Event({ eventName: 'jump-card-go-to-product-page' }) goToProductPage: EventEmitter;\n\n /**\n * Set the price of the product\n * @param price\n * @param salePrice\n */\n @Method()\n async setPrice(price: number, salePrice: number) {\n let shouldFormat = false;\n if (price && price > 0) {\n shouldFormat = true;\n this.price = price;\n }\n\n if (salePrice && salePrice > 0) {\n this.salePrice = salePrice;\n }\n\n if (shouldFormat) {\n this.formatPrices();\n }\n }\n\n /**\n * Ottiene le variazioni ordinate per order e poi per codice\n */\n private getSortedVariations(): Variation[] {\n return [...this.variations].sort((a, b) => {\n const orderA = a.order || 999;\n const orderB = b.order || 999;\n \n if (orderA !== orderB) {\n return orderA - orderB;\n }\n \n // Se order è uguale, ordina per codice alfanumericamente\n return a.code.localeCompare(b.code);\n });\n }\n\n @Listen('jump-card-ecommerce-option-connected')\n addOption(e) {\n let props = e.detail; // es {code: 'sku1', imageUrl: 'https://google.com/', order: 1}\n this.variations = [...this.variations, { ...props }];\n }\n\n onVariationSelected() {\n let currentValue = this.variationSelectEl.value;\n let variation = this.getSortedVariations().find(\n (variation) => variation.code == currentValue,\n );\n this.selectedVariation = variation;\n this.variationSelected.emit(variation); // verificare se corretto: emetto l'evento\n }\n\n /* ---------------------- @LIFECYCLE ------------------------- */\n\n componentWillLoad() {\n }\n\n componentDidLoad() {\n this.jumpQuantityEl = this.JumpCardEcommerce.querySelector('jump-quantity');\n\n if (this.jumpQuantityEl) {\n this.jumpQuantityEl.addEventListener('jump-change', this.onQuantityChange.bind(this));\n this.quantity = this.jumpQuantityEl.getValue().then((quantity) => {\n this.quantity = quantity;\n });\n }\n\n this.formatPrices();\n }\n\n disconnectedCallback() {\n this.jumpQuantityEl = this.JumpCardEcommerce.querySelector('jump-quantity');\n if (this.jumpQuantityEl) {\n this.jumpQuantityEl.removeEventListener('jump-change', this.onQuantityChange);\n }\n }\n\n /* ---------------------- @METHODS ------------------------- */\n\n private handleMouseMove = (e: MouseEvent) => {\n if (!this.enableZoom || !this.imageEl) return;\n\n const { left, top, width, height } = (e.currentTarget as HTMLElement).getBoundingClientRect();\n const x = e.clientX - left;\n const y = e.clientY - top;\n\n const moveX = (x / width - 0.5) * -80; // Controlla l'ampiezza del movimento\n const moveY = (y / height - 0.5) * -80; // Controlla l'ampiezza del movimento\n\n this.imageEl.style.transform = `scale(1.5) translate(${moveX}px, ${moveY}px)`;\n };\n\n private handleMouseLeave = () => {\n if (!this.enableZoom || !this.imageEl) return;\n this.imageEl.style.transform = 'scale(1) translate(0, 0)';\n };\n\n onQuantityChange(e) {\n this.quantity = e.detail.value ?? false;\n }\n\n onToggleFavorite() {\n this.favorite = !this.favorite;\n this.toggleFavorite.emit(\n {\n productId: this.productId,\n favorite: this.favorite,\n },\n );\n }\n\n goToProduct(){\n this.goToProductPage.emit({\n productId: this.productId,\n link: this.link,\n });\n }\n\n addProductToCart() {\n this.addedToCart = true;\n let variations = this.selectedVariation;\n if (!variations && this.getSortedVariations().length > 0) {\n variations = this.getSortedVariations()[0];\n }\n\n const payload = {\n productId: this.productId,\n addedToCart: this.addedToCart,\n quantity: this.quantity ?? null,\n variation: variations ?? null,\n };\n this.productAddToCart.emit(payload);\n\n setTimeout(() => {\n this.addedToCart = false;\n }, 6000);\n }\n\n waitingList() {\n this.addToWaitingList = true;\n this.productWaitingList.emit(\n {\n productId: this.productId,\n addToWaitingList: this.addToWaitingList,\n },\n );\n }\n\n formatPrices() {\n let locale = document.documentElement.lang ?? 'it-IT';\n if (locale.length == 2) {\n locale = `${locale}-${locale.toUpperCase()}`;\n }\n\n // Format price with 2 decimal digits and in locale\n this.priceFormatted = this.price.toLocaleString(locale, { minimumFractionDigits: 2, maximumFractionDigits: 2 });\n this.salePriceFormatted = this.salePrice.toLocaleString(locale, {\n minimumFractionDigits: 2,\n maximumFractionDigits: 2,\n });\n }\n\n render() {\n const backgroundClass = this.hasBackground && !this.isMini ? 'hasBackground' : '';\n const iconOnlyClass = this.onlyIconButton && !this.isMini ? 'iconOnly' : '';\n const justifyClass = this.outOfStock ? 'justify-between' : '';\n const hasImageOnHover = this.hoverImg ? 'has-hover-image' : '';\n const miniCard = this.isMini ? 'is-mini' : '';\n const enableZoomClass = this.enableZoom ? 'enable-zoom' : '';\n\n function calculateDiscount(price: number, salePrice: number): string {\n const discount = ((price - salePrice) / price) * 100;\n return discount.toFixed(0);\n };\n\n return (\n <Host style={{'--image-object-fit': this.imageObjectFit}}>\n {!this.isMini && this.badge ?\n <jump-badge class={`${backgroundClass} ${iconOnlyClass}`} variant={this.badgeColor} dimension=\"small\"\n label={this.badge}></jump-badge> : ''}\n\n {!this.isMini && this.hasFavorite ?\n <jump-button onClick={() => this.onToggleFavorite()} class={`Favorite ${backgroundClass} ${iconOnlyClass}`}\n variant={this.favorite ? 'primary' : 'neutral'} size=\"small\" text onlyIcon>\n <jump-icon slot=\"prefix\" name=\"heart\" category={this.favorite ? 'solid' : 'light'}\n size=\"medium\"></jump-icon>\n </jump-button>\n :\n this.hasSlotForFavorite ? <div class=\"Favorite\">\n <slot name=\"favorite\"></slot>\n </div> : null\n }\n\n <div\n class={`Media ${iconOnlyClass} ${backgroundClass} ${miniCard}`}\n onMouseMove={this.handleMouseMove}\n onMouseLeave={this.handleMouseLeave}\n >\n <a href={this.link}>\n <figure class={`Images ${hasImageOnHover} ${enableZoomClass}`}>\n {this.img && !this.videoSrc ? <img class=\"Images__Front\" src={this.img} alt={this.imgAlt} ref={el => this.imageEl = el as HTMLImageElement}></img> : ''}\n {this.hoverImg && !this.videoSrc ?\n <img class=\"Images__OnHover\" src={this.hoverImg} alt={this.hoverImgAlt}></img> : ''}\n </figure>\n {this.videoSrc && !this.img ?\n <video autoplay>\n <source src={this.videoSrc} type=\"video/mp4\" />\n <source src={this.videoSrc} type=\"video/mov\" />\n <source src={this.videoSrc} type=\"video/webm\" />\n </video> : ''}\n </a>\n {!this.isMini ?\n <div class={`NotificationCart ${this.addedToCart == true ? 'is-active fade-in-out' : ''}`}>\n <jump-button href={this.notificationUrl} variant=\"white\" text>\n <jump-icon slot=\"prefix\" name=\"check\"></jump-icon>\n <span> {this.notificationText} </span>\n </jump-button>\n </div>\n : null\n }\n\n {!this.isMini && this.onlyIconButton && !this.hasSlotAddToCart ?\n <div class=\"OnlyIconButton\">\n <jump-button variant=\"secondary\" size=\"large\" pill onlyIcon onClick={() => this.addProductToCart()}>\n <jump-icon slot=\"prefix\" name=\"cart-shopping\" category=\"regular\"></jump-icon>\n </jump-button>\n </div>\n : ''\n }\n\n {!this.isMini && this.onlyIconButton && this.hasSlotAddToCart ?\n <div class=\"OnlyIconButton\">\n <slot name=\"add-to-cart\"></slot>\n </div>\n : ''\n }\n\n \n </div>\n\n <div class={`Content ${backgroundClass} ${iconOnlyClass} ${miniCard}`}>\n <div class={`Body ${backgroundClass} ${iconOnlyClass} ${miniCard}`}>\n <div>\n <div class=\"Info\">\n <a href={this.link} class=\"Product\">{this.productName}</a>\n {this.subtitle ? <div class=\"Subtitle\">{this.subtitle}</div> : null}\n </div>\n\n {this.price ?\n <div class={`Price ${miniCard}`}>\n {!this.isMini && this.salePrice && this.salePrice < this.price ?\n <div class=\"Price__Discount\"> {calculateDiscount(this.price, this.salePrice)}% </div>\n : null}\n\n {!this.isMini ?\n <div class={`Price__Regular ${this.salePrice && this.salePrice < this.price ? 'sale' : ''}`}>\n {this.currency}{this.priceFormatted}\n </div>\n :\n <div class={`Price__Regular`}>\n {this.currency}{this.salePrice && this.salePrice < this.price ? this.salePriceFormatted : this.priceFormatted}\n </div>\n }\n\n {!this.isMini && this.salePrice && this.salePrice < this.price ?\n <div class=\"Price__Sale\">{this.currency}{this.salePriceFormatted}</div>\n : null}\n </div>\n : null}\n </div>\n\n {!this.isMini || this.variations.length != 0 ?\n <div>\n {this.variations.length != 0 ?\n <div class=\"SelectVariations\">\n <select\n ref={(el) => (this.variationSelectEl = el)} //salvo questo elemento in this.variationSelectEl\n onChange={() => {\n this.onVariationSelected();\n }}\n >\n {this.getSortedVariations()\n .filter((variation) => !variation.imgUrl)\n .map((variation) => (\n <option value={variation.code}>{variation.label}</option>\n ))}\n </select>\n </div>\n : null}\n <slot name=\"quantity\"></slot>\n </div>\n : null}\n </div>\n\n <div class={`Footer ${justifyClass} ${backgroundClass} ${iconOnlyClass} ${miniCard}`}>\n\n {this.outOfStock && !this.isMini?\n <div class=\"OutOfStock\">{this.outOfStockText ? this.outOfStockText : 'Esaurito'}</div> : ''}\n\n {this.outOfStock ?\n <jump-button class=\"Footer__AddToCart\" variant={this.addToCartColor} size=\"small\" text onClick={() => this.waitingList()}>\n <jump-icon slot=\"prefix\" name=\"bell\" category=\"regular\" size=\"small\"></jump-icon>\n {this.waitingListText}\n </jump-button> : ''\n }\n\n {!this.outOfStock && !this.onlyIconButton && !this.hasSlotAddToCart && !this.disallowAddToCart ?\n <jump-button class=\"Footer__AddToCart\" variant={this.addToCartColor} size=\"small\" text onClick={() => this.addProductToCart()}>\n <jump-icon slot=\"prefix\" name=\"cart-shopping\" category=\"regular\" size=\"small\"></jump-icon>\n {this.addToCartText}\n </jump-button> : ''\n }\n\n {!this.outOfStock && !this.onlyIconButton && this.hasSlotAddToCart ?\n <slot name=\"add-to-cart\"></slot>\n : null\n }\n\n {!this.outOfStock && this.disallowAddToCart ?\n <jump-button class=\"Footer__AddToCart\" variant={this.addToCartColor} size=\"small\" text onClick={() => this.goToProduct()}>\n <jump-icon slot=\"suffix\" name=\"arrow-right\"></jump-icon> {this.disallowAddToCartLabel}\n </jump-button> : ''\n }\n </div>\n </div>\n </Host>\n );\n }\n\n}\n"],"mappings":"gEAAA,MAAMA,EAAuB,o1LAC7B,MAAAC,EAAeD,E,MCeFE,EAAiB,M,uTA4NpBC,KAAAC,gBAAmBC,IACzB,IAAKF,KAAKG,aAAeH,KAAKI,QAAS,OAEvC,MAAMC,KAAEA,EAAIC,IAAEA,EAAGC,MAAEA,EAAKC,OAAEA,GAAYN,EAAEO,cAA8BC,wBACtE,MAAMC,EAAIT,EAAEU,QAAUP,EACtB,MAAMQ,EAAIX,EAAEY,QAAUR,EAEtB,MAAMS,GAASJ,EAAIJ,EAAQ,KAAQ,GACnC,MAAMS,GAASH,EAAIL,EAAS,KAAQ,GAEpCR,KAAKI,QAAQa,MAAMC,UAAY,wBAAwBH,QAAYC,MAAU,EAGvEhB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