@progress/kendo-vue-buttons 3.6.4 → 3.6.5-dev.202210181442
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/dist/cdn/js/kendo-vue-buttons.js +1 -1
- package/dist/es/Button.js +15 -22
- package/dist/es/ButtonGroup.js +2 -10
- package/dist/es/ButtonWrap.js +0 -2
- package/dist/es/Chip/Chip.js +6 -23
- package/dist/es/Chip/ChipList.js +4 -10
- package/dist/es/Chip/data-reducer.js +0 -6
- package/dist/es/Chip/focus-reducer.js +0 -8
- package/dist/es/Chip/selection-reducer.js +0 -19
- package/dist/es/FloatingActionButton/FloatingActionButton.js +20 -47
- package/dist/es/FloatingActionButton/FloatingActionButtonItem.js +6 -8
- package/dist/es/ListButton/ButtonItem.js +5 -9
- package/dist/es/ListButton/DropDownButton.js +20 -36
- package/dist/es/ListButton/SplitButton.js +22 -47
- package/dist/es/package-metadata.js +1 -1
- package/dist/es/toolbar/Toolbar.js +2 -21
- package/dist/es/toolbar/tools/ToolbarItem.js +0 -2
- package/dist/es/toolbar/tools/ToolbarSeparator.js +2 -3
- package/dist/es/toolbar/tools/ToolbarSpacer.js +0 -2
- package/dist/esm/Button.js +15 -22
- package/dist/esm/ButtonGroup.js +2 -10
- package/dist/esm/ButtonWrap.js +0 -2
- package/dist/esm/Chip/Chip.js +6 -23
- package/dist/esm/Chip/ChipList.js +4 -10
- package/dist/esm/Chip/data-reducer.js +0 -6
- package/dist/esm/Chip/focus-reducer.js +0 -8
- package/dist/esm/Chip/selection-reducer.js +0 -19
- package/dist/esm/FloatingActionButton/FloatingActionButton.js +20 -47
- package/dist/esm/FloatingActionButton/FloatingActionButtonItem.js +6 -8
- package/dist/esm/ListButton/ButtonItem.js +5 -9
- package/dist/esm/ListButton/DropDownButton.js +20 -36
- package/dist/esm/ListButton/SplitButton.js +22 -47
- package/dist/esm/package-metadata.js +1 -1
- package/dist/esm/toolbar/Toolbar.js +2 -21
- package/dist/esm/toolbar/tools/ToolbarItem.js +0 -2
- package/dist/esm/toolbar/tools/ToolbarSeparator.js +2 -3
- package/dist/esm/toolbar/tools/ToolbarSpacer.js +0 -2
- package/dist/npm/Button.js +17 -29
- package/dist/npm/ButtonGroup.js +4 -18
- package/dist/npm/ButtonWrap.js +2 -7
- package/dist/npm/Chip/Chip.js +8 -32
- package/dist/npm/Chip/ChipList.js +4 -18
- package/dist/npm/Chip/data-reducer.js +0 -8
- package/dist/npm/Chip/focus-reducer.js +0 -10
- package/dist/npm/Chip/selection-reducer.js +0 -20
- package/dist/npm/FloatingActionButton/FloatingActionButton.js +22 -56
- package/dist/npm/FloatingActionButton/FloatingActionButtonItem.js +8 -13
- package/dist/npm/ListButton/ButtonItem.js +7 -14
- package/dist/npm/ListButton/DropDownButton.js +20 -46
- package/dist/npm/ListButton/SplitButton.js +22 -57
- package/dist/npm/package-metadata.js +1 -1
- package/dist/npm/toolbar/Toolbar.js +2 -26
- package/dist/npm/toolbar/tools/ToolbarItem.js +2 -7
- package/dist/npm/toolbar/tools/ToolbarSeparator.js +4 -8
- package/dist/npm/toolbar/tools/ToolbarSpacer.js +2 -5
- package/package.json +5 -5
|
@@ -8,7 +8,6 @@ import { classNames, getRef, getTabIndex, getTemplate, setRef } from '@progress/
|
|
|
8
8
|
/**
|
|
9
9
|
* @hidden
|
|
10
10
|
*/
|
|
11
|
-
|
|
12
11
|
var FloatingActionButtonItemVue2 = {
|
|
13
12
|
name: 'KendoVueFloatingActionButtonItem',
|
|
14
13
|
props: {
|
|
@@ -65,13 +64,13 @@ var FloatingActionButtonItemVue2 = {
|
|
|
65
64
|
render: function render(createElement) {
|
|
66
65
|
var h = gh || createElement;
|
|
67
66
|
var _a = this.$props,
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
67
|
+
disabled = _a.disabled,
|
|
68
|
+
id = _a.id,
|
|
69
|
+
tabIndex = _a.tabIndex,
|
|
70
|
+
dataItem = _a.dataItem,
|
|
71
|
+
customProp = _a.customProp;
|
|
73
72
|
var text = dataItem.text,
|
|
74
|
-
|
|
73
|
+
icon = dataItem.icon;
|
|
75
74
|
var item;
|
|
76
75
|
var itemDefaultRendering = h("li", {
|
|
77
76
|
ref: setRef(this, 'element'),
|
|
@@ -116,6 +115,5 @@ var FloatingActionButtonItemVue2 = {
|
|
|
116
115
|
/**
|
|
117
116
|
* @hidden
|
|
118
117
|
*/
|
|
119
|
-
|
|
120
118
|
var FloatingActionButtonItem = FloatingActionButtonItemVue2;
|
|
121
119
|
export { FloatingActionButtonItem, FloatingActionButtonItemVue2 };
|
|
@@ -7,7 +7,6 @@ import { getTemplate } from '@progress/kendo-vue-common';
|
|
|
7
7
|
/**
|
|
8
8
|
* @hidden
|
|
9
9
|
*/
|
|
10
|
-
|
|
11
10
|
var ButtonItemVue2 = {
|
|
12
11
|
name: 'KendoButtonItem',
|
|
13
12
|
// @ts-ignore
|
|
@@ -58,14 +57,13 @@ var ButtonItemVue2 = {
|
|
|
58
57
|
render: function render(createElement) {
|
|
59
58
|
var h = gh || createElement;
|
|
60
59
|
var _a = this.$props,
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
60
|
+
dataItem = _a.dataItem,
|
|
61
|
+
id = _a.id,
|
|
62
|
+
render = _a.render;
|
|
65
63
|
var renderContent = function renderContent() {
|
|
66
64
|
var _a = this.$props,
|
|
67
|
-
|
|
68
|
-
|
|
65
|
+
textField = _a.textField,
|
|
66
|
+
index = _a.index;
|
|
69
67
|
var text = dataItem.text !== undefined ? dataItem.text : textField ? dataItem[textField] : dataItem;
|
|
70
68
|
var iconClass = dataItem.icon ? "k-icon k-i-".concat(dataItem.icon) : dataItem.iconClass;
|
|
71
69
|
var itemContent = h("span", {
|
|
@@ -107,7 +105,6 @@ var ButtonItemVue2 = {
|
|
|
107
105
|
}
|
|
108
106
|
});
|
|
109
107
|
};
|
|
110
|
-
|
|
111
108
|
var item = h("li", {
|
|
112
109
|
id: id,
|
|
113
110
|
attrs: this.v3 ? undefined : {
|
|
@@ -133,6 +130,5 @@ var ButtonItemVue2 = {
|
|
|
133
130
|
/**
|
|
134
131
|
* @hidden
|
|
135
132
|
*/
|
|
136
|
-
|
|
137
133
|
var ButtonItem = ButtonItemVue2;
|
|
138
134
|
export { ButtonItem, ButtonItemVue2 };
|
|
@@ -2,19 +2,15 @@ var __assign = this && this.__assign || function () {
|
|
|
2
2
|
__assign = Object.assign || function (t) {
|
|
3
3
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
4
|
s = arguments[i];
|
|
5
|
-
|
|
6
5
|
for (var p in s) {
|
|
7
6
|
if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
8
7
|
}
|
|
9
8
|
}
|
|
10
|
-
|
|
11
9
|
return t;
|
|
12
10
|
};
|
|
13
|
-
|
|
14
11
|
return __assign.apply(this, arguments);
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
|
|
12
|
+
};
|
|
13
|
+
// @ts-ignore
|
|
18
14
|
import * as Vue from 'vue';
|
|
19
15
|
var allVue = Vue;
|
|
20
16
|
var gh = allVue.h;
|
|
@@ -31,7 +27,6 @@ import { packageMetadata } from '../package-metadata.js';
|
|
|
31
27
|
/**
|
|
32
28
|
* @hidden
|
|
33
29
|
*/
|
|
34
|
-
|
|
35
30
|
var DropDownButtonVue2 = {
|
|
36
31
|
name: 'KendoDropDownButton',
|
|
37
32
|
// @ts-ignore
|
|
@@ -114,8 +109,8 @@ var DropDownButtonVue2 = {
|
|
|
114
109
|
validatePackage(packageMetadata);
|
|
115
110
|
},
|
|
116
111
|
mounted: function mounted() {
|
|
117
|
-
this.mainButton = this.$refs[this._anchor];
|
|
118
|
-
|
|
112
|
+
this.mainButton = this.$refs[this._anchor];
|
|
113
|
+
// If this.$props.opened is true during the initial render, the popup is not aligned.
|
|
119
114
|
if (this.$props.dir === undefined && this.isRtl() || this.computedOpened) {
|
|
120
115
|
this.$forceUpdate();
|
|
121
116
|
}
|
|
@@ -155,26 +150,25 @@ var DropDownButtonVue2 = {
|
|
|
155
150
|
},
|
|
156
151
|
render: function render(createElement) {
|
|
157
152
|
var _this2 = this;
|
|
158
|
-
|
|
159
153
|
var h = gh || createElement;
|
|
160
154
|
var rtl = this.isRtl();
|
|
161
155
|
var dir = rtl ? 'rtl' : undefined;
|
|
162
156
|
var _a = this.$props,
|
|
163
|
-
|
|
164
|
-
|
|
157
|
+
tabIndex = _a.tabIndex,
|
|
158
|
+
disabled = _a.disabled;
|
|
165
159
|
var defaultSlot = getDefaultSlots(this);
|
|
166
160
|
this.buttonsData = this.$props.items;
|
|
167
|
-
|
|
168
161
|
var renderChildItems = function renderChildItems() {
|
|
169
162
|
var _a = this.$props,
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
163
|
+
item = _a.item,
|
|
164
|
+
itemRender = _a.itemRender,
|
|
165
|
+
textField = _a.textField;
|
|
173
166
|
return this.buttonsData.length > 0 ? this.buttonsData.map(function (dataItem, index) {
|
|
174
167
|
var currentDataItem = typeof dataItem !== 'string' ? __assign(__assign({}, dataItem), {
|
|
175
168
|
render: templateRendering.call(this, dataItem.render, getListeners.call(this))
|
|
176
169
|
}) : dataItem;
|
|
177
|
-
return (
|
|
170
|
+
return (
|
|
171
|
+
// @ts-ignore
|
|
178
172
|
h(ButtonItem, {
|
|
179
173
|
"class": "k-menu-item",
|
|
180
174
|
dataItem: currentDataItem,
|
|
@@ -204,15 +198,14 @@ var DropDownButtonVue2 = {
|
|
|
204
198
|
);
|
|
205
199
|
}, this) : null;
|
|
206
200
|
};
|
|
207
|
-
|
|
208
201
|
var renderPopup = function renderPopup() {
|
|
209
202
|
var _this = this;
|
|
210
|
-
|
|
211
203
|
var _a = this.$props,
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
return (
|
|
204
|
+
_b = _a.popupSettings,
|
|
205
|
+
popupSettings = _b === void 0 ? {} : _b,
|
|
206
|
+
size = _a.size;
|
|
207
|
+
return (
|
|
208
|
+
// @ts-ignore function children
|
|
216
209
|
h(Popup, {
|
|
217
210
|
anchor: this._anchor,
|
|
218
211
|
attrs: this.v3 ? undefined : {
|
|
@@ -252,7 +245,6 @@ var DropDownButtonVue2 = {
|
|
|
252
245
|
}, [renderChildItems.call(_this)])])
|
|
253
246
|
);
|
|
254
247
|
};
|
|
255
|
-
|
|
256
248
|
return h("div", {
|
|
257
249
|
"class": this.wrapperClass,
|
|
258
250
|
onKeydown: this.onKeyDown,
|
|
@@ -267,7 +259,8 @@ var DropDownButtonVue2 = {
|
|
|
267
259
|
attrs: this.v3 ? undefined : {
|
|
268
260
|
dir: dir
|
|
269
261
|
}
|
|
270
|
-
}, [
|
|
262
|
+
}, [
|
|
263
|
+
// @ts-ignore function children
|
|
271
264
|
h(KendoButton, {
|
|
272
265
|
size: this.$props.size,
|
|
273
266
|
attrs: this.v3 ? undefined : {
|
|
@@ -340,17 +333,14 @@ var DropDownButtonVue2 = {
|
|
|
340
333
|
this.focusedIndex = -1;
|
|
341
334
|
this.currentOpened = false;
|
|
342
335
|
}
|
|
343
|
-
|
|
344
336
|
return;
|
|
345
337
|
}
|
|
346
|
-
|
|
347
338
|
if (event.keyCode === Keys.enter || event.keyCode === Keys.space) {
|
|
348
339
|
if (this.focusedIndex !== undefined && this.focusedIndex >= 0) {
|
|
349
340
|
this.dispatchClickEvent(event, this.focusedIndex);
|
|
350
|
-
}
|
|
341
|
+
}
|
|
342
|
+
// Prevent default because otherwise when an item is selected
|
|
351
343
|
// click on the default button gets emitted which opens the popup again.
|
|
352
|
-
|
|
353
|
-
|
|
354
344
|
event.preventDefault();
|
|
355
345
|
this.focusedIndex = this.computedOpened ? -1 : 0, this.currentOpened = !this.computedOpened;
|
|
356
346
|
this.dispatchPopupEvent(event, this.currentOpened);
|
|
@@ -359,12 +349,10 @@ var DropDownButtonVue2 = {
|
|
|
359
349
|
this.currentOpened = false;
|
|
360
350
|
this.dispatchPopupEvent(event, this.currentOpened);
|
|
361
351
|
}
|
|
362
|
-
|
|
363
352
|
if (this.computedOpened) {
|
|
364
353
|
var newFocused = navigation(this.focusedIndex, event.keyCode, event.altKey, this.buttonsData.length);
|
|
365
354
|
this.focusedIndex = newFocused;
|
|
366
355
|
var arrowKey = event.keyCode === Keys.up || event.keyCode === Keys.down || event.keyCode === Keys.left || event.keyCode === Keys.right;
|
|
367
|
-
|
|
368
356
|
if (!event.altKey && arrowKey) {
|
|
369
357
|
// Needed to notify the parent listeners that event is handled.
|
|
370
358
|
event.preventDefault();
|
|
@@ -376,7 +364,6 @@ var DropDownButtonVue2 = {
|
|
|
376
364
|
this.focused = true;
|
|
377
365
|
this.$emit('focus', event, this, undefined);
|
|
378
366
|
}
|
|
379
|
-
|
|
380
367
|
this.focusedIndex = this.computedOpened ? 0 : -1;
|
|
381
368
|
clearTimeout(this._blurTimeout);
|
|
382
369
|
},
|
|
@@ -392,7 +379,6 @@ var DropDownButtonVue2 = {
|
|
|
392
379
|
that.focusedIndex = -1;
|
|
393
380
|
that.$emit('blur', event, that, undefined);
|
|
394
381
|
var fireCloseEvent = that.computedOpened;
|
|
395
|
-
|
|
396
382
|
if (fireCloseEvent) {
|
|
397
383
|
that.currentOpened = false;
|
|
398
384
|
that.dispatchPopupEvent(event, false);
|
|
@@ -427,7 +413,6 @@ var DropDownButtonVue2 = {
|
|
|
427
413
|
if (!this.buttonsData.length) {
|
|
428
414
|
return;
|
|
429
415
|
}
|
|
430
|
-
|
|
431
416
|
var toOpen = !this.computedOpened;
|
|
432
417
|
this.currentOpened = toOpen;
|
|
433
418
|
this.focused = true;
|
|
@@ -448,6 +433,5 @@ var DropDownButtonVue2 = {
|
|
|
448
433
|
/**
|
|
449
434
|
* @hidden
|
|
450
435
|
*/
|
|
451
|
-
|
|
452
436
|
var DropDownButton = DropDownButtonVue2;
|
|
453
437
|
export { DropDownButton, DropDownButtonVue2 };
|
|
@@ -2,19 +2,15 @@ var __assign = this && this.__assign || function () {
|
|
|
2
2
|
__assign = Object.assign || function (t) {
|
|
3
3
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
4
|
s = arguments[i];
|
|
5
|
-
|
|
6
5
|
for (var p in s) {
|
|
7
6
|
if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
8
7
|
}
|
|
9
8
|
}
|
|
10
|
-
|
|
11
9
|
return t;
|
|
12
10
|
};
|
|
13
|
-
|
|
14
11
|
return __assign.apply(this, arguments);
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
|
|
12
|
+
};
|
|
13
|
+
// @ts-ignore
|
|
18
14
|
import * as Vue from 'vue';
|
|
19
15
|
var allVue = Vue;
|
|
20
16
|
var gh = allVue.h;
|
|
@@ -31,7 +27,6 @@ import { packageMetadata } from '../package-metadata.js';
|
|
|
31
27
|
/**
|
|
32
28
|
* @hidden
|
|
33
29
|
*/
|
|
34
|
-
|
|
35
30
|
var SplitButtonVue2 = {
|
|
36
31
|
name: 'KendoSplitButton',
|
|
37
32
|
// @ts-ignore
|
|
@@ -109,8 +104,8 @@ var SplitButtonVue2 = {
|
|
|
109
104
|
validatePackage(packageMetadata);
|
|
110
105
|
},
|
|
111
106
|
mounted: function mounted() {
|
|
112
|
-
this.mainButton = this.$refs[this._anchor];
|
|
113
|
-
|
|
107
|
+
this.mainButton = this.$refs[this._anchor];
|
|
108
|
+
// If this.$props.opened is true during the initial render, the popup is not aligned.
|
|
114
109
|
if (this.$props.dir === undefined && this.isRtl() || this.computedOpened) {
|
|
115
110
|
this.$forceUpdate();
|
|
116
111
|
}
|
|
@@ -144,28 +139,26 @@ var SplitButtonVue2 = {
|
|
|
144
139
|
},
|
|
145
140
|
render: function render(createElement) {
|
|
146
141
|
var _this3 = this;
|
|
147
|
-
|
|
148
142
|
var _this = this;
|
|
149
|
-
|
|
150
143
|
var h = gh || createElement;
|
|
151
144
|
this.buttonsData = this.$props.items;
|
|
152
145
|
var rtl = this.isRtl();
|
|
153
146
|
var dir = rtl ? 'rtl' : undefined;
|
|
154
147
|
var _a = this.$props,
|
|
155
|
-
|
|
156
|
-
|
|
148
|
+
tabIndex = _a.tabIndex,
|
|
149
|
+
disabled = _a.disabled;
|
|
157
150
|
var defaultSlot = getDefaultSlots(this);
|
|
158
|
-
|
|
159
151
|
var renderChildItems = function renderChildItems() {
|
|
160
152
|
var _a = this.$props,
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
153
|
+
item = _a.item,
|
|
154
|
+
itemRender = _a.itemRender,
|
|
155
|
+
textField = _a.textField;
|
|
164
156
|
return this.buttonsData.length > 0 ? this.buttonsData.map(function (dataItem, index) {
|
|
165
157
|
var currentDataItem = typeof dataItem !== 'string' ? __assign(__assign({}, dataItem), {
|
|
166
158
|
render: templateRendering.call(this, dataItem.render, getListeners.call(this))
|
|
167
159
|
}) : dataItem;
|
|
168
|
-
return (
|
|
160
|
+
return (
|
|
161
|
+
// @ts-ignore
|
|
169
162
|
h(ButtonItem, {
|
|
170
163
|
"class": "k-menu-item",
|
|
171
164
|
dataItem: currentDataItem,
|
|
@@ -195,15 +188,14 @@ var SplitButtonVue2 = {
|
|
|
195
188
|
);
|
|
196
189
|
}, this) : null;
|
|
197
190
|
};
|
|
198
|
-
|
|
199
191
|
var renderPopup = function renderPopup() {
|
|
200
192
|
var _this2 = this;
|
|
201
|
-
|
|
202
193
|
var _a = this.$props,
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
return (
|
|
194
|
+
_b = _a.popupSettings,
|
|
195
|
+
popupSettings = _b === void 0 ? {} : _b,
|
|
196
|
+
size = _a.size;
|
|
197
|
+
return (
|
|
198
|
+
// @ts-ignore function children
|
|
207
199
|
h(Popup, {
|
|
208
200
|
anchor: this._anchor,
|
|
209
201
|
attrs: this.v3 ? undefined : {
|
|
@@ -243,7 +235,6 @@ var SplitButtonVue2 = {
|
|
|
243
235
|
}, [renderChildItems.call(_this2)])])
|
|
244
236
|
);
|
|
245
237
|
};
|
|
246
|
-
|
|
247
238
|
return h("div", {
|
|
248
239
|
"class": this.wrapperClass,
|
|
249
240
|
onKeydown: this.onKeyDown,
|
|
@@ -258,7 +249,8 @@ var SplitButtonVue2 = {
|
|
|
258
249
|
attrs: this.v3 ? undefined : {
|
|
259
250
|
dir: dir
|
|
260
251
|
}
|
|
261
|
-
}, [
|
|
252
|
+
}, [
|
|
253
|
+
// @ts-ignore function children
|
|
262
254
|
h(KendoButton, {
|
|
263
255
|
size: this.$props.size,
|
|
264
256
|
attrs: this.v3 ? undefined : {
|
|
@@ -312,7 +304,8 @@ var SplitButtonVue2 = {
|
|
|
312
304
|
"aria-activedescendant": this.focusedIndex !== undefined && this.focusedIndex >= 0 ? "".concat(this.guid, "-").concat(this.focusedIndex) : undefined
|
|
313
305
|
}, this.v3 ? function () {
|
|
314
306
|
return [_this3.$props.text, defaultSlot];
|
|
315
|
-
} : [_this3.$props.text, defaultSlot]),
|
|
307
|
+
} : [_this3.$props.text, defaultSlot]),
|
|
308
|
+
// @ts-ignore
|
|
316
309
|
h(KendoButton, {
|
|
317
310
|
"class": 'k-split-button-arrow',
|
|
318
311
|
size: this.$props.size,
|
|
@@ -362,18 +355,14 @@ var SplitButtonVue2 = {
|
|
|
362
355
|
this.focusedIndex = -1;
|
|
363
356
|
this.currentOpened = false;
|
|
364
357
|
}
|
|
365
|
-
|
|
366
358
|
return;
|
|
367
359
|
}
|
|
368
|
-
|
|
369
360
|
var newState = undefined;
|
|
370
|
-
|
|
371
361
|
if (event.keyCode === Keys.enter || event.keyCode === Keys.space) {
|
|
372
362
|
// Prevent default because otherwise when an item is selected
|
|
373
363
|
// click on the default button gets emitted which opens the popup again.
|
|
374
364
|
event.preventDefault();
|
|
375
365
|
this.dispatchClickEvent(event, this.focusedIndex);
|
|
376
|
-
|
|
377
366
|
if (this.focusedIndex !== undefined && this.focusedIndex >= 0) {
|
|
378
367
|
newState = {
|
|
379
368
|
focusedIndex: this.computedOpened ? -1 : 0,
|
|
@@ -388,28 +377,22 @@ var SplitButtonVue2 = {
|
|
|
388
377
|
};
|
|
389
378
|
this.dispatchPopupEvent(event, newState.currentOpened);
|
|
390
379
|
}
|
|
391
|
-
|
|
392
380
|
if (this.computedOpened) {
|
|
393
381
|
var newFocused = navigation(this.focusedIndex, event.keyCode, event.altKey, this.buttonsData.length);
|
|
394
|
-
|
|
395
382
|
if (newFocused !== this.focusedIndex) {
|
|
396
|
-
newState = newState || {};
|
|
397
|
-
|
|
383
|
+
newState = newState || {};
|
|
384
|
+
// @ts-ignore
|
|
398
385
|
newState.focusedIndex = newFocused;
|
|
399
386
|
}
|
|
400
|
-
|
|
401
387
|
var arrowKey = event.keyCode === Keys.up || event.keyCode === Keys.down || event.keyCode === Keys.left || event.keyCode === Keys.right;
|
|
402
|
-
|
|
403
388
|
if (!event.altKey && arrowKey) {
|
|
404
389
|
// Needed to notify the parent listeners that event is handled.
|
|
405
390
|
event.preventDefault();
|
|
406
391
|
}
|
|
407
392
|
}
|
|
408
|
-
|
|
409
393
|
if (newState) {
|
|
410
394
|
this.focusedIndex = newState.focusedIndex;
|
|
411
395
|
this.focused = newState.focused;
|
|
412
|
-
|
|
413
396
|
if (newState.currentOpened !== undefined) {
|
|
414
397
|
this.currentOpened = newState.currentOpened;
|
|
415
398
|
}
|
|
@@ -420,20 +403,16 @@ var SplitButtonVue2 = {
|
|
|
420
403
|
this.$emit('focus', event, this, undefined);
|
|
421
404
|
this.focused = true;
|
|
422
405
|
}
|
|
423
|
-
|
|
424
406
|
this.focusedIndex = -1;
|
|
425
407
|
clearTimeout(this._blurTimeout);
|
|
426
408
|
},
|
|
427
409
|
onItemClick: function onItemClick(event, clickedItemIndex) {
|
|
428
410
|
var opened = this.computedOpened;
|
|
429
|
-
|
|
430
411
|
if (opened) {
|
|
431
412
|
this.focusedIndex = 0;
|
|
432
413
|
this.currentOpened = false;
|
|
433
414
|
}
|
|
434
|
-
|
|
435
415
|
this.dispatchClickEvent(event, clickedItemIndex);
|
|
436
|
-
|
|
437
416
|
if (opened) {
|
|
438
417
|
this.dispatchPopupEvent(event, false);
|
|
439
418
|
}
|
|
@@ -444,7 +423,6 @@ var SplitButtonVue2 = {
|
|
|
444
423
|
},
|
|
445
424
|
createBlurTimeout: function createBlurTimeout(event) {
|
|
446
425
|
var _this = this;
|
|
447
|
-
|
|
448
426
|
var that = this;
|
|
449
427
|
this._blurTimeout = setTimeout(function () {
|
|
450
428
|
if (canUseDOM && document.activeElement !== that.mainButton) {
|
|
@@ -452,7 +430,6 @@ var SplitButtonVue2 = {
|
|
|
452
430
|
that.focusedIndex = -1;
|
|
453
431
|
that.$emit('blur', event, _this, undefined);
|
|
454
432
|
var fireCloseEvent = that.computedOpened;
|
|
455
|
-
|
|
456
433
|
if (fireCloseEvent) {
|
|
457
434
|
that.currentOpened = false;
|
|
458
435
|
that.dispatchPopupEvent(event, false);
|
|
@@ -485,7 +462,6 @@ var SplitButtonVue2 = {
|
|
|
485
462
|
},
|
|
486
463
|
onDownSplitPart: function onDownSplitPart(event) {
|
|
487
464
|
event.preventDefault();
|
|
488
|
-
|
|
489
465
|
if (this.element() && document.activeElement !== this.element()) {
|
|
490
466
|
// @ts-ignore
|
|
491
467
|
this.element().focus();
|
|
@@ -510,6 +486,5 @@ var SplitButtonVue2 = {
|
|
|
510
486
|
/**
|
|
511
487
|
* @hidden
|
|
512
488
|
*/
|
|
513
|
-
|
|
514
489
|
var SplitButton = SplitButtonVue2;
|
|
515
490
|
export { SplitButton, SplitButtonVue2 };
|
|
@@ -5,7 +5,7 @@ export var packageMetadata = {
|
|
|
5
5
|
name: '@progress/kendo-vue-buttons',
|
|
6
6
|
productName: 'Kendo UI for Vue',
|
|
7
7
|
productCodes: ['KENDOUIVUE', 'KENDOUICOMPLETE'],
|
|
8
|
-
publishDate:
|
|
8
|
+
publishDate: 1666103333,
|
|
9
9
|
version: '',
|
|
10
10
|
licensingDocsUrl: 'https://www.telerik.com/kendo-vue-ui/my-license/?utm_medium=product&utm_source=kendovue&utm_campaign=kendo-ui-vue-purchase-license-keys-warning'
|
|
11
11
|
};
|
|
@@ -2,19 +2,15 @@ var __assign = this && this.__assign || function () {
|
|
|
2
2
|
__assign = Object.assign || function (t) {
|
|
3
3
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
4
|
s = arguments[i];
|
|
5
|
-
|
|
6
5
|
for (var p in s) {
|
|
7
6
|
if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
8
7
|
}
|
|
9
8
|
}
|
|
10
|
-
|
|
11
9
|
return t;
|
|
12
10
|
};
|
|
13
|
-
|
|
14
11
|
return __assign.apply(this, arguments);
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
|
|
12
|
+
};
|
|
13
|
+
// @ts-ignore
|
|
18
14
|
import * as Vue from 'vue';
|
|
19
15
|
var allVue = Vue;
|
|
20
16
|
var gh = allVue.h;
|
|
@@ -25,7 +21,6 @@ import { packageMetadata } from '../package-metadata.js';
|
|
|
25
21
|
/**
|
|
26
22
|
* @hidden
|
|
27
23
|
*/
|
|
28
|
-
|
|
29
24
|
var ToolbarVue2 = {
|
|
30
25
|
name: 'KendoToolbar',
|
|
31
26
|
props: {
|
|
@@ -62,11 +57,9 @@ var ToolbarVue2 = {
|
|
|
62
57
|
mounted: function mounted() {
|
|
63
58
|
window.addEventListener('resize', this.onWindowResize);
|
|
64
59
|
var element = this.$el;
|
|
65
|
-
|
|
66
60
|
if (element) {
|
|
67
61
|
this.offsetWidth = element.offsetWidth;
|
|
68
62
|
this.offsetHeight = element.offsetHeight;
|
|
69
|
-
|
|
70
63
|
if (this.$props.keyboardNavigation !== false) {
|
|
71
64
|
this.currentButtons = this.getCurrentButtons();
|
|
72
65
|
this.setTabIndex(0);
|
|
@@ -75,11 +68,9 @@ var ToolbarVue2 = {
|
|
|
75
68
|
},
|
|
76
69
|
updated: function updated() {
|
|
77
70
|
var element = this.$el;
|
|
78
|
-
|
|
79
71
|
if (!element || this.$props.keyboardNavigation === false) {
|
|
80
72
|
return;
|
|
81
73
|
}
|
|
82
|
-
|
|
83
74
|
this.currentButtons = this.getCurrentButtons();
|
|
84
75
|
this.setTabIndex(this.focusedIndex());
|
|
85
76
|
},
|
|
@@ -142,18 +133,14 @@ var ToolbarVue2 = {
|
|
|
142
133
|
if (this.$props.keyboardNavigation === false) {
|
|
143
134
|
return;
|
|
144
135
|
}
|
|
145
|
-
|
|
146
136
|
var target = event.target;
|
|
147
137
|
var arrowKey = event.keyCode === Keys.left || event.keyCode === Keys.right;
|
|
148
|
-
|
|
149
138
|
if (!arrowKey || event.defaultPrevented || this.currentButtons.findIndex(function (b) {
|
|
150
139
|
return b === target;
|
|
151
140
|
}) === -1) {
|
|
152
141
|
return;
|
|
153
142
|
}
|
|
154
|
-
|
|
155
143
|
var focusedIndex = this.focusedIndex();
|
|
156
|
-
|
|
157
144
|
if (event.keyCode === Keys.left) {
|
|
158
145
|
this.focusButton(focusedIndex, focusedIndex - 1);
|
|
159
146
|
} else {
|
|
@@ -163,12 +150,10 @@ var ToolbarVue2 = {
|
|
|
163
150
|
focusButton: function focusButton(prevIndex, index) {
|
|
164
151
|
var tabIndex = this.$props.tabIndex;
|
|
165
152
|
var button = this.currentButtons[index];
|
|
166
|
-
|
|
167
153
|
if (button) {
|
|
168
154
|
button.tabIndex = tabIndex;
|
|
169
155
|
button.focus();
|
|
170
156
|
var prevButton = this.currentButtons[prevIndex];
|
|
171
|
-
|
|
172
157
|
if (prevButton) {
|
|
173
158
|
prevButton.tabIndex = -1;
|
|
174
159
|
}
|
|
@@ -176,14 +161,11 @@ var ToolbarVue2 = {
|
|
|
176
161
|
},
|
|
177
162
|
onWindowResize: function onWindowResize(event) {
|
|
178
163
|
var element = this.$el;
|
|
179
|
-
|
|
180
164
|
if (!element) {
|
|
181
165
|
return;
|
|
182
166
|
}
|
|
183
|
-
|
|
184
167
|
var offsetWidth = element.offsetWidth;
|
|
185
168
|
var offsetHeight = element.offsetHeight;
|
|
186
|
-
|
|
187
169
|
if (this.offsetWidth !== offsetWidth || this.offsetHeight !== offsetHeight) {
|
|
188
170
|
this.offsetWidth = offsetWidth;
|
|
189
171
|
this.offsetHeight = offsetHeight;
|
|
@@ -203,6 +185,5 @@ var ToolbarVue2 = {
|
|
|
203
185
|
/**
|
|
204
186
|
* @hidden
|
|
205
187
|
*/
|
|
206
|
-
|
|
207
188
|
var Toolbar = ToolbarVue2;
|
|
208
189
|
export { Toolbar, ToolbarVue2 };
|
|
@@ -7,7 +7,6 @@ import { getDefaultSlots } from '@progress/kendo-vue-common';
|
|
|
7
7
|
/**
|
|
8
8
|
* @hidden
|
|
9
9
|
*/
|
|
10
|
-
|
|
11
10
|
var ToolbarItemVue2 = {
|
|
12
11
|
name: 'KendoToolbarItem',
|
|
13
12
|
methods: {
|
|
@@ -53,6 +52,5 @@ var ToolbarItemVue2 = {
|
|
|
53
52
|
* </template>
|
|
54
53
|
* ```
|
|
55
54
|
*/
|
|
56
|
-
|
|
57
55
|
var ToolbarItem = ToolbarItemVue2;
|
|
58
56
|
export { ToolbarItem, ToolbarItemVue2 };
|
|
@@ -7,7 +7,6 @@ import { ToolbarItem } from './ToolbarItem.js';
|
|
|
7
7
|
/**
|
|
8
8
|
* @hidden
|
|
9
9
|
*/
|
|
10
|
-
|
|
11
10
|
var ToolbarSeparatorVue2 = {
|
|
12
11
|
name: 'KendoToolbarItem',
|
|
13
12
|
// @ts-ignore
|
|
@@ -19,7 +18,8 @@ var ToolbarSeparatorVue2 = {
|
|
|
19
18
|
},
|
|
20
19
|
render: function render(createElement) {
|
|
21
20
|
var h = gh || createElement;
|
|
22
|
-
return (
|
|
21
|
+
return (
|
|
22
|
+
// @ts-ignore
|
|
23
23
|
h(ToolbarItem, {
|
|
24
24
|
"class": "k-separator"
|
|
25
25
|
})
|
|
@@ -51,6 +51,5 @@ var ToolbarSeparatorVue2 = {
|
|
|
51
51
|
* </template>
|
|
52
52
|
* ```
|
|
53
53
|
*/
|
|
54
|
-
|
|
55
54
|
var ToolbarSeparator = ToolbarSeparatorVue2;
|
|
56
55
|
export { ToolbarSeparator, ToolbarSeparatorVue2 };
|
|
@@ -6,7 +6,6 @@ var isV3 = allVue.version && allVue.version[0] === '3';
|
|
|
6
6
|
/**
|
|
7
7
|
* @hidden
|
|
8
8
|
*/
|
|
9
|
-
|
|
10
9
|
var ToolbarSpacerVue2 = {
|
|
11
10
|
name: 'KendoToolbarItem',
|
|
12
11
|
// @ts-ignore
|
|
@@ -48,6 +47,5 @@ var ToolbarSpacerVue2 = {
|
|
|
48
47
|
* </template>
|
|
49
48
|
* ```
|
|
50
49
|
*/
|
|
51
|
-
|
|
52
50
|
var ToolbarSpacer = ToolbarSpacerVue2;
|
|
53
51
|
export { ToolbarSpacer, ToolbarSpacerVue2 };
|