@progress/kendo-angular-inputs 13.2.1-develop.11 → 13.2.1-develop.13
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/LICENSE.md +11 -0
- package/NOTICE.txt +654 -0
- package/README.md +184 -0
- package/checkbox/checkbox.directive.d.ts +52 -0
- package/checkbox.module.d.ts +43 -0
- package/colorpicker/color-contrast-svg.component.d.ts +29 -0
- package/colorpicker/color-gradient-numeric-label.directive.d.ts +20 -0
- package/colorpicker/color-gradient.component.d.ts +281 -0
- package/colorpicker/color-input.component.d.ts +95 -0
- package/colorpicker/color-palette.component.d.ts +221 -0
- package/colorpicker/colorpicker.component.d.ts +383 -0
- package/colorpicker/constants.d.ts +41 -0
- package/colorpicker/contrast-validation.component.d.ts +24 -0
- package/colorpicker/contrast.component.d.ts +25 -0
- package/colorpicker/events/active-color-click-event.d.ts +53 -0
- package/colorpicker/events/cancel-event.d.ts +15 -0
- package/colorpicker/events/close-event.d.ts +10 -0
- package/colorpicker/events/kendo-drag-event.d.ts +21 -0
- package/colorpicker/events/open-event.d.ts +10 -0
- package/colorpicker/events.d.ts +8 -0
- package/colorpicker/flatcolorpicker-actions.component.d.ts +24 -0
- package/colorpicker/flatcolorpicker-header.component.d.ts +43 -0
- package/colorpicker/flatcolorpicker.component.d.ts +267 -0
- package/colorpicker/focus-on-dom-ready.directive.d.ts +18 -0
- package/colorpicker/localization/colorgradient-localization.service.d.ts +17 -0
- package/colorpicker/localization/colorpalette-localization.service.d.ts +17 -0
- package/colorpicker/localization/colorpicker-localization.service.d.ts +14 -0
- package/colorpicker/localization/custom-messages.component.d.ts +17 -0
- package/colorpicker/localization/flatcolorpicker-localization.service.d.ts +17 -0
- package/colorpicker/localization/localized-colorpicker-messages.directive.d.ts +16 -0
- package/colorpicker/localization/messages.d.ts +121 -0
- package/colorpicker/models/actions-layout.d.ts +8 -0
- package/colorpicker/models/colorpicker-view.d.ts +8 -0
- package/colorpicker/models/gradient-settings.d.ts +35 -0
- package/colorpicker/models/hsva.d.ts +13 -0
- package/colorpicker/models/output-format.d.ts +8 -0
- package/colorpicker/models/palette-presets.d.ts +61 -0
- package/colorpicker/models/palette-settings.d.ts +33 -0
- package/colorpicker/models/popup-settings.d.ts +18 -0
- package/colorpicker/models/rgb.d.ts +12 -0
- package/colorpicker/models/rgba.d.ts +13 -0
- package/colorpicker/models/table-cell.d.ts +11 -0
- package/colorpicker/models/tile-size.d.ts +11 -0
- package/colorpicker/models.d.ts +16 -0
- package/colorpicker/services/color-palette.service.d.ts +19 -0
- package/colorpicker/services/flatcolorpicker.service.d.ts +15 -0
- package/colorpicker/utils/color-parser.d.ts +77 -0
- package/colorpicker/utils/contrast-curve.d.ts +37 -0
- package/colorpicker/utils.d.ts +6 -0
- package/colorpicker.module.d.ts +35 -0
- package/common/dom-utils.d.ts +25 -0
- package/common/math.d.ts +36 -0
- package/common/models/fillmode.d.ts +9 -0
- package/common/models/rounded.d.ts +14 -0
- package/common/models/size.d.ts +9 -0
- package/common/models/styling-classes.d.ts +11 -0
- package/common/models.d.ts +8 -0
- package/common/utils.d.ts +56 -0
- package/esm2020/checkbox/checkbox.directive.mjs +94 -0
- package/esm2020/checkbox.module.mjs +52 -0
- package/esm2020/colorpicker/color-contrast-svg.component.mjs +97 -0
- package/esm2020/colorpicker/color-gradient-numeric-label.directive.mjs +31 -0
- package/esm2020/colorpicker/color-gradient.component.mjs +1003 -0
- package/esm2020/colorpicker/color-input.component.mjs +433 -0
- package/esm2020/colorpicker/color-palette.component.mjs +553 -0
- package/esm2020/colorpicker/colorpicker.component.mjs +1086 -0
- package/esm2020/colorpicker/constants.mjs +40 -0
- package/esm2020/colorpicker/contrast-validation.component.mjs +72 -0
- package/esm2020/colorpicker/contrast.component.mjs +100 -0
- package/esm2020/colorpicker/events/active-color-click-event.mjs +58 -0
- package/esm2020/colorpicker/events/cancel-event.mjs +14 -0
- package/esm2020/colorpicker/events/close-event.mjs +10 -0
- package/esm2020/colorpicker/events/kendo-drag-event.mjs +5 -0
- package/esm2020/colorpicker/events/open-event.mjs +10 -0
- package/esm2020/colorpicker/events.mjs +8 -0
- package/esm2020/colorpicker/flatcolorpicker-actions.component.mjs +93 -0
- package/esm2020/colorpicker/flatcolorpicker-header.component.mjs +217 -0
- package/esm2020/colorpicker/flatcolorpicker.component.mjs +829 -0
- package/esm2020/colorpicker/focus-on-dom-ready.directive.mjs +29 -0
- package/esm2020/colorpicker/localization/colorgradient-localization.service.mjs +45 -0
- package/esm2020/colorpicker/localization/colorpalette-localization.service.mjs +45 -0
- package/esm2020/colorpicker/localization/colorpicker-localization.service.mjs +31 -0
- package/esm2020/colorpicker/localization/custom-messages.component.mjs +41 -0
- package/esm2020/colorpicker/localization/flatcolorpicker-localization.service.mjs +45 -0
- package/esm2020/colorpicker/localization/localized-colorpicker-messages.directive.mjs +37 -0
- package/esm2020/colorpicker/localization/messages.mjs +75 -0
- package/esm2020/colorpicker/models/actions-layout.mjs +5 -0
- package/esm2020/colorpicker/models/colorpicker-view.mjs +5 -0
- package/esm2020/colorpicker/models/gradient-settings.mjs +5 -0
- package/esm2020/colorpicker/models/hsva.mjs +5 -0
- package/esm2020/colorpicker/models/output-format.mjs +5 -0
- package/esm2020/colorpicker/models/palette-presets.mjs +62 -0
- package/esm2020/colorpicker/models/palette-settings.mjs +5 -0
- package/esm2020/colorpicker/models/popup-settings.mjs +5 -0
- package/esm2020/colorpicker/models/rgb.mjs +5 -0
- package/esm2020/colorpicker/models/rgba.mjs +5 -0
- package/esm2020/colorpicker/models/table-cell.mjs +5 -0
- package/esm2020/colorpicker/models/tile-size.mjs +6 -0
- package/esm2020/colorpicker/models.mjs +16 -0
- package/esm2020/colorpicker/services/color-palette.service.mjs +67 -0
- package/esm2020/colorpicker/services/flatcolorpicker.service.mjs +39 -0
- package/esm2020/colorpicker/utils/color-parser.mjs +164 -0
- package/esm2020/colorpicker/utils/contrast-curve.mjs +85 -0
- package/esm2020/colorpicker/utils.mjs +6 -0
- package/esm2020/colorpicker.module.mjs +104 -0
- package/esm2020/common/dom-utils.mjs +36 -0
- package/esm2020/common/math.mjs +65 -0
- package/esm2020/common/models/fillmode.mjs +5 -0
- package/esm2020/common/models/rounded.mjs +5 -0
- package/esm2020/common/models/size.mjs +5 -0
- package/esm2020/common/models/styling-classes.mjs +5 -0
- package/esm2020/common/models.mjs +8 -0
- package/esm2020/common/utils.mjs +81 -0
- package/esm2020/formfield/error.component.mjs +68 -0
- package/esm2020/formfield/formfield.component.mjs +284 -0
- package/esm2020/formfield/hint.component.mjs +63 -0
- package/esm2020/formfield/models/message-align.mjs +5 -0
- package/esm2020/formfield/models/orientation.mjs +5 -0
- package/esm2020/formfield/models/show-options.mjs +5 -0
- package/esm2020/formfield.module.mjs +54 -0
- package/esm2020/index.mjs +66 -0
- package/esm2020/inputs.module.mjs +98 -0
- package/esm2020/maskedtextbox/maskedtextbox.component.mjs +711 -0
- package/esm2020/maskedtextbox/masking.service.mjs +191 -0
- package/esm2020/maskedtextbox/parsing/combinators.mjs +28 -0
- package/esm2020/maskedtextbox/parsing/parsers.mjs +147 -0
- package/esm2020/maskedtextbox/parsing/result.mjs +41 -0
- package/esm2020/maskedtextbox/parsing/stream.mjs +41 -0
- package/esm2020/maskedtextbox.module.mjs +53 -0
- package/esm2020/numerictextbox/arrow-direction.mjs +13 -0
- package/esm2020/numerictextbox/constants.mjs +28 -0
- package/esm2020/numerictextbox/localization/custom-messages.component.mjs +41 -0
- package/esm2020/numerictextbox/localization/localized-numerictextbox-messages.directive.mjs +37 -0
- package/esm2020/numerictextbox/localization/messages.mjs +25 -0
- package/esm2020/numerictextbox/numerictextbox.component.mjs +1105 -0
- package/esm2020/numerictextbox/utils.mjs +92 -0
- package/esm2020/numerictextbox.module.mjs +66 -0
- package/esm2020/package-metadata.mjs +15 -0
- package/esm2020/progress-kendo-angular-inputs.mjs +8 -0
- package/esm2020/radiobutton/radiobutton.directive.mjs +76 -0
- package/esm2020/radiobutton.module.mjs +52 -0
- package/esm2020/rangeslider/localization/custom-messages.component.mjs +41 -0
- package/esm2020/rangeslider/localization/localized-rangeslider-messages.directive.mjs +37 -0
- package/esm2020/rangeslider/localization/messages.mjs +25 -0
- package/esm2020/rangeslider/rangeslider-model.mjs +52 -0
- package/esm2020/rangeslider/rangeslider-value.type.mjs +5 -0
- package/esm2020/rangeslider/rangeslider.component.mjs +605 -0
- package/esm2020/rangeslider.module.mjs +71 -0
- package/esm2020/shared/input-separator.component.mjs +41 -0
- package/esm2020/shared/textarea.directive.mjs +260 -0
- package/esm2020/shared/utils.mjs +13 -0
- package/esm2020/shared.module.mjs +32 -0
- package/esm2020/signature/events/close-event.mjs +10 -0
- package/esm2020/signature/events/index.mjs +6 -0
- package/esm2020/signature/events/open-event.mjs +10 -0
- package/esm2020/signature/localization/custom-messages.component.mjs +41 -0
- package/esm2020/signature/localization/index.mjs +7 -0
- package/esm2020/signature/localization/localized-signature-messages.directive.mjs +37 -0
- package/esm2020/signature/localization/messages.mjs +29 -0
- package/esm2020/signature/signature.component.mjs +906 -0
- package/esm2020/signature.module.mjs +79 -0
- package/esm2020/slider/localization/custom-messages.component.mjs +41 -0
- package/esm2020/slider/localization/localized-slider-messages.directive.mjs +37 -0
- package/esm2020/slider/localization/messages.mjs +27 -0
- package/esm2020/slider/slider-model.mjs +34 -0
- package/esm2020/slider/slider.component.mjs +646 -0
- package/esm2020/slider.module.mjs +73 -0
- package/esm2020/sliders-common/label-template.directive.mjs +45 -0
- package/esm2020/sliders-common/slider-base.mjs +255 -0
- package/esm2020/sliders-common/slider-model.base.mjs +93 -0
- package/esm2020/sliders-common/slider-ticks.component.mjs +125 -0
- package/esm2020/sliders-common/sliders-common.module.mjs +42 -0
- package/esm2020/sliders-common/sliders-util.mjs +219 -0
- package/esm2020/sliders-common/title-callback.mjs +5 -0
- package/esm2020/switch/events/blur-event.mjs +9 -0
- package/esm2020/switch/events/focus-event.mjs +9 -0
- package/esm2020/switch/localization/custom-messages.component.mjs +41 -0
- package/esm2020/switch/localization/localized-switch-messages.directive.mjs +37 -0
- package/esm2020/switch/localization/messages.mjs +25 -0
- package/esm2020/switch/switch.component.mjs +577 -0
- package/esm2020/switch.module.mjs +68 -0
- package/esm2020/text-fields-common/text-fields-base.mjs +128 -0
- package/esm2020/textarea/models/flow.mjs +5 -0
- package/esm2020/textarea/models/resize.mjs +5 -0
- package/esm2020/textarea/textarea-suffix.component.mjs +40 -0
- package/esm2020/textarea/textarea.component.mjs +604 -0
- package/esm2020/textarea.module.mjs +68 -0
- package/esm2020/textbox/localization/custom-messages.component.mjs +41 -0
- package/esm2020/textbox/localization/localized-textbox-messages.directive.mjs +37 -0
- package/esm2020/textbox/localization/messages.mjs +23 -0
- package/esm2020/textbox/models/icon-show-options.mjs +5 -0
- package/esm2020/textbox/textbox-prefix.directive.mjs +38 -0
- package/esm2020/textbox/textbox-suffix.directive.mjs +37 -0
- package/esm2020/textbox/textbox.component.mjs +849 -0
- package/esm2020/textbox/textbox.directive.mjs +121 -0
- package/esm2020/textbox.module.mjs +89 -0
- package/esm2020/validators/max.validator.mjs +21 -0
- package/esm2020/validators/min.validator.mjs +21 -0
- package/fesm2015/progress-kendo-angular-inputs.mjs +15090 -0
- package/fesm2020/progress-kendo-angular-inputs.mjs +15055 -0
- package/formfield/error.component.d.ts +31 -0
- package/formfield/formfield.component.d.ts +98 -0
- package/formfield/hint.component.d.ts +29 -0
- package/formfield/models/message-align.d.ts +8 -0
- package/formfield/models/orientation.d.ts +9 -0
- package/formfield/models/show-options.d.ts +16 -0
- package/formfield.module.d.ts +45 -0
- package/index.d.ts +76 -0
- package/inputs.module.d.ts +55 -0
- package/maskedtextbox/maskedtextbox.component.d.ts +315 -0
- package/maskedtextbox/masking.service.d.ts +48 -0
- package/maskedtextbox/parsing/combinators.d.ts +13 -0
- package/maskedtextbox/parsing/parsers.d.ts +51 -0
- package/maskedtextbox/parsing/result.d.ts +27 -0
- package/maskedtextbox/parsing/stream.d.ts +26 -0
- package/maskedtextbox.module.d.ts +44 -0
- package/numerictextbox/arrow-direction.d.ts +12 -0
- package/numerictextbox/constants.d.ts +28 -0
- package/numerictextbox/localization/custom-messages.component.d.ts +17 -0
- package/numerictextbox/localization/localized-numerictextbox-messages.directive.d.ts +16 -0
- package/numerictextbox/localization/messages.d.ts +21 -0
- package/numerictextbox/numerictextbox.component.d.ts +364 -0
- package/numerictextbox/utils.d.ts +44 -0
- package/numerictextbox.module.d.ts +47 -0
- package/package-metadata.d.ts +9 -0
- package/package.json +74 -0
- package/progress-kendo-angular-inputs.d.ts +9 -0
- package/radiobutton/radiobutton.directive.d.ts +38 -0
- package/radiobutton.module.d.ts +43 -0
- package/rangeslider/localization/custom-messages.component.d.ts +17 -0
- package/rangeslider/localization/localized-rangeslider-messages.directive.d.ts +16 -0
- package/rangeslider/localization/messages.d.ts +21 -0
- package/rangeslider/rangeslider-model.d.ts +15 -0
- package/rangeslider/rangeslider-value.type.d.ts +9 -0
- package/rangeslider/rangeslider.component.d.ts +139 -0
- package/rangeslider.module.d.ts +48 -0
- package/schematics/collection.json +12 -0
- package/schematics/ngAdd/index.js +11 -0
- package/schematics/ngAdd/schema.json +28 -0
- package/shared/input-separator.component.d.ts +28 -0
- package/shared/textarea.directive.d.ts +99 -0
- package/shared/utils.d.ts +10 -0
- package/shared.module.d.ts +19 -0
- package/signature/events/close-event.d.ts +10 -0
- package/signature/events/index.d.ts +6 -0
- package/signature/events/open-event.d.ts +10 -0
- package/signature/localization/custom-messages.component.d.ts +17 -0
- package/signature/localization/index.d.ts +7 -0
- package/signature/localization/localized-signature-messages.directive.d.ts +16 -0
- package/signature/localization/messages.d.ts +29 -0
- package/signature/signature.component.d.ts +364 -0
- package/signature.module.d.ts +48 -0
- package/slider/localization/custom-messages.component.d.ts +17 -0
- package/slider/localization/localized-slider-messages.directive.d.ts +16 -0
- package/slider/localization/messages.d.ts +25 -0
- package/slider/slider-model.d.ts +14 -0
- package/slider/slider.component.d.ts +175 -0
- package/slider.module.d.ts +50 -0
- package/sliders-common/label-template.directive.d.ts +36 -0
- package/sliders-common/slider-base.d.ts +141 -0
- package/sliders-common/slider-model.base.d.ts +26 -0
- package/sliders-common/slider-ticks.component.d.ts +26 -0
- package/sliders-common/sliders-common.module.d.ts +17 -0
- package/sliders-common/sliders-util.d.ts +119 -0
- package/sliders-common/title-callback.d.ts +10 -0
- package/switch/events/blur-event.d.ts +13 -0
- package/switch/events/focus-event.d.ts +13 -0
- package/switch/localization/custom-messages.component.d.ts +17 -0
- package/switch/localization/localized-switch-messages.directive.d.ts +16 -0
- package/switch/localization/messages.d.ts +21 -0
- package/switch/switch.component.d.ts +216 -0
- package/switch.module.d.ts +46 -0
- package/text-fields-common/text-fields-base.d.ts +91 -0
- package/textarea/models/flow.d.ts +12 -0
- package/textarea/models/resize.d.ts +16 -0
- package/textarea/textarea-suffix.component.d.ts +26 -0
- package/textarea/textarea.component.d.ts +225 -0
- package/textarea.module.d.ts +48 -0
- package/textbox/localization/custom-messages.component.d.ts +17 -0
- package/textbox/localization/localized-textbox-messages.directive.d.ts +16 -0
- package/textbox/localization/messages.d.ts +17 -0
- package/textbox/models/icon-show-options.d.ts +13 -0
- package/textbox/textbox-prefix.directive.d.ts +29 -0
- package/textbox/textbox-suffix.directive.d.ts +28 -0
- package/textbox/textbox.component.d.ts +376 -0
- package/textbox/textbox.directive.d.ts +59 -0
- package/textbox.module.d.ts +53 -0
- package/validators/max.validator.d.ts +8 -0
- package/validators/min.validator.d.ts +8 -0
|
@@ -0,0 +1,604 @@
|
|
|
1
|
+
/**-----------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright © 2023 Progress Software Corporation. All rights reserved.
|
|
3
|
+
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
+
*-------------------------------------------------------------------------------------------*/
|
|
5
|
+
import { Component, HostBinding, Input, Output, ElementRef, EventEmitter, NgZone, Renderer2, ChangeDetectorRef, Injector, forwardRef } from '@angular/core';
|
|
6
|
+
import { fromEvent } from 'rxjs';
|
|
7
|
+
import { debounceTime } from 'rxjs/operators';
|
|
8
|
+
import { NG_VALUE_ACCESSOR, NgControl } from '@angular/forms';
|
|
9
|
+
import { KendoInput, guid, isDocumentAvailable, hasObservers, Keys } from '@progress/kendo-angular-common';
|
|
10
|
+
import { LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n';
|
|
11
|
+
import { TextFieldsBase } from '../text-fields-common/text-fields-base';
|
|
12
|
+
import { areSame, isPresent, getStylingClasses } from '../common/utils';
|
|
13
|
+
import { invokeElementMethod } from '../common/dom-utils';
|
|
14
|
+
import { closest } from './../common/dom-utils';
|
|
15
|
+
import { validatePackage } from '@progress/kendo-licensing';
|
|
16
|
+
import { packageMetadata } from '../package-metadata';
|
|
17
|
+
import * as i0 from "@angular/core";
|
|
18
|
+
import * as i1 from "@progress/kendo-angular-l10n";
|
|
19
|
+
import * as i2 from "@angular/common";
|
|
20
|
+
import * as i3 from "@progress/kendo-angular-common";
|
|
21
|
+
const resizeClasses = {
|
|
22
|
+
'vertical': 'k-resize-y',
|
|
23
|
+
'horizontal': 'k-resize-x',
|
|
24
|
+
'both': 'k-resize',
|
|
25
|
+
'none': 'k-resize-none',
|
|
26
|
+
'auto': 'k-resize-none'
|
|
27
|
+
};
|
|
28
|
+
const FOCUSED = 'k-focus';
|
|
29
|
+
const DEFAULT_SIZE = 'medium';
|
|
30
|
+
const DEFAULT_ROUNDED = 'medium';
|
|
31
|
+
const DEFAULT_FILL_MODE = 'solid';
|
|
32
|
+
/**
|
|
33
|
+
* Represents the [Kendo UI TextArea component for Angular]({% slug overview_textarea %}).
|
|
34
|
+
*/
|
|
35
|
+
export class TextAreaComponent extends TextFieldsBase {
|
|
36
|
+
constructor(localizationService, ngZone, changeDetector, renderer, injector, hostElement) {
|
|
37
|
+
super(localizationService, ngZone, changeDetector, renderer, injector, hostElement);
|
|
38
|
+
this.localizationService = localizationService;
|
|
39
|
+
this.ngZone = ngZone;
|
|
40
|
+
this.changeDetector = changeDetector;
|
|
41
|
+
this.renderer = renderer;
|
|
42
|
+
this.injector = injector;
|
|
43
|
+
this.hostElement = hostElement;
|
|
44
|
+
/**
|
|
45
|
+
* @hidden
|
|
46
|
+
*/
|
|
47
|
+
this.focusableId = `k-${guid()}`;
|
|
48
|
+
this.hostClasses = true;
|
|
49
|
+
/**
|
|
50
|
+
* Specifies the flow direction of the TextArea sections. This property is useful when adornments are used, in order to specify
|
|
51
|
+
* their position in relation to the textarea element.
|
|
52
|
+
*
|
|
53
|
+
* The possible values are:
|
|
54
|
+
* * `vertical`(Default) —TextArea sections are placed from top to bottom.
|
|
55
|
+
* * `horizontal`—TextArea sections are placed from left to right in `ltr`, and from right to left in `rtl` mode.
|
|
56
|
+
*/
|
|
57
|
+
this.flow = 'vertical';
|
|
58
|
+
/**
|
|
59
|
+
* Specifies the [tabindex](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex) of the component.
|
|
60
|
+
*/
|
|
61
|
+
this.tabindex = 0;
|
|
62
|
+
/**
|
|
63
|
+
* Configures the resize behavior of the TextArea.
|
|
64
|
+
*
|
|
65
|
+
* The possible values are:
|
|
66
|
+
* * `vertical`(Default)—The TextArea component can be resized only vertically.
|
|
67
|
+
* * `horizontal`—The TextArea component can be resized only horizontally.
|
|
68
|
+
* * `both`—The TextArea component can be resized in both (horizontal and vertical) directions.
|
|
69
|
+
* * `auto`—Specifies whether the TextArea component will adjust its height automatically, based on the content.
|
|
70
|
+
* * `none`—The TextArea cannot be resized.
|
|
71
|
+
*
|
|
72
|
+
*/
|
|
73
|
+
this.resizable = 'vertical';
|
|
74
|
+
/**
|
|
75
|
+
* Fires each time the user focuses the TextArea component.
|
|
76
|
+
*
|
|
77
|
+
* > To wire the event programmatically, use the `onFocus` property.
|
|
78
|
+
*
|
|
79
|
+
* @example
|
|
80
|
+
* ```ts
|
|
81
|
+
* _@Component({
|
|
82
|
+
* selector: 'my-app',
|
|
83
|
+
* template: `
|
|
84
|
+
* <kendo-textarea (focus)="handleFocus()"></kendo-textarea>
|
|
85
|
+
* `
|
|
86
|
+
* })
|
|
87
|
+
* class AppComponent {
|
|
88
|
+
* public handleFocus(): void {
|
|
89
|
+
* console.log('Component is focused');
|
|
90
|
+
* }
|
|
91
|
+
* }
|
|
92
|
+
* ```
|
|
93
|
+
*/
|
|
94
|
+
this.onFocus = new EventEmitter();
|
|
95
|
+
/**
|
|
96
|
+
* Fires each time the TextArea component gets blurred.
|
|
97
|
+
*
|
|
98
|
+
* > To wire the event programmatically, use the `onBlur` property.
|
|
99
|
+
*
|
|
100
|
+
* @example
|
|
101
|
+
* ```ts
|
|
102
|
+
* _@Component({
|
|
103
|
+
* selector: 'my-app',
|
|
104
|
+
* template: `
|
|
105
|
+
* <kendo-textarea (blur)="handleBlur()"></kendo-textarea>
|
|
106
|
+
* `
|
|
107
|
+
* })
|
|
108
|
+
* class AppComponent {
|
|
109
|
+
* public handleBlur(): void {
|
|
110
|
+
* console.log('Component is blurred');
|
|
111
|
+
* }
|
|
112
|
+
* }
|
|
113
|
+
* ```
|
|
114
|
+
*/
|
|
115
|
+
this.onBlur = new EventEmitter();
|
|
116
|
+
/**
|
|
117
|
+
* Fires each time the value is changed or the component is blurred
|
|
118
|
+
* ([see example]({% slug overview_textarea %}#toc-events)).
|
|
119
|
+
* When the component value is changed programmatically or via its form control binding, the valueChange event is not emitted.
|
|
120
|
+
*/
|
|
121
|
+
this.valueChange = new EventEmitter();
|
|
122
|
+
this._size = 'medium';
|
|
123
|
+
this._rounded = 'medium';
|
|
124
|
+
this._fillMode = 'solid';
|
|
125
|
+
/**
|
|
126
|
+
* @hidden
|
|
127
|
+
*/
|
|
128
|
+
this.handleInput = (ev) => {
|
|
129
|
+
const incomingValue = ev.target.value;
|
|
130
|
+
this.updateValue(incomingValue);
|
|
131
|
+
this.resize();
|
|
132
|
+
};
|
|
133
|
+
/**
|
|
134
|
+
* @hidden
|
|
135
|
+
*/
|
|
136
|
+
this.handleInputFocus = () => {
|
|
137
|
+
if (!this.disabled) {
|
|
138
|
+
if (this.selectOnFocus && this.value) {
|
|
139
|
+
this.ngZone.run(() => {
|
|
140
|
+
setTimeout(() => { this.selectAll(); });
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
if (hasObservers(this.onFocus)) {
|
|
144
|
+
if (!this.isFocused) {
|
|
145
|
+
this.ngZone.run(() => {
|
|
146
|
+
this.onFocus.emit();
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
if (hasObservers(this.inputFocus)) {
|
|
151
|
+
if (!this.focusChangedProgrammatically) {
|
|
152
|
+
this.ngZone.run(() => {
|
|
153
|
+
this.inputFocus.emit();
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
this.ngZone.run(() => {
|
|
158
|
+
this.isFocused = true;
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
};
|
|
162
|
+
validatePackage(packageMetadata);
|
|
163
|
+
this.direction = localizationService.rtl ? 'rtl' : 'ltr';
|
|
164
|
+
}
|
|
165
|
+
get flowCol() {
|
|
166
|
+
return this.flow === 'vertical';
|
|
167
|
+
}
|
|
168
|
+
get flowRow() {
|
|
169
|
+
return this.flow === 'horizontal';
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* @hidden
|
|
173
|
+
*/
|
|
174
|
+
set tabIndex(tabIndex) {
|
|
175
|
+
this.tabindex = tabIndex;
|
|
176
|
+
}
|
|
177
|
+
get tabIndex() {
|
|
178
|
+
return this.tabindex;
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* The size property specifies the padding of the internal textarea element
|
|
182
|
+
* ([see example]({% slug appearance_textarea %}#toc-size)).
|
|
183
|
+
*
|
|
184
|
+
* The possible values are:
|
|
185
|
+
* * `small`
|
|
186
|
+
* * `medium` (default)
|
|
187
|
+
* * `large`
|
|
188
|
+
* * `none`
|
|
189
|
+
*/
|
|
190
|
+
set size(size) {
|
|
191
|
+
const newSize = size ? size : DEFAULT_SIZE;
|
|
192
|
+
this.handleClasses(newSize, 'size');
|
|
193
|
+
this._size = newSize;
|
|
194
|
+
}
|
|
195
|
+
get size() {
|
|
196
|
+
return this._size;
|
|
197
|
+
}
|
|
198
|
+
/**
|
|
199
|
+
* The rounded property specifies the border radius of the TextArea
|
|
200
|
+
* ([see example]({% slug appearance_textarea %}#toc-rounded)).
|
|
201
|
+
*
|
|
202
|
+
* The possible values are:
|
|
203
|
+
* * `small`
|
|
204
|
+
* * `medium` (default)
|
|
205
|
+
* * `large`
|
|
206
|
+
* * `none`
|
|
207
|
+
*/
|
|
208
|
+
set rounded(rounded) {
|
|
209
|
+
const newRounded = rounded ? rounded : DEFAULT_ROUNDED;
|
|
210
|
+
this.handleClasses(newRounded, 'rounded');
|
|
211
|
+
this._rounded = newRounded;
|
|
212
|
+
}
|
|
213
|
+
get rounded() {
|
|
214
|
+
return this._rounded;
|
|
215
|
+
}
|
|
216
|
+
/**
|
|
217
|
+
* The fillMode property specifies the background and border styles of the TextArea
|
|
218
|
+
* ([see example]({% slug appearance_textarea %}#toc-fillMode)).
|
|
219
|
+
*
|
|
220
|
+
* The possible values are:
|
|
221
|
+
* * `flat`
|
|
222
|
+
* * `solid` (default)
|
|
223
|
+
* * `outline`
|
|
224
|
+
* * `none`
|
|
225
|
+
*/
|
|
226
|
+
set fillMode(fillMode) {
|
|
227
|
+
const newFillMode = fillMode ? fillMode : DEFAULT_FILL_MODE;
|
|
228
|
+
this.handleClasses(newFillMode, 'fillMode');
|
|
229
|
+
this._fillMode = newFillMode;
|
|
230
|
+
}
|
|
231
|
+
get fillMode() {
|
|
232
|
+
return this._fillMode;
|
|
233
|
+
}
|
|
234
|
+
ngAfterViewInit() {
|
|
235
|
+
const hostElement = this.hostElement.nativeElement;
|
|
236
|
+
let cursorInsideWrapper = false;
|
|
237
|
+
let tabbing = false;
|
|
238
|
+
this.ngZone.runOutsideAngular(() => {
|
|
239
|
+
// focusIn and focusOut are relative to the host element
|
|
240
|
+
this.subscriptions.add(this.renderer.listen(hostElement, 'focusin', () => {
|
|
241
|
+
if (!this.isFocused) {
|
|
242
|
+
this.ngZone.run(() => {
|
|
243
|
+
this.onFocus.emit();
|
|
244
|
+
this.isFocused = true;
|
|
245
|
+
});
|
|
246
|
+
}
|
|
247
|
+
}));
|
|
248
|
+
this.subscriptions.add(this.renderer.listen(hostElement, 'focusout', (args) => {
|
|
249
|
+
if (!this.isFocused) {
|
|
250
|
+
return;
|
|
251
|
+
}
|
|
252
|
+
if (tabbing) {
|
|
253
|
+
const closestTextbox = closest(args.relatedTarget, (element) => element === this.hostElement.nativeElement);
|
|
254
|
+
if (!closestTextbox) {
|
|
255
|
+
this.handleBlur();
|
|
256
|
+
}
|
|
257
|
+
tabbing = false;
|
|
258
|
+
}
|
|
259
|
+
else {
|
|
260
|
+
if (!cursorInsideWrapper) {
|
|
261
|
+
this.handleBlur();
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
}));
|
|
265
|
+
this.subscriptions.add(this.renderer.listen(hostElement, 'mouseenter', () => {
|
|
266
|
+
cursorInsideWrapper = true;
|
|
267
|
+
}));
|
|
268
|
+
this.subscriptions.add(this.renderer.listen(hostElement, 'mouseleave', () => {
|
|
269
|
+
cursorInsideWrapper = false;
|
|
270
|
+
}));
|
|
271
|
+
this.subscriptions.add(this.renderer.listen(hostElement, 'keydown', (args) => {
|
|
272
|
+
if (args.keyCode === Keys.Tab) {
|
|
273
|
+
tabbing = true;
|
|
274
|
+
}
|
|
275
|
+
else {
|
|
276
|
+
tabbing = false;
|
|
277
|
+
}
|
|
278
|
+
}));
|
|
279
|
+
this.handleFlow();
|
|
280
|
+
});
|
|
281
|
+
const stylingInputs = ['size', 'rounded', 'fillMode'];
|
|
282
|
+
stylingInputs.forEach(input => {
|
|
283
|
+
this.handleClasses(this[input], input);
|
|
284
|
+
});
|
|
285
|
+
}
|
|
286
|
+
ngOnInit() {
|
|
287
|
+
this.control = this.injector.get(NgControl, null);
|
|
288
|
+
if (isDocumentAvailable() && this.resizable === 'auto') {
|
|
289
|
+
this.resizeSubscription = fromEvent(window, 'resize')
|
|
290
|
+
.pipe((debounceTime(50)))
|
|
291
|
+
.subscribe(() => this.resize());
|
|
292
|
+
}
|
|
293
|
+
if (this.hostElement) {
|
|
294
|
+
this.renderer.removeAttribute(this.hostElement.nativeElement, "tabindex");
|
|
295
|
+
}
|
|
296
|
+
this.subscriptions = this.localizationService.changes.subscribe(({ rtl }) => {
|
|
297
|
+
this.direction = rtl ? 'rtl' : 'ltr';
|
|
298
|
+
});
|
|
299
|
+
}
|
|
300
|
+
ngOnChanges(changes) {
|
|
301
|
+
const hostElement = this.hostElement.nativeElement;
|
|
302
|
+
const element = this.input.nativeElement;
|
|
303
|
+
if (changes.flow) {
|
|
304
|
+
this.handleFlow();
|
|
305
|
+
}
|
|
306
|
+
if (changes.resizable) {
|
|
307
|
+
if (this.resizable === 'auto') {
|
|
308
|
+
this.renderer.removeClass(element, '\!k-overflow-y-auto');
|
|
309
|
+
this.initialHeight = element.offsetHeight;
|
|
310
|
+
}
|
|
311
|
+
else {
|
|
312
|
+
this.renderer.addClass(element, '\!k-overflow-y-auto');
|
|
313
|
+
element.style.height = `${this.initialHeight}px`;
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
if (changes.cols) {
|
|
317
|
+
if (isPresent(changes.cols.currentValue)) {
|
|
318
|
+
this.renderer.setStyle(hostElement, 'width', 'auto');
|
|
319
|
+
}
|
|
320
|
+
else {
|
|
321
|
+
this.renderer.removeStyle(hostElement, 'width');
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
if (changes.value) {
|
|
325
|
+
this.resize();
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
/**
|
|
329
|
+
* @hidden
|
|
330
|
+
*/
|
|
331
|
+
writeValue(value) {
|
|
332
|
+
this.value = value;
|
|
333
|
+
this.resize();
|
|
334
|
+
}
|
|
335
|
+
/**
|
|
336
|
+
* @hidden
|
|
337
|
+
*/
|
|
338
|
+
registerOnChange(fn) {
|
|
339
|
+
this.ngChange = fn;
|
|
340
|
+
}
|
|
341
|
+
/**
|
|
342
|
+
* @hidden
|
|
343
|
+
*/
|
|
344
|
+
registerOnTouched(fn) {
|
|
345
|
+
this.ngTouched = fn;
|
|
346
|
+
}
|
|
347
|
+
updateValue(value) {
|
|
348
|
+
if (!areSame(this.value, value)) {
|
|
349
|
+
this.ngZone.run(() => {
|
|
350
|
+
this.value = value;
|
|
351
|
+
this.ngChange(value);
|
|
352
|
+
this.valueChange.emit(value);
|
|
353
|
+
this.changeDetector.markForCheck();
|
|
354
|
+
});
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
ngOnDestroy() {
|
|
358
|
+
super.ngOnDestroy();
|
|
359
|
+
if (this.resizeSubscription) {
|
|
360
|
+
this.resizeSubscription.unsubscribe();
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
/**
|
|
364
|
+
* @hidden
|
|
365
|
+
*/
|
|
366
|
+
get resizableClass() {
|
|
367
|
+
return resizeClasses[this.resizable];
|
|
368
|
+
}
|
|
369
|
+
/**
|
|
370
|
+
* @hidden
|
|
371
|
+
*/
|
|
372
|
+
get isControlInvalid() {
|
|
373
|
+
return this.control && this.control.touched && !this.control.valid;
|
|
374
|
+
}
|
|
375
|
+
/**
|
|
376
|
+
* Focuses the TextArea component.
|
|
377
|
+
*
|
|
378
|
+
* @example
|
|
379
|
+
* ```ts
|
|
380
|
+
* _@Component({
|
|
381
|
+
* selector: 'my-app',
|
|
382
|
+
* template: `
|
|
383
|
+
* <button (click)="textarea.focus()">Focus the textarea</button>
|
|
384
|
+
* <kendo-textarea #textarea></kendo-textarea>
|
|
385
|
+
* `
|
|
386
|
+
* })
|
|
387
|
+
* class AppComponent { }
|
|
388
|
+
* ```
|
|
389
|
+
*/
|
|
390
|
+
focus() {
|
|
391
|
+
if (!this.input) {
|
|
392
|
+
return;
|
|
393
|
+
}
|
|
394
|
+
this.focusChangedProgrammatically = true;
|
|
395
|
+
this.isFocused = true;
|
|
396
|
+
this.input.nativeElement.focus();
|
|
397
|
+
this.focusChangedProgrammatically = false;
|
|
398
|
+
}
|
|
399
|
+
/**
|
|
400
|
+
* Blurs the TextArea component.
|
|
401
|
+
*/
|
|
402
|
+
blur() {
|
|
403
|
+
this.focusChangedProgrammatically = true;
|
|
404
|
+
const isFocusedElement = this.hostElement.nativeElement.querySelector(':focus');
|
|
405
|
+
if (isFocusedElement) {
|
|
406
|
+
isFocusedElement.blur();
|
|
407
|
+
}
|
|
408
|
+
this.isFocused = false;
|
|
409
|
+
this.focusChangedProgrammatically = false;
|
|
410
|
+
}
|
|
411
|
+
resize() {
|
|
412
|
+
if (this.resizable !== 'auto') {
|
|
413
|
+
return;
|
|
414
|
+
}
|
|
415
|
+
// The logic of the resize method, does not depend on Angular and thus moving it outisde of it
|
|
416
|
+
// We need to ensure that the resizing logic runs after the value is updated thus the setTimout
|
|
417
|
+
this.ngZone.runOutsideAngular(() => {
|
|
418
|
+
setTimeout(() => {
|
|
419
|
+
const hostElement = this.hostElement.nativeElement;
|
|
420
|
+
const element = this.input.nativeElement;
|
|
421
|
+
this.renderer.setStyle(element, 'height', `${this.initialHeight}px`);
|
|
422
|
+
const scrollHeight = element.scrollHeight;
|
|
423
|
+
this.renderer.setStyle(hostElement, 'min-height', `${scrollHeight}px`);
|
|
424
|
+
if (scrollHeight > this.initialHeight) {
|
|
425
|
+
this.renderer.setStyle(element, 'height', `${scrollHeight}px`);
|
|
426
|
+
}
|
|
427
|
+
}, 0);
|
|
428
|
+
});
|
|
429
|
+
}
|
|
430
|
+
get isFocused() {
|
|
431
|
+
return this._isFocused;
|
|
432
|
+
}
|
|
433
|
+
set isFocused(value) {
|
|
434
|
+
if (this._isFocused !== value && this.hostElement) {
|
|
435
|
+
const element = this.hostElement.nativeElement;
|
|
436
|
+
if (value && !this.disabled) {
|
|
437
|
+
this.renderer.addClass(element, FOCUSED);
|
|
438
|
+
}
|
|
439
|
+
else {
|
|
440
|
+
this.renderer.removeClass(element, FOCUSED);
|
|
441
|
+
}
|
|
442
|
+
this._isFocused = value;
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
handleBlur() {
|
|
446
|
+
this.ngZone.run(() => {
|
|
447
|
+
if (!this.focusChangedProgrammatically) {
|
|
448
|
+
this.onBlur.emit();
|
|
449
|
+
}
|
|
450
|
+
this.isFocused = false;
|
|
451
|
+
});
|
|
452
|
+
}
|
|
453
|
+
setSelection(start, end) {
|
|
454
|
+
if (this.isFocused) {
|
|
455
|
+
invokeElementMethod(this.input, 'setSelectionRange', start, end);
|
|
456
|
+
}
|
|
457
|
+
}
|
|
458
|
+
selectAll() {
|
|
459
|
+
if (this.value) {
|
|
460
|
+
this.setSelection(0, this.value.length);
|
|
461
|
+
}
|
|
462
|
+
}
|
|
463
|
+
handleClasses(value, input) {
|
|
464
|
+
const elem = this.hostElement.nativeElement;
|
|
465
|
+
const classes = getStylingClasses('input', input, this[input], value);
|
|
466
|
+
if (classes.toRemove) {
|
|
467
|
+
this.renderer.removeClass(elem, classes.toRemove);
|
|
468
|
+
}
|
|
469
|
+
if (classes.toAdd) {
|
|
470
|
+
this.renderer.addClass(elem, classes.toAdd);
|
|
471
|
+
}
|
|
472
|
+
}
|
|
473
|
+
handleFlow() {
|
|
474
|
+
const isVertical = this.flow === 'vertical';
|
|
475
|
+
const hostElement = this.hostElement.nativeElement;
|
|
476
|
+
const element = this.input.nativeElement;
|
|
477
|
+
const suffix = hostElement.children[1];
|
|
478
|
+
this.renderer[isVertical ? 'addClass' : 'removeClass'](element, '\!k-flex-none');
|
|
479
|
+
if (suffix) {
|
|
480
|
+
this.renderer[isVertical ? 'removeClass' : 'addClass'](suffix, '\!k-align-items-start');
|
|
481
|
+
}
|
|
482
|
+
}
|
|
483
|
+
}
|
|
484
|
+
TextAreaComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: TextAreaComponent, deps: [{ token: i1.LocalizationService }, { token: i0.NgZone }, { token: i0.ChangeDetectorRef }, { token: i0.Renderer2 }, { token: i0.Injector }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
485
|
+
TextAreaComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: TextAreaComponent, selector: "kendo-textarea", inputs: { focusableId: "focusableId", flow: "flow", rows: "rows", cols: "cols", maxlength: "maxlength", tabindex: "tabindex", tabIndex: "tabIndex", resizable: "resizable", size: "size", rounded: "rounded", fillMode: "fillMode" }, outputs: { onFocus: "focus", onBlur: "blur", valueChange: "valueChange" }, host: { properties: { "class.k-textarea": "this.hostClasses", "class.k-input": "this.hostClasses", "class.!k-flex-col": "this.flowCol", "class.!k-flex-row": "this.flowRow" } }, providers: [
|
|
486
|
+
LocalizationService,
|
|
487
|
+
{ provide: L10N_PREFIX, useValue: 'kendo.textarea' },
|
|
488
|
+
{
|
|
489
|
+
provide: NG_VALUE_ACCESSOR,
|
|
490
|
+
useExisting: forwardRef(() => TextAreaComponent),
|
|
491
|
+
multi: true
|
|
492
|
+
},
|
|
493
|
+
{ provide: KendoInput, useExisting: forwardRef(() => TextAreaComponent) }
|
|
494
|
+
], exportAs: ["kendoTextArea"], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: `
|
|
495
|
+
<textarea
|
|
496
|
+
#input
|
|
497
|
+
[attr.aria-multiline]="true"
|
|
498
|
+
[attr.aria-disabled]="disabled ? true : undefined"
|
|
499
|
+
[attr.aria-readonly]="readonly ? true : undefined"
|
|
500
|
+
class="k-input-inner"
|
|
501
|
+
[ngClass]="resizableClass"
|
|
502
|
+
[id]="focusableId"
|
|
503
|
+
[value]="value"
|
|
504
|
+
[attr.placeholder]="placeholder"
|
|
505
|
+
[disabled]="disabled"
|
|
506
|
+
[readonly]="readonly"
|
|
507
|
+
[attr.rows]="rows"
|
|
508
|
+
[attr.cols]="cols"
|
|
509
|
+
[attr.tabindex]="tabIndex"
|
|
510
|
+
[attr.title]="title"
|
|
511
|
+
[attr.maxlength]="maxlength"
|
|
512
|
+
[attr.aria-invalid]="isControlInvalid"
|
|
513
|
+
[kendoEventsOutsideAngular]="{
|
|
514
|
+
focus: handleInputFocus,
|
|
515
|
+
blur: handleInputBlur,
|
|
516
|
+
input: handleInput}">
|
|
517
|
+
</textarea>
|
|
518
|
+
<ng-content select="kendo-textarea-suffix"></ng-content>
|
|
519
|
+
`, isInline: true, directives: [{ type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i3.EventsOutsideAngularDirective, selector: "[kendoEventsOutsideAngular]", inputs: ["kendoEventsOutsideAngular", "scope"] }] });
|
|
520
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: TextAreaComponent, decorators: [{
|
|
521
|
+
type: Component,
|
|
522
|
+
args: [{
|
|
523
|
+
exportAs: 'kendoTextArea',
|
|
524
|
+
providers: [
|
|
525
|
+
LocalizationService,
|
|
526
|
+
{ provide: L10N_PREFIX, useValue: 'kendo.textarea' },
|
|
527
|
+
{
|
|
528
|
+
provide: NG_VALUE_ACCESSOR,
|
|
529
|
+
useExisting: forwardRef(() => TextAreaComponent),
|
|
530
|
+
multi: true
|
|
531
|
+
},
|
|
532
|
+
{ provide: KendoInput, useExisting: forwardRef(() => TextAreaComponent) }
|
|
533
|
+
],
|
|
534
|
+
selector: 'kendo-textarea',
|
|
535
|
+
template: `
|
|
536
|
+
<textarea
|
|
537
|
+
#input
|
|
538
|
+
[attr.aria-multiline]="true"
|
|
539
|
+
[attr.aria-disabled]="disabled ? true : undefined"
|
|
540
|
+
[attr.aria-readonly]="readonly ? true : undefined"
|
|
541
|
+
class="k-input-inner"
|
|
542
|
+
[ngClass]="resizableClass"
|
|
543
|
+
[id]="focusableId"
|
|
544
|
+
[value]="value"
|
|
545
|
+
[attr.placeholder]="placeholder"
|
|
546
|
+
[disabled]="disabled"
|
|
547
|
+
[readonly]="readonly"
|
|
548
|
+
[attr.rows]="rows"
|
|
549
|
+
[attr.cols]="cols"
|
|
550
|
+
[attr.tabindex]="tabIndex"
|
|
551
|
+
[attr.title]="title"
|
|
552
|
+
[attr.maxlength]="maxlength"
|
|
553
|
+
[attr.aria-invalid]="isControlInvalid"
|
|
554
|
+
[kendoEventsOutsideAngular]="{
|
|
555
|
+
focus: handleInputFocus,
|
|
556
|
+
blur: handleInputBlur,
|
|
557
|
+
input: handleInput}">
|
|
558
|
+
</textarea>
|
|
559
|
+
<ng-content select="kendo-textarea-suffix"></ng-content>
|
|
560
|
+
`
|
|
561
|
+
}]
|
|
562
|
+
}], ctorParameters: function () { return [{ type: i1.LocalizationService }, { type: i0.NgZone }, { type: i0.ChangeDetectorRef }, { type: i0.Renderer2 }, { type: i0.Injector }, { type: i0.ElementRef }]; }, propDecorators: { focusableId: [{
|
|
563
|
+
type: Input
|
|
564
|
+
}], hostClasses: [{
|
|
565
|
+
type: HostBinding,
|
|
566
|
+
args: ['class.k-textarea']
|
|
567
|
+
}, {
|
|
568
|
+
type: HostBinding,
|
|
569
|
+
args: ['class.k-input']
|
|
570
|
+
}], flowCol: [{
|
|
571
|
+
type: HostBinding,
|
|
572
|
+
args: ['class.\!k-flex-col']
|
|
573
|
+
}], flowRow: [{
|
|
574
|
+
type: HostBinding,
|
|
575
|
+
args: ['class.\!k-flex-row']
|
|
576
|
+
}], flow: [{
|
|
577
|
+
type: Input
|
|
578
|
+
}], rows: [{
|
|
579
|
+
type: Input
|
|
580
|
+
}], cols: [{
|
|
581
|
+
type: Input
|
|
582
|
+
}], maxlength: [{
|
|
583
|
+
type: Input
|
|
584
|
+
}], tabindex: [{
|
|
585
|
+
type: Input
|
|
586
|
+
}], tabIndex: [{
|
|
587
|
+
type: Input
|
|
588
|
+
}], resizable: [{
|
|
589
|
+
type: Input
|
|
590
|
+
}], size: [{
|
|
591
|
+
type: Input
|
|
592
|
+
}], rounded: [{
|
|
593
|
+
type: Input
|
|
594
|
+
}], fillMode: [{
|
|
595
|
+
type: Input
|
|
596
|
+
}], onFocus: [{
|
|
597
|
+
type: Output,
|
|
598
|
+
args: ['focus']
|
|
599
|
+
}], onBlur: [{
|
|
600
|
+
type: Output,
|
|
601
|
+
args: ['blur']
|
|
602
|
+
}], valueChange: [{
|
|
603
|
+
type: Output
|
|
604
|
+
}] } });
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**-----------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright © 2023 Progress Software Corporation. All rights reserved.
|
|
3
|
+
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
+
*-------------------------------------------------------------------------------------------*/
|
|
5
|
+
import { NgModule } from "@angular/core";
|
|
6
|
+
import { CommonModule } from "@angular/common";
|
|
7
|
+
import { TextAreaComponent } from "./textarea/textarea.component";
|
|
8
|
+
import { EventsModule } from "@progress/kendo-angular-common";
|
|
9
|
+
import { TextAreaSuffixComponent } from './textarea/textarea-suffix.component';
|
|
10
|
+
import { SharedModule, SHARED_DIRECTIVES } from './shared.module';
|
|
11
|
+
import * as i0 from "@angular/core";
|
|
12
|
+
import * as i1 from "./shared/input-separator.component";
|
|
13
|
+
import * as i2 from "./shared/textarea.directive";
|
|
14
|
+
/**
|
|
15
|
+
* Represents the [NgModule](link:site.data.urls.angular['ngmoduleapi'])
|
|
16
|
+
* definition for the TextArea component.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
*
|
|
20
|
+
* ```ts-no-run
|
|
21
|
+
* // Import the TextArea module
|
|
22
|
+
* import { TextAreaModule } from '@progress/kendo-angular-inputs';
|
|
23
|
+
*
|
|
24
|
+
* // The browser platform with a compiler
|
|
25
|
+
* import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
|
26
|
+
*
|
|
27
|
+
* import { NgModule } from '@angular/core';
|
|
28
|
+
*
|
|
29
|
+
* // Import the app component
|
|
30
|
+
* import { AppComponent } from './app.component';
|
|
31
|
+
*
|
|
32
|
+
* // Define the app module
|
|
33
|
+
* _@NgModule({
|
|
34
|
+
* declarations: [AppComponent], // declare app component
|
|
35
|
+
* imports: [BrowserModule, TextAreaModule], // import TextArea module
|
|
36
|
+
* bootstrap: [AppComponent]
|
|
37
|
+
* })
|
|
38
|
+
* export class AppModule {}
|
|
39
|
+
*
|
|
40
|
+
* // Compile and launch the module
|
|
41
|
+
* platformBrowserDynamic().bootstrapModule(AppModule);
|
|
42
|
+
*
|
|
43
|
+
* ```
|
|
44
|
+
*/
|
|
45
|
+
export class TextAreaModule {
|
|
46
|
+
}
|
|
47
|
+
TextAreaModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: TextAreaModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
48
|
+
TextAreaModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: TextAreaModule, declarations: [TextAreaComponent,
|
|
49
|
+
TextAreaSuffixComponent], imports: [CommonModule, EventsModule, SharedModule], exports: [TextAreaComponent,
|
|
50
|
+
EventsModule,
|
|
51
|
+
TextAreaSuffixComponent, i1.InputSeparatorComponent, i2.TextAreaDirective] });
|
|
52
|
+
TextAreaModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: TextAreaModule, imports: [[CommonModule, EventsModule, SharedModule], EventsModule] });
|
|
53
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: TextAreaModule, decorators: [{
|
|
54
|
+
type: NgModule,
|
|
55
|
+
args: [{
|
|
56
|
+
declarations: [
|
|
57
|
+
TextAreaComponent,
|
|
58
|
+
TextAreaSuffixComponent
|
|
59
|
+
],
|
|
60
|
+
exports: [
|
|
61
|
+
TextAreaComponent,
|
|
62
|
+
EventsModule,
|
|
63
|
+
TextAreaSuffixComponent,
|
|
64
|
+
SHARED_DIRECTIVES
|
|
65
|
+
],
|
|
66
|
+
imports: [CommonModule, EventsModule, SharedModule]
|
|
67
|
+
}]
|
|
68
|
+
}] });
|