.
*/
-import { Component, OnInit, ViewChild, ViewEncapsulation } from '@angular/core';
+import { Component, OnInit, ViewEncapsulation } from '@angular/core';
import { MinimalNodeEntity, Pagination, ResultSetPaging } from '@alfresco/js-api';
import { ActivatedRoute, Params, Router } from '@angular/router';
-import { SearchFilterComponent, SearchForm, SearchQueryBuilderService } from '@alfresco/adf-content-services';
+import { SearchQueryBuilderService } from '@alfresco/adf-content-services';
import { PageComponent } from '../../page.component';
import { Store } from '@ngrx/store';
import {
@@ -52,17 +52,12 @@ import { takeUntil } from 'rxjs/operators';
styleUrls: ['./search-results.component.scss']
})
export class SearchResultsComponent extends PageComponent implements OnInit {
- @ViewChild('searchFilter', { static: true })
- searchFilter: SearchFilterComponent;
-
showFacetFilter$: Observable
;
infoDrawerPreview$: Observable;
searchedWord: string;
queryParamName = 'q';
data: ResultSetPaging;
- totalResults = 0;
- hasSelectedFilters = false;
sorting = ['name', 'asc'];
isLoading = false;
showHeader: ShowHeaderMode = ShowHeaderMode.Never;
@@ -205,24 +200,6 @@ export class SearchResultsComponent extends PageComponent implements OnInit {
onSearchResultLoaded(nodePaging: ResultSetPaging) {
this.data = nodePaging;
- this.totalResults = this.getNumberOfResults();
- this.hasSelectedFilters = this.isFiltered();
- }
-
- getNumberOfResults() {
- if (this.data && this.data.list && this.data.list.pagination) {
- return this.data.list.pagination.totalItems;
- }
- return 0;
- }
-
- isFiltered(): boolean {
- return this.searchFilter.selectedBuckets.length > 0 || this.hasCheckedCategories();
- }
-
- hasCheckedCategories() {
- const checkedCategory = this.queryBuilder.categories.find((category) => !!this.queryBuilder.queryFragments[category.id]);
- return !!checkedCategory;
}
onPaginationChanged(pagination: Pagination) {
@@ -254,18 +231,10 @@ export class SearchResultsComponent extends PageComponent implements OnInit {
}
}
- onFormChange(form: SearchForm) {
- this.queryBuilder.updateSelectedConfiguration(form.index);
- }
-
handleNodeClick(event: Event) {
this.onNodeDoubleClick((event as CustomEvent).detail?.node);
}
- hideSearchFilter() {
- return !this.totalResults && !this.hasSelectedFilters;
- }
-
onPreviewClosed() {
this.store.dispatch(new ShowInfoDrawerPreviewAction());
}
diff --git a/src/app/store/reducers/app.reducer.ts b/src/app/store/reducers/app.reducer.ts
index 029715dcc..503030512 100644
--- a/src/app/store/reducers/app.reducer.ts
+++ b/src/app/store/reducers/app.reducer.ts
@@ -28,7 +28,6 @@ import {
AppState,
AppActionTypes,
NodeActionTypes,
- SearchActionTypes,
SetUserProfileAction,
SetCurrentFolderAction,
SetCurrentUrlAction,
@@ -87,15 +86,6 @@ export function appReducer(state: AppState = INITIAL_APP_STATE, action: Action):
case AppActionTypes.SetRepositoryInfo:
newState = updateRepositoryStatus(state, action as SetRepositoryInfoAction);
break;
- case SearchActionTypes.ToggleFilter:
- newState = toggleSearchFilter(state);
- break;
- case SearchActionTypes.ShowFilter:
- newState = showSearchFilter(state);
- break;
- case SearchActionTypes.HideFilter:
- newState = hideSearchFilter(state);
- break;
case AppActionTypes.SetFileUploadingDialog:
newState = setUploadDialogVisibility(state, action as SetFileUploadingDialogAction);
break;
@@ -112,27 +102,6 @@ export function appReducer(state: AppState = INITIAL_APP_STATE, action: Action):
return newState;
}
-function toggleSearchFilter(state: AppState): AppState {
- return {
- ...state,
- showFacetFilter: !state.showFacetFilter
- };
-}
-
-function hideSearchFilter(state: AppState): AppState {
- return {
- ...state,
- showFacetFilter: false
- };
-}
-
-function showSearchFilter(state: AppState): AppState {
- return {
- ...state,
- showFacetFilter: true
- };
-}
-
function updateUser(state: AppState, action: SetUserProfileAction): AppState {
const newState = { ...state };
const user = action.payload.person;
diff --git a/src/assets/app.extensions.json b/src/assets/app.extensions.json
index e646cf71c..c81933ab0 100644
--- a/src/assets/app.extensions.json
+++ b/src/assets/app.extensions.json
@@ -302,18 +302,6 @@
}
],
"toolbar": [
- {
- "id": "app.toolbar.searchFilter",
- "order": 50,
- "title": "APP.BROWSE.SEARCH.TOGGLE_SEARCH_FILTER",
- "icon": "view_list",
- "actions": {
- "click": "TOGGLE_SEARCH_FILTER"
- },
- "rules": {
- "visible": "app.navigation.isSearchResults"
- }
- },
{
"id": "app.toolbar.share",
"type": "custom",
diff --git a/src/assets/i18n/ar.json b/src/assets/i18n/ar.json
index 8a2c85146..254e9c1cd 100644
--- a/src/assets/i18n/ar.json
+++ b/src/assets/i18n/ar.json
@@ -179,7 +179,6 @@
"UNKNOWN_LOCATION": "غير معروف",
"NO_RESULTS": "أرجع البحث 0 نتائج",
"NO_FILTER_RESULTS": "أعاد الفلتر 0 نتيجة",
- "TOGGLE_SEARCH_FILTER": "تبديل عامل تصفية البحث",
"ERRORS": {
"500": "حدث خطأ أثناء معالجة استعلام البحث [500]",
"GENERIC": "حدث خطأ أثناء معالجة استعلام البحث"
@@ -599,4 +598,4 @@
"BASELINE-LOCK-24PX": "ملف مؤمن"
}
}
-}
\ No newline at end of file
+}
diff --git a/src/assets/i18n/cs.json b/src/assets/i18n/cs.json
index 899e5fead..3d4bf9208 100644
--- a/src/assets/i18n/cs.json
+++ b/src/assets/i18n/cs.json
@@ -179,7 +179,6 @@
"UNKNOWN_LOCATION": "Neznámé",
"NO_RESULTS": "Parametrům hledání odpovídá 0 výsledků",
"NO_FILTER_RESULTS": "K vašemu filtru je 0 výsledků",
- "TOGGLE_SEARCH_FILTER": "Přepnout filtr hledání",
"ERRORS": {
"500": "Při pokusu o zpracování dotazu hledání došlo k chybě [500]",
"GENERIC": "Při pokusu o zpracování dotazu hledání došlo k chybě"
@@ -445,7 +444,7 @@
},
"INFO_PANEL": {
"TABS": {
-
+
},
"DETAILS": "Podrobnosti"
},
@@ -599,4 +598,4 @@
"BASELINE-LOCK-24PX": "uzamčený soubor"
}
}
-}
\ No newline at end of file
+}
diff --git a/src/assets/i18n/da.json b/src/assets/i18n/da.json
index 80850f29a..b069e2dbb 100644
--- a/src/assets/i18n/da.json
+++ b/src/assets/i18n/da.json
@@ -179,7 +179,6 @@
"UNKNOWN_LOCATION": "Ukendt",
"NO_RESULTS": "Der blev ikke fundet nogen søgeresultater",
"NO_FILTER_RESULTS": "Dit filter gav 0 resultater",
- "TOGGLE_SEARCH_FILTER": "Slå søgefilter til/fra",
"ERRORS": {
"500": "Der opstod en fejl under behandling af søgeforespørgslen [500]",
"GENERIC": "Der opstod en fejl under behandling af søgeforespørgslen"
@@ -599,4 +598,4 @@
"BASELINE-LOCK-24PX": "låst fil"
}
}
-}
\ No newline at end of file
+}
diff --git a/src/assets/i18n/de.json b/src/assets/i18n/de.json
index bcff105c1..0c4d4f332 100644
--- a/src/assets/i18n/de.json
+++ b/src/assets/i18n/de.json
@@ -179,7 +179,6 @@
"UNKNOWN_LOCATION": "Unbekannt",
"NO_RESULTS": "Es wurden 0 Suchergebnisse gefunden",
"NO_FILTER_RESULTS": "Der Filter hat 0 Treffer gefunden",
- "TOGGLE_SEARCH_FILTER": "Suchfilter umschalten",
"ERRORS": {
"500": "Bei der Bearbeitung der Suchanfrage ist ein Fehler aufgetreten [500]",
"GENERIC": "Bei der Bearbeitung der Suchanfrage ist ein Fehler aufgetreten"
@@ -599,4 +598,4 @@
"BASELINE-LOCK-24PX": "gesperrte Datei"
}
}
-}
\ No newline at end of file
+}
diff --git a/src/assets/i18n/en.json b/src/assets/i18n/en.json
index e0c1bf278..1fb4de6ba 100644
--- a/src/assets/i18n/en.json
+++ b/src/assets/i18n/en.json
@@ -181,7 +181,6 @@
"NO_RESULTS": "Your search returned 0 results",
"EMPTY_SEARCH": "Search term required",
"NO_FILTER_RESULTS": "Your filter returned 0 results",
- "TOGGLE_SEARCH_FILTER": "Toggle search filter",
"ERRORS": {
"500": "There was an error processing the search query [500]",
"GENERIC": "There was an error processing the search query"
diff --git a/src/assets/i18n/es.json b/src/assets/i18n/es.json
index 904e10ce6..674c21bad 100644
--- a/src/assets/i18n/es.json
+++ b/src/assets/i18n/es.json
@@ -179,7 +179,6 @@
"UNKNOWN_LOCATION": "Desconocido",
"NO_RESULTS": "Su búsqueda arrojó 0 resultados",
"NO_FILTER_RESULTS": "Su filtro ha devuelto 0 resultados",
- "TOGGLE_SEARCH_FILTER": "Alternar filtro de búsqueda",
"ERRORS": {
"500": "Error al procesar la consulta de búsqueda [500]",
"GENERIC": "Error al procesar la consulta de búsqueda"
@@ -599,4 +598,4 @@
"BASELINE-LOCK-24PX": "fichero bloqueado"
}
}
-}
\ No newline at end of file
+}
diff --git a/src/assets/i18n/fi.json b/src/assets/i18n/fi.json
index fa1fb0d53..ac821c50f 100644
--- a/src/assets/i18n/fi.json
+++ b/src/assets/i18n/fi.json
@@ -179,7 +179,6 @@
"UNKNOWN_LOCATION": "Tuntematon",
"NO_RESULTS": "Hakusi ei tuottanut yhtään tulosta",
"NO_FILTER_RESULTS": "Suodatin ei tuottanut yhtään tulosta",
- "TOGGLE_SEARCH_FILTER": "Näytä tai piilota hakusuodatin",
"ERRORS": {
"500": "Hakusanan käsittelyssä tapahtui virhe [500]",
"GENERIC": "Hakusanan käsittelyssä tapahtui virhe"
@@ -599,4 +598,4 @@
"BASELINE-LOCK-24PX": "tiedosto lukittu"
}
}
-}
\ No newline at end of file
+}
diff --git a/src/assets/i18n/fr.json b/src/assets/i18n/fr.json
index 315ad08c8..d2e66622e 100644
--- a/src/assets/i18n/fr.json
+++ b/src/assets/i18n/fr.json
@@ -179,7 +179,6 @@
"UNKNOWN_LOCATION": "Inconnu",
"NO_RESULTS": "Votre recherche a renvoyé 0 résultat",
"NO_FILTER_RESULTS": "Votre filtre a renvoyé 0 résultat",
- "TOGGLE_SEARCH_FILTER": "Activer/désactiver le filtre de recherche",
"ERRORS": {
"500": "Une erreur s'est produite lors du traitement de la requête [500]",
"GENERIC": "Une erreur s'est produite lors du traitement de la requête"
@@ -599,4 +598,4 @@
"BASELINE-LOCK-24PX": "fichier verrouillé"
}
}
-}
\ No newline at end of file
+}
diff --git a/src/assets/i18n/it.json b/src/assets/i18n/it.json
index 4d48d6ce7..54b6aeb77 100644
--- a/src/assets/i18n/it.json
+++ b/src/assets/i18n/it.json
@@ -179,7 +179,6 @@
"UNKNOWN_LOCATION": "Sconosciuto",
"NO_RESULTS": "La ricerca ha restituito 0 risultati",
"NO_FILTER_RESULTS": "Il filtro ha restituito 0 risultati",
- "TOGGLE_SEARCH_FILTER": "Attiva filtro di ricerca",
"ERRORS": {
"500": "Si è verificato un errore di elaborazione della query di ricerca [500]",
"GENERIC": "Si è verificato un errore di elaborazione della query di ricerca"
@@ -599,4 +598,4 @@
"BASELINE-LOCK-24PX": "File bloccato"
}
}
-}
\ No newline at end of file
+}
diff --git a/src/assets/i18n/ja.json b/src/assets/i18n/ja.json
index f42edb508..79c9d1849 100644
--- a/src/assets/i18n/ja.json
+++ b/src/assets/i18n/ja.json
@@ -179,7 +179,6 @@
"UNKNOWN_LOCATION": "不明",
"NO_RESULTS": "検索結果は 0 件です",
"NO_FILTER_RESULTS": "フィルタによる検索結果は 0 件です",
- "TOGGLE_SEARCH_FILTER": "検索フィルタを切り替えます",
"ERRORS": {
"500": "検索クエリの処理中にエラーが発生しました [500]",
"GENERIC": "検索クエリの処理中にエラーが発生しました"
@@ -599,4 +598,4 @@
"BASELINE-LOCK-24PX": "ロックされているファイル"
}
}
-}
\ No newline at end of file
+}
diff --git a/src/assets/i18n/nb.json b/src/assets/i18n/nb.json
index f1b14c7a1..84372db9d 100644
--- a/src/assets/i18n/nb.json
+++ b/src/assets/i18n/nb.json
@@ -179,7 +179,6 @@
"UNKNOWN_LOCATION": "Ukjent",
"NO_RESULTS": "Søket ditt ga 0 resultater",
"NO_FILTER_RESULTS": "Filter ditt ga 0 resultater",
- "TOGGLE_SEARCH_FILTER": "Aktiver/deaktiver søkefilter",
"ERRORS": {
"500": "Det oppstod en feil med behandling av søkespørringen [500]",
"GENERIC": "Det oppstod en feil med behandling av søkespørringen"
@@ -599,4 +598,4 @@
"BASELINE-LOCK-24PX": "låst fil"
}
}
-}
\ No newline at end of file
+}
diff --git a/src/assets/i18n/nl.json b/src/assets/i18n/nl.json
index ea18d7e47..47fd96e69 100644
--- a/src/assets/i18n/nl.json
+++ b/src/assets/i18n/nl.json
@@ -179,7 +179,6 @@
"UNKNOWN_LOCATION": "Onbekend",
"NO_RESULTS": "Uw zoekopdracht heeft 0 resultaten opgeleverd",
"NO_FILTER_RESULTS": "Uw filter heeft 0 resultaten opgeleverd",
- "TOGGLE_SEARCH_FILTER": "Zoekfilter in- of uitschakelen",
"ERRORS": {
"500": "Er is een fout opgetreden bij het verwerken van de zoekquery [500]",
"GENERIC": "Er is een fout opgetreden bij het verwerken van de zoekquery"
@@ -599,4 +598,4 @@
"BASELINE-LOCK-24PX": "Vergrendeld bestand"
}
}
-}
\ No newline at end of file
+}
diff --git a/src/assets/i18n/pl.json b/src/assets/i18n/pl.json
index ce050e48e..eb25a266a 100644
--- a/src/assets/i18n/pl.json
+++ b/src/assets/i18n/pl.json
@@ -179,7 +179,6 @@
"UNKNOWN_LOCATION": "Nieznane",
"NO_RESULTS": "Wyszukiwanie nie zwróciło żadnych wyników",
"NO_FILTER_RESULTS": "Filtr zwrócił 0 wyników",
- "TOGGLE_SEARCH_FILTER": "Przełącz filtr wyszukiwania",
"ERRORS": {
"500": "Podczas przetwarzania zapytania wyszukiwania wystąpił błąd [500]",
"GENERIC": "Podczas przetwarzania zapytania wyszukiwania wystąpił błąd"
@@ -599,4 +598,4 @@
"BASELINE-LOCK-24PX": "zablokowany plik"
}
}
-}
\ No newline at end of file
+}
diff --git a/src/assets/i18n/pt-BR.json b/src/assets/i18n/pt-BR.json
index 025be9d31..02a8165b4 100644
--- a/src/assets/i18n/pt-BR.json
+++ b/src/assets/i18n/pt-BR.json
@@ -179,7 +179,6 @@
"UNKNOWN_LOCATION": "Desconhecido",
"NO_RESULTS": "Sua pesquisa retornou 0 resultados",
"NO_FILTER_RESULTS": "Seu filtro retornou 0 resultados",
- "TOGGLE_SEARCH_FILTER": "Alternar filtro de pesquisa",
"ERRORS": {
"500": "Houve um erro ao processar a consulta da pesquisa [500]",
"GENERIC": "Houve um erro ao processar a consulta da pesquisa"
@@ -599,4 +598,4 @@
"BASELINE-LOCK-24PX": "arquivo bloqueado"
}
}
-}
\ No newline at end of file
+}
diff --git a/src/assets/i18n/ru.json b/src/assets/i18n/ru.json
index 598700b87..b50b0f0cd 100644
--- a/src/assets/i18n/ru.json
+++ b/src/assets/i18n/ru.json
@@ -179,7 +179,6 @@
"UNKNOWN_LOCATION": "Неизвестно",
"NO_RESULTS": "По вашему запросу ничего не найдено",
"NO_FILTER_RESULTS": "Ваш фильтр вернул 0 результатов",
- "TOGGLE_SEARCH_FILTER": "Переключить фильтр поиска",
"ERRORS": {
"500": "При обработке поискового запроса [500] возникла ошибка",
"GENERIC": "При обработке поискового запроса возникла ошибка"
@@ -599,4 +598,4 @@
"BASELINE-LOCK-24PX": "заблокированный файл"
}
}
-}
\ No newline at end of file
+}
diff --git a/src/assets/i18n/sv.json b/src/assets/i18n/sv.json
index 24348fea4..c29219e7c 100644
--- a/src/assets/i18n/sv.json
+++ b/src/assets/i18n/sv.json
@@ -179,7 +179,6 @@
"UNKNOWN_LOCATION": "Okänd",
"NO_RESULTS": "Din sökning gav inga resultat",
"NO_FILTER_RESULTS": "Ditt filter gav inga resultat",
- "TOGGLE_SEARCH_FILTER": "Växla sökfilter",
"ERRORS": {
"500": "Det uppstod ett fel när sökförfrågan behandlades [500]",
"GENERIC": "Det uppstod ett fel när sökförfrågan behandlades"
@@ -599,4 +598,4 @@
"BASELINE-LOCK-24PX": "låst fil"
}
}
-}
\ No newline at end of file
+}
diff --git a/src/assets/i18n/zh-CN.json b/src/assets/i18n/zh-CN.json
index 5746fdc2e..6a15b033a 100644
--- a/src/assets/i18n/zh-CN.json
+++ b/src/assets/i18n/zh-CN.json
@@ -179,7 +179,6 @@
"UNKNOWN_LOCATION": "未知",
"NO_RESULTS": "您的搜索返回了 0 个结果",
"NO_FILTER_RESULTS": "您的筛选返回了 0 个结果",
- "TOGGLE_SEARCH_FILTER": "切换搜索过滤器",
"ERRORS": {
"500": "处理搜索查询时发生错误 [500]",
"GENERIC": "处理搜索查询时发生错误"
@@ -599,4 +598,4 @@
"BASELINE-LOCK-24PX": "无法完成该操作。将此信息告知您的 IT 团队:将 {{data}} 反序列化为 {{contentType}} 过程中出错"
}
}
-}
\ No newline at end of file
+}