@datarailsshared/datarailsshared 1.4.112 → 1.4.114
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/datarailsshared-datarailsshared.umd.js +87 -34
- package/bundles/datarailsshared-datarailsshared.umd.js.map +1 -1
- package/datarailsshared-datarailsshared-1.4.114.tgz +0 -0
- package/datarailsshared-datarailsshared.metadata.json +1 -1
- package/esm2015/lib/dr-dialog/components/dialog-modal-wrapper/dialog-modal-wrapper.component.js +3 -3
- package/esm2015/lib/dr-dialog/components/dialog-wrapper/dialog-wrapper.component.js +1 -1
- package/esm2015/lib/dr-error/dr-error.component.js +21 -7
- package/esm2015/lib/dr-inputs/button/button.component.js +3 -2
- package/esm2015/lib/dr-inputs/date-pickers/dr-date-picker-with-timeframe/dr-date-picker-with-timeframe.component.js +30 -10
- package/esm2015/lib/dr-tooltip/dr-tooltip.directive.js +18 -6
- package/fesm2015/datarailsshared-datarailsshared.js +78 -33
- package/fesm2015/datarailsshared-datarailsshared.js.map +1 -1
- package/lib/dr-error/dr-error.component.d.ts +5 -2
- package/lib/dr-inputs/button/button.component.d.ts +1 -0
- package/lib/dr-inputs/date-pickers/dr-date-picker-with-timeframe/dr-date-picker-with-timeframe.component.d.ts +8 -8
- package/lib/dr-tooltip/dr-tooltip.directive.d.ts +4 -1
- package/package.json +1 -1
- package/datarailsshared-datarailsshared-1.4.112.tgz +0 -0
|
@@ -589,7 +589,7 @@
|
|
|
589
589
|
monthYearA11yLabel: 'MMMM YYYY'
|
|
590
590
|
},
|
|
591
591
|
};
|
|
592
|
-
var ɵ0$
|
|
592
|
+
var ɵ0$8 = MONTH_FORMATS;
|
|
593
593
|
var MonthTagComponent = /** @class */ (function (_super) {
|
|
594
594
|
__extends(MonthTagComponent, _super);
|
|
595
595
|
function MonthTagComponent() {
|
|
@@ -651,7 +651,7 @@
|
|
|
651
651
|
useClass: materialMomentAdapter.MomentDateAdapter,
|
|
652
652
|
deps: [core.MAT_DATE_LOCALE, materialMomentAdapter.MAT_MOMENT_DATE_ADAPTER_OPTIONS],
|
|
653
653
|
},
|
|
654
|
-
{ provide: core.MAT_DATE_FORMATS, useValue: ɵ0$
|
|
654
|
+
{ provide: core.MAT_DATE_FORMATS, useValue: ɵ0$8 },
|
|
655
655
|
]
|
|
656
656
|
},] }
|
|
657
657
|
];
|
|
@@ -787,7 +787,7 @@
|
|
|
787
787
|
monthYearA11yLabel: 'MMMM YYYY'
|
|
788
788
|
},
|
|
789
789
|
};
|
|
790
|
-
var ɵ0$
|
|
790
|
+
var ɵ0$7 = WEEK_FORMATS;
|
|
791
791
|
var WeekTagComponent = /** @class */ (function (_super) {
|
|
792
792
|
__extends(WeekTagComponent, _super);
|
|
793
793
|
function WeekTagComponent() {
|
|
@@ -887,7 +887,7 @@
|
|
|
887
887
|
useClass: materialMomentAdapter.MomentDateAdapter,
|
|
888
888
|
deps: [core.MAT_DATE_LOCALE, materialMomentAdapter.MAT_MOMENT_DATE_ADAPTER_OPTIONS],
|
|
889
889
|
},
|
|
890
|
-
{ provide: core.MAT_DATE_FORMATS, useValue: ɵ0$
|
|
890
|
+
{ provide: core.MAT_DATE_FORMATS, useValue: ɵ0$7 },
|
|
891
891
|
]
|
|
892
892
|
},] }
|
|
893
893
|
];
|
|
@@ -909,7 +909,7 @@
|
|
|
909
909
|
monthYearA11yLabel: 'MMMM YYYY'
|
|
910
910
|
},
|
|
911
911
|
};
|
|
912
|
-
var ɵ0$
|
|
912
|
+
var ɵ0$6 = YEAR_FORMATS;
|
|
913
913
|
var YearTagComponent = /** @class */ (function (_super) {
|
|
914
914
|
__extends(YearTagComponent, _super);
|
|
915
915
|
function YearTagComponent() {
|
|
@@ -977,7 +977,7 @@
|
|
|
977
977
|
useClass: materialMomentAdapter.MomentDateAdapter,
|
|
978
978
|
deps: [core.MAT_DATE_LOCALE, materialMomentAdapter.MAT_MOMENT_DATE_ADAPTER_OPTIONS],
|
|
979
979
|
},
|
|
980
|
-
{ provide: core.MAT_DATE_FORMATS, useValue: ɵ0$
|
|
980
|
+
{ provide: core.MAT_DATE_FORMATS, useValue: ɵ0$6 },
|
|
981
981
|
]
|
|
982
982
|
},] }
|
|
983
983
|
];
|
|
@@ -1093,7 +1093,7 @@
|
|
|
1093
1093
|
monthYearA11yLabel: 'MMMM YYYY'
|
|
1094
1094
|
},
|
|
1095
1095
|
};
|
|
1096
|
-
var ɵ0$
|
|
1096
|
+
var ɵ0$5 = DAY_FORMATS;
|
|
1097
1097
|
var DayTagComponent = /** @class */ (function (_super) {
|
|
1098
1098
|
__extends(DayTagComponent, _super);
|
|
1099
1099
|
function DayTagComponent() {
|
|
@@ -1147,7 +1147,7 @@
|
|
|
1147
1147
|
useClass: materialMomentAdapter.MomentDateAdapter,
|
|
1148
1148
|
deps: [core.MAT_DATE_LOCALE, materialMomentAdapter.MAT_MOMENT_DATE_ADAPTER_OPTIONS],
|
|
1149
1149
|
},
|
|
1150
|
-
{ provide: core.MAT_DATE_FORMATS, useValue: ɵ0$
|
|
1150
|
+
{ provide: core.MAT_DATE_FORMATS, useValue: ɵ0$5 },
|
|
1151
1151
|
]
|
|
1152
1152
|
},] }
|
|
1153
1153
|
];
|
|
@@ -2005,27 +2005,42 @@
|
|
|
2005
2005
|
unsetMouseOn: [{ type: i0.HostListener, args: ['mouseleave',] }]
|
|
2006
2006
|
};
|
|
2007
2007
|
|
|
2008
|
+
var getOverlayPosition = function (position) { return (Object.assign({}, POPUP_POSITIONS[position])); };
|
|
2009
|
+
var ɵ0$4 = getOverlayPosition;
|
|
2008
2010
|
var DrTooltipDirective = /** @class */ (function () {
|
|
2009
2011
|
function DrTooltipDirective(overlay, overlayPositionBuilder, elementRef) {
|
|
2010
2012
|
this.overlay = overlay;
|
|
2011
2013
|
this.overlayPositionBuilder = overlayPositionBuilder;
|
|
2012
2014
|
this.elementRef = elementRef;
|
|
2013
2015
|
this.contentContext = {};
|
|
2014
|
-
this.
|
|
2016
|
+
this._position = 'top';
|
|
2015
2017
|
this.class = '';
|
|
2016
2018
|
// is used for preserve tooltip from being hidden for N milliseconds
|
|
2017
2019
|
this.drTooltipMousleaveTimeout = 0;
|
|
2020
|
+
this.overlayPosition = getOverlayPosition(this.position);
|
|
2018
2021
|
}
|
|
2022
|
+
Object.defineProperty(DrTooltipDirective.prototype, "position", {
|
|
2023
|
+
get: function () {
|
|
2024
|
+
return this._position;
|
|
2025
|
+
},
|
|
2026
|
+
set: function (value) {
|
|
2027
|
+
this._position = value;
|
|
2028
|
+
this.overlayPosition = getOverlayPosition(value);
|
|
2029
|
+
},
|
|
2030
|
+
enumerable: false,
|
|
2031
|
+
configurable: true
|
|
2032
|
+
});
|
|
2019
2033
|
Object.defineProperty(DrTooltipDirective.prototype, "drTooltipOptions", {
|
|
2020
2034
|
set: function (options) {
|
|
2021
2035
|
if (options === null || options === void 0 ? void 0 : options.indent) {
|
|
2022
|
-
var position =
|
|
2023
|
-
if (position.offsetY) {
|
|
2036
|
+
var position = getOverlayPosition(this.position);
|
|
2037
|
+
if (position === null || position === void 0 ? void 0 : position.offsetY) {
|
|
2024
2038
|
position.offsetY = position.offsetY < 0 ? -options.indent : options.indent;
|
|
2025
2039
|
}
|
|
2026
|
-
if (position.offsetX) {
|
|
2040
|
+
if (position === null || position === void 0 ? void 0 : position.offsetX) {
|
|
2027
2041
|
position.offsetX = position.offsetX < 0 ? -options.indent : options.indent;
|
|
2028
2042
|
}
|
|
2043
|
+
this.overlayPosition = position;
|
|
2029
2044
|
}
|
|
2030
2045
|
this.options = options;
|
|
2031
2046
|
},
|
|
@@ -2088,7 +2103,7 @@
|
|
|
2088
2103
|
}
|
|
2089
2104
|
};
|
|
2090
2105
|
DrTooltipDirective.prototype.createOverlay = function () {
|
|
2091
|
-
var positionStrategy = this.overlayPositionBuilder.flexibleConnectedTo(this.elementRef).withPositions([
|
|
2106
|
+
var positionStrategy = this.overlayPositionBuilder.flexibleConnectedTo(this.elementRef).withPositions([this.overlayPosition]);
|
|
2092
2107
|
this.overlayRef = this.overlay.create({ positionStrategy: positionStrategy });
|
|
2093
2108
|
};
|
|
2094
2109
|
DrTooltipDirective.prototype.renderTooltip = function () {
|
|
@@ -2424,7 +2439,7 @@
|
|
|
2424
2439
|
DrButtonComponent.decorators = [
|
|
2425
2440
|
{ type: i0.Component, args: [{
|
|
2426
2441
|
selector: 'dr-button',
|
|
2427
|
-
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\"\n [style.color]=\"iconColor || 'inherit'\"></i>\n </ng-container>\n <i *ngIf=\"_isLoading\" class=\"dr dr-spinner dr-icon-load\"></i>\n</button>\n",
|
|
2442
|
+
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.font-size]=\"iconSize || '24px'\" [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\"\n [style.color]=\"iconColor || 'inherit'\"></i>\n </ng-container>\n <i *ngIf=\"_isLoading\" class=\"dr dr-spinner dr-icon-load\"></i>\n</button>\n",
|
|
2428
2443
|
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}: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-secondary-first],:host button[theme][theme~=split-secondary-first]:hover{padding-left:10px;padding-right:8px}:host button[theme][theme~=split-secondary-first][icon=true]{padding-left:6px;padding-right:2px}:host button[theme][theme~=split-primary-first],:host button[theme][theme~=split-primary-first]:hover{padding-left:12px;padding-right:9px}: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}: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-secondary-last],:host button[theme][theme~=split-secondary-last]:hover{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]{padding-left:2px;padding-right:6px}:host button[theme][theme~=split-primary-last]{padding-left:9px;padding-right:12px}:host button[theme][theme~=split-primary-last][icon=true]{padding-left:1px!important;padding-right:6px}:host button[theme][theme~=split-primary-last]:hover{padding-left:9px;padding-right:12px}:host button[theme][theme~=split-primary-last]:hover[icon=true]{padding-left:1px!important;padding-right:6px}: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],:host.dr-button-selected button[theme][theme~=secondary-icon]{background-color:#f2f2fb;border:1px solid #4646ce}\n"]
|
|
2429
2444
|
},] }
|
|
2430
2445
|
];
|
|
@@ -2436,6 +2451,7 @@
|
|
|
2436
2451
|
iconAfterLabel: [{ type: i0.Input }],
|
|
2437
2452
|
isBold: [{ type: i0.Input }],
|
|
2438
2453
|
iconColor: [{ type: i0.Input }],
|
|
2454
|
+
iconSize: [{ type: i0.Input }],
|
|
2439
2455
|
disabled: [{ type: i0.Input }],
|
|
2440
2456
|
isLoading: [{ type: i0.Input }],
|
|
2441
2457
|
click: [{ type: i0.Output }],
|
|
@@ -3522,10 +3538,12 @@
|
|
|
3522
3538
|
DrLayoutBodyComponent.ctorParameters = function () { return []; };
|
|
3523
3539
|
|
|
3524
3540
|
var DrErrorComponent = /** @class */ (function () {
|
|
3525
|
-
function DrErrorComponent(cdr) {
|
|
3541
|
+
function DrErrorComponent(cdr, formGroupDirective) {
|
|
3526
3542
|
this.cdr = cdr;
|
|
3543
|
+
this.formGroupDirective = formGroupDirective;
|
|
3527
3544
|
this.destroyed$ = new rxjs.Subject();
|
|
3528
3545
|
this.label = 'Field error';
|
|
3546
|
+
this.noIcon = false;
|
|
3529
3547
|
}
|
|
3530
3548
|
Object.defineProperty(DrErrorComponent.prototype, "control", {
|
|
3531
3549
|
set: function (value) {
|
|
@@ -3541,6 +3559,18 @@
|
|
|
3541
3559
|
enumerable: false,
|
|
3542
3560
|
configurable: true
|
|
3543
3561
|
});
|
|
3562
|
+
Object.defineProperty(DrErrorComponent.prototype, "controlName", {
|
|
3563
|
+
set: function (value) {
|
|
3564
|
+
if (!value || typeof value !== 'string')
|
|
3565
|
+
return;
|
|
3566
|
+
if (!this.formGroupDirective) {
|
|
3567
|
+
throw new Error('You must provide a formGroupDirective to use this input');
|
|
3568
|
+
}
|
|
3569
|
+
this.control = this.formGroupDirective.control.get(value);
|
|
3570
|
+
},
|
|
3571
|
+
enumerable: false,
|
|
3572
|
+
configurable: true
|
|
3573
|
+
});
|
|
3544
3574
|
Object.defineProperty(DrErrorComponent.prototype, "errorString", {
|
|
3545
3575
|
get: function () {
|
|
3546
3576
|
var _a;
|
|
@@ -3568,18 +3598,21 @@
|
|
|
3568
3598
|
}());
|
|
3569
3599
|
DrErrorComponent.decorators = [
|
|
3570
3600
|
{ type: i0.Component, args: [{
|
|
3571
|
-
template: "<div *ngIf=\"_control.status === 'INVALID' && !_control.pristine\"\n [drTooltip]=\"errorString\"\n class=\"error-container\"\n [class.warning]=\"isWarning\">\n <i class=\"dr-icon-status-error\"></i>\n <span>{{label}}</span>\n</div>\n",
|
|
3601
|
+
template: "<div *ngIf=\"_control.status === 'INVALID' && !_control.pristine\"\n [drTooltip]=\"errorString\"\n class=\"error-container\"\n [class.warning]=\"isWarning\">\n <i *ngIf=\"!noIcon\" class=\"dr-icon-status-error\"></i>\n <span>{{label}}</span>\n</div>\n",
|
|
3572
3602
|
selector: 'dr-error',
|
|
3573
3603
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
3574
|
-
styles: [":host{display:flex;margin-top:8px}:host:empty{display:none}:host .error-container{display:flex;align-items:center;cursor:pointer;width:auto;color:#bf1d30}:host .error-container i{font-size:16px;margin-right:2px}:host .error-container span{font-family:\"Poppins\",sans-serif;font-style:normal;font-weight:400;font-size:11px;line-height:20px}:host .error-container.warning{color:#ffb800}:host .error-container.warning span{color:#9e5f00}\n"]
|
|
3604
|
+
styles: [":host{display:flex;margin-top:8px}:host:empty{display:none}:host .error-container{display:flex;align-items:center;cursor:pointer;width:auto;color:#bf1d30}:host .error-container i{font-size:16px;margin-right:2px}:host .error-container span{font-family:\"Poppins\",sans-serif;font-style:normal;font-weight:400;font-size:11px;line-height:20px}:host .error-container.warning{color:#ffb800}:host .error-container.warning span{color:#9e5f00}:host.no-icon{margin-top:2px}:host.no-icon .error-container span{font-size:12px}\n"]
|
|
3575
3605
|
},] }
|
|
3576
3606
|
];
|
|
3577
3607
|
DrErrorComponent.ctorParameters = function () { return [
|
|
3578
|
-
{ type: i0.ChangeDetectorRef }
|
|
3608
|
+
{ type: i0.ChangeDetectorRef },
|
|
3609
|
+
{ type: forms.FormGroupDirective, decorators: [{ type: i0.Optional }] }
|
|
3579
3610
|
]; };
|
|
3580
3611
|
DrErrorComponent.propDecorators = {
|
|
3581
3612
|
control: [{ type: i0.Input }],
|
|
3582
|
-
|
|
3613
|
+
controlName: [{ type: i0.Input }],
|
|
3614
|
+
label: [{ type: i0.Input }],
|
|
3615
|
+
noIcon: [{ type: i0.Input }, { type: i0.HostBinding, args: ['class.no-icon',] }]
|
|
3583
3616
|
};
|
|
3584
3617
|
|
|
3585
3618
|
var DialogWrapperComponent = /** @class */ (function () {
|
|
@@ -3652,7 +3685,7 @@
|
|
|
3652
3685
|
{ type: i0.Component, args: [{
|
|
3653
3686
|
selector: 'dr-dialog-wrapper',
|
|
3654
3687
|
template: "<div class=\"dialog-wrapper\"\n [class.dialog-wrapper--confirmation-no-title]=\"dialogData.theme?.isConfirmation && !dialogData.title\">\n <i class=\"dr-icon-exit\" data-test=\"close_btn\" (click)=\"closeDialog()\" *ngIf=\"!dialogData?.hideCloseBtn\"></i>\n\n <div header class=\"dialog-wrapper__header\" *ngIf=\"dialogData.title\">\n <h1 class=\"dialog-wrapper__header__title\" data-test=\"dialogTitle\">{{ dialogData.title }}</h1>\n <h1 class=\"dialog-wrapper__header__subtitle\" data-test=\"dialogSubtitle\"\n *ngIf=\"dialogData.subtitle\">{{ dialogData.subtitle }}</h1>\n </div>\n <div class=\"dialog-wrapper__content\"\n [class.dialog-wrapper__content--no-padding]=\"dialogData.theme?.contentNoPadding\"\n [ngClass]=\"{ 'flex-position': dialogData.contentIcon?.class && !childComponent }\">\n <span *ngIf=\"dialogData.contentIcon?.class\" class=\"dialog-wrapper__content__icon\">\n <i [ngClass]=\"dialogData.contentIcon.class\" [style.color]=\"dialogData.contentIcon?.color || 'inherit'\"></i>\n </span>\n <span [innerHTML]=\"dialogData.content\"></span>\n <span #content class=\"dialog-wrapper__content__anchor\"> </span>\n </div>\n <div footer class=\"dialog-wrapper__footer\" *ngIf=\"dialogData.cancelButton || dialogData.acceptButton\">\n <div class=\"dialog-wrapper__footer__buttons\">\n <span *ngIf=\"dialogData.customButton\"\n class=\"dialog-wrapper__footer__button-wrapper\"\n [drTooltip]=\"dialogData.customButton.isDisabled && dialogData.tooltips?.customDisabled\">\n <dr-button (click)=\"onDecline()\"\n [theme]=\"'secondary'\"\n [isLoading]=\"isLoading\"\n data-test=\"declineBtn\"\n [disabled]=\"dialogData.customButton.isDisabled\"\n [drTooltip]=\"dialogData.tooltips?.custom\">{{ dialogData.customButton.label }}</dr-button>\n </span>\n <span *ngIf=\"dialogData.cancelButton\"\n class=\"dialog-wrapper__footer__button-wrapper\"\n [drTooltip]=\"dialogData.cancelButton.isDisabled && dialogData.tooltips?.cancelDisabled\">\n <dr-button (click)=\"closeDialog()\"\n [theme]=\"'secondary'\"\n data-test=\"closeBtn\"\n [disabled]=\"dialogData.cancelButton.isDisabled\"\n [drTooltip]=\"dialogData.tooltips?.cancel\">{{ dialogData.cancelButton.label }}</dr-button>\n </span>\n <span *ngIf=\"dialogData.acceptButton\"\n class=\"dialog-wrapper__footer__button-wrapper\"\n [drTooltip]=\"dialogData.acceptButton.isDisabled && dialogData.tooltips?.acceptDisabled\">\n <dr-button (click)=\"onAcceptDialog()\"\n [theme]=\"dialogData.acceptButton?.theme || 'primary'\"\n [isLoading]=\"isLoading\"\n data-test=\"acceptBtn\"\n [disabled]=\"dialogData.acceptButton.isDisabled\"\n [drTooltip]=\"dialogData.tooltips?.accept\">{{ dialogData.acceptButton.label }}</dr-button>\n </span>\n </div>\n </div>\n</div>\n",
|
|
3655
|
-
styles: [":host.small-modal{min-height:188px;max-height:467px;min-width:400px;max-width:400px}:host.medium-modal{min-height:188px;max-height:467px;min-width:632px;max-width:632px}:host.large-modal{min-width:750px;max-width:750px}:host.medium-large-modal{min-width:669px;max-width:669px}:host.xl-modal{min-height:188px;max-height:800px;min-width:1100px;max-width:1100px}:host.xl-custom-modal{min-height:188px;max-height:800px;min-width:1100px;max-width:100%}::ng-deep .dialog-wrapper{display:flex;justify-content:space-between;flex-direction:column;position:relative}::ng-deep .dialog-wrapper>.dr-icon-exit{z-index:1;position:absolute;right:32px;top:20px;color:#51566f;cursor:pointer}::ng-deep .dialog-wrapper__header{display:flex;flex-direction:column;padding:8px 52px 8px 32px;border-bottom:1px solid #e5e6ea}::ng-deep .dialog-wrapper__header__title{color:#151b3f;position:static;font-weight:600;font-size:18px;line-height:24px}::ng-deep .dialog-wrapper__header__subtitle{font-size:14px;line-height:20px;margin:0}::ng-deep .dialog-wrapper--confirmation-no-title{padding-top:16px;height:100%}::ng-deep .dialog-wrapper__content{overflow-y:inherit;font-size:14px;font-weight:400;line-height:22px;padding:24px 32px 32px}::ng-deep .dialog-wrapper__content__anchor{display:none}::ng-deep .dialog-wrapper__content--no-padding{padding:0}::ng-deep .dialog-wrapper__content__icon{margin-right:10px;top:5px;position:relative}::ng-deep .dialog-wrapper__content.flex-position{display:flex}::ng-deep .dialog-wrapper__footer{border-top:1px solid #e5e6ea}::ng-deep .dialog-wrapper__footer__buttons{display:flex;justify-content:flex-end;padding
|
|
3688
|
+
styles: [":host.small-modal{min-height:188px;max-height:467px;min-width:400px;max-width:400px}:host.medium-modal{min-height:188px;max-height:467px;min-width:632px;max-width:632px}:host.large-modal{min-width:750px;max-width:750px}:host.medium-large-modal{min-width:669px;max-width:669px}:host.xl-modal{min-height:188px;max-height:800px;min-width:1100px;max-width:1100px}:host.xl-custom-modal{min-height:188px;max-height:800px;min-width:1100px;max-width:100%}::ng-deep .dialog-wrapper{display:flex;justify-content:space-between;flex-direction:column;position:relative}::ng-deep .dialog-wrapper>.dr-icon-exit{z-index:1;position:absolute;right:32px;top:20px;color:#51566f;cursor:pointer}::ng-deep .dialog-wrapper__header{display:flex;flex-direction:column;padding:8px 52px 8px 32px;border-bottom:1px solid #e5e6ea}::ng-deep .dialog-wrapper__header__title{color:#151b3f;position:static;font-weight:600;font-size:18px;line-height:24px}::ng-deep .dialog-wrapper__header__subtitle{font-size:14px;line-height:20px;margin:0}::ng-deep .dialog-wrapper--confirmation-no-title{padding-top:16px;height:100%}::ng-deep .dialog-wrapper__content{overflow-y:inherit;font-size:14px;font-weight:400;line-height:22px;padding:24px 32px 32px}::ng-deep .dialog-wrapper__content__anchor{display:none}::ng-deep .dialog-wrapper__content--no-padding{padding:0}::ng-deep .dialog-wrapper__content__icon{margin-right:10px;top:5px;position:relative}::ng-deep .dialog-wrapper__content.flex-position{display:flex}::ng-deep .dialog-wrapper__footer{border-top:1px solid #e5e6ea}::ng-deep .dialog-wrapper__footer__buttons{display:flex;justify-content:flex-end;padding:11px 32px}::ng-deep .dialog-wrapper__footer__buttons>dr-button:nth-child(n+2){margin-left:12px}::ng-deep .dialog-wrapper__footer__button-wrapper:nth-child(n+2){margin-left:12px}\n"]
|
|
3656
3689
|
},] }
|
|
3657
3690
|
];
|
|
3658
3691
|
DialogWrapperComponent.ctorParameters = function () { return [
|
|
@@ -3742,8 +3775,8 @@
|
|
|
3742
3775
|
DialogModalWrapperComponent.decorators = [
|
|
3743
3776
|
{ type: i0.Component, args: [{
|
|
3744
3777
|
selector: 'dr-dialog-modal-wrapper',
|
|
3745
|
-
template: "<div header class=\"header-dialog\">\n <h1 class=\"title-dialog\" data-test=\"modalTitle\">{{ dialogData.title }}</h1>\n <i mat-icon-button *ngIf=\"!dialogData.hideCloseBtn\" (click)=\"closeDialog()\" class=\"dr-icon-exit icon-close\"\n data-test=\"xBtn\"></i>\n</div>\n<div *ngIf=\"dialogData.content\" class=\"content-dialog\">\n <ng-container>{{ dialogData.content }}</ng-container>\n <span #content class=\"content-anchor\"></span>\n</div>\n<form *ngIf=\"dialogData.fields\" [formGroup]=\"form\" class=\"dr-smart-from\">\n <div class=\"dr-smart-form_wrapper\">\n <div *ngFor=\"let field of dialogData.fields\" class=\"dr-smart-form_group\"\n [ngStyle]=\"{ display: field.isLabelFullWidth ? 'block' : 'flex' }\">\n <label *ngIf=\"field.label && field.type !== dialogFieldType.CHECKBOX\"\n [ngClass]=\"field.isLabelFullWidth ? 'col-md-12 mb-2' : 'col-md-2'\"\n class=\"label p-0 d-flex align-items-center\">{{ field.label }}</label>\n <div class=\"input-group p-0\"\n [ngClass]=\"{ 'col-md-10': field.label && !field.isLabelFullWidth, 'col-md-12': !field.label || field.isLabelFullWidth }\">\n <dr-select *ngIf=\"field.type === dialogFieldType.SELECT\"\n [searchable]=\"dialogData.searchable\"\n [clearable]=\"dialogData.clearable\"\n [formControlName]=\"field.name\"\n [bindLabel]=\"field.bindLabel || null\"\n [bindValue]=\"field.bindValue || null\"\n [selectedItem]=\"field.default\"\n [items]=\"field.items || (field.items$ | async)\"\n [required]=\"true\"\n [placeholder]=\"field.placeholder\">\n <ng-template *ngIf=\"dialogData?.footerTemplateData\" #optionFooterTemplate let-item=\"item\" let-close=\"close\">\n <button (click)=\"footerAction(); close();\" class=\"dr-select-footer__btn\">\n <i *ngIf=\"dialogData.footerTemplateData.icon\"\n class=\"{{ dialogData.footerTemplateData.icon }}\"></i>\n {{ dialogData.footerTemplateData.label }}</button>\n </ng-template>\n </dr-select>\n <dr-input *ngIf=\"field.type === dialogFieldType.INPUT\" data-test=\"modalInput\" class=\"form-control\"\n [formControlName]=\"field.name\" [placeholder]=\"field.placeholder\"></dr-input>\n <dr-date-picker *ngIf=\"field.type === dialogFieldType.DATE_PICKER\"\n [formControlName]=\"field.name\"\n [format]=\"field.datePickerFormat\"\n [placeholder]=\"field.placeholder\"></dr-date-picker>\n <dr-checkbox *ngIf=\"field.type === dialogFieldType.CHECKBOX\" [formControlName]=\"field.name\">\n {{ field.label }}\n </dr-checkbox>\n <label class=\"form-error-alert\" *ngIf=\"dialogData.errorMessage && !form.pristine && form.invalid\">\n {{ dialogData.errorMessage }}\n </label>\n <label class=\"form-error-alert\"\n *ngIf=\"form.valid && showServerErrorMessage && dialogData.serverErrorMessage\">\n {{ dialogData.serverErrorMessage }}\n </label>\n </div>\n </div>\n </div>\n</form>\n\n<div footer class=\"footer-dialog\">\n <div class=\"buttons-wrapper\" *ngIf=\"dialogData.cancelButton || dialogData.acceptButton\">\n <dr-button *ngIf=\"dialogData.cancelButton\" data-test=\"modalCloseBtn\" (click)=\"closeDialog()\"\n [theme]=\"'secondary'\">{{ dialogData.cancelButton.label }}</dr-button>\n <dr-button *ngIf=\"dialogData.acceptButton\" data-test=\"modalAddBtn\" (click)=\"onAccept()\" [theme]=\"'primary'\"\n [isLoading]=\"isLoading\" [disabled]=\"form.invalid\">{{ dialogData.acceptButton.label }}</dr-button>\n </div>\n</div>\n",
|
|
3746
|
-
styles: [":host{display:flex;justify-content:space-between;flex-direction:column}:host.small-modal{min-height:188px;max-height:467px;min-width:400px;max-width:400px}:host.medium-modal{min-height:188px;max-height:467px;min-width:632px;max-width:632px}.header-dialog{display:flex;flex-direction:row;justify-content:space-between;align-items:center;padding:8px 39px 8px 32px;border-bottom:1px solid #e5e6ea}.title-dialog{color:#151b3f;position:static;font-weight:bold;font-size:18px;line-height:24px}.content-dialog{font-weight:400;font-size:14px;padding:16px 32px 5px}.icon-close{color:#51566f;cursor:pointer}.dr-smart-from{font-size:14px;font-weight:500;line-height:22px;padding:16px 32px 22px}.dr-smart-from dr-checkbox{font-weight:400}.content-dialog{padding:16px 32px 0;font-weight:400;font-size:14px;line-height:22px}.content-anchor{display:none}.footer-dialog{border-top:1px solid #e5e6ea}.buttons-wrapper{display:flex;justify-content:flex-end;padding-top:10px;padding-right:32px;padding-bottom:11px}.buttons-wrapper dr-button:nth-of-type(2){margin-left:12px}.form-error-alert{position:absolute;margin-top:5px;font-size:12px;color:red}.dr-select-footer__btn{background-color:transparent;display:flex;align-items:center;justify-content:flex-start;cursor:pointer;min-width:15rem;font-style:normal;font-weight:400;font-size:14px;line-height:24px;clear:both;width:100%;white-space:nowrap;padding:0 12px;height:36px;flex-shrink:0}\n"]
|
|
3778
|
+
template: "<div header class=\"header-dialog\">\n <h1 class=\"title-dialog\" data-test=\"modalTitle\">{{ dialogData.title }}</h1>\n <i mat-icon-button *ngIf=\"!dialogData.hideCloseBtn\" (click)=\"closeDialog()\" class=\"dr-icon-exit icon-close\"\n data-test=\"xBtn\"></i>\n</div>\n<div *ngIf=\"dialogData.content\" class=\"content-dialog\">\n <ng-container>{{ dialogData.content }}</ng-container>\n <span #content class=\"content-anchor\"></span>\n</div>\n<form *ngIf=\"dialogData.fields\" [formGroup]=\"form\" class=\"dr-smart-from\">\n <div class=\"dr-smart-form_wrapper\">\n <div *ngFor=\"let field of dialogData.fields\" class=\"dr-smart-form_group\"\n [ngStyle]=\"{ display: field.isLabelFullWidth ? 'block' : 'flex' }\">\n <label *ngIf=\"field.label && field.type !== dialogFieldType.CHECKBOX\"\n [ngClass]=\"field.isLabelFullWidth ? 'col-md-12 mb-2' : 'col-md-2'\"\n class=\"label p-0 d-flex align-items-center\">{{ field.label }}</label>\n <div class=\"input-group p-0\"\n [ngClass]=\"{ 'col-md-10': field.label && !field.isLabelFullWidth, 'col-md-12': !field.label || field.isLabelFullWidth }\">\n <dr-select *ngIf=\"field.type === dialogFieldType.SELECT\"\n [searchable]=\"dialogData.searchable\"\n [clearable]=\"dialogData.clearable\"\n [formControlName]=\"field.name\"\n [bindLabel]=\"field.bindLabel || null\"\n [bindValue]=\"field.bindValue || null\"\n [selectedItem]=\"field.default\"\n [items]=\"field.items || (field.items$ | async)\"\n [required]=\"true\"\n [placeholder]=\"field.placeholder\">\n <ng-template *ngIf=\"dialogData?.footerTemplateData\" #optionFooterTemplate let-item=\"item\" let-close=\"close\">\n <button (click)=\"footerAction(); close();\" class=\"dr-select-footer__btn\">\n <i *ngIf=\"dialogData.footerTemplateData.icon\"\n class=\"{{ dialogData.footerTemplateData.icon }}\"></i>\n {{ dialogData.footerTemplateData.label }}</button>\n </ng-template>\n </dr-select>\n <dr-input *ngIf=\"field.type === dialogFieldType.INPUT\" data-test=\"modalInput\" class=\"form-control\"\n [formControlName]=\"field.name\" [placeholder]=\"field.placeholder\"></dr-input>\n <dr-date-picker *ngIf=\"field.type === dialogFieldType.DATE_PICKER\"\n [formControlName]=\"field.name\"\n [format]=\"field.datePickerFormat\"\n [placeholder]=\"field.placeholder\"></dr-date-picker>\n <dr-checkbox *ngIf=\"field.type === dialogFieldType.CHECKBOX\" [formControlName]=\"field.name\">\n {{ field.label }}\n </dr-checkbox>\n <label class=\"form-field-error-alert\" *ngIf=\"form.invalid && form.controls[field.name]?.dirty && form.controls[field.name]?.errors\">\n {{ form.controls[field.name].errors.errorString }}\n </label>\n <label class=\"form-error-alert\" *ngIf=\"dialogData.errorMessage && !form.pristine && form.invalid\">\n {{ dialogData.errorMessage }}\n </label>\n <label class=\"form-error-alert\"\n *ngIf=\"form.valid && showServerErrorMessage && dialogData.serverErrorMessage\">\n {{ dialogData.serverErrorMessage }}\n </label>\n </div>\n </div>\n </div>\n</form>\n\n<div footer class=\"footer-dialog\">\n <div class=\"buttons-wrapper\" *ngIf=\"dialogData.cancelButton || dialogData.acceptButton\">\n <dr-button *ngIf=\"dialogData.cancelButton\" data-test=\"modalCloseBtn\" (click)=\"closeDialog()\"\n [theme]=\"'secondary'\">{{ dialogData.cancelButton.label }}</dr-button>\n <dr-button *ngIf=\"dialogData.acceptButton\" data-test=\"modalAddBtn\" (click)=\"onAccept()\" [theme]=\"'primary'\"\n [isLoading]=\"isLoading\" [disabled]=\"form.invalid\">{{ dialogData.acceptButton.label }}</dr-button>\n </div>\n</div>\n",
|
|
3779
|
+
styles: [":host{display:flex;justify-content:space-between;flex-direction:column}:host.small-modal{min-height:188px;max-height:467px;min-width:400px;max-width:400px}:host.medium-modal{min-height:188px;max-height:467px;min-width:632px;max-width:632px}.header-dialog{display:flex;flex-direction:row;justify-content:space-between;align-items:center;padding:8px 39px 8px 32px;border-bottom:1px solid #e5e6ea}.title-dialog{color:#151b3f;position:static;font-weight:bold;font-size:18px;line-height:24px}.content-dialog{font-weight:400;font-size:14px;padding:16px 32px 5px}.icon-close{color:#51566f;cursor:pointer}.dr-smart-from{font-size:14px;font-weight:500;line-height:22px;padding:16px 32px 22px}.dr-smart-from dr-checkbox{font-weight:400}.content-dialog{padding:16px 32px 0;font-weight:400;font-size:14px;line-height:22px}.content-anchor{display:none}.footer-dialog{border-top:1px solid #e5e6ea}.buttons-wrapper{display:flex;justify-content:flex-end;padding-top:10px;padding-right:32px;padding-bottom:11px}.buttons-wrapper dr-button:nth-of-type(2){margin-left:12px}.form-field-error-alert{font-size:12px;color:#bf1d30;line-height:20px}.form-error-alert{position:absolute;margin-top:5px;font-size:12px;color:red}.dr-select-footer__btn{background-color:transparent;display:flex;align-items:center;justify-content:flex-start;cursor:pointer;min-width:15rem;font-style:normal;font-weight:400;font-size:14px;line-height:24px;clear:both;width:100%;white-space:nowrap;padding:0 12px;height:36px;flex-shrink:0}\n"]
|
|
3747
3780
|
},] }
|
|
3748
3781
|
];
|
|
3749
3782
|
DialogModalWrapperComponent.ctorParameters = function () { return [
|
|
@@ -4598,7 +4631,7 @@
|
|
|
4598
4631
|
var DrDatePickerWithTimeframeComponent = /** @class */ (function (_super) {
|
|
4599
4632
|
__extends(DrDatePickerWithTimeframeComponent, _super);
|
|
4600
4633
|
function DrDatePickerWithTimeframeComponent(cdr, dateAdapter, datePickerService) {
|
|
4601
|
-
var
|
|
4634
|
+
var _c;
|
|
4602
4635
|
var _this = _super.call(this, cdr, dateAdapter, datePickerService) || this;
|
|
4603
4636
|
_this.cdr = cdr;
|
|
4604
4637
|
_this.dateAdapter = dateAdapter;
|
|
@@ -4607,13 +4640,15 @@
|
|
|
4607
4640
|
_this.canSelectTimeframe = true;
|
|
4608
4641
|
// eslint-disable-next-line
|
|
4609
4642
|
_this.onChangeFormat = new i0.EventEmitter();
|
|
4610
|
-
_this.pagingSetup = (
|
|
4611
|
-
|
|
4612
|
-
|
|
4613
|
-
|
|
4614
|
-
|
|
4615
|
-
|
|
4616
|
-
|
|
4643
|
+
_this.pagingSetup = (_c = {},
|
|
4644
|
+
_c[exports.TimeframeOption.YEAR] = function (forward) { return _this.getNextDate('addCalendarYears', 1, forward); },
|
|
4645
|
+
_c[exports.TimeframeOption.QUARTER] = function (forward) { return _this.getNextDate('addCalendarMonths', 3, forward); },
|
|
4646
|
+
_c[exports.TimeframeOption.MONTH] = function (forward) { return _this.getNextDate('addCalendarMonths', 1, forward); },
|
|
4647
|
+
_c[exports.TimeframeOption.DAY] = function (forward) { return _this.getNextDate('addCalendarDays', 1, forward); },
|
|
4648
|
+
_c[exports.TimeframeOption.WEEK] = function (forward) { return _this.getNextDate('addCalendarDays', 7, forward); },
|
|
4649
|
+
_c);
|
|
4650
|
+
_this.isNextDateDisabled = false;
|
|
4651
|
+
_this.isPrevDateDisabled = false;
|
|
4617
4652
|
_this.onChangeDebounced$ = new rxjs.Subject();
|
|
4618
4653
|
datePickerService.isTimeframeSelectionEnabled = true;
|
|
4619
4654
|
datePickerService.format$.pipe(operators.takeUntil(_this.destroyed$)).subscribe(function (value) {
|
|
@@ -4675,12 +4710,12 @@
|
|
|
4675
4710
|
};
|
|
4676
4711
|
DrDatePickerWithTimeframeComponent.prototype.pagingClicked = function (forward) {
|
|
4677
4712
|
if (this.pagingSetup[this.datePickerService.timeframe]) {
|
|
4678
|
-
this.pagingSetup[this.datePickerService.timeframe](forward);
|
|
4713
|
+
var nextValue = this.pagingSetup[this.datePickerService.timeframe](forward);
|
|
4714
|
+
this.pagingDateChange(nextValue);
|
|
4679
4715
|
}
|
|
4680
4716
|
this.datePicker.close();
|
|
4681
4717
|
};
|
|
4682
|
-
DrDatePickerWithTimeframeComponent.prototype.pagingDateChange = function (
|
|
4683
|
-
var newValue = this.dateAdapter[actionCall](this.innerValue, forward ? amount : -amount);
|
|
4718
|
+
DrDatePickerWithTimeframeComponent.prototype.pagingDateChange = function (newValue) {
|
|
4684
4719
|
if (this.paginationDebounce) {
|
|
4685
4720
|
// this is required for not sending extra requests when user quickly clicking on pagination
|
|
4686
4721
|
// here we do the same as in setValueFromMoment(newValue) with difference
|
|
@@ -4693,12 +4728,30 @@
|
|
|
4693
4728
|
this.setValueFromMoment(newValue);
|
|
4694
4729
|
}
|
|
4695
4730
|
};
|
|
4731
|
+
DrDatePickerWithTimeframeComponent.prototype.writeValue = function (value) {
|
|
4732
|
+
_super.prototype.writeValue.call(this, value);
|
|
4733
|
+
if (!value)
|
|
4734
|
+
return;
|
|
4735
|
+
this.restrictPagination();
|
|
4736
|
+
};
|
|
4737
|
+
DrDatePickerWithTimeframeComponent.prototype.getNextDate = function (actionCall, amount, forward) {
|
|
4738
|
+
var _a, _b;
|
|
4739
|
+
return (_b = (_a = this.dateAdapter)[actionCall]) === null || _b === void 0 ? void 0 : _b.call(_a, this.innerValue, forward ? amount : -amount);
|
|
4740
|
+
};
|
|
4741
|
+
DrDatePickerWithTimeframeComponent.prototype.restrictPagination = function () {
|
|
4742
|
+
if (!this._min && !this._max)
|
|
4743
|
+
return;
|
|
4744
|
+
var nextValue = this.pagingSetup[this.datePickerService.timeframe](true);
|
|
4745
|
+
var prevValue = this.pagingSetup[this.datePickerService.timeframe](false);
|
|
4746
|
+
this.isNextDateDisabled = this._max && nextValue && nextValue.unix() > this._max.unix();
|
|
4747
|
+
this.isPrevDateDisabled = this._min && prevValue && prevValue.unix() < this._min.unix();
|
|
4748
|
+
};
|
|
4696
4749
|
return DrDatePickerWithTimeframeComponent;
|
|
4697
4750
|
}(DrDatePickerComponent));
|
|
4698
4751
|
DrDatePickerWithTimeframeComponent.decorators = [
|
|
4699
4752
|
{ type: i0.Component, args: [{
|
|
4700
4753
|
selector: 'dr-date-picker-with-timeframe',
|
|
4701
|
-
template: "<dr-button theme=\"icon\" icon=\"dr-icon-arrow-left\" (click)=\"pagingClicked(false)\"></dr-button>\n<div class=\"dr-datepicker-input-container\">\n <i *ngIf=\"isDashboardDatepicker\" class=\"dr-icon-date\"></i>\n <div\n class=\"dr-datepicker-input-container__formatted-value-display\"\n (click)=\"datepickerInput.click()\"\n >\n {{ displayedFormattedValue }}\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<dr-button theme=\"icon\" icon=\"dr-icon-arrow-right\" (click)=\"pagingClicked(true)\"></dr-button>\n<mat-datepicker #datePicker\n class=\"dr-timeframe-datepicker\"\n [calendarHeaderComponent]=\"customHeader\"\n (yearSelected)=\"chosenPeriodHandler($event, timeframeOption.YEAR)\"\n (monthSelected)=\"chosenPeriodHandler($event, timeframeOption.MONTH)\">\n</mat-datepicker>\n",
|
|
4754
|
+
template: "<dr-button [disabled]=\"isPrevDateDisabled\" theme=\"icon\" icon=\"dr-icon-arrow-left\" (click)=\"pagingClicked(false)\"></dr-button>\n<div class=\"dr-datepicker-input-container\">\n <i *ngIf=\"isDashboardDatepicker\" class=\"dr-icon-date\"></i>\n <div\n class=\"dr-datepicker-input-container__formatted-value-display\"\n (click)=\"datepickerInput.click()\"\n >\n {{ displayedFormattedValue }}\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<dr-button [disabled]=\"isNextDateDisabled\" theme=\"icon\" icon=\"dr-icon-arrow-right\" (click)=\"pagingClicked(true)\"></dr-button>\n<mat-datepicker #datePicker\n class=\"dr-timeframe-datepicker\"\n [calendarHeaderComponent]=\"customHeader\"\n (yearSelected)=\"chosenPeriodHandler($event, timeframeOption.YEAR)\"\n (monthSelected)=\"chosenPeriodHandler($event, timeframeOption.MONTH)\">\n</mat-datepicker>\n",
|
|
4702
4755
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
4703
4756
|
providers: [
|
|
4704
4757
|
{ provide: forms.NG_VALUE_ACCESSOR, useExisting: DrDatePickerWithTimeframeComponent, multi: true },
|