@morozeckiy/dd-lib 0.7.79 → 0.7.81

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { EventEmitter, Output, ViewChild, Input, Component, Injectable, InjectionToken, Inject, Pipe, Directive, HostListener, numberAttribute, TemplateRef, ChangeDetectionStrategy, Injector, forwardRef, CUSTOM_ELEMENTS_SCHEMA, NO_ERRORS_SCHEMA, Optional, ElementRef, Host, SkipSelf, signal, input } from '@angular/core';
2
+ import { EventEmitter, Output, ViewChild, Input, Component, Injectable, InjectionToken, Inject, Pipe, Directive, HostListener, numberAttribute, TemplateRef, ChangeDetectionStrategy, Injector, forwardRef, CUSTOM_ELEMENTS_SCHEMA, NO_ERRORS_SCHEMA, Optional, ElementRef, Host, SkipSelf, signal, effect, input } from '@angular/core';
3
3
  import * as i1$4 from '@angular/forms';
4
4
  import { Validators, NG_VALUE_ACCESSOR, FormsModule, ReactiveFormsModule } from '@angular/forms';
5
5
  import { BehaviorSubject, Subject, throwError, of, fromEvent, combineLatest } from 'rxjs';
@@ -11,7 +11,7 @@ import * as i2 from '@angular/router';
11
11
  import { RouterLink } from '@angular/router';
12
12
  import * as i1$1 from '@angular/platform-browser';
13
13
  import * as i1$2 from '@angular/common';
14
- import { DecimalPipe, CommonModule, AsyncPipe, DOCUMENT, NgTemplateOutlet, NgComponentOutlet, NgStyle, NgClass } from '@angular/common';
14
+ import { DecimalPipe, CommonModule, AsyncPipe, DOCUMENT, NgTemplateOutlet, NgComponentOutlet, NgStyle, JsonPipe, NgClass } from '@angular/common';
15
15
  import { ComponentPortal, PortalInjector, CdkPortalOutlet, TemplatePortal } from '@angular/cdk/portal';
16
16
  import * as i1$3 from '@angular/cdk/overlay';
17
17
  import { OverlayModule, GlobalPositionStrategy } from '@angular/cdk/overlay';
@@ -612,6 +612,52 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImpor
612
612
  }]
613
613
  }] });
614
614
 
615
+ class SortByValPipe {
616
+ transform(arr, key, direction = 'ASC') {
617
+ if (!arr?.length || !key)
618
+ return arr || [];
619
+ // Создаем копию массива, чтобы не мутировать исходный
620
+ const arrayCopy = [...arr];
621
+ return arrayCopy.sort((a, b) => {
622
+ let aValue;
623
+ let bValue;
624
+ // Если ключ - это функция, вызываем ее для получения значения
625
+ if (typeof key === 'function') {
626
+ aValue = key(a);
627
+ bValue = key(b);
628
+ }
629
+ else {
630
+ // Иначе получаем значение по ключу
631
+ aValue = a[key];
632
+ bValue = b[key];
633
+ }
634
+ // Приводим значения к строке для сравнения, если они разных типов
635
+ if (typeof aValue !== typeof bValue) {
636
+ aValue = String(aValue);
637
+ bValue = String(bValue);
638
+ }
639
+ let comparison = 0;
640
+ if (aValue > bValue) {
641
+ comparison = 1;
642
+ }
643
+ else if (aValue < bValue) {
644
+ comparison = -1;
645
+ }
646
+ // Инвертируем результат если направление DESC
647
+ return direction === 'DESC' ? -comparison : comparison;
648
+ });
649
+ }
650
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: SortByValPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
651
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.2", ngImport: i0, type: SortByValPipe, isStandalone: true, name: "sortByVal" }); }
652
+ }
653
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: SortByValPipe, decorators: [{
654
+ type: Pipe,
655
+ args: [{
656
+ name: 'sortByVal',
657
+ standalone: true
658
+ }]
659
+ }] });
660
+
615
661
  class AutoHeightDirective {
616
662
  constructor(el, rdr) {
617
663
  this.el = el;
@@ -1249,9 +1295,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImpor
1249
1295
  }] } });
1250
1296
 
1251
1297
  class SelectableItemDirective {
1252
- constructor(el) {
1298
+ constructor(el, renderer) {
1253
1299
  this.el = el;
1300
+ this.renderer = renderer;
1254
1301
  this.itemSelected = new EventEmitter();
1302
+ this.dragItem = true;
1303
+ this.isMouseDown = false;
1304
+ this.lastSelectedItem = null;
1305
+ this.firstSelection = true;
1255
1306
  }
1256
1307
  onEnter(event) {
1257
1308
  if (this.el.nativeElement.classList.contains('key-down-active')) {
@@ -1259,8 +1310,33 @@ class SelectableItemDirective {
1259
1310
  this.itemSelected.emit();
1260
1311
  }
1261
1312
  }
1262
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: SelectableItemDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
1263
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.2", type: SelectableItemDirective, isStandalone: true, selector: "[ddSelectableItem]", outputs: { itemSelected: "itemSelected" }, host: { listeners: { "document:keyup.enter": "onEnter($event)" } }, ngImport: i0 }); }
1313
+ onMouseDown(event) {
1314
+ this.isMouseDown = true;
1315
+ this.lastSelectedItem = this.el.nativeElement;
1316
+ event.preventDefault();
1317
+ }
1318
+ onMouseMove(event) {
1319
+ if (!this.isMouseDown || !this.dragItem)
1320
+ return;
1321
+ const elementUnderMouse = document.elementFromPoint(event.clientX, event.clientY);
1322
+ if (elementUnderMouse && elementUnderMouse.classList.contains('select-data')) {
1323
+ if (elementUnderMouse === this.lastSelectedItem && this.firstSelection) {
1324
+ this.lastSelectedItem = elementUnderMouse;
1325
+ elementUnderMouse.dispatchEvent(new MouseEvent('click'));
1326
+ this.firstSelection = false;
1327
+ }
1328
+ if (elementUnderMouse !== this.lastSelectedItem) {
1329
+ this.lastSelectedItem = elementUnderMouse;
1330
+ elementUnderMouse.dispatchEvent(new MouseEvent('click'));
1331
+ }
1332
+ }
1333
+ }
1334
+ onMouseUp() {
1335
+ this.isMouseDown = false;
1336
+ this.lastSelectedItem = null;
1337
+ }
1338
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: SelectableItemDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive }); }
1339
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.2", type: SelectableItemDirective, isStandalone: true, selector: "[ddSelectableItem]", inputs: { dragItem: "dragItem" }, outputs: { itemSelected: "itemSelected" }, host: { listeners: { "document:keyup.enter": "onEnter($event)", "mousedown": "onMouseDown($event)", "document:mousemove": "onMouseMove($event)", "document:mouseup": "onMouseUp()" } }, ngImport: i0 }); }
1264
1340
  }
1265
1341
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: SelectableItemDirective, decorators: [{
1266
1342
  type: Directive,
@@ -1268,11 +1344,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImpor
1268
1344
  selector: '[ddSelectableItem]',
1269
1345
  standalone: true
1270
1346
  }]
1271
- }], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { itemSelected: [{
1347
+ }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }], propDecorators: { itemSelected: [{
1272
1348
  type: Output
1349
+ }], dragItem: [{
1350
+ type: Input
1273
1351
  }], onEnter: [{
1274
1352
  type: HostListener,
1275
1353
  args: ['document:keyup.enter', ['$event']]
1354
+ }], onMouseDown: [{
1355
+ type: HostListener,
1356
+ args: ['mousedown', ['$event']]
1357
+ }], onMouseMove: [{
1358
+ type: HostListener,
1359
+ args: ['document:mousemove', ['$event']]
1360
+ }], onMouseUp: [{
1361
+ type: HostListener,
1362
+ args: ['document:mouseup']
1276
1363
  }] } });
1277
1364
 
1278
1365
  class FixedPositionDirective {
@@ -2420,6 +2507,8 @@ const Months = [
2420
2507
  'Ноябрь',
2421
2508
  'Декабрь',
2422
2509
  ];
2510
+ class IDatePeriod {
2511
+ }
2423
2512
  /**
2424
2513
  Этот компонент используется для отображения календаря с возможностью выбора даты.
2425
2514
  Ниже приведено описание свойств и методов данного компонента:
@@ -2488,11 +2577,13 @@ class LibCalendarComponent {
2488
2577
  this.type = 'string';
2489
2578
  this.formatDate = 'dd.MM.yyyy';
2490
2579
  this.rangeMode = false;
2580
+ this.rangeModeFullPeriod = true;
2491
2581
  this.maxHours = 23;
2492
2582
  this.maxMinutes = 59;
2493
2583
  this.needTime = false;
2494
2584
  this.mode = 'full';
2495
2585
  this.emitDate = new EventEmitter();
2586
+ this.immediatelyEmitDate = new EventEmitter();
2496
2587
  this.emitPeriod = new EventEmitter();
2497
2588
  this.months = Months;
2498
2589
  this.week = ['ПН', 'ВТ', 'СР', 'ЧТ', 'ПТ', 'СБ', 'ВС'];
@@ -2555,25 +2646,23 @@ class LibCalendarComponent {
2555
2646
  }
2556
2647
  selectDay(day) {
2557
2648
  if (!this.checkHideDay(day)) {
2558
- if (this.rangeMode) {
2559
- if (!this.dateStart) {
2560
- this.dateStart = new Date(this.year, this.month, day);
2561
- }
2562
- else {
2563
- const eDate = new Date(this.year, this.month, day);
2564
- if (this.dateStart > eDate) {
2565
- this.dateEnd = undefined;
2566
- this.dateStart = eDate;
2567
- }
2568
- else {
2569
- this.dateEnd = eDate;
2570
- }
2571
- }
2572
- }
2573
- else {
2649
+ if (!this.rangeMode) {
2650
+ // if (!this.dateStart) {
2651
+ // this.dateStart = new Date(this.year, this.month, day);
2652
+ // } else {
2653
+ // const eDate = new Date(this.year, this.month, day);
2654
+ // if (this.dateStart > eDate) {
2655
+ // this.dateEnd = undefined;
2656
+ // this.dateStart = eDate;
2657
+ // } else {
2658
+ // this.dateEnd = eDate;
2659
+ // }
2660
+ // }
2661
+ // } else {
2574
2662
  this.dateValue = new Date(this.year, this.month, day);
2575
2663
  }
2576
2664
  }
2665
+ this.immediatelyEmitDate.emit(new Date(this.year, this.month, day));
2577
2666
  }
2578
2667
  selectDate() {
2579
2668
  if (this.rangeMode) {
@@ -2653,13 +2742,13 @@ class LibCalendarComponent {
2653
2742
  }
2654
2743
  }
2655
2744
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: LibCalendarComponent, deps: [{ token: DateService }], target: i0.ɵɵFactoryTarget.Component }); }
2656
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.2", type: LibCalendarComponent, isStandalone: true, selector: "dd-lib-calendar", inputs: { type: "type", formatDate: "formatDate", formatTime: "formatTime", rangeMode: "rangeMode", maxHours: "maxHours", maxMinutes: "maxMinutes", needTime: "needTime", mode: "mode", maxDate: "maxDate", minDate: "minDate" }, outputs: { emitDate: "emitDate", emitPeriod: "emitPeriod" }, providers: [
2745
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.2", type: LibCalendarComponent, isStandalone: true, selector: "dd-lib-calendar", inputs: { type: "type", formatDate: "formatDate", formatTime: "formatTime", rangeMode: "rangeMode", rangeModeFullPeriod: "rangeModeFullPeriod", maxHours: "maxHours", maxMinutes: "maxMinutes", needTime: "needTime", mode: "mode", dateStart: "dateStart", dateEnd: "dateEnd", maxDate: "maxDate", minDate: "minDate" }, outputs: { emitDate: "emitDate", immediatelyEmitDate: "immediatelyEmitDate", emitPeriod: "emitPeriod" }, providers: [
2657
2746
  {
2658
2747
  provide: NG_VALUE_ACCESSOR,
2659
2748
  useExisting: forwardRef(() => LibCalendarComponent),
2660
2749
  multi: true,
2661
2750
  },
2662
- ], ngImport: i0, template: "@if (mode === 'icon') {\r\n<div class=\"pos-relative d-flex align-center\">\r\n @if (dateValue) {\r\n <span class=\"mr-12 green\">{{ dateValue | date: 'dd.MM.yyyy' }}</span>\r\n }\r\n <dd-lib-svg-icon class=\"cup\" (click)=\"showCalendar = !showCalendar\" icon=\"calendar\"></dd-lib-svg-icon>\r\n @if (dateValue) {\r\n <dd-lib-svg-icon class=\"cup\" (click)=\"canselDate()\" icon=\"clear\"></dd-lib-svg-icon>\r\n } @if (showCalendar) {\r\n <div class=\"calendar-abs-wrapper\">\r\n <ng-template [ngTemplateOutlet]=\"calendar\"></ng-template>\r\n </div>\r\n }\r\n</div>\r\n} @if (mode === 'full') {\r\n<ng-template [ngTemplateOutlet]=\"calendar\"></ng-template>\r\n}\r\n\r\n<ng-template #calendar>\r\n <dd-lib-card class=\"calendar-block\" type=\"small\">\r\n <div class=\"full-width\">\r\n <div class=\"calendar-block__header\">\r\n <div class=\"calendar-block__header_arrow\">\r\n <dd-lib-svg-icon (click)=\"changeMonth(-1)\" icon=\"left_chevron\"></dd-lib-svg-icon>\r\n </div>\r\n <div class=\"calendar-block__header_year\">{{ getMonth() + ' ' + year }}</div>\r\n <div class=\"calendar-block__header_arrow\">\r\n <dd-lib-svg-icon (click)=\"changeMonth(1)\" icon=\"right_chevron\"></dd-lib-svg-icon>\r\n </div>\r\n </div>\r\n <div class=\"calendar-block__week\">\r\n @for (day of week; track day) {\r\n <div class=\"calendar-block__week_day\">{{ day }}</div>\r\n }\r\n </div>\r\n <div class=\"calendar-block__days\">\r\n @for (day of daysInMonth?.prevDays; track day) {\r\n <div class=\"calendar-block__days_day hide\">{{ day }}</div>\r\n } @for (day of daysInMonth?.days; track day) {\r\n <div\r\n (click)=\"selectDay(day)\"\r\n [class.active]=\"checkActiveDay(day)\"\r\n\r\n [class.current]=\"\r\n dateNow.getDate() === day && dateNow.getMonth() === month && dateNow.getFullYear() === year\r\n \"\r\n [class.hide]=\"checkHideDay(day)\"\r\n class=\"calendar-block__days_day normal\">\r\n {{ day }}\r\n </div>\r\n } @for (day of daysInMonth?.lastDays; track day) {\r\n <div class=\"calendar-block__days_day hide\">{{ day }}</div>\r\n }\r\n </div>\r\n @if(needTime) {\r\n <div class=\"calendar-block__time\">\r\n <div class=\"d-flex justify-between\">\r\n <div class=\"text-plain\">\u0412\u0440\u0435\u043C\u044F</div>\r\n <div class=\"d-flex\">\r\n <input [(ngModel)]=\"hours\" class=\"calendar-block__time-input\"\r\n type=\"text\"\r\n [ddMaxNum]=\"maxHours\"\r\n [curVal]=\"hours\"\r\n [disabled]=\"!dateValue\"\r\n [regExp]=\"true\"\r\n ddBanSymbol=\"^\\d+$\"\r\n max=\"23\"\r\n maxlength=\"2\"\r\n pattern=\"^\\d+$\">\r\n <span class=\"second-dot\">:</span>\r\n <input [(ngModel)]=\"minutes\" class=\"calendar-block__time-input\"\r\n [ddMaxNum]=\"maxMinutes\"\r\n [curVal]=\"minutes\"\r\n [disabled]=\"!dateValue\"\r\n [regExp]=\"true\"\r\n ddBanSymbol=\"^\\d+$\"\r\n max=\"59\"\r\n maxlength=\"2\"\r\n pattern=\"^\\d+$\"\r\n type=\"text\">\r\n </div>\r\n </div>\r\n </div>\r\n }\r\n <div class=\"calendar-block__footer\">\r\n <dd-lib-button (click)=\"canselDate()\" [btnColor]=\"'transparent'\" class=\"calendar-block__footer_btn\"\r\n >\u041E\u0442\u043C\u0435\u043D\u0438\u0442\u044C\r\n </dd-lib-button>\r\n <dd-lib-button (click)=\"selectDate()\"\r\n [disabled]=\"(!dateValue && !rangeMode) || (rangeMode && (!dateStart || !dateEnd))\"\r\n class=\"calendar-block__footer_btn\"\r\n >\u0412\u044B\u0431\u0440\u0430\u0442\u044C\r\n </dd-lib-button>\r\n </div>\r\n </div>\r\n </dd-lib-card>\r\n</ng-template>\r\n", styles: [":host{display:block;-webkit-user-select:none;user-select:none}.calendar-block{z-index:1100;display:block}@media screen and (max-width: 840px){.calendar-block{height:100%}}.calendar-block__time{padding:22px 0;margin:22px 0;border-top:1px solid var(--gray-color-200);border-bottom:1px solid var(--gray-color-200)}.calendar-block__time-input{width:56px;height:36px;border-radius:12px;border:1px solid var(--primary-gray-color);text-align:center}.calendar-block__time .second-dot{margin:auto 8px;animation:blink 1s step-end infinite}@keyframes blink{0%,to{opacity:1}50%{opacity:0}}.calendar-block__header{display:flex;align-items:center;justify-content:space-between;margin-bottom:22px;color:var(--calendar-gray-color);font-size:14px;font-weight:400;line-height:24px}.calendar-block__header_arrow{cursor:pointer}.calendar-block__week{display:grid;grid-template-columns:repeat(7,1fr);gap:14px;justify-items:center;color:var(--primary-green-color);font-size:10px;font-weight:400;line-height:12px;letter-spacing:1.5px;margin-bottom:22px}.calendar-block__week_day{display:flex;align-items:center;justify-content:space-around}.calendar-block__days{display:grid;grid-template-columns:repeat(7,1fr);gap:10px;justify-items:center;margin-bottom:22px}.calendar-block__days_day{cursor:pointer;width:30px;height:30px;display:flex;align-items:center;justify-content:center;border-radius:29px;color:var(--light-black-color)}.calendar-block__days_day.current{border:1px solid var(--primary-green-color)}.calendar-block__days_day.active,.calendar-block__days_day.normal:hover{background-color:var(--primary-green-color);color:var(--white-color)}.calendar-block__days_day.hide{pointer-events:none;cursor:default;color:var(--calendar-gray-hide-color)}.calendar-block__footer{display:flex;align-items:center;justify-content:space-between}.calendar-abs-wrapper{position:absolute;box-shadow:var(--main-card-shadow);top:0;right:0;z-index:1111}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}\n"], dependencies: [{ kind: "component", type: LibCardComponent, selector: "dd-lib-card", inputs: ["type", "footerBtn", "sHeight", "skeleton", "parentLvlForSkeleton", "plugs", "borderRadius"], outputs: ["cardBtnEvent"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: i1$2.DatePipe, name: "date" }, { kind: "component", type: LibButtonComponent, selector: "dd-lib-button", inputs: ["noPadding", "loaderColor"] }, { kind: "component", type: LibSvgIconComponent, selector: "dd-lib-svg-icon", inputs: ["width", "height", "color", "icon"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$4.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$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$4.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i1$4.PatternValidator, selector: "[pattern][formControlName],[pattern][formControl],[pattern][ngModel]", inputs: ["pattern"] }, { kind: "directive", type: i1$4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: BanSymbolDirective, selector: "[ddBanSymbol]", inputs: ["ddBanSymbol", "regExp"] }, { kind: "directive", type: MaxNumDirective, selector: "[ddMaxNum]", inputs: ["ddMaxNum", "curVal"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2751
+ ], ngImport: i0, template: "@if (mode === 'icon') {\n<div class=\"pos-relative d-flex align-center\">\n @if (dateValue) {\n <span class=\"mr-12 green\">{{ dateValue | date: 'dd.MM.yyyy' }}</span>\n }\n <dd-lib-svg-icon class=\"cup\" (click)=\"showCalendar = !showCalendar\" icon=\"calendar\"></dd-lib-svg-icon>\n @if (dateValue) {\n <dd-lib-svg-icon class=\"cup\" (click)=\"canselDate()\" icon=\"clear\"></dd-lib-svg-icon>\n } @if (showCalendar) {\n <div class=\"calendar-abs-wrapper\">\n <ng-template [ngTemplateOutlet]=\"calendar\"></ng-template>\n </div>\n }\n</div>\n} @if (mode === 'full') {\n<ng-template [ngTemplateOutlet]=\"calendar\"></ng-template>\n}\n\n<ng-template #calendar>\n <dd-lib-card class=\"calendar-block\" type=\"small\">\n <div class=\"full-width\">\n <div class=\"calendar-block__header\">\n <div class=\"calendar-block__header_arrow\">\n <dd-lib-svg-icon (click)=\"changeMonth(-1)\" icon=\"left_chevron\"></dd-lib-svg-icon>\n </div>\n <div class=\"calendar-block__header_year\">{{ getMonth() + ' ' + year }}</div>\n <div class=\"calendar-block__header_arrow\">\n <dd-lib-svg-icon (click)=\"changeMonth(1)\" icon=\"right_chevron\"></dd-lib-svg-icon>\n </div>\n </div>\n <div class=\"calendar-block__week\">\n @for (day of week; track day) {\n <div class=\"calendar-block__week_day\">{{ day }}</div>\n }\n </div>\n <div class=\"calendar-block__days\">\n @for (day of daysInMonth?.prevDays; track day) {\n <div class=\"calendar-block__days_day hide\">{{ day }}</div>\n } @for (day of daysInMonth?.days; track day) {\n <div\n (click)=\"selectDay(day)\"\n [class.active]=\"checkActiveDay(day)\"\n\n [class.current]=\"\n dateNow.getDate() === day && dateNow.getMonth() === month && dateNow.getFullYear() === year\n \"\n [class.hide]=\"checkHideDay(day)\"\n class=\"calendar-block__days_day normal\">\n {{ day }}\n </div>\n } @for (day of daysInMonth?.lastDays; track day) {\n <div class=\"calendar-block__days_day hide\">{{ day }}</div>\n }\n </div>\n @if(needTime) {\n <div class=\"calendar-block__time\">\n <div class=\"d-flex justify-between\">\n <div class=\"text-plain\">\u0412\u0440\u0435\u043C\u044F</div>\n <div class=\"d-flex\">\n <input [(ngModel)]=\"hours\" class=\"calendar-block__time-input\"\n type=\"text\"\n [ddMaxNum]=\"maxHours\"\n [curVal]=\"hours\"\n [disabled]=\"!dateValue\"\n [regExp]=\"true\"\n ddBanSymbol=\"^\\d+$\"\n max=\"23\"\n maxlength=\"2\"\n pattern=\"^\\d+$\">\n <span class=\"second-dot\">:</span>\n <input [(ngModel)]=\"minutes\" class=\"calendar-block__time-input\"\n [ddMaxNum]=\"maxMinutes\"\n [curVal]=\"minutes\"\n [disabled]=\"!dateValue\"\n [regExp]=\"true\"\n ddBanSymbol=\"^\\d+$\"\n max=\"59\"\n maxlength=\"2\"\n pattern=\"^\\d+$\"\n type=\"text\">\n </div>\n </div>\n </div>\n }\n <div class=\"calendar-block__footer\">\n <dd-lib-button (click)=\"canselDate()\" [btnColor]=\"'transparent'\" class=\"calendar-block__footer_btn\"\n >\u041E\u0442\u043C\u0435\u043D\u0438\u0442\u044C\n </dd-lib-button>\n <dd-lib-button (click)=\"selectDate()\"\n [disabled]=\"(!dateValue && !rangeMode)\n || (rangeMode && !dateStart && !dateEnd)\n || (rangeMode && rangeModeFullPeriod && (!dateStart || !dateEnd))\"\n class=\"calendar-block__footer_btn\"\n >\u0412\u044B\u0431\u0440\u0430\u0442\u044C\n </dd-lib-button>\n </div>\n </div>\n </dd-lib-card>\n</ng-template>\n", styles: [":host{display:block;-webkit-user-select:none;user-select:none}.calendar-block{z-index:1100;display:block}@media screen and (max-width: 840px){.calendar-block{height:100%}}.calendar-block__time{padding:22px 0;margin:22px 0;border-top:1px solid var(--gray-color-200);border-bottom:1px solid var(--gray-color-200)}.calendar-block__time-input{width:56px;height:36px;border-radius:12px;border:1px solid var(--primary-gray-color);text-align:center}.calendar-block__time .second-dot{margin:auto 8px;animation:blink 1s step-end infinite}@keyframes blink{0%,to{opacity:1}50%{opacity:0}}.calendar-block__header{display:flex;align-items:center;justify-content:space-between;margin-bottom:22px;color:var(--calendar-gray-color);font-size:14px;font-weight:400;line-height:24px}.calendar-block__header_arrow{cursor:pointer}.calendar-block__week{display:grid;grid-template-columns:repeat(7,1fr);gap:14px;justify-items:center;color:var(--primary-green-color);font-size:10px;font-weight:400;line-height:12px;letter-spacing:1.5px;margin-bottom:22px}.calendar-block__week_day{display:flex;align-items:center;justify-content:space-around}.calendar-block__days{display:grid;grid-template-columns:repeat(7,1fr);gap:10px;justify-items:center;margin-bottom:22px}.calendar-block__days_day{cursor:pointer;width:30px;height:30px;display:flex;align-items:center;justify-content:center;border-radius:29px;color:var(--light-black-color)}.calendar-block__days_day.current{border:1px solid var(--primary-green-color)}.calendar-block__days_day.active,.calendar-block__days_day.normal:hover{background-color:var(--primary-green-color);color:var(--white-color)}.calendar-block__days_day.hide{pointer-events:none;cursor:default;color:var(--calendar-gray-hide-color)}.calendar-block__footer{display:flex;align-items:center;justify-content:space-between}.calendar-abs-wrapper{position:absolute;box-shadow:var(--main-card-shadow);top:0;right:0;z-index:1111}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}\n"], dependencies: [{ kind: "component", type: LibCardComponent, selector: "dd-lib-card", inputs: ["type", "footerBtn", "sHeight", "skeleton", "parentLvlForSkeleton", "plugs", "borderRadius"], outputs: ["cardBtnEvent"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: i1$2.DatePipe, name: "date" }, { kind: "component", type: LibButtonComponent, selector: "dd-lib-button", inputs: ["noPadding", "loaderColor"] }, { kind: "component", type: LibSvgIconComponent, selector: "dd-lib-svg-icon", inputs: ["width", "height", "color", "icon"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$4.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$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$4.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i1$4.PatternValidator, selector: "[pattern][formControlName],[pattern][formControl],[pattern][ngModel]", inputs: ["pattern"] }, { kind: "directive", type: i1$4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: BanSymbolDirective, selector: "[ddBanSymbol]", inputs: ["ddBanSymbol", "regExp"] }, { kind: "directive", type: MaxNumDirective, selector: "[ddMaxNum]", inputs: ["ddMaxNum", "curVal"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2663
2752
  }
2664
2753
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: LibCalendarComponent, decorators: [{
2665
2754
  type: Component,
@@ -2677,7 +2766,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImpor
2677
2766
  useExisting: forwardRef(() => LibCalendarComponent),
2678
2767
  multi: true,
2679
2768
  },
2680
- ], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (mode === 'icon') {\r\n<div class=\"pos-relative d-flex align-center\">\r\n @if (dateValue) {\r\n <span class=\"mr-12 green\">{{ dateValue | date: 'dd.MM.yyyy' }}</span>\r\n }\r\n <dd-lib-svg-icon class=\"cup\" (click)=\"showCalendar = !showCalendar\" icon=\"calendar\"></dd-lib-svg-icon>\r\n @if (dateValue) {\r\n <dd-lib-svg-icon class=\"cup\" (click)=\"canselDate()\" icon=\"clear\"></dd-lib-svg-icon>\r\n } @if (showCalendar) {\r\n <div class=\"calendar-abs-wrapper\">\r\n <ng-template [ngTemplateOutlet]=\"calendar\"></ng-template>\r\n </div>\r\n }\r\n</div>\r\n} @if (mode === 'full') {\r\n<ng-template [ngTemplateOutlet]=\"calendar\"></ng-template>\r\n}\r\n\r\n<ng-template #calendar>\r\n <dd-lib-card class=\"calendar-block\" type=\"small\">\r\n <div class=\"full-width\">\r\n <div class=\"calendar-block__header\">\r\n <div class=\"calendar-block__header_arrow\">\r\n <dd-lib-svg-icon (click)=\"changeMonth(-1)\" icon=\"left_chevron\"></dd-lib-svg-icon>\r\n </div>\r\n <div class=\"calendar-block__header_year\">{{ getMonth() + ' ' + year }}</div>\r\n <div class=\"calendar-block__header_arrow\">\r\n <dd-lib-svg-icon (click)=\"changeMonth(1)\" icon=\"right_chevron\"></dd-lib-svg-icon>\r\n </div>\r\n </div>\r\n <div class=\"calendar-block__week\">\r\n @for (day of week; track day) {\r\n <div class=\"calendar-block__week_day\">{{ day }}</div>\r\n }\r\n </div>\r\n <div class=\"calendar-block__days\">\r\n @for (day of daysInMonth?.prevDays; track day) {\r\n <div class=\"calendar-block__days_day hide\">{{ day }}</div>\r\n } @for (day of daysInMonth?.days; track day) {\r\n <div\r\n (click)=\"selectDay(day)\"\r\n [class.active]=\"checkActiveDay(day)\"\r\n\r\n [class.current]=\"\r\n dateNow.getDate() === day && dateNow.getMonth() === month && dateNow.getFullYear() === year\r\n \"\r\n [class.hide]=\"checkHideDay(day)\"\r\n class=\"calendar-block__days_day normal\">\r\n {{ day }}\r\n </div>\r\n } @for (day of daysInMonth?.lastDays; track day) {\r\n <div class=\"calendar-block__days_day hide\">{{ day }}</div>\r\n }\r\n </div>\r\n @if(needTime) {\r\n <div class=\"calendar-block__time\">\r\n <div class=\"d-flex justify-between\">\r\n <div class=\"text-plain\">\u0412\u0440\u0435\u043C\u044F</div>\r\n <div class=\"d-flex\">\r\n <input [(ngModel)]=\"hours\" class=\"calendar-block__time-input\"\r\n type=\"text\"\r\n [ddMaxNum]=\"maxHours\"\r\n [curVal]=\"hours\"\r\n [disabled]=\"!dateValue\"\r\n [regExp]=\"true\"\r\n ddBanSymbol=\"^\\d+$\"\r\n max=\"23\"\r\n maxlength=\"2\"\r\n pattern=\"^\\d+$\">\r\n <span class=\"second-dot\">:</span>\r\n <input [(ngModel)]=\"minutes\" class=\"calendar-block__time-input\"\r\n [ddMaxNum]=\"maxMinutes\"\r\n [curVal]=\"minutes\"\r\n [disabled]=\"!dateValue\"\r\n [regExp]=\"true\"\r\n ddBanSymbol=\"^\\d+$\"\r\n max=\"59\"\r\n maxlength=\"2\"\r\n pattern=\"^\\d+$\"\r\n type=\"text\">\r\n </div>\r\n </div>\r\n </div>\r\n }\r\n <div class=\"calendar-block__footer\">\r\n <dd-lib-button (click)=\"canselDate()\" [btnColor]=\"'transparent'\" class=\"calendar-block__footer_btn\"\r\n >\u041E\u0442\u043C\u0435\u043D\u0438\u0442\u044C\r\n </dd-lib-button>\r\n <dd-lib-button (click)=\"selectDate()\"\r\n [disabled]=\"(!dateValue && !rangeMode) || (rangeMode && (!dateStart || !dateEnd))\"\r\n class=\"calendar-block__footer_btn\"\r\n >\u0412\u044B\u0431\u0440\u0430\u0442\u044C\r\n </dd-lib-button>\r\n </div>\r\n </div>\r\n </dd-lib-card>\r\n</ng-template>\r\n", styles: [":host{display:block;-webkit-user-select:none;user-select:none}.calendar-block{z-index:1100;display:block}@media screen and (max-width: 840px){.calendar-block{height:100%}}.calendar-block__time{padding:22px 0;margin:22px 0;border-top:1px solid var(--gray-color-200);border-bottom:1px solid var(--gray-color-200)}.calendar-block__time-input{width:56px;height:36px;border-radius:12px;border:1px solid var(--primary-gray-color);text-align:center}.calendar-block__time .second-dot{margin:auto 8px;animation:blink 1s step-end infinite}@keyframes blink{0%,to{opacity:1}50%{opacity:0}}.calendar-block__header{display:flex;align-items:center;justify-content:space-between;margin-bottom:22px;color:var(--calendar-gray-color);font-size:14px;font-weight:400;line-height:24px}.calendar-block__header_arrow{cursor:pointer}.calendar-block__week{display:grid;grid-template-columns:repeat(7,1fr);gap:14px;justify-items:center;color:var(--primary-green-color);font-size:10px;font-weight:400;line-height:12px;letter-spacing:1.5px;margin-bottom:22px}.calendar-block__week_day{display:flex;align-items:center;justify-content:space-around}.calendar-block__days{display:grid;grid-template-columns:repeat(7,1fr);gap:10px;justify-items:center;margin-bottom:22px}.calendar-block__days_day{cursor:pointer;width:30px;height:30px;display:flex;align-items:center;justify-content:center;border-radius:29px;color:var(--light-black-color)}.calendar-block__days_day.current{border:1px solid var(--primary-green-color)}.calendar-block__days_day.active,.calendar-block__days_day.normal:hover{background-color:var(--primary-green-color);color:var(--white-color)}.calendar-block__days_day.hide{pointer-events:none;cursor:default;color:var(--calendar-gray-hide-color)}.calendar-block__footer{display:flex;align-items:center;justify-content:space-between}.calendar-abs-wrapper{position:absolute;box-shadow:var(--main-card-shadow);top:0;right:0;z-index:1111}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}\n"] }]
2769
+ ], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (mode === 'icon') {\n<div class=\"pos-relative d-flex align-center\">\n @if (dateValue) {\n <span class=\"mr-12 green\">{{ dateValue | date: 'dd.MM.yyyy' }}</span>\n }\n <dd-lib-svg-icon class=\"cup\" (click)=\"showCalendar = !showCalendar\" icon=\"calendar\"></dd-lib-svg-icon>\n @if (dateValue) {\n <dd-lib-svg-icon class=\"cup\" (click)=\"canselDate()\" icon=\"clear\"></dd-lib-svg-icon>\n } @if (showCalendar) {\n <div class=\"calendar-abs-wrapper\">\n <ng-template [ngTemplateOutlet]=\"calendar\"></ng-template>\n </div>\n }\n</div>\n} @if (mode === 'full') {\n<ng-template [ngTemplateOutlet]=\"calendar\"></ng-template>\n}\n\n<ng-template #calendar>\n <dd-lib-card class=\"calendar-block\" type=\"small\">\n <div class=\"full-width\">\n <div class=\"calendar-block__header\">\n <div class=\"calendar-block__header_arrow\">\n <dd-lib-svg-icon (click)=\"changeMonth(-1)\" icon=\"left_chevron\"></dd-lib-svg-icon>\n </div>\n <div class=\"calendar-block__header_year\">{{ getMonth() + ' ' + year }}</div>\n <div class=\"calendar-block__header_arrow\">\n <dd-lib-svg-icon (click)=\"changeMonth(1)\" icon=\"right_chevron\"></dd-lib-svg-icon>\n </div>\n </div>\n <div class=\"calendar-block__week\">\n @for (day of week; track day) {\n <div class=\"calendar-block__week_day\">{{ day }}</div>\n }\n </div>\n <div class=\"calendar-block__days\">\n @for (day of daysInMonth?.prevDays; track day) {\n <div class=\"calendar-block__days_day hide\">{{ day }}</div>\n } @for (day of daysInMonth?.days; track day) {\n <div\n (click)=\"selectDay(day)\"\n [class.active]=\"checkActiveDay(day)\"\n\n [class.current]=\"\n dateNow.getDate() === day && dateNow.getMonth() === month && dateNow.getFullYear() === year\n \"\n [class.hide]=\"checkHideDay(day)\"\n class=\"calendar-block__days_day normal\">\n {{ day }}\n </div>\n } @for (day of daysInMonth?.lastDays; track day) {\n <div class=\"calendar-block__days_day hide\">{{ day }}</div>\n }\n </div>\n @if(needTime) {\n <div class=\"calendar-block__time\">\n <div class=\"d-flex justify-between\">\n <div class=\"text-plain\">\u0412\u0440\u0435\u043C\u044F</div>\n <div class=\"d-flex\">\n <input [(ngModel)]=\"hours\" class=\"calendar-block__time-input\"\n type=\"text\"\n [ddMaxNum]=\"maxHours\"\n [curVal]=\"hours\"\n [disabled]=\"!dateValue\"\n [regExp]=\"true\"\n ddBanSymbol=\"^\\d+$\"\n max=\"23\"\n maxlength=\"2\"\n pattern=\"^\\d+$\">\n <span class=\"second-dot\">:</span>\n <input [(ngModel)]=\"minutes\" class=\"calendar-block__time-input\"\n [ddMaxNum]=\"maxMinutes\"\n [curVal]=\"minutes\"\n [disabled]=\"!dateValue\"\n [regExp]=\"true\"\n ddBanSymbol=\"^\\d+$\"\n max=\"59\"\n maxlength=\"2\"\n pattern=\"^\\d+$\"\n type=\"text\">\n </div>\n </div>\n </div>\n }\n <div class=\"calendar-block__footer\">\n <dd-lib-button (click)=\"canselDate()\" [btnColor]=\"'transparent'\" class=\"calendar-block__footer_btn\"\n >\u041E\u0442\u043C\u0435\u043D\u0438\u0442\u044C\n </dd-lib-button>\n <dd-lib-button (click)=\"selectDate()\"\n [disabled]=\"(!dateValue && !rangeMode)\n || (rangeMode && !dateStart && !dateEnd)\n || (rangeMode && rangeModeFullPeriod && (!dateStart || !dateEnd))\"\n class=\"calendar-block__footer_btn\"\n >\u0412\u044B\u0431\u0440\u0430\u0442\u044C\n </dd-lib-button>\n </div>\n </div>\n </dd-lib-card>\n</ng-template>\n", styles: [":host{display:block;-webkit-user-select:none;user-select:none}.calendar-block{z-index:1100;display:block}@media screen and (max-width: 840px){.calendar-block{height:100%}}.calendar-block__time{padding:22px 0;margin:22px 0;border-top:1px solid var(--gray-color-200);border-bottom:1px solid var(--gray-color-200)}.calendar-block__time-input{width:56px;height:36px;border-radius:12px;border:1px solid var(--primary-gray-color);text-align:center}.calendar-block__time .second-dot{margin:auto 8px;animation:blink 1s step-end infinite}@keyframes blink{0%,to{opacity:1}50%{opacity:0}}.calendar-block__header{display:flex;align-items:center;justify-content:space-between;margin-bottom:22px;color:var(--calendar-gray-color);font-size:14px;font-weight:400;line-height:24px}.calendar-block__header_arrow{cursor:pointer}.calendar-block__week{display:grid;grid-template-columns:repeat(7,1fr);gap:14px;justify-items:center;color:var(--primary-green-color);font-size:10px;font-weight:400;line-height:12px;letter-spacing:1.5px;margin-bottom:22px}.calendar-block__week_day{display:flex;align-items:center;justify-content:space-around}.calendar-block__days{display:grid;grid-template-columns:repeat(7,1fr);gap:10px;justify-items:center;margin-bottom:22px}.calendar-block__days_day{cursor:pointer;width:30px;height:30px;display:flex;align-items:center;justify-content:center;border-radius:29px;color:var(--light-black-color)}.calendar-block__days_day.current{border:1px solid var(--primary-green-color)}.calendar-block__days_day.active,.calendar-block__days_day.normal:hover{background-color:var(--primary-green-color);color:var(--white-color)}.calendar-block__days_day.hide{pointer-events:none;cursor:default;color:var(--calendar-gray-hide-color)}.calendar-block__footer{display:flex;align-items:center;justify-content:space-between}.calendar-abs-wrapper{position:absolute;box-shadow:var(--main-card-shadow);top:0;right:0;z-index:1111}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}\n"] }]
2681
2770
  }], ctorParameters: () => [{ type: DateService }], propDecorators: { type: [{
2682
2771
  type: Input
2683
2772
  }], formatDate: [{
@@ -2686,6 +2775,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImpor
2686
2775
  type: Input
2687
2776
  }], rangeMode: [{
2688
2777
  type: Input
2778
+ }], rangeModeFullPeriod: [{
2779
+ type: Input
2689
2780
  }], maxHours: [{
2690
2781
  type: Input
2691
2782
  }], maxMinutes: [{
@@ -2694,8 +2785,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImpor
2694
2785
  type: Input
2695
2786
  }], mode: [{
2696
2787
  type: Input
2788
+ }], dateStart: [{
2789
+ type: Input
2790
+ }], dateEnd: [{
2791
+ type: Input
2697
2792
  }], emitDate: [{
2698
2793
  type: Output
2794
+ }], immediatelyEmitDate: [{
2795
+ type: Output
2699
2796
  }], emitPeriod: [{
2700
2797
  type: Output
2701
2798
  }], maxDate: [{
@@ -3114,7 +3211,7 @@ class LibPeriodComponent {
3114
3211
  useExisting: forwardRef(() => LibPeriodComponent),
3115
3212
  multi: true,
3116
3213
  },
3117
- ], ngImport: i0, template: "<div class=\"pos-relative\">\r\n <dd-lib-filter-button\r\n (clearEvent)=\"clearPeriod()\"\r\n (clickEvent)=\"showPeriod()\"\r\n [active]=\"periodIsSelected || calendarIsSelected\"\r\n [id]=\"idPeriod\"\r\n btnColor=\"transparent\">\r\n <div>\u041F\u0435\u0440\u0438\u043E\u0434</div>\r\n </dd-lib-filter-button>\r\n @if (periodIsShown) {\r\n <div (ddClickOutside)=\"clickOutside($event)\" [elements]=\"[idPeriod, idCalendar]\" class=\"period__wrapper\">\r\n <dd-lib-card class=\"period__block\" type=\"small\">\r\n <div>\r\n <div class=\"period__header\">\r\n <div class=\"period__back\" (click)=\"periodIsShown = false\">\r\n <dd-lib-svg-icon icon=\"toggle_arrow_left\"></dd-lib-svg-icon>\r\n <div class=\"g-h5-title\">\u041F\u0435\u0440\u0438\u043E\u0434</div>\r\n </div>\r\n <div class=\"g-h5-title hide-tablet\">\u041F\u0435\u0440\u0438\u043E\u0434</div>\r\n <div (click)=\"clearPeriod()\" class=\"g-text font-medium green cup\">\u0421\u0431\u0440\u043E\u0441\u0438\u0442\u044C</div>\r\n </div>\r\n <div class=\"period__list\">\r\n @for (period of periodMenu; track period) {\r\n <dd-lib-radio (changed)=\"selectPeriod($event)\" [(ngModel)]=\"selectedPeriod\" [value]=\"period.name\">{{\r\n period.title\r\n }}</dd-lib-radio>\r\n }\r\n </div>\r\n <div (click)=\"calendarIsShown = !calendarIsShown\" class=\"g-text font-medium green cup mt-8\">\r\n {{ calendarIsShown ? '\u0417\u0430\u043A\u0440\u044B\u0442\u044C' : '\u041E\u0442\u043A\u0440\u044B\u0442\u044C' }} \u043A\u0430\u043B\u0435\u043D\u0434\u0430\u0440\u044C\r\n </div>\r\n </div>\r\n </dd-lib-card>\r\n @if (calendarIsShown) {\r\n <dd-lib-calendar\r\n (emitDate)=\"selectDate($event)\"\r\n [(ngModel)]=\"selectedDate\"\r\n [id]=\"idCalendar\"\r\n [maxDate]=\"maxDate\"\r\n class=\"period__calendar\">\r\n </dd-lib-calendar>\r\n }\r\n </div>\r\n }\r\n</div>\r\n", styles: ["dd-lib-filter-button{position:relative}.period__wrapper{position:absolute;left:0;z-index:400;display:block;width:352px;height:348px;margin-top:8px;animation:filter-show .5s forwards}@media screen and (max-width: 840px){.period__wrapper{position:fixed;top:0;width:100%;height:100%;overflow:auto;margin-top:0;animation:shift .3s}}@media screen and (max-width: 840px){.period__block{height:100%}}.period__header{display:flex;align-items:center;justify-content:space-between;margin-bottom:16px}@media screen and (max-width: 840px){.period__header{padding-bottom:24px;border-bottom:1px solid var(--gray-color-200)}}@media screen and (max-width: 480px){.period__header{padding-top:8px}}.period__back{display:none}@media screen and (max-width: 840px){.period__back{display:flex;align-items:center}}.period__back ::ng-deep svg{margin-right:16px}.period__back ::ng-deep svg path{stroke:var(--menu-arr-color)}.period__list{max-height:400px;overflow:auto}@media screen and (max-width: 840px){.period__list{max-height:none}}.period__list ::ng-deep dd-lib-radio{display:block;margin-bottom:16px}@media screen and (max-width: 840px){.period__list ::ng-deep dd-lib-radio:not(:last-child){padding-bottom:16px;border-bottom:1px solid var(--gray-color-200)}}.period__calendar{margin-top:8px;display:block;animation:filter-show .5s forwards}@media screen and (max-width: 840px){.period__calendar{position:fixed;top:0;left:0;width:100%;height:100%;overflow:auto;margin-top:0;animation:shift .3s}}\n"], dependencies: [{ kind: "component", type: LibCardComponent, selector: "dd-lib-card", inputs: ["type", "footerBtn", "sHeight", "skeleton", "parentLvlForSkeleton", "plugs", "borderRadius"], outputs: ["cardBtnEvent"] }, { kind: "component", type: LibFilterButtonComponent, selector: "dd-lib-filter-button", inputs: ["btnTitle", "hintContent"], outputs: ["clearEvent", "hintEvent"] }, { kind: "component", type: LibRadioComponent, selector: "dd-lib-radio", inputs: ["radioId", "disabled", "required", "name", "value", "checked"], outputs: ["changed"] }, { kind: "component", type: LibCalendarComponent, selector: "dd-lib-calendar", inputs: ["type", "formatDate", "formatTime", "rangeMode", "maxHours", "maxMinutes", "needTime", "mode", "maxDate", "minDate"], outputs: ["emitDate", "emitPeriod"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: ClickOutsideDirective, selector: "[ddClickOutside]", inputs: ["elements"], outputs: ["ddClickOutside"] }, { kind: "component", type: LibSvgIconComponent, selector: "dd-lib-svg-icon", inputs: ["width", "height", "color", "icon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3214
+ ], ngImport: i0, template: "<div class=\"pos-relative\">\r\n <dd-lib-filter-button\r\n (clearEvent)=\"clearPeriod()\"\r\n (clickEvent)=\"showPeriod()\"\r\n [active]=\"periodIsSelected || calendarIsSelected\"\r\n [id]=\"idPeriod\"\r\n btnColor=\"transparent\">\r\n <div>\u041F\u0435\u0440\u0438\u043E\u0434</div>\r\n </dd-lib-filter-button>\r\n @if (periodIsShown) {\r\n <div (ddClickOutside)=\"clickOutside($event)\" [elements]=\"[idPeriod, idCalendar]\" class=\"period__wrapper\">\r\n <dd-lib-card class=\"period__block\" type=\"small\">\r\n <div>\r\n <div class=\"period__header\">\r\n <div class=\"period__back\" (click)=\"periodIsShown = false\">\r\n <dd-lib-svg-icon icon=\"toggle_arrow_left\"></dd-lib-svg-icon>\r\n <div class=\"g-h5-title\">\u041F\u0435\u0440\u0438\u043E\u0434</div>\r\n </div>\r\n <div class=\"g-h5-title hide-tablet\">\u041F\u0435\u0440\u0438\u043E\u0434</div>\r\n <div (click)=\"clearPeriod()\" class=\"g-text font-medium green cup\">\u0421\u0431\u0440\u043E\u0441\u0438\u0442\u044C</div>\r\n </div>\r\n <div class=\"period__list\">\r\n @for (period of periodMenu; track period) {\r\n <dd-lib-radio (changed)=\"selectPeriod($event)\" [(ngModel)]=\"selectedPeriod\" [value]=\"period.name\">{{\r\n period.title\r\n }}</dd-lib-radio>\r\n }\r\n </div>\r\n <div (click)=\"calendarIsShown = !calendarIsShown\" class=\"g-text font-medium green cup mt-8\">\r\n {{ calendarIsShown ? '\u0417\u0430\u043A\u0440\u044B\u0442\u044C' : '\u041E\u0442\u043A\u0440\u044B\u0442\u044C' }} \u043A\u0430\u043B\u0435\u043D\u0434\u0430\u0440\u044C\r\n </div>\r\n </div>\r\n </dd-lib-card>\r\n @if (calendarIsShown) {\r\n <dd-lib-calendar\r\n (emitDate)=\"selectDate($event)\"\r\n [(ngModel)]=\"selectedDate\"\r\n [id]=\"idCalendar\"\r\n [maxDate]=\"maxDate\"\r\n class=\"period__calendar\">\r\n </dd-lib-calendar>\r\n }\r\n </div>\r\n }\r\n</div>\r\n", styles: ["dd-lib-filter-button{position:relative}.period__wrapper{position:absolute;left:0;z-index:400;display:block;width:352px;height:348px;margin-top:8px;animation:filter-show .5s forwards}@media screen and (max-width: 840px){.period__wrapper{position:fixed;top:0;width:100%;height:100%;overflow:auto;margin-top:0;animation:shift .3s}}@media screen and (max-width: 840px){.period__block{height:100%}}.period__header{display:flex;align-items:center;justify-content:space-between;margin-bottom:16px}@media screen and (max-width: 840px){.period__header{padding-bottom:24px;border-bottom:1px solid var(--gray-color-200)}}@media screen and (max-width: 480px){.period__header{padding-top:8px}}.period__back{display:none}@media screen and (max-width: 840px){.period__back{display:flex;align-items:center}}.period__back ::ng-deep svg{margin-right:16px}.period__back ::ng-deep svg path{stroke:var(--menu-arr-color)}.period__list{max-height:400px;overflow:auto}@media screen and (max-width: 840px){.period__list{max-height:none}}.period__list ::ng-deep dd-lib-radio{display:block;margin-bottom:16px}@media screen and (max-width: 840px){.period__list ::ng-deep dd-lib-radio:not(:last-child){padding-bottom:16px;border-bottom:1px solid var(--gray-color-200)}}.period__calendar{margin-top:8px;display:block;animation:filter-show .5s forwards}@media screen and (max-width: 840px){.period__calendar{position:fixed;top:0;left:0;width:100%;height:100%;overflow:auto;margin-top:0;animation:shift .3s}}\n"], dependencies: [{ kind: "component", type: LibCardComponent, selector: "dd-lib-card", inputs: ["type", "footerBtn", "sHeight", "skeleton", "parentLvlForSkeleton", "plugs", "borderRadius"], outputs: ["cardBtnEvent"] }, { kind: "component", type: LibFilterButtonComponent, selector: "dd-lib-filter-button", inputs: ["btnTitle", "hintContent"], outputs: ["clearEvent", "hintEvent"] }, { kind: "component", type: LibRadioComponent, selector: "dd-lib-radio", inputs: ["radioId", "disabled", "required", "name", "value", "checked"], outputs: ["changed"] }, { kind: "component", type: LibCalendarComponent, selector: "dd-lib-calendar", inputs: ["type", "formatDate", "formatTime", "rangeMode", "rangeModeFullPeriod", "maxHours", "maxMinutes", "needTime", "mode", "dateStart", "dateEnd", "maxDate", "minDate"], outputs: ["emitDate", "immediatelyEmitDate", "emitPeriod"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: ClickOutsideDirective, selector: "[ddClickOutside]", inputs: ["elements"], outputs: ["ddClickOutside"] }, { kind: "component", type: LibSvgIconComponent, selector: "dd-lib-svg-icon", inputs: ["width", "height", "color", "icon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3118
3215
  }
3119
3216
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: LibPeriodComponent, decorators: [{
3120
3217
  type: Component,
@@ -3404,6 +3501,12 @@ class LibHorizontalScrollComponent {
3404
3501
  this.lastTime = time;
3405
3502
  this.lastScrollLeft = container.scrollLeft;
3406
3503
  }
3504
+ onWheel(e) {
3505
+ const container = this.el.nativeElement.querySelector('.scroll-container');
3506
+ // Уменьшаем скорость прокрутки, умножая на коэффициент (например 0.5)
3507
+ container.scrollLeft += e.deltaY * 0.5;
3508
+ e.preventDefault();
3509
+ }
3407
3510
  startInertialScroll() {
3408
3511
  this.cancelAnimation();
3409
3512
  const animate = () => {
@@ -3429,11 +3532,11 @@ class LibHorizontalScrollComponent {
3429
3532
  this.cancelAnimation();
3430
3533
  }
3431
3534
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: LibHorizontalScrollComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component }); }
3432
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.2", type: LibHorizontalScrollComponent, isStandalone: true, selector: "dd-lib-horizontal-scroll", ngImport: i0, template: "<div class=\"scroll-container\"\r\n (mousedown)=\"onMouseDown($event)\"\r\n (mouseleave)=\"onMouseLeave()\"\r\n (mouseup)=\"onMouseUp()\"\r\n (mousemove)=\"onMouseMove($event)\"\r\n (touchstart)=\"onTouchStart($event)\"\r\n (touchend)=\"onTouchEnd()\"\r\n (touchmove)=\"onTouchMove($event)\">\r\n <div class=\"scroll-content\">\r\n <ng-content></ng-content>\r\n </div>\r\n</div>\r\n", styles: [".scroll-container{width:100%;overflow-x:auto;cursor:grab;-ms-overflow-style:none;scrollbar-width:none}.scroll-container:active{cursor:grabbing}.scroll-container::-webkit-scrollbar{display:none}.scroll-content{display:inline-flex;-webkit-user-select:none;user-select:none;gap:4px}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3535
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.2", type: LibHorizontalScrollComponent, isStandalone: true, selector: "dd-lib-horizontal-scroll", ngImport: i0, template: "<div class=\"scroll-container\"\r\n (mousedown)=\"onMouseDown($event)\"\r\n (mouseleave)=\"onMouseLeave()\"\r\n (mouseup)=\"onMouseUp()\"\r\n (mousemove)=\"onMouseMove($event)\"\r\n (wheel)=\"onWheel($event)\"\r\n (touchstart)=\"onTouchStart($event)\"\r\n (touchend)=\"onTouchEnd()\"\r\n (touchmove)=\"onTouchMove($event)\">\r\n <div class=\"scroll-content\">\r\n <ng-content></ng-content>\r\n </div>\r\n</div>\r\n", styles: [".scroll-container{width:100%;overflow-x:auto;cursor:grab;-ms-overflow-style:none;scrollbar-width:none}.scroll-container:active{cursor:grabbing}.scroll-container::-webkit-scrollbar{display:none}.scroll-content{display:inline-flex;-webkit-user-select:none;user-select:none;gap:4px}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3433
3536
  }
3434
3537
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: LibHorizontalScrollComponent, decorators: [{
3435
3538
  type: Component,
3436
- args: [{ selector: 'dd-lib-horizontal-scroll', imports: [], standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"scroll-container\"\r\n (mousedown)=\"onMouseDown($event)\"\r\n (mouseleave)=\"onMouseLeave()\"\r\n (mouseup)=\"onMouseUp()\"\r\n (mousemove)=\"onMouseMove($event)\"\r\n (touchstart)=\"onTouchStart($event)\"\r\n (touchend)=\"onTouchEnd()\"\r\n (touchmove)=\"onTouchMove($event)\">\r\n <div class=\"scroll-content\">\r\n <ng-content></ng-content>\r\n </div>\r\n</div>\r\n", styles: [".scroll-container{width:100%;overflow-x:auto;cursor:grab;-ms-overflow-style:none;scrollbar-width:none}.scroll-container:active{cursor:grabbing}.scroll-container::-webkit-scrollbar{display:none}.scroll-content{display:inline-flex;-webkit-user-select:none;user-select:none;gap:4px}\n"] }]
3539
+ args: [{ selector: 'dd-lib-horizontal-scroll', imports: [], standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"scroll-container\"\r\n (mousedown)=\"onMouseDown($event)\"\r\n (mouseleave)=\"onMouseLeave()\"\r\n (mouseup)=\"onMouseUp()\"\r\n (mousemove)=\"onMouseMove($event)\"\r\n (wheel)=\"onWheel($event)\"\r\n (touchstart)=\"onTouchStart($event)\"\r\n (touchend)=\"onTouchEnd()\"\r\n (touchmove)=\"onTouchMove($event)\">\r\n <div class=\"scroll-content\">\r\n <ng-content></ng-content>\r\n </div>\r\n</div>\r\n", styles: [".scroll-container{width:100%;overflow-x:auto;cursor:grab;-ms-overflow-style:none;scrollbar-width:none}.scroll-container:active{cursor:grabbing}.scroll-container::-webkit-scrollbar{display:none}.scroll-content{display:inline-flex;-webkit-user-select:none;user-select:none;gap:4px}\n"] }]
3437
3540
  }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }] });
3438
3541
 
3439
3542
  class LibSelectComponent extends LibCommonInputTextComponent {
@@ -3457,6 +3560,7 @@ class LibSelectComponent extends LibCommonInputTextComponent {
3457
3560
  this.tooltipPosition = 'top';
3458
3561
  this.highlight = true;
3459
3562
  this.searchOn = true;
3563
+ this.canSortByChecked = true;
3460
3564
  this.itemSize = 40;
3461
3565
  this.keyTitle = '';
3462
3566
  this.keyDesc = '';
@@ -3473,9 +3577,12 @@ class LibSelectComponent extends LibCommonInputTextComponent {
3473
3577
  this.initialized = false;
3474
3578
  this._data = signal(undefined);
3475
3579
  // TODO: надо сделать типизацию и конструктор принмайющий объект форматирующий во внутренний и отдающий обратно что нужно
3476
- this.checkedItems = [];
3580
+ this.checkedItems = signal([]);
3477
3581
  this.initWriteValue = true;
3478
3582
  this.stringArray = signal(false);
3583
+ effect(() => {
3584
+ this.allSelected = this.checkedItems().length === this._data()?.length;
3585
+ });
3479
3586
  }
3480
3587
  ngOnInit() {
3481
3588
  this.showMultiCountValue = this.multi;
@@ -3513,23 +3620,23 @@ class LibSelectComponent extends LibCommonInputTextComponent {
3513
3620
  const children = group[this.keyGroupChildren];
3514
3621
  const allSelected = this.isGroupSelected(group);
3515
3622
  if (allSelected) {
3516
- this.checkedItems = this.checkedItems.filter(item => !children.some((child) => this.keyValue ? child[this.keyValue] === item[this.keyValue] :
3517
- JSON.stringify(child) === JSON.stringify(item)));
3623
+ this.checkedItems.set(this.checkedItems().filter(item => !children.some((child) => this.keyValue ? child[this.keyValue] === item[this.keyValue] :
3624
+ JSON.stringify(child) === JSON.stringify(item))));
3518
3625
  }
3519
3626
  else {
3520
- const newItems = children.filter((child) => !this.checkedItems.some(item => this.keyValue ? child[this.keyValue] === item[this.keyValue] :
3627
+ const newItems = children.filter((child) => !this.checkedItems().some(item => this.keyValue ? child[this.keyValue] === item[this.keyValue] :
3521
3628
  JSON.stringify(child) === JSON.stringify(item)));
3522
- this.checkedItems = [...this.checkedItems, ...newItems];
3629
+ this.checkedItems.set([...this.checkedItems(), ...newItems]);
3523
3630
  }
3524
3631
  this.updateMultiSelection();
3525
3632
  }
3526
3633
  updateMultiSelection() {
3527
3634
  const values = this.keyValue ?
3528
- this.checkedItems.map(m => m[this.keyValue]) :
3529
- this.checkedItems;
3635
+ this.checkedItems().map(m => m[this.keyValue]) :
3636
+ this.checkedItems();
3530
3637
  this.propagateChange(values);
3531
- this.multiCountValue = this.checkedItems.length ?
3532
- `Выбрано (${this.checkedItems.length})` :
3638
+ this.multiCountValue = this.checkedItems().length ?
3639
+ `Выбрано (${this.checkedItems().length})` :
3533
3640
  undefined;
3534
3641
  this.changeDetection.detectChanges();
3535
3642
  }
@@ -3537,7 +3644,7 @@ class LibSelectComponent extends LibCommonInputTextComponent {
3537
3644
  if (!this.multi)
3538
3645
  return false;
3539
3646
  const children = group[this.keyGroupChildren];
3540
- return children.every((child) => this.checkedItems.some(item => this.keyValue ? child[this.keyValue] === item[this.keyValue] :
3647
+ return children.every((child) => this.checkedItems().some(item => this.keyValue ? child[this.keyValue] === item[this.keyValue] :
3541
3648
  JSON.stringify(child) === JSON.stringify(item)));
3542
3649
  }
3543
3650
  onClear(checkedItem) {
@@ -3586,6 +3693,22 @@ class LibSelectComponent extends LibCommonInputTextComponent {
3586
3693
  else {
3587
3694
  this.isShownList = false;
3588
3695
  }
3696
+ if (this.isShownList && this.canSortByChecked) {
3697
+ this._data.update(data => {
3698
+ if (!data) {
3699
+ return data;
3700
+ }
3701
+ return data.sort((a, b) => {
3702
+ const aSelected = this.checkSelected(a);
3703
+ const bSelected = this.checkSelected(b);
3704
+ if (aSelected && !bSelected)
3705
+ return -1;
3706
+ if (!aSelected && bSelected)
3707
+ return 1;
3708
+ return 0;
3709
+ });
3710
+ });
3711
+ }
3589
3712
  super.notifyFocusEvent();
3590
3713
  }
3591
3714
  writeValue(value) {
@@ -3598,20 +3721,20 @@ class LibSelectComponent extends LibCommonInputTextComponent {
3598
3721
  data = this._data()?.flatMap(item => item.children) ?? [];
3599
3722
  }
3600
3723
  if (this.keyValue) {
3601
- this.checkedItems = data.filter((f) => value.includes(f[this.keyValue])) || [];
3724
+ this.checkedItems.set(data.filter((f) => value.includes(f[this.keyValue])) || []);
3602
3725
  }
3603
3726
  else {
3604
3727
  if (this.stringArray()) {
3605
- this.checkedItems = data.filter((f) => value.includes(f)) || [];
3728
+ this.checkedItems.set(data.filter((f) => value.includes(f)) || []);
3606
3729
  }
3607
3730
  else {
3608
3731
  const strArr = value.map(JSON.stringify);
3609
- this.checkedItems = data.filter((f) => strArr.includes(JSON.stringify(f))) || [];
3732
+ this.checkedItems.set(data.filter((f) => strArr.includes(JSON.stringify(f))) || []);
3610
3733
  }
3611
3734
  }
3612
3735
  }
3613
3736
  else {
3614
- this.checkedItems = [];
3737
+ this.checkedItems.set([]);
3615
3738
  this.multiCountValue = '';
3616
3739
  }
3617
3740
  if (!this.initWriteValue) {
@@ -3729,20 +3852,28 @@ class LibSelectComponent extends LibCommonInputTextComponent {
3729
3852
  this.searchValue = undefined;
3730
3853
  this.isShownList = false;
3731
3854
  }
3732
- selectMultiItem(item) {
3855
+ selectMultiItem(item, clear, checkAll) {
3733
3856
  if (typeof item === 'string') {
3734
3857
  }
3735
3858
  else {
3736
- if (this.checkSelected(item)) {
3737
- this.checkedItems = this.checkedItems.filter(f => f[this.keyValue] !== item[this.keyValue] || f !== item);
3859
+ if (checkAll) {
3860
+ if (clear) {
3861
+ this.checkedItems.set(this.checkedItems().filter(f => f[this.keyValue] !== item[this.keyValue] || f !== item));
3862
+ }
3863
+ else {
3864
+ this.checkedItems.set(this._data());
3865
+ }
3866
+ }
3867
+ else if (this.checkSelected(item)) {
3868
+ this.checkedItems.set(this.checkedItems().filter(f => f[this.keyValue] !== item[this.keyValue] || f !== item));
3738
3869
  }
3739
3870
  else {
3740
- this.checkedItems.push(item);
3871
+ this.checkedItems.set([...this.checkedItems(), item]);
3741
3872
  }
3742
3873
  }
3743
- const values = this.keyValue ? this.checkedItems.map(m => m[this.keyValue]) : this.checkedItems;
3874
+ const values = this.keyValue ? this.checkedItems().map(m => m[this.keyValue]) : this.checkedItems;
3744
3875
  this.propagateChange(values);
3745
- const selectL = this.checkedItems.length;
3876
+ const selectL = this.checkedItems().length;
3746
3877
  if (selectL) {
3747
3878
  this.multiCountValue = `Выбрано (${selectL})`;
3748
3879
  }
@@ -3750,13 +3881,16 @@ class LibSelectComponent extends LibCommonInputTextComponent {
3750
3881
  this.multiCountValue = undefined;
3751
3882
  }
3752
3883
  }
3884
+ sortByChecked(item) {
3885
+ return this.canSortByChecked ? this.checkSelected(item) : false;
3886
+ }
3753
3887
  checkSelected(item) {
3754
3888
  if (this.multi) {
3755
3889
  if (this.keyValue) {
3756
- return this.checkedItems.find(f => f[this.keyValue] === item[this.keyValue] || f === item);
3890
+ return this.checkedItems().find(f => f[this.keyValue] === item[this.keyValue] || f === item);
3757
3891
  }
3758
3892
  else {
3759
- return this.checkedItems.find(f => JSON.stringify(f) === JSON.stringify(item) || f === item);
3893
+ return this.checkedItems().find(f => JSON.stringify(f) === JSON.stringify(item) || f === item);
3760
3894
  }
3761
3895
  }
3762
3896
  else {
@@ -3783,40 +3917,28 @@ class LibSelectComponent extends LibCommonInputTextComponent {
3783
3917
  super.handleFocus();
3784
3918
  // this.showMultiCountValue = false;
3785
3919
  }
3920
+ selectAll() {
3921
+ this.allSelected = !this.allSelected;
3922
+ this._data()?.forEach(item => this.selectMultiItem(item, !this.allSelected, true));
3923
+ }
3786
3924
  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$4.ControlContainer, host: true, optional: true, skipSelf: true }], target: i0.ɵɵFactoryTarget.Component }); }
3787
- 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", keyGroupTitle: "keyGroupTitle", keyGroupChildren: "keyGroupChildren", selectAllInGroup: "selectAllInGroup" }, outputs: { selectedItem: "selectedItem", selectedItems: "selectedItems", deleteMultiItem: "deleteMultiItem" }, providers: [
3925
+ 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", canSortByChecked: "canSortByChecked", itemSize: "itemSize", keyTitle: "keyTitle", keyDesc: "keyDesc", keyValue: "keyValue", noDataError: "noDataError", searchPlaceholder: "searchPlaceholder", placeholder: "placeholder", keyGroupTitle: "keyGroupTitle", keyGroupChildren: "keyGroupChildren", selectAllInGroup: "selectAllInGroup" }, outputs: { selectedItem: "selectedItem", selectedItems: "selectedItems", deleteMultiItem: "deleteMultiItem" }, providers: [
3788
3926
  {
3789
3927
  provide: NG_VALUE_ACCESSOR,
3790
3928
  useExisting: forwardRef(() => LibSelectComponent),
3791
3929
  multi: true,
3792
3930
  },
3793
- ], 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 [innerHTML]=\"item | highlight: (highlight ? searchValue : '') | safe: 'html'\"\n class=\"selected-items__item-title\"></div>\n }\n @if (keyTitle && !stringArray()) {\n <div\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 @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\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\">\n <div ddSelectableItem [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 (click)=\"selectItem(checkedItem)\"\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\" [ngTemplateOutletContext]=\"{item: child}\"></ng-container>\n }\n </div>\n } @else {\n <ng-container [ngTemplateOutlet]=\"rowItem\" [ngTemplateOutletContext]=\"{item}\"></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}.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}.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$4.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$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$4.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$2.CdkFixedSizeVirtualScroll, selector: "cdk-virtual-scroll-viewport[itemSize]", inputs: ["itemSize", "minBufferPx", "maxBufferPx"] }, { kind: "directive", type: i2$2.CdkVirtualForOf, selector: "[cdkVirtualFor][cdkVirtualForOf]", inputs: ["cdkVirtualForOf", "cdkVirtualForTrackBy", "cdkVirtualForTemplate", "cdkVirtualForTemplateCacheSize"] }, { kind: "component", type: i2$2.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 }); }
3931
+ ], 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$4.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$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$4.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$2.CdkFixedSizeVirtualScroll, selector: "cdk-virtual-scroll-viewport[itemSize]", inputs: ["itemSize", "minBufferPx", "maxBufferPx"] }, { kind: "directive", type: i2$2.CdkVirtualForOf, selector: "[cdkVirtualFor][cdkVirtualForOf]", inputs: ["cdkVirtualForOf", "cdkVirtualForTrackBy", "cdkVirtualForTemplate", "cdkVirtualForTemplateCacheSize"] }, { kind: "component", type: i2$2.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 }); }
3794
3932
  }
3795
3933
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: LibSelectComponent, decorators: [{
3796
3934
  type: Component,
3797
- args: [{ selector: 'dd-lib-select', standalone: true, imports: [
3798
- ReactiveFormsModule,
3799
- FormsModule,
3800
- HighlightPipe,
3801
- SafePipe,
3802
- ClickOutsideDirective,
3803
- LibLoaderComponent,
3804
- FilterByKeyPipe,
3805
- LibSvgIconComponent,
3806
- ScrollingModule,
3807
- TooltipDirective,
3808
- NgTemplateOutlet,
3809
- ListKeyboardNavigationDirective,
3810
- SelectableItemDirective,
3811
- FixedPositionDirective,
3812
- LibHorizontalScrollComponent
3813
- ], providers: [
3935
+ args: [{ selector: 'dd-lib-select', standalone: true, imports: [ReactiveFormsModule, FormsModule, HighlightPipe, SafePipe, ClickOutsideDirective, LibLoaderComponent, FilterByKeyPipe, LibSvgIconComponent, ScrollingModule, TooltipDirective, NgTemplateOutlet, ListKeyboardNavigationDirective, SelectableItemDirective, FixedPositionDirective, LibHorizontalScrollComponent, JsonPipe, SortByValPipe, LibSvgViewerComponent], providers: [
3814
3936
  {
3815
3937
  provide: NG_VALUE_ACCESSOR,
3816
3938
  useExisting: forwardRef(() => LibSelectComponent),
3817
3939
  multi: true,
3818
3940
  },
3819
- ], changeDetection: ChangeDetectionStrategy.OnPush, 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 [innerHTML]=\"item | highlight: (highlight ? searchValue : '') | safe: 'html'\"\n class=\"selected-items__item-title\"></div>\n }\n @if (keyTitle && !stringArray()) {\n <div\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 @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\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\">\n <div ddSelectableItem [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 (click)=\"selectItem(checkedItem)\"\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\" [ngTemplateOutletContext]=\"{item: child}\"></ng-container>\n }\n </div>\n } @else {\n <ng-container [ngTemplateOutlet]=\"rowItem\" [ngTemplateOutletContext]=\"{item}\"></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}.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}.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"] }]
3941
+ ], changeDetection: ChangeDetectionStrategy.OnPush, 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"] }]
3820
3942
  }], ctorParameters: () => [{ type: i0.DestroyRef }, { type: i0.ChangeDetectorRef }, { type: i1$4.ControlContainer, decorators: [{
3821
3943
  type: Optional
3822
3944
  }, {
@@ -3843,6 +3965,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImpor
3843
3965
  type: Input
3844
3966
  }], selectId: [{
3845
3967
  type: Input
3968
+ }], canSortByChecked: [{
3969
+ type: Input
3846
3970
  }], itemSize: [{
3847
3971
  type: Input
3848
3972
  }], keyTitle: [{
@@ -4268,15 +4392,61 @@ class LibDateRangeComponent {
4268
4392
  static { this.idCounter = 1; }
4269
4393
  constructor(cdr) {
4270
4394
  this.cdr = cdr;
4395
+ this.placeholderStart = 'Дата начала';
4396
+ this.placeholderEnd = 'Дата окончания';
4397
+ this.rangeModeFullPeriod = true;
4271
4398
  this.isShownPeriod = false;
4272
4399
  this.disabled = false;
4273
- this.selectedPeriod = { start: new Date(), end: new Date() };
4400
+ this.selectedPeriod = {
4401
+ start: undefined,
4402
+ end: undefined
4403
+ };
4404
+ this.endIsFocused = false;
4405
+ this.startIsFocused = false;
4406
+ }
4407
+ pressTab(e) {
4408
+ if (this.isShownPeriod) {
4409
+ e.preventDefault();
4410
+ e.stopPropagation();
4411
+ if (this.startIsFocused) {
4412
+ this.endInput?.nativeElement.focus();
4413
+ }
4414
+ else if (this.endIsFocused) {
4415
+ this.startInput?.nativeElement.focus();
4416
+ }
4417
+ }
4274
4418
  }
4275
4419
  ngOnInit() {
4276
4420
  if (!this.rangeId) {
4277
4421
  this.rangeId = 'dd-range-' + LibDateRangeComponent.idCounter++;
4278
4422
  }
4279
4423
  }
4424
+ get startDateStr() {
4425
+ return this.formatDate(this.selectedPeriod.start);
4426
+ }
4427
+ set startDateStr(value) {
4428
+ this.selectedPeriod.start = this.parseDate(value);
4429
+ }
4430
+ get endDateStr() {
4431
+ return this.formatDate(this.selectedPeriod.end);
4432
+ }
4433
+ set endDateStr(value) {
4434
+ this.selectedPeriod.end = this.parseDate(value);
4435
+ }
4436
+ formatDate(date) {
4437
+ if (!date)
4438
+ return '';
4439
+ const day = date.getDate().toString().padStart(2, '0');
4440
+ const month = (date.getMonth() + 1).toString().padStart(2, '0');
4441
+ const year = date.getFullYear();
4442
+ return `${day}.${month}.${year}`;
4443
+ }
4444
+ parseDate(dateStr) {
4445
+ if (!dateStr)
4446
+ return new Date();
4447
+ const parts = dateStr.split('.');
4448
+ return new Date(+parts[2], +parts[1] - 1, +parts[0]);
4449
+ }
4280
4450
  openCalendar() {
4281
4451
  if (!this.disabled) {
4282
4452
  this.isShownPeriod = true;
@@ -4294,7 +4464,7 @@ class LibDateRangeComponent {
4294
4464
  this.selectedPeriodStr = `${format($event?.start, 'dd.MM.yyyy')} - ${format($event?.end, 'dd.MM.yyyy')}`;
4295
4465
  }
4296
4466
  else {
4297
- this.selectedPeriod = undefined;
4467
+ this.selectedPeriod = new IDatePeriod();
4298
4468
  this.selectedPeriodStr = undefined;
4299
4469
  }
4300
4470
  this.propagateChange(this.selectedPeriod);
@@ -4306,7 +4476,7 @@ class LibDateRangeComponent {
4306
4476
  this.selectedPeriod = { start, end };
4307
4477
  }
4308
4478
  else {
4309
- this.selectedPeriod = undefined;
4479
+ this.selectedPeriod = new IDatePeriod();
4310
4480
  }
4311
4481
  this.propagateChange(this.selectedPeriod);
4312
4482
  }
@@ -4325,15 +4495,53 @@ class LibDateRangeComponent {
4325
4495
  }
4326
4496
  this.cdr.detectChanges();
4327
4497
  }
4498
+ setDate($event) {
4499
+ if (this.startIsFocused) {
4500
+ if (this.selectedPeriod.start?.toString() === $event?.toString()) {
4501
+ this.selectedPeriod.start = undefined;
4502
+ }
4503
+ else {
4504
+ this.selectedPeriod.start = $event;
4505
+ }
4506
+ if (this.selectedPeriod.end) {
4507
+ if (this.selectedPeriod.start > this.selectedPeriod.end) {
4508
+ this.selectedPeriod.end = undefined;
4509
+ }
4510
+ }
4511
+ }
4512
+ if (this.endIsFocused) {
4513
+ if (this.selectedPeriod.end?.toString() === $event?.toString()) {
4514
+ this.selectedPeriod.end = undefined;
4515
+ }
4516
+ else {
4517
+ this.selectedPeriod.end = $event;
4518
+ }
4519
+ if (this.selectedPeriod?.start) {
4520
+ if (this.selectedPeriod.start > this.selectedPeriod.end) {
4521
+ this.selectedPeriod.start = undefined;
4522
+ }
4523
+ }
4524
+ }
4525
+ }
4526
+ changeActiveInput(position, val) {
4527
+ if (position === 'start' && !this.startIsFocused) {
4528
+ this.startIsFocused = val;
4529
+ this.endIsFocused = false;
4530
+ }
4531
+ if (position === 'end' && !this.endIsFocused) {
4532
+ this.endIsFocused = val;
4533
+ this.startIsFocused = false;
4534
+ }
4535
+ }
4328
4536
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: LibDateRangeComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
4329
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.2", type: LibDateRangeComponent, isStandalone: true, selector: "dd-lib-date-range", inputs: { rangeId: "rangeId", placeholder: "placeholder", label: "label", required: "required" }, providers: [
4537
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.2", type: LibDateRangeComponent, isStandalone: true, selector: "dd-lib-date-range", inputs: { rangeId: "rangeId", placeholderStart: "placeholderStart", placeholderEnd: "placeholderEnd", label: "label", required: "required", rangeModeFullPeriod: "rangeModeFullPeriod" }, host: { listeners: { "document:keydown.tab": "pressTab($event)" } }, providers: [
4330
4538
  provideNgxMask(),
4331
4539
  {
4332
4540
  provide: NG_VALUE_ACCESSOR,
4333
4541
  useExisting: forwardRef(() => LibDateRangeComponent),
4334
4542
  multi: true,
4335
4543
  },
4336
- ], ngImport: i0, template: "<div class=\"lib-range\" id=\"lib-range-{{ rangeId }}\" [destroyedItem]=\"isShownPeriod\" ddFixedPosition>\r\n @if (label) {\r\n <label [for]=\"rangeId\" class=\"lib-range__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 <div class=\"pos-relative\" data-child=\"input\">\r\n <input\r\n [attr.id]=\"rangeId\"\r\n [attr.placeholder]=\"placeholder\"\r\n (click)=\"openCalendar()\"\r\n [(ngModel)]=\"selectedPeriodStr\"\r\n [mask]=\"'d0.M0.0000 - d0.M0.0000'\"\r\n (ngModelChange)=\"changeStrDate($event)\"\r\n [leadZeroDateTime]=\"true\"\r\n class=\"text-select\"/>\r\n @if (!selectedPeriodStr) {\r\n <dd-lib-svg-icon [class.gray-svg]=\"!isShownPeriod\"\r\n (click)=\"openCalendar()\"\r\n id=\"calendar-{{ rangeId }}\"\r\n class=\"calendar\" icon=\"calendar\"></dd-lib-svg-icon>\r\n\r\n\r\n } @else {\r\n <dd-lib-svg-icon\r\n (click)=\"setPeriod(undefined)\"\r\n class=\"clear\"\r\n icon=\"clear\"></dd-lib-svg-icon>\r\n\r\n }\r\n </div>\r\n @if (isShownPeriod) {\r\n <div data-child=\"list\"\r\n (ddClickOutside)=\"closeCalendar()\"\r\n [elements]=\"['lib-range-' + rangeId, 'calendar' + rangeId]\"\r\n class=\"calendar-wrapper\">\r\n <dd-lib-calendar [(ngModel)]=\"selectedPeriod\" [rangeMode]=\"true\" (emitPeriod)=\"setPeriod($event)\"></dd-lib-calendar>\r\n </div>\r\n }\r\n</div>\r\n", styles: [".lib-range{min-width:311px;position:relative}.lib-range input{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-range input:hover{border-color:var(--input-active-border-colort)}.lib-range input:focus{border-color:var(--input-active-border-colort);box-shadow:var(--input-active-border-shadow)}.lib-range input:disabled{border:none;background-color:var(--input-disable-input);color:var(--input-disable-text);pointer-events:none}.lib-range input:disabled::placeholder{color:var(--input-placeholder)}.lib-range input.invalid,.lib-range input.invalid:hover{border-color:var(--input-error-border-color)}.lib-range input.invalid:focus{border-color:var(--input-error-border-color);box-shadow:var(--input-error-border-shadow)}.lib-range .clear{cursor:pointer;position:absolute;right:8px;top:12px}.lib-range .calendar{cursor:pointer;position:absolute;right:16px;top:10px}.lib-range .calendar.up{transform:rotate(180deg)}.lib-range__title{margin-bottom:4px;font-size:14px;line-height:24px;display:flex;align-items:flex-start}.lib-range__error{color:var(--primary-red-color);font-size:12px;font-weight:400;line-height:10px;margin-top:2px;position:absolute}.lib-range .calendar-wrapper{position:absolute;display:block;z-index:100;width:100%;overflow:auto;border-radius:8px;box-shadow:var(--main-card-shadow);background-color:var(--main-card-color)}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$4.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$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: LibSvgIconComponent, selector: "dd-lib-svg-icon", inputs: ["width", "height", "color", "icon"] }, { kind: "directive", type: ClickOutsideDirective, selector: "[ddClickOutside]", inputs: ["elements"], outputs: ["ddClickOutside"] }, { kind: "component", type: LibCalendarComponent, selector: "dd-lib-calendar", inputs: ["type", "formatDate", "formatTime", "rangeMode", "maxHours", "maxMinutes", "needTime", "mode", "maxDate", "minDate"], outputs: ["emitDate", "emitPeriod"] }, { 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: "directive", type: FixedPositionDirective, selector: "[ddFixedPosition]", inputs: ["childName1", "childName2", "destroyedItem"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
4544
+ ], viewQueries: [{ propertyName: "startInput", first: true, predicate: ["startInput"], descendants: true, static: true }, { propertyName: "endInput", first: true, predicate: ["endInput"], descendants: true, static: true }], ngImport: i0, template: "<div class=\"lib-range\" id=\"lib-range-{{ rangeId }}\" [destroyedItem]=\"isShownPeriod\" ddFixedPosition>\n @if (label) {\n <label [for]=\"rangeId\" class=\"lib-range__title\">\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 lib-range-wrapper\"\n [class.start-active]=\"startIsFocused\"\n [class.end-active]=\"endIsFocused\"\n data-child=\"input\">\n <input\n #startInput\n [attr.id]=\"rangeId\"\n tabindex=\"1\"\n [attr.placeholder]=\"placeholderStart\"\n (click)=\"openCalendar()\"\n [(ngModel)]=\"startDateStr\"\n [mask]=\"'d0.M0.0000'\"\n (ngModelChange)=\"changeStrDate($event)\"\n (focus)=\"changeActiveInput('start', true)\"\n (blur)=\"changeActiveInput('start', false)\"\n [leadZeroDateTime]=\"true\"\n class=\"text-select\"/>\n \u2013\n <input\n #endInput\n [attr.id]=\"rangeId\"\n tabindex=\"2\"\n [attr.placeholder]=\"placeholderEnd\"\n (click)=\"openCalendar()\"\n [(ngModel)]=\"endDateStr\"\n [mask]=\"'d0.M0.0000'\"\n (focus)=\"changeActiveInput('end', true)\"\n (blur)=\"changeActiveInput('end', false)\"\n (ngModelChange)=\"changeStrDate($event)\"\n [leadZeroDateTime]=\"true\"\n class=\"text-select\"/>\n @if (!selectedPeriodStr) {\n <dd-lib-svg-icon [class.gray-svg]=\"!isShownPeriod\"\n (click)=\"openCalendar()\"\n id=\"calendar-{{ rangeId }}\"\n class=\"calendar\" icon=\"calendar\"></dd-lib-svg-icon>\n\n\n } @else {\n <dd-lib-svg-icon\n (click)=\"setPeriod(undefined)\"\n class=\"clear\"\n icon=\"clear\"></dd-lib-svg-icon>\n\n }\n </div>\n @if (isShownPeriod) {\n <div data-child=\"list\"\n (ddClickOutside)=\"closeCalendar()\"\n [elements]=\"['lib-range-' + rangeId, 'calendar' + rangeId]\"\n class=\"calendar-wrapper\">\n <dd-lib-calendar [(ngModel)]=\"selectedPeriod\"\n (immediatelyEmitDate)=\"setDate($event)\"\n [dateStart]=\"selectedPeriod.start\"\n [dateEnd]=\"selectedPeriod.end\"\n [rangeMode]=\"true\"\n [rangeModeFullPeriod]=\"rangeModeFullPeriod\"\n (emitPeriod)=\"setPeriod($event)\"></dd-lib-calendar>\n </div>\n }\n</div>\n", styles: [".lib-range{min-width:311px;position:relative}.lib-range .lib-range-wrapper{display:flex;align-items:center;border-radius:8px;border:1px solid var(--input-border-color);background-color:transparent;position:relative;overflow:hidden}.lib-range .lib-range-wrapper.start-active:before{content:\"\";position:absolute;top:0;left:0;width:50%;height:100%;border-radius:8px 0 0 8px;border:1px solid var(--input-active-border-colort);box-sizing:border-box;pointer-events:none;border-right:none}.lib-range .lib-range-wrapper.end-active:before{content:\"\";position:absolute;top:0;right:0;width:50%;height:100%;border-radius:0 8px 8px 0;border:1px solid var(--input-active-border-colort);border-left:none;box-sizing:border-box;pointer-events:none}.lib-range .lib-range-wrapper:hover{border-color:var(--input-active-border-colort)}.lib-range .lib-range-wrapper:hover:before{opacity:0}.lib-range .lib-range-wrapper:focus{border-color:var(--input-active-border-colort);box-shadow:var(--input-active-border-shadow)}.lib-range input{width:100%;height:48px;padding:15px 28px 15px 16px;overflow:hidden;text-overflow:ellipsis;border:none;text-align:center}.lib-range input:disabled{border:none;background-color:var(--input-disable-input);color:var(--input-disable-text);pointer-events:none}.lib-range input:disabled::placeholder{color:var(--input-placeholder)}.lib-range input.invalid,.lib-range input.invalid:hover{border-color:var(--input-error-border-color)}.lib-range input.invalid:focus{border-color:var(--input-error-border-color);box-shadow:var(--input-error-border-shadow)}.lib-range .clear{cursor:pointer;position:absolute;right:8px;top:12px}.lib-range .calendar{cursor:pointer;position:absolute;right:16px;top:10px}.lib-range .calendar.up{transform:rotate(180deg)}.lib-range__title{margin-bottom:4px;font-size:14px;line-height:24px;display:flex;align-items:flex-start}.lib-range__error{color:var(--primary-red-color);font-size:12px;font-weight:400;line-height:10px;margin-top:2px;position:absolute}.lib-range .calendar-wrapper{position:absolute;display:block;z-index:100;width:100%;overflow:auto;border-radius:8px;box-shadow:var(--main-card-shadow);background-color:var(--main-card-color)}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$4.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$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: LibSvgIconComponent, selector: "dd-lib-svg-icon", inputs: ["width", "height", "color", "icon"] }, { kind: "directive", type: ClickOutsideDirective, selector: "[ddClickOutside]", inputs: ["elements"], outputs: ["ddClickOutside"] }, { kind: "component", type: LibCalendarComponent, selector: "dd-lib-calendar", inputs: ["type", "formatDate", "formatTime", "rangeMode", "rangeModeFullPeriod", "maxHours", "maxMinutes", "needTime", "mode", "dateStart", "dateEnd", "maxDate", "minDate"], outputs: ["emitDate", "immediatelyEmitDate", "emitPeriod"] }, { 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: "directive", type: FixedPositionDirective, selector: "[ddFixedPosition]", inputs: ["childName1", "childName2", "destroyedItem"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
4337
4545
  }
4338
4546
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: LibDateRangeComponent, decorators: [{
4339
4547
  type: Component,
@@ -4351,15 +4559,28 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImpor
4351
4559
  useExisting: forwardRef(() => LibDateRangeComponent),
4352
4560
  multi: true,
4353
4561
  },
4354
- ], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"lib-range\" id=\"lib-range-{{ rangeId }}\" [destroyedItem]=\"isShownPeriod\" ddFixedPosition>\r\n @if (label) {\r\n <label [for]=\"rangeId\" class=\"lib-range__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 <div class=\"pos-relative\" data-child=\"input\">\r\n <input\r\n [attr.id]=\"rangeId\"\r\n [attr.placeholder]=\"placeholder\"\r\n (click)=\"openCalendar()\"\r\n [(ngModel)]=\"selectedPeriodStr\"\r\n [mask]=\"'d0.M0.0000 - d0.M0.0000'\"\r\n (ngModelChange)=\"changeStrDate($event)\"\r\n [leadZeroDateTime]=\"true\"\r\n class=\"text-select\"/>\r\n @if (!selectedPeriodStr) {\r\n <dd-lib-svg-icon [class.gray-svg]=\"!isShownPeriod\"\r\n (click)=\"openCalendar()\"\r\n id=\"calendar-{{ rangeId }}\"\r\n class=\"calendar\" icon=\"calendar\"></dd-lib-svg-icon>\r\n\r\n\r\n } @else {\r\n <dd-lib-svg-icon\r\n (click)=\"setPeriod(undefined)\"\r\n class=\"clear\"\r\n icon=\"clear\"></dd-lib-svg-icon>\r\n\r\n }\r\n </div>\r\n @if (isShownPeriod) {\r\n <div data-child=\"list\"\r\n (ddClickOutside)=\"closeCalendar()\"\r\n [elements]=\"['lib-range-' + rangeId, 'calendar' + rangeId]\"\r\n class=\"calendar-wrapper\">\r\n <dd-lib-calendar [(ngModel)]=\"selectedPeriod\" [rangeMode]=\"true\" (emitPeriod)=\"setPeriod($event)\"></dd-lib-calendar>\r\n </div>\r\n }\r\n</div>\r\n", styles: [".lib-range{min-width:311px;position:relative}.lib-range input{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-range input:hover{border-color:var(--input-active-border-colort)}.lib-range input:focus{border-color:var(--input-active-border-colort);box-shadow:var(--input-active-border-shadow)}.lib-range input:disabled{border:none;background-color:var(--input-disable-input);color:var(--input-disable-text);pointer-events:none}.lib-range input:disabled::placeholder{color:var(--input-placeholder)}.lib-range input.invalid,.lib-range input.invalid:hover{border-color:var(--input-error-border-color)}.lib-range input.invalid:focus{border-color:var(--input-error-border-color);box-shadow:var(--input-error-border-shadow)}.lib-range .clear{cursor:pointer;position:absolute;right:8px;top:12px}.lib-range .calendar{cursor:pointer;position:absolute;right:16px;top:10px}.lib-range .calendar.up{transform:rotate(180deg)}.lib-range__title{margin-bottom:4px;font-size:14px;line-height:24px;display:flex;align-items:flex-start}.lib-range__error{color:var(--primary-red-color);font-size:12px;font-weight:400;line-height:10px;margin-top:2px;position:absolute}.lib-range .calendar-wrapper{position:absolute;display:block;z-index:100;width:100%;overflow:auto;border-radius:8px;box-shadow:var(--main-card-shadow);background-color:var(--main-card-color)}\n"] }]
4355
- }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { rangeId: [{
4562
+ ], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"lib-range\" id=\"lib-range-{{ rangeId }}\" [destroyedItem]=\"isShownPeriod\" ddFixedPosition>\n @if (label) {\n <label [for]=\"rangeId\" class=\"lib-range__title\">\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 lib-range-wrapper\"\n [class.start-active]=\"startIsFocused\"\n [class.end-active]=\"endIsFocused\"\n data-child=\"input\">\n <input\n #startInput\n [attr.id]=\"rangeId\"\n tabindex=\"1\"\n [attr.placeholder]=\"placeholderStart\"\n (click)=\"openCalendar()\"\n [(ngModel)]=\"startDateStr\"\n [mask]=\"'d0.M0.0000'\"\n (ngModelChange)=\"changeStrDate($event)\"\n (focus)=\"changeActiveInput('start', true)\"\n (blur)=\"changeActiveInput('start', false)\"\n [leadZeroDateTime]=\"true\"\n class=\"text-select\"/>\n \u2013\n <input\n #endInput\n [attr.id]=\"rangeId\"\n tabindex=\"2\"\n [attr.placeholder]=\"placeholderEnd\"\n (click)=\"openCalendar()\"\n [(ngModel)]=\"endDateStr\"\n [mask]=\"'d0.M0.0000'\"\n (focus)=\"changeActiveInput('end', true)\"\n (blur)=\"changeActiveInput('end', false)\"\n (ngModelChange)=\"changeStrDate($event)\"\n [leadZeroDateTime]=\"true\"\n class=\"text-select\"/>\n @if (!selectedPeriodStr) {\n <dd-lib-svg-icon [class.gray-svg]=\"!isShownPeriod\"\n (click)=\"openCalendar()\"\n id=\"calendar-{{ rangeId }}\"\n class=\"calendar\" icon=\"calendar\"></dd-lib-svg-icon>\n\n\n } @else {\n <dd-lib-svg-icon\n (click)=\"setPeriod(undefined)\"\n class=\"clear\"\n icon=\"clear\"></dd-lib-svg-icon>\n\n }\n </div>\n @if (isShownPeriod) {\n <div data-child=\"list\"\n (ddClickOutside)=\"closeCalendar()\"\n [elements]=\"['lib-range-' + rangeId, 'calendar' + rangeId]\"\n class=\"calendar-wrapper\">\n <dd-lib-calendar [(ngModel)]=\"selectedPeriod\"\n (immediatelyEmitDate)=\"setDate($event)\"\n [dateStart]=\"selectedPeriod.start\"\n [dateEnd]=\"selectedPeriod.end\"\n [rangeMode]=\"true\"\n [rangeModeFullPeriod]=\"rangeModeFullPeriod\"\n (emitPeriod)=\"setPeriod($event)\"></dd-lib-calendar>\n </div>\n }\n</div>\n", styles: [".lib-range{min-width:311px;position:relative}.lib-range .lib-range-wrapper{display:flex;align-items:center;border-radius:8px;border:1px solid var(--input-border-color);background-color:transparent;position:relative;overflow:hidden}.lib-range .lib-range-wrapper.start-active:before{content:\"\";position:absolute;top:0;left:0;width:50%;height:100%;border-radius:8px 0 0 8px;border:1px solid var(--input-active-border-colort);box-sizing:border-box;pointer-events:none;border-right:none}.lib-range .lib-range-wrapper.end-active:before{content:\"\";position:absolute;top:0;right:0;width:50%;height:100%;border-radius:0 8px 8px 0;border:1px solid var(--input-active-border-colort);border-left:none;box-sizing:border-box;pointer-events:none}.lib-range .lib-range-wrapper:hover{border-color:var(--input-active-border-colort)}.lib-range .lib-range-wrapper:hover:before{opacity:0}.lib-range .lib-range-wrapper:focus{border-color:var(--input-active-border-colort);box-shadow:var(--input-active-border-shadow)}.lib-range input{width:100%;height:48px;padding:15px 28px 15px 16px;overflow:hidden;text-overflow:ellipsis;border:none;text-align:center}.lib-range input:disabled{border:none;background-color:var(--input-disable-input);color:var(--input-disable-text);pointer-events:none}.lib-range input:disabled::placeholder{color:var(--input-placeholder)}.lib-range input.invalid,.lib-range input.invalid:hover{border-color:var(--input-error-border-color)}.lib-range input.invalid:focus{border-color:var(--input-error-border-color);box-shadow:var(--input-error-border-shadow)}.lib-range .clear{cursor:pointer;position:absolute;right:8px;top:12px}.lib-range .calendar{cursor:pointer;position:absolute;right:16px;top:10px}.lib-range .calendar.up{transform:rotate(180deg)}.lib-range__title{margin-bottom:4px;font-size:14px;line-height:24px;display:flex;align-items:flex-start}.lib-range__error{color:var(--primary-red-color);font-size:12px;font-weight:400;line-height:10px;margin-top:2px;position:absolute}.lib-range .calendar-wrapper{position:absolute;display:block;z-index:100;width:100%;overflow:auto;border-radius:8px;box-shadow:var(--main-card-shadow);background-color:var(--main-card-color)}\n"] }]
4563
+ }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { startInput: [{
4564
+ type: ViewChild,
4565
+ args: ['startInput', { static: true }]
4566
+ }], endInput: [{
4567
+ type: ViewChild,
4568
+ args: ['endInput', { static: true }]
4569
+ }], rangeId: [{
4356
4570
  type: Input
4357
- }], placeholder: [{
4571
+ }], placeholderStart: [{
4572
+ type: Input
4573
+ }], placeholderEnd: [{
4358
4574
  type: Input
4359
4575
  }], label: [{
4360
4576
  type: Input
4361
4577
  }], required: [{
4362
4578
  type: Input
4579
+ }], rangeModeFullPeriod: [{
4580
+ type: Input
4581
+ }], pressTab: [{
4582
+ type: HostListener,
4583
+ args: ['document:keydown.tab', ['$event']]
4363
4584
  }] } });
4364
4585
 
4365
4586
  class LibDateInputComponent {
@@ -4430,7 +4651,7 @@ class LibDateInputComponent {
4430
4651
  useExisting: forwardRef(() => LibDateInputComponent),
4431
4652
  multi: true,
4432
4653
  },
4433
- ], ngImport: i0, template: "<div class=\"lib-date\" id=\"lib-date-{{ dateId }}\">\r\n @if (label) {\r\n <label [for]=\"dateId\" class=\"lib-date__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 <div class=\"pos-relative\">\r\n <input\r\n [attr.id]=\"dateId\"\r\n [attr.placeholder]=\"placeholder\"\r\n (click)=\"openCalendar()\"\r\n [(ngModel)]=\"selectedDateStr\"\r\n [mask]=\"'d0.M0.0000'\"\r\n (ngModelChange)=\"changeStrDate($event)\"\r\n [leadZeroDateTime]=\"true\"\r\n class=\"text-select\"/>\r\n @if (!selectedDateStr) {\r\n <dd-lib-svg-icon [class.gray-svg]=\"!isShownCalendar\"\r\n (click)=\"openCalendar()\"\r\n id=\"calendar-{{ dateId }}\"\r\n class=\"calendar\" icon=\"calendar\"></dd-lib-svg-icon>\r\n\r\n\r\n } @else {\r\n <dd-lib-svg-icon\r\n (click)=\"setPeriod(undefined)\"\r\n class=\"clear\"\r\n icon=\"clear\"></dd-lib-svg-icon>\r\n\r\n }\r\n </div>\r\n @if (isShownCalendar) {\r\n <div\r\n (ddClickOutside)=\"closeCalendar()\"\r\n [elements]=\"['lib-date-' + dateId, 'calendar' + dateId]\"\r\n class=\"calendar-wrapper\" [ngClass]=\"{top: topSide}\">\r\n <dd-lib-calendar [(ngModel)]=\"selectedDate\" (emitDate)=\"setPeriod($event)\"></dd-lib-calendar>\r\n </div>\r\n }\r\n</div>\r\n", styles: [".lib-date{min-width:340px;position:relative}.lib-date input{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-date input:hover{border-color:var(--input-active-border-colort)}.lib-date input:focus{border-color:var(--input-active-border-colort);box-shadow:var(--input-active-border-shadow)}.lib-date input:disabled{border:none;background-color:var(--input-disable-input);color:var(--input-disable-text);pointer-events:none}.lib-date input:disabled::placeholder{color:var(--input-placeholder)}.lib-date input.invalid,.lib-date input.invalid:hover{border-color:var(--input-error-border-color)}.lib-date input.invalid:focus{border-color:var(--input-error-border-color);box-shadow:var(--input-error-border-shadow)}.lib-date .clear{cursor:pointer;position:absolute;right:8px;top:12px}.lib-date .calendar{cursor:pointer;position:absolute;right:16px;top:10px}.lib-date .calendar.up{transform:rotate(180deg)}.lib-date__title{margin-bottom:4px;font-size:14px;line-height:24px;display:flex;align-items:flex-start}.lib-date__error{color:var(--primary-red-color);font-size:12px;font-weight:400;line-height:10px;margin-top:2px;position:absolute}.lib-date .calendar-wrapper{max-width:350px;position:absolute;display:block;z-index:100;width:100%;overflow:auto;border-radius:8px;box-shadow:var(--main-card-shadow);background-color:var(--main-card-color)}.lib-date .calendar-wrapper.top{bottom:48px}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$4.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$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: LibSvgIconComponent, selector: "dd-lib-svg-icon", inputs: ["width", "height", "color", "icon"] }, { kind: "directive", type: ClickOutsideDirective, selector: "[ddClickOutside]", inputs: ["elements"], outputs: ["ddClickOutside"] }, { kind: "component", type: LibCalendarComponent, selector: "dd-lib-calendar", inputs: ["type", "formatDate", "formatTime", "rangeMode", "maxHours", "maxMinutes", "needTime", "mode", "maxDate", "minDate"], outputs: ["emitDate", "emitPeriod"] }, { 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: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
4654
+ ], ngImport: i0, template: "<div class=\"lib-date\" id=\"lib-date-{{ dateId }}\">\r\n @if (label) {\r\n <label [for]=\"dateId\" class=\"lib-date__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 <div class=\"pos-relative\">\r\n <input\r\n [attr.id]=\"dateId\"\r\n [attr.placeholder]=\"placeholder\"\r\n (click)=\"openCalendar()\"\r\n [(ngModel)]=\"selectedDateStr\"\r\n [mask]=\"'d0.M0.0000'\"\r\n (ngModelChange)=\"changeStrDate($event)\"\r\n [leadZeroDateTime]=\"true\"\r\n class=\"text-select\"/>\r\n @if (!selectedDateStr) {\r\n <dd-lib-svg-icon [class.gray-svg]=\"!isShownCalendar\"\r\n (click)=\"openCalendar()\"\r\n id=\"calendar-{{ dateId }}\"\r\n class=\"calendar\" icon=\"calendar\"></dd-lib-svg-icon>\r\n\r\n\r\n } @else {\r\n <dd-lib-svg-icon\r\n (click)=\"setPeriod(undefined)\"\r\n class=\"clear\"\r\n icon=\"clear\"></dd-lib-svg-icon>\r\n\r\n }\r\n </div>\r\n @if (isShownCalendar) {\r\n <div\r\n (ddClickOutside)=\"closeCalendar()\"\r\n [elements]=\"['lib-date-' + dateId, 'calendar' + dateId]\"\r\n class=\"calendar-wrapper\" [ngClass]=\"{top: topSide}\">\r\n <dd-lib-calendar [(ngModel)]=\"selectedDate\" (emitDate)=\"setPeriod($event)\"></dd-lib-calendar>\r\n </div>\r\n }\r\n</div>\r\n", styles: [".lib-date{min-width:340px;position:relative}.lib-date input{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-date input:hover{border-color:var(--input-active-border-colort)}.lib-date input:focus{border-color:var(--input-active-border-colort);box-shadow:var(--input-active-border-shadow)}.lib-date input:disabled{border:none;background-color:var(--input-disable-input);color:var(--input-disable-text);pointer-events:none}.lib-date input:disabled::placeholder{color:var(--input-placeholder)}.lib-date input.invalid,.lib-date input.invalid:hover{border-color:var(--input-error-border-color)}.lib-date input.invalid:focus{border-color:var(--input-error-border-color);box-shadow:var(--input-error-border-shadow)}.lib-date .clear{cursor:pointer;position:absolute;right:8px;top:12px}.lib-date .calendar{cursor:pointer;position:absolute;right:16px;top:10px}.lib-date .calendar.up{transform:rotate(180deg)}.lib-date__title{margin-bottom:4px;font-size:14px;line-height:24px;display:flex;align-items:flex-start}.lib-date__error{color:var(--primary-red-color);font-size:12px;font-weight:400;line-height:10px;margin-top:2px;position:absolute}.lib-date .calendar-wrapper{max-width:350px;position:absolute;display:block;z-index:100;width:100%;overflow:auto;border-radius:8px;box-shadow:var(--main-card-shadow);background-color:var(--main-card-color)}.lib-date .calendar-wrapper.top{bottom:48px}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$4.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$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: LibSvgIconComponent, selector: "dd-lib-svg-icon", inputs: ["width", "height", "color", "icon"] }, { kind: "directive", type: ClickOutsideDirective, selector: "[ddClickOutside]", inputs: ["elements"], outputs: ["ddClickOutside"] }, { kind: "component", type: LibCalendarComponent, selector: "dd-lib-calendar", inputs: ["type", "formatDate", "formatTime", "rangeMode", "rangeModeFullPeriod", "maxHours", "maxMinutes", "needTime", "mode", "dateStart", "dateEnd", "maxDate", "minDate"], outputs: ["emitDate", "immediatelyEmitDate", "emitPeriod"] }, { 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: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
4434
4655
  }
4435
4656
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: LibDateInputComponent, decorators: [{
4436
4657
  type: Component,
@@ -5349,5 +5570,5 @@ const t = true;
5349
5570
  * Generated bundle index. Do not edit.
5350
5571
  */
5351
5572
 
5352
- export { API_URL, AutoHeightDirective, ClickOutsideDirective, CounterDirective, DDDialogRef, DEFAULT_FORMAT, DIALOG_CONFIG, DataEmptyComponent, DateService, Debounce, DeclensionDirective, DestroyService, DialogConfig, DialogService, DisableAfterNCall, Disabled, DropDownPositionDirective, ErrorPageComponent, FetcherService, FilterByKeyPipe, FilterPipe, FixedPositionDirective, FooterComponent, FooterLinkComponent, FooterLinksBlockComponent, HighlightPipe, ITab, InterceptorsService, LibAccordionComponent, LibBackButtonComponent, LibButtonComponent, LibCalendarComponent, LibCardComponent, LibCheckboxComponent, LibCommentInputComponent, LibCommonButtonComponent, LibCommonInputTextComponent, LibDateInputComponent, LibDateRangeComponent, LibDisclaimerComponent, LibFileLoaderComponent, LibFileUploadComponent, LibFilterButtonComponent, LibFilterComponent, LibHorizontalScrollComponent, LibImageLoaderComponent, LibInfoCardComponent, LibInputComponent, LibLoaderComponent, LibPeriodComponent, LibRadioComponent, LibSearchInputComponent, LibSelectComponent, LibSkeletonComponent, LibSortComponent, LibStepComponent, LibSvgComponent, LibSvgIconComponent, LibSvgViewerComponent, LibTabsFragmentComponent, LibTextareaComponent, ListKeyboardNavigationDirective, MainSharedComponent, ModalBaseComponent, ModalCommonComponent, NotFoundComponent, PhoneMaskDirective, ResizeTextareaDirective, ReversePipe, SafePipe, SelectableItemDirective, SvgIconsService, TOAST_CONFIG_TOKEN, TOOLTIP_DATA, TechWorksComponent, ThemeConfigurator, ThemeConstructorService, Throttle, ToastComponent, ToastConfig, ToastData, ToastRef, ToastService, ToastTypeData, TooltipComponent, TooltipDirective, TriangleDirective, ValidatorsService, completeIconSet, defaultToastConfig, provideToast, svgIconActogoneAccept, svgIconAll, svgIconAppgalery, svgIconAppstore, svgIconArrowDownRed, svgIconArrowUpGreen, svgIconBackArrow, svgIconBurger, svgIconCalendar, svgIconCheckGreen, svgIconCheckWhite, svgIconCircleNo, svgIconClear, svgIconClose, svgIconDangerT, svgIconDd, svgIconDdM, svgIconDobrodel, svgIconDownChevron, svgIconDownload, svgIconEds, svgIconEds2, svgIconEds2M, svgIconEdsM, svgIconEntry, svgIconErrorHint, svgIconEsia, svgIconEye, svgIconEyeOff, svgIconFile, svgIconFilter, svgIconGoogleapp, svgIconGrid, svgIconHealth, svgIconHealthM, svgIconInfoCircle, svgIconInfoT, svgIconLeftChevron, svgIconListSearch, svgIconLogout, svgIconMailExclamation, svgIconMaxFilter, svgIconMoon, svgIconMy, svgIconMyM, svgIconNews, svgIconNext, svgIconPaperclip, svgIconPenEdit, svgIconPguMo, svgIconPguMoM, svgIconPlug, svgIconPlugD, svgIconPlus, svgIconPreset, svgIconPrev, svgIconPrint, svgIconPrinter, svgIconQuestion, svgIconQuestionWhiteG, svgIconRedClose, svgIconReload, svgIconRightChevron, svgIconRustore, svgIconSearch, svgIconSend, svgIconSetAvatar, svgIconSharedLogo, svgIconSmallRoundLoader, svgIconSort, svgIconStar, svgIconSuccessT, svgIconSun, svgIconTg, svgIconToggleArrowLeft, svgIconToggleArrowRight, svgIconTrash, svgIconTrophy, svgIconUser, svgIconUserEmpty, svgIconUserEmptyD, svgIconVk, svgIconWarningT, t };
5573
+ export { API_URL, AutoHeightDirective, ClickOutsideDirective, CounterDirective, DDDialogRef, DEFAULT_FORMAT, DIALOG_CONFIG, DataEmptyComponent, DateService, Debounce, DeclensionDirective, DestroyService, DialogConfig, DialogService, DisableAfterNCall, Disabled, DropDownPositionDirective, ErrorPageComponent, FetcherService, FilterByKeyPipe, FilterPipe, FixedPositionDirective, FooterComponent, FooterLinkComponent, FooterLinksBlockComponent, HighlightPipe, IDatePeriod, ITab, InterceptorsService, LibAccordionComponent, LibBackButtonComponent, LibButtonComponent, LibCalendarComponent, LibCardComponent, LibCheckboxComponent, LibCommentInputComponent, LibCommonButtonComponent, LibCommonInputTextComponent, LibDateInputComponent, LibDateRangeComponent, LibDisclaimerComponent, LibFileLoaderComponent, LibFileUploadComponent, LibFilterButtonComponent, LibFilterComponent, LibHorizontalScrollComponent, LibImageLoaderComponent, LibInfoCardComponent, LibInputComponent, LibLoaderComponent, LibPeriodComponent, LibRadioComponent, LibSearchInputComponent, LibSelectComponent, LibSkeletonComponent, LibSortComponent, LibStepComponent, LibSvgComponent, LibSvgIconComponent, LibSvgViewerComponent, LibTabsFragmentComponent, LibTextareaComponent, ListKeyboardNavigationDirective, MainSharedComponent, ModalBaseComponent, ModalCommonComponent, NotFoundComponent, PhoneMaskDirective, ResizeTextareaDirective, ReversePipe, SafePipe, SelectableItemDirective, SortByValPipe, SvgIconsService, TOAST_CONFIG_TOKEN, TOOLTIP_DATA, TechWorksComponent, ThemeConfigurator, ThemeConstructorService, Throttle, ToastComponent, ToastConfig, ToastData, ToastRef, ToastService, ToastTypeData, TooltipComponent, TooltipDirective, TriangleDirective, ValidatorsService, completeIconSet, defaultToastConfig, provideToast, svgIconActogoneAccept, svgIconAll, svgIconAppgalery, svgIconAppstore, svgIconArrowDownRed, svgIconArrowUpGreen, svgIconBackArrow, svgIconBurger, svgIconCalendar, svgIconCheckGreen, svgIconCheckWhite, svgIconCircleNo, svgIconClear, svgIconClose, svgIconDangerT, svgIconDd, svgIconDdM, svgIconDobrodel, svgIconDownChevron, svgIconDownload, svgIconEds, svgIconEds2, svgIconEds2M, svgIconEdsM, svgIconEntry, svgIconErrorHint, svgIconEsia, svgIconEye, svgIconEyeOff, svgIconFile, svgIconFilter, svgIconGoogleapp, svgIconGrid, svgIconHealth, svgIconHealthM, svgIconInfoCircle, svgIconInfoT, svgIconLeftChevron, svgIconListSearch, svgIconLogout, svgIconMailExclamation, svgIconMaxFilter, svgIconMoon, svgIconMy, svgIconMyM, svgIconNews, svgIconNext, svgIconPaperclip, svgIconPenEdit, svgIconPguMo, svgIconPguMoM, svgIconPlug, svgIconPlugD, svgIconPlus, svgIconPreset, svgIconPrev, svgIconPrint, svgIconPrinter, svgIconQuestion, svgIconQuestionWhiteG, svgIconRedClose, svgIconReload, svgIconRightChevron, svgIconRustore, svgIconSearch, svgIconSend, svgIconSetAvatar, svgIconSharedLogo, svgIconSmallRoundLoader, svgIconSort, svgIconStar, svgIconSuccessT, svgIconSun, svgIconTg, svgIconToggleArrowLeft, svgIconToggleArrowRight, svgIconTrash, svgIconTrophy, svgIconUser, svgIconUserEmpty, svgIconUserEmptyD, svgIconVk, svgIconWarningT, t };
5353
5574
  //# sourceMappingURL=morozeckiy-dd-lib.mjs.map