@progress/kendo-angular-toolbar 5.0.4 → 6.0.0-dev.202204190531
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/bundles/kendo-angular-toolbar.umd.js +5 -0
- package/{dist/es2015/common → common}/constants.d.ts +0 -0
- package/{dist/es2015/common → common}/preventable-event.d.ts +0 -0
- package/{dist/es2015/common → common}/renderer-click.d.ts +0 -0
- package/{dist/es2015/direction.d.ts → direction.d.ts} +0 -0
- package/{dist/es2015/display-mode.d.ts → display-mode.d.ts} +0 -0
- package/{dist/es2015 → esm2015}/common/constants.js +0 -0
- package/{dist/es2015 → esm2015}/common/preventable-event.js +0 -0
- package/{dist/es → esm2015}/common/renderer-click.js +1 -0
- package/{dist/es2015 → esm2015}/direction.js +1 -0
- package/{dist/es2015 → esm2015}/display-mode.js +1 -0
- package/{dist/es2015 → esm2015}/group-selection-settings.js +1 -0
- package/{dist/es/common/constants.js → esm2015/kendo-angular-toolbar.js} +2 -2
- package/esm2015/localization/custom-messages.component.js +40 -0
- package/esm2015/localization/localized-toolbar-messages.directive.js +36 -0
- package/esm2015/localization/messages.js +23 -0
- package/{dist/es → esm2015}/main.js +0 -0
- package/{dist/es2015 → esm2015}/navigation.service.js +9 -9
- package/{dist/es2015 → esm2015}/package-metadata.js +1 -1
- package/{dist/es → esm2015}/popup-settings.js +1 -0
- package/{dist/es2015 → esm2015}/refresh.service.js +8 -10
- package/{dist/es → esm2015}/render-location.js +1 -0
- package/{dist/es2015 → esm2015}/renderer.component.js +36 -41
- package/{dist/es2015 → esm2015}/renderer.service.js +8 -7
- package/{dist/es → esm2015}/tool-options.js +1 -0
- package/{dist/es2015 → esm2015}/toolbar.component.js +164 -131
- package/{dist/es2015 → esm2015}/toolbar.module.js +27 -11
- package/{dist/es2015 → esm2015}/tools/toolbar-button.component.js +117 -114
- package/esm2015/tools/toolbar-buttongroup.component.js +267 -0
- package/esm2015/tools/toolbar-buttonlist.component.js +94 -0
- package/{dist/es2015 → esm2015}/tools/toolbar-dropdownbutton.component.js +119 -121
- package/esm2015/tools/toolbar-separator.component.js +68 -0
- package/{dist/es2015 → esm2015}/tools/toolbar-splitbutton.component.js +128 -126
- package/{dist/es2015 → esm2015}/tools/toolbar-tool.component.js +15 -19
- package/{dist/es2015 → esm2015}/util.js +0 -0
- package/{dist/fesm2015/index.js → fesm2015/kendo-angular-toolbar.js} +1012 -879
- package/{dist/es2015/group-selection-settings.d.ts → group-selection-settings.d.ts} +0 -0
- package/kendo-angular-toolbar.d.ts +9 -0
- package/{dist/es2015/localization → localization}/custom-messages.component.d.ts +4 -1
- package/{dist/es2015/localization → localization}/localized-toolbar-messages.directive.d.ts +3 -0
- package/{dist/es2015/localization → localization}/messages.d.ts +3 -0
- package/{dist/es2015/main.d.ts → main.d.ts} +0 -0
- package/{dist/es2015/navigation.service.d.ts → navigation.service.d.ts} +3 -0
- package/{dist/es2015/package-metadata.d.ts → package-metadata.d.ts} +0 -0
- package/package.json +34 -102
- package/{dist/es2015/popup-settings.d.ts → popup-settings.d.ts} +0 -0
- package/{dist/es2015/refresh.service.d.ts → refresh.service.d.ts} +3 -0
- package/{dist/es2015/render-location.d.ts → render-location.d.ts} +0 -0
- package/{dist/es2015/renderer.component.d.ts → renderer.component.d.ts} +4 -1
- package/{dist/es2015/renderer.service.d.ts → renderer.service.d.ts} +3 -0
- package/schematics/ngAdd/index.js +5 -2
- package/schematics/ngAdd/index.js.map +1 -1
- package/{dist/es2015/tool-options.d.ts → tool-options.d.ts} +0 -0
- package/{dist/es2015/toolbar.component.d.ts → toolbar.component.d.ts} +26 -17
- package/toolbar.module.d.ts +37 -0
- package/{dist/es2015/tools → tools}/toolbar-button.component.d.ts +10 -6
- package/{dist/es2015/tools → tools}/toolbar-buttongroup.component.d.ts +7 -5
- package/{dist/es2015/tools → tools}/toolbar-buttonlist.component.d.ts +3 -0
- package/{dist/es2015/tools → tools}/toolbar-dropdownbutton.component.d.ts +15 -10
- package/{dist/es2015/tools → tools}/toolbar-separator.component.d.ts +3 -0
- package/{dist/es2015/tools → tools}/toolbar-splitbutton.component.d.ts +14 -9
- package/{dist/es2015/tools → tools}/toolbar-tool.component.d.ts +5 -2
- package/{dist/es2015/util.d.ts → util.d.ts} +0 -0
- package/dist/cdn/js/kendo-angular-toolbar.js +0 -20
- package/dist/cdn/main.js +0 -5
- package/dist/es/common/preventable-event.js +0 -29
- package/dist/es/direction.js +0 -4
- package/dist/es/display-mode.js +0 -4
- package/dist/es/group-selection-settings.js +0 -4
- package/dist/es/index.js +0 -14
- package/dist/es/localization/custom-messages.component.js +0 -43
- package/dist/es/localization/localized-toolbar-messages.directive.js +0 -35
- package/dist/es/localization/messages.js +0 -22
- package/dist/es/navigation.service.js +0 -130
- package/dist/es/package-metadata.js +0 -15
- package/dist/es/refresh.service.js +0 -22
- package/dist/es/renderer.component.js +0 -132
- package/dist/es/renderer.service.js +0 -52
- package/dist/es/toolbar.component.js +0 -648
- package/dist/es/toolbar.module.js +0 -60
- package/dist/es/tools/toolbar-button.component.js +0 -310
- package/dist/es/tools/toolbar-buttongroup.component.js +0 -165
- package/dist/es/tools/toolbar-buttonlist.component.js +0 -66
- package/dist/es/tools/toolbar-dropdownbutton.component.js +0 -368
- package/dist/es/tools/toolbar-separator.component.js +0 -67
- package/dist/es/tools/toolbar-splitbutton.component.js +0 -380
- package/dist/es/tools/toolbar-tool.component.js +0 -76
- package/dist/es/util.js +0 -204
- package/dist/es2015/common/renderer-click.js +0 -4
- package/dist/es2015/index.d.ts +0 -14
- package/dist/es2015/index.js +0 -14
- package/dist/es2015/index.metadata.json +0 -1
- package/dist/es2015/localization/custom-messages.component.js +0 -35
- package/dist/es2015/localization/localized-toolbar-messages.directive.js +0 -31
- package/dist/es2015/localization/messages.js +0 -16
- package/dist/es2015/main.js +0 -14
- package/dist/es2015/popup-settings.js +0 -4
- package/dist/es2015/render-location.js +0 -4
- package/dist/es2015/tool-options.js +0 -4
- package/dist/es2015/toolbar.module.d.ts +0 -18
- package/dist/es2015/tools/toolbar-buttongroup.component.js +0 -216
- package/dist/es2015/tools/toolbar-buttonlist.component.js +0 -87
- package/dist/es2015/tools/toolbar-separator.component.js +0 -68
- package/dist/fesm5/index.js +0 -2672
- package/dist/npm/common/constants.js +0 -10
- package/dist/npm/common/preventable-event.js +0 -31
- package/dist/npm/common/renderer-click.js +0 -6
- package/dist/npm/direction.js +0 -6
- package/dist/npm/display-mode.js +0 -6
- package/dist/npm/group-selection-settings.js +0 -6
- package/dist/npm/index.js +0 -23
- package/dist/npm/localization/custom-messages.component.js +0 -45
- package/dist/npm/localization/localized-toolbar-messages.directive.js +0 -37
- package/dist/npm/localization/messages.js +0 -24
- package/dist/npm/main.js +0 -26
- package/dist/npm/navigation.service.js +0 -132
- package/dist/npm/package-metadata.js +0 -17
- package/dist/npm/popup-settings.js +0 -6
- package/dist/npm/refresh.service.js +0 -24
- package/dist/npm/render-location.js +0 -6
- package/dist/npm/renderer.component.js +0 -134
- package/dist/npm/renderer.service.js +0 -54
- package/dist/npm/tool-options.js +0 -6
- package/dist/npm/toolbar.component.js +0 -650
- package/dist/npm/toolbar.module.js +0 -62
- package/dist/npm/tools/toolbar-button.component.js +0 -312
- package/dist/npm/tools/toolbar-buttongroup.component.js +0 -167
- package/dist/npm/tools/toolbar-buttonlist.component.js +0 -68
- package/dist/npm/tools/toolbar-dropdownbutton.component.js +0 -370
- package/dist/npm/tools/toolbar-separator.component.js +0 -69
- package/dist/npm/tools/toolbar-splitbutton.component.js +0 -382
- package/dist/npm/tools/toolbar-tool.component.js +0 -78
- package/dist/npm/util.js +0 -209
- package/dist/systemjs/kendo-angular-toolbar.js +0 -5
|
@@ -1,382 +0,0 @@
|
|
|
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
|
-
"use strict";
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
var tslib_1 = require("tslib");
|
|
8
|
-
var core_1 = require("@angular/core");
|
|
9
|
-
var kendo_angular_buttons_1 = require("@progress/kendo-angular-buttons");
|
|
10
|
-
var toolbar_tool_component_1 = require("./toolbar-tool.component");
|
|
11
|
-
var toolbar_buttonlist_component_1 = require("./toolbar-buttonlist.component");
|
|
12
|
-
var util_1 = require("../util");
|
|
13
|
-
/**
|
|
14
|
-
* Represents the [Kendo UI ToolBar SplitButton for Angular]({% slug controltypes_toolbar %}#toc-splitbuttons).
|
|
15
|
-
*/
|
|
16
|
-
var ToolBarSplitButtonComponent = /** @class */ (function (_super) {
|
|
17
|
-
tslib_1.__extends(ToolBarSplitButtonComponent, _super);
|
|
18
|
-
function ToolBarSplitButtonComponent() {
|
|
19
|
-
var _this = _super.call(this) || this;
|
|
20
|
-
// showText and showIcon showIcon should be declared first
|
|
21
|
-
/**
|
|
22
|
-
* Specifies where button text should be displayed
|
|
23
|
-
*/
|
|
24
|
-
_this.showText = 'both';
|
|
25
|
-
/**
|
|
26
|
-
* Specifies where button icon should be displayed
|
|
27
|
-
*/
|
|
28
|
-
_this.showIcon = 'both';
|
|
29
|
-
/**
|
|
30
|
-
* The fillMode property specifies the background and border styles of the Button.
|
|
31
|
-
*
|
|
32
|
-
* The available values are:
|
|
33
|
-
* * `solid` (default)
|
|
34
|
-
* * `flat`
|
|
35
|
-
* * `outline`
|
|
36
|
-
* * `link`
|
|
37
|
-
* * `null`
|
|
38
|
-
*/
|
|
39
|
-
_this.fillMode = 'solid';
|
|
40
|
-
/**
|
|
41
|
-
* The Button allows you to specify predefined theme colors.
|
|
42
|
-
* The theme color will be applied as a background and border color while also amending the text color accordingly.
|
|
43
|
-
*
|
|
44
|
-
* The possible values are:
|
|
45
|
-
* * `base` —Applies coloring based on the `base` theme color. (default)
|
|
46
|
-
* * `primary` —Applies coloring based on the `primary` theme color.
|
|
47
|
-
* * `secondary`—Applies coloring based on the `secondary` theme color.
|
|
48
|
-
* * `tertiary`— Applies coloring based on the `tertiary` theme color.
|
|
49
|
-
* * `info`—Applies coloring based on the `info` theme color.
|
|
50
|
-
* * `success`— Applies coloring based on the `success` theme color.
|
|
51
|
-
* * `warning`— Applies coloring based on the `warning` theme color.
|
|
52
|
-
* * `error`— Applies coloring based on the `error` theme color.
|
|
53
|
-
* * `dark`— Applies coloring based on the `dark` theme color.
|
|
54
|
-
* * `light`— Applies coloring based on the `light` theme color.
|
|
55
|
-
* * `inverse`— Applies coloring based on the `inverse` theme color.
|
|
56
|
-
* * `null` —Removes the default CSS class (no class would be rendered).
|
|
57
|
-
*/
|
|
58
|
-
_this.themeColor = 'base';
|
|
59
|
-
/**
|
|
60
|
-
* Specifies the name of the [font icon]({% slug icons %}#toc-list-of-font-icons) that will
|
|
61
|
-
* be rendered for the button which opens the popup.
|
|
62
|
-
*/
|
|
63
|
-
_this.arrowButtonIcon = 'arrow-s';
|
|
64
|
-
/**
|
|
65
|
-
* Configures the text field of the button-list popup.
|
|
66
|
-
*/
|
|
67
|
-
_this.textField = 'text';
|
|
68
|
-
/**
|
|
69
|
-
* Fires each time the user clicks the main button.
|
|
70
|
-
*/
|
|
71
|
-
_this.buttonClick = new core_1.EventEmitter();
|
|
72
|
-
/**
|
|
73
|
-
* Fires each time the user clicks the drop-down list.
|
|
74
|
-
* The event data contains the data item that is bound to the clicked list item.
|
|
75
|
-
*/
|
|
76
|
-
_this.itemClick = new core_1.EventEmitter();
|
|
77
|
-
/**
|
|
78
|
-
* Fires each time the popup is about to open.
|
|
79
|
-
* This event is preventable. If you cancel the event, the popup will remain closed.
|
|
80
|
-
*/
|
|
81
|
-
_this.open = new core_1.EventEmitter();
|
|
82
|
-
/**
|
|
83
|
-
* Fires each time the popup is about to close.
|
|
84
|
-
* This event is preventable. If you cancel the event, the popup will remain open.
|
|
85
|
-
*/
|
|
86
|
-
_this.close = new core_1.EventEmitter();
|
|
87
|
-
_this.toolbarOptions = {
|
|
88
|
-
text: '',
|
|
89
|
-
icon: '',
|
|
90
|
-
iconClass: '',
|
|
91
|
-
imageUrl: ''
|
|
92
|
-
};
|
|
93
|
-
_this.overflowOptions = {
|
|
94
|
-
text: '',
|
|
95
|
-
icon: '',
|
|
96
|
-
iconClass: '',
|
|
97
|
-
imageUrl: ''
|
|
98
|
-
};
|
|
99
|
-
_this._popupSettings = { animate: true, popupClass: '' };
|
|
100
|
-
_this.focusedIndex = -1;
|
|
101
|
-
_this.getNextKey = util_1.getNextKey();
|
|
102
|
-
_this.getPrevKey = util_1.getPrevKey();
|
|
103
|
-
return _this;
|
|
104
|
-
}
|
|
105
|
-
ToolBarSplitButtonComponent_1 = ToolBarSplitButtonComponent;
|
|
106
|
-
Object.defineProperty(ToolBarSplitButtonComponent.prototype, "text", {
|
|
107
|
-
/**
|
|
108
|
-
* Sets the text of the SplitButton ([see example]({% slug controltypes_toolbar %}#toc-splitbuttons).
|
|
109
|
-
*/
|
|
110
|
-
set: function (text) {
|
|
111
|
-
this.toolbarOptions.text = util_1.getValueForLocation(text, this.showText, false);
|
|
112
|
-
this.overflowOptions.text = util_1.getValueForLocation(text, this.showText, true);
|
|
113
|
-
},
|
|
114
|
-
enumerable: true,
|
|
115
|
-
configurable: true
|
|
116
|
-
});
|
|
117
|
-
Object.defineProperty(ToolBarSplitButtonComponent.prototype, "icon", {
|
|
118
|
-
/**
|
|
119
|
-
* Defines the icon that will be rendered next to the button text
|
|
120
|
-
* ([see example]({% slug controltypes_toolbar %}#toc-splitbuttons)).
|
|
121
|
-
*/
|
|
122
|
-
set: function (icon) {
|
|
123
|
-
this.toolbarOptions.icon = util_1.getValueForLocation(icon, this.showIcon, false);
|
|
124
|
-
this.overflowOptions.icon = util_1.getValueForLocation(icon, this.showIcon, true);
|
|
125
|
-
},
|
|
126
|
-
enumerable: true,
|
|
127
|
-
configurable: true
|
|
128
|
-
});
|
|
129
|
-
Object.defineProperty(ToolBarSplitButtonComponent.prototype, "iconClass", {
|
|
130
|
-
/**
|
|
131
|
-
* Defines an icon with a custom CSS class that will be rendered next to the button text.
|
|
132
|
-
*/
|
|
133
|
-
set: function (iconClass) {
|
|
134
|
-
this.toolbarOptions.iconClass = util_1.getValueForLocation(iconClass, this.showIcon, false);
|
|
135
|
-
this.overflowOptions.iconClass = util_1.getValueForLocation(iconClass, this.showIcon, true);
|
|
136
|
-
},
|
|
137
|
-
enumerable: true,
|
|
138
|
-
configurable: true
|
|
139
|
-
});
|
|
140
|
-
Object.defineProperty(ToolBarSplitButtonComponent.prototype, "imageUrl", {
|
|
141
|
-
/**
|
|
142
|
-
* Defines the location of an image that will be displayed next to the button text.
|
|
143
|
-
*/
|
|
144
|
-
set: function (imageUrl) {
|
|
145
|
-
this.toolbarOptions.imageUrl = util_1.getValueForLocation(imageUrl, this.showIcon, false);
|
|
146
|
-
this.overflowOptions.imageUrl = util_1.getValueForLocation(imageUrl, this.showIcon, true);
|
|
147
|
-
},
|
|
148
|
-
enumerable: true,
|
|
149
|
-
configurable: true
|
|
150
|
-
});
|
|
151
|
-
Object.defineProperty(ToolBarSplitButtonComponent.prototype, "popupSettings", {
|
|
152
|
-
get: function () {
|
|
153
|
-
if (!this._popupSettings) {
|
|
154
|
-
this._popupSettings = { animate: true, popupClass: '' };
|
|
155
|
-
}
|
|
156
|
-
return this._popupSettings;
|
|
157
|
-
},
|
|
158
|
-
/**
|
|
159
|
-
* Configures the popup of the SplitButton.
|
|
160
|
-
*
|
|
161
|
-
* The available options are:
|
|
162
|
-
* - `animate:Boolean`—Controls the popup animation. By default, the open and close animations are enabled.
|
|
163
|
-
* - `popupClass:String`—Specifies a list of CSS classes that are used to style the popup.
|
|
164
|
-
*/
|
|
165
|
-
set: function (value) {
|
|
166
|
-
this._popupSettings = value;
|
|
167
|
-
},
|
|
168
|
-
enumerable: true,
|
|
169
|
-
configurable: true
|
|
170
|
-
});
|
|
171
|
-
Object.defineProperty(ToolBarSplitButtonComponent.prototype, "look", {
|
|
172
|
-
/**
|
|
173
|
-
* @hidden
|
|
174
|
-
*/
|
|
175
|
-
set: function (look) {
|
|
176
|
-
if (look) {
|
|
177
|
-
this.fillMode = look === 'default' ? 'solid' : look;
|
|
178
|
-
}
|
|
179
|
-
},
|
|
180
|
-
enumerable: true,
|
|
181
|
-
configurable: true
|
|
182
|
-
});
|
|
183
|
-
Object.defineProperty(ToolBarSplitButtonComponent.prototype, "data", {
|
|
184
|
-
get: function () {
|
|
185
|
-
if (!this._data) {
|
|
186
|
-
this.data = [];
|
|
187
|
-
}
|
|
188
|
-
return this._data;
|
|
189
|
-
},
|
|
190
|
-
/**
|
|
191
|
-
* Sets the data of the SplitButton ([see example]({% slug controltypes_toolbar %}#toc-splitbuttons)).
|
|
192
|
-
*
|
|
193
|
-
* > The data has to be provided in an array-like list.
|
|
194
|
-
*/
|
|
195
|
-
set: function (data) {
|
|
196
|
-
this._data = data || [];
|
|
197
|
-
},
|
|
198
|
-
enumerable: true,
|
|
199
|
-
configurable: true
|
|
200
|
-
});
|
|
201
|
-
Object.defineProperty(ToolBarSplitButtonComponent.prototype, "overflowButtons", {
|
|
202
|
-
get: function () {
|
|
203
|
-
return [this.overflowSplitButton].concat(this.overflowSplitButtonButtonList.buttons.toArray().filter(function (b) { return !b.nativeElement.disabled; }));
|
|
204
|
-
},
|
|
205
|
-
enumerable: true,
|
|
206
|
-
configurable: true
|
|
207
|
-
});
|
|
208
|
-
/**
|
|
209
|
-
* @hidden
|
|
210
|
-
*/
|
|
211
|
-
ToolBarSplitButtonComponent.prototype.onButtonListClick = function (ev) {
|
|
212
|
-
this.focusedIndex = this.overflowButtons.findIndex(function (b) { return b.nativeElement.contains(ev.target); });
|
|
213
|
-
};
|
|
214
|
-
/**
|
|
215
|
-
* @hidden
|
|
216
|
-
*/
|
|
217
|
-
ToolBarSplitButtonComponent.prototype.onMainButtonClick = function (ev) {
|
|
218
|
-
this.buttonClick.emit(ev);
|
|
219
|
-
this.focusedIndex = 0;
|
|
220
|
-
};
|
|
221
|
-
/**
|
|
222
|
-
* @hidden
|
|
223
|
-
*/
|
|
224
|
-
ToolBarSplitButtonComponent.prototype.canFocus = function () {
|
|
225
|
-
return !this.disabled;
|
|
226
|
-
};
|
|
227
|
-
/**
|
|
228
|
-
* @hidden
|
|
229
|
-
*/
|
|
230
|
-
ToolBarSplitButtonComponent.prototype.focus = function (ev) {
|
|
231
|
-
if (ev === void 0) { ev = {}; }
|
|
232
|
-
if (!this.overflows) {
|
|
233
|
-
if (ev.type === 'focus' || ev.type === 'keydown') {
|
|
234
|
-
this.toolbarSplitButton.focus();
|
|
235
|
-
}
|
|
236
|
-
}
|
|
237
|
-
else if (this.overflowButtons.length > 0) {
|
|
238
|
-
this.focusedIndex = util_1.getIndexOfFocused(this.getPrevKey(), this.getNextKey(), this.overflowButtons.map(function (ob) { return ob.nativeElement; }))(ev);
|
|
239
|
-
this.focusButton(this.focusedIndex, ev);
|
|
240
|
-
}
|
|
241
|
-
};
|
|
242
|
-
/**
|
|
243
|
-
* @hidden
|
|
244
|
-
*/
|
|
245
|
-
ToolBarSplitButtonComponent.prototype.handleKey = function (ev) {
|
|
246
|
-
if (!this.overflows && (ev.keyCode === this.getPrevKey(this.overflows) || ev.keyCode === this.getNextKey(this.overflows))) {
|
|
247
|
-
return false;
|
|
248
|
-
}
|
|
249
|
-
if (this.overflows) {
|
|
250
|
-
var peekAtIndex = util_1.makePeeker(this.overflowButtons);
|
|
251
|
-
var isUnmodified = util_1.areEqual(this.focusedIndex);
|
|
252
|
-
this.focusedIndex = util_1.seekFocusedIndex(this.getPrevKey(), this.getNextKey(), peekAtIndex)(this.focusedIndex, ev);
|
|
253
|
-
this.focusButton(this.focusedIndex, ev);
|
|
254
|
-
return !isUnmodified(this.focusedIndex);
|
|
255
|
-
}
|
|
256
|
-
};
|
|
257
|
-
ToolBarSplitButtonComponent.prototype.focusButton = function (index, ev) {
|
|
258
|
-
if (!ev.type || ev.type === 'focus' || ev.type === 'keydown' || ev.type === 'click') {
|
|
259
|
-
this.overflowButtons[index].nativeElement.focus();
|
|
260
|
-
}
|
|
261
|
-
};
|
|
262
|
-
var ToolBarSplitButtonComponent_1;
|
|
263
|
-
tslib_1.__decorate([
|
|
264
|
-
core_1.Input(),
|
|
265
|
-
tslib_1.__metadata("design:type", String)
|
|
266
|
-
], ToolBarSplitButtonComponent.prototype, "showText", void 0);
|
|
267
|
-
tslib_1.__decorate([
|
|
268
|
-
core_1.Input(),
|
|
269
|
-
tslib_1.__metadata("design:type", String)
|
|
270
|
-
], ToolBarSplitButtonComponent.prototype, "showIcon", void 0);
|
|
271
|
-
tslib_1.__decorate([
|
|
272
|
-
core_1.Input(),
|
|
273
|
-
tslib_1.__metadata("design:type", String),
|
|
274
|
-
tslib_1.__metadata("design:paramtypes", [String])
|
|
275
|
-
], ToolBarSplitButtonComponent.prototype, "text", null);
|
|
276
|
-
tslib_1.__decorate([
|
|
277
|
-
core_1.Input(),
|
|
278
|
-
tslib_1.__metadata("design:type", String),
|
|
279
|
-
tslib_1.__metadata("design:paramtypes", [String])
|
|
280
|
-
], ToolBarSplitButtonComponent.prototype, "icon", null);
|
|
281
|
-
tslib_1.__decorate([
|
|
282
|
-
core_1.Input(),
|
|
283
|
-
tslib_1.__metadata("design:type", String),
|
|
284
|
-
tslib_1.__metadata("design:paramtypes", [String])
|
|
285
|
-
], ToolBarSplitButtonComponent.prototype, "iconClass", null);
|
|
286
|
-
tslib_1.__decorate([
|
|
287
|
-
core_1.Input(),
|
|
288
|
-
tslib_1.__metadata("design:type", String),
|
|
289
|
-
tslib_1.__metadata("design:paramtypes", [String])
|
|
290
|
-
], ToolBarSplitButtonComponent.prototype, "imageUrl", null);
|
|
291
|
-
tslib_1.__decorate([
|
|
292
|
-
core_1.Input(),
|
|
293
|
-
tslib_1.__metadata("design:type", Boolean)
|
|
294
|
-
], ToolBarSplitButtonComponent.prototype, "disabled", void 0);
|
|
295
|
-
tslib_1.__decorate([
|
|
296
|
-
core_1.Input(),
|
|
297
|
-
tslib_1.__metadata("design:type", Object),
|
|
298
|
-
tslib_1.__metadata("design:paramtypes", [Object])
|
|
299
|
-
], ToolBarSplitButtonComponent.prototype, "popupSettings", null);
|
|
300
|
-
tslib_1.__decorate([
|
|
301
|
-
core_1.Input(),
|
|
302
|
-
tslib_1.__metadata("design:type", String)
|
|
303
|
-
], ToolBarSplitButtonComponent.prototype, "fillMode", void 0);
|
|
304
|
-
tslib_1.__decorate([
|
|
305
|
-
core_1.Input(),
|
|
306
|
-
tslib_1.__metadata("design:type", String)
|
|
307
|
-
], ToolBarSplitButtonComponent.prototype, "themeColor", void 0);
|
|
308
|
-
tslib_1.__decorate([
|
|
309
|
-
core_1.Input(),
|
|
310
|
-
tslib_1.__metadata("design:type", String),
|
|
311
|
-
tslib_1.__metadata("design:paramtypes", [String])
|
|
312
|
-
], ToolBarSplitButtonComponent.prototype, "look", null);
|
|
313
|
-
tslib_1.__decorate([
|
|
314
|
-
core_1.Input(),
|
|
315
|
-
tslib_1.__metadata("design:type", String)
|
|
316
|
-
], ToolBarSplitButtonComponent.prototype, "buttonClass", void 0);
|
|
317
|
-
tslib_1.__decorate([
|
|
318
|
-
core_1.Input(),
|
|
319
|
-
tslib_1.__metadata("design:type", Object)
|
|
320
|
-
], ToolBarSplitButtonComponent.prototype, "arrowButtonClass", void 0);
|
|
321
|
-
tslib_1.__decorate([
|
|
322
|
-
core_1.Input(),
|
|
323
|
-
tslib_1.__metadata("design:type", String)
|
|
324
|
-
], ToolBarSplitButtonComponent.prototype, "arrowButtonIcon", void 0);
|
|
325
|
-
tslib_1.__decorate([
|
|
326
|
-
core_1.Input(),
|
|
327
|
-
tslib_1.__metadata("design:type", String)
|
|
328
|
-
], ToolBarSplitButtonComponent.prototype, "textField", void 0);
|
|
329
|
-
tslib_1.__decorate([
|
|
330
|
-
core_1.Input(),
|
|
331
|
-
tslib_1.__metadata("design:type", Array),
|
|
332
|
-
tslib_1.__metadata("design:paramtypes", [Array])
|
|
333
|
-
], ToolBarSplitButtonComponent.prototype, "data", null);
|
|
334
|
-
tslib_1.__decorate([
|
|
335
|
-
core_1.Output(),
|
|
336
|
-
tslib_1.__metadata("design:type", core_1.EventEmitter)
|
|
337
|
-
], ToolBarSplitButtonComponent.prototype, "buttonClick", void 0);
|
|
338
|
-
tslib_1.__decorate([
|
|
339
|
-
core_1.Output(),
|
|
340
|
-
tslib_1.__metadata("design:type", core_1.EventEmitter)
|
|
341
|
-
], ToolBarSplitButtonComponent.prototype, "itemClick", void 0);
|
|
342
|
-
tslib_1.__decorate([
|
|
343
|
-
core_1.Output(),
|
|
344
|
-
tslib_1.__metadata("design:type", core_1.EventEmitter)
|
|
345
|
-
], ToolBarSplitButtonComponent.prototype, "open", void 0);
|
|
346
|
-
tslib_1.__decorate([
|
|
347
|
-
core_1.Output(),
|
|
348
|
-
tslib_1.__metadata("design:type", core_1.EventEmitter)
|
|
349
|
-
], ToolBarSplitButtonComponent.prototype, "close", void 0);
|
|
350
|
-
tslib_1.__decorate([
|
|
351
|
-
core_1.ViewChild('toolbarTemplate', { static: true }),
|
|
352
|
-
tslib_1.__metadata("design:type", core_1.TemplateRef)
|
|
353
|
-
], ToolBarSplitButtonComponent.prototype, "toolbarTemplate", void 0);
|
|
354
|
-
tslib_1.__decorate([
|
|
355
|
-
core_1.ViewChild('popupTemplate', { static: true }),
|
|
356
|
-
tslib_1.__metadata("design:type", core_1.TemplateRef)
|
|
357
|
-
], ToolBarSplitButtonComponent.prototype, "popupTemplate", void 0);
|
|
358
|
-
tslib_1.__decorate([
|
|
359
|
-
core_1.ViewChild('toolbarSplitButton', { static: false }),
|
|
360
|
-
tslib_1.__metadata("design:type", kendo_angular_buttons_1.SplitButtonComponent)
|
|
361
|
-
], ToolBarSplitButtonComponent.prototype, "toolbarSplitButton", void 0);
|
|
362
|
-
tslib_1.__decorate([
|
|
363
|
-
core_1.ViewChild('overflowSplitButton', { read: core_1.ElementRef, static: false }),
|
|
364
|
-
tslib_1.__metadata("design:type", core_1.ElementRef)
|
|
365
|
-
], ToolBarSplitButtonComponent.prototype, "overflowSplitButton", void 0);
|
|
366
|
-
tslib_1.__decorate([
|
|
367
|
-
core_1.ViewChild('overflowSplitButtonButtonList', { static: false }),
|
|
368
|
-
tslib_1.__metadata("design:type", toolbar_buttonlist_component_1.ToolBarButtonListComponent)
|
|
369
|
-
], ToolBarSplitButtonComponent.prototype, "overflowSplitButtonButtonList", void 0);
|
|
370
|
-
ToolBarSplitButtonComponent = ToolBarSplitButtonComponent_1 = tslib_1.__decorate([
|
|
371
|
-
core_1.Component({
|
|
372
|
-
exportAs: 'kendoToolBarSplitButton',
|
|
373
|
-
// tslint:disable-next-line:no-forward-ref
|
|
374
|
-
providers: [{ provide: toolbar_tool_component_1.ToolBarToolComponent, useExisting: core_1.forwardRef(function () { return ToolBarSplitButtonComponent_1; }) }],
|
|
375
|
-
selector: 'kendo-toolbar-splitbutton',
|
|
376
|
-
template: "\n <ng-template #toolbarTemplate>\n <kendo-splitbutton\n #toolbarSplitButton\n [data]=\"data\"\n [text]=\"toolbarOptions.text\"\n [icon]=\"toolbarOptions.icon\"\n [iconClass]=\"toolbarOptions.iconClass\"\n [imageUrl]=\"toolbarOptions.imageUrl\"\n [buttonClass]=\"buttonClass\"\n [arrowButtonClass]=\"arrowButtonClass\"\n [arrowButtonIcon]=\"arrowButtonIcon\"\n [disabled]=\"disabled\"\n [tabIndex]=\"-1\"\n [textField]=\"textField\"\n [popupSettings]=\"popupSettings\"\n [fillMode]=\"fillMode\"\n [themeColor]=\"fillMode ? themeColor : null\"\n (buttonClick)=\"buttonClick.emit($event)\"\n (open)=\"open.emit($event)\"\n (close)=\"close.emit($event)\"\n (itemClick)=\"itemClick.emit($event)\"\n >\n </kendo-splitbutton>\n </ng-template>\n <ng-template #popupTemplate>\n <button\n #overflowSplitButton\n type=\"button\"\n tabindex=\"-1\"\n [fillMode]=\"fillMode\"\n [themeColor]=\"fillMode ? themeColor : null\"\n kendoButton\n class=\"k-overflow-button\"\n [disabled]=\"disabled\"\n [icon]=\"overflowOptions.icon\"\n [iconClass]=\"overflowOptions.iconClass\"\n [imageUrl]=\"overflowOptions.imageUrl\"\n [ngClass]=\"buttonClass\"\n (click)=\"buttonClick.emit($event)\"\n (click)=\"onMainButtonClick($event)\"\n >\n {{ overflowOptions.text }}\n </button>\n <kendo-toolbar-buttonlist\n #overflowSplitButtonButtonList\n [data]=\"data\"\n [disabled]=\"disabled\"\n [fillMode]=\"fillMode\"\n [themeColor]=\"fillMode ? themeColor : null\"\n [textField]=\"textField\"\n (itemClick)=\"itemClick.emit($event)\"\n (click)=\"onButtonListClick($event)\"\n >\n </kendo-toolbar-buttonlist>\n </ng-template>\n "
|
|
377
|
-
}),
|
|
378
|
-
tslib_1.__metadata("design:paramtypes", [])
|
|
379
|
-
], ToolBarSplitButtonComponent);
|
|
380
|
-
return ToolBarSplitButtonComponent;
|
|
381
|
-
}(toolbar_tool_component_1.ToolBarToolComponent));
|
|
382
|
-
exports.ToolBarSplitButtonComponent = ToolBarSplitButtonComponent;
|
|
@@ -1,78 +0,0 @@
|
|
|
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
|
-
"use strict";
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
var tslib_1 = require("tslib");
|
|
8
|
-
var core_1 = require("@angular/core");
|
|
9
|
-
/**
|
|
10
|
-
* Represents the Base ToolBar Tool component for Angular.
|
|
11
|
-
* Extend this class to create custom tools.
|
|
12
|
-
*/
|
|
13
|
-
var ToolBarToolComponent = /** @class */ (function () {
|
|
14
|
-
function ToolBarToolComponent() {
|
|
15
|
-
this.tabIndex = -1; //Focus movement inside the toolbar is managed using roving tabindex.
|
|
16
|
-
this.overflows = true;
|
|
17
|
-
// this should be replaced with showTool: DisplayMode = 'both';
|
|
18
|
-
/**
|
|
19
|
-
* @hidden
|
|
20
|
-
*/
|
|
21
|
-
this.responsive = true;
|
|
22
|
-
}
|
|
23
|
-
Object.defineProperty(ToolBarToolComponent.prototype, "toolbarDisplay", {
|
|
24
|
-
get: function () {
|
|
25
|
-
return this.overflows ? 'none' : 'inline-block';
|
|
26
|
-
},
|
|
27
|
-
enumerable: true,
|
|
28
|
-
configurable: true
|
|
29
|
-
});
|
|
30
|
-
Object.defineProperty(ToolBarToolComponent.prototype, "overflowDisplay", {
|
|
31
|
-
get: function () {
|
|
32
|
-
return this.overflows ? 'block' : 'none';
|
|
33
|
-
},
|
|
34
|
-
enumerable: true,
|
|
35
|
-
configurable: true
|
|
36
|
-
});
|
|
37
|
-
/**
|
|
38
|
-
* Determines if the tool can be focused.
|
|
39
|
-
* If the returned value is `false`, the tool will not be part of the keyboard navigation.
|
|
40
|
-
* @returns `true` if the tool should take part in keyboard navigation.
|
|
41
|
-
*/
|
|
42
|
-
ToolBarToolComponent.prototype.canFocus = function () {
|
|
43
|
-
return false;
|
|
44
|
-
};
|
|
45
|
-
/**
|
|
46
|
-
* Called when the tool is focused.
|
|
47
|
-
* The method accepts as argument the original browser event, which can be a `KeyboardEvent`, `MouseEvent` or `FocusEvent`.
|
|
48
|
-
* @param {Event} ev - This is the event that caused the tool to be focused.
|
|
49
|
-
*/
|
|
50
|
-
// @ts-ignore
|
|
51
|
-
ToolBarToolComponent.prototype.focus = function (ev) {
|
|
52
|
-
/* noop */
|
|
53
|
-
};
|
|
54
|
-
/**
|
|
55
|
-
* Called when the tool is focused and one of the arrow keys is pressed.
|
|
56
|
-
* The returned boolean value determines whether the `ToolBarComponent` will move the focus to the next/previous `ToolBarToolComponent`
|
|
57
|
-
* ([see example]({% slug customcontroltypes_toolbar %}#toc-adding-keyboard-navigation)).
|
|
58
|
-
* @param {KeyboardEvent} ev - The last pressed arrow key
|
|
59
|
-
* @returns
|
|
60
|
-
*/
|
|
61
|
-
// @ts-ignore
|
|
62
|
-
ToolBarToolComponent.prototype.handleKey = function (ev) {
|
|
63
|
-
return false;
|
|
64
|
-
};
|
|
65
|
-
tslib_1.__decorate([
|
|
66
|
-
core_1.Input(),
|
|
67
|
-
tslib_1.__metadata("design:type", Boolean)
|
|
68
|
-
], ToolBarToolComponent.prototype, "responsive", void 0);
|
|
69
|
-
ToolBarToolComponent = tslib_1.__decorate([
|
|
70
|
-
core_1.Component({
|
|
71
|
-
// tslint:disable-next-line:component-selector
|
|
72
|
-
selector: 'toolbar-tool',
|
|
73
|
-
template: ""
|
|
74
|
-
})
|
|
75
|
-
], ToolBarToolComponent);
|
|
76
|
-
return ToolBarToolComponent;
|
|
77
|
-
}());
|
|
78
|
-
exports.ToolBarToolComponent = ToolBarToolComponent;
|
package/dist/npm/util.js
DELETED
|
@@ -1,209 +0,0 @@
|
|
|
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
|
-
"use strict";
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
var kendo_angular_common_1 = require("@progress/kendo-angular-common");
|
|
8
|
-
/**
|
|
9
|
-
* @hidden
|
|
10
|
-
*/
|
|
11
|
-
var focusableRegex = /^(?:a|input|select|textarea|button|object)$/i;
|
|
12
|
-
/**
|
|
13
|
-
* @hidden
|
|
14
|
-
*/
|
|
15
|
-
function outerWidth(element) {
|
|
16
|
-
var width = element.offsetWidth;
|
|
17
|
-
var style = getComputedStyle(element);
|
|
18
|
-
width += parseFloat(style.marginLeft) || 0 + parseFloat(style.marginRight) || 0;
|
|
19
|
-
return width;
|
|
20
|
-
}
|
|
21
|
-
exports.outerWidth = outerWidth;
|
|
22
|
-
/**
|
|
23
|
-
* @hidden
|
|
24
|
-
*/
|
|
25
|
-
function innerWidth(element) {
|
|
26
|
-
var width = element.offsetWidth;
|
|
27
|
-
var style = getComputedStyle(element);
|
|
28
|
-
width -= parseFloat(style.paddingLeft) || 0 + parseFloat(style.borderLeftWidth) || 0;
|
|
29
|
-
width -= parseFloat(style.paddingRight) || 0 + parseFloat(style.borderRightWidth) || 0;
|
|
30
|
-
return width;
|
|
31
|
-
}
|
|
32
|
-
exports.innerWidth = innerWidth;
|
|
33
|
-
/**
|
|
34
|
-
* @hidden
|
|
35
|
-
*/
|
|
36
|
-
function outerHeight(element) {
|
|
37
|
-
var width = element.offsetHeight;
|
|
38
|
-
var style = getComputedStyle(element);
|
|
39
|
-
width += parseFloat(style.marginTop) || 0 + parseFloat(style.marginBottom) || 0;
|
|
40
|
-
return width;
|
|
41
|
-
}
|
|
42
|
-
exports.outerHeight = outerHeight;
|
|
43
|
-
/**
|
|
44
|
-
* @hidden
|
|
45
|
-
*/
|
|
46
|
-
exports.closest = function (node, predicate) {
|
|
47
|
-
while (node && !predicate(node)) {
|
|
48
|
-
node = node.parentNode;
|
|
49
|
-
}
|
|
50
|
-
return node;
|
|
51
|
-
};
|
|
52
|
-
/**
|
|
53
|
-
* @hidden
|
|
54
|
-
*/
|
|
55
|
-
exports.isVisible = function (element) {
|
|
56
|
-
var rect = element.getBoundingClientRect();
|
|
57
|
-
var hasSize = rect.width > 0 && rect.height > 0;
|
|
58
|
-
var hasPosition = rect.x !== 0 && rect.y !== 0;
|
|
59
|
-
// Elements can have zero size due to styling, but they should still count as visible.
|
|
60
|
-
// For example, the selection checkbox has no size, but is made visible through styling.
|
|
61
|
-
return (hasSize || hasPosition) && window.getComputedStyle(element).visibility !== 'hidden';
|
|
62
|
-
};
|
|
63
|
-
/**
|
|
64
|
-
* @hidden
|
|
65
|
-
*/
|
|
66
|
-
exports.findElement = function (node, predicate, matchSelf) {
|
|
67
|
-
if (matchSelf === void 0) { matchSelf = true; }
|
|
68
|
-
if (!node) {
|
|
69
|
-
return;
|
|
70
|
-
}
|
|
71
|
-
if (matchSelf && predicate(node)) {
|
|
72
|
-
return node;
|
|
73
|
-
}
|
|
74
|
-
node = node.firstChild;
|
|
75
|
-
while (node) {
|
|
76
|
-
if (node.nodeType === 1) {
|
|
77
|
-
var element = exports.findElement(node, predicate);
|
|
78
|
-
if (element) {
|
|
79
|
-
return element;
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
node = node.nextSibling;
|
|
83
|
-
}
|
|
84
|
-
};
|
|
85
|
-
/**
|
|
86
|
-
* @hidden
|
|
87
|
-
*/
|
|
88
|
-
exports.isFocusable = function (element, checkVisibility) {
|
|
89
|
-
if (checkVisibility === void 0) { checkVisibility = true; }
|
|
90
|
-
if (element.tagName) {
|
|
91
|
-
var tagName = element.tagName.toLowerCase();
|
|
92
|
-
var tabIndex = element.getAttribute('tabIndex');
|
|
93
|
-
var focusable = tabIndex !== null;
|
|
94
|
-
if (focusableRegex.test(tagName)) {
|
|
95
|
-
focusable = !element.disabled;
|
|
96
|
-
}
|
|
97
|
-
return focusable && (!checkVisibility || exports.isVisible(element));
|
|
98
|
-
}
|
|
99
|
-
return false;
|
|
100
|
-
};
|
|
101
|
-
/**
|
|
102
|
-
* @hidden
|
|
103
|
-
*/
|
|
104
|
-
exports.findFocusable = function (element, checkVisibility) {
|
|
105
|
-
if (checkVisibility === void 0) { checkVisibility = true; }
|
|
106
|
-
return exports.findElement(element, function (node) { return exports.isFocusable(node, checkVisibility); });
|
|
107
|
-
};
|
|
108
|
-
/**
|
|
109
|
-
* @hidden
|
|
110
|
-
*/
|
|
111
|
-
exports.findFocusableChild = function (element, checkVisibility) {
|
|
112
|
-
if (checkVisibility === void 0) { checkVisibility = true; }
|
|
113
|
-
return exports.findElement(element, function (node) { return exports.isFocusable(node, checkVisibility); }, false);
|
|
114
|
-
};
|
|
115
|
-
/**
|
|
116
|
-
* @hidden
|
|
117
|
-
*/
|
|
118
|
-
exports.findFocusableSibling = function (element, checkVisibility, reverse) {
|
|
119
|
-
if (checkVisibility === void 0) { checkVisibility = true; }
|
|
120
|
-
var node = reverse ? element.prevSibling : element.nextSibling;
|
|
121
|
-
while (node) {
|
|
122
|
-
if (node.nodeType === 1) {
|
|
123
|
-
var result = exports.findElement(node, function (el) { return exports.isFocusable(el, checkVisibility); });
|
|
124
|
-
if (result) {
|
|
125
|
-
return result;
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
node = reverse ? node.prevSibling : node.nextSibling;
|
|
129
|
-
}
|
|
130
|
-
};
|
|
131
|
-
/**
|
|
132
|
-
* @hidden
|
|
133
|
-
*/
|
|
134
|
-
exports.isPresent = function (value) { return value !== null && value !== undefined; };
|
|
135
|
-
/**
|
|
136
|
-
* @hidden
|
|
137
|
-
*/
|
|
138
|
-
exports.makePeeker = function (collection) { return function (index) { return exports.isPresent(collection[index]); }; };
|
|
139
|
-
/**
|
|
140
|
-
* @hidden
|
|
141
|
-
*/
|
|
142
|
-
exports.getIndexOfFocused = function (prevKeyCode, nextKeyCode, collection) { return function (ev) {
|
|
143
|
-
switch (ev.type) {
|
|
144
|
-
case 'keydown':
|
|
145
|
-
if (ev.keyCode === prevKeyCode) {
|
|
146
|
-
return collection.length - 1;
|
|
147
|
-
}
|
|
148
|
-
if (ev.keyCode === nextKeyCode) {
|
|
149
|
-
return 0;
|
|
150
|
-
}
|
|
151
|
-
break;
|
|
152
|
-
case 'click':
|
|
153
|
-
return collection.findIndex(function (be) { return be === ev.target || be.contains(ev.target); });
|
|
154
|
-
case 'focus':
|
|
155
|
-
return 0;
|
|
156
|
-
default:
|
|
157
|
-
return 0;
|
|
158
|
-
}
|
|
159
|
-
}; };
|
|
160
|
-
/**
|
|
161
|
-
* @hidden
|
|
162
|
-
*/
|
|
163
|
-
exports.seekFocusedIndex = function (prevKeyCode, nextKeyCode, seeker) { return function (startIndex, ev) {
|
|
164
|
-
switch (ev.keyCode) {
|
|
165
|
-
case prevKeyCode:
|
|
166
|
-
return seeker(startIndex - 1) ? startIndex - 1 : startIndex;
|
|
167
|
-
case nextKeyCode:
|
|
168
|
-
return seeker(startIndex + 1) ? startIndex + 1 : startIndex;
|
|
169
|
-
default:
|
|
170
|
-
return startIndex;
|
|
171
|
-
}
|
|
172
|
-
}; };
|
|
173
|
-
/**
|
|
174
|
-
* @hidden
|
|
175
|
-
*/
|
|
176
|
-
exports.areEqual = function (first) { return function (second) { return first === second; }; };
|
|
177
|
-
/**
|
|
178
|
-
* @hidden
|
|
179
|
-
*/
|
|
180
|
-
exports.getNextKey = function (rtl) {
|
|
181
|
-
if (rtl === void 0) { rtl = false; }
|
|
182
|
-
return function (overflows) {
|
|
183
|
-
if (overflows === void 0) { overflows = true; }
|
|
184
|
-
return overflows ? kendo_angular_common_1.Keys.ArrowDown : rtl ? kendo_angular_common_1.Keys.ArrowLeft : kendo_angular_common_1.Keys.ArrowRight;
|
|
185
|
-
};
|
|
186
|
-
};
|
|
187
|
-
/**
|
|
188
|
-
* @hidden
|
|
189
|
-
*/
|
|
190
|
-
exports.getPrevKey = function (rtl) {
|
|
191
|
-
if (rtl === void 0) { rtl = false; }
|
|
192
|
-
return function (overflows) {
|
|
193
|
-
if (overflows === void 0) { overflows = true; }
|
|
194
|
-
return overflows ? kendo_angular_common_1.Keys.ArrowUp : rtl ? kendo_angular_common_1.Keys.ArrowRight : kendo_angular_common_1.Keys.ArrowLeft;
|
|
195
|
-
};
|
|
196
|
-
};
|
|
197
|
-
/**
|
|
198
|
-
* @hidden
|
|
199
|
-
*/
|
|
200
|
-
exports.getValueForLocation = function (property, displayMode, overflows) {
|
|
201
|
-
switch (displayMode) {
|
|
202
|
-
case 'toolbar':
|
|
203
|
-
return overflows ? undefined : property;
|
|
204
|
-
case 'overflow':
|
|
205
|
-
return overflows ? property : undefined;
|
|
206
|
-
default:
|
|
207
|
-
return property;
|
|
208
|
-
}
|
|
209
|
-
};
|