UNPKG

@geogirafe/lib-geoportal

Version:

GeoGirafe is a flexible application to build online geoportals.

392 lines (391 loc) • 26.6 kB
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; import { html as uHtml } from 'uhtml'; // SPDX-License-Identifier: Apache-2.0 import GirafeHTMLElement from '../../base/GirafeHTMLElement.js'; import { UsedInTemplateOnly } from '../../decorators.js'; class SearchFilterComponent extends GirafeHTMLElement { templateUrl = null; styleUrls = null; template = () => { return uHtml `<style> .hidden{display:none!important}.gg-rotate90{transform:rotate(90deg)}.gg-rotate180{transform:rotate(180deg)}.gg-rotate270{transform:rotate(270deg)}img{filter:var(--svg-filter)}img.legend-image{filter:var(--svg-map-filter);background:var(--svg-legend-bkg)}div{scrollbar-width:thin}a,a:visited{color:var(--link-color)}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes spin-wait{0%{transform:rotate(0)}7%{transform:rotate(360deg)}to{transform:rotate(360deg)}}.gg-spin{animation-name:spin;animation-duration:2s;animation-timing-function:linear;animation-iteration-count:infinite}.gg-spin-wait{animation-name:spin-wait;animation-duration:10s;animation-timing-function:linear;animation-iteration-count:infinite}::-webkit-scrollbar{width:5px}::-webkit-scrollbar-thumb{background:#999}button,input,select,textarea{font:inherit}.gg-button,.gg-select,.gg-input,.gg-textarea{background-color:var(--bkg-color);color:var(--text-color);border:var(--app-standard-border);box-sizing:border-box;cursor:pointer;border-radius:3px;outline:0;margin:0;padding:0 0 0 .5rem;display:inline-block}.gg-label{background-color:var(--bkg-color);color:var(--text-color);border:none;align-items:center;margin:0;padding:0;display:flex}.gg-button,.gg-select,.gg-input,.gg-label{min-height:calc(var(--app-standard-height) / 1.5)}.gg-textarea{max-height:initial;resize:vertical;height:6rem;padding:.5rem;line-height:1.3rem}.gg-input{cursor:text}.gg-checkbox{accent-color:var(--text-color);cursor:pointer;width:1.2rem}.gg-range{accent-color:var(--text-color)}.gg-button{padding:0 .5rem}.gg-button.active{border:solid 1px var(--text-color-grad1);background-color:var(--bkg-color-grad2)}.gg-button:disabled{background-color:var(--bkg-color-grad1);color:var(--text-color-grad2);cursor:not-allowed;border:none}.gg-button:disabled img{filter:opacity(.6)}.gg-input:disabled,.gg-select:disabled,.gg-textarea:disabled{background-color:var(--bkg-color-grad1);color:var(--text-color-grad2);cursor:not-allowed}.gg-button>img{vertical-align:middle}.gg-icon-button{color:var(--text-color);cursor:pointer;background-color:#0000;border:none;flex-direction:column;justify-content:center;align-items:center;padding:0;display:flex}.gg-icon{justify-content:center;align-items:center;display:flex}.gg-big,.gg-big-withtext{min-width:var(--app-standard-height);min-height:var(--app-standard-height);max-height:var(--app-standard-height)}.gg-big img,.gg-big-withtext img{width:calc(var(--app-standard-height) - 1.5rem);margin:0}.gg-big-withtext span{font-variant:small-caps;padding:0 1rem;font-size:.9rem}.gg-medium,.gg-medium-withtext{min-width:calc(var(--app-standard-height) / 1.2);min-height:calc(var(--app-standard-height) / 1.2);max-height:calc(var(--app-standard-height) / 1.2);flex-direction:row}.gg-medium img{width:calc(var(--app-standard-height) / 2.4);margin:0}.gg-medium-withtext img{width:calc(var(--app-standard-height) / 2.4);margin-left:.5rem}.gg-medium-withtext span{padding:0 1rem 0 .5rem;font-size:.9rem}.gg-small,.gg-small-withtext{min-width:calc(var(--app-standard-height) / 2);min-height:calc(var(--app-standard-height) / 2);max-height:calc(var(--app-standard-height) / 2);flex-direction:row}.gg-small img{width:calc(var(--app-standard-height) / 3);margin:0}.gg-small-withtext img{width:calc(var(--app-standard-height) / 3);margin-left:.5rem}.gg-small-withtext span{padding:0 .5rem 0 .3rem;font-size:.9rem}.gg-button:hover:not(:disabled),.gg-select:hover:not(:disabled),.gg-input:hover:not(:disabled),.gg-textarea:hover:not(:disabled),.gg-icon-button:hover:not(:disabled){background-color:var(--bkg-color-grad1)}.gg-opacity{opacity:.5}.gg-opacity:hover{opacity:1;background-color:#0000}.gg-tabs{cursor:pointer;grid-auto-flow:column;padding-bottom:1rem;font-size:1rem;display:grid}.gg-tab{border:none;border-bottom:var(--app-standard-border);cursor:pointer;color:var(--text-color);background:0 0;padding:.5rem}.gg-tab.active{border-bottom:solid 1px var(--text-color)}.girafe-button-big,.girafe-button-large,.girafe-button-small,.girafe-button-tiny{color:var(--text-color);background-color:#0000;border:none;flex-direction:column;display:flex}.girafe-button-big:hover,.girafe-button-large:hover,.girafe-button-small:hover,.girafe-button-tiny:hover{background-color:var(--bkg-color-grad1);cursor:pointer}.girafe-button-big.dark,.girafe-button-large.dark,.girafe-button-small.dark,.girafe-button-tiny.dark{background-color:var(--bkg-color);filter:invert()}.girafe-button-big{width:var(--app-standard-height);height:var(--app-standard-height);align-items:center;padding:1rem}.girafe-button-big img{overflow:hidden}.girafe-button-large{flex-direction:row}.girafe-button-large img{height:2rem;margin:.3rem}.girafe-button-large span{height:2rem;margin:.3rem;line-height:2rem}.girafe-button-small{min-width:calc(var(--app-standard-height) / 2);height:calc(var(--app-standard-height) / 2);align-items:center;padding:.5rem}.girafe-button-small img{overflow:hidden}.girafe-button-small span{text-align:left;text-overflow:ellipsis;width:100%;overflow:hidden}.girafe-button-tiny{align-items:center;width:1rem;height:1rem;padding:0}.girafe-button-tiny img{overflow:hidden}.girafe-onboarding-theme{background-color:var(--bkg-color)!important;color:var(--text-color)!important}.girafe-onboarding-theme button{background-color:var(--bkg-color)!important;color:var(--text-color)!important;text-shadow:none!important}.girafe-onboarding-theme button.driver-popover-close-btn{z-index:10000}.tippy-box{background-color:var(--bkg-color)!important;border:var(--app-standard-border)!important}.tippy-content{color:var(--text-color)!important}.tippy-arrow{color:var(--bkg-color)!important}.tippy-box[data-theme~=error]{background-color:var(--error-color);white-space:pre-line}div.tippy-box[data-theme=image-popup]{border:var(--app-standard-border)!important;& div.tippy-content{background-color:var(--bkg-color)!important;& img{max-width:20rem;max-height:20rem}}& div.tippy-arrow{color:var(--bkg-color)!important}} </style><style> #search-filter-root{--active-color:#2563eb;--chip-text-color:#102e91;--chip-bg-color:#dbeafe;--chip-width:7rem;width:max-content;max-width:100%;color:var(--text-color);align-items:center;gap:.4rem;display:inline-flex;position:relative}#search-filter-button{background:var(--bkg-color);cursor:pointer;border:1px solid #0000;border-radius:4px;justify-content:center;align-items:center;min-width:2.25rem;height:2.25rem;display:inline-flex;position:relative}#search-filter-button.active{border-color:var(--active-color);background:var(--bkg-color);box-shadow:inset 0 0 0 2px #2563eb33}#search-filter-button.active .filter-icon{filter:invert(35%)sepia()saturate(400%)hue-rotate(190deg)}.filter-icon{width:20px;height:20px}.badge{background:var(--active-color);color:#fff;text-align:center;border-radius:5rem;min-width:1rem;height:1rem;padding:0 .15rem;font-size:.7rem;line-height:1rem;position:absolute;top:-.25rem;right:-.5rem}#search-filter-chips{align-items:center;gap:.35rem;min-width:0;display:flex}.chip{background:var(--chip-bg-color);color:var(--chip-text-color);border:1px solid var(--chip-text-color);max-width:var(--chip-width);cursor:pointer;border-radius:5rem;flex:none;align-items:center;height:1.1rem;padding:.1rem .5rem;font-size:.8rem;display:inline-flex}.chip-label{color:inherit;cursor:pointer;background:0 0;border:none;outline:none;width:100%;min-width:0;padding:0}.chip-remove{color:var(--chip-text-color);cursor:pointer;background:0 0;border:none;width:1rem;height:1rem;padding:0;font-size:1rem;line-height:1}#search-filter-menu{width:100%;min-width:28rem;max-width:min(36rem,50vw);color:var(--text-color);background:var(--bkg-color);border:var(--app-standard-border);z-index:1001;border-radius:4px;flex-direction:column;min-height:0;max-height:min(31rem,60vh);display:flex;position:absolute;top:3.15rem;left:0;overflow:hidden}.menu-header{background:var(--bkg-color);border-bottom:var(--app-standard-border);z-index:1002;padding:1rem 1rem .5rem;position:sticky;top:0}.category-title{padding-bottom:.75rem;font-size:1rem;font-weight:700}.menu-actions{gap:.35rem;display:flex}.menu-action{border:var(--app-standard-border);background:var(--bkg-color);cursor:pointer;border-radius:4px;padding:.15rem .5rem}.shortcut-title{align-self:center;margin:0 .5rem 0 auto;font-size:.85rem}.menu-list{scrollbar-width:thin;flex-direction:column;padding:.5rem;display:flex;overflow:auto}.category-row{cursor:pointer;border-radius:4px;align-items:center;gap:.4rem;padding:.25rem;display:flex}.category-row:hover{background-color:var(--bkg-color-grad1)}.category-label{min-width:0;margin-right:auto}.category-example{font-size:.8em}.shortcut{color:var(--text-color-grad1);font-family:monospace;font-size:.85rem}.shortcut-header{padding:.5rem;font-style:italic}.shortcut-row{background:var(--bkg-color);color:var(--text-color);cursor:pointer;text-align:left;border:0 solid #0000;border-radius:4px;align-items:center;padding:.5rem;display:flex}.shortcut-row:hover,.shortcut-row:focus,.shortcut-row.active{background-color:var(--bkg-color-grad1);outline:none}.shortcut-row>.shortcut{min-width:4rem}.text-ellipsis{text-overflow:ellipsis;white-space:nowrap;overflow:hidden} </style> <style>${this.customStyle}</style> <div id="search-filter-root" class="${this.enabled ? '' : 'hidden'}"><button id="search-filter-button" class="${this.isFilterActive() ? 'active' : ''}" type="button" title="Filter categories" aria-label="Filter categories" aria-expanded="${this.isMenuOpen()}" aria-haspopup="dialog" onclick="${(e) => this.onFilterButtonClick(e)}"><img class="filter-icon" alt="filter icon" src="icons/filter.svg"> <span class="${this.getSelectionCount() > 0 ? 'badge' : 'hidden'}">${this.getSelectionCount()}</span></button><div id="search-filter-chips" class="${this.getSelectedCategoryEntries().length > 0 ? '' : 'hidden'}">${this.getSelectedCategoryEntries(true).map((entry) => uHtml `<div class="chip"><button class="chip-label text-ellipsis" i18n="${entry.label}" onclick="${(e) => this.onChipClick(e)}">${entry.label}</button> <button class="chip-remove" type="button" title="Remove category" aria-label="Remove category" onclick="${(e) => this.onRemoveChip(entry, e)}">×</button></div>`)} ${this.getNumberOfOverflowChips() ? uHtml `<div class="chip"><button class="chip-label text-ellipsis" onclick="${(e) => this.onChipClick(e)}">${this.getNumberOfOverflowChipsAsLabel()}</button></div>` : ''}</div>${this.isMenuOpen() ? uHtml `<div id="search-filter-menu">${this.isCategoriesOpen() ? uHtml `<div class="menu-header"><div i18n="Filter categories" class="category-title">Search categories</div><div class="menu-actions"><button class="gg-button gg-medium menu-action" type="button" i18n="Select all" onclick="${(e) => this.onSelectAll(e)}">Select all</button> <button class="gg-button gg-medium menu-action" type="button" i18n="Reset" onclick="${(e) => this.onClearSelection(e)}">Reset</button><div class="${this.hasShortcutsConfigured() ? 'shortcut-title' : 'hidden'}"><span i18n="Shortcut">Shortcut</span></div></div></div><div class="menu-list">${this.getAllCategoriesFlattened().map((entry) => uHtml ` <label class="category-row"><input type="checkbox" value="${entry.key}" class="gg-checkbox" .checked="${this.isCategorySelected(entry)}" onchange="${(e) => this.onCategoryToggle(entry, e)}"> <span class="category-label text-ellipsis" title="${entry.example ? `${entry.label} (${entry.example})` : entry.label}"><span i18n="${entry.label}">${entry.label}</span> ${entry.example ? uHtml ` <span class="category-example">(<span i18n="${entry.example}">${entry.example}</span>)</span> ` : ''} </span><span class="shortcut">${this.getShortcutForCategory(entry)}</span></label> `)}</div>` : ''} ${this.isShortcutsOpen() ? uHtml `<div class="menu-header shortcut-header" i18n="Type or select a shortcut from the list to quickly filter search results.">Type or select a shortcut from the list to quickly filter search results.</div><div id="shortcut-list" class="menu-list">${this.getShortcutEntries().map((shEntry) => uHtml ` <button type="button" class="shortcut-row" data-shortcut="${shEntry.shortcut}" onkeydown="${(e) => this.onShortcutListDown(e)}" onclick="${() => this.onShortcutClick(shEntry.shortcut)}"><span class="shortcut">${this.currentPrefixSymbol}${shEntry.shortcut}</span> <span class="text-ellipsis">${shEntry.categoriesList}</span></button> `)} ` : ''}</div></div>` : ''}</div> ${this.htmlUnsafe(this.feedbackTemplateHtml ?? '')}`; }; enabled = false; currentPrefixSymbol = null; prefixSymbols = []; categories = {}; availableShortcuts = {}; selectedCategories = new Map(); filterExamples = {}; fsmState = 'Idle'; focusedShortcutIndex = -1; numberOfChipsToShow = 1; constructor() { super('search-filter'); } registerEvents() { // Event listeners to close menu when clicking outside document.addEventListener('click', this.outsideClickHandler); this.addEventListener('click', this.insideClickHandler); // Event listeners for when shortcuts are entered directly in the search bar instead of selected in the menu this.subscribe('search.filterShortcutPrefix', (_old, prefix) => this.onPrefixUsed(prefix)); this.subscribe('search.filterShortcut', (_old, shortcut) => this.applyShortcut(shortcut)); } async initSearchFilter() { const categories = await this.loadSearchCategories(); if (!categories || !Object.values(categories).length) { this.enabled = false; this.refreshRender(); return; } this.enabled = true; this.categories = categories; const searchConfig = this.context.configManager.Config.search; this.prefixSymbols = searchConfig?.filterShortcutPrefix ?? ['#']; this.currentPrefixSymbol = this.prefixSymbols[0]; this.availableShortcuts = searchConfig?.filterShortcuts ?? {}; this.filterExamples = searchConfig?.filterExamples ?? {}; this.sanitizeShortcuts(); this.refreshRender(); } async loadSearchCategories() { try { return (await this.context.searchManager.getSearchCategories()) ?? null; } catch (error) { console.error('Unable to load search categories:', error); } return null; } sanitizeShortcuts() { // Remove categories that are not known to the search clients const availableCategories = this.getAllCategoriesFlattened(); this.availableShortcuts = Object.fromEntries(Object.entries(this.availableShortcuts) .map(([shortcut, categories]) => [ shortcut, categories.filter((category) => availableCategories.find((cat) => cat.category === category)) ]) .filter(([_shortcut, categories]) => categories.length > 0)); } getSelectedCategoryEntries(shortened = false) { if (!this.isFilterActive()) { return []; } const selectedCategories = Array.from(this.selectedCategories.values()); const hiddenLabelsCount = this.getNumberOfOverflowChips(); if (!shortened || hiddenLabelsCount === 0) { return selectedCategories; } return selectedCategories.slice(0, this.numberOfChipsToShow); } getNumberOfOverflowChips() { return Math.max(this.getSelectionCount() - this.numberOfChipsToShow, 0); } getNumberOfOverflowChipsAsLabel() { return this.context.i18nManager .getTranslation('+{number} more') .replace('{number}', String(this.getNumberOfOverflowChips())); } isMenuOpen() { return this.fsmState !== 'Idle'; } isCategoriesOpen() { return this.fsmState === 'CategoriesOpen'; } isShortcutsOpen() { return this.fsmState === 'ShortcutsOpen'; } isCategorySelected(categoryEntry) { return this.selectedCategories.has(categoryEntry.key); } hasShortcutsConfigured() { return Object.keys(this.availableShortcuts).length > 0; } isFilterActive() { const totalCategories = this.getAllCategoriesFlattened().length; return totalCategories > 0 && this.selectedCategories.size > 0 && this.selectedCategories.size < totalCategories; } getSelectionCount() { return this.isFilterActive() ? this.selectedCategories.size : 0; } onFilterButtonClick(event) { event.preventDefault(); event.stopPropagation(); if (this.fsmState === 'CategoriesOpen') { this.closeMenu(); return; } this.transitionTo('CategoriesOpen'); this.refreshRender(); } onCategoryToggle(categoryEntry, e) { const input = e.target; if (!input) { return; } if (input.checked) { this.selectedCategories.set(categoryEntry.key, categoryEntry); } else { this.selectedCategories.delete(categoryEntry.key); } this.applyFiltersChange(); this.refreshRender(); } onSelectAll(event) { event.preventDefault(); this.selectedCategories = new Map(this.getAllCategoriesFlattened().map((categoryEntry) => [categoryEntry.key, categoryEntry])); this.applyFiltersChange(); this.refreshRender(); } onClearSelection(event) { event.preventDefault(); this.selectedCategories.clear(); this.applyFiltersChange(); this.refreshRender(); } onChipClick(event) { event.preventDefault(); event.stopPropagation(); if (this.fsmState === 'CategoriesOpen') { this.closeMenu(); } else { this.transitionTo('CategoriesOpen'); } this.refreshRender(); } onRemoveChip(categoryEntry, event) { event.preventDefault(); event.stopPropagation(); this.selectedCategories.delete(categoryEntry.key); this.applyFiltersChange(); this.refreshRender(); } closeMenu() { this.transitionTo('Idle'); this.removeParentKeyDownHandler(); this.focusedShortcutIndex = -1; this.refreshRender(); } transitionTo(state) { this.fsmState = state; // Update the state this.state.interface.searchFilterComponentVisible = this.fsmState !== 'Idle'; } getAllCategoriesFlattened() { return Object.entries(this.categories).flatMap(([provider, categoryList], _) => categoryList.map((category) => { return this.createCategoryEntry(provider, category); })); } createCategoryEntry(provider, category) { return { key: `${provider}-${category}`, provider, category: category, label: this.context.searchManager.getI18nKeyForCategory(provider, category), example: this.filterExamples[category] }; } categoryEntriesToSearchCategories() { return Array.from(this.selectedCategories.values()).reduce((categoriesPerProvider, entry) => { if (!categoriesPerProvider[entry.provider]) { categoriesPerProvider[entry.provider] = []; } categoriesPerProvider[entry.provider].push(entry.category); return categoriesPerProvider; }, {}); } applyFiltersChange() { this.state.search.filter = this.categoryEntriesToSearchCategories(); } getShortcutEntries() { return (Object.entries(this.availableShortcuts).map(([shortcut, categories]) => ({ shortcut, categoriesList: categories.map((category) => this.translateCategory(category)).join(', ') })) ?? []); } translateCategory(category) { const provider = Object.keys(this.categories).find((provider) => this.categories[provider].includes(category)); return this.context.i18nManager.getTranslation(provider ? this.context.searchManager.getI18nKeyForCategory(provider, category) : category); } getShortcutForCategory(categoryEntry) { const shortcut = Object.keys(this.availableShortcuts).find((shortcut) => this.availableShortcuts[shortcut].includes(categoryEntry.category)) ?? ''; if (shortcut) { return `${this.currentPrefixSymbol}${shortcut}`; } return ''; } onPrefixUsed(prefix) { if (!this.hasShortcutsConfigured()) { return; } if (prefix === null) { // Prefix was removed from the search input this.closeMenu(); } else { this.currentPrefixSymbol = prefix; this.transitionTo('ShortcutsOpen'); this.addParentKeyDownEventListener(); } this.refreshRender(); } parentKeyDownHandler = (event) => this.onParentKeyDown(event); /** * Triggered on a keydown event from the parent search input field. */ onParentKeyDown(e) { if (e.key === 'Escape') { this.closeMenu(); return; } if (!this.isShortcutsOpen()) { return; } if (e.key === 'ArrowDown' && this.focusedShortcutIndex === -1) { // Focus the first shortcut this.focusedShortcutIndex = 0; this.focusResultFromIndex(); this.removeParentKeyDownHandler(); } } onShortcutListDown(e) { this.navigateToResult(e); } navigateToResult(e) { const elem = e.target; if (!elem) { return; } switch (e.key) { case 'Escape': this.closeMenu(); break; case 'ArrowDown': if (this.focusedShortcutIndex < Object.keys(this.availableShortcuts).length - 1) { this.focusedShortcutIndex += 1; this.focusResultFromIndex(); } break; case 'ArrowUp': if (this.focusedShortcutIndex > 0) { this.focusedShortcutIndex -= 1; this.focusResultFromIndex(); } break; case 'Enter': this.applyShortcut(elem.dataset.shortcut ?? null); break; } } focusResultFromIndex() { const shortcutList = this.getById('shortcut-list'); if (!shortcutList) { return; } const shortcutBtn = [...shortcutList.children][this.focusedShortcutIndex]; if (shortcutBtn) { shortcutBtn.focus(); } } applyShortcut(shortcut) { if (!shortcut) { return; } const categoriesToActivate = this.availableShortcuts[shortcut] ?? []; categoriesToActivate.forEach((category) => { const entries = this.getAllCategoriesFlattened().filter((entry) => entry.category.includes(category)); entries.forEach((entry) => this.selectedCategories.set(entry.key, entry)); }); if (categoriesToActivate) { this.closeMenu(); this.applyFiltersChange(); } this.refreshRender(); } onShortcutClick(shortcut) { this.applyShortcut(shortcut); } outsideClickHandler = (event) => this.onOutsideClick(event); onOutsideClick(_event) { if (this.isMenuOpen()) { this.closeMenu(); } } insideClickHandler = (event) => this.onInsideClick(event); onInsideClick(event) { // Stop propagation to prevent closing menu when clicking inside the menu event.stopPropagation(); } removeClickHandlers() { document.removeEventListener('click', this.outsideClickHandler); this.removeEventListener('click', this.insideClickHandler); } addParentKeyDownEventListener() { document.addEventListener('keydown', this.parentKeyDownHandler); } removeParentKeyDownHandler() { document.removeEventListener('keydown', this.parentKeyDownHandler); } connectedCallback() { super.connectedCallback(); this.render(); this.girafeTranslate(); if (this.context.configManager.Config.search?.filterEnabled) { void this.initSearchFilter(); this.registerEvents(); } else { this.hide(); } } disconnectedCallback() { this.removeClickHandlers(); this.removeParentKeyDownHandler(); this.enabled = false; super.disconnectedCallback(); } } __decorate([ UsedInTemplateOnly() ], SearchFilterComponent.prototype, "getSelectedCategoryEntries", null); __decorate([ UsedInTemplateOnly() ], SearchFilterComponent.prototype, "getNumberOfOverflowChipsAsLabel", null); __decorate([ UsedInTemplateOnly() ], SearchFilterComponent.prototype, "isCategoriesOpen", null); __decorate([ UsedInTemplateOnly() ], SearchFilterComponent.prototype, "isCategorySelected", null); __decorate([ UsedInTemplateOnly() ], SearchFilterComponent.prototype, "onSelectAll", null); __decorate([ UsedInTemplateOnly() ], SearchFilterComponent.prototype, "onClearSelection", null); __decorate([ UsedInTemplateOnly() ], SearchFilterComponent.prototype, "onChipClick", null); __decorate([ UsedInTemplateOnly() ], SearchFilterComponent.prototype, "onRemoveChip", null); __decorate([ UsedInTemplateOnly() ], SearchFilterComponent.prototype, "getShortcutEntries", null); __decorate([ UsedInTemplateOnly() ], SearchFilterComponent.prototype, "getShortcutForCategory", null); export default SearchFilterComponent;