@progress/kendo-angular-inputs 19.3.0-develop.8 → 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 +35 -4
- package/fesm2022/progress-kendo-angular-inputs.mjs +147 -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 +9 -3
|
@@ -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';
|
|
@@ -17434,10 +17460,24 @@ class TextAreaComponent extends TextFieldsBase {
|
|
|
17434
17460
|
validatePackage(packageMetadata);
|
|
17435
17461
|
this.direction = localizationService.rtl ? 'rtl' : 'ltr';
|
|
17436
17462
|
}
|
|
17463
|
+
ngAfterContentInit() {
|
|
17464
|
+
this.ngZone.onStable.pipe((take(1))).subscribe(() => {
|
|
17465
|
+
this.prefix && (this.prefix.orientation = this.adornmentsOrientation);
|
|
17466
|
+
this.suffix && (this.suffix.orientation = this.adornmentsOrientation);
|
|
17467
|
+
});
|
|
17468
|
+
}
|
|
17437
17469
|
ngAfterViewInit() {
|
|
17438
17470
|
this.ngZone.runOutsideAngular(() => {
|
|
17439
17471
|
this.handleFlow();
|
|
17440
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
|
+
});
|
|
17441
17481
|
const stylingInputs = ['size', 'rounded', 'fillMode'];
|
|
17442
17482
|
stylingInputs.forEach(input => {
|
|
17443
17483
|
this.handleClasses(this[input], input);
|
|
@@ -17465,8 +17505,14 @@ class TextAreaComponent extends TextFieldsBase {
|
|
|
17465
17505
|
}
|
|
17466
17506
|
if (changes.resizable) {
|
|
17467
17507
|
if (this.resizable === 'auto') {
|
|
17468
|
-
this.
|
|
17469
|
-
|
|
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
|
+
});
|
|
17470
17516
|
}
|
|
17471
17517
|
else if (this.resizable !== 'both') {
|
|
17472
17518
|
this.renderer.addClass(element, '\!k-overflow-y-auto');
|
|
@@ -17630,6 +17676,10 @@ class TextAreaComponent extends TextFieldsBase {
|
|
|
17630
17676
|
const element = this.input.nativeElement;
|
|
17631
17677
|
this.renderer.setStyle(element, 'height', `${this.initialHeight}px`);
|
|
17632
17678
|
const scrollHeight = element.scrollHeight;
|
|
17679
|
+
if (scrollHeight > this.maxResizableHeight) {
|
|
17680
|
+
this.renderer.setStyle(element, 'height', `${this.maxResizableHeight}px`);
|
|
17681
|
+
return;
|
|
17682
|
+
}
|
|
17633
17683
|
this.renderer.setStyle(hostElement, 'min-height', `${scrollHeight}px`);
|
|
17634
17684
|
if (scrollHeight > this.initialHeight) {
|
|
17635
17685
|
this.renderer.setStyle(element, 'height', `${scrollHeight}px`);
|
|
@@ -17700,7 +17750,7 @@ class TextAreaComponent extends TextFieldsBase {
|
|
|
17700
17750
|
setHTMLAttributes(attributesToRender, this.renderer, this.input.nativeElement, this.ngZone);
|
|
17701
17751
|
}
|
|
17702
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 });
|
|
17703
|
-
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: [
|
|
17704
17754
|
LocalizationService,
|
|
17705
17755
|
{ provide: L10N_PREFIX, useValue: 'kendo.textarea' },
|
|
17706
17756
|
{
|
|
@@ -17842,6 +17892,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
17842
17892
|
type: Input
|
|
17843
17893
|
}], maxlength: [{
|
|
17844
17894
|
type: Input
|
|
17895
|
+
}], maxResizableRows: [{
|
|
17896
|
+
type: Input
|
|
17845
17897
|
}], tabindex: [{
|
|
17846
17898
|
type: Input
|
|
17847
17899
|
}], tabIndex: [{
|
|
@@ -18602,14 +18654,15 @@ class OTPInputComponent {
|
|
|
18602
18654
|
this.inputFields.get(this.focusedInput).focus();
|
|
18603
18655
|
}
|
|
18604
18656
|
handleKeydown(event) {
|
|
18657
|
+
const code = normalizeNumpadKeys(event);
|
|
18605
18658
|
if (this.readonly) {
|
|
18606
|
-
const isCopyCommand = (event.ctrlKey || event.metaKey) &&
|
|
18607
|
-
if (!(
|
|
18659
|
+
const isCopyCommand = (event.ctrlKey || event.metaKey) && code === Keys.KeyC;
|
|
18660
|
+
if (!(code === Keys.Tab || isCopyCommand)) {
|
|
18608
18661
|
event.preventDefault();
|
|
18609
18662
|
return;
|
|
18610
18663
|
}
|
|
18611
18664
|
}
|
|
18612
|
-
switch (
|
|
18665
|
+
switch (code) {
|
|
18613
18666
|
case Keys.ArrowRight:
|
|
18614
18667
|
event.preventDefault();
|
|
18615
18668
|
this.direction === 'ltr' ? this.focusNext() : this.focusPrevious();
|
|
@@ -19016,7 +19069,7 @@ class FormComponent {
|
|
|
19016
19069
|
* Defines the gutters for the form.
|
|
19017
19070
|
* You can specify gutters for rows and columns.
|
|
19018
19071
|
*/
|
|
19019
|
-
gutters;
|
|
19072
|
+
gutters = { ...DEFAULT_FORM_GUTTERS };
|
|
19020
19073
|
/**
|
|
19021
19074
|
* @hidden
|
|
19022
19075
|
*/
|
|
@@ -19024,26 +19077,29 @@ class FormComponent {
|
|
|
19024
19077
|
/**
|
|
19025
19078
|
* @hidden
|
|
19026
19079
|
*/
|
|
19027
|
-
|
|
19080
|
+
guttersStyle = '';
|
|
19028
19081
|
/**
|
|
19029
19082
|
* @hidden
|
|
19030
19083
|
*/
|
|
19031
|
-
|
|
19084
|
+
showLicenseWatermark = false;
|
|
19032
19085
|
/**
|
|
19033
19086
|
* @hidden
|
|
19034
19087
|
*/
|
|
19035
|
-
|
|
19036
|
-
formClass
|
|
19088
|
+
licenseMessage;
|
|
19089
|
+
get formClass() {
|
|
19090
|
+
return 'k-form k-form-md';
|
|
19091
|
+
}
|
|
19037
19092
|
get horizontalClass() {
|
|
19038
19093
|
return this.orientation === 'horizontal';
|
|
19039
19094
|
}
|
|
19040
19095
|
_formColumnsNumber;
|
|
19041
|
-
_formGutters;
|
|
19096
|
+
_formGutters = { ...DEFAULT_FORM_GUTTERS };
|
|
19042
19097
|
constructor(element, cdr, formService) {
|
|
19043
19098
|
this.element = element;
|
|
19044
19099
|
this.cdr = cdr;
|
|
19045
19100
|
this.formService = formService;
|
|
19046
19101
|
const isValid = validatePackage(packageMetadata);
|
|
19102
|
+
this.licenseMessage = getLicenseMessage(packageMetadata);
|
|
19047
19103
|
this.showLicenseWatermark = shouldShowValidationUI(isValid);
|
|
19048
19104
|
}
|
|
19049
19105
|
ngAfterContentInit() {
|
|
@@ -19055,7 +19111,7 @@ class FormComponent {
|
|
|
19055
19111
|
if (changes['cols']) {
|
|
19056
19112
|
this.applyColumns();
|
|
19057
19113
|
}
|
|
19058
|
-
|
|
19114
|
+
if (changes['gutters']) {
|
|
19059
19115
|
this.applyGutters();
|
|
19060
19116
|
}
|
|
19061
19117
|
}
|
|
@@ -19089,18 +19145,16 @@ class FormComponent {
|
|
|
19089
19145
|
this.columnsClass = generateColumnClass(this._formColumnsNumber);
|
|
19090
19146
|
}
|
|
19091
19147
|
updateGutterClasses() {
|
|
19092
|
-
|
|
19093
|
-
this.rowsGutterClass = gutterClasses.rows;
|
|
19094
|
-
this.colsGutterClass = gutterClasses.cols;
|
|
19148
|
+
this.guttersStyle = generateGuttersStyling(this._formGutters, { ...DEFAULT_FORM_GUTTERS });
|
|
19095
19149
|
}
|
|
19096
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 });
|
|
19097
|
-
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
|
|
19098
|
-
<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 }">
|
|
19099
19153
|
<ng-content></ng-content>
|
|
19100
19154
|
</div>
|
|
19101
19155
|
<kendo-resize-sensor (resize)="onResize()"></kendo-resize-sensor>
|
|
19102
|
-
<div kendoWatermarkOverlay *ngIf="showLicenseWatermark"></div>
|
|
19103
|
-
`, 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"] }] });
|
|
19104
19158
|
}
|
|
19105
19159
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FormComponent, decorators: [{
|
|
19106
19160
|
type: Component,
|
|
@@ -19108,14 +19162,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
19108
19162
|
exportAs: 'kendoForm',
|
|
19109
19163
|
selector: 'form[kendoForm]',
|
|
19110
19164
|
template: `
|
|
19111
|
-
<div class="k-form-layout k-d-grid" [ngClass]="[columnsClass
|
|
19165
|
+
<div class="k-form-layout k-d-grid" [ngClass]="[columnsClass]" [ngStyle]="{ gap: guttersStyle }">
|
|
19112
19166
|
<ng-content></ng-content>
|
|
19113
19167
|
</div>
|
|
19114
19168
|
<kendo-resize-sensor (resize)="onResize()"></kendo-resize-sensor>
|
|
19115
|
-
<div kendoWatermarkOverlay *ngIf="showLicenseWatermark"></div>
|
|
19169
|
+
<div kendoWatermarkOverlay *ngIf="showLicenseWatermark" [licenseMessage]="licenseMessage"></div>
|
|
19116
19170
|
`,
|
|
19117
19171
|
standalone: true,
|
|
19118
|
-
imports: [NgClass, NgIf, ResizeSensorComponent, WatermarkOverlayComponent],
|
|
19172
|
+
imports: [NgClass, NgStyle, NgIf, ResizeSensorComponent, WatermarkOverlayComponent],
|
|
19119
19173
|
}]
|
|
19120
19174
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: FormService }]; }, propDecorators: { orientation: [{
|
|
19121
19175
|
type: Input
|
|
@@ -19125,7 +19179,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
19125
19179
|
type: Input
|
|
19126
19180
|
}], formClass: [{
|
|
19127
19181
|
type: HostBinding,
|
|
19128
|
-
args: ['class
|
|
19182
|
+
args: ['class']
|
|
19129
19183
|
}], horizontalClass: [{
|
|
19130
19184
|
type: HostBinding,
|
|
19131
19185
|
args: ['class.k-form-horizontal']
|
|
@@ -19216,7 +19270,7 @@ class FormFieldSetComponent {
|
|
|
19216
19270
|
*/
|
|
19217
19271
|
legend;
|
|
19218
19272
|
/**
|
|
19219
|
-
* Defines the number of columns the fieldset.
|
|
19273
|
+
* Defines the number of columns of the fieldset.
|
|
19220
19274
|
* Can be a number or an array of responsive breakpoints.
|
|
19221
19275
|
*/
|
|
19222
19276
|
cols;
|
|
@@ -19224,7 +19278,7 @@ class FormFieldSetComponent {
|
|
|
19224
19278
|
* Defines the gutters for the fieldset.
|
|
19225
19279
|
* You can specify gutters for rows and columns.
|
|
19226
19280
|
*/
|
|
19227
|
-
gutters;
|
|
19281
|
+
gutters = { ...DEFAULT_FORMFIELDSET_GUTTERS };
|
|
19228
19282
|
/**
|
|
19229
19283
|
* Defines the colspan for the fieldset related to the parent Form component columns.
|
|
19230
19284
|
* Can be a number or an array of responsive breakpoints.
|
|
@@ -19237,18 +19291,14 @@ class FormFieldSetComponent {
|
|
|
19237
19291
|
/**
|
|
19238
19292
|
* @hidden
|
|
19239
19293
|
*/
|
|
19240
|
-
|
|
19241
|
-
/**
|
|
19242
|
-
* @hidden
|
|
19243
|
-
*/
|
|
19244
|
-
colsGutterClass = '';
|
|
19294
|
+
guttersStyle = '';
|
|
19245
19295
|
_formColumnsNumber;
|
|
19246
19296
|
_colSpanClass = null;
|
|
19247
19297
|
_formWidth = null;
|
|
19248
|
-
_formGutters =
|
|
19298
|
+
_formGutters = { ...DEFAULT_FORMFIELDSET_GUTTERS };
|
|
19249
19299
|
_previousColSpan = null;
|
|
19250
19300
|
_previousCols = null;
|
|
19251
|
-
_previousGutters
|
|
19301
|
+
_previousGutters;
|
|
19252
19302
|
subs = new Subscription();
|
|
19253
19303
|
constructor(elementRef, renderer, formService, cdr) {
|
|
19254
19304
|
this.elementRef = elementRef;
|
|
@@ -19302,9 +19352,8 @@ class FormFieldSetComponent {
|
|
|
19302
19352
|
this.cdr.detectChanges();
|
|
19303
19353
|
}
|
|
19304
19354
|
updateGutterClasses() {
|
|
19305
|
-
|
|
19306
|
-
this.
|
|
19307
|
-
this.colsGutterClass = gutterClasses.cols;
|
|
19355
|
+
this.guttersStyle = generateGuttersStyling(this._formGutters, { ...DEFAULT_FORMFIELDSET_GUTTERS });
|
|
19356
|
+
this.cdr.detectChanges();
|
|
19308
19357
|
}
|
|
19309
19358
|
updateColSpanClass() {
|
|
19310
19359
|
const hostElement = this.elementRef.nativeElement;
|
|
@@ -19327,10 +19376,10 @@ class FormFieldSetComponent {
|
|
|
19327
19376
|
<legend *ngIf="legend" class="k-form-legend">
|
|
19328
19377
|
{{ legend }}
|
|
19329
19378
|
</legend>
|
|
19330
|
-
<div class="k-form-layout k-d-grid" [ngClass]="[columnsClass
|
|
19379
|
+
<div class="k-form-layout k-d-grid" [ngClass]="[columnsClass]" [ngStyle]="{'gap': guttersStyle}">
|
|
19331
19380
|
<ng-content></ng-content>
|
|
19332
19381
|
</div>
|
|
19333
|
-
`, 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"] }] });
|
|
19334
19383
|
}
|
|
19335
19384
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FormFieldSetComponent, decorators: [{
|
|
19336
19385
|
type: Component,
|
|
@@ -19341,12 +19390,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
19341
19390
|
<legend *ngIf="legend" class="k-form-legend">
|
|
19342
19391
|
{{ legend }}
|
|
19343
19392
|
</legend>
|
|
19344
|
-
<div class="k-form-layout k-d-grid" [ngClass]="[columnsClass
|
|
19393
|
+
<div class="k-form-layout k-d-grid" [ngClass]="[columnsClass]" [ngStyle]="{'gap': guttersStyle}">
|
|
19345
19394
|
<ng-content></ng-content>
|
|
19346
19395
|
</div>
|
|
19347
19396
|
`,
|
|
19348
19397
|
standalone: true,
|
|
19349
|
-
imports: [NgIf, NgClass],
|
|
19398
|
+
imports: [NgIf, NgClass, NgStyle],
|
|
19350
19399
|
}]
|
|
19351
19400
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: FormService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { formFieldSetClass: [{
|
|
19352
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;
|