geonetwork-ui 2.9.0-dev.b77366863 → 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, distinctUntilChanged, debounceTime, finalize, throttleTime, first as first$1, pairwise as pairwise$1, share, defaultIfEmpty, toArray } from 'rxjs/operators';
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.b77366863";
25514
+ var version = "2.9.0-dev.bac81b433";
25515
25515
  var engines = {
25516
25516
  node: ">=20"
25517
25517
  };
@@ -26105,7 +26105,12 @@ class ElasticsearchService {
26105
26105
  must_not: this.mustNotFilters(),
26106
26106
  },
26107
26107
  },
26108
- _source: ['resourceTitleObject', 'uuid', 'resourceType'],
26108
+ _source: [
26109
+ 'resourceTitleObject',
26110
+ 'uuid',
26111
+ 'resourceType',
26112
+ 'cl_presentationForm',
26113
+ ],
26109
26114
  from: 0,
26110
26115
  size: 20,
26111
26116
  };
@@ -29187,9 +29192,8 @@ class AutocompleteComponent {
29187
29192
  ngOnChanges(changes) {
29188
29193
  const { value } = changes;
29189
29194
  if (value) {
29190
- const previousTextValue = this.displayWithFnInternal(value.previousValue);
29191
29195
  const currentTextValue = this.displayWithFnInternal(value.currentValue);
29192
- if (previousTextValue !== currentTextValue) {
29196
+ if (currentTextValue !== this.control.value) {
29193
29197
  if (currentTextValue) {
29194
29198
  this.searchActive = true;
29195
29199
  this.isSearchActive.emit(true);
@@ -29203,13 +29207,15 @@ class AutocompleteComponent {
29203
29207
  }
29204
29208
  }
29205
29209
  ngOnInit() {
29206
- const newValue$ = merge(of(''), this.inputCleared.pipe(map$1(() => '')), this.control.valueChanges.pipe(filter$1((value) => typeof value === 'string'), distinctUntilChanged(), debounceTime(400)));
29210
+ const newValue$ = merge(of(''), this.inputCleared.pipe(map$1(() => '')), this.control.valueChanges.pipe(filter$1((value) => typeof value === 'string'), debounceTime(400), distinctUntilChanged()));
29207
29211
  const externalValueChange$ = this.control.valueChanges.pipe(filter$1((value) => typeof value === 'object' && value.title), map$1((item) => item.title));
29208
29212
  // this observable emits arrays of suggestions loaded using the given action
29209
29213
  const suggestionsFromAction = merge(newValue$.pipe(filter$1((value) => value.length >= this.minCharacterCount)), externalValueChange$).pipe(tap$1(() => {
29210
29214
  this.searching = true;
29211
29215
  this.error = null;
29212
- }), switchMap$1((value) => this.action(value)), tap$1((suggestions) => {
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) => {
29213
29219
  // forcing the panel to open if there are suggestions
29214
29220
  if (suggestions.length > 0 && !this.searchActive) {
29215
29221
  this.triggerRef?.openPanel();
@@ -29270,6 +29276,7 @@ class AutocompleteComponent {
29270
29276
  }
29271
29277
  clear() {
29272
29278
  this.inputRef.nativeElement.value = '';
29279
+ this.control.setValue('');
29273
29280
  this.searchActive = false;
29274
29281
  this.isSearchActive.emit(false);
29275
29282
  this.inputCleared.emit();