aeb-ui-kit 9.1.0-preview.1132 → 9.1.0-preview.1138
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 +134 -135
- package/fesm2022/aeb-ui-kit.mjs.map +1 -1
- package/index.d.ts +30 -31
- package/package.json +1 -1
package/fesm2022/aeb-ui-kit.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { signal, viewChild, input, computed, effect, HostBinding, ViewEncapsulation, Component, NgModule, Input, Directive, inject, ElementRef, HostListener, ContentChild, ChangeDetectionStrategy, Renderer2, EventEmitter, forwardRef, Output, ViewChild, ComponentFactoryResolver, Injector, ApplicationRef, RendererFactory2, Injectable, output, Pipe, LOCALE_ID, ChangeDetectorRef, ContentChildren, TemplateRef, ViewChildren } from '@angular/core';
|
|
3
3
|
import * as i1 from '@angular/common';
|
|
4
4
|
import { CommonModule, DOCUMENT, formatDate, formatNumber } from '@angular/common';
|
|
5
5
|
import * as i3 from '@angular/forms';
|
|
@@ -12,35 +12,62 @@ import '@angular/common/locales/global/ru';
|
|
|
12
12
|
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
13
13
|
|
|
14
14
|
class AccordionComponent {
|
|
15
|
+
get isOpen() {
|
|
16
|
+
return this._isOpen();
|
|
17
|
+
}
|
|
18
|
+
get isPrimary() {
|
|
19
|
+
return this.type() === 'primary';
|
|
20
|
+
}
|
|
21
|
+
get isSecondary() {
|
|
22
|
+
return this.type() === 'secondary';
|
|
23
|
+
}
|
|
15
24
|
constructor() {
|
|
16
|
-
this.
|
|
25
|
+
this._isOpen = signal(false, ...(ngDevMode ? [{ debugName: "_isOpen" }] : []));
|
|
26
|
+
this.content = viewChild('content', ...(ngDevMode ? [{ debugName: "content" }] : []));
|
|
27
|
+
this._contentHeight = signal(0, ...(ngDevMode ? [{ debugName: "_contentHeight" }] : []));
|
|
28
|
+
this.isAccordion = true;
|
|
29
|
+
this.header = input('', ...(ngDevMode ? [{ debugName: "header" }] : []));
|
|
30
|
+
this.type = input('primary', ...(ngDevMode ? [{ debugName: "type" }] : []));
|
|
31
|
+
this.contentHeight = computed(() => this._contentHeight(), ...(ngDevMode ? [{ debugName: "contentHeight" }] : []));
|
|
32
|
+
effect(() => {
|
|
33
|
+
const contentEl = this.content();
|
|
34
|
+
if (contentEl) {
|
|
35
|
+
this.setupResizeObserver(contentEl.nativeElement);
|
|
36
|
+
this._contentHeight.set(contentEl.nativeElement.scrollHeight);
|
|
37
|
+
}
|
|
38
|
+
});
|
|
17
39
|
}
|
|
18
|
-
|
|
19
|
-
this.
|
|
20
|
-
this.normalizeTransition();
|
|
40
|
+
ngOnDestroy() {
|
|
41
|
+
this.resizeObserver?.disconnect();
|
|
21
42
|
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
this.content.nativeElement.style.height = `${this.content.nativeElement.scrollHeight}px`;
|
|
25
|
-
}
|
|
26
|
-
else {
|
|
27
|
-
this.content.nativeElement.style.height = '0';
|
|
28
|
-
}
|
|
43
|
+
openHandler() {
|
|
44
|
+
this._isOpen.set(!this._isOpen());
|
|
29
45
|
}
|
|
30
|
-
|
|
31
|
-
this.
|
|
46
|
+
setupResizeObserver(element) {
|
|
47
|
+
this.resizeObserver?.disconnect();
|
|
48
|
+
this.resizeObserver = new ResizeObserver(() => {
|
|
49
|
+
this._contentHeight.set(element.scrollHeight);
|
|
50
|
+
});
|
|
51
|
+
this.resizeObserver.observe(element);
|
|
32
52
|
}
|
|
33
53
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: AccordionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
34
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
54
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "20.2.4", type: AccordionComponent, isStandalone: false, selector: "aeb-accordion", inputs: { header: { classPropertyName: "header", publicName: "header", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.aeb-accordion": "this.isAccordion", "class.aeb-accordion--open": "this.isOpen", "class.aeb-accordion--primary": "this.isPrimary", "class.aeb-accordion--secondary": "this.isSecondary" } }, viewQueries: [{ propertyName: "content", first: true, predicate: ["content"], descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"aeb-accordion__header\" (click)=\"openHandler()\">\n <span class=\"aeb-accordion__heading\">\n {{ header() }}\n </span>\n <div class=\"aeb-accordion__arrow-icon\">\n <svg\n width=\"32\"\n height=\"32\"\n viewBox=\"0 0 32 32\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M6.66675 11.3333L15.6465 20.3131C15.8418 20.5083 16.1584 20.5083 16.3536 20.3131L25.3334 11.3333\"\n stroke=\"#1F2632\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n />\n </svg>\n </div>\n</div>\n<div\n class=\"aeb-accordion__content\"\n [style.height]=\"isOpen ? contentHeight() + 'px' : '0'\"\n>\n <div #content class=\"aeb-accordion__content-inner\">\n <ng-content />\n </div>\n</div>\n", styles: [".aeb-accordion{display:block;box-sizing:border-box;width:100%;color:var(--c-t-primary);cursor:pointer;border-radius:32px;transition:background-color .2s;-webkit-user-select:none;user-select:none;overflow:hidden}@media screen and (max-width: 599px){.aeb-accordion{border-radius:20px}}@media screen and (min-width: 600px) and (max-width: 1200px){.aeb-accordion{border-radius:24px}}.aeb-accordion--primary{background-color:var(--c-bg-light);box-shadow:0 2px 8px #27303e1a}.aeb-accordion--secondary{background-color:var(--c-bg-surface)}.aeb-accordion__header{display:flex;align-items:center;justify-content:space-between;padding:32px;font-size:22px;font-weight:500}.aeb-accordion__header:hover .aeb-accordion__heading{color:var(--c-t-secondary)}.aeb-accordion__header:hover .aeb-accordion__arrow-icon svg path{stroke:var(--c-i-secondary)}@media screen and (max-width: 599px){.aeb-accordion__header{padding:20px;font-size:16px}}@media screen and (min-width: 600px) and (max-width: 1200px){.aeb-accordion__header{padding:24px;font-size:18px}}.aeb-accordion__arrow-icon{display:flex;align-items:center;transition:transform .4s ease-in-out;width:32px;height:32px}@media screen and (max-width: 1200px){.aeb-accordion__arrow-icon{width:24px;height:24px}}.aeb-accordion__content{overflow:hidden;height:0;transition:height .4s ease-in-out;background-color:var(--c-bg-light)}.aeb-accordion__content-inner{padding:0 32px 32px;line-height:1.6;-webkit-user-select:text;user-select:text}@media screen and (max-width: 599px){.aeb-accordion__content-inner{padding:0 20px 20px}}@media screen and (min-width: 600px) and (max-width: 1200px){.aeb-accordion__content-inner{padding:0 24px 24px}}.aeb-accordion--open .aeb-accordion__arrow-icon{transform:rotate(180deg)}\n"], encapsulation: i0.ViewEncapsulation.None }); }
|
|
35
55
|
}
|
|
36
56
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: AccordionComponent, decorators: [{
|
|
37
57
|
type: Component,
|
|
38
|
-
args: [{ selector: 'aeb-accordion', encapsulation: ViewEncapsulation.None, standalone: false, template: "<div class=\"aeb-
|
|
39
|
-
}], propDecorators: {
|
|
40
|
-
type:
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
58
|
+
args: [{ selector: 'aeb-accordion', encapsulation: ViewEncapsulation.None, standalone: false, template: "<div class=\"aeb-accordion__header\" (click)=\"openHandler()\">\n <span class=\"aeb-accordion__heading\">\n {{ header() }}\n </span>\n <div class=\"aeb-accordion__arrow-icon\">\n <svg\n width=\"32\"\n height=\"32\"\n viewBox=\"0 0 32 32\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M6.66675 11.3333L15.6465 20.3131C15.8418 20.5083 16.1584 20.5083 16.3536 20.3131L25.3334 11.3333\"\n stroke=\"#1F2632\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n />\n </svg>\n </div>\n</div>\n<div\n class=\"aeb-accordion__content\"\n [style.height]=\"isOpen ? contentHeight() + 'px' : '0'\"\n>\n <div #content class=\"aeb-accordion__content-inner\">\n <ng-content />\n </div>\n</div>\n", styles: [".aeb-accordion{display:block;box-sizing:border-box;width:100%;color:var(--c-t-primary);cursor:pointer;border-radius:32px;transition:background-color .2s;-webkit-user-select:none;user-select:none;overflow:hidden}@media screen and (max-width: 599px){.aeb-accordion{border-radius:20px}}@media screen and (min-width: 600px) and (max-width: 1200px){.aeb-accordion{border-radius:24px}}.aeb-accordion--primary{background-color:var(--c-bg-light);box-shadow:0 2px 8px #27303e1a}.aeb-accordion--secondary{background-color:var(--c-bg-surface)}.aeb-accordion__header{display:flex;align-items:center;justify-content:space-between;padding:32px;font-size:22px;font-weight:500}.aeb-accordion__header:hover .aeb-accordion__heading{color:var(--c-t-secondary)}.aeb-accordion__header:hover .aeb-accordion__arrow-icon svg path{stroke:var(--c-i-secondary)}@media screen and (max-width: 599px){.aeb-accordion__header{padding:20px;font-size:16px}}@media screen and (min-width: 600px) and (max-width: 1200px){.aeb-accordion__header{padding:24px;font-size:18px}}.aeb-accordion__arrow-icon{display:flex;align-items:center;transition:transform .4s ease-in-out;width:32px;height:32px}@media screen and (max-width: 1200px){.aeb-accordion__arrow-icon{width:24px;height:24px}}.aeb-accordion__content{overflow:hidden;height:0;transition:height .4s ease-in-out;background-color:var(--c-bg-light)}.aeb-accordion__content-inner{padding:0 32px 32px;line-height:1.6;-webkit-user-select:text;user-select:text}@media screen and (max-width: 599px){.aeb-accordion__content-inner{padding:0 20px 20px}}@media screen and (min-width: 600px) and (max-width: 1200px){.aeb-accordion__content-inner{padding:0 24px 24px}}.aeb-accordion--open .aeb-accordion__arrow-icon{transform:rotate(180deg)}\n"] }]
|
|
59
|
+
}], ctorParameters: () => [], propDecorators: { isAccordion: [{
|
|
60
|
+
type: HostBinding,
|
|
61
|
+
args: ['class.aeb-accordion']
|
|
62
|
+
}], isOpen: [{
|
|
63
|
+
type: HostBinding,
|
|
64
|
+
args: ['class.aeb-accordion--open']
|
|
65
|
+
}], isPrimary: [{
|
|
66
|
+
type: HostBinding,
|
|
67
|
+
args: ['class.aeb-accordion--primary']
|
|
68
|
+
}], isSecondary: [{
|
|
69
|
+
type: HostBinding,
|
|
70
|
+
args: ['class.aeb-accordion--secondary']
|
|
44
71
|
}] } });
|
|
45
72
|
|
|
46
73
|
class AccordionModule {
|
|
@@ -3880,146 +3907,118 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImpor
|
|
|
3880
3907
|
}] });
|
|
3881
3908
|
|
|
3882
3909
|
const defaultAmountOptions = [
|
|
3883
|
-
{ value: 10, label: '
|
|
3884
|
-
{ value: 20, label: '
|
|
3885
|
-
{ value: 30, label: '
|
|
3910
|
+
{ value: 10, label: '10 на странице' },
|
|
3911
|
+
{ value: 20, label: '20 на странице' },
|
|
3912
|
+
{ value: 30, label: '30 на странице' }
|
|
3886
3913
|
];
|
|
3887
3914
|
class PaginationComponent {
|
|
3888
3915
|
constructor() {
|
|
3889
3916
|
this.baseSize = 7;
|
|
3890
|
-
this.totalPages = 1500;
|
|
3891
|
-
this.currentPage = 1;
|
|
3892
|
-
this.usePageSizeSelector = false;
|
|
3893
|
-
this.pageSize = 10;
|
|
3894
|
-
this.btnType = 'text';
|
|
3895
|
-
this.size = 'L';
|
|
3896
|
-
this.pageSelect = new EventEmitter();
|
|
3897
|
-
this.amountChange = new EventEmitter();
|
|
3898
3917
|
this.isPagination = true;
|
|
3918
|
+
this.activePage = signal(1, ...(ngDevMode ? [{ debugName: "activePage" }] : []));
|
|
3919
|
+
this.totalPages = input(1500, ...(ngDevMode ? [{ debugName: "totalPages" }] : []));
|
|
3920
|
+
this.currentPage = input(1, ...(ngDevMode ? [{ debugName: "currentPage" }] : []));
|
|
3921
|
+
this.usePageSizeSelector = input(false, ...(ngDevMode ? [{ debugName: "usePageSizeSelector" }] : []));
|
|
3922
|
+
this.pageSize = input(10, ...(ngDevMode ? [{ debugName: "pageSize" }] : []));
|
|
3923
|
+
this.pageSelect = output();
|
|
3924
|
+
this.amountChange = output();
|
|
3899
3925
|
this.pageSizeControl = new FormControl(10);
|
|
3900
|
-
this.head =
|
|
3901
|
-
|
|
3926
|
+
this.head = computed(() => {
|
|
3927
|
+
const total = this.totalPages();
|
|
3928
|
+
const page = this.activePage();
|
|
3929
|
+
if (total <= this.baseSize) {
|
|
3930
|
+
return null;
|
|
3931
|
+
}
|
|
3932
|
+
if (page <= 4) {
|
|
3933
|
+
return null;
|
|
3934
|
+
}
|
|
3935
|
+
return 1;
|
|
3936
|
+
}, ...(ngDevMode ? [{ debugName: "head" }] : []));
|
|
3937
|
+
this.middle = computed(() => {
|
|
3938
|
+
const total = this.totalPages();
|
|
3939
|
+
const page = this.activePage();
|
|
3940
|
+
const result = [];
|
|
3941
|
+
if (total <= this.baseSize) {
|
|
3942
|
+
for (let i = 1; i <= total; i++) {
|
|
3943
|
+
result.push(i);
|
|
3944
|
+
}
|
|
3945
|
+
return result;
|
|
3946
|
+
}
|
|
3947
|
+
if (page <= 4) {
|
|
3948
|
+
for (let i = 1; i <= 5; i++) {
|
|
3949
|
+
result.push(i);
|
|
3950
|
+
}
|
|
3951
|
+
return result;
|
|
3952
|
+
}
|
|
3953
|
+
if (page >= total - 3) {
|
|
3954
|
+
for (let i = total - 4; i <= total; i++) {
|
|
3955
|
+
result.push(i);
|
|
3956
|
+
}
|
|
3957
|
+
return result;
|
|
3958
|
+
}
|
|
3959
|
+
for (let i = page - 1; i <= page + 1; i++) {
|
|
3960
|
+
result.push(i);
|
|
3961
|
+
}
|
|
3962
|
+
return result;
|
|
3963
|
+
}, ...(ngDevMode ? [{ debugName: "middle" }] : []));
|
|
3964
|
+
this.tail = computed(() => {
|
|
3965
|
+
const total = this.totalPages();
|
|
3966
|
+
const page = this.activePage();
|
|
3967
|
+
if (total <= this.baseSize) {
|
|
3968
|
+
return null;
|
|
3969
|
+
}
|
|
3970
|
+
if (page <= 4) {
|
|
3971
|
+
return total;
|
|
3972
|
+
}
|
|
3973
|
+
if (page >= total - 3) {
|
|
3974
|
+
return null;
|
|
3975
|
+
}
|
|
3976
|
+
return total;
|
|
3977
|
+
}, ...(ngDevMode ? [{ debugName: "tail" }] : []));
|
|
3902
3978
|
this.amountOptions = defaultAmountOptions;
|
|
3979
|
+
this.pageSizeControl.setValue(this.pageSize());
|
|
3903
3980
|
}
|
|
3904
3981
|
headPageHandler(page) {
|
|
3905
|
-
this.
|
|
3906
|
-
this.
|
|
3907
|
-
this.pageSelect.emit(this.currentPage);
|
|
3982
|
+
this.activePage.set(page);
|
|
3983
|
+
this.pageSelect.emit(this.activePage());
|
|
3908
3984
|
}
|
|
3909
|
-
ngOnChanges(changes) {
|
|
3910
|
-
if (this.currentPage &&
|
|
3911
|
-
changes.currentPage &&
|
|
3912
|
-
!changes.currentPage.firstChange) {
|
|
3913
|
-
if (changes.currentPage.currentValue !== changes.currentPage.previousValue) {
|
|
3914
|
-
this.renderPages(changes.currentPage.currentValue);
|
|
3915
|
-
}
|
|
3916
|
-
}
|
|
3917
|
-
if (changes.totalPages && this.middle) {
|
|
3918
|
-
this.currentPage = 1;
|
|
3919
|
-
this.renderPages(this.currentPage);
|
|
3920
|
-
this.pageSelect.emit(this.currentPage);
|
|
3921
|
-
}
|
|
3922
|
-
}
|
|
3923
|
-
ngOnInit() {
|
|
3924
|
-
this.pageSizeControl.setValue(this.pageSize);
|
|
3925
|
-
this.renderPages(this.currentPage);
|
|
3926
|
-
}
|
|
3927
|
-
ngOnDestroy() { }
|
|
3928
3985
|
handleChangePageSize(pageSize) {
|
|
3929
3986
|
this.amountChange.emit(pageSize);
|
|
3930
3987
|
}
|
|
3931
3988
|
middlePageHandler(page) {
|
|
3932
|
-
this.
|
|
3933
|
-
this.
|
|
3934
|
-
this.pageSelect.emit(this.currentPage);
|
|
3989
|
+
this.activePage.set(page);
|
|
3990
|
+
this.pageSelect.emit(this.activePage());
|
|
3935
3991
|
}
|
|
3936
3992
|
nextPageHandler() {
|
|
3937
|
-
|
|
3993
|
+
const current = this.activePage();
|
|
3994
|
+
const total = this.totalPages();
|
|
3995
|
+
if (current === total) {
|
|
3938
3996
|
return;
|
|
3939
3997
|
}
|
|
3940
|
-
const nextPage =
|
|
3941
|
-
this.
|
|
3942
|
-
this.
|
|
3943
|
-
this.pageSelect.emit(this.currentPage);
|
|
3998
|
+
const nextPage = current + 1;
|
|
3999
|
+
this.activePage.set(nextPage);
|
|
4000
|
+
this.pageSelect.emit(this.activePage());
|
|
3944
4001
|
}
|
|
3945
4002
|
prevPageHandler() {
|
|
3946
|
-
|
|
4003
|
+
const current = this.activePage();
|
|
4004
|
+
if (current === 1) {
|
|
3947
4005
|
return;
|
|
3948
4006
|
}
|
|
3949
|
-
const prevPage =
|
|
3950
|
-
this.
|
|
3951
|
-
this.
|
|
3952
|
-
this.pageSelect.emit(this.currentPage);
|
|
4007
|
+
const prevPage = current - 1;
|
|
4008
|
+
this.activePage.set(prevPage);
|
|
4009
|
+
this.pageSelect.emit(this.activePage());
|
|
3953
4010
|
}
|
|
3954
4011
|
tailPageHandler(page) {
|
|
3955
|
-
this.
|
|
3956
|
-
this.
|
|
3957
|
-
this.pageSelect.emit(this.currentPage);
|
|
3958
|
-
}
|
|
3959
|
-
/**
|
|
3960
|
-
* Результатом работы являются заполненные массивы головной, средней и конечной частей пагинации
|
|
3961
|
-
*
|
|
3962
|
-
* @param currentPage текущая страница
|
|
3963
|
-
*/
|
|
3964
|
-
renderPages(currentPage) {
|
|
3965
|
-
this.head = null;
|
|
3966
|
-
this.middle = [];
|
|
3967
|
-
this.tail = null;
|
|
3968
|
-
if (this.totalPages <= this.baseSize) {
|
|
3969
|
-
// Если общее количество страниц меньше или равно максимальному количеству отображаемых страниц,
|
|
3970
|
-
// все страницы находятся в массиве middle
|
|
3971
|
-
for (let i = 1; i <= this.totalPages; i++) {
|
|
3972
|
-
this.middle.push(i);
|
|
3973
|
-
}
|
|
3974
|
-
}
|
|
3975
|
-
else {
|
|
3976
|
-
if (currentPage <= 4) {
|
|
3977
|
-
// Первые 5 страниц: [1 2 3 4 5 ...]
|
|
3978
|
-
for (let i = 1; i <= 5; i++) {
|
|
3979
|
-
this.middle.push(i);
|
|
3980
|
-
}
|
|
3981
|
-
this.tail = this.totalPages;
|
|
3982
|
-
}
|
|
3983
|
-
else if (currentPage >= this.totalPages - 3) {
|
|
3984
|
-
// Последние 5 страниц: [1 ... 96 97 98 99 100]
|
|
3985
|
-
this.head = 1;
|
|
3986
|
-
for (let i = this.totalPages - 4; i <= this.totalPages; i++) {
|
|
3987
|
-
this.middle.push(i);
|
|
3988
|
-
}
|
|
3989
|
-
}
|
|
3990
|
-
else {
|
|
3991
|
-
// Страницы между head и tail
|
|
3992
|
-
this.head = 1;
|
|
3993
|
-
for (let i = currentPage - 1; i <= currentPage + 1; i++) {
|
|
3994
|
-
this.middle.push(i);
|
|
3995
|
-
}
|
|
3996
|
-
this.tail = this.totalPages;
|
|
3997
|
-
}
|
|
3998
|
-
}
|
|
4012
|
+
this.activePage.set(page);
|
|
4013
|
+
this.pageSelect.emit(this.activePage());
|
|
3999
4014
|
}
|
|
4000
4015
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: PaginationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
4001
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
4016
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.4", type: PaginationComponent, isStandalone: false, selector: "aeb-pagination", inputs: { totalPages: { classPropertyName: "totalPages", publicName: "totalPages", isSignal: true, isRequired: false, transformFunction: null }, currentPage: { classPropertyName: "currentPage", publicName: "currentPage", isSignal: true, isRequired: false, transformFunction: null }, usePageSizeSelector: { classPropertyName: "usePageSizeSelector", publicName: "usePageSizeSelector", isSignal: true, isRequired: false, transformFunction: null }, pageSize: { classPropertyName: "pageSize", publicName: "pageSize", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { pageSelect: "pageSelect", amountChange: "amountChange" }, host: { properties: { "class.aeb-pagination": "this.isPagination" } }, ngImport: i0, template: "<button\n (click)=\"prevPageHandler()\"\n class=\"aeb-pagination__button\"\n [ngClass]=\"{\n 'aeb-pagination__button--disabled': activePage() === 1\n }\"\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=\"M14 16L10.0707 12.0707C10.0317 12.0317 10.0317 11.9683 10.0707 11.9293L14 8\"\n stroke=\"#2F88F0\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n />\n </svg>\n</button>\n\n@if (head()) {\n <button (click)=\"headPageHandler(head())\" class=\"aeb-pagination__button\">\n {{ head() }}\n </button>\n}\n\n@if (head()) {\n <div class=\"aeb-pagination__breaker\">...</div>\n}\n\n@for (page of middle(); track page) {\n <button\n (click)=\"middlePageHandler(page)\"\n class=\"aeb-pagination__button\"\n [ngClass]=\"{\n 'aeb-pagination__button--active': activePage() === page\n }\"\n >\n {{ page }}\n </button>\n}\n\n@if (tail()) {\n <div class=\"aeb-pagination__breaker\">...</div>\n}\n\n@if (tail()) {\n <button\n (click)=\"tailPageHandler(tail())\"\n class=\"aeb-pagination__button\"\n [ngClass]=\"{\n 'aeb-pagination__button--active': activePage() === tail()\n }\"\n >\n {{ tail() }}\n </button>\n}\n\n<button\n (click)=\"nextPageHandler()\"\n class=\"aeb-pagination__button aeb-pagination__button--reversed\"\n [ngClass]=\"{\n 'aeb-pagination__button--disabled': activePage() === totalPages()\n }\"\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=\"M14 16L10.0707 12.0707C10.0317 12.0317 10.0317 11.9683 10.0707 11.9293L14 8\"\n stroke=\"#2F88F0\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n />\n </svg>\n</button>\n\n@if (usePageSizeSelector()) {\n <div class=\"aeb-pagination__select-container\">\n <aeb-select\n class=\"aeb-pagination__select\"\n [direction]=\"'top'\"\n (optionSelect)=\"handleChangePageSize($event)\"\n [formControl]=\"pageSizeControl\"\n [options]=\"amountOptions\"\n [label]=\"'\u041F\u043E\u043A\u0430\u0437\u044B\u0432\u0430\u0442\u044C \u043F\u043E'\"\n >\n </aeb-select>\n </div>\n}\n", styles: [".aeb-pagination{gap:8px;display:flex;position:relative;align-items:center;justify-content:center;color:var(--c-t-primary-white)}@media screen and (max-width: 900px){.aeb-pagination{gap:6px}}.aeb-pagination__button{padding:0;border:none;outline:none;display:flex;cursor:pointer;align-items:center;justify-content:center;background:transparent;color:var(--c-t-links);font-family:inherit;width:48px;height:48px;border-radius:12px;font-weight:400}.aeb-pagination__button:hover,.aeb-pagination__button:focus{background-color:var(--c-bg-surface)}.aeb-pagination__button--active{color:var(--c-t-primary-white);background-color:var(--c-btn-p-default)}.aeb-pagination__button--active:hover,.aeb-pagination__button--active:focus{background-color:var(--c-btn-p-default)}.aeb-pagination__button--disabled{opacity:.5;cursor:not-allowed}.aeb-pagination__button--reversed{transform:rotate(180deg)}@media screen and (max-width: 900px){.aeb-pagination__button{width:24px;height:24px;font-size:12px;border-radius:8px}}.aeb-pagination__breaker{-webkit-user-select:none;user-select:none;text-align:center;color:var(--c-t-links);width:48px;height:48px;font-size:16px;display:flex;align-items:center;justify-content:center}@media screen and (max-width: 900px){.aeb-pagination__breaker{font-size:12px;width:24px;height:24px}}.aeb-pagination__select-container{width:192px}@media screen and (max-width: 900px){.aeb-pagination__select-container{display:none}}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: SelectComponent, selector: "aeb-select", inputs: ["label", "options", "hasError", "disabled", "direction"], outputs: ["optionSelect"] }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
4002
4017
|
}
|
|
4003
4018
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: PaginationComponent, decorators: [{
|
|
4004
4019
|
type: Component,
|
|
4005
|
-
args: [{ selector: 'aeb-pagination', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<button
|
|
4006
|
-
}], ctorParameters: () => [], propDecorators: {
|
|
4007
|
-
type: Input
|
|
4008
|
-
}], currentPage: [{
|
|
4009
|
-
type: Input
|
|
4010
|
-
}], usePageSizeSelector: [{
|
|
4011
|
-
type: Input
|
|
4012
|
-
}], pageSize: [{
|
|
4013
|
-
type: Input
|
|
4014
|
-
}], btnType: [{
|
|
4015
|
-
type: Input
|
|
4016
|
-
}], size: [{
|
|
4017
|
-
type: Input
|
|
4018
|
-
}], pageSelect: [{
|
|
4019
|
-
type: Output
|
|
4020
|
-
}], amountChange: [{
|
|
4021
|
-
type: Output
|
|
4022
|
-
}], isPagination: [{
|
|
4020
|
+
args: [{ selector: 'aeb-pagination', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<button\n (click)=\"prevPageHandler()\"\n class=\"aeb-pagination__button\"\n [ngClass]=\"{\n 'aeb-pagination__button--disabled': activePage() === 1\n }\"\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=\"M14 16L10.0707 12.0707C10.0317 12.0317 10.0317 11.9683 10.0707 11.9293L14 8\"\n stroke=\"#2F88F0\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n />\n </svg>\n</button>\n\n@if (head()) {\n <button (click)=\"headPageHandler(head())\" class=\"aeb-pagination__button\">\n {{ head() }}\n </button>\n}\n\n@if (head()) {\n <div class=\"aeb-pagination__breaker\">...</div>\n}\n\n@for (page of middle(); track page) {\n <button\n (click)=\"middlePageHandler(page)\"\n class=\"aeb-pagination__button\"\n [ngClass]=\"{\n 'aeb-pagination__button--active': activePage() === page\n }\"\n >\n {{ page }}\n </button>\n}\n\n@if (tail()) {\n <div class=\"aeb-pagination__breaker\">...</div>\n}\n\n@if (tail()) {\n <button\n (click)=\"tailPageHandler(tail())\"\n class=\"aeb-pagination__button\"\n [ngClass]=\"{\n 'aeb-pagination__button--active': activePage() === tail()\n }\"\n >\n {{ tail() }}\n </button>\n}\n\n<button\n (click)=\"nextPageHandler()\"\n class=\"aeb-pagination__button aeb-pagination__button--reversed\"\n [ngClass]=\"{\n 'aeb-pagination__button--disabled': activePage() === totalPages()\n }\"\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=\"M14 16L10.0707 12.0707C10.0317 12.0317 10.0317 11.9683 10.0707 11.9293L14 8\"\n stroke=\"#2F88F0\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n />\n </svg>\n</button>\n\n@if (usePageSizeSelector()) {\n <div class=\"aeb-pagination__select-container\">\n <aeb-select\n class=\"aeb-pagination__select\"\n [direction]=\"'top'\"\n (optionSelect)=\"handleChangePageSize($event)\"\n [formControl]=\"pageSizeControl\"\n [options]=\"amountOptions\"\n [label]=\"'\u041F\u043E\u043A\u0430\u0437\u044B\u0432\u0430\u0442\u044C \u043F\u043E'\"\n >\n </aeb-select>\n </div>\n}\n", styles: [".aeb-pagination{gap:8px;display:flex;position:relative;align-items:center;justify-content:center;color:var(--c-t-primary-white)}@media screen and (max-width: 900px){.aeb-pagination{gap:6px}}.aeb-pagination__button{padding:0;border:none;outline:none;display:flex;cursor:pointer;align-items:center;justify-content:center;background:transparent;color:var(--c-t-links);font-family:inherit;width:48px;height:48px;border-radius:12px;font-weight:400}.aeb-pagination__button:hover,.aeb-pagination__button:focus{background-color:var(--c-bg-surface)}.aeb-pagination__button--active{color:var(--c-t-primary-white);background-color:var(--c-btn-p-default)}.aeb-pagination__button--active:hover,.aeb-pagination__button--active:focus{background-color:var(--c-btn-p-default)}.aeb-pagination__button--disabled{opacity:.5;cursor:not-allowed}.aeb-pagination__button--reversed{transform:rotate(180deg)}@media screen and (max-width: 900px){.aeb-pagination__button{width:24px;height:24px;font-size:12px;border-radius:8px}}.aeb-pagination__breaker{-webkit-user-select:none;user-select:none;text-align:center;color:var(--c-t-links);width:48px;height:48px;font-size:16px;display:flex;align-items:center;justify-content:center}@media screen and (max-width: 900px){.aeb-pagination__breaker{font-size:12px;width:24px;height:24px}}.aeb-pagination__select-container{width:192px}@media screen and (max-width: 900px){.aeb-pagination__select-container{display:none}}\n"] }]
|
|
4021
|
+
}], ctorParameters: () => [], propDecorators: { isPagination: [{
|
|
4023
4022
|
type: HostBinding,
|
|
4024
4023
|
args: ['class.aeb-pagination']
|
|
4025
4024
|
}] } });
|
|
@@ -5456,13 +5455,13 @@ class AebSwitchComponent {
|
|
|
5456
5455
|
this.renderer.setAttribute(el, 'aria-checked', String(this.checked));
|
|
5457
5456
|
}
|
|
5458
5457
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: AebSwitchComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
5459
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
5458
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.4", type: AebSwitchComponent, isStandalone: false, selector: "aeb-switch", inputs: { id: "id", name: "name", warning: "warning", label: "label" }, outputs: { changed: "changed" }, host: { listeners: { "click": "toggle($event)", "keydown.space": "onSpace($event)", "mousedown": "onPressStart()", "mouseup": "onPressEndMouseUp()", "mouseout": "onPressEndMouseOut()" }, properties: { "class.switch": "this.hostClass", "attr.role": "this.role", "attr.aria-checked": "this.ariaChecked", "class.switch--warning": "this.isWarningOrInvalid" } }, providers: [
|
|
5460
5459
|
{
|
|
5461
5460
|
provide: NG_VALUE_ACCESSOR,
|
|
5462
5461
|
useExisting: forwardRef(() => AebSwitchComponent),
|
|
5463
5462
|
multi: true
|
|
5464
5463
|
}
|
|
5465
|
-
], viewQueries: [{ propertyName: "switchInput", first: true, predicate: ["switchInput"], descendants: true, static: true }], ngImport: i0, template: "<div class=\"switch-wrapper\">\n <label
|
|
5464
|
+
], viewQueries: [{ propertyName: "switchInput", first: true, predicate: ["switchInput"], descendants: true, static: true }], ngImport: i0, template: "<div class=\"switch-wrapper\">\n <label\n class=\"switch\"\n [class.switch--checked]=\"checked\"\n [class.switch--warning]=\"warning || ngControl?.status === 'INVALID'\"\n [class.switch--disabled]=\"disabled\"\n [class.switch--pressed]=\"pressed\"\n tabindex=\"0\"\n >\n <input\n #switchInput\n type=\"checkbox\"\n [id]=\"id\"\n [name]=\"name\"\n class=\"visually-hidden\"\n [disabled]=\"disabled\"\n [checked]=\"checked\"\n />\n\n <span class=\"switch-slider\"></span>\n </label>\n @if (label) {\n <span class=\"switch-label\">{{ label }}</span>\n }\n</div>\n", styles: [".switch-wrapper{display:flex;align-items:center;gap:12px}.switch{outline:none;position:relative;display:inline-block;width:40px;height:24px;cursor:pointer}.switch:hover .switch-slider{filter:brightness(110%)}.switch--disabled{cursor:not-allowed}.switch--disabled:hover .switch-slider{filter:none!important}.switch--disabled .switch-slider{opacity:.5}.switch .visually-hidden{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0;outline:none}.switch .switch-slider{position:absolute;inset:0;background-color:var(--color-mono-100);border-radius:12px;transition:background-color .3s,filter .3s}.switch .switch-slider:before{content:\"\";position:absolute;width:18px;height:18px;top:3px;left:3px;background-color:var(--color-mono-0);border-radius:50%;transition:transform .3s}.switch--checked .switch-slider{background-color:var(--color-blue-500)}.switch--checked .switch-slider:before{transform:translate(16px)}.switch--warning .switch-slider{background-color:var(--color-red-100)}.switch--checked.switch--warning .switch-slider{background-color:var(--color-red-500)}.switch--checked.switch--warning .switch-slider:before{transform:translate(16px)}.switch--pressed .switch-slider{background-color:var(--color-mono-200)}.switch--pressed.switch--warning .switch-slider{background-color:var(--color-red-200)}.switch--pressed.switch--checked .switch-slider{background-color:var(--color-blue-600);filter:none}.switch--pressed.switch--checked .switch-slider:before{transform:translate(16px)}.switch--pressed.switch--checked.switch--warning .switch-slider{background-color:var(--color-red-600);filter:none}.switch--pressed.switch--checked.switch--warning .switch-slider:before{transform:translate(16px)}.switch-label{cursor:pointer;-webkit-user-select:none;user-select:none}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
5466
5465
|
}
|
|
5467
5466
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImport: i0, type: AebSwitchComponent, decorators: [{
|
|
5468
5467
|
type: Component,
|
|
@@ -5472,7 +5471,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.4", ngImpor
|
|
|
5472
5471
|
useExisting: forwardRef(() => AebSwitchComponent),
|
|
5473
5472
|
multi: true
|
|
5474
5473
|
}
|
|
5475
|
-
], standalone: false, template: "<div class=\"switch-wrapper\">\n <label
|
|
5474
|
+
], standalone: false, template: "<div class=\"switch-wrapper\">\n <label\n class=\"switch\"\n [class.switch--checked]=\"checked\"\n [class.switch--warning]=\"warning || ngControl?.status === 'INVALID'\"\n [class.switch--disabled]=\"disabled\"\n [class.switch--pressed]=\"pressed\"\n tabindex=\"0\"\n >\n <input\n #switchInput\n type=\"checkbox\"\n [id]=\"id\"\n [name]=\"name\"\n class=\"visually-hidden\"\n [disabled]=\"disabled\"\n [checked]=\"checked\"\n />\n\n <span class=\"switch-slider\"></span>\n </label>\n @if (label) {\n <span class=\"switch-label\">{{ label }}</span>\n }\n</div>\n", styles: [".switch-wrapper{display:flex;align-items:center;gap:12px}.switch{outline:none;position:relative;display:inline-block;width:40px;height:24px;cursor:pointer}.switch:hover .switch-slider{filter:brightness(110%)}.switch--disabled{cursor:not-allowed}.switch--disabled:hover .switch-slider{filter:none!important}.switch--disabled .switch-slider{opacity:.5}.switch .visually-hidden{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0;outline:none}.switch .switch-slider{position:absolute;inset:0;background-color:var(--color-mono-100);border-radius:12px;transition:background-color .3s,filter .3s}.switch .switch-slider:before{content:\"\";position:absolute;width:18px;height:18px;top:3px;left:3px;background-color:var(--color-mono-0);border-radius:50%;transition:transform .3s}.switch--checked .switch-slider{background-color:var(--color-blue-500)}.switch--checked .switch-slider:before{transform:translate(16px)}.switch--warning .switch-slider{background-color:var(--color-red-100)}.switch--checked.switch--warning .switch-slider{background-color:var(--color-red-500)}.switch--checked.switch--warning .switch-slider:before{transform:translate(16px)}.switch--pressed .switch-slider{background-color:var(--color-mono-200)}.switch--pressed.switch--warning .switch-slider{background-color:var(--color-red-200)}.switch--pressed.switch--checked .switch-slider{background-color:var(--color-blue-600);filter:none}.switch--pressed.switch--checked .switch-slider:before{transform:translate(16px)}.switch--pressed.switch--checked.switch--warning .switch-slider{background-color:var(--color-red-600);filter:none}.switch--pressed.switch--checked.switch--warning .switch-slider:before{transform:translate(16px)}.switch-label{cursor:pointer;-webkit-user-select:none;user-select:none}\n"] }]
|
|
5476
5475
|
}], ctorParameters: () => [], propDecorators: { switchInput: [{
|
|
5477
5476
|
type: ViewChild,
|
|
5478
5477
|
args: ['switchInput', { static: true }]
|