@progress/kendo-angular-toolbar 19.1.0 → 19.1.1-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/common/fillmode.d.ts +1 -1
- package/common/overflow-mode.d.ts +1 -1
- package/common/overflow-settings.d.ts +8 -16
- package/common/scroll-buttons.d.ts +12 -2
- package/common/size.d.ts +1 -1
- package/display-mode.d.ts +5 -5
- package/esm2022/localization/custom-messages.component.mjs +14 -1
- package/esm2022/localization/messages.mjs +3 -3
- package/esm2022/package-metadata.mjs +2 -2
- package/esm2022/toolbar.component.mjs +28 -22
- package/esm2022/toolbar.module.mjs +2 -2
- package/esm2022/tools/toolbar-button.component.mjs +38 -39
- package/esm2022/tools/toolbar-buttongroup.component.mjs +20 -11
- package/esm2022/tools/toolbar-dropdownbutton.component.mjs +39 -47
- package/esm2022/tools/toolbar-separator.component.mjs +11 -0
- package/esm2022/tools/toolbar-spacer.component.mjs +11 -0
- package/esm2022/tools/toolbar-splitbutton.component.mjs +45 -54
- package/esm2022/tools/toolbar-tool.component.mjs +31 -12
- package/fesm2022/progress-kendo-angular-toolbar.mjs +244 -193
- package/group-selection-settings.d.ts +2 -2
- package/localization/custom-messages.component.d.ts +14 -1
- package/localization/messages.d.ts +3 -3
- package/package.json +9 -9
- package/popup-settings.d.ts +23 -20
- package/toolbar.component.d.ts +28 -22
- package/toolbar.module.d.ts +2 -2
- package/tools/toolbar-button.component.d.ts +38 -39
- package/tools/toolbar-buttongroup.component.d.ts +20 -11
- package/tools/toolbar-dropdownbutton.component.d.ts +39 -47
- package/tools/toolbar-separator.component.d.ts +11 -0
- package/tools/toolbar-spacer.component.d.ts +11 -0
- package/tools/toolbar-splitbutton.component.d.ts +45 -54
- package/tools/toolbar-tool.component.d.ts +31 -12
|
@@ -14,13 +14,24 @@ import * as i0 from "@angular/core";
|
|
|
14
14
|
import * as i1 from "../toolbar.component";
|
|
15
15
|
/**
|
|
16
16
|
* Represents the [Kendo UI ToolBar DropDownButton for Angular](slug:controltypes_toolbar#drop-down-buttons).
|
|
17
|
+
*
|
|
18
|
+
* Use this component to add a button that opens a popup with a list of items in the ToolBar.
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```html
|
|
22
|
+
* <kendo-toolbar>
|
|
23
|
+
* <kendo-toolbar-dropdownbutton text="Paste Variations" [data]="data">
|
|
24
|
+
* </kendo-toolbar-dropdownbutton>
|
|
25
|
+
* </kendo-toolbar>
|
|
26
|
+
* ```
|
|
27
|
+
*
|
|
17
28
|
*/
|
|
18
29
|
export class ToolBarDropDownButtonComponent extends ToolBarToolComponent {
|
|
19
30
|
zone;
|
|
20
31
|
renderer;
|
|
21
32
|
host;
|
|
22
33
|
/**
|
|
23
|
-
*
|
|
34
|
+
* Shows the default arrow icon or lets you provide a custom one.
|
|
24
35
|
* @default false
|
|
25
36
|
*/
|
|
26
37
|
arrowIcon = false;
|
|
@@ -31,7 +42,8 @@ export class ToolBarDropDownButtonComponent extends ToolBarToolComponent {
|
|
|
31
42
|
title = '';
|
|
32
43
|
// showText and showIcon showIcon should be declared first
|
|
33
44
|
/**
|
|
34
|
-
*
|
|
45
|
+
* Controls the button text visibility.
|
|
46
|
+
* @default 'always'
|
|
35
47
|
*/
|
|
36
48
|
set showText(value) {
|
|
37
49
|
this._showText = value;
|
|
@@ -41,7 +53,8 @@ export class ToolBarDropDownButtonComponent extends ToolBarToolComponent {
|
|
|
41
53
|
return this._showText;
|
|
42
54
|
}
|
|
43
55
|
/**
|
|
44
|
-
*
|
|
56
|
+
* Controls the button icon visibility.
|
|
57
|
+
* @default 'always'
|
|
45
58
|
*/
|
|
46
59
|
set showIcon(value) {
|
|
47
60
|
this._showIcon = value;
|
|
@@ -61,15 +74,15 @@ export class ToolBarDropDownButtonComponent extends ToolBarToolComponent {
|
|
|
61
74
|
return this._text;
|
|
62
75
|
}
|
|
63
76
|
/**
|
|
64
|
-
*
|
|
77
|
+
* Sets the icon rendered next to the button text.
|
|
65
78
|
*/
|
|
66
79
|
set icon(icon) {
|
|
67
80
|
this.toolbarOptions.icon = getValueForLocation(icon, this.showIcon, false);
|
|
68
81
|
this.overflowOptions.icon = getValueForLocation(icon, this.showIcon, true);
|
|
69
82
|
}
|
|
70
83
|
/**
|
|
71
|
-
*
|
|
72
|
-
*
|
|
84
|
+
* Sets the `SVGIcon` rendered in the button.
|
|
85
|
+
* Accepts an [existing Kendo SVG icon](slug:svgicon_list) or a custom one.
|
|
73
86
|
*/
|
|
74
87
|
set svgIcon(icon) {
|
|
75
88
|
const isIconSet = this.toolbarOptions.icon || this.overflowOptions.icon;
|
|
@@ -84,14 +97,14 @@ export class ToolBarDropDownButtonComponent extends ToolBarToolComponent {
|
|
|
84
97
|
this.overflowOptions.svgIcon = getValueForLocation(icon, this.showIcon, true);
|
|
85
98
|
}
|
|
86
99
|
/**
|
|
87
|
-
*
|
|
100
|
+
* Sets a custom CSS class icon rendered next to the button text.
|
|
88
101
|
*/
|
|
89
102
|
set iconClass(iconClass) {
|
|
90
103
|
this.toolbarOptions.iconClass = getValueForLocation(iconClass, this.showIcon, false);
|
|
91
104
|
this.overflowOptions.iconClass = getValueForLocation(iconClass, this.showIcon, true);
|
|
92
105
|
}
|
|
93
106
|
/**
|
|
94
|
-
*
|
|
107
|
+
* Sets a URL for the image displayed next to the button text.
|
|
95
108
|
*/
|
|
96
109
|
set imageUrl(imageUrl) {
|
|
97
110
|
this.toolbarOptions.imageUrl = getValueForLocation(imageUrl, this.showIcon, false);
|
|
@@ -99,10 +112,7 @@ export class ToolBarDropDownButtonComponent extends ToolBarToolComponent {
|
|
|
99
112
|
}
|
|
100
113
|
/**
|
|
101
114
|
* Configures the popup of the DropDownButton.
|
|
102
|
-
*
|
|
103
|
-
* The available options are:
|
|
104
|
-
* - `animate:Boolean`—Controls the popup animation. By default, the open and close animations are enabled.
|
|
105
|
-
* - `popupClass:String`—Specifies a list of CSS classes that are used to style the popup.
|
|
115
|
+
* Accepts a `PopupSettings` object that allows you to customize the popup behavior and appearance.
|
|
106
116
|
*/
|
|
107
117
|
set popupSettings(settings) {
|
|
108
118
|
this._popupSettings = Object.assign({ animate: true, popupClass: '' }, settings);
|
|
@@ -125,55 +135,37 @@ export class ToolBarDropDownButtonComponent extends ToolBarToolComponent {
|
|
|
125
135
|
this.themeColor = primary ? 'primary' : 'base';
|
|
126
136
|
}
|
|
127
137
|
/**
|
|
128
|
-
*
|
|
129
|
-
*
|
|
130
|
-
*
|
|
131
|
-
* * `solid` (default)
|
|
132
|
-
* * `flat`
|
|
133
|
-
* * `outline`
|
|
134
|
-
* * `link`
|
|
135
|
-
* * `null`
|
|
138
|
+
* Sets the fill mode for the button.
|
|
139
|
+
* The fill mode represents the background and border styles.
|
|
140
|
+
* @default 'solid'
|
|
136
141
|
*/
|
|
137
142
|
fillMode = 'solid';
|
|
138
143
|
/**
|
|
139
|
-
*
|
|
140
|
-
* The theme color
|
|
144
|
+
* Sets the predefined theme color for the button.
|
|
145
|
+
* The theme color applies to the background, border, and text
|
|
141
146
|
* ([see example]({% slug api_buttons_dropdownbuttoncomponent %}#toc-themeColor)).
|
|
142
|
-
*
|
|
143
|
-
* The possible values are:
|
|
144
|
-
* * `base` —Applies coloring based on the `base` theme color. (default)
|
|
145
|
-
* * `primary` —Applies coloring based on the `primary` theme color.
|
|
146
|
-
* * `secondary`—Applies coloring based on the `secondary` theme color.
|
|
147
|
-
* * `tertiary`— Applies coloring based on the `tertiary` theme color.
|
|
148
|
-
* * `info`—Applies coloring based on the `info` theme color.
|
|
149
|
-
* * `success`— Applies coloring based on the `success` theme color.
|
|
150
|
-
* * `warning`— Applies coloring based on the `warning` theme color.
|
|
151
|
-
* * `error`— Applies coloring based on the `error` theme color.
|
|
152
|
-
* * `dark`— Applies coloring based on the `dark` theme color.
|
|
153
|
-
* * `light`— Applies coloring based on the `light` theme color.
|
|
154
|
-
* * `inverse`— Applies coloring based on the `inverse` theme color.
|
|
155
|
-
* * `null` —Removes the default CSS class (no class would be rendered).
|
|
147
|
+
* @default 'base'
|
|
156
148
|
*/
|
|
157
149
|
themeColor = 'base';
|
|
158
150
|
/**
|
|
159
|
-
*
|
|
160
|
-
*
|
|
151
|
+
* Sets the CSS classes for the main button.
|
|
152
|
+
* Accepts values supported by [`ngClass`](link:site.data.urls.angular['ngclassapi']).
|
|
161
153
|
*/
|
|
162
154
|
buttonClass;
|
|
163
155
|
/**
|
|
164
|
-
* Sets the data item field that
|
|
165
|
-
* If the data contains only primitive values, do not
|
|
156
|
+
* Sets the data item field that repesents the item text.
|
|
157
|
+
* If the data contains only primitive values, do not set this property.
|
|
166
158
|
*/
|
|
167
159
|
textField;
|
|
168
160
|
/**
|
|
169
|
-
*
|
|
161
|
+
* When `true`, disables the DropDownButton.
|
|
170
162
|
*/
|
|
171
163
|
disabled;
|
|
172
164
|
/**
|
|
173
165
|
* Sets the data of the DropDownButton
|
|
174
166
|
* ([see example](slug:controltypes_toolbar#drop-down-buttons)).
|
|
175
167
|
*
|
|
176
|
-
* >
|
|
168
|
+
* > Provide the data as an array-like list.
|
|
177
169
|
*/
|
|
178
170
|
set data(data) {
|
|
179
171
|
this._data = data || [];
|
|
@@ -186,17 +178,17 @@ export class ToolBarDropDownButtonComponent extends ToolBarToolComponent {
|
|
|
186
178
|
}
|
|
187
179
|
/**
|
|
188
180
|
* Fires each time the user clicks a DropDownButton item.
|
|
189
|
-
* The event data contains the
|
|
181
|
+
* The event data contains the clicked item's data.
|
|
190
182
|
*/
|
|
191
183
|
itemClick = new EventEmitter();
|
|
192
184
|
/**
|
|
193
|
-
* Fires
|
|
194
|
-
* This event is preventable. If you cancel the event, the popup
|
|
185
|
+
* Fires when the popup is about to open.
|
|
186
|
+
* This event is preventable. If you cancel the event, the popup stays closed.
|
|
195
187
|
*/
|
|
196
188
|
open = new EventEmitter();
|
|
197
189
|
/**
|
|
198
|
-
* Fires
|
|
199
|
-
* This event is preventable. If you cancel the event, the popup
|
|
190
|
+
* Fires when the popup is about to close.
|
|
191
|
+
* This event is preventable. If you cancel the event, the popup stays open.
|
|
200
192
|
*/
|
|
201
193
|
close = new EventEmitter();
|
|
202
194
|
dropdownButton;
|
|
@@ -7,6 +7,17 @@ import { ToolBarToolComponent } from './toolbar-tool.component';
|
|
|
7
7
|
import * as i0 from "@angular/core";
|
|
8
8
|
/**
|
|
9
9
|
* Represents the [Kendo UI ToolBar Separator for Angular]({% slug controltypes_toolbar %}#toc-separators).
|
|
10
|
+
*
|
|
11
|
+
* Use this component to add a visual separator between ToolBar tools.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```html
|
|
15
|
+
* <kendo-toolbar>
|
|
16
|
+
* <kendo-toolbar-button text="Button 1"></kendo-toolbar-button>
|
|
17
|
+
* <kendo-toolbar-separator></kendo-toolbar-separator>
|
|
18
|
+
* <kendo-toolbar-button text="Button 2"></kendo-toolbar-button>
|
|
19
|
+
* </kendo-toolbar>
|
|
20
|
+
* ```
|
|
10
21
|
*/
|
|
11
22
|
export class ToolBarSeparatorComponent extends ToolBarToolComponent {
|
|
12
23
|
separator;
|
|
@@ -7,6 +7,17 @@ import { ToolBarToolComponent } from './toolbar-tool.component';
|
|
|
7
7
|
import * as i0 from "@angular/core";
|
|
8
8
|
/**
|
|
9
9
|
* Represents the [Kendo UI ToolBar Spacer for Angular]({% slug controltypes_toolbar %}#toc-separators).
|
|
10
|
+
*
|
|
11
|
+
* Use the ToolBar Spacer to add flexible space between ToolBar tools.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```html
|
|
15
|
+
* <kendo-toolbar>
|
|
16
|
+
* <kendo-toolbar-button text="Button 1"></kendo-toolbar-button>
|
|
17
|
+
* <kendo-toolbar-spacer></kendo-toolbar-spacer>
|
|
18
|
+
* <kendo-toolbar-button text="Button 2"></kendo-toolbar-button>
|
|
19
|
+
* </kendo-toolbar>
|
|
20
|
+
* ```
|
|
10
21
|
*/
|
|
11
22
|
export class ToolBarSpacerComponent extends ToolBarToolComponent {
|
|
12
23
|
/**
|
|
@@ -13,13 +13,24 @@ import { ToolBarComponent } from '../toolbar.component';
|
|
|
13
13
|
import * as i0 from "@angular/core";
|
|
14
14
|
import * as i1 from "../toolbar.component";
|
|
15
15
|
/**
|
|
16
|
-
* Represents the [Kendo UI ToolBar SplitButton for Angular](slug:controltypes_toolbar#
|
|
16
|
+
* Represents the [Kendo UI ToolBar SplitButton for Angular](slug:controltypes_toolbar#split-buttons).
|
|
17
|
+
*
|
|
18
|
+
* Use the ToolBar SplitButton to create a split button with a main button and a drop-down list of actions in the ToolBar.
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```html
|
|
22
|
+
* <kendo-toolbar>
|
|
23
|
+
* <kendo-toolbar-splitbutton text="Paste" [data]="data">
|
|
24
|
+
* </kendo-toolbar-splitbutton>
|
|
25
|
+
* </kendo-toolbar>
|
|
26
|
+
* ```
|
|
17
27
|
*/
|
|
18
28
|
export class ToolBarSplitButtonComponent extends ToolBarToolComponent {
|
|
19
29
|
host;
|
|
20
30
|
// showText and showIcon showIcon should be declared first
|
|
21
31
|
/**
|
|
22
|
-
*
|
|
32
|
+
* Controls the button text visibility.
|
|
33
|
+
* @default 'always'
|
|
23
34
|
*/
|
|
24
35
|
set showText(value) {
|
|
25
36
|
this._showText = value;
|
|
@@ -29,7 +40,8 @@ export class ToolBarSplitButtonComponent extends ToolBarToolComponent {
|
|
|
29
40
|
return this._showText;
|
|
30
41
|
}
|
|
31
42
|
/**
|
|
32
|
-
*
|
|
43
|
+
* Controls the button icon visibility.
|
|
44
|
+
* @default 'always'
|
|
33
45
|
*/
|
|
34
46
|
set showIcon(value) {
|
|
35
47
|
this._showIcon = value;
|
|
@@ -49,7 +61,7 @@ export class ToolBarSplitButtonComponent extends ToolBarToolComponent {
|
|
|
49
61
|
return this._text;
|
|
50
62
|
}
|
|
51
63
|
/**
|
|
52
|
-
*
|
|
64
|
+
* Sets the icon rendered next to the button text
|
|
53
65
|
* ([see example](slug:controltypes_toolbar#toc-split-buttons)).
|
|
54
66
|
*/
|
|
55
67
|
set icon(icon) {
|
|
@@ -57,8 +69,8 @@ export class ToolBarSplitButtonComponent extends ToolBarToolComponent {
|
|
|
57
69
|
this.overflowOptions.icon = getValueForLocation(icon, this.showIcon, true);
|
|
58
70
|
}
|
|
59
71
|
/**
|
|
60
|
-
*
|
|
61
|
-
*
|
|
72
|
+
* Sets the `SVGIcon` rendered in the main button.
|
|
73
|
+
* Accepts an [existing Kendo SVG icon](slug:svgicon_list) or a custom one.
|
|
62
74
|
*/
|
|
63
75
|
set svgIcon(icon) {
|
|
64
76
|
const isIconSet = this.toolbarOptions.icon || this.overflowOptions.icon;
|
|
@@ -73,29 +85,27 @@ export class ToolBarSplitButtonComponent extends ToolBarToolComponent {
|
|
|
73
85
|
this.overflowOptions.svgIcon = getValueForLocation(icon, this.showIcon, true);
|
|
74
86
|
}
|
|
75
87
|
/**
|
|
76
|
-
*
|
|
88
|
+
* Sets a custom CSS class icon rendered next to the button text.
|
|
77
89
|
*/
|
|
78
90
|
set iconClass(iconClass) {
|
|
79
91
|
this.toolbarOptions.iconClass = getValueForLocation(iconClass, this.showIcon, false);
|
|
80
92
|
this.overflowOptions.iconClass = getValueForLocation(iconClass, this.showIcon, true);
|
|
81
93
|
}
|
|
82
94
|
/**
|
|
83
|
-
*
|
|
95
|
+
* Sets a URL for the image displayed next to the button text.
|
|
84
96
|
*/
|
|
85
97
|
set imageUrl(imageUrl) {
|
|
86
98
|
this.toolbarOptions.imageUrl = getValueForLocation(imageUrl, this.showIcon, false);
|
|
87
99
|
this.overflowOptions.imageUrl = getValueForLocation(imageUrl, this.showIcon, true);
|
|
88
100
|
}
|
|
89
101
|
/**
|
|
90
|
-
* When
|
|
102
|
+
* When `true`, disables a SplitButton item.
|
|
91
103
|
*/
|
|
92
104
|
disabled;
|
|
93
105
|
/**
|
|
94
106
|
* Configures the popup of the SplitButton.
|
|
95
|
-
*
|
|
96
|
-
|
|
97
|
-
* - `animate:Boolean`—Controls the popup animation. By default, the open and close animations are enabled.
|
|
98
|
-
* - `popupClass:String`—Specifies a list of CSS classes that are used to style the popup.
|
|
107
|
+
* Accepts a `PopupSettings` object that allows you to customize the popup behavior and appearance.
|
|
108
|
+
|
|
99
109
|
*/
|
|
100
110
|
set popupSettings(value) {
|
|
101
111
|
this._popupSettings = value;
|
|
@@ -107,33 +117,15 @@ export class ToolBarSplitButtonComponent extends ToolBarToolComponent {
|
|
|
107
117
|
return this._popupSettings;
|
|
108
118
|
}
|
|
109
119
|
/**
|
|
110
|
-
*
|
|
111
|
-
*
|
|
112
|
-
*
|
|
113
|
-
* * `solid` (default)
|
|
114
|
-
* * `flat`
|
|
115
|
-
* * `outline`
|
|
116
|
-
* * `link`
|
|
117
|
-
* * `null`
|
|
120
|
+
* Sets the fill mode for the button.
|
|
121
|
+
* The fill mode represents the background and border styles.
|
|
122
|
+
* @default 'solid'
|
|
118
123
|
*/
|
|
119
124
|
fillMode = 'solid';
|
|
120
125
|
/**
|
|
121
|
-
*
|
|
122
|
-
* The theme color
|
|
123
|
-
*
|
|
124
|
-
* The possible values are:
|
|
125
|
-
* * `base` —Applies coloring based on the `base` theme color. (default)
|
|
126
|
-
* * `primary` —Applies coloring based on the `primary` theme color.
|
|
127
|
-
* * `secondary`—Applies coloring based on the `secondary` theme color.
|
|
128
|
-
* * `tertiary`— Applies coloring based on the `tertiary` theme color.
|
|
129
|
-
* * `info`—Applies coloring based on the `info` theme color.
|
|
130
|
-
* * `success`— Applies coloring based on the `success` theme color.
|
|
131
|
-
* * `warning`— Applies coloring based on the `warning` theme color.
|
|
132
|
-
* * `error`— Applies coloring based on the `error` theme color.
|
|
133
|
-
* * `dark`— Applies coloring based on the `dark` theme color.
|
|
134
|
-
* * `light`— Applies coloring based on the `light` theme color.
|
|
135
|
-
* * `inverse`— Applies coloring based on the `inverse` theme color.
|
|
136
|
-
* * `null` —Removes the default CSS class (no class would be rendered).
|
|
126
|
+
* Sets the predefined theme color for the button.
|
|
127
|
+
* The theme color applies to the background, border, and text.
|
|
128
|
+
* @default 'base'
|
|
137
129
|
*/
|
|
138
130
|
themeColor = 'base';
|
|
139
131
|
/**
|
|
@@ -145,33 +137,32 @@ export class ToolBarSplitButtonComponent extends ToolBarToolComponent {
|
|
|
145
137
|
}
|
|
146
138
|
}
|
|
147
139
|
/**
|
|
148
|
-
*
|
|
149
|
-
*
|
|
140
|
+
* Sets the CSS classes for the main button.
|
|
141
|
+
* Accepts values supported by [`ngClass`](link:site.data.urls.angular['ngclassapi']).
|
|
150
142
|
*/
|
|
151
143
|
buttonClass;
|
|
152
144
|
/**
|
|
153
|
-
*
|
|
154
|
-
*
|
|
145
|
+
* Sets the CSS classes for the arrow button that opens the popup.
|
|
146
|
+
* Accepts values supported by [`ngClass`](link:site.data.urls.angular['ngclassapi']).
|
|
155
147
|
*/
|
|
156
148
|
arrowButtonClass;
|
|
157
149
|
/**
|
|
158
|
-
*
|
|
159
|
-
* be rendered for the button which opens the popup.
|
|
150
|
+
* Sets the name of the [font icon](slug:icons#icons-list) for the arrow button.
|
|
160
151
|
*/
|
|
161
152
|
arrowButtonIcon = 'caret-alt-down';
|
|
162
153
|
/**
|
|
163
|
-
*
|
|
164
|
-
* be rendered for the button which opens the popup.
|
|
154
|
+
* Sets the [`SVGIcon`](slug:api_icons_svgicon) for the arrow button.
|
|
165
155
|
*/
|
|
166
156
|
arrowButtonSvgIcon = caretAltDownIcon;
|
|
167
157
|
/**
|
|
168
|
-
*
|
|
158
|
+
* Sets the text field for the button-list popup.
|
|
159
|
+
* @default 'text'
|
|
169
160
|
*/
|
|
170
161
|
textField = 'text';
|
|
171
162
|
/**
|
|
172
163
|
* Sets the data of the SplitButton ([see example](slug:controltypes_toolbar#toc-split-buttons)).
|
|
173
164
|
*
|
|
174
|
-
* >
|
|
165
|
+
* > Provide the data as an array-like list.
|
|
175
166
|
*/
|
|
176
167
|
set data(data) {
|
|
177
168
|
this._data = data || [];
|
|
@@ -183,22 +174,22 @@ export class ToolBarSplitButtonComponent extends ToolBarToolComponent {
|
|
|
183
174
|
return this._data;
|
|
184
175
|
}
|
|
185
176
|
/**
|
|
186
|
-
* Fires
|
|
177
|
+
* Fires when the user clicks the main button.
|
|
187
178
|
*/
|
|
188
179
|
buttonClick = new EventEmitter();
|
|
189
180
|
/**
|
|
190
|
-
* Fires
|
|
191
|
-
* The event data contains the
|
|
181
|
+
* Fires when the user clicks a drop-down list item.
|
|
182
|
+
* The event data contains the clicked item's data.
|
|
192
183
|
*/
|
|
193
184
|
itemClick = new EventEmitter();
|
|
194
185
|
/**
|
|
195
|
-
* Fires
|
|
196
|
-
* This event is preventable. If you cancel the event, the popup
|
|
186
|
+
* Fires when the popup is about to open.
|
|
187
|
+
* This event is preventable. If you cancel the event, the popup stays closed.
|
|
197
188
|
*/
|
|
198
189
|
open = new EventEmitter();
|
|
199
190
|
/**
|
|
200
|
-
* Fires
|
|
201
|
-
* This event is preventable. If you cancel the event, the popup
|
|
191
|
+
* Fires when the popup is about to close.
|
|
192
|
+
* This event is preventable. If you cancel the event, the popup stays open.
|
|
202
193
|
*/
|
|
203
194
|
close = new EventEmitter();
|
|
204
195
|
toolbarOptions = {
|
|
@@ -5,8 +5,27 @@
|
|
|
5
5
|
import { TemplateRef, Input, Directive, ElementRef, inject, ViewChild } from '@angular/core';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
7
|
/**
|
|
8
|
-
* Represents the
|
|
9
|
-
*
|
|
8
|
+
* Represents the base ToolBar Tool component for Angular.
|
|
9
|
+
*
|
|
10
|
+
* Extend this class to create a custom tool for the ToolBar.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```typescript
|
|
14
|
+
* import { Component } from '@angular/core';
|
|
15
|
+
* import { ToolBarToolComponent } from '@progress/kendo-angular-toolbar';
|
|
16
|
+
*
|
|
17
|
+
* @Component({
|
|
18
|
+
* providers: [{ provide: ToolBarToolComponent, useExisting: forwardRef(() => CustomToolComponent) }],
|
|
19
|
+
* selector: 'custom-tool',
|
|
20
|
+
* })
|
|
21
|
+
*
|
|
22
|
+
* export class CustomToolComponent extends ToolBarToolComponent {
|
|
23
|
+
*
|
|
24
|
+
* constructor() {
|
|
25
|
+
* super();
|
|
26
|
+
* }
|
|
27
|
+
* }
|
|
28
|
+
* ```
|
|
10
29
|
*/
|
|
11
30
|
export class ToolBarToolComponent {
|
|
12
31
|
toolbarTemplate;
|
|
@@ -40,27 +59,27 @@ export class ToolBarToolComponent {
|
|
|
40
59
|
return this.overflows ? 'block' : 'none';
|
|
41
60
|
}
|
|
42
61
|
/**
|
|
43
|
-
* Determines if the tool can
|
|
44
|
-
*
|
|
45
|
-
* @returns `true` if the tool
|
|
62
|
+
* Determines if the tool can receive focus.
|
|
63
|
+
* Returns `true` if the tool participates in keyboard navigation.
|
|
64
|
+
* @returns `true` if the tool is focusable.
|
|
46
65
|
*/
|
|
47
66
|
canFocus() {
|
|
48
67
|
return false;
|
|
49
68
|
}
|
|
50
69
|
/**
|
|
51
|
-
* Called when the tool
|
|
52
|
-
*
|
|
53
|
-
* @param {Event} _ev -
|
|
70
|
+
* Called when the tool receives focus.
|
|
71
|
+
* Accepts the original browser event, which can be a `KeyboardEvent`, `MouseEvent`, or `FocusEvent`.
|
|
72
|
+
* @param {Event} _ev - The event that triggers focus for the tool.
|
|
54
73
|
*/
|
|
55
74
|
focus(_ev) {
|
|
56
75
|
/* noop */
|
|
57
76
|
}
|
|
58
77
|
/**
|
|
59
|
-
* Called when the tool is focused and
|
|
60
|
-
*
|
|
78
|
+
* Called when the tool is focused and an arrow key is pressed.
|
|
79
|
+
* Returns a boolean value that determines if the `ToolBarComponent` moves focus to the next or previous tool
|
|
61
80
|
* ([see example]({% slug customcontroltypes_toolbar %}#toc-adding-keyboard-navigation)).
|
|
62
|
-
* @param {KeyboardEvent} _ev - The last pressed arrow key
|
|
63
|
-
* @returns
|
|
81
|
+
* @param {KeyboardEvent} _ev - The last pressed arrow key.
|
|
82
|
+
* @returns `true` if focus moves to another tool.
|
|
64
83
|
*/
|
|
65
84
|
handleKey(_ev) {
|
|
66
85
|
return false;
|