@progress/kendo-vue-listbox 3.7.4-dev.202212300853
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/LICENSE.md +11 -0
- package/NOTICE.txt +86 -0
- package/README.md +52 -0
- package/dist/cdn/js/kendo-vue-listbox.js +1 -0
- package/dist/es/ListBox.d.ts +40 -0
- package/dist/es/ListBox.js +253 -0
- package/dist/es/ListBoxToolbar.d.ts +40 -0
- package/dist/es/ListBoxToolbar.js +166 -0
- package/dist/es/additionalTypes.ts +21 -0
- package/dist/es/interfaces/Enums.d.ts +7 -0
- package/dist/es/interfaces/Enums.js +8 -0
- package/dist/es/interfaces/ListBoxEvents.d.ts +13 -0
- package/dist/es/interfaces/ListBoxEvents.js +1 -0
- package/dist/es/interfaces/ListBoxProps.d.ts +93 -0
- package/dist/es/interfaces/ListBoxProps.js +2 -0
- package/dist/es/interfaces/ListBoxToolBarProps.d.ts +32 -0
- package/dist/es/interfaces/ListBoxToolBarProps.js +1 -0
- package/dist/es/main.d.ts +7 -0
- package/dist/es/main.js +4 -0
- package/dist/es/messages/main.d.ts +40 -0
- package/dist/es/messages/main.js +41 -0
- package/dist/es/package-metadata.d.ts +5 -0
- package/dist/es/package-metadata.js +11 -0
- package/dist/es/utils.d.ts +31 -0
- package/dist/es/utils.js +195 -0
- package/dist/esm/ListBox.d.ts +40 -0
- package/dist/esm/ListBox.js +253 -0
- package/dist/esm/ListBoxToolbar.d.ts +40 -0
- package/dist/esm/ListBoxToolbar.js +166 -0
- package/dist/esm/additionalTypes.ts +21 -0
- package/dist/esm/interfaces/Enums.d.ts +7 -0
- package/dist/esm/interfaces/Enums.js +8 -0
- package/dist/esm/interfaces/ListBoxEvents.d.ts +13 -0
- package/dist/esm/interfaces/ListBoxEvents.js +1 -0
- package/dist/esm/interfaces/ListBoxProps.d.ts +93 -0
- package/dist/esm/interfaces/ListBoxProps.js +2 -0
- package/dist/esm/interfaces/ListBoxToolBarProps.d.ts +32 -0
- package/dist/esm/interfaces/ListBoxToolBarProps.js +1 -0
- package/dist/esm/main.d.ts +7 -0
- package/dist/esm/main.js +4 -0
- package/dist/esm/messages/main.d.ts +40 -0
- package/dist/esm/messages/main.js +41 -0
- package/dist/esm/package-metadata.d.ts +5 -0
- package/dist/esm/package-metadata.js +11 -0
- package/dist/esm/package.json +3 -0
- package/dist/esm/utils.d.ts +31 -0
- package/dist/esm/utils.js +195 -0
- package/dist/npm/ListBox.d.ts +40 -0
- package/dist/npm/ListBox.js +260 -0
- package/dist/npm/ListBoxToolbar.d.ts +40 -0
- package/dist/npm/ListBoxToolbar.js +173 -0
- package/dist/npm/additionalTypes.ts +21 -0
- package/dist/npm/interfaces/Enums.d.ts +7 -0
- package/dist/npm/interfaces/Enums.js +14 -0
- package/dist/npm/interfaces/ListBoxEvents.d.ts +13 -0
- package/dist/npm/interfaces/ListBoxEvents.js +5 -0
- package/dist/npm/interfaces/ListBoxProps.d.ts +93 -0
- package/dist/npm/interfaces/ListBoxProps.js +3 -0
- package/dist/npm/interfaces/ListBoxToolBarProps.d.ts +32 -0
- package/dist/npm/interfaces/ListBoxToolBarProps.js +5 -0
- package/dist/npm/main.d.ts +7 -0
- package/dist/npm/main.js +11 -0
- package/dist/npm/messages/main.d.ts +40 -0
- package/dist/npm/messages/main.js +44 -0
- package/dist/npm/package-metadata.d.ts +5 -0
- package/dist/npm/package-metadata.js +14 -0
- package/dist/npm/utils.d.ts +31 -0
- package/dist/npm/utils.js +204 -0
- package/package.json +57 -0
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.ListBoxToolbarVue2 = exports.ListBoxToolbar = void 0;
|
|
7
|
+
// @ts-ignore
|
|
8
|
+
var Vue = require("vue");
|
|
9
|
+
var allVue = Vue;
|
|
10
|
+
var gh = allVue.h;
|
|
11
|
+
var isV3 = allVue.version && allVue.version[0] === '3';
|
|
12
|
+
var kendo_vue_buttons_1 = require("@progress/kendo-vue-buttons");
|
|
13
|
+
var kendo_vue_intl_1 = require("@progress/kendo-vue-intl");
|
|
14
|
+
var main_1 = require("./messages/main");
|
|
15
|
+
var tools = [{
|
|
16
|
+
name: 'moveUp',
|
|
17
|
+
iconName: 'caret-alt-up'
|
|
18
|
+
}, {
|
|
19
|
+
name: 'moveDown',
|
|
20
|
+
iconName: 'caret-alt-down'
|
|
21
|
+
}, {
|
|
22
|
+
name: 'transferTo',
|
|
23
|
+
iconName: 'caret-alt-right'
|
|
24
|
+
}, {
|
|
25
|
+
name: 'transferFrom',
|
|
26
|
+
iconName: 'caret-alt-left'
|
|
27
|
+
}, {
|
|
28
|
+
name: 'transferAllTo',
|
|
29
|
+
iconName: 'caret-double-alt-right'
|
|
30
|
+
}, {
|
|
31
|
+
name: 'transferAllFrom',
|
|
32
|
+
iconName: 'caret-double-alt-left'
|
|
33
|
+
}, {
|
|
34
|
+
name: 'remove',
|
|
35
|
+
iconName: 'x'
|
|
36
|
+
}];
|
|
37
|
+
/**
|
|
38
|
+
* @hidden
|
|
39
|
+
*/
|
|
40
|
+
var ListBoxToolbarVue2 = {
|
|
41
|
+
name: 'KendoListBoxToolbar',
|
|
42
|
+
props: {
|
|
43
|
+
dataItems: Array,
|
|
44
|
+
dataConnected: Array,
|
|
45
|
+
tools: Array,
|
|
46
|
+
selectedField: {
|
|
47
|
+
type: String,
|
|
48
|
+
default: 'selected'
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
inject: {
|
|
52
|
+
kendoLocalizationService: {
|
|
53
|
+
default: null
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
// @ts-ignore
|
|
57
|
+
setup: !isV3 ? undefined : function () {
|
|
58
|
+
var v3 = !!isV3;
|
|
59
|
+
return {
|
|
60
|
+
v3: v3
|
|
61
|
+
};
|
|
62
|
+
},
|
|
63
|
+
// @ts-ignore
|
|
64
|
+
render: function render(createElement) {
|
|
65
|
+
var h = gh || createElement;
|
|
66
|
+
var localizationService = (0, kendo_vue_intl_1.provideLocalizationService)(this);
|
|
67
|
+
return h("div", {
|
|
68
|
+
"class": 'k-listbox-toolbar'
|
|
69
|
+
}, [h("ul", {
|
|
70
|
+
"class": "k-reset"
|
|
71
|
+
}, [this.$props.tools && this.$props.tools.map(function (tool, index) {
|
|
72
|
+
var _this = this;
|
|
73
|
+
var indexOfTool = tools.findIndex(function (x) {
|
|
74
|
+
return x.name === tool;
|
|
75
|
+
});
|
|
76
|
+
var currentTool = tools[indexOfTool];
|
|
77
|
+
var isDisabled = this.isItemDisabled(currentTool.name);
|
|
78
|
+
var toolKey = "listbox.".concat(currentTool.name);
|
|
79
|
+
var title = localizationService.toLanguageString(toolKey, main_1.messages[toolKey]);
|
|
80
|
+
return h("li", {
|
|
81
|
+
key: index
|
|
82
|
+
}, [h(kendo_vue_buttons_1.Button, {
|
|
83
|
+
disabled: isDisabled,
|
|
84
|
+
attrs: this.v3 ? undefined : {
|
|
85
|
+
disabled: isDisabled,
|
|
86
|
+
"data-command": currentTool.name,
|
|
87
|
+
title: title,
|
|
88
|
+
"aria-label": title,
|
|
89
|
+
icon: currentTool.iconName
|
|
90
|
+
},
|
|
91
|
+
"data-command": currentTool.name,
|
|
92
|
+
title: title,
|
|
93
|
+
"aria-label": title,
|
|
94
|
+
icon: currentTool.iconName,
|
|
95
|
+
onClick: function onClick(e) {
|
|
96
|
+
e.preventDefault();
|
|
97
|
+
_this.handleToolClick(e, currentTool.name || null);
|
|
98
|
+
},
|
|
99
|
+
on: this.v3 ? undefined : {
|
|
100
|
+
"click": function onClick(e) {
|
|
101
|
+
e.preventDefault();
|
|
102
|
+
_this.handleToolClick(e, currentTool.name || null);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
})]);
|
|
106
|
+
}, this)])]);
|
|
107
|
+
},
|
|
108
|
+
methods: {
|
|
109
|
+
handleToolClick: function handleToolClick(event, name) {
|
|
110
|
+
this.$emit('toolclick', {
|
|
111
|
+
event: event,
|
|
112
|
+
component: this,
|
|
113
|
+
toolName: name
|
|
114
|
+
});
|
|
115
|
+
},
|
|
116
|
+
isItemDisabled: function isItemDisabled(tool) {
|
|
117
|
+
var disabled = true;
|
|
118
|
+
var selectedField = this.$props.selectedField || 'selected';
|
|
119
|
+
var dataLength = this.$props.dataItems.length;
|
|
120
|
+
var dataConnectedLength = this.$props.dataConnected.length;
|
|
121
|
+
var hasSelected = this.$props.dataItems.findIndex(function (item) {
|
|
122
|
+
return item[selectedField] === true;
|
|
123
|
+
}) >= 0;
|
|
124
|
+
var hasSelectedTwo = this.$props.dataConnected.findIndex(function (item) {
|
|
125
|
+
return item[selectedField] === true;
|
|
126
|
+
}) >= 0;
|
|
127
|
+
switch (tool) {
|
|
128
|
+
case 'moveUp':
|
|
129
|
+
if (hasSelected) {
|
|
130
|
+
disabled = this.$props.dataItems.length > 0 ? this.$props.dataItems[0].selected : true;
|
|
131
|
+
} else if (hasSelectedTwo) {
|
|
132
|
+
disabled = this.$props.dataConnected.length > 0 ? this.$props.dataConnected[0].selected : true;
|
|
133
|
+
} else {
|
|
134
|
+
disabled = true;
|
|
135
|
+
}
|
|
136
|
+
break;
|
|
137
|
+
case 'moveDown':
|
|
138
|
+
if (hasSelected) {
|
|
139
|
+
disabled = this.$props.dataItems[dataLength - 1] ? this.$props.dataItems[dataLength - 1].selectedField : true;
|
|
140
|
+
} else if (hasSelectedTwo) {
|
|
141
|
+
disabled = this.$props.dataConnected.length > 0 ? this.$props.dataConnected[dataConnectedLength - 1].selected : true;
|
|
142
|
+
} else {
|
|
143
|
+
disabled = true;
|
|
144
|
+
}
|
|
145
|
+
break;
|
|
146
|
+
case 'transferTo':
|
|
147
|
+
disabled = !(this.$props.dataConnected && hasSelected);
|
|
148
|
+
break;
|
|
149
|
+
case 'transferFrom':
|
|
150
|
+
if (this.$props.dataConnected) {
|
|
151
|
+
disabled = !(this.$props.dataConnected && hasSelectedTwo);
|
|
152
|
+
} else {
|
|
153
|
+
disabled = true;
|
|
154
|
+
}
|
|
155
|
+
break;
|
|
156
|
+
case 'transferAllTo':
|
|
157
|
+
disabled = !(this.$props.dataConnected && this.$props.dataItems.length > 0);
|
|
158
|
+
break;
|
|
159
|
+
case 'transferAllFrom':
|
|
160
|
+
disabled = !(this.$props.dataConnected && this.$props.dataConnected.length > 0);
|
|
161
|
+
break;
|
|
162
|
+
case 'remove':
|
|
163
|
+
disabled = !(hasSelected || hasSelectedTwo);
|
|
164
|
+
break;
|
|
165
|
+
default:
|
|
166
|
+
}
|
|
167
|
+
return disabled;
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
};
|
|
171
|
+
exports.ListBoxToolbarVue2 = ListBoxToolbarVue2;
|
|
172
|
+
var ListBoxToolbar = ListBoxToolbarVue2;
|
|
173
|
+
exports.ListBoxToolbar = ListBoxToolbar;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// @ts-ignore
|
|
2
|
+
import { DefineComponent } from 'vue';
|
|
3
|
+
// @ts-ignore
|
|
4
|
+
import * as Vue from 'vue';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* @hidden
|
|
8
|
+
*/
|
|
9
|
+
// @ts-ignore
|
|
10
|
+
type Vue2type = Vue.default;
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* @hidden
|
|
14
|
+
*/
|
|
15
|
+
// @ts-ignore
|
|
16
|
+
import { RecordPropsDefinition, ComponentOptions } from 'vue/types/options';
|
|
17
|
+
/**
|
|
18
|
+
* @hidden
|
|
19
|
+
*/
|
|
20
|
+
// @ts-ignore
|
|
21
|
+
export { DefineComponent, RecordPropsDefinition, ComponentOptions, Vue2type };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.toolbarPosition = void 0;
|
|
7
|
+
var toolbarPosition;
|
|
8
|
+
(function (toolbarPosition) {
|
|
9
|
+
toolbarPosition["TOP"] = "top";
|
|
10
|
+
toolbarPosition["BOTTOM"] = "bottom";
|
|
11
|
+
toolbarPosition["LEFT"] = "left";
|
|
12
|
+
toolbarPosition["RIGHT"] = "right";
|
|
13
|
+
toolbarPosition["NONE"] = "none";
|
|
14
|
+
})(toolbarPosition = exports.toolbarPosition || (exports.toolbarPosition = {}));
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface ListBoxItemClickEvent {
|
|
2
|
+
dataItem?: any;
|
|
3
|
+
}
|
|
4
|
+
export interface ListBoxKeyDownEvent {
|
|
5
|
+
}
|
|
6
|
+
export interface ListBoxDragLeaveEvent {
|
|
7
|
+
}
|
|
8
|
+
export interface ListBoxToolbarClickEvent {
|
|
9
|
+
toolName?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface ListBoxDragEvent {
|
|
12
|
+
dataItem?: any;
|
|
13
|
+
}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { ListBoxItemClickEvent, ListBoxKeyDownEvent, ListBoxDragEvent, ListBoxDragLeaveEvent } from './ListBoxEvents';
|
|
2
|
+
import { toolbarPosition } from './Enums';
|
|
3
|
+
/**
|
|
4
|
+
* Represents the props of the [Kendo UI for Vue ListBox component]({% slug overview_listbox %}).
|
|
5
|
+
*/
|
|
6
|
+
export interface ListBoxProps {
|
|
7
|
+
/**
|
|
8
|
+
* Sets a class of the Tooltip animation container.
|
|
9
|
+
*/
|
|
10
|
+
className?: string;
|
|
11
|
+
/**
|
|
12
|
+
* Configures the `size` of the ListBox.
|
|
13
|
+
*
|
|
14
|
+
* The available options are:
|
|
15
|
+
* - small
|
|
16
|
+
* - medium
|
|
17
|
+
* - large
|
|
18
|
+
* - null—Does not set a size `className`.
|
|
19
|
+
*
|
|
20
|
+
* @default `medium`
|
|
21
|
+
*/
|
|
22
|
+
size?: null | 'small' | 'medium' | 'large' | string;
|
|
23
|
+
/**
|
|
24
|
+
* Set the data of the ListBox.
|
|
25
|
+
*/
|
|
26
|
+
dataItems: Array<any>;
|
|
27
|
+
/**
|
|
28
|
+
* Makes the items of the ListBox draggable. The items are draggable by default.
|
|
29
|
+
*/
|
|
30
|
+
draggable?: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* Set the selected field of the ListBox. Based on that value of that field, an item will be selected or not.
|
|
33
|
+
*/
|
|
34
|
+
selectedField?: string;
|
|
35
|
+
/**
|
|
36
|
+
* Sets the data item field that represents the item text. If the data contains only primitive values, do not define it.
|
|
37
|
+
*/
|
|
38
|
+
textField: string;
|
|
39
|
+
/**
|
|
40
|
+
* The field that be used during form submit. Defaults to the textField if not set.
|
|
41
|
+
*/
|
|
42
|
+
valueField?: string;
|
|
43
|
+
/**
|
|
44
|
+
* The field that is used for rendering key of the items.
|
|
45
|
+
*/
|
|
46
|
+
keyField?: string;
|
|
47
|
+
/**
|
|
48
|
+
* Sets the position of the toolbar of the ListBox if one is set. The ListBox may have no toolbar.
|
|
49
|
+
* * The possible values are:
|
|
50
|
+
* * `top`
|
|
51
|
+
* * `bottom`
|
|
52
|
+
* * `left`
|
|
53
|
+
* * `right` (Default)
|
|
54
|
+
* * `none`
|
|
55
|
+
*/
|
|
56
|
+
toolbarPosition?: toolbarPosition | string;
|
|
57
|
+
/**
|
|
58
|
+
* Renders a toolbar component next to the ListBox.
|
|
59
|
+
*/
|
|
60
|
+
toolbar?: string | object | Function;
|
|
61
|
+
/**
|
|
62
|
+
* Sets the `tabIndex` attribute of the ListBox.
|
|
63
|
+
*/
|
|
64
|
+
tabIndex?: number;
|
|
65
|
+
/**
|
|
66
|
+
* Defines the component that will be rendered for each item of the data collection.
|
|
67
|
+
*/
|
|
68
|
+
item?: string | object | Function;
|
|
69
|
+
/**
|
|
70
|
+
* Fires when an item from the ListBox is clicked. Contains the clicked item.
|
|
71
|
+
*/
|
|
72
|
+
onItemclick?: (event: ListBoxItemClickEvent) => void;
|
|
73
|
+
/**
|
|
74
|
+
* Fires on keydown over the ListBox list items. It can be use to add keyboard extra keyboard navigation option.
|
|
75
|
+
*/
|
|
76
|
+
onKeydown?: (event: ListBoxKeyDownEvent) => void;
|
|
77
|
+
/**
|
|
78
|
+
* Fires when an the user start to drag an item from the ListBox. The event contains information for the item that is being dragged.
|
|
79
|
+
*/
|
|
80
|
+
onDragstart?: (event: ListBoxDragEvent) => void;
|
|
81
|
+
/**
|
|
82
|
+
* Fires when an the user drags over an item from the ListBox. The event contains information for the item that is dragged over.
|
|
83
|
+
*/
|
|
84
|
+
onDragover?: (event: ListBoxDragEvent) => void;
|
|
85
|
+
/**
|
|
86
|
+
* Fires when an the user drops an item. The event contains information for the drop target item.
|
|
87
|
+
*/
|
|
88
|
+
onDrop?: (event: ListBoxDragEvent) => void;
|
|
89
|
+
/**
|
|
90
|
+
* Fires when a dragged element or text selection leaves the ListBox element.
|
|
91
|
+
*/
|
|
92
|
+
onDragleave?: (event: ListBoxDragLeaveEvent) => void;
|
|
93
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { ListBoxToolbarClickEvent } from './ListBoxEvents';
|
|
2
|
+
export interface ListBoxToolbarProps {
|
|
3
|
+
/**
|
|
4
|
+
* Sets the tools of the ListBoxToolbar. By default, the ListBoxToolbar renders no tools.
|
|
5
|
+
* The built-in tools are:
|
|
6
|
+
* * `moveUp`
|
|
7
|
+
* * `moveDown`
|
|
8
|
+
* * `transferTo`
|
|
9
|
+
* * `transferFrom`
|
|
10
|
+
* * `transferAllTo`
|
|
11
|
+
* * `transferAllFrom`
|
|
12
|
+
* * `remove`
|
|
13
|
+
*/
|
|
14
|
+
tools?: Array<string>;
|
|
15
|
+
/**
|
|
16
|
+
* The data of the main ListBox.
|
|
17
|
+
*/
|
|
18
|
+
dataItems: Array<any>;
|
|
19
|
+
/**
|
|
20
|
+
* The data of the connected ListBox.
|
|
21
|
+
*/
|
|
22
|
+
dataConnected: Array<any>;
|
|
23
|
+
/**
|
|
24
|
+
* Set the selected field of the ListBoxToolbar.
|
|
25
|
+
* Based on that value of that field the ListBoxToolbar will determine which actions are allowed and which disabled.
|
|
26
|
+
*/
|
|
27
|
+
selectedField?: string;
|
|
28
|
+
/**
|
|
29
|
+
* Fires when one of the ListBoxToolbar tools is clicked.
|
|
30
|
+
*/
|
|
31
|
+
onToolclick?: (event: ListBoxToolbarClickEvent) => void;
|
|
32
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ListBox } from './ListBox';
|
|
2
|
+
import { ListBoxProps } from './interfaces/ListBoxProps';
|
|
3
|
+
import { ListBoxToolbar } from './ListBoxToolbar';
|
|
4
|
+
import { ListBoxToolbarProps } from './interfaces/ListBoxToolBarProps';
|
|
5
|
+
import { processListBoxData, moveItem, processListBoxDragAndDrop } from './utils';
|
|
6
|
+
import { ListBoxDragEvent, ListBoxItemClickEvent, ListBoxKeyDownEvent, ListBoxToolbarClickEvent } from './interfaces/ListBoxEvents';
|
|
7
|
+
export { ListBox, ListBoxProps, ListBoxToolbar, ListBoxToolbarProps, processListBoxData, moveItem, processListBoxDragAndDrop, ListBoxDragEvent, ListBoxItemClickEvent, ListBoxKeyDownEvent, ListBoxToolbarClickEvent };
|
package/dist/npm/main.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.processListBoxDragAndDrop = exports.moveItem = exports.processListBoxData = exports.ListBoxToolbar = exports.ListBox = void 0;
|
|
4
|
+
var ListBox_1 = require("./ListBox");
|
|
5
|
+
Object.defineProperty(exports, "ListBox", { enumerable: true, get: function () { return ListBox_1.ListBox; } });
|
|
6
|
+
var ListBoxToolbar_1 = require("./ListBoxToolbar");
|
|
7
|
+
Object.defineProperty(exports, "ListBoxToolbar", { enumerable: true, get: function () { return ListBoxToolbar_1.ListBoxToolbar; } });
|
|
8
|
+
var utils_1 = require("./utils");
|
|
9
|
+
Object.defineProperty(exports, "processListBoxData", { enumerable: true, get: function () { return utils_1.processListBoxData; } });
|
|
10
|
+
Object.defineProperty(exports, "moveItem", { enumerable: true, get: function () { return utils_1.moveItem; } });
|
|
11
|
+
Object.defineProperty(exports, "processListBoxDragAndDrop", { enumerable: true, get: function () { return utils_1.processListBoxDragAndDrop; } });
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @hidden
|
|
3
|
+
*/
|
|
4
|
+
export declare const moveUp = "listbox.moveUp";
|
|
5
|
+
/**
|
|
6
|
+
* @hidden
|
|
7
|
+
*/
|
|
8
|
+
export declare const moveDown = "listbox.moveDown";
|
|
9
|
+
/**
|
|
10
|
+
* @hidden
|
|
11
|
+
*/
|
|
12
|
+
export declare const transferTo = "listbox.transferTo";
|
|
13
|
+
/**
|
|
14
|
+
* @hidden
|
|
15
|
+
*/
|
|
16
|
+
export declare const transferFrom = "listbox.transferFrom";
|
|
17
|
+
/**
|
|
18
|
+
* @hidden
|
|
19
|
+
*/
|
|
20
|
+
export declare const transferAllTo = "listbox.transferAllTo";
|
|
21
|
+
/**
|
|
22
|
+
* @hidden
|
|
23
|
+
*/
|
|
24
|
+
export declare const transferAllFrom = "listbox.transferAllFrom";
|
|
25
|
+
/**
|
|
26
|
+
* @hidden
|
|
27
|
+
*/
|
|
28
|
+
export declare const remove = "listbox.remove";
|
|
29
|
+
/**
|
|
30
|
+
* @hidden
|
|
31
|
+
*/
|
|
32
|
+
export declare const messages: {
|
|
33
|
+
"listbox.moveUp": string;
|
|
34
|
+
"listbox.moveDown": string;
|
|
35
|
+
"listbox.transferTo": string;
|
|
36
|
+
"listbox.transferFrom": string;
|
|
37
|
+
"listbox.transferAllTo": string;
|
|
38
|
+
"listbox.transferAllFrom": string;
|
|
39
|
+
"listbox.remove": string;
|
|
40
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var _a;
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.messages = exports.remove = exports.transferAllFrom = exports.transferAllTo = exports.transferFrom = exports.transferTo = exports.moveDown = exports.moveUp = void 0;
|
|
5
|
+
/**
|
|
6
|
+
* @hidden
|
|
7
|
+
*/
|
|
8
|
+
exports.moveUp = 'listbox.moveUp';
|
|
9
|
+
/**
|
|
10
|
+
* @hidden
|
|
11
|
+
*/
|
|
12
|
+
exports.moveDown = 'listbox.moveDown';
|
|
13
|
+
/**
|
|
14
|
+
* @hidden
|
|
15
|
+
*/
|
|
16
|
+
exports.transferTo = 'listbox.transferTo';
|
|
17
|
+
/**
|
|
18
|
+
* @hidden
|
|
19
|
+
*/
|
|
20
|
+
exports.transferFrom = 'listbox.transferFrom';
|
|
21
|
+
/**
|
|
22
|
+
* @hidden
|
|
23
|
+
*/
|
|
24
|
+
exports.transferAllTo = 'listbox.transferAllTo';
|
|
25
|
+
/**
|
|
26
|
+
* @hidden
|
|
27
|
+
*/
|
|
28
|
+
exports.transferAllFrom = 'listbox.transferAllFrom';
|
|
29
|
+
/**
|
|
30
|
+
* @hidden
|
|
31
|
+
*/
|
|
32
|
+
exports.remove = 'listbox.remove';
|
|
33
|
+
/**
|
|
34
|
+
* @hidden
|
|
35
|
+
*/
|
|
36
|
+
exports.messages = (_a = {},
|
|
37
|
+
_a[exports.moveUp] = 'Move Up',
|
|
38
|
+
_a[exports.moveDown] = 'Move Down',
|
|
39
|
+
_a[exports.transferTo] = 'Transfer To',
|
|
40
|
+
_a[exports.transferFrom] = 'Transfer From',
|
|
41
|
+
_a[exports.transferAllTo] = 'Transfer All To',
|
|
42
|
+
_a[exports.transferAllFrom] = 'Transfer All From',
|
|
43
|
+
_a[exports.remove] = 'Delete',
|
|
44
|
+
_a);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.packageMetadata = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* @hidden
|
|
6
|
+
*/
|
|
7
|
+
exports.packageMetadata = {
|
|
8
|
+
name: '@progress/kendo-vue-listbox',
|
|
9
|
+
productName: 'Kendo UI for Vue',
|
|
10
|
+
productCodes: ['KENDOUIVUE', 'KENDOUICOMPLETE'],
|
|
11
|
+
publishDate: 1672390045,
|
|
12
|
+
version: '',
|
|
13
|
+
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'
|
|
14
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Process the data collection/s based on the clicked ListBoxToolbar tool.
|
|
3
|
+
*
|
|
4
|
+
* @param {T[]} listBoxOneData - The first data collection.
|
|
5
|
+
* @param {T[]} listBoxTwoData - The second data collection. Pass an empty array if there is only one ListBox.
|
|
6
|
+
* @param {string} toolName - The tool that was clicked.
|
|
7
|
+
* @param {string} selectedField - The field that contains the selected information in the data object.
|
|
8
|
+
* @returns {{listBoxOneData: T[], listBoxTwoData: t[]}} - The object that contains the new data collections.
|
|
9
|
+
*/
|
|
10
|
+
export declare const processListBoxData: (listBoxOneData: Array<any>, listBoxTwoData: Array<any>, toolName: string, selectedField: string) => {
|
|
11
|
+
listBoxOneData: any[];
|
|
12
|
+
listBoxTwoData: any[];
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* @hidden
|
|
16
|
+
*/
|
|
17
|
+
export declare const moveItem: (from: number, to: number, data: Array<any>) => any[];
|
|
18
|
+
/**
|
|
19
|
+
* Process the data collection/s based on the dragged and drop item.
|
|
20
|
+
*
|
|
21
|
+
* @param {T[]} listBoxOneData - The first data collection.
|
|
22
|
+
* @param {T[]} listBoxTwoData - The second data collection. Pass an empty array if there is only one ListBox.
|
|
23
|
+
* @param {any} dragItem - The item that was dragged.
|
|
24
|
+
* @param {any} dropItem - The drop target item.
|
|
25
|
+
* @param {string} valueField - The field which points to the unique value of each data item.
|
|
26
|
+
* @returns {{listBoxOneData: T[], listBoxTwoData: t[]}} - The object that contains the new data collections.
|
|
27
|
+
*/
|
|
28
|
+
export declare const processListBoxDragAndDrop: (listBoxOneData: Array<any>, listBoxTwoData: Array<any>, dragItem: any, dropItem: any, valueField: string) => {
|
|
29
|
+
listBoxOneData: any[];
|
|
30
|
+
listBoxTwoData: any[];
|
|
31
|
+
};
|