@progress/kendo-angular-inputs 19.1.1-develop.2 → 19.1.2-develop.1
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/checkbox/checkbox.component.d.ts +15 -13
- package/checkbox/checkbox.directive.d.ts +8 -15
- package/checkbox/checked-state.d.ts +5 -1
- package/checkbox.module.d.ts +9 -20
- package/colorpicker/color-gradient.component.d.ts +26 -26
- package/colorpicker/color-input.component.d.ts +18 -18
- package/colorpicker/color-palette.component.d.ts +28 -29
- package/colorpicker/colorpicker.component.d.ts +53 -69
- package/colorpicker/events/active-color-click-event.d.ts +10 -14
- package/colorpicker/events/cancel-event.d.ts +1 -1
- package/colorpicker/events/close-event.d.ts +1 -1
- package/colorpicker/events/open-event.d.ts +1 -1
- package/colorpicker/flatcolorpicker.component.d.ts +26 -29
- package/colorpicker/localization/custom-messages.component.d.ts +9 -1
- package/colorpicker/localization/messages.d.ts +29 -29
- package/colorpicker/models/palette-settings.d.ts +0 -3
- package/colorpicker/models/tile-size.d.ts +6 -0
- package/colorpicker.module.d.ts +18 -2
- package/common/models/fillmode.d.ts +4 -1
- package/common/models/rounded.d.ts +8 -2
- package/common/models/size.d.ts +4 -1
- package/common/models/type.d.ts +3 -1
- package/common/radio-checkbox.base.d.ts +0 -7
- package/directives.d.ts +216 -18
- package/esm2022/checkbox/checkbox.component.mjs +15 -13
- package/esm2022/checkbox/checkbox.directive.mjs +8 -15
- package/esm2022/checkbox.module.mjs +9 -20
- package/esm2022/colorpicker/color-gradient.component.mjs +26 -26
- package/esm2022/colorpicker/color-input.component.mjs +21 -21
- package/esm2022/colorpicker/color-palette.component.mjs +28 -29
- package/esm2022/colorpicker/colorpicker.component.mjs +53 -69
- package/esm2022/colorpicker/events/active-color-click-event.mjs +10 -14
- package/esm2022/colorpicker/events/cancel-event.mjs +1 -1
- package/esm2022/colorpicker/events/close-event.mjs +1 -1
- package/esm2022/colorpicker/events/open-event.mjs +1 -1
- package/esm2022/colorpicker/flatcolorpicker.component.mjs +26 -29
- package/esm2022/colorpicker/localization/custom-messages.component.mjs +9 -1
- package/esm2022/colorpicker/localization/messages.mjs +29 -29
- package/esm2022/colorpicker.module.mjs +18 -2
- package/esm2022/common/radio-checkbox.base.mjs +0 -7
- package/esm2022/directives.mjs +216 -18
- package/esm2022/formfield/error.component.mjs +9 -6
- package/esm2022/formfield/formfield.component.mjs +24 -20
- package/esm2022/formfield/hint.component.mjs +8 -5
- package/esm2022/formfield.module.mjs +9 -20
- package/esm2022/index.mjs +1 -0
- package/esm2022/inputs.module.mjs +9 -21
- package/esm2022/maskedtextbox/maskedtextbox.component.mjs +46 -88
- package/esm2022/maskedtextbox.module.mjs +9 -20
- package/esm2022/numerictextbox/localization/custom-messages.component.mjs +13 -1
- package/esm2022/numerictextbox/localization/messages.mjs +2 -2
- package/esm2022/numerictextbox/numerictextbox.component.mjs +57 -70
- package/esm2022/numerictextbox.module.mjs +9 -20
- package/esm2022/otp.module.mjs +44 -0
- package/esm2022/otpinput/localization/custom-messages.component.mjs +3 -1
- package/esm2022/otpinput/otpinput.component.mjs +39 -42
- package/esm2022/package-metadata.mjs +2 -2
- package/esm2022/radiobutton/radiobutton.component.mjs +15 -6
- package/esm2022/radiobutton/radiobutton.directive.mjs +6 -10
- package/esm2022/radiobutton.module.mjs +8 -18
- package/esm2022/rangeslider/localization/custom-messages.component.mjs +11 -1
- package/esm2022/rangeslider/rangeslider.component.mjs +12 -16
- package/esm2022/rangeslider.module.mjs +7 -18
- package/esm2022/rating/directives/rating-hovered-item.directive.mjs +11 -3
- package/esm2022/rating/directives/rating-item.directive.mjs +10 -3
- package/esm2022/rating/directives/rating-selected-item.directive.mjs +12 -3
- package/esm2022/rating/rating.component.mjs +23 -20
- package/esm2022/rating.module.mjs +7 -18
- package/esm2022/shared/input-separator.component.mjs +10 -15
- package/esm2022/shared/textarea.directive.mjs +5 -6
- package/esm2022/signature/events/close-event.mjs +1 -1
- package/esm2022/signature/localization/custom-messages.component.mjs +1 -1
- package/esm2022/signature/signature.component.mjs +52 -51
- package/esm2022/signature.module.mjs +7 -18
- package/esm2022/slider/localization/custom-messages.component.mjs +1 -1
- package/esm2022/slider/slider.component.mjs +18 -19
- package/esm2022/slider.module.mjs +7 -18
- package/esm2022/sliders-common/label-template.directive.mjs +9 -19
- package/esm2022/sliders-common/slider-base.mjs +47 -29
- package/esm2022/switch/events/blur-event.mjs +1 -1
- package/esm2022/switch/events/focus-event.mjs +1 -1
- package/esm2022/switch/localization/custom-messages.component.mjs +1 -1
- package/esm2022/switch/switch.component.mjs +32 -43
- package/esm2022/switch.module.mjs +7 -18
- package/esm2022/textarea/textarea-prefix.component.mjs +11 -13
- package/esm2022/textarea/textarea-suffix.component.mjs +11 -13
- package/esm2022/textarea/textarea.component.mjs +40 -103
- package/esm2022/textarea.module.mjs +7 -18
- package/esm2022/textbox/localization/custom-messages.component.mjs +1 -1
- package/esm2022/textbox/textbox-prefix.directive.mjs +9 -13
- package/esm2022/textbox/textbox-suffix.directive.mjs +10 -14
- package/esm2022/textbox/textbox.component.mjs +41 -112
- package/esm2022/textbox/textbox.directive.mjs +2 -2
- package/esm2022/textbox.module.mjs +7 -18
- package/fesm2022/progress-kendo-angular-inputs.mjs +1207 -1280
- package/formfield/error.component.d.ts +9 -6
- package/formfield/formfield.component.d.ts +24 -20
- package/formfield/hint.component.d.ts +8 -5
- package/formfield/models/message-align.d.ts +3 -1
- package/formfield/models/orientation.d.ts +3 -0
- package/formfield/models/show-options.d.ts +5 -7
- package/formfield.module.d.ts +9 -20
- package/index.d.ts +1 -0
- package/inputs.module.d.ts +9 -21
- package/maskedtextbox/maskedtextbox.component.d.ts +46 -88
- package/maskedtextbox.module.d.ts +9 -20
- package/numerictextbox/localization/custom-messages.component.d.ts +13 -1
- package/numerictextbox/localization/messages.d.ts +2 -2
- package/numerictextbox/numerictextbox.component.d.ts +57 -70
- package/numerictextbox.module.d.ts +9 -20
- package/otp.module.d.ts +32 -0
- package/otpinput/localization/custom-messages.component.d.ts +3 -1
- package/otpinput/models/otpinput-type.d.ts +2 -2
- package/otpinput/models/separator-icon.d.ts +8 -3
- package/otpinput/otpinput.component.d.ts +39 -42
- package/package.json +12 -12
- package/radiobutton/radiobutton.component.d.ts +15 -6
- package/radiobutton/radiobutton.directive.d.ts +6 -10
- package/radiobutton.module.d.ts +8 -18
- package/rangeslider/localization/custom-messages.component.d.ts +11 -1
- package/rangeslider/rangeslider-value.type.d.ts +2 -2
- package/rangeslider/rangeslider.component.d.ts +12 -16
- package/rangeslider.module.d.ts +7 -18
- package/rating/directives/rating-hovered-item.directive.d.ts +11 -3
- package/rating/directives/rating-item.directive.d.ts +10 -3
- package/rating/directives/rating-selected-item.directive.d.ts +12 -3
- package/rating/models/precision.d.ts +1 -2
- package/rating/models/selection.d.ts +1 -2
- package/rating/rating.component.d.ts +21 -18
- package/rating.module.d.ts +7 -18
- package/shared/input-separator.component.d.ts +10 -15
- package/shared/textarea.directive.d.ts +5 -6
- package/signature/events/close-event.d.ts +1 -1
- package/signature/localization/custom-messages.component.d.ts +1 -1
- package/signature/signature.component.d.ts +52 -51
- package/signature.module.d.ts +7 -18
- package/slider/localization/custom-messages.component.d.ts +1 -1
- package/slider/slider.component.d.ts +18 -19
- package/slider.module.d.ts +7 -18
- package/sliders-common/label-template.directive.d.ts +9 -19
- package/sliders-common/slider-base.d.ts +47 -29
- package/sliders-common/title-callback.d.ts +19 -3
- package/switch/events/blur-event.d.ts +1 -1
- package/switch/events/focus-event.d.ts +1 -1
- package/switch/localization/custom-messages.component.d.ts +1 -1
- package/switch/switch.component.d.ts +32 -43
- package/switch.module.d.ts +7 -18
- package/textarea/models/adornments-orientation.d.ts +3 -3
- package/textarea/models/flow.d.ts +3 -3
- package/textarea/models/resize.d.ts +6 -7
- package/textarea/textarea-prefix.component.d.ts +11 -13
- package/textarea/textarea-suffix.component.d.ts +11 -13
- package/textarea/textarea.component.d.ts +40 -103
- package/textarea.module.d.ts +7 -18
- package/textbox/localization/custom-messages.component.d.ts +1 -1
- package/textbox/textbox-prefix.directive.d.ts +9 -13
- package/textbox/textbox-suffix.directive.d.ts +10 -14
- package/textbox/textbox.component.d.ts +41 -112
- package/textbox/textbox.directive.d.ts +2 -2
- package/textbox.module.d.ts +7 -18
|
@@ -32,7 +32,17 @@ const DEFAULT_SIZE = 'medium';
|
|
|
32
32
|
const DEFAULT_ROUNDED = 'medium';
|
|
33
33
|
const DEFAULT_FILL_MODE = 'solid';
|
|
34
34
|
/**
|
|
35
|
-
* Represents the
|
|
35
|
+
* Represents the Kendo UI TextArea component for Angular.
|
|
36
|
+
*
|
|
37
|
+
* Use this component to let users enter and edit multi-line text.
|
|
38
|
+
*
|
|
39
|
+
* @example
|
|
40
|
+
* ```html
|
|
41
|
+
* <kendo-textarea [(ngModel)]="value" [rows]="5" [cols]="30"></kendo-textarea>
|
|
42
|
+
* ```
|
|
43
|
+
*
|
|
44
|
+
* @remarks
|
|
45
|
+
* Supported children components are: {@link TextAreaPrefixComponent}, {@link TextAreaSuffixComponent}.
|
|
36
46
|
*/
|
|
37
47
|
export class TextAreaComponent extends TextFieldsBase {
|
|
38
48
|
localizationService;
|
|
@@ -54,12 +64,7 @@ export class TextAreaComponent extends TextFieldsBase {
|
|
|
54
64
|
}
|
|
55
65
|
_flow = 'vertical';
|
|
56
66
|
/**
|
|
57
|
-
* Specifies the flow direction of the TextArea sections.
|
|
58
|
-
* their position in relation to the textarea element.
|
|
59
|
-
*
|
|
60
|
-
* The possible values are:
|
|
61
|
-
* * `vertical`(Default) —TextArea sections are placed from top to bottom.
|
|
62
|
-
* * `horizontal`—TextArea sections are placed from left to right in `ltr`, and from right to left in `rtl` mode.
|
|
67
|
+
* Specifies the flow direction of the TextArea sections. Use this property to set the position of adornments relative to the text area.
|
|
63
68
|
*/
|
|
64
69
|
set flow(flow) {
|
|
65
70
|
this._flow = flow;
|
|
@@ -74,7 +79,7 @@ export class TextAreaComponent extends TextFieldsBase {
|
|
|
74
79
|
return this._flow;
|
|
75
80
|
}
|
|
76
81
|
/**
|
|
77
|
-
* Sets the HTML attributes of the inner focusable input element.
|
|
82
|
+
* Sets the HTML attributes of the inner focusable input element. Some attributes are required for component functionality and cannot be changed.
|
|
78
83
|
*/
|
|
79
84
|
set inputAttributes(attributes) {
|
|
80
85
|
if (isObjectPresent(this.parsedAttributes)) {
|
|
@@ -90,12 +95,8 @@ export class TextAreaComponent extends TextFieldsBase {
|
|
|
90
95
|
return this._inputAttributes;
|
|
91
96
|
}
|
|
92
97
|
/**
|
|
93
|
-
* Specifies the orientation of the TextArea adornments.
|
|
94
|
-
* the adornments' position relative to themselves.
|
|
98
|
+
* Specifies the orientation of the TextArea adornments. Use this property to set the position of adornments relative to each other.
|
|
95
99
|
*
|
|
96
|
-
* The possible values are:
|
|
97
|
-
* * `horizontal`(Default) —TextArea adornments are placed from left to right in `ltr`, and from right to left in `rtl` mode.
|
|
98
|
-
* * `vertical`—TextArea adornments are placed from top to bottom.
|
|
99
100
|
*/
|
|
100
101
|
set adornmentsOrientation(orientation) {
|
|
101
102
|
this._adornmentsOrientation = orientation;
|
|
@@ -110,19 +111,20 @@ export class TextAreaComponent extends TextFieldsBase {
|
|
|
110
111
|
return this._adornmentsOrientation;
|
|
111
112
|
}
|
|
112
113
|
/**
|
|
113
|
-
*
|
|
114
|
+
* Sets the visible height of the text area in lines.
|
|
114
115
|
*/
|
|
115
116
|
rows;
|
|
116
117
|
/**
|
|
117
|
-
*
|
|
118
|
+
* Sets the visible width of the text area in average character width.
|
|
118
119
|
*/
|
|
119
120
|
cols;
|
|
120
121
|
/**
|
|
121
|
-
*
|
|
122
|
+
* Sets the maximum number of characters allowed in the text area.
|
|
122
123
|
*/
|
|
123
124
|
maxlength;
|
|
124
125
|
/**
|
|
125
|
-
*
|
|
126
|
+
* Sets the [`tabindex`](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex) of the component.
|
|
127
|
+
* @default 0
|
|
126
128
|
*/
|
|
127
129
|
tabindex = 0;
|
|
128
130
|
/**
|
|
@@ -135,26 +137,15 @@ export class TextAreaComponent extends TextFieldsBase {
|
|
|
135
137
|
return this.tabindex;
|
|
136
138
|
}
|
|
137
139
|
/**
|
|
138
|
-
*
|
|
140
|
+
* Sets the resize behavior of the TextArea.
|
|
139
141
|
*
|
|
140
|
-
* The possible values are:
|
|
141
|
-
* * `vertical`(Default)—The TextArea component can be resized only vertically.
|
|
142
|
-
* * `horizontal`—The TextArea component can be resized only horizontally.
|
|
143
|
-
* * `both`—The TextArea component can be resized in both (horizontal and vertical) directions.
|
|
144
|
-
* * `auto`—Specifies whether the TextArea component will adjust its height automatically, based on the content.
|
|
145
|
-
* * `none`—The TextArea cannot be resized.
|
|
146
142
|
*
|
|
143
|
+
* @default 'vertical'
|
|
147
144
|
*/
|
|
148
145
|
resizable = 'vertical';
|
|
149
146
|
/**
|
|
150
|
-
*
|
|
151
|
-
*
|
|
152
|
-
*
|
|
153
|
-
* The possible values are:
|
|
154
|
-
* * `small`
|
|
155
|
-
* * `medium` (default)
|
|
156
|
-
* * `large`
|
|
157
|
-
* * `none`
|
|
147
|
+
* Sets the size of the TextArea. Controls the padding of the text area element ([see example]({% slug appearance_textarea %}#toc-size)).
|
|
148
|
+
* @default 'medium'
|
|
158
149
|
*/
|
|
159
150
|
set size(size) {
|
|
160
151
|
const newSize = size ? size : DEFAULT_SIZE;
|
|
@@ -165,14 +156,8 @@ export class TextAreaComponent extends TextFieldsBase {
|
|
|
165
156
|
return this._size;
|
|
166
157
|
}
|
|
167
158
|
/**
|
|
168
|
-
*
|
|
169
|
-
*
|
|
170
|
-
*
|
|
171
|
-
* The possible values are:
|
|
172
|
-
* * `small`
|
|
173
|
-
* * `medium` (default)
|
|
174
|
-
* * `large`
|
|
175
|
-
* * `none`
|
|
159
|
+
* Sets the border radius of the TextArea ([see example](slug:appearance_textarea#toc-roundness)).
|
|
160
|
+
* @default 'medium'
|
|
176
161
|
*/
|
|
177
162
|
set rounded(rounded) {
|
|
178
163
|
const newRounded = rounded ? rounded : DEFAULT_ROUNDED;
|
|
@@ -183,14 +168,8 @@ export class TextAreaComponent extends TextFieldsBase {
|
|
|
183
168
|
return this._rounded;
|
|
184
169
|
}
|
|
185
170
|
/**
|
|
186
|
-
*
|
|
187
|
-
*
|
|
188
|
-
*
|
|
189
|
-
* The possible values are:
|
|
190
|
-
* * `flat`
|
|
191
|
-
* * `solid` (default)
|
|
192
|
-
* * `outline`
|
|
193
|
-
* * `none`
|
|
171
|
+
* Sets the background and border styles of the TextArea ([see example](slug:appearance_textarea#toc-fill-mode)).
|
|
172
|
+
* @default 'solid'
|
|
194
173
|
*/
|
|
195
174
|
set fillMode(fillMode) {
|
|
196
175
|
const newFillMode = fillMode ? fillMode : DEFAULT_FILL_MODE;
|
|
@@ -201,65 +180,35 @@ export class TextAreaComponent extends TextFieldsBase {
|
|
|
201
180
|
return this._fillMode;
|
|
202
181
|
}
|
|
203
182
|
/**
|
|
204
|
-
*
|
|
205
|
-
*
|
|
183
|
+
* Shows the prefix separator in the TextArea.
|
|
184
|
+
* The separator is rendered only if a prefix template is declared.
|
|
206
185
|
*
|
|
207
186
|
* @default false
|
|
208
187
|
*/
|
|
209
188
|
showPrefixSeparator = false;
|
|
210
189
|
/**
|
|
211
|
-
*
|
|
212
|
-
*
|
|
190
|
+
* Shows the suffix separator in the TextArea.
|
|
191
|
+
* The separator is rendered only if a suffix template is declared.
|
|
213
192
|
*
|
|
214
193
|
* @default false
|
|
215
194
|
*/
|
|
216
195
|
showSuffixSeparator = false;
|
|
217
196
|
/**
|
|
218
|
-
* Fires
|
|
197
|
+
* Fires when the TextArea is focused.
|
|
219
198
|
*
|
|
220
|
-
*
|
|
221
|
-
*
|
|
222
|
-
* @example
|
|
223
|
-
* ```ts
|
|
224
|
-
* _@Component({
|
|
225
|
-
* selector: 'my-app',
|
|
226
|
-
* template: `
|
|
227
|
-
* <kendo-textarea (focus)="handleFocus()"></kendo-textarea>
|
|
228
|
-
* `
|
|
229
|
-
* })
|
|
230
|
-
* class AppComponent {
|
|
231
|
-
* public handleFocus(): void {
|
|
232
|
-
* console.log('Component is focused.');
|
|
233
|
-
* }
|
|
234
|
-
* }
|
|
235
|
-
* ```
|
|
199
|
+
* Use the `onFocus` property to subscribe to this event.
|
|
236
200
|
*/
|
|
237
201
|
onFocus = new EventEmitter();
|
|
238
202
|
/**
|
|
239
|
-
* Fires
|
|
240
|
-
*
|
|
241
|
-
* > To wire the event programmatically, use the `onBlur` property.
|
|
203
|
+
* Fires when the TextArea gets blurred.
|
|
242
204
|
*
|
|
243
|
-
*
|
|
244
|
-
* ```ts
|
|
245
|
-
* _@Component({
|
|
246
|
-
* selector: 'my-app',
|
|
247
|
-
* template: `
|
|
248
|
-
* <kendo-textarea (blur)="handleBlur()"></kendo-textarea>
|
|
249
|
-
* `
|
|
250
|
-
* })
|
|
251
|
-
* class AppComponent {
|
|
252
|
-
* public handleBlur(): void {
|
|
253
|
-
* console.log('Component is blurred');
|
|
254
|
-
* }
|
|
255
|
-
* }
|
|
256
|
-
* ```
|
|
205
|
+
* Use the `onBlur` property to subscribe to this event.
|
|
257
206
|
*/
|
|
258
207
|
onBlur = new EventEmitter();
|
|
259
208
|
/**
|
|
260
|
-
* Fires
|
|
261
|
-
*
|
|
262
|
-
*
|
|
209
|
+
* Fires when the value changes or the TextArea is blurred ([see example](slug:events_textarea)).
|
|
210
|
+
*
|
|
211
|
+
* The event does not fire when the value changes programmatically or through form control binding.
|
|
263
212
|
*/
|
|
264
213
|
valueChange = new EventEmitter();
|
|
265
214
|
initialHeight;
|
|
@@ -474,19 +423,7 @@ export class TextAreaComponent extends TextFieldsBase {
|
|
|
474
423
|
}
|
|
475
424
|
};
|
|
476
425
|
/**
|
|
477
|
-
* Focuses the TextArea
|
|
478
|
-
*
|
|
479
|
-
* @example
|
|
480
|
-
* ```ts
|
|
481
|
-
* _@Component({
|
|
482
|
-
* selector: 'my-app',
|
|
483
|
-
* template: `
|
|
484
|
-
* <button (click)="textarea.focus()">Focus the textarea</button>
|
|
485
|
-
* <kendo-textarea #textarea></kendo-textarea>
|
|
486
|
-
* `
|
|
487
|
-
* })
|
|
488
|
-
* class AppComponent { }
|
|
489
|
-
* ```
|
|
426
|
+
* Focuses the TextArea.
|
|
490
427
|
*/
|
|
491
428
|
focus() {
|
|
492
429
|
if (!this.input) {
|
|
@@ -498,7 +435,7 @@ export class TextAreaComponent extends TextFieldsBase {
|
|
|
498
435
|
this.focusChangedProgrammatically = false;
|
|
499
436
|
}
|
|
500
437
|
/**
|
|
501
|
-
* Blurs the TextArea
|
|
438
|
+
* Blurs the TextArea.
|
|
502
439
|
*/
|
|
503
440
|
blur() {
|
|
504
441
|
this.focusChangedProgrammatically = true;
|
|
@@ -13,34 +13,23 @@ import * as i4 from "./textarea/textarea-suffix.component";
|
|
|
13
13
|
import * as i5 from "@progress/kendo-angular-common";
|
|
14
14
|
//IMPORTANT: NgModule export kept for backwards compatibility
|
|
15
15
|
/**
|
|
16
|
-
*
|
|
17
|
-
*
|
|
16
|
+
* Defines the [`NgModule`](link:site.data.urls.angular['ngmoduleapi']) for the TextArea component.
|
|
17
|
+
*
|
|
18
|
+
* Use this module to add the TextArea component to your NgModule-based Angular application.
|
|
18
19
|
*
|
|
19
20
|
* @example
|
|
20
21
|
*
|
|
21
|
-
* ```
|
|
22
|
-
* // Import the TextArea module
|
|
22
|
+
* ```typescript
|
|
23
23
|
* import { TextAreaModule } from '@progress/kendo-angular-inputs';
|
|
24
|
-
*
|
|
25
|
-
* // The browser platform with a compiler
|
|
26
|
-
* import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
|
27
|
-
*
|
|
28
24
|
* import { NgModule } from '@angular/core';
|
|
29
|
-
*
|
|
30
|
-
* // Import the app component
|
|
31
25
|
* import { AppComponent } from './app.component';
|
|
32
26
|
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
* imports: [BrowserModule, TextAreaModule], // import TextArea module
|
|
27
|
+
* @NgModule({
|
|
28
|
+
* declarations: [AppComponent],
|
|
29
|
+
* imports: [BrowserModule, TextAreaModule],
|
|
37
30
|
* bootstrap: [AppComponent]
|
|
38
31
|
* })
|
|
39
32
|
* export class AppModule {}
|
|
40
|
-
*
|
|
41
|
-
* // Compile and launch the module
|
|
42
|
-
* platformBrowserDynamic().bootstrapModule(AppModule);
|
|
43
|
-
*
|
|
44
33
|
* ```
|
|
45
34
|
*/
|
|
46
35
|
export class TextAreaModule {
|
|
@@ -8,7 +8,7 @@ import { TextBoxMessages } from './messages';
|
|
|
8
8
|
import * as i0 from "@angular/core";
|
|
9
9
|
import * as i1 from "@progress/kendo-angular-l10n";
|
|
10
10
|
/**
|
|
11
|
-
*
|
|
11
|
+
* Overrides the default messages of the TextBox component.
|
|
12
12
|
*/
|
|
13
13
|
export class TextBoxCustomMessagesComponent extends TextBoxMessages {
|
|
14
14
|
service;
|
|
@@ -5,26 +5,22 @@
|
|
|
5
5
|
import { Directive, Input, Optional, TemplateRef } from '@angular/core';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
8
|
+
* Represents a template for prefix adornments in the TextBox component ([see examples](slug:adornments_textbox#toc-prefix-adornments)).
|
|
9
|
+
*
|
|
9
10
|
* @example
|
|
10
|
-
* ```
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
* <ng-template kendoTextBoxPrefixTemplate>
|
|
16
|
-
* <button kendoButton look="clear" icon="image"></button>
|
|
17
|
-
* </ng-template>
|
|
11
|
+
* ```html
|
|
12
|
+
* <kendo-textbox>
|
|
13
|
+
* <ng-template kendoTextBoxPrefixTemplate>
|
|
14
|
+
* <button kendoButton icon="image"></button>
|
|
15
|
+
* </ng-template>
|
|
18
16
|
* </kendo-textbox>
|
|
19
|
-
|
|
20
|
-
* })
|
|
21
|
-
* class AppComponent {}
|
|
17
|
+
|
|
22
18
|
* ```
|
|
23
19
|
*/
|
|
24
20
|
export class TextBoxPrefixTemplateDirective {
|
|
25
21
|
templateRef;
|
|
26
22
|
/**
|
|
27
|
-
*
|
|
23
|
+
* Determines whether a separator is shown after the prefix template.
|
|
28
24
|
*
|
|
29
25
|
* @default false
|
|
30
26
|
*/
|
|
@@ -5,25 +5,21 @@
|
|
|
5
5
|
import { Directive, Input, Optional, TemplateRef } from '@angular/core';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
* </kendo-textbox>
|
|
18
|
-
* `
|
|
19
|
-
* })
|
|
20
|
-
* class AppComponent {}
|
|
8
|
+
* Represents a template for suffix adornments in the TextBox component ([see examples](slug:adornments_textbox#toc-suffix-adornments)).
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```html
|
|
12
|
+
* <kendo-textbox>
|
|
13
|
+
* <ng-template kendoTextBoxSuffixTemplate>
|
|
14
|
+
* <button kendoButton icon="image"></button>
|
|
15
|
+
* </ng-template>
|
|
16
|
+
* </kendo-textbox>
|
|
21
17
|
* ```
|
|
22
18
|
*/
|
|
23
19
|
export class TextBoxSuffixTemplateDirective {
|
|
24
20
|
templateRef;
|
|
25
21
|
/**
|
|
26
|
-
*
|
|
22
|
+
* Determines whether a separator is shown before the suffix template.
|
|
27
23
|
*
|
|
28
24
|
* @default false
|
|
29
25
|
*/
|
|
@@ -27,6 +27,18 @@ const DEFAULT_SIZE = 'medium';
|
|
|
27
27
|
const DEFAULT_ROUNDED = 'medium';
|
|
28
28
|
const DEFAULT_FILL_MODE = 'solid';
|
|
29
29
|
const iconsMap = { checkIcon, exclamationCircleIcon, xIcon };
|
|
30
|
+
/**
|
|
31
|
+
* Represents the Kendo UI TextBox component for Angular.
|
|
32
|
+
* Use this component to create styled and feature-rich text input fields.
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* ```html
|
|
36
|
+
* <kendo-textbox placeholder="Enter text"></kendo-textbox>
|
|
37
|
+
* ```
|
|
38
|
+
*
|
|
39
|
+
* @remarks
|
|
40
|
+
* Supported children components are: {@link TextBoxCustomMessagesComponent}.
|
|
41
|
+
*/
|
|
30
42
|
export class TextBoxComponent {
|
|
31
43
|
localizationService;
|
|
32
44
|
ngZone;
|
|
@@ -44,23 +56,21 @@ export class TextBoxComponent {
|
|
|
44
56
|
title;
|
|
45
57
|
/**
|
|
46
58
|
* Sets the `type` attribute of the `input` element of the TextBox.
|
|
59
|
+
* @default 'text'
|
|
47
60
|
*/
|
|
48
61
|
type = 'text';
|
|
49
62
|
/**
|
|
50
|
-
* Sets the disabled state of the TextBox. To
|
|
51
|
-
*
|
|
63
|
+
* Sets the disabled state of the TextBox. To disable the component in reactive forms, see [Forms Support](slug:formssupport_textbox#toc-managing-the-textbox-disabled-state-in-reactive-forms).
|
|
52
64
|
* @default false
|
|
53
65
|
*/
|
|
54
66
|
disabled = false;
|
|
55
67
|
/**
|
|
56
68
|
* Sets the read-only state of the component.
|
|
57
|
-
*
|
|
58
69
|
* @default false
|
|
59
70
|
*/
|
|
60
71
|
readonly = false;
|
|
61
72
|
/**
|
|
62
73
|
* Specifies the `tabindex` of the TextBox.
|
|
63
|
-
*
|
|
64
74
|
* @default 0
|
|
65
75
|
*/
|
|
66
76
|
tabindex = 0;
|
|
@@ -69,74 +79,54 @@ export class TextBoxComponent {
|
|
|
69
79
|
*/
|
|
70
80
|
value = null;
|
|
71
81
|
/**
|
|
72
|
-
*
|
|
73
|
-
*
|
|
82
|
+
* Highlights the whole value when you click the TextBox.
|
|
74
83
|
* @default false
|
|
75
84
|
*/
|
|
76
85
|
selectOnFocus = false;
|
|
77
86
|
/**
|
|
78
|
-
* Specifies when the Success icon
|
|
79
|
-
*
|
|
80
|
-
* The possible values are:
|
|
81
|
-
*
|
|
82
|
-
* `boolean`—The Success icon is displayed, if the condition given by the developer is met.
|
|
83
|
-
*
|
|
84
|
-
* `initial`—The Success icon will be displayed when the component state is neither `invalid` nor `touched` or `dirty`.
|
|
87
|
+
* Specifies when to show the Success icon ([see example]({% slug validation_textbox %})).
|
|
85
88
|
*
|
|
86
89
|
* @default false
|
|
87
90
|
*/
|
|
88
91
|
showSuccessIcon = false;
|
|
89
92
|
/**
|
|
90
|
-
* Specifies when the Error icon
|
|
91
|
-
*
|
|
92
|
-
* The possible values are:
|
|
93
|
-
*
|
|
94
|
-
* * `initial`—The Error icon will be displayed when the component state is
|
|
95
|
-
* `invalid` and `touched` or `dirty`.
|
|
96
|
-
* * `boolean`—The Error icon is displayed, if the condition given by the developer is met.
|
|
93
|
+
* Specifies when to show the Error icon ([see example]({% slug validation_textbox %})).
|
|
97
94
|
*
|
|
98
95
|
* @default false
|
|
99
96
|
*/
|
|
100
97
|
showErrorIcon = false;
|
|
101
98
|
/**
|
|
102
|
-
*
|
|
103
|
-
*
|
|
99
|
+
* Shows a **Clear** button in the TextBox.
|
|
104
100
|
* @default false
|
|
105
101
|
*/
|
|
106
102
|
clearButton = false;
|
|
107
103
|
/**
|
|
108
|
-
* Sets a custom icon
|
|
104
|
+
* Sets a custom icon for valid user input.
|
|
109
105
|
*/
|
|
110
106
|
successIcon;
|
|
111
107
|
/**
|
|
112
|
-
* Sets a custom SVG icon
|
|
108
|
+
* Sets a custom SVG icon for valid user input.
|
|
113
109
|
*/
|
|
114
110
|
successSvgIcon;
|
|
115
111
|
/**
|
|
116
|
-
* Sets a custom icon
|
|
112
|
+
* Sets a custom icon for invalid user input.
|
|
117
113
|
*/
|
|
118
114
|
errorIcon;
|
|
119
115
|
/**
|
|
120
|
-
* Sets a custom SVG icon
|
|
116
|
+
* Sets a custom SVG icon for invalid user input.
|
|
121
117
|
*/
|
|
122
118
|
errorSvgIcon;
|
|
123
119
|
/**
|
|
124
|
-
* Sets a custom icon
|
|
120
|
+
* Sets a custom icon for the **Clear** button.
|
|
125
121
|
*/
|
|
126
122
|
clearButtonIcon;
|
|
127
123
|
/**
|
|
128
|
-
* Sets a custom SVG icon
|
|
124
|
+
* Sets a custom SVG icon for the **Clear** button.
|
|
129
125
|
*/
|
|
130
126
|
clearButtonSvgIcon;
|
|
131
127
|
/**
|
|
132
|
-
*
|
|
133
|
-
*
|
|
134
|
-
*
|
|
135
|
-
* The possible values are:
|
|
136
|
-
* * `small`
|
|
137
|
-
* * `medium` (default)
|
|
138
|
-
* * `large`
|
|
139
|
-
* * `none`
|
|
128
|
+
* Sets the padding of the TextBox internal input element ([see example]({% slug appearance_textbox %}#toc-size)).
|
|
129
|
+
* @default 'medium'
|
|
140
130
|
*/
|
|
141
131
|
set size(size) {
|
|
142
132
|
const newSize = size ? size : DEFAULT_SIZE;
|
|
@@ -147,15 +137,8 @@ export class TextBoxComponent {
|
|
|
147
137
|
return this._size;
|
|
148
138
|
}
|
|
149
139
|
/**
|
|
150
|
-
*
|
|
151
|
-
*
|
|
152
|
-
*
|
|
153
|
-
* The possible values are:
|
|
154
|
-
* * `small`
|
|
155
|
-
* * `medium` (default)
|
|
156
|
-
* * `large`
|
|
157
|
-
* * `full`
|
|
158
|
-
* * `none`
|
|
140
|
+
* Sets the border radius of the TextBox ([see example](slug:appearance_textbox#toc-roundness)).
|
|
141
|
+
* @default 'medium'
|
|
159
142
|
*/
|
|
160
143
|
set rounded(rounded) {
|
|
161
144
|
const newRounded = rounded ? rounded : DEFAULT_ROUNDED;
|
|
@@ -166,14 +149,8 @@ export class TextBoxComponent {
|
|
|
166
149
|
return this._rounded;
|
|
167
150
|
}
|
|
168
151
|
/**
|
|
169
|
-
*
|
|
170
|
-
*
|
|
171
|
-
*
|
|
172
|
-
* The possible values are:
|
|
173
|
-
* * `flat`
|
|
174
|
-
* * `solid` (default)
|
|
175
|
-
* * `outline`
|
|
176
|
-
* * `none`
|
|
152
|
+
* Sets the background and border styles of the TextBox ([see example]({% slug appearance_textbox %}#toc-fill-mode)).
|
|
153
|
+
* @default 'solid'
|
|
177
154
|
*/
|
|
178
155
|
set fillMode(fillMode) {
|
|
179
156
|
const newFillMode = fillMode ? fillMode : DEFAULT_FILL_MODE;
|
|
@@ -193,15 +170,15 @@ export class TextBoxComponent {
|
|
|
193
170
|
return this.tabindex;
|
|
194
171
|
}
|
|
195
172
|
/**
|
|
196
|
-
*
|
|
173
|
+
* Sets the placeholder text displayed when the component is empty.
|
|
197
174
|
*/
|
|
198
175
|
placeholder;
|
|
199
176
|
/**
|
|
200
|
-
*
|
|
177
|
+
* Sets the maximum length of the TextBox value.
|
|
201
178
|
*/
|
|
202
179
|
maxlength;
|
|
203
180
|
/**
|
|
204
|
-
* Sets the HTML attributes of the inner focusable input element.
|
|
181
|
+
* Sets the HTML attributes of the inner focusable input element. You cannot change attributes that are essential for component functionality.
|
|
205
182
|
*/
|
|
206
183
|
set inputAttributes(attributes) {
|
|
207
184
|
if (isObjectPresent(this.parsedAttributes)) {
|
|
@@ -217,66 +194,30 @@ export class TextBoxComponent {
|
|
|
217
194
|
return this._inputAttributes;
|
|
218
195
|
}
|
|
219
196
|
/**
|
|
220
|
-
* Fires
|
|
221
|
-
*
|
|
222
|
-
* ([see example](slug:events_textbox)).
|
|
223
|
-
* When the value of the component is programmatically changed to `ngModel` or `formControl`
|
|
224
|
-
* through its API or form binding, the `valueChange` event is not triggered because it
|
|
225
|
-
* might cause a mix-up with the built-in `valueChange` mechanisms of the `ngModel` or `formControl` bindings.
|
|
197
|
+
* Fires when the value changes—when the component is blurred or the value is cleared through the **Clear** button ([see example](slug:events_textbox)).
|
|
198
|
+
* Does not fire when you change the value programmatically through `ngModel` or `formControl`.
|
|
226
199
|
*/
|
|
227
200
|
valueChange = new EventEmitter();
|
|
228
201
|
/**
|
|
229
|
-
* Fires
|
|
202
|
+
* Fires when the user focuses the `input` element.
|
|
230
203
|
*/
|
|
231
204
|
inputFocus = new EventEmitter();
|
|
232
205
|
/**
|
|
233
|
-
* Fires
|
|
206
|
+
* Fires when the `input` element is blurred.
|
|
234
207
|
*/
|
|
235
208
|
inputBlur = new EventEmitter();
|
|
236
209
|
/**
|
|
237
|
-
* Fires
|
|
238
|
-
*
|
|
239
|
-
* > To wire the event programmatically, use the `onFocus` property.
|
|
210
|
+
* Fires when the user focuses the TextBox component.
|
|
240
211
|
*
|
|
241
|
-
* @example
|
|
242
|
-
* ```ts-no-run
|
|
243
|
-
* _@Component({
|
|
244
|
-
* selector: 'my-app',
|
|
245
|
-
* template: `
|
|
246
|
-
* <kendo-textbox (focus)="handleFocus()"></kendo-textbox>
|
|
247
|
-
* `
|
|
248
|
-
* })
|
|
249
|
-
* class AppComponent {
|
|
250
|
-
* public handleFocus(): void {
|
|
251
|
-
* console.log('Component is focused.');
|
|
252
|
-
* }
|
|
253
|
-
* }
|
|
254
|
-
* ```
|
|
255
212
|
*/
|
|
256
213
|
onFocus = new EventEmitter();
|
|
257
214
|
/**
|
|
258
|
-
* Fires
|
|
215
|
+
* Fires when the TextBox component is blurred.
|
|
259
216
|
*
|
|
260
|
-
* > To wire the event programmatically, use the `onBlur` property.
|
|
261
|
-
*
|
|
262
|
-
* @example
|
|
263
|
-
* ```ts-no-run
|
|
264
|
-
* _@Component({
|
|
265
|
-
* selector: 'my-app',
|
|
266
|
-
* template: `
|
|
267
|
-
* <kendo-textbox (blur)="handleBlur()"></kendo-textbox>
|
|
268
|
-
* `
|
|
269
|
-
* })
|
|
270
|
-
* class AppComponent {
|
|
271
|
-
* public handleBlur(): void {
|
|
272
|
-
* console.log('Component is blurred');
|
|
273
|
-
* }
|
|
274
|
-
* }
|
|
275
|
-
* ```
|
|
276
217
|
*/
|
|
277
218
|
onBlur = new EventEmitter();
|
|
278
219
|
/**
|
|
279
|
-
*
|
|
220
|
+
* Gets a reference to the visible `input` element of the TextBox.
|
|
280
221
|
*/
|
|
281
222
|
input;
|
|
282
223
|
/**
|
|
@@ -385,18 +326,6 @@ export class TextBoxComponent {
|
|
|
385
326
|
}
|
|
386
327
|
/**
|
|
387
328
|
* Focuses the TextBox.
|
|
388
|
-
*
|
|
389
|
-
* @example
|
|
390
|
-
* ```ts-no-run
|
|
391
|
-
* _@Component({
|
|
392
|
-
* selector: 'my-app',
|
|
393
|
-
* template: `
|
|
394
|
-
* <button (click)="input.focus()">Focus the input</button>
|
|
395
|
-
* <kendo-textbox #input></kendo-textbox>
|
|
396
|
-
* `
|
|
397
|
-
* })
|
|
398
|
-
* class AppComponent { }
|
|
399
|
-
* ```
|
|
400
329
|
*/
|
|
401
330
|
focus() {
|
|
402
331
|
if (!this.input) {
|
|
@@ -408,7 +337,7 @@ export class TextBoxComponent {
|
|
|
408
337
|
this.focusChangedProgrammatically = false;
|
|
409
338
|
}
|
|
410
339
|
/**
|
|
411
|
-
*
|
|
340
|
+
* Removes focus from the TextBox.
|
|
412
341
|
*/
|
|
413
342
|
blur() {
|
|
414
343
|
this.focusChangedProgrammatically = true;
|
|
@@ -7,10 +7,10 @@ import { KendoInput } from '@progress/kendo-angular-common';
|
|
|
7
7
|
import * as i0 from "@angular/core";
|
|
8
8
|
/**
|
|
9
9
|
* Represents the [Kendo UI TextBox directive]({% slug overview_textbox %}) for the Inputs components for Angular.
|
|
10
|
-
*
|
|
10
|
+
* Use this directive to style the textbox of any `input` element.
|
|
11
11
|
*
|
|
12
12
|
* @example
|
|
13
|
-
* ```
|
|
13
|
+
* ```html
|
|
14
14
|
* <input kendoTextBox />
|
|
15
15
|
* <input kendoTextBox type="email" />
|
|
16
16
|
* <input kendoTextBox type="password" />
|