<commit_before>import { Iterable } from 'ix';
import { Observable } from 'rxjs';

import { ObservableOrValue, ObservableLike } from '../../../WebRx';
import { ItemListPanelViewModel, ItemListPanelContext } from './ItemListPanelViewModel';
import { DataSourceRequest, DataSourceResponse } from '../DataGrid/DataGridViewModel';
import { AsyncDataGridViewModel } from '../DataGrid/AsyncDataGridViewModel';
import { SearchViewModel, SearchRequest } from '../Search/SearchViewModel';
import { PagerViewModel } from '../Pager/PagerViewModel';

export class AsyncItemListPanelViewModel<T, TRequestContext = any> extends ItemListPanelViewModel<T, TRequestContext> {
  public static displayName = 'AsyncItemListPanelViewModel';

  /**
   * @param responseSelector delegate that produces a response from a request.
   * @param filterer filter predicate. executed for each item when the search context is available.
   * @param search search handler. if omitted a default search handler will be created. use null for no search handling.
   * @param pager pager. if omitted a default pager will be created. use null for no pager.
   * @param context request context included in projection requests. if included requests are bound to context events.
   */
  constructor(
    protected readonly responseSelector: (request: DataSourceRequest<ItemListPanelContext<TRequestContext>> | undefined) => ObservableOrValue<DataSourceResponse<T> | undefined>,
    filterer?: (item: T, search: SearchRequest) => boolean,
    search?: SearchViewModel | null,
    pager?: PagerViewModel | null,
    context?: ObservableLike<TRequestContext>,
    rateLimit = AsyncDataGridViewModel.DefaultRateLimit,
  ) {
    super(Iterable.empty<T>(), filterer, search, pager, context, undefined, rateLimit);
  }

  getResponse(request: DataSourceRequest<ItemListPanelContext<TRequestContext>> | undefined) {
    return this.responseSelector(request);
  }
}<commit_msg>removing unused (and non-sensical) filterer constructor paramter from async item list panel<commit_after>import { Iterable } from 'ix';
import { Observable } from 'rxjs';

import { ObservableOrValue, ObservableLike } from '../../../WebRx';
import { ItemListPanelViewModel, ItemListPanelContext } from './ItemListPanelViewModel';
import { DataSourceRequest, DataSourceResponse } from '../DataGrid/DataGridViewModel';
import { AsyncDataGridViewModel } from '../DataGrid/AsyncDataGridViewModel';
import { SearchViewModel, SearchRequest } from '../Search/SearchViewModel';
import { PagerViewModel } from '../Pager/PagerViewModel';

export class AsyncItemListPanelViewModel<T, TRequestContext = any> extends ItemListPanelViewModel<T, TRequestContext> {
  public static displayName = 'AsyncItemListPanelViewModel';

  /**
   * @param responseSelector delegate that produces a response from a request.
   * @param filterer filter predicate. executed for each item when the search context is available.
   * @param search search handler. if omitted a default search handler will be created. use null for no search handling.
   * @param pager pager. if omitted a default pager will be created. use null for no pager.
   * @param context request context included in projection requests. if included requests are bound to context events.
   */
  constructor(
    protected readonly responseSelector: (request: DataSourceRequest<ItemListPanelContext<TRequestContext>> | undefined) => ObservableOrValue<DataSourceResponse<T> | undefined>,
    search?: SearchViewModel | null,
    pager?: PagerViewModel | null,
    context?: ObservableLike<TRequestContext>,
    rateLimit = AsyncDataGridViewModel.DefaultRateLimit,
  ) {
    super(Iterable.empty<T>(), undefined, search, pager, context, undefined, rateLimit);
  }

  getResponse(request: DataSourceRequest<ItemListPanelContext<TRequestContext>> | undefined) {
    return this.responseSelector(request);
  }
}
{'fraction_non_alphanumeric': 0.09532420563161974, 'fraction_numerical': 0.0, 'mean_word_length': 5.22508038585209, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 26, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3315954', 'n_tokens_mistral': 994, 'n_tokens_neox': 958, 'n_words': 325}