aeb-ui-kit 9.1.0-preview.1126 → 9.1.0-preview.1132

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.
@@ -5,7 +5,7 @@ import { CommonModule, DOCUMENT, formatDate, formatNumber } from '@angular/commo
5
5
  import * as i3 from '@angular/forms';
6
6
  import { NG_VALUE_ACCESSOR, FormBuilder, FormControl, Validators, FormsModule, ReactiveFormsModule, NgControl } from '@angular/forms';
7
7
  import { Subject, timer, map, takeUntil, Subscription, filter, fromEvent, debounce, debounceTime } from 'rxjs';
8
- import { trigger, state, transition, style, animate } from '@angular/animations';
8
+ import { trigger, state, transition, style, animate, query, stagger } from '@angular/animations';
9
9
  import { addWeeks, addDays, isSameMonth, getWeeksInMonth, startOfMonth, startOfWeek, addMonths, subMonths, eachYearOfInterval, getYear, addYears, subYears, differenceInYears, startOfYear, isToday, isValid, isSameDay, getMonth, setMonth, areIntervalsOverlapping, startOfDay, endOfDay, parse, format, getDaysInMonth, isExists, compareAsc, getDate } from 'date-fns';
10
10
  import { ru } from 'date-fns/locale';
11
11
  import '@angular/common/locales/global/ru';
@@ -3496,56 +3496,72 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImpor
3496
3496
  }] });
3497
3497
 
3498
3498
  class NotificationComponent {
3499
+ get notificationClass() {
3500
+ return `aeb-notification--${this.type()}`;
3501
+ }
3502
+ get notificationState() {
3503
+ return this.state();
3504
+ }
3499
3505
  constructor() {
3500
- this.message = '';
3501
- this.header = '';
3502
- this.iconPath = '';
3503
- this.clickNotification = new EventEmitter();
3504
- this.closeNotification = new EventEmitter();
3505
3506
  this.notification = true;
3506
- this.state = 'open';
3507
- this.isHovered = false;
3507
+ this.id = input('', ...(ngDevMode ? [{ debugName: "id" }] : []));
3508
+ this.header = input('', ...(ngDevMode ? [{ debugName: "header" }] : []));
3509
+ this.message = input('', ...(ngDevMode ? [{ debugName: "message" }] : []));
3510
+ this.type = input('info', ...(ngDevMode ? [{ debugName: "type" }] : []));
3511
+ this.buttonText = input('', ...(ngDevMode ? [{ debugName: "buttonText" }] : []));
3512
+ /**
3513
+ * Время "жизни" уведомления в секундах.
3514
+ * Если передано falsy значение (0/null/undefined/etc), то уведомление не будет исчезать.
3515
+ */
3516
+ this.lifeTime = input(3, ...(ngDevMode ? [{ debugName: "lifeTime" }] : []));
3517
+ this.buttonClick = output();
3518
+ this.clickNotification = output();
3519
+ this.closeNotification = output();
3520
+ this.state = signal('open', ...(ngDevMode ? [{ debugName: "state" }] : []));
3521
+ this.isHovered = signal(false, ...(ngDevMode ? [{ debugName: "isHovered" }] : []));
3508
3522
  this.timeout = null;
3523
+ effect(() => {
3524
+ const lifeTime = this.lifeTime();
3525
+ if (lifeTime !== undefined) {
3526
+ this.waitUntilClose();
3527
+ }
3528
+ });
3529
+ effect(() => {
3530
+ const lifeTime = this.lifeTime();
3531
+ if (lifeTime !== undefined) {
3532
+ this.state.set('open');
3533
+ clearTimeout(this.timeout);
3534
+ if (!this.isHovered()) {
3535
+ this.waitUntilClose();
3536
+ }
3537
+ }
3538
+ });
3539
+ }
3540
+ onAnimationDone(event) {
3541
+ this.captureDoneEvent(event);
3509
3542
  }
3510
3543
  onOver() {
3511
- this.isHovered = true;
3512
- this.state = 'open';
3544
+ this.isHovered.set(true);
3545
+ this.state.set('open');
3513
3546
  clearTimeout(this.timeout);
3514
3547
  }
3515
3548
  onLeave() {
3516
- this.isHovered = false;
3549
+ this.isHovered.set(false);
3517
3550
  this.waitUntilClose();
3518
3551
  }
3519
3552
  onClick() {
3520
- this.clickNotification.emit(this.id);
3521
- }
3522
- ngOnInit() {
3523
- if (!this.lifeTime) {
3524
- this.lifeTime = 0;
3525
- }
3526
- this.waitUntilClose();
3527
- }
3528
- ngOnChanges(changes) {
3529
- if (changes.lifeTime &&
3530
- changes.lifeTime.currentValue !== changes.lifeTime.previousValue) {
3531
- // когда меняется свойство lifeTime, обнуляем таймер и отменяем анимацию исчезновения
3532
- // затем запускаем таймер заново
3533
- this.state = 'open';
3534
- clearTimeout(this.timeout);
3535
- if (!this.isHovered) {
3536
- this.waitUntilClose();
3537
- }
3538
- }
3553
+ this.clickNotification.emit(this.id());
3539
3554
  }
3540
- ngOnDestroy() {
3541
- clearTimeout(this.timeout);
3555
+ handleButtonClick(event) {
3556
+ event.stopPropagation();
3557
+ this.buttonClick.emit(this.id());
3542
3558
  }
3543
3559
  /**
3544
3560
  * Вызывается при завершении перехода от одного state к другому
3545
3561
  */
3546
3562
  captureDoneEvent(event) {
3547
- if (event.toState === 'closed' && !this.isHovered) {
3548
- this.closeNotification.emit(this.id);
3563
+ if (event.toState === 'closed' && !this.isHovered()) {
3564
+ this.closeNotification.emit(this.id());
3549
3565
  }
3550
3566
  }
3551
3567
  handleClose(event, id) {
@@ -3553,24 +3569,27 @@ class NotificationComponent {
3553
3569
  this.closeNotification.emit(id);
3554
3570
  }
3555
3571
  waitUntilClose() {
3556
- if (this.lifeTime === 0) {
3572
+ const lifeTime = this.lifeTime();
3573
+ if (lifeTime === 0 || lifeTime === undefined) {
3557
3574
  return;
3558
3575
  }
3559
3576
  this.timeout = setTimeout(() => {
3560
- this.state = 'closed';
3561
- }, this.lifeTime * 1000);
3577
+ this.state.set('closed');
3578
+ }, lifeTime * 1000);
3562
3579
  }
3563
3580
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: NotificationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
3564
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.2.4", type: NotificationComponent, isStandalone: false, selector: "aeb-notification", inputs: { id: "id", message: "message", header: "header", iconPath: "iconPath", lifeTime: "lifeTime" }, outputs: { clickNotification: "clickNotification", closeNotification: "closeNotification" }, host: { listeners: { "mouseover": "onOver()", "mouseleave": "onLeave()", "click": "onClick()" }, properties: { "class.aeb-notification": "this.notification" } }, usesOnChanges: true, ngImport: i0, template: "<div\n [@notificationState]=\"state\"\n (@notificationState.done)=\"captureDoneEvent($event)\"\n class=\"aeb-notification-container\"\n>\n <div class=\"aeb-notification__icon\">\n <img [src]=\"iconPath\" />\n </div>\n <div class=\"aeb-notification__info\">\n <div class=\"aeb-notification__header\">\n {{ header }}\n </div>\n <div class=\"aeb-notification__msg\" [innerHTML]=\"message\"></div>\n </div>\n <div class=\"aeb-notification__close\" (click)=\"handleClose($event, id)\">\n <svg\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M5.63086 5.63074L18.3693 18.3692\"\n stroke=\"white\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n />\n <path\n d=\"M18.3691 5.63074L5.63065 18.3692\"\n stroke=\"white\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n />\n </svg>\n </div>\n</div>\n", styles: [".aeb-notification{box-sizing:border-box;display:inline-block;width:324px;height:auto;min-height:76px;overflow:hidden;border-radius:8px}.aeb-notification-container{display:flex;justify-content:space-between;height:auto;padding:16px;background-color:var(--color-mono-900)}.aeb-notification:not(:last-child){margin-bottom:12px}.aeb-notification__icon{flex:0;width:36px;height:36px}.aeb-notification__info{width:100%;margin-left:16px;font-size:var(--font-size-xs);color:var(--color-mono-0)}.aeb-notification__header{flex:auto;margin-bottom:8px;font-size:var(--font-size-s);font-weight:var(--font-weight-medium);color:var(--color-mono-0);word-break:break-all}.aeb-notification__close{top:16px;right:16px;flex:0;cursor:pointer}\n"], animations: [
3581
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.4", type: NotificationComponent, isStandalone: false, selector: "aeb-notification", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, header: { classPropertyName: "header", publicName: "header", isSignal: true, isRequired: false, transformFunction: null }, message: { classPropertyName: "message", publicName: "message", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, buttonText: { classPropertyName: "buttonText", publicName: "buttonText", isSignal: true, isRequired: false, transformFunction: null }, lifeTime: { classPropertyName: "lifeTime", publicName: "lifeTime", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { buttonClick: "buttonClick", clickNotification: "clickNotification", closeNotification: "closeNotification" }, host: { listeners: { "@notificationState.done": "onAnimationDone($event)", "mouseover": "onOver()", "mouseleave": "onLeave()", "click": "onClick()" }, properties: { "class.aeb-notification": "this.notification", "class": "this.notificationClass", "@notificationState": "this.notificationState" } }, ngImport: i0, template: "<div class=\"aeb-notification__icon\">\n @switch (type()) {\n @case ('info') {\n <svg\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <circle cx=\"12\" cy=\"12\" r=\"10\" fill=\"#0198C8\" />\n <path\n d=\"M12 12V16\"\n stroke=\"white\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n <path\n d=\"M12 8V8.0001\"\n stroke=\"white\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>\n }\n @case ('success') {\n <svg\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <circle cx=\"12\" cy=\"12\" r=\"10\" fill=\"#099A57\" />\n <path\n d=\"M8 12.5L10.4615 14.8076C10.5769 14.9158 10.7565 14.9158 10.8718 14.8076L16 10\"\n stroke=\"white\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n />\n </svg>\n }\n @case ('error') {\n <svg\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <circle cx=\"12\" cy=\"12\" r=\"10\" fill=\"#DA2A4A\" />\n <path\n d=\"M15 9.03048L9.03035 15.0001M9 9L14.9697 14.9697\"\n stroke=\"white\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>\n }\n @case ('warning') {\n <svg\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M10.29 3.85996L1.82002 18C1.64539 18.3024 1.55299 18.6453 1.55201 18.9945C1.55103 19.3437 1.64151 19.6871 1.81445 19.9905C1.98738 20.2939 2.23675 20.5467 2.53773 20.7238C2.83871 20.9009 3.18082 20.9961 3.53002 21H20.47C20.8192 20.9961 21.1613 20.9009 21.4623 20.7238C21.7633 20.5467 22.0127 20.2939 22.1856 19.9905C22.3585 19.6871 22.449 19.3437 22.448 18.9945C22.4471 18.6453 22.3547 18.3024 22.18 18L13.71 3.85996C13.5318 3.56607 13.2807 3.32308 12.9812 3.15444C12.6817 2.98581 12.3438 2.89722 12 2.89722C11.6563 2.89722 11.3184 2.98581 11.0188 3.15444C10.7193 3.32308 10.4683 3.56607 10.29 3.85996Z\"\n fill=\"#CFAC43\"\n />\n <path\n d=\"M12 9V13\"\n stroke=\"white\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n <path\n d=\"M12 17H12.01\"\n stroke=\"white\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>\n }\n @default {\n <svg\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n ></svg>\n }\n }\n</div>\n<div class=\"aeb-notification__info\">\n <div class=\"aeb-notification__header\">\n {{ header() }}\n </div>\n <div class=\"aeb-notification__msg\" [innerHTML]=\"message()\"></div>\n @if (buttonText()) {\n <button\n class=\"aeb-notification__button\"\n (click)=\"handleButtonClick($event)\"\n [class.aeb-notification__button--info]=\"type() === 'info'\"\n [class.aeb-notification__button--error]=\"type() === 'error'\"\n [class.aeb-notification__button--success]=\"type() === 'success'\"\n [class.aeb-notification__button--warning]=\"type() === 'warning'\"\n >\n {{ buttonText() }}\n </button>\n }\n</div>\n<div\n class=\"aeb-notification__close\"\n [class]=\"'aeb-notification__close--' + type()\"\n (click)=\"handleClose($event, id())\"\n>\n <svg\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M8 8L16 16\"\n stroke=\"#07222D\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n />\n <path\n d=\"M16 8L8 16\"\n stroke=\"#07222D\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n />\n </svg>\n</div>\n", styles: [".aeb-notification{box-sizing:border-box;width:320px;min-height:76px;display:flex;justify-content:space-between;gap:16px;height:auto;padding:16px;border-radius:16px;-webkit-user-select:none;user-select:none}.aeb-notification--info{color:var(--c-sem-l-informative);border:1px solid var(--c-sem-btn-informative);background-color:var(--c-sem-bg-informative)}.aeb-notification--error{color:var(--c-sem-l-negative);border:1px solid var(--c-sem-btn-negative);background-color:var(--c-sem-bg-negative)}.aeb-notification--warning{color:var(--c-sem-l-warning);border:1px solid var(--c-sem-btn-warning);background-color:var(--c-sem-bg-warning)}.aeb-notification--success{color:var(--c-sem-l-positive);border:1px solid var(--c-sem-btn-positive);background-color:var(--c-sem-bg-positive)}.aeb-notification__icon{width:24px;height:24px;display:flex;align-items:center;justify-content:center}.aeb-notification__info{width:100%}.aeb-notification__header{flex:auto;margin-bottom:4px;font-size:var(--font-size-s);font-weight:var(--font-weight-medium);word-break:break-all}.aeb-notification__button{margin-top:12px;background-color:transparent;border:none;cursor:pointer;font-size:14px;font-weight:400;font-family:inherit;line-height:20px;padding:0}.aeb-notification__button--info{color:var(--c-sem-btn-informative)}.aeb-notification__button--error{color:var(--c-sem-btn-negative)}.aeb-notification__button--warning{color:var(--c-sem-btn-warning)}.aeb-notification__button--success{color:var(--c-sem-btn-positive)}.aeb-notification__close{top:16px;right:16px;flex:0;cursor:pointer}.aeb-notification__close--info svg{stroke:var(--c-sem-l-informative)}.aeb-notification__close--success svg{stroke:var(--c-sem-l-positive)}.aeb-notification__close--warning svg{stroke:var(--c-sem-l-warning)}.aeb-notification__close--error svg{stroke:var(--c-sem-l-negative)}\n"], animations: [
3565
3582
  trigger('notificationState', [
3566
3583
  state('open', style({
3567
- opacity: 1
3584
+ opacity: 1,
3585
+ transform: 'translateY(0) scale(1)'
3568
3586
  })),
3569
3587
  state('closed', style({
3570
- opacity: 0
3588
+ opacity: 0,
3589
+ transform: 'translateY(-10px) scale(0.95)'
3571
3590
  })),
3572
- transition('open => closed', [animate('2s')]),
3573
- transition('closed => open', [animate('0s')])
3591
+ transition('open => closed', [animate('2s ease-in')]),
3592
+ transition('closed => open', [animate('0.3s ease-out')])
3574
3593
  ])
3575
3594
  ], encapsulation: i0.ViewEncapsulation.None }); }
3576
3595
  }
@@ -3579,32 +3598,29 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImpor
3579
3598
  args: [{ selector: 'aeb-notification', encapsulation: ViewEncapsulation.None, animations: [
3580
3599
  trigger('notificationState', [
3581
3600
  state('open', style({
3582
- opacity: 1
3601
+ opacity: 1,
3602
+ transform: 'translateY(0) scale(1)'
3583
3603
  })),
3584
3604
  state('closed', style({
3585
- opacity: 0
3605
+ opacity: 0,
3606
+ transform: 'translateY(-10px) scale(0.95)'
3586
3607
  })),
3587
- transition('open => closed', [animate('2s')]),
3588
- transition('closed => open', [animate('0s')])
3608
+ transition('open => closed', [animate('2s ease-in')]),
3609
+ transition('closed => open', [animate('0.3s ease-out')])
3589
3610
  ])
3590
- ], standalone: false, template: "<div\n [@notificationState]=\"state\"\n (@notificationState.done)=\"captureDoneEvent($event)\"\n class=\"aeb-notification-container\"\n>\n <div class=\"aeb-notification__icon\">\n <img [src]=\"iconPath\" />\n </div>\n <div class=\"aeb-notification__info\">\n <div class=\"aeb-notification__header\">\n {{ header }}\n </div>\n <div class=\"aeb-notification__msg\" [innerHTML]=\"message\"></div>\n </div>\n <div class=\"aeb-notification__close\" (click)=\"handleClose($event, id)\">\n <svg\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M5.63086 5.63074L18.3693 18.3692\"\n stroke=\"white\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n />\n <path\n d=\"M18.3691 5.63074L5.63065 18.3692\"\n stroke=\"white\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n />\n </svg>\n </div>\n</div>\n", styles: [".aeb-notification{box-sizing:border-box;display:inline-block;width:324px;height:auto;min-height:76px;overflow:hidden;border-radius:8px}.aeb-notification-container{display:flex;justify-content:space-between;height:auto;padding:16px;background-color:var(--color-mono-900)}.aeb-notification:not(:last-child){margin-bottom:12px}.aeb-notification__icon{flex:0;width:36px;height:36px}.aeb-notification__info{width:100%;margin-left:16px;font-size:var(--font-size-xs);color:var(--color-mono-0)}.aeb-notification__header{flex:auto;margin-bottom:8px;font-size:var(--font-size-s);font-weight:var(--font-weight-medium);color:var(--color-mono-0);word-break:break-all}.aeb-notification__close{top:16px;right:16px;flex:0;cursor:pointer}\n"] }]
3591
- }], propDecorators: { id: [{
3592
- type: Input
3593
- }], message: [{
3594
- type: Input
3595
- }], header: [{
3596
- type: Input
3597
- }], iconPath: [{
3598
- type: Input
3599
- }], lifeTime: [{
3600
- type: Input
3601
- }], clickNotification: [{
3602
- type: Output
3603
- }], closeNotification: [{
3604
- type: Output
3605
- }], notification: [{
3611
+ ], standalone: false, template: "<div class=\"aeb-notification__icon\">\n @switch (type()) {\n @case ('info') {\n <svg\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <circle cx=\"12\" cy=\"12\" r=\"10\" fill=\"#0198C8\" />\n <path\n d=\"M12 12V16\"\n stroke=\"white\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n <path\n d=\"M12 8V8.0001\"\n stroke=\"white\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>\n }\n @case ('success') {\n <svg\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <circle cx=\"12\" cy=\"12\" r=\"10\" fill=\"#099A57\" />\n <path\n d=\"M8 12.5L10.4615 14.8076C10.5769 14.9158 10.7565 14.9158 10.8718 14.8076L16 10\"\n stroke=\"white\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n />\n </svg>\n }\n @case ('error') {\n <svg\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <circle cx=\"12\" cy=\"12\" r=\"10\" fill=\"#DA2A4A\" />\n <path\n d=\"M15 9.03048L9.03035 15.0001M9 9L14.9697 14.9697\"\n stroke=\"white\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>\n }\n @case ('warning') {\n <svg\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M10.29 3.85996L1.82002 18C1.64539 18.3024 1.55299 18.6453 1.55201 18.9945C1.55103 19.3437 1.64151 19.6871 1.81445 19.9905C1.98738 20.2939 2.23675 20.5467 2.53773 20.7238C2.83871 20.9009 3.18082 20.9961 3.53002 21H20.47C20.8192 20.9961 21.1613 20.9009 21.4623 20.7238C21.7633 20.5467 22.0127 20.2939 22.1856 19.9905C22.3585 19.6871 22.449 19.3437 22.448 18.9945C22.4471 18.6453 22.3547 18.3024 22.18 18L13.71 3.85996C13.5318 3.56607 13.2807 3.32308 12.9812 3.15444C12.6817 2.98581 12.3438 2.89722 12 2.89722C11.6563 2.89722 11.3184 2.98581 11.0188 3.15444C10.7193 3.32308 10.4683 3.56607 10.29 3.85996Z\"\n fill=\"#CFAC43\"\n />\n <path\n d=\"M12 9V13\"\n stroke=\"white\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n <path\n d=\"M12 17H12.01\"\n stroke=\"white\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>\n }\n @default {\n <svg\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n ></svg>\n }\n }\n</div>\n<div class=\"aeb-notification__info\">\n <div class=\"aeb-notification__header\">\n {{ header() }}\n </div>\n <div class=\"aeb-notification__msg\" [innerHTML]=\"message()\"></div>\n @if (buttonText()) {\n <button\n class=\"aeb-notification__button\"\n (click)=\"handleButtonClick($event)\"\n [class.aeb-notification__button--info]=\"type() === 'info'\"\n [class.aeb-notification__button--error]=\"type() === 'error'\"\n [class.aeb-notification__button--success]=\"type() === 'success'\"\n [class.aeb-notification__button--warning]=\"type() === 'warning'\"\n >\n {{ buttonText() }}\n </button>\n }\n</div>\n<div\n class=\"aeb-notification__close\"\n [class]=\"'aeb-notification__close--' + type()\"\n (click)=\"handleClose($event, id())\"\n>\n <svg\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M8 8L16 16\"\n stroke=\"#07222D\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n />\n <path\n d=\"M16 8L8 16\"\n stroke=\"#07222D\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n />\n </svg>\n</div>\n", styles: [".aeb-notification{box-sizing:border-box;width:320px;min-height:76px;display:flex;justify-content:space-between;gap:16px;height:auto;padding:16px;border-radius:16px;-webkit-user-select:none;user-select:none}.aeb-notification--info{color:var(--c-sem-l-informative);border:1px solid var(--c-sem-btn-informative);background-color:var(--c-sem-bg-informative)}.aeb-notification--error{color:var(--c-sem-l-negative);border:1px solid var(--c-sem-btn-negative);background-color:var(--c-sem-bg-negative)}.aeb-notification--warning{color:var(--c-sem-l-warning);border:1px solid var(--c-sem-btn-warning);background-color:var(--c-sem-bg-warning)}.aeb-notification--success{color:var(--c-sem-l-positive);border:1px solid var(--c-sem-btn-positive);background-color:var(--c-sem-bg-positive)}.aeb-notification__icon{width:24px;height:24px;display:flex;align-items:center;justify-content:center}.aeb-notification__info{width:100%}.aeb-notification__header{flex:auto;margin-bottom:4px;font-size:var(--font-size-s);font-weight:var(--font-weight-medium);word-break:break-all}.aeb-notification__button{margin-top:12px;background-color:transparent;border:none;cursor:pointer;font-size:14px;font-weight:400;font-family:inherit;line-height:20px;padding:0}.aeb-notification__button--info{color:var(--c-sem-btn-informative)}.aeb-notification__button--error{color:var(--c-sem-btn-negative)}.aeb-notification__button--warning{color:var(--c-sem-btn-warning)}.aeb-notification__button--success{color:var(--c-sem-btn-positive)}.aeb-notification__close{top:16px;right:16px;flex:0;cursor:pointer}.aeb-notification__close--info svg{stroke:var(--c-sem-l-informative)}.aeb-notification__close--success svg{stroke:var(--c-sem-l-positive)}.aeb-notification__close--warning svg{stroke:var(--c-sem-l-warning)}.aeb-notification__close--error svg{stroke:var(--c-sem-l-negative)}\n"] }]
3612
+ }], ctorParameters: () => [], propDecorators: { notification: [{
3606
3613
  type: HostBinding,
3607
3614
  args: ['class.aeb-notification']
3615
+ }], notificationClass: [{
3616
+ type: HostBinding,
3617
+ args: ['class']
3618
+ }], notificationState: [{
3619
+ type: HostBinding,
3620
+ args: ['@notificationState']
3621
+ }], onAnimationDone: [{
3622
+ type: HostListener,
3623
+ args: ['@notificationState.done', ['$event']]
3608
3624
  }], onOver: [{
3609
3625
  type: HostListener,
3610
3626
  args: ['mouseover']
@@ -3618,19 +3634,26 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImpor
3618
3634
 
3619
3635
  class NotificationsComponent {
3620
3636
  constructor() {
3637
+ this.orientationClasses = computed(() => this.orientations[this.notificationsPosition()], ...(ngDevMode ? [{ debugName: "orientationClasses" }] : []));
3621
3638
  this.orientations = {
3622
3639
  topLeft: 'aeb-notifications-left aeb-notifications-top',
3623
3640
  topRight: 'aeb-notifications-right aeb-notifications-top',
3624
3641
  bottomLeft: 'aeb-notifications-left aeb-notifications-bottom',
3625
3642
  bottomRight: 'aeb-notifications-right aeb-notifications-bottom'
3626
3643
  };
3627
- this.notificationsPosition = 'bottomRight';
3628
- this.notificationClick = new EventEmitter();
3629
- this.notificationClose = new EventEmitter();
3630
3644
  this.notificationContainer = true;
3645
+ this.areNotificationsReversed = computed(() => this.notificationsPosition() === 'topLeft' ||
3646
+ this.notificationsPosition() === 'topRight', ...(ngDevMode ? [{ debugName: "areNotificationsReversed" }] : []));
3647
+ this.notifications = input([], ...(ngDevMode ? [{ debugName: "notifications" }] : []));
3648
+ this.notificationsPosition = input('topRight', ...(ngDevMode ? [{ debugName: "notificationsPosition" }] : []));
3649
+ this.notificationClick = output();
3650
+ this.notificationClose = output();
3651
+ }
3652
+ get listAnimation() {
3653
+ return this.notifications().length;
3631
3654
  }
3632
3655
  get orientation() {
3633
- return this.orientations[this.notificationsPosition];
3656
+ return this.orientationClasses();
3634
3657
  }
3635
3658
  handleItemClick(id) {
3636
3659
  this.notificationClick.emit(id);
@@ -3639,22 +3662,54 @@ class NotificationsComponent {
3639
3662
  this.notificationClose.emit(id);
3640
3663
  }
3641
3664
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: NotificationsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
3642
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.4", type: NotificationsComponent, isStandalone: false, selector: "aeb-notifications", inputs: { notifications: "notifications", notificationsPosition: "notificationsPosition" }, outputs: { notificationClick: "notificationClick", notificationClose: "notificationClose" }, host: { properties: { "class.aeb-notifications-container": "this.notificationContainer", "class": "this.orientation" } }, ngImport: i0, template: "@for (item of notifications; track item) {\n <aeb-notification\n [id]=\"item.id\"\n [header]=\"item.header\"\n [message]=\"item.message\"\n [iconPath]=\"item.iconPath\"\n [lifeTime]=\"item.lifeTime\"\n (clickNotification)=\"handleItemClick($event)\"\n (closeNotification)=\"handleItemClose($event)\"\n />\n}\n", styles: [".aeb-notifications-container{position:fixed;z-index:1500;display:flex;flex-direction:column;align-items:flex-start}.aeb-notifications-left{left:30px}.aeb-notifications-right{right:30px}.aeb-notifications-top{top:80px}.aeb-notifications-bottom{bottom:24px}\n"], dependencies: [{ kind: "component", type: NotificationComponent, selector: "aeb-notification", inputs: ["id", "message", "header", "iconPath", "lifeTime"], outputs: ["clickNotification", "closeNotification"] }], encapsulation: i0.ViewEncapsulation.None }); }
3665
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.4", type: NotificationsComponent, isStandalone: false, selector: "aeb-notifications", inputs: { notifications: { classPropertyName: "notifications", publicName: "notifications", isSignal: true, isRequired: false, transformFunction: null }, notificationsPosition: { classPropertyName: "notificationsPosition", publicName: "notificationsPosition", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { notificationClick: "notificationClick", notificationClose: "notificationClose" }, host: { properties: { "class.aeb-notifications-container": "this.notificationContainer", "class.aeb-notifications-container--reversed": "this.areNotificationsReversed", "@listAnimation": "this.listAnimation", "class": "this.orientation" } }, ngImport: i0, template: "@for (item of notifications(); track item.id) {\n <aeb-notification\n [id]=\"item.id\"\n [header]=\"item.header\"\n [message]=\"item.message\"\n [lifeTime]=\"item.lifeTime\"\n [type]=\"item.type\"\n [buttonText]=\"item.buttonText\"\n (buttonClick)=\"item.onButtonClick($event)\"\n (clickNotification)=\"handleItemClick($event)\"\n (closeNotification)=\"handleItemClose($event)\"\n />\n}\n", styles: [".aeb-notifications-container{position:fixed;z-index:1500;display:flex;flex-direction:column;align-items:flex-start;gap:12px}.aeb-notifications-container--reversed{flex-direction:column-reverse}.aeb-notifications-left{left:30px}.aeb-notifications-right{right:30px}.aeb-notifications-top{top:30px}.aeb-notifications-bottom{bottom:30px}\n"], dependencies: [{ kind: "component", type: NotificationComponent, selector: "aeb-notification", inputs: ["id", "header", "message", "type", "buttonText", "lifeTime"], outputs: ["buttonClick", "clickNotification", "closeNotification"] }], animations: [
3666
+ trigger('listAnimation', [
3667
+ transition('* => *', [
3668
+ query(':enter', [
3669
+ style({
3670
+ opacity: 0,
3671
+ transform: 'translateY(-10px)'
3672
+ }),
3673
+ stagger(50, [
3674
+ animate('200ms ease-out', style({
3675
+ opacity: 1,
3676
+ transform: 'translateY(0)'
3677
+ }))
3678
+ ])
3679
+ ], { optional: true })
3680
+ ])
3681
+ ])
3682
+ ], encapsulation: i0.ViewEncapsulation.None }); }
3643
3683
  }
3644
3684
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: NotificationsComponent, decorators: [{
3645
3685
  type: Component,
3646
- args: [{ selector: 'aeb-notifications', encapsulation: ViewEncapsulation.None, standalone: false, template: "@for (item of notifications; track item) {\n <aeb-notification\n [id]=\"item.id\"\n [header]=\"item.header\"\n [message]=\"item.message\"\n [iconPath]=\"item.iconPath\"\n [lifeTime]=\"item.lifeTime\"\n (clickNotification)=\"handleItemClick($event)\"\n (closeNotification)=\"handleItemClose($event)\"\n />\n}\n", styles: [".aeb-notifications-container{position:fixed;z-index:1500;display:flex;flex-direction:column;align-items:flex-start}.aeb-notifications-left{left:30px}.aeb-notifications-right{right:30px}.aeb-notifications-top{top:80px}.aeb-notifications-bottom{bottom:24px}\n"] }]
3647
- }], propDecorators: { notifications: [{
3648
- type: Input
3649
- }], notificationsPosition: [{
3650
- type: Input
3651
- }], notificationClick: [{
3652
- type: Output
3653
- }], notificationClose: [{
3654
- type: Output
3655
- }], notificationContainer: [{
3686
+ args: [{ selector: 'aeb-notifications', encapsulation: ViewEncapsulation.None, standalone: false, animations: [
3687
+ trigger('listAnimation', [
3688
+ transition('* => *', [
3689
+ query(':enter', [
3690
+ style({
3691
+ opacity: 0,
3692
+ transform: 'translateY(-10px)'
3693
+ }),
3694
+ stagger(50, [
3695
+ animate('200ms ease-out', style({
3696
+ opacity: 1,
3697
+ transform: 'translateY(0)'
3698
+ }))
3699
+ ])
3700
+ ], { optional: true })
3701
+ ])
3702
+ ])
3703
+ ], template: "@for (item of notifications(); track item.id) {\n <aeb-notification\n [id]=\"item.id\"\n [header]=\"item.header\"\n [message]=\"item.message\"\n [lifeTime]=\"item.lifeTime\"\n [type]=\"item.type\"\n [buttonText]=\"item.buttonText\"\n (buttonClick)=\"item.onButtonClick($event)\"\n (clickNotification)=\"handleItemClick($event)\"\n (closeNotification)=\"handleItemClose($event)\"\n />\n}\n", styles: [".aeb-notifications-container{position:fixed;z-index:1500;display:flex;flex-direction:column;align-items:flex-start;gap:12px}.aeb-notifications-container--reversed{flex-direction:column-reverse}.aeb-notifications-left{left:30px}.aeb-notifications-right{right:30px}.aeb-notifications-top{top:30px}.aeb-notifications-bottom{bottom:30px}\n"] }]
3704
+ }], propDecorators: { notificationContainer: [{
3656
3705
  type: HostBinding,
3657
3706
  args: ['class.aeb-notifications-container']
3707
+ }], areNotificationsReversed: [{
3708
+ type: HostBinding,
3709
+ args: ['class.aeb-notifications-container--reversed']
3710
+ }], listAnimation: [{
3711
+ type: HostBinding,
3712
+ args: ['@listAnimation']
3658
3713
  }], orientation: [{
3659
3714
  type: HostBinding,
3660
3715
  args: ['class']