@rlucan/ui 14.2.6 → 16.2.2

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.
Files changed (79) hide show
  1. package/README.md +24 -24
  2. package/esm2022/lib/action-button/action-button.component.mjs +99 -99
  3. package/esm2022/lib/action-icon/action-icon.component.mjs +36 -36
  4. package/esm2022/lib/autocomplete/autocomplete.component.mjs +390 -390
  5. package/esm2022/lib/avatar/avatar.component.mjs +34 -34
  6. package/esm2022/lib/button/button.component.mjs +56 -56
  7. package/esm2022/lib/checkbox/checkbox.component.mjs +38 -38
  8. package/esm2022/lib/checkbox-group/checkbox-group.component.mjs +90 -90
  9. package/esm2022/lib/currency/currency.component.mjs +150 -150
  10. package/esm2022/lib/date/date.component.mjs +67 -67
  11. package/esm2022/lib/dialog/dialog.component.mjs +36 -36
  12. package/esm2022/lib/directives/force-visibility/force-visibility.directive.mjs +104 -104
  13. package/esm2022/lib/editor/editor.component.mjs +118 -118
  14. package/esm2022/lib/elements/burger/burger.component.mjs +20 -20
  15. package/esm2022/lib/elements/expander/expander.component.mjs +27 -27
  16. package/esm2022/lib/elements/validation-message/validation-message.component.mjs +46 -46
  17. package/esm2022/lib/file/file.component.mjs +144 -144
  18. package/esm2022/lib/file-uploader/ui-file-uploader.component.mjs +404 -404
  19. package/esm2022/lib/input/input.component.mjs +264 -264
  20. package/esm2022/lib/input-autocomplete/input-autocomplete.component.mjs +276 -276
  21. package/esm2022/lib/layouts/base/ui-base-layout.component.mjs +21 -21
  22. package/esm2022/lib/layouts/base/ui-base.component.mjs +73 -73
  23. package/esm2022/lib/layouts/simple/ui-simple-layout.component.mjs +17 -17
  24. package/esm2022/lib/layouts/simple/ui-simple.component.mjs +165 -165
  25. package/esm2022/lib/radio/radio.component.mjs +20 -20
  26. package/esm2022/lib/radio-group/radio-group.component.mjs +53 -53
  27. package/esm2022/lib/select/select.component.mjs +126 -115
  28. package/esm2022/lib/services/message-box.service.mjs +110 -110
  29. package/esm2022/lib/services/toast.service.mjs +23 -23
  30. package/esm2022/lib/services/ui-file.service.mjs +70 -70
  31. package/esm2022/lib/services/ui-translate.service.mjs +31 -31
  32. package/esm2022/lib/submit-button/submit-button.component.mjs +71 -71
  33. package/esm2022/lib/table/table.component.mjs +97 -97
  34. package/esm2022/lib/text-area/text-area.component.mjs +45 -45
  35. package/esm2022/lib/ui.model.mjs +1 -1
  36. package/esm2022/lib/ui.module.mjs +268 -268
  37. package/esm2022/public-api.mjs +34 -34
  38. package/esm2022/rlucan-ui.mjs +4 -4
  39. package/fesm2022/rlucan-ui.mjs +3285 -3274
  40. package/fesm2022/rlucan-ui.mjs.map +1 -1
  41. package/index.d.ts +5 -5
  42. package/lib/action-button/action-button.component.d.ts +28 -32
  43. package/lib/action-icon/action-icon.component.d.ts +15 -15
  44. package/lib/autocomplete/autocomplete.component.d.ts +57 -57
  45. package/lib/avatar/avatar.component.d.ts +14 -14
  46. package/lib/button/button.component.d.ts +18 -18
  47. package/lib/checkbox/checkbox.component.d.ts +15 -15
  48. package/lib/checkbox-group/checkbox-group.component.d.ts +18 -18
  49. package/lib/currency/currency.component.d.ts +31 -31
  50. package/lib/date/date.component.d.ts +24 -24
  51. package/lib/dialog/dialog.component.d.ts +13 -13
  52. package/lib/directives/force-visibility/force-visibility.directive.d.ts +22 -22
  53. package/lib/editor/editor.component.d.ts +24 -24
  54. package/lib/elements/burger/burger.component.d.ts +9 -9
  55. package/lib/elements/expander/expander.component.d.ts +10 -10
  56. package/lib/elements/validation-message/validation-message.component.d.ts +12 -12
  57. package/lib/file/file.component.d.ts +35 -35
  58. package/lib/file-uploader/ui-file-uploader.component.d.ts +102 -102
  59. package/lib/input/input.component.d.ts +42 -42
  60. package/lib/input-autocomplete/input-autocomplete.component.d.ts +44 -44
  61. package/lib/layouts/base/ui-base-layout.component.d.ts +8 -8
  62. package/lib/layouts/base/ui-base.component.d.ts +23 -23
  63. package/lib/layouts/simple/ui-simple-layout.component.d.ts +8 -8
  64. package/lib/layouts/simple/ui-simple.component.d.ts +40 -40
  65. package/lib/radio/radio.component.d.ts +8 -8
  66. package/lib/radio-group/radio-group.component.d.ts +18 -18
  67. package/lib/select/select.component.d.ts +37 -35
  68. package/lib/services/message-box.service.d.ts +58 -58
  69. package/lib/services/toast.service.d.ts +13 -13
  70. package/lib/services/ui-file.service.d.ts +33 -33
  71. package/lib/services/ui-translate.service.d.ts +11 -11
  72. package/lib/submit-button/submit-button.component.d.ts +21 -21
  73. package/lib/table/table.component.d.ts +36 -36
  74. package/lib/text-area/text-area.component.d.ts +18 -18
  75. package/lib/ui.model.d.ts +2 -2
  76. package/lib/ui.module.d.ts +59 -59
  77. package/package.json +1 -1
  78. package/public-api.d.ts +29 -29
  79. package/src/js/editorjs.mjs +9634 -9634
@@ -1,277 +1,277 @@
1
- import { Component, EventEmitter, Host, HostBinding, Input, Optional, Output, SkipSelf, ViewChild } from '@angular/core';
2
- import { NG_VALIDATORS, NG_VALUE_ACCESSOR } from '@angular/forms';
3
- import { UiSimpleComponent } from '../layouts/simple/ui-simple.component';
4
- import * as i0 from "@angular/core";
5
- import * as i1 from "@angular/forms";
6
- import * as i2 from "@angular/common";
7
- import * as i3 from "@angular/material/icon";
8
- import * as i4 from "@angular/material/tooltip";
9
- import * as i5 from "@angular/material/core";
10
- import * as i6 from "@angular/material/input";
11
- import * as i7 from "@angular/material/autocomplete";
12
- import * as i8 from "../layouts/simple/ui-simple-layout.component";
13
- import * as i9 from "../action-icon/action-icon.component";
14
- export class InputAutocompleteComponent extends UiSimpleComponent {
15
- get textAlignClass() {
16
- return `text-align-${this.textAlign}`;
17
- }
18
- get hasPrefix() {
19
- return (this.prefixIcon && this.prefixIcon.icon !== '') || this.prefix?.nativeElement?.innerText !== '' || this.forceHasPrefix;
20
- }
21
- get hasSuffix() {
22
- return (this.suffixIcon && this.suffixIcon.icon !== '') || this.suffix?.nativeElement?.innerText !== '' || this.forceHasSuffix;
23
- }
24
- // control;
25
- // onTouched = () => {};
26
- // onChange = (value) => {};
27
- // get showInvalid(): boolean {
28
- // return true;
29
- // // return this.control.touched && !!this.control.errors;
30
- // }
31
- // get validationMessage(): string {
32
- // // console.log(this.control?.errors);
33
- // let e: any = {code: 'Neznámá chyba'};
34
- // const errors = this.control?.errors || {};
35
- // Object.keys(errors).find(a => {
36
- // e = {code: a, data: errors[a]};
37
- // return true;
38
- // });
39
- // switch (e.code) {
40
- // case 'required':
41
- // return this.translateService.instant('ui.controls.validation.required');
42
- // case 'email':
43
- // return this.translateService.instant('ui.controls.validation.email');
44
- // case 'matDatepickerParse':
45
- // return this.translateService.instant('ui.controls.validation.matDatepickerParse');
46
- // case 'maxlength':
47
- // return this.translateService.instant('ui.controls.validation.maxlength', e.data);
48
- // case 'minlength':
49
- // return this.translateService.instant('ui.controls.validation.minlength', e.data);
50
- // case 'positive':
51
- // return this.translateService.instant(isNaN(Number(e.data)) ? 'ui.controls.validation.invalidNumber' : 'ui.controls.validation.positive');
52
- // case 'custom':
53
- // return this.translateService.instant(e.data);
54
- // default:
55
- // return this.translateService.instant(e.code);
56
- // }
57
- // }
58
- get maxLenRequired() {
59
- return true;
60
- // return this.control.value && (this.control.value.length > (this.validators?.maxLength || 0));
61
- }
62
- constructor(controlContainer) {
63
- super(null, controlContainer);
64
- this.controlContainer = controlContainer;
65
- this.type = 'text';
66
- this.clearButton = false;
67
- this.activeIcons = true;
68
- this.forceHasPrefix = false;
69
- this.forceHasSuffix = false;
70
- this.options = [];
71
- this.textAlign = 'left';
72
- this.focusChanged = new EventEmitter();
73
- this.keyPressed = new EventEmitter();
74
- this.filteredOptions = [];
75
- // control = new FormControl();
76
- this.required = false;
77
- this.hasFocus = false;
78
- // this.componentFormControl = new FormControl();
79
- // super();
80
- // super(undefined, /*ngControl*/ translateService);
81
- // super(control);
82
- // console.log(control);
83
- // if (control) {
84
- // control.valueAccessor = this;
85
- // }
86
- // if (ngControl != null) {
87
- // // Setting the value accessor directly (instead of using
88
- // // the providers) to avoid running into a circular import.
89
- // ngControl.valueAccessor = this;
90
- // }
91
- }
92
- get showClearButton() {
93
- return this.clearButton && this.componentFormControl?.value !== '';
94
- }
95
- ngOnInit() {
96
- super.ngOnInit();
97
- this.filteredOptions = this.options;
98
- this.componentFormControl?.valueChanges.subscribe((v) => {
99
- const vl = v.toLowerCase();
100
- this.filteredOptions = this.options.filter(o => vl === '' || o.toLowerCase().includes(vl));
101
- });
102
- // console.log('probiha vubec oninit?');
103
- // if (this.ngControl) {
104
- // console.log('from ngControl....??');
105
- // if (this.formControl) {
106
- // this.componentFormControl = this.formControl;
107
- // } else {
108
- // this.componentFormControl = this.ngControl.control as UntypedFormControl;
109
- // }
110
- // setTimeout(() => {
111
- // this.applyValidators();
112
- // });
113
- // } else {
114
- // const control = this.formControlName ?
115
- // (this.controlContainer as FormGroupDirective).control.get(this.formControlName) : this.formControl;
116
- // this.componentFormControl.setValidators(control.validator);
117
- // this.componentFormControl.valueChanges.subscribe(v => console.log('onitin sub', v));
118
- // control._componentFormControl = this.componentFormControl;
119
- // if (control._markAsTouched === undefined) {
120
- // // control._componentFormControl = this.componentFormControl;
121
- // console.log('overriding markAsTouched for', this.formControlName);
122
- // control._markAsTouched = control.markAsTouched;
123
- // control.markAsTouched = ({onlySelf}: { onlySelf?: boolean } = {}): void => {
124
- // console.log('marking as touched', this.componentFormControl.value, control.value, this.xxx.value, control._componentFormControl.value);
125
- // control._markAsTouched({onlySelf});
126
- // setTimeout(() => control._componentFormControl.markAsTouched(), 1000);
127
- // }
128
- // }
129
- // }
130
- }
131
- clearValue() {
132
- this.componentFormControl?.setValue('');
133
- this.input?.nativeElement.focus();
134
- }
135
- focus() {
136
- this.input?.nativeElement.focus();
137
- }
138
- onFocus(focus) {
139
- setTimeout(() => {
140
- this.hasFocus = focus;
141
- this.focusChanged.emit(focus);
142
- });
143
- }
144
- onKeypressed($event) {
145
- this.keyPressed.emit($event);
146
- }
147
- // registerOnChange(onChange: any): void {
148
- // this.onChange = onChange;
149
- // }
150
- //
151
- // registerOnTouched(onTouched: any): void {
152
- // this.onTouched = onTouched;
153
- // }
154
- // registerOnValidatorChange(fn: () => void): void {
155
- // }
156
- // setDisabledState(isDisabled: boolean): void {
157
- // // isDisabled ? this.control.disable() : this.control.enable();
158
- // }
159
- // validate(control: AbstractControl): ValidationErrors | null {
160
- // // this.control = control;
161
- // // console.log(control, control.value, control.errors);
162
- // if (this.value === 'error') {
163
- // return { customError: 'muj error'}
164
- // } else {
165
- // return null;
166
- // }
167
- // // console.log('custom validate');
168
- // // return null;
169
- // }
170
- //
171
- // writeValue(obj: any): void {
172
- // console.log('writevalue: ', obj);
173
- // this.componentFormControl.setValue(obj);
174
- // // this.value = obj;
175
- // // this.control.setValue(obj);
176
- // }
177
- //
178
- // registerOnChange(fn: any): void {
179
- // }
180
- //
181
- // registerOnTouched(fn: any): void {
182
- // }
183
- //
184
- // setDisabledState(isDisabled: boolean): void {
185
- // }
186
- // modelChange($event: any) {
187
- // console.log($event);
188
- // this.onTouched();
189
- // this.onChange($event)
190
- // }
191
- // validate(control: AbstractControl): ValidationErrors | null {
192
- // console.log(this.label, 'validate');
193
- // return this.componentFormControl.errors;
194
- // // return undefined;
195
- // }
196
- validate(control) {
197
- if (this.parentFormControl) {
198
- return this.parentFormControl._componentFormControl.errors;
199
- }
200
- // console.log('validate', this.componentFormControl.errors);
201
- // // this.componentFormControl.setErrors( { custom: 'xxx' });
202
- // this.componentFormControl.setErrors( this.componentFormControl.errors);
203
- // console.log('validate 2', this.componentFormControl.errors);
204
- // return this.componentFormControl.errors;
205
- // console.log(this.componentFormControl.errors, control.errors, this.parentFormControl.errors, this);
206
- // return this.componentFormControl.errors;
207
- }
208
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: InputAutocompleteComponent, deps: [{ token: i1.ControlContainer, host: true, optional: true, skipSelf: true }], target: i0.ɵɵFactoryTarget.Component }); }
209
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.11", type: InputAutocompleteComponent, selector: "ui-input-autocomplete", inputs: { prefixIcon: "prefixIcon", suffixIcon: "suffixIcon", type: "type", clearButton: "clearButton", activeIcons: "activeIcons", forceHasPrefix: "forceHasPrefix", forceHasSuffix: "forceHasSuffix", options: "options", textAlign: "textAlign" }, outputs: { focusChanged: "focusChanged", keyPressed: "keyPressed" }, host: { properties: { "class": "this.textAlignClass" } }, providers: [
210
- {
211
- provide: NG_VALUE_ACCESSOR,
212
- multi: true,
213
- useExisting: InputAutocompleteComponent
214
- },
215
- {
216
- provide: NG_VALIDATORS,
217
- multi: true,
218
- useExisting: InputAutocompleteComponent
219
- }
220
- ], viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true }, { propertyName: "prefix", first: true, predicate: ["prefix"], descendants: true, static: true }, { propertyName: "suffix", first: true, predicate: ["suffix"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<ui-simple-layout [ctx]=\"this\">\r\n\r\n<div class=\"control-container\" [ngClass]=\"{'has-suffix': hasSuffix, 'has-prefix': hasPrefix, 'has-clear-icon': showClearButton, 'active-icons': activeIcons, 'has-focus': hasFocus}\">\r\n <input #input matInput [type]=\"type\" [formControl]=\"componentFormControl\" [placeholder]=\"placeholder\" (keydown)=\"onKeypressed($event)\" (focus)=\"onFocus(true)\" (blur)=\"onFocus(false)\" [matAutocomplete]=\"auto\"/>\r\n\r\n <mat-autocomplete autoActiveFirstOption #auto=\"matAutocomplete\">\r\n <mat-option *ngFor=\"let option of filteredOptions\" [value]=\"option\">{{option}}</mat-option>\r\n </mat-autocomplete>\r\n <div #prefix><ng-content select=\"[slot=prefix]\"></ng-content></div>\r\n <div #suffix><ng-content select=\"[slot=suffix]\"></ng-content></div>\r\n <mat-icon *ngIf=\"prefixIcon\" class=\"prefix-icon\" [matTooltip]=\"prefixIcon.tooltip\">{{ prefixIcon.icon }}</mat-icon>\r\n <mat-icon *ngIf=\"suffixIcon\" class=\"suffix-icon\" [matTooltip]=\"suffixIcon.tooltip\">{{ suffixIcon.icon }}</mat-icon>\r\n <ui-action-icon [size]=\"'small'\" [color]=\"'warn'\" *ngIf=\"showClearButton\" (click)=\"clearValue()\" [matIcon]=\"'clear'\" class=\"clear-icon\"></ui-action-icon>\r\n</div>\r\n\r\n</ui-simple-layout>\r\n", styles: [":host{display:flex;flex-direction:column;width:100%}:host .control-container{width:100%;position:relative}:host .control-container.has-prefix ::ng-deep input,:host .control-container.has-prefix ::ng-deep textarea,:host .control-container.has-prefix ::ng-deep .mat-mdc-select-trigger{padding-left:1.8em}:host .control-container.has-suffix:not(.has-clear-icon) ::ng-deep input,:host .control-container.has-suffix:not(.has-clear-icon) ::ng-deep textarea,:host .control-container.has-suffix:not(.has-clear-icon) ::ng-deep .mat-mdc-select-trigger{padding-right:1.8em}:host .control-container.has-clear-icon:not(.has-suffix) ::ng-deep input,:host .control-container.has-clear-icon:not(.has-suffix) ::ng-deep textarea,:host .control-container.has-clear-icon:not(.has-suffix) ::ng-deep .mat-mdc-select-trigger{padding-right:1.8em}:host .control-container.has-suffix.has-clear-icon ::ng-deep input,:host .control-container.has-suffix.has-clear-icon ::ng-deep textarea,:host .control-container.has-suffix.has-clear-icon ::ng-deep .mat-mdc-select-trigger{padding-right:3.6em}:host .control-container.has-suffix.has-clear-icon ::ng-deep .clear-icon{right:1.4em!important}:host ::ng-deep [slot=suffix],:host ::ng-deep .clear-icon,:host ::ng-deep .suffix-icon{position:absolute;user-select:none;transition:color .25s;top:calc(50% - .5em);right:.2em;width:1em;height:1em;font-size:1.5em}:host ::ng-deep [slot=suffix]:not(.disabled),:host ::ng-deep .clear-icon:not(.disabled),:host ::ng-deep .suffix-icon:not(.disabled){cursor:pointer}:host ::ng-deep [slot=prefix],:host ::ng-deep .prefix-icon{position:absolute;user-select:none;transition:color .25s;top:calc(50% - .5em);left:.2em;width:1em;height:1em;font-size:1.5em}:host ::ng-deep [slot=prefix]:not(.disabled),:host ::ng-deep .prefix-icon:not(.disabled){cursor:pointer}:host ::ng-deep input,:host ::ng-deep textarea,:host ::ng-deep .mat-mdc-select-trigger,:host ::ng-deep .editor-wrapper{resize:none;width:100%;line-height:1.2em;font-size:1em;outline:none;border-style:solid;transition:border-color 333ms}:host ::ng-deep textarea.autoresize{box-sizing:content-box;width:calc(100% - 1.4em)}:host ::ng-deep ::ng-deep .mat-select-trigger,:host ::ng-deep ::ng-deep .mat-mdc-select-trigger{height:100%}:host ::ng-deep ::ng-deep .mat-select-value,:host ::ng-deep ::ng-deep .mat-mdc-select-value{vertical-align:middle}::ng-deep ui-input{display:block}\n", ":host.text-align-left ::ng-deep input{text-align:left}:host.text-align-right ::ng-deep input{text-align:right}:host.text-align-center ::ng-deep input{text-align:center}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i4.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "component", type: i5.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "directive", type: i6.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i7.MatAutocomplete, selector: "mat-autocomplete", inputs: ["disableRipple", "hideSingleSelectionIndicator"], exportAs: ["matAutocomplete"] }, { kind: "directive", type: i7.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", exportAs: ["matAutocompleteTrigger"] }, { kind: "component", type: i8.UiSimpleLayoutComponent, selector: "ui-simple-layout", inputs: ["ctx"] }, { kind: "component", type: i9.ActionIconComponent, selector: "ui-action-icon", inputs: ["size", "color", "disabled", "busy", "matIcon"] }] }); }
221
- }
222
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: InputAutocompleteComponent, decorators: [{
223
- type: Component,
224
- args: [{ selector: 'ui-input-autocomplete', providers: [
225
- {
226
- provide: NG_VALUE_ACCESSOR,
227
- multi: true,
228
- useExisting: InputAutocompleteComponent
229
- },
230
- {
231
- provide: NG_VALIDATORS,
232
- multi: true,
233
- useExisting: InputAutocompleteComponent
234
- }
235
- ], template: "<ui-simple-layout [ctx]=\"this\">\r\n\r\n<div class=\"control-container\" [ngClass]=\"{'has-suffix': hasSuffix, 'has-prefix': hasPrefix, 'has-clear-icon': showClearButton, 'active-icons': activeIcons, 'has-focus': hasFocus}\">\r\n <input #input matInput [type]=\"type\" [formControl]=\"componentFormControl\" [placeholder]=\"placeholder\" (keydown)=\"onKeypressed($event)\" (focus)=\"onFocus(true)\" (blur)=\"onFocus(false)\" [matAutocomplete]=\"auto\"/>\r\n\r\n <mat-autocomplete autoActiveFirstOption #auto=\"matAutocomplete\">\r\n <mat-option *ngFor=\"let option of filteredOptions\" [value]=\"option\">{{option}}</mat-option>\r\n </mat-autocomplete>\r\n <div #prefix><ng-content select=\"[slot=prefix]\"></ng-content></div>\r\n <div #suffix><ng-content select=\"[slot=suffix]\"></ng-content></div>\r\n <mat-icon *ngIf=\"prefixIcon\" class=\"prefix-icon\" [matTooltip]=\"prefixIcon.tooltip\">{{ prefixIcon.icon }}</mat-icon>\r\n <mat-icon *ngIf=\"suffixIcon\" class=\"suffix-icon\" [matTooltip]=\"suffixIcon.tooltip\">{{ suffixIcon.icon }}</mat-icon>\r\n <ui-action-icon [size]=\"'small'\" [color]=\"'warn'\" *ngIf=\"showClearButton\" (click)=\"clearValue()\" [matIcon]=\"'clear'\" class=\"clear-icon\"></ui-action-icon>\r\n</div>\r\n\r\n</ui-simple-layout>\r\n", styles: [":host{display:flex;flex-direction:column;width:100%}:host .control-container{width:100%;position:relative}:host .control-container.has-prefix ::ng-deep input,:host .control-container.has-prefix ::ng-deep textarea,:host .control-container.has-prefix ::ng-deep .mat-mdc-select-trigger{padding-left:1.8em}:host .control-container.has-suffix:not(.has-clear-icon) ::ng-deep input,:host .control-container.has-suffix:not(.has-clear-icon) ::ng-deep textarea,:host .control-container.has-suffix:not(.has-clear-icon) ::ng-deep .mat-mdc-select-trigger{padding-right:1.8em}:host .control-container.has-clear-icon:not(.has-suffix) ::ng-deep input,:host .control-container.has-clear-icon:not(.has-suffix) ::ng-deep textarea,:host .control-container.has-clear-icon:not(.has-suffix) ::ng-deep .mat-mdc-select-trigger{padding-right:1.8em}:host .control-container.has-suffix.has-clear-icon ::ng-deep input,:host .control-container.has-suffix.has-clear-icon ::ng-deep textarea,:host .control-container.has-suffix.has-clear-icon ::ng-deep .mat-mdc-select-trigger{padding-right:3.6em}:host .control-container.has-suffix.has-clear-icon ::ng-deep .clear-icon{right:1.4em!important}:host ::ng-deep [slot=suffix],:host ::ng-deep .clear-icon,:host ::ng-deep .suffix-icon{position:absolute;user-select:none;transition:color .25s;top:calc(50% - .5em);right:.2em;width:1em;height:1em;font-size:1.5em}:host ::ng-deep [slot=suffix]:not(.disabled),:host ::ng-deep .clear-icon:not(.disabled),:host ::ng-deep .suffix-icon:not(.disabled){cursor:pointer}:host ::ng-deep [slot=prefix],:host ::ng-deep .prefix-icon{position:absolute;user-select:none;transition:color .25s;top:calc(50% - .5em);left:.2em;width:1em;height:1em;font-size:1.5em}:host ::ng-deep [slot=prefix]:not(.disabled),:host ::ng-deep .prefix-icon:not(.disabled){cursor:pointer}:host ::ng-deep input,:host ::ng-deep textarea,:host ::ng-deep .mat-mdc-select-trigger,:host ::ng-deep .editor-wrapper{resize:none;width:100%;line-height:1.2em;font-size:1em;outline:none;border-style:solid;transition:border-color 333ms}:host ::ng-deep textarea.autoresize{box-sizing:content-box;width:calc(100% - 1.4em)}:host ::ng-deep ::ng-deep .mat-select-trigger,:host ::ng-deep ::ng-deep .mat-mdc-select-trigger{height:100%}:host ::ng-deep ::ng-deep .mat-select-value,:host ::ng-deep ::ng-deep .mat-mdc-select-value{vertical-align:middle}::ng-deep ui-input{display:block}\n", ":host.text-align-left ::ng-deep input{text-align:left}:host.text-align-right ::ng-deep input{text-align:right}:host.text-align-center ::ng-deep input{text-align:center}\n"] }]
236
- }], ctorParameters: function () { return [{ type: i1.ControlContainer, decorators: [{
237
- type: Optional
238
- }, {
239
- type: Host
240
- }, {
241
- type: SkipSelf
242
- }] }]; }, propDecorators: { prefixIcon: [{
243
- type: Input
244
- }], suffixIcon: [{
245
- type: Input
246
- }], type: [{
247
- type: Input
248
- }], clearButton: [{
249
- type: Input
250
- }], activeIcons: [{
251
- type: Input
252
- }], forceHasPrefix: [{
253
- type: Input
254
- }], forceHasSuffix: [{
255
- type: Input
256
- }], options: [{
257
- type: Input
258
- }], textAlignClass: [{
259
- type: HostBinding,
260
- args: ['class']
261
- }], textAlign: [{
262
- type: Input
263
- }], input: [{
264
- type: ViewChild,
265
- args: ['input']
266
- }], prefix: [{
267
- type: ViewChild,
268
- args: ['prefix', { static: true }]
269
- }], suffix: [{
270
- type: ViewChild,
271
- args: ['suffix', { static: true }]
272
- }], focusChanged: [{
273
- type: Output
274
- }], keyPressed: [{
275
- type: Output
276
- }] } });
1
+ import { Component, EventEmitter, Host, HostBinding, Input, Optional, Output, SkipSelf, ViewChild } from '@angular/core';
2
+ import { NG_VALIDATORS, NG_VALUE_ACCESSOR } from '@angular/forms';
3
+ import { UiSimpleComponent } from '../layouts/simple/ui-simple.component';
4
+ import * as i0 from "@angular/core";
5
+ import * as i1 from "@angular/forms";
6
+ import * as i2 from "@angular/common";
7
+ import * as i3 from "@angular/material/icon";
8
+ import * as i4 from "@angular/material/tooltip";
9
+ import * as i5 from "@angular/material/core";
10
+ import * as i6 from "@angular/material/input";
11
+ import * as i7 from "@angular/material/autocomplete";
12
+ import * as i8 from "../layouts/simple/ui-simple-layout.component";
13
+ import * as i9 from "../action-icon/action-icon.component";
14
+ export class InputAutocompleteComponent extends UiSimpleComponent {
15
+ get textAlignClass() {
16
+ return `text-align-${this.textAlign}`;
17
+ }
18
+ get hasPrefix() {
19
+ return (this.prefixIcon && this.prefixIcon.icon !== '') || this.prefix?.nativeElement?.innerText !== '' || this.forceHasPrefix;
20
+ }
21
+ get hasSuffix() {
22
+ return (this.suffixIcon && this.suffixIcon.icon !== '') || this.suffix?.nativeElement?.innerText !== '' || this.forceHasSuffix;
23
+ }
24
+ // control;
25
+ // onTouched = () => {};
26
+ // onChange = (value) => {};
27
+ // get showInvalid(): boolean {
28
+ // return true;
29
+ // // return this.control.touched && !!this.control.errors;
30
+ // }
31
+ // get validationMessage(): string {
32
+ // // console.log(this.control?.errors);
33
+ // let e: any = {code: 'Neznámá chyba'};
34
+ // const errors = this.control?.errors || {};
35
+ // Object.keys(errors).find(a => {
36
+ // e = {code: a, data: errors[a]};
37
+ // return true;
38
+ // });
39
+ // switch (e.code) {
40
+ // case 'required':
41
+ // return this.translateService.instant('ui.controls.validation.required');
42
+ // case 'email':
43
+ // return this.translateService.instant('ui.controls.validation.email');
44
+ // case 'matDatepickerParse':
45
+ // return this.translateService.instant('ui.controls.validation.matDatepickerParse');
46
+ // case 'maxlength':
47
+ // return this.translateService.instant('ui.controls.validation.maxlength', e.data);
48
+ // case 'minlength':
49
+ // return this.translateService.instant('ui.controls.validation.minlength', e.data);
50
+ // case 'positive':
51
+ // return this.translateService.instant(isNaN(Number(e.data)) ? 'ui.controls.validation.invalidNumber' : 'ui.controls.validation.positive');
52
+ // case 'custom':
53
+ // return this.translateService.instant(e.data);
54
+ // default:
55
+ // return this.translateService.instant(e.code);
56
+ // }
57
+ // }
58
+ get maxLenRequired() {
59
+ return true;
60
+ // return this.control.value && (this.control.value.length > (this.validators?.maxLength || 0));
61
+ }
62
+ constructor(controlContainer) {
63
+ super(null, controlContainer);
64
+ this.controlContainer = controlContainer;
65
+ this.type = 'text';
66
+ this.clearButton = false;
67
+ this.activeIcons = true;
68
+ this.forceHasPrefix = false;
69
+ this.forceHasSuffix = false;
70
+ this.options = [];
71
+ this.textAlign = 'left';
72
+ this.focusChanged = new EventEmitter();
73
+ this.keyPressed = new EventEmitter();
74
+ this.filteredOptions = [];
75
+ // control = new FormControl();
76
+ this.required = false;
77
+ this.hasFocus = false;
78
+ // this.componentFormControl = new FormControl();
79
+ // super();
80
+ // super(undefined, /*ngControl*/ translateService);
81
+ // super(control);
82
+ // console.log(control);
83
+ // if (control) {
84
+ // control.valueAccessor = this;
85
+ // }
86
+ // if (ngControl != null) {
87
+ // // Setting the value accessor directly (instead of using
88
+ // // the providers) to avoid running into a circular import.
89
+ // ngControl.valueAccessor = this;
90
+ // }
91
+ }
92
+ get showClearButton() {
93
+ return this.clearButton && this.componentFormControl?.value !== '';
94
+ }
95
+ ngOnInit() {
96
+ super.ngOnInit();
97
+ this.filteredOptions = this.options;
98
+ this.componentFormControl?.valueChanges.subscribe((v) => {
99
+ const vl = v.toLowerCase();
100
+ this.filteredOptions = this.options.filter(o => vl === '' || o.toLowerCase().includes(vl));
101
+ });
102
+ // console.log('probiha vubec oninit?');
103
+ // if (this.ngControl) {
104
+ // console.log('from ngControl....??');
105
+ // if (this.formControl) {
106
+ // this.componentFormControl = this.formControl;
107
+ // } else {
108
+ // this.componentFormControl = this.ngControl.control as UntypedFormControl;
109
+ // }
110
+ // setTimeout(() => {
111
+ // this.applyValidators();
112
+ // });
113
+ // } else {
114
+ // const control = this.formControlName ?
115
+ // (this.controlContainer as FormGroupDirective).control.get(this.formControlName) : this.formControl;
116
+ // this.componentFormControl.setValidators(control.validator);
117
+ // this.componentFormControl.valueChanges.subscribe(v => console.log('onitin sub', v));
118
+ // control._componentFormControl = this.componentFormControl;
119
+ // if (control._markAsTouched === undefined) {
120
+ // // control._componentFormControl = this.componentFormControl;
121
+ // console.log('overriding markAsTouched for', this.formControlName);
122
+ // control._markAsTouched = control.markAsTouched;
123
+ // control.markAsTouched = ({onlySelf}: { onlySelf?: boolean } = {}): void => {
124
+ // console.log('marking as touched', this.componentFormControl.value, control.value, this.xxx.value, control._componentFormControl.value);
125
+ // control._markAsTouched({onlySelf});
126
+ // setTimeout(() => control._componentFormControl.markAsTouched(), 1000);
127
+ // }
128
+ // }
129
+ // }
130
+ }
131
+ clearValue() {
132
+ this.componentFormControl?.setValue('');
133
+ this.input?.nativeElement.focus();
134
+ }
135
+ focus() {
136
+ this.input?.nativeElement.focus();
137
+ }
138
+ onFocus(focus) {
139
+ setTimeout(() => {
140
+ this.hasFocus = focus;
141
+ this.focusChanged.emit(focus);
142
+ });
143
+ }
144
+ onKeypressed($event) {
145
+ this.keyPressed.emit($event);
146
+ }
147
+ // registerOnChange(onChange: any): void {
148
+ // this.onChange = onChange;
149
+ // }
150
+ //
151
+ // registerOnTouched(onTouched: any): void {
152
+ // this.onTouched = onTouched;
153
+ // }
154
+ // registerOnValidatorChange(fn: () => void): void {
155
+ // }
156
+ // setDisabledState(isDisabled: boolean): void {
157
+ // // isDisabled ? this.control.disable() : this.control.enable();
158
+ // }
159
+ // validate(control: AbstractControl): ValidationErrors | null {
160
+ // // this.control = control;
161
+ // // console.log(control, control.value, control.errors);
162
+ // if (this.value === 'error') {
163
+ // return { customError: 'muj error'}
164
+ // } else {
165
+ // return null;
166
+ // }
167
+ // // console.log('custom validate');
168
+ // // return null;
169
+ // }
170
+ //
171
+ // writeValue(obj: any): void {
172
+ // console.log('writevalue: ', obj);
173
+ // this.componentFormControl.setValue(obj);
174
+ // // this.value = obj;
175
+ // // this.control.setValue(obj);
176
+ // }
177
+ //
178
+ // registerOnChange(fn: any): void {
179
+ // }
180
+ //
181
+ // registerOnTouched(fn: any): void {
182
+ // }
183
+ //
184
+ // setDisabledState(isDisabled: boolean): void {
185
+ // }
186
+ // modelChange($event: any) {
187
+ // console.log($event);
188
+ // this.onTouched();
189
+ // this.onChange($event)
190
+ // }
191
+ // validate(control: AbstractControl): ValidationErrors | null {
192
+ // console.log(this.label, 'validate');
193
+ // return this.componentFormControl.errors;
194
+ // // return undefined;
195
+ // }
196
+ validate(control) {
197
+ if (this.parentFormControl) {
198
+ return this.parentFormControl._componentFormControl.errors;
199
+ }
200
+ // console.log('validate', this.componentFormControl.errors);
201
+ // // this.componentFormControl.setErrors( { custom: 'xxx' });
202
+ // this.componentFormControl.setErrors( this.componentFormControl.errors);
203
+ // console.log('validate 2', this.componentFormControl.errors);
204
+ // return this.componentFormControl.errors;
205
+ // console.log(this.componentFormControl.errors, control.errors, this.parentFormControl.errors, this);
206
+ // return this.componentFormControl.errors;
207
+ }
208
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: InputAutocompleteComponent, deps: [{ token: i1.ControlContainer, host: true, optional: true, skipSelf: true }], target: i0.ɵɵFactoryTarget.Component }); }
209
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.11", type: InputAutocompleteComponent, selector: "ui-input-autocomplete", inputs: { prefixIcon: "prefixIcon", suffixIcon: "suffixIcon", type: "type", clearButton: "clearButton", activeIcons: "activeIcons", forceHasPrefix: "forceHasPrefix", forceHasSuffix: "forceHasSuffix", options: "options", textAlign: "textAlign" }, outputs: { focusChanged: "focusChanged", keyPressed: "keyPressed" }, host: { properties: { "class": "this.textAlignClass" } }, providers: [
210
+ {
211
+ provide: NG_VALUE_ACCESSOR,
212
+ multi: true,
213
+ useExisting: InputAutocompleteComponent
214
+ },
215
+ {
216
+ provide: NG_VALIDATORS,
217
+ multi: true,
218
+ useExisting: InputAutocompleteComponent
219
+ }
220
+ ], viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true }, { propertyName: "prefix", first: true, predicate: ["prefix"], descendants: true, static: true }, { propertyName: "suffix", first: true, predicate: ["suffix"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<ui-simple-layout [ctx]=\"this\">\r\n\r\n<div class=\"control-container\" [ngClass]=\"{'has-suffix': hasSuffix, 'has-prefix': hasPrefix, 'has-clear-icon': showClearButton, 'active-icons': activeIcons, 'has-focus': hasFocus}\">\r\n <input #input matInput [type]=\"type\" [formControl]=\"componentFormControl\" [placeholder]=\"placeholder\" (keydown)=\"onKeypressed($event)\" (focus)=\"onFocus(true)\" (blur)=\"onFocus(false)\" [matAutocomplete]=\"auto\"/>\r\n\r\n <mat-autocomplete autoActiveFirstOption #auto=\"matAutocomplete\">\r\n <mat-option *ngFor=\"let option of filteredOptions\" [value]=\"option\">{{option}}</mat-option>\r\n </mat-autocomplete>\r\n <div #prefix><ng-content select=\"[slot=prefix]\"></ng-content></div>\r\n <div #suffix><ng-content select=\"[slot=suffix]\"></ng-content></div>\r\n <mat-icon *ngIf=\"prefixIcon\" class=\"prefix-icon\" [matTooltip]=\"prefixIcon.tooltip\">{{ prefixIcon.icon }}</mat-icon>\r\n <mat-icon *ngIf=\"suffixIcon\" class=\"suffix-icon\" [matTooltip]=\"suffixIcon.tooltip\">{{ suffixIcon.icon }}</mat-icon>\r\n <ui-action-icon [size]=\"'small'\" [color]=\"'warn'\" *ngIf=\"showClearButton\" (click)=\"clearValue()\" [matIcon]=\"'clear'\" class=\"clear-icon\"></ui-action-icon>\r\n</div>\r\n\r\n</ui-simple-layout>\r\n", styles: [":host{display:flex;flex-direction:column;width:100%}:host .control-container{width:100%;position:relative}:host .control-container.has-prefix ::ng-deep input,:host .control-container.has-prefix ::ng-deep textarea,:host .control-container.has-prefix ::ng-deep .mat-mdc-select-trigger{padding-left:1.8em}:host .control-container.has-suffix:not(.has-clear-icon) ::ng-deep input,:host .control-container.has-suffix:not(.has-clear-icon) ::ng-deep textarea,:host .control-container.has-suffix:not(.has-clear-icon) ::ng-deep .mat-mdc-select-trigger{padding-right:1.8em}:host .control-container.has-clear-icon:not(.has-suffix) ::ng-deep input,:host .control-container.has-clear-icon:not(.has-suffix) ::ng-deep textarea,:host .control-container.has-clear-icon:not(.has-suffix) ::ng-deep .mat-mdc-select-trigger{padding-right:1.8em}:host .control-container.has-suffix.has-clear-icon ::ng-deep input,:host .control-container.has-suffix.has-clear-icon ::ng-deep textarea,:host .control-container.has-suffix.has-clear-icon ::ng-deep .mat-mdc-select-trigger{padding-right:3.6em}:host .control-container.has-suffix.has-clear-icon ::ng-deep .clear-icon{right:1.4em!important}:host ::ng-deep [slot=suffix],:host ::ng-deep .clear-icon,:host ::ng-deep .suffix-icon{position:absolute;-webkit-user-select:none;user-select:none;transition:color .25s;top:calc(50% - .5em);right:.2em;width:1em;height:1em;font-size:1.5em}:host ::ng-deep [slot=suffix]:not(.disabled),:host ::ng-deep .clear-icon:not(.disabled),:host ::ng-deep .suffix-icon:not(.disabled){cursor:pointer}:host ::ng-deep [slot=prefix],:host ::ng-deep .prefix-icon{position:absolute;-webkit-user-select:none;user-select:none;transition:color .25s;top:calc(50% - .5em);left:.2em;width:1em;height:1em;font-size:1.5em}:host ::ng-deep [slot=prefix]:not(.disabled),:host ::ng-deep .prefix-icon:not(.disabled){cursor:pointer}:host ::ng-deep input,:host ::ng-deep textarea,:host ::ng-deep .mat-mdc-select-trigger,:host ::ng-deep .editor-wrapper{resize:none;width:100%;line-height:1.2em;font-size:1em;outline:none;border-style:solid;transition:border-color 333ms}:host ::ng-deep textarea.autoresize{box-sizing:content-box;width:calc(100% - 1.4em)}:host ::ng-deep ::ng-deep .mat-select-trigger,:host ::ng-deep ::ng-deep .mat-mdc-select-trigger{height:100%}:host ::ng-deep ::ng-deep .mat-select-value,:host ::ng-deep ::ng-deep .mat-mdc-select-value{vertical-align:middle}::ng-deep ui-input{display:block}\n", ":host.text-align-left ::ng-deep input{text-align:left}:host.text-align-right ::ng-deep input{text-align:right}:host.text-align-center ::ng-deep input{text-align:center}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i4.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "component", type: i5.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "directive", type: i6.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i7.MatAutocomplete, selector: "mat-autocomplete", inputs: ["disableRipple", "hideSingleSelectionIndicator"], exportAs: ["matAutocomplete"] }, { kind: "directive", type: i7.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", exportAs: ["matAutocompleteTrigger"] }, { kind: "component", type: i8.UiSimpleLayoutComponent, selector: "ui-simple-layout", inputs: ["ctx"] }, { kind: "component", type: i9.ActionIconComponent, selector: "ui-action-icon", inputs: ["size", "color", "disabled", "busy", "matIcon"] }] }); }
221
+ }
222
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: InputAutocompleteComponent, decorators: [{
223
+ type: Component,
224
+ args: [{ selector: 'ui-input-autocomplete', providers: [
225
+ {
226
+ provide: NG_VALUE_ACCESSOR,
227
+ multi: true,
228
+ useExisting: InputAutocompleteComponent
229
+ },
230
+ {
231
+ provide: NG_VALIDATORS,
232
+ multi: true,
233
+ useExisting: InputAutocompleteComponent
234
+ }
235
+ ], template: "<ui-simple-layout [ctx]=\"this\">\r\n\r\n<div class=\"control-container\" [ngClass]=\"{'has-suffix': hasSuffix, 'has-prefix': hasPrefix, 'has-clear-icon': showClearButton, 'active-icons': activeIcons, 'has-focus': hasFocus}\">\r\n <input #input matInput [type]=\"type\" [formControl]=\"componentFormControl\" [placeholder]=\"placeholder\" (keydown)=\"onKeypressed($event)\" (focus)=\"onFocus(true)\" (blur)=\"onFocus(false)\" [matAutocomplete]=\"auto\"/>\r\n\r\n <mat-autocomplete autoActiveFirstOption #auto=\"matAutocomplete\">\r\n <mat-option *ngFor=\"let option of filteredOptions\" [value]=\"option\">{{option}}</mat-option>\r\n </mat-autocomplete>\r\n <div #prefix><ng-content select=\"[slot=prefix]\"></ng-content></div>\r\n <div #suffix><ng-content select=\"[slot=suffix]\"></ng-content></div>\r\n <mat-icon *ngIf=\"prefixIcon\" class=\"prefix-icon\" [matTooltip]=\"prefixIcon.tooltip\">{{ prefixIcon.icon }}</mat-icon>\r\n <mat-icon *ngIf=\"suffixIcon\" class=\"suffix-icon\" [matTooltip]=\"suffixIcon.tooltip\">{{ suffixIcon.icon }}</mat-icon>\r\n <ui-action-icon [size]=\"'small'\" [color]=\"'warn'\" *ngIf=\"showClearButton\" (click)=\"clearValue()\" [matIcon]=\"'clear'\" class=\"clear-icon\"></ui-action-icon>\r\n</div>\r\n\r\n</ui-simple-layout>\r\n", styles: [":host{display:flex;flex-direction:column;width:100%}:host .control-container{width:100%;position:relative}:host .control-container.has-prefix ::ng-deep input,:host .control-container.has-prefix ::ng-deep textarea,:host .control-container.has-prefix ::ng-deep .mat-mdc-select-trigger{padding-left:1.8em}:host .control-container.has-suffix:not(.has-clear-icon) ::ng-deep input,:host .control-container.has-suffix:not(.has-clear-icon) ::ng-deep textarea,:host .control-container.has-suffix:not(.has-clear-icon) ::ng-deep .mat-mdc-select-trigger{padding-right:1.8em}:host .control-container.has-clear-icon:not(.has-suffix) ::ng-deep input,:host .control-container.has-clear-icon:not(.has-suffix) ::ng-deep textarea,:host .control-container.has-clear-icon:not(.has-suffix) ::ng-deep .mat-mdc-select-trigger{padding-right:1.8em}:host .control-container.has-suffix.has-clear-icon ::ng-deep input,:host .control-container.has-suffix.has-clear-icon ::ng-deep textarea,:host .control-container.has-suffix.has-clear-icon ::ng-deep .mat-mdc-select-trigger{padding-right:3.6em}:host .control-container.has-suffix.has-clear-icon ::ng-deep .clear-icon{right:1.4em!important}:host ::ng-deep [slot=suffix],:host ::ng-deep .clear-icon,:host ::ng-deep .suffix-icon{position:absolute;-webkit-user-select:none;user-select:none;transition:color .25s;top:calc(50% - .5em);right:.2em;width:1em;height:1em;font-size:1.5em}:host ::ng-deep [slot=suffix]:not(.disabled),:host ::ng-deep .clear-icon:not(.disabled),:host ::ng-deep .suffix-icon:not(.disabled){cursor:pointer}:host ::ng-deep [slot=prefix],:host ::ng-deep .prefix-icon{position:absolute;-webkit-user-select:none;user-select:none;transition:color .25s;top:calc(50% - .5em);left:.2em;width:1em;height:1em;font-size:1.5em}:host ::ng-deep [slot=prefix]:not(.disabled),:host ::ng-deep .prefix-icon:not(.disabled){cursor:pointer}:host ::ng-deep input,:host ::ng-deep textarea,:host ::ng-deep .mat-mdc-select-trigger,:host ::ng-deep .editor-wrapper{resize:none;width:100%;line-height:1.2em;font-size:1em;outline:none;border-style:solid;transition:border-color 333ms}:host ::ng-deep textarea.autoresize{box-sizing:content-box;width:calc(100% - 1.4em)}:host ::ng-deep ::ng-deep .mat-select-trigger,:host ::ng-deep ::ng-deep .mat-mdc-select-trigger{height:100%}:host ::ng-deep ::ng-deep .mat-select-value,:host ::ng-deep ::ng-deep .mat-mdc-select-value{vertical-align:middle}::ng-deep ui-input{display:block}\n", ":host.text-align-left ::ng-deep input{text-align:left}:host.text-align-right ::ng-deep input{text-align:right}:host.text-align-center ::ng-deep input{text-align:center}\n"] }]
236
+ }], ctorParameters: function () { return [{ type: i1.ControlContainer, decorators: [{
237
+ type: Optional
238
+ }, {
239
+ type: Host
240
+ }, {
241
+ type: SkipSelf
242
+ }] }]; }, propDecorators: { prefixIcon: [{
243
+ type: Input
244
+ }], suffixIcon: [{
245
+ type: Input
246
+ }], type: [{
247
+ type: Input
248
+ }], clearButton: [{
249
+ type: Input
250
+ }], activeIcons: [{
251
+ type: Input
252
+ }], forceHasPrefix: [{
253
+ type: Input
254
+ }], forceHasSuffix: [{
255
+ type: Input
256
+ }], options: [{
257
+ type: Input
258
+ }], textAlignClass: [{
259
+ type: HostBinding,
260
+ args: ['class']
261
+ }], textAlign: [{
262
+ type: Input
263
+ }], input: [{
264
+ type: ViewChild,
265
+ args: ['input']
266
+ }], prefix: [{
267
+ type: ViewChild,
268
+ args: ['prefix', { static: true }]
269
+ }], suffix: [{
270
+ type: ViewChild,
271
+ args: ['suffix', { static: true }]
272
+ }], focusChanged: [{
273
+ type: Output
274
+ }], keyPressed: [{
275
+ type: Output
276
+ }] } });
277
277
  //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5wdXQtYXV0b2NvbXBsZXRlLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3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