@jumpgroup/jump-design-system 0.3.79 → 0.3.81

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.
Files changed (42) hide show
  1. package/dist/cjs/jump-card-ecommerce.cjs.entry.js +32 -5
  2. package/dist/cjs/jump-card-ecommerce.cjs.entry.js.map +1 -1
  3. package/dist/cjs/jump-design-system.cjs.js +1 -1
  4. package/dist/cjs/jump-filter-range.cjs.entry.js +44 -74
  5. package/dist/cjs/jump-filter-range.cjs.entry.js.map +1 -1
  6. package/dist/cjs/loader.cjs.js +1 -1
  7. package/dist/collection/components/jump-card-ecommerce/jump-card-ecommerce.css +10 -0
  8. package/dist/collection/components/jump-card-ecommerce/jump-card-ecommerce.js +99 -4
  9. package/dist/collection/components/jump-card-ecommerce/jump-card-ecommerce.js.map +1 -1
  10. package/dist/collection/components/jump-card-ecommerce/jump-card-ecommerce.stories.js +47 -0
  11. package/dist/collection/components/jump-card-ecommerce/jump-card-ecommerce.stories.js.map +1 -1
  12. package/dist/collection/components/jump-filter-range/jump-filter-range.js +76 -128
  13. package/dist/collection/components/jump-filter-range/jump-filter-range.js.map +1 -1
  14. package/dist/collection/components/jump-filter-range/jump-filter-range.stories.js +13 -4
  15. package/dist/collection/components/jump-filter-range/jump-filter-range.stories.js.map +1 -1
  16. package/dist/components/jump-card-ecommerce.js +35 -5
  17. package/dist/components/jump-card-ecommerce.js.map +1 -1
  18. package/dist/components/jump-filter-range.js +51 -81
  19. package/dist/components/jump-filter-range.js.map +1 -1
  20. package/dist/esm/jump-card-ecommerce.entry.js +32 -5
  21. package/dist/esm/jump-card-ecommerce.entry.js.map +1 -1
  22. package/dist/esm/jump-design-system.js +1 -1
  23. package/dist/esm/jump-filter-range.entry.js +44 -74
  24. package/dist/esm/jump-filter-range.entry.js.map +1 -1
  25. package/dist/esm/loader.js +1 -1
  26. package/dist/jump-design-system/jump-design-system.esm.js +1 -1
  27. package/dist/jump-design-system/jump-design-system.esm.js.map +1 -1
  28. package/dist/jump-design-system/p-7f7935f0.entry.js +2 -0
  29. package/dist/jump-design-system/p-7f7935f0.entry.js.map +1 -0
  30. package/dist/jump-design-system/p-e30da431.entry.js +2 -0
  31. package/dist/jump-design-system/p-e30da431.entry.js.map +1 -0
  32. package/dist/jump-design-system-elements.json +20 -0
  33. package/dist/types/components/jump-card-ecommerce/jump-card-ecommerce.d.ts +11 -0
  34. package/dist/types/components/jump-card-ecommerce/jump-card-ecommerce.stories.d.ts +8 -0
  35. package/dist/types/components/jump-filter-range/jump-filter-range.d.ts +10 -36
  36. package/dist/types/components/jump-filter-range/jump-filter-range.stories.d.ts +1 -0
  37. package/dist/types/components.d.ts +43 -20
  38. package/package.json +1 -1
  39. package/dist/jump-design-system/p-7ac9382b.entry.js +0 -2
  40. package/dist/jump-design-system/p-7ac9382b.entry.js.map +0 -1
  41. package/dist/jump-design-system/p-d70793e3.entry.js +0 -2
  42. package/dist/jump-design-system/p-d70793e3.entry.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"names":["patchBrowser","importMeta","url","opts","resourcesUrl","URL","href","promiseResolve","then","async","options","globalScripts","bootstrapLazy","onlyIconButton","hasBackground","badge","favorite","hasFavorite","hasSlotForFavorite","hasSlotAddToCart","link","img","imgAlt","hoverImg","hoverImgAlt","videoSrc","notificationUrl","notificationText","productName","subtitle","productId","price","salePrice","currency","addToCartColor","badgeColor","outOfStock","outOfStockText","addToCartText","waitingListText","addToWaitingList","isMini","addedToCart","endAddedToCart","variations","selectedVariation","priceFormatted","salePriceFormatted","setPrice","direction","filterHeading","filterButtonLabel","filterButtonIcon","mobileThreshold","filters","showCount","offCanvasOverlay","activeFilters","showMobileFilters","isMobile","offCanvasClasses","getFilters","name","heading","otherLabel","lessLabel","maxElements","variant","label","values","value","slotItems","inputs","showMore","getValues","getActiveAmount","getInputs","getName","logo","navItems","secondaryNavItems","type","navPosition","megaMenuAlignment","sticky","stickyThreshold","mobileLogo","user","pagLabel","last","showFirstAndLast","current","elementsRanges","elPerPage","labelElementsPerPage","total","first","elementsRangesArray","min","max","step","showButtons","internalValue","getValue","setMax","reset","searchValue","placeholder","noResultText","loadingText","resultsText","showAllResText","identifier","debounceTime","withBtn","recentsTitle","recents","results","dropdown","linearIconOnly","dropdownPosition","dropdownVisible","resType","innerResults","totalResults","isExpanded","setResults","isOpen","summary","disabled","open","icon","isCartOpen","position","cartItems","iconName","iconPosition","active","groupIdentifier","horizontal","dark","shadow","border","borderRadius","topBorderContentRadius","boxed","roundedMedia","imgSrc","code","imgUrl","sku","taxonomy","checked","count","isChecked","labelMinBefore","labelMinAfter","labelMaxBefore","labelMaxAfter","minVal","maxVal","setValue","multiple","required","loading","getSelectedValue","getSelectedOption","details","alignment","fullBorder","tabGroupName","items","discountThreshold","freeShippingThreshold","progressPercentage","checkoutLabel","viewCartLabel","shippingInfo","dimension","soft","outline","size","full","pill","text","onlyIcon","target","ariaLabel","class","buttonId","library","category","src"],"sources":["node_modules/@stencil/core/internal/client/patch-browser.js","@lazy-browser-entrypoint?app-data=conditional"],"sourcesContent":["/*\n Stencil Client Patch Browser v4.18.2 | MIT Licensed | https://stenciljs.com\n */\n\n// src/client/client-patch-browser.ts\nimport { BUILD, NAMESPACE } from \"@stencil/core/internal/app-data\";\nimport { consoleDevInfo, doc, H, promiseResolve } from \"@stencil/core\";\nvar patchBrowser = () => {\n if (BUILD.isDev && !BUILD.isTesting) {\n consoleDevInfo(\"Running in development mode.\");\n }\n if (BUILD.cloneNodeFix) {\n patchCloneNodeFix(H.prototype);\n }\n const scriptElm = BUILD.scriptDataOpts ? Array.from(doc.querySelectorAll(\"script\")).find(\n (s) => new RegExp(`/${NAMESPACE}(\\\\.esm)?\\\\.js($|\\\\?|#)`).test(s.src) || s.getAttribute(\"data-stencil-namespace\") === NAMESPACE\n ) : null;\n const importMeta = import.meta.url;\n const opts = BUILD.scriptDataOpts ? (scriptElm || {})[\"data-opts\"] || {} : {};\n if (importMeta !== \"\") {\n opts.resourcesUrl = new URL(\".\", importMeta).href;\n }\n return promiseResolve(opts);\n};\nvar patchCloneNodeFix = (HTMLElementPrototype) => {\n const nativeCloneNodeFn = HTMLElementPrototype.cloneNode;\n HTMLElementPrototype.cloneNode = function(deep) {\n if (this.nodeName === \"TEMPLATE\") {\n return nativeCloneNodeFn.call(this, deep);\n }\n const clonedNode = nativeCloneNodeFn.call(this, false);\n const srcChildNodes = this.childNodes;\n if (deep) {\n for (let i = 0; i < srcChildNodes.length; i++) {\n if (srcChildNodes[i].nodeType !== 2) {\n clonedNode.appendChild(srcChildNodes[i].cloneNode(true));\n }\n }\n }\n return clonedNode;\n };\n};\nexport {\n patchBrowser\n};\n","export { setNonce } from '@stencil/core';\nimport { bootstrapLazy } from '@stencil/core';\nimport { patchBrowser } from '@stencil/core/internal/client/patch-browser';\nimport { globalScripts } from '@stencil/core/internal/app-globals';\npatchBrowser().then(async (options) => {\n await globalScripts();\n return bootstrapLazy([/*!__STENCIL_LAZY_DATA__*/], options);\n});\n"],"mappings":"0HAOA,IAAIA,EAAe,KAUjB,MAAMC,cAAyBC,IAC/B,MAAMC,EAAqE,GAC3E,GAAIF,IAAe,GAAI,CACrBE,EAAKC,aAAe,IAAIC,IAAI,IAAKJ,GAAYK,IACjD,CACE,OAAOC,EAAeJ,EAAK,EClB7BH,IAAeQ,MAAKC,MAAOC,UACnBC,IACN,OAAOC,EAAc,yCAAuC,CAAAC,eAAA,uBAAAC,cAAA,qBAAAC,MAAA,IAAAC,SAAA,OAAAC,YAAA,mBAAAC,mBAAA,4BAAAC,iBAAA,2BAAAC,KAAA,IAAAC,IAAA,IAAAC,OAAA,cAAAC,SAAA,gBAAAC,YAAA,oBAAAC,SAAA,gBAAAC,gBAAA,uBAAAC,iBAAA,wBAAAC,YAAA,mBAAAC,SAAA,IAAAC,UAAA,iBAAAC,MAAA,IAAAC,UAAA,iBAAAC,SAAA,IAAAC,eAAA,wBAAAC,WAAA,kBAAAC,WAAA,sBAAAC,eAAA,wBAAAC,cAAA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conButton","hasBackground","badge","favorite","hasFavorite","hasSlotForFavorite","hasSlotAddToCart","link","img","imgAlt","hoverImg","hoverImgAlt","videoSrc","notificationUrl","notificationText","productName","subtitle","productId","price","salePrice","currency","addToCartColor","badgeColor","outOfStock","outOfStockText","addToCartText","waitingListText","addToWaitingList","isMini","disallowAddToCart","disallowAddToCartLabel","enableZoom","addedToCart","endAddedToCart","variations","selectedVariation","priceFormatted","salePriceFormatted","setPrice","direction","filterHeading","filterButtonLabel","filterButtonIcon","mobileThreshold","filters","showCount","offCanvasOverlay","activeFilters","showMobileFilters","isMobile","offCanvasClasses","getFilters","name","heading","otherLabel","lessLabel","maxElements","variant","label","values","value","slotItems","inputs","showMore","getValues","getActiveAmount","getInputs","getName","logo","navItems","secondaryNavItems","type","navPosition","megaMenuAlignment","sticky","stickyThreshold","mobileLogo","user","pagLabel","last","showFirstAndLast","current","elementsRanges","elPerPage","labelElementsPerPage","total","first","elementsRangesArray","min","max","step","showButtons","internalValue","getValue","setMax","reset","searchValue","placeholder","noResultText","loadingText","resultsText","showAllResText","identifier","debounceTime","withBtn","recentsTitle","recents","results","dropdown","linearIconOnly","dropdownPosition","dropdownVisible","resType","innerResults","totalResults","isExpanded","setResults","isOpen","summary","disabled","open","icon","isCartOpen","position","cartItems","iconName","iconPosition","active","groupIdentifier","horizontal","dark","shadow","border","borderRadius","topBorderContentRadius","boxed","roundedMedia","imgSrc","code","imgUrl","sku","taxonomy","checked","count","isChecked","labelMinBefore","labelMinAfter","labelMaxBefore","labelMaxAfter","minVal","maxVal","internalMinVal","internalMaxVal","multiple","required","loading","getSelectedValue","getSelectedOption","setValue","details","alignment","fullBorder","tabGroupName","items","discountThreshold","freeShippingThreshold","progressPercentage","checkoutLabel","viewCartLabel","shippingInfo","dimension","soft","outline","size","full","pill","text","onlyIcon","target","ariaLabel","class","buttonId","library","category","src"],"sources":["node_modules/@stencil/core/internal/client/patch-browser.js","@lazy-browser-entrypoint?app-data=conditional"],"sourcesContent":["/*\n Stencil Client Patch Browser v4.18.2 | MIT Licensed | https://stenciljs.com\n */\n\n// src/client/client-patch-browser.ts\nimport { BUILD, NAMESPACE } from \"@stencil/core/internal/app-data\";\nimport { consoleDevInfo, doc, H, promiseResolve } from \"@stencil/core\";\nvar patchBrowser = () => {\n if (BUILD.isDev && !BUILD.isTesting) {\n consoleDevInfo(\"Running in development mode.\");\n }\n if (BUILD.cloneNodeFix) {\n patchCloneNodeFix(H.prototype);\n }\n const scriptElm = BUILD.scriptDataOpts ? Array.from(doc.querySelectorAll(\"script\")).find(\n (s) => new RegExp(`/${NAMESPACE}(\\\\.esm)?\\\\.js($|\\\\?|#)`).test(s.src) || s.getAttribute(\"data-stencil-namespace\") === NAMESPACE\n ) : null;\n const importMeta = import.meta.url;\n const opts = BUILD.scriptDataOpts ? (scriptElm || {})[\"data-opts\"] || {} : {};\n if (importMeta !== \"\") {\n opts.resourcesUrl = new URL(\".\", importMeta).href;\n }\n return promiseResolve(opts);\n};\nvar patchCloneNodeFix = (HTMLElementPrototype) => {\n const nativeCloneNodeFn = HTMLElementPrototype.cloneNode;\n HTMLElementPrototype.cloneNode = function(deep) {\n if (this.nodeName === \"TEMPLATE\") {\n return nativeCloneNodeFn.call(this, deep);\n }\n const clonedNode = nativeCloneNodeFn.call(this, false);\n const srcChildNodes = this.childNodes;\n if (deep) {\n for (let i = 0; i < srcChildNodes.length; i++) {\n if (srcChildNodes[i].nodeType !== 2) {\n clonedNode.appendChild(srcChildNodes[i].cloneNode(true));\n }\n }\n }\n return clonedNode;\n };\n};\nexport {\n patchBrowser\n};\n","export { setNonce } from '@stencil/core';\nimport { bootstrapLazy } from '@stencil/core';\nimport { patchBrowser } from '@stencil/core/internal/client/patch-browser';\nimport { globalScripts } from '@stencil/core/internal/app-globals';\npatchBrowser().then(async (options) => {\n await globalScripts();\n return bootstrapLazy([/*!__STENCIL_LAZY_DATA__*/], options);\n});\n"],"mappings":"0HAOA,IAAIA,EAAe,KAUjB,MAAMC,cAAyBC,IAC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A,KAAAC,kBAAA,KAAAC,sBAAA,8BAAAC,mBAAA,0BAAAC,cAAA,qBAAAC,cAAA,sBAAAC,aAAA,oBAAA7C,UAAA,yCAAAlE,MAAA,IAAAD,QAAA,MAAAiH,UAAA,MAAAC,KAAA,MAAAC,QAAA,2CAAArD,SAAA,IAAA9D,QAAA,IAAAmH,QAAA,IAAAC,KAAA,IAAAC,KAAA,IAAAC,KAAA,IAAAC,KAAA,IAAAC,SAAA,gBAAAxL,KAAA,IAAAyL,OAAA,IAAA3G,KAAA,IAAAnB,KAAA,IAAAQ,MAAA,IAAAuH,UAAA,iBAAAC,MAAA,IAAAC,SAAA,kCAAAD,MAAA,IAAAE,QAAA,IAAAlI,KAAA,IAAAmI,SAAA,IAAAV,KAAA,IAAAnH,MAAA,IAAA8H,IAAA,SAAA3L,EAAA"}
@@ -0,0 +1,2 @@
1
+ import{r as t,c as i,h as s,H as o,g as e}from"./p-98d5dd1f.js";const a=":host{--card-max-width:450px;--jump-card-max-width-horizontal:100%;--jump-card-color:var(--neutral-grey-primary);--jump-card-background:transparent;--jump-card-border-color:var(--neutral-grey-background);--jump-card-padding:0.5rem;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 .Images.enable-zoom{overflow:hidden}:host .Media .Images.enable-zoom .Images__Front{transition:transform 0s ease-out;cursor:zoom-in}:host .Media .Images.enable-zoom:hover .Images__Front{transform:scale(1.5)}:host .Media.hasBackground{background-color:var(--neutral-white)}:host .Media.hasBackground.iconOnly{border-top-left-radius:6px;border-top-right-radius:6px;padding:var(--jump-card-padding) var(--jump-card-padding) 0}:host .Media.hasBackground.iconOnly img{border-radius:6px}:host .Media.iconOnly{border-bottom-right-radius:0}:host .Media.is-mini{max-width:180px}:host .NotificationCart{display:none;position:absolute;bottom:0px;width:100%;padding:2rem 1rem;background-color:hsla(0, 0%, 0%, 0.35);box-sizing:border-box;z-index:2;transform:translate3d(0, 0, 0)}:host .NotificationCart.is-active{display:flex;align-items:center;justify-content:center}:host .Content.hasBackground{background-color:var(--neutral-white);padding:calc(var(--jump-card-padding) * 2)}:host .Content.iconOnly{padding:calc(var(--jump-card-padding) * 2) var(--jump-card-padding)}:host .Content.is-mini{max-width:180px}:host .Body{display:flex;flex-direction:column;gap:0.75rem;padding:var(--jump-card-padding) 0}:host .Body>*{display:flex;flex-direction:row;justify-content:space-between}:host .Body>*>*{flex:0 1 auto}:host .Body.hasBackground{padding:0 0 var(--jump-card-padding)}:host .Body.iconOnly{padding:0}:host .Body.is-mini{padding:calc(var(--jump-card-padding) / 2) 0}:host .Body.is-mini>*{flex-direction:column}:host .Product{font-size:var(--fs-400);color:var(--neutral-grey-primary);text-decoration:none}:host .Subtitle{font-size:var(--fs-300);color:var(--neutral-grey-secondary);line-height:1.2}:host .Footer{line-height:var(--lh-400);justify-content:end;padding:var(--jump-card-padding) 0;align-items:flex-end}:host .Footer.justify-between{justify-content:space-between}:host .Footer.hasBackground{padding-bottom:0}:host .Footer.iconOnly{padding:0}:host .Footer.is-mini{padding:calc(var(--jump-card-padding) / 2) 0}:host .Footer__AddToCart{--jump-button-color:var(--jump-card-ecommerce-add-to-cart-color);--jump-button-background:var(--jump-card-ecommerce-add-to-cart-background);--jump-button-color-hover:var(--jump-card-ecommerce-add-to-cart-color-hover);--jump-button-background-hover:var(--jump-card-ecommerce-add-to-cart-background-hover)}:host .OutOfStock{justify-items:start;font-size:var(--fs-300);font-weight:var(--fw-900);color:var(--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{display:flex;align-items:flex-end;max-width:calc(50% - 1rem)}:host .SelectVariations select{appearance:none;background-color:transparent;border:1px solid var(--neutral-grey-secondary);border-radius:3px;color:var(--neutral-grey-secondary);font-size:var(--fs-300);padding:0.5rem 0.75rem;max-width:100%;background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236B7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3E%3C/svg%3E\");background-position:right 0.5rem center;background-repeat:no-repeat;background-size:1.5em 1.5em;padding-right:2.5rem;-webkit-print-color-adjust:exact}.slide-in-bottom{animation:slide-in-bottom 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) both}.slide-out-bottom{animation:slide-out-bottom 0.5s cubic-bezier(0.55, 0.085, 0.68, 0.53) both}.fade-in-out{animation-name:fade-in-out;animation-duration:6s;animation-timing-function:ease-in-out}@keyframes fade-in-out{from{opacity:0;transform:translateY(100px)}50%{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(100px)}}";const r=a;const n=class{constructor(s){t(this,s);this.toggleFavorite=i(this,"jump-toggle-favorite",7);this.productAddToCart=i(this,"jump-add-to-cart",7);this.productWaitingList=i(this,"jump-add-to-waiting-list",7);this.variationSelected=i(this,"jump-variation-selected",7);this.goToProductPage=i(this,"jump-card-go-to-product-page",7);this.handleMouseMove=t=>{if(!this.enableZoom||!this.imageEl)return;const{left:i,top:s,width:o,height:e}=t.currentTarget.getBoundingClientRect();const a=t.clientX-i;const r=t.clientY-s;const n=(a/o-.5)*-80;const d=(r/e-.5)*-80;this.imageEl.style.transform=`scale(1.5) translate(${n}px, ${d}px)`};this.handleMouseLeave=()=>{if(!this.enableZoom||!this.imageEl)return;this.imageEl.style.transform="scale(1) translate(0, 0)"};this.onlyIconButton=false;this.hasBackground=false;this.badge=undefined;this.favorite=false;this.hasFavorite=false;this.hasSlotForFavorite=false;this.hasSlotAddToCart=false;this.link=undefined;this.img=undefined;this.imgAlt=undefined;this.hoverImg=undefined;this.hoverImgAlt=undefined;this.videoSrc=undefined;this.notificationUrl=undefined;this.notificationText="Aggiunto al carrello";this.productName=undefined;this.subtitle=undefined;this.productId=undefined;this.price=undefined;this.salePrice=undefined;this.currency="€";this.addToCartColor="secondary";this.badgeColor="secondary";this.outOfStock=false;this.outOfStockText=undefined;this.addToCartText="Aggiungi al carrello";this.waitingListText="Notifica disponibilità";this.addToWaitingList=false;this.isMini=false;this.disallowAddToCart=false;this.disallowAddToCartLabel="Scopri";this.enableZoom=false;this.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})}goToProduct(){this.goToProductPage.emit({productId:this.productId,link:this.link})}addProductToCart(){var t;this.addedToCart=true;let i=this.selectedVariation;if(!i&&this.variations.length>0){i=this.variations[0]}const s={productId:this.productId,addedToCart:this.addedToCart,quantity:(t=this.quantity)!==null&&t!==void 0?t:null,variation:i!==null&&i!==void 0?i:null};this.productAddToCart.emit(s);setTimeout((()=>{this.addedToCart=false}),6e3)}waitingList(){this.addToWaitingList=true;this.productWaitingList.emit({productId:this.productId,addToWaitingList:this.addToWaitingList})}formatPrices(){var t;let i=(t=document.documentElement.lang)!==null&&t!==void 0?t:"it-IT";if(i.length==2){i=`${i}-${i.toUpperCase()}`}this.priceFormatted=this.price.toLocaleString(i,{minimumFractionDigits:2,maximumFractionDigits:2});this.salePriceFormatted=this.salePrice.toLocaleString(i,{minimumFractionDigits:2,maximumFractionDigits:2})}render(){const t=this.hasBackground&&!this.isMini?"hasBackground":"";const i=this.onlyIconButton&&!this.isMini?"iconOnly":"";const e=this.outOfStock?"justify-between":"";const a=this.hoverImg?"has-hover-image":"";const r=this.isMini?"is-mini":"";const n=this.enableZoom?"enable-zoom":"";function d(t,i){const s=(t-i)/t*100;return s.toFixed(0)}return s(o,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}`,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave},s("a",{href:this.link},s("figure",{class:`Images ${a} ${n}`},this.img&&!this.videoSrc?s("img",{class:"Images__Front",src:this.img,alt:this.imgAlt,ref:t=>this.imageEl=t}):"",this.hoverImg&&!this.videoSrc?s("img",{class:"Images__OnHover",src:this.hoverImg,alt:this.hoverImgAlt}):""),this.videoSrc&&!this.img?s("video",{autoplay:true},s("source",{src:this.videoSrc,type:"video/mp4"}),s("source",{src:this.videoSrc,type:"video/mov"}),s("source",{src:this.videoSrc,type:"video/webm"})):""),!this.isMini?s("div",{class:`NotificationCart ${this.addedToCart==true?"is-active fade-in-out":""}`},s("jump-button",{href:this.notificationUrl,variant:"white",text:true},s("jump-icon",{slot:"prefix",name:"check"}),s("span",null," ",this.notificationText," "))):null,!this.isMini&&this.onlyIconButton&&!this.hasSlotAddToCart?s("div",{class:"OnlyIconButton"},s("jump-button",{variant:"secondary",size:"large",pill:true,onlyIcon:true,onClick:()=>this.addProductToCart()},s("jump-icon",{slot:"prefix",name:"cart-shopping",category:"regular"}))):"",!this.isMini&&this.onlyIconButton&&this.hasSlotAddToCart?s("div",{class:"OnlyIconButton"},s("slot",{name:"add-to-cart"})):""),s("div",{class:`Content ${t} ${i} ${r}`},s("div",{class:`Body ${t} ${i} ${r}`},s("div",null,s("div",{class:"Info"},s("a",{href:this.link,class:"Product"},this.productName),this.subtitle?s("div",{class:"Subtitle"},this.subtitle):null),this.price?s("div",{class:`Price ${r}`},!this.isMini&&this.salePrice&&this.salePrice<this.price?s("div",{class:"Price__Discount"}," ",d(this.price,this.salePrice),"% "):null,!this.isMini?s("div",{class:`Price__Regular ${this.salePrice&&this.salePrice<this.price?"sale":""}`},this.currency,this.priceFormatted):s("div",{class:`Price__Regular`},this.currency,this.salePrice&&this.salePrice<this.price?this.salePriceFormatted:this.priceFormatted),!this.isMini&&this.salePrice&&this.salePrice<this.price?s("div",{class:"Price__Sale"},this.currency,this.salePriceFormatted):null):null),!this.isMini||this.variations.length!=0?s("div",null,this.variations.length!=0?s("div",{class:"SelectVariations"},s("select",{ref:t=>this.variationSelectEl=t,onChange:()=>{this.onVariationSelected()}},this.variations.filter((t=>!t.imgUrl)).map((t=>s("option",{value:t.code},t.label))))):null,s("slot",{name:"quantity"})):null),s("div",{class:`Footer ${e} ${t} ${i} ${r}`},this.outOfStock&&!this.isMini?s("div",{class:"OutOfStock"},this.outOfStockText?this.outOfStockText:"Esaurito"):"",this.outOfStock?s("jump-button",{class:"Footer__AddToCart",variant:this.addToCartColor,size:"small",text:true,onClick:()=>this.waitingList()},s("jump-icon",{slot:"prefix",name:"bell",category:"regular",size:"small"}),this.waitingListText):"",!this.outOfStock&&!this.onlyIconButton&&!this.hasSlotAddToCart&&!this.disallowAddToCart?s("jump-button",{class:"Footer__AddToCart",variant:this.addToCartColor,size:"small",text:true,onClick:()=>this.addProductToCart()},s("jump-icon",{slot:"prefix",name:"cart-shopping",category:"regular",size:"small"}),this.addToCartText):"",!this.outOfStock&&!this.onlyIconButton&&this.hasSlotAddToCart?s("slot",{name:"add-to-cart"}):null,!this.outOfStock&&this.disallowAddToCart?s("jump-button",{class:"Footer__AddToCart",variant:this.addToCartColor,size:"small",text:true,onClick:()=>this.goToProduct()},s("jump-icon",{slot:"suffix",name:"arrow-right"})," ",this.disallowAddToCartLabel):"")))}get JumpCardEcommerce(){return e(this)}};n.style=r;export{n as jump_card_ecommerce};
2
+ //# sourceMappingURL=p-7f7935f0.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["jumpCardEcommerceCss","JumpCardEcommerceStyle0","JumpCardEcommerce","this","handleMouseMove","e","enableZoom","imageEl","left","top","width","height","currentTarget","getBoundingClientRect","x","clientX","y","clientY","moveX","moveY","style","transform","handleMouseLeave","setPrice","price","salePrice","shouldFormat","formatPrices","addOption","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","goToProduct","goToProductPage","link","addProductToCart","addedToCart","length","payload","productAddToCart","setTimeout","waitingList","addToWaitingList","productWaitingList","locale","document","documentElement","lang","toUpperCase","priceFormatted","toLocaleString","minimumFractionDigits","maximumFractionDigits","salePriceFormatted","render","backgroundClass","hasBackground","isMini","iconOnlyClass","onlyIconButton","justifyClass","outOfStock","hasImageOnHover","hoverImg","miniCard","enableZoomClass","calculateDiscount","discount","toFixed","h","Host","badge","class","variant","badgeColor","dimension","label","hasFavorite","onClick","size","text","onlyIcon","slot","name","category","hasSlotForFavorite","onMouseMove","onMouseLeave","href","img","videoSrc","src","alt","imgAlt","ref","el","hoverImgAlt","autoplay","type","notificationUrl","notificationText","hasSlotAddToCart","pill","productName","subtitle","currency","onChange","filter","imgUrl","map","outOfStockText","addToCartColor","waitingListText","disallowAddToCart","addToCartText","disallowAddToCartLabel"],"sources":["src/components/jump-card-ecommerce/jump-card-ecommerce.scss?tag=jump-card-ecommerce&encapsulation=shadow","src/components/jump-card-ecommerce/jump-card-ecommerce.tsx"],"sourcesContent":[":host {\n --card-max-width: 450px;\n --jump-card-max-width-horizontal: 100%;\n --jump-card-color: var(--neutral-grey-primary);\n --jump-card-background: transparent;\n --jump-card-border-color: var(--neutral-grey-background);\n --jump-card-padding: 0.5rem;\n\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 &.enable-zoom {\n overflow: hidden;\n\n .Images__Front {\n transition: transform 0s ease-out;\n cursor: zoom-in;\n }\n\n &:hover {\n .Images__Front {\n transform: scale(1.5);\n }\n }\n }\n }\n\n &.hasBackground {\n background-color: var(--neutral-white);\n\n &.iconOnly {\n border-top-left-radius: 6px;\n border-top-right-radius: 6px;\n padding: var(--jump-card-padding) var(--jump-card-padding) 0;\n\n img {\n border-radius: 6px;\n }\n }\n }\n\n &.iconOnly {\n border-bottom-right-radius: 0;\n }\n\n &.is-mini {\n max-width: 180px;\n }\n }\n\n .NotificationCart {\n display: none;\n position: absolute;\n bottom: 0px;\n width: 100%;\n padding: 2rem 1rem;\n background-color: hsl(0 0% 0% / 35%);\n box-sizing: border-box;\n z-index: 2;\n transform: translate3d(0, 0, 0);\n\n &.is-active {\n display: flex;\n align-items: center;\n justify-content: center;\n }\n }\n\n .Content {\n &.hasBackground {\n background-color: var(--neutral-white);\n padding: calc(var(--jump-card-padding) * 2);\n }\n\n &.iconOnly {\n padding: calc(var(--jump-card-padding) * 2) var(--jump-card-padding);\n }\n\n &.is-mini {\n max-width: 180px;\n }\n }\n\n .Body {\n display: flex;\n flex-direction: column;\n gap: 0.75rem;\n padding: var(--jump-card-padding) 0;\n\n & > * {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n\n & > * {\n flex: 0 1 auto;\n }\n }\n\n &.hasBackground {\n padding: 0 0 var(--jump-card-padding);\n }\n\n &.iconOnly {\n padding: 0;\n }\n\n &.is-mini {\n & > * {\n flex-direction: column;\n }\n\n padding: calc(var(--jump-card-padding) / 2) 0;\n }\n }\n\n .Product {\n font-size: var(--fs-400);\n color: var(--neutral-grey-primary);\n text-decoration: none;\n }\n\n .Subtitle {\n font-size: var(--fs-300);\n color: var(--neutral-grey-secondary);\n line-height: 1.2;\n }\n\n .Footer {\n line-height: var(--lh-400);\n justify-content: end;\n padding: var(--jump-card-padding) 0;\n align-items: flex-end;\n\n &.justify-between {\n justify-content: space-between;\n }\n\n &.hasBackground {\n padding-bottom: 0;\n }\n\n &.iconOnly {\n padding: 0;\n }\n\n &.is-mini {\n padding: calc(var(--jump-card-padding) / 2) 0;\n }\n\n &__AddToCart {\n --jump-button-color: var(--jump-card-ecommerce-add-to-cart-color);\n --jump-button-background: var(--jump-card-ecommerce-add-to-cart-background);\n --jump-button-color-hover: var(--jump-card-ecommerce-add-to-cart-color-hover);\n --jump-button-background-hover: var(--jump-card-ecommerce-add-to-cart-background-hover);\n }\n }\n\n .OutOfStock {\n justify-items: start;\n font-size: var(--fs-300);\n font-weight: var(--fw-900);\n color: var(--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 display: flex;\n align-items: flex-end;\n max-width: calc(50% - 1rem);\n\n select {\n appearance: none;\n background-color: transparent;\n border: 1px solid var(--neutral-grey-secondary);\n border-radius: 3px;\n color: var(--neutral-grey-secondary);\n font-size: var(--fs-300);\n padding: 0.5rem 0.75rem;\n max-width: 100%;\n background-image: url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236B7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3E%3C/svg%3E\");\n background-position: right 0.5rem center;\n background-repeat: no-repeat;\n background-size: 1.5em 1.5em;\n padding-right: 2.5rem;\n -webkit-print-color-adjust: exact;\n }\n }\n}\n\n.slide-in-bottom {\n animation: slide-in-bottom 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;\n}\n\n.slide-out-bottom {\n animation: slide-out-bottom 0.5s cubic-bezier(0.55, 0.085, 0.68, 0.53) both;\n}\n\n.fade-in-out {\n animation-name: fade-in-out;\n animation-duration: 6s;\n animation-timing-function: ease-in-out;\n}\n\n@keyframes fade-in-out {\n from {\n opacity: 0;\n transform: translateY(100px);\n }\n\n 50% {\n opacity: 1;\n transform: translateY(0);\n }\n\n to {\n opacity: 0;\n transform: translateY(100px);\n }\n}\n","import { Component, Host, h, Prop, Event, EventEmitter, Element, State, Listen, Method } from '@stencil/core';\n\ninterface Variation {\n code: string;\n imgUrl: string;\n label: string;\n taxonomy: string;\n // Add more keys as needed\n}\n\n@Component({\n tag: 'jump-card-ecommerce',\n styleUrl: 'jump-card-ecommerce.scss',\n shadow: true,\n})\nexport class JumpCardEcommerce {\n\n @Element() JumpCardEcommerce: HTMLElement;\n jumpQuantityEl;\n private imageEl: HTMLImageElement;\n\n /* ---------------------- @PROPERTIES ------------------------- */\n\n /** Indicate if card has only icon button*/\n @Prop() onlyIconButton: boolean = false;\n\n /** Indicate if card has background*/\n @Prop() hasBackground: boolean = false;\n\n /** Indicates the badge of the card*/\n @Prop() badge: string;\n\n /** Indicates if the product is favorite */\n @Prop({ mutable: true, reflect: true }) favorite: boolean = false;\n\n /** Indicate if the whislist is active in shop*/\n @Prop() hasFavorite: boolean = false;\n\n /** Indicate if the whislist will be slotted*/\n @Prop() hasSlotForFavorite: boolean = false;\n\n /** Indicate if the add to cart btn will be slotted*/\n @Prop() hasSlotAddToCart: boolean = false;\n\n /** Indicates the link of the card*/\n @Prop() link: string;\n\n /** Indicates the image's src of the card*/\n @Prop() img: string;\n\n /** Indicates the img's alt of the card*/\n @Prop() imgAlt: string;\n\n /** Indicates the over image's src of the card*/\n @Prop() hoverImg: string;\n\n /** Indicates the hover img's alt of the card*/\n @Prop() hoverImgAlt: string;\n\n /** Indicates the videoSrc of the card*/\n @Prop() videoSrc: string;\n\n /** Indicates the notificationUrl of the card*/\n @Prop() notificationUrl: string;\n\n /** Indicates the notificationText of the card*/\n @Prop() notificationText: string = 'Aggiunto al carrello';\n\n /** Indicates the title of the card*/\n @Prop() productName: string;\n\n /** Indicates the subtitle of the card*/\n @Prop() subtitle: string;\n\n /** Indicates the ID of the product, can be also a SKU*/\n @Prop() productId: string;\n\n /** Indicates the price of the card */\n @Prop() price: number;\n\n /** Indicates the sale price of the card */\n @Prop() salePrice: number;\n\n /** Indicates the currency of the card */\n @Prop() currency: string = '€';\n\n /** Indicates the variant of the button */\n @Prop() addToCartColor: 'primary' | 'secondary'|'white'|'neutral' = 'secondary';\n\n /** Indicates the variant of the button */\n @Prop() badgeColor: 'primary' | 'secondary' | 'neutral' | 'warning' | 'success' | 'danger' = 'secondary';\n\n /** Indicates if the product is outOfStock */\n @Prop({ mutable: true, reflect: true }) outOfStock: boolean = false;\n\n /** Indicates the outOfStockText of the product*/\n @Prop() outOfStockText: string;\n\n /** Indicates the button class of the add to cart / notification button */\n @Prop() addToCartText: string = 'Aggiungi al carrello';\n\n /** Indicates the button class of the add to cart / notification button */\n @Prop() waitingListText: string = 'Notifica disponibilità';\n\n /** Indicate if the user request to be notified when te product is avaible*/\n @Prop() addToWaitingList: boolean = false;\n\n /** Indicate if the card is Mini Card*/\n @Prop() isMini: boolean = false;\n\n /** Indica se si tratta di un prodotto che può essere aggiunto al carrello solo dalla pagina prodotto */\n @Prop() disallowAddToCart: boolean = false;\n\n /** Label del pulsante che appare quando il prodotto non può essere aggiunto al carrello */\n @Prop() disallowAddToCartLabel: string = 'Scopri';\n\n /** Indica se è attivo lo zoom all'hover */\n @Prop() enableZoom: boolean = false;\n\n /* ---------------------- @STATE ------------------------- */\n\n /** Indicate if the product is added to cart --> non deve esserci nelle storie! */\n @Prop() addedToCart: boolean = false;\n\n @Prop() endAddedToCart: boolean = false;\n\n @State() variations: Variation[] = [];\n\n @State() selectedVariation: Variation;\n\n @State() priceFormatted: string;\n\n @State() salePriceFormatted: string;\n\n // è una proprietà che viene cambiata solo da dentro\n quantity: number;\n\n variationSelectEl: HTMLSelectElement;\n\n /* ---------------------- @EVENTS ------------------------- */\n\n @Event({ eventName: 'jump-toggle-favorite' }) toggleFavorite: EventEmitter;\n\n @Event({ eventName: 'jump-add-to-cart' }) productAddToCart: EventEmitter;\n\n @Event({ eventName: 'jump-add-to-waiting-list' }) productWaitingList: EventEmitter;\n\n @Event({ eventName: 'jump-variation-selected' }) variationSelected: EventEmitter; // verificare se corretto: aggiungo un evento\n\n @Event({ eventName: 'jump-card-go-to-product-page' }) goToProductPage: EventEmitter;\n\n /**\n * Set the price of the product\n * @param price\n * @param salePrice\n */\n @Method()\n async setPrice(price: number, salePrice: number) {\n let shouldFormat = false;\n if (price && price > 0) {\n shouldFormat = true;\n this.price = price;\n }\n\n if (salePrice && salePrice > 0) {\n this.salePrice = salePrice;\n }\n\n if (shouldFormat) {\n this.formatPrices();\n }\n }\n\n @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 /* ---------------------- @LIFECYCLE ------------------------- */\n\n componentWillLoad() {\n }\n\n componentDidLoad() {\n this.jumpQuantityEl = this.JumpCardEcommerce.querySelector('jump-quantity');\n\n if (this.jumpQuantityEl) {\n this.jumpQuantityEl.addEventListener('jump-change', this.onQuantityChange.bind(this));\n this.quantity = this.jumpQuantityEl.getValue().then((quantity) => {\n this.quantity = quantity;\n });\n }\n\n this.formatPrices();\n }\n\n disconnectedCallback() {\n this.jumpQuantityEl = this.JumpCardEcommerce.querySelector('jump-quantity');\n if (this.jumpQuantityEl) {\n this.jumpQuantityEl.removeEventListener('jump-change', this.onQuantityChange);\n }\n }\n\n /* ---------------------- @METHODS ------------------------- */\n\n private handleMouseMove = (e: MouseEvent) => {\n if (!this.enableZoom || !this.imageEl) return;\n\n const { left, top, width, height } = (e.currentTarget as HTMLElement).getBoundingClientRect();\n const x = e.clientX - left;\n const y = e.clientY - top;\n\n const moveX = (x / width - 0.5) * -80; // Controlla l'ampiezza del movimento\n const moveY = (y / height - 0.5) * -80; // Controlla l'ampiezza del movimento\n\n this.imageEl.style.transform = `scale(1.5) translate(${moveX}px, ${moveY}px)`;\n };\n\n private handleMouseLeave = () => {\n if (!this.enableZoom || !this.imageEl) return;\n this.imageEl.style.transform = 'scale(1) translate(0, 0)';\n };\n\n onQuantityChange(e) {\n this.quantity = e.detail.value ?? false;\n }\n\n onToggleFavorite() {\n this.favorite = !this.favorite;\n this.toggleFavorite.emit(\n {\n productId: this.productId,\n favorite: this.favorite,\n },\n );\n }\n\n goToProduct(){\n this.goToProductPage.emit({\n productId: this.productId,\n link: this.link,\n });\n }\n\n addProductToCart() {\n this.addedToCart = true;\n let variations = this.selectedVariation;\n if (!variations && this.variations.length > 0) {\n variations = this.variations[0];\n }\n\n const payload = {\n productId: this.productId,\n addedToCart: this.addedToCart,\n quantity: this.quantity ?? null,\n variation: variations ?? null,\n };\n this.productAddToCart.emit(payload);\n\n setTimeout(() => {\n this.addedToCart = false;\n }, 6000);\n }\n\n waitingList() {\n this.addToWaitingList = true;\n this.productWaitingList.emit(\n {\n productId: this.productId,\n addToWaitingList: this.addToWaitingList,\n },\n );\n }\n\n formatPrices() {\n let locale = document.documentElement.lang ?? 'it-IT';\n if (locale.length == 2) {\n locale = `${locale}-${locale.toUpperCase()}`;\n }\n\n // Format price with 2 decimal digits and in locale\n this.priceFormatted = this.price.toLocaleString(locale, { minimumFractionDigits: 2, maximumFractionDigits: 2 });\n this.salePriceFormatted = this.salePrice.toLocaleString(locale, {\n minimumFractionDigits: 2,\n maximumFractionDigits: 2,\n });\n }\n\n render() {\n const backgroundClass = this.hasBackground && !this.isMini ? 'hasBackground' : '';\n const iconOnlyClass = this.onlyIconButton && !this.isMini ? 'iconOnly' : '';\n const justifyClass = this.outOfStock ? 'justify-between' : '';\n const hasImageOnHover = this.hoverImg ? 'has-hover-image' : '';\n const miniCard = this.isMini ? 'is-mini' : '';\n const enableZoomClass = this.enableZoom ? 'enable-zoom' : '';\n\n function calculateDiscount(price: number, salePrice: number): string {\n const discount = ((price - salePrice) / price) * 100;\n return discount.toFixed(0);\n };\n\n return (\n <Host>\n {!this.isMini && this.badge ?\n <jump-badge class={`${backgroundClass} ${iconOnlyClass}`} variant={this.badgeColor} dimension=\"small\"\n label={this.badge}></jump-badge> : ''}\n\n {!this.isMini && this.hasFavorite ?\n <jump-button onClick={() => this.onToggleFavorite()} class={`Favorite ${backgroundClass} ${iconOnlyClass}`}\n variant={this.favorite ? 'primary' : 'neutral'} size=\"small\" text onlyIcon>\n <jump-icon slot=\"prefix\" name=\"heart\" category={this.favorite ? 'solid' : 'light'}\n size=\"medium\"></jump-icon>\n </jump-button>\n :\n this.hasSlotForFavorite ? <div class=\"Favorite\">\n <slot name=\"favorite\"></slot>\n </div> : null\n }\n\n <div\n class={`Media ${iconOnlyClass} ${backgroundClass} ${miniCard}`}\n onMouseMove={this.handleMouseMove}\n onMouseLeave={this.handleMouseLeave}\n >\n <a href={this.link}>\n <figure class={`Images ${hasImageOnHover} ${enableZoomClass}`}>\n {this.img && !this.videoSrc ? <img class=\"Images__Front\" src={this.img} alt={this.imgAlt} ref={el => this.imageEl = el as HTMLImageElement}></img> : ''}\n {this.hoverImg && !this.videoSrc ?\n <img class=\"Images__OnHover\" src={this.hoverImg} alt={this.hoverImgAlt}></img> : ''}\n </figure>\n {this.videoSrc && !this.img ?\n <video autoplay>\n <source src={this.videoSrc} type=\"video/mp4\" />\n <source src={this.videoSrc} type=\"video/mov\" />\n <source src={this.videoSrc} type=\"video/webm\" />\n </video> : ''}\n </a>\n {!this.isMini ?\n <div class={`NotificationCart ${this.addedToCart == true ? 'is-active fade-in-out' : ''}`}>\n <jump-button href={this.notificationUrl} variant=\"white\" text>\n <jump-icon slot=\"prefix\" name=\"check\"></jump-icon>\n <span> {this.notificationText} </span>\n </jump-button>\n </div>\n : null\n }\n\n {!this.isMini && this.onlyIconButton && !this.hasSlotAddToCart ?\n <div class=\"OnlyIconButton\">\n <jump-button variant=\"secondary\" size=\"large\" pill onlyIcon onClick={() => this.addProductToCart()}>\n <jump-icon slot=\"prefix\" name=\"cart-shopping\" category=\"regular\"></jump-icon>\n </jump-button>\n </div>\n : ''\n }\n\n {!this.isMini && this.onlyIconButton && this.hasSlotAddToCart ?\n <div class=\"OnlyIconButton\">\n <slot name=\"add-to-cart\"></slot>\n </div>\n : ''\n }\n\n \n </div>\n\n <div class={`Content ${backgroundClass} ${iconOnlyClass} ${miniCard}`}>\n <div class={`Body ${backgroundClass} ${iconOnlyClass} ${miniCard}`}>\n <div>\n <div class=\"Info\">\n <a href={this.link} class=\"Product\">{this.productName}</a>\n {this.subtitle ? <div class=\"Subtitle\">{this.subtitle}</div> : null}\n </div>\n\n {this.price ?\n <div class={`Price ${miniCard}`}>\n {!this.isMini && this.salePrice && this.salePrice < this.price ?\n <div class=\"Price__Discount\"> {calculateDiscount(this.price, this.salePrice)}% </div>\n : null}\n\n {!this.isMini ?\n <div class={`Price__Regular ${this.salePrice && this.salePrice < this.price ? 'sale' : ''}`}>\n {this.currency}{this.priceFormatted}\n </div>\n :\n <div class={`Price__Regular`}>\n {this.currency}{this.salePrice && this.salePrice < this.price ? this.salePriceFormatted : this.priceFormatted}\n </div>\n }\n\n {!this.isMini && this.salePrice && this.salePrice < this.price ?\n <div class=\"Price__Sale\">{this.currency}{this.salePriceFormatted}</div>\n : null}\n </div>\n : null}\n </div>\n\n {!this.isMini || this.variations.length != 0 ?\n <div>\n {this.variations.length != 0 ?\n <div class=\"SelectVariations\">\n <select\n ref={(el) => (this.variationSelectEl = el)} //salvo questo elemento in this.variationSelectEl\n onChange={() => {\n this.onVariationSelected();\n }}\n >\n {this.variations\n .filter((variation) => !variation.imgUrl)\n .map((variation) => (\n <option value={variation.code}>{variation.label}</option>\n ))}\n </select>\n </div>\n : null}\n <slot name=\"quantity\"></slot>\n </div>\n : null}\n </div>\n\n <div class={`Footer ${justifyClass} ${backgroundClass} ${iconOnlyClass} ${miniCard}`}>\n\n {this.outOfStock && !this.isMini?\n <div class=\"OutOfStock\">{this.outOfStockText ? this.outOfStockText : 'Esaurito'}</div> : ''}\n\n {this.outOfStock ?\n <jump-button class=\"Footer__AddToCart\" variant={this.addToCartColor} size=\"small\" text onClick={() => this.waitingList()}>\n <jump-icon slot=\"prefix\" name=\"bell\" category=\"regular\" size=\"small\"></jump-icon>\n {this.waitingListText}\n </jump-button> : ''\n }\n\n {!this.outOfStock && !this.onlyIconButton && !this.hasSlotAddToCart && !this.disallowAddToCart ?\n <jump-button class=\"Footer__AddToCart\" variant={this.addToCartColor} size=\"small\" text onClick={() => this.addProductToCart()}>\n <jump-icon slot=\"prefix\" name=\"cart-shopping\" category=\"regular\" size=\"small\"></jump-icon>\n {this.addToCartText}\n </jump-button> : ''\n }\n\n {!this.outOfStock && !this.onlyIconButton && this.hasSlotAddToCart ?\n <slot name=\"add-to-cart\"></slot>\n : null\n }\n\n {!this.outOfStock && this.disallowAddToCart ?\n <jump-button class=\"Footer__AddToCart\" variant={this.addToCartColor} size=\"small\" text onClick={() => this.goToProduct()}>\n <jump-icon slot=\"suffix\" name=\"arrow-right\"></jump-icon> {this.disallowAddToCartLabel}\n </jump-button> : ''\n }\n </div>\n </div>\n </Host>\n );\n }\n\n}\n"],"mappings":"gEAAA,MAAMA,EAAuB,8nLAC7B,MAAAC,EAAeD,E,MCcFE,EAAiB,M,uTAwMpBC,KAAAC,gBAAmBC,IACzB,IAAKF,KAAKG,aAAeH,KAAKI,QAAS,OAEvC,MAAMC,KAAEA,EAAIC,IAAEA,EAAGC,MAAEA,EAAKC,OAAEA,GAAYN,EAAEO,cAA8BC,wBACtE,MAAMC,EAAIT,EAAEU,QAAUP,EACtB,MAAMQ,EAAIX,EAAEY,QAAUR,EAEtB,MAAMS,GAASJ,EAAIJ,EAAQ,KAAQ,GACnC,MAAMS,GAASH,EAAIL,EAAS,KAAQ,GAE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,KAAgBL,KAAmBG,KAAiBM,KAEvE1F,KAAKuF,aAAevF,KAAKmF,OACxBY,EAAA,OAAKG,MAAM,cAAclG,KAAKwI,eAAiBxI,KAAKwI,eAAiB,YAAoB,GAE1FxI,KAAKuF,WACJQ,EAAA,eAAaG,MAAM,oBAAoBC,QAASnG,KAAKyI,eAAgBhC,KAAK,QAAQC,KAAI,KAACF,QAAS,IAAMxG,KAAKmE,eACzG4B,EAAA,aAAWa,KAAK,SAASC,KAAK,OAAOC,SAAS,UAAUL,KAAK,UAC5DzG,KAAK0I,iBACS,IAGjB1I,KAAKuF,aAAevF,KAAKqF,iBAAmBrF,KAAK+H,mBAAqB/H,KAAK2I,kBAC3E5C,EAAA,eAAaG,MAAM,oBAAoBC,QAASnG,KAAKyI,eAAgBhC,KAAK,QAAQC,KAAI,KAACF,QAAS,IAAMxG,KAAK6D,oBACzGkC,EAAA,aAAWa,KAAK,SAASC,KAAK,gBAAgBC,SAAS,UAAUL,KAAK,UACrEzG,KAAK4I,eACS,IAGjB5I,KAAKuF,aAAevF,KAAKqF,gBAAkBrF,KAAK+H,iBAC9ChC,EAAA,QAAMc,KAAK,gBACX,MAGF7G,KAAKuF,YAAcvF,KAAK2I,kBACxB5C,EAAA,eAAaG,MAAM,oBAAoBC,QAASnG,KAAKyI,eAAgBhC,KAAK,QAAQC,KAAI,KAACF,QAAS,IAAMxG,KAAK0D,eACxGqC,EAAA,aAAWa,KAAK,SAASC,KAAK,gBAA0B,IAAE7G,KAAK6I,wBACjD,K"}
@@ -0,0 +1,2 @@
1
+ import{r as t,c as e,h as i,H as a,g as s}from"./p-98d5dd1f.js";const r=":host{--jump-range-track-height:4px;--jump-range-thumb-color:var(--neutral-white, #ffffff);--jump-range-thumb-size:18px;--jump-range-fill-color:var(--secondary-standard, #5e79ba);--jump-range-track-color:var(--gray-ultralight, #f8f8f8);display:block;width:100%}:host(.is-disabled){opacity:0.5;cursor:not-allowed;--jump-range-fill-color:var(--gray-light, #e0e0e0)}.label-container{display:flex;justify-content:space-between;margin-bottom:0.75rem;font-size:0.9em;color:#333}.slider-container{position:relative;height:var(--jump-range-thumb-size);display:flex;align-items:center}.slider-track,.slider-fill{position:absolute;left:0;height:var(--jump-range-track-height);border-radius:var(--jump-range-track-height);width:100%}.slider-track{background-color:var(--jump-range-track-color);z-index:1}.slider-fill{background-color:var(--jump-range-fill-color);z-index:2}.range-input{-webkit-appearance:none;-moz-appearance:none;appearance:none;position:absolute;width:100%;height:var(--jump-range-thumb-size);background:transparent;pointer-events:none;margin:0;z-index:3}input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;height:var(--jump-range-thumb-size);width:var(--jump-range-thumb-size);border-radius:50%;background:var(--jump-range-thumb-color);border:1px solid #ccc;cursor:pointer;pointer-events:auto;margin-top:calc((var(--jump-range-thumb-size) - var(--jump-range-track-height)) / -2)}input[type=range]::-moz-range-thumb{-moz-appearance:none;height:var(--jump-range-thumb-size);width:var(--jump-range-thumb-size);border-radius:50%;background:var(--jump-range-thumb-color);border:1px solid #ccc;cursor:pointer;pointer-events:auto}input[type=range]::-webkit-slider-runnable-track{-webkit-appearance:none;height:var(--jump-range-track-height);background:transparent;border:none}input[type=range]::-moz-range-track{-moz-appearance:none;height:var(--jump-range-track-height);background:transparent;border:none}";const n=r;const h=0;const l=class{constructor(i){t(this,i);this.filterChange=e(this,"jump-filterchange",7);this.handleMinInput=t=>{const e=t.target;let i=parseInt(e.value,10);if(i>this.internalMaxVal-h){i=this.internalMaxVal-h;e.value=i.toString()}this.internalMinVal=i};this.handleMaxInput=t=>{const e=t.target;let i=parseInt(e.value,10);if(i<this.internalMinVal+h){i=this.internalMinVal+h;e.value=i.toString()}this.internalMaxVal=i};this.handleCommit=()=>{this.minVal=this.internalMinVal;this.maxVal=this.internalMaxVal;this.filterChange.emit({name:this.name,values:[this.minVal,this.maxVal]})};this.name="range-filter";this.labelMinBefore="Min:";this.labelMinAfter="";this.labelMaxBefore="Max:";this.labelMaxAfter="";this.min=0;this.max=100;this.step=1;this.minVal=undefined;this.maxVal=undefined;this.disabled=false;this.internalMinVal=undefined;this.internalMaxVal=undefined}watchMinVal(t){this.internalMinVal=this.validateValue(t,"min")}watchMaxVal(t){this.internalMaxVal=this.validateValue(t,"max")}componentWillLoad(){this.initializeValues()}initializeValues(){this.internalMinVal=this.validateValue(this.minVal,"min");this.internalMaxVal=this.validateValue(this.maxVal,"max");if(this.internalMinVal>this.internalMaxVal){this.internalMinVal=this.internalMaxVal}this.minVal=this.internalMinVal;this.maxVal=this.internalMaxVal}validateValue(t,e){const i=e==="min"?this.min:this.max;if(t===undefined||t===null)return i;if(t<this.min)return this.min;if(t>this.max)return this.max;return t}getFillStyle(){const t=this.max-this.min;if(t===0)return{left:"0%",width:"0%"};const e=(this.internalMinVal-this.min)/t*100;const i=(this.internalMaxVal-this.min)/t*100;return{left:`${e}%`,width:`${i-e}%`}}async getValues(){return[this.internalMinVal,this.internalMaxVal]}render(){return i(a,{key:"86845857fd074c171e294dc033aa770700401d26",class:{"is-disabled":this.disabled}},i("div",{key:"113c5ed7ef5719a189811785c6e5bf35a4ff8649",class:"label-container"},i("label",{key:"b7415f0d21740dd5b65c1c82746a0f385b1d810f",class:"label-min"},this.labelMinBefore," ",this.internalMinVal,this.labelMinAfter),i("label",{key:"934a8fdff0fc69f0c2a9e6cd404c7df94d79f7ce",class:"label-max"},this.labelMaxBefore," ",this.internalMaxVal,this.labelMaxAfter)),i("div",{key:"71e3c78ba4433bb63d522e34842dcdc91e421100",class:"slider-container"},i("div",{key:"6514105f0f22b475c2a7f210fed6bbb88d5f7148",class:"slider-track"}),i("div",{key:"eb02aaa3b388a51136df71a94e9f0128e35653a1",class:"slider-fill",style:this.getFillStyle()}),i("input",{key:"c11e5cf68251d18d15b46a9fbf2129e33a732e69",type:"range",min:this.min,max:this.max,step:this.step,value:this.internalMinVal,onInput:this.handleMinInput,onChange:this.handleCommit,disabled:this.disabled,class:"range-input","aria-label":this.labelMinBefore}),i("input",{key:"41a5bc8333377c6028894735e60f8e7645c4abf3",type:"range",min:this.min,max:this.max,step:this.step,value:this.internalMaxVal,onInput:this.handleMaxInput,onChange:this.handleCommit,disabled:this.disabled,class:"range-input","aria-label":this.labelMaxBefore})))}get host(){return s(this)}static get watchers(){return{minVal:["watchMinVal"],maxVal:["watchMaxVal"]}}};l.style=n;export{l as jump_filter_range};
2
+ //# sourceMappingURL=p-e30da431.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["jumpFilterRangeCss","JumpFilterRangeStyle0","MIN_GAP","JumpFilterRange","this","handleMinInput","event","input","target","newMinVal","parseInt","value","internalMaxVal","toString","internalMinVal","handleMaxInput","newMaxVal","handleCommit","minVal","maxVal","filterChange","emit","name","values","watchMinVal","newValue","validateValue","watchMaxVal","componentWillLoad","initializeValues","val","type","defaultVal","min","max","undefined","getFillStyle","range","left","width","leftPercent","rightPercent","getValues","render","h","Host","key","class","disabled","labelMinBefore","labelMinAfter","labelMaxBefore","labelMaxAfter","style","step","onInput","onChange"],"sources":["src/components/jump-filter-range/jump-filter-range.scss?tag=jump-filter-range&encapsulation=shadow","src/components/jump-filter-range/jump-filter-range.tsx"],"sourcesContent":[":host {\n --jump-range-track-height: 4px;\n --jump-range-thumb-color: var(--neutral-white, #ffffff);\n --jump-range-thumb-size: 18px;\n --jump-range-fill-color: var(--secondary-standard, #5e79ba);\n --jump-range-track-color: var(--gray-ultralight, #f8f8f8);\n\n display: block;\n width: 100%;\n}\n\n:host(.is-disabled) {\n opacity: 0.5;\n cursor: not-allowed;\n --jump-range-fill-color: var(--gray-light, #e0e0e0);\n}\n\n.label-container {\n display: flex;\n justify-content: space-between;\n margin-bottom: 0.75rem;\n font-size: 0.9em;\n color: #333;\n}\n\n.slider-container {\n position: relative;\n height: var(--jump-range-thumb-size);\n display: flex;\n align-items: center;\n}\n\n// Traccia visiva di background\n.slider-track,\n.slider-fill {\n position: absolute;\n left: 0;\n height: var(--jump-range-track-height);\n border-radius: var(--jump-range-track-height);\n width: 100%;\n}\n\n.slider-track {\n background-color: var(--jump-range-track-color);\n z-index: 1;\n}\n\n.slider-fill {\n background-color: var(--jump-range-fill-color);\n z-index: 2;\n}\n\n// Stili per gli input nativi\n.range-input {\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n position: absolute;\n width: 100%;\n height: var(--jump-range-thumb-size);\n background: transparent;\n pointer-events: none; // Permette di cliccare attraverso l'input\n margin: 0;\n z-index: 3;\n}\n\n// Stili per il selettore (thumb)\n// Il pointer-events qui è fondamentale per rendere solo il thumb cliccabile\ninput[type=\"range\"]::-webkit-slider-thumb {\n -webkit-appearance: none;\n height: var(--jump-range-thumb-size);\n width: var(--jump-range-thumb-size);\n border-radius: 50%;\n background: var(--jump-range-thumb-color);\n border: 1px solid #ccc;\n cursor: pointer;\n pointer-events: auto;\n margin-top: calc((var(--jump-range-thumb-size) - var(--jump-range-track-height)) / -2);\n}\n\ninput[type=\"range\"]::-moz-range-thumb {\n -moz-appearance: none;\n height: var(--jump-range-thumb-size);\n width: var(--jump-range-thumb-size);\n border-radius: 50%;\n background: var(--jump-range-thumb-color);\n border: 1px solid #ccc;\n cursor: pointer;\n pointer-events: auto;\n}\n\n// Rende la traccia nativa dell'input invisibile\ninput[type=\"range\"]::-webkit-slider-runnable-track {\n -webkit-appearance: none;\n height: var(--jump-range-track-height);\n background: transparent;\n border: none;\n}\n\ninput[type=\"range\"]::-moz-range-track {\n -moz-appearance: none;\n height: var(--jump-range-track-height);\n background: transparent;\n border: none;\n}","import { Component, Host, Prop, h, Event, EventEmitter, Method, State, Watch, Element } from '@stencil/core';\n\n// La distanza minima tra i due slider, per evitare che si sovrappongano.\nconst MIN_GAP = 0;\n\n@Component({\n tag: 'jump-filter-range',\n styleUrl: 'jump-filter-range.scss',\n shadow: true,\n})\nexport class JumpFilterRange {\n @Element() host: HTMLElement;\n\n /** Nome identificativo del filtro, utilizzato nell'evento finale. */\n @Prop() name: string = 'range-filter';\n\n /** Testo da mostrare prima del valore minimo. */\n @Prop() labelMinBefore: string = 'Min:';\n /** Testo da mostrare dopo il valore minimo (es. unità di misura). */\n @Prop() labelMinAfter: string = '';\n\n /** Testo da mostrare prima del valore massimo. */\n @Prop() labelMaxBefore: string = 'Max:';\n /** Testo da mostrare dopo il valore massimo (es. unità di misura). */\n @Prop() labelMaxAfter: string = '';\n\n /** Il valore minimo possibile per lo slider. */\n @Prop() min: number = 0;\n /** Il valore massimo possibile per lo slider. */\n @Prop() max: number = 100;\n /** L'incremento tra i valori dello slider. */\n @Prop() step: number = 1;\n\n /** Il valore minimo dello slider. */\n @Prop() minVal: number;\n /** Il valore massimo dello slider. */\n @Prop() maxVal: number;\n\n /** Stato disabilitato dello slider. */\n @Prop({ reflect: true }) disabled: boolean = false;\n\n @State() private internalMinVal: number;\n @State() private internalMaxVal: number;\n\n /**\n * Evento emesso SOLO quando l'utente ha terminato la selezione (al rilascio del mouse).\n */\n @Event({ eventName: 'jump-filterchange' }) filterChange: EventEmitter<{ name: string; values: number[] }>;\n\n @Watch('minVal')\n watchMinVal(newValue: number) {\n this.internalMinVal = this.validateValue(newValue, 'min');\n }\n\n @Watch('maxVal')\n watchMaxVal(newValue: number) {\n this.internalMaxVal = this.validateValue(newValue, 'max');\n }\n\n componentWillLoad() {\n this.initializeValues();\n }\n\n private initializeValues() {\n this.internalMinVal = this.validateValue(this.minVal, 'min');\n this.internalMaxVal = this.validateValue(this.maxVal, 'max');\n\n // Assicura che il valore minimo non superi il massimo\n if (this.internalMinVal > this.internalMaxVal) {\n this.internalMinVal = this.internalMaxVal;\n }\n\n // Sincronizza le prop se erano indefinite\n this.minVal = this.internalMinVal;\n this.maxVal = this.internalMaxVal;\n }\n\n private validateValue(val: number, type: 'min' | 'max'): number {\n const defaultVal = type === 'min' ? this.min : this.max;\n if (val === undefined || val === null) return defaultVal;\n if (val < this.min) return this.min;\n if (val > this.max) return this.max;\n return val;\n }\n\n private handleMinInput = (event: Event) => {\n const input = event.target as HTMLInputElement;\n let newMinVal = parseInt(input.value, 10);\n\n if (newMinVal > this.internalMaxVal - MIN_GAP) {\n newMinVal = this.internalMaxVal - MIN_GAP;\n input.value = newMinVal.toString();\n }\n this.internalMinVal = newMinVal;\n };\n\n private handleMaxInput = (event: Event) => {\n const input = event.target as HTMLInputElement;\n let newMaxVal = parseInt(input.value, 10);\n\n if (newMaxVal < this.internalMinVal + MIN_GAP) {\n newMaxVal = this.internalMinVal + MIN_GAP;\n input.value = newMaxVal.toString();\n }\n this.internalMaxVal = newMaxVal;\n };\n\n private handleCommit = () => {\n // Sincronizza le prop con lo stato interno prima di emettere l'evento\n this.minVal = this.internalMinVal;\n this.maxVal = this.internalMaxVal;\n\n this.filterChange.emit({\n name: this.name,\n values: [this.minVal, this.maxVal],\n });\n };\n\n private getFillStyle() {\n const range = this.max - this.min;\n if (range === 0) return { left: '0%', width: '0%' };\n\n const leftPercent = ((this.internalMinVal - this.min) / range) * 100;\n const rightPercent = ((this.internalMaxVal - this.min) / range) * 100;\n return { left: `${leftPercent}%`, width: `${rightPercent - leftPercent}%` };\n }\n\n @Method()\n async getValues(): Promise<number[]> {\n return [this.internalMinVal, this.internalMaxVal];\n }\n\n render() {\n return (\n <Host class={{ 'is-disabled': this.disabled }}>\n <div class=\"label-container\">\n <label class=\"label-min\">\n {this.labelMinBefore} {this.internalMinVal}{this.labelMinAfter}\n </label>\n <label class=\"label-max\">\n {this.labelMaxBefore} {this.internalMaxVal}{this.labelMaxAfter}\n </label>\n </div>\n <div class=\"slider-container\">\n <div class=\"slider-track\"></div>\n <div class=\"slider-fill\" style={this.getFillStyle()}></div>\n <input\n type=\"range\"\n min={this.min}\n max={this.max}\n step={this.step}\n value={this.internalMinVal}\n onInput={this.handleMinInput}\n onChange={this.handleCommit}\n disabled={this.disabled}\n class=\"range-input\"\n aria-label={this.labelMinBefore}\n />\n <input\n type=\"range\"\n min={this.min}\n max={this.max}\n step={this.step}\n value={this.internalMaxVal}\n onInput={this.handleMaxInput}\n onChange={this.handleCommit}\n disabled={this.disab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LE,IAAK7B,KAAK6B,IACVC,IAAK9B,KAAK8B,IACVoB,KAAMlD,KAAKkD,KACX3C,MAAOP,KAAKU,eACZyC,QAASnD,KAAKC,eACdmD,SAAUpD,KAAKa,aACf+B,SAAU5C,KAAK4C,SACfD,MAAM,cAAa,aACP3C,KAAK6C,iBAEnBL,EAAA,SAAAE,IAAA,2CACEf,KAAK,QACLE,IAAK7B,KAAK6B,IACVC,IAAK9B,KAAK8B,IACVoB,KAAMlD,KAAKkD,KACX3C,MAAOP,KAAKQ,eACZ2C,QAASnD,KAAKW,eACdyC,SAAUpD,KAAKa,aACf+B,SAAU5C,KAAK4C,SACfD,MAAM,cAAa,aACP3C,KAAK+C,kB"}
@@ -384,6 +384,18 @@
384
384
  "name": "currency",
385
385
  "description": "Indicates the currency of the card"
386
386
  },
387
+ {
388
+ "name": "disallow-add-to-cart",
389
+ "description": "Indica se si tratta di un prodotto che può essere aggiunto al carrello solo dalla pagina prodotto"
390
+ },
391
+ {
392
+ "name": "disallow-add-to-cart-label",
393
+ "description": "Label del pulsante che appare quando il prodotto non può essere aggiunto al carrello"
394
+ },
395
+ {
396
+ "name": "enable-zoom",
397
+ "description": "Indica se è attivo lo zoom all'hover"
398
+ },
387
399
  {
388
400
  "name": "end-added-to-cart",
389
401
  "description": ""
@@ -616,10 +628,18 @@
616
628
  "name": "max",
617
629
  "description": "Il valore massimo possibile per lo slider."
618
630
  },
631
+ {
632
+ "name": "max-val",
633
+ "description": "Il valore massimo dello slider."
634
+ },
619
635
  {
620
636
  "name": "min",
621
637
  "description": "Il valore minimo possibile per lo slider."
622
638
  },
639
+ {
640
+ "name": "min-val",
641
+ "description": "Il valore minimo dello slider."
642
+ },
623
643
  {
624
644
  "name": "name",
625
645
  "description": "Nome identificativo del filtro, utilizzato nell'evento finale."
@@ -8,6 +8,7 @@ interface Variation {
8
8
  export declare class JumpCardEcommerce {
9
9
  JumpCardEcommerce: HTMLElement;
10
10
  jumpQuantityEl: any;
11
+ private imageEl;
11
12
  /** Indicate if card has only icon button*/
12
13
  onlyIconButton: boolean;
13
14
  /** Indicate if card has background*/
@@ -66,6 +67,12 @@ export declare class JumpCardEcommerce {
66
67
  addToWaitingList: boolean;
67
68
  /** Indicate if the card is Mini Card*/
68
69
  isMini: boolean;
70
+ /** Indica se si tratta di un prodotto che può essere aggiunto al carrello solo dalla pagina prodotto */
71
+ disallowAddToCart: boolean;
72
+ /** Label del pulsante che appare quando il prodotto non può essere aggiunto al carrello */
73
+ disallowAddToCartLabel: string;
74
+ /** Indica se è attivo lo zoom all'hover */
75
+ enableZoom: boolean;
69
76
  /** Indicate if the product is added to cart --> non deve esserci nelle storie! */
70
77
  addedToCart: boolean;
71
78
  endAddedToCart: boolean;
@@ -79,6 +86,7 @@ export declare class JumpCardEcommerce {
79
86
  productAddToCart: EventEmitter;
80
87
  productWaitingList: EventEmitter;
81
88
  variationSelected: EventEmitter;
89
+ goToProductPage: EventEmitter;
82
90
  /**
83
91
  * Set the price of the product
84
92
  * @param price
@@ -90,8 +98,11 @@ export declare class JumpCardEcommerce {
90
98
  componentWillLoad(): void;
91
99
  componentDidLoad(): void;
92
100
  disconnectedCallback(): void;
101
+ private handleMouseMove;
102
+ private handleMouseLeave;
93
103
  onQuantityChange(e: any): void;
94
104
  onToggleFavorite(): void;
105
+ goToProduct(): void;
95
106
  addProductToCart(): void;
96
107
  waitingList(): void;
97
108
  formatPrices(): void;
@@ -165,8 +165,16 @@ declare const _default: {
165
165
  control: string;
166
166
  defaultValue: boolean;
167
167
  };
168
+ enableZoom: {
169
+ name: string;
170
+ description: string;
171
+ control: string;
172
+ defaultValue: boolean;
173
+ };
168
174
  };
169
175
  };
170
176
  export default _default;
171
177
  export declare const Card: any;
172
178
  export declare const CardEvent: any;
179
+ export declare const CardWithZoom: any;
180
+ export declare const CardDisallow: any;
@@ -17,56 +17,30 @@ export declare class JumpFilterRange {
17
17
  max: number;
18
18
  /** L'incremento tra i valori dello slider. */
19
19
  step: number;
20
- /** I valori iniziali dello slider, come array [min, max]. */
21
- value: number[];
22
- /** Stato disabilitato dello slider. */
23
- disabled: boolean;
20
+ /** Il valore minimo dello slider. */
24
21
  minVal: number;
22
+ /** Il valore massimo dello slider. */
25
23
  maxVal: number;
24
+ /** Stato disabilitato dello slider. */
25
+ disabled: boolean;
26
+ private internalMinVal;
27
+ private internalMaxVal;
26
28
  /**
27
29
  * Evento emesso SOLO quando l'utente ha terminato la selezione (al rilascio del mouse).
28
- * Ideale per lanciare chiamate API o ricalcoli onerosi.
29
30
  */
30
31
  filterChange: EventEmitter<{
31
32
  name: string;
32
33
  values: number[];
33
34
  }>;
34
- valueWatcher(newValue: number[]): void;
35
+ watchMinVal(newValue: number): void;
36
+ watchMaxVal(newValue: number): void;
35
37
  componentWillLoad(): void;
36
- /**
37
- * Imposta i valori interni del componente partendo da un array.
38
- */
39
- private setComponentValues;
40
- /**
41
- * Gestisce l'aggiornamento in tempo reale dello slider MINIMO.
42
- * Aggiorna solo lo stato interno per un feedback visivo immediato.
43
- */
38
+ private initializeValues;
39
+ private validateValue;
44
40
  private handleMinInput;
45
- /**
46
- * Gestisce l'aggiornamento in tempo reale dello slider MASSIMO.
47
- * Aggiorna solo lo stato interno per un feedback visivo immediato.
48
- */
49
41
  private handleMaxInput;
50
- /**
51
- * Eseguito quando l'utente rilascia lo slider (evento onChange).
52
- * Consolida il valore e emette l'evento finale.
53
- */
54
42
  private handleCommit;
55
- /**
56
- * Calcola lo stile per la barra di riempimento tra i due slider.
57
- */
58
43
  private getFillStyle;
59
- /**
60
- * Metodo pubblico per impostare il valore del filtro programmaticamente.
61
- */
62
- setValue(values: number[], emitEvent?: boolean): Promise<number[]>;
63
- /**
64
- * Metodo pubblico per ottenere il valore corrente.
65
- */
66
44
  getValues(): Promise<number[]>;
67
- /**
68
- * Metodo pubblico per ottenere il nome del filtro.
69
- */
70
- getName(): Promise<string>;
71
45
  render(): any;
72
46
  }
@@ -44,3 +44,4 @@ export declare const PriceRange: any;
44
44
  export declare const Percentage: any;
45
45
  export declare const OnlyValues: any;
46
46
  export declare const Disabled: any;
47
+ export declare const WithValues: any;
@@ -183,6 +183,18 @@ export namespace Components {
183
183
  * Indicates the currency of the card
184
184
  */
185
185
  "currency": string;
186
+ /**
187
+ * Indica se si tratta di un prodotto che può essere aggiunto al carrello solo dalla pagina prodotto
188
+ */
189
+ "disallowAddToCart": boolean;
190
+ /**
191
+ * Label del pulsante che appare quando il prodotto non può essere aggiunto al carrello
192
+ */
193
+ "disallowAddToCartLabel": string;
194
+ /**
195
+ * Indica se è attivo lo zoom all'hover
196
+ */
197
+ "enableZoom": boolean;
186
198
  "endAddedToCart": boolean;
187
199
  /**
188
200
  * Indicates if the product is favorite
@@ -316,13 +328,6 @@ export namespace Components {
316
328
  * Stato disabilitato dello slider.
317
329
  */
318
330
  "disabled": boolean;
319
- /**
320
- * Metodo pubblico per ottenere il nome del filtro.
321
- */
322
- "getName": () => Promise<string>;
323
- /**
324
- * Metodo pubblico per ottenere il valore corrente.
325
- */
326
331
  "getValues": () => Promise<number[]>;
327
332
  /**
328
333
  * Testo da mostrare dopo il valore massimo (es. unità di misura).
@@ -344,26 +349,26 @@ export namespace Components {
344
349
  * Il valore massimo possibile per lo slider.
345
350
  */
346
351
  "max": number;
352
+ /**
353
+ * Il valore massimo dello slider.
354
+ */
355
+ "maxVal": number;
347
356
  /**
348
357
  * Il valore minimo possibile per lo slider.
349
358
  */
350
359
  "min": number;
351
360
  /**
352
- * Nome identificativo del filtro, utilizzato nell'evento finale.
361
+ * Il valore minimo dello slider.
353
362
  */
354
- "name": string;
363
+ "minVal": number;
355
364
  /**
356
- * Metodo pubblico per impostare il valore del filtro programmaticamente.
365
+ * Nome identificativo del filtro, utilizzato nell'evento finale.
357
366
  */
358
- "setValue": (values: number[], emitEvent?: boolean) => Promise<number[]>;
367
+ "name": string;
359
368
  /**
360
369
  * L'incremento tra i valori dello slider.
361
370
  */
362
371
  "step": number;
363
- /**
364
- * I valori iniziali dello slider, come array [min, max].
365
- */
366
- "value": number[];
367
372
  }
368
373
  /**
369
374
  * Componente select per filtri con supporto per opzioni e stato
@@ -829,6 +834,7 @@ declare global {
829
834
  "jump-add-to-cart": any;
830
835
  "jump-add-to-waiting-list": any;
831
836
  "jump-variation-selected": any;
837
+ "jump-card-go-to-product-page": any;
832
838
  }
833
839
  interface HTMLJumpCardEcommerceElement extends Components.JumpCardEcommerce, HTMLStencilElement {
834
840
  addEventListener<K extends keyof HTMLJumpCardEcommerceElementEventMap>(type: K, listener: (this: HTMLJumpCardEcommerceElement, ev: JumpCardEcommerceCustomEvent<HTMLJumpCardEcommerceElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
@@ -1356,6 +1362,18 @@ declare namespace LocalJSX {
1356
1362
  * Indicates the currency of the card
1357
1363
  */
1358
1364
  "currency"?: string;
1365
+ /**
1366
+ * Indica se si tratta di un prodotto che può essere aggiunto al carrello solo dalla pagina prodotto
1367
+ */
1368
+ "disallowAddToCart"?: boolean;
1369
+ /**
1370
+ * Label del pulsante che appare quando il prodotto non può essere aggiunto al carrello
1371
+ */
1372
+ "disallowAddToCartLabel"?: string;
1373
+ /**
1374
+ * Indica se è attivo lo zoom all'hover
1375
+ */
1376
+ "enableZoom"?: boolean;
1359
1377
  "endAddedToCart"?: boolean;
1360
1378
  /**
1361
1379
  * Indicates if the product is favorite
@@ -1411,6 +1429,7 @@ declare namespace LocalJSX {
1411
1429
  "notificationUrl"?: string;
1412
1430
  "onJump-add-to-cart"?: (event: JumpCardEcommerceCustomEvent<any>) => void;
1413
1431
  "onJump-add-to-waiting-list"?: (event: JumpCardEcommerceCustomEvent<any>) => void;
1432
+ "onJump-card-go-to-product-page"?: (event: JumpCardEcommerceCustomEvent<any>) => void;
1414
1433
  "onJump-toggle-favorite"?: (event: JumpCardEcommerceCustomEvent<any>) => void;
1415
1434
  "onJump-variation-selected"?: (event: JumpCardEcommerceCustomEvent<any>) => void;
1416
1435
  /**
@@ -1504,26 +1523,30 @@ declare namespace LocalJSX {
1504
1523
  * Il valore massimo possibile per lo slider.
1505
1524
  */
1506
1525
  "max"?: number;
1526
+ /**
1527
+ * Il valore massimo dello slider.
1528
+ */
1529
+ "maxVal"?: number;
1507
1530
  /**
1508
1531
  * Il valore minimo possibile per lo slider.
1509
1532
  */
1510
1533
  "min"?: number;
1534
+ /**
1535
+ * Il valore minimo dello slider.
1536
+ */
1537
+ "minVal"?: number;
1511
1538
  /**
1512
1539
  * Nome identificativo del filtro, utilizzato nell'evento finale.
1513
1540
  */
1514
1541
  "name"?: string;
1515
1542
  /**
1516
- * Evento emesso SOLO quando l'utente ha terminato la selezione (al rilascio del mouse). Ideale per lanciare chiamate API o ricalcoli onerosi.
1543
+ * Evento emesso SOLO quando l'utente ha terminato la selezione (al rilascio del mouse).
1517
1544
  */
1518
1545
  "onJump-filterchange"?: (event: JumpFilterRangeCustomEvent<{ name: string; values: number[] }>) => void;
1519
1546
  /**
1520
1547
  * L'incremento tra i valori dello slider.
1521
1548
  */
1522
1549
  "step"?: number;
1523
- /**
1524
- * I valori iniziali dello slider, come array [min, max].
1525
- */
1526
- "value"?: number[];
1527
1550
  }
1528
1551
  /**
1529
1552
  * Componente select per filtri con supporto per opzioni e stato
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jumpgroup/jump-design-system",
3
- "version": "0.3.79",
3
+ "version": "0.3.81",
4
4
  "description": "Stencil Component Starter",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.js",
@@ -1,2 +0,0 @@
1
- import{r as t,c as i,h as s,H as a,g as e}from"./p-98d5dd1f.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 .Footer__AddToCart{--jump-button-color:var(--jump-card-ecommerce-add-to-cart-color);--jump-button-background:var(--jump-card-ecommerce-add-to-cart-background);--jump-button-color-hover:var(--jump-card-ecommerce-add-to-cart-color-hover);--jump-button-background-hover:var(--jump-card-ecommerce-add-to-cart-background-hover)}:host .OutOfStock{justify-items:start;font-size:var(--fs-300);font-weight:var(--fw-900);color:var(--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{display:flex;align-items:flex-end;max-width:calc(50% - 1rem)}:host .SelectVariations select{appearance:none;background-color:transparent;border:1px solid var(--neutral-grey-secondary);border-radius:3px;color:var(--neutral-grey-secondary);font-size:var(--fs-300);padding:0.5rem 0.75rem;max-width:100%;background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236B7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3E%3C/svg%3E\");background-position:right 0.5rem center;background-repeat:no-repeat;background-size:1.5em 1.5em;padding-right:2.5rem;-webkit-print-color-adjust:exact}.slide-in-bottom{animation:slide-in-bottom 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) both}.slide-out-bottom{animation:slide-out-bottom 0.5s cubic-bezier(0.55, 0.085, 0.68, 0.53) both}.fade-in-out{animation-name:fade-in-out;animation-duration:6s;animation-timing-function:ease-in-out}@keyframes fade-in-out{from{opacity:0;transform:translateY(100px)}50%{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(100px)}}";const r=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.hasSlotAddToCart=false;this.link=undefined;this.img=undefined;this.imgAlt=undefined;this.hoverImg=undefined;this.hoverImgAlt=undefined;this.videoSrc=undefined;this.notificationUrl=undefined;this.notificationText="Aggiunto al carrello";this.productName=undefined;this.subtitle=undefined;this.productId=undefined;this.price=undefined;this.salePrice=undefined;this.currency="€";this.addToCartColor="secondary";this.badgeColor="secondary";this.outOfStock=false;this.outOfStockText=undefined;this.addToCartText="Aggiungi al carrello";this.waitingListText="Notifica disponibilità";this.addToWaitingList=false;this.isMini=false;this.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 e=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(a,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&&!this.hasSlotAddToCart?s("div",{class:"OnlyIconButton"},s("jump-button",{variant:"secondary",size:"large",pill:true,onlyIcon:true,onClick:()=>this.addProductToCart()},s("jump-icon",{slot:"prefix",name:"cart-shopping",category:"regular"}))):"",!this.isMini&&this.onlyIconButton&&this.hasSlotAddToCart?s("div",{class:"OnlyIconButton"},s("slot",{name:"add-to-cart"})):""),s("div",{class:`Content ${t} ${i} ${r}`},s("div",{class:`Body ${t} ${i} ${r}`},s("div",null,s("div",{class:"Info"},s("a",{href:this.link,class:"Product"},this.productName),this.subtitle?s("div",{class:"Subtitle"},this.subtitle):null),this.price?s("div",{class:`Price ${r}`},!this.isMini&&this.salePrice&&this.salePrice<this.price?s("div",{class:"Price__Discount"}," ",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||this.variations.length!=0?s("div",null,this.variations.length!=0?s("div",{class:"SelectVariations"},s("select",{ref:t=>this.variationSelectEl=t,onChange:()=>{this.onVariationSelected()}},this.variations.filter((t=>!t.imgUrl)).map((t=>s("option",{value:t.code},t.label))))):null,s("slot",{name:"quantity"})):null),s("div",{class:`Footer ${e} ${t} ${i} ${r}`},this.outOfStock&&!this.isMini?s("div",{class:"OutOfStock"},this.outOfStockText?this.outOfStockText:"Esaurito"):"",this.outOfStock?s("jump-button",{class:"Footer__AddToCart",variant:this.addToCartColor,size:"small",text:true,onClick:()=>this.waitingList()},s("jump-icon",{slot:"prefix",name:"bell",category:"regular",size:"small"}),this.waitingListText):"",!this.outOfStock&&!this.onlyIconButton&&!this.hasSlotAddToCart?s("jump-button",{class:"Footer__AddToCart",variant:this.addToCartColor,size:"small",text:true,onClick:()=>this.addProductToCart()},s("jump-icon",{slot:"prefix",name:"cart-shopping",category:"regular",size:"small"}),this.addToCartText):"",!this.outOfStock&&!this.onlyIconButton&&this.hasSlotAddToCart?s("slot",{name:"add-to-cart"}):null)))}get JumpCardEcommerce(){return e(this)}};n.style=r;export{n as jump_card_ecommerce};
2
- //# sourceMappingURL=p-7ac9382b.entry.js.map