@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
|
@@ -4,19 +4,25 @@
|
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
import { ResponsiveFormBreakPoint } from './responsive-breakpoints';
|
|
6
6
|
/**
|
|
7
|
-
* Represents the gutters configuration for a
|
|
8
|
-
*
|
|
9
|
-
*
|
|
7
|
+
* Represents the gutters configuration for a Form layout. Defines the spacing between the columns and rows of the Form.
|
|
8
|
+
* Set any property to a number or a string to apply that value as a fixed gutter size. Set it to an array of responsive breakpoints to allow different gutter sizes in relation to the current Form width.
|
|
9
|
+
* Numeric values are interpreted as pixels. String values can include units like `px`, `rem`, `em`, etc.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* const formGutters: Gutters = {
|
|
14
|
+
* cols: 16,
|
|
15
|
+
* rows: '1rem'
|
|
16
|
+
* };
|
|
17
|
+
* ```
|
|
10
18
|
*/
|
|
11
19
|
export interface Gutters {
|
|
12
20
|
/**
|
|
13
|
-
* Defines the gutters for the columns in the
|
|
14
|
-
* Can be a number or an array of responsive breakpoints.
|
|
21
|
+
* Defines the gutters for the columns in the Form.
|
|
15
22
|
*/
|
|
16
|
-
cols?: number | ResponsiveFormBreakPoint[];
|
|
23
|
+
cols?: number | string | ResponsiveFormBreakPoint[];
|
|
17
24
|
/**
|
|
18
|
-
* Defines the gutters for the rows in the
|
|
19
|
-
* Can be a number or an array of responsive breakpoints.
|
|
25
|
+
* Defines the gutters for the rows in the Form.
|
|
20
26
|
*/
|
|
21
|
-
rows?: number | ResponsiveFormBreakPoint[];
|
|
27
|
+
rows?: number | string | ResponsiveFormBreakPoint[];
|
|
22
28
|
}
|
|
@@ -3,22 +3,32 @@
|
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
6
|
+
* Defines responsive breakpoints for form controls in relation to the width of the Form component.
|
|
7
7
|
* Each breakpoint can specify a minimum and/or maximum width, and a value that represents either the number of columns
|
|
8
8
|
* or the colspan/gutters for that breakpoint.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```ts
|
|
12
|
+
* const breakpoints: ResponsiveFormBreakPoint[] = [
|
|
13
|
+
* { minWidth: 768, value: 2 },
|
|
14
|
+
* { maxWidth: 767, value: 1 }
|
|
15
|
+
* ];
|
|
16
|
+
* ```
|
|
9
17
|
*/
|
|
10
18
|
export interface ResponsiveFormBreakPoint {
|
|
11
19
|
/**
|
|
12
|
-
*
|
|
20
|
+
* Specifies the minimum Form width for this breakpoint in pixels.
|
|
13
21
|
*/
|
|
14
22
|
minWidth?: number;
|
|
15
23
|
/**
|
|
16
|
-
*
|
|
24
|
+
* Specifies the maximum Form width for this breakpoint in pixels.
|
|
17
25
|
*/
|
|
18
26
|
maxWidth?: number;
|
|
19
27
|
/**
|
|
20
|
-
*
|
|
21
|
-
*
|
|
28
|
+
* Specifies the value associated with this breakpoint.
|
|
29
|
+
* Can represent the number of columns or the colspan/gutters for the form control.
|
|
30
|
+
* For gutters configurations, numeric values are interpreted as pixels, while string values can include units like `px`, `em`, etc.
|
|
31
|
+
* For columns number and colspan, numeric values are typically used and strings are parsed to numbers.
|
|
22
32
|
*/
|
|
23
|
-
value: number;
|
|
33
|
+
value: number | string;
|
|
24
34
|
}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
6
6
|
import { Component, Input, EventEmitter, Output, HostBinding, forwardRef, ChangeDetectorRef, Renderer2, ElementRef, NgZone } from '@angular/core';
|
|
7
7
|
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
8
|
-
import { Keys, KendoInput, guid } from '@progress/kendo-angular-common';
|
|
8
|
+
import { Keys, KendoInput, guid, normalizeNumpadKeys } from '@progress/kendo-angular-common';
|
|
9
9
|
import { LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n';
|
|
10
10
|
import { validatePackage } from '@progress/kendo-licensing';
|
|
11
11
|
import { Subscription } from 'rxjs';
|
|
@@ -282,8 +282,9 @@ export class ColorPaletteComponent {
|
|
|
282
282
|
* @hidden
|
|
283
283
|
*/
|
|
284
284
|
handleKeydown(event) {
|
|
285
|
+
const code = normalizeNumpadKeys(event);
|
|
285
286
|
const isRTL = this.direction === 'rtl';
|
|
286
|
-
switch (
|
|
287
|
+
switch (code) {
|
|
287
288
|
case Keys.ArrowDown:
|
|
288
289
|
this.handleCellNavigation(0, 1);
|
|
289
290
|
break;
|
|
@@ -12,7 +12,7 @@ import { PopupService } from '@progress/kendo-angular-popup';
|
|
|
12
12
|
import { ButtonComponent } from '@progress/kendo-angular-buttons';
|
|
13
13
|
import { AdaptiveService } from '@progress/kendo-angular-utils';
|
|
14
14
|
import { validatePackage } from '@progress/kendo-licensing';
|
|
15
|
-
import { Keys, KendoInput, isChanged, closest, guid, ResizeSensorComponent, isDocumentAvailable } from '@progress/kendo-angular-common';
|
|
15
|
+
import { Keys, KendoInput, isChanged, closest, guid, ResizeSensorComponent, isDocumentAvailable, normalizeNumpadKeys } from '@progress/kendo-angular-common';
|
|
16
16
|
import { LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n';
|
|
17
17
|
import { packageMetadata } from '../package-metadata';
|
|
18
18
|
import { PALETTEPRESETS } from './models';
|
|
@@ -665,7 +665,8 @@ export class ColorPickerComponent {
|
|
|
665
665
|
* @hidden
|
|
666
666
|
*/
|
|
667
667
|
handleWrapperKeyDown(event) {
|
|
668
|
-
|
|
668
|
+
const code = normalizeNumpadKeys(event);
|
|
669
|
+
if (code === Keys.ArrowDown || code === Keys.Enter) {
|
|
669
670
|
event.preventDefault();
|
|
670
671
|
this.ngZone.run(() => {
|
|
671
672
|
this.toggleWithEvents(true);
|
|
@@ -701,11 +702,11 @@ export class ColorPickerComponent {
|
|
|
701
702
|
* @hidden
|
|
702
703
|
*/
|
|
703
704
|
handlePopupKeyDown(event) {
|
|
704
|
-
if (event.
|
|
705
|
+
if (event.code === Keys.Escape) {
|
|
705
706
|
this.toggleWithEvents(false);
|
|
706
707
|
this.host.nativeElement.focus();
|
|
707
708
|
}
|
|
708
|
-
if (event.
|
|
709
|
+
if (event.code === Keys.Tab) {
|
|
709
710
|
const currentElement = event.shiftKey ? this.firstFocusableElement.nativeElement : this.lastFocusableElement.nativeElement;
|
|
710
711
|
const nextElement = event.shiftKey ? this.lastFocusableElement.nativeElement : this.firstFocusableElement.nativeElement;
|
|
711
712
|
if (event.target === currentElement) {
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
* Copyright © 2025 Progress Software Corporation. All rights reserved.
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { NgClass, NgIf } from '@angular/common';
|
|
5
|
+
import { NgClass, NgIf, NgStyle } from '@angular/common';
|
|
6
6
|
import { Component, ElementRef, HostBinding, Input, ChangeDetectorRef } from '@angular/core';
|
|
7
|
-
import { ResizeSensorComponent, shouldShowValidationUI, WatermarkOverlayComponent } from '@progress/kendo-angular-common';
|
|
8
|
-
import { calculateColumns, calculateGutters, generateColumnClass,
|
|
7
|
+
import { ResizeSensorComponent, shouldShowValidationUI, getLicenseMessage, WatermarkOverlayComponent } from '@progress/kendo-angular-common';
|
|
8
|
+
import { calculateColumns, calculateGutters, DEFAULT_FORM_GUTTERS, generateColumnClass, generateGuttersStyling, innerWidth } from './utils';
|
|
9
9
|
import { FormService } from '../common/formservice.service';
|
|
10
10
|
import { validatePackage } from '@progress/kendo-licensing';
|
|
11
11
|
import { packageMetadata } from '../package-metadata';
|
|
@@ -36,7 +36,7 @@ export class FormComponent {
|
|
|
36
36
|
* Defines the gutters for the form.
|
|
37
37
|
* You can specify gutters for rows and columns.
|
|
38
38
|
*/
|
|
39
|
-
gutters;
|
|
39
|
+
gutters = { ...DEFAULT_FORM_GUTTERS };
|
|
40
40
|
/**
|
|
41
41
|
* @hidden
|
|
42
42
|
*/
|
|
@@ -44,26 +44,29 @@ export class FormComponent {
|
|
|
44
44
|
/**
|
|
45
45
|
* @hidden
|
|
46
46
|
*/
|
|
47
|
-
|
|
47
|
+
guttersStyle = '';
|
|
48
48
|
/**
|
|
49
49
|
* @hidden
|
|
50
50
|
*/
|
|
51
|
-
|
|
51
|
+
showLicenseWatermark = false;
|
|
52
52
|
/**
|
|
53
53
|
* @hidden
|
|
54
54
|
*/
|
|
55
|
-
|
|
56
|
-
formClass
|
|
55
|
+
licenseMessage;
|
|
56
|
+
get formClass() {
|
|
57
|
+
return 'k-form k-form-md';
|
|
58
|
+
}
|
|
57
59
|
get horizontalClass() {
|
|
58
60
|
return this.orientation === 'horizontal';
|
|
59
61
|
}
|
|
60
62
|
_formColumnsNumber;
|
|
61
|
-
_formGutters;
|
|
63
|
+
_formGutters = { ...DEFAULT_FORM_GUTTERS };
|
|
62
64
|
constructor(element, cdr, formService) {
|
|
63
65
|
this.element = element;
|
|
64
66
|
this.cdr = cdr;
|
|
65
67
|
this.formService = formService;
|
|
66
68
|
const isValid = validatePackage(packageMetadata);
|
|
69
|
+
this.licenseMessage = getLicenseMessage(packageMetadata);
|
|
67
70
|
this.showLicenseWatermark = shouldShowValidationUI(isValid);
|
|
68
71
|
}
|
|
69
72
|
ngAfterContentInit() {
|
|
@@ -75,7 +78,7 @@ export class FormComponent {
|
|
|
75
78
|
if (changes['cols']) {
|
|
76
79
|
this.applyColumns();
|
|
77
80
|
}
|
|
78
|
-
|
|
81
|
+
if (changes['gutters']) {
|
|
79
82
|
this.applyGutters();
|
|
80
83
|
}
|
|
81
84
|
}
|
|
@@ -109,18 +112,16 @@ export class FormComponent {
|
|
|
109
112
|
this.columnsClass = generateColumnClass(this._formColumnsNumber);
|
|
110
113
|
}
|
|
111
114
|
updateGutterClasses() {
|
|
112
|
-
|
|
113
|
-
this.rowsGutterClass = gutterClasses.rows;
|
|
114
|
-
this.colsGutterClass = gutterClasses.cols;
|
|
115
|
+
this.guttersStyle = generateGuttersStyling(this._formGutters, { ...DEFAULT_FORM_GUTTERS });
|
|
115
116
|
}
|
|
116
117
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FormComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i1.FormService }], target: i0.ɵɵFactoryTarget.Component });
|
|
117
|
-
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
|
|
118
|
-
<div class="k-form-layout k-d-grid" [ngClass]="[columnsClass
|
|
118
|
+
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: `
|
|
119
|
+
<div class="k-form-layout k-d-grid" [ngClass]="[columnsClass]" [ngStyle]="{ gap: guttersStyle }">
|
|
119
120
|
<ng-content></ng-content>
|
|
120
121
|
</div>
|
|
121
122
|
<kendo-resize-sensor (resize)="onResize()"></kendo-resize-sensor>
|
|
122
|
-
<div kendoWatermarkOverlay *ngIf="showLicenseWatermark"></div>
|
|
123
|
-
`, 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]" }] });
|
|
123
|
+
<div kendoWatermarkOverlay *ngIf="showLicenseWatermark" [licenseMessage]="licenseMessage"></div>
|
|
124
|
+
`, 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"] }] });
|
|
124
125
|
}
|
|
125
126
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FormComponent, decorators: [{
|
|
126
127
|
type: Component,
|
|
@@ -128,14 +129,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
128
129
|
exportAs: 'kendoForm',
|
|
129
130
|
selector: 'form[kendoForm]',
|
|
130
131
|
template: `
|
|
131
|
-
<div class="k-form-layout k-d-grid" [ngClass]="[columnsClass
|
|
132
|
+
<div class="k-form-layout k-d-grid" [ngClass]="[columnsClass]" [ngStyle]="{ gap: guttersStyle }">
|
|
132
133
|
<ng-content></ng-content>
|
|
133
134
|
</div>
|
|
134
135
|
<kendo-resize-sensor (resize)="onResize()"></kendo-resize-sensor>
|
|
135
|
-
<div kendoWatermarkOverlay *ngIf="showLicenseWatermark"></div>
|
|
136
|
+
<div kendoWatermarkOverlay *ngIf="showLicenseWatermark" [licenseMessage]="licenseMessage"></div>
|
|
136
137
|
`,
|
|
137
138
|
standalone: true,
|
|
138
|
-
imports: [NgClass, NgIf, ResizeSensorComponent, WatermarkOverlayComponent],
|
|
139
|
+
imports: [NgClass, NgStyle, NgIf, ResizeSensorComponent, WatermarkOverlayComponent],
|
|
139
140
|
}]
|
|
140
141
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i1.FormService }]; }, propDecorators: { orientation: [{
|
|
141
142
|
type: Input
|
|
@@ -145,7 +146,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
145
146
|
type: Input
|
|
146
147
|
}], formClass: [{
|
|
147
148
|
type: HostBinding,
|
|
148
|
-
args: ['class
|
|
149
|
+
args: ['class']
|
|
149
150
|
}], horizontalClass: [{
|
|
150
151
|
type: HostBinding,
|
|
151
152
|
args: ['class.k-form-horizontal']
|
package/esm2022/form/utils.mjs
CHANGED
|
@@ -2,6 +2,15 @@
|
|
|
2
2
|
* Copyright © 2025 Progress Software Corporation. All rights reserved.
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
|
+
import { processCssValue } from '@progress/kendo-angular-common';
|
|
6
|
+
/**
|
|
7
|
+
* @hidden
|
|
8
|
+
*/
|
|
9
|
+
export const DEFAULT_FORM_GUTTERS = { rows: '0px', cols: '32px' };
|
|
10
|
+
/**
|
|
11
|
+
* @hidden
|
|
12
|
+
*/
|
|
13
|
+
export const DEFAULT_FORMFIELDSET_GUTTERS = { rows: '0px', cols: '16px' };
|
|
5
14
|
/**
|
|
6
15
|
* @hidden
|
|
7
16
|
*/
|
|
@@ -17,7 +26,7 @@ export function innerWidth(element) {
|
|
|
17
26
|
*/
|
|
18
27
|
export function processBreakpoints(breakpoints, containerWidth) {
|
|
19
28
|
if (!breakpoints?.length || containerWidth === null) {
|
|
20
|
-
return
|
|
29
|
+
return '';
|
|
21
30
|
}
|
|
22
31
|
for (const [index, breakpoint] of breakpoints.entries()) {
|
|
23
32
|
const minBreakpointWidth = breakpoint.minWidth || breakpoints[index - 1]?.maxWidth + 1 || 0;
|
|
@@ -26,7 +35,7 @@ export function processBreakpoints(breakpoints, containerWidth) {
|
|
|
26
35
|
return breakpoint.value;
|
|
27
36
|
}
|
|
28
37
|
}
|
|
29
|
-
return
|
|
38
|
+
return '';
|
|
30
39
|
}
|
|
31
40
|
/**
|
|
32
41
|
* @hidden
|
|
@@ -36,7 +45,8 @@ export const calculateColumns = (cols, containerWidth) => {
|
|
|
36
45
|
return null;
|
|
37
46
|
}
|
|
38
47
|
if (Array.isArray(cols) && cols.length > 0) {
|
|
39
|
-
|
|
48
|
+
const processedCols = processBreakpoints(cols, containerWidth) || null;
|
|
49
|
+
return typeof processedCols === 'string' ? parseInt(processedCols, 10) : processedCols;
|
|
40
50
|
}
|
|
41
51
|
else if (typeof cols === 'number') {
|
|
42
52
|
return cols;
|
|
@@ -52,18 +62,18 @@ export const calculateGutters = (gutters, containerWidth) => {
|
|
|
52
62
|
if (!gutters) {
|
|
53
63
|
return null;
|
|
54
64
|
}
|
|
55
|
-
if (typeof gutters === 'number') {
|
|
65
|
+
if (typeof gutters === 'number' || typeof gutters === 'string') {
|
|
56
66
|
return { cols: gutters, rows: gutters };
|
|
57
67
|
}
|
|
58
68
|
else if (Array.isArray(gutters)) {
|
|
59
|
-
const processedGutters = processBreakpoints(gutters, containerWidth);
|
|
69
|
+
const processedGutters = processBreakpoints(gutters, containerWidth) || null;
|
|
60
70
|
return processedGutters !== null ? { cols: processedGutters, rows: processedGutters } : null;
|
|
61
71
|
}
|
|
62
72
|
else if (typeof gutters === 'object') {
|
|
63
73
|
const gutterObject = gutters;
|
|
64
74
|
const result = { rows: null, cols: null };
|
|
65
75
|
if (gutterObject.cols !== undefined && gutterObject.cols !== null) {
|
|
66
|
-
if (typeof gutterObject.cols === 'number') {
|
|
76
|
+
if (typeof gutterObject.cols === 'number' || typeof gutterObject.cols === 'string') {
|
|
67
77
|
result.cols = gutterObject.cols;
|
|
68
78
|
}
|
|
69
79
|
else if (Array.isArray(gutterObject.cols)) {
|
|
@@ -74,7 +84,7 @@ export const calculateGutters = (gutters, containerWidth) => {
|
|
|
74
84
|
result.cols = null;
|
|
75
85
|
}
|
|
76
86
|
if (gutterObject.rows !== undefined) {
|
|
77
|
-
if (typeof gutterObject.rows === 'number') {
|
|
87
|
+
if (typeof gutterObject.rows === 'number' || typeof gutterObject.rows === 'string') {
|
|
78
88
|
result.rows = gutterObject.rows;
|
|
79
89
|
}
|
|
80
90
|
else if (Array.isArray(gutterObject.rows)) {
|
|
@@ -101,7 +111,8 @@ export const calculateColSpan = (colSpan, containerWidth) => {
|
|
|
101
111
|
return colSpan;
|
|
102
112
|
}
|
|
103
113
|
else if (Array.isArray(colSpan) && colSpan.length > 0) {
|
|
104
|
-
|
|
114
|
+
const processedColSpan = processBreakpoints(colSpan, containerWidth) || null;
|
|
115
|
+
return typeof processedColSpan === 'string' ? parseInt(processedColSpan, 10) : processedColSpan;
|
|
105
116
|
}
|
|
106
117
|
return null;
|
|
107
118
|
};
|
|
@@ -116,13 +127,12 @@ export const generateColumnClass = (columnsNumber) => {
|
|
|
116
127
|
/**
|
|
117
128
|
* @hidden
|
|
118
129
|
*
|
|
119
|
-
* Generates CSS
|
|
130
|
+
* Generates CSS styles for gutters based on the provided gutters object.
|
|
120
131
|
*/
|
|
121
|
-
export const
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
};
|
|
132
|
+
export const generateGuttersStyling = (gutters, defaultGutters = DEFAULT_FORM_GUTTERS) => {
|
|
133
|
+
const rows = processCssValue(gutters?.rows);
|
|
134
|
+
const cols = processCssValue(gutters?.cols);
|
|
135
|
+
return `${rows ?? defaultGutters.rows} ${cols ?? defaultGutters.cols}`;
|
|
126
136
|
};
|
|
127
137
|
/**
|
|
128
138
|
* @hidden
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
* Copyright © 2025 Progress Software Corporation. All rights reserved.
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { NgClass, NgIf } from '@angular/common';
|
|
5
|
+
import { NgClass, NgIf, NgStyle } from '@angular/common';
|
|
6
6
|
import { Component, HostBinding, Input, ElementRef, Renderer2, ChangeDetectorRef, } from '@angular/core';
|
|
7
7
|
import { FormService } from '../common/formservice.service';
|
|
8
8
|
import { filter } from 'rxjs/operators';
|
|
9
|
-
import { calculateColSpan, calculateColumns, calculateGutters, generateColSpanClass, generateColumnClass,
|
|
9
|
+
import { calculateColSpan, calculateColumns, calculateGutters, DEFAULT_FORMFIELDSET_GUTTERS, generateColSpanClass, generateColumnClass, generateGuttersStyling } from '../form/utils';
|
|
10
10
|
import { Subscription } from 'rxjs';
|
|
11
11
|
import { validatePackage } from '@progress/kendo-licensing';
|
|
12
12
|
import { packageMetadata } from '../package-metadata';
|
|
@@ -29,7 +29,7 @@ export class FormFieldSetComponent {
|
|
|
29
29
|
*/
|
|
30
30
|
legend;
|
|
31
31
|
/**
|
|
32
|
-
* Defines the number of columns the fieldset.
|
|
32
|
+
* Defines the number of columns of the fieldset.
|
|
33
33
|
* Can be a number or an array of responsive breakpoints.
|
|
34
34
|
*/
|
|
35
35
|
cols;
|
|
@@ -37,7 +37,7 @@ export class FormFieldSetComponent {
|
|
|
37
37
|
* Defines the gutters for the fieldset.
|
|
38
38
|
* You can specify gutters for rows and columns.
|
|
39
39
|
*/
|
|
40
|
-
gutters;
|
|
40
|
+
gutters = { ...DEFAULT_FORMFIELDSET_GUTTERS };
|
|
41
41
|
/**
|
|
42
42
|
* Defines the colspan for the fieldset related to the parent Form component columns.
|
|
43
43
|
* Can be a number or an array of responsive breakpoints.
|
|
@@ -50,18 +50,14 @@ export class FormFieldSetComponent {
|
|
|
50
50
|
/**
|
|
51
51
|
* @hidden
|
|
52
52
|
*/
|
|
53
|
-
|
|
54
|
-
/**
|
|
55
|
-
* @hidden
|
|
56
|
-
*/
|
|
57
|
-
colsGutterClass = '';
|
|
53
|
+
guttersStyle = '';
|
|
58
54
|
_formColumnsNumber;
|
|
59
55
|
_colSpanClass = null;
|
|
60
56
|
_formWidth = null;
|
|
61
|
-
_formGutters =
|
|
57
|
+
_formGutters = { ...DEFAULT_FORMFIELDSET_GUTTERS };
|
|
62
58
|
_previousColSpan = null;
|
|
63
59
|
_previousCols = null;
|
|
64
|
-
_previousGutters
|
|
60
|
+
_previousGutters;
|
|
65
61
|
subs = new Subscription();
|
|
66
62
|
constructor(elementRef, renderer, formService, cdr) {
|
|
67
63
|
this.elementRef = elementRef;
|
|
@@ -115,9 +111,8 @@ export class FormFieldSetComponent {
|
|
|
115
111
|
this.cdr.detectChanges();
|
|
116
112
|
}
|
|
117
113
|
updateGutterClasses() {
|
|
118
|
-
|
|
119
|
-
this.
|
|
120
|
-
this.colsGutterClass = gutterClasses.cols;
|
|
114
|
+
this.guttersStyle = generateGuttersStyling(this._formGutters, { ...DEFAULT_FORMFIELDSET_GUTTERS });
|
|
115
|
+
this.cdr.detectChanges();
|
|
121
116
|
}
|
|
122
117
|
updateColSpanClass() {
|
|
123
118
|
const hostElement = this.elementRef.nativeElement;
|
|
@@ -140,10 +135,10 @@ export class FormFieldSetComponent {
|
|
|
140
135
|
<legend *ngIf="legend" class="k-form-legend">
|
|
141
136
|
{{ legend }}
|
|
142
137
|
</legend>
|
|
143
|
-
<div class="k-form-layout k-d-grid" [ngClass]="[columnsClass
|
|
138
|
+
<div class="k-form-layout k-d-grid" [ngClass]="[columnsClass]" [ngStyle]="{'gap': guttersStyle}">
|
|
144
139
|
<ng-content></ng-content>
|
|
145
140
|
</div>
|
|
146
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
|
|
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"] }] });
|
|
147
142
|
}
|
|
148
143
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FormFieldSetComponent, decorators: [{
|
|
149
144
|
type: Component,
|
|
@@ -154,12 +149,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
154
149
|
<legend *ngIf="legend" class="k-form-legend">
|
|
155
150
|
{{ legend }}
|
|
156
151
|
</legend>
|
|
157
|
-
<div class="k-form-layout k-d-grid" [ngClass]="[columnsClass
|
|
152
|
+
<div class="k-form-layout k-d-grid" [ngClass]="[columnsClass]" [ngStyle]="{'gap': guttersStyle}">
|
|
158
153
|
<ng-content></ng-content>
|
|
159
154
|
</div>
|
|
160
155
|
`,
|
|
161
156
|
standalone: true,
|
|
162
|
-
imports: [NgIf, NgClass],
|
|
157
|
+
imports: [NgIf, NgClass, NgStyle],
|
|
163
158
|
}]
|
|
164
159
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i1.FormService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { formFieldSetClass: [{
|
|
165
160
|
type: HostBinding,
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
6
6
|
import { Component, ElementRef, EventEmitter, HostBinding, Input, Output, Renderer2, ViewChild, forwardRef, isDevMode, NgZone, ChangeDetectorRef, Injector, ContentChild } from '@angular/core';
|
|
7
|
-
import { anyChanged, hasObservers, Keys, guid, KendoInput, SuffixTemplateDirective, PrefixTemplateDirective, setHTMLAttributes, isControlRequired, isObjectPresent, removeHTMLAttributes, parseAttributes, EventsOutsideAngularDirective } from '@progress/kendo-angular-common';
|
|
7
|
+
import { anyChanged, hasObservers, Keys, guid, KendoInput, SuffixTemplateDirective, PrefixTemplateDirective, setHTMLAttributes, isControlRequired, isObjectPresent, removeHTMLAttributes, parseAttributes, EventsOutsideAngularDirective, normalizeNumpadKeys } from '@progress/kendo-angular-common';
|
|
8
8
|
import { areSame, getStylingClasses, requiresZoneOnBlur } from '../common/utils';
|
|
9
9
|
import { invokeElementMethod } from '../common/dom-utils';
|
|
10
10
|
import { add, toFixedPrecision, limitPrecision } from '../common/math';
|
|
@@ -616,10 +616,11 @@ export class NumericTextBoxComponent {
|
|
|
616
616
|
return;
|
|
617
617
|
}
|
|
618
618
|
let step;
|
|
619
|
-
|
|
619
|
+
const code = normalizeNumpadKeys(e);
|
|
620
|
+
if (code === Keys.ArrowDown) {
|
|
620
621
|
step = -1;
|
|
621
622
|
}
|
|
622
|
-
else if (
|
|
623
|
+
else if (code === Keys.ArrowUp) {
|
|
623
624
|
step = 1;
|
|
624
625
|
}
|
|
625
626
|
if (step && this.step) {
|
|
@@ -631,7 +632,7 @@ export class NumericTextBoxComponent {
|
|
|
631
632
|
end: input.selectionEnd,
|
|
632
633
|
start: input.selectionStart
|
|
633
634
|
};
|
|
634
|
-
this.pressedKey =
|
|
635
|
+
this.pressedKey = code;
|
|
635
636
|
};
|
|
636
637
|
/**
|
|
637
638
|
* @hidden
|
|
@@ -5,7 +5,7 @@
|
|
|
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, replaceMessagePlaceholder } from "@progress/kendo-angular-common";
|
|
8
|
+
import { KendoInput, Keys, hasObservers, isPresent, normalizeNumpadKeys, 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
11
|
import { SIZE_MAP, areSame } from "../common/utils";
|
|
@@ -574,14 +574,15 @@ export class OTPInputComponent {
|
|
|
574
574
|
this.inputFields.get(this.focusedInput).focus();
|
|
575
575
|
}
|
|
576
576
|
handleKeydown(event) {
|
|
577
|
+
const code = normalizeNumpadKeys(event);
|
|
577
578
|
if (this.readonly) {
|
|
578
|
-
const isCopyCommand = (event.ctrlKey || event.metaKey) &&
|
|
579
|
-
if (!(
|
|
579
|
+
const isCopyCommand = (event.ctrlKey || event.metaKey) && code === Keys.KeyC;
|
|
580
|
+
if (!(code === Keys.Tab || isCopyCommand)) {
|
|
580
581
|
event.preventDefault();
|
|
581
582
|
return;
|
|
582
583
|
}
|
|
583
584
|
}
|
|
584
|
-
switch (
|
|
585
|
+
switch (code) {
|
|
585
586
|
case Keys.ArrowRight:
|
|
586
587
|
event.preventDefault();
|
|
587
588
|
this.direction === 'ltr' ? this.focusNext() : this.focusPrevious();
|
|
@@ -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
|
|
13
|
+
publishDate: 1755030422,
|
|
14
|
+
version: '19.3.0',
|
|
15
15
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
|
|
16
16
|
};
|
|
@@ -10,7 +10,7 @@ import { RangeSliderModel } from './rangeslider-model';
|
|
|
10
10
|
import { L10N_PREFIX, LocalizationService } from '@progress/kendo-angular-l10n';
|
|
11
11
|
import { eventValue, isStartHandle } from '../sliders-common/sliders-util';
|
|
12
12
|
import { invokeElementMethod } from '../common/dom-utils';
|
|
13
|
-
import { guid, isDocumentAvailable, Keys, KendoInput, anyChanged, hasObservers, EventsOutsideAngularDirective, DraggableDirective, ResizeSensorComponent } from '@progress/kendo-angular-common';
|
|
13
|
+
import { guid, isDocumentAvailable, Keys, KendoInput, anyChanged, hasObservers, EventsOutsideAngularDirective, DraggableDirective, ResizeSensorComponent, normalizeNumpadKeys } from '@progress/kendo-angular-common';
|
|
14
14
|
import { requiresZoneOnBlur } from '../common/utils';
|
|
15
15
|
import { SliderBase } from '../sliders-common/slider-base';
|
|
16
16
|
import { SliderTicksComponent } from '../sliders-common/slider-ticks.component';
|
|
@@ -230,7 +230,9 @@ export class RangeSliderComponent extends SliderBase {
|
|
|
230
230
|
this.value = this.value || [this.min, this.min];
|
|
231
231
|
const options = this.getProps();
|
|
232
232
|
const { max, min } = options;
|
|
233
|
-
|
|
233
|
+
// on some keyboards arrow keys, PageUp/Down, and Home/End are mapped to Numpad keys
|
|
234
|
+
const code = normalizeNumpadKeys(e);
|
|
235
|
+
const handler = this.keyBinding[code];
|
|
234
236
|
if (this.isDisabled || !handler) {
|
|
235
237
|
return;
|
|
236
238
|
}
|
|
@@ -422,7 +424,7 @@ export class RangeSliderComponent extends SliderBase {
|
|
|
422
424
|
cursorInsideWrapper = false;
|
|
423
425
|
}));
|
|
424
426
|
this.subscriptions.add(this.renderer.listen(hostElement, 'keydown', (args) => {
|
|
425
|
-
if (args.
|
|
427
|
+
if (args.code === Keys.Tab) {
|
|
426
428
|
tabbing = true;
|
|
427
429
|
}
|
|
428
430
|
else {
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import { ChangeDetectorRef, Component, ContentChild, ElementRef, EventEmitter, forwardRef, HostBinding, Input, NgZone, Output, Renderer2 } from '@angular/core';
|
|
6
6
|
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
7
7
|
import { L10N_PREFIX, LocalizationService } from '@progress/kendo-angular-l10n';
|
|
8
|
-
import { isDocumentAvailable, KendoInput, Keys } from '@progress/kendo-angular-common';
|
|
8
|
+
import { isDocumentAvailable, KendoInput, Keys, normalizeNumpadKeys } from '@progress/kendo-angular-common';
|
|
9
9
|
import { validatePackage } from '@progress/kendo-licensing';
|
|
10
10
|
import { packageMetadata } from '../package-metadata';
|
|
11
11
|
import { starIcon, starOutlineIcon } from '@progress/kendo-svg-icons';
|
|
@@ -335,33 +335,38 @@ export class RatingComponent {
|
|
|
335
335
|
this.cdr.markForCheck();
|
|
336
336
|
}
|
|
337
337
|
};
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
if (event.keyCode === Keys.ArrowLeft) {
|
|
342
|
-
if (this.direction === 'ltr') {
|
|
338
|
+
const code = normalizeNumpadKeys(event);
|
|
339
|
+
switch (code) {
|
|
340
|
+
case Keys.ArrowDown:
|
|
343
341
|
decreaseValue();
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
342
|
+
break;
|
|
343
|
+
case Keys.ArrowLeft:
|
|
344
|
+
if (this.direction === 'ltr') {
|
|
345
|
+
decreaseValue();
|
|
346
|
+
}
|
|
347
|
+
else {
|
|
348
|
+
increaseValue();
|
|
349
|
+
}
|
|
350
|
+
break;
|
|
351
|
+
case Keys.ArrowUp:
|
|
354
352
|
increaseValue();
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
353
|
+
break;
|
|
354
|
+
case Keys.ArrowRight:
|
|
355
|
+
if (this.direction === 'ltr') {
|
|
356
|
+
increaseValue();
|
|
357
|
+
}
|
|
358
|
+
else {
|
|
359
|
+
decreaseValue();
|
|
360
|
+
}
|
|
361
|
+
break;
|
|
362
|
+
case Keys.Home:
|
|
363
|
+
setMinValue();
|
|
364
|
+
break;
|
|
365
|
+
case Keys.End:
|
|
366
|
+
setMaxValue();
|
|
367
|
+
break;
|
|
368
|
+
default:
|
|
369
|
+
break;
|
|
365
370
|
}
|
|
366
371
|
}
|
|
367
372
|
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 });
|