@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,121 @@
|
|
|
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 { Directive, ElementRef, EventEmitter, Input, HostBinding, Renderer2, forwardRef, NgZone } from '@angular/core';
|
|
6
|
+
import { KendoInput } from '@progress/kendo-angular-common';
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
/**
|
|
9
|
+
* Represents the [Kendo UI TextBox directive]({% slug overview_textbox %}) for the Inputs components for Angular.
|
|
10
|
+
* Used to style the textbox of any `input` element.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```ts-no-run
|
|
14
|
+
* <input kendoTextBox />
|
|
15
|
+
* <input kendoTextBox type="email" />
|
|
16
|
+
* <input kendoTextBox type="password" />
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
export class TextBoxDirective {
|
|
20
|
+
constructor(renderer, inputElement, ngZone) {
|
|
21
|
+
this.renderer = renderer;
|
|
22
|
+
this.inputElement = inputElement;
|
|
23
|
+
this.ngZone = ngZone;
|
|
24
|
+
this.hostClasses = true;
|
|
25
|
+
/**
|
|
26
|
+
* @hidden
|
|
27
|
+
*/
|
|
28
|
+
this.onFocus = new EventEmitter();
|
|
29
|
+
/**
|
|
30
|
+
* @hidden
|
|
31
|
+
*/
|
|
32
|
+
this.onBlur = new EventEmitter();
|
|
33
|
+
/**
|
|
34
|
+
* @hidden
|
|
35
|
+
*/
|
|
36
|
+
this.onValueChange = new EventEmitter();
|
|
37
|
+
/**
|
|
38
|
+
* @hidden
|
|
39
|
+
*/
|
|
40
|
+
this.autoFillStart = new EventEmitter();
|
|
41
|
+
/**
|
|
42
|
+
* @hidden
|
|
43
|
+
*/
|
|
44
|
+
this.autoFillEnd = new EventEmitter();
|
|
45
|
+
this.listeners = [];
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* @hidden
|
|
49
|
+
*/
|
|
50
|
+
set value(text) {
|
|
51
|
+
if (!this.inputElement) {
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
this.inputElement.nativeElement.value = (text === undefined || text === null) ? '' : text;
|
|
55
|
+
this.onValueChange.emit();
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* @hidden
|
|
59
|
+
*/
|
|
60
|
+
get value() {
|
|
61
|
+
return this.inputElement.nativeElement.value;
|
|
62
|
+
}
|
|
63
|
+
get id() {
|
|
64
|
+
return this.inputElement.nativeElement.id;
|
|
65
|
+
}
|
|
66
|
+
set id(id) {
|
|
67
|
+
this.renderer.setAttribute(this.inputElement.nativeElement, 'id', id);
|
|
68
|
+
}
|
|
69
|
+
ngAfterViewInit() {
|
|
70
|
+
const input = this.inputElement.nativeElement;
|
|
71
|
+
this.listeners = [
|
|
72
|
+
this.renderer.listen(input, 'focus', () => this.onFocus.emit()),
|
|
73
|
+
this.renderer.listen(input, 'blur', () => this.onBlur.emit())
|
|
74
|
+
];
|
|
75
|
+
this.ngZone.runOutsideAngular(() => {
|
|
76
|
+
this.renderer.listen(input, 'animationstart', (e) => {
|
|
77
|
+
if (e.animationName === 'autoFillStart') {
|
|
78
|
+
this.autoFillStart.emit();
|
|
79
|
+
}
|
|
80
|
+
else if (e.animationName === 'autoFillEnd') {
|
|
81
|
+
this.autoFillEnd.emit();
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
ngOnDestroy() {
|
|
87
|
+
this.listeners.forEach(listener => listener());
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
TextBoxDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: TextBoxDirective, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Directive });
|
|
91
|
+
TextBoxDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.12", type: TextBoxDirective, selector: "input[kendoTextBox]", inputs: { value: "value" }, host: { properties: { "class.k-textbox": "this.hostClasses", "class.k-input": "this.hostClasses", "class.k-input-md": "this.hostClasses", "class.k-rounded-md": "this.hostClasses", "class.k-input-solid": "this.hostClasses" } }, providers: [{
|
|
92
|
+
provide: KendoInput,
|
|
93
|
+
useExisting: forwardRef(() => TextBoxDirective)
|
|
94
|
+
}], ngImport: i0 });
|
|
95
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: TextBoxDirective, decorators: [{
|
|
96
|
+
type: Directive,
|
|
97
|
+
args: [{
|
|
98
|
+
selector: 'input[kendoTextBox]',
|
|
99
|
+
providers: [{
|
|
100
|
+
provide: KendoInput,
|
|
101
|
+
useExisting: forwardRef(() => TextBoxDirective)
|
|
102
|
+
}]
|
|
103
|
+
}]
|
|
104
|
+
}], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i0.ElementRef }, { type: i0.NgZone }]; }, propDecorators: { hostClasses: [{
|
|
105
|
+
type: HostBinding,
|
|
106
|
+
args: ['class.k-textbox']
|
|
107
|
+
}, {
|
|
108
|
+
type: HostBinding,
|
|
109
|
+
args: ['class.k-input']
|
|
110
|
+
}, {
|
|
111
|
+
type: HostBinding,
|
|
112
|
+
args: ['class.k-input-md']
|
|
113
|
+
}, {
|
|
114
|
+
type: HostBinding,
|
|
115
|
+
args: ['class.k-rounded-md']
|
|
116
|
+
}, {
|
|
117
|
+
type: HostBinding,
|
|
118
|
+
args: ['class.k-input-solid']
|
|
119
|
+
}], value: [{
|
|
120
|
+
type: Input
|
|
121
|
+
}] } });
|
|
@@ -0,0 +1,89 @@
|
|
|
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 { TextBoxDirective } from "./textbox/textbox.directive";
|
|
7
|
+
import { TextBoxComponent } from "./textbox/textbox.component";
|
|
8
|
+
import { CommonModule } from "@angular/common";
|
|
9
|
+
import { EventsModule } from "@progress/kendo-angular-common";
|
|
10
|
+
import { TextBoxSuffixTemplateDirective } from "./textbox/textbox-suffix.directive";
|
|
11
|
+
import { TextBoxPrefixTemplateDirective } from './textbox/textbox-prefix.directive';
|
|
12
|
+
import { TextBoxCustomMessagesComponent } from './textbox/localization/custom-messages.component';
|
|
13
|
+
import { LocalizedTextBoxMessagesDirective } from './textbox/localization/localized-textbox-messages.directive';
|
|
14
|
+
import { SharedModule, SHARED_DIRECTIVES } from './shared.module';
|
|
15
|
+
import { IconsModule } from "@progress/kendo-angular-icons";
|
|
16
|
+
import * as i0 from "@angular/core";
|
|
17
|
+
import * as i1 from "./shared/input-separator.component";
|
|
18
|
+
import * as i2 from "./shared/textarea.directive";
|
|
19
|
+
/**
|
|
20
|
+
* Represents the [NgModule](link:site.data.urls.angular['ngmoduleapi'])
|
|
21
|
+
* definition for the TextBox directive.
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
*
|
|
25
|
+
* ```ts-no-run
|
|
26
|
+
* // Import the TextBox module
|
|
27
|
+
* import { TextBoxModule } from '@progress/kendo-angular-inputs';
|
|
28
|
+
*
|
|
29
|
+
* // The browser platform with a compiler
|
|
30
|
+
* import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
|
31
|
+
*
|
|
32
|
+
* import { NgModule } from '@angular/core';
|
|
33
|
+
*
|
|
34
|
+
* // Import the app component
|
|
35
|
+
* import { AppComponent } from './app.component';
|
|
36
|
+
*
|
|
37
|
+
* // Define the app module
|
|
38
|
+
* _@NgModule({
|
|
39
|
+
* declarations: [AppComponent], // declare app component
|
|
40
|
+
* imports: [BrowserModule, TextBoxModule], // import TextBox module
|
|
41
|
+
* bootstrap: [AppComponent]
|
|
42
|
+
* })
|
|
43
|
+
* export class AppModule {}
|
|
44
|
+
*
|
|
45
|
+
* // Compile and launch the module
|
|
46
|
+
* platformBrowserDynamic().bootstrapModule(AppModule);
|
|
47
|
+
*
|
|
48
|
+
* ```
|
|
49
|
+
*/
|
|
50
|
+
export class TextBoxModule {
|
|
51
|
+
}
|
|
52
|
+
TextBoxModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: TextBoxModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
53
|
+
TextBoxModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: TextBoxModule, declarations: [TextBoxDirective,
|
|
54
|
+
TextBoxComponent,
|
|
55
|
+
TextBoxSuffixTemplateDirective,
|
|
56
|
+
TextBoxPrefixTemplateDirective,
|
|
57
|
+
TextBoxCustomMessagesComponent,
|
|
58
|
+
LocalizedTextBoxMessagesDirective], imports: [CommonModule, EventsModule, SharedModule, IconsModule], exports: [TextBoxDirective,
|
|
59
|
+
TextBoxComponent,
|
|
60
|
+
TextBoxSuffixTemplateDirective,
|
|
61
|
+
TextBoxPrefixTemplateDirective,
|
|
62
|
+
EventsModule,
|
|
63
|
+
TextBoxCustomMessagesComponent,
|
|
64
|
+
LocalizedTextBoxMessagesDirective, i1.InputSeparatorComponent, i2.TextAreaDirective] });
|
|
65
|
+
TextBoxModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: TextBoxModule, imports: [[CommonModule, EventsModule, SharedModule, IconsModule], EventsModule] });
|
|
66
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: TextBoxModule, decorators: [{
|
|
67
|
+
type: NgModule,
|
|
68
|
+
args: [{
|
|
69
|
+
declarations: [
|
|
70
|
+
TextBoxDirective,
|
|
71
|
+
TextBoxComponent,
|
|
72
|
+
TextBoxSuffixTemplateDirective,
|
|
73
|
+
TextBoxPrefixTemplateDirective,
|
|
74
|
+
TextBoxCustomMessagesComponent,
|
|
75
|
+
LocalizedTextBoxMessagesDirective
|
|
76
|
+
],
|
|
77
|
+
exports: [
|
|
78
|
+
TextBoxDirective,
|
|
79
|
+
TextBoxComponent,
|
|
80
|
+
TextBoxSuffixTemplateDirective,
|
|
81
|
+
TextBoxPrefixTemplateDirective,
|
|
82
|
+
EventsModule,
|
|
83
|
+
TextBoxCustomMessagesComponent,
|
|
84
|
+
LocalizedTextBoxMessagesDirective,
|
|
85
|
+
SHARED_DIRECTIVES
|
|
86
|
+
],
|
|
87
|
+
imports: [CommonModule, EventsModule, SharedModule, IconsModule]
|
|
88
|
+
}]
|
|
89
|
+
}] });
|
|
@@ -0,0 +1,21 @@
|
|
|
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 { isPresent } from '../common/utils';
|
|
6
|
+
/**
|
|
7
|
+
* @hidden
|
|
8
|
+
*/
|
|
9
|
+
export const createMaxValidator = (maxValue) => {
|
|
10
|
+
return (c) => {
|
|
11
|
+
if (!isPresent(maxValue) || !isPresent(c.value) || c.value <= maxValue) {
|
|
12
|
+
return null;
|
|
13
|
+
}
|
|
14
|
+
return {
|
|
15
|
+
maxError: {
|
|
16
|
+
maxValue: maxValue,
|
|
17
|
+
value: c.value
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
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 { isPresent } from '../common/utils';
|
|
6
|
+
/**
|
|
7
|
+
* @hidden
|
|
8
|
+
*/
|
|
9
|
+
export const createMinValidator = (minValue) => {
|
|
10
|
+
return (c) => {
|
|
11
|
+
if (!isPresent(minValue) || !isPresent(c.value) || c.value >= minValue) {
|
|
12
|
+
return null;
|
|
13
|
+
}
|
|
14
|
+
return {
|
|
15
|
+
minError: {
|
|
16
|
+
minValue: minValue,
|
|
17
|
+
value: c.value
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
};
|