@progress/kendo-angular-buttons 8.0.1-dev.202208111121 → 8.1.0

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,15 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the project root for more information
4
+ *-------------------------------------------------------------------------------------------*/
5
+ import { TemplateRef, ViewContainerRef } from '@angular/core';
6
+ import * as i0 from "@angular/core";
7
+ /**
8
+ * @hidden
9
+ */
10
+ export declare class PopupContainerService {
11
+ container: ViewContainerRef;
12
+ template: TemplateRef<any>;
13
+ static ɵfac: i0.ɵɵFactoryDeclaration<PopupContainerService, never>;
14
+ static ɵprov: i0.ɵɵInjectableDeclaration<PopupContainerService>;
15
+ }
@@ -2,7 +2,7 @@
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 { EventEmitter, ElementRef, OnDestroy, NgZone, ChangeDetectorRef } from '@angular/core';
5
+ import { EventEmitter, ElementRef, OnDestroy, NgZone, ChangeDetectorRef, SimpleChanges } from '@angular/core';
6
6
  import { Subscription } from 'rxjs';
7
7
  import { PopupSettings } from './popup-settings';
8
8
  import { FocusService } from './../focusable/focus.service';
@@ -10,6 +10,9 @@ import { KeyEvents } from './../navigation/key-events';
10
10
  import { NavigationService } from './../navigation/navigation.service';
11
11
  import { LocalizationService } from '@progress/kendo-angular-l10n';
12
12
  import { Direction } from '../direction';
13
+ import { PreventableEvent } from '../preventable-event';
14
+ import { Align, PopupRef, PopupService } from '@progress/kendo-angular-popup';
15
+ import { PopupContainerService } from './container.service';
13
16
  import * as i0 from "@angular/core";
14
17
  /**
15
18
  * @hidden
@@ -19,7 +22,10 @@ export declare class ListButton implements OnDestroy {
19
22
  protected navigationService: NavigationService;
20
23
  protected wrapperRef: ElementRef;
21
24
  private _zone;
25
+ private popupService;
26
+ private elRef;
22
27
  protected cdr: ChangeDetectorRef;
28
+ protected containerService: PopupContainerService;
23
29
  protected _data: any;
24
30
  protected _open: boolean;
25
31
  protected _disabled: boolean;
@@ -33,12 +39,69 @@ export declare class ListButton implements OnDestroy {
33
39
  protected button: ElementRef;
34
40
  protected subs: Subscription;
35
41
  protected direction: Direction;
36
- protected focusFirstTimeout: any;
37
- protected blurTimeout: any;
38
- constructor(focusService: FocusService, navigationService: NavigationService, wrapperRef: ElementRef, _zone: NgZone, localization: LocalizationService, cdr: ChangeDetectorRef);
42
+ protected popupRef: PopupRef;
43
+ private popupSubs;
44
+ /**
45
+ * Sets the disabled state of the DropDownButton.
46
+ */
47
+ set disabled(value: boolean);
48
+ get disabled(): boolean;
49
+ /**
50
+ * Specifies the [`tabIndex`](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex) of the component.
51
+ */
52
+ tabIndex: number;
53
+ /**
54
+ * The CSS classes that will be rendered on the main button.
55
+ * Supports the type of values that are supported by [`ngClass`]({{ site.data.urls.angular['ngclassapi'] }}).
56
+ */
57
+ buttonClass: any;
58
+ /**
59
+ * Fires each time the popup is about to open.
60
+ * This event is preventable. If you cancel the event, the popup will remain closed.
61
+ */
62
+ open: EventEmitter<PreventableEvent>;
63
+ /**
64
+ * Fires each time the popup is about to close.
65
+ * This event is preventable. If you cancel the event, the popup will remain open.
66
+ */
67
+ close: EventEmitter<PreventableEvent>;
68
+ /**
69
+ * @hidden
70
+ */
71
+ get componentTabIndex(): number;
72
+ private get appendTo();
73
+ /**
74
+ * Configures the popup of the DropDownButton.
75
+ *
76
+ * The available options are:
77
+ * - `animate: Boolean`&mdash;Controls the popup animation. By default, the open and close animations are enabled.
78
+ * - `popupClass: String`&mdash;Specifies a list of CSS classes that are used to style the popup.
79
+ * - `appendTo: "root" | "component" | ViewContainerRef`&mdash;Specifies the component to which the popup will be appended.
80
+ * - `align: "left" | "center" | "right"`&mdash;Specifies the alignment of the popup.
81
+ */
82
+ set popupSettings(settings: PopupSettings);
83
+ get popupSettings(): PopupSettings;
84
+ /**
85
+ * @hidden
86
+ */
87
+ get anchorAlign(): Align;
88
+ /**
89
+ * @hidden
90
+ */
91
+ get popupAlign(): Align;
92
+ protected isClosePrevented: boolean;
93
+ constructor(focusService: FocusService, navigationService: NavigationService, wrapperRef: ElementRef, _zone: NgZone, popupService: PopupService, elRef: ElementRef, localization: LocalizationService, cdr: ChangeDetectorRef, containerService: PopupContainerService);
94
+ ngOnChanges(changes: SimpleChanges): void;
39
95
  get popupClasses(): string;
40
96
  get openState(): boolean;
97
+ /**
98
+ * @hidden
99
+ */
41
100
  set openState(open: boolean);
101
+ /**
102
+ * Returns the current open state of the popup.
103
+ */
104
+ get isOpen(): boolean;
42
105
  /**
43
106
  * @hidden
44
107
  */
@@ -52,15 +115,17 @@ export declare class ListButton implements OnDestroy {
52
115
  protected subscribeListItemFocusEvent(): void;
53
116
  protected subscribeComponentBlurredEvent(): void;
54
117
  protected subscribeNavigationEvents(): void;
55
- protected enterHandler(): void;
56
118
  /**
57
- * @hidden
119
+ * Toggles the visibility of the popup.
120
+ * If the `toggle` method is used to open or close the popup, the `open` and `close` events will not be fired.
121
+ *
122
+ * @param open - The state of the popup.
58
123
  */
59
- keyDownHandler(event: any): void;
124
+ toggle(open: boolean): void;
60
125
  /**
61
126
  * @hidden
62
127
  */
63
- keyPressHandler(event: any): void;
128
+ keyDownHandler(event: any): void;
64
129
  /**
65
130
  * @hidden
66
131
  */
@@ -70,12 +135,20 @@ export declare class ListButton implements OnDestroy {
70
135
  */
71
136
  keyHandler(event: any, keyEvent?: KeyEvents): void;
72
137
  protected emitItemClickHandler(index: number): void;
73
- protected focusFirstItem(): void;
74
138
  protected focusWrapper(): void;
75
139
  protected wrapperContains(element: any): boolean;
76
140
  protected blurWrapper(emit?: boolean): void;
77
141
  protected focusButton(): void;
78
142
  protected handleTab(): void;
143
+ protected onNavigationEnterUp(): void;
144
+ protected onNavigationOpen(): void;
145
+ protected onNavigationClose(): void;
146
+ protected onArrowKeyNavigate({ index }: {
147
+ index: any;
148
+ }): void;
149
+ private _toggle;
150
+ private createPopup;
151
+ private destroyPopup;
79
152
  static ɵfac: i0.ɵɵFactoryDeclaration<ListButton, never>;
80
- static ɵcmp: i0.ɵɵComponentDeclaration<ListButton, "ng-component", never, {}, {}, never, never>;
153
+ static ɵcmp: i0.ɵɵComponentDeclaration<ListButton, "ng-component", never, { "disabled": "disabled"; "tabIndex": "tabIndex"; "buttonClass": "buttonClass"; "popupSettings": "popupSettings"; }, { "open": "open"; "close": "close"; }, never, never>;
81
154
  }
@@ -21,7 +21,7 @@ export declare class NavigationService {
21
21
  useLeftRightArrows: boolean;
22
22
  constructor(config: NavigationConfig);
23
23
  process(args: any): NavigationAction;
24
- private isEnter;
24
+ private isEnterOrSpace;
25
25
  private next;
26
26
  static ɵfac: i0.ɵɵFactoryDeclaration<NavigationService, never>;
27
27
  static ɵprov: i0.ɵɵInjectableDeclaration<NavigationService>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@progress/kendo-angular-buttons",
3
- "version": "8.0.1-dev.202208111121",
3
+ "version": "8.1.0",
4
4
  "description": "Buttons Package for Angular",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "author": "Progress",
@@ -12,6 +12,7 @@ import { FocusService } from './../focusable/focus.service';
12
12
  import { NavigationService } from './../navigation/navigation.service';
13
13
  import { PreventableEvent } from '../preventable-event';
14
14
  import { ButtonFillMode, ButtonRounded, ButtonSize, ButtonThemeColor } from '../common/models';
15
+ import { PopupContainerService } from '../listbutton/container.service';
15
16
  import * as i0 from "@angular/core";
16
17
  /**
17
18
  * Represents the Kendo UI SplitButton component for Angular.
@@ -55,8 +56,6 @@ import * as i0 from "@angular/core";
55
56
  * ```
56
57
  */
57
58
  export declare class SplitButtonComponent extends ListButton implements AfterViewInit, OnChanges {
58
- private popupService;
59
- private elRef;
60
59
  private localization;
61
60
  private renderer;
62
61
  /**
@@ -267,14 +266,6 @@ export declare class SplitButtonComponent extends ListButton implements AfterVie
267
266
  activeArrow: boolean;
268
267
  popupRef: PopupRef;
269
268
  listId: string;
270
- /**
271
- * @hidden
272
- */
273
- set openState(open: boolean);
274
- /**
275
- * @hidden
276
- */
277
- get openState(): boolean;
278
269
  /**
279
270
  * @hidden
280
271
  */
@@ -284,10 +275,9 @@ export declare class SplitButtonComponent extends ListButton implements AfterVie
284
275
  */
285
276
  get componentTabIndex(): number;
286
277
  private buttonText;
287
- private lockFocus;
278
+ private arrowButtonClicked;
288
279
  private _rounded;
289
280
  private _fillMode;
290
- private popupSubs;
291
281
  set isFocused(value: boolean);
292
282
  get isFocused(): boolean;
293
283
  get widgetClasses(): boolean;
@@ -299,7 +289,7 @@ export declare class SplitButtonComponent extends ListButton implements AfterVie
299
289
  /**
300
290
  * @hidden
301
291
  */
302
- onButtonFocus(): void;
292
+ onButtonFocus(event: FocusEvent): void;
303
293
  /**
304
294
  * @hidden
305
295
  */
@@ -324,10 +314,6 @@ export declare class SplitButtonComponent extends ListButton implements AfterVie
324
314
  * @hidden
325
315
  */
326
316
  keydown(event: any): void;
327
- /**
328
- * @hidden
329
- */
330
- keypress(event: any): void;
331
317
  /**
332
318
  * @hidden
333
319
  */
@@ -340,6 +326,10 @@ export declare class SplitButtonComponent extends ListButton implements AfterVie
340
326
  * @hidden
341
327
  */
342
328
  ngOnChanges(changes: SimpleChanges): void;
329
+ /**
330
+ * @hidden
331
+ */
332
+ protected onNavigationEnterUp(args?: any): void;
343
333
  /**
344
334
  * @hidden
345
335
  */
@@ -364,25 +354,12 @@ export declare class SplitButtonComponent extends ListButton implements AfterVie
364
354
  * Blurs the SplitButton component.
365
355
  */
366
356
  blur(): void;
367
- constructor(focusService: FocusService, navigationService: NavigationService, wrapperRef: ElementRef, zone: NgZone, popupService: PopupService, elRef: ElementRef, localization: LocalizationService, cdr: ChangeDetectorRef, renderer: Renderer2);
368
- ngOnDestroy(): void;
369
- /**
370
- * Toggles the visibility of the popup.
371
- * If the `toggle` method is used to open or close the popup, the `open` and `close` events will not be fired.
372
- *
373
- * @param open - The state of the popup.
374
- */
375
- toggle(open: boolean): void;
357
+ constructor(focusService: FocusService, navigationService: NavigationService, wrapperRef: ElementRef, zone: NgZone, popupService: PopupService, elRef: ElementRef, localization: LocalizationService, cdr: ChangeDetectorRef, renderer: Renderer2, containerService: PopupContainerService);
376
358
  /**
377
359
  * Returns the current open state of the popup.
378
360
  */
379
361
  get isOpen(): boolean;
380
- protected enterHandler(): void;
381
362
  private updateButtonText;
382
- private get appendTo();
383
- private _toggle;
384
- private createPopup;
385
- private destroyPopup;
386
363
  private handleClasses;
387
364
  static ɵfac: i0.ɵɵFactoryDeclaration<SplitButtonComponent, never>;
388
365
  static ɵcmp: i0.ɵɵComponentDeclaration<SplitButtonComponent, "kendo-splitbutton", ["kendoSplitButton"], { "text": "text"; "icon": "icon"; "iconClass": "iconClass"; "type": "type"; "imageUrl": "imageUrl"; "size": "size"; "rounded": "rounded"; "fillMode": "fillMode"; "themeColor": "themeColor"; "disabled": "disabled"; "popupSettings": "popupSettings"; "tabIndex": "tabIndex"; "textField": "textField"; "data": "data"; "buttonClass": "buttonClass"; "arrowButtonClass": "arrowButtonClass"; "arrowButtonIcon": "arrowButtonIcon"; }, { "buttonClick": "buttonClick"; "itemClick": "itemClick"; "onFocus": "focus"; "onBlur": "blur"; "open": "open"; "close": "close"; }, ["itemTemplate"], ["*"]>;