<commit_before>import {ChangeDetectorRef, Component, ElementRef, OnInit, ViewChild} from '@angular/core';

import {IconPickerService} from './icon-picker.service';
import {Icon, IconType} from './icon';

@Component({
  // tslint:disable-next-line: component-selector
  selector: 'icon-picker',
  templateUrl: './icon-picker.component.html',
  styleUrls: ['./icon-picker.component.scss']
})

export class IconPickerComponent implements OnInit {
  public ipPosition: string;
  public ipHeight: number;
  public ipMaxHeight: number;
  public ipWidth: number;
  public ipIconSize: number;
  public ipIconPadding: number;
  public ipKeepSearchFilter: boolean;
  public ipPlaceHolder: string;
  public ipFallbackIcon: string;
  public ipIconPack: string[];

  public show: boolean;
  public hidden: boolean;
  public top: number;
  public left: number;
  public position: string;
  public arrowTop: number;
  public selectedIcon: Icon;
  public iconType = IconType;
  public buttonWidth: number;

  private directiveInstance: any;
  private initialIcon: string;
  private directiveElementRef: ElementRef;

  private listenerMouseDown: any;
  private listenerResize: any;

  private dialogArrowSize = 10;

  @ViewChild('dialogPopup') dialogElement: any;

  icons: Icon[] = [];
  search = '';

  constructor(
    private el: ElementRef,
    private cdr: ChangeDetectorRef,
    private service: IconPickerService) {
  }

  setDialog(instance: any, elementRef: ElementRef, icon: string, ipPosition: string, ipHeight: string, ipMaxHeight: string,
            ipWidth: string, ipPlaceHolder: string, ipFallbackIcon: string, ipIconPack: string[], ipIconSize: string, ipIconPadding: string, ipKeepSearchFilter) {
    this.directiveInstance = instance;
    this.setInitialIcon(icon);
    this.directiveElementRef = elementRef;
    this.ipPosition = ipPosition;
    this.ipHeight = parseInt(ipHeight, 10);
    this.ipMaxHeight = parseInt(ipMaxHeight, 10);
    this.ipWidth = parseInt(ipWidth, 10);
    if (!this.ipWidth) {
      this.ipWidth = elementRef.nativeElement.offsetWidth;
    }
    this.ipIconSize = parseInt(ipIconSize, 10);
    this.ipIconPadding = parseInt(ipIconPadding, 10);
    this.ipKeepSearchFilter = JSON.parse(ipKeepSearchFilter);
    this.ipPlaceHolder = ipPlaceHolder;
    this.ipFallbackIcon = ipFallbackIcon;<commit_msg>The line length is limited to 140 on lint travis.<commit_after>import {ChangeDetectorRef, Component, ElementRef, OnInit, ViewChild} from '@angular/core';

import {IconPickerService} from './icon-picker.service';
import {Icon, IconType} from './icon';

@Component({
  // tslint:disable-next-line: component-selector
  selector: 'icon-picker',
  templateUrl: './icon-picker.component.html',
  styleUrls: ['./icon-picker.component.scss']
})

export class IconPickerComponent implements OnInit {
  public ipPosition: string;
  public ipHeight: number;
  public ipMaxHeight: number;
  public ipWidth: number;
  public ipIconSize: number;
  public ipIconPadding: number;
  public ipKeepSearchFilter: boolean;
  public ipPlaceHolder: string;
  public ipFallbackIcon: string;
  public ipIconPack: string[];

  public show: boolean;
  public hidden: boolean;
  public top: number;
  public left: number;
  public position: string;
  public arrowTop: number;
  public selectedIcon: Icon;
  public iconType = IconType;
  public buttonWidth: number;

  private directiveInstance: any;
  private initialIcon: string;
  private directiveElementRef: ElementRef;

  private listenerMouseDown: any;
  private listenerResize: any;

  private dialogArrowSize = 10;

  @ViewChild('dialogPopup') dialogElement: any;

  icons: Icon[] = [];
  search = '';

  constructor(
    private el: ElementRef,
    private cdr: ChangeDetectorRef,
    private service: IconPickerService) {
  }

  setDialog(instance: any, elementRef: ElementRef, icon: string, ipPosition: string, ipHeight: string, ipMaxHeight: string,
            ipWidth: string, ipPlaceHolder: string, ipFallbackIcon: string, ipIconPack: string[], ipIconSize: string,
            ipIconPadding: string, ipKeepSearchFilter) {
    this.directiveInstance = instance;
    this.setInitialIcon(icon);
    this.directiveElementRef = elementRef;
    this.ipPosition = ipPosition;
    this.ipHeight = parseInt(ipHeight, 10);
    this.ipMaxHeight = parseInt(ipMaxHeight, 10);
    this.ipWidth = parseInt(ipWidth, 10);
    if (!this.ipWidth) {
      this.ipWidth = elementRef.nativeElement.offsetWidth;
    }
    this.ipIconSize = parseInt(ipIconSize, 10);
    this.ipIconPadding = parseInt(ipIconPadding, 10);
    this.ipKeepSearchFilter = JSON.parse(ipKeepSearchFilter);
    this.ipPlaceHolder = ipPlaceHolder;
    this.ipFallbackIcon = ipFallbackIcon;
{'fraction_non_alphanumeric': 0.10305992350191245, 'fraction_numerical': 0.005737356566085848, 'mean_word_length': 4.570414201183432, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '7141286', 'n_tokens_mistral': 1413, 'n_tokens_neox': 1386, 'n_words': 366}