@rlucan/ui 18.2.1 → 18.2.3

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.
@@ -1016,20 +1016,26 @@ class FileComponent {
1016
1016
  if (changes['srcData']) {
1017
1017
  this.nativeFileSizeRatio = -1;
1018
1018
  if (changes['srcData'].currentValue.nativeFile) {
1019
- this.src = this.domSanitizer.bypassSecurityTrustUrl(URL.createObjectURL(changes['srcData'].currentValue.nativeFile));
1020
- const img = new Image();
1021
- img.onload = () => {
1022
- if (this.fitImageFileSize) {
1023
- this.nativeFileSizeRatio = Math.max(img.width / this.uiFileSize.width, img.height / this.uiFileSize.height, 1);
1024
- }
1025
- else {
1026
- this.nativeFileSizeRatio = 1;
1027
- }
1028
- this.nativeFileWidth = img.width / this.nativeFileSizeRatio;
1029
- this.nativeFileHeight = img.height / this.nativeFileSizeRatio;
1030
- URL.revokeObjectURL(img.src);
1031
- };
1032
- img.src = URL.createObjectURL(changes['srcData'].currentValue.nativeFile);
1019
+ const nf = changes['srcData'].currentValue.nativeFile;
1020
+ if (nf.type.startsWith('image/') || nf.type.startsWith('video/')) {
1021
+ this.src = this.domSanitizer.bypassSecurityTrustUrl(URL.createObjectURL(changes['srcData'].currentValue.nativeFile));
1022
+ const img = new Image();
1023
+ img.onload = () => {
1024
+ if (this.fitImageFileSize) {
1025
+ this.nativeFileSizeRatio = Math.max(img.width / this.uiFileSize.width, img.height / this.uiFileSize.height, 1);
1026
+ }
1027
+ else {
1028
+ this.nativeFileSizeRatio = 1;
1029
+ }
1030
+ this.nativeFileWidth = img.width / this.nativeFileSizeRatio;
1031
+ this.nativeFileHeight = img.height / this.nativeFileSizeRatio;
1032
+ URL.revokeObjectURL(img.src);
1033
+ };
1034
+ img.src = URL.createObjectURL(changes['srcData'].currentValue.nativeFile);
1035
+ }
1036
+ else {
1037
+ this.src = this.fileServiceConfig.getMediaSrc(this.uiFileSize, { name: nf.name, mimeType: nf.type }, this.srcOptions);
1038
+ }
1033
1039
  }
1034
1040
  else {
1035
1041
  this.src = this.fileServiceConfig.getMediaSrc(this.uiFileSize, changes['srcData'].currentValue, this.srcOptions);
@@ -1046,11 +1052,11 @@ class FileComponent {
1046
1052
  }
1047
1053
  }
1048
1054
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: FileComponent, deps: [{ token: UI_FILESERVICE, optional: true }, { token: i1$1.DomSanitizer }, { token: UiFileService }], target: i0.ɵɵFactoryTarget.Component }); }
1049
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.1", type: FileComponent, selector: "ui-file", inputs: { fileSize: "fileSize", srcOptions: "srcOptions", srcData: "srcData", srcUrl: "srcUrl" }, host: { properties: { "style.width": "this.width", "style.maxWidth": "this.maxWidth", "style.height": "this.height", "style.maxHeight": "this.maxHeight" } }, usesOnChanges: true, ngImport: i0, template: "<mat-spinner *ngIf=\"visible\"></mat-spinner>\r\n<img *ngIf=\"!isVideo && useRetinaSrc\" [ngStyle]=\"imgStyle\" [src]=\"src\" [srcset]=\"src + ' 2x'\"/>\r\n<img *ngIf=\"!isVideo && !useRetinaSrc\" [ngStyle]=\"imgStyle\" [src]=\"src\"/>\r\n<video *ngIf=\"isVideo\" muted controls [src]=\"src\" [ngStyle]=\"imgStyle\"></video>\r\n\r\n", styles: [":host{display:flex;align-items:center;justify-content:center;position:relative}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i4$3.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }] }); }
1055
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.1", type: FileComponent, selector: "ui-file", inputs: { fileSize: "fileSize", srcOptions: "srcOptions", srcData: "srcData", srcUrl: "srcUrl" }, host: { properties: { "style.width": "this.width", "style.maxWidth": "this.maxWidth", "style.height": "this.height", "style.maxHeight": "this.maxHeight" } }, usesOnChanges: true, ngImport: i0, template: "<mat-spinner *ngIf=\"visible\"></mat-spinner>\r\n<img *ngIf=\"!isVideo && useRetinaSrc\" [ngStyle]=\"imgStyle\" [src]=\"src\" [srcset]=\"src + ' 2x'\"/>\r\n<img *ngIf=\"!isVideo && !useRetinaSrc\" [ngStyle]=\"imgStyle\" [src]=\"src\" />\r\n<video *ngIf=\"isVideo\" muted controls [src]=\"src\" [ngStyle]=\"imgStyle\"></video>\r\n\r\n", styles: [":host{display:flex;align-items:center;justify-content:center;position:relative}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i4$3.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }] }); }
1050
1056
  }
1051
1057
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: FileComponent, decorators: [{
1052
1058
  type: Component,
1053
- args: [{ selector: 'ui-file', template: "<mat-spinner *ngIf=\"visible\"></mat-spinner>\r\n<img *ngIf=\"!isVideo && useRetinaSrc\" [ngStyle]=\"imgStyle\" [src]=\"src\" [srcset]=\"src + ' 2x'\"/>\r\n<img *ngIf=\"!isVideo && !useRetinaSrc\" [ngStyle]=\"imgStyle\" [src]=\"src\"/>\r\n<video *ngIf=\"isVideo\" muted controls [src]=\"src\" [ngStyle]=\"imgStyle\"></video>\r\n\r\n", styles: [":host{display:flex;align-items:center;justify-content:center;position:relative}\n"] }]
1059
+ args: [{ selector: 'ui-file', template: "<mat-spinner *ngIf=\"visible\"></mat-spinner>\r\n<img *ngIf=\"!isVideo && useRetinaSrc\" [ngStyle]=\"imgStyle\" [src]=\"src\" [srcset]=\"src + ' 2x'\"/>\r\n<img *ngIf=\"!isVideo && !useRetinaSrc\" [ngStyle]=\"imgStyle\" [src]=\"src\" />\r\n<video *ngIf=\"isVideo\" muted controls [src]=\"src\" [ngStyle]=\"imgStyle\"></video>\r\n\r\n", styles: [":host{display:flex;align-items:center;justify-content:center;position:relative}\n"] }]
1054
1060
  }], ctorParameters: () => [{ type: undefined, decorators: [{
1055
1061
  type: Optional
1056
1062
  }, {
@@ -3272,6 +3278,7 @@ class AutoCompleteComponent extends UiBaseComponent {
3272
3278
  this.displayAttribute = 'name';
3273
3279
  this.idAttribute = 'id';
3274
3280
  this.panelClass = '';
3281
+ this.clearButton = false;
3275
3282
  this.filteredOptions = [];
3276
3283
  this.filteredMaxItemsShown = this.SHOWN_USERS_DELTA;
3277
3284
  // skipBlur = false;
@@ -3303,7 +3310,6 @@ class AutoCompleteComponent extends UiBaseComponent {
3303
3310
  }
3304
3311
  }
3305
3312
  ngOnInit() {
3306
- console.log('ng on init');
3307
3313
  super.ngOnInit();
3308
3314
  // if (this.formControlName && this.controlContainer.control) {
3309
3315
  // this.control = this.controlContainer.control.get(this.formControlName) as FormControl;
@@ -3603,11 +3609,11 @@ class AutoCompleteComponent extends UiBaseComponent {
3603
3609
  }
3604
3610
  }
3605
3611
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: AutoCompleteComponent, deps: [{ token: i1.ControlContainer, host: true, optional: true, skipSelf: true }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
3606
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.1", type: AutoCompleteComponent, selector: "ui-auto-complete", inputs: { templates: "templates", options: "options", multiple: "multiple", allowNew: "allowNew", displayAttribute: "displayAttribute", idAttribute: "idAttribute", panelClass: "panelClass", optionDisabled: "optionDisabled", optionFormatter: "optionFormatter" }, providers: [{
3612
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.1", type: AutoCompleteComponent, selector: "ui-auto-complete", inputs: { templates: "templates", options: "options", multiple: "multiple", allowNew: "allowNew", displayAttribute: "displayAttribute", idAttribute: "idAttribute", panelClass: "panelClass", clearButton: "clearButton", optionDisabled: "optionDisabled", optionFormatter: "optionFormatter" }, providers: [{
3607
3613
  provide: NG_VALUE_ACCESSOR,
3608
3614
  multi: true,
3609
3615
  useExisting: AutoCompleteComponent
3610
- }], viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true }, { propertyName: "optionsTrigger", first: true, predicate: ["trigger"], descendants: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<div class=\"wrapper\" #wrapper>\r\n <div *ngIf=\"optionsVisible\" (click)=\"toggleDropdown()\" class=\"overlay\"></div>\r\n <ui-input [formControl]=\"inputControl\" #input #trigger=\"cdkOverlayOrigin\" cdkOverlayOrigin\r\n (focusChanged)=\"inputFocusChanged($event)\" (keyPressed)=\"keyPressed($event)\" [placeholder]=\"placeholder\"\r\n [useInputMessages]=\"'never'\" [label]=\"label\">\r\n <div slot=\"prefix\">\r\n <ng-content select=\"[slot=acprefix]\"></ng-content>\r\n </div>\r\n </ui-input>\r\n\r\n <ng-template cdkConnectedOverlay [cdkConnectedOverlayOrigin]=\"trigger\" [cdkConnectedOverlayOpen]=\"optionsVisible\">\r\n <div class=\"options-box\" [class]=\"panelClass\" style=\"display: flex; flex-direction: column\"\r\n [ngStyle]=\"{width: wrapper.offsetWidth + 'px'}\">\r\n <div class=\"options\" #options>\r\n\r\n <ng-container *ngFor=\"let option of filteredOptions; index as i\">\r\n <div *ngIf=\"i < filteredMaxItemsShown\" class=\"option-container\"\r\n [ngClass]=\"{selected: focusedOption === option}\">\r\n @if (multiple) {\r\n <mat-checkbox [checked]=\"optionChecked(option) || option.unselectable\"\r\n [disabled]=\"option.unselectable\" (change)=\"toggleOptionCheckboxed(option)\">\r\n <div class=\"option-container-inner\" (click)=\"select(option)\">\r\n <div class=\"option-option\" uiForceVisibility [visibilityWithin]=\"options\"\r\n [visibilityPadding]=\"4\" *ngIf=\"focusedOption === option\"\r\n [ngClass]=\"{unselectable: option.unselectable}\">\r\n {{ optionFormatter(option) }}\r\n </div>\r\n <div class=\"option-option\" *ngIf=\"focusedOption !== option\"\r\n [ngClass]=\"{unselectable: option.unselectable}\">\r\n {{ optionFormatter(option) }}\r\n </div>\r\n <mat-icon *ngIf=\"!hasCheckboxSelected && !option.unselectable\">north_west</mat-icon>\r\n </div>\r\n </mat-checkbox>\r\n } @else {\r\n <div class=\"option-container-inner\" (click)=\"select(option)\">\r\n <div class=\"option-option\" uiForceVisibility [visibilityWithin]=\"options\"\r\n [visibilityPadding]=\"4\" *ngIf=\"focusedOption === option\"\r\n [ngClass]=\"{unselectable: option.unselectable}\">\r\n @if (templates?.optionTemplate) {\r\n <ng-template [ngTemplateOutlet]=\"templates?.optionTemplate\"\r\n [ngTemplateOutletContext]=\"{option: option}\"></ng-template>\r\n } @else {\r\n {{ optionFormatter(option) }}\r\n }\r\n </div>\r\n <div class=\"option-option\" *ngIf=\"focusedOption !== option\"\r\n [ngClass]=\"{unselectable: option.unselectable}\">\r\n @if (templates?.optionTemplate) {\r\n <ng-template [ngTemplateOutlet]=\"templates?.optionTemplate\"\r\n [ngTemplateOutletContext]=\"{option: option}\"></ng-template>\r\n } @else {\r\n {{ optionFormatter(option) }}\r\n }\r\n </div>\r\n <mat-icon *ngIf=\"!hasCheckboxSelected && !option.unselectable\">north_west</mat-icon>\r\n </div>\r\n }\r\n </div>\r\n </ng-container>\r\n\r\n <div *ngIf=\"filteredOptions.length >= filteredMaxItemsShown\" class=\"option-container\" uiForceVisibility\r\n [visibilityWithin]=\"options\" [visibilityEmitChange]=\"true\" (visibilityChanged)=\"loadMore($event)\">\r\n &nbsp;\r\n </div>\r\n\r\n\r\n <div *ngIf=\"filteredOptions.length === 0 && !focusedOption\" class=\"new-user\">\r\n @if (templates?.notFound) {\r\n <ng-template [ngTemplateOutlet]=\"templates?.notFound\"\r\n [ngTemplateOutletContext]=\"{searchText: inputControl.value}\"></ng-template>\r\n } @else {\r\n <ng-container *ngIf=\"alreadyAdded\">\r\n <div style=\"text-align: center\">U\u017Eivatel {{ inputControl.value }} u\u017E je mezi dlu\u017En\u00EDky</div>\r\n </ng-container>\r\n <ng-container *ngIf=\"!alreadyAdded\">\r\n <div style=\"text-align: center; padding: 1em 0\">U\u017Eivatele\r\n <strong>{{ inputControl.value }}</strong> nezn\u00E1me\r\n </div>\r\n <ui-button *ngIf=\"allowNew\" style=\"margin-top: 6px;\" [size]=\"'small'\" [label]=\"'P\u0159idat jej?'\"\r\n (click)=\"newOption()\"></ui-button>\r\n </ng-container>\r\n }\r\n </div>\r\n <div *ngIf=\"filteredOptions.length === 0 && focusedOption\" class=\"new-user\">\r\n <div style=\"text-align: center\">Nezn\u00E1m\u00FD u\u017Eivatel {{ inputControl.value }}</div>\r\n </div>\r\n </div>\r\n\r\n <div *ngIf=\"hasCheckboxSelected && filteredOptions.length > 0\" class=\"checkbox-buttons\">\r\n <ui-button [size]=\"'small'\" [kind]=\"'basic'\" [label]=\"'Zru\u0161it v\u00FDb\u011Br'\"\r\n (click)=\"cancelCheckboxSelection()\"></ui-button>\r\n <ui-button [size]=\"'small'\" [label]=\"'Pou\u017E\u00EDt v\u00FDb\u011Br (' + checkboxSelection.size + ')'\"\r\n (click)=\"useCheckboxSelection()\"></ui-button>\r\n </div>\r\n </div>\r\n </ng-template>\r\n</div>\r\n\r\n", styles: [":host .wrapper{position:relative;outline:none;display:flex}:host .overlay{position:fixed;inset:0}.options-box{max-height:248px;min-width:310px;box-shadow:0 2px 4px -1px #07254833,0 4px 5px #07254824,0 1px 10px #0725481f}.options-box .checkbox-buttons{display:flex;padding:8px 4px 4px;justify-content:space-between}.options-box .options{padding:4px;overflow:auto;scroll-behavior:smooth;display:flex;flex-direction:column}.options-box .options .option-container{padding:0 0 0 12px;display:flex;align-items:center}.options-box .options .option-container:hover{cursor:pointer}.options-box .options .option-container mat-checkbox{width:100%}.options-box .options .option-container mat-checkbox ::ng-deep .mdc-form-field{width:100%}.options-box .options .option-container mat-checkbox ::ng-deep .mdc-form-field label{display:flex;width:100%}.options-box .options .option-container-inner{flex:1 1 100%;display:flex;align-items:center}.options-box .options .option-container-inner .option-option{flex:1 1 100%;padding:10px 0 10px 8px}.options-box .options .option-container-inner mat-icon{display:none;font-size:20px;height:20px;margin-right:8px}.options-box .options .option-container-inner:hover mat-icon{display:block}\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: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i4$4.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { 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: i5.CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "directive", type: i5.CdkOverlayOrigin, selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", exportAs: ["cdkOverlayOrigin"] }, { kind: "component", type: ButtonComponent, selector: "ui-button", inputs: ["type", "matIconPrefix", "label", "disabled", "busy", "kind", "color", "size", "formInvalid"] }, { kind: "component", type: InputComponent, selector: "ui-input", inputs: ["prefixIcon", "suffixIcon", "type", "clearButton", "activeIcons", "forceHasPrefix", "forceHasSuffix", "textAlign"], outputs: ["focusChanged", "keyPressed"] }, { kind: "directive", type: ForceVisibilityDirective, selector: "[uiForceVisibility]", inputs: ["visibilityWithin", "visibilityPadding", "visibilityOnRequestOnly", "visibilityEmitChange", "visibilityFromTop", "visibilityCheckEnabled"], outputs: ["visibilityChanged"], exportAs: ["ForceVisibilityDirective"] }] }); }
3616
+ }], viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true }, { propertyName: "optionsTrigger", first: true, predicate: ["trigger"], descendants: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<div class=\"wrapper\" #wrapper>\r\n <div *ngIf=\"optionsVisible\" (click)=\"toggleDropdown()\" class=\"overlay\"></div>\r\n <ui-input [formControl]=\"inputControl\" #input #trigger=\"cdkOverlayOrigin\" cdkOverlayOrigin\r\n (focusChanged)=\"inputFocusChanged($event)\" (keyPressed)=\"keyPressed($event)\" [placeholder]=\"placeholder\"\r\n [useInputMessages]=\"'never'\" [clearButton]=\"clearButton\" [label]=\"label\">\r\n <div slot=\"prefix\">\r\n <ng-content select=\"[slot=acprefix]\"></ng-content>\r\n </div>\r\n </ui-input>\r\n\r\n <ng-template cdkConnectedOverlay [cdkConnectedOverlayOrigin]=\"trigger\" [cdkConnectedOverlayOpen]=\"optionsVisible\">\r\n <div class=\"options-box\" [class]=\"panelClass\" style=\"display: flex; flex-direction: column\"\r\n [ngStyle]=\"{width: wrapper.offsetWidth + 'px'}\">\r\n <div class=\"options\" #options>\r\n\r\n <ng-container *ngFor=\"let option of filteredOptions; index as i\">\r\n <div *ngIf=\"i < filteredMaxItemsShown\" class=\"option-container\"\r\n [ngClass]=\"{selected: focusedOption === option}\">\r\n @if (multiple) {\r\n <mat-checkbox [checked]=\"optionChecked(option) || option.unselectable\"\r\n [disabled]=\"option.unselectable\" (change)=\"toggleOptionCheckboxed(option)\">\r\n <div class=\"option-container-inner\" (click)=\"select(option)\">\r\n <div class=\"option-option\" uiForceVisibility [visibilityWithin]=\"options\"\r\n [visibilityPadding]=\"4\" *ngIf=\"focusedOption === option\"\r\n [ngClass]=\"{unselectable: option.unselectable}\">\r\n {{ optionFormatter(option) }}\r\n </div>\r\n <div class=\"option-option\" *ngIf=\"focusedOption !== option\"\r\n [ngClass]=\"{unselectable: option.unselectable}\">\r\n {{ optionFormatter(option) }}\r\n </div>\r\n <mat-icon *ngIf=\"!hasCheckboxSelected && !option.unselectable\">north_west</mat-icon>\r\n </div>\r\n </mat-checkbox>\r\n } @else {\r\n <div class=\"option-container-inner\" (click)=\"select(option)\">\r\n <div class=\"option-option\" uiForceVisibility [visibilityWithin]=\"options\"\r\n [visibilityPadding]=\"4\" *ngIf=\"focusedOption === option\"\r\n [ngClass]=\"{unselectable: option.unselectable}\">\r\n @if (templates?.optionTemplate) {\r\n <ng-template [ngTemplateOutlet]=\"templates?.optionTemplate\"\r\n [ngTemplateOutletContext]=\"{option: option}\"></ng-template>\r\n } @else {\r\n {{ optionFormatter(option) }}\r\n }\r\n </div>\r\n <div class=\"option-option\" *ngIf=\"focusedOption !== option\"\r\n [ngClass]=\"{unselectable: option.unselectable}\">\r\n @if (templates?.optionTemplate) {\r\n <ng-template [ngTemplateOutlet]=\"templates?.optionTemplate\"\r\n [ngTemplateOutletContext]=\"{option: option}\"></ng-template>\r\n } @else {\r\n {{ optionFormatter(option) }}\r\n }\r\n </div>\r\n <mat-icon *ngIf=\"!hasCheckboxSelected && !option.unselectable\">north_west</mat-icon>\r\n </div>\r\n }\r\n </div>\r\n </ng-container>\r\n\r\n <div *ngIf=\"filteredOptions.length >= filteredMaxItemsShown\" class=\"option-container\" uiForceVisibility\r\n [visibilityWithin]=\"options\" [visibilityEmitChange]=\"true\" (visibilityChanged)=\"loadMore($event)\">\r\n &nbsp;\r\n </div>\r\n\r\n\r\n <div *ngIf=\"filteredOptions.length === 0 && !focusedOption\" class=\"new-user\">\r\n @if (templates?.notFound) {\r\n <ng-template [ngTemplateOutlet]=\"templates?.notFound\"\r\n [ngTemplateOutletContext]=\"{searchText: inputControl.value}\"></ng-template>\r\n } @else {\r\n <ng-container *ngIf=\"alreadyAdded\">\r\n <div style=\"text-align: center\">U\u017Eivatel {{ inputControl.value }} u\u017E je mezi dlu\u017En\u00EDky</div>\r\n </ng-container>\r\n <ng-container *ngIf=\"!alreadyAdded\">\r\n <div style=\"text-align: center; padding: 1em 0\">U\u017Eivatele\r\n <strong>{{ inputControl.value }}</strong> nezn\u00E1me\r\n </div>\r\n <ui-button *ngIf=\"allowNew\" style=\"margin-top: 6px;\" [size]=\"'small'\" [label]=\"'P\u0159idat jej?'\"\r\n (click)=\"newOption()\"></ui-button>\r\n </ng-container>\r\n }\r\n </div>\r\n <div *ngIf=\"filteredOptions.length === 0 && focusedOption\" class=\"new-user\">\r\n <div style=\"text-align: center\">Nezn\u00E1m\u00FD u\u017Eivatel {{ inputControl.value }}</div>\r\n </div>\r\n </div>\r\n\r\n <div *ngIf=\"hasCheckboxSelected && filteredOptions.length > 0\" class=\"checkbox-buttons\">\r\n <ui-button [size]=\"'small'\" [kind]=\"'basic'\" [label]=\"'Zru\u0161it v\u00FDb\u011Br'\"\r\n (click)=\"cancelCheckboxSelection()\"></ui-button>\r\n <ui-button [size]=\"'small'\" [label]=\"'Pou\u017E\u00EDt v\u00FDb\u011Br (' + checkboxSelection.size + ')'\"\r\n (click)=\"useCheckboxSelection()\"></ui-button>\r\n </div>\r\n </div>\r\n </ng-template>\r\n</div>\r\n\r\n", styles: [":host .wrapper{position:relative;outline:none;display:flex}:host .overlay{position:fixed;inset:0}.options-box{max-height:248px;min-width:310px;box-shadow:0 2px 4px -1px #07254833,0 4px 5px #07254824,0 1px 10px #0725481f}.options-box .checkbox-buttons{display:flex;padding:8px 4px 4px;justify-content:space-between}.options-box .options{padding:4px;overflow:auto;scroll-behavior:smooth;display:flex;flex-direction:column}.options-box .options .option-container{padding:0 0 0 12px;display:flex;align-items:center}.options-box .options .option-container:hover{cursor:pointer}.options-box .options .option-container mat-checkbox{width:100%}.options-box .options .option-container mat-checkbox ::ng-deep .mdc-form-field{width:100%}.options-box .options .option-container mat-checkbox ::ng-deep .mdc-form-field label{display:flex;width:100%}.options-box .options .option-container-inner{flex:1 1 100%;display:flex;align-items:center}.options-box .options .option-container-inner .option-option{flex:1 1 100%;padding:10px 0 10px 8px}.options-box .options .option-container-inner mat-icon{display:none;font-size:20px;height:20px;margin-right:8px}.options-box .options .option-container-inner:hover mat-icon{display:block}\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: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i4$4.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { 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: i5.CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "directive", type: i5.CdkOverlayOrigin, selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", exportAs: ["cdkOverlayOrigin"] }, { kind: "component", type: ButtonComponent, selector: "ui-button", inputs: ["type", "matIconPrefix", "label", "disabled", "busy", "kind", "color", "size", "formInvalid"] }, { kind: "component", type: InputComponent, selector: "ui-input", inputs: ["prefixIcon", "suffixIcon", "type", "clearButton", "activeIcons", "forceHasPrefix", "forceHasSuffix", "textAlign"], outputs: ["focusChanged", "keyPressed"] }, { kind: "directive", type: ForceVisibilityDirective, selector: "[uiForceVisibility]", inputs: ["visibilityWithin", "visibilityPadding", "visibilityOnRequestOnly", "visibilityEmitChange", "visibilityFromTop", "visibilityCheckEnabled"], outputs: ["visibilityChanged"], exportAs: ["ForceVisibilityDirective"] }] }); }
3611
3617
  }
3612
3618
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: AutoCompleteComponent, decorators: [{
3613
3619
  type: Component,
@@ -3615,7 +3621,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.1", ngImpor
3615
3621
  provide: NG_VALUE_ACCESSOR,
3616
3622
  multi: true,
3617
3623
  useExisting: AutoCompleteComponent
3618
- }], template: "<div class=\"wrapper\" #wrapper>\r\n <div *ngIf=\"optionsVisible\" (click)=\"toggleDropdown()\" class=\"overlay\"></div>\r\n <ui-input [formControl]=\"inputControl\" #input #trigger=\"cdkOverlayOrigin\" cdkOverlayOrigin\r\n (focusChanged)=\"inputFocusChanged($event)\" (keyPressed)=\"keyPressed($event)\" [placeholder]=\"placeholder\"\r\n [useInputMessages]=\"'never'\" [label]=\"label\">\r\n <div slot=\"prefix\">\r\n <ng-content select=\"[slot=acprefix]\"></ng-content>\r\n </div>\r\n </ui-input>\r\n\r\n <ng-template cdkConnectedOverlay [cdkConnectedOverlayOrigin]=\"trigger\" [cdkConnectedOverlayOpen]=\"optionsVisible\">\r\n <div class=\"options-box\" [class]=\"panelClass\" style=\"display: flex; flex-direction: column\"\r\n [ngStyle]=\"{width: wrapper.offsetWidth + 'px'}\">\r\n <div class=\"options\" #options>\r\n\r\n <ng-container *ngFor=\"let option of filteredOptions; index as i\">\r\n <div *ngIf=\"i < filteredMaxItemsShown\" class=\"option-container\"\r\n [ngClass]=\"{selected: focusedOption === option}\">\r\n @if (multiple) {\r\n <mat-checkbox [checked]=\"optionChecked(option) || option.unselectable\"\r\n [disabled]=\"option.unselectable\" (change)=\"toggleOptionCheckboxed(option)\">\r\n <div class=\"option-container-inner\" (click)=\"select(option)\">\r\n <div class=\"option-option\" uiForceVisibility [visibilityWithin]=\"options\"\r\n [visibilityPadding]=\"4\" *ngIf=\"focusedOption === option\"\r\n [ngClass]=\"{unselectable: option.unselectable}\">\r\n {{ optionFormatter(option) }}\r\n </div>\r\n <div class=\"option-option\" *ngIf=\"focusedOption !== option\"\r\n [ngClass]=\"{unselectable: option.unselectable}\">\r\n {{ optionFormatter(option) }}\r\n </div>\r\n <mat-icon *ngIf=\"!hasCheckboxSelected && !option.unselectable\">north_west</mat-icon>\r\n </div>\r\n </mat-checkbox>\r\n } @else {\r\n <div class=\"option-container-inner\" (click)=\"select(option)\">\r\n <div class=\"option-option\" uiForceVisibility [visibilityWithin]=\"options\"\r\n [visibilityPadding]=\"4\" *ngIf=\"focusedOption === option\"\r\n [ngClass]=\"{unselectable: option.unselectable}\">\r\n @if (templates?.optionTemplate) {\r\n <ng-template [ngTemplateOutlet]=\"templates?.optionTemplate\"\r\n [ngTemplateOutletContext]=\"{option: option}\"></ng-template>\r\n } @else {\r\n {{ optionFormatter(option) }}\r\n }\r\n </div>\r\n <div class=\"option-option\" *ngIf=\"focusedOption !== option\"\r\n [ngClass]=\"{unselectable: option.unselectable}\">\r\n @if (templates?.optionTemplate) {\r\n <ng-template [ngTemplateOutlet]=\"templates?.optionTemplate\"\r\n [ngTemplateOutletContext]=\"{option: option}\"></ng-template>\r\n } @else {\r\n {{ optionFormatter(option) }}\r\n }\r\n </div>\r\n <mat-icon *ngIf=\"!hasCheckboxSelected && !option.unselectable\">north_west</mat-icon>\r\n </div>\r\n }\r\n </div>\r\n </ng-container>\r\n\r\n <div *ngIf=\"filteredOptions.length >= filteredMaxItemsShown\" class=\"option-container\" uiForceVisibility\r\n [visibilityWithin]=\"options\" [visibilityEmitChange]=\"true\" (visibilityChanged)=\"loadMore($event)\">\r\n &nbsp;\r\n </div>\r\n\r\n\r\n <div *ngIf=\"filteredOptions.length === 0 && !focusedOption\" class=\"new-user\">\r\n @if (templates?.notFound) {\r\n <ng-template [ngTemplateOutlet]=\"templates?.notFound\"\r\n [ngTemplateOutletContext]=\"{searchText: inputControl.value}\"></ng-template>\r\n } @else {\r\n <ng-container *ngIf=\"alreadyAdded\">\r\n <div style=\"text-align: center\">U\u017Eivatel {{ inputControl.value }} u\u017E je mezi dlu\u017En\u00EDky</div>\r\n </ng-container>\r\n <ng-container *ngIf=\"!alreadyAdded\">\r\n <div style=\"text-align: center; padding: 1em 0\">U\u017Eivatele\r\n <strong>{{ inputControl.value }}</strong> nezn\u00E1me\r\n </div>\r\n <ui-button *ngIf=\"allowNew\" style=\"margin-top: 6px;\" [size]=\"'small'\" [label]=\"'P\u0159idat jej?'\"\r\n (click)=\"newOption()\"></ui-button>\r\n </ng-container>\r\n }\r\n </div>\r\n <div *ngIf=\"filteredOptions.length === 0 && focusedOption\" class=\"new-user\">\r\n <div style=\"text-align: center\">Nezn\u00E1m\u00FD u\u017Eivatel {{ inputControl.value }}</div>\r\n </div>\r\n </div>\r\n\r\n <div *ngIf=\"hasCheckboxSelected && filteredOptions.length > 0\" class=\"checkbox-buttons\">\r\n <ui-button [size]=\"'small'\" [kind]=\"'basic'\" [label]=\"'Zru\u0161it v\u00FDb\u011Br'\"\r\n (click)=\"cancelCheckboxSelection()\"></ui-button>\r\n <ui-button [size]=\"'small'\" [label]=\"'Pou\u017E\u00EDt v\u00FDb\u011Br (' + checkboxSelection.size + ')'\"\r\n (click)=\"useCheckboxSelection()\"></ui-button>\r\n </div>\r\n </div>\r\n </ng-template>\r\n</div>\r\n\r\n", styles: [":host .wrapper{position:relative;outline:none;display:flex}:host .overlay{position:fixed;inset:0}.options-box{max-height:248px;min-width:310px;box-shadow:0 2px 4px -1px #07254833,0 4px 5px #07254824,0 1px 10px #0725481f}.options-box .checkbox-buttons{display:flex;padding:8px 4px 4px;justify-content:space-between}.options-box .options{padding:4px;overflow:auto;scroll-behavior:smooth;display:flex;flex-direction:column}.options-box .options .option-container{padding:0 0 0 12px;display:flex;align-items:center}.options-box .options .option-container:hover{cursor:pointer}.options-box .options .option-container mat-checkbox{width:100%}.options-box .options .option-container mat-checkbox ::ng-deep .mdc-form-field{width:100%}.options-box .options .option-container mat-checkbox ::ng-deep .mdc-form-field label{display:flex;width:100%}.options-box .options .option-container-inner{flex:1 1 100%;display:flex;align-items:center}.options-box .options .option-container-inner .option-option{flex:1 1 100%;padding:10px 0 10px 8px}.options-box .options .option-container-inner mat-icon{display:none;font-size:20px;height:20px;margin-right:8px}.options-box .options .option-container-inner:hover mat-icon{display:block}\n"] }]
3624
+ }], template: "<div class=\"wrapper\" #wrapper>\r\n <div *ngIf=\"optionsVisible\" (click)=\"toggleDropdown()\" class=\"overlay\"></div>\r\n <ui-input [formControl]=\"inputControl\" #input #trigger=\"cdkOverlayOrigin\" cdkOverlayOrigin\r\n (focusChanged)=\"inputFocusChanged($event)\" (keyPressed)=\"keyPressed($event)\" [placeholder]=\"placeholder\"\r\n [useInputMessages]=\"'never'\" [clearButton]=\"clearButton\" [label]=\"label\">\r\n <div slot=\"prefix\">\r\n <ng-content select=\"[slot=acprefix]\"></ng-content>\r\n </div>\r\n </ui-input>\r\n\r\n <ng-template cdkConnectedOverlay [cdkConnectedOverlayOrigin]=\"trigger\" [cdkConnectedOverlayOpen]=\"optionsVisible\">\r\n <div class=\"options-box\" [class]=\"panelClass\" style=\"display: flex; flex-direction: column\"\r\n [ngStyle]=\"{width: wrapper.offsetWidth + 'px'}\">\r\n <div class=\"options\" #options>\r\n\r\n <ng-container *ngFor=\"let option of filteredOptions; index as i\">\r\n <div *ngIf=\"i < filteredMaxItemsShown\" class=\"option-container\"\r\n [ngClass]=\"{selected: focusedOption === option}\">\r\n @if (multiple) {\r\n <mat-checkbox [checked]=\"optionChecked(option) || option.unselectable\"\r\n [disabled]=\"option.unselectable\" (change)=\"toggleOptionCheckboxed(option)\">\r\n <div class=\"option-container-inner\" (click)=\"select(option)\">\r\n <div class=\"option-option\" uiForceVisibility [visibilityWithin]=\"options\"\r\n [visibilityPadding]=\"4\" *ngIf=\"focusedOption === option\"\r\n [ngClass]=\"{unselectable: option.unselectable}\">\r\n {{ optionFormatter(option) }}\r\n </div>\r\n <div class=\"option-option\" *ngIf=\"focusedOption !== option\"\r\n [ngClass]=\"{unselectable: option.unselectable}\">\r\n {{ optionFormatter(option) }}\r\n </div>\r\n <mat-icon *ngIf=\"!hasCheckboxSelected && !option.unselectable\">north_west</mat-icon>\r\n </div>\r\n </mat-checkbox>\r\n } @else {\r\n <div class=\"option-container-inner\" (click)=\"select(option)\">\r\n <div class=\"option-option\" uiForceVisibility [visibilityWithin]=\"options\"\r\n [visibilityPadding]=\"4\" *ngIf=\"focusedOption === option\"\r\n [ngClass]=\"{unselectable: option.unselectable}\">\r\n @if (templates?.optionTemplate) {\r\n <ng-template [ngTemplateOutlet]=\"templates?.optionTemplate\"\r\n [ngTemplateOutletContext]=\"{option: option}\"></ng-template>\r\n } @else {\r\n {{ optionFormatter(option) }}\r\n }\r\n </div>\r\n <div class=\"option-option\" *ngIf=\"focusedOption !== option\"\r\n [ngClass]=\"{unselectable: option.unselectable}\">\r\n @if (templates?.optionTemplate) {\r\n <ng-template [ngTemplateOutlet]=\"templates?.optionTemplate\"\r\n [ngTemplateOutletContext]=\"{option: option}\"></ng-template>\r\n } @else {\r\n {{ optionFormatter(option) }}\r\n }\r\n </div>\r\n <mat-icon *ngIf=\"!hasCheckboxSelected && !option.unselectable\">north_west</mat-icon>\r\n </div>\r\n }\r\n </div>\r\n </ng-container>\r\n\r\n <div *ngIf=\"filteredOptions.length >= filteredMaxItemsShown\" class=\"option-container\" uiForceVisibility\r\n [visibilityWithin]=\"options\" [visibilityEmitChange]=\"true\" (visibilityChanged)=\"loadMore($event)\">\r\n &nbsp;\r\n </div>\r\n\r\n\r\n <div *ngIf=\"filteredOptions.length === 0 && !focusedOption\" class=\"new-user\">\r\n @if (templates?.notFound) {\r\n <ng-template [ngTemplateOutlet]=\"templates?.notFound\"\r\n [ngTemplateOutletContext]=\"{searchText: inputControl.value}\"></ng-template>\r\n } @else {\r\n <ng-container *ngIf=\"alreadyAdded\">\r\n <div style=\"text-align: center\">U\u017Eivatel {{ inputControl.value }} u\u017E je mezi dlu\u017En\u00EDky</div>\r\n </ng-container>\r\n <ng-container *ngIf=\"!alreadyAdded\">\r\n <div style=\"text-align: center; padding: 1em 0\">U\u017Eivatele\r\n <strong>{{ inputControl.value }}</strong> nezn\u00E1me\r\n </div>\r\n <ui-button *ngIf=\"allowNew\" style=\"margin-top: 6px;\" [size]=\"'small'\" [label]=\"'P\u0159idat jej?'\"\r\n (click)=\"newOption()\"></ui-button>\r\n </ng-container>\r\n }\r\n </div>\r\n <div *ngIf=\"filteredOptions.length === 0 && focusedOption\" class=\"new-user\">\r\n <div style=\"text-align: center\">Nezn\u00E1m\u00FD u\u017Eivatel {{ inputControl.value }}</div>\r\n </div>\r\n </div>\r\n\r\n <div *ngIf=\"hasCheckboxSelected && filteredOptions.length > 0\" class=\"checkbox-buttons\">\r\n <ui-button [size]=\"'small'\" [kind]=\"'basic'\" [label]=\"'Zru\u0161it v\u00FDb\u011Br'\"\r\n (click)=\"cancelCheckboxSelection()\"></ui-button>\r\n <ui-button [size]=\"'small'\" [label]=\"'Pou\u017E\u00EDt v\u00FDb\u011Br (' + checkboxSelection.size + ')'\"\r\n (click)=\"useCheckboxSelection()\"></ui-button>\r\n </div>\r\n </div>\r\n </ng-template>\r\n</div>\r\n\r\n", styles: [":host .wrapper{position:relative;outline:none;display:flex}:host .overlay{position:fixed;inset:0}.options-box{max-height:248px;min-width:310px;box-shadow:0 2px 4px -1px #07254833,0 4px 5px #07254824,0 1px 10px #0725481f}.options-box .checkbox-buttons{display:flex;padding:8px 4px 4px;justify-content:space-between}.options-box .options{padding:4px;overflow:auto;scroll-behavior:smooth;display:flex;flex-direction:column}.options-box .options .option-container{padding:0 0 0 12px;display:flex;align-items:center}.options-box .options .option-container:hover{cursor:pointer}.options-box .options .option-container mat-checkbox{width:100%}.options-box .options .option-container mat-checkbox ::ng-deep .mdc-form-field{width:100%}.options-box .options .option-container mat-checkbox ::ng-deep .mdc-form-field label{display:flex;width:100%}.options-box .options .option-container-inner{flex:1 1 100%;display:flex;align-items:center}.options-box .options .option-container-inner .option-option{flex:1 1 100%;padding:10px 0 10px 8px}.options-box .options .option-container-inner mat-icon{display:none;font-size:20px;height:20px;margin-right:8px}.options-box .options .option-container-inner:hover mat-icon{display:block}\n"] }]
3619
3625
  }], ctorParameters: () => [{ type: i1.ControlContainer, decorators: [{
3620
3626
  type: Optional
3621
3627
  }, {
@@ -3636,6 +3642,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.1", ngImpor
3636
3642
  type: Input
3637
3643
  }], panelClass: [{
3638
3644
  type: Input
3645
+ }], clearButton: [{
3646
+ type: Input
3639
3647
  }], input: [{
3640
3648
  type: ViewChild,
3641
3649
  args: ['input']