<commit_before>import {
  Component,
  Input,
  Output,
  EventEmitter,
  OnChanges,
  OnInit,
} from '@angular/core';
import { find } from 'lodash';

const _ = {
  find: find,
};

/**
 * A pagination component
 *
 * @example
 * <ts-pagination
 *              currentPage="1"
 *              maxPreferredRecords="100"
 *              menuLocation="below"
 *              totalRecords="1450"
 *              recordCountTooHighMessage="Please refine your filters."
 *              recordsPerPageChoices="[10, 20, 50]"
 *              showRecordsPerPageSelector="true"
 *              (pageSelect)="myMethod($event)"
 *              (recordsPerPageChange)="myMethod($event)"
 * ></ts-pagination>
 */
@Component({
  selector: 'ts-pagination',
  templateUrl: './pagination.component.html',
  styleUrls: ['./pagination.component.scss'],
})
export class TsPaginationComponent implements OnChanges, OnInit {
  /**
   * Define the default count of records per page
   */
  private DEFAULT_PER_PAGE: number = 10;

  /**
   * Default max records before message is shown
   */
  private DEFAULT_MAX_PREFERED_RECORDS: number = 100;

  /**
   * Define the default options for the records per page select menu
   */
  private DEFAULT_RECORDS_PER_PAGE_OPTIONS: number[] = [10, 20, 50];

  /**
   * Define the default message to show when too many records are returned
   */
  private DEFAULT_HIGH_RECORD_MESSAGE: string = 'That\'s a lot of results! ' +
    'Try refining your filters for better results.';

  /**
   * Define the icon for the 'first page' button
   */
  private firstPageIcon: string = 'first_page';

  /**
   * Define the icon for the 'previous page' button
   */
  private previousPageIcon: string = 'keyboard_arrow_left';

  /**
   * Define the icon for the 'next page' button
   */
  private nextPageIcon: string = 'keyboard_arrow_right';

  /**
   * Define the icon for the 'last page' button
   */
  private lastPageIcon: string = 'last_page';

  /**
   * Store the array of objects that represent pages of collections
   */
  private pagesArray: object[];

  /**
   * Store the label for the current page
   */
  private currentPageLabel: string;

  /**
   * Define the amount of records show per page
   */
  private recordsPerPage: number = this.DEFAULT_PER_PAGE;

  /**
   * Define the label for the records per page select
   */
  private recordsSelectLabel: string = 'Per page';

  /**<commit_msg>fix(Pagination): fix pagination private items<commit_after>import {
  Component,
  Input,
  Output,
  EventEmitter,
  OnChanges,
  OnInit,
} from '@angular/core';
import { find } from 'lodash';

const _ = {
  find: find,
};

/**
 * A pagination component
 *
 * @example
 * <ts-pagination
 *              currentPage="1"
 *              maxPreferredRecords="100"
 *              menuLocation="below"
 *              totalRecords="1450"
 *              recordCountTooHighMessage="Please refine your filters."
 *              recordsPerPageChoices="[10, 20, 50]"
 *              showRecordsPerPageSelector="true"
 *              (pageSelect)="myMethod($event)"
 *              (recordsPerPageChange)="myMethod($event)"
 * ></ts-pagination>
 */
@Component({
  selector: 'ts-pagination',
  templateUrl: './pagination.component.html',
  styleUrls: ['./pagination.component.scss'],
})
export class TsPaginationComponent implements OnChanges, OnInit {
  /**
   * Define the default count of records per page
   */
  private DEFAULT_PER_PAGE: number = 10;

  /**
   * Default max records before message is shown
   */
  private DEFAULT_MAX_PREFERED_RECORDS: number = 100;

  /**
   * Define the default options for the records per page select menu
   */
  private DEFAULT_RECORDS_PER_PAGE_OPTIONS: number[] = [10, 20, 50];

  /**
   * Define the default message to show when too many records are returned
   */
  private DEFAULT_HIGH_RECORD_MESSAGE: string = 'That\'s a lot of results! ' +
    'Try refining your filters for better results.';

  /**
   * Define the icon for the 'first page' button
   */
  public firstPageIcon: string = 'first_page';

  /**
   * Define the icon for the 'previous page' button
   */
  public previousPageIcon: string = 'keyboard_arrow_left';

  /**
   * Define the icon for the 'next page' button
   */
  public nextPageIcon: string = 'keyboard_arrow_right';

  /**
   * Define the icon for the 'last page' button
   */
  public lastPageIcon: string = 'last_page';

  /**
   * Store the array of objects that represent pages of collections
   */
  public pagesArray: object[];

  /**
   * Store the label for the current page
   */
  public currentPageLabel: string;

  /**
   * Define the amount of records show per page
   */
  private recordsPerPage: number = this.DEFAULT_PER_PAGE;

  /**
   * Define the label for the records per page select
   */
  private recordsSelectLabel: string = 'Per page';

  /**
{'fraction_non_alphanumeric': 0.1125103220478943, 'fraction_numerical': 0.01032204789430223, 'mean_word_length': 2.8729016786570742, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '5208788', 'n_tokens_mistral': 1468, 'n_tokens_neox': 1406, 'n_words': 430}