<commit_before>class KDListViewController extends KDViewController

  constructor:(options = {}, data)->

    options.wrapper               ?= yes
    options.scrollView            ?= yes
    options.keyNav                ?= no
    options.multipleSelection     ?= no
    options.selection             ?= yes
    options.startWithLazyLoader   ?= no
    options.itemChildClass        or= null
    options.itemChildOptions      or= {}
    # rename these options
    options.noItemFoundWidget     or= null
    options.noMoreItemFoundWidget or= null

    @itemsOrdered                 = [] unless @itemsOrdered
    # CtF: this must be fixed: duplicate itemsOrdered and KDListView.items
    # Object.defineProperty this, "itemsOrdered", get : => @getListView().items

    @itemsIndexed                 = {}
    @selectedItems                = []
    @lazyLoader                   = null

    if options.view
      @setListView listView = options.view
    else
      viewOptions                    = options.viewOptions or {}
      viewOptions.lastToFirst      or= options.lastToFirst
      viewOptions.itemClass        or= options.itemClass
      viewOptions.itemChildClass   or= options.itemChildClass
      viewOptions.itemChildOptions or= options.itemChildOptions

      @setListView listView = new KDListView viewOptions

    if options.scrollView
      @scrollView = new KDScrollView
        lazyLoadThreshold : options.lazyLoadThreshold
        ownScrollBars     : options.ownScrollBars

    options.view = if options.wrapper
    then new KDView cssClass : "listview-wrapper"
    else listView

    super options, data

    {noItemFoundWidget} = @getOptions()

    listView.on 'ItemWasAdded', (view, index)=>
      @registerItem view, index
      @hideNoItemWidget()  if noItemFoundWidget

    listView.on 'ItemIsBeingDestroyed', (itemInfo)=>
      @unregisterItem itemInfo<commit_msg>KDListViewController: Pass itemOptions to listView<commit_after>class KDListViewController extends KDViewController

  constructor:(options = {}, data)->

    options.wrapper               ?= yes
    options.scrollView            ?= yes
    options.keyNav                ?= no
    options.multipleSelection     ?= no
    options.selection             ?= yes
    options.startWithLazyLoader   ?= no
    options.itemChildClass        or= null
    options.itemChildOptions      or= {}
    # rename these options
    options.noItemFoundWidget     or= null
    options.noMoreItemFoundWidget or= null

    @itemsOrdered                 = [] unless @itemsOrdered
    # CtF: this must be fixed: duplicate itemsOrdered and KDListView.items
    # Object.defineProperty this, "itemsOrdered", get : => @getListView().items

    @itemsIndexed                 = {}
    @selectedItems                = []
    @lazyLoader                   = null

    if options.view
      @setListView listView = options.view
    else
      viewOptions                    = options.viewOptions or {}
      viewOptions.lastToFirst      or= options.lastToFirst
      viewOptions.itemClass        or= options.itemClass
      viewOptions.itemOptions      or= options.itemOptions
      viewOptions.itemChildClass   or= options.itemChildClass
      viewOptions.itemChildOptions or= options.itemChildOptions

      @setListView listView = new KDListView viewOptions

    if options.scrollView
      @scrollView = new KDScrollView
        lazyLoadThreshold : options.lazyLoadThreshold
        ownScrollBars     : options.ownScrollBars

    options.view = if options.wrapper
    then new KDView cssClass : "listview-wrapper"
    else listView

    super options, data

    {noItemFoundWidget} = @getOptions()

    listView.on 'ItemWasAdded', (view, index)=>
      @registerItem view, index
      @hideNoItemWidget()  if noItemFoundWidget

    listView.on 'ItemIsBeingDestroyed', (itemInfo)=>
      @unregisterItem itemInfo
{'fraction_non_alphanumeric': 0.07290589451913133, 'fraction_numerical': 0.0, 'mean_word_length': 2.3790393013100437, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, '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': '2755656', 'n_tokens_mistral': 1054, 'n_tokens_neox': 989, 'n_words': 242}