<commit_before>package priori.view.form;

import priori.app.PriApp;
import js.jquery.Event;
import js.JQuery;
import priori.event.PriEvent;

class PriFormTextArea extends PriFormElementBase {

    @:isVar public var value(get, set):String;
    @:isVar public var placeholder(default, set):String;

    @:isVar public var margin(default, set):Float = 0;

    public function new() {
        super();

        this.placeholder = "";
        this.clipping = false;
    }

    private function set_margin(value:Float):Float {
        this.margin = value;

        this._baseElement.css("padding", value);

        return value;
    }

    override public function getComponentCode():String {
        return "<textarea style=\"width:100%;height:100%;resize:none;\"></textarea>";
    }

    override private function onAddedToApp():Void {
        PriApp.g().getBody().on("textarea", "[id=" + this.fieldId + "]", this._onChange);
    }

    override private function onRemovedFromApp():Void {
        PriApp.g().getBody().off("textarea", "[id=" + this.fieldId + "]", this._onChange);
    }

    @:noCompletion private function _onChange(event:Event):Void {
        this.dispatchEvent(new PriEvent(PriEvent.CHANGE));
    }

    @:noCompletion private function set_value(value:String):String {
        this.value = value;
        this._baseElement.val(value);

        return value;
    }

    @:noCompletion private function get_value():String {
        var result:String = this.value;
<commit_msg>bugfix : wront text area alignment<commit_after>package priori.view.form;

import priori.app.PriApp;
import js.jquery.Event;
import js.JQuery;
import priori.event.PriEvent;

class PriFormTextArea extends PriFormElementBase {

    @:isVar public var value(get, set):String;
    @:isVar public var placeholder(default, set):String;

    @:isVar public var margin(default, set):Float = 0;

    public function new() {
        super();

        this.placeholder = "";
        this.clipping = false;
    }

    private function set_margin(value:Float):Float {
        this.margin = value;

        this._baseElement.css("padding", value);

        return value;
    }

    override public function getComponentCode():String {
        return "<textarea style=\"width:100%;height:100%;resize:none;box-sizing:border-box;\"></textarea>";
    }

    override private function onAddedToApp():Void {
        PriApp.g().getBody().on("textarea", "[id=" + this.fieldId + "]", this._onChange);
    }

    override private function onRemovedFromApp():Void {
        PriApp.g().getBody().off("textarea", "[id=" + this.fieldId + "]", this._onChange);
    }

    @:noCompletion private function _onChange(event:Event):Void {
        this.dispatchEvent(new PriEvent(PriEvent.CHANGE));
    }

    @:noCompletion private function set_value(value:String):String {
        this.value = value;
        this._baseElement.val(value);

        return value;
    }

    @:noCompletion private function get_value():String {
        var result:String = this.value;

{'fraction_non_alphanumeric': 0.1346344690704598, 'fraction_numerical': 0.004631161098246774, 'mean_word_length': 3.235294117647059, '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': '2119509', 'n_tokens_mistral': 915, 'n_tokens_neox': 874, 'n_words': 186}