aeb-ui-kit 9.1.0-preview.1113 → 9.1.0-preview.1126
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 +338 -395
- package/fesm2022/aeb-ui-kit.mjs.map +1 -1
- package/index.d.ts +112 -133
- package/package.json +1 -1
package/fesm2022/aeb-ui-kit.mjs
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { ViewChild, Input, ViewEncapsulation, Component, NgModule, HostBinding, Directive, inject, ElementRef, HostListener, ContentChild, ChangeDetectionStrategy, Renderer2, EventEmitter, forwardRef, Output, ComponentFactoryResolver, Injector, ApplicationRef, RendererFactory2, Injectable,
|
|
2
|
+
import { ViewChild, Input, ViewEncapsulation, Component, NgModule, HostBinding, Directive, inject, ElementRef, HostListener, ContentChild, ChangeDetectionStrategy, Renderer2, EventEmitter, forwardRef, Output, input, ComponentFactoryResolver, Injector, ApplicationRef, RendererFactory2, Injectable, output, Pipe, LOCALE_ID, ChangeDetectorRef, computed, signal, effect, ContentChildren, TemplateRef, ViewChildren } from '@angular/core';
|
|
3
3
|
import * as i1 from '@angular/common';
|
|
4
4
|
import { CommonModule, DOCUMENT, formatDate, formatNumber } from '@angular/common';
|
|
5
5
|
import * as i3 from '@angular/forms';
|
|
6
6
|
import { NG_VALUE_ACCESSOR, FormBuilder, FormControl, Validators, FormsModule, ReactiveFormsModule, NgControl } from '@angular/forms';
|
|
7
|
-
import { Subject, timer, map, takeUntil, Subscription,
|
|
7
|
+
import { Subject, timer, map, takeUntil, Subscription, filter, fromEvent, debounce, debounceTime } from 'rxjs';
|
|
8
8
|
import { trigger, state, transition, style, animate } from '@angular/animations';
|
|
9
|
-
import { DomSanitizer } from '@angular/platform-browser';
|
|
10
9
|
import { addWeeks, addDays, isSameMonth, getWeeksInMonth, startOfMonth, startOfWeek, addMonths, subMonths, eachYearOfInterval, getYear, addYears, subYears, differenceInYears, startOfYear, isToday, isValid, isSameDay, getMonth, setMonth, areIntervalsOverlapping, startOfDay, endOfDay, parse, format, getDaysInMonth, isExists, compareAsc, getDate } from 'date-fns';
|
|
11
10
|
import { ru } from 'date-fns/locale';
|
|
12
11
|
import '@angular/common/locales/global/ru';
|
|
@@ -790,7 +789,7 @@ class FormFieldComponent {
|
|
|
790
789
|
return false;
|
|
791
790
|
}
|
|
792
791
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: FormFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
793
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.4", type: FormFieldComponent, isStandalone: false, selector: "aeb-form-field", inputs: { isInvalid: "isInvalid", showIcon: "showIcon", showDescription: "showDescription", showErrorMessage: "showErrorMessage", validateOnDirty: "validateOnDirty", disabled: "disabled" }, host: { properties: { "class": "this.class", "class.aeb-form-field--focused": "this.focused", "class.aeb-form-field--has-value": "this.hasValue", "class.aeb-form-field--error": "this.error", "class.aeb-form-field--disabled": "this.isDisabled", "class.aeb-form-field--has-icon": "this.hasIcon" } }, queries: [{ propertyName: "formField", first: true, predicate: FormFieldDirective, descendants: true }], ngImport: i0, template: "<ng-content />\n\n<div class=\"aeb-label__container\">\n <ng-content select=\"[aebLabel]\" />\n</div>\n\n@if (showIcon) {\n <ng-content select=\"[aebIcon]\" />\n}\n\n@if (showErrorMessage && error && !disabled && !isFocused) {\n <div\n [@labelVisibility]=\"\n showErrorMessage && error && !disabled && !isFocused ? 'visible' : 'void'\n \"\n class=\"aeb-form-field--error-message\"\n >\n <ng-content select=\"[errorMessage]\" />\n </div>\n}\n@if (showDescription && !error && !disabled) {\n <div\n [@labelVisibility]=\"\n showDescription && !error && !disabled ? 'visible' : 'void'\n \"\n class=\"aeb-form-field--description\"\n >\n <ng-content select=\"[description]\" />\n </div>\n}\n", styles: [".aeb-form-field{--border-color-default: var(--c-bg-surface-medium);--border-color-hovered: var(--c-bg-surface);--border-color-active: var(--c-btn-p-default);--border-color-disabled: var(--c-bg-surface-medium);--border-color-warning-default: var(--c-btn-ws-pressed);--border-color-warning-hovered: var(--c-btn-ws-default);--border-color-warning-focused: var(--c-btn-w-default);--border-color-warning-disabled: var(--c-btn-ws-pressed);--background-color-default: var(--c-bg-surface-medium);--background-color-hovered: var(--c-bg-surface);--background-color-focused: var(--c-bg-default);--background-color-disabled: var(--c-bg-surface-medium);--background-color-warning-default: var(--c-btn-ws-pressed);--background-color-warning-hovered: var(--c-btn-ws-default);--background-color-warning-focused: var(--c-bg-default);--background-color-warning-disabled: var(--c-btn-ws-pressed);--label-color-default: var(--c-t-secondary);--label-color-active: var(--c-t-secondary);--label-color-disabled: var(--c-t-secondary);--input-text-color-default: var(--c-t-primary);--input-text-color-disabled: var(--c-t-secondary);--error-text-color: var(--c-t-critical);position:relative;display:flex;flex-direction:column;color:var(--label-color-default)}.aeb-form-field.aeb-form-field--error .aeb-input{border-color:var(--border-color-warning-default);background-color:var(--background-color-warning-default)}.aeb-form-field.aeb-form-field--error .aeb-input:hover{border-color:var(--border-color-warning-hovered);background-color:var(--background-color-warning-hovered)}.aeb-form-field.aeb-form-field--error .aeb-input:focus{border-color:var(--border-color-warning-focused);background-color:var(--background-color-warning-focused)}.aeb-form-field.aeb-form-field--error .aeb-input:disabled{border-color:var(--border-color-warning-disabled);background-color:var(--background-color-warning-disabled)}.aeb-form-field.aeb-form-field--error .aeb-label__container{color:var(--label-color-error)}.aeb-form-field--focused .aeb-form-field--description{color:var(--label-color-active)}.aeb-form-field--error-message{padding:8px 0;font-size:var(--font-size-xxs);color:var(--error-text-color);overflow-wrap:break-word}.aeb-form-field--error-message:has(*:empty){display:none}.aeb-form-field--description{padding:8px 0;font-size:var(--font-size-xxs);color:var(--input-text-color-disabled);overflow-wrap:break-word}.aeb-form-field.aeb-form-field--disabled .aeb-input{border:var(--border-thin) solid var(--border-color-disabled);color:var(--input-text-color-disabled);background-color:var(--background-color-disabled)}.aeb-form-field.aeb-form-field--disabled .aeb-label__container{color:var(--label-color-disabled)}.aeb-form-field .aeb-input{display:block;box-sizing:border-box;width:100%;min-height:auto;color:var(--input-text-color-default);
|
|
792
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.4", type: FormFieldComponent, isStandalone: false, selector: "aeb-form-field", inputs: { isInvalid: "isInvalid", showIcon: "showIcon", showDescription: "showDescription", showErrorMessage: "showErrorMessage", validateOnDirty: "validateOnDirty", disabled: "disabled" }, host: { properties: { "class": "this.class", "class.aeb-form-field--focused": "this.focused", "class.aeb-form-field--has-value": "this.hasValue", "class.aeb-form-field--error": "this.error", "class.aeb-form-field--disabled": "this.isDisabled", "class.aeb-form-field--has-icon": "this.hasIcon" } }, queries: [{ propertyName: "formField", first: true, predicate: FormFieldDirective, descendants: true }], ngImport: i0, template: "<ng-content />\n\n<div class=\"aeb-label__container\">\n <ng-content select=\"[aebLabel]\" />\n</div>\n\n@if (showIcon) {\n <ng-content select=\"[aebIcon]\" />\n}\n\n@if (showErrorMessage && error && !disabled && !isFocused) {\n <div\n [@labelVisibility]=\"\n showErrorMessage && error && !disabled && !isFocused ? 'visible' : 'void'\n \"\n class=\"aeb-form-field--error-message\"\n >\n <ng-content select=\"[errorMessage]\" />\n </div>\n}\n@if (showDescription && !error && !disabled) {\n <div\n [@labelVisibility]=\"\n showDescription && !error && !disabled ? 'visible' : 'void'\n \"\n class=\"aeb-form-field--description\"\n >\n <ng-content select=\"[description]\" />\n </div>\n}\n", styles: [".aeb-form-field{--border-color-default: var(--c-bg-surface-medium);--border-color-hovered: var(--c-bg-surface);--border-color-active: var(--c-btn-p-default);--border-color-disabled: var(--c-bg-surface-medium);--border-color-warning-default: var(--c-btn-ws-pressed);--border-color-warning-hovered: var(--c-btn-ws-default);--border-color-warning-focused: var(--c-btn-w-default);--border-color-warning-disabled: var(--c-btn-ws-pressed);--background-color-default: var(--c-bg-surface-medium);--background-color-hovered: var(--c-bg-surface);--background-color-focused: var(--c-bg-default);--background-color-disabled: var(--c-bg-surface-medium);--background-color-warning-default: var(--c-btn-ws-pressed);--background-color-warning-hovered: var(--c-btn-ws-default);--background-color-warning-focused: var(--c-bg-default);--background-color-warning-disabled: var(--c-btn-ws-pressed);--label-color-default: var(--c-t-secondary);--label-color-active: var(--c-t-secondary);--label-color-disabled: var(--c-t-secondary);--input-text-color-default: var(--c-t-primary);--input-text-color-disabled: var(--c-t-secondary);--error-text-color: var(--c-t-critical);position:relative;display:flex;flex-direction:column;color:var(--label-color-default)}.aeb-form-field.aeb-form-field--error .aeb-input{border-color:var(--border-color-warning-default);background-color:var(--background-color-warning-default)}.aeb-form-field.aeb-form-field--error .aeb-input:hover{border-color:var(--border-color-warning-hovered);background-color:var(--background-color-warning-hovered)}.aeb-form-field.aeb-form-field--error .aeb-input:focus{border-color:var(--border-color-warning-focused);background-color:var(--background-color-warning-focused)}.aeb-form-field.aeb-form-field--error .aeb-input:disabled{border-color:var(--border-color-warning-disabled);background-color:var(--background-color-warning-disabled)}.aeb-form-field.aeb-form-field--error .aeb-label__container{color:var(--label-color-error)}.aeb-form-field--focused .aeb-form-field--description{color:var(--label-color-active)}.aeb-form-field--error-message{padding:8px 0;font-size:var(--font-size-xxs);color:var(--error-text-color);overflow-wrap:break-word}.aeb-form-field--error-message:has(*:empty){display:none}.aeb-form-field--description{padding:8px 0;font-size:var(--font-size-xxs);color:var(--input-text-color-disabled);overflow-wrap:break-word}.aeb-form-field.aeb-form-field--disabled .aeb-input{border:var(--border-thin) solid var(--border-color-disabled);color:var(--input-text-color-disabled);background-color:var(--background-color-disabled)}.aeb-form-field.aeb-form-field--disabled .aeb-label__container{color:var(--label-color-disabled)}.aeb-form-field .aeb-input{display:block;box-sizing:border-box;width:100%;min-height:auto;color:var(--input-text-color-default);padding:24px 16px 7px;font-size:16px;border:var(--border-thin) solid var(--border-color-default);background-color:var(--background-color-default);border-radius:var(--border-medium-rounded);box-shadow:none;transition:all ease-in-out .2s linear;font-weight:300}.aeb-form-field .aeb-input:hover{background-color:var(--background-color-hovered);border:var(--border-thin) solid var(--border-color-hovered)}.aeb-form-field .aeb-input:focus{outline:none;background-color:var(--background-color-focused);border:var(--border-thin) solid var(--background-color-focused)}.aeb-form-field .aeb-input,.aeb-form-field .aeb-input::-webkit-search-cancel-button,.aeb-form-field .aeb-input::-webkit-search-decoration,.aeb-form-field .aeb-input::-webkit-search-results-button,.aeb-form-field .aeb-input::-webkit-search-results-decoration{appearance:none}.aeb-form-field .aeb-input::-webkit-contacts-auto-fill-button,.aeb-form-field .aeb-input::-webkit-caps-lock-indicator,.aeb-form-field .aeb-input::-webkit-credentials-auto-fill-button{visibility:hidden}.aeb-form-field .aeb-input::-webkit-outer-spin-button,.aeb-form-field .aeb-input::-webkit-inner-spin-button{appearance:none;margin:0}.aeb-form-field .aeb-input[type=number]{appearance:textfield}.aeb-form-field textarea{resize:vertical;cursor:auto;scroll-behavior:smooth}.aeb-form-field textarea.aeb-input{min-height:70px;scrollbar-color:var(--color-blue-50) transparent;scrollbar-width:thin}.aeb-form-field textarea.aeb-input::-webkit-scrollbar{width:16px}.aeb-form-field textarea.aeb-input::-webkit-scrollbar-thumb{border:6px solid rgba(0,0,0,0);background-color:var(--color-blue-50);background-clip:padding-box;border-radius:9999px}.aeb-form-field textarea.aeb-input::-webkit-scrollbar-corner{background-color:transparent}.aeb-form-field textarea.aeb-input::-webkit-resizer{background:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNSIgaGVpZ2h0PSI1IiB2aWV3Qm94PSIwIDAgNSA1IiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPg0KPHBhdGggZD0iTTMuMjc5NTMgNC44Mzg1NkMzLjA2NDI3IDUuMDUzODEgMi43MTUyNyA1LjA1MzgxIDIuNTAwMDEgNC44Mzg1NkMyLjI4NDc1IDQuNjIzMyAyLjI4NDc1IDQuMjc0MyAyLjUwMDAxIDQuMDU5MDVMNC4wNTkwNCAyLjUwMDAzQzQuMjc0MyAyLjI4NDc3IDQuNjIzMyAyLjI4NDc3IDQuODM4NTYgMi41MDAwM0M1LjA1MzgxIDIuNzE1MjggNS4wNTM4MSAzLjA2NDI4IDQuODM4NTYgMy4yNzk1NEwzLjI3OTUzIDQuODM4NTZaIiBmaWxsPSIjM0I0MDRBIi8+DQo8cGF0aCBkPSJNMC45NDA5NTkgNC4wNTlDMC43MjU3MDIgNC4yNzQyNSAwLjM3NjcgNC4yNzQyNSAwLjE2MTQ0MyA0LjA1OUMtMC4wNTM4MTQzIDMuODQzNzQgLTAuMDUzODE0NCAzLjQ5NDc0IDAuMTYxNDQzIDMuMjc5NDlMMy4yNzk1MSAwLjE2MTQ0MkMzLjQ5NDc2IC0wLjA1MzgxNCAzLjg0Mzc2IC0wLjA1MzgxNCA0LjA1OTAyIDAuMTYxNDQyQzQuMjc0MjggMC4zNzY2OTggNC4yNzQyOCAwLjcyNTY5NyA0LjA1OTAyIDAuOTQwOTUzTDAuOTQwOTU5IDQuMDU5WiIgZmlsbD0iIzNCNDA0QSIvPg0KPC9zdmc+DQo=);background-repeat:no-repeat;background-position:center}.aeb-form-field .aeb-label__container{display:inline-block;position:absolute;top:16px;left:16px;max-width:calc(100% - 32px);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:16px;pointer-events:none;background-color:#0000;transition:all .2s ease-out;box-sizing:border-box;-webkit-user-select:none;user-select:none;font-weight:300}.aeb-form-field.aeb-form-field--focused .aeb-label__container,.aeb-form-field.aeb-form-field--has-value .aeb-label__container{line-height:14px;top:8px;font-size:var(--font-size-xxs)}.aeb-form-field.aeb-form-field--focused .aeb-input{border-color:var(--border-color-active)}.aeb-form-field.aeb-form-field--focused .aeb-label__container{color:var(--label-color-active)}.aeb-form-field.aeb-form-field--has-icon .aeb-input{padding-right:38px}.aeb-form-field.aeb-form-field--has-icon .aeb-label__container{max-width:calc(100% - 56px)}.aeb-form-field *[aebIcon]{position:absolute;top:16px;right:12px;width:24px;height:24px;-webkit-user-select:none;user-select:none}.aeb-form-field *[aebIcon] img{width:24px;height:24px}\n"], animations: [
|
|
794
793
|
trigger('labelVisibility', [
|
|
795
794
|
state('void', style({
|
|
796
795
|
'font-size': '0'
|
|
@@ -816,7 +815,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImpor
|
|
|
816
815
|
transition('void => visible', [animate('.1s')]),
|
|
817
816
|
transition('visible => void', [animate('.05s')])
|
|
818
817
|
])
|
|
819
|
-
], standalone: false, template: "<ng-content />\n\n<div class=\"aeb-label__container\">\n <ng-content select=\"[aebLabel]\" />\n</div>\n\n@if (showIcon) {\n <ng-content select=\"[aebIcon]\" />\n}\n\n@if (showErrorMessage && error && !disabled && !isFocused) {\n <div\n [@labelVisibility]=\"\n showErrorMessage && error && !disabled && !isFocused ? 'visible' : 'void'\n \"\n class=\"aeb-form-field--error-message\"\n >\n <ng-content select=\"[errorMessage]\" />\n </div>\n}\n@if (showDescription && !error && !disabled) {\n <div\n [@labelVisibility]=\"\n showDescription && !error && !disabled ? 'visible' : 'void'\n \"\n class=\"aeb-form-field--description\"\n >\n <ng-content select=\"[description]\" />\n </div>\n}\n", styles: [".aeb-form-field{--border-color-default: var(--c-bg-surface-medium);--border-color-hovered: var(--c-bg-surface);--border-color-active: var(--c-btn-p-default);--border-color-disabled: var(--c-bg-surface-medium);--border-color-warning-default: var(--c-btn-ws-pressed);--border-color-warning-hovered: var(--c-btn-ws-default);--border-color-warning-focused: var(--c-btn-w-default);--border-color-warning-disabled: var(--c-btn-ws-pressed);--background-color-default: var(--c-bg-surface-medium);--background-color-hovered: var(--c-bg-surface);--background-color-focused: var(--c-bg-default);--background-color-disabled: var(--c-bg-surface-medium);--background-color-warning-default: var(--c-btn-ws-pressed);--background-color-warning-hovered: var(--c-btn-ws-default);--background-color-warning-focused: var(--c-bg-default);--background-color-warning-disabled: var(--c-btn-ws-pressed);--label-color-default: var(--c-t-secondary);--label-color-active: var(--c-t-secondary);--label-color-disabled: var(--c-t-secondary);--input-text-color-default: var(--c-t-primary);--input-text-color-disabled: var(--c-t-secondary);--error-text-color: var(--c-t-critical);position:relative;display:flex;flex-direction:column;color:var(--label-color-default)}.aeb-form-field.aeb-form-field--error .aeb-input{border-color:var(--border-color-warning-default);background-color:var(--background-color-warning-default)}.aeb-form-field.aeb-form-field--error .aeb-input:hover{border-color:var(--border-color-warning-hovered);background-color:var(--background-color-warning-hovered)}.aeb-form-field.aeb-form-field--error .aeb-input:focus{border-color:var(--border-color-warning-focused);background-color:var(--background-color-warning-focused)}.aeb-form-field.aeb-form-field--error .aeb-input:disabled{border-color:var(--border-color-warning-disabled);background-color:var(--background-color-warning-disabled)}.aeb-form-field.aeb-form-field--error .aeb-label__container{color:var(--label-color-error)}.aeb-form-field--focused .aeb-form-field--description{color:var(--label-color-active)}.aeb-form-field--error-message{padding:8px 0;font-size:var(--font-size-xxs);color:var(--error-text-color);overflow-wrap:break-word}.aeb-form-field--error-message:has(*:empty){display:none}.aeb-form-field--description{padding:8px 0;font-size:var(--font-size-xxs);color:var(--input-text-color-disabled);overflow-wrap:break-word}.aeb-form-field.aeb-form-field--disabled .aeb-input{border:var(--border-thin) solid var(--border-color-disabled);color:var(--input-text-color-disabled);background-color:var(--background-color-disabled)}.aeb-form-field.aeb-form-field--disabled .aeb-label__container{color:var(--label-color-disabled)}.aeb-form-field .aeb-input{display:block;box-sizing:border-box;width:100%;min-height:auto;color:var(--input-text-color-default);
|
|
818
|
+
], standalone: false, template: "<ng-content />\n\n<div class=\"aeb-label__container\">\n <ng-content select=\"[aebLabel]\" />\n</div>\n\n@if (showIcon) {\n <ng-content select=\"[aebIcon]\" />\n}\n\n@if (showErrorMessage && error && !disabled && !isFocused) {\n <div\n [@labelVisibility]=\"\n showErrorMessage && error && !disabled && !isFocused ? 'visible' : 'void'\n \"\n class=\"aeb-form-field--error-message\"\n >\n <ng-content select=\"[errorMessage]\" />\n </div>\n}\n@if (showDescription && !error && !disabled) {\n <div\n [@labelVisibility]=\"\n showDescription && !error && !disabled ? 'visible' : 'void'\n \"\n class=\"aeb-form-field--description\"\n >\n <ng-content select=\"[description]\" />\n </div>\n}\n", styles: [".aeb-form-field{--border-color-default: var(--c-bg-surface-medium);--border-color-hovered: var(--c-bg-surface);--border-color-active: var(--c-btn-p-default);--border-color-disabled: var(--c-bg-surface-medium);--border-color-warning-default: var(--c-btn-ws-pressed);--border-color-warning-hovered: var(--c-btn-ws-default);--border-color-warning-focused: var(--c-btn-w-default);--border-color-warning-disabled: var(--c-btn-ws-pressed);--background-color-default: var(--c-bg-surface-medium);--background-color-hovered: var(--c-bg-surface);--background-color-focused: var(--c-bg-default);--background-color-disabled: var(--c-bg-surface-medium);--background-color-warning-default: var(--c-btn-ws-pressed);--background-color-warning-hovered: var(--c-btn-ws-default);--background-color-warning-focused: var(--c-bg-default);--background-color-warning-disabled: var(--c-btn-ws-pressed);--label-color-default: var(--c-t-secondary);--label-color-active: var(--c-t-secondary);--label-color-disabled: var(--c-t-secondary);--input-text-color-default: var(--c-t-primary);--input-text-color-disabled: var(--c-t-secondary);--error-text-color: var(--c-t-critical);position:relative;display:flex;flex-direction:column;color:var(--label-color-default)}.aeb-form-field.aeb-form-field--error .aeb-input{border-color:var(--border-color-warning-default);background-color:var(--background-color-warning-default)}.aeb-form-field.aeb-form-field--error .aeb-input:hover{border-color:var(--border-color-warning-hovered);background-color:var(--background-color-warning-hovered)}.aeb-form-field.aeb-form-field--error .aeb-input:focus{border-color:var(--border-color-warning-focused);background-color:var(--background-color-warning-focused)}.aeb-form-field.aeb-form-field--error .aeb-input:disabled{border-color:var(--border-color-warning-disabled);background-color:var(--background-color-warning-disabled)}.aeb-form-field.aeb-form-field--error .aeb-label__container{color:var(--label-color-error)}.aeb-form-field--focused .aeb-form-field--description{color:var(--label-color-active)}.aeb-form-field--error-message{padding:8px 0;font-size:var(--font-size-xxs);color:var(--error-text-color);overflow-wrap:break-word}.aeb-form-field--error-message:has(*:empty){display:none}.aeb-form-field--description{padding:8px 0;font-size:var(--font-size-xxs);color:var(--input-text-color-disabled);overflow-wrap:break-word}.aeb-form-field.aeb-form-field--disabled .aeb-input{border:var(--border-thin) solid var(--border-color-disabled);color:var(--input-text-color-disabled);background-color:var(--background-color-disabled)}.aeb-form-field.aeb-form-field--disabled .aeb-label__container{color:var(--label-color-disabled)}.aeb-form-field .aeb-input{display:block;box-sizing:border-box;width:100%;min-height:auto;color:var(--input-text-color-default);padding:24px 16px 7px;font-size:16px;border:var(--border-thin) solid var(--border-color-default);background-color:var(--background-color-default);border-radius:var(--border-medium-rounded);box-shadow:none;transition:all ease-in-out .2s linear;font-weight:300}.aeb-form-field .aeb-input:hover{background-color:var(--background-color-hovered);border:var(--border-thin) solid var(--border-color-hovered)}.aeb-form-field .aeb-input:focus{outline:none;background-color:var(--background-color-focused);border:var(--border-thin) solid var(--background-color-focused)}.aeb-form-field .aeb-input,.aeb-form-field .aeb-input::-webkit-search-cancel-button,.aeb-form-field .aeb-input::-webkit-search-decoration,.aeb-form-field .aeb-input::-webkit-search-results-button,.aeb-form-field .aeb-input::-webkit-search-results-decoration{appearance:none}.aeb-form-field .aeb-input::-webkit-contacts-auto-fill-button,.aeb-form-field .aeb-input::-webkit-caps-lock-indicator,.aeb-form-field .aeb-input::-webkit-credentials-auto-fill-button{visibility:hidden}.aeb-form-field .aeb-input::-webkit-outer-spin-button,.aeb-form-field .aeb-input::-webkit-inner-spin-button{appearance:none;margin:0}.aeb-form-field .aeb-input[type=number]{appearance:textfield}.aeb-form-field textarea{resize:vertical;cursor:auto;scroll-behavior:smooth}.aeb-form-field textarea.aeb-input{min-height:70px;scrollbar-color:var(--color-blue-50) transparent;scrollbar-width:thin}.aeb-form-field textarea.aeb-input::-webkit-scrollbar{width:16px}.aeb-form-field textarea.aeb-input::-webkit-scrollbar-thumb{border:6px solid rgba(0,0,0,0);background-color:var(--color-blue-50);background-clip:padding-box;border-radius:9999px}.aeb-form-field textarea.aeb-input::-webkit-scrollbar-corner{background-color:transparent}.aeb-form-field textarea.aeb-input::-webkit-resizer{background:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNSIgaGVpZ2h0PSI1IiB2aWV3Qm94PSIwIDAgNSA1IiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPg0KPHBhdGggZD0iTTMuMjc5NTMgNC44Mzg1NkMzLjA2NDI3IDUuMDUzODEgMi43MTUyNyA1LjA1MzgxIDIuNTAwMDEgNC44Mzg1NkMyLjI4NDc1IDQuNjIzMyAyLjI4NDc1IDQuMjc0MyAyLjUwMDAxIDQuMDU5MDVMNC4wNTkwNCAyLjUwMDAzQzQuMjc0MyAyLjI4NDc3IDQuNjIzMyAyLjI4NDc3IDQuODM4NTYgMi41MDAwM0M1LjA1MzgxIDIuNzE1MjggNS4wNTM4MSAzLjA2NDI4IDQuODM4NTYgMy4yNzk1NEwzLjI3OTUzIDQuODM4NTZaIiBmaWxsPSIjM0I0MDRBIi8+DQo8cGF0aCBkPSJNMC45NDA5NTkgNC4wNTlDMC43MjU3MDIgNC4yNzQyNSAwLjM3NjcgNC4yNzQyNSAwLjE2MTQ0MyA0LjA1OUMtMC4wNTM4MTQzIDMuODQzNzQgLTAuMDUzODE0NCAzLjQ5NDc0IDAuMTYxNDQzIDMuMjc5NDlMMy4yNzk1MSAwLjE2MTQ0MkMzLjQ5NDc2IC0wLjA1MzgxNCAzLjg0Mzc2IC0wLjA1MzgxNCA0LjA1OTAyIDAuMTYxNDQyQzQuMjc0MjggMC4zNzY2OTggNC4yNzQyOCAwLjcyNTY5NyA0LjA1OTAyIDAuOTQwOTUzTDAuOTQwOTU5IDQuMDU5WiIgZmlsbD0iIzNCNDA0QSIvPg0KPC9zdmc+DQo=);background-repeat:no-repeat;background-position:center}.aeb-form-field .aeb-label__container{display:inline-block;position:absolute;top:16px;left:16px;max-width:calc(100% - 32px);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:16px;pointer-events:none;background-color:#0000;transition:all .2s ease-out;box-sizing:border-box;-webkit-user-select:none;user-select:none;font-weight:300}.aeb-form-field.aeb-form-field--focused .aeb-label__container,.aeb-form-field.aeb-form-field--has-value .aeb-label__container{line-height:14px;top:8px;font-size:var(--font-size-xxs)}.aeb-form-field.aeb-form-field--focused .aeb-input{border-color:var(--border-color-active)}.aeb-form-field.aeb-form-field--focused .aeb-label__container{color:var(--label-color-active)}.aeb-form-field.aeb-form-field--has-icon .aeb-input{padding-right:38px}.aeb-form-field.aeb-form-field--has-icon .aeb-label__container{max-width:calc(100% - 56px)}.aeb-form-field *[aebIcon]{position:absolute;top:16px;right:12px;width:24px;height:24px;-webkit-user-select:none;user-select:none}.aeb-form-field *[aebIcon] img{width:24px;height:24px}\n"] }]
|
|
820
819
|
}], propDecorators: { formField: [{
|
|
821
820
|
type: ContentChild,
|
|
822
821
|
args: [FormFieldDirective]
|
|
@@ -887,24 +886,41 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImpor
|
|
|
887
886
|
}] });
|
|
888
887
|
|
|
889
888
|
class TooltipComponent {
|
|
890
|
-
constructor() {
|
|
889
|
+
constructor() {
|
|
890
|
+
this.renderer = inject(Renderer2);
|
|
891
|
+
this.title = input('', ...(ngDevMode ? [{ debugName: "title" }] : []));
|
|
892
|
+
this.data = input('', ...(ngDevMode ? [{ debugName: "data" }] : []));
|
|
893
|
+
this.html = input('', ...(ngDevMode ? [{ debugName: "html" }] : []));
|
|
894
|
+
this.type = input('primary', ...(ngDevMode ? [{ debugName: "type" }] : []));
|
|
895
|
+
this.contentEl = input(null, ...(ngDevMode ? [{ debugName: "contentEl" }] : []));
|
|
896
|
+
}
|
|
891
897
|
ngOnInit() { }
|
|
898
|
+
ngAfterViewInit() {
|
|
899
|
+
const el = this.contentEl();
|
|
900
|
+
if (el && this.container?.nativeElement) {
|
|
901
|
+
const clone = el.cloneNode(true);
|
|
902
|
+
this.renderer.setStyle(clone, 'display', '');
|
|
903
|
+
this.renderer.appendChild(this.container.nativeElement, clone);
|
|
904
|
+
}
|
|
905
|
+
else if (this.html()) {
|
|
906
|
+
// innerHTML binding in template will handle this
|
|
907
|
+
}
|
|
908
|
+
}
|
|
892
909
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: TooltipComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
893
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
910
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.4", type: TooltipComponent, isStandalone: false, selector: "aeb-tooltip", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, html: { classPropertyName: "html", publicName: "html", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, contentEl: { classPropertyName: "contentEl", publicName: "contentEl", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "tooltip", first: true, predicate: ["tooltip"], descendants: true }, { propertyName: "container", first: true, predicate: ["container"], descendants: true }], ngImport: i0, template: "<div #tooltip [class]=\"'aeb-tooltip aeb-tooltip--' + type()\">\n @if (title()) {\n <p class=\"aeb-tooltip__title\">{{ title() }}</p>\n }\n <div\n #container\n class=\"aeb-tooltip__container\"\n [innerHTML]=\"!contentEl() ? html() || data() : null\"\n ></div>\n</div>\n", styles: ["@keyframes out{0%{transform:scale(0)}to{transform:scale(1)}}.aeb-tooltip{position:fixed;z-index:9999;pointer-events:none;border-radius:20px;opacity:0;transition:opacity .2s;min-width:194px;padding:20px;box-sizing:border-box;display:flex;flex-direction:column}.aeb-tooltip:before{position:absolute;width:14px;height:14px;content:\"\";transform:rotate(45deg);background-color:inherit}.aeb-tooltip--open{opacity:1;animation:out .2s}.aeb-tooltip--primary{background-color:var(--c-bg-light);box-shadow:0 0 12px #27303e1f}.aeb-tooltip--secondary{background-color:var(--c-bg-surface-medium)}.aeb-tooltip__title{font-weight:500;font-size:16px;margin:0 0 8px}.aeb-tooltip__container{position:relative;align-items:center;justify-content:center;width:100%;font-size:14px;color:var(--c-t-primary);word-break:keep-all;white-space:nowrap}.aeb-tooltip--top:before{bottom:-7px;left:calc(50% - 7px)}.aeb-tooltip--right:before{top:calc(50% - 7px);left:-7px}.aeb-tooltip--bottom:before{top:-7px;left:calc(50% - 7px)}.aeb-tooltip--left:before{top:calc(50% - 7px);left:calc(100% - 7px)}\n"], encapsulation: i0.ViewEncapsulation.None }); }
|
|
894
911
|
}
|
|
895
912
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: TooltipComponent, decorators: [{
|
|
896
913
|
type: Component,
|
|
897
|
-
args: [{ selector: 'aeb-tooltip', encapsulation: ViewEncapsulation.None, standalone: false, template: "<div class=\"aeb-tooltip\"
|
|
898
|
-
}],
|
|
914
|
+
args: [{ selector: 'aeb-tooltip', encapsulation: ViewEncapsulation.None, standalone: false, template: "<div #tooltip [class]=\"'aeb-tooltip aeb-tooltip--' + type()\">\n @if (title()) {\n <p class=\"aeb-tooltip__title\">{{ title() }}</p>\n }\n <div\n #container\n class=\"aeb-tooltip__container\"\n [innerHTML]=\"!contentEl() ? html() || data() : null\"\n ></div>\n</div>\n", styles: ["@keyframes out{0%{transform:scale(0)}to{transform:scale(1)}}.aeb-tooltip{position:fixed;z-index:9999;pointer-events:none;border-radius:20px;opacity:0;transition:opacity .2s;min-width:194px;padding:20px;box-sizing:border-box;display:flex;flex-direction:column}.aeb-tooltip:before{position:absolute;width:14px;height:14px;content:\"\";transform:rotate(45deg);background-color:inherit}.aeb-tooltip--open{opacity:1;animation:out .2s}.aeb-tooltip--primary{background-color:var(--c-bg-light);box-shadow:0 0 12px #27303e1f}.aeb-tooltip--secondary{background-color:var(--c-bg-surface-medium)}.aeb-tooltip__title{font-weight:500;font-size:16px;margin:0 0 8px}.aeb-tooltip__container{position:relative;align-items:center;justify-content:center;width:100%;font-size:14px;color:var(--c-t-primary);word-break:keep-all;white-space:nowrap}.aeb-tooltip--top:before{bottom:-7px;left:calc(50% - 7px)}.aeb-tooltip--right:before{top:calc(50% - 7px);left:-7px}.aeb-tooltip--bottom:before{top:-7px;left:calc(50% - 7px)}.aeb-tooltip--left:before{top:calc(50% - 7px);left:calc(100% - 7px)}\n"] }]
|
|
915
|
+
}], propDecorators: { tooltip: [{
|
|
899
916
|
type: ViewChild,
|
|
900
917
|
args: ['tooltip']
|
|
901
|
-
}],
|
|
902
|
-
type:
|
|
903
|
-
|
|
904
|
-
type: Input
|
|
918
|
+
}], container: [{
|
|
919
|
+
type: ViewChild,
|
|
920
|
+
args: ['container']
|
|
905
921
|
}] } });
|
|
906
922
|
|
|
907
|
-
class
|
|
923
|
+
class DomService {
|
|
908
924
|
constructor() {
|
|
909
925
|
this.componentFactoryResolver = inject(ComponentFactoryResolver);
|
|
910
926
|
this.injector = inject(Injector);
|
|
@@ -919,7 +935,10 @@ class DOMService {
|
|
|
919
935
|
.resolveComponentFactory(component)
|
|
920
936
|
.create(this.injector);
|
|
921
937
|
if (componentProps !== null && typeof componentRef.instance === 'object') {
|
|
922
|
-
Object.
|
|
938
|
+
for (const [key, value] of Object.entries(componentProps)) {
|
|
939
|
+
// Use Angular's setInput API to support both classic @Input and signal inputs
|
|
940
|
+
componentRef.setInput(key, value);
|
|
941
|
+
}
|
|
923
942
|
}
|
|
924
943
|
this.applicationRef.attachView(componentRef.hostView);
|
|
925
944
|
const componentRootNode = componentRef.hostView.rootNodes[0];
|
|
@@ -931,10 +950,10 @@ class DOMService {
|
|
|
931
950
|
this.applicationRef.detachView(this.componentRef.hostView);
|
|
932
951
|
this.componentRef.destroy();
|
|
933
952
|
}
|
|
934
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type:
|
|
935
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type:
|
|
953
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: DomService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
954
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: DomService, providedIn: 'root' }); }
|
|
936
955
|
}
|
|
937
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type:
|
|
956
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: DomService, decorators: [{
|
|
938
957
|
type: Injectable,
|
|
939
958
|
args: [{
|
|
940
959
|
providedIn: 'root'
|
|
@@ -944,13 +963,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImpor
|
|
|
944
963
|
class TooltipDirective {
|
|
945
964
|
constructor() {
|
|
946
965
|
this.el = inject(ElementRef);
|
|
947
|
-
this.dom = inject(
|
|
948
|
-
this.sanitizer = inject(DomSanitizer);
|
|
949
|
-
this._ngZone = inject(NgZone);
|
|
950
|
-
this.position = 'top';
|
|
951
|
-
this.overflow = false;
|
|
952
|
-
this.clickOutside = new EventEmitter();
|
|
953
|
-
this.tooltipOpen = false;
|
|
966
|
+
this.dom = inject(DomService);
|
|
954
967
|
this.tooltipConfig = {
|
|
955
968
|
right: (boundaries, tooltip) => {
|
|
956
969
|
const targetHalf = boundaries.top + boundaries.height / 2;
|
|
@@ -982,6 +995,12 @@ class TooltipDirective {
|
|
|
982
995
|
];
|
|
983
996
|
}
|
|
984
997
|
};
|
|
998
|
+
this.tooltipOpen = false;
|
|
999
|
+
this.tooltipTitle = input('', ...(ngDevMode ? [{ debugName: "tooltipTitle" }] : []));
|
|
1000
|
+
this.tooltipData = input('', ...(ngDevMode ? [{ debugName: "tooltipData" }] : []));
|
|
1001
|
+
this.tooltipPosition = input('top', ...(ngDevMode ? [{ debugName: "tooltipPosition" }] : []));
|
|
1002
|
+
this.tooltipType = input('primary', ...(ngDevMode ? [{ debugName: "tooltipType" }] : []));
|
|
1003
|
+
this.clickOutside = output();
|
|
985
1004
|
this.handleDocumentTouchstart = (event) => {
|
|
986
1005
|
const contain = this.el.nativeElement.contains(event.target);
|
|
987
1006
|
if (!contain) {
|
|
@@ -997,12 +1016,11 @@ class TooltipDirective {
|
|
|
997
1016
|
onMouseEnter() {
|
|
998
1017
|
this.showTooltip();
|
|
999
1018
|
}
|
|
1000
|
-
onClick(
|
|
1019
|
+
onClick() {
|
|
1001
1020
|
if (this.tooltipOpen) {
|
|
1002
1021
|
this.hideTooltip();
|
|
1003
1022
|
}
|
|
1004
1023
|
else {
|
|
1005
|
-
this.touchTimeStamp = event.timeStamp;
|
|
1006
1024
|
this.showTooltip();
|
|
1007
1025
|
}
|
|
1008
1026
|
}
|
|
@@ -1012,27 +1030,6 @@ class TooltipDirective {
|
|
|
1012
1030
|
this.tooltip.tooltip.nativeElement.setAttribute('style', '');
|
|
1013
1031
|
}
|
|
1014
1032
|
}
|
|
1015
|
-
showTooltip() {
|
|
1016
|
-
if (this.overflow) {
|
|
1017
|
-
const onOverflow = this.el.nativeElement.scrollWidth >
|
|
1018
|
-
this.el.nativeElement.offsetWidth;
|
|
1019
|
-
if (!onOverflow) {
|
|
1020
|
-
return;
|
|
1021
|
-
}
|
|
1022
|
-
}
|
|
1023
|
-
this.tooltipOpen = true;
|
|
1024
|
-
const tooltip = this.tooltip.tooltip.nativeElement;
|
|
1025
|
-
const boundaries = this.el.nativeElement.getBoundingClientRect();
|
|
1026
|
-
const [left, top] = this.tooltipConfig[this.position](boundaries, tooltip);
|
|
1027
|
-
tooltip.style.left = `${left}px`;
|
|
1028
|
-
tooltip.style.top = `${top}px`;
|
|
1029
|
-
tooltip.className = `aeb-tooltip aeb-tooltip--open aeb-tooltip--${this.position}`;
|
|
1030
|
-
}
|
|
1031
|
-
hideTooltip() {
|
|
1032
|
-
this.tooltipOpen = false;
|
|
1033
|
-
const tooltip = this.tooltip.tooltip.nativeElement;
|
|
1034
|
-
tooltip.className = 'aeb-tooltip';
|
|
1035
|
-
}
|
|
1036
1033
|
ngOnDestroy() {
|
|
1037
1034
|
this.hideTooltip();
|
|
1038
1035
|
this.dom.removeComponent();
|
|
@@ -1040,30 +1037,44 @@ class TooltipDirective {
|
|
|
1040
1037
|
}
|
|
1041
1038
|
ngOnInit() {
|
|
1042
1039
|
this.tooltip = this.dom.attachComponent(TooltipComponent, {
|
|
1043
|
-
|
|
1040
|
+
title: this.tooltipTitle() || '',
|
|
1041
|
+
data: this.tooltipData() || '',
|
|
1042
|
+
type: this.tooltipType() || ''
|
|
1044
1043
|
});
|
|
1045
1044
|
this.initListeners();
|
|
1046
1045
|
}
|
|
1047
1046
|
ngAfterViewInit() {
|
|
1048
1047
|
if (this.tooltipContent) {
|
|
1049
1048
|
this.tooltip = this.dom.attachComponent(TooltipComponent, {
|
|
1050
|
-
|
|
1049
|
+
contentEl: this.tooltipContent.nativeElement,
|
|
1050
|
+
html: this.tooltipContent.nativeElement.innerHTML,
|
|
1051
|
+
type: this.tooltipType() || ''
|
|
1051
1052
|
});
|
|
1052
1053
|
this.tooltipContent.nativeElement.style.display = 'none';
|
|
1053
1054
|
}
|
|
1054
1055
|
}
|
|
1055
1056
|
initListeners() {
|
|
1056
|
-
this.
|
|
1057
|
-
document.addEventListener('touchstart', this.handleDocumentTouchstart);
|
|
1058
|
-
});
|
|
1057
|
+
document.addEventListener('touchstart', this.handleDocumentTouchstart);
|
|
1059
1058
|
}
|
|
1060
1059
|
removeListeners() {
|
|
1061
|
-
this.
|
|
1062
|
-
|
|
1063
|
-
|
|
1060
|
+
document.removeEventListener('touchstart', this.handleDocumentTouchstart);
|
|
1061
|
+
}
|
|
1062
|
+
showTooltip() {
|
|
1063
|
+
this.tooltipOpen = true;
|
|
1064
|
+
const tooltip = this.tooltip.tooltip.nativeElement;
|
|
1065
|
+
const boundaries = this.el.nativeElement.getBoundingClientRect();
|
|
1066
|
+
const [left, top] = this.tooltipConfig[this.tooltipPosition()](boundaries, tooltip);
|
|
1067
|
+
tooltip.style.left = `${left}px`;
|
|
1068
|
+
tooltip.style.top = `${top}px`;
|
|
1069
|
+
tooltip.className = `aeb-tooltip aeb-tooltip--open aeb-tooltip--${this.tooltipPosition()} aeb-tooltip--${this.tooltipType()}`;
|
|
1070
|
+
}
|
|
1071
|
+
hideTooltip() {
|
|
1072
|
+
this.tooltipOpen = false;
|
|
1073
|
+
const tooltip = this.tooltip.tooltip.nativeElement;
|
|
1074
|
+
tooltip.className = 'aeb-tooltip';
|
|
1064
1075
|
}
|
|
1065
1076
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: TooltipDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1066
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
1077
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.2.4", type: TooltipDirective, isStandalone: false, selector: "[aebTooltip]", inputs: { tooltipTitle: { classPropertyName: "tooltipTitle", publicName: "tooltipTitle", isSignal: true, isRequired: false, transformFunction: null }, tooltipData: { classPropertyName: "tooltipData", publicName: "tooltipData", isSignal: true, isRequired: false, transformFunction: null }, tooltipPosition: { classPropertyName: "tooltipPosition", publicName: "tooltipPosition", isSignal: true, isRequired: false, transformFunction: null }, tooltipType: { classPropertyName: "tooltipType", publicName: "tooltipType", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { clickOutside: "clickOutside" }, host: { listeners: { "mouseleave": "onMouseLeave()", "mouseenter": "onMouseEnter()", "touch": "onClick()", "window:orientationchange": "orientationChangeHandler()" } }, queries: [{ propertyName: "tooltipContent", first: true, predicate: ["tooltipContent"], descendants: true }], ngImport: i0 }); }
|
|
1067
1078
|
}
|
|
1068
1079
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: TooltipDirective, decorators: [{
|
|
1069
1080
|
type: Directive,
|
|
@@ -1071,29 +1082,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImpor
|
|
|
1071
1082
|
selector: '[aebTooltip]',
|
|
1072
1083
|
standalone: false
|
|
1073
1084
|
}]
|
|
1074
|
-
}], ctorParameters: () => [], propDecorators: {
|
|
1075
|
-
type: Input,
|
|
1076
|
-
args: ['tooltip-data']
|
|
1077
|
-
}], position: [{
|
|
1078
|
-
type: Input,
|
|
1079
|
-
args: ['position']
|
|
1080
|
-
}], overflow: [{
|
|
1081
|
-
type: Input,
|
|
1082
|
-
args: ['overflow']
|
|
1083
|
-
}], tooltipContent: [{
|
|
1085
|
+
}], ctorParameters: () => [], propDecorators: { tooltipContent: [{
|
|
1084
1086
|
type: ContentChild,
|
|
1085
1087
|
args: ['tooltipContent']
|
|
1086
|
-
}], clickOutside: [{
|
|
1087
|
-
type: Output
|
|
1088
1088
|
}], onMouseLeave: [{
|
|
1089
1089
|
type: HostListener,
|
|
1090
1090
|
args: ['mouseleave']
|
|
1091
1091
|
}], onMouseEnter: [{
|
|
1092
1092
|
type: HostListener,
|
|
1093
|
-
args: ['mouseenter'
|
|
1093
|
+
args: ['mouseenter']
|
|
1094
1094
|
}], onClick: [{
|
|
1095
1095
|
type: HostListener,
|
|
1096
|
-
args: ['touch'
|
|
1096
|
+
args: ['touch']
|
|
1097
1097
|
}], orientationChangeHandler: [{
|
|
1098
1098
|
type: HostListener,
|
|
1099
1099
|
args: ['window:orientationchange']
|
|
@@ -1158,11 +1158,11 @@ class CommentComponent {
|
|
|
1158
1158
|
});
|
|
1159
1159
|
}
|
|
1160
1160
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: CommentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1161
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.4", type: CommentComponent, isStandalone: false, selector: "aeb-comment", inputs: { comment: "comment" }, outputs: { response: "response" }, viewQueries: [{ propertyName: "tooltip", first: true, predicate: TooltipDirective, descendants: true }], ngImport: i0, template: "<div class=\"aeb-comment\">\n <div class=\"aeb-comment__avatar-column\">\n <div class=\"aeb-comment__avatar\">\n @if (comment.avatar) {\n <img [src]=\"comment.avatar\" alt=\"Avatar\" />\n } @else {\n <div class=\"aeb-comment__initials\">\n {{ comment.firstName.slice(0, 1) }}{{ comment.lastName.slice(0, 1) }}\n </div>\n }\n </div>\n </div>\n <div class=\"aeb-comment__comment-column\">\n <div class=\"aeb-comment__author-wrapper\">\n <div class=\"aeb-comment__author-group\">\n {{ comment.group }}\n @if (comment.parentName) {\n <div class=\"aeb-comment__reply-icon\">\n <svg\n width=\"10\"\n height=\"8\"\n viewBox=\"0 0 10 8\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M4.68742 1.87519H3.7499V0.312666C3.7499 0.183289 3.67053 0.0676621 3.55052 0.0207864C3.43052 -0.0254644 3.29365 0.00703617 3.20614 0.102663L0.081095 3.54022C-0.0270317 3.65897 -0.0270317 3.84085 0.081095 3.96022L3.20614 7.39778C3.26677 7.46403 3.35115 7.50028 3.4374 7.50028C3.47552 7.50028 3.51365 7.4934 3.55052 7.47965C3.67053 7.43278 3.7499 7.31715 3.7499 7.18777V5.62525H4.61929C6.40307 5.62525 8.1306 6.26401 9.48437 7.42528C9.57624 7.50465 9.70812 7.52278 9.81812 7.47153C9.92937 7.4209 10 7.30965 10 7.18777C10 4.25835 7.61684 1.87519 4.68742 1.87519Z\"\n fill=\"#A3AAAE\"\n />\n </svg>\n </div>\n <span class=\"aeb-comment__reply-host\">\n {{ comment.parentName }}\n </span>\n }\n </div>\n <div class=\"aeb-comment__author-name\">\n {{ comment.fullName }}\n <div aebTooltip [position]=\"'right'\" class=\"aeb-comment__author-info\">\n <svg\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 16 16\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M15.5 8C15.5 12.1421 12.1421 15.5 8 15.5C3.85786 15.5 0.5 12.1421 0.5 8C0.5 3.85786 3.85786 0.5 8 0.5C12.1421 0.5 15.5 3.85786 15.5 8Z\"\n stroke=\"#27303E\"\n />\n <path\n d=\"M5.8125 6.3584C5.83529 5.78223 6.03874 5.31348 6.42285 4.95215C6.81022 4.59082 7.3457 4.41016 8.0293 4.41016C8.66732 4.41016 9.18652 4.58105 9.58691 4.92285C9.9873 5.26139 10.1875 5.69434 10.1875 6.22168C10.1875 6.92806 9.8457 7.48633 9.16211 7.89648C8.84961 8.08203 8.63639 8.25456 8.52246 8.41406C8.40853 8.57031 8.35156 8.77539 8.35156 9.0293V9.32715H7.34082L7.33594 8.93652C7.32292 8.59798 7.39128 8.3099 7.54102 8.07227C7.69401 7.83464 7.93978 7.61328 8.27832 7.4082C8.5778 7.22917 8.78613 7.05664 8.90332 6.89062C9.02051 6.72461 9.0791 6.51628 9.0791 6.26562C9.0791 5.98568 8.97819 5.75618 8.77637 5.57715C8.57454 5.39811 8.30762 5.30859 7.97559 5.30859C7.6403 5.30859 7.37012 5.40299 7.16504 5.5918C6.95996 5.7806 6.84603 6.03613 6.82324 6.3584H5.8125ZM7.85352 11.5879C7.67448 11.5879 7.52311 11.5277 7.39941 11.4072C7.27572 11.2868 7.21387 11.137 7.21387 10.958C7.21387 10.779 7.27572 10.6292 7.39941 10.5088C7.52311 10.3883 7.67448 10.3281 7.85352 10.3281C8.03581 10.3281 8.1888 10.3883 8.3125 10.5088C8.4362 10.6292 8.49805 10.779 8.49805 10.958C8.49805 11.137 8.4362 11.2868 8.3125 11.4072C8.1888 11.5277 8.03581 11.5879 7.85352 11.5879Z\"\n fill=\"#27303E\"\n />\n </svg>\n <div>\n <div class=\"aeb-comment__tooltip\">\n {{ comment.aboutAuthor }}\n </div>\n </div>\n </div>\n </div>\n </div>\n <div class=\"aeb-comment__comment-wrapper\">\n <div class=\"aeb-comment__comment-header\">\n {{ comment.title }}\n </div>\n <div class=\"aeb-comment__comment-txt\">\n {{ comment.content }}\n </div>\n </div>\n <div class=\"aeb-comment__date-response\">\n <div class=\"aeb-comment__comment-date\">\n {{ comment.date }}\n </div>\n <div class=\"aeb-comment__comment-response\" (click)=\"responseHandler()\">\n \u041E\u0442\u0432\u0435\u0442\u0438\u0442\u044C\n </div>\n </div>\n @if (onResponse) {\n <form\n class=\"aeb-comment__response-form\"\n [formGroup]=\"responseForm\"\n (submit)=\"nullTarget($event)\"\n >\n <div\n class=\"aeb-comment__input\"\n [ngClass]=\"{\n 'aeb-comment__input--error': titleError\n }\"\n >\n <aeb-form-field>\n <label aebLabel>\u0417\u0430\u0433\u043E\u043B\u043E\u0432\u043E\u043A \u043A\u043E\u043C\u043C\u0435\u043D\u0442\u0430\u0440\u0438\u044F</label>\n <label errorMessage>\u0417\u0430\u0433\u043E\u043B\u043E\u0432\u043E\u043A \u043D\u0435 \u043C\u043E\u0436\u0435\u0442 \u0431\u044B\u0442\u044C \u043F\u0443\u0441\u0442\u044B\u043C</label>\n <input aebInput type=\"text\" formControlName=\"title\" />\n </aeb-form-field>\n </div>\n <div\n class=\"aeb-comment__input\"\n [ngClass]=\"{\n 'aeb-comment__input--error': contentError\n }\"\n >\n <aeb-form-field>\n <label errorMessage>\u041F\u043E\u043B\u0435 \u043D\u0435 \u043C\u043E\u0436\u0435\u0442 \u0431\u044B\u0442\u044C \u043F\u0443\u0441\u0442\u044B\u043C</label>\n <label aebLabel>\u041F\u043E\u043B\u0435 \u043A\u043E\u043C\u043C\u0435\u043D\u0442\u0430\u0440\u0438\u044F</label>\n <textarea\n aebTextarea\n style=\"height: 140px\"\n formControlName=\"content\"\n required\n >\n </textarea>\n </aeb-form-field>\n </div>\n <div class=\"aeb-comment__submit\">\n <button aebButton (click)=\"submitHandler()\" [disabled]>\n \u041E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C\n </button>\n </div>\n </form>\n }\n @if (comment.nestedComments && comment.nestedComments.length) {\n <div (click)=\"expandHandler()\" class=\"aeb-comment__response-ctrls\">\n <div class=\"aeb-comment__responses\">\u041E\u0442\u0432\u0435\u0442\u044B</div>\n <div class=\"aeb-comment__response-counter\">\n {{ comment.nestedComments.length }}\n </div>\n <div\n class=\"aeb-comment__arrow-icon\"\n [ngClass]=\"{\n 'aeb-comment__arrow-icon--active': isExpanded\n }\"\n >\n <svg\n width=\"10\"\n height=\"6\"\n viewBox=\"0 0 10 6\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M0.999999 5L4.92929 1.07071C4.96834 1.03166 5.03166 1.03166 5.07071 1.07071L9 5\"\n stroke=\"#2F88F0\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n />\n </svg>\n </div>\n </div>\n }\n @if (\n comment.nestedComments && comment.nestedComments.length && isExpanded\n ) {\n @for (nestedComment of comment.nestedComments; track nestedComment) {\n <aeb-comment\n (response)=\"hoistHandler($event)\"\n [comment]=\"nestedComment\"\n >\n </aeb-comment>\n }\n }\n </div>\n</div>\n", styles: [".aeb-comment{display:flex;width:100%;color:var(--color-mono-900)}.aeb-comment__avatar-column{margin-right:12px}.aeb-comment__comment-column{flex-grow:1}.aeb-comment__avatar{display:flex;align-items:center;justify-content:center;width:40px;height:40px;background-color:var(--color-blue-500);border-radius:50%}.aeb-comment__avatar img{width:90%;border-radius:50%}.aeb-comment__initials{position:relative;bottom:1px;color:var(--color-mono-0)}.aeb-comment__author-group{display:flex;align-items:center;margin-bottom:4px;font-size:var(--font-size-md);font-weight:var(--font-weight-medium)}.aeb-comment__reply-icon{position:relative;bottom:4px;margin-left:32px}.aeb-comment__reply-host{margin-left:8px;font-size:var(--font-size-xxs);color:var(--color-mono-300)}.aeb-comment__author-name{display:flex;align-items:center;font-size:var(--font-size-s);color:var(--color-mono-300)}.aeb-comment__author-info{position:relative;top:3px;margin-left:12px;cursor:pointer}.aeb-comment__tooltip{max-width:200px;white-space:normal}.aeb-comment__author-wrapper{margin-bottom:20px}.aeb-comment__comment-wrapper{box-sizing:border-box;width:100%;padding:16px;background:var(--color-mono-10);border-radius:8px}.aeb-comment__comment-header{margin-bottom:10px;font-size:var(--font-size-md);font-weight:var(--font-weight-medium);color:var(--color-mono-900)}.aeb-comment__date-response{display:flex;align-items:center;margin-top:20px;margin-bottom:25px}.aeb-comment__comment-date{margin-right:30px;font-size:var(--font-size-xs);color:var(--color-mono-300)}.aeb-comment__comment-response{font-size:var(--font-size-xs);color:var(--color-blue-500);cursor:pointer}.aeb-comment__response-ctrls{display:inline-flex;align-items:center;margin-bottom:28px;cursor:pointer}.aeb-comment__responses{margin-right:15px;font-size:var(--font-size-xs);color:var(--color-mono-900)}.aeb-comment__response-counter{margin-right:12px;font-size:var(--font-size-xs);color:var(--color-mono-300)}.aeb-comment__arrow-icon{position:relative;top:2px;transform:rotate(180deg)}.aeb-comment__arrow-icon--active{top:unset;bottom:3px;transform:none}.aeb-comment__input{margin-bottom:24px}.aeb-comment__submit{display:flex;justify-content:flex-end;width:100%;margin-top:24px}.aeb-comment__response-form{margin-bottom:24px}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: TooltipDirective, selector: "[aebTooltip]", inputs: ["tooltip-data", "position", "overflow"], outputs: ["clickOutside"] }, { kind: "directive", type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: ButtonComponent, selector: "button[aebButton], a[aebButton]", inputs: ["fill", "isWarning", "size", "variant"] }, { kind: "component", type: FormFieldComponent, selector: "aeb-form-field", inputs: ["isInvalid", "showIcon", "showDescription", "showErrorMessage", "validateOnDirty", "disabled"] }, { kind: "directive", type: FormFieldDirective, selector: "input[aebInput], textarea[aebTextarea]", inputs: ["value"] }, { kind: "directive", type: LabelDirective, selector: "[aebLabel]", inputs: ["aebLabel"] }, { kind: "directive", type: ErrorMessageDirective, selector: "[errorMessage]", inputs: ["errorMessage"] }, { kind: "component", type: CommentComponent, selector: "aeb-comment", inputs: ["comment"], outputs: ["response"] }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
1161
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.4", type: CommentComponent, isStandalone: false, selector: "aeb-comment", inputs: { comment: "comment" }, outputs: { response: "response" }, viewQueries: [{ propertyName: "tooltip", first: true, predicate: TooltipDirective, descendants: true }], ngImport: i0, template: "<div class=\"aeb-comment\">\n <div class=\"aeb-comment__avatar-column\">\n <div class=\"aeb-comment__avatar\">\n @if (comment.avatar) {\n <img [src]=\"comment.avatar\" alt=\"Avatar\" />\n } @else {\n <div class=\"aeb-comment__initials\">\n {{ comment.firstName.slice(0, 1) }}{{ comment.lastName.slice(0, 1) }}\n </div>\n }\n </div>\n </div>\n <div class=\"aeb-comment__comment-column\">\n <div class=\"aeb-comment__author-wrapper\">\n <div class=\"aeb-comment__author-group\">\n {{ comment.group }}\n @if (comment.parentName) {\n <div class=\"aeb-comment__reply-icon\">\n <svg\n width=\"10\"\n height=\"8\"\n viewBox=\"0 0 10 8\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M4.68742 1.87519H3.7499V0.312666C3.7499 0.183289 3.67053 0.0676621 3.55052 0.0207864C3.43052 -0.0254644 3.29365 0.00703617 3.20614 0.102663L0.081095 3.54022C-0.0270317 3.65897 -0.0270317 3.84085 0.081095 3.96022L3.20614 7.39778C3.26677 7.46403 3.35115 7.50028 3.4374 7.50028C3.47552 7.50028 3.51365 7.4934 3.55052 7.47965C3.67053 7.43278 3.7499 7.31715 3.7499 7.18777V5.62525H4.61929C6.40307 5.62525 8.1306 6.26401 9.48437 7.42528C9.57624 7.50465 9.70812 7.52278 9.81812 7.47153C9.92937 7.4209 10 7.30965 10 7.18777C10 4.25835 7.61684 1.87519 4.68742 1.87519Z\"\n fill=\"#A3AAAE\"\n />\n </svg>\n </div>\n <span class=\"aeb-comment__reply-host\">\n {{ comment.parentName }}\n </span>\n }\n </div>\n <div class=\"aeb-comment__author-name\">\n {{ comment.fullName }}\n <div\n aebTooltip\n [tooltipPosition]=\"'right'\"\n class=\"aeb-comment__author-info\"\n >\n <svg\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 16 16\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M15.5 8C15.5 12.1421 12.1421 15.5 8 15.5C3.85786 15.5 0.5 12.1421 0.5 8C0.5 3.85786 3.85786 0.5 8 0.5C12.1421 0.5 15.5 3.85786 15.5 8Z\"\n stroke=\"#27303E\"\n />\n <path\n d=\"M5.8125 6.3584C5.83529 5.78223 6.03874 5.31348 6.42285 4.95215C6.81022 4.59082 7.3457 4.41016 8.0293 4.41016C8.66732 4.41016 9.18652 4.58105 9.58691 4.92285C9.9873 5.26139 10.1875 5.69434 10.1875 6.22168C10.1875 6.92806 9.8457 7.48633 9.16211 7.89648C8.84961 8.08203 8.63639 8.25456 8.52246 8.41406C8.40853 8.57031 8.35156 8.77539 8.35156 9.0293V9.32715H7.34082L7.33594 8.93652C7.32292 8.59798 7.39128 8.3099 7.54102 8.07227C7.69401 7.83464 7.93978 7.61328 8.27832 7.4082C8.5778 7.22917 8.78613 7.05664 8.90332 6.89062C9.02051 6.72461 9.0791 6.51628 9.0791 6.26562C9.0791 5.98568 8.97819 5.75618 8.77637 5.57715C8.57454 5.39811 8.30762 5.30859 7.97559 5.30859C7.6403 5.30859 7.37012 5.40299 7.16504 5.5918C6.95996 5.7806 6.84603 6.03613 6.82324 6.3584H5.8125ZM7.85352 11.5879C7.67448 11.5879 7.52311 11.5277 7.39941 11.4072C7.27572 11.2868 7.21387 11.137 7.21387 10.958C7.21387 10.779 7.27572 10.6292 7.39941 10.5088C7.52311 10.3883 7.67448 10.3281 7.85352 10.3281C8.03581 10.3281 8.1888 10.3883 8.3125 10.5088C8.4362 10.6292 8.49805 10.779 8.49805 10.958C8.49805 11.137 8.4362 11.2868 8.3125 11.4072C8.1888 11.5277 8.03581 11.5879 7.85352 11.5879Z\"\n fill=\"#27303E\"\n />\n </svg>\n <div>\n <div class=\"aeb-comment__tooltip\">\n {{ comment.aboutAuthor }}\n </div>\n </div>\n </div>\n </div>\n </div>\n <div class=\"aeb-comment__comment-wrapper\">\n <div class=\"aeb-comment__comment-header\">\n {{ comment.title }}\n </div>\n <div class=\"aeb-comment__comment-txt\">\n {{ comment.content }}\n </div>\n </div>\n <div class=\"aeb-comment__date-response\">\n <div class=\"aeb-comment__comment-date\">\n {{ comment.date }}\n </div>\n <div class=\"aeb-comment__comment-response\" (click)=\"responseHandler()\">\n \u041E\u0442\u0432\u0435\u0442\u0438\u0442\u044C\n </div>\n </div>\n @if (onResponse) {\n <form\n class=\"aeb-comment__response-form\"\n [formGroup]=\"responseForm\"\n (submit)=\"nullTarget($event)\"\n >\n <div\n class=\"aeb-comment__input\"\n [ngClass]=\"{\n 'aeb-comment__input--error': titleError\n }\"\n >\n <aeb-form-field>\n <label aebLabel>\u0417\u0430\u0433\u043E\u043B\u043E\u0432\u043E\u043A \u043A\u043E\u043C\u043C\u0435\u043D\u0442\u0430\u0440\u0438\u044F</label>\n <label errorMessage>\u0417\u0430\u0433\u043E\u043B\u043E\u0432\u043E\u043A \u043D\u0435 \u043C\u043E\u0436\u0435\u0442 \u0431\u044B\u0442\u044C \u043F\u0443\u0441\u0442\u044B\u043C</label>\n <input aebInput type=\"text\" formControlName=\"title\" />\n </aeb-form-field>\n </div>\n <div\n class=\"aeb-comment__input\"\n [ngClass]=\"{\n 'aeb-comment__input--error': contentError\n }\"\n >\n <aeb-form-field>\n <label errorMessage>\u041F\u043E\u043B\u0435 \u043D\u0435 \u043C\u043E\u0436\u0435\u0442 \u0431\u044B\u0442\u044C \u043F\u0443\u0441\u0442\u044B\u043C</label>\n <label aebLabel>\u041F\u043E\u043B\u0435 \u043A\u043E\u043C\u043C\u0435\u043D\u0442\u0430\u0440\u0438\u044F</label>\n <textarea\n aebTextarea\n style=\"height: 140px\"\n formControlName=\"content\"\n required\n >\n </textarea>\n </aeb-form-field>\n </div>\n <div class=\"aeb-comment__submit\">\n <button aebButton (click)=\"submitHandler()\" [disabled]>\n \u041E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C\n </button>\n </div>\n </form>\n }\n @if (comment.nestedComments && comment.nestedComments.length) {\n <div (click)=\"expandHandler()\" class=\"aeb-comment__response-ctrls\">\n <div class=\"aeb-comment__responses\">\u041E\u0442\u0432\u0435\u0442\u044B</div>\n <div class=\"aeb-comment__response-counter\">\n {{ comment.nestedComments.length }}\n </div>\n <div\n class=\"aeb-comment__arrow-icon\"\n [ngClass]=\"{\n 'aeb-comment__arrow-icon--active': isExpanded\n }\"\n >\n <svg\n width=\"10\"\n height=\"6\"\n viewBox=\"0 0 10 6\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M0.999999 5L4.92929 1.07071C4.96834 1.03166 5.03166 1.03166 5.07071 1.07071L9 5\"\n stroke=\"#2F88F0\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n />\n </svg>\n </div>\n </div>\n }\n @if (\n comment.nestedComments && comment.nestedComments.length && isExpanded\n ) {\n @for (nestedComment of comment.nestedComments; track nestedComment) {\n <aeb-comment\n (response)=\"hoistHandler($event)\"\n [comment]=\"nestedComment\"\n >\n </aeb-comment>\n }\n }\n </div>\n</div>\n", styles: [".aeb-comment{display:flex;width:100%;color:var(--color-mono-900)}.aeb-comment__avatar-column{margin-right:12px}.aeb-comment__comment-column{flex-grow:1}.aeb-comment__avatar{display:flex;align-items:center;justify-content:center;width:40px;height:40px;background-color:var(--color-blue-500);border-radius:50%}.aeb-comment__avatar img{width:90%;border-radius:50%}.aeb-comment__initials{position:relative;bottom:1px;color:var(--color-mono-0)}.aeb-comment__author-group{display:flex;align-items:center;margin-bottom:4px;font-size:var(--font-size-md);font-weight:var(--font-weight-medium)}.aeb-comment__reply-icon{position:relative;bottom:4px;margin-left:32px}.aeb-comment__reply-host{margin-left:8px;font-size:var(--font-size-xxs);color:var(--color-mono-300)}.aeb-comment__author-name{display:flex;align-items:center;font-size:var(--font-size-s);color:var(--color-mono-300)}.aeb-comment__author-info{position:relative;top:3px;margin-left:12px;cursor:pointer}.aeb-comment__tooltip{max-width:200px;white-space:normal}.aeb-comment__author-wrapper{margin-bottom:20px}.aeb-comment__comment-wrapper{box-sizing:border-box;width:100%;padding:16px;background:var(--color-mono-10);border-radius:8px}.aeb-comment__comment-header{margin-bottom:10px;font-size:var(--font-size-md);font-weight:var(--font-weight-medium);color:var(--color-mono-900)}.aeb-comment__date-response{display:flex;align-items:center;margin-top:20px;margin-bottom:25px}.aeb-comment__comment-date{margin-right:30px;font-size:var(--font-size-xs);color:var(--color-mono-300)}.aeb-comment__comment-response{font-size:var(--font-size-xs);color:var(--color-blue-500);cursor:pointer}.aeb-comment__response-ctrls{display:inline-flex;align-items:center;margin-bottom:28px;cursor:pointer}.aeb-comment__responses{margin-right:15px;font-size:var(--font-size-xs);color:var(--color-mono-900)}.aeb-comment__response-counter{margin-right:12px;font-size:var(--font-size-xs);color:var(--color-mono-300)}.aeb-comment__arrow-icon{position:relative;top:2px;transform:rotate(180deg)}.aeb-comment__arrow-icon--active{top:unset;bottom:3px;transform:none}.aeb-comment__input{margin-bottom:24px}.aeb-comment__submit{display:flex;justify-content:flex-end;width:100%;margin-top:24px}.aeb-comment__response-form{margin-bottom:24px}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: TooltipDirective, selector: "[aebTooltip]", inputs: ["tooltipTitle", "tooltipData", "tooltipPosition", "tooltipType"], outputs: ["clickOutside"] }, { kind: "directive", type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: ButtonComponent, selector: "button[aebButton], a[aebButton]", inputs: ["fill", "isWarning", "size", "variant"] }, { kind: "component", type: FormFieldComponent, selector: "aeb-form-field", inputs: ["isInvalid", "showIcon", "showDescription", "showErrorMessage", "validateOnDirty", "disabled"] }, { kind: "directive", type: FormFieldDirective, selector: "input[aebInput], textarea[aebTextarea]", inputs: ["value"] }, { kind: "directive", type: LabelDirective, selector: "[aebLabel]", inputs: ["aebLabel"] }, { kind: "directive", type: ErrorMessageDirective, selector: "[errorMessage]", inputs: ["errorMessage"] }, { kind: "component", type: CommentComponent, selector: "aeb-comment", inputs: ["comment"], outputs: ["response"] }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
1162
1162
|
}
|
|
1163
1163
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: CommentComponent, decorators: [{
|
|
1164
1164
|
type: Component,
|
|
1165
|
-
args: [{ selector: 'aeb-comment', encapsulation: ViewEncapsulation.None, standalone: false, template: "<div class=\"aeb-comment\">\n <div class=\"aeb-comment__avatar-column\">\n <div class=\"aeb-comment__avatar\">\n @if (comment.avatar) {\n <img [src]=\"comment.avatar\" alt=\"Avatar\" />\n } @else {\n <div class=\"aeb-comment__initials\">\n {{ comment.firstName.slice(0, 1) }}{{ comment.lastName.slice(0, 1) }}\n </div>\n }\n </div>\n </div>\n <div class=\"aeb-comment__comment-column\">\n <div class=\"aeb-comment__author-wrapper\">\n <div class=\"aeb-comment__author-group\">\n {{ comment.group }}\n @if (comment.parentName) {\n <div class=\"aeb-comment__reply-icon\">\n <svg\n width=\"10\"\n height=\"8\"\n viewBox=\"0 0 10 8\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M4.68742 1.87519H3.7499V0.312666C3.7499 0.183289 3.67053 0.0676621 3.55052 0.0207864C3.43052 -0.0254644 3.29365 0.00703617 3.20614 0.102663L0.081095 3.54022C-0.0270317 3.65897 -0.0270317 3.84085 0.081095 3.96022L3.20614 7.39778C3.26677 7.46403 3.35115 7.50028 3.4374 7.50028C3.47552 7.50028 3.51365 7.4934 3.55052 7.47965C3.67053 7.43278 3.7499 7.31715 3.7499 7.18777V5.62525H4.61929C6.40307 5.62525 8.1306 6.26401 9.48437 7.42528C9.57624 7.50465 9.70812 7.52278 9.81812 7.47153C9.92937 7.4209 10 7.30965 10 7.18777C10 4.25835 7.61684 1.87519 4.68742 1.87519Z\"\n fill=\"#A3AAAE\"\n />\n </svg>\n </div>\n <span class=\"aeb-comment__reply-host\">\n {{ comment.parentName }}\n </span>\n }\n </div>\n <div class=\"aeb-comment__author-name\">\n {{ comment.fullName }}\n <div
|
|
1165
|
+
args: [{ selector: 'aeb-comment', encapsulation: ViewEncapsulation.None, standalone: false, template: "<div class=\"aeb-comment\">\n <div class=\"aeb-comment__avatar-column\">\n <div class=\"aeb-comment__avatar\">\n @if (comment.avatar) {\n <img [src]=\"comment.avatar\" alt=\"Avatar\" />\n } @else {\n <div class=\"aeb-comment__initials\">\n {{ comment.firstName.slice(0, 1) }}{{ comment.lastName.slice(0, 1) }}\n </div>\n }\n </div>\n </div>\n <div class=\"aeb-comment__comment-column\">\n <div class=\"aeb-comment__author-wrapper\">\n <div class=\"aeb-comment__author-group\">\n {{ comment.group }}\n @if (comment.parentName) {\n <div class=\"aeb-comment__reply-icon\">\n <svg\n width=\"10\"\n height=\"8\"\n viewBox=\"0 0 10 8\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M4.68742 1.87519H3.7499V0.312666C3.7499 0.183289 3.67053 0.0676621 3.55052 0.0207864C3.43052 -0.0254644 3.29365 0.00703617 3.20614 0.102663L0.081095 3.54022C-0.0270317 3.65897 -0.0270317 3.84085 0.081095 3.96022L3.20614 7.39778C3.26677 7.46403 3.35115 7.50028 3.4374 7.50028C3.47552 7.50028 3.51365 7.4934 3.55052 7.47965C3.67053 7.43278 3.7499 7.31715 3.7499 7.18777V5.62525H4.61929C6.40307 5.62525 8.1306 6.26401 9.48437 7.42528C9.57624 7.50465 9.70812 7.52278 9.81812 7.47153C9.92937 7.4209 10 7.30965 10 7.18777C10 4.25835 7.61684 1.87519 4.68742 1.87519Z\"\n fill=\"#A3AAAE\"\n />\n </svg>\n </div>\n <span class=\"aeb-comment__reply-host\">\n {{ comment.parentName }}\n </span>\n }\n </div>\n <div class=\"aeb-comment__author-name\">\n {{ comment.fullName }}\n <div\n aebTooltip\n [tooltipPosition]=\"'right'\"\n class=\"aeb-comment__author-info\"\n >\n <svg\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 16 16\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M15.5 8C15.5 12.1421 12.1421 15.5 8 15.5C3.85786 15.5 0.5 12.1421 0.5 8C0.5 3.85786 3.85786 0.5 8 0.5C12.1421 0.5 15.5 3.85786 15.5 8Z\"\n stroke=\"#27303E\"\n />\n <path\n d=\"M5.8125 6.3584C5.83529 5.78223 6.03874 5.31348 6.42285 4.95215C6.81022 4.59082 7.3457 4.41016 8.0293 4.41016C8.66732 4.41016 9.18652 4.58105 9.58691 4.92285C9.9873 5.26139 10.1875 5.69434 10.1875 6.22168C10.1875 6.92806 9.8457 7.48633 9.16211 7.89648C8.84961 8.08203 8.63639 8.25456 8.52246 8.41406C8.40853 8.57031 8.35156 8.77539 8.35156 9.0293V9.32715H7.34082L7.33594 8.93652C7.32292 8.59798 7.39128 8.3099 7.54102 8.07227C7.69401 7.83464 7.93978 7.61328 8.27832 7.4082C8.5778 7.22917 8.78613 7.05664 8.90332 6.89062C9.02051 6.72461 9.0791 6.51628 9.0791 6.26562C9.0791 5.98568 8.97819 5.75618 8.77637 5.57715C8.57454 5.39811 8.30762 5.30859 7.97559 5.30859C7.6403 5.30859 7.37012 5.40299 7.16504 5.5918C6.95996 5.7806 6.84603 6.03613 6.82324 6.3584H5.8125ZM7.85352 11.5879C7.67448 11.5879 7.52311 11.5277 7.39941 11.4072C7.27572 11.2868 7.21387 11.137 7.21387 10.958C7.21387 10.779 7.27572 10.6292 7.39941 10.5088C7.52311 10.3883 7.67448 10.3281 7.85352 10.3281C8.03581 10.3281 8.1888 10.3883 8.3125 10.5088C8.4362 10.6292 8.49805 10.779 8.49805 10.958C8.49805 11.137 8.4362 11.2868 8.3125 11.4072C8.1888 11.5277 8.03581 11.5879 7.85352 11.5879Z\"\n fill=\"#27303E\"\n />\n </svg>\n <div>\n <div class=\"aeb-comment__tooltip\">\n {{ comment.aboutAuthor }}\n </div>\n </div>\n </div>\n </div>\n </div>\n <div class=\"aeb-comment__comment-wrapper\">\n <div class=\"aeb-comment__comment-header\">\n {{ comment.title }}\n </div>\n <div class=\"aeb-comment__comment-txt\">\n {{ comment.content }}\n </div>\n </div>\n <div class=\"aeb-comment__date-response\">\n <div class=\"aeb-comment__comment-date\">\n {{ comment.date }}\n </div>\n <div class=\"aeb-comment__comment-response\" (click)=\"responseHandler()\">\n \u041E\u0442\u0432\u0435\u0442\u0438\u0442\u044C\n </div>\n </div>\n @if (onResponse) {\n <form\n class=\"aeb-comment__response-form\"\n [formGroup]=\"responseForm\"\n (submit)=\"nullTarget($event)\"\n >\n <div\n class=\"aeb-comment__input\"\n [ngClass]=\"{\n 'aeb-comment__input--error': titleError\n }\"\n >\n <aeb-form-field>\n <label aebLabel>\u0417\u0430\u0433\u043E\u043B\u043E\u0432\u043E\u043A \u043A\u043E\u043C\u043C\u0435\u043D\u0442\u0430\u0440\u0438\u044F</label>\n <label errorMessage>\u0417\u0430\u0433\u043E\u043B\u043E\u0432\u043E\u043A \u043D\u0435 \u043C\u043E\u0436\u0435\u0442 \u0431\u044B\u0442\u044C \u043F\u0443\u0441\u0442\u044B\u043C</label>\n <input aebInput type=\"text\" formControlName=\"title\" />\n </aeb-form-field>\n </div>\n <div\n class=\"aeb-comment__input\"\n [ngClass]=\"{\n 'aeb-comment__input--error': contentError\n }\"\n >\n <aeb-form-field>\n <label errorMessage>\u041F\u043E\u043B\u0435 \u043D\u0435 \u043C\u043E\u0436\u0435\u0442 \u0431\u044B\u0442\u044C \u043F\u0443\u0441\u0442\u044B\u043C</label>\n <label aebLabel>\u041F\u043E\u043B\u0435 \u043A\u043E\u043C\u043C\u0435\u043D\u0442\u0430\u0440\u0438\u044F</label>\n <textarea\n aebTextarea\n style=\"height: 140px\"\n formControlName=\"content\"\n required\n >\n </textarea>\n </aeb-form-field>\n </div>\n <div class=\"aeb-comment__submit\">\n <button aebButton (click)=\"submitHandler()\" [disabled]>\n \u041E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C\n </button>\n </div>\n </form>\n }\n @if (comment.nestedComments && comment.nestedComments.length) {\n <div (click)=\"expandHandler()\" class=\"aeb-comment__response-ctrls\">\n <div class=\"aeb-comment__responses\">\u041E\u0442\u0432\u0435\u0442\u044B</div>\n <div class=\"aeb-comment__response-counter\">\n {{ comment.nestedComments.length }}\n </div>\n <div\n class=\"aeb-comment__arrow-icon\"\n [ngClass]=\"{\n 'aeb-comment__arrow-icon--active': isExpanded\n }\"\n >\n <svg\n width=\"10\"\n height=\"6\"\n viewBox=\"0 0 10 6\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M0.999999 5L4.92929 1.07071C4.96834 1.03166 5.03166 1.03166 5.07071 1.07071L9 5\"\n stroke=\"#2F88F0\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n />\n </svg>\n </div>\n </div>\n }\n @if (\n comment.nestedComments && comment.nestedComments.length && isExpanded\n ) {\n @for (nestedComment of comment.nestedComments; track nestedComment) {\n <aeb-comment\n (response)=\"hoistHandler($event)\"\n [comment]=\"nestedComment\"\n >\n </aeb-comment>\n }\n }\n </div>\n</div>\n", styles: [".aeb-comment{display:flex;width:100%;color:var(--color-mono-900)}.aeb-comment__avatar-column{margin-right:12px}.aeb-comment__comment-column{flex-grow:1}.aeb-comment__avatar{display:flex;align-items:center;justify-content:center;width:40px;height:40px;background-color:var(--color-blue-500);border-radius:50%}.aeb-comment__avatar img{width:90%;border-radius:50%}.aeb-comment__initials{position:relative;bottom:1px;color:var(--color-mono-0)}.aeb-comment__author-group{display:flex;align-items:center;margin-bottom:4px;font-size:var(--font-size-md);font-weight:var(--font-weight-medium)}.aeb-comment__reply-icon{position:relative;bottom:4px;margin-left:32px}.aeb-comment__reply-host{margin-left:8px;font-size:var(--font-size-xxs);color:var(--color-mono-300)}.aeb-comment__author-name{display:flex;align-items:center;font-size:var(--font-size-s);color:var(--color-mono-300)}.aeb-comment__author-info{position:relative;top:3px;margin-left:12px;cursor:pointer}.aeb-comment__tooltip{max-width:200px;white-space:normal}.aeb-comment__author-wrapper{margin-bottom:20px}.aeb-comment__comment-wrapper{box-sizing:border-box;width:100%;padding:16px;background:var(--color-mono-10);border-radius:8px}.aeb-comment__comment-header{margin-bottom:10px;font-size:var(--font-size-md);font-weight:var(--font-weight-medium);color:var(--color-mono-900)}.aeb-comment__date-response{display:flex;align-items:center;margin-top:20px;margin-bottom:25px}.aeb-comment__comment-date{margin-right:30px;font-size:var(--font-size-xs);color:var(--color-mono-300)}.aeb-comment__comment-response{font-size:var(--font-size-xs);color:var(--color-blue-500);cursor:pointer}.aeb-comment__response-ctrls{display:inline-flex;align-items:center;margin-bottom:28px;cursor:pointer}.aeb-comment__responses{margin-right:15px;font-size:var(--font-size-xs);color:var(--color-mono-900)}.aeb-comment__response-counter{margin-right:12px;font-size:var(--font-size-xs);color:var(--color-mono-300)}.aeb-comment__arrow-icon{position:relative;top:2px;transform:rotate(180deg)}.aeb-comment__arrow-icon--active{top:unset;bottom:3px;transform:none}.aeb-comment__input{margin-bottom:24px}.aeb-comment__submit{display:flex;justify-content:flex-end;width:100%;margin-top:24px}.aeb-comment__response-form{margin-bottom:24px}\n"] }]
|
|
1166
1166
|
}], propDecorators: { comment: [{
|
|
1167
1167
|
type: Input
|
|
1168
1168
|
}], response: [{
|
|
@@ -2280,258 +2280,94 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImpor
|
|
|
2280
2280
|
}]
|
|
2281
2281
|
}] });
|
|
2282
2282
|
|
|
2283
|
-
class
|
|
2283
|
+
class DropdownMenu {
|
|
2284
2284
|
constructor() {
|
|
2285
|
-
this.
|
|
2286
|
-
this.
|
|
2287
|
-
this.
|
|
2288
|
-
this.
|
|
2289
|
-
this.options = [];
|
|
2290
|
-
this.
|
|
2291
|
-
this.
|
|
2292
|
-
this.
|
|
2293
|
-
this.
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
this.selected = new EventEmitter();
|
|
2297
|
-
this.viewOptionsChange = new EventEmitter();
|
|
2298
|
-
this.viewOptions$ = new Observable();
|
|
2299
|
-
this.focusedOption$ = new BehaviorSubject(-1);
|
|
2300
|
-
}
|
|
2301
|
-
ngOnInit() {
|
|
2302
|
-
this.subscriptions.add(this.arrowKeyPress$.subscribe({
|
|
2303
|
-
next: (direction) => {
|
|
2304
|
-
this.handleArrowKeys(direction, this.focusedOption$.value);
|
|
2305
|
-
}
|
|
2306
|
-
}));
|
|
2307
|
-
this.subscriptions.add(this.enterKeyPress$
|
|
2308
|
-
.pipe(withLatestFrom(this.isOpen$, this.focusedOption$), filter(([, isOpen, focused]) => isOpen && focused !== -1), switchMap(() => this.viewOptions$.pipe(take(1))))
|
|
2309
|
-
.subscribe({
|
|
2310
|
-
next: (value) => {
|
|
2311
|
-
this.selectHandler(value.at(this.focusedOption$.value), this.focusedOption$.value);
|
|
2285
|
+
this.isOpen = input(true, ...(ngDevMode ? [{ debugName: "isOpen" }] : []));
|
|
2286
|
+
this.direction = input('bottom', ...(ngDevMode ? [{ debugName: "direction" }] : []));
|
|
2287
|
+
this.maxShownOptions = input(5, ...(ngDevMode ? [{ debugName: "maxShownOptions" }] : []));
|
|
2288
|
+
this.optionSize = input('L', ...(ngDevMode ? [{ debugName: "optionSize" }] : []));
|
|
2289
|
+
this.options = input([], ...(ngDevMode ? [{ debugName: "options" }] : []));
|
|
2290
|
+
this.selectedOption = input(...(ngDevMode ? [undefined, { debugName: "selectedOption" }] : []));
|
|
2291
|
+
this.outsideClick = output();
|
|
2292
|
+
this.optionSelect = output();
|
|
2293
|
+
this.optionHeightPx = computed(() => {
|
|
2294
|
+
if (this.optionSize() === 'S') {
|
|
2295
|
+
return 40;
|
|
2312
2296
|
}
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
if (value === undefined) {
|
|
2316
|
-
value = this.latestDropdownFieldValue;
|
|
2297
|
+
else if (this.optionSize() === 'M') {
|
|
2298
|
+
return 48;
|
|
2317
2299
|
}
|
|
2318
|
-
else {
|
|
2319
|
-
|
|
2300
|
+
else if (this.optionSize() === 'L') {
|
|
2301
|
+
return 56;
|
|
2320
2302
|
}
|
|
2321
|
-
|
|
2322
|
-
}), mergeMap((value) => iif(() => this.filter, of(this.filterOptions(value)), of(this.options))), tap((options) => {
|
|
2323
|
-
this.viewOptionsLength = options.length;
|
|
2324
|
-
this.viewOptionsChange.emit([...options]);
|
|
2325
|
-
}));
|
|
2326
|
-
}
|
|
2327
|
-
ngOnDestroy() {
|
|
2328
|
-
this.subscriptions.unsubscribe();
|
|
2329
|
-
}
|
|
2330
|
-
ngOnChanges(changes) {
|
|
2331
|
-
if (changes.options) {
|
|
2332
|
-
this.sourceOptionsChanged$.next();
|
|
2333
|
-
}
|
|
2303
|
+
}, ...(ngDevMode ? [{ debugName: "optionHeightPx" }] : []));
|
|
2334
2304
|
}
|
|
2335
|
-
|
|
2336
|
-
this.
|
|
2337
|
-
this.selected.emit([item, index]);
|
|
2338
|
-
}
|
|
2339
|
-
handleArrowKeys(direction, index) {
|
|
2340
|
-
const indexVary = direction === 'down' ? 1 : -1;
|
|
2341
|
-
let nextOptionIndex = index + indexVary;
|
|
2342
|
-
if (nextOptionIndex === this.viewOptionsLength) {
|
|
2343
|
-
nextOptionIndex -= 1;
|
|
2344
|
-
}
|
|
2345
|
-
else if (nextOptionIndex < -1) {
|
|
2346
|
-
nextOptionIndex = -1;
|
|
2347
|
-
}
|
|
2348
|
-
this.focusedOption$.next(nextOptionIndex);
|
|
2305
|
+
selectOption(optionValue) {
|
|
2306
|
+
this.optionSelect.emit(optionValue);
|
|
2349
2307
|
}
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
if (this.focusedOption$.value === index) {
|
|
2353
|
-
return;
|
|
2354
|
-
}
|
|
2355
|
-
this.focusedOption$.next(index);
|
|
2356
|
-
}
|
|
2357
|
-
else if (type === 'leave') {
|
|
2358
|
-
this.focusedOption$.next(-1);
|
|
2359
|
-
}
|
|
2360
|
-
}
|
|
2361
|
-
filterOptions(value) {
|
|
2362
|
-
const values = (this.options || []).filter((item) => item.label.slice(0, value.length).toLocaleLowerCase() ===
|
|
2363
|
-
value.toLocaleLowerCase());
|
|
2364
|
-
return values;
|
|
2308
|
+
clickOutside() {
|
|
2309
|
+
this.outsideClick.emit();
|
|
2365
2310
|
}
|
|
2366
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type:
|
|
2367
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.4", type:
|
|
2311
|
+
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" }, ngImport: i0, template: "<ul\n class=\"aeb-dropdown-menu\"\n [class.open]=\"isOpen()\"\n [class.top]=\"direction() === 'top'\"\n [class.bottom]=\"direction() === 'bottom'\"\n [style.max-height]=\"maxShownOptions() * optionHeightPx() + 'px'\"\n (clickOutside)=\"clickOutside()\"\n>\n @for (option of options(); track option.value) {\n <ul\n class=\"aeb-dropdown-menu__option\"\n [class.active]=\"option === selectedOption()\"\n [class.has-additional]=\"option.additional\"\n [style.height]=\"optionHeightPx() + 'px'\"\n (click)=\"selectOption(option.value)\"\n >\n <p>{{ option.label }}</p>\n @if (option.additional) {\n <small>{{ option.additional }}</small>\n }\n </ul>\n }\n</ul>\n", styles: [".aeb-dropdown-menu{position:absolute;z-index:2;width:100%;left:0;background:var(--c-bg-light);padding:0;margin:0;list-style:none;border-radius:12px;box-shadow:0 4px 12px #27303e26;overflow-y:auto;display:block;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{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"], dependencies: [{ kind: "directive", type: ClickOutsideDirective, selector: "[clickOutside]", outputs: ["clickOutside"] }] }); }
|
|
2368
2313
|
}
|
|
2369
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type:
|
|
2314
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: DropdownMenu, decorators: [{
|
|
2370
2315
|
type: Component,
|
|
2371
|
-
args: [{ selector: 'aeb-dropdown-
|
|
2372
|
-
}]
|
|
2373
|
-
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
|
|
2383
|
-
|
|
2384
|
-
|
|
2385
|
-
|
|
2386
|
-
|
|
2387
|
-
}], isOpen$: [{
|
|
2388
|
-
type: Input
|
|
2389
|
-
}], selected: [{
|
|
2390
|
-
type: Output
|
|
2391
|
-
}], viewOptionsChange: [{
|
|
2392
|
-
type: Output
|
|
2393
|
-
}] } });
|
|
2316
|
+
args: [{ selector: 'aeb-dropdown-menu', standalone: false, template: "<ul\n class=\"aeb-dropdown-menu\"\n [class.open]=\"isOpen()\"\n [class.top]=\"direction() === 'top'\"\n [class.bottom]=\"direction() === 'bottom'\"\n [style.max-height]=\"maxShownOptions() * optionHeightPx() + 'px'\"\n (clickOutside)=\"clickOutside()\"\n>\n @for (option of options(); track option.value) {\n <ul\n class=\"aeb-dropdown-menu__option\"\n [class.active]=\"option === selectedOption()\"\n [class.has-additional]=\"option.additional\"\n [style.height]=\"optionHeightPx() + 'px'\"\n (click)=\"selectOption(option.value)\"\n >\n <p>{{ option.label }}</p>\n @if (option.additional) {\n <small>{{ option.additional }}</small>\n }\n </ul>\n }\n</ul>\n", styles: [".aeb-dropdown-menu{position:absolute;z-index:2;width:100%;left:0;background:var(--c-bg-light);padding:0;margin:0;list-style:none;border-radius:12px;box-shadow:0 4px 12px #27303e26;overflow-y:auto;display:block;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{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"] }]
|
|
2317
|
+
}] });
|
|
2318
|
+
|
|
2319
|
+
class DropdownMenuModule {
|
|
2320
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: DropdownMenuModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
2321
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.2.4", ngImport: i0, type: DropdownMenuModule, declarations: [DropdownMenu], imports: [ClickOutsideDirective], exports: [DropdownMenu] }); }
|
|
2322
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: DropdownMenuModule }); }
|
|
2323
|
+
}
|
|
2324
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: DropdownMenuModule, decorators: [{
|
|
2325
|
+
type: NgModule,
|
|
2326
|
+
args: [{
|
|
2327
|
+
declarations: [DropdownMenu],
|
|
2328
|
+
imports: [ClickOutsideDirective],
|
|
2329
|
+
exports: [DropdownMenu]
|
|
2330
|
+
}]
|
|
2331
|
+
}] });
|
|
2394
2332
|
|
|
2395
|
-
/* eslint-disable @angular-eslint/no-conflicting-lifecycle */
|
|
2396
2333
|
class DropdownComponent {
|
|
2397
|
-
get fieldValue() {
|
|
2398
|
-
return this._fieldValue;
|
|
2399
|
-
}
|
|
2400
|
-
get value() {
|
|
2401
|
-
return this._value;
|
|
2402
|
-
}
|
|
2403
|
-
set disabled(value) {
|
|
2404
|
-
if (value === true) {
|
|
2405
|
-
this.dropdownIsOpen$.next(false);
|
|
2406
|
-
}
|
|
2407
|
-
this._disabled = value;
|
|
2408
|
-
this.statusChanges$.next();
|
|
2409
|
-
}
|
|
2410
|
-
get disabled() {
|
|
2411
|
-
return this._disabled;
|
|
2412
|
-
}
|
|
2413
|
-
set fieldValue(vl) {
|
|
2414
|
-
const match = (this.options || []).find((item) => item.value === vl);
|
|
2415
|
-
if (match) {
|
|
2416
|
-
this.value = match.label;
|
|
2417
|
-
this._fieldValue = match.value;
|
|
2418
|
-
this.selected = match;
|
|
2419
|
-
}
|
|
2420
|
-
else if (vl === null || vl === '') {
|
|
2421
|
-
// обработка сброса значения поля
|
|
2422
|
-
this._fieldValue = '';
|
|
2423
|
-
this._value = '';
|
|
2424
|
-
this.selected = null;
|
|
2425
|
-
}
|
|
2426
|
-
}
|
|
2427
|
-
set value(value) {
|
|
2428
|
-
if (!value) {
|
|
2429
|
-
this.resetValue();
|
|
2430
|
-
return;
|
|
2431
|
-
}
|
|
2432
|
-
this._value = value;
|
|
2433
|
-
}
|
|
2434
2334
|
constructor() {
|
|
2435
|
-
this.cdr = inject(ChangeDetectorRef);
|
|
2436
|
-
this.hasErrorChanges$ = new Subject();
|
|
2437
|
-
this.pending = false;
|
|
2438
|
-
this.valid = false;
|
|
2439
|
-
this.dirty = false;
|
|
2440
|
-
this.touched = false;
|
|
2441
|
-
this._fieldValue = '';
|
|
2442
|
-
this._value = '';
|
|
2443
|
-
this._disabled = false;
|
|
2444
|
-
this.optionSelect = new EventEmitter();
|
|
2445
|
-
this.inputChange = new EventEmitter();
|
|
2446
|
-
this.label = '';
|
|
2447
|
-
this.options = [];
|
|
2448
|
-
this.filter = true;
|
|
2449
|
-
this.hasError = false;
|
|
2450
|
-
this.errorMessageText = '';
|
|
2451
|
-
this.validateOnDirty = false;
|
|
2452
2335
|
this.ngControl = inject(NgControl, { optional: true, self: true });
|
|
2453
|
-
|
|
2454
|
-
this.
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
}
|
|
2463
|
-
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
|
|
2467
|
-
|
|
2468
|
-
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
|
|
2478
|
-
|
|
2479
|
-
|
|
2480
|
-
|
|
2481
|
-
!this.dropdownIsOpen$.value &&
|
|
2482
|
-
this.ngControl.control.touched &&
|
|
2483
|
-
(this.validateOnDirty ? this.ngControl.control.dirty : true) &&
|
|
2484
|
-
!this.ngControl.control.valid &&
|
|
2485
|
-
!this.ngControl.control.pending &&
|
|
2486
|
-
!this.disabled) {
|
|
2487
|
-
return true;
|
|
2488
|
-
}
|
|
2489
|
-
else {
|
|
2490
|
-
return false;
|
|
2491
|
-
}
|
|
2492
|
-
}));
|
|
2493
|
-
}
|
|
2494
|
-
}));
|
|
2495
|
-
}
|
|
2496
|
-
ngDoCheck() {
|
|
2497
|
-
if (this.ngControl) {
|
|
2498
|
-
if (this.dirty !== this.ngControl.control.dirty) {
|
|
2499
|
-
this.dirty = this.ngControl.control.dirty;
|
|
2500
|
-
this.statusChanges$.next();
|
|
2501
|
-
}
|
|
2502
|
-
if (this.touched !== this.ngControl.control.touched) {
|
|
2503
|
-
this.touched = this.ngControl.control.touched;
|
|
2504
|
-
this.statusChanges$.next();
|
|
2505
|
-
}
|
|
2506
|
-
if (this.valid !== this.ngControl.control.valid) {
|
|
2507
|
-
this.valid = this.ngControl.control.valid;
|
|
2508
|
-
this.statusChanges$.next();
|
|
2509
|
-
}
|
|
2510
|
-
if (this.pending !== this.ngControl.control.pending) {
|
|
2511
|
-
this.pending = this.ngControl.control.pending;
|
|
2512
|
-
this.statusChanges$.next();
|
|
2513
|
-
}
|
|
2514
|
-
}
|
|
2515
|
-
}
|
|
2516
|
-
ngOnDestroy() {
|
|
2517
|
-
this.dropdownIsOpen$.complete();
|
|
2518
|
-
this.arrowKeyPress$.complete();
|
|
2519
|
-
this.enterKeyPress$.complete();
|
|
2520
|
-
this.inputBlured$.complete();
|
|
2521
|
-
this.statusChanges$.complete();
|
|
2522
|
-
this.hasErrorChanges$.complete();
|
|
2523
|
-
}
|
|
2524
|
-
ngOnChanges(changes) {
|
|
2525
|
-
if (changes.hasError) {
|
|
2526
|
-
this.hasErrorChanges$.next();
|
|
2527
|
-
}
|
|
2336
|
+
// Control state
|
|
2337
|
+
this.controlState = signal({
|
|
2338
|
+
dirty: false,
|
|
2339
|
+
touched: false,
|
|
2340
|
+
pending: false,
|
|
2341
|
+
valid: false
|
|
2342
|
+
}, ...(ngDevMode ? [{ debugName: "controlState" }] : []));
|
|
2343
|
+
// Input signals
|
|
2344
|
+
this.options = input([], ...(ngDevMode ? [{ debugName: "options" }] : []));
|
|
2345
|
+
this.label = input('', ...(ngDevMode ? [{ debugName: "label" }] : []));
|
|
2346
|
+
this.errorMessageText = input('', ...(ngDevMode ? [{ debugName: "errorMessageText" }] : []));
|
|
2347
|
+
this.filter = input(true, ...(ngDevMode ? [{ debugName: "filter" }] : []));
|
|
2348
|
+
this.hasError = input(false, ...(ngDevMode ? [{ debugName: "hasError" }] : []));
|
|
2349
|
+
this.validateOnDirty = input(false, ...(ngDevMode ? [{ debugName: "validateOnDirty" }] : []));
|
|
2350
|
+
this.disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : []));
|
|
2351
|
+
// Output signals
|
|
2352
|
+
this.optionSelect = output();
|
|
2353
|
+
this.inputChange = output();
|
|
2354
|
+
// State signals
|
|
2355
|
+
this.dropdownIsOpen = signal(false, ...(ngDevMode ? [{ debugName: "dropdownIsOpen" }] : []));
|
|
2356
|
+
this.viewOptionsLength = signal(0, ...(ngDevMode ? [{ debugName: "viewOptionsLength" }] : []));
|
|
2357
|
+
this.hasErrorSignal = signal(false, ...(ngDevMode ? [{ debugName: "hasErrorSignal" }] : []));
|
|
2358
|
+
this.valueLabel = signal('', ...(ngDevMode ? [{ debugName: "valueLabel" }] : []));
|
|
2359
|
+
this.value = signal('', ...(ngDevMode ? [{ debugName: "value" }] : []));
|
|
2360
|
+
this.selectedOption = signal(null, ...(ngDevMode ? [{ debugName: "selectedOption" }] : []));
|
|
2361
|
+
this.filteredOptions = signal([], ...(ngDevMode ? [{ debugName: "filteredOptions" }] : []));
|
|
2362
|
+
this.setupControlValueAccessor();
|
|
2363
|
+
this.setupEffects();
|
|
2528
2364
|
}
|
|
2529
2365
|
writeValue(value) {
|
|
2530
|
-
if (this.disabled) {
|
|
2366
|
+
if (this.disabled()) {
|
|
2531
2367
|
return;
|
|
2532
2368
|
}
|
|
2533
|
-
this.
|
|
2534
|
-
this.optionSelect.emit(this.
|
|
2369
|
+
this.value.set(value);
|
|
2370
|
+
this.optionSelect.emit(this.selectedOption());
|
|
2535
2371
|
}
|
|
2536
2372
|
registerOnChange(fn) {
|
|
2537
2373
|
this.onChange = fn;
|
|
@@ -2540,142 +2376,233 @@ class DropdownComponent {
|
|
|
2540
2376
|
this.onTouch = fn;
|
|
2541
2377
|
}
|
|
2542
2378
|
setDisabledState(disabled) {
|
|
2543
|
-
|
|
2544
|
-
|
|
2545
|
-
handleArrowKeys(direction) {
|
|
2546
|
-
this.arrowKeyPress$.next(direction);
|
|
2379
|
+
// This is called by Angular forms API
|
|
2380
|
+
// We'll use our disabled input signal instead
|
|
2547
2381
|
}
|
|
2548
2382
|
handleEnterKey() {
|
|
2549
|
-
|
|
2383
|
+
// Implement enter key logic here
|
|
2550
2384
|
}
|
|
2551
2385
|
openHandler() {
|
|
2552
|
-
if (this.disabled) {
|
|
2386
|
+
if (this.disabled()) {
|
|
2553
2387
|
return;
|
|
2554
2388
|
}
|
|
2555
|
-
this.dropdownIsOpen
|
|
2389
|
+
this.dropdownIsOpen.set(!this.dropdownIsOpen());
|
|
2556
2390
|
this.onTouch();
|
|
2557
2391
|
}
|
|
2558
2392
|
clickOutsideHandler() {
|
|
2559
|
-
if (this.dropdownIsOpen
|
|
2560
|
-
this.dropdownIsOpen
|
|
2393
|
+
if (this.dropdownIsOpen()) {
|
|
2394
|
+
this.dropdownIsOpen.set(false);
|
|
2561
2395
|
}
|
|
2562
2396
|
}
|
|
2563
2397
|
inputHandler(term) {
|
|
2564
|
-
if (this.disabled) {
|
|
2398
|
+
if (this.disabled()) {
|
|
2565
2399
|
return;
|
|
2566
2400
|
}
|
|
2567
2401
|
const target = term.target;
|
|
2568
|
-
|
|
2569
|
-
this.
|
|
2570
|
-
|
|
2571
|
-
|
|
2572
|
-
|
|
2573
|
-
value: undefined
|
|
2574
|
-
});
|
|
2402
|
+
const newValue = target.value;
|
|
2403
|
+
this.handleInputChange(newValue);
|
|
2404
|
+
}
|
|
2405
|
+
clickInput() {
|
|
2406
|
+
if (this.disabled()) {
|
|
2575
2407
|
return;
|
|
2576
2408
|
}
|
|
2577
|
-
|
|
2578
|
-
if (
|
|
2579
|
-
|
|
2580
|
-
this.selected = null;
|
|
2581
|
-
this.writeValue(null);
|
|
2582
|
-
}
|
|
2583
|
-
this.writeValue(match.value);
|
|
2584
|
-
this.selected = match;
|
|
2585
|
-
this.onChange(this.selected);
|
|
2409
|
+
this.onTouch();
|
|
2410
|
+
if (!this.dropdownIsOpen()) {
|
|
2411
|
+
this.dropdownIsOpen.set(true);
|
|
2586
2412
|
}
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
|
|
2591
|
-
|
|
2413
|
+
}
|
|
2414
|
+
selectHandler(optionValue) {
|
|
2415
|
+
this.selectOption(optionValue);
|
|
2416
|
+
}
|
|
2417
|
+
viewOptionsChangeHandler(options) {
|
|
2418
|
+
this.viewOptionsLength.set(options.length);
|
|
2419
|
+
}
|
|
2420
|
+
setupControlValueAccessor() {
|
|
2421
|
+
if (this.ngControl) {
|
|
2422
|
+
this.ngControl.valueAccessor = this;
|
|
2592
2423
|
}
|
|
2593
2424
|
}
|
|
2594
|
-
|
|
2595
|
-
|
|
2425
|
+
setupEffects() {
|
|
2426
|
+
this.setupFilterEffect();
|
|
2427
|
+
this.setupDisabledEffect();
|
|
2428
|
+
this.setupErrorEffect();
|
|
2429
|
+
this.setupControlStateEffect();
|
|
2430
|
+
this.setupValueSyncEffect();
|
|
2431
|
+
}
|
|
2432
|
+
setupFilterEffect() {
|
|
2433
|
+
effect(() => {
|
|
2434
|
+
const options = this.options();
|
|
2435
|
+
const filterEnabled = this.filter();
|
|
2436
|
+
const searchTerm = this.valueLabel();
|
|
2437
|
+
const filtered = filterEnabled && searchTerm
|
|
2438
|
+
? this.filterOptions(options, searchTerm)
|
|
2439
|
+
: options;
|
|
2440
|
+
this.filteredOptions.set(filtered);
|
|
2441
|
+
this.viewOptionsLength.set(filtered.length);
|
|
2442
|
+
});
|
|
2443
|
+
}
|
|
2444
|
+
setupDisabledEffect() {
|
|
2445
|
+
effect(() => {
|
|
2446
|
+
if (this.disabled()) {
|
|
2447
|
+
this.dropdownIsOpen.set(false);
|
|
2448
|
+
}
|
|
2449
|
+
});
|
|
2450
|
+
}
|
|
2451
|
+
setupErrorEffect() {
|
|
2452
|
+
effect(() => {
|
|
2453
|
+
const error = this.calculateErrorState();
|
|
2454
|
+
this.hasErrorSignal.set(error);
|
|
2455
|
+
});
|
|
2456
|
+
}
|
|
2457
|
+
setupControlStateEffect() {
|
|
2458
|
+
if (!this.ngControl) {
|
|
2596
2459
|
return;
|
|
2597
2460
|
}
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
|
|
2461
|
+
effect(() => {
|
|
2462
|
+
const control = this.ngControl?.control;
|
|
2463
|
+
if (control) {
|
|
2464
|
+
this.controlState.set({
|
|
2465
|
+
dirty: control.dirty,
|
|
2466
|
+
touched: control.touched,
|
|
2467
|
+
pending: control.pending,
|
|
2468
|
+
valid: control.valid
|
|
2469
|
+
});
|
|
2470
|
+
}
|
|
2471
|
+
});
|
|
2472
|
+
}
|
|
2473
|
+
setupValueSyncEffect() {
|
|
2474
|
+
effect(() => {
|
|
2475
|
+
const fieldValue = this.value();
|
|
2476
|
+
const options = this.options();
|
|
2477
|
+
if (fieldValue) {
|
|
2478
|
+
this.handleValueWithOptions(fieldValue, options);
|
|
2479
|
+
}
|
|
2480
|
+
else if (fieldValue === null || fieldValue === '') {
|
|
2481
|
+
this.valueLabel.set('');
|
|
2482
|
+
this.selectedOption.set(null);
|
|
2483
|
+
}
|
|
2484
|
+
});
|
|
2485
|
+
}
|
|
2486
|
+
filterOptions(options, searchTerm) {
|
|
2487
|
+
return options.filter((option) => option.label.toLowerCase().includes(searchTerm.toLowerCase()));
|
|
2488
|
+
}
|
|
2489
|
+
handleInputChange(newValue) {
|
|
2490
|
+
this.valueLabel.set(newValue);
|
|
2491
|
+
this.inputChange.emit(newValue);
|
|
2492
|
+
if (!newValue) {
|
|
2493
|
+
this.clearSelection();
|
|
2494
|
+
return;
|
|
2601
2495
|
}
|
|
2496
|
+
this.findAndSetMatch(newValue);
|
|
2602
2497
|
}
|
|
2603
|
-
|
|
2604
|
-
|
|
2605
|
-
|
|
2606
|
-
|
|
2607
|
-
|
|
2608
|
-
this.
|
|
2609
|
-
this.onChange(this.selected);
|
|
2610
|
-
this.dropdownIsOpen$.next(false);
|
|
2498
|
+
clearSelection() {
|
|
2499
|
+
this.onChange({
|
|
2500
|
+
label: '',
|
|
2501
|
+
value: undefined
|
|
2502
|
+
});
|
|
2503
|
+
this.value.set('');
|
|
2611
2504
|
}
|
|
2612
|
-
|
|
2613
|
-
|
|
2614
|
-
|
|
2505
|
+
findAndSetMatch(newValue) {
|
|
2506
|
+
const match = this.options().find((item) => item.label === newValue);
|
|
2507
|
+
if (match) {
|
|
2508
|
+
this.handleMatchFound(match);
|
|
2509
|
+
}
|
|
2510
|
+
else {
|
|
2511
|
+
this.handleNoMatch(newValue);
|
|
2512
|
+
}
|
|
2615
2513
|
}
|
|
2616
|
-
|
|
2617
|
-
this.
|
|
2618
|
-
|
|
2619
|
-
|
|
2514
|
+
handleMatchFound(match) {
|
|
2515
|
+
if (match.value !== this.value()) {
|
|
2516
|
+
this.selectedOption.set(null);
|
|
2517
|
+
this.value.set('');
|
|
2518
|
+
}
|
|
2519
|
+
this.value.set(match.value);
|
|
2520
|
+
this.selectedOption.set(match);
|
|
2521
|
+
this.onChange(this.selectedOption());
|
|
2522
|
+
}
|
|
2523
|
+
handleNoMatch(newValue) {
|
|
2524
|
+
this.onChange({
|
|
2525
|
+
label: newValue,
|
|
2526
|
+
value: undefined
|
|
2527
|
+
});
|
|
2528
|
+
this.value.set('');
|
|
2529
|
+
}
|
|
2530
|
+
selectOption(optionValue) {
|
|
2531
|
+
const match = this.options().find((item) => item.value === optionValue);
|
|
2532
|
+
if (match) {
|
|
2533
|
+
this.valueLabel.set(match.label);
|
|
2534
|
+
}
|
|
2535
|
+
this.value.set(optionValue);
|
|
2536
|
+
this.onChange(this.selectedOption());
|
|
2537
|
+
this.dropdownIsOpen.set(false);
|
|
2538
|
+
}
|
|
2539
|
+
handleValueWithOptions(fieldValue, options) {
|
|
2540
|
+
const match = options.find((item) => item.value === fieldValue);
|
|
2541
|
+
if (match) {
|
|
2542
|
+
this.valueLabel.set(match.label);
|
|
2543
|
+
this.selectedOption.set(match);
|
|
2544
|
+
}
|
|
2545
|
+
}
|
|
2546
|
+
calculateErrorState() {
|
|
2547
|
+
if (this.hasError()) {
|
|
2548
|
+
return this.hasError() && !this.disabled();
|
|
2549
|
+
}
|
|
2550
|
+
if (!this.ngControl) {
|
|
2551
|
+
return false;
|
|
2552
|
+
}
|
|
2553
|
+
const control = this.ngControl.control;
|
|
2554
|
+
const state = this.controlState();
|
|
2555
|
+
return this.shouldShowError(control, state);
|
|
2556
|
+
}
|
|
2557
|
+
shouldShowError(control, state) {
|
|
2558
|
+
return (!!control &&
|
|
2559
|
+
(!!control.validator || !!control.asyncValidator) &&
|
|
2560
|
+
!this.formFieldRef?.isFocused &&
|
|
2561
|
+
!this.dropdownIsOpen() &&
|
|
2562
|
+
state.touched &&
|
|
2563
|
+
(this.validateOnDirty() ? state.dirty : true) &&
|
|
2564
|
+
!state.valid &&
|
|
2565
|
+
!state.pending &&
|
|
2566
|
+
!this.disabled());
|
|
2620
2567
|
}
|
|
2621
|
-
// eslint-disable-next-line unused-imports/no-unused-vars, @typescript-eslint/no-unused-vars
|
|
2622
2568
|
onChange(value) { }
|
|
2623
2569
|
onTouch() { }
|
|
2624
2570
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: DropdownComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2625
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
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 }], ngImport: i0, template: "<div\n #dropdown\n class=\"aeb-dropdown\"\n clickOutside\n (clickOutside)=\"clickOutsideHandler()\"\n (keydown.tab)=\"clickOutsideHandler()\"\n>\n <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.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</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: ClickOutsideDirective, selector: "[clickOutside]", outputs: ["clickOutside"] }, { 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 }); }
|
|
2626
2572
|
}
|
|
2627
2573
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: DropdownComponent, decorators: [{
|
|
2628
2574
|
type: Component,
|
|
2629
|
-
args: [{ selector: 'aeb-dropdown', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<div\n #dropdown\n class=\"aeb-dropdown\"\n clickOutside\n (clickOutside)=\"clickOutsideHandler()\"\n
|
|
2575
|
+
args: [{ selector: 'aeb-dropdown', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<div\n #dropdown\n class=\"aeb-dropdown\"\n clickOutside\n (clickOutside)=\"clickOutsideHandler()\"\n (keydown.tab)=\"clickOutsideHandler()\"\n>\n <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.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</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"] }]
|
|
2630
2576
|
}], ctorParameters: () => [], propDecorators: { formFieldRef: [{
|
|
2631
2577
|
type: ViewChild,
|
|
2632
2578
|
args: [FormFieldComponent]
|
|
2633
|
-
}], optionSelect: [{
|
|
2634
|
-
type: Output
|
|
2635
|
-
}], inputChange: [{
|
|
2636
|
-
type: Output
|
|
2637
|
-
}], label: [{
|
|
2638
|
-
type: Input
|
|
2639
|
-
}], options: [{
|
|
2640
|
-
type: Input
|
|
2641
|
-
}], filter: [{
|
|
2642
|
-
type: Input
|
|
2643
|
-
}], hasError: [{
|
|
2644
|
-
type: Input
|
|
2645
|
-
}], errorMessageText: [{
|
|
2646
|
-
type: Input
|
|
2647
|
-
}], validateOnDirty: [{
|
|
2648
|
-
type: Input
|
|
2649
|
-
}], disabled: [{
|
|
2650
|
-
type: Input
|
|
2651
|
-
}], fieldValue: [{
|
|
2652
|
-
type: Input
|
|
2653
|
-
}], value: [{
|
|
2654
|
-
type: Input
|
|
2655
2579
|
}] } });
|
|
2656
2580
|
|
|
2657
2581
|
class DropdownModule {
|
|
2658
2582
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: DropdownModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
2659
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.2.4", ngImport: i0, type: DropdownModule, declarations: [DropdownComponent
|
|
2583
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.2.4", ngImport: i0, type: DropdownModule, declarations: [DropdownComponent], imports: [CommonModule,
|
|
2660
2584
|
FormFieldModule,
|
|
2661
2585
|
ClickOutsideDirective,
|
|
2662
2586
|
FormsModule,
|
|
2663
|
-
ReactiveFormsModule
|
|
2587
|
+
ReactiveFormsModule,
|
|
2588
|
+
DropdownMenuModule], exports: [DropdownComponent] }); }
|
|
2664
2589
|
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: DropdownModule, imports: [CommonModule,
|
|
2665
2590
|
FormFieldModule,
|
|
2666
2591
|
FormsModule,
|
|
2667
|
-
ReactiveFormsModule
|
|
2592
|
+
ReactiveFormsModule,
|
|
2593
|
+
DropdownMenuModule] }); }
|
|
2668
2594
|
}
|
|
2669
2595
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: DropdownModule, decorators: [{
|
|
2670
2596
|
type: NgModule,
|
|
2671
2597
|
args: [{
|
|
2672
|
-
declarations: [DropdownComponent
|
|
2598
|
+
declarations: [DropdownComponent],
|
|
2673
2599
|
imports: [
|
|
2674
2600
|
CommonModule,
|
|
2675
2601
|
FormFieldModule,
|
|
2676
2602
|
ClickOutsideDirective,
|
|
2677
2603
|
FormsModule,
|
|
2678
|
-
ReactiveFormsModule
|
|
2604
|
+
ReactiveFormsModule,
|
|
2605
|
+
DropdownMenuModule
|
|
2679
2606
|
],
|
|
2680
2607
|
exports: [DropdownComponent]
|
|
2681
2608
|
}]
|
|
@@ -3834,7 +3761,7 @@ class SelectComponent {
|
|
|
3834
3761
|
useExisting: forwardRef(() => SelectComponent),
|
|
3835
3762
|
multi: true
|
|
3836
3763
|
}
|
|
3837
|
-
], hostDirectives: [{ directive: ClickOutsideDirective, outputs: ["clickOutside", "clickOutside"] }], ngImport: i0, template: "<div class=\"aeb-select\" [class.disabled]=\"disabled\">\n <div\n class=\"aeb-select__selected-item\"\n [class.open]=\"isOpen\"\n [class.error]=\"hasError\"\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\n class=\"aeb-select__icon\"\n [class.open]=\"isOpen\"\n [class.disabled]=\"disabled\"\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\n <
|
|
3764
|
+
], hostDirectives: [{ directive: ClickOutsideDirective, outputs: ["clickOutside", "clickOutside"] }], ngImport: i0, template: "<div class=\"aeb-select\" [class.disabled]=\"disabled\">\n <div\n class=\"aeb-select__selected-item\"\n [class.open]=\"isOpen\"\n [class.error]=\"hasError\"\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\n class=\"aeb-select__icon\"\n [class.open]=\"isOpen\"\n [class.disabled]=\"disabled\"\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\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</div>\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: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 }); }
|
|
3838
3765
|
}
|
|
3839
3766
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: SelectComponent, decorators: [{
|
|
3840
3767
|
type: Component,
|
|
@@ -3849,7 +3776,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImpor
|
|
|
3849
3776
|
useExisting: forwardRef(() => SelectComponent),
|
|
3850
3777
|
multi: true
|
|
3851
3778
|
}
|
|
3852
|
-
], standalone: false, template: "<div class=\"aeb-select\" [class.disabled]=\"disabled\">\n <div\n class=\"aeb-select__selected-item\"\n [class.open]=\"isOpen\"\n [class.error]=\"hasError\"\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\n class=\"aeb-select__icon\"\n [class.open]=\"isOpen\"\n [class.disabled]=\"disabled\"\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\n <
|
|
3779
|
+
], standalone: false, template: "<div class=\"aeb-select\" [class.disabled]=\"disabled\">\n <div\n class=\"aeb-select__selected-item\"\n [class.open]=\"isOpen\"\n [class.error]=\"hasError\"\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\n class=\"aeb-select__icon\"\n [class.open]=\"isOpen\"\n [class.disabled]=\"disabled\"\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\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</div>\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: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"] }]
|
|
3853
3780
|
}], ctorParameters: () => [], propDecorators: { label: [{
|
|
3854
3781
|
type: Input
|
|
3855
3782
|
}], options: [{
|
|
@@ -3875,14 +3802,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImpor
|
|
|
3875
3802
|
|
|
3876
3803
|
class SelectModule {
|
|
3877
3804
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: SelectModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
3878
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.2.4", ngImport: i0, type: SelectModule, declarations: [SelectComponent], imports: [CommonModule,
|
|
3879
|
-
|
|
3805
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.2.4", ngImport: i0, type: SelectModule, declarations: [SelectComponent], imports: [CommonModule,
|
|
3806
|
+
ClickOutsideDirective,
|
|
3807
|
+
FormFieldModule,
|
|
3808
|
+
DropdownMenuModule], exports: [SelectComponent] }); }
|
|
3809
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: SelectModule, imports: [CommonModule,
|
|
3810
|
+
FormFieldModule,
|
|
3811
|
+
DropdownMenuModule] }); }
|
|
3880
3812
|
}
|
|
3881
3813
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: SelectModule, decorators: [{
|
|
3882
3814
|
type: NgModule,
|
|
3883
3815
|
args: [{
|
|
3884
3816
|
declarations: [SelectComponent],
|
|
3885
|
-
imports: [
|
|
3817
|
+
imports: [
|
|
3818
|
+
CommonModule,
|
|
3819
|
+
ClickOutsideDirective,
|
|
3820
|
+
FormFieldModule,
|
|
3821
|
+
DropdownMenuModule
|
|
3822
|
+
],
|
|
3886
3823
|
exports: [SelectComponent]
|
|
3887
3824
|
}]
|
|
3888
3825
|
}] });
|
|
@@ -5201,6 +5138,7 @@ class AebUiKitModule {
|
|
|
5201
5138
|
ActionBarModule,
|
|
5202
5139
|
NewsCardModule,
|
|
5203
5140
|
DropdownModule,
|
|
5141
|
+
DropdownMenuModule,
|
|
5204
5142
|
TableModule,
|
|
5205
5143
|
ModalModule,
|
|
5206
5144
|
ResponseModule], exports: [ButtonModule,
|
|
@@ -5233,6 +5171,7 @@ class AebUiKitModule {
|
|
|
5233
5171
|
ActionBarModule,
|
|
5234
5172
|
NewsCardModule,
|
|
5235
5173
|
DropdownModule,
|
|
5174
|
+
DropdownMenuModule,
|
|
5236
5175
|
TableModule,
|
|
5237
5176
|
ModalModule,
|
|
5238
5177
|
ResponseModule] }); }
|
|
@@ -5267,6 +5206,7 @@ class AebUiKitModule {
|
|
|
5267
5206
|
ActionBarModule,
|
|
5268
5207
|
NewsCardModule,
|
|
5269
5208
|
DropdownModule,
|
|
5209
|
+
DropdownMenuModule,
|
|
5270
5210
|
TableModule,
|
|
5271
5211
|
ModalModule,
|
|
5272
5212
|
ResponseModule, ButtonModule,
|
|
@@ -5299,6 +5239,7 @@ class AebUiKitModule {
|
|
|
5299
5239
|
ActionBarModule,
|
|
5300
5240
|
NewsCardModule,
|
|
5301
5241
|
DropdownModule,
|
|
5242
|
+
DropdownMenuModule,
|
|
5302
5243
|
TableModule,
|
|
5303
5244
|
ModalModule,
|
|
5304
5245
|
ResponseModule] }); }
|
|
@@ -5338,6 +5279,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImpor
|
|
|
5338
5279
|
ActionBarModule,
|
|
5339
5280
|
NewsCardModule,
|
|
5340
5281
|
DropdownModule,
|
|
5282
|
+
DropdownMenuModule,
|
|
5341
5283
|
TableModule,
|
|
5342
5284
|
ModalModule,
|
|
5343
5285
|
ResponseModule
|
|
@@ -5373,6 +5315,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImpor
|
|
|
5373
5315
|
ActionBarModule,
|
|
5374
5316
|
NewsCardModule,
|
|
5375
5317
|
DropdownModule,
|
|
5318
|
+
DropdownMenuModule,
|
|
5376
5319
|
TableModule,
|
|
5377
5320
|
ModalModule,
|
|
5378
5321
|
ResponseModule
|
|
@@ -5539,5 +5482,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImpor
|
|
|
5539
5482
|
* Generated bundle index. Do not edit.
|
|
5540
5483
|
*/
|
|
5541
5484
|
|
|
5542
|
-
export { AccordionComponent, AccordionModule, ActionBarComponent, ActionBarModule, AebSwitchComponent, AebSwitchModule, AebUiKitModule, AutofocusDirective, BreadcrumpsComponent, ButtonComponent, ButtonLeftIconDirective, ButtonModule, ButtonRightIconDirective, CheckboxComponent, CheckboxGroupComponent, CheckboxModule, ClickOutsideDirective, CodeInputComponent, CodeInputModule, CommentComponent, CommentModule, CreditItemCardComponent, CreditItemCardModule, DatepickerComponent, DatepickerCoreComponent, DatepickerModule, DatepickerMonthComponent, DatepickerTilesComponent, DragAndDropDirective, DropdownComponent, DropdownModule, ErrorMessageDirective, FileAttachComponent, FileAttachModule, FilterTagComponent, FilterTagsComponent, FilterTagsModule, FooterBottomComponent, FooterComponent, FooterMenuComponent, FooterModule, FooterTopComponent, FormFieldComponent, FormFieldDirective, FormFieldModule, HeaderComponent, HeaderModule, HeadingComponent, HeadingModule, IconDirective, LabelComponent, LabelDirective, LabelModule, LogoComponent, ModalComponent, ModalModule, NewsCardComponent, NewsCardModule, NotificationComponent, NotificationsComponent, NotificationsModule, PaginationComponent, PaginationModule, PopUpComponent, PopUpDirective, PopUpModule, ProductTitleComponent, RadioButtonsComponent, RadioButtonsModule, ResponseComponent, ResponseModule, SearchComponent, SearchModule, SelectComponent, SelectModule, SidebarComponent, SidebarModule, SliderComponent, SliderModule, SpanSubtitleDirective, SpanTitleDirective, SpinnerComponent, SpinnerModule, StepperComponent, StepperModule, StepperStepComponent, TabDirective, TableComponent, TableModule, TabsComponent, TabsModule, TagTabComponent, TagTabModule, TooltipComponent, TooltipDirective, TooltipModule, VisaComponent, VisaItemComponent, VisaModule };
|
|
5485
|
+
export { AccordionComponent, AccordionModule, ActionBarComponent, ActionBarModule, AebSwitchComponent, AebSwitchModule, AebUiKitModule, AutofocusDirective, BreadcrumpsComponent, ButtonComponent, ButtonLeftIconDirective, ButtonModule, ButtonRightIconDirective, CheckboxComponent, CheckboxGroupComponent, CheckboxModule, ClickOutsideDirective, CodeInputComponent, CodeInputModule, CommentComponent, CommentModule, CreditItemCardComponent, CreditItemCardModule, DatepickerComponent, DatepickerCoreComponent, DatepickerModule, DatepickerMonthComponent, DatepickerTilesComponent, DragAndDropDirective, DropdownComponent, DropdownMenu, DropdownMenuModule, DropdownModule, ErrorMessageDirective, FileAttachComponent, FileAttachModule, FilterTagComponent, FilterTagsComponent, FilterTagsModule, FooterBottomComponent, FooterComponent, FooterMenuComponent, FooterModule, FooterTopComponent, FormFieldComponent, FormFieldDirective, FormFieldModule, HeaderComponent, HeaderModule, HeadingComponent, HeadingModule, IconDirective, LabelComponent, LabelDirective, LabelModule, LogoComponent, ModalComponent, ModalModule, NewsCardComponent, NewsCardModule, NotificationComponent, NotificationsComponent, NotificationsModule, PaginationComponent, PaginationModule, PopUpComponent, PopUpDirective, PopUpModule, ProductTitleComponent, RadioButtonsComponent, RadioButtonsModule, ResponseComponent, ResponseModule, SearchComponent, SearchModule, SelectComponent, SelectModule, SidebarComponent, SidebarModule, SliderComponent, SliderModule, SpanSubtitleDirective, SpanTitleDirective, SpinnerComponent, SpinnerModule, StepperComponent, StepperModule, StepperStepComponent, TabDirective, TableComponent, TableModule, TabsComponent, TabsModule, TagTabComponent, TagTabModule, TooltipComponent, TooltipDirective, TooltipModule, VisaComponent, VisaItemComponent, VisaModule };
|
|
5543
5486
|
//# sourceMappingURL=aeb-ui-kit.mjs.map
|