@datarailsshared/datarailsshared 1.4.19-tigers → 1.4.21-tigers

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.
Files changed (38) hide show
  1. package/bundles/datarailsshared-datarailsshared.umd.js +1426 -1300
  2. package/bundles/datarailsshared-datarailsshared.umd.js.map +1 -1
  3. package/datarailsshared-datarailsshared-1.4.21-tigers.tgz +0 -0
  4. package/datarailsshared-datarailsshared.d.ts +5 -3
  5. package/datarailsshared-datarailsshared.metadata.json +1 -1
  6. package/esm2015/datarailsshared-datarailsshared.js +6 -4
  7. package/esm2015/lib/dr-avatar/dr-avatar.component.js +5 -3
  8. package/esm2015/lib/dr-avatar/dr-avatar.pipe.js +3 -2
  9. package/esm2015/lib/dr-inputs/date-pickers/directives/dr-date-picker-format.directive.js +47 -0
  10. package/esm2015/lib/dr-inputs/date-pickers/dr-date-picker/dr-date-picker.component.js +152 -0
  11. package/esm2015/lib/dr-inputs/date-pickers/dr-date-picker-with-timeframe/dr-date-picker-with-timeframe.component.js +72 -0
  12. package/esm2015/lib/dr-inputs/date-pickers/dr-date-picker_custom-header/dr-date-picker_custom-header.component.js +128 -0
  13. package/esm2015/lib/dr-inputs/date-pickers/services/dr-date-picker.service.js +55 -0
  14. package/esm2015/lib/dr-inputs/dr-inputs.module.js +13 -9
  15. package/esm2015/lib/dr-tooltip/dr-tooltip.component.js +13 -3
  16. package/esm2015/lib/dr-tooltip/dr-tooltip.directive.js +43 -10
  17. package/esm2015/lib/models/datePicker.js +8 -1
  18. package/esm2015/public-api.js +3 -3
  19. package/fesm2015/datarailsshared-datarailsshared.js +630 -526
  20. package/fesm2015/datarailsshared-datarailsshared.js.map +1 -1
  21. package/lib/dr-avatar/dr-avatar.component.d.ts +1 -0
  22. package/lib/dr-inputs/{dr-date-picker → date-pickers/directives}/dr-date-picker-format.directive.d.ts +1 -1
  23. package/lib/dr-inputs/date-pickers/dr-date-picker/dr-date-picker.component.d.ts +55 -0
  24. package/lib/dr-inputs/date-pickers/dr-date-picker-with-timeframe/dr-date-picker-with-timeframe.component.d.ts +26 -0
  25. package/lib/dr-inputs/{dr-date-picker → date-pickers}/dr-date-picker_custom-header/dr-date-picker_custom-header.component.d.ts +4 -4
  26. package/lib/dr-inputs/date-pickers/services/dr-date-picker.service.d.ts +18 -0
  27. package/lib/dr-tooltip/dr-tooltip.component.d.ts +4 -0
  28. package/lib/dr-tooltip/dr-tooltip.directive.d.ts +4 -0
  29. package/lib/models/datePicker.d.ts +12 -0
  30. package/package.json +1 -1
  31. package/public-api.d.ts +1 -2
  32. package/datarailsshared-datarailsshared-1.4.19-tigers.tgz +0 -0
  33. package/esm2015/lib/dr-inputs/dr-date-picker/dr-date-picker-format.directive.js +0 -47
  34. package/esm2015/lib/dr-inputs/dr-date-picker/dr-date-picker.component.js +0 -183
  35. package/esm2015/lib/dr-inputs/dr-date-picker/dr-date-picker.service.js +0 -41
  36. package/esm2015/lib/dr-inputs/dr-date-picker/dr-date-picker_custom-header/dr-date-picker_custom-header.component.js +0 -129
  37. package/lib/dr-inputs/dr-date-picker/dr-date-picker.component.d.ts +0 -54
  38. package/lib/dr-inputs/dr-date-picker/dr-date-picker.service.d.ts +0 -12
@@ -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, Injectable, Optional, Injector, Host, NgModule } from '@angular/core';
3
- import { FormControl, NG_VALUE_ACCESSOR, NgControl, NgModel, FormsModule, ReactiveFormsModule } from '@angular/forms';
2
+ import { EventEmitter, Component, ViewEncapsulation, Input, Output, ChangeDetectionStrategy, ChangeDetectorRef, forwardRef, ElementRef, Inject, PLATFORM_ID, ContentChildren, Renderer2, HostBinding, ContentChild, Pipe, TemplateRef, HostListener, Directive, ComponentFactoryResolver, ViewContainerRef, ViewChild, Injector, Injectable, Host, NgModule, Optional } from '@angular/core';
3
+ import { FormControl, NG_VALUE_ACCESSOR, NgModel, FormsModule, ReactiveFormsModule, NgControl } 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
6
  import * as momentImported from 'moment';
7
7
  import { isPlatformBrowser, DOCUMENT, CommonModule } from '@angular/common';
8
8
  import { Subject, from, merge, fromEvent, noop as noop$1, BehaviorSubject } from 'rxjs';
9
- import { startWith, switchMap, takeUntil, filter, take, first, skip, debounceTime, distinctUntilChanged } from 'rxjs/operators';
9
+ import { startWith, switchMap, takeUntil, filter, skip, first, debounceTime, distinctUntilChanged, take } 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 { MatCalendar, MatDatepickerModule } from '@angular/material/datepicker';
14
+ import { MatDatepickerModule, MatCalendar } 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';
@@ -1335,6 +1335,7 @@ DrSelectComponent.propDecorators = {
1335
1335
  class DrAvatarComponent {
1336
1336
  constructor() {
1337
1337
  this.warning = false;
1338
+ this.showUnassigned = false;
1338
1339
  this.userClicked = new EventEmitter();
1339
1340
  this.parsedUsers = [];
1340
1341
  }
@@ -1361,22 +1362,24 @@ class DrAvatarComponent {
1361
1362
  DrAvatarComponent.decorators = [
1362
1363
  { type: Component, args: [{
1363
1364
  selector: 'dr-avatar',
1364
- template: "<div class=\"users-section\">\n <div *ngIf=\"!parsedUsers.length\"\n class=\"users-section__default\">\n </div>\n\n <div *ngFor=\"let user of getFirstUsers()\"\n class=\"users-section__user\"\n [class]=\"'icon-' + user.colorNumber + ' ' + user.status\"\n (click)=\"userClicked.emit()\"\n [matTooltip]=\"user | drAvatar\"\n [matTooltipPosition]=\"'below'\">\n {{user | drAvatar: 'initials'}}\n </div>\n\n <div *ngIf=\"parsedUsers.length > 2\"\n class=\"users-section__user icon-2\"\n [drTooltip]=\"usersTemplate\"\n [drTooltipPosition]=\"'bottom'\">\n {{getLastUsers().length}}\n </div>\n</div>\n\n<ng-template #usersTemplate>\n <div *ngFor=\"let user of getLastUsers()\" class=\"users-popover-item\">\n <div class=\"users-section__user\"\n (click)=\"userClicked.emit()\"\n [class]=\"user.class\">\n {{user | drAvatar: 'initials'}}\n </div>\n <span class=\"username\">\n {{user | drAvatar}}\n </span>\n </div>\n</ng-template>\n",
1365
+ template: "<div class=\"users-section\">\n <div *ngIf=\"!parsedUsers.length\"\n class=\"users-section__default\">\n </div>\n\n <div *ngFor=\"let user of getFirstUsers()\"\n class=\"users-section__user\"\n [class]=\"'icon-' + user.colorNumber + ' ' + user.status\"\n [ngClass]=\"{ 'users-section__default': showUnassigned && !user.email }\"\n (click)=\"userClicked.emit()\"\n [matTooltip]=\"user | drAvatar\"\n [matTooltipPosition]=\"'below'\">\n {{user | drAvatar: 'initials'}}\n </div>\n\n <div *ngIf=\"parsedUsers.length > 2\"\n class=\"users-section__user icon-2\"\n [drTooltip]=\"usersTemplate\"\n [drTooltipPosition]=\"'bottom'\">\n {{getLastUsers().length}}\n </div>\n</div>\n\n<ng-template #usersTemplate>\n <div *ngFor=\"let user of getLastUsers()\" class=\"users-popover-item\">\n <div class=\"users-section__user\"\n (click)=\"userClicked.emit()\"\n [class]=\"user.class\">\n {{user | drAvatar: 'initials'}}\n </div>\n <span class=\"username\">\n {{user | drAvatar}}\n </span>\n </div>\n</ng-template>\n",
1365
1366
  changeDetection: ChangeDetectionStrategy.OnPush,
1366
- styles: [":host{width:auto}.users-section{display:flex;height:28px}.users-section__default{display:flex;height:28px;width:28px;border-radius:14px;background:url(\"data:image/svg+xml,%3Csvg width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Crect width%3D%2224%22 height%3D%2224%22 rx%3D%2212%22 fill%3D%22%23E5E6EA%22%2F%3E%3Cpath fill-rule%3D%22evenodd%22 clip-rule%3D%22evenodd%22 d%3D%22M15 9.75C15 11.4069 13.6569 12.75 12 12.75C10.3431 12.75 9 11.4069 9 9.75C9 8.09315 10.3431 6.75 12 6.75C13.6569 6.75 15 8.09315 15 9.75ZM13.875 9.75C13.875 10.7855 13.0355 11.625 12 11.625C10.9645 11.625 10.125 10.7855 10.125 9.75C10.125 8.71447 10.9645 7.875 12 7.875C13.0355 7.875 13.875 8.71447 13.875 9.75Z%22 fill%3D%22%2351566F%22%2F%3E%3Cpath d%3D%22M15.9968 16.7631C15.5425 15.3973 14.0368 14.25 12 14.25C9.9632 14.25 8.45748 15.3973 8.00319 16.7631C7.91242 17.0359 7.67416 17.25 7.38657 17.25C7.04536 17.25 6.77507 16.9539 6.86275 16.6241C7.39546 14.6206 9.49327 13.125 12 13.125C14.5067 13.125 16.6045 14.6206 17.1373 16.6241C17.2249 16.9539 16.9546 17.25 16.6134 17.25C16.3259 17.25 16.0876 17.0359 15.9968 16.7631Z%22 fill%3D%22%2351566F%22%2F%3E%3C%2Fsvg%3E\") no-repeat;background-size:cover}.users-popover-item{display:flex;align-items:center;margin:12px}.users-popover-item .username{color:#51566f;font-size:14px}.users-popover-item .users-section__user{margin-right:8px}.users-section__user{position:relative;display:flex;justify-content:center;align-items:center;height:28px;width:28px;border-radius:14px;background:red;color:#fff;font-size:12px}.users-section__user.icon-0{background-color:#7b61ff}.users-section__user.icon-1{background-color:#21b8f1}.users-section__user.icon-2{background-color:#2969b0}.users-section__user.icon-3{background-color:#51566f}.users-section__user.icon-4{background-color:#0061ff}.users-section__user:hover{cursor:pointer}.users-section__user:not(:first-child){margin-left:4px}.users-section__user.online:after,.users-section__user.offline:after,.users-section__user.warning:after{content:\"\";display:flex;width:8px;height:8px;position:absolute;border-radius:4px;top:-2px;right:0}.users-section__user.online:after{background:#03A678}.users-section__user.offline:after{background:#DE2833}.users-section__user.warning:after{background:#FDA014}\n"]
1367
+ styles: [":host{width:auto}.users-section{display:flex;height:28px}.users-section__default{display:flex;height:28px;width:28px;border-radius:14px;background:url(\"data:image/svg+xml,%3Csvg width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Crect width%3D%2224%22 height%3D%2224%22 rx%3D%2212%22 fill%3D%22%23E5E6EA%22%2F%3E%3Cpath fill-rule%3D%22evenodd%22 clip-rule%3D%22evenodd%22 d%3D%22M15 9.75C15 11.4069 13.6569 12.75 12 12.75C10.3431 12.75 9 11.4069 9 9.75C9 8.09315 10.3431 6.75 12 6.75C13.6569 6.75 15 8.09315 15 9.75ZM13.875 9.75C13.875 10.7855 13.0355 11.625 12 11.625C10.9645 11.625 10.125 10.7855 10.125 9.75C10.125 8.71447 10.9645 7.875 12 7.875C13.0355 7.875 13.875 8.71447 13.875 9.75Z%22 fill%3D%22%2351566F%22%2F%3E%3Cpath d%3D%22M15.9968 16.7631C15.5425 15.3973 14.0368 14.25 12 14.25C9.9632 14.25 8.45748 15.3973 8.00319 16.7631C7.91242 17.0359 7.67416 17.25 7.38657 17.25C7.04536 17.25 6.77507 16.9539 6.86275 16.6241C7.39546 14.6206 9.49327 13.125 12 13.125C14.5067 13.125 16.6045 14.6206 17.1373 16.6241C17.2249 16.9539 16.9546 17.25 16.6134 17.25C16.3259 17.25 16.0876 17.0359 15.9968 16.7631Z%22 fill%3D%22%2351566F%22%2F%3E%3C%2Fsvg%3E\") no-repeat!important;background-size:cover}.users-popover-item{display:flex;align-items:center;margin:12px}.users-popover-item .username{color:#51566f;font-size:14px}.users-popover-item .users-section__user{margin-right:8px}.users-section__user{position:relative;display:flex;justify-content:center;align-items:center;height:28px;width:28px;border-radius:14px;background:red;color:#fff;font-size:12px}.users-section__user.icon-0{background-color:#7b61ff}.users-section__user.icon-1{background-color:#21b8f1}.users-section__user.icon-2{background-color:#2969b0}.users-section__user.icon-3{background-color:#51566f}.users-section__user.icon-4{background-color:#0061ff}.users-section__user:hover{cursor:pointer}.users-section__user:not(:first-child){margin-left:4px}.users-section__user.online:after,.users-section__user.offline:after,.users-section__user.warning:after{content:\"\";display:flex;width:8px;height:8px;position:absolute;border-radius:4px;top:-2px;right:0}.users-section__user.online:after{background:#03A678}.users-section__user.offline:after{background:#DE2833}.users-section__user.warning:after{background:#FDA014}\n"]
1367
1368
  },] }
1368
1369
  ];
1369
1370
  DrAvatarComponent.ctorParameters = () => [];
1370
1371
  DrAvatarComponent.propDecorators = {
1371
1372
  users: [{ type: Input }],
1372
1373
  warning: [{ type: Input }],
1374
+ showUnassigned: [{ type: Input }],
1373
1375
  userClicked: [{ type: Output }]
1374
1376
  };
1375
1377
 
1376
1378
  class DrAvatarPipe {
1377
1379
  transform(item, type = 'full') {
1378
1380
  if (type === 'initials') {
1379
- return (item.first_name && item.last_name ? (item.first_name[0] + item.last_name[0]) : item.email[0]).toUpperCase();
1381
+ const email = item.email ? item.email[0] : '';
1382
+ return (item.first_name && item.last_name ? (item.first_name[0] + item.last_name[0]) : email).toUpperCase();
1380
1383
  }
1381
1384
  return item.first_name && item.last_name ? (item.first_name + ' ' + item.last_name) : item.email;
1382
1385
  }
@@ -1486,10 +1489,17 @@ const POPUP_ANIMATION = [
1486
1489
  class TooltipComponent {
1487
1490
  constructor() {
1488
1491
  this.isContentTemplate = false;
1492
+ this.isMouseOn$ = new BehaviorSubject(false);
1489
1493
  }
1490
1494
  ngOnInit() {
1491
1495
  this.isContentTemplate = this.content instanceof TemplateRef;
1492
1496
  }
1497
+ setMouseOn() {
1498
+ this.isMouseOn$.next(true);
1499
+ }
1500
+ unsetMouseOn() {
1501
+ this.isMouseOn$.next(false);
1502
+ }
1493
1503
  }
1494
1504
  TooltipComponent.decorators = [
1495
1505
  { type: Component, args: [{
@@ -1507,7 +1517,9 @@ TooltipComponent.propDecorators = {
1507
1517
  contentContext: [{ type: Input }],
1508
1518
  position: [{ type: Input }],
1509
1519
  options: [{ type: Input }],
1510
- class: [{ type: Input }]
1520
+ class: [{ type: Input }],
1521
+ setMouseOn: [{ type: HostListener, args: ['mouseenter',] }],
1522
+ unsetMouseOn: [{ type: HostListener, args: ['mouseleave',] }]
1511
1523
  };
1512
1524
 
1513
1525
  class DrTooltipDirective {
@@ -1518,6 +1530,8 @@ class DrTooltipDirective {
1518
1530
  this.contentContext = {};
1519
1531
  this.position = 'top';
1520
1532
  this.class = '';
1533
+ // is used for preserve tooltip from being hidden for N milliseconds
1534
+ this.drTooltipMousleaveTimeout = 0;
1521
1535
  }
1522
1536
  set drTooltipOptions(options) {
1523
1537
  if (options === null || options === void 0 ? void 0 : options.indent) {
@@ -1550,16 +1564,36 @@ class DrTooltipDirective {
1550
1564
  if (this.overlayRef) {
1551
1565
  this.overlayRef.dispose();
1552
1566
  }
1567
+ if (this.tooltipMouseOnSubscription) {
1568
+ this.tooltipMouseOnSubscription.unsubscribe();
1569
+ }
1553
1570
  }
1554
1571
  show() {
1555
- if (this.manualHandling)
1572
+ if (this.manualHandling || this.overlayRef)
1556
1573
  return;
1557
1574
  this.renderTooltip();
1558
1575
  }
1559
1576
  hide() {
1560
- if (this.manualHandling)
1577
+ var _a;
1578
+ if (this.manualHandling || !this.tooltipRef || ((_a = this.tooltipRef) === null || _a === void 0 ? void 0 : _a.instance.isMouseOn$.getValue()))
1561
1579
  return;
1562
- this.destroyTooltip();
1580
+ // if this timeout value is set - then preserve
1581
+ // tooltip from being hidden N milliseconds and not hiding it
1582
+ // in case mouse is pointed on tooltip
1583
+ if (this.drTooltipMousleaveTimeout) {
1584
+ if (this.mouseleaveTimer) {
1585
+ clearTimeout(this.mouseleaveTimer);
1586
+ }
1587
+ this.mouseleaveTimer = setTimeout(() => {
1588
+ var _a;
1589
+ if (this.tooltipRef && !((_a = this.tooltipRef) === null || _a === void 0 ? void 0 : _a.instance.isMouseOn$.getValue())) {
1590
+ this.destroyTooltip();
1591
+ }
1592
+ }, this.drTooltipMousleaveTimeout);
1593
+ }
1594
+ else {
1595
+ this.destroyTooltip();
1596
+ }
1563
1597
  }
1564
1598
  createOverlay() {
1565
1599
  const positionStrategy = this.overlayPositionBuilder
@@ -1571,12 +1605,17 @@ class DrTooltipDirective {
1571
1605
  var _a;
1572
1606
  this.createOverlay();
1573
1607
  if (!((_a = this.overlayRef) === null || _a === void 0 ? void 0 : _a.hasAttached()) && this.content) {
1574
- const tooltipRef = this.overlayRef.attach(new ComponentPortal(TooltipComponent));
1575
- tooltipRef.instance.content = this.content;
1576
- tooltipRef.instance.contentContext = this.contentContext;
1577
- tooltipRef.instance.position = this.position;
1578
- tooltipRef.instance.options = this.options;
1579
- tooltipRef.instance.class = this.class + ' ' + this.position;
1608
+ this.tooltipRef = this.overlayRef.attach(new ComponentPortal(TooltipComponent));
1609
+ this.tooltipRef.instance.content = this.content;
1610
+ this.tooltipRef.instance.contentContext = this.contentContext;
1611
+ this.tooltipRef.instance.position = this.position;
1612
+ this.tooltipRef.instance.options = this.options;
1613
+ this.tooltipRef.instance.class = this.class + ' ' + this.position;
1614
+ this.tooltipMouseOnSubscription = this.tooltipRef.instance.isMouseOn$.pipe(skip(1)).subscribe((isMouseOn) => {
1615
+ if (!isMouseOn) {
1616
+ this.destroyTooltip();
1617
+ }
1618
+ });
1580
1619
  }
1581
1620
  }
1582
1621
  destroyTooltip() {
@@ -1584,6 +1623,10 @@ class DrTooltipDirective {
1584
1623
  this.overlayRef.dispose();
1585
1624
  }
1586
1625
  this.overlayRef = null;
1626
+ this.tooltipRef = null;
1627
+ if (this.tooltipMouseOnSubscription) {
1628
+ this.tooltipMouseOnSubscription.unsubscribe();
1629
+ }
1587
1630
  }
1588
1631
  }
1589
1632
  DrTooltipDirective.decorators = [
@@ -1601,6 +1644,7 @@ DrTooltipDirective.propDecorators = {
1601
1644
  contentContext: [{ type: Input, args: ['drTooltipContext',] }],
1602
1645
  position: [{ type: Input, args: ['drTooltipPosition',] }],
1603
1646
  class: [{ type: Input, args: ['drTooltipClass',] }],
1647
+ drTooltipMousleaveTimeout: [{ type: Input }],
1604
1648
  drTooltipOptions: [{ type: Input }],
1605
1649
  showTooltip: [{ type: Input, args: ['drTooltipShow',] }],
1606
1650
  show: [{ type: HostListener, args: ['mouseenter',] }],
@@ -1880,521 +1924,106 @@ DrButtonComponent.propDecorators = {
1880
1924
  <dr-button [isDisabled]="false" [theme]="'text-link'">Text Link</dr-button>
1881
1925
  */
1882
1926
 
1883
- const MAT_DEFAULT_DATE_FORMAT = 'MM/DD/yyyy';
1884
- const DATE_INPUT_FORMAT = 'YYYY/MM/DD';
1885
- const YEAR_FORMAT = 'yyyy';
1886
- const MONTH_YEAR_FORMAT = 'MM/yyyy';
1887
- const QUARTER_FORMAT = 'Q/yyyy';
1888
- class CustomDateFormat {
1889
- constructor() {
1890
- this._parse = {
1891
- dateInput: DATE_INPUT_FORMAT
1892
- };
1893
- this._display = {
1894
- dateInput: DATE_INPUT_FORMAT,
1895
- monthYearLabel: 'MMM YYYY',
1896
- dateA11yLabel: 'LL',
1897
- monthYearA11yLabel: 'MMM YYYY',
1898
- quarterYearLabel: 'Q/YYYY',
1899
- yearLabel: 'YYYY'
1900
- };
1901
- }
1902
- set parse(parse) {
1903
- this._parse = Object.assign({}, this._parse, parse);
1904
- }
1905
- get parse() {
1906
- return this._parse;
1907
- }
1908
- set display(display) {
1909
- this._display = Object.assign({}, this._display, display);
1910
- }
1911
- get display() {
1912
- return this._display;
1927
+ class DrPopoverRef {
1928
+ constructor(overlayRef) {
1929
+ this.overlayRef = overlayRef;
1930
+ this.onClose$ = new Subject();
1931
+ // FIXME: this decision was made because of the incompatible rxjs version
1932
+ /**
1933
+ * Correct type is @type {Observable<any>}
1934
+ */
1935
+ this.onClose = this.onClose$.asObservable();
1936
+ this.onBackdropClick = this.overlayRef.backdropClick();
1913
1937
  }
1914
- updateDateFormat(parse, display) {
1915
- this.parse = parse;
1916
- if (!display) {
1917
- display = parse;
1918
- }
1919
- this.display = display;
1938
+ close(res) {
1939
+ this.overlayRef.detach();
1940
+ this.overlayRef.dispose();
1941
+ this.onClose$.next(res);
1942
+ this.onClose$.complete();
1920
1943
  }
1921
1944
  }
1922
1945
 
1923
- const moment$2 = require('moment');
1924
- class DrDatePickerService {
1925
- constructor() {
1926
- this.timeframe = 'day';
1927
- this.format = new BehaviorSubject(MAT_DEFAULT_DATE_FORMAT);
1928
- this.updatedQuater = new Subject();
1929
- }
1930
- getQuarterDisplay(value, format) {
1931
- return 'Q' + moment$2(value).quarter() + format.charAt(1) + moment$2(value).year();
1932
- }
1933
- setTimeframe(format) {
1934
- const lowerCaseFormat = format.toLowerCase();
1935
- switch (true) {
1936
- case lowerCaseFormat.includes('q'):
1937
- this.timeframe = 'quarter';
1938
- break;
1939
- case lowerCaseFormat.includes('d'):
1940
- this.timeframe = 'day';
1941
- break;
1942
- case lowerCaseFormat.includes('m'):
1943
- this.timeframe = 'month';
1944
- break;
1945
- case lowerCaseFormat.includes('y'):
1946
- this.timeframe = 'year';
1947
- break;
1948
- default:
1949
- this.timeframe = 'day';
1950
- }
1946
+ var DrPopoverAlignmentDimension;
1947
+ (function (DrPopoverAlignmentDimension) {
1948
+ DrPopoverAlignmentDimension["Width"] = "width";
1949
+ DrPopoverAlignmentDimension["Height"] = "height";
1950
+ })(DrPopoverAlignmentDimension || (DrPopoverAlignmentDimension = {}));
1951
+ const DEFAULT_CONFIG = {
1952
+ hasBackdrop: false,
1953
+ closeOnBackdropClick: false,
1954
+ backdropClass: 'dr-popover-transparent-backdrop',
1955
+ };
1956
+ const DEFAULT_MODEL = {
1957
+ position: 'bottom',
1958
+ class: '',
1959
+ overlayConfig: {},
1960
+ manualClosing: { enabled: false },
1961
+ };
1962
+ function getAlignmentDimension(position) {
1963
+ if (!POPUP_POSITIONS[position])
1964
+ return DrPopoverAlignmentDimension.Width;
1965
+ if ((position === null || position === void 0 ? void 0 : position.includes('left')) || (position === null || position === void 0 ? void 0 : position.includes('right'))) {
1966
+ return DrPopoverAlignmentDimension.Height;
1951
1967
  }
1968
+ return DrPopoverAlignmentDimension.Width;
1952
1969
  }
1953
- DrDatePickerService.ɵprov = i0.ɵɵdefineInjectable({ factory: function DrDatePickerService_Factory() { return new DrDatePickerService(); }, token: DrDatePickerService, providedIn: "root" });
1954
- DrDatePickerService.decorators = [
1955
- { type: Injectable, args: [{
1956
- providedIn: 'root',
1957
- },] }
1958
- ];
1959
1970
 
1960
- const moment$1 = require('moment');
1961
- class DrDatePickerCustomHeaderComponent {
1962
- constructor(_calendar, _dateAdapter, _dateFormats, cdr, datePickerService) {
1963
- this._calendar = _calendar;
1964
- this._dateAdapter = _dateAdapter;
1965
- this._dateFormats = _dateFormats;
1971
+ class DrPopoverComponent {
1972
+ constructor(cdr, componentFactoryResolver, viewContainerRef, elementRef, popoverRef) {
1966
1973
  this.cdr = cdr;
1967
- this.datePickerService = datePickerService;
1968
- this._destroyed = new Subject();
1969
- this.quarters = [1, 2, 3, 4];
1970
- this.selectedQuarter = 1;
1971
- this.timeframeOptions = [{
1972
- title: 'Day',
1973
- value: 'month',
1974
- format: MAT_DEFAULT_DATE_FORMAT,
1975
- periodLabel: () => this._dateAdapter
1976
- .format(this._calendar.activeDate, this._dateFormats.display.monthYearLabel)
1977
- .toLocaleUpperCase()
1978
- }, {
1979
- title: 'Month',
1980
- value: 'year',
1981
- format: MONTH_YEAR_FORMAT,
1982
- periodLabel: () => String(moment$1(this._calendar.activeDate).year())
1983
- }, {
1984
- title: 'Quarter',
1985
- value: 'none',
1986
- format: QUARTER_FORMAT,
1987
- periodLabel: () => String(moment$1(this._calendar.activeDate).year())
1988
- }, {
1989
- title: 'Year',
1990
- value: 'multi-year',
1991
- format: YEAR_FORMAT,
1992
- periodLabel: () => {
1993
- const currentYear = moment$1(this._calendar.activeDate).year();
1994
- const startPeriod = Math.floor(currentYear / 24) * 24;
1995
- return startPeriod + '-' + (startPeriod + 23);
1996
- }
1997
- }];
1998
- this.pagingSetup = {
1999
- 'year': (forward) => this.pagingDateChange('addCalendarYears', 1, forward),
2000
- 'none': (forward) => this.pagingDateChange('addCalendarYears', 1, forward),
2001
- 'month': (forward) => this.pagingDateChange('addCalendarMonths', 1, forward),
2002
- 'multi-year': (forward) => this.pagingDateChange('addCalendarYears', 24, forward)
2003
- };
2004
- this.selectedTimeframe = 'month';
2005
- this.timeframeSelection = false;
2006
- this.periodMonthLabel = '';
2007
- this.periodYearLabel = '';
2008
- _calendar.stateChanges.pipe(takeUntil(this._destroyed)).subscribe(() => this.setPeriodLabels());
2009
- this.datePickerService.format
2010
- .pipe(take(1))
2011
- .subscribe(value => {
2012
- this.selectedTimeframe = this.timeframeOptions.filter(option => option.format == value)[0].value;
2013
- this.setPeriodLabels();
2014
- });
2015
- _calendar.viewChanged.pipe(takeUntil(this._destroyed)).subscribe(() => this.setPeriodLabels());
2016
- }
2017
- ngOnDestroy() {
2018
- this._destroyed.next();
2019
- this._destroyed.complete();
1974
+ this.componentFactoryResolver = componentFactoryResolver;
1975
+ this.viewContainerRef = viewContainerRef;
1976
+ this.elementRef = elementRef;
1977
+ this.popoverRef = popoverRef;
1978
+ this.class = '';
1979
+ this.isContentTemplate = false;
1980
+ this.popover = true;
2020
1981
  }
2021
- setPeriodLabels() {
2022
- const currentTimeframeOption = this.timeframeOptions.filter(option => option.value === this._calendar.currentView)[0];
2023
- const fullPeriodLabel = currentTimeframeOption.periodLabel();
2024
- if (this._calendar.currentView === 'month') {
2025
- this.periodMonthLabel = fullPeriodLabel.slice(0, 3);
2026
- this.periodYearLabel = fullPeriodLabel.slice(4);
2027
- }
2028
- else {
2029
- this.periodMonthLabel = '';
2030
- this.periodYearLabel = fullPeriodLabel;
1982
+ clickOutside(e) {
1983
+ const isTargetHost = this.hostRef instanceof ElementRef && (this.hostRef.nativeElement === e.target || this.hostRef.nativeElement.contains(e.target));
1984
+ const isTargetInPopover = this.elementRef.nativeElement.contains(e.target);
1985
+ const isTargetInDatepicker = e.target.closest('mat-datepicker-popup');
1986
+ const isTargetInSelect = e.target.closest('ng-dropdown-panel');
1987
+ const isTargetInDatepickerContent = e.target.closest('mat-datepicker-content');
1988
+ if (!isTargetHost
1989
+ && !isTargetInPopover
1990
+ && !isTargetInDatepicker
1991
+ && !isTargetInSelect
1992
+ && !isTargetInDatepickerContent
1993
+ && !this.manualClosing.enabled) {
1994
+ this.popoverRef.close();
2031
1995
  }
2032
- this.cdr.markForCheck();
2033
1996
  }
2034
- setTimeframe() {
2035
- this.timeframeSelection = false;
2036
- this._calendar.currentView = this.selectedTimeframe;
2037
- const chosenTimeframeOption = this.timeframeOptions.filter(option => option.value === this.selectedTimeframe)[0];
2038
- this.datePickerService.format.next(chosenTimeframeOption.format);
2039
- this.datePickerService.setTimeframe(chosenTimeframeOption.format);
2040
- if (this.selectedTimeframe == 'none') {
2041
- this.selectedQuarter = moment$1(this._calendar.activeDate).quarter();
1997
+ ngOnInit() {
1998
+ this.isContentTemplate = this.content instanceof TemplateRef;
1999
+ if (!this.isContentTemplate) {
2000
+ this.componentRef = this.viewContainerRef.createComponent(this.componentFactoryResolver.resolveComponentFactory(this.content));
2001
+ Object.assign(this.componentRef.instance, this.contentContext);
2002
+ this.popoverContainer.nativeElement.appendChild(this.componentRef.location.nativeElement);
2042
2003
  }
2043
- }
2044
- get currentViewIsQuater() {
2045
- return !['month', 'year', 'multi-year'].includes(this._calendar.currentView);
2046
- }
2047
- switchViewOnClickOnPeriodLabel(view) {
2048
- this._calendar.currentView = view;
2049
- }
2050
- onSelectQuater(quarterNumber) {
2051
- const monthsInQuarter = 3;
2052
- this.selectedQuarter = moment$1(this._calendar.activeDate).quarter();
2053
- const unadaptedDate = this._dateAdapter.addCalendarMonths(this._calendar.activeDate, monthsInQuarter * (quarterNumber - this.selectedQuarter));
2054
- this._calendar.activeDate = unadaptedDate;
2055
- this.datePickerService.updatedQuater.next(moment$1(unadaptedDate));
2056
- this.datePickerService.calendarInstance.close();
2057
- }
2058
- pagingClicked(forward) {
2059
- this.pagingSetup[this._calendar.currentView] && this.pagingSetup[this._calendar.currentView](forward);
2060
- }
2061
- pagingDateChange(actionCall, amount, forward) {
2062
- this._calendar.activeDate = this._dateAdapter[actionCall](this._calendar.activeDate, forward ? amount : -amount);
2063
- this.setPeriodLabels();
2004
+ if (this.alignment === 'host') {
2005
+ this[getAlignmentDimension(this.position)] = '100%';
2006
+ }
2007
+ this.cdr.detectChanges();
2064
2008
  }
2065
2009
  }
2066
- DrDatePickerCustomHeaderComponent.decorators = [
2010
+ DrPopoverComponent.decorators = [
2067
2011
  { type: Component, args: [{
2068
- selector: 'dr-date-picker_custom-header.component',
2069
- template: "<div class=\"dr-datepicker__timeframe-select__wrapper\">\n <dr-select \n class=\"dr-datepicker__timeframe-select\"\n [(ngModel)]=\"selectedTimeframe\"\n [items]=\"timeframeOptions\"\n bindLabel=\"title\"\n bindValue=\"value\"\n (ngModelChange)=\"setTimeframe()\">\n </dr-select>\n</div>\n\n<div class=\"dr-date-paging\">\n <div class=\"dr-date-paging flip-page-button\"\n (click)=\"pagingClicked(false)\">\n <i class=\"dr-icon-arrow-left presentation_buttons-navigate_input\"></i> \n </div>\n <span class=\"example-header-label\">\n <span (click)=\"switchViewOnClickOnPeriodLabel('year')\">{{periodMonthLabel + ' '}}</span> \n <span (click)=\"switchViewOnClickOnPeriodLabel('multi-year')\">{{periodYearLabel}}</span>\n </span>\n <div class=\"dr-date-paging flip-page-button\"\n (click)=\"pagingClicked(true)\">\n <i class=\"dr-icon-arrow-right presentation_buttons-navigate_input\"></i>\n </div>\n</div>\n<div #quarterlyDatePicker class=\"dr-quarterly-datepicker\" *ngIf=\"currentViewIsQuater\">\n <div *ngFor=\"let quarter of quarters\" \n class=\"quarter-selector\" (click)=\"onSelectQuater(quarter)\"\n [class]=\"quarter == selectedQuarter ? 'selected' : ''\"\n >Q{{quarter}}</div>\n</div>\n\n",
2012
+ selector: 'dr-popover',
2013
+ template: "<div class=\"dr-popover\" [class]=\"class\" #popoverContainer>\n <ng-container *ngIf=\"isContentTemplate\">\n <ng-container *ngTemplateOutlet=\"content; context: contentContext\"></ng-container>\n </ng-container>\n</div>\n",
2014
+ animations: [
2015
+ trigger('popover', POPUP_ANIMATION),
2016
+ ],
2070
2017
  changeDetection: ChangeDetectionStrategy.OnPush,
2071
- 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}.example-header-label{cursor:pointer}.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"]
2018
+ styles: [".dr-popover{display:flex;background:#fff;border:1px solid #E5E5E5;border-radius:5px;box-sizing:border-box;box-shadow:0 4px 14px #0003;font-size:12px;color:#545a6b;max-height:100vh;max-width:100vw;overflow:auto}::ng-deep .dr-popover-transparent-backdrop{background-color:transparent}\n"]
2072
2019
  },] }
2073
2020
  ];
2074
- DrDatePickerCustomHeaderComponent.ctorParameters = () => [
2075
- { type: MatCalendar },
2076
- { type: DateAdapter },
2077
- { type: CustomDateFormat, decorators: [{ type: Inject, args: [MAT_DATE_FORMATS,] }] },
2021
+ DrPopoverComponent.ctorParameters = () => [
2078
2022
  { type: ChangeDetectorRef },
2079
- { type: DrDatePickerService }
2080
- ];
2081
-
2082
- const moment = require('moment');
2083
- const noop = () => { };
2084
- const ɵ0$1 = noop;
2085
- class DrDatePickerComponent {
2086
- constructor(cdr, _dateAdapter, datePickerService) {
2087
- this.cdr = cdr;
2088
- this._dateAdapter = _dateAdapter;
2089
- this.datePickerService = datePickerService;
2090
- this._destroyed = new Subject();
2091
- this.readonly = true;
2092
- this._format = MAT_DEFAULT_DATE_FORMAT;
2093
- this.customHeader = DrDatePickerCustomHeaderComponent;
2094
- this.onChangeFormat = new EventEmitter();
2095
- this.timeframeSelection = false;
2096
- this.takeEndOfPeriod = false;
2097
- this.placeholder = 'Select';
2098
- this.min = null;
2099
- this.max = null;
2100
- this.calendarViewSetup = {
2101
- 'year': (calendar) => calendar.currentView = 'multi-year',
2102
- 'month': (calendar) => calendar.currentView = 'year',
2103
- 'quarter': (calendar) => calendar.currentView = 'none',
2104
- 'day': (calendar) => calendar.currentView = 'month'
2105
- };
2106
- this.pagingSetup = {
2107
- 'year': (forward) => this.pagingDateChange('addCalendarYears', 1, forward),
2108
- 'quarter': (forward) => this.pagingDateChange('addCalendarMonths', 3, forward),
2109
- 'month': (forward) => this.pagingDateChange('addCalendarMonths', 1, forward),
2110
- 'day': (forward) => this.pagingDateChange('addCalendarDays', 1, forward)
2111
- };
2112
- this.innerValue = null;
2113
- this.onTouchedCallback = noop;
2114
- this.onChangeCallback = noop;
2115
- datePickerService.format
2116
- .pipe(takeUntil(this._destroyed))
2117
- .subscribe((value) => {
2118
- this._format = value;
2119
- this.onChangeFormat.emit(this.normalizeValue(value));
2120
- cdr.markForCheck();
2121
- });
2122
- datePickerService.updatedQuater
2123
- .pipe(takeUntil(this._destroyed))
2124
- .subscribe((value) => {
2125
- this.tryToNormalaizeTimeframe(value, 'quarter');
2126
- this.writeValue(value);
2127
- this.onChangeCallback(value);
2128
- });
2129
- }
2130
- set format(value) {
2131
- if (value) {
2132
- value = this.normalizeValue(value);
2133
- this._format = value;
2134
- this.datePickerService.format.next(value);
2135
- this.datePickerService.setTimeframe(value);
2136
- this.cdr.markForCheck();
2137
- }
2138
- }
2139
- ngAfterViewInit() {
2140
- this.datePickerService.calendarInstance = this.dp;
2141
- if (this._format === MAT_DEFAULT_DATE_FORMAT) {
2142
- return;
2143
- }
2144
- setTimeout(() => {
2145
- const popupInstance = this.dp._popupComponentRef.instance;
2146
- const calenderInstance = popupInstance._calendar._calendarHeaderPortal._attachedHost._attachedRef.instance;
2147
- calenderInstance.currentPeriodClicked = function () {
2148
- this.calendarViewSetup[this.datePickerService.timeframe] && this.calendarViewSetup[this.datePickerService.timeframe](this.calendar);
2149
- };
2150
- }, 1000);
2151
- }
2152
- tryToNormalaizeTimeframe(normalizedRef, timeframe) {
2153
- if (this.takeEndOfPeriod) {
2154
- normalizedRef.endOf(timeframe);
2155
- }
2156
- normalizedRef.set('hour', 12);
2157
- }
2158
- get value() {
2159
- return this.innerValue;
2160
- }
2161
- set value(v) {
2162
- if (v !== this.innerValue) {
2163
- this.innerValue = v;
2164
- this.onChangeCallback(v);
2165
- }
2166
- this.cdr.markForCheck();
2167
- }
2168
- registerOnChange(fn) {
2169
- this.onChangeCallback = fn;
2170
- }
2171
- registerOnTouched(fn) {
2172
- this.onTouchedCallback = fn;
2173
- }
2174
- writeValue(value) {
2175
- if (value !== this.innerValue) {
2176
- if (value && typeof value === 'number') {
2177
- this.innerValue = moment.unix(value);
2178
- }
2179
- else {
2180
- this.innerValue = value;
2181
- }
2182
- this.tryToNormalaizeTimeframe(this.innerValue, this.datePickerService.timeframe);
2183
- this.cdr.markForCheck();
2184
- }
2185
- }
2186
- get quarterDisplay() {
2187
- return this.datePickerService.getQuarterDisplay(this.value, this._format);
2188
- }
2189
- normalizeValue(value) {
2190
- if (value.includes('d')) {
2191
- value = value.replace(/d/g, 'D');
2192
- }
2193
- else if (value.includes('D')) {
2194
- value = value.replace(/D/g, 'd');
2195
- }
2196
- return value;
2197
- }
2198
- chosenMonthHandler(normalizedMonth, datepicker) {
2199
- if (this.datePickerService.timeframe === 'month') {
2200
- this.tryToNormalaizeTimeframe(normalizedMonth, 'month');
2201
- this.writeValue(normalizedMonth);
2202
- this.onChangeCallback(normalizedMonth);
2203
- datepicker.close();
2204
- }
2205
- }
2206
- chosenYearHandler(normalizedYear, datepicker) {
2207
- if (this.datePickerService.timeframe === 'year') {
2208
- this.tryToNormalaizeTimeframe(normalizedYear, 'year');
2209
- this.writeValue(normalizedYear);
2210
- this.onChangeCallback(normalizedYear);
2211
- datepicker.close();
2212
- }
2213
- }
2214
- pagingClicked(forward) {
2215
- this.pagingSetup[this.datePickerService.timeframe] && this.pagingSetup[this.datePickerService.timeframe](forward);
2216
- this.datePickerService.calendarInstance.close();
2217
- }
2218
- pagingDateChange(actionCall, amount, forward) {
2219
- const newValue = this._dateAdapter[actionCall](this.innerValue, forward ? amount : -amount);
2220
- this.writeValue(newValue);
2221
- this.onChangeCallback(newValue);
2222
- }
2223
- ngOnDestroy() {
2224
- this._destroyed.next();
2225
- this._destroyed.complete();
2226
- }
2227
- }
2228
- DrDatePickerComponent.decorators = [
2229
- { type: Component, args: [{
2230
- selector: 'dr-date-picker',
2231
- template: "<div class=\"dr-datepicker__with-timeframe-selection\"\n *ngIf=\"timeframeSelection;else noTimeframeSelection\">\n <div class=\"dr-input-date-paging__flip-page-button\"\n (click)=\"pagingClicked(false)\"\n >\n <i class=\"dr-icon-arrow-left presentation_buttons-navigate_input\"></i> \n </div>\n <div class=\"dr-input-date-paging__quarter-display\"\n *ngIf=\"_format.includes('Q')\"\n (click)=\"datePicker.open()\"\n >{{quarterDisplay}}</div>\n <input [(ngModel)]=\"value\"\n (click)=\"datePicker.open()\"\n [matDatepicker]=\"datePicker\"\n [placeholder]=\"placeholder\"\n [drDatePickerFormat]=\"_format\"\n [readonly]=\"readonly\"\n [class]=\"_format.includes('Q') ? 'when-quarter' : ''\"\n [min]=\"min\"\n [max]=\"max\"/>\n <div class=\"dr-input-date-paging__flip-page-button\"\n (click)=\"pagingClicked(true)\">\n <i class=\"dr-icon-arrow-right presentation_buttons-navigate_input\"></i>\n </div>\n <mat-datepicker #datePicker\n class=\"dr-timeframe-datepicker\"\n [calendarHeaderComponent]=\"customHeader\"\n (yearSelected)=\"chosenYearHandler($event, datePicker)\"\n (monthSelected)=\"chosenMonthHandler($event, datePicker)\">\n </mat-datepicker>\n</div>\n\n<ng-template class=\"dr-datepicker__no-timeframe-selection\"\n #noTimeframeSelection>\n <i class=\"dr-icon-schedule\"></i>\n <input [(ngModel)]=\"value\"\n (click)=\"datePicker.open()\"\n [matDatepicker]=\"datePicker\"\n [placeholder]=\"placeholder\"\n [drDatePickerFormat]=\"_format\"\n [readonly]=\"readonly\"\n [min]=\"min\"\n [max]=\"max\"/>\n <mat-datepicker #datePicker\n (yearSelected)=\"chosenYearHandler($event, datePicker)\"\n (monthSelected)=\"chosenMonthHandler($event, datePicker)\">\n </mat-datepicker>\n</ng-template>\n\n",
2232
- changeDetection: ChangeDetectionStrategy.OnPush,
2233
- providers: [
2234
- { provide: NG_VALUE_ACCESSOR, useExisting: DrDatePickerComponent, multi: true }
2235
- ],
2236
- 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;outline:none}: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"]
2237
- },] }
2238
- ];
2239
- DrDatePickerComponent.ctorParameters = () => [
2240
- { type: ChangeDetectorRef },
2241
- { type: DateAdapter },
2242
- { type: DrDatePickerService }
2243
- ];
2244
- DrDatePickerComponent.propDecorators = {
2245
- _format: [{ type: Input }],
2246
- onChangeFormat: [{ type: Output }],
2247
- format: [{ type: Input }],
2248
- timeframeSelection: [{ type: Input }],
2249
- takeEndOfPeriod: [{ type: Input }],
2250
- placeholder: [{ type: Input }],
2251
- min: [{ type: Input }],
2252
- max: [{ type: Input }],
2253
- dp: [{ type: ViewChild, args: ['datePicker',] }]
2254
- };
2255
-
2256
- class DrDatePickerFormatDirective {
2257
- constructor(matDateFormat, ngControl) {
2258
- this.matDateFormat = matDateFormat;
2259
- this.ngControl = ngControl;
2260
- }
2261
- set datePickerFormat(format) {
2262
- var _a;
2263
- if (this.configDateParse) {
2264
- this.matDateFormat.updateDateFormat(this.configDateParse, this.configDateDisplay);
2265
- }
2266
- else {
2267
- this.matDateFormat.updateDateFormat({ dateInput: format });
2268
- }
2269
- const value = this.ngControl.value;
2270
- (_a = this.ngControl.valueAccessor) === null || _a === void 0 ? void 0 : _a.writeValue(value);
2271
- }
2272
- }
2273
- DrDatePickerFormatDirective.decorators = [
2274
- { type: Directive, args: [{
2275
- selector: '[drDatePickerFormat]',
2276
- providers: [
2277
- {
2278
- provide: DateAdapter,
2279
- useClass: MomentDateAdapter
2280
- },
2281
- {
2282
- provide: MAT_DATE_FORMATS,
2283
- useClass: CustomDateFormat
2284
- }
2285
- ]
2286
- },] }
2287
- ];
2288
- DrDatePickerFormatDirective.ctorParameters = () => [
2289
- { type: CustomDateFormat, decorators: [{ type: Inject, args: [MAT_DATE_FORMATS,] }] },
2290
- { type: NgControl, decorators: [{ type: Optional }] }
2291
- ];
2292
- DrDatePickerFormatDirective.propDecorators = {
2293
- configDateParse: [{ type: Input }],
2294
- configDateDisplay: [{ type: Input }],
2295
- datePickerFormat: [{ type: Input, args: ['drDatePickerFormat',] }]
2296
- };
2297
-
2298
- class DrPopoverRef {
2299
- constructor(overlayRef) {
2300
- this.overlayRef = overlayRef;
2301
- this.onClose$ = new Subject();
2302
- // FIXME: this decision was made because of the incompatible rxjs version
2303
- /**
2304
- * Correct type is @type {Observable<any>}
2305
- */
2306
- this.onClose = this.onClose$.asObservable();
2307
- this.onBackdropClick = this.overlayRef.backdropClick();
2308
- }
2309
- close(res) {
2310
- this.overlayRef.detach();
2311
- this.overlayRef.dispose();
2312
- this.onClose$.next(res);
2313
- this.onClose$.complete();
2314
- }
2315
- }
2316
-
2317
- var DrPopoverAlignmentDimension;
2318
- (function (DrPopoverAlignmentDimension) {
2319
- DrPopoverAlignmentDimension["Width"] = "width";
2320
- DrPopoverAlignmentDimension["Height"] = "height";
2321
- })(DrPopoverAlignmentDimension || (DrPopoverAlignmentDimension = {}));
2322
- const DEFAULT_CONFIG = {
2323
- hasBackdrop: false,
2324
- closeOnBackdropClick: false,
2325
- backdropClass: 'dr-popover-transparent-backdrop',
2326
- };
2327
- const DEFAULT_MODEL = {
2328
- position: 'bottom',
2329
- class: '',
2330
- overlayConfig: {},
2331
- manualClosing: { enabled: false },
2332
- };
2333
- function getAlignmentDimension(position) {
2334
- if (!POPUP_POSITIONS[position])
2335
- return DrPopoverAlignmentDimension.Width;
2336
- if ((position === null || position === void 0 ? void 0 : position.includes('left')) || (position === null || position === void 0 ? void 0 : position.includes('right'))) {
2337
- return DrPopoverAlignmentDimension.Height;
2338
- }
2339
- return DrPopoverAlignmentDimension.Width;
2340
- }
2341
-
2342
- class DrPopoverComponent {
2343
- constructor(cdr, componentFactoryResolver, viewContainerRef, elementRef, popoverRef) {
2344
- this.cdr = cdr;
2345
- this.componentFactoryResolver = componentFactoryResolver;
2346
- this.viewContainerRef = viewContainerRef;
2347
- this.elementRef = elementRef;
2348
- this.popoverRef = popoverRef;
2349
- this.class = '';
2350
- this.isContentTemplate = false;
2351
- this.popover = true;
2352
- }
2353
- clickOutside(e) {
2354
- const isTargetHost = this.hostRef instanceof ElementRef && (this.hostRef.nativeElement === e.target || this.hostRef.nativeElement.contains(e.target));
2355
- const isTargetInPopover = this.elementRef.nativeElement.contains(e.target);
2356
- const isTargetInDatepicker = e.target.closest('mat-datepicker-popup');
2357
- const isTargetInSelect = e.target.closest('ng-dropdown-panel');
2358
- const isTargetInDatepickerContent = e.target.closest('mat-datepicker-content');
2359
- if (!isTargetHost
2360
- && !isTargetInPopover
2361
- && !isTargetInDatepicker
2362
- && !isTargetInSelect
2363
- && !isTargetInDatepickerContent
2364
- && !this.manualClosing.enabled) {
2365
- this.popoverRef.close();
2366
- }
2367
- }
2368
- ngOnInit() {
2369
- this.isContentTemplate = this.content instanceof TemplateRef;
2370
- if (!this.isContentTemplate) {
2371
- this.componentRef = this.viewContainerRef.createComponent(this.componentFactoryResolver.resolveComponentFactory(this.content));
2372
- Object.assign(this.componentRef.instance, this.contentContext);
2373
- this.popoverContainer.nativeElement.appendChild(this.componentRef.location.nativeElement);
2374
- }
2375
- if (this.alignment === 'host') {
2376
- this[getAlignmentDimension(this.position)] = '100%';
2377
- }
2378
- this.cdr.detectChanges();
2379
- }
2380
- }
2381
- DrPopoverComponent.decorators = [
2382
- { type: Component, args: [{
2383
- selector: 'dr-popover',
2384
- template: "<div class=\"dr-popover\" [class]=\"class\" #popoverContainer>\n <ng-container *ngIf=\"isContentTemplate\">\n <ng-container *ngTemplateOutlet=\"content; context: contentContext\"></ng-container>\n </ng-container>\n</div>\n",
2385
- animations: [
2386
- trigger('popover', POPUP_ANIMATION),
2387
- ],
2388
- changeDetection: ChangeDetectionStrategy.OnPush,
2389
- styles: [".dr-popover{display:flex;background:#fff;border:1px solid #E5E5E5;border-radius:5px;box-sizing:border-box;box-shadow:0 4px 14px #0003;font-size:12px;color:#545a6b;max-height:100vh;max-width:100vw;overflow:auto}::ng-deep .dr-popover-transparent-backdrop{background-color:transparent}\n"]
2390
- },] }
2391
- ];
2392
- DrPopoverComponent.ctorParameters = () => [
2393
- { type: ChangeDetectorRef },
2394
- { type: ComponentFactoryResolver },
2395
- { type: ViewContainerRef },
2396
- { type: ElementRef },
2397
- { type: DrPopoverRef }
2023
+ { type: ComponentFactoryResolver },
2024
+ { type: ViewContainerRef },
2025
+ { type: ElementRef },
2026
+ { type: DrPopoverRef }
2398
2027
  ];
2399
2028
  DrPopoverComponent.propDecorators = {
2400
2029
  content: [{ type: Input }],
@@ -3260,15 +2889,62 @@ DrModelDebounceChangeDirective.propDecorators = {
3260
2889
  ngModelDebounceChange: [{ type: Output }]
3261
2890
  };
3262
2891
 
3263
- const components$2 = [DateTagComponent,
3264
- DayTagComponent,
3265
- WeekTagComponent,
3266
- MonthTagComponent,
3267
- QuarterTagComponent,
3268
- AnyTagComponent,
3269
- YearTagComponent,
2892
+ const MAT_DEFAULT_DATE_FORMAT = 'MM/DD/yyyy';
2893
+ const DATE_INPUT_FORMAT = 'YYYY/MM/DD';
2894
+ const YEAR_FORMAT = 'yyyy';
2895
+ const MONTH_YEAR_FORMAT = 'MM/yyyy';
2896
+ const QUARTER_FORMAT = 'Q/yyyy';
2897
+ class CustomDateFormat {
2898
+ constructor() {
2899
+ this._parse = {
2900
+ dateInput: DATE_INPUT_FORMAT
2901
+ };
2902
+ this._display = {
2903
+ dateInput: DATE_INPUT_FORMAT,
2904
+ monthYearLabel: 'MMM YYYY',
2905
+ dateA11yLabel: 'LL',
2906
+ monthYearA11yLabel: 'MMM YYYY',
2907
+ quarterYearLabel: 'Q/YYYY',
2908
+ yearLabel: 'YYYY'
2909
+ };
2910
+ }
2911
+ set parse(parse) {
2912
+ this._parse = Object.assign({}, this._parse, parse);
2913
+ }
2914
+ get parse() {
2915
+ return this._parse;
2916
+ }
2917
+ set display(display) {
2918
+ this._display = Object.assign({}, this._display, display);
2919
+ }
2920
+ get display() {
2921
+ return this._display;
2922
+ }
2923
+ updateDateFormat(parse, display) {
2924
+ this.parse = parse;
2925
+ if (!display) {
2926
+ display = parse;
2927
+ }
2928
+ this.display = display;
2929
+ }
2930
+ }
2931
+ var DatePickerPeriodPosition;
2932
+ (function (DatePickerPeriodPosition) {
2933
+ DatePickerPeriodPosition[DatePickerPeriodPosition["END_OF_PERIOD"] = 0] = "END_OF_PERIOD";
2934
+ DatePickerPeriodPosition[DatePickerPeriodPosition["MIDDLE_OF_PERIOD"] = 1] = "MIDDLE_OF_PERIOD";
2935
+ DatePickerPeriodPosition[DatePickerPeriodPosition["START_OF_PERIOD"] = 2] = "START_OF_PERIOD";
2936
+ DatePickerPeriodPosition[DatePickerPeriodPosition["DEFAULT"] = 3] = "DEFAULT";
2937
+ })(DatePickerPeriodPosition || (DatePickerPeriodPosition = {}));
2938
+
2939
+ const components$2 = [DateTagComponent,
2940
+ DayTagComponent,
2941
+ WeekTagComponent,
2942
+ MonthTagComponent,
2943
+ QuarterTagComponent,
2944
+ AnyTagComponent,
2945
+ YearTagComponent,
3270
2946
  ForecastTagComponent];
3271
- const ɵ0 = { useUtc: true };
2947
+ const ɵ0$1 = { useUtc: true };
3272
2948
  class DateTagModule {
3273
2949
  }
3274
2950
  DateTagModule.decorators = [
@@ -3286,7 +2962,7 @@ DateTagModule.decorators = [
3286
2962
  ],
3287
2963
  exports: components$2,
3288
2964
  providers: [
3289
- { provide: MAT_MOMENT_DATE_ADAPTER_OPTIONS, useValue: ɵ0 }
2965
+ { provide: MAT_MOMENT_DATE_ADAPTER_OPTIONS, useValue: ɵ0$1 }
3290
2966
  ],
3291
2967
  declarations: components$2,
3292
2968
  },] }
@@ -3331,6 +3007,436 @@ DrTagModule.decorators = [
3331
3007
  },] }
3332
3008
  ];
3333
3009
 
3010
+ const moment$2 = require('moment');
3011
+ class DrDatePickerService {
3012
+ constructor() {
3013
+ this.isTimeframeSelectionEnabled = false;
3014
+ this.timeframe = 'day';
3015
+ this.format$ = new BehaviorSubject(MAT_DEFAULT_DATE_FORMAT);
3016
+ this.updatedQuarter$ = new Subject();
3017
+ this.formatConfig = {
3018
+ day: MAT_DEFAULT_DATE_FORMAT,
3019
+ month: MONTH_YEAR_FORMAT,
3020
+ year: YEAR_FORMAT,
3021
+ quarter: QUARTER_FORMAT,
3022
+ };
3023
+ }
3024
+ getQuarterDisplay(value) {
3025
+ return 'Q' + moment$2(value).quarter() + this.format$.getValue().charAt(1) + moment$2(value).year();
3026
+ }
3027
+ getTimeframe(format) {
3028
+ const defaultFrame = 'day';
3029
+ if (!format) {
3030
+ return defaultFrame;
3031
+ }
3032
+ const lowerCaseFormat = format.toLowerCase();
3033
+ switch (true) {
3034
+ case lowerCaseFormat.includes('q'):
3035
+ return 'quarter';
3036
+ case lowerCaseFormat.includes('d'):
3037
+ return 'day';
3038
+ case lowerCaseFormat.includes('m'):
3039
+ return 'month';
3040
+ case lowerCaseFormat.includes('y'):
3041
+ return 'year';
3042
+ default:
3043
+ return defaultFrame;
3044
+ }
3045
+ }
3046
+ getConfiguredFormat(timeframe) {
3047
+ return this.formatConfig[timeframe];
3048
+ }
3049
+ updateTimeframeAndFormat(format) {
3050
+ const normalizedFormat = this.normalizeValue(format || this.format$.getValue());
3051
+ this.timeframe = this.getTimeframe(normalizedFormat);
3052
+ this.format$.next(this.getConfiguredFormat(this.timeframe));
3053
+ }
3054
+ normalizeValue(value) {
3055
+ return value.replace(/d/g, 'D');
3056
+ }
3057
+ }
3058
+ DrDatePickerService.decorators = [
3059
+ { type: Injectable }
3060
+ ];
3061
+
3062
+ const moment$1 = require('moment');
3063
+ class DrDatePickerCustomHeaderComponent {
3064
+ constructor(_calendar, _dateAdapter, _dateFormats, cdr, datePickerService) {
3065
+ this._calendar = _calendar;
3066
+ this._dateAdapter = _dateAdapter;
3067
+ this._dateFormats = _dateFormats;
3068
+ this.cdr = cdr;
3069
+ this.datePickerService = datePickerService;
3070
+ this._destroyed = new Subject();
3071
+ this.quarters = [1, 2, 3, 4];
3072
+ this.selectedQuarter = 1;
3073
+ this.timeframeOptions = [{
3074
+ title: 'Day',
3075
+ value: 'month',
3076
+ format: this.datePickerService.formatConfig.day,
3077
+ periodLabel: () => this._dateAdapter
3078
+ .format(this._calendar.activeDate, this._dateFormats.display.monthYearLabel)
3079
+ .toLocaleUpperCase()
3080
+ }, {
3081
+ title: 'Month',
3082
+ value: 'year',
3083
+ format: this.datePickerService.formatConfig.month,
3084
+ periodLabel: () => String(moment$1(this._calendar.activeDate).year())
3085
+ }, {
3086
+ title: 'Quarter',
3087
+ value: 'none',
3088
+ format: this.datePickerService.formatConfig.quarter,
3089
+ periodLabel: () => String(moment$1(this._calendar.activeDate).year())
3090
+ }, {
3091
+ title: 'Year',
3092
+ value: 'multi-year',
3093
+ format: this.datePickerService.formatConfig.year,
3094
+ periodLabel: () => {
3095
+ const currentYear = moment$1(this._calendar.activeDate).year();
3096
+ const startPeriod = Math.floor(currentYear / 24) * 24;
3097
+ return startPeriod + '-' + (startPeriod + 23);
3098
+ }
3099
+ }];
3100
+ this.pagingSetup = {
3101
+ 'year': (forward) => this.pagingDateChange('addCalendarYears', 1, forward),
3102
+ 'none': (forward) => this.pagingDateChange('addCalendarYears', 1, forward),
3103
+ 'month': (forward) => this.pagingDateChange('addCalendarMonths', 1, forward),
3104
+ 'multi-year': (forward) => this.pagingDateChange('addCalendarYears', 24, forward)
3105
+ };
3106
+ this.selectedTimeframe = 'month';
3107
+ this.timeframeSelection = false;
3108
+ this.periodMonthLabel = '';
3109
+ this.periodYearLabel = '';
3110
+ _calendar.stateChanges.pipe(takeUntil(this._destroyed)).subscribe(() => this.setPeriodLabels());
3111
+ this.datePickerService.format$
3112
+ .pipe(take(1))
3113
+ .subscribe(value => {
3114
+ this.selectedTimeframe = this.timeframeOptions.filter(option => option.format == value)[0].value;
3115
+ this.setPeriodLabels();
3116
+ });
3117
+ _calendar.viewChanged.pipe(takeUntil(this._destroyed)).subscribe(() => this.setPeriodLabels());
3118
+ }
3119
+ ngOnDestroy() {
3120
+ this._destroyed.next();
3121
+ this._destroyed.complete();
3122
+ }
3123
+ setPeriodLabels() {
3124
+ const currentTimeframeOption = this.timeframeOptions.filter(option => option.value === this._calendar.currentView)[0];
3125
+ const fullPeriodLabel = currentTimeframeOption.periodLabel();
3126
+ if (this._calendar.currentView === 'month') {
3127
+ this.periodMonthLabel = fullPeriodLabel.slice(0, 3);
3128
+ this.periodYearLabel = fullPeriodLabel.slice(4);
3129
+ }
3130
+ else {
3131
+ this.periodMonthLabel = '';
3132
+ this.periodYearLabel = fullPeriodLabel;
3133
+ }
3134
+ this.cdr.markForCheck();
3135
+ }
3136
+ setTimeframe() {
3137
+ this.timeframeSelection = false;
3138
+ this._calendar.currentView = this.selectedTimeframe;
3139
+ const chosenTimeframeOption = this.timeframeOptions.filter(option => option.value === this.selectedTimeframe)[0];
3140
+ this.datePickerService.updateTimeframeAndFormat(chosenTimeframeOption.format);
3141
+ if (this.selectedTimeframe == 'none') {
3142
+ this.selectedQuarter = moment$1(this._calendar.activeDate).quarter();
3143
+ }
3144
+ }
3145
+ get currentViewIsQuarter() {
3146
+ return !['month', 'year', 'multi-year'].includes(this._calendar.currentView);
3147
+ }
3148
+ switchViewOnClickOnPeriodLabel(view) {
3149
+ this._calendar.currentView = view;
3150
+ }
3151
+ onSelectQuarter(quarterNumber) {
3152
+ const monthsInQuarter = 3;
3153
+ this.selectedQuarter = moment$1(this._calendar.activeDate).quarter();
3154
+ const unadaptedDate = this._dateAdapter.addCalendarMonths(this._calendar.activeDate, monthsInQuarter * (quarterNumber - this.selectedQuarter));
3155
+ this._calendar.activeDate = unadaptedDate;
3156
+ this.datePickerService.updatedQuarter$.next(moment$1(unadaptedDate));
3157
+ this.datePickerService.calendarInstance.close();
3158
+ }
3159
+ pagingClicked(forward) {
3160
+ this.pagingSetup[this._calendar.currentView] && this.pagingSetup[this._calendar.currentView](forward);
3161
+ }
3162
+ pagingDateChange(actionCall, amount, forward) {
3163
+ this._calendar.activeDate = this._dateAdapter[actionCall](this._calendar.activeDate, forward ? amount : -amount);
3164
+ this.setPeriodLabels();
3165
+ }
3166
+ }
3167
+ DrDatePickerCustomHeaderComponent.decorators = [
3168
+ { type: Component, args: [{
3169
+ selector: 'dr-date-picker_custom-header.component',
3170
+ template: "<div *ngIf=\"datePickerService.isTimeframeSelectionEnabled\" class=\"dr-datepicker__timeframe-select__wrapper\">\n <dr-select\n class=\"dr-datepicker__timeframe-select\"\n [(ngModel)]=\"selectedTimeframe\"\n [items]=\"timeframeOptions\"\n bindLabel=\"title\"\n bindValue=\"value\"\n (ngModelChange)=\"setTimeframe()\">\n </dr-select>\n</div>\n\n<div class=\"dr-date-paging\">\n <div class=\"dr-date-paging flip-page-button\"\n (click)=\"pagingClicked(false)\">\n <i class=\"dr-icon-arrow-left presentation_buttons-navigate_input\"></i>\n </div>\n <span class=\"example-header-label\">\n <span (click)=\"switchViewOnClickOnPeriodLabel('year')\">{{periodMonthLabel + ' '}}</span>\n <span (click)=\"switchViewOnClickOnPeriodLabel('multi-year')\">{{periodYearLabel}}</span>\n </span>\n <div class=\"dr-date-paging flip-page-button\"\n (click)=\"pagingClicked(true)\">\n <i class=\"dr-icon-arrow-right presentation_buttons-navigate_input\"></i>\n </div>\n</div>\n<div #quarterlyDatePicker class=\"dr-quarterly-datepicker\" *ngIf=\"currentViewIsQuarter\">\n <div *ngFor=\"let quarter of quarters\"\n class=\"quarter-selector\" (click)=\"onSelectQuarter(quarter)\"\n [class]=\"quarter == selectedQuarter ? 'selected' : ''\"\n >Q{{quarter}}</div>\n</div>\n\n",
3171
+ changeDetection: ChangeDetectionStrategy.OnPush,
3172
+ 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}.example-header-label{cursor:pointer}.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"]
3173
+ },] }
3174
+ ];
3175
+ DrDatePickerCustomHeaderComponent.ctorParameters = () => [
3176
+ { type: MatCalendar },
3177
+ { type: DateAdapter },
3178
+ { type: CustomDateFormat, decorators: [{ type: Inject, args: [MAT_DATE_FORMATS,] }] },
3179
+ { type: ChangeDetectorRef },
3180
+ { type: DrDatePickerService }
3181
+ ];
3182
+
3183
+ const moment = require('moment');
3184
+ const noop = () => { };
3185
+ const ɵ0 = noop;
3186
+ class DrDatePickerComponent {
3187
+ constructor(cdr, dateAdapter, datePickerService) {
3188
+ this.cdr = cdr;
3189
+ this.dateAdapter = dateAdapter;
3190
+ this.datePickerService = datePickerService;
3191
+ // Whether to transform date, taking end, start, middle of preiod (i.e. set middle of month if timeframe='month')
3192
+ this.periodPosition = DatePickerPeriodPosition.DEFAULT;
3193
+ this.placeholder = 'Select';
3194
+ this.calendarViewsTimeframeMapping = {
3195
+ year: 'multi-year',
3196
+ month: 'year',
3197
+ quarter: 'none',
3198
+ day: 'month',
3199
+ };
3200
+ this.customHeader = DrDatePickerCustomHeaderComponent;
3201
+ this.readonly = true;
3202
+ this.innerValue = null;
3203
+ this.destroyed$ = new Subject();
3204
+ this.onTouchedCallback = noop;
3205
+ this.onChangeCallback = noop;
3206
+ datePickerService.updatedQuarter$
3207
+ .pipe(takeUntil(this.destroyed$))
3208
+ .subscribe((value) => {
3209
+ this.setValueFromMoment(value);
3210
+ });
3211
+ }
3212
+ set format(value) {
3213
+ this.datePickerService.updateTimeframeAndFormat(value);
3214
+ }
3215
+ set min(minDate) {
3216
+ this._min = moment.unix(minDate);
3217
+ }
3218
+ set max(maxDate) {
3219
+ this._max = moment.unix(maxDate);
3220
+ }
3221
+ get value() {
3222
+ return this.innerValue;
3223
+ }
3224
+ set value(v) {
3225
+ if (v !== this.innerValue) {
3226
+ this.setValueFromMoment(v);
3227
+ }
3228
+ this.cdr.markForCheck();
3229
+ }
3230
+ ngAfterViewInit() {
3231
+ this.datePickerService.calendarInstance = this.dp;
3232
+ this.dp.startView = this.calendarViewsTimeframeMapping[this.datePickerService.timeframe];
3233
+ }
3234
+ ngOnDestroy() {
3235
+ this.destroyed$.next();
3236
+ this.destroyed$.complete();
3237
+ }
3238
+ /**
3239
+ * Updating component inner value according to datepicker timeframe (day, month etc.)
3240
+ * and date position in period (start, end, middle)
3241
+ */
3242
+ tryToNormalaizeTimeframe() {
3243
+ const timeframe = this.datePickerService.timeframe;
3244
+ switch (this.periodPosition) {
3245
+ case DatePickerPeriodPosition.START_OF_PERIOD:
3246
+ this.innerValue.startOf(timeframe);
3247
+ break;
3248
+ case DatePickerPeriodPosition.END_OF_PERIOD:
3249
+ this.innerValue.endOf(timeframe);
3250
+ break;
3251
+ case DatePickerPeriodPosition.MIDDLE_OF_PERIOD:
3252
+ this.innerValue.startOf(timeframe);
3253
+ const endOfPeriod = this.innerValue.clone().endOf(timeframe);
3254
+ const diff = endOfPeriod.diff(this.innerValue, 'seconds');
3255
+ this.innerValue.add(diff / 2 + 1, 'seconds');
3256
+ break;
3257
+ default:
3258
+ this.innerValue.startOf(timeframe);
3259
+ break;
3260
+ }
3261
+ }
3262
+ chosenPeriodHandler(chosenDate, timeframe) {
3263
+ if (this.datePickerService.timeframe === timeframe) {
3264
+ this.setValueFromMoment(chosenDate);
3265
+ this.dp.close();
3266
+ }
3267
+ }
3268
+ /**
3269
+ * Setting value from outside of component via ngModel or formControl updates
3270
+ */
3271
+ writeValue(value) {
3272
+ this.innerValue = value ? moment.unix(value) : value;
3273
+ if (this.innerValue) {
3274
+ this.tryToNormalaizeTimeframe();
3275
+ }
3276
+ this.cdr.markForCheck();
3277
+ }
3278
+ registerOnChange(fn) {
3279
+ this.onChangeCallback = fn;
3280
+ }
3281
+ registerOnTouched(fn) {
3282
+ this.onTouchedCallback = fn;
3283
+ }
3284
+ /**
3285
+ * Set inner value from Moment and propagate
3286
+ * @param momentDate
3287
+ */
3288
+ setValueFromMoment(momentDate) {
3289
+ this.setValue(momentDate.unix());
3290
+ }
3291
+ /**
3292
+ * Set inner value from timestamp and propagate
3293
+ * @param timestamp
3294
+ */
3295
+ setValue(timestamp) {
3296
+ this.writeValue(timestamp);
3297
+ this.onChangeCallback(this.innerValue.unix());
3298
+ }
3299
+ }
3300
+ DrDatePickerComponent.decorators = [
3301
+ { type: Component, args: [{
3302
+ selector: 'dr-date-picker',
3303
+ template: "<i class=\"dr-icon-schedule\"></i>\n<input [(ngModel)]=\"value\"\n (click)=\"datePicker.open()\"\n [matDatepicker]=\"datePicker\"\n [placeholder]=\"placeholder\"\n [drDatePickerFormat]=\"datePickerService.format$ | async\"\n [readonly]=\"readonly\"\n [min]=\"_min\"\n [max]=\"_max\"/>\n<mat-datepicker #datePicker\n [calendarHeaderComponent]=\"customHeader\"\n (yearSelected)=\"chosenPeriodHandler($event, 'year')\"\n (monthSelected)=\"chosenPeriodHandler($event, 'month')\">\n</mat-datepicker>\n",
3304
+ changeDetection: ChangeDetectionStrategy.OnPush,
3305
+ providers: [
3306
+ { provide: NG_VALUE_ACCESSOR, useExisting: DrDatePickerComponent, multi: true },
3307
+ { provide: DrDatePickerService }
3308
+ ],
3309
+ 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: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;outline:none}: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}::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"]
3310
+ },] }
3311
+ ];
3312
+ DrDatePickerComponent.ctorParameters = () => [
3313
+ { type: ChangeDetectorRef },
3314
+ { type: DateAdapter },
3315
+ { type: DrDatePickerService }
3316
+ ];
3317
+ DrDatePickerComponent.propDecorators = {
3318
+ format: [{ type: Input }],
3319
+ min: [{ type: Input }],
3320
+ max: [{ type: Input }],
3321
+ periodPosition: [{ type: Input }],
3322
+ placeholder: [{ type: Input }],
3323
+ dp: [{ type: ViewChild, args: ['datePicker',] }]
3324
+ };
3325
+
3326
+ class DrDatePickerWithTimeframeComponent extends DrDatePickerComponent {
3327
+ constructor(cdr, dateAdapter, datePickerService) {
3328
+ super(cdr, dateAdapter, datePickerService);
3329
+ this.cdr = cdr;
3330
+ this.dateAdapter = dateAdapter;
3331
+ this.datePickerService = datePickerService;
3332
+ this.isDashboardDatepicker = false;
3333
+ this.onChangeFormat = new EventEmitter();
3334
+ this.pagingSetup = {
3335
+ 'year': (forward) => this.pagingDateChange('addCalendarYears', 1, forward),
3336
+ 'quarter': (forward) => this.pagingDateChange('addCalendarMonths', 3, forward),
3337
+ 'month': (forward) => this.pagingDateChange('addCalendarMonths', 1, forward),
3338
+ 'day': (forward) => this.pagingDateChange('addCalendarDays', 1, forward)
3339
+ };
3340
+ datePickerService.isTimeframeSelectionEnabled = true;
3341
+ datePickerService.format$
3342
+ .pipe(takeUntil(this.destroyed$))
3343
+ .subscribe((value) => {
3344
+ this.onChangeFormat.emit(datePickerService.normalizeValue(value));
3345
+ });
3346
+ }
3347
+ get isDashboardClassDisplayed() {
3348
+ return this.isDashboardDatepicker;
3349
+ }
3350
+ ;
3351
+ get quarterDisplay() {
3352
+ return this.datePickerService.getQuarterDisplay(this.value);
3353
+ }
3354
+ ngOnInit() {
3355
+ if (this.dateFormatConfig) {
3356
+ this.datePickerService.formatConfig = Object.assign(Object.assign({}, this.datePickerService.formatConfig), this.dateFormatConfig);
3357
+ }
3358
+ }
3359
+ pagingClicked(forward) {
3360
+ this.pagingSetup[this.datePickerService.timeframe] && this.pagingSetup[this.datePickerService.timeframe](forward);
3361
+ this.dp.close();
3362
+ }
3363
+ pagingDateChange(actionCall, amount, forward) {
3364
+ const newValue = this.dateAdapter[actionCall](this.innerValue, forward ? amount : -amount);
3365
+ this.setValueFromMoment(newValue);
3366
+ }
3367
+ }
3368
+ DrDatePickerWithTimeframeComponent.decorators = [
3369
+ { type: Component, args: [{
3370
+ selector: 'dr-date-picker-with-timeframe',
3371
+ template: "<div class=\"dr-input-date-paging__flip-page-button\"\n (click)=\"pagingClicked(false)\"\n>\n <i class=\"dr-icon-arrow-left presentation_buttons-navigate_input\"></i>\n</div>\n<div class=\"dr-datepicker__input-container\">\n <i *ngIf=\"isDashboardDatepicker\" class=\"dr-icon-date\"></i>\n <div\n class=\"dr-input-date-paging__formatted-value-display\"\n (click)=\"datepickerInput.click()\"\n >\n {{\n !value\n ? placeholder\n : (datePickerService.format$.getValue()?.includes('Q') ? quarterDisplay : value.format(datePickerService.format$.getValue()))\n }}\n </div>\n <input\n #datepickerInput\n [(ngModel)]=\"value\"\n (click)=\"datePicker.open()\"\n [matDatepicker]=\"datePicker\"\n [readonly]=\"readonly\"\n [min]=\"_min\"\n [max]=\"_max\"\n />\n</div>\n<div class=\"dr-input-date-paging__flip-page-button\"\n (click)=\"pagingClicked(true)\">\n <i class=\"dr-icon-arrow-right presentation_buttons-navigate_input\"></i>\n</div>\n<mat-datepicker #datePicker\n class=\"dr-timeframe-datepicker\"\n [calendarHeaderComponent]=\"customHeader\"\n (yearSelected)=\"chosenPeriodHandler($event, 'year')\"\n (monthSelected)=\"chosenPeriodHandler($event, 'month')\">\n</mat-datepicker>\n",
3372
+ changeDetection: ChangeDetectionStrategy.OnPush,
3373
+ providers: [
3374
+ { provide: NG_VALUE_ACCESSOR, useExisting: DrDatePickerWithTimeframeComponent, multi: true },
3375
+ { provide: DrDatePickerService }
3376
+ ],
3377
+ 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: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;outline:none}: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}::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}:host{border:none;display:flex;align-items:center}:host.dr-date-picker-on-dashboard{width:180px;justify-content:space-between}:host.dr-date-picker-on-dashboard mat-datepicker{position:absolute}:host.dr-date-picker-on-dashboard .dr-datepicker__input-container{display:flex;flex-direction:row;justify-content:center;align-items:center;margin-left:-10px}:host.dr-date-picker-on-dashboard .dr-datepicker__input-container .dr-input-date-paging__formatted-value-display{font-weight:600;width:auto;margin-left:5px}:host.dr-date-picker-on-dashboard .dr-datepicker__input-container .dr-icon-date{display:block;position:relative;top:0;margin-right:8px;color:#4e566c}:host .dr-input-date-paging__flip-page-button{width:25px;height:25px;border-radius:16px;padding:0;background-color:#fff}:host .dr-input-date-paging__flip-page-button i{position:relative;color:#0c142b;top:unset;left:unset}:host .dr-input-date-paging__flip-page-button:hover{background-color:#f2f2fb;color:#4646ce}:host input{visibility:hidden;position:absolute;width:100%}:host .dr-input-date-paging__formatted-value-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__formatted-value-display:hover{background-color:#f2f2fb;border-radius:5px;cursor:pointer;-webkit-text-decoration-line:underline;text-decoration-line:underline;color:#4646ce}\n"]
3378
+ },] }
3379
+ ];
3380
+ DrDatePickerWithTimeframeComponent.ctorParameters = () => [
3381
+ { type: ChangeDetectorRef },
3382
+ { type: DateAdapter },
3383
+ { type: DrDatePickerService }
3384
+ ];
3385
+ DrDatePickerWithTimeframeComponent.propDecorators = {
3386
+ isDashboardClassDisplayed: [{ type: HostBinding, args: ['class.dr-date-picker-on-dashboard',] }],
3387
+ isDashboardDatepicker: [{ type: Input }],
3388
+ dateFormatConfig: [{ type: Input }],
3389
+ onChangeFormat: [{ type: Output }]
3390
+ };
3391
+
3392
+ class DrDatePickerFormatDirective {
3393
+ constructor(matDateFormat, ngControl) {
3394
+ this.matDateFormat = matDateFormat;
3395
+ this.ngControl = ngControl;
3396
+ }
3397
+ set datePickerFormat(format) {
3398
+ var _a;
3399
+ if (this.configDateParse) {
3400
+ this.matDateFormat.updateDateFormat(this.configDateParse, this.configDateDisplay);
3401
+ }
3402
+ else {
3403
+ this.matDateFormat.updateDateFormat({ dateInput: format });
3404
+ }
3405
+ const value = this.ngControl.value;
3406
+ (_a = this.ngControl.valueAccessor) === null || _a === void 0 ? void 0 : _a.writeValue(value);
3407
+ }
3408
+ }
3409
+ DrDatePickerFormatDirective.decorators = [
3410
+ { type: Directive, args: [{
3411
+ selector: '[drDatePickerFormat]',
3412
+ providers: [
3413
+ {
3414
+ provide: DateAdapter,
3415
+ useClass: MomentDateAdapter
3416
+ },
3417
+ {
3418
+ provide: MAT_DATE_FORMATS,
3419
+ useClass: CustomDateFormat
3420
+ }
3421
+ ]
3422
+ },] }
3423
+ ];
3424
+ DrDatePickerFormatDirective.ctorParameters = () => [
3425
+ { type: CustomDateFormat, decorators: [{ type: Inject, args: [MAT_DATE_FORMATS,] }] },
3426
+ { type: NgControl, decorators: [{ type: Optional }] }
3427
+ ];
3428
+ DrDatePickerFormatDirective.propDecorators = {
3429
+ configDateParse: [{ type: Input }],
3430
+ configDateDisplay: [{ type: Input }],
3431
+ datePickerFormat: [{ type: Input, args: ['drDatePickerFormat',] }]
3432
+ };
3433
+
3434
+ // !!! Please do not use such approach in other places
3435
+ // Hard fix for 'none' calendar view selection
3436
+ MatCalendar.prototype.focusActiveCell = function () {
3437
+ var _a;
3438
+ (_a = this._getCurrentViewComponent()) === null || _a === void 0 ? void 0 : _a._focusActiveCell(false);
3439
+ };
3334
3440
  const components$1 = [
3335
3441
  DrButtonComponent,
3336
3442
  RadioButtonComponent,
@@ -3341,6 +3447,7 @@ const components$1 = [
3341
3447
  DrToggleComponent,
3342
3448
  DrToggleButtonComponent,
3343
3449
  DrDatePickerComponent,
3450
+ DrDatePickerWithTimeframeComponent,
3344
3451
  DrDatePickerFormatDirective,
3345
3452
  DrDatePickerCustomHeaderComponent,
3346
3453
  DrModelDebounceChangeDirective
@@ -3357,9 +3464,6 @@ DrInputsModule.decorators = [
3357
3464
  CommonModule,
3358
3465
  NgSelectModule,
3359
3466
  MatDatepickerModule
3360
- ],
3361
- providers: [
3362
- DrDatePickerService
3363
3467
  ]
3364
3468
  },] }
3365
3469
  ];
@@ -3508,5 +3612,5 @@ DrAccordionModule.decorators = [
3508
3612
  * Generated bundle index. Do not edit.
3509
3613
  */
3510
3614
 
3511
- 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, DrModelDebounceChangeDirective, 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 };
3615
+ export { AnyTagComponent, CheckboxComponent, CustomDateFormat, DATE_INPUT_FORMAT, DatePickerPeriodPosition, DateTagComponent, DateTagModule, DayTagComponent, DrAccordionComponent, DrAccordionItemBodyComponent, DrAccordionItemComponent, DrAccordionItemHeaderComponent, DrAccordionModule, DrAvatarComponent, DrAvatarModule, DrAvatarPipe, DrButtonComponent, DrDropdownComponent, DrDropdownDirective, DrDropdownItemShowPipe, DrDropdownModule, DrDropdownPositionDirective, DrDropdownService, DrInputComponent, DrInputsModule, DrModelDebounceChangeDirective, DrPopoverAlignmentDimension, DrPopoverComponent, DrPopoverDirective, DrPopoverModule, DrPopoverRef, DrPopoverService, DrSelectComponent, DrSpinnerComponent, DrSpinnerDirective, DrSpinnerModule, DrTabComponent, DrTabsComponent, DrTabsModule, DrTagComponent, DrTagModule, DrToggleButtonComponent, DrToggleComponent, DrTooltipDirective, DrTooltipModule, ForecastTagComponent, ISpinnerOptions, ListTagComponent, ListTagModule, MAT_DEFAULT_DATE_FORMAT, MONTH_YEAR_FORMAT, MonthTagComponent, QUARTER_FORMAT, QuarterTagComponent, RadioButtonComponent, RadioGroupComponent, TooltipComponent, WeekTagComponent, YEAR_FORMAT, YearTagComponent, components$2 as ɵa, POPUP_ANIMATION as ɵb, DrDatePickerComponent as ɵc, DrDatePickerService as ɵd, DrDatePickerWithTimeframeComponent as ɵe, DrDatePickerFormatDirective as ɵf, DrDatePickerCustomHeaderComponent as ɵg };
3512
3616
  //# sourceMappingURL=datarailsshared-datarailsshared.js.map