@progress/kendo-angular-label 17.0.0-develop.9 → 17.0.1-develop.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/README.md +32 -18
- package/{esm2020 → esm2022}/floating-label/floating-label-input-adapter.mjs +25 -19
- package/{esm2020 → esm2022}/floating-label/floating-label.component.mjs +77 -41
- package/{esm2020 → esm2022}/floating-label/floating-label.module.mjs +4 -4
- package/{esm2020 → esm2022}/label/label.component.mjs +54 -19
- package/{esm2020 → esm2022}/label.directive.mjs +33 -23
- package/{esm2020 → esm2022}/label.module.mjs +4 -4
- package/{esm2020 → esm2022}/localization/custom-messages.component.mjs +9 -8
- package/{esm2020 → esm2022}/localization/localized-messages.directive.mjs +9 -8
- package/{esm2020 → esm2022}/localization/messages.mjs +7 -3
- package/{esm2020 → esm2022}/package-metadata.mjs +2 -2
- package/{fesm2015 → fesm2022}/progress-kendo-angular-label.mjs +224 -131
- package/floating-label/floating-label.component.d.ts +1 -1
- package/floating-label/models/label-position.d.ts +1 -1
- package/label/label.component.d.ts +1 -1
- package/label.directive.d.ts +1 -1
- package/localization/messages.d.ts +1 -1
- package/package.json +13 -19
- package/fesm2020/progress-kendo-angular-label.mjs +0 -900
- /package/{esm2020 → esm2022}/directives.mjs +0 -0
- /package/{esm2020 → esm2022}/floating-label/models/label-position.mjs +0 -0
- /package/{esm2020 → esm2022}/index.mjs +0 -0
- /package/{esm2020 → esm2022}/progress-kendo-angular-label.mjs +0 -0
- /package/{esm2020 → esm2022}/util.mjs +0 -0
|
@@ -74,26 +74,15 @@ const nativeLabelForTargets = ['BUTTON', 'INPUT', 'METER', 'OUTPUT', 'PROGRESS',
|
|
|
74
74
|
* ```
|
|
75
75
|
*/
|
|
76
76
|
class LabelDirective {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
this.labelClass = true;
|
|
87
|
-
this.handleClick = () => {
|
|
88
|
-
const component = this.getFocusableComponent();
|
|
89
|
-
if (!component) {
|
|
90
|
-
return;
|
|
91
|
-
}
|
|
92
|
-
if (component.focus) {
|
|
93
|
-
component.focus();
|
|
94
|
-
}
|
|
95
|
-
};
|
|
96
|
-
}
|
|
77
|
+
label;
|
|
78
|
+
renderer;
|
|
79
|
+
zone;
|
|
80
|
+
/**
|
|
81
|
+
* Sets the focusable target to either of the following options ([see example]({% slug overview_label %})):
|
|
82
|
+
* * A [template reference variable](link:site.data.urls.angular['templatesyntax']#template-reference-variables--var-), or
|
|
83
|
+
* * An `id` HTML string value.
|
|
84
|
+
*/
|
|
85
|
+
for;
|
|
97
86
|
get labelFor() {
|
|
98
87
|
if (typeof this.for === 'string') {
|
|
99
88
|
return this.for;
|
|
@@ -107,6 +96,18 @@ class LabelDirective {
|
|
|
107
96
|
}
|
|
108
97
|
return component.focusableId || component.id || null;
|
|
109
98
|
}
|
|
99
|
+
/**
|
|
100
|
+
* @hidden
|
|
101
|
+
*
|
|
102
|
+
* Allows the user to specify if the label CSS class should be rendered or not.
|
|
103
|
+
*/
|
|
104
|
+
labelClass = true;
|
|
105
|
+
clickListener;
|
|
106
|
+
constructor(label, renderer, zone) {
|
|
107
|
+
this.label = label;
|
|
108
|
+
this.renderer = renderer;
|
|
109
|
+
this.zone = zone;
|
|
110
|
+
}
|
|
110
111
|
/**
|
|
111
112
|
* @hidden
|
|
112
113
|
*/
|
|
@@ -164,10 +165,19 @@ class LabelDirective {
|
|
|
164
165
|
const target = this.for;
|
|
165
166
|
return target && target.focus !== undefined ? target : null;
|
|
166
167
|
}
|
|
168
|
+
handleClick = () => {
|
|
169
|
+
const component = this.getFocusableComponent();
|
|
170
|
+
if (!component) {
|
|
171
|
+
return;
|
|
172
|
+
}
|
|
173
|
+
if (component.focus) {
|
|
174
|
+
component.focus();
|
|
175
|
+
}
|
|
176
|
+
};
|
|
177
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: LabelDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Directive });
|
|
178
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: LabelDirective, isStandalone: true, selector: "label[for]", inputs: { for: "for", labelClass: "labelClass" }, host: { properties: { "attr.for": "this.labelFor", "class.k-label": "this.labelClass" } }, ngImport: i0 });
|
|
167
179
|
}
|
|
168
|
-
|
|
169
|
-
LabelDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: LabelDirective, isStandalone: true, selector: "label[for]", inputs: { for: "for", labelClass: "labelClass" }, host: { properties: { "attr.for": "this.labelFor", "class.k-label": "this.labelClass" } }, ngImport: i0 });
|
|
170
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: LabelDirective, decorators: [{
|
|
180
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: LabelDirective, decorators: [{
|
|
171
181
|
type: Directive,
|
|
172
182
|
args: [{
|
|
173
183
|
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
@@ -193,8 +203,8 @@ const packageMetadata = {
|
|
|
193
203
|
name: '@progress/kendo-angular-label',
|
|
194
204
|
productName: 'Kendo UI for Angular',
|
|
195
205
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
196
|
-
publishDate:
|
|
197
|
-
version: '17.0.
|
|
206
|
+
publishDate: 1731429714,
|
|
207
|
+
version: '17.0.1-develop.1',
|
|
198
208
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
|
|
199
209
|
};
|
|
200
210
|
|
|
@@ -202,6 +212,31 @@ const packageMetadata = {
|
|
|
202
212
|
* @hidden
|
|
203
213
|
*/
|
|
204
214
|
class FloatingLabelInputAdapter {
|
|
215
|
+
component;
|
|
216
|
+
onFocus;
|
|
217
|
+
onBlur;
|
|
218
|
+
autoFillStart;
|
|
219
|
+
autoFillEnd;
|
|
220
|
+
onValueChange;
|
|
221
|
+
get focusableId() {
|
|
222
|
+
const component = this.component;
|
|
223
|
+
if ('focusableId' in component) {
|
|
224
|
+
return component.focusableId;
|
|
225
|
+
}
|
|
226
|
+
else if ('id' in component) {
|
|
227
|
+
return component.id;
|
|
228
|
+
}
|
|
229
|
+
return "";
|
|
230
|
+
}
|
|
231
|
+
set focusableId(value) {
|
|
232
|
+
const component = this.component;
|
|
233
|
+
if ('focusableId' in component) {
|
|
234
|
+
component.focusableId = value;
|
|
235
|
+
}
|
|
236
|
+
else if ('id' in component) {
|
|
237
|
+
component.id = value;
|
|
238
|
+
}
|
|
239
|
+
}
|
|
205
240
|
constructor(component, formControl) {
|
|
206
241
|
this.component = component;
|
|
207
242
|
const isObservableOrEventEmitter = (event) => event instanceof Observable || event instanceof EventEmitter;
|
|
@@ -224,35 +259,20 @@ class FloatingLabelInputAdapter {
|
|
|
224
259
|
this.onValueChange = component.valueChange;
|
|
225
260
|
}
|
|
226
261
|
}
|
|
227
|
-
get focusableId() {
|
|
228
|
-
const component = this.component;
|
|
229
|
-
if ('focusableId' in component) {
|
|
230
|
-
return component.focusableId;
|
|
231
|
-
}
|
|
232
|
-
else if ('id' in component) {
|
|
233
|
-
return component.id;
|
|
234
|
-
}
|
|
235
|
-
return "";
|
|
236
|
-
}
|
|
237
|
-
set focusableId(value) {
|
|
238
|
-
const component = this.component;
|
|
239
|
-
if ('focusableId' in component) {
|
|
240
|
-
component.focusableId = value;
|
|
241
|
-
}
|
|
242
|
-
else if ('id' in component) {
|
|
243
|
-
component.id = value;
|
|
244
|
-
}
|
|
245
|
-
}
|
|
246
262
|
}
|
|
247
263
|
|
|
248
264
|
/**
|
|
249
265
|
* @hidden
|
|
250
266
|
*/
|
|
251
267
|
class Messages extends ComponentMessages {
|
|
268
|
+
/**
|
|
269
|
+
* The optional text.
|
|
270
|
+
*/
|
|
271
|
+
optional;
|
|
272
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: Messages, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
273
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: Messages, selector: "kendo-label-messages-base", inputs: { optional: "optional" }, usesInheritance: true, ngImport: i0 });
|
|
252
274
|
}
|
|
253
|
-
|
|
254
|
-
Messages.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: Messages, selector: "kendo-label-messages-base", inputs: { optional: "optional" }, usesInheritance: true, ngImport: i0 });
|
|
255
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: Messages, decorators: [{
|
|
275
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: Messages, decorators: [{
|
|
256
276
|
type: Directive,
|
|
257
277
|
args: [{
|
|
258
278
|
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
@@ -266,19 +286,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
266
286
|
* @hidden
|
|
267
287
|
*/
|
|
268
288
|
class LocalizedMessagesDirective extends Messages {
|
|
289
|
+
service;
|
|
269
290
|
constructor(service) {
|
|
270
291
|
super();
|
|
271
292
|
this.service = service;
|
|
272
293
|
}
|
|
294
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: LocalizedMessagesDirective, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
295
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: LocalizedMessagesDirective, isStandalone: true, selector: "\n [kendoLabelLocalizedMessages],\n [kendoFloatingLabelLocalizedMessages]\n ", providers: [
|
|
296
|
+
{
|
|
297
|
+
provide: Messages,
|
|
298
|
+
useExisting: forwardRef(() => LocalizedMessagesDirective)
|
|
299
|
+
}
|
|
300
|
+
], usesInheritance: true, ngImport: i0 });
|
|
273
301
|
}
|
|
274
|
-
|
|
275
|
-
LocalizedMessagesDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: LocalizedMessagesDirective, isStandalone: true, selector: "\n [kendoLabelLocalizedMessages],\n [kendoFloatingLabelLocalizedMessages]\n ", providers: [
|
|
276
|
-
{
|
|
277
|
-
provide: Messages,
|
|
278
|
-
useExisting: forwardRef(() => LocalizedMessagesDirective)
|
|
279
|
-
}
|
|
280
|
-
], usesInheritance: true, ngImport: i0 });
|
|
281
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: LocalizedMessagesDirective, decorators: [{
|
|
302
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: LocalizedMessagesDirective, decorators: [{
|
|
282
303
|
type: Directive,
|
|
283
304
|
args: [{
|
|
284
305
|
providers: [
|
|
@@ -312,37 +333,10 @@ const isFunction = (x) => Object.prototype.toString.call(x) === '[object Functio
|
|
|
312
333
|
* ```
|
|
313
334
|
*/
|
|
314
335
|
class FloatingLabelComponent {
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
this.localization = localization;
|
|
320
|
-
this.hostClasses = true;
|
|
321
|
-
/**
|
|
322
|
-
* Fires after the floating label position is changed.
|
|
323
|
-
*/
|
|
324
|
-
this.positionChange = new EventEmitter();
|
|
325
|
-
/**
|
|
326
|
-
* @hidden
|
|
327
|
-
*/
|
|
328
|
-
this.focused = false;
|
|
329
|
-
/**
|
|
330
|
-
* @hidden
|
|
331
|
-
*/
|
|
332
|
-
this.empty = true;
|
|
333
|
-
/**
|
|
334
|
-
* @hidden
|
|
335
|
-
*/
|
|
336
|
-
this.invalid = false;
|
|
337
|
-
/**
|
|
338
|
-
* @hidden
|
|
339
|
-
*/
|
|
340
|
-
this.labelId = `k-${guid()}`;
|
|
341
|
-
this.autoFillStarted = false;
|
|
342
|
-
validatePackage(packageMetadata);
|
|
343
|
-
this.direction = localization.rtl ? 'rtl' : 'ltr';
|
|
344
|
-
this.renderer.removeAttribute(this.elementRef.nativeElement, "id");
|
|
345
|
-
}
|
|
336
|
+
elementRef;
|
|
337
|
+
renderer;
|
|
338
|
+
changeDetectorRef;
|
|
339
|
+
localization;
|
|
346
340
|
/**
|
|
347
341
|
* Represents the current floating label position.
|
|
348
342
|
*/
|
|
@@ -352,12 +346,75 @@ class FloatingLabelComponent {
|
|
|
352
346
|
}
|
|
353
347
|
return this.focused ? 'Out' : 'In';
|
|
354
348
|
}
|
|
349
|
+
hostClasses = true;
|
|
355
350
|
get focusedClass() {
|
|
356
351
|
return this.focused;
|
|
357
352
|
}
|
|
358
353
|
get invalidClass() {
|
|
359
354
|
return this.invalid;
|
|
360
355
|
}
|
|
356
|
+
/**
|
|
357
|
+
* @hidden
|
|
358
|
+
*/
|
|
359
|
+
direction;
|
|
360
|
+
/**
|
|
361
|
+
* Sets the CSS Styles that will be rendered on the actual label element.
|
|
362
|
+
* Supports the type of values that are supported by [ngStyle](link:site.data.urls.angular['ngstyleapi']) directive.
|
|
363
|
+
*/
|
|
364
|
+
labelCssStyle;
|
|
365
|
+
/**
|
|
366
|
+
* Sets the CSS Classes that will be rendered on the actual label element.
|
|
367
|
+
* Supports the type of values that are supported by [ngClass](link:site.data.urls.angular['ngclassapi']) directive.
|
|
368
|
+
*/
|
|
369
|
+
labelCssClass;
|
|
370
|
+
/**
|
|
371
|
+
* Sets the `id` attribute of the input inside the floating label.
|
|
372
|
+
*/
|
|
373
|
+
id;
|
|
374
|
+
/**
|
|
375
|
+
* Specifies the text content of the floating label which describes the input.
|
|
376
|
+
*/
|
|
377
|
+
text;
|
|
378
|
+
/**
|
|
379
|
+
* Allows marking a form field as optional. By default renders the `Optional` text when enabled.
|
|
380
|
+
* The text can be customized by providing a custom message ([see example]({% slug label_globalization %}#toc-custom-messages)).
|
|
381
|
+
*
|
|
382
|
+
* The default value is `false`
|
|
383
|
+
*/
|
|
384
|
+
optional;
|
|
385
|
+
/**
|
|
386
|
+
* Fires after the floating label position is changed.
|
|
387
|
+
*/
|
|
388
|
+
positionChange = new EventEmitter();
|
|
389
|
+
kendoInput;
|
|
390
|
+
formControl;
|
|
391
|
+
/**
|
|
392
|
+
* @hidden
|
|
393
|
+
*/
|
|
394
|
+
focused = false;
|
|
395
|
+
/**
|
|
396
|
+
* @hidden
|
|
397
|
+
*/
|
|
398
|
+
empty = true;
|
|
399
|
+
/**
|
|
400
|
+
* @hidden
|
|
401
|
+
*/
|
|
402
|
+
invalid = false;
|
|
403
|
+
/**
|
|
404
|
+
* @hidden
|
|
405
|
+
*/
|
|
406
|
+
labelId = `k-${guid()}`;
|
|
407
|
+
subscription;
|
|
408
|
+
autoFillStarted = false;
|
|
409
|
+
constructor(elementRef, renderer, changeDetectorRef, localization) {
|
|
410
|
+
this.elementRef = elementRef;
|
|
411
|
+
this.renderer = renderer;
|
|
412
|
+
this.changeDetectorRef = changeDetectorRef;
|
|
413
|
+
this.localization = localization;
|
|
414
|
+
validatePackage(packageMetadata);
|
|
415
|
+
this.direction = localization.rtl ? 'rtl' : 'ltr';
|
|
416
|
+
this.renderer.removeAttribute(this.elementRef.nativeElement, "id");
|
|
417
|
+
}
|
|
361
418
|
/**
|
|
362
419
|
* @hidden
|
|
363
420
|
*/
|
|
@@ -510,15 +567,14 @@ class FloatingLabelComponent {
|
|
|
510
567
|
return;
|
|
511
568
|
}
|
|
512
569
|
}
|
|
513
|
-
}
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
}
|
|
521
|
-
], queries: [{ propertyName: "kendoInput", first: true, predicate: KendoInput, descendants: true }, { propertyName: "formControl", first: true, predicate: NgControl, descendants: true }], exportAs: ["kendoFloatingLabel"], ngImport: i0, template: `
|
|
570
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FloatingLabelComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }, { token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
571
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: FloatingLabelComponent, isStandalone: true, selector: "kendo-floatinglabel", inputs: { labelCssStyle: "labelCssStyle", labelCssClass: "labelCssClass", id: "id", text: "text", optional: "optional" }, outputs: { positionChange: "positionChange" }, host: { properties: { "class.k-floating-label-container": "this.hostClasses", "class.k-focus": "this.focusedClass", "class.k-invalid": "this.invalidClass", "attr.dir": "this.direction" } }, providers: [
|
|
572
|
+
LocalizationService,
|
|
573
|
+
{
|
|
574
|
+
provide: L10N_PREFIX,
|
|
575
|
+
useValue: 'kendo.floatinglabel'
|
|
576
|
+
}
|
|
577
|
+
], queries: [{ propertyName: "kendoInput", first: true, predicate: KendoInput, descendants: true }, { propertyName: "formControl", first: true, predicate: NgControl, descendants: true }], exportAs: ["kendoFloatingLabel"], ngImport: i0, template: `
|
|
522
578
|
<ng-container kendoFloatingLabelLocalizedMessages
|
|
523
579
|
i18n-optional="kendo.floatinglabel.optional|The text for the optional segment of a FloatingLabel component"
|
|
524
580
|
optional="Optional"
|
|
@@ -529,7 +585,8 @@ FloatingLabelComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0",
|
|
|
529
585
|
{{ text }}<span *ngIf="optional" class="k-label-optional">({{textFor('optional')}})</span>
|
|
530
586
|
</label>
|
|
531
587
|
`, isInline: true, dependencies: [{ kind: "directive", type: LocalizedMessagesDirective, selector: "\n [kendoLabelLocalizedMessages],\n [kendoFloatingLabelLocalizedMessages]\n " }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] });
|
|
532
|
-
|
|
588
|
+
}
|
|
589
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FloatingLabelComponent, decorators: [{
|
|
533
590
|
type: Component,
|
|
534
591
|
args: [{
|
|
535
592
|
selector: 'kendo-floatinglabel',
|
|
@@ -600,15 +657,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
600
657
|
* ```
|
|
601
658
|
*/
|
|
602
659
|
class LabelComponent {
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
660
|
+
elementRef;
|
|
661
|
+
renderer;
|
|
662
|
+
localization;
|
|
663
|
+
/**
|
|
664
|
+
* @hidden
|
|
665
|
+
*/
|
|
666
|
+
direction;
|
|
667
|
+
/**
|
|
668
|
+
* Specifies the text content of the label which describes the input.
|
|
669
|
+
*/
|
|
670
|
+
text;
|
|
612
671
|
/**
|
|
613
672
|
* Associates the label with a component by a template reference, or with an HTML element by id.
|
|
614
673
|
*/
|
|
@@ -621,6 +680,39 @@ class LabelComponent {
|
|
|
621
680
|
get for() {
|
|
622
681
|
return this._for;
|
|
623
682
|
}
|
|
683
|
+
/**
|
|
684
|
+
* Allows marking a form field as optional. By default renders the `Optional` text when enabled.
|
|
685
|
+
* The text can be customized by providing a custom message ([see example]({% slug label_globalization %}#toc-custom-messages)).
|
|
686
|
+
*
|
|
687
|
+
* The default value is `false`.
|
|
688
|
+
*/
|
|
689
|
+
optional;
|
|
690
|
+
/**
|
|
691
|
+
* Sets the CSS Styles that will be rendered on the actual label element.
|
|
692
|
+
* Supports the type of values that are supported by [ngStyle](link:site.data.urls.angular['ngstyleapi']) directive.
|
|
693
|
+
*/
|
|
694
|
+
labelCssStyle;
|
|
695
|
+
/**
|
|
696
|
+
* Sets the CSS Classes that will be rendered on the actual label element.
|
|
697
|
+
* Supports the type of values that are supported by [ngClass](link:site.data.urls.angular['ngclassapi']) directive.
|
|
698
|
+
*/
|
|
699
|
+
labelCssClass;
|
|
700
|
+
labelDirective;
|
|
701
|
+
kendoInput;
|
|
702
|
+
/**
|
|
703
|
+
* @hidden
|
|
704
|
+
*/
|
|
705
|
+
control;
|
|
706
|
+
subscriptions = new Subscription();
|
|
707
|
+
_for;
|
|
708
|
+
constructor(elementRef, renderer, localization) {
|
|
709
|
+
this.elementRef = elementRef;
|
|
710
|
+
this.renderer = renderer;
|
|
711
|
+
this.localization = localization;
|
|
712
|
+
validatePackage(packageMetadata);
|
|
713
|
+
this.direction = localization.rtl ? 'rtl' : 'ltr';
|
|
714
|
+
this.renderer.removeAttribute(this.elementRef.nativeElement, 'id');
|
|
715
|
+
}
|
|
624
716
|
/**
|
|
625
717
|
* @hidden
|
|
626
718
|
*/
|
|
@@ -666,15 +758,14 @@ class LabelComponent {
|
|
|
666
758
|
textFor(key) {
|
|
667
759
|
return this.localization.get(key);
|
|
668
760
|
}
|
|
669
|
-
}
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
}
|
|
677
|
-
], 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: `
|
|
761
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: LabelComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
762
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: LabelComponent, isStandalone: true, selector: "kendo-label", inputs: { text: "text", for: "for", optional: "optional", labelCssStyle: "labelCssStyle", labelCssClass: "labelCssClass" }, host: { properties: { "attr.dir": "this.direction" } }, providers: [
|
|
763
|
+
LocalizationService,
|
|
764
|
+
{
|
|
765
|
+
provide: L10N_PREFIX,
|
|
766
|
+
useValue: 'kendo.label'
|
|
767
|
+
}
|
|
768
|
+
], 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: `
|
|
678
769
|
<ng-container kendoLabelLocalizedMessages
|
|
679
770
|
i18n-optional="kendo.label.optional|The text for the optional segment of a Label component"
|
|
680
771
|
optional="Optional"
|
|
@@ -690,7 +781,8 @@ LabelComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version
|
|
|
690
781
|
</label>
|
|
691
782
|
<ng-content></ng-content>
|
|
692
783
|
`, isInline: true, dependencies: [{ kind: "directive", type: LocalizedMessagesDirective, selector: "\n [kendoLabelLocalizedMessages],\n [kendoFloatingLabelLocalizedMessages]\n " }, { kind: "directive", type: LabelDirective, selector: "label[for]", inputs: ["for", "labelClass"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
693
|
-
|
|
784
|
+
}
|
|
785
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: LabelComponent, decorators: [{
|
|
694
786
|
type: Component,
|
|
695
787
|
args: [{
|
|
696
788
|
selector: 'kendo-label',
|
|
@@ -747,6 +839,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
747
839
|
* ([see example](slug:label_globalization#toc-internationalization)).
|
|
748
840
|
*/
|
|
749
841
|
class CustomMessagesComponent extends Messages {
|
|
842
|
+
service;
|
|
750
843
|
constructor(service) {
|
|
751
844
|
super();
|
|
752
845
|
this.service = service;
|
|
@@ -754,15 +847,15 @@ class CustomMessagesComponent extends Messages {
|
|
|
754
847
|
get override() {
|
|
755
848
|
return true;
|
|
756
849
|
}
|
|
850
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CustomMessagesComponent, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
851
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: CustomMessagesComponent, isStandalone: true, selector: "kendo-label-messages, kendo-floatinglabel-messages", providers: [
|
|
852
|
+
{
|
|
853
|
+
provide: Messages,
|
|
854
|
+
useExisting: forwardRef(() => CustomMessagesComponent)
|
|
855
|
+
}
|
|
856
|
+
], usesInheritance: true, ngImport: i0, template: ``, isInline: true });
|
|
757
857
|
}
|
|
758
|
-
|
|
759
|
-
CustomMessagesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: CustomMessagesComponent, isStandalone: true, selector: "kendo-label-messages, kendo-floatinglabel-messages", providers: [
|
|
760
|
-
{
|
|
761
|
-
provide: Messages,
|
|
762
|
-
useExisting: forwardRef(() => CustomMessagesComponent)
|
|
763
|
-
}
|
|
764
|
-
], usesInheritance: true, ngImport: i0, template: ``, isInline: true });
|
|
765
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CustomMessagesComponent, decorators: [{
|
|
858
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CustomMessagesComponent, decorators: [{
|
|
766
859
|
type: Component,
|
|
767
860
|
args: [{
|
|
768
861
|
providers: [
|
|
@@ -837,11 +930,11 @@ const KENDO_LABELS = [
|
|
|
837
930
|
* ```
|
|
838
931
|
*/
|
|
839
932
|
class LabelModule {
|
|
933
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: LabelModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
934
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: LabelModule, imports: [LabelDirective, LabelComponent, CustomMessagesComponent, FloatingLabelComponent, CustomMessagesComponent], exports: [LabelDirective, LabelComponent, CustomMessagesComponent, FloatingLabelComponent, CustomMessagesComponent] });
|
|
935
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: LabelModule });
|
|
840
936
|
}
|
|
841
|
-
|
|
842
|
-
LabelModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: LabelModule, imports: [LabelDirective, LabelComponent, CustomMessagesComponent, FloatingLabelComponent, CustomMessagesComponent], exports: [LabelDirective, LabelComponent, CustomMessagesComponent, FloatingLabelComponent, CustomMessagesComponent] });
|
|
843
|
-
LabelModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: LabelModule, imports: [LabelComponent, CustomMessagesComponent, FloatingLabelComponent, CustomMessagesComponent] });
|
|
844
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: LabelModule, decorators: [{
|
|
937
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: LabelModule, decorators: [{
|
|
845
938
|
type: NgModule,
|
|
846
939
|
args: [{
|
|
847
940
|
imports: [...KENDO_LABELS],
|
|
@@ -880,11 +973,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
880
973
|
* ```
|
|
881
974
|
*/
|
|
882
975
|
class FloatingLabelModule {
|
|
976
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FloatingLabelModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
977
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: FloatingLabelModule, imports: [FloatingLabelComponent, CustomMessagesComponent], exports: [FloatingLabelComponent, CustomMessagesComponent] });
|
|
978
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FloatingLabelModule });
|
|
883
979
|
}
|
|
884
|
-
|
|
885
|
-
FloatingLabelModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: FloatingLabelModule, imports: [FloatingLabelComponent, CustomMessagesComponent], exports: [FloatingLabelComponent, CustomMessagesComponent] });
|
|
886
|
-
FloatingLabelModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: FloatingLabelModule, imports: [KENDO_FLOATINGLABEL] });
|
|
887
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: FloatingLabelModule, decorators: [{
|
|
980
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FloatingLabelModule, decorators: [{
|
|
888
981
|
type: NgModule,
|
|
889
982
|
args: [{
|
|
890
983
|
exports: [...KENDO_FLOATINGLABEL],
|
|
@@ -109,5 +109,5 @@ export declare class FloatingLabelComponent implements AfterContentInit, OnDestr
|
|
|
109
109
|
private addHandlers;
|
|
110
110
|
private validateSetup;
|
|
111
111
|
static ɵfac: i0.ɵɵFactoryDeclaration<FloatingLabelComponent, never>;
|
|
112
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<FloatingLabelComponent, "kendo-floatinglabel", ["kendoFloatingLabel"], { "labelCssStyle": "labelCssStyle"; "labelCssClass": "labelCssClass"; "id": "id"; "text": "text"; "optional": "optional"; }, { "positionChange": "positionChange"; }, ["kendoInput", "formControl"], ["*"], true, never>;
|
|
112
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FloatingLabelComponent, "kendo-floatinglabel", ["kendoFloatingLabel"], { "labelCssStyle": { "alias": "labelCssStyle"; "required": false; }; "labelCssClass": { "alias": "labelCssClass"; "required": false; }; "id": { "alias": "id"; "required": false; }; "text": { "alias": "text"; "required": false; }; "optional": { "alias": "optional"; "required": false; }; }, { "positionChange": "positionChange"; }, ["kendoInput", "formControl"], ["*"], true, never>;
|
|
113
113
|
}
|
|
@@ -84,5 +84,5 @@ export declare class LabelComponent implements AfterContentInit {
|
|
|
84
84
|
*/
|
|
85
85
|
textFor(key: string): string;
|
|
86
86
|
static ɵfac: i0.ɵɵFactoryDeclaration<LabelComponent, never>;
|
|
87
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<LabelComponent, "kendo-label", ["kendoLabel"], { "text": "text"; "for": "for"; "optional": "optional"; "labelCssStyle": "labelCssStyle"; "labelCssClass": "labelCssClass"; }, {}, ["kendoInput"], ["*"], true, never>;
|
|
87
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<LabelComponent, "kendo-label", ["kendoLabel"], { "text": { "alias": "text"; "required": false; }; "for": { "alias": "for"; "required": false; }; "optional": { "alias": "optional"; "required": false; }; "labelCssStyle": { "alias": "labelCssStyle"; "required": false; }; "labelCssClass": { "alias": "labelCssClass"; "required": false; }; }, {}, ["kendoInput"], ["*"], true, never>;
|
|
88
88
|
}
|
package/label.directive.d.ts
CHANGED
|
@@ -71,5 +71,5 @@ export declare class LabelDirective {
|
|
|
71
71
|
private getFocusableComponent;
|
|
72
72
|
private handleClick;
|
|
73
73
|
static ɵfac: i0.ɵɵFactoryDeclaration<LabelDirective, never>;
|
|
74
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<LabelDirective, "label[for]", never, { "for": "for"; "labelClass": "labelClass"; }, {}, never, never, true, never>;
|
|
74
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<LabelDirective, "label[for]", never, { "for": { "alias": "for"; "required": false; }; "labelClass": { "alias": "labelClass"; "required": false; }; }, {}, never, never, true, never>;
|
|
75
75
|
}
|
|
@@ -13,5 +13,5 @@ export declare class Messages extends ComponentMessages {
|
|
|
13
13
|
*/
|
|
14
14
|
optional: string;
|
|
15
15
|
static ɵfac: i0.ɵɵFactoryDeclaration<Messages, never>;
|
|
16
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<Messages, "kendo-label-messages-base", never, { "optional": "optional"; }, {}, never, never, false, never>;
|
|
16
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<Messages, "kendo-label-messages-base", never, { "optional": { "alias": "optional"; "required": false; }; }, {}, never, never, false, never>;
|
|
17
17
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-angular-label",
|
|
3
|
-
"version": "17.0.
|
|
3
|
+
"version": "17.0.1-develop.1",
|
|
4
4
|
"description": "Kendo UI Label for Angular",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"author": "Progress",
|
|
@@ -18,26 +18,22 @@
|
|
|
18
18
|
"friendlyName": "Label"
|
|
19
19
|
},
|
|
20
20
|
"peerDependencies": {
|
|
21
|
-
"@angular/animations": "
|
|
22
|
-
"@angular/common": "
|
|
23
|
-
"@angular/core": "
|
|
24
|
-
"@angular/forms": "
|
|
25
|
-
"@angular/platform-browser": "
|
|
21
|
+
"@angular/animations": "16 - 18",
|
|
22
|
+
"@angular/common": "16 - 18",
|
|
23
|
+
"@angular/core": "16 - 18",
|
|
24
|
+
"@angular/forms": "16 - 18",
|
|
25
|
+
"@angular/platform-browser": "16 - 18",
|
|
26
26
|
"@progress/kendo-licensing": "^1.0.2",
|
|
27
|
-
"@progress/kendo-angular-common": "17.0.
|
|
28
|
-
"@progress/kendo-angular-l10n": "17.0.
|
|
27
|
+
"@progress/kendo-angular-common": "17.0.1-develop.1",
|
|
28
|
+
"@progress/kendo-angular-l10n": "17.0.1-develop.1",
|
|
29
29
|
"rxjs": "^6.5.3 || ^7.0.0"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"tslib": "^2.3.1",
|
|
33
|
-
"@progress/kendo-angular-schematics": "17.0.
|
|
33
|
+
"@progress/kendo-angular-schematics": "17.0.1-develop.1"
|
|
34
34
|
},
|
|
35
35
|
"schematics": "./schematics/collection.json",
|
|
36
|
-
"module": "
|
|
37
|
-
"es2020": "fesm2020/progress-kendo-angular-label.mjs",
|
|
38
|
-
"esm2020": "esm2020/progress-kendo-angular-label.mjs",
|
|
39
|
-
"fesm2020": "fesm2020/progress-kendo-angular-label.mjs",
|
|
40
|
-
"fesm2015": "fesm2015/progress-kendo-angular-label.mjs",
|
|
36
|
+
"module": "fesm2022/progress-kendo-angular-label.mjs",
|
|
41
37
|
"typings": "index.d.ts",
|
|
42
38
|
"exports": {
|
|
43
39
|
"./package.json": {
|
|
@@ -45,11 +41,9 @@
|
|
|
45
41
|
},
|
|
46
42
|
".": {
|
|
47
43
|
"types": "./index.d.ts",
|
|
48
|
-
"
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
-
"node": "./fesm2015/progress-kendo-angular-label.mjs",
|
|
52
|
-
"default": "./fesm2020/progress-kendo-angular-label.mjs"
|
|
44
|
+
"esm2022": "./esm2022/progress-kendo-angular-label.mjs",
|
|
45
|
+
"esm": "./esm2022/progress-kendo-angular-label.mjs",
|
|
46
|
+
"default": "./fesm2022/progress-kendo-angular-label.mjs"
|
|
53
47
|
}
|
|
54
48
|
},
|
|
55
49
|
"sideEffects": false
|