@progress/kendo-angular-listbox 11.4.0-develop.6 → 11.4.0-develop.7

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.
@@ -0,0 +1,41 @@
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 { EventEmitter, NgZone, Renderer2 } from "@angular/core";
6
+ import { Button } from "@progress/kendo-angular-buttons";
7
+ import { ListBoxComponent } from "./listbox.component";
8
+ import { ActionName, Tool } from "./toolbar";
9
+ import * as i0 from "@angular/core";
10
+ /**
11
+ * @hidden
12
+ */
13
+ export declare class KeyboardNavigationService {
14
+ private renderer;
15
+ private zone;
16
+ listboxItems: Array<HTMLElement>;
17
+ selectedListboxItemIndex: number;
18
+ focusedListboxItemIndex: number;
19
+ focusedToolIndex: number;
20
+ onDeleteEvent: EventEmitter<number>;
21
+ onSelectionChange: EventEmitter<number>;
22
+ onMoveSelectedItem: EventEmitter<string>;
23
+ onTransferAllEvent: EventEmitter<ActionName>;
24
+ onShiftSelectedItem: EventEmitter<ActionName>;
25
+ constructor(renderer: Renderer2, zone: NgZone);
26
+ onKeyDown(event: any, toolsRef: Array<Button>, toolbar: Tool[], childListbox: ListBoxComponent, parentListbox: ListBoxComponent): void;
27
+ changeTabindex(previousItem: HTMLElement, currentItem: HTMLElement): void;
28
+ onFocusIn(): void;
29
+ private handleToolbarArrows;
30
+ private onArrowUpOrDown;
31
+ private onArrowLeftOrRight;
32
+ private onSelectChange;
33
+ private onF10Key;
34
+ private transferAllItems;
35
+ private transferItem;
36
+ private changeFocusedItem;
37
+ private onArrowDown;
38
+ private onArrowUp;
39
+ static ɵfac: i0.ɵɵFactoryDeclaration<KeyboardNavigationService, never>;
40
+ static ɵprov: i0.ɵɵInjectableDeclaration<KeyboardNavigationService>;
41
+ }
@@ -2,19 +2,23 @@
2
2
  * Copyright © 2023 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 { ElementRef, EventEmitter, OnDestroy, Renderer2 } from '@angular/core';
5
+ import { AfterViewInit, ElementRef, EventEmitter, NgZone, OnDestroy, OnInit, QueryList, Renderer2 } from '@angular/core';
6
6
  import { ListBoxSelectionEvent, ListBoxSelectionService } from './selection.service';
7
7
  import { ItemTemplateDirective } from './item-template.directive';
8
8
  import { ListBoxSize } from './size';
9
9
  import { ActionName, ListBoxToolbarConfig, Tool } from './toolbar';
10
+ import { Button } from '@progress/kendo-angular-buttons';
11
+ import { KeyboardNavigationService } from './keyboard-navigation.service';
10
12
  import * as i0 from "@angular/core";
11
13
  /**
12
14
  * Represents the [Kendo UI ListBox component for Angular]({% slug overview_listbox %}).
13
15
  */
14
- export declare class ListBoxComponent implements OnDestroy {
16
+ export declare class ListBoxComponent implements OnInit, AfterViewInit, OnDestroy {
17
+ keyboardNavigationService: KeyboardNavigationService;
15
18
  selectionService: ListBoxSelectionService;
16
- private renderer;
17
19
  private hostElement;
20
+ private renderer;
21
+ private zone;
18
22
  /**
19
23
  * @hidden
20
24
  */
@@ -23,6 +27,18 @@ export declare class ListBoxComponent implements OnDestroy {
23
27
  * @hidden
24
28
  */
25
29
  itemTemplate: ItemTemplateDirective;
30
+ /**
31
+ * @hidden
32
+ */
33
+ listboxElement: ElementRef;
34
+ /**
35
+ * @hidden
36
+ */
37
+ toolbarElement: ElementRef;
38
+ /**
39
+ * @hidden
40
+ */
41
+ tools: QueryList<Button>;
26
42
  /**
27
43
  * The fields of the data item that provide the text content of the nodes.
28
44
  */
@@ -45,6 +61,14 @@ export declare class ListBoxComponent implements OnDestroy {
45
61
  * Sets whether a toolbar should be displayed with the ListBox, as well as what tools and position should be used.
46
62
  */
47
63
  set toolbar(config: ListBoxToolbarConfig);
64
+ /**
65
+ * The value of the aria-label attribute of the Listbox element.
66
+ */
67
+ listboxLabel: string;
68
+ /**
69
+ * The value of the aria-label attribute of the Listbox toolbar element.
70
+ */
71
+ listboxToolbarLabel: string;
48
72
  /**
49
73
  * A function which determines if a specific item is disabled.
50
74
  */
@@ -57,6 +81,10 @@ export declare class ListBoxComponent implements OnDestroy {
57
81
  * Fires when the user clicks a ListBox item.
58
82
  */
59
83
  actionClick: EventEmitter<ActionName>;
84
+ /**
85
+ * @hidden
86
+ */
87
+ getChildListbox: EventEmitter<any>;
60
88
  /**
61
89
  * @hidden
62
90
  */
@@ -65,12 +93,27 @@ export declare class ListBoxComponent implements OnDestroy {
65
93
  * @hidden
66
94
  */
67
95
  selectedTools: Tool[];
68
- private _size;
69
- private sub;
70
- constructor(selectionService: ListBoxSelectionService, renderer: Renderer2, hostElement: ElementRef);
71
96
  /**
72
97
  * @hidden
73
98
  */
99
+ listboxId: string;
100
+ /**
101
+ * @hidden
102
+ */
103
+ toolbarId: string;
104
+ /**
105
+ * @hidden
106
+ */
107
+ childListbox: ListBoxComponent;
108
+ /**
109
+ * @hidden
110
+ */
111
+ parentListbox: ListBoxComponent;
112
+ private _size;
113
+ private subs;
114
+ constructor(keyboardNavigationService: KeyboardNavigationService, selectionService: ListBoxSelectionService, hostElement: ElementRef, renderer: Renderer2, zone: NgZone);
115
+ ngOnInit(): void;
116
+ ngAfterViewInit(): void;
74
117
  ngOnDestroy(): void;
75
118
  /**
76
119
  * @hidden
@@ -88,12 +131,29 @@ export declare class ListBoxComponent implements OnDestroy {
88
131
  * The index of the currently selected item in the ListBox.
89
132
  */
90
133
  get selectedIndex(): number;
134
+ /**
135
+ * @hidden
136
+ */
137
+ get getListboxId(): string;
91
138
  /**
92
139
  * @hidden
93
140
  */
94
141
  getText(dataItem: any): string;
142
+ /**
143
+ * @hidden
144
+ */
145
+ updateListboxItems(): void;
146
+ /**
147
+ * @hidden
148
+ */
149
+ swapItems(firstItemIndex: number, secondItemIndex: number): void;
150
+ private onClickEvent;
151
+ private initSubscriptions;
152
+ private onShiftItems;
153
+ private setIds;
154
+ private onDeleteEvent;
95
155
  private setToolbarClass;
96
156
  private setSizingClass;
97
157
  static ɵfac: i0.ɵɵFactoryDeclaration<ListBoxComponent, never>;
98
- static ɵcmp: i0.ɵɵComponentDeclaration<ListBoxComponent, "kendo-listbox", never, { "textField": "textField"; "data": "data"; "size": "size"; "toolbar": "toolbar"; "itemDisabled": "itemDisabled"; }, { "selectionChange": "selectionChange"; "actionClick": "actionClick"; }, ["itemTemplate"], never>;
158
+ static ɵcmp: i0.ɵɵComponentDeclaration<ListBoxComponent, "kendo-listbox", never, { "textField": "textField"; "data": "data"; "size": "size"; "toolbar": "toolbar"; "listboxLabel": "listboxLabel"; "listboxToolbarLabel": "listboxToolbarLabel"; "itemDisabled": "itemDisabled"; }, { "selectionChange": "selectionChange"; "actionClick": "actionClick"; "getChildListbox": "getChildListbox"; }, ["itemTemplate"], never>;
99
159
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@progress/kendo-angular-listbox",
3
- "version": "11.4.0-develop.6",
3
+ "version": "11.4.0-develop.7",
4
4
  "description": "Kendo UI for Angular ListBox",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "author": "Progress",
@@ -23,14 +23,14 @@
23
23
  "@angular/core": "13 - 15",
24
24
  "@angular/platform-browser": "13 - 15",
25
25
  "@progress/kendo-licensing": "^1.0.2",
26
- "@progress/kendo-angular-buttons": "11.4.0-develop.6",
27
- "@progress/kendo-angular-common": "11.4.0-develop.6",
28
- "@progress/kendo-angular-popup": "11.4.0-develop.6",
26
+ "@progress/kendo-angular-buttons": "11.4.0-develop.7",
27
+ "@progress/kendo-angular-common": "11.4.0-develop.7",
28
+ "@progress/kendo-angular-popup": "11.4.0-develop.7",
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": "11.4.0-develop.6",
33
+ "@progress/kendo-angular-schematics": "11.4.0-develop.7",
34
34
  "@progress/kendo-common": "^0.2.2"
35
35
  },
36
36
  "schematics": "./schematics/collection.json",
@@ -6,11 +6,11 @@ function default_1(options) {
6
6
  // Additional dependencies to install.
7
7
  // See https://github.com/telerik/kendo-schematics/issues/28
8
8
  peerDependencies: {
9
- '@progress/kendo-angular-buttons': '11.4.0-develop.6',
10
- '@progress/kendo-angular-common': '11.4.0-develop.6',
11
- '@progress/kendo-angular-l10n': '11.4.0-develop.6',
9
+ '@progress/kendo-angular-buttons': '11.4.0-develop.7',
10
+ '@progress/kendo-angular-common': '11.4.0-develop.7',
11
+ '@progress/kendo-angular-l10n': '11.4.0-develop.7',
12
12
  // Peer of kendo-angular-buttons
13
- '@progress/kendo-angular-popup': '11.4.0-develop.6'
13
+ '@progress/kendo-angular-popup': '11.4.0-develop.7'
14
14
  } });
15
15
  return (0, schematics_1.externalSchematic)('@progress/kendo-angular-schematics', 'ng-add', finalOptions);
16
16
  }
@@ -9,14 +9,15 @@ import * as i0 from "@angular/core";
9
9
  */
10
10
  export interface ListBoxSelectionEvent {
11
11
  index: number;
12
+ prevIndex: number;
12
13
  }
13
14
  /**
14
15
  * @hidden
15
16
  */
16
17
  export declare class ListBoxSelectionService {
17
- onSelect: EventEmitter<ListBoxSelectionEvent>;
18
+ onSelect: EventEmitter<any>;
18
19
  selectedIndex: number;
19
- select(index: number): void;
20
+ select(index: number, dir?: string): void;
20
21
  isSelected(index: number): boolean;
21
22
  clearSelection(): void;
22
23
  static ɵfac: i0.ɵɵFactoryDeclaration<ListBoxSelectionService, never>;