@datarailsshared/datarailsshared 1.4.47-dragons → 1.4.48-bratans

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 (29) hide show
  1. package/bundles/datarailsshared-datarailsshared.umd.js +100 -56
  2. package/bundles/datarailsshared-datarailsshared.umd.js.map +1 -1
  3. package/datarailsshared-datarailsshared-1.4.48-bratans.tgz +0 -0
  4. package/datarailsshared-datarailsshared.d.ts +1 -0
  5. package/datarailsshared-datarailsshared.metadata.json +1 -1
  6. package/esm2015/datarailsshared-datarailsshared.js +2 -1
  7. package/esm2015/lib/dr-inputs/button/button.component.js +2 -2
  8. package/esm2015/lib/dr-inputs/date-pickers/dr-date-picker-with-timeframe/dr-date-picker-with-timeframe.component.js +19 -9
  9. package/esm2015/lib/dr-inputs/date-pickers/dr-date-picker_custom-header/dr-date-picker_custom-header.component.js +23 -8
  10. package/esm2015/lib/dr-inputs/date-pickers/dr-show-timeframe.pipe.js +12 -0
  11. package/esm2015/lib/dr-inputs/date-pickers/services/dr-date-picker.service.js +32 -4
  12. package/esm2015/lib/dr-inputs/dr-inputs.module.js +4 -2
  13. package/esm2015/lib/dr-tabs/dr-tabs.component.js +3 -5
  14. package/esm2015/lib/models/datePicker.js +3 -1
  15. package/esm2015/public-api.js +1 -2
  16. package/fesm2015/datarailsshared-datarailsshared.js +88 -48
  17. package/fesm2015/datarailsshared-datarailsshared.js.map +1 -1
  18. package/lib/dr-inputs/button/button.component.d.ts +1 -1
  19. package/lib/dr-inputs/date-pickers/dr-date-picker-with-timeframe/dr-date-picker-with-timeframe.component.d.ts +3 -1
  20. package/lib/dr-inputs/date-pickers/dr-date-picker_custom-header/dr-date-picker_custom-header.component.d.ts +2 -1
  21. package/lib/dr-inputs/date-pickers/dr-show-timeframe.pipe.d.ts +6 -0
  22. package/lib/dr-inputs/date-pickers/services/dr-date-picker.service.d.ts +2 -0
  23. package/lib/dr-tabs/dr-tabs.component.d.ts +0 -1
  24. package/lib/models/datePicker.d.ts +4 -1
  25. package/package.json +1 -1
  26. package/public-api.d.ts +0 -1
  27. package/datarailsshared-datarailsshared-1.4.47-dragons.tgz +0 -0
  28. package/esm2015/lib/utils/dr-shared-utils.js +0 -27
  29. package/lib/utils/dr-shared-utils.d.ts +0 -8
@@ -2399,7 +2399,7 @@
2399
2399
  { type: i0.Component, args: [{
2400
2400
  selector: 'dr-button',
2401
2401
  template: "<button (click)=\"onClick($event)\" [disabled]=\"_disabled\" [attr.is-loading]=\"_isLoading\" [attr.bold]=\"isBold\"\n [attr.icon]=\"!!icon\" [attr.iconAfterLabel]=\"!!iconAfterLabel\" [attr.theme]=\"theme\">\n <ng-container *ngIf=\"!_isLoading\">\n <i *ngIf=\"icon\" class=\"dr\" [class]=\"icon\" [style.color]=\"iconColor || 'inherit'\"></i>\n <ng-content></ng-content>\n <i *ngIf=\"theme === 'dropdown'\" class=\"dr-icon-arrow-down\"></i>\n <i *ngIf=\"iconAfterLabel\" class=\"dr dr-last\" [class]=\"iconAfterLabel\" [style.color]=\"iconColor || 'inherit'\"></i>\n </ng-container>\n <i *ngIf=\"_isLoading\" class=\"dr dr-spinner dr-icon-load\"></i>\n</button>\n",
2402
- styles: [":host{display:inline-block}:host.disabled,:host.loading{pointer-events:none}:host button[theme]{cursor:pointer;border-radius:16px;padding:5px 16px;font-family:\"Poppins\";font-style:normal;font-weight:400;font-size:14px;line-height:22px;color:#4e566c;border:1px solid #7F7FDD;display:flex;justify-content:space-between;align-items:center;height:32px}:host button[theme] .dr{padding:0;margin-left:5.35px;margin-right:8.64px}:host button[theme] .dr-spinner{animation-name:rotate;animation-iteration-count:infinite;animation-duration:1s}@keyframes rotate{0%{transform:rotate()}to{transform:rotate(360deg)}}:host button[theme][theme~=split-secondary-first],:host button[theme][theme~=split-secondary-last],:host button[theme][theme~=secondary]{padding:5px 16px;background:#FFFFFF;border-radius:16px;min-width:90px}:host button[theme][theme~=split-secondary-first]:hover:not([disabled]),:host button[theme][theme~=split-secondary-last]:hover:not([disabled]),:host button[theme][theme~=secondary]:hover:not([disabled]){color:#4e566c;transition:.2ms ease-in all;background:#F2F2FB;box-shadow:0 4px 14px #0000001a;border:1px solid #4646CE}:host button[theme][theme~=split-secondary-first]:active,:host button[theme][theme~=split-secondary-last]:active,:host button[theme][theme~=secondary]:active{box-shadow:none;background:#F2F2FB}:host button[theme][theme~=split-secondary-first][disabled],:host button[theme][theme~=split-secondary-last][disabled],:host button[theme][theme~=secondary][disabled]{background:#F0F1F4;color:#727583;border:none;cursor:default;pointer-events:none}:host button[theme][theme~=split-secondary-first][is-loading=true],:host button[theme][theme~=split-secondary-last][is-loading=true],:host button[theme][theme~=secondary][is-loading=true]{justify-content:center;padding:5px 16px;pointer-events:none}:host button[theme][theme~=split-primary-first],:host button[theme][theme~=split-primary-last],:host button[theme][theme~=primary]{background:#4646CE;color:#fff;border:none;min-width:90px}:host button[theme][theme~=split-primary-first]:hover:not([disabled]),:host button[theme][theme~=split-primary-last]:hover:not([disabled]),:host button[theme][theme~=primary]:hover:not([disabled]){transition:.2ms ease-in all;background:linear-gradient(96.89deg,#25258C 0%,#4646CE 100%);box-shadow:0 4px 14px #0000001a;border:none}:host button[theme][theme~=split-primary-first]:active,:host button[theme][theme~=split-primary-last]:active,:host button[theme][theme~=primary]:active{background:#25258C}:host button[theme][theme~=split-primary-first][disabled],:host button[theme][theme~=split-primary-last][disabled],:host button[theme][theme~=primary][disabled]{background:#F0F1F4;color:#727583;border:none;cursor:default;pointer-events:none}:host button[theme][theme~=split-primary-first][is-loading=true],:host button[theme][theme~=split-primary-last][is-loading=true],:host button[theme][theme~=primary][is-loading=true]{justify-content:center;padding:5px 16px;pointer-events:none}:host button[theme][theme~=split-primary-first] .dr,:host button[theme][theme~=split-primary-last] .dr,:host button[theme][theme~=primary] .dr{margin:0}:host button[theme][theme~=split-secondary-first],:host button[theme][theme~=split-secondary-first]:hover,:host button[theme][theme~=split-primary-first],:host button[theme][theme~=split-primary-first]:hover{min-width:unset;border-bottom-right-radius:0;border-top-right-radius:0;padding-left:10px;padding-right:8px}:host button[theme][theme~=split-secondary-first][icon=true],:host button[theme][theme~=split-secondary-first]:hover[icon=true],:host button[theme][theme~=split-primary-first][icon=true],:host button[theme][theme~=split-primary-first]:hover[icon=true]{padding-left:6px;padding-right:2px}:host button[theme][theme~=split-primary-first],:host button[theme][theme~=split-primary-first]:hover{border-right:1px solid #fff!important}:host button[theme][theme~=split-secondary-first],:host button[theme][theme~=split-secondary-first]:hover{border-right:none!important}:host button[theme][theme~=split-secondary-last],:host button[theme][theme~=split-secondary-last]:hover,:host button[theme][theme~=split-primary-last],:host button[theme][theme~=split-primary-last]:hover{min-width:unset;border-bottom-left-radius:0;border-top-left-radius:0;padding-left:8px;padding-right:10px}:host button[theme][theme~=split-secondary-last][icon=true],:host button[theme][theme~=split-secondary-last]:hover[icon=true],:host button[theme][theme~=split-primary-last][icon=true],:host button[theme][theme~=split-primary-last]:hover[icon=true]{padding-left:2px;padding-right:6px}:host button[theme][theme~=split-secondary-last] .dr,:host button[theme][theme~=split-secondary-last]:hover .dr,:host button[theme][theme~=split-primary-last] .dr,:host button[theme][theme~=split-primary-last]:hover .dr{margin:0}:host button[theme][theme~=split-primary-last],:host button[theme][theme~=split-primary-last]:hover{border-left:none}:host button[theme][theme~=split-secondary-last],:host button[theme][theme~=split-secondary-last]:hover{margin-left:-1px}:host button[theme][theme~=danger]{background:#BF1D30;color:#fff;border:none;min-width:90px}:host button[theme][theme~=danger]:hover:not([disabled]){transition:.2ms ease-in all;background:linear-gradient(96.89deg,#740e1a 0%,#BF1D30 100%);box-shadow:0 4px 14px #0000001a;border-radius:16px;border:none}:host button[theme][theme~=danger]:active{background:#740e1a}:host button[theme][theme~=danger][disabled]{background:#F0F1F4;color:#727583;border:none;cursor:default;pointer-events:none}:host button[theme][theme~=danger][is-loading=true]{justify-content:center;padding:5px 16px;pointer-events:none}:host button[theme][theme~=ghost]{background:none;border:none;color:#151b3f;padding:4px 8px}:host button[theme][theme~=ghost] .dr{margin-left:4.5px;margin-right:12.5px}:host button[theme][theme~=ghost]:hover:not([disabled]){color:#4646ce;background:#F2F2FB;border-radius:4px}:host button[theme][theme~=ghost][disabled]{color:#727583;cursor:default;pointer-events:none}:host button[theme][theme~=text-link]{background:none;border:none;color:#0b5af9}:host button[theme][theme~=text-link][disabled]{color:#727583;pointer-events:none}:host button[theme][theme~=primary-icon]{padding:8px;width:28px;height:28px;justify-content:center;color:#fff;background:#4646CE;border:none}:host button[theme][theme~=primary-icon]:hover,:host button[theme][theme~=primary-icon]:active{background:linear-gradient(96.89deg,#131318 0%,#4646CE 100%)}:host button[theme][theme~=primary-icon][disabled]{color:#bcbcbc;background:#E5E6EA;cursor:default;pointer-events:none}:host button[theme][theme~=primary-icon] .dr{margin:0}:host button[theme][theme~=secondary-icon]{background:white;padding:8px;width:28px;height:28px;justify-content:center;color:#4e566c;border:1px solid #7F7FDD}:host button[theme][theme~=secondary-icon]:hover,:host button[theme][theme~=secondary-icon]:active{color:#4646ce;background:#F2F2FB}:host button[theme][theme~=secondary-icon][disabled]{color:#bcbcbc;background:#E5E6EA;border:none;cursor:default;pointer-events:none}:host button[theme][theme~=secondary-icon] .dr{margin:0}:host button[theme][theme~=simple-text]{color:#0c142b;border:none;background:none}:host button[theme][theme~=simple-text] .dr{margin:0 8px 0 0}:host button[theme][theme~=icon]{background:none;padding:8px;width:28px;height:28px;justify-content:center;color:#4e566c;border:none}:host button[theme][theme~=icon]:hover,:host button[theme][theme~=icon]:active{background:#F0F3FC;color:#4646ce}:host button[theme][theme~=icon][disabled]{color:#bcbcbc;border:none;cursor:default;pointer-events:none}:host button[theme][theme~=icon][disabled]:hover,:host button[theme][theme~=icon][disabled]:active{background:none}:host button[theme][theme~=icon] .dr{margin:0}:host button[theme][theme~=dropdown],:host button[theme][theme~=primary-square]{background:#FFFFFF;border-radius:6px;border:1px solid #C3C4CE;box-shadow:none;min-width:unset}:host button[theme][theme~=dropdown]:hover,:host button[theme][theme~=primary-square]:hover{border-color:#85889c}:host button[theme][theme~=dropdown]:active,:host button[theme][theme~=primary-square]:active{border-color:#4646ce}:host button[theme][theme~=dropdown] i:first-child,:host button[theme][theme~=primary-square] i:first-child{margin-right:3px}:host button[theme][theme~=dropdown] i:last-child,:host button[theme][theme~=primary-square] i:last-child{margin-left:3px}:host button[theme][theme~=dropdown]{padding:0 8px}:host button[theme][theme~=primary-square]{padding:0;-webkit-user-select:none;user-select:none}:host button[theme][theme~=primary-square]:hover{background-color:#f9f7ff;border:1px solid #7E828E}:host button[theme][theme~=primary-square]:active{background-color:#f2f2fb;border:1px solid #4646CE}:host button[theme][theme~=primary-square][disabled]{opacity:.6;pointer-events:none}:host button[theme][theme~=link-btn]{padding:5px 8px;border:none;background:none;border-radius:5px;color:#0c142b}:host button[theme][theme~=link-btn] .dr{margin:0 4px 0 0}:host button[theme][theme~=link-btn] .dr-last{margin-right:0;margin-left:4px}:host button[theme][theme~=link-btn]:hover{background:#F2F2FB;color:#4646ce}:host button[theme][theme~=link-btn]:active{background:#F2F2FB;color:#25258c}:host button[theme][theme~=link-btn]:disabled{background:none;color:#727583}:host button[theme][theme~=link-btn]:disabled .dr{color:#bcbcbc}:host button[theme][bold=true]{font-weight:600}:host button[theme][icon=true]:not([theme~=\"primary-square\"]){padding-left:8px}:host button[theme][icon=false]{justify-content:center}:host.dr-button-selected button[theme][theme~=primary-square]{background-color:#f2f2fb;border:1px solid #4646CE}\n"]
2402
+ styles: [":host{display:inline-block}:host.disabled,:host.loading{pointer-events:none}:host button[theme]{cursor:pointer;border-radius:16px;padding:5px 16px;font-family:\"Poppins\";font-style:normal;font-weight:400;font-size:14px;line-height:22px;color:#4e566c;border:1px solid #7F7FDD;display:flex;justify-content:space-between;align-items:center;height:32px}:host button[theme] .dr{padding:0;margin-left:5.35px;margin-right:8.64px}:host button[theme] .dr-spinner{animation-name:rotate;animation-iteration-count:infinite;animation-duration:1s}@keyframes rotate{0%{transform:rotate()}to{transform:rotate(360deg)}}:host button[theme][theme~=split-secondary-first],:host button[theme][theme~=split-secondary-last],:host button[theme][theme~=secondary]{padding:5px 16px;background:#FFFFFF;border-radius:16px;min-width:90px}:host button[theme][theme~=split-secondary-first]:hover:not([disabled]),:host button[theme][theme~=split-secondary-last]:hover:not([disabled]),:host button[theme][theme~=secondary]:hover:not([disabled]){color:#4e566c;transition:.2ms ease-in all;background:#F2F2FB;box-shadow:0 4px 14px #0000001a;border:1px solid #4646CE}:host button[theme][theme~=split-secondary-first]:active,:host button[theme][theme~=split-secondary-last]:active,:host button[theme][theme~=secondary]:active{box-shadow:none;background:#F2F2FB}:host button[theme][theme~=split-secondary-first][disabled],:host button[theme][theme~=split-secondary-last][disabled],:host button[theme][theme~=secondary][disabled]{background:#F0F1F4;color:#727583;border:none;cursor:default;pointer-events:none}:host button[theme][theme~=split-secondary-first][is-loading=true],:host button[theme][theme~=split-secondary-last][is-loading=true],:host button[theme][theme~=secondary][is-loading=true]{justify-content:center;padding:5px 16px;pointer-events:none}:host button[theme][theme~=split-primary-first],:host button[theme][theme~=split-primary-last],:host button[theme][theme~=primary]{background:#4646CE;color:#fff;border:none;min-width:90px}:host button[theme][theme~=split-primary-first]:hover:not([disabled]),:host button[theme][theme~=split-primary-last]:hover:not([disabled]),:host button[theme][theme~=primary]:hover:not([disabled]){transition:.2ms ease-in all;background:linear-gradient(96.89deg,#25258C 0%,#4646CE 100%);box-shadow:0 4px 14px #0000001a;border:none}:host button[theme][theme~=split-primary-first]:active,:host button[theme][theme~=split-primary-last]:active,:host button[theme][theme~=primary]:active{background:#25258C}:host button[theme][theme~=split-primary-first][disabled],:host button[theme][theme~=split-primary-last][disabled],:host button[theme][theme~=primary][disabled]{background:#F0F1F4;color:#727583;border:none;cursor:default;pointer-events:none}:host button[theme][theme~=split-primary-first][is-loading=true],:host button[theme][theme~=split-primary-last][is-loading=true],:host button[theme][theme~=primary][is-loading=true]{justify-content:center;padding:5px 16px;pointer-events:none}:host button[theme][theme~=split-primary-first] .dr,:host button[theme][theme~=split-primary-last] .dr,:host button[theme][theme~=primary] .dr{margin:0}:host button[theme][theme~=split-secondary-first],:host button[theme][theme~=split-secondary-first]:hover,:host button[theme][theme~=split-primary-first],:host button[theme][theme~=split-primary-first]:hover{min-width:unset;border-bottom-right-radius:0;border-top-right-radius:0;padding-left:10px;padding-right:8px}:host button[theme][theme~=split-secondary-first][icon=true],:host button[theme][theme~=split-secondary-first]:hover[icon=true],:host button[theme][theme~=split-primary-first][icon=true],:host button[theme][theme~=split-primary-first]:hover[icon=true]{padding-left:6px;padding-right:2px}:host button[theme][theme~=split-primary-first],:host button[theme][theme~=split-primary-first]:hover{border-right:1px solid #fff!important}:host button[theme][theme~=split-secondary-first],:host button[theme][theme~=split-secondary-first]:hover{border-right:none!important}:host button[theme][theme~=split-secondary-last],:host button[theme][theme~=split-secondary-last]:hover,:host button[theme][theme~=split-primary-last],:host button[theme][theme~=split-primary-last]:hover{min-width:unset;border-bottom-left-radius:0;border-top-left-radius:0;padding-left:8px;padding-right:10px}:host button[theme][theme~=split-secondary-last][icon=true],:host button[theme][theme~=split-secondary-last]:hover[icon=true],:host button[theme][theme~=split-primary-last][icon=true],:host button[theme][theme~=split-primary-last]:hover[icon=true]{padding-left:2px;padding-right:6px}:host button[theme][theme~=split-secondary-last] .dr,:host button[theme][theme~=split-secondary-last]:hover .dr,:host button[theme][theme~=split-primary-last] .dr,:host button[theme][theme~=split-primary-last]:hover .dr{margin:0}:host button[theme][theme~=split-primary-last],:host button[theme][theme~=split-primary-last]:hover{border-left:none}:host button[theme][theme~=split-secondary-last],:host button[theme][theme~=split-secondary-last]:hover{margin-left:-1px}:host button[theme][theme~=danger]{background:#BF1D30;color:#fff;border:none;min-width:90px}:host button[theme][theme~=danger]:hover:not([disabled]){transition:.2ms ease-in all;background:linear-gradient(96.89deg,#740e1a 0%,#BF1D30 100%);box-shadow:0 4px 14px #0000001a;border-radius:16px;border:none}:host button[theme][theme~=danger]:active{background:#740e1a}:host button[theme][theme~=danger][disabled]{background:#F0F1F4;color:#727583;border:none;cursor:default;pointer-events:none}:host button[theme][theme~=danger][is-loading=true]{justify-content:center;padding:5px 16px;pointer-events:none}:host button[theme][theme~=ghost]{background:none;border:none;color:#151b3f;padding:4px 8px}:host button[theme][theme~=ghost] .dr{margin-left:4.5px;margin-right:12.5px}:host button[theme][theme~=ghost]:hover:not([disabled]){color:#4646ce;background:#F2F2FB;border-radius:4px}:host button[theme][theme~=ghost][disabled]{color:#727583;cursor:default;pointer-events:none}:host button[theme][theme~=text-link]{background:none;border:none;color:#0b5af9}:host button[theme][theme~=text-link][disabled]{color:#727583;pointer-events:none}:host button[theme][theme~=primary-icon]{padding:8px;width:28px;height:28px;justify-content:center;color:#fff;background:#4646CE;border:none}:host button[theme][theme~=primary-icon]:hover,:host button[theme][theme~=primary-icon]:active{background:linear-gradient(96.89deg,#131318 0%,#4646CE 100%)}:host button[theme][theme~=primary-icon][disabled]{color:#bcbcbc;background:#E5E6EA;cursor:default;pointer-events:none}:host button[theme][theme~=primary-icon] .dr{margin:0}:host button[theme][theme~=secondary-icon]{background:white;padding:8px;width:28px;height:28px;justify-content:center;color:#4e566c;border:1px solid #7F7FDD}:host button[theme][theme~=secondary-icon]:hover,:host button[theme][theme~=secondary-icon]:active{color:#4646ce;background:#F2F2FB}:host button[theme][theme~=secondary-icon][disabled]{color:#bcbcbc;background:#E5E6EA;border:none;cursor:default;pointer-events:none}:host button[theme][theme~=secondary-icon] .dr{margin:0}:host button[theme][theme~=simple-text]{color:#0c142b;border:none;background:none}:host button[theme][theme~=simple-text] .dr{margin:0 8px 0 0}:host button[theme][theme~=icon]{background:none;padding:8px;width:28px;height:28px;justify-content:center;color:#4e566c;border:none}:host button[theme][theme~=icon]:hover,:host button[theme][theme~=icon]:active{background:#F0F3FC;color:#4646ce}:host button[theme][theme~=icon][disabled]{color:#bcbcbc;border:none;cursor:default;pointer-events:none}:host button[theme][theme~=icon][disabled]:hover,:host button[theme][theme~=icon][disabled]:active{background:none}:host button[theme][theme~=icon] .dr{margin:0}:host button[theme][theme~=dropdown]{padding:0 8px;background:#FFFFFF;border-radius:6px;border:1px solid #C3C4CE;min-width:unset;box-shadow:none}:host button[theme][theme~=dropdown]:hover{border-color:#85889c}:host button[theme][theme~=dropdown]:active{border-color:#4646ce}:host button[theme][theme~=dropdown] i:first-child{margin-right:3px}:host button[theme][theme~=dropdown] i:last-child{margin-left:3px}:host button[theme][theme~=link-btn]{padding:5px 8px;border:none;background:none;border-radius:5px;color:#0c142b}:host button[theme][theme~=link-btn] .dr{margin:0 4px 0 0}:host button[theme][theme~=link-btn] .dr-last{margin-right:0;margin-left:4px}:host button[theme][theme~=link-btn]:hover{background:#F2F2FB;color:#4646ce}:host button[theme][theme~=link-btn]:active{background:#F2F2FB;color:#25258c}:host button[theme][theme~=link-btn]:disabled{background:none;color:#727583}:host button[theme][theme~=link-btn]:disabled .dr{color:#bcbcbc}:host button[theme][bold=true]{font-weight:600}:host button[theme][icon=true]{padding-left:8px}:host button[theme][icon=false]{justify-content:center}\n"]
2403
2403
  },] }
2404
2404
  ];
2405
2405
  DrButtonComponent.ctorParameters = function () { return []; };
@@ -3088,7 +3088,6 @@
3088
3088
  var DrTabsComponent = /** @class */ (function () {
3089
3089
  function DrTabsComponent() {
3090
3090
  this.selectedTab = 0;
3091
- this.noBodyPadding = false;
3092
3091
  this.selectedTabChange = new i0.EventEmitter();
3093
3092
  }
3094
3093
  DrTabsComponent.prototype.selectedIndexChange = function ($event) {
@@ -3100,8 +3099,8 @@
3100
3099
  DrTabsComponent.decorators = [
3101
3100
  { type: i0.Component, args: [{
3102
3101
  selector: 'dr-tabs',
3103
- template: "<mat-tab-group disableRipple [selectedIndex]=\"selectedTab\"\n (selectedIndexChange)=\"selectedIndexChange($event)\"\n [class.with-radio]=\"withRadio\"\n [class.vertical]=\"vertical\"\n [class.no-body-padding]=\"noBodyPadding\"\n [animationDuration]=\" vertical ? '0ms' : '500ms'\">\n <mat-tab *ngFor=\"let tab of tabsContentList; let index = index\" label=\"{{tab.label}}\" [disabled]=\"tab.disabled\" >\n <ng-container *ngIf=\"withRadio\">\n <ng-template mat-tab-label>\n <dr-radio-button [value]=\"index\"\n [(ngModel)]=\"selectedTab\">\n </dr-radio-button>\n {{tab.label}}\n </ng-template>\n </ng-container>\n\n <ng-container *ngTemplateOutlet=\"tab.contentTemplate\" ></ng-container>\n </mat-tab>\n</mat-tab-group>\n",
3104
- styles: [":host{width:100%}:host ::ng-deep .mat-tab-group,:host ::ng-deep .mat-tab-body-wrapper{height:100%}:host ::ng-deep .mat-tab-group{font-family:\"Poppins\",sans-serif}:host ::ng-deep .mat-tab-nav-bar,:host ::ng-deep .mat-tab-header{border-bottom:1px solid #D5DAE5}:host ::ng-deep .mat-tab-labels{padding:0 17px}:host ::ng-deep .mat-tab-label{padding:0 8px;min-width:0;height:38px;opacity:1}:host ::ng-deep .mat-tab-label:not(:last-child){margin-right:21px}:host ::ng-deep .mat-tab-label-active .mat-tab-label-content{color:#579bf2;font-weight:700}:host ::ng-deep .mat-tab-label-content{font-weight:400;font-size:14px;line-height:22px;color:#51566f;font-family:\"Poppins\",sans-serif}:host ::ng-deep .mat-ink-bar{height:3px;border-radius:5px;background-color:#579bf2!important}:host ::ng-deep .with-radio .mat-tab-labels{padding:0;margin-bottom:8px}:host ::ng-deep .with-radio .mat-tab-label{padding:8px 16px;min-width:0;flex-grow:1;justify-content:start;height:38px;opacity:1}:host ::ng-deep .with-radio .mat-tab-label:not(:last-child){margin-right:8px}:host ::ng-deep .with-radio .mat-tab-label-active{background:#F6F7F8;border-radius:3px}:host ::ng-deep .with-radio .mat-tab-label-active .mat-tab-label-content{color:#0c142b;font-weight:600}:host ::ng-deep .with-radio .mat-ink-bar{display:none!important}:host ::ng-deep .vertical.mat-tab-group{flex-direction:row}:host ::ng-deep .vertical .mat-tab-header{border-bottom:none}:host ::ng-deep .vertical .mat-tab-label-container{border-right:1px solid #D5DAE5}:host ::ng-deep .vertical .mat-tab-label-container .mat-tab-labels{flex-direction:column;padding:0}:host ::ng-deep .vertical .mat-ink-bar{display:none!important}:host ::ng-deep .vertical .mat-tab-label{border-bottom:1px solid #D5DAE5;margin:0!important;justify-content:flex-start;padding:1rem 2rem;height:40px}:host ::ng-deep .vertical .mat-tab-label:before{content:\"\";width:2px;height:100%;display:flex;position:absolute;top:0;left:0}:host ::ng-deep .vertical .mat-tab-label-active{background-color:#f3f7ff}:host ::ng-deep .vertical .mat-tab-label-active:before{background-color:#151a41}:host ::ng-deep .vertical .mat-tab-label-active .mat-tab-label-content{font-weight:normal;color:#151a41}:host ::ng-deep .vertical .mat-tab-body-wrapper{width:100%;padding:16px}:host ::ng-deep mat-tab-group.no-body-padding .mat-tab-body-wrapper{padding:0}\n"]
3102
+ template: "<mat-tab-group disableRipple [selectedIndex]=\"selectedTab\"\n (selectedIndexChange)=\"selectedIndexChange($event)\"\n [class.with-radio]=\"withRadio\"\n [class.vertical]=\"vertical\"\n [animationDuration]=\" vertical ? '0ms' : '500ms'\">\n <mat-tab *ngFor=\"let tab of tabsContentList; let index = index\" label=\"{{tab.label}}\" [disabled]=\"tab.disabled\" >\n <ng-container *ngIf=\"withRadio\">\n <ng-template mat-tab-label>\n <dr-radio-button [value]=\"index\"\n [(ngModel)]=\"selectedTab\">\n </dr-radio-button>\n {{tab.label}}\n </ng-template>\n </ng-container>\n\n <ng-container *ngTemplateOutlet=\"tab.contentTemplate\" ></ng-container>\n </mat-tab>\n</mat-tab-group>\n",
3103
+ styles: [":host{width:100%}:host ::ng-deep .mat-tab-group,:host ::ng-deep .mat-tab-body-wrapper{height:100%}:host ::ng-deep .mat-tab-nav-bar,:host ::ng-deep .mat-tab-header{border-bottom:1px solid #D5DAE5}:host ::ng-deep .mat-tab-labels{padding:0 17px}:host ::ng-deep .mat-tab-label{padding:0 8px;min-width:0;height:38px;opacity:1}:host ::ng-deep .mat-tab-label:not(:last-child){margin-right:21px}:host ::ng-deep .mat-tab-label-active .mat-tab-label-content{color:#579bf2;font-weight:700}:host ::ng-deep .mat-tab-label-content{font-weight:400;font-size:14px;line-height:22px;color:#51566f;font-family:\"Poppins\",sans-serif}:host ::ng-deep .mat-ink-bar{height:3px;border-radius:5px;background-color:#579bf2!important}:host ::ng-deep .with-radio .mat-tab-labels{padding:0;margin-bottom:8px}:host ::ng-deep .with-radio .mat-tab-label{padding:8px 16px;min-width:0;flex-grow:1;justify-content:start;height:38px;opacity:1}:host ::ng-deep .with-radio .mat-tab-label:not(:last-child){margin-right:8px}:host ::ng-deep .with-radio .mat-tab-label-active{background:#F6F7F8;border-radius:3px}:host ::ng-deep .with-radio .mat-tab-label-active .mat-tab-label-content{color:#0c142b;font-weight:600}:host ::ng-deep .with-radio .mat-ink-bar{display:none!important}:host ::ng-deep .vertical.mat-tab-group{flex-direction:row}:host ::ng-deep .vertical .mat-tab-header{border-bottom:none}:host ::ng-deep .vertical .mat-tab-labels{flex-direction:column;padding:0;border-right:1px solid #D5DAE5}:host ::ng-deep .vertical .mat-ink-bar{display:none!important}:host ::ng-deep .vertical .mat-tab-label{border-bottom:1px solid #D5DAE5;margin:0!important}:host ::ng-deep .vertical .mat-tab-label:before{content:\"\";width:2px;height:100%;display:flex;position:absolute;top:0;left:0}:host ::ng-deep .vertical .mat-tab-label-active{background-color:#f3f7ff}:host ::ng-deep .vertical .mat-tab-label-active:before{background-color:#151a41}:host ::ng-deep .vertical .mat-tab-label-active .mat-tab-label-content{font-weight:normal;color:#151a41}:host ::ng-deep .vertical .mat-tab-body-wrapper{width:100%;padding:16px}\n"]
3105
3104
  },] }
3106
3105
  ];
3107
3106
  DrTabsComponent.ctorParameters = function () { return []; };
@@ -3109,7 +3108,6 @@
3109
3108
  selectedTab: [{ type: i0.Input }],
3110
3109
  withRadio: [{ type: i0.Input }],
3111
3110
  vertical: [{ type: i0.Input }],
3112
- noBodyPadding: [{ type: i0.Input }],
3113
3111
  selectedTabChange: [{ type: i0.Output }],
3114
3112
  tabsContentList: [{ type: i0.ContentChildren, args: [DrTabComponent,] }]
3115
3113
  };
@@ -3467,6 +3465,7 @@
3467
3465
  DateFromats["YEAR_FORMAT"] = "yyyy";
3468
3466
  DateFromats["MONTH_YEAR_FORMAT"] = "MM/yyyy";
3469
3467
  DateFromats["QUARTER_FORMAT"] = "Q/yyyy";
3468
+ DateFromats["WEEK_FORMAT"] = "W/yyyy";
3470
3469
  })(exports.DateFromats || (exports.DateFromats = {}));
3471
3470
  var CustomDateFormat = /** @class */ (function () {
3472
3471
  function CustomDateFormat() {
@@ -3523,6 +3522,7 @@
3523
3522
  TimeframeOption["DAY"] = "day";
3524
3523
  TimeframeOption["MONTH"] = "month";
3525
3524
  TimeframeOption["QUARTER"] = "quarter";
3525
+ TimeframeOption["WEEK"] = "week";
3526
3526
  TimeframeOption["YEAR"] = "year";
3527
3527
  })(exports.TimeframeOption || (exports.TimeframeOption = {}));
3528
3528
  exports.CalendarView = void 0;
@@ -3613,14 +3613,34 @@
3613
3613
  },] }
3614
3614
  ];
3615
3615
 
3616
- var DrSharedUtils = /** @class */ (function () {
3617
- function DrSharedUtils() {
3616
+ var DrDatePickerService = /** @class */ (function () {
3617
+ function DrDatePickerService() {
3618
+ this.isTimeframeSelectionEnabled = false;
3619
+ this.timeframe = exports.TimeframeOption.DAY;
3620
+ this.format$ = new rxjs.BehaviorSubject(exports.DateFromats.MAT_DEFAULT_DATE_FORMAT);
3621
+ this.updatedQuarter$ = new rxjs.Subject();
3622
+ this.availableTimeframes = [
3623
+ exports.TimeframeOption.DAY,
3624
+ exports.TimeframeOption.WEEK,
3625
+ exports.TimeframeOption.MONTH,
3626
+ exports.TimeframeOption.QUARTER,
3627
+ exports.TimeframeOption.YEAR
3628
+ ];
3629
+ this.formatConfig = {
3630
+ day: exports.DateFromats.MAT_DEFAULT_DATE_FORMAT,
3631
+ month: exports.DateFromats.MONTH_YEAR_FORMAT,
3632
+ year: exports.DateFromats.YEAR_FORMAT,
3633
+ quarter: exports.DateFromats.QUARTER_FORMAT,
3634
+ week: exports.DateFromats.WEEK_FORMAT
3635
+ };
3618
3636
  }
3619
- /**
3620
- * Get timeframe (day, year, month, quarter) based on passed format
3621
- * @param format - date format string. Examples: MM/DD/YYYY, Q/YYYY
3622
- */
3623
- DrSharedUtils.getTimeframeByDateFormat = function (format) {
3637
+ DrDatePickerService.prototype.getQuarterDisplay = function (value) {
3638
+ return 'Q' + value.format(this.formatConfig.quarter);
3639
+ };
3640
+ DrDatePickerService.prototype.getWeekDisplay = function (value) {
3641
+ return 'W' + value.format(this.formatConfig.week);
3642
+ };
3643
+ DrDatePickerService.prototype.getTimeframe = function (format) {
3624
3644
  var defaultFrame = exports.TimeframeOption.DAY;
3625
3645
  if (!format) {
3626
3646
  return defaultFrame;
@@ -3633,34 +3653,14 @@
3633
3653
  return exports.TimeframeOption.DAY;
3634
3654
  case lowerCaseFormat.includes('m'):
3635
3655
  return exports.TimeframeOption.MONTH;
3656
+ case lowerCaseFormat.includes('w'):
3657
+ return exports.TimeframeOption.WEEK;
3636
3658
  case lowerCaseFormat.includes('y'):
3637
3659
  return exports.TimeframeOption.YEAR;
3638
3660
  default:
3639
3661
  return defaultFrame;
3640
3662
  }
3641
3663
  };
3642
- return DrSharedUtils;
3643
- }());
3644
-
3645
- var DrDatePickerService = /** @class */ (function () {
3646
- function DrDatePickerService() {
3647
- this.isTimeframeSelectionEnabled = false;
3648
- this.timeframe = exports.TimeframeOption.DAY;
3649
- this.format$ = new rxjs.BehaviorSubject(exports.DateFromats.MAT_DEFAULT_DATE_FORMAT);
3650
- this.updatedQuarter$ = new rxjs.Subject();
3651
- this.formatConfig = {
3652
- day: exports.DateFromats.MAT_DEFAULT_DATE_FORMAT,
3653
- month: exports.DateFromats.MONTH_YEAR_FORMAT,
3654
- year: exports.DateFromats.YEAR_FORMAT,
3655
- quarter: exports.DateFromats.QUARTER_FORMAT,
3656
- };
3657
- }
3658
- DrDatePickerService.prototype.getQuarterDisplay = function (value) {
3659
- return 'Q' + value.quarter() + this.format$.getValue().charAt(1) + value.year();
3660
- };
3661
- DrDatePickerService.prototype.getTimeframe = function (format) {
3662
- return DrSharedUtils.getTimeframeByDateFormat(format);
3663
- };
3664
3664
  DrDatePickerService.prototype.getConfiguredFormat = function (timeframe) {
3665
3665
  return this.formatConfig[timeframe];
3666
3666
  };
@@ -3692,25 +3692,37 @@
3692
3692
  this.quarters = [1, 2, 3, 4];
3693
3693
  this.selectedQuarter = 1;
3694
3694
  this.timeframeOptions = [{
3695
- title: 'Day',
3695
+ timeframe: exports.TimeframeOption.DAY,
3696
3696
  value: exports.CalendarView.FOR_DAYS,
3697
+ title: 'Day',
3697
3698
  format: this.datePickerService.formatConfig.day,
3698
3699
  periodLabel: function () { return _this._dateAdapter
3699
3700
  .format(_this._calendar.activeDate, _this._dateFormats.display.monthYearLabel)
3700
3701
  .toLocaleUpperCase(); }
3701
3702
  }, {
3702
- title: 'Month',
3703
+ timeframe: exports.TimeframeOption.WEEK,
3704
+ value: exports.CalendarView.FOR_DAYS,
3705
+ title: 'Week',
3706
+ format: this.datePickerService.formatConfig.week,
3707
+ periodLabel: function () { return _this._dateAdapter
3708
+ .format(_this._calendar.activeDate, _this._dateFormats.display.monthYearLabel)
3709
+ .toLocaleUpperCase(); }
3710
+ }, {
3711
+ timeframe: exports.TimeframeOption.MONTH,
3703
3712
  value: exports.CalendarView.FOR_MONTHS,
3713
+ title: 'Month',
3704
3714
  format: this.datePickerService.formatConfig.month,
3705
3715
  periodLabel: function () { return String(moment$1(_this._calendar.activeDate).year()); }
3706
3716
  }, {
3707
- title: 'Quarter',
3717
+ timeframe: exports.TimeframeOption.QUARTER,
3708
3718
  value: exports.CalendarView.FOR_QUARTERS,
3719
+ title: 'Quarter',
3709
3720
  format: this.datePickerService.formatConfig.quarter,
3710
3721
  periodLabel: function () { return String(moment$1(_this._calendar.activeDate).year()); }
3711
3722
  }, {
3712
- title: 'Year',
3723
+ timeframe: exports.TimeframeOption.YEAR,
3713
3724
  value: exports.CalendarView.FOR_YEARS,
3725
+ title: 'Year',
3714
3726
  format: this.datePickerService.formatConfig.year,
3715
3727
  periodLabel: function () {
3716
3728
  var currentYear = moment$1(_this._calendar.activeDate).year();
@@ -3736,6 +3748,9 @@
3736
3748
  _this.selectedTimeframe = _this.timeframeOptions.filter(function (option) { return option.format == value; })[0].value;
3737
3749
  _calendar.currentView = _this.selectedTimeframe;
3738
3750
  _this.setPeriodLabels();
3751
+ if (_this.selectedTimeframe === exports.CalendarView.FOR_QUARTERS) {
3752
+ _this.selectedQuarter = moment$1(_this._calendar.activeDate).quarter();
3753
+ }
3739
3754
  });
3740
3755
  _calendar.viewChanged.pipe(operators.takeUntil(this._destroyed)).subscribe(function () { return _this.setPeriodLabels(); });
3741
3756
  }
@@ -3747,7 +3762,7 @@
3747
3762
  var _this = this;
3748
3763
  var currentTimeframeOption = this.timeframeOptions.filter(function (option) { return option.value === _this._calendar.currentView; })[0];
3749
3764
  var fullPeriodLabel = currentTimeframeOption.periodLabel();
3750
- if (this._calendar.currentView === 'month') {
3765
+ if (this._calendar.currentView === exports.CalendarView.FOR_DAYS) {
3751
3766
  this.periodMonthLabel = fullPeriodLabel.slice(0, 3);
3752
3767
  this.periodYearLabel = fullPeriodLabel.slice(4);
3753
3768
  }
@@ -3797,7 +3812,7 @@
3797
3812
  DrDatePickerCustomHeaderComponent.decorators = [
3798
3813
  { type: i0.Component, args: [{
3799
3814
  selector: 'dr-date-picker_custom-header.component',
3800
- 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(calendarView.FOR_MONTHS)\">{{periodMonthLabel + ' '}}</span>\n <span (click)=\"switchViewOnClickOnPeriodLabel(calendarView.FOR_YEARS)\">{{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",
3815
+ 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 | drShowTimeframePipe: datePickerService.availableTimeframes\"\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(calendarView.FOR_MONTHS)\">{{periodMonthLabel + ' '}}</span>\n <span (click)=\"switchViewOnClickOnPeriodLabel(calendarView.FOR_YEARS)\">{{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",
3801
3816
  changeDetection: i0.ChangeDetectionStrategy.OnPush,
3802
3817
  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"]
3803
3818
  },] }
@@ -3975,7 +3990,7 @@
3975
3990
  var DrDatePickerWithTimeframeComponent = /** @class */ (function (_super) {
3976
3991
  __extends(DrDatePickerWithTimeframeComponent, _super);
3977
3992
  function DrDatePickerWithTimeframeComponent(cdr, dateAdapter, datePickerService) {
3978
- var _b;
3993
+ var _a;
3979
3994
  var _this = _super.call(this, cdr, dateAdapter, datePickerService) || this;
3980
3995
  _this.cdr = cdr;
3981
3996
  _this.dateAdapter = dateAdapter;
@@ -3983,16 +3998,18 @@
3983
3998
  _this.isDashboardDatepicker = false;
3984
3999
  _this.canSelectTimeframe = true;
3985
4000
  _this.onChangeFormat = new i0.EventEmitter();
3986
- _this.pagingSetup = (_b = {},
3987
- _b[exports.TimeframeOption.YEAR] = function (forward) { return _this.pagingDateChange('addCalendarYears', 1, forward); },
3988
- _b[exports.TimeframeOption.QUARTER] = function (forward) { return _this.pagingDateChange('addCalendarMonths', 3, forward); },
3989
- _b[exports.TimeframeOption.MONTH] = function (forward) { return _this.pagingDateChange('addCalendarMonths', 1, forward); },
3990
- _b[exports.TimeframeOption.DAY] = function (forward) { return _this.pagingDateChange('addCalendarDays', 1, forward); },
3991
- _b);
4001
+ _this.pagingSetup = (_a = {},
4002
+ _a[exports.TimeframeOption.YEAR] = function (forward) { return _this.pagingDateChange('addCalendarYears', 1, forward); },
4003
+ _a[exports.TimeframeOption.QUARTER] = function (forward) { return _this.pagingDateChange('addCalendarMonths', 3, forward); },
4004
+ _a[exports.TimeframeOption.MONTH] = function (forward) { return _this.pagingDateChange('addCalendarMonths', 1, forward); },
4005
+ _a[exports.TimeframeOption.DAY] = function (forward) { return _this.pagingDateChange('addCalendarDays', 1, forward); },
4006
+ _a[exports.TimeframeOption.WEEK] = function (forward) { return _this.pagingDateChange('addCalendarDays', 7, forward); },
4007
+ _a);
3992
4008
  datePickerService.isTimeframeSelectionEnabled = true;
3993
4009
  datePickerService.format$
3994
4010
  .pipe(operators.takeUntil(_this.destroyed$))
3995
4011
  .subscribe(function (value) {
4012
+ datePickerService.format$.getValue();
3996
4013
  _this.onChangeFormat.emit(datePickerService.normalizeValue(value));
3997
4014
  });
3998
4015
  return _this;
@@ -4015,23 +4032,34 @@
4015
4032
  enumerable: false,
4016
4033
  configurable: true
4017
4034
  });
4035
+ Object.defineProperty(DrDatePickerWithTimeframeComponent.prototype, "availableTimeframes", {
4036
+ set: function (value) {
4037
+ if (value && value.length) {
4038
+ this.datePickerService.availableTimeframes = value;
4039
+ }
4040
+ },
4041
+ enumerable: false,
4042
+ configurable: true
4043
+ });
4018
4044
  Object.defineProperty(DrDatePickerWithTimeframeComponent.prototype, "displayedFormattedValue", {
4019
4045
  get: function () {
4020
- var _a;
4021
4046
  if (!this.value) {
4022
4047
  return this.placeholder;
4023
4048
  }
4024
- return ((_a = this.datePickerService.format$.getValue()) === null || _a === void 0 ? void 0 : _a.includes('Q'))
4025
- ? this.datePickerService.getQuarterDisplay(this.value)
4026
- : this.value.format(this.datePickerService.format$.getValue());
4049
+ var formatCached = this.datePickerService.format$.getValue();
4050
+ switch (true) {
4051
+ case formatCached === null || formatCached === void 0 ? void 0 : formatCached.includes('Q'):
4052
+ return this.datePickerService.getQuarterDisplay(this.value);
4053
+ case formatCached === null || formatCached === void 0 ? void 0 : formatCached.includes('W'):
4054
+ return this.datePickerService.getWeekDisplay(this.value);
4055
+ default:
4056
+ return this.value.format(formatCached);
4057
+ }
4027
4058
  },
4028
4059
  enumerable: false,
4029
4060
  configurable: true
4030
4061
  });
4031
4062
  DrDatePickerWithTimeframeComponent.prototype.ngOnInit = function () {
4032
- if (this.dateFormatConfig) {
4033
- this.datePickerService.formatConfig = Object.assign(Object.assign({}, this.datePickerService.formatConfig), this.dateFormatConfig);
4034
- }
4035
4063
  this.datePickerService.isTimeframeSelectionEnabled = this.canSelectTimeframe;
4036
4064
  this.cdr.markForCheck();
4037
4065
  };
@@ -4067,6 +4095,7 @@
4067
4095
  isDashboardDatepicker: [{ type: i0.Input }],
4068
4096
  dateFormatConfig: [{ type: i0.Input }],
4069
4097
  canSelectTimeframe: [{ type: i0.Input }],
4098
+ availableTimeframes: [{ type: i0.Input }],
4070
4099
  onChangeFormat: [{ type: i0.Output }]
4071
4100
  };
4072
4101
 
@@ -4117,6 +4146,20 @@
4117
4146
  datePickerFormat: [{ type: i0.Input, args: ['drDatePickerFormat',] }]
4118
4147
  };
4119
4148
 
4149
+ var DrShowTimeframePipe = /** @class */ (function () {
4150
+ function DrShowTimeframePipe() {
4151
+ }
4152
+ DrShowTimeframePipe.prototype.transform = function (arr, showOptions) {
4153
+ return arr.filter(function (item) { return showOptions.includes(item.timeframe); });
4154
+ };
4155
+ return DrShowTimeframePipe;
4156
+ }());
4157
+ DrShowTimeframePipe.decorators = [
4158
+ { type: i0.Pipe, args: [{
4159
+ name: 'drShowTimeframePipe'
4160
+ },] }
4161
+ ];
4162
+
4120
4163
  // !!! Please do not use such approach in other places
4121
4164
  // Hard fix for 'none' calendar view selection
4122
4165
  datepicker.MatCalendar.prototype.focusActiveCell = function () {
@@ -4136,7 +4179,8 @@
4136
4179
  DrDatePickerWithTimeframeComponent,
4137
4180
  DrDatePickerFormatDirective,
4138
4181
  DrDatePickerCustomHeaderComponent,
4139
- DrModelDebounceChangeDirective
4182
+ DrModelDebounceChangeDirective,
4183
+ DrShowTimeframePipe
4140
4184
  ];
4141
4185
  var DrInputsModule = /** @class */ (function () {
4142
4186
  function DrInputsModule() {
@@ -4352,7 +4396,6 @@
4352
4396
  exports.DrPopoverRef = DrPopoverRef;
4353
4397
  exports.DrPopoverService = DrPopoverService;
4354
4398
  exports.DrSelectComponent = DrSelectComponent;
4355
- exports.DrSharedUtils = DrSharedUtils;
4356
4399
  exports.DrSpinnerComponent = DrSpinnerComponent;
4357
4400
  exports.DrSpinnerDirective = DrSpinnerDirective;
4358
4401
  exports.DrSpinnerModule = DrSpinnerModule;
@@ -4382,6 +4425,7 @@
4382
4425
  exports["ɵe"] = DrDatePickerWithTimeframeComponent;
4383
4426
  exports["ɵf"] = DrDatePickerFormatDirective;
4384
4427
  exports["ɵg"] = DrDatePickerCustomHeaderComponent;
4428
+ exports["ɵh"] = DrShowTimeframePipe;
4385
4429
 
4386
4430
  Object.defineProperty(exports, '__esModule', { value: true });
4387
4431