@dhutaryan/ngx-mat-timepicker 0.0.1 → 0.0.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/README.md +17 -1
- package/bundles/dhutaryan-ngx-mat-timepicker.umd.js +60 -34
- package/bundles/dhutaryan-ngx-mat-timepicker.umd.js.map +1 -1
- package/esm2015/lib/clock-dials.js +13 -11
- package/esm2015/lib/time-inputs.js +17 -15
- package/esm2015/lib/timepicker-base.js +3 -3
- package/esm2015/lib/timepicker-intl.js +21 -0
- package/esm2015/lib/timepicker.module.js +4 -1
- package/esm2015/public-api.js +2 -1
- package/fesm2015/dhutaryan-ngx-mat-timepicker.js +43 -20
- package/fesm2015/dhutaryan-ngx-mat-timepicker.js.map +1 -1
- package/lib/clock-dials.d.ts +4 -2
- package/lib/time-inputs.d.ts +6 -4
- package/lib/timepicker-base.d.ts +1 -1
- package/lib/timepicker-intl.d.ts +13 -0
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
# ngx-mat-timepicker
|
|
4
4
|
|
|
5
5
|
[](https://www.npmjs.com/package/@dhutaryan/ngx-mat-timepicker)
|
|
6
|
-
[](https://www.codefactor.io/repository/github/dgutoryan/ngx-timepicker)
|
|
6
|
+
[](https://www.codefactor.io/repository/github/dgutoryan/ngx-mat-timepicker)
|
|
7
7
|
[](https://github.com/dgutoryan/ngx-timepicker/blob/master/LICENSE)
|
|
8
8
|
|
|
9
9
|
The timepicker module using Angular material.
|
|
@@ -95,6 +95,22 @@ Then you have to define a theme. [More details about theming](https://material.a
|
|
|
95
95
|
</mat-form-field>
|
|
96
96
|
```
|
|
97
97
|
|
|
98
|
+
## Locale
|
|
99
|
+
|
|
100
|
+
Default locale is `en-US`. You can set your locale as:
|
|
101
|
+
|
|
102
|
+
```typescript
|
|
103
|
+
import { MAT_TIME_LOCALE } from "@dhutaryan/ngx-mat-timepicker";
|
|
104
|
+
|
|
105
|
+
@NgModule({
|
|
106
|
+
imports: [
|
|
107
|
+
// ...
|
|
108
|
+
],
|
|
109
|
+
providers: [{ provide: MAT_TIME_LOCALE, useValue: "en-GB" }],
|
|
110
|
+
})
|
|
111
|
+
export class MyModule {}
|
|
112
|
+
```
|
|
113
|
+
|
|
98
114
|
## License
|
|
99
115
|
|
|
100
116
|
MIT
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@angular/cdk/overlay'), require('@angular/cdk/portal'), require('@angular/cdk/scrolling'), require('@angular/cdk/a11y'), require('@angular/material/button'), require('@angular/material/form-field'), require('@angular/material/input'), require('@angular/material/icon'), require('@angular/material/core'), require('@angular/material/divider'), require('@angular/cdk/coercion'), require('@angular/cdk/keycodes'), require('rxjs'), require('@angular/animations'), require('@angular/cdk/platform'), require('@angular/forms')) :
|
|
3
3
|
typeof define === 'function' && define.amd ? define('@dhutaryan/ngx-mat-timepicker', ['exports', '@angular/core', '@angular/common', '@angular/cdk/overlay', '@angular/cdk/portal', '@angular/cdk/scrolling', '@angular/cdk/a11y', '@angular/material/button', '@angular/material/form-field', '@angular/material/input', '@angular/material/icon', '@angular/material/core', '@angular/material/divider', '@angular/cdk/coercion', '@angular/cdk/keycodes', 'rxjs', '@angular/animations', '@angular/cdk/platform', '@angular/forms'], factory) :
|
|
4
4
|
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.dhutaryan = global.dhutaryan || {}, global.dhutaryan["ngx-mat-timepicker"] = {}), global.ng.core, global.ng.common, global.ng.cdk.overlay, global.ng.cdk.portal, global.ng.cdk.scrolling, global.ng.cdk.a11y, global.ng.material.button, global.ng.material.formField, global.ng.material.input, global.ng.material.icon, global.ng.material.core, global.ng.material.divider, global.ng.cdk.coercion, global.ng.cdk.keycodes, global.rxjs, global.ng.animations, global.ng.cdk.platform, global.ng.forms));
|
|
5
|
-
})(this, (function (exports, i0, i2, i1, i8, scrolling, i6, i1$1,
|
|
5
|
+
})(this, (function (exports, i0, i2, i1, i8, scrolling, i6$1, i1$1, i4, i6, icon, i2$1, i1$2, coercion, keycodes, rxjs, animations, platform, forms) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopNamespace(e) {
|
|
8
8
|
if (e && e.__esModule) return e;
|
|
@@ -26,10 +26,10 @@
|
|
|
26
26
|
var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
|
|
27
27
|
var i1__namespace$2 = /*#__PURE__*/_interopNamespace(i1);
|
|
28
28
|
var i8__namespace = /*#__PURE__*/_interopNamespace(i8);
|
|
29
|
-
var i6__namespace = /*#__PURE__*/_interopNamespace(i6);
|
|
29
|
+
var i6__namespace$1 = /*#__PURE__*/_interopNamespace(i6$1);
|
|
30
30
|
var i1__namespace = /*#__PURE__*/_interopNamespace(i1$1);
|
|
31
|
-
var
|
|
32
|
-
var
|
|
31
|
+
var i4__namespace = /*#__PURE__*/_interopNamespace(i4);
|
|
32
|
+
var i6__namespace = /*#__PURE__*/_interopNamespace(i6);
|
|
33
33
|
var i2__namespace$1 = /*#__PURE__*/_interopNamespace(i2$1);
|
|
34
34
|
var i1__namespace$1 = /*#__PURE__*/_interopNamespace(i1$2);
|
|
35
35
|
|
|
@@ -841,6 +841,26 @@
|
|
|
841
841
|
type: i0.Output
|
|
842
842
|
}] } });
|
|
843
843
|
|
|
844
|
+
var MatTimepickerIntl = /** @class */ (function () {
|
|
845
|
+
function MatTimepickerIntl() {
|
|
846
|
+
/** A label for inputs title. */
|
|
847
|
+
this.inputsTitle = 'Enter time';
|
|
848
|
+
/** A label for dials title. */
|
|
849
|
+
this.dialsTitle = 'Select time';
|
|
850
|
+
/** A label for hour input hint. */
|
|
851
|
+
this.hourInputHint = 'Hour';
|
|
852
|
+
/** A label for minute input hint. */
|
|
853
|
+
this.minuteInputHint = 'Minute';
|
|
854
|
+
}
|
|
855
|
+
return MatTimepickerIntl;
|
|
856
|
+
}());
|
|
857
|
+
MatTimepickerIntl.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: MatTimepickerIntl, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
858
|
+
MatTimepickerIntl.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: MatTimepickerIntl, providedIn: 'root' });
|
|
859
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: MatTimepickerIntl, decorators: [{
|
|
860
|
+
type: i0.Injectable,
|
|
861
|
+
args: [{ providedIn: 'root' }]
|
|
862
|
+
}] });
|
|
863
|
+
|
|
844
864
|
var MatTimepickerContentLayout = /** @class */ (function () {
|
|
845
865
|
function MatTimepickerContentLayout() {
|
|
846
866
|
}
|
|
@@ -929,9 +949,9 @@
|
|
|
929
949
|
return newValue < 10 ? "0" + newValue : "" + newValue;
|
|
930
950
|
}
|
|
931
951
|
var MatTimeInput = /** @class */ (function () {
|
|
932
|
-
function MatTimeInput(element,
|
|
952
|
+
function MatTimeInput(element, _cdr, _document) {
|
|
933
953
|
this.element = element;
|
|
934
|
-
this.
|
|
954
|
+
this._cdr = _cdr;
|
|
935
955
|
this._document = _document;
|
|
936
956
|
this._min = 0;
|
|
937
957
|
this._max = Infinity;
|
|
@@ -1002,11 +1022,11 @@
|
|
|
1002
1022
|
else {
|
|
1003
1023
|
this.inputElement.value = '';
|
|
1004
1024
|
}
|
|
1005
|
-
this.
|
|
1025
|
+
this._cdr.markForCheck();
|
|
1006
1026
|
};
|
|
1007
1027
|
MatTimeInput.prototype.setInputPlaceholder = function (value) {
|
|
1008
1028
|
this.inputElement.placeholder = this._withZeroPrefix(value);
|
|
1009
|
-
this.
|
|
1029
|
+
this._cdr.markForCheck();
|
|
1010
1030
|
};
|
|
1011
1031
|
MatTimeInput.prototype._withZeroPrefix = function (value) {
|
|
1012
1032
|
return withZeroPrefix(value, this.isMeridiem);
|
|
@@ -1056,13 +1076,15 @@
|
|
|
1056
1076
|
}] } });
|
|
1057
1077
|
var MatTimeInputs = /** @class */ (function (_super) {
|
|
1058
1078
|
__extends(MatTimeInputs, _super);
|
|
1059
|
-
function MatTimeInputs(_timeAdapter) {
|
|
1060
|
-
|
|
1079
|
+
function MatTimeInputs(_intl, _timeAdapter) {
|
|
1080
|
+
var _this = _super.call(this, _timeAdapter) || this;
|
|
1081
|
+
_this._intl = _intl;
|
|
1082
|
+
return _this;
|
|
1061
1083
|
}
|
|
1062
1084
|
return MatTimeInputs;
|
|
1063
1085
|
}(MatTimeFaceBase));
|
|
1064
|
-
MatTimeInputs.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: MatTimeInputs, deps: [{ token: TimeAdapter, optional: true }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1065
|
-
MatTimeInputs.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: MatTimeInputs, selector: "mat-time-inputs", host: { classAttribute: "mat-time-inputs" }, usesInheritance: true, ngImport: i0__namespace, template: "<mat-timepicker-content-layout title=\"
|
|
1086
|
+
MatTimeInputs.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: MatTimeInputs, deps: [{ token: MatTimepickerIntl }, { token: TimeAdapter, optional: true }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1087
|
+
MatTimeInputs.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: MatTimeInputs, selector: "mat-time-inputs", host: { classAttribute: "mat-time-inputs" }, usesInheritance: true, ngImport: i0__namespace, template: "<mat-timepicker-content-layout [title]=\"_intl.inputsTitle\">\r\n <mat-form-field class=\"mat-time-inputs-field\" appearance=\"outline\" hours>\r\n <input\r\n type=\"text\"\r\n inputmode=\"numeric\"\r\n maxlength=\"2\"\r\n matInput\r\n matTimeInput\r\n [isMeridiem]=\"isMeridiem\"\r\n [value]=\"selectedHour\"\r\n [min]=\"isMeridiem ? 1 : 0\"\r\n [max]=\"isMeridiem ? 12 : 23\"\r\n (timeChanged)=\"_onHourSelected($event)\"\r\n />\r\n <mat-hint>{{_intl.hourInputHint}}</mat-hint>\r\n </mat-form-field>\r\n <mat-form-field class=\"mat-time-inputs-field\" appearance=\"outline\" minutes>\r\n <input\r\n type=\"text\"\r\n inputmode=\"numeric\"\r\n maxlength=\"2\"\r\n matInput\r\n matTimeInput\r\n [value]=\"selectedMinute\"\r\n [min]=\"0\"\r\n [max]=\"59\"\r\n (timeChanged)=\"_onMinuteSelected($event)\"\r\n />\r\n <mat-hint>{{_intl.minuteInputHint}}</mat-hint>\r\n </mat-form-field>\r\n\r\n <ng-template mat-time-period [ngIf]=\"isMeridiem\">\r\n <mat-time-period\r\n [period]=\"period\"\r\n (periodChanged)=\"_onPeriodChanged($event)\"\r\n ></mat-time-period>\r\n </ng-template>\r\n</mat-timepicker-content-layout>\r\n", styles: [".mat-time-inputs{display:block}.mat-time-inputs .mat-timepicker-content-layout-separator{margin-top:-1.25rem}.mat-time-inputs-field{display:block}.mat-time-inputs-field.mat-form-field-appearance-outline .mat-form-field-flex{margin:0}.mat-time-inputs-field.mat-form-field-appearance-outline .mat-form-field-outline{top:0}.mat-time-inputs-field.mat-form-field-appearance-outline .mat-form-field-wrapper{top:0;margin:0;padding-bottom:1.25rem}.mat-time-inputs-field.mat-form-field-appearance-outline .mat-form-field-infix{padding:1rem 0}.mat-time-inputs-field.mat-form-field-appearance-outline .mat-form-field-subscript-wrapper{margin-top:.59375rem;padding-left:0;line-height:1;letter-spacing:.05rem}.mat-time-inputs-field .mat-form-field-infix{border-top:none;text-align:center}.mat-time-inputs-field input.mat-input-element{margin-top:0;line-height:normal}\n"], components: [{ type: MatTimepickerContentLayout, selector: "mat-timepicker-content-layout", inputs: ["title"], exportAs: ["matTimepickerContent"] }, { type: i4__namespace.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }, { type: MatTimePeriod, selector: "mat-time-period", inputs: ["vertical", "period"], outputs: ["periodChanged"] }], directives: [{ type: i6__namespace.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["id", "disabled", "required", "type", "value", "readonly", "placeholder", "errorStateMatcher", "aria-describedby"], exportAs: ["matInput"] }, { type: MatTimeInput, selector: "input[matTimeInput]", inputs: ["min", "max", "value", "isMeridiem"], outputs: ["timeChanged"], exportAs: ["matTimeInput"] }, { type: i4__namespace.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { type: i2__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush, encapsulation: i0__namespace.ViewEncapsulation.None });
|
|
1066
1088
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: MatTimeInputs, decorators: [{
|
|
1067
1089
|
type: i0.Component,
|
|
1068
1090
|
args: [{
|
|
@@ -1076,7 +1098,7 @@
|
|
|
1076
1098
|
},
|
|
1077
1099
|
}]
|
|
1078
1100
|
}], ctorParameters: function () {
|
|
1079
|
-
return [{ type: TimeAdapter, decorators: [{
|
|
1101
|
+
return [{ type: MatTimepickerIntl }, { type: TimeAdapter, decorators: [{
|
|
1080
1102
|
type: i0.Optional
|
|
1081
1103
|
}] }];
|
|
1082
1104
|
} });
|
|
@@ -1375,8 +1397,9 @@
|
|
|
1375
1397
|
|
|
1376
1398
|
var MatClockDials = /** @class */ (function (_super) {
|
|
1377
1399
|
__extends(MatClockDials, _super);
|
|
1378
|
-
function MatClockDials(_timeAdapter) {
|
|
1400
|
+
function MatClockDials(_intl, _timeAdapter) {
|
|
1379
1401
|
var _this = _super.call(this, _timeAdapter) || this;
|
|
1402
|
+
_this._intl = _intl;
|
|
1380
1403
|
_this.isHoursView = true;
|
|
1381
1404
|
/** Specifies the view of clock dial. */
|
|
1382
1405
|
_this._view = new rxjs.BehaviorSubject('hours');
|
|
@@ -1406,8 +1429,8 @@
|
|
|
1406
1429
|
};
|
|
1407
1430
|
return MatClockDials;
|
|
1408
1431
|
}(MatTimeFaceBase));
|
|
1409
|
-
MatClockDials.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: MatClockDials, deps: [{ token: TimeAdapter, optional: true }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1410
|
-
MatClockDials.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: MatClockDials, selector: "mat-clock-dials", host: { classAttribute: "mat-clock-dials" }, exportAs: ["matClockDials"], usesInheritance: true, ngImport: i0__namespace, template: "<mat-timepicker-content-layout title=\"
|
|
1432
|
+
MatClockDials.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: MatClockDials, deps: [{ token: MatTimepickerIntl }, { token: TimeAdapter, optional: true }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1433
|
+
MatClockDials.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: MatClockDials, selector: "mat-clock-dials", host: { classAttribute: "mat-clock-dials" }, exportAs: ["matClockDials"], usesInheritance: true, ngImport: i0__namespace, template: "<mat-timepicker-content-layout [title]=\"_intl.dialsTitle\">\r\n <div\r\n class=\"mat-clock-dial-value\"\r\n hours\r\n [class.mat-clock-dial-value-active]=\"isHoursView\"\r\n (click)=\"onViewChange('hours')\"\r\n >\r\n {{ _withZeroPrefix(selectedHour) }}\r\n </div>\r\n <div\r\n class=\"mat-clock-dial-value\"\r\n minutes\r\n [class.mat-clock-dial-value-active]=\"!isHoursView\"\r\n (click)=\"onViewChange('minutes')\"\r\n >\r\n {{ _withZeroPrefix(selectedMinute) }}\r\n </div>\r\n\r\n <ng-template mat-time-period [ngIf]=\"isMeridiem\">\r\n <mat-time-period\r\n [period]=\"period\"\r\n (periodChanged)=\"_onPeriodChanged($event)\"\r\n ></mat-time-period>\r\n </ng-template>\r\n\r\n <div class=\"mat-clock-dial-faces\">\r\n <ng-template [ngIf]=\"isHoursView\">\r\n <mat-hours-clock-dial\r\n [selectedHour]=\"selectedHour\"\r\n [isMeridiem]=\"isMeridiem\"\r\n (selectedChange)=\"_onHourChanged($event)\"\r\n ></mat-hours-clock-dial>\r\n </ng-template>\r\n <ng-template [ngIf]=\"!isHoursView\">\r\n <mat-minutes-clock-dial\r\n [selectedMinute]=\"selectedMinute\"\r\n (selectedChange)=\"_onMinuteSelected($event)\"\r\n ></mat-minutes-clock-dial>\r\n </ng-template>\r\n </div>\r\n</mat-timepicker-content-layout>\r\n", styles: [".mat-clock-dial-values{display:flex;width:100%}.mat-clock-dial-value{display:flex;align-items:center;justify-content:center;height:4.375rem;border-radius:.25rem;cursor:pointer}.mat-clock-dial-faces{margin-top:2.25rem}\n"], components: [{ type: MatTimepickerContentLayout, selector: "mat-timepicker-content-layout", inputs: ["title"], exportAs: ["matTimepickerContent"] }, { type: MatTimePeriod, selector: "mat-time-period", inputs: ["vertical", "period"], outputs: ["periodChanged"] }, { type: MatHoursClockDial, selector: "mat-hours-clock-dial", inputs: ["selectedHour", "isMeridiem"], outputs: ["selectedChange"], exportAs: ["matHoursClockDial"] }, { type: MatMinutesClockDial, selector: "mat-minutes-clock-dial", inputs: ["selectedMinute"], outputs: ["selectedChange"], exportAs: ["matMinutesClockDial"] }], directives: [{ type: i2__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush, encapsulation: i0__namespace.ViewEncapsulation.None });
|
|
1411
1434
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: MatClockDials, decorators: [{
|
|
1412
1435
|
type: i0.Component,
|
|
1413
1436
|
args: [{
|
|
@@ -1422,7 +1445,7 @@
|
|
|
1422
1445
|
},
|
|
1423
1446
|
}]
|
|
1424
1447
|
}], ctorParameters: function () {
|
|
1425
|
-
return [{ type: TimeAdapter, decorators: [{
|
|
1448
|
+
return [{ type: MatTimepickerIntl }, { type: TimeAdapter, decorators: [{
|
|
1426
1449
|
type: i0.Optional
|
|
1427
1450
|
}] }];
|
|
1428
1451
|
} });
|
|
@@ -1497,7 +1520,7 @@
|
|
|
1497
1520
|
return MatTimepickerContent;
|
|
1498
1521
|
}(_MatTimepickerContentBase));
|
|
1499
1522
|
MatTimepickerContent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: MatTimepickerContent, deps: [{ token: i0__namespace.ElementRef }, { token: MatTimeSelectionModel }, { token: i0__namespace.ChangeDetectorRef }, { token: TimeAdapter }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1500
|
-
MatTimepickerContent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: MatTimepickerContent, selector: "mat-timepicker-content", host: { listeners: { "@transformPanel.done": "_animationDone.next()" }, properties: { "@transformPanel": "_animationState" }, classAttribute: "mat-timepicker-content" }, exportAs: ["matTimepickerContent"], usesInheritance: true, ngImport: i0__namespace, template: "<div class=\"mat-timepicker-content-container\" cdkTrapFocus>\r\n <ng-container [ngSwitch]=\"mode\">\r\n <ng-template ngSwitchCase=\"input\">\r\n <mat-time-inputs\r\n [isMeridiem]=\"isMeridiem\"\r\n [selected]=\"_getSelected()\"\r\n (_userSelection)=\"_handleUserSelection($event)\"\r\n ></mat-time-inputs>\r\n\r\n <div class=\"mat-timepicker-content-actions\">\r\n <button\r\n class=\"mat-time-toggle-mode-button\"\r\n mat-icon-button\r\n (click)=\"onToggleMode('dial')\"\r\n >\r\n <svg\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n height=\"24\"\r\n width=\"24\"\r\n viewBox=\"0 0 24 24\"\r\n >\r\n <path\r\n d=\"m15.175 16.625 1.475-1.45-3.6-3.6V7.1h-2.075v5.3ZM12 21.95q-2.075 0-3.887-.787-1.813-.788-3.15-2.125-1.338-1.338-2.125-3.151Q2.05 14.075 2.05 12t.788-3.887q.787-1.813 2.125-3.15Q6.3 3.625 8.113 2.837 9.925 2.05 12 2.05t3.887.787q1.813.788 3.151 2.126 1.337 1.337 2.125 3.15.787 1.812.787 3.887t-.787 3.887q-.788 1.813-2.125 3.151-1.338 1.337-3.151 2.125-1.812.787-3.887.787ZM12 12Zm0 7.8q3.225 0 5.513-2.275Q19.8 15.25 19.8 12q0-3.25-2.287-5.525Q15.225 4.2 12 4.2T6.488 6.475Q4.2 8.75 4.2 12q0 3.25 2.288 5.525Q8.775 19.8 12 19.8Z\"\r\n />\r\n </svg>\r\n </button>\r\n\r\n <ng-template [cdkPortalOutlet]=\"_actionsPortal\"></ng-template>\r\n </div>\r\n </ng-template>\r\n <ng-template ngSwitchCase=\"dial\">\r\n <mat-clock-dials\r\n [isMeridiem]=\"isMeridiem\"\r\n [selected]=\"_getSelected()\"\r\n (_userSelection)=\"_handleUserSelection($event)\"\r\n ></mat-clock-dials>\r\n\r\n <div class=\"mat-timepicker-content-actions\">\r\n <button\r\n class=\"mat-time-toggle-mode-button\"\r\n mat-icon-button\r\n (click)=\"onToggleMode('input')\"\r\n >\r\n <svg\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n height=\"24\"\r\n width=\"24\"\r\n viewBox=\"0 0 24 24\"\r\n >\r\n <path\r\n d=\"M4 19q-.825 0-1.412-.587Q2 17.825 2 17V7q0-.825.588-1.412Q3.175 5 4 5h16q.825 0 1.413.588Q22 6.175 22 7v10q0 .825-.587 1.413Q20.825 19 20 19Zm0-2h16V7H4v10Zm4-1h8v-2H8Zm-3-3h2v-2H5Zm3 0h2v-2H8Zm3 0h2v-2h-2Zm3 0h2v-2h-2Zm3 0h2v-2h-2ZM5 10h2V8H5Zm3 0h2V8H8Zm3 0h2V8h-2Zm3 0h2V8h-2Zm3 0h2V8h-2ZM4 17V7v10Z\"\r\n />\r\n </svg>\r\n </button>\r\n\r\n <ng-template [cdkPortalOutlet]=\"_actionsPortal\"></ng-template>\r\n </div>\r\n </ng-template>\r\n </ng-container>\r\n</div>\r\n", styles: [".mat-timepicker-content{display:block;border-radius:4px}.mat-timepicker-content-container{display:flex;flex-direction:column;padding:.5rem 1.5rem}.mat-timepicker-content-actions{display:flex;justify-content:space-between;margin-right:-1rem;margin-top:1.5rem}.mat-time-toggle-mode-button{width:3.25rem;height:3.25rem;margin-left:-.75rem;margin-bottom:-.25rem;line-height:3.25rem}\n"], components: [{ type: MatTimeInputs, selector: "mat-time-inputs" }, { type: i1__namespace.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: MatClockDials, selector: "mat-clock-dials", exportAs: ["matClockDials"] }], directives: [{ type: i6__namespace.CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }, { type: i2__namespace.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i2__namespace.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i8__namespace.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }], animations: [
|
|
1523
|
+
MatTimepickerContent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: MatTimepickerContent, selector: "mat-timepicker-content", host: { listeners: { "@transformPanel.done": "_animationDone.next()" }, properties: { "@transformPanel": "_animationState" }, classAttribute: "mat-timepicker-content" }, exportAs: ["matTimepickerContent"], usesInheritance: true, ngImport: i0__namespace, template: "<div class=\"mat-timepicker-content-container\" cdkTrapFocus>\r\n <ng-container [ngSwitch]=\"mode\">\r\n <ng-template ngSwitchCase=\"input\">\r\n <mat-time-inputs\r\n [isMeridiem]=\"isMeridiem\"\r\n [selected]=\"_getSelected()\"\r\n (_userSelection)=\"_handleUserSelection($event)\"\r\n ></mat-time-inputs>\r\n\r\n <div class=\"mat-timepicker-content-actions\">\r\n <button\r\n class=\"mat-time-toggle-mode-button\"\r\n mat-icon-button\r\n (click)=\"onToggleMode('dial')\"\r\n >\r\n <svg\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n height=\"24\"\r\n width=\"24\"\r\n viewBox=\"0 0 24 24\"\r\n >\r\n <path\r\n d=\"m15.175 16.625 1.475-1.45-3.6-3.6V7.1h-2.075v5.3ZM12 21.95q-2.075 0-3.887-.787-1.813-.788-3.15-2.125-1.338-1.338-2.125-3.151Q2.05 14.075 2.05 12t.788-3.887q.787-1.813 2.125-3.15Q6.3 3.625 8.113 2.837 9.925 2.05 12 2.05t3.887.787q1.813.788 3.151 2.126 1.337 1.337 2.125 3.15.787 1.812.787 3.887t-.787 3.887q-.788 1.813-2.125 3.151-1.338 1.337-3.151 2.125-1.812.787-3.887.787ZM12 12Zm0 7.8q3.225 0 5.513-2.275Q19.8 15.25 19.8 12q0-3.25-2.287-5.525Q15.225 4.2 12 4.2T6.488 6.475Q4.2 8.75 4.2 12q0 3.25 2.288 5.525Q8.775 19.8 12 19.8Z\"\r\n />\r\n </svg>\r\n </button>\r\n\r\n <ng-template [cdkPortalOutlet]=\"_actionsPortal\"></ng-template>\r\n </div>\r\n </ng-template>\r\n <ng-template ngSwitchCase=\"dial\">\r\n <mat-clock-dials\r\n [isMeridiem]=\"isMeridiem\"\r\n [selected]=\"_getSelected()\"\r\n (_userSelection)=\"_handleUserSelection($event)\"\r\n ></mat-clock-dials>\r\n\r\n <div class=\"mat-timepicker-content-actions\">\r\n <button\r\n class=\"mat-time-toggle-mode-button\"\r\n mat-icon-button\r\n (click)=\"onToggleMode('input')\"\r\n >\r\n <svg\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n height=\"24\"\r\n width=\"24\"\r\n viewBox=\"0 0 24 24\"\r\n >\r\n <path\r\n d=\"M4 19q-.825 0-1.412-.587Q2 17.825 2 17V7q0-.825.588-1.412Q3.175 5 4 5h16q.825 0 1.413.588Q22 6.175 22 7v10q0 .825-.587 1.413Q20.825 19 20 19Zm0-2h16V7H4v10Zm4-1h8v-2H8Zm-3-3h2v-2H5Zm3 0h2v-2H8Zm3 0h2v-2h-2Zm3 0h2v-2h-2Zm3 0h2v-2h-2ZM5 10h2V8H5Zm3 0h2V8H8Zm3 0h2V8h-2Zm3 0h2V8h-2Zm3 0h2V8h-2ZM4 17V7v10Z\"\r\n />\r\n </svg>\r\n </button>\r\n\r\n <ng-template [cdkPortalOutlet]=\"_actionsPortal\"></ng-template>\r\n </div>\r\n </ng-template>\r\n </ng-container>\r\n</div>\r\n", styles: [".mat-timepicker-content{display:block;border-radius:4px}.mat-timepicker-content-container{display:flex;flex-direction:column;padding:.5rem 1.5rem}.mat-timepicker-content-actions{display:flex;justify-content:space-between;margin-right:-1rem;margin-top:1.5rem}.mat-time-toggle-mode-button{width:3.25rem;height:3.25rem;margin-left:-.75rem;margin-bottom:-.25rem;line-height:3.25rem}\n"], components: [{ type: MatTimeInputs, selector: "mat-time-inputs" }, { type: i1__namespace.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: MatClockDials, selector: "mat-clock-dials", exportAs: ["matClockDials"] }], directives: [{ type: i6__namespace$1.CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }, { type: i2__namespace.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i2__namespace.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i8__namespace.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }], animations: [
|
|
1501
1524
|
matTimepickerAnimations.transformPanel,
|
|
1502
1525
|
matTimepickerAnimations.fadeInTimepicker,
|
|
1503
1526
|
], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush, encapsulation: i0__namespace.ViewEncapsulation.None });
|
|
@@ -1536,7 +1559,7 @@
|
|
|
1536
1559
|
this._opened = false;
|
|
1537
1560
|
this._openAs = 'popup';
|
|
1538
1561
|
this._mode = 'dial';
|
|
1539
|
-
this._format = '
|
|
1562
|
+
this._format = '12h';
|
|
1540
1563
|
/** Preferred position of the timepicker in the X axis. */
|
|
1541
1564
|
this.xPosition = 'start';
|
|
1542
1565
|
/** Preferred position of the timepicker in the Y axis. */
|
|
@@ -1716,7 +1739,7 @@
|
|
|
1716
1739
|
instance.timepicker = this;
|
|
1717
1740
|
instance.color = this.color;
|
|
1718
1741
|
instance.mode = this.mode;
|
|
1719
|
-
instance.isMeridiem = this.format === '
|
|
1742
|
+
instance.isMeridiem = this.format === '12h';
|
|
1720
1743
|
instance._assignActions(this._actionsPortal || defaultPortal, false);
|
|
1721
1744
|
};
|
|
1722
1745
|
/** Opens the overlay with the timepicker. */
|
|
@@ -2172,11 +2195,11 @@
|
|
|
2172
2195
|
};
|
|
2173
2196
|
return MatTimepickerInput;
|
|
2174
2197
|
}(MatTimepickerInputBase));
|
|
2175
|
-
MatTimepickerInput.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: MatTimepickerInput, deps: [{ token: i0__namespace.ElementRef }, { token: TimeAdapter, optional: true }, { token:
|
|
2198
|
+
MatTimepickerInput.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: MatTimepickerInput, deps: [{ token: i0__namespace.ElementRef }, { token: TimeAdapter, optional: true }, { token: i4.MAT_FORM_FIELD, optional: true }], target: i0__namespace.ɵɵFactoryTarget.Directive });
|
|
2176
2199
|
MatTimepickerInput.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: MatTimepickerInput, selector: "input[matTimepicker]", inputs: { matTimepicker: "matTimepicker" }, host: { listeners: { "input": "_onInput($event.target.value)", "change": "_onChange()", "blur": "_onBlur()" }, properties: { "disabled": "disabled" }, classAttribute: "mat-timepicker-input" }, providers: [
|
|
2177
2200
|
MAT_TIMEPICKER_VALUE_ACCESSOR,
|
|
2178
2201
|
MAT_TIMEPICKER_VALIDATORS,
|
|
2179
|
-
{ provide:
|
|
2202
|
+
{ provide: i6.MAT_INPUT_VALUE_ACCESSOR, useExisting: MatTimepickerInput },
|
|
2180
2203
|
], exportAs: ["matTimepickerInput"], usesInheritance: true, ngImport: i0__namespace });
|
|
2181
2204
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: MatTimepickerInput, decorators: [{
|
|
2182
2205
|
type: i0.Directive,
|
|
@@ -2186,7 +2209,7 @@
|
|
|
2186
2209
|
providers: [
|
|
2187
2210
|
MAT_TIMEPICKER_VALUE_ACCESSOR,
|
|
2188
2211
|
MAT_TIMEPICKER_VALIDATORS,
|
|
2189
|
-
{ provide:
|
|
2212
|
+
{ provide: i6.MAT_INPUT_VALUE_ACCESSOR, useExisting: MatTimepickerInput },
|
|
2190
2213
|
],
|
|
2191
2214
|
host: {
|
|
2192
2215
|
class: 'mat-timepicker-input',
|
|
@@ -2199,11 +2222,11 @@
|
|
|
2199
2222
|
}], ctorParameters: function () {
|
|
2200
2223
|
return [{ type: i0__namespace.ElementRef }, { type: TimeAdapter, decorators: [{
|
|
2201
2224
|
type: i0.Optional
|
|
2202
|
-
}] }, { type:
|
|
2225
|
+
}] }, { type: i4__namespace.MatFormField, decorators: [{
|
|
2203
2226
|
type: i0.Optional
|
|
2204
2227
|
}, {
|
|
2205
2228
|
type: i0.Inject,
|
|
2206
|
-
args: [
|
|
2229
|
+
args: [i4.MAT_FORM_FIELD]
|
|
2207
2230
|
}] }];
|
|
2208
2231
|
}, propDecorators: { matTimepicker: [{
|
|
2209
2232
|
type: i0.Input
|
|
@@ -2334,14 +2357,14 @@
|
|
|
2334
2357
|
MatTimepickerApply,
|
|
2335
2358
|
MatTimepickerCancel], imports: [i2.CommonModule,
|
|
2336
2359
|
i1$1.MatButtonModule,
|
|
2337
|
-
|
|
2338
|
-
|
|
2360
|
+
i4.MatFormFieldModule,
|
|
2361
|
+
i6.MatInputModule,
|
|
2339
2362
|
icon.MatIconModule,
|
|
2340
2363
|
i2$1.MatRippleModule,
|
|
2341
2364
|
i1$2.MatDividerModule,
|
|
2342
2365
|
i1.OverlayModule,
|
|
2343
2366
|
i8.PortalModule,
|
|
2344
|
-
i6.A11yModule], exports: [scrolling.CdkScrollableModule,
|
|
2367
|
+
i6$1.A11yModule], exports: [scrolling.CdkScrollableModule,
|
|
2345
2368
|
MatTimepickerToggle,
|
|
2346
2369
|
MatTimepickerToggleIcon,
|
|
2347
2370
|
MatTimepicker,
|
|
@@ -2358,20 +2381,21 @@
|
|
|
2358
2381
|
MatTimepickerApply,
|
|
2359
2382
|
MatTimepickerCancel] });
|
|
2360
2383
|
MatTimepickerModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: MatTimepickerModule, providers: [
|
|
2384
|
+
MatTimepickerIntl,
|
|
2361
2385
|
MAT_TIMEPICKER_SCROLL_STRATEGY_FACTORY_PROVIDER,
|
|
2362
2386
|
{ provide: Window, useValue: window },
|
|
2363
2387
|
{ provide: MAT_DEFAULT_ACITONS, useValue: MatTimepickerDefaultActions },
|
|
2364
2388
|
], imports: [[
|
|
2365
2389
|
i2.CommonModule,
|
|
2366
2390
|
i1$1.MatButtonModule,
|
|
2367
|
-
|
|
2368
|
-
|
|
2391
|
+
i4.MatFormFieldModule,
|
|
2392
|
+
i6.MatInputModule,
|
|
2369
2393
|
icon.MatIconModule,
|
|
2370
2394
|
i2$1.MatRippleModule,
|
|
2371
2395
|
i1$2.MatDividerModule,
|
|
2372
2396
|
i1.OverlayModule,
|
|
2373
2397
|
i8.PortalModule,
|
|
2374
|
-
i6.A11yModule,
|
|
2398
|
+
i6$1.A11yModule,
|
|
2375
2399
|
], scrolling.CdkScrollableModule] });
|
|
2376
2400
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: MatTimepickerModule, decorators: [{
|
|
2377
2401
|
type: i0.NgModule,
|
|
@@ -2397,14 +2421,14 @@
|
|
|
2397
2421
|
imports: [
|
|
2398
2422
|
i2.CommonModule,
|
|
2399
2423
|
i1$1.MatButtonModule,
|
|
2400
|
-
|
|
2401
|
-
|
|
2424
|
+
i4.MatFormFieldModule,
|
|
2425
|
+
i6.MatInputModule,
|
|
2402
2426
|
icon.MatIconModule,
|
|
2403
2427
|
i2$1.MatRippleModule,
|
|
2404
2428
|
i1$2.MatDividerModule,
|
|
2405
2429
|
i1.OverlayModule,
|
|
2406
2430
|
i8.PortalModule,
|
|
2407
|
-
i6.A11yModule,
|
|
2431
|
+
i6$1.A11yModule,
|
|
2408
2432
|
],
|
|
2409
2433
|
exports: [
|
|
2410
2434
|
scrolling.CdkScrollableModule,
|
|
@@ -2425,6 +2449,7 @@
|
|
|
2425
2449
|
MatTimepickerCancel,
|
|
2426
2450
|
],
|
|
2427
2451
|
providers: [
|
|
2452
|
+
MatTimepickerIntl,
|
|
2428
2453
|
MAT_TIMEPICKER_SCROLL_STRATEGY_FACTORY_PROVIDER,
|
|
2429
2454
|
{ provide: Window, useValue: window },
|
|
2430
2455
|
{ provide: MAT_DEFAULT_ACITONS, useValue: MatTimepickerDefaultActions },
|
|
@@ -2463,6 +2488,7 @@
|
|
|
2463
2488
|
exports.MatTimepickerContentLayout = MatTimepickerContentLayout;
|
|
2464
2489
|
exports.MatTimepickerDefaultActions = MatTimepickerDefaultActions;
|
|
2465
2490
|
exports.MatTimepickerInput = MatTimepickerInput;
|
|
2491
|
+
exports.MatTimepickerIntl = MatTimepickerIntl;
|
|
2466
2492
|
exports.MatTimepickerModule = MatTimepickerModule;
|
|
2467
2493
|
exports.MatTimepickerToggle = MatTimepickerToggle;
|
|
2468
2494
|
exports.MatTimepickerToggleIcon = MatTimepickerToggleIcon;
|