@jumpgroup/jump-design-system 0.3.46 → 0.3.48
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.cjs.entry.js +16 -18
- package/dist/cjs/jump-card-ecommerce.cjs.entry.js.map +1 -1
- package/dist/cjs/jump-design-system.cjs.js +1 -1
- package/dist/cjs/jump-pagination-table.cjs.entry.js +5 -5
- package/dist/cjs/jump-pagination-table.cjs.entry.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/jump-card-ecommerce/jump-card-ecommerce.css +2 -0
- package/dist/collection/components/jump-card-ecommerce/jump-card-ecommerce.js +56 -37
- package/dist/collection/components/jump-card-ecommerce/jump-card-ecommerce.js.map +1 -1
- package/dist/collection/components/jump-card-ecommerce/jump-card-ecommerce.stories.js +28 -8
- package/dist/collection/components/jump-card-ecommerce/jump-card-ecommerce.stories.js.map +1 -1
- package/dist/collection/components/jump-pagination-table/jump-pagination-table.js +23 -7
- package/dist/collection/components/jump-pagination-table/jump-pagination-table.js.map +1 -1
- package/dist/collection/components/jump-pagination-table/jump-pagination-table.stories.js +20 -0
- package/dist/collection/components/jump-pagination-table/jump-pagination-table.stories.js.map +1 -1
- package/dist/components/jump-card-ecommerce.js +18 -19
- package/dist/components/jump-card-ecommerce.js.map +1 -1
- package/dist/components/jump-pagination-table.js +7 -7
- package/dist/components/jump-pagination-table.js.map +1 -1
- package/dist/esm/jump-card-ecommerce.entry.js +16 -18
- package/dist/esm/jump-card-ecommerce.entry.js.map +1 -1
- package/dist/esm/jump-design-system.js +1 -1
- package/dist/esm/jump-pagination-table.entry.js +5 -5
- package/dist/esm/jump-pagination-table.entry.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/jump-design-system/jump-design-system.esm.js +1 -1
- package/dist/jump-design-system/jump-design-system.esm.js.map +1 -1
- package/dist/jump-design-system/p-174d297f.entry.js +2 -0
- package/dist/jump-design-system/p-174d297f.entry.js.map +1 -0
- package/dist/jump-design-system/p-b505bb33.entry.js +2 -0
- package/dist/jump-design-system/p-b505bb33.entry.js.map +1 -0
- package/dist/jump-design-system-elements.json +46 -4
- package/dist/types/components/jump-card-ecommerce/jump-card-ecommerce.d.ts +4 -2
- package/dist/types/components/jump-card-ecommerce/jump-card-ecommerce.stories.d.ts +12 -5
- package/dist/types/components/jump-pagination-table/jump-pagination-table.stories.d.ts +14 -0
- package/dist/types/components.d.ts +24 -8
- package/package.json +1 -1
- package/dist/jump-design-system/p-24cac36a.entry.js +0 -2
- package/dist/jump-design-system/p-24cac36a.entry.js.map +0 -1
- package/dist/jump-design-system/p-745c61b2.entry.js +0 -2
- package/dist/jump-design-system/p-745c61b2.entry.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["jumpPaginationTableCss","JumpPaginationTableStyle0","JumpPaginationTable","elementsRangesChanged","newValue","oldValue","console","log","this","elementsRangesArray","split","map","Number","elPerPageChanged","first","last","Math","min","total","changeElPerPage","emit","elPerPage","componentWillLoad","elementsRanges","setElPerPage","e","target","value","doChangePage","dir","newFirst","newLast","max","details","direction","changePage","render","h","Host","key","class","htmlFor","_a","labelElementsPerPage","name","id","onChange","range","selected","pagLabel","showFirstAndLast","onClick","variant","text","size","onlyIcon","disabled","slot"],"sources":["src/components/jump-pagination-table/jump-pagination-table.scss?tag=jump-pagination-table","src/components/jump-pagination-table/jump-pagination-table.tsx"],"sourcesContent":[":host {\n display: block;\n}\n\n.JumpPaginationTable {\n --jump-pagination-table-label: var(--neutral-grey-secondary);\n --jump-pagination-table-arrows: var(--neutral-grey-secondary);\n --jump-pagination-table-arrows-disabled: var(--neutral-grey-disabled); //mappare una variabile del design system\n\n font-family: var(--ff-primary);\n\n &__Wrapper {\n display: flex;\n justify-content: space-between;\n \n .elementsPerPage {\n display: flex;\n gap: 1rem;\n align-items: center;\n \n label {\n color: var(--jump-pagination-table-label);\n font-size: var(--fs-300);\n font-weight: normal;\n }\n }\n \n .indicators {\n font-size: var(--fs-400);\n font-weight: normal;\n display: flex;\n justify-content: space-between;\n gap: 20px;\n \n color: var(--jump-pagination-table-label);\n \n .arrow {\n color: var(--jump-pagination-table-arrows);\n display: flex;\n align-items: center;\n gap: 10px;\n \n button {\n background-color: transparent;\n border: none;\n cursor: pointer;\n padding: 0px;\n display: flex;\n align-items: center;\n }\n \n button:disabled {\n cursor: not-allowed;\n color: var(--jump-pagination-table-arrows-disabled);\n \n }\n }\n \n .elements {\n color: var(--jump-pagination-table-label);\n display: flex;\n align-items: center;\n gap: 5px;\n }\n }\n \n }\n}","import { Component, State, Event, EventEmitter, Watch, Host, Prop, h } from '@stencil/core';\n\n@Component({\n tag: 'jump-pagination-table',\n styleUrl: 'jump-pagination-table.scss',\n shadow: false,\n})\nexport class JumpPaginationTable {\n\n /* ---------------------- OWN PROPERTIES ---------------------- */\n\n /* ---------------------- @ELEMENT ---------------------------- */\n\n /* ---------------------- @STATE ------------------------------ */\n\n /* ---------------------- @PROPERTIES ------------------------- */\n\n /**\n * Values for the elements per page select\n */\n @Prop() elementsRanges: string = \"10,20,60,100\";\n\n @State() elementsRangesArray: number[];\n @Watch('elementsRanges')\n elementsRangesChanged(newValue, oldValue) {\n console.log('dentro el');\n if(newValue !== oldValue) {\n this.elementsRangesArray = newValue.split(',').map(Number);\n }\n this.elementsRangesArray = [...this.elementsRangesArray]\n console.log('elementsRangesChanged', newValue, oldValue);\n }\n\n /**\n * Number of elements per page selected\n */\n @Prop() elPerPage: number;\n @Watch('elPerPage')\n elPerPageChanged(newValue: number, oldValue: number) {\n if (newValue !== oldValue) {\n // Riporta la paginazione allo stato iniziale\n this.first = 1;\n this.last = Math.min(this.total, newValue);\n }\n\n this.changeElPerPage.emit({ elPerPage: newValue });\n }\n\n @Prop({ reflect: true }) pagLabel: string = 'di'; // Identifica la label testuale di pagination.\n\n /**\n * Label for the elements per page select\n */\n @Prop({ reflect: true }) labelElementsPerPage: string = 'Elementi per pagina';\n\n /**\n * Total of elements\n */\n @Prop({ reflect: true }) total: number = 100;\n\n /**\n * First element of the page\n */\n @Prop({ reflect: true }) first: number = 1;\n\n /**\n * Last element of the page\n */\n @Prop({ reflect: true }) last: number = 10;\n\n /**\n * Show button to navigate so first e last page\n */\n @Prop({ reflect: true }) showFirstAndLast: boolean = false;\n\n /* ---------------------- @EVENTS ------------------------- */\n @Event({ eventName: 'jump-change-page' }) changePage: EventEmitter;\n @Event({ eventName: 'jump-change-el-per-page' }) changeElPerPage: EventEmitter;\n\n /* -------------------- LYFECYCLE EVENTS ---------------------- */\n componentWillLoad() {\n this.elementsRangesArray = this.elementsRanges.split(',').map(Number);\n this.elPerPage = !this.elPerPage ? this.elementsRangesArray[0] : this.elPerPage;\n }\n\n /* -------------------- @LISTEN ------------------------------- */\n\n /* -------------------- @METHOD ------------------------------- */\n\n /* -------------------- LOCAL METHODS ------------------------- */\n setElPerPage(e) {\n this.elPerPage = e.target.value;\n }\n\n doChangePage(dir) {\n let newFirst;\n let newLast;\n\n //TODO refactorare\n if (dir === 'first') {\n newFirst = 1;\n newLast = Math.min(this.total, this.elPerPage);\n } else if (dir === 'last') {\n newLast = this.total;\n newFirst = Math.max(1, this.total - this.elPerPage + 1);\n } else if (dir === 'previous') {\n newFirst = Math.max(1, this.first - this.elPerPage);\n newLast = Math.min(this.total, newFirst + this.elPerPage - 1);\n } else if (dir === 'next') {\n newLast = Math.min(this.total, this.last + this.elPerPage);\n newFirst = Math.max(1, newLast - this.elPerPage + 1);\n }\n\n this.first = newFirst;\n this.last = newLast;\n\n let details = {\n first: newFirst,\n last: newLast,\n direction: dir\n }\n\n this.changePage.emit(details);\n }\n\n /* --------------------- RENDER ------------------------------- */\n render() {\n return (\n <Host class=\"JumpPaginationTable\">\n <div class=\"JumpPaginationTable__Wrapper\">\n <div class=\"elementsPerPage\">\n <label htmlFor=\"elements\">{this.labelElementsPerPage ?? 'Elements per page'}</label>\n <select name=\"elements\" id=\"elements\" onChange={(e) => this.setElPerPage(e)}>\n {this.elementsRangesArray.map((range) => (\n <option value={range} selected={(this.elPerPage == range) && true}>{range}</option>\n ))}\n </select>\n </div>\n <div class=\"indicators\">\n <div class=\"elements\">\n <span>\n <span>{this.first}</span> - <span>{this.last}</span> {this.pagLabel} <span>{this.total}</span>\n </span>\n </div>\n <div class=\"arrow\">\n {this.showFirstAndLast &&\n <jump-button onClick={() => this.doChangePage('first')} variant=\"primary\" text size=\"small\" name=\"scopri\" value=\"value\" aria-label=\"Scopri di più\" id=\"button\" onlyIcon disabled={this.first === 1}> <jump-icon slot=\"suffix\" name=\"chevrons-left\" ></jump-icon> </jump-button>\n }\n <jump-button onClick={() => this.doChangePage('previous')} variant=\"primary\" text size=\"small\" name=\"scopri\" value=\"value\" aria-label=\"Scopri di più\" id=\"button\" onlyIcon disabled={this.first === 1}> <jump-icon slot=\"suffix\" name=\"chevron-left\" ></jump-icon> </jump-button>\n <jump-button onClick={() => this.doChangePage('next')} variant=\"primary\" text size=\"small\" name=\"scopri\" value=\"value\" aria-label=\"Scopri di più\" id=\"button\" onlyIcon disabled={this.last === this.total}> <jump-icon slot=\"suffix\" name=\"chevron-right\" ></jump-icon> </jump-button>\n {this.showFirstAndLast &&\n <jump-button onClick={() => this.doChangePage('last')} variant=\"primary\" text size=\"small\" name=\"scopri\" value=\"value\" aria-label=\"Scopri di più\" id=\"button\" onlyIcon disabled={this.last === this.total}> <jump-icon slot=\"suffix\" name=\"chevrons-right\" ></jump-icon> </jump-button>\n }\n </div>\n </div>\n </div>\n </Host>\n );\n }\n\n}\n"],"mappings":"yDAAA,MAAMA,EAAyB,gxCAC/B,MAAAC,EAAeD,E,MCMFE,EAAmB,M,mJAaG,e,0EA4BW,K,0BAKY,sB,WAKf,I,WAKA,E,UAKD,G,sBAKa,K,CAjDrD,qBAAAC,CAAsBC,EAAUC,GAC9BC,QAAQC,IAAI,aACZ,GAAGH,IAAaC,EAAU,CACxBG,KAAKC,oBAAsBL,EAASM,MAAM,KAAKC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A,aAAAE,IAAA,2CAAWkB,KAAK,SAASb,KAAK,iBAA4B,KAClQP,EAAA,eAAAE,IAAA,2CAAaY,QAAS,IAAM3C,KAAKoB,aAAa,QAASwB,QAAQ,UAAUC,KAAI,KAACC,KAAK,QAAQV,KAAK,SAASjB,MAAM,QAAO,aAAY,gBAAgBkB,GAAG,SAASU,SAAQ,KAACC,SAAUhD,KAAKO,OAASP,KAAKU,OAAK,IAAGmB,EAAA,aAAAE,IAAA,2CAAWkB,KAAK,SAASb,KAAK,kBAA6B,KACtQpC,KAAK0C,kBACJb,EAAA,eAAAE,IAAA,2CAAaY,QAAS,IAAM3C,KAAKoB,aAAa,QAASwB,QAAQ,UAAUC,KAAI,KAACC,KAAK,QAAQV,KAAK,SAASjB,MAAM,QAAO,aAAY,gBAAgBkB,GAAG,SAASU,SAAQ,KAACC,SAAUhD,KAAKO,OAASP,KAAKU,OAAK,IAAGmB,EAAA,aAAAE,IAAA,2CAAWkB,KAAK,SAASb,KAAK,mBAA8B,Q"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{r as t,c as i,h as s,H as e,g as a}from"./p-1c5db8d3.js";const o=":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;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%;object-fit:cover;position:absolute;top:0;left:0;overflow:hidden}: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.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 .OutOfStock{justify-items:start;font-size:var(--fs-300);font-weight:var(--fw-900);color:var(--status-danger-standard)}: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(--status-danger-standard);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 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=o;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.onlyIconButton=false;this.hasBackground=false;this.badge=undefined;this.favorite=false;this.hasFavorite=false;this.hasSlotForFavorite=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.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()}}addOption(t){let i=t.detail;this.variations=[...this.variations,Object.assign({},i)]}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})}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 a=this.outOfStock?"justify-between":"";const o=this.hoverImg?"has-hover-image":"";const r=this.isMini?"is-mini":"";function n(t,i){const s=(t-i)/t*100;return s.toFixed(0)}return s(e,null,!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}`},s("a",{href:this.link},s("figure",{class:`Images ${o} `},this.img&&!this.videoSrc?s("img",{class:"Images__Front",src:this.img,alt:this.imgAlt}):"",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?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"}))):""),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.isMini&&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"}," ",n(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?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 ${a} ${t} ${i} ${r}`},this.outOfStock?s("div",{class:"OutOfStock"},this.outOfStockText?this.outOfStockText:"Esaurito"):"",this.outOfStock?s("jump-button",{variant:this.addToCartColor,size:"small",text:true,onClick:()=>this.waitingList()},s("jump-icon",{slot:"prefix",name:!this.outOfStock?"cart-shopping":"bell",category:"regular",size:"small"}),this.waitingListText):"",!this.outOfStock&&!this.onlyIconButton?s("jump-button",{variant:this.addToCartColor,size:"small",text:true,onClick:()=>this.addProductToCart()},s("jump-icon",{slot:"prefix",name:!this.outOfStock?"cart-shopping":"bell",category:"regular",size:"small"}),this.addToCartText):"")))}get JumpCardEcommerce(){return a(this)}};n.style=r;export{n as jump_card_ecommerce};
|
|
2
|
+
//# sourceMappingURL=p-b505bb33.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["jumpCardEcommerceCss","JumpCardEcommerceStyle0","JumpCardEcommerce","setPrice","price","salePrice","shouldFormat","this","formatPrices","addOption","e","props","detail","variations","Object","assign","onVariationSelected","currentValue","variationSelectEl","value","variation","find","code","selectedVariation","variationSelected","emit","componentWillLoad","componentDidLoad","jumpQuantityEl","querySelector","addEventListener","onQuantityChange","bind","quantity","getValue","then","disconnectedCallback","removeEventListener","_a","onToggleFavorite","favorite","toggleFavorite","productId","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","calculateDiscount","discount","toFixed","h","Host","badge","class","variant","badgeColor","dimension","label","hasFavorite","onClick","size","text","onlyIcon","slot","name","category","hasSlotForFavorite","href","link","img","videoSrc","src","alt","imgAlt","hoverImgAlt","autoplay","type","notificationUrl","notificationText","pill","productName","subtitle","currency","ref","el","onChange","filter","imgUrl","map","outOfStockText","addToCartColor","waitingListText","addToCartText"],"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\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 object-fit: cover;\n position: absolute;\n top: 0;\n left: 0;\n overflow: hidden;\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\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\n .OutOfStock {\n justify-items: start;\n font-size: var(--fs-300);\n font-weight: var(--fw-900);\n color: var(--status-danger-standard);\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(--status-danger-standard);\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 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 // 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\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 /** 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 /* ---------------------- @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 /**\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 @Listen('jump-card-ecommerce-option-connected')\n addOption(e) {\n let props = e.detail; // es {code: 'sku1', imageUrl: 'https://google.com/'}\n this.variations = [...this.variations, { ...props }];\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\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 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 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\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>\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 class={`Media ${iconOnlyClass} ${backgroundClass} ${miniCard}`}>\n <a href={this.link}>\n <figure class={`Images ${hasImageOnHover} `}>\n {this.img && !this.videoSrc ? <img class=\"Images__Front\" src={this.img} alt={this.imgAlt}></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 {!this.isMini && this.onlyIconButton ?\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 </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.isMini && 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 ?\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\n </div>\n\n <div class={`Footer ${justifyClass} ${backgroundClass} ${iconOnlyClass} ${miniCard}`}>\n\n {this.outOfStock ?\n <div class=\"OutOfStock\">{this.outOfStockText ? this.outOfStockText : 'Esaurito'}</div> : ''}\n\n {this.outOfStock ?\n <jump-button variant={this.addToCartColor} size=\"small\" text onClick={() => this.waitingList()}>\n <jump-icon slot=\"prefix\" name={!this.outOfStock ? 'cart-shopping' : 'bell'} category=\"regular\"\n size=\"small\"></jump-icon>\n {this.waitingListText}\n </jump-button> : ''\n }\n\n {!this.outOfStock && !this.onlyIconButton ?\n <jump-button variant={this.addToCartColor} size=\"small\" text onClick={() => this.addProductToCart()}>\n <jump-icon slot=\"prefix\" name={!this.outOfStock ? 'cart-shopping' : 'bell'} category=\"regular\"\n size=\"small\"></jump-icon>\n {this.addToCartText}\n </jump-button> : ''\n }\n\n </div>\n\n </div>\n </Host>\n );\n }\n\n}\n"],"mappings":"gEAAA,MAAMA,EAAuB,ogKAC7B,MAAAC,EAAeD,E,MCcFE,EAAiB,M,6QAQM,M,mBAGD,M,mCAM2B,M,iBAG7B,M,wBAGO,M,6LAwBH,uB,wIAkBR,I,oBAGyC,Y,gBAGyB,Y,gBAG/B,M,iDAM9B,uB,qBAGE,yB,sBAGE,M,YAGV,M,iBAKK,M,oBAEG,M,gBAEC,G,iGA6BnC,cAAMC,CAASC,EAAeC,GAC5B,IAAIC,EAAe,MACnB,GAAIF,GAASA,EAAQ,EAAG,CACtBE,EAAe,KACfC,KAAKH,MAAQA,C,CAGf,GAAIC,GAAaA,EAAY,EAAG,CAC9BE,KAAKF,UAAYA,C,CAGnB,GAAIC,EAAc,CAChBC,KAAKC,c,EAKT,SAAAC,CAAUC,GACR,IAAIC,EAAQD,EAAEE,OACdL,KAAKM,WAAa,IAAIN,KAAKM,WAAUC,OAAAC,OAAA,GAAOJ,G,CAG9C,mBAAAK,GACE,IAAIC,EAAeV,KAAKW,kBAAkBC,MAC1C,IAAIC,EAAYb,KAAKM,WAAWQ,MAC7BD,GAAcA,EAAUE,MAAQL,IAEnCV,KAAKgB,kBAAoBH,EACzBb,KAAKiB,kBAAkBC,KAAKL,E,CAM9B,iBAAAM,G,CAGA,gBAAAC,GACEpB,KAAKqB,eAAiBrB,KAAKL,kBAAkB2B,cAAc,iBAE3D,GAAItB,K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AA,aAAWa,KAAK,SAASC,MAAOnF,KAAK8D,WAAa,gBAAkB,OAAQsB,SAAS,UAC1EL,KAAK,UACf/E,KAAK8G,iBACS,IAGjB9G,KAAK8D,aAAe9D,KAAK4D,eACzBS,EAAA,eAAaI,QAASzE,KAAK6G,eAAgB9B,KAAK,QAAQC,KAAI,KAACF,QAAS,IAAM9E,KAAKoC,oBAC/EiC,EAAA,aAAWa,KAAK,SAASC,MAAOnF,KAAK8D,WAAa,gBAAkB,OAAQsB,SAAS,UAC1EL,KAAK,UACf/E,KAAK+G,eACS,K"}
|
|
@@ -322,6 +322,24 @@
|
|
|
322
322
|
"value": ""
|
|
323
323
|
},
|
|
324
324
|
"attributes": [
|
|
325
|
+
{
|
|
326
|
+
"name": "add-to-cart-color",
|
|
327
|
+
"description": "Indicates the variant of the button",
|
|
328
|
+
"values": [
|
|
329
|
+
{
|
|
330
|
+
"name": "neutral"
|
|
331
|
+
},
|
|
332
|
+
{
|
|
333
|
+
"name": "primary"
|
|
334
|
+
},
|
|
335
|
+
{
|
|
336
|
+
"name": "secondary"
|
|
337
|
+
},
|
|
338
|
+
{
|
|
339
|
+
"name": "white"
|
|
340
|
+
}
|
|
341
|
+
]
|
|
342
|
+
},
|
|
325
343
|
{
|
|
326
344
|
"name": "add-to-cart-text",
|
|
327
345
|
"description": "Indicates the button class of the add to cart / notification button"
|
|
@@ -338,6 +356,30 @@
|
|
|
338
356
|
"name": "badge",
|
|
339
357
|
"description": "Indicates the badge of the card"
|
|
340
358
|
},
|
|
359
|
+
{
|
|
360
|
+
"name": "badge-color",
|
|
361
|
+
"description": "Indicates the variant of the button",
|
|
362
|
+
"values": [
|
|
363
|
+
{
|
|
364
|
+
"name": "danger"
|
|
365
|
+
},
|
|
366
|
+
{
|
|
367
|
+
"name": "neutral"
|
|
368
|
+
},
|
|
369
|
+
{
|
|
370
|
+
"name": "primary"
|
|
371
|
+
},
|
|
372
|
+
{
|
|
373
|
+
"name": "secondary"
|
|
374
|
+
},
|
|
375
|
+
{
|
|
376
|
+
"name": "success"
|
|
377
|
+
},
|
|
378
|
+
{
|
|
379
|
+
"name": "warning"
|
|
380
|
+
}
|
|
381
|
+
]
|
|
382
|
+
},
|
|
341
383
|
{
|
|
342
384
|
"name": "currency",
|
|
343
385
|
"description": "Indicates the currency of the card"
|
|
@@ -350,10 +392,6 @@
|
|
|
350
392
|
"name": "favorite",
|
|
351
393
|
"description": "Indicates if the product is favorite"
|
|
352
394
|
},
|
|
353
|
-
{
|
|
354
|
-
"name": "favorite-href",
|
|
355
|
-
"description": "Indicates if the favorite button is render as an anchor, and define the url"
|
|
356
|
-
},
|
|
357
395
|
{
|
|
358
396
|
"name": "has-background",
|
|
359
397
|
"description": "Indicate if card has background"
|
|
@@ -744,6 +782,10 @@
|
|
|
744
782
|
"value": ""
|
|
745
783
|
},
|
|
746
784
|
"attributes": [
|
|
785
|
+
{
|
|
786
|
+
"name": "el-per-page",
|
|
787
|
+
"description": "Number of elements per page selected"
|
|
788
|
+
},
|
|
747
789
|
{
|
|
748
790
|
"name": "elements-ranges",
|
|
749
791
|
"description": "Values for the elements per page select"
|
|
@@ -20,8 +20,6 @@ export declare class JumpCardEcommerce {
|
|
|
20
20
|
hasFavorite: boolean;
|
|
21
21
|
/** Indicate if the whislist will be slotted*/
|
|
22
22
|
hasSlotForFavorite: boolean;
|
|
23
|
-
/** Indicates if the favorite button is render as an anchor, and define the url*/
|
|
24
|
-
favoriteHref: string;
|
|
25
23
|
/** Indicates the link of the card*/
|
|
26
24
|
link: string;
|
|
27
25
|
/** Indicates the image's src of the card*/
|
|
@@ -50,6 +48,10 @@ export declare class JumpCardEcommerce {
|
|
|
50
48
|
salePrice: number;
|
|
51
49
|
/** Indicates the currency of the card */
|
|
52
50
|
currency: string;
|
|
51
|
+
/** Indicates the variant of the button */
|
|
52
|
+
addToCartColor: 'primary' | 'secondary' | 'white' | 'neutral';
|
|
53
|
+
/** Indicates the variant of the button */
|
|
54
|
+
badgeColor: 'primary' | 'secondary' | 'neutral' | 'warning' | 'success' | 'danger';
|
|
53
55
|
/** Indicates if the product is outOfStock */
|
|
54
56
|
outOfStock: boolean;
|
|
55
57
|
/** Indicates the outOfStockText of the product*/
|
|
@@ -27,11 +27,6 @@ declare const _default: {
|
|
|
27
27
|
description: string;
|
|
28
28
|
control: string;
|
|
29
29
|
};
|
|
30
|
-
favoriteHref: {
|
|
31
|
-
name: string;
|
|
32
|
-
description: string;
|
|
33
|
-
control: string;
|
|
34
|
-
};
|
|
35
30
|
hasSlotForFavorite: {
|
|
36
31
|
name: string;
|
|
37
32
|
description: string;
|
|
@@ -125,6 +120,18 @@ declare const _default: {
|
|
|
125
120
|
description: string;
|
|
126
121
|
control: string;
|
|
127
122
|
};
|
|
123
|
+
addToCartColor: {
|
|
124
|
+
name: string;
|
|
125
|
+
description: string;
|
|
126
|
+
control: string;
|
|
127
|
+
options: string[];
|
|
128
|
+
};
|
|
129
|
+
badgeColor: {
|
|
130
|
+
name: string;
|
|
131
|
+
description: string;
|
|
132
|
+
control: string;
|
|
133
|
+
options: string[];
|
|
134
|
+
};
|
|
128
135
|
outOfStock: {
|
|
129
136
|
name: string;
|
|
130
137
|
description: string;
|
|
@@ -80,6 +80,19 @@ declare const _default: {
|
|
|
80
80
|
};
|
|
81
81
|
};
|
|
82
82
|
};
|
|
83
|
+
elPerPage: {
|
|
84
|
+
name: string;
|
|
85
|
+
control: string;
|
|
86
|
+
description: string;
|
|
87
|
+
table: {
|
|
88
|
+
type: {
|
|
89
|
+
summary: string;
|
|
90
|
+
};
|
|
91
|
+
defaultValue: {
|
|
92
|
+
summary: number;
|
|
93
|
+
};
|
|
94
|
+
};
|
|
95
|
+
};
|
|
83
96
|
showFirstAndLast: {
|
|
84
97
|
name: string;
|
|
85
98
|
control: string;
|
|
@@ -99,3 +112,4 @@ export default _default;
|
|
|
99
112
|
export declare const PlaygroundPagTable: any;
|
|
100
113
|
export declare const PaginationTableRidotto: any;
|
|
101
114
|
export declare const PaginationTableCompleto: any;
|
|
115
|
+
export declare const PaginationTableSetElPerPage: any;
|
|
@@ -153,6 +153,10 @@ export namespace Components {
|
|
|
153
153
|
"videoSrc": string;
|
|
154
154
|
}
|
|
155
155
|
interface JumpCardEcommerce {
|
|
156
|
+
/**
|
|
157
|
+
* Indicates the variant of the button
|
|
158
|
+
*/
|
|
159
|
+
"addToCartColor": 'primary' | 'secondary'|'white'|'neutral';
|
|
156
160
|
/**
|
|
157
161
|
* Indicates the button class of the add to cart / notification button
|
|
158
162
|
*/
|
|
@@ -169,6 +173,10 @@ export namespace Components {
|
|
|
169
173
|
* Indicates the badge of the card
|
|
170
174
|
*/
|
|
171
175
|
"badge": string;
|
|
176
|
+
/**
|
|
177
|
+
* Indicates the variant of the button
|
|
178
|
+
*/
|
|
179
|
+
"badgeColor": 'primary' | 'secondary' | 'neutral' | 'warning' | 'success' | 'danger';
|
|
172
180
|
/**
|
|
173
181
|
* Indicates the currency of the card
|
|
174
182
|
*/
|
|
@@ -178,10 +186,6 @@ export namespace Components {
|
|
|
178
186
|
* Indicates if the product is favorite
|
|
179
187
|
*/
|
|
180
188
|
"favorite": boolean;
|
|
181
|
-
/**
|
|
182
|
-
* Indicates if the favorite button is render as an anchor, and define the url
|
|
183
|
-
*/
|
|
184
|
-
"favoriteHref": string;
|
|
185
189
|
/**
|
|
186
190
|
* Indicate if card has background
|
|
187
191
|
*/
|
|
@@ -401,6 +405,10 @@ export namespace Components {
|
|
|
401
405
|
"showFirstAndLast": boolean;
|
|
402
406
|
}
|
|
403
407
|
interface JumpPaginationTable {
|
|
408
|
+
/**
|
|
409
|
+
* Number of elements per page selected
|
|
410
|
+
*/
|
|
411
|
+
"elPerPage": number;
|
|
404
412
|
/**
|
|
405
413
|
* Values for the elements per page select
|
|
406
414
|
*/
|
|
@@ -939,6 +947,10 @@ declare namespace LocalJSX {
|
|
|
939
947
|
"videoSrc"?: string;
|
|
940
948
|
}
|
|
941
949
|
interface JumpCardEcommerce {
|
|
950
|
+
/**
|
|
951
|
+
* Indicates the variant of the button
|
|
952
|
+
*/
|
|
953
|
+
"addToCartColor"?: 'primary' | 'secondary'|'white'|'neutral';
|
|
942
954
|
/**
|
|
943
955
|
* Indicates the button class of the add to cart / notification button
|
|
944
956
|
*/
|
|
@@ -955,6 +967,10 @@ declare namespace LocalJSX {
|
|
|
955
967
|
* Indicates the badge of the card
|
|
956
968
|
*/
|
|
957
969
|
"badge"?: string;
|
|
970
|
+
/**
|
|
971
|
+
* Indicates the variant of the button
|
|
972
|
+
*/
|
|
973
|
+
"badgeColor"?: 'primary' | 'secondary' | 'neutral' | 'warning' | 'success' | 'danger';
|
|
958
974
|
/**
|
|
959
975
|
* Indicates the currency of the card
|
|
960
976
|
*/
|
|
@@ -964,10 +980,6 @@ declare namespace LocalJSX {
|
|
|
964
980
|
* Indicates if the product is favorite
|
|
965
981
|
*/
|
|
966
982
|
"favorite"?: boolean;
|
|
967
|
-
/**
|
|
968
|
-
* Indicates if the favorite button is render as an anchor, and define the url
|
|
969
|
-
*/
|
|
970
|
-
"favoriteHref"?: string;
|
|
971
983
|
/**
|
|
972
984
|
* Indicate if card has background
|
|
973
985
|
*/
|
|
@@ -1180,6 +1192,10 @@ declare namespace LocalJSX {
|
|
|
1180
1192
|
"showFirstAndLast"?: boolean;
|
|
1181
1193
|
}
|
|
1182
1194
|
interface JumpPaginationTable {
|
|
1195
|
+
/**
|
|
1196
|
+
* Number of elements per page selected
|
|
1197
|
+
*/
|
|
1198
|
+
"elPerPage"?: number;
|
|
1183
1199
|
/**
|
|
1184
1200
|
* Values for the elements per page select
|
|
1185
1201
|
*/
|
package/package.json
CHANGED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r as t,c as i,h as s,H as e,g as a}from"./p-1c5db8d3.js";const o=":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;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%;object-fit:cover;position:absolute;top:0;left:0;overflow:hidden}: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.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)}: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 .OutOfStock{justify-items:start;font-size:var(--fs-300);font-weight:var(--fw-900);color:var(--status-danger-standard)}: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(--status-danger-standard);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 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 n=o;const r=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.onlyIconButton=false;this.hasBackground=false;this.badge=undefined;this.favorite=false;this.hasFavorite=false;this.hasSlotForFavorite=false;this.favoriteHref=undefined;this.link=undefined;this.img=undefined;this.imgAlt=undefined;this.hoverImg=undefined;this.hoverImgAlt=undefined;this.videoSrc=undefined;this.notificationUrl=undefined;this.notificationText="";this.productName=undefined;this.subtitle=undefined;this.productId=undefined;this.price=undefined;this.salePrice=undefined;this.currency="€";this.outOfStock=false;this.outOfStockText=undefined;this.addToCartText=undefined;this.waitingListText=undefined;this.addToWaitingList=false;this.isMini=false;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()}}addOption(t){let i=t.detail;this.variations=[...this.variations,Object.assign({},i)]}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})}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 a=this.outOfStock?"justify-between":"";const o=this.hoverImg?"has-hover-image":"";const n=this.isMini?"is-mini":"";function r(t,i){const s=(t-i)/t*100;return s.toFixed(0)}return s(e,null,!this.isMini&&this.badge?s("jump-badge",{class:`${t} ${i}`,variant:"secondary",dimension:"small",label:this.badge}):"",!this.isMini&&this.hasFavorite?this.favoriteHref!=""?s("jump-button",{href:this.favoriteHref,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"})):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} ${n}`},s("a",{href:this.link},s("figure",{class:`Images ${o} `},this.img&&!this.videoSrc?s("img",{class:"Images__Front",src:this.img,alt:this.imgAlt}):"",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?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"}))):""),s("div",{class:`Content ${t} ${i} ${n}`},s("div",{class:`Body ${t} ${i} ${n}`},s("div",null,s("div",{class:"Info"},s("div",{class:"Product"},this.productName),!this.isMini&&this.subtitle?s("div",{class:"Subtitle"},this.subtitle):null),this.price?s("div",{class:`Price ${n}`},!this.isMini&&this.salePrice&&this.salePrice<this.price?s("div",{class:"Price__Discount"}," ",r(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?s("div",{class:"SelectVariations"},this.variations.length!=0?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):null,!this.isMini?s("slot",{name:"quantity"}):null),s("div",{class:`Footer ${a} ${t} ${i} ${n}`},this.outOfStock?s("div",{class:"OutOfStock"},this.outOfStockText?this.outOfStockText:"Esaurito"):"",this.outOfStock?s("jump-button",{variant:"secondary",size:"small",text:true,onClick:()=>this.waitingList()},s("jump-icon",{slot:"prefix",name:!this.outOfStock?"cart-shopping":"bell",category:"regular",size:"small"}),this.waitingListText?this.waitingListText:"Notifica disponibilità"):"",!this.outOfStock&&!this.onlyIconButton?s("jump-button",{variant:"secondary",size:"small",text:true,onClick:()=>this.addProductToCart()},s("jump-icon",{slot:"prefix",name:!this.outOfStock?"cart-shopping":"bell",category:"regular",size:"small"}),this.addToCartText?this.addToCartText:"Aggiungi al carrello"):"")))}get JumpCardEcommerce(){return a(this)}};r.style=n;export{r as jump_card_ecommerce};
|
|
2
|
-
//# sourceMappingURL=p-24cac36a.entry.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["jumpCardEcommerceCss","JumpCardEcommerceStyle0","JumpCardEcommerce","setPrice","price","salePrice","shouldFormat","this","formatPrices","addOption","e","props","detail","variations","Object","assign","onVariationSelected","currentValue","variationSelectEl","value","variation","find","code","selectedVariation","variationSelected","emit","componentWillLoad","componentDidLoad","jumpQuantityEl","querySelector","addEventListener","onQuantityChange","bind","quantity","getValue","then","disconnectedCallback","removeEventListener","_a","onToggleFavorite","favorite","toggleFavorite","productId","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","calculateDiscount","discount","toFixed","h","Host","badge","class","variant","dimension","label","hasFavorite","favoriteHref","href","onClick","size","text","onlyIcon","slot","name","category","hasSlotForFavorite","link","img","videoSrc","src","alt","imgAlt","hoverImgAlt","autoplay","type","notificationUrl","notificationText","pill","productName","subtitle","currency","ref","el","onChange","filter","imgUrl","map","outOfStockText","waitingListText","addToCartText"],"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\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 object-fit: cover;\n position: absolute;\n top: 0;\n left: 0;\n overflow: hidden;\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\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 }\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\n .OutOfStock {\n justify-items: start;\n font-size: var(--fs-300);\n font-weight: var(--fw-900);\n color: var(--status-danger-standard);\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(--status-danger-standard);\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 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 // 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\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\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 /** Indicates if the favorite button is render as an anchor, and define the url*/\n @Prop() favoriteHref: string;\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 = '';\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 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;\n\n /** Indicates the button class of the add to cart / notification button */\n @Prop() waitingListText: string;\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 /* ---------------------- @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 /**\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 @Listen('jump-card-ecommerce-option-connected')\n addOption(e) {\n let props = e.detail; // es {code: 'sku1', imageUrl: 'https://google.com/'}\n this.variations = [...this.variations, { ...props }];\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\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 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 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\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>\n {!this.isMini && this.badge ?\n <jump-badge class={`${backgroundClass} ${iconOnlyClass}`} variant=\"secondary\" dimension=\"small\"\n label={this.badge}></jump-badge> : ''}\n\n {!this.isMini && this.hasFavorite ?\n this.favoriteHref != '' ?\n <jump-button href={this.favoriteHref} onClick={() => this.onToggleFavorite()}\n 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 <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 class={`Media ${iconOnlyClass} ${backgroundClass} ${miniCard}`}>\n <a href={this.link}>\n <figure class={`Images ${hasImageOnHover} `}>\n {this.img && !this.videoSrc ? <img class=\"Images__Front\" src={this.img} alt={this.imgAlt}></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 {!this.isMini && this.onlyIconButton ?\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 </div>\n\n <div class={`Content ${backgroundClass} ${iconOnlyClass} ${miniCard}`}>\n <div class={`Body ${backgroundClass} ${iconOnlyClass} ${miniCard}`}>\n <div>\n <div class=\"Info\">\n <div class=\"Product\">{this.productName}</div>\n {!this.isMini && 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 ?\n <div class=\"SelectVariations\">\n {this.variations.length != 0 ?\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 : null}\n </div>\n : null}\n\n {!this.isMini ? <slot name=\"quantity\"></slot> : null}\n </div>\n\n <div class={`Footer ${justifyClass} ${backgroundClass} ${iconOnlyClass} ${miniCard}`}>\n\n {this.outOfStock ?\n <div class=\"OutOfStock\">{this.outOfStockText ? this.outOfStockText : 'Esaurito'}</div> : ''}\n\n {this.outOfStock ?\n <jump-button variant=\"secondary\" size=\"small\" text onClick={() => this.waitingList()}>\n <jump-icon slot=\"prefix\" name={!this.outOfStock ? 'cart-shopping' : 'bell'} category=\"regular\"\n size=\"small\"></jump-icon>\n {this.waitingListText ? this.waitingListText : 'Notifica disponibilità'}\n </jump-button> : ''\n }\n\n {!this.outOfStock && !this.onlyIconButton ?\n <jump-button variant=\"secondary\" size=\"small\" text onClick={() => this.addProductToCart()}>\n <jump-icon slot=\"prefix\" name={!this.outOfStock ? 'cart-shopping' : 'bell'} category=\"regular\"\n size=\"small\"></jump-icon>\n {this.addToCartText ? this.addToCartText : 'Aggiungi al carrello'}\n </jump-button> : ''\n }\n\n </div>\n\n </div>\n </Host>\n );\n }\n\n}\n"],"mappings":"gEAAA,MAAMA,EAAuB,68JAC7B,MAAAC,EAAeD,E,MCcFE,EAAiB,M,6QAQM,M,mBAGD,M,mCAO2B,M,iBAG7B,M,wBAGO,M,yNA2BH,G,wIAkBR,I,gBAGmC,M,gHAY1B,M,YAGV,M,iBAKK,M,oBAEG,M,gBAEC,G,iGA6BnC,cAAMC,CAASC,EAAeC,GAC5B,IAAI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
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r as e,c as a,h as t,H as i}from"./p-1c5db8d3.js";const s=":host{display:block}.JumpPaginationTable{--jump-pagination-table-label:var(--neutral-grey-secondary);--jump-pagination-table-arrows:var(--neutral-grey-secondary);--jump-pagination-table-arrows-disabled:var(--neutral-grey-disabled);font-family:var(--ff-primary)}.JumpPaginationTable__Wrapper{display:flex;justify-content:space-between}.JumpPaginationTable__Wrapper .elementsPerPage{display:flex;gap:1rem;align-items:center}.JumpPaginationTable__Wrapper .elementsPerPage label{color:var(--jump-pagination-table-label);font-size:var(--fs-300);font-weight:normal}.JumpPaginationTable__Wrapper .indicators{font-size:var(--fs-400);font-weight:normal;display:flex;justify-content:space-between;gap:20px;color:var(--jump-pagination-table-label)}.JumpPaginationTable__Wrapper .indicators .arrow{color:var(--jump-pagination-table-arrows);display:flex;align-items:center;gap:10px}.JumpPaginationTable__Wrapper .indicators .arrow button{background-color:transparent;border:none;cursor:pointer;padding:0px;display:flex;align-items:center}.JumpPaginationTable__Wrapper .indicators .arrow button:disabled{cursor:not-allowed;color:var(--jump-pagination-table-arrows-disabled)}.JumpPaginationTable__Wrapper .indicators .elements{color:var(--jump-pagination-table-label);display:flex;align-items:center;gap:5px}";const n=s;const l=class{constructor(t){e(this,t);this.changePage=a(this,"jump-change-page",7);this.changeElPerPage=a(this,"jump-change-el-per-page",7);this.elementsRanges="10,20,60,100";this.elementsRangesArray=undefined;this.elPerPage=undefined;this.pagLabel="di";this.labelElementsPerPage="Elementi per pagina";this.total=100;this.first=1;this.last=10;this.showFirstAndLast=false}elementsRangesChanged(e,a){console.log("dentro el");if(e!==a){this.elementsRangesArray=e.split(",").map(Number)}this.elementsRangesArray=[...this.elementsRangesArray];console.log("elementsRangesChanged",e,a)}elPerPageChanged(e,a){if(e!==a){this.first=1;this.last=Math.min(this.total,e)}this.changeElPerPage.emit({elPerPage:e})}componentWillLoad(){this.elementsRangesArray=this.elementsRanges.split(",").map(Number);this.elPerPage=this.elementsRangesArray[0]}setElPerPage(e){this.elPerPage=e.target.value}doChangePage(e){let a;let t;if(e==="first"){a=1;t=Math.min(this.total,this.elPerPage)}else if(e==="last"){t=this.total;a=Math.max(1,this.total-this.elPerPage+1)}else if(e==="previous"){a=Math.max(1,this.first-this.elPerPage);t=Math.min(this.total,a+this.elPerPage-1)}else if(e==="next"){t=Math.min(this.total,this.last+this.elPerPage);a=Math.max(1,t-this.elPerPage+1)}this.first=a;this.last=t;let i={first:a,last:t,direction:e};this.changePage.emit(i)}render(){var e;return t(i,{key:"1dda2093aa5db80f7f6260ec3b7b5bd72d4052e0",class:"JumpPaginationTable"},t("div",{key:"5a2b79b4edae8d0e57634adebf82420e0af35c70",class:"JumpPaginationTable__Wrapper"},t("div",{key:"a850c96c7271cb8a1c397a9a2ddc73bdf2ee7c29",class:"elementsPerPage"},t("label",{key:"6492f9b966c7d478294d94e094738326c61cdccd",htmlFor:"elements"},(e=this.labelElementsPerPage)!==null&&e!==void 0?e:"Elements per page"),t("select",{key:"9267913fac8a30d4a9c0808311cadcc1bbaf3040",name:"elements",id:"elements",onChange:e=>this.setElPerPage(e)},this.elementsRangesArray.map((e=>t("option",{value:e,selected:this.elPerPage==e&&true},e))))),t("div",{key:"b537b63284129d72b74f5840c746e8c2af64ad5b",class:"indicators"},t("div",{key:"953b71539236ec5568aa05c27c6013b410cf1bb2",class:"elements"},t("span",{key:"a4a7e076ae54547c28efe931abc6c47e46a10210"},t("span",{key:"9aef003d0e4ae086054ed93474f41f41c9a8c9a0"},this.first)," - ",t("span",{key:"8b21dcbe189896770d960f234be75b79aa472488"},this.last)," ",this.pagLabel," ",t("span",{key:"5bed4022d88261ba0f81ea1c4efe638e7b618256"},this.total))),t("div",{key:"e5e9157e33a0bc378ce23c067ca1697118f8e60a",class:"arrow"},this.showFirstAndLast&&t("jump-button",{key:"425e0f5133d814a6d4ebc73a0286cddbb377e778",onClick:()=>this.doChangePage("first"),variant:"primary",text:true,size:"small",name:"scopri",value:"value","aria-label":"Scopri di più",id:"button",onlyIcon:true,disabled:this.first===1}," ",t("jump-icon",{key:"042d40650b7e22c7039f7a36f6bd139219ae7ee6",slot:"suffix",name:"chevrons-left"})," "),t("jump-button",{key:"766ebbcfa2d5dec6094fa38f42b1a4fa41bc96d3",onClick:()=>this.doChangePage("previous"),variant:"primary",text:true,size:"small",name:"scopri",value:"value","aria-label":"Scopri di più",id:"button",onlyIcon:true,disabled:this.first===1}," ",t("jump-icon",{key:"f7e98586070a619cc614c2aaaf7cc8176f8c8737",slot:"suffix",name:"chevron-left"})," "),t("jump-button",{key:"e72ab0fd379b3ba4028ea454218f75d7d9871988",onClick:()=>this.doChangePage("next"),variant:"primary",text:true,size:"small",name:"scopri",value:"value","aria-label":"Scopri di più",id:"button",onlyIcon:true,disabled:this.last===this.total}," ",t("jump-icon",{key:"92c2a994bbadbdb6ac40044426587bfe8ecf790d",slot:"suffix",name:"chevron-right"})," "),this.showFirstAndLast&&t("jump-button",{key:"7028f82644633bfb112f62f2fba3bc7eef9754cf",onClick:()=>this.doChangePage("last"),variant:"primary",text:true,size:"small",name:"scopri",value:"value","aria-label":"Scopri di più",id:"button",onlyIcon:true,disabled:this.last===this.total}," ",t("jump-icon",{key:"4240630bbd9a0c0c219d15a0ea6eeb65883c0a4b",slot:"suffix",name:"chevrons-right"})," ")))))}static get watchers(){return{elementsRanges:["elementsRangesChanged"],elPerPage:["elPerPageChanged"]}}};l.style=n;export{l as jump_pagination_table};
|
|
2
|
-
//# sourceMappingURL=p-745c61b2.entry.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["jumpPaginationTableCss","JumpPaginationTableStyle0","JumpPaginationTable","elementsRangesChanged","newValue","oldValue","console","log","this","elementsRangesArray","split","map","Number","elPerPageChanged","first","last","Math","min","total","changeElPerPage","emit","elPerPage","componentWillLoad","elementsRanges","setElPerPage","e","target","value","doChangePage","dir","newFirst","newLast","max","details","direction","changePage","render","h","Host","key","class","htmlFor","_a","labelElementsPerPage","name","id","onChange","range","selected","pagLabel","showFirstAndLast","onClick","variant","text","size","onlyIcon","disabled","slot"],"sources":["src/components/jump-pagination-table/jump-pagination-table.scss?tag=jump-pagination-table","src/components/jump-pagination-table/jump-pagination-table.tsx"],"sourcesContent":[":host {\n display: block;\n}\n\n.JumpPaginationTable {\n --jump-pagination-table-label: var(--neutral-grey-secondary);\n --jump-pagination-table-arrows: var(--neutral-grey-secondary);\n --jump-pagination-table-arrows-disabled: var(--neutral-grey-disabled); //mappare una variabile del design system\n\n font-family: var(--ff-primary);\n\n &__Wrapper {\n display: flex;\n justify-content: space-between;\n \n .elementsPerPage {\n display: flex;\n gap: 1rem;\n align-items: center;\n \n label {\n color: var(--jump-pagination-table-label);\n font-size: var(--fs-300);\n font-weight: normal;\n }\n }\n \n .indicators {\n font-size: var(--fs-400);\n font-weight: normal;\n display: flex;\n justify-content: space-between;\n gap: 20px;\n \n color: var(--jump-pagination-table-label);\n \n .arrow {\n color: var(--jump-pagination-table-arrows);\n display: flex;\n align-items: center;\n gap: 10px;\n \n button {\n background-color: transparent;\n border: none;\n cursor: pointer;\n padding: 0px;\n display: flex;\n align-items: center;\n }\n \n button:disabled {\n cursor: not-allowed;\n color: var(--jump-pagination-table-arrows-disabled);\n \n }\n }\n \n .elements {\n color: var(--jump-pagination-table-label);\n display: flex;\n align-items: center;\n gap: 5px;\n }\n }\n \n }\n}","import { Component, State, Event, EventEmitter, Watch, Host, Prop, h } from '@stencil/core';\n\n@Component({\n tag: 'jump-pagination-table',\n styleUrl: 'jump-pagination-table.scss',\n shadow: false,\n})\nexport class JumpPaginationTable {\n\n /* ---------------------- OWN PROPERTIES ---------------------- */\n\n /* ---------------------- @ELEMENT ---------------------------- */\n\n /* ---------------------- @STATE ------------------------------ */\n\n /* ---------------------- @PROPERTIES ------------------------- */\n\n /**\n * Values for the elements per page select\n */\n @Prop() elementsRanges: string = \"10,20,60,100\";\n\n @State() elementsRangesArray: number[];\n @Watch('elementsRanges')\n elementsRangesChanged(newValue, oldValue) {\n console.log('dentro el');\n if(newValue !== oldValue) {\n this.elementsRangesArray = newValue.split(',').map(Number);\n }\n this.elementsRangesArray = [...this.elementsRangesArray]\n console.log('elementsRangesChanged', newValue, oldValue);\n }\n\n /**\n * Number of elements per page selected\n */\n @State() elPerPage: number;\n @Watch('elPerPage')\n elPerPageChanged(newValue: number, oldValue: number) {\n if (newValue !== oldValue) {\n // Riporta la paginazione allo stato iniziale\n this.first = 1;\n this.last = Math.min(this.total, newValue);\n }\n\n this.changeElPerPage.emit({ elPerPage: newValue });\n }\n\n @Prop({ reflect: true }) pagLabel: string = 'di'; // Identifica la label testuale di pagination. \n\n /**\n * Label for the elements per page select\n */\n @Prop({ reflect: true }) labelElementsPerPage: string = 'Elementi per pagina';\n\n /**\n * Total of elements\n */\n @Prop({ reflect: true }) total: number = 100; \n\n /**\n * First element of the page\n */\n @Prop({ reflect: true }) first: number = 1;\n\n /**\n * Last element of the page\n */\n @Prop({ reflect: true }) last: number = 10;\n\n /**\n * Show button to navigate so first e last page\n */\n @Prop({ reflect: true }) showFirstAndLast: boolean = false;\n\n /* ---------------------- @EVENTS ------------------------- */\n @Event({ eventName: 'jump-change-page' }) changePage: EventEmitter;\n @Event({ eventName: 'jump-change-el-per-page' }) changeElPerPage: EventEmitter;\n\n /* -------------------- LYFECYCLE EVENTS ---------------------- */\n componentWillLoad() {\n this.elementsRangesArray = this.elementsRanges.split(',').map(Number);\n this.elPerPage = this.elementsRangesArray[0];\n }\n\n /* -------------------- @LISTEN ------------------------------- */\n\n /* -------------------- @METHOD ------------------------------- */\n\n /* -------------------- LOCAL METHODS ------------------------- */\n setElPerPage(e) {\n this.elPerPage = e.target.value;\n }\n\n doChangePage(dir) {\n let newFirst;\n let newLast;\n\n //TODO refactorare \n if (dir === 'first') {\n newFirst = 1;\n newLast = Math.min(this.total, this.elPerPage);\n } else if (dir === 'last') {\n newLast = this.total;\n newFirst = Math.max(1, this.total - this.elPerPage + 1);\n } else if (dir === 'previous') {\n newFirst = Math.max(1, this.first - this.elPerPage);\n newLast = Math.min(this.total, newFirst + this.elPerPage - 1);\n } else if (dir === 'next') {\n newLast = Math.min(this.total, this.last + this.elPerPage);\n newFirst = Math.max(1, newLast - this.elPerPage + 1);\n }\n\n this.first = newFirst;\n this.last = newLast;\n\n let details = {\n first: newFirst,\n last: newLast,\n direction: dir\n }\n\n this.changePage.emit(details);\n }\n\n /* --------------------- RENDER ------------------------------- */\n render() {\n return (\n <Host class=\"JumpPaginationTable\">\n <div class=\"JumpPaginationTable__Wrapper\">\n <div class=\"elementsPerPage\">\n <label htmlFor=\"elements\">{this.labelElementsPerPage ?? 'Elements per page'}</label>\n <select name=\"elements\" id=\"elements\" onChange={(e) => this.setElPerPage(e)}>\n {this.elementsRangesArray.map((range) => (\n <option value={range} selected={(this.elPerPage == range) && true}>{range}</option>\n ))}\n </select>\n </div> \n <div class=\"indicators\">\n <div class=\"elements\">\n <span>\n <span>{this.first}</span> - <span>{this.last}</span> {this.pagLabel} <span>{this.total}</span>\n </span>\n </div>\n <div class=\"arrow\">\n {this.showFirstAndLast &&\n <jump-button onClick={() => this.doChangePage('first')} variant=\"primary\" text size=\"small\" name=\"scopri\" value=\"value\" aria-label=\"Scopri di più\" id=\"button\" onlyIcon disabled={this.first === 1}> <jump-icon slot=\"suffix\" name=\"chevrons-left\" ></jump-icon> </jump-button>\n }\n <jump-button onClick={() => this.doChangePage('previous')} variant=\"primary\" text size=\"small\" name=\"scopri\" value=\"value\" aria-label=\"Scopri di più\" id=\"button\" onlyIcon disabled={this.first === 1}> <jump-icon slot=\"suffix\" name=\"chevron-left\" ></jump-icon> </jump-button>\n <jump-button onClick={() => this.doChangePage('next')} variant=\"primary\" text size=\"small\" name=\"scopri\" value=\"value\" aria-label=\"Scopri di più\" id=\"button\" onlyIcon disabled={this.last === this.total}> <jump-icon slot=\"suffix\" name=\"chevron-right\" ></jump-icon> </jump-button>\n {this.showFirstAndLast &&\n <jump-button onClick={() => this.doChangePage('last')} variant=\"primary\" text size=\"small\" name=\"scopri\" value=\"value\" aria-label=\"Scopri di più\" id=\"button\" onlyIcon disabled={this.last === this.total}> <jump-icon slot=\"suffix\" name=\"chevrons-right\" ></jump-icon> </jump-button>\n }\n </div>\n </div>\n </div>\n </Host>\n );\n }\n\n}\n"],"mappings":"yDAAA,MAAMA,EAAyB,gxCAC/B,MAAAC,EAAeD,E,MCMFE,EAAmB,M,mJAaG,e,0EA4BW,K,0BAKY,sB,WAKf,I,WAKA,E,UAKD,G,sBAKa,K,CAjDrD,qBAAAC,CAAsBC,EAAUC,GAC9BC,QAAQC,IAAI,aACZ,GAAGH,IAAaC,EAAU,CACxBG,KAAKC,oBAAsBL,EAASM,MAAM,KAAKC,IAAIC,O,CAErDJ,KAAKC,oBAAsB,IAAID,KAAKC,qBACpCH,QAAQC,IAAI,wBAAyBH,EAAUC,E,CAQjD,gBAAAQ,CAAiBT,EAAkBC,GACjC,GAAID,IAAaC,EAAU,CAEzBG,KAAKM,MAAQ,EACbN,KAAKO,KAAOC,KAAKC,IAAIT,KAAKU,MAAOd,E,CAGnCI,KAAKW,gBAAgBC,KAAK,CAAEC,UAAWjB,G,CAmCzC,iBAAAkB,GACEd,KAAKC,oBAAsBD,KAAKe,eAAeb,MAAM,KAAKC,IAAIC,QAC9DJ,KAAKa,UAAYb,KAAKC,oBAAoB,E,CAQ5C,YAAAe,CAAaC,GACXjB,KAAKa,UAAYI,EAAEC,OAAOC,K,CAG5B,YAAAC,CAAaC,GACX,IAAIC,EACJ,IAAIC,EAGJ,GAAIF,IAAQ,QAAS,CACnBC,EAAW,EACXC,EAAUf,KAAKC,IAAIT,KAAKU,MAAOV,KAAKa,U,MAC/B,GAAIQ,IAAQ,OAAQ,CACzBE,EAAUvB,KAAKU,MACfY,EAAWd,KAAKgB,IAAI,EAAGxB,KAAKU,MAAQV,KAAKa,UAAY,E,MAChD,GAAIQ,IAAQ,WAAY,CAC7BC,EAAWd,KAAKgB,IAAI,EAAGxB,KA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