@dintecom/ngx-datetime-picker 22.0.1 → 22.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +23 -2
- package/assets/style/picker.min.css +1 -1
- package/assets/style/picker.min.css.map +1 -1
- package/fesm2022/dintecom-ngx-datetime-picker.mjs +394 -147
- package/fesm2022/dintecom-ngx-datetime-picker.mjs.map +1 -1
- package/package.json +1 -1
- package/types/dintecom-ngx-datetime-picker.d.ts +113 -9
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { Injectable, signal, inject, ChangeDetectorRef, ElementRef, EventEmitter, ViewChild, ChangeDetectionStrategy, Component, InjectionToken, Injector, TemplateRef, LOCALE_ID, input, Input, Optional, Inject, Directive, output, afterNextRender, viewChild, ViewContainerRef, untracked, makeEnvironmentProviders, forwardRef, Renderer2, model, Pipe, NgModule, computed } from '@angular/core';
|
|
3
|
-
import { Subject, Subscription, filter, take, defer,
|
|
3
|
+
import { Subject, Subscription, filter, take, defer, timer, of, merge } from 'rxjs';
|
|
4
4
|
import { DOCUMENT, Location, NgClass, getLocaleFirstDayOfWeek, CommonModule } from '@angular/common';
|
|
5
5
|
import { BasePortalOutlet, CdkPortalOutlet, ComponentPortal, PortalModule } from '@angular/cdk/portal';
|
|
6
6
|
import { NoopScrollStrategy, Overlay, OverlayContainer, OverlayConfig, OverlayModule } from '@angular/cdk/overlay';
|
|
7
7
|
import { ESCAPE, ENTER, PAGE_DOWN, PAGE_UP, END, HOME, DOWN_ARROW, UP_ARROW, RIGHT_ARROW, LEFT_ARROW, SPACE } from '@angular/cdk/keycodes';
|
|
8
8
|
import { coerceBooleanProperty, coerceNumberProperty, coerceArray } from '@angular/cdk/coercion';
|
|
9
|
-
import { startWith,
|
|
9
|
+
import { startWith, debounce, take as take$1, filter as filter$1 } from 'rxjs/operators';
|
|
10
10
|
import { FocusTrapFactory, CdkMonitorFocus, CdkTrapFocus, A11yModule } from '@angular/cdk/a11y';
|
|
11
11
|
import { Platform, PlatformModule } from '@angular/cdk/platform';
|
|
12
12
|
import { NG_VALUE_ACCESSOR, NG_VALIDATORS, Validators } from '@angular/forms';
|
|
@@ -60,10 +60,10 @@ class OwlDateTimeIntl {
|
|
|
60
60
|
hour12AMLabel = 'AM';
|
|
61
61
|
/** A label for the hour12 button (PM) */
|
|
62
62
|
hour12PMLabel = 'PM';
|
|
63
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0
|
|
64
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0
|
|
63
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: OwlDateTimeIntl, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
64
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: OwlDateTimeIntl, providedIn: 'root' });
|
|
65
65
|
}
|
|
66
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0
|
|
66
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: OwlDateTimeIntl, decorators: [{
|
|
67
67
|
type: Injectable,
|
|
68
68
|
args: [{ providedIn: 'root' }]
|
|
69
69
|
}] });
|
|
@@ -425,10 +425,10 @@ class OwlDialogContainerComponent extends BasePortalOutlet {
|
|
|
425
425
|
this.focusTrap.destroy();
|
|
426
426
|
}
|
|
427
427
|
}
|
|
428
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0
|
|
429
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0
|
|
428
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: OwlDialogContainerComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
429
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.1.0", type: OwlDialogContainerComponent, isStandalone: true, selector: "owl-dialog-container", host: { properties: { "class.owl-dialog-container": "owlDialogContainerClass", "attr.tabindex": "owlDialogContainerTabIndex", "attr.id": "owlDialogContainerId", "attr.role": "owlDialogContainerRole", "attr.aria-labelledby": "owlDialogContainerAriaLabelledby", "attr.aria-describedby": "owlDialogContainerAriaDescribedby" } }, viewQueries: [{ propertyName: "portalOutlet", first: true, predicate: CdkPortalOutlet, descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<ng-template [cdkPortalOutlet]></ng-template>\n", dependencies: [{ kind: "directive", type: CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.Eager });
|
|
430
430
|
}
|
|
431
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0
|
|
431
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: OwlDialogContainerComponent, decorators: [{
|
|
432
432
|
type: Component,
|
|
433
433
|
args: [{ selector: 'owl-dialog-container', changeDetection: ChangeDetectionStrategy.Eager, host: {
|
|
434
434
|
'[class.owl-dialog-container]': 'owlDialogContainerClass',
|
|
@@ -682,10 +682,10 @@ class OwlDialogService {
|
|
|
682
682
|
}
|
|
683
683
|
}
|
|
684
684
|
}
|
|
685
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0
|
|
686
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0
|
|
685
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: OwlDialogService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
686
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: OwlDialogService });
|
|
687
687
|
}
|
|
688
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0
|
|
688
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: OwlDialogService, decorators: [{
|
|
689
689
|
type: Injectable
|
|
690
690
|
}], ctorParameters: () => [] });
|
|
691
691
|
/**
|
|
@@ -729,6 +729,13 @@ class DateTimeAdapter {
|
|
|
729
729
|
millisecondsInDay = 86400000;
|
|
730
730
|
/** total milliseconds in a minute. */
|
|
731
731
|
milliseondsInMinute = 60000;
|
|
732
|
+
/**
|
|
733
|
+
* Checks whether the text matches the parse format.
|
|
734
|
+
* Used by the strictFormat input, accepts any text unless an adapter overrides it.
|
|
735
|
+
*/
|
|
736
|
+
isValidFormat(value, parseFormat) {
|
|
737
|
+
return true;
|
|
738
|
+
}
|
|
732
739
|
/**
|
|
733
740
|
* Compare two given dates
|
|
734
741
|
* 1 if the first date is after the second,
|
|
@@ -825,6 +832,43 @@ class DateTimeAdapter {
|
|
|
825
832
|
/** InjectionToken for date time picker that can be used to override default format. */
|
|
826
833
|
const OWL_DATE_TIME_FORMATS = new InjectionToken('OWL_DATE_TIME_FORMATS');
|
|
827
834
|
|
|
835
|
+
function defaultOptionsFactory() {
|
|
836
|
+
return DefaultOptions.create();
|
|
837
|
+
}
|
|
838
|
+
function multiYearOptionsFactory(options) {
|
|
839
|
+
return options.multiYear;
|
|
840
|
+
}
|
|
841
|
+
class DefaultOptions {
|
|
842
|
+
static create() {
|
|
843
|
+
// Always return new instance
|
|
844
|
+
return {
|
|
845
|
+
multiYear: {
|
|
846
|
+
yearRows: 7,
|
|
847
|
+
yearsPerRow: 3
|
|
848
|
+
},
|
|
849
|
+
lazyValidation: false,
|
|
850
|
+
strictFormat: false,
|
|
851
|
+
wrapTimer: false,
|
|
852
|
+
timerInputDebounce: 750
|
|
853
|
+
};
|
|
854
|
+
}
|
|
855
|
+
}
|
|
856
|
+
class OptionsTokens {
|
|
857
|
+
static all = new InjectionToken('All options token');
|
|
858
|
+
static multiYear = new InjectionToken('Grid view options token');
|
|
859
|
+
}
|
|
860
|
+
const optionsProviders = [
|
|
861
|
+
{
|
|
862
|
+
provide: OptionsTokens.all,
|
|
863
|
+
useFactory: defaultOptionsFactory,
|
|
864
|
+
},
|
|
865
|
+
{
|
|
866
|
+
provide: OptionsTokens.multiYear,
|
|
867
|
+
useFactory: multiYearOptionsFactory,
|
|
868
|
+
deps: [OptionsTokens.all],
|
|
869
|
+
},
|
|
870
|
+
];
|
|
871
|
+
|
|
828
872
|
/**
|
|
829
873
|
* date-time.class
|
|
830
874
|
*/
|
|
@@ -838,6 +882,8 @@ var DateView;
|
|
|
838
882
|
class OwlDateTime {
|
|
839
883
|
dateTimeAdapter;
|
|
840
884
|
dateTimeFormats;
|
|
885
|
+
/** Global defaults of the inputs, see provideOwlDateTimeOptions */
|
|
886
|
+
options = inject(OptionsTokens.all, { optional: true });
|
|
841
887
|
/**
|
|
842
888
|
* Whether to show the second's timer
|
|
843
889
|
*/
|
|
@@ -908,6 +954,29 @@ class OwlDateTime {
|
|
|
908
954
|
set stepSecond(val) {
|
|
909
955
|
this._stepSecond = coerceNumberProperty(val, 1);
|
|
910
956
|
}
|
|
957
|
+
/**
|
|
958
|
+
* Whether the hour, minute and second boxes go from the max to the min and back (59 → 0)
|
|
959
|
+
* instead of carrying over to the next hour or day.
|
|
960
|
+
* Defaults to the wrapTimer global option (false).
|
|
961
|
+
*/
|
|
962
|
+
_wrapTimer;
|
|
963
|
+
get wrapTimer() {
|
|
964
|
+
return this._wrapTimer ?? this.options?.wrapTimer ?? false;
|
|
965
|
+
}
|
|
966
|
+
set wrapTimer(val) {
|
|
967
|
+
this._wrapTimer = coerceBooleanProperty(val);
|
|
968
|
+
}
|
|
969
|
+
/**
|
|
970
|
+
* Milliseconds the hour, minute and second boxes wait after typing before applying the value,
|
|
971
|
+
* 0 applies it at once. Defaults to the timerInputDebounce global option (750).
|
|
972
|
+
*/
|
|
973
|
+
_timerInputDebounce = null;
|
|
974
|
+
get timerInputDebounce() {
|
|
975
|
+
return this._timerInputDebounce ?? this.options?.timerInputDebounce ?? 750;
|
|
976
|
+
}
|
|
977
|
+
set timerInputDebounce(val) {
|
|
978
|
+
this._timerInputDebounce = coerceNumberProperty(val, null);
|
|
979
|
+
}
|
|
911
980
|
/**
|
|
912
981
|
* Set the first day of week
|
|
913
982
|
*/
|
|
@@ -994,10 +1063,10 @@ class OwlDateTime {
|
|
|
994
1063
|
? obj
|
|
995
1064
|
: null;
|
|
996
1065
|
}
|
|
997
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0
|
|
998
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0
|
|
1066
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: OwlDateTime, deps: [{ token: DateTimeAdapter, optional: true }, { token: OWL_DATE_TIME_FORMATS, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1067
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.0", type: OwlDateTime, isStandalone: true, inputs: { showSecondsTimer: { classPropertyName: "showSecondsTimer", publicName: "showSecondsTimer", isSignal: false, isRequired: false, transformFunction: null }, hour12Timer: { classPropertyName: "hour12Timer", publicName: "hour12Timer", isSignal: false, isRequired: false, transformFunction: null }, startView: { classPropertyName: "startView", publicName: "startView", isSignal: true, isRequired: false, transformFunction: null }, showCalendarWeeks: { classPropertyName: "showCalendarWeeks", publicName: "showCalendarWeeks", isSignal: true, isRequired: false, transformFunction: null }, yearOnly: { classPropertyName: "yearOnly", publicName: "yearOnly", isSignal: true, isRequired: false, transformFunction: null }, multiyearOnly: { classPropertyName: "multiyearOnly", publicName: "multiyearOnly", isSignal: true, isRequired: false, transformFunction: null }, stepHour: { classPropertyName: "stepHour", publicName: "stepHour", isSignal: false, isRequired: false, transformFunction: null }, stepMinute: { classPropertyName: "stepMinute", publicName: "stepMinute", isSignal: false, isRequired: false, transformFunction: null }, stepSecond: { classPropertyName: "stepSecond", publicName: "stepSecond", isSignal: false, isRequired: false, transformFunction: null }, wrapTimer: { classPropertyName: "wrapTimer", publicName: "wrapTimer", isSignal: false, isRequired: false, transformFunction: null }, timerInputDebounce: { classPropertyName: "timerInputDebounce", publicName: "timerInputDebounce", isSignal: false, isRequired: false, transformFunction: null }, firstDayOfWeek: { classPropertyName: "firstDayOfWeek", publicName: "firstDayOfWeek", isSignal: false, isRequired: false, transformFunction: null }, hideOtherMonths: { classPropertyName: "hideOtherMonths", publicName: "hideOtherMonths", isSignal: false, isRequired: false, transformFunction: null } }, ngImport: i0 });
|
|
999
1068
|
}
|
|
1000
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0
|
|
1069
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: OwlDateTime, decorators: [{
|
|
1001
1070
|
type: Directive
|
|
1002
1071
|
}], ctorParameters: () => [{ type: DateTimeAdapter, decorators: [{
|
|
1003
1072
|
type: Optional
|
|
@@ -1016,6 +1085,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
|
|
|
1016
1085
|
type: Input
|
|
1017
1086
|
}], stepSecond: [{
|
|
1018
1087
|
type: Input
|
|
1088
|
+
}], wrapTimer: [{
|
|
1089
|
+
type: Input
|
|
1090
|
+
}], timerInputDebounce: [{
|
|
1091
|
+
type: Input
|
|
1019
1092
|
}], firstDayOfWeek: [{
|
|
1020
1093
|
type: Input
|
|
1021
1094
|
}], hideOtherMonths: [{
|
|
@@ -1165,10 +1238,10 @@ class OwlCalendarBodyComponent {
|
|
|
1165
1238
|
}
|
|
1166
1239
|
}, { injector: this.injector });
|
|
1167
1240
|
}
|
|
1168
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0
|
|
1169
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0
|
|
1241
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: OwlCalendarBodyComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1242
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.0", type: OwlCalendarBodyComponent, isStandalone: true, selector: "[owl-date-time-calendar-body]", inputs: { activeCell: { classPropertyName: "activeCell", publicName: "activeCell", isSignal: true, isRequired: false, transformFunction: null }, rows: { classPropertyName: "rows", publicName: "rows", isSignal: true, isRequired: false, transformFunction: null }, numCols: { classPropertyName: "numCols", publicName: "numCols", isSignal: true, isRequired: false, transformFunction: null }, cellRatio: { classPropertyName: "cellRatio", publicName: "cellRatio", isSignal: true, isRequired: false, transformFunction: null }, todayValue: { classPropertyName: "todayValue", publicName: "todayValue", isSignal: true, isRequired: false, transformFunction: null }, selectedValues: { classPropertyName: "selectedValues", publicName: "selectedValues", isSignal: true, isRequired: false, transformFunction: null }, selectMode: { classPropertyName: "selectMode", publicName: "selectMode", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { select: "select" }, host: { properties: { "class.owl-dt-calendar-body": "owlDTCalendarBodyClass" } }, exportAs: ["owlDateTimeCalendarBody"], ngImport: i0, template: "@for (row of rows(); track $index; let rowIndex = $index) {\n <tr role=\"row\">\n @for (item of row; track $index; let colIndex = $index) {\n <td\n class=\"owl-dt-calendar-cell {{ item.cellClass }}\"\n [tabindex]=\"isActiveCell(rowIndex, colIndex) ? 0 : -1\"\n [class.owl-dt-calendar-cell-active]=\"\n isActiveCell(rowIndex, colIndex)\n \"\n [class.owl-dt-calendar-cell-disabled]=\"!item.enabled\"\n [class.owl-dt-calendar-cell-in-range]=\"isInRange(item.value)\"\n [class.owl-dt-calendar-cell-range-from]=\"\n isRangeFrom(item.value)\n \"\n [class.owl-dt-calendar-cell-range-to]=\"isRangeTo(item.value)\"\n [attr.aria-label]=\"item.ariaLabel\"\n [attr.aria-disabled]=\"!item.enabled || null\"\n [attr.aria-current]=\"item.value === todayValue() ? 'date' : null\"\n [attr.aria-selected]=\"isSelected(item.value)\"\n [style.width.%]=\"100 / numCols()\"\n [style.paddingTop.%]=\"(50 * cellRatio()) / numCols()\"\n [style.paddingBottom.%]=\"(50 * cellRatio()) / numCols()\"\n (click)=\"selectCell(item)\"\n >\n <span\n class=\"owl-dt-calendar-cell-content\"\n [ngClass]=\"{\n 'owl-dt-calendar-cell-out': item.out,\n 'owl-dt-calendar-cell-today': item.value === todayValue(),\n 'owl-dt-calendar-cell-selected': isSelected(item.value),\n }\"\n >\n {{ item.displayValue }}\n </span>\n </td>\n }\n </tr>\n}\n", styles: [""], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1170
1243
|
}
|
|
1171
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0
|
|
1244
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: OwlCalendarBodyComponent, decorators: [{
|
|
1172
1245
|
type: Component,
|
|
1173
1246
|
args: [{ selector: '[owl-date-time-calendar-body]', exportAs: 'owlDateTimeCalendarBody', host: {
|
|
1174
1247
|
'[class.owl-dt-calendar-body]': 'owlDTCalendarBodyClass'
|
|
@@ -1630,10 +1703,10 @@ class OwlMonthViewComponent {
|
|
|
1630
1703
|
focusActiveCell() {
|
|
1631
1704
|
this.calendarBodyElm().focusActiveCell();
|
|
1632
1705
|
}
|
|
1633
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0
|
|
1634
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0
|
|
1706
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: OwlMonthViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1707
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.0", type: OwlMonthViewComponent, isStandalone: true, selector: "owl-date-time-month-view", inputs: { hideOtherMonths: { classPropertyName: "hideOtherMonths", publicName: "hideOtherMonths", isSignal: true, isRequired: false, transformFunction: null }, showCalendarWeeks: { classPropertyName: "showCalendarWeeks", publicName: "showCalendarWeeks", isSignal: true, isRequired: false, transformFunction: null }, firstDayOfWeek: { classPropertyName: "firstDayOfWeek", publicName: "firstDayOfWeek", isSignal: false, isRequired: false, transformFunction: null }, selectMode: { classPropertyName: "selectMode", publicName: "selectMode", isSignal: false, isRequired: false, transformFunction: null }, selected: { classPropertyName: "selected", publicName: "selected", isSignal: false, isRequired: false, transformFunction: null }, selecteds: { classPropertyName: "selecteds", publicName: "selecteds", isSignal: false, isRequired: false, transformFunction: null }, pickerMoment: { classPropertyName: "pickerMoment", publicName: "pickerMoment", isSignal: false, isRequired: false, transformFunction: null }, dateFilter: { classPropertyName: "dateFilter", publicName: "dateFilter", isSignal: false, isRequired: false, transformFunction: null }, minDate: { classPropertyName: "minDate", publicName: "minDate", isSignal: false, isRequired: false, transformFunction: null }, maxDate: { classPropertyName: "maxDate", publicName: "maxDate", isSignal: false, isRequired: false, transformFunction: null } }, outputs: { selectedChange: "selectedChange", userSelection: "userSelection", pickerMomentChange: "pickerMomentChange" }, host: { properties: { "class.owl-dt-calendar-view": "owlDTCalendarView" } }, viewQueries: [{ propertyName: "calendarBodyElm", first: true, predicate: OwlCalendarBodyComponent, descendants: true, isSignal: true }], exportAs: ["owlYearView"], ngImport: i0, template: "@if (showCalendarWeeks()) {\n <ul class=\"week-number\">\n @for (week of weekNumbers; track week) {\n <li>\n <span>{{ week }}</span>\n </li>\n }\n </ul>\n}\n<table\n class=\"owl-dt-calendar-table owl-dt-calendar-month-table\"\n [ngClass]=\"{ 'owl-calendar-weeks': showCalendarWeeks() }\"\n [class.owl-dt-calendar-only-current-month]=\"hideOtherMonths()\"\n>\n <thead class=\"owl-dt-calendar-header\">\n <tr class=\"owl-dt-weekdays\">\n @for (weekday of weekdays; track weekday.short) {\n <th\n [attr.aria-label]=\"weekday.long\"\n class=\"owl-dt-weekday\"\n scope=\"col\"\n >\n <span>{{ weekday.short }}</span>\n </th>\n }\n </tr>\n <tr>\n <th\n class=\"owl-dt-calendar-table-divider\"\n [ngClass]=\"{ 'owl-calendar-weeks': showCalendarWeeks() }\"\n aria-hidden=\"true\"\n colspan=\"7\"\n ></th>\n </tr>\n </thead>\n <tbody\n owl-date-time-calendar-body\n role=\"grid\"\n [rows]=\"days\"\n [todayValue]=\"todayDate\"\n [selectedValues]=\"selectedDates\"\n [selectMode]=\"selectMode\"\n [activeCell]=\"activeCell\"\n (keydown)=\"handleCalendarKeydown($event)\"\n (select)=\"selectCalendarCell($event)\"\n ></tbody>\n</table>\n", styles: [".week-number{display:flex;flex-direction:column;justify-content:space-between;margin:46px 0 14px;padding:0;list-style:none;border-right:1px solid rgba(0,0,0,.12);width:8%;font-weight:700}.week-number li{font-size:.8em}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: OwlCalendarBodyComponent, selector: "[owl-date-time-calendar-body]", inputs: ["activeCell", "rows", "numCols", "cellRatio", "todayValue", "selectedValues", "selectMode"], outputs: ["select"], exportAs: ["owlDateTimeCalendarBody"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1635
1708
|
}
|
|
1636
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0
|
|
1709
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: OwlMonthViewComponent, decorators: [{
|
|
1637
1710
|
type: Component,
|
|
1638
1711
|
args: [{ selector: 'owl-date-time-month-view', exportAs: 'owlYearView', host: {
|
|
1639
1712
|
'[class.owl-dt-calendar-view]': 'owlDTCalendarView'
|
|
@@ -1994,10 +2067,10 @@ class OwlYearViewComponent {
|
|
|
1994
2067
|
focusActiveCell() {
|
|
1995
2068
|
this.calendarBodyElm().focusActiveCell();
|
|
1996
2069
|
}
|
|
1997
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0
|
|
1998
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.0
|
|
2070
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: OwlYearViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2071
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.1.0", type: OwlYearViewComponent, isStandalone: true, selector: "owl-date-time-year-view", inputs: { selectMode: "selectMode", selected: "selected", selecteds: "selecteds", pickerMoment: "pickerMoment", dateFilter: "dateFilter", minDate: "minDate", maxDate: "maxDate" }, outputs: { change: "change", monthSelected: "monthSelected", pickerMomentChange: "pickerMomentChange", keyboardEnter: "keyboardEnter" }, host: { properties: { "class.owl-dt-calendar-view": "owlDTCalendarView" } }, viewQueries: [{ propertyName: "calendarBodyElm", first: true, predicate: OwlCalendarBodyComponent, descendants: true, isSignal: true }], exportAs: ["owlMonthView"], ngImport: i0, template: "<table class=\"owl-dt-calendar-table owl-dt-calendar-year-table\">\n <thead class=\"owl-dt-calendar-header\">\n <tr>\n <th class=\"owl-dt-calendar-table-divider\" aria-hidden=\"true\" colspan=\"3\"></th>\n </tr>\n </thead>\n <tbody owl-date-time-calendar-body role=\"grid\"\n [rows]=\"months\" [numCols]=\"3\" [cellRatio]=\"3 / 7\"\n [activeCell]=\"activeCell\"\n [todayValue]=\"todayMonth\"\n [selectedValues]=\"selectedMonths\"\n [selectMode]=\"selectMode\"\n (keydown)=\"handleCalendarKeydown($event)\"\n (select)=\"selectCalendarCell($event)\">\n </tbody>\n</table>\n", styles: [""], dependencies: [{ kind: "component", type: OwlCalendarBodyComponent, selector: "[owl-date-time-calendar-body]", inputs: ["activeCell", "rows", "numCols", "cellRatio", "todayValue", "selectedValues", "selectMode"], outputs: ["select"], exportAs: ["owlDateTimeCalendarBody"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1999
2072
|
}
|
|
2000
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0
|
|
2073
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: OwlYearViewComponent, decorators: [{
|
|
2001
2074
|
type: Component,
|
|
2002
2075
|
args: [{ selector: 'owl-date-time-year-view', exportAs: 'owlMonthView', host: {
|
|
2003
2076
|
'[class.owl-dt-calendar-view]': 'owlDTCalendarView'
|
|
@@ -2018,39 +2091,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
|
|
|
2018
2091
|
type: Input
|
|
2019
2092
|
}], change: [{ type: i0.Output, args: ["change"] }], monthSelected: [{ type: i0.Output, args: ["monthSelected"] }], pickerMomentChange: [{ type: i0.Output, args: ["pickerMomentChange"] }], keyboardEnter: [{ type: i0.Output, args: ["keyboardEnter"] }], calendarBodyElm: [{ type: i0.ViewChild, args: [i0.forwardRef(() => OwlCalendarBodyComponent), { isSignal: true }] }] } });
|
|
2020
2093
|
|
|
2021
|
-
function defaultOptionsFactory() {
|
|
2022
|
-
return DefaultOptions.create();
|
|
2023
|
-
}
|
|
2024
|
-
function multiYearOptionsFactory(options) {
|
|
2025
|
-
return options.multiYear;
|
|
2026
|
-
}
|
|
2027
|
-
class DefaultOptions {
|
|
2028
|
-
static create() {
|
|
2029
|
-
// Always return new instance
|
|
2030
|
-
return {
|
|
2031
|
-
multiYear: {
|
|
2032
|
-
yearRows: 7,
|
|
2033
|
-
yearsPerRow: 3
|
|
2034
|
-
}
|
|
2035
|
-
};
|
|
2036
|
-
}
|
|
2037
|
-
}
|
|
2038
|
-
class OptionsTokens {
|
|
2039
|
-
static all = new InjectionToken('All options token');
|
|
2040
|
-
static multiYear = new InjectionToken('Grid view options token');
|
|
2041
|
-
}
|
|
2042
|
-
const optionsProviders = [
|
|
2043
|
-
{
|
|
2044
|
-
provide: OptionsTokens.all,
|
|
2045
|
-
useFactory: defaultOptionsFactory,
|
|
2046
|
-
},
|
|
2047
|
-
{
|
|
2048
|
-
provide: OptionsTokens.multiYear,
|
|
2049
|
-
useFactory: multiYearOptionsFactory,
|
|
2050
|
-
deps: [OptionsTokens.all],
|
|
2051
|
-
},
|
|
2052
|
-
];
|
|
2053
|
-
|
|
2054
2094
|
/**
|
|
2055
2095
|
* calendar-multi-year-view.component
|
|
2056
2096
|
*/
|
|
@@ -2378,10 +2418,10 @@ class OwlMultiYearViewComponent {
|
|
|
2378
2418
|
focusActiveCell() {
|
|
2379
2419
|
this.calendarBodyElm().focusActiveCell();
|
|
2380
2420
|
}
|
|
2381
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0
|
|
2382
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.0
|
|
2421
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: OwlMultiYearViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2422
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.1.0", type: OwlMultiYearViewComponent, isStandalone: true, selector: "owl-date-time-multi-year-view", inputs: { selectMode: "selectMode", selected: "selected", selecteds: "selecteds", pickerMoment: "pickerMoment", dateFilter: "dateFilter", minDate: "minDate", maxDate: "maxDate" }, outputs: { change: "change", yearSelected: "yearSelected", pickerMomentChange: "pickerMomentChange", keyboardEnter: "keyboardEnter" }, host: { properties: { "class.owl-dt-calendar-view": "owlDTCalendarView", "class.owl-dt-calendar-multi-year-view": "owlDTCalendarMultiYearView" } }, viewQueries: [{ propertyName: "calendarBodyElm", first: true, predicate: OwlCalendarBodyComponent, descendants: true, isSignal: true }], ngImport: i0, template: "<button class=\"owl-dt-control-button owl-dt-control-arrow-button\"\n [disabled]=\"!previousEnabled()\" [attr.aria-label]=\"prevButtonLabel\"\n type=\"button\" tabindex=\"0\" (click)=\"prevYearList($event)\">\n <span class=\"owl-dt-control-button-content\" tabindex=\"-1\">\n <!-- <editor-fold desc=\"SVG Arrow Left\"> -->\n <svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\"\n version=\"1.1\" x=\"0px\" y=\"0px\" viewBox=\"0 0 250.738 250.738\"\n style=\"enable-background:new 0 0 250.738 250.738;\" xml:space=\"preserve\"\n width=\"100%\" height=\"100%\">\n <path style=\"fill-rule: evenodd; clip-rule: evenodd;\" d=\"M96.633,125.369l95.053-94.533c7.101-7.055,7.101-18.492,0-25.546 c-7.1-7.054-18.613-7.054-25.714,0L58.989,111.689c-3.784,3.759-5.487,8.759-5.238,13.68c-0.249,4.922,1.454,9.921,5.238,13.681 l106.983,106.398c7.101,7.055,18.613,7.055,25.714,0c7.101-7.054,7.101-18.491,0-25.544L96.633,125.369z\"/>\n </svg>\n <!-- </editor-fold> -->\n </span>\n</button>\n<table class=\"owl-dt-calendar-table owl-dt-calendar-multi-year-table\">\n <thead class=\"owl-dt-calendar-header\">\n <tr>\n <th colspan=\"3\">{{tableHeader}}</th>\n </tr>\n </thead>\n <tbody owl-date-time-calendar-body role=\"grid\"\n [rows]=\"years\" [numCols]=\"3\" [cellRatio]=\"3 / 7\"\n [activeCell]=\"activeCell\"\n [todayValue]=\"todayYear\"\n [selectedValues]=\"selectedYears\"\n [selectMode]=\"selectMode\"\n (keydown)=\"handleCalendarKeydown($event)\"\n (select)=\"selectCalendarCell($event)\"></tbody>\n</table>\n<button class=\"owl-dt-control-button owl-dt-control-arrow-button\"\n [disabled]=\"!nextEnabled()\" [attr.aria-label]=\"nextButtonLabel\"\n type=\"button\" tabindex=\"0\" (click)=\"nextYearList($event)\">\n <span class=\"owl-dt-control-button-content\" tabindex=\"-1\">\n <!-- <editor-fold desc=\"SVG Arrow Right\"> -->\n <svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\"\n viewBox=\"0 0 250.738 250.738\" style=\"enable-background:new 0 0 250.738 250.738;\" xml:space=\"preserve\">\n <path style=\"fill-rule:evenodd;clip-rule:evenodd;\" d=\"M191.75,111.689L84.766,5.291c-7.1-7.055-18.613-7.055-25.713,0\n c-7.101,7.054-7.101,18.49,0,25.544l95.053,94.534l-95.053,94.533c-7.101,7.054-7.101,18.491,0,25.545\n c7.1,7.054,18.613,7.054,25.713,0L191.75,139.05c3.784-3.759,5.487-8.759,5.238-13.681\n C197.237,120.447,195.534,115.448,191.75,111.689z\"/>\n </svg>\n <!-- </editor-fold> -->\n </span>\n</button>\n", styles: [""], dependencies: [{ kind: "component", type: OwlCalendarBodyComponent, selector: "[owl-date-time-calendar-body]", inputs: ["activeCell", "rows", "numCols", "cellRatio", "todayValue", "selectedValues", "selectMode"], outputs: ["select"], exportAs: ["owlDateTimeCalendarBody"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2383
2423
|
}
|
|
2384
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0
|
|
2424
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: OwlMultiYearViewComponent, decorators: [{
|
|
2385
2425
|
type: Component,
|
|
2386
2426
|
args: [{ selector: 'owl-date-time-multi-year-view', host: {
|
|
2387
2427
|
'[class.owl-dt-calendar-view]': 'owlDTCalendarView',
|
|
@@ -2759,10 +2799,10 @@ class OwlCalendarComponent {
|
|
|
2759
2799
|
? obj
|
|
2760
2800
|
: null;
|
|
2761
2801
|
}
|
|
2762
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0
|
|
2763
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: OwlCalendarComponent, isStandalone: true, selector: "owl-date-time-calendar", inputs: { minDate: { classPropertyName: "minDate", publicName: "minDate", isSignal: false, isRequired: false, transformFunction: null }, maxDate: { classPropertyName: "maxDate", publicName: "maxDate", isSignal: false, isRequired: false, transformFunction: null }, pickerMoment: { classPropertyName: "pickerMoment", publicName: "pickerMoment", isSignal: false, isRequired: false, transformFunction: null }, selected: { classPropertyName: "selected", publicName: "selected", isSignal: false, isRequired: false, transformFunction: null }, selecteds: { classPropertyName: "selecteds", publicName: "selecteds", isSignal: false, isRequired: false, transformFunction: null }, dateFilter: { classPropertyName: "dateFilter", publicName: "dateFilter", isSignal: true, isRequired: false, transformFunction: null }, firstDayOfWeek: { classPropertyName: "firstDayOfWeek", publicName: "firstDayOfWeek", isSignal: true, isRequired: false, transformFunction: null }, selectMode: { classPropertyName: "selectMode", publicName: "selectMode", isSignal: true, isRequired: false, transformFunction: null }, startView: { classPropertyName: "startView", publicName: "startView", isSignal: true, isRequired: false, transformFunction: null }, yearOnly: { classPropertyName: "yearOnly", publicName: "yearOnly", isSignal: true, isRequired: false, transformFunction: null }, showCalendarWeeks: { classPropertyName: "showCalendarWeeks", publicName: "showCalendarWeeks", isSignal: true, isRequired: false, transformFunction: null }, multiyearOnly: { classPropertyName: "multiyearOnly", publicName: "multiyearOnly", isSignal: true, isRequired: false, transformFunction: null }, hideOtherMonths: { classPropertyName: "hideOtherMonths", publicName: "hideOtherMonths", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { pickerMomentChange: "pickerMomentChange", dateClicked: "dateClicked", selectedChange: "selectedChange", userSelection: "userSelection", yearSelected: "yearSelected", monthSelected: "monthSelected" }, host: { properties: { "class.owl-dt-calendar": "owlDTCalendarClass" } }, exportAs: ["owlDateTimeCalendar"], ngImport: i0, template: "<div class=\"owl-dt-calendar-control\">\n <!-- focus when keyboard tab (http://kizu.ru/en/blog/keyboard-only-focus/#x) -->\n <button\n class=\"owl-dt-control owl-dt-control-button owl-dt-control-arrow-button\"\n type=\"button\"\n tabindex=\"0\"\n [style.visibility]=\"showControlArrows ? 'visible' : 'hidden'\"\n [disabled]=\"!prevButtonEnabled()\"\n [attr.aria-label]=\"prevButtonLabel\"\n (click)=\"previousClicked()\"\n >\n <span\n class=\"owl-dt-control-content owl-dt-control-button-content\"\n tabindex=\"-1\"\n >\n <!-- <editor-fold desc=\"SVG Arrow Left\"> -->\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n xmlns:xlink=\"http://www.w3.org/1999/xlink\"\n version=\"1.1\"\n x=\"0px\"\n y=\"0px\"\n viewBox=\"0 0 250.738 250.738\"\n style=\"enable-background: new 0 0 250.738 250.738\"\n xml:space=\"preserve\"\n width=\"100%\"\n height=\"100%\"\n >\n <path\n style=\"fill-rule: evenodd; clip-rule: evenodd\"\n d=\"M96.633,125.369l95.053-94.533c7.101-7.055,7.101-18.492,0-25.546 c-7.1-7.054-18.613-7.054-25.714,0L58.989,111.689c-3.784,3.759-5.487,8.759-5.238,13.68c-0.249,4.922,1.454,9.921,5.238,13.681 l106.983,106.398c7.101,7.055,18.613,7.055,25.714,0c7.101-7.054,7.101-18.491,0-25.544L96.633,125.369z\"\n />\n </svg>\n <!-- </editor-fold> -->\n </span>\n </button>\n <div class=\"owl-dt-calendar-control-content\">\n <button\n class=\"owl-dt-control owl-dt-control-button owl-dt-control-period-button\"\n type=\"button\"\n tabindex=\"0\"\n [attr.aria-label]=\"periodButtonLabel\"\n (click)=\"toggleViews()\"\n >\n <span\n class=\"owl-dt-control-content owl-dt-control-button-content\"\n tabindex=\"-1\"\n >\n {{ periodButtonText }}\n\n <span\n class=\"owl-dt-control-button-arrow\"\n [style.transform]=\"\n 'rotate(' + (isMonthView ? 0 : 180) + 'deg)'\n \"\n >\n <!-- <editor-fold desc=\"SVG Arrow\"> -->\n <svg\n version=\"1.1\"\n xmlns=\"http://www.w3.org/2000/svg\"\n xmlns:xlink=\"http://www.w3.org/1999/xlink\"\n x=\"0px\"\n y=\"0px\"\n width=\"50%\"\n height=\"50%\"\n viewBox=\"0 0 292.362 292.362\"\n style=\"enable-background: new 0 0 292.362 292.362\"\n xml:space=\"preserve\"\n >\n <g>\n <path\n d=\"M286.935,69.377c-3.614-3.617-7.898-5.424-12.848-5.424H18.274c-4.952,0-9.233,1.807-12.85,5.424\n C1.807,72.998,0,77.279,0,82.228c0,4.948,1.807,9.229,5.424,12.847l127.907,127.907c3.621,3.617,7.902,5.428,12.85,5.428\n s9.233-1.811,12.847-5.428L286.935,95.074c3.613-3.617,5.427-7.898,5.427-12.847C292.362,77.279,290.548,72.998,286.935,69.377z\"\n />\n </g>\n </svg>\n <!-- </editor-fold> -->\n </span>\n </span>\n </button>\n </div>\n <button\n class=\"owl-dt-control owl-dt-control-button owl-dt-control-arrow-button\"\n type=\"button\"\n tabindex=\"0\"\n [style.visibility]=\"showControlArrows ? 'visible' : 'hidden'\"\n [disabled]=\"!nextButtonEnabled()\"\n [attr.aria-label]=\"nextButtonLabel\"\n (click)=\"nextClicked()\"\n >\n <span\n class=\"owl-dt-control-content owl-dt-control-button-content\"\n tabindex=\"-1\"\n >\n <!-- <editor-fold desc=\"SVG Arrow Right\"> -->\n <svg\n version=\"1.1\"\n xmlns=\"http://www.w3.org/2000/svg\"\n xmlns:xlink=\"http://www.w3.org/1999/xlink\"\n x=\"0px\"\n y=\"0px\"\n viewBox=\"0 0 250.738 250.738\"\n style=\"enable-background: new 0 0 250.738 250.738\"\n xml:space=\"preserve\"\n >\n <path\n style=\"fill-rule: evenodd; clip-rule: evenodd\"\n d=\"M191.75,111.689L84.766,5.291c-7.1-7.055-18.613-7.055-25.713,0\n c-7.101,7.054-7.101,18.49,0,25.544l95.053,94.534l-95.053,94.533c-7.101,7.054-7.101,18.491,0,25.545\n c7.1,7.054,18.613,7.054,25.713,0L191.75,139.05c3.784-3.759,5.487-8.759,5.238-13.681\n C197.237,120.447,195.534,115.448,191.75,111.689z\"\n />\n </svg>\n <!-- </editor-fold> -->\n </span>\n </button>\n</div>\n<div class=\"owl-dt-calendar-main\" cdkMonitorSubtreeFocus tabindex=\"-1\">\n @switch (currentView) {\n @case (DateView.MONTH) {\n <owl-date-time-month-view\n [pickerMoment]=\"pickerMoment\"\n [firstDayOfWeek]=\"firstDayOfWeek()\"\n [selected]=\"selected\"\n [selecteds]=\"selecteds\"\n [selectMode]=\"selectMode()\"\n [minDate]=\"minDate\"\n [showCalendarWeeks]=\"showCalendarWeeks()\"\n [maxDate]=\"maxDate\"\n [dateFilter]=\"dateFilter()\"\n [hideOtherMonths]=\"hideOtherMonths()\"\n (pickerMomentChange)=\"handlePickerMomentChange($event)\"\n (selectedChange)=\"dateSelected($event)\"\n (userSelection)=\"userSelected()\"\n ></owl-date-time-month-view>\n }\n @case (DateView.YEAR) {\n <owl-date-time-year-view\n [pickerMoment]=\"pickerMoment\"\n [selected]=\"selected\"\n [selecteds]=\"selecteds\"\n [selectMode]=\"selectMode()\"\n [minDate]=\"minDate\"\n [maxDate]=\"maxDate\"\n [dateFilter]=\"dateFilter()\"\n (keyboardEnter)=\"focusActiveCell()\"\n (pickerMomentChange)=\"handlePickerMomentChange($event)\"\n (monthSelected)=\"selectMonthInYearView($event)\"\n (change)=\"goToDateInView($event, DateView.MONTH)\"\n ></owl-date-time-year-view>\n }\n @case (DateView.MULTI_YEARS) {\n <owl-date-time-multi-year-view\n [pickerMoment]=\"pickerMoment\"\n [selected]=\"selected\"\n [selecteds]=\"selecteds\"\n [selectMode]=\"selectMode()\"\n [minDate]=\"minDate\"\n [maxDate]=\"maxDate\"\n [dateFilter]=\"dateFilter()\"\n (keyboardEnter)=\"focusActiveCell()\"\n (pickerMomentChange)=\"handlePickerMomentChange($event)\"\n (yearSelected)=\"selectYearInMultiYearView($event)\"\n (change)=\"goToDateInView($event, DateView.YEAR)\"\n ></owl-date-time-multi-year-view>\n }\n }\n</div>\n", styles: [""], dependencies: [{ kind: "directive", type: CdkMonitorFocus, selector: "[cdkMonitorElementFocus], [cdkMonitorSubtreeFocus]", outputs: ["cdkFocusChange"], exportAs: ["cdkMonitorFocus"] }, { kind: "component", type: OwlMonthViewComponent, selector: "owl-date-time-month-view", inputs: ["hideOtherMonths", "showCalendarWeeks", "firstDayOfWeek", "selectMode", "selected", "selecteds", "pickerMoment", "dateFilter", "minDate", "maxDate"], outputs: ["selectedChange", "userSelection", "pickerMomentChange"], exportAs: ["owlYearView"] }, { kind: "component", type: OwlYearViewComponent, selector: "owl-date-time-year-view", inputs: ["selectMode", "selected", "selecteds", "pickerMoment", "dateFilter", "minDate", "maxDate"], outputs: ["change", "monthSelected", "pickerMomentChange", "keyboardEnter"], exportAs: ["owlMonthView"] }, { kind: "component", type: OwlMultiYearViewComponent, selector: "owl-date-time-multi-year-view", inputs: ["selectMode", "selected", "selecteds", "pickerMoment", "dateFilter", "minDate", "maxDate"], outputs: ["change", "yearSelected", "pickerMomentChange", "keyboardEnter"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2802
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: OwlCalendarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2803
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.0", type: OwlCalendarComponent, isStandalone: true, selector: "owl-date-time-calendar", inputs: { minDate: { classPropertyName: "minDate", publicName: "minDate", isSignal: false, isRequired: false, transformFunction: null }, maxDate: { classPropertyName: "maxDate", publicName: "maxDate", isSignal: false, isRequired: false, transformFunction: null }, pickerMoment: { classPropertyName: "pickerMoment", publicName: "pickerMoment", isSignal: false, isRequired: false, transformFunction: null }, selected: { classPropertyName: "selected", publicName: "selected", isSignal: false, isRequired: false, transformFunction: null }, selecteds: { classPropertyName: "selecteds", publicName: "selecteds", isSignal: false, isRequired: false, transformFunction: null }, dateFilter: { classPropertyName: "dateFilter", publicName: "dateFilter", isSignal: true, isRequired: false, transformFunction: null }, firstDayOfWeek: { classPropertyName: "firstDayOfWeek", publicName: "firstDayOfWeek", isSignal: true, isRequired: false, transformFunction: null }, selectMode: { classPropertyName: "selectMode", publicName: "selectMode", isSignal: true, isRequired: false, transformFunction: null }, startView: { classPropertyName: "startView", publicName: "startView", isSignal: true, isRequired: false, transformFunction: null }, yearOnly: { classPropertyName: "yearOnly", publicName: "yearOnly", isSignal: true, isRequired: false, transformFunction: null }, showCalendarWeeks: { classPropertyName: "showCalendarWeeks", publicName: "showCalendarWeeks", isSignal: true, isRequired: false, transformFunction: null }, multiyearOnly: { classPropertyName: "multiyearOnly", publicName: "multiyearOnly", isSignal: true, isRequired: false, transformFunction: null }, hideOtherMonths: { classPropertyName: "hideOtherMonths", publicName: "hideOtherMonths", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { pickerMomentChange: "pickerMomentChange", dateClicked: "dateClicked", selectedChange: "selectedChange", userSelection: "userSelection", yearSelected: "yearSelected", monthSelected: "monthSelected" }, host: { properties: { "class.owl-dt-calendar": "owlDTCalendarClass" } }, exportAs: ["owlDateTimeCalendar"], ngImport: i0, template: "<div class=\"owl-dt-calendar-control\">\n <!-- focus when keyboard tab (http://kizu.ru/en/blog/keyboard-only-focus/#x) -->\n <button\n class=\"owl-dt-control owl-dt-control-button owl-dt-control-arrow-button\"\n type=\"button\"\n tabindex=\"0\"\n [style.visibility]=\"showControlArrows ? 'visible' : 'hidden'\"\n [disabled]=\"!prevButtonEnabled()\"\n [attr.aria-label]=\"prevButtonLabel\"\n (click)=\"previousClicked()\"\n >\n <span\n class=\"owl-dt-control-content owl-dt-control-button-content\"\n tabindex=\"-1\"\n >\n <!-- <editor-fold desc=\"SVG Arrow Left\"> -->\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n xmlns:xlink=\"http://www.w3.org/1999/xlink\"\n version=\"1.1\"\n x=\"0px\"\n y=\"0px\"\n viewBox=\"0 0 250.738 250.738\"\n style=\"enable-background: new 0 0 250.738 250.738\"\n xml:space=\"preserve\"\n width=\"100%\"\n height=\"100%\"\n >\n <path\n style=\"fill-rule: evenodd; clip-rule: evenodd\"\n d=\"M96.633,125.369l95.053-94.533c7.101-7.055,7.101-18.492,0-25.546 c-7.1-7.054-18.613-7.054-25.714,0L58.989,111.689c-3.784,3.759-5.487,8.759-5.238,13.68c-0.249,4.922,1.454,9.921,5.238,13.681 l106.983,106.398c7.101,7.055,18.613,7.055,25.714,0c7.101-7.054,7.101-18.491,0-25.544L96.633,125.369z\"\n />\n </svg>\n <!-- </editor-fold> -->\n </span>\n </button>\n <div class=\"owl-dt-calendar-control-content\">\n <button\n class=\"owl-dt-control owl-dt-control-button owl-dt-control-period-button\"\n type=\"button\"\n tabindex=\"0\"\n [attr.aria-label]=\"periodButtonLabel\"\n (click)=\"toggleViews()\"\n >\n <span\n class=\"owl-dt-control-content owl-dt-control-button-content\"\n tabindex=\"-1\"\n >\n {{ periodButtonText }}\n\n <span\n class=\"owl-dt-control-button-arrow\"\n [style.transform]=\"\n 'rotate(' + (isMonthView ? 0 : 180) + 'deg)'\n \"\n >\n <!-- <editor-fold desc=\"SVG Arrow\"> -->\n <svg\n version=\"1.1\"\n xmlns=\"http://www.w3.org/2000/svg\"\n xmlns:xlink=\"http://www.w3.org/1999/xlink\"\n x=\"0px\"\n y=\"0px\"\n width=\"50%\"\n height=\"50%\"\n viewBox=\"0 0 292.362 292.362\"\n style=\"enable-background: new 0 0 292.362 292.362\"\n xml:space=\"preserve\"\n >\n <g>\n <path\n d=\"M286.935,69.377c-3.614-3.617-7.898-5.424-12.848-5.424H18.274c-4.952,0-9.233,1.807-12.85,5.424\n C1.807,72.998,0,77.279,0,82.228c0,4.948,1.807,9.229,5.424,12.847l127.907,127.907c3.621,3.617,7.902,5.428,12.85,5.428\n s9.233-1.811,12.847-5.428L286.935,95.074c3.613-3.617,5.427-7.898,5.427-12.847C292.362,77.279,290.548,72.998,286.935,69.377z\"\n />\n </g>\n </svg>\n <!-- </editor-fold> -->\n </span>\n </span>\n </button>\n </div>\n <button\n class=\"owl-dt-control owl-dt-control-button owl-dt-control-arrow-button\"\n type=\"button\"\n tabindex=\"0\"\n [style.visibility]=\"showControlArrows ? 'visible' : 'hidden'\"\n [disabled]=\"!nextButtonEnabled()\"\n [attr.aria-label]=\"nextButtonLabel\"\n (click)=\"nextClicked()\"\n >\n <span\n class=\"owl-dt-control-content owl-dt-control-button-content\"\n tabindex=\"-1\"\n >\n <!-- <editor-fold desc=\"SVG Arrow Right\"> -->\n <svg\n version=\"1.1\"\n xmlns=\"http://www.w3.org/2000/svg\"\n xmlns:xlink=\"http://www.w3.org/1999/xlink\"\n x=\"0px\"\n y=\"0px\"\n viewBox=\"0 0 250.738 250.738\"\n style=\"enable-background: new 0 0 250.738 250.738\"\n xml:space=\"preserve\"\n >\n <path\n style=\"fill-rule: evenodd; clip-rule: evenodd\"\n d=\"M191.75,111.689L84.766,5.291c-7.1-7.055-18.613-7.055-25.713,0\n c-7.101,7.054-7.101,18.49,0,25.544l95.053,94.534l-95.053,94.533c-7.101,7.054-7.101,18.491,0,25.545\n c7.1,7.054,18.613,7.054,25.713,0L191.75,139.05c3.784-3.759,5.487-8.759,5.238-13.681\n C197.237,120.447,195.534,115.448,191.75,111.689z\"\n />\n </svg>\n <!-- </editor-fold> -->\n </span>\n </button>\n</div>\n<div class=\"owl-dt-calendar-main\" cdkMonitorSubtreeFocus tabindex=\"-1\">\n @switch (currentView) {\n @case (DateView.MONTH) {\n <owl-date-time-month-view\n [pickerMoment]=\"pickerMoment\"\n [firstDayOfWeek]=\"firstDayOfWeek()\"\n [selected]=\"selected\"\n [selecteds]=\"selecteds\"\n [selectMode]=\"selectMode()\"\n [minDate]=\"minDate\"\n [showCalendarWeeks]=\"showCalendarWeeks()\"\n [maxDate]=\"maxDate\"\n [dateFilter]=\"dateFilter()\"\n [hideOtherMonths]=\"hideOtherMonths()\"\n (pickerMomentChange)=\"handlePickerMomentChange($event)\"\n (selectedChange)=\"dateSelected($event)\"\n (userSelection)=\"userSelected()\"\n ></owl-date-time-month-view>\n }\n @case (DateView.YEAR) {\n <owl-date-time-year-view\n [pickerMoment]=\"pickerMoment\"\n [selected]=\"selected\"\n [selecteds]=\"selecteds\"\n [selectMode]=\"selectMode()\"\n [minDate]=\"minDate\"\n [maxDate]=\"maxDate\"\n [dateFilter]=\"dateFilter()\"\n (keyboardEnter)=\"focusActiveCell()\"\n (pickerMomentChange)=\"handlePickerMomentChange($event)\"\n (monthSelected)=\"selectMonthInYearView($event)\"\n (change)=\"goToDateInView($event, DateView.MONTH)\"\n ></owl-date-time-year-view>\n }\n @case (DateView.MULTI_YEARS) {\n <owl-date-time-multi-year-view\n [pickerMoment]=\"pickerMoment\"\n [selected]=\"selected\"\n [selecteds]=\"selecteds\"\n [selectMode]=\"selectMode()\"\n [minDate]=\"minDate\"\n [maxDate]=\"maxDate\"\n [dateFilter]=\"dateFilter()\"\n (keyboardEnter)=\"focusActiveCell()\"\n (pickerMomentChange)=\"handlePickerMomentChange($event)\"\n (yearSelected)=\"selectYearInMultiYearView($event)\"\n (change)=\"goToDateInView($event, DateView.YEAR)\"\n ></owl-date-time-multi-year-view>\n }\n }\n</div>\n", styles: [""], dependencies: [{ kind: "directive", type: CdkMonitorFocus, selector: "[cdkMonitorElementFocus], [cdkMonitorSubtreeFocus]", outputs: ["cdkFocusChange"], exportAs: ["cdkMonitorFocus"] }, { kind: "component", type: OwlMonthViewComponent, selector: "owl-date-time-month-view", inputs: ["hideOtherMonths", "showCalendarWeeks", "firstDayOfWeek", "selectMode", "selected", "selecteds", "pickerMoment", "dateFilter", "minDate", "maxDate"], outputs: ["selectedChange", "userSelection", "pickerMomentChange"], exportAs: ["owlYearView"] }, { kind: "component", type: OwlYearViewComponent, selector: "owl-date-time-year-view", inputs: ["selectMode", "selected", "selecteds", "pickerMoment", "dateFilter", "minDate", "maxDate"], outputs: ["change", "monthSelected", "pickerMomentChange", "keyboardEnter"], exportAs: ["owlMonthView"] }, { kind: "component", type: OwlMultiYearViewComponent, selector: "owl-date-time-multi-year-view", inputs: ["selectMode", "selected", "selecteds", "pickerMoment", "dateFilter", "minDate", "maxDate"], outputs: ["change", "yearSelected", "pickerMomentChange", "keyboardEnter"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2764
2804
|
}
|
|
2765
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0
|
|
2805
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: OwlCalendarComponent, decorators: [{
|
|
2766
2806
|
type: Component,
|
|
2767
2807
|
args: [{ selector: 'owl-date-time-calendar', exportAs: 'owlDateTimeCalendar', host: {
|
|
2768
2808
|
'[class.owl-dt-calendar]': 'owlDTCalendarClass'
|
|
@@ -2807,6 +2847,12 @@ class OwlTimerBoxComponent {
|
|
|
2807
2847
|
...(ngDevMode ? [{ debugName: "max" }] : /* istanbul ignore next */ []));
|
|
2808
2848
|
step = input(1, /* @ts-ignore */
|
|
2809
2849
|
...(ngDevMode ? [{ debugName: "step" }] : /* istanbul ignore next */ []));
|
|
2850
|
+
/** Whether the value goes from the max to the min and back */
|
|
2851
|
+
wrap = input(false, /* @ts-ignore */
|
|
2852
|
+
...(ngDevMode ? [{ debugName: "wrap" }] : /* istanbul ignore next */ []));
|
|
2853
|
+
/** Milliseconds to wait after typing before applying the value, 0 applies it at once */
|
|
2854
|
+
inputDebounce = input(750, /* @ts-ignore */
|
|
2855
|
+
...(ngDevMode ? [{ debugName: "inputDebounce" }] : /* istanbul ignore next */ []));
|
|
2810
2856
|
inputLabel = input(undefined, /* @ts-ignore */
|
|
2811
2857
|
...(ngDevMode ? [{ debugName: "inputLabel" }] : /* istanbul ignore next */ []));
|
|
2812
2858
|
valueChange = output();
|
|
@@ -2814,8 +2860,11 @@ class OwlTimerBoxComponent {
|
|
|
2814
2860
|
inputStream = new Subject();
|
|
2815
2861
|
inputStreamSub = Subscription.EMPTY;
|
|
2816
2862
|
hasFocus = false;
|
|
2863
|
+
/** Whether the user typed into the box: the typed text is shown as is until the focus leaves */
|
|
2864
|
+
editing = false;
|
|
2865
|
+
injector = inject(Injector);
|
|
2817
2866
|
get displayValue() {
|
|
2818
|
-
if (this.hasFocus) {
|
|
2867
|
+
if (this.hasFocus && this.editing) {
|
|
2819
2868
|
// Don't try to reformat the value that user is currently editing
|
|
2820
2869
|
return this.valueInput().nativeElement.value;
|
|
2821
2870
|
}
|
|
@@ -2834,7 +2883,7 @@ class OwlTimerBoxComponent {
|
|
|
2834
2883
|
constructor() {
|
|
2835
2884
|
}
|
|
2836
2885
|
ngOnInit() {
|
|
2837
|
-
this.inputStreamSub = this.inputStream.pipe(
|
|
2886
|
+
this.inputStreamSub = this.inputStream.pipe(debounce(() => (this.inputDebounce() > 0 ? timer(this.inputDebounce()) : of(0)))).subscribe((val) => {
|
|
2838
2887
|
if (val) {
|
|
2839
2888
|
const inputValue = coerceNumberProperty(val, 0);
|
|
2840
2889
|
this.updateValueViaInput(inputValue);
|
|
@@ -2846,13 +2895,18 @@ class OwlTimerBoxComponent {
|
|
|
2846
2895
|
this.unbindValueInputMouseWheel();
|
|
2847
2896
|
this.inputStreamSub.unsubscribe();
|
|
2848
2897
|
}
|
|
2898
|
+
/** With wrap, past the max goes to the min (59 → 0), otherwise carries over to the larger unit. */
|
|
2849
2899
|
upBtnClicked() {
|
|
2850
|
-
this.
|
|
2900
|
+
const value = this.stepBase + this.step();
|
|
2901
|
+
this.updateValue(this.wrap() && value > this.max() ? this.min() : value);
|
|
2851
2902
|
}
|
|
2903
|
+
/** With wrap, past the min goes to the max (0 → 59), otherwise carries over to the larger unit. */
|
|
2852
2904
|
downBtnClicked() {
|
|
2853
|
-
this.
|
|
2905
|
+
const value = this.stepBase - this.step();
|
|
2906
|
+
this.updateValue(this.wrap() && value < this.min() ? this.max() : value);
|
|
2854
2907
|
}
|
|
2855
2908
|
handleInputChange(val) {
|
|
2909
|
+
this.editing = true;
|
|
2856
2910
|
this.inputStream.next(val);
|
|
2857
2911
|
}
|
|
2858
2912
|
focusIn() {
|
|
@@ -2860,13 +2914,32 @@ class OwlTimerBoxComponent {
|
|
|
2860
2914
|
}
|
|
2861
2915
|
focusOut(value) {
|
|
2862
2916
|
this.hasFocus = false;
|
|
2917
|
+
this.editing = false;
|
|
2863
2918
|
if (value) {
|
|
2864
2919
|
const inputValue = coerceNumberProperty(value, 0);
|
|
2865
2920
|
this.updateValueViaInput(inputValue);
|
|
2866
2921
|
}
|
|
2867
2922
|
}
|
|
2923
|
+
/** The value the arrows step from: the typed number while it is not applied yet */
|
|
2924
|
+
get stepBase() {
|
|
2925
|
+
if (this.editing) {
|
|
2926
|
+
const typed = coerceNumberProperty(this.valueInput().nativeElement.value, NaN);
|
|
2927
|
+
if (typed >= this.min() && typed <= this.max()) {
|
|
2928
|
+
return typed;
|
|
2929
|
+
}
|
|
2930
|
+
}
|
|
2931
|
+
return this.value();
|
|
2932
|
+
}
|
|
2933
|
+
/** Applies the arrow buttons, keys or wheel: the box shows the new value even while focused */
|
|
2868
2934
|
updateValue(value) {
|
|
2935
|
+
this.editing = false;
|
|
2936
|
+
// Drop the typed text waiting for the debounce, the arrows already stepped from it
|
|
2937
|
+
this.inputStream.next('');
|
|
2869
2938
|
this.valueChange.emit(value);
|
|
2939
|
+
if (this.hasFocus) {
|
|
2940
|
+
// Keep the new value selected, so typing replaces it
|
|
2941
|
+
afterNextRender(() => this.valueInput().nativeElement.select(), { injector: this.injector });
|
|
2942
|
+
}
|
|
2870
2943
|
}
|
|
2871
2944
|
updateValueViaInput(value) {
|
|
2872
2945
|
if (value > this.max() || value < this.min()) {
|
|
@@ -2895,15 +2968,15 @@ class OwlTimerBoxComponent {
|
|
|
2895
2968
|
unbindValueInputMouseWheel() {
|
|
2896
2969
|
this.valueInput().nativeElement.removeEventListener('onwheel' in document ? 'wheel' : 'mousewheel', this.onValueInputMouseWheelBind);
|
|
2897
2970
|
}
|
|
2898
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0
|
|
2899
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0
|
|
2971
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: OwlTimerBoxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2972
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.0", type: OwlTimerBoxComponent, isStandalone: true, selector: "owl-date-time-timer-box", inputs: { showDivider: { classPropertyName: "showDivider", publicName: "showDivider", isSignal: true, isRequired: false, transformFunction: null }, upBtnAriaLabel: { classPropertyName: "upBtnAriaLabel", publicName: "upBtnAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, upBtnDisabled: { classPropertyName: "upBtnDisabled", publicName: "upBtnDisabled", isSignal: true, isRequired: false, transformFunction: null }, downBtnAriaLabel: { classPropertyName: "downBtnAriaLabel", publicName: "downBtnAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, downBtnDisabled: { classPropertyName: "downBtnDisabled", publicName: "downBtnDisabled", isSignal: true, isRequired: false, transformFunction: null }, boxValue: { classPropertyName: "boxValue", publicName: "boxValue", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, step: { classPropertyName: "step", publicName: "step", isSignal: true, isRequired: false, transformFunction: null }, wrap: { classPropertyName: "wrap", publicName: "wrap", isSignal: true, isRequired: false, transformFunction: null }, inputDebounce: { classPropertyName: "inputDebounce", publicName: "inputDebounce", isSignal: true, isRequired: false, transformFunction: null }, inputLabel: { classPropertyName: "inputLabel", publicName: "inputLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange", inputChange: "inputChange" }, host: { properties: { "class.owl-dt-timer-box": "owlDTTimerBoxClass" } }, viewQueries: [{ propertyName: "valueInput", first: true, predicate: ["valueInput"], descendants: true, isSignal: true }], exportAs: ["owlDateTimeTimerBox"], ngImport: i0, template: "@if (showDivider()) {\n <div class=\"owl-dt-timer-divider\" aria-hidden=\"true\"></div>\n}\n<button\n class=\"owl-dt-control-button owl-dt-control-arrow-button\"\n type=\"button\"\n tabindex=\"-1\"\n [disabled]=\"upBtnDisabled()\"\n [attr.aria-label]=\"upBtnAriaLabel()\"\n (click)=\"upBtnClicked()\"\n>\n <span class=\"owl-dt-control-button-content\" tabindex=\"-1\">\n <!-- <editor-fold desc=\"SVG Arrow Up\"> -->\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n xmlns:xlink=\"http://www.w3.org/1999/xlink\"\n version=\"1.1\"\n x=\"0px\"\n y=\"0px\"\n viewBox=\"0 0 451.847 451.846\"\n style=\"enable-background: new 0 0 451.847 451.846\"\n xml:space=\"preserve\"\n width=\"100%\"\n height=\"100%\"\n >\n <path\n d=\"M248.292,106.406l194.281,194.29c12.365,12.359,12.365,32.391,0,44.744c-12.354,12.354-32.391,12.354-44.744,0\n L225.923,173.529L54.018,345.44c-12.36,12.354-32.395,12.354-44.748,0c-12.359-12.354-12.359-32.391,0-44.75L203.554,106.4\n c6.18-6.174,14.271-9.259,22.369-9.259C234.018,97.141,242.115,100.232,248.292,106.406z\"\n />\n </svg>\n <!-- </editor-fold> -->\n </span>\n</button>\n<label class=\"owl-dt-timer-content\">\n <input\n class=\"owl-dt-timer-input\"\n maxlength=\"2\"\n inputmode=\"numeric\"\n [value]=\"displayValue\"\n (keydown.arrowup)=\"!upBtnDisabled() && upBtnClicked()\"\n (keydown.arrowdown)=\"!downBtnDisabled() && downBtnClicked()\"\n (input)=\"handleInputChange(valueInput.value)\"\n (focusin)=\"valueInput.select(); focusIn()\"\n (focusout)=\"focusOut(valueInput.value)\"\n #valueInput\n />\n <span class=\"owl-hidden-accessible\">{{ inputLabel() }}</span>\n</label>\n<button\n class=\"owl-dt-control-button owl-dt-control-arrow-button\"\n type=\"button\"\n tabindex=\"-1\"\n [disabled]=\"downBtnDisabled()\"\n [attr.aria-label]=\"downBtnAriaLabel()\"\n (click)=\"downBtnClicked()\"\n>\n <span class=\"owl-dt-control-button-content\" tabindex=\"-1\">\n <!-- <editor-fold desc=\"SVG Arrow Down\"> -->\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n xmlns:xlink=\"http://www.w3.org/1999/xlink\"\n version=\"1.1\"\n x=\"0px\"\n y=\"0px\"\n viewBox=\"0 0 451.847 451.846\"\n style=\"enable-background: new 0 0 451.847 451.846\"\n xml:space=\"preserve\"\n width=\"100%\"\n height=\"100%\"\n >\n <path\n d=\"M225.923,354.706c-8.098,0-16.195-3.092-22.369-9.263L9.27,151.157c-12.359-12.359-12.359-32.397,0-44.751\n c12.354-12.354,32.388-12.354,44.748,0l171.905,171.915l171.906-171.909c12.359-12.354,32.391-12.354,44.744,0\n c12.365,12.354,12.365,32.392,0,44.751L248.292,345.449C242.115,351.621,234.018,354.706,225.923,354.706z\"\n />\n </svg>\n <!-- </editor-fold> -->\n </span>\n</button>\n", styles: [""], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2900
2973
|
}
|
|
2901
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0
|
|
2974
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: OwlTimerBoxComponent, decorators: [{
|
|
2902
2975
|
type: Component,
|
|
2903
2976
|
args: [{ exportAs: 'owlDateTimeTimerBox', selector: 'owl-date-time-timer-box', preserveWhitespaces: false, changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
2904
2977
|
'[class.owl-dt-timer-box]': 'owlDTTimerBoxClass'
|
|
2905
|
-
}, template: "@if (showDivider()) {\n <div class=\"owl-dt-timer-divider\" aria-hidden=\"true\"></div>\n}\n<button\n class=\"owl-dt-control-button owl-dt-control-arrow-button\"\n type=\"button\"\n tabindex=\"-1\"\n [disabled]=\"upBtnDisabled()\"\n [attr.aria-label]=\"upBtnAriaLabel()\"\n (click)=\"upBtnClicked()\"\n>\n <span class=\"owl-dt-control-button-content\" tabindex=\"-1\">\n <!-- <editor-fold desc=\"SVG Arrow Up\"> -->\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n xmlns:xlink=\"http://www.w3.org/1999/xlink\"\n version=\"1.1\"\n x=\"0px\"\n y=\"0px\"\n viewBox=\"0 0 451.847 451.846\"\n style=\"enable-background: new 0 0 451.847 451.846\"\n xml:space=\"preserve\"\n width=\"100%\"\n height=\"100%\"\n >\n <path\n d=\"M248.292,106.406l194.281,194.29c12.365,12.359,12.365,32.391,0,44.744c-12.354,12.354-32.391,12.354-44.744,0\n L225.923,173.529L54.018,345.44c-12.36,12.354-32.395,12.354-44.748,0c-12.359-12.354-12.359-32.391,0-44.75L203.554,106.4\n c6.18-6.174,14.271-9.259,22.369-9.259C234.018,97.141,242.115,100.232,248.292,106.406z\"\n />\n </svg>\n <!-- </editor-fold> -->\n </span>\n</button>\n<label class=\"owl-dt-timer-content\">\n <input\n class=\"owl-dt-timer-input\"\n maxlength=\"2\"\n inputmode=\"numeric\"\n [value]=\"displayValue\"\n (keydown.arrowup)=\"!upBtnDisabled() && upBtnClicked()\"\n (keydown.arrowdown)=\"!downBtnDisabled() && downBtnClicked()\"\n (input)=\"handleInputChange(valueInput.value)\"\n (focusin)=\"focusIn()\"\n (focusout)=\"focusOut(valueInput.value)\"\n #valueInput\n />\n <span class=\"owl-hidden-accessible\">{{ inputLabel() }}</span>\n</label>\n<button\n class=\"owl-dt-control-button owl-dt-control-arrow-button\"\n type=\"button\"\n tabindex=\"-1\"\n [disabled]=\"downBtnDisabled()\"\n [attr.aria-label]=\"downBtnAriaLabel()\"\n (click)=\"downBtnClicked()\"\n>\n <span class=\"owl-dt-control-button-content\" tabindex=\"-1\">\n <!-- <editor-fold desc=\"SVG Arrow Down\"> -->\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n xmlns:xlink=\"http://www.w3.org/1999/xlink\"\n version=\"1.1\"\n x=\"0px\"\n y=\"0px\"\n viewBox=\"0 0 451.847 451.846\"\n style=\"enable-background: new 0 0 451.847 451.846\"\n xml:space=\"preserve\"\n width=\"100%\"\n height=\"100%\"\n >\n <path\n d=\"M225.923,354.706c-8.098,0-16.195-3.092-22.369-9.263L9.27,151.157c-12.359-12.359-12.359-32.397,0-44.751\n c12.354-12.354,32.388-12.354,44.748,0l171.905,171.915l171.906-171.909c12.359-12.354,32.391-12.354,44.744,0\n c12.365,12.354,12.365,32.392,0,44.751L248.292,345.449C242.115,351.621,234.018,354.706,225.923,354.706z\"\n />\n </svg>\n <!-- </editor-fold> -->\n </span>\n</button>\n" }]
|
|
2906
|
-
}], ctorParameters: () => [], propDecorators: { showDivider: [{ type: i0.Input, args: [{ isSignal: true, alias: "showDivider", required: false }] }], upBtnAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "upBtnAriaLabel", required: false }] }], upBtnDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "upBtnDisabled", required: false }] }], downBtnAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "downBtnAriaLabel", required: false }] }], downBtnDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "downBtnDisabled", required: false }] }], boxValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "boxValue", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], min: [{ type: i0.Input, args: [{ isSignal: true, alias: "min", required: false }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], step: [{ type: i0.Input, args: [{ isSignal: true, alias: "step", required: false }] }], inputLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputLabel", required: false }] }], valueChange: [{ type: i0.Output, args: ["valueChange"] }], inputChange: [{ type: i0.Output, args: ["inputChange"] }], valueInput: [{ type: i0.ViewChild, args: ['valueInput', { isSignal: true }] }] } });
|
|
2978
|
+
}, template: "@if (showDivider()) {\n <div class=\"owl-dt-timer-divider\" aria-hidden=\"true\"></div>\n}\n<button\n class=\"owl-dt-control-button owl-dt-control-arrow-button\"\n type=\"button\"\n tabindex=\"-1\"\n [disabled]=\"upBtnDisabled()\"\n [attr.aria-label]=\"upBtnAriaLabel()\"\n (click)=\"upBtnClicked()\"\n>\n <span class=\"owl-dt-control-button-content\" tabindex=\"-1\">\n <!-- <editor-fold desc=\"SVG Arrow Up\"> -->\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n xmlns:xlink=\"http://www.w3.org/1999/xlink\"\n version=\"1.1\"\n x=\"0px\"\n y=\"0px\"\n viewBox=\"0 0 451.847 451.846\"\n style=\"enable-background: new 0 0 451.847 451.846\"\n xml:space=\"preserve\"\n width=\"100%\"\n height=\"100%\"\n >\n <path\n d=\"M248.292,106.406l194.281,194.29c12.365,12.359,12.365,32.391,0,44.744c-12.354,12.354-32.391,12.354-44.744,0\n L225.923,173.529L54.018,345.44c-12.36,12.354-32.395,12.354-44.748,0c-12.359-12.354-12.359-32.391,0-44.75L203.554,106.4\n c6.18-6.174,14.271-9.259,22.369-9.259C234.018,97.141,242.115,100.232,248.292,106.406z\"\n />\n </svg>\n <!-- </editor-fold> -->\n </span>\n</button>\n<label class=\"owl-dt-timer-content\">\n <input\n class=\"owl-dt-timer-input\"\n maxlength=\"2\"\n inputmode=\"numeric\"\n [value]=\"displayValue\"\n (keydown.arrowup)=\"!upBtnDisabled() && upBtnClicked()\"\n (keydown.arrowdown)=\"!downBtnDisabled() && downBtnClicked()\"\n (input)=\"handleInputChange(valueInput.value)\"\n (focusin)=\"valueInput.select(); focusIn()\"\n (focusout)=\"focusOut(valueInput.value)\"\n #valueInput\n />\n <span class=\"owl-hidden-accessible\">{{ inputLabel() }}</span>\n</label>\n<button\n class=\"owl-dt-control-button owl-dt-control-arrow-button\"\n type=\"button\"\n tabindex=\"-1\"\n [disabled]=\"downBtnDisabled()\"\n [attr.aria-label]=\"downBtnAriaLabel()\"\n (click)=\"downBtnClicked()\"\n>\n <span class=\"owl-dt-control-button-content\" tabindex=\"-1\">\n <!-- <editor-fold desc=\"SVG Arrow Down\"> -->\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n xmlns:xlink=\"http://www.w3.org/1999/xlink\"\n version=\"1.1\"\n x=\"0px\"\n y=\"0px\"\n viewBox=\"0 0 451.847 451.846\"\n style=\"enable-background: new 0 0 451.847 451.846\"\n xml:space=\"preserve\"\n width=\"100%\"\n height=\"100%\"\n >\n <path\n d=\"M225.923,354.706c-8.098,0-16.195-3.092-22.369-9.263L9.27,151.157c-12.359-12.359-12.359-32.397,0-44.751\n c12.354-12.354,32.388-12.354,44.748,0l171.905,171.915l171.906-171.909c12.359-12.354,32.391-12.354,44.744,0\n c12.365,12.354,12.365,32.392,0,44.751L248.292,345.449C242.115,351.621,234.018,354.706,225.923,354.706z\"\n />\n </svg>\n <!-- </editor-fold> -->\n </span>\n</button>\n" }]
|
|
2979
|
+
}], ctorParameters: () => [], propDecorators: { showDivider: [{ type: i0.Input, args: [{ isSignal: true, alias: "showDivider", required: false }] }], upBtnAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "upBtnAriaLabel", required: false }] }], upBtnDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "upBtnDisabled", required: false }] }], downBtnAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "downBtnAriaLabel", required: false }] }], downBtnDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "downBtnDisabled", required: false }] }], boxValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "boxValue", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], min: [{ type: i0.Input, args: [{ isSignal: true, alias: "min", required: false }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], step: [{ type: i0.Input, args: [{ isSignal: true, alias: "step", required: false }] }], wrap: [{ type: i0.Input, args: [{ isSignal: true, alias: "wrap", required: false }] }], inputDebounce: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputDebounce", required: false }] }], inputLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputLabel", required: false }] }], valueChange: [{ type: i0.Output, args: ["valueChange"] }], inputChange: [{ type: i0.Output, args: ["inputChange"] }], valueInput: [{ type: i0.ViewChild, args: ['valueInput', { isSignal: true }] }] } });
|
|
2907
2980
|
|
|
2908
2981
|
/**
|
|
2909
2982
|
* timer.component
|
|
@@ -2968,6 +3041,16 @@ class OwlTimerComponent {
|
|
|
2968
3041
|
*/
|
|
2969
3042
|
stepSecond = input(1, /* @ts-ignore */
|
|
2970
3043
|
...(ngDevMode ? [{ debugName: "stepSecond" }] : /* istanbul ignore next */ []));
|
|
3044
|
+
/**
|
|
3045
|
+
* Whether the boxes go from the max to the min and back
|
|
3046
|
+
*/
|
|
3047
|
+
wrapTimer = input(false, /* @ts-ignore */
|
|
3048
|
+
...(ngDevMode ? [{ debugName: "wrapTimer" }] : /* istanbul ignore next */ []));
|
|
3049
|
+
/**
|
|
3050
|
+
* Milliseconds the boxes wait after typing before applying the value
|
|
3051
|
+
*/
|
|
3052
|
+
timerInputDebounce = input(750, /* @ts-ignore */
|
|
3053
|
+
...(ngDevMode ? [{ debugName: "timerInputDebounce" }] : /* istanbul ignore next */ []));
|
|
2971
3054
|
get hourValue() {
|
|
2972
3055
|
return this.dateTimeAdapter.getHours(this.pickerMoment);
|
|
2973
3056
|
}
|
|
@@ -3172,22 +3255,22 @@ class OwlTimerComponent {
|
|
|
3172
3255
|
? obj
|
|
3173
3256
|
: null;
|
|
3174
3257
|
}
|
|
3175
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0
|
|
3176
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0
|
|
3258
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: OwlTimerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3259
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.0", type: OwlTimerComponent, isStandalone: true, selector: "owl-date-time-timer", inputs: { pickerMoment: { classPropertyName: "pickerMoment", publicName: "pickerMoment", isSignal: false, isRequired: false, transformFunction: null }, minDateTime: { classPropertyName: "minDateTime", publicName: "minDateTime", isSignal: false, isRequired: false, transformFunction: null }, maxDateTime: { classPropertyName: "maxDateTime", publicName: "maxDateTime", isSignal: false, isRequired: false, transformFunction: null }, showSecondsTimer: { classPropertyName: "showSecondsTimer", publicName: "showSecondsTimer", isSignal: true, isRequired: false, transformFunction: null }, hour12Timer: { classPropertyName: "hour12Timer", publicName: "hour12Timer", isSignal: true, isRequired: false, transformFunction: null }, stepHour: { classPropertyName: "stepHour", publicName: "stepHour", isSignal: true, isRequired: false, transformFunction: null }, stepMinute: { classPropertyName: "stepMinute", publicName: "stepMinute", isSignal: true, isRequired: false, transformFunction: null }, stepSecond: { classPropertyName: "stepSecond", publicName: "stepSecond", isSignal: true, isRequired: false, transformFunction: null }, wrapTimer: { classPropertyName: "wrapTimer", publicName: "wrapTimer", isSignal: true, isRequired: false, transformFunction: null }, timerInputDebounce: { classPropertyName: "timerInputDebounce", publicName: "timerInputDebounce", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selectedChange: "selectedChange" }, host: { properties: { "class.owl-dt-timer": "owlDTTimerClass", "attr.tabindex": "owlDTTimeTabIndex" } }, exportAs: ["owlDateTimeTimer"], ngImport: i0, template: "<owl-date-time-timer-box\n [upBtnAriaLabel]=\"upHourButtonLabel\"\n [downBtnAriaLabel]=\"downHourButtonLabel\"\n [upBtnDisabled]=\"!upHourEnabled()\"\n [downBtnDisabled]=\"!downHourEnabled()\"\n [boxValue]=\"hourBoxValue\"\n [value]=\"hourValue\"\n [min]=\"0\"\n [max]=\"23\"\n [step]=\"stepHour()\"\n [wrap]=\"wrapTimer()\"\n [inputDebounce]=\"timerInputDebounce()\"\n [inputLabel]=\"'Hour'\"\n (inputChange)=\"setHourValueViaInput($event)\"\n (valueChange)=\"setHourValue($event)\"\n></owl-date-time-timer-box>\n<owl-date-time-timer-box\n [showDivider]=\"true\"\n [upBtnAriaLabel]=\"upMinuteButtonLabel\"\n [downBtnAriaLabel]=\"downMinuteButtonLabel\"\n [upBtnDisabled]=\"!upMinuteEnabled()\"\n [downBtnDisabled]=\"!downMinuteEnabled()\"\n [value]=\"minuteValue\"\n [min]=\"0\"\n [max]=\"59\"\n [step]=\"stepMinute()\"\n [wrap]=\"wrapTimer()\"\n [inputDebounce]=\"timerInputDebounce()\"\n [inputLabel]=\"'Minute'\"\n (inputChange)=\"setMinuteValue($event)\"\n (valueChange)=\"setMinuteValue($event)\"\n></owl-date-time-timer-box>\n@if (showSecondsTimer()) {\n <owl-date-time-timer-box\n [showDivider]=\"true\"\n [upBtnAriaLabel]=\"upSecondButtonLabel\"\n [downBtnAriaLabel]=\"downSecondButtonLabel\"\n [upBtnDisabled]=\"!upSecondEnabled()\"\n [downBtnDisabled]=\"!downSecondEnabled()\"\n [value]=\"secondValue\"\n [min]=\"0\"\n [max]=\"59\"\n [step]=\"stepSecond()\"\n [wrap]=\"wrapTimer()\"\n [inputDebounce]=\"timerInputDebounce()\"\n [inputLabel]=\"'Second'\"\n (inputChange)=\"setSecondValue($event)\"\n (valueChange)=\"setSecondValue($event)\"\n ></owl-date-time-timer-box>\n}\n@if (hour12Timer()) {\n <div class=\"owl-dt-timer-hour12\">\n <button\n class=\"owl-dt-control-button owl-dt-timer-hour12-box\"\n type=\"button\"\n tabindex=\"0\"\n (click)=\"setMeridiem($event)\"\n >\n <span class=\"owl-dt-control-button-content\" tabindex=\"-1\">\n {{ hour12ButtonLabel }}\n </span>\n </button>\n </div>\n}\n", styles: [""], dependencies: [{ kind: "component", type: OwlTimerBoxComponent, selector: "owl-date-time-timer-box", inputs: ["showDivider", "upBtnAriaLabel", "upBtnDisabled", "downBtnAriaLabel", "downBtnDisabled", "boxValue", "value", "min", "max", "step", "wrap", "inputDebounce", "inputLabel"], outputs: ["valueChange", "inputChange"], exportAs: ["owlDateTimeTimerBox"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3177
3260
|
}
|
|
3178
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0
|
|
3261
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: OwlTimerComponent, decorators: [{
|
|
3179
3262
|
type: Component,
|
|
3180
3263
|
args: [{ exportAs: 'owlDateTimeTimer', selector: 'owl-date-time-timer', preserveWhitespaces: false, changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
3181
3264
|
'[class.owl-dt-timer]': 'owlDTTimerClass',
|
|
3182
3265
|
'[attr.tabindex]': 'owlDTTimeTabIndex'
|
|
3183
|
-
}, imports: [OwlTimerBoxComponent], template: "<owl-date-time-timer-box\n [upBtnAriaLabel]=\"upHourButtonLabel\"\n [downBtnAriaLabel]=\"downHourButtonLabel\"\n [upBtnDisabled]=\"!upHourEnabled()\"\n [downBtnDisabled]=\"!downHourEnabled()\"\n [boxValue]=\"hourBoxValue\"\n [value]=\"hourValue\"\n [min]=\"0\"\n [max]=\"23\"\n [step]=\"stepHour()\"\n [inputLabel]=\"'Hour'\"\n (inputChange)=\"setHourValueViaInput($event)\"\n (valueChange)=\"setHourValue($event)\"\n></owl-date-time-timer-box>\n<owl-date-time-timer-box\n [showDivider]=\"true\"\n [upBtnAriaLabel]=\"upMinuteButtonLabel\"\n [downBtnAriaLabel]=\"downMinuteButtonLabel\"\n [upBtnDisabled]=\"!upMinuteEnabled()\"\n [downBtnDisabled]=\"!downMinuteEnabled()\"\n [value]=\"minuteValue\"\n [min]=\"0\"\n [max]=\"59\"\n [step]=\"stepMinute()\"\n [inputLabel]=\"'Minute'\"\n (inputChange)=\"setMinuteValue($event)\"\n (valueChange)=\"setMinuteValue($event)\"\n></owl-date-time-timer-box>\n@if (showSecondsTimer()) {\n <owl-date-time-timer-box\n [showDivider]=\"true\"\n [upBtnAriaLabel]=\"upSecondButtonLabel\"\n [downBtnAriaLabel]=\"downSecondButtonLabel\"\n [upBtnDisabled]=\"!upSecondEnabled()\"\n [downBtnDisabled]=\"!downSecondEnabled()\"\n [value]=\"secondValue\"\n [min]=\"0\"\n [max]=\"59\"\n [step]=\"stepSecond()\"\n [inputLabel]=\"'Second'\"\n (inputChange)=\"setSecondValue($event)\"\n (valueChange)=\"setSecondValue($event)\"\n ></owl-date-time-timer-box>\n}\n@if (hour12Timer()) {\n <div class=\"owl-dt-timer-hour12\">\n <button\n class=\"owl-dt-control-button owl-dt-timer-hour12-box\"\n type=\"button\"\n tabindex=\"0\"\n (click)=\"setMeridiem($event)\"\n >\n <span class=\"owl-dt-control-button-content\" tabindex=\"-1\">\n {{ hour12ButtonLabel }}\n </span>\n </button>\n </div>\n}\n" }]
|
|
3266
|
+
}, imports: [OwlTimerBoxComponent], template: "<owl-date-time-timer-box\n [upBtnAriaLabel]=\"upHourButtonLabel\"\n [downBtnAriaLabel]=\"downHourButtonLabel\"\n [upBtnDisabled]=\"!upHourEnabled()\"\n [downBtnDisabled]=\"!downHourEnabled()\"\n [boxValue]=\"hourBoxValue\"\n [value]=\"hourValue\"\n [min]=\"0\"\n [max]=\"23\"\n [step]=\"stepHour()\"\n [wrap]=\"wrapTimer()\"\n [inputDebounce]=\"timerInputDebounce()\"\n [inputLabel]=\"'Hour'\"\n (inputChange)=\"setHourValueViaInput($event)\"\n (valueChange)=\"setHourValue($event)\"\n></owl-date-time-timer-box>\n<owl-date-time-timer-box\n [showDivider]=\"true\"\n [upBtnAriaLabel]=\"upMinuteButtonLabel\"\n [downBtnAriaLabel]=\"downMinuteButtonLabel\"\n [upBtnDisabled]=\"!upMinuteEnabled()\"\n [downBtnDisabled]=\"!downMinuteEnabled()\"\n [value]=\"minuteValue\"\n [min]=\"0\"\n [max]=\"59\"\n [step]=\"stepMinute()\"\n [wrap]=\"wrapTimer()\"\n [inputDebounce]=\"timerInputDebounce()\"\n [inputLabel]=\"'Minute'\"\n (inputChange)=\"setMinuteValue($event)\"\n (valueChange)=\"setMinuteValue($event)\"\n></owl-date-time-timer-box>\n@if (showSecondsTimer()) {\n <owl-date-time-timer-box\n [showDivider]=\"true\"\n [upBtnAriaLabel]=\"upSecondButtonLabel\"\n [downBtnAriaLabel]=\"downSecondButtonLabel\"\n [upBtnDisabled]=\"!upSecondEnabled()\"\n [downBtnDisabled]=\"!downSecondEnabled()\"\n [value]=\"secondValue\"\n [min]=\"0\"\n [max]=\"59\"\n [step]=\"stepSecond()\"\n [wrap]=\"wrapTimer()\"\n [inputDebounce]=\"timerInputDebounce()\"\n [inputLabel]=\"'Second'\"\n (inputChange)=\"setSecondValue($event)\"\n (valueChange)=\"setSecondValue($event)\"\n ></owl-date-time-timer-box>\n}\n@if (hour12Timer()) {\n <div class=\"owl-dt-timer-hour12\">\n <button\n class=\"owl-dt-control-button owl-dt-timer-hour12-box\"\n type=\"button\"\n tabindex=\"0\"\n (click)=\"setMeridiem($event)\"\n >\n <span class=\"owl-dt-control-button-content\" tabindex=\"-1\">\n {{ hour12ButtonLabel }}\n </span>\n </button>\n </div>\n}\n" }]
|
|
3184
3267
|
}], propDecorators: { pickerMoment: [{
|
|
3185
3268
|
type: Input
|
|
3186
3269
|
}], minDateTime: [{
|
|
3187
3270
|
type: Input
|
|
3188
3271
|
}], maxDateTime: [{
|
|
3189
3272
|
type: Input
|
|
3190
|
-
}], showSecondsTimer: [{ type: i0.Input, args: [{ isSignal: true, alias: "showSecondsTimer", required: false }] }], hour12Timer: [{ type: i0.Input, args: [{ isSignal: true, alias: "hour12Timer", required: false }] }], stepHour: [{ type: i0.Input, args: [{ isSignal: true, alias: "stepHour", required: false }] }], stepMinute: [{ type: i0.Input, args: [{ isSignal: true, alias: "stepMinute", required: false }] }], stepSecond: [{ type: i0.Input, args: [{ isSignal: true, alias: "stepSecond", required: false }] }], selectedChange: [{ type: i0.Output, args: ["selectedChange"] }] } });
|
|
3273
|
+
}], showSecondsTimer: [{ type: i0.Input, args: [{ isSignal: true, alias: "showSecondsTimer", required: false }] }], hour12Timer: [{ type: i0.Input, args: [{ isSignal: true, alias: "hour12Timer", required: false }] }], stepHour: [{ type: i0.Input, args: [{ isSignal: true, alias: "stepHour", required: false }] }], stepMinute: [{ type: i0.Input, args: [{ isSignal: true, alias: "stepMinute", required: false }] }], stepSecond: [{ type: i0.Input, args: [{ isSignal: true, alias: "stepSecond", required: false }] }], wrapTimer: [{ type: i0.Input, args: [{ isSignal: true, alias: "wrapTimer", required: false }] }], timerInputDebounce: [{ type: i0.Input, args: [{ isSignal: true, alias: "timerInputDebounce", required: false }] }], selectedChange: [{ type: i0.Output, args: ["selectedChange"] }] } });
|
|
3191
3274
|
|
|
3192
3275
|
/**
|
|
3193
3276
|
* date-time-picker-container.component
|
|
@@ -3203,6 +3286,8 @@ class OwlDateTimeContainerComponent {
|
|
|
3203
3286
|
...(ngDevMode ? [{ debugName: "timer" }] : /* istanbul ignore next */ []));
|
|
3204
3287
|
picker;
|
|
3205
3288
|
activeSelectedIndex = 0; // The current active SelectedIndex in range select mode (0: 'from', 1: 'to')
|
|
3289
|
+
/** Whether an inverted range is corrected only on 'Set' or when the other end is activated (see OwlDateTimeComponent). */
|
|
3290
|
+
lazyValidation = false;
|
|
3206
3291
|
/** Emits when an animation state changes. */
|
|
3207
3292
|
animationStateChanged = new EventEmitter();
|
|
3208
3293
|
// retain start and end time
|
|
@@ -3400,12 +3485,7 @@ class OwlDateTimeContainerComponent {
|
|
|
3400
3485
|
const selecteds = [...this.picker.selecteds];
|
|
3401
3486
|
// check if the 'from' is after 'to' or 'to'is before 'from'
|
|
3402
3487
|
// In this case, we set both the 'from' and 'to' the same value
|
|
3403
|
-
if (
|
|
3404
|
-
selecteds[1] &&
|
|
3405
|
-
this.dateTimeAdapter.compare(this.pickerMoment, selecteds[1]) === 1) ||
|
|
3406
|
-
(this.activeSelectedIndex === 1 &&
|
|
3407
|
-
selecteds[0] &&
|
|
3408
|
-
this.dateTimeAdapter.compare(this.pickerMoment, selecteds[0]) === -1)) {
|
|
3488
|
+
if (!this.lazyValidation && this.isRangeInverted(selecteds)) {
|
|
3409
3489
|
selecteds[0] = this.pickerMoment;
|
|
3410
3490
|
selecteds[1] = this.pickerMoment;
|
|
3411
3491
|
}
|
|
@@ -3433,6 +3513,7 @@ class OwlDateTimeContainerComponent {
|
|
|
3433
3513
|
* Handle click on set button
|
|
3434
3514
|
*/
|
|
3435
3515
|
onSetClicked(event) {
|
|
3516
|
+
this.checkInvertedRange();
|
|
3436
3517
|
if (!this.picker.dateTimeChecker(this.pickerMoment)) {
|
|
3437
3518
|
this.hidePicker$.next(null);
|
|
3438
3519
|
event.preventDefault();
|
|
@@ -3527,6 +3608,7 @@ class OwlDateTimeContainerComponent {
|
|
|
3527
3608
|
if (this.picker.selecteds && selected) {
|
|
3528
3609
|
this.pickerMoment = this.dateTimeAdapter.clone(selected);
|
|
3529
3610
|
}
|
|
3611
|
+
this.checkInvertedRange();
|
|
3530
3612
|
}
|
|
3531
3613
|
return;
|
|
3532
3614
|
}
|
|
@@ -3624,6 +3706,31 @@ class OwlDateTimeContainerComponent {
|
|
|
3624
3706
|
// check the updated dateTime
|
|
3625
3707
|
return this.picker.dateTimeChecker(result) ? result : null;
|
|
3626
3708
|
}
|
|
3709
|
+
/**
|
|
3710
|
+
* Whether the picker moment of the active end is after 'to' (or before 'from').
|
|
3711
|
+
*/
|
|
3712
|
+
isRangeInverted(selecteds) {
|
|
3713
|
+
return ((this.activeSelectedIndex === 0 &&
|
|
3714
|
+
!!selecteds[1] &&
|
|
3715
|
+
this.dateTimeAdapter.compare(this.pickerMoment, selecteds[1]) === 1) ||
|
|
3716
|
+
(this.activeSelectedIndex === 1 &&
|
|
3717
|
+
!!selecteds[0] &&
|
|
3718
|
+
this.dateTimeAdapter.compare(this.pickerMoment, selecteds[0]) === -1));
|
|
3719
|
+
}
|
|
3720
|
+
/**
|
|
3721
|
+
* With lazyValidation, sets both the 'from' and 'to' to the picker moment when the range is inverted.
|
|
3722
|
+
*/
|
|
3723
|
+
checkInvertedRange() {
|
|
3724
|
+
if (!this.lazyValidation || !this.picker.isInRangeMode) {
|
|
3725
|
+
return;
|
|
3726
|
+
}
|
|
3727
|
+
const selecteds = [...this.picker.selecteds];
|
|
3728
|
+
if (this.isRangeInverted(selecteds)) {
|
|
3729
|
+
selecteds[0] = this.pickerMoment;
|
|
3730
|
+
selecteds[1] = this.pickerMoment;
|
|
3731
|
+
this.picker.select(selecteds);
|
|
3732
|
+
}
|
|
3733
|
+
}
|
|
3627
3734
|
/**
|
|
3628
3735
|
* Focus to the picker
|
|
3629
3736
|
* */
|
|
@@ -3658,10 +3765,10 @@ class OwlDateTimeContainerComponent {
|
|
|
3658
3765
|
}
|
|
3659
3766
|
return duration;
|
|
3660
3767
|
}
|
|
3661
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0
|
|
3662
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0
|
|
3768
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: OwlDateTimeContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3769
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.0", type: OwlDateTimeContainerComponent, isStandalone: true, selector: "owl-date-time-container", host: { listeners: { "animate.enter": "onAnimateEnter($event)", "animate.leave": "onAnimateLeave($event)" }, properties: { "class.owl-dt-container": "owlDTContainerClass", "class.owl-dt-popup-container": "owlDTPopupContainerClass", "class.owl-dt-dialog-container": "owlDTDialogContainerClass", "class.owl-dt-inline-container": "owlDTInlineContainerClass", "class.owl-dt-container-disabled": "owlDTContainerDisabledClass", "attr.id": "owlDTContainerId" } }, viewQueries: [{ propertyName: "calendar", first: true, predicate: OwlCalendarComponent, descendants: true, isSignal: true }, { propertyName: "timer", first: true, predicate: OwlTimerComponent, descendants: true, isSignal: true }], exportAs: ["owlDateTimeContainer"], ngImport: i0, template: "<div\n [cdkTrapFocus]=\"picker.pickerMode !== 'inline'\"\n class=\"owl-dt-container-inner\"\n>\n @if (pickerType === 'both' || pickerType === 'calendar') {\n <owl-date-time-calendar\n class=\"owl-dt-container-row\"\n [firstDayOfWeek]=\"picker.firstDayOfWeek\"\n [(pickerMoment)]=\"pickerMoment\"\n [selected]=\"picker.selected\"\n [selecteds]=\"picker.selecteds\"\n [selectMode]=\"picker.selectMode\"\n [minDate]=\"picker.minDateTime\"\n [maxDate]=\"picker.maxDateTime\"\n [dateFilter]=\"picker.dateTimeFilter\"\n [startView]=\"picker.startView()\"\n [yearOnly]=\"picker.yearOnly()\"\n [showCalendarWeeks]=\"picker.showCalendarWeeks()\"\n [multiyearOnly]=\"picker.multiyearOnly()\"\n [hideOtherMonths]=\"picker.hideOtherMonths\"\n (yearSelected)=\"picker.selectYear($event)\"\n (monthSelected)=\"picker.selectMonth($event)\"\n (dateClicked)=\"picker.selectDate($event)\"\n (selectedChange)=\"dateSelected($event)\"\n ></owl-date-time-calendar>\n }\n @if (pickerType === 'both' || pickerType === 'timer') {\n <owl-date-time-timer\n class=\"owl-dt-container-row\"\n [pickerMoment]=\"pickerMoment\"\n [minDateTime]=\"picker.minDateTime\"\n [maxDateTime]=\"picker.maxDateTime\"\n [showSecondsTimer]=\"picker.showSecondsTimer\"\n [hour12Timer]=\"picker.hour12Timer\"\n [stepHour]=\"picker.stepHour\"\n [stepMinute]=\"picker.stepMinute\"\n [stepSecond]=\"picker.stepSecond\"\n [wrapTimer]=\"picker.wrapTimer\"\n [timerInputDebounce]=\"picker.timerInputDebounce\"\n (selectedChange)=\"timeSelected($event)\"\n ></owl-date-time-timer>\n }\n @if (picker.isInRangeMode) {\n <div\n role=\"radiogroup\"\n class=\"owl-dt-container-info owl-dt-container-row\"\n >\n <div\n role=\"radio\"\n [tabindex]=\"activeSelectedIndex === 0 ? 0 : -1\"\n [attr.aria-checked]=\"activeSelectedIndex === 0\"\n class=\"owl-dt-control owl-dt-container-range owl-dt-container-from\"\n [ngClass]=\"{\n 'owl-dt-container-info-active': activeSelectedIndex === 0,\n }\"\n (click)=\"handleClickOnInfoGroup($event, 0)\"\n (keydown)=\"handleKeydownOnInfoGroup($event, to, 0)\"\n #from\n >\n <span\n class=\"owl-dt-control-content owl-dt-container-range-content\"\n tabindex=\"-1\"\n >\n <span class=\"owl-dt-container-info-label\"\n >{{ fromLabel }}:</span\n >\n <span class=\"owl-dt-container-info-value\">{{\n fromFormattedValue\n }}</span>\n </span>\n </div>\n <div\n role=\"radio\"\n [tabindex]=\"activeSelectedIndex === 1 ? 0 : -1\"\n [attr.aria-checked]=\"activeSelectedIndex === 1\"\n class=\"owl-dt-control owl-dt-container-range owl-dt-container-to\"\n [ngClass]=\"{\n 'owl-dt-container-info-active': activeSelectedIndex === 1,\n }\"\n (click)=\"handleClickOnInfoGroup($event, 1)\"\n (keydown)=\"handleKeydownOnInfoGroup($event, from, 1)\"\n #to\n >\n <span\n class=\"owl-dt-control-content owl-dt-container-range-content\"\n tabindex=\"-1\"\n >\n <span class=\"owl-dt-container-info-label\"\n >{{ toLabel }}:</span\n >\n <span class=\"owl-dt-container-info-value\">{{\n toFormattedValue\n }}</span>\n </span>\n </div>\n </div>\n }\n @if (showControlButtons) {\n <div class=\"owl-dt-container-buttons owl-dt-container-row\">\n <button\n class=\"owl-dt-control owl-dt-control-button owl-dt-container-control-button\"\n type=\"button\"\n tabindex=\"0\"\n (click)=\"onCancelClicked($event)\"\n >\n <span\n class=\"owl-dt-control-content owl-dt-control-button-content\"\n tabindex=\"-1\"\n >\n {{ cancelLabel }}\n </span>\n </button>\n <button\n class=\"owl-dt-control owl-dt-control-button owl-dt-container-control-button\"\n type=\"button\"\n tabindex=\"0\"\n (click)=\"onSetClicked($event)\"\n >\n <span\n class=\"owl-dt-control-content owl-dt-control-button-content\"\n tabindex=\"-1\"\n >\n {{ setLabel }}\n </span>\n </button>\n </div>\n }\n</div>\n", styles: [""], dependencies: [{ kind: "directive", type: CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }, { kind: "component", type: OwlCalendarComponent, selector: "owl-date-time-calendar", inputs: ["minDate", "maxDate", "pickerMoment", "selected", "selecteds", "dateFilter", "firstDayOfWeek", "selectMode", "startView", "yearOnly", "showCalendarWeeks", "multiyearOnly", "hideOtherMonths"], outputs: ["pickerMomentChange", "dateClicked", "selectedChange", "userSelection", "yearSelected", "monthSelected"], exportAs: ["owlDateTimeCalendar"] }, { kind: "component", type: OwlTimerComponent, selector: "owl-date-time-timer", inputs: ["pickerMoment", "minDateTime", "maxDateTime", "showSecondsTimer", "hour12Timer", "stepHour", "stepMinute", "stepSecond", "wrapTimer", "timerInputDebounce"], outputs: ["selectedChange"], exportAs: ["owlDateTimeTimer"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3663
3770
|
}
|
|
3664
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0
|
|
3771
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: OwlDateTimeContainerComponent, decorators: [{
|
|
3665
3772
|
type: Component,
|
|
3666
3773
|
args: [{ exportAs: 'owlDateTimeContainer', selector: 'owl-date-time-container', changeDetection: ChangeDetectionStrategy.OnPush, preserveWhitespaces: false, host: {
|
|
3667
3774
|
'(animate.enter)': 'onAnimateEnter($event)',
|
|
@@ -3677,7 +3784,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
|
|
|
3677
3784
|
OwlCalendarComponent,
|
|
3678
3785
|
OwlTimerComponent,
|
|
3679
3786
|
NgClass,
|
|
3680
|
-
], template: "<div\n [cdkTrapFocus]=\"picker.pickerMode !== 'inline'\"\n class=\"owl-dt-container-inner\"\n>\n @if (pickerType === 'both' || pickerType === 'calendar') {\n <owl-date-time-calendar\n class=\"owl-dt-container-row\"\n [firstDayOfWeek]=\"picker.firstDayOfWeek\"\n [(pickerMoment)]=\"pickerMoment\"\n [selected]=\"picker.selected\"\n [selecteds]=\"picker.selecteds\"\n [selectMode]=\"picker.selectMode\"\n [minDate]=\"picker.minDateTime\"\n [maxDate]=\"picker.maxDateTime\"\n [dateFilter]=\"picker.dateTimeFilter\"\n [startView]=\"picker.startView()\"\n [yearOnly]=\"picker.yearOnly()\"\n [showCalendarWeeks]=\"picker.showCalendarWeeks()\"\n [multiyearOnly]=\"picker.multiyearOnly()\"\n [hideOtherMonths]=\"picker.hideOtherMonths\"\n (yearSelected)=\"picker.selectYear($event)\"\n (monthSelected)=\"picker.selectMonth($event)\"\n (dateClicked)=\"picker.selectDate($event)\"\n (selectedChange)=\"dateSelected($event)\"\n ></owl-date-time-calendar>\n }\n @if (pickerType === 'both' || pickerType === 'timer') {\n <owl-date-time-timer\n class=\"owl-dt-container-row\"\n [pickerMoment]=\"pickerMoment\"\n [minDateTime]=\"picker.minDateTime\"\n [maxDateTime]=\"picker.maxDateTime\"\n [showSecondsTimer]=\"picker.showSecondsTimer\"\n [hour12Timer]=\"picker.hour12Timer\"\n [stepHour]=\"picker.stepHour\"\n [stepMinute]=\"picker.stepMinute\"\n [stepSecond]=\"picker.stepSecond\"\n (selectedChange)=\"timeSelected($event)\"\n ></owl-date-time-timer>\n }\n @if (picker.isInRangeMode) {\n <div\n role=\"radiogroup\"\n class=\"owl-dt-container-info owl-dt-container-row\"\n >\n <div\n role=\"radio\"\n [tabindex]=\"activeSelectedIndex === 0 ? 0 : -1\"\n [attr.aria-checked]=\"activeSelectedIndex === 0\"\n class=\"owl-dt-control owl-dt-container-range owl-dt-container-from\"\n [ngClass]=\"{\n 'owl-dt-container-info-active': activeSelectedIndex === 0,\n }\"\n (click)=\"handleClickOnInfoGroup($event, 0)\"\n (keydown)=\"handleKeydownOnInfoGroup($event, to, 0)\"\n #from\n >\n <span\n class=\"owl-dt-control-content owl-dt-container-range-content\"\n tabindex=\"-1\"\n >\n <span class=\"owl-dt-container-info-label\"\n >{{ fromLabel }}:</span\n >\n <span class=\"owl-dt-container-info-value\">{{\n fromFormattedValue\n }}</span>\n </span>\n </div>\n <div\n role=\"radio\"\n [tabindex]=\"activeSelectedIndex === 1 ? 0 : -1\"\n [attr.aria-checked]=\"activeSelectedIndex === 1\"\n class=\"owl-dt-control owl-dt-container-range owl-dt-container-to\"\n [ngClass]=\"{\n 'owl-dt-container-info-active': activeSelectedIndex === 1,\n }\"\n (click)=\"handleClickOnInfoGroup($event, 1)\"\n (keydown)=\"handleKeydownOnInfoGroup($event, from, 1)\"\n #to\n >\n <span\n class=\"owl-dt-control-content owl-dt-container-range-content\"\n tabindex=\"-1\"\n >\n <span class=\"owl-dt-container-info-label\"\n >{{ toLabel }}:</span\n >\n <span class=\"owl-dt-container-info-value\">{{\n toFormattedValue\n }}</span>\n </span>\n </div>\n </div>\n }\n @if (showControlButtons) {\n <div class=\"owl-dt-container-buttons owl-dt-container-row\">\n <button\n class=\"owl-dt-control owl-dt-control-button owl-dt-container-control-button\"\n type=\"button\"\n tabindex=\"0\"\n (click)=\"onCancelClicked($event)\"\n >\n <span\n class=\"owl-dt-control-content owl-dt-control-button-content\"\n tabindex=\"-1\"\n >\n {{ cancelLabel }}\n </span>\n </button>\n <button\n class=\"owl-dt-control owl-dt-control-button owl-dt-container-control-button\"\n type=\"button\"\n tabindex=\"0\"\n (click)=\"onSetClicked($event)\"\n >\n <span\n class=\"owl-dt-control-content owl-dt-control-button-content\"\n tabindex=\"-1\"\n >\n {{ setLabel }}\n </span>\n </button>\n </div>\n }\n</div>\n" }]
|
|
3787
|
+
], template: "<div\n [cdkTrapFocus]=\"picker.pickerMode !== 'inline'\"\n class=\"owl-dt-container-inner\"\n>\n @if (pickerType === 'both' || pickerType === 'calendar') {\n <owl-date-time-calendar\n class=\"owl-dt-container-row\"\n [firstDayOfWeek]=\"picker.firstDayOfWeek\"\n [(pickerMoment)]=\"pickerMoment\"\n [selected]=\"picker.selected\"\n [selecteds]=\"picker.selecteds\"\n [selectMode]=\"picker.selectMode\"\n [minDate]=\"picker.minDateTime\"\n [maxDate]=\"picker.maxDateTime\"\n [dateFilter]=\"picker.dateTimeFilter\"\n [startView]=\"picker.startView()\"\n [yearOnly]=\"picker.yearOnly()\"\n [showCalendarWeeks]=\"picker.showCalendarWeeks()\"\n [multiyearOnly]=\"picker.multiyearOnly()\"\n [hideOtherMonths]=\"picker.hideOtherMonths\"\n (yearSelected)=\"picker.selectYear($event)\"\n (monthSelected)=\"picker.selectMonth($event)\"\n (dateClicked)=\"picker.selectDate($event)\"\n (selectedChange)=\"dateSelected($event)\"\n ></owl-date-time-calendar>\n }\n @if (pickerType === 'both' || pickerType === 'timer') {\n <owl-date-time-timer\n class=\"owl-dt-container-row\"\n [pickerMoment]=\"pickerMoment\"\n [minDateTime]=\"picker.minDateTime\"\n [maxDateTime]=\"picker.maxDateTime\"\n [showSecondsTimer]=\"picker.showSecondsTimer\"\n [hour12Timer]=\"picker.hour12Timer\"\n [stepHour]=\"picker.stepHour\"\n [stepMinute]=\"picker.stepMinute\"\n [stepSecond]=\"picker.stepSecond\"\n [wrapTimer]=\"picker.wrapTimer\"\n [timerInputDebounce]=\"picker.timerInputDebounce\"\n (selectedChange)=\"timeSelected($event)\"\n ></owl-date-time-timer>\n }\n @if (picker.isInRangeMode) {\n <div\n role=\"radiogroup\"\n class=\"owl-dt-container-info owl-dt-container-row\"\n >\n <div\n role=\"radio\"\n [tabindex]=\"activeSelectedIndex === 0 ? 0 : -1\"\n [attr.aria-checked]=\"activeSelectedIndex === 0\"\n class=\"owl-dt-control owl-dt-container-range owl-dt-container-from\"\n [ngClass]=\"{\n 'owl-dt-container-info-active': activeSelectedIndex === 0,\n }\"\n (click)=\"handleClickOnInfoGroup($event, 0)\"\n (keydown)=\"handleKeydownOnInfoGroup($event, to, 0)\"\n #from\n >\n <span\n class=\"owl-dt-control-content owl-dt-container-range-content\"\n tabindex=\"-1\"\n >\n <span class=\"owl-dt-container-info-label\"\n >{{ fromLabel }}:</span\n >\n <span class=\"owl-dt-container-info-value\">{{\n fromFormattedValue\n }}</span>\n </span>\n </div>\n <div\n role=\"radio\"\n [tabindex]=\"activeSelectedIndex === 1 ? 0 : -1\"\n [attr.aria-checked]=\"activeSelectedIndex === 1\"\n class=\"owl-dt-control owl-dt-container-range owl-dt-container-to\"\n [ngClass]=\"{\n 'owl-dt-container-info-active': activeSelectedIndex === 1,\n }\"\n (click)=\"handleClickOnInfoGroup($event, 1)\"\n (keydown)=\"handleKeydownOnInfoGroup($event, from, 1)\"\n #to\n >\n <span\n class=\"owl-dt-control-content owl-dt-container-range-content\"\n tabindex=\"-1\"\n >\n <span class=\"owl-dt-container-info-label\"\n >{{ toLabel }}:</span\n >\n <span class=\"owl-dt-container-info-value\">{{\n toFormattedValue\n }}</span>\n </span>\n </div>\n </div>\n }\n @if (showControlButtons) {\n <div class=\"owl-dt-container-buttons owl-dt-container-row\">\n <button\n class=\"owl-dt-control owl-dt-control-button owl-dt-container-control-button\"\n type=\"button\"\n tabindex=\"0\"\n (click)=\"onCancelClicked($event)\"\n >\n <span\n class=\"owl-dt-control-content owl-dt-control-button-content\"\n tabindex=\"-1\"\n >\n {{ cancelLabel }}\n </span>\n </button>\n <button\n class=\"owl-dt-control owl-dt-control-button owl-dt-container-control-button\"\n type=\"button\"\n tabindex=\"0\"\n (click)=\"onSetClicked($event)\"\n >\n <span\n class=\"owl-dt-control-content owl-dt-control-button-content\"\n tabindex=\"-1\"\n >\n {{ setLabel }}\n </span>\n </button>\n </div>\n }\n</div>\n" }]
|
|
3681
3788
|
}], propDecorators: { calendar: [{ type: i0.ViewChild, args: [i0.forwardRef(() => OwlCalendarComponent), { isSignal: true }] }], timer: [{ type: i0.ViewChild, args: [i0.forwardRef(() => OwlTimerComponent), { isSignal: true }] }] } });
|
|
3682
3789
|
|
|
3683
3790
|
/**
|
|
@@ -3813,12 +3920,35 @@ class OwlDateTimeComponent extends OwlDateTime {
|
|
|
3813
3920
|
set opened(val) {
|
|
3814
3921
|
val ? this.open() : this.close();
|
|
3815
3922
|
}
|
|
3923
|
+
/** Whether the picker is being opened: from open() until afterPickerOpen. */
|
|
3924
|
+
_opening = false;
|
|
3925
|
+
get opening() {
|
|
3926
|
+
return this._opening;
|
|
3927
|
+
}
|
|
3928
|
+
/** Whether the picker is being closed: from close() until afterPickerClosed. */
|
|
3929
|
+
_closing = false;
|
|
3930
|
+
get closing() {
|
|
3931
|
+
return this._closing;
|
|
3932
|
+
}
|
|
3816
3933
|
/**
|
|
3817
3934
|
* The scroll strategy when the picker is open
|
|
3818
3935
|
* Learn more this from https://material.angular.io/cdk/overlay/overview#scroll-strategies
|
|
3819
3936
|
* */
|
|
3820
3937
|
scrollStrategy = input(undefined, /* @ts-ignore */
|
|
3821
3938
|
...(ngDevMode ? [{ debugName: "scrollStrategy" }] : /* istanbul ignore next */ []));
|
|
3939
|
+
/**
|
|
3940
|
+
* For the range mode: when false, an inverted range ('from' after 'to' or 'to' before 'from')
|
|
3941
|
+
* is corrected on every change by setting both ends to the same value. When true, it is corrected only
|
|
3942
|
+
* when 'Set' is clicked or the other end is activated, so the time can be edited step by step.
|
|
3943
|
+
* Defaults to the lazyValidation global option (false).
|
|
3944
|
+
* */
|
|
3945
|
+
_lazyValidation;
|
|
3946
|
+
get lazyValidation() {
|
|
3947
|
+
return this._lazyValidation ?? this.options?.lazyValidation ?? false;
|
|
3948
|
+
}
|
|
3949
|
+
set lazyValidation(value) {
|
|
3950
|
+
this._lazyValidation = coerceBooleanProperty(value);
|
|
3951
|
+
}
|
|
3822
3952
|
/**
|
|
3823
3953
|
* Callback when the picker is closed
|
|
3824
3954
|
* */
|
|
@@ -3831,6 +3961,14 @@ class OwlDateTimeComponent extends OwlDateTime {
|
|
|
3831
3961
|
* Callback when the picker is open
|
|
3832
3962
|
* */
|
|
3833
3963
|
afterPickerOpen = output();
|
|
3964
|
+
/**
|
|
3965
|
+
* Emits at the start of open(), before the picker is created
|
|
3966
|
+
* */
|
|
3967
|
+
pickerOpening = output();
|
|
3968
|
+
/**
|
|
3969
|
+
* Emits at the start of close(), before the picker is destroyed
|
|
3970
|
+
* */
|
|
3971
|
+
pickerClosing = output();
|
|
3834
3972
|
/**
|
|
3835
3973
|
* Emits selected year in multi-year view
|
|
3836
3974
|
* This doesn't imply a change on the selected date.
|
|
@@ -3952,6 +4090,8 @@ class OwlDateTimeComponent extends OwlDateTime {
|
|
|
3952
4090
|
if (!this._dtInput) {
|
|
3953
4091
|
throw Error('Attempted to open an DateTimePicker with no associated input.');
|
|
3954
4092
|
}
|
|
4093
|
+
this._opening = true;
|
|
4094
|
+
this.pickerOpening.emit();
|
|
3955
4095
|
if (this.document) {
|
|
3956
4096
|
this.focusedElementBeforeOpen = this.document.activeElement;
|
|
3957
4097
|
}
|
|
@@ -3969,6 +4109,7 @@ class OwlDateTimeComponent extends OwlDateTime {
|
|
|
3969
4109
|
}
|
|
3970
4110
|
this.pickerMode === 'dialog' ? this.openAsDialog() : this.openAsPopup();
|
|
3971
4111
|
this.pickerContainer.picker = this;
|
|
4112
|
+
this.pickerContainer.lazyValidation = this.lazyValidation;
|
|
3972
4113
|
// Listen to picker container's hidePickerStream
|
|
3973
4114
|
this.hidePickerStreamSub = this.pickerContainer.hidePickerStream.subscribe(() => {
|
|
3974
4115
|
this.close();
|
|
@@ -4030,12 +4171,16 @@ class OwlDateTimeComponent extends OwlDateTime {
|
|
|
4030
4171
|
* Hide the picker
|
|
4031
4172
|
*/
|
|
4032
4173
|
close() {
|
|
4033
|
-
|
|
4174
|
+
// Detaching the popup calls close() again, emit pickerClosing once
|
|
4175
|
+
if (!this._opened || this._closing) {
|
|
4034
4176
|
return;
|
|
4035
4177
|
}
|
|
4178
|
+
this._closing = true;
|
|
4179
|
+
this.pickerClosing.emit();
|
|
4036
4180
|
this.disposeOverlayResources();
|
|
4037
4181
|
const completeClose = () => {
|
|
4038
4182
|
if (this._opened) {
|
|
4183
|
+
this._closing = false;
|
|
4039
4184
|
this._opened = false;
|
|
4040
4185
|
const selected = this.selected || this.selecteds;
|
|
4041
4186
|
this.afterPickerClosed.emit(selected);
|
|
@@ -4124,8 +4269,9 @@ class OwlDateTimeComponent extends OwlDateTime {
|
|
|
4124
4269
|
this.beforePickerOpen.emit(null);
|
|
4125
4270
|
}));
|
|
4126
4271
|
this.dialogEventsSub.add(this.dialogRef.afterOpen().subscribe(() => {
|
|
4127
|
-
this.
|
|
4272
|
+
this._opening = false;
|
|
4128
4273
|
this._opened = true;
|
|
4274
|
+
this.afterPickerOpen.emit(null);
|
|
4129
4275
|
}));
|
|
4130
4276
|
this.dialogEventsSub.add(this.dialogRef.afterClosed().subscribe(() => this.close()));
|
|
4131
4277
|
}
|
|
@@ -4155,8 +4301,9 @@ class OwlDateTimeComponent extends OwlDateTime {
|
|
|
4155
4301
|
this.pickerOpenedStreamSub = this.pickerContainer.pickerOpenedStream
|
|
4156
4302
|
.pipe(take$1(1))
|
|
4157
4303
|
.subscribe(() => {
|
|
4158
|
-
this.
|
|
4304
|
+
this._opening = false;
|
|
4159
4305
|
this._opened = true;
|
|
4306
|
+
this.afterPickerOpen.emit(null);
|
|
4160
4307
|
});
|
|
4161
4308
|
}
|
|
4162
4309
|
}
|
|
@@ -4230,10 +4377,10 @@ class OwlDateTimeComponent extends OwlDateTime {
|
|
|
4230
4377
|
}
|
|
4231
4378
|
]);
|
|
4232
4379
|
}
|
|
4233
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0
|
|
4234
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0
|
|
4380
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: OwlDateTimeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4381
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.0", type: OwlDateTimeComponent, isStandalone: true, selector: "owl-date-time", inputs: { backdropClass: { classPropertyName: "backdropClass", publicName: "backdropClass", isSignal: true, isRequired: false, transformFunction: null }, panelClass: { classPropertyName: "panelClass", publicName: "panelClass", isSignal: true, isRequired: false, transformFunction: null }, startAt: { classPropertyName: "startAt", publicName: "startAt", isSignal: false, isRequired: false, transformFunction: null }, endAt: { classPropertyName: "endAt", publicName: "endAt", isSignal: false, isRequired: false, transformFunction: null }, pickerType: { classPropertyName: "pickerType", publicName: "pickerType", isSignal: false, isRequired: false, transformFunction: null }, pickerMode: { classPropertyName: "pickerMode", publicName: "pickerMode", isSignal: false, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: false, isRequired: false, transformFunction: null }, opened: { classPropertyName: "opened", publicName: "opened", isSignal: false, isRequired: false, transformFunction: null }, scrollStrategy: { classPropertyName: "scrollStrategy", publicName: "scrollStrategy", isSignal: true, isRequired: false, transformFunction: null }, lazyValidation: { classPropertyName: "lazyValidation", publicName: "lazyValidation", isSignal: false, isRequired: false, transformFunction: null } }, outputs: { afterPickerClosed: "afterPickerClosed", beforePickerOpen: "beforePickerOpen", afterPickerOpen: "afterPickerOpen", pickerOpening: "pickerOpening", pickerClosing: "pickerClosing", yearSelected: "yearSelected", monthSelected: "monthSelected", dateSelected: "dateSelected" }, exportAs: ["owlDateTime"], usesInheritance: true, ngImport: i0, template: "", styles: [""], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
4235
4382
|
}
|
|
4236
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0
|
|
4383
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: OwlDateTimeComponent, decorators: [{
|
|
4237
4384
|
type: Component,
|
|
4238
4385
|
args: [{ selector: 'owl-date-time', exportAs: 'owlDateTime', changeDetection: ChangeDetectionStrategy.OnPush, preserveWhitespaces: false, template: "" }]
|
|
4239
4386
|
}], ctorParameters: () => [], propDecorators: { backdropClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "backdropClass", required: false }] }], panelClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "panelClass", required: false }] }], startAt: [{
|
|
@@ -4248,7 +4395,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
|
|
|
4248
4395
|
type: Input
|
|
4249
4396
|
}], opened: [{
|
|
4250
4397
|
type: Input
|
|
4251
|
-
}], scrollStrategy: [{ type: i0.Input, args: [{ isSignal: true, alias: "scrollStrategy", required: false }] }],
|
|
4398
|
+
}], scrollStrategy: [{ type: i0.Input, args: [{ isSignal: true, alias: "scrollStrategy", required: false }] }], lazyValidation: [{
|
|
4399
|
+
type: Input
|
|
4400
|
+
}], afterPickerClosed: [{ type: i0.Output, args: ["afterPickerClosed"] }], beforePickerOpen: [{ type: i0.Output, args: ["beforePickerOpen"] }], afterPickerOpen: [{ type: i0.Output, args: ["afterPickerOpen"] }], pickerOpening: [{ type: i0.Output, args: ["pickerOpening"] }], pickerClosing: [{ type: i0.Output, args: ["pickerClosing"] }], yearSelected: [{ type: i0.Output, args: ["yearSelected"] }], monthSelected: [{ type: i0.Output, args: ["monthSelected"] }], dateSelected: [{ type: i0.Output, args: ["dateSelected"] }] } });
|
|
4252
4401
|
|
|
4253
4402
|
/**
|
|
4254
4403
|
* provide-date-time.ts
|
|
@@ -4287,7 +4436,8 @@ function provideOwlDateTime() {
|
|
|
4287
4436
|
* Provides custom options for OwlDateTime.
|
|
4288
4437
|
* This is optional - default options will be used if not provided.
|
|
4289
4438
|
*
|
|
4290
|
-
* @param options - Custom options
|
|
4439
|
+
* @param options - Custom options: multi-year view configuration and the global defaults of the inputs,
|
|
4440
|
+
* the missing ones keep their default values
|
|
4291
4441
|
*
|
|
4292
4442
|
* @example
|
|
4293
4443
|
* ```typescript
|
|
@@ -4299,17 +4449,19 @@ function provideOwlDateTime() {
|
|
|
4299
4449
|
* multiYear: {
|
|
4300
4450
|
* yearsPerRow: 4,
|
|
4301
4451
|
* yearRows: 5
|
|
4302
|
-
* }
|
|
4452
|
+
* },
|
|
4453
|
+
* lazyValidation: true
|
|
4303
4454
|
* })
|
|
4304
4455
|
* ]
|
|
4305
4456
|
* });
|
|
4306
4457
|
* ```
|
|
4307
4458
|
*/
|
|
4308
4459
|
function provideOwlDateTimeOptions(options) {
|
|
4460
|
+
const defaults = DefaultOptions.create();
|
|
4309
4461
|
return [
|
|
4310
4462
|
{
|
|
4311
4463
|
provide: OptionsTokens.all,
|
|
4312
|
-
useValue: options,
|
|
4464
|
+
useValue: { ...defaults, ...options, multiYear: { ...defaults.multiYear, ...options.multiYear } },
|
|
4313
4465
|
},
|
|
4314
4466
|
{
|
|
4315
4467
|
provide: OptionsTokens.multiYear,
|
|
@@ -4406,6 +4558,48 @@ function createDateWithOverflow(year, month, date, hours = 0, minutes = 0, secon
|
|
|
4406
4558
|
}
|
|
4407
4559
|
return result;
|
|
4408
4560
|
}
|
|
4561
|
+
/**
|
|
4562
|
+
* Checks whether the text matches the Intl format of the locale,
|
|
4563
|
+
* e.g. `11/9/2026, 1:05 PM` for `en-US` and the full input format.
|
|
4564
|
+
* Whitespace in the format literals matches any whitespace,
|
|
4565
|
+
* since Intl puts non-breaking spaces where the user types plain ones.
|
|
4566
|
+
*/
|
|
4567
|
+
function isValidIntlFormat(value, locale, format) {
|
|
4568
|
+
const dtf = new Intl.DateTimeFormat(locale, { ...format, timeZone: 'utc' });
|
|
4569
|
+
let pattern = '^';
|
|
4570
|
+
for (const part of dtf.formatToParts()) {
|
|
4571
|
+
switch (part.type) {
|
|
4572
|
+
case 'day':
|
|
4573
|
+
pattern += '(0?[1-9]|[12][0-9]|3[01])';
|
|
4574
|
+
break;
|
|
4575
|
+
case 'month':
|
|
4576
|
+
pattern += '(0?[1-9]|1[0-2])';
|
|
4577
|
+
break;
|
|
4578
|
+
case 'year':
|
|
4579
|
+
pattern += '([0-9]{1,4})';
|
|
4580
|
+
break;
|
|
4581
|
+
case 'hour':
|
|
4582
|
+
pattern += dtf.resolvedOptions().hour12
|
|
4583
|
+
? '(0?[1-9]|1[0-2])'
|
|
4584
|
+
: '([01]?[0-9]|2[0-3])';
|
|
4585
|
+
break;
|
|
4586
|
+
case 'minute':
|
|
4587
|
+
case 'second':
|
|
4588
|
+
pattern += '([0-5]?[0-9])';
|
|
4589
|
+
break;
|
|
4590
|
+
case 'dayPeriod':
|
|
4591
|
+
pattern += '([ap]m?)';
|
|
4592
|
+
break;
|
|
4593
|
+
case 'literal':
|
|
4594
|
+
pattern += part.value
|
|
4595
|
+
.replace(/[.*+?^${}()|[\]\\/]/g, '\\$&')
|
|
4596
|
+
.replace(/\s+/g, '\\s+');
|
|
4597
|
+
break;
|
|
4598
|
+
}
|
|
4599
|
+
}
|
|
4600
|
+
pattern += '$';
|
|
4601
|
+
return new RegExp(pattern, 'i').test(value);
|
|
4602
|
+
}
|
|
4409
4603
|
|
|
4410
4604
|
/**
|
|
4411
4605
|
* constants
|
|
@@ -4601,6 +4795,12 @@ class NativeDateTimeAdapter extends DateTimeAdapter {
|
|
|
4601
4795
|
isValid(date) {
|
|
4602
4796
|
return date && !isNaN(date.getTime());
|
|
4603
4797
|
}
|
|
4798
|
+
isValidFormat(value, parseFormat) {
|
|
4799
|
+
if (SUPPORTS_INTL_API) {
|
|
4800
|
+
return isValidIntlFormat(value, this.getLocale(), parseFormat);
|
|
4801
|
+
}
|
|
4802
|
+
return this.isValid(new Date(value));
|
|
4803
|
+
}
|
|
4604
4804
|
invalid() {
|
|
4605
4805
|
return new Date(NaN);
|
|
4606
4806
|
}
|
|
@@ -4716,10 +4916,10 @@ class NativeDateTimeAdapter extends DateTimeAdapter {
|
|
|
4716
4916
|
const d = new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds()));
|
|
4717
4917
|
return dtf.format(d);
|
|
4718
4918
|
}
|
|
4719
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0
|
|
4720
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0
|
|
4919
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: NativeDateTimeAdapter, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4920
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: NativeDateTimeAdapter });
|
|
4721
4921
|
}
|
|
4722
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0
|
|
4922
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: NativeDateTimeAdapter, decorators: [{
|
|
4723
4923
|
type: Injectable
|
|
4724
4924
|
}], ctorParameters: () => [] });
|
|
4725
4925
|
|
|
@@ -5047,6 +5247,12 @@ class UnixTimestampDateTimeAdapter extends DateTimeAdapter {
|
|
|
5047
5247
|
isValid(date) {
|
|
5048
5248
|
return (date || date === 0) && !isNaN(date);
|
|
5049
5249
|
}
|
|
5250
|
+
isValidFormat(value, parseFormat) {
|
|
5251
|
+
if (SUPPORTS_INTL_API) {
|
|
5252
|
+
return isValidIntlFormat(value, this.getLocale(), parseFormat);
|
|
5253
|
+
}
|
|
5254
|
+
return this.isValid(new Date(value).getTime());
|
|
5255
|
+
}
|
|
5050
5256
|
now() {
|
|
5051
5257
|
return new Date().getTime();
|
|
5052
5258
|
}
|
|
@@ -5075,10 +5281,10 @@ class UnixTimestampDateTimeAdapter extends DateTimeAdapter {
|
|
|
5075
5281
|
toIso8601(date) {
|
|
5076
5282
|
return new Date(date).toISOString();
|
|
5077
5283
|
}
|
|
5078
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0
|
|
5079
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0
|
|
5284
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: UnixTimestampDateTimeAdapter, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
5285
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: UnixTimestampDateTimeAdapter });
|
|
5080
5286
|
}
|
|
5081
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0
|
|
5287
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: UnixTimestampDateTimeAdapter, decorators: [{
|
|
5082
5288
|
type: Injectable
|
|
5083
5289
|
}], ctorParameters: () => [] });
|
|
5084
5290
|
|
|
@@ -5225,10 +5431,10 @@ class OwlDateTimeTriggerDirective {
|
|
|
5225
5431
|
this.changeDetector.markForCheck();
|
|
5226
5432
|
});
|
|
5227
5433
|
}
|
|
5228
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0
|
|
5229
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0
|
|
5434
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: OwlDateTimeTriggerDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
5435
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.0", type: OwlDateTimeTriggerDirective, isStandalone: true, selector: "[owlDateTimeTrigger]", inputs: { dtPicker: { classPropertyName: "dtPicker", publicName: "owlDateTimeTrigger", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: false, isRequired: false, transformFunction: null } }, host: { listeners: { "click": "handleClickOnHost($event)" }, properties: { "class.owl-dt-trigger-disabled": "owlDTTriggerDisabledClass" } }, usesOnChanges: true, ngImport: i0 });
|
|
5230
5436
|
}
|
|
5231
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0
|
|
5437
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: OwlDateTimeTriggerDirective, decorators: [{
|
|
5232
5438
|
type: Directive,
|
|
5233
5439
|
args: [{
|
|
5234
5440
|
selector: '[owlDateTimeTrigger]',
|
|
@@ -5309,24 +5515,40 @@ class OwlDateTimeInputDirective {
|
|
|
5309
5515
|
element.blur();
|
|
5310
5516
|
}
|
|
5311
5517
|
}
|
|
5312
|
-
/** The minimum valid date. */
|
|
5518
|
+
/** The minimum valid date. With strictFormat, it is year 1 by default. */
|
|
5313
5519
|
_min;
|
|
5314
5520
|
get min() {
|
|
5315
|
-
return this._min;
|
|
5521
|
+
return this._min ?? (this.strictFormat ? this.strictMin : null);
|
|
5316
5522
|
}
|
|
5317
5523
|
set min(value) {
|
|
5318
5524
|
this._min = this.getValidDate(this.dateTimeAdapter.deserialize(value));
|
|
5319
5525
|
this.validatorOnChange();
|
|
5320
5526
|
}
|
|
5321
|
-
/** The maximum valid date. */
|
|
5527
|
+
/** The maximum valid date. With strictFormat, it is year 9999 by default. */
|
|
5322
5528
|
_max;
|
|
5323
5529
|
get max() {
|
|
5324
|
-
return this._max;
|
|
5530
|
+
return this._max ?? (this.strictFormat ? this.strictMax : null);
|
|
5325
5531
|
}
|
|
5326
5532
|
set max(value) {
|
|
5327
5533
|
this._max = this.getValidDate(this.dateTimeAdapter.deserialize(value));
|
|
5328
5534
|
this.validatorOnChange();
|
|
5329
5535
|
}
|
|
5536
|
+
/**
|
|
5537
|
+
* Whether the typed text must match the display format of the picker (adapter isValidFormat),
|
|
5538
|
+
* otherwise it gets the owlDateTimeParse error. Also limits min and max to 4-digit years.
|
|
5539
|
+
* Defaults to the strictFormat global option (false).
|
|
5540
|
+
*/
|
|
5541
|
+
_strictFormat;
|
|
5542
|
+
get strictFormat() {
|
|
5543
|
+
return this._strictFormat ?? this.options?.strictFormat ?? false;
|
|
5544
|
+
}
|
|
5545
|
+
set strictFormat(value) {
|
|
5546
|
+
this._strictFormat = coerceBooleanProperty(value);
|
|
5547
|
+
this.validatorOnChange();
|
|
5548
|
+
}
|
|
5549
|
+
options = inject(OptionsTokens.all, { optional: true });
|
|
5550
|
+
strictMin;
|
|
5551
|
+
strictMax;
|
|
5330
5552
|
/**
|
|
5331
5553
|
* The picker's select mode
|
|
5332
5554
|
*/
|
|
@@ -5418,9 +5640,11 @@ class OwlDateTimeInputDirective {
|
|
|
5418
5640
|
validatorOnChange = () => { };
|
|
5419
5641
|
/** The form control validator for whether the input parses. */
|
|
5420
5642
|
parseValidator = () => {
|
|
5421
|
-
|
|
5422
|
-
|
|
5423
|
-
|
|
5643
|
+
const text = this.elmRef.nativeElement.value;
|
|
5644
|
+
if (!text) {
|
|
5645
|
+
return null;
|
|
5646
|
+
}
|
|
5647
|
+
return this.lastValueValid ? null : { owlDateTimeParse: { text } };
|
|
5424
5648
|
};
|
|
5425
5649
|
/** The form control validator for the min date. */
|
|
5426
5650
|
minValidator = (control) => {
|
|
@@ -5553,6 +5777,9 @@ class OwlDateTimeInputDirective {
|
|
|
5553
5777
|
`modules at your application root: OwlNativeDateTimeModule, OwlMomentDateTimeModule, or provide a ` +
|
|
5554
5778
|
`custom implementation.`);
|
|
5555
5779
|
}
|
|
5780
|
+
// The strict format allows 4-digit years only
|
|
5781
|
+
this.strictMin = this.dateTimeAdapter.createDate(1, 0, 1, 0, 0, 0);
|
|
5782
|
+
this.strictMax = this.dateTimeAdapter.createDate(9999, 11, 31, 23, 59, 59);
|
|
5556
5783
|
this.localeSub = this.dateTimeAdapter.localeChanges.subscribe(() => {
|
|
5557
5784
|
this.value = this.value;
|
|
5558
5785
|
});
|
|
@@ -5636,6 +5863,7 @@ class OwlDateTimeInputDirective {
|
|
|
5636
5863
|
else {
|
|
5637
5864
|
this.changeInputInRangeFromToMode(value);
|
|
5638
5865
|
}
|
|
5866
|
+
this.validatorOnChange();
|
|
5639
5867
|
}
|
|
5640
5868
|
handleChangeOnHost(event) {
|
|
5641
5869
|
let v;
|
|
@@ -5713,6 +5941,15 @@ class OwlDateTimeInputDirective {
|
|
|
5713
5941
|
? obj
|
|
5714
5942
|
: null;
|
|
5715
5943
|
}
|
|
5944
|
+
/**
|
|
5945
|
+
* Whether the input text matches the display format of the picker, checked with strictFormat only.
|
|
5946
|
+
* An empty text is valid, it means no value.
|
|
5947
|
+
*/
|
|
5948
|
+
isValidText(text) {
|
|
5949
|
+
return (!text ||
|
|
5950
|
+
!this.strictFormat ||
|
|
5951
|
+
this.dateTimeAdapter.isValidFormat(text, this.dtPicker.formatString));
|
|
5952
|
+
}
|
|
5716
5953
|
/**
|
|
5717
5954
|
* Convert a time string to a date-time string
|
|
5718
5955
|
* When pickerType is 'timer', the value in the picker's input is a time string.
|
|
@@ -5733,12 +5970,15 @@ class OwlDateTimeInputDirective {
|
|
|
5733
5970
|
* Handle input change in single mode
|
|
5734
5971
|
*/
|
|
5735
5972
|
changeInputInSingleMode(inputValue) {
|
|
5973
|
+
inputValue = (inputValue || '').trim();
|
|
5974
|
+
const validText = this.isValidText(inputValue);
|
|
5736
5975
|
let value = inputValue;
|
|
5737
5976
|
if (this.dtPicker.pickerType === 'timer') {
|
|
5738
5977
|
value = this.convertTimeStringToDateTimeString(value, this.value);
|
|
5739
5978
|
}
|
|
5740
5979
|
let result = this.dateTimeAdapter.parse(value, this.dateTimeFormats.parseInput);
|
|
5741
|
-
this.lastValueValid =
|
|
5980
|
+
this.lastValueValid =
|
|
5981
|
+
validText && (!result || this.dateTimeAdapter.isValid(result));
|
|
5742
5982
|
result = this.getValidDate(result);
|
|
5743
5983
|
// if the newValue is the same as the oldValue, we intend to not fire the valueChange event
|
|
5744
5984
|
// result equals to null means there is input event, but the input value is invalid
|
|
@@ -5757,6 +5997,8 @@ class OwlDateTimeInputDirective {
|
|
|
5757
5997
|
* Handle input change in rangeFrom or rangeTo mode
|
|
5758
5998
|
*/
|
|
5759
5999
|
changeInputInRangeFromToMode(inputValue) {
|
|
6000
|
+
inputValue = (inputValue || '').trim();
|
|
6001
|
+
const validText = this.isValidText(inputValue);
|
|
5760
6002
|
const originalValue = this._selectMode === 'rangeFrom'
|
|
5761
6003
|
? this._values[0]
|
|
5762
6004
|
: this._values[1];
|
|
@@ -5764,7 +6006,8 @@ class OwlDateTimeInputDirective {
|
|
|
5764
6006
|
inputValue = this.convertTimeStringToDateTimeString(inputValue, originalValue);
|
|
5765
6007
|
}
|
|
5766
6008
|
let result = this.dateTimeAdapter.parse(inputValue, this.dateTimeFormats.parseInput);
|
|
5767
|
-
this.lastValueValid =
|
|
6009
|
+
this.lastValueValid =
|
|
6010
|
+
validText && (!result || this.dateTimeAdapter.isValid(result));
|
|
5768
6011
|
result = this.getValidDate(result);
|
|
5769
6012
|
// if the newValue is the same as the oldValue, we intend to not fire the valueChange event
|
|
5770
6013
|
if ((this._selectMode === 'rangeFrom' &&
|
|
@@ -5791,9 +6034,10 @@ class OwlDateTimeInputDirective {
|
|
|
5791
6034
|
* Handle input change in range mode
|
|
5792
6035
|
*/
|
|
5793
6036
|
changeInputInRangeMode(inputValue) {
|
|
5794
|
-
const selecteds = inputValue.split(this.rangeSeparator());
|
|
5795
|
-
let fromString = selecteds[0];
|
|
5796
|
-
let toString = selecteds[1];
|
|
6037
|
+
const selecteds = (inputValue || '').trim().split(this.rangeSeparator());
|
|
6038
|
+
let fromString = (selecteds[0] || '').trim();
|
|
6039
|
+
let toString = (selecteds[1] || '').trim();
|
|
6040
|
+
const validText = this.isValidText(fromString) && this.isValidText(toString);
|
|
5797
6041
|
if (this.dtPicker.pickerType === 'timer') {
|
|
5798
6042
|
fromString = this.convertTimeStringToDateTimeString(fromString, this.values[0]);
|
|
5799
6043
|
toString = this.convertTimeStringToDateTimeString(toString, this.values[1]);
|
|
@@ -5801,7 +6045,8 @@ class OwlDateTimeInputDirective {
|
|
|
5801
6045
|
let from = this.dateTimeAdapter.parse(fromString, this.dateTimeFormats.parseInput);
|
|
5802
6046
|
let to = this.dateTimeAdapter.parse(toString, this.dateTimeFormats.parseInput);
|
|
5803
6047
|
this.lastValueValid =
|
|
5804
|
-
|
|
6048
|
+
validText &&
|
|
6049
|
+
(!from || this.dateTimeAdapter.isValid(from)) &&
|
|
5805
6050
|
(!to || this.dateTimeAdapter.isValid(to));
|
|
5806
6051
|
from = this.getValidDate(from);
|
|
5807
6052
|
to = this.getValidDate(to);
|
|
@@ -5828,13 +6073,13 @@ class OwlDateTimeInputDirective {
|
|
|
5828
6073
|
}
|
|
5829
6074
|
return first === second;
|
|
5830
6075
|
}
|
|
5831
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0
|
|
5832
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0
|
|
6076
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: OwlDateTimeInputDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
6077
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.0", type: OwlDateTimeInputDirective, isStandalone: true, selector: "input[owlDateTime]", inputs: { required: { classPropertyName: "required", publicName: "required", isSignal: false, isRequired: false, transformFunction: null }, owlDateTime: { classPropertyName: "owlDateTime", publicName: "owlDateTime", isSignal: false, isRequired: false, transformFunction: null }, owlDateTimeFilter: { classPropertyName: "owlDateTimeFilter", publicName: "owlDateTimeFilter", isSignal: false, isRequired: false, transformFunction: null }, _disabled: { classPropertyName: "_disabled", publicName: "_disabled", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: false, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: false, isRequired: false, transformFunction: null }, strictFormat: { classPropertyName: "strictFormat", publicName: "strictFormat", isSignal: false, isRequired: false, transformFunction: null }, selectMode: { classPropertyName: "selectMode", publicName: "selectMode", isSignal: false, isRequired: false, transformFunction: null }, rangeSeparator: { classPropertyName: "rangeSeparator", publicName: "rangeSeparator", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: false, isRequired: false, transformFunction: null }, values: { classPropertyName: "values", publicName: "values", isSignal: false, isRequired: false, transformFunction: null } }, outputs: { _disabled: "_disabledChange", dateTimeChange: "dateTimeChange", dateTimeInput: "dateTimeInput" }, host: { listeners: { "keydown": "handleKeydownOnHost($event)", "blur": "handleBlurOnHost($event)", "input": "handleInputOnHost($event)", "change": "handleChangeOnHost($event)" }, properties: { "attr.aria-haspopup": "owlDateTimeInputAriaHaspopup", "attr.aria-owns": "owlDateTimeInputAriaOwns", "attr.min": "minIso8601", "attr.max": "maxIso8601", "disabled": "owlDateTimeInputDisabled" } }, providers: [
|
|
5833
6078
|
OWL_DATETIME_VALUE_ACCESSOR$1,
|
|
5834
6079
|
OWL_DATETIME_VALIDATORS,
|
|
5835
6080
|
], exportAs: ["owlDateTimeInput"], ngImport: i0 });
|
|
5836
6081
|
}
|
|
5837
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0
|
|
6082
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: OwlDateTimeInputDirective, decorators: [{
|
|
5838
6083
|
type: Directive,
|
|
5839
6084
|
args: [{
|
|
5840
6085
|
selector: 'input[owlDateTime]',
|
|
@@ -5865,6 +6110,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
|
|
|
5865
6110
|
type: Input
|
|
5866
6111
|
}], max: [{
|
|
5867
6112
|
type: Input
|
|
6113
|
+
}], strictFormat: [{
|
|
6114
|
+
type: Input
|
|
5868
6115
|
}], selectMode: [{
|
|
5869
6116
|
type: Input
|
|
5870
6117
|
}], rangeSeparator: [{ type: i0.Input, args: [{ isSignal: true, alias: "rangeSeparator", required: false }] }], value: [{
|
|
@@ -5889,10 +6136,10 @@ class NumberFixedLenPipe {
|
|
|
5889
6136
|
}
|
|
5890
6137
|
return numString;
|
|
5891
6138
|
}
|
|
5892
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0
|
|
5893
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "22.0
|
|
6139
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: NumberFixedLenPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
6140
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "22.1.0", ngImport: i0, type: NumberFixedLenPipe, isStandalone: true, name: "numberFixedLen" });
|
|
5894
6141
|
}
|
|
5895
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0
|
|
6142
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: NumberFixedLenPipe, decorators: [{
|
|
5896
6143
|
type: Pipe,
|
|
5897
6144
|
args: [{ name: 'numberFixedLen', }]
|
|
5898
6145
|
}] });
|
|
@@ -6150,10 +6397,10 @@ class OwlDateTimeInlineComponent extends OwlDateTime {
|
|
|
6150
6397
|
selectDate(normalizedDate) {
|
|
6151
6398
|
this.dateSelected.emit(normalizedDate);
|
|
6152
6399
|
}
|
|
6153
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0
|
|
6154
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.0
|
|
6400
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: OwlDateTimeInlineComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
6401
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.1.0", type: OwlDateTimeInlineComponent, isStandalone: true, selector: "owl-date-time-inline", inputs: { pickerType: "pickerType", disabled: "disabled", selectMode: "selectMode", startAt: "startAt", endAt: "endAt", dateTimeFilter: ["owlDateTimeFilter", "dateTimeFilter"], minDateTime: ["min", "minDateTime"], maxDateTime: ["max", "maxDateTime"], value: "value", values: "values" }, outputs: { yearSelected: "yearSelected", monthSelected: "monthSelected", dateSelected: "dateSelected" }, host: { properties: { "class.owl-dt-inline": "owlDTInlineClass" } }, providers: [OWL_DATETIME_VALUE_ACCESSOR], viewQueries: [{ propertyName: "container", first: true, predicate: OwlDateTimeContainerComponent, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<owl-date-time-container></owl-date-time-container>", styles: [":host{--container-enter-animation-duration: 0;--container-leave-animation-duration: 0}\n"], dependencies: [{ kind: "component", type: OwlDateTimeContainerComponent, selector: "owl-date-time-container", exportAs: ["owlDateTimeContainer"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
6155
6402
|
}
|
|
6156
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0
|
|
6403
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: OwlDateTimeInlineComponent, decorators: [{
|
|
6157
6404
|
type: Component,
|
|
6158
6405
|
args: [{ selector: 'owl-date-time-inline', host: {
|
|
6159
6406
|
'[class.owl-dt-inline]': 'owlDTInlineClass'
|
|
@@ -6206,14 +6453,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
|
|
|
6206
6453
|
* ```
|
|
6207
6454
|
*/
|
|
6208
6455
|
class OwlDialogModule {
|
|
6209
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0
|
|
6210
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.0
|
|
6211
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.0
|
|
6456
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: OwlDialogModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
6457
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.1.0", ngImport: i0, type: OwlDialogModule, imports: [CommonModule, A11yModule, OverlayModule, PortalModule, OwlDialogContainerComponent] });
|
|
6458
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: OwlDialogModule, providers: [
|
|
6212
6459
|
OWL_DIALOG_SCROLL_STRATEGY_PROVIDER,
|
|
6213
6460
|
OwlDialogService,
|
|
6214
6461
|
], imports: [CommonModule, A11yModule, OverlayModule, PortalModule] });
|
|
6215
6462
|
}
|
|
6216
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0
|
|
6463
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: OwlDialogModule, decorators: [{
|
|
6217
6464
|
type: NgModule,
|
|
6218
6465
|
args: [{
|
|
6219
6466
|
imports: [CommonModule, A11yModule, OverlayModule, PortalModule, OwlDialogContainerComponent],
|
|
@@ -6329,16 +6576,16 @@ class OwlHourInputComponent {
|
|
|
6329
6576
|
setDisabledState(isDisabled) {
|
|
6330
6577
|
this.disabled.set(isDisabled);
|
|
6331
6578
|
}
|
|
6332
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0
|
|
6333
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0
|
|
6579
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: OwlHourInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
6580
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.0", type: OwlHourInputComponent, isStandalone: true, selector: "owl-hour-input", inputs: { upBtnAriaLabel: { classPropertyName: "upBtnAriaLabel", publicName: "upBtnAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, downBtnAriaLabel: { classPropertyName: "downBtnAriaLabel", publicName: "downBtnAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, step: { classPropertyName: "step", publicName: "step", isSignal: true, isRequired: false, transformFunction: null }, hour12Timer: { classPropertyName: "hour12Timer", publicName: "hour12Timer", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", disabled: "disabledChange" }, host: { properties: { "class.owl-hour-input": "owlHourInputClass" } }, providers: [
|
|
6334
6581
|
{
|
|
6335
6582
|
provide: NG_VALUE_ACCESSOR,
|
|
6336
6583
|
useExisting: forwardRef(() => OwlHourInputComponent),
|
|
6337
6584
|
multi: true
|
|
6338
6585
|
}
|
|
6339
|
-
], exportAs: ["owlHourInput"], ngImport: i0, template: "<owl-date-time-timer-box\n [upBtnAriaLabel]=\"upBtnAriaLabel()\"\n [downBtnAriaLabel]=\"downBtnAriaLabel()\"\n [upBtnDisabled]=\"disabled()\"\n [downBtnDisabled]=\"disabled()\"\n [boxValue]=\"boxValue()\"\n [value]=\"value()\"\n [min]=\"0\"\n [max]=\"23\"\n [step]=\"step()\"\n [inputLabel]=\"'Hour'\"\n (inputChange)=\"setValueViaInput($event)\"\n (valueChange)=\"setValue($event)\"\n></owl-date-time-timer-box>\n\n@if (hour12Timer()) {\n <div class=\"owl-dt-timer-hour12\">\n <button\n class=\"owl-dt-control-button owl-dt-timer-hour12-box\"\n type=\"button\"\n tabindex=\"0\"\n (click)=\"setMeridian()\"\n [disabled]=\"disabled()\"\n >\n <span class=\"owl-dt-control-button-content\" tabindex=\"-1\">\n {{ hour12ButtonLabel() }}\n </span>\n </button>\n </div>\n}\n", dependencies: [{ kind: "component", type: OwlTimerBoxComponent, selector: "owl-date-time-timer-box", inputs: ["showDivider", "upBtnAriaLabel", "upBtnDisabled", "downBtnAriaLabel", "downBtnDisabled", "boxValue", "value", "min", "max", "step", "inputLabel"], outputs: ["valueChange", "inputChange"], exportAs: ["owlDateTimeTimerBox"] }] });
|
|
6586
|
+
], exportAs: ["owlHourInput"], ngImport: i0, template: "<owl-date-time-timer-box\n [upBtnAriaLabel]=\"upBtnAriaLabel()\"\n [downBtnAriaLabel]=\"downBtnAriaLabel()\"\n [upBtnDisabled]=\"disabled()\"\n [downBtnDisabled]=\"disabled()\"\n [boxValue]=\"boxValue()\"\n [value]=\"value()\"\n [min]=\"0\"\n [max]=\"23\"\n [step]=\"step()\"\n [inputLabel]=\"'Hour'\"\n (inputChange)=\"setValueViaInput($event)\"\n (valueChange)=\"setValue($event)\"\n></owl-date-time-timer-box>\n\n@if (hour12Timer()) {\n <div class=\"owl-dt-timer-hour12\">\n <button\n class=\"owl-dt-control-button owl-dt-timer-hour12-box\"\n type=\"button\"\n tabindex=\"0\"\n (click)=\"setMeridian()\"\n [disabled]=\"disabled()\"\n >\n <span class=\"owl-dt-control-button-content\" tabindex=\"-1\">\n {{ hour12ButtonLabel() }}\n </span>\n </button>\n </div>\n}\n", dependencies: [{ kind: "component", type: OwlTimerBoxComponent, selector: "owl-date-time-timer-box", inputs: ["showDivider", "upBtnAriaLabel", "upBtnDisabled", "downBtnAriaLabel", "downBtnDisabled", "boxValue", "value", "min", "max", "step", "wrap", "inputDebounce", "inputLabel"], outputs: ["valueChange", "inputChange"], exportAs: ["owlDateTimeTimerBox"] }] });
|
|
6340
6587
|
}
|
|
6341
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0
|
|
6588
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: OwlHourInputComponent, decorators: [{
|
|
6342
6589
|
type: Component,
|
|
6343
6590
|
args: [{ exportAs: 'owlHourInput', selector: 'owl-hour-input', imports: [OwlTimerBoxComponent], host: {
|
|
6344
6591
|
'[class.owl-hour-input]': 'owlHourInputClass'
|
|
@@ -6389,8 +6636,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
|
|
|
6389
6636
|
* ```
|
|
6390
6637
|
*/
|
|
6391
6638
|
class OwlDateTimeModule {
|
|
6392
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0
|
|
6393
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.0
|
|
6639
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: OwlDateTimeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
6640
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.1.0", ngImport: i0, type: OwlDateTimeModule, imports: [CommonModule, OverlayModule, OwlDialogModule, A11yModule, OwlDateTimeTriggerDirective,
|
|
6394
6641
|
OwlDateTimeInputDirective,
|
|
6395
6642
|
OwlDateTimeComponent,
|
|
6396
6643
|
OwlDateTimeContainerComponent,
|
|
@@ -6414,13 +6661,13 @@ class OwlDateTimeModule {
|
|
|
6414
6661
|
OwlMultiYearViewComponent,
|
|
6415
6662
|
OwlYearViewComponent,
|
|
6416
6663
|
OwlMonthViewComponent] });
|
|
6417
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.0
|
|
6664
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: OwlDateTimeModule, providers: [
|
|
6418
6665
|
OwlDateTimeIntl,
|
|
6419
6666
|
OWL_DTPICKER_SCROLL_STRATEGY_PROVIDER,
|
|
6420
6667
|
...optionsProviders,
|
|
6421
6668
|
], imports: [CommonModule, OverlayModule, OwlDialogModule, A11yModule] });
|
|
6422
6669
|
}
|
|
6423
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0
|
|
6670
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: OwlDateTimeModule, decorators: [{
|
|
6424
6671
|
type: NgModule,
|
|
6425
6672
|
args: [{
|
|
6426
6673
|
imports: [CommonModule, OverlayModule, OwlDialogModule, A11yModule, OwlDateTimeTriggerDirective,
|
|
@@ -6466,13 +6713,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
|
|
|
6466
6713
|
* @see provideOwlNativeDateTime
|
|
6467
6714
|
*/
|
|
6468
6715
|
class NativeDateTimeModule {
|
|
6469
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0
|
|
6470
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.0
|
|
6471
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.0
|
|
6716
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: NativeDateTimeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
6717
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.1.0", ngImport: i0, type: NativeDateTimeModule, imports: [PlatformModule] });
|
|
6718
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: NativeDateTimeModule, providers: [
|
|
6472
6719
|
{ provide: DateTimeAdapter, useClass: NativeDateTimeAdapter },
|
|
6473
6720
|
], imports: [PlatformModule] });
|
|
6474
6721
|
}
|
|
6475
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0
|
|
6722
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: NativeDateTimeModule, decorators: [{
|
|
6476
6723
|
type: NgModule,
|
|
6477
6724
|
args: [{
|
|
6478
6725
|
imports: [PlatformModule],
|
|
@@ -6496,11 +6743,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
|
|
|
6496
6743
|
* ```
|
|
6497
6744
|
*/
|
|
6498
6745
|
class OwlNativeDateTimeModule {
|
|
6499
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0
|
|
6500
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.0
|
|
6501
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.0
|
|
6746
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: OwlNativeDateTimeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
6747
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.1.0", ngImport: i0, type: OwlNativeDateTimeModule, imports: [NativeDateTimeModule] });
|
|
6748
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: OwlNativeDateTimeModule, providers: [{ provide: OWL_DATE_TIME_FORMATS, useValue: OWL_NATIVE_DATE_TIME_FORMATS }], imports: [NativeDateTimeModule] });
|
|
6502
6749
|
}
|
|
6503
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0
|
|
6750
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: OwlNativeDateTimeModule, decorators: [{
|
|
6504
6751
|
type: NgModule,
|
|
6505
6752
|
args: [{
|
|
6506
6753
|
imports: [NativeDateTimeModule],
|