@morozeckiy/dd-lib 0.2.30 → 0.2.38

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/assets/images/svg/print.svg +12 -0
  2. package/esm2022/lib/core/dialog/dialog-config.mjs +2 -2
  3. package/esm2022/lib/core/index.mjs +2 -4
  4. package/esm2022/lib/core/toast/index.mjs +5 -0
  5. package/esm2022/lib/core/toast/toast/toast-animations.mjs +9 -0
  6. package/esm2022/lib/core/toast/toast/toast.component.mjs +58 -0
  7. package/esm2022/lib/core/toast/toast-config.mjs +24 -0
  8. package/esm2022/lib/core/toast/toast-ref.mjs +15 -0
  9. package/esm2022/lib/core/toast/toast.service.mjs +41 -109
  10. package/esm2022/lib/lib-button/lib-button.component.mjs +1 -1
  11. package/esm2022/lib/lib-loader/lib-loader.component.mjs +6 -3
  12. package/esm2022/lib/lib-search-input/lib-search-input.component.mjs +2 -2
  13. package/esm2022/lib/lib-select/lib-select.component.mjs +2 -2
  14. package/esm2022/lib/svg-icons/svg-icon.model.mjs +6 -1
  15. package/fesm2022/morozeckiy-dd-lib.mjs +141 -175
  16. package/fesm2022/morozeckiy-dd-lib.mjs.map +1 -1
  17. package/lib/core/index.d.ts +1 -3
  18. package/lib/core/services/validators.service.d.ts +2 -2
  19. package/lib/core/toast/index.d.ts +4 -0
  20. package/lib/core/toast/toast/toast-animations.d.ts +5 -0
  21. package/lib/core/toast/toast/toast.component.d.ts +21 -0
  22. package/lib/core/toast/toast-config.d.ts +23 -0
  23. package/lib/core/toast/toast-ref.d.ts +8 -0
  24. package/lib/core/toast/toast.service.d.ts +13 -29
  25. package/lib/lib-loader/lib-loader.component.d.ts +2 -1
  26. package/lib/svg-icons/svg-icon.model.d.ts +8 -1
  27. package/morozeckiy-dd-lib-0.2.32.tgz +0 -0
  28. package/morozeckiy-dd-lib-0.2.33.tgz +0 -0
  29. package/morozeckiy-dd-lib-0.2.34.tgz +0 -0
  30. package/morozeckiy-dd-lib-0.2.35.tgz +0 -0
  31. package/morozeckiy-dd-lib-0.2.36.tgz +0 -0
  32. package/morozeckiy-dd-lib-0.2.37.tgz +0 -0
  33. package/morozeckiy-dd-lib-0.2.38.tgz +0 -0
  34. package/package.json +1 -1
  35. package/morozeckiy-dd-lib-0.2.27.tgz +0 -0
  36. package/morozeckiy-dd-lib-0.2.29.tgz +0 -0
  37. package/morozeckiy-dd-lib-0.2.30.tgz +0 -0
@@ -1,9 +1,9 @@
1
1
  import * as i0 from '@angular/core';
2
- import { EventEmitter, Component, Input, ViewChild, Output, forwardRef, ChangeDetectionStrategy, CUSTOM_ELEMENTS_SCHEMA, NO_ERRORS_SCHEMA, Injectable, Inject, Pipe, Directive, HostListener, InjectionToken, TemplateRef, Injector, ViewContainerRef, RendererStyleFlags2, Optional, Host, SkipSelf } from '@angular/core';
2
+ import { EventEmitter, Component, Input, ViewChild, Output, forwardRef, ChangeDetectionStrategy, CUSTOM_ELEMENTS_SCHEMA, NO_ERRORS_SCHEMA, Injectable, Inject, Pipe, Directive, HostListener, InjectionToken, TemplateRef, Injector, RendererStyleFlags2, Optional, Host, SkipSelf } from '@angular/core';
3
3
  import * as i1$5 from '@angular/forms';
4
4
  import { NG_VALUE_ACCESSOR, FormsModule, Validators, ReactiveFormsModule } from '@angular/forms';
5
5
  import * as i1 from '@angular/common';
6
- import { CommonModule, DecimalPipe, NgStyle, DOCUMENT, NgTemplateOutlet, NgComponentOutlet, NgOptimizedImage, AsyncPipe, JsonPipe } from '@angular/common';
6
+ import { CommonModule, DecimalPipe, AsyncPipe, DOCUMENT, NgTemplateOutlet, NgComponentOutlet, NgOptimizedImage, JsonPipe } from '@angular/common';
7
7
  import { BehaviorSubject, Subject, of, fromEvent, combineLatest } from 'rxjs';
8
8
  import { format, parse, isAfter, isBefore } from 'date-fns';
9
9
  import * as i1$2 from '@angular/common/http';
@@ -12,9 +12,10 @@ import { catchError, switchMap, filter, takeUntil, tap, map, debounceTime, merge
12
12
  import * as i1$1 from '@angular/router';
13
13
  import { RouterLink } from '@angular/router';
14
14
  import * as i1$3 from '@angular/platform-browser';
15
- import { ComponentPortal, CdkPortalOutlet, PortalInjector, TemplatePortal } from '@angular/cdk/portal';
15
+ import { ComponentPortal, PortalInjector, CdkPortalOutlet, TemplatePortal } from '@angular/cdk/portal';
16
16
  import * as i1$4 from '@angular/cdk/overlay';
17
- import { GlobalPositionStrategy } from '@angular/cdk/overlay';
17
+ import { OverlayModule, GlobalPositionStrategy } from '@angular/cdk/overlay';
18
+ import { trigger, state, style, transition, animate } from '@angular/animations';
18
19
  import * as i2 from '@angular/cdk/a11y';
19
20
  import { provideNgxMask, NgxMaskDirective } from 'ngx-mask';
20
21
 
@@ -253,15 +254,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.2", ngImpor
253
254
  class LibLoaderComponent {
254
255
  constructor() {
255
256
  this.color = '#07b700';
257
+ this.size = 'standard';
256
258
  }
257
259
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.2", ngImport: i0, type: LibLoaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
258
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.2", type: LibLoaderComponent, isStandalone: true, selector: "dd-lib-loader", inputs: { color: "color" }, ngImport: i0, template: "<div class=\"loader\">\n <svg fill=\"none\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\" xmlns=\"http://www.w3.org/2000/svg\">\n <g clip-path=\"url(#clip0_728_22764)\">\n <path\n [attr.stroke]=\"color\"\n d=\"M12 6V3\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"1.7\" />\n <path\n [attr.stroke]=\"color\"\n d=\"M6 12H3\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\" />\n <path\n [attr.stroke]=\"color\"\n d=\"M7.74961 7.74961L5.59961 5.59961\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\" />\n </g>\n <defs>\n <clipPath id=\"clip0_728_22764\">\n <rect fill=\"white\" height=\"24\" width=\"24\" />\n </clipPath>\n </defs>\n </svg>\n</div>\n", styles: [":host{display:flex;align-items:center;width:100%;justify-content:center;overflow:hidden}.loader{width:24px;height:24px}.loader svg{animation:rotate 1.5s linear infinite}@keyframes rotate{to{transform:rotate(360deg)}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
260
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.2", type: LibLoaderComponent, isStandalone: true, selector: "dd-lib-loader", inputs: { color: "color", size: "size" }, ngImport: i0, template: "<div [class.big]=\"size === 'big'\" [class.giant]=\"size === 'giant'\" class=\"loader\">\n <svg fill=\"none\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\" xmlns=\"http://www.w3.org/2000/svg\">\n <g clip-path=\"url(#clip0_728_22764)\">\n <path\n [attr.stroke]=\"color\"\n d=\"M12 6V3\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"1.7\" />\n <path\n [attr.stroke]=\"color\"\n d=\"M6 12H3\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\" />\n <path\n [attr.stroke]=\"color\"\n d=\"M7.74961 7.74961L5.59961 5.59961\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\" />\n </g>\n <defs>\n <clipPath id=\"clip0_728_22764\">\n <rect fill=\"white\" height=\"24\" width=\"24\" />\n </clipPath>\n </defs>\n </svg>\n</div>\n", styles: [":host{display:flex;align-items:center;width:100%;justify-content:center;overflow:hidden}.loader{width:24px;height:24px}.loader svg{animation:rotate 1.5s linear infinite}.loader.big{zoom:2}.loader.giant{zoom:4}@keyframes rotate{to{transform:rotate(360deg)}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
259
261
  }
260
262
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.2", ngImport: i0, type: LibLoaderComponent, decorators: [{
261
263
  type: Component,
262
- args: [{ selector: 'dd-lib-loader', standalone: true, imports: [], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"loader\">\n <svg fill=\"none\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\" xmlns=\"http://www.w3.org/2000/svg\">\n <g clip-path=\"url(#clip0_728_22764)\">\n <path\n [attr.stroke]=\"color\"\n d=\"M12 6V3\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"1.7\" />\n <path\n [attr.stroke]=\"color\"\n d=\"M6 12H3\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\" />\n <path\n [attr.stroke]=\"color\"\n d=\"M7.74961 7.74961L5.59961 5.59961\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\" />\n </g>\n <defs>\n <clipPath id=\"clip0_728_22764\">\n <rect fill=\"white\" height=\"24\" width=\"24\" />\n </clipPath>\n </defs>\n </svg>\n</div>\n", styles: [":host{display:flex;align-items:center;width:100%;justify-content:center;overflow:hidden}.loader{width:24px;height:24px}.loader svg{animation:rotate 1.5s linear infinite}@keyframes rotate{to{transform:rotate(360deg)}}\n"] }]
264
+ args: [{ selector: 'dd-lib-loader', standalone: true, imports: [], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div [class.big]=\"size === 'big'\" [class.giant]=\"size === 'giant'\" class=\"loader\">\n <svg fill=\"none\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\" xmlns=\"http://www.w3.org/2000/svg\">\n <g clip-path=\"url(#clip0_728_22764)\">\n <path\n [attr.stroke]=\"color\"\n d=\"M12 6V3\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"1.7\" />\n <path\n [attr.stroke]=\"color\"\n d=\"M6 12H3\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\" />\n <path\n [attr.stroke]=\"color\"\n d=\"M7.74961 7.74961L5.59961 5.59961\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\" />\n </g>\n <defs>\n <clipPath id=\"clip0_728_22764\">\n <rect fill=\"white\" height=\"24\" width=\"24\" />\n </clipPath>\n </defs>\n </svg>\n</div>\n", styles: [":host{display:flex;align-items:center;width:100%;justify-content:center;overflow:hidden}.loader{width:24px;height:24px}.loader svg{animation:rotate 1.5s linear infinite}.loader.big{zoom:2}.loader.giant{zoom:4}@keyframes rotate{to{transform:rotate(360deg)}}\n"] }]
263
265
  }], propDecorators: { color: [{
264
266
  type: Input
267
+ }], size: [{
268
+ type: Input
265
269
  }] } });
266
270
 
267
271
  class LibButtonComponent extends LibCommonButtonComponent {
@@ -276,7 +280,7 @@ class LibButtonComponent extends LibCommonButtonComponent {
276
280
  }
277
281
  }
278
282
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.2", ngImport: i0, type: LibButtonComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
279
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.2.2", type: LibButtonComponent, isStandalone: true, selector: "dd-lib-button", inputs: { noPadding: "noPadding", loaderColor: "loaderColor" }, usesInheritance: true, ngImport: i0, template: "<div (click)=\"onClick($event)\" [ngStyle]=\"{width, height}\" class=\"button-container\">\r\n <button\r\n #btn\r\n [attr.tabIndex]=\"disabled ? -1 : 0\"\r\n [autofocus]=\"autofocus\"\r\n [class.active]=\"active\"\r\n [class.disabled]=\"disabled\"\r\n [class.green]=\"btnColor === 'green'\"\r\n [class.loader]=\"showLoader\"\r\n [class.no-padding]=\"noPadding\"\r\n [class.red]=\"btnColor === 'red'\"\r\n [class.transparent]=\"btnColor === 'transparent'\"\r\n [class.white]=\"btnColor === 'white'\"\r\n [class.dark]=\"btnColor === 'dark'\"\r\n [disabled]=\"disabled\"\r\n [ngStyle]=\"{width, height}\"\r\n [type]=\"buttonType\"\r\n class=\"\"\r\n role=\"button\">\r\n @if (!showLoader) {\r\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\r\n } @if (showLoader) {\r\n <dd-lib-loader [color]=\"loaderColor\"></dd-lib-loader>\r\n }\r\n </button>\r\n</div>\r\n\r\n<ng-template #content>\r\n <span #contentData><ng-content></ng-content></span>\r\n</ng-template>\r\n", styles: [".button-container{display:inline-block}.button-container button{display:flex;align-items:center;justify-content:center;height:40px;padding:0 32px;font-size:14px;line-height:24px;font-weight:var(--font-wheit-big);border-radius:12px;outline:none;cursor:pointer;white-space:nowrap;border:none;background-color:var(--btn-green-bgc);color:#fff}@media screen and (max-width: 840px){.button-container button{height:48px}}.button-container button:hover,.button-container button:focus{background-color:var(--btn-green-hover)}.button-container button:active,.button-container button.active{background-color:var(--btn-green-hover)}.button-container button.disabled{color:var(--disabled-color);background-color:var(--btn-disabled-bgc);pointer-events:none;cursor:default}.button-container button.loader{min-width:100px}.button-container button.white{background-color:var(--btn-light-green-bgc);color:var(--btn-white-color)}.button-container button.white:hover{color:var(--btn-white-hover-color)}.button-container button.transparent{background-color:transparent;color:var(--btn-white-color);border:none}.button-container button.transparent:hover{color:var(--btn-white-hover-color)}.button-container button.red{background-color:var(--btn-red-bgc);color:var(--btn-red-color)}.button-container button.red:hover{color:var(--btn-red-hover-color)}.button-container button.dark{background-color:var(--btn-dark-bgc);color:var(--btn-dark-color)}.button-container button.dark:hover{background-color:var(--btn-dark-hover-color)}.button-container button.no-padding{padding:0}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: FormsModule }, { kind: "component", type: LibLoaderComponent, selector: "dd-lib-loader", inputs: ["color"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
283
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.2.2", type: LibButtonComponent, isStandalone: true, selector: "dd-lib-button", inputs: { noPadding: "noPadding", loaderColor: "loaderColor" }, usesInheritance: true, ngImport: i0, template: "<div (click)=\"onClick($event)\" [ngStyle]=\"{width, height}\" class=\"button-container\">\r\n <button\r\n #btn\r\n [attr.tabIndex]=\"disabled ? -1 : 0\"\r\n [autofocus]=\"autofocus\"\r\n [class.active]=\"active\"\r\n [class.disabled]=\"disabled\"\r\n [class.green]=\"btnColor === 'green'\"\r\n [class.loader]=\"showLoader\"\r\n [class.no-padding]=\"noPadding\"\r\n [class.red]=\"btnColor === 'red'\"\r\n [class.transparent]=\"btnColor === 'transparent'\"\r\n [class.white]=\"btnColor === 'white'\"\r\n [class.dark]=\"btnColor === 'dark'\"\r\n [disabled]=\"disabled\"\r\n [ngStyle]=\"{width, height}\"\r\n [type]=\"buttonType\"\r\n class=\"\"\r\n role=\"button\">\r\n @if (!showLoader) {\r\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\r\n } @if (showLoader) {\r\n <dd-lib-loader [color]=\"loaderColor\"></dd-lib-loader>\r\n }\r\n </button>\r\n</div>\r\n\r\n<ng-template #content>\r\n <span #contentData><ng-content></ng-content></span>\r\n</ng-template>\r\n", styles: [".button-container{display:inline-block}.button-container button{display:flex;align-items:center;justify-content:center;height:40px;padding:0 32px;font-size:14px;line-height:24px;font-weight:var(--font-wheit-big);border-radius:12px;outline:none;cursor:pointer;white-space:nowrap;border:none;background-color:var(--btn-green-bgc);color:#fff}@media screen and (max-width: 840px){.button-container button{height:48px}}.button-container button:hover,.button-container button:focus{background-color:var(--btn-green-hover)}.button-container button:active,.button-container button.active{background-color:var(--btn-green-hover)}.button-container button.disabled{color:var(--disabled-color);background-color:var(--btn-disabled-bgc);pointer-events:none;cursor:default}.button-container button.loader{min-width:100px}.button-container button.white{background-color:var(--btn-light-green-bgc);color:var(--btn-white-color)}.button-container button.white:hover{color:var(--btn-white-hover-color)}.button-container button.transparent{background-color:transparent;color:var(--btn-white-color);border:none}.button-container button.transparent:hover{color:var(--btn-white-hover-color)}.button-container button.red{background-color:var(--btn-red-bgc);color:var(--btn-red-color)}.button-container button.red:hover{color:var(--btn-red-hover-color)}.button-container button.dark{background-color:var(--btn-dark-bgc);color:var(--btn-dark-color)}.button-container button.dark:hover{background-color:var(--btn-dark-hover-color)}.button-container button.no-padding{padding:0}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: FormsModule }, { kind: "component", type: LibLoaderComponent, selector: "dd-lib-loader", inputs: ["color", "size"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
280
284
  }
281
285
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.2", ngImport: i0, type: LibButtonComponent, decorators: [{
282
286
  type: Component,
@@ -1245,192 +1249,148 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.2", ngImpor
1245
1249
  args: ['blur']
1246
1250
  }] } });
1247
1251
 
1248
- const TOAST_DATA = new InjectionToken('ToastData');
1249
- class ToastBaseComponent {
1250
- get id() {
1251
- return this.data.id;
1252
- }
1253
- constructor(toastService, ddToastData) {
1254
- this.toastService = toastService;
1255
- this.ddToastData = ddToastData;
1256
- this.callEvent = new EventEmitter();
1257
- this.maxWidth = '350px';
1258
- this.data = { ...this.ddToastData };
1259
- if (this.data.maxWidth) {
1260
- this.maxWidth = this.data.maxWidth;
1261
- }
1262
- this.top = window.scrollY + 'px';
1263
- }
1264
- scroll() {
1265
- this.top = window.scrollY + 'px';
1266
- }
1267
- destroy() {
1268
- this.toastService.destroyToast(this.id);
1269
- }
1270
- onClickDesc($event) {
1271
- if ($event.target.tagName === 'A') {
1272
- this.callEvent.emit();
1273
- }
1274
- }
1275
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.2", ngImport: i0, type: ToastBaseComponent, deps: [{ token: ToastService }, { token: TOAST_DATA }], target: i0.ɵɵFactoryTarget.Component }); }
1276
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.2", type: ToastBaseComponent, isStandalone: true, selector: "dd-toast-base", outputs: { callEvent: "callEvent" }, host: { listeners: { "window:scroll": "scroll()" } }, ngImport: i0, template: "<div (click)=\"destroy()\" class=\"toast-wrapper {{ data.type }}\">\r\n <dd-lib-svg-icon [icon]=\"data.type\"></dd-lib-svg-icon>\r\n <div>\r\n <div>{{ data.title }}</div>\r\n <div>{{ data.description }}</div>\r\n </div>\r\n</div>\r\n", styles: [":host{display:block}.toast-wrapper{display:flex;margin:40px 40px 0 0;align-items:center;padding:20px;background:#eefaf3;border-radius:12px;opacity:1;max-width:350px;animation:fade 1s linear;width:100%}.toast-wrapper.success{background-color:var(--light-green-color)}.toast-wrapper.info{background-color:var(--light-blue-color)}.toast-wrapper.warning{background-color:var(--yellow-card)}.toast-wrapper.danger{background-color:var(--red-light-color)}@keyframes fade{0%{opacity:0}50%{opacity:.5}to{opacity:1}}\n"], dependencies: [{ kind: "component", type: LibSvgIconComponent, selector: "dd-lib-svg-icon", inputs: ["width", "height", "color", "icon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1252
+ class ToastData {
1277
1253
  }
1278
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.2", ngImport: i0, type: ToastBaseComponent, decorators: [{
1279
- type: Component,
1280
- args: [{ selector: 'dd-toast-base', standalone: true, imports: [NgStyle, LibSvgIconComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div (click)=\"destroy()\" class=\"toast-wrapper {{ data.type }}\">\r\n <dd-lib-svg-icon [icon]=\"data.type\"></dd-lib-svg-icon>\r\n <div>\r\n <div>{{ data.title }}</div>\r\n <div>{{ data.description }}</div>\r\n </div>\r\n</div>\r\n", styles: [":host{display:block}.toast-wrapper{display:flex;margin:40px 40px 0 0;align-items:center;padding:20px;background:#eefaf3;border-radius:12px;opacity:1;max-width:350px;animation:fade 1s linear;width:100%}.toast-wrapper.success{background-color:var(--light-green-color)}.toast-wrapper.info{background-color:var(--light-blue-color)}.toast-wrapper.warning{background-color:var(--yellow-card)}.toast-wrapper.danger{background-color:var(--red-light-color)}@keyframes fade{0%{opacity:0}50%{opacity:.5}to{opacity:1}}\n"] }]
1281
- }], ctorParameters: () => [{ type: ToastService }, { type: undefined, decorators: [{
1282
- type: Inject,
1283
- args: [TOAST_DATA]
1284
- }] }], propDecorators: { callEvent: [{
1285
- type: Output
1286
- }], scroll: [{
1287
- type: HostListener,
1288
- args: ['window:scroll']
1289
- }] } });
1290
-
1291
- var ToastType;
1292
- (function (ToastType) {
1293
- ToastType["Warning"] = "warning_t";
1294
- ToastType["Success"] = "success_t";
1295
- ToastType["Info"] = "info_t";
1296
- ToastType["Danger"] = "danger_t";
1297
- })(ToastType || (ToastType = {}));
1298
- class ToastConfig {
1299
- constructor(config) {
1300
- this.timeOut = 5000;
1301
- if (config) {
1302
- Object.keys(config).forEach(key => (this[key] = config[key]));
1254
+ const defaultToastConfig = {
1255
+ position: {
1256
+ top: 20,
1257
+ right: 20,
1258
+ },
1259
+ animation: {
1260
+ fadeOut: 2500,
1261
+ fadeIn: 300,
1262
+ },
1263
+ interval: 5000
1264
+ };
1265
+ const TOAST_CONFIG_TOKEN = new InjectionToken('toast config');
1266
+ const provideToast = (config = defaultToastConfig) => {
1267
+ return [
1268
+ {
1269
+ provide: TOAST_CONFIG_TOKEN,
1270
+ useValue: { ...defaultToastConfig, ...config }
1303
1271
  }
1304
- }
1305
- }
1306
- class ToastService {
1272
+ ];
1273
+ };
1274
+
1275
+ class ToastRef {
1307
1276
  constructor(overlay) {
1308
1277
  this.overlay = overlay;
1309
- this.config = new ToastConfig();
1310
- this.counter = 0;
1311
- this.ddToastData = { type: ToastType.Success, id: this.counter };
1312
- this.overlayRefs = {};
1313
1278
  }
1314
- warning(title, description) {
1315
- this.createToast(title, description, ToastType.Warning);
1279
+ close() {
1280
+ this.overlay.dispose();
1316
1281
  }
1317
- success(title, description) {
1318
- this.createToast(title, description, ToastType.Success);
1282
+ isVisible() {
1283
+ return this.overlay && this.overlay.overlayElement;
1319
1284
  }
1320
- danger(title, description) {
1321
- this.createToast(title, description, ToastType.Danger);
1285
+ getPosition() {
1286
+ return this.overlay.overlayElement.getBoundingClientRect();
1322
1287
  }
1323
- info(title, description) {
1324
- this.createToast(title, description, ToastType.Info);
1288
+ }
1289
+
1290
+ const toastAnimations = {
1291
+ fadeToast: trigger('fadeAnimation', [
1292
+ state('default', style({ opacity: 1 })),
1293
+ transition('void => *', [style({ opacity: 0 }), animate('{{ fadeIn }}ms')]),
1294
+ transition('default => closing', animate('{{ fadeOut }}ms', style({ opacity: 0 }))),
1295
+ ]),
1296
+ };
1297
+
1298
+ class ToastComponent {
1299
+ constructor(data, ref, toastConfig) {
1300
+ this.data = data;
1301
+ this.ref = ref;
1302
+ this.toastConfig = toastConfig;
1303
+ this.animationState = 'default';
1304
+ this.animationState$ = new BehaviorSubject('default');
1325
1305
  }
1326
- registerViewContainerRef(vcRef) {
1327
- this.viewContainer = vcRef;
1306
+ ngOnInit() {
1307
+ this.intervalId = setTimeout(() => this.animationState$.next('closing'), this.toastConfig.interval);
1328
1308
  }
1329
- registerInjector(injector) {
1330
- this.injector = injector;
1309
+ ngOnDestroy() {
1310
+ clearTimeout(this.intervalId);
1331
1311
  }
1332
- destroyToast(id) {
1333
- if (this.overlayRefs?.[id].hasAttached() === true) {
1334
- this.overlayRefs?.[id].detach();
1312
+ close() {
1313
+ this.ref.close();
1314
+ }
1315
+ onFadeFinished(event) {
1316
+ const { toState } = event;
1317
+ const isFadeOut = toState === 'closing';
1318
+ const itFinished = this.animationState$.getValue() === 'closing';
1319
+ if (isFadeOut && itFinished) {
1320
+ this.close();
1335
1321
  }
1336
1322
  }
1337
- createToast(title, description, type) {
1338
- const positionStrategy = this.getPositionStrategy();
1339
- // this.overlayRef = this.overlay.create({ positionStrategy });
1340
- this.overlayRefs[this.counter] = this.overlay.create({ positionStrategy });
1341
- this.ddToastData.title = title;
1342
- this.ddToastData.description = description;
1343
- this.ddToastData.type = type;
1344
- this.ddToastData.id = this.counter;
1345
- const injector = Injector.create({
1346
- providers: [
1347
- {
1348
- provide: TOAST_DATA,
1349
- useValue: this.ddToastData,
1350
- },
1351
- ],
1352
- parent: this.injector,
1353
- });
1354
- const component = new ComponentPortal(ToastBaseComponent, this.viewContainer, injector);
1355
- // this.overlayRef.attach(component);
1356
- this.overlayRefs[this.counter].attach(component);
1357
- setTimeout(() => {
1358
- for (const id in this.overlayRefs) {
1359
- if (this.overlayRefs[id]?.hasAttached()) {
1360
- this.overlayRefs[id]?.detach();
1361
- }
1323
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.2", ngImport: i0, type: ToastComponent, deps: [{ token: ToastData }, { token: ToastRef }, { token: TOAST_CONFIG_TOKEN }], target: i0.ɵɵFactoryTarget.Component }); }
1324
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.2.2", type: ToastComponent, isStandalone: true, selector: "dd-toast", providers: [
1325
+ {
1326
+ provide: TOAST_CONFIG_TOKEN,
1327
+ useValue: defaultToastConfig,
1362
1328
  }
1363
- // if (this.overlayRef?.hasAttached() === true) {
1364
- // this.overlayRef?.detach();
1365
- // }
1366
- }, this.config.timeOut);
1367
- this.counter++;
1329
+ ], ngImport: i0, template: "<div class=\"toast {{ data.type }}\" (click)=\"close()\"\r\n [@fadeAnimation]=\"{value: (animationState$ | async), params:\r\n { fadeIn: toastConfig!.animation!.fadeIn, fadeOut: toastConfig!.animation!.fadeOut }}\"\r\n (@fadeAnimation.done)=\"onFadeFinished($event)\">\r\n<!-- <dd-lib-svg-icon [icon]=\"data.type\"></dd-lib-svg-icon>-->\r\n @if (data.type === 'success') {\r\n <svg fill=\"none\" height=\"16\" viewBox=\"0 0 16 16\" width=\"16\" xmlns=\"http://www.w3.org/2000/svg\">\r\n <path\r\n d=\"M8 0C3.592 0 0 3.592 0 8C0 12.408 3.592 16 8 16C12.408 16 16 12.408 16 8C16 3.592 12.408 0 8 0ZM11.824 6.16L7.288 10.696C7.176 10.808 7.024 10.872 6.864 10.872C6.704 10.872 6.552 10.808 6.44 10.696L4.176 8.432C3.944 8.2 3.944 7.816 4.176 7.584C4.408 7.352 4.792 7.352 5.024 7.584L6.864 9.424L10.976 5.312C11.208 5.08 11.592 5.08 11.824 5.312C12.056 5.544 12.056 5.92 11.824 6.16Z\"\r\n fill=\"#07B700\"/>\r\n </svg>\r\n }\r\n @if (data.type === 'warning') {\r\n <svg fill=\"none\" height=\"16\" viewBox=\"0 0 16 16\" width=\"16\" xmlns=\"http://www.w3.org/2000/svg\">\r\n <path\r\n d=\"M8 0C3.592 0 0 3.592 0 8C0 12.408 3.592 16 8 16C12.408 16 16 12.408 16 8C16 3.592 12.408 0 8 0ZM7.4 4.8C7.4 4.472 7.672 4.2 8 4.2C8.328 4.2 8.6 4.472 8.6 4.8V8.8C8.6 9.128 8.328 9.4 8 9.4C7.672 9.4 7.4 9.128 7.4 8.8V4.8ZM8.736 11.504C8.696 11.608 8.64 11.688 8.568 11.768C8.488 11.84 8.4 11.896 8.304 11.936C8.208 11.976 8.104 12 8 12C7.896 12 7.792 11.976 7.696 11.936C7.6 11.896 7.512 11.84 7.432 11.768C7.36 11.688 7.304 11.608 7.264 11.504C7.224 11.408 7.2 11.304 7.2 11.2C7.2 11.096 7.224 10.992 7.264 10.896C7.304 10.8 7.36 10.712 7.432 10.632C7.512 10.56 7.6 10.504 7.696 10.464C7.888 10.384 8.112 10.384 8.304 10.464C8.4 10.504 8.488 10.56 8.568 10.632C8.64 10.712 8.696 10.8 8.736 10.896C8.776 10.992 8.8 11.096 8.8 11.2C8.8 11.304 8.776 11.408 8.736 11.504Z\"\r\n fill=\"#FAAD14\"/>\r\n </svg>\r\n\r\n }\r\n @if (data.type === 'danger') {\r\n <svg fill=\"none\" height=\"16\" viewBox=\"0 0 16 16\" width=\"16\" xmlns=\"http://www.w3.org/2000/svg\">\r\n <path\r\n d=\"M8 0C3.592 0 0 3.592 0 8C0 12.408 3.592 16 8 16C12.408 16 16 12.408 16 8C16 3.592 12.408 0 8 0ZM10.688 9.84C10.92 10.072 10.92 10.456 10.688 10.688C10.568 10.808 10.416 10.864 10.264 10.864C10.112 10.864 9.96 10.808 9.84 10.688L8 8.848L6.16 10.688C6.04 10.808 5.888 10.864 5.736 10.864C5.584 10.864 5.432 10.808 5.312 10.688C5.08 10.456 5.08 10.072 5.312 9.84L7.152 8L5.312 6.16C5.08 5.928 5.08 5.544 5.312 5.312C5.544 5.08 5.928 5.08 6.16 5.312L8 7.152L9.84 5.312C10.072 5.08 10.456 5.08 10.688 5.312C10.92 5.544 10.92 5.928 10.688 6.16L8.848 8L10.688 9.84Z\"\r\n fill=\"#FF3645\"/>\r\n </svg>\r\n\r\n }\r\n @if (data.type === 'info') {\r\n <svg fill=\"none\" height=\"16\" viewBox=\"0 0 16 16\" width=\"16\" xmlns=\"http://www.w3.org/2000/svg\">\r\n <path\r\n d=\"M8 16C12.408 16 16 12.408 16 8C16 3.592 12.408 0 8 0C3.592 0 0 3.592 0 8C0 12.408 3.592 16 8 16ZM8.6 11.2C8.6 11.528 8.328 11.8 8 11.8C7.672 11.8 7.4 11.528 7.4 11.2V7.2C7.4 6.872 7.672 6.6 8 6.6C8.328 6.6 8.6 6.872 8.6 7.2L8.6 11.2ZM7.264 4.496C7.304 4.392 7.36 4.312 7.432 4.232C7.512 4.16 7.6 4.104 7.696 4.064C7.792 4.024 7.896 4 8 4C8.104 4 8.208 4.024 8.304 4.064C8.4 4.104 8.488 4.16 8.568 4.232C8.64 4.312 8.696 4.392 8.736 4.496C8.776 4.592 8.8 4.696 8.8 4.8C8.8 4.904 8.776 5.008 8.736 5.104C8.696 5.2 8.64 5.288 8.568 5.368C8.488 5.44 8.4 5.496 8.304 5.536C8.112 5.616 7.888 5.616 7.696 5.536C7.6 5.496 7.512 5.44 7.432 5.368C7.36 5.288 7.304 5.2 7.264 5.104C7.224 5.008 7.2 4.904 7.2 4.8C7.2 4.696 7.224 4.592 7.264 4.496Z\"\r\n fill=\"#007BFB\"/>\r\n </svg>\r\n\r\n }\r\n <div class=\"ml-24\">\r\n <div>{{ data.title }}</div>\r\n <div>{{ data.description }}</div>\r\n </div>\r\n</div>\r\n", styles: [":host{display:block}.toast{position:relative;margin-bottom:20px;display:flex;align-items:center;padding:20px;background:#eefaf3;border-radius:12px;opacity:1;max-width:350px;width:100%}.toast.success{background-color:var(--light-green-color)}.toast.info{background-color:var(--light-blue-color)}.toast.warning{background-color:var(--yellow-card)}.toast.danger{background-color:var(--red-light-color)}\n"], dependencies: [{ kind: "ngmodule", type: OverlayModule }, { kind: "pipe", type: AsyncPipe, name: "async" }], animations: [toastAnimations.fadeToast], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1330
+ }
1331
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.2", ngImport: i0, type: ToastComponent, decorators: [{
1332
+ type: Component,
1333
+ args: [{ selector: 'dd-toast', standalone: true, imports: [
1334
+ OverlayModule,
1335
+ AsyncPipe,
1336
+ ], providers: [
1337
+ {
1338
+ provide: TOAST_CONFIG_TOKEN,
1339
+ useValue: defaultToastConfig,
1340
+ }
1341
+ ], animations: [toastAnimations.fadeToast], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"toast {{ data.type }}\" (click)=\"close()\"\r\n [@fadeAnimation]=\"{value: (animationState$ | async), params:\r\n { fadeIn: toastConfig!.animation!.fadeIn, fadeOut: toastConfig!.animation!.fadeOut }}\"\r\n (@fadeAnimation.done)=\"onFadeFinished($event)\">\r\n<!-- <dd-lib-svg-icon [icon]=\"data.type\"></dd-lib-svg-icon>-->\r\n @if (data.type === 'success') {\r\n <svg fill=\"none\" height=\"16\" viewBox=\"0 0 16 16\" width=\"16\" xmlns=\"http://www.w3.org/2000/svg\">\r\n <path\r\n d=\"M8 0C3.592 0 0 3.592 0 8C0 12.408 3.592 16 8 16C12.408 16 16 12.408 16 8C16 3.592 12.408 0 8 0ZM11.824 6.16L7.288 10.696C7.176 10.808 7.024 10.872 6.864 10.872C6.704 10.872 6.552 10.808 6.44 10.696L4.176 8.432C3.944 8.2 3.944 7.816 4.176 7.584C4.408 7.352 4.792 7.352 5.024 7.584L6.864 9.424L10.976 5.312C11.208 5.08 11.592 5.08 11.824 5.312C12.056 5.544 12.056 5.92 11.824 6.16Z\"\r\n fill=\"#07B700\"/>\r\n </svg>\r\n }\r\n @if (data.type === 'warning') {\r\n <svg fill=\"none\" height=\"16\" viewBox=\"0 0 16 16\" width=\"16\" xmlns=\"http://www.w3.org/2000/svg\">\r\n <path\r\n d=\"M8 0C3.592 0 0 3.592 0 8C0 12.408 3.592 16 8 16C12.408 16 16 12.408 16 8C16 3.592 12.408 0 8 0ZM7.4 4.8C7.4 4.472 7.672 4.2 8 4.2C8.328 4.2 8.6 4.472 8.6 4.8V8.8C8.6 9.128 8.328 9.4 8 9.4C7.672 9.4 7.4 9.128 7.4 8.8V4.8ZM8.736 11.504C8.696 11.608 8.64 11.688 8.568 11.768C8.488 11.84 8.4 11.896 8.304 11.936C8.208 11.976 8.104 12 8 12C7.896 12 7.792 11.976 7.696 11.936C7.6 11.896 7.512 11.84 7.432 11.768C7.36 11.688 7.304 11.608 7.264 11.504C7.224 11.408 7.2 11.304 7.2 11.2C7.2 11.096 7.224 10.992 7.264 10.896C7.304 10.8 7.36 10.712 7.432 10.632C7.512 10.56 7.6 10.504 7.696 10.464C7.888 10.384 8.112 10.384 8.304 10.464C8.4 10.504 8.488 10.56 8.568 10.632C8.64 10.712 8.696 10.8 8.736 10.896C8.776 10.992 8.8 11.096 8.8 11.2C8.8 11.304 8.776 11.408 8.736 11.504Z\"\r\n fill=\"#FAAD14\"/>\r\n </svg>\r\n\r\n }\r\n @if (data.type === 'danger') {\r\n <svg fill=\"none\" height=\"16\" viewBox=\"0 0 16 16\" width=\"16\" xmlns=\"http://www.w3.org/2000/svg\">\r\n <path\r\n d=\"M8 0C3.592 0 0 3.592 0 8C0 12.408 3.592 16 8 16C12.408 16 16 12.408 16 8C16 3.592 12.408 0 8 0ZM10.688 9.84C10.92 10.072 10.92 10.456 10.688 10.688C10.568 10.808 10.416 10.864 10.264 10.864C10.112 10.864 9.96 10.808 9.84 10.688L8 8.848L6.16 10.688C6.04 10.808 5.888 10.864 5.736 10.864C5.584 10.864 5.432 10.808 5.312 10.688C5.08 10.456 5.08 10.072 5.312 9.84L7.152 8L5.312 6.16C5.08 5.928 5.08 5.544 5.312 5.312C5.544 5.08 5.928 5.08 6.16 5.312L8 7.152L9.84 5.312C10.072 5.08 10.456 5.08 10.688 5.312C10.92 5.544 10.92 5.928 10.688 6.16L8.848 8L10.688 9.84Z\"\r\n fill=\"#FF3645\"/>\r\n </svg>\r\n\r\n }\r\n @if (data.type === 'info') {\r\n <svg fill=\"none\" height=\"16\" viewBox=\"0 0 16 16\" width=\"16\" xmlns=\"http://www.w3.org/2000/svg\">\r\n <path\r\n d=\"M8 16C12.408 16 16 12.408 16 8C16 3.592 12.408 0 8 0C3.592 0 0 3.592 0 8C0 12.408 3.592 16 8 16ZM8.6 11.2C8.6 11.528 8.328 11.8 8 11.8C7.672 11.8 7.4 11.528 7.4 11.2V7.2C7.4 6.872 7.672 6.6 8 6.6C8.328 6.6 8.6 6.872 8.6 7.2L8.6 11.2ZM7.264 4.496C7.304 4.392 7.36 4.312 7.432 4.232C7.512 4.16 7.6 4.104 7.696 4.064C7.792 4.024 7.896 4 8 4C8.104 4 8.208 4.024 8.304 4.064C8.4 4.104 8.488 4.16 8.568 4.232C8.64 4.312 8.696 4.392 8.736 4.496C8.776 4.592 8.8 4.696 8.8 4.8C8.8 4.904 8.776 5.008 8.736 5.104C8.696 5.2 8.64 5.288 8.568 5.368C8.488 5.44 8.4 5.496 8.304 5.536C8.112 5.616 7.888 5.616 7.696 5.536C7.6 5.496 7.512 5.44 7.432 5.368C7.36 5.288 7.304 5.2 7.264 5.104C7.224 5.008 7.2 4.904 7.2 4.8C7.2 4.696 7.224 4.592 7.264 4.496Z\"\r\n fill=\"#007BFB\"/>\r\n </svg>\r\n\r\n }\r\n <div class=\"ml-24\">\r\n <div>{{ data.title }}</div>\r\n <div>{{ data.description }}</div>\r\n </div>\r\n</div>\r\n", styles: [":host{display:block}.toast{position:relative;margin-bottom:20px;display:flex;align-items:center;padding:20px;background:#eefaf3;border-radius:12px;opacity:1;max-width:350px;width:100%}.toast.success{background-color:var(--light-green-color)}.toast.info{background-color:var(--light-blue-color)}.toast.warning{background-color:var(--yellow-card)}.toast.danger{background-color:var(--red-light-color)}\n"] }]
1342
+ }], ctorParameters: () => [{ type: ToastData }, { type: ToastRef }, { type: undefined, decorators: [{
1343
+ type: Inject,
1344
+ args: [TOAST_CONFIG_TOKEN]
1345
+ }] }] });
1346
+
1347
+ class ToastService {
1348
+ constructor(overlay, parentInjector, toastConfig) {
1349
+ this.overlay = overlay;
1350
+ this.parentInjector = parentInjector;
1351
+ this.toastConfig = toastConfig;
1368
1352
  }
1369
- getPositionStrategy() {
1370
- let element;
1371
- let positions;
1372
- const haveToast = document.getElementsByClassName('cdk-overlay-pane');
1373
- if (haveToast.length) {
1374
- element = haveToast[haveToast.length - 1];
1375
- positions = [
1376
- {
1377
- originX: 'start',
1378
- originY: 'bottom',
1379
- overlayX: 'start',
1380
- overlayY: 'top',
1381
- panelClass: 'toast-top',
1382
- },
1383
- ];
1384
- }
1385
- else {
1386
- element = document.getElementsByTagName('body')[0];
1387
- positions = [
1388
- {
1389
- originX: 'end',
1390
- originY: 'top',
1391
- overlayX: 'end',
1392
- overlayY: 'top',
1393
- panelClass: '',
1394
- },
1395
- ];
1396
- }
1397
- return this.overlay.position().flexibleConnectedTo(element).withPositions(positions);
1353
+ show(data) {
1354
+ const positionStrategy = this.getPositionStrategy();
1355
+ const overlayRef = this.overlay.create({ positionStrategy });
1356
+ const toastRef = new ToastRef(overlayRef);
1357
+ this.lastToast = toastRef;
1358
+ const injector = this.getInjector(data, toastRef, this.parentInjector);
1359
+ const toastPortal = new ComponentPortal(ToastComponent, null, injector);
1360
+ overlayRef.attach(toastPortal);
1361
+ return toastRef;
1398
1362
  }
1399
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.2", ngImport: i0, type: ToastService, deps: [{ token: i1$4.Overlay }], target: i0.ɵɵFactoryTarget.Injectable }); }
1363
+ getPositionStrategy() {
1364
+ return this.overlay.position()
1365
+ .global()
1366
+ .top(this.getPosition())
1367
+ .right(this.toastConfig?.position?.right + 'px');
1368
+ }
1369
+ getPosition() {
1370
+ const lastToastIsVisible = this.lastToast && this.lastToast.isVisible();
1371
+ const position = lastToastIsVisible
1372
+ ? this.lastToast?.getPosition().bottom
1373
+ : this.toastConfig?.position?.top;
1374
+ return position + 'px';
1375
+ }
1376
+ getInjector(data, toastRef, parentInjector) {
1377
+ const tokens = new WeakMap();
1378
+ tokens.set(ToastData, data);
1379
+ tokens.set(ToastRef, toastRef);
1380
+ return new PortalInjector(parentInjector, tokens);
1381
+ }
1382
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.2", ngImport: i0, type: ToastService, deps: [{ token: i1$4.Overlay }, { token: i0.Injector }, { token: TOAST_CONFIG_TOKEN }], target: i0.ɵɵFactoryTarget.Injectable }); }
1400
1383
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.2.2", ngImport: i0, type: ToastService, providedIn: 'root' }); }
1401
1384
  }
1402
1385
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.2", ngImport: i0, type: ToastService, decorators: [{
1403
1386
  type: Injectable,
1404
1387
  args: [{
1405
- providedIn: 'root',
1406
- }]
1407
- }], ctorParameters: () => [{ type: i1$4.Overlay }] });
1408
-
1409
- class ToastPlaceholderComponent {
1410
- constructor(toastService, injector) {
1411
- this.toastService = toastService;
1412
- this.injector = injector;
1413
- }
1414
- ngOnInit() {
1415
- this.toastService.registerViewContainerRef(this.viewContainerRef);
1416
- this.toastService.registerInjector(this.injector);
1417
- }
1418
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.2", ngImport: i0, type: ToastPlaceholderComponent, deps: [{ token: ToastService }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component }); }
1419
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.2", type: ToastPlaceholderComponent, isStandalone: true, selector: "dd-toast-placeholder", viewQueries: [{ propertyName: "viewContainerRef", first: true, predicate: ["toastPlaceholder"], descendants: true, read: ViewContainerRef, static: true }], ngImport: i0, template: ` <div #toastPlaceholder></div>
1420
- <div id="toast-overlay"></div>`, isInline: true }); }
1421
- }
1422
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.2", ngImport: i0, type: ToastPlaceholderComponent, decorators: [{
1423
- type: Component,
1424
- args: [{
1425
- selector: 'dd-toast-placeholder',
1426
- standalone: true,
1427
- template: ` <div #toastPlaceholder></div>
1428
- <div id="toast-overlay"></div>`,
1388
+ providedIn: 'root'
1429
1389
  }]
1430
- }], ctorParameters: () => [{ type: ToastService }, { type: i0.Injector }], propDecorators: { viewContainerRef: [{
1431
- type: ViewChild,
1432
- args: ['toastPlaceholder', { read: ViewContainerRef, static: true }]
1433
- }] } });
1390
+ }], ctorParameters: () => [{ type: i1$4.Overlay }, { type: i0.Injector }, { type: undefined, decorators: [{
1391
+ type: Inject,
1392
+ args: [TOAST_CONFIG_TOKEN]
1393
+ }] }] });
1434
1394
 
1435
1395
  class DDDialogRef {
1436
1396
  constructor(overlayRef) {
@@ -1450,7 +1410,7 @@ class DDDialogRef {
1450
1410
  }
1451
1411
  }
1452
1412
 
1453
- const DIALOG_CONFIG = new InjectionToken('Default options');
1413
+ const DIALOG_CONFIG = new InjectionToken('dialog config');
1454
1414
  class DialogConfig {
1455
1415
  constructor(config) {
1456
1416
  this.hasBackdrop = true;
@@ -2604,7 +2564,7 @@ class LibSearchInputComponent extends LibCommonInputTextComponent {
2604
2564
  return item[this.keyDesc];
2605
2565
  }
2606
2566
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.2", ngImport: i0, type: LibSearchInputComponent, deps: [{ token: DestroyService }, { token: i0.ChangeDetectorRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
2607
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.2.2", type: LibSearchInputComponent, isStandalone: true, selector: "dd-lib-search-input", inputs: { keyTitle: "keyTitle", keyDesc: "keyDesc", styleInput: "styleInput", inputStyle: "inputStyle", fetchMode: "fetchMode", searchData: "searchData", debounceTime: "debounceTime", delay: "delay", idClose: "idClose", loaded$: "loaded$" }, outputs: { keyupEvent: "keyupEvent", selectedItem: "selectedItem" }, providers: [DestroyService], usesInheritance: true, ngImport: i0, template: "<div class=\"lib-search-input\">\r\n <label [for]=\"id\" class=\"lib-search-input__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 <div class=\"pos-relative\">\r\n <dd-lib-svg-icon (click)=\"forceChange()\" class=\"search-icon\" icon=\"search\"></dd-lib-svg-icon>\r\n <input\r\n #searchInput\r\n (keyup)=\"keyUp.next($event)\"\r\n (keyup.enter)=\"forceChange()\"\r\n [(ngModel)]=\"value\"\r\n [attr.autocomplete]=\"autocomplete === undefined ? null : autocomplete\"\r\n [attr.id]=\"id ? id : null\"\r\n [attr.maxlength]=\"maxlength\"\r\n [attr.minlength]=\"minlength\"\r\n [attr.name]=\"name\"\r\n [attr.placeholder]=\"placeholder\"\r\n [attr.tabIndex]=\"tabIndex\"\r\n [attr.type]=\"type || 'text'\"\r\n [class.focused]=\"focused\"\r\n [class.round]=\"styleInput === 'round'\"\r\n [class.white]=\"inputStyle === 'white'\"\r\n [disabled]=\"disabled\"\r\n [readOnly]=\"readOnly\"\r\n class=\"search-input\" />\r\n <dd-lib-svg-icon\r\n (click)=\"onClear()\"\r\n [id]=\"idClose\" [style.display]=\"value?.length ? 'block' : 'none'\"\r\n class=\"clear-icon\" icon=\"clear\"></dd-lib-svg-icon>\r\n @if (loaded$ | async) {\r\n <div class=\"loading-icon\">\r\n <dd-lib-loader></dd-lib-loader>\r\n </div>\r\n }\r\n </div>\r\n\r\n @if (data?.length) {\r\n <dd-lib-card [class.top]=\"side === 'top'\">\r\n @for (item of data; track item) {\r\n <div (click)=\"onClickSearchItem(item)\" class=\"search-result\">\r\n @if (getTitle(item); as title) {\r\n <div [innerHTML]=\"title | highlight: value | safe: 'html'\" class=\"search-result__title\"></div>\r\n } @if (getDesc(item); as desc) {\r\n <div [innerHTML]=\"desc | highlight: value | safe: 'html'\" class=\"search-result__desc\"></div>\r\n }\r\n </div>\r\n }\r\n </dd-lib-card>\r\n }\r\n</div>\r\n", styles: [":host{display:block}.lib-search-input{position:relative}.lib-search-input__title{margin-bottom:4px;font-size:14px;line-height:24px;display:flex;align-items:flex-start}.lib-search-input input{width:100%;height:48px;padding:16px 16px 15px 44px;border-radius:8px;border:none;background-color:var(--input-gray-bgc)}.lib-search-input input.white{background-color:var(--white-color);border:1px solid var(--primary-gray-color)}.lib-search-input .round{border-radius:24px}.lib-search-input .search-icon{position:absolute;left:16px;top:14px;cursor:pointer}.lib-search-input .clear-icon{position:absolute;right:16px;top:14px;cursor:pointer}.lib-search-input .loading-icon{position:absolute;right:40px;top:12px}.lib-search-input .search-result{font-size:16px;font-weight:400;line-height:24px;letter-spacing:0;text-align:left;cursor:pointer}.lib-search-input .search-result:hover{opacity:.8}.lib-search-input .search-result:last-child .search-result__desc{border:none;padding-bottom:0}.lib-search-input .search-result__title{color:var(--second-gray-color);margin:24px 0 2px}.lib-search-input .search-result__desc{padding-bottom:16px;border-bottom:1px solid var(--gray-color-200)}.lib-search-input dd-lib-card{position:absolute;display:block;top:76px;z-index:100;width:100%;max-height:400px;box-shadow:var(--main-card-shadow);overflow:auto}.lib-search-input dd-lib-card.top{bottom:50px;top:unset}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$5.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: LibCardComponent, selector: "dd-lib-card", inputs: ["type", "footerBtn", "sHeight", "skeleton", "parentLvlForSkeleton", "plugs", "borderRadius"], outputs: ["cardBtnEvent"] }, { kind: "pipe", type: HighlightPipe, name: "highlight" }, { kind: "pipe", type: SafePipe, name: "safe" }, { kind: "component", type: LibSvgIconComponent, selector: "dd-lib-svg-icon", inputs: ["width", "height", "color", "icon"] }, { kind: "component", type: LibLoaderComponent, selector: "dd-lib-loader", inputs: ["color"] }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2567
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.2.2", type: LibSearchInputComponent, isStandalone: true, selector: "dd-lib-search-input", inputs: { keyTitle: "keyTitle", keyDesc: "keyDesc", styleInput: "styleInput", inputStyle: "inputStyle", fetchMode: "fetchMode", searchData: "searchData", debounceTime: "debounceTime", delay: "delay", idClose: "idClose", loaded$: "loaded$" }, outputs: { keyupEvent: "keyupEvent", selectedItem: "selectedItem" }, providers: [DestroyService], usesInheritance: true, ngImport: i0, template: "<div class=\"lib-search-input\">\r\n <label [for]=\"id\" class=\"lib-search-input__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 <div class=\"pos-relative\">\r\n <dd-lib-svg-icon (click)=\"forceChange()\" class=\"search-icon\" icon=\"search\"></dd-lib-svg-icon>\r\n <input\r\n #searchInput\r\n (keyup)=\"keyUp.next($event)\"\r\n (keyup.enter)=\"forceChange()\"\r\n [(ngModel)]=\"value\"\r\n [attr.autocomplete]=\"autocomplete === undefined ? null : autocomplete\"\r\n [attr.id]=\"id ? id : null\"\r\n [attr.maxlength]=\"maxlength\"\r\n [attr.minlength]=\"minlength\"\r\n [attr.name]=\"name\"\r\n [attr.placeholder]=\"placeholder\"\r\n [attr.tabIndex]=\"tabIndex\"\r\n [attr.type]=\"type || 'text'\"\r\n [class.focused]=\"focused\"\r\n [class.round]=\"styleInput === 'round'\"\r\n [class.white]=\"inputStyle === 'white'\"\r\n [disabled]=\"disabled\"\r\n [readOnly]=\"readOnly\"\r\n class=\"search-input\" />\r\n <dd-lib-svg-icon\r\n (click)=\"onClear()\"\r\n [id]=\"idClose\" [style.display]=\"value?.length ? 'block' : 'none'\"\r\n class=\"clear-icon\" icon=\"clear\"></dd-lib-svg-icon>\r\n @if (loaded$ | async) {\r\n <div class=\"loading-icon\">\r\n <dd-lib-loader></dd-lib-loader>\r\n </div>\r\n }\r\n </div>\r\n\r\n @if (data?.length) {\r\n <dd-lib-card [class.top]=\"side === 'top'\">\r\n @for (item of data; track item) {\r\n <div (click)=\"onClickSearchItem(item)\" class=\"search-result\">\r\n @if (getTitle(item); as title) {\r\n <div [innerHTML]=\"title | highlight: value | safe: 'html'\" class=\"search-result__title\"></div>\r\n } @if (getDesc(item); as desc) {\r\n <div [innerHTML]=\"desc | highlight: value | safe: 'html'\" class=\"search-result__desc\"></div>\r\n }\r\n </div>\r\n }\r\n </dd-lib-card>\r\n }\r\n</div>\r\n", styles: [":host{display:block}.lib-search-input{position:relative}.lib-search-input__title{margin-bottom:4px;font-size:14px;line-height:24px;display:flex;align-items:flex-start}.lib-search-input input{width:100%;height:48px;padding:16px 16px 15px 44px;border-radius:8px;border:none;background-color:var(--input-gray-bgc)}.lib-search-input input.white{background-color:var(--white-color);border:1px solid var(--primary-gray-color)}.lib-search-input .round{border-radius:24px}.lib-search-input .search-icon{position:absolute;left:16px;top:14px;cursor:pointer}.lib-search-input .clear-icon{position:absolute;right:16px;top:14px;cursor:pointer}.lib-search-input .loading-icon{position:absolute;right:40px;top:12px}.lib-search-input .search-result{font-size:16px;font-weight:400;line-height:24px;letter-spacing:0;text-align:left;cursor:pointer}.lib-search-input .search-result:hover{opacity:.8}.lib-search-input .search-result:last-child .search-result__desc{border:none;padding-bottom:0}.lib-search-input .search-result__title{color:var(--second-gray-color);margin:24px 0 2px}.lib-search-input .search-result__desc{padding-bottom:16px;border-bottom:1px solid var(--gray-color-200)}.lib-search-input dd-lib-card{position:absolute;display:block;top:76px;z-index:100;width:100%;max-height:400px;box-shadow:var(--main-card-shadow);overflow:auto}.lib-search-input dd-lib-card.top{bottom:50px;top:unset}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$5.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: LibCardComponent, selector: "dd-lib-card", inputs: ["type", "footerBtn", "sHeight", "skeleton", "parentLvlForSkeleton", "plugs", "borderRadius"], outputs: ["cardBtnEvent"] }, { kind: "pipe", type: HighlightPipe, name: "highlight" }, { kind: "pipe", type: SafePipe, name: "safe" }, { kind: "component", type: LibSvgIconComponent, selector: "dd-lib-svg-icon", inputs: ["width", "height", "color", "icon"] }, { kind: "component", type: LibLoaderComponent, selector: "dd-lib-loader", inputs: ["color", "size"] }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2608
2568
  }
2609
2569
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.2", ngImport: i0, type: LibSearchInputComponent, decorators: [{
2610
2570
  type: Component,
@@ -2775,7 +2735,7 @@ class LibSelectComponent extends LibCommonInputTextComponent {
2775
2735
  useExisting: forwardRef(() => LibSelectComponent),
2776
2736
  multi: true,
2777
2737
  },
2778
- ], usesInheritance: true, ngImport: i0, template: "<div class=\"lib-select\" id=\"lib-select-{{ selectId }}\">\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 <div class=\"pos-relative\">\n <input\n #select\n (change)=\"handleChange()\"\n (click)=\"notifyFocusEvent($event)\"\n (input)=\"handleInput($event)\"\n [(ngModel)]=\"inputValue\"\n [attr.id]=\"selectId\"\n [attr.name]=\"name\"\n [attr.placeholder]=\"placeholder\"\n [attr.tabIndex]=\"tabIndex\"\n [attr.type]=\"'text'\"\n [class.focused]=\"focused\"\n [class.invalid]=\"invalid\"\n [disabled]=\"disabled\"\n [readOnly]=\"readOnly\"\n [title]=\"inputValue\"\n class=\"text-select\" />\n <!-- (blur)=\"notifyFocusEvent($event)\"-->\n @if (!checkedItem) {\n <dd-lib-svg-icon\n (click)=\"notifyFocusEvent($event)\"\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\n } @else {\n <dd-lib-svg-icon\n (click)=\"selectItem(checkedItem)\"\n class=\"clear\"\n id=\"chevron-{{ selectId }}\" icon=\"clear\"></dd-lib-svg-icon>\n\n }\n </div>\n\n @if (errorText && invalid) {\n <div class=\"lib-select__error\">{{ errorText }}</div>\n } @if (isShownList) {\n <div\n (ddClickOutside)=\"notifyFocusEvent($event)\"\n [elements]=\"['lib-select-' + selectId, 'chevron' + selectId]\"\n [class.top]=\"side === 'top'\"\n class=\"select-list-wrapper\">\n @if (data?.length) { @for (item of data | filterByKey: filterList.bind(this); track item) {\n <div\n (click)=\"selectItem(item)\"\n [class.active]=\"checkSelected(item)\"\n class=\"select-data\">\n\n @if (!keyDesc && !keyTitle) {\n <div [innerHTML]=\"item | highlight: inputValue | safe: 'html'\" class=\"select-data__title\"></div>\n } @if (keyTitle) {\n <div\n [innerHTML]=\"item[keyTitle!] | highlight: inputValue | safe: 'html'\"\n class=\"select-data__title\"></div>\n } @if (keyDesc) {\n <div\n [innerHTML]=\"item[keyDesc!] | highlight: inputValue | safe: 'html'\"\n [title]=\"item[keyDesc]\"\n class=\"select-data__desc\"></div>\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 } } @else {\n <div class=\"select-loader\">\n <dd-lib-loader></dd-lib-loader>\n </div>\n }\n </div>\n }\n</div>\n", styles: [".lib-select{position:relative}.lib-select 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-select input:hover{border-color:var(--input-active-border-colort)}.lib-select input:focus{border-color:var(--input-active-border-colort);box-shadow:var(--input-active-border-shadow)}.lib-select input:disabled{border:none;background-color:var(--input-disable-input);color:var(--input-disable-text);pointer-events:none}.lib-select input:disabled::placeholder{color:var(--input-placeholder)}.lib-select input.invalid,.lib-select input.invalid:hover{border-color:var(--input-error-border-color)}.lib-select input.invalid:focus{border-color:var(--input-error-border-color);box-shadow:var(--input-error-border-shadow)}.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}.lib-select__error{color:var(--primary-red-color);font-size:12px;font-weight:400;line-height:10px;margin-top:2px}.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.top{bottom:50px;top:unset}.lib-select .select-list-wrapper .select-data{padding:12px 42px 12px 16px;cursor:pointer;position:relative}.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:hover,.lib-select .select-list-wrapper .select-data.active{background:var(--select-act-hov-bgc)}.lib-select .select-list-wrapper .select-data.active .checked{position:absolute;right:16px;top:10px}.lib-select .select-list-wrapper .select-loader{padding:24px}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$5.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "pipe", type: HighlightPipe, name: "highlight" }, { kind: "pipe", type: SafePipe, name: "safe" }, { kind: "directive", type: ClickOutsideDirective, selector: "[ddClickOutside]", inputs: ["elements"], outputs: ["ddClickOutside"] }, { kind: "component", type: LibLoaderComponent, selector: "dd-lib-loader", inputs: ["color"] }, { kind: "pipe", type: FilterByKeyPipe, name: "filterByKey" }, { kind: "component", type: LibSvgIconComponent, selector: "dd-lib-svg-icon", inputs: ["width", "height", "color", "icon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2738
+ ], usesInheritance: true, ngImport: i0, template: "<div class=\"lib-select\" id=\"lib-select-{{ selectId }}\">\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 <div class=\"pos-relative\">\n <input\n #select\n (change)=\"handleChange()\"\n (click)=\"notifyFocusEvent($event)\"\n (input)=\"handleInput($event)\"\n [(ngModel)]=\"inputValue\"\n [attr.id]=\"selectId\"\n [attr.name]=\"name\"\n [attr.placeholder]=\"placeholder\"\n [attr.tabIndex]=\"tabIndex\"\n [attr.type]=\"'text'\"\n [class.focused]=\"focused\"\n [class.invalid]=\"invalid\"\n [disabled]=\"disabled\"\n [readOnly]=\"readOnly\"\n [title]=\"inputValue\"\n class=\"text-select\" />\n <!-- (blur)=\"notifyFocusEvent($event)\"-->\n @if (!checkedItem) {\n <dd-lib-svg-icon\n (click)=\"notifyFocusEvent($event)\"\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\n } @else {\n <dd-lib-svg-icon\n (click)=\"selectItem(checkedItem)\"\n class=\"clear\"\n id=\"chevron-{{ selectId }}\" icon=\"clear\"></dd-lib-svg-icon>\n\n }\n </div>\n\n @if (errorText && invalid) {\n <div class=\"lib-select__error\">{{ errorText }}</div>\n } @if (isShownList) {\n <div\n (ddClickOutside)=\"notifyFocusEvent($event)\"\n [elements]=\"['lib-select-' + selectId, 'chevron' + selectId]\"\n [class.top]=\"side === 'top'\"\n class=\"select-list-wrapper\">\n @if (data?.length) { @for (item of data | filterByKey: filterList.bind(this); track item) {\n <div\n (click)=\"selectItem(item)\"\n [class.active]=\"checkSelected(item)\"\n class=\"select-data\">\n\n @if (!keyDesc && !keyTitle) {\n <div [innerHTML]=\"item | highlight: inputValue | safe: 'html'\" class=\"select-data__title\"></div>\n } @if (keyTitle) {\n <div\n [innerHTML]=\"item[keyTitle!] | highlight: inputValue | safe: 'html'\"\n class=\"select-data__title\"></div>\n } @if (keyDesc) {\n <div\n [innerHTML]=\"item[keyDesc!] | highlight: inputValue | safe: 'html'\"\n [title]=\"item[keyDesc]\"\n class=\"select-data__desc\"></div>\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 } } @else {\n <div class=\"select-loader\">\n <dd-lib-loader></dd-lib-loader>\n </div>\n }\n </div>\n }\n</div>\n", styles: [".lib-select{position:relative}.lib-select 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-select input:hover{border-color:var(--input-active-border-colort)}.lib-select input:focus{border-color:var(--input-active-border-colort);box-shadow:var(--input-active-border-shadow)}.lib-select input:disabled{border:none;background-color:var(--input-disable-input);color:var(--input-disable-text);pointer-events:none}.lib-select input:disabled::placeholder{color:var(--input-placeholder)}.lib-select input.invalid,.lib-select input.invalid:hover{border-color:var(--input-error-border-color)}.lib-select input.invalid:focus{border-color:var(--input-error-border-color);box-shadow:var(--input-error-border-shadow)}.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}.lib-select__error{color:var(--primary-red-color);font-size:12px;font-weight:400;line-height:10px;margin-top:2px}.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.top{bottom:50px;top:unset}.lib-select .select-list-wrapper .select-data{padding:12px 42px 12px 16px;cursor:pointer;position:relative}.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:hover,.lib-select .select-list-wrapper .select-data.active{background:var(--select-act-hov-bgc)}.lib-select .select-list-wrapper .select-data.active .checked{position:absolute;right:16px;top:10px}.lib-select .select-list-wrapper .select-loader{padding:24px}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$5.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "pipe", type: HighlightPipe, name: "highlight" }, { kind: "pipe", type: SafePipe, name: "safe" }, { kind: "directive", type: ClickOutsideDirective, selector: "[ddClickOutside]", inputs: ["elements"], outputs: ["ddClickOutside"] }, { kind: "component", type: LibLoaderComponent, selector: "dd-lib-loader", inputs: ["color", "size"] }, { kind: "pipe", type: FilterByKeyPipe, name: "filterByKey" }, { kind: "component", type: LibSvgIconComponent, selector: "dd-lib-svg-icon", inputs: ["width", "height", "color", "icon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2779
2739
  }
2780
2740
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.2", ngImport: i0, type: LibSelectComponent, decorators: [{
2781
2741
  type: Component,
@@ -3524,6 +3484,10 @@ const svgIconPrev = {
3524
3484
  name: 'prev',
3525
3485
  data: `<svg fill="none" height="48" viewBox="0 0 48 48" width="48" xmlns="http://www.w3.org/2000/svg"><rect fill="white" height="48" rx="24" transform="rotate(-180 48 48)" width="48" x="48" y="48"/><path d="M33.3328 24L14.6662 24" stroke="#434343" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"/><path d="M22.6664 16L14.6664 24" stroke="#434343" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"/><path d="M22.6664 32L14.6664 24" stroke="#434343" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"/></svg>`,
3526
3486
  };
3487
+ const svgIconPrint = {
3488
+ name: 'print',
3489
+ data: `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_1618_78572)"><path d="M17 17H19C19.5304 17 20.0391 16.7893 20.4142 16.4142C20.7893 16.0391 21 15.5304 21 15V11C21 10.4696 20.7893 9.96086 20.4142 9.58579C20.0391 9.21071 19.5304 9 19 9H5C4.46957 9 3.96086 9.21071 3.58579 9.58579C3.21071 9.96086 3 10.4696 3 11V15C3 15.5304 3.21071 16.0391 3.58579 16.4142C3.96086 16.7893 4.46957 17 5 17H7" stroke="#07B700" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M17 9V5C17 4.46957 16.7893 3.96086 16.4142 3.58579C16.0391 3.21071 15.5304 3 15 3H9C8.46957 3 7.96086 3.21071 7.58579 3.58579C7.21071 3.96086 7 4.46957 7 5V9" stroke="#07B700" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M7 15C7 14.4696 7.21071 13.9609 7.58579 13.5858C7.96086 13.2107 8.46957 13 9 13H15C15.5304 13 16.0391 13.2107 16.4142 13.5858C16.7893 13.9609 17 14.4696 17 15V19C17 19.5304 16.7893 20.0391 16.4142 20.4142C16.0391 20.7893 15.5304 21 15 21H9C8.46957 21 7.96086 20.7893 7.58579 20.4142C7.21071 20.0391 7 19.5304 7 19V15Z" stroke="#07B700" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></g><defs><clipPath id="clip0_1618_78572"><rect width="24" height="24" fill="white"/></clipPath></defs></svg>`,
3490
+ };
3527
3491
  const svgIconPrinter = {
3528
3492
  name: 'printer',
3529
3493
  data: `<svg fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_1618_78572)"><path d="M17 17H19C19.5304 17 20.0391 16.7893 20.4142 16.4142C20.7893 16.0391 21 15.5304 21 15V11C21 10.4696 20.7893 9.96086 20.4142 9.58579C20.0391 9.21071 19.5304 9 19 9H5C4.46957 9 3.96086 9.21071 3.58579 9.58579C3.21071 9.96086 3 10.4696 3 11V15C3 15.5304 3.21071 16.0391 3.58579 16.4142C3.96086 16.7893 4.46957 17 5 17H7" stroke="#07B700" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path d="M17 9V5C17 4.46957 16.7893 3.96086 16.4142 3.58579C16.0391 3.21071 15.5304 3 15 3H9C8.46957 3 7.96086 3.21071 7.58579 3.58579C7.21071 3.96086 7 4.46957 7 5V9" stroke="#07B700" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/><path d="M7 15C7 14.4696 7.21071 13.9609 7.58579 13.5858C7.96086 13.2107 8.46957 13 9 13H15C15.5304 13 16.0391 13.2107 16.4142 13.5858C16.7893 13.9609 17 14.4696 17 15V19C17 19.5304 16.7893 20.0391 16.4142 20.4142C16.0391 20.7893 15.5304 21 15 21H9C8.46957 21 7.96086 20.7893 7.58579 20.4142C7.21071 20.0391 7 19.5304 7 19V15Z" stroke="#07B700" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/></g><defs><clipPath id="clip0_1618_78572"><rect fill="white" height="24" width="24"/></clipPath></defs></svg>`,
@@ -3677,6 +3641,7 @@ const completeIconSet = [
3677
3641
  svgIconPlug,
3678
3642
  svgIconPlus,
3679
3643
  svgIconPrev,
3644
+ svgIconPrint,
3680
3645
  svgIconPrinter,
3681
3646
  svgIconQuestionWhiteG,
3682
3647
  svgIconQuestion,
@@ -3759,6 +3724,7 @@ var svgIcon = /*#__PURE__*/Object.freeze({
3759
3724
  svgIconPlugD: svgIconPlugD,
3760
3725
  svgIconPlus: svgIconPlus,
3761
3726
  svgIconPrev: svgIconPrev,
3727
+ svgIconPrint: svgIconPrint,
3762
3728
  svgIconPrinter: svgIconPrinter,
3763
3729
  svgIconQuestion: svgIconQuestion,
3764
3730
  svgIconQuestionWhiteG: svgIconQuestionWhiteG,
@@ -3900,5 +3866,5 @@ const t = true;
3900
3866
  * Generated bundle index. Do not edit.
3901
3867
  */
3902
3868
 
3903
- export { AutoHeightDirective, ClickOutsideDirective, CounterDirective, DDDialogRef, DEFAULT_FORMAT, DIALOG_CONFIG, DataEmptyComponent, DateService, Debounce, DeclensionDirective, DestroyService, DialogConfig, DialogService, DisableAfterNCall, Disabled, ErrorPageComponent, FetcherService, FilterByKeyPipe, FilterPipe, FilterTabsPipe, FooterComponent, HighlightPipe, ITab, InterceptorsService, LibAccordionComponent, LibBackButtonComponent, LibButtonComponent, LibCalendarComponent, LibCardComponent, LibCheckboxComponent, LibCommentInputComponent, LibCommonButtonComponent, LibCommonInputTextComponent, LibDateRangeComponent, LibFileLoaderComponent, LibFileUploadComponent, LibFilterButtonComponent, LibFilterComponent, LibImageLoaderComponent, LibInputComponent, LibLoaderComponent, LibPeriodComponent, LibRadioComponent, LibSearchInputComponent, LibSelectComponent, LibSkeletonComponent, LibSortComponent, LibStepComponent, LibSvgComponent, LibSvgIconComponent, LibTabsFragmentComponent, LibTextareaComponent, MainSharedComponent, ModalBaseComponent, ModalCommonComponent, NotFoundComponent, ResizeTextareaDirective, ReversePipe, SafePipe, SvgIconsService, TOAST_DATA, TOOLTIP_DATA, TechWorksComponent, ThemeConfigurator, ThemeConstructorService, Throttle, ToastBaseComponent, ToastConfig, ToastPlaceholderComponent, ToastService, ToastType, TooltipComponent, TooltipDirective, TriangleDirective, ValidatorsService, completeIconSet, svgIconActogoneAccept, svgIconAll, svgIconAppgalery, svgIconAppstore, svgIconArrowDownRed, svgIconArrowUpGreen, svgIconBackArrow, svgIconBurger, svgIconCalendar, svgIconCheckGreen, svgIconCheckWhite, svgIconCircleNo, svgIconClear, svgIconClose, svgIconDangerT, svgIconDd, svgIconDdM, svgIconDobrodel, svgIconDownChevron, svgIconDownload, svgIconEds, svgIconEdsM, svgIconEntry, svgIconErrorHint, svgIconEsia, svgIconEye, svgIconEyeOff, svgIconFilter, svgIconGoogleapp, svgIconGrid, svgIconHealth, svgIconHealthM, svgIconInfoCircle, svgIconInfoT, svgIconLeftChevron, svgIconListSearch, svgIconLogout, svgIconMailExclamation, svgIconMaxFilter, svgIconMoon, svgIconMy, svgIconMyM, svgIconNews, svgIconNext, svgIconPaperclip, svgIconPenEdit, svgIconPguMo, svgIconPguMoM, svgIconPlug, svgIconPlugD, svgIconPlus, svgIconPrev, svgIconPrinter, svgIconQuestion, svgIconQuestionWhiteG, svgIconRedClose, svgIconRightChevron, svgIconRustore, svgIconSearch, svgIconSend, svgIconSetAvatar, svgIconSharedLogo, svgIconSmallRoundLoader, svgIconSort, svgIconStar, svgIconSuccessT, svgIconSun, svgIconTg, svgIconToggleArrowLeft, svgIconToggleArrowRight, svgIconTrash, svgIconTrophy, svgIconUser, svgIconUserEmpty, svgIconUserEmptyD, svgIconVk, svgIconWarningT, t };
3869
+ export { AutoHeightDirective, ClickOutsideDirective, CounterDirective, DDDialogRef, DEFAULT_FORMAT, DIALOG_CONFIG, DataEmptyComponent, DateService, Debounce, DeclensionDirective, DestroyService, DialogConfig, DialogService, DisableAfterNCall, Disabled, ErrorPageComponent, FetcherService, FilterByKeyPipe, FilterPipe, FilterTabsPipe, FooterComponent, HighlightPipe, ITab, InterceptorsService, LibAccordionComponent, LibBackButtonComponent, LibButtonComponent, LibCalendarComponent, LibCardComponent, LibCheckboxComponent, LibCommentInputComponent, LibCommonButtonComponent, LibCommonInputTextComponent, LibDateRangeComponent, LibFileLoaderComponent, LibFileUploadComponent, LibFilterButtonComponent, LibFilterComponent, LibImageLoaderComponent, LibInputComponent, LibLoaderComponent, LibPeriodComponent, LibRadioComponent, LibSearchInputComponent, LibSelectComponent, LibSkeletonComponent, LibSortComponent, LibStepComponent, LibSvgComponent, LibSvgIconComponent, LibTabsFragmentComponent, LibTextareaComponent, MainSharedComponent, ModalBaseComponent, ModalCommonComponent, NotFoundComponent, ResizeTextareaDirective, ReversePipe, SafePipe, SvgIconsService, TOAST_CONFIG_TOKEN, TOOLTIP_DATA, TechWorksComponent, ThemeConfigurator, ThemeConstructorService, Throttle, ToastComponent, ToastData, ToastRef, ToastService, 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, svgIconEdsM, svgIconEntry, svgIconErrorHint, svgIconEsia, svgIconEye, svgIconEyeOff, svgIconFilter, svgIconGoogleapp, svgIconGrid, svgIconHealth, svgIconHealthM, svgIconInfoCircle, svgIconInfoT, svgIconLeftChevron, svgIconListSearch, svgIconLogout, svgIconMailExclamation, svgIconMaxFilter, svgIconMoon, svgIconMy, svgIconMyM, svgIconNews, svgIconNext, svgIconPaperclip, svgIconPenEdit, svgIconPguMo, svgIconPguMoM, svgIconPlug, svgIconPlugD, svgIconPlus, svgIconPrev, svgIconPrint, svgIconPrinter, svgIconQuestion, svgIconQuestionWhiteG, svgIconRedClose, svgIconRightChevron, svgIconRustore, svgIconSearch, svgIconSend, svgIconSetAvatar, svgIconSharedLogo, svgIconSmallRoundLoader, svgIconSort, svgIconStar, svgIconSuccessT, svgIconSun, svgIconTg, svgIconToggleArrowLeft, svgIconToggleArrowRight, svgIconTrash, svgIconTrophy, svgIconUser, svgIconUserEmpty, svgIconUserEmptyD, svgIconVk, svgIconWarningT, t };
3904
3870
  //# sourceMappingURL=morozeckiy-dd-lib.mjs.map