<commit_before>class NFinderItemRenameView extends JView

  constructor:(options, data)->

    super
    @setClass "rename-container"
    @input = new NFinderRenameInput
      defaultValue  : data.name
      type          : "text"
      callback      : (newValue)=> @emit "FinderRenameConfirmation", newValue
      keyup         : (event)=>
        @emit "FinderRenameConfirmation", (data.name) if event.which is 27

    KD.getSingleton("windowController").addLayer @input

    @cancel = new KDCustomHTMLView
      tagName       : 'a'
      attributes    :
        href        : '#'
        title       : 'Cancel'
      cssClass      : 'cancel'
      click         : => @emit "FinderRenameConfirmation", (data.name)

  pistachio:->

    """
    {{> @input}}
    {{> @cancel}}
    """

class NFinderRenameInput extends KDHitEnterInputView

  click    : -> no
  dblClick : -> no<commit_msg>select content of finder item rename view content<commit_after>class NFinderItemRenameView extends JView

  constructor:(options, data)->

    super
    @setClass "rename-container"
    @input = new NFinderRenameInput
      defaultValue  : data.name
      type          : "text"
      callback      : (newValue)=> @emit "FinderRenameConfirmation", newValue
      keyup         : (event)=>
        @emit "FinderRenameConfirmation", (data.name) if event.which is 27

    KD.getSingleton("windowController").addLayer @input

    @cancel = new KDCustomHTMLView
      tagName       : 'a'
      attributes    :
        href        : '#'
        title       : 'Cancel'
      cssClass      : 'cancel'
      click         : => @emit "FinderRenameConfirmation", (data.name)

  pistachio:->

    """
    {{> @input}}
    {{> @cancel}}
    """

class NFinderRenameInput extends KDHitEnterInputView
  constructor: (options = {}, data) ->
    super options, data
    @once "viewAppended", @bound "selectAll"

  click    : -> no
  dblClick : -> no
{'fraction_non_alphanumeric': 0.11510416666666666, 'fraction_numerical': 0.0020833333333333333, 'mean_word_length': 2.3006872852233675, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 22, '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': '3873057', 'n_tokens_mistral': 586, 'n_tokens_neox': 571, 'n_words': 132}