@eui/components 17.0.3-snapshot-1703318234448 → 17.0.3-snapshot-1704421850692

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.
@@ -1,10 +1,9 @@
1
- import { BooleanInput } from '@angular/cdk/coercion';
2
- import { ElementRef, OnInit, DoCheck, OnDestroy } from '@angular/core';
1
+ import { OnInit, DoCheck, OnDestroy, SimpleChanges, OnChanges } from '@angular/core';
3
2
  import { ControlValueAccessor, NgControl, FormControl } from '@angular/forms';
4
3
  import { EuiDateTimePickerConfig } from './models/eui-date-time-picker.config.model';
5
4
  import { EuiTimePicker } from './models/eui-timepicker.model';
6
5
  import * as i0 from "@angular/core";
7
- export declare class EuiTimepickerComponent implements ControlValueAccessor, OnInit, DoCheck, OnDestroy {
6
+ export declare class EuiTimepickerComponent implements ControlValueAccessor, OnInit, OnChanges, DoCheck, OnDestroy {
8
7
  private control;
9
8
  hours: number;
10
9
  mins: number;
@@ -22,43 +21,96 @@ export declare class EuiTimepickerComponent implements ControlValueAccessor, OnI
22
21
  secondsDownDisabled: boolean;
23
22
  e2eAttr: string;
24
23
  timeMask: string;
24
+ placeholder: string;
25
25
  stepHours: number;
26
26
  stepMinutes: number;
27
27
  stepSeconds: number;
28
- get isreadOnly(): boolean;
29
- set isreadOnly(value: BooleanInput);
30
- private _isreadOnly;
31
- get isOneInputField(): boolean;
32
- set isOneInputField(value: BooleanInput);
33
- private _isOneInputField;
34
- get hasSeconds(): boolean;
35
- set hasSeconds(value: BooleanInput);
36
- private _hasSeconds;
28
+ isreadOnly: boolean;
29
+ isOneInputField: boolean;
30
+ hasSeconds: boolean;
37
31
  private propagatedValues;
38
32
  private destroy$;
39
- protected inputHoursElement: ElementRef<HTMLInputElement>;
40
- protected inputMinsElement: ElementRef<HTMLInputElement>;
41
- protected inputSecsElement: ElementRef<HTMLInputElement>;
42
33
  constructor(config: EuiDateTimePickerConfig, control: NgControl);
43
34
  ngOnInit(): void;
35
+ ngOnChanges(changes: SimpleChanges): void;
44
36
  ngDoCheck(): void;
45
37
  ngOnDestroy(): void;
38
+ /**
39
+ * Increments or decrements hours according to the step param being passed
40
+ *
41
+ * @param step The step number that hours will increase or decrease
42
+ */
46
43
  changeHours(step: number): void;
44
+ /**
45
+ * Increments or decrements minutes according to the step param being passed
46
+ *
47
+ * @param step The step number that minutes will increase or decrease
48
+ */
47
49
  changeMinutes(step: number): void;
50
+ /**
51
+ * Increments or decrements seconds according to the step param being passed
52
+ *
53
+ * @param step The step number that seconds will increase or decrease
54
+ */
48
55
  changeSeconds(step: number): void;
56
+ /**
57
+ * Updates the input field when hours change and adds 24hour validation + propagates the value back to the form
58
+ *
59
+ * @param newVal The new value that hours will have
60
+ */
49
61
  updateHours(newVal: string): void;
62
+ /**
63
+ * Updates the input field when minutes change and adds 60mins validation + propagates the value back to the form
64
+ *
65
+ * @param newVal The new value that minutes will have
66
+ */
50
67
  updateMinutes(newVal: string): void;
68
+ /**
69
+ * Updates the input field when seconds change and adds 60secs validation + propagates the value back to the form
70
+ *
71
+ * @param newVal The new value that seconds will have
72
+ */
51
73
  updateSeconds(newVal: string): void;
52
74
  /**
53
75
  * Autofills mins and secs with 00s if the user tabs after entering hours and marks the input as touched
54
76
  */
55
77
  onFocusOut(): void;
56
78
  writeValue(values: EuiTimePicker): void;
79
+ /**
80
+ * Disables the hour up incremental when max time range is reached
81
+ *
82
+ * @param state The boolean value that enables the feature
83
+ */
57
84
  hoursUpDisable(state: boolean): void;
85
+ /**
86
+ * Disables the hour down decremental when min time range is reached
87
+ *
88
+ * @param state The boolean value that enables the feature
89
+ */
58
90
  hoursDownDisable(state: boolean): void;
91
+ /**
92
+ * Disables the minutes up incremental when max time range is reached
93
+ *
94
+ * @param state The boolean value that enables the feature
95
+ */
59
96
  minutesUpDisable(state: boolean): void;
97
+ /**
98
+ * Disables the minutes down decremental when min time range is reached
99
+ *
100
+ * @param state The boolean value that enables the feature
101
+ */
60
102
  minutesDownDisable(state: boolean): void;
103
+ /**
104
+ * Disables the seconds up incremental when max time range is reached
105
+ *
106
+ * @param state The boolean value that enables the feature
107
+ */
61
108
  secondsUpDisable(state: boolean): void;
109
+ /**
110
+ * Disables the seconds down decremental when min time range is reached
111
+ *
112
+ * @param state The boolean value that enables the feature
113
+ */
62
114
  secondsDownDisable(state: boolean): void;
63
115
  registerOnChange(fn: any): void;
64
116
  registerOnTouched(fn: any): void;
@@ -74,6 +126,9 @@ export declare class EuiTimepickerComponent implements ControlValueAccessor, OnI
74
126
  private propagateChange;
75
127
  private propagateTouched;
76
128
  static ɵfac: i0.ɵɵFactoryDeclaration<EuiTimepickerComponent, [{ optional: true; }, { optional: true; self: true; }]>;
77
- static ɵcmp: i0.ɵɵComponentDeclaration<EuiTimepickerComponent, "eui-timepicker", never, { "e2eAttr": { "alias": "e2eAttr"; "required": false; }; "timeMask": { "alias": "timeMask"; "required": false; }; "stepHours": { "alias": "stepHours"; "required": false; }; "stepMinutes": { "alias": "stepMinutes"; "required": false; }; "stepSeconds": { "alias": "stepSeconds"; "required": false; }; "isreadOnly": { "alias": "isreadOnly"; "required": false; }; "isOneInputField": { "alias": "isOneInputField"; "required": false; }; "hasSeconds": { "alias": "hasSeconds"; "required": false; }; }, {}, never, never, false, never>;
129
+ static ɵcmp: i0.ɵɵComponentDeclaration<EuiTimepickerComponent, "eui-timepicker", never, { "e2eAttr": { "alias": "e2eAttr"; "required": false; }; "timeMask": { "alias": "timeMask"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "stepHours": { "alias": "stepHours"; "required": false; }; "stepMinutes": { "alias": "stepMinutes"; "required": false; }; "stepSeconds": { "alias": "stepSeconds"; "required": false; }; "isreadOnly": { "alias": "isreadOnly"; "required": false; }; "isOneInputField": { "alias": "isOneInputField"; "required": false; }; "hasSeconds": { "alias": "hasSeconds"; "required": false; }; }, {}, never, never, false, never>;
130
+ static ngAcceptInputType_isreadOnly: unknown;
131
+ static ngAcceptInputType_isOneInputField: unknown;
132
+ static ngAcceptInputType_hasSeconds: unknown;
78
133
  }
79
134
  //# sourceMappingURL=eui-timepicker.component.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"eui-timepicker.component.d.ts","sourceRoot":"","sources":["../../eui-timepicker/eui-timepicker.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAyB,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAC5E,OAAO,EAEH,UAAU,EAGV,MAAM,EAKN,OAAO,EACP,SAAS,EACZ,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,oBAAoB,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAK9E,OAAO,EAAE,uBAAuB,EAAE,MAAM,4CAA4C,CAAC;AACrF,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;;AAE9D,qBAMa,sBAAuB,YAAW,oBAAoB,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS;IAiEnE,OAAO,CAAC,OAAO;IAhEvC,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,gBAAgB,EAAE,OAAO,CAAC;IAC1B,mBAAmB,mBAAqB;IACxC,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IAEd,eAAe,UAAS;IACxB,iBAAiB,UAAS;IAC1B,iBAAiB,UAAS;IAC1B,mBAAmB,UAAS;IAC5B,iBAAiB,UAAS;IAC1B,mBAAmB,UAAS;IAE1B,OAAO,SAAoB;IAE3B,QAAQ,SAAU;IAElB,SAAS,SAAK;IACd,WAAW,SAAK;IAChB,WAAW,SAAK;IAEzB,IACI,UAAU,IAAI,OAAO,CAExB;IACD,IAAI,UAAU,CAAC,KAAK,EAAE,YAAY,EAEjC;IACD,OAAO,CAAC,WAAW,CAAS;IAE5B,IACI,eAAe,IAAI,OAAO,CAE7B;IACD,IAAI,eAAe,CAAC,KAAK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,gBAAgB,CAAC,EAAE,EAAE,GAAG,GAAG,IAAI;IAM/B,iBAAiB,CAAC,EAAE,EAAE,GAAG,GAAG,IAAI;IAKhC,OAAO,CAAC,UAAU,CAAkE;IAIpF,OAAO,CAAC,SAAS;IAIjB;;;;;OAKG;IACH,OAAO,CAAC,SAAS;IAUjB,OAAO,CAAC,eAAe,CAAmC;IAE1D,OAAO,CAAC,gBAAgB,CAA6B;yCA9W5C,sBAAsB;2CAAtB,sBAAsB;yCAgX8/a,OAAQ;8CAAR,OAAQ;yCAAR,OAAQ;CADxib"}
@@ -43,7 +43,7 @@ class EuiIconToggleComponent {
43
43
  this.setIconClass();
44
44
  this.toggle.emit(this.isChecked);
45
45
  }
46
- this.focusElement.nativeElement.focus();
46
+ this.focusElement?.nativeElement.focus();
47
47
  }
48
48
  onKeyDown(event) {
49
49
  switch (event.code) {
@@ -1 +1 @@
1
- {"version":3,"file":"eui-components-eui-icon-toggle.mjs","sources":["../../eui-icon-toggle/eui-icon-toggle.component.ts","../../eui-icon-toggle/eui-icon-toggle.component.html","../../eui-icon-toggle/eui-icon-toggle.module.ts","../../eui-icon-toggle/eui-components-eui-icon-toggle.ts"],"sourcesContent":["import type { ElementRef } from '@angular/core';\nimport {\n AfterContentInit,\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n HostBinding,\n Input,\n Output,\n ViewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport { uniqueId } from '@eui/core';\nimport { coerceBooleanProperty, BooleanInput } from '@angular/cdk/coercion';\n\n@Component({\n selector: 'eui-icon-toggle',\n templateUrl: './eui-icon-toggle.component.html',\n styleUrls: ['./styles/_index.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class EuiIconToggleComponent implements AfterContentInit {\n @Input() id = `eui-icon-toggle-${uniqueId()}`;\n @Input() styleClass: string;\n @Input() styleClassOn: string;\n @Input() styleClassOff: string;\n @Input() iconClassOff: string;\n @Input() iconClassOn: string;\n @Input() iconSvgNameOn: string;\n @Input() iconSvgNameOff: string;\n @Input() iconSvgFillColorOn = 'accent-100';\n @Input() iconSvgFillColorOff = 'grey-100';\n @Input() tabindex = 0;\n @Input() ariaLabel = 'Toggle icon';\n @Input() keyboardAccessKey: string;\n\n @HostBinding('attr.data-e2e') @Input() e2eAttr = 'eui-icon-toggle';\n\n @Output() toggle: EventEmitter<boolean> = new EventEmitter();\n\n @ViewChild('focusElement') focusElement: ElementRef<HTMLSpanElement>;\n public iconClass: string;\n public stateClass: string;\n\n public iconSvgName: string;\n public iconSvgFillColor: string;\n public iconSvgSet: string;\n\n @Input()\n get isChecked(): boolean {\n return this._isChecked;\n }\n set isChecked(value: BooleanInput) {\n this._isChecked = coerceBooleanProperty(value);\n }\n private _isChecked = false;\n @Input()\n get isReadOnly(): boolean {\n return this._isReadOnly;\n }\n set isReadOnly(value: BooleanInput) {\n this._isReadOnly = coerceBooleanProperty(value);\n }\n private _isReadOnly = false;\n\n ngAfterContentInit(): void {\n this.setIconClass();\n if (!this.ariaLabel || this.ariaLabel === '') {\n this.ariaLabel = this.iconClass ? this.iconClass : '';\n }\n }\n\n onToggle(): void {\n if (!this.isReadOnly) {\n this.isChecked = !this.isChecked;\n this.setIconClass();\n this.toggle.emit(this.isChecked);\n }\n this.focusElement.nativeElement.focus();\n }\n\n onKeyDown(event: KeyboardEvent): void {\n switch (event.code) {\n case 'Enter': \n case 'Space': \n event.preventDefault();\n event.stopPropagation();\n this.onToggle();\n break;\n }\n }\n\n private setIconClass(): void {\n if (this.isChecked) {\n this.iconClass = this.iconClassOn;\n this.stateClass = this.styleClassOn;\n this.iconSvgName = this.iconSvgNameOn;\n this.iconSvgFillColor = this.iconSvgFillColorOn;\n } else {\n this.iconClass = this.iconClassOff;\n this.stateClass = this.styleClassOff;\n this.iconSvgName = this.iconSvgNameOff;\n this.iconSvgFillColor = this.iconSvgFillColorOff;\n }\n }\n}\n","<div\n #focusElement\n [id]=\"id\"\n class=\"eui-icon-toggle {{ styleClass }}\"\n [ngClass]=\"isChecked ? 'eui-icon-toggle--default-on' : 'eui-icon-toggle--default-off'\"\n tabindex=\"{{ !isReadOnly ? tabindex : '-1' }}\"\n role=\"switch\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.aria-checked]=\"isChecked\"\n [attr.accesskey]=\"keyboardAccessKey\"\n (click)=\"onToggle()\"\n (keydown)=\"onKeyDown($event)\">\n <ng-container *ngIf=\"iconClassOn && iconClassOff\">\n <!-- V15 OK-->\n <span\n class=\"eui-icon-toggle__icon eui-icon {{ iconClass }}\"\n [class.eui-icon-toggle--checked]=\"isChecked\"\n [class.eui-icon-toggle--readonly]=\"isReadOnly\">\n </span>\n </ng-container>\n\n <ng-container *ngIf=\"iconSvgNameOn && iconSvgNameOff\">\n <eui-icon-svg [icon]=\"iconSvgName\" [fillColor]=\"iconSvgFillColor\"></eui-icon-svg>\n </ng-container>\n</div>\n","import { EuiIconToggleComponent } from './eui-icon-toggle.component';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { EuiIconModule } from '@eui/components/eui-icon';\n\n@NgModule({\n imports: [CommonModule, EuiIconModule],\n exports: [EuiIconToggleComponent],\n declarations: [EuiIconToggleComponent],\n})\nexport class EuiIconToggleModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;MAsBa,sBAAsB,CAAA;AAPnC,IAAA,WAAA,GAAA;AAQa,QAAA,IAAA,CAAA,EAAE,GAAG,CAAA,gBAAA,EAAmB,QAAQ,EAAE,EAAE,CAAC;QAQrC,IAAkB,CAAA,kBAAA,GAAG,YAAY,CAAC;QAClC,IAAmB,CAAA,mBAAA,GAAG,UAAU,CAAC;QACjC,IAAQ,CAAA,QAAA,GAAG,CAAC,CAAC;QACb,IAAS,CAAA,SAAA,GAAG,aAAa,CAAC;QAGI,IAAO,CAAA,OAAA,GAAG,iBAAiB,CAAC;AAEzD,QAAA,IAAA,CAAA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G,iBAAiB,EAAA,CAAA;sBAAzB,KAAK;gBAEiC,OAAO,EAAA,CAAA;sBAA7C,WAAW;uBAAC,eAAe,CAAA;;sBAAG,KAAK;gBAE1B,MAAM,EAAA,CAAA;sBAAf,MAAM;gBAEoB,YAAY,EAAA,CAAA;sBAAtC,SAAS;uBAAC,cAAc,CAAA;gBASrB,SAAS,EAAA,CAAA;sBADZ,KAAK;gBASF,UAAU,EAAA,CAAA;sBADb,KAAK;;;ME9CG,mBAAmB,CAAA;iIAAnB,mBAAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA,EAAA;AAAnB,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,mBAAmB,iBAFb,sBAAsB,CAAA,EAAA,OAAA,EAAA,CAF3B,YAAY,EAAE,aAAa,aAC3B,sBAAsB,CAAA,EAAA,CAAA,CAAA,EAAA;kIAGvB,mBAAmB,EAAA,OAAA,EAAA,CAJlB,YAAY,EAAE,aAAa,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAI5B,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAL/B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,aAAa,CAAC;oBACtC,OAAO,EAAE,CAAC,sBAAsB,CAAC;oBACjC,YAAY,EAAE,CAAC,sBAAsB,CAAC;AACzC,iBAAA,CAAA;;;ACVD;;AAEG;;;;"}
1
+ {"version":3,"file":"eui-components-eui-icon-toggle.mjs","sources":["../../eui-icon-toggle/eui-icon-toggle.component.ts","../../eui-icon-toggle/eui-icon-toggle.component.html","../../eui-icon-toggle/eui-icon-toggle.module.ts","../../eui-icon-toggle/eui-components-eui-icon-toggle.ts"],"sourcesContent":["import type { ElementRef } from '@angular/core';\nimport {\n AfterContentInit,\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n HostBinding,\n Input,\n Output,\n ViewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport { uniqueId } from '@eui/core';\nimport { coerceBooleanProperty, BooleanInput } from '@angular/cdk/coercion';\n\n@Component({\n selector: 'eui-icon-toggle',\n templateUrl: './eui-icon-toggle.component.html',\n styleUrls: ['./styles/_index.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class EuiIconToggleComponent implements AfterContentInit {\n @Input() id = `eui-icon-toggle-${uniqueId()}`;\n @Input() styleClass: string;\n @Input() styleClassOn: string;\n @Input() styleClassOff: string;\n @Input() iconClassOff: string;\n @Input() iconClassOn: string;\n @Input() iconSvgNameOn: string;\n @Input() iconSvgNameOff: string;\n @Input() iconSvgFillColorOn = 'accent-100';\n @Input() iconSvgFillColorOff = 'grey-100';\n @Input() tabindex = 0;\n @Input() ariaLabel = 'Toggle icon';\n @Input() keyboardAccessKey: string;\n\n @HostBinding('attr.data-e2e') @Input() e2eAttr = 'eui-icon-toggle';\n\n @Output() toggle: EventEmitter<boolean> = new EventEmitter();\n\n @ViewChild('focusElement') focusElement: ElementRef<HTMLSpanElement>;\n public iconClass: string;\n public stateClass: string;\n\n public iconSvgName: string;\n public iconSvgFillColor: string;\n public iconSvgSet: string;\n\n @Input()\n get isChecked(): boolean {\n return this._isChecked;\n }\n set isChecked(value: BooleanInput) {\n this._isChecked = coerceBooleanProperty(value);\n }\n private _isChecked = false;\n @Input()\n get isReadOnly(): boolean {\n return this._isReadOnly;\n }\n set isReadOnly(value: BooleanInput) {\n this._isReadOnly = coerceBooleanProperty(value);\n }\n private _isReadOnly = false;\n\n ngAfterContentInit(): void {\n this.setIconClass();\n if (!this.ariaLabel || this.ariaLabel === '') {\n this.ariaLabel = this.iconClass ? this.iconClass : '';\n }\n }\n\n onToggle(): void {\n if (!this.isReadOnly) {\n this.isChecked = !this.isChecked;\n this.setIconClass();\n this.toggle.emit(this.isChecked);\n }\n this.focusElement?.nativeElement.focus();\n }\n\n onKeyDown(event: KeyboardEvent): void {\n switch (event.code) {\n case 'Enter':\n case 'Space':\n event.preventDefault();\n event.stopPropagation();\n this.onToggle();\n break;\n }\n }\n\n private setIconClass(): void {\n if (this.isChecked) {\n this.iconClass = this.iconClassOn;\n this.stateClass = this.styleClassOn;\n this.iconSvgName = this.iconSvgNameOn;\n this.iconSvgFillColor = this.iconSvgFillColorOn;\n } else {\n this.iconClass = this.iconClassOff;\n this.stateClass = this.styleClassOff;\n this.iconSvgName = this.iconSvgNameOff;\n this.iconSvgFillColor = this.iconSvgFillColorOff;\n }\n }\n}\n","<div\n #focusElement\n [id]=\"id\"\n class=\"eui-icon-toggle {{ styleClass }}\"\n [ngClass]=\"isChecked ? 'eui-icon-toggle--default-on' : 'eui-icon-toggle--default-off'\"\n tabindex=\"{{ !isReadOnly ? tabindex : '-1' }}\"\n role=\"switch\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.aria-checked]=\"isChecked\"\n [attr.accesskey]=\"keyboardAccessKey\"\n (click)=\"onToggle()\"\n (keydown)=\"onKeyDown($event)\">\n <ng-container *ngIf=\"iconClassOn && iconClassOff\">\n <!-- V15 OK-->\n <span\n class=\"eui-icon-toggle__icon eui-icon {{ iconClass }}\"\n [class.eui-icon-toggle--checked]=\"isChecked\"\n [class.eui-icon-toggle--readonly]=\"isReadOnly\">\n </span>\n </ng-container>\n\n <ng-container *ngIf=\"iconSvgNameOn && iconSvgNameOff\">\n <eui-icon-svg [icon]=\"iconSvgName\" [fillColor]=\"iconSvgFillColor\"></eui-icon-svg>\n </ng-container>\n</div>\n","import { EuiIconToggleComponent } from './eui-icon-toggle.component';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { EuiIconModule } from '@eui/components/eui-icon';\n\n@NgModule({\n imports: [CommonModule, EuiIconModule],\n exports: [EuiIconToggleComponent],\n declarations: [EuiIconToggleComponent],\n})\nexport class EuiIconToggleModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;MAsBa,sBAAsB,CAAA;AAPnC,IAAA,WAAA,GAAA;AAQa,QAAA,IAAA,CAAA,EAAE,GAAG,CAAA,gBAAA,EAAmB,QAAQ,EAAE,EAAE,CAAC;QAQrC,IAAkB,CAAA,kBAAA,GAAG,YAAY,CAAC;QAClC,IAAmB,CAAA,mBAAA,GAAG,UAAU,CAAC;QACjC,IAAQ,CAAA,QAAA,GAAG,CAAC,CAAC;QACb,IAAS,CAAA,SAAA,GAAG,aAAa,CAAC;QAGI,IAAO,CAAA,OAAA,GAAG,iBAAiB,CAAC;AAEzD,QAAA,IAAA,CAAA,MAAM,GAA0B,IAAI,YAAY,EAAE,CAAC;QAiBrD,IAAU,CAAA,UAAA,GAAG,KAAK,CAAC;QAQnB,IAAW,CAAA,WAAA,GAAG,KAAK,CAAC;AA0C/B,KAAA;AAzDG,IAAA,IACI,SAAS,GAAA;QACT,OAAO,IAAI,CAAC,UAAU,CAAC;KAC1B;IACD,IAAI,SAAS,CAAC,KAAmB,EAAA;AAC7B,QAAA,IAAI,CAAC,UAAU,GAAG,qBAAqB,CAAC,KAAK,CAAC,CAAC;KAClD;AAED,IAAA,IACI,UAAU,GAAA;QACV,OAAO,IAAI,CAAC,WAAW,CAAC;KAC3B;IACD,IAAI,UAAU,CAAC,KAAmB,EAAA;AAC9B,QAAA,IAAI,CAAC,WAAW,GAAG,qBAAqB,CAAC,KAAK,CAAC,CAAC;KACnD;IAGD,kBAAkB,GAAA;QACd,IAAI,CAAC,YAAY,EAAE,CAAC;QACpB,IAAI,CAAC,IAAI,CAAC,SAAS,IAAI,IAAI,CAAC,SAAS,KAAK,EAAE,EAAE;AAC1C,YAAA,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,GAAG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OAAA,EAAA,CAJlB,YAAY,EAAE,aAAa,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAI5B,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAL/B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,aAAa,CAAC;oBACtC,OAAO,EAAE,CAAC,sBAAsB,CAAC;oBACjC,YAAY,EAAE,CAAC,sBAAsB,CAAC;AACzC,iBAAA,CAAA;;;ACVD;;AAEG;;;;"}
@@ -1,6 +1,5 @@
1
- import { coerceBooleanProperty } from '@angular/cdk/coercion';
2
1
  import * as i0 from '@angular/core';
3
- import { ElementRef, Component, ViewEncapsulation, Optional, Inject, Self, Input, ViewChild, NgModule } from '@angular/core';
2
+ import { booleanAttribute, Component, ViewEncapsulation, Optional, Inject, Self, Input, NgModule } from '@angular/core';
4
3
  import * as i1 from '@angular/forms';
5
4
  import { FormControl, FormsModule, ReactiveFormsModule } from '@angular/forms';
6
5
  import { Subject } from 'rxjs';
@@ -18,24 +17,6 @@ import * as i6 from 'ngx-mask';
18
17
  import { NgxMaskDirective, provideNgxMask, provideEnvironmentNgxMask } from 'ngx-mask';
19
18
 
20
19
  class EuiTimepickerComponent {
21
- get isreadOnly() {
22
- return this._isreadOnly;
23
- }
24
- set isreadOnly(value) {
25
- this._isreadOnly = coerceBooleanProperty(value);
26
- }
27
- get isOneInputField() {
28
- return this._isOneInputField;
29
- }
30
- set isOneInputField(value) {
31
- this._isOneInputField = coerceBooleanProperty(value);
32
- }
33
- get hasSeconds() {
34
- return this._hasSeconds;
35
- }
36
- set hasSeconds(value) {
37
- this._hasSeconds = coerceBooleanProperty(value);
38
- }
39
20
  constructor(config, control) {
40
21
  this.control = control;
41
22
  this.oneInputFormControl = new FormControl();
@@ -47,12 +28,13 @@ class EuiTimepickerComponent {
47
28
  this.secondsDownDisabled = false;
48
29
  this.e2eAttr = 'eui-timepicker';
49
30
  this.timeMask = 'Hh:m0';
31
+ this.placeholder = this.timeMask;
50
32
  this.stepHours = 1;
51
33
  this.stepMinutes = 1;
52
34
  this.stepSeconds = 1;
53
- this._isreadOnly = false;
54
- this._isOneInputField = false;
55
- this._hasSeconds = false;
35
+ this.isreadOnly = false;
36
+ this.isOneInputField = false;
37
+ this.hasSeconds = false;
56
38
  this.propagatedValues = {
57
39
  hours: null,
58
40
  mins: null,
@@ -71,9 +53,9 @@ class EuiTimepickerComponent {
71
53
  this.isDatetimepicker = config?.isDatetimepicker;
72
54
  this.hasSeconds = config?.hasSeconds;
73
55
  this.isOneInputField = config?.isOneInputField;
74
- this.stepHours = config?.stepHours;
75
- this.stepMinutes = config?.stepMinutes;
76
- this.stepSeconds = config?.stepSeconds;
56
+ this.stepHours = config ? config.stepHours : this.stepHours;
57
+ this.stepMinutes = config ? config.stepMinutes : this.stepMinutes;
58
+ this.stepSeconds = config ? config.stepSeconds : this.stepSeconds;
77
59
  const hours = this.hours === 0 || null ? '00' : this.hours;
78
60
  const mins = this.mins === 0 || null ? '00' : this.mins;
79
61
  const secs = this.secs === 0 || null ? '00' : this.secs;
@@ -84,9 +66,6 @@ class EuiTimepickerComponent {
84
66
  }
85
67
  }
86
68
  ngOnInit() {
87
- if (this.hasSeconds) {
88
- this.timeMask = 'Hh:m0:s0';
89
- }
90
69
  this.oneInputFormControl.valueChanges.pipe(takeUntil(this.destroy$)).subscribe((value) => {
91
70
  // splits the entered time into 3 parts based on the : and propagates back the corresponding parts
92
71
  const timeArray = value.split(':');
@@ -121,6 +100,21 @@ class EuiTimepickerComponent {
121
100
  }
122
101
  });
123
102
  }
103
+ ngOnChanges(changes) {
104
+ if (this.isOneInputField) {
105
+ if (changes.hasSeconds) {
106
+ this.timeMask = 'Hh:m0:s0';
107
+ this.placeholder = 'Hh:m0:s0';
108
+ }
109
+ if (changes.timeMask) {
110
+ this.timeMask = changes.timeMask.currentValue;
111
+ this.placeholder = changes.timeMask.currentValue;
112
+ }
113
+ if (changes.placeholder) {
114
+ this.placeholder = changes.placeholder.currentValue;
115
+ }
116
+ }
117
+ }
124
118
  ngDoCheck() {
125
119
  if (this.control) {
126
120
  // marks the input control as touched/invalid if the form control is touched/invalid
@@ -132,24 +126,44 @@ class EuiTimepickerComponent {
132
126
  this.destroy$.next(true);
133
127
  this.destroy$.unsubscribe();
134
128
  }
129
+ /**
130
+ * Increments or decrements hours according to the step param being passed
131
+ *
132
+ * @param step The step number that hours will increase or decrease
133
+ */
135
134
  changeHours(step) {
136
135
  if (!this.hoursUpDisabled || !this.hoursDownDisabled) {
137
136
  const val = (isNaN(this.hours) ? 0 : this.hours) + step;
138
137
  this.updateHours(val.toString());
139
138
  }
140
139
  }
140
+ /**
141
+ * Increments or decrements minutes according to the step param being passed
142
+ *
143
+ * @param step The step number that minutes will increase or decrease
144
+ */
141
145
  changeMinutes(step) {
142
146
  if (!this.minutesUpDisabled || !this.minutesDownDisabled) {
143
147
  const val = (isNaN(this.mins) ? 0 : this.mins) + step;
144
148
  this.updateMinutes(val.toString());
145
149
  }
146
150
  }
151
+ /**
152
+ * Increments or decrements seconds according to the step param being passed
153
+ *
154
+ * @param step The step number that seconds will increase or decrease
155
+ */
147
156
  changeSeconds(step) {
148
157
  if (!this.secondsUpDisabled || !this.secondsDownDisabled) {
149
158
  const val = (isNaN(this.secs) ? 0 : this.secs) + step;
150
159
  this.updateSeconds(val.toString());
151
160
  }
152
161
  }
162
+ /**
163
+ * Updates the input field when hours change and adds 24hour validation + propagates the value back to the form
164
+ *
165
+ * @param newVal The new value that hours will have
166
+ */
153
167
  updateHours(newVal) {
154
168
  const enteredHour = this.toInteger(newVal);
155
169
  if (!isNaN(enteredHour)) {
@@ -165,6 +179,11 @@ class EuiTimepickerComponent {
165
179
  };
166
180
  this.propagateChange(this.propagatedValues);
167
181
  }
182
+ /**
183
+ * Updates the input field when minutes change and adds 60mins validation + propagates the value back to the form
184
+ *
185
+ * @param newVal The new value that minutes will have
186
+ */
168
187
  updateMinutes(newVal) {
169
188
  const enteredMin = this.toInteger(newVal);
170
189
  if (!isNaN(enteredMin)) {
@@ -181,6 +200,11 @@ class EuiTimepickerComponent {
181
200
  };
182
201
  this.propagateChange(this.propagatedValues);
183
202
  }
203
+ /**
204
+ * Updates the input field when seconds change and adds 60secs validation + propagates the value back to the form
205
+ *
206
+ * @param newVal The new value that seconds will have
207
+ */
184
208
  updateSeconds(newVal) {
185
209
  const enteredSec = this.toInteger(newVal);
186
210
  if (!isNaN(enteredSec)) {
@@ -245,21 +269,51 @@ class EuiTimepickerComponent {
245
269
  this.oneInputFormControl.patchValue('' + hours + ':' + mins + ':' + secs);
246
270
  }
247
271
  }
272
+ /**
273
+ * Disables the hour up incremental when max time range is reached
274
+ *
275
+ * @param state The boolean value that enables the feature
276
+ */
248
277
  hoursUpDisable(state) {
249
278
  this.hoursUpDisabled = state;
250
279
  }
280
+ /**
281
+ * Disables the hour down decremental when min time range is reached
282
+ *
283
+ * @param state The boolean value that enables the feature
284
+ */
251
285
  hoursDownDisable(state) {
252
286
  this.hoursDownDisabled = state;
253
287
  }
288
+ /**
289
+ * Disables the minutes up incremental when max time range is reached
290
+ *
291
+ * @param state The boolean value that enables the feature
292
+ */
254
293
  minutesUpDisable(state) {
255
294
  this.minutesUpDisabled = state;
256
295
  }
296
+ /**
297
+ * Disables the minutes down decremental when min time range is reached
298
+ *
299
+ * @param state The boolean value that enables the feature
300
+ */
257
301
  minutesDownDisable(state) {
258
302
  this.minutesDownDisabled = state;
259
303
  }
304
+ /**
305
+ * Disables the seconds up incremental when max time range is reached
306
+ *
307
+ * @param state The boolean value that enables the feature
308
+ */
260
309
  secondsUpDisable(state) {
261
310
  this.secondsUpDisabled = state;
262
311
  }
312
+ /**
313
+ * Disables the seconds down decremental when min time range is reached
314
+ *
315
+ * @param state The boolean value that enables the feature
316
+ */
263
317
  secondsDownDisable(state) {
264
318
  this.secondsDownDisabled = state;
265
319
  }
@@ -293,11 +347,11 @@ class EuiTimepickerComponent {
293
347
  }
294
348
  }
295
349
  /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.6", ngImport: i0, type: EuiTimepickerComponent, deps: [{ token: DYNAMIC_COMPONENT_CONFIG, optional: true }, { token: i1.NgControl, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Component }); }
296
- /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.6", type: EuiTimepickerComponent, selector: "eui-timepicker", inputs: { e2eAttr: "e2eAttr", timeMask: "timeMask", stepHours: "stepHours", stepMinutes: "stepMinutes", stepSeconds: "stepSeconds", isreadOnly: "isreadOnly", isOneInputField: "isOneInputField", hasSeconds: "hasSeconds" }, viewQueries: [{ propertyName: "inputHoursElement", first: true, predicate: ["inputrefhours"], descendants: true, read: ElementRef }, { propertyName: "inputMinsElement", first: true, predicate: ["inputrefmins"], descendants: true, read: ElementRef }, { propertyName: "inputSecsElement", first: true, predicate: ["inputrefsecs"], descendants: true, read: ElementRef }], ngImport: i0, template: "<div class=\"eui-timepicker\" [class.eui-timepicker--centered]=\"isDatetimepicker\" attr.data-e2e=\"{{ e2eAttr }}\">\n <ng-container *ngIf=\"isOneInputField; else multipleInputs\">\n <input\n [class.eui-timepicker__input--one-field]=\"isDatetimepicker\"\n euiInputText\n mask=\"{{ timeMask }}\"\n [leadZeroDateTime]=\"true\"\n placeholder=\"{{ timeMask }}\"\n aria-label=\"Time Input Field\"\n [formControl]=\"oneInputFormControl\"\n (focusout)=\"onFocusOut()\"\n [dropSpecialCharacters]=\"false\"\n [readonly]=\"isreadOnly\" />\n </ng-container>\n\n <ng-template #multipleInputs>\n <div class=\"eui-timepicker__input-container\">\n <div *ngIf=\"!isreadOnly\" class=\"eui-timepicker__chevron eui-timepicker__hours-up\">\n <eui-icon-svg\n (click)=\"changeHours(stepHours)\"\n [class.time-control--disabled]=\"hoursUpDisabled\"\n icon=\"eui-chevron-up\"\n fillColor=\"grey-75\"\n size=\"l\"\n role=\"button\"\n aria-label=\"Increase Hours\">\n </eui-icon-svg>\n </div>\n <input\n #inputrefhours\n euiInputNumber\n [leadingZero]=\"2\"\n [digits]=\"2\"\n [fractionDigits]=\"0\"\n class=\"eui-timepicker__input\"\n placeholder=\"HH\"\n [ngModel]=\"hours\"\n (ngModelChange)=\"updateHours($event)\"\n [readonly]=\"isreadOnly\"\n aria-label=\"Hours\"\n (keydown.ArrowUp)=\"changeHours(stepHours); $event.preventDefault()\"\n (keydown.ArrowDown)=\"changeHours(-stepHours); $event.preventDefault()\" />\n <div *ngIf=\"!isreadOnly\" class=\"eui-timepicker__chevron eui-timepicker__hours-down\">\n <eui-icon-svg\n (click)=\"changeHours(-stepHours)\"\n [class.time-control--disabled]=\"hoursDownDisabled\"\n icon=\"eui-chevron-down\"\n fillColor=\"grey-75\"\n size=\"l\"\n role=\"button\"\n aria-label=\"Decrease Hours\">\n </eui-icon-svg>\n </div>\n </div>\n <div class=\"eui-timepicker__spacer\">:</div>\n <div class=\"eui-timepicker__input-container\">\n <div *ngIf=\"!isreadOnly\" class=\"eui-timepicker__chevron eui-timepicker__minutes-up\">\n <eui-icon-svg\n (click)=\"changeMinutes(stepMinutes)\"\n [class.time-control--disabled]=\"minutesUpDisabled\"\n icon=\"eui-chevron-up\"\n fillColor=\"grey-75\"\n size=\"l\"\n role=\"button\"\n aria-label=\"Increase Minutes\">\n </eui-icon-svg>\n </div>\n <input\n #inputrefmins\n euiInputNumber\n [leadingZero]=\"2\"\n [digits]=\"2\"\n [fractionDigits]=\"0\"\n class=\"eui-timepicker__input\"\n placeholder=\"MM\"\n [ngModel]=\"mins\"\n (ngModelChange)=\"updateMinutes($event)\"\n [readonly]=\"isreadOnly\"\n aria-label=\"Minutes\"\n (keydown.ArrowUp)=\"changeMinutes(stepMinutes); $event.preventDefault()\"\n (keydown.ArrowDown)=\"changeMinutes(-stepMinutes); $event.preventDefault()\" />\n <div *ngIf=\"!isreadOnly\" class=\"eui-timepicker__chevron eui-timepicker__minutes-down\">\n <eui-icon-svg\n (click)=\"changeMinutes(-stepMinutes)\"\n [class.time-control--disabled]=\"minutesDownDisabled\"\n icon=\"eui-chevron-down\"\n fillColor=\"grey-75\"\n size=\"l\"\n role=\"button\"\n aria-label=\"Decrease Minutes\">\n </eui-icon-svg>\n </div>\n </div>\n <ng-container *ngIf=\"hasSeconds\">\n <div class=\"eui-timepicker__spacer\">:</div>\n <div class=\"eui-timepicker__input-container\">\n <div *ngIf=\"!isreadOnly\" class=\"eui-timepicker__chevron eui-timepicker__seconds-up\">\n <eui-icon-svg\n (click)=\"changeSeconds(stepSeconds)\"\n [class.time-control--disabled]=\"secondsUpDisabled\"\n icon=\"eui-chevron-up\"\n fillColor=\"grey-75\"\n size=\"l\"\n role=\"button\"\n aria-label=\"Increase seconds\">\n </eui-icon-svg>\n </div>\n <input\n #inputrefsecs\n euiInputNumber\n [leadingZero]=\"2\"\n [digits]=\"2\"\n [fractionDigits]=\"0\"\n class=\"eui-timepicker__input\"\n placeholder=\"SS\"\n [ngModel]=\"secs\"\n (ngModelChange)=\"updateSeconds($event)\"\n [readonly]=\"isreadOnly\"\n aria-label=\"Seconds\"\n (keydown.ArrowUp)=\"changeSeconds(stepSeconds); $event.preventDefault()\"\n (keydown.ArrowDown)=\"changeSeconds(-stepSeconds); $event.preventDefault()\" />\n <div *ngIf=\"!isreadOnly\" class=\"eui-timepicker__chevron eui-timepicker__seconds-down\">\n <eui-icon-svg\n (click)=\"changeSeconds(-stepSeconds)\"\n [class.time-control--disabled]=\"secondsDownDisabled\"\n icon=\"eui-chevron-down\"\n fillColor=\"grey-75\"\n size=\"l\"\n role=\"button\"\n aria-label=\"Decrease seconds\">\n </eui-icon-svg>\n </div>\n </div>\n </ng-container>\n </ng-template>\n</div>\n", styles: [".eui-timepicker{align-items:center;display:flex}.eui-timepicker--centered{justify-content:center}.eui-timepicker__input-container{width:calc(4 * var(--eui-base-spacing-m))}.eui-timepicker__input{text-align:center;width:100%}.eui-timepicker__input--one-field{width:calc(6 * var(--eui-base-spacing-m));margin-bottom:var(--eui-base-spacing-2xs)}.eui-timepicker__spacer{text-align:center;width:var(--eui-base-spacing-m)}.eui-timepicker__chevron{display:flex;justify-content:center;padding:var(--eui-base-spacing-xs)}.eui-timepicker__chevron .eui-icon-svg:not(.time-control--disabled):hover{cursor:pointer;color:var(--eui-base-color-primary-100)}.eui-timepicker__chevron .eui-icon-svg.time-control--disabled{background-image:none;box-shadow:none;cursor:not-allowed!important;opacity:var(--eui-base-disabled-opacity)}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}input[type=number]{-moz-appearance:textfield}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i3.EuiInputNumberComponent, selector: "input[euiInputNumber]", inputs: ["min", "max", "leadingZero", "isInvalid", "fractionDigits", "digits", "fillFraction", "roundUp", "noFormat", "value"] }, { kind: "directive", type: i3.EuiInputNumberDirective, selector: "input[euiInputNumber][formControl],input[euiInputNumber][formControlName],input[euiInputNumber][ngModel]" }, { kind: "component", type: i4.EuiInputTextComponent, selector: "input[euiInputText]", inputs: ["class", "isInvalid"] }, { kind: "component", type: i5.EuiIconSvgComponent, selector: "eui-icon-svg, span[euiIconSvg], i[euiIconSvg]", inputs: ["icon", "size", "fillColor", "set", "ariaLabelledby", "role", "style", "iconUrl", "transform", "aria-label", "ariaHidden", "focusable", "isLoading"] }, { kind: "directive", type: i6.NgxMaskDirective, selector: "input[mask], textarea[mask]", inputs: ["mask", "specialCharacters", "patterns", "prefix", "suffix", "thousandSeparator", "decimalMarker", "dropSpecialCharacters", "hiddenInput", "showMaskTyped", "placeHolderCharacter", "shownMaskExpression", "showTemplate", "clearIfNotMatch", "validation", "separatorLimit", "allowNegativeNumbers", "leadZeroDateTime", "leadZero", "triggerOnMaskChange", "apm", "inputTransformFn", "outputTransformFn", "keepCharacterPositions"], outputs: ["maskFilled"], exportAs: ["mask", "ngxMask"] }], encapsulation: i0.ViewEncapsulation.None }); }
350
+ /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "17.0.6", type: EuiTimepickerComponent, selector: "eui-timepicker", inputs: { e2eAttr: "e2eAttr", timeMask: "timeMask", placeholder: "placeholder", stepHours: "stepHours", stepMinutes: "stepMinutes", stepSeconds: "stepSeconds", isreadOnly: ["isreadOnly", "isreadOnly", booleanAttribute], isOneInputField: ["isOneInputField", "isOneInputField", booleanAttribute], hasSeconds: ["hasSeconds", "hasSeconds", booleanAttribute] }, usesOnChanges: true, ngImport: i0, template: "<div class=\"eui-timepicker\" [class.eui-timepicker--centered]=\"isDatetimepicker\" attr.data-e2e=\"{{ e2eAttr }}\">\n <ng-container *ngIf=\"isOneInputField; else multipleInputs\">\n <input\n [class.eui-timepicker__input--one-field]=\"isDatetimepicker\"\n euiInputText\n mask=\"{{ timeMask }}\"\n [leadZeroDateTime]=\"true\"\n [placeholder]=\"placeholder\"\n [attr.aria-label]=\"oneInputFormControl.value?oneInputFormControl.value:'No time value'\"\n [formControl]=\"oneInputFormControl\"\n (focusout)=\"onFocusOut()\"\n [dropSpecialCharacters]=\"false\"\n [readonly]=\"isreadOnly\" />\n </ng-container>\n\n <ng-template #multipleInputs>\n <div class=\"eui-timepicker__input-container\">\n <div *ngIf=\"!isreadOnly\" class=\"eui-timepicker__chevron eui-timepicker__hours-up\">\n <eui-icon-svg\n (click)=\"changeHours(stepHours)\"\n [class.time-control--disabled]=\"hoursUpDisabled\"\n icon=\"eui-chevron-up\"\n fillColor=\"grey-75\"\n size=\"l\"\n role=\"button\"\n aria-label=\"Increase Hours\">\n </eui-icon-svg>\n </div>\n <input\n #inputrefhours\n euiInputNumber\n [leadingZero]=\"2\"\n [digits]=\"2\"\n [fractionDigits]=\"0\"\n class=\"eui-timepicker__input\"\n placeholder=\"HH\"\n [ngModel]=\"hours\"\n (ngModelChange)=\"updateHours($event)\"\n [readonly]=\"isreadOnly\"\n aria-label=\"Hours\"\n (keydown.ArrowUp)=\"changeHours(stepHours); $event.preventDefault()\"\n (keydown.ArrowDown)=\"changeHours(-stepHours); $event.preventDefault()\" />\n <div *ngIf=\"!isreadOnly\" class=\"eui-timepicker__chevron eui-timepicker__hours-down\">\n <eui-icon-svg\n (click)=\"changeHours(-stepHours)\"\n [class.time-control--disabled]=\"hoursDownDisabled\"\n icon=\"eui-chevron-down\"\n fillColor=\"grey-75\"\n size=\"l\"\n role=\"button\"\n aria-label=\"Decrease Hours\">\n </eui-icon-svg>\n </div>\n </div>\n <div class=\"eui-timepicker__spacer\">:</div>\n <div class=\"eui-timepicker__input-container\">\n <div *ngIf=\"!isreadOnly\" class=\"eui-timepicker__chevron eui-timepicker__minutes-up\">\n <eui-icon-svg\n (click)=\"changeMinutes(stepMinutes)\"\n [class.time-control--disabled]=\"minutesUpDisabled\"\n icon=\"eui-chevron-up\"\n fillColor=\"grey-75\"\n size=\"l\"\n role=\"button\"\n aria-label=\"Increase Minutes\">\n </eui-icon-svg>\n </div>\n <input\n #inputrefmins\n euiInputNumber\n [leadingZero]=\"2\"\n [digits]=\"2\"\n [fractionDigits]=\"0\"\n class=\"eui-timepicker__input\"\n placeholder=\"MM\"\n [ngModel]=\"mins\"\n (ngModelChange)=\"updateMinutes($event)\"\n [readonly]=\"isreadOnly\"\n aria-label=\"Minutes\"\n (keydown.ArrowUp)=\"changeMinutes(stepMinutes); $event.preventDefault()\"\n (keydown.ArrowDown)=\"changeMinutes(-stepMinutes); $event.preventDefault()\" />\n <div *ngIf=\"!isreadOnly\" class=\"eui-timepicker__chevron eui-timepicker__minutes-down\">\n <eui-icon-svg\n (click)=\"changeMinutes(-stepMinutes)\"\n [class.time-control--disabled]=\"minutesDownDisabled\"\n icon=\"eui-chevron-down\"\n fillColor=\"grey-75\"\n size=\"l\"\n role=\"button\"\n aria-label=\"Decrease Minutes\">\n </eui-icon-svg>\n </div>\n </div>\n <ng-container *ngIf=\"hasSeconds\">\n <div class=\"eui-timepicker__spacer\">:</div>\n <div class=\"eui-timepicker__input-container\">\n <div *ngIf=\"!isreadOnly\" class=\"eui-timepicker__chevron eui-timepicker__seconds-up\">\n <eui-icon-svg\n (click)=\"changeSeconds(stepSeconds)\"\n [class.time-control--disabled]=\"secondsUpDisabled\"\n icon=\"eui-chevron-up\"\n fillColor=\"grey-75\"\n size=\"l\"\n role=\"button\"\n aria-label=\"Increase seconds\">\n </eui-icon-svg>\n </div>\n <input\n #inputrefsecs\n euiInputNumber\n [leadingZero]=\"2\"\n [digits]=\"2\"\n [fractionDigits]=\"0\"\n class=\"eui-timepicker__input\"\n placeholder=\"SS\"\n [ngModel]=\"secs\"\n (ngModelChange)=\"updateSeconds($event)\"\n [readonly]=\"isreadOnly\"\n aria-label=\"Seconds\"\n (keydown.ArrowUp)=\"changeSeconds(stepSeconds); $event.preventDefault()\"\n (keydown.ArrowDown)=\"changeSeconds(-stepSeconds); $event.preventDefault()\" />\n <div *ngIf=\"!isreadOnly\" class=\"eui-timepicker__chevron eui-timepicker__seconds-down\">\n <eui-icon-svg\n (click)=\"changeSeconds(-stepSeconds)\"\n [class.time-control--disabled]=\"secondsDownDisabled\"\n icon=\"eui-chevron-down\"\n fillColor=\"grey-75\"\n size=\"l\"\n role=\"button\"\n aria-label=\"Decrease seconds\">\n </eui-icon-svg>\n </div>\n </div>\n </ng-container>\n </ng-template>\n</div>\n", styles: [".eui-timepicker{align-items:center;display:flex}.eui-timepicker--centered{justify-content:center}.eui-timepicker__input-container{width:calc(4 * var(--eui-base-spacing-m))}.eui-timepicker__input{text-align:center;width:100%}.eui-timepicker__input--one-field{width:calc(6 * var(--eui-base-spacing-m));margin-bottom:var(--eui-base-spacing-2xs)}.eui-timepicker__spacer{text-align:center;width:var(--eui-base-spacing-m)}.eui-timepicker__chevron{display:flex;justify-content:center;padding:var(--eui-base-spacing-xs)}.eui-timepicker__chevron .eui-icon-svg:not(.time-control--disabled):hover{cursor:pointer;color:var(--eui-base-color-primary-100)}.eui-timepicker__chevron .eui-icon-svg.time-control--disabled{background-image:none;box-shadow:none;cursor:not-allowed!important;opacity:var(--eui-base-disabled-opacity)}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}input[type=number]{-moz-appearance:textfield}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i3.EuiInputNumberComponent, selector: "input[euiInputNumber]", inputs: ["min", "max", "leadingZero", "isInvalid", "fractionDigits", "digits", "fillFraction", "roundUp", "noFormat", "value"] }, { kind: "directive", type: i3.EuiInputNumberDirective, selector: "input[euiInputNumber][formControl],input[euiInputNumber][formControlName],input[euiInputNumber][ngModel]" }, { kind: "component", type: i4.EuiInputTextComponent, selector: "input[euiInputText]", inputs: ["class", "isInvalid"] }, { kind: "component", type: i5.EuiIconSvgComponent, selector: "eui-icon-svg, span[euiIconSvg], i[euiIconSvg]", inputs: ["icon", "size", "fillColor", "set", "ariaLabelledby", "role", "style", "iconUrl", "transform", "aria-label", "ariaHidden", "focusable", "isLoading"] }, { kind: "directive", type: i6.NgxMaskDirective, selector: "input[mask], textarea[mask]", inputs: ["mask", "specialCharacters", "patterns", "prefix", "suffix", "thousandSeparator", "decimalMarker", "dropSpecialCharacters", "hiddenInput", "showMaskTyped", "placeHolderCharacter", "shownMaskExpression", "showTemplate", "clearIfNotMatch", "validation", "separatorLimit", "allowNegativeNumbers", "leadZeroDateTime", "leadZero", "triggerOnMaskChange", "apm", "inputTransformFn", "outputTransformFn", "keepCharacterPositions"], outputs: ["maskFilled"], exportAs: ["mask", "ngxMask"] }], encapsulation: i0.ViewEncapsulation.None }); }
297
351
  }
298
352
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.6", ngImport: i0, type: EuiTimepickerComponent, decorators: [{
299
353
  type: Component,
300
- args: [{ selector: 'eui-timepicker', encapsulation: ViewEncapsulation.None, template: "<div class=\"eui-timepicker\" [class.eui-timepicker--centered]=\"isDatetimepicker\" attr.data-e2e=\"{{ e2eAttr }}\">\n <ng-container *ngIf=\"isOneInputField; else multipleInputs\">\n <input\n [class.eui-timepicker__input--one-field]=\"isDatetimepicker\"\n euiInputText\n mask=\"{{ timeMask }}\"\n [leadZeroDateTime]=\"true\"\n placeholder=\"{{ timeMask }}\"\n aria-label=\"Time Input Field\"\n [formControl]=\"oneInputFormControl\"\n (focusout)=\"onFocusOut()\"\n [dropSpecialCharacters]=\"false\"\n [readonly]=\"isreadOnly\" />\n </ng-container>\n\n <ng-template #multipleInputs>\n <div class=\"eui-timepicker__input-container\">\n <div *ngIf=\"!isreadOnly\" class=\"eui-timepicker__chevron eui-timepicker__hours-up\">\n <eui-icon-svg\n (click)=\"changeHours(stepHours)\"\n [class.time-control--disabled]=\"hoursUpDisabled\"\n icon=\"eui-chevron-up\"\n fillColor=\"grey-75\"\n size=\"l\"\n role=\"button\"\n aria-label=\"Increase Hours\">\n </eui-icon-svg>\n </div>\n <input\n #inputrefhours\n euiInputNumber\n [leadingZero]=\"2\"\n [digits]=\"2\"\n [fractionDigits]=\"0\"\n class=\"eui-timepicker__input\"\n placeholder=\"HH\"\n [ngModel]=\"hours\"\n (ngModelChange)=\"updateHours($event)\"\n [readonly]=\"isreadOnly\"\n aria-label=\"Hours\"\n (keydown.ArrowUp)=\"changeHours(stepHours); $event.preventDefault()\"\n (keydown.ArrowDown)=\"changeHours(-stepHours); $event.preventDefault()\" />\n <div *ngIf=\"!isreadOnly\" class=\"eui-timepicker__chevron eui-timepicker__hours-down\">\n <eui-icon-svg\n (click)=\"changeHours(-stepHours)\"\n [class.time-control--disabled]=\"hoursDownDisabled\"\n icon=\"eui-chevron-down\"\n fillColor=\"grey-75\"\n size=\"l\"\n role=\"button\"\n aria-label=\"Decrease Hours\">\n </eui-icon-svg>\n </div>\n </div>\n <div class=\"eui-timepicker__spacer\">:</div>\n <div class=\"eui-timepicker__input-container\">\n <div *ngIf=\"!isreadOnly\" class=\"eui-timepicker__chevron eui-timepicker__minutes-up\">\n <eui-icon-svg\n (click)=\"changeMinutes(stepMinutes)\"\n [class.time-control--disabled]=\"minutesUpDisabled\"\n icon=\"eui-chevron-up\"\n fillColor=\"grey-75\"\n size=\"l\"\n role=\"button\"\n aria-label=\"Increase Minutes\">\n </eui-icon-svg>\n </div>\n <input\n #inputrefmins\n euiInputNumber\n [leadingZero]=\"2\"\n [digits]=\"2\"\n [fractionDigits]=\"0\"\n class=\"eui-timepicker__input\"\n placeholder=\"MM\"\n [ngModel]=\"mins\"\n (ngModelChange)=\"updateMinutes($event)\"\n [readonly]=\"isreadOnly\"\n aria-label=\"Minutes\"\n (keydown.ArrowUp)=\"changeMinutes(stepMinutes); $event.preventDefault()\"\n (keydown.ArrowDown)=\"changeMinutes(-stepMinutes); $event.preventDefault()\" />\n <div *ngIf=\"!isreadOnly\" class=\"eui-timepicker__chevron eui-timepicker__minutes-down\">\n <eui-icon-svg\n (click)=\"changeMinutes(-stepMinutes)\"\n [class.time-control--disabled]=\"minutesDownDisabled\"\n icon=\"eui-chevron-down\"\n fillColor=\"grey-75\"\n size=\"l\"\n role=\"button\"\n aria-label=\"Decrease Minutes\">\n </eui-icon-svg>\n </div>\n </div>\n <ng-container *ngIf=\"hasSeconds\">\n <div class=\"eui-timepicker__spacer\">:</div>\n <div class=\"eui-timepicker__input-container\">\n <div *ngIf=\"!isreadOnly\" class=\"eui-timepicker__chevron eui-timepicker__seconds-up\">\n <eui-icon-svg\n (click)=\"changeSeconds(stepSeconds)\"\n [class.time-control--disabled]=\"secondsUpDisabled\"\n icon=\"eui-chevron-up\"\n fillColor=\"grey-75\"\n size=\"l\"\n role=\"button\"\n aria-label=\"Increase seconds\">\n </eui-icon-svg>\n </div>\n <input\n #inputrefsecs\n euiInputNumber\n [leadingZero]=\"2\"\n [digits]=\"2\"\n [fractionDigits]=\"0\"\n class=\"eui-timepicker__input\"\n placeholder=\"SS\"\n [ngModel]=\"secs\"\n (ngModelChange)=\"updateSeconds($event)\"\n [readonly]=\"isreadOnly\"\n aria-label=\"Seconds\"\n (keydown.ArrowUp)=\"changeSeconds(stepSeconds); $event.preventDefault()\"\n (keydown.ArrowDown)=\"changeSeconds(-stepSeconds); $event.preventDefault()\" />\n <div *ngIf=\"!isreadOnly\" class=\"eui-timepicker__chevron eui-timepicker__seconds-down\">\n <eui-icon-svg\n (click)=\"changeSeconds(-stepSeconds)\"\n [class.time-control--disabled]=\"secondsDownDisabled\"\n icon=\"eui-chevron-down\"\n fillColor=\"grey-75\"\n size=\"l\"\n role=\"button\"\n aria-label=\"Decrease seconds\">\n </eui-icon-svg>\n </div>\n </div>\n </ng-container>\n </ng-template>\n</div>\n", styles: [".eui-timepicker{align-items:center;display:flex}.eui-timepicker--centered{justify-content:center}.eui-timepicker__input-container{width:calc(4 * var(--eui-base-spacing-m))}.eui-timepicker__input{text-align:center;width:100%}.eui-timepicker__input--one-field{width:calc(6 * var(--eui-base-spacing-m));margin-bottom:var(--eui-base-spacing-2xs)}.eui-timepicker__spacer{text-align:center;width:var(--eui-base-spacing-m)}.eui-timepicker__chevron{display:flex;justify-content:center;padding:var(--eui-base-spacing-xs)}.eui-timepicker__chevron .eui-icon-svg:not(.time-control--disabled):hover{cursor:pointer;color:var(--eui-base-color-primary-100)}.eui-timepicker__chevron .eui-icon-svg.time-control--disabled{background-image:none;box-shadow:none;cursor:not-allowed!important;opacity:var(--eui-base-disabled-opacity)}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}input[type=number]{-moz-appearance:textfield}\n"] }]
354
+ args: [{ selector: 'eui-timepicker', encapsulation: ViewEncapsulation.None, template: "<div class=\"eui-timepicker\" [class.eui-timepicker--centered]=\"isDatetimepicker\" attr.data-e2e=\"{{ e2eAttr }}\">\n <ng-container *ngIf=\"isOneInputField; else multipleInputs\">\n <input\n [class.eui-timepicker__input--one-field]=\"isDatetimepicker\"\n euiInputText\n mask=\"{{ timeMask }}\"\n [leadZeroDateTime]=\"true\"\n [placeholder]=\"placeholder\"\n [attr.aria-label]=\"oneInputFormControl.value?oneInputFormControl.value:'No time value'\"\n [formControl]=\"oneInputFormControl\"\n (focusout)=\"onFocusOut()\"\n [dropSpecialCharacters]=\"false\"\n [readonly]=\"isreadOnly\" />\n </ng-container>\n\n <ng-template #multipleInputs>\n <div class=\"eui-timepicker__input-container\">\n <div *ngIf=\"!isreadOnly\" class=\"eui-timepicker__chevron eui-timepicker__hours-up\">\n <eui-icon-svg\n (click)=\"changeHours(stepHours)\"\n [class.time-control--disabled]=\"hoursUpDisabled\"\n icon=\"eui-chevron-up\"\n fillColor=\"grey-75\"\n size=\"l\"\n role=\"button\"\n aria-label=\"Increase Hours\">\n </eui-icon-svg>\n </div>\n <input\n #inputrefhours\n euiInputNumber\n [leadingZero]=\"2\"\n [digits]=\"2\"\n [fractionDigits]=\"0\"\n class=\"eui-timepicker__input\"\n placeholder=\"HH\"\n [ngModel]=\"hours\"\n (ngModelChange)=\"updateHours($event)\"\n [readonly]=\"isreadOnly\"\n aria-label=\"Hours\"\n (keydown.ArrowUp)=\"changeHours(stepHours); $event.preventDefault()\"\n (keydown.ArrowDown)=\"changeHours(-stepHours); $event.preventDefault()\" />\n <div *ngIf=\"!isreadOnly\" class=\"eui-timepicker__chevron eui-timepicker__hours-down\">\n <eui-icon-svg\n (click)=\"changeHours(-stepHours)\"\n [class.time-control--disabled]=\"hoursDownDisabled\"\n icon=\"eui-chevron-down\"\n fillColor=\"grey-75\"\n size=\"l\"\n role=\"button\"\n aria-label=\"Decrease Hours\">\n </eui-icon-svg>\n </div>\n </div>\n <div class=\"eui-timepicker__spacer\">:</div>\n <div class=\"eui-timepicker__input-container\">\n <div *ngIf=\"!isreadOnly\" class=\"eui-timepicker__chevron eui-timepicker__minutes-up\">\n <eui-icon-svg\n (click)=\"changeMinutes(stepMinutes)\"\n [class.time-control--disabled]=\"minutesUpDisabled\"\n icon=\"eui-chevron-up\"\n fillColor=\"grey-75\"\n size=\"l\"\n role=\"button\"\n aria-label=\"Increase Minutes\">\n </eui-icon-svg>\n </div>\n <input\n #inputrefmins\n euiInputNumber\n [leadingZero]=\"2\"\n [digits]=\"2\"\n [fractionDigits]=\"0\"\n class=\"eui-timepicker__input\"\n placeholder=\"MM\"\n [ngModel]=\"mins\"\n (ngModelChange)=\"updateMinutes($event)\"\n [readonly]=\"isreadOnly\"\n aria-label=\"Minutes\"\n (keydown.ArrowUp)=\"changeMinutes(stepMinutes); $event.preventDefault()\"\n (keydown.ArrowDown)=\"changeMinutes(-stepMinutes); $event.preventDefault()\" />\n <div *ngIf=\"!isreadOnly\" class=\"eui-timepicker__chevron eui-timepicker__minutes-down\">\n <eui-icon-svg\n (click)=\"changeMinutes(-stepMinutes)\"\n [class.time-control--disabled]=\"minutesDownDisabled\"\n icon=\"eui-chevron-down\"\n fillColor=\"grey-75\"\n size=\"l\"\n role=\"button\"\n aria-label=\"Decrease Minutes\">\n </eui-icon-svg>\n </div>\n </div>\n <ng-container *ngIf=\"hasSeconds\">\n <div class=\"eui-timepicker__spacer\">:</div>\n <div class=\"eui-timepicker__input-container\">\n <div *ngIf=\"!isreadOnly\" class=\"eui-timepicker__chevron eui-timepicker__seconds-up\">\n <eui-icon-svg\n (click)=\"changeSeconds(stepSeconds)\"\n [class.time-control--disabled]=\"secondsUpDisabled\"\n icon=\"eui-chevron-up\"\n fillColor=\"grey-75\"\n size=\"l\"\n role=\"button\"\n aria-label=\"Increase seconds\">\n </eui-icon-svg>\n </div>\n <input\n #inputrefsecs\n euiInputNumber\n [leadingZero]=\"2\"\n [digits]=\"2\"\n [fractionDigits]=\"0\"\n class=\"eui-timepicker__input\"\n placeholder=\"SS\"\n [ngModel]=\"secs\"\n (ngModelChange)=\"updateSeconds($event)\"\n [readonly]=\"isreadOnly\"\n aria-label=\"Seconds\"\n (keydown.ArrowUp)=\"changeSeconds(stepSeconds); $event.preventDefault()\"\n (keydown.ArrowDown)=\"changeSeconds(-stepSeconds); $event.preventDefault()\" />\n <div *ngIf=\"!isreadOnly\" class=\"eui-timepicker__chevron eui-timepicker__seconds-down\">\n <eui-icon-svg\n (click)=\"changeSeconds(-stepSeconds)\"\n [class.time-control--disabled]=\"secondsDownDisabled\"\n icon=\"eui-chevron-down\"\n fillColor=\"grey-75\"\n size=\"l\"\n role=\"button\"\n aria-label=\"Decrease seconds\">\n </eui-icon-svg>\n </div>\n </div>\n </ng-container>\n </ng-template>\n</div>\n", styles: [".eui-timepicker{align-items:center;display:flex}.eui-timepicker--centered{justify-content:center}.eui-timepicker__input-container{width:calc(4 * var(--eui-base-spacing-m))}.eui-timepicker__input{text-align:center;width:100%}.eui-timepicker__input--one-field{width:calc(6 * var(--eui-base-spacing-m));margin-bottom:var(--eui-base-spacing-2xs)}.eui-timepicker__spacer{text-align:center;width:var(--eui-base-spacing-m)}.eui-timepicker__chevron{display:flex;justify-content:center;padding:var(--eui-base-spacing-xs)}.eui-timepicker__chevron .eui-icon-svg:not(.time-control--disabled):hover{cursor:pointer;color:var(--eui-base-color-primary-100)}.eui-timepicker__chevron .eui-icon-svg.time-control--disabled{background-image:none;box-shadow:none;cursor:not-allowed!important;opacity:var(--eui-base-disabled-opacity)}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}input[type=number]{-moz-appearance:textfield}\n"] }]
301
355
  }], ctorParameters: () => [{ type: undefined, decorators: [{
302
356
  type: Optional
303
357
  }, {
@@ -311,6 +365,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.6", ngImpor
311
365
  type: Input
312
366
  }], timeMask: [{
313
367
  type: Input
368
+ }], placeholder: [{
369
+ type: Input
314
370
  }], stepHours: [{
315
371
  type: Input
316
372
  }], stepMinutes: [{
@@ -318,20 +374,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.6", ngImpor
318
374
  }], stepSeconds: [{
319
375
  type: Input
320
376
  }], isreadOnly: [{
321
- type: Input
377
+ type: Input,
378
+ args: [{ transform: booleanAttribute }]
322
379
  }], isOneInputField: [{
323
- type: Input
380
+ type: Input,
381
+ args: [{ transform: booleanAttribute }]
324
382
  }], hasSeconds: [{
325
- type: Input
326
- }], inputHoursElement: [{
327
- type: ViewChild,
328
- args: ['inputrefhours', { read: ElementRef }]
329
- }], inputMinsElement: [{
330
- type: ViewChild,
331
- args: ['inputrefmins', { read: ElementRef }]
332
- }], inputSecsElement: [{
333
- type: ViewChild,
334
- args: ['inputrefsecs', { read: ElementRef }]
383
+ type: Input,
384
+ args: [{ transform: booleanAttribute }]
335
385
  }] } });
336
386
 
337
387
  class EuiTimepickerModule {