<commit_before>import { Component, TemplateRef, ViewChild, Input, AfterViewInit, ChangeDetectorRef, QueryList, ViewChildren, OnInit } from '@angular/core';
import { IgxGridCellComponent } from '../grids/cell.component';
import { IgxDateSummaryOperand, IgxNumberSummaryOperand, IgxSummaryResult } from '../grids/summaries/grid-summary';
import { IGridCellEventArgs, IGridEditEventArgs } from '../grids/common/events';
import { IgxGridTransaction } from '../grids/grid-base.directive';
import { BasicGridComponent, BasicGridSearchComponent, GridAutoGenerateComponent,
        GridNxMComponent, GridWithSizeComponent, PagingComponent } from './grid-base-components.spec';
import { IGridSelection } from './grid-interfaces.spec';
import { SampleTestData, DataParent } from './sample-test-data.spec';
import { ColumnDefinitions, GridTemplateStrings, EventSubscriptions } from './template-strings.spec';
import { IgxColumnComponent } from '../grids/columns/column.component';
import { IgxTransactionService } from '../services/public_api';
import { IgxFilteringOperand, IgxNumberFilteringOperand } from '../data-operations/filtering-condition';
import { ExpressionUI } from '../grids/filtering/grid-filtering.service';
import { IFilteringExpressionsTree, FilteringExpressionsTree } from '../data-operations/filtering-expressions-tree';
import { FilteringStrategy } from '../data-operations/filtering-strategy';
import { IgxGridComponent } from '../grids/grid/public_api';
import { IgxRowEditTabStopDirective } from '../grids/grid.rowEdit.directive';
import { IgxGridExcelStyleFilteringComponent } from '../grids/filtering/excel-style/grid.excel-style-filtering.component';
import { FilteringLogic } from '../data-operations/filtering-expression.interface';
import { SortingDirection } from '../data-operations/sorting-expression.interface';
import { ISortingStrategy } from '../data-operations/sorting-strategy';
import { IgxActionStripComponent } from '../action-strip/action-strip.component';

@Component({
    template: `<div style="width: 800px; height: 600px;">
            ${GridTemplateStrings.declareGrid(` [autoGenerate]="autoGenerate"`, '', ColumnDefinitions.indexAndValue)}</div>`
})
export class GridInDivComponent extends GridAutoGenerateComponent {
    data = SampleTestData.oneItemNumberData();
    autoGenerate = false;
}

@Component({
    template: GridTemplateStrings.declareGrid(` width="500px"`, '', ColumnDefinitions.pinnedTwoOfFour)
})
export class PinningAndResizingComponent extends BasicGridComponent {
    data = SampleTestData.personIDNameRegionData();
}

@Component({
    template: GridTemplateStrings.declareGrid(` width="600px" height="600px" [autoGenerate]="false"`, '',
                ColumnDefinitions.pinnedThreeOfEight)
})
export class LargePinnedColGridComponent extends BasicGridComponent {
    data = SampleTestData.generateProductData(75);
}

@Component({
    template: GridTemplateStrings.declareGrid('',
                EventSubscriptions.onColumnResized,
                ColumnDefinitions.gridFeatures)
})
export class SortingAndResizingComponent extends BasicGridComponent {

    public count = 0;
    public column;
    public prevWidth;
    public newWidth;

    data = SampleTestData.productInfoData();

    columnResized(event) {
                this.count++;
                this.column = event.column;
                this.prevWidth = event.prevWidth;
                this.newWidth = event.newWidth;
    }
}

@Component({
    template: GridTemplateStrings.declareGrid(` [height]="'800px'"`, '',
                ColumnDefinitions.resizableColsComponent)
})
export class ResizableColumnsComponent extends BasicGridComponent {

    public columns = [
        { field: 'ID', resizable: true, maxWidth: 200, minWidth: 70 },
        { field: 'CompanyName', resizable: true },
        { field: 'ContactName', resizable: true },
        { field: 'ContactTitle', resizable: true},
        { field: 'Address', resizable: true },
        { field: 'City', resizable: true },
        { field: 'Region', resizable: true },
        { field: 'PostalCode', resizable: true },
        { field: 'Phone', resizable: true },
        { field: 'Fax', resizable: true }
    ];

    data = SampleTestData.contactInfoDataFull();
}

@Component({
    template: GridTemplateStrings.declareGrid(` [height]="'800px'"`, '',
                ColumnDefinitions.iterableComponent)
})
export class ColumnsFromIterableComponent extends BasicGridComponent {

    public columns = [ 'ID', 'Name'];
    data = SampleTestData.personIDNameData();
}

@Component({
    template: GridTemplateStrings.declareGrid('', '',
                ColumnDefinitions.columnTemplates)
})
export class TemplatedColumnsComponent extends BasicGridComponent {
    data = SampleTestData.personIDNameData();

    @ViewChild('newHeader', { read: TemplateRef, static: true })
    public newHeaderTemplate: TemplateRef<any>;

    @ViewChild('newCell', { read: TemplateRef, static: true })
    public newCellTemplate: TemplateRef<any>;
}

@Component({
    template: GridTemplateStrings.declareGrid('', '',
            `<igx-column field="ID" [hidden]="true"></igx-column>`)
})
export class ColumnHiddenFromMarkupComponent extends BasicGridComponent {
    data = SampleTestData.personIDNameData();
}

@Component({
    template: `
        <igx-grid #grid1 [data]="data" [columnPinning]='true' [width]="'900px'" [height]="'600px'">
            <igx-column *ngFor="let c of columns" [field]="c.field"
                [header]="c.field"
                [movable]="c.movable"
                [width]="c.width"
                [editable]="true"
                [pinned]="c.pinned"
                [dataType]="c.type">
            </igx-column>
        </igx-grid>
    `
})
export class GridAddColumnComponent extends BasicGridComponent implements OnInit {
    public columns: Array<any>;
    data = SampleTestData.contactInfoDataFull()
    public ngOnInit(): void {
        this.columns = [
            { field: 'ID', width: 150, movable: true, type: 'string', pinned: true },
            { field: 'CompanyName', width: 150, movable: true, type: 'string'},
            { field: 'ContactName', width: 150, movable: true, type: 'string' },
            { field: 'ContactTitle', width: 150, movable: true, type: 'string' },
            { field: 'Address', width: 150, movable: true, type: 'string' }];
    }
}

@Component({
    template: GridTemplateStrings.declareGrid('', '',
                ColumnDefinitions.idNameFormatter)
})
export class ColumnCellFormatterComponent extends BasicGridComponent {
    data = SampleTestData.personIDNameData();

    public multiplier(value: number): string {
        return `${value * value}`;
    }
}
<commit_msg>chore(*): fix linting error<commit_after>import { Component, TemplateRef, ViewChild, Input, AfterViewInit, ChangeDetectorRef, QueryList, ViewChildren, OnInit } from '@angular/core';
import { IgxGridCellComponent } from '../grids/cell.component';
import { IgxDateSummaryOperand, IgxNumberSummaryOperand, IgxSummaryResult } from '../grids/summaries/grid-summary';
import { IGridCellEventArgs, IGridEditEventArgs } from '../grids/common/events';
import { IgxGridTransaction } from '../grids/grid-base.directive';
import { BasicGridComponent, BasicGridSearchComponent, GridAutoGenerateComponent,
        GridNxMComponent, GridWithSizeComponent, PagingComponent } from './grid-base-components.spec';
import { IGridSelection } from './grid-interfaces.spec';
import { SampleTestData, DataParent } from './sample-test-data.spec';
import { ColumnDefinitions, GridTemplateStrings, EventSubscriptions } from './template-strings.spec';
import { IgxColumnComponent } from '../grids/columns/column.component';
import { IgxTransactionService } from '../services/public_api';
import { IgxFilteringOperand, IgxNumberFilteringOperand } from '../data-operations/filtering-condition';
import { ExpressionUI } from '../grids/filtering/grid-filtering.service';
import { IFilteringExpressionsTree, FilteringExpressionsTree } from '../data-operations/filtering-expressions-tree';
import { FilteringStrategy } from '../data-operations/filtering-strategy';
import { IgxGridComponent } from '../grids/grid/public_api';
import { IgxRowEditTabStopDirective } from '../grids/grid.rowEdit.directive';
import { IgxGridExcelStyleFilteringComponent } from '../grids/filtering/excel-style/grid.excel-style-filtering.component';
import { FilteringLogic } from '../data-operations/filtering-expression.interface';
import { SortingDirection } from '../data-operations/sorting-expression.interface';
import { ISortingStrategy } from '../data-operations/sorting-strategy';
import { IgxActionStripComponent } from '../action-strip/action-strip.component';

@Component({
    template: `<div style="width: 800px; height: 600px;">
            ${GridTemplateStrings.declareGrid(` [autoGenerate]="autoGenerate"`, '', ColumnDefinitions.indexAndValue)}</div>`
})
export class GridInDivComponent extends GridAutoGenerateComponent {
    data = SampleTestData.oneItemNumberData();
    autoGenerate = false;
}

@Component({
    template: GridTemplateStrings.declareGrid(` width="500px"`, '', ColumnDefinitions.pinnedTwoOfFour)
})
export class PinningAndResizingComponent extends BasicGridComponent {
    data = SampleTestData.personIDNameRegionData();
}

@Component({
    template: GridTemplateStrings.declareGrid(` width="600px" height="600px" [autoGenerate]="false"`, '',
                ColumnDefinitions.pinnedThreeOfEight)
})
export class LargePinnedColGridComponent extends BasicGridComponent {
    data = SampleTestData.generateProductData(75);
}

@Component({
    template: GridTemplateStrings.declareGrid('',
                EventSubscriptions.onColumnResized,
                ColumnDefinitions.gridFeatures)
})
export class SortingAndResizingComponent extends BasicGridComponent {

    public count = 0;
    public column;
    public prevWidth;
    public newWidth;

    data = SampleTestData.productInfoData();

    columnResized(event) {
                this.count++;
                this.column = event.column;
                this.prevWidth = event.prevWidth;
                this.newWidth = event.newWidth;
    }
}

@Component({
    template: GridTemplateStrings.declareGrid(` [height]="'800px'"`, '',
                ColumnDefinitions.resizableColsComponent)
})
export class ResizableColumnsComponent extends BasicGridComponent {

    public columns = [
        { field: 'ID', resizable: true, maxWidth: 200, minWidth: 70 },
        { field: 'CompanyName', resizable: true },
        { field: 'ContactName', resizable: true },
        { field: 'ContactTitle', resizable: true},
        { field: 'Address', resizable: true },
        { field: 'City', resizable: true },
        { field: 'Region', resizable: true },
        { field: 'PostalCode', resizable: true },
        { field: 'Phone', resizable: true },
        { field: 'Fax', resizable: true }
    ];

    data = SampleTestData.contactInfoDataFull();
}

@Component({
    template: GridTemplateStrings.declareGrid(` [height]="'800px'"`, '',
                ColumnDefinitions.iterableComponent)
})
export class ColumnsFromIterableComponent extends BasicGridComponent {

    public columns = [ 'ID', 'Name'];
    data = SampleTestData.personIDNameData();
}

@Component({
    template: GridTemplateStrings.declareGrid('', '',
                ColumnDefinitions.columnTemplates)
})
export class TemplatedColumnsComponent extends BasicGridComponent {
    data = SampleTestData.personIDNameData();

    @ViewChild('newHeader', { read: TemplateRef, static: true })
    public newHeaderTemplate: TemplateRef<any>;

    @ViewChild('newCell', { read: TemplateRef, static: true })
    public newCellTemplate: TemplateRef<any>;
}

@Component({
    template: GridTemplateStrings.declareGrid('', '',
            `<igx-column field="ID" [hidden]="true"></igx-column>`)
})
export class ColumnHiddenFromMarkupComponent extends BasicGridComponent {
    data = SampleTestData.personIDNameData();
}

@Component({
    template: `
        <igx-grid #grid1 [data]="data" [columnPinning]='true' [width]="'900px'" [height]="'600px'">
            <igx-column *ngFor="let c of columns" [field]="c.field"
                [header]="c.field"
                [movable]="c.movable"
                [width]="c.width"
                [editable]="true"
                [pinned]="c.pinned"
                [dataType]="c.type">
            </igx-column>
        </igx-grid>
    `
})
export class GridAddColumnComponent extends BasicGridComponent implements OnInit {
    public columns: Array<any>;
    data = SampleTestData.contactInfoDataFull();
    public ngOnInit(): void {
        this.columns = [
            { field: 'ID', width: 150, movable: true, type: 'string', pinned: true },
            { field: 'CompanyName', width: 150, movable: true, type: 'string'},
            { field: 'ContactName', width: 150, movable: true, type: 'string' },
            { field: 'ContactTitle', width: 150, movable: true, type: 'string' },
            { field: 'Address', width: 150, movable: true, type: 'string' }];
    }
}

@Component({
    template: GridTemplateStrings.declareGrid('', '',
                ColumnDefinitions.idNameFormatter)
})
export class ColumnCellFormatterComponent extends BasicGridComponent {
    data = SampleTestData.personIDNameData();

    public multiplier(value: number): string {
        return `${value * value}`;
    }
}

{'fraction_non_alphanumeric': 0.13157307549274824, 'fraction_numerical': 0.007586463369282261, 'mean_word_length': 3.8055754110078626, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 25, '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': '7320909', 'n_tokens_mistral': 3859, 'n_tokens_neox': 3630, 'n_words': 793}