@progress/kendo-angular-label 21.4.1 → 22.0.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/fesm2022/progress-kendo-angular-label.mjs +29 -29
- package/localization/messages.d.ts +1 -1
- package/package.json +10 -18
- package/esm2022/directives.mjs +0 -45
- package/esm2022/floating-label/floating-label-input-adapter.mjs +0 -58
- package/esm2022/floating-label/floating-label.component.mjs +0 -354
- package/esm2022/floating-label/floating-label.module.mjs +0 -37
- package/esm2022/floating-label/models/label-position.mjs +0 -5
- package/esm2022/index.mjs +0 -12
- package/esm2022/label/label.component.mjs +0 -237
- package/esm2022/label.directive.mjs +0 -157
- package/esm2022/label.module.mjs +0 -45
- package/esm2022/localization/custom-messages.component.mjs +0 -44
- package/esm2022/localization/localized-messages.directive.mjs +0 -42
- package/esm2022/localization/messages.mjs +0 -27
- package/esm2022/package-metadata.mjs +0 -16
- package/esm2022/progress-kendo-angular-label.mjs +0 -8
- package/esm2022/util.mjs +0 -33
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
import * as i0 from '@angular/core';
|
|
6
|
-
import {
|
|
6
|
+
import { Input, HostBinding, Directive, EventEmitter, forwardRef, isDevMode, ContentChild, Output, Component, ViewChild, NgModule } from '@angular/core';
|
|
7
7
|
import { isDocumentAvailable, guid, hasObservers, KendoInput } from '@progress/kendo-angular-common';
|
|
8
8
|
import * as i1 from '@progress/kendo-angular-l10n';
|
|
9
9
|
import { ComponentMessages, LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n';
|
|
@@ -170,10 +170,10 @@ class LabelDirective {
|
|
|
170
170
|
component.focus();
|
|
171
171
|
}
|
|
172
172
|
};
|
|
173
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
174
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
173
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: LabelDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Directive });
|
|
174
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.18", type: LabelDirective, isStandalone: true, selector: "label[for]", inputs: { for: "for", labelClass: "labelClass" }, host: { properties: { "attr.for": "this.labelFor", "class.k-label": "this.labelClass" } }, ngImport: i0 });
|
|
175
175
|
}
|
|
176
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
176
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: LabelDirective, decorators: [{
|
|
177
177
|
type: Directive,
|
|
178
178
|
args: [{
|
|
179
179
|
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
@@ -200,8 +200,8 @@ const packageMetadata = {
|
|
|
200
200
|
productName: 'Kendo UI for Angular',
|
|
201
201
|
productCode: 'KENDOUIANGULAR',
|
|
202
202
|
productCodes: ['KENDOUIANGULAR'],
|
|
203
|
-
publishDate:
|
|
204
|
-
version: '
|
|
203
|
+
publishDate: 1768402348,
|
|
204
|
+
version: '22.0.0',
|
|
205
205
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
|
|
206
206
|
};
|
|
207
207
|
|
|
@@ -266,10 +266,10 @@ class Messages extends ComponentMessages {
|
|
|
266
266
|
* The optional text.
|
|
267
267
|
*/
|
|
268
268
|
optional;
|
|
269
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
270
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
269
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: Messages, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
270
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.18", type: Messages, isStandalone: true, selector: "kendo-label-messages-base", inputs: { optional: "optional" }, usesInheritance: true, ngImport: i0 });
|
|
271
271
|
}
|
|
272
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
272
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: Messages, decorators: [{
|
|
273
273
|
type: Directive,
|
|
274
274
|
args: [{
|
|
275
275
|
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
@@ -288,15 +288,15 @@ class LocalizedMessagesDirective extends Messages {
|
|
|
288
288
|
super();
|
|
289
289
|
this.service = service;
|
|
290
290
|
}
|
|
291
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
292
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
291
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: LocalizedMessagesDirective, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
292
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.18", type: LocalizedMessagesDirective, isStandalone: true, selector: "\n [kendoLabelLocalizedMessages],\n [kendoFloatingLabelLocalizedMessages]\n ", providers: [
|
|
293
293
|
{
|
|
294
294
|
provide: Messages,
|
|
295
295
|
useExisting: forwardRef(() => LocalizedMessagesDirective)
|
|
296
296
|
}
|
|
297
297
|
], usesInheritance: true, ngImport: i0 });
|
|
298
298
|
}
|
|
299
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
299
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: LocalizedMessagesDirective, decorators: [{
|
|
300
300
|
type: Directive,
|
|
301
301
|
args: [{
|
|
302
302
|
providers: [
|
|
@@ -567,8 +567,8 @@ class FloatingLabelComponent {
|
|
|
567
567
|
return;
|
|
568
568
|
}
|
|
569
569
|
}
|
|
570
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
571
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
570
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: FloatingLabelComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }, { token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
571
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.18", type: FloatingLabelComponent, isStandalone: true, selector: "kendo-floatinglabel", inputs: { labelCssStyle: "labelCssStyle", labelCssClass: "labelCssClass", id: "id", text: "text", optional: "optional" }, outputs: { positionChange: "positionChange" }, host: { properties: { "class.k-floating-label-container": "this.hostClasses", "class.k-focus": "this.focusedClass", "class.k-invalid": "this.invalidClass", "attr.dir": "this.direction" } }, providers: [
|
|
572
572
|
LocalizationService,
|
|
573
573
|
{
|
|
574
574
|
provide: L10N_PREFIX,
|
|
@@ -590,7 +590,7 @@ class FloatingLabelComponent {
|
|
|
590
590
|
}
|
|
591
591
|
`, isInline: true, dependencies: [{ kind: "directive", type: LocalizedMessagesDirective, selector: "\n [kendoLabelLocalizedMessages],\n [kendoFloatingLabelLocalizedMessages]\n " }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
|
|
592
592
|
}
|
|
593
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
593
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: FloatingLabelComponent, decorators: [{
|
|
594
594
|
type: Component,
|
|
595
595
|
args: [{
|
|
596
596
|
selector: 'kendo-floatinglabel',
|
|
@@ -794,8 +794,8 @@ class LabelComponent {
|
|
|
794
794
|
textFor(key) {
|
|
795
795
|
return this.localization.get(key);
|
|
796
796
|
}
|
|
797
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
798
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
797
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: LabelComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
798
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.18", type: LabelComponent, isStandalone: true, selector: "kendo-label", inputs: { text: "text", for: "for", optional: "optional", labelCssStyle: "labelCssStyle", labelCssClass: "labelCssClass" }, host: { properties: { "attr.dir": "this.direction" } }, providers: [
|
|
799
799
|
LocalizationService,
|
|
800
800
|
{
|
|
801
801
|
provide: L10N_PREFIX,
|
|
@@ -820,7 +820,7 @@ class LabelComponent {
|
|
|
820
820
|
<ng-content></ng-content>
|
|
821
821
|
`, isInline: true, dependencies: [{ kind: "directive", type: LocalizedMessagesDirective, selector: "\n [kendoLabelLocalizedMessages],\n [kendoFloatingLabelLocalizedMessages]\n " }, { kind: "directive", type: LabelDirective, selector: "label[for]", inputs: ["for", "labelClass"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
|
|
822
822
|
}
|
|
823
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
823
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: LabelComponent, decorators: [{
|
|
824
824
|
type: Component,
|
|
825
825
|
args: [{
|
|
826
826
|
selector: 'kendo-label',
|
|
@@ -887,15 +887,15 @@ class CustomMessagesComponent extends Messages {
|
|
|
887
887
|
get override() {
|
|
888
888
|
return true;
|
|
889
889
|
}
|
|
890
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
891
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
890
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: CustomMessagesComponent, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
891
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.18", type: CustomMessagesComponent, isStandalone: true, selector: "kendo-label-messages, kendo-floatinglabel-messages", providers: [
|
|
892
892
|
{
|
|
893
893
|
provide: Messages,
|
|
894
894
|
useExisting: forwardRef(() => CustomMessagesComponent)
|
|
895
895
|
}
|
|
896
896
|
], usesInheritance: true, ngImport: i0, template: ``, isInline: true });
|
|
897
897
|
}
|
|
898
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
898
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: CustomMessagesComponent, decorators: [{
|
|
899
899
|
type: Component,
|
|
900
900
|
args: [{
|
|
901
901
|
providers: [
|
|
@@ -971,11 +971,11 @@ const KENDO_LABELS = [
|
|
|
971
971
|
* ```
|
|
972
972
|
*/
|
|
973
973
|
class LabelModule {
|
|
974
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
975
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
976
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
974
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: LabelModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
975
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.18", ngImport: i0, type: LabelModule, imports: [LabelDirective, LabelComponent, CustomMessagesComponent, FloatingLabelComponent, CustomMessagesComponent], exports: [LabelDirective, LabelComponent, CustomMessagesComponent, FloatingLabelComponent, CustomMessagesComponent] });
|
|
976
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: LabelModule });
|
|
977
977
|
}
|
|
978
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
978
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: LabelModule, decorators: [{
|
|
979
979
|
type: NgModule,
|
|
980
980
|
args: [{
|
|
981
981
|
imports: [...KENDO_LABELS],
|
|
@@ -1000,11 +1000,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
1000
1000
|
* ```
|
|
1001
1001
|
*/
|
|
1002
1002
|
class FloatingLabelModule {
|
|
1003
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1004
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
1005
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
1003
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: FloatingLabelModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1004
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.18", ngImport: i0, type: FloatingLabelModule, imports: [FloatingLabelComponent, CustomMessagesComponent], exports: [FloatingLabelComponent, CustomMessagesComponent] });
|
|
1005
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: FloatingLabelModule });
|
|
1006
1006
|
}
|
|
1007
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1007
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: FloatingLabelModule, decorators: [{
|
|
1008
1008
|
type: NgModule,
|
|
1009
1009
|
args: [{
|
|
1010
1010
|
exports: [...KENDO_FLOATINGLABEL],
|
|
@@ -13,5 +13,5 @@ export declare class Messages extends ComponentMessages {
|
|
|
13
13
|
*/
|
|
14
14
|
optional: string;
|
|
15
15
|
static ɵfac: i0.ɵɵFactoryDeclaration<Messages, never>;
|
|
16
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<Messages, "kendo-label-messages-base", never, { "optional": { "alias": "optional"; "required": false; }; }, {}, never, never,
|
|
16
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<Messages, "kendo-label-messages-base", never, { "optional": { "alias": "optional"; "required": false; }; }, {}, never, never, true, never>;
|
|
17
17
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-angular-label",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "22.0.0",
|
|
4
4
|
"description": "Kendo UI Label for Angular",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"author": "Progress",
|
|
@@ -15,28 +15,22 @@
|
|
|
15
15
|
"Progress"
|
|
16
16
|
],
|
|
17
17
|
"@progress": {
|
|
18
|
-
"friendlyName": "Label"
|
|
19
|
-
"package": {
|
|
20
|
-
"productName": "Kendo UI for Angular",
|
|
21
|
-
"productCode": "KENDOUIANGULAR",
|
|
22
|
-
"publishDate": 1768393140,
|
|
23
|
-
"licensingDocsUrl": "https://www.telerik.com/kendo-angular-ui/my-license/"
|
|
24
|
-
}
|
|
18
|
+
"friendlyName": "Label"
|
|
25
19
|
},
|
|
26
20
|
"peerDependencies": {
|
|
27
|
-
"@angular/animations": "
|
|
28
|
-
"@angular/common": "
|
|
29
|
-
"@angular/core": "
|
|
30
|
-
"@angular/forms": "
|
|
31
|
-
"@angular/platform-browser": "
|
|
21
|
+
"@angular/animations": "19 - 21",
|
|
22
|
+
"@angular/common": "19 - 21",
|
|
23
|
+
"@angular/core": "19 - 21",
|
|
24
|
+
"@angular/forms": "19 - 21",
|
|
25
|
+
"@angular/platform-browser": "19 - 21",
|
|
32
26
|
"@progress/kendo-licensing": "^1.7.0",
|
|
33
|
-
"@progress/kendo-angular-common": "
|
|
34
|
-
"@progress/kendo-angular-l10n": "
|
|
27
|
+
"@progress/kendo-angular-common": "22.0.0",
|
|
28
|
+
"@progress/kendo-angular-l10n": "22.0.0",
|
|
35
29
|
"rxjs": "^6.5.3 || ^7.0.0"
|
|
36
30
|
},
|
|
37
31
|
"dependencies": {
|
|
38
32
|
"tslib": "^2.3.1",
|
|
39
|
-
"@progress/kendo-angular-schematics": "
|
|
33
|
+
"@progress/kendo-angular-schematics": "22.0.0"
|
|
40
34
|
},
|
|
41
35
|
"schematics": "./schematics/collection.json",
|
|
42
36
|
"module": "fesm2022/progress-kendo-angular-label.mjs",
|
|
@@ -47,8 +41,6 @@
|
|
|
47
41
|
},
|
|
48
42
|
".": {
|
|
49
43
|
"types": "./index.d.ts",
|
|
50
|
-
"esm2022": "./esm2022/progress-kendo-angular-label.mjs",
|
|
51
|
-
"esm": "./esm2022/progress-kendo-angular-label.mjs",
|
|
52
44
|
"default": "./fesm2022/progress-kendo-angular-label.mjs"
|
|
53
45
|
}
|
|
54
46
|
},
|
package/esm2022/directives.mjs
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { FloatingLabelComponent } from "./floating-label/floating-label.component";
|
|
6
|
-
import { LabelDirective } from "./label.directive";
|
|
7
|
-
import { LabelComponent } from "./label/label.component";
|
|
8
|
-
import { CustomMessagesComponent } from "./localization/custom-messages.component";
|
|
9
|
-
/**
|
|
10
|
-
* Holds all `Label`-related components and directives.
|
|
11
|
-
*
|
|
12
|
-
* @example
|
|
13
|
-
* ```typescript
|
|
14
|
-
* import { KENDO_LABEL } from '@progress/kendo-angular-label';
|
|
15
|
-
* ```
|
|
16
|
-
*/
|
|
17
|
-
export const KENDO_LABEL = [
|
|
18
|
-
LabelDirective,
|
|
19
|
-
LabelComponent,
|
|
20
|
-
CustomMessagesComponent
|
|
21
|
-
];
|
|
22
|
-
/**
|
|
23
|
-
* Holds all `FloatingLabel`-related components and directives.
|
|
24
|
-
*
|
|
25
|
-
* @example
|
|
26
|
-
* ```typescript
|
|
27
|
-
* import { KENDO_FLOATINGLABEL } from '@progress/kendo-angular-label';
|
|
28
|
-
* ```
|
|
29
|
-
*/
|
|
30
|
-
export const KENDO_FLOATINGLABEL = [
|
|
31
|
-
FloatingLabelComponent,
|
|
32
|
-
CustomMessagesComponent
|
|
33
|
-
];
|
|
34
|
-
/**
|
|
35
|
-
* Holds all `@progress/kendo-angular-label`-related components and directives.
|
|
36
|
-
*
|
|
37
|
-
* @example
|
|
38
|
-
* ```typescript
|
|
39
|
-
* import { KENDO_LABELS } from '@progress/kendo-angular-label';
|
|
40
|
-
* ```
|
|
41
|
-
*/
|
|
42
|
-
export const KENDO_LABELS = [
|
|
43
|
-
...KENDO_LABEL,
|
|
44
|
-
...KENDO_FLOATINGLABEL
|
|
45
|
-
];
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { Observable } from 'rxjs';
|
|
6
|
-
import { EventEmitter } from '@angular/core';
|
|
7
|
-
/**
|
|
8
|
-
* @hidden
|
|
9
|
-
*/
|
|
10
|
-
export class FloatingLabelInputAdapter {
|
|
11
|
-
component;
|
|
12
|
-
onFocus;
|
|
13
|
-
onBlur;
|
|
14
|
-
autoFillStart;
|
|
15
|
-
autoFillEnd;
|
|
16
|
-
onValueChange;
|
|
17
|
-
get focusableId() {
|
|
18
|
-
const component = this.component;
|
|
19
|
-
if ('focusableId' in component) {
|
|
20
|
-
return component.focusableId;
|
|
21
|
-
}
|
|
22
|
-
else if ('id' in component) {
|
|
23
|
-
return component.id;
|
|
24
|
-
}
|
|
25
|
-
return "";
|
|
26
|
-
}
|
|
27
|
-
set focusableId(value) {
|
|
28
|
-
const component = this.component;
|
|
29
|
-
if ('focusableId' in component) {
|
|
30
|
-
component.focusableId = value;
|
|
31
|
-
}
|
|
32
|
-
else if ('id' in component) {
|
|
33
|
-
component.id = value;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
constructor(component, formControl) {
|
|
37
|
-
this.component = component;
|
|
38
|
-
const isObservableOrEventEmitter = (event) => event instanceof Observable || event instanceof EventEmitter;
|
|
39
|
-
if (isObservableOrEventEmitter(component.onFocus)) {
|
|
40
|
-
this.onFocus = component.onFocus;
|
|
41
|
-
}
|
|
42
|
-
if (isObservableOrEventEmitter(component.autoFillStart)) {
|
|
43
|
-
this.autoFillStart = component.autoFillStart;
|
|
44
|
-
}
|
|
45
|
-
if (isObservableOrEventEmitter(component.autoFillEnd)) {
|
|
46
|
-
this.autoFillEnd = component.autoFillEnd;
|
|
47
|
-
}
|
|
48
|
-
if (isObservableOrEventEmitter(component.onBlur)) {
|
|
49
|
-
this.onBlur = component.onBlur;
|
|
50
|
-
}
|
|
51
|
-
if (formControl) {
|
|
52
|
-
this.onValueChange = formControl.valueChanges;
|
|
53
|
-
}
|
|
54
|
-
else if (component.valueChange) {
|
|
55
|
-
this.onValueChange = component.valueChange;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
}
|