<commit_before>import * as React from 'react';
import * as classNames from 'classnames';

import { PanelView } from './PanelView';
import { TreeItemsView } from '../Items/TreeItemsView';
import { ItemsPresenter } from '../Items/ItemsPresenter';
import { TreeItem, TreeItemSourceProps, TreeItemRenderProps } from '../Items/TreeItem';
import { ListItemsViewTemplate, ListItemsViewTemplateProps } from './ListItemsViewTemplate';
import { StackPanel } from '../Panel/StackPanel';
import { PanelFragment, PanelItemContext } from '../Panel/Panel';
import { ListItemsViewModel } from './ListItemsViewModel';

export interface TreeViewProps extends ListItemsViewTemplateProps, TreeItemSourceProps, TreeItemRenderProps {
  fill?: boolean;
}

export interface TreeViewComponentProps extends React.HTMLProps<TreeView>, TreeViewProps {
}

export class TreeView extends ListItemsViewTemplate<TreeViewComponentProps> {
  render() {
    const { className, rest } = this.restProps(x => {
      const { fill, listItems, itemsProps } = x;
      return { fill, listItems, itemsProps };
    });

    return (
      <TreeItemsView
        className={ className }
        viewModel={ this.getListItems() }
        headerTemplate={ this.renderHeader.bind(this) }
        { ...this.getItemsProps() }
        { ...React.Component.trimProps(rest) }
      />
    );
  }

  protected renderHeader(item: {}, index: number, indent: Array<PanelFragment>, expander: PanelFragment, headerContent: PanelFragment, view: TreeItem) {
    const fragment = TreeItem.defaultHeaderTemplate(item, index, indent, expander, headerContent, view);

    return this.renderListItem(
      fragment,
      item,
      PanelView.getSelectedProps,
    );
  }
}
<commit_msg>fixing issue with object spreading for trimmed props<commit_after>import * as React from 'react';
import * as classNames from 'classnames';

import { PanelView } from './PanelView';
import { TreeItemsView } from '../Items/TreeItemsView';
import { ItemsPresenter } from '../Items/ItemsPresenter';
import { TreeItem, TreeItemSourceProps, TreeItemRenderProps } from '../Items/TreeItem';
import { ListItemsViewTemplate, ListItemsViewTemplateProps } from './ListItemsViewTemplate';
import { StackPanel } from '../Panel/StackPanel';
import { PanelFragment, PanelItemContext } from '../Panel/Panel';
import { ListItemsViewModel } from './ListItemsViewModel';

export interface TreeViewProps extends ListItemsViewTemplateProps, TreeItemSourceProps, TreeItemRenderProps {
  fill?: boolean;
}

export interface TreeViewComponentProps extends React.HTMLProps<TreeView>, TreeViewProps {
}

export class TreeView extends ListItemsViewTemplate<TreeViewComponentProps> {
  render() {
    const { className, rest } = this.restProps(x => {
      const { fill, listItems, itemsProps } = x;
      return { fill, listItems, itemsProps };
    });

    const treeItemProps: any = React.Component.trimProps(rest);

    return (
      <TreeItemsView
        className={ className }
        viewModel={ this.getListItems() }
        headerTemplate={ this.renderHeader.bind(this) }
        { ...this.getItemsProps() }
        { ...treeItemProps }
      />
    );
  }

  protected renderHeader(item: {}, index: number, indent: Array<PanelFragment>, expander: PanelFragment, headerContent: PanelFragment, view: TreeItem) {
    const fragment = TreeItem.defaultHeaderTemplate(item, index, indent, expander, headerContent, view);

    return this.renderListItem(
      fragment,
      item,
      PanelView.getSelectedProps,
    );
  }
}

{'fraction_non_alphanumeric': 0.11473087818696884, 'fraction_numerical': 0.0, 'mean_word_length': 4.087896253602305, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 13, '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': '6878739', 'n_tokens_mistral': 947, 'n_tokens_neox': 933, 'n_words': 241}