@morozeckiy/dd-lib 0.7.94 → 0.7.96

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.
@@ -6,7 +6,7 @@ import { BehaviorSubject, Subject, throwError, fromEvent, of, combineLatest } fr
6
6
  import { format, parse, isAfter, isBefore, isValid } from 'date-fns';
7
7
  import * as i1$1 from '@angular/common/http';
8
8
  import { HttpErrorResponse, HttpHeaders, HttpParams } from '@angular/common/http';
9
- import { catchError, map, filter, takeUntil, tap, debounceTime, mergeMap, delay, switchMap } from 'rxjs/operators';
9
+ import { catchError, map, filter, takeUntil, shareReplay, tap, debounceTime, mergeMap, delay, switchMap } from 'rxjs/operators';
10
10
  import * as i1 from '@angular/router';
11
11
  import { RouterLink } from '@angular/router';
12
12
  import * as i1$2 from '@angular/platform-browser';
@@ -2133,44 +2133,114 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImpor
2133
2133
  type: Input
2134
2134
  }] } });
2135
2135
 
2136
+ /**
2137
+ * Класс кеширует свг после загрузки, чтоб не спамить их постоянной загрузкой
2138
+ **/
2139
+ class LruSvgCache {
2140
+ constructor() {
2141
+ this.cache = new Map();
2142
+ this.MAX_SIZE = 100;
2143
+ }
2144
+ static getInstance() {
2145
+ if (!LruSvgCache.instance) {
2146
+ LruSvgCache.instance = new LruSvgCache();
2147
+ }
2148
+ return LruSvgCache.instance;
2149
+ }
2150
+ get(svgUrl) {
2151
+ const observable = this.cache.get(svgUrl);
2152
+ // Если элемент найден, перемещаем его в конец (как самый новый)
2153
+ if (observable) {
2154
+ this.cache.delete(svgUrl);
2155
+ this.cache.set(svgUrl, observable);
2156
+ }
2157
+ return observable;
2158
+ }
2159
+ set(svgUrl, observable) {
2160
+ // Если элемент уже существует, сначала удаляем его
2161
+ if (this.cache.has(svgUrl)) {
2162
+ this.cache.delete(svgUrl);
2163
+ }
2164
+ else if (this.cache.size >= this.MAX_SIZE) {
2165
+ const firstKey = this.cache.keys().next().value;
2166
+ this.cache.delete(firstKey);
2167
+ }
2168
+ this.cache.set(svgUrl, observable);
2169
+ }
2170
+ delete(svgUrl) {
2171
+ this.cache.delete(svgUrl);
2172
+ }
2173
+ clear() {
2174
+ this.cache.clear();
2175
+ }
2176
+ }
2136
2177
  class LibSvgViewerComponent {
2137
2178
  constructor(http, elementRef) {
2138
2179
  this.http = http;
2139
2180
  this.elementRef = elementRef;
2140
2181
  this.path = 'assets/images/';
2141
- this.pack = 'svg'; // директория внутри path
2182
+ this.pack = 'svg';
2142
2183
  this.icon = '';
2143
2184
  this.width = '';
2144
2185
  this.height = '';
2145
2186
  this.color = '';
2146
2187
  this.containerClass = '';
2188
+ this.fullSize = false;
2147
2189
  this.colorRules = [];
2190
+ this.svgCache = LruSvgCache.getInstance();
2191
+ this.currentSvgUrl = null;
2148
2192
  }
2149
2193
  ngOnChanges(changes) {
2150
- this.loadSvg();
2194
+ if (changes['path'] || changes['pack'] || changes['icon']) {
2195
+ this.loadSvg();
2196
+ }
2197
+ else if (changes['color'] || changes['colorRules'] || changes['width'] || changes['height']) {
2198
+ this.updateSvgStyles();
2199
+ }
2200
+ }
2201
+ ngOnDestroy() {
2202
+ this.currentSvgUrl = null;
2151
2203
  }
2152
2204
  loadSvg() {
2153
- if (!this.path || !this.icon)
2205
+ if (!this.path || !this.icon) {
2206
+ this.clearSvgContainer();
2154
2207
  return;
2155
- this.http.get(`${this.path}${this.pack}/${this.icon}.svg`, { responseType: 'text' })
2156
- .pipe(catchError((error) => {
2208
+ }
2209
+ const svgUrl = this.getSvgUrl();
2210
+ this.currentSvgUrl = svgUrl;
2211
+ this.getSvgWithCache(svgUrl).subscribe({
2212
+ next: (svg) => {
2213
+ if (this.currentSvgUrl === svgUrl) {
2214
+ this.renderSvg(svg);
2215
+ }
2216
+ },
2217
+ error: (error) => {
2218
+ console.error('Ошибка загрузки SVG:', error);
2219
+ this.clearSvgContainer();
2220
+ }
2221
+ });
2222
+ }
2223
+ getSvgUrl() {
2224
+ const normalizedPath = this.path.endsWith('/') ? this.path : `${this.path}/`;
2225
+ const normalizedPack = this.pack ? `${this.pack}/` : '';
2226
+ return `${normalizedPath}${normalizedPack}${this.icon}.svg`;
2227
+ }
2228
+ getSvgWithCache(svgUrl) {
2229
+ const cached = this.svgCache.get(svgUrl);
2230
+ if (cached) {
2231
+ return cached;
2232
+ }
2233
+ const request = this.http.get(svgUrl, { responseType: 'text' }).pipe(catchError((error) => {
2157
2234
  const errorMessage = error.message || 'Неизвестная ошибка';
2158
- const customError = new HttpErrorResponse({
2159
- error: `SVG не найден: ${errorMessage}`,
2160
- status: 404,
2161
- statusText: 'Not Found'
2162
- });
2163
2235
  console.error(`Ошибка загрузки SVG: ${errorMessage}`, {
2164
- path: `${this.path}${this.pack}/${this.icon}.svg`,
2236
+ path: svgUrl,
2165
2237
  status: error.status
2166
2238
  });
2167
- return throwError(() => customError);
2168
- }))
2169
- .subscribe({
2170
- next: (svg) => {
2171
- this.renderSvg(svg);
2172
- }
2173
- });
2239
+ this.svgCache.delete(svgUrl);
2240
+ return throwError(() => new Error(`SVG не найден: ${svgUrl}`));
2241
+ }), shareReplay(1));
2242
+ this.svgCache.set(svgUrl, request);
2243
+ return request;
2174
2244
  }
2175
2245
  renderSvg(svgString) {
2176
2246
  const container = this.elementRef.nativeElement.querySelector('.svg-container');
@@ -2178,14 +2248,30 @@ class LibSvgViewerComponent {
2178
2248
  const svg = container.querySelector('svg');
2179
2249
  if (!svg)
2180
2250
  return;
2181
- // Применяем параметры
2251
+ this.applySvgAttributes(svg);
2252
+ this.applyStyling(svg);
2253
+ }
2254
+ applySvgAttributes(svg) {
2255
+ if (this.fullSize) {
2256
+ svg.setAttribute('width', '100%');
2257
+ svg.setAttribute('height', '100%');
2258
+ }
2259
+ svg.setAttribute('focusable', 'false');
2260
+ svg.setAttribute('aria-hidden', 'true');
2261
+ // Добавляем класс для многоцветных иконок
2262
+ svg.classList.add('svg-icon');
2263
+ svg.classList.add('svg-icon-multi-color');
2182
2264
  if (this.width) {
2183
2265
  svg.style.width = this.width;
2184
2266
  }
2185
2267
  if (this.height) {
2186
2268
  svg.style.height = this.height;
2187
2269
  }
2188
- this.applyColorRules(svg);
2270
+ }
2271
+ applyStyling(svg) {
2272
+ if (this.colorRules && this.colorRules.length > 0) {
2273
+ this.applyColorRules(svg);
2274
+ }
2189
2275
  if (this.color) {
2190
2276
  this.applyColor(svg);
2191
2277
  }
@@ -2194,18 +2280,17 @@ class LibSvgViewerComponent {
2194
2280
  this.colorRules.forEach(rule => {
2195
2281
  const elements = svg.querySelectorAll(rule.selector);
2196
2282
  elements.forEach(el => {
2197
- if (rule.attribute === 'fill' || rule.attribute === 'both') {
2198
- el.setAttribute('fill', rule.color);
2199
- }
2200
- if (rule.attribute === 'stroke' || rule.attribute === 'both') {
2201
- el.setAttribute('stroke', rule.color);
2202
- }
2203
- // Если атрибут не указан, меняем и fill и stroke
2204
- if (!rule.attribute) {
2205
- if (el.hasAttribute('fill')) {
2283
+ if (rule.attribute === 'fill' || rule.attribute === 'both' || !rule.attribute) {
2284
+ if (el.hasAttribute('fill') &&
2285
+ el.getAttribute('fill') !== 'none' &&
2286
+ el.getAttribute('fill') !== 'transparent') {
2206
2287
  el.setAttribute('fill', rule.color);
2207
2288
  }
2208
- if (el.hasAttribute('stroke')) {
2289
+ }
2290
+ if (rule.attribute === 'stroke' || rule.attribute === 'both' || !rule.attribute) {
2291
+ if (el.hasAttribute('stroke') &&
2292
+ el.getAttribute('stroke') !== 'none' &&
2293
+ el.getAttribute('stroke') !== 'transparent') {
2209
2294
  el.setAttribute('stroke', rule.color);
2210
2295
  }
2211
2296
  }
@@ -2215,13 +2300,11 @@ class LibSvgViewerComponent {
2215
2300
  applyColor(svg) {
2216
2301
  const elements = svg.querySelectorAll('[stroke], [fill]');
2217
2302
  elements.forEach(el => {
2218
- // Обрабатываем stroke
2219
2303
  if (el.hasAttribute('stroke') &&
2220
2304
  el.getAttribute('stroke') !== 'none' &&
2221
2305
  el.getAttribute('stroke') !== 'transparent') {
2222
2306
  el.setAttribute('stroke', this.color);
2223
2307
  }
2224
- // Обрабатываем fill
2225
2308
  if (el.hasAttribute('fill') &&
2226
2309
  el.getAttribute('fill') !== 'none' &&
2227
2310
  el.getAttribute('fill') !== 'transparent') {
@@ -2229,8 +2312,30 @@ class LibSvgViewerComponent {
2229
2312
  }
2230
2313
  });
2231
2314
  }
2315
+ updateSvgStyles() {
2316
+ const container = this.elementRef.nativeElement.querySelector('.svg-container');
2317
+ const svg = container?.querySelector('svg');
2318
+ if (svg) {
2319
+ this.applyStyling(svg);
2320
+ if (this.width) {
2321
+ svg.style.width = this.width;
2322
+ }
2323
+ if (this.height) {
2324
+ svg.style.height = this.height;
2325
+ }
2326
+ }
2327
+ }
2328
+ clearSvgContainer() {
2329
+ const container = this.elementRef.nativeElement.querySelector('.svg-container');
2330
+ if (container) {
2331
+ container.innerHTML = '';
2332
+ }
2333
+ }
2334
+ static clearCache() {
2335
+ LruSvgCache.getInstance().clear();
2336
+ }
2232
2337
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: LibSvgViewerComponent, deps: [{ token: i1$1.HttpClient }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
2233
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.2", type: LibSvgViewerComponent, isStandalone: true, selector: "dd-lib-svg-viewer", inputs: { path: "path", pack: "pack", icon: "icon", width: "width", height: "height", color: "color", containerClass: "containerClass", colorRules: "colorRules" }, usesOnChanges: true, ngImport: i0, template: `<div #svgContainer class="svg-container"></div>`, isInline: true, styles: [":host{display:block}svg{width:100%;height:100%;display:block}.svg-container{display:flex}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2338
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.2", type: LibSvgViewerComponent, isStandalone: true, selector: "dd-lib-svg-viewer", inputs: { path: "path", pack: "pack", icon: "icon", width: "width", height: "height", color: "color", containerClass: "containerClass", fullSize: "fullSize", colorRules: "colorRules" }, usesOnChanges: true, ngImport: i0, template: `<div #svgContainer class="svg-container"></div>`, isInline: true, styles: [":host{display:block}svg{width:100%;height:100%;display:block}.svg-container{display:flex}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2234
2339
  }
2235
2340
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: LibSvgViewerComponent, decorators: [{
2236
2341
  type: Component,
@@ -2249,6 +2354,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImpor
2249
2354
  type: Input
2250
2355
  }], containerClass: [{
2251
2356
  type: Input
2357
+ }], fullSize: [{
2358
+ type: Input
2252
2359
  }], colorRules: [{
2253
2360
  type: Input
2254
2361
  }] } });
@@ -2258,7 +2365,7 @@ class LibAccordionComponent {
2258
2365
  this.accordionPack = 'lib-svg';
2259
2366
  }
2260
2367
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: LibAccordionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2261
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.2", type: LibAccordionComponent, isStandalone: true, selector: "dd-lib-accordion", inputs: { accTitle: "accTitle", accordionPack: "accordionPack" }, ngImport: i0, template: "<div class=\"accordion\">\n <div (click)=\"showAccordionContent = !showAccordionContent\" class=\"accordion__header\">\n @if (accTitle) {\n <div [innerHTML]=\"accTitle\" class=\"accordion__title\"></div>\n }\n <div>\n <dd-lib-svg-viewer [pack]=\"accordionPack\" class=\"cup\" icon=\"{{ showAccordionContent ? 'minus' : 'plus' }}\"></dd-lib-svg-viewer>\n </div>\n </div>\n @if (showAccordionContent) {\n <div class=\"mt-8\">\n <ng-content></ng-content>\n </div>\n }\n</div>\n", styles: [":host{display:block;min-width:100%}.accordion__header{display:flex;align-items:center;justify-content:space-between;cursor:pointer}.accordion__title{font-weight:500;font-size:20px;line-height:28px;color:var(--light-black-color)}@media screen and (max-width: 480px){.accordion__title{font-size:16px;line-height:24px}}\n"], dependencies: [{ kind: "component", type: LibSvgViewerComponent, selector: "dd-lib-svg-viewer", inputs: ["path", "pack", "icon", "width", "height", "color", "containerClass", "colorRules"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2368
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.2", type: LibAccordionComponent, isStandalone: true, selector: "dd-lib-accordion", inputs: { accTitle: "accTitle", accordionPack: "accordionPack" }, ngImport: i0, template: "<div class=\"accordion\">\n <div (click)=\"showAccordionContent = !showAccordionContent\" class=\"accordion__header\">\n @if (accTitle) {\n <div [innerHTML]=\"accTitle\" class=\"accordion__title\"></div>\n }\n <div>\n <dd-lib-svg-viewer [pack]=\"accordionPack\" class=\"cup\" icon=\"{{ showAccordionContent ? 'minus' : 'plus' }}\"></dd-lib-svg-viewer>\n </div>\n </div>\n @if (showAccordionContent) {\n <div class=\"mt-8\">\n <ng-content></ng-content>\n </div>\n }\n</div>\n", styles: [":host{display:block;min-width:100%}.accordion__header{display:flex;align-items:center;justify-content:space-between;cursor:pointer}.accordion__title{font-weight:500;font-size:20px;line-height:28px;color:var(--light-black-color)}@media screen and (max-width: 480px){.accordion__title{font-size:16px;line-height:24px}}\n"], dependencies: [{ kind: "component", type: LibSvgViewerComponent, selector: "dd-lib-svg-viewer", inputs: ["path", "pack", "icon", "width", "height", "color", "containerClass", "fullSize", "colorRules"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2262
2369
  }
2263
2370
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: LibAccordionComponent, decorators: [{
2264
2371
  type: Component,
@@ -3046,7 +3153,7 @@ class LibInputComponent extends LibCommonInputTextComponent {
3046
3153
  useExisting: forwardRef(() => LibInputComponent),
3047
3154
  multi: true,
3048
3155
  },
3049
- ], viewQueries: [{ propertyName: "contentInput", first: true, predicate: ["input"], descendants: true, read: ElementRef, static: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"lib-input\">\n @if (label) {\n <label [for]=\"id\" class=\"lib-input__title g-text-sm\">\n {{ label }}\n @if (required) {\n <dd-lib-svg-icon icon=\"error_hint\"></dd-lib-svg-icon>\n }\n </label>\n }\n <div class=\"pos-relative\">\n <input\n #input\n (blur)=\"handleBlur()\"\n (change)=\"handleChange()\"\n (focus)=\"handleFocus()\"\n (input)=\"handleInput($event)\"\n (keyup.enter)=\"forceChange()\"\n [showMaskTyped]=\"showMaskTyped\"\n [dropSpecialCharacters]=\"dropSpecialCharacters\"\n [shownMaskExpression]=\"shownMaskExpression\"\n [mask]=\"mask\"\n [validation]=\"validation\"\n [prefix]=\"prefix\"\n [suffix]=\"suffix\"\n [(ngModel)]=\"value\"\n [attr.autofocus]=\"autofocus\"\n [attr.autocomplete]=\"autocomplete === undefined ? null : autocomplete\"\n [attr.id]=\"id ? id : null\"\n [attr.max]=\"max\"\n [attr.min]=\"min\"\n [attr.maxlength]=\"maxlength\"\n [attr.minlength]=\"minlength\"\n [attr.name]=\"name\"\n [attr.placeholder]=\"placeholder\"\n [attr.tabIndex]=\"tabIndex\"\n [attr.type]=\"showPass ? 'text' : (type || 'text')\"\n [class.focused]=\"focused\"\n [class.invalid]=\"showError\"\n [disabled]=\"disabled\"\n [readOnly]=\"readOnly\"\n class=\"text-input\" />\n @if (type === 'password') {\n <dd-lib-svg-viewer (click)=\"showPass = !showPass\" [pack]=\"'lib-svg'\" class=\"password-eye\" icon=\"{{ showPass ? 'eye' : 'eye-off' }}\"></dd-lib-svg-viewer>\n }\n </div>\n\n @if (errorTexts.length && showError) {\n @for (error of errorTexts; track error) {\n <div class=\"lib-input__error\">{{ error }}</div>\n }\n }\n @if (errorText && showSelfError && showError) {\n <div class=\"lib-input__error\">{{ errorText }}</div>\n }\n</div>\n", styles: [":host{display:block}.lib-input{position:relative}.lib-input input{width:100%;height:48px;padding:15px 16px;border-radius:8px;border:1px solid var(--input-border-color);background-color:transparent;position:relative;color:var(--light-black-color)}.lib-input input:hover{border-color:var(--input-active-border-colort)}.lib-input input:focus{border-color:var(--input-active-border-colort);box-shadow:var(--input-active-border-shadow)}.lib-input input:disabled{border:none;background-color:var(--input-disable-input);color:var(--input-disable-text);pointer-events:none}.lib-input input:disabled::placeholder{color:var(--input-placeholder)}.lib-input input.invalid,.lib-input input.invalid:hover{border-color:var(--input-error-border-color)}.lib-input input.invalid:focus{border-color:var(--input-error-border-color);box-shadow:var(--input-error-border-shadow)}.lib-input__title{margin-bottom:4px;font-size:14px;line-height:24px;display:flex;align-items:flex-start;color:var(--light-black-color)}.lib-input__error{color:var(--primary-red-color);font-size:12px;font-weight:400;line-height:10px;margin-top:2px;position:absolute}.lib-input .password-eye{position:absolute;right:16px;top:12px;cursor:pointer}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none}\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.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: NgxMaskDirective, selector: "input[mask], textarea[mask]", inputs: ["mask", "specialCharacters", "patterns", "prefix", "suffix", "thousandSeparator", "decimalMarker", "dropSpecialCharacters", "hiddenInput", "showMaskTyped", "placeHolderCharacter", "shownMaskExpression", "showTemplate", "clearIfNotMatch", "validation", "separatorLimit", "allowNegativeNumbers", "leadZeroDateTime", "leadZero", "triggerOnMaskChange", "apm", "inputTransformFn", "outputTransformFn", "keepCharacterPositions"], outputs: ["maskFilled"], exportAs: ["mask", "ngxMask"] }, { kind: "component", type: LibSvgIconComponent, selector: "dd-lib-svg-icon", inputs: ["width", "height", "color", "icon"] }, { kind: "component", type: LibSvgViewerComponent, selector: "dd-lib-svg-viewer", inputs: ["path", "pack", "icon", "width", "height", "color", "containerClass", "colorRules"] }] }); }
3156
+ ], viewQueries: [{ propertyName: "contentInput", first: true, predicate: ["input"], descendants: true, read: ElementRef, static: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"lib-input\">\n @if (label) {\n <label [for]=\"id\" class=\"lib-input__title g-text-sm\">\n {{ label }}\n @if (required) {\n <dd-lib-svg-icon icon=\"error_hint\"></dd-lib-svg-icon>\n }\n </label>\n }\n <div class=\"pos-relative\">\n <input\n #input\n (blur)=\"handleBlur()\"\n (change)=\"handleChange()\"\n (focus)=\"handleFocus()\"\n (input)=\"handleInput($event)\"\n (keyup.enter)=\"forceChange()\"\n [showMaskTyped]=\"showMaskTyped\"\n [dropSpecialCharacters]=\"dropSpecialCharacters\"\n [shownMaskExpression]=\"shownMaskExpression\"\n [mask]=\"mask\"\n [validation]=\"validation\"\n [prefix]=\"prefix\"\n [suffix]=\"suffix\"\n [(ngModel)]=\"value\"\n [attr.autofocus]=\"autofocus\"\n [attr.autocomplete]=\"autocomplete === undefined ? null : autocomplete\"\n [attr.id]=\"id ? id : null\"\n [attr.max]=\"max\"\n [attr.min]=\"min\"\n [attr.maxlength]=\"maxlength\"\n [attr.minlength]=\"minlength\"\n [attr.name]=\"name\"\n [attr.placeholder]=\"placeholder\"\n [attr.tabIndex]=\"tabIndex\"\n [attr.type]=\"showPass ? 'text' : (type || 'text')\"\n [class.focused]=\"focused\"\n [class.invalid]=\"showError\"\n [disabled]=\"disabled\"\n [readOnly]=\"readOnly\"\n class=\"text-input\" />\n @if (type === 'password') {\n <dd-lib-svg-viewer (click)=\"showPass = !showPass\" [pack]=\"'lib-svg'\" class=\"password-eye\" icon=\"{{ showPass ? 'eye' : 'eye-off' }}\"></dd-lib-svg-viewer>\n }\n </div>\n\n @if (errorTexts.length && showError) {\n @for (error of errorTexts; track error) {\n <div class=\"lib-input__error\">{{ error }}</div>\n }\n }\n @if (errorText && showSelfError && showError) {\n <div class=\"lib-input__error\">{{ errorText }}</div>\n }\n</div>\n", styles: [":host{display:block}.lib-input{position:relative}.lib-input input{width:100%;height:48px;padding:15px 16px;border-radius:8px;border:1px solid var(--input-border-color);background-color:transparent;position:relative;color:var(--light-black-color)}.lib-input input:hover{border-color:var(--input-active-border-colort)}.lib-input input:focus{border-color:var(--input-active-border-colort);box-shadow:var(--input-active-border-shadow)}.lib-input input:disabled{border:none;background-color:var(--input-disable-input);color:var(--input-disable-text);pointer-events:none}.lib-input input:disabled::placeholder{color:var(--input-placeholder)}.lib-input input.invalid,.lib-input input.invalid:hover{border-color:var(--input-error-border-color)}.lib-input input.invalid:focus{border-color:var(--input-error-border-color);box-shadow:var(--input-error-border-shadow)}.lib-input__title{margin-bottom:4px;font-size:14px;line-height:24px;display:flex;align-items:flex-start;color:var(--light-black-color)}.lib-input__error{color:var(--primary-red-color);font-size:12px;font-weight:400;line-height:10px;margin-top:2px;position:absolute}.lib-input .password-eye{position:absolute;right:16px;top:12px;cursor:pointer}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none}\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.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: NgxMaskDirective, selector: "input[mask], textarea[mask]", inputs: ["mask", "specialCharacters", "patterns", "prefix", "suffix", "thousandSeparator", "decimalMarker", "dropSpecialCharacters", "hiddenInput", "showMaskTyped", "placeHolderCharacter", "shownMaskExpression", "showTemplate", "clearIfNotMatch", "validation", "separatorLimit", "allowNegativeNumbers", "leadZeroDateTime", "leadZero", "triggerOnMaskChange", "apm", "inputTransformFn", "outputTransformFn", "keepCharacterPositions"], outputs: ["maskFilled"], exportAs: ["mask", "ngxMask"] }, { kind: "component", type: LibSvgIconComponent, selector: "dd-lib-svg-icon", inputs: ["width", "height", "color", "icon"] }, { kind: "component", type: LibSvgViewerComponent, selector: "dd-lib-svg-viewer", inputs: ["path", "pack", "icon", "width", "height", "color", "containerClass", "fullSize", "colorRules"] }] }); }
3050
3157
  }
3051
3158
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: LibInputComponent, decorators: [{
3052
3159
  type: Component,
@@ -3851,7 +3958,7 @@ class LibSelectComponent extends LibCommonInputTextComponent {
3851
3958
  useExisting: forwardRef(() => LibSelectComponent),
3852
3959
  multi: true,
3853
3960
  },
3854
- ], 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>\n @if (label) {\n <label [for]=\"id\" class=\"lib-select__title\">\n {{ label }}\n @if (required) {\n <dd-lib-svg-icon icon=\"error_hint\"></dd-lib-svg-icon>\n }\n </label>\n }\n\n <div class=\"pos-relative\" data-child=\"input\">\n <input\n #select\n (change)=\"handleChange()\"\n (click)=\"notifyFocusEvent()\"\n (input)=\"handleInput($event)\"\n (blur)=\"handleBlur()\"\n (focus)=\"handleFocus()\"\n [attr.id]=\"selectId\"\n [attr.placeholder]=\"(multiCountValue || searchValue) ? '' : placeholder\"\n [attr.tabIndex]=\"tabIndex\"\n [attr.type]=\"'text'\"\n [class.focused]=\"focused\"\n [class.invalid]=\"showError\"\n [disabled]=\"disabled\"\n [readOnly]=\"true\"\n [(ngModel)]=\"inputValue\"\n [title]=\"inputValue || ''\"\n class=\"text-select select-block\" />\n\n @if (multiCountValue) {\n <div class=\"selected-items-container\" id=\"selected-{{selectId}}\">\n <dd-lib-horizontal-scroll>\n @for (item of checkedItems(); track item) {\n <div class=\"selected-items__item\" >\n @if (stringArray()) {\n <div [title]=\"item\" [innerHTML]=\"item | highlight: (highlight ? searchValue : '') | safe: 'html'\"\n class=\"selected-items__item-title\"></div>\n }\n @if (keyTitle && !stringArray()) {\n <div [title]=\"item[keyTitle!]\"\n [innerHTML]=\"item[keyTitle!] | highlight: (highlight ? searchValue : '') | safe: 'html'\"\n class=\"selected-items__item-title\"></div>\n }\n @if (keyDesc && !stringArray()) {\n <div\n [innerHTML]=\"item[keyDesc!] | highlight: (highlight ? searchValue : '') | safe: 'html'\"\n [title]=\"item[keyDesc]\"\n class=\"selected-items__item-desc\"></div>\n }\n <dd-lib-svg-icon id=\"selected-clear-{{selectId}}\" icon=\"clear\" class=\"cup\"\n (click)=\"selectItem(item);deleteMultiItem.emit(item)\"></dd-lib-svg-icon>\n </div>\n }\n </dd-lib-horizontal-scroll>\n </div>\n }\n\n @if (!checkedItem) {\n <dd-lib-svg-icon\n (click)=\"notifyFocusEvent()\"\n [class.black-svg]=\"isShownList\"\n [class.disabled]=\"disabled\"\n [class.gray-svg]=\"!isShownList\"\n [class.up]=\"isShownList\"\n id=\"chevron-{{ selectId }}\" class=\"chevron\" icon=\"down_chevron\"></dd-lib-svg-icon>\n } @else if (clearable && !searchValue) {\n <dd-lib-svg-icon\n (click)=\"onClear(checkedItem)\"\n class=\"clear\"\n id=\"chevron-{{ selectId }}\" icon=\"clear\"></dd-lib-svg-icon>\n }\n </div>\n\n @if (errorTexts.length && showError) {\n @for (error of errorTexts; track error) {\n <div class=\"lib-select__error\">{{ error }}</div>\n }\n }\n @if (errorText && showSelfError && showError) {\n <div class=\"lib-select__error\">{{ errorText }}</div>\n }\n\n @if (isShownList) {\n <div\n id=\"dropdown\"\n [style.max-height]=\"searchOn ? '342px' : '300px'\"\n data-child=\"list\"\n (ddClickOutside)=\"notifyFocusEvent();fullBlur.emit($event)\"\n [elements]=\"['lib-select-' + selectId, 'chevron-' + selectId, 'selected-' + selectId, 'selected-clear-' + selectId]\"\n ddListKeyboardNavigation\n class=\"select-list-wrapper\">\n @if (initialized) {\n @if (!_data()?.length && noDataError) {\n <div class=\"info-container\">\n <div class=\"b2-title no-wrap-text\">\n {{ noDataError }}\n </div>\n </div>\n }\n\n <div class=\"d-flex full-width align-center justify-between head-wrapper\">\n @if (_data()?.length && _data()!.length > 5 && searchOn) {\n <div class=\"search-block\">\n <dd-lib-svg-icon class=\"search-icon\" id=\"chevron-{{ selectId }}\" icon=\"search\"></dd-lib-svg-icon>\n <input class=\"search-block__input\" #searchInputEl [attr.name]=\"name\"\n [readOnly]=\"readOnly\"\n (input)=\"searchInput()\"\n [placeholder]=\"searchPlaceholder\"\n (blur)=\"handleBlur()\"\n (focus)=\"handleFocus()\"\n [(ngModel)]=\"searchValue\" type=\"text\">\n <dd-lib-svg-icon\n [style.display]=\"searchValue ? 'block' : 'none'\"\n class=\"cup\"\n (click)=\"searchValue=''\"\n id=\"chevron-{{ selectId }}\" icon=\"clear\"></dd-lib-svg-icon>\n </div>\n }\n @if (multi) {\n <div class=\"mr-16\">\n <dd-lib-svg-viewer\n (click)=\"selectAll()\"\n class=\"checked cup\"\n pack=\"lib-svg\"\n id=\"chevron-{{ selectId }}\" [color]=\"!allSelected ? 'gray': ''\" icon=\"check-green\"></dd-lib-svg-viewer>\n </div>\n }\n\n </div>\n\n\n @if (_data()?.length && (_data() | filterByKey: filterList.bind(this))?.length === 0) {\n <div class=\"info-container\">\n <div class=\"b2-title no-wrap-text\">\n \u0420\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u043E\u0432 \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u043E\n </div>\n </div>\n }\n\n @if (virtualScroll) {\n <cdk-virtual-scroll-viewport [itemSize]=\"itemSize\" [style.height]=\"(_data()?.length || 0) * itemSize + 'px'\">\n <div *cdkVirtualFor=\"let item of _data() | filterByKey: filterList.bind(this)\">\n <ng-container [ngTemplateOutlet]=\"itemsList\" [ngTemplateOutletContext]=\"{items: [item]}\"></ng-container>\n </div>\n </cdk-virtual-scroll-viewport>\n } @else {\n <ng-container [ngTemplateOutlet]=\"itemsList\" [ngTemplateOutletContext]=\"{items: _data() | filterByKey: filterList.bind(this)}\"></ng-container>\n }\n } @else {\n <div class=\"info-container\">\n <div class=\"d-flex gap-12 align-center\">\n <div class=\"b2-title no-wrap-text\">\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430 \u0434\u0430\u043D\u043D\u044B\u0445</div>\n <dd-lib-loader></dd-lib-loader>\n </div>\n </div>\n }\n </div>\n }\n</div>\n\n<ng-template #rowItem let-item=\"item\" let-drag=\"drag\">\n <div ddSelectableItem [dragItem]=\"drag\" [ddTooltip]=\"item.tooltip ? item.tooltip : ''\" [position]=\"tooltipPosition\"\n (click)=\"selectItem(item)\"\n (itemSelected)=\"selectItem(item)\"\n [class.s-item-active]=\"checkSelected(item) && !item.disabled\"\n [class.s-item-disabled]=\"item.disabled\"\n class=\"select-data\">\n @if (stringArray()) {\n <div [innerHTML]=\"item | highlight: (highlight ? searchValue : '') | safe: 'html'\"\n class=\"select-data__title\"></div>\n }\n @if (keyTitle && !stringArray()) {\n <div\n [innerHTML]=\"item[keyTitle!] | highlight: (highlight ? searchValue : '') | safe: 'html'\"\n class=\"select-data__title\"></div>\n }\n @if (keyDesc && !stringArray()) {\n <div\n [innerHTML]=\"item[keyDesc!] | highlight: (highlight ? searchValue : '') | safe: 'html'\"\n [title]=\"item[keyDesc]\"\n class=\"select-data__desc\"></div>\n }\n @if (checkSelected(item)) {\n <dd-lib-svg-icon\n class=\"checked\"\n id=\"chevron-{{ selectId }}\" icon=\"check_green\"></dd-lib-svg-icon>\n }\n </div>\n</ng-template>\n\n<ng-template #itemsList let-items=\"items\">\n @for (item of items | filterByKey: filterList.bind(this); track item) {\n @if (isGroup(item)) {\n <div class=\"group-header\" [class.select-all-enabled]=\"selectAllInGroup\"\n (click)=\"selectAllInGroup ? handleGroupClick(item) : null\">\n <div class=\"group-title\">{{ getGroupTitle(item) }}</div>\n @if (isGroupSelected(item)) {\n <dd-lib-svg-icon\n [class.checked]=\"isGroupSelected(item)\"\n icon=\"check_green\"></dd-lib-svg-icon>\n }\n </div>\n <div class=\"group-items\">\n @for (child of item[keyGroupChildren] | filterByKey: filterList.bind(this); track child) {\n <ng-container [ngTemplateOutlet]=\"rowItem\"\n [ngTemplateOutletContext]=\"{item: child, drag: false}\"></ng-container>\n }\n </div>\n } @else {\n <ng-container [ngTemplateOutlet]=\"rowItem\" [ngTemplateOutletContext]=\"{item, drag: true}\"></ng-container>\n }\n }\n</ng-template>\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 .group-items{padding-left:16px}.lib-select .select-list-wrapper .group-items .select-data{margin-left:-16px;padding-left:32px}.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}.head-wrapper{display:flex;width:100%;align-items:center;justify-content:space-between;border-bottom:1px solid var(--gray-bgc)}.search-block{position:relative;padding:12px;z-index:1;display:flex;gap:4px;flex:1;align-items:center}.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;max-width:170px;overflow:hidden}.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{overflow:hidden;white-space:nowrap;max-width:150px;text-overflow:ellipsis}.group-header{height:48px;padding:8px 16px;font-weight:600;color:var(--font-light-black-color);border-bottom:1px solid var(--gray-bgc);display:flex;justify-content:space-between;align-items:center}.group-header.select-all-enabled{cursor:pointer}.group-header.select-all-enabled:hover{background-color:var(--gray-color-300)}.group-title{flex-grow:1}\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", "ignoreOnDrag"], 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]", inputs: ["dragItem"], outputs: ["itemSelected"] }, { kind: "directive", type: FixedPositionDirective, selector: "[ddFixedPosition]", inputs: ["childName1", "childName2", "destroyedItem"] }, { kind: "component", type: LibHorizontalScrollComponent, selector: "dd-lib-horizontal-scroll" }, { kind: "component", type: LibSvgViewerComponent, selector: "dd-lib-svg-viewer", inputs: ["path", "pack", "icon", "width", "height", "color", "containerClass", "colorRules"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3961
+ ], 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>\n @if (label) {\n <label [for]=\"id\" class=\"lib-select__title\">\n {{ label }}\n @if (required) {\n <dd-lib-svg-icon icon=\"error_hint\"></dd-lib-svg-icon>\n }\n </label>\n }\n\n <div class=\"pos-relative\" data-child=\"input\">\n <input\n #select\n (change)=\"handleChange()\"\n (click)=\"notifyFocusEvent()\"\n (input)=\"handleInput($event)\"\n (blur)=\"handleBlur()\"\n (focus)=\"handleFocus()\"\n [attr.id]=\"selectId\"\n [attr.placeholder]=\"(multiCountValue || searchValue) ? '' : placeholder\"\n [attr.tabIndex]=\"tabIndex\"\n [attr.type]=\"'text'\"\n [class.focused]=\"focused\"\n [class.invalid]=\"showError\"\n [disabled]=\"disabled\"\n [readOnly]=\"true\"\n [(ngModel)]=\"inputValue\"\n [title]=\"inputValue || ''\"\n class=\"text-select select-block\" />\n\n @if (multiCountValue) {\n <div class=\"selected-items-container\" id=\"selected-{{selectId}}\">\n <dd-lib-horizontal-scroll>\n @for (item of checkedItems(); track item) {\n <div class=\"selected-items__item\" >\n @if (stringArray()) {\n <div [title]=\"item\" [innerHTML]=\"item | highlight: (highlight ? searchValue : '') | safe: 'html'\"\n class=\"selected-items__item-title\"></div>\n }\n @if (keyTitle && !stringArray()) {\n <div [title]=\"item[keyTitle!]\"\n [innerHTML]=\"item[keyTitle!] | highlight: (highlight ? searchValue : '') | safe: 'html'\"\n class=\"selected-items__item-title\"></div>\n }\n @if (keyDesc && !stringArray()) {\n <div\n [innerHTML]=\"item[keyDesc!] | highlight: (highlight ? searchValue : '') | safe: 'html'\"\n [title]=\"item[keyDesc]\"\n class=\"selected-items__item-desc\"></div>\n }\n <dd-lib-svg-icon id=\"selected-clear-{{selectId}}\" icon=\"clear\" class=\"cup\"\n (click)=\"selectItem(item);deleteMultiItem.emit(item)\"></dd-lib-svg-icon>\n </div>\n }\n </dd-lib-horizontal-scroll>\n </div>\n }\n\n @if (!checkedItem) {\n <dd-lib-svg-icon\n (click)=\"notifyFocusEvent()\"\n [class.black-svg]=\"isShownList\"\n [class.disabled]=\"disabled\"\n [class.gray-svg]=\"!isShownList\"\n [class.up]=\"isShownList\"\n id=\"chevron-{{ selectId }}\" class=\"chevron\" icon=\"down_chevron\"></dd-lib-svg-icon>\n } @else if (clearable && !searchValue) {\n <dd-lib-svg-icon\n (click)=\"onClear(checkedItem)\"\n class=\"clear\"\n id=\"chevron-{{ selectId }}\" icon=\"clear\"></dd-lib-svg-icon>\n }\n </div>\n\n @if (errorTexts.length && showError) {\n @for (error of errorTexts; track error) {\n <div class=\"lib-select__error\">{{ error }}</div>\n }\n }\n @if (errorText && showSelfError && showError) {\n <div class=\"lib-select__error\">{{ errorText }}</div>\n }\n\n @if (isShownList) {\n <div\n id=\"dropdown\"\n [style.max-height]=\"searchOn ? '342px' : '300px'\"\n data-child=\"list\"\n (ddClickOutside)=\"notifyFocusEvent();fullBlur.emit($event)\"\n [elements]=\"['lib-select-' + selectId, 'chevron-' + selectId, 'selected-' + selectId, 'selected-clear-' + selectId]\"\n ddListKeyboardNavigation\n class=\"select-list-wrapper\">\n @if (initialized) {\n @if (!_data()?.length && noDataError) {\n <div class=\"info-container\">\n <div class=\"b2-title no-wrap-text\">\n {{ noDataError }}\n </div>\n </div>\n }\n\n <div class=\"d-flex full-width align-center justify-between head-wrapper\">\n @if (_data()?.length && _data()!.length > 5 && searchOn) {\n <div class=\"search-block\">\n <dd-lib-svg-icon class=\"search-icon\" id=\"chevron-{{ selectId }}\" icon=\"search\"></dd-lib-svg-icon>\n <input class=\"search-block__input\" #searchInputEl [attr.name]=\"name\"\n [readOnly]=\"readOnly\"\n (input)=\"searchInput()\"\n [placeholder]=\"searchPlaceholder\"\n (blur)=\"handleBlur()\"\n (focus)=\"handleFocus()\"\n [(ngModel)]=\"searchValue\" type=\"text\">\n <dd-lib-svg-icon\n [style.display]=\"searchValue ? 'block' : 'none'\"\n class=\"cup\"\n (click)=\"searchValue=''\"\n id=\"chevron-{{ selectId }}\" icon=\"clear\"></dd-lib-svg-icon>\n </div>\n }\n @if (multi) {\n <div class=\"mr-16\">\n <dd-lib-svg-viewer\n (click)=\"selectAll()\"\n class=\"checked cup\"\n pack=\"lib-svg\"\n id=\"chevron-{{ selectId }}\" [color]=\"!allSelected ? 'gray': ''\" icon=\"check-green\"></dd-lib-svg-viewer>\n </div>\n }\n\n </div>\n\n\n @if (_data()?.length && (_data() | filterByKey: filterList.bind(this))?.length === 0) {\n <div class=\"info-container\">\n <div class=\"b2-title no-wrap-text\">\n \u0420\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u043E\u0432 \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u043E\n </div>\n </div>\n }\n\n @if (virtualScroll) {\n <cdk-virtual-scroll-viewport [itemSize]=\"itemSize\" [style.height]=\"(_data()?.length || 0) * itemSize + 'px'\">\n <div *cdkVirtualFor=\"let item of _data() | filterByKey: filterList.bind(this)\">\n <ng-container [ngTemplateOutlet]=\"itemsList\" [ngTemplateOutletContext]=\"{items: [item]}\"></ng-container>\n </div>\n </cdk-virtual-scroll-viewport>\n } @else {\n <ng-container [ngTemplateOutlet]=\"itemsList\" [ngTemplateOutletContext]=\"{items: _data() | filterByKey: filterList.bind(this)}\"></ng-container>\n }\n } @else {\n <div class=\"info-container\">\n <div class=\"d-flex gap-12 align-center\">\n <div class=\"b2-title no-wrap-text\">\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430 \u0434\u0430\u043D\u043D\u044B\u0445</div>\n <dd-lib-loader></dd-lib-loader>\n </div>\n </div>\n }\n </div>\n }\n</div>\n\n<ng-template #rowItem let-item=\"item\" let-drag=\"drag\">\n <div ddSelectableItem [dragItem]=\"drag\" [ddTooltip]=\"item.tooltip ? item.tooltip : ''\" [position]=\"tooltipPosition\"\n (click)=\"selectItem(item)\"\n (itemSelected)=\"selectItem(item)\"\n [class.s-item-active]=\"checkSelected(item) && !item.disabled\"\n [class.s-item-disabled]=\"item.disabled\"\n class=\"select-data\">\n @if (stringArray()) {\n <div [innerHTML]=\"item | highlight: (highlight ? searchValue : '') | safe: 'html'\"\n class=\"select-data__title\"></div>\n }\n @if (keyTitle && !stringArray()) {\n <div\n [innerHTML]=\"item[keyTitle!] | highlight: (highlight ? searchValue : '') | safe: 'html'\"\n class=\"select-data__title\"></div>\n }\n @if (keyDesc && !stringArray()) {\n <div\n [innerHTML]=\"item[keyDesc!] | highlight: (highlight ? searchValue : '') | safe: 'html'\"\n [title]=\"item[keyDesc]\"\n class=\"select-data__desc\"></div>\n }\n @if (checkSelected(item)) {\n <dd-lib-svg-icon\n class=\"checked\"\n id=\"chevron-{{ selectId }}\" icon=\"check_green\"></dd-lib-svg-icon>\n }\n </div>\n</ng-template>\n\n<ng-template #itemsList let-items=\"items\">\n @for (item of items | filterByKey: filterList.bind(this); track item) {\n @if (isGroup(item)) {\n <div class=\"group-header\" [class.select-all-enabled]=\"selectAllInGroup\"\n (click)=\"selectAllInGroup ? handleGroupClick(item) : null\">\n <div class=\"group-title\">{{ getGroupTitle(item) }}</div>\n @if (isGroupSelected(item)) {\n <dd-lib-svg-icon\n [class.checked]=\"isGroupSelected(item)\"\n icon=\"check_green\"></dd-lib-svg-icon>\n }\n </div>\n <div class=\"group-items\">\n @for (child of item[keyGroupChildren] | filterByKey: filterList.bind(this); track child) {\n <ng-container [ngTemplateOutlet]=\"rowItem\"\n [ngTemplateOutletContext]=\"{item: child, drag: false}\"></ng-container>\n }\n </div>\n } @else {\n <ng-container [ngTemplateOutlet]=\"rowItem\" [ngTemplateOutletContext]=\"{item, drag: true}\"></ng-container>\n }\n }\n</ng-template>\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 .group-items{padding-left:16px}.lib-select .select-list-wrapper .group-items .select-data{margin-left:-16px;padding-left:32px}.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}.head-wrapper{display:flex;width:100%;align-items:center;justify-content:space-between;border-bottom:1px solid var(--gray-bgc)}.search-block{position:relative;padding:12px;z-index:1;display:flex;gap:4px;flex:1;align-items:center}.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;max-width:170px;overflow:hidden}.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{overflow:hidden;white-space:nowrap;max-width:150px;text-overflow:ellipsis}.group-header{height:48px;padding:8px 16px;font-weight:600;color:var(--font-light-black-color);border-bottom:1px solid var(--gray-bgc);display:flex;justify-content:space-between;align-items:center}.group-header.select-all-enabled{cursor:pointer}.group-header.select-all-enabled:hover{background-color:var(--gray-color-300)}.group-title{flex-grow:1}\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", "ignoreOnDrag"], 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]", inputs: ["dragItem"], outputs: ["itemSelected"] }, { kind: "directive", type: FixedPositionDirective, selector: "[ddFixedPosition]", inputs: ["childName1", "childName2", "destroyedItem"] }, { kind: "component", type: LibHorizontalScrollComponent, selector: "dd-lib-horizontal-scroll" }, { kind: "component", type: LibSvgViewerComponent, selector: "dd-lib-svg-viewer", inputs: ["path", "pack", "icon", "width", "height", "color", "containerClass", "fullSize", "colorRules"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3855
3962
  }
3856
3963
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: LibSelectComponent, decorators: [{
3857
3964
  type: Component,
@@ -4123,7 +4230,7 @@ class LibTabsFragmentComponent {
4123
4230
  this.cdr.detectChanges();
4124
4231
  }
4125
4232
  handleTabSelection(tab, callEvent = true) {
4126
- if (!tab) {
4233
+ if (tab === undefined || tab === null) {
4127
4234
  if (this.route.snapshot.fragment) {
4128
4235
  const tab = this.tabs?.find(f => f.fragment &&
4129
4236
  this.route.snapshot.fragment &&