@jumpgroup/jump-design-system 1.0.0 → 1.0.2
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 +2 -1
- 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-notice.cjs.entry.js +1 -1
- package/dist/cjs/jump-notice.cjs.entry.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/jump-card-ecommerce/jump-card-ecommerce.js +20 -1
- 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 +32 -2
- package/dist/collection/components/jump-card-ecommerce/jump-card-ecommerce.stories.js.map +1 -1
- package/dist/collection/components/jump-notice/jump-notice.js +1 -1
- package/dist/collection/components/jump-notice/jump-notice.js.map +1 -1
- package/dist/components/jump-card-ecommerce.js +3 -1
- package/dist/components/jump-card-ecommerce.js.map +1 -1
- package/dist/components/jump-notice.js +1 -1
- package/dist/components/jump-notice.js.map +1 -1
- package/dist/esm/jump-card-ecommerce.entry.js +2 -1
- package/dist/esm/jump-card-ecommerce.entry.js.map +1 -1
- package/dist/esm/jump-design-system.js +1 -1
- package/dist/esm/jump-notice.entry.js +1 -1
- package/dist/esm/jump-notice.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-0da24530.entry.js +2 -0
- package/dist/jump-design-system/p-0da24530.entry.js.map +1 -0
- package/dist/jump-design-system/{p-14aceb16.entry.js → p-9eba7c7c.entry.js} +2 -2
- package/dist/jump-design-system/{p-14aceb16.entry.js.map → p-9eba7c7c.entry.js.map} +1 -1
- package/dist/jump-design-system-elements.json +4 -0
- 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 +7 -4
- package/dist/types/components.d.ts +8 -0
- package/package.json +1 -1
- package/dist/jump-design-system/p-889e2dcd.entry.js +0 -2
- package/dist/jump-design-system/p-889e2dcd.entry.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jump-card-ecommerce.js","sourceRoot":"","sources":["../../../src/components/jump-card-ecommerce/jump-card-ecommerce.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAgB,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAgB9G,MAAM,OAAO,iBAAiB;;QA8U5B,+DAA+D;QAEvD,oBAAe,GAAG,CAAC,CAAa,EAAE,EAAE;YAC1C,IAAI,CAAC,IAAI,CAAC,UAAU,IAAI,CAAC,IAAI,CAAC,OAAO;gBAAE,OAAO;YAE9C,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,EAAE,GAAI,CAAC,CAAC,aAA6B,CAAC,qBAAqB,EAAE,CAAC;YAC9F,MAAM,CAAC,GAAG,CAAC,CAAC,OAAO,GAAG,IAAI,CAAC;YAC3B,MAAM,CAAC,GAAG,CAAC,CAAC,OAAO,GAAG,GAAG,CAAC;YAE1B,MAAM,KAAK,GAAG,CAAC,CAAC,GAAG,KAAK,GAAG,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,qCAAqC;YAC5E,MAAM,KAAK,GAAG,CAAC,CAAC,GAAG,MAAM,GAAG,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,qCAAqC;YAE7E,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,SAAS,GAAG,wBAAwB,KAAK,OAAO,KAAK,KAAK,CAAC;QAChF,CAAC,CAAC;QAEM,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAEF","sourcesContent":["import { Component, Host, h, Prop, Event, EventEmitter, Element, State, Listen, Method } from '@stencil/core';\n\nexport interface Variation {\n code: string;\n imgUrl: string;\n label: string;\n taxonomy: string;\n order?: number; // Aggiunta proprietà order\n // Add more keys as needed\n}\n\n@Component({\n tag: 'jump-card-ecommerce',\n styleUrl: 'jump-card-ecommerce.scss',\n shadow: true,\n})\nexport class JumpCardEcommerce {\n\n @Element() JumpCardEcommerce: HTMLElement;\n jumpQuantityEl;\n private imageEl: HTMLImageElement;\n\n /* ---------------------- @PROPERTIES ------------------------- */\n\n /** Indicate if card has only icon button*/\n @Prop() onlyIconButton: boolean = false;\n\n /** Indicate if card has background*/\n @Prop() hasBackground: boolean = false;\n\n /** Indicates the badge of the card*/\n @Prop() badge: string;\n\n /** Indicates if the product is favorite */\n @Prop({ mutable: true, reflect: true }) favorite: boolean = false;\n\n /** Indicate if the whislist is active in shop*/\n @Prop() hasFavorite: boolean = false;\n\n /** Indicate if the whislist will be slotted*/\n @Prop() hasSlotForFavorite: boolean = false;\n\n /** Indicate if the add to cart btn will be slotted*/\n @Prop() hasSlotAddToCart: boolean = false;\n\n /** Indicates the link of the card*/\n @Prop() link: string;\n\n /** Indicates the image's src of the card*/\n @Prop() img: string;\n\n /** Indicates the img's alt of the card*/\n @Prop() imgAlt: string;\n\n /** Indicates the over image's src of the card*/\n @Prop() hoverImg: string;\n\n /** Indicates the hover img's alt of the card*/\n @Prop() hoverImgAlt: string;\n\n /** Indicates the videoSrc of the card*/\n @Prop() videoSrc: string;\n\n /** Indicates the notificationUrl of the card*/\n @Prop() notificationUrl: string;\n\n /** Indicates the notificationText of the card*/\n @Prop() notificationText: string = 'Aggiunto al carrello';\n\n /** Indicates the title of the card*/\n @Prop() productName: string;\n\n /** Indicates the subtitle of the card*/\n @Prop() subtitle: string;\n\n /** Indicates the ID of the product, can be also a SKU*/\n @Prop() productId: string;\n\n /** Indicates the price of the card */\n @Prop() price: number;\n\n /** Indicates the sale price of the card */\n @Prop() salePrice: number;\n\n /** Indicates the currency of the card */\n @Prop() currency: string = '€';\n\n /** Indicates the variant of the button */\n @Prop() addToCartColor: 'primary' | 'secondary'|'white'|'neutral' = 'secondary';\n\n /** Indicates the variant of the button */\n @Prop() badgeColor: 'primary' | 'secondary' | 'neutral' | 'warning' | 'success' | 'danger' = 'secondary';\n\n /** Indicates if the product is outOfStock */\n @Prop({ mutable: true, reflect: true }) outOfStock: boolean = false;\n\n /** Indicates the outOfStockText of the product*/\n @Prop() outOfStockText: string;\n\n /** Indicates the button class of the add to cart / notification button */\n @Prop() addToCartText: string = 'Aggiungi al carrello';\n\n /** Indicates if the button to waiting list need to be shown */\n @Prop({ mutable: true, reflect: true }) waitingListButtonShow: boolean = false;\n\n /** Indicates the button class of the add to cart / notification button */\n @Prop() waitingListText: string = 'Notifica disponibilità';\n\n /** Indicate if the user request to be notified when te product is avaible*/\n @Prop() addToWaitingList: boolean = false;\n\n /** Indicate if the card is Mini Card*/\n @Prop() isMini: boolean = false;\n\n /** Indica se si tratta di un prodotto che può essere aggiunto al carrello solo dalla pagina prodotto */\n @Prop() disallowAddToCart: boolean = false;\n\n /** Label del pulsante che appare quando il prodotto non può essere aggiunto al carrello */\n @Prop() disallowAddToCartLabel: string = 'Scopri';\n\n /** Indica se è attivo lo zoom all'hover */\n @Prop() enableZoom: boolean = false;\n\n /** Controlla il comportamento dell'object-fit delle immagini */\n @Prop() imageObjectFit: 'cover' | 'scale-down' | 'contain' | 'fill' | 'none' = 'cover';\n\n /** Indica se selezionare automaticamente la prima variazione */\n @Prop() autoSelectFirstVariation: boolean = true;\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 /** Flag per tracciare se le opzioni sono state ordinate */\n @State() optionsOrdered: boolean = false;\n\n // è una proprietà che viene cambiata solo da dentro\n quantity: number;\n\n variationSelectEl: HTMLSelectElement;\n\n /* ---------------------- @EVENTS ------------------------- */\n\n @Event({ eventName: 'jump-toggle-favorite' }) toggleFavorite: EventEmitter;\n\n @Event({ eventName: 'jump-add-to-cart' }) productAddToCart: EventEmitter;\n\n @Event({ eventName: 'jump-add-to-waiting-list' }) productWaitingList: EventEmitter;\n\n @Event({ eventName: 'jump-variation-selected' }) variationSelected: EventEmitter; // verificare se corretto: aggiungo un evento\n\n @Event({ eventName: 'jump-card-go-to-product-page' }) goToProductPage: EventEmitter;\n\n /**\n * Set the price of the product\n * @param price\n * @param salePrice\n */\n @Method()\n async setPrice(price: number, salePrice: number) {\n let shouldFormat = false;\n if (price && price > 0) {\n shouldFormat = true;\n this.price = price;\n }\n\n if (salePrice && salePrice > 0) {\n this.salePrice = salePrice;\n }\n\n if (shouldFormat) {\n this.formatPrices();\n }\n }\n\n /**\n * Forza l'ordinamento delle variazioni (utile per debugging o situazioni edge-case)\n */\n @Method()\n async forceVariationsOrder() {\n this.optionsOrdered = false;\n setTimeout(() => {\n this.optionsOrdered = true;\n }, 1);\n }\n\n /**\n * Seleziona automaticamente la prima variazione se abilitato e se nessuna è già selezionata\n */\n private selectFirstVariationIfEnabled() {\n if (this.autoSelectFirstVariation && !this.selectedVariation && this.variations.length > 0) {\n // Ordiniamo le variazioni per ottenere la prima\n const sortedVariations = [...this.variations].sort((a, b) => {\n const orderA = a.order || 999;\n const orderB = b.order || 999;\n \n if (orderA !== orderB) {\n return orderA - orderB;\n }\n \n return a.code.localeCompare(b.code);\n });\n \n // Selezioniamo la prima variazione\n const firstVariation = sortedVariations[0];\n this.selectedVariation = firstVariation;\n \n // Aggiorniamo anche la select se esiste\n setTimeout(() => {\n if (this.variationSelectEl) {\n this.variationSelectEl.value = firstVariation.code;\n }\n }, 50);\n \n // Emettiamo l'evento di selezione\n this.variationSelected.emit(firstVariation);\n }\n }\n\n /**\n * Seleziona una variazione specifica tramite code\n */\n @Method()\n async selectVariation(variationCode: string) {\n const variation = this.variations.find(v => v.code === variationCode);\n if (variation) {\n this.selectedVariation = variation;\n \n if (this.variationSelectEl) {\n this.variationSelectEl.value = variationCode;\n }\n \n this.variationSelected.emit(variation);\n return true;\n }\n return false;\n }\n\n /**\n * Seleziona la prima variazione disponibile\n */\n @Method()\n async selectFirstVariation() {\n if (this.variations.length > 0) {\n const sortedVariations = [...this.variations].sort((a, b) => {\n const orderA = a.order || 999;\n const orderB = b.order || 999;\n \n if (orderA !== orderB) {\n return orderA - orderB;\n }\n \n return a.code.localeCompare(b.code);\n });\n \n return await this.selectVariation(sortedVariations[0].code);\n }\n return false;\n }\n\n /**\n * Ottiene la variazione attualmente selezionata\n */\n @Method()\n async getSelectedVariation(): Promise<Variation | null> {\n return this.selectedVariation || null;\n }\n\n @Listen('jump-card-ecommerce-option-connected')\n addOption(e) {\n let props = e.detail; // es {code: 'sku1', imageUrl: 'https://google.com/', order: 1}\n \n // Aggiungiamo la nuova variazione solo se non esiste già\n const existingIndex = this.variations.findIndex(v => v.code === props.code);\n if (existingIndex === -1) {\n this.variations = [...this.variations, { ...props }];\n } else {\n // Se esiste già, la aggiorniamo\n this.variations = this.variations.map((v, i) => i === existingIndex ? { ...props } : v);\n }\n \n // Resettiamo il flag di ordinamento\n this.optionsOrdered = false;\n \n // Forziamo il re-render per applicare l'ordinamento dopo un brevissimo delay\n setTimeout(() => {\n this.optionsOrdered = true;\n // Selezioniamo automaticamente la prima variazione se abilitato\n this.selectFirstVariationIfEnabled();\n }, 10);\n }\n\n onVariationSelected() {\n let currentValue = this.variationSelectEl.value;\n \n // Ordiniamo sempre le variazioni prima di cercare quella selezionata\n const sortedVariations = [...this.variations].sort((a, b) => {\n const orderA = a.order || 999;\n const orderB = b.order || 999;\n \n if (orderA !== orderB) {\n return orderA - orderB;\n }\n \n return a.code.localeCompare(b.code);\n });\n \n let variation = sortedVariations.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 // Ordiniamo sempre le variazioni al momento del render per garantire consistenza\n const sortedVariations = [...this.variations].sort((a, b) => {\n const orderA = a.order || 999;\n const orderB = b.order || 999;\n \n if (orderA !== orderB) {\n return orderA - orderB;\n }\n \n // Se order è uguale, ordina per codice alfanumericamente\n return a.code.localeCompare(b.code);\n });\n\n function calculateDiscount(price: number, salePrice: number): string {\n const discount = ((price - salePrice) / price) * 100;\n return discount.toFixed(0);\n };\n\n return (\n <Host style={{'--image-object-fit': this.imageObjectFit}}>\n \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 {!this.isMini && this.badge ?\n <jump-badge class={`${backgroundClass} ${iconOnlyClass}`} variant={this.badgeColor} dimension=\"small\"\n label={this.badge}></jump-badge> : ''}\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 </div>\n\n <div class={`Content ${backgroundClass} ${iconOnlyClass} ${miniCard}`}>\n <div class={`Body ${backgroundClass} ${iconOnlyClass} ${miniCard}`}>\n <div class=\"Body__Top\">\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 || sortedVariations.length != 0 ?\n <div class=\"Body__Bottom\">\n {(sortedVariations.length != 0 && !this.disallowAddToCart) ?\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 {sortedVariations\n .filter((variation) => !variation.imgUrl)\n .map((variation, index) => (\n <option \n key={`${variation.code}-${variation.order || 999}-${index}`} \n value={variation.code}\n selected={this.selectedVariation?.code === variation.code}\n >\n {variation.label}\n </option>\n ))}\n </select>\n </div>\n : null}\n {!this.disallowAddToCart &&\n <slot name=\"quantity\"></slot>\n }\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 && this.waitingListButtonShow ?\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"]}
|
|
1
|
+
{"version":3,"file":"jump-card-ecommerce.js","sourceRoot":"","sources":["../../../src/components/jump-card-ecommerce/jump-card-ecommerce.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAgB,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAg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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAEF","sourcesContent":["import { Component, Host, h, Prop, Event, EventEmitter, Element, State, Listen, Method } from '@stencil/core';\n\nexport interface Variation {\n code: string;\n imgUrl: string;\n label: string;\n taxonomy: string;\n order?: number; // Aggiunta proprietà order\n // Add more keys as needed\n}\n\n@Component({\n tag: 'jump-card-ecommerce',\n styleUrl: 'jump-card-ecommerce.scss',\n shadow: true,\n})\nexport class JumpCardEcommerce {\n\n @Element() JumpCardEcommerce: HTMLElement;\n jumpQuantityEl;\n private imageEl: HTMLImageElement;\n\n /* ---------------------- @PROPERTIES ------------------------- */\n\n /** Indicates the threshold below which the discount will be hidden */\n @Prop() hideDiscountIfLessThreshold: number = undefined;\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 if the button to waiting list need to be shown */\n @Prop({ mutable: true, reflect: true }) waitingListButtonShow: boolean = false;\n\n /** Indicates the button class of the add to cart / notification button */\n @Prop() waitingListText: string = 'Notifica disponibilità';\n\n /** Indicate if the user request to be notified when te product is avaible*/\n @Prop() addToWaitingList: boolean = false;\n\n /** Indicate if the card is Mini Card*/\n @Prop() isMini: boolean = false;\n\n /** Indica se si tratta di un prodotto che può essere aggiunto al carrello solo dalla pagina prodotto */\n @Prop() disallowAddToCart: boolean = false;\n\n /** Label del pulsante che appare quando il prodotto non può essere aggiunto al carrello */\n @Prop() disallowAddToCartLabel: string = 'Scopri';\n\n /** Indica se è attivo lo zoom all'hover */\n @Prop() enableZoom: boolean = false;\n\n /** Controlla il comportamento dell'object-fit delle immagini */\n @Prop() imageObjectFit: 'cover' | 'scale-down' | 'contain' | 'fill' | 'none' = 'cover';\n\n /** Indica se selezionare automaticamente la prima variazione */\n @Prop() autoSelectFirstVariation: boolean = true;\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 /** Flag per tracciare se le opzioni sono state ordinate */\n @State() optionsOrdered: boolean = false;\n\n // è una proprietà che viene cambiata solo da dentro\n quantity: number;\n\n variationSelectEl: HTMLSelectElement;\n\n /* ---------------------- @EVENTS ------------------------- */\n\n @Event({ eventName: 'jump-toggle-favorite' }) toggleFavorite: EventEmitter;\n\n @Event({ eventName: 'jump-add-to-cart' }) productAddToCart: EventEmitter;\n\n @Event({ eventName: 'jump-add-to-waiting-list' }) productWaitingList: EventEmitter;\n\n @Event({ eventName: 'jump-variation-selected' }) variationSelected: EventEmitter; // verificare se corretto: aggiungo un evento\n\n @Event({ eventName: 'jump-card-go-to-product-page' }) goToProductPage: EventEmitter;\n\n /**\n * Set the price of the product\n * @param price\n * @param salePrice\n */\n @Method()\n async setPrice(price: number, salePrice: number) {\n let shouldFormat = false;\n if (price && price > 0) {\n shouldFormat = true;\n this.price = price;\n }\n\n if (salePrice && salePrice > 0) {\n this.salePrice = salePrice;\n }\n\n if (shouldFormat) {\n this.formatPrices();\n }\n }\n\n /**\n * Forza l'ordinamento delle variazioni (utile per debugging o situazioni edge-case)\n */\n @Method()\n async forceVariationsOrder() {\n this.optionsOrdered = false;\n setTimeout(() => {\n this.optionsOrdered = true;\n }, 1);\n }\n\n /**\n * Seleziona automaticamente la prima variazione se abilitato e se nessuna è già selezionata\n */\n private selectFirstVariationIfEnabled() {\n if (this.autoSelectFirstVariation && !this.selectedVariation && this.variations.length > 0) {\n // Ordiniamo le variazioni per ottenere la prima\n const sortedVariations = [...this.variations].sort((a, b) => {\n const orderA = a.order || 999;\n const orderB = b.order || 999;\n \n if (orderA !== orderB) {\n return orderA - orderB;\n }\n \n return a.code.localeCompare(b.code);\n });\n \n // Selezioniamo la prima variazione\n const firstVariation = sortedVariations[0];\n this.selectedVariation = firstVariation;\n \n // Aggiorniamo anche la select se esiste\n setTimeout(() => {\n if (this.variationSelectEl) {\n this.variationSelectEl.value = firstVariation.code;\n }\n }, 50);\n \n // Emettiamo l'evento di selezione\n this.variationSelected.emit(firstVariation);\n }\n }\n\n /**\n * Seleziona una variazione specifica tramite code\n */\n @Method()\n async selectVariation(variationCode: string) {\n const variation = this.variations.find(v => v.code === variationCode);\n if (variation) {\n this.selectedVariation = variation;\n \n if (this.variationSelectEl) {\n this.variationSelectEl.value = variationCode;\n }\n \n this.variationSelected.emit(variation);\n return true;\n }\n return false;\n }\n\n /**\n * Seleziona la prima variazione disponibile\n */\n @Method()\n async selectFirstVariation() {\n if (this.variations.length > 0) {\n const sortedVariations = [...this.variations].sort((a, b) => {\n const orderA = a.order || 999;\n const orderB = b.order || 999;\n \n if (orderA !== orderB) {\n return orderA - orderB;\n }\n \n return a.code.localeCompare(b.code);\n });\n \n return await this.selectVariation(sortedVariations[0].code);\n }\n return false;\n }\n\n /**\n * Ottiene la variazione attualmente selezionata\n */\n @Method()\n async getSelectedVariation(): Promise<Variation | null> {\n return this.selectedVariation || null;\n }\n\n @Listen('jump-card-ecommerce-option-connected')\n addOption(e) {\n let props = e.detail; // es {code: 'sku1', imageUrl: 'https://google.com/', order: 1}\n \n // Aggiungiamo la nuova variazione solo se non esiste già\n const existingIndex = this.variations.findIndex(v => v.code === props.code);\n if (existingIndex === -1) {\n this.variations = [...this.variations, { ...props }];\n } else {\n // Se esiste già, la aggiorniamo\n this.variations = this.variations.map((v, i) => i === existingIndex ? { ...props } : v);\n }\n \n // Resettiamo il flag di ordinamento\n this.optionsOrdered = false;\n \n // Forziamo il re-render per applicare l'ordinamento dopo un brevissimo delay\n setTimeout(() => {\n this.optionsOrdered = true;\n // Selezioniamo automaticamente la prima variazione se abilitato\n this.selectFirstVariationIfEnabled();\n }, 10);\n }\n\n onVariationSelected() {\n let currentValue = this.variationSelectEl.value;\n \n // Ordiniamo sempre le variazioni prima di cercare quella selezionata\n const sortedVariations = [...this.variations].sort((a, b) => {\n const orderA = a.order || 999;\n const orderB = b.order || 999;\n \n if (orderA !== orderB) {\n return orderA - orderB;\n }\n \n return a.code.localeCompare(b.code);\n });\n \n let variation = sortedVariations.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 // Ordiniamo sempre le variazioni al momento del render per garantire consistenza\n const sortedVariations = [...this.variations].sort((a, b) => {\n const orderA = a.order || 999;\n const orderB = b.order || 999;\n \n if (orderA !== orderB) {\n return orderA - orderB;\n }\n \n // Se order è uguale, ordina per codice alfanumericamente\n return a.code.localeCompare(b.code);\n });\n\n function calculateDiscount(price: number, salePrice: number): string {\n const discount = ((price - salePrice) / price) * 100;\n return discount.toFixed(0);\n };\n\n return (\n <Host style={{'--image-object-fit': this.imageObjectFit}}>\n \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 {!this.isMini && this.badge ?\n <jump-badge class={`${backgroundClass} ${iconOnlyClass}`} variant={this.badgeColor} dimension=\"small\"\n label={this.badge}></jump-badge> : ''}\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 </div>\n\n <div class={`Content ${backgroundClass} ${iconOnlyClass} ${miniCard}`}>\n <div class={`Body ${backgroundClass} ${iconOnlyClass} ${miniCard}`}>\n <div class=\"Body__Top\">\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) && (this.hideDiscountIfLessThreshold === undefined || parseFloat(calculateDiscount(this.price, this.salePrice)) > this.hideDiscountIfLessThreshold) ?\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 || sortedVariations.length != 0 ?\n <div class=\"Body__Bottom\">\n {(sortedVariations.length != 0 && !this.disallowAddToCart) ?\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 {sortedVariations\n .filter((variation) => !variation.imgUrl)\n .map((variation, index) => (\n <option \n key={`${variation.code}-${variation.order || 999}-${index}`} \n value={variation.code}\n selected={this.selectedVariation?.code === variation.code}\n >\n {variation.label}\n </option>\n ))}\n </select>\n </div>\n : null}\n {!this.disallowAddToCart &&\n <slot name=\"quantity\"></slot>\n }\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 && this.waitingListButtonShow ?\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}"]}
|
|
@@ -121,6 +121,11 @@ export default {
|
|
|
121
121
|
description: 'Prezzo scontato del prodotto',
|
|
122
122
|
control: 'number',
|
|
123
123
|
},
|
|
124
|
+
hideDiscountIfLessThreshold: {
|
|
125
|
+
name: 'hide-discount-if-less-threshold',
|
|
126
|
+
description: 'Indicates the threshold below which the discount will be hidden',
|
|
127
|
+
control: 'number'
|
|
128
|
+
},
|
|
124
129
|
addToCartText: {
|
|
125
130
|
name: 'add-to-cart-text',
|
|
126
131
|
description: 'Testo bottone aggiungi al carrello',
|
|
@@ -232,6 +237,7 @@ Card.args = {
|
|
|
232
237
|
productId: '1',
|
|
233
238
|
price: 15,
|
|
234
239
|
salePrice: 10,
|
|
240
|
+
hideDiscountIfLessThreshold: 10,
|
|
235
241
|
addToCartText: 'Aggiungi al carrello',
|
|
236
242
|
addToCartColor: 'secondary',
|
|
237
243
|
hasSlotAddToCart: false,
|
|
@@ -396,7 +402,10 @@ export const CardWithoutAutoSelection = TemplateWithVariations.bind({});
|
|
|
396
402
|
CardWithoutAutoSelection.args = Object.assign(Object.assign({}, Card.args), { productName: 'T-shirt senza selezione automatica', subtitle: 'L\'utente deve selezionare manualmente la variazione', autoSelectFirstVariation: false });
|
|
397
403
|
export const CardWithoutWaitingList = TemplateDisallowAllowCart.bind({});
|
|
398
404
|
CardWithoutWaitingList.args = Object.assign(Object.assign({}, Card.args), { outOfStock: true, waitingListButtonShow: false });
|
|
399
|
-
|
|
405
|
+
// Template for grid stories
|
|
406
|
+
const TemplateGrid = (args) => {
|
|
407
|
+
const extraAttributes = generateAttributesFromArgs(args);
|
|
408
|
+
return formatHtml(`
|
|
400
409
|
<div style="display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; max-width: 900px; margin: 0 auto;">
|
|
401
410
|
<jump-card-ecommerce
|
|
402
411
|
product-name="T-shirt Uomo"
|
|
@@ -410,6 +419,7 @@ export const CardArchiveGrid = () => formatHtml(`
|
|
|
410
419
|
badge-color="secondary"
|
|
411
420
|
disallow-add-to-cart="true"
|
|
412
421
|
add-to-cart-text="Aggiungi al carrello"
|
|
422
|
+
${extraAttributes}
|
|
413
423
|
>
|
|
414
424
|
|
|
415
425
|
<jump-card-ecommerce-option code="s" label="Small (S)" order="1"></jump-card-ecommerce-option>
|
|
@@ -423,9 +433,11 @@ export const CardArchiveGrid = () => formatHtml(`
|
|
|
423
433
|
img="https://images.pexels.com/photos/532220/pexels-photo-532220.jpeg?auto=compress&cs=tinysrgb&w=800"
|
|
424
434
|
img-alt="Felpa Donna"
|
|
425
435
|
price="29"
|
|
436
|
+
sale-price="25"
|
|
426
437
|
badge="Novità"
|
|
427
438
|
badge-color="primary"
|
|
428
439
|
add-to-cart-text="Aggiungi al carrello"
|
|
440
|
+
${extraAttributes}
|
|
429
441
|
>
|
|
430
442
|
<jump-card-ecommerce-option code="xs" label="XS" order="1"></jump-card-ecommerce-option>
|
|
431
443
|
<jump-card-ecommerce-option code="s" label="S" order="2"></jump-card-ecommerce-option>
|
|
@@ -442,6 +454,7 @@ export const CardArchiveGrid = () => formatHtml(`
|
|
|
442
454
|
badge="Best Seller"
|
|
443
455
|
badge-color="success"
|
|
444
456
|
add-to-cart-text="Aggiungi al carrello"
|
|
457
|
+
${extraAttributes}
|
|
445
458
|
>
|
|
446
459
|
<jump-card-ecommerce-option code="30" label="Taglia 30" order="1"></jump-card-ecommerce-option>
|
|
447
460
|
<jump-card-ecommerce-option code="32" label="Taglia 32" order="2"></jump-card-ecommerce-option>
|
|
@@ -459,6 +472,7 @@ export const CardArchiveGrid = () => formatHtml(`
|
|
|
459
472
|
badge="Promo"
|
|
460
473
|
badge-color="danger"
|
|
461
474
|
add-to-cart-text="Aggiungi al carrello"
|
|
475
|
+
${extraAttributes}
|
|
462
476
|
>
|
|
463
477
|
<jump-card-ecommerce-option code="m" label="M" order="1"></jump-card-ecommerce-option>
|
|
464
478
|
<jump-card-ecommerce-option code="l" label="L" order="2"></jump-card-ecommerce-option>
|
|
@@ -476,6 +490,7 @@ export const CardArchiveGrid = () => formatHtml(`
|
|
|
476
490
|
badge="In offerta"
|
|
477
491
|
badge-color="secondary"
|
|
478
492
|
add-to-cart-text="Aggiungi al carrello"
|
|
493
|
+
${extraAttributes}
|
|
479
494
|
>
|
|
480
495
|
<jump-card-ecommerce-option code="s" label="Small (S)" order="1"></jump-card-ecommerce-option>
|
|
481
496
|
<jump-card-ecommerce-option code="m" label="Medium (M)" order="2"></jump-card-ecommerce-option>
|
|
@@ -493,6 +508,7 @@ export const CardArchiveGrid = () => formatHtml(`
|
|
|
493
508
|
badge="Novità"
|
|
494
509
|
badge-color="primary"
|
|
495
510
|
add-to-cart-text="Aggiungi al carrello"
|
|
511
|
+
${extraAttributes}
|
|
496
512
|
>
|
|
497
513
|
<jump-card-ecommerce-option code="xs" label="XS" order="1"></jump-card-ecommerce-option>
|
|
498
514
|
<jump-card-ecommerce-option code="s" label="S" order="2"></jump-card-ecommerce-option>
|
|
@@ -511,6 +527,7 @@ export const CardArchiveGrid = () => formatHtml(`
|
|
|
511
527
|
badge-color="success"
|
|
512
528
|
add-to-cart-text="Aggiungi al carrello"
|
|
513
529
|
enable-zoom
|
|
530
|
+
${extraAttributes}
|
|
514
531
|
>
|
|
515
532
|
<jump-card-ecommerce-option code="30" label="Taglia 30" order="1"></jump-card-ecommerce-option>
|
|
516
533
|
<jump-card-ecommerce-option code="32" label="Taglia 32" order="2"></jump-card-ecommerce-option>
|
|
@@ -529,6 +546,7 @@ export const CardArchiveGrid = () => formatHtml(`
|
|
|
529
546
|
badge-color="danger"
|
|
530
547
|
add-to-cart-text="Aggiungi al carrello"
|
|
531
548
|
enable-zoom
|
|
549
|
+
${extraAttributes}
|
|
532
550
|
>
|
|
533
551
|
<jump-card-ecommerce-option code="m" label="M" order="1"></jump-card-ecommerce-option>
|
|
534
552
|
<jump-card-ecommerce-option code="l" label="L" order="2"></jump-card-ecommerce-option>
|
|
@@ -547,6 +565,7 @@ export const CardArchiveGrid = () => formatHtml(`
|
|
|
547
565
|
badge-color="secondary"
|
|
548
566
|
add-to-cart-text="Aggiungi al carrello"
|
|
549
567
|
enable-zoom
|
|
568
|
+
${extraAttributes}
|
|
550
569
|
>
|
|
551
570
|
<jump-card-ecommerce-option code="s" label="Small (S)" order="1"></jump-card-ecommerce-option>
|
|
552
571
|
<jump-card-ecommerce-option code="m" label="Medium (M)" order="2"></jump-card-ecommerce-option>
|
|
@@ -565,6 +584,7 @@ export const CardArchiveGrid = () => formatHtml(`
|
|
|
565
584
|
badge-color="primary"
|
|
566
585
|
add-to-cart-text="Aggiungi al carrello"
|
|
567
586
|
enable-zoom
|
|
587
|
+
${extraAttributes}
|
|
568
588
|
>
|
|
569
589
|
<jump-card-ecommerce-option code="xs" label="XS" order="1"></jump-card-ecommerce-option>
|
|
570
590
|
<jump-card-ecommerce-option code="s" label="S" order="2"></jump-card-ecommerce-option>
|
|
@@ -583,6 +603,7 @@ export const CardArchiveGrid = () => formatHtml(`
|
|
|
583
603
|
badge-color="success"
|
|
584
604
|
add-to-cart-text="Aggiungi al carrello"
|
|
585
605
|
enable-zoom
|
|
606
|
+
${extraAttributes}
|
|
586
607
|
>
|
|
587
608
|
<jump-card-ecommerce-option code="30" label="Taglia 30" order="1"></jump-card-ecommerce-option>
|
|
588
609
|
<jump-card-ecommerce-option code="32" label="Taglia 32" order="2"></jump-card-ecommerce-option>
|
|
@@ -601,6 +622,7 @@ export const CardArchiveGrid = () => formatHtml(`
|
|
|
601
622
|
badge-color="danger"
|
|
602
623
|
add-to-cart-text="Aggiungi al carrello"
|
|
603
624
|
enable-zoom
|
|
625
|
+
${extraAttributes}
|
|
604
626
|
>
|
|
605
627
|
<jump-card-ecommerce-option code="m" label="M" order="1"></jump-card-ecommerce-option>
|
|
606
628
|
<jump-card-ecommerce-option code="l" label="L" order="2"></jump-card-ecommerce-option>
|
|
@@ -609,5 +631,13 @@ export const CardArchiveGrid = () => formatHtml(`
|
|
|
609
631
|
</jump-card-ecommerce>
|
|
610
632
|
</div>
|
|
611
633
|
`);
|
|
612
|
-
|
|
634
|
+
};
|
|
635
|
+
export const CardArchiveGrid = TemplateGrid.bind({});
|
|
636
|
+
CardArchiveGrid.storyName = 'Archivio (Grid)';
|
|
637
|
+
CardArchiveGrid.args = {};
|
|
638
|
+
export const CardThresold = TemplateGrid.bind({});
|
|
639
|
+
CardThresold.storyName = 'Archivio con soglia sconto (10%)';
|
|
640
|
+
CardThresold.args = {
|
|
641
|
+
hideDiscountIfLessThreshold: 10,
|
|
642
|
+
};
|
|
613
643
|
//# sourceMappingURL=jump-card-ecommerce.stories.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jump-card-ecommerce.stories.js","sourceRoot":"","sources":["../../../src/components/jump-card-ecommerce/jump-card-ecommerce.stories.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,UAAU,EAAC,MAAM,mBAAmB,CAAC;AAE1E,eAAe;IACb,KAAK,EAAE,+BAA+B;IACtC,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,QAAQ,EAAE;QACR,aAAa,EAAE;YACb,IAAI,EAAE,gBAAgB;YACtB,WAAW,EAAE,yCAAyC;YACtD,OAAO,EAAE,SAAS;SACnB;QACD,cAAc,EAAE;YACd,IAAI,EAAE,kBAAkB;YACxB,WAAW,EAAE,4DAA4D;YACzE,OAAO,EAAE,SAAS;SACnB;QACD,KAAK,EAAE;YACL,IAAI,EAAE,OAAO;YACb,WAAW,EAAE,kBAAkB;YAC/B,OAAO,EAAE,MAAM;SAChB;QACD,QAAQ,EAAE;YACR,IAAI,EAAE,UAAU;YAChB,WAAW,EAAE,mCAAmC;YAChD,OAAO,EAAE,SAAS;SACnB;QACD,WAAW,EAAE;YACX,IAAI,EAAE,cAAc;YACpB,WAAW,EAAE,mCAAmC;YAChD,OAAO,EAAE,SAAS;SACnB;QACD,kBAAkB,EAAE;YAClB,IAAI,EAAE,uBAAuB;YAC7B,WAAW,EAAE,6JAA6J;YAC1K,OAAO,EAAE,SAAS;YAClB,YAAY,EAAE,IAAI;SACnB;QACD,IAAI,EAAE;YACJ,IAAI,EAAE,MAAM;YACZ,WAAW,EAAE,iBAAiB;YAC9B,OAAO,EAAE,MAAM;SAChB;QACD,GAAG,EAAE;YACH,IAAI,EAAE,KAAK;YACX,WAAW,EAAE,gFAAgF;YAC7F,OAAO,EAAE,MAAM;YACf,YAAY,EAAE,gIAAgI;YAC9I,EAAE,EAAC;gBACD,GAAG,EAAE,UAAU;gBACf,MAAM,EAAE,KAAK;aACd;SACF;QACD,MAAM,EAAE;YACN,IAAI,EAAE,SAAS;YACf,WAAW,EAAE,sEAAsE;YACnF,O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AC,CAAC;AACzE,sBAAsB,CAAC,IAAI,mCACtB,IAAI,CAAC,IAAI,KACZ,UAAU,EAAE,IAAI,EAChB,qBAAqB,EAAE,KAAK,GAC7B,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GAAG,GAAG,EAAE,CAAC,UAAU,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoN/C,CAAC,CAAC;AACH,eAAe,CAAC,SAAS,GAAG,qDAAqD,CAAC","sourcesContent":["import { generateAttributesFromArgs, formatHtml} from '../../utils/utils';\n\nexport default {\n title: 'Components/CardEcommerce/Card',\n tags: ['autodocs'],\n argTypes: {\n hasBackground: {\n name: 'has-background',\n description: 'Aggiungi o meno il background alla card',\n control: 'boolean',\n },\n onlyIconButton: {\n name: 'only-icon-button',\n description: 'Cambia lo stile della card mostrando solo il bottone icona',\n control: 'boolean',\n },\n badge: {\n name: 'badge',\n description: 'Badge della card',\n control: 'text',\n },\n favorite: {\n name: 'favorite',\n description: 'Aggiunge il prodotto ai preferiti',\n control: 'boolean',\n },\n hasFavorite: {\n name: 'has-favorite',\n description: 'Aggiunge il prodotto ai preferiti',\n control: 'boolean',\n },\n hasSlotForFavorite: {\n name: 'has-slot-for-favorite',\n description: 'Di default la card ecommerce ha un bottone icona per il favorite che emette un evento; Se hasSlotForFavorite è true il bottone viene sostituito da uno slot',\n control: 'boolean',\n defaultValue: true,\n },\n link: {\n name: 'link',\n description: 'Link della card',\n control: 'text',\n },\n img: {\n name: 'img',\n description: 'Url dell\\'immagine da visualizzare, si attiva solo se non è presente video-src',\n control: 'text',\n defaultValue: 'https://content-management-files.canva.com/cdn-cgi/image/f=auto,q=70/2fdbd7ab-f378-4c63-8b21-c944ad2633fd/header_t-shirts2.jpg',\n if:{\n arg: 'videoSrc',\n exists: false\n }\n },\n imgAlt: {\n name: 'img-alt',\n description: 'Alt dell\\'immagine da visualizzare, si attiva solo se è presente img',\n control: 'text',\n if:{\n arg: 'img',\n exists: true\n }\n },\n hoverImg: {\n name: 'hover-img',\n description: 'Url dell\\'immagine in hover da visualizzare, si attiva solo se non è presente videoSrc',\n control: 'text',\n defaultValue: 'https://ch.benetton.com/dw/image/v2/BBSF_PRD/on/demandware.static/-/Sites-ucb-master/default/dwf2799586/images/Full_Card_v/UCB-Bambino_24P_3096C10JA_0Z3_FS_Full_Card_v.jpg?sw=600&sh=800',\n if:{\n arg: 'videoSrc',\n exists: false\n }\n },\n hoverImgAlt: {\n name: 'hover-img-alt',\n description: 'Alt dell\\'immagine in hover da visualizzare, si attiva solo se è presente img',\n control: 'text',\n if:{\n arg: 'img',\n exists: true\n }\n },\n videoSrc: {\n name: 'video-src',\n description: 'Url del video da visualizzare, si attiva solo se non è presente img',\n control: 'text',\n if:{\n arg: 'img',\n exists: false\n }\n },\n notificationUrl: {\n name: 'notification-url',\n description: 'Url della notifica da visualizzare',\n control: 'text',\n },\n notificationText: {\n name: 'notification-text',\n description: 'Testo della notifica da visualizzare',\n control: 'text',\n },\n productName: {\n name: 'product-name',\n description: 'Nome del prodotto',\n control: 'text',\n },\n subtitle: {\n name: 'subtitle',\n description: 'Sottotitolo della card',\n control: 'text',\n },\n productId: {\n name: 'product-id',\n description: 'ID del prodotto',\n control: 'text',\n },\n price: {\n name: 'price',\n description: 'Prezzo del prodotto; Se la card è in versione Mini gli va passato il prezzo scontato',\n control: 'number',\n },\n salePrice: {\n name: 'sale-price',\n description: 'Prezzo scontato del prodotto',\n control: 'number',\n },\n addToCartText: {\n name: 'add-to-cart-text',\n description: 'Testo bottone aggiungi al carrello',\n control: 'text',\n },\n addToCartColor: {\n name: 'add-to-cart-color',\n description: 'Colore del bottone aggiungi al carrello',\n control: 'select',\n options: [\n 'primary',\n 'secondary',\n 'neutral',\n 'white'\n ],\n },\n hasSlotAddToCart: {\n name: 'has-slot-add-to-cart',\n description: 'Di default la card ecommerce ha un bottone per l\\'aggiunta al carrello; Se has-slot-add-to-cart è true il bottone viene sostituito da uno slot',\n control: 'boolean',\n defaultValue: false,\n },\n badgeColor: {\n name: 'badge-color',\n description: 'Colore del badge',\n control: 'select',\n options: [\n 'primary',\n 'secondary',\n 'neutral',\n 'warning',\n 'success',\n 'danger',\n ],\n },\n outOfStock: {\n name: 'out-of-stock',\n description: 'Indica se il prodotto è esaurito',\n control: 'boolean',\n defaultValue: false\n },\n outOfStockText: {\n name: 'out-of-stock-text',\n description: 'Testo da visualizzare se il prodotto è esaurito',\n control: 'text',\n },\n waitingListButtonShow: {\n name: 'waiting-list-button-show',\n description: 'Indica se mostrare il bottone per la lista d\\'attesa',\n control: 'boolean',\n defaultValue: true\n },\n waitingListText: {\n name: 'waiting-list-text',\n description: 'cta per richiedere l\\'avviso se il prodotto torna disponibile',\n control: 'text',\n },\n isMini: {\n name: 'is-mini',\n description: 'Indica se la card è di dimensioni ridotte',\n control: 'boolean',\n defaultValue: false\n },\n enableZoom: {\n name: 'enable-zoom',\n description: 'Indica se è attivo lo zoom all\\'hover',\n control: 'boolean',\n defaultValue: false\n },\n imageObjectFit: {\n name: 'image-object-fit',\n description: 'Controlla il comportamento dell\\'object-fit delle immagini',\n control: 'select',\n options: ['cover', 'scale-down', 'contain', 'fill', 'none'],\n defaultValue: 'cover'\n },\n autoSelectFirstVariation: {\n name: 'auto-select-first-variation',\n description: 'Indica se selezionare automaticamente la prima variazione disponibile',\n control: 'boolean',\n defaultValue: true\n },\n }\n};\n\nconst Template = (args) => {\n const attributes = generateAttributesFromArgs(args);\n return formatHtml(`\n <jump-card-ecommerce ${attributes}>\n </jump-card-ecommerce>\n `);\n}\n\nexport const Card = Template.bind({});\nCard.args = {\n hasBackground: true,\n onlyIconButton: false,\n badge: 'In offerta',\n favorite: false,\n hasFavorite: true,\n hasSlotForFavorite: false,\n link: '/prodotto',\n img: 'https://images.pexels.com/photos/4066293/pexels-photo-4066293.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1',\n imgAlt: 'Immagine',\n hoverImg: 'https://images.pexels.com/photos/9558695/pexels-photo-9558695.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1',\n hoverImgAlt: 'immagine in hover',\n notificationUrl: '/cart',\n notificationText: 'Aggiunto al carrello',\n productName: 'T-shirt',\n subtitle: 'T-shirt da uomo',\n productId: '1',\n price: 15,\n salePrice: 10,\n addToCartText: 'Aggiungi al carrello',\n addToCartColor: 'secondary',\n hasSlotAddToCart: false,\n badgeColor: 'secondary',\n currency: '€',\n outOfStock: false,\n outOfStockText: 'Esaurito',\n waitingListText: 'Notifica disponibilità',\n isMini: false,\n enableZoom: false,\n imageObjectFit: 'cover',\n autoSelectFirstVariation: true,\n};\n\nconst TemplateWithEvent = (args, data) => {\n let id = data.id;\n const attributes = generateAttributesFromArgs(args);\n return formatHtml(`\n <jump-card-ecommerce ${attributes}>\n\n <jump-card-ecommerce-option code=\"size1\" label=\"sono una select un pò lunga\" order=\"1\"></jump-card-ecommerce-option>\n <jump-card-ecommerce-option code=\"size2\" label=\"L\" sku=\"cod123\" order=\"2\"></jump-card-ecommerce-option>\n <jump-card-ecommerce-option code=\"size3\" label=\"XL\" sku=\"cod124\" order=\"3\"></jump-card-ecommerce-option>\n\n <div slot=\"addtocart\"><a href=\"\">Sono un bottone dentro lo slot addotocart</a></div>\n </jump-card-ecommerce>\n <script>\n\n (function() {\n let container;\n container = document.querySelector('#story--${id}');\n\n container.querySelector('jump-card-ecommerce').addEventListener( 'jump-toggle-favorite', ev => {\n let productId = ev.detail.productId;\n let favorite = ev.detail.favorite;\n if(favorite){\n console.log( 'Prodotto ' + productId + ' aggiunto ai preferiti');\n } else {\n console.log( 'Prodotto ' + productId + ' rimosso dai preferiti');\n }\n })\n\n container.querySelector('jump-card-ecommerce').addEventListener( 'jump-add-to-cart', ev => {\n let productId = ev.detail.productId;\n let addedToCart = ev.detail.addedToCart;\n let variation = ev.detail.variation;\n if(addedToCart){\n console.log( 'Prodotto ' + productId + ' aggiunto al carrello');\n console.log( 'Variazione selezionata:', variation);\n }\n })\n\n container.querySelector('jump-card-ecommerce').addEventListener('jump-variation-selected', ev => {\n let variation = ev.detail;\n console.log('Variation selected automatically:', variation);\n });\n\n })();\n\n </script>\n ` );\n}\n\nexport const CardEvent = TemplateWithEvent.bind({});\nCardEvent.args = {\n hasBackground: true,\n onlyIconButton: false,\n badge: 'In offerta',\n hasFavorite: false,\n hasSlotForFavorite: false,\n link: '/prodotto',\n img: 'https://images.pexels.com/photos/4066293/pexels-photo-4066293.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1',\n imgAlt: 'Immagine',\n hoverImg: 'https://images.pexels.com/photos/9558695/pexels-photo-9558695.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1',\n hoverImgAlt: 'immagine in hover',\n notificationUrl: '/cart',\n notificationText: 'Aggiunto al carrello',\n productName: 'T-shirt',\n subtitle: 'T-shirt da uomo',\n productId: '1',\n price: 15,\n salePrice: 10,\n currency: '€',\n addToCartText: 'Aggiungi al carrello',\n addToCartColor: 'primary',\n hasSlotAddToCart: false,\n badgeColor: 'primary',\n outOfStock: false,\n outOfStockText: 'Esaurito',\n waitingListText: 'Notifica disponibilità',\n isMini: true,\n autoSelectFirstVariation: true,\n};\n\nconst TemplateDisallowAllowCart = (args) => {\n const attributes = generateAttributesFromArgs(args);\n return formatHtml(`\n <jump-card-ecommerce ${attributes}>\n </jump-card-ecommerce>\n `);\n}\n\nexport const CardWithZoom = Template.bind({});\nCardWithZoom.args = {\n ...Card.args,\n enableZoom: true,\n hoverImg: '',\n hoverImgAlt: '',\n};\n\nexport const CardDisallow = TemplateDisallowAllowCart.bind({});\nCardDisallow.args = {\n hasBackground: true,\n onlyIconButton: false,\n badge: 'In offerta',\n favorite: false,\n hasFavorite: true,\n hasSlotForFavorite: false,\n link: '/prodotto',\n img: 'https://images.pexels.com/photos/4066293/pexels-photo-4066293.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1',\n imgAlt: 'Immagine',\n hoverImg: 'https://images.pexels.com/photos/9558695/pexels-photo-9558695.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1',\n hoverImgAlt: 'immagine in hover',\n notificationUrl: '/cart',\n notificationText: 'Aggiunto al carrello',\n productName: 'T-shirt',\n subtitle: 'T-shirt da uomo',\n productId: '1',\n price: 15,\n salePrice: 10,\n addToCartText: 'Aggiungi al carrello',\n addToCartColor: 'secondary',\n hasSlotAddToCart: false,\n badgeColor: 'secondary',\n currency: '€',\n outOfStock: false,\n outOfStockText: 'Esaurito',\n waitingListText: 'Notifica disponibilità',\n isMini: false,\n disallowAddToCart: true,\n};\n\n// Storia per mostrare l'utilizzo della proprietà imageObjectFit\nexport const CardWithScaleDown = Template.bind({});\nCardWithScaleDown.args = {\n ...Card.args,\n imageObjectFit: 'scale-down',\n img: 'https://images.pexels.com/photos/4066293/pexels-photo-4066293.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1',\n productName: 'Card con scale-down',\n subtitle: 'L\\'immagine usa object-fit: scale-down'\n};\n\n// Storia per mostrare la selezione automatica delle variazioni\nconst TemplateWithVariations = (args, data) => {\n let id = data.id;\n const attributes = generateAttributesFromArgs(args);\n return formatHtml(`\n <jump-card-ecommerce ${attributes}>\n <jump-card-ecommerce-option code=\"s\" label=\"Small (S)\" order=\"1\"></jump-card-ecommerce-option>\n <jump-card-ecommerce-option code=\"m\" label=\"Medium (M)\" order=\"2\"></jump-card-ecommerce-option>\n <jump-card-ecommerce-option code=\"l\" label=\"Large (L)\" order=\"3\"></jump-card-ecommerce-option>\n <jump-card-ecommerce-option code=\"xl\" label=\"Extra Large (XL)\" order=\"4\"></jump-card-ecommerce-option>\n \n <jump-quantity slot=\"quantity\" min=\"1\" max=\"10\" value=\"1\"></jump-quantity>\n </jump-card-ecommerce>\n <script>\n (function() {\n let container = document.querySelector('#story--${id}');\n container.querySelector('jump-card-ecommerce').addEventListener('jump-variation-selected', ev => {\n let variation = ev.detail;\n console.log('Variazione selezionata automaticamente:', variation);\n });\n })();\n </script>\n `);\n};\n\nexport const CardWithAutoSelection = TemplateWithVariations.bind({});\nCardWithAutoSelection.args = {\n ...Card.args,\n productName: 'T-shirt con selezione automatica',\n subtitle: 'La prima variazione viene selezionata automaticamente',\n autoSelectFirstVariation: true,\n};\n\nexport const CardWithoutAutoSelection = TemplateWithVariations.bind({});\nCardWithoutAutoSelection.args = {\n ...Card.args,\n productName: 'T-shirt senza selezione automatica',\n subtitle: 'L\\'utente deve selezionare manualmente la variazione',\n autoSelectFirstVariation: false,\n};\n\nexport const CardWithoutWaitingList = TemplateDisallowAllowCart.bind({});\nCardWithoutWaitingList.args = {\n ...Card.args, \n outOfStock: true,\n waitingListButtonShow: false\n};\n\nexport const CardArchiveGrid = () => formatHtml(`\n <div style=\"display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; max-width: 900px; margin: 0 auto;\">\n <jump-card-ecommerce\n product-name=\"T-shirt Uomo\"\n subtitle=\"Cotone 100%\"\n has-favorite=\"true\"\n img=\"https://images.pexels.com/photos/4066293/pexels-photo-4066293.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1\"\n img-alt=\"T-shirt Uomo\"\n price=\"15\"\n sale-price=\"10\"\n badge=\"In offerta\"\n badge-color=\"secondary\"\n disallow-add-to-cart=\"true\"\n add-to-cart-text=\"Aggiungi al carrello\"\n >\n \n <jump-card-ecommerce-option code=\"s\" label=\"Small (S)\" order=\"1\"></jump-card-ecommerce-option>\n <jump-card-ecommerce-option code=\"m\" label=\"Medium (M)\" order=\"2\"></jump-card-ecommerce-option>\n <jump-card-ecommerce-option code=\"l\" label=\"Large (L)\" order=\"3\"></jump-card-ecommerce-option>\n <jump-quantity label=\"quantityà\" slot=\"quantity\" min=\"1\" max=\"10\" value=\"1\"></jump-quantity>\n </jump-card-ecommerce>\n <jump-card-ecommerce\n product-name=\"Felpa Donna\"\n subtitle=\"Felpa con cappuccio\"\n img=\"https://images.pexels.com/photos/532220/pexels-photo-532220.jpeg?auto=compress&cs=tinysrgb&w=800\"\n img-alt=\"Felpa Donna\"\n price=\"29\"\n badge=\"Novità\"\n badge-color=\"primary\"\n add-to-cart-text=\"Aggiungi al carrello\"\n >\n <jump-card-ecommerce-option code=\"xs\" label=\"XS\" order=\"1\"></jump-card-ecommerce-option>\n <jump-card-ecommerce-option code=\"s\" label=\"S\" order=\"2\"></jump-card-ecommerce-option>\n <jump-card-ecommerce-option code=\"m\" label=\"M\" order=\"3\"></jump-card-ecommerce-option>\n <jump-card-ecommerce-option code=\"l\" label=\"L\" order=\"4\"></jump-card-ecommerce-option>\n <jump-quantity slot=\"quantity\" min=\"1\" max=\"10\" value=\"1\"></jump-quantity>\n </jump-card-ecommerce>\n <jump-card-ecommerce\n product-name=\"Jeans Slim\"\n subtitle=\"Denim elasticizzato\"\n img=\"https://images.pexels.com/photos/2983464/pexels-photo-2983464.jpeg?auto=compress&cs=tinysrgb&w=800\"\n img-alt=\"Jeans Slim\"\n price=\"49\"\n badge=\"Best Seller\"\n badge-color=\"success\"\n add-to-cart-text=\"Aggiungi al carrello\"\n >\n <jump-card-ecommerce-option code=\"30\" label=\"Taglia 30\" order=\"1\"></jump-card-ecommerce-option>\n <jump-card-ecommerce-option code=\"32\" label=\"Taglia 32\" order=\"2\"></jump-card-ecommerce-option>\n <jump-card-ecommerce-option code=\"34\" label=\"Taglia 34\" order=\"3\"></jump-card-ecommerce-option>\n <jump-quantity slot=\"quantity\" min=\"1\" max=\"10\" value=\"1\"></jump-quantity>\n </jump-card-ecommerce>\n <jump-card-ecommerce\n product-name=\"Giacca Leggera\"\n subtitle=\"Primavera/Estate\"\n img=\"https://images.pexels.com/photos/532221/pexels-photo-532221.jpeg?auto=compress&cs=tinysrgb&w=800\"\n img-alt=\"Giacca Leggera\"\n price=\"59\"\n out-of-stock=\"true\"\n sale-price=\"45\"\n badge=\"Promo\"\n badge-color=\"danger\"\n add-to-cart-text=\"Aggiungi al carrello\"\n >\n <jump-card-ecommerce-option code=\"m\" label=\"M\" order=\"1\"></jump-card-ecommerce-option>\n <jump-card-ecommerce-option code=\"l\" label=\"L\" order=\"2\"></jump-card-ecommerce-option>\n <jump-card-ecommerce-option code=\"xl\" label=\"XL\" order=\"3\"></jump-card-ecommerce-option>\n <jump-quantity slot=\"quantity\" min=\"1\" max=\"10\" value=\"1\"></jump-quantity>\n </jump-card-ecommerce>\n <jump-card-ecommerce\n has-background\n product-name=\"T-shirt Uomo\"\n subtitle=\"Cotone 100%\"\n img=\"https://images.pexels.com/photos/4066293/pexels-photo-4066293.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1\"\n img-alt=\"T-shirt Uomo\"\n price=\"15\"\n sale-price=\"10\"\n badge=\"In offerta\"\n badge-color=\"secondary\"\n add-to-cart-text=\"Aggiungi al carrello\"\n >\n <jump-card-ecommerce-option code=\"s\" label=\"Small (S)\" order=\"1\"></jump-card-ecommerce-option>\n <jump-card-ecommerce-option code=\"m\" label=\"Medium (M)\" order=\"2\"></jump-card-ecommerce-option>\n <jump-card-ecommerce-option code=\"l\" label=\"Large (L)\" order=\"3\"></jump-card-ecommerce-option>\n <jump-quantity slot=\"quantity\" min=\"1\" max=\"10\" value=\"1\"></jump-quantity>\n </jump-card-ecommerce>\n <jump-card-ecommerce\n has-background\n product-name=\"Felpa Donna\"\n subtitle=\"Felpa con cappuccio\"\n img=\"https://images.pexels.com/photos/532220/pexels-photo-532220.jpeg?auto=compress&cs=tinysrgb&w=800\"\n img-alt=\"Felpa Donna\"\n price=\"29\"\n sale-price=\"25\"\n badge=\"Novità\"\n badge-color=\"primary\"\n add-to-cart-text=\"Aggiungi al carrello\"\n >\n <jump-card-ecommerce-option code=\"xs\" label=\"XS\" order=\"1\"></jump-card-ecommerce-option>\n <jump-card-ecommerce-option code=\"s\" label=\"S\" order=\"2\"></jump-card-ecommerce-option>\n <jump-card-ecommerce-option code=\"m\" label=\"M\" order=\"3\"></jump-card-ecommerce-option>\n <jump-card-ecommerce-option code=\"l\" label=\"L\" order=\"4\"></jump-card-ecommerce-option>\n <jump-quantity slot=\"quantity\" min=\"1\" max=\"10\" value=\"1\"></jump-quantity>\n </jump-card-ecommerce>\n <jump-card-ecommerce\n has-background\n product-name=\"Jeans Slim\"\n subtitle=\"Denim elasticizzato\"\n img=\"https://images.pexels.com/photos/2983464/pexels-photo-2983464.jpeg?auto=compress&cs=tinysrgb&w=800\"\n img-alt=\"Jeans Slim\"\n price=\"49\"\n badge=\"Best Seller\"\n badge-color=\"success\"\n add-to-cart-text=\"Aggiungi al carrello\"\n enable-zoom\n >\n <jump-card-ecommerce-option code=\"30\" label=\"Taglia 30\" order=\"1\"></jump-card-ecommerce-option>\n <jump-card-ecommerce-option code=\"32\" label=\"Taglia 32\" order=\"2\"></jump-card-ecommerce-option>\n <jump-card-ecommerce-option code=\"34\" label=\"Taglia 34\" order=\"3\"></jump-card-ecommerce-option>\n <jump-quantity slot=\"quantity\" min=\"1\" max=\"10\" value=\"1\"></jump-quantity>\n </jump-card-ecommerce>\n <jump-card-ecommerce\n has-background\n product-name=\"Giacca Leggera\"\n subtitle=\"Primavera/Estate\"\n img=\"https://images.pexels.com/photos/532221/pexels-photo-532221.jpeg?auto=compress&cs=tinysrgb&w=800\"\n img-alt=\"Giacca Leggera\"\n price=\"59\"\n sale-price=\"45\"\n badge=\"Promo\"\n badge-color=\"danger\"\n add-to-cart-text=\"Aggiungi al carrello\"\n enable-zoom\n >\n <jump-card-ecommerce-option code=\"m\" label=\"M\" order=\"1\"></jump-card-ecommerce-option>\n <jump-card-ecommerce-option code=\"l\" label=\"L\" order=\"2\"></jump-card-ecommerce-option>\n <jump-card-ecommerce-option code=\"xl\" label=\"XL\" order=\"3\"></jump-card-ecommerce-option>\n <jump-quantity slot=\"quantity\" min=\"1\" max=\"10\" value=\"1\"></jump-quantity>\n </jump-card-ecommerce>\n <jump-card-ecommerce\n has-background\n product-name=\"T-shirt Uomo\"\n subtitle=\"Cotone 100%\"\n img=\"https://images.pexels.com/photos/4066293/pexels-photo-4066293.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1\"\n img-alt=\"T-shirt Uomo\"\n price=\"15\"\n sale-price=\"10\"\n badge=\"In offerta\"\n badge-color=\"secondary\"\n add-to-cart-text=\"Aggiungi al carrello\"\n enable-zoom\n >\n <jump-card-ecommerce-option code=\"s\" label=\"Small (S)\" order=\"1\"></jump-card-ecommerce-option>\n <jump-card-ecommerce-option code=\"m\" label=\"Medium (M)\" order=\"2\"></jump-card-ecommerce-option>\n <jump-card-ecommerce-option code=\"l\" label=\"Large (L)\" order=\"3\"></jump-card-ecommerce-option>\n <jump-quantity slot=\"quantity\" min=\"1\" max=\"10\" value=\"1\"></jump-quantity>\n </jump-card-ecommerce>\n <jump-card-ecommerce\n has-background\n product-name=\"Felpa Donna\"\n subtitle=\"Felpa con cappuccio\"\n img=\"https://images.pexels.com/photos/532220/pexels-photo-532220.jpeg?auto=compress&cs=tinysrgb&w=800\"\n img-alt=\"Felpa Donna\"\n price=\"29\"\n sale-price=\"25\"\n badge=\"Novità\"\n badge-color=\"primary\"\n add-to-cart-text=\"Aggiungi al carrello\"\n enable-zoom\n >\n <jump-card-ecommerce-option code=\"xs\" label=\"XS\" order=\"1\"></jump-card-ecommerce-option>\n <jump-card-ecommerce-option code=\"s\" label=\"S\" order=\"2\"></jump-card-ecommerce-option>\n <jump-card-ecommerce-option code=\"m\" label=\"M\" order=\"3\"></jump-card-ecommerce-option>\n <jump-card-ecommerce-option code=\"l\" label=\"L\" order=\"4\"></jump-card-ecommerce-option>\n <jump-quantity slot=\"quantity\" min=\"1\" max=\"10\" value=\"1\"></jump-quantity>\n </jump-card-ecommerce>\n <jump-card-ecommerce\n has-background\n product-name=\"Jeans Slim\"\n subtitle=\"Denim elasticizzato\"\n img=\"https://images.pexels.com/photos/2983464/pexels-photo-2983464.jpeg?auto=compress&cs=tinysrgb&w=800\"\n img-alt=\"Jeans Slim\"\n price=\"49\"\n badge=\"Best Seller\"\n badge-color=\"success\"\n add-to-cart-text=\"Aggiungi al carrello\"\n enable-zoom\n >\n <jump-card-ecommerce-option code=\"30\" label=\"Taglia 30\" order=\"1\"></jump-card-ecommerce-option>\n <jump-card-ecommerce-option code=\"32\" label=\"Taglia 32\" order=\"2\"></jump-card-ecommerce-option>\n <jump-card-ecommerce-option code=\"34\" label=\"Taglia 34\" order=\"3\"></jump-card-ecommerce-option>\n <jump-quantity slot=\"quantity\" min=\"1\" max=\"10\" value=\"1\"></jump-quantity>\n </jump-card-ecommerce>\n <jump-card-ecommerce\n has-background\n product-name=\"Giacca Leggera\"\n subtitle=\"Primavera/Estate\"\n img=\"https://images.pexels.com/photos/532221/pexels-photo-532221.jpeg?auto=compress&cs=tinysrgb&w=800\"\n img-alt=\"Giacca Leggera\"\n price=\"59\"\n sale-price=\"45\"\n badge=\"Promo\"\n badge-color=\"danger\"\n add-to-cart-text=\"Aggiungi al carrello\"\n enable-zoom\n >\n <jump-card-ecommerce-option code=\"m\" label=\"M\" order=\"1\"></jump-card-ecommerce-option>\n <jump-card-ecommerce-option code=\"l\" label=\"L\" order=\"2\"></jump-card-ecommerce-option>\n <jump-card-ecommerce-option code=\"xl\" label=\"XL\" order=\"3\"></jump-card-ecommerce-option>\n <jump-quantity slot=\"quantity\" min=\"1\" max=\"10\" value=\"1\"></jump-quantity>\n </jump-card-ecommerce>\n </div>\n`);\nCardArchiveGrid.storyName = 'Archivio (Grid X colonne con variazioni e quantità)';"]}
|
|
1
|
+
{"version":3,"file":"jump-card-ecommerce.stories.js","sourceRoot":"","sources":["../../../src/components/jump-card-ecommerce/jump-card-ecommerce.stories.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,UAAU,EAAC,MA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C;AACzE,sBAAsB,CAAC,IAAI,mCACtB,IAAI,CAAC,IAAI,KACZ,UAAU,EAAE,IAAI,EAChB,qBAAqB,EAAE,KAAK,GAC7B,CAAC;AAEF,4BAA4B;AAC5B,MAAM,YAAY,GAAG,CAAC,IAAI,EAAE,EAAE;IAC5B,MAAM,eAAe,GAAG,0BAA0B,CAAC,IAAI,CAAC,CAAC;IACzD,OAAO,UAAU,CAAC;;;;;;;;;;;;;;QAcZ,eAAe;;;;;;;;;;;;;;;;;;QAkBf,eAAe;;;;;;;;;;;;;;;;;QAiBf,eAAe;;;;;;;;;;;;;;;;;;QAkBf,eAAe;;;;;;;;;;;;;;;;;;QAkBf,eAAe;;;;;;;;;;;;;;;;;;QAkBf,eAAe;;;;;;;;;;;;;;;;;;;QAmBf,eAAe;;;;;;;;;;;;;;;;;;;QAmBf,eAAe;;;;;;;;;;;;;;;;;;;QAmBf,eAAe;;;;;;;;;;;;;;;;;;;QAmBf,eAAe;;;;;;;;;;;;;;;;;;;QAmBf,eAAe;;;;;;;;;;;;;;;;;;;QAmBf,eAAe;;;;;;;;CAQtB,CAAC,CAAC;AACH,CAAC,CAAA;AAGD,MAAM,CAAC,MAAM,eAAe,GAAG,YAAY,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACrD,eAAe,CAAC,SAAS,GAAG,iBAAiB,CAAC;AAC9C,eAAe,CAAC,IAAI,GAAG,EAAE,CAAC;AAG1B,MAAM,CAAC,MAAM,YAAY,GAAG,YAAY,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAClD,YAAY,CAAC,SAAS,GAAG,kCAAkC,CAAC;AAC5D,YAAY,CAAC,IAAI,GAAG;IAClB,2BAA2B,EAAE,EAAE;CAChC,CAAC","sourcesContent":["import { generateAttributesFromArgs, formatHtml} from '../../utils/utils';\n\nexport default {\n title: 'Components/CardEcommerce/Card',\n tags: ['autodocs'],\n argTypes: {\n hasBackground: {\n name: 'has-background',\n description: 'Aggiungi o meno il background alla card',\n control: 'boolean',\n },\n onlyIconButton: {\n name: 'only-icon-button',\n description: 'Cambia lo stile della card mostrando solo il bottone icona',\n control: 'boolean',\n },\n badge: {\n name: 'badge',\n description: 'Badge della card',\n control: 'text',\n },\n favorite: {\n name: 'favorite',\n description: 'Aggiunge il prodotto ai preferiti',\n control: 'boolean',\n },\n hasFavorite: {\n name: 'has-favorite',\n description: 'Aggiunge il prodotto ai preferiti',\n control: 'boolean',\n },\n hasSlotForFavorite: {\n name: 'has-slot-for-favorite',\n description: 'Di default la card ecommerce ha un bottone icona per il favorite che emette un evento; Se hasSlotForFavorite è true il bottone viene sostituito da uno slot',\n control: 'boolean',\n defaultValue: true,\n },\n link: {\n name: 'link',\n description: 'Link della card',\n control: 'text',\n },\n img: {\n name: 'img',\n description: 'Url dell\\'immagine da visualizzare, si attiva solo se non è presente video-src',\n control: 'text',\n defaultValue: 'https://content-management-files.canva.com/cdn-cgi/image/f=auto,q=70/2fdbd7ab-f378-4c63-8b21-c944ad2633fd/header_t-shirts2.jpg',\n if:{\n arg: 'videoSrc',\n exists: false\n }\n },\n imgAlt: {\n name: 'img-alt',\n description: 'Alt dell\\'immagine da visualizzare, si attiva solo se è presente img',\n control: 'text',\n if:{\n arg: 'img',\n exists: true\n }\n },\n hoverImg: {\n name: 'hover-img',\n description: 'Url dell\\'immagine in hover da visualizzare, si attiva solo se non è presente videoSrc',\n control: 'text',\n defaultValue: 'https://ch.benetton.com/dw/image/v2/BBSF_PRD/on/demandware.static/-/Sites-ucb-master/default/dwf2799586/images/Full_Card_v/UCB-Bambino_24P_3096C10JA_0Z3_FS_Full_Card_v.jpg?sw=600&sh=800',\n if:{\n arg: 'videoSrc',\n exists: false\n }\n },\n hoverImgAlt: {\n name: 'hover-img-alt',\n description: 'Alt dell\\'immagine in hover da visualizzare, si attiva solo se è presente img',\n control: 'text',\n if:{\n arg: 'img',\n exists: true\n }\n },\n videoSrc: {\n name: 'video-src',\n description: 'Url del video da visualizzare, si attiva solo se non è presente img',\n control: 'text',\n if:{\n arg: 'img',\n exists: false\n }\n },\n notificationUrl: {\n name: 'notification-url',\n description: 'Url della notifica da visualizzare',\n control: 'text',\n },\n notificationText: {\n name: 'notification-text',\n description: 'Testo della notifica da visualizzare',\n control: 'text',\n },\n productName: {\n name: 'product-name',\n description: 'Nome del prodotto',\n control: 'text',\n },\n subtitle: {\n name: 'subtitle',\n description: 'Sottotitolo della card',\n control: 'text',\n },\n productId: {\n name: 'product-id',\n description: 'ID del prodotto',\n control: 'text',\n },\n price: {\n name: 'price',\n description: 'Prezzo del prodotto; Se la card è in versione Mini gli va passato il prezzo scontato',\n control: 'number',\n },\n salePrice: {\n name: 'sale-price',\n description: 'Prezzo scontato del prodotto',\n control: 'number',\n },\n hideDiscountIfLessThreshold: {\n name: 'hide-discount-if-less-threshold',\n description: 'Indicates the threshold below which the discount will be hidden',\n control: 'number'\n },\n addToCartText: {\n name: 'add-to-cart-text',\n description: 'Testo bottone aggiungi al carrello',\n control: 'text',\n },\n addToCartColor: {\n name: 'add-to-cart-color',\n description: 'Colore del bottone aggiungi al carrello',\n control: 'select',\n options: [\n 'primary',\n 'secondary',\n 'neutral',\n 'white'\n ],\n },\n hasSlotAddToCart: {\n name: 'has-slot-add-to-cart',\n description: 'Di default la card ecommerce ha un bottone per l\\'aggiunta al carrello; Se has-slot-add-to-cart è true il bottone viene sostituito da uno slot',\n control: 'boolean',\n defaultValue: false,\n },\n badgeColor: {\n name: 'badge-color',\n description: 'Colore del badge',\n control: 'select',\n options: [\n 'primary',\n 'secondary',\n 'neutral',\n 'warning',\n 'success',\n 'danger',\n ],\n },\n outOfStock: {\n name: 'out-of-stock',\n description: 'Indica se il prodotto è esaurito',\n control: 'boolean',\n defaultValue: false\n },\n outOfStockText: {\n name: 'out-of-stock-text',\n description: 'Testo da visualizzare se il prodotto è esaurito',\n control: 'text',\n },\n waitingListButtonShow: {\n name: 'waiting-list-button-show',\n description: 'Indica se mostrare il bottone per la lista d\\'attesa',\n control: 'boolean',\n defaultValue: true\n },\n waitingListText: {\n name: 'waiting-list-text',\n description: 'cta per richiedere l\\'avviso se il prodotto torna disponibile',\n control: 'text',\n },\n isMini: {\n name: 'is-mini',\n description: 'Indica se la card è di dimensioni ridotte',\n control: 'boolean',\n defaultValue: false\n },\n enableZoom: {\n name: 'enable-zoom',\n description: 'Indica se è attivo lo zoom all\\'hover',\n control: 'boolean',\n defaultValue: false\n },\n imageObjectFit: {\n name: 'image-object-fit',\n description: 'Controlla il comportamento dell\\'object-fit delle immagini',\n control: 'select',\n options: ['cover', 'scale-down', 'contain', 'fill', 'none'],\n defaultValue: 'cover'\n },\n autoSelectFirstVariation: {\n name: 'auto-select-first-variation',\n description: 'Indica se selezionare automaticamente la prima variazione disponibile',\n control: 'boolean',\n defaultValue: true\n },\n }\n};\n\nconst Template = (args) => {\n const attributes = generateAttributesFromArgs(args);\n return formatHtml(`\n <jump-card-ecommerce ${attributes}>\n </jump-card-ecommerce>\n `);\n}\n\nexport const Card = Template.bind({});\nCard.args = {\n hasBackground: true,\n onlyIconButton: false,\n badge: 'In offerta',\n favorite: false,\n hasFavorite: true,\n hasSlotForFavorite: false,\n link: '/prodotto',\n img: 'https://images.pexels.com/photos/4066293/pexels-photo-4066293.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1',\n imgAlt: 'Immagine',\n hoverImg: 'https://images.pexels.com/photos/9558695/pexels-photo-9558695.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1',\n hoverImgAlt: 'immagine in hover',\n notificationUrl: '/cart',\n notificationText: 'Aggiunto al carrello',\n productName: 'T-shirt',\n subtitle: 'T-shirt da uomo',\n productId: '1',\n price: 15,\n salePrice: 10,\n hideDiscountIfLessThreshold: 10,\n addToCartText: 'Aggiungi al carrello',\n addToCartColor: 'secondary',\n hasSlotAddToCart: false,\n badgeColor: 'secondary',\n currency: '€',\n outOfStock: false,\n outOfStockText: 'Esaurito',\n waitingListText: 'Notifica disponibilità',\n isMini: false,\n enableZoom: false,\n imageObjectFit: 'cover',\n autoSelectFirstVariation: true,\n};\n\nconst TemplateWithEvent = (args, data) => {\n let id = data.id;\n const attributes = generateAttributesFromArgs(args);\n return formatHtml(`\n <jump-card-ecommerce ${attributes}>\n\n <jump-card-ecommerce-option code=\"size1\" label=\"sono una select un pò lunga\" order=\"1\"></jump-card-ecommerce-option>\n <jump-card-ecommerce-option code=\"size2\" label=\"L\" sku=\"cod123\" order=\"2\"></jump-card-ecommerce-option>\n <jump-card-ecommerce-option code=\"size3\" label=\"XL\" sku=\"cod124\" order=\"3\"></jump-card-ecommerce-option>\n\n <div slot=\"addtocart\"><a href=\"\">Sono un bottone dentro lo slot addotocart</a></div>\n </jump-card-ecommerce>\n <script>\n\n (function() {\n let container;\n container = document.querySelector('#story--${id}');\n\n container.querySelector('jump-card-ecommerce').addEventListener( 'jump-toggle-favorite', ev => {\n let productId = ev.detail.productId;\n let favorite = ev.detail.favorite;\n if(favorite){\n console.log( 'Prodotto ' + productId + ' aggiunto ai preferiti');\n } else {\n console.log( 'Prodotto ' + productId + ' rimosso dai preferiti');\n }\n })\n\n container.querySelector('jump-card-ecommerce').addEventListener( 'jump-add-to-cart', ev => {\n let productId = ev.detail.productId;\n let addedToCart = ev.detail.addedToCart;\n let variation = ev.detail.variation;\n if(addedToCart){\n console.log( 'Prodotto ' + productId + ' aggiunto al carrello');\n console.log( 'Variazione selezionata:', variation);\n }\n })\n\n container.querySelector('jump-card-ecommerce').addEventListener('jump-variation-selected', ev => {\n let variation = ev.detail;\n console.log('Variation selected automatically:', variation);\n });\n\n })();\n\n </script>\n ` );\n}\n\nexport const CardEvent = TemplateWithEvent.bind({});\nCardEvent.args = {\n hasBackground: true,\n onlyIconButton: false,\n badge: 'In offerta',\n hasFavorite: false,\n hasSlotForFavorite: false,\n link: '/prodotto',\n img: 'https://images.pexels.com/photos/4066293/pexels-photo-4066293.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1',\n imgAlt: 'Immagine',\n hoverImg: 'https://images.pexels.com/photos/9558695/pexels-photo-9558695.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1',\n hoverImgAlt: 'immagine in hover',\n notificationUrl: '/cart',\n notificationText: 'Aggiunto al carrello',\n productName: 'T-shirt',\n subtitle: 'T-shirt da uomo',\n productId: '1',\n price: 15,\n salePrice: 10,\n currency: '€',\n addToCartText: 'Aggiungi al carrello',\n addToCartColor: 'primary',\n hasSlotAddToCart: false,\n badgeColor: 'primary',\n outOfStock: false,\n outOfStockText: 'Esaurito',\n waitingListText: 'Notifica disponibilità',\n isMini: true,\n autoSelectFirstVariation: true,\n};\n\nconst TemplateDisallowAllowCart = (args) => {\n const attributes = generateAttributesFromArgs(args);\n return formatHtml(`\n <jump-card-ecommerce ${attributes}>\n </jump-card-ecommerce>\n `);\n}\n\nexport const CardWithZoom = Template.bind({});\nCardWithZoom.args = {\n ...Card.args,\n enableZoom: true,\n hoverImg: '',\n hoverImgAlt: '',\n};\n\nexport const CardDisallow = TemplateDisallowAllowCart.bind({});\nCardDisallow.args = {\n hasBackground: true,\n onlyIconButton: false,\n badge: 'In offerta',\n favorite: false,\n hasFavorite: true,\n hasSlotForFavorite: false,\n link: '/prodotto',\n img: 'https://images.pexels.com/photos/4066293/pexels-photo-4066293.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1',\n imgAlt: 'Immagine',\n hoverImg: 'https://images.pexels.com/photos/9558695/pexels-photo-9558695.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1',\n hoverImgAlt: 'immagine in hover',\n notificationUrl: '/cart',\n notificationText: 'Aggiunto al carrello',\n productName: 'T-shirt',\n subtitle: 'T-shirt da uomo',\n productId: '1',\n price: 15,\n salePrice: 10,\n addToCartText: 'Aggiungi al carrello',\n addToCartColor: 'secondary',\n hasSlotAddToCart: false,\n badgeColor: 'secondary',\n currency: '€',\n outOfStock: false,\n outOfStockText: 'Esaurito',\n waitingListText: 'Notifica disponibilità',\n isMini: false,\n disallowAddToCart: true,\n};\n\n// Storia per mostrare l'utilizzo della proprietà imageObjectFit\nexport const CardWithScaleDown = Template.bind({});\nCardWithScaleDown.args = {\n ...Card.args,\n imageObjectFit: 'scale-down',\n img: 'https://images.pexels.com/photos/4066293/pexels-photo-4066293.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1',\n productName: 'Card con scale-down',\n subtitle: 'L\\'immagine usa object-fit: scale-down'\n};\n\n// Storia per mostrare la selezione automatica delle variazioni\nconst TemplateWithVariations = (args, data) => {\n let id = data.id;\n const attributes = generateAttributesFromArgs(args);\n return formatHtml(`\n <jump-card-ecommerce ${attributes}>\n <jump-card-ecommerce-option code=\"s\" label=\"Small (S)\" order=\"1\"></jump-card-ecommerce-option>\n <jump-card-ecommerce-option code=\"m\" label=\"Medium (M)\" order=\"2\"></jump-card-ecommerce-option>\n <jump-card-ecommerce-option code=\"l\" label=\"Large (L)\" order=\"3\"></jump-card-ecommerce-option>\n <jump-card-ecommerce-option code=\"xl\" label=\"Extra Large (XL)\" order=\"4\"></jump-card-ecommerce-option>\n \n <jump-quantity slot=\"quantity\" min=\"1\" max=\"10\" value=\"1\"></jump-quantity>\n </jump-card-ecommerce>\n <script>\n (function() {\n let container = document.querySelector('#story--${id}');\n container.querySelector('jump-card-ecommerce').addEventListener('jump-variation-selected', ev => {\n let variation = ev.detail;\n console.log('Variazione selezionata automaticamente:', variation);\n });\n })();\n </script>\n `);\n};\n\nexport const CardWithAutoSelection = TemplateWithVariations.bind({});\nCardWithAutoSelection.args = {\n ...Card.args,\n productName: 'T-shirt con selezione automatica',\n subtitle: 'La prima variazione viene selezionata automaticamente',\n autoSelectFirstVariation: true,\n};\n\nexport const CardWithoutAutoSelection = TemplateWithVariations.bind({});\nCardWithoutAutoSelection.args = {\n ...Card.args,\n productName: 'T-shirt senza selezione automatica',\n subtitle: 'L\\'utente deve selezionare manualmente la variazione',\n autoSelectFirstVariation: false,\n};\n\nexport const CardWithoutWaitingList = TemplateDisallowAllowCart.bind({});\nCardWithoutWaitingList.args = {\n ...Card.args, \n outOfStock: true,\n waitingListButtonShow: false\n};\n\n// Template for grid stories\nconst TemplateGrid = (args) => {\n const extraAttributes = generateAttributesFromArgs(args);\n return formatHtml(`\n <div style=\"display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; max-width: 900px; margin: 0 auto;\">\n <jump-card-ecommerce\n product-name=\"T-shirt Uomo\"\n subtitle=\"Cotone 100%\"\n has-favorite=\"true\"\n img=\"https://images.pexels.com/photos/4066293/pexels-photo-4066293.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1\"\n img-alt=\"T-shirt Uomo\"\n price=\"15\"\n sale-price=\"10\"\n badge=\"In offerta\"\n badge-color=\"secondary\"\n disallow-add-to-cart=\"true\"\n add-to-cart-text=\"Aggiungi al carrello\"\n ${extraAttributes}\n >\n \n <jump-card-ecommerce-option code=\"s\" label=\"Small (S)\" order=\"1\"></jump-card-ecommerce-option>\n <jump-card-ecommerce-option code=\"m\" label=\"Medium (M)\" order=\"2\"></jump-card-ecommerce-option>\n <jump-card-ecommerce-option code=\"l\" label=\"Large (L)\" order=\"3\"></jump-card-ecommerce-option>\n <jump-quantity label=\"quantityà\" slot=\"quantity\" min=\"1\" max=\"10\" value=\"1\"></jump-quantity>\n </jump-card-ecommerce>\n <jump-card-ecommerce\n product-name=\"Felpa Donna\"\n subtitle=\"Felpa con cappuccio\"\n img=\"https://images.pexels.com/photos/532220/pexels-photo-532220.jpeg?auto=compress&cs=tinysrgb&w=800\"\n img-alt=\"Felpa Donna\"\n price=\"29\"\n sale-price=\"25\"\n badge=\"Novità\"\n badge-color=\"primary\"\n add-to-cart-text=\"Aggiungi al carrello\"\n ${extraAttributes}\n >\n <jump-card-ecommerce-option code=\"xs\" label=\"XS\" order=\"1\"></jump-card-ecommerce-option>\n <jump-card-ecommerce-option code=\"s\" label=\"S\" order=\"2\"></jump-card-ecommerce-option>\n <jump-card-ecommerce-option code=\"m\" label=\"M\" order=\"3\"></jump-card-ecommerce-option>\n <jump-card-ecommerce-option code=\"l\" label=\"L\" order=\"4\"></jump-card-ecommerce-option>\n <jump-quantity slot=\"quantity\" min=\"1\" max=\"10\" value=\"1\"></jump-quantity>\n </jump-card-ecommerce>\n <jump-card-ecommerce\n product-name=\"Jeans Slim\"\n subtitle=\"Denim elasticizzato\"\n img=\"https://images.pexels.com/photos/2983464/pexels-photo-2983464.jpeg?auto=compress&cs=tinysrgb&w=800\"\n img-alt=\"Jeans Slim\"\n price=\"49\"\n badge=\"Best Seller\"\n badge-color=\"success\"\n add-to-cart-text=\"Aggiungi al carrello\"\n ${extraAttributes}\n >\n <jump-card-ecommerce-option code=\"30\" label=\"Taglia 30\" order=\"1\"></jump-card-ecommerce-option>\n <jump-card-ecommerce-option code=\"32\" label=\"Taglia 32\" order=\"2\"></jump-card-ecommerce-option>\n <jump-card-ecommerce-option code=\"34\" label=\"Taglia 34\" order=\"3\"></jump-card-ecommerce-option>\n <jump-quantity slot=\"quantity\" min=\"1\" max=\"10\" value=\"1\"></jump-quantity>\n </jump-card-ecommerce>\n <jump-card-ecommerce\n product-name=\"Giacca Leggera\"\n subtitle=\"Primavera/Estate\"\n img=\"https://images.pexels.com/photos/532221/pexels-photo-532221.jpeg?auto=compress&cs=tinysrgb&w=800\"\n img-alt=\"Giacca Leggera\"\n price=\"59\"\n out-of-stock=\"true\"\n sale-price=\"45\"\n badge=\"Promo\"\n badge-color=\"danger\"\n add-to-cart-text=\"Aggiungi al carrello\"\n ${extraAttributes}\n >\n <jump-card-ecommerce-option code=\"m\" label=\"M\" order=\"1\"></jump-card-ecommerce-option>\n <jump-card-ecommerce-option code=\"l\" label=\"L\" order=\"2\"></jump-card-ecommerce-option>\n <jump-card-ecommerce-option code=\"xl\" label=\"XL\" order=\"3\"></jump-card-ecommerce-option>\n <jump-quantity slot=\"quantity\" min=\"1\" max=\"10\" value=\"1\"></jump-quantity>\n </jump-card-ecommerce>\n <jump-card-ecommerce\n has-background\n product-name=\"T-shirt Uomo\"\n subtitle=\"Cotone 100%\"\n img=\"https://images.pexels.com/photos/4066293/pexels-photo-4066293.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1\"\n img-alt=\"T-shirt Uomo\"\n price=\"15\"\n sale-price=\"10\"\n badge=\"In offerta\"\n badge-color=\"secondary\"\n add-to-cart-text=\"Aggiungi al carrello\"\n ${extraAttributes}\n >\n <jump-card-ecommerce-option code=\"s\" label=\"Small (S)\" order=\"1\"></jump-card-ecommerce-option>\n <jump-card-ecommerce-option code=\"m\" label=\"Medium (M)\" order=\"2\"></jump-card-ecommerce-option>\n <jump-card-ecommerce-option code=\"l\" label=\"Large (L)\" order=\"3\"></jump-card-ecommerce-option>\n <jump-quantity slot=\"quantity\" min=\"1\" max=\"10\" value=\"1\"></jump-quantity>\n </jump-card-ecommerce>\n <jump-card-ecommerce\n has-background\n product-name=\"Felpa Donna\"\n subtitle=\"Felpa con cappuccio\"\n img=\"https://images.pexels.com/photos/532220/pexels-photo-532220.jpeg?auto=compress&cs=tinysrgb&w=800\"\n img-alt=\"Felpa Donna\"\n price=\"29\"\n sale-price=\"25\"\n badge=\"Novità\"\n badge-color=\"primary\"\n add-to-cart-text=\"Aggiungi al carrello\"\n ${extraAttributes}\n >\n <jump-card-ecommerce-option code=\"xs\" label=\"XS\" order=\"1\"></jump-card-ecommerce-option>\n <jump-card-ecommerce-option code=\"s\" label=\"S\" order=\"2\"></jump-card-ecommerce-option>\n <jump-card-ecommerce-option code=\"m\" label=\"M\" order=\"3\"></jump-card-ecommerce-option>\n <jump-card-ecommerce-option code=\"l\" label=\"L\" order=\"4\"></jump-card-ecommerce-option>\n <jump-quantity slot=\"quantity\" min=\"1\" max=\"10\" value=\"1\"></jump-quantity>\n </jump-card-ecommerce>\n <jump-card-ecommerce\n has-background\n product-name=\"Jeans Slim\"\n subtitle=\"Denim elasticizzato\"\n img=\"https://images.pexels.com/photos/2983464/pexels-photo-2983464.jpeg?auto=compress&cs=tinysrgb&w=800\"\n img-alt=\"Jeans Slim\"\n price=\"49\"\n badge=\"Best Seller\"\n badge-color=\"success\"\n add-to-cart-text=\"Aggiungi al carrello\"\n enable-zoom\n ${extraAttributes}\n >\n <jump-card-ecommerce-option code=\"30\" label=\"Taglia 30\" order=\"1\"></jump-card-ecommerce-option>\n <jump-card-ecommerce-option code=\"32\" label=\"Taglia 32\" order=\"2\"></jump-card-ecommerce-option>\n <jump-card-ecommerce-option code=\"34\" label=\"Taglia 34\" order=\"3\"></jump-card-ecommerce-option>\n <jump-quantity slot=\"quantity\" min=\"1\" max=\"10\" value=\"1\"></jump-quantity>\n </jump-card-ecommerce>\n <jump-card-ecommerce\n has-background\n product-name=\"Giacca Leggera\"\n subtitle=\"Primavera/Estate\"\n img=\"https://images.pexels.com/photos/532221/pexels-photo-532221.jpeg?auto=compress&cs=tinysrgb&w=800\"\n img-alt=\"Giacca Leggera\"\n price=\"59\"\n sale-price=\"45\"\n badge=\"Promo\"\n badge-color=\"danger\"\n add-to-cart-text=\"Aggiungi al carrello\"\n enable-zoom\n ${extraAttributes}\n >\n <jump-card-ecommerce-option code=\"m\" label=\"M\" order=\"1\"></jump-card-ecommerce-option>\n <jump-card-ecommerce-option code=\"l\" label=\"L\" order=\"2\"></jump-card-ecommerce-option>\n <jump-card-ecommerce-option code=\"xl\" label=\"XL\" order=\"3\"></jump-card-ecommerce-option>\n <jump-quantity slot=\"quantity\" min=\"1\" max=\"10\" value=\"1\"></jump-quantity>\n </jump-card-ecommerce>\n <jump-card-ecommerce\n has-background\n product-name=\"T-shirt Uomo\"\n subtitle=\"Cotone 100%\"\n img=\"https://images.pexels.com/photos/4066293/pexels-photo-4066293.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1\"\n img-alt=\"T-shirt Uomo\"\n price=\"15\"\n sale-price=\"10\"\n badge=\"In offerta\"\n badge-color=\"secondary\"\n add-to-cart-text=\"Aggiungi al carrello\"\n enable-zoom\n ${extraAttributes}\n >\n <jump-card-ecommerce-option code=\"s\" label=\"Small (S)\" order=\"1\"></jump-card-ecommerce-option>\n <jump-card-ecommerce-option code=\"m\" label=\"Medium (M)\" order=\"2\"></jump-card-ecommerce-option>\n <jump-card-ecommerce-option code=\"l\" label=\"Large (L)\" order=\"3\"></jump-card-ecommerce-option>\n <jump-quantity slot=\"quantity\" min=\"1\" max=\"10\" value=\"1\"></jump-quantity>\n </jump-card-ecommerce>\n <jump-card-ecommerce\n has-background\n product-name=\"Felpa Donna\"\n subtitle=\"Felpa con cappuccio\"\n img=\"https://images.pexels.com/photos/532220/pexels-photo-532220.jpeg?auto=compress&cs=tinysrgb&w=800\"\n img-alt=\"Felpa Donna\"\n price=\"29\"\n sale-price=\"25\"\n badge=\"Novità\"\n badge-color=\"primary\"\n add-to-cart-text=\"Aggiungi al carrello\"\n enable-zoom\n ${extraAttributes}\n >\n <jump-card-ecommerce-option code=\"xs\" label=\"XS\" order=\"1\"></jump-card-ecommerce-option>\n <jump-card-ecommerce-option code=\"s\" label=\"S\" order=\"2\"></jump-card-ecommerce-option>\n <jump-card-ecommerce-option code=\"m\" label=\"M\" order=\"3\"></jump-card-ecommerce-option>\n <jump-card-ecommerce-option code=\"l\" label=\"L\" order=\"4\"></jump-card-ecommerce-option>\n <jump-quantity slot=\"quantity\" min=\"1\" max=\"10\" value=\"1\"></jump-quantity>\n </jump-card-ecommerce>\n <jump-card-ecommerce\n has-background\n product-name=\"Jeans Slim\"\n subtitle=\"Denim elasticizzato\"\n img=\"https://images.pexels.com/photos/2983464/pexels-photo-2983464.jpeg?auto=compress&cs=tinysrgb&w=800\"\n img-alt=\"Jeans Slim\"\n price=\"49\"\n badge=\"Best Seller\"\n badge-color=\"success\"\n add-to-cart-text=\"Aggiungi al carrello\"\n enable-zoom\n ${extraAttributes}\n >\n <jump-card-ecommerce-option code=\"30\" label=\"Taglia 30\" order=\"1\"></jump-card-ecommerce-option>\n <jump-card-ecommerce-option code=\"32\" label=\"Taglia 32\" order=\"2\"></jump-card-ecommerce-option>\n <jump-card-ecommerce-option code=\"34\" label=\"Taglia 34\" order=\"3\"></jump-card-ecommerce-option>\n <jump-quantity slot=\"quantity\" min=\"1\" max=\"10\" value=\"1\"></jump-quantity>\n </jump-card-ecommerce>\n <jump-card-ecommerce\n has-background\n product-name=\"Giacca Leggera\"\n subtitle=\"Primavera/Estate\"\n img=\"https://images.pexels.com/photos/532221/pexels-photo-532221.jpeg?auto=compress&cs=tinysrgb&w=800\"\n img-alt=\"Giacca Leggera\"\n price=\"59\"\n sale-price=\"45\"\n badge=\"Promo\"\n badge-color=\"danger\"\n add-to-cart-text=\"Aggiungi al carrello\"\n enable-zoom\n ${extraAttributes}\n >\n <jump-card-ecommerce-option code=\"m\" label=\"M\" order=\"1\"></jump-card-ecommerce-option>\n <jump-card-ecommerce-option code=\"l\" label=\"L\" order=\"2\"></jump-card-ecommerce-option>\n <jump-card-ecommerce-option code=\"xl\" label=\"XL\" order=\"3\"></jump-card-ecommerce-option>\n <jump-quantity slot=\"quantity\" min=\"1\" max=\"10\" value=\"1\"></jump-quantity>\n </jump-card-ecommerce>\n </div>\n`);\n}\n\n\nexport const CardArchiveGrid = TemplateGrid.bind({});\nCardArchiveGrid.storyName = 'Archivio (Grid)';\nCardArchiveGrid.args = {};\n\n\nexport const CardThresold = TemplateGrid.bind({});\nCardThresold.storyName = 'Archivio con soglia sconto (10%)';\nCardThresold.args = {\n hideDiscountIfLessThreshold: 10,\n};"]}
|
|
@@ -22,7 +22,7 @@ export class JumpNotice {
|
|
|
22
22
|
console.log('closable', this.closable, this.visible);
|
|
23
23
|
if (!this.visible)
|
|
24
24
|
return null;
|
|
25
|
-
return (h(Host, { ref: (host) => this.host = host }, h("div", { class: `JumpNotice__Wrapper JumpNotice__Wrapper--${this.type} JumpNotice__Wrapper--${this.size}` }, h("div", { class: "JumpNotice__Icon" }, this.type === 'info' && h("jump-icon", { library: "fa", category: "solid", name: "circle-info", size: "medium" }), this.type === 'warning' && h("jump-icon", { library: "fa", category: "solid", name: "circle-exclamation", size: "medium" }), this.type === 'error' && h("jump-icon", { library: "fa", category: "solid", name: "triangle-exclamation", size: "medium" }), this.type === 'success' && h("jump-icon", { library: "fa", category: "solid", name: "circle-check", size: "medium" })), h("div", { class: "JumpNotice__Content" }, this.size === 'small' ? (h("span", { class: "JumpNotice__Inline" }, this.description && h("span", { class: "JumpNotice__Description--inline" }, " ", this.title && h("span", { class: "JumpNotice__Title--inline" }, this.title), " ", this.description)
|
|
25
|
+
return (h(Host, { ref: (host) => this.host = host }, h("div", { class: `JumpNotice__Wrapper JumpNotice__Wrapper--${this.type} JumpNotice__Wrapper--${this.size}` }, h("div", { class: "JumpNotice__Icon" }, this.type === 'info' && h("jump-icon", { library: "fa", category: "solid", name: "circle-info", size: "medium" }), this.type === 'warning' && h("jump-icon", { library: "fa", category: "solid", name: "circle-exclamation", size: "medium" }), this.type === 'error' && h("jump-icon", { library: "fa", category: "solid", name: "triangle-exclamation", size: "medium" }), this.type === 'success' && h("jump-icon", { library: "fa", category: "solid", name: "circle-check", size: "medium" })), h("div", { class: "JumpNotice__Content" }, this.size === 'small' ? (h("span", { class: "JumpNotice__Inline" }, this.description && h("span", { class: "JumpNotice__Description--inline" }, " ", this.title && h("span", { class: "JumpNotice__Title--inline" }, this.title), " ", this.description))) : (h("div", { class: "JumpNotice__Large" }, this.title && h("p", { class: "JumpNotice__Title" }, this.title), this.description && h("p", { class: "JumpNotice__Description" }, this.description))), this.link && h("jump-button", { size: "small", text: true, href: this.link, target: "_blank" }, " ", h("jump-icon", { slot: "suffix", name: "arrow-right" }), " ", this.linkText, " ")))));
|
|
26
26
|
}
|
|
27
27
|
static get is() { return "jump-notice"; }
|
|
28
28
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jump-notice.js","sourceRoot":"","sources":["../../../src/components/jump-notice/jump-notice.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,CA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Aa;;wBAAE,IAAI,CAAC,QAAQ;4BAAgB,CAClK,CAMF,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAEF","sourcesContent":["import { Component, Host, Prop, h, Event, EventEmitter, State } from '@stencil/core';\n\n@Component({\n tag: 'jump-notice',\n styleUrl: 'jump-notice.scss',\n shadow: true,\n})\nexport class JumpNotice {\n\n /**\n * MANCA DA GESTIRE LA CHIUSURA DELLA NOTIFICA\n * MANCA DA GESTIRE LA PROPRIETà SIZE \n * MANCA DA GESTIRE IL CASO IN CUI IL BG PUò ESSERE BIANCO\n */\n\n host: HTMLElement;\n\n @State() visible: boolean = true;\n\n /**\n * @Prop() id: string;\n * Serve per identificare il componente nel DOM, utile per test o script esterni.\n */\n @Prop() id: string; \n @Prop() title: string;\n @Prop() description: string;\n @Prop() link: string;\n @Prop() linkText: string;\n @Prop() closable: boolean = false; // Serve a mostrare la x di chiusura. logica da implementare\n @Prop() type: string = 'info'; //'info' | 'warning' | 'error' | 'success' \n @Prop() size: string = 'large'; // 'small' |'large'\n\n @Event({ eventName: 'jump-notice-close' }) closeNoticeEv: EventEmitter;\n\n closeNotice(){\n let data = {\n id: this.id\n }\n this.closeNoticeEv.emit(data);\n this.visible = false;\n }\n\n render() {\n console.log('closable', this.closable, this.visible);\n if (!this.visible) return null;\n return (\n <Host ref={(host: HTMLElement) => this.host = host}>\n <div class={`JumpNotice__Wrapper JumpNotice__Wrapper--${this.type} JumpNotice__Wrapper--${this.size}`}>\n <div class=\"JumpNotice__Icon\">\n {this.type === 'info' && <jump-icon library=\"fa\" category=\"solid\" name=\"circle-info\" size=\"medium\"></jump-icon>}\n {this.type === 'warning' && <jump-icon library=\"fa\" category=\"solid\" name=\"circle-exclamation\" size=\"medium\"></jump-icon>}\n {this.type === 'error' && <jump-icon library=\"fa\" category=\"solid\" name=\"triangle-exclamation\" size=\"medium\"></jump-icon>}\n {this.type === 'success' && <jump-icon library=\"fa\" category=\"solid\" name=\"circle-check\" size=\"medium\"></jump-icon>}\n </div>\n <div class=\"JumpNotice__Content\">\n {this.size === 'small' ? (\n <span class=\"JumpNotice__Inline\">\n {this.description && <span class=\"JumpNotice__Description--inline\"> {this.title && <span class=\"JumpNotice__Title--inline\">{this.title}</span>} {this.description}</span>}\n </span>\n ) : (\n <div class=\"JumpNotice__Large\">\n {this.title && <p class=\"JumpNotice__Title\">{this.title}</p>}\n {this.description && <p class=\"JumpNotice__Description\">{this.description}</p>}\n </div>\n )}\n {this.link && <jump-button size=\"small\" text href={this.link} target=\"_blank\"> <jump-icon slot=\"suffix\" name=\"arrow-right\"></jump-icon> {this.linkText} </jump-button>}\n </div>\n {/* {this.closable &&\n <div class=\"JumpNotice__Close\">\n <jump-button onClick={() => this.closeNotice()} variant=\"primary\" text size=\"small\" name=\"scopri\" value=\"value\" aria-label=\"Scopri di più\" id=\"button\" only-icon> <jump-icon slot=\"suffix\" library=\"fa\" category=\"regular\" name=\"xmark\" size=\"medium\"></jump-icon> </jump-button>\n </div>\n } */}\n </div>\n </Host>\n );\n }\n\n}\n"]}
|
|
@@ -32,6 +32,7 @@ const JumpCardEcommerce$1 = /*@__PURE__*/ proxyCustomElement(class JumpCardEcomm
|
|
|
32
32
|
return;
|
|
33
33
|
this.imageEl.style.transform = 'scale(1) translate(0, 0)';
|
|
34
34
|
};
|
|
35
|
+
this.hideDiscountIfLessThreshold = undefined;
|
|
35
36
|
this.onlyIconButton = false;
|
|
36
37
|
this.hasBackground = false;
|
|
37
38
|
this.badge = undefined;
|
|
@@ -310,7 +311,7 @@ const JumpCardEcommerce$1 = /*@__PURE__*/ proxyCustomElement(class JumpCardEcomm
|
|
|
310
311
|
: '', !this.isMini && this.onlyIconButton && this.hasSlotAddToCart ?
|
|
311
312
|
h("div", { class: "OnlyIconButton" }, h("slot", { name: "add-to-cart" }))
|
|
312
313
|
: ''), h("div", { class: `Content ${backgroundClass} ${iconOnlyClass} ${miniCard}` }, h("div", { class: `Body ${backgroundClass} ${iconOnlyClass} ${miniCard}` }, h("div", { class: "Body__Top" }, h("div", { class: "Info" }, h("a", { href: this.link, class: "Product" }, this.productName), this.subtitle ? h("div", { class: "Subtitle" }, this.subtitle) : null), this.price ?
|
|
313
|
-
h("div", { class: `Price ${miniCard}` }, !this.isMini && this.salePrice && this.salePrice < this.price ?
|
|
314
|
+
h("div", { class: `Price ${miniCard}` }, !this.isMini && this.salePrice && (this.salePrice < this.price) && (this.hideDiscountIfLessThreshold === undefined || parseFloat(calculateDiscount(this.price, this.salePrice)) > this.hideDiscountIfLessThreshold) ?
|
|
314
315
|
h("div", { class: "Price__Discount" }, " ", calculateDiscount(this.price, this.salePrice), "% ")
|
|
315
316
|
: null, !this.isMini ?
|
|
316
317
|
h("div", { class: `Price__Regular ${this.salePrice && this.salePrice < this.price ? 'sale' : ''}` }, this.currency, this.priceFormatted)
|
|
@@ -341,6 +342,7 @@ const JumpCardEcommerce$1 = /*@__PURE__*/ proxyCustomElement(class JumpCardEcomm
|
|
|
341
342
|
get JumpCardEcommerce() { return this; }
|
|
342
343
|
static get style() { return JumpCardEcommerceStyle0; }
|
|
343
344
|
}, [1, "jump-card-ecommerce", {
|
|
345
|
+
"hideDiscountIfLessThreshold": [2, "hide-discount-if-less-threshold"],
|
|
344
346
|
"onlyIconButton": [4, "only-icon-button"],
|
|
345
347
|
"hasBackground": [4, "has-background"],
|
|
346
348
|
"badge": [1],
|