@progress/kendo-angular-listbox 11.4.1-develop.8 → 11.5.0-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/esm2020/index.mjs +2 -0
- package/esm2020/listbox.component.mjs +107 -28
- package/esm2020/listbox.module.mjs +23 -3
- package/esm2020/localization/custom-messages.component.mjs +42 -0
- package/esm2020/localization/localized-messages.directive.mjs +37 -0
- package/esm2020/localization/messages.mjs +32 -0
- package/esm2020/package-metadata.mjs +2 -2
- package/fesm2015/progress-kendo-angular-listbox.mjs +218 -34
- package/fesm2020/progress-kendo-angular-listbox.mjs +218 -34
- package/index.d.ts +2 -0
- package/listbox.component.d.ts +8 -2
- package/listbox.module.d.ts +9 -7
- package/localization/custom-messages.component.d.ts +18 -0
- package/localization/localized-messages.directive.d.ts +16 -0
- package/localization/messages.d.ts +41 -0
- package/package.json +5 -5
- package/schematics/ngAdd/index.js +4 -4
package/esm2020/index.mjs
CHANGED
|
@@ -7,3 +7,5 @@ export { ListBoxModule } from './listbox.module';
|
|
|
7
7
|
export { DataBindingDirective } from './data-binding.directive';
|
|
8
8
|
export { ItemTemplateDirective } from './item-template.directive';
|
|
9
9
|
export { ItemSelectableDirective } from './item-selectable.directive';
|
|
10
|
+
export { CustomMessagesComponent } from './localization/custom-messages.component';
|
|
11
|
+
export { LocalizedMessagesDirective } from "./localization/localized-messages.directive";
|
|
@@ -14,24 +14,28 @@ import { defaultItemDisabled, fieldAccessor, getTools } from './util';
|
|
|
14
14
|
import { allTools, DEFAULT_TOOLBAR_POSITION, sizeClassMap, actionsClasses } from './constants';
|
|
15
15
|
import { KeyboardNavigationService } from './keyboard-navigation.service';
|
|
16
16
|
import { take } from 'rxjs/operators';
|
|
17
|
+
import { L10N_PREFIX, LocalizationService } from '@progress/kendo-angular-l10n';
|
|
17
18
|
import * as i0 from "@angular/core";
|
|
18
19
|
import * as i1 from "./keyboard-navigation.service";
|
|
19
20
|
import * as i2 from "./selection.service";
|
|
20
|
-
import * as i3 from "@progress/kendo-angular-
|
|
21
|
-
import * as i4 from "@angular
|
|
22
|
-
import * as i5 from "./
|
|
21
|
+
import * as i3 from "@progress/kendo-angular-l10n";
|
|
22
|
+
import * as i4 from "@progress/kendo-angular-buttons";
|
|
23
|
+
import * as i5 from "./localization/localized-messages.directive";
|
|
24
|
+
import * as i6 from "@angular/common";
|
|
25
|
+
import * as i7 from "./item-selectable.directive";
|
|
23
26
|
const DEFAULT_SIZE = 'medium';
|
|
24
27
|
let idx = 0;
|
|
25
28
|
/**
|
|
26
29
|
* Represents the [Kendo UI ListBox component for Angular]({% slug overview_listbox %}).
|
|
27
30
|
*/
|
|
28
31
|
export class ListBoxComponent {
|
|
29
|
-
constructor(keyboardNavigationService, selectionService, hostElement, renderer, zone) {
|
|
32
|
+
constructor(keyboardNavigationService, selectionService, hostElement, renderer, zone, localization) {
|
|
30
33
|
this.keyboardNavigationService = keyboardNavigationService;
|
|
31
34
|
this.selectionService = selectionService;
|
|
32
35
|
this.hostElement = hostElement;
|
|
33
36
|
this.renderer = renderer;
|
|
34
37
|
this.zone = zone;
|
|
38
|
+
this.localization = localization;
|
|
35
39
|
/**
|
|
36
40
|
* @hidden
|
|
37
41
|
*/
|
|
@@ -113,6 +117,12 @@ export class ListBoxComponent {
|
|
|
113
117
|
get listClasses() {
|
|
114
118
|
return `k-list k-list-${sizeClassMap[this.size]}`;
|
|
115
119
|
}
|
|
120
|
+
/**
|
|
121
|
+
* @hidden
|
|
122
|
+
*/
|
|
123
|
+
messageFor(key) {
|
|
124
|
+
return this.localization.get(key);
|
|
125
|
+
}
|
|
116
126
|
ngOnInit() {
|
|
117
127
|
// This event emitter gives us the connectedWith value from the DataBinding directive
|
|
118
128
|
this.getChildListbox.emit();
|
|
@@ -180,13 +190,12 @@ export class ListBoxComponent {
|
|
|
180
190
|
}
|
|
181
191
|
/**
|
|
182
192
|
* @hidden
|
|
183
|
-
|
|
193
|
+
*/
|
|
184
194
|
get getListboxId() {
|
|
185
195
|
const id = ++idx;
|
|
186
196
|
const listboxId = `k-listbox-${id}`;
|
|
187
197
|
return listboxId;
|
|
188
198
|
}
|
|
189
|
-
;
|
|
190
199
|
/**
|
|
191
200
|
* @hidden
|
|
192
201
|
*/
|
|
@@ -209,7 +218,10 @@ export class ListBoxComponent {
|
|
|
209
218
|
*/
|
|
210
219
|
swapItems(firstItemIndex, secondItemIndex) {
|
|
211
220
|
const listboxItems = this.keyboardNavigationService.listboxItems;
|
|
212
|
-
[listboxItems[firstItemIndex], listboxItems[secondItemIndex]] = [
|
|
221
|
+
[listboxItems[firstItemIndex], listboxItems[secondItemIndex]] = [
|
|
222
|
+
listboxItems[secondItemIndex],
|
|
223
|
+
listboxItems[firstItemIndex],
|
|
224
|
+
];
|
|
213
225
|
}
|
|
214
226
|
onClickEvent(listboxItems, prevIndex, currentIndex, dir) {
|
|
215
227
|
this.selectionChange.next(currentIndex);
|
|
@@ -225,7 +237,7 @@ export class ListBoxComponent {
|
|
|
225
237
|
}
|
|
226
238
|
initSubscriptions(navService, hostEl, toolsRef) {
|
|
227
239
|
this.subs.add(navService.onDeleteEvent.subscribe((index) => this.onDeleteEvent(index, navService)));
|
|
228
|
-
this.subs.add(this.renderer.listen(hostEl, 'keydown', event => navService.onKeyDown(event, toolsRef, this.selectedTools, this.childListbox, this.parentListbox)));
|
|
240
|
+
this.subs.add(this.renderer.listen(hostEl, 'keydown', (event) => navService.onKeyDown(event, toolsRef, this.selectedTools, this.childListbox, this.parentListbox)));
|
|
229
241
|
this.subs.add(this.renderer.listen(this.listboxElement.nativeElement, 'focusin', () => navService.onFocusIn()));
|
|
230
242
|
this.subs.add(navService.onShiftSelectedItem.subscribe((actionToPerform) => this.onShiftItems(actionToPerform)));
|
|
231
243
|
this.subs.add(navService.onTransferAllEvent.subscribe((actionToPerform) => this.onShiftItems(actionToPerform)));
|
|
@@ -282,8 +294,9 @@ export class ListBoxComponent {
|
|
|
282
294
|
this.selectionService.selectedIndex = index;
|
|
283
295
|
this.performAction('remove');
|
|
284
296
|
this.updateListboxItems();
|
|
285
|
-
const setIndex = index + 1 === navService.listboxItems.length
|
|
286
|
-
{ index: index - 1, tabindex: index - 1 }
|
|
297
|
+
const setIndex = index + 1 === navService.listboxItems.length
|
|
298
|
+
? { index: index - 1, tabindex: index - 1 }
|
|
299
|
+
: { index, tabindex: index + 1 };
|
|
287
300
|
navService.changeTabindex(null, navService.listboxItems[setIndex['tabindex']]);
|
|
288
301
|
this.selectionChange.next({ index: setIndex['index'], prevIndex: null });
|
|
289
302
|
navService.selectedListboxItemIndex = setIndex['index'];
|
|
@@ -304,8 +317,39 @@ export class ListBoxComponent {
|
|
|
304
317
|
this.renderer.addClass(this.hostElement.nativeElement, `k-listbox-${sizeClassMap[size]}`);
|
|
305
318
|
}
|
|
306
319
|
}
|
|
307
|
-
ListBoxComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: ListBoxComponent, deps: [{ token: i1.KeyboardNavigationService }, { token: i2.ListBoxSelectionService }, { token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
|
|
308
|
-
ListBoxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: ListBoxComponent, selector: "kendo-listbox", inputs: { textField: "textField", data: "data", size: "size", toolbar: "toolbar", listboxLabel: "listboxLabel", listboxToolbarLabel: "listboxToolbarLabel", itemDisabled: "itemDisabled" }, outputs: { selectionChange: "selectionChange", actionClick: "actionClick", getChildListbox: "getChildListbox" }, host: { properties: { "class.k-listbox": "this.listboxClassName" } }, providers: [
|
|
320
|
+
ListBoxComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: ListBoxComponent, deps: [{ token: i1.KeyboardNavigationService }, { token: i2.ListBoxSelectionService }, { token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.NgZone }, { token: i3.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
321
|
+
ListBoxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: ListBoxComponent, selector: "kendo-listbox", inputs: { textField: "textField", data: "data", size: "size", toolbar: "toolbar", listboxLabel: "listboxLabel", listboxToolbarLabel: "listboxToolbarLabel", itemDisabled: "itemDisabled" }, outputs: { selectionChange: "selectionChange", actionClick: "actionClick", getChildListbox: "getChildListbox" }, host: { properties: { "class.k-listbox": "this.listboxClassName" } }, providers: [
|
|
322
|
+
ListBoxSelectionService,
|
|
323
|
+
KeyboardNavigationService,
|
|
324
|
+
LocalizationService,
|
|
325
|
+
{
|
|
326
|
+
provide: L10N_PREFIX,
|
|
327
|
+
useValue: 'kendo.listbox'
|
|
328
|
+
},
|
|
329
|
+
], queries: [{ propertyName: "itemTemplate", first: true, predicate: ItemTemplateDirective, descendants: true }], viewQueries: [{ propertyName: "listboxElement", first: true, predicate: ["listbox"], descendants: true }, { propertyName: "toolbarElement", first: true, predicate: ["toolbar"], descendants: true }, { propertyName: "tools", predicate: ["tools"], descendants: true }], ngImport: i0, template: `
|
|
330
|
+
<ng-container kendoListBoxLocalizedMessages
|
|
331
|
+
i18n-moveUp="kendo.listbox.moveUp|The title of the Move Up button"
|
|
332
|
+
moveUp="Move Up"
|
|
333
|
+
|
|
334
|
+
i18n-moveDown="kendo.listbox.moveDown|The title of the Move Down button"
|
|
335
|
+
moveDown="Move Down"
|
|
336
|
+
|
|
337
|
+
i18n-transferTo="kendo.listbox.transferTo|The title of the Transfer To button"
|
|
338
|
+
transferTo="Transfer To"
|
|
339
|
+
|
|
340
|
+
i18n-transferAllTo="kendo.listbox.transferAllTo|The title of the Transfer All To button"
|
|
341
|
+
transferAllTo="Transfer All To"
|
|
342
|
+
|
|
343
|
+
i18n-transferFrom="kendo.listbox.transferFrom|The title of the Transfer From button"
|
|
344
|
+
transferFrom="Transfer From"
|
|
345
|
+
|
|
346
|
+
i18n-transferAllFrom="kendo.listbox.transferAllFrom|The title of the Transfer All From button"
|
|
347
|
+
transferAllFrom="Transfer All From"
|
|
348
|
+
|
|
349
|
+
i18n-remove="kendo.listbox.remove|The title of the Remove button"
|
|
350
|
+
remove="Remove"
|
|
351
|
+
>
|
|
352
|
+
</ng-container>
|
|
309
353
|
<div
|
|
310
354
|
#toolbar
|
|
311
355
|
class="k-listbox-actions"
|
|
@@ -315,13 +359,13 @@ ListBoxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", versi
|
|
|
315
359
|
>
|
|
316
360
|
<button
|
|
317
361
|
#tools
|
|
318
|
-
*ngFor="let tool of selectedTools; let i = index
|
|
362
|
+
*ngFor="let tool of selectedTools; let i = index"
|
|
319
363
|
kendoButton
|
|
320
364
|
[attr.tabindex]="i === 0 ? '0' : '-1'"
|
|
321
365
|
[size]="this.size"
|
|
322
366
|
[icon]="tool.icon"
|
|
323
367
|
[svgIcon]="tool.svgIcon"
|
|
324
|
-
[attr.title]="tool.
|
|
368
|
+
[attr.title]="messageFor(tool.name)"
|
|
325
369
|
(click)="performAction(tool.name)"
|
|
326
370
|
role="button"
|
|
327
371
|
></button>
|
|
@@ -329,7 +373,7 @@ ListBoxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", versi
|
|
|
329
373
|
<div class="k-list-scroller k-selectable">
|
|
330
374
|
<div class="{{ listClasses }}">
|
|
331
375
|
<div class="k-list-content">
|
|
332
|
-
<ul
|
|
376
|
+
<ul
|
|
333
377
|
#listbox
|
|
334
378
|
class="k-list-ul"
|
|
335
379
|
role="listbox"
|
|
@@ -337,7 +381,7 @@ ListBoxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", versi
|
|
|
337
381
|
[attr.aria-multiselectable]="false"
|
|
338
382
|
>
|
|
339
383
|
<li
|
|
340
|
-
*ngFor="let item of data; let i = index
|
|
384
|
+
*ngFor="let item of data; let i = index"
|
|
341
385
|
kendoListBoxItemSelectable
|
|
342
386
|
class="k-list-item"
|
|
343
387
|
[attr.tabindex]="i === 0 ? '0' : '-1'"
|
|
@@ -346,11 +390,13 @@ ListBoxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", versi
|
|
|
346
390
|
[index]="i"
|
|
347
391
|
[class.k-disabled]="itemDisabled(item)"
|
|
348
392
|
>
|
|
349
|
-
<ng-template
|
|
393
|
+
<ng-template
|
|
394
|
+
*ngIf="itemTemplate; else defaultItemTemplate"
|
|
350
395
|
[templateContext]="{
|
|
351
396
|
templateRef: itemTemplate.templateRef,
|
|
352
397
|
$implicit: item
|
|
353
|
-
}"
|
|
398
|
+
}"
|
|
399
|
+
>
|
|
354
400
|
</ng-template>
|
|
355
401
|
<ng-template #defaultItemTemplate>
|
|
356
402
|
<span class="k-list-item-text">{{ getText(item) }}</span>
|
|
@@ -360,13 +406,44 @@ ListBoxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", versi
|
|
|
360
406
|
</div>
|
|
361
407
|
</div>
|
|
362
408
|
</div>
|
|
363
|
-
`, isInline: true, components: [{ type:
|
|
409
|
+
`, isInline: true, components: [{ type: i4.Button, selector: "button[kendoButton], span[kendoButton], kendo-button", inputs: ["toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "role", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }], directives: [{ type: i5.LocalizedMessagesDirective, selector: "[kendoListBoxLocalizedMessages]" }, { type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i7.ItemSelectableDirective, selector: "[kendoListBoxItemSelectable]", inputs: ["index"] }, { type: i4.TemplateContextDirective, selector: "[templateContext]", inputs: ["templateContext"] }] });
|
|
364
410
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: ListBoxComponent, decorators: [{
|
|
365
411
|
type: Component,
|
|
366
412
|
args: [{
|
|
367
413
|
selector: 'kendo-listbox',
|
|
368
|
-
providers: [
|
|
414
|
+
providers: [
|
|
415
|
+
ListBoxSelectionService,
|
|
416
|
+
KeyboardNavigationService,
|
|
417
|
+
LocalizationService,
|
|
418
|
+
{
|
|
419
|
+
provide: L10N_PREFIX,
|
|
420
|
+
useValue: 'kendo.listbox'
|
|
421
|
+
},
|
|
422
|
+
],
|
|
369
423
|
template: `
|
|
424
|
+
<ng-container kendoListBoxLocalizedMessages
|
|
425
|
+
i18n-moveUp="kendo.listbox.moveUp|The title of the Move Up button"
|
|
426
|
+
moveUp="Move Up"
|
|
427
|
+
|
|
428
|
+
i18n-moveDown="kendo.listbox.moveDown|The title of the Move Down button"
|
|
429
|
+
moveDown="Move Down"
|
|
430
|
+
|
|
431
|
+
i18n-transferTo="kendo.listbox.transferTo|The title of the Transfer To button"
|
|
432
|
+
transferTo="Transfer To"
|
|
433
|
+
|
|
434
|
+
i18n-transferAllTo="kendo.listbox.transferAllTo|The title of the Transfer All To button"
|
|
435
|
+
transferAllTo="Transfer All To"
|
|
436
|
+
|
|
437
|
+
i18n-transferFrom="kendo.listbox.transferFrom|The title of the Transfer From button"
|
|
438
|
+
transferFrom="Transfer From"
|
|
439
|
+
|
|
440
|
+
i18n-transferAllFrom="kendo.listbox.transferAllFrom|The title of the Transfer All From button"
|
|
441
|
+
transferAllFrom="Transfer All From"
|
|
442
|
+
|
|
443
|
+
i18n-remove="kendo.listbox.remove|The title of the Remove button"
|
|
444
|
+
remove="Remove"
|
|
445
|
+
>
|
|
446
|
+
</ng-container>
|
|
370
447
|
<div
|
|
371
448
|
#toolbar
|
|
372
449
|
class="k-listbox-actions"
|
|
@@ -376,13 +453,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
376
453
|
>
|
|
377
454
|
<button
|
|
378
455
|
#tools
|
|
379
|
-
*ngFor="let tool of selectedTools; let i = index
|
|
456
|
+
*ngFor="let tool of selectedTools; let i = index"
|
|
380
457
|
kendoButton
|
|
381
458
|
[attr.tabindex]="i === 0 ? '0' : '-1'"
|
|
382
459
|
[size]="this.size"
|
|
383
460
|
[icon]="tool.icon"
|
|
384
461
|
[svgIcon]="tool.svgIcon"
|
|
385
|
-
[attr.title]="tool.
|
|
462
|
+
[attr.title]="messageFor(tool.name)"
|
|
386
463
|
(click)="performAction(tool.name)"
|
|
387
464
|
role="button"
|
|
388
465
|
></button>
|
|
@@ -390,7 +467,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
390
467
|
<div class="k-list-scroller k-selectable">
|
|
391
468
|
<div class="{{ listClasses }}">
|
|
392
469
|
<div class="k-list-content">
|
|
393
|
-
<ul
|
|
470
|
+
<ul
|
|
394
471
|
#listbox
|
|
395
472
|
class="k-list-ul"
|
|
396
473
|
role="listbox"
|
|
@@ -398,7 +475,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
398
475
|
[attr.aria-multiselectable]="false"
|
|
399
476
|
>
|
|
400
477
|
<li
|
|
401
|
-
*ngFor="let item of data; let i = index
|
|
478
|
+
*ngFor="let item of data; let i = index"
|
|
402
479
|
kendoListBoxItemSelectable
|
|
403
480
|
class="k-list-item"
|
|
404
481
|
[attr.tabindex]="i === 0 ? '0' : '-1'"
|
|
@@ -407,11 +484,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
407
484
|
[index]="i"
|
|
408
485
|
[class.k-disabled]="itemDisabled(item)"
|
|
409
486
|
>
|
|
410
|
-
<ng-template
|
|
487
|
+
<ng-template
|
|
488
|
+
*ngIf="itemTemplate; else defaultItemTemplate"
|
|
411
489
|
[templateContext]="{
|
|
412
490
|
templateRef: itemTemplate.templateRef,
|
|
413
491
|
$implicit: item
|
|
414
|
-
}"
|
|
492
|
+
}"
|
|
493
|
+
>
|
|
415
494
|
</ng-template>
|
|
416
495
|
<ng-template #defaultItemTemplate>
|
|
417
496
|
<span class="k-list-item-text">{{ getText(item) }}</span>
|
|
@@ -421,9 +500,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
421
500
|
</div>
|
|
422
501
|
</div>
|
|
423
502
|
</div>
|
|
424
|
-
|
|
503
|
+
`,
|
|
425
504
|
}]
|
|
426
|
-
}], ctorParameters: function () { return [{ type: i1.KeyboardNavigationService }, { type: i2.ListBoxSelectionService }, { type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.NgZone }]; }, propDecorators: { listboxClassName: [{
|
|
505
|
+
}], ctorParameters: function () { return [{ type: i1.KeyboardNavigationService }, { type: i2.ListBoxSelectionService }, { type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.NgZone }, { type: i3.LocalizationService }]; }, propDecorators: { listboxClassName: [{
|
|
427
506
|
type: HostBinding,
|
|
428
507
|
args: ['class.k-listbox']
|
|
429
508
|
}], itemTemplate: [{
|
|
@@ -9,20 +9,40 @@ import { CommonModule } from '@angular/common';
|
|
|
9
9
|
import { ItemTemplateDirective } from './item-template.directive';
|
|
10
10
|
import { ItemSelectableDirective } from './item-selectable.directive';
|
|
11
11
|
import { DataBindingDirective } from './data-binding.directive';
|
|
12
|
+
import { CustomMessagesComponent } from './localization/custom-messages.component';
|
|
13
|
+
import { LocalizedMessagesDirective } from './localization/localized-messages.directive';
|
|
12
14
|
import * as i0 from "@angular/core";
|
|
15
|
+
const declarationsExports = [
|
|
16
|
+
LocalizedMessagesDirective,
|
|
17
|
+
ListBoxComponent,
|
|
18
|
+
ItemTemplateDirective,
|
|
19
|
+
ItemSelectableDirective,
|
|
20
|
+
DataBindingDirective,
|
|
21
|
+
CustomMessagesComponent,
|
|
22
|
+
];
|
|
13
23
|
/**
|
|
14
24
|
* Represents the [NgModule](https://angular.io/api/core/NgModule) definition for the ListBox component.
|
|
15
25
|
*/
|
|
16
26
|
export class ListBoxModule {
|
|
17
27
|
}
|
|
18
28
|
ListBoxModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: ListBoxModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
19
|
-
ListBoxModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: ListBoxModule, declarations: [
|
|
29
|
+
ListBoxModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: ListBoxModule, declarations: [LocalizedMessagesDirective,
|
|
30
|
+
ListBoxComponent,
|
|
31
|
+
ItemTemplateDirective,
|
|
32
|
+
ItemSelectableDirective,
|
|
33
|
+
DataBindingDirective,
|
|
34
|
+
CustomMessagesComponent], imports: [ButtonsModule, CommonModule], exports: [LocalizedMessagesDirective,
|
|
35
|
+
ListBoxComponent,
|
|
36
|
+
ItemTemplateDirective,
|
|
37
|
+
ItemSelectableDirective,
|
|
38
|
+
DataBindingDirective,
|
|
39
|
+
CustomMessagesComponent] });
|
|
20
40
|
ListBoxModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: ListBoxModule, imports: [[ButtonsModule, CommonModule]] });
|
|
21
41
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: ListBoxModule, decorators: [{
|
|
22
42
|
type: NgModule,
|
|
23
43
|
args: [{
|
|
24
44
|
imports: [ButtonsModule, CommonModule],
|
|
25
|
-
declarations: [
|
|
26
|
-
exports: [
|
|
45
|
+
declarations: [declarationsExports],
|
|
46
|
+
exports: [declarationsExports]
|
|
27
47
|
}]
|
|
28
48
|
}] });
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**-----------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright © 2023 Progress Software Corporation. All rights reserved.
|
|
3
|
+
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
+
*-------------------------------------------------------------------------------------------*/
|
|
5
|
+
import { Component, forwardRef } from '@angular/core';
|
|
6
|
+
import { LocalizationService } from '@progress/kendo-angular-l10n';
|
|
7
|
+
import { Messages } from './messages';
|
|
8
|
+
import * as i0 from "@angular/core";
|
|
9
|
+
import * as i1 from "@progress/kendo-angular-l10n";
|
|
10
|
+
/**
|
|
11
|
+
* Custom component messages override default component messages
|
|
12
|
+
* ([see example]({% slug globalization_listbox %}#toc-localization)).
|
|
13
|
+
*/
|
|
14
|
+
export class CustomMessagesComponent extends Messages {
|
|
15
|
+
constructor(service) {
|
|
16
|
+
super();
|
|
17
|
+
this.service = service;
|
|
18
|
+
}
|
|
19
|
+
get override() {
|
|
20
|
+
return true;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
CustomMessagesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: CustomMessagesComponent, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
24
|
+
CustomMessagesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: CustomMessagesComponent, selector: "kendo-listbox-messages", providers: [
|
|
25
|
+
{
|
|
26
|
+
provide: Messages,
|
|
27
|
+
useExisting: forwardRef(() => CustomMessagesComponent)
|
|
28
|
+
}
|
|
29
|
+
], usesInheritance: true, ngImport: i0, template: ``, isInline: true });
|
|
30
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: CustomMessagesComponent, decorators: [{
|
|
31
|
+
type: Component,
|
|
32
|
+
args: [{
|
|
33
|
+
providers: [
|
|
34
|
+
{
|
|
35
|
+
provide: Messages,
|
|
36
|
+
useExisting: forwardRef(() => CustomMessagesComponent)
|
|
37
|
+
}
|
|
38
|
+
],
|
|
39
|
+
selector: 'kendo-listbox-messages',
|
|
40
|
+
template: ``
|
|
41
|
+
}]
|
|
42
|
+
}], ctorParameters: function () { return [{ type: i1.LocalizationService }]; } });
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**-----------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright © 2023 Progress Software Corporation. All rights reserved.
|
|
3
|
+
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
+
*-------------------------------------------------------------------------------------------*/
|
|
5
|
+
import { Directive, forwardRef } from '@angular/core';
|
|
6
|
+
import { LocalizationService } from '@progress/kendo-angular-l10n';
|
|
7
|
+
import { Messages } from './messages';
|
|
8
|
+
import * as i0 from "@angular/core";
|
|
9
|
+
import * as i1 from "@progress/kendo-angular-l10n";
|
|
10
|
+
/**
|
|
11
|
+
* @hidden
|
|
12
|
+
*/
|
|
13
|
+
export class LocalizedMessagesDirective extends Messages {
|
|
14
|
+
constructor(service) {
|
|
15
|
+
super();
|
|
16
|
+
this.service = service;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
LocalizedMessagesDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: LocalizedMessagesDirective, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
20
|
+
LocalizedMessagesDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.12", type: LocalizedMessagesDirective, selector: "[kendoListBoxLocalizedMessages]", providers: [
|
|
21
|
+
{
|
|
22
|
+
provide: Messages,
|
|
23
|
+
useExisting: forwardRef(() => LocalizedMessagesDirective)
|
|
24
|
+
}
|
|
25
|
+
], usesInheritance: true, ngImport: i0 });
|
|
26
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: LocalizedMessagesDirective, decorators: [{
|
|
27
|
+
type: Directive,
|
|
28
|
+
args: [{
|
|
29
|
+
providers: [
|
|
30
|
+
{
|
|
31
|
+
provide: Messages,
|
|
32
|
+
useExisting: forwardRef(() => LocalizedMessagesDirective)
|
|
33
|
+
}
|
|
34
|
+
],
|
|
35
|
+
selector: '[kendoListBoxLocalizedMessages]'
|
|
36
|
+
}]
|
|
37
|
+
}], ctorParameters: function () { return [{ type: i1.LocalizationService }]; } });
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**-----------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright © 2023 Progress Software Corporation. All rights reserved.
|
|
3
|
+
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
+
*-------------------------------------------------------------------------------------------*/
|
|
5
|
+
import { Directive } from '@angular/core';
|
|
6
|
+
import { Input } from '@angular/core';
|
|
7
|
+
import { ComponentMessages } from '@progress/kendo-angular-l10n';
|
|
8
|
+
import * as i0 from "@angular/core";
|
|
9
|
+
/**
|
|
10
|
+
* @hidden
|
|
11
|
+
*/
|
|
12
|
+
export class Messages extends ComponentMessages {
|
|
13
|
+
}
|
|
14
|
+
Messages.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: Messages, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
15
|
+
Messages.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.12", type: Messages, inputs: { moveUp: "moveUp", moveDown: "moveDown", remove: "remove", transferTo: "transferTo", transferFrom: "transferFrom", transferAllTo: "transferAllTo", transferAllFrom: "transferAllFrom" }, usesInheritance: true, ngImport: i0 });
|
|
16
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: Messages, decorators: [{
|
|
17
|
+
type: Directive
|
|
18
|
+
}], propDecorators: { moveUp: [{
|
|
19
|
+
type: Input
|
|
20
|
+
}], moveDown: [{
|
|
21
|
+
type: Input
|
|
22
|
+
}], remove: [{
|
|
23
|
+
type: Input
|
|
24
|
+
}], transferTo: [{
|
|
25
|
+
type: Input
|
|
26
|
+
}], transferFrom: [{
|
|
27
|
+
type: Input
|
|
28
|
+
}], transferAllTo: [{
|
|
29
|
+
type: Input
|
|
30
|
+
}], transferAllFrom: [{
|
|
31
|
+
type: Input
|
|
32
|
+
}] } });
|
|
@@ -9,7 +9,7 @@ export const packageMetadata = {
|
|
|
9
9
|
name: '@progress/kendo-angular-listbox',
|
|
10
10
|
productName: 'Kendo UI for Angular',
|
|
11
11
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
12
|
-
publishDate:
|
|
13
|
-
version: '11.
|
|
12
|
+
publishDate: 1680021017,
|
|
13
|
+
version: '11.5.0-develop.1',
|
|
14
14
|
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'
|
|
15
15
|
};
|