@jumpgroup/jump-design-system 0.3.79 → 0.3.80
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-design-system.cjs.js +1 -1
- package/dist/cjs/jump-filter-range.cjs.entry.js +44 -74
- package/dist/cjs/jump-filter-range.cjs.entry.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/jump-filter-range/jump-filter-range.js +76 -128
- package/dist/collection/components/jump-filter-range/jump-filter-range.js.map +1 -1
- package/dist/collection/components/jump-filter-range/jump-filter-range.stories.js +13 -4
- package/dist/collection/components/jump-filter-range/jump-filter-range.stories.js.map +1 -1
- package/dist/components/jump-filter-range.js +51 -81
- package/dist/components/jump-filter-range.js.map +1 -1
- package/dist/esm/jump-design-system.js +1 -1
- package/dist/esm/jump-filter-range.entry.js +44 -74
- package/dist/esm/jump-filter-range.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-e30da431.entry.js +2 -0
- package/dist/jump-design-system/p-e30da431.entry.js.map +1 -0
- package/dist/jump-design-system-elements.json +8 -0
- package/dist/types/components/jump-filter-range/jump-filter-range.d.ts +10 -36
- package/dist/types/components/jump-filter-range/jump-filter-range.stories.d.ts +1 -0
- package/dist/types/components.d.ts +17 -20
- package/package.json +1 -1
- package/dist/jump-design-system/p-d70793e3.entry.js +0 -2
- package/dist/jump-design-system/p-d70793e3.entry.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"jump-filter-range.js","mappings":";;AAAA,MAAM,kBAAkB,GAAG,k4DAAk4D,CAAC;AAC95D,8BAAe,kBAAkB;;ACCjC;AACA,MAAM,OAAO,GAAG,CAAC,CAAC;MAOLA,iBAAe;;;;;;;;;;QAsElB,mBAAc,GAAG,CAAC,KAAY;YACpC,MAAM,KA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ACb,GAAG,EAAE,IAAI,CAAC,GAAG,EACb,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,KAAK,EAAE,IAAI,CAAC,MAAM,EAClB,OAAO,EAAE,IAAI,CAAC,cAAc,EAC5B,QAAQ,EAAE,IAAI,CAAC,YAAY,EAC3B,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,KAAK,EAAC,aAAa,gBACP,IAAI,CAAC,cAAc,GAC/B,EACF,8DACE,IAAI,EAAC,OAAO,EACZ,GAAG,EAAE,IAAI,CAAC,GAAG,EACb,GAAG,EAAE,IAAI,CAAC,GAAG,EACb,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,KAAK,EAAE,IAAI,CAAC,MAAM,EAClB,OAAO,EAAE,IAAI,CAAC,cAAc,EAC5B,QAAQ,EAAE,IAAI,CAAC,YAAY,EAC3B,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,KAAK,EAAC,aAAa,gBACP,IAAI,CAAC,cAAc,GAC/B,CACE,CACD,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["JumpFilterRange"],"sources":["src/components/jump-filter-range/jump-filter-range.scss?tag=jump-filter-range&encapsulation=shadow","src/components/jump-filter-range/jump-filter-range.tsx"],"sourcesContent":[":host {\n --jump-range-track-height: 4px;\n --jump-range-thumb-color: var(--neutral-white, #ffffff);\n --jump-range-thumb-size: 18px;\n --jump-range-fill-color: var(--secondary-standard, #5e79ba);\n --jump-range-track-color: var(--gray-ultralight, #f8f8f8);\n\n display: block;\n width: 100%;\n}\n\n:host(.is-disabled) {\n opacity: 0.5;\n cursor: not-allowed;\n --jump-range-fill-color: var(--gray-light, #e0e0e0);\n}\n\n.label-container {\n display: flex;\n justify-content: space-between;\n margin-bottom: 0.75rem;\n font-size: 0.9em;\n color: #333;\n}\n\n.slider-container {\n position: relative;\n height: var(--jump-range-thumb-size);\n display: flex;\n align-items: center;\n}\n\n// Traccia visiva di background\n.slider-track,\n.slider-fill {\n position: absolute;\n left: 0;\n height: var(--jump-range-track-height);\n border-radius: var(--jump-range-track-height);\n width: 100%;\n}\n\n.slider-track {\n background-color: var(--jump-range-track-color);\n z-index: 1;\n}\n\n.slider-fill {\n background-color: var(--jump-range-fill-color);\n z-index: 2;\n}\n\n// Stili per gli input nativi\n.range-input {\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n position: absolute;\n width: 100%;\n height: var(--jump-range-thumb-size);\n background: transparent;\n pointer-events: none; // Permette di cliccare attraverso l'input\n margin: 0;\n z-index: 3;\n}\n\n// Stili per il selettore (thumb)\n// Il pointer-events qui è fondamentale per rendere solo il thumb cliccabile\ninput[type=\"range\"]::-webkit-slider-thumb {\n -webkit-appearance: none;\n height: var(--jump-range-thumb-size);\n width: var(--jump-range-thumb-size);\n border-radius: 50%;\n background: var(--jump-range-thumb-color);\n border: 1px solid #ccc;\n cursor: pointer;\n pointer-events: auto;\n margin-top: calc((var(--jump-range-thumb-size) - var(--jump-range-track-height)) / -2);\n}\n\ninput[type=\"range\"]::-moz-range-thumb {\n -moz-appearance: none;\n height: var(--jump-range-thumb-size);\n width: var(--jump-range-thumb-size);\n border-radius: 50%;\n background: var(--jump-range-thumb-color);\n border: 1px solid #ccc;\n cursor: pointer;\n pointer-events: auto;\n}\n\n// Rende la traccia nativa dell'input invisibile\ninput[type=\"range\"]::-webkit-slider-runnable-track {\n -webkit-appearance: none;\n height: var(--jump-range-track-height);\n background: transparent;\n border: none;\n}\n\ninput[type=\"range\"]::-moz-range-track {\n -moz-appearance: none;\n height: var(--jump-range-track-height);\n background: transparent;\n border: none;\n}","import { Component, Host, Prop, h, Event, EventEmitter, Method, State, Watch, Element } from '@stencil/core';\n\n// La distanza minima tra i due slider, per evitare che si sovrappongano.\nconst MIN_GAP = 0;\n\n@Component({\n tag: 'jump-filter-range',\n styleUrl: 'jump-filter-range.scss',\n shadow: true,\n})\nexport class JumpFilterRange {\n @Element() host: HTMLElement;\n\n /** Nome identificativo del filtro, utilizzato nell'evento finale. */\n @Prop() name: string = 'range-filter';\n\n /** Testo da mostrare prima del valore minimo. */\n @Prop() labelMinBefore: string = 'Min:';\n /** Testo da mostrare dopo il valore minimo (es. unità di misura). */\n @Prop() labelMinAfter: string = '';\n\n /** Testo da mostrare prima del valore massimo. */\n @Prop() labelMaxBefore: string = 'Max:';\n /** Testo da mostrare dopo il valore massimo (es. unità di misura). */\n @Prop() labelMaxAfter: string = '';\n\n /** Il valore minimo possibile per lo slider. */\n @Prop() min: number = 0;\n /** Il valore massimo possibile per lo slider. */\n @Prop() max: number = 100;\n /** L'incremento tra i valori dello slider. */\n @Prop() step: number = 1;\n /** I valori iniziali dello slider, come array [min, max]. */\n @Prop({ mutable: true }) value: number[] = [];\n /** Stato disabilitato dello slider. */\n @Prop({ reflect: true }) disabled: boolean = false;\n\n @State() minVal: number;\n @State() maxVal: number;\n\n /**\n * Evento emesso SOLO quando l'utente ha terminato la selezione (al rilascio del mouse).\n * Ideale per lanciare chiamate API o ricalcoli onerosi.\n */\n @Event({ eventName: 'jump-filterchange' }) filterChange: EventEmitter<{ name: string; values: number[] }>;\n\n @Watch('value')\n valueWatcher(newValue: number[]) {\n if (newValue && newValue.length === 2 && newValue[0] === this.minVal && newValue[1] === this.maxVal) {\n return;\n }\n \n this.setComponentValues(newValue);\n }\n\n\n componentWillLoad() {\n this.setComponentValues(this.value);\n }\n\n /**\n * Imposta i valori interni del componente partendo da un array.\n */\n private setComponentValues(values: number[]) {\n if (values && values.length === 2) {\n this.minVal = values[0];\n this.maxVal = values[1];\n } else {\n // Fallback ai valori di default se l'input non è valido\n this.minVal = this.min;\n this.maxVal = this.max;\n }\n // Sincronizza la prop `value` con lo stato interno\n this.value = [this.minVal, this.maxVal];\n }\n\n /**\n * Gestisce l'aggiornamento in tempo reale dello slider MINIMO.\n * Aggiorna solo lo stato interno per un feedback visivo immediato.\n */\n private handleMinInput = (event: Event) => {\n const input = event.target as HTMLInputElement;\n let newMinVal = parseInt(input.value, 10);\n\n if (newMinVal > this.maxVal - MIN_GAP) {\n newMinVal = this.maxVal - MIN_GAP;\n input.value = newMinVal.toString();\n }\n this.minVal = newMinVal;\n };\n\n /**\n * Gestisce l'aggiornamento in tempo reale dello slider MASSIMO.\n * Aggiorna solo lo stato interno per un feedback visivo immediato.\n */\n private handleMaxInput = (event: Event) => {\n const input = event.target as HTMLInputElement;\n let newMaxVal = parseInt(input.value, 10);\n\n if (newMaxVal < this.minVal + MIN_GAP) {\n newMaxVal = this.minVal + MIN_GAP;\n input.value = newMaxVal.toString();\n }\n this.maxVal = newMaxVal;\n };\n\n /**\n * Eseguito quando l'utente rilascia lo slider (evento onChange).\n * Consolida il valore e emette l'evento finale.\n */\n private handleCommit = () => {\n console.log('Committing values:', this.minVal, this.maxVal);\n const currentValues = [this.minVal, this.maxVal];\n this.value = currentValues; // Sincronizza la prop\n this.filterChange.emit({\n name: this.name,\n values: currentValues,\n });\n };\n\n /**\n * Calcola lo stile per la barra di riempimento tra i due slider.\n */\n private getFillStyle() {\n const range = this.max - this.min;\n if (range === 0) return { left: '0%', width: '0%' };\n\n const leftPercent = ((this.minVal - this.min) / range) * 100;\n const rightPercent = ((this.maxVal - this.min) / range) * 100;\n return { left: `${leftPercent}%`, width: `${rightPercent - leftPercent}%` };\n }\n\n /**\n * Metodo pubblico per impostare il valore del filtro programmaticamente.\n */\n @Method()\n async setValue(values: number[], emitEvent: boolean = true): Promise<number[]> {\n if (this.disabled || !values || values.length !== 2) {\n return this.getValues();\n }\n this.setComponentValues(values);\n if (emitEvent) {\n this.handleCommit();\n }\n return this.getValues();\n }\n\n /**\n * Metodo pubblico per ottenere il valore corrente.\n */\n @Method()\n async getValues(): Promise<number[]> {\n return [this.minVal, this.maxVal];\n }\n\n /**\n * Metodo pubblico per ottenere il nome del filtro.\n */\n @Method()\n async getName(): Promise<string> {\n return this.name;\n }\n\n render() {\n return (\n <Host class={{ 'is-disabled': this.disabled }}>\n <div class=\"label-container\">\n <label class=\"label-min\">\n {this.labelMinBefore} {this.minVal}{this.labelMinAfter}\n </label>\n <label class=\"label-max\">\n {this.labelMaxBefore} {this.maxVal}{this.labelMaxAfter}\n </label>\n </div>\n <div class=\"slider-container\">\n <div class=\"slider-track\"></div>\n <div class=\"slider-fill\" style={this.getFillStyle()}></div>\n <input\n type=\"range\"\n min={this.min}\n max={this.max}\n step={this.step}\n value={this.minVal}\n onInput={this.handleMinInput}\n onChange={this.handleCommit}\n disabled={this.disabled}\n class=\"range-input\"\n aria-label={this.labelMinBefore}\n />\n <input\n type=\"range\"\n min={this.min}\n max={this.max}\n step={this.step}\n value={this.maxVal}\n onInput={this.handleMaxInput}\n onChange={this.handleCommit}\n disabled={this.disabled}\n class=\"range-input\"\n aria-label={this.labelMaxBefore}\n />\n </div>\n </Host>\n );\n }\n}"],"version":3}
|
|
1
|
+
{"file":"jump-filter-range.js","mappings":";;AAAA,MAAM,kBAAkB,GAAG,k4DAAk4D,CAAC;AAC95D,8BAAe,kBAAkB;;ACCjC;AACA,MAAM,OAAO,GAAG,CAAC,CAAC;MAOLA,iBAAe;;;;;;QA2ElB,mBAAc,GAAG,CAAC,KAAY;YACpC,MAAM,KAAK,GAAG,KAAK,CAAC,MAA0B,CAAC;YAC/C,IAAI,SAAS,GAAG,QAAQ,CAAC,KAAK,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;YAE1C,IAAI,SAAS,GAAG,IAAI,CAAC,cAAc,GAAG,OAAO,EAAE;gBAC7C,SAAS,GAAG,IAAI,CAAC,cAAc,GAAG,OAAO,CAAC;gBAC1C,KAAK,CAAC,KAAK,GAAG,SAAS,CAAC,QAAQ,EAAE,CAAC;aACpC;YACD,IAAI,CAAC,cAAc,GAAG,SAAS,CAAC;SACjC,CAAC;QAEM,mBAAc,GAAG,CAAC,KAAY;YACpC,MAAM,KAAK,GAAG,KAAK,CAAC,MAA0B,CAAC;YAC/C,IAAI,SAAS,GAAG,QAAQ,CAAC,KAAK,CAAC,KAAK,EAAE,EAAE,CA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;;;;;;;;;;;;;;","names":["JumpFilterRange"],"sources":["src/components/jump-filter-range/jump-filter-range.scss?tag=jump-filter-range&encapsulation=shadow","src/components/jump-filter-range/jump-filter-range.tsx"],"sourcesContent":[":host {\n --jump-range-track-height: 4px;\n --jump-range-thumb-color: var(--neutral-white, #ffffff);\n --jump-range-thumb-size: 18px;\n --jump-range-fill-color: var(--secondary-standard, #5e79ba);\n --jump-range-track-color: var(--gray-ultralight, #f8f8f8);\n\n display: block;\n width: 100%;\n}\n\n:host(.is-disabled) {\n opacity: 0.5;\n cursor: not-allowed;\n --jump-range-fill-color: var(--gray-light, #e0e0e0);\n}\n\n.label-container {\n display: flex;\n justify-content: space-between;\n margin-bottom: 0.75rem;\n font-size: 0.9em;\n color: #333;\n}\n\n.slider-container {\n position: relative;\n height: var(--jump-range-thumb-size);\n display: flex;\n align-items: center;\n}\n\n// Traccia visiva di background\n.slider-track,\n.slider-fill {\n position: absolute;\n left: 0;\n height: var(--jump-range-track-height);\n border-radius: var(--jump-range-track-height);\n width: 100%;\n}\n\n.slider-track {\n background-color: var(--jump-range-track-color);\n z-index: 1;\n}\n\n.slider-fill {\n background-color: var(--jump-range-fill-color);\n z-index: 2;\n}\n\n// Stili per gli input nativi\n.range-input {\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n position: absolute;\n width: 100%;\n height: var(--jump-range-thumb-size);\n background: transparent;\n pointer-events: none; // Permette di cliccare attraverso l'input\n margin: 0;\n z-index: 3;\n}\n\n// Stili per il selettore (thumb)\n// Il pointer-events qui è fondamentale per rendere solo il thumb cliccabile\ninput[type=\"range\"]::-webkit-slider-thumb {\n -webkit-appearance: none;\n height: var(--jump-range-thumb-size);\n width: var(--jump-range-thumb-size);\n border-radius: 50%;\n background: var(--jump-range-thumb-color);\n border: 1px solid #ccc;\n cursor: pointer;\n pointer-events: auto;\n margin-top: calc((var(--jump-range-thumb-size) - var(--jump-range-track-height)) / -2);\n}\n\ninput[type=\"range\"]::-moz-range-thumb {\n -moz-appearance: none;\n height: var(--jump-range-thumb-size);\n width: var(--jump-range-thumb-size);\n border-radius: 50%;\n background: var(--jump-range-thumb-color);\n border: 1px solid #ccc;\n cursor: pointer;\n pointer-events: auto;\n}\n\n// Rende la traccia nativa dell'input invisibile\ninput[type=\"range\"]::-webkit-slider-runnable-track {\n -webkit-appearance: none;\n height: var(--jump-range-track-height);\n background: transparent;\n border: none;\n}\n\ninput[type=\"range\"]::-moz-range-track {\n -moz-appearance: none;\n height: var(--jump-range-track-height);\n background: transparent;\n border: none;\n}","import { Component, Host, Prop, h, Event, EventEmitter, Method, State, Watch, Element } from '@stencil/core';\n\n// La distanza minima tra i due slider, per evitare che si sovrappongano.\nconst MIN_GAP = 0;\n\n@Component({\n tag: 'jump-filter-range',\n styleUrl: 'jump-filter-range.scss',\n shadow: true,\n})\nexport class JumpFilterRange {\n @Element() host: HTMLElement;\n\n /** Nome identificativo del filtro, utilizzato nell'evento finale. */\n @Prop() name: string = 'range-filter';\n\n /** Testo da mostrare prima del valore minimo. */\n @Prop() labelMinBefore: string = 'Min:';\n /** Testo da mostrare dopo il valore minimo (es. unità di misura). */\n @Prop() labelMinAfter: string = '';\n\n /** Testo da mostrare prima del valore massimo. */\n @Prop() labelMaxBefore: string = 'Max:';\n /** Testo da mostrare dopo il valore massimo (es. unità di misura). */\n @Prop() labelMaxAfter: string = '';\n\n /** Il valore minimo possibile per lo slider. */\n @Prop() min: number = 0;\n /** Il valore massimo possibile per lo slider. */\n @Prop() max: number = 100;\n /** L'incremento tra i valori dello slider. */\n @Prop() step: number = 1;\n\n /** Il valore minimo dello slider. */\n @Prop() minVal: number;\n /** Il valore massimo dello slider. */\n @Prop() maxVal: number;\n\n /** Stato disabilitato dello slider. */\n @Prop({ reflect: true }) disabled: boolean = false;\n\n @State() private internalMinVal: number;\n @State() private internalMaxVal: number;\n\n /**\n * Evento emesso SOLO quando l'utente ha terminato la selezione (al rilascio del mouse).\n */\n @Event({ eventName: 'jump-filterchange' }) filterChange: EventEmitter<{ name: string; values: number[] }>;\n\n @Watch('minVal')\n watchMinVal(newValue: number) {\n this.internalMinVal = this.validateValue(newValue, 'min');\n }\n\n @Watch('maxVal')\n watchMaxVal(newValue: number) {\n this.internalMaxVal = this.validateValue(newValue, 'max');\n }\n\n componentWillLoad() {\n this.initializeValues();\n }\n\n private initializeValues() {\n this.internalMinVal = this.validateValue(this.minVal, 'min');\n this.internalMaxVal = this.validateValue(this.maxVal, 'max');\n\n // Assicura che il valore minimo non superi il massimo\n if (this.internalMinVal > this.internalMaxVal) {\n this.internalMinVal = this.internalMaxVal;\n }\n\n // Sincronizza le prop se erano indefinite\n this.minVal = this.internalMinVal;\n this.maxVal = this.internalMaxVal;\n }\n\n private validateValue(val: number, type: 'min' | 'max'): number {\n const defaultVal = type === 'min' ? this.min : this.max;\n if (val === undefined || val === null) return defaultVal;\n if (val < this.min) return this.min;\n if (val > this.max) return this.max;\n return val;\n }\n\n private handleMinInput = (event: Event) => {\n const input = event.target as HTMLInputElement;\n let newMinVal = parseInt(input.value, 10);\n\n if (newMinVal > this.internalMaxVal - MIN_GAP) {\n newMinVal = this.internalMaxVal - MIN_GAP;\n input.value = newMinVal.toString();\n }\n this.internalMinVal = newMinVal;\n };\n\n private handleMaxInput = (event: Event) => {\n const input = event.target as HTMLInputElement;\n let newMaxVal = parseInt(input.value, 10);\n\n if (newMaxVal < this.internalMinVal + MIN_GAP) {\n newMaxVal = this.internalMinVal + MIN_GAP;\n input.value = newMaxVal.toString();\n }\n this.internalMaxVal = newMaxVal;\n };\n\n private handleCommit = () => {\n // Sincronizza le prop con lo stato interno prima di emettere l'evento\n this.minVal = this.internalMinVal;\n this.maxVal = this.internalMaxVal;\n\n this.filterChange.emit({\n name: this.name,\n values: [this.minVal, this.maxVal],\n });\n };\n\n private getFillStyle() {\n const range = this.max - this.min;\n if (range === 0) return { left: '0%', width: '0%' };\n\n const leftPercent = ((this.internalMinVal - this.min) / range) * 100;\n const rightPercent = ((this.internalMaxVal - this.min) / range) * 100;\n return { left: `${leftPercent}%`, width: `${rightPercent - leftPercent}%` };\n }\n\n @Method()\n async getValues(): Promise<number[]> {\n return [this.internalMinVal, this.internalMaxVal];\n }\n\n render() {\n return (\n <Host class={{ 'is-disabled': this.disabled }}>\n <div class=\"label-container\">\n <label class=\"label-min\">\n {this.labelMinBefore} {this.internalMinVal}{this.labelMinAfter}\n </label>\n <label class=\"label-max\">\n {this.labelMaxBefore} {this.internalMaxVal}{this.labelMaxAfter}\n </label>\n </div>\n <div class=\"slider-container\">\n <div class=\"slider-track\"></div>\n <div class=\"slider-fill\" style={this.getFillStyle()}></div>\n <input\n type=\"range\"\n min={this.min}\n max={this.max}\n step={this.step}\n value={this.internalMinVal}\n onInput={this.handleMinInput}\n onChange={this.handleCommit}\n disabled={this.disabled}\n class=\"range-input\"\n aria-label={this.labelMinBefore}\n />\n <input\n type=\"range\"\n min={this.min}\n max={this.max}\n step={this.step}\n value={this.internalMaxVal}\n onInput={this.handleMaxInput}\n onChange={this.handleCommit}\n disabled={this.disabled}\n class=\"range-input\"\n aria-label={this.labelMaxBefore}\n />\n </div>\n </Host>\n );\n }\n}"],"version":3}
|
|
@@ -16,7 +16,7 @@ var patchBrowser = () => {
|
|
|
16
16
|
|
|
17
17
|
patchBrowser().then(async (options) => {
|
|
18
18
|
await globalScripts();
|
|
19
|
-
return bootstrapLazy([["jump-card-ecommerce",[[1,"jump-card-ecommerce",{"onlyIconButton":[4,"only-icon-button"],"hasBackground":[4,"has-background"],"badge":[1],"favorite":[1540],"hasFavorite":[4,"has-favorite"],"hasSlotForFavorite":[4,"has-slot-for-favorite"],"hasSlotAddToCart":[4,"has-slot-add-to-cart"],"link":[1],"img":[1],"imgAlt":[1,"img-alt"],"hoverImg":[1,"hover-img"],"hoverImgAlt":[1,"hover-img-alt"],"videoSrc":[1,"video-src"],"notificationUrl":[1,"notification-url"],"notificationText":[1,"notification-text"],"productName":[1,"product-name"],"subtitle":[1],"productId":[1,"product-id"],"price":[2],"salePrice":[2,"sale-price"],"currency":[1],"addToCartColor":[1,"add-to-cart-color"],"badgeColor":[1,"badge-color"],"outOfStock":[1540,"out-of-stock"],"outOfStockText":[1,"out-of-stock-text"],"addToCartText":[1,"add-to-cart-text"],"waitingListText":[1,"waiting-list-text"],"addToWaitingList":[4,"add-to-waiting-list"],"isMini":[4,"is-mini"],"addedToCart":[4,"added-to-cart"],"endAddedToCart":[4,"end-added-to-cart"],"variations":[32],"selectedVariation":[32],"priceFormatted":[32],"salePriceFormatted":[32],"setPrice":[64]},[[0,"jump-card-ecommerce-option-connected","addOption"]]]]],["jump-filter",[[1,"jump-filter",{"direction":[1],"filterHeading":[1,"filter-heading"],"filterButtonLabel":[1,"filter-button-label"],"filterButtonIcon":[1,"filter-button-icon"],"mobileThreshold":[2,"mobile-threshold"],"filters":[8],"showCount":[4,"show-count"],"offCanvasOverlay":[4,"off-canvas-overlay"],"activeFilters":[32],"showMobileFilters":[32],"isMobile":[32],"offCanvasClasses":[32],"getFilters":[64]},[[0,"jump-filterchange","filterChangeHandler"],[9,"resize","handleResize"]],{"showMobileFilters":["watchHandler"]}]]],["jump-filtergroup",[[1,"jump-filtergroup",{"name":[1],"heading":[1],"otherLabel":[1,"other-label"],"lessLabel":[1,"less-label"],"maxElements":[2,"max-elements"],"variant":[1],"label":[32],"values":[32],"value":[32],"slotItems":[32],"inputs":[32],"showMore":[32],"getValues":[64],"getActiveAmount":[64],"getInputs":[64],"getName":[64]},null,{"showMore":["watchShowMore"]}]]],["jump-navbar",[[1,"jump-navbar",{"logo":[16],"navItems":[16],"secondaryNavItems":[16],"mobileThreshold":[2,"mobile-threshold"],"type":[1],"navPosition":[1,"nav-position"],"megaMenuAlignment":[1,"mega-menu-alignment"],"sticky":[4],"stickyThreshold":[2,"sticky-threshold"],"mobileLogo":[16],"user":[16],"isMobile":[32]},[[9,"resize","handleResize"]]]]],["jump-pagination",[[1,"jump-pagination",{"pagLabel":[1,"pag-label"],"last":[2],"showFirstAndLast":[4,"show-first-and-last"],"current":[32]},null,{"current":["watchcurrent"]}]]],["jump-pagination-table",[[0,"jump-pagination-table",{"elementsRanges":[1,"elements-ranges"],"elPerPage":[2,"el-per-page"],"pagLabel":[513,"pag-label"],"labelElementsPerPage":[513,"label-elements-per-page"],"total":[514],"first":[514],"last":[514],"showFirstAndLast":[516,"show-first-and-last"],"elementsRangesArray":[32]},null,{"elementsRanges":["elementsRangesChanged"],"elPerPage":["elPerPageChanged"]}]]],["jump-quantity",[[65,"jump-quantity",{"min":[2],"max":[2],"step":[2],"label":[1],"type":[1],"variant":[1],"showButtons":[4,"show-buttons"],"value":[2],"internalValue":[32],"getValue":[64],"setMax":[64],"reset":[64]},null,{"value":["onValueChange"]}]]],["jump-search-bar",[[1,"jump-search-bar",{"searchValue":[1025,"search-value"],"placeholder":[1],"noResultText":[1,"no-result-text"],"loadingText":[1,"loading-text"],"resultsText":[1,"results-text"],"showAllResText":[1,"show-all-res-text"],"identifier":[1],"debounceTime":[2,"debounce-time"],"variant":[1],"withBtn":[4,"with-btn"],"recentsTitle":[1,"recents-title"],"recents":[16],"results":[16],"dropdown":[4],"linearIconOnly":[4,"linear-icon-only"],"dropdownPosition":[1,"dropdown-position"],"dropdownVisible":[32],"resType":[32],"innerResults":[32],"totalResults":[32],"isExpanded":[32],"setResults":[64]},[[0,"jump-search-bar-dropdown-item-connected","addOption"]],{"searchValue":["searchValueChanged"]}]]],["jump-search-bar-mobile",[[1,"jump-search-bar-mobile",{"identifier":[1],"placeholder":[1],"recents":[16],"recentsTitle":[1,"recents-title"],"debounceTime":[2,"debounce-time"],"loadingText":[1,"loading-text"],"noResultText":[1,"no-result-text"],"results":[16],"resultsText":[1,"results-text"],"showAllResText":[1,"show-all-res-text"],"isOpen":[32],"innerResults":[32],"totalResults":[32],"resType":[32],"searchValue":[32],"setResults":[64]},[[0,"jump-search-bar-dropdown-item-connected","addOption"]],{"searchValue":["searchValueChanged"]}]]],["jump-accordion",[[1,"jump-accordion",{"variant":[1],"summary":[1],"disabled":[4],"open":[516],"icon":[1],"identifier":[1]},[[0,"sl-show","handleShow"]]]]],["jump-side-cart-example",[[1,"jump-side-cart-example",{"isCartOpen":[32],"position":[32],"cartItems":[32]}]]],["jump-tab-item",[[1,"jump-tab-item",{"identifier":[1],"iconName":[1,"icon-name"],"iconPosition":[1,"icon-position"],"label":[1],"active":[4],"disabled":[4],"variant":[32]}]]],["jump-accordion-group",[[1,"jump-accordion-group",{"variant":[1],"groupIdentifier":[1,"group-identifier"]}]]],["jump-card",[[4,"jump-card",{"horizontal":[4],"dark":[4],"shadow":[4],"border":[4],"borderRadius":[4,"border-radius"],"topBorderContentRadius":[4,"top-border-content-radius"],"boxed":[4],"roundedMedia":[4,"rounded-media"],"imgSrc":[1,"img-src"],"imgAlt":[1,"img-alt"],"videoSrc":[1,"video-src"]}]]],["jump-card-ecommerce-option",[[1,"jump-card-ecommerce-option",{"code":[1],"imgUrl":[1,"img-url"],"label":[1],"sku":[1],"taxonomy":[1]}]]],["jump-filter-checkbox",[[1,"jump-filter-checkbox",{"value":[1],"label":[1],"checked":[516],"count":[8],"isChecked":[64]}]]],["jump-filter-range",[[1,"jump-filter-range",{"name":[1],"labelMinBefore":[1,"label-min-before"],"labelMinAfter":[1,"label-min-after"],"labelMaxBefore":[1,"label-max-before"],"labelMaxAfter":[1,"label-max-after"],"min":[2],"max":[2],"step":[2],"
|
|
19
|
+
return bootstrapLazy([["jump-card-ecommerce",[[1,"jump-card-ecommerce",{"onlyIconButton":[4,"only-icon-button"],"hasBackground":[4,"has-background"],"badge":[1],"favorite":[1540],"hasFavorite":[4,"has-favorite"],"hasSlotForFavorite":[4,"has-slot-for-favorite"],"hasSlotAddToCart":[4,"has-slot-add-to-cart"],"link":[1],"img":[1],"imgAlt":[1,"img-alt"],"hoverImg":[1,"hover-img"],"hoverImgAlt":[1,"hover-img-alt"],"videoSrc":[1,"video-src"],"notificationUrl":[1,"notification-url"],"notificationText":[1,"notification-text"],"productName":[1,"product-name"],"subtitle":[1],"productId":[1,"product-id"],"price":[2],"salePrice":[2,"sale-price"],"currency":[1],"addToCartColor":[1,"add-to-cart-color"],"badgeColor":[1,"badge-color"],"outOfStock":[1540,"out-of-stock"],"outOfStockText":[1,"out-of-stock-text"],"addToCartText":[1,"add-to-cart-text"],"waitingListText":[1,"waiting-list-text"],"addToWaitingList":[4,"add-to-waiting-list"],"isMini":[4,"is-mini"],"addedToCart":[4,"added-to-cart"],"endAddedToCart":[4,"end-added-to-cart"],"variations":[32],"selectedVariation":[32],"priceFormatted":[32],"salePriceFormatted":[32],"setPrice":[64]},[[0,"jump-card-ecommerce-option-connected","addOption"]]]]],["jump-filter",[[1,"jump-filter",{"direction":[1],"filterHeading":[1,"filter-heading"],"filterButtonLabel":[1,"filter-button-label"],"filterButtonIcon":[1,"filter-button-icon"],"mobileThreshold":[2,"mobile-threshold"],"filters":[8],"showCount":[4,"show-count"],"offCanvasOverlay":[4,"off-canvas-overlay"],"activeFilters":[32],"showMobileFilters":[32],"isMobile":[32],"offCanvasClasses":[32],"getFilters":[64]},[[0,"jump-filterchange","filterChangeHandler"],[9,"resize","handleResize"]],{"showMobileFilters":["watchHandler"]}]]],["jump-filtergroup",[[1,"jump-filtergroup",{"name":[1],"heading":[1],"otherLabel":[1,"other-label"],"lessLabel":[1,"less-label"],"maxElements":[2,"max-elements"],"variant":[1],"label":[32],"values":[32],"value":[32],"slotItems":[32],"inputs":[32],"showMore":[32],"getValues":[64],"getActiveAmount":[64],"getInputs":[64],"getName":[64]},null,{"showMore":["watchShowMore"]}]]],["jump-navbar",[[1,"jump-navbar",{"logo":[16],"navItems":[16],"secondaryNavItems":[16],"mobileThreshold":[2,"mobile-threshold"],"type":[1],"navPosition":[1,"nav-position"],"megaMenuAlignment":[1,"mega-menu-alignment"],"sticky":[4],"stickyThreshold":[2,"sticky-threshold"],"mobileLogo":[16],"user":[16],"isMobile":[32]},[[9,"resize","handleResize"]]]]],["jump-pagination",[[1,"jump-pagination",{"pagLabel":[1,"pag-label"],"last":[2],"showFirstAndLast":[4,"show-first-and-last"],"current":[32]},null,{"current":["watchcurrent"]}]]],["jump-pagination-table",[[0,"jump-pagination-table",{"elementsRanges":[1,"elements-ranges"],"elPerPage":[2,"el-per-page"],"pagLabel":[513,"pag-label"],"labelElementsPerPage":[513,"label-elements-per-page"],"total":[514],"first":[514],"last":[514],"showFirstAndLast":[516,"show-first-and-last"],"elementsRangesArray":[32]},null,{"elementsRanges":["elementsRangesChanged"],"elPerPage":["elPerPageChanged"]}]]],["jump-quantity",[[65,"jump-quantity",{"min":[2],"max":[2],"step":[2],"label":[1],"type":[1],"variant":[1],"showButtons":[4,"show-buttons"],"value":[2],"internalValue":[32],"getValue":[64],"setMax":[64],"reset":[64]},null,{"value":["onValueChange"]}]]],["jump-search-bar",[[1,"jump-search-bar",{"searchValue":[1025,"search-value"],"placeholder":[1],"noResultText":[1,"no-result-text"],"loadingText":[1,"loading-text"],"resultsText":[1,"results-text"],"showAllResText":[1,"show-all-res-text"],"identifier":[1],"debounceTime":[2,"debounce-time"],"variant":[1],"withBtn":[4,"with-btn"],"recentsTitle":[1,"recents-title"],"recents":[16],"results":[16],"dropdown":[4],"linearIconOnly":[4,"linear-icon-only"],"dropdownPosition":[1,"dropdown-position"],"dropdownVisible":[32],"resType":[32],"innerResults":[32],"totalResults":[32],"isExpanded":[32],"setResults":[64]},[[0,"jump-search-bar-dropdown-item-connected","addOption"]],{"searchValue":["searchValueChanged"]}]]],["jump-search-bar-mobile",[[1,"jump-search-bar-mobile",{"identifier":[1],"placeholder":[1],"recents":[16],"recentsTitle":[1,"recents-title"],"debounceTime":[2,"debounce-time"],"loadingText":[1,"loading-text"],"noResultText":[1,"no-result-text"],"results":[16],"resultsText":[1,"results-text"],"showAllResText":[1,"show-all-res-text"],"isOpen":[32],"innerResults":[32],"totalResults":[32],"resType":[32],"searchValue":[32],"setResults":[64]},[[0,"jump-search-bar-dropdown-item-connected","addOption"]],{"searchValue":["searchValueChanged"]}]]],["jump-accordion",[[1,"jump-accordion",{"variant":[1],"summary":[1],"disabled":[4],"open":[516],"icon":[1],"identifier":[1]},[[0,"sl-show","handleShow"]]]]],["jump-side-cart-example",[[1,"jump-side-cart-example",{"isCartOpen":[32],"position":[32],"cartItems":[32]}]]],["jump-tab-item",[[1,"jump-tab-item",{"identifier":[1],"iconName":[1,"icon-name"],"iconPosition":[1,"icon-position"],"label":[1],"active":[4],"disabled":[4],"variant":[32]}]]],["jump-accordion-group",[[1,"jump-accordion-group",{"variant":[1],"groupIdentifier":[1,"group-identifier"]}]]],["jump-card",[[4,"jump-card",{"horizontal":[4],"dark":[4],"shadow":[4],"border":[4],"borderRadius":[4,"border-radius"],"topBorderContentRadius":[4,"top-border-content-radius"],"boxed":[4],"roundedMedia":[4,"rounded-media"],"imgSrc":[1,"img-src"],"imgAlt":[1,"img-alt"],"videoSrc":[1,"video-src"]}]]],["jump-card-ecommerce-option",[[1,"jump-card-ecommerce-option",{"code":[1],"imgUrl":[1,"img-url"],"label":[1],"sku":[1],"taxonomy":[1]}]]],["jump-filter-checkbox",[[1,"jump-filter-checkbox",{"value":[1],"label":[1],"checked":[516],"count":[8],"isChecked":[64]}]]],["jump-filter-range",[[1,"jump-filter-range",{"name":[1],"labelMinBefore":[1,"label-min-before"],"labelMinAfter":[1,"label-min-after"],"labelMaxBefore":[1,"label-max-before"],"labelMaxAfter":[1,"label-max-after"],"min":[2],"max":[2],"step":[2],"minVal":[2,"min-val"],"maxVal":[2,"max-val"],"disabled":[516],"internalMinVal":[32],"internalMaxVal":[32],"getValues":[64]},null,{"minVal":["watchMinVal"],"maxVal":["watchMaxVal"]}]]],["jump-filter-select",[[1,"jump-filter-select",{"value":[1537],"placeholder":[1],"label":[1],"name":[1],"options":[1],"disabled":[516],"multiple":[4],"required":[4],"loading":[4],"open":[32],"values":[32],"getSelectedValue":[64],"getSelectedOption":[64],"getValues":[64],"getName":[64],"setValue":[64]}]]],["jump-filter-switch",[[1,"jump-filter-switch",{"value":[1],"label":[1],"name":[1],"checked":[1540],"disabled":[516],"values":[32],"setValue":[64],"isChecked":[64],"getValues":[64],"getName":[64]},null,{"checked":["checkedChanged"]}]]],["jump-search-bar-dropdown-item",[[1,"jump-search-bar-dropdown-item",{"value":[1],"img":[1],"href":[1],"details":[32]}]]],["jump-tab",[[1,"jump-tab",{"disabled":[4],"alignment":[1],"fullBorder":[4,"full-border"],"tabGroupName":[1,"tab-group-name"],"variant":[1]},[[0,"jump-change-active-tab","changeActiveTabHandler"]]]]],["jump-tab-panel",[[1,"jump-tab-panel",{"identifier":[1],"active":[4]}]]],["jump-side-cart",[[1,"jump-side-cart",{"isOpen":[4,"is-open"],"position":[1],"items":[16],"discountThreshold":[16],"freeShippingThreshold":[2,"free-shipping-threshold"],"progressPercentage":[2,"progress-percentage"],"checkoutLabel":[1,"checkout-label"],"viewCartLabel":[1,"view-cart-label"],"shippingInfo":[1,"shipping-info"],"cartItems":[32]}]]],["jump-badge",[[1,"jump-badge",{"label":[1],"variant":[513],"dimension":[513],"soft":[516],"outline":[516]}]]],["jump-button_2",[[1,"jump-button",{"disabled":[4],"variant":[1],"outline":[4],"size":[1],"full":[4],"pill":[4],"text":[4],"onlyIcon":[4,"only-icon"],"href":[1],"target":[1],"type":[1],"name":[1],"value":[1],"ariaLabel":[1,"aria-label"],"class":[1],"buttonId":[1,"button-id"]}],[1,"jump-icon",{"class":[1],"library":[1],"name":[1],"category":[1],"size":[1],"label":[1],"src":[1]}]]]], options);
|
|
20
20
|
});
|
|
21
21
|
|
|
22
22
|
//# sourceMappingURL=jump-design-system.js.map
|
|
@@ -9,43 +9,31 @@ const JumpFilterRange = class {
|
|
|
9
9
|
constructor(hostRef) {
|
|
10
10
|
registerInstance(this, hostRef);
|
|
11
11
|
this.filterChange = createEvent(this, "jump-filterchange", 7);
|
|
12
|
-
/**
|
|
13
|
-
* Gestisce l'aggiornamento in tempo reale dello slider MINIMO.
|
|
14
|
-
* Aggiorna solo lo stato interno per un feedback visivo immediato.
|
|
15
|
-
*/
|
|
16
12
|
this.handleMinInput = (event) => {
|
|
17
13
|
const input = event.target;
|
|
18
14
|
let newMinVal = parseInt(input.value, 10);
|
|
19
|
-
if (newMinVal > this.
|
|
20
|
-
newMinVal = this.
|
|
15
|
+
if (newMinVal > this.internalMaxVal - MIN_GAP) {
|
|
16
|
+
newMinVal = this.internalMaxVal - MIN_GAP;
|
|
21
17
|
input.value = newMinVal.toString();
|
|
22
18
|
}
|
|
23
|
-
this.
|
|
19
|
+
this.internalMinVal = newMinVal;
|
|
24
20
|
};
|
|
25
|
-
/**
|
|
26
|
-
* Gestisce l'aggiornamento in tempo reale dello slider MASSIMO.
|
|
27
|
-
* Aggiorna solo lo stato interno per un feedback visivo immediato.
|
|
28
|
-
*/
|
|
29
21
|
this.handleMaxInput = (event) => {
|
|
30
22
|
const input = event.target;
|
|
31
23
|
let newMaxVal = parseInt(input.value, 10);
|
|
32
|
-
if (newMaxVal < this.
|
|
33
|
-
newMaxVal = this.
|
|
24
|
+
if (newMaxVal < this.internalMinVal + MIN_GAP) {
|
|
25
|
+
newMaxVal = this.internalMinVal + MIN_GAP;
|
|
34
26
|
input.value = newMaxVal.toString();
|
|
35
27
|
}
|
|
36
|
-
this.
|
|
28
|
+
this.internalMaxVal = newMaxVal;
|
|
37
29
|
};
|
|
38
|
-
/**
|
|
39
|
-
* Eseguito quando l'utente rilascia lo slider (evento onChange).
|
|
40
|
-
* Consolida il valore e emette l'evento finale.
|
|
41
|
-
*/
|
|
42
30
|
this.handleCommit = () => {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
this.
|
|
31
|
+
// Sincronizza le prop con lo stato interno prima di emettere l'evento
|
|
32
|
+
this.minVal = this.internalMinVal;
|
|
33
|
+
this.maxVal = this.internalMaxVal;
|
|
46
34
|
this.filterChange.emit({
|
|
47
35
|
name: this.name,
|
|
48
|
-
values:
|
|
36
|
+
values: [this.minVal, this.maxVal],
|
|
49
37
|
});
|
|
50
38
|
};
|
|
51
39
|
this.name = 'range-filter';
|
|
@@ -56,78 +44,60 @@ const JumpFilterRange = class {
|
|
|
56
44
|
this.min = 0;
|
|
57
45
|
this.max = 100;
|
|
58
46
|
this.step = 1;
|
|
59
|
-
this.value = [];
|
|
60
|
-
this.disabled = false;
|
|
61
47
|
this.minVal = undefined;
|
|
62
48
|
this.maxVal = undefined;
|
|
49
|
+
this.disabled = false;
|
|
50
|
+
this.internalMinVal = undefined;
|
|
51
|
+
this.internalMaxVal = undefined;
|
|
63
52
|
}
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
this.
|
|
53
|
+
watchMinVal(newValue) {
|
|
54
|
+
this.internalMinVal = this.validateValue(newValue, 'min');
|
|
55
|
+
}
|
|
56
|
+
watchMaxVal(newValue) {
|
|
57
|
+
this.internalMaxVal = this.validateValue(newValue, 'max');
|
|
69
58
|
}
|
|
70
59
|
componentWillLoad() {
|
|
71
|
-
this.
|
|
60
|
+
this.initializeValues();
|
|
72
61
|
}
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
if (
|
|
78
|
-
this.
|
|
79
|
-
this.maxVal = values[1];
|
|
80
|
-
}
|
|
81
|
-
else {
|
|
82
|
-
// Fallback ai valori di default se l'input non è valido
|
|
83
|
-
this.minVal = this.min;
|
|
84
|
-
this.maxVal = this.max;
|
|
62
|
+
initializeValues() {
|
|
63
|
+
this.internalMinVal = this.validateValue(this.minVal, 'min');
|
|
64
|
+
this.internalMaxVal = this.validateValue(this.maxVal, 'max');
|
|
65
|
+
// Assicura che il valore minimo non superi il massimo
|
|
66
|
+
if (this.internalMinVal > this.internalMaxVal) {
|
|
67
|
+
this.internalMinVal = this.internalMaxVal;
|
|
85
68
|
}
|
|
86
|
-
// Sincronizza
|
|
87
|
-
this.
|
|
69
|
+
// Sincronizza le prop se erano indefinite
|
|
70
|
+
this.minVal = this.internalMinVal;
|
|
71
|
+
this.maxVal = this.internalMaxVal;
|
|
72
|
+
}
|
|
73
|
+
validateValue(val, type) {
|
|
74
|
+
const defaultVal = type === 'min' ? this.min : this.max;
|
|
75
|
+
if (val === undefined || val === null)
|
|
76
|
+
return defaultVal;
|
|
77
|
+
if (val < this.min)
|
|
78
|
+
return this.min;
|
|
79
|
+
if (val > this.max)
|
|
80
|
+
return this.max;
|
|
81
|
+
return val;
|
|
88
82
|
}
|
|
89
|
-
/**
|
|
90
|
-
* Calcola lo stile per la barra di riempimento tra i due slider.
|
|
91
|
-
*/
|
|
92
83
|
getFillStyle() {
|
|
93
84
|
const range = this.max - this.min;
|
|
94
85
|
if (range === 0)
|
|
95
86
|
return { left: '0%', width: '0%' };
|
|
96
|
-
const leftPercent = ((this.
|
|
97
|
-
const rightPercent = ((this.
|
|
87
|
+
const leftPercent = ((this.internalMinVal - this.min) / range) * 100;
|
|
88
|
+
const rightPercent = ((this.internalMaxVal - this.min) / range) * 100;
|
|
98
89
|
return { left: `${leftPercent}%`, width: `${rightPercent - leftPercent}%` };
|
|
99
90
|
}
|
|
100
|
-
/**
|
|
101
|
-
* Metodo pubblico per impostare il valore del filtro programmaticamente.
|
|
102
|
-
*/
|
|
103
|
-
async setValue(values, emitEvent = true) {
|
|
104
|
-
if (this.disabled || !values || values.length !== 2) {
|
|
105
|
-
return this.getValues();
|
|
106
|
-
}
|
|
107
|
-
this.setComponentValues(values);
|
|
108
|
-
if (emitEvent) {
|
|
109
|
-
this.handleCommit();
|
|
110
|
-
}
|
|
111
|
-
return this.getValues();
|
|
112
|
-
}
|
|
113
|
-
/**
|
|
114
|
-
* Metodo pubblico per ottenere il valore corrente.
|
|
115
|
-
*/
|
|
116
91
|
async getValues() {
|
|
117
|
-
return [this.
|
|
118
|
-
}
|
|
119
|
-
/**
|
|
120
|
-
* Metodo pubblico per ottenere il nome del filtro.
|
|
121
|
-
*/
|
|
122
|
-
async getName() {
|
|
123
|
-
return this.name;
|
|
92
|
+
return [this.internalMinVal, this.internalMaxVal];
|
|
124
93
|
}
|
|
125
94
|
render() {
|
|
126
|
-
return (h(Host, { key: '
|
|
95
|
+
return (h(Host, { key: '86845857fd074c171e294dc033aa770700401d26', class: { 'is-disabled': this.disabled } }, h("div", { key: '113c5ed7ef5719a189811785c6e5bf35a4ff8649', class: "label-container" }, h("label", { key: 'b7415f0d21740dd5b65c1c82746a0f385b1d810f', class: "label-min" }, this.labelMinBefore, " ", this.internalMinVal, this.labelMinAfter), h("label", { key: '934a8fdff0fc69f0c2a9e6cd404c7df94d79f7ce', class: "label-max" }, this.labelMaxBefore, " ", this.internalMaxVal, this.labelMaxAfter)), h("div", { key: '71e3c78ba4433bb63d522e34842dcdc91e421100', class: "slider-container" }, h("div", { key: '6514105f0f22b475c2a7f210fed6bbb88d5f7148', class: "slider-track" }), h("div", { key: 'eb02aaa3b388a51136df71a94e9f0128e35653a1', class: "slider-fill", style: this.getFillStyle() }), h("input", { key: 'c11e5cf68251d18d15b46a9fbf2129e33a732e69', type: "range", min: this.min, max: this.max, step: this.step, value: this.internalMinVal, onInput: this.handleMinInput, onChange: this.handleCommit, disabled: this.disabled, class: "range-input", "aria-label": this.labelMinBefore }), h("input", { key: '41a5bc8333377c6028894735e60f8e7645c4abf3', type: "range", min: this.min, max: this.max, step: this.step, value: this.internalMaxVal, onInput: this.handleMaxInput, onChange: this.handleCommit, disabled: this.disabled, class: "range-input", "aria-label": this.labelMaxBefore }))));
|
|
127
96
|
}
|
|
128
97
|
get host() { return getElement(this); }
|
|
129
98
|
static get watchers() { return {
|
|
130
|
-
"
|
|
99
|
+
"minVal": ["watchMinVal"],
|
|
100
|
+
"maxVal": ["watchMaxVal"]
|
|
131
101
|
}; }
|
|
132
102
|
};
|
|
133
103
|
JumpFilterRange.style = JumpFilterRangeStyle0;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"jump-filter-range.entry.js","mappings":";;AAAA,MAAM,kBAAkB,GAAG,k4DAAk4D,CAAC;AAC95D,8BAAe,kBAAkB;;ACCjC;AACA,MAAM,OAAO,GAAG,CAAC,CA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,EAC3D,8DACE,IAAI,EAAC,OAAO,EACZ,GAAG,EAAE,IAAI,CAAC,GAAG,EACb,GAAG,EAAE,IAAI,CAAC,GAAG,EACb,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,KAAK,EAAE,IAAI,CAAC,MAAM,EAClB,OAAO,EAAE,IAAI,CAAC,cAAc,EAC5B,QAAQ,EAAE,IAAI,CAAC,YAAY,EAC3B,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,KAAK,EAAC,aAAa,gBACP,IAAI,CAAC,cAAc,GAC/B,EACF,8DACE,IAAI,EAAC,OAAO,EACZ,GAAG,EAAE,IAAI,CAAC,GAAG,EACb,GAAG,EAAE,IAAI,CAAC,GAAG,EACb,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,KAAK,EAAE,IAAI,CAAC,MAAM,EAClB,OAAO,EAAE,IAAI,CAAC,cAAc,EAC5B,QAAQ,EAAE,IAAI,CAAC,YAAY,EAC3B,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,KAAK,EAAC,aAAa,gBACP,IAAI,CAAC,cAAc,GAC/B,CACE,CACD,EACP;KACH;;;;;;;;;;","names":[],"sources":["src/components/jump-filter-range/jump-filter-range.scss?tag=jump-filter-range&encapsulation=shadow","src/components/jump-filter-range/jump-filter-range.tsx"],"sourcesContent":[":host {\n --jump-range-track-height: 4px;\n --jump-range-thumb-color: var(--neutral-white, #ffffff);\n --jump-range-thumb-size: 18px;\n --jump-range-fill-color: var(--secondary-standard, #5e79ba);\n --jump-range-track-color: var(--gray-ultralight, #f8f8f8);\n\n display: block;\n width: 100%;\n}\n\n:host(.is-disabled) {\n opacity: 0.5;\n cursor: not-allowed;\n --jump-range-fill-color: var(--gray-light, #e0e0e0);\n}\n\n.label-container {\n display: flex;\n justify-content: space-between;\n margin-bottom: 0.75rem;\n font-size: 0.9em;\n color: #333;\n}\n\n.slider-container {\n position: relative;\n height: var(--jump-range-thumb-size);\n display: flex;\n align-items: center;\n}\n\n// Traccia visiva di background\n.slider-track,\n.slider-fill {\n position: absolute;\n left: 0;\n height: var(--jump-range-track-height);\n border-radius: var(--jump-range-track-height);\n width: 100%;\n}\n\n.slider-track {\n background-color: var(--jump-range-track-color);\n z-index: 1;\n}\n\n.slider-fill {\n background-color: var(--jump-range-fill-color);\n z-index: 2;\n}\n\n// Stili per gli input nativi\n.range-input {\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n position: absolute;\n width: 100%;\n height: var(--jump-range-thumb-size);\n background: transparent;\n pointer-events: none; // Permette di cliccare attraverso l'input\n margin: 0;\n z-index: 3;\n}\n\n// Stili per il selettore (thumb)\n// Il pointer-events qui è fondamentale per rendere solo il thumb cliccabile\ninput[type=\"range\"]::-webkit-slider-thumb {\n -webkit-appearance: none;\n height: var(--jump-range-thumb-size);\n width: var(--jump-range-thumb-size);\n border-radius: 50%;\n background: var(--jump-range-thumb-color);\n border: 1px solid #ccc;\n cursor: pointer;\n pointer-events: auto;\n margin-top: calc((var(--jump-range-thumb-size) - var(--jump-range-track-height)) / -2);\n}\n\ninput[type=\"range\"]::-moz-range-thumb {\n -moz-appearance: none;\n height: var(--jump-range-thumb-size);\n width: var(--jump-range-thumb-size);\n border-radius: 50%;\n background: var(--jump-range-thumb-color);\n border: 1px solid #ccc;\n cursor: pointer;\n pointer-events: auto;\n}\n\n// Rende la traccia nativa dell'input invisibile\ninput[type=\"range\"]::-webkit-slider-runnable-track {\n -webkit-appearance: none;\n height: var(--jump-range-track-height);\n background: transparent;\n border: none;\n}\n\ninput[type=\"range\"]::-moz-range-track {\n -moz-appearance: none;\n height: var(--jump-range-track-height);\n background: transparent;\n border: none;\n}","import { Component, Host, Prop, h, Event, EventEmitter, Method, State, Watch, Element } from '@stencil/core';\n\n// La distanza minima tra i due slider, per evitare che si sovrappongano.\nconst MIN_GAP = 0;\n\n@Component({\n tag: 'jump-filter-range',\n styleUrl: 'jump-filter-range.scss',\n shadow: true,\n})\nexport class JumpFilterRange {\n @Element() host: HTMLElement;\n\n /** Nome identificativo del filtro, utilizzato nell'evento finale. */\n @Prop() name: string = 'range-filter';\n\n /** Testo da mostrare prima del valore minimo. */\n @Prop() labelMinBefore: string = 'Min:';\n /** Testo da mostrare dopo il valore minimo (es. unità di misura). */\n @Prop() labelMinAfter: string = '';\n\n /** Testo da mostrare prima del valore massimo. */\n @Prop() labelMaxBefore: string = 'Max:';\n /** Testo da mostrare dopo il valore massimo (es. unità di misura). */\n @Prop() labelMaxAfter: string = '';\n\n /** Il valore minimo possibile per lo slider. */\n @Prop() min: number = 0;\n /** Il valore massimo possibile per lo slider. */\n @Prop() max: number = 100;\n /** L'incremento tra i valori dello slider. */\n @Prop() step: number = 1;\n /** I valori iniziali dello slider, come array [min, max]. */\n @Prop({ mutable: true }) value: number[] = [];\n /** Stato disabilitato dello slider. */\n @Prop({ reflect: true }) disabled: boolean = false;\n\n @State() minVal: number;\n @State() maxVal: number;\n\n /**\n * Evento emesso SOLO quando l'utente ha terminato la selezione (al rilascio del mouse).\n * Ideale per lanciare chiamate API o ricalcoli onerosi.\n */\n @Event({ eventName: 'jump-filterchange' }) filterChange: EventEmitter<{ name: string; values: number[] }>;\n\n @Watch('value')\n valueWatcher(newValue: number[]) {\n if (newValue && newValue.length === 2 && newValue[0] === this.minVal && newValue[1] === this.maxVal) {\n return;\n }\n \n this.setComponentValues(newValue);\n }\n\n\n componentWillLoad() {\n this.setComponentValues(this.value);\n }\n\n /**\n * Imposta i valori interni del componente partendo da un array.\n */\n private setComponentValues(values: number[]) {\n if (values && values.length === 2) {\n this.minVal = values[0];\n this.maxVal = values[1];\n } else {\n // Fallback ai valori di default se l'input non è valido\n this.minVal = this.min;\n this.maxVal = this.max;\n }\n // Sincronizza la prop `value` con lo stato interno\n this.value = [this.minVal, this.maxVal];\n }\n\n /**\n * Gestisce l'aggiornamento in tempo reale dello slider MINIMO.\n * Aggiorna solo lo stato interno per un feedback visivo immediato.\n */\n private handleMinInput = (event: Event) => {\n const input = event.target as HTMLInputElement;\n let newMinVal = parseInt(input.value, 10);\n\n if (newMinVal > this.maxVal - MIN_GAP) {\n newMinVal = this.maxVal - MIN_GAP;\n input.value = newMinVal.toString();\n }\n this.minVal = newMinVal;\n };\n\n /**\n * Gestisce l'aggiornamento in tempo reale dello slider MASSIMO.\n * Aggiorna solo lo stato interno per un feedback visivo immediato.\n */\n private handleMaxInput = (event: Event) => {\n const input = event.target as HTMLInputElement;\n let newMaxVal = parseInt(input.value, 10);\n\n if (newMaxVal < this.minVal + MIN_GAP) {\n newMaxVal = this.minVal + MIN_GAP;\n input.value = newMaxVal.toString();\n }\n this.maxVal = newMaxVal;\n };\n\n /**\n * Eseguito quando l'utente rilascia lo slider (evento onChange).\n * Consolida il valore e emette l'evento finale.\n */\n private handleCommit = () => {\n console.log('Committing values:', this.minVal, this.maxVal);\n const currentValues = [this.minVal, this.maxVal];\n this.value = currentValues; // Sincronizza la prop\n this.filterChange.emit({\n name: this.name,\n values: currentValues,\n });\n };\n\n /**\n * Calcola lo stile per la barra di riempimento tra i due slider.\n */\n private getFillStyle() {\n const range = this.max - this.min;\n if (range === 0) return { left: '0%', width: '0%' };\n\n const leftPercent = ((this.minVal - this.min) / range) * 100;\n const rightPercent = ((this.maxVal - this.min) / range) * 100;\n return { left: `${leftPercent}%`, width: `${rightPercent - leftPercent}%` };\n }\n\n /**\n * Metodo pubblico per impostare il valore del filtro programmaticamente.\n */\n @Method()\n async setValue(values: number[], emitEvent: boolean = true): Promise<number[]> {\n if (this.disabled || !values || values.length !== 2) {\n return this.getValues();\n }\n this.setComponentValues(values);\n if (emitEvent) {\n this.handleCommit();\n }\n return this.getValues();\n }\n\n /**\n * Metodo pubblico per ottenere il valore corrente.\n */\n @Method()\n async getValues(): Promise<number[]> {\n return [this.minVal, this.maxVal];\n }\n\n /**\n * Metodo pubblico per ottenere il nome del filtro.\n */\n @Method()\n async getName(): Promise<string> {\n return this.name;\n }\n\n render() {\n return (\n <Host class={{ 'is-disabled': this.disabled }}>\n <div class=\"label-container\">\n <label class=\"label-min\">\n {this.labelMinBefore} {this.minVal}{this.labelMinAfter}\n </label>\n <label class=\"label-max\">\n {this.labelMaxBefore} {this.maxVal}{this.labelMaxAfter}\n </label>\n </div>\n <div class=\"slider-container\">\n <div class=\"slider-track\"></div>\n <div class=\"slider-fill\" style={this.getFillStyle()}></div>\n <input\n type=\"range\"\n min={this.min}\n max={this.max}\n step={this.step}\n value={this.minVal}\n onInput={this.handleMinInput}\n onChange={this.handleCommit}\n disabled={this.disabled}\n class=\"range-input\"\n aria-label={this.labelMinBefore}\n />\n <input\n type=\"range\"\n min={this.min}\n max={this.max}\n step={this.step}\n value={this.maxVal}\n onInput={this.handleMaxInput}\n onChange={this.handleCommit}\n disabled={this.disabled}\n class=\"range-input\"\n aria-label={this.labelMaxBefore}\n />\n </div>\n </Host>\n );\n }\n}"],"version":3}
|
|
1
|
+
{"file":"jump-filter-range.entry.js","mappings":";;AAAA,MAAM,kBAAkB,GAAG,k4DAAk4D,CAAC;AAC95D,8BAAe,kBAAkB;;ACCjC;AACA,MAAM,OAAO,GAAG,CAAC,CAAC;MAOL,eAAe;;;;QA2ElB,mBAAc,GAAG,CAAC,KAAY;YACpC,MAAM,KAAK,GAAG,KAAK,CAAC,MAA0B,CAAC;YAC/C,IAAI,SAAS,GAAG,QAAQ,CAAC,KAAK,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;YAE1C,IAAI,SAAS,GAAG,IAAI,CAAC,cAAc,GAAG,OAAO,EAAE;gBAC7C,SAAS,GAAG,IAAI,CAAC,cAAc,GAAG,OAAO,CAAC;gBAC1C,KAAK,CAAC,KAAK,GAAG,SAAS,CAAC,QAAQ,EAAE,CAAC;aACpC;YACD,IAAI,CAAC,cAAc,GAAG,SAAS,CAAC;SACjC,CAAC;QAEM,mBAAc,GAAG,CAAC,KAAY;YACpC,MAAM,KAAK,GAAG,KAAK,CAAC,MAA0B,CAAC;YAC/C,IAAI,SAAS,GAAG,QAAQ,CAAC,KAAK,CAAC,KA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"sources":["src/components/jump-filter-range/jump-filter-range.scss?tag=jump-filter-range&encapsulation=shadow","src/components/jump-filter-range/jump-filter-range.tsx"],"sourcesContent":[":host {\n --jump-range-track-height: 4px;\n --jump-range-thumb-color: var(--neutral-white, #ffffff);\n --jump-range-thumb-size: 18px;\n --jump-range-fill-color: var(--secondary-standard, #5e79ba);\n --jump-range-track-color: var(--gray-ultralight, #f8f8f8);\n\n display: block;\n width: 100%;\n}\n\n:host(.is-disabled) {\n opacity: 0.5;\n cursor: not-allowed;\n --jump-range-fill-color: var(--gray-light, #e0e0e0);\n}\n\n.label-container {\n display: flex;\n justify-content: space-between;\n margin-bottom: 0.75rem;\n font-size: 0.9em;\n color: #333;\n}\n\n.slider-container {\n position: relative;\n height: var(--jump-range-thumb-size);\n display: flex;\n align-items: center;\n}\n\n// Traccia visiva di background\n.slider-track,\n.slider-fill {\n position: absolute;\n left: 0;\n height: var(--jump-range-track-height);\n border-radius: var(--jump-range-track-height);\n width: 100%;\n}\n\n.slider-track {\n background-color: var(--jump-range-track-color);\n z-index: 1;\n}\n\n.slider-fill {\n background-color: var(--jump-range-fill-color);\n z-index: 2;\n}\n\n// Stili per gli input nativi\n.range-input {\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n position: absolute;\n width: 100%;\n height: var(--jump-range-thumb-size);\n background: transparent;\n pointer-events: none; // Permette di cliccare attraverso l'input\n margin: 0;\n z-index: 3;\n}\n\n// Stili per il selettore (thumb)\n// Il pointer-events qui è fondamentale per rendere solo il thumb cliccabile\ninput[type=\"range\"]::-webkit-slider-thumb {\n -webkit-appearance: none;\n height: var(--jump-range-thumb-size);\n width: var(--jump-range-thumb-size);\n border-radius: 50%;\n background: var(--jump-range-thumb-color);\n border: 1px solid #ccc;\n cursor: pointer;\n pointer-events: auto;\n margin-top: calc((var(--jump-range-thumb-size) - var(--jump-range-track-height)) / -2);\n}\n\ninput[type=\"range\"]::-moz-range-thumb {\n -moz-appearance: none;\n height: var(--jump-range-thumb-size);\n width: var(--jump-range-thumb-size);\n border-radius: 50%;\n background: var(--jump-range-thumb-color);\n border: 1px solid #ccc;\n cursor: pointer;\n pointer-events: auto;\n}\n\n// Rende la traccia nativa dell'input invisibile\ninput[type=\"range\"]::-webkit-slider-runnable-track {\n -webkit-appearance: none;\n height: var(--jump-range-track-height);\n background: transparent;\n border: none;\n}\n\ninput[type=\"range\"]::-moz-range-track {\n -moz-appearance: none;\n height: var(--jump-range-track-height);\n background: transparent;\n border: none;\n}","import { Component, Host, Prop, h, Event, EventEmitter, Method, State, Watch, Element } from '@stencil/core';\n\n// La distanza minima tra i due slider, per evitare che si sovrappongano.\nconst MIN_GAP = 0;\n\n@Component({\n tag: 'jump-filter-range',\n styleUrl: 'jump-filter-range.scss',\n shadow: true,\n})\nexport class JumpFilterRange {\n @Element() host: HTMLElement;\n\n /** Nome identificativo del filtro, utilizzato nell'evento finale. */\n @Prop() name: string = 'range-filter';\n\n /** Testo da mostrare prima del valore minimo. */\n @Prop() labelMinBefore: string = 'Min:';\n /** Testo da mostrare dopo il valore minimo (es. unità di misura). */\n @Prop() labelMinAfter: string = '';\n\n /** Testo da mostrare prima del valore massimo. */\n @Prop() labelMaxBefore: string = 'Max:';\n /** Testo da mostrare dopo il valore massimo (es. unità di misura). */\n @Prop() labelMaxAfter: string = '';\n\n /** Il valore minimo possibile per lo slider. */\n @Prop() min: number = 0;\n /** Il valore massimo possibile per lo slider. */\n @Prop() max: number = 100;\n /** L'incremento tra i valori dello slider. */\n @Prop() step: number = 1;\n\n /** Il valore minimo dello slider. */\n @Prop() minVal: number;\n /** Il valore massimo dello slider. */\n @Prop() maxVal: number;\n\n /** Stato disabilitato dello slider. */\n @Prop({ reflect: true }) disabled: boolean = false;\n\n @State() private internalMinVal: number;\n @State() private internalMaxVal: number;\n\n /**\n * Evento emesso SOLO quando l'utente ha terminato la selezione (al rilascio del mouse).\n */\n @Event({ eventName: 'jump-filterchange' }) filterChange: EventEmitter<{ name: string; values: number[] }>;\n\n @Watch('minVal')\n watchMinVal(newValue: number) {\n this.internalMinVal = this.validateValue(newValue, 'min');\n }\n\n @Watch('maxVal')\n watchMaxVal(newValue: number) {\n this.internalMaxVal = this.validateValue(newValue, 'max');\n }\n\n componentWillLoad() {\n this.initializeValues();\n }\n\n private initializeValues() {\n this.internalMinVal = this.validateValue(this.minVal, 'min');\n this.internalMaxVal = this.validateValue(this.maxVal, 'max');\n\n // Assicura che il valore minimo non superi il massimo\n if (this.internalMinVal > this.internalMaxVal) {\n this.internalMinVal = this.internalMaxVal;\n }\n\n // Sincronizza le prop se erano indefinite\n this.minVal = this.internalMinVal;\n this.maxVal = this.internalMaxVal;\n }\n\n private validateValue(val: number, type: 'min' | 'max'): number {\n const defaultVal = type === 'min' ? this.min : this.max;\n if (val === undefined || val === null) return defaultVal;\n if (val < this.min) return this.min;\n if (val > this.max) return this.max;\n return val;\n }\n\n private handleMinInput = (event: Event) => {\n const input = event.target as HTMLInputElement;\n let newMinVal = parseInt(input.value, 10);\n\n if (newMinVal > this.internalMaxVal - MIN_GAP) {\n newMinVal = this.internalMaxVal - MIN_GAP;\n input.value = newMinVal.toString();\n }\n this.internalMinVal = newMinVal;\n };\n\n private handleMaxInput = (event: Event) => {\n const input = event.target as HTMLInputElement;\n let newMaxVal = parseInt(input.value, 10);\n\n if (newMaxVal < this.internalMinVal + MIN_GAP) {\n newMaxVal = this.internalMinVal + MIN_GAP;\n input.value = newMaxVal.toString();\n }\n this.internalMaxVal = newMaxVal;\n };\n\n private handleCommit = () => {\n // Sincronizza le prop con lo stato interno prima di emettere l'evento\n this.minVal = this.internalMinVal;\n this.maxVal = this.internalMaxVal;\n\n this.filterChange.emit({\n name: this.name,\n values: [this.minVal, this.maxVal],\n });\n };\n\n private getFillStyle() {\n const range = this.max - this.min;\n if (range === 0) return { left: '0%', width: '0%' };\n\n const leftPercent = ((this.internalMinVal - this.min) / range) * 100;\n const rightPercent = ((this.internalMaxVal - this.min) / range) * 100;\n return { left: `${leftPercent}%`, width: `${rightPercent - leftPercent}%` };\n }\n\n @Method()\n async getValues(): Promise<number[]> {\n return [this.internalMinVal, this.internalMaxVal];\n }\n\n render() {\n return (\n <Host class={{ 'is-disabled': this.disabled }}>\n <div class=\"label-container\">\n <label class=\"label-min\">\n {this.labelMinBefore} {this.internalMinVal}{this.labelMinAfter}\n </label>\n <label class=\"label-max\">\n {this.labelMaxBefore} {this.internalMaxVal}{this.labelMaxAfter}\n </label>\n </div>\n <div class=\"slider-container\">\n <div class=\"slider-track\"></div>\n <div class=\"slider-fill\" style={this.getFillStyle()}></div>\n <input\n type=\"range\"\n min={this.min}\n max={this.max}\n step={this.step}\n value={this.internalMinVal}\n onInput={this.handleMinInput}\n onChange={this.handleCommit}\n disabled={this.disabled}\n class=\"range-input\"\n aria-label={this.labelMinBefore}\n />\n <input\n type=\"range\"\n min={this.min}\n max={this.max}\n step={this.step}\n value={this.internalMaxVal}\n onInput={this.handleMaxInput}\n onChange={this.handleCommit}\n disabled={this.disabled}\n class=\"range-input\"\n aria-label={this.labelMaxBefore}\n />\n </div>\n </Host>\n );\n }\n}"],"version":3}
|
package/dist/esm/loader.js
CHANGED
|
@@ -5,7 +5,7 @@ import { g as globalScripts } from './app-globals-0f993ce5.js';
|
|
|
5
5
|
const defineCustomElements = async (win, options) => {
|
|
6
6
|
if (typeof window === 'undefined') return undefined;
|
|
7
7
|
await globalScripts();
|
|
8
|
-
return bootstrapLazy([["jump-card-ecommerce",[[1,"jump-card-ecommerce",{"onlyIconButton":[4,"only-icon-button"],"hasBackground":[4,"has-background"],"badge":[1],"favorite":[1540],"hasFavorite":[4,"has-favorite"],"hasSlotForFavorite":[4,"has-slot-for-favorite"],"hasSlotAddToCart":[4,"has-slot-add-to-cart"],"link":[1],"img":[1],"imgAlt":[1,"img-alt"],"hoverImg":[1,"hover-img"],"hoverImgAlt":[1,"hover-img-alt"],"videoSrc":[1,"video-src"],"notificationUrl":[1,"notification-url"],"notificationText":[1,"notification-text"],"productName":[1,"product-name"],"subtitle":[1],"productId":[1,"product-id"],"price":[2],"salePrice":[2,"sale-price"],"currency":[1],"addToCartColor":[1,"add-to-cart-color"],"badgeColor":[1,"badge-color"],"outOfStock":[1540,"out-of-stock"],"outOfStockText":[1,"out-of-stock-text"],"addToCartText":[1,"add-to-cart-text"],"waitingListText":[1,"waiting-list-text"],"addToWaitingList":[4,"add-to-waiting-list"],"isMini":[4,"is-mini"],"addedToCart":[4,"added-to-cart"],"endAddedToCart":[4,"end-added-to-cart"],"variations":[32],"selectedVariation":[32],"priceFormatted":[32],"salePriceFormatted":[32],"setPrice":[64]},[[0,"jump-card-ecommerce-option-connected","addOption"]]]]],["jump-filter",[[1,"jump-filter",{"direction":[1],"filterHeading":[1,"filter-heading"],"filterButtonLabel":[1,"filter-button-label"],"filterButtonIcon":[1,"filter-button-icon"],"mobileThreshold":[2,"mobile-threshold"],"filters":[8],"showCount":[4,"show-count"],"offCanvasOverlay":[4,"off-canvas-overlay"],"activeFilters":[32],"showMobileFilters":[32],"isMobile":[32],"offCanvasClasses":[32],"getFilters":[64]},[[0,"jump-filterchange","filterChangeHandler"],[9,"resize","handleResize"]],{"showMobileFilters":["watchHandler"]}]]],["jump-filtergroup",[[1,"jump-filtergroup",{"name":[1],"heading":[1],"otherLabel":[1,"other-label"],"lessLabel":[1,"less-label"],"maxElements":[2,"max-elements"],"variant":[1],"label":[32],"values":[32],"value":[32],"slotItems":[32],"inputs":[32],"showMore":[32],"getValues":[64],"getActiveAmount":[64],"getInputs":[64],"getName":[64]},null,{"showMore":["watchShowMore"]}]]],["jump-navbar",[[1,"jump-navbar",{"logo":[16],"navItems":[16],"secondaryNavItems":[16],"mobileThreshold":[2,"mobile-threshold"],"type":[1],"navPosition":[1,"nav-position"],"megaMenuAlignment":[1,"mega-menu-alignment"],"sticky":[4],"stickyThreshold":[2,"sticky-threshold"],"mobileLogo":[16],"user":[16],"isMobile":[32]},[[9,"resize","handleResize"]]]]],["jump-pagination",[[1,"jump-pagination",{"pagLabel":[1,"pag-label"],"last":[2],"showFirstAndLast":[4,"show-first-and-last"],"current":[32]},null,{"current":["watchcurrent"]}]]],["jump-pagination-table",[[0,"jump-pagination-table",{"elementsRanges":[1,"elements-ranges"],"elPerPage":[2,"el-per-page"],"pagLabel":[513,"pag-label"],"labelElementsPerPage":[513,"label-elements-per-page"],"total":[514],"first":[514],"last":[514],"showFirstAndLast":[516,"show-first-and-last"],"elementsRangesArray":[32]},null,{"elementsRanges":["elementsRangesChanged"],"elPerPage":["elPerPageChanged"]}]]],["jump-quantity",[[65,"jump-quantity",{"min":[2],"max":[2],"step":[2],"label":[1],"type":[1],"variant":[1],"showButtons":[4,"show-buttons"],"value":[2],"internalValue":[32],"getValue":[64],"setMax":[64],"reset":[64]},null,{"value":["onValueChange"]}]]],["jump-search-bar",[[1,"jump-search-bar",{"searchValue":[1025,"search-value"],"placeholder":[1],"noResultText":[1,"no-result-text"],"loadingText":[1,"loading-text"],"resultsText":[1,"results-text"],"showAllResText":[1,"show-all-res-text"],"identifier":[1],"debounceTime":[2,"debounce-time"],"variant":[1],"withBtn":[4,"with-btn"],"recentsTitle":[1,"recents-title"],"recents":[16],"results":[16],"dropdown":[4],"linearIconOnly":[4,"linear-icon-only"],"dropdownPosition":[1,"dropdown-position"],"dropdownVisible":[32],"resType":[32],"innerResults":[32],"totalResults":[32],"isExpanded":[32],"setResults":[64]},[[0,"jump-search-bar-dropdown-item-connected","addOption"]],{"searchValue":["searchValueChanged"]}]]],["jump-search-bar-mobile",[[1,"jump-search-bar-mobile",{"identifier":[1],"placeholder":[1],"recents":[16],"recentsTitle":[1,"recents-title"],"debounceTime":[2,"debounce-time"],"loadingText":[1,"loading-text"],"noResultText":[1,"no-result-text"],"results":[16],"resultsText":[1,"results-text"],"showAllResText":[1,"show-all-res-text"],"isOpen":[32],"innerResults":[32],"totalResults":[32],"resType":[32],"searchValue":[32],"setResults":[64]},[[0,"jump-search-bar-dropdown-item-connected","addOption"]],{"searchValue":["searchValueChanged"]}]]],["jump-accordion",[[1,"jump-accordion",{"variant":[1],"summary":[1],"disabled":[4],"open":[516],"icon":[1],"identifier":[1]},[[0,"sl-show","handleShow"]]]]],["jump-side-cart-example",[[1,"jump-side-cart-example",{"isCartOpen":[32],"position":[32],"cartItems":[32]}]]],["jump-tab-item",[[1,"jump-tab-item",{"identifier":[1],"iconName":[1,"icon-name"],"iconPosition":[1,"icon-position"],"label":[1],"active":[4],"disabled":[4],"variant":[32]}]]],["jump-accordion-group",[[1,"jump-accordion-group",{"variant":[1],"groupIdentifier":[1,"group-identifier"]}]]],["jump-card",[[4,"jump-card",{"horizontal":[4],"dark":[4],"shadow":[4],"border":[4],"borderRadius":[4,"border-radius"],"topBorderContentRadius":[4,"top-border-content-radius"],"boxed":[4],"roundedMedia":[4,"rounded-media"],"imgSrc":[1,"img-src"],"imgAlt":[1,"img-alt"],"videoSrc":[1,"video-src"]}]]],["jump-card-ecommerce-option",[[1,"jump-card-ecommerce-option",{"code":[1],"imgUrl":[1,"img-url"],"label":[1],"sku":[1],"taxonomy":[1]}]]],["jump-filter-checkbox",[[1,"jump-filter-checkbox",{"value":[1],"label":[1],"checked":[516],"count":[8],"isChecked":[64]}]]],["jump-filter-range",[[1,"jump-filter-range",{"name":[1],"labelMinBefore":[1,"label-min-before"],"labelMinAfter":[1,"label-min-after"],"labelMaxBefore":[1,"label-max-before"],"labelMaxAfter":[1,"label-max-after"],"min":[2],"max":[2],"step":[2],"
|
|
8
|
+
return bootstrapLazy([["jump-card-ecommerce",[[1,"jump-card-ecommerce",{"onlyIconButton":[4,"only-icon-button"],"hasBackground":[4,"has-background"],"badge":[1],"favorite":[1540],"hasFavorite":[4,"has-favorite"],"hasSlotForFavorite":[4,"has-slot-for-favorite"],"hasSlotAddToCart":[4,"has-slot-add-to-cart"],"link":[1],"img":[1],"imgAlt":[1,"img-alt"],"hoverImg":[1,"hover-img"],"hoverImgAlt":[1,"hover-img-alt"],"videoSrc":[1,"video-src"],"notificationUrl":[1,"notification-url"],"notificationText":[1,"notification-text"],"productName":[1,"product-name"],"subtitle":[1],"productId":[1,"product-id"],"price":[2],"salePrice":[2,"sale-price"],"currency":[1],"addToCartColor":[1,"add-to-cart-color"],"badgeColor":[1,"badge-color"],"outOfStock":[1540,"out-of-stock"],"outOfStockText":[1,"out-of-stock-text"],"addToCartText":[1,"add-to-cart-text"],"waitingListText":[1,"waiting-list-text"],"addToWaitingList":[4,"add-to-waiting-list"],"isMini":[4,"is-mini"],"addedToCart":[4,"added-to-cart"],"endAddedToCart":[4,"end-added-to-cart"],"variations":[32],"selectedVariation":[32],"priceFormatted":[32],"salePriceFormatted":[32],"setPrice":[64]},[[0,"jump-card-ecommerce-option-connected","addOption"]]]]],["jump-filter",[[1,"jump-filter",{"direction":[1],"filterHeading":[1,"filter-heading"],"filterButtonLabel":[1,"filter-button-label"],"filterButtonIcon":[1,"filter-button-icon"],"mobileThreshold":[2,"mobile-threshold"],"filters":[8],"showCount":[4,"show-count"],"offCanvasOverlay":[4,"off-canvas-overlay"],"activeFilters":[32],"showMobileFilters":[32],"isMobile":[32],"offCanvasClasses":[32],"getFilters":[64]},[[0,"jump-filterchange","filterChangeHandler"],[9,"resize","handleResize"]],{"showMobileFilters":["watchHandler"]}]]],["jump-filtergroup",[[1,"jump-filtergroup",{"name":[1],"heading":[1],"otherLabel":[1,"other-label"],"lessLabel":[1,"less-label"],"maxElements":[2,"max-elements"],"variant":[1],"label":[32],"values":[32],"value":[32],"slotItems":[32],"inputs":[32],"showMore":[32],"getValues":[64],"getActiveAmount":[64],"getInputs":[64],"getName":[64]},null,{"showMore":["watchShowMore"]}]]],["jump-navbar",[[1,"jump-navbar",{"logo":[16],"navItems":[16],"secondaryNavItems":[16],"mobileThreshold":[2,"mobile-threshold"],"type":[1],"navPosition":[1,"nav-position"],"megaMenuAlignment":[1,"mega-menu-alignment"],"sticky":[4],"stickyThreshold":[2,"sticky-threshold"],"mobileLogo":[16],"user":[16],"isMobile":[32]},[[9,"resize","handleResize"]]]]],["jump-pagination",[[1,"jump-pagination",{"pagLabel":[1,"pag-label"],"last":[2],"showFirstAndLast":[4,"show-first-and-last"],"current":[32]},null,{"current":["watchcurrent"]}]]],["jump-pagination-table",[[0,"jump-pagination-table",{"elementsRanges":[1,"elements-ranges"],"elPerPage":[2,"el-per-page"],"pagLabel":[513,"pag-label"],"labelElementsPerPage":[513,"label-elements-per-page"],"total":[514],"first":[514],"last":[514],"showFirstAndLast":[516,"show-first-and-last"],"elementsRangesArray":[32]},null,{"elementsRanges":["elementsRangesChanged"],"elPerPage":["elPerPageChanged"]}]]],["jump-quantity",[[65,"jump-quantity",{"min":[2],"max":[2],"step":[2],"label":[1],"type":[1],"variant":[1],"showButtons":[4,"show-buttons"],"value":[2],"internalValue":[32],"getValue":[64],"setMax":[64],"reset":[64]},null,{"value":["onValueChange"]}]]],["jump-search-bar",[[1,"jump-search-bar",{"searchValue":[1025,"search-value"],"placeholder":[1],"noResultText":[1,"no-result-text"],"loadingText":[1,"loading-text"],"resultsText":[1,"results-text"],"showAllResText":[1,"show-all-res-text"],"identifier":[1],"debounceTime":[2,"debounce-time"],"variant":[1],"withBtn":[4,"with-btn"],"recentsTitle":[1,"recents-title"],"recents":[16],"results":[16],"dropdown":[4],"linearIconOnly":[4,"linear-icon-only"],"dropdownPosition":[1,"dropdown-position"],"dropdownVisible":[32],"resType":[32],"innerResults":[32],"totalResults":[32],"isExpanded":[32],"setResults":[64]},[[0,"jump-search-bar-dropdown-item-connected","addOption"]],{"searchValue":["searchValueChanged"]}]]],["jump-search-bar-mobile",[[1,"jump-search-bar-mobile",{"identifier":[1],"placeholder":[1],"recents":[16],"recentsTitle":[1,"recents-title"],"debounceTime":[2,"debounce-time"],"loadingText":[1,"loading-text"],"noResultText":[1,"no-result-text"],"results":[16],"resultsText":[1,"results-text"],"showAllResText":[1,"show-all-res-text"],"isOpen":[32],"innerResults":[32],"totalResults":[32],"resType":[32],"searchValue":[32],"setResults":[64]},[[0,"jump-search-bar-dropdown-item-connected","addOption"]],{"searchValue":["searchValueChanged"]}]]],["jump-accordion",[[1,"jump-accordion",{"variant":[1],"summary":[1],"disabled":[4],"open":[516],"icon":[1],"identifier":[1]},[[0,"sl-show","handleShow"]]]]],["jump-side-cart-example",[[1,"jump-side-cart-example",{"isCartOpen":[32],"position":[32],"cartItems":[32]}]]],["jump-tab-item",[[1,"jump-tab-item",{"identifier":[1],"iconName":[1,"icon-name"],"iconPosition":[1,"icon-position"],"label":[1],"active":[4],"disabled":[4],"variant":[32]}]]],["jump-accordion-group",[[1,"jump-accordion-group",{"variant":[1],"groupIdentifier":[1,"group-identifier"]}]]],["jump-card",[[4,"jump-card",{"horizontal":[4],"dark":[4],"shadow":[4],"border":[4],"borderRadius":[4,"border-radius"],"topBorderContentRadius":[4,"top-border-content-radius"],"boxed":[4],"roundedMedia":[4,"rounded-media"],"imgSrc":[1,"img-src"],"imgAlt":[1,"img-alt"],"videoSrc":[1,"video-src"]}]]],["jump-card-ecommerce-option",[[1,"jump-card-ecommerce-option",{"code":[1],"imgUrl":[1,"img-url"],"label":[1],"sku":[1],"taxonomy":[1]}]]],["jump-filter-checkbox",[[1,"jump-filter-checkbox",{"value":[1],"label":[1],"checked":[516],"count":[8],"isChecked":[64]}]]],["jump-filter-range",[[1,"jump-filter-range",{"name":[1],"labelMinBefore":[1,"label-min-before"],"labelMinAfter":[1,"label-min-after"],"labelMaxBefore":[1,"label-max-before"],"labelMaxAfter":[1,"label-max-after"],"min":[2],"max":[2],"step":[2],"minVal":[2,"min-val"],"maxVal":[2,"max-val"],"disabled":[516],"internalMinVal":[32],"internalMaxVal":[32],"getValues":[64]},null,{"minVal":["watchMinVal"],"maxVal":["watchMaxVal"]}]]],["jump-filter-select",[[1,"jump-filter-select",{"value":[1537],"placeholder":[1],"label":[1],"name":[1],"options":[1],"disabled":[516],"multiple":[4],"required":[4],"loading":[4],"open":[32],"values":[32],"getSelectedValue":[64],"getSelectedOption":[64],"getValues":[64],"getName":[64],"setValue":[64]}]]],["jump-filter-switch",[[1,"jump-filter-switch",{"value":[1],"label":[1],"name":[1],"checked":[1540],"disabled":[516],"values":[32],"setValue":[64],"isChecked":[64],"getValues":[64],"getName":[64]},null,{"checked":["checkedChanged"]}]]],["jump-search-bar-dropdown-item",[[1,"jump-search-bar-dropdown-item",{"value":[1],"img":[1],"href":[1],"details":[32]}]]],["jump-tab",[[1,"jump-tab",{"disabled":[4],"alignment":[1],"fullBorder":[4,"full-border"],"tabGroupName":[1,"tab-group-name"],"variant":[1]},[[0,"jump-change-active-tab","changeActiveTabHandler"]]]]],["jump-tab-panel",[[1,"jump-tab-panel",{"identifier":[1],"active":[4]}]]],["jump-side-cart",[[1,"jump-side-cart",{"isOpen":[4,"is-open"],"position":[1],"items":[16],"discountThreshold":[16],"freeShippingThreshold":[2,"free-shipping-threshold"],"progressPercentage":[2,"progress-percentage"],"checkoutLabel":[1,"checkout-label"],"viewCartLabel":[1,"view-cart-label"],"shippingInfo":[1,"shipping-info"],"cartItems":[32]}]]],["jump-badge",[[1,"jump-badge",{"label":[1],"variant":[513],"dimension":[513],"soft":[516],"outline":[516]}]]],["jump-button_2",[[1,"jump-button",{"disabled":[4],"variant":[1],"outline":[4],"size":[1],"full":[4],"pill":[4],"text":[4],"onlyIcon":[4,"only-icon"],"href":[1],"target":[1],"type":[1],"name":[1],"value":[1],"ariaLabel":[1,"aria-label"],"class":[1],"buttonId":[1,"button-id"]}],[1,"jump-icon",{"class":[1],"library":[1],"name":[1],"category":[1],"size":[1],"label":[1],"src":[1]}]]]], options);
|
|
9
9
|
};
|
|
10
10
|
|
|
11
11
|
export { defineCustomElements };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as e,b as
|
|
1
|
+
import{p as e,b as a}from"./p-98d5dd1f.js";export{s as setNonce}from"./p-98d5dd1f.js";import{g as t}from"./p-e1255160.js";var l=()=>{const a=import.meta.url;const t={};if(a!==""){t.resourcesUrl=new URL(".",a).href}return e(t)};l().then((async e=>{await t();return a([["p-7ac9382b",[[1,"jump-card-ecommerce",{onlyIconButton:[4,"only-icon-button"],hasBackground:[4,"has-background"],badge:[1],favorite:[1540],hasFavorite:[4,"has-favorite"],hasSlotForFavorite:[4,"has-slot-for-favorite"],hasSlotAddToCart:[4,"has-slot-add-to-cart"],link:[1],img:[1],imgAlt:[1,"img-alt"],hoverImg:[1,"hover-img"],hoverImgAlt:[1,"hover-img-alt"],videoSrc:[1,"video-src"],notificationUrl:[1,"notification-url"],notificationText:[1,"notification-text"],productName:[1,"product-name"],subtitle:[1],productId:[1,"product-id"],price:[2],salePrice:[2,"sale-price"],currency:[1],addToCartColor:[1,"add-to-cart-color"],badgeColor:[1,"badge-color"],outOfStock:[1540,"out-of-stock"],outOfStockText:[1,"out-of-stock-text"],addToCartText:[1,"add-to-cart-text"],waitingListText:[1,"waiting-list-text"],addToWaitingList:[4,"add-to-waiting-list"],isMini:[4,"is-mini"],addedToCart:[4,"added-to-cart"],endAddedToCart:[4,"end-added-to-cart"],variations:[32],selectedVariation:[32],priceFormatted:[32],salePriceFormatted:[32],setPrice:[64]},[[0,"jump-card-ecommerce-option-connected","addOption"]]]]],["p-cdc5daf7",[[1,"jump-filter",{direction:[1],filterHeading:[1,"filter-heading"],filterButtonLabel:[1,"filter-button-label"],filterButtonIcon:[1,"filter-button-icon"],mobileThreshold:[2,"mobile-threshold"],filters:[8],showCount:[4,"show-count"],offCanvasOverlay:[4,"off-canvas-overlay"],activeFilters:[32],showMobileFilters:[32],isMobile:[32],offCanvasClasses:[32],getFilters:[64]},[[0,"jump-filterchange","filterChangeHandler"],[9,"resize","handleResize"]],{showMobileFilters:["watchHandler"]}]]],["p-0140b32c",[[1,"jump-filtergroup",{name:[1],heading:[1],otherLabel:[1,"other-label"],lessLabel:[1,"less-label"],maxElements:[2,"max-elements"],variant:[1],label:[32],values:[32],value:[32],slotItems:[32],inputs:[32],showMore:[32],getValues:[64],getActiveAmount:[64],getInputs:[64],getName:[64]},null,{showMore:["watchShowMore"]}]]],["p-bb18f919",[[1,"jump-navbar",{logo:[16],navItems:[16],secondaryNavItems:[16],mobileThreshold:[2,"mobile-threshold"],type:[1],navPosition:[1,"nav-position"],megaMenuAlignment:[1,"mega-menu-alignment"],sticky:[4],stickyThreshold:[2,"sticky-threshold"],mobileLogo:[16],user:[16],isMobile:[32]},[[9,"resize","handleResize"]]]]],["p-f36de1a8",[[1,"jump-pagination",{pagLabel:[1,"pag-label"],last:[2],showFirstAndLast:[4,"show-first-and-last"],current:[32]},null,{current:["watchcurrent"]}]]],["p-629835ac",[[0,"jump-pagination-table",{elementsRanges:[1,"elements-ranges"],elPerPage:[2,"el-per-page"],pagLabel:[513,"pag-label"],labelElementsPerPage:[513,"label-elements-per-page"],total:[514],first:[514],last:[514],showFirstAndLast:[516,"show-first-and-last"],elementsRangesArray:[32]},null,{elementsRanges:["elementsRangesChanged"],elPerPage:["elPerPageChanged"]}]]],["p-1ef1fc5c",[[65,"jump-quantity",{min:[2],max:[2],step:[2],label:[1],type:[1],variant:[1],showButtons:[4,"show-buttons"],value:[2],internalValue:[32],getValue:[64],setMax:[64],reset:[64]},null,{value:["onValueChange"]}]]],["p-038a2a14",[[1,"jump-search-bar",{searchValue:[1025,"search-value"],placeholder:[1],noResultText:[1,"no-result-text"],loadingText:[1,"loading-text"],resultsText:[1,"results-text"],showAllResText:[1,"show-all-res-text"],identifier:[1],debounceTime:[2,"debounce-time"],variant:[1],withBtn:[4,"with-btn"],recentsTitle:[1,"recents-title"],recents:[16],results:[16],dropdown:[4],linearIconOnly:[4,"linear-icon-only"],dropdownPosition:[1,"dropdown-position"],dropdownVisible:[32],resType:[32],innerResults:[32],totalResults:[32],isExpanded:[32],setResults:[64]},[[0,"jump-search-bar-dropdown-item-connected","addOption"]],{searchValue:["searchValueChanged"]}]]],["p-6b8fccdb",[[1,"jump-search-bar-mobile",{identifier:[1],placeholder:[1],recents:[16],recentsTitle:[1,"recents-title"],debounceTime:[2,"debounce-time"],loadingText:[1,"loading-text"],noResultText:[1,"no-result-text"],results:[16],resultsText:[1,"results-text"],showAllResText:[1,"show-all-res-text"],isOpen:[32],innerResults:[32],totalResults:[32],resType:[32],searchValue:[32],setResults:[64]},[[0,"jump-search-bar-dropdown-item-connected","addOption"]],{searchValue:["searchValueChanged"]}]]],["p-b3765945",[[1,"jump-accordion",{variant:[1],summary:[1],disabled:[4],open:[516],icon:[1],identifier:[1]},[[0,"sl-show","handleShow"]]]]],["p-ff62e250",[[1,"jump-side-cart-example",{isCartOpen:[32],position:[32],cartItems:[32]}]]],["p-264fa972",[[1,"jump-tab-item",{identifier:[1],iconName:[1,"icon-name"],iconPosition:[1,"icon-position"],label:[1],active:[4],disabled:[4],variant:[32]}]]],["p-bd692b1f",[[1,"jump-accordion-group",{variant:[1],groupIdentifier:[1,"group-identifier"]}]]],["p-6905cee4",[[4,"jump-card",{horizontal:[4],dark:[4],shadow:[4],border:[4],borderRadius:[4,"border-radius"],topBorderContentRadius:[4,"top-border-content-radius"],boxed:[4],roundedMedia:[4,"rounded-media"],imgSrc:[1,"img-src"],imgAlt:[1,"img-alt"],videoSrc:[1,"video-src"]}]]],["p-87903fff",[[1,"jump-card-ecommerce-option",{code:[1],imgUrl:[1,"img-url"],label:[1],sku:[1],taxonomy:[1]}]]],["p-0d86819c",[[1,"jump-filter-checkbox",{value:[1],label:[1],checked:[516],count:[8],isChecked:[64]}]]],["p-e30da431",[[1,"jump-filter-range",{name:[1],labelMinBefore:[1,"label-min-before"],labelMinAfter:[1,"label-min-after"],labelMaxBefore:[1,"label-max-before"],labelMaxAfter:[1,"label-max-after"],min:[2],max:[2],step:[2],minVal:[2,"min-val"],maxVal:[2,"max-val"],disabled:[516],internalMinVal:[32],internalMaxVal:[32],getValues:[64]},null,{minVal:["watchMinVal"],maxVal:["watchMaxVal"]}]]],["p-55fcebb1",[[1,"jump-filter-select",{value:[1537],placeholder:[1],label:[1],name:[1],options:[1],disabled:[516],multiple:[4],required:[4],loading:[4],open:[32],values:[32],getSelectedValue:[64],getSelectedOption:[64],getValues:[64],getName:[64],setValue:[64]}]]],["p-7e35d9f1",[[1,"jump-filter-switch",{value:[1],label:[1],name:[1],checked:[1540],disabled:[516],values:[32],setValue:[64],isChecked:[64],getValues:[64],getName:[64]},null,{checked:["checkedChanged"]}]]],["p-02ab8fb7",[[1,"jump-search-bar-dropdown-item",{value:[1],img:[1],href:[1],details:[32]}]]],["p-d1fc1ddf",[[1,"jump-tab",{disabled:[4],alignment:[1],fullBorder:[4,"full-border"],tabGroupName:[1,"tab-group-name"],variant:[1]},[[0,"jump-change-active-tab","changeActiveTabHandler"]]]]],["p-d0ea0f54",[[1,"jump-tab-panel",{identifier:[1],active:[4]}]]],["p-421ebb5a",[[1,"jump-side-cart",{isOpen:[4,"is-open"],position:[1],items:[16],discountThreshold:[16],freeShippingThreshold:[2,"free-shipping-threshold"],progressPercentage:[2,"progress-percentage"],checkoutLabel:[1,"checkout-label"],viewCartLabel:[1,"view-cart-label"],shippingInfo:[1,"shipping-info"],cartItems:[32]}]]],["p-6d82feb3",[[1,"jump-badge",{label:[1],variant:[513],dimension:[513],soft:[516],outline:[516]}]]],["p-18c359e3",[[1,"jump-button",{disabled:[4],variant:[1],outline:[4],size:[1],full:[4],pill:[4],text:[4],onlyIcon:[4,"only-icon"],href:[1],target:[1],type:[1],name:[1],value:[1],ariaLabel:[1,"aria-label"],class:[1],buttonId:[1,"button-id"]}],[1,"jump-icon",{class:[1],library:[1],name:[1],category:[1],size:[1],label:[1],src:[1]}]]]],e)}));
|
|
2
2
|
//# sourceMappingURL=jump-design-system.esm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["patchBrowser","importMeta","url","opts","resourcesUrl","URL","href","promiseResolve","then","async","options","globalScripts","bootstrapLazy","onlyIconButton","hasBackground","badge","favorite","hasFavorite","hasSlotForFavorite","hasSlotAddToCart","link","img","imgAlt","hoverImg","hoverImgAlt","videoSrc","notificationUrl","notificationText","productName","subtitle","productId","price","salePrice","currency","addToCartColor","badgeColor","outOfStock","outOfStockText","addToCartText","waitingListText","addToWaitingList","isMini","addedToCart","endAddedToCart","variations","selectedVariation","priceFormatted","salePriceFormatted","setPrice","direction","filterHeading","filterButtonLabel","filterButtonIcon","mobileThreshold","filters","showCount","offCanvasOverlay","activeFilters","showMobileFilters","isMobile","offCanvasClasses","getFilters","name","heading","otherLabel","lessLabel","maxElements","variant","label","values","value","slotItems","inputs","showMore","getValues","getActiveAmount","getInputs","getName","logo","navItems","secondaryNavItems","type","navPosition","megaMenuAlignment","sticky","stickyThreshold","mobileLogo","user","pagLabel","last","showFirstAndLast","current","elementsRanges","elPerPage","labelElementsPerPage","total","first","elementsRangesArray","min","max","step","showButtons","internalValue","getValue","setMax","reset","searchValue","placeholder","noResultText","loadingText","resultsText","showAllResText","identifier","debounceTime","withBtn","recentsTitle","recents","results","dropdown","linearIconOnly","dropdownPosition","dropdownVisible","resType","innerResults","totalResults","isExpanded","setResults","isOpen","summary","disabled","open","icon","isCartOpen","position","cartItems","iconName","iconPosition","active","groupIdentifier","horizontal","dark","shadow","border","borderRadius","topBorderContentRadius","boxed","roundedMedia","imgSrc","code","imgUrl","sku","taxonomy","checked","count","isChecked","labelMinBefore","labelMinAfter","labelMaxBefore","labelMaxAfter","minVal","maxVal","
|
|
1
|
+
{"version":3,"names":["patchBrowser","importMeta","url","opts","resourcesUrl","URL","href","promiseResolve","then","async","options","globalScripts","bootstrapLazy","onlyIconButton","hasBackground","badge","favorite","hasFavorite","hasSlotForFavorite","hasSlotAddToCart","link","img","imgAlt","hoverImg","hoverImgAlt","videoSrc","notificationUrl","notificationText","productName","subtitle","productId","price","salePrice","currency","addToCartColor","badgeColor","outOfStock","outOfStockText","addToCartText","waitingListText","addToWaitingList","isMini","addedToCart","endAddedToCart","variations","selectedVariation","priceFormatted","salePriceFormatted","setPrice","direction","filterHeading","filterButtonLabel","filterButtonIcon","mobileThreshold","filters","showCount","offCanvasOverlay","activeFilters","showMobileFilters","isMobile","offCanvasClasses","getFilters","name","heading","otherLabel","lessLabel","maxElements","variant","label","values","value","slotItems","inputs","showMore","getValues","getActiveAmount","getInputs","getName","logo","navItems","secondaryNavItems","type","navPosition","megaMenuAlignment","sticky","stickyThreshold","mobileLogo","user","pagLabel","last","showFirstAndLast","current","elementsRanges","elPerPage","labelElementsPerPage","total","first","elementsRangesArray","min","max","step","showButtons","internalValue","getValue","setMax","reset","searchValue","placeholder","noResultText","loadingText","resultsText","showAllResText","identifier","debounceTime","withBtn","recentsTitle","recents","results","dropdown","linearIconOnly","dropdownPosition","dropdownVisible","resType","innerResults","totalResults","isExpanded","setResults","isOpen","summary","disabled","open","icon","isCartOpen","position","cartItems","iconName","iconPosition","active","groupIdentifier","horizontal","dark","shadow","border","borderRadius","topBorderContentRadius","boxed","roundedMedia","imgSrc","code","imgUrl","sku","taxonomy","checked","count","isChecked","labelMinBefore","labelMinAfter","labelMaxBefore","labelMaxAfter","minVal","maxVal","internalMinVal","internalMaxVal","multiple","required","loading","getSelectedValue","getSelectedOption","setValue","details","alignment","fullBorder","tabGroupName","items","discountThreshold","freeShippingThreshold","progressPercentage","checkoutLabel","viewCartLabel","shippingInfo","dimension","soft","outline","size","full","pill","text","onlyIcon","target","ariaLabel","class","buttonId","library","category","src"],"sources":["node_modules/@stencil/core/internal/client/patch-browser.js","@lazy-browser-entrypoint?app-data=conditional"],"sourcesContent":["/*\n Stencil Client Patch Browser v4.18.2 | MIT Licensed | https://stenciljs.com\n */\n\n// src/client/client-patch-browser.ts\nimport { BUILD, NAMESPACE } from \"@stencil/core/internal/app-data\";\nimport { consoleDevInfo, doc, H, promiseResolve } from \"@stencil/core\";\nvar patchBrowser = () => {\n if (BUILD.isDev && !BUILD.isTesting) {\n consoleDevInfo(\"Running in development mode.\");\n }\n if (BUILD.cloneNodeFix) {\n patchCloneNodeFix(H.prototype);\n }\n const scriptElm = BUILD.scriptDataOpts ? Array.from(doc.querySelectorAll(\"script\")).find(\n (s) => new RegExp(`/${NAMESPACE}(\\\\.esm)?\\\\.js($|\\\\?|#)`).test(s.src) || s.getAttribute(\"data-stencil-namespace\") === NAMESPACE\n ) : null;\n const importMeta = import.meta.url;\n const opts = BUILD.scriptDataOpts ? (scriptElm || {})[\"data-opts\"] || {} : {};\n if (importMeta !== \"\") {\n opts.resourcesUrl = new URL(\".\", importMeta).href;\n }\n return promiseResolve(opts);\n};\nvar patchCloneNodeFix = (HTMLElementPrototype) => {\n const nativeCloneNodeFn = HTMLElementPrototype.cloneNode;\n HTMLElementPrototype.cloneNode = function(deep) {\n if (this.nodeName === \"TEMPLATE\") {\n return nativeCloneNodeFn.call(this, deep);\n }\n const clonedNode = nativeCloneNodeFn.call(this, false);\n const srcChildNodes = this.childNodes;\n if (deep) {\n for (let i = 0; i < srcChildNodes.length; i++) {\n if (srcChildNodes[i].nodeType !== 2) {\n clonedNode.appendChild(srcChildNodes[i].cloneNode(true));\n }\n }\n }\n return clonedNode;\n };\n};\nexport {\n patchBrowser\n};\n","export { setNonce } from '@stencil/core';\nimport { bootstrapLazy } from '@stencil/core';\nimport { patchBrowser } from '@stencil/core/internal/client/patch-browser';\nimport { globalScripts } from '@stencil/core/internal/app-globals';\npatchBrowser().then(async (options) => {\n await globalScripts();\n return bootstrapLazy([/*!__STENCIL_LAZY_DATA__*/], options);\n});\n"],"mappings":"0HAOA,IAAIA,EAAe,KAUjB,MAAMC,cAAyBC,IAC/B,MAAMC,EAAqE,GAC3E,GAAIF,IAAe,GAAI,CACrBE,EAAKC,aAAe,IAAIC,IAAI,IAAKJ,GAAYK,IACjD,CACE,OAAOC,EAAeJ,EAAK,EClB7BH,IAAeQ,MAAKC,MAAOC,UACnBC,IACN,OAAOC,EAAc,yCAAuC,CAAAC,eAAA,uBAAAC,cAAA,qBAAAC,MAAA,IAAAC,SAAA,OAAAC,YAAA,mBAAAC,mBAAA,4BAAAC,iBAAA,2BAAAC,KAAA,IAAAC,IAAA,IAAAC,OAAA,cAAAC,SAAA,gBAAAC,YAAA,oBAAAC,SAAA,gBAAAC,gBAAA,uBAAAC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AAAmI,SAAA,IAAAV,KAAA,IAAAnH,MAAA,IAAA8H,IAAA,SAAAxL,EAAA"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{r as t,c as e,h as i,H as a,g as s}from"./p-98d5dd1f.js";const r=":host{--jump-range-track-height:4px;--jump-range-thumb-color:var(--neutral-white, #ffffff);--jump-range-thumb-size:18px;--jump-range-fill-color:var(--secondary-standard, #5e79ba);--jump-range-track-color:var(--gray-ultralight, #f8f8f8);display:block;width:100%}:host(.is-disabled){opacity:0.5;cursor:not-allowed;--jump-range-fill-color:var(--gray-light, #e0e0e0)}.label-container{display:flex;justify-content:space-between;margin-bottom:0.75rem;font-size:0.9em;color:#333}.slider-container{position:relative;height:var(--jump-range-thumb-size);display:flex;align-items:center}.slider-track,.slider-fill{position:absolute;left:0;height:var(--jump-range-track-height);border-radius:var(--jump-range-track-height);width:100%}.slider-track{background-color:var(--jump-range-track-color);z-index:1}.slider-fill{background-color:var(--jump-range-fill-color);z-index:2}.range-input{-webkit-appearance:none;-moz-appearance:none;appearance:none;position:absolute;width:100%;height:var(--jump-range-thumb-size);background:transparent;pointer-events:none;margin:0;z-index:3}input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;height:var(--jump-range-thumb-size);width:var(--jump-range-thumb-size);border-radius:50%;background:var(--jump-range-thumb-color);border:1px solid #ccc;cursor:pointer;pointer-events:auto;margin-top:calc((var(--jump-range-thumb-size) - var(--jump-range-track-height)) / -2)}input[type=range]::-moz-range-thumb{-moz-appearance:none;height:var(--jump-range-thumb-size);width:var(--jump-range-thumb-size);border-radius:50%;background:var(--jump-range-thumb-color);border:1px solid #ccc;cursor:pointer;pointer-events:auto}input[type=range]::-webkit-slider-runnable-track{-webkit-appearance:none;height:var(--jump-range-track-height);background:transparent;border:none}input[type=range]::-moz-range-track{-moz-appearance:none;height:var(--jump-range-track-height);background:transparent;border:none}";const n=r;const h=0;const l=class{constructor(i){t(this,i);this.filterChange=e(this,"jump-filterchange",7);this.handleMinInput=t=>{const e=t.target;let i=parseInt(e.value,10);if(i>this.internalMaxVal-h){i=this.internalMaxVal-h;e.value=i.toString()}this.internalMinVal=i};this.handleMaxInput=t=>{const e=t.target;let i=parseInt(e.value,10);if(i<this.internalMinVal+h){i=this.internalMinVal+h;e.value=i.toString()}this.internalMaxVal=i};this.handleCommit=()=>{this.minVal=this.internalMinVal;this.maxVal=this.internalMaxVal;this.filterChange.emit({name:this.name,values:[this.minVal,this.maxVal]})};this.name="range-filter";this.labelMinBefore="Min:";this.labelMinAfter="";this.labelMaxBefore="Max:";this.labelMaxAfter="";this.min=0;this.max=100;this.step=1;this.minVal=undefined;this.maxVal=undefined;this.disabled=false;this.internalMinVal=undefined;this.internalMaxVal=undefined}watchMinVal(t){this.internalMinVal=this.validateValue(t,"min")}watchMaxVal(t){this.internalMaxVal=this.validateValue(t,"max")}componentWillLoad(){this.initializeValues()}initializeValues(){this.internalMinVal=this.validateValue(this.minVal,"min");this.internalMaxVal=this.validateValue(this.maxVal,"max");if(this.internalMinVal>this.internalMaxVal){this.internalMinVal=this.internalMaxVal}this.minVal=this.internalMinVal;this.maxVal=this.internalMaxVal}validateValue(t,e){const i=e==="min"?this.min:this.max;if(t===undefined||t===null)return i;if(t<this.min)return this.min;if(t>this.max)return this.max;return t}getFillStyle(){const t=this.max-this.min;if(t===0)return{left:"0%",width:"0%"};const e=(this.internalMinVal-this.min)/t*100;const i=(this.internalMaxVal-this.min)/t*100;return{left:`${e}%`,width:`${i-e}%`}}async getValues(){return[this.internalMinVal,this.internalMaxVal]}render(){return i(a,{key:"86845857fd074c171e294dc033aa770700401d26",class:{"is-disabled":this.disabled}},i("div",{key:"113c5ed7ef5719a189811785c6e5bf35a4ff8649",class:"label-container"},i("label",{key:"b7415f0d21740dd5b65c1c82746a0f385b1d810f",class:"label-min"},this.labelMinBefore," ",this.internalMinVal,this.labelMinAfter),i("label",{key:"934a8fdff0fc69f0c2a9e6cd404c7df94d79f7ce",class:"label-max"},this.labelMaxBefore," ",this.internalMaxVal,this.labelMaxAfter)),i("div",{key:"71e3c78ba4433bb63d522e34842dcdc91e421100",class:"slider-container"},i("div",{key:"6514105f0f22b475c2a7f210fed6bbb88d5f7148",class:"slider-track"}),i("div",{key:"eb02aaa3b388a51136df71a94e9f0128e35653a1",class:"slider-fill",style:this.getFillStyle()}),i("input",{key:"c11e5cf68251d18d15b46a9fbf2129e33a732e69",type:"range",min:this.min,max:this.max,step:this.step,value:this.internalMinVal,onInput:this.handleMinInput,onChange:this.handleCommit,disabled:this.disabled,class:"range-input","aria-label":this.labelMinBefore}),i("input",{key:"41a5bc8333377c6028894735e60f8e7645c4abf3",type:"range",min:this.min,max:this.max,step:this.step,value:this.internalMaxVal,onInput:this.handleMaxInput,onChange:this.handleCommit,disabled:this.disabled,class:"range-input","aria-label":this.labelMaxBefore})))}get host(){return s(this)}static get watchers(){return{minVal:["watchMinVal"],maxVal:["watchMaxVal"]}}};l.style=n;export{l as jump_filter_range};
|
|
2
|
+
//# sourceMappingURL=p-e30da431.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["jumpFilterRangeCss","JumpFilterRangeStyle0","MIN_GAP","JumpFilterRange","this","handleMinInput","event","input","target","newMinVal","parseInt","value","internalMaxVal","toString","internalMinVal","handleMaxInput","newMaxVal","handleCommit","minVal","maxVal","filterChange","emit","name","values","watchMinVal","newValue","validateValue","watchMaxVal","componentWillLoad","initializeValues","val","type","defaultVal","min","max","undefined","getFillStyle","range","left","width","leftPercent","rightPercent","getValues","render","h","Host","key","class","disabled","labelMinBefore","labelMinAfter","labelMaxBefore","labelMaxAfter","style","step","onInput","onChange"],"sources":["src/components/jump-filter-range/jump-filter-range.scss?tag=jump-filter-range&encapsulation=shadow","src/components/jump-filter-range/jump-filter-range.tsx"],"sourcesContent":[":host {\n --jump-range-track-height: 4px;\n --jump-range-thumb-color: var(--neutral-white, #ffffff);\n --jump-range-thumb-size: 18px;\n --jump-range-fill-color: var(--secondary-standard, #5e79ba);\n --jump-range-track-color: var(--gray-ultralight, #f8f8f8);\n\n display: block;\n width: 100%;\n}\n\n:host(.is-disabled) {\n opacity: 0.5;\n cursor: not-allowed;\n --jump-range-fill-color: var(--gray-light, #e0e0e0);\n}\n\n.label-container {\n display: flex;\n justify-content: space-between;\n margin-bottom: 0.75rem;\n font-size: 0.9em;\n color: #333;\n}\n\n.slider-container {\n position: relative;\n height: var(--jump-range-thumb-size);\n display: flex;\n align-items: center;\n}\n\n// Traccia visiva di background\n.slider-track,\n.slider-fill {\n position: absolute;\n left: 0;\n height: var(--jump-range-track-height);\n border-radius: var(--jump-range-track-height);\n width: 100%;\n}\n\n.slider-track {\n background-color: var(--jump-range-track-color);\n z-index: 1;\n}\n\n.slider-fill {\n background-color: var(--jump-range-fill-color);\n z-index: 2;\n}\n\n// Stili per gli input nativi\n.range-input {\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n position: absolute;\n width: 100%;\n height: var(--jump-range-thumb-size);\n background: transparent;\n pointer-events: none; // Permette di cliccare attraverso l'input\n margin: 0;\n z-index: 3;\n}\n\n// Stili per il selettore (thumb)\n// Il pointer-events qui è fondamentale per rendere solo il thumb cliccabile\ninput[type=\"range\"]::-webkit-slider-thumb {\n -webkit-appearance: none;\n height: var(--jump-range-thumb-size);\n width: var(--jump-range-thumb-size);\n border-radius: 50%;\n background: var(--jump-range-thumb-color);\n border: 1px solid #ccc;\n cursor: pointer;\n pointer-events: auto;\n margin-top: calc((var(--jump-range-thumb-size) - var(--jump-range-track-height)) / -2);\n}\n\ninput[type=\"range\"]::-moz-range-thumb {\n -moz-appearance: none;\n height: var(--jump-range-thumb-size);\n width: var(--jump-range-thumb-size);\n border-radius: 50%;\n background: var(--jump-range-thumb-color);\n border: 1px solid #ccc;\n cursor: pointer;\n pointer-events: auto;\n}\n\n// Rende la traccia nativa dell'input invisibile\ninput[type=\"range\"]::-webkit-slider-runnable-track {\n -webkit-appearance: none;\n height: var(--jump-range-track-height);\n background: transparent;\n border: none;\n}\n\ninput[type=\"range\"]::-moz-range-track {\n -moz-appearance: none;\n height: var(--jump-range-track-height);\n background: transparent;\n border: none;\n}","import { Component, Host, Prop, h, Event, EventEmitter, Method, State, Watch, Element } from '@stencil/core';\n\n// La distanza minima tra i due slider, per evitare che si sovrappongano.\nconst MIN_GAP = 0;\n\n@Component({\n tag: 'jump-filter-range',\n styleUrl: 'jump-filter-range.scss',\n shadow: true,\n})\nexport class JumpFilterRange {\n @Element() host: HTMLElement;\n\n /** Nome identificativo del filtro, utilizzato nell'evento finale. */\n @Prop() name: string = 'range-filter';\n\n /** Testo da mostrare prima del valore minimo. */\n @Prop() labelMinBefore: string = 'Min:';\n /** Testo da mostrare dopo il valore minimo (es. unità di misura). */\n @Prop() labelMinAfter: string = '';\n\n /** Testo da mostrare prima del valore massimo. */\n @Prop() labelMaxBefore: string = 'Max:';\n /** Testo da mostrare dopo il valore massimo (es. unità di misura). */\n @Prop() labelMaxAfter: string = '';\n\n /** Il valore minimo possibile per lo slider. */\n @Prop() min: number = 0;\n /** Il valore massimo possibile per lo slider. */\n @Prop() max: number = 100;\n /** L'incremento tra i valori dello slider. */\n @Prop() step: number = 1;\n\n /** Il valore minimo dello slider. */\n @Prop() minVal: number;\n /** Il valore massimo dello slider. */\n @Prop() maxVal: number;\n\n /** Stato disabilitato dello slider. */\n @Prop({ reflect: true }) disabled: boolean = false;\n\n @State() private internalMinVal: number;\n @State() private internalMaxVal: number;\n\n /**\n * Evento emesso SOLO quando l'utente ha terminato la selezione (al rilascio del mouse).\n */\n @Event({ eventName: 'jump-filterchange' }) filterChange: EventEmitter<{ name: string; values: number[] }>;\n\n @Watch('minVal')\n watchMinVal(newValue: number) {\n this.internalMinVal = this.validateValue(newValue, 'min');\n }\n\n @Watch('maxVal')\n watchMaxVal(newValue: number) {\n this.internalMaxVal = this.validateValue(newValue, 'max');\n }\n\n componentWillLoad() {\n this.initializeValues();\n }\n\n private initializeValues() {\n this.internalMinVal = this.validateValue(this.minVal, 'min');\n this.internalMaxVal = this.validateValue(this.maxVal, 'max');\n\n // Assicura che il valore minimo non superi il massimo\n if (this.internalMinVal > this.internalMaxVal) {\n this.internalMinVal = this.internalMaxVal;\n }\n\n // Sincronizza le prop se erano indefinite\n this.minVal = this.internalMinVal;\n this.maxVal = this.internalMaxVal;\n }\n\n private validateValue(val: number, type: 'min' | 'max'): number {\n const defaultVal = type === 'min' ? this.min : this.max;\n if (val === undefined || val === null) return defaultVal;\n if (val < this.min) return this.min;\n if (val > this.max) return this.max;\n return val;\n }\n\n private handleMinInput = (event: Event) => {\n const input = event.target as HTMLInputElement;\n let newMinVal = parseInt(input.value, 10);\n\n if (newMinVal > this.internalMaxVal - MIN_GAP) {\n newMinVal = this.internalMaxVal - MIN_GAP;\n input.value = newMinVal.toString();\n }\n this.internalMinVal = newMinVal;\n };\n\n private handleMaxInput = (event: Event) => {\n const input = event.target as HTMLInputElement;\n let newMaxVal = parseInt(input.value, 10);\n\n if (newMaxVal < this.internalMinVal + MIN_GAP) {\n newMaxVal = this.internalMinVal + MIN_GAP;\n input.value = newMaxVal.toString();\n }\n this.internalMaxVal = newMaxVal;\n };\n\n private handleCommit = () => {\n // Sincronizza le prop con lo stato interno prima di emettere l'evento\n this.minVal = this.internalMinVal;\n this.maxVal = this.internalMaxVal;\n\n this.filterChange.emit({\n name: this.name,\n values: [this.minVal, this.maxVal],\n });\n };\n\n private getFillStyle() {\n const range = this.max - this.min;\n if (range === 0) return { left: '0%', width: '0%' };\n\n const leftPercent = ((this.internalMinVal - this.min) / range) * 100;\n const rightPercent = ((this.internalMaxVal - this.min) / range) * 100;\n return { left: `${leftPercent}%`, width: `${rightPercent - leftPercent}%` };\n }\n\n @Method()\n async getValues(): Promise<number[]> {\n return [this.internalMinVal, this.internalMaxVal];\n }\n\n render() {\n return (\n <Host class={{ 'is-disabled': this.disabled }}>\n <div class=\"label-container\">\n <label class=\"label-min\">\n {this.labelMinBefore} {this.internalMinVal}{this.labelMinAfter}\n </label>\n <label class=\"label-max\">\n {this.labelMaxBefore} {this.internalMaxVal}{this.labelMaxAfter}\n </label>\n </div>\n <div class=\"slider-container\">\n <div class=\"slider-track\"></div>\n <div class=\"slider-fill\" style={this.getFillStyle()}></div>\n <input\n type=\"range\"\n min={this.min}\n max={this.max}\n step={this.step}\n value={this.internalMinVal}\n onInput={this.handleMinInput}\n onChange={this.handleCommit}\n disabled={this.disabled}\n class=\"range-input\"\n aria-label={this.labelMinBefore}\n />\n <input\n type=\"range\"\n min={this.min}\n max={this.max}\n step={this.step}\n value={this.internalMaxVal}\n onInput={this.handleMaxInput}\n onChange={this.handleCommit}\n disabled={this.disabled}\n class=\"range-input\"\n aria-label={this.labelMaxBefore}\n />\n </div>\n </Host>\n );\n }\n}"],"mappings":"gEAAA,MAAMA,EAAqB,m4DAC3B,MAAAC,EAAeD,ECEf,MAAME,EAAU,E,MAOHC,EAAe,M,yEA2ElBC,KAAAC,eAAkBC,IACxB,MAAMC,EAAQD,EAAME,OACpB,IAAIC,EAAYC,SAASH,EAAMI,MAAO,IAEtC,GAAIF,EAAYL,KAAKQ,eAAiBV,EAAS,CAC7CO,EAAYL,KAAKQ,eAAiBV,EAClCK,EAAMI,MAAQF,EAAUI,U,CAE1BT,KAAKU,eAAiBL,CAAS,EAGzBL,KAAAW,eAAkBT,IACxB,MAAMC,EAAQD,EAAME,OACpB,IAAIQ,EAAYN,SAASH,EAAMI,MAAO,IAEtC,GAAIK,EAAYZ,KAAKU,eAAiBZ,EAAS,CAC7Cc,EAAYZ,KAAKU,eAAiBZ,EAClCK,EAAMI,MAAQK,EAAUH,U,CAE1BT,KAAKQ,eAAiBI,CAAS,EAGzBZ,KAAAa,aAAe,KAErBb,KAAKc,OAASd,KAAKU,eACnBV,KAAKe,OAASf,KAAKQ,eAEnBR,KAAKgB,aAAaC,KAAK,CACrBC,KAAMlB,KAAKkB,KACXC,OAAQ,CAACnB,KAAKc,OAAQd,KAAKe,SAC3B,E,UArGmB,e,oBAGU,O,mBAED,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CAAKC,MAAM,mBACTH,EAAA,SAAAE,IAAA,2CAAOC,MAAM,aACV3C,KAAK6C,eAAc,IAAG7C,KAAKU,eAAgBV,KAAK8C,eAEnDN,EAAA,SAAAE,IAAA,2CAAOC,MAAM,aACV3C,KAAK+C,eAAc,IAAG/C,KAAKQ,eAAgBR,KAAKgD,gBAGrDR,EAAA,OAAAE,IAAA,2CAAKC,MAAM,oBACTH,EAAA,OAAAE,IAAA,2CAAKC,MAAM,iBACXH,EAAA,OAAAE,IAAA,2CAAKC,MAAM,cAAcM,MAAOjD,KAAKgC,iBACrCQ,EAAA,SAAAE,IAAA,2CACEf,KAAK,QACLE,IAAK7B,KAAK6B,IACVC,IAAK9B,KAAK8B,IACVoB,KAAMlD,KAAKkD,KACX3C,MAAOP,KAAKU,eACZyC,QAASnD,KAAKC,eACdmD,SAAUpD,KAAKa,aACf+B,SAAU5C,KAAK4C,SACfD,MAAM,cAAa,aACP3C,KAAK6C,iBAEnBL,EAAA,SAAAE,IAAA,2CACEf,KAAK,QACLE,IAAK7B,KAAK6B,IACVC,IAAK9B,KAAK8B,IACVoB,KAAMlD,KAAKkD,KACX3C,MAAOP,KAAKQ,eACZ2C,QAASnD,KAAKW,eACdyC,SAAUpD,KAAKa,aACf+B,SAAU5C,KAAK4C,SACfD,MAAM,cAAa,aACP3C,KAAK+C,kB"}
|
|
@@ -616,10 +616,18 @@
|
|
|
616
616
|
"name": "max",
|
|
617
617
|
"description": "Il valore massimo possibile per lo slider."
|
|
618
618
|
},
|
|
619
|
+
{
|
|
620
|
+
"name": "max-val",
|
|
621
|
+
"description": "Il valore massimo dello slider."
|
|
622
|
+
},
|
|
619
623
|
{
|
|
620
624
|
"name": "min",
|
|
621
625
|
"description": "Il valore minimo possibile per lo slider."
|
|
622
626
|
},
|
|
627
|
+
{
|
|
628
|
+
"name": "min-val",
|
|
629
|
+
"description": "Il valore minimo dello slider."
|
|
630
|
+
},
|
|
623
631
|
{
|
|
624
632
|
"name": "name",
|
|
625
633
|
"description": "Nome identificativo del filtro, utilizzato nell'evento finale."
|