@alfresco/aca-content 7.2.0-19028684620 → 7.2.0-19094846444
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.
|
@@ -18,11 +18,11 @@ import { Actions, createEffect, ofType, provideEffects } from '@ngrx/effects';
|
|
|
18
18
|
import { map, mergeMap, catchError, take, first, delay, switchMap, expand, concatMap, tap, debounceTime, filter, distinctUntilChanged, startWith, toArray, retryWhen, finalize, skipWhile } from 'rxjs/operators';
|
|
19
19
|
import * as i1$1 from '@angular/material/dialog';
|
|
20
20
|
import { MatDialog, MAT_DIALOG_DATA, MatDialogModule, MAT_DIALOG_DEFAULT_OPTIONS } from '@angular/material/dialog';
|
|
21
|
-
import { of, Subject, zip, from, timer, EMPTY, forkJoin, fromEvent, BehaviorSubject, Observable, filter as filter$1, withLatestFrom, map as map$1,
|
|
21
|
+
import { of, Subject, zip, from, timer, EMPTY, forkJoin, fromEvent, BehaviorSubject, Observable, combineLatest, filter as filter$1, withLatestFrom, map as map$1, catchError as catchError$1, throwError, take as take$1 } from 'rxjs';
|
|
22
22
|
import * as i9 from '@alfresco/js-api';
|
|
23
23
|
import { NodesApi, SitePaging, SizeDetails, SearchApi, QueriesApi, Pagination, PeopleApi, SharedlinksApi } from '@alfresco/js-api';
|
|
24
24
|
import * as i1$2 from '@angular/router';
|
|
25
|
-
import { ActivatedRoute, Router, NavigationEnd, PRIMARY_OUTLET,
|
|
25
|
+
import { ActivatedRoute, Router, NavigationEnd, PRIMARY_OUTLET, NavigationStart, NavigationSkipped, RouterModule, provideRouter } from '@angular/router';
|
|
26
26
|
import * as i1$3 from '@angular/common';
|
|
27
27
|
import { CommonModule, NgForOf, AsyncPipe, NgIf, TitleCasePipe } from '@angular/common';
|
|
28
28
|
import * as i6 from '@angular/material/divider';
|
|
@@ -6898,6 +6898,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImpor
|
|
|
6898
6898
|
*/
|
|
6899
6899
|
class SearchInputControlComponent {
|
|
6900
6900
|
destroyRef = inject(DestroyRef);
|
|
6901
|
+
route = inject(ActivatedRoute);
|
|
6902
|
+
router = inject(Router);
|
|
6901
6903
|
/** Type of the input field to render, e.g. "search" or "text" (default). */
|
|
6902
6904
|
inputType = 'text';
|
|
6903
6905
|
/**
|
|
@@ -6941,6 +6943,16 @@ class SearchInputControlComponent {
|
|
|
6941
6943
|
}
|
|
6942
6944
|
}
|
|
6943
6945
|
});
|
|
6946
|
+
combineLatest([
|
|
6947
|
+
this.route.queryParams,
|
|
6948
|
+
this.router.events.pipe(filter((e) => e instanceof NavigationStart), startWith(null))
|
|
6949
|
+
])
|
|
6950
|
+
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
6951
|
+
.subscribe(([params]) => {
|
|
6952
|
+
if (params['q'] && !this.searchFieldFormControl.value) {
|
|
6953
|
+
setTimeout(() => this.searchFieldFormControl.setValue('*'));
|
|
6954
|
+
}
|
|
6955
|
+
});
|
|
6944
6956
|
}
|
|
6945
6957
|
ngOnChanges(changes) {
|
|
6946
6958
|
if (changes['hasLibrariesConstraint'] && !changes['hasLibrariesConstraint'].firstChange) {
|
|
@@ -7879,6 +7891,9 @@ class SearchResultsComponent extends PageComponent {
|
|
|
7879
7891
|
.subscribe((navigationStartEvent) => {
|
|
7880
7892
|
const shouldExecuteQuery = this.shouldExecuteQuery(navigationStartEvent, this.encodedQuery);
|
|
7881
7893
|
this.queryBuilder.userQuery = extractUserQueryFromEncodedQuery(this.encodedQuery);
|
|
7894
|
+
if (!this.searchedWord && !this.queryBuilder.userQuery && this.encodedQuery) {
|
|
7895
|
+
this.queryBuilder.userQuery = formatSearchTerm('*', this.searchConfig['app:fields']);
|
|
7896
|
+
}
|
|
7882
7897
|
if (shouldExecuteQuery) {
|
|
7883
7898
|
this.queryBuilder.execute(false);
|
|
7884
7899
|
}
|
|
@@ -7886,11 +7901,17 @@ class SearchResultsComponent extends PageComponent {
|
|
|
7886
7901
|
}
|
|
7887
7902
|
}
|
|
7888
7903
|
onSearchError(error) {
|
|
7889
|
-
|
|
7890
|
-
|
|
7891
|
-
|
|
7892
|
-
|
|
7893
|
-
message = this.translationService.instant(
|
|
7904
|
+
let message;
|
|
7905
|
+
try {
|
|
7906
|
+
const { statusCode } = JSON.parse(error.message).error;
|
|
7907
|
+
const messageKey = `APP.BROWSE.SEARCH.ERRORS.${statusCode}`;
|
|
7908
|
+
message = this.translationService.instant(messageKey);
|
|
7909
|
+
if (message === messageKey) {
|
|
7910
|
+
message = this.translationService.instant(`APP.BROWSE.SEARCH.ERRORS.GENERIC`);
|
|
7911
|
+
}
|
|
7912
|
+
}
|
|
7913
|
+
catch {
|
|
7914
|
+
message = error.message;
|
|
7894
7915
|
}
|
|
7895
7916
|
this.notificationService.showError(message);
|
|
7896
7917
|
}
|