@dhutaryan/ngx-mat-timepicker 16.4.1 → 16.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2022/lib/time-period.mjs +15 -13
- package/esm2022/lib/timepicker-intl.mjs +5 -1
- package/fesm2022/dhutaryan-ngx-mat-timepicker.mjs +20 -15
- package/fesm2022/dhutaryan-ngx-mat-timepicker.mjs.map +1 -1
- package/lib/time-period.d.ts +3 -0
- package/lib/timepicker-intl.d.ts +4 -0
- package/package.json +1 -1
|
@@ -1,15 +1,10 @@
|
|
|
1
1
|
import { Component, ChangeDetectionStrategy, ViewEncapsulation, Input, Output, EventEmitter, } from '@angular/core';
|
|
2
2
|
import { coerceBooleanProperty } from '@angular/cdk/coercion';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
|
-
import * as i1 from "
|
|
5
|
-
import * as i2 from "@angular/material/
|
|
4
|
+
import * as i1 from "./timepicker-intl";
|
|
5
|
+
import * as i2 from "@angular/material/core";
|
|
6
|
+
import * as i3 from "@angular/material/divider";
|
|
6
7
|
export class MatTimePeriod {
|
|
7
|
-
constructor() {
|
|
8
|
-
this._vertical = true;
|
|
9
|
-
this._period = 'am';
|
|
10
|
-
this._disabledPeriod = null;
|
|
11
|
-
this.periodChanged = new EventEmitter();
|
|
12
|
-
}
|
|
13
8
|
/** Whether the time period is vertically aligned. */
|
|
14
9
|
get vertical() {
|
|
15
10
|
return this._vertical;
|
|
@@ -29,6 +24,13 @@ export class MatTimePeriod {
|
|
|
29
24
|
set disabledPeriod(value) {
|
|
30
25
|
this._disabledPeriod = value;
|
|
31
26
|
}
|
|
27
|
+
constructor(_intl) {
|
|
28
|
+
this._intl = _intl;
|
|
29
|
+
this._vertical = true;
|
|
30
|
+
this._period = 'am';
|
|
31
|
+
this._disabledPeriod = null;
|
|
32
|
+
this.periodChanged = new EventEmitter();
|
|
33
|
+
}
|
|
32
34
|
setPeriod(event, period) {
|
|
33
35
|
event.preventDefault();
|
|
34
36
|
this.period = period;
|
|
@@ -40,8 +42,8 @@ export class MatTimePeriod {
|
|
|
40
42
|
}
|
|
41
43
|
return this.disabledPeriod === period;
|
|
42
44
|
}
|
|
43
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.5", ngImport: i0, type: MatTimePeriod, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
44
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.5", type: MatTimePeriod, selector: "mat-time-period", inputs: { vertical: "vertical", period: "period", disabledPeriod: "disabledPeriod" }, outputs: { periodChanged: "periodChanged" }, host: { properties: { "class.mat-time-period-vertical": "vertical", "class.mat-time-period-horizontal": "!vertical", "attr.aria-orientation": "vertical ? \"vertical\" : \"horizontal\"" }, classAttribute: "mat-time-period" }, ngImport: i0, template: "<div\n tabindex=\"0\"\n class=\"mat-time-period-item\"\n matRipple\n [class.mat-time-period-item-active]=\"period === 'am'\"\n [class.mat-time-period-item-disabled]=\"_isPeriodDisabled('am')\"\n (click)=\"setPeriod($event,'am')\"\n (keydown.space)=\"setPeriod($event, 'am')\"\n>\n
|
|
45
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.5", ngImport: i0, type: MatTimePeriod, deps: [{ token: i1.MatTimepickerIntl }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
46
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.5", type: MatTimePeriod, selector: "mat-time-period", inputs: { vertical: "vertical", period: "period", disabledPeriod: "disabledPeriod" }, outputs: { periodChanged: "periodChanged" }, host: { properties: { "class.mat-time-period-vertical": "vertical", "class.mat-time-period-horizontal": "!vertical", "attr.aria-orientation": "vertical ? \"vertical\" : \"horizontal\"" }, classAttribute: "mat-time-period" }, ngImport: i0, template: "<div\n tabindex=\"0\"\n class=\"mat-time-period-item\"\n matRipple\n [class.mat-time-period-item-active]=\"period === 'am'\"\n [class.mat-time-period-item-disabled]=\"_isPeriodDisabled('am')\"\n (click)=\"setPeriod($event, 'am')\"\n (keydown.space)=\"setPeriod($event, 'am')\"\n>\n {{ _intl.am }}\n</div>\n<mat-divider [vertical]=\"!vertical\"></mat-divider>\n<div\n tabindex=\"0\"\n class=\"mat-time-period-item\"\n matRipple\n [class.mat-time-period-item-active]=\"period === 'pm'\"\n [class.mat-time-period-item-disabled]=\"_isPeriodDisabled('pm')\"\n (click)=\"setPeriod($event, 'pm')\"\n (keydown.space)=\"setPeriod($event, 'pm')\"\n>\n {{ _intl.pm }}\n</div>\n", styles: [".mat-time-period{display:flex;text-align:center;border-width:1px;border-style:solid;border-radius:.25rem;box-sizing:border-box}.mat-time-period-vertical{flex-direction:column;width:3.25rem;height:4.5rem}.mat-time-period-horizontal{flex-direction:row;max-width:13.5rem;width:100%;height:2.5rem}.mat-time-period-item{display:flex;flex-direction:column;justify-content:center;flex-grow:1;height:100%;font-size:.875rem;font-weight:500;cursor:pointer}.mat-time-period-item-disabled{pointer-events:none}\n"], dependencies: [{ kind: "directive", type: i2.MatRipple, selector: "[mat-ripple], [matRipple]", inputs: ["matRippleColor", "matRippleUnbounded", "matRippleCentered", "matRippleRadius", "matRippleAnimation", "matRippleDisabled", "matRippleTrigger"], exportAs: ["matRipple"] }, { kind: "component", type: i3.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
45
47
|
}
|
|
46
48
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.5", ngImport: i0, type: MatTimePeriod, decorators: [{
|
|
47
49
|
type: Component,
|
|
@@ -50,8 +52,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.5", ngImpor
|
|
|
50
52
|
'[class.mat-time-period-vertical]': 'vertical',
|
|
51
53
|
'[class.mat-time-period-horizontal]': '!vertical',
|
|
52
54
|
'[attr.aria-orientation]': 'vertical ? "vertical" : "horizontal"',
|
|
53
|
-
}, template: "<div\n tabindex=\"0\"\n class=\"mat-time-period-item\"\n matRipple\n [class.mat-time-period-item-active]=\"period === 'am'\"\n [class.mat-time-period-item-disabled]=\"_isPeriodDisabled('am')\"\n (click)=\"setPeriod($event,'am')\"\n (keydown.space)=\"setPeriod($event, 'am')\"\n>\n
|
|
54
|
-
}], propDecorators: { vertical: [{
|
|
55
|
+
}, template: "<div\n tabindex=\"0\"\n class=\"mat-time-period-item\"\n matRipple\n [class.mat-time-period-item-active]=\"period === 'am'\"\n [class.mat-time-period-item-disabled]=\"_isPeriodDisabled('am')\"\n (click)=\"setPeriod($event, 'am')\"\n (keydown.space)=\"setPeriod($event, 'am')\"\n>\n {{ _intl.am }}\n</div>\n<mat-divider [vertical]=\"!vertical\"></mat-divider>\n<div\n tabindex=\"0\"\n class=\"mat-time-period-item\"\n matRipple\n [class.mat-time-period-item-active]=\"period === 'pm'\"\n [class.mat-time-period-item-disabled]=\"_isPeriodDisabled('pm')\"\n (click)=\"setPeriod($event, 'pm')\"\n (keydown.space)=\"setPeriod($event, 'pm')\"\n>\n {{ _intl.pm }}\n</div>\n", styles: [".mat-time-period{display:flex;text-align:center;border-width:1px;border-style:solid;border-radius:.25rem;box-sizing:border-box}.mat-time-period-vertical{flex-direction:column;width:3.25rem;height:4.5rem}.mat-time-period-horizontal{flex-direction:row;max-width:13.5rem;width:100%;height:2.5rem}.mat-time-period-item{display:flex;flex-direction:column;justify-content:center;flex-grow:1;height:100%;font-size:.875rem;font-weight:500;cursor:pointer}.mat-time-period-item-disabled{pointer-events:none}\n"] }]
|
|
56
|
+
}], ctorParameters: function () { return [{ type: i1.MatTimepickerIntl }]; }, propDecorators: { vertical: [{
|
|
55
57
|
type: Input
|
|
56
58
|
}], period: [{
|
|
57
59
|
type: Input
|
|
@@ -60,4 +62,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.5", ngImpor
|
|
|
60
62
|
}], periodChanged: [{
|
|
61
63
|
type: Output
|
|
62
64
|
}] } });
|
|
63
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
65
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGltZS1wZXJpb2QuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9wcm9qZWN0cy9tYXQtdGltZXBpY2tlci9zcmMvbGliL3RpbWUtcGVyaW9kLnRzIiwiLi4vLi4vLi4vLi4vcHJvamVjdHMvbWF0LXRpbWVwaWNrZXIvc3JjL2xpYi90aW1lLXBlcmlvZC5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFDTCxTQUFTLEVBQ1QsdUJBQXVCLEVBQ3ZCLGlCQUFpQixFQUNqQixLQUFLLEVBQ0wsTUFBTSxFQUNOLFlBQVksR0FDYixNQUFNLGVBQWUsQ0FBQztBQUN2QixPQUFPLEVBQWdCLHFCQUFxQixFQUFFLE1BQU0sdUJBQXVCLENBQUM7Ozs7O0FBbUI1RSxNQUFNLE9BQU8sYUFBYTtJQUN4QixxREFBcUQ7SUFDckQsSUFDSSxRQUFRO1FBQ1YsT0FBTyxJQUFJLENBQUMsU0FBUyxDQUFDO0lBQ3hCLENBQUM7SUFDRCxJQUFJLFFBQVEsQ0FBQyxLQUFtQjtRQUM5QixJQUFJLENBQUMsU0FBUyxHQUFHLHFCQUFxQixDQUFDLEtBQUssQ0FBQyxDQUFDO0lBQ2hELENBQUM7SUFHRCxJQUNJLE1BQU07UUFDUixPQUFPLElBQUksQ0FBQyxPQUFPLENBQUM7SUFDdEIsQ0FBQztJQUNELElBQUksTUFBTSxDQUFDLEtBQXdCO1FBQ2pDLElBQUksQ0FBQyxPQUFPLEdBQUcsS0FBSyxJQUFJLElBQUksQ0FBQztJQUMvQixDQUFDO0lBR0QsSU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PVwic2V0UGVyaW9kKCRldmVudCwgJ2FtJylcIlxuPlxuICB7eyBfaW50bC5hbSB9fVxuPC9kaXY+XG48bWF0LWRpdmlkZXIgW3ZlcnRpY2FsXT1cIiF2ZXJ0aWNhbFwiPjwvbWF0LWRpdmlkZXI+XG48ZGl2XG4gIHRhYmluZGV4PVwiMFwiXG4gIGNsYXNzPVwibWF0LXRpbWUtcGVyaW9kLWl0ZW1cIlxuICBtYXRSaXBwbGVcbiAgW2NsYXNzLm1hdC10aW1lLXBlcmlvZC1pdGVtLWFjdGl2ZV09XCJwZXJpb2QgPT09ICdwbSdcIlxuICBbY2xhc3MubWF0LXRpbWUtcGVyaW9kLWl0ZW0tZGlzYWJsZWRdPVwiX2lzUGVyaW9kRGlzYWJsZWQoJ3BtJylcIlxuICAoY2xpY2spPVwic2V0UGVyaW9kKCRldmVudCwgJ3BtJylcIlxuICAoa2V5ZG93bi5zcGFjZSk9XCJzZXRQZXJpb2QoJGV2ZW50LCAncG0nKVwiXG4+XG4gIHt7IF9pbnRsLnBtIH19XG48L2Rpdj5cbiJdfQ==
|
|
@@ -18,6 +18,10 @@ export class MatTimepickerIntl {
|
|
|
18
18
|
this.okButton = 'OK';
|
|
19
19
|
/** A label for cancel button to close timepicker. */
|
|
20
20
|
this.cancelButton = 'Cancel';
|
|
21
|
+
/** A label for am text. */
|
|
22
|
+
this.am = 'AM';
|
|
23
|
+
/** A label for am text. */
|
|
24
|
+
this.pm = 'PM';
|
|
21
25
|
}
|
|
22
26
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.5", ngImport: i0, type: MatTimepickerIntl, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
23
27
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.5", ngImport: i0, type: MatTimepickerIntl, providedIn: 'root' }); }
|
|
@@ -26,4 +30,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.5", ngImpor
|
|
|
26
30
|
type: Injectable,
|
|
27
31
|
args: [{ providedIn: 'root' }]
|
|
28
32
|
}] });
|
|
29
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
33
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGltZXBpY2tlci1pbnRsLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vcHJvamVjdHMvbWF0LXRpbWVwaWNrZXIvc3JjL2xpYi90aW1lcGlja2VyLWludGwudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFVBQVUsRUFBRSxNQUFNLGVBQWUsQ0FBQzs7QUFHM0MsTUFBTSxPQUFPLGlCQUFpQjtJQUQ5QjtRQUVFLGdDQUFnQztRQUNoQyxnQkFBVyxHQUFHLFlBQVksQ0FBQztRQUUzQiwrQkFBK0I7UUFDL0IsZUFBVSxHQUFHLGFBQWEsQ0FBQztRQUUzQixtQ0FBbUM7UUFDbkMsa0JBQWEsR0FBRyxNQUFNLENBQUM7UUFFdkIscUNBQXFDO1FBQ3JDLG9CQUFlLEdBQUcsUUFBUSxDQUFDO1FBRTNCLHVGQUF1RjtRQUN2Rix3QkFBbUIsR0FBRyxpQkFBaUIsQ0FBQztRQUV4Qyx3RkFBd0Y7UUFDeEYseUJBQW9CLEdBQUcsa0JBQWtCLENBQUM7UUFFMUMsMkNBQTJDO1FBQzNDLGFBQVEsR0FBRyxJQUFJLENBQUM7UUFFaEIscURBQXFEO1FBQ3JELGlCQUFZLEdBQUcsUUFBUSxDQUFDO1FBRXhCLDJCQUEyQjtRQUMzQixPQUFFLEdBQUcsSUFBSSxDQUFDO1FBRVYsMkJBQTJCO1FBQzNCLE9BQUUsR0FBRyxJQUFJLENBQUM7S0FDWDs4R0E5QlksaUJBQWlCO2tIQUFqQixpQkFBaUIsY0FESixNQUFNOzsyRkFDbkIsaUJBQWl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bCBmb3IgY2FuY2VsIGJ1dHRvbiB0byBjbG9zZSB0aW1lcGlja2VyLiAqL1xuICBjYW5jZWxCdXR0b24gPSAnQ2FuY2VsJztcblxuICAvKiogQSBsYWJlbCBmb3IgYW0gdGV4dC4gKi9cbiAgYW0gPSAnQU0nO1xuXG4gIC8qKiBBIGxhYmVsIGZvciBhbSB0ZXh0LiAqL1xuICBwbSA9ICdQTSc7XG59XG4iXX0=
|
|
@@ -2,7 +2,7 @@ import * as i0 from '@angular/core';
|
|
|
2
2
|
import { InjectionToken, Injectable, Directive, Component, ViewEncapsulation, ChangeDetectionStrategy, Attribute, Input, ContentChild, EventEmitter, Inject, Output, inject, LOCALE_ID, Optional, NgModule, HostListener, SkipSelf, ViewChild, forwardRef, TemplateRef } from '@angular/core';
|
|
3
3
|
import * as i3 from '@angular/common';
|
|
4
4
|
import { DOCUMENT, CommonModule } from '@angular/common';
|
|
5
|
-
import * as i1
|
|
5
|
+
import * as i1 from '@angular/cdk/overlay';
|
|
6
6
|
import { Overlay, FlexibleConnectedPositionStrategy, OverlayConfig, OverlayModule } from '@angular/cdk/overlay';
|
|
7
7
|
import * as i5$1 from '@angular/cdk/portal';
|
|
8
8
|
import { ComponentPortal, TemplatePortal, PortalModule } from '@angular/cdk/portal';
|
|
@@ -16,9 +16,9 @@ import { MAT_FORM_FIELD, MatFormFieldModule } from '@angular/material/form-field
|
|
|
16
16
|
import * as i5 from '@angular/material/input';
|
|
17
17
|
import { MAT_INPUT_VALUE_ACCESSOR, MatInputModule } from '@angular/material/input';
|
|
18
18
|
import { MatIconModule } from '@angular/material/icon';
|
|
19
|
-
import * as
|
|
19
|
+
import * as i2$1 from '@angular/material/core';
|
|
20
20
|
import { mixinColor, MatRippleModule } from '@angular/material/core';
|
|
21
|
-
import * as
|
|
21
|
+
import * as i3$1 from '@angular/material/divider';
|
|
22
22
|
import { MatDividerModule } from '@angular/material/divider';
|
|
23
23
|
import { coerceBooleanProperty, coerceNumberProperty } from '@angular/cdk/coercion';
|
|
24
24
|
import { Subscription, of, merge, fromEvent, debounceTime, take, BehaviorSubject, Subject, first, filter } from 'rxjs';
|
|
@@ -58,6 +58,10 @@ class MatTimepickerIntl {
|
|
|
58
58
|
this.okButton = 'OK';
|
|
59
59
|
/** A label for cancel button to close timepicker. */
|
|
60
60
|
this.cancelButton = 'Cancel';
|
|
61
|
+
/** A label for am text. */
|
|
62
|
+
this.am = 'AM';
|
|
63
|
+
/** A label for am text. */
|
|
64
|
+
this.pm = 'PM';
|
|
61
65
|
}
|
|
62
66
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.5", ngImport: i0, type: MatTimepickerIntl, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
63
67
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.5", ngImport: i0, type: MatTimepickerIntl, providedIn: 'root' }); }
|
|
@@ -1182,12 +1186,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.5", ngImpor
|
|
|
1182
1186
|
}] } });
|
|
1183
1187
|
|
|
1184
1188
|
class MatTimePeriod {
|
|
1185
|
-
constructor() {
|
|
1186
|
-
this._vertical = true;
|
|
1187
|
-
this._period = 'am';
|
|
1188
|
-
this._disabledPeriod = null;
|
|
1189
|
-
this.periodChanged = new EventEmitter();
|
|
1190
|
-
}
|
|
1191
1189
|
/** Whether the time period is vertically aligned. */
|
|
1192
1190
|
get vertical() {
|
|
1193
1191
|
return this._vertical;
|
|
@@ -1207,6 +1205,13 @@ class MatTimePeriod {
|
|
|
1207
1205
|
set disabledPeriod(value) {
|
|
1208
1206
|
this._disabledPeriod = value;
|
|
1209
1207
|
}
|
|
1208
|
+
constructor(_intl) {
|
|
1209
|
+
this._intl = _intl;
|
|
1210
|
+
this._vertical = true;
|
|
1211
|
+
this._period = 'am';
|
|
1212
|
+
this._disabledPeriod = null;
|
|
1213
|
+
this.periodChanged = new EventEmitter();
|
|
1214
|
+
}
|
|
1210
1215
|
setPeriod(event, period) {
|
|
1211
1216
|
event.preventDefault();
|
|
1212
1217
|
this.period = period;
|
|
@@ -1218,8 +1223,8 @@ class MatTimePeriod {
|
|
|
1218
1223
|
}
|
|
1219
1224
|
return this.disabledPeriod === period;
|
|
1220
1225
|
}
|
|
1221
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.5", ngImport: i0, type: MatTimePeriod, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1222
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.5", type: MatTimePeriod, selector: "mat-time-period", inputs: { vertical: "vertical", period: "period", disabledPeriod: "disabledPeriod" }, outputs: { periodChanged: "periodChanged" }, host: { properties: { "class.mat-time-period-vertical": "vertical", "class.mat-time-period-horizontal": "!vertical", "attr.aria-orientation": "vertical ? \"vertical\" : \"horizontal\"" }, classAttribute: "mat-time-period" }, ngImport: i0, template: "<div\n tabindex=\"0\"\n class=\"mat-time-period-item\"\n matRipple\n [class.mat-time-period-item-active]=\"period === 'am'\"\n [class.mat-time-period-item-disabled]=\"_isPeriodDisabled('am')\"\n (click)=\"setPeriod($event,'am')\"\n (keydown.space)=\"setPeriod($event, 'am')\"\n>\n
|
|
1226
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.5", ngImport: i0, type: MatTimePeriod, deps: [{ token: MatTimepickerIntl }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1227
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.5", type: MatTimePeriod, selector: "mat-time-period", inputs: { vertical: "vertical", period: "period", disabledPeriod: "disabledPeriod" }, outputs: { periodChanged: "periodChanged" }, host: { properties: { "class.mat-time-period-vertical": "vertical", "class.mat-time-period-horizontal": "!vertical", "attr.aria-orientation": "vertical ? \"vertical\" : \"horizontal\"" }, classAttribute: "mat-time-period" }, ngImport: i0, template: "<div\n tabindex=\"0\"\n class=\"mat-time-period-item\"\n matRipple\n [class.mat-time-period-item-active]=\"period === 'am'\"\n [class.mat-time-period-item-disabled]=\"_isPeriodDisabled('am')\"\n (click)=\"setPeriod($event, 'am')\"\n (keydown.space)=\"setPeriod($event, 'am')\"\n>\n {{ _intl.am }}\n</div>\n<mat-divider [vertical]=\"!vertical\"></mat-divider>\n<div\n tabindex=\"0\"\n class=\"mat-time-period-item\"\n matRipple\n [class.mat-time-period-item-active]=\"period === 'pm'\"\n [class.mat-time-period-item-disabled]=\"_isPeriodDisabled('pm')\"\n (click)=\"setPeriod($event, 'pm')\"\n (keydown.space)=\"setPeriod($event, 'pm')\"\n>\n {{ _intl.pm }}\n</div>\n", styles: [".mat-time-period{display:flex;text-align:center;border-width:1px;border-style:solid;border-radius:.25rem;box-sizing:border-box}.mat-time-period-vertical{flex-direction:column;width:3.25rem;height:4.5rem}.mat-time-period-horizontal{flex-direction:row;max-width:13.5rem;width:100%;height:2.5rem}.mat-time-period-item{display:flex;flex-direction:column;justify-content:center;flex-grow:1;height:100%;font-size:.875rem;font-weight:500;cursor:pointer}.mat-time-period-item-disabled{pointer-events:none}\n"], dependencies: [{ kind: "directive", type: i2$1.MatRipple, selector: "[mat-ripple], [matRipple]", inputs: ["matRippleColor", "matRippleUnbounded", "matRippleCentered", "matRippleRadius", "matRippleAnimation", "matRippleDisabled", "matRippleTrigger"], exportAs: ["matRipple"] }, { kind: "component", type: i3$1.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
1223
1228
|
}
|
|
1224
1229
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.5", ngImport: i0, type: MatTimePeriod, decorators: [{
|
|
1225
1230
|
type: Component,
|
|
@@ -1228,8 +1233,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.5", ngImpor
|
|
|
1228
1233
|
'[class.mat-time-period-vertical]': 'vertical',
|
|
1229
1234
|
'[class.mat-time-period-horizontal]': '!vertical',
|
|
1230
1235
|
'[attr.aria-orientation]': 'vertical ? "vertical" : "horizontal"',
|
|
1231
|
-
}, template: "<div\n tabindex=\"0\"\n class=\"mat-time-period-item\"\n matRipple\n [class.mat-time-period-item-active]=\"period === 'am'\"\n [class.mat-time-period-item-disabled]=\"_isPeriodDisabled('am')\"\n (click)=\"setPeriod($event,'am')\"\n (keydown.space)=\"setPeriod($event, 'am')\"\n>\n
|
|
1232
|
-
}], propDecorators: { vertical: [{
|
|
1236
|
+
}, template: "<div\n tabindex=\"0\"\n class=\"mat-time-period-item\"\n matRipple\n [class.mat-time-period-item-active]=\"period === 'am'\"\n [class.mat-time-period-item-disabled]=\"_isPeriodDisabled('am')\"\n (click)=\"setPeriod($event, 'am')\"\n (keydown.space)=\"setPeriod($event, 'am')\"\n>\n {{ _intl.am }}\n</div>\n<mat-divider [vertical]=\"!vertical\"></mat-divider>\n<div\n tabindex=\"0\"\n class=\"mat-time-period-item\"\n matRipple\n [class.mat-time-period-item-active]=\"period === 'pm'\"\n [class.mat-time-period-item-disabled]=\"_isPeriodDisabled('pm')\"\n (click)=\"setPeriod($event, 'pm')\"\n (keydown.space)=\"setPeriod($event, 'pm')\"\n>\n {{ _intl.pm }}\n</div>\n", styles: [".mat-time-period{display:flex;text-align:center;border-width:1px;border-style:solid;border-radius:.25rem;box-sizing:border-box}.mat-time-period-vertical{flex-direction:column;width:3.25rem;height:4.5rem}.mat-time-period-horizontal{flex-direction:row;max-width:13.5rem;width:100%;height:2.5rem}.mat-time-period-item{display:flex;flex-direction:column;justify-content:center;flex-grow:1;height:100%;font-size:.875rem;font-weight:500;cursor:pointer}.mat-time-period-item-disabled{pointer-events:none}\n"] }]
|
|
1237
|
+
}], ctorParameters: function () { return [{ type: MatTimepickerIntl }]; }, propDecorators: { vertical: [{
|
|
1233
1238
|
type: Input
|
|
1234
1239
|
}], period: [{
|
|
1235
1240
|
type: Input
|
|
@@ -2027,12 +2032,12 @@ class MatTimepickerBase {
|
|
|
2027
2032
|
event.keyCode === UP_ARROW));
|
|
2028
2033
|
})));
|
|
2029
2034
|
}
|
|
2030
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.5", ngImport: i0, type: MatTimepickerBase, deps: [{ token: i0.ViewContainerRef }, { token: i1
|
|
2035
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.5", ngImport: i0, type: MatTimepickerBase, deps: [{ token: i0.ViewContainerRef }, { token: i1.Overlay }, { token: i0.NgZone }, { token: MAT_TIMEPICKER_SCROLL_STRATEGY }, { token: MAT_DEFAULT_ACITONS }, { token: MatTimeSelectionModel }, { token: MAT_TIMEPICKER_DEFAULT_OPTIONS, optional: true }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
2031
2036
|
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.5", type: MatTimepickerBase, inputs: { disabled: "disabled", opened: "opened", openAs: "openAs", color: "color", mode: "mode", format: "format", showToggleModeButton: "showToggleModeButton", minuteInterval: "minuteInterval", orientation: "orientation", xPosition: "xPosition", yPosition: "yPosition", restoreFocus: "restoreFocus" }, outputs: { openedStream: "opened", closedStream: "closed" }, usesOnChanges: true, ngImport: i0 }); }
|
|
2032
2037
|
}
|
|
2033
2038
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.5", ngImport: i0, type: MatTimepickerBase, decorators: [{
|
|
2034
2039
|
type: Directive
|
|
2035
|
-
}], ctorParameters: function () { return [{ type: i0.ViewContainerRef }, { type: i1
|
|
2040
|
+
}], ctorParameters: function () { return [{ type: i0.ViewContainerRef }, { type: i1.Overlay }, { type: i0.NgZone }, { type: undefined, decorators: [{
|
|
2036
2041
|
type: Inject,
|
|
2037
2042
|
args: [MAT_TIMEPICKER_SCROLL_STRATEGY]
|
|
2038
2043
|
}] }, { type: undefined, decorators: [{
|