@progress/kendo-angular-label 23.1.1-develop.1 → 23.1.1-develop.3
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.
|
@@ -203,7 +203,7 @@ const packageMetadata = {
|
|
|
203
203
|
productCode: 'KENDOUIANGULAR',
|
|
204
204
|
productCodes: ['KENDOUIANGULAR'],
|
|
205
205
|
publishDate: 0,
|
|
206
|
-
version: '23.1.1-develop.
|
|
206
|
+
version: '23.1.1-develop.3',
|
|
207
207
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
|
|
208
208
|
};
|
|
209
209
|
|
|
@@ -422,6 +422,30 @@ class FloatingLabelComponent {
|
|
|
422
422
|
this.direction = localization.rtl ? 'rtl' : 'ltr';
|
|
423
423
|
this.renderer.removeAttribute(this.elementRef.nativeElement, "id");
|
|
424
424
|
}
|
|
425
|
+
/**
|
|
426
|
+
* @hidden
|
|
427
|
+
*/
|
|
428
|
+
ngAfterContentChecked() {
|
|
429
|
+
if (!this.kendoInput || this.formControl) {
|
|
430
|
+
return;
|
|
431
|
+
}
|
|
432
|
+
const currentEmpty = isFunction(this.kendoInput.isEmpty)
|
|
433
|
+
? this.kendoInput.isEmpty()
|
|
434
|
+
: this.isValueEmpty(this.kendoInput.value);
|
|
435
|
+
if (currentEmpty !== this.empty) {
|
|
436
|
+
this.empty = currentEmpty;
|
|
437
|
+
if (currentEmpty) {
|
|
438
|
+
this.renderer.addClass(this.elementRef.nativeElement, 'k-empty');
|
|
439
|
+
}
|
|
440
|
+
else {
|
|
441
|
+
this.renderer.removeClass(this.elementRef.nativeElement, 'k-empty');
|
|
442
|
+
}
|
|
443
|
+
if (!this.focused && hasObservers(this.positionChange)) {
|
|
444
|
+
this.positionChange.emit(currentEmpty ? 'In' : 'Out');
|
|
445
|
+
}
|
|
446
|
+
this.changeDetectorRef.markForCheck();
|
|
447
|
+
}
|
|
448
|
+
}
|
|
425
449
|
/**
|
|
426
450
|
* @hidden
|
|
427
451
|
*/
|
|
@@ -465,17 +489,6 @@ class FloatingLabelComponent {
|
|
|
465
489
|
}
|
|
466
490
|
}
|
|
467
491
|
updateState() {
|
|
468
|
-
const empty = value => {
|
|
469
|
-
// zero is not an empty value (e.g., NumericTextBox)
|
|
470
|
-
if (value === 0 || value === false) {
|
|
471
|
-
return false;
|
|
472
|
-
}
|
|
473
|
-
// empty arrays are an empty value (e.g., MultiSelect)
|
|
474
|
-
if (Array.isArray(value) && !value.length) {
|
|
475
|
-
return true;
|
|
476
|
-
}
|
|
477
|
-
return !value;
|
|
478
|
-
};
|
|
479
492
|
const formControl = this.formControl;
|
|
480
493
|
if (formControl) {
|
|
481
494
|
const valueAccessor = formControl.valueAccessor;
|
|
@@ -483,13 +496,13 @@ class FloatingLabelComponent {
|
|
|
483
496
|
this.empty = valueAccessor.isEmpty();
|
|
484
497
|
}
|
|
485
498
|
else {
|
|
486
|
-
this.empty =
|
|
499
|
+
this.empty = this.isValueEmpty(formControl.value);
|
|
487
500
|
}
|
|
488
501
|
this.invalid = formControl.invalid && (formControl.touched || formControl.dirty);
|
|
489
502
|
}
|
|
490
503
|
else {
|
|
491
504
|
this.empty = isFunction(this.kendoInput.isEmpty) ?
|
|
492
|
-
this.kendoInput.isEmpty() :
|
|
505
|
+
this.kendoInput.isEmpty() : this.isValueEmpty(this.kendoInput.value);
|
|
493
506
|
}
|
|
494
507
|
if (this.empty) {
|
|
495
508
|
this.renderer.addClass(this.elementRef.nativeElement, 'k-empty');
|
|
@@ -499,6 +512,17 @@ class FloatingLabelComponent {
|
|
|
499
512
|
}
|
|
500
513
|
this.changeDetectorRef.markForCheck();
|
|
501
514
|
}
|
|
515
|
+
isValueEmpty(value) {
|
|
516
|
+
// zero is not an empty value (e.g., NumericTextBox)
|
|
517
|
+
if (value === 0 || value === false) {
|
|
518
|
+
return false;
|
|
519
|
+
}
|
|
520
|
+
// empty arrays are an empty value (e.g., MultiSelect)
|
|
521
|
+
if (Array.isArray(value) && !value.length) {
|
|
522
|
+
return true;
|
|
523
|
+
}
|
|
524
|
+
return !value;
|
|
525
|
+
}
|
|
502
526
|
setAriaLabelledby(component) {
|
|
503
527
|
const componentId = component.focusableId || component.id;
|
|
504
528
|
if (componentId) {
|
|
@@ -589,8 +613,8 @@ class FloatingLabelComponent {
|
|
|
589
613
|
</ng-container>
|
|
590
614
|
<ng-content></ng-content>
|
|
591
615
|
@if (text) {
|
|
592
|
-
<label [ngClass]="labelCssClass" [ngStyle]="labelCssStyle" [for]="id" [attr.id]="labelId" class="k-floating-label"
|
|
593
|
-
{{ text }}@if (optional) {
|
|
616
|
+
<label [ngClass]="labelCssClass" [ngStyle]="labelCssStyle" [for]="id" [attr.id]="labelId" class="k-floating-label"
|
|
617
|
+
>{{ text }}@if (optional) {
|
|
594
618
|
<span class="k-label-optional">({{textFor('optional')}})</span>
|
|
595
619
|
}
|
|
596
620
|
</label>
|
|
@@ -617,8 +641,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
|
|
|
617
641
|
</ng-container>
|
|
618
642
|
<ng-content></ng-content>
|
|
619
643
|
@if (text) {
|
|
620
|
-
<label [ngClass]="labelCssClass" [ngStyle]="labelCssStyle" [for]="id" [attr.id]="labelId" class="k-floating-label"
|
|
621
|
-
{{ text }}@if (optional) {
|
|
644
|
+
<label [ngClass]="labelCssClass" [ngStyle]="labelCssStyle" [for]="id" [attr.id]="labelId" class="k-floating-label"
|
|
645
|
+
>{{ text }}@if (optional) {
|
|
622
646
|
<span class="k-label-optional">({{textFor('optional')}})</span>
|
|
623
647
|
}
|
|
624
648
|
</label>
|
|
@@ -819,8 +843,7 @@ class LabelComponent {
|
|
|
819
843
|
[class.k-label-empty]="!text"
|
|
820
844
|
[ngClass]="labelCssClass"
|
|
821
845
|
[ngStyle]="labelCssStyle"
|
|
822
|
-
>
|
|
823
|
-
{{ text }}@if (optional) {
|
|
846
|
+
>{{ text }}@if (optional) {
|
|
824
847
|
<span class="k-label-optional">({{textFor('optional')}})</span>
|
|
825
848
|
}
|
|
826
849
|
</label>
|
|
@@ -850,8 +873,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
|
|
|
850
873
|
[class.k-label-empty]="!text"
|
|
851
874
|
[ngClass]="labelCssClass"
|
|
852
875
|
[ngStyle]="labelCssStyle"
|
|
853
|
-
>
|
|
854
|
-
{{ text }}@if (optional) {
|
|
876
|
+
>{{ text }}@if (optional) {
|
|
855
877
|
<span class="k-label-optional">({{textFor('optional')}})</span>
|
|
856
878
|
}
|
|
857
879
|
</label>
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Copyright © 2026 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 { AfterContentInit, ElementRef, EventEmitter, OnDestroy, Renderer2, ChangeDetectorRef } from '@angular/core';
|
|
5
|
+
import { AfterContentChecked, AfterContentInit, ElementRef, EventEmitter, OnDestroy, Renderer2, ChangeDetectorRef } from '@angular/core';
|
|
6
6
|
import { LocalizationService } from '@progress/kendo-angular-l10n';
|
|
7
7
|
import { NgControl } from '@angular/forms';
|
|
8
8
|
import { FloatingLabelPosition } from './models/label-position';
|
|
@@ -25,7 +25,7 @@ import * as i0 from "@angular/core";
|
|
|
25
25
|
* @remarks
|
|
26
26
|
* Supported children components are: {@link CustomMessagesComponent}.
|
|
27
27
|
*/
|
|
28
|
-
export declare class FloatingLabelComponent implements AfterContentInit, OnDestroy {
|
|
28
|
+
export declare class FloatingLabelComponent implements AfterContentChecked, AfterContentInit, OnDestroy {
|
|
29
29
|
private elementRef;
|
|
30
30
|
private renderer;
|
|
31
31
|
private changeDetectorRef;
|
|
@@ -97,6 +97,10 @@ export declare class FloatingLabelComponent implements AfterContentInit, OnDestr
|
|
|
97
97
|
private subscription;
|
|
98
98
|
private autoFillStarted;
|
|
99
99
|
constructor(elementRef: ElementRef, renderer: Renderer2, changeDetectorRef: ChangeDetectorRef, localization: LocalizationService);
|
|
100
|
+
/**
|
|
101
|
+
* @hidden
|
|
102
|
+
*/
|
|
103
|
+
ngAfterContentChecked(): void;
|
|
100
104
|
/**
|
|
101
105
|
* @hidden
|
|
102
106
|
*/
|
|
@@ -112,6 +116,7 @@ export declare class FloatingLabelComponent implements AfterContentInit, OnDestr
|
|
|
112
116
|
textFor(key: string): string;
|
|
113
117
|
private subscribe;
|
|
114
118
|
private updateState;
|
|
119
|
+
private isValueEmpty;
|
|
115
120
|
private setAriaLabelledby;
|
|
116
121
|
private setLabelFor;
|
|
117
122
|
private handleAutofill;
|
package/package-metadata.mjs
CHANGED
|
@@ -7,7 +7,7 @@ export const packageMetadata = {
|
|
|
7
7
|
"productCodes": [
|
|
8
8
|
"KENDOUIANGULAR"
|
|
9
9
|
],
|
|
10
|
-
"publishDate":
|
|
11
|
-
"version": "23.1.1-develop.
|
|
10
|
+
"publishDate": 1771514230,
|
|
11
|
+
"version": "23.1.1-develop.3",
|
|
12
12
|
"licensingDocsUrl": "https://www.telerik.com/kendo-angular-ui/my-license/"
|
|
13
13
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-angular-label",
|
|
3
|
-
"version": "23.1.1-develop.
|
|
3
|
+
"version": "23.1.1-develop.3",
|
|
4
4
|
"description": "Kendo UI Label for Angular",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"author": "Progress",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"package": {
|
|
20
20
|
"productName": "Kendo UI for Angular",
|
|
21
21
|
"productCode": "KENDOUIANGULAR",
|
|
22
|
-
"publishDate":
|
|
22
|
+
"publishDate": 1771514230,
|
|
23
23
|
"licensingDocsUrl": "https://www.telerik.com/kendo-angular-ui/my-license/"
|
|
24
24
|
}
|
|
25
25
|
},
|
|
@@ -30,13 +30,13 @@
|
|
|
30
30
|
"@angular/forms": "19 - 21",
|
|
31
31
|
"@angular/platform-browser": "19 - 21",
|
|
32
32
|
"@progress/kendo-licensing": "^1.10.0",
|
|
33
|
-
"@progress/kendo-angular-common": "23.1.1-develop.
|
|
34
|
-
"@progress/kendo-angular-l10n": "23.1.1-develop.
|
|
33
|
+
"@progress/kendo-angular-common": "23.1.1-develop.3",
|
|
34
|
+
"@progress/kendo-angular-l10n": "23.1.1-develop.3",
|
|
35
35
|
"rxjs": "^6.5.3 || ^7.0.0"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"tslib": "^2.3.1",
|
|
39
|
-
"@progress/kendo-angular-schematics": "23.1.1-develop.
|
|
39
|
+
"@progress/kendo-angular-schematics": "23.1.1-develop.3"
|
|
40
40
|
},
|
|
41
41
|
"schematics": "./schematics/collection.json",
|
|
42
42
|
"module": "fesm2022/progress-kendo-angular-label.mjs",
|