import { Component, ChangeDetectionStrategy } from '@angular/core';
import { DefaultEditorDirective } from '../../../lib/editor-cell-default';
import * as i0 from "@angular/core";
import * as i1 from "@angular/common";
import * as i2 from "@angular/forms";
import * as i3 from "../../../../popover/popover.component";
import * as i4 from "@ngx-translate/core";
export class InputEditorComponent extends DefaultEditorDirective {
    constructor() {
        super();
    }
}
InputEditorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: InputEditorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
InputEditorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: InputEditorComponent, selector: "input-editor", usesInheritance: true, ngImport: i0, template: `
        <div class="form-cell form-editor-input" [formGroup]="editingFormGroup">
            <input
                class="form-control slds-input"
                [placeholder]="!cell.column.isEditable ? '-' : cell.column.title | translate"

                [formControlName]="cell.column.id"
                [readonly]="!cell.column.isEditable"
                (input)="cell.newValue = $event.target.value;"

                [name]="cell.column.id"

                (click)="onClick.emit($event)"
                (keydown.enter)="onEdited.emit($event)"
                (keydown.esc)="onStopEditing.emit()"

                uno-popover-trigger
                [unoPopover]="formErrorsContent"
                [unoPopoverOpen]="openValidatorPopover"
                unoPopoverSize="small"
                unoPopoverTooltip="true"
                [unoPopoverTheme]="cell.column.editor?.inputPopoverTheme || 'info'">
        </div>

        <!-- This Controller's Input Validator errors: -->
        <ng-template #formErrorsContent>
            <ng-container *ngFor="let errors of errorsData">
                <ng-container *ngIf="errors.input === cell.column.id">
                    <div *ngFor="let strError of errors.translated">
                        {{ strError }}
                    </div>
                </ng-container>
            </ng-container>
        </ng-template>
    `, isInline: true, styles: [":host input,:host textarea{width:100%;line-height:normal;padding:.375em .75em}:host input.form-control.ng-invalid.ng-touched,:host textarea.form-control.ng-invalid.ng-touched{border:1px solid var(--special-red-2)}:host input.form-control.ng-valid.ng-touched:not(.no-validator),:host textarea.form-control.ng-valid.ng-touched:not(.no-validator){border:none}.line-clamp{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;word-break:normal;overflow:hidden}.view-default-expanded{text-align:justify;word-wrap:break-word}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i3.PopoverTriggerDirective, selector: "[uno-popover-trigger]", inputs: ["unoPopover", "unoPopoverHeader", "unoPopoverFooter", "unoPopoverTemplate", "unoPopoverTemplateData", "hasEdit", "hasDelete", "infoTitle", "infoCreatedBy", "infoModifiedBy", "infoDate", "unoPopoverPlacement", "unoPopoverTheme", "unoPopoverNubbin", "unoPopoverSize", "unoPopoverTooltip", "unoPopoverDelay", "unoPopoverInteractive", "unoPopoverOpen"], outputs: ["unoPopoverToggled", "unoPopoverTemplateEvent"], exportAs: ["unoPopoverTrigger"] }, { kind: "pipe", type: i4.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: InputEditorComponent, decorators: [{
            type: Component,
            args: [{ selector: 'input-editor', template: `
        <div class="form-cell form-editor-input" [formGroup]="editingFormGroup">
            <input
                class="form-control slds-input"
                [placeholder]="!cell.column.isEditable ? '-' : cell.column.title | translate"

                [formControlName]="cell.column.id"
                [readonly]="!cell.column.isEditable"
                (input)="cell.newValue = $event.target.value;"

                [name]="cell.column.id"

                (click)="onClick.emit($event)"
                (keydown.enter)="onEdited.emit($event)"
                (keydown.esc)="onStopEditing.emit()"

                uno-popover-trigger
                [unoPopover]="formErrorsContent"
                [unoPopoverOpen]="openValidatorPopover"
                unoPopoverSize="small"
                unoPopoverTooltip="true"
                [unoPopoverTheme]="cell.column.editor?.inputPopoverTheme || 'info'">
        </div>

        <!-- This Controller's Input Validator errors: -->
        <ng-template #formErrorsContent>
            <ng-container *ngFor="let errors of errorsData">
                <ng-container *ngIf="errors.input === cell.column.id">
                    <div *ngFor="let strError of errors.translated">
                        {{ strError }}
                    </div>
                </ng-container>
            </ng-container>
        </ng-template>
    `, changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host input,:host textarea{width:100%;line-height:normal;padding:.375em .75em}:host input.form-control.ng-invalid.ng-touched,:host textarea.form-control.ng-invalid.ng-touched{border:1px solid var(--special-red-2)}:host input.form-control.ng-valid.ng-touched:not(.no-validator),:host textarea.form-control.ng-valid.ng-touched:not(.no-validator){border:none}.line-clamp{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;word-break:normal;overflow:hidden}.view-default-expanded{text-align:justify;word-wrap:break-word}\n"] }]
        }], ctorParameters: function () { return []; } });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5wdXQtZWRpdG9yLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL3Vuby11aS1saWIvc3JjL2xpYi90YWJsZS9jb21wb25lbnRzL2NlbGwvY2VsbC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cImVkaXRpbmdGb3JtR3JvdXBcIj5cclxuICAgICAgICAgICAgPGlucHV0XHJcbiAgICAgICAgICAgICAgICBjbGFzcz1cImZvcm0tY29udHJvbCBzbGRzLWlucHV0XCJcclxuICAgICAgICAgICAgICAgIFtwbGFjZWhvbGRlcl09XCIhY2VsbC5jb2x1bW4uaXNFZGl0YWJsZSA/ICctJyA6IGNlbGwuY29sdW1uLnRpdGxlIHwgdHJhbnNsYXRlXCJcclxuXHJcbiAgICAgICAgICAgICAgICBbZm9ybUNvbnRyb2xOYW1lXT1cImNlbGwuY29sdW1uLmlkXCJcclxuICAgICAgICAgICAgICAgIFtyZWFkb25seV09XCIhY2VsbC5jb2x1bW4uaXNFZGl0YWJsZVwiXHJcbiAgICAgICAgICAgICAgICAoaW5wdXQpPVwiY2VsbC5uZXdWYWx1ZSA9ICRldmVudC50YXJnZXQudmFsdWU7XCJcclxuXHJcbiAgICAgICAgICAgICAgICBbbmFtZV09XCJjZWxsLmNvbHVtbi5pZFwiXHJcblxyXG4gICAgICAgICAgICAgICAgKGNsaWNrKT1cIm9uQ2xpY2suZW1pdCgkZXZlbnQpXCJcclxuICAgICAgICAgICAgICAgIChrZXlkb3duLmVudGVyKT1cIm9uRWRpdGVkLmVtaXQoJGV2ZW50KVwiXHJcbiAgICAgICAgICAgICAgICAoa2V5ZG93bi5lc2MpPVwib25TdG9wRWRpdGluZy5lbWl0KClcIlxyXG5cclxuICAgICAgICAgICAgICAgIHVuby1wb3BvdmVyLXRyaWdnZXJcclxuICAgICAgICAgICAgICAgIFt1bm9Qb3BvdmVyXT1cImZvcm1FcnJvcnNDb250ZW50XCJcclxuICAgICAgICAgICAgICAgIFt1bm9Qb3BvdmVyT3Blbl09XCJvcGVuVmFsaWRhdG9yUG9wb3ZlclwiXHJcbiAgICAgICAgICAgICAgICB1bm9Qb3BvdmVyU2l6ZT1cInNtYWxsXCJcclxuICAgICAgICAgICAgICAgIHVub1BvcG92ZXJUb29sdGlwPVwidHJ1ZVwiXHJcbiAgICAgICAgICAgICAgICBbdW5vUG9wb3ZlclRoZW1lXT1cImNlbGwuY29sdW1uLmVkaXRvcj8uaW5wdXRQb3BvdmVyVGhlbWUgfHwgJ2luZm8nXCI+XHJcbiAgICAgICAgPC9kaXY+XHJcblxyXG4gICAgICAgIDwhLS0gVGhpcyBDb250cm9sbGVyJ3MgSW5wdXQgVmFsaWRhdG9yIGVycm9yczogLS0+XHJcbiAgICAgICAgPG5nLXRlbXBsYXRlICNmb3JtRXJyb3JzQ29udGVudD5cclxuICAgICAgICAgICAgPG5nLWNvbnRhaW5lciAqbmdGb3I9XCJsZXQgZXJyb3JzIG9mIGVycm9yc0RhdGFcIj5cclxuICAgICAgICAgICAgICAgIDxuZy1jb250YWluZXIgKm5nSWY9XCJlcnJvcnMuaW5wdXQgPT09IGNlbGwuY29sdW1uLmlkXCI+XHJcbiAgICAgICAgICAgICAgICAgICAgPGRpdiAqbmdGb3I9XCJsZXQgc3RyRXJyb3Igb2YgZXJyb3JzLnRyYW5zbGF0ZWRcIj5cclxuICAgICAgICAgICAgICAgICAgICAgICAge3sgc3RyRXJyb3IgfX1cclxuICAgICAgICAgICAgICAgICAgICA8L2Rpdj5cclxuICAgICAgICAgICAgICAgIDwvbmctY29udGFpbmVyPlxyXG4gICAgICAgICAgICA8L25nLWNvbnRhaW5lcj5cclxuICAgICAgICA8L25nLXRlbXBsYXRlPlxyXG4gICAgYCxcclxuICAgIGNoYW5nZURldGVjdGlvbjogQ2hhbmdlRGV0ZWN0aW9uU3RyYXRlZ3kuT25QdXNoXHJcbn0pXHJcbmV4cG9ydCBjbGFzcyBJbnB1dEVkaXRvckNvbXBvbmVudCBleHRlbmRzIERlZmF1bHRFZGl0b3JEaXJlY3RpdmUge1xyXG4gICAgY29uc3RydWN0b3IoKSB7XHJcbiAgICAgICAgc3VwZXIoKTtcclxuICAgIH1cclxufVxyXG4iXX0=