aeb-ui-kit 0.0.119 → 0.0.121
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/README.md +24 -24
- package/aeb-ui-kit.d.ts +21 -21
- package/aeb-ui-kit.metadata.json +1 -1
- package/assets/fonts/LICENSE.txt +202 -202
- package/assets/images/arrow_down/arrow_down_blue.svg +3 -3
- package/assets/images/arrow_down/arrow_down_gray.svg +3 -3
- package/assets/images/arrow_down/arrow_down_turquoise.svg +3 -3
- package/assets/images/arrow_down/arrow_down_white.svg +3 -3
- package/assets/images/attach/passport_primary.svg +13 -13
- package/assets/images/attach/passport_secondary.svg +15 -15
- package/assets/images/clip.svg +3 -3
- package/assets/images/clip_blue.svg +3 -3
- package/assets/images/close.svg +4 -4
- package/assets/images/icon-add.svg +5 -5
- package/assets/images/icon-back.svg +3 -3
- package/assets/images/icon-blocked.svg +5 -5
- package/assets/images/icon-checked.svg +3 -3
- package/assets/images/icon-download.svg +4 -4
- package/assets/images/icon-edit.svg +5 -5
- package/assets/images/icon-failure.svg +5 -5
- package/assets/images/icon-more.svg +5 -5
- package/assets/images/icon-rework.svg +5 -5
- package/assets/images/icon-spinner.svg +9 -9
- package/assets/images/icon-subtract.svg +4 -4
- package/assets/images/icon-success.svg +4 -4
- package/assets/images/icon-time.svg +5 -5
- package/assets/images/icon-trash.svg +6 -6
- package/assets/images/info.svg +5 -5
- package/assets/images/nt-icon.svg +6 -6
- package/assets/images/visa/icon_failure.svg +5 -5
- package/assets/images/visa/icon_time.svg +5 -5
- package/assets/images/visa/success_icon.svg +4 -4
- package/bundles/aeb-ui-kit.umd.js +4524 -4545
- package/bundles/aeb-ui-kit.umd.js.map +1 -1
- package/bundles/aeb-ui-kit.umd.min.js +2 -2
- package/bundles/aeb-ui-kit.umd.min.js.map +1 -1
- package/esm2015/aeb-ui-kit.js +21 -21
- package/esm2015/index.js +2 -2
- package/esm2015/lib/accordion/accordion.component.js +35 -35
- package/esm2015/lib/accordion/accordion.module.js +15 -15
- package/esm2015/lib/action-bar/action-bar.component.js +20 -20
- package/esm2015/lib/action-bar/action-bar.module.js +15 -15
- package/esm2015/lib/aeb-ui-kit.module.js +119 -119
- package/esm2015/lib/button/button.component.js +31 -31
- package/esm2015/lib/button/button.module.js +13 -13
- package/esm2015/lib/checkbox/checkbox.component.js +97 -97
- package/esm2015/lib/checkbox/checkbox.module.js +13 -13
- package/esm2015/lib/click-outside/click-outside.directive.js +44 -44
- package/esm2015/lib/click-outside/click-outside.module.js +13 -13
- package/esm2015/lib/comment/comment.component.js +53 -53
- package/esm2015/lib/comment/comment.module.js +25 -25
- package/esm2015/lib/credit-item-card/credit-item-card.component.js +26 -26
- package/esm2015/lib/credit-item-card/credit-item-card.module.js +17 -17
- package/esm2015/lib/credit-item-card/models/IProductItemCard.js +2 -2
- package/esm2015/lib/datepicker/datepicker-core/datepicker-core.component.js +135 -135
- package/esm2015/lib/datepicker/datepicker-month/datepicker-month.component.js +52 -52
- package/esm2015/lib/datepicker/datepicker-tiles/datepicker-tiles.component.js +81 -81
- package/esm2015/lib/datepicker/datepicker.component.js +337 -337
- package/esm2015/lib/datepicker/datepicker.module.js +43 -43
- package/esm2015/lib/datepicker/pipes/date-to-str.pipe.js +13 -13
- package/esm2015/lib/datepicker/services/datepicker-utils.service.js +149 -149
- package/esm2015/lib/datepicker/services/mask-utils.service.js +61 -61
- package/esm2015/lib/dropdown/dropdown.component.js +91 -91
- package/esm2015/lib/dropdown/dropdown.module.js +14 -14
- package/esm2015/lib/field-slider/directives/numbers-only.directive.js +64 -64
- package/esm2015/lib/field-slider/field-slider.component.js +152 -152
- package/esm2015/lib/field-slider/field-slider.module.js +25 -25
- package/esm2015/lib/field-slider/pipes/replace.pipe.js +15 -15
- package/esm2015/lib/file-attach/directives/drag-and-drop.directive.js +40 -40
- package/esm2015/lib/file-attach/file-attach.component.js +63 -63
- package/esm2015/lib/file-attach/file-attach.module.js +15 -15
- package/esm2015/lib/filter-tags/filter-tag/filter-tag.component.js +27 -27
- package/esm2015/lib/filter-tags/filter-tags.component.js +33 -33
- package/esm2015/lib/filter-tags/filter-tags.module.js +16 -16
- package/esm2015/lib/footer/footer-bottom/footer-bottom.component.js +41 -41
- package/esm2015/lib/footer/footer-menu/footer-menu.component.js +57 -57
- package/esm2015/lib/footer/footer-top/footer-top.component.js +24 -24
- package/esm2015/lib/footer/footer.component.js +22 -22
- package/esm2015/lib/footer/footer.module.js +23 -23
- package/esm2015/lib/form-field/form-field.component.js +73 -73
- package/esm2015/lib/form-field/form-field.module.js +17 -17
- package/esm2015/lib/form-field/icon.directive.js +11 -11
- package/esm2015/lib/form-field/input.directive.js +55 -55
- package/esm2015/lib/form-field/label.directive.js +11 -11
- package/esm2015/lib/form-field/textarea.directive.js +55 -55
- package/esm2015/lib/header/header.component.js +23 -23
- package/esm2015/lib/header/header.module.js +14 -14
- package/esm2015/lib/header/logo.component.js +18 -18
- package/esm2015/lib/heading/breadcrumps/breadcrumps.component.js +26 -26
- package/esm2015/lib/heading/heading.component.js +19 -19
- package/esm2015/lib/heading/heading.module.js +17 -17
- package/esm2015/lib/heading/product-title/product-title.component.js +25 -25
- package/esm2015/lib/label/label.component.js +15 -15
- package/esm2015/lib/label/label.module.js +13 -13
- package/esm2015/lib/new-button/new-button.component.js +51 -51
- package/esm2015/lib/new-button/new-button.module.js +13 -13
- package/esm2015/lib/new-dropdown/new-dropdown.component.js +162 -162
- package/esm2015/lib/new-dropdown/new-dropdown.module.js +21 -21
- package/esm2015/lib/new-notifications/new-notifications.component.js +37 -37
- package/esm2015/lib/new-notifications/new-notifications.module.js +15 -15
- package/esm2015/lib/new-tooltip/new-tooltip.component.js +21 -21
- package/esm2015/lib/new-tooltip/new-tooltip.module.js +20 -20
- package/esm2015/lib/new-tooltip/services/domservice.service.js +44 -44
- package/esm2015/lib/new-tooltip/tooltip.directive.js +146 -146
- package/esm2015/lib/news-card/news-card.component.js +17 -17
- package/esm2015/lib/news-card/news-card.module.js +15 -15
- package/esm2015/lib/notifications/notifications.component.js +24 -24
- package/esm2015/lib/notifications/notifications.module.js +13 -13
- package/esm2015/lib/pagination/pagination.component.js +154 -154
- package/esm2015/lib/pagination/pagination.module.js +19 -19
- package/esm2015/lib/pop-up/pop-up.component.js +25 -25
- package/esm2015/lib/pop-up/pop-up.directive.js +57 -57
- package/esm2015/lib/pop-up/pop-up.module.js +16 -16
- package/esm2015/lib/radio-buttons/radio-buttons.component.js +56 -56
- package/esm2015/lib/radio-buttons/radio-buttons.module.js +15 -15
- package/esm2015/lib/search/highlight.pipe.js +12 -12
- package/esm2015/lib/search/search.component.js +56 -56
- package/esm2015/lib/search/search.module.js +18 -18
- package/esm2015/lib/select/option.component.js +25 -25
- package/esm2015/lib/select/select.component.js +108 -108
- package/esm2015/lib/select/select.module.js +15 -15
- package/esm2015/lib/sidebar/sidebar.component.js +32 -32
- package/esm2015/lib/sidebar/sidebar.module.js +13 -13
- package/esm2015/lib/slider/pipes/replace.pipe.js +15 -15
- package/esm2015/lib/slider/slider.component.js +129 -129
- package/esm2015/lib/slider/slider.module.js +17 -17
- package/esm2015/lib/spinner/spinner.component.js +15 -15
- package/esm2015/lib/spinner/spinner.module.js +13 -13
- package/esm2015/lib/table/table.component.js +27 -27
- package/esm2015/lib/table/table.model.js +2 -2
- package/esm2015/lib/table/table.module.js +14 -14
- package/esm2015/lib/table/table.pipe.js +18 -18
- package/esm2015/lib/tabs/tab.directive.js +18 -18
- package/esm2015/lib/tabs/tabs.component.js +64 -64
- package/esm2015/lib/tabs/tabs.module.js +16 -16
- package/esm2015/lib/tag-tab/tag-tab.component.js +19 -19
- package/esm2015/lib/tag-tab/tag-tab.module.js +13 -13
- package/esm2015/lib/tooltip/tooltip.component.js +29 -29
- package/esm2015/lib/tooltip/tooltip.module.js +13 -13
- package/esm2015/lib/visa/visa-item.component.js +16 -16
- package/esm2015/lib/visa/visa-span.directive.js +26 -26
- package/esm2015/lib/visa/visa.component.js +15 -15
- package/esm2015/lib/visa/visa.module.js +25 -25
- package/esm2015/lib/wizard/wizard-step.component.js +33 -33
- package/esm2015/lib/wizard/wizard.component.js +80 -80
- package/esm2015/lib/wizard/wizard.module.js +14 -14
- package/esm2015/public-api.js +96 -96
- package/fesm2015/aeb-ui-kit.js +3950 -3952
- package/fesm2015/aeb-ui-kit.js.map +1 -1
- package/index.d.ts +1 -1
- package/lib/accordion/accordion.component.d.ts +10 -10
- package/lib/accordion/accordion.module.d.ts +2 -2
- package/lib/action-bar/action-bar.component.d.ts +7 -7
- package/lib/action-bar/action-bar.module.d.ts +2 -2
- package/lib/aeb-ui-kit.module.d.ts +2 -2
- package/lib/button/button.component.d.ts +9 -9
- package/lib/button/button.module.d.ts +2 -2
- package/lib/checkbox/checkbox.component.d.ts +29 -29
- package/lib/checkbox/checkbox.module.d.ts +2 -2
- package/lib/click-outside/click-outside.directive.d.ts +12 -12
- package/lib/click-outside/click-outside.module.d.ts +2 -2
- package/lib/comment/comment.component.d.ts +36 -36
- package/lib/comment/comment.module.d.ts +2 -2
- package/lib/credit-item-card/credit-item-card.component.d.ts +10 -10
- package/lib/credit-item-card/credit-item-card.module.d.ts +2 -2
- package/lib/credit-item-card/models/IProductItemCard.d.ts +16 -16
- package/lib/datepicker/datepicker-core/datepicker-core.component.d.ts +38 -38
- package/lib/datepicker/datepicker-month/datepicker-month.component.d.ts +19 -19
- package/lib/datepicker/datepicker-tiles/datepicker-tiles.component.d.ts +28 -28
- package/lib/datepicker/datepicker.component.d.ts +86 -86
- package/lib/datepicker/datepicker.module.d.ts +4 -4
- package/lib/datepicker/pipes/date-to-str.pipe.d.ts +4 -4
- package/lib/datepicker/services/datepicker-utils.service.d.ts +29 -29
- package/lib/datepicker/services/mask-utils.service.d.ts +7 -7
- package/lib/dropdown/dropdown.component.d.ts +39 -39
- package/lib/dropdown/dropdown.module.d.ts +2 -2
- package/lib/field-slider/directives/numbers-only.directive.d.ts +7 -7
- package/lib/field-slider/field-slider.component.d.ts +31 -31
- package/lib/field-slider/field-slider.module.d.ts +2 -2
- package/lib/field-slider/pipes/replace.pipe.d.ts +4 -4
- package/lib/file-attach/directives/drag-and-drop.directive.d.ts +9 -9
- package/lib/file-attach/file-attach.component.d.ts +25 -25
- package/lib/file-attach/file-attach.module.d.ts +2 -2
- package/lib/filter-tags/filter-tag/filter-tag.component.d.ts +9 -9
- package/lib/filter-tags/filter-tags.component.d.ts +14 -14
- package/lib/filter-tags/filter-tags.module.d.ts +2 -2
- package/lib/footer/footer-bottom/footer-bottom.component.d.ts +13 -13
- package/lib/footer/footer-menu/footer-menu.component.d.ts +13 -13
- package/lib/footer/footer-top/footer-top.component.d.ts +8 -8
- package/lib/footer/footer.component.d.ts +7 -7
- package/lib/footer/footer.module.d.ts +2 -2
- package/lib/form-field/form-field.component.d.ts +16 -16
- package/lib/form-field/form-field.module.d.ts +2 -2
- package/lib/form-field/icon.directive.d.ts +3 -3
- package/lib/form-field/input.directive.d.ts +22 -22
- package/lib/form-field/label.directive.d.ts +3 -3
- package/lib/form-field/textarea.directive.d.ts +22 -22
- package/lib/header/header.component.d.ts +6 -6
- package/lib/header/header.module.d.ts +2 -2
- package/lib/header/logo.component.d.ts +5 -5
- package/lib/heading/breadcrumps/breadcrumps.component.d.ts +8 -8
- package/lib/heading/heading.component.d.ts +6 -6
- package/lib/heading/heading.module.d.ts +2 -2
- package/lib/heading/product-title/product-title.component.d.ts +8 -8
- package/lib/label/label.component.d.ts +5 -5
- package/lib/label/label.module.d.ts +2 -2
- package/lib/new-button/new-button.component.d.ts +38 -38
- package/lib/new-button/new-button.module.d.ts +2 -2
- package/lib/new-dropdown/new-dropdown.component.d.ts +42 -42
- package/lib/new-dropdown/new-dropdown.module.d.ts +2 -2
- package/lib/new-notifications/new-notifications.component.d.ts +19 -19
- package/lib/new-notifications/new-notifications.module.d.ts +2 -2
- package/lib/new-tooltip/new-tooltip.component.d.ts +8 -8
- package/lib/new-tooltip/new-tooltip.module.d.ts +2 -2
- package/lib/new-tooltip/services/domservice.service.d.ts +12 -12
- package/lib/new-tooltip/tooltip.directive.d.ts +47 -47
- package/lib/news-card/news-card.component.d.ts +4 -4
- package/lib/news-card/news-card.module.d.ts +2 -2
- package/lib/notifications/notifications.component.d.ts +12 -12
- package/lib/notifications/notifications.module.d.ts +2 -2
- package/lib/pagination/pagination.component.d.ts +32 -32
- package/lib/pagination/pagination.module.d.ts +2 -2
- package/lib/pop-up/pop-up.component.d.ts +9 -9
- package/lib/pop-up/pop-up.directive.d.ts +12 -12
- package/lib/pop-up/pop-up.module.d.ts +2 -2
- package/lib/radio-buttons/radio-buttons.component.d.ts +23 -23
- package/lib/radio-buttons/radio-buttons.module.d.ts +2 -2
- package/lib/search/highlight.pipe.d.ts +4 -4
- package/lib/search/search.component.d.ts +24 -24
- package/lib/search/search.module.d.ts +2 -2
- package/lib/select/option.component.d.ts +10 -10
- package/lib/select/select.component.d.ts +42 -42
- package/lib/select/select.module.d.ts +2 -2
- package/lib/sidebar/sidebar.component.d.ts +9 -9
- package/lib/sidebar/sidebar.module.d.ts +2 -2
- package/lib/slider/pipes/replace.pipe.d.ts +4 -4
- package/lib/slider/slider.component.d.ts +32 -32
- package/lib/slider/slider.module.d.ts +2 -2
- package/lib/spinner/spinner.component.d.ts +5 -5
- package/lib/spinner/spinner.module.d.ts +2 -2
- package/lib/table/table.component.d.ts +9 -9
- package/lib/table/table.model.d.ts +31 -31
- package/lib/table/table.module.d.ts +2 -2
- package/lib/table/table.pipe.d.ts +4 -4
- package/lib/tabs/tab.directive.d.ts +6 -6
- package/lib/tabs/tabs.component.d.ts +21 -21
- package/lib/tabs/tabs.module.d.ts +2 -2
- package/lib/tag-tab/tag-tab.component.d.ts +4 -4
- package/lib/tag-tab/tag-tab.module.d.ts +2 -2
- package/lib/tooltip/tooltip.component.d.ts +8 -8
- package/lib/tooltip/tooltip.module.d.ts +2 -2
- package/lib/visa/visa-item.component.d.ts +6 -6
- package/lib/visa/visa-span.directive.d.ts +6 -6
- package/lib/visa/visa.component.d.ts +5 -5
- package/lib/visa/visa.module.d.ts +2 -2
- package/lib/wizard/wizard-step.component.d.ts +14 -14
- package/lib/wizard/wizard.component.d.ts +19 -19
- package/lib/wizard/wizard.module.d.ts +2 -2
- package/package.json +1 -1
- package/public-api.d.ts +92 -92
- package/styles.css +22 -22
|
@@ -1,81 +1,81 @@
|
|
|
1
|
-
import { Component, ViewChild, Input, Output, EventEmitter } from '@angular/core';
|
|
2
|
-
import { DatepickerUtilsService } from '../services/datepicker-utils.service';
|
|
3
|
-
export class DatepickerTilesComponent {
|
|
4
|
-
constructor(utils) {
|
|
5
|
-
this.utils = utils;
|
|
6
|
-
this.isMonths = false;
|
|
7
|
-
this.isYears = false;
|
|
8
|
-
this.setYear = new EventEmitter();
|
|
9
|
-
this.setMonth = new EventEmitter();
|
|
10
|
-
this.woDays = false;
|
|
11
|
-
this.months = DatepickerUtilsService.monthsLocal;
|
|
12
|
-
}
|
|
13
|
-
emitMonth(month) {
|
|
14
|
-
this.setMonth.emit(month);
|
|
15
|
-
}
|
|
16
|
-
emitYear(year) {
|
|
17
|
-
this.setYear.emit(year);
|
|
18
|
-
}
|
|
19
|
-
scrollYears() {
|
|
20
|
-
if (this.isMonths)
|
|
21
|
-
return;
|
|
22
|
-
const diff = Math.abs(this.utils.yearsDiff(this.utils.startOfYear(this.date), this.utils.startOfYear(this.maxYear)));
|
|
23
|
-
const yearRowHeight = 54;
|
|
24
|
-
const steps = Math.floor(diff / 3);
|
|
25
|
-
const padding = 6;
|
|
26
|
-
const marginDelta = steps;
|
|
27
|
-
this.container.nativeElement.scrollTop = (yearRowHeight * steps) + marginDelta - padding;
|
|
28
|
-
}
|
|
29
|
-
ngOnInit() {
|
|
30
|
-
this.years = this.utils.genYears(this.minYear, this.maxYear).reverse();
|
|
31
|
-
}
|
|
32
|
-
ngOnChanges(changes) {
|
|
33
|
-
if (changes.isYears && this.container) {
|
|
34
|
-
setTimeout(() => this.scrollYears());
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
isMonthDisabled(month) {
|
|
38
|
-
if (this.woDays) {
|
|
39
|
-
return this.utils.isMinOverlap(this.minDate, new Date(this.year, month))
|
|
40
|
-
|| this.utils.isMaxOverlap(this.maxDate, new Date(this.year, month));
|
|
41
|
-
}
|
|
42
|
-
else {
|
|
43
|
-
return false;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
isYearDisabled(year) {
|
|
47
|
-
if (this.woDays) {
|
|
48
|
-
return this.utils.isMinOverlap(this.minDate, new Date(year, 11, 31))
|
|
49
|
-
|| this.utils.isMaxOverlap(this.maxDate, new Date(year, 0));
|
|
50
|
-
}
|
|
51
|
-
else {
|
|
52
|
-
return false;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
DatepickerTilesComponent.decorators = [
|
|
57
|
-
{ type: Component, args: [{
|
|
58
|
-
selector: 'aeb-datepicker-tiles',
|
|
59
|
-
template: "<div\
|
|
60
|
-
styles: [".aeb-datepicker-tiles{min-width:275px;height:220px;position:relative;overflow:auto;-ms-overflow-style:none;scrollbar-width:none}.aeb-datepicker-tiles::-webkit-scrollbar{display:none}.aeb-datepicker-tiles__scroll{display:flex;flex-wrap:wrap;justify-content:space-between;position:absolute;width:100%}.aeb-datepicker-tiles__tile{width:84px;height:41px;display:flex;justify-content:center;align-items:center;border:1px solid var(--gray-primary);border-radius:4px;font-size:16px;box-sizing:unset!important}.aeb-datepicker-tiles__tile:hover{border:1px solid var(--blue);cursor:pointer}.aeb-datepicker-tiles__tile:not(:nth-last-child(-n+3)){margin-bottom:12px}.aeb-datepicker-tiles__tile--active{border:1px solid var(--blue);background-color:var(--blue);color:#fff}.aeb-datepicker-tiles__tile--disabled{color:var(--gray-primary);cursor:none;pointer-events:none}.aeb-datepicker-tiles__tile--disabled:hover{border:none}"]
|
|
61
|
-
},] }
|
|
62
|
-
];
|
|
63
|
-
DatepickerTilesComponent.ctorParameters = () => [
|
|
64
|
-
{ type: DatepickerUtilsService }
|
|
65
|
-
];
|
|
66
|
-
DatepickerTilesComponent.propDecorators = {
|
|
67
|
-
container: [{ type: ViewChild, args: ['container',] }],
|
|
68
|
-
date: [{ type: Input, args: ['date',] }],
|
|
69
|
-
isMonths: [{ type: Input, args: ['isMonths',] }],
|
|
70
|
-
isYears: [{ type: Input, args: ['isYears',] }],
|
|
71
|
-
year: [{ type: Input, args: ['year',] }],
|
|
72
|
-
setYear: [{ type: Output, args: ['setYear',] }],
|
|
73
|
-
month: [{ type: Input, args: ['month',] }],
|
|
74
|
-
setMonth: [{ type: Output, args: ['setMonth',] }],
|
|
75
|
-
minYear: [{ type: Input, args: ['minYear',] }],
|
|
76
|
-
maxYear: [{ type: Input, args: ['maxYear',] }],
|
|
77
|
-
minDate: [{ type: Input, args: ['minDate',] }],
|
|
78
|
-
maxDate: [{ type: Input, args: ['maxDate',] }],
|
|
79
|
-
woDays: [{ type: Input, args: ['woDays',] }]
|
|
80
|
-
};
|
|
81
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
1
|
+
import { Component, ViewChild, Input, Output, EventEmitter } from '@angular/core';
|
|
2
|
+
import { DatepickerUtilsService } from '../services/datepicker-utils.service';
|
|
3
|
+
export class DatepickerTilesComponent {
|
|
4
|
+
constructor(utils) {
|
|
5
|
+
this.utils = utils;
|
|
6
|
+
this.isMonths = false;
|
|
7
|
+
this.isYears = false;
|
|
8
|
+
this.setYear = new EventEmitter();
|
|
9
|
+
this.setMonth = new EventEmitter();
|
|
10
|
+
this.woDays = false;
|
|
11
|
+
this.months = DatepickerUtilsService.monthsLocal;
|
|
12
|
+
}
|
|
13
|
+
emitMonth(month) {
|
|
14
|
+
this.setMonth.emit(month);
|
|
15
|
+
}
|
|
16
|
+
emitYear(year) {
|
|
17
|
+
this.setYear.emit(year);
|
|
18
|
+
}
|
|
19
|
+
scrollYears() {
|
|
20
|
+
if (this.isMonths)
|
|
21
|
+
return;
|
|
22
|
+
const diff = Math.abs(this.utils.yearsDiff(this.utils.startOfYear(this.date), this.utils.startOfYear(this.maxYear)));
|
|
23
|
+
const yearRowHeight = 54;
|
|
24
|
+
const steps = Math.floor(diff / 3);
|
|
25
|
+
const padding = 6;
|
|
26
|
+
const marginDelta = steps;
|
|
27
|
+
this.container.nativeElement.scrollTop = (yearRowHeight * steps) + marginDelta - padding;
|
|
28
|
+
}
|
|
29
|
+
ngOnInit() {
|
|
30
|
+
this.years = this.utils.genYears(this.minYear, this.maxYear).reverse();
|
|
31
|
+
}
|
|
32
|
+
ngOnChanges(changes) {
|
|
33
|
+
if (changes.isYears && this.container) {
|
|
34
|
+
setTimeout(() => this.scrollYears());
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
isMonthDisabled(month) {
|
|
38
|
+
if (this.woDays) {
|
|
39
|
+
return this.utils.isMinOverlap(this.minDate, new Date(this.year, month))
|
|
40
|
+
|| this.utils.isMaxOverlap(this.maxDate, new Date(this.year, month));
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
return false;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
isYearDisabled(year) {
|
|
47
|
+
if (this.woDays) {
|
|
48
|
+
return this.utils.isMinOverlap(this.minDate, new Date(year, 11, 31))
|
|
49
|
+
|| this.utils.isMaxOverlap(this.maxDate, new Date(year, 0));
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
return false;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
DatepickerTilesComponent.decorators = [
|
|
57
|
+
{ type: Component, args: [{
|
|
58
|
+
selector: 'aeb-datepicker-tiles',
|
|
59
|
+
template: "<div\n class=\"aeb-datepicker-tiles\"\n #container\n>\n <div\n class=\"aeb-datepicker-tiles__scroll\"\n [ngClass]=\"{'aeb-datepicker-tiles__scroll--months': isMonths}\"\n >\n <div\n [style.display]=\"!isMonths ? 'flex' : 'none'\"\n class=\"aeb-datepicker-tiles__tile\"\n *ngFor=\"let yearNum of years\"\n [ngClass]=\"{\n 'aeb-datepicker-tiles__tile--active': yearNum === year,\n 'aeb-datepicker-tiles__tile--disabled': isYearDisabled(yearNum)\n }\"\n (click)=\"emitYear(yearNum)\"\n >\n {{ yearNum }}\n </div>\n <div\n [style.display]=\"isMonths ? 'flex' : 'none'\"\n class=\"aeb-datepicker-tiles__tile\"\n *ngFor=\"let monthNum of months; let i = index\"\n [ngClass]=\"{\n 'aeb-datepicker-tiles__tile--active': i === month,\n 'aeb-datepicker-tiles__tile--disabled': isMonthDisabled(i)\n }\"\n (click)=\"emitMonth(i)\"\n >\n {{ monthNum }}\n </div>\n </div>\n</div>",
|
|
60
|
+
styles: [".aeb-datepicker-tiles{min-width:275px;height:220px;position:relative;overflow:auto;-ms-overflow-style:none;scrollbar-width:none}.aeb-datepicker-tiles::-webkit-scrollbar{display:none}.aeb-datepicker-tiles__scroll{display:flex;flex-wrap:wrap;justify-content:space-between;position:absolute;width:100%}.aeb-datepicker-tiles__tile{width:84px;height:41px;display:flex;justify-content:center;align-items:center;border:1px solid var(--gray-primary);border-radius:4px;font-size:16px;box-sizing:unset!important}.aeb-datepicker-tiles__tile:hover{border:1px solid var(--blue);cursor:pointer}.aeb-datepicker-tiles__tile:not(:nth-last-child(-n+3)){margin-bottom:12px}.aeb-datepicker-tiles__tile--active{border:1px solid var(--blue);background-color:var(--blue);color:#fff}.aeb-datepicker-tiles__tile--disabled{color:var(--gray-primary);cursor:none;pointer-events:none}.aeb-datepicker-tiles__tile--disabled:hover{border:none}"]
|
|
61
|
+
},] }
|
|
62
|
+
];
|
|
63
|
+
DatepickerTilesComponent.ctorParameters = () => [
|
|
64
|
+
{ type: DatepickerUtilsService }
|
|
65
|
+
];
|
|
66
|
+
DatepickerTilesComponent.propDecorators = {
|
|
67
|
+
container: [{ type: ViewChild, args: ['container',] }],
|
|
68
|
+
date: [{ type: Input, args: ['date',] }],
|
|
69
|
+
isMonths: [{ type: Input, args: ['isMonths',] }],
|
|
70
|
+
isYears: [{ type: Input, args: ['isYears',] }],
|
|
71
|
+
year: [{ type: Input, args: ['year',] }],
|
|
72
|
+
setYear: [{ type: Output, args: ['setYear',] }],
|
|
73
|
+
month: [{ type: Input, args: ['month',] }],
|
|
74
|
+
setMonth: [{ type: Output, args: ['setMonth',] }],
|
|
75
|
+
minYear: [{ type: Input, args: ['minYear',] }],
|
|
76
|
+
maxYear: [{ type: Input, args: ['maxYear',] }],
|
|
77
|
+
minDate: [{ type: Input, args: ['minDate',] }],
|
|
78
|
+
maxDate: [{ type: Input, args: ['maxDate',] }],
|
|
79
|
+
woDays: [{ type: Input, args: ['woDays',] }]
|
|
80
|
+
};
|
|
81
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGF0ZXBpY2tlci10aWxlcy5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9hZWItdWkta2l0L3NyYy9saWIvZGF0ZXBpY2tlci9kYXRlcGlja2VyLXRpbGVzL2RhdGVwaWNrZXItdGlsZXMuY29tcG9uZW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxTQUFTLEVBQWMsU0FBUyxFQUFFLEtBQUssRUFBRSxNQUFNLEVBQUUsWUFBWSxFQUFxQixNQUFNLGVBQWUsQ0FBQztBQUNqSCxPQUFPLEVBQUUsc0JBQXNCLEVBQUUsTUFBTSxzQ0FBc0MsQ0FBQztBQU85RSxNQUFNLE9BQU8sd0JBQXdCO0lBc0JuQyxZQUFvQixLQUE2QjtRQUE3QixVQUFLLEdBQUwsS0FBSyxDQUF3QjtRQW5COUIsYUFBUSxHQUFZLEtBQUssQ0FBQztRQUMzQixZQUFPLEdBQVksS0FBSyxDQUFDO1FBR3hCLFlBQU8sR0FBeUIsSUFBSSxZQUFZLEVBQUUsQ0FBQztRQUdsRCxhQUFRLEdBQXlCLElBQUksWUFBWSxFQUFFLENBQUM7UUFPdEQsV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