@morozeckiy/dd-lib 0.7.52 → 0.7.53
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.
- package/fesm2022/morozeckiy-dd-lib.mjs +27 -31
- package/fesm2022/morozeckiy-dd-lib.mjs.map +1 -1
- package/lib/common/lib-common-input-text.d.ts +1 -1
- package/lib/core/pipes/filter.pipe.d.ts +1 -1
- package/lib/core/services/validators.service.d.ts +2 -2
- package/lib/lib-select/lib-select.component.d.ts +6 -7
- package/lib/lib-svg-icon/lib-svg-icon.component.d.ts +3 -4
- package/lib/utils/decorators.d.ts +1 -1
- package/morozeckiy-dd-lib-0.7.53.tgz +0 -0
- package/package.json +1 -1
- package/morozeckiy-dd-lib-0.7.52.tgz +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { EventEmitter, Output, ViewChild, Input, Component, Injectable, Inject, Pipe, Directive, HostListener, InjectionToken, TemplateRef, ChangeDetectionStrategy, Injector, forwardRef, CUSTOM_ELEMENTS_SCHEMA, NO_ERRORS_SCHEMA,
|
|
2
|
+
import { EventEmitter, Output, ViewChild, Input, Component, Injectable, Inject, Pipe, Directive, HostListener, InjectionToken, TemplateRef, ChangeDetectionStrategy, Injector, forwardRef, CUSTOM_ELEMENTS_SCHEMA, NO_ERRORS_SCHEMA, Optional, ElementRef, Host, SkipSelf, signal, input } from '@angular/core';
|
|
3
3
|
import * as i1$5 from '@angular/forms';
|
|
4
4
|
import { Validators, NG_VALUE_ACCESSOR, FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
5
5
|
import { BehaviorSubject, Subject, of, fromEvent, combineLatest } from 'rxjs';
|
|
@@ -11,7 +11,7 @@ import * as i1 from '@angular/router';
|
|
|
11
11
|
import { RouterLink } from '@angular/router';
|
|
12
12
|
import * as i1$2 from '@angular/platform-browser';
|
|
13
13
|
import * as i1$3 from '@angular/common';
|
|
14
|
-
import { DecimalPipe, CommonModule, AsyncPipe, DOCUMENT, NgTemplateOutlet, NgComponentOutlet,
|
|
14
|
+
import { DecimalPipe, CommonModule, AsyncPipe, DOCUMENT, NgTemplateOutlet, NgComponentOutlet, NgStyle, NgClass } from '@angular/common';
|
|
15
15
|
import { ComponentPortal, PortalInjector, CdkPortalOutlet, TemplatePortal } from '@angular/cdk/portal';
|
|
16
16
|
import * as i1$4 from '@angular/cdk/overlay';
|
|
17
17
|
import { OverlayModule, GlobalPositionStrategy } from '@angular/cdk/overlay';
|
|
@@ -505,7 +505,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImpor
|
|
|
505
505
|
class FilterPipe {
|
|
506
506
|
transform(value, args) {
|
|
507
507
|
if (value && value.length) {
|
|
508
|
-
return value.filter((item, i) => i === args);
|
|
508
|
+
return value.filter((item, i) => item && i === args);
|
|
509
509
|
}
|
|
510
510
|
}
|
|
511
511
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: FilterPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
@@ -1340,7 +1340,6 @@ class FixedPositionDirective {
|
|
|
1340
1340
|
}
|
|
1341
1341
|
}
|
|
1342
1342
|
updateChild2Position() {
|
|
1343
|
-
console.log(1);
|
|
1344
1343
|
if (this.child1 && this.child2) {
|
|
1345
1344
|
const child1Rect = this.child1.getBoundingClientRect();
|
|
1346
1345
|
this.renderer.setStyle(this.child2, 'width', `${child1Rect.width}px`);
|
|
@@ -1856,7 +1855,7 @@ class LibCommonInputTextComponent {
|
|
|
1856
1855
|
this.commit(this.value);
|
|
1857
1856
|
}
|
|
1858
1857
|
}
|
|
1859
|
-
notifyFocusEvent(
|
|
1858
|
+
notifyFocusEvent() {
|
|
1860
1859
|
// this.focusManager.notifyFocusMayChanged(this, e.type === 'focus');
|
|
1861
1860
|
this.blur.emit(this.value);
|
|
1862
1861
|
}
|
|
@@ -2038,9 +2037,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImpor
|
|
|
2038
2037
|
}] } });
|
|
2039
2038
|
|
|
2040
2039
|
class LibSvgIconComponent {
|
|
2041
|
-
constructor(el,
|
|
2040
|
+
constructor(el, svgIconRegistry, document) {
|
|
2042
2041
|
this.el = el;
|
|
2043
|
-
this.rdr = rdr;
|
|
2044
2042
|
this.svgIconRegistry = svgIconRegistry;
|
|
2045
2043
|
this.document = document;
|
|
2046
2044
|
}
|
|
@@ -2056,16 +2054,16 @@ class LibSvgIconComponent {
|
|
|
2056
2054
|
}
|
|
2057
2055
|
ngOnInit() {
|
|
2058
2056
|
if (this.width) {
|
|
2059
|
-
this.
|
|
2060
|
-
this.rdr.setStyle(this.svgIcon, 'width', 'inherit')
|
|
2057
|
+
this.el.nativeElement.style.width = this.width;
|
|
2058
|
+
// this.rdr.setStyle(this.svgIcon, 'width', 'inherit')
|
|
2061
2059
|
}
|
|
2062
2060
|
if (this.height) {
|
|
2063
|
-
this.
|
|
2064
|
-
this.rdr.setStyle(this.svgIcon, 'height', 'inherit')
|
|
2061
|
+
this.el.nativeElement.style.height = this.height;
|
|
2062
|
+
// this.rdr.setStyle(this.svgIcon, 'height', 'inherit')
|
|
2065
2063
|
}
|
|
2066
2064
|
if (this.color) {
|
|
2067
|
-
this.
|
|
2068
|
-
this.rdr.setStyle(this.svgIcon, 'stroke', this.color, RendererStyleFlags2.Important)
|
|
2065
|
+
this.el.nativeElement.style.fill = this.color;
|
|
2066
|
+
// this.rdr.setStyle(this.svgIcon, 'stroke', this.color, RendererStyleFlags2.Important)
|
|
2069
2067
|
}
|
|
2070
2068
|
}
|
|
2071
2069
|
svgElementFromString(svgContent) {
|
|
@@ -2073,13 +2071,13 @@ class LibSvgIconComponent {
|
|
|
2073
2071
|
div.innerHTML = svgContent;
|
|
2074
2072
|
return div.querySelector('svg') || this.document.createElementNS('http://www.w3.org/200/svg', 'path');
|
|
2075
2073
|
}
|
|
2076
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: LibSvgIconComponent, deps: [{ token: i0.ElementRef }, { token:
|
|
2074
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: LibSvgIconComponent, deps: [{ token: i0.ElementRef }, { token: SvgIconsService }, { token: DOCUMENT, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2077
2075
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.2", type: LibSvgIconComponent, isStandalone: true, selector: "dd-lib-svg-icon", inputs: { width: "width", height: "height", color: "color", icon: "icon" }, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, styles: [":host{display:inline-flex;align-items:center;justify-content:center}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2078
2076
|
}
|
|
2079
2077
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: LibSvgIconComponent, decorators: [{
|
|
2080
2078
|
type: Component,
|
|
2081
2079
|
args: [{ selector: 'dd-lib-svg-icon', standalone: true, imports: [], template: '<ng-content></ng-content>', changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host{display:inline-flex;align-items:center;justify-content:center}\n"] }]
|
|
2082
|
-
}], ctorParameters: () => [{ type: i0.ElementRef }, { type:
|
|
2080
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: SvgIconsService }, { type: undefined, decorators: [{
|
|
2083
2081
|
type: Optional
|
|
2084
2082
|
}, {
|
|
2085
2083
|
type: Inject,
|
|
@@ -2625,7 +2623,7 @@ class LibCheckboxComponent {
|
|
|
2625
2623
|
this.checked = value;
|
|
2626
2624
|
this.cdr.detectChanges();
|
|
2627
2625
|
}
|
|
2628
|
-
propagateChange(
|
|
2626
|
+
propagateChange(_value) { }
|
|
2629
2627
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: LibCheckboxComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2630
2628
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.2", type: LibCheckboxComponent, isStandalone: true, selector: "dd-lib-checkbox", inputs: { checkboxId: "checkboxId", required: "required", disabled: "disabled", checked: "checked", customClass: "customClass", invalid: "invalid", hasContent: "hasContent" }, outputs: { checkEvent: "checkEvent" }, providers: [
|
|
2631
2629
|
{
|
|
@@ -2671,7 +2669,7 @@ class LibCommentInputComponent extends LibCommonInputTextComponent {
|
|
|
2671
2669
|
}
|
|
2672
2670
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: LibCommentInputComponent, decorators: [{
|
|
2673
2671
|
type: Component,
|
|
2674
|
-
args: [{ selector: 'dd-lib-comment-input', standalone: true, imports: [FormsModule, LibButtonComponent,
|
|
2672
|
+
args: [{ selector: 'dd-lib-comment-input', standalone: true, imports: [FormsModule, LibButtonComponent, ResizeTextareaDirective], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"lib-comment-textarea\">\n <textarea\n [(ngModel)]=\"value\"\n [disabled]=\"disabled\"\n [placeholder]=\"placeholder\"\n [readOnly]=\"readOnly\"\n ddResizeTextarea\n type=\"text\"></textarea>\n <dd-lib-button [disabled]=\"disabled\" [noPadding]=\"true\" height=\"48px\" width=\"48px\">\n <svg fill=\"none\" height=\"28\" viewBox=\"0 0 24 22\" width=\"24\" xmlns=\"http://www.w3.org/2000/svg\">\n <g clip-path=\"url(#clip0_429_4922)\">\n <path\n [attr.stroke]=\"disabled ? '#8e9cbe' : 'white'\"\n d=\"M10 14L21 3\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"1.7\" />\n <path\n [attr.stroke]=\"disabled ? '#8e9cbe' : 'white'\"\n d=\"M21.0001 3L14.5001 21C14.4562 21.0957 14.3858 21.1769 14.2971 21.2338C14.2085 21.2906 14.1054 21.3209 14.0001 21.3209C13.8948 21.3209 13.7917 21.2906 13.703 21.2338C13.6144 21.1769 13.5439 21.0957 13.5001 21L10.0001 14L3.00007 10.5C2.90433 10.4561 2.8232 10.3857 2.76632 10.2971C2.70944 10.2084 2.6792 10.1053 2.6792 10C2.6792 9.89468 2.70944 9.79158 2.76632 9.70295C2.8232 9.61431 2.90433 9.54387 3.00007 9.5L21.0001 3Z\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"1.7\" />\n </g>\n <defs>\n <clipPath id=\"clip0_429_4922\">\n <rect [attr.fill]=\"disabled ? '#8e9cbe' : 'white'\" height=\"28\" width=\"24\" />\n </clipPath>\n </defs>\n </svg>\n </dd-lib-button>\n</div>\n", styles: [".lib-comment-textarea{position:relative;display:flex;align-items:center;flex-direction:row}.lib-comment-textarea textarea{margin-right:16px;width:100%;max-height:48px;padding:12px 16px;border-radius:12px;border:none;background-color:var(--gray-color-200);resize:none;box-sizing:inherit}.lib-comment-textarea textarea:disabled{background-color:var(--input-disable-input);pointer-events:none}.lib-comment-textarea textarea:disabled::placeholder{color:var(--disabled-color)}\n"] }]
|
|
2675
2673
|
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }] });
|
|
2676
2674
|
|
|
2677
2675
|
class LibFileUploadComponent {
|
|
@@ -2981,7 +2979,7 @@ class LibPeriodComponent {
|
|
|
2981
2979
|
this.calendarIsShown = $event;
|
|
2982
2980
|
}
|
|
2983
2981
|
}
|
|
2984
|
-
propagateChange(
|
|
2982
|
+
propagateChange(_value) { }
|
|
2985
2983
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: LibPeriodComponent, deps: [{ token: DateService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2986
2984
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.2", type: LibPeriodComponent, isStandalone: true, selector: "dd-lib-period", inputs: { maxDate: "maxDate" }, outputs: { setPeriodDate: "setPeriodDate" }, providers: [
|
|
2987
2985
|
{
|
|
@@ -3326,10 +3324,9 @@ class LibSelectComponent extends LibCommonInputTextComponent {
|
|
|
3326
3324
|
this.itemSize = d?.length === 1 ? 56 : this.itemSize;
|
|
3327
3325
|
}
|
|
3328
3326
|
;
|
|
3329
|
-
constructor(destroyed$, changeDetection,
|
|
3327
|
+
constructor(destroyed$, changeDetection, controlContainer) {
|
|
3330
3328
|
super(changeDetection);
|
|
3331
3329
|
this.destroyed$ = destroyed$;
|
|
3332
|
-
this.el = el;
|
|
3333
3330
|
this.controlContainer = controlContainer;
|
|
3334
3331
|
this.tooltipPosition = 'top';
|
|
3335
3332
|
this.highlight = true;
|
|
@@ -3388,7 +3385,7 @@ class LibSelectComponent extends LibCommonInputTextComponent {
|
|
|
3388
3385
|
this.onTouchedCallback = fn;
|
|
3389
3386
|
super.registerOnTouched(fn);
|
|
3390
3387
|
}
|
|
3391
|
-
searchInput(
|
|
3388
|
+
searchInput() {
|
|
3392
3389
|
this.isShownList = true;
|
|
3393
3390
|
// this.searchValue = this.inputValue;
|
|
3394
3391
|
}
|
|
@@ -3397,7 +3394,7 @@ class LibSelectComponent extends LibCommonInputTextComponent {
|
|
|
3397
3394
|
// this.searchValue = this.inputValue;
|
|
3398
3395
|
super.handleInput(e);
|
|
3399
3396
|
}
|
|
3400
|
-
notifyFocusEvent(
|
|
3397
|
+
notifyFocusEvent() {
|
|
3401
3398
|
if (!this.disabled) {
|
|
3402
3399
|
this.isShownList = !this.isShownList;
|
|
3403
3400
|
if (this.isShownList) {
|
|
@@ -3412,7 +3409,7 @@ class LibSelectComponent extends LibCommonInputTextComponent {
|
|
|
3412
3409
|
else {
|
|
3413
3410
|
this.isShownList = false;
|
|
3414
3411
|
}
|
|
3415
|
-
super.notifyFocusEvent(
|
|
3412
|
+
super.notifyFocusEvent();
|
|
3416
3413
|
}
|
|
3417
3414
|
writeValue(value) {
|
|
3418
3415
|
this.writtenValue = value;
|
|
@@ -3588,14 +3585,14 @@ class LibSelectComponent extends LibCommonInputTextComponent {
|
|
|
3588
3585
|
super.handleFocus();
|
|
3589
3586
|
// this.showMultiCountValue = false;
|
|
3590
3587
|
}
|
|
3591
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: LibSelectComponent, deps: [{ token: i0.DestroyRef }, { token: i0.ChangeDetectorRef }, { token:
|
|
3588
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: LibSelectComponent, deps: [{ token: i0.DestroyRef }, { token: i0.ChangeDetectorRef }, { token: i1$5.ControlContainer, host: true, optional: true, skipSelf: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3592
3589
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.2", type: LibSelectComponent, isStandalone: true, selector: "dd-lib-select", inputs: { data: "data", virtualScroll: "virtualScroll", multi: "multi", tooltipPosition: "tooltipPosition", highlight: "highlight", searchOn: "searchOn", selectId: "selectId", itemSize: "itemSize", keyTitle: "keyTitle", keyDesc: "keyDesc", keyValue: "keyValue", noDataError: "noDataError", searchPlaceholder: "searchPlaceholder", placeholder: "placeholder" }, outputs: { selectedItem: "selectedItem", selectedItems: "selectedItems" }, providers: [
|
|
3593
3590
|
{
|
|
3594
3591
|
provide: NG_VALUE_ACCESSOR,
|
|
3595
3592
|
useExisting: forwardRef(() => LibSelectComponent),
|
|
3596
3593
|
multi: true,
|
|
3597
3594
|
},
|
|
3598
|
-
], viewQueries: [{ propertyName: "selectEl", first: true, predicate: ["select"], descendants: true, read: ElementRef, static: true }, { propertyName: "searchInputEl", first: true, predicate: ["searchInputEl"], descendants: true, read: ElementRef, static: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<div class=\"lib-select\" id=\"lib-select-{{ selectId }}\" [destroyedItem]=\"isShownList\" ddFixedPosition>\r\n @if (label) {\r\n <label [for]=\"id\" class=\"lib-select__title\">\r\n {{ label }}\r\n @if (required) {\r\n <dd-lib-svg-icon icon=\"error_hint\"></dd-lib-svg-icon>\r\n }\r\n </label>\r\n }\r\n\r\n <div class=\"pos-relative\" data-child=\"input\">\r\n\r\n <input\r\n #select\r\n (change)=\"handleChange()\"\r\n (click)=\"notifyFocusEvent($event)\"\r\n (input)=\"handleInput($event)\"\r\n (blur)=\"handleBlur()\"\r\n (focus)=\"handleFocus()\"\r\n [attr.id]=\"selectId\"\r\n [attr.placeholder]=\"(multiCountValue || searchValue) ? '' : placeholder\"\r\n [attr.tabIndex]=\"tabIndex\"\r\n [attr.type]=\"'text'\"\r\n [class.focused]=\"focused\"\r\n [class.invalid]=\"showError\"\r\n [disabled]=\"disabled\"\r\n [readOnly]=\"true\"\r\n [(ngModel)]=\"inputValue\"\r\n [title]=\"inputValue || ''\"\r\n class=\"text-select select-block\" />\r\n\r\n @if (multiCountValue) {\r\n <div class=\"selected-items-container\"\r\n id=\"selected-{{selectId}}\">\r\n\r\n <dd-lib-horizontal-scroll>\r\n @for (item of checkedItems; track item) {\r\n <div class=\"selected-items__item\">\r\n @if (stringArray()) {\r\n <div [innerHTML]=\"item | highlight: (highlight ? searchValue : '') | safe: 'html'\"\r\n class=\"selected-items__item-title\"></div>\r\n }\r\n @if (keyTitle && !stringArray()) {\r\n <div\r\n [innerHTML]=\"item[keyTitle!] | highlight: (highlight ? searchValue : '') | safe: 'html'\"\r\n class=\"selected-items__item-title\"></div>\r\n }\r\n @if (keyDesc && !stringArray()) {\r\n <div\r\n [innerHTML]=\"item[keyDesc!] | highlight: (highlight ? searchValue : '') | safe: 'html'\"\r\n [title]=\"item[keyDesc]\"\r\n class=\"selected-items__item-desc\"></div>\r\n }\r\n <dd-lib-svg-icon id=\"selected-clear-{{selectId}}\" icon=\"clear\" class=\"cup\"\r\n (click)=\"selectItem(item)\"></dd-lib-svg-icon>\r\n </div>\r\n }\r\n </dd-lib-horizontal-scroll>\r\n </div>\r\n\r\n }\r\n <!-- (blur)=\"notifyFocusEvent($event)\"-->\r\n @if (!checkedItem) {\r\n <dd-lib-svg-icon\r\n (click)=\"notifyFocusEvent($event)\"\r\n [class.black-svg]=\"isShownList\"\r\n [class.disabled]=\"disabled\"\r\n [class.gray-svg]=\"!isShownList\"\r\n [class.up]=\"isShownList\"\r\n id=\"chevron-{{ selectId }}\" class=\"chevron\" icon=\"down_chevron\"></dd-lib-svg-icon>\r\n\r\n } @else if (clearable && !searchValue) {\r\n <dd-lib-svg-icon\r\n (click)=\"onClear(checkedItem)\"\r\n class=\"clear\"\r\n id=\"chevron-{{ selectId }}\" icon=\"clear\"></dd-lib-svg-icon>\r\n }\r\n </div>\r\n\r\n @if (errorTexts.length && showError) {\r\n @for (error of errorTexts; track error) {\r\n <div class=\"lib-select__error\">{{ error }}</div>\r\n }\r\n }\r\n @if (errorText && showSelfError && showError) {\r\n <div class=\"lib-select__error\">{{ errorText }}</div>\r\n }\r\n\r\n @if (isShownList) {\r\n <div\r\n id=\"dropdown\"\r\n [style.max-height]=\"searchOn ? '342px' : '300px'\"\r\n data-child=\"list\"\r\n (ddClickOutside)=\"notifyFocusEvent($event);fullBlur.emit($event)\"\r\n [elements]=\"['lib-select-' + selectId, 'chevron-' + selectId, 'selected-' + selectId, 'selected-clear-' + selectId]\"\r\n ddListKeyboardNavigation\r\n class=\"select-list-wrapper\">\r\n @if (_data()) {\r\n <!-- \u0415\u0441\u043B\u0438 \u0434\u0430\u043D\u043D\u044B\u0435 \u0434\u043B\u044F \u0441\u0435\u0434\u0435\u043A\u0442\u0430 \u043D\u0435 \u043F\u0440\u0438\u0448\u043B\u043E-->\r\n @if (!_data()?.length && noDataError) {\r\n <div class=\"info-container\">\r\n <div class=\"b2-title no-wrap-text\">\r\n {{ noDataError }}\r\n </div>\r\n </div>\r\n }\r\n\r\n <!-- \u043F\u043E\u0438\u0441\u043A-->\r\n @if (_data()?.length && _data()!.length > 5 && searchOn) {\r\n <div class=\"search-block\">\r\n <dd-lib-svg-icon\r\n class=\"search-icon\"\r\n id=\"chevron-{{ selectId }}\" icon=\"search\"></dd-lib-svg-icon>\r\n <input class=\"search-block__input\" #searchInputEl [attr.name]=\"name\"\r\n [readOnly]=\"readOnly\"\r\n (input)=\"searchInput($event)\"\r\n [placeholder]=\"searchPlaceholder\"\r\n (blur)=\"handleBlur()\"\r\n (focus)=\"handleFocus()\"\r\n [(ngModel)]=\"searchValue\" type=\"text\">\r\n <dd-lib-svg-icon\r\n [style.display]=\"searchValue ? 'block' : 'none'\"\r\n class=\"cup\"\r\n (click)=\"searchValue=''\"\r\n id=\"chevron-{{ selectId }}\" icon=\"clear\"></dd-lib-svg-icon>\r\n\r\n </div>\r\n }\r\n <!-- \u0415\u0441\u043B\u0438 \u043F\u043E\u0438\u0441\u043A \u043D\u0435 \u0434\u0430\u043B \u0440\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u043E\u0432-->\r\n @if (_data()?.length && (_data() | filterByKey: filterList.bind(this))?.length === 0) {\r\n <div class=\"info-container\">\r\n <div class=\"b2-title no-wrap-text\">\r\n \u0420\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u043E\u0432 \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u043E\r\n </div>\r\n </div>\r\n }\r\n @if (virtualScroll) {\r\n <cdk-virtual-scroll-viewport [itemSize]=\"itemSize\" [style.height]=\"(_data()?.length || 0) * itemSize + 'px'\">\r\n <div *cdkVirtualFor=\"let item of _data() | filterByKey: filterList.bind(this)\">\r\n <ng-container [ngTemplateOutlet]=\"rowItem\" [ngTemplateOutletContext]=\"{item}\"></ng-container>\r\n </div>\r\n </cdk-virtual-scroll-viewport>\r\n } @else {\r\n @for (item of _data() | filterByKey: filterList.bind(this); track item) {\r\n <ng-container [ngTemplateOutlet]=\"rowItem\" [ngTemplateOutletContext]=\"{item}\"></ng-container>\r\n }\r\n }\r\n } @else {\r\n <div class=\"info-container\">\r\n <div class=\"d-flex gap-12 align-center\">\r\n <div class=\"b2-title no-wrap-text\">\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430 \u0434\u0430\u043D\u043D\u044B\u0445</div>\r\n <dd-lib-loader></dd-lib-loader>\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n }\r\n</div>\r\n\r\n<ng-template #rowItem let-item=item>\r\n <div ddSelectableItem [ddTooltip]=\"item.tooltip ? item.tooltip : ''\" [position]=\"tooltipPosition\"\r\n (click)=\"selectItem(item)\"\r\n (itemSelected)=\"selectItem(item)\"\r\n [class.s-item-active]=\"checkSelected(item) && !item.disabled\"\r\n [class.s-item-disabled]=\"item.disabled\"\r\n class=\"select-data\">\r\n @if (stringArray()) {\r\n <div [innerHTML]=\"item | highlight: (highlight ? searchValue : '') | safe: 'html'\"\r\n class=\"select-data__title\"></div>\r\n }\r\n @if (keyTitle && !stringArray()) {\r\n <div\r\n [innerHTML]=\"item[keyTitle!] | highlight: (highlight ? searchValue : '') | safe: 'html'\"\r\n class=\"select-data__title\"></div>\r\n }\r\n @if (keyDesc && !stringArray()) {\r\n <div\r\n [innerHTML]=\"item[keyDesc!] | highlight: (highlight ? searchValue : '') | safe: 'html'\"\r\n [title]=\"item[keyDesc]\"\r\n class=\"select-data__desc\"></div>\r\n }\r\n @if (checkSelected(item)) {\r\n <dd-lib-svg-icon\r\n (click)=\"selectItem(checkedItem)\"\r\n class=\"checked\"\r\n id=\"chevron-{{ selectId }}\" icon=\"check_green\"></dd-lib-svg-icon>\r\n }\r\n </div>\r\n</ng-template>\r\n", styles: [".lib-select{position:relative}.lib-select .select-block{width:100%;height:48px;padding:15px 28px 15px 16px;overflow:hidden;text-overflow:ellipsis;border-radius:8px;border:1px solid var(--input-border-color);background-color:transparent;position:relative}.lib-select .select-block:hover{border-color:var(--input-active-border-colort)}.lib-select .select-block:focus{border-color:var(--input-active-border-colort);box-shadow:var(--input-active-border-shadow)}.lib-select .select-block:focus~.selected-items-container .selected-items__item{background:var(--light-green-color);color:var(--font-light-black-color)}.lib-select .select-block:disabled{border:none;background-color:var(--input-disable-input);color:var(--input-disable-text);pointer-events:none}.lib-select .select-block:disabled::placeholder{color:var(--input-placeholder)}.lib-select .select-block:disabled~.selected-items-container .selected-items__item{background:var(--gray-blue-300);color:var(--second-gray-color)}.lib-select .select-block.invalid,.lib-select .select-block.invalid:hover{border-color:var(--input-error-border-color)}.lib-select .select-block.invalid:focus{border-color:var(--input-error-border-color);box-shadow:var(--input-error-border-shadow)}.lib-select .select-block:invalid~.selected-items-container .selected-items__item{background:var(--red-light-color);color:var(--font-light-black-color)}.lib-select .multi-count{position:absolute;top:10px;right:42px;white-space:nowrap}.lib-select .clear{cursor:pointer;position:absolute;right:8px;top:12px}.lib-select .chevron{cursor:pointer;position:absolute;right:16px;top:10px}.lib-select .chevron.up{transform:rotate(180deg)}.lib-select__title{margin-bottom:4px;font-size:14px;line-height:24px;display:flex;align-items:flex-start;color:var(--light-black-color)}.lib-select__error{color:var(--primary-red-color);font-size:12px;font-weight:400;line-height:10px;margin-top:2px;position:absolute}.lib-select .select-list-wrapper{position:absolute;display:block;z-index:100;width:100%;max-height:300px;overflow:auto;border-radius:8px;box-shadow:var(--main-card-shadow);background-color:var(--main-card-color)}.lib-select .select-list-wrapper cdk-virtual-scroll-viewport{max-height:300px}.lib-select .select-list-wrapper.top{bottom:50px;top:unset}.lib-select .select-list-wrapper .select-data{padding:12px 42px 12px 16px;cursor:pointer;position:relative;min-height:40px}.lib-select .select-list-wrapper .select-data__desc{font-size:14px;font-weight:400;line-height:24px;text-overflow:ellipsis;text-wrap:nowrap;padding-top:2px;overflow:hidden;color:var(--second-gray-color)}.lib-select .select-list-wrapper .select-data.key-down-active,.lib-select .select-list-wrapper .select-data:hover,.lib-select .select-list-wrapper .select-data.s-item-active{background:var(--select-act-hov-bgc)}.lib-select .select-list-wrapper .select-data.s-item-active .checked{position:absolute;right:16px;top:10px}.lib-select .select-list-wrapper .select-data.s-item-disabled{cursor:auto;background:var(--disabled-bgc);color:var(--disabled-color)}.lib-select .select-list-wrapper .select-no-data{padding:12px 42px 12px 16px;cursor:auto;position:relative;color:var(--disabled-color)}.lib-select .select-list-wrapper .info-container{padding:36px;display:flex;align-items:center;justify-content:center}.search-block{position:relative;padding:12px;z-index:1;display:flex;gap:4px;align-items:center;border-bottom:1px solid var(--gray-bgc)}.search-block__input{border:none;background:transparent;width:100%;padding-left:40px}.search-block .search-icon{position:absolute;left:20px;top:0;bottom:0}.data-loader{position:absolute;right:0;left:0;bottom:12px}.selected-items-container{overflow:hidden;border-radius:8px;top:0;bottom:0;position:absolute;max-width:calc(100% - 60px);left:6px;margin:8px;align-items:center}.selected-items-container .selected-items__item{background:var(--blue-card);color:var(--font-light-black-color);padding:4px;border-radius:8px;display:flex;gap:4px;align-items:center}.selected-items-container .selected-items__item-title{white-space:nowrap}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$5.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$5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "pipe", type: HighlightPipe, name: "highlight" }, { kind: "pipe", type: SafePipe, name: "safe" }, { kind: "directive", type: ClickOutsideDirective, selector: "[ddClickOutside]", inputs: ["elements"], outputs: ["ddClickOutside"] }, { kind: "component", type: LibLoaderComponent, selector: "dd-lib-loader", inputs: ["color", "size"] }, { kind: "pipe", type: FilterByKeyPipe, name: "filterByKey" }, { kind: "component", type: LibSvgIconComponent, selector: "dd-lib-svg-icon", inputs: ["width", "height", "color", "icon"] }, { kind: "ngmodule", type: ScrollingModule }, { kind: "directive", type: i2$1.CdkFixedSizeVirtualScroll, selector: "cdk-virtual-scroll-viewport[itemSize]", inputs: ["itemSize", "minBufferPx", "maxBufferPx"] }, { kind: "directive", type: i2$1.CdkVirtualForOf, selector: "[cdkVirtualFor][cdkVirtualForOf]", inputs: ["cdkVirtualForOf", "cdkVirtualForTrackBy", "cdkVirtualForTemplate", "cdkVirtualForTemplateCacheSize"] }, { kind: "component", type: i2$1.CdkVirtualScrollViewport, selector: "cdk-virtual-scroll-viewport", inputs: ["orientation", "appendOnly"], outputs: ["scrolledIndexChange"] }, { kind: "directive", type: TooltipDirective, selector: "[ddTooltip]", inputs: ["ddTooltip", "withClick", "position"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: ListKeyboardNavigationDirective, selector: "[ddListKeyboardNavigation]" }, { kind: "directive", type: SelectableItemDirective, selector: "[ddSelectableItem]", outputs: ["itemSelected"] }, { kind: "directive", type: FixedPositionDirective, selector: "[ddFixedPosition]", inputs: ["childName1", "childName2", "destroyedItem"] }, { kind: "component", type: LibHorizontalScrollComponent, selector: "dd-lib-horizontal-scroll" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3595
|
+
], viewQueries: [{ propertyName: "selectEl", first: true, predicate: ["select"], descendants: true, read: ElementRef, static: true }, { propertyName: "searchInputEl", first: true, predicate: ["searchInputEl"], descendants: true, read: ElementRef, static: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<div class=\"lib-select\" id=\"lib-select-{{ selectId }}\" [destroyedItem]=\"isShownList\" ddFixedPosition>\r\n @if (label) {\r\n <label [for]=\"id\" class=\"lib-select__title\">\r\n {{ label }}\r\n @if (required) {\r\n <dd-lib-svg-icon icon=\"error_hint\"></dd-lib-svg-icon>\r\n }\r\n </label>\r\n }\r\n\r\n <div class=\"pos-relative\" data-child=\"input\">\r\n\r\n <input\r\n #select\r\n (change)=\"handleChange()\"\r\n (click)=\"notifyFocusEvent()\"\r\n (input)=\"handleInput($event)\"\r\n (blur)=\"handleBlur()\"\r\n (focus)=\"handleFocus()\"\r\n [attr.id]=\"selectId\"\r\n [attr.placeholder]=\"(multiCountValue || searchValue) ? '' : placeholder\"\r\n [attr.tabIndex]=\"tabIndex\"\r\n [attr.type]=\"'text'\"\r\n [class.focused]=\"focused\"\r\n [class.invalid]=\"showError\"\r\n [disabled]=\"disabled\"\r\n [readOnly]=\"true\"\r\n [(ngModel)]=\"inputValue\"\r\n [title]=\"inputValue || ''\"\r\n class=\"text-select select-block\" />\r\n\r\n @if (multiCountValue) {\r\n <div class=\"selected-items-container\"\r\n id=\"selected-{{selectId}}\">\r\n\r\n <dd-lib-horizontal-scroll>\r\n @for (item of checkedItems; track item) {\r\n <div class=\"selected-items__item\">\r\n @if (stringArray()) {\r\n <div [innerHTML]=\"item | highlight: (highlight ? searchValue : '') | safe: 'html'\"\r\n class=\"selected-items__item-title\"></div>\r\n }\r\n @if (keyTitle && !stringArray()) {\r\n <div\r\n [innerHTML]=\"item[keyTitle!] | highlight: (highlight ? searchValue : '') | safe: 'html'\"\r\n class=\"selected-items__item-title\"></div>\r\n }\r\n @if (keyDesc && !stringArray()) {\r\n <div\r\n [innerHTML]=\"item[keyDesc!] | highlight: (highlight ? searchValue : '') | safe: 'html'\"\r\n [title]=\"item[keyDesc]\"\r\n class=\"selected-items__item-desc\"></div>\r\n }\r\n <dd-lib-svg-icon id=\"selected-clear-{{selectId}}\" icon=\"clear\" class=\"cup\"\r\n (click)=\"selectItem(item)\"></dd-lib-svg-icon>\r\n </div>\r\n }\r\n </dd-lib-horizontal-scroll>\r\n </div>\r\n\r\n }\r\n <!-- (blur)=\"notifyFocusEvent($event)\"-->\r\n @if (!checkedItem) {\r\n <dd-lib-svg-icon\r\n (click)=\"notifyFocusEvent()\"\r\n [class.black-svg]=\"isShownList\"\r\n [class.disabled]=\"disabled\"\r\n [class.gray-svg]=\"!isShownList\"\r\n [class.up]=\"isShownList\"\r\n id=\"chevron-{{ selectId }}\" class=\"chevron\" icon=\"down_chevron\"></dd-lib-svg-icon>\r\n\r\n } @else if (clearable && !searchValue) {\r\n <dd-lib-svg-icon\r\n (click)=\"onClear(checkedItem)\"\r\n class=\"clear\"\r\n id=\"chevron-{{ selectId }}\" icon=\"clear\"></dd-lib-svg-icon>\r\n }\r\n </div>\r\n\r\n @if (errorTexts.length && showError) {\r\n @for (error of errorTexts; track error) {\r\n <div class=\"lib-select__error\">{{ error }}</div>\r\n }\r\n }\r\n @if (errorText && showSelfError && showError) {\r\n <div class=\"lib-select__error\">{{ errorText }}</div>\r\n }\r\n\r\n @if (isShownList) {\r\n <div\r\n id=\"dropdown\"\r\n [style.max-height]=\"searchOn ? '342px' : '300px'\"\r\n data-child=\"list\"\r\n (ddClickOutside)=\"notifyFocusEvent();fullBlur.emit($event)\"\r\n [elements]=\"['lib-select-' + selectId, 'chevron-' + selectId, 'selected-' + selectId, 'selected-clear-' + selectId]\"\r\n ddListKeyboardNavigation\r\n class=\"select-list-wrapper\">\r\n @if (_data()) {\r\n <!-- \u0415\u0441\u043B\u0438 \u0434\u0430\u043D\u043D\u044B\u0435 \u0434\u043B\u044F \u0441\u0435\u0434\u0435\u043A\u0442\u0430 \u043D\u0435 \u043F\u0440\u0438\u0448\u043B\u043E-->\r\n @if (!_data()?.length && noDataError) {\r\n <div class=\"info-container\">\r\n <div class=\"b2-title no-wrap-text\">\r\n {{ noDataError }}\r\n </div>\r\n </div>\r\n }\r\n\r\n <!-- \u043F\u043E\u0438\u0441\u043A-->\r\n @if (_data()?.length && _data()!.length > 5 && searchOn) {\r\n <div class=\"search-block\">\r\n <dd-lib-svg-icon\r\n class=\"search-icon\"\r\n id=\"chevron-{{ selectId }}\" icon=\"search\"></dd-lib-svg-icon>\r\n <input class=\"search-block__input\" #searchInputEl [attr.name]=\"name\"\r\n [readOnly]=\"readOnly\"\r\n (input)=\"searchInput()\"\r\n [placeholder]=\"searchPlaceholder\"\r\n (blur)=\"handleBlur()\"\r\n (focus)=\"handleFocus()\"\r\n [(ngModel)]=\"searchValue\" type=\"text\">\r\n <dd-lib-svg-icon\r\n [style.display]=\"searchValue ? 'block' : 'none'\"\r\n class=\"cup\"\r\n (click)=\"searchValue=''\"\r\n id=\"chevron-{{ selectId }}\" icon=\"clear\"></dd-lib-svg-icon>\r\n\r\n </div>\r\n }\r\n <!-- \u0415\u0441\u043B\u0438 \u043F\u043E\u0438\u0441\u043A \u043D\u0435 \u0434\u0430\u043B \u0440\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u043E\u0432-->\r\n @if (_data()?.length && (_data() | filterByKey: filterList.bind(this))?.length === 0) {\r\n <div class=\"info-container\">\r\n <div class=\"b2-title no-wrap-text\">\r\n \u0420\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u043E\u0432 \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u043E\r\n </div>\r\n </div>\r\n }\r\n @if (virtualScroll) {\r\n <cdk-virtual-scroll-viewport [itemSize]=\"itemSize\" [style.height]=\"(_data()?.length || 0) * itemSize + 'px'\">\r\n <div *cdkVirtualFor=\"let item of _data() | filterByKey: filterList.bind(this)\">\r\n <ng-container [ngTemplateOutlet]=\"rowItem\" [ngTemplateOutletContext]=\"{item}\"></ng-container>\r\n </div>\r\n </cdk-virtual-scroll-viewport>\r\n } @else {\r\n @for (item of _data() | filterByKey: filterList.bind(this); track item) {\r\n <ng-container [ngTemplateOutlet]=\"rowItem\" [ngTemplateOutletContext]=\"{item}\"></ng-container>\r\n }\r\n }\r\n } @else {\r\n <div class=\"info-container\">\r\n <div class=\"d-flex gap-12 align-center\">\r\n <div class=\"b2-title no-wrap-text\">\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430 \u0434\u0430\u043D\u043D\u044B\u0445</div>\r\n <dd-lib-loader></dd-lib-loader>\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n }\r\n</div>\r\n\r\n<ng-template #rowItem let-item=item>\r\n <div ddSelectableItem [ddTooltip]=\"item.tooltip ? item.tooltip : ''\" [position]=\"tooltipPosition\"\r\n (click)=\"selectItem(item)\"\r\n (itemSelected)=\"selectItem(item)\"\r\n [class.s-item-active]=\"checkSelected(item) && !item.disabled\"\r\n [class.s-item-disabled]=\"item.disabled\"\r\n class=\"select-data\">\r\n @if (stringArray()) {\r\n <div [innerHTML]=\"item | highlight: (highlight ? searchValue : '') | safe: 'html'\"\r\n class=\"select-data__title\"></div>\r\n }\r\n @if (keyTitle && !stringArray()) {\r\n <div\r\n [innerHTML]=\"item[keyTitle!] | highlight: (highlight ? searchValue : '') | safe: 'html'\"\r\n class=\"select-data__title\"></div>\r\n }\r\n @if (keyDesc && !stringArray()) {\r\n <div\r\n [innerHTML]=\"item[keyDesc!] | highlight: (highlight ? searchValue : '') | safe: 'html'\"\r\n [title]=\"item[keyDesc]\"\r\n class=\"select-data__desc\"></div>\r\n }\r\n @if (checkSelected(item)) {\r\n <dd-lib-svg-icon\r\n (click)=\"selectItem(checkedItem)\"\r\n class=\"checked\"\r\n id=\"chevron-{{ selectId }}\" icon=\"check_green\"></dd-lib-svg-icon>\r\n }\r\n </div>\r\n</ng-template>\r\n", styles: [".lib-select{position:relative}.lib-select .select-block{width:100%;height:48px;padding:15px 28px 15px 16px;overflow:hidden;text-overflow:ellipsis;border-radius:8px;border:1px solid var(--input-border-color);background-color:transparent;position:relative}.lib-select .select-block:hover{border-color:var(--input-active-border-colort)}.lib-select .select-block:hover~.selected-items-container .selected-items__item{background:var(--light-green-color);color:var(--font-light-black-color)}.lib-select .select-block:focus{border-color:var(--input-active-border-colort);box-shadow:var(--input-active-border-shadow)}.lib-select .select-block:focus~.selected-items-container .selected-items__item{background:var(--light-green-color);color:var(--font-light-black-color)}.lib-select .select-block:disabled{border:none;background-color:var(--input-disable-input);color:var(--input-disable-text);pointer-events:none}.lib-select .select-block:disabled::placeholder{color:var(--input-placeholder)}.lib-select .select-block:disabled~.selected-items-container .selected-items__item{background:var(--gray-blue-300);color:var(--second-gray-color)}.lib-select .select-block.invalid,.lib-select .select-block.invalid:hover{border-color:var(--input-error-border-color)}.lib-select .select-block.invalid:focus{border-color:var(--input-error-border-color);box-shadow:var(--input-error-border-shadow)}.lib-select .select-block:invalid~.selected-items-container .selected-items__item{background:var(--red-light-color);color:var(--font-light-black-color)}.lib-select .multi-count{position:absolute;top:10px;right:42px;white-space:nowrap}.lib-select .clear{cursor:pointer;position:absolute;right:8px;top:12px}.lib-select .chevron{cursor:pointer;position:absolute;right:16px;top:10px}.lib-select .chevron.up{transform:rotate(180deg)}.lib-select__title{margin-bottom:4px;font-size:14px;line-height:24px;display:flex;align-items:flex-start;color:var(--light-black-color)}.lib-select__error{color:var(--primary-red-color);font-size:12px;font-weight:400;line-height:10px;margin-top:2px;position:absolute}.lib-select .select-list-wrapper{position:absolute;display:block;z-index:100;width:100%;max-height:300px;overflow:auto;border-radius:8px;box-shadow:var(--main-card-shadow);background-color:var(--main-card-color)}.lib-select .select-list-wrapper cdk-virtual-scroll-viewport{max-height:300px}.lib-select .select-list-wrapper.top{bottom:50px;top:unset}.lib-select .select-list-wrapper .select-data{padding:12px 42px 12px 16px;cursor:pointer;position:relative;min-height:40px}.lib-select .select-list-wrapper .select-data__desc{font-size:14px;font-weight:400;line-height:24px;text-overflow:ellipsis;text-wrap:nowrap;padding-top:2px;overflow:hidden;color:var(--second-gray-color)}.lib-select .select-list-wrapper .select-data.key-down-active,.lib-select .select-list-wrapper .select-data:hover,.lib-select .select-list-wrapper .select-data.s-item-active{background:var(--select-act-hov-bgc)}.lib-select .select-list-wrapper .select-data.s-item-active .checked{position:absolute;right:16px;top:10px}.lib-select .select-list-wrapper .select-data.s-item-disabled{cursor:auto;background:var(--disabled-bgc);color:var(--disabled-color)}.lib-select .select-list-wrapper .select-no-data{padding:12px 42px 12px 16px;cursor:auto;position:relative;color:var(--disabled-color)}.lib-select .select-list-wrapper .info-container{padding:36px;display:flex;align-items:center;justify-content:center}.search-block{position:relative;padding:12px;z-index:1;display:flex;gap:4px;align-items:center;border-bottom:1px solid var(--gray-bgc)}.search-block__input{border:none;background:transparent;width:100%;padding-left:40px}.search-block .search-icon{position:absolute;left:20px;top:0;bottom:0}.data-loader{position:absolute;right:0;left:0;bottom:12px}.selected-items-container{overflow:hidden;border-radius:8px;top:0;bottom:0;position:absolute;max-width:calc(100% - 60px);left:6px;margin:8px;align-items:center}.selected-items-container .selected-items__item{background:var(--blue-card);color:var(--font-light-black-color);padding:4px;border-radius:8px;display:flex;gap:4px;align-items:center}.selected-items-container .selected-items__item:hover{background:var(--light-green-color);color:var(--font-light-black-color)}.selected-items-container .selected-items__item-title{white-space:nowrap}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$5.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$5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "pipe", type: HighlightPipe, name: "highlight" }, { kind: "pipe", type: SafePipe, name: "safe" }, { kind: "directive", type: ClickOutsideDirective, selector: "[ddClickOutside]", inputs: ["elements"], outputs: ["ddClickOutside"] }, { kind: "component", type: LibLoaderComponent, selector: "dd-lib-loader", inputs: ["color", "size"] }, { kind: "pipe", type: FilterByKeyPipe, name: "filterByKey" }, { kind: "component", type: LibSvgIconComponent, selector: "dd-lib-svg-icon", inputs: ["width", "height", "color", "icon"] }, { kind: "ngmodule", type: ScrollingModule }, { kind: "directive", type: i2$1.CdkFixedSizeVirtualScroll, selector: "cdk-virtual-scroll-viewport[itemSize]", inputs: ["itemSize", "minBufferPx", "maxBufferPx"] }, { kind: "directive", type: i2$1.CdkVirtualForOf, selector: "[cdkVirtualFor][cdkVirtualForOf]", inputs: ["cdkVirtualForOf", "cdkVirtualForTrackBy", "cdkVirtualForTemplate", "cdkVirtualForTemplateCacheSize"] }, { kind: "component", type: i2$1.CdkVirtualScrollViewport, selector: "cdk-virtual-scroll-viewport", inputs: ["orientation", "appendOnly"], outputs: ["scrolledIndexChange"] }, { kind: "directive", type: TooltipDirective, selector: "[ddTooltip]", inputs: ["ddTooltip", "withClick", "position"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: ListKeyboardNavigationDirective, selector: "[ddListKeyboardNavigation]" }, { kind: "directive", type: SelectableItemDirective, selector: "[ddSelectableItem]", outputs: ["itemSelected"] }, { kind: "directive", type: FixedPositionDirective, selector: "[ddFixedPosition]", inputs: ["childName1", "childName2", "destroyedItem"] }, { kind: "component", type: LibHorizontalScrollComponent, selector: "dd-lib-horizontal-scroll" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3599
3596
|
}
|
|
3600
3597
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: LibSelectComponent, decorators: [{
|
|
3601
3598
|
type: Component,
|
|
@@ -3610,7 +3607,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImpor
|
|
|
3610
3607
|
LibSvgIconComponent,
|
|
3611
3608
|
ScrollingModule,
|
|
3612
3609
|
TooltipDirective,
|
|
3613
|
-
NgStyle,
|
|
3614
3610
|
NgTemplateOutlet,
|
|
3615
3611
|
ListKeyboardNavigationDirective,
|
|
3616
3612
|
SelectableItemDirective,
|
|
@@ -3622,8 +3618,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImpor
|
|
|
3622
3618
|
useExisting: forwardRef(() => LibSelectComponent),
|
|
3623
3619
|
multi: true,
|
|
3624
3620
|
},
|
|
3625
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"lib-select\" id=\"lib-select-{{ selectId }}\" [destroyedItem]=\"isShownList\" ddFixedPosition>\r\n @if (label) {\r\n <label [for]=\"id\" class=\"lib-select__title\">\r\n {{ label }}\r\n @if (required) {\r\n <dd-lib-svg-icon icon=\"error_hint\"></dd-lib-svg-icon>\r\n }\r\n </label>\r\n }\r\n\r\n <div class=\"pos-relative\" data-child=\"input\">\r\n\r\n <input\r\n #select\r\n (change)=\"handleChange()\"\r\n (click)=\"notifyFocusEvent($event)\"\r\n (input)=\"handleInput($event)\"\r\n (blur)=\"handleBlur()\"\r\n (focus)=\"handleFocus()\"\r\n [attr.id]=\"selectId\"\r\n [attr.placeholder]=\"(multiCountValue || searchValue) ? '' : placeholder\"\r\n [attr.tabIndex]=\"tabIndex\"\r\n [attr.type]=\"'text'\"\r\n [class.focused]=\"focused\"\r\n [class.invalid]=\"showError\"\r\n [disabled]=\"disabled\"\r\n [readOnly]=\"true\"\r\n [(ngModel)]=\"inputValue\"\r\n [title]=\"inputValue || ''\"\r\n class=\"text-select select-block\" />\r\n\r\n @if (multiCountValue) {\r\n <div class=\"selected-items-container\"\r\n id=\"selected-{{selectId}}\">\r\n\r\n <dd-lib-horizontal-scroll>\r\n @for (item of checkedItems; track item) {\r\n <div class=\"selected-items__item\">\r\n @if (stringArray()) {\r\n <div [innerHTML]=\"item | highlight: (highlight ? searchValue : '') | safe: 'html'\"\r\n class=\"selected-items__item-title\"></div>\r\n }\r\n @if (keyTitle && !stringArray()) {\r\n <div\r\n [innerHTML]=\"item[keyTitle!] | highlight: (highlight ? searchValue : '') | safe: 'html'\"\r\n class=\"selected-items__item-title\"></div>\r\n }\r\n @if (keyDesc && !stringArray()) {\r\n <div\r\n [innerHTML]=\"item[keyDesc!] | highlight: (highlight ? searchValue : '') | safe: 'html'\"\r\n [title]=\"item[keyDesc]\"\r\n class=\"selected-items__item-desc\"></div>\r\n }\r\n <dd-lib-svg-icon id=\"selected-clear-{{selectId}}\" icon=\"clear\" class=\"cup\"\r\n (click)=\"selectItem(item)\"></dd-lib-svg-icon>\r\n </div>\r\n }\r\n </dd-lib-horizontal-scroll>\r\n </div>\r\n\r\n }\r\n <!-- (blur)=\"notifyFocusEvent($event)\"-->\r\n @if (!checkedItem) {\r\n <dd-lib-svg-icon\r\n (click)=\"notifyFocusEvent($event)\"\r\n [class.black-svg]=\"isShownList\"\r\n [class.disabled]=\"disabled\"\r\n [class.gray-svg]=\"!isShownList\"\r\n [class.up]=\"isShownList\"\r\n id=\"chevron-{{ selectId }}\" class=\"chevron\" icon=\"down_chevron\"></dd-lib-svg-icon>\r\n\r\n } @else if (clearable && !searchValue) {\r\n <dd-lib-svg-icon\r\n (click)=\"onClear(checkedItem)\"\r\n class=\"clear\"\r\n id=\"chevron-{{ selectId }}\" icon=\"clear\"></dd-lib-svg-icon>\r\n }\r\n </div>\r\n\r\n @if (errorTexts.length && showError) {\r\n @for (error of errorTexts; track error) {\r\n <div class=\"lib-select__error\">{{ error }}</div>\r\n }\r\n }\r\n @if (errorText && showSelfError && showError) {\r\n <div class=\"lib-select__error\">{{ errorText }}</div>\r\n }\r\n\r\n @if (isShownList) {\r\n <div\r\n id=\"dropdown\"\r\n [style.max-height]=\"searchOn ? '342px' : '300px'\"\r\n data-child=\"list\"\r\n (ddClickOutside)=\"notifyFocusEvent($event);fullBlur.emit($event)\"\r\n [elements]=\"['lib-select-' + selectId, 'chevron-' + selectId, 'selected-' + selectId, 'selected-clear-' + selectId]\"\r\n ddListKeyboardNavigation\r\n class=\"select-list-wrapper\">\r\n @if (_data()) {\r\n <!-- \u0415\u0441\u043B\u0438 \u0434\u0430\u043D\u043D\u044B\u0435 \u0434\u043B\u044F \u0441\u0435\u0434\u0435\u043A\u0442\u0430 \u043D\u0435 \u043F\u0440\u0438\u0448\u043B\u043E-->\r\n @if (!_data()?.length && noDataError) {\r\n <div class=\"info-container\">\r\n <div class=\"b2-title no-wrap-text\">\r\n {{ noDataError }}\r\n </div>\r\n </div>\r\n }\r\n\r\n <!-- \u043F\u043E\u0438\u0441\u043A-->\r\n @if (_data()?.length && _data()!.length > 5 && searchOn) {\r\n <div class=\"search-block\">\r\n <dd-lib-svg-icon\r\n class=\"search-icon\"\r\n id=\"chevron-{{ selectId }}\" icon=\"search\"></dd-lib-svg-icon>\r\n <input class=\"search-block__input\" #searchInputEl [attr.name]=\"name\"\r\n [readOnly]=\"readOnly\"\r\n (input)=\"searchInput($event)\"\r\n [placeholder]=\"searchPlaceholder\"\r\n (blur)=\"handleBlur()\"\r\n (focus)=\"handleFocus()\"\r\n [(ngModel)]=\"searchValue\" type=\"text\">\r\n <dd-lib-svg-icon\r\n [style.display]=\"searchValue ? 'block' : 'none'\"\r\n class=\"cup\"\r\n (click)=\"searchValue=''\"\r\n id=\"chevron-{{ selectId }}\" icon=\"clear\"></dd-lib-svg-icon>\r\n\r\n </div>\r\n }\r\n <!-- \u0415\u0441\u043B\u0438 \u043F\u043E\u0438\u0441\u043A \u043D\u0435 \u0434\u0430\u043B \u0440\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u043E\u0432-->\r\n @if (_data()?.length && (_data() | filterByKey: filterList.bind(this))?.length === 0) {\r\n <div class=\"info-container\">\r\n <div class=\"b2-title no-wrap-text\">\r\n \u0420\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u043E\u0432 \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u043E\r\n </div>\r\n </div>\r\n }\r\n @if (virtualScroll) {\r\n <cdk-virtual-scroll-viewport [itemSize]=\"itemSize\" [style.height]=\"(_data()?.length || 0) * itemSize + 'px'\">\r\n <div *cdkVirtualFor=\"let item of _data() | filterByKey: filterList.bind(this)\">\r\n <ng-container [ngTemplateOutlet]=\"rowItem\" [ngTemplateOutletContext]=\"{item}\"></ng-container>\r\n </div>\r\n </cdk-virtual-scroll-viewport>\r\n } @else {\r\n @for (item of _data() | filterByKey: filterList.bind(this); track item) {\r\n <ng-container [ngTemplateOutlet]=\"rowItem\" [ngTemplateOutletContext]=\"{item}\"></ng-container>\r\n }\r\n }\r\n } @else {\r\n <div class=\"info-container\">\r\n <div class=\"d-flex gap-12 align-center\">\r\n <div class=\"b2-title no-wrap-text\">\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430 \u0434\u0430\u043D\u043D\u044B\u0445</div>\r\n <dd-lib-loader></dd-lib-loader>\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n }\r\n</div>\r\n\r\n<ng-template #rowItem let-item=item>\r\n <div ddSelectableItem [ddTooltip]=\"item.tooltip ? item.tooltip : ''\" [position]=\"tooltipPosition\"\r\n (click)=\"selectItem(item)\"\r\n (itemSelected)=\"selectItem(item)\"\r\n [class.s-item-active]=\"checkSelected(item) && !item.disabled\"\r\n [class.s-item-disabled]=\"item.disabled\"\r\n class=\"select-data\">\r\n @if (stringArray()) {\r\n <div [innerHTML]=\"item | highlight: (highlight ? searchValue : '') | safe: 'html'\"\r\n class=\"select-data__title\"></div>\r\n }\r\n @if (keyTitle && !stringArray()) {\r\n <div\r\n [innerHTML]=\"item[keyTitle!] | highlight: (highlight ? searchValue : '') | safe: 'html'\"\r\n class=\"select-data__title\"></div>\r\n }\r\n @if (keyDesc && !stringArray()) {\r\n <div\r\n [innerHTML]=\"item[keyDesc!] | highlight: (highlight ? searchValue : '') | safe: 'html'\"\r\n [title]=\"item[keyDesc]\"\r\n class=\"select-data__desc\"></div>\r\n }\r\n @if (checkSelected(item)) {\r\n <dd-lib-svg-icon\r\n (click)=\"selectItem(checkedItem)\"\r\n class=\"checked\"\r\n id=\"chevron-{{ selectId }}\" icon=\"check_green\"></dd-lib-svg-icon>\r\n }\r\n </div>\r\n</ng-template>\r\n", styles: [".lib-select{position:relative}.lib-select .select-block{width:100%;height:48px;padding:15px 28px 15px 16px;overflow:hidden;text-overflow:ellipsis;border-radius:8px;border:1px solid var(--input-border-color);background-color:transparent;position:relative}.lib-select .select-block:hover{border-color:var(--input-active-border-colort)}.lib-select .select-block:focus{border-color:var(--input-active-border-colort);box-shadow:var(--input-active-border-shadow)}.lib-select .select-block:focus~.selected-items-container .selected-items__item{background:var(--light-green-color);color:var(--font-light-black-color)}.lib-select .select-block:disabled{border:none;background-color:var(--input-disable-input);color:var(--input-disable-text);pointer-events:none}.lib-select .select-block:disabled::placeholder{color:var(--input-placeholder)}.lib-select .select-block:disabled~.selected-items-container .selected-items__item{background:var(--gray-blue-300);color:var(--second-gray-color)}.lib-select .select-block.invalid,.lib-select .select-block.invalid:hover{border-color:var(--input-error-border-color)}.lib-select .select-block.invalid:focus{border-color:var(--input-error-border-color);box-shadow:var(--input-error-border-shadow)}.lib-select .select-block:invalid~.selected-items-container .selected-items__item{background:var(--red-light-color);color:var(--font-light-black-color)}.lib-select .multi-count{position:absolute;top:10px;right:42px;white-space:nowrap}.lib-select .clear{cursor:pointer;position:absolute;right:8px;top:12px}.lib-select .chevron{cursor:pointer;position:absolute;right:16px;top:10px}.lib-select .chevron.up{transform:rotate(180deg)}.lib-select__title{margin-bottom:4px;font-size:14px;line-height:24px;display:flex;align-items:flex-start;color:var(--light-black-color)}.lib-select__error{color:var(--primary-red-color);font-size:12px;font-weight:400;line-height:10px;margin-top:2px;position:absolute}.lib-select .select-list-wrapper{position:absolute;display:block;z-index:100;width:100%;max-height:300px;overflow:auto;border-radius:8px;box-shadow:var(--main-card-shadow);background-color:var(--main-card-color)}.lib-select .select-list-wrapper cdk-virtual-scroll-viewport{max-height:300px}.lib-select .select-list-wrapper.top{bottom:50px;top:unset}.lib-select .select-list-wrapper .select-data{padding:12px 42px 12px 16px;cursor:pointer;position:relative;min-height:40px}.lib-select .select-list-wrapper .select-data__desc{font-size:14px;font-weight:400;line-height:24px;text-overflow:ellipsis;text-wrap:nowrap;padding-top:2px;overflow:hidden;color:var(--second-gray-color)}.lib-select .select-list-wrapper .select-data.key-down-active,.lib-select .select-list-wrapper .select-data:hover,.lib-select .select-list-wrapper .select-data.s-item-active{background:var(--select-act-hov-bgc)}.lib-select .select-list-wrapper .select-data.s-item-active .checked{position:absolute;right:16px;top:10px}.lib-select .select-list-wrapper .select-data.s-item-disabled{cursor:auto;background:var(--disabled-bgc);color:var(--disabled-color)}.lib-select .select-list-wrapper .select-no-data{padding:12px 42px 12px 16px;cursor:auto;position:relative;color:var(--disabled-color)}.lib-select .select-list-wrapper .info-container{padding:36px;display:flex;align-items:center;justify-content:center}.search-block{position:relative;padding:12px;z-index:1;display:flex;gap:4px;align-items:center;border-bottom:1px solid var(--gray-bgc)}.search-block__input{border:none;background:transparent;width:100%;padding-left:40px}.search-block .search-icon{position:absolute;left:20px;top:0;bottom:0}.data-loader{position:absolute;right:0;left:0;bottom:12px}.selected-items-container{overflow:hidden;border-radius:8px;top:0;bottom:0;position:absolute;max-width:calc(100% - 60px);left:6px;margin:8px;align-items:center}.selected-items-container .selected-items__item{background:var(--blue-card);color:var(--font-light-black-color);padding:4px;border-radius:8px;display:flex;gap:4px;align-items:center}.selected-items-container .selected-items__item-title{white-space:nowrap}\n"] }]
|
|
3626
|
-
}], ctorParameters: () => [{ type: i0.DestroyRef }, { type: i0.ChangeDetectorRef }, { type:
|
|
3621
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"lib-select\" id=\"lib-select-{{ selectId }}\" [destroyedItem]=\"isShownList\" ddFixedPosition>\r\n @if (label) {\r\n <label [for]=\"id\" class=\"lib-select__title\">\r\n {{ label }}\r\n @if (required) {\r\n <dd-lib-svg-icon icon=\"error_hint\"></dd-lib-svg-icon>\r\n }\r\n </label>\r\n }\r\n\r\n <div class=\"pos-relative\" data-child=\"input\">\r\n\r\n <input\r\n #select\r\n (change)=\"handleChange()\"\r\n (click)=\"notifyFocusEvent()\"\r\n (input)=\"handleInput($event)\"\r\n (blur)=\"handleBlur()\"\r\n (focus)=\"handleFocus()\"\r\n [attr.id]=\"selectId\"\r\n [attr.placeholder]=\"(multiCountValue || searchValue) ? '' : placeholder\"\r\n [attr.tabIndex]=\"tabIndex\"\r\n [attr.type]=\"'text'\"\r\n [class.focused]=\"focused\"\r\n [class.invalid]=\"showError\"\r\n [disabled]=\"disabled\"\r\n [readOnly]=\"true\"\r\n [(ngModel)]=\"inputValue\"\r\n [title]=\"inputValue || ''\"\r\n class=\"text-select select-block\" />\r\n\r\n @if (multiCountValue) {\r\n <div class=\"selected-items-container\"\r\n id=\"selected-{{selectId}}\">\r\n\r\n <dd-lib-horizontal-scroll>\r\n @for (item of checkedItems; track item) {\r\n <div class=\"selected-items__item\">\r\n @if (stringArray()) {\r\n <div [innerHTML]=\"item | highlight: (highlight ? searchValue : '') | safe: 'html'\"\r\n class=\"selected-items__item-title\"></div>\r\n }\r\n @if (keyTitle && !stringArray()) {\r\n <div\r\n [innerHTML]=\"item[keyTitle!] | highlight: (highlight ? searchValue : '') | safe: 'html'\"\r\n class=\"selected-items__item-title\"></div>\r\n }\r\n @if (keyDesc && !stringArray()) {\r\n <div\r\n [innerHTML]=\"item[keyDesc!] | highlight: (highlight ? searchValue : '') | safe: 'html'\"\r\n [title]=\"item[keyDesc]\"\r\n class=\"selected-items__item-desc\"></div>\r\n }\r\n <dd-lib-svg-icon id=\"selected-clear-{{selectId}}\" icon=\"clear\" class=\"cup\"\r\n (click)=\"selectItem(item)\"></dd-lib-svg-icon>\r\n </div>\r\n }\r\n </dd-lib-horizontal-scroll>\r\n </div>\r\n\r\n }\r\n <!-- (blur)=\"notifyFocusEvent($event)\"-->\r\n @if (!checkedItem) {\r\n <dd-lib-svg-icon\r\n (click)=\"notifyFocusEvent()\"\r\n [class.black-svg]=\"isShownList\"\r\n [class.disabled]=\"disabled\"\r\n [class.gray-svg]=\"!isShownList\"\r\n [class.up]=\"isShownList\"\r\n id=\"chevron-{{ selectId }}\" class=\"chevron\" icon=\"down_chevron\"></dd-lib-svg-icon>\r\n\r\n } @else if (clearable && !searchValue) {\r\n <dd-lib-svg-icon\r\n (click)=\"onClear(checkedItem)\"\r\n class=\"clear\"\r\n id=\"chevron-{{ selectId }}\" icon=\"clear\"></dd-lib-svg-icon>\r\n }\r\n </div>\r\n\r\n @if (errorTexts.length && showError) {\r\n @for (error of errorTexts; track error) {\r\n <div class=\"lib-select__error\">{{ error }}</div>\r\n }\r\n }\r\n @if (errorText && showSelfError && showError) {\r\n <div class=\"lib-select__error\">{{ errorText }}</div>\r\n }\r\n\r\n @if (isShownList) {\r\n <div\r\n id=\"dropdown\"\r\n [style.max-height]=\"searchOn ? '342px' : '300px'\"\r\n data-child=\"list\"\r\n (ddClickOutside)=\"notifyFocusEvent();fullBlur.emit($event)\"\r\n [elements]=\"['lib-select-' + selectId, 'chevron-' + selectId, 'selected-' + selectId, 'selected-clear-' + selectId]\"\r\n ddListKeyboardNavigation\r\n class=\"select-list-wrapper\">\r\n @if (_data()) {\r\n <!-- \u0415\u0441\u043B\u0438 \u0434\u0430\u043D\u043D\u044B\u0435 \u0434\u043B\u044F \u0441\u0435\u0434\u0435\u043A\u0442\u0430 \u043D\u0435 \u043F\u0440\u0438\u0448\u043B\u043E-->\r\n @if (!_data()?.length && noDataError) {\r\n <div class=\"info-container\">\r\n <div class=\"b2-title no-wrap-text\">\r\n {{ noDataError }}\r\n </div>\r\n </div>\r\n }\r\n\r\n <!-- \u043F\u043E\u0438\u0441\u043A-->\r\n @if (_data()?.length && _data()!.length > 5 && searchOn) {\r\n <div class=\"search-block\">\r\n <dd-lib-svg-icon\r\n class=\"search-icon\"\r\n id=\"chevron-{{ selectId }}\" icon=\"search\"></dd-lib-svg-icon>\r\n <input class=\"search-block__input\" #searchInputEl [attr.name]=\"name\"\r\n [readOnly]=\"readOnly\"\r\n (input)=\"searchInput()\"\r\n [placeholder]=\"searchPlaceholder\"\r\n (blur)=\"handleBlur()\"\r\n (focus)=\"handleFocus()\"\r\n [(ngModel)]=\"searchValue\" type=\"text\">\r\n <dd-lib-svg-icon\r\n [style.display]=\"searchValue ? 'block' : 'none'\"\r\n class=\"cup\"\r\n (click)=\"searchValue=''\"\r\n id=\"chevron-{{ selectId }}\" icon=\"clear\"></dd-lib-svg-icon>\r\n\r\n </div>\r\n }\r\n <!-- \u0415\u0441\u043B\u0438 \u043F\u043E\u0438\u0441\u043A \u043D\u0435 \u0434\u0430\u043B \u0440\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u043E\u0432-->\r\n @if (_data()?.length && (_data() | filterByKey: filterList.bind(this))?.length === 0) {\r\n <div class=\"info-container\">\r\n <div class=\"b2-title no-wrap-text\">\r\n \u0420\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u043E\u0432 \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u043E\r\n </div>\r\n </div>\r\n }\r\n @if (virtualScroll) {\r\n <cdk-virtual-scroll-viewport [itemSize]=\"itemSize\" [style.height]=\"(_data()?.length || 0) * itemSize + 'px'\">\r\n <div *cdkVirtualFor=\"let item of _data() | filterByKey: filterList.bind(this)\">\r\n <ng-container [ngTemplateOutlet]=\"rowItem\" [ngTemplateOutletContext]=\"{item}\"></ng-container>\r\n </div>\r\n </cdk-virtual-scroll-viewport>\r\n } @else {\r\n @for (item of _data() | filterByKey: filterList.bind(this); track item) {\r\n <ng-container [ngTemplateOutlet]=\"rowItem\" [ngTemplateOutletContext]=\"{item}\"></ng-container>\r\n }\r\n }\r\n } @else {\r\n <div class=\"info-container\">\r\n <div class=\"d-flex gap-12 align-center\">\r\n <div class=\"b2-title no-wrap-text\">\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430 \u0434\u0430\u043D\u043D\u044B\u0445</div>\r\n <dd-lib-loader></dd-lib-loader>\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n }\r\n</div>\r\n\r\n<ng-template #rowItem let-item=item>\r\n <div ddSelectableItem [ddTooltip]=\"item.tooltip ? item.tooltip : ''\" [position]=\"tooltipPosition\"\r\n (click)=\"selectItem(item)\"\r\n (itemSelected)=\"selectItem(item)\"\r\n [class.s-item-active]=\"checkSelected(item) && !item.disabled\"\r\n [class.s-item-disabled]=\"item.disabled\"\r\n class=\"select-data\">\r\n @if (stringArray()) {\r\n <div [innerHTML]=\"item | highlight: (highlight ? searchValue : '') | safe: 'html'\"\r\n class=\"select-data__title\"></div>\r\n }\r\n @if (keyTitle && !stringArray()) {\r\n <div\r\n [innerHTML]=\"item[keyTitle!] | highlight: (highlight ? searchValue : '') | safe: 'html'\"\r\n class=\"select-data__title\"></div>\r\n }\r\n @if (keyDesc && !stringArray()) {\r\n <div\r\n [innerHTML]=\"item[keyDesc!] | highlight: (highlight ? searchValue : '') | safe: 'html'\"\r\n [title]=\"item[keyDesc]\"\r\n class=\"select-data__desc\"></div>\r\n }\r\n @if (checkSelected(item)) {\r\n <dd-lib-svg-icon\r\n (click)=\"selectItem(checkedItem)\"\r\n class=\"checked\"\r\n id=\"chevron-{{ selectId }}\" icon=\"check_green\"></dd-lib-svg-icon>\r\n }\r\n </div>\r\n</ng-template>\r\n", styles: [".lib-select{position:relative}.lib-select .select-block{width:100%;height:48px;padding:15px 28px 15px 16px;overflow:hidden;text-overflow:ellipsis;border-radius:8px;border:1px solid var(--input-border-color);background-color:transparent;position:relative}.lib-select .select-block:hover{border-color:var(--input-active-border-colort)}.lib-select .select-block:hover~.selected-items-container .selected-items__item{background:var(--light-green-color);color:var(--font-light-black-color)}.lib-select .select-block:focus{border-color:var(--input-active-border-colort);box-shadow:var(--input-active-border-shadow)}.lib-select .select-block:focus~.selected-items-container .selected-items__item{background:var(--light-green-color);color:var(--font-light-black-color)}.lib-select .select-block:disabled{border:none;background-color:var(--input-disable-input);color:var(--input-disable-text);pointer-events:none}.lib-select .select-block:disabled::placeholder{color:var(--input-placeholder)}.lib-select .select-block:disabled~.selected-items-container .selected-items__item{background:var(--gray-blue-300);color:var(--second-gray-color)}.lib-select .select-block.invalid,.lib-select .select-block.invalid:hover{border-color:var(--input-error-border-color)}.lib-select .select-block.invalid:focus{border-color:var(--input-error-border-color);box-shadow:var(--input-error-border-shadow)}.lib-select .select-block:invalid~.selected-items-container .selected-items__item{background:var(--red-light-color);color:var(--font-light-black-color)}.lib-select .multi-count{position:absolute;top:10px;right:42px;white-space:nowrap}.lib-select .clear{cursor:pointer;position:absolute;right:8px;top:12px}.lib-select .chevron{cursor:pointer;position:absolute;right:16px;top:10px}.lib-select .chevron.up{transform:rotate(180deg)}.lib-select__title{margin-bottom:4px;font-size:14px;line-height:24px;display:flex;align-items:flex-start;color:var(--light-black-color)}.lib-select__error{color:var(--primary-red-color);font-size:12px;font-weight:400;line-height:10px;margin-top:2px;position:absolute}.lib-select .select-list-wrapper{position:absolute;display:block;z-index:100;width:100%;max-height:300px;overflow:auto;border-radius:8px;box-shadow:var(--main-card-shadow);background-color:var(--main-card-color)}.lib-select .select-list-wrapper cdk-virtual-scroll-viewport{max-height:300px}.lib-select .select-list-wrapper.top{bottom:50px;top:unset}.lib-select .select-list-wrapper .select-data{padding:12px 42px 12px 16px;cursor:pointer;position:relative;min-height:40px}.lib-select .select-list-wrapper .select-data__desc{font-size:14px;font-weight:400;line-height:24px;text-overflow:ellipsis;text-wrap:nowrap;padding-top:2px;overflow:hidden;color:var(--second-gray-color)}.lib-select .select-list-wrapper .select-data.key-down-active,.lib-select .select-list-wrapper .select-data:hover,.lib-select .select-list-wrapper .select-data.s-item-active{background:var(--select-act-hov-bgc)}.lib-select .select-list-wrapper .select-data.s-item-active .checked{position:absolute;right:16px;top:10px}.lib-select .select-list-wrapper .select-data.s-item-disabled{cursor:auto;background:var(--disabled-bgc);color:var(--disabled-color)}.lib-select .select-list-wrapper .select-no-data{padding:12px 42px 12px 16px;cursor:auto;position:relative;color:var(--disabled-color)}.lib-select .select-list-wrapper .info-container{padding:36px;display:flex;align-items:center;justify-content:center}.search-block{position:relative;padding:12px;z-index:1;display:flex;gap:4px;align-items:center;border-bottom:1px solid var(--gray-bgc)}.search-block__input{border:none;background:transparent;width:100%;padding-left:40px}.search-block .search-icon{position:absolute;left:20px;top:0;bottom:0}.data-loader{position:absolute;right:0;left:0;bottom:12px}.selected-items-container{overflow:hidden;border-radius:8px;top:0;bottom:0;position:absolute;max-width:calc(100% - 60px);left:6px;margin:8px;align-items:center}.selected-items-container .selected-items__item{background:var(--blue-card);color:var(--font-light-black-color);padding:4px;border-radius:8px;display:flex;gap:4px;align-items:center}.selected-items-container .selected-items__item:hover{background:var(--light-green-color);color:var(--font-light-black-color)}.selected-items-container .selected-items__item-title{white-space:nowrap}\n"] }]
|
|
3622
|
+
}], ctorParameters: () => [{ type: i0.DestroyRef }, { type: i0.ChangeDetectorRef }, { type: i1$5.ControlContainer, decorators: [{
|
|
3627
3623
|
type: Optional
|
|
3628
3624
|
}, {
|
|
3629
3625
|
type: Host
|
|
@@ -3913,7 +3909,7 @@ class LibTextareaComponent extends LibCommonInputTextComponent {
|
|
|
3913
3909
|
useExisting: forwardRef(() => LibTextareaComponent),
|
|
3914
3910
|
multi: true,
|
|
3915
3911
|
},
|
|
3916
|
-
], viewQueries: [{ propertyName: "textarea", first: true, predicate: ["textarea"], descendants: true, read: ElementRef, static: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"lib-textarea\">\r\n <label [for]=\"id\" class=\"d-block g-text-sm mb-4\">\r\n {{ label }}\r\n @if (needCounter && maxlength) {\r\n <span>(\u043E\u0441\u0442\u0430\u043B\u043E\u0441\u044C {{ +maxlength! - (value?.length || 0) }} \u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432)</span>\r\n }\r\n @if (required) {\r\n <span class=\"red\">*</span>\r\n }\r\n </label>\r\n <div class=\"pos-relative d-flex\">\r\n <textarea\r\n #textarea\r\n (blur)=\"notifyFocusEvent(
|
|
3912
|
+
], viewQueries: [{ propertyName: "textarea", first: true, predicate: ["textarea"], descendants: true, read: ElementRef, static: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"lib-textarea\">\r\n <label [for]=\"id\" class=\"d-block g-text-sm mb-4\">\r\n {{ label }}\r\n @if (needCounter && maxlength) {\r\n <span>(\u043E\u0441\u0442\u0430\u043B\u043E\u0441\u044C {{ +maxlength! - (value?.length || 0) }} \u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432)</span>\r\n }\r\n @if (required) {\r\n <span class=\"red\">*</span>\r\n }\r\n </label>\r\n <div class=\"pos-relative d-flex\">\r\n <textarea\r\n #textarea\r\n (blur)=\"notifyFocusEvent()\"\r\n (change)=\"handleChange()\"\r\n (focus)=\"notifyFocusEvent()\"\r\n (input)=\"handleInput($event)\"\r\n (keyup.enter)=\"forceChange()\"\r\n [(ngModel)]=\"value\"\r\n [attr.id]=\"id ? id : null\"\r\n [attr.maxlength]=\"maxlength\"\r\n [attr.minlength]=\"minlength\"\r\n [attr.name]=\"name\"\r\n [attr.placeholder]=\"placeholder\"\r\n [attr.tabIndex]=\"tabIndex\"\r\n [class.focused]=\"focused\"\r\n [class.invalid]=\"invalid\"\r\n [disabled]=\"disabled\"\r\n [readOnly]=\"readOnly\"\r\n [required]=\"required\"\r\n [rows]=\"rows\"\r\n class=\"textarea\"></textarea>\r\n @if (maxlength) {\r\n <span class=\"lib-textarea__counter\">{{ value?.length || 0 }}/{{ maxlength }}</span>\r\n }\r\n </div>\r\n\r\n @if (errorTexts.length && showError) {\r\n @for (error of errorTexts; track error) {\r\n <div class=\"lib-input__error\">{{ error }}</div>\r\n }\r\n }\r\n</div>\r\n", styles: [".lib-textarea{position:relative;display:inline;flex-direction:column}.lib-textarea textarea{width:100%;min-height:48px;padding:12px 16px;border-radius:8px;border:1px solid var(--input-border-color);background-color:transparent;resize:none;font-size:16px;line-height:24px;color:var(--light-black-color)}.lib-textarea textarea:hover{border-color:var(--input-active-border-colort)}.lib-textarea textarea:focus{border-color:var(--input-active-border-colort);box-shadow:var(--input-active-border-shadow)}.lib-textarea textarea:disabled{border:none;background-color:var(--input-disable-input);color:var(--input-disable-text);pointer-events:none}.lib-textarea textarea:disabled::placeholder{color:var(--input-placeholder)}.lib-textarea textarea.invalid,.lib-textarea textarea.invalid:hover{border-color:var(--input-error-border-color)}.lib-textarea textarea.invalid:focus{border-color:var(--input-error-border-color);box-shadow:var(--input-error-border-shadow)}.lib-textarea__counter{position:absolute;font-size:12px;font-weight:400;right:16px;bottom:12px;color:var(--input-placeholder)}.lib-textarea__counter textarea:disabled+.lib-text-counter{color:var(--input-disable-text)}.lib-textarea__error{color:var(--primary-red-color);font-size:12px;font-weight:400;line-height:10px;margin-top:2px;position:absolute}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$5.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$5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$5.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1$5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3917
3913
|
}
|
|
3918
3914
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: LibTextareaComponent, decorators: [{
|
|
3919
3915
|
type: Component,
|
|
@@ -3923,7 +3919,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImpor
|
|
|
3923
3919
|
useExisting: forwardRef(() => LibTextareaComponent),
|
|
3924
3920
|
multi: true,
|
|
3925
3921
|
},
|
|
3926
|
-
], template: "<div class=\"lib-textarea\">\r\n <label [for]=\"id\" class=\"d-block g-text-sm mb-4\">\r\n {{ label }}\r\n @if (needCounter && maxlength) {\r\n <span>(\u043E\u0441\u0442\u0430\u043B\u043E\u0441\u044C {{ +maxlength! - (value?.length || 0) }} \u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432)</span>\r\n }\r\n @if (required) {\r\n <span class=\"red\">*</span>\r\n }\r\n </label>\r\n <div class=\"pos-relative d-flex\">\r\n <textarea\r\n #textarea\r\n (blur)=\"notifyFocusEvent(
|
|
3922
|
+
], template: "<div class=\"lib-textarea\">\r\n <label [for]=\"id\" class=\"d-block g-text-sm mb-4\">\r\n {{ label }}\r\n @if (needCounter && maxlength) {\r\n <span>(\u043E\u0441\u0442\u0430\u043B\u043E\u0441\u044C {{ +maxlength! - (value?.length || 0) }} \u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432)</span>\r\n }\r\n @if (required) {\r\n <span class=\"red\">*</span>\r\n }\r\n </label>\r\n <div class=\"pos-relative d-flex\">\r\n <textarea\r\n #textarea\r\n (blur)=\"notifyFocusEvent()\"\r\n (change)=\"handleChange()\"\r\n (focus)=\"notifyFocusEvent()\"\r\n (input)=\"handleInput($event)\"\r\n (keyup.enter)=\"forceChange()\"\r\n [(ngModel)]=\"value\"\r\n [attr.id]=\"id ? id : null\"\r\n [attr.maxlength]=\"maxlength\"\r\n [attr.minlength]=\"minlength\"\r\n [attr.name]=\"name\"\r\n [attr.placeholder]=\"placeholder\"\r\n [attr.tabIndex]=\"tabIndex\"\r\n [class.focused]=\"focused\"\r\n [class.invalid]=\"invalid\"\r\n [disabled]=\"disabled\"\r\n [readOnly]=\"readOnly\"\r\n [required]=\"required\"\r\n [rows]=\"rows\"\r\n class=\"textarea\"></textarea>\r\n @if (maxlength) {\r\n <span class=\"lib-textarea__counter\">{{ value?.length || 0 }}/{{ maxlength }}</span>\r\n }\r\n </div>\r\n\r\n @if (errorTexts.length && showError) {\r\n @for (error of errorTexts; track error) {\r\n <div class=\"lib-input__error\">{{ error }}</div>\r\n }\r\n }\r\n</div>\r\n", styles: [".lib-textarea{position:relative;display:inline;flex-direction:column}.lib-textarea textarea{width:100%;min-height:48px;padding:12px 16px;border-radius:8px;border:1px solid var(--input-border-color);background-color:transparent;resize:none;font-size:16px;line-height:24px;color:var(--light-black-color)}.lib-textarea textarea:hover{border-color:var(--input-active-border-colort)}.lib-textarea textarea:focus{border-color:var(--input-active-border-colort);box-shadow:var(--input-active-border-shadow)}.lib-textarea textarea:disabled{border:none;background-color:var(--input-disable-input);color:var(--input-disable-text);pointer-events:none}.lib-textarea textarea:disabled::placeholder{color:var(--input-placeholder)}.lib-textarea textarea.invalid,.lib-textarea textarea.invalid:hover{border-color:var(--input-error-border-color)}.lib-textarea textarea.invalid:focus{border-color:var(--input-error-border-color);box-shadow:var(--input-error-border-shadow)}.lib-textarea__counter{position:absolute;font-size:12px;font-weight:400;right:16px;bottom:12px;color:var(--input-placeholder)}.lib-textarea__counter textarea:disabled+.lib-text-counter{color:var(--input-disable-text)}.lib-textarea__error{color:var(--primary-red-color);font-size:12px;font-weight:400;line-height:10px;margin-top:2px;position:absolute}\n"] }]
|
|
3927
3923
|
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i1$5.ControlContainer, decorators: [{
|
|
3928
3924
|
type: Optional
|
|
3929
3925
|
}, {
|
|
@@ -4407,7 +4403,7 @@ function Disabled(controlKey, streams = ['loadings', 'subloadings']) {
|
|
|
4407
4403
|
};
|
|
4408
4404
|
}
|
|
4409
4405
|
function DisableAfterNCall(limit = 5) {
|
|
4410
|
-
return function (
|
|
4406
|
+
return function (_target, key, descriptor) {
|
|
4411
4407
|
const originalMethod = descriptor.value;
|
|
4412
4408
|
let count = 0;
|
|
4413
4409
|
descriptor.value = function (...args) {
|