aeb-ui-kit 9.1.0-preview.1070 → 9.1.0-preview.1080
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 +19 -4
- package/fesm2022/aeb-ui-kit.mjs.map +1 -1
- package/lib/modal/modal.component.d.ts +3 -1
- package/package.json +1 -1
- package/styles.css +118 -0
package/fesm2022/aeb-ui-kit.mjs
CHANGED
|
@@ -4,7 +4,7 @@ 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, FormsModule, FormBuilder, FormControl, Validators, ReactiveFormsModule, NgControl } from '@angular/forms';
|
|
7
|
-
import { timer, map, takeUntil, Subject, Subscription, Observable, BehaviorSubject, withLatestFrom, filter, switchMap, take, merge, startWith, mergeMap, iif, of, tap, fromEvent, debounceTime } from 'rxjs';
|
|
7
|
+
import { timer, map, takeUntil, Subject, Subscription, Observable, BehaviorSubject, withLatestFrom, filter, switchMap, take, merge, startWith, mergeMap, iif, of, tap, fromEvent, debounce, debounceTime } from 'rxjs';
|
|
8
8
|
import { trigger, state, transition, style, animate } from '@angular/animations';
|
|
9
9
|
import * as i2 from '@angular/platform-browser';
|
|
10
10
|
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';
|
|
@@ -3510,7 +3510,7 @@ const DEFAULT_CONFIG = {
|
|
|
3510
3510
|
text: 'Отмена',
|
|
3511
3511
|
variant: 'secondary',
|
|
3512
3512
|
hidden: false,
|
|
3513
|
-
warning:
|
|
3513
|
+
warning: false,
|
|
3514
3514
|
disabled: false
|
|
3515
3515
|
},
|
|
3516
3516
|
rightBtn: {
|
|
@@ -3547,10 +3547,23 @@ class ModalComponent {
|
|
|
3547
3547
|
constructor() {
|
|
3548
3548
|
this._controlsConfig = DEFAULT_CONFIG;
|
|
3549
3549
|
this.isOpen = true;
|
|
3550
|
+
this.title = '';
|
|
3550
3551
|
this.size = 'S';
|
|
3551
3552
|
this.leftBtnClick = new EventEmitter();
|
|
3552
3553
|
this.rightBtnClick = new EventEmitter();
|
|
3553
3554
|
this.closeBtnClick = new EventEmitter();
|
|
3555
|
+
this.isMobileScreen = true;
|
|
3556
|
+
fromEvent(window, 'resize')
|
|
3557
|
+
.pipe(debounce(() => timer(50)), takeUntilDestroyed())
|
|
3558
|
+
.subscribe((event) => {
|
|
3559
|
+
const window = event.currentTarget;
|
|
3560
|
+
if (window.innerWidth < 600) {
|
|
3561
|
+
this.isMobileScreen = true;
|
|
3562
|
+
}
|
|
3563
|
+
else {
|
|
3564
|
+
this.isMobileScreen = false;
|
|
3565
|
+
}
|
|
3566
|
+
});
|
|
3554
3567
|
}
|
|
3555
3568
|
open() {
|
|
3556
3569
|
this.isOpen = true;
|
|
@@ -3569,13 +3582,15 @@ class ModalComponent {
|
|
|
3569
3582
|
}
|
|
3570
3583
|
ngOnInit() { }
|
|
3571
3584
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: ModalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3572
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.7", type: ModalComponent, isStandalone: false, selector: "aeb-modal", inputs: { isOpen: "isOpen", size: "size", controlsConfig: "controlsConfig" }, outputs: { leftBtnClick: "leftBtnClick", rightBtnClick: "rightBtnClick", closeBtnClick: "closeBtnClick" }, ngImport: i0, template: "<div\n class=\"aeb-modal\"\n [ngClass]=\"{\n 'aeb-modal--open': isOpen\n }\"\n>\n <div class=\"aeb-modal__window\" [class]=\"'aeb-modal__window--' + size\">\n @if (!controlsConfig.closeBtn.hidden) {\n
|
|
3585
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.7", type: ModalComponent, isStandalone: false, selector: "aeb-modal", inputs: { isOpen: "isOpen", title: "title", size: "size", controlsConfig: "controlsConfig" }, outputs: { leftBtnClick: "leftBtnClick", rightBtnClick: "rightBtnClick", closeBtnClick: "closeBtnClick" }, ngImport: i0, template: "<div\n class=\"aeb-modal\"\n [ngClass]=\"{\n 'aeb-modal--open': isOpen\n }\"\n>\n <div class=\"aeb-modal__window\" [class]=\"'aeb-modal__window--' + size\">\n <div class=\"aeb-modal__header\">\n <h2 class=\"aeb-modal__title\">{{ title }}</h2>\n @if (!controlsConfig.closeBtn.hidden) {\n <button class=\"aeb-modal__close-btn\" (click)=\"onCloseClick()\">\n <svg\n width=\"32\"\n height=\"32\"\n viewBox=\"0 0 32 32\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M9.63074 9.63074L22.3692 22.3692\"\n stroke=\"#7D8591\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n />\n <path\n d=\"M22.3693 9.63074L9.63077 22.3692\"\n stroke=\"#7D8591\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n />\n </svg>\n </button>\n }\n </div>\n <ng-content />\n @if (!controlsConfig.leftBtn.hidden && !controlsConfig.rightBtn.hidden) {\n <span class=\"aeb-modal__btn-group\">\n @if (!controlsConfig.leftBtn.hidden) {\n <button\n aebButton\n [size]=\"isMobileScreen ? 'L' : 'M'\"\n [fill]=\"isMobileScreen ? true : false\"\n [variant]=\"controlsConfig.leftBtn.variant\"\n [isWarning]=\"controlsConfig.leftBtn.warning\"\n [disabled]=\"controlsConfig.leftBtn.disabled\"\n (click)=\"onCancelClick()\"\n >\n {{ controlsConfig.leftBtn.text }}\n </button>\n }\n @if (!controlsConfig.rightBtn.hidden) {\n <button\n aebButton\n [size]=\"isMobileScreen ? 'L' : 'M'\"\n [fill]=\"isMobileScreen ? true : false\"\n [variant]=\"controlsConfig.rightBtn.variant\"\n [isWarning]=\"controlsConfig.rightBtn.warning\"\n [disabled]=\"controlsConfig.rightBtn.disabled\"\n (click)=\"onSubmitClick()\"\n >\n {{ controlsConfig.rightBtn.text }}\n </button>\n }\n </span>\n }\n </div>\n</div>\n", styles: [".aeb-modal{position:fixed;top:0;left:0;z-index:10000;display:flex;align-items:center;justify-content:center;width:100vw;height:100vh;height:100dvh;pointer-events:none;background-color:var(--c-bg-overlay);opacity:var(--100-total);transition:opacity,.1s}.aeb-modal--open{pointer-events:all;opacity:var(--0-zero)}.aeb-modal__header{display:flex;justify-content:space-between}.aeb-modal__title{margin:0;color:var(--c-t-primary)}.aeb-modal__window{position:relative;box-sizing:border-box;display:flex;flex-direction:column;gap:32px;padding:32px;margin:16px;background-color:var(--c-bg-default);border-radius:var(--border-fully-rounded);box-shadow:var(--light-theme-shadows-shadow-smooth-high);width:100%}@media screen and (width <= 600px){.aeb-modal__window{position:absolute;bottom:0;margin:0;border-radius:var(--border-rounded) var(--border-rounded) 0 0;padding:16px 16px 32px}}.aeb-modal__window--auto{width:auto}.aeb-modal__window--S{max-width:480px}@media screen and (width <= 600px){.aeb-modal__window--S{max-width:100%}}.aeb-modal__window--M{max-width:720px}@media screen and (width <= 600px){.aeb-modal__window--M{max-width:100%}}.aeb-modal__window--L{max-width:900px}@media screen and (width <= 600px){.aeb-modal__window--L{max-width:100%}}.aeb-modal__close-btn{display:flex;align-items:center;justify-content:center;cursor:pointer;padding:0;background:none;border:var(--no-border);box-shadow:var(--light-theme-shadows-shadow-smooth-high)}.aeb-modal__btn-group{display:flex;gap:16px;justify-content:flex-end}@media screen and (width <= 600px){.aeb-modal__btn-group{flex-direction:column}}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: ButtonComponent, selector: "button[aebButton], a[aebButton]", inputs: ["fill", "isWarning", "size", "variant"] }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
3573
3586
|
}
|
|
3574
3587
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: ModalComponent, decorators: [{
|
|
3575
3588
|
type: Component,
|
|
3576
|
-
args: [{ selector: 'aeb-modal', encapsulation: ViewEncapsulation.None, standalone: false, template: "<div\n class=\"aeb-modal\"\n [ngClass]=\"{\n 'aeb-modal--open': isOpen\n }\"\n>\n <div class=\"aeb-modal__window\" [class]=\"'aeb-modal__window--' + size\">\n @if (!controlsConfig.closeBtn.hidden) {\n
|
|
3589
|
+
args: [{ selector: 'aeb-modal', encapsulation: ViewEncapsulation.None, standalone: false, template: "<div\n class=\"aeb-modal\"\n [ngClass]=\"{\n 'aeb-modal--open': isOpen\n }\"\n>\n <div class=\"aeb-modal__window\" [class]=\"'aeb-modal__window--' + size\">\n <div class=\"aeb-modal__header\">\n <h2 class=\"aeb-modal__title\">{{ title }}</h2>\n @if (!controlsConfig.closeBtn.hidden) {\n <button class=\"aeb-modal__close-btn\" (click)=\"onCloseClick()\">\n <svg\n width=\"32\"\n height=\"32\"\n viewBox=\"0 0 32 32\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M9.63074 9.63074L22.3692 22.3692\"\n stroke=\"#7D8591\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n />\n <path\n d=\"M22.3693 9.63074L9.63077 22.3692\"\n stroke=\"#7D8591\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n />\n </svg>\n </button>\n }\n </div>\n <ng-content />\n @if (!controlsConfig.leftBtn.hidden && !controlsConfig.rightBtn.hidden) {\n <span class=\"aeb-modal__btn-group\">\n @if (!controlsConfig.leftBtn.hidden) {\n <button\n aebButton\n [size]=\"isMobileScreen ? 'L' : 'M'\"\n [fill]=\"isMobileScreen ? true : false\"\n [variant]=\"controlsConfig.leftBtn.variant\"\n [isWarning]=\"controlsConfig.leftBtn.warning\"\n [disabled]=\"controlsConfig.leftBtn.disabled\"\n (click)=\"onCancelClick()\"\n >\n {{ controlsConfig.leftBtn.text }}\n </button>\n }\n @if (!controlsConfig.rightBtn.hidden) {\n <button\n aebButton\n [size]=\"isMobileScreen ? 'L' : 'M'\"\n [fill]=\"isMobileScreen ? true : false\"\n [variant]=\"controlsConfig.rightBtn.variant\"\n [isWarning]=\"controlsConfig.rightBtn.warning\"\n [disabled]=\"controlsConfig.rightBtn.disabled\"\n (click)=\"onSubmitClick()\"\n >\n {{ controlsConfig.rightBtn.text }}\n </button>\n }\n </span>\n }\n </div>\n</div>\n", styles: [".aeb-modal{position:fixed;top:0;left:0;z-index:10000;display:flex;align-items:center;justify-content:center;width:100vw;height:100vh;height:100dvh;pointer-events:none;background-color:var(--c-bg-overlay);opacity:var(--100-total);transition:opacity,.1s}.aeb-modal--open{pointer-events:all;opacity:var(--0-zero)}.aeb-modal__header{display:flex;justify-content:space-between}.aeb-modal__title{margin:0;color:var(--c-t-primary)}.aeb-modal__window{position:relative;box-sizing:border-box;display:flex;flex-direction:column;gap:32px;padding:32px;margin:16px;background-color:var(--c-bg-default);border-radius:var(--border-fully-rounded);box-shadow:var(--light-theme-shadows-shadow-smooth-high);width:100%}@media screen and (width <= 600px){.aeb-modal__window{position:absolute;bottom:0;margin:0;border-radius:var(--border-rounded) var(--border-rounded) 0 0;padding:16px 16px 32px}}.aeb-modal__window--auto{width:auto}.aeb-modal__window--S{max-width:480px}@media screen and (width <= 600px){.aeb-modal__window--S{max-width:100%}}.aeb-modal__window--M{max-width:720px}@media screen and (width <= 600px){.aeb-modal__window--M{max-width:100%}}.aeb-modal__window--L{max-width:900px}@media screen and (width <= 600px){.aeb-modal__window--L{max-width:100%}}.aeb-modal__close-btn{display:flex;align-items:center;justify-content:center;cursor:pointer;padding:0;background:none;border:var(--no-border);box-shadow:var(--light-theme-shadows-shadow-smooth-high)}.aeb-modal__btn-group{display:flex;gap:16px;justify-content:flex-end}@media screen and (width <= 600px){.aeb-modal__btn-group{flex-direction:column}}\n"] }]
|
|
3577
3590
|
}], ctorParameters: () => [], propDecorators: { isOpen: [{
|
|
3578
3591
|
type: Input
|
|
3592
|
+
}], title: [{
|
|
3593
|
+
type: Input
|
|
3579
3594
|
}], size: [{
|
|
3580
3595
|
type: Input
|
|
3581
3596
|
}], leftBtnClick: [{
|