<commit_before>import { Component } from "../widgets/component";
import { PostConstruct } from "../context/context";
import { RowNode } from "../entities/rowNode";
import { Beans } from "./beans";
import { Column } from "../entities/column";
import { createIconNoSpan } from "../utils/icon";
import { isBrowserIE } from "../utils/browser";

export class DndSourceComp extends Component {

    private readonly beans: Beans;

    private readonly rowNode: RowNode;
    private readonly column: Column;
    private readonly cellValue: string;
    private readonly eCell: HTMLElement;

    constructor(rowNode: RowNode, column: Column, cellValue: string, beans: Beans, eCell: HTMLElement) {
        super(`<div class="ag-drag-handle ag-row-drag" draggable="true"></div>`);
        this.rowNode = rowNode;
        this.column = column;
        this.cellValue = cellValue;
        this.beans = beans;
        this.eCell = eCell;
    }

    @PostConstruct
    private postConstruct(): void {
        const eGui = this.getGui();
        eGui.appendChild(createIconNoSpan('rowDrag', this.beans.gridOptionsWrapper, null));
        this.addDragSource();
        this.checkVisibility();
    }

    private addDragSource(): void {
        this.addGuiEventListener('dragstart', this.onDragStart.bind(this));
    }

    private onDragStart(dragEvent: DragEvent): void {
<commit_msg>AG-4339 - fixed dndSourcComp starting the range selection<commit_after>import { Component } from "../widgets/component";
import { PostConstruct } from "../context/context";
import { RowNode } from "../entities/rowNode";
import { Beans } from "./beans";
import { Column } from "../entities/column";
import { createIconNoSpan } from "../utils/icon";
import { isBrowserIE } from "../utils/browser";

export class DndSourceComp extends Component {

    private readonly beans: Beans;

    private readonly rowNode: RowNode;
    private readonly column: Column;
    private readonly cellValue: string;
    private readonly eCell: HTMLElement;

    constructor(rowNode: RowNode, column: Column, cellValue: string, beans: Beans, eCell: HTMLElement) {
        super(`<div class="ag-drag-handle ag-row-drag" draggable="true"></div>`);
        this.rowNode = rowNode;
        this.column = column;
        this.cellValue = cellValue;
        this.beans = beans;
        this.eCell = eCell;
    }

    @PostConstruct
    private postConstruct(): void {
        const eGui = this.getGui();
        eGui.appendChild(createIconNoSpan('rowDrag', this.beans.gridOptionsWrapper, null));
        // we need to stop the event propagation here to avoid starting a range selection while dragging
        this.addGuiEventListener('mousedown', (e: MouseEvent) => {
            e.stopPropagation();
        });
        this.addDragSource();
        this.checkVisibility();
    }

    private addDragSource(): void {
        this.addGuiEventListener('dragstart', this.onDragStart.bind(this));
    }

    private onDragStart(dragEvent: DragEvent): void {

{'fraction_non_alphanumeric': 0.12412412412412413, 'fraction_numerical': 0.001334668001334668, 'mean_word_length': 3.222535211267606, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 8, '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': '4936485', 'n_tokens_mistral': 833, 'n_tokens_neox': 822, 'n_words': 222}