geonetwork-ui 2.9.0-dev.2757b04b7 → 2.9.0-dev.bac81b433
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.
|
@@ -13,7 +13,7 @@ import * as i4 from '@ngx-translate/core';
|
|
|
13
13
|
import { TranslateLoader, TranslateCompiler, TranslateDefaultParser, TranslateParser, TranslateService, provideTranslateService, TranslateDirective, TranslatePipe, TranslateModule } from '@ngx-translate/core';
|
|
14
14
|
import { TranslateMessageFormatCompiler } from 'ngx-translate-messageformat-compiler';
|
|
15
15
|
import { TranslateHttpLoader } from '@ngx-translate/http-loader';
|
|
16
|
-
import { map as map$1, shareReplay as shareReplay$1, catchError, tap as tap$1, filter as filter$1, startWith as startWith$1, withLatestFrom, switchMap as switchMap$1, take, mergeMap, delay,
|
|
16
|
+
import { map as map$1, shareReplay as shareReplay$1, catchError, tap as tap$1, filter as filter$1, startWith as startWith$1, withLatestFrom, switchMap as switchMap$1, take, mergeMap, delay, debounceTime, distinctUntilChanged, finalize, throttleTime, first as first$1, pairwise as pairwise$1, share, defaultIfEmpty, toArray } from 'rxjs/operators';
|
|
17
17
|
import { of, map as map$2, lastValueFrom, fromEvent, startWith, shareReplay, filter, pairwise, switchMap, Subject, combineLatest, from, exhaustMap, throwError, forkJoin, takeLast, firstValueFrom, merge, BehaviorSubject, timer, ReplaySubject, Subscription, first, distinctUntilChanged as distinctUntilChanged$1, animationFrameScheduler, debounceTime as debounceTime$1, Observable, buffer, tap as tap$2, combineLatestWith, take as take$1, catchError as catchError$1, takeUntil, EMPTY, mergeMap as mergeMap$1, withLatestFrom as withLatestFrom$1 } from 'rxjs';
|
|
18
18
|
import { lt, valid, coerce, satisfies, ltr } from 'semver';
|
|
19
19
|
import chroma from 'chroma-js';
|
|
@@ -25511,7 +25511,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
|
|
|
25511
25511
|
}] } });
|
|
25512
25512
|
|
|
25513
25513
|
var name = "geonetwork-ui";
|
|
25514
|
-
var version = "2.9.0-dev.
|
|
25514
|
+
var version = "2.9.0-dev.bac81b433";
|
|
25515
25515
|
var engines = {
|
|
25516
25516
|
node: ">=20"
|
|
25517
25517
|
};
|
|
@@ -29192,9 +29192,8 @@ class AutocompleteComponent {
|
|
|
29192
29192
|
ngOnChanges(changes) {
|
|
29193
29193
|
const { value } = changes;
|
|
29194
29194
|
if (value) {
|
|
29195
|
-
const previousTextValue = this.displayWithFnInternal(value.previousValue);
|
|
29196
29195
|
const currentTextValue = this.displayWithFnInternal(value.currentValue);
|
|
29197
|
-
if (
|
|
29196
|
+
if (currentTextValue !== this.control.value) {
|
|
29198
29197
|
if (currentTextValue) {
|
|
29199
29198
|
this.searchActive = true;
|
|
29200
29199
|
this.isSearchActive.emit(true);
|
|
@@ -29208,13 +29207,15 @@ class AutocompleteComponent {
|
|
|
29208
29207
|
}
|
|
29209
29208
|
}
|
|
29210
29209
|
ngOnInit() {
|
|
29211
|
-
const newValue$ = merge(of(''), this.inputCleared.pipe(map$1(() => '')), this.control.valueChanges.pipe(filter$1((value) => typeof value === 'string'),
|
|
29210
|
+
const newValue$ = merge(of(''), this.inputCleared.pipe(map$1(() => '')), this.control.valueChanges.pipe(filter$1((value) => typeof value === 'string'), debounceTime(400), distinctUntilChanged()));
|
|
29212
29211
|
const externalValueChange$ = this.control.valueChanges.pipe(filter$1((value) => typeof value === 'object' && value.title), map$1((item) => item.title));
|
|
29213
29212
|
// this observable emits arrays of suggestions loaded using the given action
|
|
29214
29213
|
const suggestionsFromAction = merge(newValue$.pipe(filter$1((value) => value.length >= this.minCharacterCount)), externalValueChange$).pipe(tap$1(() => {
|
|
29215
29214
|
this.searching = true;
|
|
29216
29215
|
this.error = null;
|
|
29217
|
-
}), switchMap$1((value) => this.action(value)),
|
|
29216
|
+
}), switchMap$1((value) => this.action(value)), // this can trigger http requests
|
|
29217
|
+
shareReplay$1(1), // share the loaded suggestions to avoid multiple requests
|
|
29218
|
+
tap$1((suggestions) => {
|
|
29218
29219
|
// forcing the panel to open if there are suggestions
|
|
29219
29220
|
if (suggestions.length > 0 && !this.searchActive) {
|
|
29220
29221
|
this.triggerRef?.openPanel();
|
|
@@ -29275,6 +29276,7 @@ class AutocompleteComponent {
|
|
|
29275
29276
|
}
|
|
29276
29277
|
clear() {
|
|
29277
29278
|
this.inputRef.nativeElement.value = '';
|
|
29279
|
+
this.control.setValue('');
|
|
29278
29280
|
this.searchActive = false;
|
|
29279
29281
|
this.isSearchActive.emit(false);
|
|
29280
29282
|
this.inputCleared.emit();
|