@datarailsshared/datarailsshared 1.3.41 → 1.3.42
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/bundles/datarailsshared-datarailsshared.umd.js +272 -53
- package/bundles/datarailsshared-datarailsshared.umd.js.map +1 -1
- package/datarailsshared-datarailsshared-1.3.42.tgz +0 -0
- package/datarailsshared-datarailsshared.d.ts +3 -1
- package/datarailsshared-datarailsshared.metadata.json +1 -1
- package/esm2015/datarailsshared-datarailsshared.js +4 -2
- package/esm2015/lib/dr-inputs/dr-date-picker/dr-date-picker.component.js +87 -41
- package/esm2015/lib/dr-inputs/dr-date-picker/dr-date-picker.service.js +41 -0
- package/esm2015/lib/dr-inputs/dr-date-picker/dr-date-picker_custom-header/dr-date-picker_custom-header.component.js +129 -0
- package/esm2015/lib/dr-inputs/dr-inputs.module.js +9 -3
- package/esm2015/lib/dr-inputs/dr-select/dr-select.component.js +5 -3
- package/esm2015/lib/models/datePicker.js +5 -2
- package/fesm2015/datarailsshared-datarailsshared.js +258 -51
- package/fesm2015/datarailsshared-datarailsshared.js.map +1 -1
- package/lib/dr-inputs/dr-date-picker/dr-date-picker.component.d.ts +29 -5
- package/lib/dr-inputs/dr-date-picker/dr-date-picker.service.d.ts +12 -0
- package/lib/dr-inputs/dr-date-picker/dr-date-picker_custom-header/dr-date-picker_custom-header.component.d.ts +41 -0
- package/lib/dr-inputs/dr-select/dr-select.component.d.ts +1 -0
- package/lib/models/datePicker.d.ts +4 -0
- package/package.json +1 -1
- package/datarailsshared-datarailsshared-1.3.41.tgz +0 -0
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { EventEmitter, Component, ViewEncapsulation, Input, Output, ChangeDetectionStrategy, ChangeDetectorRef, forwardRef, ElementRef, Inject, PLATFORM_ID, ContentChildren, Renderer2, HostBinding, ContentChild, Pipe, TemplateRef, Directive, HostListener, ComponentFactoryResolver, ViewContainerRef, ViewChild, Optional, Injector,
|
|
2
|
+
import { EventEmitter, Component, ViewEncapsulation, Input, Output, ChangeDetectionStrategy, ChangeDetectorRef, forwardRef, ElementRef, Inject, PLATFORM_ID, ContentChildren, Renderer2, HostBinding, ContentChild, Pipe, TemplateRef, Directive, HostListener, ComponentFactoryResolver, ViewContainerRef, ViewChild, Injectable, Optional, Injector, Host, NgModule } from '@angular/core';
|
|
3
3
|
import { FormControl, NG_VALUE_ACCESSOR, NgControl, FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
4
4
|
import { DateAdapter, MAT_DATE_LOCALE, MAT_DATE_FORMATS, MatNativeDateModule } from '@angular/material/core';
|
|
5
5
|
import { MomentDateAdapter, MAT_MOMENT_DATE_ADAPTER_OPTIONS, MatMomentDateModule } from '@angular/material-moment-adapter';
|
|
6
|
-
import * as
|
|
6
|
+
import * as moment$7 from 'moment';
|
|
7
7
|
import { isPlatformBrowser, DOCUMENT, CommonModule } from '@angular/common';
|
|
8
|
-
import { Subject, from, merge, fromEvent, noop as noop$1 } from 'rxjs';
|
|
9
|
-
import { startWith, switchMap, takeUntil, filter, first } from 'rxjs/operators';
|
|
8
|
+
import { Subject, from, merge, fromEvent, noop as noop$1, BehaviorSubject } from 'rxjs';
|
|
9
|
+
import { startWith, switchMap, takeUntil, filter, take, first } from 'rxjs/operators';
|
|
10
10
|
import { transition, style, animate, trigger, state } from '@angular/animations';
|
|
11
11
|
import * as i1 from '@angular/cdk/overlay';
|
|
12
12
|
import { Overlay, OverlayPositionBuilder, OverlayConfig } from '@angular/cdk/overlay';
|
|
13
13
|
import { ComponentPortal } from '@angular/cdk/portal';
|
|
14
|
-
import { MatDatepickerModule } from '@angular/material/datepicker';
|
|
14
|
+
import { MatCalendar, MatDatepickerModule } from '@angular/material/datepicker';
|
|
15
15
|
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
16
16
|
import { MatInputModule } from '@angular/material/input';
|
|
17
17
|
import { MatSelectModule } from '@angular/material/select';
|
|
@@ -668,7 +668,7 @@ DrTagComponent.propDecorators = {
|
|
|
668
668
|
tagChange: [{ type: Output }]
|
|
669
669
|
};
|
|
670
670
|
|
|
671
|
-
const moment$1 =
|
|
671
|
+
const moment$1 = moment$7;
|
|
672
672
|
class ListTagComponent {
|
|
673
673
|
constructor() {
|
|
674
674
|
this.defaultValue = "";
|
|
@@ -1254,6 +1254,7 @@ class DrSelectComponent {
|
|
|
1254
1254
|
this.items = [];
|
|
1255
1255
|
this.appendTo = 'body';
|
|
1256
1256
|
this.disabled = false;
|
|
1257
|
+
this.optionWithDescription = false;
|
|
1257
1258
|
this.keyDownFn = () => true;
|
|
1258
1259
|
this.change = new EventEmitter();
|
|
1259
1260
|
this.onChange = () => { };
|
|
@@ -1290,13 +1291,13 @@ class DrSelectComponent {
|
|
|
1290
1291
|
DrSelectComponent.decorators = [
|
|
1291
1292
|
{ type: Component, args: [{
|
|
1292
1293
|
selector: 'dr-select',
|
|
1293
|
-
template: " <ng-select [(ngModel)]=\"selectedItem\"\r\n [items]=\"items\"\r\n [bindLabel]=\"bindLabel\"\r\n [bindValue]=\"bindValue\"\r\n [multiple]=\"multiple\"\r\n [addTag]=\"addTag\"\r\n [appendTo]=\"appendTo\"\r\n [clearable]=\"clearable\"\r\n [searchable]=\"searchable\"\r\n [hideSelected]=\"hideSelected\"\r\n [placeholder]=\"placeholder\"\r\n [loading]=\"loading\"\r\n [readonly]=\"readonly\"\r\n [disabled]=\"disabled\"\r\n [id]=\"id\"\r\n [keyDownFn]=\"keyDownFn\"\r\n [searchFn]=\"searchFn\"\r\n (change)=\"change.emit(selectedItem); onChange(selectedItem)\"\r\n class=\"dr-select\">\r\n <ng-template *ngIf=\"optionHeaderTemplate\" ng-header-tmp let-item=\"item\">\r\n <ng-container [ngTemplateOutlet]=\"optionHeaderTemplate\" [ngTemplateOutletContext]=\"{item: item}\"></ng-container>\r\n </ng-template>\r\n <ng-template *ngIf=\"labelTemplate\" ng-label-tmp let-item=\"item\">\r\n <ng-container [ngTemplateOutlet]=\"labelTemplate\" [ngTemplateOutletContext]=\"{item: item}\"></ng-container>\r\n </ng-template>\r\n <ng-template *ngIf=\"optionTemplate\" ng-option-tmp let-item=\"item\">\r\n <ng-container [ngTemplateOutlet]=\"optionTemplate\" [ngTemplateOutletContext]=\"{item: item}\"></ng-container>\r\n </ng-template>\r\n <ng-template *ngIf=\"optionFooterTemplate\" ng-footer-tmp let-item=\"item\">\r\n <ng-container [ngTemplateOutlet]=\"optionFooterTemplate\" [ngTemplateOutletContext]=\"{item: item}\"></ng-container>\r\n </ng-template>\r\n </ng-select>\r\n",
|
|
1294
|
+
template: " <ng-select [(ngModel)]=\"selectedItem\"\r\n [items]=\"items\"\r\n [bindLabel]=\"bindLabel\"\r\n [bindValue]=\"bindValue\"\r\n [multiple]=\"multiple\"\r\n [addTag]=\"addTag\"\r\n [appendTo]=\"appendTo\"\r\n [clearable]=\"clearable\"\r\n [searchable]=\"searchable\"\r\n [hideSelected]=\"hideSelected\"\r\n [placeholder]=\"placeholder\"\r\n [loading]=\"loading\"\r\n [readonly]=\"readonly\"\r\n [disabled]=\"disabled\"\r\n [id]=\"id\"\r\n [keyDownFn]=\"keyDownFn\"\r\n [searchFn]=\"searchFn\"\r\n (change)=\"change.emit(selectedItem); onChange(selectedItem)\"\r\n class=\"dr-select\">\r\n <ng-template *ngIf=\"optionHeaderTemplate\" ng-header-tmp let-item=\"item\">\r\n <ng-container [ngTemplateOutlet]=\"optionHeaderTemplate\" [ngTemplateOutletContext]=\"{item: item}\"></ng-container>\r\n </ng-template>\r\n <ng-template *ngIf=\"labelTemplate\" ng-label-tmp let-item=\"item\">\r\n <ng-container [ngTemplateOutlet]=\"labelTemplate\" [ngTemplateOutletContext]=\"{item: item}\"></ng-container>\r\n </ng-template>\r\n <ng-template *ngIf=\"optionTemplate\" ng-option-tmp let-item=\"item\">\r\n <ng-container [ngTemplateOutlet]=\"optionTemplate\" [ngTemplateOutletContext]=\"{item: item}\"></ng-container>\r\n </ng-template>\r\n <ng-template *ngIf=\"optionWithDescription\" ng-option-tmp let-item=\"item\">\r\n <div class=\"dr-select__option-with-desc__wrapper\">\r\n <div>{{ item.name }}</div>\r\n <div class=\"dr-select__option-with-desc__description\"\r\n >{{ item?.description }}</div>\r\n </div>\r\n </ng-template>\r\n <ng-template *ngIf=\"optionFooterTemplate\" ng-footer-tmp let-item=\"item\">\r\n <ng-container [ngTemplateOutlet]=\"optionFooterTemplate\" [ngTemplateOutletContext]=\"{item: item}\"></ng-container>\r\n </ng-template>\r\n </ng-select>\r\n",
|
|
1294
1295
|
providers: [{
|
|
1295
1296
|
provide: NG_VALUE_ACCESSOR,
|
|
1296
1297
|
useExisting: DrSelectComponent,
|
|
1297
1298
|
multi: true
|
|
1298
1299
|
}],
|
|
1299
|
-
styles: [":host{width:100%;height:32px}:host.no-left-border-radius ::ng-deep ng-select.ng-select .ng-select-container{border-bottom-left-radius:0!important;border-top-left-radius:0!important}:host.no-right-border-radius ::ng-deep ng-select.ng-select .ng-select-container{border-bottom-right-radius:0!important;border-top-right-radius:0!important}:host.no-right-border ::ng-deep ng-select.ng-select .ng-select-container{border-right:none!important}:host.no-left-border ::ng-deep ng-select.ng-select .ng-select-container{border-left:none!important}:host ::ng-deep ng-select.ng-select .ng-select-container{min-height:32px;height:32px;width:100%;border-radius:6px!important;border:1px solid #C3C4CE;box-shadow:none!important}:host ::ng-deep ng-select.ng-select .ng-select-container:hover{border-color:#85889c}:host ::ng-deep ng-select.ng-select .ng-select-container:focus-within{border-color:#21b8f1}:host ::ng-deep ng-select.ng-select .ng-select-container .ng-input{top:0!important;line-height:30px;padding:0 50px 0 8px!important;color:#151b3f;font-size:14px;font-weight:400}:host ::ng-deep ng-select.ng-select .ng-select-container .ng-value-container{padding:0 0 0 8px;height:100%;overflow:auto;font-size:14px;line-height:18px}:host ::ng-deep ng-select.ng-select .ng-select-container .ng-value-container .ng-input{padding:0 0 0 3px!important}:host ::ng-deep ng-select.ng-select.ng-select-multiple .ng-select-container{max-height:58px;height:100%}:host ::ng-deep ng-select.ng-select.ng-select-multiple .ng-select-container .ng-value-container{max-height:58px;font-size:14px;line-height:18px}:host ::ng-deep ng-select.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value{color:#151a41;height:24px;padding:2px 8px;font-size:12px;margin:2px 2px 2px 0;background:#E5E6EA;display:flex;flex-direction:row-reverse;align-items:center;border-radius:12px}:host ::ng-deep ng-select.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value-label{line-height:20px;padding:0!important}:host ::ng-deep ng-select.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value-icon{border:none!important;padding:0 0 0 9px!important;color:#51566f;font-size:16px;font-weight:bold}:host ::ng-deep ng-select.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value-icon,:host ::ng-deep ng-select.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value-icon:hover{background:transparent!important}:host ::ng-deep ng-select.ng-select.ng-select-disabled .ng-select-container,:host ::ng-deep ng-select.ng-select.ng-select-disabled .ng-select-container:hover,:host ::ng-deep ng-select.ng-select.ng-select-disabled .ng-select-container:focus-within{background:#E5E6EA!important;border:1px solid #E5E6EA!important}:host ::ng-deep ng-select.ng-select.ng-select-disabled .ng-select-container .ng-value,:host ::ng-deep ng-select.ng-select.ng-select-disabled .ng-select-container:hover .ng-value,:host ::ng-deep ng-select.ng-select.ng-select-disabled .ng-select-container:focus-within .ng-value{color:#bcbcbc!important}:host ::ng-deep ng-select.ng-select.ng-select-single.ng-invalid.ng-touched .ng-select-container,:host ::ng-deep ng-select.ng-select.ng-select-multiple.ng-invalid.ng-touched .ng-select-container{border-color:#de2833}::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select{border:1px solid #DBDEE3;border-radius:6px!important;margin-top:8px!important;overflow:hidden}::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select .ng-dropdown-panel-items .ng-option:empty{display:none}::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select .ng-dropdown-panel-items .ng-option{display:flex;align-items:center;min-height:36px;padding:8px 12px;font-size:14px;line-height:22px}::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select .ng-dropdown-panel-items .ng-option>.ng-option-label{text-overflow:ellipsis;overflow:hidden}::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select .ng-dropdown-panel-items .ng-option,::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select .ng-dropdown-panel-items .ng-option.ng-option-marked{background:#fff}::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select .ng-dropdown-panel-items .ng-option.ng-option-selected,::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select .ng-dropdown-panel-items .ng-option.ng-option-selected.ng-option-marked{background:#F3F7FF;color:#151b3f}::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select .ng-dropdown-panel-items .ng-option.ng-option-selected span,::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select .ng-dropdown-panel-items .ng-option.ng-option-selected.ng-option-marked span{font-weight:normal!important}::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select .ng-dropdown-panel-items .ng-option:hover,::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select .ng-dropdown-panel-items .ng-option.ng-option-selected:hover,::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select .ng-dropdown-panel-items .ng-option.ng-option-selected.ng-option-marked:hover{background:#F6F7F8}\n"]
|
|
1300
|
+
styles: [":host{width:100%;height:32px}:host.no-left-border-radius ::ng-deep ng-select.ng-select .ng-select-container{border-bottom-left-radius:0!important;border-top-left-radius:0!important}:host.no-right-border-radius ::ng-deep ng-select.ng-select .ng-select-container{border-bottom-right-radius:0!important;border-top-right-radius:0!important}:host.no-right-border ::ng-deep ng-select.ng-select .ng-select-container{border-right:none!important}:host.no-left-border ::ng-deep ng-select.ng-select .ng-select-container{border-left:none!important}:host ::ng-deep ng-select.ng-select .ng-select-container{min-height:32px;height:32px;width:100%;border-radius:6px!important;border:1px solid #C3C4CE;box-shadow:none!important}:host ::ng-deep ng-select.ng-select .ng-select-container:hover{border-color:#85889c}:host ::ng-deep ng-select.ng-select .ng-select-container:focus-within{border-color:#21b8f1}:host ::ng-deep ng-select.ng-select .ng-select-container .ng-input{top:0!important;line-height:30px;padding:0 50px 0 8px!important;color:#151b3f;font-size:14px;font-weight:400}:host ::ng-deep ng-select.ng-select .ng-select-container .ng-value-container{padding:0 0 0 8px;height:100%;overflow:auto;font-size:14px;line-height:18px}:host ::ng-deep ng-select.ng-select .ng-select-container .ng-value-container .ng-input{padding:0 0 0 3px!important}:host ::ng-deep ng-select.ng-select.ng-select-multiple .ng-select-container{max-height:58px;height:100%}:host ::ng-deep ng-select.ng-select.ng-select-multiple .ng-select-container .ng-value-container{max-height:58px;font-size:14px;line-height:18px}:host ::ng-deep ng-select.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value{color:#151a41;height:24px;padding:2px 8px;font-size:12px;margin:2px 2px 2px 0;background:#E5E6EA;display:flex;flex-direction:row-reverse;align-items:center;border-radius:12px}:host ::ng-deep ng-select.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value-label{line-height:20px;padding:0!important}:host ::ng-deep ng-select.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value-icon{border:none!important;padding:0 0 0 9px!important;color:#51566f;font-size:16px;font-weight:bold}:host ::ng-deep ng-select.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value-icon,:host ::ng-deep ng-select.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value-icon:hover{background:transparent!important}:host ::ng-deep ng-select.ng-select.ng-select-disabled .ng-select-container,:host ::ng-deep ng-select.ng-select.ng-select-disabled .ng-select-container:hover,:host ::ng-deep ng-select.ng-select.ng-select-disabled .ng-select-container:focus-within{background:#E5E6EA!important;border:1px solid #E5E6EA!important}:host ::ng-deep ng-select.ng-select.ng-select-disabled .ng-select-container .ng-value,:host ::ng-deep ng-select.ng-select.ng-select-disabled .ng-select-container:hover .ng-value,:host ::ng-deep ng-select.ng-select.ng-select-disabled .ng-select-container:focus-within .ng-value{color:#bcbcbc!important}:host ::ng-deep ng-select.ng-select.ng-select-single.ng-invalid.ng-touched .ng-select-container,:host ::ng-deep ng-select.ng-select.ng-select-multiple.ng-invalid.ng-touched .ng-select-container{border-color:#de2833}::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select{border:1px solid #DBDEE3;border-radius:6px!important;margin-top:8px!important;overflow:hidden}::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select .ng-dropdown-panel-items .ng-option:empty{display:none}::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select .ng-dropdown-panel-items .ng-option{display:flex;align-items:center;min-height:36px;padding:8px 12px;font-size:14px;line-height:22px}::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select .ng-dropdown-panel-items .ng-option>.ng-option-label{text-overflow:ellipsis;overflow:hidden}::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select .ng-dropdown-panel-items .ng-option,::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select .ng-dropdown-panel-items .ng-option.ng-option-marked{background:#fff}::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select .ng-dropdown-panel-items .ng-option.ng-option-selected,::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select .ng-dropdown-panel-items .ng-option.ng-option-selected.ng-option-marked{background:#F3F7FF;color:#151b3f}::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select .ng-dropdown-panel-items .ng-option.ng-option-selected span,::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select .ng-dropdown-panel-items .ng-option.ng-option-selected.ng-option-marked span{font-weight:normal!important}::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select .ng-dropdown-panel-items .ng-option:hover,::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select .ng-dropdown-panel-items .ng-option.ng-option-selected:hover,::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select .ng-dropdown-panel-items .ng-option.ng-option-selected.ng-option-marked:hover{background:#F6F7F8}::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select .dr-select__option-with-desc__wrapper .dr-select__option-with-desc__description{max-width:97%;word-break:break-word;color:#4e566c;font-weight:400;font-size:12px;line-height:20px}::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select.ng-option-selected .dr-select__option-with-desc__wrapper .dr-select__option-with-desc__description,::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select.ng-option-selected.ng-option-marked .dr-select__option-with-desc__wrapper .dr-select__option-with-desc__description{color:#0c142b}\n"]
|
|
1300
1301
|
},] }
|
|
1301
1302
|
];
|
|
1302
1303
|
DrSelectComponent.ctorParameters = () => [
|
|
@@ -1318,6 +1319,7 @@ DrSelectComponent.propDecorators = {
|
|
|
1318
1319
|
loading: [{ type: Input }],
|
|
1319
1320
|
readonly: [{ type: Input }],
|
|
1320
1321
|
disabled: [{ type: Input }],
|
|
1322
|
+
optionWithDescription: [{ type: Input }],
|
|
1321
1323
|
id: [{ type: Input }],
|
|
1322
1324
|
keyDownFn: [{ type: Input }],
|
|
1323
1325
|
selectedItem: [{ type: Input }],
|
|
@@ -1880,6 +1882,7 @@ const MAT_DEFAULT_DATE_FORMAT = 'MM/DD/yyyy';
|
|
|
1880
1882
|
const DATE_INPUT_FORMAT = 'YYYY/MM/DD';
|
|
1881
1883
|
const YEAR_FORMAT = 'yyyy';
|
|
1882
1884
|
const MONTH_YEAR_FORMAT = 'MM/yyyy';
|
|
1885
|
+
const QUARTER_FORMAT = 'Q/yyyy';
|
|
1883
1886
|
class CustomDateFormat {
|
|
1884
1887
|
constructor() {
|
|
1885
1888
|
this._parse = {
|
|
@@ -1889,7 +1892,9 @@ class CustomDateFormat {
|
|
|
1889
1892
|
dateInput: DATE_INPUT_FORMAT,
|
|
1890
1893
|
monthYearLabel: 'MMM YYYY',
|
|
1891
1894
|
dateA11yLabel: 'LL',
|
|
1892
|
-
monthYearA11yLabel: 'MMM YYYY'
|
|
1895
|
+
monthYearA11yLabel: 'MMM YYYY',
|
|
1896
|
+
quarterYearLabel: 'Q/YYYY',
|
|
1897
|
+
yearLabel: 'YYYY'
|
|
1893
1898
|
};
|
|
1894
1899
|
}
|
|
1895
1900
|
set parse(parse) {
|
|
@@ -1913,64 +1918,226 @@ class CustomDateFormat {
|
|
|
1913
1918
|
}
|
|
1914
1919
|
}
|
|
1915
1920
|
|
|
1921
|
+
class DrDatePickerService {
|
|
1922
|
+
constructor() {
|
|
1923
|
+
this.timeframe = 'day';
|
|
1924
|
+
this.format = new BehaviorSubject(MAT_DEFAULT_DATE_FORMAT);
|
|
1925
|
+
this.updatedQuater = new Subject();
|
|
1926
|
+
}
|
|
1927
|
+
getQuarterDisplay(value, format) {
|
|
1928
|
+
return 'Q' + moment$7(value).quarter() + format.charAt(1) + moment$7(value).year();
|
|
1929
|
+
}
|
|
1930
|
+
setTimeframe(format) {
|
|
1931
|
+
const lowerCaseFormat = format.toLowerCase();
|
|
1932
|
+
switch (true) {
|
|
1933
|
+
case lowerCaseFormat.includes('q'):
|
|
1934
|
+
this.timeframe = 'quarter';
|
|
1935
|
+
break;
|
|
1936
|
+
case lowerCaseFormat.includes('d'):
|
|
1937
|
+
this.timeframe = 'day';
|
|
1938
|
+
break;
|
|
1939
|
+
case lowerCaseFormat.includes('m'):
|
|
1940
|
+
this.timeframe = 'month';
|
|
1941
|
+
break;
|
|
1942
|
+
case lowerCaseFormat.includes('y'):
|
|
1943
|
+
this.timeframe = 'year';
|
|
1944
|
+
break;
|
|
1945
|
+
default:
|
|
1946
|
+
this.timeframe = 'day';
|
|
1947
|
+
}
|
|
1948
|
+
}
|
|
1949
|
+
}
|
|
1950
|
+
DrDatePickerService.ɵprov = i0.ɵɵdefineInjectable({ factory: function DrDatePickerService_Factory() { return new DrDatePickerService(); }, token: DrDatePickerService, providedIn: "root" });
|
|
1951
|
+
DrDatePickerService.decorators = [
|
|
1952
|
+
{ type: Injectable, args: [{
|
|
1953
|
+
providedIn: 'root',
|
|
1954
|
+
},] }
|
|
1955
|
+
];
|
|
1956
|
+
|
|
1957
|
+
class DrDatePickerCustomHeaderComponent {
|
|
1958
|
+
constructor(_calendar, _dateAdapter, _dateFormats, cdr, datePickerService) {
|
|
1959
|
+
this._calendar = _calendar;
|
|
1960
|
+
this._dateAdapter = _dateAdapter;
|
|
1961
|
+
this._dateFormats = _dateFormats;
|
|
1962
|
+
this.cdr = cdr;
|
|
1963
|
+
this.datePickerService = datePickerService;
|
|
1964
|
+
this._destroyed = new Subject();
|
|
1965
|
+
this.quarters = [1, 2, 3, 4];
|
|
1966
|
+
this.selectedQuarter = 1;
|
|
1967
|
+
this.timeframeOptions = [{
|
|
1968
|
+
title: 'Day',
|
|
1969
|
+
value: 'month',
|
|
1970
|
+
format: MAT_DEFAULT_DATE_FORMAT,
|
|
1971
|
+
periodLabel: () => this._dateAdapter
|
|
1972
|
+
.format(this._calendar.activeDate, this._dateFormats.display.monthYearLabel)
|
|
1973
|
+
.toLocaleUpperCase()
|
|
1974
|
+
}, {
|
|
1975
|
+
title: 'Month',
|
|
1976
|
+
value: 'year',
|
|
1977
|
+
format: MONTH_YEAR_FORMAT,
|
|
1978
|
+
periodLabel: () => String(moment$7(this._calendar.activeDate).year())
|
|
1979
|
+
}, {
|
|
1980
|
+
title: 'Quarter',
|
|
1981
|
+
value: 'none',
|
|
1982
|
+
format: QUARTER_FORMAT,
|
|
1983
|
+
periodLabel: () => String(moment$7(this._calendar.activeDate).year())
|
|
1984
|
+
}, {
|
|
1985
|
+
title: 'Year',
|
|
1986
|
+
value: 'multi-year',
|
|
1987
|
+
format: YEAR_FORMAT,
|
|
1988
|
+
periodLabel: () => {
|
|
1989
|
+
const currentYear = moment$7(this._calendar.activeDate).year();
|
|
1990
|
+
const startPeriod = Math.floor(currentYear / 24) * 24;
|
|
1991
|
+
return startPeriod + '-' + (startPeriod + 23);
|
|
1992
|
+
}
|
|
1993
|
+
}];
|
|
1994
|
+
this.pagingSetup = {
|
|
1995
|
+
'year': (forward) => this.pagingDateChange('addCalendarYears', 1, forward),
|
|
1996
|
+
'none': (forward) => this.pagingDateChange('addCalendarYears', 1, forward),
|
|
1997
|
+
'month': (forward) => this.pagingDateChange('addCalendarMonths', 1, forward),
|
|
1998
|
+
'multi-year': (forward) => this.pagingDateChange('addCalendarYears', 24, forward)
|
|
1999
|
+
};
|
|
2000
|
+
this.selectedTimeframe = 'month';
|
|
2001
|
+
this.timeframeSelection = false;
|
|
2002
|
+
this.periodMonthLabel = '';
|
|
2003
|
+
this.periodYearLabel = '';
|
|
2004
|
+
_calendar.stateChanges
|
|
2005
|
+
.pipe(takeUntil(this._destroyed))
|
|
2006
|
+
.subscribe(() => cdr.markForCheck());
|
|
2007
|
+
this.datePickerService.format
|
|
2008
|
+
.pipe(take(1))
|
|
2009
|
+
.subscribe(value => {
|
|
2010
|
+
this.selectedTimeframe = this.timeframeOptions.filter(option => option.format == value)[0].value;
|
|
2011
|
+
});
|
|
2012
|
+
}
|
|
2013
|
+
ngOnDestroy() {
|
|
2014
|
+
this._destroyed.next();
|
|
2015
|
+
this._destroyed.complete();
|
|
2016
|
+
}
|
|
2017
|
+
setPeriodLabels(currentTimeframeOption) {
|
|
2018
|
+
const fullPeriodLabel = currentTimeframeOption.periodLabel();
|
|
2019
|
+
if (this.selectedTimeframe === 'month') {
|
|
2020
|
+
this.periodMonthLabel = fullPeriodLabel.slice(0, 3);
|
|
2021
|
+
this.periodYearLabel = fullPeriodLabel.slice(4);
|
|
2022
|
+
}
|
|
2023
|
+
else {
|
|
2024
|
+
this.periodMonthLabel = '';
|
|
2025
|
+
this.periodYearLabel = fullPeriodLabel;
|
|
2026
|
+
}
|
|
2027
|
+
}
|
|
2028
|
+
setTimeframe() {
|
|
2029
|
+
this.timeframeSelection = false;
|
|
2030
|
+
this._calendar.currentView = this.selectedTimeframe;
|
|
2031
|
+
const chosenTimeframeOption = this.timeframeOptions.filter(option => option.value === this.selectedTimeframe)[0];
|
|
2032
|
+
this.setPeriodLabels(chosenTimeframeOption);
|
|
2033
|
+
this.datePickerService.format.next(chosenTimeframeOption.format);
|
|
2034
|
+
this.datePickerService.setTimeframe(chosenTimeframeOption.format);
|
|
2035
|
+
if (this.selectedTimeframe == null) {
|
|
2036
|
+
this.selectedQuarter = moment$7(this._calendar.activeDate).quarter();
|
|
2037
|
+
}
|
|
2038
|
+
}
|
|
2039
|
+
get currentViewIsQuater() {
|
|
2040
|
+
return !['month', 'year', 'multi-year'].includes(this._calendar.currentView);
|
|
2041
|
+
}
|
|
2042
|
+
switchViewOnClickOnPeriodLabel(view) {
|
|
2043
|
+
this._calendar.currentView = view;
|
|
2044
|
+
}
|
|
2045
|
+
onSelectQuater(quarterNumber) {
|
|
2046
|
+
const monthsInQuarter = 3;
|
|
2047
|
+
this.selectedQuarter = moment$7(this._calendar.activeDate).quarter();
|
|
2048
|
+
const unadaptedDate = this._dateAdapter.addCalendarMonths(this._calendar.activeDate, monthsInQuarter * (quarterNumber - this.selectedQuarter));
|
|
2049
|
+
this._calendar.activeDate = unadaptedDate;
|
|
2050
|
+
this.datePickerService.updatedQuater.next(moment$7(unadaptedDate));
|
|
2051
|
+
this.datePickerService.calendarInstance.close();
|
|
2052
|
+
}
|
|
2053
|
+
pagingClicked(forward) {
|
|
2054
|
+
this.pagingSetup[this.selectedTimeframe] && this.pagingSetup[this.selectedTimeframe](forward);
|
|
2055
|
+
}
|
|
2056
|
+
pagingDateChange(actionCall, amount, forward) {
|
|
2057
|
+
this._calendar.activeDate = this._dateAdapter[actionCall](this._calendar.activeDate, forward ? amount : -amount);
|
|
2058
|
+
const chosenTimeframeOption = this.timeframeOptions.filter(option => option.value === this.selectedTimeframe)[0];
|
|
2059
|
+
this.setPeriodLabels(chosenTimeframeOption);
|
|
2060
|
+
}
|
|
2061
|
+
}
|
|
2062
|
+
DrDatePickerCustomHeaderComponent.decorators = [
|
|
2063
|
+
{ type: Component, args: [{
|
|
2064
|
+
selector: 'dr-date-picker_custom-header.component',
|
|
2065
|
+
template: "<div class=\"dr-datepicker__timeframe-select__wrapper\">\r\n <dr-select \r\n class=\"dr-datepicker__timeframe-select\"\r\n [(ngModel)]=\"selectedTimeframe\"\r\n [items]=\"timeframeOptions\"\r\n bindLabel=\"title\"\r\n bindValue=\"value\"\r\n (ngModelChange)=\"setTimeframe()\">\r\n </dr-select>\r\n</div>\r\n\r\n<div class=\"dr-date-paging\">\r\n <div class=\"dr-date-paging flip-page-button\"\r\n (click)=\"pagingClicked(false)\">\r\n <i class=\"dr-icon-arrow-left presentation_buttons-navigate_input\"></i> \r\n </div>\r\n <span class=\"example-header-label\">\r\n <span (click)=\"switchViewOnClickOnPeriodLabel('year')\">{{periodMonthLabel + ' '}}</span> \r\n <span (click)=\"switchViewOnClickOnPeriodLabel('multi-year')\">{{periodYearLabel}}</span>\r\n </span>\r\n <div class=\"dr-date-paging flip-page-button\"\r\n (click)=\"pagingClicked(true)\">\r\n <i class=\"dr-icon-arrow-right presentation_buttons-navigate_input\"></i>\r\n </div>\r\n</div>\r\n<div #quarterlyDatePicker class=\"dr-quarterly-datepicker\" *ngIf=\"currentViewIsQuater\">\r\n <div *ngFor=\"let quarter of quarters\" \r\n class=\"quarter-selector\" (click)=\"onSelectQuater(quarter)\"\r\n [class]=\"quarter == selectedQuarter ? 'selected' : ''\"\r\n >Q{{quarter}}</div>\r\n</div>\r\n\r\n",
|
|
2066
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
2067
|
+
styles: [":host{height:54px;align-items:center;font-family:\"Poppins\";font-style:normal;font-weight:600;font-size:14px;line-height:22px}.dr-datepicker__timeframe-select__wrapper{background-color:#f9faff;padding:16px 32px;border-radius:18px 18px 0 0}.dr-date-paging{display:flex;flex-direction:row;justify-content:space-between;align-items:center;padding:16px 8px;grid-gap:4px;gap:4px}.dr-date-paging.flip-page-button{width:20px;height:20px;padding:0;color:#4e566c}.dr-date-paging.flip-page-button:hover{border-radius:50%;background:#F2F2FB;color:#4646ce}.dr-quarterly-datepicker{display:flex;justify-content:space-between;padding:10px}.dr-quarterly-datepicker .quarter-selector{display:block;width:74px;height:40px;text-align:center;border-radius:40px;font-weight:400;padding-top:9px}.dr-quarterly-datepicker .quarter-selector:hover{background:#F2F2FB;color:#4646ce;font-weight:600;cursor:pointer}.dr-quarterly-datepicker .quarter-selector.selected{background-color:#4646ce;color:#f3f7ff;font-weight:600}\n"]
|
|
2068
|
+
},] }
|
|
2069
|
+
];
|
|
2070
|
+
DrDatePickerCustomHeaderComponent.ctorParameters = () => [
|
|
2071
|
+
{ type: MatCalendar },
|
|
2072
|
+
{ type: DateAdapter },
|
|
2073
|
+
{ type: CustomDateFormat, decorators: [{ type: Inject, args: [MAT_DATE_FORMATS,] }] },
|
|
2074
|
+
{ type: ChangeDetectorRef },
|
|
2075
|
+
{ type: DrDatePickerService }
|
|
2076
|
+
];
|
|
2077
|
+
|
|
1916
2078
|
const noop = () => { };
|
|
1917
2079
|
const ɵ0$1 = noop;
|
|
1918
2080
|
class DrDatePickerComponent {
|
|
1919
|
-
constructor(cdr) {
|
|
2081
|
+
constructor(cdr, _dateAdapter, datePickerService) {
|
|
1920
2082
|
this.cdr = cdr;
|
|
2083
|
+
this._dateAdapter = _dateAdapter;
|
|
2084
|
+
this.datePickerService = datePickerService;
|
|
2085
|
+
this._destroyed = new Subject();
|
|
1921
2086
|
this.readonly = true;
|
|
1922
|
-
this._lastView = 'month';
|
|
1923
2087
|
this._format = MAT_DEFAULT_DATE_FORMAT;
|
|
2088
|
+
this.customHeader = DrDatePickerCustomHeaderComponent;
|
|
2089
|
+
this.onChangeFormat = new EventEmitter();
|
|
2090
|
+
this.timeframeSelection = false;
|
|
1924
2091
|
this.placeholder = 'Select';
|
|
1925
2092
|
this.min = null;
|
|
1926
2093
|
this.max = null;
|
|
2094
|
+
this.calendarViewSetup = {
|
|
2095
|
+
'year': (calendar) => calendar.currentView = 'multi-year',
|
|
2096
|
+
'month': (calendar) => calendar.currentView = 'year',
|
|
2097
|
+
'quarter': (calendar) => calendar.currentView = 'none',
|
|
2098
|
+
'day': (calendar) => calendar.currentView = 'month'
|
|
2099
|
+
};
|
|
2100
|
+
this.pagingSetup = {
|
|
2101
|
+
'year': (forward) => this.pagingDateChange('addCalendarYears', 1, forward),
|
|
2102
|
+
'quarter': (forward) => this.pagingDateChange('addCalendarMonths', 3, forward),
|
|
2103
|
+
'month': (forward) => this.pagingDateChange('addCalendarMonths', 1, forward),
|
|
2104
|
+
'day': (forward) => this.pagingDateChange('addCalendarDays', 1, forward)
|
|
2105
|
+
};
|
|
1927
2106
|
this.innerValue = null;
|
|
1928
2107
|
this.onTouchedCallback = noop;
|
|
1929
2108
|
this.onChangeCallback = noop;
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
this._lastView = 'month';
|
|
1943
|
-
this._format = MAT_DEFAULT_DATE_FORMAT;
|
|
1944
|
-
}
|
|
1945
|
-
this.cdr.markForCheck();
|
|
2109
|
+
datePickerService.format
|
|
2110
|
+
.pipe(takeUntil(this._destroyed))
|
|
2111
|
+
.subscribe((value) => {
|
|
2112
|
+
this._format = value;
|
|
2113
|
+
this.onChangeFormat.emit(this.normalizeValue(value));
|
|
2114
|
+
cdr.markForCheck();
|
|
2115
|
+
});
|
|
2116
|
+
datePickerService.updatedQuater
|
|
2117
|
+
.pipe(takeUntil(this._destroyed))
|
|
2118
|
+
.subscribe((value) => {
|
|
2119
|
+
this.writeValue(value);
|
|
2120
|
+
});
|
|
1946
2121
|
}
|
|
1947
2122
|
set format(value) {
|
|
1948
2123
|
if (value) {
|
|
1949
|
-
|
|
1950
|
-
value = value.replace(/d/g, 'D');
|
|
1951
|
-
}
|
|
1952
|
-
else if (value.includes('D')) {
|
|
1953
|
-
value = value.replace(/D/g, 'd');
|
|
1954
|
-
}
|
|
2124
|
+
value = this.normalizeValue(value);
|
|
1955
2125
|
this._format = value;
|
|
2126
|
+
this.datePickerService.format.next(value);
|
|
2127
|
+
this.datePickerService.setTimeframe(value);
|
|
1956
2128
|
this.cdr.markForCheck();
|
|
1957
2129
|
}
|
|
1958
2130
|
}
|
|
1959
2131
|
ngAfterViewInit() {
|
|
1960
|
-
|
|
2132
|
+
this.datePickerService.calendarInstance = this.dp;
|
|
2133
|
+
if (this._format === MAT_DEFAULT_DATE_FORMAT) {
|
|
1961
2134
|
return;
|
|
1962
2135
|
}
|
|
1963
|
-
const lastView = this._lastView;
|
|
1964
2136
|
setTimeout(() => {
|
|
1965
2137
|
const popupInstance = this.dp._popupComponentRef.instance;
|
|
1966
2138
|
const calenderInstance = popupInstance._calendar._calendarHeaderPortal._attachedHost._attachedRef.instance;
|
|
1967
2139
|
calenderInstance.currentPeriodClicked = function () {
|
|
1968
|
-
|
|
1969
|
-
this.calendar.currentView = 'multi-year';
|
|
1970
|
-
}
|
|
1971
|
-
else if (lastView === 'year') {
|
|
1972
|
-
this.calendar.currentView = this.calendar.currentView == 'year' ? 'multi-year' : 'year';
|
|
1973
|
-
}
|
|
2140
|
+
this.calendarViewSetup[this.datePickerService.timeframe] && this.calendarViewSetup[this.datePickerService.timeframe](this.calendar);
|
|
1974
2141
|
};
|
|
1975
2142
|
}, 1000);
|
|
1976
2143
|
}
|
|
@@ -1993,46 +2160,82 @@ class DrDatePickerComponent {
|
|
|
1993
2160
|
writeValue(value) {
|
|
1994
2161
|
if (value !== this.innerValue) {
|
|
1995
2162
|
if (value && typeof value === 'number') {
|
|
1996
|
-
this.innerValue =
|
|
2163
|
+
this.innerValue = moment$7.unix(value);
|
|
1997
2164
|
}
|
|
1998
2165
|
else {
|
|
1999
2166
|
this.innerValue = value;
|
|
2000
2167
|
}
|
|
2168
|
+
if (this.timeframeSelection) {
|
|
2169
|
+
moment$7(value).endOf(this.datePickerService.timeframe);
|
|
2170
|
+
}
|
|
2001
2171
|
this.cdr.markForCheck();
|
|
2002
2172
|
}
|
|
2003
2173
|
}
|
|
2174
|
+
get quarterDisplay() {
|
|
2175
|
+
return this.datePickerService.getQuarterDisplay(this.value, this._format);
|
|
2176
|
+
}
|
|
2177
|
+
normalizeValue(value) {
|
|
2178
|
+
if (value.includes('d')) {
|
|
2179
|
+
value = value.replace(/d/g, 'D');
|
|
2180
|
+
}
|
|
2181
|
+
else if (value.includes('D')) {
|
|
2182
|
+
value = value.replace(/D/g, 'd');
|
|
2183
|
+
}
|
|
2184
|
+
return value;
|
|
2185
|
+
}
|
|
2004
2186
|
chosenMonthHandler(normalizedMonth, datepicker) {
|
|
2005
|
-
if (this.
|
|
2187
|
+
if (this.datePickerService.timeframe == 'month') {
|
|
2006
2188
|
this.writeValue(normalizedMonth);
|
|
2007
2189
|
this.onChangeCallback(normalizedMonth);
|
|
2008
2190
|
datepicker.close();
|
|
2009
2191
|
}
|
|
2010
2192
|
}
|
|
2011
2193
|
chosenYearHandler(normalizedYear, datepicker) {
|
|
2012
|
-
if (this.
|
|
2194
|
+
if (this.datePickerService.timeframe == 'year') {
|
|
2013
2195
|
this.writeValue(normalizedYear);
|
|
2014
2196
|
this.onChangeCallback(normalizedYear);
|
|
2015
2197
|
datepicker.close();
|
|
2016
2198
|
}
|
|
2199
|
+
else if (['quarter', 'day'].includes(this.datePickerService.timeframe)) {
|
|
2200
|
+
this.writeValue(normalizedYear);
|
|
2201
|
+
datepicker.close();
|
|
2202
|
+
}
|
|
2203
|
+
}
|
|
2204
|
+
pagingClicked(forward) {
|
|
2205
|
+
this.pagingSetup[this.datePickerService.timeframe] && this.pagingSetup[this.datePickerService.timeframe](forward);
|
|
2206
|
+
this.datePickerService.calendarInstance.close();
|
|
2207
|
+
}
|
|
2208
|
+
pagingDateChange(actionCall, amount, forward) {
|
|
2209
|
+
const newValue = this._dateAdapter[actionCall](this.innerValue, forward ? amount : -amount);
|
|
2210
|
+
this.writeValue(newValue);
|
|
2211
|
+
this.onChangeCallback(newValue);
|
|
2212
|
+
}
|
|
2213
|
+
ngOnDestroy() {
|
|
2214
|
+
this._destroyed.next();
|
|
2215
|
+
this._destroyed.complete();
|
|
2017
2216
|
}
|
|
2018
2217
|
}
|
|
2019
2218
|
DrDatePickerComponent.decorators = [
|
|
2020
2219
|
{ type: Component, args: [{
|
|
2021
2220
|
selector: 'dr-date-picker',
|
|
2022
|
-
template: "<i class=\"dr-icon-
|
|
2221
|
+
template: "<div class=\"dr-datepicker__with-timeframe-selection\"\r\n *ngIf=\"timeframeSelection;else noTimeframeSelection\">\r\n <div class=\"dr-input-date-paging__flip-page-button\"\r\n (click)=\"pagingClicked(false)\"\r\n >\r\n <i class=\"dr-icon-arrow-left presentation_buttons-navigate_input\"></i> \r\n </div>\r\n <div class=\"dr-input-date-paging__quarter-display\"\r\n *ngIf=\"_format.includes('Q')\"\r\n (click)=\"datePicker.open()\"\r\n >{{quarterDisplay}}</div>\r\n <input [(ngModel)]=\"value\"\r\n (click)=\"datePicker.open()\"\r\n [matDatepicker]=\"datePicker\"\r\n [placeholder]=\"placeholder\"\r\n [drDatePickerFormat]=\"_format\"\r\n [readonly]=\"readonly\"\r\n [class]=\"_format.includes('Q') ? 'when-quarter' : ''\"\r\n [min]=\"min\"\r\n [max]=\"max\"/>\r\n <div class=\"dr-input-date-paging__flip-page-button\"\r\n (click)=\"pagingClicked(true)\">\r\n <i class=\"dr-icon-arrow-right presentation_buttons-navigate_input\"></i>\r\n </div>\r\n <mat-datepicker #datePicker\r\n class=\"dr-timeframe-datepicker\"\r\n [calendarHeaderComponent]=\"customHeader\"\r\n (yearSelected)=\"chosenYearHandler($event, datePicker)\"\r\n (monthSelected)=\"chosenMonthHandler($event, datePicker)\">\r\n </mat-datepicker>\r\n</div>\r\n\r\n<ng-template class=\"dr-datepicker__no-timeframe-selection\"\r\n #noTimeframeSelection>\r\n <i class=\"dr-icon-schedule\"></i>\r\n <input [(ngModel)]=\"value\"\r\n (click)=\"datePicker.open()\"\r\n [matDatepicker]=\"datePicker\"\r\n [placeholder]=\"placeholder\"\r\n [drDatePickerFormat]=\"_format\"\r\n [readonly]=\"readonly\"\r\n [min]=\"min\"\r\n [max]=\"max\"/>\r\n <mat-datepicker #datePicker\r\n (yearSelected)=\"chosenYearHandler($event, datePicker)\"\r\n (monthSelected)=\"chosenMonthHandler($event, datePicker)\">\r\n </mat-datepicker>\r\n</ng-template>\r\n\r\n",
|
|
2023
2222
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
2024
2223
|
providers: [
|
|
2025
2224
|
{ provide: NG_VALUE_ACCESSOR, useExisting: DrDatePickerComponent, multi: true }
|
|
2026
2225
|
],
|
|
2027
|
-
styles: [":host{position:relative;width:100%;display:flex;flex-direction:row;min-height:32px;height:32px;font-size:14px;font-family:\"Poppins\",sans-serif;background:#fff;border:1px solid #C3C4CE;border-radius:6px;color:#85889c;overflow:hidden;outline:none;cursor:pointer}:host:hover{border-color:#85889c}:host:focus-within{border-color:#21b8f1!important;color:#151b3f}:host.disabled{pointer-events:none;border:none;color:#85889c;background:#E5E6EA}:host.ng-valid.ng-dirty{border-color:#03a678}:host.ng-invalid.ng-dirty:not(:focus-within){border-color:#de2833!important}:host.ng-untouched.ng-valid{border-color:#c3c4ce}:host:after,:host:before{position:absolute;display:flex;border-color:#
|
|
2226
|
+
styles: [":host{position:relative;width:100%;display:flex;flex-direction:row;min-height:32px;height:32px;font-size:14px;font-family:\"Poppins\",sans-serif;background-color:#fff;border:1px solid #C3C4CE;border-radius:6px;color:#85889c;overflow:hidden;outline:none;cursor:pointer}:host.period-datepicker{border:none}:host:hover{border-color:#85889c}:host:focus-within{border-color:#21b8f1!important;color:#151b3f}:host.disabled{pointer-events:none;border:none;color:#85889c;background:#E5E6EA}:host.ng-valid.ng-dirty{border-color:#03a678}:host.ng-invalid.ng-dirty:not(:focus-within){border-color:#de2833!important}:host.ng-untouched.ng-valid{border-color:#c3c4ce}:host:after,:host:before{position:absolute;display:flex;border-color:#999999 transparent transparent;color:#999}:host:after{content:\"\";height:0;width:0;border-style:solid;border-width:5px 5px 2.5px;right:11px;top:13px}:host i{position:absolute;color:#999;left:8px;top:3px}:host input{display:flex;flex-grow:1;height:100%;border:none;text-align:left;padding-left:35px;padding-right:25px;cursor:pointer!important}:host input.when-quarter{position:absolute;visibility:hidden}:host input:disabled{border:none;color:#85889c;background:transparent}:host input::-webkit-search-decoration,:host input::-webkit-search-cancel-button,:host input::-webkit-search-results-button,:host input::-webkit-search-results-decoration{-webkit-appearance:none}:host .dr-datepicker__with-timeframe-selection{display:flex;align-items:center}:host .dr-datepicker__with-timeframe-selection .dr-input-date-paging__flip-page-button{width:25px;height:25px;border-radius:16px;padding:0;background-color:#fff}:host .dr-datepicker__with-timeframe-selection .dr-input-date-paging__flip-page-button i{position:relative;color:#0c142b;top:unset;left:unset}:host .dr-datepicker__with-timeframe-selection .dr-input-date-paging__flip-page-button:hover{background-color:#f2f2fb;color:#4646ce}:host .dr-datepicker__with-timeframe-selection input{width:90px;padding:0;border-radius:5px;text-decoration:underline;text-align:center}:host .dr-datepicker__with-timeframe-selection input:hover{background-color:#f2f2fb;color:#4646ce}:host .dr-input-date-paging__quarter-display{width:90px;height:22px;padding-left:0;text-align:center;line-height:22px;color:#0c142b;-webkit-text-decoration-line:underline;text-decoration-line:underline}:host .dr-input-date-paging__quarter-display:hover{background-color:#f2f2fb;border-radius:5px;cursor:pointer;-webkit-text-decoration-line:underline;text-decoration-line:underline;color:#4646ce}::ng-deep .mat-datepicker-content{margin:7px 0;box-shadow:0 4px 8px 1px #00000040;border-radius:12px!important}::ng-deep .mat-datepicker-content button[disabled]{border:inherit;color:inherit;background-color:inherit}::ng-deep .mat-datepicker-content button[disabled]:hover{border:inherit}::ng-deep .mat-calendar-body-cell:not(.mat-calendar-body-disabled):hover>.mat-calendar-body-cell-content:not(.mat-calendar-body-selected):not(.mat-calendar-body-comparison-identical){background:#F2F2FB;color:#4646ce;font-weight:600}::ng-deep .mat-calendar-body-selected{background-color:#4646ce;color:#f2f2fb;font-weight:600}::ng-deep .mat-calendar-body-today.mat-calendar-body-selected{box-shadow:none}::ng-deep .mat-button-focus-overlay{background:#F3F7FF}::ng-deep .mat-calendar-controls .mat-icon-button:hover .mat-button-focus-overlay{opacity:1!important;background:#F3F7FF;transition:opacity .2s cubic-bezier(.35,0,.25,1)}::ng-deep .mat-calendar-controls .mat-calendar-period-button:hover{background:#F3F7FF;transition:background .2s cubic-bezier(.35,0,.25,1)}::ng-deep .mat-calendar-table-header th{font-size:14px;font-weight:600;color:#19181a}::ng-deep .mat-calendar-table-header-divider{display:none}::ng-deep .mat-calendar-body-label{color:#fff;padding:0}\n"]
|
|
2028
2227
|
},] }
|
|
2029
2228
|
];
|
|
2030
2229
|
DrDatePickerComponent.ctorParameters = () => [
|
|
2031
|
-
{ type: ChangeDetectorRef }
|
|
2230
|
+
{ type: ChangeDetectorRef },
|
|
2231
|
+
{ type: DateAdapter },
|
|
2232
|
+
{ type: DrDatePickerService }
|
|
2032
2233
|
];
|
|
2033
2234
|
DrDatePickerComponent.propDecorators = {
|
|
2034
|
-
|
|
2235
|
+
_format: [{ type: Input }],
|
|
2236
|
+
onChangeFormat: [{ type: Output }],
|
|
2035
2237
|
format: [{ type: Input }],
|
|
2238
|
+
timeframeSelection: [{ type: Input }],
|
|
2036
2239
|
placeholder: [{ type: Input }],
|
|
2037
2240
|
min: [{ type: Input }],
|
|
2038
2241
|
max: [{ type: Input }],
|
|
@@ -3094,7 +3297,8 @@ const components$1 = [
|
|
|
3094
3297
|
DrToggleComponent,
|
|
3095
3298
|
DrToggleButtonComponent,
|
|
3096
3299
|
DrDatePickerComponent,
|
|
3097
|
-
DrDatePickerFormatDirective
|
|
3300
|
+
DrDatePickerFormatDirective,
|
|
3301
|
+
DrDatePickerCustomHeaderComponent
|
|
3098
3302
|
];
|
|
3099
3303
|
class DrInputsModule {
|
|
3100
3304
|
}
|
|
@@ -3107,7 +3311,10 @@ DrInputsModule.decorators = [
|
|
|
3107
3311
|
ReactiveFormsModule,
|
|
3108
3312
|
CommonModule,
|
|
3109
3313
|
NgSelectModule,
|
|
3110
|
-
MatDatepickerModule
|
|
3314
|
+
MatDatepickerModule
|
|
3315
|
+
],
|
|
3316
|
+
providers: [
|
|
3317
|
+
DrDatePickerService
|
|
3111
3318
|
]
|
|
3112
3319
|
},] }
|
|
3113
3320
|
];
|
|
@@ -3256,5 +3463,5 @@ DrAccordionModule.decorators = [
|
|
|
3256
3463
|
* Generated bundle index. Do not edit.
|
|
3257
3464
|
*/
|
|
3258
3465
|
|
|
3259
|
-
export { AnyTagComponent, CheckboxComponent, DateTagComponent, DateTagModule, DayTagComponent, DrAccordionComponent, DrAccordionItemBodyComponent, DrAccordionItemComponent, DrAccordionItemHeaderComponent, DrAccordionModule, DrAvatarComponent, DrAvatarModule, DrAvatarPipe, DrButtonComponent, DrDatePickerComponent, DrDatePickerFormatDirective, DrDropdownComponent, DrDropdownDirective, DrDropdownItemShowPipe, DrDropdownModule, DrDropdownPositionDirective, DrDropdownService, DrInputComponent, DrInputsModule, DrPopoverAlignmentDimension, DrPopoverComponent, DrPopoverDirective, DrPopoverModule, DrPopoverRef, DrPopoverService, DrSelectComponent, DrSpinnerComponent, DrSpinnerDirective, DrSpinnerModule, DrTabComponent, DrTabsComponent, DrTabsModule, DrTagComponent, DrTagModule, DrToggleButtonComponent, DrToggleComponent, DrTooltipDirective, DrTooltipModule, ForecastTagComponent, ISpinnerOptions, ListTagComponent, ListTagModule, MonthTagComponent, QuarterTagComponent, RadioButtonComponent, RadioGroupComponent, TooltipComponent, WeekTagComponent, YearTagComponent, components$2 as ɵa, POPUP_ANIMATION as ɵb,
|
|
3466
|
+
export { AnyTagComponent, CheckboxComponent, DateTagComponent, DateTagModule, DayTagComponent, DrAccordionComponent, DrAccordionItemBodyComponent, DrAccordionItemComponent, DrAccordionItemHeaderComponent, DrAccordionModule, DrAvatarComponent, DrAvatarModule, DrAvatarPipe, DrButtonComponent, DrDatePickerComponent, DrDatePickerFormatDirective, DrDropdownComponent, DrDropdownDirective, DrDropdownItemShowPipe, DrDropdownModule, DrDropdownPositionDirective, DrDropdownService, DrInputComponent, DrInputsModule, DrPopoverAlignmentDimension, DrPopoverComponent, DrPopoverDirective, DrPopoverModule, DrPopoverRef, DrPopoverService, DrSelectComponent, DrSpinnerComponent, DrSpinnerDirective, DrSpinnerModule, DrTabComponent, DrTabsComponent, DrTabsModule, DrTagComponent, DrTagModule, DrToggleButtonComponent, DrToggleComponent, DrTooltipDirective, DrTooltipModule, ForecastTagComponent, ISpinnerOptions, ListTagComponent, ListTagModule, MonthTagComponent, QuarterTagComponent, RadioButtonComponent, RadioGroupComponent, TooltipComponent, WeekTagComponent, YearTagComponent, components$2 as ɵa, POPUP_ANIMATION as ɵb, DrDatePickerService as ɵc, CustomDateFormat as ɵd, DrDatePickerCustomHeaderComponent as ɵe };
|
|
3260
3467
|
//# sourceMappingURL=datarailsshared-datarailsshared.js.map
|