@progress/kendo-angular-inputs 19.3.0-develop.3 → 19.3.0-develop.30
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/common/formservice.service.d.ts +14 -0
- package/common/models/gutters.d.ts +28 -0
- package/common/models/responsive-breakpoints.d.ts +34 -0
- package/common/utils.d.ts +0 -4
- package/directives.d.ts +19 -1
- package/esm2022/common/formservice.service.mjs +21 -0
- package/esm2022/common/models/gutters.mjs +5 -0
- package/esm2022/common/models/responsive-breakpoints.mjs +5 -0
- package/esm2022/common/utils.mjs +0 -4
- package/esm2022/directives.mjs +24 -0
- package/esm2022/form/form.component.mjs +153 -0
- package/esm2022/form/formseparator.component.mjs +80 -0
- package/esm2022/form/utils.mjs +144 -0
- package/esm2022/form.module.mjs +46 -0
- package/esm2022/formfield/formfield.component.mjs +47 -5
- package/esm2022/formfieldset/formfieldset.component.mjs +170 -0
- package/esm2022/index.mjs +5 -0
- package/esm2022/inputs.module.mjs +26 -23
- package/esm2022/otpinput/otpinput.component.mjs +2 -2
- package/esm2022/package-metadata.mjs +2 -2
- package/esm2022/rangeslider/rangeslider.component.mjs +3 -0
- package/esm2022/text-fields-common/text-fields-base.mjs +1 -1
- package/esm2022/textarea/models/textarea-settings.mjs +5 -0
- package/esm2022/textarea/textarea.component.mjs +35 -4
- package/fesm2022/progress-kendo-angular-inputs.mjs +661 -19
- package/form/form.component.d.ts +70 -0
- package/form/formseparator.component.d.ts +32 -0
- package/form/utils.d.ts +62 -0
- package/form.module.d.ts +36 -0
- package/formfield/formfield.component.d.ts +19 -4
- package/formfieldset/formfieldset.component.d.ts +68 -0
- package/index.d.ts +7 -0
- package/inputs.module.d.ts +25 -22
- package/package.json +13 -13
- package/text-fields-common/text-fields-base.d.ts +1 -1
- package/textarea/models/textarea-settings.d.ts +101 -0
- package/textarea/textarea.component.d.ts +9 -3
|
@@ -12,8 +12,12 @@ import { packageMetadata } from '../package-metadata';
|
|
|
12
12
|
import { ErrorComponent } from './error.component';
|
|
13
13
|
import { HintComponent } from './hint.component';
|
|
14
14
|
import { NgIf } from '@angular/common';
|
|
15
|
+
import { FormService } from '../common/formservice.service';
|
|
16
|
+
import { filter } from 'rxjs/operators';
|
|
17
|
+
import { calculateColSpan, generateColSpanClass } from '../form/utils';
|
|
15
18
|
import * as i0 from "@angular/core";
|
|
16
19
|
import * as i1 from "@progress/kendo-angular-l10n";
|
|
20
|
+
import * as i2 from "../common/formservice.service";
|
|
17
21
|
/**
|
|
18
22
|
* Represents the Kendo UI FormField component for Angular.
|
|
19
23
|
* Use this component to group form-bound controls (Kendo Angular components or native HTML controls).
|
|
@@ -36,6 +40,7 @@ export class FormFieldComponent {
|
|
|
36
40
|
renderer;
|
|
37
41
|
localizationService;
|
|
38
42
|
hostElement;
|
|
43
|
+
formService;
|
|
39
44
|
hostClass = true;
|
|
40
45
|
/**
|
|
41
46
|
* @hidden
|
|
@@ -78,6 +83,8 @@ export class FormFieldComponent {
|
|
|
78
83
|
/**
|
|
79
84
|
* Specifies the layout orientation of the form field.
|
|
80
85
|
*
|
|
86
|
+
* @hidden
|
|
87
|
+
*
|
|
81
88
|
* @default 'vertical'
|
|
82
89
|
*/
|
|
83
90
|
orientation = 'vertical';
|
|
@@ -89,6 +96,11 @@ export class FormFieldComponent {
|
|
|
89
96
|
* @default 'initial'
|
|
90
97
|
*/
|
|
91
98
|
showErrors = 'initial';
|
|
99
|
+
/**
|
|
100
|
+
* Defines the colspan for the form field.
|
|
101
|
+
* Can be a number or an array of responsive breakpoints.
|
|
102
|
+
*/
|
|
103
|
+
colSpan;
|
|
92
104
|
/**
|
|
93
105
|
* @hidden
|
|
94
106
|
*/
|
|
@@ -110,15 +122,23 @@ export class FormFieldComponent {
|
|
|
110
122
|
control;
|
|
111
123
|
subscriptions = new Subscription();
|
|
112
124
|
rtl = false;
|
|
113
|
-
|
|
125
|
+
_formWidth = null;
|
|
126
|
+
_colSpanClass = null;
|
|
127
|
+
_previousColSpan = null;
|
|
128
|
+
constructor(renderer, localizationService, hostElement, formService) {
|
|
114
129
|
this.renderer = renderer;
|
|
115
130
|
this.localizationService = localizationService;
|
|
116
131
|
this.hostElement = hostElement;
|
|
132
|
+
this.formService = formService;
|
|
117
133
|
validatePackage(packageMetadata);
|
|
118
134
|
this.subscriptions.add(this.localizationService.changes.subscribe(({ rtl }) => {
|
|
119
135
|
this.rtl = rtl;
|
|
120
136
|
this.direction = this.rtl ? 'rtl' : 'ltr';
|
|
121
137
|
}));
|
|
138
|
+
this.subscriptions.add(this.formService.formWidth.pipe(filter((width) => width !== null)).subscribe((width) => {
|
|
139
|
+
this._formWidth = width;
|
|
140
|
+
this.updateColSpanClass();
|
|
141
|
+
}));
|
|
122
142
|
}
|
|
123
143
|
ngAfterViewInit() {
|
|
124
144
|
this.setDescription();
|
|
@@ -126,6 +146,11 @@ export class FormFieldComponent {
|
|
|
126
146
|
ngAfterViewChecked() {
|
|
127
147
|
this.updateDescription();
|
|
128
148
|
}
|
|
149
|
+
ngOnChanges(changes) {
|
|
150
|
+
if (changes['colSpan']) {
|
|
151
|
+
this.updateColSpanClass();
|
|
152
|
+
}
|
|
153
|
+
}
|
|
129
154
|
ngOnDestroy() {
|
|
130
155
|
this.subscriptions.unsubscribe();
|
|
131
156
|
}
|
|
@@ -230,14 +255,29 @@ export class FormFieldComponent {
|
|
|
230
255
|
this.subscriptions.add(this.errorChildren.changes.subscribe(() => this.updateDescription()));
|
|
231
256
|
this.subscriptions.add(this.hintChildren.changes.subscribe(() => this.updateDescription()));
|
|
232
257
|
}
|
|
233
|
-
|
|
234
|
-
|
|
258
|
+
updateColSpanClass() {
|
|
259
|
+
const hostElement = this.hostElement.nativeElement;
|
|
260
|
+
const newColSpan = calculateColSpan(this.colSpan, this._formWidth);
|
|
261
|
+
if (newColSpan !== this._previousColSpan) {
|
|
262
|
+
const newClass = generateColSpanClass(newColSpan);
|
|
263
|
+
if (this._colSpanClass) {
|
|
264
|
+
this.renderer.removeClass(hostElement, this._colSpanClass);
|
|
265
|
+
}
|
|
266
|
+
if (newClass) {
|
|
267
|
+
this.renderer.addClass(hostElement, newClass);
|
|
268
|
+
}
|
|
269
|
+
this._colSpanClass = newClass;
|
|
270
|
+
this._previousColSpan = newColSpan;
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FormFieldComponent, deps: [{ token: i0.Renderer2 }, { token: i1.LocalizationService }, { token: i0.ElementRef }, { token: i2.FormService }], target: i0.ɵɵFactoryTarget.Component });
|
|
274
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: FormFieldComponent, isStandalone: true, selector: "kendo-formfield", inputs: { showHints: "showHints", orientation: "orientation", showErrors: "showErrors", colSpan: "colSpan" }, host: { properties: { "class.k-form-field": "this.hostClass", "attr.dir": "this.direction", "class.k-form-field-error": "this.errorClass", "class.k-form-field-disabled": "this.disabledClass" } }, providers: [
|
|
235
275
|
LocalizationService,
|
|
236
276
|
{
|
|
237
277
|
provide: L10N_PREFIX,
|
|
238
278
|
useValue: 'kendo.formfield'
|
|
239
279
|
}
|
|
240
|
-
], queries: [{ propertyName: "kendoInput", first: true, predicate: KendoInput, descendants: true, static: true }, { propertyName: "formControls", predicate: NgControl, descendants: true }, { propertyName: "controlElementRefs", predicate: NgControl, descendants: true, read: ElementRef }, { propertyName: "errorChildren", predicate: ErrorComponent, descendants: true }, { propertyName: "hintChildren", predicate: HintComponent, descendants: true }], ngImport: i0, template: `
|
|
280
|
+
], queries: [{ propertyName: "kendoInput", first: true, predicate: KendoInput, descendants: true, static: true }, { propertyName: "formControls", predicate: NgControl, descendants: true }, { propertyName: "controlElementRefs", predicate: NgControl, descendants: true, read: ElementRef }, { propertyName: "errorChildren", predicate: ErrorComponent, descendants: true }, { propertyName: "hintChildren", predicate: HintComponent, descendants: true }], usesOnChanges: true, ngImport: i0, template: `
|
|
241
281
|
<ng-content select="label, kendo-label"></ng-content>
|
|
242
282
|
<div class="k-form-field-wrap">
|
|
243
283
|
<ng-content></ng-content>
|
|
@@ -268,7 +308,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
268
308
|
standalone: true,
|
|
269
309
|
imports: [NgIf]
|
|
270
310
|
}]
|
|
271
|
-
}], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i1.LocalizationService }, { type: i0.ElementRef }]; }, propDecorators: { hostClass: [{
|
|
311
|
+
}], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i1.LocalizationService }, { type: i0.ElementRef }, { type: i2.FormService }]; }, propDecorators: { hostClass: [{
|
|
272
312
|
type: HostBinding,
|
|
273
313
|
args: ['class.k-form-field']
|
|
274
314
|
}], direction: [{
|
|
@@ -301,4 +341,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
301
341
|
type: Input
|
|
302
342
|
}], showErrors: [{
|
|
303
343
|
type: Input
|
|
344
|
+
}], colSpan: [{
|
|
345
|
+
type: Input
|
|
304
346
|
}] } });
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
/**-----------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright © 2025 Progress Software Corporation. All rights reserved.
|
|
3
|
+
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
+
*-------------------------------------------------------------------------------------------*/
|
|
5
|
+
import { NgClass, NgIf, NgStyle } from '@angular/common';
|
|
6
|
+
import { Component, HostBinding, Input, ElementRef, Renderer2, ChangeDetectorRef, } from '@angular/core';
|
|
7
|
+
import { FormService } from '../common/formservice.service';
|
|
8
|
+
import { filter } from 'rxjs/operators';
|
|
9
|
+
import { calculateColSpan, calculateColumns, calculateGutters, DEFAULT_FORMFIELDSET_GUTTERS, generateColSpanClass, generateColumnClass, generateGuttersStyling } from '../form/utils';
|
|
10
|
+
import { Subscription } from 'rxjs';
|
|
11
|
+
import { validatePackage } from '@progress/kendo-licensing';
|
|
12
|
+
import { packageMetadata } from '../package-metadata';
|
|
13
|
+
import * as i0 from "@angular/core";
|
|
14
|
+
import * as i1 from "../common/formservice.service";
|
|
15
|
+
/**
|
|
16
|
+
* Represents the Kendo UI FormFieldSet component for Angular.
|
|
17
|
+
*
|
|
18
|
+
* @remarks
|
|
19
|
+
* Supported children components are: {@link FormFieldComponent} and {@link FormSeparatorComponent}.
|
|
20
|
+
*/
|
|
21
|
+
export class FormFieldSetComponent {
|
|
22
|
+
elementRef;
|
|
23
|
+
renderer;
|
|
24
|
+
formService;
|
|
25
|
+
cdr;
|
|
26
|
+
formFieldSetClass = true;
|
|
27
|
+
/**
|
|
28
|
+
* Defines the legend for the fieldset.
|
|
29
|
+
*/
|
|
30
|
+
legend;
|
|
31
|
+
/**
|
|
32
|
+
* Defines the number of columns of the fieldset.
|
|
33
|
+
* Can be a number or an array of responsive breakpoints.
|
|
34
|
+
*/
|
|
35
|
+
cols;
|
|
36
|
+
/**
|
|
37
|
+
* Defines the gutters for the fieldset.
|
|
38
|
+
* You can specify gutters for rows and columns.
|
|
39
|
+
*/
|
|
40
|
+
gutters = { ...DEFAULT_FORMFIELDSET_GUTTERS };
|
|
41
|
+
/**
|
|
42
|
+
* Defines the colspan for the fieldset related to the parent Form component columns.
|
|
43
|
+
* Can be a number or an array of responsive breakpoints.
|
|
44
|
+
*/
|
|
45
|
+
colSpan;
|
|
46
|
+
/**
|
|
47
|
+
* @hidden
|
|
48
|
+
*/
|
|
49
|
+
columnsClass = '';
|
|
50
|
+
/**
|
|
51
|
+
* @hidden
|
|
52
|
+
*/
|
|
53
|
+
guttersStyle = '';
|
|
54
|
+
_formColumnsNumber;
|
|
55
|
+
_colSpanClass = null;
|
|
56
|
+
_formWidth = null;
|
|
57
|
+
_formGutters = { ...DEFAULT_FORMFIELDSET_GUTTERS };
|
|
58
|
+
_previousColSpan = null;
|
|
59
|
+
_previousCols = null;
|
|
60
|
+
_previousGutters;
|
|
61
|
+
subs = new Subscription();
|
|
62
|
+
constructor(elementRef, renderer, formService, cdr) {
|
|
63
|
+
this.elementRef = elementRef;
|
|
64
|
+
this.renderer = renderer;
|
|
65
|
+
this.formService = formService;
|
|
66
|
+
this.cdr = cdr;
|
|
67
|
+
validatePackage(packageMetadata);
|
|
68
|
+
}
|
|
69
|
+
ngOnInit() {
|
|
70
|
+
this.subs.add(this.formService.formWidth.pipe(filter((width) => width !== null)).subscribe((width) => {
|
|
71
|
+
this._formWidth = width;
|
|
72
|
+
this.applyColumns();
|
|
73
|
+
this.applyGutters();
|
|
74
|
+
this.updateColSpanClass();
|
|
75
|
+
}));
|
|
76
|
+
}
|
|
77
|
+
ngOnChanges(changes) {
|
|
78
|
+
if (changes['colSpan']) {
|
|
79
|
+
this.updateColSpanClass();
|
|
80
|
+
}
|
|
81
|
+
if (changes['cols']) {
|
|
82
|
+
this.applyColumns();
|
|
83
|
+
}
|
|
84
|
+
if (changes['gutters']) {
|
|
85
|
+
this.applyGutters();
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
ngOnDestroy() {
|
|
89
|
+
this.subs.unsubscribe();
|
|
90
|
+
}
|
|
91
|
+
applyColumns() {
|
|
92
|
+
const containerWidth = this._formWidth;
|
|
93
|
+
const newColumnsNumber = calculateColumns(this.cols, containerWidth);
|
|
94
|
+
if (newColumnsNumber !== this._previousCols) {
|
|
95
|
+
this._formColumnsNumber = newColumnsNumber;
|
|
96
|
+
this.updateColumnClasses();
|
|
97
|
+
this._previousCols = newColumnsNumber;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
applyGutters() {
|
|
101
|
+
const containerWidth = this._formWidth;
|
|
102
|
+
const newGutters = calculateGutters(this.gutters, containerWidth);
|
|
103
|
+
if (newGutters && (newGutters.cols !== this._previousGutters?.cols || newGutters.rows !== this._previousGutters?.rows)) {
|
|
104
|
+
this._formGutters = newGutters;
|
|
105
|
+
this.updateGutterClasses();
|
|
106
|
+
this._previousGutters = newGutters;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
updateColumnClasses() {
|
|
110
|
+
this.columnsClass = generateColumnClass(this._formColumnsNumber);
|
|
111
|
+
this.cdr.detectChanges();
|
|
112
|
+
}
|
|
113
|
+
updateGutterClasses() {
|
|
114
|
+
this.guttersStyle = generateGuttersStyling(this._formGutters, { ...DEFAULT_FORMFIELDSET_GUTTERS });
|
|
115
|
+
this.cdr.detectChanges();
|
|
116
|
+
}
|
|
117
|
+
updateColSpanClass() {
|
|
118
|
+
const hostElement = this.elementRef.nativeElement;
|
|
119
|
+
const newColSpan = calculateColSpan(this.colSpan, this._formWidth);
|
|
120
|
+
if (newColSpan !== this._previousColSpan) {
|
|
121
|
+
const newClass = generateColSpanClass(newColSpan);
|
|
122
|
+
if (this._colSpanClass) {
|
|
123
|
+
this.renderer.removeClass(hostElement, this._colSpanClass);
|
|
124
|
+
}
|
|
125
|
+
if (newClass) {
|
|
126
|
+
this.renderer.addClass(hostElement, newClass);
|
|
127
|
+
}
|
|
128
|
+
this._colSpanClass = newClass;
|
|
129
|
+
this._previousColSpan = newColSpan;
|
|
130
|
+
this.cdr.detectChanges();
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FormFieldSetComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i1.FormService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
134
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: FormFieldSetComponent, isStandalone: true, selector: "fieldset[kendoFormFieldSet]", inputs: { legend: "legend", cols: "cols", gutters: "gutters", colSpan: "colSpan" }, host: { properties: { "class.k-form-fieldset": "this.formFieldSetClass" } }, exportAs: ["kendoFormFieldSet"], usesOnChanges: true, ngImport: i0, template: `
|
|
135
|
+
<legend *ngIf="legend" class="k-form-legend">
|
|
136
|
+
{{ legend }}
|
|
137
|
+
</legend>
|
|
138
|
+
<div class="k-form-layout k-d-grid" [ngClass]="[columnsClass]" [ngStyle]="{'gap': guttersStyle}">
|
|
139
|
+
<ng-content></ng-content>
|
|
140
|
+
</div>
|
|
141
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
|
|
142
|
+
}
|
|
143
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FormFieldSetComponent, decorators: [{
|
|
144
|
+
type: Component,
|
|
145
|
+
args: [{
|
|
146
|
+
exportAs: 'kendoFormFieldSet',
|
|
147
|
+
selector: 'fieldset[kendoFormFieldSet]',
|
|
148
|
+
template: `
|
|
149
|
+
<legend *ngIf="legend" class="k-form-legend">
|
|
150
|
+
{{ legend }}
|
|
151
|
+
</legend>
|
|
152
|
+
<div class="k-form-layout k-d-grid" [ngClass]="[columnsClass]" [ngStyle]="{'gap': guttersStyle}">
|
|
153
|
+
<ng-content></ng-content>
|
|
154
|
+
</div>
|
|
155
|
+
`,
|
|
156
|
+
standalone: true,
|
|
157
|
+
imports: [NgIf, NgClass, NgStyle],
|
|
158
|
+
}]
|
|
159
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i1.FormService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { formFieldSetClass: [{
|
|
160
|
+
type: HostBinding,
|
|
161
|
+
args: ['class.k-form-fieldset']
|
|
162
|
+
}], legend: [{
|
|
163
|
+
type: Input
|
|
164
|
+
}], cols: [{
|
|
165
|
+
type: Input
|
|
166
|
+
}], gutters: [{
|
|
167
|
+
type: Input
|
|
168
|
+
}], colSpan: [{
|
|
169
|
+
type: Input
|
|
170
|
+
}] } });
|
package/esm2022/index.mjs
CHANGED
|
@@ -35,10 +35,15 @@ export * from './colorpicker/events';
|
|
|
35
35
|
export { FlatColorPickerComponent } from './colorpicker/flatcolorpicker.component';
|
|
36
36
|
export { CheckBoxDirective } from './checkbox/checkbox.directive';
|
|
37
37
|
export { RadioButtonDirective } from './radiobutton/radiobutton.directive';
|
|
38
|
+
// Form Components
|
|
39
|
+
export { FormComponent } from './form/form.component';
|
|
40
|
+
export { FormSeparatorComponent } from './form/formseparator.component';
|
|
41
|
+
export { FormFieldSetComponent } from './formfieldset/formfieldset.component';
|
|
38
42
|
export { HintComponent } from './formfield/hint.component';
|
|
39
43
|
export { ErrorComponent } from './formfield/error.component';
|
|
40
44
|
export { FormFieldComponent } from './formfield/formfield.component';
|
|
41
45
|
export { FormFieldModule } from './formfield.module';
|
|
46
|
+
export { FormModule } from './form.module';
|
|
42
47
|
//TextBox Component
|
|
43
48
|
export { TextBoxComponent } from './textbox/textbox.component';
|
|
44
49
|
export { TextBoxPrefixTemplateDirective } from './textbox/textbox-prefix.directive';
|
|
@@ -30,27 +30,30 @@ import * as i17 from "./radiobutton/radiobutton.component";
|
|
|
30
30
|
import * as i18 from "./radiobutton/radiobutton.directive";
|
|
31
31
|
import * as i19 from "./switch/switch.component";
|
|
32
32
|
import * as i20 from "./switch/localization/custom-messages.component";
|
|
33
|
-
import * as i21 from "./
|
|
34
|
-
import * as i22 from "./
|
|
35
|
-
import * as i23 from "./
|
|
36
|
-
import * as i24 from "./
|
|
37
|
-
import * as i25 from "./
|
|
38
|
-
import * as i26 from "./
|
|
39
|
-
import * as i27 from "./
|
|
40
|
-
import * as i28 from "./
|
|
41
|
-
import * as i29 from "./
|
|
42
|
-
import * as i30 from "./
|
|
43
|
-
import * as i31 from "./
|
|
44
|
-
import * as i32 from "./rating/
|
|
45
|
-
import * as i33 from "./
|
|
46
|
-
import * as i34 from "./
|
|
47
|
-
import * as i35 from "./
|
|
48
|
-
import * as i36 from "./
|
|
49
|
-
import * as i37 from "./
|
|
50
|
-
import * as i38 from "./colorpicker/
|
|
51
|
-
import * as i39 from "./colorpicker/
|
|
52
|
-
import * as i40 from "./
|
|
53
|
-
import * as i41 from "./
|
|
33
|
+
import * as i21 from "./form/form.component";
|
|
34
|
+
import * as i22 from "./form/formseparator.component";
|
|
35
|
+
import * as i23 from "./formfieldset/formfieldset.component";
|
|
36
|
+
import * as i24 from "./formfield/formfield.component";
|
|
37
|
+
import * as i25 from "./formfield/hint.component";
|
|
38
|
+
import * as i26 from "./formfield/error.component";
|
|
39
|
+
import * as i27 from "./slider/slider.component";
|
|
40
|
+
import * as i28 from "./slider/localization/custom-messages.component";
|
|
41
|
+
import * as i29 from "./sliders-common/label-template.directive";
|
|
42
|
+
import * as i30 from "./rangeslider/rangeslider.component";
|
|
43
|
+
import * as i31 from "./rangeslider/localization/custom-messages.component";
|
|
44
|
+
import * as i32 from "./rating/rating.component";
|
|
45
|
+
import * as i33 from "./rating/directives/rating-item.directive";
|
|
46
|
+
import * as i34 from "./rating/directives/rating-hovered-item.directive";
|
|
47
|
+
import * as i35 from "./rating/directives/rating-selected-item.directive";
|
|
48
|
+
import * as i36 from "./signature/signature.component";
|
|
49
|
+
import * as i37 from "./signature/localization/custom-messages.component";
|
|
50
|
+
import * as i38 from "./colorpicker/colorpicker.component";
|
|
51
|
+
import * as i39 from "./colorpicker/localization/custom-messages.component";
|
|
52
|
+
import * as i40 from "./colorpicker/flatcolorpicker.component";
|
|
53
|
+
import * as i41 from "./colorpicker/color-gradient.component";
|
|
54
|
+
import * as i42 from "./colorpicker/color-palette.component";
|
|
55
|
+
import * as i43 from "./otpinput/otpinput.component";
|
|
56
|
+
import * as i44 from "./otpinput/localization/custom-messages.component";
|
|
54
57
|
//IMPORTANT: NgModule export kept for backwards compatibility
|
|
55
58
|
/**
|
|
56
59
|
* Defines the [`NgModule`](link:site.data.urls.angular['ngmoduleapi']) for the Inputs components.
|
|
@@ -74,8 +77,8 @@ import * as i41 from "./otpinput/localization/custom-messages.component";
|
|
|
74
77
|
*/
|
|
75
78
|
export class InputsModule {
|
|
76
79
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: InputsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
77
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: InputsModule, imports: [i1.TextBoxDirective, i2.TextBoxComponent, i3.InputSeparatorComponent, i4.TextBoxSuffixTemplateDirective, i5.TextBoxPrefixTemplateDirective, i6.TextBoxCustomMessagesComponent, i7.PrefixTemplateDirective, i7.SuffixTemplateDirective, i7.SeparatorComponent, i8.NumericTextBoxComponent, i9.NumericTextBoxCustomMessagesComponent, i7.PrefixTemplateDirective, i7.SuffixTemplateDirective, i7.SeparatorComponent, i10.MaskedTextBoxComponent, i7.PrefixTemplateDirective, i7.SuffixTemplateDirective, i7.SeparatorComponent, i11.TextAreaComponent, i12.TextAreaDirective, i13.TextAreaPrefixComponent, i14.TextAreaSuffixComponent, i7.SeparatorComponent, i15.CheckBoxComponent, i16.CheckBoxDirective, i17.RadioButtonComponent, i18.RadioButtonDirective, i19.SwitchComponent, i20.SwitchCustomMessagesComponent, i21.
|
|
78
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: InputsModule, providers: [IconsService, PopupService, ResizeBatchService, DialogContainerService, DialogService, WindowService, WindowContainerService, AdaptiveService], imports: [i2.TextBoxComponent, i7.SeparatorComponent, i8.NumericTextBoxComponent, i7.SeparatorComponent, i7.SeparatorComponent, i7.SeparatorComponent,
|
|
80
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: InputsModule, imports: [i1.TextBoxDirective, i2.TextBoxComponent, i3.InputSeparatorComponent, i4.TextBoxSuffixTemplateDirective, i5.TextBoxPrefixTemplateDirective, i6.TextBoxCustomMessagesComponent, i7.PrefixTemplateDirective, i7.SuffixTemplateDirective, i7.SeparatorComponent, i8.NumericTextBoxComponent, i9.NumericTextBoxCustomMessagesComponent, i7.PrefixTemplateDirective, i7.SuffixTemplateDirective, i7.SeparatorComponent, i10.MaskedTextBoxComponent, i7.PrefixTemplateDirective, i7.SuffixTemplateDirective, i7.SeparatorComponent, i11.TextAreaComponent, i12.TextAreaDirective, i13.TextAreaPrefixComponent, i14.TextAreaSuffixComponent, i7.SeparatorComponent, i15.CheckBoxComponent, i16.CheckBoxDirective, i17.RadioButtonComponent, i18.RadioButtonDirective, i19.SwitchComponent, i20.SwitchCustomMessagesComponent, i21.FormComponent, i22.FormSeparatorComponent, i23.FormFieldSetComponent, i24.FormFieldComponent, i25.HintComponent, i26.ErrorComponent, i24.FormFieldComponent, i25.HintComponent, i26.ErrorComponent, i27.SliderComponent, i28.SliderCustomMessagesComponent, i29.LabelTemplateDirective, i30.RangeSliderComponent, i31.RangeSliderCustomMessagesComponent, i29.LabelTemplateDirective, i32.RatingComponent, i33.RatingItemTemplateDirective, i34.RatingHoveredItemTemplateDirective, i35.RatingSelectedItemTemplateDirective, i36.SignatureComponent, i37.SignatureCustomMessagesComponent, i38.ColorPickerComponent, i39.ColorPickerCustomMessagesComponent, i40.FlatColorPickerComponent, i39.ColorPickerCustomMessagesComponent, i41.ColorGradientComponent, i39.ColorPickerCustomMessagesComponent, i42.ColorPaletteComponent, i39.ColorPickerCustomMessagesComponent, i43.OTPInputComponent, i44.OTPInputCustomMessagesComponent, i7.PrefixTemplateDirective, i7.SuffixTemplateDirective, i7.SeparatorComponent], exports: [i1.TextBoxDirective, i2.TextBoxComponent, i3.InputSeparatorComponent, i4.TextBoxSuffixTemplateDirective, i5.TextBoxPrefixTemplateDirective, i6.TextBoxCustomMessagesComponent, i7.PrefixTemplateDirective, i7.SuffixTemplateDirective, i7.SeparatorComponent, i8.NumericTextBoxComponent, i9.NumericTextBoxCustomMessagesComponent, i7.PrefixTemplateDirective, i7.SuffixTemplateDirective, i7.SeparatorComponent, i10.MaskedTextBoxComponent, i7.PrefixTemplateDirective, i7.SuffixTemplateDirective, i7.SeparatorComponent, i11.TextAreaComponent, i12.TextAreaDirective, i13.TextAreaPrefixComponent, i14.TextAreaSuffixComponent, i7.SeparatorComponent, i15.CheckBoxComponent, i16.CheckBoxDirective, i17.RadioButtonComponent, i18.RadioButtonDirective, i19.SwitchComponent, i20.SwitchCustomMessagesComponent, i21.FormComponent, i22.FormSeparatorComponent, i23.FormFieldSetComponent, i24.FormFieldComponent, i25.HintComponent, i26.ErrorComponent, i24.FormFieldComponent, i25.HintComponent, i26.ErrorComponent, i27.SliderComponent, i28.SliderCustomMessagesComponent, i29.LabelTemplateDirective, i30.RangeSliderComponent, i31.RangeSliderCustomMessagesComponent, i29.LabelTemplateDirective, i32.RatingComponent, i33.RatingItemTemplateDirective, i34.RatingHoveredItemTemplateDirective, i35.RatingSelectedItemTemplateDirective, i36.SignatureComponent, i37.SignatureCustomMessagesComponent, i38.ColorPickerComponent, i39.ColorPickerCustomMessagesComponent, i40.FlatColorPickerComponent, i39.ColorPickerCustomMessagesComponent, i41.ColorGradientComponent, i39.ColorPickerCustomMessagesComponent, i42.ColorPaletteComponent, i39.ColorPickerCustomMessagesComponent, i43.OTPInputComponent, i44.OTPInputCustomMessagesComponent, i7.PrefixTemplateDirective, i7.SuffixTemplateDirective, i7.SeparatorComponent] });
|
|
81
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: InputsModule, providers: [IconsService, PopupService, ResizeBatchService, DialogContainerService, DialogService, WindowService, WindowContainerService, AdaptiveService], imports: [i2.TextBoxComponent, i7.SeparatorComponent, i8.NumericTextBoxComponent, i7.SeparatorComponent, i7.SeparatorComponent, i7.SeparatorComponent, i21.FormComponent, i27.SliderComponent, i30.RangeSliderComponent, i32.RatingComponent, i36.SignatureComponent, i38.ColorPickerComponent, i40.FlatColorPickerComponent, i41.ColorGradientComponent, i43.OTPInputComponent, i7.SeparatorComponent] });
|
|
79
82
|
}
|
|
80
83
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: InputsModule, decorators: [{
|
|
81
84
|
type: NgModule,
|
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
import { ChangeDetectorRef, Component, ElementRef, EventEmitter, HostBinding, Injector, Input, NgZone, Output, QueryList, Renderer2, ViewChildren, forwardRef } from "@angular/core";
|
|
6
6
|
import { SharedInputEventsDirective } from "../shared/shared-events.directive";
|
|
7
7
|
import { NgFor, NgIf } from "@angular/common";
|
|
8
|
-
import { KendoInput, Keys, hasObservers, isPresent } from "@progress/kendo-angular-common";
|
|
8
|
+
import { KendoInput, Keys, hasObservers, isPresent, replaceMessagePlaceholder } from "@progress/kendo-angular-common";
|
|
9
9
|
import { TextBoxComponent } from "../textbox/textbox.component";
|
|
10
10
|
import { NG_VALUE_ACCESSOR, NgControl } from "@angular/forms";
|
|
11
|
-
import { SIZE_MAP, areSame
|
|
11
|
+
import { SIZE_MAP, areSame } from "../common/utils";
|
|
12
12
|
import { L10N_PREFIX, LocalizationService } from "@progress/kendo-angular-l10n";
|
|
13
13
|
import { OTPInputSeparatorComponent } from "./otpinput-separator.component";
|
|
14
14
|
import { take } from "rxjs/operators";
|
|
@@ -10,7 +10,7 @@ export const packageMetadata = {
|
|
|
10
10
|
productName: 'Kendo UI for Angular',
|
|
11
11
|
productCode: 'KENDOUIANGULAR',
|
|
12
12
|
productCodes: ['KENDOUIANGULAR'],
|
|
13
|
-
publishDate:
|
|
14
|
-
version: '19.3.0-develop.
|
|
13
|
+
publishDate: 1754574024,
|
|
14
|
+
version: '19.3.0-develop.30',
|
|
15
15
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
|
|
16
16
|
};
|
|
@@ -16,6 +16,8 @@ import { SliderBase } from '../sliders-common/slider-base';
|
|
|
16
16
|
import { SliderTicksComponent } from '../sliders-common/slider-ticks.component';
|
|
17
17
|
import { NgIf } from '@angular/common';
|
|
18
18
|
import { LocalizedRangeSliderMessagesDirective } from './localization/localized-rangeslider-messages.directive';
|
|
19
|
+
import { validatePackage } from '@progress/kendo-licensing';
|
|
20
|
+
import { packageMetadata } from '../package-metadata';
|
|
19
21
|
import * as i0 from "@angular/core";
|
|
20
22
|
import * as i1 from "@progress/kendo-angular-l10n";
|
|
21
23
|
const PRESSED = 'k-pressed';
|
|
@@ -70,6 +72,7 @@ export class RangeSliderComponent extends SliderBase {
|
|
|
70
72
|
this.ngZone = ngZone;
|
|
71
73
|
this.changeDetector = changeDetector;
|
|
72
74
|
this.hostElement = hostElement;
|
|
75
|
+
validatePackage(packageMetadata);
|
|
73
76
|
}
|
|
74
77
|
/**
|
|
75
78
|
* Focuses the RangeSlider.
|
|
@@ -22,7 +22,7 @@ export class TextFieldsBase {
|
|
|
22
22
|
/**
|
|
23
23
|
* Sets the `title` attribute of the internal textarea input element of the component.
|
|
24
24
|
*/
|
|
25
|
-
title
|
|
25
|
+
title;
|
|
26
26
|
/**
|
|
27
27
|
* Sets the disabled state of the TextArea component. To learn how to disable the component in reactive forms, refer to the article on [Forms Support](slug:formssupport_textarea#toc-managing-the-textarea-disabled-state-in-reactive-forms).
|
|
28
28
|
*
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/**-----------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright © 2025 Progress Software Corporation. All rights reserved.
|
|
3
|
+
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
+
*-------------------------------------------------------------------------------------------*/
|
|
5
|
+
export {};
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
import { Component, HostBinding, Input, Output, ElementRef, EventEmitter, NgZone, Renderer2, ChangeDetectorRef, Injector, forwardRef, ContentChild } from '@angular/core';
|
|
6
6
|
import { fromEvent } from 'rxjs';
|
|
7
|
-
import { debounceTime } from 'rxjs/operators';
|
|
7
|
+
import { debounceTime, take } from 'rxjs/operators';
|
|
8
8
|
import { NG_VALUE_ACCESSOR, NgControl } from '@angular/forms';
|
|
9
9
|
import { KendoInput, guid, isDocumentAvailable, hasObservers, setHTMLAttributes, isControlRequired, isObjectPresent, removeHTMLAttributes, parseAttributes, EventsOutsideAngularDirective } from '@progress/kendo-angular-common';
|
|
10
10
|
import { LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n';
|
|
@@ -122,6 +122,10 @@ export class TextAreaComponent extends TextFieldsBase {
|
|
|
122
122
|
* Sets the maximum number of characters allowed in the text area.
|
|
123
123
|
*/
|
|
124
124
|
maxlength;
|
|
125
|
+
/**
|
|
126
|
+
* @hidden
|
|
127
|
+
*/
|
|
128
|
+
maxResizableRows;
|
|
125
129
|
/**
|
|
126
130
|
* Sets the [`tabindex`](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex) of the component.
|
|
127
131
|
* @default 0
|
|
@@ -212,6 +216,7 @@ export class TextAreaComponent extends TextFieldsBase {
|
|
|
212
216
|
*/
|
|
213
217
|
valueChange = new EventEmitter();
|
|
214
218
|
initialHeight;
|
|
219
|
+
maxResizableHeight;
|
|
215
220
|
resizeSubscription;
|
|
216
221
|
_size = 'medium';
|
|
217
222
|
_rounded = 'medium';
|
|
@@ -252,10 +257,24 @@ export class TextAreaComponent extends TextFieldsBase {
|
|
|
252
257
|
validatePackage(packageMetadata);
|
|
253
258
|
this.direction = localizationService.rtl ? 'rtl' : 'ltr';
|
|
254
259
|
}
|
|
260
|
+
ngAfterContentInit() {
|
|
261
|
+
this.ngZone.onStable.pipe((take(1))).subscribe(() => {
|
|
262
|
+
this.prefix && (this.prefix.orientation = this.adornmentsOrientation);
|
|
263
|
+
this.suffix && (this.suffix.orientation = this.adornmentsOrientation);
|
|
264
|
+
});
|
|
265
|
+
}
|
|
255
266
|
ngAfterViewInit() {
|
|
256
267
|
this.ngZone.runOutsideAngular(() => {
|
|
257
268
|
this.handleFlow();
|
|
258
269
|
});
|
|
270
|
+
this.ngZone.onStable.pipe(take(1)).subscribe(() => {
|
|
271
|
+
if (this.prefix) {
|
|
272
|
+
this.prefix.flow = this.flow;
|
|
273
|
+
}
|
|
274
|
+
if (this.suffix) {
|
|
275
|
+
this.suffix.flow = this.flow;
|
|
276
|
+
}
|
|
277
|
+
});
|
|
259
278
|
const stylingInputs = ['size', 'rounded', 'fillMode'];
|
|
260
279
|
stylingInputs.forEach(input => {
|
|
261
280
|
this.handleClasses(this[input], input);
|
|
@@ -283,8 +302,14 @@ export class TextAreaComponent extends TextFieldsBase {
|
|
|
283
302
|
}
|
|
284
303
|
if (changes.resizable) {
|
|
285
304
|
if (this.resizable === 'auto') {
|
|
286
|
-
this.
|
|
287
|
-
|
|
305
|
+
this.ngZone.onStable.pipe(take(1)).subscribe(() => {
|
|
306
|
+
this.renderer.removeClass(element, '\!k-overflow-y-auto');
|
|
307
|
+
this.initialHeight = element.offsetHeight;
|
|
308
|
+
if (this.maxResizableRows && this.rows) {
|
|
309
|
+
const heightValue = parseFloat(getComputedStyle(element).getPropertyValue('height')) - 2 * parseFloat(getComputedStyle(element).getPropertyValue('padding'));
|
|
310
|
+
this.maxResizableHeight = this.initialHeight + (heightValue * (this.maxResizableRows - this.rows));
|
|
311
|
+
}
|
|
312
|
+
});
|
|
288
313
|
}
|
|
289
314
|
else if (this.resizable !== 'both') {
|
|
290
315
|
this.renderer.addClass(element, '\!k-overflow-y-auto');
|
|
@@ -448,6 +473,10 @@ export class TextAreaComponent extends TextFieldsBase {
|
|
|
448
473
|
const element = this.input.nativeElement;
|
|
449
474
|
this.renderer.setStyle(element, 'height', `${this.initialHeight}px`);
|
|
450
475
|
const scrollHeight = element.scrollHeight;
|
|
476
|
+
if (scrollHeight > this.maxResizableHeight) {
|
|
477
|
+
this.renderer.setStyle(element, 'height', `${this.maxResizableHeight}px`);
|
|
478
|
+
return;
|
|
479
|
+
}
|
|
451
480
|
this.renderer.setStyle(hostElement, 'min-height', `${scrollHeight}px`);
|
|
452
481
|
if (scrollHeight > this.initialHeight) {
|
|
453
482
|
this.renderer.setStyle(element, 'height', `${scrollHeight}px`);
|
|
@@ -518,7 +547,7 @@ export class TextAreaComponent extends TextFieldsBase {
|
|
|
518
547
|
setHTMLAttributes(attributesToRender, this.renderer, this.input.nativeElement, this.ngZone);
|
|
519
548
|
}
|
|
520
549
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.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 });
|
|
521
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TextAreaComponent, isStandalone: true, selector: "kendo-textarea", inputs: { focusableId: "focusableId", flow: "flow", inputAttributes: "inputAttributes", adornmentsOrientation: "adornmentsOrientation", rows: "rows", cols: "cols", maxlength: "maxlength", tabindex: "tabindex", tabIndex: "tabIndex", resizable: "resizable", size: "size", rounded: "rounded", fillMode: "fillMode", showPrefixSeparator: "showPrefixSeparator", showSuffixSeparator: "showSuffixSeparator" }, 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: [
|
|
550
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TextAreaComponent, isStandalone: true, selector: "kendo-textarea", inputs: { focusableId: "focusableId", flow: "flow", inputAttributes: "inputAttributes", adornmentsOrientation: "adornmentsOrientation", rows: "rows", cols: "cols", maxlength: "maxlength", maxResizableRows: "maxResizableRows", tabindex: "tabindex", tabIndex: "tabIndex", resizable: "resizable", size: "size", rounded: "rounded", fillMode: "fillMode", showPrefixSeparator: "showPrefixSeparator", showSuffixSeparator: "showSuffixSeparator" }, 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: [
|
|
522
551
|
LocalizationService,
|
|
523
552
|
{ provide: L10N_PREFIX, useValue: 'kendo.textarea' },
|
|
524
553
|
{
|
|
@@ -660,6 +689,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
660
689
|
type: Input
|
|
661
690
|
}], maxlength: [{
|
|
662
691
|
type: Input
|
|
692
|
+
}], maxResizableRows: [{
|
|
693
|
+
type: Input
|
|
663
694
|
}], tabindex: [{
|
|
664
695
|
type: Input
|
|
665
696
|
}], tabIndex: [{
|