()
| 214 | readonly panelClass = input<string | string[]>(); |
| 215 | |
| 216 | constructor() { |
| 217 | if (typeof ngDevMode === 'undefined' || ngDevMode) { |
| 218 | validateAdapter(this._dateAdapter, this._dateFormats); |
| 219 | |
| 220 | effect(() => { |
| 221 | const options = this.options(); |
| 222 | const interval = this.interval(); |
| 223 | |
| 224 | if (options !== null && interval !== null) { |
| 225 | throw new Error( |
| 226 | 'Cannot specify both the `options` and `interval` inputs at the same time', |
| 227 | ); |
| 228 | } else if (options?.length === 0) { |
| 229 | throw new Error('Value of `options` input cannot be an empty array'); |
| 230 | } |
| 231 | }); |
| 232 | } |
| 233 | |
| 234 | // Since the panel ID is static, we can set it once without having to maintain a host binding. |
| 235 | const element = inject<ElementRef<HTMLElement>>(ElementRef); |
| 236 | element.nativeElement.setAttribute('mat-timepicker-panel-id', this.panelId); |
| 237 | this._handleLocaleChanges(); |
| 238 | this._handleInputStateChanges(); |
| 239 | this._keyManager.change.subscribe(() => |
| 240 | this._activeDescendant.set(this._keyManager.activeItem?.id || null), |
| 241 | ); |
| 242 | } |
| 243 | |
| 244 | /** Opens the timepicker. */ |
| 245 | open(): void { |
nothing calls this directly
no test coverage detected