@@ -72,8 +72,8 @@ export class MetadataBrowserFilterComponent implements OnInit {
7272 protected expandedPanels : { [ facetKey : string ] : boolean } = { } ;
7373
7474 protected facetData = signal < FacetFilterSetting > ( { } ) ;
75- protected activeKeyword = signal < string > ( '' ) ;
76- protected searchModel = signal ( { searchTerm : '' } ) ;
75+ protected activeQuery = signal < string > ( '' ) ;
76+ protected searchModel = signal ( { query : '' } ) ;
7777 protected searchForm = form ( this . searchModel ) ;
7878
7979 readonly paginated = this . #metadataSearch. paginated ;
@@ -88,7 +88,7 @@ export class MetadataBrowserFilterComponent implements OnInit {
8888 ) ;
8989
9090 protected filteredFacets = computed ( ( ) => {
91- const filter = this . searchModel ( ) . searchTerm . toLocaleLowerCase ( ) ;
91+ const filter = this . searchModel ( ) . query . toLocaleLowerCase ( ) ;
9292 return this . facetWithExpanded ( )
9393 . map ( ( f ) => {
9494 const selectedFacets = new Set ( this . facetData ( ) [ f . key ] ?? [ ] ) ;
@@ -142,7 +142,7 @@ export class MetadataBrowserFilterComponent implements OnInit {
142142 * On init, define the default values of the search variables
143143 */
144144 ngOnInit ( ) : void {
145- this . #loadSearchTermsFromRoute ( ) ;
145+ this . #loadQueryFromRoute ( ) ;
146146 }
147147
148148 /**
@@ -174,7 +174,7 @@ export class MetadataBrowserFilterComponent implements OnInit {
174174 * Syncs the data between this component and the search service and initiates a new search.
175175 */
176176 #performSearch( ) : void {
177- this . #updateMetadataServiceSearchTermsAndRoute ( ) ;
177+ this . #updateMetadataServiceQueryAndRoute ( ) ;
178178 }
179179
180180 /**
@@ -199,29 +199,29 @@ export class MetadataBrowserFilterComponent implements OnInit {
199199 /**
200200 * Pushes the local filters, search term and page setup to the search service.
201201 */
202- async #updateMetadataServiceSearchTermsAndRoute ( ) : Promise < void > {
202+ async #updateMetadataServiceQueryAndRoute ( ) : Promise < void > {
203203 await this . #router. navigate ( [ ] , {
204204 relativeTo : this . #route,
205205 queryParams : {
206206 s : this . #skip( ) !== DEFAULT_SKIP_VALUE ? this . #skip( ) : undefined ,
207- q : this . activeKeyword ( ) !== '' ? this . activeKeyword ( ) : undefined ,
207+ q : this . activeQuery ( ) !== '' ? this . activeQuery ( ) : undefined ,
208208 f :
209209 Object . keys ( this . facetData ( ) ) . length !== 0
210210 ? encodeURIComponent ( this . #facetDataToString( this . facetData ( ) ) )
211211 : undefined ,
212212 p : this . pageSize ( ) !== DEFAULT_PAGE_SIZE ? this . pageSize ( ) : undefined ,
213213 } ,
214214 } ) ;
215- this . #loadSearchTermsFromRoute ( ) ;
215+ this . #loadQueryFromRoute ( ) ;
216216 }
217217
218218 /**
219219 * This function takes the current URL, determines the query parameters and sets them accordingly in the metadata search service.
220220 */
221- #loadSearchTermsFromRoute ( ) : void {
221+ #loadQueryFromRoute ( ) : void {
222222 const { s, q, f, p } = this . #router. routerState . snapshot . root . queryParams ;
223223 const pageSize = parseInt ( p ) || DEFAULT_PAGE_SIZE ;
224- this . activeKeyword . set ( q || '' ) ;
224+ this . activeQuery . set ( q || '' ) ;
225225 if ( f ) {
226226 const paramVals = this . #facetDataFromString( decodeURIComponent ( f ) ) ;
227227 if ( paramVals ) {
@@ -233,7 +233,7 @@ export class MetadataBrowserFilterComponent implements OnInit {
233233 this . #className,
234234 pageSize ,
235235 skip ,
236- this . searchModel ( ) . searchTerm ,
236+ this . activeQuery ( ) ,
237237 this . facetData ( ) ,
238238 ) ;
239239 }
@@ -254,13 +254,13 @@ export class MetadataBrowserFilterComponent implements OnInit {
254254 */
255255 protected submit ( event : SubmitEvent | Event ) : void {
256256 event . preventDefault ( ) ;
257- const searchTerm = this . searchModel ( ) . searchTerm ;
258- if ( searchTerm !== this . activeKeyword ( ) ) {
259- this . activeKeyword . set ( searchTerm ) ;
257+ const query = this . searchModel ( ) . query ;
258+ if ( query !== this . activeQuery ( ) ) {
259+ this . activeQuery . set ( query ) ;
260260 this . #metadataSearch. resetSkip ( ) ;
261261 this . facets . set ( [ ] ) ;
262262 this . #currentFacet = undefined ;
263- this . searchModel . set ( { searchTerm : '' } ) ;
263+ this . searchModel . set ( { query : '' } ) ;
264264 this . #performSearch( ) ;
265265 }
266266 }
@@ -283,7 +283,7 @@ export class MetadataBrowserFilterComponent implements OnInit {
283283 * Resets the search query and triggers a reload of the results.
284284 */
285285 protected clearSearchQuery ( ) : void {
286- this . activeKeyword . set ( '' ) ;
286+ this . activeQuery . set ( '' ) ;
287287 this . #metadataSearch. resetSkip ( ) ;
288288 this . facets . set ( [ ] ) ;
289289 this . #currentFacet = undefined ;
@@ -336,7 +336,7 @@ export class MetadataBrowserFilterComponent implements OnInit {
336336 facetData = input . option . value . split ( '#' ) ;
337337 checked = ( facetData [ 2 ] ?? 'false' ) === 'true' ? true : false ;
338338 facetData = facetData . slice ( 0 , 2 ) ?? [ ] ;
339- this . searchModel . set ( { searchTerm : '' } ) ;
339+ this . searchModel . set ( { query : '' } ) ;
340340 } else {
341341 facetData = input . source . name ?. split ( '#' ) ?? [ ] ;
342342 checked = input . checked ;
0 commit comments