@jumpgroup/jump-design-system 0.3.74 → 0.3.75
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-search-bar.cjs.entry.js +1 -1
- package/dist/cjs/jump-search-bar.cjs.entry.js.map +1 -1
- package/dist/collection/components/jump-search-bar/jump-search-bar.js +1 -1
- package/dist/collection/components/jump-search-bar/jump-search-bar.js.map +1 -1
- package/dist/components/jump-search-bar.js +1 -1
- package/dist/components/jump-search-bar.js.map +1 -1
- package/dist/esm/jump-search-bar.entry.js +1 -1
- package/dist/esm/jump-search-bar.entry.js.map +1 -1
- package/dist/jump-design-system/jump-design-system.esm.js +1 -1
- package/dist/jump-design-system/p-1feed0e9.entry.js +2 -0
- package/dist/jump-design-system/p-1feed0e9.entry.js.map +1 -0
- package/package.json +1 -1
- package/dist/jump-design-system/p-5f0b2e2b.entry.js +0 -2
- package/dist/jump-design-system/p-5f0b2e2b.entry.js.map +0 -1
|
@@ -37,7 +37,7 @@ const JumpSearchBar = class {
|
|
|
37
37
|
this.resType = 'results';
|
|
38
38
|
this.innerResults = undefined;
|
|
39
39
|
this.search.emit({ search: this.searchValue });
|
|
40
|
-
this.searchFilters.emit({ search: this.searchValue });
|
|
40
|
+
this.searchFilters.emit({ name: 'search', value: this.searchValue });
|
|
41
41
|
// Se il dropdown è chiuso, aprilo. Potrebbe essere chiuso perchè non ci sono recenti
|
|
42
42
|
if (!this.dropdownVisible) {
|
|
43
43
|
this.dropdownVisible = true;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"jump-search-bar.entry.cjs.js","mappings":";;;;;;AAAA,MAAM,gBAAgB,GAAG,iyHAAiyH,CAAC;AAC3zH,4BAAe,gBAAgB;;MCMlB,aAAa;;;;;;;;;QA+GxB,gBAAW,GAAG;YACZ,MAAM,kBAAkB,GAAG,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;YACpE,IAAI,kBA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qBAAqB,EAAE,EAAE,MAAM,EAAC,QAAQ,SAAG,IAAI,CAAC,cAAc,MAAgB,EACpJ,IAAI,CAAC,YAAY,IAAIA,qBAAM,IAAI,CAAC,YAAY,OAAG,IAAI,CAAC,WAAW,CAAO,CACnE,CAEJ,CACF,CAEJ,CAAA;KACT;IAED,MAAM;QACJ,IAAI,IAAI,CAAC,OAAO,KAAK,QAAQ,IAAI,IAAI,CAAC,cAAc,EAAE;YACpD,OAAO,IAAI,CAAC,oBAAoB,EAAE,CAAC;SACpC;aAAM;YACL,OAAO,IAAI,CAAC,aAAa,EAAE,CAAC;SAC7B;KACF;;;;;;;;;","names":["h","Host"],"sources":["src/components/jump-search-bar/jump-search-bar.scss?tag=jump-search-bar&encapsulation=shadow","src/components/jump-search-bar/jump-search-bar.tsx"],"sourcesContent":[":host {\n display: block;\n\n --jump-search-bar-focus-color: var(--secondary-standard, #5E79BA);\n --jump-search-bar-border-color: var(--neutral-grey-secondary, #707070);\n --jump-search-bar-bg-color: var(--gray-ultralight, #F8F8F8);\n --jump-search-bar-dropdown-border-color: var(--neutral-grey-disabled, #CBCBCB);\n\n font-family: var(--ff-primary);\n\n jump-button {\n --jump-button-border-radius: 0px 3px 3px 0px;\n }\n\n .SearchBar {\n position: relative;\n\n &.focused .InputWrapper {\n border-color: var(--jump-search-bar-focus-color) !important;\n \n jump-icon {\n color: var(--jump-search-bar-focus-color) !important;\n }\n \n input {\n outline: none !important;\n }\n }\n }\n\n .SearchBar:not(.iconOnly) {\n display: flex;\n width: 100%;\n \n .InputWrapper {\n width: 100%;\n display: flex;\n }\n \n input {\n width: 100%;\n border: none;\n }\n \n /* Stile outline*/\n &.outline .InputWrapper {\n border: 1px solid var(--jump-search-bar-border-color);\n border-radius: 3px;\n padding: 12px;\n gap: 8px;\n \n jump-icon {\n color: var(--jump-search-bar-border-color);\n }\n }\n \n &.outline.withBtn .InputWrapper {\n border-radius: 3px 0px 0px 3px;\n }\n \n \n /* Stile filled */\n &.filled .InputWrapper {\n border: 1px solid var(--jump-search-bar-bg-color);\n background-color: var(--jump-search-bar-bg-color);\n border-radius: 3px;\n padding: 12px;\n gap: 8px;\n \n input {\n background-color: var(--jump-search-bar-bg-color);\n }\n \n jump-icon {\n color: var(--jump-search-bar-border-color);\n }\n }\n \n &.filled.focused.withBtn .InputWrapper {\n border-radius: 3px 0px 0px 3px !important;\n }\n \n /* Stile linear */\n &.linear .InputWrapper {\n border-bottom: 1px solid var(--jump-search-bar-border-color);\n padding-bottom: 4px;\n \n jump-icon {\n padding-right: 6px;\n }\n }\n }\n \n \n .Dropdown {\n\n &.dropAbsolute {\n position: absolute;\n box-sizing: border-box;\n position: absolute;\n left: 0;\n width: 100%;\n }\n\n &.dropRelative {\n position: relative;\n }\n\n // position: absolute; la tolgo per il test\n margin-top: 10px;\n border-radius: 3px;\n border: 1px solid var(--jump-search-bar-dropdown-border-color);\n padding: 4px 16px;\n background-color: white;\n\n &__Recents {\n .title {\n color: #707070;\n font-size: 14px;\n line-height: 20px;\n padding: 8px 0;\n font-weight: 700;\n display: flex;\n }\n }\n\n &__Results {\n .totalRes {\n display: flex; \n justify-content: space-between;\n }\n }\n \n\n .ResWrapper {\n display: flex;\n flex-direction: column;\n\n div {\n padding: 8px 0;\n color: #707070;\n font-size: 14px;\n display: flex;\n gap: 12px;\n align-items: center;\n\n img {\n width: 40px;\n height: 48px;\n object-fit: cover;\n border-radius: 3px;\n }\n }\n\n div:hover {\n cursor: pointer;\n }\n\n .helperText {\n color: #CBCBCB;\n\n svg {\n width: 25px;\n height: 25px;\n }\n }\n }\n }\n\n/* Applicazione dell'animazione alla SearchBar.iconOnly.linear */\n.SearchBar.iconOnly.linear {\n display: flex;\n width: 100%;\n\n .InputWrapper {\n width: 100%;\n display: flex;\n align-items: center;\n transition: border-bottom 0.3s ease;\n /* Transizione solo per il bordo inferiore */\n border-bottom: 1px solid transparent;\n /* Nessun bordo inizialmente */\n padding-bottom: 4px;\n overflow: hidden;\n /* Per nascondere il contenuto che esce dai limiti dell'InputWrapper */\n\n jump-icon {\n padding-right: 6px;\n /* Padding dell'icona */\n }\n\n input {\n width: 0;\n /* Imposta la larghezza iniziale a 0 */\n border: none;\n transform: translateX(-100%);\n /* Sposta l'input fuori dalla vista */\n transition: width 0.3s ease, transform 0.3s ease;\n /* Transizioni separate per width e transform */\n animation: none;\n /* Disabilita l'animazione predefinita */\n }\n }\n\n &.expanded {\n .InputWrapper {\n border-bottom: 1px solid var(--jump-search-bar-border-color);\n /* Mostra il bordo inferiore quando espanso */\n transition: border-bottom 0.3s ease;\n /* Transizione per il bordo inferiore */\n\n input {\n width: 100%;\n /* Espande l'input a tutta la larghezza disponibile */\n transform: translateX(0);\n /* Riposiziona l'input nella vista */\n animation: slide-right 0.3s ease forwards;\n /* Applicazione dell'animazione slide-right */\n }\n }\n }\n}\n \n}\n\n@keyframes slide-right {\n from {\n transform: translateX(-100%);\n opacity: 0;\n }\n\n to {\n transform: translateX(0);\n opacity: 1;\n }\n}\n\n@keyframes border-slide-right {\n from {\n border-bottom-width: 0;\n }\n\n to {\n border-bottom-width: 1px;\n }\n}","import { Component, Method, Watch, Listen, State, Host, h, Prop, Event, EventEmitter } from '@stencil/core';\n\n@Component({\n tag: 'jump-search-bar',\n styleUrl: 'jump-search-bar.scss',\n shadow: true,\n})\nexport class JumpSearchBar {\n\n /* ---------------------- @OWN PROPERTIES ------------------------- */\n jumpSearchBar: HTMLInputElement;\n private componentRef: HTMLElement;\n\n /* ---------------------- @STATE ------------------------- */\n @State() dropdownVisible: boolean = false;\n @State() searchValue: string = undefined;\n\n @Watch('searchValue')\n searchValueChanged(newValue: string) {\n if (newValue === '') {\n // Create a new array reference to trigger re-render\n this.innerResults = [...this.recents];\n this.results = [];\n }\n }\n\n @State() resType: string = 'recents';\n @State() innerResults: Array<object> = [];\n @State() totalResults: number = 0;\n @State() isExpanded: boolean = false; \n\n /* ---------------------- @PROPERTIES ------------------------- */\n @Prop() placeholder: string = 'Cerca...'; //Il testo del placeholder dell\\'input della searchbar\n @Prop() noResultText: string = 'Nessun risultato corrispondente'; // Il testo da mostrare in caso nessun risultato sia stato recuperato.\n @Prop() loadingText: string = 'Sto caricando...'; // Il testo mostrato durante il caricamento dei risultati.\n @Prop() resultsText: string = 'risultati'; // Il testo mostrato accanto al numero di risultati totali.\n @Prop() showAllResText: string = 'Mostra tutti i risultati'; // La label da mostrare per il pulsante che mostra tutti i risultati.\n @Prop() identifier: string = 'search-bar'; // Identificatore della searchbar\n @Prop() debounceTime: number = 500; // 'Il tempo di attesa per l\\'invio della ricerca in caso di ricerca automatica. In millisecondi.\n @Prop() variant: string = 'outline'; // Scelta dello stile della barra di ricerca tra filled, linear e outline.\n @Prop() withBtn: boolean = false; // Se true, aggiunge un pulsante alla barra di ricerca\n @Prop() recentsTitle: string = 'Recenti'; // Serve per il titolo del dropwdown quando si vedono le ricerche recenti\n @Prop() recents: Array<object> = []; // Serve per il dropdown quando si vedono le ricerche recenti\n @Prop() results: Array<object> = []; // Serve per il dropdown quando si vedono i risultati della ricerca\n @Prop() dropdown: boolean = false; // Se true, mostra il dropdown con i risultati della ricerca.\n @Prop() linearIconOnly: boolean = false; // Se true, mostra solo l'icona nella barra di ricerca lineare\n @Prop() dropdownPosition: string = 'relative'; // Posizione del dropdown rispetto alla searchbar. \"relative\" o \"absolute\"\n\n\n /* ---------------------- @EVENTS ------------------------- */\n\n /**\n * Evento emesso quando l'utente clicca sull'icona in variant linear e linearIconOnly\n */\n @Event({ eventName: 'jump-search-bar-expanded' }) searchbarExpanded: EventEmitter;\n\n /**\n * Evento emesso quando l'utente effettua una ricerca \n * Emette un oggetto contenenente il valore della ricerca alla chiave 'search'\n * */\n @Event({ eventName: 'jump-search-bar' }) search: EventEmitter;\n @Event({ eventName: 'jump-filterchange' }) searchFilters: EventEmitter; // E' analoga a quella sopra ma serve per i filtri\n\n /** \n * Evento emesso quando l'utente clicca sul pulsante (se presente) o nel pulsante del dropdown per vedere tutti i risultati \n * Emette un oggetto contenenente il valore della ricerca alla chiave 'search'\n */\n @Event({ eventName: 'jump-search-bar-show-all' }) showFullSearch: EventEmitter;\n\n /* \n * Evento da ascoltare per recuperare il dato cliccato\n * Emette un oggetto contenente tutti i dati relativi al risultato cliccato.\n */\n @Event({ eventName: 'jump-search-bar-res-clicked'}) resultClicked: EventEmitter; \n\n /* ---------------------- @LIFECYCLE ------------------------- */\n componentDidLoad() {\n // Aggiungi l'event listener per il clic al di fuori del componente\n document.addEventListener('click', this.handleOutsideClick.bind(this));\n }\n\n disconnectedCallback() {\n // Rimuovi l'event listener per evitare perdite di memoria\n document.removeEventListener('click', this.handleOutsideClick.bind(this));\n }\n\n /* -------------------- @LISTEN ------------------------------- */\n @Listen(\"jump-search-bar-dropdown-item-connected\")\n addOption(e) {\n let props = e.detail; // es {code: 'sku1', imageUrl: 'https://google.com/'}\n\n // Aggiungi l'elemento solo a `recents`\n this.recents = [...this.recents, { ...props }];\n\n // Aggiorna `innerResults` basandoti solo su `recents`\n this.innerResults = [...this.recents];\n }\n\n\n /* -------------------- @METHOD ------------------------------- */\n\n /** Imposta i risultati della ricerca all'interno della dropdown */\n @Method()\n async setResults(results, tot?: number) {\n this.results = results;\n this.innerResults = results;\n this.totalResults = tot;\n }\n\n /* -------------------- LOCAL METHODS ------------------------- */\n handleOutsideClick(event: MouseEvent) {\n // Controlla se il clic è fuori dal componente\n if (this.componentRef && !this.componentRef.contains(event.target as Node)) {\n this.dropdownVisible = false;\n }\n }\n\n // Gestisce l'evento focus sull'input\n handleFocus = () => {\n const searchBarContainer = this.jumpSearchBar.closest('.SearchBar');\n if (searchBarContainer) {\n searchBarContainer.classList.add('focused');\n }\n };\n\n // Gestisce l'evento blur sull'input\n handleBlur = () => {\n const searchBarContainer = this.jumpSearchBar.closest('.SearchBar');\n if (searchBarContainer) {\n searchBarContainer.classList.remove('focused');\n }\n };\n\n doSearch = () => {\n if (this.jumpSearchBar) {\n this.searchValue = this.jumpSearchBar.value;\n \n // Iniziare la ricerca solamente se ci sono almeno tre caratteri \n if (this.searchValue.length >= 3) {\n this.resType = 'results';\n\n this.innerResults = undefined;\n \n this.search.emit({ search: this.searchValue });\n this.searchFilters.emit({ search: this.searchValue });\n \n // Se il dropdown è chiuso, aprilo. Potrebbe essere chiuso perchè non ci sono recenti\n if (!this.dropdownVisible) {\n this.dropdownVisible = true;\n }\n } else if(this.searchValue.length == 0) {\n this.dropdownVisible = false;\n }\n }\n };\n\n debounce(fn, delay = this.debounceTime) {\n let timeoutId;\n\n return (...args) => {\n if (timeoutId) {\n clearTimeout(timeoutId);\n }\n timeoutId = setTimeout(() => {\n fn.apply(null, args);\n }, delay);\n };\n };\n\n openDropdown() {\n this.resType = 'recents';\n this.dropdownVisible = true;\n }\n\n /** Emette l'evento di click su un risultato, mandandone tutti i dati */\n handleResClicked(item) {\n this.resultClicked.emit({ clicked: item });\n } \n\n /** Emette l'evento quando l'utente clicca sul pulsante (se presente) o nel pulsante del dropdown per vedere tutti i risultati */\n btnOrShowOtherClicked(){\n this.showFullSearch.emit({ search: this.searchValue });\n }\n\n /**\n * Se clicco l'icona espando la searchbar ed emetto un evento dedicato\n */\n expandSearchBar() {\n this.isExpanded = true;\n this.searchbarExpanded.emit();\n }\n\n\n /* --------------------- RENDER ------------------------------- */\n renderLinearIconOnly() {\n return (\n <Host class={\"JumpSearchBar \"} ref={(el) => (this.componentRef = el as HTMLElement)}>\n <div class={\"SearchBar iconOnly \" + this.variant + (this.isExpanded ? \" expanded\" : \"\")}>\n <div class=\"InputWrapper\" onClick={(this.isExpanded && this.dropdown && this.recents.length > 0) ? () => this.openDropdown() : null}>\n <jump-icon\n name=\"magnifying-glass\"\n category=\"light\"\n onClick={() => this.expandSearchBar()}\n ></jump-icon>\n {this.isExpanded &&\n // Mostra la barra di ricerca con l'animazione di slide\n <input\n placeholder={this.placeholder}\n type=\"search\"\n id={this.identifier}\n class=\"search-input\"\n ref={(el) => { this.jumpSearchBar = el as HTMLInputElement }}\n onInput={this.debounce(this.doSearch)}\n onFocus={this.handleFocus}\n onBlur={this.handleBlur}\n />\n }\n </div>\n </div>\n {(this.dropdown && this.dropdownVisible) && this.renderDropdown()} \n </Host>\n );\n }\n\n renderDefault() {\n return (\n <Host class={\"JumpSearchBar\"} ref={(el) => (this.componentRef = el as HTMLElement)}>\n <div class={\"SearchBar \" + this.variant + \" \" + (this.withBtn ? \"withBtn\" : \"\") + (this.isExpanded ? \" expanded\" : \"\")}>\n <div class=\"InputWrapper\" onClick={(this.dropdown && this.recents.length > 0) ? () => this.openDropdown() : null}>\n {!this.withBtn && <jump-icon name=\"magnifying-glass\" category=\"light\"></jump-icon>}\n <input\n placeholder={this.placeholder}\n type=\"search\"\n id={this.identifier}\n class=\"search-input\"\n ref={(el) => { this.jumpSearchBar = el as HTMLInputElement }}\n onInput={this.debounce(this.doSearch)}\n onFocus={this.handleFocus}\n onBlur={this.handleBlur}\n />\n </div>\n {this.withBtn && !this.linearIconOnly && (\n <jump-button\n variant=\"secondary\"\n size=\"medium\"\n name=\"scopri\"\n value=\"value\"\n aria-label=\"Scopri di più\"\n id=\"button\"\n onlyIcon\n onClick={() => this.btnOrShowOtherClicked()}\n >\n <jump-icon slot=\"suffix\" name=\"magnifying-glass\"></jump-icon>\n </jump-button>\n )}\n </div>\n {(this.dropdown && this.dropdownVisible) && this.renderDropdown()} \n </Host>\n );\n }\n\n renderDropdown(){\n console.log('POSITION', this.dropdownPosition);\n return <div class={\"Dropdown \" + (this.dropdownPosition == 'absolute' ? 'dropAbsolute' : 'dropRelative' ) }>\n {(this.resType == 'recents') &&\n <div class=\"Dropdown__Recents\">\n <span class=\"title\">{this.recentsTitle}</span>\n <div class=\"ResWrapper\">\n {this.innerResults.length > 0 && this.innerResults.map((item) => (\n <div onClick={() => this.handleResClicked(item)}>\n <jump-icon name=\"magnifying-glass\" category=\"light\"></jump-icon>\n {item['value']}\n </div>\n ))}\n </div>\n </div>\n }\n {this.resType == 'results' &&\n <div class=\"Dropdown__Results\">\n <div class=\"ResWrapper\">\n {this.innerResults === undefined ?\n <div class=\"helperText\"><svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 100 100\" preserveAspectRatio=\"xMidYMid\" width=\"252\" height=\"252\" ><g><g transform=\"rotate(0 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"-0.9s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g transform=\"rotate(36 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"-0.8s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g transform=\"rotate(72 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"-0.7s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g transform=\"rotate(108 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"-0.6s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g transform=\"rotate(144 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"-0.5s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g transform=\"rotate(180 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"-0.4s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g transform=\"rotate(216 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"-0.3s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g transform=\"rotate(252 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"-0.2s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g transform=\"rotate(288 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"-0.1s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g transform=\"rotate(324 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"0s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g></g></g></svg>{this.loadingText}</div>\n :\n (this.innerResults.length > 0 ?\n this.innerResults.map((item) => (\n <div onClick={() => this.handleResClicked(item)} key={item['id']}>\n {item['img'] && <img src={item['img']} alt=\"result\" />}\n {item['value']}\n </div>\n ))\n :\n <div class=\"helperText\">{this.noResultText}</div>\n )\n }\n {(this.innerResults && this.innerResults.length > 0) &&\n <div class=\"totalRes\">\n <jump-button variant=\"secondary\" size=\"small\" text onClick={() => this.btnOrShowOtherClicked()} target=\"_blank\"> {this.showAllResText} </jump-button>\n {this.totalResults && <div>{this.totalResults} {this.resultsText}</div>}\n </div>\n }\n </div>\n </div>\n }\n </div>\n }\n\n render() {\n if (this.variant === 'linear' && this.linearIconOnly) {\n return this.renderLinearIconOnly();\n } else {\n return this.renderDefault();\n }\n }\n}"],"version":3}
|
|
1
|
+
{"file":"jump-search-bar.entry.cjs.js","mappings":";;;;;;AAAA,MAAM,gBAAgB,GAAG,iyHAAiyH,CAAC;AAC3zH,4BAAe,gBAAgB;;MCMlB,aAAa;;;;;;;;;QA+GxB,gBAAW,GAAG;YACZ,MAAM,kBAAkB,GAAG,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;YACpE,IAAI,kBAAkB,EAAE;gBACtB,kBAAkB,CAAC,SAAS,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;aAC7C;SACF,CAAC;;QAGF,eAAU,GAAG;YACX,MAAM,kBAAkB,GAAG,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;YACpE,IAAI,kBAAkB,EAAE;gBACtB,kBAAkB,CAAC,SAAS,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;aAChD;SACF,CAAC;QAEF,aAAQ,GAAG;YACT,IAAI,IAAI,CAAC,aAAa,EAAE;gBACtB,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC;;gBAG5C,IAAI,IAAI,CAAC,WAAW,CAAC,MAAM,IAAI,CAAC,EAAE;oBAChC,IAAI,CAAC,OAAO,GAAG,SAAS,CAAC;oBAEzB,IAAI,CAAC,YAAY,GAAG,SAAS,CAAC;oBAE9B,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC;oBAC/C,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,QAAQ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AC,gBAAgB,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,IAAI,CAAC,IAAI,CAAC,IAC7D,IAAI,CAAC,KAAK,CAAC,IAAIA,iBAAK,GAAG,EAAE,IAAI,CAAC,KAAK,CAAC,EAAE,GAAG,EAAC,QAAQ,GAAG,EACrD,IAAI,CAAC,OAAO,CAAC,CACV,CACP,CAAC;;4BAEFA,iBAAK,KAAK,EAAC,YAAY,IAAE,IAAI,CAAC,YAAY,CAAO,CAClD,EAEF,CAAC,IAAI,CAAC,YAAY,IAAI,IAAI,CAAC,YAAY,CAAC,MAAM,GAAG,CAAC;gBACjDA,iBAAK,KAAK,EAAC,UAAU,IACnBA,yBAAa,OAAO,EAAC,WAAW,EAAC,IAAI,EAAC,OAAO,EAAC,IAAI,QAAC,OAAO,EAAE,MAAM,IAAI,CAAC,qBAAqB,EAAE,EAAE,MAAM,EAAC,QAAQ,SAAG,IAAI,CAAC,cAAc,MAAgB,EACpJ,IAAI,CAAC,YAAY,IAAIA,qBAAM,IAAI,CAAC,YAAY,OAAG,IAAI,CAAC,WAAW,CAAO,CACnE,CAEJ,CACF,CAEJ,CAAA;KACT;IAED,MAAM;QACJ,IAAI,IAAI,CAAC,OAAO,KAAK,QAAQ,IAAI,IAAI,CAAC,cAAc,EAAE;YACpD,OAAO,IAAI,CAAC,oBAAoB,EAAE,CAAC;SACpC;aAAM;YACL,OAAO,IAAI,CAAC,aAAa,EAAE,CAAC;SAC7B;KACF;;;;;;;;;","names":["h","Host"],"sources":["src/components/jump-search-bar/jump-search-bar.scss?tag=jump-search-bar&encapsulation=shadow","src/components/jump-search-bar/jump-search-bar.tsx"],"sourcesContent":[":host {\n display: block;\n\n --jump-search-bar-focus-color: var(--secondary-standard, #5E79BA);\n --jump-search-bar-border-color: var(--neutral-grey-secondary, #707070);\n --jump-search-bar-bg-color: var(--gray-ultralight, #F8F8F8);\n --jump-search-bar-dropdown-border-color: var(--neutral-grey-disabled, #CBCBCB);\n\n font-family: var(--ff-primary);\n\n jump-button {\n --jump-button-border-radius: 0px 3px 3px 0px;\n }\n\n .SearchBar {\n position: relative;\n\n &.focused .InputWrapper {\n border-color: var(--jump-search-bar-focus-color) !important;\n \n jump-icon {\n color: var(--jump-search-bar-focus-color) !important;\n }\n \n input {\n outline: none !important;\n }\n }\n }\n\n .SearchBar:not(.iconOnly) {\n display: flex;\n width: 100%;\n \n .InputWrapper {\n width: 100%;\n display: flex;\n }\n \n input {\n width: 100%;\n border: none;\n }\n \n /* Stile outline*/\n &.outline .InputWrapper {\n border: 1px solid var(--jump-search-bar-border-color);\n border-radius: 3px;\n padding: 12px;\n gap: 8px;\n \n jump-icon {\n color: var(--jump-search-bar-border-color);\n }\n }\n \n &.outline.withBtn .InputWrapper {\n border-radius: 3px 0px 0px 3px;\n }\n \n \n /* Stile filled */\n &.filled .InputWrapper {\n border: 1px solid var(--jump-search-bar-bg-color);\n background-color: var(--jump-search-bar-bg-color);\n border-radius: 3px;\n padding: 12px;\n gap: 8px;\n \n input {\n background-color: var(--jump-search-bar-bg-color);\n }\n \n jump-icon {\n color: var(--jump-search-bar-border-color);\n }\n }\n \n &.filled.focused.withBtn .InputWrapper {\n border-radius: 3px 0px 0px 3px !important;\n }\n \n /* Stile linear */\n &.linear .InputWrapper {\n border-bottom: 1px solid var(--jump-search-bar-border-color);\n padding-bottom: 4px;\n \n jump-icon {\n padding-right: 6px;\n }\n }\n }\n \n \n .Dropdown {\n\n &.dropAbsolute {\n position: absolute;\n box-sizing: border-box;\n position: absolute;\n left: 0;\n width: 100%;\n }\n\n &.dropRelative {\n position: relative;\n }\n\n // position: absolute; la tolgo per il test\n margin-top: 10px;\n border-radius: 3px;\n border: 1px solid var(--jump-search-bar-dropdown-border-color);\n padding: 4px 16px;\n background-color: white;\n\n &__Recents {\n .title {\n color: #707070;\n font-size: 14px;\n line-height: 20px;\n padding: 8px 0;\n font-weight: 700;\n display: flex;\n }\n }\n\n &__Results {\n .totalRes {\n display: flex; \n justify-content: space-between;\n }\n }\n \n\n .ResWrapper {\n display: flex;\n flex-direction: column;\n\n div {\n padding: 8px 0;\n color: #707070;\n font-size: 14px;\n display: flex;\n gap: 12px;\n align-items: center;\n\n img {\n width: 40px;\n height: 48px;\n object-fit: cover;\n border-radius: 3px;\n }\n }\n\n div:hover {\n cursor: pointer;\n }\n\n .helperText {\n color: #CBCBCB;\n\n svg {\n width: 25px;\n height: 25px;\n }\n }\n }\n }\n\n/* Applicazione dell'animazione alla SearchBar.iconOnly.linear */\n.SearchBar.iconOnly.linear {\n display: flex;\n width: 100%;\n\n .InputWrapper {\n width: 100%;\n display: flex;\n align-items: center;\n transition: border-bottom 0.3s ease;\n /* Transizione solo per il bordo inferiore */\n border-bottom: 1px solid transparent;\n /* Nessun bordo inizialmente */\n padding-bottom: 4px;\n overflow: hidden;\n /* Per nascondere il contenuto che esce dai limiti dell'InputWrapper */\n\n jump-icon {\n padding-right: 6px;\n /* Padding dell'icona */\n }\n\n input {\n width: 0;\n /* Imposta la larghezza iniziale a 0 */\n border: none;\n transform: translateX(-100%);\n /* Sposta l'input fuori dalla vista */\n transition: width 0.3s ease, transform 0.3s ease;\n /* Transizioni separate per width e transform */\n animation: none;\n /* Disabilita l'animazione predefinita */\n }\n }\n\n &.expanded {\n .InputWrapper {\n border-bottom: 1px solid var(--jump-search-bar-border-color);\n /* Mostra il bordo inferiore quando espanso */\n transition: border-bottom 0.3s ease;\n /* Transizione per il bordo inferiore */\n\n input {\n width: 100%;\n /* Espande l'input a tutta la larghezza disponibile */\n transform: translateX(0);\n /* Riposiziona l'input nella vista */\n animation: slide-right 0.3s ease forwards;\n /* Applicazione dell'animazione slide-right */\n }\n }\n }\n}\n \n}\n\n@keyframes slide-right {\n from {\n transform: translateX(-100%);\n opacity: 0;\n }\n\n to {\n transform: translateX(0);\n opacity: 1;\n }\n}\n\n@keyframes border-slide-right {\n from {\n border-bottom-width: 0;\n }\n\n to {\n border-bottom-width: 1px;\n }\n}","import { Component, Method, Watch, Listen, State, Host, h, Prop, Event, EventEmitter } from '@stencil/core';\n\n@Component({\n tag: 'jump-search-bar',\n styleUrl: 'jump-search-bar.scss',\n shadow: true,\n})\nexport class JumpSearchBar {\n\n /* ---------------------- @OWN PROPERTIES ------------------------- */\n jumpSearchBar: HTMLInputElement;\n private componentRef: HTMLElement;\n\n /* ---------------------- @STATE ------------------------- */\n @State() dropdownVisible: boolean = false;\n @State() searchValue: string = undefined;\n\n @Watch('searchValue')\n searchValueChanged(newValue: string) {\n if (newValue === '') {\n // Create a new array reference to trigger re-render\n this.innerResults = [...this.recents];\n this.results = [];\n }\n }\n\n @State() resType: string = 'recents';\n @State() innerResults: Array<object> = [];\n @State() totalResults: number = 0;\n @State() isExpanded: boolean = false; \n\n /* ---------------------- @PROPERTIES ------------------------- */\n @Prop() placeholder: string = 'Cerca...'; //Il testo del placeholder dell\\'input della searchbar\n @Prop() noResultText: string = 'Nessun risultato corrispondente'; // Il testo da mostrare in caso nessun risultato sia stato recuperato.\n @Prop() loadingText: string = 'Sto caricando...'; // Il testo mostrato durante il caricamento dei risultati.\n @Prop() resultsText: string = 'risultati'; // Il testo mostrato accanto al numero di risultati totali.\n @Prop() showAllResText: string = 'Mostra tutti i risultati'; // La label da mostrare per il pulsante che mostra tutti i risultati.\n @Prop() identifier: string = 'search-bar'; // Identificatore della searchbar\n @Prop() debounceTime: number = 500; // 'Il tempo di attesa per l\\'invio della ricerca in caso di ricerca automatica. In millisecondi.\n @Prop() variant: string = 'outline'; // Scelta dello stile della barra di ricerca tra filled, linear e outline.\n @Prop() withBtn: boolean = false; // Se true, aggiunge un pulsante alla barra di ricerca\n @Prop() recentsTitle: string = 'Recenti'; // Serve per il titolo del dropwdown quando si vedono le ricerche recenti\n @Prop() recents: Array<object> = []; // Serve per il dropdown quando si vedono le ricerche recenti\n @Prop() results: Array<object> = []; // Serve per il dropdown quando si vedono i risultati della ricerca\n @Prop() dropdown: boolean = false; // Se true, mostra il dropdown con i risultati della ricerca.\n @Prop() linearIconOnly: boolean = false; // Se true, mostra solo l'icona nella barra di ricerca lineare\n @Prop() dropdownPosition: string = 'relative'; // Posizione del dropdown rispetto alla searchbar. \"relative\" o \"absolute\"\n\n\n /* ---------------------- @EVENTS ------------------------- */\n\n /**\n * Evento emesso quando l'utente clicca sull'icona in variant linear e linearIconOnly\n */\n @Event({ eventName: 'jump-search-bar-expanded' }) searchbarExpanded: EventEmitter;\n\n /**\n * Evento emesso quando l'utente effettua una ricerca \n * Emette un oggetto contenenente il valore della ricerca alla chiave 'search'\n * */\n @Event({ eventName: 'jump-search-bar' }) search: EventEmitter;\n @Event({ eventName: 'jump-filterchange' }) searchFilters: EventEmitter; // E' analoga a quella sopra ma serve per i filtri\n\n /** \n * Evento emesso quando l'utente clicca sul pulsante (se presente) o nel pulsante del dropdown per vedere tutti i risultati \n * Emette un oggetto contenenente il valore della ricerca alla chiave 'search'\n */\n @Event({ eventName: 'jump-search-bar-show-all' }) showFullSearch: EventEmitter;\n\n /* \n * Evento da ascoltare per recuperare il dato cliccato\n * Emette un oggetto contenente tutti i dati relativi al risultato cliccato.\n */\n @Event({ eventName: 'jump-search-bar-res-clicked'}) resultClicked: EventEmitter; \n\n /* ---------------------- @LIFECYCLE ------------------------- */\n componentDidLoad() {\n // Aggiungi l'event listener per il clic al di fuori del componente\n document.addEventListener('click', this.handleOutsideClick.bind(this));\n }\n\n disconnectedCallback() {\n // Rimuovi l'event listener per evitare perdite di memoria\n document.removeEventListener('click', this.handleOutsideClick.bind(this));\n }\n\n /* -------------------- @LISTEN ------------------------------- */\n @Listen(\"jump-search-bar-dropdown-item-connected\")\n addOption(e) {\n let props = e.detail; // es {code: 'sku1', imageUrl: 'https://google.com/'}\n\n // Aggiungi l'elemento solo a `recents`\n this.recents = [...this.recents, { ...props }];\n\n // Aggiorna `innerResults` basandoti solo su `recents`\n this.innerResults = [...this.recents];\n }\n\n\n /* -------------------- @METHOD ------------------------------- */\n\n /** Imposta i risultati della ricerca all'interno della dropdown */\n @Method()\n async setResults(results, tot?: number) {\n this.results = results;\n this.innerResults = results;\n this.totalResults = tot;\n }\n\n /* -------------------- LOCAL METHODS ------------------------- */\n handleOutsideClick(event: MouseEvent) {\n // Controlla se il clic è fuori dal componente\n if (this.componentRef && !this.componentRef.contains(event.target as Node)) {\n this.dropdownVisible = false;\n }\n }\n\n // Gestisce l'evento focus sull'input\n handleFocus = () => {\n const searchBarContainer = this.jumpSearchBar.closest('.SearchBar');\n if (searchBarContainer) {\n searchBarContainer.classList.add('focused');\n }\n };\n\n // Gestisce l'evento blur sull'input\n handleBlur = () => {\n const searchBarContainer = this.jumpSearchBar.closest('.SearchBar');\n if (searchBarContainer) {\n searchBarContainer.classList.remove('focused');\n }\n };\n\n doSearch = () => {\n if (this.jumpSearchBar) {\n this.searchValue = this.jumpSearchBar.value;\n \n // Iniziare la ricerca solamente se ci sono almeno tre caratteri \n if (this.searchValue.length >= 3) {\n this.resType = 'results';\n\n this.innerResults = undefined;\n \n this.search.emit({ search: this.searchValue });\n this.searchFilters.emit({ name: 'search', value: this.searchValue });\n \n // Se il dropdown è chiuso, aprilo. Potrebbe essere chiuso perchè non ci sono recenti\n if (!this.dropdownVisible) {\n this.dropdownVisible = true;\n }\n } else if(this.searchValue.length == 0) {\n this.dropdownVisible = false;\n }\n }\n };\n\n debounce(fn, delay = this.debounceTime) {\n let timeoutId;\n\n return (...args) => {\n if (timeoutId) {\n clearTimeout(timeoutId);\n }\n timeoutId = setTimeout(() => {\n fn.apply(null, args);\n }, delay);\n };\n };\n\n openDropdown() {\n this.resType = 'recents';\n this.dropdownVisible = true;\n }\n\n /** Emette l'evento di click su un risultato, mandandone tutti i dati */\n handleResClicked(item) {\n this.resultClicked.emit({ clicked: item });\n } \n\n /** Emette l'evento quando l'utente clicca sul pulsante (se presente) o nel pulsante del dropdown per vedere tutti i risultati */\n btnOrShowOtherClicked(){\n this.showFullSearch.emit({ search: this.searchValue });\n }\n\n /**\n * Se clicco l'icona espando la searchbar ed emetto un evento dedicato\n */\n expandSearchBar() {\n this.isExpanded = true;\n this.searchbarExpanded.emit();\n }\n\n\n /* --------------------- RENDER ------------------------------- */\n renderLinearIconOnly() {\n return (\n <Host class={\"JumpSearchBar \"} ref={(el) => (this.componentRef = el as HTMLElement)}>\n <div class={\"SearchBar iconOnly \" + this.variant + (this.isExpanded ? \" expanded\" : \"\")}>\n <div class=\"InputWrapper\" onClick={(this.isExpanded && this.dropdown && this.recents.length > 0) ? () => this.openDropdown() : null}>\n <jump-icon\n name=\"magnifying-glass\"\n category=\"light\"\n onClick={() => this.expandSearchBar()}\n ></jump-icon>\n {this.isExpanded &&\n // Mostra la barra di ricerca con l'animazione di slide\n <input\n placeholder={this.placeholder}\n type=\"search\"\n id={this.identifier}\n class=\"search-input\"\n ref={(el) => { this.jumpSearchBar = el as HTMLInputElement }}\n onInput={this.debounce(this.doSearch)}\n onFocus={this.handleFocus}\n onBlur={this.handleBlur}\n />\n }\n </div>\n </div>\n {(this.dropdown && this.dropdownVisible) && this.renderDropdown()} \n </Host>\n );\n }\n\n renderDefault() {\n return (\n <Host class={\"JumpSearchBar\"} ref={(el) => (this.componentRef = el as HTMLElement)}>\n <div class={\"SearchBar \" + this.variant + \" \" + (this.withBtn ? \"withBtn\" : \"\") + (this.isExpanded ? \" expanded\" : \"\")}>\n <div class=\"InputWrapper\" onClick={(this.dropdown && this.recents.length > 0) ? () => this.openDropdown() : null}>\n {!this.withBtn && <jump-icon name=\"magnifying-glass\" category=\"light\"></jump-icon>}\n <input\n placeholder={this.placeholder}\n type=\"search\"\n id={this.identifier}\n class=\"search-input\"\n ref={(el) => { this.jumpSearchBar = el as HTMLInputElement }}\n onInput={this.debounce(this.doSearch)}\n onFocus={this.handleFocus}\n onBlur={this.handleBlur}\n />\n </div>\n {this.withBtn && !this.linearIconOnly && (\n <jump-button\n variant=\"secondary\"\n size=\"medium\"\n name=\"scopri\"\n value=\"value\"\n aria-label=\"Scopri di più\"\n id=\"button\"\n onlyIcon\n onClick={() => this.btnOrShowOtherClicked()}\n >\n <jump-icon slot=\"suffix\" name=\"magnifying-glass\"></jump-icon>\n </jump-button>\n )}\n </div>\n {(this.dropdown && this.dropdownVisible) && this.renderDropdown()} \n </Host>\n );\n }\n\n renderDropdown(){\n console.log('POSITION', this.dropdownPosition);\n return <div class={\"Dropdown \" + (this.dropdownPosition == 'absolute' ? 'dropAbsolute' : 'dropRelative' ) }>\n {(this.resType == 'recents') &&\n <div class=\"Dropdown__Recents\">\n <span class=\"title\">{this.recentsTitle}</span>\n <div class=\"ResWrapper\">\n {this.innerResults.length > 0 && this.innerResults.map((item) => (\n <div onClick={() => this.handleResClicked(item)}>\n <jump-icon name=\"magnifying-glass\" category=\"light\"></jump-icon>\n {item['value']}\n </div>\n ))}\n </div>\n </div>\n }\n {this.resType == 'results' &&\n <div class=\"Dropdown__Results\">\n <div class=\"ResWrapper\">\n {this.innerResults === undefined ?\n <div class=\"helperText\"><svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 100 100\" preserveAspectRatio=\"xMidYMid\" width=\"252\" height=\"252\" ><g><g transform=\"rotate(0 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"-0.9s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g transform=\"rotate(36 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"-0.8s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g transform=\"rotate(72 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"-0.7s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g transform=\"rotate(108 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"-0.6s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g transform=\"rotate(144 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"-0.5s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g transform=\"rotate(180 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"-0.4s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g transform=\"rotate(216 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"-0.3s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g transform=\"rotate(252 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"-0.2s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g transform=\"rotate(288 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"-0.1s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g transform=\"rotate(324 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"0s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g></g></g></svg>{this.loadingText}</div>\n :\n (this.innerResults.length > 0 ?\n this.innerResults.map((item) => (\n <div onClick={() => this.handleResClicked(item)} key={item['id']}>\n {item['img'] && <img src={item['img']} alt=\"result\" />}\n {item['value']}\n </div>\n ))\n :\n <div class=\"helperText\">{this.noResultText}</div>\n )\n }\n {(this.innerResults && this.innerResults.length > 0) &&\n <div class=\"totalRes\">\n <jump-button variant=\"secondary\" size=\"small\" text onClick={() => this.btnOrShowOtherClicked()} target=\"_blank\"> {this.showAllResText} </jump-button>\n {this.totalResults && <div>{this.totalResults} {this.resultsText}</div>}\n </div>\n }\n </div>\n </div>\n }\n </div>\n }\n\n render() {\n if (this.variant === 'linear' && this.linearIconOnly) {\n return this.renderLinearIconOnly();\n } else {\n return this.renderDefault();\n }\n }\n}"],"version":3}
|
|
@@ -23,7 +23,7 @@ export class JumpSearchBar {
|
|
|
23
23
|
this.resType = 'results';
|
|
24
24
|
this.innerResults = undefined;
|
|
25
25
|
this.search.emit({ search: this.searchValue });
|
|
26
|
-
this.searchFilters.emit({ search: this.searchValue });
|
|
26
|
+
this.searchFilters.emit({ name: 'search', value: this.searchValue });
|
|
27
27
|
// Se il dropdown è chiuso, aprilo. Potrebbe essere chiuso perchè non ci sono recenti
|
|
28
28
|
if (!this.dropdownVisible) {
|
|
29
29
|
this.dropdownVisible = true;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jump-search-bar.js","sourceRoot":"","sources":["../../../src/components/jump-search-bar/jump-search-bar.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAA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,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,qBAAqB,EAAE,EAAE,MAAM,EAAC,QAAQ;;oCAAG,IAAI,CAAC,cAAc;wCAAgB;gCACpJ,IAAI,CAAC,YAAY,IAAI;oCAAM,IAAI,CAAC,YAAY;;oCAAG,IAAI,CAAC,WAAW,CAAO,CACnE,CAEJ,CACF,CAEJ,CAAA;IACV,CAAC;IAED,MAAM;QACJ,IAAI,IAAI,CAAC,OAAO,KAAK,QAAQ,IAAI,IAAI,CAAC,cAAc,EAAE,CAAC;YACrD,OAAO,IAAI,CAAC,oBAAoB,EAAE,CAAC;QACrC,CAAC;aAAM,CAAC;YACN,OAAO,IAAI,CAAC,aAAa,EAAE,CAAC;QAC9B,CAAC;IACH,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Method, Watch, Listen, State, Host, h, Prop, Event, EventEmitter } from '@stencil/core';\n\n@Component({\n tag: 'jump-search-bar',\n styleUrl: 'jump-search-bar.scss',\n shadow: true,\n})\nexport class JumpSearchBar {\n\n /* ---------------------- @OWN PROPERTIES ------------------------- */\n jumpSearchBar: HTMLInputElement;\n private componentRef: HTMLElement;\n\n /* ---------------------- @STATE ------------------------- */\n @State() dropdownVisible: boolean = false;\n @State() searchValue: string = undefined;\n\n @Watch('searchValue')\n searchValueChanged(newValue: string) {\n if (newValue === '') {\n // Create a new array reference to trigger re-render\n this.innerResults = [...this.recents];\n this.results = [];\n }\n }\n\n @State() resType: string = 'recents';\n @State() innerResults: Array<object> = [];\n @State() totalResults: number = 0;\n @State() isExpanded: boolean = false; \n\n /* ---------------------- @PROPERTIES ------------------------- */\n @Prop() placeholder: string = 'Cerca...'; //Il testo del placeholder dell\\'input della searchbar\n @Prop() noResultText: string = 'Nessun risultato corrispondente'; // Il testo da mostrare in caso nessun risultato sia stato recuperato.\n @Prop() loadingText: string = 'Sto caricando...'; // Il testo mostrato durante il caricamento dei risultati.\n @Prop() resultsText: string = 'risultati'; // Il testo mostrato accanto al numero di risultati totali.\n @Prop() showAllResText: string = 'Mostra tutti i risultati'; // La label da mostrare per il pulsante che mostra tutti i risultati.\n @Prop() identifier: string = 'search-bar'; // Identificatore della searchbar\n @Prop() debounceTime: number = 500; // 'Il tempo di attesa per l\\'invio della ricerca in caso di ricerca automatica. In millisecondi.\n @Prop() variant: string = 'outline'; // Scelta dello stile della barra di ricerca tra filled, linear e outline.\n @Prop() withBtn: boolean = false; // Se true, aggiunge un pulsante alla barra di ricerca\n @Prop() recentsTitle: string = 'Recenti'; // Serve per il titolo del dropwdown quando si vedono le ricerche recenti\n @Prop() recents: Array<object> = []; // Serve per il dropdown quando si vedono le ricerche recenti\n @Prop() results: Array<object> = []; // Serve per il dropdown quando si vedono i risultati della ricerca\n @Prop() dropdown: boolean = false; // Se true, mostra il dropdown con i risultati della ricerca.\n @Prop() linearIconOnly: boolean = false; // Se true, mostra solo l'icona nella barra di ricerca lineare\n @Prop() dropdownPosition: string = 'relative'; // Posizione del dropdown rispetto alla searchbar. \"relative\" o \"absolute\"\n\n\n /* ---------------------- @EVENTS ------------------------- */\n\n /**\n * Evento emesso quando l'utente clicca sull'icona in variant linear e linearIconOnly\n */\n @Event({ eventName: 'jump-search-bar-expanded' }) searchbarExpanded: EventEmitter;\n\n /**\n * Evento emesso quando l'utente effettua una ricerca \n * Emette un oggetto contenenente il valore della ricerca alla chiave 'search'\n * */\n @Event({ eventName: 'jump-search-bar' }) search: EventEmitter;\n @Event({ eventName: 'jump-filterchange' }) searchFilters: EventEmitter; // E' analoga a quella sopra ma serve per i filtri\n\n /** \n * Evento emesso quando l'utente clicca sul pulsante (se presente) o nel pulsante del dropdown per vedere tutti i risultati \n * Emette un oggetto contenenente il valore della ricerca alla chiave 'search'\n */\n @Event({ eventName: 'jump-search-bar-show-all' }) showFullSearch: EventEmitter;\n\n /* \n * Evento da ascoltare per recuperare il dato cliccato\n * Emette un oggetto contenente tutti i dati relativi al risultato cliccato.\n */\n @Event({ eventName: 'jump-search-bar-res-clicked'}) resultClicked: EventEmitter; \n\n /* ---------------------- @LIFECYCLE ------------------------- */\n componentDidLoad() {\n // Aggiungi l'event listener per il clic al di fuori del componente\n document.addEventListener('click', this.handleOutsideClick.bind(this));\n }\n\n disconnectedCallback() {\n // Rimuovi l'event listener per evitare perdite di memoria\n document.removeEventListener('click', this.handleOutsideClick.bind(this));\n }\n\n /* -------------------- @LISTEN ------------------------------- */\n @Listen(\"jump-search-bar-dropdown-item-connected\")\n addOption(e) {\n let props = e.detail; // es {code: 'sku1', imageUrl: 'https://google.com/'}\n\n // Aggiungi l'elemento solo a `recents`\n this.recents = [...this.recents, { ...props }];\n\n // Aggiorna `innerResults` basandoti solo su `recents`\n this.innerResults = [...this.recents];\n }\n\n\n /* -------------------- @METHOD ------------------------------- */\n\n /** Imposta i risultati della ricerca all'interno della dropdown */\n @Method()\n async setResults(results, tot?: number) {\n this.results = results;\n this.innerResults = results;\n this.totalResults = tot;\n }\n\n /* -------------------- LOCAL METHODS ------------------------- */\n handleOutsideClick(event: MouseEvent) {\n // Controlla se il clic è fuori dal componente\n if (this.componentRef && !this.componentRef.contains(event.target as Node)) {\n this.dropdownVisible = false;\n }\n }\n\n // Gestisce l'evento focus sull'input\n handleFocus = () => {\n const searchBarContainer = this.jumpSearchBar.closest('.SearchBar');\n if (searchBarContainer) {\n searchBarContainer.classList.add('focused');\n }\n };\n\n // Gestisce l'evento blur sull'input\n handleBlur = () => {\n const searchBarContainer = this.jumpSearchBar.closest('.SearchBar');\n if (searchBarContainer) {\n searchBarContainer.classList.remove('focused');\n }\n };\n\n doSearch = () => {\n if (this.jumpSearchBar) {\n this.searchValue = this.jumpSearchBar.value;\n \n // Iniziare la ricerca solamente se ci sono almeno tre caratteri \n if (this.searchValue.length >= 3) {\n this.resType = 'results';\n\n this.innerResults = undefined;\n \n this.search.emit({ search: this.searchValue });\n this.searchFilters.emit({ search: this.searchValue });\n \n // Se il dropdown è chiuso, aprilo. Potrebbe essere chiuso perchè non ci sono recenti\n if (!this.dropdownVisible) {\n this.dropdownVisible = true;\n }\n } else if(this.searchValue.length == 0) {\n this.dropdownVisible = false;\n }\n }\n };\n\n debounce(fn, delay = this.debounceTime) {\n let timeoutId;\n\n return (...args) => {\n if (timeoutId) {\n clearTimeout(timeoutId);\n }\n timeoutId = setTimeout(() => {\n fn.apply(null, args);\n }, delay);\n };\n };\n\n openDropdown() {\n this.resType = 'recents';\n this.dropdownVisible = true;\n }\n\n /** Emette l'evento di click su un risultato, mandandone tutti i dati */\n handleResClicked(item) {\n this.resultClicked.emit({ clicked: item });\n } \n\n /** Emette l'evento quando l'utente clicca sul pulsante (se presente) o nel pulsante del dropdown per vedere tutti i risultati */\n btnOrShowOtherClicked(){\n this.showFullSearch.emit({ search: this.searchValue });\n }\n\n /**\n * Se clicco l'icona espando la searchbar ed emetto un evento dedicato\n */\n expandSearchBar() {\n this.isExpanded = true;\n this.searchbarExpanded.emit();\n }\n\n\n /* --------------------- RENDER ------------------------------- */\n renderLinearIconOnly() {\n return (\n <Host class={\"JumpSearchBar \"} ref={(el) => (this.componentRef = el as HTMLElement)}>\n <div class={\"SearchBar iconOnly \" + this.variant + (this.isExpanded ? \" expanded\" : \"\")}>\n <div class=\"InputWrapper\" onClick={(this.isExpanded && this.dropdown && this.recents.length > 0) ? () => this.openDropdown() : null}>\n <jump-icon\n name=\"magnifying-glass\"\n category=\"light\"\n onClick={() => this.expandSearchBar()}\n ></jump-icon>\n {this.isExpanded &&\n // Mostra la barra di ricerca con l'animazione di slide\n <input\n placeholder={this.placeholder}\n type=\"search\"\n id={this.identifier}\n class=\"search-input\"\n ref={(el) => { this.jumpSearchBar = el as HTMLInputElement }}\n onInput={this.debounce(this.doSearch)}\n onFocus={this.handleFocus}\n onBlur={this.handleBlur}\n />\n }\n </div>\n </div>\n {(this.dropdown && this.dropdownVisible) && this.renderDropdown()} \n </Host>\n );\n }\n\n renderDefault() {\n return (\n <Host class={\"JumpSearchBar\"} ref={(el) => (this.componentRef = el as HTMLElement)}>\n <div class={\"SearchBar \" + this.variant + \" \" + (this.withBtn ? \"withBtn\" : \"\") + (this.isExpanded ? \" expanded\" : \"\")}>\n <div class=\"InputWrapper\" onClick={(this.dropdown && this.recents.length > 0) ? () => this.openDropdown() : null}>\n {!this.withBtn && <jump-icon name=\"magnifying-glass\" category=\"light\"></jump-icon>}\n <input\n placeholder={this.placeholder}\n type=\"search\"\n id={this.identifier}\n class=\"search-input\"\n ref={(el) => { this.jumpSearchBar = el as HTMLInputElement }}\n onInput={this.debounce(this.doSearch)}\n onFocus={this.handleFocus}\n onBlur={this.handleBlur}\n />\n </div>\n {this.withBtn && !this.linearIconOnly && (\n <jump-button\n variant=\"secondary\"\n size=\"medium\"\n name=\"scopri\"\n value=\"value\"\n aria-label=\"Scopri di più\"\n id=\"button\"\n onlyIcon\n onClick={() => this.btnOrShowOtherClicked()}\n >\n <jump-icon slot=\"suffix\" name=\"magnifying-glass\"></jump-icon>\n </jump-button>\n )}\n </div>\n {(this.dropdown && this.dropdownVisible) && this.renderDropdown()} \n </Host>\n );\n }\n\n renderDropdown(){\n console.log('POSITION', this.dropdownPosition);\n return <div class={\"Dropdown \" + (this.dropdownPosition == 'absolute' ? 'dropAbsolute' : 'dropRelative' ) }>\n {(this.resType == 'recents') &&\n <div class=\"Dropdown__Recents\">\n <span class=\"title\">{this.recentsTitle}</span>\n <div class=\"ResWrapper\">\n {this.innerResults.length > 0 && this.innerResults.map((item) => (\n <div onClick={() => this.handleResClicked(item)}>\n <jump-icon name=\"magnifying-glass\" category=\"light\"></jump-icon>\n {item['value']}\n </div>\n ))}\n </div>\n </div>\n }\n {this.resType == 'results' &&\n <div class=\"Dropdown__Results\">\n <div class=\"ResWrapper\">\n {this.innerResults === undefined ?\n <div class=\"helperText\"><svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 100 100\" preserveAspectRatio=\"xMidYMid\" width=\"252\" height=\"252\" ><g><g transform=\"rotate(0 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"-0.9s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g transform=\"rotate(36 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"-0.8s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g transform=\"rotate(72 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"-0.7s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g transform=\"rotate(108 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"-0.6s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g transform=\"rotate(144 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"-0.5s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g transform=\"rotate(180 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"-0.4s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g transform=\"rotate(216 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"-0.3s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g transform=\"rotate(252 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"-0.2s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g transform=\"rotate(288 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"-0.1s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g transform=\"rotate(324 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"0s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g></g></g></svg>{this.loadingText}</div>\n :\n (this.innerResults.length > 0 ?\n this.innerResults.map((item) => (\n <div onClick={() => this.handleResClicked(item)} key={item['id']}>\n {item['img'] && <img src={item['img']} alt=\"result\" />}\n {item['value']}\n </div>\n ))\n :\n <div class=\"helperText\">{this.noResultText}</div>\n )\n }\n {(this.innerResults && this.innerResults.length > 0) &&\n <div class=\"totalRes\">\n <jump-button variant=\"secondary\" size=\"small\" text onClick={() => this.btnOrShowOtherClicked()} target=\"_blank\"> {this.showAllResText} </jump-button>\n {this.totalResults && <div>{this.totalResults} {this.resultsText}</div>}\n </div>\n }\n </div>\n </div>\n }\n </div>\n }\n\n render() {\n if (this.variant === 'linear' && this.linearIconOnly) {\n return this.renderLinearIconOnly();\n } else {\n return this.renderDefault();\n }\n }\n}"]}
|
|
1
|
+
{"version":3,"file":"jump-search-bar.js","sourceRoot":"","sources":["../../../src/components/jump-search-bar/jump-search-bar.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAgB,MAAM,eAAe,CAAC;AAO5G,MAAM,OAAO,aAAa;;QA8GxB,qCAAqC;QACrC,gBAAW,GAAG,GAAG,EAAE;YACjB,MAAM,kBAAkB,GAAG,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;YACpE,IAAI,kBAAkB,EAAE,CAAC;gBACvB,kBAAkB,CAAC,SAAS,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;YAC9C,CAAC;QACH,CAAC,CAAC;QAEF,oCAAoC;QACpC,eAAU,GAAG,GAAG,EAAE;YAChB,MAAM,kBAAkB,GAAG,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;YACpE,IAAI,kBAAkB,EAAE,CAAC;gBACvB,kBAAkB,CAAC,SAAS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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Method, Watch, Listen, State, Host, h, Prop, Event, EventEmitter } from '@stencil/core';\n\n@Component({\n tag: 'jump-search-bar',\n styleUrl: 'jump-search-bar.scss',\n shadow: true,\n})\nexport class JumpSearchBar {\n\n /* ---------------------- @OWN PROPERTIES ------------------------- */\n jumpSearchBar: HTMLInputElement;\n private componentRef: HTMLElement;\n\n /* ---------------------- @STATE ------------------------- */\n @State() dropdownVisible: boolean = false;\n @State() searchValue: string = undefined;\n\n @Watch('searchValue')\n searchValueChanged(newValue: string) {\n if (newValue === '') {\n // Create a new array reference to trigger re-render\n this.innerResults = [...this.recents];\n this.results = [];\n }\n }\n\n @State() resType: string = 'recents';\n @State() innerResults: Array<object> = [];\n @State() totalResults: number = 0;\n @State() isExpanded: boolean = false; \n\n /* ---------------------- @PROPERTIES ------------------------- */\n @Prop() placeholder: string = 'Cerca...'; //Il testo del placeholder dell\\'input della searchbar\n @Prop() noResultText: string = 'Nessun risultato corrispondente'; // Il testo da mostrare in caso nessun risultato sia stato recuperato.\n @Prop() loadingText: string = 'Sto caricando...'; // Il testo mostrato durante il caricamento dei risultati.\n @Prop() resultsText: string = 'risultati'; // Il testo mostrato accanto al numero di risultati totali.\n @Prop() showAllResText: string = 'Mostra tutti i risultati'; // La label da mostrare per il pulsante che mostra tutti i risultati.\n @Prop() identifier: string = 'search-bar'; // Identificatore della searchbar\n @Prop() debounceTime: number = 500; // 'Il tempo di attesa per l\\'invio della ricerca in caso di ricerca automatica. In millisecondi.\n @Prop() variant: string = 'outline'; // Scelta dello stile della barra di ricerca tra filled, linear e outline.\n @Prop() withBtn: boolean = false; // Se true, aggiunge un pulsante alla barra di ricerca\n @Prop() recentsTitle: string = 'Recenti'; // Serve per il titolo del dropwdown quando si vedono le ricerche recenti\n @Prop() recents: Array<object> = []; // Serve per il dropdown quando si vedono le ricerche recenti\n @Prop() results: Array<object> = []; // Serve per il dropdown quando si vedono i risultati della ricerca\n @Prop() dropdown: boolean = false; // Se true, mostra il dropdown con i risultati della ricerca.\n @Prop() linearIconOnly: boolean = false; // Se true, mostra solo l'icona nella barra di ricerca lineare\n @Prop() dropdownPosition: string = 'relative'; // Posizione del dropdown rispetto alla searchbar. \"relative\" o \"absolute\"\n\n\n /* ---------------------- @EVENTS ------------------------- */\n\n /**\n * Evento emesso quando l'utente clicca sull'icona in variant linear e linearIconOnly\n */\n @Event({ eventName: 'jump-search-bar-expanded' }) searchbarExpanded: EventEmitter;\n\n /**\n * Evento emesso quando l'utente effettua una ricerca \n * Emette un oggetto contenenente il valore della ricerca alla chiave 'search'\n * */\n @Event({ eventName: 'jump-search-bar' }) search: EventEmitter;\n @Event({ eventName: 'jump-filterchange' }) searchFilters: EventEmitter; // E' analoga a quella sopra ma serve per i filtri\n\n /** \n * Evento emesso quando l'utente clicca sul pulsante (se presente) o nel pulsante del dropdown per vedere tutti i risultati \n * Emette un oggetto contenenente il valore della ricerca alla chiave 'search'\n */\n @Event({ eventName: 'jump-search-bar-show-all' }) showFullSearch: EventEmitter;\n\n /* \n * Evento da ascoltare per recuperare il dato cliccato\n * Emette un oggetto contenente tutti i dati relativi al risultato cliccato.\n */\n @Event({ eventName: 'jump-search-bar-res-clicked'}) resultClicked: EventEmitter; \n\n /* ---------------------- @LIFECYCLE ------------------------- */\n componentDidLoad() {\n // Aggiungi l'event listener per il clic al di fuori del componente\n document.addEventListener('click', this.handleOutsideClick.bind(this));\n }\n\n disconnectedCallback() {\n // Rimuovi l'event listener per evitare perdite di memoria\n document.removeEventListener('click', this.handleOutsideClick.bind(this));\n }\n\n /* -------------------- @LISTEN ------------------------------- */\n @Listen(\"jump-search-bar-dropdown-item-connected\")\n addOption(e) {\n let props = e.detail; // es {code: 'sku1', imageUrl: 'https://google.com/'}\n\n // Aggiungi l'elemento solo a `recents`\n this.recents = [...this.recents, { ...props }];\n\n // Aggiorna `innerResults` basandoti solo su `recents`\n this.innerResults = [...this.recents];\n }\n\n\n /* -------------------- @METHOD ------------------------------- */\n\n /** Imposta i risultati della ricerca all'interno della dropdown */\n @Method()\n async setResults(results, tot?: number) {\n this.results = results;\n this.innerResults = results;\n this.totalResults = tot;\n }\n\n /* -------------------- LOCAL METHODS ------------------------- */\n handleOutsideClick(event: MouseEvent) {\n // Controlla se il clic è fuori dal componente\n if (this.componentRef && !this.componentRef.contains(event.target as Node)) {\n this.dropdownVisible = false;\n }\n }\n\n // Gestisce l'evento focus sull'input\n handleFocus = () => {\n const searchBarContainer = this.jumpSearchBar.closest('.SearchBar');\n if (searchBarContainer) {\n searchBarContainer.classList.add('focused');\n }\n };\n\n // Gestisce l'evento blur sull'input\n handleBlur = () => {\n const searchBarContainer = this.jumpSearchBar.closest('.SearchBar');\n if (searchBarContainer) {\n searchBarContainer.classList.remove('focused');\n }\n };\n\n doSearch = () => {\n if (this.jumpSearchBar) {\n this.searchValue = this.jumpSearchBar.value;\n \n // Iniziare la ricerca solamente se ci sono almeno tre caratteri \n if (this.searchValue.length >= 3) {\n this.resType = 'results';\n\n this.innerResults = undefined;\n \n this.search.emit({ search: this.searchValue });\n this.searchFilters.emit({ name: 'search', value: this.searchValue });\n \n // Se il dropdown è chiuso, aprilo. Potrebbe essere chiuso perchè non ci sono recenti\n if (!this.dropdownVisible) {\n this.dropdownVisible = true;\n }\n } else if(this.searchValue.length == 0) {\n this.dropdownVisible = false;\n }\n }\n };\n\n debounce(fn, delay = this.debounceTime) {\n let timeoutId;\n\n return (...args) => {\n if (timeoutId) {\n clearTimeout(timeoutId);\n }\n timeoutId = setTimeout(() => {\n fn.apply(null, args);\n }, delay);\n };\n };\n\n openDropdown() {\n this.resType = 'recents';\n this.dropdownVisible = true;\n }\n\n /** Emette l'evento di click su un risultato, mandandone tutti i dati */\n handleResClicked(item) {\n this.resultClicked.emit({ clicked: item });\n } \n\n /** Emette l'evento quando l'utente clicca sul pulsante (se presente) o nel pulsante del dropdown per vedere tutti i risultati */\n btnOrShowOtherClicked(){\n this.showFullSearch.emit({ search: this.searchValue });\n }\n\n /**\n * Se clicco l'icona espando la searchbar ed emetto un evento dedicato\n */\n expandSearchBar() {\n this.isExpanded = true;\n this.searchbarExpanded.emit();\n }\n\n\n /* --------------------- RENDER ------------------------------- */\n renderLinearIconOnly() {\n return (\n <Host class={\"JumpSearchBar \"} ref={(el) => (this.componentRef = el as HTMLElement)}>\n <div class={\"SearchBar iconOnly \" + this.variant + (this.isExpanded ? \" expanded\" : \"\")}>\n <div class=\"InputWrapper\" onClick={(this.isExpanded && this.dropdown && this.recents.length > 0) ? () => this.openDropdown() : null}>\n <jump-icon\n name=\"magnifying-glass\"\n category=\"light\"\n onClick={() => this.expandSearchBar()}\n ></jump-icon>\n {this.isExpanded &&\n // Mostra la barra di ricerca con l'animazione di slide\n <input\n placeholder={this.placeholder}\n type=\"search\"\n id={this.identifier}\n class=\"search-input\"\n ref={(el) => { this.jumpSearchBar = el as HTMLInputElement }}\n onInput={this.debounce(this.doSearch)}\n onFocus={this.handleFocus}\n onBlur={this.handleBlur}\n />\n }\n </div>\n </div>\n {(this.dropdown && this.dropdownVisible) && this.renderDropdown()} \n </Host>\n );\n }\n\n renderDefault() {\n return (\n <Host class={\"JumpSearchBar\"} ref={(el) => (this.componentRef = el as HTMLElement)}>\n <div class={\"SearchBar \" + this.variant + \" \" + (this.withBtn ? \"withBtn\" : \"\") + (this.isExpanded ? \" expanded\" : \"\")}>\n <div class=\"InputWrapper\" onClick={(this.dropdown && this.recents.length > 0) ? () => this.openDropdown() : null}>\n {!this.withBtn && <jump-icon name=\"magnifying-glass\" category=\"light\"></jump-icon>}\n <input\n placeholder={this.placeholder}\n type=\"search\"\n id={this.identifier}\n class=\"search-input\"\n ref={(el) => { this.jumpSearchBar = el as HTMLInputElement }}\n onInput={this.debounce(this.doSearch)}\n onFocus={this.handleFocus}\n onBlur={this.handleBlur}\n />\n </div>\n {this.withBtn && !this.linearIconOnly && (\n <jump-button\n variant=\"secondary\"\n size=\"medium\"\n name=\"scopri\"\n value=\"value\"\n aria-label=\"Scopri di più\"\n id=\"button\"\n onlyIcon\n onClick={() => this.btnOrShowOtherClicked()}\n >\n <jump-icon slot=\"suffix\" name=\"magnifying-glass\"></jump-icon>\n </jump-button>\n )}\n </div>\n {(this.dropdown && this.dropdownVisible) && this.renderDropdown()} \n </Host>\n );\n }\n\n renderDropdown(){\n console.log('POSITION', this.dropdownPosition);\n return <div class={\"Dropdown \" + (this.dropdownPosition == 'absolute' ? 'dropAbsolute' : 'dropRelative' ) }>\n {(this.resType == 'recents') &&\n <div class=\"Dropdown__Recents\">\n <span class=\"title\">{this.recentsTitle}</span>\n <div class=\"ResWrapper\">\n {this.innerResults.length > 0 && this.innerResults.map((item) => (\n <div onClick={() => this.handleResClicked(item)}>\n <jump-icon name=\"magnifying-glass\" category=\"light\"></jump-icon>\n {item['value']}\n </div>\n ))}\n </div>\n </div>\n }\n {this.resType == 'results' &&\n <div class=\"Dropdown__Results\">\n <div class=\"ResWrapper\">\n {this.innerResults === undefined ?\n <div class=\"helperText\"><svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 100 100\" preserveAspectRatio=\"xMidYMid\" width=\"252\" height=\"252\" ><g><g transform=\"rotate(0 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"-0.9s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g transform=\"rotate(36 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"-0.8s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g transform=\"rotate(72 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"-0.7s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g transform=\"rotate(108 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"-0.6s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g transform=\"rotate(144 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"-0.5s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g transform=\"rotate(180 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"-0.4s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g transform=\"rotate(216 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"-0.3s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g transform=\"rotate(252 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"-0.2s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g transform=\"rotate(288 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"-0.1s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g transform=\"rotate(324 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"0s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g></g></g></svg>{this.loadingText}</div>\n :\n (this.innerResults.length > 0 ?\n this.innerResults.map((item) => (\n <div onClick={() => this.handleResClicked(item)} key={item['id']}>\n {item['img'] && <img src={item['img']} alt=\"result\" />}\n {item['value']}\n </div>\n ))\n :\n <div class=\"helperText\">{this.noResultText}</div>\n )\n }\n {(this.innerResults && this.innerResults.length > 0) &&\n <div class=\"totalRes\">\n <jump-button variant=\"secondary\" size=\"small\" text onClick={() => this.btnOrShowOtherClicked()} target=\"_blank\"> {this.showAllResText} </jump-button>\n {this.totalResults && <div>{this.totalResults} {this.resultsText}</div>}\n </div>\n }\n </div>\n </div>\n }\n </div>\n }\n\n render() {\n if (this.variant === 'linear' && this.linearIconOnly) {\n return this.renderLinearIconOnly();\n } else {\n return this.renderDefault();\n }\n }\n}"]}
|
|
@@ -37,7 +37,7 @@ const JumpSearchBar$1 = /*@__PURE__*/ proxyCustomElement(class JumpSearchBar ext
|
|
|
37
37
|
this.resType = 'results';
|
|
38
38
|
this.innerResults = undefined;
|
|
39
39
|
this.search.emit({ search: this.searchValue });
|
|
40
|
-
this.searchFilters.emit({ search: this.searchValue });
|
|
40
|
+
this.searchFilters.emit({ name: 'search', value: this.searchValue });
|
|
41
41
|
// Se il dropdown è chiuso, aprilo. Potrebbe essere chiuso perchè non ci sono recenti
|
|
42
42
|
if (!this.dropdownVisible) {
|
|
43
43
|
this.dropdownVisible = true;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"jump-search-bar.js","mappings":";;;;AAAA,MAAM,gBAAgB,GAAG,iyHAAiyH,CAAC;AAC3zH,4BAAe,gBAAgB;;MCMlBA,eAAa;;;;;;;;;;;QA+GxB,gBAAW,GAAG;YACZ,MAAM,kBAAkB,GAAG,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;YACpE,IAAI,kBAAkB,EAAE;gBACtB,kBAAkB,CAAC,SAAS,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;aAC7C;SACF,CAAC;;QAGF,eAAU,GAAG;YACX,MAAM,kBAAkB,GAAG,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;YACpE,IAAI,kBAAkB,EAAE;gBACtB,kBAAkB,CAAC,SAAS,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;aAChD;SACF,CAAC;QAEF,aAAQ,GAAG;YACT,IAAI,IAAI,CAAC,aAAa,EAAE;gBACtB,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC;;gBAG5C,IAAI,IAAI,CAAC,WAAW,CAAC,MAAM,IAAI,CAAC,EAAE;oBAChC,IAAI,CAAC,OAAO,GAAG,SAAS,CAAC;oBAEzB,IAAI,CAAC,YAAY,GAAG,SAAS,CAAC;oBAE9B,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,M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AI,CAAC,EAAE,GAAG,EAAE,IAAI,CAAC,IAAI,CAAC,IAC7D,IAAI,CAAC,KAAK,CAAC,IAAI,WAAK,GAAG,EAAE,IAAI,CAAC,KAAK,CAAC,EAAE,GAAG,EAAC,QAAQ,GAAG,EACrD,IAAI,CAAC,OAAO,CAAC,CACV,CACP,CAAC;;4BAEF,WAAK,KAAK,EAAC,YAAY,IAAE,IAAI,CAAC,YAAY,CAAO,CAClD,EAEF,CAAC,IAAI,CAAC,YAAY,IAAI,IAAI,CAAC,YAAY,CAAC,MAAM,GAAG,CAAC;gBACjD,WAAK,KAAK,EAAC,UAAU,IACnB,mBAAa,OAAO,EAAC,WAAW,EAAC,IAAI,EAAC,OAAO,EAAC,IAAI,QAAC,OAAO,EAAE,MAAM,IAAI,CAAC,qBAAqB,EAAE,EAAE,MAAM,EAAC,QAAQ,SAAG,IAAI,CAAC,cAAc,MAAgB,EACpJ,IAAI,CAAC,YAAY,IAAI,eAAM,IAAI,CAAC,YAAY,OAAG,IAAI,CAAC,WAAW,CAAO,CACnE,CAEJ,CACF,CAEJ,CAAA;KACT;IAED,MAAM;QACJ,IAAI,IAAI,CAAC,OAAO,KAAK,QAAQ,IAAI,IAAI,CAAC,cAAc,EAAE;YACpD,OAAO,IAAI,CAAC,oBAAoB,EAAE,CAAC;SACpC;aAAM;YACL,OAAO,IAAI,CAAC,aAAa,EAAE,CAAC;SAC7B;KACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["JumpSearchBar"],"sources":["src/components/jump-search-bar/jump-search-bar.scss?tag=jump-search-bar&encapsulation=shadow","src/components/jump-search-bar/jump-search-bar.tsx"],"sourcesContent":[":host {\n display: block;\n\n --jump-search-bar-focus-color: var(--secondary-standard, #5E79BA);\n --jump-search-bar-border-color: var(--neutral-grey-secondary, #707070);\n --jump-search-bar-bg-color: var(--gray-ultralight, #F8F8F8);\n --jump-search-bar-dropdown-border-color: var(--neutral-grey-disabled, #CBCBCB);\n\n font-family: var(--ff-primary);\n\n jump-button {\n --jump-button-border-radius: 0px 3px 3px 0px;\n }\n\n .SearchBar {\n position: relative;\n\n &.focused .InputWrapper {\n border-color: var(--jump-search-bar-focus-color) !important;\n \n jump-icon {\n color: var(--jump-search-bar-focus-color) !important;\n }\n \n input {\n outline: none !important;\n }\n }\n }\n\n .SearchBar:not(.iconOnly) {\n display: flex;\n width: 100%;\n \n .InputWrapper {\n width: 100%;\n display: flex;\n }\n \n input {\n width: 100%;\n border: none;\n }\n \n /* Stile outline*/\n &.outline .InputWrapper {\n border: 1px solid var(--jump-search-bar-border-color);\n border-radius: 3px;\n padding: 12px;\n gap: 8px;\n \n jump-icon {\n color: var(--jump-search-bar-border-color);\n }\n }\n \n &.outline.withBtn .InputWrapper {\n border-radius: 3px 0px 0px 3px;\n }\n \n \n /* Stile filled */\n &.filled .InputWrapper {\n border: 1px solid var(--jump-search-bar-bg-color);\n background-color: var(--jump-search-bar-bg-color);\n border-radius: 3px;\n padding: 12px;\n gap: 8px;\n \n input {\n background-color: var(--jump-search-bar-bg-color);\n }\n \n jump-icon {\n color: var(--jump-search-bar-border-color);\n }\n }\n \n &.filled.focused.withBtn .InputWrapper {\n border-radius: 3px 0px 0px 3px !important;\n }\n \n /* Stile linear */\n &.linear .InputWrapper {\n border-bottom: 1px solid var(--jump-search-bar-border-color);\n padding-bottom: 4px;\n \n jump-icon {\n padding-right: 6px;\n }\n }\n }\n \n \n .Dropdown {\n\n &.dropAbsolute {\n position: absolute;\n box-sizing: border-box;\n position: absolute;\n left: 0;\n width: 100%;\n }\n\n &.dropRelative {\n position: relative;\n }\n\n // position: absolute; la tolgo per il test\n margin-top: 10px;\n border-radius: 3px;\n border: 1px solid var(--jump-search-bar-dropdown-border-color);\n padding: 4px 16px;\n background-color: white;\n\n &__Recents {\n .title {\n color: #707070;\n font-size: 14px;\n line-height: 20px;\n padding: 8px 0;\n font-weight: 700;\n display: flex;\n }\n }\n\n &__Results {\n .totalRes {\n display: flex; \n justify-content: space-between;\n }\n }\n \n\n .ResWrapper {\n display: flex;\n flex-direction: column;\n\n div {\n padding: 8px 0;\n color: #707070;\n font-size: 14px;\n display: flex;\n gap: 12px;\n align-items: center;\n\n img {\n width: 40px;\n height: 48px;\n object-fit: cover;\n border-radius: 3px;\n }\n }\n\n div:hover {\n cursor: pointer;\n }\n\n .helperText {\n color: #CBCBCB;\n\n svg {\n width: 25px;\n height: 25px;\n }\n }\n }\n }\n\n/* Applicazione dell'animazione alla SearchBar.iconOnly.linear */\n.SearchBar.iconOnly.linear {\n display: flex;\n width: 100%;\n\n .InputWrapper {\n width: 100%;\n display: flex;\n align-items: center;\n transition: border-bottom 0.3s ease;\n /* Transizione solo per il bordo inferiore */\n border-bottom: 1px solid transparent;\n /* Nessun bordo inizialmente */\n padding-bottom: 4px;\n overflow: hidden;\n /* Per nascondere il contenuto che esce dai limiti dell'InputWrapper */\n\n jump-icon {\n padding-right: 6px;\n /* Padding dell'icona */\n }\n\n input {\n width: 0;\n /* Imposta la larghezza iniziale a 0 */\n border: none;\n transform: translateX(-100%);\n /* Sposta l'input fuori dalla vista */\n transition: width 0.3s ease, transform 0.3s ease;\n /* Transizioni separate per width e transform */\n animation: none;\n /* Disabilita l'animazione predefinita */\n }\n }\n\n &.expanded {\n .InputWrapper {\n border-bottom: 1px solid var(--jump-search-bar-border-color);\n /* Mostra il bordo inferiore quando espanso */\n transition: border-bottom 0.3s ease;\n /* Transizione per il bordo inferiore */\n\n input {\n width: 100%;\n /* Espande l'input a tutta la larghezza disponibile */\n transform: translateX(0);\n /* Riposiziona l'input nella vista */\n animation: slide-right 0.3s ease forwards;\n /* Applicazione dell'animazione slide-right */\n }\n }\n }\n}\n \n}\n\n@keyframes slide-right {\n from {\n transform: translateX(-100%);\n opacity: 0;\n }\n\n to {\n transform: translateX(0);\n opacity: 1;\n }\n}\n\n@keyframes border-slide-right {\n from {\n border-bottom-width: 0;\n }\n\n to {\n border-bottom-width: 1px;\n }\n}","import { Component, Method, Watch, Listen, State, Host, h, Prop, Event, EventEmitter } from '@stencil/core';\n\n@Component({\n tag: 'jump-search-bar',\n styleUrl: 'jump-search-bar.scss',\n shadow: true,\n})\nexport class JumpSearchBar {\n\n /* ---------------------- @OWN PROPERTIES ------------------------- */\n jumpSearchBar: HTMLInputElement;\n private componentRef: HTMLElement;\n\n /* ---------------------- @STATE ------------------------- */\n @State() dropdownVisible: boolean = false;\n @State() searchValue: string = undefined;\n\n @Watch('searchValue')\n searchValueChanged(newValue: string) {\n if (newValue === '') {\n // Create a new array reference to trigger re-render\n this.innerResults = [...this.recents];\n this.results = [];\n }\n }\n\n @State() resType: string = 'recents';\n @State() innerResults: Array<object> = [];\n @State() totalResults: number = 0;\n @State() isExpanded: boolean = false; \n\n /* ---------------------- @PROPERTIES ------------------------- */\n @Prop() placeholder: string = 'Cerca...'; //Il testo del placeholder dell\\'input della searchbar\n @Prop() noResultText: string = 'Nessun risultato corrispondente'; // Il testo da mostrare in caso nessun risultato sia stato recuperato.\n @Prop() loadingText: string = 'Sto caricando...'; // Il testo mostrato durante il caricamento dei risultati.\n @Prop() resultsText: string = 'risultati'; // Il testo mostrato accanto al numero di risultati totali.\n @Prop() showAllResText: string = 'Mostra tutti i risultati'; // La label da mostrare per il pulsante che mostra tutti i risultati.\n @Prop() identifier: string = 'search-bar'; // Identificatore della searchbar\n @Prop() debounceTime: number = 500; // 'Il tempo di attesa per l\\'invio della ricerca in caso di ricerca automatica. In millisecondi.\n @Prop() variant: string = 'outline'; // Scelta dello stile della barra di ricerca tra filled, linear e outline.\n @Prop() withBtn: boolean = false; // Se true, aggiunge un pulsante alla barra di ricerca\n @Prop() recentsTitle: string = 'Recenti'; // Serve per il titolo del dropwdown quando si vedono le ricerche recenti\n @Prop() recents: Array<object> = []; // Serve per il dropdown quando si vedono le ricerche recenti\n @Prop() results: Array<object> = []; // Serve per il dropdown quando si vedono i risultati della ricerca\n @Prop() dropdown: boolean = false; // Se true, mostra il dropdown con i risultati della ricerca.\n @Prop() linearIconOnly: boolean = false; // Se true, mostra solo l'icona nella barra di ricerca lineare\n @Prop() dropdownPosition: string = 'relative'; // Posizione del dropdown rispetto alla searchbar. \"relative\" o \"absolute\"\n\n\n /* ---------------------- @EVENTS ------------------------- */\n\n /**\n * Evento emesso quando l'utente clicca sull'icona in variant linear e linearIconOnly\n */\n @Event({ eventName: 'jump-search-bar-expanded' }) searchbarExpanded: EventEmitter;\n\n /**\n * Evento emesso quando l'utente effettua una ricerca \n * Emette un oggetto contenenente il valore della ricerca alla chiave 'search'\n * */\n @Event({ eventName: 'jump-search-bar' }) search: EventEmitter;\n @Event({ eventName: 'jump-filterchange' }) searchFilters: EventEmitter; // E' analoga a quella sopra ma serve per i filtri\n\n /** \n * Evento emesso quando l'utente clicca sul pulsante (se presente) o nel pulsante del dropdown per vedere tutti i risultati \n * Emette un oggetto contenenente il valore della ricerca alla chiave 'search'\n */\n @Event({ eventName: 'jump-search-bar-show-all' }) showFullSearch: EventEmitter;\n\n /* \n * Evento da ascoltare per recuperare il dato cliccato\n * Emette un oggetto contenente tutti i dati relativi al risultato cliccato.\n */\n @Event({ eventName: 'jump-search-bar-res-clicked'}) resultClicked: EventEmitter; \n\n /* ---------------------- @LIFECYCLE ------------------------- */\n componentDidLoad() {\n // Aggiungi l'event listener per il clic al di fuori del componente\n document.addEventListener('click', this.handleOutsideClick.bind(this));\n }\n\n disconnectedCallback() {\n // Rimuovi l'event listener per evitare perdite di memoria\n document.removeEventListener('click', this.handleOutsideClick.bind(this));\n }\n\n /* -------------------- @LISTEN ------------------------------- */\n @Listen(\"jump-search-bar-dropdown-item-connected\")\n addOption(e) {\n let props = e.detail; // es {code: 'sku1', imageUrl: 'https://google.com/'}\n\n // Aggiungi l'elemento solo a `recents`\n this.recents = [...this.recents, { ...props }];\n\n // Aggiorna `innerResults` basandoti solo su `recents`\n this.innerResults = [...this.recents];\n }\n\n\n /* -------------------- @METHOD ------------------------------- */\n\n /** Imposta i risultati della ricerca all'interno della dropdown */\n @Method()\n async setResults(results, tot?: number) {\n this.results = results;\n this.innerResults = results;\n this.totalResults = tot;\n }\n\n /* -------------------- LOCAL METHODS ------------------------- */\n handleOutsideClick(event: MouseEvent) {\n // Controlla se il clic è fuori dal componente\n if (this.componentRef && !this.componentRef.contains(event.target as Node)) {\n this.dropdownVisible = false;\n }\n }\n\n // Gestisce l'evento focus sull'input\n handleFocus = () => {\n const searchBarContainer = this.jumpSearchBar.closest('.SearchBar');\n if (searchBarContainer) {\n searchBarContainer.classList.add('focused');\n }\n };\n\n // Gestisce l'evento blur sull'input\n handleBlur = () => {\n const searchBarContainer = this.jumpSearchBar.closest('.SearchBar');\n if (searchBarContainer) {\n searchBarContainer.classList.remove('focused');\n }\n };\n\n doSearch = () => {\n if (this.jumpSearchBar) {\n this.searchValue = this.jumpSearchBar.value;\n \n // Iniziare la ricerca solamente se ci sono almeno tre caratteri \n if (this.searchValue.length >= 3) {\n this.resType = 'results';\n\n this.innerResults = undefined;\n \n this.search.emit({ search: this.searchValue });\n this.searchFilters.emit({ search: this.searchValue });\n \n // Se il dropdown è chiuso, aprilo. Potrebbe essere chiuso perchè non ci sono recenti\n if (!this.dropdownVisible) {\n this.dropdownVisible = true;\n }\n } else if(this.searchValue.length == 0) {\n this.dropdownVisible = false;\n }\n }\n };\n\n debounce(fn, delay = this.debounceTime) {\n let timeoutId;\n\n return (...args) => {\n if (timeoutId) {\n clearTimeout(timeoutId);\n }\n timeoutId = setTimeout(() => {\n fn.apply(null, args);\n }, delay);\n };\n };\n\n openDropdown() {\n this.resType = 'recents';\n this.dropdownVisible = true;\n }\n\n /** Emette l'evento di click su un risultato, mandandone tutti i dati */\n handleResClicked(item) {\n this.resultClicked.emit({ clicked: item });\n } \n\n /** Emette l'evento quando l'utente clicca sul pulsante (se presente) o nel pulsante del dropdown per vedere tutti i risultati */\n btnOrShowOtherClicked(){\n this.showFullSearch.emit({ search: this.searchValue });\n }\n\n /**\n * Se clicco l'icona espando la searchbar ed emetto un evento dedicato\n */\n expandSearchBar() {\n this.isExpanded = true;\n this.searchbarExpanded.emit();\n }\n\n\n /* --------------------- RENDER ------------------------------- */\n renderLinearIconOnly() {\n return (\n <Host class={\"JumpSearchBar \"} ref={(el) => (this.componentRef = el as HTMLElement)}>\n <div class={\"SearchBar iconOnly \" + this.variant + (this.isExpanded ? \" expanded\" : \"\")}>\n <div class=\"InputWrapper\" onClick={(this.isExpanded && this.dropdown && this.recents.length > 0) ? () => this.openDropdown() : null}>\n <jump-icon\n name=\"magnifying-glass\"\n category=\"light\"\n onClick={() => this.expandSearchBar()}\n ></jump-icon>\n {this.isExpanded &&\n // Mostra la barra di ricerca con l'animazione di slide\n <input\n placeholder={this.placeholder}\n type=\"search\"\n id={this.identifier}\n class=\"search-input\"\n ref={(el) => { this.jumpSearchBar = el as HTMLInputElement }}\n onInput={this.debounce(this.doSearch)}\n onFocus={this.handleFocus}\n onBlur={this.handleBlur}\n />\n }\n </div>\n </div>\n {(this.dropdown && this.dropdownVisible) && this.renderDropdown()} \n </Host>\n );\n }\n\n renderDefault() {\n return (\n <Host class={\"JumpSearchBar\"} ref={(el) => (this.componentRef = el as HTMLElement)}>\n <div class={\"SearchBar \" + this.variant + \" \" + (this.withBtn ? \"withBtn\" : \"\") + (this.isExpanded ? \" expanded\" : \"\")}>\n <div class=\"InputWrapper\" onClick={(this.dropdown && this.recents.length > 0) ? () => this.openDropdown() : null}>\n {!this.withBtn && <jump-icon name=\"magnifying-glass\" category=\"light\"></jump-icon>}\n <input\n placeholder={this.placeholder}\n type=\"search\"\n id={this.identifier}\n class=\"search-input\"\n ref={(el) => { this.jumpSearchBar = el as HTMLInputElement }}\n onInput={this.debounce(this.doSearch)}\n onFocus={this.handleFocus}\n onBlur={this.handleBlur}\n />\n </div>\n {this.withBtn && !this.linearIconOnly && (\n <jump-button\n variant=\"secondary\"\n size=\"medium\"\n name=\"scopri\"\n value=\"value\"\n aria-label=\"Scopri di più\"\n id=\"button\"\n onlyIcon\n onClick={() => this.btnOrShowOtherClicked()}\n >\n <jump-icon slot=\"suffix\" name=\"magnifying-glass\"></jump-icon>\n </jump-button>\n )}\n </div>\n {(this.dropdown && this.dropdownVisible) && this.renderDropdown()} \n </Host>\n );\n }\n\n renderDropdown(){\n console.log('POSITION', this.dropdownPosition);\n return <div class={\"Dropdown \" + (this.dropdownPosition == 'absolute' ? 'dropAbsolute' : 'dropRelative' ) }>\n {(this.resType == 'recents') &&\n <div class=\"Dropdown__Recents\">\n <span class=\"title\">{this.recentsTitle}</span>\n <div class=\"ResWrapper\">\n {this.innerResults.length > 0 && this.innerResults.map((item) => (\n <div onClick={() => this.handleResClicked(item)}>\n <jump-icon name=\"magnifying-glass\" category=\"light\"></jump-icon>\n {item['value']}\n </div>\n ))}\n </div>\n </div>\n }\n {this.resType == 'results' &&\n <div class=\"Dropdown__Results\">\n <div class=\"ResWrapper\">\n {this.innerResults === undefined ?\n <div class=\"helperText\"><svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 100 100\" preserveAspectRatio=\"xMidYMid\" width=\"252\" height=\"252\" ><g><g transform=\"rotate(0 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"-0.9s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g transform=\"rotate(36 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"-0.8s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g transform=\"rotate(72 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"-0.7s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g transform=\"rotate(108 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"-0.6s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g transform=\"rotate(144 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"-0.5s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g transform=\"rotate(180 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"-0.4s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g transform=\"rotate(216 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"-0.3s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g transform=\"rotate(252 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"-0.2s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g transform=\"rotate(288 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"-0.1s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g transform=\"rotate(324 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"0s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g></g></g></svg>{this.loadingText}</div>\n :\n (this.innerResults.length > 0 ?\n this.innerResults.map((item) => (\n <div onClick={() => this.handleResClicked(item)} key={item['id']}>\n {item['img'] && <img src={item['img']} alt=\"result\" />}\n {item['value']}\n </div>\n ))\n :\n <div class=\"helperText\">{this.noResultText}</div>\n )\n }\n {(this.innerResults && this.innerResults.length > 0) &&\n <div class=\"totalRes\">\n <jump-button variant=\"secondary\" size=\"small\" text onClick={() => this.btnOrShowOtherClicked()} target=\"_blank\"> {this.showAllResText} </jump-button>\n {this.totalResults && <div>{this.totalResults} {this.resultsText}</div>}\n </div>\n }\n </div>\n </div>\n }\n </div>\n }\n\n render() {\n if (this.variant === 'linear' && this.linearIconOnly) {\n return this.renderLinearIconOnly();\n } else {\n return this.renderDefault();\n }\n }\n}"],"version":3}
|
|
1
|
+
{"file":"jump-search-bar.js","mappings":";;;;AAAA,MAAM,gBAAgB,GAAG,iyHAAiyH,CAAC;AAC3zH,4BAAe,gBAAgB;;MCMlBA,eAAa;;;;;;;;;;;QA+GxB,gBAAW,GAAG;YACZ,MAAM,kBAAkB,GAAG,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;YACpE,IAAI,kBAAkB,EAAE;gBACtB,kBAAkB,CAAC,SAAS,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;aAC7C;SACF,CAAC;;QAGF,eAAU,GAAG;YACX,MAAM,kBAAkB,GAAG,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;Y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O,IAAI,CAAC,oBAAoB,EAAE,CAAC;SACpC;aAAM;YACL,OAAO,IAAI,CAAC,aAAa,EAAE,CAAC;SAC7B;KACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["JumpSearchBar"],"sources":["src/components/jump-search-bar/jump-search-bar.scss?tag=jump-search-bar&encapsulation=shadow","src/components/jump-search-bar/jump-search-bar.tsx"],"sourcesContent":[":host {\n display: block;\n\n --jump-search-bar-focus-color: var(--secondary-standard, #5E79BA);\n --jump-search-bar-border-color: var(--neutral-grey-secondary, #707070);\n --jump-search-bar-bg-color: var(--gray-ultralight, #F8F8F8);\n --jump-search-bar-dropdown-border-color: var(--neutral-grey-disabled, #CBCBCB);\n\n font-family: var(--ff-primary);\n\n jump-button {\n --jump-button-border-radius: 0px 3px 3px 0px;\n }\n\n .SearchBar {\n position: relative;\n\n &.focused .InputWrapper {\n border-color: var(--jump-search-bar-focus-color) !important;\n \n jump-icon {\n color: var(--jump-search-bar-focus-color) !important;\n }\n \n input {\n outline: none !important;\n }\n }\n }\n\n .SearchBar:not(.iconOnly) {\n display: flex;\n width: 100%;\n \n .InputWrapper {\n width: 100%;\n display: flex;\n }\n \n input {\n width: 100%;\n border: none;\n }\n \n /* Stile outline*/\n &.outline .InputWrapper {\n border: 1px solid var(--jump-search-bar-border-color);\n border-radius: 3px;\n padding: 12px;\n gap: 8px;\n \n jump-icon {\n color: var(--jump-search-bar-border-color);\n }\n }\n \n &.outline.withBtn .InputWrapper {\n border-radius: 3px 0px 0px 3px;\n }\n \n \n /* Stile filled */\n &.filled .InputWrapper {\n border: 1px solid var(--jump-search-bar-bg-color);\n background-color: var(--jump-search-bar-bg-color);\n border-radius: 3px;\n padding: 12px;\n gap: 8px;\n \n input {\n background-color: var(--jump-search-bar-bg-color);\n }\n \n jump-icon {\n color: var(--jump-search-bar-border-color);\n }\n }\n \n &.filled.focused.withBtn .InputWrapper {\n border-radius: 3px 0px 0px 3px !important;\n }\n \n /* Stile linear */\n &.linear .InputWrapper {\n border-bottom: 1px solid var(--jump-search-bar-border-color);\n padding-bottom: 4px;\n \n jump-icon {\n padding-right: 6px;\n }\n }\n }\n \n \n .Dropdown {\n\n &.dropAbsolute {\n position: absolute;\n box-sizing: border-box;\n position: absolute;\n left: 0;\n width: 100%;\n }\n\n &.dropRelative {\n position: relative;\n }\n\n // position: absolute; la tolgo per il test\n margin-top: 10px;\n border-radius: 3px;\n border: 1px solid var(--jump-search-bar-dropdown-border-color);\n padding: 4px 16px;\n background-color: white;\n\n &__Recents {\n .title {\n color: #707070;\n font-size: 14px;\n line-height: 20px;\n padding: 8px 0;\n font-weight: 700;\n display: flex;\n }\n }\n\n &__Results {\n .totalRes {\n display: flex; \n justify-content: space-between;\n }\n }\n \n\n .ResWrapper {\n display: flex;\n flex-direction: column;\n\n div {\n padding: 8px 0;\n color: #707070;\n font-size: 14px;\n display: flex;\n gap: 12px;\n align-items: center;\n\n img {\n width: 40px;\n height: 48px;\n object-fit: cover;\n border-radius: 3px;\n }\n }\n\n div:hover {\n cursor: pointer;\n }\n\n .helperText {\n color: #CBCBCB;\n\n svg {\n width: 25px;\n height: 25px;\n }\n }\n }\n }\n\n/* Applicazione dell'animazione alla SearchBar.iconOnly.linear */\n.SearchBar.iconOnly.linear {\n display: flex;\n width: 100%;\n\n .InputWrapper {\n width: 100%;\n display: flex;\n align-items: center;\n transition: border-bottom 0.3s ease;\n /* Transizione solo per il bordo inferiore */\n border-bottom: 1px solid transparent;\n /* Nessun bordo inizialmente */\n padding-bottom: 4px;\n overflow: hidden;\n /* Per nascondere il contenuto che esce dai limiti dell'InputWrapper */\n\n jump-icon {\n padding-right: 6px;\n /* Padding dell'icona */\n }\n\n input {\n width: 0;\n /* Imposta la larghezza iniziale a 0 */\n border: none;\n transform: translateX(-100%);\n /* Sposta l'input fuori dalla vista */\n transition: width 0.3s ease, transform 0.3s ease;\n /* Transizioni separate per width e transform */\n animation: none;\n /* Disabilita l'animazione predefinita */\n }\n }\n\n &.expanded {\n .InputWrapper {\n border-bottom: 1px solid var(--jump-search-bar-border-color);\n /* Mostra il bordo inferiore quando espanso */\n transition: border-bottom 0.3s ease;\n /* Transizione per il bordo inferiore */\n\n input {\n width: 100%;\n /* Espande l'input a tutta la larghezza disponibile */\n transform: translateX(0);\n /* Riposiziona l'input nella vista */\n animation: slide-right 0.3s ease forwards;\n /* Applicazione dell'animazione slide-right */\n }\n }\n }\n}\n \n}\n\n@keyframes slide-right {\n from {\n transform: translateX(-100%);\n opacity: 0;\n }\n\n to {\n transform: translateX(0);\n opacity: 1;\n }\n}\n\n@keyframes border-slide-right {\n from {\n border-bottom-width: 0;\n }\n\n to {\n border-bottom-width: 1px;\n }\n}","import { Component, Method, Watch, Listen, State, Host, h, Prop, Event, EventEmitter } from '@stencil/core';\n\n@Component({\n tag: 'jump-search-bar',\n styleUrl: 'jump-search-bar.scss',\n shadow: true,\n})\nexport class JumpSearchBar {\n\n /* ---------------------- @OWN PROPERTIES ------------------------- */\n jumpSearchBar: HTMLInputElement;\n private componentRef: HTMLElement;\n\n /* ---------------------- @STATE ------------------------- */\n @State() dropdownVisible: boolean = false;\n @State() searchValue: string = undefined;\n\n @Watch('searchValue')\n searchValueChanged(newValue: string) {\n if (newValue === '') {\n // Create a new array reference to trigger re-render\n this.innerResults = [...this.recents];\n this.results = [];\n }\n }\n\n @State() resType: string = 'recents';\n @State() innerResults: Array<object> = [];\n @State() totalResults: number = 0;\n @State() isExpanded: boolean = false; \n\n /* ---------------------- @PROPERTIES ------------------------- */\n @Prop() placeholder: string = 'Cerca...'; //Il testo del placeholder dell\\'input della searchbar\n @Prop() noResultText: string = 'Nessun risultato corrispondente'; // Il testo da mostrare in caso nessun risultato sia stato recuperato.\n @Prop() loadingText: string = 'Sto caricando...'; // Il testo mostrato durante il caricamento dei risultati.\n @Prop() resultsText: string = 'risultati'; // Il testo mostrato accanto al numero di risultati totali.\n @Prop() showAllResText: string = 'Mostra tutti i risultati'; // La label da mostrare per il pulsante che mostra tutti i risultati.\n @Prop() identifier: string = 'search-bar'; // Identificatore della searchbar\n @Prop() debounceTime: number = 500; // 'Il tempo di attesa per l\\'invio della ricerca in caso di ricerca automatica. In millisecondi.\n @Prop() variant: string = 'outline'; // Scelta dello stile della barra di ricerca tra filled, linear e outline.\n @Prop() withBtn: boolean = false; // Se true, aggiunge un pulsante alla barra di ricerca\n @Prop() recentsTitle: string = 'Recenti'; // Serve per il titolo del dropwdown quando si vedono le ricerche recenti\n @Prop() recents: Array<object> = []; // Serve per il dropdown quando si vedono le ricerche recenti\n @Prop() results: Array<object> = []; // Serve per il dropdown quando si vedono i risultati della ricerca\n @Prop() dropdown: boolean = false; // Se true, mostra il dropdown con i risultati della ricerca.\n @Prop() linearIconOnly: boolean = false; // Se true, mostra solo l'icona nella barra di ricerca lineare\n @Prop() dropdownPosition: string = 'relative'; // Posizione del dropdown rispetto alla searchbar. \"relative\" o \"absolute\"\n\n\n /* ---------------------- @EVENTS ------------------------- */\n\n /**\n * Evento emesso quando l'utente clicca sull'icona in variant linear e linearIconOnly\n */\n @Event({ eventName: 'jump-search-bar-expanded' }) searchbarExpanded: EventEmitter;\n\n /**\n * Evento emesso quando l'utente effettua una ricerca \n * Emette un oggetto contenenente il valore della ricerca alla chiave 'search'\n * */\n @Event({ eventName: 'jump-search-bar' }) search: EventEmitter;\n @Event({ eventName: 'jump-filterchange' }) searchFilters: EventEmitter; // E' analoga a quella sopra ma serve per i filtri\n\n /** \n * Evento emesso quando l'utente clicca sul pulsante (se presente) o nel pulsante del dropdown per vedere tutti i risultati \n * Emette un oggetto contenenente il valore della ricerca alla chiave 'search'\n */\n @Event({ eventName: 'jump-search-bar-show-all' }) showFullSearch: EventEmitter;\n\n /* \n * Evento da ascoltare per recuperare il dato cliccato\n * Emette un oggetto contenente tutti i dati relativi al risultato cliccato.\n */\n @Event({ eventName: 'jump-search-bar-res-clicked'}) resultClicked: EventEmitter; \n\n /* ---------------------- @LIFECYCLE ------------------------- */\n componentDidLoad() {\n // Aggiungi l'event listener per il clic al di fuori del componente\n document.addEventListener('click', this.handleOutsideClick.bind(this));\n }\n\n disconnectedCallback() {\n // Rimuovi l'event listener per evitare perdite di memoria\n document.removeEventListener('click', this.handleOutsideClick.bind(this));\n }\n\n /* -------------------- @LISTEN ------------------------------- */\n @Listen(\"jump-search-bar-dropdown-item-connected\")\n addOption(e) {\n let props = e.detail; // es {code: 'sku1', imageUrl: 'https://google.com/'}\n\n // Aggiungi l'elemento solo a `recents`\n this.recents = [...this.recents, { ...props }];\n\n // Aggiorna `innerResults` basandoti solo su `recents`\n this.innerResults = [...this.recents];\n }\n\n\n /* -------------------- @METHOD ------------------------------- */\n\n /** Imposta i risultati della ricerca all'interno della dropdown */\n @Method()\n async setResults(results, tot?: number) {\n this.results = results;\n this.innerResults = results;\n this.totalResults = tot;\n }\n\n /* -------------------- LOCAL METHODS ------------------------- */\n handleOutsideClick(event: MouseEvent) {\n // Controlla se il clic è fuori dal componente\n if (this.componentRef && !this.componentRef.contains(event.target as Node)) {\n this.dropdownVisible = false;\n }\n }\n\n // Gestisce l'evento focus sull'input\n handleFocus = () => {\n const searchBarContainer = this.jumpSearchBar.closest('.SearchBar');\n if (searchBarContainer) {\n searchBarContainer.classList.add('focused');\n }\n };\n\n // Gestisce l'evento blur sull'input\n handleBlur = () => {\n const searchBarContainer = this.jumpSearchBar.closest('.SearchBar');\n if (searchBarContainer) {\n searchBarContainer.classList.remove('focused');\n }\n };\n\n doSearch = () => {\n if (this.jumpSearchBar) {\n this.searchValue = this.jumpSearchBar.value;\n \n // Iniziare la ricerca solamente se ci sono almeno tre caratteri \n if (this.searchValue.length >= 3) {\n this.resType = 'results';\n\n this.innerResults = undefined;\n \n this.search.emit({ search: this.searchValue });\n this.searchFilters.emit({ name: 'search', value: this.searchValue });\n \n // Se il dropdown è chiuso, aprilo. Potrebbe essere chiuso perchè non ci sono recenti\n if (!this.dropdownVisible) {\n this.dropdownVisible = true;\n }\n } else if(this.searchValue.length == 0) {\n this.dropdownVisible = false;\n }\n }\n };\n\n debounce(fn, delay = this.debounceTime) {\n let timeoutId;\n\n return (...args) => {\n if (timeoutId) {\n clearTimeout(timeoutId);\n }\n timeoutId = setTimeout(() => {\n fn.apply(null, args);\n }, delay);\n };\n };\n\n openDropdown() {\n this.resType = 'recents';\n this.dropdownVisible = true;\n }\n\n /** Emette l'evento di click su un risultato, mandandone tutti i dati */\n handleResClicked(item) {\n this.resultClicked.emit({ clicked: item });\n } \n\n /** Emette l'evento quando l'utente clicca sul pulsante (se presente) o nel pulsante del dropdown per vedere tutti i risultati */\n btnOrShowOtherClicked(){\n this.showFullSearch.emit({ search: this.searchValue });\n }\n\n /**\n * Se clicco l'icona espando la searchbar ed emetto un evento dedicato\n */\n expandSearchBar() {\n this.isExpanded = true;\n this.searchbarExpanded.emit();\n }\n\n\n /* --------------------- RENDER ------------------------------- */\n renderLinearIconOnly() {\n return (\n <Host class={\"JumpSearchBar \"} ref={(el) => (this.componentRef = el as HTMLElement)}>\n <div class={\"SearchBar iconOnly \" + this.variant + (this.isExpanded ? \" expanded\" : \"\")}>\n <div class=\"InputWrapper\" onClick={(this.isExpanded && this.dropdown && this.recents.length > 0) ? () => this.openDropdown() : null}>\n <jump-icon\n name=\"magnifying-glass\"\n category=\"light\"\n onClick={() => this.expandSearchBar()}\n ></jump-icon>\n {this.isExpanded &&\n // Mostra la barra di ricerca con l'animazione di slide\n <input\n placeholder={this.placeholder}\n type=\"search\"\n id={this.identifier}\n class=\"search-input\"\n ref={(el) => { this.jumpSearchBar = el as HTMLInputElement }}\n onInput={this.debounce(this.doSearch)}\n onFocus={this.handleFocus}\n onBlur={this.handleBlur}\n />\n }\n </div>\n </div>\n {(this.dropdown && this.dropdownVisible) && this.renderDropdown()} \n </Host>\n );\n }\n\n renderDefault() {\n return (\n <Host class={\"JumpSearchBar\"} ref={(el) => (this.componentRef = el as HTMLElement)}>\n <div class={\"SearchBar \" + this.variant + \" \" + (this.withBtn ? \"withBtn\" : \"\") + (this.isExpanded ? \" expanded\" : \"\")}>\n <div class=\"InputWrapper\" onClick={(this.dropdown && this.recents.length > 0) ? () => this.openDropdown() : null}>\n {!this.withBtn && <jump-icon name=\"magnifying-glass\" category=\"light\"></jump-icon>}\n <input\n placeholder={this.placeholder}\n type=\"search\"\n id={this.identifier}\n class=\"search-input\"\n ref={(el) => { this.jumpSearchBar = el as HTMLInputElement }}\n onInput={this.debounce(this.doSearch)}\n onFocus={this.handleFocus}\n onBlur={this.handleBlur}\n />\n </div>\n {this.withBtn && !this.linearIconOnly && (\n <jump-button\n variant=\"secondary\"\n size=\"medium\"\n name=\"scopri\"\n value=\"value\"\n aria-label=\"Scopri di più\"\n id=\"button\"\n onlyIcon\n onClick={() => this.btnOrShowOtherClicked()}\n >\n <jump-icon slot=\"suffix\" name=\"magnifying-glass\"></jump-icon>\n </jump-button>\n )}\n </div>\n {(this.dropdown && this.dropdownVisible) && this.renderDropdown()} \n </Host>\n );\n }\n\n renderDropdown(){\n console.log('POSITION', this.dropdownPosition);\n return <div class={\"Dropdown \" + (this.dropdownPosition == 'absolute' ? 'dropAbsolute' : 'dropRelative' ) }>\n {(this.resType == 'recents') &&\n <div class=\"Dropdown__Recents\">\n <span class=\"title\">{this.recentsTitle}</span>\n <div class=\"ResWrapper\">\n {this.innerResults.length > 0 && this.innerResults.map((item) => (\n <div onClick={() => this.handleResClicked(item)}>\n <jump-icon name=\"magnifying-glass\" category=\"light\"></jump-icon>\n {item['value']}\n </div>\n ))}\n </div>\n </div>\n }\n {this.resType == 'results' &&\n <div class=\"Dropdown__Results\">\n <div class=\"ResWrapper\">\n {this.innerResults === undefined ?\n <div class=\"helperText\"><svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 100 100\" preserveAspectRatio=\"xMidYMid\" width=\"252\" height=\"252\" ><g><g transform=\"rotate(0 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"-0.9s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g transform=\"rotate(36 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"-0.8s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g transform=\"rotate(72 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"-0.7s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g transform=\"rotate(108 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"-0.6s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g transform=\"rotate(144 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"-0.5s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g transform=\"rotate(180 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"-0.4s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g transform=\"rotate(216 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"-0.3s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g transform=\"rotate(252 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"-0.2s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g transform=\"rotate(288 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"-0.1s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g transform=\"rotate(324 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"0s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g></g></g></svg>{this.loadingText}</div>\n :\n (this.innerResults.length > 0 ?\n this.innerResults.map((item) => (\n <div onClick={() => this.handleResClicked(item)} key={item['id']}>\n {item['img'] && <img src={item['img']} alt=\"result\" />}\n {item['value']}\n </div>\n ))\n :\n <div class=\"helperText\">{this.noResultText}</div>\n )\n }\n {(this.innerResults && this.innerResults.length > 0) &&\n <div class=\"totalRes\">\n <jump-button variant=\"secondary\" size=\"small\" text onClick={() => this.btnOrShowOtherClicked()} target=\"_blank\"> {this.showAllResText} </jump-button>\n {this.totalResults && <div>{this.totalResults} {this.resultsText}</div>}\n </div>\n }\n </div>\n </div>\n }\n </div>\n }\n\n render() {\n if (this.variant === 'linear' && this.linearIconOnly) {\n return this.renderLinearIconOnly();\n } else {\n return this.renderDefault();\n }\n }\n}"],"version":3}
|
|
@@ -33,7 +33,7 @@ const JumpSearchBar = class {
|
|
|
33
33
|
this.resType = 'results';
|
|
34
34
|
this.innerResults = undefined;
|
|
35
35
|
this.search.emit({ search: this.searchValue });
|
|
36
|
-
this.searchFilters.emit({ search: this.searchValue });
|
|
36
|
+
this.searchFilters.emit({ name: 'search', value: this.searchValue });
|
|
37
37
|
// Se il dropdown è chiuso, aprilo. Potrebbe essere chiuso perchè non ci sono recenti
|
|
38
38
|
if (!this.dropdownVisible) {
|
|
39
39
|
this.dropdownVisible = true;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"jump-search-bar.entry.js","mappings":";;AAAA,MAAM,gBAAgB,GAAG,iyHAAiyH,CAAC;AAC3zH,4BAAe,gBAAgB;;MCMlB,aAAa;;;;;;;;;QA+GxB,gBAAW,GAAG;YACZ,MAAM,kBAAkB,GAAG,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;YACpE,IAAI,kBAAkB,EAAE;gBACtB,kBAAkB,CAAC,SAAS,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;aAC7C;SACF,CAAC;;QAGF,eAAU,GAAG;YACX,MAAM,kBAAkB,GAAG,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;YACpE,IAAI,kBAAkB,EAAE;gBACtB,kBAAkB,CAAC,SAAS,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;aAChD;SACF,CAAC;QAEF,aAAQ,GAAG;YACT,IAAI,IAAI,CAAC,aAAa,EAAE;gBACtB,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC;;gBAG5C,IAAI,IAAI,CAAC,WAAW,CAAC,MAAM,IAAI,CAAC,EAAE;oBAChC,IAAI,CAAC,OAAO,GAAG,SAAS,CAAC;oBAEzB,IAAI,CAAC,YAAY,GAAG,SAAS,CAAC;oBAE9B,IAAI,CAAC,MAAM,CAAC,IAAI,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AgB,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,IAAI,CAAC,IAAI,CAAC,IAC7D,IAAI,CAAC,KAAK,CAAC,IAAI,WAAK,GAAG,EAAE,IAAI,CAAC,KAAK,CAAC,EAAE,GAAG,EAAC,QAAQ,GAAG,EACrD,IAAI,CAAC,OAAO,CAAC,CACV,CACP,CAAC;;4BAEF,WAAK,KAAK,EAAC,YAAY,IAAE,IAAI,CAAC,YAAY,CAAO,CAClD,EAEF,CAAC,IAAI,CAAC,YAAY,IAAI,IAAI,CAAC,YAAY,CAAC,MAAM,GAAG,CAAC;gBACjD,WAAK,KAAK,EAAC,UAAU,IACnB,mBAAa,OAAO,EAAC,WAAW,EAAC,IAAI,EAAC,OAAO,EAAC,IAAI,QAAC,OAAO,EAAE,MAAM,IAAI,CAAC,qBAAqB,EAAE,EAAE,MAAM,EAAC,QAAQ,SAAG,IAAI,CAAC,cAAc,MAAgB,EACpJ,IAAI,CAAC,YAAY,IAAI,eAAM,IAAI,CAAC,YAAY,OAAG,IAAI,CAAC,WAAW,CAAO,CACnE,CAEJ,CACF,CAEJ,CAAA;KACT;IAED,MAAM;QACJ,IAAI,IAAI,CAAC,OAAO,KAAK,QAAQ,IAAI,IAAI,CAAC,cAAc,EAAE;YACpD,OAAO,IAAI,CAAC,oBAAoB,EAAE,CAAC;SACpC;aAAM;YACL,OAAO,IAAI,CAAC,aAAa,EAAE,CAAC;SAC7B;KACF;;;;;;;;;","names":[],"sources":["src/components/jump-search-bar/jump-search-bar.scss?tag=jump-search-bar&encapsulation=shadow","src/components/jump-search-bar/jump-search-bar.tsx"],"sourcesContent":[":host {\n display: block;\n\n --jump-search-bar-focus-color: var(--secondary-standard, #5E79BA);\n --jump-search-bar-border-color: var(--neutral-grey-secondary, #707070);\n --jump-search-bar-bg-color: var(--gray-ultralight, #F8F8F8);\n --jump-search-bar-dropdown-border-color: var(--neutral-grey-disabled, #CBCBCB);\n\n font-family: var(--ff-primary);\n\n jump-button {\n --jump-button-border-radius: 0px 3px 3px 0px;\n }\n\n .SearchBar {\n position: relative;\n\n &.focused .InputWrapper {\n border-color: var(--jump-search-bar-focus-color) !important;\n \n jump-icon {\n color: var(--jump-search-bar-focus-color) !important;\n }\n \n input {\n outline: none !important;\n }\n }\n }\n\n .SearchBar:not(.iconOnly) {\n display: flex;\n width: 100%;\n \n .InputWrapper {\n width: 100%;\n display: flex;\n }\n \n input {\n width: 100%;\n border: none;\n }\n \n /* Stile outline*/\n &.outline .InputWrapper {\n border: 1px solid var(--jump-search-bar-border-color);\n border-radius: 3px;\n padding: 12px;\n gap: 8px;\n \n jump-icon {\n color: var(--jump-search-bar-border-color);\n }\n }\n \n &.outline.withBtn .InputWrapper {\n border-radius: 3px 0px 0px 3px;\n }\n \n \n /* Stile filled */\n &.filled .InputWrapper {\n border: 1px solid var(--jump-search-bar-bg-color);\n background-color: var(--jump-search-bar-bg-color);\n border-radius: 3px;\n padding: 12px;\n gap: 8px;\n \n input {\n background-color: var(--jump-search-bar-bg-color);\n }\n \n jump-icon {\n color: var(--jump-search-bar-border-color);\n }\n }\n \n &.filled.focused.withBtn .InputWrapper {\n border-radius: 3px 0px 0px 3px !important;\n }\n \n /* Stile linear */\n &.linear .InputWrapper {\n border-bottom: 1px solid var(--jump-search-bar-border-color);\n padding-bottom: 4px;\n \n jump-icon {\n padding-right: 6px;\n }\n }\n }\n \n \n .Dropdown {\n\n &.dropAbsolute {\n position: absolute;\n box-sizing: border-box;\n position: absolute;\n left: 0;\n width: 100%;\n }\n\n &.dropRelative {\n position: relative;\n }\n\n // position: absolute; la tolgo per il test\n margin-top: 10px;\n border-radius: 3px;\n border: 1px solid var(--jump-search-bar-dropdown-border-color);\n padding: 4px 16px;\n background-color: white;\n\n &__Recents {\n .title {\n color: #707070;\n font-size: 14px;\n line-height: 20px;\n padding: 8px 0;\n font-weight: 700;\n display: flex;\n }\n }\n\n &__Results {\n .totalRes {\n display: flex; \n justify-content: space-between;\n }\n }\n \n\n .ResWrapper {\n display: flex;\n flex-direction: column;\n\n div {\n padding: 8px 0;\n color: #707070;\n font-size: 14px;\n display: flex;\n gap: 12px;\n align-items: center;\n\n img {\n width: 40px;\n height: 48px;\n object-fit: cover;\n border-radius: 3px;\n }\n }\n\n div:hover {\n cursor: pointer;\n }\n\n .helperText {\n color: #CBCBCB;\n\n svg {\n width: 25px;\n height: 25px;\n }\n }\n }\n }\n\n/* Applicazione dell'animazione alla SearchBar.iconOnly.linear */\n.SearchBar.iconOnly.linear {\n display: flex;\n width: 100%;\n\n .InputWrapper {\n width: 100%;\n display: flex;\n align-items: center;\n transition: border-bottom 0.3s ease;\n /* Transizione solo per il bordo inferiore */\n border-bottom: 1px solid transparent;\n /* Nessun bordo inizialmente */\n padding-bottom: 4px;\n overflow: hidden;\n /* Per nascondere il contenuto che esce dai limiti dell'InputWrapper */\n\n jump-icon {\n padding-right: 6px;\n /* Padding dell'icona */\n }\n\n input {\n width: 0;\n /* Imposta la larghezza iniziale a 0 */\n border: none;\n transform: translateX(-100%);\n /* Sposta l'input fuori dalla vista */\n transition: width 0.3s ease, transform 0.3s ease;\n /* Transizioni separate per width e transform */\n animation: none;\n /* Disabilita l'animazione predefinita */\n }\n }\n\n &.expanded {\n .InputWrapper {\n border-bottom: 1px solid var(--jump-search-bar-border-color);\n /* Mostra il bordo inferiore quando espanso */\n transition: border-bottom 0.3s ease;\n /* Transizione per il bordo inferiore */\n\n input {\n width: 100%;\n /* Espande l'input a tutta la larghezza disponibile */\n transform: translateX(0);\n /* Riposiziona l'input nella vista */\n animation: slide-right 0.3s ease forwards;\n /* Applicazione dell'animazione slide-right */\n }\n }\n }\n}\n \n}\n\n@keyframes slide-right {\n from {\n transform: translateX(-100%);\n opacity: 0;\n }\n\n to {\n transform: translateX(0);\n opacity: 1;\n }\n}\n\n@keyframes border-slide-right {\n from {\n border-bottom-width: 0;\n }\n\n to {\n border-bottom-width: 1px;\n }\n}","import { Component, Method, Watch, Listen, State, Host, h, Prop, Event, EventEmitter } from '@stencil/core';\n\n@Component({\n tag: 'jump-search-bar',\n styleUrl: 'jump-search-bar.scss',\n shadow: true,\n})\nexport class JumpSearchBar {\n\n /* ---------------------- @OWN PROPERTIES ------------------------- */\n jumpSearchBar: HTMLInputElement;\n private componentRef: HTMLElement;\n\n /* ---------------------- @STATE ------------------------- */\n @State() dropdownVisible: boolean = false;\n @State() searchValue: string = undefined;\n\n @Watch('searchValue')\n searchValueChanged(newValue: string) {\n if (newValue === '') {\n // Create a new array reference to trigger re-render\n this.innerResults = [...this.recents];\n this.results = [];\n }\n }\n\n @State() resType: string = 'recents';\n @State() innerResults: Array<object> = [];\n @State() totalResults: number = 0;\n @State() isExpanded: boolean = false; \n\n /* ---------------------- @PROPERTIES ------------------------- */\n @Prop() placeholder: string = 'Cerca...'; //Il testo del placeholder dell\\'input della searchbar\n @Prop() noResultText: string = 'Nessun risultato corrispondente'; // Il testo da mostrare in caso nessun risultato sia stato recuperato.\n @Prop() loadingText: string = 'Sto caricando...'; // Il testo mostrato durante il caricamento dei risultati.\n @Prop() resultsText: string = 'risultati'; // Il testo mostrato accanto al numero di risultati totali.\n @Prop() showAllResText: string = 'Mostra tutti i risultati'; // La label da mostrare per il pulsante che mostra tutti i risultati.\n @Prop() identifier: string = 'search-bar'; // Identificatore della searchbar\n @Prop() debounceTime: number = 500; // 'Il tempo di attesa per l\\'invio della ricerca in caso di ricerca automatica. In millisecondi.\n @Prop() variant: string = 'outline'; // Scelta dello stile della barra di ricerca tra filled, linear e outline.\n @Prop() withBtn: boolean = false; // Se true, aggiunge un pulsante alla barra di ricerca\n @Prop() recentsTitle: string = 'Recenti'; // Serve per il titolo del dropwdown quando si vedono le ricerche recenti\n @Prop() recents: Array<object> = []; // Serve per il dropdown quando si vedono le ricerche recenti\n @Prop() results: Array<object> = []; // Serve per il dropdown quando si vedono i risultati della ricerca\n @Prop() dropdown: boolean = false; // Se true, mostra il dropdown con i risultati della ricerca.\n @Prop() linearIconOnly: boolean = false; // Se true, mostra solo l'icona nella barra di ricerca lineare\n @Prop() dropdownPosition: string = 'relative'; // Posizione del dropdown rispetto alla searchbar. \"relative\" o \"absolute\"\n\n\n /* ---------------------- @EVENTS ------------------------- */\n\n /**\n * Evento emesso quando l'utente clicca sull'icona in variant linear e linearIconOnly\n */\n @Event({ eventName: 'jump-search-bar-expanded' }) searchbarExpanded: EventEmitter;\n\n /**\n * Evento emesso quando l'utente effettua una ricerca \n * Emette un oggetto contenenente il valore della ricerca alla chiave 'search'\n * */\n @Event({ eventName: 'jump-search-bar' }) search: EventEmitter;\n @Event({ eventName: 'jump-filterchange' }) searchFilters: EventEmitter; // E' analoga a quella sopra ma serve per i filtri\n\n /** \n * Evento emesso quando l'utente clicca sul pulsante (se presente) o nel pulsante del dropdown per vedere tutti i risultati \n * Emette un oggetto contenenente il valore della ricerca alla chiave 'search'\n */\n @Event({ eventName: 'jump-search-bar-show-all' }) showFullSearch: EventEmitter;\n\n /* \n * Evento da ascoltare per recuperare il dato cliccato\n * Emette un oggetto contenente tutti i dati relativi al risultato cliccato.\n */\n @Event({ eventName: 'jump-search-bar-res-clicked'}) resultClicked: EventEmitter; \n\n /* ---------------------- @LIFECYCLE ------------------------- */\n componentDidLoad() {\n // Aggiungi l'event listener per il clic al di fuori del componente\n document.addEventListener('click', this.handleOutsideClick.bind(this));\n }\n\n disconnectedCallback() {\n // Rimuovi l'event listener per evitare perdite di memoria\n document.removeEventListener('click', this.handleOutsideClick.bind(this));\n }\n\n /* -------------------- @LISTEN ------------------------------- */\n @Listen(\"jump-search-bar-dropdown-item-connected\")\n addOption(e) {\n let props = e.detail; // es {code: 'sku1', imageUrl: 'https://google.com/'}\n\n // Aggiungi l'elemento solo a `recents`\n this.recents = [...this.recents, { ...props }];\n\n // Aggiorna `innerResults` basandoti solo su `recents`\n this.innerResults = [...this.recents];\n }\n\n\n /* -------------------- @METHOD ------------------------------- */\n\n /** Imposta i risultati della ricerca all'interno della dropdown */\n @Method()\n async setResults(results, tot?: number) {\n this.results = results;\n this.innerResults = results;\n this.totalResults = tot;\n }\n\n /* -------------------- LOCAL METHODS ------------------------- */\n handleOutsideClick(event: MouseEvent) {\n // Controlla se il clic è fuori dal componente\n if (this.componentRef && !this.componentRef.contains(event.target as Node)) {\n this.dropdownVisible = false;\n }\n }\n\n // Gestisce l'evento focus sull'input\n handleFocus = () => {\n const searchBarContainer = this.jumpSearchBar.closest('.SearchBar');\n if (searchBarContainer) {\n searchBarContainer.classList.add('focused');\n }\n };\n\n // Gestisce l'evento blur sull'input\n handleBlur = () => {\n const searchBarContainer = this.jumpSearchBar.closest('.SearchBar');\n if (searchBarContainer) {\n searchBarContainer.classList.remove('focused');\n }\n };\n\n doSearch = () => {\n if (this.jumpSearchBar) {\n this.searchValue = this.jumpSearchBar.value;\n \n // Iniziare la ricerca solamente se ci sono almeno tre caratteri \n if (this.searchValue.length >= 3) {\n this.resType = 'results';\n\n this.innerResults = undefined;\n \n this.search.emit({ search: this.searchValue });\n this.searchFilters.emit({ search: this.searchValue });\n \n // Se il dropdown è chiuso, aprilo. Potrebbe essere chiuso perchè non ci sono recenti\n if (!this.dropdownVisible) {\n this.dropdownVisible = true;\n }\n } else if(this.searchValue.length == 0) {\n this.dropdownVisible = false;\n }\n }\n };\n\n debounce(fn, delay = this.debounceTime) {\n let timeoutId;\n\n return (...args) => {\n if (timeoutId) {\n clearTimeout(timeoutId);\n }\n timeoutId = setTimeout(() => {\n fn.apply(null, args);\n }, delay);\n };\n };\n\n openDropdown() {\n this.resType = 'recents';\n this.dropdownVisible = true;\n }\n\n /** Emette l'evento di click su un risultato, mandandone tutti i dati */\n handleResClicked(item) {\n this.resultClicked.emit({ clicked: item });\n } \n\n /** Emette l'evento quando l'utente clicca sul pulsante (se presente) o nel pulsante del dropdown per vedere tutti i risultati */\n btnOrShowOtherClicked(){\n this.showFullSearch.emit({ search: this.searchValue });\n }\n\n /**\n * Se clicco l'icona espando la searchbar ed emetto un evento dedicato\n */\n expandSearchBar() {\n this.isExpanded = true;\n this.searchbarExpanded.emit();\n }\n\n\n /* --------------------- RENDER ------------------------------- */\n renderLinearIconOnly() {\n return (\n <Host class={\"JumpSearchBar \"} ref={(el) => (this.componentRef = el as HTMLElement)}>\n <div class={\"SearchBar iconOnly \" + this.variant + (this.isExpanded ? \" expanded\" : \"\")}>\n <div class=\"InputWrapper\" onClick={(this.isExpanded && this.dropdown && this.recents.length > 0) ? () => this.openDropdown() : null}>\n <jump-icon\n name=\"magnifying-glass\"\n category=\"light\"\n onClick={() => this.expandSearchBar()}\n ></jump-icon>\n {this.isExpanded &&\n // Mostra la barra di ricerca con l'animazione di slide\n <input\n placeholder={this.placeholder}\n type=\"search\"\n id={this.identifier}\n class=\"search-input\"\n ref={(el) => { this.jumpSearchBar = el as HTMLInputElement }}\n onInput={this.debounce(this.doSearch)}\n onFocus={this.handleFocus}\n onBlur={this.handleBlur}\n />\n }\n </div>\n </div>\n {(this.dropdown && this.dropdownVisible) && this.renderDropdown()} \n </Host>\n );\n }\n\n renderDefault() {\n return (\n <Host class={\"JumpSearchBar\"} ref={(el) => (this.componentRef = el as HTMLElement)}>\n <div class={\"SearchBar \" + this.variant + \" \" + (this.withBtn ? \"withBtn\" : \"\") + (this.isExpanded ? \" expanded\" : \"\")}>\n <div class=\"InputWrapper\" onClick={(this.dropdown && this.recents.length > 0) ? () => this.openDropdown() : null}>\n {!this.withBtn && <jump-icon name=\"magnifying-glass\" category=\"light\"></jump-icon>}\n <input\n placeholder={this.placeholder}\n type=\"search\"\n id={this.identifier}\n class=\"search-input\"\n ref={(el) => { this.jumpSearchBar = el as HTMLInputElement }}\n onInput={this.debounce(this.doSearch)}\n onFocus={this.handleFocus}\n onBlur={this.handleBlur}\n />\n </div>\n {this.withBtn && !this.linearIconOnly && (\n <jump-button\n variant=\"secondary\"\n size=\"medium\"\n name=\"scopri\"\n value=\"value\"\n aria-label=\"Scopri di più\"\n id=\"button\"\n onlyIcon\n onClick={() => this.btnOrShowOtherClicked()}\n >\n <jump-icon slot=\"suffix\" name=\"magnifying-glass\"></jump-icon>\n </jump-button>\n )}\n </div>\n {(this.dropdown && this.dropdownVisible) && this.renderDropdown()} \n </Host>\n );\n }\n\n renderDropdown(){\n console.log('POSITION', this.dropdownPosition);\n return <div class={\"Dropdown \" + (this.dropdownPosition == 'absolute' ? 'dropAbsolute' : 'dropRelative' ) }>\n {(this.resType == 'recents') &&\n <div class=\"Dropdown__Recents\">\n <span class=\"title\">{this.recentsTitle}</span>\n <div class=\"ResWrapper\">\n {this.innerResults.length > 0 && this.innerResults.map((item) => (\n <div onClick={() => this.handleResClicked(item)}>\n <jump-icon name=\"magnifying-glass\" category=\"light\"></jump-icon>\n {item['value']}\n </div>\n ))}\n </div>\n </div>\n }\n {this.resType == 'results' &&\n <div class=\"Dropdown__Results\">\n <div class=\"ResWrapper\">\n {this.innerResults === undefined ?\n <div class=\"helperText\"><svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 100 100\" preserveAspectRatio=\"xMidYMid\" width=\"252\" height=\"252\" ><g><g transform=\"rotate(0 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"-0.9s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g transform=\"rotate(36 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"-0.8s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g transform=\"rotate(72 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"-0.7s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g transform=\"rotate(108 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"-0.6s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g transform=\"rotate(144 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"-0.5s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g transform=\"rotate(180 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"-0.4s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g transform=\"rotate(216 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"-0.3s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g transform=\"rotate(252 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"-0.2s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g transform=\"rotate(288 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"-0.1s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g transform=\"rotate(324 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"0s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g></g></g></svg>{this.loadingText}</div>\n :\n (this.innerResults.length > 0 ?\n this.innerResults.map((item) => (\n <div onClick={() => this.handleResClicked(item)} key={item['id']}>\n {item['img'] && <img src={item['img']} alt=\"result\" />}\n {item['value']}\n </div>\n ))\n :\n <div class=\"helperText\">{this.noResultText}</div>\n )\n }\n {(this.innerResults && this.innerResults.length > 0) &&\n <div class=\"totalRes\">\n <jump-button variant=\"secondary\" size=\"small\" text onClick={() => this.btnOrShowOtherClicked()} target=\"_blank\"> {this.showAllResText} </jump-button>\n {this.totalResults && <div>{this.totalResults} {this.resultsText}</div>}\n </div>\n }\n </div>\n </div>\n }\n </div>\n }\n\n render() {\n if (this.variant === 'linear' && this.linearIconOnly) {\n return this.renderLinearIconOnly();\n } else {\n return this.renderDefault();\n }\n }\n}"],"version":3}
|
|
1
|
+
{"file":"jump-search-bar.entry.js","mappings":";;AAAA,MAAM,gBAAgB,GAAG,iyHAAiyH,CAAC;AAC3zH,4BAAe,gBAAgB;;MCMlB,aAAa;;;;;;;;;QA+GxB,gBAAW,GAAG;YACZ,MAAM,kBAAkB,GAAG,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;YACpE,IAAI,kBAAkB,EAAE;gBACtB,kBAAkB,CAAC,SAAS,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;aAC7C;SACF,CAAC;;QAGF,eAAU,GAAG;YACX,MAAM,kBAAkB,GAAG,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;YACpE,IAAI,kBAAkB,EAAE;gBACtB,kBAAkB,CAAC,SAAS,CAAC,MA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I,CAAC,aAAa,EAAE,CAAC;SAC7B;KACF;;;;;;;;;","names":[],"sources":["src/components/jump-search-bar/jump-search-bar.scss?tag=jump-search-bar&encapsulation=shadow","src/components/jump-search-bar/jump-search-bar.tsx"],"sourcesContent":[":host {\n display: block;\n\n --jump-search-bar-focus-color: var(--secondary-standard, #5E79BA);\n --jump-search-bar-border-color: var(--neutral-grey-secondary, #707070);\n --jump-search-bar-bg-color: var(--gray-ultralight, #F8F8F8);\n --jump-search-bar-dropdown-border-color: var(--neutral-grey-disabled, #CBCBCB);\n\n font-family: var(--ff-primary);\n\n jump-button {\n --jump-button-border-radius: 0px 3px 3px 0px;\n }\n\n .SearchBar {\n position: relative;\n\n &.focused .InputWrapper {\n border-color: var(--jump-search-bar-focus-color) !important;\n \n jump-icon {\n color: var(--jump-search-bar-focus-color) !important;\n }\n \n input {\n outline: none !important;\n }\n }\n }\n\n .SearchBar:not(.iconOnly) {\n display: flex;\n width: 100%;\n \n .InputWrapper {\n width: 100%;\n display: flex;\n }\n \n input {\n width: 100%;\n border: none;\n }\n \n /* Stile outline*/\n &.outline .InputWrapper {\n border: 1px solid var(--jump-search-bar-border-color);\n border-radius: 3px;\n padding: 12px;\n gap: 8px;\n \n jump-icon {\n color: var(--jump-search-bar-border-color);\n }\n }\n \n &.outline.withBtn .InputWrapper {\n border-radius: 3px 0px 0px 3px;\n }\n \n \n /* Stile filled */\n &.filled .InputWrapper {\n border: 1px solid var(--jump-search-bar-bg-color);\n background-color: var(--jump-search-bar-bg-color);\n border-radius: 3px;\n padding: 12px;\n gap: 8px;\n \n input {\n background-color: var(--jump-search-bar-bg-color);\n }\n \n jump-icon {\n color: var(--jump-search-bar-border-color);\n }\n }\n \n &.filled.focused.withBtn .InputWrapper {\n border-radius: 3px 0px 0px 3px !important;\n }\n \n /* Stile linear */\n &.linear .InputWrapper {\n border-bottom: 1px solid var(--jump-search-bar-border-color);\n padding-bottom: 4px;\n \n jump-icon {\n padding-right: 6px;\n }\n }\n }\n \n \n .Dropdown {\n\n &.dropAbsolute {\n position: absolute;\n box-sizing: border-box;\n position: absolute;\n left: 0;\n width: 100%;\n }\n\n &.dropRelative {\n position: relative;\n }\n\n // position: absolute; la tolgo per il test\n margin-top: 10px;\n border-radius: 3px;\n border: 1px solid var(--jump-search-bar-dropdown-border-color);\n padding: 4px 16px;\n background-color: white;\n\n &__Recents {\n .title {\n color: #707070;\n font-size: 14px;\n line-height: 20px;\n padding: 8px 0;\n font-weight: 700;\n display: flex;\n }\n }\n\n &__Results {\n .totalRes {\n display: flex; \n justify-content: space-between;\n }\n }\n \n\n .ResWrapper {\n display: flex;\n flex-direction: column;\n\n div {\n padding: 8px 0;\n color: #707070;\n font-size: 14px;\n display: flex;\n gap: 12px;\n align-items: center;\n\n img {\n width: 40px;\n height: 48px;\n object-fit: cover;\n border-radius: 3px;\n }\n }\n\n div:hover {\n cursor: pointer;\n }\n\n .helperText {\n color: #CBCBCB;\n\n svg {\n width: 25px;\n height: 25px;\n }\n }\n }\n }\n\n/* Applicazione dell'animazione alla SearchBar.iconOnly.linear */\n.SearchBar.iconOnly.linear {\n display: flex;\n width: 100%;\n\n .InputWrapper {\n width: 100%;\n display: flex;\n align-items: center;\n transition: border-bottom 0.3s ease;\n /* Transizione solo per il bordo inferiore */\n border-bottom: 1px solid transparent;\n /* Nessun bordo inizialmente */\n padding-bottom: 4px;\n overflow: hidden;\n /* Per nascondere il contenuto che esce dai limiti dell'InputWrapper */\n\n jump-icon {\n padding-right: 6px;\n /* Padding dell'icona */\n }\n\n input {\n width: 0;\n /* Imposta la larghezza iniziale a 0 */\n border: none;\n transform: translateX(-100%);\n /* Sposta l'input fuori dalla vista */\n transition: width 0.3s ease, transform 0.3s ease;\n /* Transizioni separate per width e transform */\n animation: none;\n /* Disabilita l'animazione predefinita */\n }\n }\n\n &.expanded {\n .InputWrapper {\n border-bottom: 1px solid var(--jump-search-bar-border-color);\n /* Mostra il bordo inferiore quando espanso */\n transition: border-bottom 0.3s ease;\n /* Transizione per il bordo inferiore */\n\n input {\n width: 100%;\n /* Espande l'input a tutta la larghezza disponibile */\n transform: translateX(0);\n /* Riposiziona l'input nella vista */\n animation: slide-right 0.3s ease forwards;\n /* Applicazione dell'animazione slide-right */\n }\n }\n }\n}\n \n}\n\n@keyframes slide-right {\n from {\n transform: translateX(-100%);\n opacity: 0;\n }\n\n to {\n transform: translateX(0);\n opacity: 1;\n }\n}\n\n@keyframes border-slide-right {\n from {\n border-bottom-width: 0;\n }\n\n to {\n border-bottom-width: 1px;\n }\n}","import { Component, Method, Watch, Listen, State, Host, h, Prop, Event, EventEmitter } from '@stencil/core';\n\n@Component({\n tag: 'jump-search-bar',\n styleUrl: 'jump-search-bar.scss',\n shadow: true,\n})\nexport class JumpSearchBar {\n\n /* ---------------------- @OWN PROPERTIES ------------------------- */\n jumpSearchBar: HTMLInputElement;\n private componentRef: HTMLElement;\n\n /* ---------------------- @STATE ------------------------- */\n @State() dropdownVisible: boolean = false;\n @State() searchValue: string = undefined;\n\n @Watch('searchValue')\n searchValueChanged(newValue: string) {\n if (newValue === '') {\n // Create a new array reference to trigger re-render\n this.innerResults = [...this.recents];\n this.results = [];\n }\n }\n\n @State() resType: string = 'recents';\n @State() innerResults: Array<object> = [];\n @State() totalResults: number = 0;\n @State() isExpanded: boolean = false; \n\n /* ---------------------- @PROPERTIES ------------------------- */\n @Prop() placeholder: string = 'Cerca...'; //Il testo del placeholder dell\\'input della searchbar\n @Prop() noResultText: string = 'Nessun risultato corrispondente'; // Il testo da mostrare in caso nessun risultato sia stato recuperato.\n @Prop() loadingText: string = 'Sto caricando...'; // Il testo mostrato durante il caricamento dei risultati.\n @Prop() resultsText: string = 'risultati'; // Il testo mostrato accanto al numero di risultati totali.\n @Prop() showAllResText: string = 'Mostra tutti i risultati'; // La label da mostrare per il pulsante che mostra tutti i risultati.\n @Prop() identifier: string = 'search-bar'; // Identificatore della searchbar\n @Prop() debounceTime: number = 500; // 'Il tempo di attesa per l\\'invio della ricerca in caso di ricerca automatica. In millisecondi.\n @Prop() variant: string = 'outline'; // Scelta dello stile della barra di ricerca tra filled, linear e outline.\n @Prop() withBtn: boolean = false; // Se true, aggiunge un pulsante alla barra di ricerca\n @Prop() recentsTitle: string = 'Recenti'; // Serve per il titolo del dropwdown quando si vedono le ricerche recenti\n @Prop() recents: Array<object> = []; // Serve per il dropdown quando si vedono le ricerche recenti\n @Prop() results: Array<object> = []; // Serve per il dropdown quando si vedono i risultati della ricerca\n @Prop() dropdown: boolean = false; // Se true, mostra il dropdown con i risultati della ricerca.\n @Prop() linearIconOnly: boolean = false; // Se true, mostra solo l'icona nella barra di ricerca lineare\n @Prop() dropdownPosition: string = 'relative'; // Posizione del dropdown rispetto alla searchbar. \"relative\" o \"absolute\"\n\n\n /* ---------------------- @EVENTS ------------------------- */\n\n /**\n * Evento emesso quando l'utente clicca sull'icona in variant linear e linearIconOnly\n */\n @Event({ eventName: 'jump-search-bar-expanded' }) searchbarExpanded: EventEmitter;\n\n /**\n * Evento emesso quando l'utente effettua una ricerca \n * Emette un oggetto contenenente il valore della ricerca alla chiave 'search'\n * */\n @Event({ eventName: 'jump-search-bar' }) search: EventEmitter;\n @Event({ eventName: 'jump-filterchange' }) searchFilters: EventEmitter; // E' analoga a quella sopra ma serve per i filtri\n\n /** \n * Evento emesso quando l'utente clicca sul pulsante (se presente) o nel pulsante del dropdown per vedere tutti i risultati \n * Emette un oggetto contenenente il valore della ricerca alla chiave 'search'\n */\n @Event({ eventName: 'jump-search-bar-show-all' }) showFullSearch: EventEmitter;\n\n /* \n * Evento da ascoltare per recuperare il dato cliccato\n * Emette un oggetto contenente tutti i dati relativi al risultato cliccato.\n */\n @Event({ eventName: 'jump-search-bar-res-clicked'}) resultClicked: EventEmitter; \n\n /* ---------------------- @LIFECYCLE ------------------------- */\n componentDidLoad() {\n // Aggiungi l'event listener per il clic al di fuori del componente\n document.addEventListener('click', this.handleOutsideClick.bind(this));\n }\n\n disconnectedCallback() {\n // Rimuovi l'event listener per evitare perdite di memoria\n document.removeEventListener('click', this.handleOutsideClick.bind(this));\n }\n\n /* -------------------- @LISTEN ------------------------------- */\n @Listen(\"jump-search-bar-dropdown-item-connected\")\n addOption(e) {\n let props = e.detail; // es {code: 'sku1', imageUrl: 'https://google.com/'}\n\n // Aggiungi l'elemento solo a `recents`\n this.recents = [...this.recents, { ...props }];\n\n // Aggiorna `innerResults` basandoti solo su `recents`\n this.innerResults = [...this.recents];\n }\n\n\n /* -------------------- @METHOD ------------------------------- */\n\n /** Imposta i risultati della ricerca all'interno della dropdown */\n @Method()\n async setResults(results, tot?: number) {\n this.results = results;\n this.innerResults = results;\n this.totalResults = tot;\n }\n\n /* -------------------- LOCAL METHODS ------------------------- */\n handleOutsideClick(event: MouseEvent) {\n // Controlla se il clic è fuori dal componente\n if (this.componentRef && !this.componentRef.contains(event.target as Node)) {\n this.dropdownVisible = false;\n }\n }\n\n // Gestisce l'evento focus sull'input\n handleFocus = () => {\n const searchBarContainer = this.jumpSearchBar.closest('.SearchBar');\n if (searchBarContainer) {\n searchBarContainer.classList.add('focused');\n }\n };\n\n // Gestisce l'evento blur sull'input\n handleBlur = () => {\n const searchBarContainer = this.jumpSearchBar.closest('.SearchBar');\n if (searchBarContainer) {\n searchBarContainer.classList.remove('focused');\n }\n };\n\n doSearch = () => {\n if (this.jumpSearchBar) {\n this.searchValue = this.jumpSearchBar.value;\n \n // Iniziare la ricerca solamente se ci sono almeno tre caratteri \n if (this.searchValue.length >= 3) {\n this.resType = 'results';\n\n this.innerResults = undefined;\n \n this.search.emit({ search: this.searchValue });\n this.searchFilters.emit({ name: 'search', value: this.searchValue });\n \n // Se il dropdown è chiuso, aprilo. Potrebbe essere chiuso perchè non ci sono recenti\n if (!this.dropdownVisible) {\n this.dropdownVisible = true;\n }\n } else if(this.searchValue.length == 0) {\n this.dropdownVisible = false;\n }\n }\n };\n\n debounce(fn, delay = this.debounceTime) {\n let timeoutId;\n\n return (...args) => {\n if (timeoutId) {\n clearTimeout(timeoutId);\n }\n timeoutId = setTimeout(() => {\n fn.apply(null, args);\n }, delay);\n };\n };\n\n openDropdown() {\n this.resType = 'recents';\n this.dropdownVisible = true;\n }\n\n /** Emette l'evento di click su un risultato, mandandone tutti i dati */\n handleResClicked(item) {\n this.resultClicked.emit({ clicked: item });\n } \n\n /** Emette l'evento quando l'utente clicca sul pulsante (se presente) o nel pulsante del dropdown per vedere tutti i risultati */\n btnOrShowOtherClicked(){\n this.showFullSearch.emit({ search: this.searchValue });\n }\n\n /**\n * Se clicco l'icona espando la searchbar ed emetto un evento dedicato\n */\n expandSearchBar() {\n this.isExpanded = true;\n this.searchbarExpanded.emit();\n }\n\n\n /* --------------------- RENDER ------------------------------- */\n renderLinearIconOnly() {\n return (\n <Host class={\"JumpSearchBar \"} ref={(el) => (this.componentRef = el as HTMLElement)}>\n <div class={\"SearchBar iconOnly \" + this.variant + (this.isExpanded ? \" expanded\" : \"\")}>\n <div class=\"InputWrapper\" onClick={(this.isExpanded && this.dropdown && this.recents.length > 0) ? () => this.openDropdown() : null}>\n <jump-icon\n name=\"magnifying-glass\"\n category=\"light\"\n onClick={() => this.expandSearchBar()}\n ></jump-icon>\n {this.isExpanded &&\n // Mostra la barra di ricerca con l'animazione di slide\n <input\n placeholder={this.placeholder}\n type=\"search\"\n id={this.identifier}\n class=\"search-input\"\n ref={(el) => { this.jumpSearchBar = el as HTMLInputElement }}\n onInput={this.debounce(this.doSearch)}\n onFocus={this.handleFocus}\n onBlur={this.handleBlur}\n />\n }\n </div>\n </div>\n {(this.dropdown && this.dropdownVisible) && this.renderDropdown()} \n </Host>\n );\n }\n\n renderDefault() {\n return (\n <Host class={\"JumpSearchBar\"} ref={(el) => (this.componentRef = el as HTMLElement)}>\n <div class={\"SearchBar \" + this.variant + \" \" + (this.withBtn ? \"withBtn\" : \"\") + (this.isExpanded ? \" expanded\" : \"\")}>\n <div class=\"InputWrapper\" onClick={(this.dropdown && this.recents.length > 0) ? () => this.openDropdown() : null}>\n {!this.withBtn && <jump-icon name=\"magnifying-glass\" category=\"light\"></jump-icon>}\n <input\n placeholder={this.placeholder}\n type=\"search\"\n id={this.identifier}\n class=\"search-input\"\n ref={(el) => { this.jumpSearchBar = el as HTMLInputElement }}\n onInput={this.debounce(this.doSearch)}\n onFocus={this.handleFocus}\n onBlur={this.handleBlur}\n />\n </div>\n {this.withBtn && !this.linearIconOnly && (\n <jump-button\n variant=\"secondary\"\n size=\"medium\"\n name=\"scopri\"\n value=\"value\"\n aria-label=\"Scopri di più\"\n id=\"button\"\n onlyIcon\n onClick={() => this.btnOrShowOtherClicked()}\n >\n <jump-icon slot=\"suffix\" name=\"magnifying-glass\"></jump-icon>\n </jump-button>\n )}\n </div>\n {(this.dropdown && this.dropdownVisible) && this.renderDropdown()} \n </Host>\n );\n }\n\n renderDropdown(){\n console.log('POSITION', this.dropdownPosition);\n return <div class={\"Dropdown \" + (this.dropdownPosition == 'absolute' ? 'dropAbsolute' : 'dropRelative' ) }>\n {(this.resType == 'recents') &&\n <div class=\"Dropdown__Recents\">\n <span class=\"title\">{this.recentsTitle}</span>\n <div class=\"ResWrapper\">\n {this.innerResults.length > 0 && this.innerResults.map((item) => (\n <div onClick={() => this.handleResClicked(item)}>\n <jump-icon name=\"magnifying-glass\" category=\"light\"></jump-icon>\n {item['value']}\n </div>\n ))}\n </div>\n </div>\n }\n {this.resType == 'results' &&\n <div class=\"Dropdown__Results\">\n <div class=\"ResWrapper\">\n {this.innerResults === undefined ?\n <div class=\"helperText\"><svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 100 100\" preserveAspectRatio=\"xMidYMid\" width=\"252\" height=\"252\" ><g><g transform=\"rotate(0 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"-0.9s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g transform=\"rotate(36 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"-0.8s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g transform=\"rotate(72 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"-0.7s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g transform=\"rotate(108 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"-0.6s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g transform=\"rotate(144 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"-0.5s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g transform=\"rotate(180 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"-0.4s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g transform=\"rotate(216 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"-0.3s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g transform=\"rotate(252 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"-0.2s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g transform=\"rotate(288 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"-0.1s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g transform=\"rotate(324 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"0s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g></g></g></svg>{this.loadingText}</div>\n :\n (this.innerResults.length > 0 ?\n this.innerResults.map((item) => (\n <div onClick={() => this.handleResClicked(item)} key={item['id']}>\n {item['img'] && <img src={item['img']} alt=\"result\" />}\n {item['value']}\n </div>\n ))\n :\n <div class=\"helperText\">{this.noResultText}</div>\n )\n }\n {(this.innerResults && this.innerResults.length > 0) &&\n <div class=\"totalRes\">\n <jump-button variant=\"secondary\" size=\"small\" text onClick={() => this.btnOrShowOtherClicked()} target=\"_blank\"> {this.showAllResText} </jump-button>\n {this.totalResults && <div>{this.totalResults} {this.resultsText}</div>}\n </div>\n }\n </div>\n </div>\n }\n </div>\n }\n\n render() {\n if (this.variant === 'linear' && this.linearIconOnly) {\n return this.renderLinearIconOnly();\n } else {\n return this.renderDefault();\n }\n }\n}"],"version":3}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as e,b as t}from"./p-40ca24a6.js";export{s as setNonce}from"./p-40ca24a6.js";import{g as a}from"./p-e1255160.js";var l=()=>{const t=import.meta.url;const a={};if(t!==""){a.resourcesUrl=new URL(".",t).href}return e(a)};l().then((async e=>{await a();return t([["p-8f02eb5e",[[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-83b3a560",[[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-048d87ee",[[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-b03b8328",[[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-916742f5",[[1,"jump-pagination",{pagLabel:[1,"pag-label"],last:[2],showFirstAndLast:[4,"show-first-and-last"],current:[32]},null,{current:["watchcurrent"]}]]],["p-5fb2a919",[[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-ae1435a6",[[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-
|
|
1
|
+
import{p as e,b as t}from"./p-40ca24a6.js";export{s as setNonce}from"./p-40ca24a6.js";import{g as a}from"./p-e1255160.js";var l=()=>{const t=import.meta.url;const a={};if(t!==""){a.resourcesUrl=new URL(".",t).href}return e(a)};l().then((async e=>{await a();return t([["p-8f02eb5e",[[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-83b3a560",[[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-048d87ee",[[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-b03b8328",[[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-916742f5",[[1,"jump-pagination",{pagLabel:[1,"pag-label"],last:[2],showFirstAndLast:[4,"show-first-and-last"],current:[32]},null,{current:["watchcurrent"]}]]],["p-5fb2a919",[[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-ae1435a6",[[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-1feed0e9",[[1,"jump-search-bar",{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],searchValue:[32],resType:[32],innerResults:[32],totalResults:[32],isExpanded:[32],setResults:[64]},[[0,"jump-search-bar-dropdown-item-connected","addOption"]],{searchValue:["searchValueChanged"]}]]],["p-6e497dd6",[[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-66c79fb9",[[1,"jump-accordion",{variant:[1],summary:[1],disabled:[4],open:[516],icon:[1],identifier:[1]},[[0,"sl-show","handleShow"]]]]],["p-cdc53aae",[[1,"jump-side-cart-example",{isCartOpen:[32],position:[32],cartItems:[32]}]]],["p-1f824808",[[1,"jump-tab-item",{identifier:[1],iconName:[1,"icon-name"],iconPosition:[1,"icon-position"],label:[1],active:[4],disabled:[4],variant:[32]}]]],["p-0cc799f3",[[1,"jump-accordion-group",{variant:[1],groupIdentifier:[1,"group-identifier"]}]]],["p-a7d5e687",[[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-a0237406",[[1,"jump-card-ecommerce-option",{code:[1],imgUrl:[1,"img-url"],label:[1],sku:[1],taxonomy:[1]}]]],["p-e7b3ebb1",[[1,"jump-filter-checkbox",{value:[1],label:[1],checked:[516],count:[8],isChecked:[64]}]]],["p-37b7b679",[[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],value:[1040],disabled:[516],minVal:[32],maxVal:[32],setValue:[64],getValues:[64],getName:[64]},null,{value:["valueWatcher"]}]]],["p-5092836a",[[1,"jump-filter-select",{value:[1537],placeholder:[1],label:[1],name:[1],options:[1],disabled:[516],multiple:[4],required:[4],loading:[4],open:[32],hasSlottedOptions:[32],values:[32],getSelectedValue:[64],getSelectedOption:[64],getValues:[64],getName:[64],setValue:[64]}]]],["p-48bb1cbf",[[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-d40c487f",[[1,"jump-search-bar-dropdown-item",{value:[1],img:[1],href:[1],details:[32]}]]],["p-6134b84b",[[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-64024e67",[[1,"jump-tab-panel",{identifier:[1],active:[4]}]]],["p-e7d1e3d8",[[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-9035201c",[[1,"jump-badge",{label:[1],variant:[513],dimension:[513],soft:[516],outline:[516]}]]],["p-79e5dac6",[[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
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{r as t,c as r,h as e,H as i}from"./p-40ca24a6.js";const s=":host{display:block;--jump-search-bar-focus-color:var(--secondary-standard, #5E79BA);--jump-search-bar-border-color:var(--neutral-grey-secondary, #707070);--jump-search-bar-bg-color:var(--gray-ultralight, #F8F8F8);--jump-search-bar-dropdown-border-color:var(--neutral-grey-disabled, #CBCBCB);font-family:var(--ff-primary);}:host jump-button{--jump-button-border-radius:0px 3px 3px 0px}:host .SearchBar{position:relative}:host .SearchBar.focused .InputWrapper{border-color:var(--jump-search-bar-focus-color) !important}:host .SearchBar.focused .InputWrapper jump-icon{color:var(--jump-search-bar-focus-color) !important}:host .SearchBar.focused .InputWrapper input{outline:none !important}:host .SearchBar:not(.iconOnly){display:flex;width:100%;}:host .SearchBar:not(.iconOnly) .InputWrapper{width:100%;display:flex}:host .SearchBar:not(.iconOnly) input{width:100%;border:none}:host .SearchBar:not(.iconOnly).outline .InputWrapper{border:1px solid var(--jump-search-bar-border-color);border-radius:3px;padding:12px;gap:8px}:host .SearchBar:not(.iconOnly).outline .InputWrapper jump-icon{color:var(--jump-search-bar-border-color)}:host .SearchBar:not(.iconOnly).outline.withBtn .InputWrapper{border-radius:3px 0px 0px 3px}:host .SearchBar:not(.iconOnly).filled .InputWrapper{border:1px solid var(--jump-search-bar-bg-color);background-color:var(--jump-search-bar-bg-color);border-radius:3px;padding:12px;gap:8px}:host .SearchBar:not(.iconOnly).filled .InputWrapper input{background-color:var(--jump-search-bar-bg-color)}:host .SearchBar:not(.iconOnly).filled .InputWrapper jump-icon{color:var(--jump-search-bar-border-color)}:host .SearchBar:not(.iconOnly).filled.focused.withBtn .InputWrapper{border-radius:3px 0px 0px 3px !important}:host .SearchBar:not(.iconOnly).linear .InputWrapper{border-bottom:1px solid var(--jump-search-bar-border-color);padding-bottom:4px}:host .SearchBar:not(.iconOnly).linear .InputWrapper jump-icon{padding-right:6px}:host .Dropdown{margin-top:10px;border-radius:3px;border:1px solid var(--jump-search-bar-dropdown-border-color);padding:4px 16px;background-color:white}:host .Dropdown.dropAbsolute{position:absolute;box-sizing:border-box;position:absolute;left:0;width:100%}:host .Dropdown.dropRelative{position:relative}:host .Dropdown__Recents .title{color:#707070;font-size:14px;line-height:20px;padding:8px 0;font-weight:700;display:flex}:host .Dropdown__Results .totalRes{display:flex;justify-content:space-between}:host .Dropdown .ResWrapper{display:flex;flex-direction:column}:host .Dropdown .ResWrapper div{padding:8px 0;color:#707070;font-size:14px;display:flex;gap:12px;align-items:center}:host .Dropdown .ResWrapper div img{width:40px;height:48px;object-fit:cover;border-radius:3px}:host .Dropdown .ResWrapper div:hover{cursor:pointer}:host .Dropdown .ResWrapper .helperText{color:#CBCBCB}:host .Dropdown .ResWrapper .helperText svg{width:25px;height:25px}:host .SearchBar.iconOnly.linear{display:flex;width:100%}:host .SearchBar.iconOnly.linear .InputWrapper{width:100%;display:flex;align-items:center;transition:border-bottom 0.3s ease;border-bottom:1px solid transparent;padding-bottom:4px;overflow:hidden;}:host .SearchBar.iconOnly.linear .InputWrapper jump-icon{padding-right:6px;}:host .SearchBar.iconOnly.linear .InputWrapper input{width:0;border:none;transform:translateX(-100%);transition:width 0.3s ease, transform 0.3s ease;animation:none;}:host .SearchBar.iconOnly.linear.expanded .InputWrapper{border-bottom:1px solid var(--jump-search-bar-border-color);transition:border-bottom 0.3s ease;}:host .SearchBar.iconOnly.linear.expanded .InputWrapper input{width:100%;transform:translateX(0);animation:slide-right 0.3s ease forwards;}@keyframes slide-right{from{transform:translateX(-100%);opacity:0}to{transform:translateX(0);opacity:1}}@keyframes border-slide-right{from{border-bottom-width:0}to{border-bottom-width:1px}}";const a=s;const o=class{constructor(e){t(this,e);this.searchbarExpanded=r(this,"jump-search-bar-expanded",7);this.search=r(this,"jump-search-bar",7);this.searchFilters=r(this,"jump-filterchange",7);this.showFullSearch=r(this,"jump-search-bar-show-all",7);this.resultClicked=r(this,"jump-search-bar-res-clicked",7);this.handleFocus=()=>{const t=this.jumpSearchBar.closest(".SearchBar");if(t){t.classList.add("focused")}};this.handleBlur=()=>{const t=this.jumpSearchBar.closest(".SearchBar");if(t){t.classList.remove("focused")}};this.doSearch=()=>{if(this.jumpSearchBar){this.searchValue=this.jumpSearchBar.value;if(this.searchValue.length>=3){this.resType="results";this.innerResults=undefined;this.search.emit({search:this.searchValue});this.searchFilters.emit({name:"search",value:this.searchValue});if(!this.dropdownVisible){this.dropdownVisible=true}}else if(this.searchValue.length==0){this.dropdownVisible=false}}};this.dropdownVisible=false;this.searchValue=undefined;this.resType="recents";this.innerResults=[];this.totalResults=0;this.isExpanded=false;this.placeholder="Cerca...";this.noResultText="Nessun risultato corrispondente";this.loadingText="Sto caricando...";this.resultsText="risultati";this.showAllResText="Mostra tutti i risultati";this.identifier="search-bar";this.debounceTime=500;this.variant="outline";this.withBtn=false;this.recentsTitle="Recenti";this.recents=[];this.results=[];this.dropdown=false;this.linearIconOnly=false;this.dropdownPosition="relative"}searchValueChanged(t){if(t===""){this.innerResults=[...this.recents];this.results=[]}}componentDidLoad(){document.addEventListener("click",this.handleOutsideClick.bind(this))}disconnectedCallback(){document.removeEventListener("click",this.handleOutsideClick.bind(this))}addOption(t){let r=t.detail;this.recents=[...this.recents,Object.assign({},r)];this.innerResults=[...this.recents]}async setResults(t,r){this.results=t;this.innerResults=t;this.totalResults=r}handleOutsideClick(t){if(this.componentRef&&!this.componentRef.contains(t.target)){this.dropdownVisible=false}}debounce(t,r=this.debounceTime){let e;return(...i)=>{if(e){clearTimeout(e)}e=setTimeout((()=>{t.apply(null,i)}),r)}}openDropdown(){this.resType="recents";this.dropdownVisible=true}handleResClicked(t){this.resultClicked.emit({clicked:t})}btnOrShowOtherClicked(){this.showFullSearch.emit({search:this.searchValue})}expandSearchBar(){this.isExpanded=true;this.searchbarExpanded.emit()}renderLinearIconOnly(){return e(i,{class:"JumpSearchBar ",ref:t=>this.componentRef=t},e("div",{class:"SearchBar iconOnly "+this.variant+(this.isExpanded?" expanded":"")},e("div",{class:"InputWrapper",onClick:this.isExpanded&&this.dropdown&&this.recents.length>0?()=>this.openDropdown():null},e("jump-icon",{name:"magnifying-glass",category:"light",onClick:()=>this.expandSearchBar()}),this.isExpanded&&e("input",{placeholder:this.placeholder,type:"search",id:this.identifier,class:"search-input",ref:t=>{this.jumpSearchBar=t},onInput:this.debounce(this.doSearch),onFocus:this.handleFocus,onBlur:this.handleBlur}))),this.dropdown&&this.dropdownVisible&&this.renderDropdown())}renderDefault(){return e(i,{class:"JumpSearchBar",ref:t=>this.componentRef=t},e("div",{class:"SearchBar "+this.variant+" "+(this.withBtn?"withBtn":"")+(this.isExpanded?" expanded":"")},e("div",{class:"InputWrapper",onClick:this.dropdown&&this.recents.length>0?()=>this.openDropdown():null},!this.withBtn&&e("jump-icon",{name:"magnifying-glass",category:"light"}),e("input",{placeholder:this.placeholder,type:"search",id:this.identifier,class:"search-input",ref:t=>{this.jumpSearchBar=t},onInput:this.debounce(this.doSearch),onFocus:this.handleFocus,onBlur:this.handleBlur})),this.withBtn&&!this.linearIconOnly&&e("jump-button",{variant:"secondary",size:"medium",name:"scopri",value:"value","aria-label":"Scopri di più",id:"button",onlyIcon:true,onClick:()=>this.btnOrShowOtherClicked()},e("jump-icon",{slot:"suffix",name:"magnifying-glass"}))),this.dropdown&&this.dropdownVisible&&this.renderDropdown())}renderDropdown(){console.log("POSITION",this.dropdownPosition);return e("div",{class:"Dropdown "+(this.dropdownPosition=="absolute"?"dropAbsolute":"dropRelative")},this.resType=="recents"&&e("div",{class:"Dropdown__Recents"},e("span",{class:"title"},this.recentsTitle),e("div",{class:"ResWrapper"},this.innerResults.length>0&&this.innerResults.map((t=>e("div",{onClick:()=>this.handleResClicked(t)},e("jump-icon",{name:"magnifying-glass",category:"light"}),t["value"]))))),this.resType=="results"&&e("div",{class:"Dropdown__Results"},e("div",{class:"ResWrapper"},this.innerResults===undefined?e("div",{class:"helperText"},e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 100",preserveAspectRatio:"xMidYMid",width:"252",height:"252"},e("g",null,e("g",{transform:"rotate(0 50 50)"},e("rect",{fill:"#707070",height:"11",width:"4",ry:"1.87",rx:"1.87",y:"27.5",x:"48"},e("animate",{repeatCount:"indefinite",begin:"-0.9s",dur:"1s",keyTimes:"0;1",values:"1;0",attributeName:"opacity"}))),e("g",{transform:"rotate(36 50 50)"},e("rect",{fill:"#707070",height:"11",width:"4",ry:"1.87",rx:"1.87",y:"27.5",x:"48"},e("animate",{repeatCount:"indefinite",begin:"-0.8s",dur:"1s",keyTimes:"0;1",values:"1;0",attributeName:"opacity"}))),e("g",{transform:"rotate(72 50 50)"},e("rect",{fill:"#707070",height:"11",width:"4",ry:"1.87",rx:"1.87",y:"27.5",x:"48"},e("animate",{repeatCount:"indefinite",begin:"-0.7s",dur:"1s",keyTimes:"0;1",values:"1;0",attributeName:"opacity"}))),e("g",{transform:"rotate(108 50 50)"},e("rect",{fill:"#707070",height:"11",width:"4",ry:"1.87",rx:"1.87",y:"27.5",x:"48"},e("animate",{repeatCount:"indefinite",begin:"-0.6s",dur:"1s",keyTimes:"0;1",values:"1;0",attributeName:"opacity"}))),e("g",{transform:"rotate(144 50 50)"},e("rect",{fill:"#707070",height:"11",width:"4",ry:"1.87",rx:"1.87",y:"27.5",x:"48"},e("animate",{repeatCount:"indefinite",begin:"-0.5s",dur:"1s",keyTimes:"0;1",values:"1;0",attributeName:"opacity"}))),e("g",{transform:"rotate(180 50 50)"},e("rect",{fill:"#707070",height:"11",width:"4",ry:"1.87",rx:"1.87",y:"27.5",x:"48"},e("animate",{repeatCount:"indefinite",begin:"-0.4s",dur:"1s",keyTimes:"0;1",values:"1;0",attributeName:"opacity"}))),e("g",{transform:"rotate(216 50 50)"},e("rect",{fill:"#707070",height:"11",width:"4",ry:"1.87",rx:"1.87",y:"27.5",x:"48"},e("animate",{repeatCount:"indefinite",begin:"-0.3s",dur:"1s",keyTimes:"0;1",values:"1;0",attributeName:"opacity"}))),e("g",{transform:"rotate(252 50 50)"},e("rect",{fill:"#707070",height:"11",width:"4",ry:"1.87",rx:"1.87",y:"27.5",x:"48"},e("animate",{repeatCount:"indefinite",begin:"-0.2s",dur:"1s",keyTimes:"0;1",values:"1;0",attributeName:"opacity"}))),e("g",{transform:"rotate(288 50 50)"},e("rect",{fill:"#707070",height:"11",width:"4",ry:"1.87",rx:"1.87",y:"27.5",x:"48"},e("animate",{repeatCount:"indefinite",begin:"-0.1s",dur:"1s",keyTimes:"0;1",values:"1;0",attributeName:"opacity"}))),e("g",{transform:"rotate(324 50 50)"},e("rect",{fill:"#707070",height:"11",width:"4",ry:"1.87",rx:"1.87",y:"27.5",x:"48"},e("animate",{repeatCount:"indefinite",begin:"0s",dur:"1s",keyTimes:"0;1",values:"1;0",attributeName:"opacity"}))),e("g",null))),this.loadingText):this.innerResults.length>0?this.innerResults.map((t=>e("div",{onClick:()=>this.handleResClicked(t),key:t["id"]},t["img"]&&e("img",{src:t["img"],alt:"result"}),t["value"]))):e("div",{class:"helperText"},this.noResultText),this.innerResults&&this.innerResults.length>0&&e("div",{class:"totalRes"},e("jump-button",{variant:"secondary",size:"small",text:true,onClick:()=>this.btnOrShowOtherClicked(),target:"_blank"}," ",this.showAllResText," "),this.totalResults&&e("div",null,this.totalResults," ",this.resultsText)))))}render(){if(this.variant==="linear"&&this.linearIconOnly){return this.renderLinearIconOnly()}else{return this.renderDefault()}}static get watchers(){return{searchValue:["searchValueChanged"]}}};o.style=a;export{o as jump_search_bar};
|
|
2
|
+
//# sourceMappingURL=p-1feed0e9.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["jumpSearchBarCss","JumpSearchBarStyle0","JumpSearchBar","this","handleFocus","searchBarContainer","jumpSearchBar","closest","classList","add","handleBlur","remove","doSearch","searchValue","value","length","resType","innerResults","undefined","search","emit","searchFilters","name","dropdownVisible","searchValueChanged","newValue","recents","results","componentDidLoad","document","addEventListener","handleOutsideClick","bind","disconnectedCallback","removeEventListener","addOption","e","props","detail","Object","assign","setResults","tot","totalResults","event","componentRef","contains","target","debounce","fn","delay","debounceTime","timeoutId","args","clearTimeout","setTimeout","apply","openDropdown","handleResClicked","item","resultClicked","clicked","btnOrShowOtherClicked","showFullSearch","expandSearchBar","isExpanded","searchbarExpanded","renderLinearIconOnly","h","Host","class","ref","el","variant","onClick","dropdown","category","placeholder","type","id","identifier","onInput","onFocus","onBlur","renderDropdown","renderDefault","withBtn","linearIconOnly","size","onlyIcon","slot","console","log","dropdownPosition","recentsTitle","map","xmlns","viewBox","preserveAspectRatio","width","height","transform","fill","ry","rx","y","x","repeatCount","begin","dur","keyTimes","values","attributeName","loadingText","key","src","alt","noResultText","text","showAllResText","resultsText","render"],"sources":["src/components/jump-search-bar/jump-search-bar.scss?tag=jump-search-bar&encapsulation=shadow","src/components/jump-search-bar/jump-search-bar.tsx"],"sourcesContent":[":host {\n display: block;\n\n --jump-search-bar-focus-color: var(--secondary-standard, #5E79BA);\n --jump-search-bar-border-color: var(--neutral-grey-secondary, #707070);\n --jump-search-bar-bg-color: var(--gray-ultralight, #F8F8F8);\n --jump-search-bar-dropdown-border-color: var(--neutral-grey-disabled, #CBCBCB);\n\n font-family: var(--ff-primary);\n\n jump-button {\n --jump-button-border-radius: 0px 3px 3px 0px;\n }\n\n .SearchBar {\n position: relative;\n\n &.focused .InputWrapper {\n border-color: var(--jump-search-bar-focus-color) !important;\n \n jump-icon {\n color: var(--jump-search-bar-focus-color) !important;\n }\n \n input {\n outline: none !important;\n }\n }\n }\n\n .SearchBar:not(.iconOnly) {\n display: flex;\n width: 100%;\n \n .InputWrapper {\n width: 100%;\n display: flex;\n }\n \n input {\n width: 100%;\n border: none;\n }\n \n /* Stile outline*/\n &.outline .InputWrapper {\n border: 1px solid var(--jump-search-bar-border-color);\n border-radius: 3px;\n padding: 12px;\n gap: 8px;\n \n jump-icon {\n color: var(--jump-search-bar-border-color);\n }\n }\n \n &.outline.withBtn .InputWrapper {\n border-radius: 3px 0px 0px 3px;\n }\n \n \n /* Stile filled */\n &.filled .InputWrapper {\n border: 1px solid var(--jump-search-bar-bg-color);\n background-color: var(--jump-search-bar-bg-color);\n border-radius: 3px;\n padding: 12px;\n gap: 8px;\n \n input {\n background-color: var(--jump-search-bar-bg-color);\n }\n \n jump-icon {\n color: var(--jump-search-bar-border-color);\n }\n }\n \n &.filled.focused.withBtn .InputWrapper {\n border-radius: 3px 0px 0px 3px !important;\n }\n \n /* Stile linear */\n &.linear .InputWrapper {\n border-bottom: 1px solid var(--jump-search-bar-border-color);\n padding-bottom: 4px;\n \n jump-icon {\n padding-right: 6px;\n }\n }\n }\n \n \n .Dropdown {\n\n &.dropAbsolute {\n position: absolute;\n box-sizing: border-box;\n position: absolute;\n left: 0;\n width: 100%;\n }\n\n &.dropRelative {\n position: relative;\n }\n\n // position: absolute; la tolgo per il test\n margin-top: 10px;\n border-radius: 3px;\n border: 1px solid var(--jump-search-bar-dropdown-border-color);\n padding: 4px 16px;\n background-color: white;\n\n &__Recents {\n .title {\n color: #707070;\n font-size: 14px;\n line-height: 20px;\n padding: 8px 0;\n font-weight: 700;\n display: flex;\n }\n }\n\n &__Results {\n .totalRes {\n display: flex; \n justify-content: space-between;\n }\n }\n \n\n .ResWrapper {\n display: flex;\n flex-direction: column;\n\n div {\n padding: 8px 0;\n color: #707070;\n font-size: 14px;\n display: flex;\n gap: 12px;\n align-items: center;\n\n img {\n width: 40px;\n height: 48px;\n object-fit: cover;\n border-radius: 3px;\n }\n }\n\n div:hover {\n cursor: pointer;\n }\n\n .helperText {\n color: #CBCBCB;\n\n svg {\n width: 25px;\n height: 25px;\n }\n }\n }\n }\n\n/* Applicazione dell'animazione alla SearchBar.iconOnly.linear */\n.SearchBar.iconOnly.linear {\n display: flex;\n width: 100%;\n\n .InputWrapper {\n width: 100%;\n display: flex;\n align-items: center;\n transition: border-bottom 0.3s ease;\n /* Transizione solo per il bordo inferiore */\n border-bottom: 1px solid transparent;\n /* Nessun bordo inizialmente */\n padding-bottom: 4px;\n overflow: hidden;\n /* Per nascondere il contenuto che esce dai limiti dell'InputWrapper */\n\n jump-icon {\n padding-right: 6px;\n /* Padding dell'icona */\n }\n\n input {\n width: 0;\n /* Imposta la larghezza iniziale a 0 */\n border: none;\n transform: translateX(-100%);\n /* Sposta l'input fuori dalla vista */\n transition: width 0.3s ease, transform 0.3s ease;\n /* Transizioni separate per width e transform */\n animation: none;\n /* Disabilita l'animazione predefinita */\n }\n }\n\n &.expanded {\n .InputWrapper {\n border-bottom: 1px solid var(--jump-search-bar-border-color);\n /* Mostra il bordo inferiore quando espanso */\n transition: border-bottom 0.3s ease;\n /* Transizione per il bordo inferiore */\n\n input {\n width: 100%;\n /* Espande l'input a tutta la larghezza disponibile */\n transform: translateX(0);\n /* Riposiziona l'input nella vista */\n animation: slide-right 0.3s ease forwards;\n /* Applicazione dell'animazione slide-right */\n }\n }\n }\n}\n \n}\n\n@keyframes slide-right {\n from {\n transform: translateX(-100%);\n opacity: 0;\n }\n\n to {\n transform: translateX(0);\n opacity: 1;\n }\n}\n\n@keyframes border-slide-right {\n from {\n border-bottom-width: 0;\n }\n\n to {\n border-bottom-width: 1px;\n }\n}","import { Component, Method, Watch, Listen, State, Host, h, Prop, Event, EventEmitter } from '@stencil/core';\n\n@Component({\n tag: 'jump-search-bar',\n styleUrl: 'jump-search-bar.scss',\n shadow: true,\n})\nexport class JumpSearchBar {\n\n /* ---------------------- @OWN PROPERTIES ------------------------- */\n jumpSearchBar: HTMLInputElement;\n private componentRef: HTMLElement;\n\n /* ---------------------- @STATE ------------------------- */\n @State() dropdownVisible: boolean = false;\n @State() searchValue: string = undefined;\n\n @Watch('searchValue')\n searchValueChanged(newValue: string) {\n if (newValue === '') {\n // Create a new array reference to trigger re-render\n this.innerResults = [...this.recents];\n this.results = [];\n }\n }\n\n @State() resType: string = 'recents';\n @State() innerResults: Array<object> = [];\n @State() totalResults: number = 0;\n @State() isExpanded: boolean = false; \n\n /* ---------------------- @PROPERTIES ------------------------- */\n @Prop() placeholder: string = 'Cerca...'; //Il testo del placeholder dell\\'input della searchbar\n @Prop() noResultText: string = 'Nessun risultato corrispondente'; // Il testo da mostrare in caso nessun risultato sia stato recuperato.\n @Prop() loadingText: string = 'Sto caricando...'; // Il testo mostrato durante il caricamento dei risultati.\n @Prop() resultsText: string = 'risultati'; // Il testo mostrato accanto al numero di risultati totali.\n @Prop() showAllResText: string = 'Mostra tutti i risultati'; // La label da mostrare per il pulsante che mostra tutti i risultati.\n @Prop() identifier: string = 'search-bar'; // Identificatore della searchbar\n @Prop() debounceTime: number = 500; // 'Il tempo di attesa per l\\'invio della ricerca in caso di ricerca automatica. In millisecondi.\n @Prop() variant: string = 'outline'; // Scelta dello stile della barra di ricerca tra filled, linear e outline.\n @Prop() withBtn: boolean = false; // Se true, aggiunge un pulsante alla barra di ricerca\n @Prop() recentsTitle: string = 'Recenti'; // Serve per il titolo del dropwdown quando si vedono le ricerche recenti\n @Prop() recents: Array<object> = []; // Serve per il dropdown quando si vedono le ricerche recenti\n @Prop() results: Array<object> = []; // Serve per il dropdown quando si vedono i risultati della ricerca\n @Prop() dropdown: boolean = false; // Se true, mostra il dropdown con i risultati della ricerca.\n @Prop() linearIconOnly: boolean = false; // Se true, mostra solo l'icona nella barra di ricerca lineare\n @Prop() dropdownPosition: string = 'relative'; // Posizione del dropdown rispetto alla searchbar. \"relative\" o \"absolute\"\n\n\n /* ---------------------- @EVENTS ------------------------- */\n\n /**\n * Evento emesso quando l'utente clicca sull'icona in variant linear e linearIconOnly\n */\n @Event({ eventName: 'jump-search-bar-expanded' }) searchbarExpanded: EventEmitter;\n\n /**\n * Evento emesso quando l'utente effettua una ricerca \n * Emette un oggetto contenenente il valore della ricerca alla chiave 'search'\n * */\n @Event({ eventName: 'jump-search-bar' }) search: EventEmitter;\n @Event({ eventName: 'jump-filterchange' }) searchFilters: EventEmitter; // E' analoga a quella sopra ma serve per i filtri\n\n /** \n * Evento emesso quando l'utente clicca sul pulsante (se presente) o nel pulsante del dropdown per vedere tutti i risultati \n * Emette un oggetto contenenente il valore della ricerca alla chiave 'search'\n */\n @Event({ eventName: 'jump-search-bar-show-all' }) showFullSearch: EventEmitter;\n\n /* \n * Evento da ascoltare per recuperare il dato cliccato\n * Emette un oggetto contenente tutti i dati relativi al risultato cliccato.\n */\n @Event({ eventName: 'jump-search-bar-res-clicked'}) resultClicked: EventEmitter; \n\n /* ---------------------- @LIFECYCLE ------------------------- */\n componentDidLoad() {\n // Aggiungi l'event listener per il clic al di fuori del componente\n document.addEventListener('click', this.handleOutsideClick.bind(this));\n }\n\n disconnectedCallback() {\n // Rimuovi l'event listener per evitare perdite di memoria\n document.removeEventListener('click', this.handleOutsideClick.bind(this));\n }\n\n /* -------------------- @LISTEN ------------------------------- */\n @Listen(\"jump-search-bar-dropdown-item-connected\")\n addOption(e) {\n let props = e.detail; // es {code: 'sku1', imageUrl: 'https://google.com/'}\n\n // Aggiungi l'elemento solo a `recents`\n this.recents = [...this.recents, { ...props }];\n\n // Aggiorna `innerResults` basandoti solo su `recents`\n this.innerResults = [...this.recents];\n }\n\n\n /* -------------------- @METHOD ------------------------------- */\n\n /** Imposta i risultati della ricerca all'interno della dropdown */\n @Method()\n async setResults(results, tot?: number) {\n this.results = results;\n this.innerResults = results;\n this.totalResults = tot;\n }\n\n /* -------------------- LOCAL METHODS ------------------------- */\n handleOutsideClick(event: MouseEvent) {\n // Controlla se il clic è fuori dal componente\n if (this.componentRef && !this.componentRef.contains(event.target as Node)) {\n this.dropdownVisible = false;\n }\n }\n\n // Gestisce l'evento focus sull'input\n handleFocus = () => {\n const searchBarContainer = this.jumpSearchBar.closest('.SearchBar');\n if (searchBarContainer) {\n searchBarContainer.classList.add('focused');\n }\n };\n\n // Gestisce l'evento blur sull'input\n handleBlur = () => {\n const searchBarContainer = this.jumpSearchBar.closest('.SearchBar');\n if (searchBarContainer) {\n searchBarContainer.classList.remove('focused');\n }\n };\n\n doSearch = () => {\n if (this.jumpSearchBar) {\n this.searchValue = this.jumpSearchBar.value;\n \n // Iniziare la ricerca solamente se ci sono almeno tre caratteri \n if (this.searchValue.length >= 3) {\n this.resType = 'results';\n\n this.innerResults = undefined;\n \n this.search.emit({ search: this.searchValue });\n this.searchFilters.emit({ name: 'search', value: this.searchValue });\n \n // Se il dropdown è chiuso, aprilo. Potrebbe essere chiuso perchè non ci sono recenti\n if (!this.dropdownVisible) {\n this.dropdownVisible = true;\n }\n } else if(this.searchValue.length == 0) {\n this.dropdownVisible = false;\n }\n }\n };\n\n debounce(fn, delay = this.debounceTime) {\n let timeoutId;\n\n return (...args) => {\n if (timeoutId) {\n clearTimeout(timeoutId);\n }\n timeoutId = setTimeout(() => {\n fn.apply(null, args);\n }, delay);\n };\n };\n\n openDropdown() {\n this.resType = 'recents';\n this.dropdownVisible = true;\n }\n\n /** Emette l'evento di click su un risultato, mandandone tutti i dati */\n handleResClicked(item) {\n this.resultClicked.emit({ clicked: item });\n } \n\n /** Emette l'evento quando l'utente clicca sul pulsante (se presente) o nel pulsante del dropdown per vedere tutti i risultati */\n btnOrShowOtherClicked(){\n this.showFullSearch.emit({ search: this.searchValue });\n }\n\n /**\n * Se clicco l'icona espando la searchbar ed emetto un evento dedicato\n */\n expandSearchBar() {\n this.isExpanded = true;\n this.searchbarExpanded.emit();\n }\n\n\n /* --------------------- RENDER ------------------------------- */\n renderLinearIconOnly() {\n return (\n <Host class={\"JumpSearchBar \"} ref={(el) => (this.componentRef = el as HTMLElement)}>\n <div class={\"SearchBar iconOnly \" + this.variant + (this.isExpanded ? \" expanded\" : \"\")}>\n <div class=\"InputWrapper\" onClick={(this.isExpanded && this.dropdown && this.recents.length > 0) ? () => this.openDropdown() : null}>\n <jump-icon\n name=\"magnifying-glass\"\n category=\"light\"\n onClick={() => this.expandSearchBar()}\n ></jump-icon>\n {this.isExpanded &&\n // Mostra la barra di ricerca con l'animazione di slide\n <input\n placeholder={this.placeholder}\n type=\"search\"\n id={this.identifier}\n class=\"search-input\"\n ref={(el) => { this.jumpSearchBar = el as HTMLInputElement }}\n onInput={this.debounce(this.doSearch)}\n onFocus={this.handleFocus}\n onBlur={this.handleBlur}\n />\n }\n </div>\n </div>\n {(this.dropdown && this.dropdownVisible) && this.renderDropdown()} \n </Host>\n );\n }\n\n renderDefault() {\n return (\n <Host class={\"JumpSearchBar\"} ref={(el) => (this.componentRef = el as HTMLElement)}>\n <div class={\"SearchBar \" + this.variant + \" \" + (this.withBtn ? \"withBtn\" : \"\") + (this.isExpanded ? \" expanded\" : \"\")}>\n <div class=\"InputWrapper\" onClick={(this.dropdown && this.recents.length > 0) ? () => this.openDropdown() : null}>\n {!this.withBtn && <jump-icon name=\"magnifying-glass\" category=\"light\"></jump-icon>}\n <input\n placeholder={this.placeholder}\n type=\"search\"\n id={this.identifier}\n class=\"search-input\"\n ref={(el) => { this.jumpSearchBar = el as HTMLInputElement }}\n onInput={this.debounce(this.doSearch)}\n onFocus={this.handleFocus}\n onBlur={this.handleBlur}\n />\n </div>\n {this.withBtn && !this.linearIconOnly && (\n <jump-button\n variant=\"secondary\"\n size=\"medium\"\n name=\"scopri\"\n value=\"value\"\n aria-label=\"Scopri di più\"\n id=\"button\"\n onlyIcon\n onClick={() => this.btnOrShowOtherClicked()}\n >\n <jump-icon slot=\"suffix\" name=\"magnifying-glass\"></jump-icon>\n </jump-button>\n )}\n </div>\n {(this.dropdown && this.dropdownVisible) && this.renderDropdown()} \n </Host>\n );\n }\n\n renderDropdown(){\n console.log('POSITION', this.dropdownPosition);\n return <div class={\"Dropdown \" + (this.dropdownPosition == 'absolute' ? 'dropAbsolute' : 'dropRelative' ) }>\n {(this.resType == 'recents') &&\n <div class=\"Dropdown__Recents\">\n <span class=\"title\">{this.recentsTitle}</span>\n <div class=\"ResWrapper\">\n {this.innerResults.length > 0 && this.innerResults.map((item) => (\n <div onClick={() => this.handleResClicked(item)}>\n <jump-icon name=\"magnifying-glass\" category=\"light\"></jump-icon>\n {item['value']}\n </div>\n ))}\n </div>\n </div>\n }\n {this.resType == 'results' &&\n <div class=\"Dropdown__Results\">\n <div class=\"ResWrapper\">\n {this.innerResults === undefined ?\n <div class=\"helperText\"><svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 100 100\" preserveAspectRatio=\"xMidYMid\" width=\"252\" height=\"252\" ><g><g transform=\"rotate(0 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"-0.9s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g transform=\"rotate(36 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"-0.8s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g transform=\"rotate(72 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"-0.7s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g transform=\"rotate(108 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"-0.6s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g transform=\"rotate(144 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"-0.5s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g transform=\"rotate(180 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"-0.4s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g transform=\"rotate(216 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"-0.3s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g transform=\"rotate(252 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"-0.2s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g transform=\"rotate(288 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"-0.1s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g transform=\"rotate(324 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"0s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g></g></g></svg>{this.loadingText}</div>\n :\n (this.innerResults.length > 0 ?\n this.innerResults.map((item) => (\n <div onClick={() => this.handleResClicked(item)} key={item['id']}>\n {item['img'] && <img src={item['img']} alt=\"result\" />}\n {item['value']}\n </div>\n ))\n :\n <div class=\"helperText\">{this.noResultText}</div>\n )\n }\n {(this.innerResults && this.innerResults.length > 0) &&\n <div class=\"totalRes\">\n <jump-button variant=\"secondary\" size=\"small\" text onClick={() => this.btnOrShowOtherClicked()} target=\"_blank\"> {this.showAllResText} </jump-button>\n {this.totalResults && <div>{this.totalResults} {this.resultsText}</div>}\n </div>\n }\n </div>\n </div>\n }\n </div>\n }\n\n render() {\n if (this.variant === 'linear' && this.linearIconOnly) {\n return this.renderLinearIconOnly();\n } else {\n return this.renderDefault();\n }\n }\n}"],"mappings":"yDAAA,MAAMA,EAAmB,kyHACzB,MAAAC,EAAeD,E,MCMFE,EAAa,M,kSA+GxBC,KAAAC,YAAc,KACZ,MAAMC,EAAqBF,KAAKG,cAAcC,QAAQ,cACtD,GAAIF,EAAoB,CACtBA,EAAmBG,UAAUC,IAAI,U,GAKrCN,KAAAO,WAAa,KACX,MAAML,EAAqBF,KAAKG,cAAcC,QAAQ,cACtD,GAAIF,EAAoB,CACtBA,EAAmBG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S,MAAMC,OAAO,MAAMC,cAAc,cAEhG5C,EAAA,YAAkBjE,KAAK8G,aAE5B9G,KAAKc,aAAaF,OAAS,EAC1BZ,KAAKc,aAAa8E,KAAKpC,GACrBS,EAAA,OAAKM,QAAS,IAAMvE,KAAKuD,iBAAiBC,GAAOuD,IAAKvD,EAAK,OACxDA,EAAK,QAAUS,EAAA,OAAK+C,IAAKxD,EAAK,OAAQyD,IAAI,WAC1CzD,EAAK,YAIVS,EAAA,OAAKE,MAAM,cAAcnE,KAAKkH,cAGhClH,KAAKc,cAAgBd,KAAKc,aAAaF,OAAS,GAChDqD,EAAA,OAAKE,MAAM,YACTF,EAAA,eAAaK,QAAQ,YAAYe,KAAK,QAAQ8B,KAAI,KAAC5C,QAAS,IAAMvE,KAAK2D,wBAAyBf,OAAO,UAAQ,IAAG5C,KAAKoH,eAAc,KACpIpH,KAAKwC,cAAgByB,EAAA,WAAMjE,KAAKwC,aAAY,IAAGxC,KAAKqH,gB,CASrE,MAAAC,GACE,GAAItH,KAAKsE,UAAY,UAAYtE,KAAKoF,eAAgB,CACpD,OAAOpF,KAAKgE,sB,KACP,CACL,OAAOhE,KAAKkF,e"}
|
package/package.json
CHANGED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r as t,c as r,h as e,H as i}from"./p-40ca24a6.js";const s=":host{display:block;--jump-search-bar-focus-color:var(--secondary-standard, #5E79BA);--jump-search-bar-border-color:var(--neutral-grey-secondary, #707070);--jump-search-bar-bg-color:var(--gray-ultralight, #F8F8F8);--jump-search-bar-dropdown-border-color:var(--neutral-grey-disabled, #CBCBCB);font-family:var(--ff-primary);}:host jump-button{--jump-button-border-radius:0px 3px 3px 0px}:host .SearchBar{position:relative}:host .SearchBar.focused .InputWrapper{border-color:var(--jump-search-bar-focus-color) !important}:host .SearchBar.focused .InputWrapper jump-icon{color:var(--jump-search-bar-focus-color) !important}:host .SearchBar.focused .InputWrapper input{outline:none !important}:host .SearchBar:not(.iconOnly){display:flex;width:100%;}:host .SearchBar:not(.iconOnly) .InputWrapper{width:100%;display:flex}:host .SearchBar:not(.iconOnly) input{width:100%;border:none}:host .SearchBar:not(.iconOnly).outline .InputWrapper{border:1px solid var(--jump-search-bar-border-color);border-radius:3px;padding:12px;gap:8px}:host .SearchBar:not(.iconOnly).outline .InputWrapper jump-icon{color:var(--jump-search-bar-border-color)}:host .SearchBar:not(.iconOnly).outline.withBtn .InputWrapper{border-radius:3px 0px 0px 3px}:host .SearchBar:not(.iconOnly).filled .InputWrapper{border:1px solid var(--jump-search-bar-bg-color);background-color:var(--jump-search-bar-bg-color);border-radius:3px;padding:12px;gap:8px}:host .SearchBar:not(.iconOnly).filled .InputWrapper input{background-color:var(--jump-search-bar-bg-color)}:host .SearchBar:not(.iconOnly).filled .InputWrapper jump-icon{color:var(--jump-search-bar-border-color)}:host .SearchBar:not(.iconOnly).filled.focused.withBtn .InputWrapper{border-radius:3px 0px 0px 3px !important}:host .SearchBar:not(.iconOnly).linear .InputWrapper{border-bottom:1px solid var(--jump-search-bar-border-color);padding-bottom:4px}:host .SearchBar:not(.iconOnly).linear .InputWrapper jump-icon{padding-right:6px}:host .Dropdown{margin-top:10px;border-radius:3px;border:1px solid var(--jump-search-bar-dropdown-border-color);padding:4px 16px;background-color:white}:host .Dropdown.dropAbsolute{position:absolute;box-sizing:border-box;position:absolute;left:0;width:100%}:host .Dropdown.dropRelative{position:relative}:host .Dropdown__Recents .title{color:#707070;font-size:14px;line-height:20px;padding:8px 0;font-weight:700;display:flex}:host .Dropdown__Results .totalRes{display:flex;justify-content:space-between}:host .Dropdown .ResWrapper{display:flex;flex-direction:column}:host .Dropdown .ResWrapper div{padding:8px 0;color:#707070;font-size:14px;display:flex;gap:12px;align-items:center}:host .Dropdown .ResWrapper div img{width:40px;height:48px;object-fit:cover;border-radius:3px}:host .Dropdown .ResWrapper div:hover{cursor:pointer}:host .Dropdown .ResWrapper .helperText{color:#CBCBCB}:host .Dropdown .ResWrapper .helperText svg{width:25px;height:25px}:host .SearchBar.iconOnly.linear{display:flex;width:100%}:host .SearchBar.iconOnly.linear .InputWrapper{width:100%;display:flex;align-items:center;transition:border-bottom 0.3s ease;border-bottom:1px solid transparent;padding-bottom:4px;overflow:hidden;}:host .SearchBar.iconOnly.linear .InputWrapper jump-icon{padding-right:6px;}:host .SearchBar.iconOnly.linear .InputWrapper input{width:0;border:none;transform:translateX(-100%);transition:width 0.3s ease, transform 0.3s ease;animation:none;}:host .SearchBar.iconOnly.linear.expanded .InputWrapper{border-bottom:1px solid var(--jump-search-bar-border-color);transition:border-bottom 0.3s ease;}:host .SearchBar.iconOnly.linear.expanded .InputWrapper input{width:100%;transform:translateX(0);animation:slide-right 0.3s ease forwards;}@keyframes slide-right{from{transform:translateX(-100%);opacity:0}to{transform:translateX(0);opacity:1}}@keyframes border-slide-right{from{border-bottom-width:0}to{border-bottom-width:1px}}";const a=s;const o=class{constructor(e){t(this,e);this.searchbarExpanded=r(this,"jump-search-bar-expanded",7);this.search=r(this,"jump-search-bar",7);this.searchFilters=r(this,"jump-filterchange",7);this.showFullSearch=r(this,"jump-search-bar-show-all",7);this.resultClicked=r(this,"jump-search-bar-res-clicked",7);this.handleFocus=()=>{const t=this.jumpSearchBar.closest(".SearchBar");if(t){t.classList.add("focused")}};this.handleBlur=()=>{const t=this.jumpSearchBar.closest(".SearchBar");if(t){t.classList.remove("focused")}};this.doSearch=()=>{if(this.jumpSearchBar){this.searchValue=this.jumpSearchBar.value;if(this.searchValue.length>=3){this.resType="results";this.innerResults=undefined;this.search.emit({search:this.searchValue});this.searchFilters.emit({search:this.searchValue});if(!this.dropdownVisible){this.dropdownVisible=true}}else if(this.searchValue.length==0){this.dropdownVisible=false}}};this.dropdownVisible=false;this.searchValue=undefined;this.resType="recents";this.innerResults=[];this.totalResults=0;this.isExpanded=false;this.placeholder="Cerca...";this.noResultText="Nessun risultato corrispondente";this.loadingText="Sto caricando...";this.resultsText="risultati";this.showAllResText="Mostra tutti i risultati";this.identifier="search-bar";this.debounceTime=500;this.variant="outline";this.withBtn=false;this.recentsTitle="Recenti";this.recents=[];this.results=[];this.dropdown=false;this.linearIconOnly=false;this.dropdownPosition="relative"}searchValueChanged(t){if(t===""){this.innerResults=[...this.recents];this.results=[]}}componentDidLoad(){document.addEventListener("click",this.handleOutsideClick.bind(this))}disconnectedCallback(){document.removeEventListener("click",this.handleOutsideClick.bind(this))}addOption(t){let r=t.detail;this.recents=[...this.recents,Object.assign({},r)];this.innerResults=[...this.recents]}async setResults(t,r){this.results=t;this.innerResults=t;this.totalResults=r}handleOutsideClick(t){if(this.componentRef&&!this.componentRef.contains(t.target)){this.dropdownVisible=false}}debounce(t,r=this.debounceTime){let e;return(...i)=>{if(e){clearTimeout(e)}e=setTimeout((()=>{t.apply(null,i)}),r)}}openDropdown(){this.resType="recents";this.dropdownVisible=true}handleResClicked(t){this.resultClicked.emit({clicked:t})}btnOrShowOtherClicked(){this.showFullSearch.emit({search:this.searchValue})}expandSearchBar(){this.isExpanded=true;this.searchbarExpanded.emit()}renderLinearIconOnly(){return e(i,{class:"JumpSearchBar ",ref:t=>this.componentRef=t},e("div",{class:"SearchBar iconOnly "+this.variant+(this.isExpanded?" expanded":"")},e("div",{class:"InputWrapper",onClick:this.isExpanded&&this.dropdown&&this.recents.length>0?()=>this.openDropdown():null},e("jump-icon",{name:"magnifying-glass",category:"light",onClick:()=>this.expandSearchBar()}),this.isExpanded&&e("input",{placeholder:this.placeholder,type:"search",id:this.identifier,class:"search-input",ref:t=>{this.jumpSearchBar=t},onInput:this.debounce(this.doSearch),onFocus:this.handleFocus,onBlur:this.handleBlur}))),this.dropdown&&this.dropdownVisible&&this.renderDropdown())}renderDefault(){return e(i,{class:"JumpSearchBar",ref:t=>this.componentRef=t},e("div",{class:"SearchBar "+this.variant+" "+(this.withBtn?"withBtn":"")+(this.isExpanded?" expanded":"")},e("div",{class:"InputWrapper",onClick:this.dropdown&&this.recents.length>0?()=>this.openDropdown():null},!this.withBtn&&e("jump-icon",{name:"magnifying-glass",category:"light"}),e("input",{placeholder:this.placeholder,type:"search",id:this.identifier,class:"search-input",ref:t=>{this.jumpSearchBar=t},onInput:this.debounce(this.doSearch),onFocus:this.handleFocus,onBlur:this.handleBlur})),this.withBtn&&!this.linearIconOnly&&e("jump-button",{variant:"secondary",size:"medium",name:"scopri",value:"value","aria-label":"Scopri di più",id:"button",onlyIcon:true,onClick:()=>this.btnOrShowOtherClicked()},e("jump-icon",{slot:"suffix",name:"magnifying-glass"}))),this.dropdown&&this.dropdownVisible&&this.renderDropdown())}renderDropdown(){console.log("POSITION",this.dropdownPosition);return e("div",{class:"Dropdown "+(this.dropdownPosition=="absolute"?"dropAbsolute":"dropRelative")},this.resType=="recents"&&e("div",{class:"Dropdown__Recents"},e("span",{class:"title"},this.recentsTitle),e("div",{class:"ResWrapper"},this.innerResults.length>0&&this.innerResults.map((t=>e("div",{onClick:()=>this.handleResClicked(t)},e("jump-icon",{name:"magnifying-glass",category:"light"}),t["value"]))))),this.resType=="results"&&e("div",{class:"Dropdown__Results"},e("div",{class:"ResWrapper"},this.innerResults===undefined?e("div",{class:"helperText"},e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 100",preserveAspectRatio:"xMidYMid",width:"252",height:"252"},e("g",null,e("g",{transform:"rotate(0 50 50)"},e("rect",{fill:"#707070",height:"11",width:"4",ry:"1.87",rx:"1.87",y:"27.5",x:"48"},e("animate",{repeatCount:"indefinite",begin:"-0.9s",dur:"1s",keyTimes:"0;1",values:"1;0",attributeName:"opacity"}))),e("g",{transform:"rotate(36 50 50)"},e("rect",{fill:"#707070",height:"11",width:"4",ry:"1.87",rx:"1.87",y:"27.5",x:"48"},e("animate",{repeatCount:"indefinite",begin:"-0.8s",dur:"1s",keyTimes:"0;1",values:"1;0",attributeName:"opacity"}))),e("g",{transform:"rotate(72 50 50)"},e("rect",{fill:"#707070",height:"11",width:"4",ry:"1.87",rx:"1.87",y:"27.5",x:"48"},e("animate",{repeatCount:"indefinite",begin:"-0.7s",dur:"1s",keyTimes:"0;1",values:"1;0",attributeName:"opacity"}))),e("g",{transform:"rotate(108 50 50)"},e("rect",{fill:"#707070",height:"11",width:"4",ry:"1.87",rx:"1.87",y:"27.5",x:"48"},e("animate",{repeatCount:"indefinite",begin:"-0.6s",dur:"1s",keyTimes:"0;1",values:"1;0",attributeName:"opacity"}))),e("g",{transform:"rotate(144 50 50)"},e("rect",{fill:"#707070",height:"11",width:"4",ry:"1.87",rx:"1.87",y:"27.5",x:"48"},e("animate",{repeatCount:"indefinite",begin:"-0.5s",dur:"1s",keyTimes:"0;1",values:"1;0",attributeName:"opacity"}))),e("g",{transform:"rotate(180 50 50)"},e("rect",{fill:"#707070",height:"11",width:"4",ry:"1.87",rx:"1.87",y:"27.5",x:"48"},e("animate",{repeatCount:"indefinite",begin:"-0.4s",dur:"1s",keyTimes:"0;1",values:"1;0",attributeName:"opacity"}))),e("g",{transform:"rotate(216 50 50)"},e("rect",{fill:"#707070",height:"11",width:"4",ry:"1.87",rx:"1.87",y:"27.5",x:"48"},e("animate",{repeatCount:"indefinite",begin:"-0.3s",dur:"1s",keyTimes:"0;1",values:"1;0",attributeName:"opacity"}))),e("g",{transform:"rotate(252 50 50)"},e("rect",{fill:"#707070",height:"11",width:"4",ry:"1.87",rx:"1.87",y:"27.5",x:"48"},e("animate",{repeatCount:"indefinite",begin:"-0.2s",dur:"1s",keyTimes:"0;1",values:"1;0",attributeName:"opacity"}))),e("g",{transform:"rotate(288 50 50)"},e("rect",{fill:"#707070",height:"11",width:"4",ry:"1.87",rx:"1.87",y:"27.5",x:"48"},e("animate",{repeatCount:"indefinite",begin:"-0.1s",dur:"1s",keyTimes:"0;1",values:"1;0",attributeName:"opacity"}))),e("g",{transform:"rotate(324 50 50)"},e("rect",{fill:"#707070",height:"11",width:"4",ry:"1.87",rx:"1.87",y:"27.5",x:"48"},e("animate",{repeatCount:"indefinite",begin:"0s",dur:"1s",keyTimes:"0;1",values:"1;0",attributeName:"opacity"}))),e("g",null))),this.loadingText):this.innerResults.length>0?this.innerResults.map((t=>e("div",{onClick:()=>this.handleResClicked(t),key:t["id"]},t["img"]&&e("img",{src:t["img"],alt:"result"}),t["value"]))):e("div",{class:"helperText"},this.noResultText),this.innerResults&&this.innerResults.length>0&&e("div",{class:"totalRes"},e("jump-button",{variant:"secondary",size:"small",text:true,onClick:()=>this.btnOrShowOtherClicked(),target:"_blank"}," ",this.showAllResText," "),this.totalResults&&e("div",null,this.totalResults," ",this.resultsText)))))}render(){if(this.variant==="linear"&&this.linearIconOnly){return this.renderLinearIconOnly()}else{return this.renderDefault()}}static get watchers(){return{searchValue:["searchValueChanged"]}}};o.style=a;export{o as jump_search_bar};
|
|
2
|
-
//# sourceMappingURL=p-5f0b2e2b.entry.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["jumpSearchBarCss","JumpSearchBarStyle0","JumpSearchBar","this","handleFocus","searchBarContainer","jumpSearchBar","closest","classList","add","handleBlur","remove","doSearch","searchValue","value","length","resType","innerResults","undefined","search","emit","searchFilters","dropdownVisible","searchValueChanged","newValue","recents","results","componentDidLoad","document","addEventListener","handleOutsideClick","bind","disconnectedCallback","removeEventListener","addOption","e","props","detail","Object","assign","setResults","tot","totalResults","event","componentRef","contains","target","debounce","fn","delay","debounceTime","timeoutId","args","clearTimeout","setTimeout","apply","openDropdown","handleResClicked","item","resultClicked","clicked","btnOrShowOtherClicked","showFullSearch","expandSearchBar","isExpanded","searchbarExpanded","renderLinearIconOnly","h","Host","class","ref","el","variant","onClick","dropdown","name","category","placeholder","type","id","identifier","onInput","onFocus","onBlur","renderDropdown","renderDefault","withBtn","linearIconOnly","size","onlyIcon","slot","console","log","dropdownPosition","recentsTitle","map","xmlns","viewBox","preserveAspectRatio","width","height","transform","fill","ry","rx","y","x","repeatCount","begin","dur","keyTimes","values","attributeName","loadingText","key","src","alt","noResultText","text","showAllResText","resultsText","render"],"sources":["src/components/jump-search-bar/jump-search-bar.scss?tag=jump-search-bar&encapsulation=shadow","src/components/jump-search-bar/jump-search-bar.tsx"],"sourcesContent":[":host {\n display: block;\n\n --jump-search-bar-focus-color: var(--secondary-standard, #5E79BA);\n --jump-search-bar-border-color: var(--neutral-grey-secondary, #707070);\n --jump-search-bar-bg-color: var(--gray-ultralight, #F8F8F8);\n --jump-search-bar-dropdown-border-color: var(--neutral-grey-disabled, #CBCBCB);\n\n font-family: var(--ff-primary);\n\n jump-button {\n --jump-button-border-radius: 0px 3px 3px 0px;\n }\n\n .SearchBar {\n position: relative;\n\n &.focused .InputWrapper {\n border-color: var(--jump-search-bar-focus-color) !important;\n \n jump-icon {\n color: var(--jump-search-bar-focus-color) !important;\n }\n \n input {\n outline: none !important;\n }\n }\n }\n\n .SearchBar:not(.iconOnly) {\n display: flex;\n width: 100%;\n \n .InputWrapper {\n width: 100%;\n display: flex;\n }\n \n input {\n width: 100%;\n border: none;\n }\n \n /* Stile outline*/\n &.outline .InputWrapper {\n border: 1px solid var(--jump-search-bar-border-color);\n border-radius: 3px;\n padding: 12px;\n gap: 8px;\n \n jump-icon {\n color: var(--jump-search-bar-border-color);\n }\n }\n \n &.outline.withBtn .InputWrapper {\n border-radius: 3px 0px 0px 3px;\n }\n \n \n /* Stile filled */\n &.filled .InputWrapper {\n border: 1px solid var(--jump-search-bar-bg-color);\n background-color: var(--jump-search-bar-bg-color);\n border-radius: 3px;\n padding: 12px;\n gap: 8px;\n \n input {\n background-color: var(--jump-search-bar-bg-color);\n }\n \n jump-icon {\n color: var(--jump-search-bar-border-color);\n }\n }\n \n &.filled.focused.withBtn .InputWrapper {\n border-radius: 3px 0px 0px 3px !important;\n }\n \n /* Stile linear */\n &.linear .InputWrapper {\n border-bottom: 1px solid var(--jump-search-bar-border-color);\n padding-bottom: 4px;\n \n jump-icon {\n padding-right: 6px;\n }\n }\n }\n \n \n .Dropdown {\n\n &.dropAbsolute {\n position: absolute;\n box-sizing: border-box;\n position: absolute;\n left: 0;\n width: 100%;\n }\n\n &.dropRelative {\n position: relative;\n }\n\n // position: absolute; la tolgo per il test\n margin-top: 10px;\n border-radius: 3px;\n border: 1px solid var(--jump-search-bar-dropdown-border-color);\n padding: 4px 16px;\n background-color: white;\n\n &__Recents {\n .title {\n color: #707070;\n font-size: 14px;\n line-height: 20px;\n padding: 8px 0;\n font-weight: 700;\n display: flex;\n }\n }\n\n &__Results {\n .totalRes {\n display: flex; \n justify-content: space-between;\n }\n }\n \n\n .ResWrapper {\n display: flex;\n flex-direction: column;\n\n div {\n padding: 8px 0;\n color: #707070;\n font-size: 14px;\n display: flex;\n gap: 12px;\n align-items: center;\n\n img {\n width: 40px;\n height: 48px;\n object-fit: cover;\n border-radius: 3px;\n }\n }\n\n div:hover {\n cursor: pointer;\n }\n\n .helperText {\n color: #CBCBCB;\n\n svg {\n width: 25px;\n height: 25px;\n }\n }\n }\n }\n\n/* Applicazione dell'animazione alla SearchBar.iconOnly.linear */\n.SearchBar.iconOnly.linear {\n display: flex;\n width: 100%;\n\n .InputWrapper {\n width: 100%;\n display: flex;\n align-items: center;\n transition: border-bottom 0.3s ease;\n /* Transizione solo per il bordo inferiore */\n border-bottom: 1px solid transparent;\n /* Nessun bordo inizialmente */\n padding-bottom: 4px;\n overflow: hidden;\n /* Per nascondere il contenuto che esce dai limiti dell'InputWrapper */\n\n jump-icon {\n padding-right: 6px;\n /* Padding dell'icona */\n }\n\n input {\n width: 0;\n /* Imposta la larghezza iniziale a 0 */\n border: none;\n transform: translateX(-100%);\n /* Sposta l'input fuori dalla vista */\n transition: width 0.3s ease, transform 0.3s ease;\n /* Transizioni separate per width e transform */\n animation: none;\n /* Disabilita l'animazione predefinita */\n }\n }\n\n &.expanded {\n .InputWrapper {\n border-bottom: 1px solid var(--jump-search-bar-border-color);\n /* Mostra il bordo inferiore quando espanso */\n transition: border-bottom 0.3s ease;\n /* Transizione per il bordo inferiore */\n\n input {\n width: 100%;\n /* Espande l'input a tutta la larghezza disponibile */\n transform: translateX(0);\n /* Riposiziona l'input nella vista */\n animation: slide-right 0.3s ease forwards;\n /* Applicazione dell'animazione slide-right */\n }\n }\n }\n}\n \n}\n\n@keyframes slide-right {\n from {\n transform: translateX(-100%);\n opacity: 0;\n }\n\n to {\n transform: translateX(0);\n opacity: 1;\n }\n}\n\n@keyframes border-slide-right {\n from {\n border-bottom-width: 0;\n }\n\n to {\n border-bottom-width: 1px;\n }\n}","import { Component, Method, Watch, Listen, State, Host, h, Prop, Event, EventEmitter } from '@stencil/core';\n\n@Component({\n tag: 'jump-search-bar',\n styleUrl: 'jump-search-bar.scss',\n shadow: true,\n})\nexport class JumpSearchBar {\n\n /* ---------------------- @OWN PROPERTIES ------------------------- */\n jumpSearchBar: HTMLInputElement;\n private componentRef: HTMLElement;\n\n /* ---------------------- @STATE ------------------------- */\n @State() dropdownVisible: boolean = false;\n @State() searchValue: string = undefined;\n\n @Watch('searchValue')\n searchValueChanged(newValue: string) {\n if (newValue === '') {\n // Create a new array reference to trigger re-render\n this.innerResults = [...this.recents];\n this.results = [];\n }\n }\n\n @State() resType: string = 'recents';\n @State() innerResults: Array<object> = [];\n @State() totalResults: number = 0;\n @State() isExpanded: boolean = false; \n\n /* ---------------------- @PROPERTIES ------------------------- */\n @Prop() placeholder: string = 'Cerca...'; //Il testo del placeholder dell\\'input della searchbar\n @Prop() noResultText: string = 'Nessun risultato corrispondente'; // Il testo da mostrare in caso nessun risultato sia stato recuperato.\n @Prop() loadingText: string = 'Sto caricando...'; // Il testo mostrato durante il caricamento dei risultati.\n @Prop() resultsText: string = 'risultati'; // Il testo mostrato accanto al numero di risultati totali.\n @Prop() showAllResText: string = 'Mostra tutti i risultati'; // La label da mostrare per il pulsante che mostra tutti i risultati.\n @Prop() identifier: string = 'search-bar'; // Identificatore della searchbar\n @Prop() debounceTime: number = 500; // 'Il tempo di attesa per l\\'invio della ricerca in caso di ricerca automatica. In millisecondi.\n @Prop() variant: string = 'outline'; // Scelta dello stile della barra di ricerca tra filled, linear e outline.\n @Prop() withBtn: boolean = false; // Se true, aggiunge un pulsante alla barra di ricerca\n @Prop() recentsTitle: string = 'Recenti'; // Serve per il titolo del dropwdown quando si vedono le ricerche recenti\n @Prop() recents: Array<object> = []; // Serve per il dropdown quando si vedono le ricerche recenti\n @Prop() results: Array<object> = []; // Serve per il dropdown quando si vedono i risultati della ricerca\n @Prop() dropdown: boolean = false; // Se true, mostra il dropdown con i risultati della ricerca.\n @Prop() linearIconOnly: boolean = false; // Se true, mostra solo l'icona nella barra di ricerca lineare\n @Prop() dropdownPosition: string = 'relative'; // Posizione del dropdown rispetto alla searchbar. \"relative\" o \"absolute\"\n\n\n /* ---------------------- @EVENTS ------------------------- */\n\n /**\n * Evento emesso quando l'utente clicca sull'icona in variant linear e linearIconOnly\n */\n @Event({ eventName: 'jump-search-bar-expanded' }) searchbarExpanded: EventEmitter;\n\n /**\n * Evento emesso quando l'utente effettua una ricerca \n * Emette un oggetto contenenente il valore della ricerca alla chiave 'search'\n * */\n @Event({ eventName: 'jump-search-bar' }) search: EventEmitter;\n @Event({ eventName: 'jump-filterchange' }) searchFilters: EventEmitter; // E' analoga a quella sopra ma serve per i filtri\n\n /** \n * Evento emesso quando l'utente clicca sul pulsante (se presente) o nel pulsante del dropdown per vedere tutti i risultati \n * Emette un oggetto contenenente il valore della ricerca alla chiave 'search'\n */\n @Event({ eventName: 'jump-search-bar-show-all' }) showFullSearch: EventEmitter;\n\n /* \n * Evento da ascoltare per recuperare il dato cliccato\n * Emette un oggetto contenente tutti i dati relativi al risultato cliccato.\n */\n @Event({ eventName: 'jump-search-bar-res-clicked'}) resultClicked: EventEmitter; \n\n /* ---------------------- @LIFECYCLE ------------------------- */\n componentDidLoad() {\n // Aggiungi l'event listener per il clic al di fuori del componente\n document.addEventListener('click', this.handleOutsideClick.bind(this));\n }\n\n disconnectedCallback() {\n // Rimuovi l'event listener per evitare perdite di memoria\n document.removeEventListener('click', this.handleOutsideClick.bind(this));\n }\n\n /* -------------------- @LISTEN ------------------------------- */\n @Listen(\"jump-search-bar-dropdown-item-connected\")\n addOption(e) {\n let props = e.detail; // es {code: 'sku1', imageUrl: 'https://google.com/'}\n\n // Aggiungi l'elemento solo a `recents`\n this.recents = [...this.recents, { ...props }];\n\n // Aggiorna `innerResults` basandoti solo su `recents`\n this.innerResults = [...this.recents];\n }\n\n\n /* -------------------- @METHOD ------------------------------- */\n\n /** Imposta i risultati della ricerca all'interno della dropdown */\n @Method()\n async setResults(results, tot?: number) {\n this.results = results;\n this.innerResults = results;\n this.totalResults = tot;\n }\n\n /* -------------------- LOCAL METHODS ------------------------- */\n handleOutsideClick(event: MouseEvent) {\n // Controlla se il clic è fuori dal componente\n if (this.componentRef && !this.componentRef.contains(event.target as Node)) {\n this.dropdownVisible = false;\n }\n }\n\n // Gestisce l'evento focus sull'input\n handleFocus = () => {\n const searchBarContainer = this.jumpSearchBar.closest('.SearchBar');\n if (searchBarContainer) {\n searchBarContainer.classList.add('focused');\n }\n };\n\n // Gestisce l'evento blur sull'input\n handleBlur = () => {\n const searchBarContainer = this.jumpSearchBar.closest('.SearchBar');\n if (searchBarContainer) {\n searchBarContainer.classList.remove('focused');\n }\n };\n\n doSearch = () => {\n if (this.jumpSearchBar) {\n this.searchValue = this.jumpSearchBar.value;\n \n // Iniziare la ricerca solamente se ci sono almeno tre caratteri \n if (this.searchValue.length >= 3) {\n this.resType = 'results';\n\n this.innerResults = undefined;\n \n this.search.emit({ search: this.searchValue });\n this.searchFilters.emit({ search: this.searchValue });\n \n // Se il dropdown è chiuso, aprilo. Potrebbe essere chiuso perchè non ci sono recenti\n if (!this.dropdownVisible) {\n this.dropdownVisible = true;\n }\n } else if(this.searchValue.length == 0) {\n this.dropdownVisible = false;\n }\n }\n };\n\n debounce(fn, delay = this.debounceTime) {\n let timeoutId;\n\n return (...args) => {\n if (timeoutId) {\n clearTimeout(timeoutId);\n }\n timeoutId = setTimeout(() => {\n fn.apply(null, args);\n }, delay);\n };\n };\n\n openDropdown() {\n this.resType = 'recents';\n this.dropdownVisible = true;\n }\n\n /** Emette l'evento di click su un risultato, mandandone tutti i dati */\n handleResClicked(item) {\n this.resultClicked.emit({ clicked: item });\n } \n\n /** Emette l'evento quando l'utente clicca sul pulsante (se presente) o nel pulsante del dropdown per vedere tutti i risultati */\n btnOrShowOtherClicked(){\n this.showFullSearch.emit({ search: this.searchValue });\n }\n\n /**\n * Se clicco l'icona espando la searchbar ed emetto un evento dedicato\n */\n expandSearchBar() {\n this.isExpanded = true;\n this.searchbarExpanded.emit();\n }\n\n\n /* --------------------- RENDER ------------------------------- */\n renderLinearIconOnly() {\n return (\n <Host class={\"JumpSearchBar \"} ref={(el) => (this.componentRef = el as HTMLElement)}>\n <div class={\"SearchBar iconOnly \" + this.variant + (this.isExpanded ? \" expanded\" : \"\")}>\n <div class=\"InputWrapper\" onClick={(this.isExpanded && this.dropdown && this.recents.length > 0) ? () => this.openDropdown() : null}>\n <jump-icon\n name=\"magnifying-glass\"\n category=\"light\"\n onClick={() => this.expandSearchBar()}\n ></jump-icon>\n {this.isExpanded &&\n // Mostra la barra di ricerca con l'animazione di slide\n <input\n placeholder={this.placeholder}\n type=\"search\"\n id={this.identifier}\n class=\"search-input\"\n ref={(el) => { this.jumpSearchBar = el as HTMLInputElement }}\n onInput={this.debounce(this.doSearch)}\n onFocus={this.handleFocus}\n onBlur={this.handleBlur}\n />\n }\n </div>\n </div>\n {(this.dropdown && this.dropdownVisible) && this.renderDropdown()} \n </Host>\n );\n }\n\n renderDefault() {\n return (\n <Host class={\"JumpSearchBar\"} ref={(el) => (this.componentRef = el as HTMLElement)}>\n <div class={\"SearchBar \" + this.variant + \" \" + (this.withBtn ? \"withBtn\" : \"\") + (this.isExpanded ? \" expanded\" : \"\")}>\n <div class=\"InputWrapper\" onClick={(this.dropdown && this.recents.length > 0) ? () => this.openDropdown() : null}>\n {!this.withBtn && <jump-icon name=\"magnifying-glass\" category=\"light\"></jump-icon>}\n <input\n placeholder={this.placeholder}\n type=\"search\"\n id={this.identifier}\n class=\"search-input\"\n ref={(el) => { this.jumpSearchBar = el as HTMLInputElement }}\n onInput={this.debounce(this.doSearch)}\n onFocus={this.handleFocus}\n onBlur={this.handleBlur}\n />\n </div>\n {this.withBtn && !this.linearIconOnly && (\n <jump-button\n variant=\"secondary\"\n size=\"medium\"\n name=\"scopri\"\n value=\"value\"\n aria-label=\"Scopri di più\"\n id=\"button\"\n onlyIcon\n onClick={() => this.btnOrShowOtherClicked()}\n >\n <jump-icon slot=\"suffix\" name=\"magnifying-glass\"></jump-icon>\n </jump-button>\n )}\n </div>\n {(this.dropdown && this.dropdownVisible) && this.renderDropdown()} \n </Host>\n );\n }\n\n renderDropdown(){\n console.log('POSITION', this.dropdownPosition);\n return <div class={\"Dropdown \" + (this.dropdownPosition == 'absolute' ? 'dropAbsolute' : 'dropRelative' ) }>\n {(this.resType == 'recents') &&\n <div class=\"Dropdown__Recents\">\n <span class=\"title\">{this.recentsTitle}</span>\n <div class=\"ResWrapper\">\n {this.innerResults.length > 0 && this.innerResults.map((item) => (\n <div onClick={() => this.handleResClicked(item)}>\n <jump-icon name=\"magnifying-glass\" category=\"light\"></jump-icon>\n {item['value']}\n </div>\n ))}\n </div>\n </div>\n }\n {this.resType == 'results' &&\n <div class=\"Dropdown__Results\">\n <div class=\"ResWrapper\">\n {this.innerResults === undefined ?\n <div class=\"helperText\"><svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 100 100\" preserveAspectRatio=\"xMidYMid\" width=\"252\" height=\"252\" ><g><g transform=\"rotate(0 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"-0.9s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g transform=\"rotate(36 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"-0.8s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g transform=\"rotate(72 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"-0.7s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g transform=\"rotate(108 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"-0.6s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g transform=\"rotate(144 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"-0.5s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g transform=\"rotate(180 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"-0.4s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g transform=\"rotate(216 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"-0.3s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g transform=\"rotate(252 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"-0.2s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g transform=\"rotate(288 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"-0.1s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g transform=\"rotate(324 50 50)\">\n <rect fill=\"#707070\" height=\"11\" width=\"4\" ry=\"1.87\" rx=\"1.87\" y=\"27.5\" x=\"48\">\n <animate repeatCount=\"indefinite\" begin=\"0s\" dur=\"1s\" keyTimes=\"0;1\" values=\"1;0\" attributeName=\"opacity\"></animate>\n </rect>\n </g><g></g></g></svg>{this.loadingText}</div>\n :\n (this.innerResults.length > 0 ?\n this.innerResults.map((item) => (\n <div onClick={() => this.handleResClicked(item)} key={item['id']}>\n {item['img'] && <img src={item['img']} alt=\"result\" />}\n {item['value']}\n </div>\n ))\n :\n <div class=\"helperText\">{this.noResultText}</div>\n )\n }\n {(this.innerResults && this.innerResults.length > 0) &&\n <div class=\"totalRes\">\n <jump-button variant=\"secondary\" size=\"small\" text onClick={() => this.btnOrShowOtherClicked()} target=\"_blank\"> {this.showAllResText} </jump-button>\n {this.totalResults && <div>{this.totalResults} {this.resultsText}</div>}\n </div>\n }\n </div>\n </div>\n }\n </div>\n }\n\n render() {\n if (this.variant === 'linear' && this.linearIconOnly) {\n return this.renderLinearIconOnly();\n } else {\n return this.renderDefault();\n }\n }\n}"],"mappings":"yDAAA,MAAMA,EAAmB,kyHACzB,MAAAC,EAAeD,E,MCMFE,EAAa,M,kSA+GxBC,KAAAC,YAAc,KACZ,MAAMC,EAAqBF,KAAKG,cAAcC,QAAQ,cACtD,GAAIF,EAAoB,CACtBA,EAAmBG,UAAUC,IAAI,U,GAKrCN,KAAAO,WAAa,KACX,MAAML,EAAqBF,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