@coreui/angular-pro 5.4.1 → 5.4.2
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.
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, ElementRef, Directive, input, Renderer2, effect, TemplateRef, booleanAttribute, untracked, NgModule, computed, Injectable, Component, linkedSignal, output, signal, afterNextRender, contentChildren, DestroyRef, RendererFactory2, numberAttribute, Pipe, Input, HostBinding, ViewChildren, model, PLATFORM_ID, Inject, ContentChildren, forwardRef, ContentChild, contentChild, EventEmitter, Output, HostListener, ViewChild, viewChild, ChangeDetectionStrategy,
|
|
2
|
+
import { inject, ElementRef, Directive, input, Renderer2, effect, TemplateRef, booleanAttribute, untracked, NgModule, computed, Injectable, Component, linkedSignal, output, signal, afterNextRender, contentChildren, DestroyRef, RendererFactory2, numberAttribute, Pipe, Input, HostBinding, ViewChildren, model, PLATFORM_ID, Inject, ContentChildren, forwardRef, ContentChild, contentChild, EventEmitter, Output, HostListener, ViewChild, ChangeDetectorRef, viewChild, ChangeDetectionStrategy, NgZone, afterRender, ViewContainerRef, viewChildren, Injector, runInInjectionContext } from '@angular/core';
|
|
3
3
|
import { NgTemplateOutlet, DOCUMENT, NgClass, AsyncPipe, NgStyle, isPlatformServer, isPlatformBrowser, formatDate, I18nPluralPipe } from '@angular/common';
|
|
4
4
|
import { animation, animate, style, AnimationBuilder, useAnimation, trigger, state, transition, group, query, animateChild } from '@angular/animations';
|
|
5
5
|
import { takeUntilDestroyed, toObservable, toSignal } from '@angular/core/rxjs-interop';
|
|
6
6
|
import { fromEvent, Subject, BehaviorSubject, Observable, skip, merge, takeWhile, distinctUntilChanged as distinctUntilChanged$1, map as map$1, debounceTime as debounceTime$1 } from 'rxjs';
|
|
7
7
|
import * as i1 from '@angular/router';
|
|
8
8
|
import { RouterModule, Router, ActivatedRoute, NavigationEnd, RouterLink } from '@angular/router';
|
|
9
|
-
import { filter, tap, distinctUntilChanged, take, finalize, zipWith, withLatestFrom,
|
|
9
|
+
import { filter, tap, distinctUntilChanged, take, debounceTime, finalize, zipWith, withLatestFrom, map, delay, combineLatestWith } from 'rxjs/operators';
|
|
10
10
|
import * as i1$1 from '@angular/cdk/a11y';
|
|
11
11
|
import { FocusMonitor, A11yModule, FocusKeyManager } from '@angular/cdk/a11y';
|
|
12
12
|
import * as i1$2 from '@angular/forms';
|
|
@@ -3106,10 +3106,12 @@ class CalendarComponent {
|
|
|
3106
3106
|
const date = this.endDateModel() ?? null;
|
|
3107
3107
|
return !!date && this.range() ? convertToDateObject(date, this.selectionType(), 'endDate') : null;
|
|
3108
3108
|
}, { equal: equalDates });
|
|
3109
|
-
this
|
|
3110
|
-
|
|
3111
|
-
this.
|
|
3112
|
-
this.
|
|
3109
|
+
this.#datesEffect = effect(() => {
|
|
3110
|
+
const startDate = this.startDate();
|
|
3111
|
+
const endDate = this.endDate();
|
|
3112
|
+
this.#calendarService.update({ startDate: startDate, endDate: endDate });
|
|
3113
|
+
this.startDateChange.emit(startDate);
|
|
3114
|
+
this.endDateChange.emit(endDate);
|
|
3113
3115
|
});
|
|
3114
3116
|
/**
|
|
3115
3117
|
* Sets the day of start week.
|
|
@@ -3273,6 +3275,7 @@ class CalendarComponent {
|
|
|
3273
3275
|
}
|
|
3274
3276
|
#destroyRef;
|
|
3275
3277
|
#calendarService;
|
|
3278
|
+
#datesEffect;
|
|
3276
3279
|
// @ViewChildren(CalendarMonthComponent) calendarMonths!: QueryList<CalendarMonthComponent>;
|
|
3277
3280
|
ngOnInit() {
|
|
3278
3281
|
this.#calendarService.update({
|
|
@@ -3285,9 +3288,9 @@ class CalendarComponent {
|
|
|
3285
3288
|
});
|
|
3286
3289
|
}
|
|
3287
3290
|
ngAfterViewInit() {
|
|
3288
|
-
setTimeout(() => {
|
|
3289
|
-
|
|
3290
|
-
});
|
|
3291
|
+
// setTimeout(() => {
|
|
3292
|
+
this.calendarStateSubscribe();
|
|
3293
|
+
// });
|
|
3291
3294
|
}
|
|
3292
3295
|
calendarStateSubscribe() {
|
|
3293
3296
|
const inputs = [
|
|
@@ -3308,7 +3311,9 @@ class CalendarComponent {
|
|
|
3308
3311
|
'weekNumbersLabel'
|
|
3309
3312
|
];
|
|
3310
3313
|
// const models = ['startDate', 'endDate', 'calendarDate'];
|
|
3311
|
-
this.#calendarService
|
|
3314
|
+
this.#calendarService?.calendarState$
|
|
3315
|
+
.pipe(debounceTime(1), takeUntilDestroyed(this.#destroyRef))
|
|
3316
|
+
.subscribe((state) => {
|
|
3312
3317
|
const keys = Object.keys(state);
|
|
3313
3318
|
for (const key of keys) {
|
|
3314
3319
|
if (key in this) {
|
|
@@ -7173,7 +7178,7 @@ class TimePickerComponent {
|
|
|
7173
7178
|
useExisting: forwardRef(() => TimePickerComponent),
|
|
7174
7179
|
multi: true
|
|
7175
7180
|
}
|
|
7176
|
-
], queries: [{ propertyName: "contentTemplates", predicate: TemplateIdDirective, descendants: true }], viewQueries: [{ propertyName: "dropdownRef", first: true, predicate: DropdownComponent, descendants: true, read: ElementRef }], exportAs: ["cTimePicker"], usesOnChanges: true, ngImport: i0, template: "@if (variant === 'select') {\n <div class=\"date-picker-timepickers\">\n <div class=\"picker time-picker\">\n <div [formGroup]=\"selectTime\" [ngClass]=\"timePickerClasses\" class=\"time-picker-body\">\n <span class=\"time-picker-inline-icon\"></span>\n <select (blur)=\"onBlur()\" [attr.disabled]=\"disabled || null\" [sizing]=\"size ?? ''\"\n cSelect class=\"time-picker-inline-select ms-0\" formControlName=\"selectHours\">\n @for (hour of listOfHours12; track hour; let i = $index) {\n <option [attr.disabled]=\"hour.disabled || null\" [ngValue]=\"hour.value\">\n {{ hour.label }}\n </option>\n }\n </select>\n {{ ' :' }}<select (blur)=\"onBlur()\" [attr.disabled]=\"disabled || null\" [sizing]=\"size ?? ''\"\n cSelect class=\"time-picker-inline-select ms-0\" formControlName=\"selectMinutes\">\n @for (minute of listOfMinutes; track minute; let i = $index) {\n <option [attr.disabled]=\"minute.disabled || null\" [ngValue]=\"minute.value\">\n {{ minute.label }}\n </option>\n }\n </select>\n @if (seconds) {\n {{ ' :' }}<select (blur)=\"onBlur()\" [attr.disabled]=\"disabled || null\" [sizing]=\"size ?? ''\"\n cSelect class=\"time-picker-inline-select ms-0\" formControlName=\"selectSeconds\">\n @for (second of listOfSeconds; track second; let i = $index) {\n <option [attr.disabled]=\"second.disabled || null\" [ngValue]=\"second.value\">\n {{ second.label }}\n </option>\n }\n </select>\n }\n @if (hour12) {\n <select (blur)=\"onBlur()\" [attr.disabled]=\"disabled || null\" [sizing]=\"size ?? ''\"\n cSelect class=\"time-picker-inline-select ms-0\" formControlName=\"selectDayPeriod\">\n @for (dayPeriod of dayPeriods; track dayPeriod) {\n <option [ngValue]=\"dayPeriod.value\" class=\"time-picker-roll-cell\">\n {{ dayPeriod.label }}\n </option>\n }\n </select>\n }\n </div>\n </div>\n </div>\n}\n@if (variant === 'roll') {\n <c-dropdown #dropdown=\"cDropdown\" [autoClose]=\"'outside'\" [ngClass]=\"timePickerClasses\" [visible]=\"visible\">\n <div [caret]=\"false\" cDropdownToggle class=\"time-picker-input-group\">\n <input (blur)=\"handleBlur($event);\"\n (change)=\"handleTimeInputChange($event)\"\n (focus)=\"handleFocus($event)\"\n [attr.disabled]=\"disabled ?? dropdown.visible() ? '' : null\"\n [attr.pattern]=\"hour12 ? '(((0[1-9])|(1[0-2])):([0-5])([0-9])\\\\s(A|P)M)' : '([01]?[0-9]|2[0-3]):[0-5][0-9]'\"\n [attr.tabindex]=\"disabled ? -1 : 0\"\n [formControl]=\"timeInput\"\n [placeholder]=\"placeholder\"\n [readonly]=\"inputReadOnly ?? null\"\n class=\"time-picker-input\"\n >\n @if (indicator) {\n <div class=\"time-picker-indicator\"></div>\n }\n @if (cleaner && time && !disabled) {\n <div (click)=\"!disabled && handleClear($event)\" class=\"time-picker-cleaner\" role=\"button\"></div>\n }\n </div>\n <div #dropdownMenu=\"cDropdownMenu\" cDropdownMenu class=\"time-picker-dropdown py-0\">\n <div class=\"time-picker-body time-picker-roll\" style=\"position: relative;\">\n <c-time-picker-roll-col\n (selectedChange)=\"handleSelectTimeChange($event, 'hour')\"\n [disabled]=\"disabled\"\n [elements]=\"listOfHours12\"\n [refresh]=\"dropdownMenu.visible\"\n [selected]=\"hour\"\n role=\"listbox\"\n />\n <c-time-picker-roll-col\n (selectedChange)=\"handleSelectTimeChange($event, 'minute')\"\n [disabled]=\"disabled\"\n [elements]=\"listOfMinutes\"\n [refresh]=\"dropdownMenu.visible\"\n [selected]=\"minute\"\n role=\"listbox\"\n />\n @if (seconds) {\n <c-time-picker-roll-col\n (selectedChange)=\"handleSelectTimeChange($event, 'second')\"\n [disabled]=\"disabled\"\n [elements]=\"listOfSeconds\"\n [refresh]=\"dropdownMenu.visible\"\n [selected]=\"second\"\n role=\"listbox\"\n />\n }\n @if (hour12) {\n <c-time-picker-roll-am-pm\n (selectedChange)=\"handleSelectDayPeriodChange($event)\"\n [disabled]=\"disabled\"\n [elements]=\"dayPeriods\"\n [refresh]=\"dropdownMenu.visible\"\n [selected]=\"dayPeriod\"\n role=\"listbox\"\n />\n }\n </div>\n @if (templates?.timePickerFooter) {\n <div class=\"time-picker-footer\">\n <ng-container *ngTemplateOutlet=\"templates?.timePickerFooter; context: {$implicit: dropdown}\" />\n </div>\n }\n </div>\n </c-dropdown>\n}\n", styles: [".disabled{pointer-events:none}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$2.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$2.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: DropdownComponent, selector: "c-dropdown", inputs: ["alignment", "autoClose", "direction", "placement", "popper", "popperOptions", "variant", "visible"], outputs: ["visibleChange"], exportAs: ["cDropdown"] }, { kind: "directive", type: DropdownToggleDirective, selector: "[cDropdownToggle]", inputs: ["dropdownComponent", "disabled", "caret", "split"], exportAs: ["cDropdownToggle"] }, { kind: "directive", type: DropdownMenuDirective, selector: "[cDropdownMenu]", inputs: ["alignment", "visible"], exportAs: ["cDropdownMenu"] }, { kind: "directive", type: FormSelectDirective, selector: "select[cSelect]", inputs: ["sizing", "valid"] }, { kind: "component", type: TimePickerRollColComponent, selector: "c-time-picker-roll-col", inputs: ["disabled", "elements", "onClick", "selected", "refresh"], outputs: ["selectedChange"], exportAs: ["cTimePickerRollCol"] }, { kind: "component", type: TimePickerRollAmPmComponent, selector: "c-time-picker-roll-am-pm", inputs: ["disabled", "elements", "onClick", "selected", "refresh"], outputs: ["selectedChange"] }] }); }
|
|
7181
|
+
], queries: [{ propertyName: "contentTemplates", predicate: TemplateIdDirective, descendants: true }], viewQueries: [{ propertyName: "dropdownRef", first: true, predicate: DropdownComponent, descendants: true, read: ElementRef }], exportAs: ["cTimePicker"], usesOnChanges: true, ngImport: i0, template: "@if (variant === 'select') {\n <div class=\"date-picker-timepickers\">\n <div class=\"picker time-picker\">\n <div [formGroup]=\"selectTime\" [ngClass]=\"timePickerClasses\" class=\"time-picker-body\">\n <span class=\"time-picker-inline-icon\"></span>\n <select (blur)=\"onBlur()\" [attr.disabled]=\"disabled || null\" [sizing]=\"size ?? ''\"\n cSelect class=\"time-picker-inline-select ms-0\" formControlName=\"selectHours\">\n @for (hour of listOfHours12; track hour; let i = $index) {\n <option [attr.disabled]=\"hour.disabled || null\" [ngValue]=\"hour.value\">\n {{ hour.label }}\n </option>\n }\n </select>\n {{ ' :' }}<select (blur)=\"onBlur()\" [attr.disabled]=\"disabled || null\" [sizing]=\"size ?? ''\"\n cSelect class=\"time-picker-inline-select ms-0\" formControlName=\"selectMinutes\">\n @for (minute of listOfMinutes; track minute; let i = $index) {\n <option [attr.disabled]=\"minute.disabled || null\" [ngValue]=\"minute.value\">\n {{ minute.label }}\n </option>\n }\n </select>\n @if (seconds) {\n {{ ' :' }}<select (blur)=\"onBlur()\" [attr.disabled]=\"disabled || null\" [sizing]=\"size ?? ''\"\n cSelect class=\"time-picker-inline-select ms-0\" formControlName=\"selectSeconds\">\n @for (second of listOfSeconds; track second; let i = $index) {\n <option [attr.disabled]=\"second.disabled || null\" [ngValue]=\"second.value\">\n {{ second.label }}\n </option>\n }\n </select>\n }\n @if (hour12) {\n <select (blur)=\"onBlur()\" [attr.disabled]=\"disabled || null\" [sizing]=\"size ?? ''\"\n cSelect class=\"time-picker-inline-select ms-0\" formControlName=\"selectDayPeriod\">\n @for (dayPeriod of dayPeriods; track dayPeriod) {\n <option [ngValue]=\"dayPeriod.value\" class=\"time-picker-roll-cell\">\n {{ dayPeriod.label }}\n </option>\n }\n </select>\n }\n </div>\n </div>\n </div>\n}\n@if (variant === 'roll') {\n <c-dropdown #dropdown=\"cDropdown\" [autoClose]=\"'outside'\" [ngClass]=\"timePickerClasses\" [visible]=\"visible\">\n <div [caret]=\"false\" cDropdownToggle class=\"time-picker-input-group\">\n <input (blur)=\"handleBlur($event);\"\n (change)=\"handleTimeInputChange($event)\"\n (focus)=\"handleFocus($event)\"\n [attr.disabled]=\"disabled ?? dropdown.visible() ? '' : null\"\n [attr.pattern]=\"hour12 ? '(((0[1-9])|(1[0-2])):([0-5])([0-9])\\\\s(A|P)M)' : '([01]?[0-9]|2[0-3]):[0-5][0-9]'\"\n [attr.tabindex]=\"disabled ? -1 : 0\"\n [formControl]=\"timeInput\"\n [placeholder]=\"placeholder\"\n [readonly]=\"inputReadOnly ?? null\"\n class=\"time-picker-input\"\n >\n @if (indicator) {\n <div class=\"time-picker-indicator\"></div>\n }\n @if (cleaner && time && !disabled) {\n <div (click)=\"!disabled && handleClear($event)\" class=\"time-picker-cleaner\" role=\"button\"></div>\n }\n </div>\n <div #dropdownMenu=\"cDropdownMenu\" cDropdownMenu class=\"time-picker-dropdown py-0\">\n <div class=\"time-picker-body time-picker-roll\" style=\"position: relative;\">\n <c-time-picker-roll-col\n (selectedChange)=\"handleSelectTimeChange($event, 'hour')\"\n [disabled]=\"disabled\"\n [elements]=\"listOfHours12\"\n [refresh]=\"dropdownMenu.visible()\"\n [selected]=\"hour\"\n role=\"listbox\"\n />\n <c-time-picker-roll-col\n (selectedChange)=\"handleSelectTimeChange($event, 'minute')\"\n [disabled]=\"disabled\"\n [elements]=\"listOfMinutes\"\n [refresh]=\"dropdownMenu.visible()\"\n [selected]=\"minute\"\n role=\"listbox\"\n />\n @if (seconds) {\n <c-time-picker-roll-col\n (selectedChange)=\"handleSelectTimeChange($event, 'second')\"\n [disabled]=\"disabled\"\n [elements]=\"listOfSeconds\"\n [refresh]=\"dropdownMenu.visible()\"\n [selected]=\"second\"\n role=\"listbox\"\n />\n }\n @if (hour12) {\n <c-time-picker-roll-am-pm\n (selectedChange)=\"handleSelectDayPeriodChange($event)\"\n [disabled]=\"disabled\"\n [elements]=\"dayPeriods\"\n [refresh]=\"dropdownMenu.visible()\"\n [selected]=\"dayPeriod\"\n role=\"listbox\"\n />\n }\n </div>\n @if (templates?.timePickerFooter) {\n <div class=\"time-picker-footer\">\n <ng-container *ngTemplateOutlet=\"templates?.timePickerFooter; context: {$implicit: dropdown}\" />\n </div>\n }\n </div>\n </c-dropdown>\n}\n", styles: [".disabled{pointer-events:none}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$2.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$2.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: DropdownComponent, selector: "c-dropdown", inputs: ["alignment", "autoClose", "direction", "placement", "popper", "popperOptions", "variant", "visible"], outputs: ["visibleChange"], exportAs: ["cDropdown"] }, { kind: "directive", type: DropdownToggleDirective, selector: "[cDropdownToggle]", inputs: ["dropdownComponent", "disabled", "caret", "split"], exportAs: ["cDropdownToggle"] }, { kind: "directive", type: DropdownMenuDirective, selector: "[cDropdownMenu]", inputs: ["alignment", "visible"], exportAs: ["cDropdownMenu"] }, { kind: "directive", type: FormSelectDirective, selector: "select[cSelect]", inputs: ["sizing", "valid"] }, { kind: "component", type: TimePickerRollColComponent, selector: "c-time-picker-roll-col", inputs: ["disabled", "elements", "onClick", "selected", "refresh"], outputs: ["selectedChange"], exportAs: ["cTimePickerRollCol"] }, { kind: "component", type: TimePickerRollAmPmComponent, selector: "c-time-picker-roll-am-pm", inputs: ["disabled", "elements", "onClick", "selected", "refresh"], outputs: ["selectedChange"] }] }); }
|
|
7177
7182
|
}
|
|
7178
7183
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: TimePickerComponent, decorators: [{
|
|
7179
7184
|
type: Component,
|
|
@@ -7193,7 +7198,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImpor
|
|
|
7193
7198
|
useExisting: forwardRef(() => TimePickerComponent),
|
|
7194
7199
|
multi: true
|
|
7195
7200
|
}
|
|
7196
|
-
], template: "@if (variant === 'select') {\n <div class=\"date-picker-timepickers\">\n <div class=\"picker time-picker\">\n <div [formGroup]=\"selectTime\" [ngClass]=\"timePickerClasses\" class=\"time-picker-body\">\n <span class=\"time-picker-inline-icon\"></span>\n <select (blur)=\"onBlur()\" [attr.disabled]=\"disabled || null\" [sizing]=\"size ?? ''\"\n cSelect class=\"time-picker-inline-select ms-0\" formControlName=\"selectHours\">\n @for (hour of listOfHours12; track hour; let i = $index) {\n <option [attr.disabled]=\"hour.disabled || null\" [ngValue]=\"hour.value\">\n {{ hour.label }}\n </option>\n }\n </select>\n {{ ' :' }}<select (blur)=\"onBlur()\" [attr.disabled]=\"disabled || null\" [sizing]=\"size ?? ''\"\n cSelect class=\"time-picker-inline-select ms-0\" formControlName=\"selectMinutes\">\n @for (minute of listOfMinutes; track minute; let i = $index) {\n <option [attr.disabled]=\"minute.disabled || null\" [ngValue]=\"minute.value\">\n {{ minute.label }}\n </option>\n }\n </select>\n @if (seconds) {\n {{ ' :' }}<select (blur)=\"onBlur()\" [attr.disabled]=\"disabled || null\" [sizing]=\"size ?? ''\"\n cSelect class=\"time-picker-inline-select ms-0\" formControlName=\"selectSeconds\">\n @for (second of listOfSeconds; track second; let i = $index) {\n <option [attr.disabled]=\"second.disabled || null\" [ngValue]=\"second.value\">\n {{ second.label }}\n </option>\n }\n </select>\n }\n @if (hour12) {\n <select (blur)=\"onBlur()\" [attr.disabled]=\"disabled || null\" [sizing]=\"size ?? ''\"\n cSelect class=\"time-picker-inline-select ms-0\" formControlName=\"selectDayPeriod\">\n @for (dayPeriod of dayPeriods; track dayPeriod) {\n <option [ngValue]=\"dayPeriod.value\" class=\"time-picker-roll-cell\">\n {{ dayPeriod.label }}\n </option>\n }\n </select>\n }\n </div>\n </div>\n </div>\n}\n@if (variant === 'roll') {\n <c-dropdown #dropdown=\"cDropdown\" [autoClose]=\"'outside'\" [ngClass]=\"timePickerClasses\" [visible]=\"visible\">\n <div [caret]=\"false\" cDropdownToggle class=\"time-picker-input-group\">\n <input (blur)=\"handleBlur($event);\"\n (change)=\"handleTimeInputChange($event)\"\n (focus)=\"handleFocus($event)\"\n [attr.disabled]=\"disabled ?? dropdown.visible() ? '' : null\"\n [attr.pattern]=\"hour12 ? '(((0[1-9])|(1[0-2])):([0-5])([0-9])\\\\s(A|P)M)' : '([01]?[0-9]|2[0-3]):[0-5][0-9]'\"\n [attr.tabindex]=\"disabled ? -1 : 0\"\n [formControl]=\"timeInput\"\n [placeholder]=\"placeholder\"\n [readonly]=\"inputReadOnly ?? null\"\n class=\"time-picker-input\"\n >\n @if (indicator) {\n <div class=\"time-picker-indicator\"></div>\n }\n @if (cleaner && time && !disabled) {\n <div (click)=\"!disabled && handleClear($event)\" class=\"time-picker-cleaner\" role=\"button\"></div>\n }\n </div>\n <div #dropdownMenu=\"cDropdownMenu\" cDropdownMenu class=\"time-picker-dropdown py-0\">\n <div class=\"time-picker-body time-picker-roll\" style=\"position: relative;\">\n <c-time-picker-roll-col\n (selectedChange)=\"handleSelectTimeChange($event, 'hour')\"\n [disabled]=\"disabled\"\n [elements]=\"listOfHours12\"\n [refresh]=\"dropdownMenu.visible\"\n [selected]=\"hour\"\n role=\"listbox\"\n />\n <c-time-picker-roll-col\n (selectedChange)=\"handleSelectTimeChange($event, 'minute')\"\n [disabled]=\"disabled\"\n [elements]=\"listOfMinutes\"\n [refresh]=\"dropdownMenu.visible\"\n [selected]=\"minute\"\n role=\"listbox\"\n />\n @if (seconds) {\n <c-time-picker-roll-col\n (selectedChange)=\"handleSelectTimeChange($event, 'second')\"\n [disabled]=\"disabled\"\n [elements]=\"listOfSeconds\"\n [refresh]=\"dropdownMenu.visible\"\n [selected]=\"second\"\n role=\"listbox\"\n />\n }\n @if (hour12) {\n <c-time-picker-roll-am-pm\n (selectedChange)=\"handleSelectDayPeriodChange($event)\"\n [disabled]=\"disabled\"\n [elements]=\"dayPeriods\"\n [refresh]=\"dropdownMenu.visible\"\n [selected]=\"dayPeriod\"\n role=\"listbox\"\n />\n }\n </div>\n @if (templates?.timePickerFooter) {\n <div class=\"time-picker-footer\">\n <ng-container *ngTemplateOutlet=\"templates?.timePickerFooter; context: {$implicit: dropdown}\" />\n </div>\n }\n </div>\n </c-dropdown>\n}\n", styles: [".disabled{pointer-events:none}\n"] }]
|
|
7201
|
+
], template: "@if (variant === 'select') {\n <div class=\"date-picker-timepickers\">\n <div class=\"picker time-picker\">\n <div [formGroup]=\"selectTime\" [ngClass]=\"timePickerClasses\" class=\"time-picker-body\">\n <span class=\"time-picker-inline-icon\"></span>\n <select (blur)=\"onBlur()\" [attr.disabled]=\"disabled || null\" [sizing]=\"size ?? ''\"\n cSelect class=\"time-picker-inline-select ms-0\" formControlName=\"selectHours\">\n @for (hour of listOfHours12; track hour; let i = $index) {\n <option [attr.disabled]=\"hour.disabled || null\" [ngValue]=\"hour.value\">\n {{ hour.label }}\n </option>\n }\n </select>\n {{ ' :' }}<select (blur)=\"onBlur()\" [attr.disabled]=\"disabled || null\" [sizing]=\"size ?? ''\"\n cSelect class=\"time-picker-inline-select ms-0\" formControlName=\"selectMinutes\">\n @for (minute of listOfMinutes; track minute; let i = $index) {\n <option [attr.disabled]=\"minute.disabled || null\" [ngValue]=\"minute.value\">\n {{ minute.label }}\n </option>\n }\n </select>\n @if (seconds) {\n {{ ' :' }}<select (blur)=\"onBlur()\" [attr.disabled]=\"disabled || null\" [sizing]=\"size ?? ''\"\n cSelect class=\"time-picker-inline-select ms-0\" formControlName=\"selectSeconds\">\n @for (second of listOfSeconds; track second; let i = $index) {\n <option [attr.disabled]=\"second.disabled || null\" [ngValue]=\"second.value\">\n {{ second.label }}\n </option>\n }\n </select>\n }\n @if (hour12) {\n <select (blur)=\"onBlur()\" [attr.disabled]=\"disabled || null\" [sizing]=\"size ?? ''\"\n cSelect class=\"time-picker-inline-select ms-0\" formControlName=\"selectDayPeriod\">\n @for (dayPeriod of dayPeriods; track dayPeriod) {\n <option [ngValue]=\"dayPeriod.value\" class=\"time-picker-roll-cell\">\n {{ dayPeriod.label }}\n </option>\n }\n </select>\n }\n </div>\n </div>\n </div>\n}\n@if (variant === 'roll') {\n <c-dropdown #dropdown=\"cDropdown\" [autoClose]=\"'outside'\" [ngClass]=\"timePickerClasses\" [visible]=\"visible\">\n <div [caret]=\"false\" cDropdownToggle class=\"time-picker-input-group\">\n <input (blur)=\"handleBlur($event);\"\n (change)=\"handleTimeInputChange($event)\"\n (focus)=\"handleFocus($event)\"\n [attr.disabled]=\"disabled ?? dropdown.visible() ? '' : null\"\n [attr.pattern]=\"hour12 ? '(((0[1-9])|(1[0-2])):([0-5])([0-9])\\\\s(A|P)M)' : '([01]?[0-9]|2[0-3]):[0-5][0-9]'\"\n [attr.tabindex]=\"disabled ? -1 : 0\"\n [formControl]=\"timeInput\"\n [placeholder]=\"placeholder\"\n [readonly]=\"inputReadOnly ?? null\"\n class=\"time-picker-input\"\n >\n @if (indicator) {\n <div class=\"time-picker-indicator\"></div>\n }\n @if (cleaner && time && !disabled) {\n <div (click)=\"!disabled && handleClear($event)\" class=\"time-picker-cleaner\" role=\"button\"></div>\n }\n </div>\n <div #dropdownMenu=\"cDropdownMenu\" cDropdownMenu class=\"time-picker-dropdown py-0\">\n <div class=\"time-picker-body time-picker-roll\" style=\"position: relative;\">\n <c-time-picker-roll-col\n (selectedChange)=\"handleSelectTimeChange($event, 'hour')\"\n [disabled]=\"disabled\"\n [elements]=\"listOfHours12\"\n [refresh]=\"dropdownMenu.visible()\"\n [selected]=\"hour\"\n role=\"listbox\"\n />\n <c-time-picker-roll-col\n (selectedChange)=\"handleSelectTimeChange($event, 'minute')\"\n [disabled]=\"disabled\"\n [elements]=\"listOfMinutes\"\n [refresh]=\"dropdownMenu.visible()\"\n [selected]=\"minute\"\n role=\"listbox\"\n />\n @if (seconds) {\n <c-time-picker-roll-col\n (selectedChange)=\"handleSelectTimeChange($event, 'second')\"\n [disabled]=\"disabled\"\n [elements]=\"listOfSeconds\"\n [refresh]=\"dropdownMenu.visible()\"\n [selected]=\"second\"\n role=\"listbox\"\n />\n }\n @if (hour12) {\n <c-time-picker-roll-am-pm\n (selectedChange)=\"handleSelectDayPeriodChange($event)\"\n [disabled]=\"disabled\"\n [elements]=\"dayPeriods\"\n [refresh]=\"dropdownMenu.visible()\"\n [selected]=\"dayPeriod\"\n role=\"listbox\"\n />\n }\n </div>\n @if (templates?.timePickerFooter) {\n <div class=\"time-picker-footer\">\n <ng-container *ngTemplateOutlet=\"templates?.timePickerFooter; context: {$implicit: dropdown}\" />\n </div>\n }\n </div>\n </c-dropdown>\n}\n", styles: [".disabled{pointer-events:none}\n"] }]
|
|
7197
7202
|
}], propDecorators: { cleaner: [{
|
|
7198
7203
|
type: Input,
|
|
7199
7204
|
args: [{ transform: booleanAttribute }]
|
|
@@ -7290,29 +7295,30 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImpor
|
|
|
7290
7295
|
// }
|
|
7291
7296
|
class DateRangePickerComponent {
|
|
7292
7297
|
constructor() {
|
|
7298
|
+
this.#cdr = inject(ChangeDetectorRef);
|
|
7293
7299
|
this.#breakpointObserver = inject(BreakpointObserver);
|
|
7294
7300
|
this.#destroyRef = inject(DestroyRef);
|
|
7295
7301
|
/**
|
|
7296
7302
|
* Set the format of day name.
|
|
7297
7303
|
* @default 'numeric'
|
|
7298
|
-
* @
|
|
7304
|
+
* @return DayFormatType
|
|
7299
7305
|
*/
|
|
7300
7306
|
this.dayFormat = input('numeric');
|
|
7301
7307
|
/**
|
|
7302
7308
|
* The number of calendars that render on desktop devices.
|
|
7303
|
-
* @
|
|
7309
|
+
* @return number
|
|
7304
7310
|
* @default 2
|
|
7305
7311
|
*/
|
|
7306
7312
|
this.calendars = input(2, { transform: numberAttribute });
|
|
7307
7313
|
/**
|
|
7308
7314
|
* Toggle visibility or set the content of the cleaner button.
|
|
7309
|
-
* @
|
|
7315
|
+
* @return boolean
|
|
7310
7316
|
* @default true
|
|
7311
7317
|
*/
|
|
7312
7318
|
this.cleaner = input(true, { transform: booleanAttribute });
|
|
7313
7319
|
/**
|
|
7314
7320
|
* Determine if the dropdown should be closed after value setting.
|
|
7315
|
-
* @
|
|
7321
|
+
* @return boolean
|
|
7316
7322
|
* @default false
|
|
7317
7323
|
*/
|
|
7318
7324
|
this.closeOnSelect = input(false, { transform: booleanAttribute });
|
|
@@ -7325,7 +7331,7 @@ class DateRangePickerComponent {
|
|
|
7325
7331
|
this.format = input();
|
|
7326
7332
|
/**
|
|
7327
7333
|
* Toggle visibility or set the content of the input indicator.
|
|
7328
|
-
* @
|
|
7334
|
+
* @return boolean
|
|
7329
7335
|
* @default true
|
|
7330
7336
|
*/
|
|
7331
7337
|
this.indicator = input(true);
|
|
@@ -7341,7 +7347,7 @@ class DateRangePickerComponent {
|
|
|
7341
7347
|
this.inputDateParse = input();
|
|
7342
7348
|
/**
|
|
7343
7349
|
* Toggle the readonly state for the component.
|
|
7344
|
-
* @
|
|
7350
|
+
* @return boolean
|
|
7345
7351
|
* @default false
|
|
7346
7352
|
*/
|
|
7347
7353
|
this.inputReadOnlyInput = input(false, { transform: booleanAttribute, alias: 'inputReadOnly' });
|
|
@@ -7350,7 +7356,7 @@ class DateRangePickerComponent {
|
|
|
7350
7356
|
});
|
|
7351
7357
|
/**
|
|
7352
7358
|
* Reorder year-month navigation, and render year first.
|
|
7353
|
-
* @
|
|
7359
|
+
* @return boolean
|
|
7354
7360
|
* @default false
|
|
7355
7361
|
*/
|
|
7356
7362
|
this.navYearFirst = input(false, { transform: booleanAttribute });
|
|
@@ -7361,67 +7367,67 @@ class DateRangePickerComponent {
|
|
|
7361
7367
|
this.placeholder = input(['Start date', 'End date']);
|
|
7362
7368
|
/**
|
|
7363
7369
|
* Predefined date ranges the user can select from.
|
|
7364
|
-
* @
|
|
7370
|
+
* @return ICalendarRanges
|
|
7365
7371
|
*/
|
|
7366
7372
|
this.ranges = input();
|
|
7367
7373
|
/**
|
|
7368
7374
|
* Sets the color context of the cancel button to one of CoreUI’s themed colors.
|
|
7369
|
-
* @
|
|
7375
|
+
* @return 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info' | 'dark' | 'light' | string
|
|
7370
7376
|
* @default 'secondary'
|
|
7371
7377
|
*/
|
|
7372
7378
|
this.rangesButtonsColor = input('secondary');
|
|
7373
7379
|
/**
|
|
7374
7380
|
* Size the ranges button small or large.
|
|
7375
|
-
* @
|
|
7381
|
+
* @return 'sm' | 'lg' | ''
|
|
7376
7382
|
*/
|
|
7377
7383
|
this.rangesButtonsSize = input('');
|
|
7378
7384
|
/**
|
|
7379
7385
|
* Set the ranges button variant to an outlined button or a ghost button.
|
|
7380
|
-
* @
|
|
7386
|
+
* @return 'outline' | 'ghost' | undefined
|
|
7381
7387
|
*/
|
|
7382
7388
|
this.rangesButtonsVariant = input('ghost');
|
|
7383
7389
|
/**
|
|
7384
7390
|
* Default icon or character that separates two dates.
|
|
7385
|
-
* @
|
|
7391
|
+
* @return boolean
|
|
7386
7392
|
* @default true
|
|
7387
7393
|
*/
|
|
7388
7394
|
this.separator = input(true, { transform: booleanAttribute });
|
|
7389
7395
|
/**
|
|
7390
7396
|
* Size the component small or large.
|
|
7391
|
-
* @
|
|
7397
|
+
* @return 'sm' | 'lg' | undefined
|
|
7392
7398
|
* @default undefined
|
|
7393
7399
|
*/
|
|
7394
7400
|
this.size = input();
|
|
7395
7401
|
/**
|
|
7396
7402
|
* Provide an additional time selection by adding select boxes to choose time.
|
|
7397
|
-
* @
|
|
7403
|
+
* @return boolean
|
|
7398
7404
|
* @default false
|
|
7399
7405
|
*/
|
|
7400
7406
|
this.timepickerInput = input(false, { transform: booleanAttribute, alias: 'timepicker' });
|
|
7401
7407
|
/**
|
|
7402
7408
|
* Toggle visual validation feedback.
|
|
7403
|
-
* @
|
|
7409
|
+
* @return boolean | undefined
|
|
7404
7410
|
* @default undefined
|
|
7405
7411
|
*/
|
|
7406
7412
|
this.valid = input();
|
|
7407
7413
|
/**
|
|
7408
7414
|
* Toggle the visibility of the dropdown date-picker component.
|
|
7409
|
-
* @
|
|
7415
|
+
* @return boolean
|
|
7410
7416
|
* @default false
|
|
7411
7417
|
*/
|
|
7412
7418
|
this.visibleInput = input(false, { transform: booleanAttribute });
|
|
7413
|
-
this
|
|
7419
|
+
this.#visibleInputEffect = effect(() => {
|
|
7414
7420
|
this.visible.set(this.visibleInput());
|
|
7415
7421
|
});
|
|
7416
7422
|
this.visible = signal(false);
|
|
7417
7423
|
this.startDateModel = model(null, {
|
|
7418
7424
|
alias: 'startDate'
|
|
7419
7425
|
});
|
|
7420
|
-
this
|
|
7426
|
+
this.#dateModelEffect = effect(() => {
|
|
7421
7427
|
this.dateRangeGroup.patchValue({ startDateInput: this.startDateValue(), endDateInput: this.endDateValue() });
|
|
7422
7428
|
const startDate = this.startDate();
|
|
7423
7429
|
const endDate = this.endDate();
|
|
7424
|
-
this.
|
|
7430
|
+
this.valueModel.set({ startDate: startDate, endDate: endDate });
|
|
7425
7431
|
this.startDateModel.set(startDate);
|
|
7426
7432
|
this.endDateModel.set(endDate);
|
|
7427
7433
|
});
|
|
@@ -7438,11 +7444,12 @@ class DateRangePickerComponent {
|
|
|
7438
7444
|
return endDate ? new Date(endDate) : null;
|
|
7439
7445
|
}, { equal: equalDates });
|
|
7440
7446
|
this.endDateChange = toObservable(this.endDate);
|
|
7441
|
-
this.
|
|
7447
|
+
this.calendarDateInput = input(new Date(), { transform: dateTransform, alias: 'calendarDate' });
|
|
7448
|
+
this.calendarDate = linkedSignal(this.calendarDateInput);
|
|
7442
7449
|
this.disabledDates = input([]);
|
|
7443
7450
|
/**
|
|
7444
7451
|
* Set first day of week.
|
|
7445
|
-
* @
|
|
7452
|
+
* @return DaysOfWeek
|
|
7446
7453
|
* @default 1 (Monday)
|
|
7447
7454
|
*/
|
|
7448
7455
|
this.firstDayOfWeek = input(1);
|
|
@@ -7451,13 +7458,13 @@ class DateRangePickerComponent {
|
|
|
7451
7458
|
this.minDate = input(null);
|
|
7452
7459
|
/**
|
|
7453
7460
|
* Show calendar navigation.
|
|
7454
|
-
* @
|
|
7461
|
+
* @return boolean
|
|
7455
7462
|
* @default true
|
|
7456
7463
|
*/
|
|
7457
7464
|
this.navigation = input(true, { transform: booleanAttribute });
|
|
7458
7465
|
/**
|
|
7459
7466
|
* Allow range selection.
|
|
7460
|
-
* @
|
|
7467
|
+
* @return boolean
|
|
7461
7468
|
* @default true
|
|
7462
7469
|
*/
|
|
7463
7470
|
this.rangeInput = input(true, { transform: booleanAttribute, alias: 'range' });
|
|
@@ -7466,56 +7473,69 @@ class DateRangePickerComponent {
|
|
|
7466
7473
|
});
|
|
7467
7474
|
this.dateFilter = input();
|
|
7468
7475
|
this.disabledInput = input(false, { transform: booleanAttribute, alias: 'disabled' });
|
|
7469
|
-
this
|
|
7476
|
+
this.#disabledEffect = effect(() => {
|
|
7470
7477
|
this.disabled() ? this.dateRangeGroup.disable() : this.dateRangeGroup.enable();
|
|
7471
7478
|
});
|
|
7472
7479
|
this.disabled = computed(() => {
|
|
7473
7480
|
return this.#disabled() || this.disabledInput();
|
|
7474
7481
|
});
|
|
7475
7482
|
this.#disabled = signal(false);
|
|
7476
|
-
this.
|
|
7483
|
+
this.valueModel = model(null, {
|
|
7484
|
+
alias: 'value'
|
|
7485
|
+
});
|
|
7486
|
+
this.#valueInputEffect = effect(() => {
|
|
7487
|
+
const value = this.valueModel() ?? { startDate: null, endDate: null };
|
|
7488
|
+
const range = this.range();
|
|
7489
|
+
untracked(() => {
|
|
7490
|
+
this.value =
|
|
7491
|
+
value instanceof Date
|
|
7492
|
+
? { startDate: value, endDate: null }
|
|
7493
|
+
: { ...value };
|
|
7494
|
+
});
|
|
7495
|
+
});
|
|
7496
|
+
this.#value = signal({ startDate: null, endDate: null });
|
|
7477
7497
|
/**
|
|
7478
7498
|
* Set length or format of day name.
|
|
7479
|
-
* @
|
|
7499
|
+
* @return WeekdayFormatType
|
|
7480
7500
|
* @default 'short'
|
|
7481
7501
|
*/
|
|
7482
7502
|
this.weekdayFormat = input('short');
|
|
7483
7503
|
/**
|
|
7484
7504
|
* Optional popper Options object
|
|
7485
|
-
* @
|
|
7505
|
+
* @return Partial<Options>
|
|
7486
7506
|
*/
|
|
7487
7507
|
this.popperjsOptions = input({ strategy: 'absolute' }, { alias: 'popperOptions' });
|
|
7488
7508
|
/**
|
|
7489
7509
|
* Set whether days in adjacent months shown before or after the current month are selectable. This only applies if the `showAdjacentDays` option is set to true.
|
|
7490
|
-
* @
|
|
7510
|
+
* @return boolean
|
|
7491
7511
|
* @default false
|
|
7492
7512
|
* @since 4.4.10
|
|
7493
7513
|
*/
|
|
7494
7514
|
this.selectAdjacentDays = input(false, { transform: booleanAttribute });
|
|
7495
7515
|
/**
|
|
7496
7516
|
* Set whether to display dates in adjacent months (non-selectable) at the start and end of the current month.
|
|
7497
|
-
* @
|
|
7517
|
+
* @return boolean
|
|
7498
7518
|
* @default true
|
|
7499
7519
|
* @since 4.4.10
|
|
7500
7520
|
*/
|
|
7501
7521
|
this.showAdjacentDays = input(true, { transform: booleanAttribute });
|
|
7502
7522
|
/**
|
|
7503
7523
|
* Specify the type of date selection as day, week, month, or year.
|
|
7504
|
-
* @
|
|
7524
|
+
* @return 'day' | 'week' | 'month' | 'year'
|
|
7505
7525
|
* @default 'day'
|
|
7506
7526
|
* @since 5.0.0
|
|
7507
7527
|
*/
|
|
7508
7528
|
this.selectionType = input('day');
|
|
7509
7529
|
/**
|
|
7510
7530
|
* Set whether to display week numbers in the calendar.
|
|
7511
|
-
* @
|
|
7531
|
+
* @return boolean
|
|
7512
7532
|
* @default false
|
|
7513
7533
|
* @since 5.0.0
|
|
7514
7534
|
*/
|
|
7515
7535
|
this.showWeekNumber = input(false, { transform: booleanAttribute });
|
|
7516
7536
|
/**
|
|
7517
7537
|
* Label displayed over week numbers in the calendar.
|
|
7518
|
-
* @
|
|
7538
|
+
* @return string
|
|
7519
7539
|
* @default undefined
|
|
7520
7540
|
* @since 5.0.0
|
|
7521
7541
|
*/
|
|
@@ -7562,6 +7582,18 @@ class DateRangePickerComponent {
|
|
|
7562
7582
|
});
|
|
7563
7583
|
this.inputStartHoverValue = signal(null);
|
|
7564
7584
|
this.inputEndHoverValue = signal(null);
|
|
7585
|
+
this.datePickerClasses = computed(() => {
|
|
7586
|
+
const size = this.size();
|
|
7587
|
+
const valid = this.valid();
|
|
7588
|
+
const disabled = this.disabled();
|
|
7589
|
+
return {
|
|
7590
|
+
'date-picker': true,
|
|
7591
|
+
[`date-picker-${size}`]: size,
|
|
7592
|
+
disabled: disabled,
|
|
7593
|
+
'is-valid': valid === true,
|
|
7594
|
+
'is-invalid': valid === false
|
|
7595
|
+
};
|
|
7596
|
+
});
|
|
7565
7597
|
this.#breakpoints = {
|
|
7566
7598
|
OneCalendarRanges: '(min-width: 480px)',
|
|
7567
7599
|
TwoCalendars: '(max-width: 650px)',
|
|
@@ -7582,29 +7614,35 @@ class DateRangePickerComponent {
|
|
|
7582
7614
|
/* empty */
|
|
7583
7615
|
};
|
|
7584
7616
|
}
|
|
7617
|
+
#cdr;
|
|
7585
7618
|
#breakpointObserver;
|
|
7586
7619
|
#destroyRef;
|
|
7587
7620
|
get timepicker() {
|
|
7588
7621
|
return false;
|
|
7589
7622
|
// return this.timepickerInput();
|
|
7590
7623
|
}
|
|
7624
|
+
#visibleInputEffect;
|
|
7625
|
+
#dateModelEffect;
|
|
7626
|
+
#disabledEffect;
|
|
7591
7627
|
#disabled;
|
|
7628
|
+
#valueInputEffect;
|
|
7592
7629
|
set value(value) {
|
|
7593
|
-
const newValue =
|
|
7594
|
-
if (JSON.stringify(this
|
|
7595
|
-
this.
|
|
7596
|
-
this.
|
|
7597
|
-
this.
|
|
7598
|
-
this.
|
|
7630
|
+
const newValue = value;
|
|
7631
|
+
if (JSON.stringify(this.#value()) !== JSON.stringify(newValue)) {
|
|
7632
|
+
this.#value.set(newValue);
|
|
7633
|
+
this.valueChange.emit(this.value);
|
|
7634
|
+
this.onChange(this.value);
|
|
7635
|
+
this.#cdr.markForCheck();
|
|
7599
7636
|
if (this.closeOnSelect() && this.visible()) {
|
|
7600
|
-
const hasValue = this.range() ? !!(
|
|
7637
|
+
const hasValue = this.range() ? !!(newValue.startDate && newValue.endDate) : !!newValue;
|
|
7601
7638
|
this.visible.set(!hasValue);
|
|
7602
7639
|
}
|
|
7603
7640
|
}
|
|
7604
7641
|
}
|
|
7605
7642
|
get value() {
|
|
7606
|
-
return this.
|
|
7643
|
+
return this.range() ? this.#value() : this.#value().startDate;
|
|
7607
7644
|
}
|
|
7645
|
+
#value;
|
|
7608
7646
|
subscribeDateChange(subscribe = true) {
|
|
7609
7647
|
if (subscribe) {
|
|
7610
7648
|
// todo
|
|
@@ -7639,15 +7677,6 @@ class DateRangePickerComponent {
|
|
|
7639
7677
|
const placeholder = this.placeholder();
|
|
7640
7678
|
return Array.isArray(placeholder) ? placeholder[1] : placeholder;
|
|
7641
7679
|
}
|
|
7642
|
-
get datePickerClasses() {
|
|
7643
|
-
return {
|
|
7644
|
-
'date-picker': true,
|
|
7645
|
-
[`date-picker-${this.size()}`]: this.size(),
|
|
7646
|
-
disabled: this.disabled(),
|
|
7647
|
-
'is-valid': this.valid() === true,
|
|
7648
|
-
'is-invalid': this.valid() === false
|
|
7649
|
-
};
|
|
7650
|
-
}
|
|
7651
7680
|
formatDate(date) {
|
|
7652
7681
|
const format = this.format();
|
|
7653
7682
|
const inputDateFormat = this.inputDateFormat();
|
|
@@ -7728,7 +7757,7 @@ class DateRangePickerComponent {
|
|
|
7728
7757
|
}
|
|
7729
7758
|
}
|
|
7730
7759
|
handleCalendarDateChange($event) {
|
|
7731
|
-
if (this.calendarDate.getTime() !== $event.getTime()) {
|
|
7760
|
+
if (this.calendarDate().getTime() !== $event.getTime()) {
|
|
7732
7761
|
this.calendarDateChange.emit($event);
|
|
7733
7762
|
}
|
|
7734
7763
|
}
|
|
@@ -7758,8 +7787,9 @@ class DateRangePickerComponent {
|
|
|
7758
7787
|
if (date instanceof Date && date.getTime()) {
|
|
7759
7788
|
const endDate = this.endDate();
|
|
7760
7789
|
if (!(this.forbiddenDate(date) || (endDate && endDate < date))) {
|
|
7761
|
-
this.calendarDate
|
|
7790
|
+
this.calendarDate.set(date);
|
|
7762
7791
|
this.handleStartDateChange(date);
|
|
7792
|
+
return;
|
|
7763
7793
|
}
|
|
7764
7794
|
}
|
|
7765
7795
|
this.handleStartDateChange(this.startDate() ?? null);
|
|
@@ -7774,7 +7804,7 @@ class DateRangePickerComponent {
|
|
|
7774
7804
|
if (date instanceof Date && date.getTime()) {
|
|
7775
7805
|
const startDate = this.startDate();
|
|
7776
7806
|
if (!(this.forbiddenDate(date) || (startDate && startDate > date))) {
|
|
7777
|
-
this.calendarDate
|
|
7807
|
+
this.calendarDate.set(date);
|
|
7778
7808
|
this.handleEndDateChange(date);
|
|
7779
7809
|
}
|
|
7780
7810
|
else {
|
|
@@ -7813,13 +7843,13 @@ class DateRangePickerComponent {
|
|
|
7813
7843
|
this.endDateModel.set(time ?? this.endDate());
|
|
7814
7844
|
}
|
|
7815
7845
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: DateRangePickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
7816
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.7", type: DateRangePickerComponent, isStandalone: true, selector: "c-date-range-picker", inputs: { dayFormat: { classPropertyName: "dayFormat", publicName: "dayFormat", isSignal: true, isRequired: false, transformFunction: null }, calendars: { classPropertyName: "calendars", publicName: "calendars", isSignal: true, isRequired: false, transformFunction: null }, cleaner: { classPropertyName: "cleaner", publicName: "cleaner", isSignal: true, isRequired: false, transformFunction: null }, closeOnSelect: { classPropertyName: "closeOnSelect", publicName: "closeOnSelect", isSignal: true, isRequired: false, transformFunction: null }, format: { classPropertyName: "format", publicName: "format", isSignal: true, isRequired: false, transformFunction: null }, indicator: { classPropertyName: "indicator", publicName: "indicator", isSignal: true, isRequired: false, transformFunction: null }, inputDateFormat: { classPropertyName: "inputDateFormat", publicName: "inputDateFormat", isSignal: true, isRequired: false, transformFunction: null }, inputDateParse: { classPropertyName: "inputDateParse", publicName: "inputDateParse", isSignal: true, isRequired: false, transformFunction: null }, inputReadOnlyInput: { classPropertyName: "inputReadOnlyInput", publicName: "inputReadOnly", isSignal: true, isRequired: false, transformFunction: null }, navYearFirst: { classPropertyName: "navYearFirst", publicName: "navYearFirst", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, ranges: { classPropertyName: "ranges", publicName: "ranges", isSignal: true, isRequired: false, transformFunction: null }, rangesButtonsColor: { classPropertyName: "rangesButtonsColor", publicName: "rangesButtonsColor", isSignal: true, isRequired: false, transformFunction: null }, rangesButtonsSize: { classPropertyName: "rangesButtonsSize", publicName: "rangesButtonsSize", isSignal: true, isRequired: false, transformFunction: null }, rangesButtonsVariant: { classPropertyName: "rangesButtonsVariant", publicName: "rangesButtonsVariant", isSignal: true, isRequired: false, transformFunction: null }, separator: { classPropertyName: "separator", publicName: "separator", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, timepickerInput: { classPropertyName: "timepickerInput", publicName: "timepicker", isSignal: true, isRequired: false, transformFunction: null }, valid: { classPropertyName: "valid", publicName: "valid", isSignal: true, isRequired: false, transformFunction: null }, visibleInput: { classPropertyName: "visibleInput", publicName: "visibleInput", isSignal: true, isRequired: false, transformFunction: null }, startDateModel: { classPropertyName: "startDateModel", publicName: "startDate", isSignal: true, isRequired: false, transformFunction: null }, endDateModel: { classPropertyName: "endDateModel", publicName: "endDate", isSignal: true, isRequired: false, transformFunction: null },
|
|
7846
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.7", type: DateRangePickerComponent, isStandalone: true, selector: "c-date-range-picker", inputs: { dayFormat: { classPropertyName: "dayFormat", publicName: "dayFormat", isSignal: true, isRequired: false, transformFunction: null }, calendars: { classPropertyName: "calendars", publicName: "calendars", isSignal: true, isRequired: false, transformFunction: null }, cleaner: { classPropertyName: "cleaner", publicName: "cleaner", isSignal: true, isRequired: false, transformFunction: null }, closeOnSelect: { classPropertyName: "closeOnSelect", publicName: "closeOnSelect", isSignal: true, isRequired: false, transformFunction: null }, format: { classPropertyName: "format", publicName: "format", isSignal: true, isRequired: false, transformFunction: null }, indicator: { classPropertyName: "indicator", publicName: "indicator", isSignal: true, isRequired: false, transformFunction: null }, inputDateFormat: { classPropertyName: "inputDateFormat", publicName: "inputDateFormat", isSignal: true, isRequired: false, transformFunction: null }, inputDateParse: { classPropertyName: "inputDateParse", publicName: "inputDateParse", isSignal: true, isRequired: false, transformFunction: null }, inputReadOnlyInput: { classPropertyName: "inputReadOnlyInput", publicName: "inputReadOnly", isSignal: true, isRequired: false, transformFunction: null }, navYearFirst: { classPropertyName: "navYearFirst", publicName: "navYearFirst", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, ranges: { classPropertyName: "ranges", publicName: "ranges", isSignal: true, isRequired: false, transformFunction: null }, rangesButtonsColor: { classPropertyName: "rangesButtonsColor", publicName: "rangesButtonsColor", isSignal: true, isRequired: false, transformFunction: null }, rangesButtonsSize: { classPropertyName: "rangesButtonsSize", publicName: "rangesButtonsSize", isSignal: true, isRequired: false, transformFunction: null }, rangesButtonsVariant: { classPropertyName: "rangesButtonsVariant", publicName: "rangesButtonsVariant", isSignal: true, isRequired: false, transformFunction: null }, separator: { classPropertyName: "separator", publicName: "separator", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, timepickerInput: { classPropertyName: "timepickerInput", publicName: "timepicker", isSignal: true, isRequired: false, transformFunction: null }, valid: { classPropertyName: "valid", publicName: "valid", isSignal: true, isRequired: false, transformFunction: null }, visibleInput: { classPropertyName: "visibleInput", publicName: "visibleInput", isSignal: true, isRequired: false, transformFunction: null }, startDateModel: { classPropertyName: "startDateModel", publicName: "startDate", isSignal: true, isRequired: false, transformFunction: null }, endDateModel: { classPropertyName: "endDateModel", publicName: "endDate", isSignal: true, isRequired: false, transformFunction: null }, calendarDateInput: { classPropertyName: "calendarDateInput", publicName: "calendarDate", isSignal: true, isRequired: false, transformFunction: null }, disabledDates: { classPropertyName: "disabledDates", publicName: "disabledDates", isSignal: true, isRequired: false, transformFunction: null }, firstDayOfWeek: { classPropertyName: "firstDayOfWeek", publicName: "firstDayOfWeek", isSignal: true, isRequired: false, transformFunction: null }, locale: { classPropertyName: "locale", publicName: "locale", isSignal: true, isRequired: false, transformFunction: null }, maxDate: { classPropertyName: "maxDate", publicName: "maxDate", isSignal: true, isRequired: false, transformFunction: null }, minDate: { classPropertyName: "minDate", publicName: "minDate", isSignal: true, isRequired: false, transformFunction: null }, navigation: { classPropertyName: "navigation", publicName: "navigation", isSignal: true, isRequired: false, transformFunction: null }, rangeInput: { classPropertyName: "rangeInput", publicName: "range", isSignal: true, isRequired: false, transformFunction: null }, dateFilter: { classPropertyName: "dateFilter", publicName: "dateFilter", isSignal: true, isRequired: false, transformFunction: null }, disabledInput: { classPropertyName: "disabledInput", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, valueModel: { classPropertyName: "valueModel", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, weekdayFormat: { classPropertyName: "weekdayFormat", publicName: "weekdayFormat", isSignal: true, isRequired: false, transformFunction: null }, popperjsOptions: { classPropertyName: "popperjsOptions", publicName: "popperOptions", isSignal: true, isRequired: false, transformFunction: null }, selectAdjacentDays: { classPropertyName: "selectAdjacentDays", publicName: "selectAdjacentDays", isSignal: true, isRequired: false, transformFunction: null }, showAdjacentDays: { classPropertyName: "showAdjacentDays", publicName: "showAdjacentDays", isSignal: true, isRequired: false, transformFunction: null }, selectionType: { classPropertyName: "selectionType", publicName: "selectionType", isSignal: true, isRequired: false, transformFunction: null }, showWeekNumber: { classPropertyName: "showWeekNumber", publicName: "showWeekNumber", isSignal: true, isRequired: false, transformFunction: null }, weekNumbersLabel: { classPropertyName: "weekNumbersLabel", publicName: "weekNumbersLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { startDateModel: "startDateChange", endDateModel: "endDateChange", valueModel: "valueChange", valueChange: "valueChange", calendarCellHover: "calendarCellHover", calendarDateChange: "calendarDateChange" }, host: { listeners: { "focusout": "onBlur()" }, properties: { "class": "datePickerClasses()" } }, providers: [
|
|
7817
7847
|
{
|
|
7818
7848
|
provide: NG_VALUE_ACCESSOR,
|
|
7819
7849
|
useExisting: forwardRef(() => DateRangePickerComponent),
|
|
7820
7850
|
multi: true
|
|
7821
7851
|
}
|
|
7822
|
-
], queries: [{ propertyName: "contentTemplates", predicate: TemplateIdDirective, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "startDateElementRef", first: true, predicate: ["startDateElementRef"], descendants: true, isSignal: true }, { propertyName: "endDateElementRef", first: true, predicate: ["endDateElementRef"], descendants: true, isSignal: true }], exportAs: ["cDateRangePicker"], ngImport: i0, template: "<fieldset [formGroup]=\"dateRangeGroup\">\n <c-dropdown #dropdown=\"cDropdown\" [(visible)]=\"visible\" [autoClose]=\"'outside'\" [ngClass]=\"datePickerClasses\"\n [popperOptions]=\"popperjsOptions()\" class=\"date-picker picker\">\n <div [caret]=\"false\"\n [disabled]=\"disabled() ?? dropdown.visible\"\n cDropdownToggle\n class=\"date-picker-input-group\"\n >\n <input #startDateElementRef\n (change)=\"handleStartDateInputChange($event)\"\n [attr.tabindex]=\"disabled() ? -1 : 0\"\n [ngClass]=\"{hover: !!inputStartHoverValue()}\"\n [placeholder]=\"startDatePlaceholder\"\n [readonly]=\"inputReadOnly() ?? null\"\n [valid]=\"range() ? undefined : valid()\"\n cFormControl\n class=\"date-picker-input\"\n formControlName=\"startDateInput\"\n pattern=\"[1-9]*\"\n >\n @if (range() && separator()) {\n <div class=\"date-picker-separator\"></div>\n }\n @if (range()) {\n <input #endDateElementRef\n (change)=\"handleEndDateInputChange($event)\"\n [attr.tabindex]=\"disabled() ? -1 : 0\"\n [ngClass]=\"{hover: !!inputEndHoverValue()}\"\n [placeholder]=\"endDatePlaceholder\"\n [readonly]=\"inputReadOnly() ?? null\"\n [valid]=\"valid() ?? undefined\"\n cFormControl\n class=\"date-picker-input\"\n formControlName=\"endDateInput\"\n pattern=\"[1-9]*\"\n >\n }\n @if (indicator()) {\n <div class=\"date-picker-indicator\"></div>\n }\n @if (cleaner() && startDateElementRef.value && !disabled()) {\n <div (click)=\"!disabled() && handleClear($event)\" class=\"date-picker-cleaner\" role=\"button\"></div>\n }\n </div>\n <div cDropdownMenu class=\"date-picker-dropdown py-0\">\n <div class=\"date-picker-body\">\n @if (!showRanges) {\n @if (ranges() && customRanges.length > 0) {\n <div class=\"date-picker-ranges\">\n @for (customRange of customRanges; track customRange) {\n <button (click)=\"setCustomRange(customRange)\"\n [color]=\"rangesButtonsColor()\"\n [size]=\"rangesButtonsSize()\"\n [variant]=\"rangesButtonsVariant()\"\n cButton>\n {{ customRange | customRangeKey }}\n </button>\n }\n </div>\n }\n }\n <c-calendar\n (calendarCellHover)=\"handleCalendarCellHover($event)\"\n (calendarDateChange)=\"handleCalendarDateChange($event)\"\n (endDateChange)=\"handleEndDateChange($event)\"\n (startDateChange)=\"handleStartDateChange($event)\"\n [calendarDate]=\"calendarDate\"\n [calendars]=\"isMobile ? 1 : calendars()\"\n [dateFilter]=\"dateFilter()\"\n [dayFormat]=\"dayFormat()\"\n [disabledDates]=\"disabledDates()\"\n [endDate]=\"endDate()\"\n [firstDayOfWeek]=\"firstDayOfWeek()\"\n [locale]=\"locale()\"\n [maxDate]=\"maxDate()\"\n [minDate]=\"minDate()\"\n [navYearFirst]=\"navYearFirst()\"\n [navigation]=\"navigation()\"\n [range]=\"range()\"\n [selectAdjacentDays]=\"selectAdjacentDays()\"\n [selectionType]=\"selectionType()\"\n [showAdjacentDays]=\"showAdjacentDays()\"\n [showWeekNumber]=\"showWeekNumber()\"\n [startDate]=\"startDate()\"\n [weekNumbersLabel]=\"weekNumbersLabel()\"\n [weekdayFormat]=\"weekdayFormat()\"\n class=\"date-picker-calendars\"\n />\n @if (false && timepicker) {\n <div class=\"date-picker-timepickers\">\n <!-- todo-->\n <c-time-picker\n variant=\"select\"\n [locale]=\"locale()\"\n [disabled]=\"!startDate()\"\n [time]=\"startDate() ?? undefined\"\n (timeChange)=\"handleStartTimeChange($event)\"\n />\n @if (range()) {\n <c-time-picker\n variant=\"select\"\n [locale]=\"locale()\"\n [disabled]=\"!endDate()\"\n [time]=\"endDate() ?? undefined\"\n (timeChange)=\"handleEndTimeChange($event)\"\n />\n }\n </div>\n }\n </div>\n @let footer = templates()?.['datePickerFooter'];\n @if (footer) {\n <div class=\"date-picker-footer\">\n <ng-container *ngTemplateOutlet=\"footer; context: {$implicit: dropdown}\" />\n </div>\n }\n </div>\n <ng-content />\n </c-dropdown>\n</fieldset>\n", styles: [".form-control.date-picker-input:focus{box-shadow:0 0}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$2.PatternValidator, selector: "[pattern][formControlName],[pattern][formControl],[pattern][ngModel]", inputs: ["pattern"] }, { kind: "directive", type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: CalendarComponent, selector: "c-calendar", inputs: ["calendarDate", "calendars", "dayFormat", "disabledDates", "startDate", "endDate", "firstDayOfWeek", "locale", "maxDate", "minDate", "navigation", "navYearFirst", "range", "view", "weekdayFormat", "dateFilter", "selectAdjacentDays", "showAdjacentDays", "selectionType", "showWeekNumber", "weekNumbersLabel", "ariaNextMonthLabel", "ariaNextYearLabel", "ariaPrevMonthLabel", "ariaPrevYearLabel"], outputs: ["calendarDateChange", "endDateChange", "startDateChange", "viewChange", "calendarCellHover"], exportAs: ["cCalendar"] }, { kind: "component", type: TimePickerComponent, selector: "c-time-picker", inputs: ["cleaner", "dateTimeFormatOptions", "disabled", "filterHours", "filterMinutes", "filterSeconds", "indicator", "inputReadOnly", "locale", "placeholder", "seconds", "size", "time", "variant", "valid", "visible"], outputs: ["timeChange"], exportAs: ["cTimePicker"] }, { kind: "directive", type: ButtonDirective, selector: "[cButton]", inputs: ["active", "color", "disabled", "shape", "size", "type", "variant"], exportAs: ["cButton"] }, { kind: "component", type: DropdownComponent, selector: "c-dropdown", inputs: ["alignment", "autoClose", "direction", "placement", "popper", "popperOptions", "variant", "visible"], outputs: ["visibleChange"], exportAs: ["cDropdown"] }, { kind: "directive", type: DropdownToggleDirective, selector: "[cDropdownToggle]", inputs: ["dropdownComponent", "disabled", "caret", "split"], exportAs: ["cDropdownToggle"] }, { kind: "directive", type: DropdownMenuDirective, selector: "[cDropdownMenu]", inputs: ["alignment", "visible"], exportAs: ["cDropdownMenu"] }, { kind: "directive", type: FormControlDirective, selector: "input[cFormControl], textarea[cFormControl]", inputs: ["sizing", "valid", "type", "plaintext"] }, { kind: "pipe", type: CustomRangeKeyPipe, name: "customRangeKey" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
7852
|
+
], queries: [{ propertyName: "contentTemplates", predicate: TemplateIdDirective, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "startDateElementRef", first: true, predicate: ["startDateElementRef"], descendants: true, isSignal: true }, { propertyName: "endDateElementRef", first: true, predicate: ["endDateElementRef"], descendants: true, isSignal: true }], exportAs: ["cDateRangePicker"], ngImport: i0, template: "<fieldset [formGroup]=\"dateRangeGroup\">\n <c-dropdown #dropdown=\"cDropdown\" [(visible)]=\"visible\" [autoClose]=\"'outside'\" [ngClass]=\"datePickerClasses()\"\n [popperOptions]=\"popperjsOptions()\" class=\"date-picker picker\">\n <div [caret]=\"false\"\n [disabled]=\"disabled() ?? dropdown.visible\"\n cDropdownToggle\n class=\"date-picker-input-group\"\n >\n <input #startDateElementRef\n (change)=\"handleStartDateInputChange($event)\"\n [attr.tabindex]=\"disabled() ? -1 : 0\"\n [ngClass]=\"{hover: !!inputStartHoverValue()}\"\n [placeholder]=\"startDatePlaceholder\"\n [readonly]=\"inputReadOnly() ?? null\"\n [valid]=\"range() ? undefined : valid()\"\n cFormControl\n class=\"date-picker-input\"\n formControlName=\"startDateInput\"\n pattern=\"[1-9]*\"\n >\n @if (range() && separator()) {\n <div class=\"date-picker-separator\"></div>\n }\n @if (range()) {\n <input #endDateElementRef\n (change)=\"handleEndDateInputChange($event)\"\n [attr.tabindex]=\"disabled() ? -1 : 0\"\n [ngClass]=\"{hover: !!inputEndHoverValue()}\"\n [placeholder]=\"endDatePlaceholder\"\n [readonly]=\"inputReadOnly() ?? null\"\n [valid]=\"valid() ?? undefined\"\n cFormControl\n class=\"date-picker-input\"\n formControlName=\"endDateInput\"\n pattern=\"[1-9]*\"\n >\n }\n @if (indicator()) {\n <div class=\"date-picker-indicator\"></div>\n }\n @if (cleaner() && startDateElementRef.value && !disabled()) {\n <div (click)=\"!disabled() && handleClear($event)\" class=\"date-picker-cleaner\" role=\"button\"></div>\n }\n </div>\n <div cDropdownMenu class=\"date-picker-dropdown py-0\">\n <div class=\"date-picker-body\">\n @if (!showRanges) {\n @if (ranges() && customRanges.length > 0) {\n <div class=\"date-picker-ranges\">\n @for (customRange of customRanges; track customRange) {\n <button (click)=\"setCustomRange(customRange)\"\n [color]=\"rangesButtonsColor()\"\n [size]=\"rangesButtonsSize()\"\n [variant]=\"rangesButtonsVariant()\"\n cButton>\n {{ customRange | customRangeKey }}\n </button>\n }\n </div>\n }\n }\n <c-calendar\n (calendarCellHover)=\"handleCalendarCellHover($event)\"\n (calendarDateChange)=\"handleCalendarDateChange($event)\"\n (endDateChange)=\"handleEndDateChange($event)\"\n (startDateChange)=\"handleStartDateChange($event)\"\n [calendarDate]=\"calendarDate()\"\n [calendars]=\"isMobile ? 1 : calendars()\"\n [dateFilter]=\"dateFilter()\"\n [dayFormat]=\"dayFormat()\"\n [disabledDates]=\"disabledDates()\"\n [endDate]=\"endDate()\"\n [firstDayOfWeek]=\"firstDayOfWeek()\"\n [locale]=\"locale()\"\n [maxDate]=\"maxDate()\"\n [minDate]=\"minDate()\"\n [navYearFirst]=\"navYearFirst()\"\n [navigation]=\"navigation()\"\n [range]=\"range()\"\n [selectAdjacentDays]=\"selectAdjacentDays()\"\n [selectionType]=\"selectionType()\"\n [showAdjacentDays]=\"showAdjacentDays()\"\n [showWeekNumber]=\"showWeekNumber()\"\n [startDate]=\"startDate()\"\n [weekNumbersLabel]=\"weekNumbersLabel()\"\n [weekdayFormat]=\"weekdayFormat()\"\n class=\"date-picker-calendars\"\n />\n @if (false && timepicker) {\n <div class=\"date-picker-timepickers\">\n <!-- todo-->\n <c-time-picker\n variant=\"select\"\n [locale]=\"locale()\"\n [disabled]=\"!startDate()\"\n [time]=\"startDate() ?? undefined\"\n (timeChange)=\"handleStartTimeChange($event)\"\n />\n @if (range()) {\n <c-time-picker\n variant=\"select\"\n [locale]=\"locale()\"\n [disabled]=\"!endDate()\"\n [time]=\"endDate() ?? undefined\"\n (timeChange)=\"handleEndTimeChange($event)\"\n />\n }\n </div>\n }\n </div>\n @let footer = templates()?.['datePickerFooter'];\n @if (footer) {\n <div class=\"date-picker-footer\">\n <ng-container *ngTemplateOutlet=\"footer; context: {$implicit: dropdown}\" />\n </div>\n }\n </div>\n <ng-content />\n </c-dropdown>\n</fieldset>\n", styles: [".form-control.date-picker-input:focus{box-shadow:0 0}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$2.PatternValidator, selector: "[pattern][formControlName],[pattern][formControl],[pattern][ngModel]", inputs: ["pattern"] }, { kind: "directive", type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: CalendarComponent, selector: "c-calendar", inputs: ["calendarDate", "calendars", "dayFormat", "disabledDates", "startDate", "endDate", "firstDayOfWeek", "locale", "maxDate", "minDate", "navigation", "navYearFirst", "range", "view", "weekdayFormat", "dateFilter", "selectAdjacentDays", "showAdjacentDays", "selectionType", "showWeekNumber", "weekNumbersLabel", "ariaNextMonthLabel", "ariaNextYearLabel", "ariaPrevMonthLabel", "ariaPrevYearLabel"], outputs: ["calendarDateChange", "endDateChange", "startDateChange", "viewChange", "calendarCellHover"], exportAs: ["cCalendar"] }, { kind: "component", type: TimePickerComponent, selector: "c-time-picker", inputs: ["cleaner", "dateTimeFormatOptions", "disabled", "filterHours", "filterMinutes", "filterSeconds", "indicator", "inputReadOnly", "locale", "placeholder", "seconds", "size", "time", "variant", "valid", "visible"], outputs: ["timeChange"], exportAs: ["cTimePicker"] }, { kind: "directive", type: ButtonDirective, selector: "[cButton]", inputs: ["active", "color", "disabled", "shape", "size", "type", "variant"], exportAs: ["cButton"] }, { kind: "component", type: DropdownComponent, selector: "c-dropdown", inputs: ["alignment", "autoClose", "direction", "placement", "popper", "popperOptions", "variant", "visible"], outputs: ["visibleChange"], exportAs: ["cDropdown"] }, { kind: "directive", type: DropdownToggleDirective, selector: "[cDropdownToggle]", inputs: ["dropdownComponent", "disabled", "caret", "split"], exportAs: ["cDropdownToggle"] }, { kind: "directive", type: DropdownMenuDirective, selector: "[cDropdownMenu]", inputs: ["alignment", "visible"], exportAs: ["cDropdownMenu"] }, { kind: "directive", type: FormControlDirective, selector: "input[cFormControl], textarea[cFormControl]", inputs: ["sizing", "valid", "type", "plaintext"] }, { kind: "pipe", type: CustomRangeKeyPipe, name: "customRangeKey" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
7823
7853
|
}
|
|
7824
7854
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: DateRangePickerComponent, decorators: [{
|
|
7825
7855
|
type: Component,
|
|
@@ -7841,19 +7871,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImpor
|
|
|
7841
7871
|
useExisting: forwardRef(() => DateRangePickerComponent),
|
|
7842
7872
|
multi: true
|
|
7843
7873
|
}
|
|
7844
|
-
], changeDetection: ChangeDetectionStrategy.OnPush,
|
|
7845
|
-
|
|
7846
|
-
|
|
7847
|
-
|
|
7848
|
-
|
|
7849
|
-
type: Input
|
|
7850
|
-
}], onBlur: [{
|
|
7851
|
-
type: HostListener,
|
|
7852
|
-
args: ['focusout']
|
|
7853
|
-
}], datePickerClasses: [{
|
|
7854
|
-
type: HostBinding,
|
|
7855
|
-
args: ['class']
|
|
7856
|
-
}] } });
|
|
7874
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
7875
|
+
'[class]': 'datePickerClasses()',
|
|
7876
|
+
'(focusout)': 'onBlur()'
|
|
7877
|
+
}, template: "<fieldset [formGroup]=\"dateRangeGroup\">\n <c-dropdown #dropdown=\"cDropdown\" [(visible)]=\"visible\" [autoClose]=\"'outside'\" [ngClass]=\"datePickerClasses()\"\n [popperOptions]=\"popperjsOptions()\" class=\"date-picker picker\">\n <div [caret]=\"false\"\n [disabled]=\"disabled() ?? dropdown.visible\"\n cDropdownToggle\n class=\"date-picker-input-group\"\n >\n <input #startDateElementRef\n (change)=\"handleStartDateInputChange($event)\"\n [attr.tabindex]=\"disabled() ? -1 : 0\"\n [ngClass]=\"{hover: !!inputStartHoverValue()}\"\n [placeholder]=\"startDatePlaceholder\"\n [readonly]=\"inputReadOnly() ?? null\"\n [valid]=\"range() ? undefined : valid()\"\n cFormControl\n class=\"date-picker-input\"\n formControlName=\"startDateInput\"\n pattern=\"[1-9]*\"\n >\n @if (range() && separator()) {\n <div class=\"date-picker-separator\"></div>\n }\n @if (range()) {\n <input #endDateElementRef\n (change)=\"handleEndDateInputChange($event)\"\n [attr.tabindex]=\"disabled() ? -1 : 0\"\n [ngClass]=\"{hover: !!inputEndHoverValue()}\"\n [placeholder]=\"endDatePlaceholder\"\n [readonly]=\"inputReadOnly() ?? null\"\n [valid]=\"valid() ?? undefined\"\n cFormControl\n class=\"date-picker-input\"\n formControlName=\"endDateInput\"\n pattern=\"[1-9]*\"\n >\n }\n @if (indicator()) {\n <div class=\"date-picker-indicator\"></div>\n }\n @if (cleaner() && startDateElementRef.value && !disabled()) {\n <div (click)=\"!disabled() && handleClear($event)\" class=\"date-picker-cleaner\" role=\"button\"></div>\n }\n </div>\n <div cDropdownMenu class=\"date-picker-dropdown py-0\">\n <div class=\"date-picker-body\">\n @if (!showRanges) {\n @if (ranges() && customRanges.length > 0) {\n <div class=\"date-picker-ranges\">\n @for (customRange of customRanges; track customRange) {\n <button (click)=\"setCustomRange(customRange)\"\n [color]=\"rangesButtonsColor()\"\n [size]=\"rangesButtonsSize()\"\n [variant]=\"rangesButtonsVariant()\"\n cButton>\n {{ customRange | customRangeKey }}\n </button>\n }\n </div>\n }\n }\n <c-calendar\n (calendarCellHover)=\"handleCalendarCellHover($event)\"\n (calendarDateChange)=\"handleCalendarDateChange($event)\"\n (endDateChange)=\"handleEndDateChange($event)\"\n (startDateChange)=\"handleStartDateChange($event)\"\n [calendarDate]=\"calendarDate()\"\n [calendars]=\"isMobile ? 1 : calendars()\"\n [dateFilter]=\"dateFilter()\"\n [dayFormat]=\"dayFormat()\"\n [disabledDates]=\"disabledDates()\"\n [endDate]=\"endDate()\"\n [firstDayOfWeek]=\"firstDayOfWeek()\"\n [locale]=\"locale()\"\n [maxDate]=\"maxDate()\"\n [minDate]=\"minDate()\"\n [navYearFirst]=\"navYearFirst()\"\n [navigation]=\"navigation()\"\n [range]=\"range()\"\n [selectAdjacentDays]=\"selectAdjacentDays()\"\n [selectionType]=\"selectionType()\"\n [showAdjacentDays]=\"showAdjacentDays()\"\n [showWeekNumber]=\"showWeekNumber()\"\n [startDate]=\"startDate()\"\n [weekNumbersLabel]=\"weekNumbersLabel()\"\n [weekdayFormat]=\"weekdayFormat()\"\n class=\"date-picker-calendars\"\n />\n @if (false && timepicker) {\n <div class=\"date-picker-timepickers\">\n <!-- todo-->\n <c-time-picker\n variant=\"select\"\n [locale]=\"locale()\"\n [disabled]=\"!startDate()\"\n [time]=\"startDate() ?? undefined\"\n (timeChange)=\"handleStartTimeChange($event)\"\n />\n @if (range()) {\n <c-time-picker\n variant=\"select\"\n [locale]=\"locale()\"\n [disabled]=\"!endDate()\"\n [time]=\"endDate() ?? undefined\"\n (timeChange)=\"handleEndTimeChange($event)\"\n />\n }\n </div>\n }\n </div>\n @let footer = templates()?.['datePickerFooter'];\n @if (footer) {\n <div class=\"date-picker-footer\">\n <ng-container *ngTemplateOutlet=\"footer; context: {$implicit: dropdown}\" />\n </div>\n }\n </div>\n <ng-content />\n </c-dropdown>\n</fieldset>\n", styles: [".form-control.date-picker-input:focus{box-shadow:0 0}\n"] }]
|
|
7878
|
+
}] });
|
|
7857
7879
|
|
|
7858
7880
|
class DateRangePickerModule {
|
|
7859
7881
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: DateRangePickerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
@@ -7909,7 +7931,7 @@ class DatePickerComponent extends DateRangePickerComponent {
|
|
|
7909
7931
|
useExisting: forwardRef(() => DatePickerComponent),
|
|
7910
7932
|
multi: true
|
|
7911
7933
|
}
|
|
7912
|
-
], exportAs: ["cDatePicker"], usesInheritance: true, ngImport: i0, template: "<fieldset [formGroup]=\"dateRangeGroup\">\n <c-dropdown #dropdown=\"cDropdown\" [(visible)]=\"visible\" [autoClose]=\"'outside'\" [ngClass]=\"datePickerClasses\"\n [popperOptions]=\"popperjsOptions()\" class=\"date-picker picker\">\n <div [caret]=\"false\"\n [disabled]=\"disabled() ?? dropdown.visible\"\n cDropdownToggle\n class=\"date-picker-input-group\"\n >\n <input #startDateElementRef\n (change)=\"handleStartDateInputChange($event)\"\n [attr.tabindex]=\"disabled() ? -1 : 0\"\n [ngClass]=\"{hover: !!inputStartHoverValue()}\"\n [placeholder]=\"startDatePlaceholder\"\n [readonly]=\"inputReadOnly() ?? null\"\n [valid]=\"range() ? undefined : valid()\"\n cFormControl\n class=\"date-picker-input\"\n formControlName=\"startDateInput\"\n pattern=\"[1-9]*\"\n >\n @if (range() && separator()) {\n <div class=\"date-picker-separator\"></div>\n }\n @if (range()) {\n <input #endDateElementRef\n (change)=\"handleEndDateInputChange($event)\"\n [attr.tabindex]=\"disabled() ? -1 : 0\"\n [ngClass]=\"{hover: !!inputEndHoverValue()}\"\n [placeholder]=\"endDatePlaceholder\"\n [readonly]=\"inputReadOnly() ?? null\"\n [valid]=\"valid() ?? undefined\"\n cFormControl\n class=\"date-picker-input\"\n formControlName=\"endDateInput\"\n pattern=\"[1-9]*\"\n >\n }\n @if (indicator()) {\n <div class=\"date-picker-indicator\"></div>\n }\n @if (cleaner() && startDateElementRef.value && !disabled()) {\n <div (click)=\"!disabled() && handleClear($event)\" class=\"date-picker-cleaner\" role=\"button\"></div>\n }\n </div>\n <div cDropdownMenu class=\"date-picker-dropdown py-0\">\n <div class=\"date-picker-body\">\n @if (!showRanges) {\n @if (ranges() && customRanges.length > 0) {\n <div class=\"date-picker-ranges\">\n @for (customRange of customRanges; track customRange) {\n <button (click)=\"setCustomRange(customRange)\"\n [color]=\"rangesButtonsColor()\"\n [size]=\"rangesButtonsSize()\"\n [variant]=\"rangesButtonsVariant()\"\n cButton>\n {{ customRange | customRangeKey }}\n </button>\n }\n </div>\n }\n }\n <c-calendar\n (calendarCellHover)=\"handleCalendarCellHover($event)\"\n (calendarDateChange)=\"handleCalendarDateChange($event)\"\n (endDateChange)=\"handleEndDateChange($event)\"\n (startDateChange)=\"handleStartDateChange($event)\"\n [calendarDate]=\"calendarDate\"\n [calendars]=\"isMobile ? 1 : calendars()\"\n [dateFilter]=\"dateFilter()\"\n [dayFormat]=\"dayFormat()\"\n [disabledDates]=\"disabledDates()\"\n [endDate]=\"endDate()\"\n [firstDayOfWeek]=\"firstDayOfWeek()\"\n [locale]=\"locale()\"\n [maxDate]=\"maxDate()\"\n [minDate]=\"minDate()\"\n [navYearFirst]=\"navYearFirst()\"\n [navigation]=\"navigation()\"\n [range]=\"range()\"\n [selectAdjacentDays]=\"selectAdjacentDays()\"\n [selectionType]=\"selectionType()\"\n [showAdjacentDays]=\"showAdjacentDays()\"\n [showWeekNumber]=\"showWeekNumber()\"\n [startDate]=\"startDate()\"\n [weekNumbersLabel]=\"weekNumbersLabel()\"\n [weekdayFormat]=\"weekdayFormat()\"\n class=\"date-picker-calendars\"\n />\n @if (false && timepicker) {\n <div class=\"date-picker-timepickers\">\n <!-- todo-->\n <c-time-picker\n variant=\"select\"\n [locale]=\"locale()\"\n [disabled]=\"!startDate()\"\n [time]=\"startDate() ?? undefined\"\n (timeChange)=\"handleStartTimeChange($event)\"\n />\n @if (range()) {\n <c-time-picker\n variant=\"select\"\n [locale]=\"locale()\"\n [disabled]=\"!endDate()\"\n [time]=\"endDate() ?? undefined\"\n (timeChange)=\"handleEndTimeChange($event)\"\n />\n }\n </div>\n }\n </div>\n @let footer = templates()?.['datePickerFooter'];\n @if (footer) {\n <div class=\"date-picker-footer\">\n <ng-container *ngTemplateOutlet=\"footer; context: {$implicit: dropdown}\" />\n </div>\n }\n </div>\n <ng-content />\n </c-dropdown>\n</fieldset>\n", styles: [".form-control.date-picker-input:focus{box-shadow:0 0}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$2.PatternValidator, selector: "[pattern][formControlName],[pattern][formControl],[pattern][ngModel]", inputs: ["pattern"] }, { kind: "directive", type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: CalendarComponent, selector: "c-calendar", inputs: ["calendarDate", "calendars", "dayFormat", "disabledDates", "startDate", "endDate", "firstDayOfWeek", "locale", "maxDate", "minDate", "navigation", "navYearFirst", "range", "view", "weekdayFormat", "dateFilter", "selectAdjacentDays", "showAdjacentDays", "selectionType", "showWeekNumber", "weekNumbersLabel", "ariaNextMonthLabel", "ariaNextYearLabel", "ariaPrevMonthLabel", "ariaPrevYearLabel"], outputs: ["calendarDateChange", "endDateChange", "startDateChange", "viewChange", "calendarCellHover"], exportAs: ["cCalendar"] }, { kind: "component", type: TimePickerComponent, selector: "c-time-picker", inputs: ["cleaner", "dateTimeFormatOptions", "disabled", "filterHours", "filterMinutes", "filterSeconds", "indicator", "inputReadOnly", "locale", "placeholder", "seconds", "size", "time", "variant", "valid", "visible"], outputs: ["timeChange"], exportAs: ["cTimePicker"] }, { kind: "directive", type: ButtonDirective, selector: "[cButton]", inputs: ["active", "color", "disabled", "shape", "size", "type", "variant"], exportAs: ["cButton"] }, { kind: "component", type: DropdownComponent, selector: "c-dropdown", inputs: ["alignment", "autoClose", "direction", "placement", "popper", "popperOptions", "variant", "visible"], outputs: ["visibleChange"], exportAs: ["cDropdown"] }, { kind: "directive", type: DropdownToggleDirective, selector: "[cDropdownToggle]", inputs: ["dropdownComponent", "disabled", "caret", "split"], exportAs: ["cDropdownToggle"] }, { kind: "directive", type: DropdownMenuDirective, selector: "[cDropdownMenu]", inputs: ["alignment", "visible"], exportAs: ["cDropdownMenu"] }, { kind: "directive", type: FormControlDirective, selector: "input[cFormControl], textarea[cFormControl]", inputs: ["sizing", "valid", "type", "plaintext"] }, { kind: "pipe", type: CustomRangeKeyPipe, name: "customRangeKey" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
7934
|
+
], exportAs: ["cDatePicker"], usesInheritance: true, ngImport: i0, template: "<fieldset [formGroup]=\"dateRangeGroup\">\n <c-dropdown #dropdown=\"cDropdown\" [(visible)]=\"visible\" [autoClose]=\"'outside'\" [ngClass]=\"datePickerClasses()\"\n [popperOptions]=\"popperjsOptions()\" class=\"date-picker picker\">\n <div [caret]=\"false\"\n [disabled]=\"disabled() ?? dropdown.visible\"\n cDropdownToggle\n class=\"date-picker-input-group\"\n >\n <input #startDateElementRef\n (change)=\"handleStartDateInputChange($event)\"\n [attr.tabindex]=\"disabled() ? -1 : 0\"\n [ngClass]=\"{hover: !!inputStartHoverValue()}\"\n [placeholder]=\"startDatePlaceholder\"\n [readonly]=\"inputReadOnly() ?? null\"\n [valid]=\"range() ? undefined : valid()\"\n cFormControl\n class=\"date-picker-input\"\n formControlName=\"startDateInput\"\n pattern=\"[1-9]*\"\n >\n @if (range() && separator()) {\n <div class=\"date-picker-separator\"></div>\n }\n @if (range()) {\n <input #endDateElementRef\n (change)=\"handleEndDateInputChange($event)\"\n [attr.tabindex]=\"disabled() ? -1 : 0\"\n [ngClass]=\"{hover: !!inputEndHoverValue()}\"\n [placeholder]=\"endDatePlaceholder\"\n [readonly]=\"inputReadOnly() ?? null\"\n [valid]=\"valid() ?? undefined\"\n cFormControl\n class=\"date-picker-input\"\n formControlName=\"endDateInput\"\n pattern=\"[1-9]*\"\n >\n }\n @if (indicator()) {\n <div class=\"date-picker-indicator\"></div>\n }\n @if (cleaner() && startDateElementRef.value && !disabled()) {\n <div (click)=\"!disabled() && handleClear($event)\" class=\"date-picker-cleaner\" role=\"button\"></div>\n }\n </div>\n <div cDropdownMenu class=\"date-picker-dropdown py-0\">\n <div class=\"date-picker-body\">\n @if (!showRanges) {\n @if (ranges() && customRanges.length > 0) {\n <div class=\"date-picker-ranges\">\n @for (customRange of customRanges; track customRange) {\n <button (click)=\"setCustomRange(customRange)\"\n [color]=\"rangesButtonsColor()\"\n [size]=\"rangesButtonsSize()\"\n [variant]=\"rangesButtonsVariant()\"\n cButton>\n {{ customRange | customRangeKey }}\n </button>\n }\n </div>\n }\n }\n <c-calendar\n (calendarCellHover)=\"handleCalendarCellHover($event)\"\n (calendarDateChange)=\"handleCalendarDateChange($event)\"\n (endDateChange)=\"handleEndDateChange($event)\"\n (startDateChange)=\"handleStartDateChange($event)\"\n [calendarDate]=\"calendarDate()\"\n [calendars]=\"isMobile ? 1 : calendars()\"\n [dateFilter]=\"dateFilter()\"\n [dayFormat]=\"dayFormat()\"\n [disabledDates]=\"disabledDates()\"\n [endDate]=\"endDate()\"\n [firstDayOfWeek]=\"firstDayOfWeek()\"\n [locale]=\"locale()\"\n [maxDate]=\"maxDate()\"\n [minDate]=\"minDate()\"\n [navYearFirst]=\"navYearFirst()\"\n [navigation]=\"navigation()\"\n [range]=\"range()\"\n [selectAdjacentDays]=\"selectAdjacentDays()\"\n [selectionType]=\"selectionType()\"\n [showAdjacentDays]=\"showAdjacentDays()\"\n [showWeekNumber]=\"showWeekNumber()\"\n [startDate]=\"startDate()\"\n [weekNumbersLabel]=\"weekNumbersLabel()\"\n [weekdayFormat]=\"weekdayFormat()\"\n class=\"date-picker-calendars\"\n />\n @if (false && timepicker) {\n <div class=\"date-picker-timepickers\">\n <!-- todo-->\n <c-time-picker\n variant=\"select\"\n [locale]=\"locale()\"\n [disabled]=\"!startDate()\"\n [time]=\"startDate() ?? undefined\"\n (timeChange)=\"handleStartTimeChange($event)\"\n />\n @if (range()) {\n <c-time-picker\n variant=\"select\"\n [locale]=\"locale()\"\n [disabled]=\"!endDate()\"\n [time]=\"endDate() ?? undefined\"\n (timeChange)=\"handleEndTimeChange($event)\"\n />\n }\n </div>\n }\n </div>\n @let footer = templates()?.['datePickerFooter'];\n @if (footer) {\n <div class=\"date-picker-footer\">\n <ng-container *ngTemplateOutlet=\"footer; context: {$implicit: dropdown}\" />\n </div>\n }\n </div>\n <ng-content />\n </c-dropdown>\n</fieldset>\n", styles: [".form-control.date-picker-input:focus{box-shadow:0 0}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$2.PatternValidator, selector: "[pattern][formControlName],[pattern][formControl],[pattern][ngModel]", inputs: ["pattern"] }, { kind: "directive", type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: CalendarComponent, selector: "c-calendar", inputs: ["calendarDate", "calendars", "dayFormat", "disabledDates", "startDate", "endDate", "firstDayOfWeek", "locale", "maxDate", "minDate", "navigation", "navYearFirst", "range", "view", "weekdayFormat", "dateFilter", "selectAdjacentDays", "showAdjacentDays", "selectionType", "showWeekNumber", "weekNumbersLabel", "ariaNextMonthLabel", "ariaNextYearLabel", "ariaPrevMonthLabel", "ariaPrevYearLabel"], outputs: ["calendarDateChange", "endDateChange", "startDateChange", "viewChange", "calendarCellHover"], exportAs: ["cCalendar"] }, { kind: "component", type: TimePickerComponent, selector: "c-time-picker", inputs: ["cleaner", "dateTimeFormatOptions", "disabled", "filterHours", "filterMinutes", "filterSeconds", "indicator", "inputReadOnly", "locale", "placeholder", "seconds", "size", "time", "variant", "valid", "visible"], outputs: ["timeChange"], exportAs: ["cTimePicker"] }, { kind: "directive", type: ButtonDirective, selector: "[cButton]", inputs: ["active", "color", "disabled", "shape", "size", "type", "variant"], exportAs: ["cButton"] }, { kind: "component", type: DropdownComponent, selector: "c-dropdown", inputs: ["alignment", "autoClose", "direction", "placement", "popper", "popperOptions", "variant", "visible"], outputs: ["visibleChange"], exportAs: ["cDropdown"] }, { kind: "directive", type: DropdownToggleDirective, selector: "[cDropdownToggle]", inputs: ["dropdownComponent", "disabled", "caret", "split"], exportAs: ["cDropdownToggle"] }, { kind: "directive", type: DropdownMenuDirective, selector: "[cDropdownMenu]", inputs: ["alignment", "visible"], exportAs: ["cDropdownMenu"] }, { kind: "directive", type: FormControlDirective, selector: "input[cFormControl], textarea[cFormControl]", inputs: ["sizing", "valid", "type", "plaintext"] }, { kind: "pipe", type: CustomRangeKeyPipe, name: "customRangeKey" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
7913
7935
|
}
|
|
7914
7936
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: DatePickerComponent, decorators: [{
|
|
7915
7937
|
type: Component,
|
|
@@ -7931,7 +7953,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImpor
|
|
|
7931
7953
|
useExisting: forwardRef(() => DatePickerComponent),
|
|
7932
7954
|
multi: true
|
|
7933
7955
|
}
|
|
7934
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<fieldset [formGroup]=\"dateRangeGroup\">\n <c-dropdown #dropdown=\"cDropdown\" [(visible)]=\"visible\" [autoClose]=\"'outside'\" [ngClass]=\"datePickerClasses\"\n [popperOptions]=\"popperjsOptions()\" class=\"date-picker picker\">\n <div [caret]=\"false\"\n [disabled]=\"disabled() ?? dropdown.visible\"\n cDropdownToggle\n class=\"date-picker-input-group\"\n >\n <input #startDateElementRef\n (change)=\"handleStartDateInputChange($event)\"\n [attr.tabindex]=\"disabled() ? -1 : 0\"\n [ngClass]=\"{hover: !!inputStartHoverValue()}\"\n [placeholder]=\"startDatePlaceholder\"\n [readonly]=\"inputReadOnly() ?? null\"\n [valid]=\"range() ? undefined : valid()\"\n cFormControl\n class=\"date-picker-input\"\n formControlName=\"startDateInput\"\n pattern=\"[1-9]*\"\n >\n @if (range() && separator()) {\n <div class=\"date-picker-separator\"></div>\n }\n @if (range()) {\n <input #endDateElementRef\n (change)=\"handleEndDateInputChange($event)\"\n [attr.tabindex]=\"disabled() ? -1 : 0\"\n [ngClass]=\"{hover: !!inputEndHoverValue()}\"\n [placeholder]=\"endDatePlaceholder\"\n [readonly]=\"inputReadOnly() ?? null\"\n [valid]=\"valid() ?? undefined\"\n cFormControl\n class=\"date-picker-input\"\n formControlName=\"endDateInput\"\n pattern=\"[1-9]*\"\n >\n }\n @if (indicator()) {\n <div class=\"date-picker-indicator\"></div>\n }\n @if (cleaner() && startDateElementRef.value && !disabled()) {\n <div (click)=\"!disabled() && handleClear($event)\" class=\"date-picker-cleaner\" role=\"button\"></div>\n }\n </div>\n <div cDropdownMenu class=\"date-picker-dropdown py-0\">\n <div class=\"date-picker-body\">\n @if (!showRanges) {\n @if (ranges() && customRanges.length > 0) {\n <div class=\"date-picker-ranges\">\n @for (customRange of customRanges; track customRange) {\n <button (click)=\"setCustomRange(customRange)\"\n [color]=\"rangesButtonsColor()\"\n [size]=\"rangesButtonsSize()\"\n [variant]=\"rangesButtonsVariant()\"\n cButton>\n {{ customRange | customRangeKey }}\n </button>\n }\n </div>\n }\n }\n <c-calendar\n (calendarCellHover)=\"handleCalendarCellHover($event)\"\n (calendarDateChange)=\"handleCalendarDateChange($event)\"\n (endDateChange)=\"handleEndDateChange($event)\"\n (startDateChange)=\"handleStartDateChange($event)\"\n [calendarDate]=\"calendarDate\"\n [calendars]=\"isMobile ? 1 : calendars()\"\n [dateFilter]=\"dateFilter()\"\n [dayFormat]=\"dayFormat()\"\n [disabledDates]=\"disabledDates()\"\n [endDate]=\"endDate()\"\n [firstDayOfWeek]=\"firstDayOfWeek()\"\n [locale]=\"locale()\"\n [maxDate]=\"maxDate()\"\n [minDate]=\"minDate()\"\n [navYearFirst]=\"navYearFirst()\"\n [navigation]=\"navigation()\"\n [range]=\"range()\"\n [selectAdjacentDays]=\"selectAdjacentDays()\"\n [selectionType]=\"selectionType()\"\n [showAdjacentDays]=\"showAdjacentDays()\"\n [showWeekNumber]=\"showWeekNumber()\"\n [startDate]=\"startDate()\"\n [weekNumbersLabel]=\"weekNumbersLabel()\"\n [weekdayFormat]=\"weekdayFormat()\"\n class=\"date-picker-calendars\"\n />\n @if (false && timepicker) {\n <div class=\"date-picker-timepickers\">\n <!-- todo-->\n <c-time-picker\n variant=\"select\"\n [locale]=\"locale()\"\n [disabled]=\"!startDate()\"\n [time]=\"startDate() ?? undefined\"\n (timeChange)=\"handleStartTimeChange($event)\"\n />\n @if (range()) {\n <c-time-picker\n variant=\"select\"\n [locale]=\"locale()\"\n [disabled]=\"!endDate()\"\n [time]=\"endDate() ?? undefined\"\n (timeChange)=\"handleEndTimeChange($event)\"\n />\n }\n </div>\n }\n </div>\n @let footer = templates()?.['datePickerFooter'];\n @if (footer) {\n <div class=\"date-picker-footer\">\n <ng-container *ngTemplateOutlet=\"footer; context: {$implicit: dropdown}\" />\n </div>\n }\n </div>\n <ng-content />\n </c-dropdown>\n</fieldset>\n", styles: [".form-control.date-picker-input:focus{box-shadow:0 0}\n"] }]
|
|
7956
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<fieldset [formGroup]=\"dateRangeGroup\">\n <c-dropdown #dropdown=\"cDropdown\" [(visible)]=\"visible\" [autoClose]=\"'outside'\" [ngClass]=\"datePickerClasses()\"\n [popperOptions]=\"popperjsOptions()\" class=\"date-picker picker\">\n <div [caret]=\"false\"\n [disabled]=\"disabled() ?? dropdown.visible\"\n cDropdownToggle\n class=\"date-picker-input-group\"\n >\n <input #startDateElementRef\n (change)=\"handleStartDateInputChange($event)\"\n [attr.tabindex]=\"disabled() ? -1 : 0\"\n [ngClass]=\"{hover: !!inputStartHoverValue()}\"\n [placeholder]=\"startDatePlaceholder\"\n [readonly]=\"inputReadOnly() ?? null\"\n [valid]=\"range() ? undefined : valid()\"\n cFormControl\n class=\"date-picker-input\"\n formControlName=\"startDateInput\"\n pattern=\"[1-9]*\"\n >\n @if (range() && separator()) {\n <div class=\"date-picker-separator\"></div>\n }\n @if (range()) {\n <input #endDateElementRef\n (change)=\"handleEndDateInputChange($event)\"\n [attr.tabindex]=\"disabled() ? -1 : 0\"\n [ngClass]=\"{hover: !!inputEndHoverValue()}\"\n [placeholder]=\"endDatePlaceholder\"\n [readonly]=\"inputReadOnly() ?? null\"\n [valid]=\"valid() ?? undefined\"\n cFormControl\n class=\"date-picker-input\"\n formControlName=\"endDateInput\"\n pattern=\"[1-9]*\"\n >\n }\n @if (indicator()) {\n <div class=\"date-picker-indicator\"></div>\n }\n @if (cleaner() && startDateElementRef.value && !disabled()) {\n <div (click)=\"!disabled() && handleClear($event)\" class=\"date-picker-cleaner\" role=\"button\"></div>\n }\n </div>\n <div cDropdownMenu class=\"date-picker-dropdown py-0\">\n <div class=\"date-picker-body\">\n @if (!showRanges) {\n @if (ranges() && customRanges.length > 0) {\n <div class=\"date-picker-ranges\">\n @for (customRange of customRanges; track customRange) {\n <button (click)=\"setCustomRange(customRange)\"\n [color]=\"rangesButtonsColor()\"\n [size]=\"rangesButtonsSize()\"\n [variant]=\"rangesButtonsVariant()\"\n cButton>\n {{ customRange | customRangeKey }}\n </button>\n }\n </div>\n }\n }\n <c-calendar\n (calendarCellHover)=\"handleCalendarCellHover($event)\"\n (calendarDateChange)=\"handleCalendarDateChange($event)\"\n (endDateChange)=\"handleEndDateChange($event)\"\n (startDateChange)=\"handleStartDateChange($event)\"\n [calendarDate]=\"calendarDate()\"\n [calendars]=\"isMobile ? 1 : calendars()\"\n [dateFilter]=\"dateFilter()\"\n [dayFormat]=\"dayFormat()\"\n [disabledDates]=\"disabledDates()\"\n [endDate]=\"endDate()\"\n [firstDayOfWeek]=\"firstDayOfWeek()\"\n [locale]=\"locale()\"\n [maxDate]=\"maxDate()\"\n [minDate]=\"minDate()\"\n [navYearFirst]=\"navYearFirst()\"\n [navigation]=\"navigation()\"\n [range]=\"range()\"\n [selectAdjacentDays]=\"selectAdjacentDays()\"\n [selectionType]=\"selectionType()\"\n [showAdjacentDays]=\"showAdjacentDays()\"\n [showWeekNumber]=\"showWeekNumber()\"\n [startDate]=\"startDate()\"\n [weekNumbersLabel]=\"weekNumbersLabel()\"\n [weekdayFormat]=\"weekdayFormat()\"\n class=\"date-picker-calendars\"\n />\n @if (false && timepicker) {\n <div class=\"date-picker-timepickers\">\n <!-- todo-->\n <c-time-picker\n variant=\"select\"\n [locale]=\"locale()\"\n [disabled]=\"!startDate()\"\n [time]=\"startDate() ?? undefined\"\n (timeChange)=\"handleStartTimeChange($event)\"\n />\n @if (range()) {\n <c-time-picker\n variant=\"select\"\n [locale]=\"locale()\"\n [disabled]=\"!endDate()\"\n [time]=\"endDate() ?? undefined\"\n (timeChange)=\"handleEndTimeChange($event)\"\n />\n }\n </div>\n }\n </div>\n @let footer = templates()?.['datePickerFooter'];\n @if (footer) {\n <div class=\"date-picker-footer\">\n <ng-container *ngTemplateOutlet=\"footer; context: {$implicit: dropdown}\" />\n </div>\n }\n </div>\n <ng-content />\n </c-dropdown>\n</fieldset>\n", styles: [".form-control.date-picker-input:focus{box-shadow:0 0}\n"] }]
|
|
7935
7957
|
}] });
|
|
7936
7958
|
|
|
7937
7959
|
class DatePickerModule {
|