@progress/kendo-angular-label 3.1.2 → 4.0.0-next.202202221305
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/bundles/kendo-angular-label.umd.js +5 -0
- package/{dist/es2015 → esm2015}/floating-label/floating-label-input-adapter.js +0 -0
- package/{dist/es2015 → esm2015}/floating-label/floating-label.component.js +70 -75
- package/{dist/es2015 → esm2015}/floating-label/floating-label.module.js +14 -11
- package/{dist/es → esm2015}/floating-label/models/label-position.js +1 -0
- package/{dist/es2015/shared.module.d.ts → esm2015/kendo-angular-label.js} +2 -3
- package/esm2015/label/label.component.js +158 -0
- package/{dist/es2015 → esm2015}/label.directive.js +20 -24
- package/{dist/es2015 → esm2015}/label.module.js +16 -11
- package/esm2015/localization/custom-messages.component.js +41 -0
- package/esm2015/localization/localized-messages.directive.js +39 -0
- package/esm2015/localization/messages.js +22 -0
- package/{dist/es → esm2015}/main.js +2 -0
- package/{dist/es2015 → esm2015}/package-metadata.js +1 -1
- package/esm2015/shared.module.js +29 -0
- package/{dist/es2015 → esm2015}/util.js +0 -0
- package/{dist/fesm2015/index.js → fesm2015/kendo-angular-label.js} +239 -201
- package/{dist/es2015/floating-label → floating-label}/floating-label-input-adapter.d.ts +2 -1
- package/{dist/es2015/floating-label → floating-label}/floating-label.component.d.ts +6 -3
- package/{dist/es2015/floating-label → floating-label}/floating-label.module.d.ts +7 -0
- package/{dist/es2015/floating-label → floating-label}/models/label-position.d.ts +0 -0
- package/{dist/es2015/floating-label/models/label-position.js → kendo-angular-label.d.ts} +5 -0
- package/{dist/es2015/label → label}/label.component.d.ts +3 -0
- package/{dist/es2015/label.directive.d.ts → label.directive.d.ts} +4 -1
- package/{dist/es2015/label.module.d.ts → label.module.d.ts} +9 -0
- package/{dist/es2015/localization → localization}/custom-messages.component.d.ts +4 -1
- package/{dist/es2015/localization → localization}/localized-messages.directive.d.ts +3 -0
- package/{dist/es2015/localization → localization}/messages.d.ts +3 -0
- package/{dist/es2015/main.d.ts → main.d.ts} +2 -0
- package/{dist/es2015/package-metadata.d.ts → package-metadata.d.ts} +0 -0
- package/package.json +32 -101
- package/schematics/ngAdd/index.js +5 -2
- package/schematics/ngAdd/index.js.map +1 -1
- package/shared.module.d.ts +15 -0
- package/{dist/es2015/util.d.ts → util.d.ts} +0 -0
- package/dist/cdn/js/kendo-angular-label.js +0 -20
- package/dist/cdn/main.js +0 -5
- package/dist/es/floating-label/floating-label-input-adapter.js +0 -58
- package/dist/es/floating-label/floating-label.component.js +0 -312
- package/dist/es/floating-label/floating-label.module.js +0 -52
- package/dist/es/index.js +0 -11
- package/dist/es/label/label.component.js +0 -137
- package/dist/es/label.directive.js +0 -140
- package/dist/es/label.module.js +0 -63
- package/dist/es/localization/custom-messages.component.js +0 -44
- package/dist/es/localization/localized-messages.directive.js +0 -35
- package/dist/es/localization/messages.js +0 -22
- package/dist/es/package-metadata.js +0 -15
- package/dist/es/shared.module.js +0 -27
- package/dist/es/util.js +0 -33
- package/dist/es2015/index.d.ts +0 -11
- package/dist/es2015/index.js +0 -11
- package/dist/es2015/index.metadata.json +0 -1
- package/dist/es2015/label/label.component.js +0 -146
- package/dist/es2015/localization/custom-messages.component.js +0 -36
- package/dist/es2015/localization/localized-messages.directive.js +0 -34
- package/dist/es2015/localization/messages.js +0 -16
- package/dist/es2015/main.js +0 -10
- package/dist/es2015/shared.module.js +0 -24
- package/dist/fesm5/index.js +0 -858
- package/dist/npm/floating-label/floating-label-input-adapter.js +0 -60
- package/dist/npm/floating-label/floating-label.component.js +0 -314
- package/dist/npm/floating-label/floating-label.module.js +0 -54
- package/dist/npm/floating-label/models/label-position.js +0 -6
- package/dist/npm/index.js +0 -17
- package/dist/npm/label/label.component.js +0 -139
- package/dist/npm/label.directive.js +0 -142
- package/dist/npm/label.module.js +0 -65
- package/dist/npm/localization/custom-messages.component.js +0 -46
- package/dist/npm/localization/localized-messages.directive.js +0 -37
- package/dist/npm/localization/messages.js +0 -24
- package/dist/npm/main.js +0 -18
- package/dist/npm/package-metadata.js +0 -17
- package/dist/npm/shared.module.js +0 -29
- package/dist/npm/util.js +0 -35
- package/dist/systemjs/kendo-angular-label.js +0 -5
|
@@ -2,10 +2,12 @@
|
|
|
2
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
|
-
import
|
|
6
|
-
import {
|
|
5
|
+
import * as i0 from '@angular/core';
|
|
6
|
+
import { Directive, Input, HostBinding, forwardRef, Component, NgModule, EventEmitter, isDevMode, Output, ContentChild, ViewChild } from '@angular/core';
|
|
7
7
|
import { isDocumentAvailable, guid, hasObservers, KendoInput } from '@progress/kendo-angular-common';
|
|
8
|
+
import * as i1 from '@progress/kendo-angular-l10n';
|
|
8
9
|
import { ComponentMessages, LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n';
|
|
10
|
+
import * as i3 from '@angular/common';
|
|
9
11
|
import { CommonModule } from '@angular/common';
|
|
10
12
|
import { NgControl } from '@angular/forms';
|
|
11
13
|
import { validatePackage } from '@progress/kendo-licensing';
|
|
@@ -72,7 +74,7 @@ const getRootElement = (element) => {
|
|
|
72
74
|
* class AppComponent { }
|
|
73
75
|
* ```
|
|
74
76
|
*/
|
|
75
|
-
|
|
77
|
+
class LabelDirective {
|
|
76
78
|
constructor(label, renderer, zone) {
|
|
77
79
|
this.label = label;
|
|
78
80
|
this.renderer = renderer;
|
|
@@ -145,69 +147,77 @@ let LabelDirective = class LabelDirective {
|
|
|
145
147
|
const target = this.for;
|
|
146
148
|
return target && target.focus !== undefined ? target : null;
|
|
147
149
|
}
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
],
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
}),
|
|
166
|
-
__metadata("design:paramtypes", [ElementRef, Renderer2, NgZone])
|
|
167
|
-
], LabelDirective);
|
|
150
|
+
}
|
|
151
|
+
LabelDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: LabelDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Directive });
|
|
152
|
+
LabelDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: LabelDirective, selector: "label[for]", inputs: { for: "for" }, host: { properties: { "attr.for": "this.labelFor", "class.k-label": "this.labelClass" } }, ngImport: i0 });
|
|
153
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: LabelDirective, decorators: [{
|
|
154
|
+
type: Directive,
|
|
155
|
+
args: [{
|
|
156
|
+
selector: 'label[for]' //eslint-disable-line directive-selector
|
|
157
|
+
}]
|
|
158
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.NgZone }]; }, propDecorators: { for: [{
|
|
159
|
+
type: Input
|
|
160
|
+
}], labelFor: [{
|
|
161
|
+
type: HostBinding,
|
|
162
|
+
args: ['attr.for']
|
|
163
|
+
}], labelClass: [{
|
|
164
|
+
type: HostBinding,
|
|
165
|
+
args: ['class.k-label']
|
|
166
|
+
}] } });
|
|
168
167
|
|
|
169
168
|
/**
|
|
170
169
|
* @hidden
|
|
171
170
|
*/
|
|
172
171
|
class Messages extends ComponentMessages {
|
|
173
172
|
}
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
173
|
+
Messages.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: Messages, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
174
|
+
Messages.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: Messages, selector: "kendo-label-messages-base", inputs: { optional: "optional" }, usesInheritance: true, ngImport: i0 });
|
|
175
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: Messages, decorators: [{
|
|
176
|
+
type: Directive,
|
|
177
|
+
args: [{
|
|
178
|
+
selector: 'kendo-label-messages-base'
|
|
179
|
+
}]
|
|
180
|
+
}], propDecorators: { optional: [{
|
|
181
|
+
type: Input
|
|
182
|
+
}] } });
|
|
178
183
|
|
|
179
|
-
var LocalizedMessagesDirective_1;
|
|
180
184
|
/**
|
|
181
185
|
* @hidden
|
|
182
186
|
*/
|
|
183
|
-
|
|
187
|
+
class LocalizedMessagesDirective extends Messages {
|
|
184
188
|
constructor(service) {
|
|
185
189
|
super();
|
|
186
190
|
this.service = service;
|
|
187
191
|
}
|
|
188
|
-
}
|
|
189
|
-
LocalizedMessagesDirective =
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
192
|
+
}
|
|
193
|
+
LocalizedMessagesDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: LocalizedMessagesDirective, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
194
|
+
LocalizedMessagesDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: LocalizedMessagesDirective, selector: "\n [kendoLabelLocalizedMessages],\n [kendoFloatingLabelLocalizedMessages]\n ", providers: [
|
|
195
|
+
{
|
|
196
|
+
provide: Messages,
|
|
197
|
+
useExisting: forwardRef(() => LocalizedMessagesDirective)
|
|
198
|
+
}
|
|
199
|
+
], usesInheritance: true, ngImport: i0 });
|
|
200
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: LocalizedMessagesDirective, decorators: [{
|
|
201
|
+
type: Directive,
|
|
202
|
+
args: [{
|
|
203
|
+
providers: [
|
|
204
|
+
{
|
|
205
|
+
provide: Messages,
|
|
206
|
+
useExisting: forwardRef(() => LocalizedMessagesDirective)
|
|
207
|
+
}
|
|
208
|
+
],
|
|
209
|
+
selector: `
|
|
198
210
|
[kendoLabelLocalizedMessages],
|
|
199
211
|
[kendoFloatingLabelLocalizedMessages]
|
|
200
212
|
`
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
], LocalizedMessagesDirective);
|
|
213
|
+
}]
|
|
214
|
+
}], ctorParameters: function () { return [{ type: i1.LocalizationService }]; } });
|
|
204
215
|
|
|
205
|
-
var CustomMessagesComponent_1;
|
|
206
216
|
/**
|
|
207
217
|
* Custom component messages override default component messages
|
|
208
218
|
* ([see example]({% slug label_globalization %}#toc-localization)).
|
|
209
219
|
*/
|
|
210
|
-
|
|
220
|
+
class CustomMessagesComponent extends Messages {
|
|
211
221
|
constructor(service) {
|
|
212
222
|
super();
|
|
213
223
|
this.service = service;
|
|
@@ -215,20 +225,27 @@ let CustomMessagesComponent = CustomMessagesComponent_1 = class CustomMessagesCo
|
|
|
215
225
|
get override() {
|
|
216
226
|
return true;
|
|
217
227
|
}
|
|
218
|
-
}
|
|
219
|
-
CustomMessagesComponent =
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
228
|
+
}
|
|
229
|
+
CustomMessagesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: CustomMessagesComponent, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
230
|
+
CustomMessagesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: CustomMessagesComponent, selector: "kendo-label-messages, kendo-floatinglabel-messages", providers: [
|
|
231
|
+
{
|
|
232
|
+
provide: Messages,
|
|
233
|
+
useExisting: forwardRef(() => CustomMessagesComponent)
|
|
234
|
+
}
|
|
235
|
+
], usesInheritance: true, ngImport: i0, template: ``, isInline: true });
|
|
236
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: CustomMessagesComponent, decorators: [{
|
|
237
|
+
type: Component,
|
|
238
|
+
args: [{
|
|
239
|
+
providers: [
|
|
240
|
+
{
|
|
241
|
+
provide: Messages,
|
|
242
|
+
useExisting: forwardRef(() => CustomMessagesComponent)
|
|
243
|
+
}
|
|
244
|
+
],
|
|
245
|
+
selector: 'kendo-label-messages, kendo-floatinglabel-messages',
|
|
246
|
+
template: ``
|
|
247
|
+
}]
|
|
248
|
+
}], ctorParameters: function () { return [{ type: i1.LocalizationService }]; } });
|
|
232
249
|
|
|
233
250
|
const SHARED_DIRECTIVES = [
|
|
234
251
|
LocalizedMessagesDirective,
|
|
@@ -237,14 +254,20 @@ const SHARED_DIRECTIVES = [
|
|
|
237
254
|
/**
|
|
238
255
|
* @hidden
|
|
239
256
|
*/
|
|
240
|
-
|
|
241
|
-
}
|
|
242
|
-
SharedDirectivesModule =
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
257
|
+
class SharedDirectivesModule {
|
|
258
|
+
}
|
|
259
|
+
SharedDirectivesModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SharedDirectivesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
260
|
+
SharedDirectivesModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SharedDirectivesModule, declarations: [LocalizedMessagesDirective,
|
|
261
|
+
CustomMessagesComponent], exports: [LocalizedMessagesDirective,
|
|
262
|
+
CustomMessagesComponent] });
|
|
263
|
+
SharedDirectivesModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SharedDirectivesModule });
|
|
264
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SharedDirectivesModule, decorators: [{
|
|
265
|
+
type: NgModule,
|
|
266
|
+
args: [{
|
|
267
|
+
declarations: [SHARED_DIRECTIVES],
|
|
268
|
+
exports: [SHARED_DIRECTIVES]
|
|
269
|
+
}]
|
|
270
|
+
}] });
|
|
248
271
|
|
|
249
272
|
/**
|
|
250
273
|
* @hidden
|
|
@@ -253,7 +276,7 @@ const packageMetadata = {
|
|
|
253
276
|
name: '@progress/kendo-angular-label',
|
|
254
277
|
productName: 'Kendo UI for Angular',
|
|
255
278
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
256
|
-
publishDate:
|
|
279
|
+
publishDate: 1645535045,
|
|
257
280
|
version: '',
|
|
258
281
|
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'
|
|
259
282
|
};
|
|
@@ -331,7 +354,7 @@ const isFunction = (x) => Object.prototype.toString.call(x) === '[object Functio
|
|
|
331
354
|
*
|
|
332
355
|
* ```
|
|
333
356
|
*/
|
|
334
|
-
|
|
357
|
+
class FloatingLabelComponent {
|
|
335
358
|
constructor(elementRef, renderer, changeDetectorRef, localization) {
|
|
336
359
|
this.elementRef = elementRef;
|
|
337
360
|
this.renderer = renderer;
|
|
@@ -518,69 +541,38 @@ let FloatingLabelComponent = class FloatingLabelComponent {
|
|
|
518
541
|
return;
|
|
519
542
|
}
|
|
520
543
|
}
|
|
521
|
-
}
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
],
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
],
|
|
552
|
-
|
|
553
|
-
Input(),
|
|
554
|
-
__metadata("design:type", String)
|
|
555
|
-
], FloatingLabelComponent.prototype, "text", void 0);
|
|
556
|
-
__decorate([
|
|
557
|
-
Input(),
|
|
558
|
-
__metadata("design:type", Boolean)
|
|
559
|
-
], FloatingLabelComponent.prototype, "optional", void 0);
|
|
560
|
-
__decorate([
|
|
561
|
-
Output(),
|
|
562
|
-
__metadata("design:type", EventEmitter)
|
|
563
|
-
], FloatingLabelComponent.prototype, "positionChange", void 0);
|
|
564
|
-
__decorate([
|
|
565
|
-
ContentChild(KendoInput, { static: false }),
|
|
566
|
-
__metadata("design:type", Object)
|
|
567
|
-
], FloatingLabelComponent.prototype, "kendoInput", void 0);
|
|
568
|
-
__decorate([
|
|
569
|
-
ContentChild(NgControl, { static: false }),
|
|
570
|
-
__metadata("design:type", NgControl)
|
|
571
|
-
], FloatingLabelComponent.prototype, "formControl", void 0);
|
|
572
|
-
FloatingLabelComponent = __decorate([
|
|
573
|
-
Component({
|
|
574
|
-
selector: 'kendo-floatinglabel',
|
|
575
|
-
exportAs: 'kendoFloatingLabel',
|
|
576
|
-
providers: [
|
|
577
|
-
LocalizationService,
|
|
578
|
-
{
|
|
579
|
-
provide: L10N_PREFIX,
|
|
580
|
-
useValue: 'kendo.floatinglabel'
|
|
581
|
-
}
|
|
582
|
-
],
|
|
583
|
-
template: `
|
|
544
|
+
}
|
|
545
|
+
FloatingLabelComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FloatingLabelComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }, { token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
546
|
+
FloatingLabelComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FloatingLabelComponent, 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-state-focused": "this.focusedClass", "class.k-state-invalid": "this.invalidClass", "attr.dir": "this.direction" } }, providers: [
|
|
547
|
+
LocalizationService,
|
|
548
|
+
{
|
|
549
|
+
provide: L10N_PREFIX,
|
|
550
|
+
useValue: 'kendo.floatinglabel'
|
|
551
|
+
}
|
|
552
|
+
], queries: [{ propertyName: "kendoInput", first: true, predicate: KendoInput, descendants: true }, { propertyName: "formControl", first: true, predicate: NgControl, descendants: true }], exportAs: ["kendoFloatingLabel"], ngImport: i0, template: `
|
|
553
|
+
<ng-container kendoFloatingLabelLocalizedMessages
|
|
554
|
+
i18n-optional="kendo.floatinglabel.optional|The text for the optional segment of a FloatingLabel component"
|
|
555
|
+
optional="Optional"
|
|
556
|
+
>
|
|
557
|
+
</ng-container>
|
|
558
|
+
<ng-content></ng-content>
|
|
559
|
+
<label *ngIf="text" [ngClass]="labelCssClass" [ngStyle]="labelCssStyle" [for]="id" [attr.id]="labelId" class="k-label">
|
|
560
|
+
{{ text }}<span *ngIf="optional" class="k-label-optional">({{textFor('optional')}})</span>
|
|
561
|
+
</label>
|
|
562
|
+
`, isInline: true, directives: [{ type: LocalizedMessagesDirective, selector: "\n [kendoLabelLocalizedMessages],\n [kendoFloatingLabelLocalizedMessages]\n " }, { type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i3.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
|
|
563
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FloatingLabelComponent, decorators: [{
|
|
564
|
+
type: Component,
|
|
565
|
+
args: [{
|
|
566
|
+
selector: 'kendo-floatinglabel',
|
|
567
|
+
exportAs: 'kendoFloatingLabel',
|
|
568
|
+
providers: [
|
|
569
|
+
LocalizationService,
|
|
570
|
+
{
|
|
571
|
+
provide: L10N_PREFIX,
|
|
572
|
+
useValue: 'kendo.floatinglabel'
|
|
573
|
+
}
|
|
574
|
+
],
|
|
575
|
+
template: `
|
|
584
576
|
<ng-container kendoFloatingLabelLocalizedMessages
|
|
585
577
|
i18n-optional="kendo.floatinglabel.optional|The text for the optional segment of a FloatingLabel component"
|
|
586
578
|
optional="Optional"
|
|
@@ -591,14 +583,40 @@ FloatingLabelComponent = __decorate([
|
|
|
591
583
|
{{ text }}<span *ngIf="optional" class="k-label-optional">({{textFor('optional')}})</span>
|
|
592
584
|
</label>
|
|
593
585
|
`
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
586
|
+
}]
|
|
587
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.ChangeDetectorRef }, { type: i1.LocalizationService }]; }, propDecorators: { hostClasses: [{
|
|
588
|
+
type: HostBinding,
|
|
589
|
+
args: ['class.k-floating-label-container']
|
|
590
|
+
}], focusedClass: [{
|
|
591
|
+
type: HostBinding,
|
|
592
|
+
args: ['class.k-state-focused']
|
|
593
|
+
}], invalidClass: [{
|
|
594
|
+
type: HostBinding,
|
|
595
|
+
args: ['class.k-state-invalid']
|
|
596
|
+
}], direction: [{
|
|
597
|
+
type: HostBinding,
|
|
598
|
+
args: ['attr.dir']
|
|
599
|
+
}], labelCssStyle: [{
|
|
600
|
+
type: Input
|
|
601
|
+
}], labelCssClass: [{
|
|
602
|
+
type: Input
|
|
603
|
+
}], id: [{
|
|
604
|
+
type: Input
|
|
605
|
+
}], text: [{
|
|
606
|
+
type: Input
|
|
607
|
+
}], optional: [{
|
|
608
|
+
type: Input
|
|
609
|
+
}], positionChange: [{
|
|
610
|
+
type: Output
|
|
611
|
+
}], kendoInput: [{
|
|
612
|
+
type: ContentChild,
|
|
613
|
+
args: [KendoInput, { static: false }]
|
|
614
|
+
}], formControl: [{
|
|
615
|
+
type: ContentChild,
|
|
616
|
+
args: [NgControl, { static: false }]
|
|
617
|
+
}] } });
|
|
600
618
|
|
|
601
|
-
const COMPONENT_DIRECTIVES = [FloatingLabelComponent];
|
|
619
|
+
const COMPONENT_DIRECTIVES$1 = [FloatingLabelComponent];
|
|
602
620
|
/**
|
|
603
621
|
* Represents the [NgModule]({{ site.data.urls.angular['ngmoduleapi'] }})
|
|
604
622
|
* definition for the TextBox directive.
|
|
@@ -628,15 +646,19 @@ const COMPONENT_DIRECTIVES = [FloatingLabelComponent];
|
|
|
628
646
|
*
|
|
629
647
|
* ```
|
|
630
648
|
*/
|
|
631
|
-
|
|
632
|
-
}
|
|
633
|
-
FloatingLabelModule =
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
],
|
|
649
|
+
class FloatingLabelModule {
|
|
650
|
+
}
|
|
651
|
+
FloatingLabelModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FloatingLabelModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
652
|
+
FloatingLabelModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FloatingLabelModule, declarations: [FloatingLabelComponent], imports: [CommonModule, SharedDirectivesModule], exports: [FloatingLabelComponent, SharedDirectivesModule] });
|
|
653
|
+
FloatingLabelModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FloatingLabelModule, imports: [[CommonModule, SharedDirectivesModule], SharedDirectivesModule] });
|
|
654
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FloatingLabelModule, decorators: [{
|
|
655
|
+
type: NgModule,
|
|
656
|
+
args: [{
|
|
657
|
+
declarations: [...COMPONENT_DIRECTIVES$1],
|
|
658
|
+
exports: [...COMPONENT_DIRECTIVES$1, SharedDirectivesModule],
|
|
659
|
+
imports: [CommonModule, SharedDirectivesModule]
|
|
660
|
+
}]
|
|
661
|
+
}] });
|
|
640
662
|
|
|
641
663
|
/**
|
|
642
664
|
* Represents the [Kendo UI Label component for Angular]({% slug label_basic %}).
|
|
@@ -660,7 +682,7 @@ FloatingLabelModule = __decorate([
|
|
|
660
682
|
*
|
|
661
683
|
* ```
|
|
662
684
|
*/
|
|
663
|
-
|
|
685
|
+
class LabelComponent {
|
|
664
686
|
constructor(elementRef, renderer, localization) {
|
|
665
687
|
this.elementRef = elementRef;
|
|
666
688
|
this.renderer = renderer;
|
|
@@ -716,43 +738,40 @@ let LabelComponent = class LabelComponent {
|
|
|
716
738
|
textFor(key) {
|
|
717
739
|
return this.localization.get(key);
|
|
718
740
|
}
|
|
719
|
-
}
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
],
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
]
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
],
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
}
|
|
754
|
-
],
|
|
755
|
-
template: `
|
|
741
|
+
}
|
|
742
|
+
LabelComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: LabelComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
743
|
+
LabelComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: LabelComponent, selector: "kendo-label", inputs: { text: "text", for: "for", optional: "optional" }, host: { properties: { "attr.dir": "this.direction" } }, providers: [
|
|
744
|
+
LocalizationService,
|
|
745
|
+
{
|
|
746
|
+
provide: L10N_PREFIX,
|
|
747
|
+
useValue: 'kendo.label'
|
|
748
|
+
}
|
|
749
|
+
], queries: [{ propertyName: "kendoInput", first: true, predicate: KendoInput, descendants: true, static: true }], viewQueries: [{ propertyName: "labelDirective", first: true, predicate: LabelDirective, descendants: true, static: true }], exportAs: ["kendoLabel"], ngImport: i0, template: `
|
|
750
|
+
<ng-container kendoLabelLocalizedMessages
|
|
751
|
+
i18n-optional="kendo.label.optional|The text for the optional segment of a Label component"
|
|
752
|
+
optional="Optional"
|
|
753
|
+
>
|
|
754
|
+
</ng-container>
|
|
755
|
+
<label
|
|
756
|
+
[for]="control"
|
|
757
|
+
[class.k-label-empty]="!text">
|
|
758
|
+
{{ text }}<span *ngIf="optional" class="k-label-optional">({{textFor('optional')}})</span>
|
|
759
|
+
</label>
|
|
760
|
+
<ng-content></ng-content>
|
|
761
|
+
`, isInline: true, directives: [{ type: LocalizedMessagesDirective, selector: "\n [kendoLabelLocalizedMessages],\n [kendoFloatingLabelLocalizedMessages]\n " }, { type: LabelDirective, selector: "label[for]", inputs: ["for"] }, { type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
762
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: LabelComponent, decorators: [{
|
|
763
|
+
type: Component,
|
|
764
|
+
args: [{
|
|
765
|
+
selector: 'kendo-label',
|
|
766
|
+
exportAs: 'kendoLabel',
|
|
767
|
+
providers: [
|
|
768
|
+
LocalizationService,
|
|
769
|
+
{
|
|
770
|
+
provide: L10N_PREFIX,
|
|
771
|
+
useValue: 'kendo.label'
|
|
772
|
+
}
|
|
773
|
+
],
|
|
774
|
+
template: `
|
|
756
775
|
<ng-container kendoLabelLocalizedMessages
|
|
757
776
|
i18n-optional="kendo.label.optional|The text for the optional segment of a Label component"
|
|
758
777
|
optional="Optional"
|
|
@@ -765,13 +784,25 @@ LabelComponent = __decorate([
|
|
|
765
784
|
</label>
|
|
766
785
|
<ng-content></ng-content>
|
|
767
786
|
`
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
],
|
|
787
|
+
}]
|
|
788
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i1.LocalizationService }]; }, propDecorators: { direction: [{
|
|
789
|
+
type: HostBinding,
|
|
790
|
+
args: ['attr.dir']
|
|
791
|
+
}], text: [{
|
|
792
|
+
type: Input
|
|
793
|
+
}], for: [{
|
|
794
|
+
type: Input
|
|
795
|
+
}], optional: [{
|
|
796
|
+
type: Input
|
|
797
|
+
}], labelDirective: [{
|
|
798
|
+
type: ViewChild,
|
|
799
|
+
args: [LabelDirective, { static: true }]
|
|
800
|
+
}], kendoInput: [{
|
|
801
|
+
type: ContentChild,
|
|
802
|
+
args: [KendoInput, { static: true }]
|
|
803
|
+
}] } });
|
|
773
804
|
|
|
774
|
-
const COMPONENT_DIRECTIVES
|
|
805
|
+
const COMPONENT_DIRECTIVES = [
|
|
775
806
|
LabelDirective,
|
|
776
807
|
LabelComponent
|
|
777
808
|
];
|
|
@@ -810,18 +841,25 @@ const COMPONENT_DIRECTIVES$1 = [
|
|
|
810
841
|
*
|
|
811
842
|
* ```
|
|
812
843
|
*/
|
|
813
|
-
|
|
814
|
-
}
|
|
815
|
-
LabelModule =
|
|
816
|
-
|
|
817
|
-
imports: [CommonModule, SharedDirectivesModule],
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
844
|
+
class LabelModule {
|
|
845
|
+
}
|
|
846
|
+
LabelModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: LabelModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
847
|
+
LabelModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: LabelModule, declarations: [LabelDirective,
|
|
848
|
+
LabelComponent], imports: [CommonModule, SharedDirectivesModule], exports: [LabelDirective,
|
|
849
|
+
LabelComponent, FloatingLabelModule, SharedDirectivesModule] });
|
|
850
|
+
LabelModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: LabelModule, imports: [[CommonModule, SharedDirectivesModule], FloatingLabelModule, SharedDirectivesModule] });
|
|
851
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: LabelModule, decorators: [{
|
|
852
|
+
type: NgModule,
|
|
853
|
+
args: [{
|
|
854
|
+
imports: [CommonModule, SharedDirectivesModule],
|
|
855
|
+
declarations: [...COMPONENT_DIRECTIVES],
|
|
856
|
+
exports: [...COMPONENT_DIRECTIVES, FloatingLabelModule, SharedDirectivesModule]
|
|
857
|
+
}]
|
|
858
|
+
}] });
|
|
822
859
|
|
|
823
860
|
/**
|
|
824
861
|
* Generated bundle index. Do not edit.
|
|
825
862
|
*/
|
|
826
863
|
|
|
827
|
-
export {
|
|
864
|
+
export { CustomMessagesComponent, FloatingLabelComponent, FloatingLabelModule, LabelComponent, LabelDirective, LabelModule, LocalizedMessagesDirective, SharedDirectivesModule };
|
|
865
|
+
|
|
@@ -15,6 +15,7 @@ export declare class FloatingLabelInputAdapter {
|
|
|
15
15
|
autoFillStart: Observable<any> | EventEmitter<any>;
|
|
16
16
|
autoFillEnd: Observable<any> | EventEmitter<any>;
|
|
17
17
|
onValueChange: Observable<any> | EventEmitter<any>;
|
|
18
|
-
focusableId: string;
|
|
18
|
+
get focusableId(): string;
|
|
19
|
+
set focusableId(value: string);
|
|
19
20
|
constructor(component: any, formControl?: NgControl);
|
|
20
21
|
}
|
|
@@ -6,6 +6,7 @@ import { AfterContentInit, ElementRef, EventEmitter, OnDestroy, Renderer2, Chang
|
|
|
6
6
|
import { LocalizationService } from '@progress/kendo-angular-l10n';
|
|
7
7
|
import { NgControl } from '@angular/forms';
|
|
8
8
|
import { FloatingLabelPosition } from './models/label-position';
|
|
9
|
+
import * as i0 from "@angular/core";
|
|
9
10
|
/**
|
|
10
11
|
* Represents the [Kendo UI FloatingLabel component for Angular]({% slug overview_floatinglabel %}).
|
|
11
12
|
* Provides floating labels to `input` elements.
|
|
@@ -39,10 +40,10 @@ export declare class FloatingLabelComponent implements AfterContentInit, OnDestr
|
|
|
39
40
|
/**
|
|
40
41
|
* Represents the current floating label position.
|
|
41
42
|
*/
|
|
42
|
-
|
|
43
|
+
get labelPosition(): FloatingLabelPosition;
|
|
43
44
|
hostClasses: boolean;
|
|
44
|
-
|
|
45
|
-
|
|
45
|
+
get focusedClass(): boolean;
|
|
46
|
+
get invalidClass(): boolean;
|
|
46
47
|
/**
|
|
47
48
|
* @hidden
|
|
48
49
|
*/
|
|
@@ -117,4 +118,6 @@ export declare class FloatingLabelComponent implements AfterContentInit, OnDestr
|
|
|
117
118
|
private handleAutofill;
|
|
118
119
|
private addHandlers;
|
|
119
120
|
private validateSetup;
|
|
121
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FloatingLabelComponent, never>;
|
|
122
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FloatingLabelComponent, "kendo-floatinglabel", ["kendoFloatingLabel"], { "labelCssStyle": "labelCssStyle"; "labelCssClass": "labelCssClass"; "id": "id"; "text": "text"; "optional": "optional"; }, { "positionChange": "positionChange"; }, ["kendoInput", "formControl"], ["*"]>;
|
|
120
123
|
}
|
|
@@ -2,6 +2,10 @@
|
|
|
2
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
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
import * as i1 from "./floating-label.component";
|
|
7
|
+
import * as i2 from "@angular/common";
|
|
8
|
+
import * as i3 from "../shared.module";
|
|
5
9
|
/**
|
|
6
10
|
* Represents the [NgModule]({{ site.data.urls.angular['ngmoduleapi'] }})
|
|
7
11
|
* definition for the TextBox directive.
|
|
@@ -32,4 +36,7 @@
|
|
|
32
36
|
* ```
|
|
33
37
|
*/
|
|
34
38
|
export declare class FloatingLabelModule {
|
|
39
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FloatingLabelModule, never>;
|
|
40
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<FloatingLabelModule, [typeof i1.FloatingLabelComponent], [typeof i2.CommonModule, typeof i3.SharedDirectivesModule], [typeof i1.FloatingLabelComponent, typeof i3.SharedDirectivesModule]>;
|
|
41
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<FloatingLabelModule>;
|
|
35
42
|
}
|
|
File without changes
|
|
@@ -2,3 +2,8 @@
|
|
|
2
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
|
+
/**
|
|
6
|
+
* Generated bundle index. Do not edit.
|
|
7
|
+
*/
|
|
8
|
+
/// <amd-module name="@progress/kendo-angular-label" />
|
|
9
|
+
export * from './main';
|