@progress/kendo-angular-inputs 19.3.0-develop.9 → 19.3.0
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/colorpicker/color-palette.component.d.ts +1 -1
- package/colorpicker/colorpicker.component.d.ts +1 -1
- package/common/models/gutters.d.ts +15 -9
- package/common/models/responsive-breakpoints.d.ts +16 -6
- package/esm2022/colorpicker/color-palette.component.mjs +3 -2
- package/esm2022/colorpicker/colorpicker.component.mjs +5 -4
- package/esm2022/form/form.component.mjs +22 -21
- package/esm2022/form/utils.mjs +24 -14
- package/esm2022/formfieldset/formfieldset.component.mjs +13 -18
- package/esm2022/numerictextbox/numerictextbox.component.mjs +5 -4
- package/esm2022/otpinput/otpinput.component.mjs +5 -4
- package/esm2022/package-metadata.mjs +2 -2
- package/esm2022/rangeslider/rangeslider.component.mjs +5 -3
- package/esm2022/rating/rating.component.mjs +31 -26
- package/esm2022/shared/shared-events.directive.mjs +1 -1
- package/esm2022/signature/signature.component.mjs +1 -1
- package/esm2022/slider/slider.component.mjs +5 -3
- package/esm2022/switch/switch.component.mjs +2 -2
- 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 +28 -3
- package/fesm2022/progress-kendo-angular-inputs.mjs +141 -98
- package/form/form.component.d.ts +5 -5
- package/form/utils.d.ts +19 -14
- package/formfieldset/formfieldset.component.d.ts +3 -7
- package/index.d.ts +2 -0
- package/numerictextbox/numerictextbox.component.d.ts +1 -1
- package/package.json +13 -13
- package/rangeslider/rangeslider.component.d.ts +1 -1
- package/slider/slider.component.d.ts +1 -1
- 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 +6 -1
|
@@ -10,7 +10,7 @@ import { take, tap, filter, concatMap, startWith, takeUntil, skip, debounceTime,
|
|
|
10
10
|
import * as i1 from '@progress/kendo-angular-l10n';
|
|
11
11
|
import { ComponentMessages, LocalizationService, L10N_PREFIX, RTL } from '@progress/kendo-angular-l10n';
|
|
12
12
|
import * as i7 from '@progress/kendo-angular-common';
|
|
13
|
-
import { Keys, guid, anyChanged, isDocumentAvailable, hasObservers, KendoInput, EventsOutsideAngularDirective, DraggableDirective, ResizeSensorComponent, isObjectPresent, removeHTMLAttributes, parseAttributes, isControlRequired, setHTMLAttributes, SuffixTemplateDirective, PrefixTemplateDirective, isChanged, isPresent as isPresent$1, isSafari, PreventableEvent, findFocusableChild, parseCSSClassNames, closest as closest$1, replaceMessagePlaceholder, shouldShowValidationUI, WatermarkOverlayComponent, SeparatorComponent, ResizeBatchService, KENDO_ADORNMENTS } from '@progress/kendo-angular-common';
|
|
13
|
+
import { Keys, guid, anyChanged, isDocumentAvailable, normalizeNumpadKeys, hasObservers, KendoInput, EventsOutsideAngularDirective, DraggableDirective, ResizeSensorComponent, isObjectPresent, removeHTMLAttributes, parseAttributes, isControlRequired, setHTMLAttributes, SuffixTemplateDirective, PrefixTemplateDirective, isChanged, isPresent as isPresent$1, isSafari, PreventableEvent, findFocusableChild, parseCSSClassNames, closest as closest$1, processCssValue, replaceMessagePlaceholder, getLicenseMessage, shouldShowValidationUI, WatermarkOverlayComponent, SeparatorComponent, ResizeBatchService, KENDO_ADORNMENTS } from '@progress/kendo-angular-common';
|
|
14
14
|
export { PrefixTemplateDirective, SeparatorComponent, SuffixTemplateDirective } from '@progress/kendo-angular-common';
|
|
15
15
|
import { validatePackage } from '@progress/kendo-licensing';
|
|
16
16
|
import { caretAltUpIcon, caretAltDownIcon, caretAltLeftIcon, caretAltRightIcon, checkIcon, exclamationCircleIcon, xIcon, caretAltExpandIcon, xCircleIcon, dropletSlashIcon, dropletSliderIcon, paletteIcon, starIcon, starOutlineIcon, hyperlinkOpenIcon } from '@progress/kendo-svg-icons';
|
|
@@ -550,8 +550,8 @@ const packageMetadata = {
|
|
|
550
550
|
productName: 'Kendo UI for Angular',
|
|
551
551
|
productCode: 'KENDOUIANGULAR',
|
|
552
552
|
productCodes: ['KENDOUIANGULAR'],
|
|
553
|
-
publishDate:
|
|
554
|
-
version: '19.3.0
|
|
553
|
+
publishDate: 1755030422,
|
|
554
|
+
version: '19.3.0',
|
|
555
555
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
|
|
556
556
|
};
|
|
557
557
|
|
|
@@ -1263,7 +1263,9 @@ class SliderComponent extends SliderBase {
|
|
|
1263
1263
|
onKeyDown = (e) => {
|
|
1264
1264
|
const options = this.getProps();
|
|
1265
1265
|
const { max, min } = options;
|
|
1266
|
-
|
|
1266
|
+
// on some keyboards arrow keys, PageUp/Down, and Home/End are mapped to Numpad keys
|
|
1267
|
+
const code = normalizeNumpadKeys(e);
|
|
1268
|
+
const handler = this.keyBinding[code];
|
|
1267
1269
|
if (this.isDisabled || !handler) {
|
|
1268
1270
|
return;
|
|
1269
1271
|
}
|
|
@@ -1448,7 +1450,7 @@ class SliderComponent extends SliderBase {
|
|
|
1448
1450
|
cursorInsideWrapper = false;
|
|
1449
1451
|
}));
|
|
1450
1452
|
this.subscriptions.add(this.renderer.listen(hostElement, 'keydown', (args) => {
|
|
1451
|
-
if (args.
|
|
1453
|
+
if (args.code === Keys.Tab) {
|
|
1452
1454
|
tabbing = true;
|
|
1453
1455
|
}
|
|
1454
1456
|
else {
|
|
@@ -2026,7 +2028,9 @@ class RangeSliderComponent extends SliderBase {
|
|
|
2026
2028
|
this.value = this.value || [this.min, this.min];
|
|
2027
2029
|
const options = this.getProps();
|
|
2028
2030
|
const { max, min } = options;
|
|
2029
|
-
|
|
2031
|
+
// on some keyboards arrow keys, PageUp/Down, and Home/End are mapped to Numpad keys
|
|
2032
|
+
const code = normalizeNumpadKeys(e);
|
|
2033
|
+
const handler = this.keyBinding[code];
|
|
2030
2034
|
if (this.isDisabled || !handler) {
|
|
2031
2035
|
return;
|
|
2032
2036
|
}
|
|
@@ -2218,7 +2222,7 @@ class RangeSliderComponent extends SliderBase {
|
|
|
2218
2222
|
cursorInsideWrapper = false;
|
|
2219
2223
|
}));
|
|
2220
2224
|
this.subscriptions.add(this.renderer.listen(hostElement, 'keydown', (args) => {
|
|
2221
|
-
if (args.
|
|
2225
|
+
if (args.code === Keys.Tab) {
|
|
2222
2226
|
tabbing = true;
|
|
2223
2227
|
}
|
|
2224
2228
|
else {
|
|
@@ -2797,8 +2801,8 @@ class SwitchComponent {
|
|
|
2797
2801
|
* @hidden
|
|
2798
2802
|
*/
|
|
2799
2803
|
keyDownHandler(e) {
|
|
2800
|
-
const keyCode = e.
|
|
2801
|
-
if (this.isEnabled && (keyCode === Keys.Space || keyCode === Keys.Enter)) {
|
|
2804
|
+
const keyCode = e.code;
|
|
2805
|
+
if (this.isEnabled && (keyCode === Keys.Space || keyCode === Keys.Enter || keyCode === Keys.NumpadEnter)) {
|
|
2802
2806
|
this.changeValue(!this.checked);
|
|
2803
2807
|
e.preventDefault();
|
|
2804
2808
|
}
|
|
@@ -3693,7 +3697,7 @@ class SharedInputEventsDirective {
|
|
|
3693
3697
|
cursorInsideWrapper = false;
|
|
3694
3698
|
}));
|
|
3695
3699
|
this.subscriptions.add(this.renderer.listen(hostElement, 'keydown', (args) => {
|
|
3696
|
-
if (args.
|
|
3700
|
+
if (args.code === Keys.Tab) {
|
|
3697
3701
|
tabbing = true;
|
|
3698
3702
|
}
|
|
3699
3703
|
else {
|
|
@@ -4375,10 +4379,11 @@ class NumericTextBoxComponent {
|
|
|
4375
4379
|
return;
|
|
4376
4380
|
}
|
|
4377
4381
|
let step;
|
|
4378
|
-
|
|
4382
|
+
const code = normalizeNumpadKeys(e);
|
|
4383
|
+
if (code === Keys.ArrowDown) {
|
|
4379
4384
|
step = -1;
|
|
4380
4385
|
}
|
|
4381
|
-
else if (
|
|
4386
|
+
else if (code === Keys.ArrowUp) {
|
|
4382
4387
|
step = 1;
|
|
4383
4388
|
}
|
|
4384
4389
|
if (step && this.step) {
|
|
@@ -4390,7 +4395,7 @@ class NumericTextBoxComponent {
|
|
|
4390
4395
|
end: input.selectionEnd,
|
|
4391
4396
|
start: input.selectionStart
|
|
4392
4397
|
};
|
|
4393
|
-
this.pressedKey =
|
|
4398
|
+
this.pressedKey = code;
|
|
4394
4399
|
};
|
|
4395
4400
|
/**
|
|
4396
4401
|
* @hidden
|
|
@@ -10854,8 +10859,9 @@ class ColorPaletteComponent {
|
|
|
10854
10859
|
* @hidden
|
|
10855
10860
|
*/
|
|
10856
10861
|
handleKeydown(event) {
|
|
10862
|
+
const code = normalizeNumpadKeys(event);
|
|
10857
10863
|
const isRTL = this.direction === 'rtl';
|
|
10858
|
-
switch (
|
|
10864
|
+
switch (code) {
|
|
10859
10865
|
case Keys.ArrowDown:
|
|
10860
10866
|
this.handleCellNavigation(0, 1);
|
|
10861
10867
|
break;
|
|
@@ -13403,7 +13409,8 @@ class ColorPickerComponent {
|
|
|
13403
13409
|
* @hidden
|
|
13404
13410
|
*/
|
|
13405
13411
|
handleWrapperKeyDown(event) {
|
|
13406
|
-
|
|
13412
|
+
const code = normalizeNumpadKeys(event);
|
|
13413
|
+
if (code === Keys.ArrowDown || code === Keys.Enter) {
|
|
13407
13414
|
event.preventDefault();
|
|
13408
13415
|
this.ngZone.run(() => {
|
|
13409
13416
|
this.toggleWithEvents(true);
|
|
@@ -13439,11 +13446,11 @@ class ColorPickerComponent {
|
|
|
13439
13446
|
* @hidden
|
|
13440
13447
|
*/
|
|
13441
13448
|
handlePopupKeyDown(event) {
|
|
13442
|
-
if (event.
|
|
13449
|
+
if (event.code === Keys.Escape) {
|
|
13443
13450
|
this.toggleWithEvents(false);
|
|
13444
13451
|
this.host.nativeElement.focus();
|
|
13445
13452
|
}
|
|
13446
|
-
if (event.
|
|
13453
|
+
if (event.code === Keys.Tab) {
|
|
13447
13454
|
const currentElement = event.shiftKey ? this.firstFocusableElement.nativeElement : this.lastFocusableElement.nativeElement;
|
|
13448
13455
|
const nextElement = event.shiftKey ? this.lastFocusableElement.nativeElement : this.firstFocusableElement.nativeElement;
|
|
13449
13456
|
if (event.target === currentElement) {
|
|
@@ -14215,6 +14222,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
14215
14222
|
}]
|
|
14216
14223
|
}] });
|
|
14217
14224
|
|
|
14225
|
+
/**
|
|
14226
|
+
* @hidden
|
|
14227
|
+
*/
|
|
14228
|
+
const DEFAULT_FORM_GUTTERS = { rows: '0px', cols: '32px' };
|
|
14229
|
+
/**
|
|
14230
|
+
* @hidden
|
|
14231
|
+
*/
|
|
14232
|
+
const DEFAULT_FORMFIELDSET_GUTTERS = { rows: '0px', cols: '16px' };
|
|
14218
14233
|
/**
|
|
14219
14234
|
* @hidden
|
|
14220
14235
|
*/
|
|
@@ -14230,7 +14245,7 @@ function innerWidth(element) {
|
|
|
14230
14245
|
*/
|
|
14231
14246
|
function processBreakpoints(breakpoints, containerWidth) {
|
|
14232
14247
|
if (!breakpoints?.length || containerWidth === null) {
|
|
14233
|
-
return
|
|
14248
|
+
return '';
|
|
14234
14249
|
}
|
|
14235
14250
|
for (const [index, breakpoint] of breakpoints.entries()) {
|
|
14236
14251
|
const minBreakpointWidth = breakpoint.minWidth || breakpoints[index - 1]?.maxWidth + 1 || 0;
|
|
@@ -14239,7 +14254,7 @@ function processBreakpoints(breakpoints, containerWidth) {
|
|
|
14239
14254
|
return breakpoint.value;
|
|
14240
14255
|
}
|
|
14241
14256
|
}
|
|
14242
|
-
return
|
|
14257
|
+
return '';
|
|
14243
14258
|
}
|
|
14244
14259
|
/**
|
|
14245
14260
|
* @hidden
|
|
@@ -14249,7 +14264,8 @@ const calculateColumns = (cols, containerWidth) => {
|
|
|
14249
14264
|
return null;
|
|
14250
14265
|
}
|
|
14251
14266
|
if (Array.isArray(cols) && cols.length > 0) {
|
|
14252
|
-
|
|
14267
|
+
const processedCols = processBreakpoints(cols, containerWidth) || null;
|
|
14268
|
+
return typeof processedCols === 'string' ? parseInt(processedCols, 10) : processedCols;
|
|
14253
14269
|
}
|
|
14254
14270
|
else if (typeof cols === 'number') {
|
|
14255
14271
|
return cols;
|
|
@@ -14265,18 +14281,18 @@ const calculateGutters = (gutters, containerWidth) => {
|
|
|
14265
14281
|
if (!gutters) {
|
|
14266
14282
|
return null;
|
|
14267
14283
|
}
|
|
14268
|
-
if (typeof gutters === 'number') {
|
|
14284
|
+
if (typeof gutters === 'number' || typeof gutters === 'string') {
|
|
14269
14285
|
return { cols: gutters, rows: gutters };
|
|
14270
14286
|
}
|
|
14271
14287
|
else if (Array.isArray(gutters)) {
|
|
14272
|
-
const processedGutters = processBreakpoints(gutters, containerWidth);
|
|
14288
|
+
const processedGutters = processBreakpoints(gutters, containerWidth) || null;
|
|
14273
14289
|
return processedGutters !== null ? { cols: processedGutters, rows: processedGutters } : null;
|
|
14274
14290
|
}
|
|
14275
14291
|
else if (typeof gutters === 'object') {
|
|
14276
14292
|
const gutterObject = gutters;
|
|
14277
14293
|
const result = { rows: null, cols: null };
|
|
14278
14294
|
if (gutterObject.cols !== undefined && gutterObject.cols !== null) {
|
|
14279
|
-
if (typeof gutterObject.cols === 'number') {
|
|
14295
|
+
if (typeof gutterObject.cols === 'number' || typeof gutterObject.cols === 'string') {
|
|
14280
14296
|
result.cols = gutterObject.cols;
|
|
14281
14297
|
}
|
|
14282
14298
|
else if (Array.isArray(gutterObject.cols)) {
|
|
@@ -14287,7 +14303,7 @@ const calculateGutters = (gutters, containerWidth) => {
|
|
|
14287
14303
|
result.cols = null;
|
|
14288
14304
|
}
|
|
14289
14305
|
if (gutterObject.rows !== undefined) {
|
|
14290
|
-
if (typeof gutterObject.rows === 'number') {
|
|
14306
|
+
if (typeof gutterObject.rows === 'number' || typeof gutterObject.rows === 'string') {
|
|
14291
14307
|
result.rows = gutterObject.rows;
|
|
14292
14308
|
}
|
|
14293
14309
|
else if (Array.isArray(gutterObject.rows)) {
|
|
@@ -14314,7 +14330,8 @@ const calculateColSpan = (colSpan, containerWidth) => {
|
|
|
14314
14330
|
return colSpan;
|
|
14315
14331
|
}
|
|
14316
14332
|
else if (Array.isArray(colSpan) && colSpan.length > 0) {
|
|
14317
|
-
|
|
14333
|
+
const processedColSpan = processBreakpoints(colSpan, containerWidth) || null;
|
|
14334
|
+
return typeof processedColSpan === 'string' ? parseInt(processedColSpan, 10) : processedColSpan;
|
|
14318
14335
|
}
|
|
14319
14336
|
return null;
|
|
14320
14337
|
};
|
|
@@ -14329,13 +14346,12 @@ const generateColumnClass = (columnsNumber) => {
|
|
|
14329
14346
|
/**
|
|
14330
14347
|
* @hidden
|
|
14331
14348
|
*
|
|
14332
|
-
* Generates CSS
|
|
14349
|
+
* Generates CSS styles for gutters based on the provided gutters object.
|
|
14333
14350
|
*/
|
|
14334
|
-
const
|
|
14335
|
-
|
|
14336
|
-
|
|
14337
|
-
|
|
14338
|
-
};
|
|
14351
|
+
const generateGuttersStyling = (gutters, defaultGutters = DEFAULT_FORM_GUTTERS) => {
|
|
14352
|
+
const rows = processCssValue(gutters?.rows);
|
|
14353
|
+
const cols = processCssValue(gutters?.cols);
|
|
14354
|
+
return `${rows ?? defaultGutters.rows} ${cols ?? defaultGutters.cols}`;
|
|
14339
14355
|
};
|
|
14340
14356
|
/**
|
|
14341
14357
|
* @hidden
|
|
@@ -15389,33 +15405,38 @@ class RatingComponent {
|
|
|
15389
15405
|
this.cdr.markForCheck();
|
|
15390
15406
|
}
|
|
15391
15407
|
};
|
|
15392
|
-
|
|
15393
|
-
|
|
15394
|
-
|
|
15395
|
-
if (event.keyCode === Keys.ArrowLeft) {
|
|
15396
|
-
if (this.direction === 'ltr') {
|
|
15408
|
+
const code = normalizeNumpadKeys(event);
|
|
15409
|
+
switch (code) {
|
|
15410
|
+
case Keys.ArrowDown:
|
|
15397
15411
|
decreaseValue();
|
|
15398
|
-
|
|
15399
|
-
|
|
15400
|
-
|
|
15401
|
-
|
|
15402
|
-
|
|
15403
|
-
|
|
15404
|
-
|
|
15405
|
-
|
|
15406
|
-
|
|
15407
|
-
|
|
15412
|
+
break;
|
|
15413
|
+
case Keys.ArrowLeft:
|
|
15414
|
+
if (this.direction === 'ltr') {
|
|
15415
|
+
decreaseValue();
|
|
15416
|
+
}
|
|
15417
|
+
else {
|
|
15418
|
+
increaseValue();
|
|
15419
|
+
}
|
|
15420
|
+
break;
|
|
15421
|
+
case Keys.ArrowUp:
|
|
15408
15422
|
increaseValue();
|
|
15409
|
-
|
|
15410
|
-
|
|
15411
|
-
|
|
15412
|
-
|
|
15413
|
-
|
|
15414
|
-
|
|
15415
|
-
|
|
15416
|
-
|
|
15417
|
-
|
|
15418
|
-
|
|
15423
|
+
break;
|
|
15424
|
+
case Keys.ArrowRight:
|
|
15425
|
+
if (this.direction === 'ltr') {
|
|
15426
|
+
increaseValue();
|
|
15427
|
+
}
|
|
15428
|
+
else {
|
|
15429
|
+
decreaseValue();
|
|
15430
|
+
}
|
|
15431
|
+
break;
|
|
15432
|
+
case Keys.Home:
|
|
15433
|
+
setMinValue();
|
|
15434
|
+
break;
|
|
15435
|
+
case Keys.End:
|
|
15436
|
+
setMaxValue();
|
|
15437
|
+
break;
|
|
15438
|
+
default:
|
|
15439
|
+
break;
|
|
15419
15440
|
}
|
|
15420
15441
|
}
|
|
15421
15442
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: RatingComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i1.LocalizationService }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
|
|
@@ -16364,7 +16385,7 @@ class SignatureComponent {
|
|
|
16364
16385
|
* @hidden
|
|
16365
16386
|
*/
|
|
16366
16387
|
onDialogKeydown(e) {
|
|
16367
|
-
if (e.
|
|
16388
|
+
if (e.code === Keys.Escape) {
|
|
16368
16389
|
this.isOpen = false;
|
|
16369
16390
|
this.cd.detectChanges();
|
|
16370
16391
|
this.maximizeButton?.nativeElement.focus();
|
|
@@ -17075,7 +17096,7 @@ class TextFieldsBase {
|
|
|
17075
17096
|
/**
|
|
17076
17097
|
* Sets the `title` attribute of the internal textarea input element of the component.
|
|
17077
17098
|
*/
|
|
17078
|
-
title
|
|
17099
|
+
title;
|
|
17079
17100
|
/**
|
|
17080
17101
|
* 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).
|
|
17081
17102
|
*
|
|
@@ -17304,6 +17325,10 @@ class TextAreaComponent extends TextFieldsBase {
|
|
|
17304
17325
|
* Sets the maximum number of characters allowed in the text area.
|
|
17305
17326
|
*/
|
|
17306
17327
|
maxlength;
|
|
17328
|
+
/**
|
|
17329
|
+
* @hidden
|
|
17330
|
+
*/
|
|
17331
|
+
maxResizableRows;
|
|
17307
17332
|
/**
|
|
17308
17333
|
* Sets the [`tabindex`](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex) of the component.
|
|
17309
17334
|
* @default 0
|
|
@@ -17394,6 +17419,7 @@ class TextAreaComponent extends TextFieldsBase {
|
|
|
17394
17419
|
*/
|
|
17395
17420
|
valueChange = new EventEmitter();
|
|
17396
17421
|
initialHeight;
|
|
17422
|
+
maxResizableHeight;
|
|
17397
17423
|
resizeSubscription;
|
|
17398
17424
|
_size = 'medium';
|
|
17399
17425
|
_rounded = 'medium';
|
|
@@ -17444,6 +17470,14 @@ class TextAreaComponent extends TextFieldsBase {
|
|
|
17444
17470
|
this.ngZone.runOutsideAngular(() => {
|
|
17445
17471
|
this.handleFlow();
|
|
17446
17472
|
});
|
|
17473
|
+
this.ngZone.onStable.pipe(take(1)).subscribe(() => {
|
|
17474
|
+
if (this.prefix) {
|
|
17475
|
+
this.prefix.flow = this.flow;
|
|
17476
|
+
}
|
|
17477
|
+
if (this.suffix) {
|
|
17478
|
+
this.suffix.flow = this.flow;
|
|
17479
|
+
}
|
|
17480
|
+
});
|
|
17447
17481
|
const stylingInputs = ['size', 'rounded', 'fillMode'];
|
|
17448
17482
|
stylingInputs.forEach(input => {
|
|
17449
17483
|
this.handleClasses(this[input], input);
|
|
@@ -17471,8 +17505,14 @@ class TextAreaComponent extends TextFieldsBase {
|
|
|
17471
17505
|
}
|
|
17472
17506
|
if (changes.resizable) {
|
|
17473
17507
|
if (this.resizable === 'auto') {
|
|
17474
|
-
this.
|
|
17475
|
-
|
|
17508
|
+
this.ngZone.onStable.pipe(take(1)).subscribe(() => {
|
|
17509
|
+
this.renderer.removeClass(element, '\!k-overflow-y-auto');
|
|
17510
|
+
this.initialHeight = element.offsetHeight;
|
|
17511
|
+
if (this.maxResizableRows && this.rows) {
|
|
17512
|
+
const heightValue = parseFloat(getComputedStyle(element).getPropertyValue('height')) - 2 * parseFloat(getComputedStyle(element).getPropertyValue('padding'));
|
|
17513
|
+
this.maxResizableHeight = this.initialHeight + (heightValue * (this.maxResizableRows - this.rows));
|
|
17514
|
+
}
|
|
17515
|
+
});
|
|
17476
17516
|
}
|
|
17477
17517
|
else if (this.resizable !== 'both') {
|
|
17478
17518
|
this.renderer.addClass(element, '\!k-overflow-y-auto');
|
|
@@ -17636,6 +17676,10 @@ class TextAreaComponent extends TextFieldsBase {
|
|
|
17636
17676
|
const element = this.input.nativeElement;
|
|
17637
17677
|
this.renderer.setStyle(element, 'height', `${this.initialHeight}px`);
|
|
17638
17678
|
const scrollHeight = element.scrollHeight;
|
|
17679
|
+
if (scrollHeight > this.maxResizableHeight) {
|
|
17680
|
+
this.renderer.setStyle(element, 'height', `${this.maxResizableHeight}px`);
|
|
17681
|
+
return;
|
|
17682
|
+
}
|
|
17639
17683
|
this.renderer.setStyle(hostElement, 'min-height', `${scrollHeight}px`);
|
|
17640
17684
|
if (scrollHeight > this.initialHeight) {
|
|
17641
17685
|
this.renderer.setStyle(element, 'height', `${scrollHeight}px`);
|
|
@@ -17706,7 +17750,7 @@ class TextAreaComponent extends TextFieldsBase {
|
|
|
17706
17750
|
setHTMLAttributes(attributesToRender, this.renderer, this.input.nativeElement, this.ngZone);
|
|
17707
17751
|
}
|
|
17708
17752
|
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 });
|
|
17709
|
-
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: [
|
|
17753
|
+
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: [
|
|
17710
17754
|
LocalizationService,
|
|
17711
17755
|
{ provide: L10N_PREFIX, useValue: 'kendo.textarea' },
|
|
17712
17756
|
{
|
|
@@ -17848,6 +17892,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
17848
17892
|
type: Input
|
|
17849
17893
|
}], maxlength: [{
|
|
17850
17894
|
type: Input
|
|
17895
|
+
}], maxResizableRows: [{
|
|
17896
|
+
type: Input
|
|
17851
17897
|
}], tabindex: [{
|
|
17852
17898
|
type: Input
|
|
17853
17899
|
}], tabIndex: [{
|
|
@@ -18608,14 +18654,15 @@ class OTPInputComponent {
|
|
|
18608
18654
|
this.inputFields.get(this.focusedInput).focus();
|
|
18609
18655
|
}
|
|
18610
18656
|
handleKeydown(event) {
|
|
18657
|
+
const code = normalizeNumpadKeys(event);
|
|
18611
18658
|
if (this.readonly) {
|
|
18612
|
-
const isCopyCommand = (event.ctrlKey || event.metaKey) &&
|
|
18613
|
-
if (!(
|
|
18659
|
+
const isCopyCommand = (event.ctrlKey || event.metaKey) && code === Keys.KeyC;
|
|
18660
|
+
if (!(code === Keys.Tab || isCopyCommand)) {
|
|
18614
18661
|
event.preventDefault();
|
|
18615
18662
|
return;
|
|
18616
18663
|
}
|
|
18617
18664
|
}
|
|
18618
|
-
switch (
|
|
18665
|
+
switch (code) {
|
|
18619
18666
|
case Keys.ArrowRight:
|
|
18620
18667
|
event.preventDefault();
|
|
18621
18668
|
this.direction === 'ltr' ? this.focusNext() : this.focusPrevious();
|
|
@@ -19022,7 +19069,7 @@ class FormComponent {
|
|
|
19022
19069
|
* Defines the gutters for the form.
|
|
19023
19070
|
* You can specify gutters for rows and columns.
|
|
19024
19071
|
*/
|
|
19025
|
-
gutters;
|
|
19072
|
+
gutters = { ...DEFAULT_FORM_GUTTERS };
|
|
19026
19073
|
/**
|
|
19027
19074
|
* @hidden
|
|
19028
19075
|
*/
|
|
@@ -19030,26 +19077,29 @@ class FormComponent {
|
|
|
19030
19077
|
/**
|
|
19031
19078
|
* @hidden
|
|
19032
19079
|
*/
|
|
19033
|
-
|
|
19080
|
+
guttersStyle = '';
|
|
19034
19081
|
/**
|
|
19035
19082
|
* @hidden
|
|
19036
19083
|
*/
|
|
19037
|
-
|
|
19084
|
+
showLicenseWatermark = false;
|
|
19038
19085
|
/**
|
|
19039
19086
|
* @hidden
|
|
19040
19087
|
*/
|
|
19041
|
-
|
|
19042
|
-
formClass
|
|
19088
|
+
licenseMessage;
|
|
19089
|
+
get formClass() {
|
|
19090
|
+
return 'k-form k-form-md';
|
|
19091
|
+
}
|
|
19043
19092
|
get horizontalClass() {
|
|
19044
19093
|
return this.orientation === 'horizontal';
|
|
19045
19094
|
}
|
|
19046
19095
|
_formColumnsNumber;
|
|
19047
|
-
_formGutters;
|
|
19096
|
+
_formGutters = { ...DEFAULT_FORM_GUTTERS };
|
|
19048
19097
|
constructor(element, cdr, formService) {
|
|
19049
19098
|
this.element = element;
|
|
19050
19099
|
this.cdr = cdr;
|
|
19051
19100
|
this.formService = formService;
|
|
19052
19101
|
const isValid = validatePackage(packageMetadata);
|
|
19102
|
+
this.licenseMessage = getLicenseMessage(packageMetadata);
|
|
19053
19103
|
this.showLicenseWatermark = shouldShowValidationUI(isValid);
|
|
19054
19104
|
}
|
|
19055
19105
|
ngAfterContentInit() {
|
|
@@ -19061,7 +19111,7 @@ class FormComponent {
|
|
|
19061
19111
|
if (changes['cols']) {
|
|
19062
19112
|
this.applyColumns();
|
|
19063
19113
|
}
|
|
19064
|
-
|
|
19114
|
+
if (changes['gutters']) {
|
|
19065
19115
|
this.applyGutters();
|
|
19066
19116
|
}
|
|
19067
19117
|
}
|
|
@@ -19095,18 +19145,16 @@ class FormComponent {
|
|
|
19095
19145
|
this.columnsClass = generateColumnClass(this._formColumnsNumber);
|
|
19096
19146
|
}
|
|
19097
19147
|
updateGutterClasses() {
|
|
19098
|
-
|
|
19099
|
-
this.rowsGutterClass = gutterClasses.rows;
|
|
19100
|
-
this.colsGutterClass = gutterClasses.cols;
|
|
19148
|
+
this.guttersStyle = generateGuttersStyling(this._formGutters, { ...DEFAULT_FORM_GUTTERS });
|
|
19101
19149
|
}
|
|
19102
19150
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FormComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: FormService }], target: i0.ɵɵFactoryTarget.Component });
|
|
19103
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: FormComponent, isStandalone: true, selector: "form[kendoForm]", inputs: { orientation: "orientation", cols: "cols", gutters: "gutters" }, host: { properties: { "class
|
|
19104
|
-
<div class="k-form-layout k-d-grid" [ngClass]="[columnsClass
|
|
19151
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: FormComponent, isStandalone: true, selector: "form[kendoForm]", inputs: { orientation: "orientation", cols: "cols", gutters: "gutters" }, host: { properties: { "class": "this.formClass", "class.k-form-horizontal": "this.horizontalClass" } }, exportAs: ["kendoForm"], usesOnChanges: true, ngImport: i0, template: `
|
|
19152
|
+
<div class="k-form-layout k-d-grid" [ngClass]="[columnsClass]" [ngStyle]="{ gap: guttersStyle }">
|
|
19105
19153
|
<ng-content></ng-content>
|
|
19106
19154
|
</div>
|
|
19107
19155
|
<kendo-resize-sensor (resize)="onResize()"></kendo-resize-sensor>
|
|
19108
|
-
<div kendoWatermarkOverlay *ngIf="showLicenseWatermark"></div>
|
|
19109
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: ResizeSensorComponent, selector: "kendo-resize-sensor", inputs: ["rateLimit"], outputs: ["resize"] }, { kind: "component", type: WatermarkOverlayComponent, selector: "div[kendoWatermarkOverlay]" }] });
|
|
19156
|
+
<div kendoWatermarkOverlay *ngIf="showLicenseWatermark" [licenseMessage]="licenseMessage"></div>
|
|
19157
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: ResizeSensorComponent, selector: "kendo-resize-sensor", inputs: ["rateLimit"], outputs: ["resize"] }, { kind: "component", type: WatermarkOverlayComponent, selector: "div[kendoWatermarkOverlay]", inputs: ["licenseMessage"] }] });
|
|
19110
19158
|
}
|
|
19111
19159
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FormComponent, decorators: [{
|
|
19112
19160
|
type: Component,
|
|
@@ -19114,14 +19162,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
19114
19162
|
exportAs: 'kendoForm',
|
|
19115
19163
|
selector: 'form[kendoForm]',
|
|
19116
19164
|
template: `
|
|
19117
|
-
<div class="k-form-layout k-d-grid" [ngClass]="[columnsClass
|
|
19165
|
+
<div class="k-form-layout k-d-grid" [ngClass]="[columnsClass]" [ngStyle]="{ gap: guttersStyle }">
|
|
19118
19166
|
<ng-content></ng-content>
|
|
19119
19167
|
</div>
|
|
19120
19168
|
<kendo-resize-sensor (resize)="onResize()"></kendo-resize-sensor>
|
|
19121
|
-
<div kendoWatermarkOverlay *ngIf="showLicenseWatermark"></div>
|
|
19169
|
+
<div kendoWatermarkOverlay *ngIf="showLicenseWatermark" [licenseMessage]="licenseMessage"></div>
|
|
19122
19170
|
`,
|
|
19123
19171
|
standalone: true,
|
|
19124
|
-
imports: [NgClass, NgIf, ResizeSensorComponent, WatermarkOverlayComponent],
|
|
19172
|
+
imports: [NgClass, NgStyle, NgIf, ResizeSensorComponent, WatermarkOverlayComponent],
|
|
19125
19173
|
}]
|
|
19126
19174
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: FormService }]; }, propDecorators: { orientation: [{
|
|
19127
19175
|
type: Input
|
|
@@ -19131,7 +19179,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
19131
19179
|
type: Input
|
|
19132
19180
|
}], formClass: [{
|
|
19133
19181
|
type: HostBinding,
|
|
19134
|
-
args: ['class
|
|
19182
|
+
args: ['class']
|
|
19135
19183
|
}], horizontalClass: [{
|
|
19136
19184
|
type: HostBinding,
|
|
19137
19185
|
args: ['class.k-form-horizontal']
|
|
@@ -19222,7 +19270,7 @@ class FormFieldSetComponent {
|
|
|
19222
19270
|
*/
|
|
19223
19271
|
legend;
|
|
19224
19272
|
/**
|
|
19225
|
-
* Defines the number of columns the fieldset.
|
|
19273
|
+
* Defines the number of columns of the fieldset.
|
|
19226
19274
|
* Can be a number or an array of responsive breakpoints.
|
|
19227
19275
|
*/
|
|
19228
19276
|
cols;
|
|
@@ -19230,7 +19278,7 @@ class FormFieldSetComponent {
|
|
|
19230
19278
|
* Defines the gutters for the fieldset.
|
|
19231
19279
|
* You can specify gutters for rows and columns.
|
|
19232
19280
|
*/
|
|
19233
|
-
gutters;
|
|
19281
|
+
gutters = { ...DEFAULT_FORMFIELDSET_GUTTERS };
|
|
19234
19282
|
/**
|
|
19235
19283
|
* Defines the colspan for the fieldset related to the parent Form component columns.
|
|
19236
19284
|
* Can be a number or an array of responsive breakpoints.
|
|
@@ -19243,18 +19291,14 @@ class FormFieldSetComponent {
|
|
|
19243
19291
|
/**
|
|
19244
19292
|
* @hidden
|
|
19245
19293
|
*/
|
|
19246
|
-
|
|
19247
|
-
/**
|
|
19248
|
-
* @hidden
|
|
19249
|
-
*/
|
|
19250
|
-
colsGutterClass = '';
|
|
19294
|
+
guttersStyle = '';
|
|
19251
19295
|
_formColumnsNumber;
|
|
19252
19296
|
_colSpanClass = null;
|
|
19253
19297
|
_formWidth = null;
|
|
19254
|
-
_formGutters =
|
|
19298
|
+
_formGutters = { ...DEFAULT_FORMFIELDSET_GUTTERS };
|
|
19255
19299
|
_previousColSpan = null;
|
|
19256
19300
|
_previousCols = null;
|
|
19257
|
-
_previousGutters
|
|
19301
|
+
_previousGutters;
|
|
19258
19302
|
subs = new Subscription();
|
|
19259
19303
|
constructor(elementRef, renderer, formService, cdr) {
|
|
19260
19304
|
this.elementRef = elementRef;
|
|
@@ -19308,9 +19352,8 @@ class FormFieldSetComponent {
|
|
|
19308
19352
|
this.cdr.detectChanges();
|
|
19309
19353
|
}
|
|
19310
19354
|
updateGutterClasses() {
|
|
19311
|
-
|
|
19312
|
-
this.
|
|
19313
|
-
this.colsGutterClass = gutterClasses.cols;
|
|
19355
|
+
this.guttersStyle = generateGuttersStyling(this._formGutters, { ...DEFAULT_FORMFIELDSET_GUTTERS });
|
|
19356
|
+
this.cdr.detectChanges();
|
|
19314
19357
|
}
|
|
19315
19358
|
updateColSpanClass() {
|
|
19316
19359
|
const hostElement = this.elementRef.nativeElement;
|
|
@@ -19333,10 +19376,10 @@ class FormFieldSetComponent {
|
|
|
19333
19376
|
<legend *ngIf="legend" class="k-form-legend">
|
|
19334
19377
|
{{ legend }}
|
|
19335
19378
|
</legend>
|
|
19336
|
-
<div class="k-form-layout k-d-grid" [ngClass]="[columnsClass
|
|
19379
|
+
<div class="k-form-layout k-d-grid" [ngClass]="[columnsClass]" [ngStyle]="{'gap': guttersStyle}">
|
|
19337
19380
|
<ng-content></ng-content>
|
|
19338
19381
|
</div>
|
|
19339
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
|
|
19382
|
+
`, 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"] }] });
|
|
19340
19383
|
}
|
|
19341
19384
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FormFieldSetComponent, decorators: [{
|
|
19342
19385
|
type: Component,
|
|
@@ -19347,12 +19390,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
19347
19390
|
<legend *ngIf="legend" class="k-form-legend">
|
|
19348
19391
|
{{ legend }}
|
|
19349
19392
|
</legend>
|
|
19350
|
-
<div class="k-form-layout k-d-grid" [ngClass]="[columnsClass
|
|
19393
|
+
<div class="k-form-layout k-d-grid" [ngClass]="[columnsClass]" [ngStyle]="{'gap': guttersStyle}">
|
|
19351
19394
|
<ng-content></ng-content>
|
|
19352
19395
|
</div>
|
|
19353
19396
|
`,
|
|
19354
19397
|
standalone: true,
|
|
19355
|
-
imports: [NgIf, NgClass],
|
|
19398
|
+
imports: [NgIf, NgClass, NgStyle],
|
|
19356
19399
|
}]
|
|
19357
19400
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: FormService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { formFieldSetClass: [{
|
|
19358
19401
|
type: HostBinding,
|
package/form/form.component.d.ts
CHANGED
|
@@ -33,7 +33,7 @@ export declare class FormComponent implements AfterContentInit, OnChanges {
|
|
|
33
33
|
* Defines the gutters for the form.
|
|
34
34
|
* You can specify gutters for rows and columns.
|
|
35
35
|
*/
|
|
36
|
-
gutters: number | ResponsiveFormBreakPoint[] | Gutters;
|
|
36
|
+
gutters: number | string | ResponsiveFormBreakPoint[] | Gutters;
|
|
37
37
|
/**
|
|
38
38
|
* @hidden
|
|
39
39
|
*/
|
|
@@ -41,16 +41,16 @@ export declare class FormComponent implements AfterContentInit, OnChanges {
|
|
|
41
41
|
/**
|
|
42
42
|
* @hidden
|
|
43
43
|
*/
|
|
44
|
-
|
|
44
|
+
guttersStyle: string;
|
|
45
45
|
/**
|
|
46
46
|
* @hidden
|
|
47
47
|
*/
|
|
48
|
-
|
|
48
|
+
showLicenseWatermark: boolean;
|
|
49
49
|
/**
|
|
50
50
|
* @hidden
|
|
51
51
|
*/
|
|
52
|
-
|
|
53
|
-
formClass:
|
|
52
|
+
licenseMessage?: string;
|
|
53
|
+
get formClass(): string;
|
|
54
54
|
get horizontalClass(): boolean;
|
|
55
55
|
private _formColumnsNumber;
|
|
56
56
|
private _formGutters;
|