@onemrvapublic/design-system 20.11.3 → 21.0.0-develop.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 +5 -9
- package/fesm2022/onemrvapublic-design-system-flag-icon.mjs +14 -20
- package/fesm2022/onemrvapublic-design-system-flag-icon.mjs.map +1 -1
- package/fesm2022/onemrvapublic-design-system-layout.mjs +207 -290
- package/fesm2022/onemrvapublic-design-system-layout.mjs.map +1 -1
- package/fesm2022/onemrvapublic-design-system-mat-address.mjs +19 -25
- package/fesm2022/onemrvapublic-design-system-mat-address.mjs.map +1 -1
- package/fesm2022/onemrvapublic-design-system-mat-avatar.mjs +58 -223
- package/fesm2022/onemrvapublic-design-system-mat-avatar.mjs.map +1 -1
- package/fesm2022/onemrvapublic-design-system-mat-breadcrumb.mjs +47 -53
- package/fesm2022/onemrvapublic-design-system-mat-breadcrumb.mjs.map +1 -1
- package/fesm2022/onemrvapublic-design-system-mat-carousel.mjs +50 -71
- package/fesm2022/onemrvapublic-design-system-mat-carousel.mjs.map +1 -1
- package/fesm2022/onemrvapublic-design-system-mat-choice-chip.mjs +27 -29
- package/fesm2022/onemrvapublic-design-system-mat-choice-chip.mjs.map +1 -1
- package/fesm2022/onemrvapublic-design-system-mat-copy-to-clipboard.mjs +24 -42
- package/fesm2022/onemrvapublic-design-system-mat-copy-to-clipboard.mjs.map +1 -1
- package/fesm2022/onemrvapublic-design-system-mat-country-item.mjs +8 -12
- package/fesm2022/onemrvapublic-design-system-mat-country-item.mjs.map +1 -1
- package/fesm2022/onemrvapublic-design-system-mat-datepicker-header.mjs +4 -4
- package/fesm2022/onemrvapublic-design-system-mat-datepicker-header.mjs.map +1 -1
- package/fesm2022/onemrvapublic-design-system-mat-empty-row.mjs +10 -18
- package/fesm2022/onemrvapublic-design-system-mat-empty-row.mjs.map +1 -1
- package/fesm2022/onemrvapublic-design-system-mat-file-upload.mjs +98 -173
- package/fesm2022/onemrvapublic-design-system-mat-file-upload.mjs.map +1 -1
- package/fesm2022/onemrvapublic-design-system-mat-input-address.mjs +32 -52
- package/fesm2022/onemrvapublic-design-system-mat-input-address.mjs.map +1 -1
- package/fesm2022/onemrvapublic-design-system-mat-input-birthplace.mjs +10 -13
- package/fesm2022/onemrvapublic-design-system-mat-input-birthplace.mjs.map +1 -1
- package/fesm2022/onemrvapublic-design-system-mat-input-country.mjs +10 -13
- package/fesm2022/onemrvapublic-design-system-mat-input-country.mjs.map +1 -1
- package/fesm2022/onemrvapublic-design-system-mat-input-enterprise-number.mjs +24 -44
- package/fesm2022/onemrvapublic-design-system-mat-input-enterprise-number.mjs.map +1 -1
- package/fesm2022/onemrvapublic-design-system-mat-input-iban.mjs +22 -40
- package/fesm2022/onemrvapublic-design-system-mat-input-iban.mjs.map +1 -1
- package/fesm2022/onemrvapublic-design-system-mat-input-phone.mjs +26 -39
- package/fesm2022/onemrvapublic-design-system-mat-input-phone.mjs.map +1 -1
- package/fesm2022/onemrvapublic-design-system-mat-message-box.mjs +45 -180
- package/fesm2022/onemrvapublic-design-system-mat-message-box.mjs.map +1 -1
- package/fesm2022/onemrvapublic-design-system-mat-multi-select.mjs +38 -63
- package/fesm2022/onemrvapublic-design-system-mat-multi-select.mjs.map +1 -1
- package/fesm2022/onemrvapublic-design-system-mat-navigation.mjs +40 -65
- package/fesm2022/onemrvapublic-design-system-mat-navigation.mjs.map +1 -1
- package/fesm2022/onemrvapublic-design-system-mat-notification.mjs +19 -59
- package/fesm2022/onemrvapublic-design-system-mat-notification.mjs.map +1 -1
- package/fesm2022/onemrvapublic-design-system-mat-paginator.mjs +23 -49
- package/fesm2022/onemrvapublic-design-system-mat-paginator.mjs.map +1 -1
- package/fesm2022/onemrvapublic-design-system-mat-panel.mjs +61 -101
- package/fesm2022/onemrvapublic-design-system-mat-panel.mjs.map +1 -1
- package/fesm2022/onemrvapublic-design-system-mat-pop-over.mjs +30 -50
- package/fesm2022/onemrvapublic-design-system-mat-pop-over.mjs.map +1 -1
- package/fesm2022/onemrvapublic-design-system-mat-progress-bar.mjs +26 -38
- package/fesm2022/onemrvapublic-design-system-mat-progress-bar.mjs.map +1 -1
- package/fesm2022/onemrvapublic-design-system-mat-select-search.mjs +66 -105
- package/fesm2022/onemrvapublic-design-system-mat-select-search.mjs.map +1 -1
- package/fesm2022/onemrvapublic-design-system-mat-selectable-box.mjs +23 -43
- package/fesm2022/onemrvapublic-design-system-mat-selectable-box.mjs.map +1 -1
- package/fesm2022/onemrvapublic-design-system-mat-side-menu.mjs +15 -26
- package/fesm2022/onemrvapublic-design-system-mat-side-menu.mjs.map +1 -1
- package/fesm2022/onemrvapublic-design-system-mat-skeleton.mjs +62 -177
- package/fesm2022/onemrvapublic-design-system-mat-skeleton.mjs.map +1 -1
- package/fesm2022/onemrvapublic-design-system-mat-spinner.mjs +17 -21
- package/fesm2022/onemrvapublic-design-system-mat-spinner.mjs.map +1 -1
- package/fesm2022/onemrvapublic-design-system-mat-stepper.mjs +14 -22
- package/fesm2022/onemrvapublic-design-system-mat-stepper.mjs.map +1 -1
- package/fesm2022/onemrvapublic-design-system-mat-sticker.mjs +8 -8
- package/fesm2022/onemrvapublic-design-system-mat-sticker.mjs.map +1 -1
- package/fesm2022/onemrvapublic-design-system-mat-table-of-content.mjs +79 -93
- package/fesm2022/onemrvapublic-design-system-mat-table-of-content.mjs.map +1 -1
- package/fesm2022/onemrvapublic-design-system-mat-task-list.mjs +59 -94
- package/fesm2022/onemrvapublic-design-system-mat-task-list.mjs.map +1 -1
- package/fesm2022/onemrvapublic-design-system-mat-timepicker.mjs +178 -245
- package/fesm2022/onemrvapublic-design-system-mat-timepicker.mjs.map +1 -1
- package/fesm2022/onemrvapublic-design-system-mat-toast.mjs +7 -7
- package/fesm2022/onemrvapublic-design-system-mat-toast.mjs.map +1 -1
- package/fesm2022/onemrvapublic-design-system-mat-tooltip.mjs +33 -43
- package/fesm2022/onemrvapublic-design-system-mat-tooltip.mjs.map +1 -1
- package/fesm2022/onemrvapublic-design-system-page-error.mjs +33 -39
- package/fesm2022/onemrvapublic-design-system-page-error.mjs.map +1 -1
- package/fesm2022/onemrvapublic-design-system-page-not-found.mjs +38 -42
- package/fesm2022/onemrvapublic-design-system-page-not-found.mjs.map +1 -1
- package/fesm2022/onemrvapublic-design-system-shared.mjs +188 -312
- package/fesm2022/onemrvapublic-design-system-shared.mjs.map +1 -1
- package/fesm2022/onemrvapublic-design-system-utils.mjs.map +1 -1
- package/mat-choice-chip/src/onemrva-mat-choice-chip.component.scss +13 -3
- package/mat-empty-row/src/onemrva-mat-empty-row.component.scss +2 -2
- package/mat-file-upload/src/components/onemrva-mat-file-panel/onemrva-file-panel.component.scss +1 -1
- package/mat-input-phone/src/onemrva-mat-input-phone.component.scss +1 -1
- package/mat-panel/src/onemrva-mat-panel-content.scss +1 -1
- package/mat-skeleton/src/onemrva-mat-skeleton.component.scss +1 -1
- package/mat-table-of-content/src/onemrva-mat-table-of-content.component.scss +10 -2
- package/package.json +72 -62
- package/theme/index.scss +230 -0
- package/theme/overrides/_autocomplete.scss +9 -0
- package/theme/overrides/_button-toggle.scss +14 -0
- package/theme/overrides/_button.scss +140 -0
- package/theme/overrides/_card.scss +34 -0
- package/theme/overrides/_carousel.scss +13 -0
- package/theme/overrides/_checkbox.scss +49 -0
- package/theme/overrides/_chips.scss +42 -0
- package/theme/overrides/_datepicker.scss +10 -0
- package/theme/overrides/_dialogs.scss +118 -0
- package/theme/overrides/_divider.scss +9 -0
- package/theme/overrides/_drag-and-drop.scss +74 -0
- package/theme/overrides/_expansion.scss +51 -0
- package/theme/overrides/_fab.scss +45 -0
- package/theme/overrides/_form-field.scss +223 -0
- package/theme/overrides/_icon-button.scss +24 -0
- package/theme/overrides/_icon.scss +97 -0
- package/theme/overrides/_input.scss +18 -0
- package/theme/overrides/_layout.scss +35 -0
- package/theme/overrides/_menu.scss +45 -0
- package/theme/overrides/_option.scss +15 -0
- package/theme/overrides/_panel.scss +59 -0
- package/theme/overrides/_progress-bar.scss +29 -0
- package/theme/overrides/_radio.scss +16 -0
- package/theme/overrides/_select.scss +124 -0
- package/theme/overrides/_sidenav.scss +13 -0
- package/theme/overrides/_slide-toggle.scss +53 -0
- package/theme/overrides/_stepper.scss +196 -0
- package/theme/overrides/_stickers.scss +13 -0
- package/theme/overrides/_table.scss +115 -0
- package/theme/overrides/_tabs.scss +20 -0
- package/theme/overrides/_toast.scss +16 -0
- package/theme/overrides/_toc.scss +26 -0
- package/theme/overrides/_toolbar.scss +26 -0
- package/theme/overrides/_tooltip.scss +19 -0
- package/theme/palettes/_palette.scss +189 -0
- package/theme/utilities/_animations.scss +54 -0
- package/theme/utilities/_container.scss +14 -0
- package/theme/utilities/_fonts.scss +170 -0
- package/theme/utilities/_grid.scss +75 -0
- package/theme/utilities/_media.scss +33 -0
- package/theme/utilities/_palettes.scss +120 -0
- package/theme/utilities/_spacing.scss +86 -0
- package/theme/utilities/_tokens.scss +123 -0
- package/theme/utilities/_utilities.scss +351 -0
- package/theme/utilities/_variables.scss +42 -0
- package/types/onemrvapublic-design-system-flag-icon.d.ts +18 -0
- package/types/onemrvapublic-design-system-layout.d.ts +305 -0
- package/{mat-address/index.d.ts → types/onemrvapublic-design-system-mat-address.d.ts} +8 -8
- package/types/onemrvapublic-design-system-mat-avatar.d.ts +67 -0
- package/{mat-breadcrumb/index.d.ts → types/onemrvapublic-design-system-mat-breadcrumb.d.ts} +8 -6
- package/types/onemrvapublic-design-system-mat-carousel.d.ts +52 -0
- package/types/onemrvapublic-design-system-mat-choice-chip.d.ts +23 -0
- package/types/onemrvapublic-design-system-mat-copy-to-clipboard.d.ts +25 -0
- package/types/onemrvapublic-design-system-mat-country-item.d.ts +10 -0
- package/types/onemrvapublic-design-system-mat-empty-row.d.ts +18 -0
- package/{mat-file-upload/index.d.ts → types/onemrvapublic-design-system-mat-file-upload.d.ts} +53 -51
- package/types/onemrvapublic-design-system-mat-input-address.d.ts +32 -0
- package/{mat-input-birthplace/index.d.ts → types/onemrvapublic-design-system-mat-input-birthplace.d.ts} +10 -10
- package/{mat-input-country/index.d.ts → types/onemrvapublic-design-system-mat-input-country.d.ts} +2 -2
- package/types/onemrvapublic-design-system-mat-input-enterprise-number.d.ts +37 -0
- package/{mat-input-iban/index.d.ts → types/onemrvapublic-design-system-mat-input-iban.d.ts} +12 -13
- package/{mat-input-phone/index.d.ts → types/onemrvapublic-design-system-mat-input-phone.d.ts} +12 -12
- package/types/onemrvapublic-design-system-mat-message-box.d.ts +29 -0
- package/types/onemrvapublic-design-system-mat-multi-select.d.ts +57 -0
- package/types/onemrvapublic-design-system-mat-navigation.d.ts +55 -0
- package/types/onemrvapublic-design-system-mat-notification.d.ts +23 -0
- package/types/onemrvapublic-design-system-mat-paginator.d.ts +58 -0
- package/types/onemrvapublic-design-system-mat-panel.d.ts +66 -0
- package/types/onemrvapublic-design-system-mat-pop-over.d.ts +40 -0
- package/types/onemrvapublic-design-system-mat-progress-bar.d.ts +16 -0
- package/{mat-select-search/index.d.ts → types/onemrvapublic-design-system-mat-select-search.d.ts} +35 -35
- package/types/onemrvapublic-design-system-mat-selectable-box.d.ts +26 -0
- package/{mat-side-menu/index.d.ts → types/onemrvapublic-design-system-mat-side-menu.d.ts} +6 -6
- package/types/onemrvapublic-design-system-mat-skeleton.d.ts +82 -0
- package/{mat-spinner/index.d.ts → types/onemrvapublic-design-system-mat-spinner.d.ts} +3 -4
- package/{mat-stepper/index.d.ts → types/onemrvapublic-design-system-mat-stepper.d.ts} +3 -6
- package/types/onemrvapublic-design-system-mat-table-of-content.d.ts +85 -0
- package/types/onemrvapublic-design-system-mat-task-list.d.ts +56 -0
- package/{mat-timepicker/index.d.ts → types/onemrvapublic-design-system-mat-timepicker.d.ts} +50 -66
- package/types/onemrvapublic-design-system-mat-tooltip.d.ts +40 -0
- package/types/onemrvapublic-design-system-page-error.d.ts +29 -0
- package/{page-not-found/index.d.ts → types/onemrvapublic-design-system-page-not-found.d.ts} +6 -6
- package/{shared/index.d.ts → types/onemrvapublic-design-system-shared.d.ts} +47 -71
- package/flag-icon/index.d.ts +0 -18
- package/layout/index.d.ts +0 -295
- package/mat-avatar/index.d.ts +0 -187
- package/mat-carousel/index.d.ts +0 -52
- package/mat-choice-chip/index.d.ts +0 -21
- package/mat-copy-to-clipboard/index.d.ts +0 -25
- package/mat-country-item/index.d.ts +0 -10
- package/mat-empty-row/index.d.ts +0 -19
- package/mat-input-address/index.d.ts +0 -32
- package/mat-input-enterprise-number/index.d.ts +0 -37
- package/mat-message-box/index.d.ts +0 -101
- package/mat-multi-select/index.d.ts +0 -57
- package/mat-navigation/index.d.ts +0 -54
- package/mat-notification/index.d.ts +0 -43
- package/mat-paginator/index.d.ts +0 -58
- package/mat-panel/index.d.ts +0 -66
- package/mat-pop-over/index.d.ts +0 -40
- package/mat-progress-bar/index.d.ts +0 -18
- package/mat-selectable-box/index.d.ts +0 -29
- package/mat-skeleton/index.d.ts +0 -100
- package/mat-table-of-content/index.d.ts +0 -84
- package/mat-task-list/index.d.ts +0 -57
- package/mat-tooltip/index.d.ts +0 -40
- package/page-error/index.d.ts +0 -34
- /package/{mat-datepicker-header/index.d.ts → types/onemrvapublic-design-system-mat-datepicker-header.d.ts} +0 -0
- /package/{mat-sticker/index.d.ts → types/onemrvapublic-design-system-mat-sticker.d.ts} +0 -0
- /package/{mat-toast/index.d.ts → types/onemrvapublic-design-system-mat-toast.d.ts} +0 -0
- /package/{utils/index.d.ts → types/onemrvapublic-design-system-utils.d.ts} +0 -0
- /package/{index.d.ts → types/onemrvapublic-design-system.d.ts} +0 -0
|
@@ -1,19 +1,18 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { input, output, ChangeDetectionStrategy, Component, EventEmitter, inject, Output, signal, computed, Input, Directive, ChangeDetectorRef, ViewEncapsulation, Renderer2, NgZone, ElementRef, HostBinding, NgModule } from '@angular/core';
|
|
3
|
+
import { OnemrvaMatColor, OnemrvaMatSize } from '@onemrvapublic/design-system/utils';
|
|
4
4
|
import { MatDialog, MAT_DIALOG_DATA, MatDialogContent, MatDialogActions } from '@angular/material/dialog';
|
|
5
5
|
import { MatToolbar } from '@angular/material/toolbar';
|
|
6
|
-
import { NgClass } from '@angular/common';
|
|
7
6
|
import { MatMiniFabButton, MatButton, MatIconButton } from '@angular/material/button';
|
|
8
7
|
import { OnemRvaColorDirective } from '@onemrvapublic/design-system/shared';
|
|
9
8
|
import { Subject, Subscription, of, merge } from 'rxjs';
|
|
10
9
|
import { takeUntil, first } from 'rxjs/operators';
|
|
11
10
|
import { coerceBooleanProperty } from '@angular/cdk/coercion';
|
|
11
|
+
import { outputToObservable } from '@angular/core/rxjs-interop';
|
|
12
12
|
import { MatIcon } from '@angular/material/icon';
|
|
13
13
|
import { Validators, NgControl, NgForm, FormGroupDirective } from '@angular/forms';
|
|
14
14
|
import { MatFormField, MatFormFieldControl } from '@angular/material/form-field';
|
|
15
15
|
import { FocusMonitor } from '@angular/cdk/a11y';
|
|
16
|
-
import { ErrorStateMatcher } from '@angular/material/core';
|
|
17
16
|
import { Platform } from '@angular/cdk/platform';
|
|
18
17
|
|
|
19
18
|
function twoDigits(n) {
|
|
@@ -36,6 +35,9 @@ function getShortestAngle(from, to) {
|
|
|
36
35
|
return from + mod(difference + 180, 360) - 180;
|
|
37
36
|
}
|
|
38
37
|
function isDateInRange(minDate, maxDate, current) {
|
|
38
|
+
if (!minDate || !maxDate || !current) {
|
|
39
|
+
return false;
|
|
40
|
+
}
|
|
39
41
|
const unixCurrentDate = +current;
|
|
40
42
|
return ((!minDate || +minDate <= unixCurrentDate) &&
|
|
41
43
|
(!maxDate || unixCurrentDate <= +maxDate));
|
|
@@ -101,12 +103,16 @@ function getIsAvailabeFn(allowed24HourMap) {
|
|
|
101
103
|
|
|
102
104
|
class ClockComponent {
|
|
103
105
|
constructor() {
|
|
104
|
-
this.viewType = 'hours';
|
|
105
|
-
this.formattedValue = 0;
|
|
106
|
-
this.
|
|
107
|
-
this.
|
|
108
|
-
this.
|
|
109
|
-
this.
|
|
106
|
+
this.viewType = input('hours', ...(ngDevMode ? [{ debugName: "viewType" }] : []));
|
|
107
|
+
this.formattedValue = input(0, ...(ngDevMode ? [{ debugName: "formattedValue" }] : []));
|
|
108
|
+
this.minDate = input.required(...(ngDevMode ? [{ debugName: "minDate" }] : []));
|
|
109
|
+
this.maxDate = input.required(...(ngDevMode ? [{ debugName: "maxDate" }] : []));
|
|
110
|
+
this.formattedHours = input(0, ...(ngDevMode ? [{ debugName: "formattedHours" }] : []));
|
|
111
|
+
this.minutes = input.required(...(ngDevMode ? [{ debugName: "minutes" }] : []));
|
|
112
|
+
this.changeEvent = output();
|
|
113
|
+
this.unavailableSelection = output();
|
|
114
|
+
this.invalidSelection = output();
|
|
115
|
+
this.allowed24HourMap = input.required(...(ngDevMode ? [{ debugName: "allowed24HourMap" }] : []));
|
|
110
116
|
this.isFormattedValueAllowed = true;
|
|
111
117
|
this.touching = false;
|
|
112
118
|
this.numbers = [];
|
|
@@ -120,14 +126,15 @@ class ClockComponent {
|
|
|
120
126
|
};
|
|
121
127
|
}
|
|
122
128
|
initIsAllowedFn() {
|
|
123
|
-
|
|
129
|
+
const allowed24HourMap = this.allowed24HourMap();
|
|
130
|
+
if (!allowed24HourMap) {
|
|
124
131
|
return;
|
|
125
132
|
}
|
|
126
|
-
this.isAvailableFn = getIsAvailabeFn(
|
|
133
|
+
this.isAvailableFn = getIsAvailabeFn(allowed24HourMap);
|
|
127
134
|
}
|
|
128
135
|
isAvailable(value) {
|
|
129
136
|
return this.isAvailableFn
|
|
130
|
-
? this.isAvailableFn(value, this.viewType, this.formattedHours)
|
|
137
|
+
? this.isAvailableFn(value, this.viewType(), this.formattedHours())
|
|
131
138
|
: true;
|
|
132
139
|
}
|
|
133
140
|
ngOnChanges(simpleChanges) {
|
|
@@ -137,19 +144,20 @@ class ClockComponent {
|
|
|
137
144
|
}
|
|
138
145
|
this.calculateAngule();
|
|
139
146
|
this.setNumbers();
|
|
140
|
-
if (simpleChanges['formattedValue'] && this.allowed24HourMap) {
|
|
141
|
-
this.isFormattedValueAllowed = this.isAvailable(this.formattedValue);
|
|
147
|
+
if (simpleChanges['formattedValue'] && this.allowed24HourMap()) {
|
|
148
|
+
this.isFormattedValueAllowed = this.isAvailable(this.formattedValue());
|
|
142
149
|
}
|
|
143
150
|
const isSelectedTimeAvailable = this.isAvailableFn
|
|
144
|
-
? this.isAvailableFn(this.formattedValue, 'minutes', this.formattedHours)
|
|
151
|
+
? this.isAvailableFn(this.formattedValue(), 'minutes', this.formattedHours())
|
|
145
152
|
: true;
|
|
146
|
-
if (this.viewType === 'minutes' && this.isAvailableFn) {
|
|
147
|
-
const areMinitesAvailable = this.isAvailableFn(this.minutes, 'minutes', this.formattedHours);
|
|
153
|
+
if (this.viewType() === 'minutes' && this.isAvailableFn) {
|
|
154
|
+
const areMinitesAvailable = this.isAvailableFn(this.minutes(), 'minutes', this.formattedHours());
|
|
148
155
|
if (!areMinitesAvailable) {
|
|
149
|
-
|
|
156
|
+
const minDate = this.minDate();
|
|
157
|
+
if (minDate && minDate.getMinutes() > this.minutes()) {
|
|
150
158
|
setTimeout(() => {
|
|
151
159
|
this.changeEvent.emit({
|
|
152
|
-
value: this.minDate.getMinutes(),
|
|
160
|
+
value: this.minDate().getMinutes(),
|
|
153
161
|
type: 'minutes',
|
|
154
162
|
});
|
|
155
163
|
});
|
|
@@ -157,7 +165,7 @@ class ClockComponent {
|
|
|
157
165
|
else {
|
|
158
166
|
setTimeout(() => {
|
|
159
167
|
this.changeEvent.emit({
|
|
160
|
-
value: this.maxDate.getMinutes(),
|
|
168
|
+
value: this.maxDate().getMinutes(),
|
|
161
169
|
type: 'minutes',
|
|
162
170
|
});
|
|
163
171
|
});
|
|
@@ -170,10 +178,10 @@ class ClockComponent {
|
|
|
170
178
|
this.invalidSelection.emit(!isSelectedTimeAvailable);
|
|
171
179
|
}
|
|
172
180
|
calculateAngule() {
|
|
173
|
-
this.angle = this.getPointerAngle(this.formattedValue, this.viewType);
|
|
181
|
+
this.angle = this.getPointerAngle(this.formattedValue(), this.viewType());
|
|
174
182
|
}
|
|
175
183
|
setNumbers() {
|
|
176
|
-
if (this.viewType === 'hours') {
|
|
184
|
+
if (this.viewType() === 'hours') {
|
|
177
185
|
// if (this.mode === '12h') {
|
|
178
186
|
// const meridiem : string = this.isPm ? 'pm' : 'am';
|
|
179
187
|
// const isAllowedFn = this.allowed12HourMap ? (num : number) => this.allowed12HourMap[meridiem][num + 1][0] : undefined;
|
|
@@ -181,8 +189,8 @@ class ClockComponent {
|
|
|
181
189
|
// this.secondaryNumbers = [];
|
|
182
190
|
// this.minuteDots = [];
|
|
183
191
|
// } else if (this.mode === '24h') {
|
|
184
|
-
const isAllowedFn = this.allowed24HourMap
|
|
185
|
-
? (num) => this.allowed24HourMap[num][0]
|
|
192
|
+
const isAllowedFn = this.allowed24HourMap()
|
|
193
|
+
? (num) => this.allowed24HourMap()[num][0]
|
|
186
194
|
: undefined;
|
|
187
195
|
this.numbers = this.getNumbers(12, { size: 256 }, isAllowedFn);
|
|
188
196
|
this.secondaryNumbers = this.getNumbers(12, { size: 256 - 64, start: 13 }, isAllowedFn);
|
|
@@ -193,8 +201,8 @@ class ClockComponent {
|
|
|
193
201
|
//const meridiem : string = this.isPm ? 'pm' : 'am';
|
|
194
202
|
const isAllowedFn =
|
|
195
203
|
// !!this.allowed12HourMap ? (num : number) => this.allowed12HourMap[meridiem][this.formattedHours][num] :
|
|
196
|
-
this.allowed24HourMap
|
|
197
|
-
? (num) => this.allowed24HourMap[this.formattedHours][num]
|
|
204
|
+
this.allowed24HourMap()
|
|
205
|
+
? (num) => this.allowed24HourMap()[this.formattedHours()][num]
|
|
198
206
|
: undefined;
|
|
199
207
|
this.numbers = this.getNumbers(12, { size: 256, start: 5, step: 5 }, isAllowedFn);
|
|
200
208
|
this.minuteDots = this.getNumbers(60, { size: 256, start: 13 }).map(digit => {
|
|
@@ -233,25 +241,28 @@ class ClockComponent {
|
|
|
233
241
|
movePointer(x, y) {
|
|
234
242
|
const value = this.getPointerValue(x, y, 256);
|
|
235
243
|
if (!this.isAvailable(value)) {
|
|
236
|
-
this.unavailableSelection.emit();
|
|
244
|
+
this.unavailableSelection.emit(undefined);
|
|
237
245
|
return;
|
|
238
246
|
}
|
|
239
|
-
if (value !== this.formattedValue) {
|
|
247
|
+
if (value !== this.formattedValue()) {
|
|
248
|
+
const viewType = this.viewType();
|
|
240
249
|
this.changeEvent.emit({
|
|
241
250
|
value,
|
|
242
|
-
type:
|
|
251
|
+
type: viewType !== 'minutes' ? 'hours' : 'minutes',
|
|
243
252
|
});
|
|
244
|
-
if (
|
|
253
|
+
if (viewType !== 'minutes') {
|
|
245
254
|
if (!this.isAvailable(value)) {
|
|
246
|
-
|
|
255
|
+
const minDate = this.minDate();
|
|
256
|
+
const maxDate = this.maxDate();
|
|
257
|
+
if (minDate && this.isAvailable(value)) {
|
|
247
258
|
this.changeEvent.emit({
|
|
248
|
-
value:
|
|
259
|
+
value: minDate.getMinutes(),
|
|
249
260
|
type: 'minutes',
|
|
250
261
|
});
|
|
251
262
|
}
|
|
252
|
-
else if (
|
|
263
|
+
else if (maxDate && this.isAvailable(value)) {
|
|
253
264
|
this.changeEvent.emit({
|
|
254
|
-
value:
|
|
265
|
+
value: maxDate.getMinutes(),
|
|
255
266
|
type: 'minutes',
|
|
256
267
|
});
|
|
257
268
|
}
|
|
@@ -269,7 +280,7 @@ class ClockComponent {
|
|
|
269
280
|
}));
|
|
270
281
|
}
|
|
271
282
|
getPointerAngle(value, _mode) {
|
|
272
|
-
if (this.viewType === 'hours') {
|
|
283
|
+
if (this.viewType() === 'hours') {
|
|
273
284
|
return (360 / 12) * ((value % 12) - 3);
|
|
274
285
|
}
|
|
275
286
|
return (360 / 60) * (value - 15);
|
|
@@ -280,7 +291,7 @@ class ClockComponent {
|
|
|
280
291
|
if (angle < 0) {
|
|
281
292
|
angle = 360 + angle;
|
|
282
293
|
}
|
|
283
|
-
if (this.viewType === 'hours') {
|
|
294
|
+
if (this.viewType() === 'hours') {
|
|
284
295
|
const radius = Math.sqrt(Math.pow(size / 2 - x, 2) + Math.pow(size / 2 - y, 2));
|
|
285
296
|
value = 12 - Math.round((angle * 12) / 360);
|
|
286
297
|
if (value === 0) {
|
|
@@ -294,33 +305,13 @@ class ClockComponent {
|
|
|
294
305
|
value = Math.round(60 - (60 * angle) / 360);
|
|
295
306
|
return value === 60 ? 0 : value;
|
|
296
307
|
}
|
|
297
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
298
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
308
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: ClockComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
309
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.1", type: ClockComponent, isStandalone: true, selector: "mat-clock", inputs: { viewType: { classPropertyName: "viewType", publicName: "viewType", isSignal: true, isRequired: false, transformFunction: null }, formattedValue: { classPropertyName: "formattedValue", publicName: "formattedValue", isSignal: true, isRequired: false, transformFunction: null }, minDate: { classPropertyName: "minDate", publicName: "minDate", isSignal: true, isRequired: true, transformFunction: null }, maxDate: { classPropertyName: "maxDate", publicName: "maxDate", isSignal: true, isRequired: true, transformFunction: null }, formattedHours: { classPropertyName: "formattedHours", publicName: "formattedHours", isSignal: true, isRequired: false, transformFunction: null }, minutes: { classPropertyName: "minutes", publicName: "minutes", isSignal: true, isRequired: true, transformFunction: null }, allowed24HourMap: { classPropertyName: "allowed24HourMap", publicName: "allowed24HourMap", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { changeEvent: "changeEvent", unavailableSelection: "unavailableSelection", invalidSelection: "invalidSelection" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"root\">\n <div\n class=\"circle\"\n tabindex=\"1\"\n (touchmove)=\"handleTouchMove($event)\"\n (mousemove)=\"handleMouseMove($event)\"\n (touchstart)=\"disableAnimatedPointer()\"\n (mousedown)=\"disableAnimatedPointer()\"\n (touchend)=\"handleTouchEnd($event)\"\n (mouseup)=\"enableAnimatedPointer()\"\n (click)=\"handleClick($event)\"\n >\n <div\n class=\"pointer-container\"\n [class]=\"{\n 'small-pointer':\n viewType() === 'hours' &&\n (formattedValue() === 0 || formattedValue() > 12),\n 'animated-pointer': !touching,\n }\"\n [style.transform]=\"'rotate(' + angle + 'deg)'\"\n >\n <button\n aria-disabled=\"true\"\n mat-mini-fab\n color=\"neutral\"\n class=\"inner-dot\"\n aria-label=\"Inner Dot\"\n ></button>\n <mat-toolbar color=\"accent\" class=\"pointer\">\n <button\n mat-mini-fab\n color=\"neutral\"\n class=\"outer-dot\"\n aria-label=\"Outer dot\"\n [class.outer-dot-odd]=\"\n viewType() === 'minutes' && formattedValue() % 5 !== 0\n \"\n >\n @if (viewType() === 'minutes' && formattedValue() % 5 !== 0) {\n <ng-container>\u00B7</ng-container>\n }\n </button>\n </mat-toolbar>\n </div>\n @for (digit of minuteDots; track digit.display) {\n <button\n mat-mini-fab\n color=\"neutral\"\n class=\"number minute-dot\"\n [class]=\"{\n selected:\n formattedValue() === digit.display ||\n (digit.display === 0 && formattedValue() === 0),\n disabled: !isAvailable(digit.display === 60 ? 0 : digit.display),\n }\"\n [style.transform]=\"\n 'translate(' + digit.translateX + 'px, ' + digit.translateY + 'px)'\n \"\n >\n @if (digit.display % 5 !== 0) {\n <ng-container>\u00B7</ng-container>\n }\n </button>\n }\n @for (digit of numbers; track digit.display) {\n <button\n mat-mini-fab\n color=\"neutral\"\n class=\"number\"\n [class]=\"{\n selected:\n formattedValue() === digit.display ||\n (digit.display === 60 && formattedValue() === 0),\n disabled: !isAvailable(digit.display === 60 ? 0 : digit.display),\n }\"\n [style.transform]=\"\n 'translate(' + digit.translateX + 'px, ' + digit.translateY + 'px)'\n \"\n >\n <ng-template #hoursTemplate>{{ digit.display }}</ng-template>\n <ng-template #minutesTemplate>{{\n digit.display === 60 ? '00' : digit.display\n }}</ng-template>\n @if (viewType() === 'minutes') {\n {{ digit.display === 60 ? '00' : digit.display }}\n } @else {\n {{ digit.display }}\n }\n </button>\n }\n @for (digit of secondaryNumbers; track digit.display) {\n <button\n mat-mini-fab\n color=\"neutral\"\n class=\"number small-number\"\n [class]=\"{\n selected:\n formattedValue() === digit.display ||\n (digit.display === 24 && formattedValue() === 0),\n disabled: !isAvailable(digit.display === 24 ? 0 : digit.display),\n }\"\n [style.transform]=\"\n 'translate(' + digit.translateX + 'px, ' + digit.translateY + 'px)'\n \"\n >\n {{ digit.display === 24 ? '00' : digit.display }}\n </button>\n }\n </div>\n</div>\n", styles: [".root{width:256px;height:256px;cursor:default}.circle{width:256px;height:256px;border-radius:50%;position:relative;background:var(--mat-sys-surface-container-high);cursor:pointer}.mat-mdc-mini-fab.number{width:32px;height:32px;left:calc(50% - 16px);top:calc(50% - 16px);position:absolute;text-align:center;line-height:32px;cursor:pointer;font-size:14px;pointer-events:none;-webkit-user-select:none;user-select:none;display:flex;align-items:center;justify-content:center;flex-direction:column;background-color:transparent;box-shadow:none;color:var(--mat-sys-on-surface)}.mat-mdc-mini-fab.number.selected{background:var(--background-gradient);color:var(--on-background-gradient)}.mat-mdc-mini-fab.number.disabled{opacity:.1}.mat-mdc-mini-fab.number:not(.selected):not(.disabled){color:var(--mat-sys-on-surface)}.small-number{font-size:12px}.small-number:not(.selected):not(.disabled){color:var(--mat-sys-on-surface-variant)}.pointer-container{width:calc(50% - 20px);height:2px;position:absolute;left:50%;top:calc(50% - 1px);transform-origin:left center;pointer-events:none}.pointer-container.disabled *{background-color:transparent}.pointer{height:1px;background-color:var(--mat-sys-on-surface)}.animated-pointer{transition:all .2s ease-out}.pointer-container.small-pointer{width:calc(50% - 52px)}.pointer-container.small-pointer mat-toolbar{padding:0 16px}.pointer-container mat-toolbar{padding:0 54px}.inner-dot{position:absolute;top:-3px;left:-4px;width:8px;height:8px;border-radius:50%;box-shadow:0 3px 5px -1px #0003,0 6px 10px #00000024,0 1px 18px #0000001f}.outer-dot{width:32px;height:32px;position:absolute;right:-16px;box-shadow:0 3px 5px -1px #0003,0 6px 10px #00000024,0 1px 18px #0000001f;border-radius:50%;box-sizing:content-box}.outer-dot-odd{box-shadow:0 3px 5px -1px #0003,0 6px 10px #00000024,0 1px 18px #0000001f;width:32px;height:32px;display:flex;align-items:center;justify-content:center;flex-direction:column}\n"], dependencies: [{ kind: "component", type: MatMiniFabButton, selector: "button[mat-mini-fab], a[mat-mini-fab], button[matMiniFab], a[matMiniFab]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: MatToolbar, selector: "mat-toolbar", inputs: ["color"], exportAs: ["matToolbar"] }, { kind: "directive", type: OnemRvaColorDirective, selector: "onemrva-mat-selectable-box[color],div[color],onemrva-mat-avatar[color],mat-card[color],mat-toolbar[color],onemrva-mat-spinner[color],onemrva-mat-notification[color],onemrva-mat-task-list[color],onemrva-mat-sticker[color],onemrva-mat-panel[color],onemrva-mat-task[color],onemrva-mat-choice-chip[color],mat-form-field[color],button[color],mat-icon[color],mat-chip[color],mat-chip-option[color]mat-hint[color],", inputs: ["color"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
299
310
|
}
|
|
300
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
311
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: ClockComponent, decorators: [{
|
|
301
312
|
type: Component,
|
|
302
|
-
args: [{ selector: 'mat-clock', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
|
|
303
|
-
}], propDecorators: { viewType: [{
|
|
304
|
-
type: Input
|
|
305
|
-
}], formattedValue: [{
|
|
306
|
-
type: Input
|
|
307
|
-
}], minDate: [{
|
|
308
|
-
type: Input
|
|
309
|
-
}], maxDate: [{
|
|
310
|
-
type: Input
|
|
311
|
-
}], formattedHours: [{
|
|
312
|
-
type: Input
|
|
313
|
-
}], minutes: [{
|
|
314
|
-
type: Input
|
|
315
|
-
}], changeEvent: [{
|
|
316
|
-
type: Output
|
|
317
|
-
}], unavailableSelection: [{
|
|
318
|
-
type: Output
|
|
319
|
-
}], invalidSelection: [{
|
|
320
|
-
type: Output
|
|
321
|
-
}], allowed24HourMap: [{
|
|
322
|
-
type: Input
|
|
323
|
-
}] } });
|
|
313
|
+
args: [{ selector: 'mat-clock', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [MatMiniFabButton, MatToolbar, OnemRvaColorDirective], template: "<div class=\"root\">\n <div\n class=\"circle\"\n tabindex=\"1\"\n (touchmove)=\"handleTouchMove($event)\"\n (mousemove)=\"handleMouseMove($event)\"\n (touchstart)=\"disableAnimatedPointer()\"\n (mousedown)=\"disableAnimatedPointer()\"\n (touchend)=\"handleTouchEnd($event)\"\n (mouseup)=\"enableAnimatedPointer()\"\n (click)=\"handleClick($event)\"\n >\n <div\n class=\"pointer-container\"\n [class]=\"{\n 'small-pointer':\n viewType() === 'hours' &&\n (formattedValue() === 0 || formattedValue() > 12),\n 'animated-pointer': !touching,\n }\"\n [style.transform]=\"'rotate(' + angle + 'deg)'\"\n >\n <button\n aria-disabled=\"true\"\n mat-mini-fab\n color=\"neutral\"\n class=\"inner-dot\"\n aria-label=\"Inner Dot\"\n ></button>\n <mat-toolbar color=\"accent\" class=\"pointer\">\n <button\n mat-mini-fab\n color=\"neutral\"\n class=\"outer-dot\"\n aria-label=\"Outer dot\"\n [class.outer-dot-odd]=\"\n viewType() === 'minutes' && formattedValue() % 5 !== 0\n \"\n >\n @if (viewType() === 'minutes' && formattedValue() % 5 !== 0) {\n <ng-container>\u00B7</ng-container>\n }\n </button>\n </mat-toolbar>\n </div>\n @for (digit of minuteDots; track digit.display) {\n <button\n mat-mini-fab\n color=\"neutral\"\n class=\"number minute-dot\"\n [class]=\"{\n selected:\n formattedValue() === digit.display ||\n (digit.display === 0 && formattedValue() === 0),\n disabled: !isAvailable(digit.display === 60 ? 0 : digit.display),\n }\"\n [style.transform]=\"\n 'translate(' + digit.translateX + 'px, ' + digit.translateY + 'px)'\n \"\n >\n @if (digit.display % 5 !== 0) {\n <ng-container>\u00B7</ng-container>\n }\n </button>\n }\n @for (digit of numbers; track digit.display) {\n <button\n mat-mini-fab\n color=\"neutral\"\n class=\"number\"\n [class]=\"{\n selected:\n formattedValue() === digit.display ||\n (digit.display === 60 && formattedValue() === 0),\n disabled: !isAvailable(digit.display === 60 ? 0 : digit.display),\n }\"\n [style.transform]=\"\n 'translate(' + digit.translateX + 'px, ' + digit.translateY + 'px)'\n \"\n >\n <ng-template #hoursTemplate>{{ digit.display }}</ng-template>\n <ng-template #minutesTemplate>{{\n digit.display === 60 ? '00' : digit.display\n }}</ng-template>\n @if (viewType() === 'minutes') {\n {{ digit.display === 60 ? '00' : digit.display }}\n } @else {\n {{ digit.display }}\n }\n </button>\n }\n @for (digit of secondaryNumbers; track digit.display) {\n <button\n mat-mini-fab\n color=\"neutral\"\n class=\"number small-number\"\n [class]=\"{\n selected:\n formattedValue() === digit.display ||\n (digit.display === 24 && formattedValue() === 0),\n disabled: !isAvailable(digit.display === 24 ? 0 : digit.display),\n }\"\n [style.transform]=\"\n 'translate(' + digit.translateX + 'px, ' + digit.translateY + 'px)'\n \"\n >\n {{ digit.display === 24 ? '00' : digit.display }}\n </button>\n }\n </div>\n</div>\n", styles: [".root{width:256px;height:256px;cursor:default}.circle{width:256px;height:256px;border-radius:50%;position:relative;background:var(--mat-sys-surface-container-high);cursor:pointer}.mat-mdc-mini-fab.number{width:32px;height:32px;left:calc(50% - 16px);top:calc(50% - 16px);position:absolute;text-align:center;line-height:32px;cursor:pointer;font-size:14px;pointer-events:none;-webkit-user-select:none;user-select:none;display:flex;align-items:center;justify-content:center;flex-direction:column;background-color:transparent;box-shadow:none;color:var(--mat-sys-on-surface)}.mat-mdc-mini-fab.number.selected{background:var(--background-gradient);color:var(--on-background-gradient)}.mat-mdc-mini-fab.number.disabled{opacity:.1}.mat-mdc-mini-fab.number:not(.selected):not(.disabled){color:var(--mat-sys-on-surface)}.small-number{font-size:12px}.small-number:not(.selected):not(.disabled){color:var(--mat-sys-on-surface-variant)}.pointer-container{width:calc(50% - 20px);height:2px;position:absolute;left:50%;top:calc(50% - 1px);transform-origin:left center;pointer-events:none}.pointer-container.disabled *{background-color:transparent}.pointer{height:1px;background-color:var(--mat-sys-on-surface)}.animated-pointer{transition:all .2s ease-out}.pointer-container.small-pointer{width:calc(50% - 52px)}.pointer-container.small-pointer mat-toolbar{padding:0 16px}.pointer-container mat-toolbar{padding:0 54px}.inner-dot{position:absolute;top:-3px;left:-4px;width:8px;height:8px;border-radius:50%;box-shadow:0 3px 5px -1px #0003,0 6px 10px #00000024,0 1px 18px #0000001f}.outer-dot{width:32px;height:32px;position:absolute;right:-16px;box-shadow:0 3px 5px -1px #0003,0 6px 10px #00000024,0 1px 18px #0000001f;border-radius:50%;box-sizing:content-box}.outer-dot-odd{box-shadow:0 3px 5px -1px #0003,0 6px 10px #00000024,0 1px 18px #0000001f;width:32px;height:32px;display:flex;align-items:center;justify-content:center;flex-direction:column}\n"] }]
|
|
314
|
+
}], propDecorators: { viewType: [{ type: i0.Input, args: [{ isSignal: true, alias: "viewType", required: false }] }], formattedValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "formattedValue", required: false }] }], minDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "minDate", required: true }] }], maxDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxDate", required: true }] }], formattedHours: [{ type: i0.Input, args: [{ isSignal: true, alias: "formattedHours", required: false }] }], minutes: [{ type: i0.Input, args: [{ isSignal: true, alias: "minutes", required: true }] }], changeEvent: [{ type: i0.Output, args: ["changeEvent"] }], unavailableSelection: [{ type: i0.Output, args: ["unavailableSelection"] }], invalidSelection: [{ type: i0.Output, args: ["invalidSelection"] }], allowed24HourMap: [{ type: i0.Input, args: [{ isSignal: true, alias: "allowed24HourMap", required: true }] }] } });
|
|
324
315
|
|
|
325
316
|
class MatTimepickerComponentDialogComponent {
|
|
326
317
|
set value(value) {
|
|
@@ -425,20 +416,19 @@ class MatTimepickerComponentDialogComponent {
|
|
|
425
416
|
cancelClickHandler() {
|
|
426
417
|
this.cancelClickEvent.emit();
|
|
427
418
|
}
|
|
428
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
429
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
419
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: MatTimepickerComponentDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
420
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.1", type: MatTimepickerComponentDialogComponent, isStandalone: true, selector: "mat-timepicker-dialog", outputs: { changeEvent: "changeEvent", okClickEvent: "okClickEvent", cancelClickEvent: "cancelClickEvent" }, ngImport: i0, template: "<mat-dialog-content>\n <div class=\"root\">\n <mat-toolbar color=\"accent\" class=\"header\">\n <div class=\"time-frame\">\n <span\n class=\"time fixed-font-size\"\n [class.select]=\"viewType === 'hours' && 'active'\"\n (click)=\"editHours()\"\n role=\"button\"\n tabindex=\"0\"\n >\n {{ twoDigits(formattedHours) }}\n </span>\n <span class=\"fixed-font-size\">:</span>\n <span\n class=\"time fixed-font-size\"\n [class.select]=\"viewType === 'minutes' && 'active'\"\n (click)=\"editMinutes()\"\n tabindex=\"1\"\n role=\"button\"\n >\n {{ twoDigits(minutes) }}\n </span>\n </div>\n </mat-toolbar>\n <div class=\"body\">\n <mat-clock\n [allowed24HourMap]=\"allowed24HourMap\"\n [minDate]=\"minDate\"\n [maxDate]=\"maxDate\"\n [viewType]=\"viewType\"\n [formattedHours]=\"formattedHours\"\n [minutes]=\"minutes\"\n (changeEvent)=\"handleClockChange($event)\"\n (unavailableSelection)=\"handleUnavailableSelection()\"\n [formattedValue]=\"viewType === 'minutes' ? minutes : formattedHours\"\n (mouseup)=\"handleClockChangeDone($event)\"\n (touchend)=\"handleClockChangeDone($event)\"\n (invalidSelection)=\"invalidSelectionHandler($event)\"\n />\n </div>\n </div>\n</mat-dialog-content>\n<mat-dialog-actions>\n <button mat-button color=\"primary\" (click)=\"cancelClickHandler()\">\n {{ cancelLabel }}\n </button>\n <button\n mat-flat-button\n [disabled]=\"invalidSelection\"\n [color]=\"color\"\n (click)=\"okClickHandler()\"\n >\n {{ okLabel }}\n </button>\n</mat-dialog-actions>\n", styles: [".mdc-dialog__content{min-height:395px;padding:0!important;overflow:hidden}mat-dialog-actions{justify-content:flex-end;margin:0}.root{min-width:282px}.header{border-top-left-radius:2px;border-top-right-radius:2px;padding:20px 0;line-height:58px;font-size:58px;display:flex;justify-content:center;align-items:center;-webkit-user-select:none;user-select:none;height:98px}.header .fixed-font-size{font-size:58px}.header .time-frame{height:60px}.time{transition:all .2s ease-out;cursor:pointer}.time:not(.select){opacity:.6}.placeholder{flex:1}.ampm{display:flex;flex-direction:column-reverse;flex:1;font-size:14px;line-height:20px;margin-left:16px;font-weight:700}.body{padding:24px 16px 20px;display:flex;justify-content:center}\n"], dependencies: [{ kind: "directive", type: MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "component", type: MatToolbar, selector: "mat-toolbar", inputs: ["color"], exportAs: ["matToolbar"] }, { kind: "component", type: ClockComponent, selector: "mat-clock", inputs: ["viewType", "formattedValue", "minDate", "maxDate", "formattedHours", "minutes", "allowed24HourMap"], outputs: ["changeEvent", "unavailableSelection", "invalidSelection"] }, { kind: "directive", type: MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "component", type: MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "directive", type: OnemRvaColorDirective, selector: "onemrva-mat-selectable-box[color],div[color],onemrva-mat-avatar[color],mat-card[color],mat-toolbar[color],onemrva-mat-spinner[color],onemrva-mat-notification[color],onemrva-mat-task-list[color],onemrva-mat-sticker[color],onemrva-mat-panel[color],onemrva-mat-task[color],onemrva-mat-choice-chip[color],mat-form-field[color],button[color],mat-icon[color],mat-chip[color],mat-chip-option[color]mat-hint[color],", inputs: ["color"] }] }); }
|
|
430
421
|
}
|
|
431
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
422
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: MatTimepickerComponentDialogComponent, decorators: [{
|
|
432
423
|
type: Component,
|
|
433
424
|
args: [{ selector: 'mat-timepicker-dialog', standalone: true, imports: [
|
|
434
425
|
MatDialogContent,
|
|
435
426
|
MatToolbar,
|
|
436
|
-
NgClass,
|
|
437
427
|
ClockComponent,
|
|
438
428
|
MatDialogActions,
|
|
439
429
|
MatButton,
|
|
440
430
|
OnemRvaColorDirective,
|
|
441
|
-
], template: "<mat-dialog-content>\n <div class=\"root\">\n <mat-toolbar color=\"accent\" class=\"header\">\n <div class=\"time-frame\">\n <span\n class=\"time fixed-font-size\"\n [
|
|
431
|
+
], template: "<mat-dialog-content>\n <div class=\"root\">\n <mat-toolbar color=\"accent\" class=\"header\">\n <div class=\"time-frame\">\n <span\n class=\"time fixed-font-size\"\n [class.select]=\"viewType === 'hours' && 'active'\"\n (click)=\"editHours()\"\n role=\"button\"\n tabindex=\"0\"\n >\n {{ twoDigits(formattedHours) }}\n </span>\n <span class=\"fixed-font-size\">:</span>\n <span\n class=\"time fixed-font-size\"\n [class.select]=\"viewType === 'minutes' && 'active'\"\n (click)=\"editMinutes()\"\n tabindex=\"1\"\n role=\"button\"\n >\n {{ twoDigits(minutes) }}\n </span>\n </div>\n </mat-toolbar>\n <div class=\"body\">\n <mat-clock\n [allowed24HourMap]=\"allowed24HourMap\"\n [minDate]=\"minDate\"\n [maxDate]=\"maxDate\"\n [viewType]=\"viewType\"\n [formattedHours]=\"formattedHours\"\n [minutes]=\"minutes\"\n (changeEvent)=\"handleClockChange($event)\"\n (unavailableSelection)=\"handleUnavailableSelection()\"\n [formattedValue]=\"viewType === 'minutes' ? minutes : formattedHours\"\n (mouseup)=\"handleClockChangeDone($event)\"\n (touchend)=\"handleClockChangeDone($event)\"\n (invalidSelection)=\"invalidSelectionHandler($event)\"\n />\n </div>\n </div>\n</mat-dialog-content>\n<mat-dialog-actions>\n <button mat-button color=\"primary\" (click)=\"cancelClickHandler()\">\n {{ cancelLabel }}\n </button>\n <button\n mat-flat-button\n [disabled]=\"invalidSelection\"\n [color]=\"color\"\n (click)=\"okClickHandler()\"\n >\n {{ okLabel }}\n </button>\n</mat-dialog-actions>\n", styles: [".mdc-dialog__content{min-height:395px;padding:0!important;overflow:hidden}mat-dialog-actions{justify-content:flex-end;margin:0}.root{min-width:282px}.header{border-top-left-radius:2px;border-top-right-radius:2px;padding:20px 0;line-height:58px;font-size:58px;display:flex;justify-content:center;align-items:center;-webkit-user-select:none;user-select:none;height:98px}.header .fixed-font-size{font-size:58px}.header .time-frame{height:60px}.time{transition:all .2s ease-out;cursor:pointer}.time:not(.select){opacity:.6}.placeholder{flex:1}.ampm{display:flex;flex-direction:column-reverse;flex:1;font-size:14px;line-height:20px;margin-left:16px;font-weight:700}.body{padding:24px 16px 20px;display:flex;justify-content:center}\n"] }]
|
|
442
432
|
}], ctorParameters: () => [], propDecorators: { changeEvent: [{
|
|
443
433
|
type: Output
|
|
444
434
|
}], okClickEvent: [{
|
|
@@ -456,9 +446,9 @@ class OnemrvaMatTimepickerComponent {
|
|
|
456
446
|
/** Emits when the timepicker's state changes. */
|
|
457
447
|
this.stateChanges = new Subject();
|
|
458
448
|
// eslint-disable-next-line @angular-eslint/no-output-rename
|
|
459
|
-
this.openedStream =
|
|
449
|
+
this.openedStream = output({ alias: 'opened' });
|
|
460
450
|
// eslint-disable-next-line @angular-eslint/no-output-rename
|
|
461
|
-
this.closedStream =
|
|
451
|
+
this.closedStream = output({ alias: 'closed' });
|
|
462
452
|
/**
|
|
463
453
|
* Returns the `aria-label` attribute of the element.
|
|
464
454
|
*
|
|
@@ -468,8 +458,8 @@ class OnemrvaMatTimepickerComponent {
|
|
|
468
458
|
* ```
|
|
469
459
|
*
|
|
470
460
|
*/
|
|
471
|
-
this.ariaLabel = '';
|
|
472
|
-
this.dialogLabel = 'Pick a Time';
|
|
461
|
+
this.ariaLabel = signal('', ...(ngDevMode ? [{ debugName: "ariaLabel" }] : []));
|
|
462
|
+
this.dialogLabel = input('Pick a Time', ...(ngDevMode ? [{ debugName: "dialogLabel" }] : []));
|
|
473
463
|
/**
|
|
474
464
|
* Returns the `role` attribute of the element.
|
|
475
465
|
*
|
|
@@ -478,14 +468,7 @@ class OnemrvaMatTimepickerComponent {
|
|
|
478
468
|
* let timepickerRole = this.timepicker.role;
|
|
479
469
|
* ```
|
|
480
470
|
*/
|
|
481
|
-
this.role = '';
|
|
482
|
-
/**
|
|
483
|
-
* Host `class.onemrva-mat-timepicker` binding.
|
|
484
|
-
*
|
|
485
|
-
* @hidden
|
|
486
|
-
* @internal
|
|
487
|
-
*/
|
|
488
|
-
this.cssClass = 'onemrva-mat-timepicker';
|
|
471
|
+
this.role = signal('', ...(ngDevMode ? [{ debugName: "role" }] : []));
|
|
489
472
|
/**
|
|
490
473
|
* Sets the `id` of the element. If not set, the first component instance will have `id` = `"onemrva-mat-timepicker-0"`.
|
|
491
474
|
*
|
|
@@ -494,7 +477,7 @@ class OnemrvaMatTimepickerComponent {
|
|
|
494
477
|
* <onemrva-mat-timepicker id="my-first-timepicker"></onemrva-mat-timepicker>
|
|
495
478
|
* ```
|
|
496
479
|
*/
|
|
497
|
-
this.id = `onemrva-mat-timepicker-${NEXT_ID++}
|
|
480
|
+
this.id = input(`onemrva-mat-timepicker-${NEXT_ID++}`, ...(ngDevMode ? [{ debugName: "id" }] : []));
|
|
498
481
|
/**
|
|
499
482
|
* Sets the `data-cy` of the element. If not set, the first component instance will have `data-cy` = `"onemrva-mat-timepicker-0"`.
|
|
500
483
|
*
|
|
@@ -503,12 +486,16 @@ class OnemrvaMatTimepickerComponent {
|
|
|
503
486
|
* <onemrva-mat-timepicker id="my-first-timepicker"></onemrva-mat-timepicker>
|
|
504
487
|
* ```
|
|
505
488
|
*/
|
|
506
|
-
this.dataCy = `onemrva-mat-timepicker-${NEXT_ID++}
|
|
489
|
+
this.dataCy = input(`onemrva-mat-timepicker-${NEXT_ID++}`, ...(ngDevMode ? [{ debugName: "dataCy" }] : []));
|
|
507
490
|
/**
|
|
508
491
|
* @hidden
|
|
509
492
|
* @internal
|
|
510
493
|
*/
|
|
511
494
|
this._color = 'primary';
|
|
495
|
+
/** @hidden @internal */
|
|
496
|
+
this._isPrimary = computed(() => this.color === OnemrvaMatColor.PRIMARY, ...(ngDevMode ? [{ debugName: "_isPrimary" }] : []));
|
|
497
|
+
/** @hidden @internal */
|
|
498
|
+
this._isAccent = computed(() => this.color === OnemrvaMatColor.ACCENT, ...(ngDevMode ? [{ debugName: "_isAccent" }] : []));
|
|
512
499
|
/**
|
|
513
500
|
* @hidden
|
|
514
501
|
* @internal
|
|
@@ -576,14 +563,6 @@ class OnemrvaMatTimepickerComponent {
|
|
|
576
563
|
this._color = OnemrvaMatColor.PRIMARY;
|
|
577
564
|
}
|
|
578
565
|
}
|
|
579
|
-
/** @hidden @internal */
|
|
580
|
-
get _isPrimary() {
|
|
581
|
-
return this.color === OnemrvaMatColor.PRIMARY;
|
|
582
|
-
}
|
|
583
|
-
/** @hidden @internal */
|
|
584
|
-
get _isAccent() {
|
|
585
|
-
return this.color === OnemrvaMatColor.ACCENT;
|
|
586
|
-
}
|
|
587
566
|
/**
|
|
588
567
|
* Returns the size of the element.
|
|
589
568
|
*
|
|
@@ -626,7 +605,7 @@ class OnemrvaMatTimepickerComponent {
|
|
|
626
605
|
this.value = new Date();
|
|
627
606
|
}
|
|
628
607
|
this.modalRef = this.dialog.open(MatTimepickerComponentDialogComponent, {
|
|
629
|
-
ariaLabel: this.dialogLabel,
|
|
608
|
+
ariaLabel: this.dialogLabel(),
|
|
630
609
|
autoFocus: false,
|
|
631
610
|
data: {
|
|
632
611
|
value: this.timepickerInput.currentValue,
|
|
@@ -674,47 +653,22 @@ class OnemrvaMatTimepickerComponent {
|
|
|
674
653
|
//
|
|
675
654
|
// this.listeners.forEach(l => l());
|
|
676
655
|
}
|
|
677
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
678
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
656
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: OnemrvaMatTimepickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
657
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.1.1", type: OnemrvaMatTimepickerComponent, isStandalone: true, selector: "mat-timepicker", inputs: { dialogLabel: { classPropertyName: "dialogLabel", publicName: "dialogLabel", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, dataCy: { classPropertyName: "dataCy", publicName: "dataCy", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: false, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: false, isRequired: false, transformFunction: null } }, outputs: { openedStream: "opened", closedStream: "closed" }, host: { attributes: { "class.onemrva-mat-timepicker": "true" }, properties: { "attr.aria-label": "ariaLabel()", "attr.role": "role()", "attr.id": "id()", "attr.data-cy": "dataCy()", "class.mat-primary": "_isPrimary()", "class.mat-accent": "_isAccent()" } }, ngImport: i0, template: "" }); }
|
|
679
658
|
}
|
|
680
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
659
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: OnemrvaMatTimepickerComponent, decorators: [{
|
|
681
660
|
type: Component,
|
|
682
|
-
args: [{ selector: 'mat-timepicker',
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
}], dialogLabel: [{
|
|
693
|
-
type: Input
|
|
694
|
-
}], role: [{
|
|
695
|
-
type: HostBinding,
|
|
696
|
-
args: ['attr.role']
|
|
697
|
-
}], cssClass: [{
|
|
698
|
-
type: HostBinding,
|
|
699
|
-
args: ['class.onemrva-mat-timepicker']
|
|
700
|
-
}], id: [{
|
|
701
|
-
type: HostBinding,
|
|
702
|
-
args: ['attr.id']
|
|
703
|
-
}, {
|
|
704
|
-
type: Input
|
|
705
|
-
}], dataCy: [{
|
|
706
|
-
type: HostBinding,
|
|
707
|
-
args: ['attr.data-cy']
|
|
708
|
-
}, {
|
|
661
|
+
args: [{ selector: 'mat-timepicker', host: {
|
|
662
|
+
'class.onemrva-mat-timepicker': 'true',
|
|
663
|
+
'[attr.aria-label]': 'ariaLabel()',
|
|
664
|
+
'[attr.role]': 'role()',
|
|
665
|
+
'[attr.id]': 'id()',
|
|
666
|
+
'[attr.data-cy]': 'dataCy()',
|
|
667
|
+
'[class.mat-primary]': '_isPrimary()',
|
|
668
|
+
'[class.mat-accent]': '_isAccent()',
|
|
669
|
+
}, template: "" }]
|
|
670
|
+
}], propDecorators: { openedStream: [{ type: i0.Output, args: ["opened"] }], closedStream: [{ type: i0.Output, args: ["closed"] }], dialogLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "dialogLabel", required: false }] }], id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], dataCy: [{ type: i0.Input, args: [{ isSignal: true, alias: "dataCy", required: false }] }], color: [{
|
|
709
671
|
type: Input
|
|
710
|
-
}], color: [{
|
|
711
|
-
type: Input
|
|
712
|
-
}], _isPrimary: [{
|
|
713
|
-
type: HostBinding,
|
|
714
|
-
args: ['class.mat-primary']
|
|
715
|
-
}], _isAccent: [{
|
|
716
|
-
type: HostBinding,
|
|
717
|
-
args: ['class.mat-accent']
|
|
718
672
|
}], size: [{
|
|
719
673
|
type: Input
|
|
720
674
|
}] } });
|
|
@@ -728,10 +682,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
|
|
|
728
682
|
*/
|
|
729
683
|
/** Can be used to override the icon of a `matDatepickerToggle`. */
|
|
730
684
|
class MatTimepickerToggleIconDirective {
|
|
731
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
732
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
685
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: MatTimepickerToggleIconDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
686
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.1.1", type: MatTimepickerToggleIconDirective, isStandalone: true, selector: "[matDatepickerToggleIcon]", ngImport: i0 }); }
|
|
733
687
|
}
|
|
734
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
688
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: MatTimepickerToggleIconDirective, decorators: [{
|
|
735
689
|
type: Directive,
|
|
736
690
|
args: [{
|
|
737
691
|
selector: '[matDatepickerToggleIcon]',
|
|
@@ -740,8 +694,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
|
|
|
740
694
|
class MatTimePickerToggle {
|
|
741
695
|
/** Whether the toggle button is disabled. */
|
|
742
696
|
get disabled() {
|
|
743
|
-
|
|
744
|
-
|
|
697
|
+
const timepicker = this.timepicker();
|
|
698
|
+
if (timepicker) {
|
|
699
|
+
return timepicker.timepickerInput._disabled;
|
|
745
700
|
}
|
|
746
701
|
return this._disabled;
|
|
747
702
|
}
|
|
@@ -750,21 +705,27 @@ class MatTimePickerToggle {
|
|
|
750
705
|
}
|
|
751
706
|
constructor() {
|
|
752
707
|
this._stateChanges = Subscription.EMPTY;
|
|
708
|
+
/** Datepicker instance that the button will toggle. */
|
|
709
|
+
// eslint-disable-next-line @angular-eslint/no-input-rename
|
|
710
|
+
this.timepicker = input.required({ ...(ngDevMode ? { debugName: "timepicker" } : {}), alias: 'for' });
|
|
711
|
+
/** Tabindex for the toggle. */
|
|
712
|
+
this.tabIndex = input(...(ngDevMode ? [undefined, { debugName: "tabIndex" }] : []));
|
|
753
713
|
/** Screenreader label for the button. */
|
|
754
|
-
this.ariaLabel = '';
|
|
714
|
+
this.ariaLabel = input('', ...(ngDevMode ? [{ debugName: "ariaLabel" }] : []));
|
|
755
715
|
this._disabled = false;
|
|
756
716
|
/** Whether ripples on the toggle should be disabled. */
|
|
757
|
-
this.disableRipple = false;
|
|
717
|
+
this.disableRipple = input(false, ...(ngDevMode ? [{ debugName: "disableRipple" }] : []));
|
|
758
718
|
this.$event = new Event('abrupt');
|
|
759
719
|
/** Underlying button element. */
|
|
760
720
|
//@ViewChild('button') _button: MatButton;
|
|
761
721
|
this._changeDetectorRef = inject(ChangeDetectorRef);
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
722
|
+
// TODO: Fix this index
|
|
723
|
+
// const defaultTabIndex = inject(new HostAttributeToken('tabindex'), {
|
|
724
|
+
// optional: true,
|
|
725
|
+
// });
|
|
726
|
+
// const parsedTabIndex = Number(defaultTabIndex);
|
|
727
|
+
// this.tabIndex =
|
|
728
|
+
// parsedTabIndex || parsedTabIndex === 0 ? parsedTabIndex : null;
|
|
768
729
|
}
|
|
769
730
|
ngOnChanges(changes) {
|
|
770
731
|
if (changes['timepicker']) {
|
|
@@ -778,54 +739,49 @@ class MatTimePickerToggle {
|
|
|
778
739
|
this._watchStateChanges();
|
|
779
740
|
}
|
|
780
741
|
_open(event) {
|
|
781
|
-
|
|
782
|
-
|
|
742
|
+
const timepicker = this.timepicker();
|
|
743
|
+
if (timepicker && !this.disabled) {
|
|
744
|
+
timepicker.open();
|
|
783
745
|
event.stopPropagation();
|
|
784
746
|
}
|
|
785
747
|
}
|
|
786
748
|
_watchStateChanges() {
|
|
787
|
-
const
|
|
788
|
-
|
|
749
|
+
const timepicker = this.timepicker();
|
|
750
|
+
const datepickerStateChanged = timepicker
|
|
751
|
+
? timepicker.stateChanges
|
|
789
752
|
: of();
|
|
790
|
-
const
|
|
791
|
-
|
|
753
|
+
const timepickerValue = this.timepicker();
|
|
754
|
+
const inputStateChanged = timepickerValue && timepickerValue.timepickerInput
|
|
755
|
+
? timepickerValue.timepickerInput.stateChanges
|
|
792
756
|
: of();
|
|
793
|
-
const
|
|
794
|
-
|
|
757
|
+
const timepickerVal = this.timepicker();
|
|
758
|
+
const datepickerToggled = timepickerVal
|
|
759
|
+
? merge(outputToObservable(timepickerVal.openedStream), outputToObservable(timepickerVal.closedStream))
|
|
795
760
|
: of();
|
|
796
761
|
this._stateChanges.unsubscribe();
|
|
797
762
|
this._stateChanges = merge(datepickerStateChanged, inputStateChanged, datepickerToggled).subscribe(() => this._changeDetectorRef.markForCheck());
|
|
798
763
|
}
|
|
799
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
800
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
764
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: MatTimePickerToggle, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
765
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.1.1", type: MatTimePickerToggle, isStandalone: true, selector: "mat-timepicker-toggle", inputs: { timepicker: { classPropertyName: "timepicker", publicName: "for", isSignal: true, isRequired: true, transformFunction: null }, tabIndex: { classPropertyName: "tabIndex", publicName: "tabIndex", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: false, isRequired: false, transformFunction: null }, disableRipple: { classPropertyName: "disableRipple", publicName: "disableRipple", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "click": "_open($event)" }, properties: { "attr.tabindex": "null", "class.mat-timepicker-toggle-active": "timepicker() && timepicker().opened", "class.mat-accent": "timepicker() && timepicker().color === \"accent\"", "class.mat-warn": "timepicker() && timepicker().color === \"warn\"", "attr.data-mat-calendar": "timepicker() ? timepicker().id() : null" }, classAttribute: "mat-timepicker-toggle" }, exportAs: ["matDatepickerToggle"], usesOnChanges: true, ngImport: i0, template: "<button\n #button\n mat-icon-button\n type=\"button\"\n [attr.aria-haspopup]=\"timepicker() ? 'dialog' : null\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.tabindex]=\"disabled ? -1 : tabIndex()\"\n [disabled]=\"disabled\"\n [disableRipple]=\"disableRipple()\"\n>\n <mat-icon>schedule</mat-icon>\n\n <ng-content select=\"[mattimepickerToggleIcon]\" />\n</button>\n", styles: [".mat-form-field-appearance-legacy .mat-form-field-prefix .mat-datepicker-toggle-default-icon,.mat-form-field-appearance-legacy .mat-form-field-suffix .mat-datepicker-toggle-default-icon{width:1em}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-datepicker-toggle-default-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-datepicker-toggle-default-icon{display:block;width:1.5em;height:1.5em}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon-button .mat-datepicker-toggle-default-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon-button .mat-datepicker-toggle-default-icon{margin:auto}\n"], dependencies: [{ kind: "component", type: MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
801
766
|
}
|
|
802
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
767
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: MatTimePickerToggle, decorators: [{
|
|
803
768
|
type: Component,
|
|
804
769
|
args: [{ selector: 'mat-timepicker-toggle', host: {
|
|
805
770
|
class: 'mat-timepicker-toggle',
|
|
806
771
|
'[attr.tabindex]': 'null',
|
|
807
|
-
'[class.mat-timepicker-toggle-active]': 'timepicker && timepicker.opened',
|
|
808
|
-
'[class.mat-accent]': 'timepicker && timepicker.color === "accent"',
|
|
809
|
-
'[class.mat-warn]': 'timepicker && timepicker.color === "warn"',
|
|
772
|
+
'[class.mat-timepicker-toggle-active]': 'timepicker() && timepicker().opened',
|
|
773
|
+
'[class.mat-accent]': 'timepicker() && timepicker().color === "accent"',
|
|
774
|
+
'[class.mat-warn]': 'timepicker() && timepicker().color === "warn"',
|
|
810
775
|
// Used by the test harness to tie this toggle to its timepicker.
|
|
811
|
-
'[attr.data-mat-calendar]': 'timepicker ? timepicker.id : null',
|
|
776
|
+
'[attr.data-mat-calendar]': 'timepicker() ? timepicker().id() : null',
|
|
812
777
|
// Bind the `click` on the host, rather than the inner `button`, so that we can call
|
|
813
778
|
// `stopPropagation` on it without affecting the user's `click` handlers. We need to stop
|
|
814
779
|
// it so that the input doesn't get focused automatically by the form field (See #21836).
|
|
815
780
|
'(click)': '_open($event)',
|
|
816
|
-
}, exportAs: 'matDatepickerToggle', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [MatIconButton, MatIcon], template: "<button\n #button\n mat-icon-button\n type=\"button\"\n [attr.aria-haspopup]=\"timepicker ? 'dialog' : null\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.tabindex]=\"disabled ? -1 : tabIndex\"\n [disabled]=\"disabled\"\n [disableRipple]=\"disableRipple\"\n>\n <mat-icon>schedule</mat-icon>\n\n <ng-content select=\"[mattimepickerToggleIcon]\"
|
|
817
|
-
}], ctorParameters: () => [], propDecorators: { timepicker: [{
|
|
818
|
-
type: Input,
|
|
819
|
-
args: ['for']
|
|
820
|
-
}], tabIndex: [{
|
|
821
|
-
type: Input
|
|
822
|
-
}], ariaLabel: [{
|
|
823
|
-
type: Input
|
|
824
|
-
}], disabled: [{
|
|
825
|
-
type: Input
|
|
826
|
-
}], disableRipple: [{
|
|
781
|
+
}, exportAs: 'matDatepickerToggle', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [MatIconButton, MatIcon], template: "<button\n #button\n mat-icon-button\n type=\"button\"\n [attr.aria-haspopup]=\"timepicker() ? 'dialog' : null\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.tabindex]=\"disabled ? -1 : tabIndex()\"\n [disabled]=\"disabled\"\n [disableRipple]=\"disableRipple()\"\n>\n <mat-icon>schedule</mat-icon>\n\n <ng-content select=\"[mattimepickerToggleIcon]\" />\n</button>\n", styles: [".mat-form-field-appearance-legacy .mat-form-field-prefix .mat-datepicker-toggle-default-icon,.mat-form-field-appearance-legacy .mat-form-field-suffix .mat-datepicker-toggle-default-icon{width:1em}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-datepicker-toggle-default-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-datepicker-toggle-default-icon{display:block;width:1.5em;height:1.5em}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon-button .mat-datepicker-toggle-default-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon-button .mat-datepicker-toggle-default-icon{margin:auto}\n"] }]
|
|
782
|
+
}], ctorParameters: () => [], propDecorators: { timepicker: [{ type: i0.Input, args: [{ isSignal: true, alias: "for", required: true }] }], tabIndex: [{ type: i0.Input, args: [{ isSignal: true, alias: "tabIndex", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], disabled: [{
|
|
827
783
|
type: Input
|
|
828
|
-
}] } });
|
|
784
|
+
}], disableRipple: [{ type: i0.Input, args: [{ isSignal: true, alias: "disableRipple", required: false }] }] } });
|
|
829
785
|
|
|
830
786
|
class MatTimepickerDirective {
|
|
831
787
|
static { this.nextId = 0; }
|
|
@@ -834,7 +790,9 @@ class MatTimepickerDirective {
|
|
|
834
790
|
if (timepicker) {
|
|
835
791
|
this._timepicker = timepicker;
|
|
836
792
|
this._timepicker.setTimepickerInput(this);
|
|
837
|
-
this._closedSubscription = timepicker.closedStream.subscribe(() =>
|
|
793
|
+
// this._closedSubscription = timepicker.closedStream.subscribe(() =>
|
|
794
|
+
// this._onTouched(),
|
|
795
|
+
// );
|
|
838
796
|
//this._registerModel(datepicker.registerInput(this));
|
|
839
797
|
}
|
|
840
798
|
}
|
|
@@ -844,8 +802,9 @@ class MatTimepickerDirective {
|
|
|
844
802
|
const control = this.ngControl
|
|
845
803
|
? this.ngControl.control
|
|
846
804
|
: null;
|
|
847
|
-
const
|
|
848
|
-
|
|
805
|
+
const errorStateMatcher = this.errorStateMatcher();
|
|
806
|
+
const newState = errorStateMatcher
|
|
807
|
+
? errorStateMatcher.isErrorState(control, parent)
|
|
849
808
|
: oldState;
|
|
850
809
|
if (newState !== oldState) {
|
|
851
810
|
this._errorState = newState;
|
|
@@ -986,9 +945,9 @@ class MatTimepickerDirective {
|
|
|
986
945
|
d.setMinutes(+minutes);
|
|
987
946
|
d.setSeconds(0);
|
|
988
947
|
d.setMilliseconds(0);
|
|
989
|
-
const isValueInRange = isDateInRange(this.minDate, this.maxDate, d);
|
|
948
|
+
const isValueInRange = isDateInRange(this.minDate(), this.maxDate(), d);
|
|
990
949
|
if (!isValueInRange) {
|
|
991
|
-
this.invalidInput.emit();
|
|
950
|
+
this.invalidInput.emit(undefined);
|
|
992
951
|
}
|
|
993
952
|
this.writeValue(d, true);
|
|
994
953
|
if (this.onChangeFn) {
|
|
@@ -1052,6 +1011,7 @@ class MatTimepickerDirective {
|
|
|
1052
1011
|
this.onTouchedFn();
|
|
1053
1012
|
}
|
|
1054
1013
|
}
|
|
1014
|
+
// private readonly _defaultErrorStateMatcher = inject(ErrorStateMatcher);
|
|
1055
1015
|
constructor() {
|
|
1056
1016
|
this._closedSubscription = Subscription.EMPTY;
|
|
1057
1017
|
this._errorState = false;
|
|
@@ -1063,6 +1023,7 @@ class MatTimepickerDirective {
|
|
|
1063
1023
|
this.stateChanges = new Subject();
|
|
1064
1024
|
this._uid = `mat-input-${MatTimepickerDirective.nextId++}`;
|
|
1065
1025
|
this.describedBy = '';
|
|
1026
|
+
this.errorStateMatcher = input(...(ngDevMode ? [undefined, { debugName: "errorStateMatcher" }] : []));
|
|
1066
1027
|
this._required = false;
|
|
1067
1028
|
this._placeholder = '';
|
|
1068
1029
|
this.focused = false;
|
|
@@ -1070,20 +1031,22 @@ class MatTimepickerDirective {
|
|
|
1070
1031
|
this.allowed24HourMap = this.generateAllowedMap();
|
|
1071
1032
|
this.isInputFocused = false;
|
|
1072
1033
|
/** Override the label of the ok button. */
|
|
1073
|
-
this.okLabel = 'Ok';
|
|
1034
|
+
this.okLabel = input('Ok', ...(ngDevMode ? [{ debugName: "okLabel" }] : []));
|
|
1074
1035
|
/** Override the label of the cancel button. */
|
|
1075
|
-
this.cancelLabel = 'Cancel';
|
|
1036
|
+
this.cancelLabel = input('Cancel', ...(ngDevMode ? [{ debugName: "cancelLabel" }] : []));
|
|
1076
1037
|
/** Sets the clock mode, 12-hour or 24-hour clocks are supported. */
|
|
1077
|
-
this.color = 'primary';
|
|
1078
|
-
this.disableDialogOpenOnClick = false;
|
|
1079
|
-
this.strict = true;
|
|
1038
|
+
this.color = input('primary', ...(ngDevMode ? [{ debugName: "color" }] : []));
|
|
1039
|
+
this.disableDialogOpenOnClick = input(false, ...(ngDevMode ? [{ debugName: "disableDialogOpenOnClick" }] : []));
|
|
1040
|
+
this.strict = input(true, ...(ngDevMode ? [{ debugName: "strict" }] : []));
|
|
1080
1041
|
this.controlType = 'angular-material-timepicker';
|
|
1042
|
+
this.minDate = input(...(ngDevMode ? [undefined, { debugName: "minDate" }] : []));
|
|
1043
|
+
this.maxDate = input(...(ngDevMode ? [undefined, { debugName: "maxDate" }] : []));
|
|
1081
1044
|
this._value = null;
|
|
1082
1045
|
this._formattedValueString = '';
|
|
1083
1046
|
this._skipValueChangeEmission = true;
|
|
1084
1047
|
this.combination = [];
|
|
1085
|
-
this.timeChange =
|
|
1086
|
-
this.invalidInput =
|
|
1048
|
+
this.timeChange = output();
|
|
1049
|
+
this.invalidInput = output();
|
|
1087
1050
|
this.ngControl = inject(NgControl, { optional: true, self: true });
|
|
1088
1051
|
this.renderer = inject(Renderer2);
|
|
1089
1052
|
this.zone = inject(NgZone);
|
|
@@ -1096,8 +1059,8 @@ class MatTimepickerDirective {
|
|
|
1096
1059
|
this._parentFormGroup = inject(FormGroupDirective, {
|
|
1097
1060
|
optional: true,
|
|
1098
1061
|
});
|
|
1099
|
-
this
|
|
1100
|
-
this.errorStateMatcher = this._defaultErrorStateMatcher;
|
|
1062
|
+
// TODO: fix this error matcher state
|
|
1063
|
+
// this.errorStateMatcher = this._defaultErrorStateMatcher;
|
|
1101
1064
|
if (this.ngControl != null) {
|
|
1102
1065
|
this.ngControl.valueAccessor = this;
|
|
1103
1066
|
}
|
|
@@ -1134,9 +1097,9 @@ class MatTimepickerDirective {
|
|
|
1134
1097
|
});
|
|
1135
1098
|
}
|
|
1136
1099
|
validate() {
|
|
1137
|
-
const isValueInRange = this.strict
|
|
1138
|
-
? isDateInRange(this.minDate, this.maxDate, this.currentValue)
|
|
1139
|
-
: isTimeInRange(this.minDate, this.maxDate, this.currentValue);
|
|
1100
|
+
const isValueInRange = this.strict()
|
|
1101
|
+
? isDateInRange(this.minDate(), this.maxDate(), this.currentValue)
|
|
1102
|
+
: isTimeInRange(this.minDate(), this.maxDate(), this.currentValue);
|
|
1140
1103
|
return isValueInRange ? null : { dateRange: true };
|
|
1141
1104
|
}
|
|
1142
1105
|
ngOnInit() {
|
|
@@ -1147,16 +1110,16 @@ class MatTimepickerDirective {
|
|
|
1147
1110
|
});
|
|
1148
1111
|
}
|
|
1149
1112
|
if (!this.value) {
|
|
1150
|
-
const hasMaxDate = !!this.maxDate;
|
|
1151
|
-
const hasMinDate = !!this.minDate;
|
|
1113
|
+
const hasMaxDate = !!this.maxDate();
|
|
1114
|
+
const hasMinDate = !!this.minDate();
|
|
1152
1115
|
//if (hasMinDate || hasMaxDate) {
|
|
1153
1116
|
if (hasMinDate) {
|
|
1154
|
-
this.minDate.setSeconds(0);
|
|
1155
|
-
this.minDate.setMilliseconds(0);
|
|
1117
|
+
this.minDate().setSeconds(0);
|
|
1118
|
+
this.minDate().setMilliseconds(0);
|
|
1156
1119
|
}
|
|
1157
1120
|
if (hasMaxDate) {
|
|
1158
|
-
this.maxDate.setSeconds(0);
|
|
1159
|
-
this.maxDate.setMilliseconds(0);
|
|
1121
|
+
this.maxDate().setSeconds(0);
|
|
1122
|
+
this.maxDate().setMilliseconds(0);
|
|
1160
1123
|
}
|
|
1161
1124
|
if (!this.ngControl._rawValidators.find((v) => v === this)) {
|
|
1162
1125
|
this.ngControl._rawValidators.push(this);
|
|
@@ -1166,7 +1129,7 @@ class MatTimepickerDirective {
|
|
|
1166
1129
|
this._skipValueChangeEmission = false;
|
|
1167
1130
|
}
|
|
1168
1131
|
generateAllowedMap() {
|
|
1169
|
-
const isStrictMode = this.strict && this.value instanceof Date;
|
|
1132
|
+
const isStrictMode = this.strict() && this.value instanceof Date;
|
|
1170
1133
|
const a24hm = {};
|
|
1171
1134
|
for (let h = 0; h < 24; h++) {
|
|
1172
1135
|
for (let m = 0; m < 60; m++) {
|
|
@@ -1177,10 +1140,10 @@ class MatTimepickerDirective {
|
|
|
1177
1140
|
currentDate.setMinutes(m);
|
|
1178
1141
|
currentDate.setSeconds(0);
|
|
1179
1142
|
currentDate.setMilliseconds(0);
|
|
1180
|
-
hourMap[m] = isDateInRange(this.minDate, this.maxDate, currentDate);
|
|
1143
|
+
hourMap[m] = isDateInRange(this.minDate(), this.maxDate(), currentDate);
|
|
1181
1144
|
}
|
|
1182
1145
|
else {
|
|
1183
|
-
hourMap[m] = isAllowed(h, m, this.minDate, this.maxDate);
|
|
1146
|
+
hourMap[m] = isAllowed(h, m, this.minDate(), this.maxDate());
|
|
1184
1147
|
}
|
|
1185
1148
|
a24hm[h] = hourMap;
|
|
1186
1149
|
}
|
|
@@ -1195,11 +1158,11 @@ class MatTimepickerDirective {
|
|
|
1195
1158
|
}
|
|
1196
1159
|
this._timepicker.modalRef.componentInstance.data = {
|
|
1197
1160
|
value: this.currentValue,
|
|
1198
|
-
okLabel: this.okLabel,
|
|
1199
|
-
cancelLabel: this.cancelLabel,
|
|
1200
|
-
color: this.color,
|
|
1201
|
-
minDate: this.minDate,
|
|
1202
|
-
maxDate: this.maxDate,
|
|
1161
|
+
okLabel: this.okLabel(),
|
|
1162
|
+
cancelLabel: this.cancelLabel(),
|
|
1163
|
+
color: this.color(),
|
|
1164
|
+
minDate: this.minDate(),
|
|
1165
|
+
maxDate: this.maxDate(),
|
|
1203
1166
|
allowed24HourMap: this.allowed24HourMap,
|
|
1204
1167
|
};
|
|
1205
1168
|
}
|
|
@@ -1209,7 +1172,7 @@ class MatTimepickerDirective {
|
|
|
1209
1172
|
}
|
|
1210
1173
|
const hour = value.getHours();
|
|
1211
1174
|
const minutes = value.getMinutes();
|
|
1212
|
-
return isAllowed(hour, minutes, this.minDate, this.maxDate);
|
|
1175
|
+
return isAllowed(hour, minutes, this.minDate(), this.maxDate());
|
|
1213
1176
|
}
|
|
1214
1177
|
writeValue(value, isInnerCall = false) {
|
|
1215
1178
|
if (!isInnerCall) {
|
|
@@ -1237,12 +1200,12 @@ class MatTimepickerDirective {
|
|
|
1237
1200
|
this.disabled = isDisabled;
|
|
1238
1201
|
this.stateChanges.next();
|
|
1239
1202
|
}
|
|
1240
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1241
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
1203
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: MatTimepickerDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1204
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.1.1", type: MatTimepickerDirective, isStandalone: true, selector: "input[matTimepicker]", inputs: { matTimepicker: { classPropertyName: "matTimepicker", publicName: "matTimepicker", isSignal: false, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: false, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: false, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: false, isRequired: false, transformFunction: null }, errorStateMatcher: { classPropertyName: "errorStateMatcher", publicName: "errorStateMatcher", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: false, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: false, isRequired: false, transformFunction: null }, okLabel: { classPropertyName: "okLabel", publicName: "okLabel", isSignal: true, isRequired: false, transformFunction: null }, cancelLabel: { classPropertyName: "cancelLabel", publicName: "cancelLabel", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, disableDialogOpenOnClick: { classPropertyName: "disableDialogOpenOnClick", publicName: "disableDialogOpenOnClick", isSignal: true, isRequired: false, transformFunction: null }, strict: { classPropertyName: "strict", publicName: "strict", isSignal: true, isRequired: false, transformFunction: null }, minDate: { classPropertyName: "minDate", publicName: "minDate", isSignal: true, isRequired: false, transformFunction: null }, maxDate: { classPropertyName: "maxDate", publicName: "maxDate", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: false, isRequired: false, transformFunction: null } }, outputs: { timeChange: "timeChange", invalidInput: "invalidInput" }, host: { listeners: { "input": "inputHandler()", "keydown": "keydownHandler($event)", "keyup": "keyupHandler($event)", "focus": "focusHandler()", "focusout": "focusoutHandler()" }, properties: { "class.mat-input-server": "_isServer", "attr.id": "id", "attr.placeholder": "placeholder", "disabled": "disabled", "required": "required", "attr.readonly": "readonly || null", "attr.aria-invalid": "errorState", "attr.aria-required": "required.toString()", "class.floating": "this.shouldLabelFloat", "attr.aria-describedby": "this.describedBy" }, classAttribute: "mat-input-element mat-form-field-autofill-control" }, providers: [
|
|
1242
1205
|
{ provide: MatFormFieldControl, useExisting: MatTimepickerDirective },
|
|
1243
1206
|
], exportAs: ["matTimepicker"], usesOnChanges: true, ngImport: i0 }); }
|
|
1244
1207
|
}
|
|
1245
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1208
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: MatTimepickerDirective, decorators: [{
|
|
1246
1209
|
type: Directive,
|
|
1247
1210
|
args: [{
|
|
1248
1211
|
selector: 'input[matTimepicker]',
|
|
@@ -1261,6 +1224,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
|
|
|
1261
1224
|
'[attr.readonly]': 'readonly || null',
|
|
1262
1225
|
'[attr.aria-invalid]': 'errorState',
|
|
1263
1226
|
'[attr.aria-required]': 'required.toString()',
|
|
1227
|
+
'(input)': 'inputHandler()',
|
|
1228
|
+
'(keydown)': 'keydownHandler($event)',
|
|
1229
|
+
'(keyup)': 'keyupHandler($event)',
|
|
1230
|
+
'(focus)': 'focusHandler()',
|
|
1231
|
+
'(focusout)': 'focusoutHandler()',
|
|
1264
1232
|
},
|
|
1265
1233
|
exportAs: 'matTimepicker',
|
|
1266
1234
|
standalone: true,
|
|
@@ -1279,52 +1247,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
|
|
|
1279
1247
|
}], describedBy: [{
|
|
1280
1248
|
type: HostBinding,
|
|
1281
1249
|
args: ['attr.aria-describedby']
|
|
1282
|
-
}], errorStateMatcher: [{
|
|
1283
|
-
type: Input
|
|
1284
|
-
}], required: [{
|
|
1250
|
+
}], errorStateMatcher: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorStateMatcher", required: false }] }], required: [{
|
|
1285
1251
|
type: Input
|
|
1286
1252
|
}], placeholder: [{
|
|
1287
1253
|
type: Input
|
|
1288
|
-
}], okLabel: [{
|
|
1289
|
-
type: Input
|
|
1290
|
-
}], cancelLabel: [{
|
|
1291
|
-
type: Input
|
|
1292
|
-
}], color: [{
|
|
1293
|
-
type: Input
|
|
1294
|
-
}], disableDialogOpenOnClick: [{
|
|
1295
|
-
type: Input
|
|
1296
|
-
}], strict: [{
|
|
1254
|
+
}], okLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "okLabel", required: false }] }], cancelLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "cancelLabel", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], disableDialogOpenOnClick: [{ type: i0.Input, args: [{ isSignal: true, alias: "disableDialogOpenOnClick", required: false }] }], strict: [{ type: i0.Input, args: [{ isSignal: true, alias: "strict", required: false }] }], minDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "minDate", required: false }] }], maxDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxDate", required: false }] }], value: [{
|
|
1297
1255
|
type: Input
|
|
1298
|
-
}],
|
|
1299
|
-
type: Input
|
|
1300
|
-
}], maxDate: [{
|
|
1301
|
-
type: Input
|
|
1302
|
-
}], value: [{
|
|
1303
|
-
type: Input
|
|
1304
|
-
}], timeChange: [{
|
|
1305
|
-
type: Output
|
|
1306
|
-
}], invalidInput: [{
|
|
1307
|
-
type: Output
|
|
1308
|
-
}], inputHandler: [{
|
|
1309
|
-
type: HostListener,
|
|
1310
|
-
args: ['input']
|
|
1311
|
-
}], keydownHandler: [{
|
|
1312
|
-
type: HostListener,
|
|
1313
|
-
args: ['keydown', ['$event']]
|
|
1314
|
-
}], keyupHandler: [{
|
|
1315
|
-
type: HostListener,
|
|
1316
|
-
args: ['keyup', ['$event']]
|
|
1317
|
-
}], focusHandler: [{
|
|
1318
|
-
type: HostListener,
|
|
1319
|
-
args: ['focus']
|
|
1320
|
-
}], focusoutHandler: [{
|
|
1321
|
-
type: HostListener,
|
|
1322
|
-
args: ['focusout']
|
|
1323
|
-
}] } });
|
|
1256
|
+
}], timeChange: [{ type: i0.Output, args: ["timeChange"] }], invalidInput: [{ type: i0.Output, args: ["invalidInput"] }] } });
|
|
1324
1257
|
|
|
1325
1258
|
class OnemrvaMatTimepickerModule {
|
|
1326
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1327
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
1259
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: OnemrvaMatTimepickerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
1260
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.1.1", ngImport: i0, type: OnemrvaMatTimepickerModule, imports: [ClockComponent,
|
|
1328
1261
|
MatTimepickerDirective,
|
|
1329
1262
|
MatTimepickerComponentDialogComponent,
|
|
1330
1263
|
MatTimepickerToggleIconDirective,
|
|
@@ -1332,11 +1265,11 @@ class OnemrvaMatTimepickerModule {
|
|
|
1332
1265
|
OnemrvaMatTimepickerComponent], exports: [MatTimepickerDirective,
|
|
1333
1266
|
MatTimePickerToggle,
|
|
1334
1267
|
OnemrvaMatTimepickerComponent] }); }
|
|
1335
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
1268
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: OnemrvaMatTimepickerModule, imports: [ClockComponent,
|
|
1336
1269
|
MatTimepickerComponentDialogComponent,
|
|
1337
1270
|
MatTimePickerToggle] }); }
|
|
1338
1271
|
}
|
|
1339
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1272
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: OnemrvaMatTimepickerModule, decorators: [{
|
|
1340
1273
|
type: NgModule,
|
|
1341
1274
|
args: [{
|
|
1342
1275
|
imports: [
|