@eui/components 19.0.3 → 19.0.4-snapshot-1738753092246
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/directives/eui-has-permission.directive.d.ts +70 -2
- package/directives/eui-has-permission.directive.d.ts.map +1 -1
- package/directives/eui-maxlength.directive.d.ts +94 -10
- package/directives/eui-maxlength.directive.d.ts.map +1 -1
- package/docs/components/EuiInputCheckboxComponent.html +169 -10
- package/docs/components/EuiInputGroupAddOnComponent.html +22 -0
- package/docs/components/EuiInputGroupAddOnItemComponent.html +30 -0
- package/docs/components/EuiInputGroupComponent.html +35 -0
- package/docs/components/EuiInputNumberComponent.html +83 -4
- package/docs/components/EuiInputRadioComponent.html +228 -0
- package/docs/components/EuiInputTextComponent.html +50 -0
- package/docs/components/EuiTextareaComponent.html +207 -1
- package/docs/dependencies.html +2 -2
- package/docs/directives/AutoResizeDirective.html +49 -1
- package/docs/directives/EuiHasPermissionDirective.html +34 -0
- package/docs/directives/EuiInputNumberDirective.html +17 -0
- package/docs/directives/EuiMaxLengthDirective.html +35 -7
- package/docs/js/menu-wc.js +53 -107
- package/docs/js/menu-wc_es5.js +1 -1
- package/docs/js/search/search_index.js +2 -2
- package/docs/miscellaneous/functions.html +14 -0
- package/docs/modules/EuiHasPermissionDirectiveModule.html +17 -3
- package/docs/modules/EuiInputCheckboxModule.html +25 -4
- package/docs/modules/EuiInputGroupModule.html +20 -5
- package/docs/modules/EuiInputNumberModule.html +26 -5
- package/docs/modules/EuiInputRadioModule.html +27 -4
- package/docs/modules/EuiInputTextModule.html +25 -4
- package/docs/modules/EuiMaxLengthDirectiveModule.html +25 -4
- package/docs/modules/EuiTextAreaModule.html +20 -4
- package/eui-input-checkbox/eui-input-checkbox.component.d.ts +88 -11
- package/eui-input-checkbox/eui-input-checkbox.component.d.ts.map +1 -1
- package/eui-input-checkbox/eui-input-checkbox.module.d.ts +17 -3
- package/eui-input-checkbox/eui-input-checkbox.module.d.ts.map +1 -1
- package/eui-input-group/eui-input-group-addon-item.component.d.ts +33 -1
- package/eui-input-group/eui-input-group-addon-item.component.d.ts.map +1 -1
- package/eui-input-group/eui-input-group-addon.component.d.ts +40 -2
- package/eui-input-group/eui-input-group-addon.component.d.ts.map +1 -1
- package/eui-input-group/eui-input-group.component.d.ts +44 -1
- package/eui-input-group/eui-input-group.component.d.ts.map +1 -1
- package/eui-input-group/eui-input-group.module.d.ts +21 -5
- package/eui-input-group/eui-input-group.module.d.ts.map +1 -1
- package/eui-input-number/eui-input-number.component.d.ts +73 -9
- package/eui-input-number/eui-input-number.component.d.ts.map +1 -1
- package/eui-input-number/eui-input-number.module.d.ts +19 -4
- package/eui-input-number/eui-input-number.module.d.ts.map +1 -1
- package/eui-input-number/eui-number-control.directive.d.ts +27 -2
- package/eui-input-number/eui-number-control.directive.d.ts.map +1 -1
- package/eui-input-radio/eui-input-radio.component.d.ts +96 -1
- package/eui-input-radio/eui-input-radio.component.d.ts.map +1 -1
- package/eui-input-radio/eui-input-radio.module.d.ts +20 -3
- package/eui-input-radio/eui-input-radio.module.d.ts.map +1 -1
- package/eui-input-text/eui-input-text.component.d.ts +54 -1
- package/eui-input-text/eui-input-text.component.d.ts.map +1 -1
- package/eui-input-text/eui-input-text.module.d.ts +19 -3
- package/eui-input-text/eui-input-text.module.d.ts.map +1 -1
- package/eui-textarea/auto-resize.directive.d.ts +90 -3
- package/eui-textarea/auto-resize.directive.d.ts.map +1 -1
- package/eui-textarea/eui-textarea.component.d.ts +111 -5
- package/eui-textarea/eui-textarea.component.d.ts.map +1 -1
- package/eui-textarea/eui-textarea.module.d.ts +23 -4
- package/eui-textarea/eui-textarea.module.d.ts.map +1 -1
- package/fesm2022/eui-components-directives.mjs +180 -34
- package/fesm2022/eui-components-directives.mjs.map +1 -1
- package/fesm2022/eui-components-eui-accordion.mjs +1 -1
- package/fesm2022/eui-components-eui-alert.mjs +1 -1
- package/fesm2022/eui-components-eui-autocomplete.mjs +2 -2
- package/fesm2022/eui-components-eui-avatar.mjs +1 -1
- package/fesm2022/eui-components-eui-badge.mjs +1 -1
- package/fesm2022/eui-components-eui-block-content.mjs +1 -1
- package/fesm2022/eui-components-eui-block-document.mjs +1 -1
- package/fesm2022/eui-components-eui-breadcrumb.mjs +1 -1
- package/fesm2022/eui-components-eui-button-group.mjs +1 -1
- package/fesm2022/eui-components-eui-button-v2.mjs +1 -1
- package/fesm2022/eui-components-eui-button.mjs +1 -1
- package/fesm2022/eui-components-eui-card.mjs +3 -3
- package/fesm2022/eui-components-eui-card.mjs.map +1 -1
- package/fesm2022/eui-components-eui-chip-group.mjs +1 -1
- package/fesm2022/eui-components-eui-chip-list.mjs +1 -1
- package/fesm2022/eui-components-eui-chip.mjs +1 -1
- package/fesm2022/eui-components-eui-dashboard-button.mjs +1 -1
- package/fesm2022/eui-components-eui-dashboard-card.mjs +1 -1
- package/fesm2022/eui-components-eui-date-range-selector.mjs +1 -1
- package/fesm2022/eui-components-eui-datepicker.mjs +1 -1
- package/fesm2022/eui-components-eui-dialog.mjs +1 -1
- package/fesm2022/eui-components-eui-dimmer.mjs +1 -1
- package/fesm2022/eui-components-eui-disable-content.mjs +1 -1
- package/fesm2022/eui-components-eui-discussion-thread.mjs +1 -1
- package/fesm2022/eui-components-eui-dropdown.mjs +2 -2
- package/fesm2022/eui-components-eui-feedback-message.mjs +1 -1
- package/fesm2022/eui-components-eui-fieldset.mjs +1 -1
- package/fesm2022/eui-components-eui-file-upload.mjs +1 -1
- package/fesm2022/eui-components-eui-growl.mjs +1 -1
- package/fesm2022/eui-components-eui-icon-button-expander.mjs +1 -1
- package/fesm2022/eui-components-eui-icon-button.mjs +1 -1
- package/fesm2022/eui-components-eui-icon-color.mjs +1 -1
- package/fesm2022/eui-components-eui-icon-input.mjs +1 -1
- package/fesm2022/eui-components-eui-icon-state.mjs +1 -1
- package/fesm2022/eui-components-eui-icon-toggle.mjs +1 -1
- package/fesm2022/eui-components-eui-icon.mjs +1 -1
- package/fesm2022/eui-components-eui-input-checkbox.mjs +104 -14
- package/fesm2022/eui-components-eui-input-checkbox.mjs.map +1 -1
- package/fesm2022/eui-components-eui-input-group.mjs +142 -12
- package/fesm2022/eui-components-eui-input-group.mjs.map +1 -1
- package/fesm2022/eui-components-eui-input-number.mjs +109 -13
- package/fesm2022/eui-components-eui-input-number.mjs.map +1 -1
- package/fesm2022/eui-components-eui-input-radio.mjs +117 -6
- package/fesm2022/eui-components-eui-input-radio.mjs.map +1 -1
- package/fesm2022/eui-components-eui-input-text.mjs +73 -6
- package/fesm2022/eui-components-eui-input-text.mjs.map +1 -1
- package/fesm2022/eui-components-eui-label.mjs +1 -1
- package/fesm2022/eui-components-eui-language-selector.mjs +1 -1
- package/fesm2022/eui-components-eui-list.mjs +1 -1
- package/fesm2022/eui-components-eui-menu.mjs +1 -1
- package/fesm2022/eui-components-eui-message-box.mjs +1 -1
- package/fesm2022/eui-components-eui-navbar.mjs +1 -1
- package/fesm2022/eui-components-eui-overlay.mjs +1 -1
- package/fesm2022/eui-components-eui-page.mjs +1 -1
- package/fesm2022/eui-components-eui-paginator.mjs +1 -1
- package/fesm2022/eui-components-eui-popover.mjs +1 -1
- package/fesm2022/eui-components-eui-progress-bar.mjs +1 -1
- package/fesm2022/eui-components-eui-progress-circle.mjs +1 -1
- package/fesm2022/eui-components-eui-select.mjs +1 -1
- package/fesm2022/eui-components-eui-sidebar-menu.mjs +1 -1
- package/fesm2022/eui-components-eui-skeleton.mjs +1 -1
- package/fesm2022/eui-components-eui-slide-toggle.mjs +2 -2
- package/fesm2022/eui-components-eui-split-button.mjs +1 -1
- package/fesm2022/eui-components-eui-table-v2.mjs +1 -1
- package/fesm2022/eui-components-eui-table.mjs +1 -1
- package/fesm2022/eui-components-eui-tabs.mjs +1 -1
- package/fesm2022/eui-components-eui-textarea.mjs +221 -15
- package/fesm2022/eui-components-eui-textarea.mjs.map +1 -1
- package/fesm2022/eui-components-eui-timebar.mjs +1 -1
- package/fesm2022/eui-components-eui-timeline.mjs +1 -1
- package/fesm2022/eui-components-eui-timepicker.mjs +1 -1
- package/fesm2022/eui-components-eui-tree-list.mjs +1 -1
- package/fesm2022/eui-components-eui-tree.mjs +1 -1
- package/fesm2022/eui-components-eui-user-profile.mjs +1 -1
- package/fesm2022/eui-components-eui-wizard.mjs +1 -1
- package/fesm2022/eui-components-externals-eui-editor.mjs +1 -1
- package/fesm2022/eui-components-externals-quill.mjs +1 -1
- package/fesm2022/eui-components-layout.mjs +2 -2
- package/fesm2022/eui-components-shared.mjs +2 -2
- package/package.json +4 -4
@@ -4,20 +4,73 @@ import { InputDirective } from '@eui/components/shared';
|
|
4
4
|
import { BooleanInput } from '@angular/cdk/coercion';
|
5
5
|
import * as i0 from "@angular/core";
|
6
6
|
import * as i1 from "@eui/components/directives";
|
7
|
+
/**
|
8
|
+
* @description
|
9
|
+
* A custom input text component that extends InputDirective and provides additional functionality
|
10
|
+
* such as validation states, clearable input, and loading states.
|
11
|
+
*
|
12
|
+
* @example
|
13
|
+
* ```html
|
14
|
+
* <input euiInputText
|
15
|
+
* [isInvalid]="true"
|
16
|
+
* [euiClearable]="true"
|
17
|
+
* [euiLoading]="isLoading">
|
18
|
+
* ```
|
19
|
+
*
|
20
|
+
* @implements {@link OnInit}
|
21
|
+
* @implements {@link OnDestroy}
|
22
|
+
* @implements {@link DoCheck}
|
23
|
+
*/
|
7
24
|
export declare class EuiInputTextComponent extends InputDirective implements OnInit, OnDestroy, DoCheck {
|
8
25
|
protected control: NgControl;
|
9
26
|
protected _elementRef: ElementRef;
|
10
27
|
protected _renderer: Renderer2;
|
28
|
+
/**
|
29
|
+
* @description
|
30
|
+
* Gets the CSS classes for the component, including validation state classes
|
31
|
+
*
|
32
|
+
* @returns {string} Space-separated string of CSS class names
|
33
|
+
*/
|
11
34
|
get class(): string;
|
35
|
+
/**
|
36
|
+
* @description
|
37
|
+
* Gets or sets the invalid state of the input
|
38
|
+
* When used with NgControl, this state is automatically managed based on control state
|
39
|
+
*
|
40
|
+
* @returns {boolean} Current invalid state
|
41
|
+
*/
|
12
42
|
get isInvalid(): boolean;
|
43
|
+
/**
|
44
|
+
* @param {BooleanInput} state - The invalid state to set
|
45
|
+
*/
|
13
46
|
set isInvalid(state: BooleanInput);
|
47
|
+
/** @internal */
|
14
48
|
protected _isInvalid: boolean;
|
15
49
|
constructor(control: NgControl, _elementRef: ElementRef, _renderer: Renderer2, injector: Injector);
|
50
|
+
/**
|
51
|
+
* @description
|
52
|
+
* Initializes the component and sets the root class name
|
53
|
+
*/
|
16
54
|
ngOnInit(): void;
|
55
|
+
/**
|
56
|
+
* @description
|
57
|
+
* Cleans up component resources
|
58
|
+
*/
|
17
59
|
ngOnDestroy(): void;
|
60
|
+
/**
|
61
|
+
* @description
|
62
|
+
* Checks and updates the invalid state when using NgControl
|
63
|
+
*/
|
18
64
|
ngDoCheck(): void;
|
65
|
+
/**
|
66
|
+
* @description
|
67
|
+
* Sets the invalid state of the input and updates related properties
|
68
|
+
*
|
69
|
+
* @param {BooleanInput} state - The invalid state to set
|
70
|
+
* @protected
|
71
|
+
*/
|
19
72
|
protected setInvalid(state?: BooleanInput): void;
|
20
73
|
static ɵfac: i0.ɵɵFactoryDeclaration<EuiInputTextComponent, [{ optional: true; self: true; }, null, null, null]>;
|
21
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<EuiInputTextComponent, "input[euiInputText]", never, { "isInvalid": { "alias": "isInvalid"; "required": false; }; }, {}, never, never,
|
74
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<EuiInputTextComponent, "input[euiInputText]", never, { "isInvalid": { "alias": "isInvalid"; "required": false; }; }, {}, never, never, true, [{ directive: typeof i1.EuiClearableDirective; inputs: { "euiClearable": "euiClearable"; "readonly": "readonly"; "disabled": "disabled"; }; outputs: {}; }, { directive: typeof i1.EuiLoadingDirective; inputs: { "euiLoading": "euiLoading"; "readonly": "readonly"; }; outputs: {}; }]>;
|
22
75
|
}
|
23
76
|
//# sourceMappingURL=eui-input-text.component.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"eui-input-text.component.d.ts","sourceRoot":"","sources":["../../eui-input-text/eui-input-text.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAEH,OAAO,EACP,UAAU,EAGV,QAAQ,EAER,SAAS,EACT,MAAM,EAEN,SAAS,EACZ,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAyB,YAAY,EAAE,MAAM,uBAAuB,CAAC;;;AAG5E,qBAiBa,qBAAsB,SAAQ,cAAe,YAAW,MAAM,EAAE,SAAS,EAAE,OAAO;
|
1
|
+
{"version":3,"file":"eui-input-text.component.d.ts","sourceRoot":"","sources":["../../eui-input-text/eui-input-text.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAEH,OAAO,EACP,UAAU,EAGV,QAAQ,EAER,SAAS,EACT,MAAM,EAEN,SAAS,EACZ,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAyB,YAAY,EAAE,MAAM,uBAAuB,CAAC;;;AAG5E;;;;;;;;;;;;;;;;GAgBG;AACH,qBAiBa,qBAAsB,SAAQ,cAAe,YAAW,MAAM,EAAE,SAAS,EAAE,OAAO;IAiCnE,SAAS,CAAC,OAAO,EAAE,SAAS;IAChD,SAAS,CAAC,WAAW,EAAE,UAAU;IACjC,SAAS,CAAC,SAAS,EAAE,SAAS;IAlClC;;;;;OAKG;IACH,IACW,KAAK,IAAI,MAAM,CAEzB;IAED;;;;;;OAMG;IACH,IACW,SAAS,IAAI,OAAO,CAE9B;IACD;;OAEG;IACH,IAAW,SAAS,CAAC,KAAK,EAAE,YAAY,EAEvC;IACD,gBAAgB;IAChB,SAAS,CAAC,UAAU,EAAE,OAAO,CAAC;gBAGI,OAAO,EAAE,SAAS,EACtC,WAAW,EAAE,UAAU,EACvB,SAAS,EAAE,SAAS,EAC9B,QAAQ,EAAE,QAAQ;IAKtB;;;OAGG;IACH,QAAQ,IAAI,IAAI;IAKhB;;;OAGG;IACH,WAAW,IAAI,IAAI;IAInB;;;OAGG;IACH,SAAS,IAAI,IAAI;IAMjB;;;;;;OAMG;IACH,SAAS,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE,YAAY,GAAG,IAAI;yCA3EvC,qBAAqB;2CAArB,qBAAqB;CAkFjC"}
|
@@ -1,9 +1,25 @@
|
|
1
1
|
import * as i0 from "@angular/core";
|
2
|
-
import * as i1 from "
|
3
|
-
import * as i2 from "
|
2
|
+
import * as i1 from "@angular/common";
|
3
|
+
import * as i2 from "./eui-input-text.component";
|
4
|
+
/**
|
5
|
+
* @description
|
6
|
+
* Module that provides the EuiInputText component and its dependencies
|
7
|
+
*
|
8
|
+
* @example
|
9
|
+
* ```typescript
|
10
|
+
* @NgModule({
|
11
|
+
* imports: [EuiInputTextModule]
|
12
|
+
* })
|
13
|
+
* export class YourModule { }
|
14
|
+
* ```
|
15
|
+
*
|
16
|
+
* @deprecated
|
17
|
+
* Use {@link `EuiInputTextComponent`} instead. This module is deprecated and
|
18
|
+
* will be removed in the next major version of the library.
|
19
|
+
*/
|
4
20
|
export declare class EuiInputTextModule {
|
5
21
|
static ɵfac: i0.ɵɵFactoryDeclaration<EuiInputTextModule, never>;
|
6
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<EuiInputTextModule, [typeof i1.
|
22
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<EuiInputTextModule, never, [typeof i1.CommonModule, typeof i2.EuiInputTextComponent], [typeof i2.EuiInputTextComponent]>;
|
7
23
|
static ɵinj: i0.ɵɵInjectorDeclaration<EuiInputTextModule>;
|
8
24
|
}
|
9
25
|
//# sourceMappingURL=eui-input-text.module.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"eui-input-text.module.d.ts","sourceRoot":"","sources":["../../eui-input-text/eui-input-text.module.ts"],"names":[],"mappings":";;;AAIA,
|
1
|
+
{"version":3,"file":"eui-input-text.module.d.ts","sourceRoot":"","sources":["../../eui-input-text/eui-input-text.module.ts"],"names":[],"mappings":";;;AAIA;;;;;;;;;;;;;;;GAeG;AACH,qBAIa,kBAAkB;yCAAlB,kBAAkB;0CAAlB,kBAAkB;0CAAlB,kBAAkB;CAAG"}
|
@@ -1,35 +1,122 @@
|
|
1
1
|
import { OnInit, OnDestroy, ElementRef, AfterViewInit, Renderer2, OnChanges, SimpleChanges } from '@angular/core';
|
2
2
|
import { NgControl } from '@angular/forms';
|
3
3
|
import * as i0 from "@angular/core";
|
4
|
+
/**
|
5
|
+
* A directive that automatically adjusts the height of a textarea based on its content.
|
6
|
+
*
|
7
|
+
* @directive
|
8
|
+
* @selector textarea[autoResize]
|
9
|
+
* @description
|
10
|
+
* The AutoResizeDirective automatically adjusts the height of a textarea element as the user types,
|
11
|
+
* ensuring that all content is visible without requiring manual resizing or scrolling.
|
12
|
+
* It supports minimum and maximum row constraints and can be enabled/disabled dynamically.
|
13
|
+
*
|
14
|
+
* @example
|
15
|
+
* ```html
|
16
|
+
* <textarea autoResize [minRows]="2" [maxRows]="5"></textarea>
|
17
|
+
* ```
|
18
|
+
*/
|
4
19
|
export declare class AutoResizeDirective implements OnInit, OnChanges, AfterViewInit, OnDestroy {
|
5
20
|
protected el: ElementRef;
|
6
21
|
protected renderer: Renderer2;
|
7
22
|
protected control: NgControl;
|
23
|
+
/**
|
24
|
+
* @description
|
25
|
+
* Controls whether the auto-resize functionality is enabled.
|
26
|
+
* When true, the textarea will automatically adjust its height based on content.
|
27
|
+
* When false, the textarea will behave normally.
|
28
|
+
*
|
29
|
+
* @default true
|
30
|
+
*/
|
8
31
|
autoResize: boolean;
|
32
|
+
/**
|
33
|
+
* @description
|
34
|
+
* Sets the minimum number of rows for the textarea.
|
35
|
+
* This value determines the initial height of the textarea.
|
36
|
+
*
|
37
|
+
* @param minRows - The minimum number of rows to display
|
38
|
+
*/
|
9
39
|
set minRows(minRows: number | string);
|
40
|
+
/**
|
41
|
+
* @description
|
42
|
+
* Sets the maximum number of rows for the textarea.
|
43
|
+
* When set to a value greater than 0, the textarea will not grow beyond this number of rows
|
44
|
+
* and will show scrollbars if necessary.
|
45
|
+
* When set to 0, there is no maximum limit.
|
46
|
+
*
|
47
|
+
* @default 0
|
48
|
+
*/
|
10
49
|
maxRows: number;
|
11
50
|
private defaultRows;
|
12
51
|
private destroy$;
|
13
52
|
private observer;
|
14
53
|
constructor(el: ElementRef, renderer: Renderer2, control: NgControl);
|
54
|
+
/**
|
55
|
+
* Event handler for input events on the textarea.
|
56
|
+
* Triggers the resize calculation when the content changes.
|
57
|
+
*
|
58
|
+
* @internal
|
59
|
+
*/
|
15
60
|
onInput(): void;
|
61
|
+
/**
|
62
|
+
* Initializes the directive by setting up window resize event handling
|
63
|
+
* and mutation observer for readonly attribute changes.
|
64
|
+
*
|
65
|
+
* @internal
|
66
|
+
*/
|
16
67
|
ngOnInit(): void;
|
68
|
+
/**
|
69
|
+
* Handles changes to the directive's inputs, particularly the autoResize property.
|
70
|
+
* Updates the textarea's appearance and behavior accordingly.
|
71
|
+
*
|
72
|
+
* @param changes - Angular SimpleChanges object containing changed properties
|
73
|
+
* @internal
|
74
|
+
*/
|
17
75
|
ngOnChanges(changes: SimpleChanges): void;
|
76
|
+
/**
|
77
|
+
* Performs initial resize after view initialization and sets up form control value change handling if applicable.
|
78
|
+
*
|
79
|
+
* @internal
|
80
|
+
*/
|
18
81
|
ngAfterViewInit(): void;
|
82
|
+
/**
|
83
|
+
* Cleans up subscriptions and disconnects observers when the directive is destroyed.
|
84
|
+
*
|
85
|
+
* @internal
|
86
|
+
*/
|
19
87
|
ngOnDestroy(): void;
|
20
88
|
/**
|
21
|
-
* Calculates
|
89
|
+
* Calculates and sets the appropriate height for the textarea based on its content.
|
90
|
+
* This method creates a temporary clone of the textarea to measure the required height,
|
91
|
+
* taking into account minRows and maxRows constraints.
|
92
|
+
*
|
93
|
+
* The calculation process:
|
94
|
+
* 1. Creates a hidden clone of the textarea
|
95
|
+
* 2. Sets the clone's width to match the original
|
96
|
+
* 3. Measures the required height based on content
|
97
|
+
* 4. Applies maxRows constraint if specified
|
98
|
+
* 5. Updates the original textarea's height
|
99
|
+
*
|
100
|
+
* @public
|
22
101
|
*/
|
23
102
|
resize(): void;
|
24
103
|
/**
|
25
|
-
*
|
104
|
+
* Sets up subscription to form control value changes to trigger resize when the value
|
105
|
+
* is changed programmatically through the form control.
|
26
106
|
*
|
27
107
|
* @protected
|
28
108
|
*/
|
29
109
|
protected handleFormControlChanges(): void;
|
110
|
+
/**
|
111
|
+
* Mutation observer callback that handles changes to the readonly attribute
|
112
|
+
* and triggers resize when necessary.
|
113
|
+
*
|
114
|
+
* @param mutationsList - List of mutations that occurred
|
115
|
+
* @private
|
116
|
+
*/
|
30
117
|
private readonlyMutationObserver;
|
31
118
|
static ɵfac: i0.ɵɵFactoryDeclaration<AutoResizeDirective, [null, null, { optional: true; }]>;
|
32
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<AutoResizeDirective, "textarea[autoResize]", never, { "autoResize": { "alias": "autoResize"; "required": false; }; "minRows": { "alias": "minRows"; "required": false; }; "maxRows": { "alias": "maxRows"; "required": false; }; }, {}, never, never,
|
119
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<AutoResizeDirective, "textarea[autoResize]", never, { "autoResize": { "alias": "autoResize"; "required": false; }; "minRows": { "alias": "minRows"; "required": false; }; "maxRows": { "alias": "maxRows"; "required": false; }; }, {}, never, never, true, never>;
|
33
120
|
static ngAcceptInputType_autoResize: unknown;
|
34
121
|
static ngAcceptInputType_maxRows: unknown;
|
35
122
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"auto-resize.directive.d.ts","sourceRoot":"","sources":["../../eui-textarea/auto-resize.directive.ts"],"names":[],"mappings":"
|
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AAsprO,OAAQ;CAD98wQ"}
|
@@ -3,23 +3,69 @@ import { ControlValueAccessor } from '@angular/forms';
|
|
3
3
|
import { BaseStatesDirective } from '@eui/components/shared';
|
4
4
|
import * as i0 from "@angular/core";
|
5
5
|
import * as i1 from "@eui/components/shared";
|
6
|
+
/**
|
7
|
+
* @fileoverview Enhanced textarea component for Angular forms with readonly state, form control integration, and state management.
|
8
|
+
*
|
9
|
+
* A form control component that provides an enhanced textarea with additional features.
|
10
|
+
* Supports readonly state visualization, form control integration, and state management.
|
11
|
+
*
|
12
|
+
* @component
|
13
|
+
* @selector textarea[euiTextArea]
|
14
|
+
*
|
15
|
+
* @example
|
16
|
+
* ```html
|
17
|
+
* <textarea euiTextArea
|
18
|
+
* [(ngModel)]="value"
|
19
|
+
* [readonly]="isReadonly"
|
20
|
+
* [disabled]="isDisabled"
|
21
|
+
* [isInvalid]="hasError" />
|
22
|
+
* ```
|
23
|
+
*/
|
6
24
|
export declare class EuiTextareaComponent implements OnInit, OnDestroy, DoCheck, OnChanges, ControlValueAccessor {
|
7
25
|
private injector;
|
8
26
|
private _elementRef;
|
9
27
|
private _renderer;
|
10
28
|
private baseStatesDirective;
|
29
|
+
/**
|
30
|
+
* Static counter used to generate unique IDs for textarea instances
|
31
|
+
* @static
|
32
|
+
*/
|
11
33
|
static idCounter: number;
|
12
34
|
/**
|
13
|
-
*
|
35
|
+
* Event emitter that fires when the number of text rows in the textarea changes
|
14
36
|
*/
|
15
37
|
rowsChange: EventEmitter<number>;
|
16
38
|
get class(): string;
|
39
|
+
/**
|
40
|
+
* The disabled state of the textarea
|
41
|
+
* @description When set to true, prevents user interaction with the textarea.
|
42
|
+
* This can be controlled either directly or through form control binding.
|
43
|
+
*/
|
17
44
|
get disabled(): boolean | null;
|
18
45
|
set disabled(state: any);
|
46
|
+
/**
|
47
|
+
* The readonly state of the textarea
|
48
|
+
* @description When true, displays the textarea content in a read-only format
|
49
|
+
* with special styling.
|
50
|
+
*/
|
19
51
|
get readonly(): any;
|
20
52
|
set readonly(state: any);
|
53
|
+
/**
|
54
|
+
* Unique identifier for the textarea
|
55
|
+
* @default eui-textarea_{increment}
|
56
|
+
*/
|
21
57
|
id: string;
|
58
|
+
/**
|
59
|
+
* Flag indicating if the textarea is in an invalid state
|
60
|
+
* @description When true, applies error styling to the textarea.
|
61
|
+
* This can be set manually or automatically through form validation.
|
62
|
+
*/
|
22
63
|
isInvalid: boolean;
|
64
|
+
/**
|
65
|
+
* @description
|
66
|
+
* Data attribute for end-to-end testing
|
67
|
+
* @default eui-textarea
|
68
|
+
*/
|
23
69
|
e2eAttr: string;
|
24
70
|
protected _readonly: boolean;
|
25
71
|
protected hostEl: HTMLTextAreaElement;
|
@@ -31,33 +77,93 @@ export declare class EuiTextareaComponent implements OnInit, OnDestroy, DoCheck,
|
|
31
77
|
private control;
|
32
78
|
private rows;
|
33
79
|
constructor(injector: Injector, _elementRef: ElementRef, _renderer: Renderer2, baseStatesDirective: BaseStatesDirective);
|
80
|
+
/**
|
81
|
+
* Handles input changes in the textarea
|
82
|
+
* @param {string} value - The new value of the textarea
|
83
|
+
* @description Updates the number of rows and triggers change detection
|
84
|
+
*/
|
34
85
|
onInputChange(value: string): void;
|
86
|
+
/**
|
87
|
+
* Handles blur events on the textarea
|
88
|
+
* @param {string} value - The current value of the textarea
|
89
|
+
* @description Marks the control as touched and triggers validation
|
90
|
+
*/
|
35
91
|
onBlur(value: string): void;
|
92
|
+
/**
|
93
|
+
* @description
|
94
|
+
* Lifecycle hook that initializes the component. Sets up DOM elements,
|
95
|
+
* initializes form control integration, and establishes state management
|
96
|
+
*/
|
36
97
|
ngOnInit(): void;
|
98
|
+
/**
|
99
|
+
* @description
|
100
|
+
* Lifecycle hook that checks for changes in form control state
|
101
|
+
* Updates invalid state based on form control validation
|
102
|
+
*/
|
37
103
|
ngDoCheck(): void;
|
104
|
+
/**
|
105
|
+
* @description
|
106
|
+
* Lifecycle hook that handles changes to component inputs
|
107
|
+
* @param {SimpleChanges} changes - Object containing changed properties
|
108
|
+
*/
|
38
109
|
ngOnChanges(changes: SimpleChanges): void;
|
110
|
+
/**
|
111
|
+
* @description
|
112
|
+
* Lifecycle hook that cleans up component resources
|
113
|
+
* Completes observables and removes generated DOM elements
|
114
|
+
*/
|
39
115
|
ngOnDestroy(): void;
|
116
|
+
/**
|
117
|
+
* @description
|
118
|
+
* ControlValueAccessor implementation for writing values
|
119
|
+
* @param {unknown} obj - The value to write to the textarea
|
120
|
+
*/
|
40
121
|
writeValue(obj: unknown): void;
|
122
|
+
/**
|
123
|
+
* @description
|
124
|
+
* Registers the callback function for change events
|
125
|
+
* @param {Function} fn - The callback function
|
126
|
+
*/
|
41
127
|
registerOnChange(fn: () => void): void;
|
128
|
+
/**
|
129
|
+
* @description
|
130
|
+
* Registers the callback function for touched events
|
131
|
+
* @param {Function} fn - The callback function
|
132
|
+
*/
|
42
133
|
registerOnTouched(fn: () => void): void;
|
134
|
+
/**
|
135
|
+
* @description
|
136
|
+
* Sets the disabled state of the textarea
|
137
|
+
* @param {boolean} isDisabled - The disabled state to set
|
138
|
+
*/
|
43
139
|
setDisabledState(isDisabled: boolean): void;
|
44
140
|
protected onChange(_: unknown): void;
|
45
141
|
protected onTouched(_: unknown): void;
|
142
|
+
/**
|
143
|
+
* @description
|
144
|
+
* Creates the container for the textarea element
|
145
|
+
* @returns {HTMLDivElement} The created wrapper container element
|
146
|
+
* @private
|
147
|
+
*/
|
46
148
|
private createHostWrapperContainer;
|
47
149
|
/**
|
48
|
-
*
|
49
|
-
*
|
150
|
+
* @description
|
151
|
+
* Creates the container for displaying readonly values
|
152
|
+
* @returns {HTMLDivElement} The created value container element
|
50
153
|
* @private
|
51
154
|
*/
|
52
155
|
private createValueContainer;
|
53
156
|
/**
|
54
|
-
*
|
157
|
+
* @description
|
158
|
+
* Handles the DOM manipulation for the textarea structure
|
159
|
+
* Wraps the textarea in necessary containers and adds
|
160
|
+
* the readonly value display element
|
55
161
|
*
|
56
162
|
* @private
|
57
163
|
*/
|
58
164
|
private handleMarkup;
|
59
165
|
static ɵfac: i0.ɵɵFactoryDeclaration<EuiTextareaComponent, never>;
|
60
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<EuiTextareaComponent, "textarea[euiTextArea]", never, { "disabled": { "alias": "disabled"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "id": { "alias": "id"; "required": false; }; "isInvalid": { "alias": "isInvalid"; "required": false; }; "e2eAttr": { "alias": "e2eAttr"; "required": false; }; }, { "rowsChange": "rowsChange"; }, never, ["*"],
|
166
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<EuiTextareaComponent, "textarea[euiTextArea]", never, { "disabled": { "alias": "disabled"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "id": { "alias": "id"; "required": false; }; "isInvalid": { "alias": "isInvalid"; "required": false; }; "e2eAttr": { "alias": "e2eAttr"; "required": false; }; }, { "rowsChange": "rowsChange"; }, never, ["*"], true, [{ directive: typeof i1.BaseStatesDirective; inputs: { "euiDisabled": "euiDisabled"; "euiDanger": "euiDanger"; }; outputs: {}; }]>;
|
61
167
|
static ngAcceptInputType_isInvalid: unknown;
|
62
168
|
}
|
63
169
|
//# sourceMappingURL=eui-textarea.component.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"eui-textarea.component.d.ts","sourceRoot":"","sources":["../../eui-textarea/eui-textarea.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAEH,UAAU,EAIV,SAAS,EACT,MAAM,EACN,SAAS,EACT,aAAa,EAEb,SAAS,EACT,OAAO,EACP,QAAQ,EAKR,YAAY,EAEf,MAAM,eAAe,CAAC;AACvB,OAAO,EAEH,oBAAoB,EAMvB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;;;AAK7D,qBAea,oBAAqB,YAAW,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,SAAS,EAAE,oBAAoB;
|
1
|
+
{"version":3,"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+
import * as i1 from "@angular/common";
|
3
|
+
import * as i2 from "./eui-textarea.component";
|
4
|
+
import * as i3 from "./auto-resize.directive";
|
5
|
+
/**
|
6
|
+
* @description
|
7
|
+
* A module that provides textarea functionality with auto-resizing capabilities.
|
8
|
+
* This module encapsulates the EuiTextareaComponent and AutoResizeDirective to provide
|
9
|
+
* a cohesive textarea solution for Angular applications.
|
10
|
+
*
|
11
|
+
* @usageNotes
|
12
|
+
* To use this module, import it into your feature module:
|
13
|
+
* ```typescript
|
14
|
+
* import { EuiTextAreaModule } from './path-to-module/eui-textarea.module';
|
15
|
+
*
|
16
|
+
* @NgModule({
|
17
|
+
* imports: [EuiTextAreaModule]
|
18
|
+
* })
|
19
|
+
* export class YourFeatureModule { }
|
20
|
+
* ```
|
21
|
+
*
|
22
|
+
* @publicApi
|
23
|
+
*/
|
5
24
|
export declare class EuiTextAreaModule {
|
6
25
|
static ɵfac: i0.ɵɵFactoryDeclaration<EuiTextAreaModule, never>;
|
7
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<EuiTextAreaModule, [typeof i1.
|
26
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<EuiTextAreaModule, never, [typeof i1.CommonModule, typeof i2.EuiTextareaComponent, typeof i3.AutoResizeDirective], [typeof i2.EuiTextareaComponent, typeof i3.AutoResizeDirective]>;
|
8
27
|
static ɵinj: i0.ɵɵInjectorDeclaration<EuiTextAreaModule>;
|
9
28
|
}
|
10
29
|
//# sourceMappingURL=eui-textarea.module.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"eui-textarea.module.d.ts","sourceRoot":"","sources":["../../eui-textarea/eui-textarea.module.ts"],"names":[],"mappings":";;;;AAKA,
|
1
|
+
{"version":3,"file":"eui-textarea.module.d.ts","sourceRoot":"","sources":["../../eui-textarea/eui-textarea.module.ts"],"names":[],"mappings":";;;;AAKA;;;;;;;;;;;;;;;;;;GAkBG;AACH,qBAIa,iBAAiB;yCAAjB,iBAAiB;0CAAjB,iBAAiB;0CAAjB,iBAAiB;CAAG"}
|