aeb-ui-kit 9.1.0-preview.1120 → 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.
- package/fesm2022/aeb-ui-kit.mjs +202 -147
- package/fesm2022/aeb-ui-kit.mjs.map +1 -1
- package/index.d.ts +68 -61
- package/package.json +1 -1
package/fesm2022/aeb-ui-kit.mjs
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { ViewChild, Input, ViewEncapsulation, Component, NgModule, HostBinding, Directive, inject, ElementRef, HostListener, ContentChild, ChangeDetectionStrategy, Renderer2, EventEmitter, forwardRef, Output, ComponentFactoryResolver, Injector, ApplicationRef, RendererFactory2, Injectable,
|
|
2
|
+
import { ViewChild, Input, ViewEncapsulation, Component, NgModule, HostBinding, Directive, inject, ElementRef, HostListener, ContentChild, ChangeDetectionStrategy, Renderer2, EventEmitter, forwardRef, Output, input, ComponentFactoryResolver, Injector, ApplicationRef, RendererFactory2, Injectable, output, Pipe, LOCALE_ID, ChangeDetectorRef, computed, signal, effect, ContentChildren, TemplateRef, ViewChildren } from '@angular/core';
|
|
3
3
|
import * as i1 from '@angular/common';
|
|
4
4
|
import { CommonModule, DOCUMENT, formatDate, formatNumber } from '@angular/common';
|
|
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';
|
|
9
|
-
import { DomSanitizer } from '@angular/platform-browser';
|
|
8
|
+
import { trigger, state, transition, style, animate, query, stagger } from '@angular/animations';
|
|
10
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';
|
|
11
10
|
import { ru } from 'date-fns/locale';
|
|
12
11
|
import '@angular/common/locales/global/ru';
|
|
@@ -887,24 +886,41 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImpor
|
|
|
887
886
|
}] });
|
|
888
887
|
|
|
889
888
|
class TooltipComponent {
|
|
890
|
-
constructor() {
|
|
889
|
+
constructor() {
|
|
890
|
+
this.renderer = inject(Renderer2);
|
|
891
|
+
this.title = input('', ...(ngDevMode ? [{ debugName: "title" }] : []));
|
|
892
|
+
this.data = input('', ...(ngDevMode ? [{ debugName: "data" }] : []));
|
|
893
|
+
this.html = input('', ...(ngDevMode ? [{ debugName: "html" }] : []));
|
|
894
|
+
this.type = input('primary', ...(ngDevMode ? [{ debugName: "type" }] : []));
|
|
895
|
+
this.contentEl = input(null, ...(ngDevMode ? [{ debugName: "contentEl" }] : []));
|
|
896
|
+
}
|
|
891
897
|
ngOnInit() { }
|
|
898
|
+
ngAfterViewInit() {
|
|
899
|
+
const el = this.contentEl();
|
|
900
|
+
if (el && this.container?.nativeElement) {
|
|
901
|
+
const clone = el.cloneNode(true);
|
|
902
|
+
this.renderer.setStyle(clone, 'display', '');
|
|
903
|
+
this.renderer.appendChild(this.container.nativeElement, clone);
|
|
904
|
+
}
|
|
905
|
+
else if (this.html()) {
|
|
906
|
+
// innerHTML binding in template will handle this
|
|
907
|
+
}
|
|
908
|
+
}
|
|
892
909
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: TooltipComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
893
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
910
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.4", type: TooltipComponent, isStandalone: false, selector: "aeb-tooltip", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, html: { classPropertyName: "html", publicName: "html", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, contentEl: { classPropertyName: "contentEl", publicName: "contentEl", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "tooltip", first: true, predicate: ["tooltip"], descendants: true }, { propertyName: "container", first: true, predicate: ["container"], descendants: true }], ngImport: i0, template: "<div #tooltip [class]=\"'aeb-tooltip aeb-tooltip--' + type()\">\n @if (title()) {\n <p class=\"aeb-tooltip__title\">{{ title() }}</p>\n }\n <div\n #container\n class=\"aeb-tooltip__container\"\n [innerHTML]=\"!contentEl() ? html() || data() : null\"\n ></div>\n</div>\n", styles: ["@keyframes out{0%{transform:scale(0)}to{transform:scale(1)}}.aeb-tooltip{position:fixed;z-index:9999;pointer-events:none;border-radius:20px;opacity:0;transition:opacity .2s;min-width:194px;padding:20px;box-sizing:border-box;display:flex;flex-direction:column}.aeb-tooltip:before{position:absolute;width:14px;height:14px;content:\"\";transform:rotate(45deg);background-color:inherit}.aeb-tooltip--open{opacity:1;animation:out .2s}.aeb-tooltip--primary{background-color:var(--c-bg-light);box-shadow:0 0 12px #27303e1f}.aeb-tooltip--secondary{background-color:var(--c-bg-surface-medium)}.aeb-tooltip__title{font-weight:500;font-size:16px;margin:0 0 8px}.aeb-tooltip__container{position:relative;align-items:center;justify-content:center;width:100%;font-size:14px;color:var(--c-t-primary);word-break:keep-all;white-space:nowrap}.aeb-tooltip--top:before{bottom:-7px;left:calc(50% - 7px)}.aeb-tooltip--right:before{top:calc(50% - 7px);left:-7px}.aeb-tooltip--bottom:before{top:-7px;left:calc(50% - 7px)}.aeb-tooltip--left:before{top:calc(50% - 7px);left:calc(100% - 7px)}\n"], encapsulation: i0.ViewEncapsulation.None }); }
|
|
894
911
|
}
|
|
895
912
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: TooltipComponent, decorators: [{
|
|
896
913
|
type: Component,
|
|
897
|
-
args: [{ selector: 'aeb-tooltip', encapsulation: ViewEncapsulation.None, standalone: false, template: "<div class=\"aeb-tooltip\"
|
|
898
|
-
}],
|
|
914
|
+
args: [{ selector: 'aeb-tooltip', encapsulation: ViewEncapsulation.None, standalone: false, template: "<div #tooltip [class]=\"'aeb-tooltip aeb-tooltip--' + type()\">\n @if (title()) {\n <p class=\"aeb-tooltip__title\">{{ title() }}</p>\n }\n <div\n #container\n class=\"aeb-tooltip__container\"\n [innerHTML]=\"!contentEl() ? html() || data() : null\"\n ></div>\n</div>\n", styles: ["@keyframes out{0%{transform:scale(0)}to{transform:scale(1)}}.aeb-tooltip{position:fixed;z-index:9999;pointer-events:none;border-radius:20px;opacity:0;transition:opacity .2s;min-width:194px;padding:20px;box-sizing:border-box;display:flex;flex-direction:column}.aeb-tooltip:before{position:absolute;width:14px;height:14px;content:\"\";transform:rotate(45deg);background-color:inherit}.aeb-tooltip--open{opacity:1;animation:out .2s}.aeb-tooltip--primary{background-color:var(--c-bg-light);box-shadow:0 0 12px #27303e1f}.aeb-tooltip--secondary{background-color:var(--c-bg-surface-medium)}.aeb-tooltip__title{font-weight:500;font-size:16px;margin:0 0 8px}.aeb-tooltip__container{position:relative;align-items:center;justify-content:center;width:100%;font-size:14px;color:var(--c-t-primary);word-break:keep-all;white-space:nowrap}.aeb-tooltip--top:before{bottom:-7px;left:calc(50% - 7px)}.aeb-tooltip--right:before{top:calc(50% - 7px);left:-7px}.aeb-tooltip--bottom:before{top:-7px;left:calc(50% - 7px)}.aeb-tooltip--left:before{top:calc(50% - 7px);left:calc(100% - 7px)}\n"] }]
|
|
915
|
+
}], propDecorators: { tooltip: [{
|
|
899
916
|
type: ViewChild,
|
|
900
917
|
args: ['tooltip']
|
|
901
|
-
}],
|
|
902
|
-
type:
|
|
903
|
-
|
|
904
|
-
type: Input
|
|
918
|
+
}], container: [{
|
|
919
|
+
type: ViewChild,
|
|
920
|
+
args: ['container']
|
|
905
921
|
}] } });
|
|
906
922
|
|
|
907
|
-
class
|
|
923
|
+
class DomService {
|
|
908
924
|
constructor() {
|
|
909
925
|
this.componentFactoryResolver = inject(ComponentFactoryResolver);
|
|
910
926
|
this.injector = inject(Injector);
|
|
@@ -919,7 +935,10 @@ class DOMService {
|
|
|
919
935
|
.resolveComponentFactory(component)
|
|
920
936
|
.create(this.injector);
|
|
921
937
|
if (componentProps !== null && typeof componentRef.instance === 'object') {
|
|
922
|
-
Object.
|
|
938
|
+
for (const [key, value] of Object.entries(componentProps)) {
|
|
939
|
+
// Use Angular's setInput API to support both classic @Input and signal inputs
|
|
940
|
+
componentRef.setInput(key, value);
|
|
941
|
+
}
|
|
923
942
|
}
|
|
924
943
|
this.applicationRef.attachView(componentRef.hostView);
|
|
925
944
|
const componentRootNode = componentRef.hostView.rootNodes[0];
|
|
@@ -931,10 +950,10 @@ class DOMService {
|
|
|
931
950
|
this.applicationRef.detachView(this.componentRef.hostView);
|
|
932
951
|
this.componentRef.destroy();
|
|
933
952
|
}
|
|
934
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type:
|
|
935
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type:
|
|
953
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: DomService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
954
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: DomService, providedIn: 'root' }); }
|
|
936
955
|
}
|
|
937
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type:
|
|
956
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: DomService, decorators: [{
|
|
938
957
|
type: Injectable,
|
|
939
958
|
args: [{
|
|
940
959
|
providedIn: 'root'
|
|
@@ -944,13 +963,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImpor
|
|
|
944
963
|
class TooltipDirective {
|
|
945
964
|
constructor() {
|
|
946
965
|
this.el = inject(ElementRef);
|
|
947
|
-
this.dom = inject(
|
|
948
|
-
this.sanitizer = inject(DomSanitizer);
|
|
949
|
-
this._ngZone = inject(NgZone);
|
|
950
|
-
this.position = 'top';
|
|
951
|
-
this.overflow = false;
|
|
952
|
-
this.clickOutside = new EventEmitter();
|
|
953
|
-
this.tooltipOpen = false;
|
|
966
|
+
this.dom = inject(DomService);
|
|
954
967
|
this.tooltipConfig = {
|
|
955
968
|
right: (boundaries, tooltip) => {
|
|
956
969
|
const targetHalf = boundaries.top + boundaries.height / 2;
|
|
@@ -982,6 +995,12 @@ class TooltipDirective {
|
|
|
982
995
|
];
|
|
983
996
|
}
|
|
984
997
|
};
|
|
998
|
+
this.tooltipOpen = false;
|
|
999
|
+
this.tooltipTitle = input('', ...(ngDevMode ? [{ debugName: "tooltipTitle" }] : []));
|
|
1000
|
+
this.tooltipData = input('', ...(ngDevMode ? [{ debugName: "tooltipData" }] : []));
|
|
1001
|
+
this.tooltipPosition = input('top', ...(ngDevMode ? [{ debugName: "tooltipPosition" }] : []));
|
|
1002
|
+
this.tooltipType = input('primary', ...(ngDevMode ? [{ debugName: "tooltipType" }] : []));
|
|
1003
|
+
this.clickOutside = output();
|
|
985
1004
|
this.handleDocumentTouchstart = (event) => {
|
|
986
1005
|
const contain = this.el.nativeElement.contains(event.target);
|
|
987
1006
|
if (!contain) {
|
|
@@ -997,12 +1016,11 @@ class TooltipDirective {
|
|
|
997
1016
|
onMouseEnter() {
|
|
998
1017
|
this.showTooltip();
|
|
999
1018
|
}
|
|
1000
|
-
onClick(
|
|
1019
|
+
onClick() {
|
|
1001
1020
|
if (this.tooltipOpen) {
|
|
1002
1021
|
this.hideTooltip();
|
|
1003
1022
|
}
|
|
1004
1023
|
else {
|
|
1005
|
-
this.touchTimeStamp = event.timeStamp;
|
|
1006
1024
|
this.showTooltip();
|
|
1007
1025
|
}
|
|
1008
1026
|
}
|
|
@@ -1012,27 +1030,6 @@ class TooltipDirective {
|
|
|
1012
1030
|
this.tooltip.tooltip.nativeElement.setAttribute('style', '');
|
|
1013
1031
|
}
|
|
1014
1032
|
}
|
|
1015
|
-
showTooltip() {
|
|
1016
|
-
if (this.overflow) {
|
|
1017
|
-
const onOverflow = this.el.nativeElement.scrollWidth >
|
|
1018
|
-
this.el.nativeElement.offsetWidth;
|
|
1019
|
-
if (!onOverflow) {
|
|
1020
|
-
return;
|
|
1021
|
-
}
|
|
1022
|
-
}
|
|
1023
|
-
this.tooltipOpen = true;
|
|
1024
|
-
const tooltip = this.tooltip.tooltip.nativeElement;
|
|
1025
|
-
const boundaries = this.el.nativeElement.getBoundingClientRect();
|
|
1026
|
-
const [left, top] = this.tooltipConfig[this.position](boundaries, tooltip);
|
|
1027
|
-
tooltip.style.left = `${left}px`;
|
|
1028
|
-
tooltip.style.top = `${top}px`;
|
|
1029
|
-
tooltip.className = `aeb-tooltip aeb-tooltip--open aeb-tooltip--${this.position}`;
|
|
1030
|
-
}
|
|
1031
|
-
hideTooltip() {
|
|
1032
|
-
this.tooltipOpen = false;
|
|
1033
|
-
const tooltip = this.tooltip.tooltip.nativeElement;
|
|
1034
|
-
tooltip.className = 'aeb-tooltip';
|
|
1035
|
-
}
|
|
1036
1033
|
ngOnDestroy() {
|
|
1037
1034
|
this.hideTooltip();
|
|
1038
1035
|
this.dom.removeComponent();
|
|
@@ -1040,30 +1037,44 @@ class TooltipDirective {
|
|
|
1040
1037
|
}
|
|
1041
1038
|
ngOnInit() {
|
|
1042
1039
|
this.tooltip = this.dom.attachComponent(TooltipComponent, {
|
|
1043
|
-
|
|
1040
|
+
title: this.tooltipTitle() || '',
|
|
1041
|
+
data: this.tooltipData() || '',
|
|
1042
|
+
type: this.tooltipType() || ''
|
|
1044
1043
|
});
|
|
1045
1044
|
this.initListeners();
|
|
1046
1045
|
}
|
|
1047
1046
|
ngAfterViewInit() {
|
|
1048
1047
|
if (this.tooltipContent) {
|
|
1049
1048
|
this.tooltip = this.dom.attachComponent(TooltipComponent, {
|
|
1050
|
-
|
|
1049
|
+
contentEl: this.tooltipContent.nativeElement,
|
|
1050
|
+
html: this.tooltipContent.nativeElement.innerHTML,
|
|
1051
|
+
type: this.tooltipType() || ''
|
|
1051
1052
|
});
|
|
1052
1053
|
this.tooltipContent.nativeElement.style.display = 'none';
|
|
1053
1054
|
}
|
|
1054
1055
|
}
|
|
1055
1056
|
initListeners() {
|
|
1056
|
-
this.
|
|
1057
|
-
document.addEventListener('touchstart', this.handleDocumentTouchstart);
|
|
1058
|
-
});
|
|
1057
|
+
document.addEventListener('touchstart', this.handleDocumentTouchstart);
|
|
1059
1058
|
}
|
|
1060
1059
|
removeListeners() {
|
|
1061
|
-
this.
|
|
1062
|
-
|
|
1063
|
-
|
|
1060
|
+
document.removeEventListener('touchstart', this.handleDocumentTouchstart);
|
|
1061
|
+
}
|
|
1062
|
+
showTooltip() {
|
|
1063
|
+
this.tooltipOpen = true;
|
|
1064
|
+
const tooltip = this.tooltip.tooltip.nativeElement;
|
|
1065
|
+
const boundaries = this.el.nativeElement.getBoundingClientRect();
|
|
1066
|
+
const [left, top] = this.tooltipConfig[this.tooltipPosition()](boundaries, tooltip);
|
|
1067
|
+
tooltip.style.left = `${left}px`;
|
|
1068
|
+
tooltip.style.top = `${top}px`;
|
|
1069
|
+
tooltip.className = `aeb-tooltip aeb-tooltip--open aeb-tooltip--${this.tooltipPosition()} aeb-tooltip--${this.tooltipType()}`;
|
|
1070
|
+
}
|
|
1071
|
+
hideTooltip() {
|
|
1072
|
+
this.tooltipOpen = false;
|
|
1073
|
+
const tooltip = this.tooltip.tooltip.nativeElement;
|
|
1074
|
+
tooltip.className = 'aeb-tooltip';
|
|
1064
1075
|
}
|
|
1065
1076
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: TooltipDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1066
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
1077
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.2.4", type: TooltipDirective, isStandalone: false, selector: "[aebTooltip]", inputs: { tooltipTitle: { classPropertyName: "tooltipTitle", publicName: "tooltipTitle", isSignal: true, isRequired: false, transformFunction: null }, tooltipData: { classPropertyName: "tooltipData", publicName: "tooltipData", isSignal: true, isRequired: false, transformFunction: null }, tooltipPosition: { classPropertyName: "tooltipPosition", publicName: "tooltipPosition", isSignal: true, isRequired: false, transformFunction: null }, tooltipType: { classPropertyName: "tooltipType", publicName: "tooltipType", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { clickOutside: "clickOutside" }, host: { listeners: { "mouseleave": "onMouseLeave()", "mouseenter": "onMouseEnter()", "touch": "onClick()", "window:orientationchange": "orientationChangeHandler()" } }, queries: [{ propertyName: "tooltipContent", first: true, predicate: ["tooltipContent"], descendants: true }], ngImport: i0 }); }
|
|
1067
1078
|
}
|
|
1068
1079
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: TooltipDirective, decorators: [{
|
|
1069
1080
|
type: Directive,
|
|
@@ -1071,29 +1082,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImpor
|
|
|
1071
1082
|
selector: '[aebTooltip]',
|
|
1072
1083
|
standalone: false
|
|
1073
1084
|
}]
|
|
1074
|
-
}], ctorParameters: () => [], propDecorators: {
|
|
1075
|
-
type: Input,
|
|
1076
|
-
args: ['tooltip-data']
|
|
1077
|
-
}], position: [{
|
|
1078
|
-
type: Input,
|
|
1079
|
-
args: ['position']
|
|
1080
|
-
}], overflow: [{
|
|
1081
|
-
type: Input,
|
|
1082
|
-
args: ['overflow']
|
|
1083
|
-
}], tooltipContent: [{
|
|
1085
|
+
}], ctorParameters: () => [], propDecorators: { tooltipContent: [{
|
|
1084
1086
|
type: ContentChild,
|
|
1085
1087
|
args: ['tooltipContent']
|
|
1086
|
-
}], clickOutside: [{
|
|
1087
|
-
type: Output
|
|
1088
1088
|
}], onMouseLeave: [{
|
|
1089
1089
|
type: HostListener,
|
|
1090
1090
|
args: ['mouseleave']
|
|
1091
1091
|
}], onMouseEnter: [{
|
|
1092
1092
|
type: HostListener,
|
|
1093
|
-
args: ['mouseenter'
|
|
1093
|
+
args: ['mouseenter']
|
|
1094
1094
|
}], onClick: [{
|
|
1095
1095
|
type: HostListener,
|
|
1096
|
-
args: ['touch'
|
|
1096
|
+
args: ['touch']
|
|
1097
1097
|
}], orientationChangeHandler: [{
|
|
1098
1098
|
type: HostListener,
|
|
1099
1099
|
args: ['window:orientationchange']
|
|
@@ -1158,11 +1158,11 @@ class CommentComponent {
|
|
|
1158
1158
|
});
|
|
1159
1159
|
}
|
|
1160
1160
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: CommentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1161
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.4", type: CommentComponent, isStandalone: false, selector: "aeb-comment", inputs: { comment: "comment" }, outputs: { response: "response" }, viewQueries: [{ propertyName: "tooltip", first: true, predicate: TooltipDirective, descendants: true }], ngImport: i0, template: "<div class=\"aeb-comment\">\n <div class=\"aeb-comment__avatar-column\">\n <div class=\"aeb-comment__avatar\">\n @if (comment.avatar) {\n <img [src]=\"comment.avatar\" alt=\"Avatar\" />\n } @else {\n <div class=\"aeb-comment__initials\">\n {{ comment.firstName.slice(0, 1) }}{{ comment.lastName.slice(0, 1) }}\n </div>\n }\n </div>\n </div>\n <div class=\"aeb-comment__comment-column\">\n <div class=\"aeb-comment__author-wrapper\">\n <div class=\"aeb-comment__author-group\">\n {{ comment.group }}\n @if (comment.parentName) {\n <div class=\"aeb-comment__reply-icon\">\n <svg\n width=\"10\"\n height=\"8\"\n viewBox=\"0 0 10 8\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M4.68742 1.87519H3.7499V0.312666C3.7499 0.183289 3.67053 0.0676621 3.55052 0.0207864C3.43052 -0.0254644 3.29365 0.00703617 3.20614 0.102663L0.081095 3.54022C-0.0270317 3.65897 -0.0270317 3.84085 0.081095 3.96022L3.20614 7.39778C3.26677 7.46403 3.35115 7.50028 3.4374 7.50028C3.47552 7.50028 3.51365 7.4934 3.55052 7.47965C3.67053 7.43278 3.7499 7.31715 3.7499 7.18777V5.62525H4.61929C6.40307 5.62525 8.1306 6.26401 9.48437 7.42528C9.57624 7.50465 9.70812 7.52278 9.81812 7.47153C9.92937 7.4209 10 7.30965 10 7.18777C10 4.25835 7.61684 1.87519 4.68742 1.87519Z\"\n fill=\"#A3AAAE\"\n />\n </svg>\n </div>\n <span class=\"aeb-comment__reply-host\">\n {{ comment.parentName }}\n </span>\n }\n </div>\n <div class=\"aeb-comment__author-name\">\n {{ comment.fullName }}\n <div aebTooltip [position]=\"'right'\" class=\"aeb-comment__author-info\">\n <svg\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 16 16\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M15.5 8C15.5 12.1421 12.1421 15.5 8 15.5C3.85786 15.5 0.5 12.1421 0.5 8C0.5 3.85786 3.85786 0.5 8 0.5C12.1421 0.5 15.5 3.85786 15.5 8Z\"\n stroke=\"#27303E\"\n />\n <path\n d=\"M5.8125 6.3584C5.83529 5.78223 6.03874 5.31348 6.42285 4.95215C6.81022 4.59082 7.3457 4.41016 8.0293 4.41016C8.66732 4.41016 9.18652 4.58105 9.58691 4.92285C9.9873 5.26139 10.1875 5.69434 10.1875 6.22168C10.1875 6.92806 9.8457 7.48633 9.16211 7.89648C8.84961 8.08203 8.63639 8.25456 8.52246 8.41406C8.40853 8.57031 8.35156 8.77539 8.35156 9.0293V9.32715H7.34082L7.33594 8.93652C7.32292 8.59798 7.39128 8.3099 7.54102 8.07227C7.69401 7.83464 7.93978 7.61328 8.27832 7.4082C8.5778 7.22917 8.78613 7.05664 8.90332 6.89062C9.02051 6.72461 9.0791 6.51628 9.0791 6.26562C9.0791 5.98568 8.97819 5.75618 8.77637 5.57715C8.57454 5.39811 8.30762 5.30859 7.97559 5.30859C7.6403 5.30859 7.37012 5.40299 7.16504 5.5918C6.95996 5.7806 6.84603 6.03613 6.82324 6.3584H5.8125ZM7.85352 11.5879C7.67448 11.5879 7.52311 11.5277 7.39941 11.4072C7.27572 11.2868 7.21387 11.137 7.21387 10.958C7.21387 10.779 7.27572 10.6292 7.39941 10.5088C7.52311 10.3883 7.67448 10.3281 7.85352 10.3281C8.03581 10.3281 8.1888 10.3883 8.3125 10.5088C8.4362 10.6292 8.49805 10.779 8.49805 10.958C8.49805 11.137 8.4362 11.2868 8.3125 11.4072C8.1888 11.5277 8.03581 11.5879 7.85352 11.5879Z\"\n fill=\"#27303E\"\n />\n </svg>\n <div>\n <div class=\"aeb-comment__tooltip\">\n {{ comment.aboutAuthor }}\n </div>\n </div>\n </div>\n </div>\n </div>\n <div class=\"aeb-comment__comment-wrapper\">\n <div class=\"aeb-comment__comment-header\">\n {{ comment.title }}\n </div>\n <div class=\"aeb-comment__comment-txt\">\n {{ comment.content }}\n </div>\n </div>\n <div class=\"aeb-comment__date-response\">\n <div class=\"aeb-comment__comment-date\">\n {{ comment.date }}\n </div>\n <div class=\"aeb-comment__comment-response\" (click)=\"responseHandler()\">\n \u041E\u0442\u0432\u0435\u0442\u0438\u0442\u044C\n </div>\n </div>\n @if (onResponse) {\n <form\n class=\"aeb-comment__response-form\"\n [formGroup]=\"responseForm\"\n (submit)=\"nullTarget($event)\"\n >\n <div\n class=\"aeb-comment__input\"\n [ngClass]=\"{\n 'aeb-comment__input--error': titleError\n }\"\n >\n <aeb-form-field>\n <label aebLabel>\u0417\u0430\u0433\u043E\u043B\u043E\u0432\u043E\u043A \u043A\u043E\u043C\u043C\u0435\u043D\u0442\u0430\u0440\u0438\u044F</label>\n <label errorMessage>\u0417\u0430\u0433\u043E\u043B\u043E\u0432\u043E\u043A \u043D\u0435 \u043C\u043E\u0436\u0435\u0442 \u0431\u044B\u0442\u044C \u043F\u0443\u0441\u0442\u044B\u043C</label>\n <input aebInput type=\"text\" formControlName=\"title\" />\n </aeb-form-field>\n </div>\n <div\n class=\"aeb-comment__input\"\n [ngClass]=\"{\n 'aeb-comment__input--error': contentError\n }\"\n >\n <aeb-form-field>\n <label errorMessage>\u041F\u043E\u043B\u0435 \u043D\u0435 \u043C\u043E\u0436\u0435\u0442 \u0431\u044B\u0442\u044C \u043F\u0443\u0441\u0442\u044B\u043C</label>\n <label aebLabel>\u041F\u043E\u043B\u0435 \u043A\u043E\u043C\u043C\u0435\u043D\u0442\u0430\u0440\u0438\u044F</label>\n <textarea\n aebTextarea\n style=\"height: 140px\"\n formControlName=\"content\"\n required\n >\n </textarea>\n </aeb-form-field>\n </div>\n <div class=\"aeb-comment__submit\">\n <button aebButton (click)=\"submitHandler()\" [disabled]>\n \u041E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C\n </button>\n </div>\n </form>\n }\n @if (comment.nestedComments && comment.nestedComments.length) {\n <div (click)=\"expandHandler()\" class=\"aeb-comment__response-ctrls\">\n <div class=\"aeb-comment__responses\">\u041E\u0442\u0432\u0435\u0442\u044B</div>\n <div class=\"aeb-comment__response-counter\">\n {{ comment.nestedComments.length }}\n </div>\n <div\n class=\"aeb-comment__arrow-icon\"\n [ngClass]=\"{\n 'aeb-comment__arrow-icon--active': isExpanded\n }\"\n >\n <svg\n width=\"10\"\n height=\"6\"\n viewBox=\"0 0 10 6\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M0.999999 5L4.92929 1.07071C4.96834 1.03166 5.03166 1.03166 5.07071 1.07071L9 5\"\n stroke=\"#2F88F0\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n />\n </svg>\n </div>\n </div>\n }\n @if (\n comment.nestedComments && comment.nestedComments.length && isExpanded\n ) {\n @for (nestedComment of comment.nestedComments; track nestedComment) {\n <aeb-comment\n (response)=\"hoistHandler($event)\"\n [comment]=\"nestedComment\"\n >\n </aeb-comment>\n }\n }\n </div>\n</div>\n", styles: [".aeb-comment{display:flex;width:100%;color:var(--color-mono-900)}.aeb-comment__avatar-column{margin-right:12px}.aeb-comment__comment-column{flex-grow:1}.aeb-comment__avatar{display:flex;align-items:center;justify-content:center;width:40px;height:40px;background-color:var(--color-blue-500);border-radius:50%}.aeb-comment__avatar img{width:90%;border-radius:50%}.aeb-comment__initials{position:relative;bottom:1px;color:var(--color-mono-0)}.aeb-comment__author-group{display:flex;align-items:center;margin-bottom:4px;font-size:var(--font-size-md);font-weight:var(--font-weight-medium)}.aeb-comment__reply-icon{position:relative;bottom:4px;margin-left:32px}.aeb-comment__reply-host{margin-left:8px;font-size:var(--font-size-xxs);color:var(--color-mono-300)}.aeb-comment__author-name{display:flex;align-items:center;font-size:var(--font-size-s);color:var(--color-mono-300)}.aeb-comment__author-info{position:relative;top:3px;margin-left:12px;cursor:pointer}.aeb-comment__tooltip{max-width:200px;white-space:normal}.aeb-comment__author-wrapper{margin-bottom:20px}.aeb-comment__comment-wrapper{box-sizing:border-box;width:100%;padding:16px;background:var(--color-mono-10);border-radius:8px}.aeb-comment__comment-header{margin-bottom:10px;font-size:var(--font-size-md);font-weight:var(--font-weight-medium);color:var(--color-mono-900)}.aeb-comment__date-response{display:flex;align-items:center;margin-top:20px;margin-bottom:25px}.aeb-comment__comment-date{margin-right:30px;font-size:var(--font-size-xs);color:var(--color-mono-300)}.aeb-comment__comment-response{font-size:var(--font-size-xs);color:var(--color-blue-500);cursor:pointer}.aeb-comment__response-ctrls{display:inline-flex;align-items:center;margin-bottom:28px;cursor:pointer}.aeb-comment__responses{margin-right:15px;font-size:var(--font-size-xs);color:var(--color-mono-900)}.aeb-comment__response-counter{margin-right:12px;font-size:var(--font-size-xs);color:var(--color-mono-300)}.aeb-comment__arrow-icon{position:relative;top:2px;transform:rotate(180deg)}.aeb-comment__arrow-icon--active{top:unset;bottom:3px;transform:none}.aeb-comment__input{margin-bottom:24px}.aeb-comment__submit{display:flex;justify-content:flex-end;width:100%;margin-top:24px}.aeb-comment__response-form{margin-bottom:24px}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: TooltipDirective, selector: "[aebTooltip]", inputs: ["tooltip-data", "position", "overflow"], outputs: ["clickOutside"] }, { kind: "directive", type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3.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: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: ButtonComponent, selector: "button[aebButton], a[aebButton]", inputs: ["fill", "isWarning", "size", "variant"] }, { kind: "component", type: FormFieldComponent, selector: "aeb-form-field", inputs: ["isInvalid", "showIcon", "showDescription", "showErrorMessage", "validateOnDirty", "disabled"] }, { kind: "directive", type: FormFieldDirective, selector: "input[aebInput], textarea[aebTextarea]", inputs: ["value"] }, { kind: "directive", type: LabelDirective, selector: "[aebLabel]", inputs: ["aebLabel"] }, { kind: "directive", type: ErrorMessageDirective, selector: "[errorMessage]", inputs: ["errorMessage"] }, { kind: "component", type: CommentComponent, selector: "aeb-comment", inputs: ["comment"], outputs: ["response"] }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
1161
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.4", type: CommentComponent, isStandalone: false, selector: "aeb-comment", inputs: { comment: "comment" }, outputs: { response: "response" }, viewQueries: [{ propertyName: "tooltip", first: true, predicate: TooltipDirective, descendants: true }], ngImport: i0, template: "<div class=\"aeb-comment\">\n <div class=\"aeb-comment__avatar-column\">\n <div class=\"aeb-comment__avatar\">\n @if (comment.avatar) {\n <img [src]=\"comment.avatar\" alt=\"Avatar\" />\n } @else {\n <div class=\"aeb-comment__initials\">\n {{ comment.firstName.slice(0, 1) }}{{ comment.lastName.slice(0, 1) }}\n </div>\n }\n </div>\n </div>\n <div class=\"aeb-comment__comment-column\">\n <div class=\"aeb-comment__author-wrapper\">\n <div class=\"aeb-comment__author-group\">\n {{ comment.group }}\n @if (comment.parentName) {\n <div class=\"aeb-comment__reply-icon\">\n <svg\n width=\"10\"\n height=\"8\"\n viewBox=\"0 0 10 8\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M4.68742 1.87519H3.7499V0.312666C3.7499 0.183289 3.67053 0.0676621 3.55052 0.0207864C3.43052 -0.0254644 3.29365 0.00703617 3.20614 0.102663L0.081095 3.54022C-0.0270317 3.65897 -0.0270317 3.84085 0.081095 3.96022L3.20614 7.39778C3.26677 7.46403 3.35115 7.50028 3.4374 7.50028C3.47552 7.50028 3.51365 7.4934 3.55052 7.47965C3.67053 7.43278 3.7499 7.31715 3.7499 7.18777V5.62525H4.61929C6.40307 5.62525 8.1306 6.26401 9.48437 7.42528C9.57624 7.50465 9.70812 7.52278 9.81812 7.47153C9.92937 7.4209 10 7.30965 10 7.18777C10 4.25835 7.61684 1.87519 4.68742 1.87519Z\"\n fill=\"#A3AAAE\"\n />\n </svg>\n </div>\n <span class=\"aeb-comment__reply-host\">\n {{ comment.parentName }}\n </span>\n }\n </div>\n <div class=\"aeb-comment__author-name\">\n {{ comment.fullName }}\n <div\n aebTooltip\n [tooltipPosition]=\"'right'\"\n class=\"aeb-comment__author-info\"\n >\n <svg\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 16 16\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M15.5 8C15.5 12.1421 12.1421 15.5 8 15.5C3.85786 15.5 0.5 12.1421 0.5 8C0.5 3.85786 3.85786 0.5 8 0.5C12.1421 0.5 15.5 3.85786 15.5 8Z\"\n stroke=\"#27303E\"\n />\n <path\n d=\"M5.8125 6.3584C5.83529 5.78223 6.03874 5.31348 6.42285 4.95215C6.81022 4.59082 7.3457 4.41016 8.0293 4.41016C8.66732 4.41016 9.18652 4.58105 9.58691 4.92285C9.9873 5.26139 10.1875 5.69434 10.1875 6.22168C10.1875 6.92806 9.8457 7.48633 9.16211 7.89648C8.84961 8.08203 8.63639 8.25456 8.52246 8.41406C8.40853 8.57031 8.35156 8.77539 8.35156 9.0293V9.32715H7.34082L7.33594 8.93652C7.32292 8.59798 7.39128 8.3099 7.54102 8.07227C7.69401 7.83464 7.93978 7.61328 8.27832 7.4082C8.5778 7.22917 8.78613 7.05664 8.90332 6.89062C9.02051 6.72461 9.0791 6.51628 9.0791 6.26562C9.0791 5.98568 8.97819 5.75618 8.77637 5.57715C8.57454 5.39811 8.30762 5.30859 7.97559 5.30859C7.6403 5.30859 7.37012 5.40299 7.16504 5.5918C6.95996 5.7806 6.84603 6.03613 6.82324 6.3584H5.8125ZM7.85352 11.5879C7.67448 11.5879 7.52311 11.5277 7.39941 11.4072C7.27572 11.2868 7.21387 11.137 7.21387 10.958C7.21387 10.779 7.27572 10.6292 7.39941 10.5088C7.52311 10.3883 7.67448 10.3281 7.85352 10.3281C8.03581 10.3281 8.1888 10.3883 8.3125 10.5088C8.4362 10.6292 8.49805 10.779 8.49805 10.958C8.49805 11.137 8.4362 11.2868 8.3125 11.4072C8.1888 11.5277 8.03581 11.5879 7.85352 11.5879Z\"\n fill=\"#27303E\"\n />\n </svg>\n <div>\n <div class=\"aeb-comment__tooltip\">\n {{ comment.aboutAuthor }}\n </div>\n </div>\n </div>\n </div>\n </div>\n <div class=\"aeb-comment__comment-wrapper\">\n <div class=\"aeb-comment__comment-header\">\n {{ comment.title }}\n </div>\n <div class=\"aeb-comment__comment-txt\">\n {{ comment.content }}\n </div>\n </div>\n <div class=\"aeb-comment__date-response\">\n <div class=\"aeb-comment__comment-date\">\n {{ comment.date }}\n </div>\n <div class=\"aeb-comment__comment-response\" (click)=\"responseHandler()\">\n \u041E\u0442\u0432\u0435\u0442\u0438\u0442\u044C\n </div>\n </div>\n @if (onResponse) {\n <form\n class=\"aeb-comment__response-form\"\n [formGroup]=\"responseForm\"\n (submit)=\"nullTarget($event)\"\n >\n <div\n class=\"aeb-comment__input\"\n [ngClass]=\"{\n 'aeb-comment__input--error': titleError\n }\"\n >\n <aeb-form-field>\n <label aebLabel>\u0417\u0430\u0433\u043E\u043B\u043E\u0432\u043E\u043A \u043A\u043E\u043C\u043C\u0435\u043D\u0442\u0430\u0440\u0438\u044F</label>\n <label errorMessage>\u0417\u0430\u0433\u043E\u043B\u043E\u0432\u043E\u043A \u043D\u0435 \u043C\u043E\u0436\u0435\u0442 \u0431\u044B\u0442\u044C \u043F\u0443\u0441\u0442\u044B\u043C</label>\n <input aebInput type=\"text\" formControlName=\"title\" />\n </aeb-form-field>\n </div>\n <div\n class=\"aeb-comment__input\"\n [ngClass]=\"{\n 'aeb-comment__input--error': contentError\n }\"\n >\n <aeb-form-field>\n <label errorMessage>\u041F\u043E\u043B\u0435 \u043D\u0435 \u043C\u043E\u0436\u0435\u0442 \u0431\u044B\u0442\u044C \u043F\u0443\u0441\u0442\u044B\u043C</label>\n <label aebLabel>\u041F\u043E\u043B\u0435 \u043A\u043E\u043C\u043C\u0435\u043D\u0442\u0430\u0440\u0438\u044F</label>\n <textarea\n aebTextarea\n style=\"height: 140px\"\n formControlName=\"content\"\n required\n >\n </textarea>\n </aeb-form-field>\n </div>\n <div class=\"aeb-comment__submit\">\n <button aebButton (click)=\"submitHandler()\" [disabled]>\n \u041E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C\n </button>\n </div>\n </form>\n }\n @if (comment.nestedComments && comment.nestedComments.length) {\n <div (click)=\"expandHandler()\" class=\"aeb-comment__response-ctrls\">\n <div class=\"aeb-comment__responses\">\u041E\u0442\u0432\u0435\u0442\u044B</div>\n <div class=\"aeb-comment__response-counter\">\n {{ comment.nestedComments.length }}\n </div>\n <div\n class=\"aeb-comment__arrow-icon\"\n [ngClass]=\"{\n 'aeb-comment__arrow-icon--active': isExpanded\n }\"\n >\n <svg\n width=\"10\"\n height=\"6\"\n viewBox=\"0 0 10 6\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M0.999999 5L4.92929 1.07071C4.96834 1.03166 5.03166 1.03166 5.07071 1.07071L9 5\"\n stroke=\"#2F88F0\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n />\n </svg>\n </div>\n </div>\n }\n @if (\n comment.nestedComments && comment.nestedComments.length && isExpanded\n ) {\n @for (nestedComment of comment.nestedComments; track nestedComment) {\n <aeb-comment\n (response)=\"hoistHandler($event)\"\n [comment]=\"nestedComment\"\n >\n </aeb-comment>\n }\n }\n </div>\n</div>\n", styles: [".aeb-comment{display:flex;width:100%;color:var(--color-mono-900)}.aeb-comment__avatar-column{margin-right:12px}.aeb-comment__comment-column{flex-grow:1}.aeb-comment__avatar{display:flex;align-items:center;justify-content:center;width:40px;height:40px;background-color:var(--color-blue-500);border-radius:50%}.aeb-comment__avatar img{width:90%;border-radius:50%}.aeb-comment__initials{position:relative;bottom:1px;color:var(--color-mono-0)}.aeb-comment__author-group{display:flex;align-items:center;margin-bottom:4px;font-size:var(--font-size-md);font-weight:var(--font-weight-medium)}.aeb-comment__reply-icon{position:relative;bottom:4px;margin-left:32px}.aeb-comment__reply-host{margin-left:8px;font-size:var(--font-size-xxs);color:var(--color-mono-300)}.aeb-comment__author-name{display:flex;align-items:center;font-size:var(--font-size-s);color:var(--color-mono-300)}.aeb-comment__author-info{position:relative;top:3px;margin-left:12px;cursor:pointer}.aeb-comment__tooltip{max-width:200px;white-space:normal}.aeb-comment__author-wrapper{margin-bottom:20px}.aeb-comment__comment-wrapper{box-sizing:border-box;width:100%;padding:16px;background:var(--color-mono-10);border-radius:8px}.aeb-comment__comment-header{margin-bottom:10px;font-size:var(--font-size-md);font-weight:var(--font-weight-medium);color:var(--color-mono-900)}.aeb-comment__date-response{display:flex;align-items:center;margin-top:20px;margin-bottom:25px}.aeb-comment__comment-date{margin-right:30px;font-size:var(--font-size-xs);color:var(--color-mono-300)}.aeb-comment__comment-response{font-size:var(--font-size-xs);color:var(--color-blue-500);cursor:pointer}.aeb-comment__response-ctrls{display:inline-flex;align-items:center;margin-bottom:28px;cursor:pointer}.aeb-comment__responses{margin-right:15px;font-size:var(--font-size-xs);color:var(--color-mono-900)}.aeb-comment__response-counter{margin-right:12px;font-size:var(--font-size-xs);color:var(--color-mono-300)}.aeb-comment__arrow-icon{position:relative;top:2px;transform:rotate(180deg)}.aeb-comment__arrow-icon--active{top:unset;bottom:3px;transform:none}.aeb-comment__input{margin-bottom:24px}.aeb-comment__submit{display:flex;justify-content:flex-end;width:100%;margin-top:24px}.aeb-comment__response-form{margin-bottom:24px}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: TooltipDirective, selector: "[aebTooltip]", inputs: ["tooltipTitle", "tooltipData", "tooltipPosition", "tooltipType"], outputs: ["clickOutside"] }, { kind: "directive", type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3.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: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: ButtonComponent, selector: "button[aebButton], a[aebButton]", inputs: ["fill", "isWarning", "size", "variant"] }, { kind: "component", type: FormFieldComponent, selector: "aeb-form-field", inputs: ["isInvalid", "showIcon", "showDescription", "showErrorMessage", "validateOnDirty", "disabled"] }, { kind: "directive", type: FormFieldDirective, selector: "input[aebInput], textarea[aebTextarea]", inputs: ["value"] }, { kind: "directive", type: LabelDirective, selector: "[aebLabel]", inputs: ["aebLabel"] }, { kind: "directive", type: ErrorMessageDirective, selector: "[errorMessage]", inputs: ["errorMessage"] }, { kind: "component", type: CommentComponent, selector: "aeb-comment", inputs: ["comment"], outputs: ["response"] }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
1162
1162
|
}
|
|
1163
1163
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: CommentComponent, decorators: [{
|
|
1164
1164
|
type: Component,
|
|
1165
|
-
args: [{ selector: 'aeb-comment', encapsulation: ViewEncapsulation.None, standalone: false, template: "<div class=\"aeb-comment\">\n <div class=\"aeb-comment__avatar-column\">\n <div class=\"aeb-comment__avatar\">\n @if (comment.avatar) {\n <img [src]=\"comment.avatar\" alt=\"Avatar\" />\n } @else {\n <div class=\"aeb-comment__initials\">\n {{ comment.firstName.slice(0, 1) }}{{ comment.lastName.slice(0, 1) }}\n </div>\n }\n </div>\n </div>\n <div class=\"aeb-comment__comment-column\">\n <div class=\"aeb-comment__author-wrapper\">\n <div class=\"aeb-comment__author-group\">\n {{ comment.group }}\n @if (comment.parentName) {\n <div class=\"aeb-comment__reply-icon\">\n <svg\n width=\"10\"\n height=\"8\"\n viewBox=\"0 0 10 8\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M4.68742 1.87519H3.7499V0.312666C3.7499 0.183289 3.67053 0.0676621 3.55052 0.0207864C3.43052 -0.0254644 3.29365 0.00703617 3.20614 0.102663L0.081095 3.54022C-0.0270317 3.65897 -0.0270317 3.84085 0.081095 3.96022L3.20614 7.39778C3.26677 7.46403 3.35115 7.50028 3.4374 7.50028C3.47552 7.50028 3.51365 7.4934 3.55052 7.47965C3.67053 7.43278 3.7499 7.31715 3.7499 7.18777V5.62525H4.61929C6.40307 5.62525 8.1306 6.26401 9.48437 7.42528C9.57624 7.50465 9.70812 7.52278 9.81812 7.47153C9.92937 7.4209 10 7.30965 10 7.18777C10 4.25835 7.61684 1.87519 4.68742 1.87519Z\"\n fill=\"#A3AAAE\"\n />\n </svg>\n </div>\n <span class=\"aeb-comment__reply-host\">\n {{ comment.parentName }}\n </span>\n }\n </div>\n <div class=\"aeb-comment__author-name\">\n {{ comment.fullName }}\n <div
|
|
1165
|
+
args: [{ selector: 'aeb-comment', encapsulation: ViewEncapsulation.None, standalone: false, template: "<div class=\"aeb-comment\">\n <div class=\"aeb-comment__avatar-column\">\n <div class=\"aeb-comment__avatar\">\n @if (comment.avatar) {\n <img [src]=\"comment.avatar\" alt=\"Avatar\" />\n } @else {\n <div class=\"aeb-comment__initials\">\n {{ comment.firstName.slice(0, 1) }}{{ comment.lastName.slice(0, 1) }}\n </div>\n }\n </div>\n </div>\n <div class=\"aeb-comment__comment-column\">\n <div class=\"aeb-comment__author-wrapper\">\n <div class=\"aeb-comment__author-group\">\n {{ comment.group }}\n @if (comment.parentName) {\n <div class=\"aeb-comment__reply-icon\">\n <svg\n width=\"10\"\n height=\"8\"\n viewBox=\"0 0 10 8\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M4.68742 1.87519H3.7499V0.312666C3.7499 0.183289 3.67053 0.0676621 3.55052 0.0207864C3.43052 -0.0254644 3.29365 0.00703617 3.20614 0.102663L0.081095 3.54022C-0.0270317 3.65897 -0.0270317 3.84085 0.081095 3.96022L3.20614 7.39778C3.26677 7.46403 3.35115 7.50028 3.4374 7.50028C3.47552 7.50028 3.51365 7.4934 3.55052 7.47965C3.67053 7.43278 3.7499 7.31715 3.7499 7.18777V5.62525H4.61929C6.40307 5.62525 8.1306 6.26401 9.48437 7.42528C9.57624 7.50465 9.70812 7.52278 9.81812 7.47153C9.92937 7.4209 10 7.30965 10 7.18777C10 4.25835 7.61684 1.87519 4.68742 1.87519Z\"\n fill=\"#A3AAAE\"\n />\n </svg>\n </div>\n <span class=\"aeb-comment__reply-host\">\n {{ comment.parentName }}\n </span>\n }\n </div>\n <div class=\"aeb-comment__author-name\">\n {{ comment.fullName }}\n <div\n aebTooltip\n [tooltipPosition]=\"'right'\"\n class=\"aeb-comment__author-info\"\n >\n <svg\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 16 16\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M15.5 8C15.5 12.1421 12.1421 15.5 8 15.5C3.85786 15.5 0.5 12.1421 0.5 8C0.5 3.85786 3.85786 0.5 8 0.5C12.1421 0.5 15.5 3.85786 15.5 8Z\"\n stroke=\"#27303E\"\n />\n <path\n d=\"M5.8125 6.3584C5.83529 5.78223 6.03874 5.31348 6.42285 4.95215C6.81022 4.59082 7.3457 4.41016 8.0293 4.41016C8.66732 4.41016 9.18652 4.58105 9.58691 4.92285C9.9873 5.26139 10.1875 5.69434 10.1875 6.22168C10.1875 6.92806 9.8457 7.48633 9.16211 7.89648C8.84961 8.08203 8.63639 8.25456 8.52246 8.41406C8.40853 8.57031 8.35156 8.77539 8.35156 9.0293V9.32715H7.34082L7.33594 8.93652C7.32292 8.59798 7.39128 8.3099 7.54102 8.07227C7.69401 7.83464 7.93978 7.61328 8.27832 7.4082C8.5778 7.22917 8.78613 7.05664 8.90332 6.89062C9.02051 6.72461 9.0791 6.51628 9.0791 6.26562C9.0791 5.98568 8.97819 5.75618 8.77637 5.57715C8.57454 5.39811 8.30762 5.30859 7.97559 5.30859C7.6403 5.30859 7.37012 5.40299 7.16504 5.5918C6.95996 5.7806 6.84603 6.03613 6.82324 6.3584H5.8125ZM7.85352 11.5879C7.67448 11.5879 7.52311 11.5277 7.39941 11.4072C7.27572 11.2868 7.21387 11.137 7.21387 10.958C7.21387 10.779 7.27572 10.6292 7.39941 10.5088C7.52311 10.3883 7.67448 10.3281 7.85352 10.3281C8.03581 10.3281 8.1888 10.3883 8.3125 10.5088C8.4362 10.6292 8.49805 10.779 8.49805 10.958C8.49805 11.137 8.4362 11.2868 8.3125 11.4072C8.1888 11.5277 8.03581 11.5879 7.85352 11.5879Z\"\n fill=\"#27303E\"\n />\n </svg>\n <div>\n <div class=\"aeb-comment__tooltip\">\n {{ comment.aboutAuthor }}\n </div>\n </div>\n </div>\n </div>\n </div>\n <div class=\"aeb-comment__comment-wrapper\">\n <div class=\"aeb-comment__comment-header\">\n {{ comment.title }}\n </div>\n <div class=\"aeb-comment__comment-txt\">\n {{ comment.content }}\n </div>\n </div>\n <div class=\"aeb-comment__date-response\">\n <div class=\"aeb-comment__comment-date\">\n {{ comment.date }}\n </div>\n <div class=\"aeb-comment__comment-response\" (click)=\"responseHandler()\">\n \u041E\u0442\u0432\u0435\u0442\u0438\u0442\u044C\n </div>\n </div>\n @if (onResponse) {\n <form\n class=\"aeb-comment__response-form\"\n [formGroup]=\"responseForm\"\n (submit)=\"nullTarget($event)\"\n >\n <div\n class=\"aeb-comment__input\"\n [ngClass]=\"{\n 'aeb-comment__input--error': titleError\n }\"\n >\n <aeb-form-field>\n <label aebLabel>\u0417\u0430\u0433\u043E\u043B\u043E\u0432\u043E\u043A \u043A\u043E\u043C\u043C\u0435\u043D\u0442\u0430\u0440\u0438\u044F</label>\n <label errorMessage>\u0417\u0430\u0433\u043E\u043B\u043E\u0432\u043E\u043A \u043D\u0435 \u043C\u043E\u0436\u0435\u0442 \u0431\u044B\u0442\u044C \u043F\u0443\u0441\u0442\u044B\u043C</label>\n <input aebInput type=\"text\" formControlName=\"title\" />\n </aeb-form-field>\n </div>\n <div\n class=\"aeb-comment__input\"\n [ngClass]=\"{\n 'aeb-comment__input--error': contentError\n }\"\n >\n <aeb-form-field>\n <label errorMessage>\u041F\u043E\u043B\u0435 \u043D\u0435 \u043C\u043E\u0436\u0435\u0442 \u0431\u044B\u0442\u044C \u043F\u0443\u0441\u0442\u044B\u043C</label>\n <label aebLabel>\u041F\u043E\u043B\u0435 \u043A\u043E\u043C\u043C\u0435\u043D\u0442\u0430\u0440\u0438\u044F</label>\n <textarea\n aebTextarea\n style=\"height: 140px\"\n formControlName=\"content\"\n required\n >\n </textarea>\n </aeb-form-field>\n </div>\n <div class=\"aeb-comment__submit\">\n <button aebButton (click)=\"submitHandler()\" [disabled]>\n \u041E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C\n </button>\n </div>\n </form>\n }\n @if (comment.nestedComments && comment.nestedComments.length) {\n <div (click)=\"expandHandler()\" class=\"aeb-comment__response-ctrls\">\n <div class=\"aeb-comment__responses\">\u041E\u0442\u0432\u0435\u0442\u044B</div>\n <div class=\"aeb-comment__response-counter\">\n {{ comment.nestedComments.length }}\n </div>\n <div\n class=\"aeb-comment__arrow-icon\"\n [ngClass]=\"{\n 'aeb-comment__arrow-icon--active': isExpanded\n }\"\n >\n <svg\n width=\"10\"\n height=\"6\"\n viewBox=\"0 0 10 6\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M0.999999 5L4.92929 1.07071C4.96834 1.03166 5.03166 1.03166 5.07071 1.07071L9 5\"\n stroke=\"#2F88F0\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n />\n </svg>\n </div>\n </div>\n }\n @if (\n comment.nestedComments && comment.nestedComments.length && isExpanded\n ) {\n @for (nestedComment of comment.nestedComments; track nestedComment) {\n <aeb-comment\n (response)=\"hoistHandler($event)\"\n [comment]=\"nestedComment\"\n >\n </aeb-comment>\n }\n }\n </div>\n</div>\n", styles: [".aeb-comment{display:flex;width:100%;color:var(--color-mono-900)}.aeb-comment__avatar-column{margin-right:12px}.aeb-comment__comment-column{flex-grow:1}.aeb-comment__avatar{display:flex;align-items:center;justify-content:center;width:40px;height:40px;background-color:var(--color-blue-500);border-radius:50%}.aeb-comment__avatar img{width:90%;border-radius:50%}.aeb-comment__initials{position:relative;bottom:1px;color:var(--color-mono-0)}.aeb-comment__author-group{display:flex;align-items:center;margin-bottom:4px;font-size:var(--font-size-md);font-weight:var(--font-weight-medium)}.aeb-comment__reply-icon{position:relative;bottom:4px;margin-left:32px}.aeb-comment__reply-host{margin-left:8px;font-size:var(--font-size-xxs);color:var(--color-mono-300)}.aeb-comment__author-name{display:flex;align-items:center;font-size:var(--font-size-s);color:var(--color-mono-300)}.aeb-comment__author-info{position:relative;top:3px;margin-left:12px;cursor:pointer}.aeb-comment__tooltip{max-width:200px;white-space:normal}.aeb-comment__author-wrapper{margin-bottom:20px}.aeb-comment__comment-wrapper{box-sizing:border-box;width:100%;padding:16px;background:var(--color-mono-10);border-radius:8px}.aeb-comment__comment-header{margin-bottom:10px;font-size:var(--font-size-md);font-weight:var(--font-weight-medium);color:var(--color-mono-900)}.aeb-comment__date-response{display:flex;align-items:center;margin-top:20px;margin-bottom:25px}.aeb-comment__comment-date{margin-right:30px;font-size:var(--font-size-xs);color:var(--color-mono-300)}.aeb-comment__comment-response{font-size:var(--font-size-xs);color:var(--color-blue-500);cursor:pointer}.aeb-comment__response-ctrls{display:inline-flex;align-items:center;margin-bottom:28px;cursor:pointer}.aeb-comment__responses{margin-right:15px;font-size:var(--font-size-xs);color:var(--color-mono-900)}.aeb-comment__response-counter{margin-right:12px;font-size:var(--font-size-xs);color:var(--color-mono-300)}.aeb-comment__arrow-icon{position:relative;top:2px;transform:rotate(180deg)}.aeb-comment__arrow-icon--active{top:unset;bottom:3px;transform:none}.aeb-comment__input{margin-bottom:24px}.aeb-comment__submit{display:flex;justify-content:flex-end;width:100%;margin-top:24px}.aeb-comment__response-form{margin-bottom:24px}\n"] }]
|
|
1166
1166
|
}], propDecorators: { comment: [{
|
|
1167
1167
|
type: Input
|
|
1168
1168
|
}], response: [{
|
|
@@ -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.
|
|
3507
|
-
this.
|
|
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
|
|
3512
|
-
this.state
|
|
3544
|
+
this.isHovered.set(true);
|
|
3545
|
+
this.state.set('open');
|
|
3513
3546
|
clearTimeout(this.timeout);
|
|
3514
3547
|
}
|
|
3515
3548
|
onLeave() {
|
|
3516
|
-
this.isHovered
|
|
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();
|
|
3553
|
+
this.clickNotification.emit(this.id());
|
|
3527
3554
|
}
|
|
3528
|
-
|
|
3529
|
-
|
|
3530
|
-
|
|
3531
|
-
// когда меняется свойство lifeTime, обнуляем таймер и отменяем анимацию исчезновения
|
|
3532
|
-
// затем запускаем таймер заново
|
|
3533
|
-
this.state = 'open';
|
|
3534
|
-
clearTimeout(this.timeout);
|
|
3535
|
-
if (!this.isHovered) {
|
|
3536
|
-
this.waitUntilClose();
|
|
3537
|
-
}
|
|
3538
|
-
}
|
|
3539
|
-
}
|
|
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
|
-
|
|
3572
|
+
const lifeTime = this.lifeTime();
|
|
3573
|
+
if (lifeTime === 0 || lifeTime === undefined) {
|
|
3557
3574
|
return;
|
|
3558
3575
|
}
|
|
3559
3576
|
this.timeout = setTimeout(() => {
|
|
3560
|
-
this.state
|
|
3561
|
-
},
|
|
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: "
|
|
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('
|
|
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('
|
|
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
|
|
3591
|
-
}], propDecorators: {
|
|
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.
|
|
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 [
|
|
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,
|
|
3647
|
-
|
|
3648
|
-
|
|
3649
|
-
|
|
3650
|
-
|
|
3651
|
-
|
|
3652
|
-
|
|
3653
|
-
|
|
3654
|
-
|
|
3655
|
-
|
|
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']
|