@3kles/kles-material-dynamicforms 1.1.12 → 1.1.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"3kles-kles-material-dynamicforms.js","sources":["ng://@3kles/kles-material-dynamicforms/lib/enums/type.enum.ts","ng://@3kles/kles-material-dynamicforms/lib/dynamic-form.component.ts","ng://@3kles/kles-material-dynamicforms/lib/directive/dynamic-component.directive.ts","ng://@3kles/kles-material-dynamicforms/lib/fields/field.abstract.ts","ng://@3kles/kles-material-dynamicforms/lib/fields/label.component.ts","ng://@3kles/kles-material-dynamicforms/lib/fields/input.component.ts","ng://@3kles/kles-material-dynamicforms/lib/fields/button-submit.component.ts","ng://@3kles/kles-material-dynamicforms/lib/fields/select.component.ts","ng://@3kles/kles-material-dynamicforms/lib/fields/date.component.ts","ng://@3kles/kles-material-dynamicforms/lib/fields/radio.component.ts","ng://@3kles/kles-material-dynamicforms/lib/fields/checkbox.component.ts","ng://@3kles/kles-material-dynamicforms/lib/fields/list-field.component.ts","ng://@3kles/kles-material-dynamicforms/lib/fields/color.component.ts","ng://@3kles/kles-material-dynamicforms/lib/fields/chip.component.ts","ng://@3kles/kles-material-dynamicforms/lib/fields/group.component.ts","ng://@3kles/kles-material-dynamicforms/lib/fields/icon.component.ts","ng://@3kles/kles-material-dynamicforms/lib/fields/select.search.component.ts","ng://@3kles/kles-material-dynamicforms/lib/fields/line-break.component.ts","ng://@3kles/kles-material-dynamicforms/lib/fields/link.component.ts","ng://@3kles/kles-material-dynamicforms/lib/fields/selection-list.component.ts","ng://@3kles/kles-material-dynamicforms/lib/fields/button-toogle-group.component.ts","ng://@3kles/kles-material-dynamicforms/lib/fields/array.component.ts","ng://@3kles/kles-material-dynamicforms/lib/directive/dynamic-field.directive.ts","ng://@3kles/kles-material-dynamicforms/lib/matcher/form-error.matcher.ts","ng://@3kles/kles-material-dynamicforms/lib/modules/material.module.ts","ng://@3kles/kles-material-dynamicforms/lib/forms/button-control.component.ts","ng://@3kles/kles-material-dynamicforms/lib/fields/button-form.component.ts","ng://@3kles/kles-material-dynamicforms/lib/forms/buttonchecker-control.component.ts","ng://@3kles/kles-material-dynamicforms/lib/fields/buttonchecker-form.component.ts","ng://@3kles/kles-material-dynamicforms/lib/forms/buttonfile-control.component.ts","ng://@3kles/kles-material-dynamicforms/lib/fields/buttonfile-form.component.ts","ng://@3kles/kles-material-dynamicforms/lib/fields/textarea.component.ts","ng://@3kles/kles-material-dynamicforms/lib/fields/text.component.ts","ng://@3kles/kles-material-dynamicforms/lib/fields/input.clearable.component.ts","ng://@3kles/kles-material-dynamicforms/lib/pipe/transform.pipe.ts","ng://@3kles/kles-material-dynamicforms/lib/pipe/array.pipe.ts","ng://@3kles/kles-material-dynamicforms/lib/fields/slide-toggle.component.ts","ng://@3kles/kles-material-dynamicforms/lib/fields/badge.component.ts","ng://@3kles/kles-material-dynamicforms/lib/kles-material-dynamicforms.module.ts","ng://@3kles/kles-material-dynamicforms/lib/validators/autocomplete.validator.ts","ng://@3kles/kles-material-dynamicforms/public-api.ts","ng://@3kles/kles-material-dynamicforms/3kles-kles-material-dynamicforms.ts"],"sourcesContent":["export enum EnumType {\n text = 'text',\n button = 'button',\n checkbox = 'checkbox',\n number = 'number',\n time = 'time',\n date = 'date',\n color = 'color',\n list = 'list',\n multi = 'multi',\n array = 'array',\n group = 'group',\n lineBreak = 'lineBreak',\n}","import { OnInit, Component, Input, Output, EventEmitter, OnChanges, SimpleChanges } from '@angular/core';\nimport { FormGroup, FormBuilder, Validators, ValidatorFn, AsyncValidatorFn, AbstractControl } from '@angular/forms';\nimport { EnumType } from './enums/type.enum';\nimport { IKlesFieldConfig } from './interfaces/field.config.interface';\nimport { IKlesValidator } from './interfaces/validator.interface';\n\n@Component({\n exportAs: 'klesDynamicForm',\n selector: 'app-kles-dynamic-form',\n template: `\n <form class=\"{{orientationClass}}\" [formGroup]=\"form\" (submit)=\"onSubmit($event)\">\n <ng-container *ngFor=\"let field of fields;\" class=\"{{orientationItemClass}}\" klesDynamicField [field]=\"field\" [group]=\"form\" [siblingFields]=\"fields\">\n </ng-container>\n <!--<button (click)=\"reset()\" mat-raised-button color=\"primary\">RESET</button>-->\n </form>\n `,\n styles: [\n // '.dynamic-form {display: flex; flex-direction: column;}',\n //'.dynamic-form {display: flex;}',\n //'.dynamic-form { width: 100%; }',\n '.dynamic-form-column { display: flex;flex-direction: column; }',\n '.dynamic-form-column > * { width: 100%; }',\n '.dynamic-form-row { display: inline-flex;flex-wrap:wrap;gap:10px }',\n '.dynamic-form-row > * { width: 100%; }',\n '.dynamic-form-row-item { margin-right: 10px; }',\n '.dynamic-form-column-item { margin-bottom: 10px; }',\n ]\n\n})\nexport class KlesDynamicFormComponent implements OnInit, OnChanges {\n @Input() fields: IKlesFieldConfig[] = [];\n @Input() validators: IKlesValidator<ValidatorFn>[] = [];\n @Input() asyncValidators: IKlesValidator<AsyncValidatorFn>[] = [];\n // tslint:disable-next-line: no-output-native\n @Output() submit: EventEmitter<any> = new EventEmitter<any>();\n @Output() _onLoaded = new EventEmitter();\n\n @Input() direction: 'column' | 'row' = 'column';\n\n form: FormGroup;\n orientationClass: 'dynamic-form-column' | 'dynamic-form-row' = 'dynamic-form-column';\n orientationItemClass: 'dynamic-form-column-item' | 'dynamic-form-row-item' = 'dynamic-form-column-item';\n\n get value() {\n return this.form.value;\n }\n\n constructor(private fb: FormBuilder) { }\n\n\n ngOnInit() {\n this.form = this.createForm();\n this.orientationClass = this.direction === 'row' ? 'dynamic-form-row' : 'dynamic-form-column';\n this.orientationItemClass = this.direction === 'row' ? 'dynamic-form-row-item' : 'dynamic-form-column-item';\n this._onLoaded.emit();\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (!changes.fields?.firstChange) {\n this.updateForm();\n // this.form = this.createControl();\n // this.form.controls = {};\n this._onLoaded.emit();\n }\n\n if (!changes.validators?.firstChange && this.form) {\n this.form.setValidators(this.validators.map(v => v.validator));\n }\n\n if (!changes.asyncValidators?.firstChange && this.form) {\n this.form.setAsyncValidators(this.asyncValidators.map(v => v.validator));\n }\n\n if (!changes.direction?.firstChange) {\n this.orientationClass = this.direction === 'row' ? 'dynamic-form-row' : 'dynamic-form-column';\n this.orientationItemClass = this.direction === 'row' ? 'dynamic-form-row-item' : 'dynamic-form-column-item';\n }\n\n }\n\n onSubmit(event: Event) {\n event.preventDefault();\n event.stopPropagation();\n if (this.form.valid) {\n this.submit.emit(this.form.value);\n } else {\n this.validateAllFormFields(this.form);\n }\n }\n\n reset() {\n this.form.reset();\n }\n\n\n private updateForm() {\n Object.keys(this.form.controls).filter(key => {\n return !this.fields.map(field => field.name).includes(key);\n }).forEach(key => {\n this.form.removeControl(key);\n });\n\n\n this.fields\n .filter(field => !this.form.controls[field.name])\n .forEach(field => {\n if (field.type === EnumType.lineBreak) {\n return;\n }\n const control = this.createControl(field);\n this.form.addControl(field.name, control);\n });\n }\n\n private createControl(field: IKlesFieldConfig): AbstractControl {\n\n if (field.type === EnumType.array) {\n const array = this.fb.array([]);\n\n if (field.value && Array.isArray(field.value)) {\n if (field.collections && Array.isArray(field.collections)) {\n field.value.forEach(val => {\n const group = this.fb.group({});\n field.collections.forEach(subfield => {\n const data = val[subfield.name] || null;\n const control = this.createControl({ ...subfield, ...(data && { value: data }) });\n group.addControl(subfield.name, control);\n });\n array.push(group);\n });\n }\n } else {\n const group = this.fb.group({});\n field.collections.forEach(subfield => {\n const control = this.createControl({ ...subfield });\n group.addControl(subfield.name, control);\n });\n array.push(group);\n }\n\n // field.value.forEach((data: any) => {\n // const subGroup = this.fb.group({});\n // field.collections.forEach(subfield => {\n // const control = this.createControl(subfield);\n // subGroup.addControl(subfield.name, control);\n // });\n // array.push(subGroup);\n // });\n return array;\n } else if (field.type === EnumType.group) {\n const subGroup = this.fb.group({});\n if (field.collections && Array.isArray(field.collections)) {\n field.collections.forEach(subfield => {\n const control = this.createControl(subfield);\n subGroup.addControl(subfield.name, control);\n });\n }\n return subGroup;\n\n } else {\n const control = this.fb.control(\n field.value,\n {\n validators: this.bindValidations(field.validations || []),\n asyncValidators: this.bindAsyncValidations(field.asyncValidations || []),\n updateOn: field.updateOn || 'change'\n }\n );\n if (field.disabled) {\n control.disable();\n }\n return control;\n }\n }\n\n\n\n // private createControl(field: IKlesFieldConfig): AbstractControl {\n\n // if (field.type === 'listField') {\n // const array = this.fb.array([]);\n\n // field.value.forEach((data: any) => {\n // const subGroup = this.fb.group({});\n // field.collections.forEach(subfield => {\n // const control = this.fb.control(\n // data[subfield.name] ? data[subfield.name] : null,\n // this.bindValidations(subfield.validations || []),\n // this.bindAsyncValidations(subfield.asyncValidations || [])\n // );\n // subGroup.addControl(subfield.name, control);\n // });\n // array.push(subGroup);\n // });\n // return array;\n // } else if (field.type === 'group') {\n // const subGroup = this.fb.group({});\n // if (field.collections && Array.isArray(field.collections)) {\n // field.collections.forEach(subfield => {\n // const control = this.fb.control(\n // subfield.value,\n // this.bindValidations(subfield.validations || []),\n // this.bindAsyncValidations(subfield.asyncValidations || [])\n // );\n // if (subfield.disabled) {\n // control.disable();\n // }\n // subGroup.addControl(subfield.name, control);\n // });\n // }\n // return subGroup;\n\n // } else {\n // const control = this.fb.control(\n // field.value,\n // this.bindValidations(field.validations || []),\n // this.bindAsyncValidations(field.asyncValidations || [])\n // );\n // if (field.disabled) {\n // control.disable();\n // }\n // return control;\n // }\n // }\n\n\n\n private createForm() {\n const group = this.fb.group({});\n\n this.fields.forEach(field => {\n\n if (field.type === EnumType.lineBreak) {\n return;\n }\n const control = this.createControl(field);\n\n group.addControl(field.name, control);\n });\n\n group.setValidators(this.validators.map(v => v.validator));\n group.setAsyncValidators(this.asyncValidators.map(v => v.validator));\n\n return group;\n }\n\n\n private bindValidations(validations: IKlesValidator<ValidatorFn>[]): ValidatorFn {\n if (validations.length > 0) {\n const validList = [];\n validations.forEach(valid => {\n validList.push(valid.validator);\n });\n return Validators.compose(validList);\n\n }\n return null;\n }\n\n\n private bindAsyncValidations(validations: IKlesValidator<AsyncValidatorFn>[]): AsyncValidatorFn {\n if (validations.length > 0) {\n const validList = [];\n validations.forEach(valid => {\n validList.push(valid.validator);\n });\n return Validators.composeAsync(validList);\n\n }\n return null;\n }\n\n private validateAllFormFields(formGroup: FormGroup) {\n Object.keys(formGroup.controls).forEach(field => {\n const control = formGroup.get(field);\n control.markAsTouched({ onlySelf: true });\n });\n }\n}\n","import { Directive, Input, OnInit, ComponentFactoryResolver, ViewContainerRef, ComponentRef, Type, OnChanges, SimpleChanges } from '@angular/core';\nimport { IKlesFieldConfig } from '../interfaces/field.config.interface';\n\n\n@Directive({\n selector: '[klesComponent]'\n})\nexport class KlesComponentDirective implements OnInit, OnChanges {\n @Input() component: Type<any>;\n @Input() value: any;\n @Input() field?: IKlesFieldConfig;\n\n componentRef: ComponentRef<any>;\n\n constructor(private resolver: ComponentFactoryResolver,\n private container: ViewContainerRef) { }\n\n ngOnInit() {\n this.buildComponent();\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes.component && !changes.component.isFirstChange()) {\n this.component = changes.component.currentValue;\n this.buildComponent();\n }\n if (changes.value && !changes.value.isFirstChange()) {\n this.value = changes.value.currentValue;\n this.componentRef.instance.value = this.value;\n }\n }\n\n buildComponent() {\n const factory = this.resolver.resolveComponentFactory(\n this.component\n );\n if (this.componentRef) this.componentRef.destroy();\n this.componentRef = this.container.createComponent(factory);\n this.componentRef.instance.component = this.component;\n this.componentRef.instance.value = this.value;\n this.componentRef.instance.field = this.field;\n }\n}\n","import { IKlesField } from '../interfaces/field.interface';\nimport { IKlesFieldConfig } from '../interfaces/field.config.interface';\nimport { FormGroup } from '@angular/forms';\nimport { AfterViewInit, OnDestroy, OnInit } from '@angular/core';\nimport { Subject } from 'rxjs';\nimport { takeUntil } from 'rxjs/operators';\n\nexport abstract class KlesFieldAbstract implements IKlesField, OnInit, AfterViewInit, OnDestroy {\n field: IKlesFieldConfig;\n group: FormGroup;\n siblingFields: IKlesFieldConfig[];\n\n protected _onDestroy = new Subject<void>();\n\n ngOnInit(): void {\n // this.applyPipeTransform();\n if (this.field.valueChanges) {\n this.field.valueChanges(this.field, this.group, this.siblingFields);\n }\n\n this.group.controls[this.field.name]?.valueChanges\n .pipe(takeUntil(this._onDestroy))\n .subscribe(val => {\n if (this.field.valueChanges) {\n this.field.valueChanges(this.field, this.group, this.siblingFields, val);\n }\n // this.applyPipeTransform();\n });\n }\n\n ngAfterViewInit(): void {\n\n }\n\n ngOnDestroy(): void {\n this._onDestroy.next();\n this._onDestroy.complete();\n }\n\n applyPipeTransform() {\n if (this.group && this.field) {\n const control = this.group.controls[this.field.name];\n if (control) {\n const val = this.group.controls[this.field.name].value;\n if (this.field.pipeTransform) {\n this.field.pipeTransform.forEach(p => {\n let pipeVal = control.value;\n if (p.options) {\n p.options.forEach(opt => {\n pipeVal = p.pipe.transform(val, opt);\n });\n } else {\n pipeVal = p.pipe.transform(val);\n }\n control.patchValue(pipeVal, { onlySelf: true, emitEvent: false });\n });\n }\n }\n }\n }\n}\n","\nimport { Component, OnDestroy, OnInit } from \"@angular/core\";\nimport { KlesFieldAbstract } from './field.abstract';\n\n\n@Component({\n selector: \"kles-form-label\",\n template: `\n <div [formGroup]=\"group\" >\n <input matInput matTooltip=\"{{field.tooltip}}\" [attr.id]=\"field.id\" \n [ngClass]=\"field.ngClass\" \n [ngStyle]=\"{'color':'inherit'}\" [formControlName]=\"field.name\" [placeholder]=\"field.placeholder | translate\" [type]=\"field.inputType\">\n </div>\n`\n})\nexport class KlesFormLabelComponent extends KlesFieldAbstract implements OnInit, OnDestroy {\n\n ngOnInit() {\n this.group.controls[this.field.name].disable();\n super.ngOnInit();\n }\n\n ngOnDestroy(): void {\n super.ngOnDestroy();\n }\n}","import { KlesFieldAbstract } from './field.abstract';\nimport { OnInit, Component, OnDestroy } from '@angular/core';\nimport { Observable, of } from 'rxjs';\nimport { startWith, map, switchMap } from 'rxjs/operators';\n\n@Component({\n selector: 'kles-form-input',\n template: `\n <mat-form-field [formGroup]=\"group\" class=\"form-element\">\n\n <ng-container *ngIf=\"field.autocomplete; else notAutoComplete\">\n <input matInput matTooltip=\"{{field.tooltip}}\" [attr.id]=\"field.id\" [ngClass]=\"field.ngClass\" [formControlName]=\"field.name\" [placeholder]=\"field.placeholder | translate\" [type]=\"field.inputType\" \n [maxLength]=\"field.maxLength\" [min]=\"field.min\" [max]=\"field.max\" [step]=\"field.step\"\n [matAutocomplete]=\"auto\">\n\n <mat-autocomplete #auto=\"matAutocomplete\" [displayWith]=\"displayFn.bind(this)\" [panelWidth]=\"this.field.panelWidth\">\n <ng-container *ngIf=\"!field.autocompleteComponent\">\n <mat-option *ngFor=\"let option of filteredOption | async\" [value]=\"option\">\n {{field.property ? option[field.property] : option}}\n </mat-option>\n </ng-container>\n\n <ng-container *ngIf=\"field.autocompleteComponent\">\n <mat-option *ngFor=\"let option of filteredOption | async\" [value]=\"option\">\n <ng-container klesComponent [component]=\"field.autocompleteComponent\" [value]=\"option\" [field]=\"field\">\n </ng-container>\n </mat-option>\n </ng-container>\n </mat-autocomplete>\n </ng-container>\n\n <ng-template #notAutoComplete>\n <input matInput matTooltip=\"{{field.tooltip}}\" [attr.id]=\"field.id\" [ngClass]=\"field.ngClass\" [formControlName]=\"field.name\" [placeholder]=\"field.placeholder | translate\" [type]=\"field.inputType\"\n [maxLength]=\"field.maxLength\" [min]=\"field.min\" [max]=\"field.max\" [step]=\"field.step\">\n </ng-template>\n\n <mat-spinner matSuffix mode=\"indeterminate\" *ngIf=\"isPending()\" diameter=\"17\"></mat-spinner>\n\n <ng-container *ngFor=\"let validation of field.validations;\" ngProjectAs=\"mat-error\">\n <mat-error *ngIf=\"group.get(field.name).hasError(validation.name)\">{{validation.message | translate}}</mat-error>\n </ng-container>\n <ng-container *ngFor=\"let validation of field.asyncValidations;\" ngProjectAs=\"mat-error\">\n <mat-error *ngIf=\"group.get(field.name).hasError(validation.name)\">{{validation.message | translate}}</mat-error>\n </ng-container>\n </mat-form-field>\n `,\n styles: ['mat-form-field {width: calc(100%)}']\n})\nexport class KlesFormInputComponent extends KlesFieldAbstract implements OnInit, OnDestroy {\n\n filteredOption: Observable<any[]>;\n options$: Observable<any[]>;\n\n ngOnInit(): void {\n\n if (this.field.options instanceof Observable) {\n this.options$ = this.field.options;\n } else {\n this.options$ = of(this.field.options);\n }\n\n\n this.filteredOption = this.group.get(this.field.name).valueChanges\n .pipe(\n startWith(''),\n // map(data => data ? this.filterData(data) : this.field.options.slice())\n switchMap(data => data ? this.filterData(data) : this.options$)\n );\n if (!this.field.maxLength) {\n this.field.maxLength = 524288; // Max default input W3C\n }\n super.ngOnInit();\n }\n\n isPending() {\n return (this.group.controls[this.field.name].pending || this.field.pending);\n }\n\n private filterData(value: any): Observable<any[]> {\n let filterValue;\n\n if (typeof value === 'string' && Object.prototype.toString.call(value) === '[object String]') {\n filterValue = value.toLowerCase();\n } else {\n filterValue = value[this.field.property].toLowerCase();\n }\n\n if (this.field.property) {\n return this.options$\n .pipe(map(options => options.filter(option => option[this.field.property].toLowerCase().indexOf(filterValue) === 0)));\n // return this.field.options\n // .filter(data => data[this.field.property].toLowerCase().indexOf(filterValue) === 0);\n }\n // return this.field.options.filter(data => data.toLowerCase().indexOf(filterValue) === 0);\n return this.options$.pipe(map(options => options.filter(option => option.toLowerCase().indexOf(filterValue) === 0)));\n }\n\n displayFn(value: any) {\n if (this.field.displayWith) {\n return this.field.displayWith(value);\n } else {\n if (value && this.field && this.field.property) {\n return value[this.field.property] ? value[this.field.property] : '';\n }\n return value ? value : '';\n }\n }\n\n ngOnDestroy(): void {\n super.ngOnDestroy();\n }\n}\n","import { KlesFieldAbstract } from './field.abstract';\nimport { OnInit, Component, OnDestroy } from '@angular/core';\n\n\n@Component({\n selector: 'kles-submit-button',\n template: `\n <div [formGroup]=\"group\">\n <button matTooltip=\"{{field.tooltip}}\" [attr.id]=\"field.id\" [ngClass]=\"field.ngClass\" type=\"submit\" [disabled]=\"field.disabled\" mat-raised-button color=\"primary\">{{field.label}}</button>\n </div>\n `,\n styles: []\n})\nexport class KlesFormSubmitButtonComponent extends KlesFieldAbstract implements OnInit, OnDestroy {\n\n ngOnInit(): void {\n super.ngOnInit();\n }\n\n ngOnDestroy(): void {\n super.ngOnDestroy();\n }\n}\n","import { CdkVirtualScrollViewport, ScrollDispatcher } from '@angular/cdk/scrolling';\nimport { AfterViewInit, ChangeDetectorRef, Component, OnDestroy, OnInit, QueryList, ViewChild, ViewChildren } from '@angular/core';\nimport { MatOption } from '@angular/material/core';\nimport { Observable, of } from 'rxjs';\nimport { filter } from 'rxjs/operators';\nimport { KlesFieldAbstract } from './field.abstract';\n\n@Component({\n selector: 'kles-form-select',\n template: `\n <mat-form-field class=\"margin-top\" [formGroup]=\"group\">\n <mat-select matTooltip=\"{{field.tooltip}}\" [attr.id]=\"field.id\"\n (openedChange)=\"openChange($event)\" [compareWith]=\"compareFn\"\n [ngClass]=\"field.ngClass\" [placeholder]=\"field.placeholder | translate\" [formControlName]=\"field.name\" [multiple]=\"field.multiple\">\n <mat-select-trigger *ngIf=\"field.triggerComponent\">\n <ng-container klesComponent [component]=\"field.triggerComponent\" [value]=\"group.controls[field.name].value\" [field]=\"field\"></ng-container>\n </mat-select-trigger>\n\n\n <ng-container *ngIf=\"!field.virtualScroll\">\n <ng-container *ngIf=\"!field.autocompleteComponent\">\n <mat-option *ngFor=\"let item of options$ | async\" [value]=\"item\">{{(field.property ? item[field.property] : item) | klesTransform:field.pipeTransform}}</mat-option>\n </ng-container>\n\n <ng-container *ngIf=\"field.autocompleteComponent\">\n <mat-option *ngFor=\"let item of options$ | async\" [value]=\"item\">\n <ng-container klesComponent [component]=\"field.autocompleteComponent\" [value]=\"item\" [field]=\"field\"></ng-container>\n </mat-option>\n </ng-container>\n </ng-container>\n\n <ng-container *ngIf=\"field.virtualScroll\">\n <cdk-virtual-scroll-viewport [itemSize]=\"field.itemSize || 50\" [style.height.px]=5*48>\n <ng-container *ngIf=\"!field.autocompleteComponent\">\n <mat-option *cdkVirtualFor=\"let item of options$ | async\" [value]=\"item\">\n {{(field.property ? item[field.property] : item) | klesTransform:field.pipeTransform}}\n </mat-option>\n\n <ng-container *ngIf=\"field.multiple\">\n <mat-option *ngFor=\"let item of group.controls[field.name].value | slice:0:30\" [value]=\"item\"\n style=\"display:none\">\n {{(field.property ? item[field.property] : item) | klesTransform:field.pipeTransform}}\n </mat-option>\n </ng-container>\n\n <ng-container *ngIf=\"!field.multiple && group.controls[field.name].value\">\n <mat-option *ngFor=\"let item of [group?.controls[field.name]?.value]\" [value]=\"item\" style=\"display:none\">\n {{(field.property ? item[field.property] : item) | klesTransform:field.pipeTransform}}\n </mat-option>\n </ng-container>\n </ng-container>\n\n <ng-container *ngIf=\"field.autocompleteComponent\">\n <mat-option *cdkVirtualFor=\"let item of options$ | async\" [value]=\"item\">\n <ng-container klesComponent [component]=\"field.autocompleteComponent\" [value]=\"item\" [field]=\"field\"></ng-container>\n </mat-option>\n <ng-container *ngIf=\"field.multiple\">\n <mat-option *ngFor=\"let item of group.controls[field.name].value | slice:0:30\" [value]=\"item\"\n style=\"display:none\">\n <ng-container klesComponent [component]=\"field.autocompleteComponent\" [value]=\"item\" [field]=\"field\"></ng-container>\n </mat-option>\n </ng-container>\n <ng-container *ngIf=\"!field.multiple && group.controls[field.name].value\">\n <mat-option *ngFor=\"let item of [group?.controls[field.name]?.value]\" [value]=\"item\" style=\"display:none\">\n <ng-container klesComponent [component]=\"field.autocompleteComponent\" [value]=\"item\" [field]=\"field\"></ng-container>\n </mat-option>\n </ng-container>\n </ng-container>\n </cdk-virtual-scroll-viewport>\n\n </ng-container>\n\n </mat-select>\n <ng-container *ngFor=\"let validation of field.validations;\" ngProjectAs=\"mat-error\">\n <mat-error *ngIf=\"group.get(field.name).hasError(validation.name)\">{{validation.message | translate}}</mat-error>\n </ng-container>\n <ng-container *ngFor=\"let validation of field.asyncValidations;\" ngProjectAs=\"mat-error\">\n <mat-error *ngIf=\"group.get(field.name).hasError(validation.name)\">{{validation.message | translate}}</mat-error>\n </ng-container>\n </mat-form-field>\n`,\n styles: ['mat-form-field {width: calc(100%)}']\n})\nexport class KlesFormSelectComponent extends KlesFieldAbstract implements OnInit, OnDestroy {\n\n @ViewChild(CdkVirtualScrollViewport) cdkVirtualScrollViewport: CdkVirtualScrollViewport;\n @ViewChildren(MatOption) options: QueryList<MatOption>;\n\n options$: Observable<any[]>;\n\n constructor() {\n super();\n }\n\n ngOnInit() {\n super.ngOnInit();\n\n if (!(this.field.options instanceof Observable)) {\n this.options$ = of(this.field.options);\n } else {\n this.options$ = this.field.options;\n }\n }\n\n ngOnDestroy(): void {\n super.ngOnDestroy();\n }\n\n openChange($event: boolean) {\n if (this.field.virtualScroll) {\n if ($event) {\n this.cdkVirtualScrollViewport.scrollToIndex(0);\n this.cdkVirtualScrollViewport.checkViewportSize();\n }\n }\n }\n\n compareFn = (o1: any, o2: any) => {\n if (this.field.property && o1 && o2) {\n return o1[this.field.property] === o2[this.field.property];\n }\n return o1 === o2;\n }\n}\n","import { Component, OnDestroy, OnInit } from \"@angular/core\";\nimport { KlesFieldAbstract } from './field.abstract';\n\n@Component({\n selector: \"kles-form-datepicker\",\n template: `\n <mat-form-field class=\"demo-full-width margin-top\" [formGroup]=\"group\">\n <input matInput matTooltip=\"{{field.tooltip}}\" [attr.id]=\"field.id\" [ngClass]=\"field.ngClass\" [matDatepicker]=\"picker\" [formControlName]=\"field.name\" [placeholder]=\"field.placeholder | translate\">\n <mat-datepicker-toggle matSuffix [for]=\"picker\"></mat-datepicker-toggle>\n <mat-datepicker #picker></mat-datepicker>\n <mat-hint></mat-hint>\n \n <ng-container *ngFor=\"let validation of field.validations;\" ngProjectAs=\"mat-error\">\n <mat-error *ngIf=\"group.get(field.name).hasError(validation.name)\">{{validation.message | translate}}</mat-error>\n </ng-container>\n <ng-container *ngFor=\"let validation of field.asyncValidations;\" ngProjectAs=\"mat-error\">\n <mat-error *ngIf=\"group.get(field.name).hasError(validation.name)\">{{validation.message | translate}}</mat-error>\n </ng-container>\n </mat-form-field>\n `,\n styles: []\n})\nexport class KlesFormDateComponent extends KlesFieldAbstract implements OnInit, OnDestroy {\n ngOnInit() { super.ngOnInit(); }\n\n ngOnDestroy(): void {\n super.ngOnDestroy();\n }\n}\n","import { Component, OnDestroy, OnInit } from '@angular/core';\nimport { KlesFieldAbstract } from './field.abstract';\n\n@Component({\n selector: 'kles-form-radiobutton',\n template: `\n <div [formGroup]=\"group\">\n <label class=\"radio-label-padding\">{{field.label}}</label>\n <mat-radio-group matTooltip=\"{{field.tooltip}}\" [attr.id]=\"field.id\" [ngClass]=\"field.ngClass\" [formControlName]=\"field.name\">\n <mat-radio-button *ngFor=\"let item of field.options\" [value]=\"item\">{{item}}</mat-radio-button>\n </mat-radio-group>\n <ng-container *ngFor=\"let validation of field.validations;\" ngProjectAs=\"mat-error\">\n <mat-error *ngIf=\"group.get(field.name).hasError(validation.name)\">{{validation.message | translate}}</mat-error>\n </ng-container>\n <ng-container *ngFor=\"let validation of field.asyncValidations;\" ngProjectAs=\"mat-error\">\n <mat-error *ngIf=\"group.get(field.name).hasError(validation.name)\">{{validation.message | translate}}</mat-error>\n </ng-container>\n </div>\n`,\n styles: []\n})\nexport class KlesFormRadioComponent extends KlesFieldAbstract implements OnInit, OnDestroy {\n\n ngOnInit() { super.ngOnInit(); }\n\n ngOnDestroy(): void {\n super.ngOnDestroy();\n }\n}","\nimport { Component, OnDestroy, OnInit } from \"@angular/core\";\nimport { FormGroup } from \"@angular/forms\";\nimport { IKlesFieldConfig } from '../interfaces/field.config.interface';\nimport { KlesFieldAbstract } from './field.abstract';\n\n\n@Component({\n selector: \"kles-form-checkbox\",\n template: `\n <div [formGroup]=\"group\" > \n <mat-checkbox matTooltip=\"{{field.tooltip}}\" [attr.id]=\"field.id\" [ngClass]=\"field.ngClass\" [indeterminate]=\"field.indeterminate\" [formControlName]=\"field.name\">{{field.label | translate}}</mat-checkbox>\n <ng-container *ngFor=\"let validation of field.validations;\" ngProjectAs=\"mat-error\">\n <mat-error *ngIf=\"group.get(field.name).hasError(validation.name)\">{{validation.message}}</mat-error>\n </ng-container>\n <ng-container *ngFor=\"let validation of field.asyncValidations;\" ngProjectAs=\"mat-error\">\n <mat-error *ngIf=\"group.get(field.name).hasError(validation.name)\">{{validation.message}}</mat-error>\n </ng-container>\n </div>\n`,\n styles: []\n})\nexport class KlesFormCheckboxComponent extends KlesFieldAbstract implements OnInit, OnDestroy {\n ngOnInit() { super.ngOnInit(); }\n\n ngOnDestroy(): void {\n super.ngOnDestroy();\n }\n}\n","import { Component, OnDestroy, OnInit } from '@angular/core';\nimport { KlesFieldAbstract } from './field.abstract';\nimport { FormGroup, FormArray, FormBuilder, ValidatorFn, Validators, AsyncValidatorFn } from '@angular/forms';\nimport { IKlesValidator } from '../interfaces/validator.interface';\n\n@Component({\n selector: 'kles-form-listfield',\n template: `\n <div [formGroup]=\"group\" class=\"form-element\">\n {{field.label | translate}}\n <button mat-icon-button color=\"primary\" (click)=\"addField()\">\n <mat-icon>add</mat-icon>\n </button>\n\n <div class=\"dynamic-form\" [formGroupName]=\"field.name\">\n <div *ngFor=\"let subGroup of formArray.controls let index = index;\" fxLayout=\"row\" fxLayoutGap=\"5px\">\n <ng-container *ngFor=\"let subfield of field.collections;\"\n dynamicField [field]=\"subfield\" [group]=\"subGroup\">\n </ng-container>\n <button mat-icon-button (click)=\"deleteField(index)\" color=\"primary\">\n <mat-icon>delete_outlined</mat-icon>\n </button>\n </div>\n <ng-container *ngFor=\"let validation of field.validations;\" ngProjectAs=\"mat-error\">\n <mat-error *ngIf=\"group.get(field.name).hasError(validation.name)\">{{validation.message | translate}}</mat-error>\n </ng-container>\n <ng-container *ngFor=\"let validation of field.asyncValidations;\" ngProjectAs=\"mat-error\">\n <mat-error *ngIf=\"group.get(field.name).hasError(validation.name)\">{{validation.message | translate}}</mat-error>\n </ng-container>\n </div>\n </div>\n `,\n styles: []\n})\nexport class KlesFormListFieldComponent extends KlesFieldAbstract implements OnInit, OnDestroy {\n\n formArray: FormArray;\n\n constructor(private fb: FormBuilder) {\n super();\n }\n\n ngOnInit(): void {\n this.formArray = this.group.controls[this.field.name] as FormArray;\n super.ngOnInit();\n }\n\n private createFormGroup(): FormGroup {\n const group = this.fb.group({});\n this.field.collections.forEach(item => {\n const control = this.fb.control(\n null,\n this.bindValidations(item.validations || []),\n this.bindAsyncValidations(item.asyncValidations || [])\n );\n group.addControl(item.name, control);\n\n });\n\n return group;\n\n }\n\n deleteField(index: number) {\n this.formArray.removeAt(index);\n }\n\n addField() {\n this.formArray.push(this.createFormGroup());\n }\n\n\n private bindValidations(validations: IKlesValidator<ValidatorFn>[]): ValidatorFn {\n if (validations.length > 0) {\n const validList = [];\n validations.forEach(valid => {\n validList.push(valid.validator);\n });\n return Validators.compose(validList);\n\n }\n return null;\n }\n\n\n private bindAsyncValidations(validations: IKlesValidator<AsyncValidatorFn>[]): AsyncValidatorFn {\n if (validations.length > 0) {\n const validList = [];\n validations.forEach(valid => {\n validList.push(valid.validator);\n });\n return Validators.composeAsync(validList);\n\n }\n return null;\n }\n\n ngOnDestroy(): void {\n super.ngOnDestroy();\n }\n}\n\n","import { KlesFieldAbstract } from './field.abstract';\nimport { OnInit, Component, OnDestroy } from '@angular/core';\n@Component({\n selector: 'kles-form-color',\n template: `\n <mat-form-field [formGroup]=\"group\" class=\"form-element\">\n <input matInput matTooltip=\"{{field.tooltip}}\" [attr.id]=\"field.id\" [ngClass]=\"field.ngClass\" [placeholder]=\"field.placeholder | translate\"\n [colorPicker]=\"group.get(field.name).value\"\n [value]=\"group.get(field.name).value\"\n (colorPickerChange)=\"group.get(field.name).setValue($event)\"\n class=\"colorPicker\"\n [style.background]=\"group.get(field.name).value\"\n [style.color]=\"invertColor(group.get(field.name).value,true)\"\n [formControlName]=\"field.name\">\n <ng-container *ngFor=\"let validation of field.validations;\" ngProjectAs=\"mat-error\">\n <mat-error *ngIf=\"group.get(field.name).hasError(validation.name)\">{{validation.message | translate}}</mat-error>\n </ng-container>\n <ng-container *ngFor=\"let validation of field.asyncValidations;\" ngProjectAs=\"mat-error\">\n <mat-error *ngIf=\"group.get(field.name).hasError(validation.name)\">{{validation.message | translate}}</mat-error>\n </ng-container>\n </mat-form-field>\n `,\n styles: ['mat-form-field {width: calc(100%)}']\n})\nexport class KlesFormColorComponent extends KlesFieldAbstract implements OnInit, OnDestroy {\n\n\n ngOnInit() { super.ngOnInit(); }\n\n invertColor(hex, bw): string {\n if (hex.indexOf('#') === 0) {\n hex = hex.slice(1);\n }\n // convert 3-digit hex to 6-digits.\n if (hex.length === 3) {\n hex = hex[0] + hex[0] + hex[1] + hex[1] + hex[2] + hex[2];\n }\n if (hex.length !== 6) {\n return '#000000';\n }\n let r = parseInt(hex.slice(0, 2), 16);\n let g = parseInt(hex.slice(2, 4), 16);\n let b = parseInt(hex.slice(4, 6), 16);\n if (bw) {\n return (r * 0.299 + g * 0.587 + b * 0.114) > 186\n ? '#000000'\n : '#FFFFFF';\n }\n // invert color components\n const r1 = (255 - r).toString(16);\n const g1 = (255 - g).toString(16);\n const b1 = (255 - b).toString(16);\n // pad each with zeros and return\n return \"#\" + r1 + g1 + b1;\n }\n\n ngOnDestroy(): void {\n super.ngOnDestroy();\n }\n}\n","import { Component, OnDestroy, OnInit } from \"@angular/core\";\nimport { KlesFieldAbstract } from \"./field.abstract\";\n\n@Component({\n selector: \"kles-form-chip\",\n template: `\n <div [formGroup]=\"group\"> \n <mat-chip-list>\n <mat-chip [color]=\"field.color\" matTooltip=\"{{field.tooltip}}\" [attr.id]=\"field.id\" selected [ngClass]=\"field.ngClass\" [ngStyle]=\"field.ngStyle\">\n <mat-icon *ngIf=\"field.icon\">{{field.icon}}</mat-icon>\n {{group.controls[field.name].value | klesTransform:field.pipeTransform}}\n </mat-chip>\n </mat-chip-list>\n </div>\n`,\n styles: []\n})\nexport class KlesFormChipComponent extends KlesFieldAbstract implements OnInit, OnDestroy {\n ngOnInit() { super.ngOnInit(); }\n\n ngOnDestroy(): void {\n super.ngOnDestroy();\n }\n}\n","import { Component, OnDestroy, OnInit } from '@angular/core';\nimport { FormGroup } from '@angular/forms';\nimport { KlesFieldAbstract } from './field.abstract';\n@Component({\n selector: 'kles-group',\n template: `\n <div [formGroup]=\"group\" class=\"group-container\">\n <div [formGroupName]=\"field.name\" class=\"group-container\" [style.flex-direction]=\"field.direction || 'inherit'\" [ngClass]=\"field.ngClass\" >\n <ng-container *ngFor=\"let subfield of field.collections;\" klesDynamicField [field]=\"subfield\" [group]=\"subGroup\" [siblingFields]=\"field.collections\">\n </ng-container>\n </div>\n </div>\n`,\n styles: ['mat-form-field {width: calc(100%)}',\n ':host { display:flex; flex-direction: inherit}',\n '.group-container {display:flex; flex-direction: inherit}'\n ]\n})\nexport class KlesFormGroupComponent extends KlesFieldAbstract implements OnInit, OnDestroy {\n\n subGroup: FormGroup;\n\n ngOnInit() {\n this.subGroup = this.group.controls[this.field.name] as FormGroup;\n super.ngOnInit();\n }\n\n ngOnDestroy(): void {\n super.ngOnDestroy();\n }\n}\n","import { Component, OnDestroy, OnInit } from \"@angular/core\";\nimport { KlesFieldAbstract } from './field.abstract';\n\n@Component({\n selector: \"kles-form-icon\",\n template: `\n <mat-icon [color]=\"field.color\" matTooltip=\"{{field.tooltip}}\" [attr.id]=\"field.id\" [ngClass]=\"field.ngClass\" [ngStyle]=\"field.ngStyle\">\n {{group.controls[field.name].value}}\n </mat-icon>\n`,\n styles: []\n})\nexport class KlesFormIconComponent extends KlesFieldAbstract implements OnInit, OnDestroy {\n ngOnInit() { super.ngOnInit(); }\n ngOnDestroy(): void {\n super.ngOnDestroy();\n }\n}\n","import { CdkVirtualScrollViewport } from '@angular/cdk/scrolling';\nimport { Component, OnDestroy, OnInit, QueryList, ViewChild, ViewChildren } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport { MatOption } from '@angular/material/core';\nimport { Observable, of, ReplaySubject } from 'rxjs';\nimport { map, startWith, switchMap, take, takeUntil } from 'rxjs/operators';\nimport { KlesFieldAbstract } from './field.abstract';\n\n@Component({\n selector: 'kles-form-select-search',\n template: `\n <mat-form-field class=\"margin-top\" [formGroup]=\"group\">\n <mat-select matTooltip=\"{{field.tooltip}}\" [attr.id]=\"field.id\" [ngClass]=\"field.ngClass\"\n (openedChange)=\"openChange($event)\" [compareWith]=\"compareFn\"\n [placeholder]=\"field.placeholder | translate\" [formControlName]=\"field.name\" [multiple]=\"field.multiple\">\n <mat-select-trigger *ngIf=\"field.triggerComponent\">\n <ng-container klesComponent [component]=\"field.triggerComponent\" [value]=\"group.controls[field.name].value\" [field]=\"field\"></ng-container>\n </mat-select-trigger>\n\n <ng-container *ngIf=\"field.virtualScroll\">\n <mat-option>\n <ngx-mat-select-search [formControl]=\"searchControl\"\n placeholderLabel=\"\" noEntriesFoundLabel =\"\"></ngx-mat-select-search>\n </mat-option>\n \n <cdk-virtual-scroll-viewport [itemSize]=\"field.itemSize || 50\" [style.height.px]=4*48>\n <ng-container *ngIf=\"!field.autocompleteComponent\">\n <mat-checkbox *ngIf=\"field.multiple\" class=\"selectAll\" [formControl]=\"selectAllControl\"\n (change)=\"toggleAllSelection($event)\">\n {{'selectAll' | translate}}\n </mat-checkbox>\n <mat-option *cdkVirtualFor=\"let item of optionsFiltered$ | async\" [value]=\"item\">{{(field.property ? item[field.property] : item) | klesTransform:field.pipeTransform}}</mat-option>\n \n <ng-container *ngIf=\"field.multiple\">\n <mat-option *ngFor=\"let item of group.controls[field.name].value | slice:0:30\" [value]=\"item\"\n style=\"display:none\">\n {{(field.property ? item[field.property] : item) | klesTransform:field.pipeTransform}}\n </mat-option>\n </ng-container>\n\n <ng-container *ngIf=\"!field.multiple && group.controls[field.name].value\">\n <mat-option *ngFor=\"let item of [group?.controls[field.name]?.value]\" [value]=\"item\" style=\"display:none\">\n {{(field.property ? item[field.property] : item) | klesTransform:field.pipeTransform}}\n </mat-option>\n </ng-container>\n </ng-container>\n\n <ng-container *ngIf=\"field.autocompleteComponent\">\n <mat-option *cdkVirtualFor=\"let item of optionsFiltered$ | async\" [value]=\"item\">\n <ng-container klesComponent [component]=\"field.autocompleteComponent\" [value]=\"item\" [field]=\"field\"></ng-container>\n </mat-option>\n\n <ng-container *ngIf=\"field.multiple\">\n <mat-option *ngFor=\"let item of group.controls[field.name].value | slice:0:30\" [value]=\"item\"\n style=\"display:none\">\n <ng-container klesComponent [component]=\"field.autocompleteComponent\" [value]=\"item\" [field]=\"field\"></ng-container>\n </mat-option>\n </ng-container>\n\n <ng-container *ngIf=\"!field.multiple && group.controls[field.name].value\">\n <mat-option *ngFor=\"let item of [group?.controls[field.name]?.value]\" [value]=\"item\" style=\"display:none\">\n <ng-container klesComponent [component]=\"field.autocompleteComponent\" [value]=\"item\" [field]=\"field\"></ng-container>\n </mat-option>\n </ng-container>\n </ng-container>\n </cdk-virtual-scroll-viewport>\n\n </ng-container>\n\n <ng-container *ngIf=\"!field.virtualScroll\">\n \n <mat-option>\n <ngx-mat-select-search [formControl]=\"searchControl\"\n placeholderLabel=\"\" noEntriesFoundLabel =\"\"></ngx-mat-select-search>\n </mat-option>\n \n <mat-checkbox *ngIf=\"field.multiple\" class=\"selectAll\" [formControl]=\"selectAllControl\"\n (change)=\"toggleAllSelection($event)\">\n {{'selectAll' | translate}}\n </mat-checkbox>\n\n <ng-container *ngIf=\"!field.autocompleteComponent\">\n <mat-option *ngFor=\"let item of optionsFiltered$ | async\" [value]=\"item\">{{(field.property ? item[field.property] : item) | klesTransform:field.pipeTransform}}</mat-option>\n </ng-container>\n\n <ng-container *ngIf=\"field.autocompleteComponent\">\n <mat-option *ngFor=\"let item of optionsFiltered$ | async\" [value]=\"item\">\n <ng-container klesComponent [component]=\"field.autocompleteComponent\" [value]=\"item\" [field]=\"field\"></ng-container>\n </mat-option>\n </ng-container>\n </ng-container>\n\n\n </mat-select>\n <ng-container *ngFor=\"let validation of field.validations;\" ngProjectAs=\"mat-error\">\n <mat-error *ngIf=\"group.get(field.name).hasError(validation.name)\">{{validation.message | translate}}</mat-error>\n </ng-container>\n <ng-container *ngFor=\"let validation of field.asyncValidations;\" ngProjectAs=\"mat-error\">\n <mat-error *ngIf=\"group.get(field.name).hasError(validation.name)\">{{validation.message | translate}}</mat-error>\n </ng-container>\n </mat-form-field>\n`,\n styles: ['mat-form-field {width: calc(100%)}', '.selectAll {padding: 10px 16px;}']\n})\nexport class KlesFormSelectSearchComponent extends KlesFieldAbstract implements OnInit, OnDestroy {\n\n searchControl = new FormControl();\n selectAllControl = new FormControl(false);\n\n\n options$: Observable<any[]>;\n optionsFiltered$ = new ReplaySubject<any[]>(1);\n\n // private _onDestroy = new Subject<void>();\n\n @ViewChild(CdkVirtualScrollViewport) cdkVirtualScrollViewport: CdkVirtualScrollViewport;\n @ViewChildren(MatOption) options: QueryList<MatOption>;\n\n ngOnInit() {\n super.ngOnInit();\n\n if (!(this.field.options instanceof Observable)) {\n this.options$ = of(this.field.options);\n } else {\n this.options$ = this.field.options;\n }\n\n this.searchControl.valueChanges.pipe(\n startWith(this.searchControl.value),\n takeUntil(this._onDestroy),\n switchMap(value => {\n if (value) {\n const search = value.toLowerCase();\n return this.options$.pipe(map(options => {\n return options\n .filter(option => {\n if (this.field.searchKeys && this.field.searchKeys.length) {\n return this.field.searchKeys.some(searchKey => {\n if (option[searchKey]) {\n return option[searchKey].toString().toLowerCase().indexOf(search) > -1;\n }\n return false;\n }) || (this.field.property ?\n option[this.field.property].toString().toLowerCase().indexOf(search) > -1 : false);\n\n } else {\n if (this.field.property) {\n return option[this.field.property].toString().toLowerCase().indexOf(search) > -1;\n }\n }\n return option.toString().toLowerCase().indexOf(search) > -1;\n });\n }));\n } else {\n return this.options$;\n }\n })\n ).subscribe(this.optionsFiltered$);\n\n this.group.controls[this.field.name]\n .valueChanges.pipe(\n takeUntil(this._onDestroy),\n startWith(this.group.controls[this.field.name].value),\n switchMap(selected => {\n return this.optionsFiltered$.pipe(map(options => {\n if (!selected) {\n return false;\n }\n if (options.length < selected.length) {\n return options.length > 0 && options.every(o => selected.includes(o));\n } else {\n return options.length > 0 && options.length === selected.length && selected.every(s => options.includes(s));\n }\n }));\n })\n ).subscribe(isChecked => {\n this.selectAllControl.setValue(isChecked);\n });\n }\n\n ngOnDestroy(): void {\n // this._onDestroy.next();\n super.ngOnDestroy();\n }\n\n\n toggleAllSelection(state) {\n if (state.checked) {\n this.optionsFiltered$.pipe(take(1)).subscribe(options => {\n if (options.length > 0) {\n this.group.controls[this.field.name].patchValue(options.slice());\n }\n });\n\n } else {\n this.group.controls[this.field.name].patchValue([]);\n }\n }\n\n openChange($event: boolean) {\n if (this.field.virtualScroll) {\n if ($event) {\n this.cdkVirtualScrollViewport.scrollToIndex(0);\n this.cdkVirtualScrollViewport.checkViewportSize();\n }\n }\n }\n\n compareFn = (o1: any, o2: any) => {\n if (this.field.property && o1 && o2) {\n return o1[this.field.property] === o2[this.field.property];\n }\n return o1 === o2;\n }\n}\n","import { Component, OnDestroy, OnInit } from \"@angular/core\";\nimport { KlesFieldAbstract } from \"./field.abstract\";\n\n@Component({\n selector: \"kles-form-line-break\",\n template: ``,\n styles: [\n `:host{\n flex-basis: 100%;\n display: flex;\n height:0;\n }`\n ]\n})\nexport class KlesFormLineBreakComponent extends KlesFieldAbstract implements OnInit, OnDestroy {\n ngOnInit() { super.ngOnInit(); }\n ngOnDestroy(): void {\n super.ngOnDestroy();\n }\n}\n","import { Component, OnDestroy, OnInit } from \"@angular/core\";\nimport { KlesFieldAbstract } from \"./field.abstract\";\n\n@Component({\n selector: 'kles-form-link',\n template: `\n <a [href]=\"group.controls[field.name].value\" matTooltip=\"{{field.tooltip}}\" [attr.id]=\"field.id\" [ngClass]=\"field.ngClass\">\n {{field.label}}\n </a>\n`\n})\nexport class KlesFormLinkComponent extends KlesFieldAbstract implements OnInit, OnDestroy {\n\n ngOnInit() {\n super.ngOnInit();\n }\n\n ngOnDestroy(): void {\n super.ngOnDestroy();\n }\n}\n","import { SelectionModel } from '@angular/cdk/collections';\nimport { Component, OnDestroy, OnInit } from '@angular/core';\nimport { MatSelectionListChange } from '@angular/material/list';\nimport { Observable, of } from 'rxjs';\nimport { KlesFieldAbstract } from './field.abstract';\n\n@Component({\n selector: 'kles-form-selection-list',\n template: `\n <div class=\"margin-top\" [formGroup]=\"group\">\n <mat-selection-list [formControlName]=\"field.name\" [attr.id]=\"field.id\" [multiple]=\"field.multiple\" [ngClass]=\"field.ngClass\">\n <ng-container *ngIf=\"!field.autocompleteComponent\">\n <mat-list-option [value]=\"item\" *ngFor=\"let item of options$ | async;\">\n {{(field.property ? item[field.property] : item) | klesTransform:field.pipeTransform}}\n </mat-list-option>\n </ng-container>\n\n <ng-container *ngIf=\"field.autocompleteComponent\">\n <mat-list-option *ngFor=\"let item of options$ | async;\" [value]=\"item\">\n <ng-container klesComponent [component]=\"field.autocompleteComponent\" [value]=\"item\" [field]=\"field\"></ng-container>\n </mat-list-option>\n </ng-container>\n </mat-selection-list>\n </div>\n`,\n styles: ['mat-selection-list {width: calc(100%);height: 250px; overflow:auto}'],\n})\nexport class KlesFormSelectionListComponent extends KlesFieldAbstract implements OnInit, OnDestroy {\n\n options$: Observable<any[]>;\n\n ngOnInit() {\n super.ngOnInit();\n\n if (!(this.field.options instanceof Observable)) {\n this.options$ = of(this.field.options);\n } else {\n this.options$ = this.field.options;\n }\n }\n ngOnDestroy(): void {\n super.ngOnDestroy();\n }\n}\n","import { Component, OnDestroy, OnInit } from '@angular/core';\nimport { Observable, of } from 'rxjs';\nimport { KlesFieldAbstract } from './field.abstract';\n\n@Component({\n selector: 'kles-form-button-toogle-group',\n template: `\n <div [formGroup]=\"group\" class=\"form-element\">\n <mat-button-toggle-group [formControlName]=\"field.name\" [multiple]=\"field.multiple\"\n [attr.id]=\"field.id\" [ngClass]=\"field.ngClass\">\n <mat-button-toggle *ngFor=\"let item of options$ | async\" [value]=\"item\">\n {{(field.property ? item[field.property] : item) | klesTransform:field.pipeTransform}}\n </mat-button-toggle>\n </mat-button-toggle-group>\n </div>\n`\n})\nexport class KlesFormButtonToogleGroupComponent extends KlesFieldAbstract implements OnInit, OnDestroy {\n\n options$: Observable<any[]>;\n\n ngOnInit() {\n super.ngOnInit();\n\n if (!(this.field.options instanceof Observable)) {\n this.options$ = of(this.field.options);\n } else {\n this.options$ = this.field.options;\n }\n }\n ngOnDestroy(): void {\n super.ngOnDestroy();\n }\n}\n","import { Component, OnDestroy, OnInit } from '@angular/core';\nimport { FormArray, FormGroup } from '@angular/forms';\nimport { KlesFieldAbstract } from './field.abstract';\n@Component({\n selector: 'kles-array',\n template: `\n <div [formGroup]=\"group\">\n <ng-container [formArrayName]=\"field.name\">\n <div class=\"group-container\" *ngFor=\"let subGroup of formArray.controls let index = index;\"\n [ngClass]=\"field.direction === 'column' ? 'column': 'row'\">\n <ng-container *ngFor=\"let subfield of field.collections;\"\n klesDynamicField [field]=\"subfield\" [group]=\"subGroup\" [siblingFields]=\"field.collections\">\n </ng-container>\n </div>\n </ng-container>\n </div>\n`,\n styles: ['mat-form-field {width: calc(100%)}',\n ':host { display:flex; flex-direction: inherit}',\n '.group-container {display:flex; flex-direction: inherit}',\n '.row { gap:10px; flex-direction: row }',\n '.column { flex-direction: column, gap:0px}'\n ]\n})\nexport class KlesFormArrayComponent extends KlesFieldAbstract implements OnInit, OnDestroy {\n\n // subGroup: FormGroup\n\n formArray: FormArray;\n\n ngOnInit() {\n // this.subGroup = this.group.controls[this.field.name] as FormGroup;\n super.ngOnInit();\n this.formArray = this.group.controls[this.field.name] as FormArray;\n }\n\n ngOnDestroy(): void {\n super.ngOnDestroy();\n }\n}\n","import { Directive, Input, OnInit, ComponentFactoryResolver, ViewContainerRef, ComponentRef, Type, OnChanges, SimpleChanges, OnDestroy } from '@angular/core';\n\nimport { FormGroup } from '@angular/forms';\nimport { IKlesFieldConfig } from '../interfaces/field.config.interface';\nimport { KlesFormLabelComponent } from '../fields/label.component';\nimport { KlesFormInputComponent } from '../fields/input.component';\nimport { KlesFormSubmitButtonComponent } from '../fields/button-submit.component';\nimport { KlesFormSelectComponent } from '../fields/select.component';\nimport { KlesFormDateComponent } from '../fields/date.component';\nimport { KlesFormRadioComponent } from '../fields/radio.component';\nimport { KlesFormCheckboxComponent } from '../fields/checkbox.component';\nimport { KlesFormListFieldComponent } from '../fields/list-field.component';\nimport { KlesFormColorComponent } from '../fields/color.component';\nimport { KlesFormChipComponent } from '../fields/chip.component';\nimport { KlesFormGroupComponent } from '../fields/group.component';\nimport { KlesFormIconComponent } from '../fields/icon.component';\nimport { KlesFormSelectSearchComponent } from '../fields/select.search.component';\nimport { KlesFormLineBreakComponent } from '../fields/line-break.component';\nimport { KlesFormLinkComponent } from '../fields/link.component';\nimport { KlesFormSelectionListComponent } from '../fields/selection-list.component';\nimport { KlesFormButtonToogleGroupComponent } from '../fields/button-toogle-group.component';\nimport { KlesFormArrayComponent } from '../fields/array.component';\n\nconst componentMapper = {\n label: KlesFormLabelComponent,\n input: KlesFormInputComponent,\n button: KlesFormSubmitButtonComponent,\n select: KlesFormSelectComponent,\n date: KlesFormDateComponent,\n radio: KlesFormRadioComponent,\n checkbox: KlesFormCheckboxComponent,\n listField: KlesFormListFieldComponent,\n array: KlesFormArrayComponent,\n color: KlesFormColorComponent,\n chip: KlesFormChipComponent,\n group: KlesFormGroupComponent,\n icon: KlesFormIconComponent,\n selectSearch: KlesFormSelectSearchComponent,\n lineBreak: KlesFormLineBreakComponent,\n link: KlesFormLinkComponent,\n selectionList: KlesFormSelectionListComponent,\n buttonToogleGroup: KlesFormButtonToogleGroupComponent\n};\n\n@Directive({\n selector: '[klesDynamicField]'\n})\nexport class KlesDynamicFieldDirective implements OnInit, OnChanges, OnDestroy {\n @Input() field: IKlesFieldConfig;\n @Input() group: FormGroup;\n @Input() siblingFields: IKlesFieldConfig[];\n\n componentRef: ComponentRef<any>;\n\n constructor(protected resolver: ComponentFactoryResolver,\n protected container: ViewContainerRef) { }\n\n ngOnDestroy(): void {\n if (this.componentRef) this.componentRef.destroy();\n }\n\n ngOnInit() {\n this.buildComponent();\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes.group) {\n this.group = changes.group.currentValue;\n }\n if (changes.field) {\n // if (changes.field.previousValue && changes.field.currentValue.component !== changes.field.previousValue.component) {\n this.field = changes.field.currentValue;\n this.buildComponent();\n // } else {\n // this.field = changes.field.currentValue;\n // }\n }\n }\n\n buildComponent() {\n const factory = this.resolver.resolveComponentFactory(\n this.field.component || componentMapper[this.field.type]\n );\n if (this.componentRef) this.componentRef.destroy();\n this.componentRef = this.container.createComponent(factory);\n this.componentRef.instance.field = this.field;\n this.componentRef.instance.group = this.group;\n this.componentRef.instance.siblingFields = this.siblingFields;\n }\n}\n","import { FormControl, FormGroupDirective, NgForm } from '@angular/forms';\nimport { ErrorStateMatcher } from '@angular/material/core';\n\nexport class KlesFormErrorStateMatcher implements ErrorStateMatcher {\n\n constructor() {\n }\n\n isErrorState(control: FormControl | null, form: FormGroupDirective | NgForm | null): boolean {\n const isSubmitted = form && form.submitted;\n return !!(control && control.invalid && (control.dirty || control.touched || isSubmitted));\n }\n\n}\n\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { MatSliderModule } from '@angular/material/slider';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatToolbarModule } from '@angular/material/toolbar';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatSidenavModule } from '@angular/material/sidenav';\nimport { MatBadgeModule } from '@angular/material/badge';\nimport { MatListModule } from '@angular/material/list';\nimport { MatGridListModule } from '@angular/material/grid-list';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatDatepickerModule } from '@angular/material/datepicker';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatSelectModule } from '@angular/material/select';\nimport { MatRadioModule } from '@angular/material/radio';\nimport { MatChipsModule } from '@angular/material/chips';\nimport { MatTooltipModule } from '@angular/material/tooltip';\nimport { MatTableModule } from '@angular/material/table';\nimport { MatPaginatorModule } from '@angular/material/paginator';\nimport { MatCardModule } from '@angular/material/card';\nimport { MatMenuModule } from '@angular/material/menu';\nimport { CdkTableModule } from '@angular/cdk/table';\nimport { MatTabsModule } from '@angular/material/tabs';\nimport { MatProgressSpinnerModule } from '@angular/material/progress-spinner';\nimport { MatCheckboxModule } from '@angular/material/checkbox';\nimport { MatDialogModule } from '@angular/material/dialog';\nimport { MatAutocompleteModule } from '@angular/material/autocomplete';\nimport { MatProgressBarModule } from '@angular/material/progress-bar';\nimport { MatSortModule } from '@angular/material/sort';\nimport { MatExpansionModule } from '@angular/material/expansion';\nimport { MatNativeDateModule } from '@angular/material/core';\nimport { MatSnackBarModule } from '@angular/material/snack-bar';\nimport { MatTreeModule } from '@angular/material/tree';\nimport { MatSlideToggleModule } from '@angular/material/slide-toggle';\nimport { ColorPickerModule } from 'ngx-color-picker';\nimport { ScrollingModule } from '@angular/cdk/scrolling';\nimport { MatButtonToggleModule } from '@angular/material/button-toggle';\nimport { CdkScrollable } from '@angular/cdk/scrolling';\n\n\n@NgModule({\n imports: [\n CommonModule,\n MatSliderModule,\n MatButtonModule,\n MatToolbarModule,\n MatIconModule,\n MatSidenavModule,\n MatBadgeModule,\n MatListModule,\n MatGridListModule,\n MatFormFieldModule,\n MatInputModule,\n MatSelectModule,\n MatRadioModule,\n MatDatepickerModule,\n MatChipsModule,\n MatTooltipModule,\n MatTableModule,\n MatPaginatorModule,\n MatCardModule,\n MatMenuModule,\n MatTabsModule,\n CdkTableModule,\n MatProgressSpinnerModule,\n MatCheckboxModule,\n MatDialogModule,\n MatAutocompleteModule,\n MatProgressBarModule,\n MatSortModule,\n MatExpansionModule,\n MatNativeDateModule,\n MatSnackBarModule,\n MatTreeModule,\n MatSliderModule,\n MatButtonModule,\n MatSlideToggleModule,\n ColorPickerModule,\n MatButtonToggleModule\n ],\n\n exports: [\n MatButtonModule,\n MatToolbarModule,\n MatIconModule,\n MatSidenavModule,\n MatBadgeModule,\n MatListModule,\n MatGridListModule,\n MatInputModule,\n MatFormFieldModule,\n MatSelectModule,\n MatRadioModule,\n MatDatepickerModule,\n MatChipsModule,\n MatTooltipModule,\n MatTableModule,\n MatPaginatorModule,\n MatCardModule,\n MatMenuModule,\n MatTabsModule,\n CdkTableModule,\n MatProgressSpinnerModule,\n MatCheckboxModule,\n MatDialogModule,\n MatAutocompleteModule,\n MatProgressBarModule,\n MatSortModule,\n MatExpansionModule,\n MatNativeDateModule,\n MatSnackBarModule,\n MatTreeModule,\n MatSliderModule,\n MatButtonModule,\n MatSlideToggleModule,\n ColorPickerModule,\n ScrollingModule,\n CdkScrollable,\n MatButtonToggleModule\n ],\n providers: [\n MatDatepickerModule,\n MatDialogModule\n ]\n})\n\nexport class MaterialModule { }\n","import { Component, OnInit, forwardRef, Input } from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\n\nexport interface IButton {\n event?: any;\n uiButton?: IUIButton\n}\n\nexport interface IUIButton {\n label?: string;\n color?: string;\n icon?: string;\n iconSvg?: string;\n disabled?: boolean;\n class?: string\n}\n\n@Component({\n selector: 'kles-button',\n template: `\n <span>\n <button mat-button [ngClass]=\"classButton\" [color]=\"(color)?color:'primary'\" [disabled]=\"disabled\"\n (click)=\"click($event)\" [matTooltip]=\"tooltip\">\n {{label | translate}}\n <mat-icon *ngIf=\"icon\">{{icon}}</mat-icon>\n <mat-icon svgIcon=\"{{iconSvg}}\" *ngIf=\"iconSvg\"></mat-icon>\n </button>\n </span>\n `,\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => KlesButtonComponent),\n multi: true\n }\n ]\n})\nexport class KlesButtonComponent implements OnInit, ControlValueAccessor {\n @Input() name = '';\n @Input() label = '';\n @Input() color = 'accent';\n @Input() icon = '';\n @Input() iconSvg = '';\n @Input() disabled = false;\n @Input() classButton = '';\n @Input() value: IButton = {};\n @Input() tooltip?: string;\n\n onChange: any = () => { };\n onTouched: any = () => { };\n\n ngOnInit(): void {\n }\n\n click(event) {\n this.value.event = this.name;\n this.onChange(this.value);\n }\n\n writeValue(value: IButton): void {\n if (!value) {\n value = { event: this.name };\n }\n if (!value.event) {\n value.event = this.name;\n }\n if (value.uiButton) {\n const uiButton = value.uiButton;\n this.label = (uiButton.label) ? uiButton.label : this.label;\n this.color = (uiButton.color) ? uiButton.color : this.color;\n this.icon = (uiButton.icon) ? uiButton.icon : this.icon;\n this.iconSvg = (uiButton.iconSvg) ? uiButton.iconSvg : this.iconSvg;\n this.disabled = (uiButton.disabled) ? uiButton.disabled : this.disabled;\n this.classButton = (uiButton.class) ? uiButton.class : this.classButton;\n }\n this.value = value;\n }\n\n registerOnChange(fn: any): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: any): void {\n this.onTouched = fn;\n }\n\n setDisabledState?(isDisabled: boolean): void {\n this.disabled = isDisabled;\n }\n}","import { OnInit, Component, OnDestroy } from '@angular/core';\nimport { KlesFieldAbstract } from './field.abstract';\n\n\n@Component({\n selector: 'kles-form-button',\n template: `\n <div [formGroup]=\"group\">\n <kles-button\n [attr.id]=\"field.id\" [classButton]=\"field.ngClass\" \n [name]=\"field.name\" [label]=\"field.label\" [color]=\"field.color\" \n [icon]=\"field.icon\"\n [iconSvg]=\"field.iconSvg\"\n [value]=\"field.value\"\n [formControlName]=\"field.name\"\n [tooltip]=\"field.tooltip\">\n </kles-button>\n </div>\n `,\n styles: []\n})\nexport class KlesFormButtonComponent extends KlesFieldAbstract implements OnInit, OnDestroy {\n\n ngOnInit(): void {\n super.ngOnInit();\n }\n\n ngOnDestroy(): void {\n super.ngOnDestroy();\n }\n}\n","import { Component, OnInit, forwardRef } from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { IButton, KlesButtonComponent } from './button-control.component';\n\nexport interface IButtonChecker extends IButton {\n busy: boolean;\n error?: any[];\n message?: string;\n}\n\n@Component({\n selector: 'kles-button-checker',\n template: `\n <span *ngIf=\"value.error && !value.busy\">\n <kles-button \n [classButton]=\"classButton\" \n [name]=\"name\" [label]=\"label\" [color]=\"color\" \n [icon]=\"icon\" [iconSvg]=\"iconSvg\"\n [value]=\"value\" \n [tooltip]=\"tooltip\"\n [disabled]=\"disabled\"\n matBadge=\"{{countError()}}\" (click)=\"click($event)\">\n </kles-button>\n </span>\n <span style=\"text-align: center;\">\n <span style=\"text-align: center;margin-right: 10px\" *ngIf=\"value.busy||false\">\n <mat-spinner [diameter]=\"25\"></mat-spinner>\n </span>\n <span *ngIf=\"value.message\" style=\"margin-right: 10px\">\n {{value.message|translate}}\n </span>\n </span>\n `,\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => KlesButtonCheckerComponent),\n multi: true\n }\n ]\n})\nexport class KlesButtonCheckerComponent extends KlesButtonComponent implements ControlValueAccessor {\n value: IButtonChecker = {\n busy: false,\n error: [],\n event: false\n };\n\n countError(): number {\n return (this.value.error) ? this.value.error.length : 0;\n }\n}","import { OnInit, Component, OnDestroy } from '@angular/core';\nimport { KlesFieldAbstract } from './field.abstract';\n\n@Component({\n selector: 'kles-form-button-checker',\n template: `\n <div [formGroup]=\"group\">\n <kles-button-checker\n [attr.id]=\"field.id\" [classButton]=\"field.ngClass\"\n [name]=\"field.name\" [label]=\"field.label\" [color]=\"field.color\"\n [icon]=\"field.icon\"\n [iconSvg]=\"field.iconSvg\"\n [value]=\"field.value\"\n [formControlName]=\"field.name\"\n [tooltip]=\"field.tooltip\">\n </kles-button-checker>\n </div>\n `,\n styles: []\n})\nexport class KlesFormButtonCheckerComponent extends KlesFieldAbstract implements OnInit, OnDestroy {\n\n ngOnInit(): void {\n super.ngOnInit();\n }\n\n ngOnDestroy(): void {\n super.ngOnDestroy();\n }\n}\n","import { Component, OnInit, forwardRef, ViewChild } from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { IButton, KlesButtonComponent } from './button-control.component';\n\nexport interface IButtonFile extends IButton {\n fileContent?: string | string[];\n}\n\n@Component({\n selector: 'kles-button-file',\n template: `\n <input type=\"file\" #file style=\"display: none\" accept=\"{{accept}}\" (change)=\"onFileSelect($event.target)\" multiple />\n <kles-button \n [classButton]=\"classButton\" \n [name]=\"name\" [label]=\"label\" [color]=\"color\" \n [icon]=\"icon\" [iconSvg]=\"iconSvg\"\n [disabled]=\"disabled\"\n [value]=\"value\" (click)=\"click($event)\">\n </kles-button>\n `,\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => KlesButtonFileComponent),\n multi: true\n }\n ]\n})\nexport class KlesButtonFileComponent extends KlesButtonComponent implements ControlValueAccessor {\n @ViewChild('file') file;\n accept = '*.*';\n fileReader = new FileReader();\n fileContent: string | string[];\n value: IButtonFile = {};\n\n click(event) {\n this.file.nativeElement.click();\n }\n\n writeValue(value: IButton): void {\n if (!value) {\n value = { event: this.name };\n }\n if (!value.event) {\n value.event = this.name;\n }\n if (value.uiButton) {\n const uiButton = value.uiButton;\n this.label = (uiButton.label) ? uiButton.label : this.label;\n this.color = (uiButton.color) ? uiButton.color : this.color;\n this.icon = (uiButton.icon) ? uiButton.icon : this.icon;\n this.iconSvg = (uiButton.iconSvg) ? uiButton.iconSvg : this.iconSvg;\n this.disabled = (uiButton.disabled) ? uiButton.disabled : this.disabled;\n this.classButton = (uiButton.class) ? uiButton.class : this.classButton;\n }\n this.value = value;\n }\n\n\n onFileLoad(fileLoadedEvent) {\n const textFromFileLoaded = fileLoadedEvent.target.result;\n this.fileContent = textFromFileLoaded;\n }\n\n async onFileSelect(input: HTMLInputElement) {\n if (input.files.length > 0) {\n const files = input.files;\n let fileContent = [];\n if (files && files.length) {\n for (let i = 0; i < files.length; i++) {\n try {\n fileContent[i] = await this.readUploadedFile(files[i]);\n } catch (e) {\n }\n }\n if (fileContent.length === 1) {\n fileContent = fileContent[0];\n }\n }\n this.value.event = this.name;\n this.value.fileContent = fileContent;\n this.onChange(this.value);\n input.value = '';\n }\n }\n\n readUploadedFile(inputFile): Promise<any> {\n const temporaryFileReader = new FileReader();\n return new Promise((resolve, reject) => {\n temporaryFileReader.onerror = () => {\n temporaryFileReader.abort();\n const error: DOMException = new DOMException('Problem parsing input file.');\n reject(error);\n };\n temporaryFileReader.onload = () => {\n resolve(temporaryFileReader.result);\n };\n temporaryFileReader.readAsArrayBuffer(inputFile);\n });\n }\n}\n","import { OnInit, Component, OnDestroy } from '@angular/core';\nimport { KlesFieldAbstract } from './field.abstract';\n\n@Component({\n selector: 'kles-form-button-file',\n template: `\n <div [formGroup]=\"group\">\n <kles-button-file\n [attr.id]=\"field.id\" [classButton]=\"field.ngClass\" \n [name]=\"field.name\" [label]=\"field.label\" [color]=\"field.color\" \n [icon]=\"field.icon\"\n [iconSvg]=\"field.iconSvg\"\n [value]=\"field.value\"\n [formControlName]=\"field.name\">\n </kles-button-file>\n </div>\n `,\n styles: []\n})\nexport class KlesFormButtonFileComponent extends KlesFieldAbstract implements OnInit, OnDestroy {\n\n ngOnInit(): void {\n super.ngOnInit();\n }\n\n ngOnDestroy(): void {\n super.ngOnDestroy();\n }\n}\n","import { Component, OnDestroy, OnInit } from '@angular/core';\nimport { KlesFieldAbstract } from './field.abstract';\n\n@Component({\n selector: 'kles-form-textarea',\n template: `\n <mat-form-field [formGroup]=\"group\" class=\"form-element\">\n <textarea matInput matTooltip=\"{{field.tooltip}}\" [attr.id]=\"field.id\" [ngClass]=\"field.ngClass\" \n [formControlName]=\"field.name\" cdkTextareaAutosize [placeholder]=\"field.placeholder | translate\"\n [cdkAutosizeMinRows]=\"field.textareaAutoSize?.minRows\" [cdkAutosizeMaxRows]=\"field.textareaAutoSize?.maxRows\" [maxlength]=\"field.maxLength\">\n </textarea>\n\n\n <ng-container *ngFor=\"let validation of field.validations;\" ngProjectAs=\"mat-error\">\n <mat-error *ngIf=\"group.get(field.name).hasError(validation.name)\">{{validation.message | translate}}</mat-error>\n </ng-container>\n <ng-container *ngFor=\"let validation of field.asyncValidations;\" ngProjectAs=\"mat-error\">\n <mat-error *ngIf=\"group.get(field.name).hasError(validation.name)\">{{validation.message | translate}}</mat-error>\n </ng-container>\n </mat-form-field>\n `,\n styles: ['mat-form-field {width: calc(100%)}']\n})\nexport class KlesFormTextareaComponent extends KlesFieldAbstract implements OnInit, OnDestroy {\n ngOnInit(): void {\n super.ngOnInit();\n }\n\n ngOnDestroy(): void {\n super.ngOnDestroy();\n }\n}\n","import { Component, OnDestroy, OnInit } from \"@angular/core\";\nimport { KlesFieldAbstract } from \"./field.abstract\";\n\n@Component({\n selector: 'kles-form-text',\n template: `\n <span matTooltip=\"{{field.tooltip}}\" [attr.id]=\"field.id\" [ngClass]=\"field.ngClass\">\n {{(field.property ? group.controls[field.name].value[field.property] : group.controls[field.name].value) | klesTransform:field.pipeTransform}}\n </span> \n`\n})\nexport class KlesFormTextComponent extends KlesFieldAbstract implements OnInit, OnDestroy {\n\n ngOnInit() {\n super.ngOnInit();\n }\n ngOnDestroy(): void {\n super.ngOnDestroy();\n }\n}\n","import { OnInit, Component, OnDestroy } from '@angular/core';\nimport { KlesFormInputComponent } from './input.component';\n\n@Component({\n selector: 'kles-form-input-clearable',\n template: `\n <mat-form-field [formGroup]=\"group\" class=\"form-element\">\n\n <ng-container *ngIf=\"field.autocomplete; else notAutoComplete\">\n <input matInput matTooltip=\"{{field.tooltip}}\" [attr.id]=\"field.id\" [ngClass]=\"field.ngClass\" [formControlName]=\"field.name\" [placeholder]=\"field.placeholder | translate\" [type]=\"field.inputType\"\n [maxLength]=\"field.maxLength\" [min]=\"field.min\" [max]=\"field.max\" [step]=\"field.step\"\n [matAutocomplete]=\"auto\">\n\n <mat-autocomplete #auto=\"matAutocomplete\" [displayWith]=\"displayFn.bind(this)\" [panelWidth]=\"this.field.panelWidth\">\n <ng-container *ngIf=\"!field.autocompleteComponent\">\n <mat-option *ngFor=\"let option of filteredOption | async\" [value]=\"option\">\n {{field.property ? option[field.property] : option}}\n </mat-option>\n </ng-container>\n\n <ng-container *ngIf=\"field.autocompleteComponent\">\n <mat-option *ngFor=\"let option of filteredOption | async\" [value]=\"option\">\n <ng-container klesComponent [component]=\"field.autocompleteComponent\" [value]=\"option\" [field]=\"field\">\n </ng-container>\n </mat-option>\n </ng-container>\n </mat-autocomplete>\n </ng-container>\n\n <ng-template #notAutoComplete>\n <input matInput matTooltip=\"{{field.tooltip}}\" [attr.id]=\"field.id\" [ngClass]=\"field.ngClass\" [formControlName]=\"field.name\" [placeholder]=\"field.placeholder | translate\" [type]=\"field.inputType\"\n [maxLength]=\"field.maxLength\" [min]=\"field.min\" [max]=\"field.max\" [step]=\"field.step\">\n </ng-template>\n <button *ngIf=\"!group.get(field.name).disabled\" mat-button matSuffix mat-icon-button aria-label=\"Clear\" type=\"button\"\n (click)=\"group.controls[field.name].reset();\">\n <mat-icon>close</mat-icon>\n </button>\n\n <mat-spinner matSuffix mode=\"indeterminate\" *ngIf=\"isPending()\" diameter=\"17\"></mat-spinner>\n\n <ng-container *ngFor=\"let validation of field.validations;\" ngProjectAs=\"mat-error\">\n <mat-error *ngIf=\"group.get(field.name).hasError(validation.name)\">{{validation.message | translate}}</mat-error>\n </ng-container>\n <ng-container *ngFor=\"let validation of field.asyncValidations;\" ngProjectAs=\"mat-error\">\n <mat-error *ngIf=\"group.get(field.name).hasError(validation.name)\">{{validation.message | translate}}</mat-error>\n </ng-container>\n </mat-form-field>\n `,\n styles: ['mat-form-field {width: calc(100%)}']\n})\nexport class KlesFormInputClearableComponent extends KlesFormInputComponent implements OnInit, OnDestroy {\n\n ngOnDestroy(): void {\n super.ngOnDestroy();\n }\n}\n","import { Pipe, PipeTransform } from \"@angular/core\";\n\n@Pipe({ name: 'klesTransform' })\nexport class KlesTransformPipe implements PipeTransform {\n\n transform(value: any, pipes: { pipe: PipeTransform, options?: any[] }[]): any {\n\n if (pipes && pipes.length > 0) {\n return pipes.reduce((acc, p) => {\n if (p.options) {\n p.options.forEach(opt => {\n acc = p.pipe.transform(acc, opt);\n });\n } else {\n acc = p.pipe.transform(acc);\n }\n return acc;\n }, value)\n }\n return value;\n\n }\n}\n","import { Pipe, PipeTransform } from \"@angular/core\";\n\n@Pipe({ name: 'arrayFormat' })\nexport class ArrayFormatPipe implements PipeTransform {\n\n transform(values: any[], property?: string): string {\n if (values && Array.isArray(values)) {\n if (property) {\n return values.map(value => value[property]).filter(Boolean).join(', ');\n } else {\n return values.join(', ');\n }\n }\n return '';\n }\n}","\nimport { Component, OnDestroy, OnInit } from \"@angular/core\";\nimport { KlesFieldAbstract } from './field.abstract';\n\n\n@Component({\n selector: 'kles-form-slide-toggle',\n template: `\n <div [formGroup]=\"group\" >\n <mat-slide-toggle matTooltip=\"{{field.tooltip}}\" [attr.id]=\"field.id\" [ngClass]=\"field.ngClass\" [color]=\"field.color\" [formControlName]=\"field.name\">{{field.label | translate}}</mat-slide-toggle>\n <ng-container *ngFor=\"let validation of field.validations;\" ngProjectAs=\"mat-error\">\n <mat-error *ngIf=\"group.get(field.name).hasError(validation.name)\">{{validation.message}}</mat-error>\n </ng-container>\n <ng-container *ngFor=\"let validation of field.asyncValidations;\" ngProjectAs=\"mat-error\">\n <mat-error *ngIf=\"group.get(field.name).hasError(validation.name)\">{{validation.message}}</mat-error>\n </ng-container>\n </div>\n`,\n styles: []\n})\nexport class KlesFormSlideToggleComponent extends KlesFieldAbstract implements OnInit, OnDestroy {\n ngOnInit() { super.ngOnInit(); }\n ngOnDestroy(): void {\n super.ngOnDestroy();\n }\n}\n","import { Component, OnDestroy, OnInit } from '@angular/core';\nimport { KlesFieldAbstract } from './field.abstract';\n\n@Component({\n selector: 'kles-form-badge',\n template: `\n <span matTooltip=\"{{field.tooltip}}\" [attr.id]=\"field.id\" [ngClass]=\"field.ngClass\" \n matBadge=\"{{group.controls[field.name].value}}\" matBadgeOverlap=\"false\" matBadgeColor=\"{{field.color}}\">\n </span>\n`\n})\nexport class KlesFormBadgeComponent extends KlesFieldAbstract implements OnInit, OnDestroy {\n\n ngOnInit() {\n super.ngOnInit();\n }\n\n ngOnDestroy(): void {\n super.ngOnDestroy();\n }\n}\n","import { CUSTOM_ELEMENTS_SCHEMA, NgModule, NO_ERRORS_SCHEMA } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { KlesDynamicFormComponent } from './dynamic-form.component';\nimport { KlesComponentDirective } from './directive/dynamic-component.directive';\nimport { KlesDynamicFieldDirective } from './directive/dynamic-field.directive';\nimport { KlesFormErrorStateMatcher } from './matcher/form-error.matcher';\nimport { ErrorStateMatcher } from '@angular/material/core';\nimport { MaterialModule } from './modules/material.module';\nimport { FlexLayoutModule } from '@angular/flex-layout';\nimport { ColorPickerModule } from 'ngx-color-picker';\nimport { TranslateModule } from '@ngx-translate/core';\nimport { KlesFormLabelComponent } from './fields/label.component';\nimport { KlesFormInputComponent } from './fields/input.component';\nimport { KlesFormSubmitButtonComponent } from './fields/button-submit.component';\nimport { KlesFormSelectComponent } from './fields/select.component';\nimport { KlesFormDateComponent } from './fields/date.component';\nimport { KlesFormRadioComponent } from './fields/radio.component';\nimport { KlesFormCheckboxComponent } from './fields/checkbox.component';\nimport { KlesFormListFieldComponent } from './fields/list-field.component';\nimport { KlesFormColorComponent } from './fields/color.component';\nimport { KlesButtonComponent } from './forms/button-control.component';\nimport { KlesFormButtonComponent } from './fields/button-form.component';\nimport { KlesButtonCheckerComponent } from './forms/buttonchecker-control.component';\nimport { KlesFormButtonCheckerComponent } from './fields/buttonchecker-form.component';\nimport { KlesButtonFileComponent } from './forms/buttonfile-control.component';\nimport { KlesFormButtonFileComponent } from './fields/buttonfile-form.component';\nimport { KlesFormTextareaComponent } from './fields/textarea.component';\nimport { KlesFormTextComponent } from './fields/text.component';\nimport { KlesFormChipComponent } from './fields/chip.component';\nimport { KlesFormGroupComponent } from './fields/group.component';\nimport { KlesFormInputClearableComponent } from './fields/input.clearable.component';\nimport { KlesFormIconComponent } from './fields/icon.component';\nimport { KlesTransformPipe } from './pipe/transform.pipe';\nimport { NgxMatSelectSearchModule } from 'ngx-mat-select-search';\nimport { KlesFormSelectSearchComponent } from './fields/select.search.component';\nimport { KlesFormLineBreakComponent } from './fields/line-break.component';\nimport { ArrayFormatPipe } from './pipe/array.pipe';\nimport { KlesFormLinkComponent } from './fields/link.component';\nimport { KlesFormSlideToggleComponent } from './fields/slide-toggle.component';\nimport { KlesFormSelectionListComponent } from './fields/selection-list.component';\nimport { KlesFormBadgeComponent } from './fields/badge.component';\nimport { KlesFormButtonToogleGroupComponent } from './fields/button-toogle-group.component';\nimport { KlesFormArrayComponent } from './fields/array.component';\n\nconst components = [\n KlesDynamicFormComponent,\n KlesFormLabelComponent,\n KlesFormInputComponent,\n KlesFormInputClearableComponent,\n KlesFormSubmitButtonComponent,\n KlesFormBadgeComponent,\n KlesButtonComponent,\n KlesFormButtonComponent,\n KlesButtonCheckerComponent,\n KlesFormButtonCheckerComponent,\n KlesButtonFileComponent,\n KlesFormButtonFileComponent,\n KlesFormSelectComponent,\n KlesFormDateComponent,\n KlesFormRadioComponent,\n KlesFormCheckboxComponent,\n KlesFormListFieldComponent,\n KlesFormColorComponent,\n KlesFormTextareaComponent,\n KlesFormTextComponent,\n KlesFormChipComponent,\n KlesFormGroupComponent,\n KlesFormIconComponent,\n KlesFormSelectSearchComponent,\n KlesFormLineBreakComponent,\n KlesFormLinkComponent,\n KlesFormSlideToggleComponent,\n KlesFormSelectionListComponent,\n KlesFormButtonToogleGroupComponent,\n KlesFormArrayComponent\n];\n\nconst directives = [KlesDynamicFieldDirective, KlesComponentDirective];\nconst pipes = [KlesTransformPipe, ArrayFormatPipe];\n@NgModule({\n declarations: [\n components,\n directives,\n pipes\n\n ],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n TranslateModule,\n FlexLayoutModule,\n FormsModule,\n MaterialModule,\n ColorPickerModule,\n NgxMatSelectSearchModule\n ],\n providers: [\n { provide: ErrorStateMatcher, useClass: KlesFormErrorStateMatcher },\n pipes\n ],\n entryComponents: [\n components\n ],\n exports: [\n components,\n pipes,\n directives,\n ColorPickerModule\n ],\n schemas: [CUSTOM_ELEMENTS_SCHEMA, NO_ERRORS_SCHEMA]\n})\nexport class KlesMaterialDynamicformsModule { }\n","import { AbstractControl, ValidatorFn } from \"@angular/forms\"\n\nexport function autocompleteObjectValidator(optional?: boolean): ValidatorFn {\n return (control: AbstractControl): { [key: string]: any } | null => {\n if ((control.value === null || control.value === undefined) && !optional) return { 'invalidAutocompleteObject': { value: control.value } }\n\n if (typeof control.value === 'string') {\n if (control.value === '' && optional) return null;\n return { 'invalidAutocompleteObject': { value: control.value } }\n }\n return null /* valid option selected */\n }\n}\n\nexport function autocompleteStringValidator(validOptions: Array<string>, optional?: boolean): ValidatorFn {\n return (control: AbstractControl): { [key: string]: any } | null => {\n if ((control.value === '' || control.value === null) && optional) return null;\n if (validOptions.indexOf(control.value) !== -1) {\n return null /* valid option selected */\n }\n return { 'invalidAutocompleteString': { value: control.value } }\n }\n}","/*\n * Public API Surface of kles-material-dynamicforms\n */\n\nexport * from './lib/kles-material-dynamicforms.module';\n\n/**DIRECTIVE */\nexport * from './lib/directive/dynamic-field.directive';\nexport * from './lib/directive/dynamic-component.directive';\n\n/*FORMS*/\nexport * from './lib/forms/button-control.component';\nexport * from './lib/forms/buttonchecker-control.component';\nexport * from './lib/forms/buttonfile-control.component';\n\n/**FIELDS */\nexport * from './lib/fields/badge.component';\nexport * from './lib/fields/button-form.component';\nexport * from './lib/fields/buttonchecker-form.component';\nexport * from './lib/fields/buttonfile-form.component';\nexport * from './lib/fields/button-submit.component';\nexport * from './lib/fields/checkbox.component';\nexport * from './lib/fields/color.component';\nexport * from './lib/fields/date.component';\nexport * from './lib/fields/field.abstract';\nexport * from './lib/fields/input.component';\nexport * from './lib/fields/input.clearable.component';\nexport * from './lib/fields/label.component';\nexport * from './lib/fields/list-field.component';\nexport * from './lib/fields/radio.component';\nexport * from './lib/fields/select.component';\nexport * from './lib/fields/textarea.component';\nexport * from './lib/fields/text.component';\nexport * from './lib/fields/chip.component';\nexport * from './lib/fields/group.component';\nexport * from './lib/fields/icon.component';\nexport * from './lib/fields/select.search.component';\nexport * from './lib/fields/line-break.component';\nexport * from './lib/fields/link.component';\nexport * from './lib/fields/slide-toggle.component';\nexport * from './lib/fields/selection-list.component';\nexport * from './lib/fields/button-toogle-group.component';\nexport * from './lib/fields/array.component';\n\n/**ENUMS */\nexport * from './lib/enums/type.enum';\n\n/**INTERFACES */\nexport * from './lib/interfaces/component.interface';\nexport * from './lib/interfaces/field.interface';\nexport * from './lib/interfaces/field.config.interface';\nexport * from './lib/interfaces/validator.interface';\n\n/**MATCHER */\nexport * from './lib/matcher/form-error.matcher';\n\n/**VALIDATORS */\nexport * from './lib/validators/autocomplete.validator';\n\n/**FORM */\nexport * from './lib/dynamic-form.component';\n\n/**PIPES */\nexport * from './lib/pipe/array.pipe';\nexport * from './lib/pipe/transform.pipe';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n\nexport {MaterialModule as ɵa} from './lib/modules/material.module';"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAAY;AAAZ,WAAY,QAAQ;IAChB,yBAAa,CAAA;IACb,6BAAiB,CAAA;IACjB,iCAAqB,CAAA;IACrB,6BAAiB,CAAA;IACjB,yBAAa,CAAA;IACb,yBAAa,CAAA;IACb,2BAAe,CAAA;IACf,yBAAa,CAAA;IACb,2BAAe,CAAA;IACf,2BAAe,CAAA;IACf,2BAAe,CAAA;IACf,mCAAuB,CAAA;AAC3B,CAAC,EAbW,QAAQ,KAAR,QAAQ;;IC6BP,wBAAwB,GAArC,MAAa,wBAAwB;IAkBjC,YAAoB,EAAe;QAAf,OAAE,GAAF,EAAE,CAAa;QAjB1B,WAAM,GAAuB,EAAE,CAAC;QAChC,eAAU,GAAkC,EAAE,CAAC;QAC/C,oBAAe,GAAuC,EAAE,CAAC;;QAExD,WAAM,GAAsB,IAAI,YAAY,EAAO,CAAC;QACpD,cAAS,GAAG,IAAI,YAAY,EAAE,CAAC;QAEhC,cAAS,GAAqB,QAAQ,CAAC;QAG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AQ,EAAE;YACnC,IAAI,OAAO,CAAC,KAAK,KAAK,EAAE,IAAI,QAAQ;gBAAE,OAAO,IAAI,CAAC;YAClD,OAAO,EAAE,2BAA2B,EAAE,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,EAAE,EAAE,CAAA;SACnE;QACD,OAAO,IAAI,CAAA;KACd,CAAA;AACL,CAAC;SAEe,2BAA2B,CAAC,YAA2B,EAAE,QAAkB;IACvF,OAAO,CAAC,OAAwB;QAC5B,IAAI,CAAC,OAAO,CAAC,KAAK,KAAK,EAAE,IAAI,OAAO,CAAC,KAAK,KAAK,IAAI,KAAK,QAAQ;YAAE,OAAO,IAAI,CAAC;QAC9E,IAAI,YAAY,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE;YAC5C,OAAO,IAAI,CAAA;SACd;QACD,OAAO,EAAE,2BAA2B,EAAE,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,EAAE,EAAE,CAAA;KACnE,CAAA;AACL;;ACtBA;;;;ACAA;;;;;;"}
1
+ {"version":3,"file":"3kles-kles-material-dynamicforms.js","sources":["ng://@3kles/kles-material-dynamicforms/lib/enums/type.enum.ts","ng://@3kles/kles-material-dynamicforms/lib/dynamic-form.component.ts","ng://@3kles/kles-material-dynamicforms/lib/directive/dynamic-component.directive.ts","ng://@3kles/kles-material-dynamicforms/lib/fields/field.abstract.ts","ng://@3kles/kles-material-dynamicforms/lib/fields/label.component.ts","ng://@3kles/kles-material-dynamicforms/lib/fields/input.component.ts","ng://@3kles/kles-material-dynamicforms/lib/fields/button-submit.component.ts","ng://@3kles/kles-material-dynamicforms/lib/fields/select.component.ts","ng://@3kles/kles-material-dynamicforms/lib/fields/date.component.ts","ng://@3kles/kles-material-dynamicforms/lib/fields/radio.component.ts","ng://@3kles/kles-material-dynamicforms/lib/fields/checkbox.component.ts","ng://@3kles/kles-material-dynamicforms/lib/fields/list-field.component.ts","ng://@3kles/kles-material-dynamicforms/lib/fields/color.component.ts","ng://@3kles/kles-material-dynamicforms/lib/fields/chip.component.ts","ng://@3kles/kles-material-dynamicforms/lib/fields/group.component.ts","ng://@3kles/kles-material-dynamicforms/lib/fields/icon.component.ts","ng://@3kles/kles-material-dynamicforms/lib/fields/select.search.component.ts","ng://@3kles/kles-material-dynamicforms/lib/fields/line-break.component.ts","ng://@3kles/kles-material-dynamicforms/lib/fields/link.component.ts","ng://@3kles/kles-material-dynamicforms/lib/fields/selection-list.component.ts","ng://@3kles/kles-material-dynamicforms/lib/fields/button-toogle-group.component.ts","ng://@3kles/kles-material-dynamicforms/lib/fields/array.component.ts","ng://@3kles/kles-material-dynamicforms/lib/directive/dynamic-field.directive.ts","ng://@3kles/kles-material-dynamicforms/lib/matcher/form-error.matcher.ts","ng://@3kles/kles-material-dynamicforms/lib/modules/material.module.ts","ng://@3kles/kles-material-dynamicforms/lib/forms/button-control.component.ts","ng://@3kles/kles-material-dynamicforms/lib/fields/button-form.component.ts","ng://@3kles/kles-material-dynamicforms/lib/forms/buttonchecker-control.component.ts","ng://@3kles/kles-material-dynamicforms/lib/fields/buttonchecker-form.component.ts","ng://@3kles/kles-material-dynamicforms/lib/forms/buttonfile-control.component.ts","ng://@3kles/kles-material-dynamicforms/lib/fields/buttonfile-form.component.ts","ng://@3kles/kles-material-dynamicforms/lib/fields/textarea.component.ts","ng://@3kles/kles-material-dynamicforms/lib/fields/text.component.ts","ng://@3kles/kles-material-dynamicforms/lib/fields/input.clearable.component.ts","ng://@3kles/kles-material-dynamicforms/lib/pipe/transform.pipe.ts","ng://@3kles/kles-material-dynamicforms/lib/pipe/array.pipe.ts","ng://@3kles/kles-material-dynamicforms/lib/fields/slide-toggle.component.ts","ng://@3kles/kles-material-dynamicforms/lib/fields/badge.component.ts","ng://@3kles/kles-material-dynamicforms/lib/kles-material-dynamicforms.module.ts","ng://@3kles/kles-material-dynamicforms/lib/validators/autocomplete.validator.ts","ng://@3kles/kles-material-dynamicforms/public-api.ts","ng://@3kles/kles-material-dynamicforms/3kles-kles-material-dynamicforms.ts"],"sourcesContent":["export enum EnumType {\n text = 'text',\n button = 'button',\n checkbox = 'checkbox',\n number = 'number',\n time = 'time',\n date = 'date',\n color = 'color',\n list = 'list',\n multi = 'multi',\n array = 'array',\n group = 'group',\n lineBreak = 'lineBreak',\n}","import { OnInit, Component, Input, Output, EventEmitter, OnChanges, SimpleChanges } from '@angular/core';\nimport { FormGroup, FormBuilder, Validators, ValidatorFn, AsyncValidatorFn, AbstractControl } from '@angular/forms';\nimport { EnumType } from './enums/type.enum';\nimport { IKlesFieldConfig } from './interfaces/field.config.interface';\nimport { IKlesValidator } from './interfaces/validator.interface';\n\n@Component({\n exportAs: 'klesDynamicForm',\n selector: 'app-kles-dynamic-form',\n template: `\n <form class=\"{{orientationClass}}\" [formGroup]=\"form\" (submit)=\"onSubmit($event)\">\n <ng-container *ngFor=\"let field of fields;\" class=\"{{orientationItemClass}}\" klesDynamicField [field]=\"field\" [group]=\"form\" [siblingFields]=\"fields\">\n </ng-container>\n <!--<button (click)=\"reset()\" mat-raised-button color=\"primary\">RESET</button>-->\n </form>\n `,\n styles: [\n // '.dynamic-form {display: flex; flex-direction: column;}',\n //'.dynamic-form {display: flex;}',\n //'.dynamic-form { width: 100%; }',\n '.dynamic-form-column { display: flex;flex-direction: column; }',\n '.dynamic-form-column > * { width: 100%; }',\n '.dynamic-form-row { display: inline-flex;flex-wrap:wrap;gap:10px }',\n '.dynamic-form-row > * { width: 100%; }',\n '.dynamic-form-row-item { margin-right: 10px; }',\n '.dynamic-form-column-item { margin-bottom: 10px; }',\n ]\n\n})\nexport class KlesDynamicFormComponent implements OnInit, OnChanges {\n @Input() fields: IKlesFieldConfig[] = [];\n @Input() validators: IKlesValidator<ValidatorFn>[] = [];\n @Input() asyncValidators: IKlesValidator<AsyncValidatorFn>[] = [];\n // tslint:disable-next-line: no-output-native\n @Output() submit: EventEmitter<any> = new EventEmitter<any>();\n @Output() _onLoaded = new EventEmitter();\n\n @Input() direction: 'column' | 'row' = 'column';\n\n form: FormGroup;\n orientationClass: 'dynamic-form-column' | 'dynamic-form-row' = 'dynamic-form-column';\n orientationItemClass: 'dynamic-form-column-item' | 'dynamic-form-row-item' = 'dynamic-form-column-item';\n\n get value() {\n return this.form.value;\n }\n\n constructor(private fb: FormBuilder) { }\n\n\n ngOnInit() {\n this.form = this.createForm();\n this.orientationClass = this.direction === 'row' ? 'dynamic-form-row' : 'dynamic-form-column';\n this.orientationItemClass = this.direction === 'row' ? 'dynamic-form-row-item' : 'dynamic-form-column-item';\n this._onLoaded.emit();\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (!changes.fields?.firstChange) {\n this.updateForm();\n // this.form = this.createControl();\n // this.form.controls = {};\n this._onLoaded.emit();\n }\n\n if (!changes.validators?.firstChange && this.form) {\n this.form.setValidators(this.validators.map(v => v.validator));\n }\n\n if (!changes.asyncValidators?.firstChange && this.form) {\n this.form.setAsyncValidators(this.asyncValidators.map(v => v.validator));\n }\n\n if (!changes.direction?.firstChange) {\n this.orientationClass = this.direction === 'row' ? 'dynamic-form-row' : 'dynamic-form-column';\n this.orientationItemClass = this.direction === 'row' ? 'dynamic-form-row-item' : 'dynamic-form-column-item';\n }\n\n }\n\n onSubmit(event: Event) {\n event.preventDefault();\n event.stopPropagation();\n if (this.form.valid) {\n this.submit.emit(this.form.value);\n } else {\n this.validateAllFormFields(this.form);\n }\n }\n\n reset() {\n this.form.reset();\n }\n\n\n private updateForm() {\n Object.keys(this.form.controls).filter(key => {\n return !this.fields.map(field => field.name).includes(key);\n }).forEach(key => {\n this.form.removeControl(key);\n });\n\n\n this.fields\n .filter(field => !this.form.controls[field.name])\n .forEach(field => {\n if (field.type === EnumType.lineBreak) {\n return;\n }\n const control = this.createControl(field);\n this.form.addControl(field.name, control);\n });\n }\n\n private createControl(field: IKlesFieldConfig): AbstractControl {\n\n if (field.type === EnumType.array) {\n const array = this.fb.array([]);\n\n if (field.value && Array.isArray(field.value)) {\n if (field.collections && Array.isArray(field.collections)) {\n field.value.forEach(val => {\n const group = this.fb.group({});\n field.collections.forEach(subfield => {\n const data = val[subfield.name] || null;\n const control = this.createControl({ ...subfield, ...(data && { value: data }) });\n group.addControl(subfield.name, control);\n });\n array.push(group);\n });\n }\n } else {\n const group = this.fb.group({});\n field.collections.forEach(subfield => {\n const control = this.createControl({ ...subfield });\n group.addControl(subfield.name, control);\n });\n array.push(group);\n }\n\n // field.value.forEach((data: any) => {\n // const subGroup = this.fb.group({});\n // field.collections.forEach(subfield => {\n // const control = this.createControl(subfield);\n // subGroup.addControl(subfield.name, control);\n // });\n // array.push(subGroup);\n // });\n return array;\n } else if (field.type === EnumType.group) {\n const subGroup = this.fb.group({});\n if (field.collections && Array.isArray(field.collections)) {\n field.collections.forEach(subfield => {\n const control = this.createControl(subfield);\n subGroup.addControl(subfield.name, control);\n });\n }\n return subGroup;\n\n } else {\n const control = this.fb.control(\n field.value,\n {\n validators: this.bindValidations(field.validations || []),\n asyncValidators: this.bindAsyncValidations(field.asyncValidations || []),\n updateOn: field.updateOn || 'change'\n }\n );\n if (field.disabled) {\n control.disable();\n }\n return control;\n }\n }\n\n\n\n // private createControl(field: IKlesFieldConfig): AbstractControl {\n\n // if (field.type === 'listField') {\n // const array = this.fb.array([]);\n\n // field.value.forEach((data: any) => {\n // const subGroup = this.fb.group({});\n // field.collections.forEach(subfield => {\n // const control = this.fb.control(\n // data[subfield.name] ? data[subfield.name] : null,\n // this.bindValidations(subfield.validations || []),\n // this.bindAsyncValidations(subfield.asyncValidations || [])\n // );\n // subGroup.addControl(subfield.name, control);\n // });\n // array.push(subGroup);\n // });\n // return array;\n // } else if (field.type === 'group') {\n // const subGroup = this.fb.group({});\n // if (field.collections && Array.isArray(field.collections)) {\n // field.collections.forEach(subfield => {\n // const control = this.fb.control(\n // subfield.value,\n // this.bindValidations(subfield.validations || []),\n // this.bindAsyncValidations(subfield.asyncValidations || [])\n // );\n // if (subfield.disabled) {\n // control.disable();\n // }\n // subGroup.addControl(subfield.name, control);\n // });\n // }\n // return subGroup;\n\n // } else {\n // const control = this.fb.control(\n // field.value,\n // this.bindValidations(field.validations || []),\n // this.bindAsyncValidations(field.asyncValidations || [])\n // );\n // if (field.disabled) {\n // control.disable();\n // }\n // return control;\n // }\n // }\n\n\n\n private createForm() {\n const group = this.fb.group({});\n\n this.fields.forEach(field => {\n\n if (field.type === EnumType.lineBreak) {\n return;\n }\n const control = this.createControl(field);\n\n group.addControl(field.name, control);\n });\n\n group.setValidators(this.validators.map(v => v.validator));\n group.setAsyncValidators(this.asyncValidators.map(v => v.validator));\n\n return group;\n }\n\n\n private bindValidations(validations: IKlesValidator<ValidatorFn>[]): ValidatorFn {\n if (validations.length > 0) {\n const validList = [];\n validations.forEach(valid => {\n validList.push(valid.validator);\n });\n return Validators.compose(validList);\n\n }\n return null;\n }\n\n\n private bindAsyncValidations(validations: IKlesValidator<AsyncValidatorFn>[]): AsyncValidatorFn {\n if (validations.length > 0) {\n const validList = [];\n validations.forEach(valid => {\n validList.push(valid.validator);\n });\n return Validators.composeAsync(validList);\n\n }\n return null;\n }\n\n private validateAllFormFields(formGroup: FormGroup) {\n Object.keys(formGroup.controls).forEach(field => {\n const control = formGroup.get(field);\n control.markAsTouched({ onlySelf: true });\n });\n }\n}\n","import { Directive, Input, OnInit, ComponentFactoryResolver, ViewContainerRef, ComponentRef, Type, OnChanges, SimpleChanges } from '@angular/core';\nimport { IKlesFieldConfig } from '../interfaces/field.config.interface';\n\n\n@Directive({\n selector: '[klesComponent]'\n})\nexport class KlesComponentDirective implements OnInit, OnChanges {\n @Input() component: Type<any>;\n @Input() value: any;\n @Input() field?: IKlesFieldConfig;\n\n componentRef: ComponentRef<any>;\n\n constructor(private resolver: ComponentFactoryResolver,\n private container: ViewContainerRef) { }\n\n ngOnInit() {\n this.buildComponent();\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes.component && !changes.component.isFirstChange()) {\n this.component = changes.component.currentValue;\n this.buildComponent();\n }\n if (changes.value && !changes.value.isFirstChange()) {\n this.value = changes.value.currentValue;\n this.componentRef.instance.value = this.value;\n }\n }\n\n buildComponent() {\n const factory = this.resolver.resolveComponentFactory(\n this.component\n );\n if (this.componentRef) this.componentRef.destroy();\n this.componentRef = this.container.createComponent(factory);\n this.componentRef.instance.component = this.component;\n this.componentRef.instance.value = this.value;\n this.componentRef.instance.field = this.field;\n }\n}\n","import { IKlesField } from '../interfaces/field.interface';\nimport { IKlesFieldConfig } from '../interfaces/field.config.interface';\nimport { FormGroup } from '@angular/forms';\nimport { AfterViewInit, OnDestroy, OnInit } from '@angular/core';\nimport { Subject } from 'rxjs';\nimport { takeUntil } from 'rxjs/operators';\n\nexport abstract class KlesFieldAbstract implements IKlesField, OnInit, AfterViewInit, OnDestroy {\n field: IKlesFieldConfig;\n group: FormGroup;\n siblingFields: IKlesFieldConfig[];\n\n protected _onDestroy = new Subject<void>();\n\n ngOnInit(): void {\n // this.applyPipeTransform();\n if (this.field.valueChanges) {\n this.field.valueChanges(this.field, this.group, this.siblingFields);\n }\n\n this.group.controls[this.field.name]?.valueChanges\n .pipe(takeUntil(this._onDestroy))\n .subscribe(val => {\n if (this.field.valueChanges) {\n this.field.valueChanges(this.field, this.group, this.siblingFields, val);\n }\n // this.applyPipeTransform();\n });\n }\n\n ngAfterViewInit(): void {\n\n }\n\n ngOnDestroy(): void {\n this._onDestroy.next();\n this._onDestroy.complete();\n }\n\n applyPipeTransform() {\n if (this.group && this.field) {\n const control = this.group.controls[this.field.name];\n if (control) {\n const val = this.group.controls[this.field.name].value;\n if (this.field.pipeTransform) {\n this.field.pipeTransform.forEach(p => {\n let pipeVal = control.value;\n if (p.options) {\n p.options.forEach(opt => {\n pipeVal = p.pipe.transform(val, opt);\n });\n } else {\n pipeVal = p.pipe.transform(val);\n }\n control.patchValue(pipeVal, { onlySelf: true, emitEvent: false });\n });\n }\n }\n }\n }\n}\n","\nimport { Component, OnDestroy, OnInit } from \"@angular/core\";\nimport { KlesFieldAbstract } from './field.abstract';\n\n\n@Component({\n selector: \"kles-form-label\",\n template: `\n <div [formGroup]=\"group\" >\n <input matInput matTooltip=\"{{field.tooltip}}\" [attr.id]=\"field.id\" \n [ngClass]=\"field.ngClass\" \n [ngStyle]=\"{'color':'inherit'}\" [formControlName]=\"field.name\" [placeholder]=\"field.placeholder | translate\" [type]=\"field.inputType\">\n </div>\n`\n})\nexport class KlesFormLabelComponent extends KlesFieldAbstract implements OnInit, OnDestroy {\n\n ngOnInit() {\n this.group.controls[this.field.name].disable();\n super.ngOnInit();\n }\n\n ngOnDestroy(): void {\n super.ngOnDestroy();\n }\n}","import { KlesFieldAbstract } from './field.abstract';\nimport { OnInit, Component, OnDestroy } from '@angular/core';\nimport { Observable, of } from 'rxjs';\nimport { startWith, map, switchMap } from 'rxjs/operators';\n\n@Component({\n selector: 'kles-form-input',\n template: `\n <mat-form-field [formGroup]=\"group\" class=\"form-element\">\n\n <ng-container *ngIf=\"field.autocomplete; else notAutoComplete\">\n <input matInput matTooltip=\"{{field.tooltip}}\" [attr.id]=\"field.id\" [ngClass]=\"field.ngClass\" [formControlName]=\"field.name\" [placeholder]=\"field.placeholder | translate\" [type]=\"field.inputType\" \n [maxLength]=\"field.maxLength\" [min]=\"field.min\" [max]=\"field.max\" [step]=\"field.step\"\n [matAutocomplete]=\"auto\">\n\n <mat-autocomplete #auto=\"matAutocomplete\" [displayWith]=\"displayFn.bind(this)\" [panelWidth]=\"this.field.panelWidth\">\n <ng-container *ngIf=\"!field.autocompleteComponent\">\n <mat-option *ngFor=\"let option of filteredOption | async\" [value]=\"option\">\n {{field.property ? option[field.property] : option}}\n </mat-option>\n </ng-container>\n\n <ng-container *ngIf=\"field.autocompleteComponent\">\n <mat-option *ngFor=\"let option of filteredOption | async\" [value]=\"option\">\n <ng-container klesComponent [component]=\"field.autocompleteComponent\" [value]=\"option\" [field]=\"field\">\n </ng-container>\n </mat-option>\n </ng-container>\n </mat-autocomplete>\n </ng-container>\n\n <ng-template #notAutoComplete>\n <input matInput matTooltip=\"{{field.tooltip}}\" [attr.id]=\"field.id\" [ngClass]=\"field.ngClass\" [formControlName]=\"field.name\" [placeholder]=\"field.placeholder | translate\" [type]=\"field.inputType\"\n [maxLength]=\"field.maxLength\" [min]=\"field.min\" [max]=\"field.max\" [step]=\"field.step\">\n </ng-template>\n\n <mat-spinner matSuffix mode=\"indeterminate\" *ngIf=\"isPending()\" diameter=\"17\"></mat-spinner>\n\n <ng-container *ngFor=\"let validation of field.validations;\" ngProjectAs=\"mat-error\">\n <mat-error *ngIf=\"group.get(field.name).hasError(validation.name)\">{{validation.message | translate}}</mat-error>\n </ng-container>\n <ng-container *ngFor=\"let validation of field.asyncValidations;\" ngProjectAs=\"mat-error\">\n <mat-error *ngIf=\"group.get(field.name).hasError(validation.name)\">{{validation.message | translate}}</mat-error>\n </ng-container>\n </mat-form-field>\n `,\n styles: ['mat-form-field {width: calc(100%)}']\n})\nexport class KlesFormInputComponent extends KlesFieldAbstract implements OnInit, OnDestroy {\n\n filteredOption: Observable<any[]>;\n options$: Observable<any[]>;\n\n ngOnInit(): void {\n\n if (this.field.options instanceof Observable) {\n this.options$ = this.field.options;\n } else {\n this.options$ = of(this.field.options);\n }\n\n\n this.filteredOption = this.group.get(this.field.name).valueChanges\n .pipe(\n startWith(''),\n // map(data => data ? this.filterData(data) : this.field.options.slice())\n switchMap(data => data ? this.filterData(data) : this.options$)\n );\n if (!this.field.maxLength) {\n this.field.maxLength = 524288; // Max default input W3C\n }\n super.ngOnInit();\n }\n\n isPending() {\n return (this.group.controls[this.field.name].pending || this.field.pending);\n }\n\n private filterData(value: any): Observable<any[]> {\n let filterValue;\n\n if (typeof value === 'string' && Object.prototype.toString.call(value) === '[object String]') {\n filterValue = value.toLowerCase();\n } else {\n filterValue = value[this.field.property].toLowerCase();\n }\n\n if (this.field.property) {\n return this.options$\n .pipe(map(options => options.filter(option => option[this.field.property].toLowerCase().indexOf(filterValue) === 0)));\n // return this.field.options\n // .filter(data => data[this.field.property].toLowerCase().indexOf(filterValue) === 0);\n }\n // return this.field.options.filter(data => data.toLowerCase().indexOf(filterValue) === 0);\n return this.options$.pipe(map(options => options.filter(option => option.toLowerCase().indexOf(filterValue) === 0)));\n }\n\n displayFn(value: any) {\n if (this.field.displayWith) {\n return this.field.displayWith(value);\n } else {\n if (value && this.field && this.field.property) {\n return value[this.field.property] ? value[this.field.property] : '';\n }\n return value ? value : '';\n }\n }\n\n ngOnDestroy(): void {\n super.ngOnDestroy();\n }\n}\n","import { KlesFieldAbstract } from './field.abstract';\nimport { OnInit, Component, OnDestroy } from '@angular/core';\n\n\n@Component({\n selector: 'kles-submit-button',\n template: `\n <div [formGroup]=\"group\">\n <button matTooltip=\"{{field.tooltip}}\" [attr.id]=\"field.id\" [ngClass]=\"field.ngClass\" type=\"submit\" [disabled]=\"field.disabled\" mat-raised-button color=\"primary\">{{field.label}}</button>\n </div>\n `,\n styles: []\n})\nexport class KlesFormSubmitButtonComponent extends KlesFieldAbstract implements OnInit, OnDestroy {\n\n ngOnInit(): void {\n super.ngOnInit();\n }\n\n ngOnDestroy(): void {\n super.ngOnDestroy();\n }\n}\n","import { CdkVirtualScrollViewport, ScrollDispatcher } from '@angular/cdk/scrolling';\nimport { AfterViewInit, ChangeDetectorRef, Component, OnDestroy, OnInit, QueryList, ViewChild, ViewChildren } from '@angular/core';\nimport { MatOption } from '@angular/material/core';\nimport { Observable, of } from 'rxjs';\nimport { filter } from 'rxjs/operators';\nimport { KlesFieldAbstract } from './field.abstract';\n\n@Component({\n selector: 'kles-form-select',\n template: `\n <mat-form-field class=\"margin-top\" [formGroup]=\"group\">\n <mat-select matTooltip=\"{{field.tooltip}}\" [attr.id]=\"field.id\"\n (openedChange)=\"openChange($event)\" [compareWith]=\"compareFn\"\n [ngClass]=\"field.ngClass\" [placeholder]=\"field.placeholder | translate\" [formControlName]=\"field.name\" [multiple]=\"field.multiple\">\n <mat-select-trigger *ngIf=\"field.triggerComponent\">\n <ng-container klesComponent [component]=\"field.triggerComponent\" [value]=\"group.controls[field.name].value\" [field]=\"field\"></ng-container>\n </mat-select-trigger>\n\n\n <ng-container *ngIf=\"!field.virtualScroll\">\n <ng-container *ngIf=\"!field.autocompleteComponent\">\n <mat-option *ngFor=\"let item of options$ | async\" [value]=\"item\" [disabled]=\"item?.disabled\">{{(field.property ? item[field.property] : item) | klesTransform:field.pipeTransform}}</mat-option>\n </ng-container>\n\n <ng-container *ngIf=\"field.autocompleteComponent\">\n <mat-option *ngFor=\"let item of options$ | async\" [value]=\"item\" [disabled]=\"item?.disabled\">\n <ng-container klesComponent [component]=\"field.autocompleteComponent\" [value]=\"item\" [field]=\"field\"></ng-container>\n </mat-option>\n </ng-container>\n </ng-container>\n\n <ng-container *ngIf=\"field.virtualScroll\">\n <cdk-virtual-scroll-viewport [itemSize]=\"field.itemSize || 50\" [style.height.px]=5*48>\n <ng-container *ngIf=\"!field.autocompleteComponent\">\n <mat-option *cdkVirtualFor=\"let item of options$ | async\" [value]=\"item\" [disabled]=\"item?.disabled\">\n {{(field.property ? item[field.property] : item) | klesTransform:field.pipeTransform}}\n </mat-option>\n\n <ng-container *ngIf=\"field.multiple\">\n <mat-option *ngFor=\"let item of group.controls[field.name].value | slice:0:30\" [value]=\"item\"\n style=\"display:none\">\n {{(field.property ? item[field.property] : item) | klesTransform:field.pipeTransform}}\n </mat-option>\n </ng-container>\n\n <ng-container *ngIf=\"!field.multiple && group.controls[field.name].value\">\n <mat-option *ngFor=\"let item of [group?.controls[field.name]?.value]\" [value]=\"item\" style=\"display:none\">\n {{(field.property ? item[field.property] : item) | klesTransform:field.pipeTransform}}\n </mat-option>\n </ng-container>\n </ng-container>\n\n <ng-container *ngIf=\"field.autocompleteComponent\">\n <mat-option *cdkVirtualFor=\"let item of options$ | async\" [value]=\"item\" [disabled]=\"item?.disabled\">\n <ng-container klesComponent [component]=\"field.autocompleteComponent\" [value]=\"item\" [field]=\"field\"></ng-container>\n </mat-option>\n <ng-container *ngIf=\"field.multiple\">\n <mat-option *ngFor=\"let item of group.controls[field.name].value | slice:0:30\" [value]=\"item\"\n style=\"display:none\">\n <ng-container klesComponent [component]=\"field.autocompleteComponent\" [value]=\"item\" [field]=\"field\"></ng-container>\n </mat-option>\n </ng-container>\n <ng-container *ngIf=\"!field.multiple && group.controls[field.name].value\">\n <mat-option *ngFor=\"let item of [group?.controls[field.name]?.value]\" [value]=\"item\" style=\"display:none\">\n <ng-container klesComponent [component]=\"field.autocompleteComponent\" [value]=\"item\" [field]=\"field\"></ng-container>\n </mat-option>\n </ng-container>\n </ng-container>\n </cdk-virtual-scroll-viewport>\n\n </ng-container>\n\n </mat-select>\n <ng-container *ngFor=\"let validation of field.validations;\" ngProjectAs=\"mat-error\">\n <mat-error *ngIf=\"group.get(field.name).hasError(validation.name)\">{{validation.message | translate}}</mat-error>\n </ng-container>\n <ng-container *ngFor=\"let validation of field.asyncValidations;\" ngProjectAs=\"mat-error\">\n <mat-error *ngIf=\"group.get(field.name).hasError(validation.name)\">{{validation.message | translate}}</mat-error>\n </ng-container>\n </mat-form-field>\n`,\n styles: ['mat-form-field {width: calc(100%)}']\n})\nexport class KlesFormSelectComponent extends KlesFieldAbstract implements OnInit, OnDestroy {\n\n @ViewChild(CdkVirtualScrollViewport) cdkVirtualScrollViewport: CdkVirtualScrollViewport;\n @ViewChildren(MatOption) options: QueryList<MatOption>;\n\n options$: Observable<any[]>;\n\n constructor() {\n super();\n }\n\n ngOnInit() {\n super.ngOnInit();\n\n if (!(this.field.options instanceof Observable)) {\n this.options$ = of(this.field.options);\n } else {\n this.options$ = this.field.options;\n }\n }\n\n ngOnDestroy(): void {\n super.ngOnDestroy();\n }\n\n openChange($event: boolean) {\n if (this.field.virtualScroll) {\n if ($event) {\n this.cdkVirtualScrollViewport.scrollToIndex(0);\n this.cdkVirtualScrollViewport.checkViewportSize();\n }\n }\n }\n\n compareFn = (o1: any, o2: any) => {\n if (this.field.property && o1 && o2) {\n return o1[this.field.property] === o2[this.field.property];\n }\n return o1 === o2;\n }\n}\n","import { Component, OnDestroy, OnInit } from \"@angular/core\";\nimport { KlesFieldAbstract } from './field.abstract';\n\n@Component({\n selector: \"kles-form-datepicker\",\n template: `\n <mat-form-field class=\"demo-full-width margin-top\" [formGroup]=\"group\">\n <input matInput matTooltip=\"{{field.tooltip}}\" [attr.id]=\"field.id\" [ngClass]=\"field.ngClass\" [matDatepicker]=\"picker\" [formControlName]=\"field.name\" [placeholder]=\"field.placeholder | translate\">\n <mat-datepicker-toggle matSuffix [for]=\"picker\"></mat-datepicker-toggle>\n <mat-datepicker #picker></mat-datepicker>\n <mat-hint></mat-hint>\n \n <ng-container *ngFor=\"let validation of field.validations;\" ngProjectAs=\"mat-error\">\n <mat-error *ngIf=\"group.get(field.name).hasError(validation.name)\">{{validation.message | translate}}</mat-error>\n </ng-container>\n <ng-container *ngFor=\"let validation of field.asyncValidations;\" ngProjectAs=\"mat-error\">\n <mat-error *ngIf=\"group.get(field.name).hasError(validation.name)\">{{validation.message | translate}}</mat-error>\n </ng-container>\n </mat-form-field>\n `,\n styles: []\n})\nexport class KlesFormDateComponent extends KlesFieldAbstract implements OnInit, OnDestroy {\n ngOnInit() { super.ngOnInit(); }\n\n ngOnDestroy(): void {\n super.ngOnDestroy();\n }\n}\n","import { Component, OnDestroy, OnInit } from '@angular/core';\nimport { KlesFieldAbstract } from './field.abstract';\n\n@Component({\n selector: 'kles-form-radiobutton',\n template: `\n <div [formGroup]=\"group\">\n <label class=\"radio-label-padding\">{{field.label}}</label>\n <mat-radio-group matTooltip=\"{{field.tooltip}}\" [attr.id]=\"field.id\" [ngClass]=\"field.ngClass\" [formControlName]=\"field.name\">\n <mat-radio-button *ngFor=\"let item of field.options\" [value]=\"item\">{{item}}</mat-radio-button>\n </mat-radio-group>\n <ng-container *ngFor=\"let validation of field.validations;\" ngProjectAs=\"mat-error\">\n <mat-error *ngIf=\"group.get(field.name).hasError(validation.name)\">{{validation.message | translate}}</mat-error>\n </ng-container>\n <ng-container *ngFor=\"let validation of field.asyncValidations;\" ngProjectAs=\"mat-error\">\n <mat-error *ngIf=\"group.get(field.name).hasError(validation.name)\">{{validation.message | translate}}</mat-error>\n </ng-container>\n </div>\n`,\n styles: []\n})\nexport class KlesFormRadioComponent extends KlesFieldAbstract implements OnInit, OnDestroy {\n\n ngOnInit() { super.ngOnInit(); }\n\n ngOnDestroy(): void {\n super.ngOnDestroy();\n }\n}","\nimport { Component, OnDestroy, OnInit } from \"@angular/core\";\nimport { FormGroup } from \"@angular/forms\";\nimport { IKlesFieldConfig } from '../interfaces/field.config.interface';\nimport { KlesFieldAbstract } from './field.abstract';\n\n\n@Component({\n selector: \"kles-form-checkbox\",\n template: `\n <div [formGroup]=\"group\" > \n <mat-checkbox matTooltip=\"{{field.tooltip}}\" [attr.id]=\"field.id\" [ngClass]=\"field.ngClass\" [indeterminate]=\"field.indeterminate\" [formControlName]=\"field.name\">{{field.label | translate}}</mat-checkbox>\n <ng-container *ngFor=\"let validation of field.validations;\" ngProjectAs=\"mat-error\">\n <mat-error *ngIf=\"group.get(field.name).hasError(validation.name)\">{{validation.message}}</mat-error>\n </ng-container>\n <ng-container *ngFor=\"let validation of field.asyncValidations;\" ngProjectAs=\"mat-error\">\n <mat-error *ngIf=\"group.get(field.name).hasError(validation.name)\">{{validation.message}}</mat-error>\n </ng-container>\n </div>\n`,\n styles: []\n})\nexport class KlesFormCheckboxComponent extends KlesFieldAbstract implements OnInit, OnDestroy {\n ngOnInit() { super.ngOnInit(); }\n\n ngOnDestroy(): void {\n super.ngOnDestroy();\n }\n}\n","import { Component, OnDestroy, OnInit } from '@angular/core';\nimport { KlesFieldAbstract } from './field.abstract';\nimport { FormGroup, FormArray, FormBuilder, ValidatorFn, Validators, AsyncValidatorFn } from '@angular/forms';\nimport { IKlesValidator } from '../interfaces/validator.interface';\n\n@Component({\n selector: 'kles-form-listfield',\n template: `\n <div [formGroup]=\"group\" class=\"form-element\">\n {{field.label | translate}}\n <button mat-icon-button color=\"primary\" (click)=\"addField()\">\n <mat-icon>add</mat-icon>\n </button>\n\n <div class=\"dynamic-form\" [formGroupName]=\"field.name\">\n <div *ngFor=\"let subGroup of formArray.controls let index = index;\" fxLayout=\"row\" fxLayoutGap=\"5px\">\n <ng-container *ngFor=\"let subfield of field.collections;\"\n dynamicField [field]=\"subfield\" [group]=\"subGroup\">\n </ng-container>\n <button mat-icon-button (click)=\"deleteField(index)\" color=\"primary\">\n <mat-icon>delete_outlined</mat-icon>\n </button>\n </div>\n <ng-container *ngFor=\"let validation of field.validations;\" ngProjectAs=\"mat-error\">\n <mat-error *ngIf=\"group.get(field.name).hasError(validation.name)\">{{validation.message | translate}}</mat-error>\n </ng-container>\n <ng-container *ngFor=\"let validation of field.asyncValidations;\" ngProjectAs=\"mat-error\">\n <mat-error *ngIf=\"group.get(field.name).hasError(validation.name)\">{{validation.message | translate}}</mat-error>\n </ng-container>\n </div>\n </div>\n `,\n styles: []\n})\nexport class KlesFormListFieldComponent extends KlesFieldAbstract implements OnInit, OnDestroy {\n\n formArray: FormArray;\n\n constructor(private fb: FormBuilder) {\n super();\n }\n\n ngOnInit(): void {\n this.formArray = this.group.controls[this.field.name] as FormArray;\n super.ngOnInit();\n }\n\n private createFormGroup(): FormGroup {\n const group = this.fb.group({});\n this.field.collections.forEach(item => {\n const control = this.fb.control(\n null,\n this.bindValidations(item.validations || []),\n this.bindAsyncValidations(item.asyncValidations || [])\n );\n group.addControl(item.name, control);\n\n });\n\n return group;\n\n }\n\n deleteField(index: number) {\n this.formArray.removeAt(index);\n }\n\n addField() {\n this.formArray.push(this.createFormGroup());\n }\n\n\n private bindValidations(validations: IKlesValidator<ValidatorFn>[]): ValidatorFn {\n if (validations.length > 0) {\n const validList = [];\n validations.forEach(valid => {\n validList.push(valid.validator);\n });\n return Validators.compose(validList);\n\n }\n return null;\n }\n\n\n private bindAsyncValidations(validations: IKlesValidator<AsyncValidatorFn>[]): AsyncValidatorFn {\n if (validations.length > 0) {\n const validList = [];\n validations.forEach(valid => {\n validList.push(valid.validator);\n });\n return Validators.composeAsync(validList);\n\n }\n return null;\n }\n\n ngOnDestroy(): void {\n super.ngOnDestroy();\n }\n}\n\n","import { KlesFieldAbstract } from './field.abstract';\nimport { OnInit, Component, OnDestroy } from '@angular/core';\n@Component({\n selector: 'kles-form-color',\n template: `\n <mat-form-field [formGroup]=\"group\" class=\"form-element\">\n <input matInput matTooltip=\"{{field.tooltip}}\" [attr.id]=\"field.id\" [ngClass]=\"field.ngClass\" [placeholder]=\"field.placeholder | translate\"\n [colorPicker]=\"group.get(field.name).value\"\n [value]=\"group.get(field.name).value\"\n (colorPickerChange)=\"group.get(field.name).setValue($event)\"\n class=\"colorPicker\"\n [style.background]=\"group.get(field.name).value\"\n [style.color]=\"invertColor(group.get(field.name).value,true)\"\n [formControlName]=\"field.name\">\n <ng-container *ngFor=\"let validation of field.validations;\" ngProjectAs=\"mat-error\">\n <mat-error *ngIf=\"group.get(field.name).hasError(validation.name)\">{{validation.message | translate}}</mat-error>\n </ng-container>\n <ng-container *ngFor=\"let validation of field.asyncValidations;\" ngProjectAs=\"mat-error\">\n <mat-error *ngIf=\"group.get(field.name).hasError(validation.name)\">{{validation.message | translate}}</mat-error>\n </ng-container>\n </mat-form-field>\n `,\n styles: ['mat-form-field {width: calc(100%)}']\n})\nexport class KlesFormColorComponent extends KlesFieldAbstract implements OnInit, OnDestroy {\n\n\n ngOnInit() { super.ngOnInit(); }\n\n invertColor(hex, bw): string {\n if (hex.indexOf('#') === 0) {\n hex = hex.slice(1);\n }\n // convert 3-digit hex to 6-digits.\n if (hex.length === 3) {\n hex = hex[0] + hex[0] + hex[1] + hex[1] + hex[2] + hex[2];\n }\n if (hex.length !== 6) {\n return '#000000';\n }\n let r = parseInt(hex.slice(0, 2), 16);\n let g = parseInt(hex.slice(2, 4), 16);\n let b = parseInt(hex.slice(4, 6), 16);\n if (bw) {\n return (r * 0.299 + g * 0.587 + b * 0.114) > 186\n ? '#000000'\n : '#FFFFFF';\n }\n // invert color components\n const r1 = (255 - r).toString(16);\n const g1 = (255 - g).toString(16);\n const b1 = (255 - b).toString(16);\n // pad each with zeros and return\n return \"#\" + r1 + g1 + b1;\n }\n\n ngOnDestroy(): void {\n super.ngOnDestroy();\n }\n}\n","import { Component, OnDestroy, OnInit } from \"@angular/core\";\nimport { KlesFieldAbstract } from \"./field.abstract\";\n\n@Component({\n selector: \"kles-form-chip\",\n template: `\n <div [formGroup]=\"group\"> \n <mat-chip-list>\n <mat-chip [color]=\"field.color\" matTooltip=\"{{field.tooltip}}\" [attr.id]=\"field.id\" selected [ngClass]=\"field.ngClass\" [ngStyle]=\"field.ngStyle\">\n <mat-icon *ngIf=\"field.icon\">{{field.icon}}</mat-icon>\n {{group.controls[field.name].value | klesTransform:field.pipeTransform}}\n </mat-chip>\n </mat-chip-list>\n </div>\n`,\n styles: []\n})\nexport class KlesFormChipComponent extends KlesFieldAbstract implements OnInit, OnDestroy {\n ngOnInit() { super.ngOnInit(); }\n\n ngOnDestroy(): void {\n super.ngOnDestroy();\n }\n}\n","import { Component, OnDestroy, OnInit } from '@angular/core';\nimport { FormGroup } from '@angular/forms';\nimport { KlesFieldAbstract } from './field.abstract';\n@Component({\n selector: 'kles-group',\n template: `\n <div [formGroup]=\"group\" class=\"group-container\">\n <div [formGroupName]=\"field.name\" class=\"group-container\" [style.flex-direction]=\"field.direction || 'inherit'\" [ngClass]=\"field.ngClass\" >\n <ng-container *ngFor=\"let subfield of field.collections;\" klesDynamicField [field]=\"subfield\" [group]=\"subGroup\" [siblingFields]=\"field.collections\">\n </ng-container>\n </div>\n </div>\n`,\n styles: ['mat-form-field {width: calc(100%)}',\n ':host { display:flex; flex-direction: inherit}',\n '.group-container {display:flex; flex-direction: inherit}'\n ]\n})\nexport class KlesFormGroupComponent extends KlesFieldAbstract implements OnInit, OnDestroy {\n\n subGroup: FormGroup;\n\n ngOnInit() {\n this.subGroup = this.group.controls[this.field.name] as FormGroup;\n super.ngOnInit();\n }\n\n ngOnDestroy(): void {\n super.ngOnDestroy();\n }\n}\n","import { Component, OnDestroy, OnInit } from \"@angular/core\";\nimport { KlesFieldAbstract } from './field.abstract';\n\n@Component({\n selector: \"kles-form-icon\",\n template: `\n <mat-icon [color]=\"field.color\" matTooltip=\"{{field.tooltip}}\" [attr.id]=\"field.id\" [ngClass]=\"field.ngClass\" [ngStyle]=\"field.ngStyle\">\n {{group.controls[field.name].value}}\n </mat-icon>\n`,\n styles: []\n})\nexport class KlesFormIconComponent extends KlesFieldAbstract implements OnInit, OnDestroy {\n ngOnInit() { super.ngOnInit(); }\n ngOnDestroy(): void {\n super.ngOnDestroy();\n }\n}\n","import { CdkVirtualScrollViewport } from '@angular/cdk/scrolling';\nimport { Component, OnDestroy, OnInit, QueryList, ViewChild, ViewChildren } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport { MatOption } from '@angular/material/core';\nimport { Observable, of, ReplaySubject } from 'rxjs';\nimport { map, startWith, switchMap, take, takeUntil } from 'rxjs/operators';\nimport { KlesFieldAbstract } from './field.abstract';\n\n@Component({\n selector: 'kles-form-select-search',\n template: `\n <mat-form-field class=\"margin-top\" [formGroup]=\"group\">\n <mat-select matTooltip=\"{{field.tooltip}}\" [attr.id]=\"field.id\" [ngClass]=\"field.ngClass\"\n (openedChange)=\"openChange($event)\" [compareWith]=\"compareFn\"\n [placeholder]=\"field.placeholder | translate\" [formControlName]=\"field.name\" [multiple]=\"field.multiple\">\n <mat-select-trigger *ngIf=\"field.triggerComponent\">\n <ng-container klesComponent [component]=\"field.triggerComponent\" [value]=\"group.controls[field.name].value\" [field]=\"field\"></ng-container>\n </mat-select-trigger>\n\n <ng-container *ngIf=\"field.virtualScroll\">\n <mat-option>\n <ngx-mat-select-search [formControl]=\"searchControl\"\n placeholderLabel=\"\" noEntriesFoundLabel =\"\"></ngx-mat-select-search>\n </mat-option>\n \n <cdk-virtual-scroll-viewport [itemSize]=\"field.itemSize || 50\" [style.height.px]=4*48>\n <ng-container *ngIf=\"!field.autocompleteComponent\">\n <mat-checkbox *ngIf=\"field.multiple\" class=\"selectAll\" [formControl]=\"selectAllControl\"\n (change)=\"toggleAllSelection($event)\">\n {{'selectAll' | translate}}\n </mat-checkbox>\n <mat-option *cdkVirtualFor=\"let item of optionsFiltered$ | async\" [value]=\"item\" [disabled]=\"item?.disabled\">{{(field.property ? item[field.property] : item) | klesTransform:field.pipeTransform}}</mat-option>\n \n <ng-container *ngIf=\"field.multiple\">\n <mat-option *ngFor=\"let item of group.controls[field.name].value | slice:0:30\" [value]=\"item\"\n style=\"display:none\">\n {{(field.property ? item[field.property] : item) | klesTransform:field.pipeTransform}}\n </mat-option>\n </ng-container>\n\n <ng-container *ngIf=\"!field.multiple && group.controls[field.name].value\">\n <mat-option *ngFor=\"let item of [group?.controls[field.name]?.value]\" [value]=\"item\" style=\"display:none\">\n {{(field.property ? item[field.property] : item) | klesTransform:field.pipeTransform}}\n </mat-option>\n </ng-container>\n </ng-container>\n\n <ng-container *ngIf=\"field.autocompleteComponent\">\n <mat-option *cdkVirtualFor=\"let item of optionsFiltered$ | async\" [value]=\"item\" [disabled]=\"item?.disabled\">\n <ng-container klesComponent [component]=\"field.autocompleteComponent\" [value]=\"item\" [field]=\"field\"></ng-container>\n </mat-option>\n\n <ng-container *ngIf=\"field.multiple\">\n <mat-option *ngFor=\"let item of group.controls[field.name].value | slice:0:30\" [value]=\"item\"\n style=\"display:none\">\n <ng-container klesComponent [component]=\"field.autocompleteComponent\" [value]=\"item\" [field]=\"field\"></ng-container>\n </mat-option>\n </ng-container>\n\n <ng-container *ngIf=\"!field.multiple && group.controls[field.name].value\">\n <mat-option *ngFor=\"let item of [group?.controls[field.name]?.value]\" [value]=\"item\" style=\"display:none\">\n <ng-container klesComponent [component]=\"field.autocompleteComponent\" [value]=\"item\" [field]=\"field\"></ng-container>\n </mat-option>\n </ng-container>\n </ng-container>\n </cdk-virtual-scroll-viewport>\n\n </ng-container>\n\n <ng-container *ngIf=\"!field.virtualScroll\">\n \n <mat-option>\n <ngx-mat-select-search [formControl]=\"searchControl\"\n placeholderLabel=\"\" noEntriesFoundLabel =\"\"></ngx-mat-select-search>\n </mat-option>\n \n <mat-checkbox *ngIf=\"field.multiple\" class=\"selectAll\" [formControl]=\"selectAllControl\"\n (change)=\"toggleAllSelection($event)\">\n {{'selectAll' | translate}}\n </mat-checkbox>\n\n <ng-container *ngIf=\"!field.autocompleteComponent\">\n <mat-option *ngFor=\"let item of optionsFiltered$ | async\" [value]=\"item\" [disabled]=\"item?.disabled\">{{(field.property ? item[field.property] : item) | klesTransform:field.pipeTransform}}</mat-option>\n </ng-container>\n\n <ng-container *ngIf=\"field.autocompleteComponent\">\n <mat-option *ngFor=\"let item of optionsFiltered$ | async\" [value]=\"item\" [disabled]=\"item?.disabled\">\n <ng-container klesComponent [component]=\"field.autocompleteComponent\" [value]=\"item\" [field]=\"field\"></ng-container>\n </mat-option>\n </ng-container>\n </ng-container>\n\n\n </mat-select>\n <ng-container *ngFor=\"let validation of field.validations;\" ngProjectAs=\"mat-error\">\n <mat-error *ngIf=\"group.get(field.name).hasError(validation.name)\">{{validation.message | translate}}</mat-error>\n </ng-container>\n <ng-container *ngFor=\"let validation of field.asyncValidations;\" ngProjectAs=\"mat-error\">\n <mat-error *ngIf=\"group.get(field.name).hasError(validation.name)\">{{validation.message | translate}}</mat-error>\n </ng-container>\n </mat-form-field>\n`,\n styles: ['mat-form-field {width: calc(100%)}', '.selectAll {padding: 10px 16px;}']\n})\nexport class KlesFormSelectSearchComponent extends KlesFieldAbstract implements OnInit, OnDestroy {\n\n searchControl = new FormControl();\n selectAllControl = new FormControl(false);\n\n\n options$: Observable<any[]>;\n optionsFiltered$ = new ReplaySubject<any[]>(1);\n\n // private _onDestroy = new Subject<void>();\n\n @ViewChild(CdkVirtualScrollViewport) cdkVirtualScrollViewport: CdkVirtualScrollViewport;\n @ViewChildren(MatOption) options: QueryList<MatOption>;\n\n ngOnInit() {\n super.ngOnInit();\n\n if (!(this.field.options instanceof Observable)) {\n this.options$ = of(this.field.options);\n } else {\n this.options$ = this.field.options;\n }\n\n this.searchControl.valueChanges.pipe(\n startWith(this.searchControl.value),\n takeUntil(this._onDestroy),\n switchMap(value => {\n if (value) {\n const search = value.toLowerCase();\n return this.options$.pipe(map(options => {\n return options\n .filter(option => {\n if (this.field.searchKeys && this.field.searchKeys.length) {\n return this.field.searchKeys.some(searchKey => {\n if (option[searchKey]) {\n return option[searchKey].toString().toLowerCase().indexOf(search) > -1;\n }\n return false;\n }) || (this.field.property ?\n option[this.field.property].toString().toLowerCase().indexOf(search) > -1 : false);\n\n } else {\n if (this.field.property) {\n return option[this.field.property].toString().toLowerCase().indexOf(search) > -1;\n }\n }\n return option.toString().toLowerCase().indexOf(search) > -1;\n });\n }));\n } else {\n return this.options$;\n }\n })\n ).subscribe(this.optionsFiltered$);\n\n this.group.controls[this.field.name]\n .valueChanges.pipe(\n takeUntil(this._onDestroy),\n startWith(this.group.controls[this.field.name].value),\n switchMap(selected => {\n return this.optionsFiltered$.pipe(\n map((options) => options.filter((option) => !option?.disabled)),\n map(options => {\n if (!selected) {\n return false;\n }\n if (options.length < selected.length) {\n return options.length > 0 && options.every(o => selected.includes(o));\n } else {\n return options.length > 0 && options.length === selected.length && selected.every(s => options.includes(s));\n }\n }));\n })\n ).subscribe(isChecked => {\n this.selectAllControl.setValue(isChecked);\n });\n }\n\n ngOnDestroy(): void {\n // this._onDestroy.next();\n super.ngOnDestroy();\n }\n\n\n toggleAllSelection(state) {\n if (state.checked) {\n this.optionsFiltered$.pipe(take(1), map((options) => options.filter((option) => !option?.disabled))).subscribe(options => {\n if (options.length > 0) {\n this.group.controls[this.field.name].patchValue(options.slice());\n }\n });\n\n } else {\n this.group.controls[this.field.name].patchValue([]);\n }\n }\n\n openChange($event: boolean) {\n if (this.field.virtualScroll) {\n if ($event) {\n this.cdkVirtualScrollViewport.scrollToIndex(0);\n this.cdkVirtualScrollViewport.checkViewportSize();\n }\n }\n }\n\n compareFn = (o1: any, o2: any) => {\n if (this.field.property && o1 && o2) {\n return o1[this.field.property] === o2[this.field.property];\n }\n return o1 === o2;\n }\n}\n","import { Component, OnDestroy, OnInit } from \"@angular/core\";\nimport { KlesFieldAbstract } from \"./field.abstract\";\n\n@Component({\n selector: \"kles-form-line-break\",\n template: ``,\n styles: [\n `:host{\n flex-basis: 100%;\n display: flex;\n height:0;\n }`\n ]\n})\nexport class KlesFormLineBreakComponent extends KlesFieldAbstract implements OnInit, OnDestroy {\n ngOnInit() { super.ngOnInit(); }\n ngOnDestroy(): void {\n super.ngOnDestroy();\n }\n}\n","import { Component, OnDestroy, OnInit } from \"@angular/core\";\nimport { KlesFieldAbstract } from \"./field.abstract\";\n\n@Component({\n selector: 'kles-form-link',\n template: `\n <a [href]=\"group.controls[field.name].value\" matTooltip=\"{{field.tooltip}}\" [attr.id]=\"field.id\" [ngClass]=\"field.ngClass\">\n {{field.label}}\n </a>\n`\n})\nexport class KlesFormLinkComponent extends KlesFieldAbstract implements OnInit, OnDestroy {\n\n ngOnInit() {\n super.ngOnInit();\n }\n\n ngOnDestroy(): void {\n super.ngOnDestroy();\n }\n}\n","import { SelectionModel } from '@angular/cdk/collections';\nimport { Component, OnDestroy, OnInit } from '@angular/core';\nimport { MatSelectionListChange } from '@angular/material/list';\nimport { Observable, of } from 'rxjs';\nimport { KlesFieldAbstract } from './field.abstract';\n\n@Component({\n selector: 'kles-form-selection-list',\n template: `\n <div class=\"margin-top\" [formGroup]=\"group\">\n <mat-selection-list [formControlName]=\"field.name\" [attr.id]=\"field.id\" [multiple]=\"field.multiple\" [ngClass]=\"field.ngClass\">\n <ng-container *ngIf=\"!field.autocompleteComponent\">\n <mat-list-option [value]=\"item\" *ngFor=\"let item of options$ | async;\">\n {{(field.property ? item[field.property] : item) | klesTransform:field.pipeTransform}}\n </mat-list-option>\n </ng-container>\n\n <ng-container *ngIf=\"field.autocompleteComponent\">\n <mat-list-option *ngFor=\"let item of options$ | async;\" [value]=\"item\">\n <ng-container klesComponent [component]=\"field.autocompleteComponent\" [value]=\"item\" [field]=\"field\"></ng-container>\n </mat-list-option>\n </ng-container>\n </mat-selection-list>\n </div>\n`,\n styles: ['mat-selection-list {width: calc(100%);height: 250px; overflow:auto}'],\n})\nexport class KlesFormSelectionListComponent extends KlesFieldAbstract implements OnInit, OnDestroy {\n\n options$: Observable<any[]>;\n\n ngOnInit() {\n super.ngOnInit();\n\n if (!(this.field.options instanceof Observable)) {\n this.options$ = of(this.field.options);\n } else {\n this.options$ = this.field.options;\n }\n }\n ngOnDestroy(): void {\n super.ngOnDestroy();\n }\n}\n","import { Component, OnDestroy, OnInit } from '@angular/core';\nimport { Observable, of } from 'rxjs';\nimport { KlesFieldAbstract } from './field.abstract';\n\n@Component({\n selector: 'kles-form-button-toogle-group',\n template: `\n <div [formGroup]=\"group\" class=\"form-element\">\n <mat-button-toggle-group [formControlName]=\"field.name\" [multiple]=\"field.multiple\"\n [attr.id]=\"field.id\" [ngClass]=\"field.ngClass\">\n <mat-button-toggle *ngFor=\"let item of options$ | async\" [value]=\"item\">\n {{(field.property ? item[field.property] : item) | klesTransform:field.pipeTransform}}\n </mat-button-toggle>\n </mat-button-toggle-group>\n </div>\n`\n})\nexport class KlesFormButtonToogleGroupComponent extends KlesFieldAbstract implements OnInit, OnDestroy {\n\n options$: Observable<any[]>;\n\n ngOnInit() {\n super.ngOnInit();\n\n if (!(this.field.options instanceof Observable)) {\n this.options$ = of(this.field.options);\n } else {\n this.options$ = this.field.options;\n }\n }\n ngOnDestroy(): void {\n super.ngOnDestroy();\n }\n}\n","import { Component, OnDestroy, OnInit } from '@angular/core';\nimport { FormArray, FormGroup } from '@angular/forms';\nimport { KlesFieldAbstract } from './field.abstract';\n@Component({\n selector: 'kles-array',\n template: `\n <div [formGroup]=\"group\">\n <ng-container [formArrayName]=\"field.name\">\n <div class=\"group-container\" *ngFor=\"let subGroup of formArray.controls let index = index;\"\n [ngClass]=\"field.direction === 'column' ? 'column': 'row'\">\n <ng-container *ngFor=\"let subfield of field.collections;\"\n klesDynamicField [field]=\"subfield\" [group]=\"subGroup\" [siblingFields]=\"field.collections\">\n </ng-container>\n </div>\n </ng-container>\n </div>\n`,\n styles: ['mat-form-field {width: calc(100%)}',\n ':host { display:flex; flex-direction: inherit}',\n '.group-container {display:flex; flex-direction: inherit}',\n '.row { gap:10px; flex-direction: row }',\n '.column { flex-direction: column, gap:0px}'\n ]\n})\nexport class KlesFormArrayComponent extends KlesFieldAbstract implements OnInit, OnDestroy {\n\n // subGroup: FormGroup\n\n formArray: FormArray;\n\n ngOnInit() {\n // this.subGroup = this.group.controls[this.field.name] as FormGroup;\n super.ngOnInit();\n this.formArray = this.group.controls[this.field.name] as FormArray;\n }\n\n ngOnDestroy(): void {\n super.ngOnDestroy();\n }\n}\n","import { Directive, Input, OnInit, ComponentFactoryResolver, ViewContainerRef, ComponentRef, Type, OnChanges, SimpleChanges, OnDestroy } from '@angular/core';\n\nimport { FormGroup } from '@angular/forms';\nimport { IKlesFieldConfig } from '../interfaces/field.config.interface';\nimport { KlesFormLabelComponent } from '../fields/label.component';\nimport { KlesFormInputComponent } from '../fields/input.component';\nimport { KlesFormSubmitButtonComponent } from '../fields/button-submit.component';\nimport { KlesFormSelectComponent } from '../fields/select.component';\nimport { KlesFormDateComponent } from '../fields/date.component';\nimport { KlesFormRadioComponent } from '../fields/radio.component';\nimport { KlesFormCheckboxComponent } from '../fields/checkbox.component';\nimport { KlesFormListFieldComponent } from '../fields/list-field.component';\nimport { KlesFormColorComponent } from '../fields/color.component';\nimport { KlesFormChipComponent } from '../fields/chip.component';\nimport { KlesFormGroupComponent } from '../fields/group.component';\nimport { KlesFormIconComponent } from '../fields/icon.component';\nimport { KlesFormSelectSearchComponent } from '../fields/select.search.component';\nimport { KlesFormLineBreakComponent } from '../fields/line-break.component';\nimport { KlesFormLinkComponent } from '../fields/link.component';\nimport { KlesFormSelectionListComponent } from '../fields/selection-list.component';\nimport { KlesFormButtonToogleGroupComponent } from '../fields/button-toogle-group.component';\nimport { KlesFormArrayComponent } from '../fields/array.component';\n\nconst componentMapper = {\n label: KlesFormLabelComponent,\n input: KlesFormInputComponent,\n button: KlesFormSubmitButtonComponent,\n select: KlesFormSelectComponent,\n date: KlesFormDateComponent,\n radio: KlesFormRadioComponent,\n checkbox: KlesFormCheckboxComponent,\n listField: KlesFormListFieldComponent,\n array: KlesFormArrayComponent,\n color: KlesFormColorComponent,\n chip: KlesFormChipComponent,\n group: KlesFormGroupComponent,\n icon: KlesFormIconComponent,\n selectSearch: KlesFormSelectSearchComponent,\n lineBreak: KlesFormLineBreakComponent,\n link: KlesFormLinkComponent,\n selectionList: KlesFormSelectionListComponent,\n buttonToogleGroup: KlesFormButtonToogleGroupComponent\n};\n\n@Directive({\n selector: '[klesDynamicField]'\n})\nexport class KlesDynamicFieldDirective implements OnInit, OnChanges, OnDestroy {\n @Input() field: IKlesFieldConfig;\n @Input() group: FormGroup;\n @Input() siblingFields: IKlesFieldConfig[];\n\n componentRef: ComponentRef<any>;\n\n constructor(protected resolver: ComponentFactoryResolver,\n protected container: ViewContainerRef) { }\n\n ngOnDestroy(): void {\n if (this.componentRef) this.componentRef.destroy();\n }\n\n ngOnInit() {\n this.buildComponent();\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes.group) {\n this.group = changes.group.currentValue;\n }\n if (changes.field) {\n // if (changes.field.previousValue && changes.field.currentValue.component !== changes.field.previousValue.component) {\n this.field = changes.field.currentValue;\n this.buildComponent();\n // } else {\n // this.field = changes.field.currentValue;\n // }\n }\n }\n\n buildComponent() {\n const factory = this.resolver.resolveComponentFactory(\n this.field.component || componentMapper[this.field.type]\n );\n if (this.componentRef) this.componentRef.destroy();\n this.componentRef = this.container.createComponent(factory);\n this.componentRef.instance.field = this.field;\n this.componentRef.instance.group = this.group;\n this.componentRef.instance.siblingFields = this.siblingFields;\n }\n}\n","import { FormControl, FormGroupDirective, NgForm } from '@angular/forms';\nimport { ErrorStateMatcher } from '@angular/material/core';\n\nexport class KlesFormErrorStateMatcher implements ErrorStateMatcher {\n\n constructor() {\n }\n\n isErrorState(control: FormControl | null, form: FormGroupDirective | NgForm | null): boolean {\n const isSubmitted = form && form.submitted;\n return !!(control && control.invalid && (control.dirty || control.touched || isSubmitted));\n }\n\n}\n\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { MatSliderModule } from '@angular/material/slider';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatToolbarModule } from '@angular/material/toolbar';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatSidenavModule } from '@angular/material/sidenav';\nimport { MatBadgeModule } from '@angular/material/badge';\nimport { MatListModule } from '@angular/material/list';\nimport { MatGridListModule } from '@angular/material/grid-list';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatDatepickerModule } from '@angular/material/datepicker';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatSelectModule } from '@angular/material/select';\nimport { MatRadioModule } from '@angular/material/radio';\nimport { MatChipsModule } from '@angular/material/chips';\nimport { MatTooltipModule } from '@angular/material/tooltip';\nimport { MatTableModule } from '@angular/material/table';\nimport { MatPaginatorModule } from '@angular/material/paginator';\nimport { MatCardModule } from '@angular/material/card';\nimport { MatMenuModule } from '@angular/material/menu';\nimport { CdkTableModule } from '@angular/cdk/table';\nimport { MatTabsModule } from '@angular/material/tabs';\nimport { MatProgressSpinnerModule } from '@angular/material/progress-spinner';\nimport { MatCheckboxModule } from '@angular/material/checkbox';\nimport { MatDialogModule } from '@angular/material/dialog';\nimport { MatAutocompleteModule } from '@angular/material/autocomplete';\nimport { MatProgressBarModule } from '@angular/material/progress-bar';\nimport { MatSortModule } from '@angular/material/sort';\nimport { MatExpansionModule } from '@angular/material/expansion';\nimport { MatNativeDateModule } from '@angular/material/core';\nimport { MatSnackBarModule } from '@angular/material/snack-bar';\nimport { MatTreeModule } from '@angular/material/tree';\nimport { MatSlideToggleModule } from '@angular/material/slide-toggle';\nimport { ColorPickerModule } from 'ngx-color-picker';\nimport { ScrollingModule } from '@angular/cdk/scrolling';\nimport { MatButtonToggleModule } from '@angular/material/button-toggle';\nimport { CdkScrollable } from '@angular/cdk/scrolling';\n\n\n@NgModule({\n imports: [\n CommonModule,\n MatSliderModule,\n MatButtonModule,\n MatToolbarModule,\n MatIconModule,\n MatSidenavModule,\n MatBadgeModule,\n MatListModule,\n MatGridListModule,\n MatFormFieldModule,\n MatInputModule,\n MatSelectModule,\n MatRadioModule,\n MatDatepickerModule,\n MatChipsModule,\n MatTooltipModule,\n MatTableModule,\n MatPaginatorModule,\n MatCardModule,\n MatMenuModule,\n MatTabsModule,\n CdkTableModule,\n MatProgressSpinnerModule,\n MatCheckboxModule,\n MatDialogModule,\n MatAutocompleteModule,\n MatProgressBarModule,\n MatSortModule,\n MatExpansionModule,\n MatNativeDateModule,\n MatSnackBarModule,\n MatTreeModule,\n MatSliderModule,\n MatButtonModule,\n MatSlideToggleModule,\n ColorPickerModule,\n MatButtonToggleModule\n ],\n\n exports: [\n MatButtonModule,\n MatToolbarModule,\n MatIconModule,\n MatSidenavModule,\n MatBadgeModule,\n MatListModule,\n MatGridListModule,\n MatInputModule,\n MatFormFieldModule,\n MatSelectModule,\n MatRadioModule,\n MatDatepickerModule,\n MatChipsModule,\n MatTooltipModule,\n MatTableModule,\n MatPaginatorModule,\n MatCardModule,\n MatMenuModule,\n MatTabsModule,\n CdkTableModule,\n MatProgressSpinnerModule,\n MatCheckboxModule,\n MatDialogModule,\n MatAutocompleteModule,\n MatProgressBarModule,\n MatSortModule,\n MatExpansionModule,\n MatNativeDateModule,\n MatSnackBarModule,\n MatTreeModule,\n MatSliderModule,\n MatButtonModule,\n MatSlideToggleModule,\n ColorPickerModule,\n ScrollingModule,\n CdkScrollable,\n MatButtonToggleModule\n ],\n providers: [\n MatDatepickerModule,\n MatDialogModule\n ]\n})\n\nexport class MaterialModule { }\n","import { Component, OnInit, forwardRef, Input } from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\n\nexport interface IButton {\n event?: any;\n uiButton?: IUIButton\n}\n\nexport interface IUIButton {\n label?: string;\n color?: string;\n icon?: string;\n iconSvg?: string;\n disabled?: boolean;\n class?: string\n}\n\n@Component({\n selector: 'kles-button',\n template: `\n <span>\n <button mat-button [ngClass]=\"classButton\" [color]=\"(color)?color:'primary'\" [disabled]=\"disabled\"\n (click)=\"click($event)\" [matTooltip]=\"tooltip\">\n {{label | translate}}\n <mat-icon *ngIf=\"icon\">{{icon}}</mat-icon>\n <mat-icon svgIcon=\"{{iconSvg}}\" *ngIf=\"iconSvg\"></mat-icon>\n </button>\n </span>\n `,\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => KlesButtonComponent),\n multi: true\n }\n ]\n})\nexport class KlesButtonComponent implements OnInit, ControlValueAccessor {\n @Input() name = '';\n @Input() label = '';\n @Input() color = 'accent';\n @Input() icon = '';\n @Input() iconSvg = '';\n @Input() disabled = false;\n @Input() classButton = '';\n @Input() value: IButton = {};\n @Input() tooltip?: string;\n\n onChange: any = () => { };\n onTouched: any = () => { };\n\n ngOnInit(): void {\n }\n\n click(event) {\n this.value.event = this.name;\n this.onChange(this.value);\n }\n\n writeValue(value: IButton): void {\n if (!value) {\n value = { event: this.name };\n }\n if (!value.event) {\n value.event = this.name;\n }\n if (value.uiButton) {\n const uiButton = value.uiButton;\n this.label = (uiButton.label) ? uiButton.label : this.label;\n this.color = (uiButton.color) ? uiButton.color : this.color;\n this.icon = (uiButton.icon) ? uiButton.icon : this.icon;\n this.iconSvg = (uiButton.iconSvg) ? uiButton.iconSvg : this.iconSvg;\n this.disabled = (uiButton.disabled) ? uiButton.disabled : this.disabled;\n this.classButton = (uiButton.class) ? uiButton.class : this.classButton;\n }\n this.value = value;\n }\n\n registerOnChange(fn: any): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: any): void {\n this.onTouched = fn;\n }\n\n setDisabledState?(isDisabled: boolean): void {\n this.disabled = isDisabled;\n }\n}","import { OnInit, Component, OnDestroy } from '@angular/core';\nimport { KlesFieldAbstract } from './field.abstract';\n\n\n@Component({\n selector: 'kles-form-button',\n template: `\n <div [formGroup]=\"group\">\n <kles-button\n [attr.id]=\"field.id\" [classButton]=\"field.ngClass\" \n [name]=\"field.name\" [label]=\"field.label\" [color]=\"field.color\" \n [icon]=\"field.icon\"\n [iconSvg]=\"field.iconSvg\"\n [value]=\"field.value\"\n [formControlName]=\"field.name\"\n [tooltip]=\"field.tooltip\">\n </kles-button>\n </div>\n `,\n styles: []\n})\nexport class KlesFormButtonComponent extends KlesFieldAbstract implements OnInit, OnDestroy {\n\n ngOnInit(): void {\n super.ngOnInit();\n }\n\n ngOnDestroy(): void {\n super.ngOnDestroy();\n }\n}\n","import { Component, OnInit, forwardRef } from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { IButton, KlesButtonComponent } from './button-control.component';\n\nexport interface IButtonChecker extends IButton {\n busy: boolean;\n error?: any[];\n message?: string;\n}\n\n@Component({\n selector: 'kles-button-checker',\n template: `\n <span *ngIf=\"value.error && !value.busy\">\n <kles-button \n [classButton]=\"classButton\" \n [name]=\"name\" [label]=\"label\" [color]=\"color\" \n [icon]=\"icon\" [iconSvg]=\"iconSvg\"\n [value]=\"value\" \n [tooltip]=\"tooltip\"\n [disabled]=\"disabled\"\n matBadge=\"{{countError()}}\" (click)=\"click($event)\">\n </kles-button>\n </span>\n <span style=\"text-align: center;\">\n <span style=\"text-align: center;margin-right: 10px\" *ngIf=\"value.busy||false\">\n <mat-spinner [diameter]=\"25\"></mat-spinner>\n </span>\n <span *ngIf=\"value.message\" style=\"margin-right: 10px\">\n {{value.message|translate}}\n </span>\n </span>\n `,\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => KlesButtonCheckerComponent),\n multi: true\n }\n ]\n})\nexport class KlesButtonCheckerComponent extends KlesButtonComponent implements ControlValueAccessor {\n value: IButtonChecker = {\n busy: false,\n error: [],\n event: false\n };\n\n countError(): number {\n return (this.value.error) ? this.value.error.length : 0;\n }\n}","import { OnInit, Component, OnDestroy } from '@angular/core';\nimport { KlesFieldAbstract } from './field.abstract';\n\n@Component({\n selector: 'kles-form-button-checker',\n template: `\n <div [formGroup]=\"group\">\n <kles-button-checker\n [attr.id]=\"field.id\" [classButton]=\"field.ngClass\"\n [name]=\"field.name\" [label]=\"field.label\" [color]=\"field.color\"\n [icon]=\"field.icon\"\n [iconSvg]=\"field.iconSvg\"\n [value]=\"field.value\"\n [formControlName]=\"field.name\"\n [tooltip]=\"field.tooltip\">\n </kles-button-checker>\n </div>\n `,\n styles: []\n})\nexport class KlesFormButtonCheckerComponent extends KlesFieldAbstract implements OnInit, OnDestroy {\n\n ngOnInit(): void {\n super.ngOnInit();\n }\n\n ngOnDestroy(): void {\n super.ngOnDestroy();\n }\n}\n","import { Component, OnInit, forwardRef, ViewChild } from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { IButton, KlesButtonComponent } from './button-control.component';\n\nexport interface IButtonFile extends IButton {\n fileContent?: string | string[];\n}\n\n@Component({\n selector: 'kles-button-file',\n template: `\n <input type=\"file\" #file style=\"display: none\" accept=\"{{accept}}\" (change)=\"onFileSelect($event.target)\" multiple />\n <kles-button \n [classButton]=\"classButton\" \n [name]=\"name\" [label]=\"label\" [color]=\"color\" \n [icon]=\"icon\" [iconSvg]=\"iconSvg\"\n [disabled]=\"disabled\"\n [value]=\"value\" (click)=\"click($event)\">\n </kles-button>\n `,\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => KlesButtonFileComponent),\n multi: true\n }\n ]\n})\nexport class KlesButtonFileComponent extends KlesButtonComponent implements ControlValueAccessor {\n @ViewChild('file') file;\n accept = '*.*';\n fileReader = new FileReader();\n fileContent: string | string[];\n value: IButtonFile = {};\n\n click(event) {\n this.file.nativeElement.click();\n }\n\n writeValue(value: IButton): void {\n if (!value) {\n value = { event: this.name };\n }\n if (!value.event) {\n value.event = this.name;\n }\n if (value.uiButton) {\n const uiButton = value.uiButton;\n this.label = (uiButton.label) ? uiButton.label : this.label;\n this.color = (uiButton.color) ? uiButton.color : this.color;\n this.icon = (uiButton.icon) ? uiButton.icon : this.icon;\n this.iconSvg = (uiButton.iconSvg) ? uiButton.iconSvg : this.iconSvg;\n this.disabled = (uiButton.disabled) ? uiButton.disabled : this.disabled;\n this.classButton = (uiButton.class) ? uiButton.class : this.classButton;\n }\n this.value = value;\n }\n\n\n onFileLoad(fileLoadedEvent) {\n const textFromFileLoaded = fileLoadedEvent.target.result;\n this.fileContent = textFromFileLoaded;\n }\n\n async onFileSelect(input: HTMLInputElement) {\n if (input.files.length > 0) {\n const files = input.files;\n let fileContent = [];\n if (files && files.length) {\n for (let i = 0; i < files.length; i++) {\n try {\n fileContent[i] = await this.readUploadedFile(files[i]);\n } catch (e) {\n }\n }\n if (fileContent.length === 1) {\n fileContent = fileContent[0];\n }\n }\n this.value.event = this.name;\n this.value.fileContent = fileContent;\n this.onChange(this.value);\n input.value = '';\n }\n }\n\n readUploadedFile(inputFile): Promise<any> {\n const temporaryFileReader = new FileReader();\n return new Promise((resolve, reject) => {\n temporaryFileReader.onerror = () => {\n temporaryFileReader.abort();\n const error: DOMException = new DOMException('Problem parsing input file.');\n reject(error);\n };\n temporaryFileReader.onload = () => {\n resolve(temporaryFileReader.result);\n };\n temporaryFileReader.readAsArrayBuffer(inputFile);\n });\n }\n}\n","import { OnInit, Component, OnDestroy } from '@angular/core';\nimport { KlesFieldAbstract } from './field.abstract';\n\n@Component({\n selector: 'kles-form-button-file',\n template: `\n <div [formGroup]=\"group\">\n <kles-button-file\n [attr.id]=\"field.id\" [classButton]=\"field.ngClass\" \n [name]=\"field.name\" [label]=\"field.label\" [color]=\"field.color\" \n [icon]=\"field.icon\"\n [iconSvg]=\"field.iconSvg\"\n [value]=\"field.value\"\n [formControlName]=\"field.name\">\n </kles-button-file>\n </div>\n `,\n styles: []\n})\nexport class KlesFormButtonFileComponent extends KlesFieldAbstract implements OnInit, OnDestroy {\n\n ngOnInit(): void {\n super.ngOnInit();\n }\n\n ngOnDestroy(): void {\n super.ngOnDestroy();\n }\n}\n","import { Component, OnDestroy, OnInit } from '@angular/core';\nimport { KlesFieldAbstract } from './field.abstract';\n\n@Component({\n selector: 'kles-form-textarea',\n template: `\n <mat-form-field [formGroup]=\"group\" class=\"form-element\">\n <textarea matInput matTooltip=\"{{field.tooltip}}\" [attr.id]=\"field.id\" [ngClass]=\"field.ngClass\" \n [formControlName]=\"field.name\" cdkTextareaAutosize [placeholder]=\"field.placeholder | translate\"\n [cdkAutosizeMinRows]=\"field.textareaAutoSize?.minRows\" [cdkAutosizeMaxRows]=\"field.textareaAutoSize?.maxRows\" [maxlength]=\"field.maxLength\">\n </textarea>\n\n\n <ng-container *ngFor=\"let validation of field.validations;\" ngProjectAs=\"mat-error\">\n <mat-error *ngIf=\"group.get(field.name).hasError(validation.name)\">{{validation.message | translate}}</mat-error>\n </ng-container>\n <ng-container *ngFor=\"let validation of field.asyncValidations;\" ngProjectAs=\"mat-error\">\n <mat-error *ngIf=\"group.get(field.name).hasError(validation.name)\">{{validation.message | translate}}</mat-error>\n </ng-container>\n </mat-form-field>\n `,\n styles: ['mat-form-field {width: calc(100%)}']\n})\nexport class KlesFormTextareaComponent extends KlesFieldAbstract implements OnInit, OnDestroy {\n ngOnInit(): void {\n super.ngOnInit();\n }\n\n ngOnDestroy(): void {\n super.ngOnDestroy();\n }\n}\n","import { Component, OnDestroy, OnInit } from \"@angular/core\";\nimport { KlesFieldAbstract } from \"./field.abstract\";\n\n@Component({\n selector: 'kles-form-text',\n template: `\n <span matTooltip=\"{{field.tooltip}}\" [attr.id]=\"field.id\" [ngClass]=\"field.ngClass\">\n {{(field.property ? group.controls[field.name].value[field.property] : group.controls[field.name].value) | klesTransform:field.pipeTransform}}\n </span> \n`\n})\nexport class KlesFormTextComponent extends KlesFieldAbstract implements OnInit, OnDestroy {\n\n ngOnInit() {\n super.ngOnInit();\n }\n ngOnDestroy(): void {\n super.ngOnDestroy();\n }\n}\n","import { OnInit, Component, OnDestroy } from '@angular/core';\nimport { KlesFormInputComponent } from './input.component';\n\n@Component({\n selector: 'kles-form-input-clearable',\n template: `\n <mat-form-field [formGroup]=\"group\" class=\"form-element\">\n\n <ng-container *ngIf=\"field.autocomplete; else notAutoComplete\">\n <input matInput matTooltip=\"{{field.tooltip}}\" [attr.id]=\"field.id\" [ngClass]=\"field.ngClass\" [formControlName]=\"field.name\" [placeholder]=\"field.placeholder | translate\" [type]=\"field.inputType\"\n [maxLength]=\"field.maxLength\" [min]=\"field.min\" [max]=\"field.max\" [step]=\"field.step\"\n [matAutocomplete]=\"auto\">\n\n <mat-autocomplete #auto=\"matAutocomplete\" [displayWith]=\"displayFn.bind(this)\" [panelWidth]=\"this.field.panelWidth\">\n <ng-container *ngIf=\"!field.autocompleteComponent\">\n <mat-option *ngFor=\"let option of filteredOption | async\" [value]=\"option\">\n {{field.property ? option[field.property] : option}}\n </mat-option>\n </ng-container>\n\n <ng-container *ngIf=\"field.autocompleteComponent\">\n <mat-option *ngFor=\"let option of filteredOption | async\" [value]=\"option\">\n <ng-container klesComponent [component]=\"field.autocompleteComponent\" [value]=\"option\" [field]=\"field\">\n </ng-container>\n </mat-option>\n </ng-container>\n </mat-autocomplete>\n </ng-container>\n\n <ng-template #notAutoComplete>\n <input matInput matTooltip=\"{{field.tooltip}}\" [attr.id]=\"field.id\" [ngClass]=\"field.ngClass\" [formControlName]=\"field.name\" [placeholder]=\"field.placeholder | translate\" [type]=\"field.inputType\"\n [maxLength]=\"field.maxLength\" [min]=\"field.min\" [max]=\"field.max\" [step]=\"field.step\">\n </ng-template>\n <button *ngIf=\"!group.get(field.name).disabled\" mat-button matSuffix mat-icon-button aria-label=\"Clear\" type=\"button\"\n (click)=\"group.controls[field.name].reset();\">\n <mat-icon>close</mat-icon>\n </button>\n\n <mat-spinner matSuffix mode=\"indeterminate\" *ngIf=\"isPending()\" diameter=\"17\"></mat-spinner>\n\n <ng-container *ngFor=\"let validation of field.validations;\" ngProjectAs=\"mat-error\">\n <mat-error *ngIf=\"group.get(field.name).hasError(validation.name)\">{{validation.message | translate}}</mat-error>\n </ng-container>\n <ng-container *ngFor=\"let validation of field.asyncValidations;\" ngProjectAs=\"mat-error\">\n <mat-error *ngIf=\"group.get(field.name).hasError(validation.name)\">{{validation.message | translate}}</mat-error>\n </ng-container>\n </mat-form-field>\n `,\n styles: ['mat-form-field {width: calc(100%)}']\n})\nexport class KlesFormInputClearableComponent extends KlesFormInputComponent implements OnInit, OnDestroy {\n\n ngOnDestroy(): void {\n super.ngOnDestroy();\n }\n}\n","import { Pipe, PipeTransform } from \"@angular/core\";\n\n@Pipe({ name: 'klesTransform' })\nexport class KlesTransformPipe implements PipeTransform {\n\n transform(value: any, pipes: { pipe: PipeTransform, options?: any[] }[]): any {\n\n if (pipes && pipes.length > 0) {\n return pipes.reduce((acc, p) => {\n if (p.options) {\n p.options.forEach(opt => {\n acc = p.pipe.transform(acc, opt);\n });\n } else {\n acc = p.pipe.transform(acc);\n }\n return acc;\n }, value)\n }\n return value;\n\n }\n}\n","import { Pipe, PipeTransform } from \"@angular/core\";\n\n@Pipe({ name: 'arrayFormat' })\nexport class ArrayFormatPipe implements PipeTransform {\n\n transform(values: any[], property?: string): string {\n if (values && Array.isArray(values)) {\n if (property) {\n return values.map(value => value[property]).filter(Boolean).join(', ');\n } else {\n return values.join(', ');\n }\n }\n return '';\n }\n}","\nimport { Component, OnDestroy, OnInit } from \"@angular/core\";\nimport { KlesFieldAbstract } from './field.abstract';\n\n\n@Component({\n selector: 'kles-form-slide-toggle',\n template: `\n <div [formGroup]=\"group\" >\n <mat-slide-toggle matTooltip=\"{{field.tooltip}}\" [attr.id]=\"field.id\" [ngClass]=\"field.ngClass\" [color]=\"field.color\" [formControlName]=\"field.name\">{{field.label | translate}}</mat-slide-toggle>\n <ng-container *ngFor=\"let validation of field.validations;\" ngProjectAs=\"mat-error\">\n <mat-error *ngIf=\"group.get(field.name).hasError(validation.name)\">{{validation.message}}</mat-error>\n </ng-container>\n <ng-container *ngFor=\"let validation of field.asyncValidations;\" ngProjectAs=\"mat-error\">\n <mat-error *ngIf=\"group.get(field.name).hasError(validation.name)\">{{validation.message}}</mat-error>\n </ng-container>\n </div>\n`,\n styles: []\n})\nexport class KlesFormSlideToggleComponent extends KlesFieldAbstract implements OnInit, OnDestroy {\n ngOnInit() { super.ngOnInit(); }\n ngOnDestroy(): void {\n super.ngOnDestroy();\n }\n}\n","import { Component, OnDestroy, OnInit } from '@angular/core';\nimport { KlesFieldAbstract } from './field.abstract';\n\n@Component({\n selector: 'kles-form-badge',\n template: `\n <span matTooltip=\"{{field.tooltip}}\" [attr.id]=\"field.id\" [ngClass]=\"field.ngClass\" \n matBadge=\"{{group.controls[field.name].value}}\" matBadgeOverlap=\"false\" matBadgeColor=\"{{field.color}}\">\n </span>\n`\n})\nexport class KlesFormBadgeComponent extends KlesFieldAbstract implements OnInit, OnDestroy {\n\n ngOnInit() {\n super.ngOnInit();\n }\n\n ngOnDestroy(): void {\n super.ngOnDestroy();\n }\n}\n","import { CUSTOM_ELEMENTS_SCHEMA, NgModule, NO_ERRORS_SCHEMA } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { KlesDynamicFormComponent } from './dynamic-form.component';\nimport { KlesComponentDirective } from './directive/dynamic-component.directive';\nimport { KlesDynamicFieldDirective } from './directive/dynamic-field.directive';\nimport { KlesFormErrorStateMatcher } from './matcher/form-error.matcher';\nimport { ErrorStateMatcher } from '@angular/material/core';\nimport { MaterialModule } from './modules/material.module';\nimport { FlexLayoutModule } from '@angular/flex-layout';\nimport { ColorPickerModule } from 'ngx-color-picker';\nimport { TranslateModule } from '@ngx-translate/core';\nimport { KlesFormLabelComponent } from './fields/label.component';\nimport { KlesFormInputComponent } from './fields/input.component';\nimport { KlesFormSubmitButtonComponent } from './fields/button-submit.component';\nimport { KlesFormSelectComponent } from './fields/select.component';\nimport { KlesFormDateComponent } from './fields/date.component';\nimport { KlesFormRadioComponent } from './fields/radio.component';\nimport { KlesFormCheckboxComponent } from './fields/checkbox.component';\nimport { KlesFormListFieldComponent } from './fields/list-field.component';\nimport { KlesFormColorComponent } from './fields/color.component';\nimport { KlesButtonComponent } from './forms/button-control.component';\nimport { KlesFormButtonComponent } from './fields/button-form.component';\nimport { KlesButtonCheckerComponent } from './forms/buttonchecker-control.component';\nimport { KlesFormButtonCheckerComponent } from './fields/buttonchecker-form.component';\nimport { KlesButtonFileComponent } from './forms/buttonfile-control.component';\nimport { KlesFormButtonFileComponent } from './fields/buttonfile-form.component';\nimport { KlesFormTextareaComponent } from './fields/textarea.component';\nimport { KlesFormTextComponent } from './fields/text.component';\nimport { KlesFormChipComponent } from './fields/chip.component';\nimport { KlesFormGroupComponent } from './fields/group.component';\nimport { KlesFormInputClearableComponent } from './fields/input.clearable.component';\nimport { KlesFormIconComponent } from './fields/icon.component';\nimport { KlesTransformPipe } from './pipe/transform.pipe';\nimport { NgxMatSelectSearchModule } from 'ngx-mat-select-search';\nimport { KlesFormSelectSearchComponent } from './fields/select.search.component';\nimport { KlesFormLineBreakComponent } from './fields/line-break.component';\nimport { ArrayFormatPipe } from './pipe/array.pipe';\nimport { KlesFormLinkComponent } from './fields/link.component';\nimport { KlesFormSlideToggleComponent } from './fields/slide-toggle.component';\nimport { KlesFormSelectionListComponent } from './fields/selection-list.component';\nimport { KlesFormBadgeComponent } from './fields/badge.component';\nimport { KlesFormButtonToogleGroupComponent } from './fields/button-toogle-group.component';\nimport { KlesFormArrayComponent } from './fields/array.component';\n\nconst components = [\n KlesDynamicFormComponent,\n KlesFormLabelComponent,\n KlesFormInputComponent,\n KlesFormInputClearableComponent,\n KlesFormSubmitButtonComponent,\n KlesFormBadgeComponent,\n KlesButtonComponent,\n KlesFormButtonComponent,\n KlesButtonCheckerComponent,\n KlesFormButtonCheckerComponent,\n KlesButtonFileComponent,\n KlesFormButtonFileComponent,\n KlesFormSelectComponent,\n KlesFormDateComponent,\n KlesFormRadioComponent,\n KlesFormCheckboxComponent,\n KlesFormListFieldComponent,\n KlesFormColorComponent,\n KlesFormTextareaComponent,\n KlesFormTextComponent,\n KlesFormChipComponent,\n KlesFormGroupComponent,\n KlesFormIconComponent,\n KlesFormSelectSearchComponent,\n KlesFormLineBreakComponent,\n KlesFormLinkComponent,\n KlesFormSlideToggleComponent,\n KlesFormSelectionListComponent,\n KlesFormButtonToogleGroupComponent,\n KlesFormArrayComponent\n];\n\nconst directives = [KlesDynamicFieldDirective, KlesComponentDirective];\nconst pipes = [KlesTransformPipe, ArrayFormatPipe];\n@NgModule({\n declarations: [\n components,\n directives,\n pipes\n\n ],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n TranslateModule,\n FlexLayoutModule,\n FormsModule,\n MaterialModule,\n ColorPickerModule,\n NgxMatSelectSearchModule\n ],\n providers: [\n { provide: ErrorStateMatcher, useClass: KlesFormErrorStateMatcher },\n pipes\n ],\n entryComponents: [\n components\n ],\n exports: [\n components,\n pipes,\n directives,\n ColorPickerModule\n ],\n schemas: [CUSTOM_ELEMENTS_SCHEMA, NO_ERRORS_SCHEMA]\n})\nexport class KlesMaterialDynamicformsModule { }\n","import { AbstractControl, ValidatorFn } from \"@angular/forms\"\n\nexport function autocompleteObjectValidator(optional?: boolean): ValidatorFn {\n return (control: AbstractControl): { [key: string]: any } | null => {\n if ((control.value === null || control.value === undefined) && !optional) return { 'invalidAutocompleteObject': { value: control.value } }\n\n if (typeof control.value === 'string') {\n if (control.value === '' && optional) return null;\n return { 'invalidAutocompleteObject': { value: control.value } }\n }\n return null /* valid option selected */\n }\n}\n\nexport function autocompleteStringValidator(validOptions: Array<string>, optional?: boolean): ValidatorFn {\n return (control: AbstractControl): { [key: string]: any } | null => {\n if ((control.value === '' || control.value === null) && optional) return null;\n if (validOptions.indexOf(control.value) !== -1) {\n return null /* valid option selected */\n }\n return { 'invalidAutocompleteString': { value: control.value } }\n }\n}","/*\n * Public API Surface of kles-material-dynamicforms\n */\n\nexport * from './lib/kles-material-dynamicforms.module';\n\n/**DIRECTIVE */\nexport * from './lib/directive/dynamic-field.directive';\nexport * from './lib/directive/dynamic-component.directive';\n\n/*FORMS*/\nexport * from './lib/forms/button-control.component';\nexport * from './lib/forms/buttonchecker-control.component';\nexport * from './lib/forms/buttonfile-control.component';\n\n/**FIELDS */\nexport * from './lib/fields/badge.component';\nexport * from './lib/fields/button-form.component';\nexport * from './lib/fields/buttonchecker-form.component';\nexport * from './lib/fields/buttonfile-form.component';\nexport * from './lib/fields/button-submit.component';\nexport * from './lib/fields/checkbox.component';\nexport * from './lib/fields/color.component';\nexport * from './lib/fields/date.component';\nexport * from './lib/fields/field.abstract';\nexport * from './lib/fields/input.component';\nexport * from './lib/fields/input.clearable.component';\nexport * from './lib/fields/label.component';\nexport * from './lib/fields/list-field.component';\nexport * from './lib/fields/radio.component';\nexport * from './lib/fields/select.component';\nexport * from './lib/fields/textarea.component';\nexport * from './lib/fields/text.component';\nexport * from './lib/fields/chip.component';\nexport * from './lib/fields/group.component';\nexport * from './lib/fields/icon.component';\nexport * from './lib/fields/select.search.component';\nexport * from './lib/fields/line-break.component';\nexport * from './lib/fields/link.component';\nexport * from './lib/fields/slide-toggle.component';\nexport * from './lib/fields/selection-list.component';\nexport * from './lib/fields/button-toogle-group.component';\nexport * from './lib/fields/array.component';\n\n/**ENUMS */\nexport * from './lib/enums/type.enum';\n\n/**INTERFACES */\nexport * from './lib/interfaces/component.interface';\nexport * from './lib/interfaces/field.interface';\nexport * from './lib/interfaces/field.config.interface';\nexport * from './lib/interfaces/validator.interface';\n\n/**MATCHER */\nexport * from './lib/matcher/form-error.matcher';\n\n/**VALIDATORS */\nexport * from './lib/validators/autocomplete.validator';\n\n/**FORM */\nexport * from './lib/dynamic-form.component';\n\n/**PIPES */\nexport * from './lib/pipe/array.pipe';\nexport * from './lib/pipe/transform.pipe';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n\nexport {MaterialModule as ɵa} from './lib/modules/material.module';"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAAY;AAAZ,WAAY,QAAQ;IAChB,yBAAa,CAAA;IACb,6BAAiB,CAAA;IACjB,iCAAqB,CAAA;IACrB,6BAAiB,CAAA;IACjB,yBAAa,CAAA;IACb,yBAAa,CAAA;IACb,2BAAe,CAAA;IACf,yBAAa,CAAA;IACb,2BAAe,CAAA;IACf,2BAAe,CAAA;IACf,2BAAe,CAAA;IACf,mCAAuB,CAAA;AAC3B,CAAC,EAbW,QAAQ,KAAR,QAAQ;;IC6BP,wBAAwB,GAArC,MAAa,wBAAwB;IAkBjC,YAAoB,EAAe;QAAf,OAAE,GAAF,EAAE,CAAa;QAjB1B,WAAM,GAAuB,EAAE,CAAC;QAChC,eAAU,GAAkC,EAAE,CAAC;QAC/C,oBAAe,GAAuC,EAAE,CAAC;;QAExD,WAAM,GAAsB,IAAI,YAAY,EAAO,CAAC;QACpD,cAAS,GAAG,IAAI,YAAY,EAAE,CAAC;QAEhC,cAAS,GAAqB,QAAQ,CAAC;QAGhD,qBAAgB,GAA+C,qBAAqB,CAAC;QACrF,yBAAoB,GAAyD,0BAA0B,CAAC;KAMhE;IAJxC,IAAI,KAAK;QACL,OAAO,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC;KAC1B;IAKD,QAAQ;QACJ,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,UAAU,EAAE,CAAC;QAC9B,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,SAAS,KAAK,KAAK,GAAG,kBAAkB,GAAG,qBAAqB,CAAC;QAC9F,IAAI,CAAC,oBAAoB,GAAG,IAAI,CAAC,SAAS,KAAK,KAAK,GAAG,uBAAuB,GAAG,0BAA0B,CAAC;QAC5G,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC;KACzB;IAED,WAAW,CAAC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