@progress/kendo-angular-listbox 21.4.1 → 22.0.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.
@@ -1,32 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2026 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- import { NgModule } from '@angular/core';
6
- import { KENDO_LISTBOX } from './directives';
7
- import { IconsService } from '@progress/kendo-angular-icons';
8
- import { PopupService } from '@progress/kendo-angular-popup';
9
- import { ResizeBatchService } from '@progress/kendo-angular-common';
10
- import * as i0 from "@angular/core";
11
- import * as i1 from "./listbox.component";
12
- import * as i2 from "./item-template.directive";
13
- import * as i3 from "./item-selectable.directive";
14
- import * as i4 from "./data-binding.directive";
15
- import * as i5 from "./localization/custom-messages.component";
16
- //IMPORTANT: NgModule export kept for backwards compatibility
17
- /**
18
- * Represents the [NgModule](https://angular.io/api/core/NgModule) definition for the ListBox component.
19
- */
20
- export class ListBoxModule {
21
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ListBoxModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
22
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.14", ngImport: i0, type: ListBoxModule, imports: [i1.ListBoxComponent, i2.ItemTemplateDirective, i3.ItemSelectableDirective, i4.DataBindingDirective, i5.CustomMessagesComponent], exports: [i1.ListBoxComponent, i2.ItemTemplateDirective, i3.ItemSelectableDirective, i4.DataBindingDirective, i5.CustomMessagesComponent] });
23
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ListBoxModule, providers: [IconsService, PopupService, ResizeBatchService], imports: [i1.ListBoxComponent] });
24
- }
25
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ListBoxModule, decorators: [{
26
- type: NgModule,
27
- args: [{
28
- imports: [...KENDO_LISTBOX],
29
- exports: [...KENDO_LISTBOX],
30
- providers: [IconsService, PopupService, ResizeBatchService]
31
- }]
32
- }] });
@@ -1,58 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2026 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- import { 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
- * Provides custom messages that override the default component messages
12
- * ([see example](slug:globalization_listbox#toc-custom-messages)).
13
- *
14
- * @example
15
- * ```typescript
16
- * @Component({
17
- * selector: 'my-app',
18
- * template: `
19
- * <kendo-listbox-messages
20
- * transferAllTo="Transfer All To"
21
- * transferAllFrom="Transfer All From">
22
- * </kendo-listbox-messages>
23
- * `
24
- * })
25
- * export class AppComponent { }
26
- * ```
27
- */
28
- export class CustomMessagesComponent extends Messages {
29
- service;
30
- constructor(service) {
31
- super();
32
- this.service = service;
33
- }
34
- get override() {
35
- return true;
36
- }
37
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CustomMessagesComponent, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
38
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: CustomMessagesComponent, isStandalone: true, selector: "kendo-listbox-messages", providers: [
39
- {
40
- provide: Messages,
41
- useExisting: forwardRef(() => CustomMessagesComponent)
42
- }
43
- ], usesInheritance: true, ngImport: i0, template: ``, isInline: true });
44
- }
45
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CustomMessagesComponent, decorators: [{
46
- type: Component,
47
- args: [{
48
- providers: [
49
- {
50
- provide: Messages,
51
- useExisting: forwardRef(() => CustomMessagesComponent)
52
- }
53
- ],
54
- selector: 'kendo-listbox-messages',
55
- template: ``,
56
- standalone: true
57
- }]
58
- }], ctorParameters: () => [{ type: i1.LocalizationService }] });
@@ -1,39 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2026 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- import { 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
- service;
15
- constructor(service) {
16
- super();
17
- this.service = service;
18
- }
19
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: LocalizedMessagesDirective, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Directive });
20
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: LocalizedMessagesDirective, isStandalone: true, selector: "[kendoListBoxLocalizedMessages]", providers: [
21
- {
22
- provide: Messages,
23
- useExisting: forwardRef(() => LocalizedMessagesDirective)
24
- }
25
- ], usesInheritance: true, ngImport: i0 });
26
- }
27
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: LocalizedMessagesDirective, decorators: [{
28
- type: Directive,
29
- args: [{
30
- providers: [
31
- {
32
- provide: Messages,
33
- useExisting: forwardRef(() => LocalizedMessagesDirective)
34
- }
35
- ],
36
- selector: '[kendoListBoxLocalizedMessages]',
37
- standalone: true
38
- }]
39
- }], ctorParameters: () => [{ type: i1.LocalizationService }] });
@@ -1,66 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2026 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- import { 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
- * The text of the `Move Up` button title.
15
- */
16
- moveUp;
17
- /**
18
- * The text of the `Move Down` button title.
19
- */
20
- moveDown;
21
- /**
22
- * The text of the `Remove` button tittle.
23
- */
24
- remove;
25
- /**
26
- * The text of the `Transfer To` button title.
27
- */
28
- transferTo;
29
- /**
30
- * The text of the `Transfer From` button title.
31
- */
32
- transferFrom;
33
- /**
34
- * The text of the `Transfer All To` button title.
35
- */
36
- transferAllTo;
37
- /**
38
- * The text of the `Transfer All From` button title.
39
- */
40
- transferAllFrom;
41
- /**
42
- * The text displayed when there are no items.
43
- */
44
- noDataText;
45
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: Messages, deps: null, target: i0.ɵɵFactoryTarget.Directive });
46
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: Messages, inputs: { moveUp: "moveUp", moveDown: "moveDown", remove: "remove", transferTo: "transferTo", transferFrom: "transferFrom", transferAllTo: "transferAllTo", transferAllFrom: "transferAllFrom", noDataText: "noDataText" }, usesInheritance: true, ngImport: i0 });
47
- }
48
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: Messages, decorators: [{
49
- type: Directive
50
- }], propDecorators: { moveUp: [{
51
- type: Input
52
- }], moveDown: [{
53
- type: Input
54
- }], remove: [{
55
- type: Input
56
- }], transferTo: [{
57
- type: Input
58
- }], transferFrom: [{
59
- type: Input
60
- }], transferAllTo: [{
61
- type: Input
62
- }], transferAllFrom: [{
63
- type: Input
64
- }], noDataText: [{
65
- type: Input
66
- }] } });
@@ -1,16 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2026 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- /**
6
- * @hidden
7
- */
8
- export const packageMetadata = {
9
- name: '@progress/kendo-angular-listbox',
10
- productName: 'Kendo UI for Angular',
11
- productCode: 'KENDOUIANGULAR',
12
- productCodes: ['KENDOUIANGULAR'],
13
- publishDate: 1768393337,
14
- version: '21.4.1',
15
- 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'
16
- };
@@ -1,8 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2026 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- /**
6
- * Generated bundle index. Do not edit.
7
- */
8
- export * from './index';
@@ -1,5 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2026 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- export {};
@@ -1,166 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2026 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- import { EventEmitter, Injectable } from "@angular/core";
6
- import * as i0 from "@angular/core";
7
- /**
8
- * @hidden
9
- */
10
- export class ListBoxSelectionService {
11
- selectedIndices = [];
12
- selectionMode = 'single';
13
- lastSelectedOrUnselectedIndex = null;
14
- rangeSelectionTargetIndex = null;
15
- rangeSelectionAnchorIndex = null;
16
- isItemDisabled = () => false;
17
- onSelect = new EventEmitter();
18
- select(index, ctrlKey = false, shiftKey = false) {
19
- if (this.isItemDisabled(index)) {
20
- return;
21
- }
22
- const previousSelection = [...this.selectedIndices];
23
- let selectedIndices = [];
24
- let deselectedIndices = null;
25
- const previousTargetIndex = this.rangeSelectionTargetIndex;
26
- if (this.selectionMode === 'single') {
27
- if (ctrlKey) {
28
- const isSelected = this.isSelected(index);
29
- if (isSelected) {
30
- this.selectedIndices = [];
31
- deselectedIndices = [index];
32
- }
33
- else {
34
- this.selectedIndices = [index];
35
- selectedIndices = [index];
36
- if (previousSelection.length > 0) {
37
- deselectedIndices = previousSelection;
38
- }
39
- }
40
- this.lastSelectedOrUnselectedIndex = index;
41
- }
42
- else {
43
- this.selectedIndices = [index];
44
- selectedIndices = [index];
45
- this.lastSelectedOrUnselectedIndex = index;
46
- this.rangeSelectionAnchorIndex = index;
47
- if (previousSelection.length > 0 && previousSelection[0] !== index) {
48
- deselectedIndices = previousSelection;
49
- }
50
- }
51
- }
52
- else if (this.selectionMode === 'multiple') {
53
- if (shiftKey) {
54
- let anchorIndex = this.rangeSelectionAnchorIndex ?? this.lastSelectedOrUnselectedIndex ?? 0;
55
- if (index === anchorIndex) {
56
- this.selectedIndices = [anchorIndex];
57
- this.rangeSelectionTargetIndex = index;
58
- selectedIndices = this.selectedIndices.filter(i => !previousSelection.includes(i));
59
- const nowDeselected = previousSelection.filter(i => !this.selectedIndices.includes(i));
60
- deselectedIndices = nowDeselected.length > 0 ? nowDeselected : null;
61
- }
62
- else {
63
- if (previousTargetIndex !== null && previousTargetIndex !== anchorIndex) {
64
- const previousDirection = previousTargetIndex > anchorIndex ? 'down' : 'up';
65
- const currentDirection = index > anchorIndex ? 'down' : 'up';
66
- if (previousDirection !== currentDirection) {
67
- this.rangeSelectionAnchorIndex = previousTargetIndex;
68
- anchorIndex = previousTargetIndex;
69
- }
70
- }
71
- const startIndex = Math.min(anchorIndex, index);
72
- const endIndex = Math.max(anchorIndex, index);
73
- this.selectedIndices = [];
74
- for (let i = startIndex; i <= endIndex; i++) {
75
- if (!this.isItemDisabled(i)) {
76
- this.selectedIndices.push(i);
77
- }
78
- }
79
- this.rangeSelectionTargetIndex = index;
80
- selectedIndices = this.selectedIndices.filter(i => !previousSelection.includes(i));
81
- const nowDeselected = previousSelection.filter(i => !this.selectedIndices.includes(i));
82
- deselectedIndices = nowDeselected.length > 0 ? nowDeselected : null;
83
- }
84
- }
85
- else if (ctrlKey) {
86
- const indexInSelection = this.selectedIndices.indexOf(index);
87
- if (indexInSelection === -1) {
88
- this.selectedIndices.push(index);
89
- selectedIndices = [index];
90
- }
91
- else {
92
- this.selectedIndices.splice(indexInSelection, 1);
93
- deselectedIndices = [index];
94
- }
95
- this.lastSelectedOrUnselectedIndex = index;
96
- this.rangeSelectionAnchorIndex = index;
97
- this.rangeSelectionTargetIndex = index;
98
- }
99
- else {
100
- this.selectedIndices = [index];
101
- selectedIndices = [index];
102
- this.lastSelectedOrUnselectedIndex = index;
103
- this.rangeSelectionAnchorIndex = index;
104
- this.rangeSelectionTargetIndex = index;
105
- const nowDeselected = previousSelection.filter(i => i !== index);
106
- deselectedIndices = nowDeselected.length > 0 ? nowDeselected : null;
107
- }
108
- }
109
- this.onSelect.next({
110
- selectedIndices: selectedIndices.length > 0 ? selectedIndices : null,
111
- deselectedIndices
112
- });
113
- }
114
- selectRange(targetIndex) {
115
- const anchorIndex = this.lastSelectedOrUnselectedIndex ?? 0;
116
- const startIndex = Math.min(anchorIndex, targetIndex);
117
- const endIndex = Math.max(anchorIndex, targetIndex);
118
- this.selectedIndices = [];
119
- for (let i = startIndex; i <= endIndex; i++) {
120
- if (!this.isItemDisabled(i)) {
121
- this.selectedIndices.push(i);
122
- }
123
- }
124
- }
125
- setSelectedIndices(indices) {
126
- this.selectedIndices = indices.filter(i => !this.isItemDisabled(i));
127
- }
128
- addToSelectedIndices(index) {
129
- if (this.isItemDisabled(index)) {
130
- return;
131
- }
132
- if (this.selectionMode === 'single') {
133
- this.selectedIndices = [index];
134
- }
135
- else if (this.selectedIndices.indexOf(index) === -1) {
136
- this.selectedIndices = [...this.selectedIndices, index];
137
- }
138
- }
139
- selectAll(totalItems) {
140
- if (this.selectionMode === 'multiple') {
141
- this.selectedIndices = [];
142
- for (let i = 0; i < totalItems; i++) {
143
- if (!this.isItemDisabled(i)) {
144
- this.selectedIndices.push(i);
145
- }
146
- }
147
- }
148
- }
149
- areAllSelected(totalItems) {
150
- const allSelectableItems = Array.from({ length: totalItems }, (_, i) => i).filter(i => !this.isItemDisabled(i));
151
- return this.selectedIndices.length === allSelectableItems.length && allSelectableItems.length > 0;
152
- }
153
- isSelected(index) {
154
- return this.selectedIndices.indexOf(index) !== -1;
155
- }
156
- clearSelection() {
157
- this.selectedIndices = [];
158
- this.lastSelectedOrUnselectedIndex = null;
159
- this.rangeSelectionAnchorIndex = null;
160
- }
161
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ListBoxSelectionService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
162
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ListBoxSelectionService });
163
- }
164
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ListBoxSelectionService, decorators: [{
165
- type: Injectable
166
- }] });
package/esm2022/size.mjs DELETED
@@ -1,5 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2026 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- export {};
@@ -1,5 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2026 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- export {};
package/esm2022/util.mjs DELETED
@@ -1,38 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2026 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- import { getter } from '@progress/kendo-common';
6
- import { allTools } from './constants';
7
- /**
8
- * @hidden
9
- */
10
- export const isPresent = (value) => value !== null && value !== undefined;
11
- /**
12
- * @hidden
13
- */
14
- export const isObject = (value) => isPresent(value) && typeof value === 'object';
15
- /**
16
- * @hidden
17
- */
18
- export const fieldAccessor = (dataItem, field) => {
19
- if (!isPresent(dataItem)) {
20
- return null;
21
- }
22
- if (!isPresent(field) || !isObject(dataItem)) {
23
- return dataItem;
24
- }
25
- // creates a field accessor supporting nested fields processing
26
- const valueFrom = getter(field);
27
- return valueFrom(dataItem);
28
- };
29
- /**
30
- * @hidden
31
- */
32
- export const defaultItemDisabled = () => false;
33
- /**
34
- * @hidden
35
- */
36
- export const getTools = (names) => {
37
- return names.map(tool => allTools.find(meta => meta.name === tool));
38
- };