@progress/kendo-react-dropdowns 6.1.1 → 7.0.0-develop.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{dist/es/AutoComplete → AutoComplete}/AutoComplete.d.ts +12 -8
- package/{dist/npm/AutoComplete → AutoComplete}/AutoCompleteProps.d.ts +4 -1
- package/{dist/es/ComboBox → ComboBox}/ComboBox.d.ts +12 -8
- package/{dist/es/ComboBox → ComboBox}/ComboBoxProps.d.ts +4 -1
- package/{dist/es/DropDownList → DropDownList}/DropDownList.d.ts +9 -5
- package/{dist/es/DropDownList → DropDownList}/DropDownListProps.d.ts +4 -1
- package/{dist/es/DropDownTree → DropDownTree}/DropDownTree.d.ts +4 -0
- package/{dist/npm/DropDownTree → DropDownTree}/DropDownTreeProps.d.ts +4 -1
- package/DropDownTree/ListNoData.d.ts +10 -0
- package/DropDownTree/useDropdownWidth.d.ts +9 -0
- package/LICENSE.md +1 -1
- package/{dist/es/MultiColumnComboBox → MultiColumnComboBox}/MultiColumnComboBox.d.ts +4 -0
- package/{dist/npm/MultiSelect → MultiSelect}/MultiSelect.d.ts +9 -5
- package/{dist/es/MultiSelect → MultiSelect}/MultiSelectProps.d.ts +4 -1
- package/{dist/npm/MultiSelect → MultiSelect}/TagList.d.ts +5 -1
- package/{dist/es/MultiSelectTree → MultiSelectTree}/MultiSelectTree.d.ts +4 -0
- package/{dist/es/MultiSelectTree → MultiSelectTree}/MultiSelectTreeProps.d.ts +5 -1
- package/{dist/npm/MultiSelectTree → MultiSelectTree}/utils.d.ts +5 -1
- package/{dist/npm/common → common}/AdaptiveMode.d.ts +5 -1
- package/common/ClearButton.d.ts +18 -0
- package/{dist/npm/common → common}/DropDownBase.d.ts +5 -1
- package/{dist/es/common → common}/GroupStickyHeader.d.ts +5 -1
- package/{dist/es/common → common}/List.d.ts +7 -3
- package/common/ListContainer.d.ts +22 -0
- package/common/ListDefaultItem.d.ts +20 -0
- package/{dist/npm/common → common}/ListFilter.d.ts +4 -0
- package/{dist/npm/common → common}/ListGroupItem.d.ts +5 -1
- package/{dist/npm/common → common}/ListItem.d.ts +5 -1
- package/common/MultiColumnList.d.ts +9 -0
- package/common/Navigation.d.ts +17 -0
- package/{dist/es/common → common}/SearchBar.d.ts +5 -1
- package/{dist/npm/common → common}/VirtualScroll.d.ts +4 -1
- package/common/constants.d.ts +8 -0
- package/{dist/es/common → common}/events.d.ts +4 -1
- package/{dist/npm/common → common}/filterDescriptor.d.ts +4 -0
- package/{dist/es/common → common}/settings.d.ts +5 -2
- package/{dist/npm/common → common}/utils.d.ts +4 -0
- package/dist/cdn/js/kendo-react-dropdowns.js +5 -1
- package/index.d.ts +29 -0
- package/index.js +5 -0
- package/index.mjs +4383 -0
- package/{dist/npm/messages → messages}/index.d.ts +4 -0
- package/package-metadata.d.ts +9 -0
- package/package.json +34 -62
- package/about.md +0 -3
- package/dist/es/AutoComplete/AutoComplete.js +0 -652
- package/dist/es/AutoComplete/AutoCompleteProps.d.ts +0 -243
- package/dist/es/AutoComplete/AutoCompleteProps.js +0 -2
- package/dist/es/ComboBox/ComboBox.js +0 -915
- package/dist/es/ComboBox/ComboBoxProps.js +0 -2
- package/dist/es/DropDownList/DropDownList.js +0 -887
- package/dist/es/DropDownList/DropDownListProps.js +0 -2
- package/dist/es/DropDownTree/DropDownTree.js +0 -540
- package/dist/es/DropDownTree/DropDownTreeProps.d.ts +0 -294
- package/dist/es/DropDownTree/DropDownTreeProps.js +0 -2
- package/dist/es/DropDownTree/ListNoData.d.ts +0 -6
- package/dist/es/DropDownTree/ListNoData.js +0 -8
- package/dist/es/DropDownTree/useDropdownWidth.d.ts +0 -5
- package/dist/es/DropDownTree/useDropdownWidth.js +0 -13
- package/dist/es/MultiColumnComboBox/MultiColumnComboBox.js +0 -213
- package/dist/es/MultiSelect/MultiSelect.d.ts +0 -256
- package/dist/es/MultiSelect/MultiSelect.js +0 -1110
- package/dist/es/MultiSelect/MultiSelectProps.js +0 -2
- package/dist/es/MultiSelect/TagList.d.ts +0 -38
- package/dist/es/MultiSelect/TagList.js +0 -39
- package/dist/es/MultiSelectTree/MultiSelectTree.js +0 -619
- package/dist/es/MultiSelectTree/MultiSelectTreeProps.js +0 -2
- package/dist/es/MultiSelectTree/utils.d.ts +0 -17
- package/dist/es/MultiSelectTree/utils.js +0 -191
- package/dist/es/common/AdaptiveMode.d.ts +0 -21
- package/dist/es/common/AdaptiveMode.js +0 -45
- package/dist/es/common/ClearButton.d.ts +0 -14
- package/dist/es/common/ClearButton.js +0 -39
- package/dist/es/common/DropDownBase.d.ts +0 -175
- package/dist/es/common/DropDownBase.js +0 -297
- package/dist/es/common/GroupStickyHeader.js +0 -34
- package/dist/es/common/List.js +0 -75
- package/dist/es/common/ListContainer.d.ts +0 -18
- package/dist/es/common/ListContainer.js +0 -43
- package/dist/es/common/ListDefaultItem.d.ts +0 -16
- package/dist/es/common/ListDefaultItem.js +0 -36
- package/dist/es/common/ListFilter.d.ts +0 -19
- package/dist/es/common/ListFilter.js +0 -37
- package/dist/es/common/ListGroupItem.d.ts +0 -33
- package/dist/es/common/ListGroupItem.js +0 -33
- package/dist/es/common/ListItem.d.ts +0 -61
- package/dist/es/common/ListItem.js +0 -44
- package/dist/es/common/MultiColumnList.d.ts +0 -6
- package/dist/es/common/MultiColumnList.js +0 -22
- package/dist/es/common/Navigation.d.ts +0 -13
- package/dist/es/common/Navigation.js +0 -34
- package/dist/es/common/SearchBar.js +0 -62
- package/dist/es/common/VirtualScroll.d.ts +0 -42
- package/dist/es/common/VirtualScroll.js +0 -161
- package/dist/es/common/constants.d.ts +0 -4
- package/dist/es/common/constants.js +0 -4
- package/dist/es/common/events.js +0 -1
- package/dist/es/common/filterDescriptor.d.ts +0 -41
- package/dist/es/common/filterDescriptor.js +0 -2
- package/dist/es/common/settings.js +0 -8
- package/dist/es/common/utils.d.ts +0 -62
- package/dist/es/common/utils.js +0 -194
- package/dist/es/main.d.ts +0 -25
- package/dist/es/main.js +0 -19
- package/dist/es/messages/index.d.ts +0 -40
- package/dist/es/messages/index.js +0 -41
- package/dist/es/package-metadata.d.ts +0 -5
- package/dist/es/package-metadata.js +0 -11
- package/dist/npm/AutoComplete/AutoComplete.d.ts +0 -230
- package/dist/npm/AutoComplete/AutoComplete.js +0 -655
- package/dist/npm/AutoComplete/AutoCompleteProps.js +0 -3
- package/dist/npm/ComboBox/ComboBox.d.ts +0 -248
- package/dist/npm/ComboBox/ComboBox.js +0 -918
- package/dist/npm/ComboBox/ComboBoxProps.d.ts +0 -313
- package/dist/npm/ComboBox/ComboBoxProps.js +0 -3
- package/dist/npm/DropDownList/DropDownList.d.ts +0 -258
- package/dist/npm/DropDownList/DropDownList.js +0 -890
- package/dist/npm/DropDownList/DropDownListProps.d.ts +0 -326
- package/dist/npm/DropDownList/DropDownListProps.js +0 -3
- package/dist/npm/DropDownTree/DropDownTree.d.ts +0 -70
- package/dist/npm/DropDownTree/DropDownTree.js +0 -543
- package/dist/npm/DropDownTree/DropDownTreeProps.js +0 -3
- package/dist/npm/DropDownTree/ListNoData.d.ts +0 -6
- package/dist/npm/DropDownTree/ListNoData.js +0 -12
- package/dist/npm/DropDownTree/useDropdownWidth.d.ts +0 -5
- package/dist/npm/DropDownTree/useDropdownWidth.js +0 -17
- package/dist/npm/MultiColumnComboBox/MultiColumnComboBox.d.ts +0 -287
- package/dist/npm/MultiColumnComboBox/MultiColumnComboBox.js +0 -216
- package/dist/npm/MultiSelect/MultiSelect.js +0 -1113
- package/dist/npm/MultiSelect/MultiSelectProps.d.ts +0 -314
- package/dist/npm/MultiSelect/MultiSelectProps.js +0 -3
- package/dist/npm/MultiSelect/TagList.js +0 -41
- package/dist/npm/MultiSelectTree/MultiSelectTree.d.ts +0 -81
- package/dist/npm/MultiSelectTree/MultiSelectTree.js +0 -622
- package/dist/npm/MultiSelectTree/MultiSelectTreeProps.d.ts +0 -320
- package/dist/npm/MultiSelectTree/MultiSelectTreeProps.js +0 -3
- package/dist/npm/MultiSelectTree/utils.js +0 -196
- package/dist/npm/common/AdaptiveMode.js +0 -49
- package/dist/npm/common/ClearButton.d.ts +0 -14
- package/dist/npm/common/ClearButton.js +0 -41
- package/dist/npm/common/DropDownBase.js +0 -299
- package/dist/npm/common/GroupStickyHeader.d.ts +0 -24
- package/dist/npm/common/GroupStickyHeader.js +0 -36
- package/dist/npm/common/List.d.ts +0 -45
- package/dist/npm/common/List.js +0 -77
- package/dist/npm/common/ListContainer.d.ts +0 -18
- package/dist/npm/common/ListContainer.js +0 -45
- package/dist/npm/common/ListDefaultItem.d.ts +0 -16
- package/dist/npm/common/ListDefaultItem.js +0 -38
- package/dist/npm/common/ListFilter.js +0 -39
- package/dist/npm/common/ListGroupItem.js +0 -35
- package/dist/npm/common/ListItem.js +0 -46
- package/dist/npm/common/MultiColumnList.d.ts +0 -6
- package/dist/npm/common/MultiColumnList.js +0 -26
- package/dist/npm/common/Navigation.d.ts +0 -13
- package/dist/npm/common/Navigation.js +0 -37
- package/dist/npm/common/SearchBar.d.ts +0 -43
- package/dist/npm/common/SearchBar.js +0 -64
- package/dist/npm/common/VirtualScroll.js +0 -163
- package/dist/npm/common/constants.d.ts +0 -4
- package/dist/npm/common/constants.js +0 -7
- package/dist/npm/common/events.d.ts +0 -73
- package/dist/npm/common/events.js +0 -2
- package/dist/npm/common/filterDescriptor.js +0 -3
- package/dist/npm/common/settings.d.ts +0 -114
- package/dist/npm/common/settings.js +0 -11
- package/dist/npm/common/utils.js +0 -211
- package/dist/npm/main.d.ts +0 -25
- package/dist/npm/main.js +0 -62
- package/dist/npm/messages/index.js +0 -44
- package/dist/npm/package-metadata.d.ts +0 -5
- package/dist/npm/package-metadata.js +0 -14
- package/dist/systemjs/kendo-react-dropdowns.js +0 -1
- package/e2e-next/combobox.basic.ts +0 -24
- package/e2e-next/dropdownlist.basic.tests.ts +0 -24
- package/e2e-next/dropdowntree.basic.tests.ts +0 -24
- package/e2e-next/multicolumncombobox.basic.tests.ts +0 -24
|
@@ -1,191 +0,0 @@
|
|
|
1
|
-
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
2
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
3
|
-
if (ar || !(i in from)) {
|
|
4
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
5
|
-
ar[i] = from[i];
|
|
6
|
-
}
|
|
7
|
-
}
|
|
8
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
9
|
-
};
|
|
10
|
-
import { getter } from '@progress/kendo-react-common';
|
|
11
|
-
/** @hidden */
|
|
12
|
-
export var getValueMap = function (value, idGetter) {
|
|
13
|
-
var map = {};
|
|
14
|
-
if (value && value.length) {
|
|
15
|
-
value.forEach(function (item) {
|
|
16
|
-
map[idGetter(item)] = true;
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
return map;
|
|
20
|
-
};
|
|
21
|
-
/**
|
|
22
|
-
* Get MultiSelectTree new value from the component `onChange` event.
|
|
23
|
-
*
|
|
24
|
-
* @param {any[]} data
|
|
25
|
-
* @param {object} options
|
|
26
|
-
* @returns {any[]}
|
|
27
|
-
*/
|
|
28
|
-
export var getMultiSelectTreeValue = function (data, options) {
|
|
29
|
-
var items = options.items, dataItemKey = options.dataItemKey, value = options.value, _a = options.subItemsField, subItemsField = _a === void 0 ? 'items' : _a, operation = options.operation;
|
|
30
|
-
var idGetter = getter(dataItemKey);
|
|
31
|
-
var valueMap = getValueMap(value, idGetter);
|
|
32
|
-
if (operation === 'clear') {
|
|
33
|
-
return [];
|
|
34
|
-
}
|
|
35
|
-
else if (operation === 'delete') {
|
|
36
|
-
var deletedItemsMap_1 = getValueMap(items, idGetter);
|
|
37
|
-
return value.filter(function (item) { return !deletedItemsMap_1[idGetter(item)]; });
|
|
38
|
-
}
|
|
39
|
-
// operation === 'toggle'
|
|
40
|
-
var selectedItem = items[0];
|
|
41
|
-
var selectedId = idGetter(selectedItem);
|
|
42
|
-
var subItemGetter = getter(subItemsField);
|
|
43
|
-
var stack = __spreadArray([], data, true);
|
|
44
|
-
var context = [];
|
|
45
|
-
var parents = [];
|
|
46
|
-
var foundItem;
|
|
47
|
-
while (stack.length) {
|
|
48
|
-
var currentItem = stack.pop();
|
|
49
|
-
if (selectedId === idGetter(currentItem)) {
|
|
50
|
-
parents = context.map(function (contextItem) { return contextItem.item; });
|
|
51
|
-
foundItem = currentItem;
|
|
52
|
-
break;
|
|
53
|
-
}
|
|
54
|
-
else {
|
|
55
|
-
if (context &&
|
|
56
|
-
context.length &&
|
|
57
|
-
context[context.length - 1].parentPosition === stack.length) {
|
|
58
|
-
context.pop();
|
|
59
|
-
}
|
|
60
|
-
var subItems = subItemGetter(currentItem);
|
|
61
|
-
if (subItems && subItems.length) {
|
|
62
|
-
context.push({ item: currentItem, parentPosition: stack.length });
|
|
63
|
-
stack.push.apply(stack, subItems);
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
var childrenStack = __spreadArray([], (subItemGetter(foundItem) || []), true);
|
|
68
|
-
var children = [];
|
|
69
|
-
while (childrenStack.length) {
|
|
70
|
-
var currentItem = childrenStack.pop();
|
|
71
|
-
children.push(currentItem);
|
|
72
|
-
var subItems = subItemGetter(currentItem);
|
|
73
|
-
if (subItems && subItems.length) {
|
|
74
|
-
childrenStack.push.apply(childrenStack, subItems);
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
var isChecked = !valueMap[selectedId];
|
|
78
|
-
var newValue = [];
|
|
79
|
-
if (isChecked) {
|
|
80
|
-
newValue.push.apply(newValue, value);
|
|
81
|
-
newValue.push(foundItem);
|
|
82
|
-
newValue.push.apply(newValue, children.filter(function (item) { return !valueMap[idGetter(item)]; }));
|
|
83
|
-
var parentCandidates = parents.filter(function (item) { return !valueMap[idGetter(item)]; });
|
|
84
|
-
var newValueMap_1 = getValueMap(newValue, idGetter);
|
|
85
|
-
for (var i = parentCandidates.length - 1; i > -1; i--) {
|
|
86
|
-
var candidate = parentCandidates[i];
|
|
87
|
-
var subItems = subItemGetter(candidate);
|
|
88
|
-
var checkedChildrenLength = subItems.filter(function (item) { return newValueMap_1[idGetter(item)]; }).length;
|
|
89
|
-
if (checkedChildrenLength < subItems.length) {
|
|
90
|
-
break;
|
|
91
|
-
}
|
|
92
|
-
else {
|
|
93
|
-
newValue.push(candidate);
|
|
94
|
-
newValueMap_1[idGetter(candidate)] = true;
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
else {
|
|
99
|
-
var foundId_1 = idGetter(foundItem);
|
|
100
|
-
var childrenMap_1 = getValueMap(children, idGetter);
|
|
101
|
-
var parentsMap_1 = getValueMap(parents, idGetter);
|
|
102
|
-
newValue.push.apply(newValue, (value
|
|
103
|
-
.filter(function (item) {
|
|
104
|
-
var itemId = idGetter(item);
|
|
105
|
-
return !childrenMap_1[itemId] && foundId_1 !== itemId && !parentsMap_1[itemId];
|
|
106
|
-
})));
|
|
107
|
-
}
|
|
108
|
-
return newValue;
|
|
109
|
-
};
|
|
110
|
-
// /** @hidden */
|
|
111
|
-
// const mapCheckAndIntermidiate = (
|
|
112
|
-
// data,
|
|
113
|
-
// options: {
|
|
114
|
-
// valueMap: {[dataItemKey: string]: boolean};
|
|
115
|
-
// callback?: (item: any) => any;
|
|
116
|
-
// idGetter: (item: any) => any;
|
|
117
|
-
// subItemGetter: (item: any) => any;
|
|
118
|
-
// subItemSetter: (item: any, value: any) => void;
|
|
119
|
-
// checkSetter: (item: any, value: any) => void;
|
|
120
|
-
// checkIndeterminateSetter: (item: any, value: any) => void;
|
|
121
|
-
// }
|
|
122
|
-
// ) => {
|
|
123
|
-
// const {
|
|
124
|
-
// idGetter,
|
|
125
|
-
// subItemGetter,
|
|
126
|
-
// subItemSetter,
|
|
127
|
-
// checkSetter,
|
|
128
|
-
// checkIndeterminateSetter
|
|
129
|
-
// } = options;
|
|
130
|
-
// if (!data || !data.length) { return [data, false];}
|
|
131
|
-
// let hasChecked = false;
|
|
132
|
-
// const newData = [...data].map(dataItem => {
|
|
133
|
-
// const [children, hasCheckedChildren] = mapCheckAndIntermidiate(subItemGetter(dataItem), options);
|
|
134
|
-
// const isChecked = options.valueMap[idGetter(dataItem)];
|
|
135
|
-
// if (isChecked || hasCheckedChildren) {
|
|
136
|
-
// hasChecked = true;
|
|
137
|
-
// }
|
|
138
|
-
// const newItem = { ...dataItem };
|
|
139
|
-
// subItemSetter(newItem, children);
|
|
140
|
-
// checkSetter(newItem, isChecked);
|
|
141
|
-
// checkIndeterminateSetter(newItem, !isChecked && hasCheckedChildren);
|
|
142
|
-
// return options.callback ? options.callback(newItem) : newItem;
|
|
143
|
-
// });
|
|
144
|
-
// return [newData, hasChecked];
|
|
145
|
-
// };
|
|
146
|
-
// /**
|
|
147
|
-
// *
|
|
148
|
-
// * @param data
|
|
149
|
-
// * @param options
|
|
150
|
-
// * @returns
|
|
151
|
-
// */
|
|
152
|
-
// /**
|
|
153
|
-
// * Creates a new array with the results of calling the provided callback function
|
|
154
|
-
// * on every element in the provided data tree. The new tree items have their `check` and `checkIndeterminate` fields set based on provided value.
|
|
155
|
-
// *
|
|
156
|
-
// * @param {any[]} tree - The data tree.
|
|
157
|
-
// * @param {object} options - The options used to map the tree items like check and checkIndeterminateField fields
|
|
158
|
-
// * @returns {any[]} - The new data tree.
|
|
159
|
-
// */
|
|
160
|
-
// export const mapMultiSelectTreeData = (
|
|
161
|
-
// tree,
|
|
162
|
-
// options: {
|
|
163
|
-
// checkField?: string;
|
|
164
|
-
// checkIndeterminateField?: string;
|
|
165
|
-
// subItemsField?: string;
|
|
166
|
-
// dataItemKey: string;
|
|
167
|
-
// value: Array<any>;
|
|
168
|
-
// callback?: (item) => any;
|
|
169
|
-
// }
|
|
170
|
-
// ) => {
|
|
171
|
-
// const {
|
|
172
|
-
// subItemsField = 'items',
|
|
173
|
-
// checkField = 'checkField',
|
|
174
|
-
// checkIndeterminateField = 'checkIndeterminateField',
|
|
175
|
-
// callback
|
|
176
|
-
// } = options;
|
|
177
|
-
// const idGetter = getter(options.dataItemKey);
|
|
178
|
-
// const [result] = mapCheckAndIntermidiate(
|
|
179
|
-
// tree,
|
|
180
|
-
// {
|
|
181
|
-
// callback,
|
|
182
|
-
// valueMap: getValueMap(options.value, idGetter),
|
|
183
|
-
// idGetter,
|
|
184
|
-
// subItemGetter: getter(subItemsField),
|
|
185
|
-
// subItemSetter: setter(subItemsField),
|
|
186
|
-
// checkSetter: setter(checkField),
|
|
187
|
-
// checkIndeterminateSetter: setter(checkIndeterminateField)
|
|
188
|
-
// }
|
|
189
|
-
// );
|
|
190
|
-
// return result;
|
|
191
|
-
// };
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
/** @hidden */
|
|
3
|
-
export interface AdaptiveModeProps {
|
|
4
|
-
navigatable?: boolean;
|
|
5
|
-
navigatableElements?: string[];
|
|
6
|
-
expand: boolean;
|
|
7
|
-
animation?: boolean;
|
|
8
|
-
adaptiveTitle?: string | React.ReactNode;
|
|
9
|
-
onClose?: (event: React.SyntheticEvent) => void;
|
|
10
|
-
windowWidth?: number;
|
|
11
|
-
mobileFilter?: React.ReactNode;
|
|
12
|
-
children: React.ReactNode;
|
|
13
|
-
footer?: {
|
|
14
|
-
cancelText: string;
|
|
15
|
-
onCancel: (event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
16
|
-
applyText: string;
|
|
17
|
-
onApply: (event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
18
|
-
};
|
|
19
|
-
}
|
|
20
|
-
/** @hidden */
|
|
21
|
-
export declare const AdaptiveMode: (props: AdaptiveModeProps) => JSX.Element;
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
|
-
import * as React from 'react';
|
|
13
|
-
import { ActionSheet, ActionSheetFooter, ActionSheetHeader } from '@progress/kendo-react-layout';
|
|
14
|
-
import { xIcon } from '@progress/kendo-svg-icons';
|
|
15
|
-
import { Button } from '@progress/kendo-react-buttons';
|
|
16
|
-
/** @hidden */
|
|
17
|
-
var MOBILE_SMALL_DEVISE = 500;
|
|
18
|
-
/** @hidden */
|
|
19
|
-
export var AdaptiveMode = function (props) {
|
|
20
|
-
var footer = props.footer, children = props.children, _a = props.windowWidth, windowWidth = _a === void 0 ? 0 : _a, navigatable = props.navigatable, navigatableElements = props.navigatableElements, expand = props.expand, animation = props.animation, onClose = props.onClose, adaptiveTitle = props.adaptiveTitle, mobileFilter = props.mobileFilter;
|
|
21
|
-
var defaultProps = {
|
|
22
|
-
navigatable: navigatable || false,
|
|
23
|
-
navigatableElements: navigatableElements || [],
|
|
24
|
-
expand: expand,
|
|
25
|
-
animation: animation === false ? false : true,
|
|
26
|
-
onClose: onClose,
|
|
27
|
-
animationStyles: windowWidth <= MOBILE_SMALL_DEVISE ? { top: 0, width: '100%', height: '100%' } : undefined,
|
|
28
|
-
className: windowWidth <= MOBILE_SMALL_DEVISE
|
|
29
|
-
? 'k-adaptive-actionsheet k-actionsheet-fullscreen'
|
|
30
|
-
: 'k-adaptive-actionsheet k-actionsheet-bottom'
|
|
31
|
-
};
|
|
32
|
-
return (React.createElement(ActionSheet, __assign({}, defaultProps),
|
|
33
|
-
React.createElement(ActionSheetHeader, { className: 'k-text-center' },
|
|
34
|
-
React.createElement("div", { className: "k-actionsheet-titlebar-group k-hbox" },
|
|
35
|
-
React.createElement("div", { className: "k-actionsheet-title" },
|
|
36
|
-
React.createElement("div", null, adaptiveTitle)),
|
|
37
|
-
React.createElement("div", { className: "k-actionsheet-actions" },
|
|
38
|
-
React.createElement(Button, { tabIndex: 0, "aria-label": "Cancel", "aria-disabled": "false", type: "button", fillMode: "flat", icon: 'x', svgIcon: xIcon, onClick: onClose }))),
|
|
39
|
-
mobileFilter &&
|
|
40
|
-
React.createElement("div", { className: "k-actionsheet-titlebar-group k-actionsheet-filter" }, mobileFilter)),
|
|
41
|
-
children,
|
|
42
|
-
footer && React.createElement(ActionSheetFooter, { className: 'k-actions k-actions-stretched' },
|
|
43
|
-
React.createElement(Button, { size: "large", tabIndex: 0, "aria-label": footer.cancelText, "aria-disabled": "false", type: "button", onClick: footer.onCancel }, footer.cancelText),
|
|
44
|
-
React.createElement(Button, { tabIndex: 0, themeColor: "primary", size: "large", "aria-label": footer.applyText, "aria-disabled": "false", type: "button", onClick: footer.onApply }, footer.applyText))));
|
|
45
|
-
};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
/**
|
|
3
|
-
* @hidden
|
|
4
|
-
*/
|
|
5
|
-
export interface ClearButtonProps {
|
|
6
|
-
onClick?: React.MouseEventHandler<HTMLSpanElement>;
|
|
7
|
-
}
|
|
8
|
-
/**
|
|
9
|
-
* @hidden
|
|
10
|
-
*/
|
|
11
|
-
export default class ClearButton extends React.Component<ClearButtonProps> {
|
|
12
|
-
onMouseDown: (e: any) => any;
|
|
13
|
-
render(): JSX.Element;
|
|
14
|
-
}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
var __extends = (this && this.__extends) || (function () {
|
|
2
|
-
var extendStatics = function (d, b) {
|
|
3
|
-
extendStatics = Object.setPrototypeOf ||
|
|
4
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
6
|
-
return extendStatics(d, b);
|
|
7
|
-
};
|
|
8
|
-
return function (d, b) {
|
|
9
|
-
if (typeof b !== "function" && b !== null)
|
|
10
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
11
|
-
extendStatics(d, b);
|
|
12
|
-
function __() { this.constructor = d; }
|
|
13
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
14
|
-
};
|
|
15
|
-
})();
|
|
16
|
-
import * as React from 'react';
|
|
17
|
-
import { registerForLocalization, provideLocalizationService } from '@progress/kendo-react-intl';
|
|
18
|
-
import { messages, clear } from '../messages';
|
|
19
|
-
import { IconWrap } from '@progress/kendo-react-common';
|
|
20
|
-
import { xIcon } from '@progress/kendo-svg-icons';
|
|
21
|
-
/**
|
|
22
|
-
* @hidden
|
|
23
|
-
*/
|
|
24
|
-
var ClearButton = /** @class */ (function (_super) {
|
|
25
|
-
__extends(ClearButton, _super);
|
|
26
|
-
function ClearButton() {
|
|
27
|
-
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
28
|
-
_this.onMouseDown = function (e) { return e.preventDefault(); };
|
|
29
|
-
return _this;
|
|
30
|
-
}
|
|
31
|
-
ClearButton.prototype.render = function () {
|
|
32
|
-
var title = provideLocalizationService(this).toLanguageString(clear, messages[clear]);
|
|
33
|
-
return (React.createElement("span", { className: "k-clear-value", role: "button", onClick: this.props.onClick, onMouseDown: this.onMouseDown, tabIndex: -1, title: title, key: "clearbutton" },
|
|
34
|
-
React.createElement(IconWrap, { name: 'x', icon: xIcon })));
|
|
35
|
-
};
|
|
36
|
-
return ClearButton;
|
|
37
|
-
}(React.Component));
|
|
38
|
-
export default ClearButton;
|
|
39
|
-
registerForLocalization(ClearButton);
|
|
@@ -1,175 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import * as PropTypes from 'prop-types';
|
|
3
|
-
import VirtualScroll from './VirtualScroll';
|
|
4
|
-
import { Navigation } from './Navigation';
|
|
5
|
-
import { ListItemProps } from './ListItem';
|
|
6
|
-
import { InternalState, DropDownStateBase, Page, DropDownsPopupSettings, VirtualizationSettings } from './settings';
|
|
7
|
-
/**
|
|
8
|
-
* @hidden
|
|
9
|
-
*/
|
|
10
|
-
export interface DropDownComponentProps {
|
|
11
|
-
data?: any[];
|
|
12
|
-
opened?: boolean;
|
|
13
|
-
value?: any;
|
|
14
|
-
disabled?: boolean;
|
|
15
|
-
tabIndex?: number;
|
|
16
|
-
dir?: string;
|
|
17
|
-
defaultItem?: any;
|
|
18
|
-
filterable?: boolean;
|
|
19
|
-
filter?: string | null;
|
|
20
|
-
textField?: string;
|
|
21
|
-
dataItemKey?: string;
|
|
22
|
-
popupSettings?: DropDownsPopupSettings;
|
|
23
|
-
style?: React.CSSProperties;
|
|
24
|
-
virtual?: VirtualizationSettings;
|
|
25
|
-
onOpen?: (event: any) => void;
|
|
26
|
-
onClose?: (event: any) => void;
|
|
27
|
-
onFocus?: (event: any) => void;
|
|
28
|
-
onBlur?: (event: any) => void;
|
|
29
|
-
onChange?: (event: any) => void;
|
|
30
|
-
onFilterChange?: (event: any) => void;
|
|
31
|
-
onPageChange?: (event: any) => void;
|
|
32
|
-
itemRender?: (li: React.ReactElement<HTMLLIElement>, itemProps: ListItemProps) => React.ReactNode;
|
|
33
|
-
listNoDataRender?: (element: React.ReactElement<HTMLDivElement>) => React.ReactNode;
|
|
34
|
-
header?: React.ReactNode;
|
|
35
|
-
footer?: React.ReactNode;
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* @hidden
|
|
39
|
-
*/
|
|
40
|
-
export interface DropDownComponent {
|
|
41
|
-
props: DropDownComponentProps;
|
|
42
|
-
setState: Function;
|
|
43
|
-
forceUpdate: Function;
|
|
44
|
-
state: DropDownStateBase;
|
|
45
|
-
element: HTMLSpanElement | null;
|
|
46
|
-
handleItemSelect: Function;
|
|
47
|
-
value: any;
|
|
48
|
-
}
|
|
49
|
-
/**
|
|
50
|
-
* @hidden
|
|
51
|
-
*/
|
|
52
|
-
export default class DropDownBase {
|
|
53
|
-
static basicPropTypes: {
|
|
54
|
-
opened: PropTypes.Requireable<boolean>;
|
|
55
|
-
disabled: PropTypes.Requireable<boolean>;
|
|
56
|
-
dir: PropTypes.Requireable<string>;
|
|
57
|
-
tabIndex: PropTypes.Requireable<number>;
|
|
58
|
-
accessKey: PropTypes.Requireable<string>;
|
|
59
|
-
data: PropTypes.Requireable<any[]>;
|
|
60
|
-
textField: PropTypes.Requireable<string>;
|
|
61
|
-
className: PropTypes.Requireable<string>;
|
|
62
|
-
label: PropTypes.Requireable<string>;
|
|
63
|
-
loading: PropTypes.Requireable<boolean>;
|
|
64
|
-
popupSettings: PropTypes.Requireable<PropTypes.InferProps<{
|
|
65
|
-
animate: PropTypes.Requireable<NonNullable<boolean | PropTypes.InferProps<{
|
|
66
|
-
openDuration: PropTypes.Requireable<number>;
|
|
67
|
-
closeDuration: PropTypes.Requireable<number>;
|
|
68
|
-
}> | null | undefined>>;
|
|
69
|
-
popupClass: PropTypes.Requireable<string>;
|
|
70
|
-
className: PropTypes.Requireable<string>;
|
|
71
|
-
appendTo: PropTypes.Requireable<any>;
|
|
72
|
-
width: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
|
|
73
|
-
height: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
|
|
74
|
-
}>>;
|
|
75
|
-
onOpen: PropTypes.Requireable<(...args: any[]) => any>;
|
|
76
|
-
onClose: PropTypes.Requireable<(...args: any[]) => any>;
|
|
77
|
-
onFocus: PropTypes.Requireable<(...args: any[]) => any>;
|
|
78
|
-
onBlur: PropTypes.Requireable<(...args: any[]) => any>;
|
|
79
|
-
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
80
|
-
itemRender: PropTypes.Requireable<(...args: any[]) => any>;
|
|
81
|
-
listNoDataRender: PropTypes.Requireable<(...args: any[]) => any>;
|
|
82
|
-
focusedItemIndex: PropTypes.Requireable<(...args: any[]) => any>;
|
|
83
|
-
header: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
84
|
-
footer: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
85
|
-
};
|
|
86
|
-
static propTypes: {
|
|
87
|
-
value: PropTypes.Requireable<any>;
|
|
88
|
-
defaultValue: PropTypes.Requireable<any>;
|
|
89
|
-
filterable: PropTypes.Requireable<boolean>;
|
|
90
|
-
filter: PropTypes.Requireable<string>;
|
|
91
|
-
virtual: PropTypes.Requireable<PropTypes.InferProps<{
|
|
92
|
-
pageSize: PropTypes.Validator<number>;
|
|
93
|
-
skip: PropTypes.Validator<number>;
|
|
94
|
-
total: PropTypes.Validator<number>;
|
|
95
|
-
}>>;
|
|
96
|
-
onFilterChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
97
|
-
onPageChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
98
|
-
opened: PropTypes.Requireable<boolean>;
|
|
99
|
-
disabled: PropTypes.Requireable<boolean>;
|
|
100
|
-
dir: PropTypes.Requireable<string>;
|
|
101
|
-
tabIndex: PropTypes.Requireable<number>;
|
|
102
|
-
accessKey: PropTypes.Requireable<string>;
|
|
103
|
-
data: PropTypes.Requireable<any[]>;
|
|
104
|
-
textField: PropTypes.Requireable<string>;
|
|
105
|
-
className: PropTypes.Requireable<string>;
|
|
106
|
-
label: PropTypes.Requireable<string>;
|
|
107
|
-
loading: PropTypes.Requireable<boolean>;
|
|
108
|
-
popupSettings: PropTypes.Requireable<PropTypes.InferProps<{
|
|
109
|
-
animate: PropTypes.Requireable<NonNullable<boolean | PropTypes.InferProps<{
|
|
110
|
-
openDuration: PropTypes.Requireable<number>;
|
|
111
|
-
closeDuration: PropTypes.Requireable<number>;
|
|
112
|
-
}> | null | undefined>>;
|
|
113
|
-
popupClass: PropTypes.Requireable<string>;
|
|
114
|
-
className: PropTypes.Requireable<string>;
|
|
115
|
-
appendTo: PropTypes.Requireable<any>;
|
|
116
|
-
width: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
|
|
117
|
-
height: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
|
|
118
|
-
}>>;
|
|
119
|
-
onOpen: PropTypes.Requireable<(...args: any[]) => any>;
|
|
120
|
-
onClose: PropTypes.Requireable<(...args: any[]) => any>;
|
|
121
|
-
onFocus: PropTypes.Requireable<(...args: any[]) => any>;
|
|
122
|
-
onBlur: PropTypes.Requireable<(...args: any[]) => any>;
|
|
123
|
-
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
124
|
-
itemRender: PropTypes.Requireable<(...args: any[]) => any>;
|
|
125
|
-
listNoDataRender: PropTypes.Requireable<(...args: any[]) => any>;
|
|
126
|
-
focusedItemIndex: PropTypes.Requireable<(...args: any[]) => any>;
|
|
127
|
-
header: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
128
|
-
footer: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
129
|
-
};
|
|
130
|
-
static defaultProps: {
|
|
131
|
-
popupSettings: {
|
|
132
|
-
height: string;
|
|
133
|
-
};
|
|
134
|
-
required: boolean;
|
|
135
|
-
validityStyles: boolean;
|
|
136
|
-
};
|
|
137
|
-
popupWidth?: string;
|
|
138
|
-
wrapper: HTMLSpanElement | null;
|
|
139
|
-
list: HTMLUListElement | null;
|
|
140
|
-
dirCalculated?: string;
|
|
141
|
-
readonly vs: VirtualScroll;
|
|
142
|
-
readonly navigation: Navigation;
|
|
143
|
-
readonly listBoxId: string;
|
|
144
|
-
readonly guid: string;
|
|
145
|
-
readonly component: DropDownComponent;
|
|
146
|
-
constructor(component: DropDownComponent);
|
|
147
|
-
didMount(): void;
|
|
148
|
-
calculateDir(): void;
|
|
149
|
-
calculatePopupWidth(): void;
|
|
150
|
-
scrollToItem(itemIndex: number, vsEnabled?: boolean, once?: boolean): void;
|
|
151
|
-
handleItemClick: (index: number, event: React.MouseEvent<HTMLLIElement> | React.KeyboardEvent<HTMLInputElement>) => void;
|
|
152
|
-
handleFocus: React.FocusEventHandler<HTMLSpanElement>;
|
|
153
|
-
filterChanged: (text: string | null, state: InternalState) => void;
|
|
154
|
-
initState(): InternalState;
|
|
155
|
-
applyState(state: InternalState): void;
|
|
156
|
-
togglePopup: (state: InternalState) => void;
|
|
157
|
-
pageChange: (page: Page, syntheticEvent: React.SyntheticEvent<any>) => void;
|
|
158
|
-
triggerOnPageChange(state: InternalState, skip: number, take: number): void;
|
|
159
|
-
triggerPageChangeCornerItems(item: any, state: InternalState): void;
|
|
160
|
-
scrollToVirtualItem: (virtual: VirtualizationSettings, selectedItemIndex: number) => void;
|
|
161
|
-
/**
|
|
162
|
-
* @hidden
|
|
163
|
-
* Scrolls the data inside the popup of a selected DropDown by `one page`. The page size
|
|
164
|
-
* depends on the height of the popup.
|
|
165
|
-
*
|
|
166
|
-
* @param {number} direction Defines the direction(Up/Down) in which the page will be moved
|
|
167
|
-
* @param {number} filterHeight Defines the heigh of the filter element that appears in the DropDownList and DropDownTree.
|
|
168
|
-
* This property is added for handling the filtering scenarios of the mentioned components.
|
|
169
|
-
*/
|
|
170
|
-
scrollPopupByPageSize: (direction: number) => void;
|
|
171
|
-
renderScrollElement: () => false | JSX.Element;
|
|
172
|
-
getPopupSettings(): DropDownsPopupSettings;
|
|
173
|
-
getGroupedDataModernMode(data: any[], groupField: string): any[];
|
|
174
|
-
resetGroupStickyHeader: (groupName: string, that: any) => void;
|
|
175
|
-
}
|