aeb-ui-kit 9.1.0-preview.1135 → 9.1.0-preview.1143
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 +418 -47
- package/fesm2022/aeb-ui-kit.mjs.map +1 -1
- package/index.d.ts +55 -12
- package/package.json +1 -1
package/fesm2022/aeb-ui-kit.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { signal, viewChild, input, computed, effect, HostBinding, ViewEncapsulation, Component, NgModule, Input, Directive, inject, ElementRef, HostListener, ContentChild, ChangeDetectionStrategy, Renderer2, EventEmitter, forwardRef, Output, ViewChild, ComponentFactoryResolver, Injector, ApplicationRef, RendererFactory2, Injectable, output, Pipe, LOCALE_ID, ChangeDetectorRef, 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';
|
|
@@ -12,35 +12,62 @@ import '@angular/common/locales/global/ru';
|
|
|
12
12
|
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
13
13
|
|
|
14
14
|
class AccordionComponent {
|
|
15
|
+
get isOpen() {
|
|
16
|
+
return this._isOpen();
|
|
17
|
+
}
|
|
18
|
+
get isPrimary() {
|
|
19
|
+
return this.type() === 'primary';
|
|
20
|
+
}
|
|
21
|
+
get isSecondary() {
|
|
22
|
+
return this.type() === 'secondary';
|
|
23
|
+
}
|
|
15
24
|
constructor() {
|
|
16
|
-
this.
|
|
25
|
+
this._isOpen = signal(false, ...(ngDevMode ? [{ debugName: "_isOpen" }] : []));
|
|
26
|
+
this.content = viewChild('content', ...(ngDevMode ? [{ debugName: "content" }] : []));
|
|
27
|
+
this._contentHeight = signal(0, ...(ngDevMode ? [{ debugName: "_contentHeight" }] : []));
|
|
28
|
+
this.isAccordion = true;
|
|
29
|
+
this.header = input('', ...(ngDevMode ? [{ debugName: "header" }] : []));
|
|
30
|
+
this.type = input('primary', ...(ngDevMode ? [{ debugName: "type" }] : []));
|
|
31
|
+
this.contentHeight = computed(() => this._contentHeight(), ...(ngDevMode ? [{ debugName: "contentHeight" }] : []));
|
|
32
|
+
effect(() => {
|
|
33
|
+
const contentEl = this.content();
|
|
34
|
+
if (contentEl) {
|
|
35
|
+
this.setupResizeObserver(contentEl.nativeElement);
|
|
36
|
+
this._contentHeight.set(contentEl.nativeElement.scrollHeight);
|
|
37
|
+
}
|
|
38
|
+
});
|
|
17
39
|
}
|
|
18
|
-
|
|
19
|
-
this.
|
|
20
|
-
this.normalizeTransition();
|
|
40
|
+
ngOnDestroy() {
|
|
41
|
+
this.resizeObserver?.disconnect();
|
|
21
42
|
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
this.content.nativeElement.style.height = `${this.content.nativeElement.scrollHeight}px`;
|
|
25
|
-
}
|
|
26
|
-
else {
|
|
27
|
-
this.content.nativeElement.style.height = '0';
|
|
28
|
-
}
|
|
43
|
+
openHandler() {
|
|
44
|
+
this._isOpen.set(!this._isOpen());
|
|
29
45
|
}
|
|
30
|
-
|
|
31
|
-
this.
|
|
46
|
+
setupResizeObserver(element) {
|
|
47
|
+
this.resizeObserver?.disconnect();
|
|
48
|
+
this.resizeObserver = new ResizeObserver(() => {
|
|
49
|
+
this._contentHeight.set(element.scrollHeight);
|
|
50
|
+
});
|
|
51
|
+
this.resizeObserver.observe(element);
|
|
32
52
|
}
|
|
33
53
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: AccordionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
34
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
54
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "20.2.4", type: AccordionComponent, isStandalone: false, selector: "aeb-accordion", inputs: { header: { classPropertyName: "header", publicName: "header", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.aeb-accordion": "this.isAccordion", "class.aeb-accordion--open": "this.isOpen", "class.aeb-accordion--primary": "this.isPrimary", "class.aeb-accordion--secondary": "this.isSecondary" } }, viewQueries: [{ propertyName: "content", first: true, predicate: ["content"], descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"aeb-accordion__header\" (click)=\"openHandler()\">\n <span class=\"aeb-accordion__heading\">\n {{ header() }}\n </span>\n <div class=\"aeb-accordion__arrow-icon\">\n <svg\n width=\"32\"\n height=\"32\"\n viewBox=\"0 0 32 32\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M6.66675 11.3333L15.6465 20.3131C15.8418 20.5083 16.1584 20.5083 16.3536 20.3131L25.3334 11.3333\"\n stroke=\"#1F2632\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n />\n </svg>\n </div>\n</div>\n<div\n class=\"aeb-accordion__content\"\n [style.height]=\"isOpen ? contentHeight() + 'px' : '0'\"\n>\n <div #content class=\"aeb-accordion__content-inner\">\n <ng-content />\n </div>\n</div>\n", styles: [".aeb-accordion{display:block;box-sizing:border-box;width:100%;color:var(--c-t-primary);cursor:pointer;border-radius:32px;transition:background-color .2s;-webkit-user-select:none;user-select:none;overflow:hidden}@media screen and (max-width: 599px){.aeb-accordion{border-radius:20px}}@media screen and (min-width: 600px) and (max-width: 1200px){.aeb-accordion{border-radius:24px}}.aeb-accordion--primary{background-color:var(--c-bg-light);box-shadow:0 2px 8px #27303e1a}.aeb-accordion--secondary{background-color:var(--c-bg-surface)}.aeb-accordion__header{display:flex;align-items:center;justify-content:space-between;padding:32px;font-size:22px;font-weight:500}.aeb-accordion__header:hover .aeb-accordion__heading{color:var(--c-t-secondary)}.aeb-accordion__header:hover .aeb-accordion__arrow-icon svg path{stroke:var(--c-i-secondary)}@media screen and (max-width: 599px){.aeb-accordion__header{padding:20px;font-size:16px}}@media screen and (min-width: 600px) and (max-width: 1200px){.aeb-accordion__header{padding:24px;font-size:18px}}.aeb-accordion__arrow-icon{display:flex;align-items:center;transition:transform .4s ease-in-out;width:32px;height:32px}@media screen and (max-width: 1200px){.aeb-accordion__arrow-icon{width:24px;height:24px}}.aeb-accordion__content{overflow:hidden;height:0;transition:height .4s ease-in-out;background-color:var(--c-bg-light)}.aeb-accordion__content-inner{padding:0 32px 32px;line-height:1.6;-webkit-user-select:text;user-select:text}@media screen and (max-width: 599px){.aeb-accordion__content-inner{padding:0 20px 20px}}@media screen and (min-width: 600px) and (max-width: 1200px){.aeb-accordion__content-inner{padding:0 24px 24px}}.aeb-accordion--open .aeb-accordion__arrow-icon{transform:rotate(180deg)}\n"], encapsulation: i0.ViewEncapsulation.None }); }
|
|
35
55
|
}
|
|
36
56
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: AccordionComponent, decorators: [{
|
|
37
57
|
type: Component,
|
|
38
|
-
args: [{ selector: 'aeb-accordion', encapsulation: ViewEncapsulation.None, standalone: false, template: "<div class=\"aeb-
|
|
39
|
-
}], propDecorators: {
|
|
40
|
-
type:
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
58
|
+
args: [{ selector: 'aeb-accordion', encapsulation: ViewEncapsulation.None, standalone: false, template: "<div class=\"aeb-accordion__header\" (click)=\"openHandler()\">\n <span class=\"aeb-accordion__heading\">\n {{ header() }}\n </span>\n <div class=\"aeb-accordion__arrow-icon\">\n <svg\n width=\"32\"\n height=\"32\"\n viewBox=\"0 0 32 32\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M6.66675 11.3333L15.6465 20.3131C15.8418 20.5083 16.1584 20.5083 16.3536 20.3131L25.3334 11.3333\"\n stroke=\"#1F2632\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n />\n </svg>\n </div>\n</div>\n<div\n class=\"aeb-accordion__content\"\n [style.height]=\"isOpen ? contentHeight() + 'px' : '0'\"\n>\n <div #content class=\"aeb-accordion__content-inner\">\n <ng-content />\n </div>\n</div>\n", styles: [".aeb-accordion{display:block;box-sizing:border-box;width:100%;color:var(--c-t-primary);cursor:pointer;border-radius:32px;transition:background-color .2s;-webkit-user-select:none;user-select:none;overflow:hidden}@media screen and (max-width: 599px){.aeb-accordion{border-radius:20px}}@media screen and (min-width: 600px) and (max-width: 1200px){.aeb-accordion{border-radius:24px}}.aeb-accordion--primary{background-color:var(--c-bg-light);box-shadow:0 2px 8px #27303e1a}.aeb-accordion--secondary{background-color:var(--c-bg-surface)}.aeb-accordion__header{display:flex;align-items:center;justify-content:space-between;padding:32px;font-size:22px;font-weight:500}.aeb-accordion__header:hover .aeb-accordion__heading{color:var(--c-t-secondary)}.aeb-accordion__header:hover .aeb-accordion__arrow-icon svg path{stroke:var(--c-i-secondary)}@media screen and (max-width: 599px){.aeb-accordion__header{padding:20px;font-size:16px}}@media screen and (min-width: 600px) and (max-width: 1200px){.aeb-accordion__header{padding:24px;font-size:18px}}.aeb-accordion__arrow-icon{display:flex;align-items:center;transition:transform .4s ease-in-out;width:32px;height:32px}@media screen and (max-width: 1200px){.aeb-accordion__arrow-icon{width:24px;height:24px}}.aeb-accordion__content{overflow:hidden;height:0;transition:height .4s ease-in-out;background-color:var(--c-bg-light)}.aeb-accordion__content-inner{padding:0 32px 32px;line-height:1.6;-webkit-user-select:text;user-select:text}@media screen and (max-width: 599px){.aeb-accordion__content-inner{padding:0 20px 20px}}@media screen and (min-width: 600px) and (max-width: 1200px){.aeb-accordion__content-inner{padding:0 24px 24px}}.aeb-accordion--open .aeb-accordion__arrow-icon{transform:rotate(180deg)}\n"] }]
|
|
59
|
+
}], ctorParameters: () => [], propDecorators: { isAccordion: [{
|
|
60
|
+
type: HostBinding,
|
|
61
|
+
args: ['class.aeb-accordion']
|
|
62
|
+
}], isOpen: [{
|
|
63
|
+
type: HostBinding,
|
|
64
|
+
args: ['class.aeb-accordion--open']
|
|
65
|
+
}], isPrimary: [{
|
|
66
|
+
type: HostBinding,
|
|
67
|
+
args: ['class.aeb-accordion--primary']
|
|
68
|
+
}], isSecondary: [{
|
|
69
|
+
type: HostBinding,
|
|
70
|
+
args: ['class.aeb-accordion--secondary']
|
|
44
71
|
}] } });
|
|
45
72
|
|
|
46
73
|
class AccordionModule {
|
|
@@ -456,6 +483,9 @@ class CodeInputComponent {
|
|
|
456
483
|
this.onChange = () => { };
|
|
457
484
|
this.onTouch = () => { };
|
|
458
485
|
}
|
|
486
|
+
get isCodeInput() {
|
|
487
|
+
return true;
|
|
488
|
+
}
|
|
459
489
|
get arrayInputValue() {
|
|
460
490
|
return this.inputValue.split('');
|
|
461
491
|
}
|
|
@@ -541,13 +571,13 @@ class CodeInputComponent {
|
|
|
541
571
|
}
|
|
542
572
|
}
|
|
543
573
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: CodeInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
544
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.4", type: CodeInputComponent, isStandalone: false, selector: "aeb-code-input", inputs: { title: "title", secondsUntilRetry: "secondsUntilRetry", tip: "tip", errorMessage: "errorMessage", codeLength: "codeLength", disabled: "disabled", hasError: "hasError", isAutofocus: "isAutofocus", isResendable: "isResendable" }, outputs: { codeCompleted: "codeCompleted", timeOut: "timeOut", resendClick: "resendClick" }, providers: [
|
|
574
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.4", type: CodeInputComponent, isStandalone: false, selector: "aeb-code-input", inputs: { title: "title", secondsUntilRetry: "secondsUntilRetry", tip: "tip", errorMessage: "errorMessage", codeLength: "codeLength", disabled: "disabled", hasError: "hasError", isAutofocus: "isAutofocus", isResendable: "isResendable" }, outputs: { codeCompleted: "codeCompleted", timeOut: "timeOut", resendClick: "resendClick" }, host: { properties: { "class.aeb-code-input": "this.isCodeInput" } }, providers: [
|
|
545
575
|
{
|
|
546
576
|
provide: NG_VALUE_ACCESSOR,
|
|
547
577
|
useExisting: forwardRef(() => CodeInputComponent),
|
|
548
578
|
multi: true
|
|
549
579
|
}
|
|
550
|
-
], viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true }], ngImport: i0, template: "
|
|
580
|
+
], viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true }], ngImport: i0, template: "@if (title) {\n <h2 class=\"aeb-code-input__title\">{{ title }}</h2>\n}\n@if (tip) {\n <span class=\"aeb-code-input__tip\">{{ tip }}</span>\n}\n<div\n class=\"aeb-code-input__field-wrapper\"\n (click)=\"input.focus(); isFocus = true\"\n>\n <input\n class=\"aeb-code-input__field\"\n #input\n [maxLength]=\"codeLength\"\n [value]=\"inputValue\"\n [disabled]=\"disabled\"\n inputmode=\"numeric\"\n [autofocus]=\"isAutofocus\"\n autocomplete=\"one-time-code\"\n pattern=\"[0-9]\"\n (blur)=\"handleInputBlur()\"\n (keypress)=\"numbersOnly($event)\"\n (input)=\"inputChangeHandler($event)\"\n />\n @for (value of [].constructor(codeLength); track $index) {\n <span\n class=\"aeb-code-input__field-input\"\n [ngClass]=\"{\n 'aeb-code-input__field-input--active':\n inputValue.length === $index && isFocus && !disabled,\n 'aeb-code-input__field-input--has-error': hasError\n }\"\n >\n {{ arrayInputValue[$index] }}\n <div\n [ngClass]=\"{\n 'aeb-code-input__field-input-caret':\n inputValue.length === $index && isFocus && !disabled,\n 'aeb-code-input__field-input-caret--has-error':\n inputValue.length === $index && isFocus && !disabled && hasError\n }\"\n ></div>\n </span>\n }\n</div>\n@if (hasError || isResendable) {\n <div class=\"aeb-code-input__text\">\n @if (hasError) {\n <span class=\"aeb-code-input__text-wrong\">{{ errorMessage }}</span>\n }\n @if (isResendable) {\n @if (showTimer) {\n <div class=\"aeb-code-input__text-wrapper\">\n <span class=\"aeb-code-input__text-info\"\n >\u0417\u0430\u043F\u0440\u043E\u0441\u0438\u0442\u044C \u043F\u043E\u0432\u0442\u043E\u0440\u043D\u0443\u044E \u043E\u0442\u043F\u0440\u0430\u0432\u043A\u0443 \u043C\u043E\u0436\u043D\u043E \u0447\u0435\u0440\u0435\u0437\n </span>\n <span class=\"aeb-code-input__text-time\">{{ seconds$ | async }}</span>\n </div>\n }\n @if (showCodeText) {\n <span class=\"aeb-code-input__text-again\" (click)=\"resend()\"\n >\u041E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C \u043A\u043E\u0434 \u043F\u043E\u0432\u0442\u043E\u0440\u043D\u043E</span\n >\n }\n }\n </div>\n}\n", styles: [".aeb-code-input{display:flex;flex-direction:column;align-items:center;color:var(--c-t-primary);background-color:none}@media screen and (max-width: 599px){.aeb-code-input{width:100%;box-sizing:border-box}}.aeb-code-input__field-wrapper{position:relative;display:flex;justify-content:center;gap:16px}.aeb-code-input__field{position:absolute;width:100%;height:56px;box-sizing:border-box;background:transparent;border:none;color:transparent;outline:none;-webkit-user-select:none;user-select:none;caret-color:transparent;z-index:10;pointer-events:none}.aeb-code-input__field::selection{background:transparent}.aeb-code-input__field-input{width:56px;height:64px;display:flex;justify-content:center;align-items:center;border:var(--border-skinny) solid var(--c-bg-surface-medium);border-radius:var(--border-rounded);box-sizing:border-box;font-size:var(--font-size-lm);font-weight:500;cursor:text}@media screen and (max-width: 599px){.aeb-code-input__field-input{width:48px;height:56px;font-size:var(--font-size-l)}}.aeb-code-input__field-input--active{border:var(--border-skinny) solid var(--c-t-links)}.aeb-code-input__field-input--has-error{border:var(--border-skinny) solid var(--c-t-critical);background-color:var(--c-btn-ws-default)}.aeb-code-input__field-input-caret{width:2px;height:24px;background-color:var(--c-t-links);animation-name:flicker;animation-duration:1s;animation-iteration-count:infinite}.aeb-code-input__field-input-caret--has-error{background-color:var(--c-t-critical)}@keyframes flicker{0%{opacity:0}to{opacity:1}}.aeb-code-input__title{width:fit-content;margin:0 0 16px;font-size:var(--font-size-l);text-align:center;font-weight:500}@media screen and (max-width: 599px){.aeb-code-input__title{font-size:18px;margin:0 0 8px}}.aeb-code-input__tip{margin-bottom:32px;text-align:center;color:var(--c-t-secondary)}@media screen and (max-width: 599px){.aeb-code-input__tip{font-size:14px;margin-bottom:24px}}.aeb-code-input__text{display:flex;flex-direction:column;align-items:center;margin-top:32px;font-size:var(--font-size-s);line-height:20px}@media screen and (max-width: 599px){.aeb-code-input__text{margin-top:24px;font-size:14px}}.aeb-code-input__text-wrapper{text-align:center}.aeb-code-input__text-info{color:var(--c-t-secondary)}.aeb-code-input__text-time{color:var(--c-t-links)}.aeb-code-input__text-again{color:var(--c-t-links);cursor:pointer}.aeb-code-input__text-wrong{color:var(--c-t-critical);text-align:center;font-size:16px}@media screen and (max-width: 599px){.aeb-code-input__text-wrong{font-size:12px}}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: AutofocusDirective, selector: "[autofocus]", inputs: ["autofocus"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
551
581
|
}
|
|
552
582
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: CodeInputComponent, decorators: [{
|
|
553
583
|
type: Component,
|
|
@@ -557,7 +587,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImpor
|
|
|
557
587
|
useExisting: forwardRef(() => CodeInputComponent),
|
|
558
588
|
multi: true
|
|
559
589
|
}
|
|
560
|
-
], encapsulation: ViewEncapsulation.None, standalone: false, template: "
|
|
590
|
+
], encapsulation: ViewEncapsulation.None, standalone: false, template: "@if (title) {\n <h2 class=\"aeb-code-input__title\">{{ title }}</h2>\n}\n@if (tip) {\n <span class=\"aeb-code-input__tip\">{{ tip }}</span>\n}\n<div\n class=\"aeb-code-input__field-wrapper\"\n (click)=\"input.focus(); isFocus = true\"\n>\n <input\n class=\"aeb-code-input__field\"\n #input\n [maxLength]=\"codeLength\"\n [value]=\"inputValue\"\n [disabled]=\"disabled\"\n inputmode=\"numeric\"\n [autofocus]=\"isAutofocus\"\n autocomplete=\"one-time-code\"\n pattern=\"[0-9]\"\n (blur)=\"handleInputBlur()\"\n (keypress)=\"numbersOnly($event)\"\n (input)=\"inputChangeHandler($event)\"\n />\n @for (value of [].constructor(codeLength); track $index) {\n <span\n class=\"aeb-code-input__field-input\"\n [ngClass]=\"{\n 'aeb-code-input__field-input--active':\n inputValue.length === $index && isFocus && !disabled,\n 'aeb-code-input__field-input--has-error': hasError\n }\"\n >\n {{ arrayInputValue[$index] }}\n <div\n [ngClass]=\"{\n 'aeb-code-input__field-input-caret':\n inputValue.length === $index && isFocus && !disabled,\n 'aeb-code-input__field-input-caret--has-error':\n inputValue.length === $index && isFocus && !disabled && hasError\n }\"\n ></div>\n </span>\n }\n</div>\n@if (hasError || isResendable) {\n <div class=\"aeb-code-input__text\">\n @if (hasError) {\n <span class=\"aeb-code-input__text-wrong\">{{ errorMessage }}</span>\n }\n @if (isResendable) {\n @if (showTimer) {\n <div class=\"aeb-code-input__text-wrapper\">\n <span class=\"aeb-code-input__text-info\"\n >\u0417\u0430\u043F\u0440\u043E\u0441\u0438\u0442\u044C \u043F\u043E\u0432\u0442\u043E\u0440\u043D\u0443\u044E \u043E\u0442\u043F\u0440\u0430\u0432\u043A\u0443 \u043C\u043E\u0436\u043D\u043E \u0447\u0435\u0440\u0435\u0437\n </span>\n <span class=\"aeb-code-input__text-time\">{{ seconds$ | async }}</span>\n </div>\n }\n @if (showCodeText) {\n <span class=\"aeb-code-input__text-again\" (click)=\"resend()\"\n >\u041E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C \u043A\u043E\u0434 \u043F\u043E\u0432\u0442\u043E\u0440\u043D\u043E</span\n >\n }\n }\n </div>\n}\n", styles: [".aeb-code-input{display:flex;flex-direction:column;align-items:center;color:var(--c-t-primary);background-color:none}@media screen and (max-width: 599px){.aeb-code-input{width:100%;box-sizing:border-box}}.aeb-code-input__field-wrapper{position:relative;display:flex;justify-content:center;gap:16px}.aeb-code-input__field{position:absolute;width:100%;height:56px;box-sizing:border-box;background:transparent;border:none;color:transparent;outline:none;-webkit-user-select:none;user-select:none;caret-color:transparent;z-index:10;pointer-events:none}.aeb-code-input__field::selection{background:transparent}.aeb-code-input__field-input{width:56px;height:64px;display:flex;justify-content:center;align-items:center;border:var(--border-skinny) solid var(--c-bg-surface-medium);border-radius:var(--border-rounded);box-sizing:border-box;font-size:var(--font-size-lm);font-weight:500;cursor:text}@media screen and (max-width: 599px){.aeb-code-input__field-input{width:48px;height:56px;font-size:var(--font-size-l)}}.aeb-code-input__field-input--active{border:var(--border-skinny) solid var(--c-t-links)}.aeb-code-input__field-input--has-error{border:var(--border-skinny) solid var(--c-t-critical);background-color:var(--c-btn-ws-default)}.aeb-code-input__field-input-caret{width:2px;height:24px;background-color:var(--c-t-links);animation-name:flicker;animation-duration:1s;animation-iteration-count:infinite}.aeb-code-input__field-input-caret--has-error{background-color:var(--c-t-critical)}@keyframes flicker{0%{opacity:0}to{opacity:1}}.aeb-code-input__title{width:fit-content;margin:0 0 16px;font-size:var(--font-size-l);text-align:center;font-weight:500}@media screen and (max-width: 599px){.aeb-code-input__title{font-size:18px;margin:0 0 8px}}.aeb-code-input__tip{margin-bottom:32px;text-align:center;color:var(--c-t-secondary)}@media screen and (max-width: 599px){.aeb-code-input__tip{font-size:14px;margin-bottom:24px}}.aeb-code-input__text{display:flex;flex-direction:column;align-items:center;margin-top:32px;font-size:var(--font-size-s);line-height:20px}@media screen and (max-width: 599px){.aeb-code-input__text{margin-top:24px;font-size:14px}}.aeb-code-input__text-wrapper{text-align:center}.aeb-code-input__text-info{color:var(--c-t-secondary)}.aeb-code-input__text-time{color:var(--c-t-links)}.aeb-code-input__text-again{color:var(--c-t-links);cursor:pointer}.aeb-code-input__text-wrong{color:var(--c-t-critical);text-align:center;font-size:16px}@media screen and (max-width: 599px){.aeb-code-input__text-wrong{font-size:12px}}\n"] }]
|
|
561
591
|
}], propDecorators: { title: [{
|
|
562
592
|
type: Input
|
|
563
593
|
}], secondsUntilRetry: [{
|
|
@@ -585,6 +615,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImpor
|
|
|
585
615
|
}], input: [{
|
|
586
616
|
type: ViewChild,
|
|
587
617
|
args: ['input']
|
|
618
|
+
}], isCodeInput: [{
|
|
619
|
+
type: HostBinding,
|
|
620
|
+
args: ['class.aeb-code-input']
|
|
588
621
|
}] } });
|
|
589
622
|
|
|
590
623
|
class CodeInputModule {
|
|
@@ -1158,11 +1191,11 @@ class CommentComponent {
|
|
|
1158
1191
|
});
|
|
1159
1192
|
}
|
|
1160
1193
|
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\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 }); }
|
|
1194
|
+
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 [tooltipData]=\"comment.aboutAuthor\"\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>\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__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
1195
|
}
|
|
1163
1196
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: CommentComponent, decorators: [{
|
|
1164
1197
|
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\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
|
|
1198
|
+
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 [tooltipData]=\"comment.aboutAuthor\"\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>\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__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
1199
|
}], propDecorators: { comment: [{
|
|
1167
1200
|
type: Input
|
|
1168
1201
|
}], response: [{
|
|
@@ -2281,7 +2314,30 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImpor
|
|
|
2281
2314
|
}] });
|
|
2282
2315
|
|
|
2283
2316
|
class DropdownMenu {
|
|
2317
|
+
// Computed properties for template
|
|
2318
|
+
get isDropdownMenu() {
|
|
2319
|
+
return true;
|
|
2320
|
+
}
|
|
2321
|
+
get isOpenClass() {
|
|
2322
|
+
return this.isOpen();
|
|
2323
|
+
}
|
|
2324
|
+
get isBottomClass() {
|
|
2325
|
+
return this.direction() === 'bottom';
|
|
2326
|
+
}
|
|
2327
|
+
get isTopClass() {
|
|
2328
|
+
return this.direction() === 'top';
|
|
2329
|
+
}
|
|
2330
|
+
get maxHeight() {
|
|
2331
|
+
return this.maxShownOptions() * this.optionHeightPx() + 'px';
|
|
2332
|
+
}
|
|
2333
|
+
get role() {
|
|
2334
|
+
return 'listbox';
|
|
2335
|
+
}
|
|
2336
|
+
get ariaLabel() {
|
|
2337
|
+
return 'Dropdown options';
|
|
2338
|
+
}
|
|
2284
2339
|
constructor() {
|
|
2340
|
+
this.elementRef = inject(ElementRef);
|
|
2285
2341
|
this.isOpen = input(true, ...(ngDevMode ? [{ debugName: "isOpen" }] : []));
|
|
2286
2342
|
this.direction = input('bottom', ...(ngDevMode ? [{ debugName: "direction" }] : []));
|
|
2287
2343
|
this.maxShownOptions = input(5, ...(ngDevMode ? [{ debugName: "maxShownOptions" }] : []));
|
|
@@ -2290,6 +2346,8 @@ class DropdownMenu {
|
|
|
2290
2346
|
this.selectedOption = input(...(ngDevMode ? [undefined, { debugName: "selectedOption" }] : []));
|
|
2291
2347
|
this.outsideClick = output();
|
|
2292
2348
|
this.optionSelect = output();
|
|
2349
|
+
// Keyboard navigation state
|
|
2350
|
+
this.focusedIndex = signal(-1, ...(ngDevMode ? [{ debugName: "focusedIndex" }] : []));
|
|
2293
2351
|
this.optionHeightPx = computed(() => {
|
|
2294
2352
|
if (this.optionSize() === 'S') {
|
|
2295
2353
|
return 40;
|
|
@@ -2301,6 +2359,65 @@ class DropdownMenu {
|
|
|
2301
2359
|
return 56;
|
|
2302
2360
|
}
|
|
2303
2361
|
}, ...(ngDevMode ? [{ debugName: "optionHeightPx" }] : []));
|
|
2362
|
+
// Computed property to get the currently focused option
|
|
2363
|
+
this.focusedOption = computed(() => {
|
|
2364
|
+
const index = this.focusedIndex();
|
|
2365
|
+
const options = this.options();
|
|
2366
|
+
return index >= 0 && index < options.length ? options[index] : null;
|
|
2367
|
+
}, ...(ngDevMode ? [{ debugName: "focusedOption" }] : []));
|
|
2368
|
+
// Reset focus when dropdown closes
|
|
2369
|
+
effect(() => {
|
|
2370
|
+
const isOpen = this.isOpen();
|
|
2371
|
+
if (!isOpen) {
|
|
2372
|
+
this.resetFocus();
|
|
2373
|
+
}
|
|
2374
|
+
});
|
|
2375
|
+
}
|
|
2376
|
+
clickOutsideHandler(event) {
|
|
2377
|
+
event.stopPropagation();
|
|
2378
|
+
this.clickOutside();
|
|
2379
|
+
}
|
|
2380
|
+
onKeyDown(event) {
|
|
2381
|
+
if (!this.isOpen()) {
|
|
2382
|
+
return;
|
|
2383
|
+
}
|
|
2384
|
+
const options = this.options();
|
|
2385
|
+
const currentIndex = this.focusedIndex();
|
|
2386
|
+
// If no option is focused and we have options, focus the first one
|
|
2387
|
+
if (currentIndex < 0 && options.length > 0) {
|
|
2388
|
+
this.focusedIndex.set(0);
|
|
2389
|
+
}
|
|
2390
|
+
switch (event.key) {
|
|
2391
|
+
case 'ArrowDown':
|
|
2392
|
+
event.preventDefault();
|
|
2393
|
+
this.navigateDown(currentIndex, options.length);
|
|
2394
|
+
break;
|
|
2395
|
+
case 'ArrowUp':
|
|
2396
|
+
event.preventDefault();
|
|
2397
|
+
this.navigateUp(currentIndex, options.length);
|
|
2398
|
+
break;
|
|
2399
|
+
case 'Enter':
|
|
2400
|
+
event.preventDefault();
|
|
2401
|
+
this.selectFocusedOption();
|
|
2402
|
+
break;
|
|
2403
|
+
case 'Escape':
|
|
2404
|
+
event.preventDefault();
|
|
2405
|
+
this.closeDropdown();
|
|
2406
|
+
break;
|
|
2407
|
+
case 'Tab':
|
|
2408
|
+
event.preventDefault();
|
|
2409
|
+
this.closeDropdown();
|
|
2410
|
+
// Focus will move to next focusable element naturally
|
|
2411
|
+
break;
|
|
2412
|
+
case 'Home':
|
|
2413
|
+
event.preventDefault();
|
|
2414
|
+
this.focusFirstOption();
|
|
2415
|
+
break;
|
|
2416
|
+
case 'End':
|
|
2417
|
+
event.preventDefault();
|
|
2418
|
+
this.focusLastOption();
|
|
2419
|
+
break;
|
|
2420
|
+
}
|
|
2304
2421
|
}
|
|
2305
2422
|
selectOption(optionValue) {
|
|
2306
2423
|
this.optionSelect.emit(optionValue);
|
|
@@ -2308,13 +2425,105 @@ class DropdownMenu {
|
|
|
2308
2425
|
clickOutside() {
|
|
2309
2426
|
this.outsideClick.emit();
|
|
2310
2427
|
}
|
|
2428
|
+
// Public methods for keyboard navigation
|
|
2429
|
+
focusFirstOption() {
|
|
2430
|
+
if (this.options().length > 0) {
|
|
2431
|
+
this.focusedIndex.set(0);
|
|
2432
|
+
this.scrollToFocusedOption();
|
|
2433
|
+
}
|
|
2434
|
+
}
|
|
2435
|
+
focusLastOption() {
|
|
2436
|
+
const options = this.options();
|
|
2437
|
+
if (options.length > 0) {
|
|
2438
|
+
this.focusedIndex.set(options.length - 1);
|
|
2439
|
+
this.scrollToFocusedOption();
|
|
2440
|
+
}
|
|
2441
|
+
}
|
|
2442
|
+
// Method to reset focus when dropdown opens
|
|
2443
|
+
resetFocus() {
|
|
2444
|
+
this.focusedIndex.set(-1);
|
|
2445
|
+
}
|
|
2446
|
+
// Private keyboard navigation methods
|
|
2447
|
+
navigateDown(currentIndex, totalOptions) {
|
|
2448
|
+
if (totalOptions === 0) {
|
|
2449
|
+
return;
|
|
2450
|
+
}
|
|
2451
|
+
const nextIndex = currentIndex < 0 ? 0 : (currentIndex + 1) % totalOptions;
|
|
2452
|
+
this.focusedIndex.set(nextIndex);
|
|
2453
|
+
this.scrollToFocusedOption();
|
|
2454
|
+
}
|
|
2455
|
+
navigateUp(currentIndex, totalOptions) {
|
|
2456
|
+
if (totalOptions === 0) {
|
|
2457
|
+
return;
|
|
2458
|
+
}
|
|
2459
|
+
const prevIndex = currentIndex <= 0 ? totalOptions - 1 : currentIndex - 1;
|
|
2460
|
+
this.focusedIndex.set(prevIndex);
|
|
2461
|
+
this.scrollToFocusedOption();
|
|
2462
|
+
}
|
|
2463
|
+
selectFocusedOption() {
|
|
2464
|
+
const focused = this.focusedOption();
|
|
2465
|
+
if (focused) {
|
|
2466
|
+
this.selectOption(focused.value);
|
|
2467
|
+
}
|
|
2468
|
+
}
|
|
2469
|
+
closeDropdown() {
|
|
2470
|
+
this.outsideClick.emit();
|
|
2471
|
+
}
|
|
2472
|
+
scrollToFocusedOption() {
|
|
2473
|
+
// Use setTimeout to ensure DOM is updated after the focusedIndex change
|
|
2474
|
+
setTimeout(() => {
|
|
2475
|
+
const hostElement = this.elementRef.nativeElement;
|
|
2476
|
+
const focusedIndex = this.focusedIndex();
|
|
2477
|
+
if (focusedIndex < 0) {
|
|
2478
|
+
return;
|
|
2479
|
+
}
|
|
2480
|
+
const options = hostElement.querySelectorAll('.aeb-dropdown-menu__option');
|
|
2481
|
+
const focusedOption = options[focusedIndex];
|
|
2482
|
+
if (!focusedOption) {
|
|
2483
|
+
return;
|
|
2484
|
+
}
|
|
2485
|
+
// Scroll the focused option into view within the host element
|
|
2486
|
+
focusedOption.scrollIntoView({
|
|
2487
|
+
behavior: 'smooth',
|
|
2488
|
+
block: 'nearest',
|
|
2489
|
+
inline: 'nearest'
|
|
2490
|
+
});
|
|
2491
|
+
}, 0);
|
|
2492
|
+
}
|
|
2311
2493
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: DropdownMenu, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2312
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.4", type: DropdownMenu, isStandalone: false, selector: "aeb-dropdown-menu", inputs: { isOpen: { classPropertyName: "isOpen", publicName: "isOpen", isSignal: true, isRequired: false, transformFunction: null }, direction: { classPropertyName: "direction", publicName: "direction", isSignal: true, isRequired: false, transformFunction: null }, maxShownOptions: { classPropertyName: "maxShownOptions", publicName: "maxShownOptions", isSignal: true, isRequired: false, transformFunction: null }, optionSize: { classPropertyName: "optionSize", publicName: "optionSize", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, selectedOption: { classPropertyName: "selectedOption", publicName: "selectedOption", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { outsideClick: "outsideClick", optionSelect: "optionSelect" },
|
|
2494
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.4", type: DropdownMenu, isStandalone: false, selector: "aeb-dropdown-menu", inputs: { isOpen: { classPropertyName: "isOpen", publicName: "isOpen", isSignal: true, isRequired: false, transformFunction: null }, direction: { classPropertyName: "direction", publicName: "direction", isSignal: true, isRequired: false, transformFunction: null }, maxShownOptions: { classPropertyName: "maxShownOptions", publicName: "maxShownOptions", isSignal: true, isRequired: false, transformFunction: null }, optionSize: { classPropertyName: "optionSize", publicName: "optionSize", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, selectedOption: { classPropertyName: "selectedOption", publicName: "selectedOption", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { outsideClick: "outsideClick", optionSelect: "optionSelect" }, host: { listeners: { "clickOutside": "clickOutsideHandler($event)", "keydown": "onKeyDown($event)" }, properties: { "class.aeb-dropdown-menu": "this.isDropdownMenu", "class.open": "this.isOpenClass", "class.bottom": "this.isBottomClass", "class.top": "this.isTopClass", "style.max-height": "this.maxHeight", "attr.role": "this.role", "attr.aria-label": "this.ariaLabel" } }, ngImport: i0, template: "@for (option of options(); track option.value; let i = $index) {\n<div\n class=\"aeb-dropdown-menu__option\"\n [class.active]=\"option === selectedOption()\"\n [class.focused]=\"i === focusedIndex()\"\n [class.has-additional]=\"option.additional\"\n [style.height]=\"optionHeightPx() + 'px'\"\n [attr.tabindex]=\"-1\"\n [attr.role]=\"'option'\"\n [attr.aria-selected]=\"i === focusedIndex()\"\n (click)=\"selectOption(option.value)\"\n>\n <p>{{ option.label }}</p>\n @if (option.additional) {\n <small>{{ option.additional }}</small>\n }\n</div>\n}\n", styles: [".aeb-dropdown-menu{position:absolute;z-index:2;width:100%;left:0;background:var(--c-bg-light);padding:0;margin:0;border-radius:12px;box-shadow:0 4px 12px #27303e26;overflow-y:auto;opacity:0;visibility:hidden;color:var(--c-t-primary);transform:scaleY(.8) rotateX(-60deg);transform-origin:top center;transition:all .3s cubic-bezier(.4,0,.2,1);transition-property:opacity,transform,visibility;perspective:1000px;transform-style:preserve-3d}.aeb-dropdown-menu__option{padding:0 24px;box-sizing:border-box;line-height:20px;text-overflow:ellipsis;overflow:hidden;cursor:pointer;display:flex;justify-content:center;flex-direction:column}.aeb-dropdown-menu__option:hover,.aeb-dropdown-menu__option.active,.aeb-dropdown-menu__option.focused{background-color:var(--c-bg-surface)}.aeb-dropdown-menu__option p{margin:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.aeb-dropdown-menu__option.has-additional{padding:0 24px}.aeb-dropdown-menu__option.has-additional small{display:block;margin-top:4px;line-height:16px;font-size:14px;color:var(--c-t-secondary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.aeb-dropdown-menu.bottom{top:calc(100% + 4px);transform-origin:top center;transform:scaleY(.8) rotateX(-60deg)}.aeb-dropdown-menu.top{bottom:calc(100% + 4px);top:auto;transform-origin:bottom center;transform:scaleY(.8) rotateX(60deg)}.aeb-dropdown-menu.open{opacity:1;visibility:visible;transform:scaleY(1) rotateX(0)}\n"], encapsulation: i0.ViewEncapsulation.None }); }
|
|
2313
2495
|
}
|
|
2314
2496
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: DropdownMenu, decorators: [{
|
|
2315
2497
|
type: Component,
|
|
2316
|
-
args: [{ selector: 'aeb-dropdown-menu', standalone: false, template: "<
|
|
2317
|
-
}]
|
|
2498
|
+
args: [{ selector: 'aeb-dropdown-menu', encapsulation: ViewEncapsulation.None, standalone: false, template: "@for (option of options(); track option.value; let i = $index) {\n<div\n class=\"aeb-dropdown-menu__option\"\n [class.active]=\"option === selectedOption()\"\n [class.focused]=\"i === focusedIndex()\"\n [class.has-additional]=\"option.additional\"\n [style.height]=\"optionHeightPx() + 'px'\"\n [attr.tabindex]=\"-1\"\n [attr.role]=\"'option'\"\n [attr.aria-selected]=\"i === focusedIndex()\"\n (click)=\"selectOption(option.value)\"\n>\n <p>{{ option.label }}</p>\n @if (option.additional) {\n <small>{{ option.additional }}</small>\n }\n</div>\n}\n", styles: [".aeb-dropdown-menu{position:absolute;z-index:2;width:100%;left:0;background:var(--c-bg-light);padding:0;margin:0;border-radius:12px;box-shadow:0 4px 12px #27303e26;overflow-y:auto;opacity:0;visibility:hidden;color:var(--c-t-primary);transform:scaleY(.8) rotateX(-60deg);transform-origin:top center;transition:all .3s cubic-bezier(.4,0,.2,1);transition-property:opacity,transform,visibility;perspective:1000px;transform-style:preserve-3d}.aeb-dropdown-menu__option{padding:0 24px;box-sizing:border-box;line-height:20px;text-overflow:ellipsis;overflow:hidden;cursor:pointer;display:flex;justify-content:center;flex-direction:column}.aeb-dropdown-menu__option:hover,.aeb-dropdown-menu__option.active,.aeb-dropdown-menu__option.focused{background-color:var(--c-bg-surface)}.aeb-dropdown-menu__option p{margin:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.aeb-dropdown-menu__option.has-additional{padding:0 24px}.aeb-dropdown-menu__option.has-additional small{display:block;margin-top:4px;line-height:16px;font-size:14px;color:var(--c-t-secondary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.aeb-dropdown-menu.bottom{top:calc(100% + 4px);transform-origin:top center;transform:scaleY(.8) rotateX(-60deg)}.aeb-dropdown-menu.top{bottom:calc(100% + 4px);top:auto;transform-origin:bottom center;transform:scaleY(.8) rotateX(60deg)}.aeb-dropdown-menu.open{opacity:1;visibility:visible;transform:scaleY(1) rotateX(0)}\n"] }]
|
|
2499
|
+
}], ctorParameters: () => [], propDecorators: { isDropdownMenu: [{
|
|
2500
|
+
type: HostBinding,
|
|
2501
|
+
args: ['class.aeb-dropdown-menu']
|
|
2502
|
+
}], isOpenClass: [{
|
|
2503
|
+
type: HostBinding,
|
|
2504
|
+
args: ['class.open']
|
|
2505
|
+
}], isBottomClass: [{
|
|
2506
|
+
type: HostBinding,
|
|
2507
|
+
args: ['class.bottom']
|
|
2508
|
+
}], isTopClass: [{
|
|
2509
|
+
type: HostBinding,
|
|
2510
|
+
args: ['class.top']
|
|
2511
|
+
}], maxHeight: [{
|
|
2512
|
+
type: HostBinding,
|
|
2513
|
+
args: ['style.max-height']
|
|
2514
|
+
}], role: [{
|
|
2515
|
+
type: HostBinding,
|
|
2516
|
+
args: ['attr.role']
|
|
2517
|
+
}], ariaLabel: [{
|
|
2518
|
+
type: HostBinding,
|
|
2519
|
+
args: ['attr.aria-label']
|
|
2520
|
+
}], clickOutsideHandler: [{
|
|
2521
|
+
type: HostListener,
|
|
2522
|
+
args: ['clickOutside', ['$event']]
|
|
2523
|
+
}], onKeyDown: [{
|
|
2524
|
+
type: HostListener,
|
|
2525
|
+
args: ['keydown', ['$event']]
|
|
2526
|
+
}] } });
|
|
2318
2527
|
|
|
2319
2528
|
class DropdownMenuModule {
|
|
2320
2529
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: DropdownMenuModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
@@ -2331,6 +2540,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImpor
|
|
|
2331
2540
|
}] });
|
|
2332
2541
|
|
|
2333
2542
|
class DropdownComponent {
|
|
2543
|
+
get isDropdown() {
|
|
2544
|
+
return true;
|
|
2545
|
+
}
|
|
2334
2546
|
constructor() {
|
|
2335
2547
|
this.ngControl = inject(NgControl, { optional: true, self: true });
|
|
2336
2548
|
// Control state
|
|
@@ -2362,6 +2574,14 @@ class DropdownComponent {
|
|
|
2362
2574
|
this.setupControlValueAccessor();
|
|
2363
2575
|
this.setupEffects();
|
|
2364
2576
|
}
|
|
2577
|
+
keydownTabHandler() {
|
|
2578
|
+
this.clickOutsideHandler();
|
|
2579
|
+
}
|
|
2580
|
+
clickOutsideHandler() {
|
|
2581
|
+
if (this.dropdownIsOpen()) {
|
|
2582
|
+
this.dropdownIsOpen.set(false);
|
|
2583
|
+
}
|
|
2584
|
+
}
|
|
2365
2585
|
writeValue(value) {
|
|
2366
2586
|
if (this.disabled()) {
|
|
2367
2587
|
return;
|
|
@@ -2382,6 +2602,52 @@ class DropdownComponent {
|
|
|
2382
2602
|
handleEnterKey() {
|
|
2383
2603
|
// Implement enter key logic here
|
|
2384
2604
|
}
|
|
2605
|
+
onInputKeyDown(event) {
|
|
2606
|
+
if (this.disabled()) {
|
|
2607
|
+
return;
|
|
2608
|
+
}
|
|
2609
|
+
switch (event.key) {
|
|
2610
|
+
case 'ArrowDown':
|
|
2611
|
+
event.preventDefault();
|
|
2612
|
+
if (!this.dropdownIsOpen()) {
|
|
2613
|
+
this.dropdownIsOpen.set(true);
|
|
2614
|
+
}
|
|
2615
|
+
// Always forward to dropdown menu for navigation
|
|
2616
|
+
this.dropdownMenuRef?.onKeyDown(event);
|
|
2617
|
+
break;
|
|
2618
|
+
case 'ArrowUp':
|
|
2619
|
+
event.preventDefault();
|
|
2620
|
+
if (!this.dropdownIsOpen()) {
|
|
2621
|
+
this.dropdownIsOpen.set(true);
|
|
2622
|
+
}
|
|
2623
|
+
// Always forward to dropdown menu for navigation
|
|
2624
|
+
this.dropdownMenuRef?.onKeyDown(event);
|
|
2625
|
+
break;
|
|
2626
|
+
case 'Enter':
|
|
2627
|
+
event.preventDefault();
|
|
2628
|
+
if (this.dropdownIsOpen()) {
|
|
2629
|
+
// Forward to dropdown menu for selection
|
|
2630
|
+
this.dropdownMenuRef?.onKeyDown(event);
|
|
2631
|
+
}
|
|
2632
|
+
else {
|
|
2633
|
+
this.handleEnterKey();
|
|
2634
|
+
}
|
|
2635
|
+
break;
|
|
2636
|
+
case 'Escape':
|
|
2637
|
+
if (this.dropdownIsOpen()) {
|
|
2638
|
+
event.preventDefault();
|
|
2639
|
+
this.dropdownIsOpen.set(false);
|
|
2640
|
+
}
|
|
2641
|
+
break;
|
|
2642
|
+
case 'Tab':
|
|
2643
|
+
if (this.dropdownIsOpen()) {
|
|
2644
|
+
event.preventDefault();
|
|
2645
|
+
this.dropdownIsOpen.set(false);
|
|
2646
|
+
// Focus will move to next focusable element naturally
|
|
2647
|
+
}
|
|
2648
|
+
break;
|
|
2649
|
+
}
|
|
2650
|
+
}
|
|
2385
2651
|
openHandler() {
|
|
2386
2652
|
if (this.disabled()) {
|
|
2387
2653
|
return;
|
|
@@ -2389,11 +2655,6 @@ class DropdownComponent {
|
|
|
2389
2655
|
this.dropdownIsOpen.set(!this.dropdownIsOpen());
|
|
2390
2656
|
this.onTouch();
|
|
2391
2657
|
}
|
|
2392
|
-
clickOutsideHandler() {
|
|
2393
|
-
if (this.dropdownIsOpen()) {
|
|
2394
|
-
this.dropdownIsOpen.set(false);
|
|
2395
|
-
}
|
|
2396
|
-
}
|
|
2397
2658
|
inputHandler(term) {
|
|
2398
2659
|
if (this.disabled()) {
|
|
2399
2660
|
return;
|
|
@@ -2491,8 +2752,16 @@ class DropdownComponent {
|
|
|
2491
2752
|
this.inputChange.emit(newValue);
|
|
2492
2753
|
if (!newValue) {
|
|
2493
2754
|
this.clearSelection();
|
|
2755
|
+
// Always ensure dropdown is open when input is cleared
|
|
2756
|
+
this.dropdownIsOpen.set(true);
|
|
2757
|
+
// Focus first option when input is cleared
|
|
2758
|
+
this.dropdownMenuRef?.focusFirstOption();
|
|
2494
2759
|
return;
|
|
2495
2760
|
}
|
|
2761
|
+
// When typing characters, ensure dropdown stays open
|
|
2762
|
+
if (!this.dropdownIsOpen()) {
|
|
2763
|
+
this.dropdownIsOpen.set(true);
|
|
2764
|
+
}
|
|
2496
2765
|
this.findAndSetMatch(newValue);
|
|
2497
2766
|
}
|
|
2498
2767
|
clearSelection() {
|
|
@@ -2501,6 +2770,7 @@ class DropdownComponent {
|
|
|
2501
2770
|
value: undefined
|
|
2502
2771
|
});
|
|
2503
2772
|
this.value.set('');
|
|
2773
|
+
// Don't close dropdown when clearing - let user continue navigating
|
|
2504
2774
|
}
|
|
2505
2775
|
findAndSetMatch(newValue) {
|
|
2506
2776
|
const match = this.options().find((item) => item.label === newValue);
|
|
@@ -2568,14 +2838,31 @@ class DropdownComponent {
|
|
|
2568
2838
|
onChange(value) { }
|
|
2569
2839
|
onTouch() { }
|
|
2570
2840
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: DropdownComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2571
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.2.4", type: DropdownComponent, isStandalone: false, selector: "aeb-dropdown", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, errorMessageText: { classPropertyName: "errorMessageText", publicName: "errorMessageText", isSignal: true, isRequired: false, transformFunction: null }, filter: { classPropertyName: "filter", publicName: "filter", isSignal: true, isRequired: false, transformFunction: null }, hasError: { classPropertyName: "hasError", publicName: "hasError", isSignal: true, isRequired: false, transformFunction: null }, validateOnDirty: { classPropertyName: "validateOnDirty", publicName: "validateOnDirty", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { optionSelect: "optionSelect", inputChange: "inputChange" }, viewQueries: [{ propertyName: "formFieldRef", first: true, predicate: FormFieldComponent, descendants: true }],
|
|
2841
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.2.4", type: DropdownComponent, isStandalone: false, selector: "aeb-dropdown", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, errorMessageText: { classPropertyName: "errorMessageText", publicName: "errorMessageText", isSignal: true, isRequired: false, transformFunction: null }, filter: { classPropertyName: "filter", publicName: "filter", isSignal: true, isRequired: false, transformFunction: null }, hasError: { classPropertyName: "hasError", publicName: "hasError", isSignal: true, isRequired: false, transformFunction: null }, validateOnDirty: { classPropertyName: "validateOnDirty", publicName: "validateOnDirty", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { optionSelect: "optionSelect", inputChange: "inputChange" }, host: { listeners: { "keydown.tab": "keydownTabHandler($event)", "clickOutside": "clickOutsideHandler($event)" }, properties: { "class.aeb-dropdown": "this.isDropdown" } }, viewQueries: [{ propertyName: "formFieldRef", first: true, predicate: FormFieldComponent, descendants: true }, { propertyName: "dropdownMenuRef", first: true, predicate: DropdownMenu, descendants: true }], hostDirectives: [{ directive: ClickOutsideDirective, outputs: ["clickOutside", "clickOutside"] }], ngImport: i0, template: "<aeb-form-field [isInvalid]=\"hasErrorSignal()\" [disabled]=\"disabled()\">\n <label aebLabel>{{ label() }}</label>\n <input\n aebInput\n type=\"text\"\n [ngModel]=\"valueLabel()\"\n (ngModelChange)=\"valueLabel.set($event)\"\n (input)=\"inputHandler($event)\"\n (keydown)=\"onInputKeyDown($event)\"\n (keydown.tab)=\"clickInput()\"\n (focus)=\"clickInput()\"\n />\n <aeb-dropdown-menu\n [options]=\"filteredOptions()\"\n [isOpen]=\"dropdownIsOpen()\"\n (optionSelect)=\"selectHandler($event)\"\n ></aeb-dropdown-menu>\n <label [errorMessage]>{{ errorMessageText() }}</label>\n</aeb-form-field>\n\n<div\n class=\"aeb-dropdown__icon\"\n [ngClass]=\"{\n 'aeb-dropdown__icon--is-open': dropdownIsOpen()\n }\"\n (click)=\"openHandler()\"\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 10L11.9293 13.9293C11.9683 13.9683 12.0317 13.9683 12.0707 13.9293L16 10\"\n stroke=\"#1F2632\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n />\n </svg>\n</div>\n", styles: [".aeb-dropdown{position:relative;width:100%}.aeb-dropdown__icon{position:absolute;top:16px;right:16px;display:flex;align-items:center;justify-content:center;cursor:pointer}.aeb-dropdown__icon svg{transition:transform,.2s}.aeb-dropdown__icon--is-open svg{transform:rotate(180deg)}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { 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: "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.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: DropdownMenu, selector: "aeb-dropdown-menu", inputs: ["isOpen", "direction", "maxShownOptions", "optionSize", "options", "selectedOption"], outputs: ["outsideClick", "optionSelect"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
2572
2842
|
}
|
|
2573
2843
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: DropdownComponent, decorators: [{
|
|
2574
2844
|
type: Component,
|
|
2575
|
-
args: [{ selector: 'aeb-dropdown', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, standalone: false,
|
|
2845
|
+
args: [{ selector: 'aeb-dropdown', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, hostDirectives: [
|
|
2846
|
+
{
|
|
2847
|
+
directive: ClickOutsideDirective,
|
|
2848
|
+
outputs: ['clickOutside']
|
|
2849
|
+
}
|
|
2850
|
+
], template: "<aeb-form-field [isInvalid]=\"hasErrorSignal()\" [disabled]=\"disabled()\">\n <label aebLabel>{{ label() }}</label>\n <input\n aebInput\n type=\"text\"\n [ngModel]=\"valueLabel()\"\n (ngModelChange)=\"valueLabel.set($event)\"\n (input)=\"inputHandler($event)\"\n (keydown)=\"onInputKeyDown($event)\"\n (keydown.tab)=\"clickInput()\"\n (focus)=\"clickInput()\"\n />\n <aeb-dropdown-menu\n [options]=\"filteredOptions()\"\n [isOpen]=\"dropdownIsOpen()\"\n (optionSelect)=\"selectHandler($event)\"\n ></aeb-dropdown-menu>\n <label [errorMessage]>{{ errorMessageText() }}</label>\n</aeb-form-field>\n\n<div\n class=\"aeb-dropdown__icon\"\n [ngClass]=\"{\n 'aeb-dropdown__icon--is-open': dropdownIsOpen()\n }\"\n (click)=\"openHandler()\"\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 10L11.9293 13.9293C11.9683 13.9683 12.0317 13.9683 12.0707 13.9293L16 10\"\n stroke=\"#1F2632\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n />\n </svg>\n</div>\n", styles: [".aeb-dropdown{position:relative;width:100%}.aeb-dropdown__icon{position:absolute;top:16px;right:16px;display:flex;align-items:center;justify-content:center;cursor:pointer}.aeb-dropdown__icon svg{transition:transform,.2s}.aeb-dropdown__icon--is-open svg{transform:rotate(180deg)}\n"] }]
|
|
2576
2851
|
}], ctorParameters: () => [], propDecorators: { formFieldRef: [{
|
|
2577
2852
|
type: ViewChild,
|
|
2578
2853
|
args: [FormFieldComponent]
|
|
2854
|
+
}], dropdownMenuRef: [{
|
|
2855
|
+
type: ViewChild,
|
|
2856
|
+
args: [DropdownMenu]
|
|
2857
|
+
}], isDropdown: [{
|
|
2858
|
+
type: HostBinding,
|
|
2859
|
+
args: ['class.aeb-dropdown']
|
|
2860
|
+
}], keydownTabHandler: [{
|
|
2861
|
+
type: HostListener,
|
|
2862
|
+
args: ['keydown.tab', ['$event']]
|
|
2863
|
+
}], clickOutsideHandler: [{
|
|
2864
|
+
type: HostListener,
|
|
2865
|
+
args: ['clickOutside', ['$event']]
|
|
2579
2866
|
}] } });
|
|
2580
2867
|
|
|
2581
2868
|
class DropdownModule {
|
|
@@ -3391,14 +3678,22 @@ class ModalComponent {
|
|
|
3391
3678
|
}
|
|
3392
3679
|
};
|
|
3393
3680
|
}
|
|
3681
|
+
get isModal() {
|
|
3682
|
+
return true;
|
|
3683
|
+
}
|
|
3684
|
+
get isOpenClass() {
|
|
3685
|
+
return this.isOpen;
|
|
3686
|
+
}
|
|
3394
3687
|
get controlsConfig() {
|
|
3395
3688
|
return this._controlsConfig;
|
|
3396
3689
|
}
|
|
3397
3690
|
constructor() {
|
|
3398
3691
|
this._controlsConfig = DEFAULT_CONFIG;
|
|
3692
|
+
this._modalRef = inject(ElementRef);
|
|
3399
3693
|
this.isOpen = true;
|
|
3400
3694
|
this.title = '';
|
|
3401
3695
|
this.size = 'M';
|
|
3696
|
+
this.closeOnBackdropClick = true;
|
|
3402
3697
|
this.leftBtnClick = new EventEmitter();
|
|
3403
3698
|
this.rightBtnClick = new EventEmitter();
|
|
3404
3699
|
this.closeBtnClick = new EventEmitter();
|
|
@@ -3409,12 +3704,20 @@ class ModalComponent {
|
|
|
3409
3704
|
.subscribe(() => {
|
|
3410
3705
|
this.checkScreen();
|
|
3411
3706
|
});
|
|
3707
|
+
// Effect to handle modal open/close based on isOpen input
|
|
3708
|
+
effect(() => {
|
|
3709
|
+
if (this._modalRef?.nativeElement) {
|
|
3710
|
+
if (this.isOpen) {
|
|
3711
|
+
this._modalRef.nativeElement.classList.add('aeb-modal--open');
|
|
3712
|
+
}
|
|
3713
|
+
else {
|
|
3714
|
+
this._modalRef.nativeElement.classList.remove('aeb-modal--open');
|
|
3715
|
+
}
|
|
3716
|
+
}
|
|
3717
|
+
});
|
|
3412
3718
|
}
|
|
3413
|
-
|
|
3414
|
-
this.
|
|
3415
|
-
}
|
|
3416
|
-
close() {
|
|
3417
|
-
this.isOpen = false;
|
|
3719
|
+
onClick(event) {
|
|
3720
|
+
this.onBackdropClick(event);
|
|
3418
3721
|
}
|
|
3419
3722
|
onCancelClick() {
|
|
3420
3723
|
this.leftBtnClick.emit();
|
|
@@ -3425,6 +3728,12 @@ class ModalComponent {
|
|
|
3425
3728
|
onCloseClick() {
|
|
3426
3729
|
this.closeBtnClick.emit();
|
|
3427
3730
|
}
|
|
3731
|
+
onBackdropClick(event) {
|
|
3732
|
+
if (event.target === this._modalRef.nativeElement &&
|
|
3733
|
+
this.closeOnBackdropClick) {
|
|
3734
|
+
this.onCloseClick();
|
|
3735
|
+
}
|
|
3736
|
+
}
|
|
3428
3737
|
checkScreen() {
|
|
3429
3738
|
if (window.innerWidth <= 599) {
|
|
3430
3739
|
this.isMobileScreen = true;
|
|
@@ -3434,17 +3743,19 @@ class ModalComponent {
|
|
|
3434
3743
|
}
|
|
3435
3744
|
}
|
|
3436
3745
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: ModalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3437
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.4", type: ModalComponent, isStandalone: false, selector: "aeb-modal", inputs: { isOpen: "isOpen", title: "title", size: "size", controlsConfig: "controlsConfig" }, outputs: { leftBtnClick: "leftBtnClick", rightBtnClick: "rightBtnClick", closeBtnClick: "closeBtnClick" },
|
|
3746
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.4", type: ModalComponent, isStandalone: false, selector: "aeb-modal", inputs: { isOpen: "isOpen", title: "title", size: "size", closeOnBackdropClick: "closeOnBackdropClick", controlsConfig: "controlsConfig" }, outputs: { leftBtnClick: "leftBtnClick", rightBtnClick: "rightBtnClick", closeBtnClick: "closeBtnClick" }, host: { listeners: { "click": "onClick($event)" }, properties: { "class.aeb-modal": "this.isModal", "class.aeb-modal--open": "this.isOpenClass" } }, ngImport: i0, template: "<div class=\"aeb-modal__window\" [class]=\"'aeb-modal__window--' + size\">\n <div class=\"aeb-modal__header\">\n <h2 class=\"aeb-modal__title\">{{ title }}</h2>\n @if (!controlsConfig.closeBtn.hidden) {\n <button class=\"aeb-modal__close-btn\" (click)=\"onCloseClick()\">\n <svg\n width=\"32\"\n height=\"32\"\n viewBox=\"0 0 32 32\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M9.63074 9.63074L22.3692 22.3692\"\n stroke=\"#7D8591\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n />\n <path\n d=\"M22.3693 9.63074L9.63077 22.3692\"\n stroke=\"#7D8591\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n />\n </svg>\n </button>\n }\n </div>\n <ng-content />\n @if (!controlsConfig.leftBtn.hidden && !controlsConfig.rightBtn.hidden) {\n <span class=\"aeb-modal__btn-group\">\n @if (!controlsConfig.leftBtn.hidden) {\n <button\n aebButton\n [size]=\"isMobileScreen ? 'M' : 'L'\"\n [fill]=\"isMobileScreen ? true : false\"\n [variant]=\"controlsConfig.leftBtn.variant\"\n [isWarning]=\"controlsConfig.leftBtn.warning\"\n [disabled]=\"controlsConfig.leftBtn.disabled\"\n (click)=\"onCancelClick()\"\n >\n {{ controlsConfig.leftBtn.text }}\n </button>\n }\n @if (!controlsConfig.rightBtn.hidden) {\n <button\n aebButton\n [size]=\"isMobileScreen ? 'M' : 'L'\"\n [fill]=\"isMobileScreen ? true : false\"\n [variant]=\"controlsConfig.rightBtn.variant\"\n [isWarning]=\"controlsConfig.rightBtn.warning\"\n [disabled]=\"controlsConfig.rightBtn.disabled\"\n (click)=\"onSubmitClick()\"\n >\n {{ controlsConfig.rightBtn.text }}\n </button>\n }\n </span>\n }\n</div>\n", styles: [".aeb-modal{position:fixed;top:0;left:0;z-index:10000;display:flex;align-items:center;justify-content:center;width:100%;height:100vh;height:100dvh;margin:0;padding:0;border:none;cursor:pointer;opacity:0;visibility:hidden;background:transparent;transition:opacity .3s cubic-bezier(.4,0,.2,1),visibility .3s cubic-bezier(.4,0,.2,1),background-color .3s cubic-bezier(.4,0,.2,1)}.aeb-modal--open{opacity:1;visibility:visible;background-color:var(--c-bg-overlay)}.aeb-modal--open .aeb-modal__window{transform:scale(1) translateY(0);opacity:1}@media screen and (max-width: 599px){.aeb-modal--open .aeb-modal__window{transform:translateY(0)}}.aeb-modal--open .aeb-modal__header,.aeb-modal--open .aeb-modal__btn-group{transform:translateY(0);opacity:1}.aeb-modal--open .aeb-modal__window>:not(.aeb-modal__header,.aeb-modal__btn-group){transform:translateY(0);opacity:1}.aeb-modal__window{position:relative;box-sizing:border-box;display:flex;flex-direction:column;gap:32px;padding:32px;margin:16px;background-color:var(--c-bg-default);border-radius:var(--border-fully-rounded);box-shadow:var(--light-theme-shadows-shadow-smooth-high);width:100%;cursor:default;transform:scale(.8) translateY(20px);opacity:0;transition:transform .3s cubic-bezier(.34,1.56,.64,1),opacity .3s cubic-bezier(.4,0,.2,1)}@media screen and (max-width: 599px){.aeb-modal__window{position:absolute;bottom:0;margin:0;border-radius:var(--border-rounded) var(--border-rounded) 0 0;padding:16px 16px 32px;transform:translateY(100%);transition:transform .4s cubic-bezier(.4,0,.2,1),opacity .3s cubic-bezier(.4,0,.2,1)}}.aeb-modal__window>:not(.aeb-modal__header,.aeb-modal__btn-group){transform:translateY(5px);opacity:0;transition:transform .4s cubic-bezier(.4,0,.2,1) .15s,opacity .4s cubic-bezier(.4,0,.2,1) .15s}.aeb-modal__window--auto{width:auto}.aeb-modal__window--S{max-width:480px}.aeb-modal__window--M{max-width:720px}.aeb-modal__window--L{max-width:900px}.aeb-modal__header{display:flex;justify-content:space-between;transform:translateY(-10px);opacity:0;transition:transform .4s cubic-bezier(.4,0,.2,1) .1s,opacity .4s cubic-bezier(.4,0,.2,1) .1s}.aeb-modal__title{margin:0;color:var(--c-t-primary)}@media screen and (max-width: 599px){.aeb-modal__title{font-weight:500;font-size:22px}}.aeb-modal__close-btn{display:flex;align-items:center;justify-content:center;cursor:pointer;padding:0;background:none;border:var(--no-border);box-shadow:var(--light-theme-shadows-shadow-smooth-high);transition:transform .2s cubic-bezier(.4,0,.2,1)}.aeb-modal__close-btn:hover{transform:scale(1.1)}.aeb-modal__close-btn:active{transform:scale(.95)}.aeb-modal__btn-group{display:flex;gap:16px;justify-content:flex-end;transform:translateY(10px);opacity:0;transition:transform .4s cubic-bezier(.4,0,.2,1) .2s,opacity .4s cubic-bezier(.4,0,.2,1) .2s}@media screen and (max-width: 599px){.aeb-modal__btn-group{flex-direction:column}}\n"], dependencies: [{ kind: "component", type: ButtonComponent, selector: "button[aebButton], a[aebButton]", inputs: ["fill", "isWarning", "size", "variant"] }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
3438
3747
|
}
|
|
3439
3748
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: ModalComponent, decorators: [{
|
|
3440
3749
|
type: Component,
|
|
3441
|
-
args: [{ selector: 'aeb-modal', encapsulation: ViewEncapsulation.None, standalone: false, template: "<div
|
|
3750
|
+
args: [{ selector: 'aeb-modal', encapsulation: ViewEncapsulation.None, standalone: false, template: "<div class=\"aeb-modal__window\" [class]=\"'aeb-modal__window--' + size\">\n <div class=\"aeb-modal__header\">\n <h2 class=\"aeb-modal__title\">{{ title }}</h2>\n @if (!controlsConfig.closeBtn.hidden) {\n <button class=\"aeb-modal__close-btn\" (click)=\"onCloseClick()\">\n <svg\n width=\"32\"\n height=\"32\"\n viewBox=\"0 0 32 32\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M9.63074 9.63074L22.3692 22.3692\"\n stroke=\"#7D8591\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n />\n <path\n d=\"M22.3693 9.63074L9.63077 22.3692\"\n stroke=\"#7D8591\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n />\n </svg>\n </button>\n }\n </div>\n <ng-content />\n @if (!controlsConfig.leftBtn.hidden && !controlsConfig.rightBtn.hidden) {\n <span class=\"aeb-modal__btn-group\">\n @if (!controlsConfig.leftBtn.hidden) {\n <button\n aebButton\n [size]=\"isMobileScreen ? 'M' : 'L'\"\n [fill]=\"isMobileScreen ? true : false\"\n [variant]=\"controlsConfig.leftBtn.variant\"\n [isWarning]=\"controlsConfig.leftBtn.warning\"\n [disabled]=\"controlsConfig.leftBtn.disabled\"\n (click)=\"onCancelClick()\"\n >\n {{ controlsConfig.leftBtn.text }}\n </button>\n }\n @if (!controlsConfig.rightBtn.hidden) {\n <button\n aebButton\n [size]=\"isMobileScreen ? 'M' : 'L'\"\n [fill]=\"isMobileScreen ? true : false\"\n [variant]=\"controlsConfig.rightBtn.variant\"\n [isWarning]=\"controlsConfig.rightBtn.warning\"\n [disabled]=\"controlsConfig.rightBtn.disabled\"\n (click)=\"onSubmitClick()\"\n >\n {{ controlsConfig.rightBtn.text }}\n </button>\n }\n </span>\n }\n</div>\n", styles: [".aeb-modal{position:fixed;top:0;left:0;z-index:10000;display:flex;align-items:center;justify-content:center;width:100%;height:100vh;height:100dvh;margin:0;padding:0;border:none;cursor:pointer;opacity:0;visibility:hidden;background:transparent;transition:opacity .3s cubic-bezier(.4,0,.2,1),visibility .3s cubic-bezier(.4,0,.2,1),background-color .3s cubic-bezier(.4,0,.2,1)}.aeb-modal--open{opacity:1;visibility:visible;background-color:var(--c-bg-overlay)}.aeb-modal--open .aeb-modal__window{transform:scale(1) translateY(0);opacity:1}@media screen and (max-width: 599px){.aeb-modal--open .aeb-modal__window{transform:translateY(0)}}.aeb-modal--open .aeb-modal__header,.aeb-modal--open .aeb-modal__btn-group{transform:translateY(0);opacity:1}.aeb-modal--open .aeb-modal__window>:not(.aeb-modal__header,.aeb-modal__btn-group){transform:translateY(0);opacity:1}.aeb-modal__window{position:relative;box-sizing:border-box;display:flex;flex-direction:column;gap:32px;padding:32px;margin:16px;background-color:var(--c-bg-default);border-radius:var(--border-fully-rounded);box-shadow:var(--light-theme-shadows-shadow-smooth-high);width:100%;cursor:default;transform:scale(.8) translateY(20px);opacity:0;transition:transform .3s cubic-bezier(.34,1.56,.64,1),opacity .3s cubic-bezier(.4,0,.2,1)}@media screen and (max-width: 599px){.aeb-modal__window{position:absolute;bottom:0;margin:0;border-radius:var(--border-rounded) var(--border-rounded) 0 0;padding:16px 16px 32px;transform:translateY(100%);transition:transform .4s cubic-bezier(.4,0,.2,1),opacity .3s cubic-bezier(.4,0,.2,1)}}.aeb-modal__window>:not(.aeb-modal__header,.aeb-modal__btn-group){transform:translateY(5px);opacity:0;transition:transform .4s cubic-bezier(.4,0,.2,1) .15s,opacity .4s cubic-bezier(.4,0,.2,1) .15s}.aeb-modal__window--auto{width:auto}.aeb-modal__window--S{max-width:480px}.aeb-modal__window--M{max-width:720px}.aeb-modal__window--L{max-width:900px}.aeb-modal__header{display:flex;justify-content:space-between;transform:translateY(-10px);opacity:0;transition:transform .4s cubic-bezier(.4,0,.2,1) .1s,opacity .4s cubic-bezier(.4,0,.2,1) .1s}.aeb-modal__title{margin:0;color:var(--c-t-primary)}@media screen and (max-width: 599px){.aeb-modal__title{font-weight:500;font-size:22px}}.aeb-modal__close-btn{display:flex;align-items:center;justify-content:center;cursor:pointer;padding:0;background:none;border:var(--no-border);box-shadow:var(--light-theme-shadows-shadow-smooth-high);transition:transform .2s cubic-bezier(.4,0,.2,1)}.aeb-modal__close-btn:hover{transform:scale(1.1)}.aeb-modal__close-btn:active{transform:scale(.95)}.aeb-modal__btn-group{display:flex;gap:16px;justify-content:flex-end;transform:translateY(10px);opacity:0;transition:transform .4s cubic-bezier(.4,0,.2,1) .2s,opacity .4s cubic-bezier(.4,0,.2,1) .2s}@media screen and (max-width: 599px){.aeb-modal__btn-group{flex-direction:column}}\n"] }]
|
|
3442
3751
|
}], ctorParameters: () => [], propDecorators: { isOpen: [{
|
|
3443
3752
|
type: Input
|
|
3444
3753
|
}], title: [{
|
|
3445
3754
|
type: Input
|
|
3446
3755
|
}], size: [{
|
|
3447
3756
|
type: Input
|
|
3757
|
+
}], closeOnBackdropClick: [{
|
|
3758
|
+
type: Input
|
|
3448
3759
|
}], leftBtnClick: [{
|
|
3449
3760
|
type: Output
|
|
3450
3761
|
}], rightBtnClick: [{
|
|
@@ -3453,6 +3764,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImpor
|
|
|
3453
3764
|
type: Output
|
|
3454
3765
|
}], controlsConfig: [{
|
|
3455
3766
|
type: Input
|
|
3767
|
+
}], isModal: [{
|
|
3768
|
+
type: HostBinding,
|
|
3769
|
+
args: ['class.aeb-modal']
|
|
3770
|
+
}], isOpenClass: [{
|
|
3771
|
+
type: HostBinding,
|
|
3772
|
+
args: ['class.aeb-modal--open']
|
|
3773
|
+
}], onClick: [{
|
|
3774
|
+
type: HostListener,
|
|
3775
|
+
args: ['click', ['$event']]
|
|
3456
3776
|
}] } });
|
|
3457
3777
|
|
|
3458
3778
|
class ModalModule {
|
|
@@ -3730,6 +4050,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImpor
|
|
|
3730
4050
|
}] });
|
|
3731
4051
|
|
|
3732
4052
|
class SelectComponent {
|
|
4053
|
+
get isDisabledClass() {
|
|
4054
|
+
return this.disabled;
|
|
4055
|
+
}
|
|
3733
4056
|
constructor() {
|
|
3734
4057
|
this.cdr = inject(ChangeDetectorRef);
|
|
3735
4058
|
this.options = [];
|
|
@@ -3744,6 +4067,40 @@ class SelectComponent {
|
|
|
3744
4067
|
clickOutside() {
|
|
3745
4068
|
this.handleClickOutside();
|
|
3746
4069
|
}
|
|
4070
|
+
onKeyDown(event) {
|
|
4071
|
+
if (this.disabled) {
|
|
4072
|
+
return;
|
|
4073
|
+
}
|
|
4074
|
+
switch (event.key) {
|
|
4075
|
+
case 'ArrowDown':
|
|
4076
|
+
case 'ArrowUp':
|
|
4077
|
+
case ' ':
|
|
4078
|
+
case 'Enter':
|
|
4079
|
+
event.preventDefault();
|
|
4080
|
+
if (!this.isOpen) {
|
|
4081
|
+
this.openDropdown();
|
|
4082
|
+
}
|
|
4083
|
+
else {
|
|
4084
|
+
// Let the dropdown menu handle navigation
|
|
4085
|
+
this.handleDropdownKeyDown(event);
|
|
4086
|
+
}
|
|
4087
|
+
break;
|
|
4088
|
+
case 'Escape':
|
|
4089
|
+
if (this.isOpen) {
|
|
4090
|
+
event.preventDefault();
|
|
4091
|
+
this.closeDropdown();
|
|
4092
|
+
}
|
|
4093
|
+
break;
|
|
4094
|
+
case 'Tab':
|
|
4095
|
+
if (this.isOpen) {
|
|
4096
|
+
event.preventDefault();
|
|
4097
|
+
this.closeDropdown();
|
|
4098
|
+
// Focus will move to next focusable element naturally
|
|
4099
|
+
}
|
|
4100
|
+
// Allow default tab behavior when dropdown is closed
|
|
4101
|
+
break;
|
|
4102
|
+
}
|
|
4103
|
+
}
|
|
3747
4104
|
get selectedOption() {
|
|
3748
4105
|
if (this.options) {
|
|
3749
4106
|
return this.options.find((option) => option.value === this._value);
|
|
@@ -3809,14 +4166,20 @@ class SelectComponent {
|
|
|
3809
4166
|
ngAfterViewInit() {
|
|
3810
4167
|
this.cdr.detectChanges();
|
|
3811
4168
|
}
|
|
4169
|
+
handleDropdownKeyDown(event) {
|
|
4170
|
+
// Forward keyboard events to the dropdown menu
|
|
4171
|
+
if (this.dropdownMenuRef) {
|
|
4172
|
+
this.dropdownMenuRef.onKeyDown(event);
|
|
4173
|
+
}
|
|
4174
|
+
}
|
|
3812
4175
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: SelectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3813
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.4", type: SelectComponent, isStandalone: false, selector: "aeb-select", inputs: { label: "label", options: "options", hasError: "hasError", disabled: "disabled", direction: "direction" }, outputs: { optionSelect: "optionSelect" }, host: { listeners: { "clickOutside": "clickOutside()" }, properties: { "class.disabled": "this.
|
|
4176
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.4", type: SelectComponent, isStandalone: false, selector: "aeb-select", inputs: { label: "label", options: "options", hasError: "hasError", disabled: "disabled", direction: "direction" }, outputs: { optionSelect: "optionSelect" }, host: { listeners: { "clickOutside": "clickOutside()", "keydown": "onKeyDown($event)" }, properties: { "class.disabled": "this.isDisabledClass", "class.aeb-select": "this.isSelect" } }, providers: [
|
|
3814
4177
|
{
|
|
3815
4178
|
provide: NG_VALUE_ACCESSOR,
|
|
3816
4179
|
useExisting: forwardRef(() => SelectComponent),
|
|
3817
4180
|
multi: true
|
|
3818
4181
|
}
|
|
3819
|
-
], hostDirectives: [{ directive: ClickOutsideDirective, outputs: ["clickOutside", "clickOutside"] }], ngImport: i0, template: "<div
|
|
4182
|
+
], viewQueries: [{ propertyName: "dropdownMenuRef", first: true, predicate: DropdownMenu, descendants: true }], hostDirectives: [{ directive: ClickOutsideDirective, outputs: ["clickOutside", "clickOutside"] }], ngImport: i0, template: "<div\n class=\"aeb-select__selected-item\"\n [class.open]=\"isOpen\"\n [class.error]=\"hasError\"\n [attr.tabindex]=\"disabled ? -1 : 0\"\n [attr.role]=\"'combobox'\"\n [attr.aria-expanded]=\"isOpen\"\n [attr.aria-haspopup]=\"'listbox'\"\n [attr.aria-label]=\"label\"\n (click)=\"!disabled && openDropdown()\"\n>\n <label\n class=\"aeb-select__label\"\n [class.float]=\"selectedOption\"\n [class.placeholder]=\"!selectedOption\"\n >\n {{ label }}\n </label>\n\n @if (selectedOption) {\n <div class=\"aeb-select__selected-text\">\n {{ selectedOption.label }}\n </div>\n }\n</div>\n\n<div class=\"aeb-select__icon\" [class.open]=\"isOpen\" [class.disabled]=\"disabled\">\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 10L11.9293 13.9293C11.9683 13.9683 12.0317 13.9683 12.0707 13.9293L16 10\"\n stroke=\"#1F2632\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n />\n </svg>\n</div>\n\n<aeb-dropdown-menu\n [options]=\"options\"\n [direction]=\"direction\"\n [isOpen]=\"isOpen\"\n [selectedOption]=\"selectedOption\"\n (optionSelect)=\"setValue($event)\"\n></aeb-dropdown-menu>\n", styles: [".aeb-select{position:relative;display:flex;width:100%;min-width:262px;font-size:16px;color:var(--c-t-primary);cursor:pointer;-webkit-user-select:none;user-select:none;font-weight:300}.aeb-select.disabled{cursor:default;pointer-events:none;color:var(--c-t-secondary)}.aeb-select__selected-item{display:flex;align-items:center;width:100%;height:54px;padding:0 52px 0 14px;background:var(--c-bg-surface-medium);border-radius:12px;border:1px solid transparent;position:relative}.aeb-select__selected-item:focus{outline:none;border-color:var(--c-btn-p-default)}.aeb-select__selected-item:hover:not(.disabled){background-color:var(--c-bg-surface)}.aeb-select__selected-item.open{border-color:var(--c-btn-p-default);background-color:var(--c-bg-default)}.aeb-select__selected-item.error{background:var(--c-btn-ws-pressed);border-color:var(--c-btn-ws-pressed)}.aeb-select__selected-item.error:hover{background-color:var(--c-btn-ws-default);border-color:var(--c-btn-ws-default)}.aeb-select__selected-item.error.open{background-color:var(--c-bg-default);border-color:var(--c-btn-w-default)}.aeb-select__selected-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;position:absolute;bottom:8px;left:16px;right:52px}.aeb-select__label{font-size:12px;color:var(--c-t-secondary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;pointer-events:none}.aeb-select__label.float{position:absolute;left:16px;top:8px;width:calc(100% - 68px)}.aeb-select__label.placeholder{color:var(--c-t-secondary);top:18px;font-size:16px;font-weight:300px;line-height:20px}.aeb-select__icon{position:absolute;top:16px;right:16px;width:24px;height:24px;pointer-events:none;transition:transform .3s cubic-bezier(.4,0,.2,1)}.aeb-select__icon.disabled svg path{stroke:var(--c-i-secondary)}.aeb-select__icon.open{transform:rotate(180deg)}\n"], dependencies: [{ kind: "component", type: DropdownMenu, selector: "aeb-dropdown-menu", inputs: ["isOpen", "direction", "maxShownOptions", "optionSize", "options", "selectedOption"], outputs: ["outsideClick", "optionSelect"] }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
3820
4183
|
}
|
|
3821
4184
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: SelectComponent, decorators: [{
|
|
3822
4185
|
type: Component,
|
|
@@ -3831,7 +4194,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImpor
|
|
|
3831
4194
|
useExisting: forwardRef(() => SelectComponent),
|
|
3832
4195
|
multi: true
|
|
3833
4196
|
}
|
|
3834
|
-
], standalone: false, template: "<div
|
|
4197
|
+
], standalone: false, template: "<div\n class=\"aeb-select__selected-item\"\n [class.open]=\"isOpen\"\n [class.error]=\"hasError\"\n [attr.tabindex]=\"disabled ? -1 : 0\"\n [attr.role]=\"'combobox'\"\n [attr.aria-expanded]=\"isOpen\"\n [attr.aria-haspopup]=\"'listbox'\"\n [attr.aria-label]=\"label\"\n (click)=\"!disabled && openDropdown()\"\n>\n <label\n class=\"aeb-select__label\"\n [class.float]=\"selectedOption\"\n [class.placeholder]=\"!selectedOption\"\n >\n {{ label }}\n </label>\n\n @if (selectedOption) {\n <div class=\"aeb-select__selected-text\">\n {{ selectedOption.label }}\n </div>\n }\n</div>\n\n<div class=\"aeb-select__icon\" [class.open]=\"isOpen\" [class.disabled]=\"disabled\">\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 10L11.9293 13.9293C11.9683 13.9683 12.0317 13.9683 12.0707 13.9293L16 10\"\n stroke=\"#1F2632\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n />\n </svg>\n</div>\n\n<aeb-dropdown-menu\n [options]=\"options\"\n [direction]=\"direction\"\n [isOpen]=\"isOpen\"\n [selectedOption]=\"selectedOption\"\n (optionSelect)=\"setValue($event)\"\n></aeb-dropdown-menu>\n", styles: [".aeb-select{position:relative;display:flex;width:100%;min-width:262px;font-size:16px;color:var(--c-t-primary);cursor:pointer;-webkit-user-select:none;user-select:none;font-weight:300}.aeb-select.disabled{cursor:default;pointer-events:none;color:var(--c-t-secondary)}.aeb-select__selected-item{display:flex;align-items:center;width:100%;height:54px;padding:0 52px 0 14px;background:var(--c-bg-surface-medium);border-radius:12px;border:1px solid transparent;position:relative}.aeb-select__selected-item:focus{outline:none;border-color:var(--c-btn-p-default)}.aeb-select__selected-item:hover:not(.disabled){background-color:var(--c-bg-surface)}.aeb-select__selected-item.open{border-color:var(--c-btn-p-default);background-color:var(--c-bg-default)}.aeb-select__selected-item.error{background:var(--c-btn-ws-pressed);border-color:var(--c-btn-ws-pressed)}.aeb-select__selected-item.error:hover{background-color:var(--c-btn-ws-default);border-color:var(--c-btn-ws-default)}.aeb-select__selected-item.error.open{background-color:var(--c-bg-default);border-color:var(--c-btn-w-default)}.aeb-select__selected-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;position:absolute;bottom:8px;left:16px;right:52px}.aeb-select__label{font-size:12px;color:var(--c-t-secondary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;pointer-events:none}.aeb-select__label.float{position:absolute;left:16px;top:8px;width:calc(100% - 68px)}.aeb-select__label.placeholder{color:var(--c-t-secondary);top:18px;font-size:16px;font-weight:300px;line-height:20px}.aeb-select__icon{position:absolute;top:16px;right:16px;width:24px;height:24px;pointer-events:none;transition:transform .3s cubic-bezier(.4,0,.2,1)}.aeb-select__icon.disabled svg path{stroke:var(--c-i-secondary)}.aeb-select__icon.open{transform:rotate(180deg)}\n"] }]
|
|
3835
4198
|
}], ctorParameters: () => [], propDecorators: { label: [{
|
|
3836
4199
|
type: Input
|
|
3837
4200
|
}], options: [{
|
|
@@ -3847,12 +4210,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImpor
|
|
|
3847
4210
|
type: Input
|
|
3848
4211
|
}], optionSelect: [{
|
|
3849
4212
|
type: Output
|
|
4213
|
+
}], dropdownMenuRef: [{
|
|
4214
|
+
type: ViewChild,
|
|
4215
|
+
args: [DropdownMenu]
|
|
3850
4216
|
}], isSelect: [{
|
|
3851
4217
|
type: HostBinding,
|
|
3852
4218
|
args: ['class.aeb-select']
|
|
4219
|
+
}], isDisabledClass: [{
|
|
4220
|
+
type: HostBinding,
|
|
4221
|
+
args: ['class.disabled']
|
|
3853
4222
|
}], clickOutside: [{
|
|
3854
4223
|
type: HostListener,
|
|
3855
4224
|
args: ['clickOutside']
|
|
4225
|
+
}], onKeyDown: [{
|
|
4226
|
+
type: HostListener,
|
|
4227
|
+
args: ['keydown', ['$event']]
|
|
3856
4228
|
}] } });
|
|
3857
4229
|
|
|
3858
4230
|
class SelectModule {
|
|
@@ -5355,7 +5727,6 @@ class AebSwitchComponent {
|
|
|
5355
5727
|
return this.checked;
|
|
5356
5728
|
}
|
|
5357
5729
|
get isWarningOrInvalid() {
|
|
5358
|
-
console.log(this.ngControl?.status);
|
|
5359
5730
|
return this.warning || this.ngControl?.status === 'INVALID';
|
|
5360
5731
|
}
|
|
5361
5732
|
constructor() {
|