@progress/kendo-angular-label 3.0.3 → 3.1.1
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/dist/cdn/js/kendo-angular-label.js +3 -3
- package/dist/cdn/main.js +2 -2
- package/dist/es/floating-label/floating-label-input-adapter.js +1 -1
- package/dist/es/floating-label/floating-label.component.js +39 -4
- package/dist/es/floating-label/floating-label.module.js +1 -1
- package/dist/es/floating-label/models/label-position.js +4 -0
- package/dist/es/index.js +1 -1
- package/dist/es/label/label.component.js +1 -1
- package/dist/es/label.directive.js +2 -2
- package/dist/es/label.module.js +1 -1
- package/dist/es/localization/custom-messages.component.js +1 -1
- package/dist/es/localization/localized-messages.directive.js +1 -1
- package/dist/es/localization/messages.js +1 -1
- package/dist/es/main.js +1 -1
- package/dist/es/package-metadata.js +2 -2
- package/dist/es/shared.module.js +1 -1
- package/dist/es/util.js +1 -1
- package/dist/es2015/floating-label/floating-label-input-adapter.d.ts +1 -1
- package/dist/es2015/floating-label/floating-label-input-adapter.js +1 -1
- package/dist/es2015/floating-label/floating-label.component.d.ts +21 -2
- package/dist/es2015/floating-label/floating-label.component.js +35 -4
- package/dist/es2015/floating-label/floating-label.module.d.ts +1 -1
- package/dist/es2015/floating-label/floating-label.module.js +1 -1
- package/dist/es2015/floating-label/models/label-position.d.ts +12 -0
- package/dist/es2015/floating-label/models/label-position.js +4 -0
- package/dist/es2015/index.d.ts +1 -1
- package/dist/es2015/index.js +1 -1
- package/dist/es2015/index.metadata.json +1 -1
- package/dist/es2015/label/label.component.d.ts +1 -1
- package/dist/es2015/label/label.component.js +1 -1
- package/dist/es2015/label.directive.d.ts +2 -2
- package/dist/es2015/label.directive.js +2 -2
- package/dist/es2015/label.module.d.ts +1 -1
- package/dist/es2015/label.module.js +1 -1
- package/dist/es2015/localization/custom-messages.component.d.ts +1 -1
- package/dist/es2015/localization/custom-messages.component.js +1 -1
- package/dist/es2015/localization/localized-messages.directive.d.ts +1 -1
- package/dist/es2015/localization/localized-messages.directive.js +1 -1
- package/dist/es2015/localization/messages.d.ts +1 -1
- package/dist/es2015/localization/messages.js +1 -1
- package/dist/es2015/main.d.ts +2 -1
- package/dist/es2015/main.js +1 -1
- package/dist/es2015/package-metadata.d.ts +1 -1
- package/dist/es2015/package-metadata.js +2 -2
- package/dist/es2015/shared.module.d.ts +1 -1
- package/dist/es2015/shared.module.js +1 -1
- package/dist/es2015/util.d.ts +1 -1
- package/dist/es2015/util.js +1 -1
- package/dist/fesm2015/index.js +37 -6
- package/dist/fesm5/index.js +41 -6
- package/dist/npm/floating-label/floating-label-input-adapter.js +1 -1
- package/dist/npm/floating-label/floating-label.component.js +37 -2
- package/dist/npm/floating-label/floating-label.module.js +1 -1
- package/dist/npm/floating-label/models/label-position.js +6 -0
- package/dist/npm/index.js +1 -1
- package/dist/npm/label/label.component.js +1 -1
- package/dist/npm/label.directive.js +2 -2
- package/dist/npm/label.module.js +1 -1
- package/dist/npm/localization/custom-messages.component.js +1 -1
- package/dist/npm/localization/localized-messages.directive.js +1 -1
- package/dist/npm/localization/messages.js +1 -1
- package/dist/npm/main.js +1 -1
- package/dist/npm/package-metadata.js +2 -2
- package/dist/npm/shared.module.js +1 -1
- package/dist/npm/util.js +1 -1
- package/dist/systemjs/kendo-angular-label.js +2 -2
- package/package.json +5 -5
package/dist/fesm5/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright ©
|
|
2
|
+
* Copyright © 2021 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
5
|
import { __decorate, __metadata, __extends } from 'tslib';
|
|
6
|
-
import { Input, HostBinding, Directive, ElementRef, Renderer2, NgZone, forwardRef, Component, NgModule, EventEmitter, isDevMode, ContentChild, ChangeDetectorRef, ViewChild } from '@angular/core';
|
|
7
|
-
import { isDocumentAvailable, guid, KendoInput } from '@progress/kendo-angular-common';
|
|
6
|
+
import { Input, HostBinding, Directive, ElementRef, Renderer2, NgZone, forwardRef, Component, NgModule, EventEmitter, isDevMode, Output, ContentChild, ChangeDetectorRef, ViewChild } from '@angular/core';
|
|
7
|
+
import { isDocumentAvailable, guid, hasObservers, KendoInput } from '@progress/kendo-angular-common';
|
|
8
8
|
import { ComponentMessages, LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n';
|
|
9
9
|
import { CommonModule } from '@angular/common';
|
|
10
10
|
import { NgControl } from '@angular/forms';
|
|
@@ -63,7 +63,7 @@ var getRootElement = function (element) {
|
|
|
63
63
|
* </div>
|
|
64
64
|
*
|
|
65
65
|
* <div class="col-xs-12 col-md-6 example-col">
|
|
66
|
-
* <label
|
|
66
|
+
* <label for="input">Input: </label>
|
|
67
67
|
* <input id="input" />
|
|
68
68
|
* </div>
|
|
69
69
|
* </div>
|
|
@@ -277,7 +277,7 @@ var packageMetadata = {
|
|
|
277
277
|
name: '@progress/kendo-angular-label',
|
|
278
278
|
productName: 'Kendo UI for Angular',
|
|
279
279
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
280
|
-
publishDate:
|
|
280
|
+
publishDate: 1635940028,
|
|
281
281
|
version: '',
|
|
282
282
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning'
|
|
283
283
|
};
|
|
@@ -367,6 +367,10 @@ var FloatingLabelComponent = /** @class */ (function () {
|
|
|
367
367
|
this.changeDetectorRef = changeDetectorRef;
|
|
368
368
|
this.localization = localization;
|
|
369
369
|
this.hostClasses = true;
|
|
370
|
+
/**
|
|
371
|
+
* Fires after the floating label position is changed.
|
|
372
|
+
*/
|
|
373
|
+
this.positionChange = new EventEmitter();
|
|
370
374
|
/**
|
|
371
375
|
* @hidden
|
|
372
376
|
*/
|
|
@@ -388,6 +392,19 @@ var FloatingLabelComponent = /** @class */ (function () {
|
|
|
388
392
|
this.direction = localization.rtl ? 'rtl' : 'ltr';
|
|
389
393
|
this.renderer.removeAttribute(this.elementRef.nativeElement, "id");
|
|
390
394
|
}
|
|
395
|
+
Object.defineProperty(FloatingLabelComponent.prototype, "labelPosition", {
|
|
396
|
+
/**
|
|
397
|
+
* Represents the current floating label position.
|
|
398
|
+
*/
|
|
399
|
+
get: function () {
|
|
400
|
+
if (!this.empty) {
|
|
401
|
+
return 'Out';
|
|
402
|
+
}
|
|
403
|
+
return this.focused ? 'Out' : 'In';
|
|
404
|
+
},
|
|
405
|
+
enumerable: true,
|
|
406
|
+
configurable: true
|
|
407
|
+
});
|
|
391
408
|
Object.defineProperty(FloatingLabelComponent.prototype, "focusedClass", {
|
|
392
409
|
get: function () {
|
|
393
410
|
return this.focused;
|
|
@@ -521,6 +538,12 @@ var FloatingLabelComponent = /** @class */ (function () {
|
|
|
521
538
|
var setFocus = function (isFocused) { return function () {
|
|
522
539
|
_this.focused = isFocused;
|
|
523
540
|
_this.updateState();
|
|
541
|
+
if (!_this.empty) {
|
|
542
|
+
return;
|
|
543
|
+
}
|
|
544
|
+
if (hasObservers(_this.positionChange)) {
|
|
545
|
+
_this.positionChange.emit(isFocused ? 'Out' : 'In');
|
|
546
|
+
}
|
|
524
547
|
}; };
|
|
525
548
|
this.subscribe(control, 'onFocus', setFocus(true));
|
|
526
549
|
this.subscribe(control, 'onBlur', setFocus(false));
|
|
@@ -556,6 +579,14 @@ var FloatingLabelComponent = /** @class */ (function () {
|
|
|
556
579
|
HostBinding('attr.dir'),
|
|
557
580
|
__metadata("design:type", String)
|
|
558
581
|
], FloatingLabelComponent.prototype, "direction", void 0);
|
|
582
|
+
__decorate([
|
|
583
|
+
Input(),
|
|
584
|
+
__metadata("design:type", Object)
|
|
585
|
+
], FloatingLabelComponent.prototype, "labelCssStyle", void 0);
|
|
586
|
+
__decorate([
|
|
587
|
+
Input(),
|
|
588
|
+
__metadata("design:type", Object)
|
|
589
|
+
], FloatingLabelComponent.prototype, "labelCssClass", void 0);
|
|
559
590
|
__decorate([
|
|
560
591
|
Input(),
|
|
561
592
|
__metadata("design:type", String)
|
|
@@ -568,6 +599,10 @@ var FloatingLabelComponent = /** @class */ (function () {
|
|
|
568
599
|
Input(),
|
|
569
600
|
__metadata("design:type", Boolean)
|
|
570
601
|
], FloatingLabelComponent.prototype, "optional", void 0);
|
|
602
|
+
__decorate([
|
|
603
|
+
Output(),
|
|
604
|
+
__metadata("design:type", EventEmitter)
|
|
605
|
+
], FloatingLabelComponent.prototype, "positionChange", void 0);
|
|
571
606
|
__decorate([
|
|
572
607
|
ContentChild(KendoInput, { static: false }),
|
|
573
608
|
__metadata("design:type", Object)
|
|
@@ -587,7 +622,7 @@ var FloatingLabelComponent = /** @class */ (function () {
|
|
|
587
622
|
useValue: 'kendo.floatinglabel'
|
|
588
623
|
}
|
|
589
624
|
],
|
|
590
|
-
template: "\n <ng-container kendoFloatingLabelLocalizedMessages\n i18n-optional=\"kendo.floatinglabel.optional|The text for the optional segment of a FloatingLabel component\"\n optional=\"Optional\"\n >\n </ng-container>\n <ng-content></ng-content>\n <label *ngIf=\"text\" [for]=\"id\" [attr.id]=\"labelId\" class=\"k-label\">\n {{ text }}<span *ngIf=\"optional\" class=\"k-label-optional\">({{textFor('optional')}})</span>\n </label>\n "
|
|
625
|
+
template: "\n <ng-container kendoFloatingLabelLocalizedMessages\n i18n-optional=\"kendo.floatinglabel.optional|The text for the optional segment of a FloatingLabel component\"\n optional=\"Optional\"\n >\n </ng-container>\n <ng-content></ng-content>\n <label *ngIf=\"text\" [ngClass]=\"labelCssClass\" [ngStyle]=\"labelCssStyle\" [for]=\"id\" [attr.id]=\"labelId\" class=\"k-label\">\n {{ text }}<span *ngIf=\"optional\" class=\"k-label-optional\">({{textFor('optional')}})</span>\n </label>\n "
|
|
591
626
|
}),
|
|
592
627
|
__metadata("design:paramtypes", [ElementRef,
|
|
593
628
|
Renderer2,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright ©
|
|
2
|
+
* Copyright © 2021 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
5
|
"use strict";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright ©
|
|
2
|
+
* Copyright © 2021 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
5
|
"use strict";
|
|
@@ -47,6 +47,10 @@ var FloatingLabelComponent = /** @class */ (function () {
|
|
|
47
47
|
this.changeDetectorRef = changeDetectorRef;
|
|
48
48
|
this.localization = localization;
|
|
49
49
|
this.hostClasses = true;
|
|
50
|
+
/**
|
|
51
|
+
* Fires after the floating label position is changed.
|
|
52
|
+
*/
|
|
53
|
+
this.positionChange = new core_1.EventEmitter();
|
|
50
54
|
/**
|
|
51
55
|
* @hidden
|
|
52
56
|
*/
|
|
@@ -68,6 +72,19 @@ var FloatingLabelComponent = /** @class */ (function () {
|
|
|
68
72
|
this.direction = localization.rtl ? 'rtl' : 'ltr';
|
|
69
73
|
this.renderer.removeAttribute(this.elementRef.nativeElement, "id");
|
|
70
74
|
}
|
|
75
|
+
Object.defineProperty(FloatingLabelComponent.prototype, "labelPosition", {
|
|
76
|
+
/**
|
|
77
|
+
* Represents the current floating label position.
|
|
78
|
+
*/
|
|
79
|
+
get: function () {
|
|
80
|
+
if (!this.empty) {
|
|
81
|
+
return 'Out';
|
|
82
|
+
}
|
|
83
|
+
return this.focused ? 'Out' : 'In';
|
|
84
|
+
},
|
|
85
|
+
enumerable: true,
|
|
86
|
+
configurable: true
|
|
87
|
+
});
|
|
71
88
|
Object.defineProperty(FloatingLabelComponent.prototype, "focusedClass", {
|
|
72
89
|
get: function () {
|
|
73
90
|
return this.focused;
|
|
@@ -201,6 +218,12 @@ var FloatingLabelComponent = /** @class */ (function () {
|
|
|
201
218
|
var setFocus = function (isFocused) { return function () {
|
|
202
219
|
_this.focused = isFocused;
|
|
203
220
|
_this.updateState();
|
|
221
|
+
if (!_this.empty) {
|
|
222
|
+
return;
|
|
223
|
+
}
|
|
224
|
+
if (kendo_angular_common_1.hasObservers(_this.positionChange)) {
|
|
225
|
+
_this.positionChange.emit(isFocused ? 'Out' : 'In');
|
|
226
|
+
}
|
|
204
227
|
}; };
|
|
205
228
|
this.subscribe(control, 'onFocus', setFocus(true));
|
|
206
229
|
this.subscribe(control, 'onBlur', setFocus(false));
|
|
@@ -236,6 +259,14 @@ var FloatingLabelComponent = /** @class */ (function () {
|
|
|
236
259
|
core_1.HostBinding('attr.dir'),
|
|
237
260
|
tslib_1.__metadata("design:type", String)
|
|
238
261
|
], FloatingLabelComponent.prototype, "direction", void 0);
|
|
262
|
+
tslib_1.__decorate([
|
|
263
|
+
core_1.Input(),
|
|
264
|
+
tslib_1.__metadata("design:type", Object)
|
|
265
|
+
], FloatingLabelComponent.prototype, "labelCssStyle", void 0);
|
|
266
|
+
tslib_1.__decorate([
|
|
267
|
+
core_1.Input(),
|
|
268
|
+
tslib_1.__metadata("design:type", Object)
|
|
269
|
+
], FloatingLabelComponent.prototype, "labelCssClass", void 0);
|
|
239
270
|
tslib_1.__decorate([
|
|
240
271
|
core_1.Input(),
|
|
241
272
|
tslib_1.__metadata("design:type", String)
|
|
@@ -248,6 +279,10 @@ var FloatingLabelComponent = /** @class */ (function () {
|
|
|
248
279
|
core_1.Input(),
|
|
249
280
|
tslib_1.__metadata("design:type", Boolean)
|
|
250
281
|
], FloatingLabelComponent.prototype, "optional", void 0);
|
|
282
|
+
tslib_1.__decorate([
|
|
283
|
+
core_1.Output(),
|
|
284
|
+
tslib_1.__metadata("design:type", core_1.EventEmitter)
|
|
285
|
+
], FloatingLabelComponent.prototype, "positionChange", void 0);
|
|
251
286
|
tslib_1.__decorate([
|
|
252
287
|
core_1.ContentChild(kendo_angular_common_1.KendoInput, { static: false }),
|
|
253
288
|
tslib_1.__metadata("design:type", Object)
|
|
@@ -267,7 +302,7 @@ var FloatingLabelComponent = /** @class */ (function () {
|
|
|
267
302
|
useValue: 'kendo.floatinglabel'
|
|
268
303
|
}
|
|
269
304
|
],
|
|
270
|
-
template: "\n <ng-container kendoFloatingLabelLocalizedMessages\n i18n-optional=\"kendo.floatinglabel.optional|The text for the optional segment of a FloatingLabel component\"\n optional=\"Optional\"\n >\n </ng-container>\n <ng-content></ng-content>\n <label *ngIf=\"text\" [for]=\"id\" [attr.id]=\"labelId\" class=\"k-label\">\n {{ text }}<span *ngIf=\"optional\" class=\"k-label-optional\">({{textFor('optional')}})</span>\n </label>\n "
|
|
305
|
+
template: "\n <ng-container kendoFloatingLabelLocalizedMessages\n i18n-optional=\"kendo.floatinglabel.optional|The text for the optional segment of a FloatingLabel component\"\n optional=\"Optional\"\n >\n </ng-container>\n <ng-content></ng-content>\n <label *ngIf=\"text\" [ngClass]=\"labelCssClass\" [ngStyle]=\"labelCssStyle\" [for]=\"id\" [attr.id]=\"labelId\" class=\"k-label\">\n {{ text }}<span *ngIf=\"optional\" class=\"k-label-optional\">({{textFor('optional')}})</span>\n </label>\n "
|
|
271
306
|
}),
|
|
272
307
|
tslib_1.__metadata("design:paramtypes", [core_1.ElementRef,
|
|
273
308
|
core_1.Renderer2,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright ©
|
|
2
|
+
* Copyright © 2021 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
5
|
"use strict";
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**-----------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
|
+
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
+
*-------------------------------------------------------------------------------------------*/
|
|
5
|
+
"use strict";
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
package/dist/npm/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright ©
|
|
2
|
+
* Copyright © 2021 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
5
|
"use strict";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright ©
|
|
2
|
+
* Copyright © 2021 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
5
|
"use strict";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright ©
|
|
2
|
+
* Copyright © 2021 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
5
|
"use strict";
|
|
@@ -30,7 +30,7 @@ var kendo_angular_common_1 = require("@progress/kendo-angular-common");
|
|
|
30
30
|
* </div>
|
|
31
31
|
*
|
|
32
32
|
* <div class="col-xs-12 col-md-6 example-col">
|
|
33
|
-
* <label
|
|
33
|
+
* <label for="input">Input: </label>
|
|
34
34
|
* <input id="input" />
|
|
35
35
|
* </div>
|
|
36
36
|
* </div>
|
package/dist/npm/label.module.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright ©
|
|
2
|
+
* Copyright © 2021 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
5
|
"use strict";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright ©
|
|
2
|
+
* Copyright © 2021 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
5
|
"use strict";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright ©
|
|
2
|
+
* Copyright © 2021 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
5
|
"use strict";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright ©
|
|
2
|
+
* Copyright © 2021 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
5
|
"use strict";
|
package/dist/npm/main.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright ©
|
|
2
|
+
* Copyright © 2021 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
5
|
"use strict";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright ©
|
|
2
|
+
* Copyright © 2021 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
5
|
"use strict";
|
|
@@ -11,7 +11,7 @@ exports.packageMetadata = {
|
|
|
11
11
|
name: '@progress/kendo-angular-label',
|
|
12
12
|
productName: 'Kendo UI for Angular',
|
|
13
13
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
14
|
-
publishDate:
|
|
14
|
+
publishDate: 1635940028,
|
|
15
15
|
version: '',
|
|
16
16
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning'
|
|
17
17
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright ©
|
|
2
|
+
* Copyright © 2021 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
5
|
"use strict";
|
package/dist/npm/util.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright ©
|
|
2
|
+
* Copyright © 2021 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
5
|
"use strict";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright ©
|
|
2
|
+
* Copyright © 2021 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
|
-
System.register("@progress/kendo-angular-label",["@angular/common","tslib","@angular/core","@progress/kendo-angular-common","rxjs","@angular/forms","@progress/kendo-licensing","rxjs/operators"],function(r){var a,s,l,c,u,d,p,f;function t(e){return e.__useDefault?e.default:e}return{setters:[function(e){a=t(e)},function(e){s=t(e)},function(e){l=t(e)},function(e){c=t(e)},function(e){u=t(e)},function(e){d=t(e)},function(e){p=t(e)},function(e){f=t(e)}],execute:function(){function o(e){if(i[e])return i[e].exports;var t=i[e]={i:e,l:!1,exports:{}};return n[e].call(t.exports,t,t.exports,o),t.l=!0,t.exports}var n,i;i={},o.m=n=[function(e,t){e.exports=l},function(e,t){e.exports=s},function(e,t,n){"use strict";n.r(t),n.d(t,"MessageService",function(){return a}),n.d(t,"ComponentMessages",function(){return s}),n.d(t,"L10N_PREFIX",function(){return c}),n.d(t,"LocalizationService",function(){return u}),n.d(t,"RTL",function(){return l});var o=n(1),t=n(0),i=n(3),r=n(6),a=(f.prototype.notify=function(e){this.changes.next({rtl:e})},f.prototype.get=function(e){},Object(o.__decorate)([Object(t.Injectable)()],f)),s=(Object.defineProperty(p.prototype,"override",{get:function(){return!1},enumerable:!0,configurable:!0}),p.prototype.ngOnChanges=function(t){this.register(t),Object.keys(t).some(function(e){return!t[e].isFirstChange()})&&this.service.notifyChanges()},p.prototype.ngOnInit=function(){var e=this;this.subscription=this.service.changes.pipe(Object(r.skip)(1)).subscribe(function(){return e.register(e)})},p.prototype.register=function(e){var t=this;Object.keys(e).forEach(function(e){return t.service.register(e,t[e],t.override)})},p.prototype.ngOnDestroy=function(){this.subscription&&this.subscription.unsubscribe()},p),l=new t.InjectionToken("Kendo UI Right-to-Left token"),c=new t.InjectionToken("Localization key prefix"),u=(Object.defineProperty(d.prototype,"rtl",{get:function(){return this._rtl},enumerable:!0,configurable:!0}),d.prototype.ngOnDestroy=function(){this.subscription&&this.subscription.unsubscribe()},d.prototype.get=function(e){e=this.key(e);return this.dictionary[e]},d.prototype.register=function(e,t,n){void 0===n&&(n=!1);var o=this.key(e),e=t;if(!n){if(this.dictionary.hasOwnProperty(o))return;e=this.defaultValue(o,t)}this.dictionary[o]=e},d.prototype.notifyChanges=function(){this.changes.next({rtl:this.rtl})},d.prototype.key=function(e){return this.prefix+"."+e},d.prototype.defaultValue=function(e,t){if(!this.messageService)return t;e=this.messageService.get(e);return void 0===e?t:e},Object(o.__decorate)([Object(t.Injectable)(),Object(o.__param)(0,Object(t.Inject)(c)),Object(o.__param)(1,Object(t.Optional)()),Object(o.__param)(2,Object(t.Optional)()),Object(o.__param)(2,Object(t.Inject)(l)),Object(o.__metadata)("design:paramtypes",[String,a,Boolean])],d));function d(e,t,n){var o=this;this.prefix=e,this.messageService=t,this._rtl=n,this.changes=new i.BehaviorSubject({rtl:this._rtl}),this.dictionary={},t&&(this.subscription=t.changes.pipe(Object(r.map)(function(e){e=e.rtl;return void 0!==e?e:o._rtl}),Object(r.tap)(function(e){return o._rtl=e})).subscribe(function(e){o.dictionary={},o.changes.next({rtl:e})}))}function p(){}function f(){this.changes=new i.Subject}},function(e,t){e.exports=u},function(e,t){e.exports=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),i=n(16),r=n(0),a=n(4),r=(Object.defineProperty(s.prototype,"labelFor",{get:function(){if("string"==typeof this.for)return this.for;if(!a.isDocumentAvailable())return null;var e=this.getFocusableComponent()||{};return i.isInputElement(e)&&!i.inputElementHasAttr(e,"id")&&this.renderer.setAttribute(e,"id","k-"+a.guid()),e.focusableId||e.id||null},enumerable:!0,configurable:!0}),s.prototype.ngAfterViewInit=function(){var e=this;this.setAriaLabelledby(),this.zone.runOutsideAngular(function(){return e.clickListener=e.renderer.listen(e.label.nativeElement,"click",e.handleClick)})},s.prototype.ngOnDestroy=function(){this.clickListener&&this.clickListener()},s.prototype.setAriaLabelledby=function(){var e,t,n;!a.isDocumentAvailable()||(n=this.getFocusableComponent())&&n.focusableId&&((e=i.getRootElement(this.label.nativeElement).querySelector("#"+n.focusableId))&&(n=(t=this.label.nativeElement).id||"k-"+a.guid(),t.getAttribute("id")||this.renderer.setAttribute(t,"id",n),this.renderer.setAttribute(e,"aria-labelledby",n)))},s.prototype.getFocusableComponent=function(){var e=this.for;return e&&void 0!==e.focus?e:null},o.__decorate([r.Input(),o.__metadata("design:type",Object)],s.prototype,"for",void 0),o.__decorate([r.HostBinding("attr.for"),o.__metadata("design:type",String),o.__metadata("design:paramtypes",[])],s.prototype,"labelFor",null),o.__decorate([r.HostBinding("class.k-label"),o.__metadata("design:type",Boolean)],s.prototype,"labelClass",void 0),o.__decorate([r.Directive({selector:"label[for]"}),o.__metadata("design:paramtypes",[r.ElementRef,r.Renderer2,r.NgZone])],s));function s(e,t,n){var o=this;this.label=e,this.renderer=t,this.zone=n,this.labelClass=!0,this.handleClick=function(){var e=o.getFocusableComponent();e&&(i.isUploadComponent(e)&&e.fileSelect.nativeElement.click(),e.focus&&e.focus())}}t.LabelDirective=r},function(e,t){e.exports=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),i=n(0),r=n(3),a=n(2),s=n(4),l=n(9),c=n(8),u=n(5),d=n(16),a=(p.prototype.ngAfterContentInit=function(){if(this.for)this.control=this.for;else{var e=d.getWrappedNativeInput(this.elementRef.nativeElement);if(e)return e.hasAttribute("id")||this.renderer.setAttribute(e,"id","k-"+s.guid()),void(this.control=e);this.control=this.kendoInput}},p.prototype.ngOnInit=function(){var t=this;this.subscriptions.add(this.localization.changes.subscribe(function(e){e=e.rtl;t.direction=e?"rtl":"ltr"}))},p.prototype.ngAfterViewInit=function(){this.labelDirective.setAriaLabelledby()},p.prototype.ngOnDestroy=function(){this.subscriptions&&this.subscriptions.unsubscribe()},p.prototype.textFor=function(e){return this.localization.get(e)},o.__decorate([i.HostBinding("attr.dir"),o.__metadata("design:type",String)],p.prototype,"direction",void 0),o.__decorate([i.Input(),o.__metadata("design:type",String)],p.prototype,"text",void 0),o.__decorate([i.Input(),o.__metadata("design:type",Object)],p.prototype,"for",void 0),o.__decorate([i.Input(),o.__metadata("design:type",Boolean)],p.prototype,"optional",void 0),o.__decorate([i.ViewChild(u.LabelDirective,{static:!0}),o.__metadata("design:type",u.LabelDirective)],p.prototype,"labelDirective",void 0),o.__decorate([i.ContentChild(s.KendoInput,{static:!0}),o.__metadata("design:type",Object)],p.prototype,"kendoInput",void 0),o.__decorate([i.Component({selector:"kendo-label",exportAs:"kendoLabel",providers:[a.LocalizationService,{provide:a.L10N_PREFIX,useValue:"kendo.label"}],template:'\n <ng-container kendoLabelLocalizedMessages\n i18n-optional="kendo.label.optional|The text for the optional segment of a Label component"\n optional="Optional"\n >\n </ng-container>\n <label\n [for]="control"\n [class.k-label-empty]="!text">\n {{ text }}<span *ngIf="optional" class="k-label-optional">({{textFor(\'optional\')}})</span>\n </label>\n <ng-content></ng-content>\n '}),o.__metadata("design:paramtypes",[i.ElementRef,i.Renderer2,a.LocalizationService])],p));function p(e,t,n){this.elementRef=e,this.renderer=t,this.localization=n,this.subscriptions=new r.Subscription,l.validatePackage(c.packageMetadata),this.direction=n.rtl?"rtl":"ltr",this.renderer.removeAttribute(this.elementRef.nativeElement,"id")}t.LabelComponent=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.packageMetadata={name:"@progress/kendo-angular-label",productName:"Kendo UI for Angular",productCodes:["KENDOUIANGULAR","KENDOUICOMPLETE"],publishDate:1620214538,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning"}},function(e,t){e.exports=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});function o(e){return"[object Function]"===Object.prototype.toString.call(e)}var i=n(1),r=n(0),a=n(2),s=n(18),l=n(4),c=n(9),u=n(8),d=n(17),a=(Object.defineProperty(p.prototype,"focusedClass",{get:function(){return this.focused},enumerable:!0,configurable:!0}),Object.defineProperty(p.prototype,"invalidClass",{get:function(){return this.invalid},enumerable:!0,configurable:!0}),p.prototype.ngAfterContentInit=function(){this.validateSetup();var e=new d.FloatingLabelInputAdapter(this.kendoInput||this.formControl.valueAccessor,this.formControl);this.addHandlers(e),this.setLabelFor(e)},p.prototype.ngAfterViewInit=function(){this.kendoInput&&this.setAriaLabelledby(this.kendoInput)},p.prototype.ngOnDestroy=function(){this.subscription&&this.subscription.unsubscribe()},p.prototype.textFor=function(e){return this.localization.get(e)},p.prototype.subscribe=function(e,t,n){e[t]instanceof r.EventEmitter&&(n=e[t].subscribe(n),this.subscription?this.subscription.add(n):this.subscription=n)},p.prototype.updateState=function(){function e(e){return!(0===e||!1===e||(!Array.isArray(e)||e.length)&&e)}var t,n=this.formControl;n?(t=n.valueAccessor,o(t.isEmpty)?this.empty=t.isEmpty():this.empty=e(n.value),this.invalid=n.invalid&&(n.touched||n.dirty)):this.empty=o(this.kendoInput.isEmpty)?this.kendoInput.isEmpty():e(this.kendoInput.value),this.empty?this.renderer.addClass(this.elementRef.nativeElement,"k-state-empty"):this.renderer.removeClass(this.elementRef.nativeElement,"k-state-empty"),this.changeDetectorRef.markForCheck()},p.prototype.setAriaLabelledby=function(e){e=e.focusableId||e.id;e&&(e=this.elementRef.nativeElement.querySelector("#"+e),this.renderer.setAttribute(e,"aria-labelledby",this.labelId))},p.prototype.setLabelFor=function(e){var t=e.focusableId||e.id;this.id&&t?this.id=t:this.id?e.focusableId=this.id:t?this.id=t:(t="k-"+l.guid(),e.focusableId=t,this.id=t)},p.prototype.handleAutofill=function(e){var t=this;this.subscribe(e,"autoFillStart",function(){t.autoFillStarted=!0,t.renderer.removeClass(t.elementRef.nativeElement,"k-state-empty")}),this.subscribe(e,"autoFillEnd",function(){t.autoFillStarted&&(t.autoFillStarted=!1,t.empty&&t.renderer.addClass(t.elementRef.nativeElement,"k-state-empty"))})},p.prototype.addHandlers=function(e){var t=this,n=function(e){return function(){t.focused=e,t.updateState()}};this.subscribe(e,"onFocus",n(!0)),this.subscribe(e,"onBlur",n(!1)),this.handleAutofill(e);n=function(){return t.updateState()};n(),this.subscribe(e,"onValueChange",n)},p.prototype.validateSetup=function(){if(!this.formControl&&!this.kendoInput&&r.isDevMode())throw new Error("The FloatingLabelComponent requires a Kendo Input component or a forms-bound component to function properly.")},i.__decorate([r.HostBinding("class.k-floating-label-container"),i.__metadata("design:type",Boolean)],p.prototype,"hostClasses",void 0),i.__decorate([r.HostBinding("class.k-state-focused"),i.__metadata("design:type",Boolean),i.__metadata("design:paramtypes",[])],p.prototype,"focusedClass",null),i.__decorate([r.HostBinding("class.k-state-invalid"),i.__metadata("design:type",Boolean),i.__metadata("design:paramtypes",[])],p.prototype,"invalidClass",null),i.__decorate([r.HostBinding("attr.dir"),i.__metadata("design:type",String)],p.prototype,"direction",void 0),i.__decorate([r.Input(),i.__metadata("design:type",String)],p.prototype,"id",void 0),i.__decorate([r.Input(),i.__metadata("design:type",String)],p.prototype,"text",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Boolean)],p.prototype,"optional",void 0),i.__decorate([r.ContentChild(l.KendoInput,{static:!1}),i.__metadata("design:type",Object)],p.prototype,"kendoInput",void 0),i.__decorate([r.ContentChild(s.NgControl,{static:!1}),i.__metadata("design:type",s.NgControl)],p.prototype,"formControl",void 0),i.__decorate([r.Component({selector:"kendo-floatinglabel",exportAs:"kendoFloatingLabel",providers:[a.LocalizationService,{provide:a.L10N_PREFIX,useValue:"kendo.floatinglabel"}],template:'\n <ng-container kendoFloatingLabelLocalizedMessages\n i18n-optional="kendo.floatinglabel.optional|The text for the optional segment of a FloatingLabel component"\n optional="Optional"\n >\n </ng-container>\n <ng-content></ng-content>\n <label *ngIf="text" [for]="id" [attr.id]="labelId" class="k-label">\n {{ text }}<span *ngIf="optional" class="k-label-optional">({{textFor(\'optional\')}})</span>\n </label>\n '}),i.__metadata("design:paramtypes",[r.ElementRef,r.Renderer2,r.ChangeDetectorRef,a.LocalizationService])],p));function p(e,t,n,o){this.elementRef=e,this.renderer=t,this.changeDetectorRef=n,this.localization=o,this.hostClasses=!0,this.focused=!1,this.empty=!0,this.invalid=!1,this.labelId="k-"+l.guid(),this.autoFillStarted=!1,c.validatePackage(u.packageMetadata),this.direction=o.rtl?"rtl":"ltr",this.renderer.removeAttribute(this.elementRef.nativeElement,"id")}t.FloatingLabelComponent=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),i=n(0),r=n(12),a=n(15),n=[n(10).FloatingLabelComponent],a=o.__decorate([i.NgModule({declarations:n.slice(),exports:n.concat([a.SharedDirectivesModule]),imports:[r.CommonModule,a.SharedDirectivesModule]})],function(){});t.FloatingLabelModule=a},function(e,t){e.exports=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,i,r=n(1),a=n(0),s=n(2),n=n(14),s=(o=n.Messages,r.__extends(l,o),i=l,Object.defineProperty(l.prototype,"override",{get:function(){return!0},enumerable:!0,configurable:!0}),i=r.__decorate([a.Component({providers:[{provide:n.Messages,useExisting:a.forwardRef(function(){return i})}],selector:"kendo-label-messages, kendo-floatinglabel-messages",template:""}),r.__metadata("design:paramtypes",[s.LocalizationService])],l));function l(e){var t=o.call(this)||this;return t.service=e,t}t.CustomMessagesComponent=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,i=n(1),r=n(0),i=(o=n(2).ComponentMessages,i.__extends(a,o),i.__decorate([r.Input(),i.__metadata("design:type",String)],a.prototype,"optional",void 0),a);function a(){return null!==o&&o.apply(this,arguments)||this}t.Messages=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),i=n(0),r=n(19),n=n(13),n=[r.LocalizedMessagesDirective,n.CustomMessagesComponent],n=o.__decorate([i.NgModule({declarations:[n],exports:[n]})],function(){});t.SharedDirectivesModule=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isUploadComponent=function(e){return e.wrapper&&("KENDO-UPLOAD"===e.wrapper.tagName||"KENDO-FILESELECT"===e.wrapper.tagName)},t.isInputElement=function(e){return e instanceof HTMLElement},t.inputElementHasAttr=function(e,t){return e.hasAttribute(t)},t.getWrappedNativeInput=function(e){return e.querySelector("kendo-label > input, kendo-label > textarea, kendo-label > select")},t.getRootElement=function(e){if(!e)return null;for(var t=e;t.parentElement;)t=t.parentElement;return t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(3),i=n(0),n=(Object.defineProperty(r.prototype,"focusableId",{get:function(){var e=this.component;return"focusableId"in e?e.focusableId:"id"in e?e.id:""},set:function(e){var t=this.component;"focusableId"in t?t.focusableId=e:"id"in t&&(t.id=e)},enumerable:!0,configurable:!0}),r);function r(e,t){function n(e){return e instanceof o.Observable||e instanceof i.EventEmitter}n((this.component=e).onFocus)&&(this.onFocus=e.onFocus),n(e.autoFillStart)&&(this.autoFillStart=e.autoFillStart),n(e.autoFillEnd)&&(this.autoFillEnd=e.autoFillEnd),n(e.onBlur)&&(this.onBlur=e.onBlur),t?this.onValueChange=t.valueChanges:e.onValueChange&&(this.onValueChange=e.onValueChange)}t.FloatingLabelInputAdapter=n},function(e,t){e.exports=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,i,r=n(1),a=n(0),s=n(2),n=n(14),s=(o=n.Messages,r.__extends(l,o),i=l,i=r.__decorate([a.Directive({providers:[{provide:n.Messages,useExisting:a.forwardRef(function(){return i})}],selector:"\n [kendoLabelLocalizedMessages],\n [kendoFloatingLabelLocalizedMessages]\n "}),r.__metadata("design:paramtypes",[s.LocalizationService])],l));function l(e){var t=o.call(this)||this;return t.service=e,t}t.LocalizedMessagesDirective=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),i=n(15),r=n(12),a=n(0),s=n(11),l=n(5),n=n(7),n=[l.LabelDirective,n.LabelComponent],i=o.__decorate([a.NgModule({imports:[r.CommonModule,i.SharedDirectivesModule],declarations:n.slice(),exports:n.concat([s.FloatingLabelModule,i.SharedDirectivesModule])})],function(){});t.LabelModule=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(5);t.LabelDirective=o.LabelDirective;o=n(20);t.LabelModule=o.LabelModule;o=n(11);t.FloatingLabelModule=o.FloatingLabelModule;o=n(10);t.FloatingLabelComponent=o.FloatingLabelComponent;o=n(7);t.LabelComponent=o.LabelComponent;n=n(13);t.CustomMessagesComponent=n.CustomMessagesComponent,function(e){for(var t in e)r(t,e[t])}(t)}],o.c=i,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},o.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=21)}}});
|
|
5
|
+
System.register("@progress/kendo-angular-label",["tslib","@angular/core","@progress/kendo-angular-common","@angular/common","rxjs","@progress/kendo-licensing","@angular/forms","rxjs/operators"],function(r){var a,s,l,c,u,d,p,f;function t(e){return e.__useDefault?e.default:e}return{setters:[function(e){a=t(e)},function(e){s=t(e)},function(e){l=t(e)},function(e){c=t(e)},function(e){u=t(e)},function(e){d=t(e)},function(e){p=t(e)},function(e){f=t(e)}],execute:function(){function o(e){if(i[e])return i[e].exports;var t=i[e]={i:e,l:!1,exports:{}};return n[e].call(t.exports,t,t.exports,o),t.l=!0,t.exports}var n,i;n=[function(e,t){e.exports=s},function(e,t){e.exports=a},function(e,t,n){"use strict";n.r(t),n.d(t,"MessageService",function(){return a}),n.d(t,"ComponentMessages",function(){return s}),n.d(t,"L10N_PREFIX",function(){return c}),n.d(t,"LocalizationService",function(){return u}),n.d(t,"RTL",function(){return l});var o=n(1),t=n(0),i=n(3),r=n(6),a=(f.prototype.notify=function(e){this.changes.next({rtl:e})},f.prototype.get=function(e){},Object(o.__decorate)([Object(t.Injectable)()],f)),s=(Object.defineProperty(p.prototype,"override",{get:function(){return!1},enumerable:!0,configurable:!0}),p.prototype.ngOnChanges=function(t){this.register(t),Object.keys(t).some(function(e){return!t[e].isFirstChange()})&&this.service.notifyChanges()},p.prototype.ngOnInit=function(){var e=this;this.subscription=this.service.changes.pipe(Object(r.skip)(1)).subscribe(function(){return e.register(e)})},p.prototype.register=function(e){var t=this;Object.keys(e).forEach(function(e){return t.service.register(e,t[e],t.override)})},p.prototype.ngOnDestroy=function(){this.subscription&&this.subscription.unsubscribe()},p),l=new t.InjectionToken("Kendo UI Right-to-Left token"),c=new t.InjectionToken("Localization key prefix"),u=(Object.defineProperty(d.prototype,"rtl",{get:function(){return this._rtl},enumerable:!0,configurable:!0}),d.prototype.ngOnDestroy=function(){this.subscription&&this.subscription.unsubscribe()},d.prototype.get=function(e){e=this.key(e);return this.dictionary[e]},d.prototype.register=function(e,t,n){void 0===n&&(n=!1);var o=this.key(e),e=t;if(!n){if(this.dictionary.hasOwnProperty(o))return;e=this.defaultValue(o,t)}this.dictionary[o]=e},d.prototype.notifyChanges=function(){this.changes.next({rtl:this.rtl})},d.prototype.key=function(e){return this.prefix+"."+e},d.prototype.defaultValue=function(e,t){if(!this.messageService)return t;e=this.messageService.get(e);return void 0===e?t:e},Object(o.__decorate)([Object(t.Injectable)(),Object(o.__param)(0,Object(t.Inject)(c)),Object(o.__param)(1,Object(t.Optional)()),Object(o.__param)(2,Object(t.Optional)()),Object(o.__param)(2,Object(t.Inject)(l)),Object(o.__metadata)("design:paramtypes",[String,a,Boolean])],d));function d(e,t,n){var o=this;this.prefix=e,this.messageService=t,this._rtl=n,this.changes=new i.BehaviorSubject({rtl:this._rtl}),this.dictionary={},t&&(this.subscription=t.changes.pipe(Object(r.map)(function(e){e=e.rtl;return void 0!==e?e:o._rtl}),Object(r.tap)(function(e){return o._rtl=e})).subscribe(function(e){o.dictionary={},o.changes.next({rtl:e})}))}function p(){}function f(){this.changes=new i.BehaviorSubject({rtl:void 0})}},function(e,t){e.exports=u},function(e,t){e.exports=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),i=n(16),r=n(0),a=n(4),r=(Object.defineProperty(s.prototype,"labelFor",{get:function(){if("string"==typeof this.for)return this.for;if(!a.isDocumentAvailable())return null;var e=this.getFocusableComponent()||{};return i.isInputElement(e)&&!i.inputElementHasAttr(e,"id")&&this.renderer.setAttribute(e,"id","k-"+a.guid()),e.focusableId||e.id||null},enumerable:!0,configurable:!0}),s.prototype.ngAfterViewInit=function(){var e=this;this.setAriaLabelledby(),this.zone.runOutsideAngular(function(){return e.clickListener=e.renderer.listen(e.label.nativeElement,"click",e.handleClick)})},s.prototype.ngOnDestroy=function(){this.clickListener&&this.clickListener()},s.prototype.setAriaLabelledby=function(){var e,t,n;!a.isDocumentAvailable()||(n=this.getFocusableComponent())&&n.focusableId&&((e=i.getRootElement(this.label.nativeElement).querySelector("#"+n.focusableId))&&(n=(t=this.label.nativeElement).id||"k-"+a.guid(),t.getAttribute("id")||this.renderer.setAttribute(t,"id",n),this.renderer.setAttribute(e,"aria-labelledby",n)))},s.prototype.getFocusableComponent=function(){var e=this.for;return e&&void 0!==e.focus?e:null},o.__decorate([r.Input(),o.__metadata("design:type",Object)],s.prototype,"for",void 0),o.__decorate([r.HostBinding("attr.for"),o.__metadata("design:type",String),o.__metadata("design:paramtypes",[])],s.prototype,"labelFor",null),o.__decorate([r.HostBinding("class.k-label"),o.__metadata("design:type",Boolean)],s.prototype,"labelClass",void 0),o.__decorate([r.Directive({selector:"label[for]"}),o.__metadata("design:paramtypes",[r.ElementRef,r.Renderer2,r.NgZone])],s));function s(e,t,n){var o=this;this.label=e,this.renderer=t,this.zone=n,this.labelClass=!0,this.handleClick=function(){var e=o.getFocusableComponent();e&&(i.isUploadComponent(e)&&e.fileSelect.nativeElement.click(),e.focus&&e.focus())}}t.LabelDirective=r},function(e,t){e.exports=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),i=n(0),r=n(3),a=n(2),s=n(4),l=n(9),c=n(8),u=n(5),d=n(16),a=(p.prototype.ngAfterContentInit=function(){if(this.for)this.control=this.for;else{var e=d.getWrappedNativeInput(this.elementRef.nativeElement);if(e)return e.hasAttribute("id")||this.renderer.setAttribute(e,"id","k-"+s.guid()),void(this.control=e);this.control=this.kendoInput}},p.prototype.ngOnInit=function(){var t=this;this.subscriptions.add(this.localization.changes.subscribe(function(e){e=e.rtl;t.direction=e?"rtl":"ltr"}))},p.prototype.ngAfterViewInit=function(){this.labelDirective.setAriaLabelledby()},p.prototype.ngOnDestroy=function(){this.subscriptions&&this.subscriptions.unsubscribe()},p.prototype.textFor=function(e){return this.localization.get(e)},o.__decorate([i.HostBinding("attr.dir"),o.__metadata("design:type",String)],p.prototype,"direction",void 0),o.__decorate([i.Input(),o.__metadata("design:type",String)],p.prototype,"text",void 0),o.__decorate([i.Input(),o.__metadata("design:type",Object)],p.prototype,"for",void 0),o.__decorate([i.Input(),o.__metadata("design:type",Boolean)],p.prototype,"optional",void 0),o.__decorate([i.ViewChild(u.LabelDirective,{static:!0}),o.__metadata("design:type",u.LabelDirective)],p.prototype,"labelDirective",void 0),o.__decorate([i.ContentChild(s.KendoInput,{static:!0}),o.__metadata("design:type",Object)],p.prototype,"kendoInput",void 0),o.__decorate([i.Component({selector:"kendo-label",exportAs:"kendoLabel",providers:[a.LocalizationService,{provide:a.L10N_PREFIX,useValue:"kendo.label"}],template:'\n <ng-container kendoLabelLocalizedMessages\n i18n-optional="kendo.label.optional|The text for the optional segment of a Label component"\n optional="Optional"\n >\n </ng-container>\n <label\n [for]="control"\n [class.k-label-empty]="!text">\n {{ text }}<span *ngIf="optional" class="k-label-optional">({{textFor(\'optional\')}})</span>\n </label>\n <ng-content></ng-content>\n '}),o.__metadata("design:paramtypes",[i.ElementRef,i.Renderer2,a.LocalizationService])],p));function p(e,t,n){this.elementRef=e,this.renderer=t,this.localization=n,this.subscriptions=new r.Subscription,l.validatePackage(c.packageMetadata),this.direction=n.rtl?"rtl":"ltr",this.renderer.removeAttribute(this.elementRef.nativeElement,"id")}t.LabelComponent=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.packageMetadata={name:"@progress/kendo-angular-label",productName:"Kendo UI for Angular",productCodes:["KENDOUIANGULAR","KENDOUICOMPLETE"],publishDate:1635940028,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning"}},function(e,t){e.exports=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});function o(e){return"[object Function]"===Object.prototype.toString.call(e)}var i=n(1),r=n(0),a=n(2),s=n(18),l=n(4),c=n(9),u=n(8),d=n(17),a=(Object.defineProperty(p.prototype,"labelPosition",{get:function(){return!this.empty||this.focused?"Out":"In"},enumerable:!0,configurable:!0}),Object.defineProperty(p.prototype,"focusedClass",{get:function(){return this.focused},enumerable:!0,configurable:!0}),Object.defineProperty(p.prototype,"invalidClass",{get:function(){return this.invalid},enumerable:!0,configurable:!0}),p.prototype.ngAfterContentInit=function(){this.validateSetup();var e=new d.FloatingLabelInputAdapter(this.kendoInput||this.formControl.valueAccessor,this.formControl);this.addHandlers(e),this.setLabelFor(e)},p.prototype.ngAfterViewInit=function(){this.kendoInput&&this.setAriaLabelledby(this.kendoInput)},p.prototype.ngOnDestroy=function(){this.subscription&&this.subscription.unsubscribe()},p.prototype.textFor=function(e){return this.localization.get(e)},p.prototype.subscribe=function(e,t,n){e[t]instanceof r.EventEmitter&&(n=e[t].subscribe(n),this.subscription?this.subscription.add(n):this.subscription=n)},p.prototype.updateState=function(){function e(e){return!(0===e||!1===e||(!Array.isArray(e)||e.length)&&e)}var t,n=this.formControl;n?(t=n.valueAccessor,o(t.isEmpty)?this.empty=t.isEmpty():this.empty=e(n.value),this.invalid=n.invalid&&(n.touched||n.dirty)):this.empty=o(this.kendoInput.isEmpty)?this.kendoInput.isEmpty():e(this.kendoInput.value),this.empty?this.renderer.addClass(this.elementRef.nativeElement,"k-state-empty"):this.renderer.removeClass(this.elementRef.nativeElement,"k-state-empty"),this.changeDetectorRef.markForCheck()},p.prototype.setAriaLabelledby=function(e){e=e.focusableId||e.id;e&&(e=this.elementRef.nativeElement.querySelector("#"+e),this.renderer.setAttribute(e,"aria-labelledby",this.labelId))},p.prototype.setLabelFor=function(e){var t=e.focusableId||e.id;this.id&&t?this.id=t:this.id?e.focusableId=this.id:t?this.id=t:(t="k-"+l.guid(),e.focusableId=t,this.id=t)},p.prototype.handleAutofill=function(e){var t=this;this.subscribe(e,"autoFillStart",function(){t.autoFillStarted=!0,t.renderer.removeClass(t.elementRef.nativeElement,"k-state-empty")}),this.subscribe(e,"autoFillEnd",function(){t.autoFillStarted&&(t.autoFillStarted=!1,t.empty&&t.renderer.addClass(t.elementRef.nativeElement,"k-state-empty"))})},p.prototype.addHandlers=function(e){var t=this,n=function(e){return function(){t.focused=e,t.updateState(),t.empty&&l.hasObservers(t.positionChange)&&t.positionChange.emit(e?"Out":"In")}};this.subscribe(e,"onFocus",n(!0)),this.subscribe(e,"onBlur",n(!1)),this.handleAutofill(e);n=function(){return t.updateState()};n(),this.subscribe(e,"onValueChange",n)},p.prototype.validateSetup=function(){if(!this.formControl&&!this.kendoInput&&r.isDevMode())throw new Error("The FloatingLabelComponent requires a Kendo Input component or a forms-bound component to function properly.")},i.__decorate([r.HostBinding("class.k-floating-label-container"),i.__metadata("design:type",Boolean)],p.prototype,"hostClasses",void 0),i.__decorate([r.HostBinding("class.k-state-focused"),i.__metadata("design:type",Boolean),i.__metadata("design:paramtypes",[])],p.prototype,"focusedClass",null),i.__decorate([r.HostBinding("class.k-state-invalid"),i.__metadata("design:type",Boolean),i.__metadata("design:paramtypes",[])],p.prototype,"invalidClass",null),i.__decorate([r.HostBinding("attr.dir"),i.__metadata("design:type",String)],p.prototype,"direction",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Object)],p.prototype,"labelCssStyle",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Object)],p.prototype,"labelCssClass",void 0),i.__decorate([r.Input(),i.__metadata("design:type",String)],p.prototype,"id",void 0),i.__decorate([r.Input(),i.__metadata("design:type",String)],p.prototype,"text",void 0),i.__decorate([r.Input(),i.__metadata("design:type",Boolean)],p.prototype,"optional",void 0),i.__decorate([r.Output(),i.__metadata("design:type",r.EventEmitter)],p.prototype,"positionChange",void 0),i.__decorate([r.ContentChild(l.KendoInput,{static:!1}),i.__metadata("design:type",Object)],p.prototype,"kendoInput",void 0),i.__decorate([r.ContentChild(s.NgControl,{static:!1}),i.__metadata("design:type",s.NgControl)],p.prototype,"formControl",void 0),i.__decorate([r.Component({selector:"kendo-floatinglabel",exportAs:"kendoFloatingLabel",providers:[a.LocalizationService,{provide:a.L10N_PREFIX,useValue:"kendo.floatinglabel"}],template:'\n <ng-container kendoFloatingLabelLocalizedMessages\n i18n-optional="kendo.floatinglabel.optional|The text for the optional segment of a FloatingLabel component"\n optional="Optional"\n >\n </ng-container>\n <ng-content></ng-content>\n <label *ngIf="text" [ngClass]="labelCssClass" [ngStyle]="labelCssStyle" [for]="id" [attr.id]="labelId" class="k-label">\n {{ text }}<span *ngIf="optional" class="k-label-optional">({{textFor(\'optional\')}})</span>\n </label>\n '}),i.__metadata("design:paramtypes",[r.ElementRef,r.Renderer2,r.ChangeDetectorRef,a.LocalizationService])],p));function p(e,t,n,o){this.elementRef=e,this.renderer=t,this.changeDetectorRef=n,this.localization=o,this.hostClasses=!0,this.positionChange=new r.EventEmitter,this.focused=!1,this.empty=!0,this.invalid=!1,this.labelId="k-"+l.guid(),this.autoFillStarted=!1,c.validatePackage(u.packageMetadata),this.direction=o.rtl?"rtl":"ltr",this.renderer.removeAttribute(this.elementRef.nativeElement,"id")}t.FloatingLabelComponent=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),i=n(0),r=n(12),a=n(15),n=[n(10).FloatingLabelComponent],a=o.__decorate([i.NgModule({declarations:n.slice(),exports:n.concat([a.SharedDirectivesModule]),imports:[r.CommonModule,a.SharedDirectivesModule]})],s);function s(){}t.FloatingLabelModule=a},function(e,t){e.exports=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,i,r=n(1),a=n(0),s=n(2),n=n(14),s=(o=n.Messages,r.__extends(l,o),i=l,Object.defineProperty(l.prototype,"override",{get:function(){return!0},enumerable:!0,configurable:!0}),i=r.__decorate([a.Component({providers:[{provide:n.Messages,useExisting:a.forwardRef(function(){return i})}],selector:"kendo-label-messages, kendo-floatinglabel-messages",template:""}),r.__metadata("design:paramtypes",[s.LocalizationService])],l));function l(e){var t=o.call(this)||this;return t.service=e,t}t.CustomMessagesComponent=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,i=n(1),r=n(0),i=(o=n(2).ComponentMessages,i.__extends(a,o),i.__decorate([r.Input(),i.__metadata("design:type",String)],a.prototype,"optional",void 0),a);function a(){return null!==o&&o.apply(this,arguments)||this}t.Messages=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),i=n(0),r=n(19),n=n(13),n=[r.LocalizedMessagesDirective,n.CustomMessagesComponent],n=o.__decorate([i.NgModule({declarations:[n],exports:[n]})],a);function a(){}t.SharedDirectivesModule=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isUploadComponent=function(e){return e.wrapper&&("KENDO-UPLOAD"===e.wrapper.tagName||"KENDO-FILESELECT"===e.wrapper.tagName)},t.isInputElement=function(e){return e instanceof HTMLElement},t.inputElementHasAttr=function(e,t){return e.hasAttribute(t)},t.getWrappedNativeInput=function(e){return e.querySelector("kendo-label > input, kendo-label > textarea, kendo-label > select")},t.getRootElement=function(e){if(!e)return null;for(var t=e;t.parentElement;)t=t.parentElement;return t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(3),i=n(0),n=(Object.defineProperty(r.prototype,"focusableId",{get:function(){var e=this.component;return"focusableId"in e?e.focusableId:"id"in e?e.id:""},set:function(e){var t=this.component;"focusableId"in t?t.focusableId=e:"id"in t&&(t.id=e)},enumerable:!0,configurable:!0}),r);function r(e,t){function n(e){return e instanceof o.Observable||e instanceof i.EventEmitter}n((this.component=e).onFocus)&&(this.onFocus=e.onFocus),n(e.autoFillStart)&&(this.autoFillStart=e.autoFillStart),n(e.autoFillEnd)&&(this.autoFillEnd=e.autoFillEnd),n(e.onBlur)&&(this.onBlur=e.onBlur),t?this.onValueChange=t.valueChanges:e.onValueChange&&(this.onValueChange=e.onValueChange)}t.FloatingLabelInputAdapter=n},function(e,t){e.exports=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,i,r=n(1),a=n(0),s=n(2),n=n(14),s=(o=n.Messages,r.__extends(l,o),i=l,i=r.__decorate([a.Directive({providers:[{provide:n.Messages,useExisting:a.forwardRef(function(){return i})}],selector:"\n [kendoLabelLocalizedMessages],\n [kendoFloatingLabelLocalizedMessages]\n "}),r.__metadata("design:paramtypes",[s.LocalizationService])],l));function l(e){var t=o.call(this)||this;return t.service=e,t}t.LocalizedMessagesDirective=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),i=n(15),r=n(12),a=n(0),s=n(11),l=n(5),n=n(7),n=[l.LabelDirective,n.LabelComponent],i=o.__decorate([a.NgModule({imports:[r.CommonModule,i.SharedDirectivesModule],declarations:n.slice(),exports:n.concat([s.FloatingLabelModule,i.SharedDirectivesModule])})],c);function c(){}t.LabelModule=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(5);t.LabelDirective=o.LabelDirective;o=n(20);t.LabelModule=o.LabelModule;o=n(11);t.FloatingLabelModule=o.FloatingLabelModule;o=n(10);t.FloatingLabelComponent=o.FloatingLabelComponent;o=n(7);t.LabelComponent=o.LabelComponent;n=n(13);t.CustomMessagesComponent=n.CustomMessagesComponent,function(e){for(var t in e)r(t,e[t])}(t)}],i={},o.m=n,o.c=i,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},o.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=21)}}});
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "Kendo UI Label for Angular",
|
|
4
4
|
"author": "Progress",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
|
-
"version": "3.
|
|
6
|
+
"version": "3.1.1",
|
|
7
7
|
"main": "dist/npm/index.js",
|
|
8
8
|
"module": "dist/fesm5/index.js",
|
|
9
9
|
"es2015": "dist/fesm2015/index.js",
|
|
@@ -32,12 +32,12 @@
|
|
|
32
32
|
"Angular"
|
|
33
33
|
],
|
|
34
34
|
"peerDependencies": {
|
|
35
|
-
"@angular/common": "8 -
|
|
36
|
-
"@angular/core": "8 -
|
|
37
|
-
"@angular/forms": "8 -
|
|
35
|
+
"@angular/common": "8 - 13",
|
|
36
|
+
"@angular/core": "8 - 13",
|
|
37
|
+
"@angular/forms": "8 - 13",
|
|
38
38
|
"@progress/kendo-angular-common": "^2.0.0",
|
|
39
39
|
"@progress/kendo-licensing": "^1.0.2",
|
|
40
|
-
"rxjs": "^6.4.0"
|
|
40
|
+
"rxjs": "^6.4.0 || ^7.0.0"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
43
|
"@progress/kendo-schematics": "^1.0.0",
|