// Copyright (c) Laserfiche.
// Licensed under the MIT License. See LICENSE in the project root for license information.
import { Component, EventEmitter, Input, Output } from '@angular/core';
import * as i0 from "@angular/core";
import * as i1 from "@angular/common";
import * as i2 from "@angular/forms";
import * as i3 from "@angular/material/form-field";
import * as i4 from "@angular/material/select";
import * as i5 from "@angular/material/core";
export class DynamicFieldComponent {
    constructor() {
        this.options = [];
        this.valueChange = new EventEmitter();
        /**
         * Default compare implementation, can be overrided by @Input
         */
        this.compareWith = (first, second) => {
            return first === second;
        };
    }
    onValueChanged() {
        this.valueChange.emit();
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: DynamicFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: DynamicFieldComponent, selector: "lf-dynamic-field-component", inputs: { options: "options", formControl: "formControl", title: "title", fieldValidationErrorMsg: "fieldValidationErrorMsg", getBrokenValidationRule: "getBrokenValidationRule", compareWith: "compareWith" }, outputs: { valueChange: "valueChange" }, ngImport: i0, template: "<!--Copyright (c) Laserfiche.\r\nLicensed under the MIT License. See LICENSE in the project root for license information.-->\r\n\r\n<mat-form-field [title]=\"title\" appearance=\"outline\" class=\"lf-field\">\r\n  <mat-select panelClass=\"lf-dropdown-overlay\" [formControl]=\"formControl\" [title]=\"formControl.value\"\r\n    (selectionChange)=\"onValueChanged()\" [compareWith]=\"compareWith\" >\r\n    <mat-option>--</mat-option>\r\n    <mat-option *ngFor=\"let listOption of options\" [value]=\"listOption\">\r\n      {{listOption}}\r\n    </mat-option>\r\n  </mat-select>\r\n  <mat-error *ngIf=\"getBrokenValidationRule()\">{{fieldValidationErrorMsg | async}}</mat-error>\r\n</mat-form-field>\r\n", styles: ["", ".lf-field,.lf-textarea{width:100%;min-width:50px}.mat-mdc-input-element{caret-color:#000}.token-picker-field-box{width:100%;display:flex;font-size:14px}.field-box{flex-grow:1;flex-shrink:1;display:inline-block;width:100%}::ng-deep mat-form-field.lf-field>.mat-mdc-text-field-wrapper>.mat-mdc-form-field-flex>.mat-mdc-form-field-infix,::ng-deep mat-form-field.lf-textarea>.mat-mdc-text-field-wrapper>.mat-mdc-form-field-flex>.mat-mdc-form-field-infix{padding:0;border:none}::ng-deep mat-form-field.lf-field.lf-date-field>.mat-mdc-form-field-wrapper>.mat-mdc-form-field-flex>.mat-mdc-form-field-infix{line-height:0}::ng-deep .lf-field .mdc-text-field--outlined:not(.mdc-text-field--focused) .mdc-notched-outline__leading,::ng-deep .lf-field .mdc-text-field--outlined:not(.mdc-text-field--focused) .mdc-notched-outline__notch,::ng-deep .lf-field .mdc-text-field--outlined:not(.mdc-text-field--focused) .mdc-notched-outline__trailing,::ng-deep .lf-textarea .mdc-text-field--outlined:not(.mdc-text-field--focused) .mdc-notched-outline__leading,::ng-deep .lf-textarea .mdc-text-field--outlined:not(.mdc-text-field--focused) .mdc-notched-outline__notch,::ng-deep .lf-textarea .mdc-text-field--outlined:not(.mdc-text-field--focused) .mdc-notched-outline__trailing{border-color:#ccc}::ng-deep .mdc-text-field--outlined{--mdc-outlined-text-field-focus-outline-color: black;&:hover{--mdc-outlined-text-field-outline-width: 2px}}::ng-deep mat-form-field.lf-field>.mat-mdc-text-field-wrapper>.mat-mdc-form-field-flex>.mat-mdc-form-field-infix>.mat-mdc-select>.mat-mdc-select-trigger>.mat-mdc-select-arrow-wrapper>.mat-mdc-select-arrow{color:#0000008a}::ng-deep mat-form-field.lf-field>.mat-mdc-text-field-wrapper>.mat-mdc-form-field-flex>.mdc-notched-outline{height:28px;color:#ccc}::ng-deep mat-form-field.lf-textarea>.mat-mdc-form-field-wrapper>.mat-mdc-form-field-flex>.mdc-notched-outline{color:#ccc}::ng-deep mat-form-field.lf-field>.mat-mdc-form-field-wrapper>.mat-mdc-form-field-flex>.mat-form-field-outline-thick,::ng-deep mat-form-field.lf-textarea>.mat-mdc-text-field-wrapper>.mat-mdc-form-field-flex>.mat-form-field-outline-thick{color:#000}::ng-deep mat-form-field.lf-field.ng-invalid>.mat-mdc-text-field-wrapper>.mat-mdc-form-field-flex>.mat-form-field-outline-thick,::ng-deep mat-form-field.lf-textarea.ng-invalid>.mat-mdc-text-field-wrapper>.mat-mdc-form-field-flex>.mat-form-field-outline-thick{color:red}::ng-deep mat-form-field.lf-field.ng-invalid.ng-pristine>.mat-mdc-form-field-wrapper>.mat-mdc-form-field-flex>.mat-form-field-outline-thick,::ng-deep mat-form-field.lf-textarea.ng-invalid.ng-pristine>.mat-mdc-text-field-wrapper>.mat-mdc-form-field-flex>.mat-form-field-outline-thick{color:#000}::ng-deep mat-form-field.lf-field .mat-mdc-form-field-subscript-wrapper,::ng-deep mat-form-field.lf-textarea .mat-mdc-form-field-subscript-wrapper{display:flex;flex-direction:column}::ng-deep lf-field-template-container-component .lf-template-picker>.mat-mdc-form-field-subscript-wrapper{height:0px}::ng-deep mat-form-field.lf-field>.mat-mdc-text-field-wrapper,::ng-deep mat-form-field.lf-textarea>.mat-mdc-text-field-wrapper{padding-bottom:0;padding-left:10px;padding-right:10px}::ng-deep mat-form-field.lf-date-field>.mat-mdc-text-field-wrapper>.mat-mdc-form-field-flex>.mat-mdc-form-field-icon-suffix{top:-.2em;position:unset}.lf-field-token-picker{flex-grow:0;flex-shrink:0;margin-left:1px;vertical-align:top}.mat-mdc-form-field{font-size:inherit;font-weight:400;line-height:1.125;font-family:Roboto,Helvetica Neue,sans-serif;letter-spacing:normal}::ng-deep .mdc-floating-label.mat-mdc-floating-label{display:none}::ng-deep .lf-field>.mat-mdc-text-field-wrapper>.mat-mdc-form-field-flex{height:28px}::ng-deep .lf-field>.mat-mdc-text-field-wrapper>.mat-mdc-form-field-flex>.mat-mdc-form-field-infix{height:inherit;min-height:0px}::ng-deep mat-form-field.lf-field>.mat-mdc-text-field-wrapper>.mat-mdc-form-field-flex>.mat-mdc-form-field-infix>.mat-mdc-select,::ng-deep mat-form-field.lf-field>.mat-mdc-text-field-wrapper>.mat-mdc-form-field-flex>.mat-mdc-form-field-infix>.mat-mdc-select>.mat-mdc-select-trigger{height:inherit;font-size:14px}::ng-deep mat-form-field.lf-field>.mat-mdc-text-field-wrapper>.mat-mdc-form-field-flex>.mat-mdc-form-field-infix>.mat-mdc-input-element{height:inherit}::ng-deep .mdc-line-ripple{display:none}::ng-deep mat-form-field>.mat-mdc-form-field-subscript-wrapper>.mat-mdc-form-field-hint-wrapper,::ng-deep mat-form-field>.mat-mdc-form-field-subscript-wrapper>.mat-mdc-form-field-error-wrapper{position:unset;padding:0;min-height:1.25rem}::ng-deep .mat-mdc-form-field-hint-spacer{flex-basis:0!important}::ng-deep mat-hint{color:#0009}::ng-deep .mat-mdc-form-field-hint,::ng-deep .mat-mdc-form-field-error{padding:0 1rem;line-height:1rem;font-size:var(--mat-form-field-subscript-text-size)}::ng-deep mat-form-field>.mat-mdc-form-field-subscript-wrapper.mat-mdc-form-field-bottom-align:before{height:unset;display:block}::ng-deep .lf-checklist-item .mat-form-field-invalid .mat-mdc-form-field-subscript-wrapper{padding-top:0!important}::ng-deep .lf-field .mdc-text-field{border-radius:0}\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.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "component", type: i4.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i5.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: DynamicFieldComponent, decorators: [{
            type: Component,
            args: [{ selector: 'lf-dynamic-field-component', template: "<!--Copyright (c) Laserfiche.\r\nLicensed under the MIT License. See LICENSE in the project root for license information.-->\r\n\r\n<mat-form-field [title]=\"title\" appearance=\"outline\" class=\"lf-field\">\r\n  <mat-select panelClass=\"lf-dropdown-overlay\" [formControl]=\"formControl\" [title]=\"formControl.value\"\r\n    (selectionChange)=\"onValueChanged()\" [compareWith]=\"compareWith\" >\r\n    <mat-option>--</mat-option>\r\n    <mat-option *ngFor=\"let listOption of options\" [value]=\"listOption\">\r\n      {{listOption}}\r\n    </mat-option>\r\n  </mat-select>\r\n  <mat-error *ngIf=\"getBrokenValidationRule()\">{{fieldValidationErrorMsg | async}}</mat-error>\r\n</mat-form-field>\r\n", styles: [".lf-field,.lf-textarea{width:100%;min-width:50px}.mat-mdc-input-element{caret-color:#000}.token-picker-field-box{width:100%;display:flex;font-size:14px}.field-box{flex-grow:1;flex-shrink:1;display:inline-block;width:100%}::ng-deep mat-form-field.lf-field>.mat-mdc-text-field-wrapper>.mat-mdc-form-field-flex>.mat-mdc-form-field-infix,::ng-deep mat-form-field.lf-textarea>.mat-mdc-text-field-wrapper>.mat-mdc-form-field-flex>.mat-mdc-form-field-infix{padding:0;border:none}::ng-deep mat-form-field.lf-field.lf-date-field>.mat-mdc-form-field-wrapper>.mat-mdc-form-field-flex>.mat-mdc-form-field-infix{line-height:0}::ng-deep .lf-field .mdc-text-field--outlined:not(.mdc-text-field--focused) .mdc-notched-outline__leading,::ng-deep .lf-field .mdc-text-field--outlined:not(.mdc-text-field--focused) .mdc-notched-outline__notch,::ng-deep .lf-field .mdc-text-field--outlined:not(.mdc-text-field--focused) .mdc-notched-outline__trailing,::ng-deep .lf-textarea .mdc-text-field--outlined:not(.mdc-text-field--focused) .mdc-notched-outline__leading,::ng-deep .lf-textarea .mdc-text-field--outlined:not(.mdc-text-field--focused) .mdc-notched-outline__notch,::ng-deep .lf-textarea .mdc-text-field--outlined:not(.mdc-text-field--focused) .mdc-notched-outline__trailing{border-color:#ccc}::ng-deep .mdc-text-field--outlined{--mdc-outlined-text-field-focus-outline-color: black;&:hover{--mdc-outlined-text-field-outline-width: 2px}}::ng-deep mat-form-field.lf-field>.mat-mdc-text-field-wrapper>.mat-mdc-form-field-flex>.mat-mdc-form-field-infix>.mat-mdc-select>.mat-mdc-select-trigger>.mat-mdc-select-arrow-wrapper>.mat-mdc-select-arrow{color:#0000008a}::ng-deep mat-form-field.lf-field>.mat-mdc-text-field-wrapper>.mat-mdc-form-field-flex>.mdc-notched-outline{height:28px;color:#ccc}::ng-deep mat-form-field.lf-textarea>.mat-mdc-form-field-wrapper>.mat-mdc-form-field-flex>.mdc-notched-outline{color:#ccc}::ng-deep mat-form-field.lf-field>.mat-mdc-form-field-wrapper>.mat-mdc-form-field-flex>.mat-form-field-outline-thick,::ng-deep mat-form-field.lf-textarea>.mat-mdc-text-field-wrapper>.mat-mdc-form-field-flex>.mat-form-field-outline-thick{color:#000}::ng-deep mat-form-field.lf-field.ng-invalid>.mat-mdc-text-field-wrapper>.mat-mdc-form-field-flex>.mat-form-field-outline-thick,::ng-deep mat-form-field.lf-textarea.ng-invalid>.mat-mdc-text-field-wrapper>.mat-mdc-form-field-flex>.mat-form-field-outline-thick{color:red}::ng-deep mat-form-field.lf-field.ng-invalid.ng-pristine>.mat-mdc-form-field-wrapper>.mat-mdc-form-field-flex>.mat-form-field-outline-thick,::ng-deep mat-form-field.lf-textarea.ng-invalid.ng-pristine>.mat-mdc-text-field-wrapper>.mat-mdc-form-field-flex>.mat-form-field-outline-thick{color:#000}::ng-deep mat-form-field.lf-field .mat-mdc-form-field-subscript-wrapper,::ng-deep mat-form-field.lf-textarea .mat-mdc-form-field-subscript-wrapper{display:flex;flex-direction:column}::ng-deep lf-field-template-container-component .lf-template-picker>.mat-mdc-form-field-subscript-wrapper{height:0px}::ng-deep mat-form-field.lf-field>.mat-mdc-text-field-wrapper,::ng-deep mat-form-field.lf-textarea>.mat-mdc-text-field-wrapper{padding-bottom:0;padding-left:10px;padding-right:10px}::ng-deep mat-form-field.lf-date-field>.mat-mdc-text-field-wrapper>.mat-mdc-form-field-flex>.mat-mdc-form-field-icon-suffix{top:-.2em;position:unset}.lf-field-token-picker{flex-grow:0;flex-shrink:0;margin-left:1px;vertical-align:top}.mat-mdc-form-field{font-size:inherit;font-weight:400;line-height:1.125;font-family:Roboto,Helvetica Neue,sans-serif;letter-spacing:normal}::ng-deep .mdc-floating-label.mat-mdc-floating-label{display:none}::ng-deep .lf-field>.mat-mdc-text-field-wrapper>.mat-mdc-form-field-flex{height:28px}::ng-deep .lf-field>.mat-mdc-text-field-wrapper>.mat-mdc-form-field-flex>.mat-mdc-form-field-infix{height:inherit;min-height:0px}::ng-deep mat-form-field.lf-field>.mat-mdc-text-field-wrapper>.mat-mdc-form-field-flex>.mat-mdc-form-field-infix>.mat-mdc-select,::ng-deep mat-form-field.lf-field>.mat-mdc-text-field-wrapper>.mat-mdc-form-field-flex>.mat-mdc-form-field-infix>.mat-mdc-select>.mat-mdc-select-trigger{height:inherit;font-size:14px}::ng-deep mat-form-field.lf-field>.mat-mdc-text-field-wrapper>.mat-mdc-form-field-flex>.mat-mdc-form-field-infix>.mat-mdc-input-element{height:inherit}::ng-deep .mdc-line-ripple{display:none}::ng-deep mat-form-field>.mat-mdc-form-field-subscript-wrapper>.mat-mdc-form-field-hint-wrapper,::ng-deep mat-form-field>.mat-mdc-form-field-subscript-wrapper>.mat-mdc-form-field-error-wrapper{position:unset;padding:0;min-height:1.25rem}::ng-deep .mat-mdc-form-field-hint-spacer{flex-basis:0!important}::ng-deep mat-hint{color:#0009}::ng-deep .mat-mdc-form-field-hint,::ng-deep .mat-mdc-form-field-error{padding:0 1rem;line-height:1rem;font-size:var(--mat-form-field-subscript-text-size)}::ng-deep mat-form-field>.mat-mdc-form-field-subscript-wrapper.mat-mdc-form-field-bottom-align:before{height:unset;display:block}::ng-deep .lf-checklist-item .mat-form-field-invalid .mat-mdc-form-field-subscript-wrapper{padding-top:0!important}::ng-deep .lf-field .mdc-text-field{border-radius:0}\n"] }]
        }], ctorParameters: () => [], propDecorators: { options: [{
                type: Input
            }], formControl: [{
                type: Input
            }], title: [{
                type: Input
            }], fieldValidationErrorMsg: [{
                type: Input
            }], getBrokenValidationRule: [{
                type: Input
            }], valueChange: [{
                type: Output
            }], compareWith: [{
                type: Input
            }] } });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZHluYW1pYy1maWVsZC5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy91aS1jb21wb25lbnRzL2xmLW1ldGFkYXRhL2ZpZWxkLWNvbXBvbmVudHMvZmllbGQtYmFzZS1wYXJ0cy9sZi1maWVsZC1iYXNlL2R5bmFtaWMtZmllbGQvZHluYW1pYy1maWVsZC5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy91aS1jb21wb25lbnRzL2xmLW1ldGFkYXRhL2ZpZWxkLWNvbXBvbmVudHMvZmllbGQtYmFzZS1wYXJ0cy9sZi1maWVsZC1iYXNlL2R5bmFtaWMtZmllbGQvZHluYW1p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