@eui/components 17.0.3-snapshot-1704334309393 → 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.
- package/docs/components/EuiTimepickerComponent.html +99 -202
- package/docs/dependencies.html +2 -2
- package/docs/js/search/search_index.js +2 -2
- package/esm2022/eui-icon-toggle/eui-icon-toggle.component.mjs +2 -2
- package/esm2022/eui-timepicker/eui-timepicker.component.mjs +75 -40
- package/eui-timepicker/eui-timepicker.component.d.ts +67 -14
- package/eui-timepicker/eui-timepicker.component.d.ts.map +1 -1
- package/fesm2022/eui-components-eui-icon-toggle.mjs +1 -1
- package/fesm2022/eui-components-eui-icon-toggle.mjs.map +1 -1
- package/fesm2022/eui-components-eui-timepicker.mjs +74 -39
- package/fesm2022/eui-components-eui-timepicker.mjs.map +1 -1
- package/package.json +7 -7
@@ -1,5 +1,4 @@
|
|
1
|
-
import {
|
2
|
-
import { ElementRef, OnInit, DoCheck, OnDestroy, SimpleChanges, OnChanges } 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';
|
@@ -26,41 +25,92 @@ export declare class EuiTimepickerComponent implements ControlValueAccessor, OnI
|
|
26
25
|
stepHours: number;
|
27
26
|
stepMinutes: number;
|
28
27
|
stepSeconds: number;
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
get isOneInputField(): boolean;
|
33
|
-
set isOneInputField(value: BooleanInput);
|
34
|
-
private _isOneInputField;
|
35
|
-
get hasSeconds(): boolean;
|
36
|
-
set hasSeconds(value: BooleanInput);
|
37
|
-
private _hasSeconds;
|
28
|
+
isreadOnly: boolean;
|
29
|
+
isOneInputField: boolean;
|
30
|
+
hasSeconds: boolean;
|
38
31
|
private propagatedValues;
|
39
32
|
private destroy$;
|
40
|
-
protected inputHoursElement: ElementRef<HTMLInputElement>;
|
41
|
-
protected inputMinsElement: ElementRef<HTMLInputElement>;
|
42
|
-
protected inputSecsElement: ElementRef<HTMLInputElement>;
|
43
33
|
constructor(config: EuiDateTimePickerConfig, control: NgControl);
|
44
34
|
ngOnInit(): void;
|
45
35
|
ngOnChanges(changes: SimpleChanges): void;
|
46
36
|
ngDoCheck(): void;
|
47
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
|
+
*/
|
48
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
|
+
*/
|
49
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
|
+
*/
|
50
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
|
+
*/
|
51
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
|
+
*/
|
52
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
|
+
*/
|
53
73
|
updateSeconds(newVal: string): void;
|
54
74
|
/**
|
55
75
|
* Autofills mins and secs with 00s if the user tabs after entering hours and marks the input as touched
|
56
76
|
*/
|
57
77
|
onFocusOut(): void;
|
58
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
|
+
*/
|
59
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
|
+
*/
|
60
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
|
+
*/
|
61
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
|
+
*/
|
62
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
|
+
*/
|
63
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
|
+
*/
|
64
114
|
secondsDownDisable(state: boolean): void;
|
65
115
|
registerOnChange(fn: any): void;
|
66
116
|
registerOnTouched(fn: any): void;
|
@@ -77,5 +127,8 @@ export declare class EuiTimepickerComponent implements ControlValueAccessor, OnI
|
|
77
127
|
private propagateTouched;
|
78
128
|
static ɵfac: i0.ɵɵFactoryDeclaration<EuiTimepickerComponent, [{ optional: true; }, { optional: true; self: true; }]>;
|
79
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;
|
80
133
|
}
|
81
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,
|
1
|
+
{"version":3,"file":"eui-timepicker.component.d.ts","sourceRoot":"","sources":["../../eui-timepicker/eui-timepicker.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAIH,MAAM,EAIN,OAAO,EACP,SAAS,EACT,aAAa,EACb,SAAS,EAEZ,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,SAAS,EAAE,OAAO,EAAE,SAAS;IAuC9E,OAAO,CAAC,OAAO;IAtCvC,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;I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AAkB,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI;IAG/C;;;;OAIG;IACI,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI;IAG7C;;;;OAIG;IACI,kBAAkB,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI;IAM/C,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"}
|
@@ -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
|
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,QA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,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 {
|
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();
|
@@ -51,9 +32,9 @@ class EuiTimepickerComponent {
|
|
51
32
|
this.stepHours = 1;
|
52
33
|
this.stepMinutes = 1;
|
53
34
|
this.stepSeconds = 1;
|
54
|
-
this.
|
55
|
-
this.
|
56
|
-
this.
|
35
|
+
this.isreadOnly = false;
|
36
|
+
this.isOneInputField = false;
|
37
|
+
this.hasSeconds = false;
|
57
38
|
this.propagatedValues = {
|
58
39
|
hours: null,
|
59
40
|
mins: null,
|
@@ -72,9 +53,9 @@ class EuiTimepickerComponent {
|
|
72
53
|
this.isDatetimepicker = config?.isDatetimepicker;
|
73
54
|
this.hasSeconds = config?.hasSeconds;
|
74
55
|
this.isOneInputField = config?.isOneInputField;
|
75
|
-
this.stepHours = config
|
76
|
-
this.stepMinutes = config
|
77
|
-
this.stepSeconds = config
|
56
|
+
this.stepHours = config ? config.stepHours : this.stepHours;
|
57
|
+
this.stepMinutes = config ? config.stepMinutes : this.stepMinutes;
|
58
|
+
this.stepSeconds = config ? config.stepSeconds : this.stepSeconds;
|
78
59
|
const hours = this.hours === 0 || null ? '00' : this.hours;
|
79
60
|
const mins = this.mins === 0 || null ? '00' : this.mins;
|
80
61
|
const secs = this.secs === 0 || null ? '00' : this.secs;
|
@@ -145,24 +126,44 @@ class EuiTimepickerComponent {
|
|
145
126
|
this.destroy$.next(true);
|
146
127
|
this.destroy$.unsubscribe();
|
147
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
|
+
*/
|
148
134
|
changeHours(step) {
|
149
135
|
if (!this.hoursUpDisabled || !this.hoursDownDisabled) {
|
150
136
|
const val = (isNaN(this.hours) ? 0 : this.hours) + step;
|
151
137
|
this.updateHours(val.toString());
|
152
138
|
}
|
153
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
|
+
*/
|
154
145
|
changeMinutes(step) {
|
155
146
|
if (!this.minutesUpDisabled || !this.minutesDownDisabled) {
|
156
147
|
const val = (isNaN(this.mins) ? 0 : this.mins) + step;
|
157
148
|
this.updateMinutes(val.toString());
|
158
149
|
}
|
159
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
|
+
*/
|
160
156
|
changeSeconds(step) {
|
161
157
|
if (!this.secondsUpDisabled || !this.secondsDownDisabled) {
|
162
158
|
const val = (isNaN(this.secs) ? 0 : this.secs) + step;
|
163
159
|
this.updateSeconds(val.toString());
|
164
160
|
}
|
165
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
|
+
*/
|
166
167
|
updateHours(newVal) {
|
167
168
|
const enteredHour = this.toInteger(newVal);
|
168
169
|
if (!isNaN(enteredHour)) {
|
@@ -178,6 +179,11 @@ class EuiTimepickerComponent {
|
|
178
179
|
};
|
179
180
|
this.propagateChange(this.propagatedValues);
|
180
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
|
+
*/
|
181
187
|
updateMinutes(newVal) {
|
182
188
|
const enteredMin = this.toInteger(newVal);
|
183
189
|
if (!isNaN(enteredMin)) {
|
@@ -194,6 +200,11 @@ class EuiTimepickerComponent {
|
|
194
200
|
};
|
195
201
|
this.propagateChange(this.propagatedValues);
|
196
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
|
+
*/
|
197
208
|
updateSeconds(newVal) {
|
198
209
|
const enteredSec = this.toInteger(newVal);
|
199
210
|
if (!isNaN(enteredSec)) {
|
@@ -258,21 +269,51 @@ class EuiTimepickerComponent {
|
|
258
269
|
this.oneInputFormControl.patchValue('' + hours + ':' + mins + ':' + secs);
|
259
270
|
}
|
260
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
|
+
*/
|
261
277
|
hoursUpDisable(state) {
|
262
278
|
this.hoursUpDisabled = state;
|
263
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
|
+
*/
|
264
285
|
hoursDownDisable(state) {
|
265
286
|
this.hoursDownDisabled = state;
|
266
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
|
+
*/
|
267
293
|
minutesUpDisable(state) {
|
268
294
|
this.minutesUpDisabled = state;
|
269
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
|
+
*/
|
270
301
|
minutesDownDisable(state) {
|
271
302
|
this.minutesDownDisabled = state;
|
272
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
|
+
*/
|
273
309
|
secondsUpDisable(state) {
|
274
310
|
this.secondsUpDisabled = state;
|
275
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
|
+
*/
|
276
317
|
secondsDownDisable(state) {
|
277
318
|
this.secondsDownDisabled = state;
|
278
319
|
}
|
@@ -306,7 +347,7 @@ class EuiTimepickerComponent {
|
|
306
347
|
}
|
307
348
|
}
|
308
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 }); }
|
309
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.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", 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 }], 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 }); }
|
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 }); }
|
310
351
|
}
|
311
352
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.6", ngImport: i0, type: EuiTimepickerComponent, decorators: [{
|
312
353
|
type: Component,
|
@@ -333,20 +374,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.6", ngImpor
|
|
333
374
|
}], stepSeconds: [{
|
334
375
|
type: Input
|
335
376
|
}], isreadOnly: [{
|
336
|
-
type: Input
|
377
|
+
type: Input,
|
378
|
+
args: [{ transform: booleanAttribute }]
|
337
379
|
}], isOneInputField: [{
|
338
|
-
type: Input
|
380
|
+
type: Input,
|
381
|
+
args: [{ transform: booleanAttribute }]
|
339
382
|
}], hasSeconds: [{
|
340
|
-
type: Input
|
341
|
-
|
342
|
-
type: ViewChild,
|
343
|
-
args: ['inputrefhours', { read: ElementRef }]
|
344
|
-
}], inputMinsElement: [{
|
345
|
-
type: ViewChild,
|
346
|
-
args: ['inputrefmins', { read: ElementRef }]
|
347
|
-
}], inputSecsElement: [{
|
348
|
-
type: ViewChild,
|
349
|
-
args: ['inputrefsecs', { read: ElementRef }]
|
383
|
+
type: Input,
|
384
|
+
args: [{ transform: booleanAttribute }]
|
350
385
|
}] } });
|
351
386
|
|
352
387
|
class EuiTimepickerModule {
|