@progress/kendo-angular-buttons 21.4.1-develop.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.
- package/fesm2022/progress-kendo-angular-buttons.mjs +105 -105
- package/listbutton/list-button.d.ts +1 -1
- package/package.json +11 -19
- package/splitbutton/localization/messages.d.ts +1 -1
- package/esm2022/button/button-settings.mjs +0 -5
- package/esm2022/button/button.component.mjs +0 -558
- package/esm2022/button/button.module.mjs +0 -43
- package/esm2022/button/button.service.mjs +0 -22
- package/esm2022/button/selection-settings.mjs +0 -5
- package/esm2022/buttongroup/buttongroup.component.mjs +0 -340
- package/esm2022/buttongroup/buttongroup.module.mjs +0 -49
- package/esm2022/buttons.module.mjs +0 -58
- package/esm2022/chip/chip-content-click-event-args.interface.mjs +0 -5
- package/esm2022/chip/chip-list-remove-event-args.interface.mjs +0 -5
- package/esm2022/chip/chip-list.component.mjs +0 -360
- package/esm2022/chip/chip-remove-event-args.interface.mjs +0 -5
- package/esm2022/chip/chip.component.mjs +0 -585
- package/esm2022/chip/chip.module.mjs +0 -45
- package/esm2022/chip/models/avatar-settings.interface.mjs +0 -5
- package/esm2022/chip/models/selection.mjs +0 -5
- package/esm2022/common/models/arrow-settings.mjs +0 -5
- package/esm2022/common/models/fillmode.mjs +0 -5
- package/esm2022/common/models/rounded.mjs +0 -5
- package/esm2022/common/models/size.mjs +0 -5
- package/esm2022/common/models/styling-classes.mjs +0 -5
- package/esm2022/common/models/theme-color.mjs +0 -5
- package/esm2022/common/models.mjs +0 -10
- package/esm2022/direction.mjs +0 -5
- package/esm2022/directives.mjs +0 -176
- package/esm2022/dropdownbutton/dropdownbutton.component.mjs +0 -482
- package/esm2022/dropdownbutton/dropdownbutton.module.mjs +0 -50
- package/esm2022/floatingactionbutton/animations/animations.mjs +0 -33
- package/esm2022/floatingactionbutton/dial-item.component.mjs +0 -161
- package/esm2022/floatingactionbutton/dial-list.component.mjs +0 -98
- package/esm2022/floatingactionbutton/floatingactionbutton.component.mjs +0 -954
- package/esm2022/floatingactionbutton/floatingactionbutton.module.mjs +0 -47
- package/esm2022/floatingactionbutton/models/align.mjs +0 -5
- package/esm2022/floatingactionbutton/models/item-animation.interface.mjs +0 -5
- package/esm2022/floatingactionbutton/models/item-click.event.mjs +0 -5
- package/esm2022/floatingactionbutton/models/item.interface.mjs +0 -5
- package/esm2022/floatingactionbutton/models/offset.mjs +0 -5
- package/esm2022/floatingactionbutton/models/position-mode.mjs +0 -5
- package/esm2022/floatingactionbutton/templates/dial-item-template.directive.mjs +0 -37
- package/esm2022/floatingactionbutton/templates/fab-template.directive.mjs +0 -38
- package/esm2022/floatingactionbutton/utils.mjs +0 -38
- package/esm2022/focusable/focus.service.mjs +0 -38
- package/esm2022/focusable/focusable.directive.mjs +0 -67
- package/esm2022/index.mjs +0 -33
- package/esm2022/listbutton/button-item-template.directive.mjs +0 -47
- package/esm2022/listbutton/container.service.mjs +0 -18
- package/esm2022/listbutton/list-button.mjs +0 -461
- package/esm2022/listbutton/list-item-model.mjs +0 -5
- package/esm2022/listbutton/list.component.mjs +0 -177
- package/esm2022/listbutton/popup-settings.mjs +0 -5
- package/esm2022/navigation/key-events.mjs +0 -13
- package/esm2022/navigation/navigation-action.mjs +0 -20
- package/esm2022/navigation/navigation-config.mjs +0 -9
- package/esm2022/navigation/navigation.service.mjs +0 -111
- package/esm2022/package-metadata.mjs +0 -16
- package/esm2022/preventable-event.mjs +0 -25
- package/esm2022/progress-kendo-angular-buttons.mjs +0 -8
- package/esm2022/speechtotextbutton/models/error-event.mjs +0 -5
- package/esm2022/speechtotextbutton/models/integration-mode.mjs +0 -5
- package/esm2022/speechtotextbutton/models/result-event.mjs +0 -5
- package/esm2022/speechtotextbutton/models/speechtotextbutton-settings.mjs +0 -5
- package/esm2022/speechtotextbutton/speechtotextbutton.component.mjs +0 -532
- package/esm2022/speechtotextbutton/speechtotextbutton.module.mjs +0 -31
- package/esm2022/splitbutton/localization/custom-messages.component.mjs +0 -40
- package/esm2022/splitbutton/localization/localized-messages.directive.mjs +0 -39
- package/esm2022/splitbutton/localization/messages.mjs +0 -50
- package/esm2022/splitbutton/splitbutton.component.mjs +0 -761
- package/esm2022/splitbutton/splitbutton.module.mjs +0 -37
- package/esm2022/util.mjs +0 -108
|
@@ -1,10 +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 * from './models/size';
|
|
6
|
-
export * from './models/theme-color';
|
|
7
|
-
export * from './models/fillmode';
|
|
8
|
-
export * from './models/rounded';
|
|
9
|
-
export * from './models/styling-classes';
|
|
10
|
-
export * from './models/arrow-settings';
|
package/esm2022/direction.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 {};
|
package/esm2022/directives.mjs
DELETED
|
@@ -1,176 +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 { ToggleButtonTabStopDirective } from '@progress/kendo-angular-common';
|
|
6
|
-
import { ButtonComponent } from './button/button.component';
|
|
7
|
-
import { ButtonGroupComponent } from './buttongroup/buttongroup.component';
|
|
8
|
-
import { ChipListComponent } from './chip/chip-list.component';
|
|
9
|
-
import { ChipComponent } from './chip/chip.component';
|
|
10
|
-
import { DropDownButtonComponent } from './dropdownbutton/dropdownbutton.component';
|
|
11
|
-
import { FloatingActionButtonComponent } from './floatingactionbutton/floatingactionbutton.component';
|
|
12
|
-
import { DialItemTemplateDirective } from './floatingactionbutton/templates/dial-item-template.directive';
|
|
13
|
-
import { FloatingActionButtonTemplateDirective } from './floatingactionbutton/templates/fab-template.directive';
|
|
14
|
-
import { SplitButtonCustomMessagesComponent } from './splitbutton/localization/custom-messages.component';
|
|
15
|
-
import { SplitButtonComponent } from './splitbutton/splitbutton.component';
|
|
16
|
-
import { ButtonItemTemplateDirective } from './listbutton/button-item-template.directive';
|
|
17
|
-
import { SpeechToTextButtonComponent } from './speechtotextbutton/speechtotextbutton.component';
|
|
18
|
-
/**
|
|
19
|
-
* Use the `KENDO_BUTTON` utility array to add all Button-related components and directives to a standalone Angular component.
|
|
20
|
-
*
|
|
21
|
-
* @example
|
|
22
|
-
* ```typescript
|
|
23
|
-
* @Component({
|
|
24
|
-
* standalone: true,
|
|
25
|
-
* imports: [KENDO_BUTTON],
|
|
26
|
-
* // ...
|
|
27
|
-
* })
|
|
28
|
-
* export class MyComponent {}
|
|
29
|
-
* ```
|
|
30
|
-
*/
|
|
31
|
-
export const KENDO_BUTTON = [
|
|
32
|
-
ButtonComponent
|
|
33
|
-
];
|
|
34
|
-
/**
|
|
35
|
-
* Use the `KENDO_BUTTONGROUP` utility array to add all ButtonGroup-related components and directives to a standalone Angular component.
|
|
36
|
-
*
|
|
37
|
-
* @example
|
|
38
|
-
* ```typescript
|
|
39
|
-
* @Component({
|
|
40
|
-
* standalone: true,
|
|
41
|
-
* imports: [KENDO_BUTTONGROUP],
|
|
42
|
-
* // ...
|
|
43
|
-
* })
|
|
44
|
-
* export class MyComponent {}
|
|
45
|
-
* ```
|
|
46
|
-
*/
|
|
47
|
-
export const KENDO_BUTTONGROUP = [
|
|
48
|
-
ButtonComponent,
|
|
49
|
-
ButtonGroupComponent
|
|
50
|
-
];
|
|
51
|
-
/**
|
|
52
|
-
* Use the `KENDO_DROPDOWNBUTTON` utility array to add all DropDownButton-related components and directives to a standalone Angular component.
|
|
53
|
-
*
|
|
54
|
-
* @example
|
|
55
|
-
* ```typescript
|
|
56
|
-
* @Component({
|
|
57
|
-
* standalone: true,
|
|
58
|
-
* imports: [KENDO_DROPDOWNBUTTON],
|
|
59
|
-
* // ...
|
|
60
|
-
* })
|
|
61
|
-
* export class MyComponent {}
|
|
62
|
-
* ```
|
|
63
|
-
*/
|
|
64
|
-
export const KENDO_DROPDOWNBUTTON = [
|
|
65
|
-
DropDownButtonComponent,
|
|
66
|
-
ButtonItemTemplateDirective
|
|
67
|
-
];
|
|
68
|
-
/**
|
|
69
|
-
* Use the `KENDO_CHIP` utility array to add all Chip-related components and directives to a standalone Angular component.
|
|
70
|
-
*
|
|
71
|
-
* @example
|
|
72
|
-
* ```typescript
|
|
73
|
-
* @Component({
|
|
74
|
-
* standalone: true,
|
|
75
|
-
* imports: [KENDO_CHIP],
|
|
76
|
-
* // ...
|
|
77
|
-
* })
|
|
78
|
-
* export class MyComponent {}
|
|
79
|
-
* ```
|
|
80
|
-
*/
|
|
81
|
-
export const KENDO_CHIP = [
|
|
82
|
-
ChipComponent
|
|
83
|
-
];
|
|
84
|
-
/**
|
|
85
|
-
* Use the `KENDO_CHIPLIST` utility array to add all ChipList-related components and directives to a standalone Angular component.
|
|
86
|
-
*
|
|
87
|
-
* @example
|
|
88
|
-
* ```typescript
|
|
89
|
-
* @Component({
|
|
90
|
-
* standalone: true,
|
|
91
|
-
* imports: [KENDO_CHIPLIST],
|
|
92
|
-
* // ...
|
|
93
|
-
* })
|
|
94
|
-
* export class MyComponent {}
|
|
95
|
-
* ```
|
|
96
|
-
*/
|
|
97
|
-
export const KENDO_CHIPLIST = [
|
|
98
|
-
ChipComponent,
|
|
99
|
-
ChipListComponent
|
|
100
|
-
];
|
|
101
|
-
/**
|
|
102
|
-
* Use the `KENDO_FLOATINGACTIONBUTTON` utility array to add all FloatingActionButton-related components and directives to a standalone Angular component.
|
|
103
|
-
*
|
|
104
|
-
* @example
|
|
105
|
-
* ```typescript
|
|
106
|
-
* @Component({
|
|
107
|
-
* standalone: true,
|
|
108
|
-
* imports: [KENDO_FLOATINGACTIONBUTTON],
|
|
109
|
-
* // ...
|
|
110
|
-
* })
|
|
111
|
-
* export class MyComponent {}
|
|
112
|
-
* ```
|
|
113
|
-
*/
|
|
114
|
-
export const KENDO_FLOATINGACTIONBUTTON = [
|
|
115
|
-
FloatingActionButtonComponent,
|
|
116
|
-
DialItemTemplateDirective,
|
|
117
|
-
FloatingActionButtonTemplateDirective
|
|
118
|
-
];
|
|
119
|
-
/**
|
|
120
|
-
* Use the `KENDO_SPLITBUTTON` utility array to add all SplitButton-related components and directives to a standalone Angular component.
|
|
121
|
-
*
|
|
122
|
-
* @example
|
|
123
|
-
* ```typescript
|
|
124
|
-
* @Component({
|
|
125
|
-
* standalone: true,
|
|
126
|
-
* imports: [KENDO_SPLITBUTTON],
|
|
127
|
-
* // ...
|
|
128
|
-
* })
|
|
129
|
-
* export class MyComponent {}
|
|
130
|
-
* ```
|
|
131
|
-
*/
|
|
132
|
-
export const KENDO_SPLITBUTTON = [
|
|
133
|
-
SplitButtonComponent,
|
|
134
|
-
SplitButtonCustomMessagesComponent,
|
|
135
|
-
ToggleButtonTabStopDirective,
|
|
136
|
-
ButtonItemTemplateDirective
|
|
137
|
-
];
|
|
138
|
-
/**
|
|
139
|
-
* Use the `KENDO_SPEECHTOTEXTBUTTON` utility array to add all SpeechToTextButton-related components and directives to a standalone Angular component.
|
|
140
|
-
*
|
|
141
|
-
* @example
|
|
142
|
-
* ```typescript
|
|
143
|
-
* @Component({
|
|
144
|
-
* standalone: true,
|
|
145
|
-
* imports: [KENDO_SPEECHTOTEXTBUTTON],
|
|
146
|
-
* // ...
|
|
147
|
-
* })
|
|
148
|
-
* export class MyComponent {}
|
|
149
|
-
* ```
|
|
150
|
-
*/
|
|
151
|
-
export const KENDO_SPEECHTOTEXTBUTTON = [
|
|
152
|
-
SpeechToTextButtonComponent
|
|
153
|
-
];
|
|
154
|
-
/**
|
|
155
|
-
* Use the `KENDO_BUTTONS` utility array to add all `@progress/kendo-angular-buttons`-related components and directives to a standalone Angular component.
|
|
156
|
-
*
|
|
157
|
-
* @example
|
|
158
|
-
* ```typescript
|
|
159
|
-
* @Component({
|
|
160
|
-
* standalone: true,
|
|
161
|
-
* imports: [KENDO_BUTTONS],
|
|
162
|
-
* // ...
|
|
163
|
-
* })
|
|
164
|
-
* export class MyComponent {}
|
|
165
|
-
* ```
|
|
166
|
-
*/
|
|
167
|
-
export const KENDO_BUTTONS = [
|
|
168
|
-
...KENDO_BUTTON,
|
|
169
|
-
...KENDO_BUTTONGROUP,
|
|
170
|
-
...KENDO_DROPDOWNBUTTON,
|
|
171
|
-
...KENDO_CHIP,
|
|
172
|
-
...KENDO_CHIPLIST,
|
|
173
|
-
...KENDO_FLOATINGACTIONBUTTON,
|
|
174
|
-
...KENDO_SPLITBUTTON,
|
|
175
|
-
...KENDO_SPEECHTOTEXTBUTTON
|
|
176
|
-
];
|
|
@@ -1,482 +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, ContentChild, ElementRef, EventEmitter, HostBinding, HostListener, Input, Output, NgZone, ChangeDetectorRef, Renderer2 } from '@angular/core';
|
|
6
|
-
import { LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n';
|
|
7
|
-
import { PopupService } from '@progress/kendo-angular-popup';
|
|
8
|
-
import { isDocumentAvailable, Keys, isPresent, normalizeKeys } from '@progress/kendo-angular-common';
|
|
9
|
-
import { ButtonItemTemplateDirective } from '../listbutton/button-item-template.directive';
|
|
10
|
-
import { closest } from '../util';
|
|
11
|
-
import { ListButton } from '../listbutton/list-button';
|
|
12
|
-
import { ListComponent } from '../listbutton/list.component';
|
|
13
|
-
import { FocusService } from '../focusable/focus.service';
|
|
14
|
-
import { NavigationService } from '../navigation/navigation.service';
|
|
15
|
-
import { NAVIGATION_CONFIG } from '../navigation/navigation-config';
|
|
16
|
-
import { PopupContainerService } from '../listbutton/container.service';
|
|
17
|
-
import { NgClass } from '@angular/common';
|
|
18
|
-
import { ButtonComponent } from '../button/button.component';
|
|
19
|
-
import * as i0 from "@angular/core";
|
|
20
|
-
import * as i1 from "../focusable/focus.service";
|
|
21
|
-
import * as i2 from "../navigation/navigation.service";
|
|
22
|
-
import * as i3 from "@progress/kendo-angular-popup";
|
|
23
|
-
import * as i4 from "@progress/kendo-angular-l10n";
|
|
24
|
-
import * as i5 from "../listbutton/container.service";
|
|
25
|
-
const NAVIGATION_SETTINGS = {
|
|
26
|
-
useLeftRightArrows: true
|
|
27
|
-
};
|
|
28
|
-
const NAVIGATION_SETTINGS_PROVIDER = {
|
|
29
|
-
provide: NAVIGATION_CONFIG,
|
|
30
|
-
useValue: NAVIGATION_SETTINGS
|
|
31
|
-
};
|
|
32
|
-
const DEFAULT_FILL_MODE = 'solid';
|
|
33
|
-
/**
|
|
34
|
-
* Represents the Kendo UI DropDownButton component for Angular.
|
|
35
|
-
*
|
|
36
|
-
* Use the DropDownButton to display a button with a popup list of actions.
|
|
37
|
-
*
|
|
38
|
-
* @example
|
|
39
|
-
* ```ts
|
|
40
|
-
* @Component({
|
|
41
|
-
* selector: 'my-app',
|
|
42
|
-
* template: `
|
|
43
|
-
* <kendo-dropdownbutton [data]="data">
|
|
44
|
-
* User Settings
|
|
45
|
-
* </kendo-dropdownbutton>
|
|
46
|
-
* `
|
|
47
|
-
* })
|
|
48
|
-
* class AppComponent {
|
|
49
|
-
* public data: Array<any> = [
|
|
50
|
-
* { text: 'My Profile' },
|
|
51
|
-
* { text: 'Friend Requests' },
|
|
52
|
-
* { text: 'Account Settings' },
|
|
53
|
-
* { text: 'Support' },
|
|
54
|
-
* { text: 'Log Out' }
|
|
55
|
-
* ];
|
|
56
|
-
* }
|
|
57
|
-
* ```
|
|
58
|
-
*/
|
|
59
|
-
export class DropDownButtonComponent extends ListButton {
|
|
60
|
-
containerService;
|
|
61
|
-
renderer;
|
|
62
|
-
/**
|
|
63
|
-
* Displays the default arrow icon or a custom one.
|
|
64
|
-
* @default false
|
|
65
|
-
*/
|
|
66
|
-
arrowIcon = false;
|
|
67
|
-
/**
|
|
68
|
-
* Specifies the name of an existing icon in the Kendo UI theme.
|
|
69
|
-
*/
|
|
70
|
-
icon = '';
|
|
71
|
-
/**
|
|
72
|
-
* Specifies an [`SVGIcon`](slug:api_icons_svgicon) to render within the button.
|
|
73
|
-
*/
|
|
74
|
-
svgIcon;
|
|
75
|
-
/**
|
|
76
|
-
* Specifies a list of CSS classes for styling the button with custom icons.
|
|
77
|
-
*/
|
|
78
|
-
iconClass = '';
|
|
79
|
-
/**
|
|
80
|
-
* Specifies a URL for styling the button with a custom image.
|
|
81
|
-
*/
|
|
82
|
-
imageUrl = '';
|
|
83
|
-
/**
|
|
84
|
-
* Sets the data item field that represents the item text.
|
|
85
|
-
* If the data contains only primitive values, leave this undefined.
|
|
86
|
-
*/
|
|
87
|
-
textField;
|
|
88
|
-
/**
|
|
89
|
-
* Sets or gets the data of the DropDownButton. Provide the data as an array-like list.
|
|
90
|
-
*/
|
|
91
|
-
set data(data) {
|
|
92
|
-
this._data = data || [];
|
|
93
|
-
}
|
|
94
|
-
get data() {
|
|
95
|
-
return this._data;
|
|
96
|
-
}
|
|
97
|
-
/**
|
|
98
|
-
* Specifies the padding of the DropDownButton. See [DropDownButton Appearance](slug:appearance_dropdownbutton#size).
|
|
99
|
-
* @default 'medium'
|
|
100
|
-
*/
|
|
101
|
-
size = 'medium';
|
|
102
|
-
/**
|
|
103
|
-
* Specifies the border radius of the DropDownButton. See [DropDownButton Appearance](slug:appearance_dropdownbutton#roundness).
|
|
104
|
-
* @default 'medium'
|
|
105
|
-
*/
|
|
106
|
-
rounded = 'medium';
|
|
107
|
-
/**
|
|
108
|
-
* Specifies the background and border styles of the DropDownButton. See [DropDownButton Appearance](slug:appearance_dropdownbutton#fill-mode).
|
|
109
|
-
* @default 'solid'
|
|
110
|
-
*/
|
|
111
|
-
set fillMode(fillMode) {
|
|
112
|
-
this._fillMode = fillMode === 'clear' ? 'flat' : fillMode;
|
|
113
|
-
}
|
|
114
|
-
get fillMode() {
|
|
115
|
-
return this._fillMode;
|
|
116
|
-
}
|
|
117
|
-
/**
|
|
118
|
-
* Specifies predefined theme colors for the DropDownButton. See [DropDownButton Appearance](slug:appearance_dropdownbutton#theme-colors).
|
|
119
|
-
* @default 'base'
|
|
120
|
-
*/
|
|
121
|
-
themeColor = 'base';
|
|
122
|
-
/**
|
|
123
|
-
* Sets attributes for the main button.
|
|
124
|
-
*/
|
|
125
|
-
set buttonAttributes(buttonAttributes) {
|
|
126
|
-
const newButtonAttributes = buttonAttributes || null;
|
|
127
|
-
this.handleButtonAttributes(newButtonAttributes);
|
|
128
|
-
this._buttonAttributes = newButtonAttributes;
|
|
129
|
-
}
|
|
130
|
-
get buttonAttributes() {
|
|
131
|
-
return this._buttonAttributes;
|
|
132
|
-
}
|
|
133
|
-
/**
|
|
134
|
-
* Fires when the user clicks a drop-down list item.
|
|
135
|
-
* The event data contains the data item bound to the clicked list item.
|
|
136
|
-
*/
|
|
137
|
-
itemClick = new EventEmitter();
|
|
138
|
-
/**
|
|
139
|
-
* Fires when the DropDownButton is focused.
|
|
140
|
-
*/
|
|
141
|
-
onFocus = new EventEmitter();
|
|
142
|
-
/**
|
|
143
|
-
* Fires when the DropDownButton is blurred.
|
|
144
|
-
*/
|
|
145
|
-
onBlur = new EventEmitter();
|
|
146
|
-
get focused() {
|
|
147
|
-
return this._isFocused && !this._disabled;
|
|
148
|
-
}
|
|
149
|
-
hostDisplayStyle = 'inline-flex';
|
|
150
|
-
get dir() {
|
|
151
|
-
return this.direction;
|
|
152
|
-
}
|
|
153
|
-
/**
|
|
154
|
-
* @hidden
|
|
155
|
-
*/
|
|
156
|
-
get active() {
|
|
157
|
-
return this._active;
|
|
158
|
-
}
|
|
159
|
-
itemTemplate;
|
|
160
|
-
_fillMode = DEFAULT_FILL_MODE;
|
|
161
|
-
_buttonAttributes = null;
|
|
162
|
-
documentMouseUpSub;
|
|
163
|
-
/**
|
|
164
|
-
* @hidden
|
|
165
|
-
*/
|
|
166
|
-
keydown(event) {
|
|
167
|
-
this.keyDownHandler(event, true);
|
|
168
|
-
const code = normalizeKeys(event);
|
|
169
|
-
if (code === Keys.Space) {
|
|
170
|
-
this._active = true;
|
|
171
|
-
}
|
|
172
|
-
if (code === Keys.Enter) {
|
|
173
|
-
this._active = true;
|
|
174
|
-
event.preventDefault();
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
/**
|
|
178
|
-
* @hidden
|
|
179
|
-
*/
|
|
180
|
-
keyup(event) {
|
|
181
|
-
this.keyUpHandler(event);
|
|
182
|
-
this._active = false;
|
|
183
|
-
}
|
|
184
|
-
/**
|
|
185
|
-
* @hidden
|
|
186
|
-
*/
|
|
187
|
-
mousedown(event) {
|
|
188
|
-
if (this._disabled) {
|
|
189
|
-
event.preventDefault();
|
|
190
|
-
}
|
|
191
|
-
else {
|
|
192
|
-
this._active = true;
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
|
-
/**
|
|
196
|
-
* @hidden
|
|
197
|
-
*/
|
|
198
|
-
mouseup(event) {
|
|
199
|
-
if (this._disabled) {
|
|
200
|
-
event.preventDefault();
|
|
201
|
-
}
|
|
202
|
-
this._active = false;
|
|
203
|
-
}
|
|
204
|
-
/**
|
|
205
|
-
* @hidden
|
|
206
|
-
*/
|
|
207
|
-
openPopup() {
|
|
208
|
-
this._isFocused = true;
|
|
209
|
-
this.togglePopupVisibility();
|
|
210
|
-
}
|
|
211
|
-
/**
|
|
212
|
-
* @hidden
|
|
213
|
-
*/
|
|
214
|
-
onButtonBlur() {
|
|
215
|
-
if (!this.openState) {
|
|
216
|
-
this.blurWrapper();
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
/**
|
|
220
|
-
* Focuses the DropDownButton.
|
|
221
|
-
*/
|
|
222
|
-
focus() {
|
|
223
|
-
if (isDocumentAvailable()) {
|
|
224
|
-
this.button.nativeElement.focus();
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
/**
|
|
228
|
-
* Blurs the DropDownButton.
|
|
229
|
-
*/
|
|
230
|
-
blur() {
|
|
231
|
-
if (isDocumentAvailable()) {
|
|
232
|
-
this.button.nativeElement.blur();
|
|
233
|
-
this.blurWrapper();
|
|
234
|
-
}
|
|
235
|
-
}
|
|
236
|
-
constructor(focusService, navigationService, wrapperRef, zone, popupService, elRef, localization, cdr, containerService, renderer) {
|
|
237
|
-
super(focusService, navigationService, wrapperRef, zone, popupService, elRef, localization, cdr, containerService);
|
|
238
|
-
this.containerService = containerService;
|
|
239
|
-
this.renderer = renderer;
|
|
240
|
-
this._itemClick = this.itemClick;
|
|
241
|
-
this._blur = this.onBlur;
|
|
242
|
-
zone.runOutsideAngular(() => {
|
|
243
|
-
this.documentMouseUpSub = this.renderer.listen('document', 'mouseup', () => {
|
|
244
|
-
if (this.active) {
|
|
245
|
-
zone.run(() => this._active = false);
|
|
246
|
-
}
|
|
247
|
-
});
|
|
248
|
-
});
|
|
249
|
-
}
|
|
250
|
-
ngAfterViewInit() {
|
|
251
|
-
this.containerService.container = this.container;
|
|
252
|
-
this.containerService.template = this.popupTemplate;
|
|
253
|
-
this.handleButtonAttributes(this.buttonAttributes);
|
|
254
|
-
const arrowWrapper = this.button.nativeElement.querySelector('.k-button-arrow');
|
|
255
|
-
if (arrowWrapper) {
|
|
256
|
-
this.renderer.addClass(arrowWrapper, 'k-menu-button-arrow');
|
|
257
|
-
}
|
|
258
|
-
}
|
|
259
|
-
/**
|
|
260
|
-
* @hidden
|
|
261
|
-
*/
|
|
262
|
-
handleFocus(event) {
|
|
263
|
-
if (!this._disabled) {
|
|
264
|
-
if (!this._isFocused) {
|
|
265
|
-
this.onFocus.emit();
|
|
266
|
-
}
|
|
267
|
-
this._isFocused = true;
|
|
268
|
-
this.focusService.resetFocus();
|
|
269
|
-
const relatedTargetInList = event.relatedTarget && closest(event.relatedTarget, '.k-popup kendo-button-list');
|
|
270
|
-
if (this.openState && !relatedTargetInList) {
|
|
271
|
-
this.focusService.focus(0);
|
|
272
|
-
}
|
|
273
|
-
}
|
|
274
|
-
}
|
|
275
|
-
/**
|
|
276
|
-
* @hidden
|
|
277
|
-
*/
|
|
278
|
-
wrapperContains(element) {
|
|
279
|
-
return this.wrapper === element
|
|
280
|
-
|| this.wrapper.contains(element)
|
|
281
|
-
|| this.popupRef?.popupElement.contains(element);
|
|
282
|
-
}
|
|
283
|
-
handleButtonAttributes(newButtonAttributes) {
|
|
284
|
-
const mainButton = this.button?.nativeElement;
|
|
285
|
-
if (isPresent(this.buttonAttributes) && isPresent(mainButton)) {
|
|
286
|
-
for (const attr in this.buttonAttributes) {
|
|
287
|
-
this.renderer.removeAttribute(mainButton, attr, this.buttonAttributes[attr]);
|
|
288
|
-
}
|
|
289
|
-
}
|
|
290
|
-
if (isPresent(newButtonAttributes) && isPresent(mainButton)) {
|
|
291
|
-
for (const attr in newButtonAttributes) {
|
|
292
|
-
this.renderer.setAttribute(mainButton, attr, newButtonAttributes[attr]);
|
|
293
|
-
}
|
|
294
|
-
}
|
|
295
|
-
}
|
|
296
|
-
/**
|
|
297
|
-
* @hidden
|
|
298
|
-
*/
|
|
299
|
-
ngOnDestroy() {
|
|
300
|
-
if (this.documentMouseUpSub) {
|
|
301
|
-
this.documentMouseUpSub();
|
|
302
|
-
}
|
|
303
|
-
super.ngOnDestroy();
|
|
304
|
-
}
|
|
305
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: DropDownButtonComponent, deps: [{ token: i1.FocusService }, { token: i2.NavigationService }, { token: i0.ElementRef }, { token: i0.NgZone }, { token: i3.PopupService }, { token: i0.ElementRef }, { token: i4.LocalizationService }, { token: i0.ChangeDetectorRef }, { token: i5.PopupContainerService }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
|
|
306
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: DropDownButtonComponent, isStandalone: true, selector: "kendo-dropdownbutton", inputs: { arrowIcon: "arrowIcon", icon: "icon", svgIcon: "svgIcon", iconClass: "iconClass", imageUrl: "imageUrl", textField: "textField", data: "data", size: "size", rounded: "rounded", fillMode: "fillMode", themeColor: "themeColor", buttonAttributes: "buttonAttributes" }, outputs: { itemClick: "itemClick", onFocus: "focus", onBlur: "blur" }, host: { listeners: { "keydown": "keydown($event)", "keyup": "keyup($event)", "mousedown": "mousedown($event)", "mouseup": "mouseup($event)" }, properties: { "class.k-focus": "this.focused", "style.display": "this.hostDisplayStyle", "attr.dir": "this.dir" } }, providers: [
|
|
307
|
-
FocusService,
|
|
308
|
-
NavigationService,
|
|
309
|
-
NAVIGATION_SETTINGS_PROVIDER,
|
|
310
|
-
LocalizationService,
|
|
311
|
-
{
|
|
312
|
-
provide: L10N_PREFIX,
|
|
313
|
-
useValue: 'kendo.dropdownbutton'
|
|
314
|
-
},
|
|
315
|
-
PopupContainerService
|
|
316
|
-
], queries: [{ propertyName: "itemTemplate", first: true, predicate: ButtonItemTemplateDirective, descendants: true }], exportAs: ["kendoDropDownButton"], usesInheritance: true, ngImport: i0, template: `
|
|
317
|
-
<button kendoButton #button
|
|
318
|
-
type="button"
|
|
319
|
-
[id]="buttonId"
|
|
320
|
-
[tabindex]="componentTabIndex"
|
|
321
|
-
class="k-menu-button"
|
|
322
|
-
[class.k-active]="active"
|
|
323
|
-
[disabled]="disabled"
|
|
324
|
-
[icon]="icon"
|
|
325
|
-
[svgIcon]="svgIcon"
|
|
326
|
-
[arrowIcon]="arrowIcon"
|
|
327
|
-
[iconClass]="iconClass"
|
|
328
|
-
[imageUrl]="imageUrl"
|
|
329
|
-
[ngClass]="buttonClass"
|
|
330
|
-
[size]="size"
|
|
331
|
-
[rounded]="rounded"
|
|
332
|
-
[fillMode]="fillMode"
|
|
333
|
-
[themeColor]="fillMode ? themeColor : null"
|
|
334
|
-
(click)="openPopup()"
|
|
335
|
-
(focus)="handleFocus($event)"
|
|
336
|
-
(blur)="onButtonBlur()"
|
|
337
|
-
[attr.aria-disabled]="disabled"
|
|
338
|
-
[attr.aria-expanded]="openState"
|
|
339
|
-
[attr.aria-controls]="listId"
|
|
340
|
-
>
|
|
341
|
-
<ng-content></ng-content>
|
|
342
|
-
</button>
|
|
343
|
-
<ng-template #popupTemplate>
|
|
344
|
-
<kendo-button-list
|
|
345
|
-
#buttonList
|
|
346
|
-
[id]="listId"
|
|
347
|
-
[data]="data"
|
|
348
|
-
[textField]="textField"
|
|
349
|
-
[itemTemplate]="itemTemplate"
|
|
350
|
-
(onItemClick)="onItemClick($event)"
|
|
351
|
-
(keydown)="keyDownHandler($event)"
|
|
352
|
-
(keyup)="keyUpHandler($event)"
|
|
353
|
-
[attr.dir]="dir"
|
|
354
|
-
[attr.aria-labelledby]="buttonId"
|
|
355
|
-
[size]="size"
|
|
356
|
-
>
|
|
357
|
-
</kendo-button-list>
|
|
358
|
-
</ng-template>
|
|
359
|
-
<ng-container #container></ng-container>
|
|
360
|
-
`, isInline: true, dependencies: [{ kind: "component", type: ButtonComponent, selector: "button[kendoButton]", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: ListComponent, selector: "kendo-button-list", inputs: ["data", "textField", "itemTemplate", "size"], outputs: ["onItemClick", "onItemBlur"] }] });
|
|
361
|
-
}
|
|
362
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: DropDownButtonComponent, decorators: [{
|
|
363
|
-
type: Component,
|
|
364
|
-
args: [{
|
|
365
|
-
exportAs: 'kendoDropDownButton',
|
|
366
|
-
providers: [
|
|
367
|
-
FocusService,
|
|
368
|
-
NavigationService,
|
|
369
|
-
NAVIGATION_SETTINGS_PROVIDER,
|
|
370
|
-
LocalizationService,
|
|
371
|
-
{
|
|
372
|
-
provide: L10N_PREFIX,
|
|
373
|
-
useValue: 'kendo.dropdownbutton'
|
|
374
|
-
},
|
|
375
|
-
PopupContainerService
|
|
376
|
-
],
|
|
377
|
-
selector: 'kendo-dropdownbutton',
|
|
378
|
-
template: `
|
|
379
|
-
<button kendoButton #button
|
|
380
|
-
type="button"
|
|
381
|
-
[id]="buttonId"
|
|
382
|
-
[tabindex]="componentTabIndex"
|
|
383
|
-
class="k-menu-button"
|
|
384
|
-
[class.k-active]="active"
|
|
385
|
-
[disabled]="disabled"
|
|
386
|
-
[icon]="icon"
|
|
387
|
-
[svgIcon]="svgIcon"
|
|
388
|
-
[arrowIcon]="arrowIcon"
|
|
389
|
-
[iconClass]="iconClass"
|
|
390
|
-
[imageUrl]="imageUrl"
|
|
391
|
-
[ngClass]="buttonClass"
|
|
392
|
-
[size]="size"
|
|
393
|
-
[rounded]="rounded"
|
|
394
|
-
[fillMode]="fillMode"
|
|
395
|
-
[themeColor]="fillMode ? themeColor : null"
|
|
396
|
-
(click)="openPopup()"
|
|
397
|
-
(focus)="handleFocus($event)"
|
|
398
|
-
(blur)="onButtonBlur()"
|
|
399
|
-
[attr.aria-disabled]="disabled"
|
|
400
|
-
[attr.aria-expanded]="openState"
|
|
401
|
-
[attr.aria-controls]="listId"
|
|
402
|
-
>
|
|
403
|
-
<ng-content></ng-content>
|
|
404
|
-
</button>
|
|
405
|
-
<ng-template #popupTemplate>
|
|
406
|
-
<kendo-button-list
|
|
407
|
-
#buttonList
|
|
408
|
-
[id]="listId"
|
|
409
|
-
[data]="data"
|
|
410
|
-
[textField]="textField"
|
|
411
|
-
[itemTemplate]="itemTemplate"
|
|
412
|
-
(onItemClick)="onItemClick($event)"
|
|
413
|
-
(keydown)="keyDownHandler($event)"
|
|
414
|
-
(keyup)="keyUpHandler($event)"
|
|
415
|
-
[attr.dir]="dir"
|
|
416
|
-
[attr.aria-labelledby]="buttonId"
|
|
417
|
-
[size]="size"
|
|
418
|
-
>
|
|
419
|
-
</kendo-button-list>
|
|
420
|
-
</ng-template>
|
|
421
|
-
<ng-container #container></ng-container>
|
|
422
|
-
`,
|
|
423
|
-
standalone: true,
|
|
424
|
-
imports: [ButtonComponent, NgClass, ListComponent]
|
|
425
|
-
}]
|
|
426
|
-
}], ctorParameters: () => [{ type: i1.FocusService }, { type: i2.NavigationService }, { type: i0.ElementRef }, { type: i0.NgZone }, { type: i3.PopupService }, { type: i0.ElementRef }, { type: i4.LocalizationService }, { type: i0.ChangeDetectorRef }, { type: i5.PopupContainerService }, { type: i0.Renderer2 }], propDecorators: { arrowIcon: [{
|
|
427
|
-
type: Input
|
|
428
|
-
}], icon: [{
|
|
429
|
-
type: Input
|
|
430
|
-
}], svgIcon: [{
|
|
431
|
-
type: Input
|
|
432
|
-
}], iconClass: [{
|
|
433
|
-
type: Input
|
|
434
|
-
}], imageUrl: [{
|
|
435
|
-
type: Input
|
|
436
|
-
}], textField: [{
|
|
437
|
-
type: Input
|
|
438
|
-
}], data: [{
|
|
439
|
-
type: Input
|
|
440
|
-
}], size: [{
|
|
441
|
-
type: Input
|
|
442
|
-
}], rounded: [{
|
|
443
|
-
type: Input
|
|
444
|
-
}], fillMode: [{
|
|
445
|
-
type: Input
|
|
446
|
-
}], themeColor: [{
|
|
447
|
-
type: Input
|
|
448
|
-
}], buttonAttributes: [{
|
|
449
|
-
type: Input
|
|
450
|
-
}], itemClick: [{
|
|
451
|
-
type: Output
|
|
452
|
-
}], onFocus: [{
|
|
453
|
-
type: Output,
|
|
454
|
-
args: ['focus']
|
|
455
|
-
}], onBlur: [{
|
|
456
|
-
type: Output,
|
|
457
|
-
args: ['blur']
|
|
458
|
-
}], focused: [{
|
|
459
|
-
type: HostBinding,
|
|
460
|
-
args: ['class.k-focus']
|
|
461
|
-
}], hostDisplayStyle: [{
|
|
462
|
-
type: HostBinding,
|
|
463
|
-
args: ['style.display']
|
|
464
|
-
}], dir: [{
|
|
465
|
-
type: HostBinding,
|
|
466
|
-
args: ['attr.dir']
|
|
467
|
-
}], itemTemplate: [{
|
|
468
|
-
type: ContentChild,
|
|
469
|
-
args: [ButtonItemTemplateDirective]
|
|
470
|
-
}], keydown: [{
|
|
471
|
-
type: HostListener,
|
|
472
|
-
args: ['keydown', ['$event']]
|
|
473
|
-
}], keyup: [{
|
|
474
|
-
type: HostListener,
|
|
475
|
-
args: ['keyup', ['$event']]
|
|
476
|
-
}], mousedown: [{
|
|
477
|
-
type: HostListener,
|
|
478
|
-
args: ['mousedown', ['$event']]
|
|
479
|
-
}], mouseup: [{
|
|
480
|
-
type: HostListener,
|
|
481
|
-
args: ['mouseup', ['$event']]
|
|
482
|
-
}] } });
|