aeb-ui-kit 1.0.0-beta.3 → 1.0.0-beta.4

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.
@@ -2827,12 +2827,12 @@ class DatepickerCoreComponent {
2827
2827
  DatepickerCoreComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: DatepickerCoreComponent, deps: [{ token: DatepickerUtilsService }], target: i0.ɵɵFactoryTarget.Component });
2828
2828
  DatepickerCoreComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: DatepickerCoreComponent, selector: "aeb-datepicker-core", inputs: { date: "date", minDate: "minDate", maxDate: "maxDate", excludedDates: "excludedDates", minYear: "minYear", maxYear: "maxYear", withBackground: "withBackground", align: "align", withoutDays: "withoutDays" }, outputs: { onDateChange: "onDateChange", woDaysMonth: "woDaysMonth", woDaysYear: "woDaysYear", woDaysMonthSubInc: "woDaysMonthSubInc" }, providers: [
2829
2829
  { provide: LOCALE_ID, useValue: 'ru' }
2830
- ], viewQueries: [{ propertyName: "container", first: true, predicate: ["container"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div\n class=\"aeb-datepicker-core\"\n [ngClass]=\"{\n 'aeb-datepicker-core--with-background': withBackground,\n 'aeb-datepicker-core--left': align === 'left',\n 'aeb-datepicker-core--right': align === 'right'\n }\"\n #container\n>\n <div class=\"aeb-datepicker-core__controls\">\n <div\n class=\"aeb-datepicker-core__arrow\"\n (click)=\"subMonth()\"\n >\n <svg\n width=\"9\"\n height=\"16\"\n viewBox=\"0 0 9 16\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M8 1L1.35355 7.64645C1.15829 7.84171 1.15829 8.15829 1.35355 8.35355L8 15\"\n stroke=\"#27303E\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n />\n </svg>\n </div>\n <div\n class=\"aeb-datepicker-core__btn aeb-datepicker-core__btn--month\"\n (click)=\"showMonthsHandler()\"\n >\n {{ firstDay() | date:'LLLL' | titlecase }}\n <div\n class=\"aeb-datepicker-core__arrow-icon\"\n [ngClass]=\"{'aeb-datepicker-core__arrow-icon--active': isShowMonths}\"\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=\"M9 1L5.07071 4.92929C5.03166 4.96834 4.96834 4.96834 4.92929 4.92929L1 1\"\n stroke=\"#27303E\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n />\n </svg>\n </div>\n </div>\n <div\n class=\"aeb-datepicker-core__btn\"\n (click)=\"showYearsHandler()\"\n >\n {{ firstDay() | date:'yyyy' }}\n <div\n class=\"aeb-datepicker-core__arrow-icon\"\n [ngClass]=\"{'aeb-datepicker-core__arrow-icon--active': isShowYears}\"\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=\"M9 1L5.07071 4.92929C5.03166 4.96834 4.96834 4.96834 4.92929 4.92929L1 1\"\n stroke=\"#27303E\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n />\n </svg>\n </div>\n </div>\n <div\n class=\"aeb-datepicker-core__arrow aeb-datepicker-core__arrow--right\"\n (click)=\"addMonth()\"\n >\n <svg\n width=\"9\"\n height=\"16\"\n viewBox=\"0 0 9 16\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M8 1L1.35355 7.64645C1.15829 7.84171 1.15829 8.15829 1.35355 8.35355L8 15\"\n stroke=\"#27303E\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n />\n </svg>\n </div>\n </div>\n <div class=\"aeb-datepicker-core__calendar\">\n <div [style.display]=\"(!isShowYears && !isShowMonths) ? 'block' : 'none'\">\n <aeb-datepicker-month\n [month]=\"month\"\n [date]=\"date\"\n [minDate]=\"minDate\"\n [maxDate]=\"maxDate\"\n [excludedDates]=\"excludedDates\"\n (setDate)=\"setDate($event)\"\n >\n </aeb-datepicker-month>\n </div>\n <div [style.display]=\"isShowYears ? 'block' : 'none'\">\n <aeb-datepicker-tiles\n [year]=\"currentYear\"\n [date]=\"startOfYear(currentYear)\"\n [minYear]=\"minYear\"\n [maxYear]=\"maxYear\"\n (setYear)=\"setYear($event)\"\n [isYears]=\"isShowYears\"\n [minDate]=\"minDate\"\n [maxDate]=\"maxDate\"\n [woDays]=\"withoutDays\"\n >\n </aeb-datepicker-tiles>\n </div>\n <div [style.display]=\"isShowMonths ? 'block' : 'none'\">\n <aeb-datepicker-tiles\n [isMonths]=\"isShowMonths\"\n [month]=\"currentMonth\"\n [minYear]=\"minYear\"\n [maxYear]=\"maxYear\"\n (setMonth)=\"setMonth($event)\"\n [year]=\"currentYear\"\n [minDate]=\"minDate\"\n [maxDate]=\"maxDate\"\n [woDays]=\"withoutDays\"\n >\n </aeb-datepicker-tiles>\n </div>\n </div>\n</div>\n", styles: [".aeb-datepicker-core{-webkit-user-select:none;user-select:none;position:fixed;z-index:9999}.aeb-datepicker-core--with-background{background-color:var(--white);border-radius:10px;border:2px solid var(--gray-primary);padding:10px}.aeb-datepicker-core__calendar{min-height:220px;width:100%}.aeb-datepicker-core__controls{display:flex;justify-content:center;align-items:center;margin-bottom:10px}.aeb-datepicker-core__arrow{cursor:pointer}.aeb-datepicker-core__arrow--right{transform:rotate(180deg);margin-bottom:10px}.aeb-datepicker-core__btn{display:flex;align-items:center;justify-content:space-between;border:2px solid var(--gray-primary);font-size:14px;padding:6px 10px;border-radius:4px;cursor:pointer;margin-right:20px;width:72px;box-sizing:border-box}.aeb-datepicker-core__btn--month{width:112px;margin-right:10px;margin-left:20px}.aeb-datepicker-core__arrow-icon{box-sizing:border-box;position:relative;bottom:2px}.aeb-datepicker-core__arrow-icon--active{transform:rotate(180deg)}\n"], components: [{ type: DatepickerMonthComponent, selector: "aeb-datepicker-month", inputs: ["month", "date", "minDate", "maxDate", "excludedDates"], outputs: ["setDate"] }, { type: DatepickerTilesComponent, selector: "aeb-datepicker-tiles", inputs: ["date", "isMonths", "isYears", "year", "month", "minYear", "maxYear", "minDate", "maxDate", "woDays"], outputs: ["setYear", "setMonth"] }], directives: [{ type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], pipes: { "titlecase": i1.TitleCasePipe, "date": i1.DatePipe }, encapsulation: i0.ViewEncapsulation.None });
2830
+ ], viewQueries: [{ propertyName: "container", first: true, predicate: ["container"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div\n class=\"aeb-datepicker-core\"\n [ngClass]=\"{\n 'aeb-datepicker-core--with-background': withBackground,\n 'aeb-datepicker-core--left': align === 'left',\n 'aeb-datepicker-core--right': align === 'right'\n }\"\n #container\n>\n <div class=\"aeb-datepicker-core__controls\">\n <div class=\"aeb-datepicker-core__arrow\" (click)=\"subMonth()\">\n <svg\n width=\"9\"\n height=\"16\"\n viewBox=\"0 0 9 16\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M8 1L1.35355 7.64645C1.15829 7.84171 1.15829 8.15829 1.35355 8.35355L8 15\"\n stroke=\"#27303E\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n />\n </svg>\n </div>\n <div\n class=\"aeb-datepicker-core__btn aeb-datepicker-core__btn--month\"\n (click)=\"showMonthsHandler()\"\n >\n {{ firstDay() | date: \"LLLL\" | titlecase }}\n <div\n class=\"aeb-datepicker-core__arrow-icon\"\n [ngClass]=\"{ 'aeb-datepicker-core__arrow-icon--active': isShowMonths }\"\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=\"M9 1L5.07071 4.92929C5.03166 4.96834 4.96834 4.96834 4.92929 4.92929L1 1\"\n stroke=\"#27303E\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n />\n </svg>\n </div>\n </div>\n <div class=\"aeb-datepicker-core__btn\" (click)=\"showYearsHandler()\">\n {{ firstDay() | date: \"yyyy\" }}\n <div\n class=\"aeb-datepicker-core__arrow-icon\"\n [ngClass]=\"{ 'aeb-datepicker-core__arrow-icon--active': isShowYears }\"\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=\"M9 1L5.07071 4.92929C5.03166 4.96834 4.96834 4.96834 4.92929 4.92929L1 1\"\n stroke=\"#27303E\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n />\n </svg>\n </div>\n </div>\n <div\n class=\"aeb-datepicker-core__arrow aeb-datepicker-core__arrow--right\"\n (click)=\"addMonth()\"\n >\n <svg\n width=\"9\"\n height=\"16\"\n viewBox=\"0 0 9 16\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M8 1L1.35355 7.64645C1.15829 7.84171 1.15829 8.15829 1.35355 8.35355L8 15\"\n stroke=\"#27303E\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n />\n </svg>\n </div>\n </div>\n <div class=\"aeb-datepicker-core__calendar\">\n <div [style.display]=\"!isShowYears && !isShowMonths ? 'block' : 'none'\">\n <aeb-datepicker-month\n [month]=\"month\"\n [date]=\"date\"\n [minDate]=\"minDate\"\n [maxDate]=\"maxDate\"\n [excludedDates]=\"excludedDates\"\n (setDate)=\"setDate($event)\"\n >\n </aeb-datepicker-month>\n </div>\n <div [style.display]=\"isShowYears ? 'block' : 'none'\">\n <aeb-datepicker-tiles\n [year]=\"currentYear\"\n [date]=\"startOfYear(currentYear)\"\n [minYear]=\"minYear\"\n [maxYear]=\"maxYear\"\n (setYear)=\"setYear($event)\"\n [isYears]=\"isShowYears\"\n [minDate]=\"minDate\"\n [maxDate]=\"maxDate\"\n [woDays]=\"withoutDays\"\n >\n </aeb-datepicker-tiles>\n </div>\n <div [style.display]=\"isShowMonths ? 'block' : 'none'\">\n <aeb-datepicker-tiles\n [isMonths]=\"isShowMonths\"\n [month]=\"currentMonth\"\n [minYear]=\"minYear\"\n [maxYear]=\"maxYear\"\n (setMonth)=\"setMonth($event)\"\n [year]=\"currentYear\"\n [minDate]=\"minDate\"\n [maxDate]=\"maxDate\"\n [woDays]=\"withoutDays\"\n >\n </aeb-datepicker-tiles>\n </div>\n </div>\n</div>\n", styles: [".aeb-datepicker-core{-webkit-user-select:none;user-select:none;position:fixed;z-index:9999}.aeb-datepicker-core--with-background{background-color:var(--white);border-radius:10px;border:2px solid var(--gray-primary);padding:10px}.aeb-datepicker-core__calendar{min-height:220px;width:100%}.aeb-datepicker-core__controls{display:flex;justify-content:center;align-items:center;margin-bottom:10px}.aeb-datepicker-core__arrow{cursor:pointer}.aeb-datepicker-core__arrow--right{transform:rotate(180deg);margin-bottom:10px}.aeb-datepicker-core__btn{display:flex;align-items:center;justify-content:space-between;border:2px solid var(--gray-primary);font-size:14px;padding:6px 10px;border-radius:4px;cursor:pointer;margin-right:20px;width:72px;box-sizing:border-box}.aeb-datepicker-core__btn--month{width:112px;margin-right:10px;margin-left:20px}.aeb-datepicker-core__arrow-icon{box-sizing:border-box;position:relative;bottom:2px}.aeb-datepicker-core__arrow-icon--active{transform:rotate(180deg)}\n"], components: [{ type: DatepickerMonthComponent, selector: "aeb-datepicker-month", inputs: ["month", "date", "minDate", "maxDate", "excludedDates"], outputs: ["setDate"] }, { type: DatepickerTilesComponent, selector: "aeb-datepicker-tiles", inputs: ["date", "isMonths", "isYears", "year", "month", "minYear", "maxYear", "minDate", "maxDate", "woDays"], outputs: ["setYear", "setMonth"] }], directives: [{ type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], pipes: { "titlecase": i1.TitleCasePipe, "date": i1.DatePipe }, encapsulation: i0.ViewEncapsulation.None });
2831
2831
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: DatepickerCoreComponent, decorators: [{
2832
2832
  type: Component,
2833
2833
  args: [{ selector: 'aeb-datepicker-core', providers: [
2834
2834
  { provide: LOCALE_ID, useValue: 'ru' }
2835
- ], encapsulation: ViewEncapsulation.None, template: "<div\n class=\"aeb-datepicker-core\"\n [ngClass]=\"{\n 'aeb-datepicker-core--with-background': withBackground,\n 'aeb-datepicker-core--left': align === 'left',\n 'aeb-datepicker-core--right': align === 'right'\n }\"\n #container\n>\n <div class=\"aeb-datepicker-core__controls\">\n <div\n class=\"aeb-datepicker-core__arrow\"\n (click)=\"subMonth()\"\n >\n <svg\n width=\"9\"\n height=\"16\"\n viewBox=\"0 0 9 16\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M8 1L1.35355 7.64645C1.15829 7.84171 1.15829 8.15829 1.35355 8.35355L8 15\"\n stroke=\"#27303E\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n />\n </svg>\n </div>\n <div\n class=\"aeb-datepicker-core__btn aeb-datepicker-core__btn--month\"\n (click)=\"showMonthsHandler()\"\n >\n {{ firstDay() | date:'LLLL' | titlecase }}\n <div\n class=\"aeb-datepicker-core__arrow-icon\"\n [ngClass]=\"{'aeb-datepicker-core__arrow-icon--active': isShowMonths}\"\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=\"M9 1L5.07071 4.92929C5.03166 4.96834 4.96834 4.96834 4.92929 4.92929L1 1\"\n stroke=\"#27303E\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n />\n </svg>\n </div>\n </div>\n <div\n class=\"aeb-datepicker-core__btn\"\n (click)=\"showYearsHandler()\"\n >\n {{ firstDay() | date:'yyyy' }}\n <div\n class=\"aeb-datepicker-core__arrow-icon\"\n [ngClass]=\"{'aeb-datepicker-core__arrow-icon--active': isShowYears}\"\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=\"M9 1L5.07071 4.92929C5.03166 4.96834 4.96834 4.96834 4.92929 4.92929L1 1\"\n stroke=\"#27303E\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n />\n </svg>\n </div>\n </div>\n <div\n class=\"aeb-datepicker-core__arrow aeb-datepicker-core__arrow--right\"\n (click)=\"addMonth()\"\n >\n <svg\n width=\"9\"\n height=\"16\"\n viewBox=\"0 0 9 16\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M8 1L1.35355 7.64645C1.15829 7.84171 1.15829 8.15829 1.35355 8.35355L8 15\"\n stroke=\"#27303E\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n />\n </svg>\n </div>\n </div>\n <div class=\"aeb-datepicker-core__calendar\">\n <div [style.display]=\"(!isShowYears && !isShowMonths) ? 'block' : 'none'\">\n <aeb-datepicker-month\n [month]=\"month\"\n [date]=\"date\"\n [minDate]=\"minDate\"\n [maxDate]=\"maxDate\"\n [excludedDates]=\"excludedDates\"\n (setDate)=\"setDate($event)\"\n >\n </aeb-datepicker-month>\n </div>\n <div [style.display]=\"isShowYears ? 'block' : 'none'\">\n <aeb-datepicker-tiles\n [year]=\"currentYear\"\n [date]=\"startOfYear(currentYear)\"\n [minYear]=\"minYear\"\n [maxYear]=\"maxYear\"\n (setYear)=\"setYear($event)\"\n [isYears]=\"isShowYears\"\n [minDate]=\"minDate\"\n [maxDate]=\"maxDate\"\n [woDays]=\"withoutDays\"\n >\n </aeb-datepicker-tiles>\n </div>\n <div [style.display]=\"isShowMonths ? 'block' : 'none'\">\n <aeb-datepicker-tiles\n [isMonths]=\"isShowMonths\"\n [month]=\"currentMonth\"\n [minYear]=\"minYear\"\n [maxYear]=\"maxYear\"\n (setMonth)=\"setMonth($event)\"\n [year]=\"currentYear\"\n [minDate]=\"minDate\"\n [maxDate]=\"maxDate\"\n [woDays]=\"withoutDays\"\n >\n </aeb-datepicker-tiles>\n </div>\n </div>\n</div>\n", styles: [".aeb-datepicker-core{-webkit-user-select:none;user-select:none;position:fixed;z-index:9999}.aeb-datepicker-core--with-background{background-color:var(--white);border-radius:10px;border:2px solid var(--gray-primary);padding:10px}.aeb-datepicker-core__calendar{min-height:220px;width:100%}.aeb-datepicker-core__controls{display:flex;justify-content:center;align-items:center;margin-bottom:10px}.aeb-datepicker-core__arrow{cursor:pointer}.aeb-datepicker-core__arrow--right{transform:rotate(180deg);margin-bottom:10px}.aeb-datepicker-core__btn{display:flex;align-items:center;justify-content:space-between;border:2px solid var(--gray-primary);font-size:14px;padding:6px 10px;border-radius:4px;cursor:pointer;margin-right:20px;width:72px;box-sizing:border-box}.aeb-datepicker-core__btn--month{width:112px;margin-right:10px;margin-left:20px}.aeb-datepicker-core__arrow-icon{box-sizing:border-box;position:relative;bottom:2px}.aeb-datepicker-core__arrow-icon--active{transform:rotate(180deg)}\n"] }]
2835
+ ], encapsulation: ViewEncapsulation.None, template: "<div\n class=\"aeb-datepicker-core\"\n [ngClass]=\"{\n 'aeb-datepicker-core--with-background': withBackground,\n 'aeb-datepicker-core--left': align === 'left',\n 'aeb-datepicker-core--right': align === 'right'\n }\"\n #container\n>\n <div class=\"aeb-datepicker-core__controls\">\n <div class=\"aeb-datepicker-core__arrow\" (click)=\"subMonth()\">\n <svg\n width=\"9\"\n height=\"16\"\n viewBox=\"0 0 9 16\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M8 1L1.35355 7.64645C1.15829 7.84171 1.15829 8.15829 1.35355 8.35355L8 15\"\n stroke=\"#27303E\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n />\n </svg>\n </div>\n <div\n class=\"aeb-datepicker-core__btn aeb-datepicker-core__btn--month\"\n (click)=\"showMonthsHandler()\"\n >\n {{ firstDay() | date: \"LLLL\" | titlecase }}\n <div\n class=\"aeb-datepicker-core__arrow-icon\"\n [ngClass]=\"{ 'aeb-datepicker-core__arrow-icon--active': isShowMonths }\"\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=\"M9 1L5.07071 4.92929C5.03166 4.96834 4.96834 4.96834 4.92929 4.92929L1 1\"\n stroke=\"#27303E\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n />\n </svg>\n </div>\n </div>\n <div class=\"aeb-datepicker-core__btn\" (click)=\"showYearsHandler()\">\n {{ firstDay() | date: \"yyyy\" }}\n <div\n class=\"aeb-datepicker-core__arrow-icon\"\n [ngClass]=\"{ 'aeb-datepicker-core__arrow-icon--active': isShowYears }\"\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=\"M9 1L5.07071 4.92929C5.03166 4.96834 4.96834 4.96834 4.92929 4.92929L1 1\"\n stroke=\"#27303E\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n />\n </svg>\n </div>\n </div>\n <div\n class=\"aeb-datepicker-core__arrow aeb-datepicker-core__arrow--right\"\n (click)=\"addMonth()\"\n >\n <svg\n width=\"9\"\n height=\"16\"\n viewBox=\"0 0 9 16\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M8 1L1.35355 7.64645C1.15829 7.84171 1.15829 8.15829 1.35355 8.35355L8 15\"\n stroke=\"#27303E\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n />\n </svg>\n </div>\n </div>\n <div class=\"aeb-datepicker-core__calendar\">\n <div [style.display]=\"!isShowYears && !isShowMonths ? 'block' : 'none'\">\n <aeb-datepicker-month\n [month]=\"month\"\n [date]=\"date\"\n [minDate]=\"minDate\"\n [maxDate]=\"maxDate\"\n [excludedDates]=\"excludedDates\"\n (setDate)=\"setDate($event)\"\n >\n </aeb-datepicker-month>\n </div>\n <div [style.display]=\"isShowYears ? 'block' : 'none'\">\n <aeb-datepicker-tiles\n [year]=\"currentYear\"\n [date]=\"startOfYear(currentYear)\"\n [minYear]=\"minYear\"\n [maxYear]=\"maxYear\"\n (setYear)=\"setYear($event)\"\n [isYears]=\"isShowYears\"\n [minDate]=\"minDate\"\n [maxDate]=\"maxDate\"\n [woDays]=\"withoutDays\"\n >\n </aeb-datepicker-tiles>\n </div>\n <div [style.display]=\"isShowMonths ? 'block' : 'none'\">\n <aeb-datepicker-tiles\n [isMonths]=\"isShowMonths\"\n [month]=\"currentMonth\"\n [minYear]=\"minYear\"\n [maxYear]=\"maxYear\"\n (setMonth)=\"setMonth($event)\"\n [year]=\"currentYear\"\n [minDate]=\"minDate\"\n [maxDate]=\"maxDate\"\n [woDays]=\"withoutDays\"\n >\n </aeb-datepicker-tiles>\n </div>\n </div>\n</div>\n", styles: [".aeb-datepicker-core{-webkit-user-select:none;user-select:none;position:fixed;z-index:9999}.aeb-datepicker-core--with-background{background-color:var(--white);border-radius:10px;border:2px solid var(--gray-primary);padding:10px}.aeb-datepicker-core__calendar{min-height:220px;width:100%}.aeb-datepicker-core__controls{display:flex;justify-content:center;align-items:center;margin-bottom:10px}.aeb-datepicker-core__arrow{cursor:pointer}.aeb-datepicker-core__arrow--right{transform:rotate(180deg);margin-bottom:10px}.aeb-datepicker-core__btn{display:flex;align-items:center;justify-content:space-between;border:2px solid var(--gray-primary);font-size:14px;padding:6px 10px;border-radius:4px;cursor:pointer;margin-right:20px;width:72px;box-sizing:border-box}.aeb-datepicker-core__btn--month{width:112px;margin-right:10px;margin-left:20px}.aeb-datepicker-core__arrow-icon{box-sizing:border-box;position:relative;bottom:2px}.aeb-datepicker-core__arrow-icon--active{transform:rotate(180deg)}\n"] }]
2836
2836
  }], ctorParameters: function () { return [{ type: DatepickerUtilsService }]; }, propDecorators: { date: [{
2837
2837
  type: Input,
2838
2838
  args: ['date']
@@ -2906,13 +2906,13 @@ class DatepickerComponent {
2906
2906
  this.clearVl = '';
2907
2907
  this.mask = '00.00.0000';
2908
2908
  this.customPattern = {
2909
- 'y': { pattern: new RegExp('\[0-9]') },
2910
- '0': { pattern: new RegExp('\[0-3]') },
2911
- '1': { pattern: new RegExp('\[0-9]') },
2912
- '2': { pattern: new RegExp('\[0-1]') },
2913
- '3': { pattern: new RegExp('\[0-9]') },
2914
- 'm': { pattern: new RegExp('\[0-3]') },
2915
- 'x': { pattern: new RegExp('\[0-9]') }
2909
+ 'y': { pattern: /[\d]/ },
2910
+ '0': { pattern: /[0-3]/ },
2911
+ '1': { pattern: /[\d]/ },
2912
+ '2': { pattern: /[0-1]/ },
2913
+ '3': { pattern: /[\d]/ },
2914
+ 'm': { pattern: /[0-3]/ },
2915
+ 'x': { pattern: /[\d]/ }
2916
2916
  };
2917
2917
  this.fixedPosition = '';
2918
2918
  this.isOpen = false;
@@ -2948,7 +2948,7 @@ class DatepickerComponent {
2948
2948
  breakInput(!valid);
2949
2949
  }
2950
2950
  }
2951
- typeHandler(event) {
2951
+ typeHandler(_event) {
2952
2952
  const split = this.inputValue.split('.');
2953
2953
  const isMasked = this.withoutDays ? split.length === 2 : split.length === 3;
2954
2954
  this.clearVl = this.inputValue.replace(/\./g, '');
@@ -3020,9 +3020,8 @@ class DatepickerComponent {
3020
3020
  this.adjustCoreContainer();
3021
3021
  this.isOpen = true;
3022
3022
  }
3023
- ;
3024
3023
  }
3025
- clickOutsideHandler(event) {
3024
+ clickOutsideHandler(_event) {
3026
3025
  if (this.isOpen)
3027
3026
  this.isOpen = false;
3028
3027
  }
@@ -3084,9 +3083,9 @@ class DatepickerComponent {
3084
3083
  document.addEventListener('scroll', this.isolatedCb);
3085
3084
  }
3086
3085
  ngOnDestroy() {
3087
- document.removeEventListener('scroll', this.isolatedCb);
3086
+ document.removeAllListeners('scroll');
3088
3087
  if (this.scrollParent) {
3089
- this.scrollParent.removeEventListener('scroll', this.isolatedCb);
3088
+ this.scrollParent.removeAllListeners('scroll');
3090
3089
  }
3091
3090
  }
3092
3091
  ngAfterViewInit() {
@@ -3124,8 +3123,12 @@ class DatepickerComponent {
3124
3123
  this.isOpen = false;
3125
3124
  }
3126
3125
  }
3127
- onFormChange(value) { }
3128
- onTouch() { }
3126
+ onFormChange(_value) {
3127
+ // ingore
3128
+ }
3129
+ onTouch() {
3130
+ // ignore
3131
+ }
3129
3132
  registerOnChange(fn) {
3130
3133
  this.onFormChange = fn;
3131
3134
  }
@@ -3133,11 +3136,13 @@ class DatepickerComponent {
3133
3136
  this.onTouch = fn;
3134
3137
  }
3135
3138
  writeValue(value) {
3136
- if (this.disabled)
3139
+ if (this.disabled || this.input === undefined && !value)
3137
3140
  return;
3141
+ this.date = value || new Date();
3138
3142
  if (!value)
3139
3143
  this.inputValue = '';
3140
- this.date = value || new Date();
3144
+ else
3145
+ this.inputValue = this.utils.formatDate(this.date);
3141
3146
  this.onFormChange(value);
3142
3147
  this.onTouch();
3143
3148
  if (!this.touched)
@@ -3177,7 +3182,7 @@ DatepickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ve
3177
3182
  useExisting: forwardRef(() => DatepickerComponent),
3178
3183
  multi: true
3179
3184
  }
3180
- ], viewQueries: [{ propertyName: "core", first: true, predicate: ["core"], descendants: true }, { propertyName: "input", first: true, predicate: ["input"], descendants: true }, { propertyName: "container", first: true, predicate: ["container"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div\n class=\"aeb-datepicker\"\n [ngClass]=\"{'aeb-datepicker--disabled': disabled}\"\n clickOutside\n (clickOutside)=\"clickOutsideHandler($event)\"\n #container\n>\n <aeb-form-field\n class=\"aeb-datepicker__field\"\n [ngClass]=\"{'aeb-datepicker__field--onerror': hasError}\"\n >\n <aeb-label class=\"aeb-datepicker__label\">\n {{placeholder}}\n </aeb-label>\n <input\n aebInput\n type=\"text\"\n class=\"aeb-datepicker__input\"\n\n maxlength=\"10\"\n [(ngModel)]=\"inputValue\"\n (change)=\"handleInput($event.target.value)\"\n (click)=\"clickInputHandler()\"\n (input)=\"typeHandler($event)\"\n (keydown)=\"keyDownHandler($event)\"\n />\n <div\n class=\"aeb-datepicker__calendar-icon\"\n (click)=\"handleOpen()\"\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 <rect x=\"5\" y=\"6\" width=\"14\" height=\"14\" rx=\"1\" stroke=\"#27303E\" stroke-width=\"2\"/>\n <rect x=\"4\" y=\"5\" width=\"16\" height=\"4\" rx=\"2\" fill=\"#27303E\"/>\n <rect x=\"9\" y=\"3\" width=\"3\" height=\"2\" rx=\"1\" transform=\"rotate(90 9 3)\" fill=\"#27303E\"/>\n <rect x=\"17\" y=\"3\" width=\"3\" height=\"2\" rx=\"1\" transform=\"rotate(90 17 3)\" fill=\"#27303E\"/>\n </svg>\n </div>\n </aeb-form-field>\n <aeb-datepicker-core\n class=\"aeb-datepicker-core\"\n [ngClass]=\"{'aeb-datepicker-core--disabled': !isOpen}\"\n [date]=\"date\"\n [minDate]=\"minDate\"\n [maxDate]=\"maxDate\"\n [excludedDates]=\"excludedDates\"\n [minYear]=\"minYear\"\n [maxYear]=\"maxYear\"\n (onDateChange)=\"handleDateChange($event)\"\n [align]=\"align\"\n [withBackground]=\"withBackground\"\n [withoutDays]=\"withoutDays\"\n (woDaysMonth)=\"woDaysMonthSet($event)\"\n (woDaysYear)=\"woDaysYearSet($event)\"\n (woDaysMonthSubInc)=\"woMonthIncSub($event)\"\n [style]=\"fixedPosition\"\n #core\n >\n </aeb-datepicker-core>\n</div>", styles: [".aeb-datepicker{width:100%;position:relative;color:var(--darkblue)}.aeb-datepicker--disabled{opacity:.7;pointer-events:none}.aeb-datepicker__field{position:relative}.aeb-datepicker__field--onerror .aeb-datepicker__input{border:2px solid var(--red)!important;color:var(--red)!important}.aeb-datepicker__field--onerror .aeb-datepicker__label{color:var(--red)}.aeb-datepicker__input{padding-right:35px!important}.aeb-datepicker__calendar-icon{cursor:pointer;position:absolute;top:16px;right:12px;z-index:100}.aeb-datepicker-core{position:fixed}.aeb-datepicker-core--disabled{opacity:0;pointer-events:none}\n"], components: [{ type: FormFieldComponent, selector: "aeb-form-field", inputs: ["center", "onError", "cssMod"] }, { type: DatepickerCoreComponent, selector: "aeb-datepicker-core", inputs: ["date", "minDate", "maxDate", "excludedDates", "minYear", "maxYear", "withBackground", "align", "withoutDays"], outputs: ["onDateChange", "woDaysMonth", "woDaysYear", "woDaysMonthSubInc"] }], directives: [{ type: ClickOutsideDirective, selector: "[clickOutside]", outputs: ["clickOutside"] }, { type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: LabelDirective, selector: "aeb-label" }, { type: InputDirective, selector: "input[aebInput]", inputs: ["value"] }, { type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i1$1.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], encapsulation: i0.ViewEncapsulation.None });
3185
+ ], viewQueries: [{ propertyName: "core", first: true, predicate: ["core"], descendants: true }, { propertyName: "input", first: true, predicate: ["input"], descendants: true }, { propertyName: "container", first: true, predicate: ["container"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div\n class=\"aeb-datepicker\"\n [ngClass]=\"{ 'aeb-datepicker--disabled': disabled }\"\n clickOutside\n (clickOutside)=\"clickOutsideHandler($event)\"\n #container\n>\n <aeb-form-field\n class=\"aeb-datepicker__field\"\n [ngClass]=\"{ 'aeb-datepicker__field--onerror': hasError }\"\n >\n <aeb-label class=\"aeb-datepicker__label\">\n {{ placeholder }}\n </aeb-label>\n <input\n aebInput\n type=\"text\"\n class=\"aeb-datepicker__input\"\n maxlength=\"10\"\n [(ngModel)]=\"inputValue\"\n (change)=\"handleInput($event.target.value)\"\n (click)=\"clickInputHandler()\"\n (input)=\"typeHandler($event)\"\n (keydown)=\"keyDownHandler($event)\"\n #input\n />\n <div class=\"aeb-datepicker__calendar-icon\" (click)=\"handleOpen()\">\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 <rect\n x=\"5\"\n y=\"6\"\n width=\"14\"\n height=\"14\"\n rx=\"1\"\n stroke=\"#27303E\"\n stroke-width=\"2\"\n />\n <rect x=\"4\" y=\"5\" width=\"16\" height=\"4\" rx=\"2\" fill=\"#27303E\" />\n <rect\n x=\"9\"\n y=\"3\"\n width=\"3\"\n height=\"2\"\n rx=\"1\"\n transform=\"rotate(90 9 3)\"\n fill=\"#27303E\"\n />\n <rect\n x=\"17\"\n y=\"3\"\n width=\"3\"\n height=\"2\"\n rx=\"1\"\n transform=\"rotate(90 17 3)\"\n fill=\"#27303E\"\n />\n </svg>\n </div>\n </aeb-form-field>\n <aeb-datepicker-core\n class=\"aeb-datepicker-core\"\n [ngClass]=\"{ 'aeb-datepicker-core--disabled': !isOpen }\"\n [date]=\"date\"\n [minDate]=\"minDate\"\n [maxDate]=\"maxDate\"\n [excludedDates]=\"excludedDates\"\n [minYear]=\"minYear\"\n [maxYear]=\"maxYear\"\n (onDateChange)=\"handleDateChange($event)\"\n [align]=\"align\"\n [withBackground]=\"withBackground\"\n [withoutDays]=\"withoutDays\"\n (woDaysMonth)=\"woDaysMonthSet($event)\"\n (woDaysYear)=\"woDaysYearSet($event)\"\n (woDaysMonthSubInc)=\"woMonthIncSub($event)\"\n [style]=\"fixedPosition\"\n #core\n >\n </aeb-datepicker-core>\n</div>\n", styles: [".aeb-datepicker{width:100%;position:relative;color:var(--darkblue)}.aeb-datepicker--disabled{opacity:.7;pointer-events:none}.aeb-datepicker__field{position:relative}.aeb-datepicker__field--onerror .aeb-datepicker__input{border:2px solid var(--red)!important;color:var(--red)!important}.aeb-datepicker__field--onerror .aeb-datepicker__label{color:var(--red)}.aeb-datepicker__input{padding-right:35px!important}.aeb-datepicker__calendar-icon{cursor:pointer;position:absolute;top:16px;right:12px;z-index:100}.aeb-datepicker-core{position:fixed}.aeb-datepicker-core--disabled{opacity:0;pointer-events:none}\n"], components: [{ type: FormFieldComponent, selector: "aeb-form-field", inputs: ["center", "onError", "cssMod"] }, { type: DatepickerCoreComponent, selector: "aeb-datepicker-core", inputs: ["date", "minDate", "maxDate", "excludedDates", "minYear", "maxYear", "withBackground", "align", "withoutDays"], outputs: ["onDateChange", "woDaysMonth", "woDaysYear", "woDaysMonthSubInc"] }], directives: [{ type: ClickOutsideDirective, selector: "[clickOutside]", outputs: ["clickOutside"] }, { type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: LabelDirective, selector: "aeb-label" }, { type: InputDirective, selector: "input[aebInput]", inputs: ["value"] }, { type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i1$1.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], encapsulation: i0.ViewEncapsulation.None });
3181
3186
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: DatepickerComponent, decorators: [{
3182
3187
  type: Component,
3183
3188
  args: [{ selector: 'aeb-datepicker', encapsulation: ViewEncapsulation.None, providers: [
@@ -3186,7 +3191,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
3186
3191
  useExisting: forwardRef(() => DatepickerComponent),
3187
3192
  multi: true
3188
3193
  }
3189
- ], template: "<div\n class=\"aeb-datepicker\"\n [ngClass]=\"{'aeb-datepicker--disabled': disabled}\"\n clickOutside\n (clickOutside)=\"clickOutsideHandler($event)\"\n #container\n>\n <aeb-form-field\n class=\"aeb-datepicker__field\"\n [ngClass]=\"{'aeb-datepicker__field--onerror': hasError}\"\n >\n <aeb-label class=\"aeb-datepicker__label\">\n {{placeholder}}\n </aeb-label>\n <input\n aebInput\n type=\"text\"\n class=\"aeb-datepicker__input\"\n\n maxlength=\"10\"\n [(ngModel)]=\"inputValue\"\n (change)=\"handleInput($event.target.value)\"\n (click)=\"clickInputHandler()\"\n (input)=\"typeHandler($event)\"\n (keydown)=\"keyDownHandler($event)\"\n />\n <div\n class=\"aeb-datepicker__calendar-icon\"\n (click)=\"handleOpen()\"\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 <rect x=\"5\" y=\"6\" width=\"14\" height=\"14\" rx=\"1\" stroke=\"#27303E\" stroke-width=\"2\"/>\n <rect x=\"4\" y=\"5\" width=\"16\" height=\"4\" rx=\"2\" fill=\"#27303E\"/>\n <rect x=\"9\" y=\"3\" width=\"3\" height=\"2\" rx=\"1\" transform=\"rotate(90 9 3)\" fill=\"#27303E\"/>\n <rect x=\"17\" y=\"3\" width=\"3\" height=\"2\" rx=\"1\" transform=\"rotate(90 17 3)\" fill=\"#27303E\"/>\n </svg>\n </div>\n </aeb-form-field>\n <aeb-datepicker-core\n class=\"aeb-datepicker-core\"\n [ngClass]=\"{'aeb-datepicker-core--disabled': !isOpen}\"\n [date]=\"date\"\n [minDate]=\"minDate\"\n [maxDate]=\"maxDate\"\n [excludedDates]=\"excludedDates\"\n [minYear]=\"minYear\"\n [maxYear]=\"maxYear\"\n (onDateChange)=\"handleDateChange($event)\"\n [align]=\"align\"\n [withBackground]=\"withBackground\"\n [withoutDays]=\"withoutDays\"\n (woDaysMonth)=\"woDaysMonthSet($event)\"\n (woDaysYear)=\"woDaysYearSet($event)\"\n (woDaysMonthSubInc)=\"woMonthIncSub($event)\"\n [style]=\"fixedPosition\"\n #core\n >\n </aeb-datepicker-core>\n</div>", styles: [".aeb-datepicker{width:100%;position:relative;color:var(--darkblue)}.aeb-datepicker--disabled{opacity:.7;pointer-events:none}.aeb-datepicker__field{position:relative}.aeb-datepicker__field--onerror .aeb-datepicker__input{border:2px solid var(--red)!important;color:var(--red)!important}.aeb-datepicker__field--onerror .aeb-datepicker__label{color:var(--red)}.aeb-datepicker__input{padding-right:35px!important}.aeb-datepicker__calendar-icon{cursor:pointer;position:absolute;top:16px;right:12px;z-index:100}.aeb-datepicker-core{position:fixed}.aeb-datepicker-core--disabled{opacity:0;pointer-events:none}\n"] }]
3194
+ ], template: "<div\n class=\"aeb-datepicker\"\n [ngClass]=\"{ 'aeb-datepicker--disabled': disabled }\"\n clickOutside\n (clickOutside)=\"clickOutsideHandler($event)\"\n #container\n>\n <aeb-form-field\n class=\"aeb-datepicker__field\"\n [ngClass]=\"{ 'aeb-datepicker__field--onerror': hasError }\"\n >\n <aeb-label class=\"aeb-datepicker__label\">\n {{ placeholder }}\n </aeb-label>\n <input\n aebInput\n type=\"text\"\n class=\"aeb-datepicker__input\"\n maxlength=\"10\"\n [(ngModel)]=\"inputValue\"\n (change)=\"handleInput($event.target.value)\"\n (click)=\"clickInputHandler()\"\n (input)=\"typeHandler($event)\"\n (keydown)=\"keyDownHandler($event)\"\n #input\n />\n <div class=\"aeb-datepicker__calendar-icon\" (click)=\"handleOpen()\">\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 <rect\n x=\"5\"\n y=\"6\"\n width=\"14\"\n height=\"14\"\n rx=\"1\"\n stroke=\"#27303E\"\n stroke-width=\"2\"\n />\n <rect x=\"4\" y=\"5\" width=\"16\" height=\"4\" rx=\"2\" fill=\"#27303E\" />\n <rect\n x=\"9\"\n y=\"3\"\n width=\"3\"\n height=\"2\"\n rx=\"1\"\n transform=\"rotate(90 9 3)\"\n fill=\"#27303E\"\n />\n <rect\n x=\"17\"\n y=\"3\"\n width=\"3\"\n height=\"2\"\n rx=\"1\"\n transform=\"rotate(90 17 3)\"\n fill=\"#27303E\"\n />\n </svg>\n </div>\n </aeb-form-field>\n <aeb-datepicker-core\n class=\"aeb-datepicker-core\"\n [ngClass]=\"{ 'aeb-datepicker-core--disabled': !isOpen }\"\n [date]=\"date\"\n [minDate]=\"minDate\"\n [maxDate]=\"maxDate\"\n [excludedDates]=\"excludedDates\"\n [minYear]=\"minYear\"\n [maxYear]=\"maxYear\"\n (onDateChange)=\"handleDateChange($event)\"\n [align]=\"align\"\n [withBackground]=\"withBackground\"\n [withoutDays]=\"withoutDays\"\n (woDaysMonth)=\"woDaysMonthSet($event)\"\n (woDaysYear)=\"woDaysYearSet($event)\"\n (woDaysMonthSubInc)=\"woMonthIncSub($event)\"\n [style]=\"fixedPosition\"\n #core\n >\n </aeb-datepicker-core>\n</div>\n", styles: [".aeb-datepicker{width:100%;position:relative;color:var(--darkblue)}.aeb-datepicker--disabled{opacity:.7;pointer-events:none}.aeb-datepicker__field{position:relative}.aeb-datepicker__field--onerror .aeb-datepicker__input{border:2px solid var(--red)!important;color:var(--red)!important}.aeb-datepicker__field--onerror .aeb-datepicker__label{color:var(--red)}.aeb-datepicker__input{padding-right:35px!important}.aeb-datepicker__calendar-icon{cursor:pointer;position:absolute;top:16px;right:12px;z-index:100}.aeb-datepicker-core{position:fixed}.aeb-datepicker-core--disabled{opacity:0;pointer-events:none}\n"] }]
3190
3195
  }], ctorParameters: function () { return [{ type: DatepickerUtilsService }, { type: MaskUtilsService }]; }, propDecorators: { date: [{
3191
3196
  type: Input,
3192
3197
  args: ['date']
@@ -3679,7 +3684,7 @@ const breakPoints = {
3679
3684
  700: 3,
3680
3685
  600: 2,
3681
3686
  };
3682
- const defaultAbountOptions = [
3687
+ const defaultAmountOptions = [
3683
3688
  {
3684
3689
  value: 10,
3685
3690
  label: 'По 10 на стр.',
@@ -3694,19 +3699,35 @@ const defaultAbountOptions = [
3694
3699
  },
3695
3700
  ];
3696
3701
  class PaginationComponent {
3697
- constructor(cdr) {
3702
+ constructor(cdr, element) {
3698
3703
  this.cdr = cdr;
3704
+ this.element = element;
3699
3705
  this.pageSelect = new EventEmitter();
3700
3706
  this.amountChange = new EventEmitter();
3701
3707
  this.total = 1500;
3702
3708
  this.currentPage = 1;
3703
- this.amountOptions = defaultAbountOptions;
3709
+ this.amountOptions = defaultAmountOptions;
3704
3710
  this.adaptiveBase = 13;
3705
3711
  }
3712
+ /**
3713
+ * Результатом работы являются массивы левой, средней и правой частей пагинации
3714
+ * @param firstPage текущая страница
3715
+ */
3706
3716
  renderPages(firstPage) {
3707
3717
  this.middle = [...new Array(this.adaptiveBase)]
3708
3718
  .map((_, i) => {
3709
- const page = firstPage + i;
3719
+ let page = i;
3720
+ /**
3721
+ * если текущая страница больше adaptiveBase, то добавляем к page значение adaptiveBase + 1,
3722
+ * тогда значения в middle будут лежать в диапазоне [adaptiveBase + 1: adaptiveBase * 2],
3723
+ * затем добавляем смещение (offset), для случая когда значение текущей страницы лежит за пределами диапазона
3724
+ */
3725
+ if (firstPage > this.adaptiveBase) {
3726
+ const offset = this.adaptiveBase * Math.floor((firstPage - (this.adaptiveBase + 1)) / this.adaptiveBase);
3727
+ page += this.adaptiveBase + 1 + offset;
3728
+ }
3729
+ else
3730
+ page += 1;
3710
3731
  return page <= this.total ? page : null;
3711
3732
  })
3712
3733
  .filter((item) => !!item);
@@ -3762,24 +3783,28 @@ class PaginationComponent {
3762
3783
  this.amountChange.emit(amount);
3763
3784
  }
3764
3785
  ngOnInit() {
3786
+ const parentNode = this.element.nativeElement.parentElement;
3765
3787
  this.currentPage = parseInt(this.currentPage.toString(), 10);
3766
3788
  this.adaptiveBase = this.adaptive ? this.adaptive : this.adaptiveBase;
3767
- if (window.innerWidth <= 600) {
3789
+ if (window.innerWidth <= 600 || parentNode.clientWidth <= 600) {
3768
3790
  this.adaptiveBase = 2;
3769
3791
  }
3770
- else if (window.innerWidth <= 700) {
3792
+ else if (window.innerWidth <= 700 || parentNode.clientWidth <= 700) {
3771
3793
  this.adaptiveBase = 3;
3772
3794
  }
3773
- else if (window.innerWidth <= 1150) {
3795
+ else if (window.innerWidth <= 1150 || parentNode.clientWidth <= 1150) {
3774
3796
  this.adaptiveBase = 5;
3775
3797
  }
3776
3798
  window.addEventListener('resize', () => {
3777
- const adaptiveStep = +(window.innerWidth / 50).toFixed() * 50;
3778
- if (breakPoints[adaptiveStep]) {
3779
- this.adaptiveBase = breakPoints[adaptiveStep];
3799
+ const adaptiveStepWindow = +(window.innerWidth / 50).toFixed() * 50;
3800
+ const adaptiveStepParent = (+(parentNode.clientWidth / 50).toFixed() * 50) || 0;
3801
+ if (breakPoints[adaptiveStepWindow] || breakPoints[adaptiveStepParent]) {
3802
+ this.adaptiveBase = breakPoints[adaptiveStepWindow];
3803
+ if (breakPoints[adaptiveStepParent])
3804
+ this.adaptiveBase = breakPoints[adaptiveStepParent];
3780
3805
  this.renderPages(this.middle[0]);
3781
3806
  }
3782
- else if (window.innerWidth > 1150) {
3807
+ else if (window.innerWidth > 1150 && parentNode.clientWidth > 1150) {
3783
3808
  this.adaptiveBase = this.adaptive || 13;
3784
3809
  this.renderPages(this.middle[0]);
3785
3810
  }
@@ -3805,12 +3830,12 @@ class PaginationComponent {
3805
3830
  }
3806
3831
  }
3807
3832
  }
3808
- PaginationComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PaginationComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
3833
+ PaginationComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PaginationComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
3809
3834
  PaginationComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: PaginationComponent, selector: "aeb-pagination", inputs: { total: ["totalPages", "total"], currentPage: ["page", "currentPage"], amount: "amount", amountOptions: "amountOptions", adaptive: "adaptive" }, outputs: { pageSelect: "pageSelect", amountChange: "amountChange" }, viewQueries: [{ propertyName: "amountSelect", first: true, predicate: ["amountSelect"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"aeb-pagination\">\n <div\n class=\"aeb-pagination__button\"\n (click)=\"prevPageHandler()\"\n [ngClass]=\"{\n 'aeb-pagination__button--disable': currentPage === 1\n }\"\n >\n <div class=\"aeb-pagination__arrow-icon aeb-pagination__arrow-icon--left\">\n <svg\n width=\"6\"\n height=\"10\"\n viewBox=\"0 0 6 10\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M1 9L4.92929 5.07071C4.96834 5.03166 4.96834 4.96834 4.92929 4.92929L1 1\"\n stroke=\"#2F88F0\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n />\n </svg>\n </div>\n <span class=\"aeb-pagination__button-label\">\n \u041D\u0430\u0437\u0430\u0434\n </span>\n </div>\n <div class=\"aeb-pagination__block\">\n <div\n class=\"aeb-pagination__page\"\n *ngFor=\"let page of head\"\n (click)=\"headPageHandler(page)\"\n >\n {{ page }}\n </div>\n\n <div class=\"aeb-pagination__breaker\" *ngIf=\"head.length\">\n ...\n </div>\n\n <div\n class=\"aeb-pagination__page\"\n *ngFor=\"let page of middle\"\n [ngClass]=\"{\n 'aeb-pagination__page--active': currentPage === page\n }\"\n (click)=\"middlePageHandler(page)\"\n >\n {{ page }}\n </div>\n\n <div class=\"aeb-pagination__breaker\" *ngIf=\"tail.length\">\n ...\n </div>\n\n <div\n class=\"aeb-pagination__page\"\n *ngFor=\"let page of tail\"\n (click)=\"tailPageHandler(page)\"\n >\n {{ page }}\n </div>\n </div>\n <div class=\"aeb-pagination__block\">\n <div class=\"aeb-pagination__amount\">\n <aeb-select\n (change)=\"amountChangeHandler($event)\"\n #amountSelect\n [direction]=\"'top'\"\n >\n <aeb-option *ngFor=\"let option of amountOptions\" [value]=\"option.value\">\n {{ option.label }}\n </aeb-option>\n </aeb-select>\n </div>\n\n <div class=\"aeb-pagination__block\">\n <div\n class=\"aeb-pagination__button aeb-pagination__button--right\"\n (click)=\"nextPageHandler()\"\n [ngClass]=\"{\n 'aeb-pagination__button--disable': currentPage === total\n }\"\n >\n <span class=\"aeb-pagination__button-label\">\n \u0414\u0430\u043B\u0435\u0435\n </span>\n <div\n class=\"aeb-pagination__arrow-icon aeb-pagination__arrow-icon--right\"\n >\n <svg\n width=\"6\"\n height=\"10\"\n viewBox=\"0 0 6 10\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M1 9L4.92929 5.07071C4.96834 5.03166 4.96834 4.96834 4.92929 4.92929L1 1\"\n stroke=\"#2F88F0\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n />\n </svg>\n </div>\n </div>\n </div>\n </div>\n</div>\n", styles: [".aeb-pagination{display:inline-flex;width:100%;align-items:center;justify-content:space-between;position:relative;color:var(--darkblue)}.aeb-pagination__button{width:133px;display:flex;align-items:center;background-color:var(--white);padding:8px 24px;border-radius:10px;color:var(--blue);box-sizing:border-box;border:2px solid var(--blue);cursor:pointer;-webkit-user-select:none;user-select:none}.aeb-pagination__button--right{margin-left:27px;padding-left:24px}.aeb-pagination__button--disable{border:2px solid var(--gray-primary);color:var(--gray-primary);cursor:unset}.aeb-pagination__button--disable .aeb-pagination__arrow-icon svg path{stroke:var(--gray-primary)}@media screen and (max-width: 1150px){.aeb-pagination__button{width:100px;padding:6px 12px;font-size:14px}.aeb-pagination__button--right{margin-left:13px}}@media screen and (max-width: 600px){.aeb-pagination__button{width:unset;padding:2px 8px;justify-content:center}.aeb-pagination__button--right{margin-left:10px}}.aeb-pagination__arrow-icon{margin-right:18px;position:relative;bottom:1px}.aeb-pagination__arrow-icon--left{transform:scaleX(-1)}.aeb-pagination__arrow-icon--right{margin-left:18px;margin-right:0}@media screen and (max-width: 1150px){.aeb-pagination__arrow-icon{bottom:0}}@media screen and (max-width: 600px){.aeb-pagination__arrow-icon,.aeb-pagination__arrow-icon--right{margin:0;top:1px}}.aeb-pagination__page{color:var(--blue);margin-left:27px;cursor:pointer;-webkit-user-select:none;user-select:none}.aeb-pagination__page--active{color:var(--darkblue)}@media screen and (max-width: 1150px){.aeb-pagination__page{font-size:14px;margin-left:13px}}@media screen and (max-width: 600px){.aeb-pagination__page{font-size:12px;margin-left:10px}}.aeb-pagination__breaker{color:var(--blue);margin-left:27px;-webkit-user-select:none;user-select:none}@media screen and (max-width: 1150px){.aeb-pagination__breaker{margin-left:13px}}@media screen and (max-width: 600px){.aeb-pagination__breaker{margin-left:10px}}@media screen and (max-width: 600px){.aeb-pagination__button-label{display:none}}.aeb-pagination__block{display:inline-flex;align-items:center}.aeb-pagination__amount{width:168px;height:44px;margin-left:27px;position:relative;top:3px}.aeb-pagination__amount .aeb-dropdown-selected-item{height:39px!important}.aeb-pagination__amount .aeb-dropdown-selected-item.open{background:var(--white)!important}.aeb-pagination__amount .aeb-dropdown-icon{top:10px!important}.aeb-pagination__amount .aeb-dropdown-item{padding:8px 16px!important}.aeb-pagination__amount .aeb-dropdown-selected-item{background:transparent!important;color:var(--darkblue)}@media screen and (max-width: 1150px){.aeb-pagination__amount{position:absolute;top:calc(100% + 18px);left:0;margin:0}}\n"], components: [{ type: SelectComponent, selector: "aeb-select", inputs: ["hasError", "disabled", "direction"], outputs: ["change"] }, { type: OptionComponent, selector: "aeb-option", inputs: ["value", "label"], outputs: ["setValue"] }], directives: [{ type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], encapsulation: i0.ViewEncapsulation.None });
3810
3835
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PaginationComponent, decorators: [{
3811
3836
  type: Component,
3812
3837
  args: [{ selector: 'aeb-pagination', encapsulation: ViewEncapsulation.None, template: "<div class=\"aeb-pagination\">\n <div\n class=\"aeb-pagination__button\"\n (click)=\"prevPageHandler()\"\n [ngClass]=\"{\n 'aeb-pagination__button--disable': currentPage === 1\n }\"\n >\n <div class=\"aeb-pagination__arrow-icon aeb-pagination__arrow-icon--left\">\n <svg\n width=\"6\"\n height=\"10\"\n viewBox=\"0 0 6 10\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M1 9L4.92929 5.07071C4.96834 5.03166 4.96834 4.96834 4.92929 4.92929L1 1\"\n stroke=\"#2F88F0\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n />\n </svg>\n </div>\n <span class=\"aeb-pagination__button-label\">\n \u041D\u0430\u0437\u0430\u0434\n </span>\n </div>\n <div class=\"aeb-pagination__block\">\n <div\n class=\"aeb-pagination__page\"\n *ngFor=\"let page of head\"\n (click)=\"headPageHandler(page)\"\n >\n {{ page }}\n </div>\n\n <div class=\"aeb-pagination__breaker\" *ngIf=\"head.length\">\n ...\n </div>\n\n <div\n class=\"aeb-pagination__page\"\n *ngFor=\"let page of middle\"\n [ngClass]=\"{\n 'aeb-pagination__page--active': currentPage === page\n }\"\n (click)=\"middlePageHandler(page)\"\n >\n {{ page }}\n </div>\n\n <div class=\"aeb-pagination__breaker\" *ngIf=\"tail.length\">\n ...\n </div>\n\n <div\n class=\"aeb-pagination__page\"\n *ngFor=\"let page of tail\"\n (click)=\"tailPageHandler(page)\"\n >\n {{ page }}\n </div>\n </div>\n <div class=\"aeb-pagination__block\">\n <div class=\"aeb-pagination__amount\">\n <aeb-select\n (change)=\"amountChangeHandler($event)\"\n #amountSelect\n [direction]=\"'top'\"\n >\n <aeb-option *ngFor=\"let option of amountOptions\" [value]=\"option.value\">\n {{ option.label }}\n </aeb-option>\n </aeb-select>\n </div>\n\n <div class=\"aeb-pagination__block\">\n <div\n class=\"aeb-pagination__button aeb-pagination__button--right\"\n (click)=\"nextPageHandler()\"\n [ngClass]=\"{\n 'aeb-pagination__button--disable': currentPage === total\n }\"\n >\n <span class=\"aeb-pagination__button-label\">\n \u0414\u0430\u043B\u0435\u0435\n </span>\n <div\n class=\"aeb-pagination__arrow-icon aeb-pagination__arrow-icon--right\"\n >\n <svg\n width=\"6\"\n height=\"10\"\n viewBox=\"0 0 6 10\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M1 9L4.92929 5.07071C4.96834 5.03166 4.96834 4.96834 4.92929 4.92929L1 1\"\n stroke=\"#2F88F0\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n />\n </svg>\n </div>\n </div>\n </div>\n </div>\n</div>\n", styles: [".aeb-pagination{display:inline-flex;width:100%;align-items:center;justify-content:space-between;position:relative;color:var(--darkblue)}.aeb-pagination__button{width:133px;display:flex;align-items:center;background-color:var(--white);padding:8px 24px;border-radius:10px;color:var(--blue);box-sizing:border-box;border:2px solid var(--blue);cursor:pointer;-webkit-user-select:none;user-select:none}.aeb-pagination__button--right{margin-left:27px;padding-left:24px}.aeb-pagination__button--disable{border:2px solid var(--gray-primary);color:var(--gray-primary);cursor:unset}.aeb-pagination__button--disable .aeb-pagination__arrow-icon svg path{stroke:var(--gray-primary)}@media screen and (max-width: 1150px){.aeb-pagination__button{width:100px;padding:6px 12px;font-size:14px}.aeb-pagination__button--right{margin-left:13px}}@media screen and (max-width: 600px){.aeb-pagination__button{width:unset;padding:2px 8px;justify-content:center}.aeb-pagination__button--right{margin-left:10px}}.aeb-pagination__arrow-icon{margin-right:18px;position:relative;bottom:1px}.aeb-pagination__arrow-icon--left{transform:scaleX(-1)}.aeb-pagination__arrow-icon--right{margin-left:18px;margin-right:0}@media screen and (max-width: 1150px){.aeb-pagination__arrow-icon{bottom:0}}@media screen and (max-width: 600px){.aeb-pagination__arrow-icon,.aeb-pagination__arrow-icon--right{margin:0;top:1px}}.aeb-pagination__page{color:var(--blue);margin-left:27px;cursor:pointer;-webkit-user-select:none;user-select:none}.aeb-pagination__page--active{color:var(--darkblue)}@media screen and (max-width: 1150px){.aeb-pagination__page{font-size:14px;margin-left:13px}}@media screen and (max-width: 600px){.aeb-pagination__page{font-size:12px;margin-left:10px}}.aeb-pagination__breaker{color:var(--blue);margin-left:27px;-webkit-user-select:none;user-select:none}@media screen and (max-width: 1150px){.aeb-pagination__breaker{margin-left:13px}}@media screen and (max-width: 600px){.aeb-pagination__breaker{margin-left:10px}}@media screen and (max-width: 600px){.aeb-pagination__button-label{display:none}}.aeb-pagination__block{display:inline-flex;align-items:center}.aeb-pagination__amount{width:168px;height:44px;margin-left:27px;position:relative;top:3px}.aeb-pagination__amount .aeb-dropdown-selected-item{height:39px!important}.aeb-pagination__amount .aeb-dropdown-selected-item.open{background:var(--white)!important}.aeb-pagination__amount .aeb-dropdown-icon{top:10px!important}.aeb-pagination__amount .aeb-dropdown-item{padding:8px 16px!important}.aeb-pagination__amount .aeb-dropdown-selected-item{background:transparent!important;color:var(--darkblue)}@media screen and (max-width: 1150px){.aeb-pagination__amount{position:absolute;top:calc(100% + 18px);left:0;margin:0}}\n"] }]
3813
- }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { pageSelect: [{
3838
+ }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }]; }, propDecorators: { pageSelect: [{
3814
3839
  type: Output,
3815
3840
  args: ['pageSelect']
3816
3841
  }], amountChange: [{