@progress/kendo-react-dropdowns 5.4.0-dev.202205200719 → 5.4.0-dev.202206061009
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-react-dropdowns.js +1 -1
- package/dist/es/AutoComplete/AutoComplete.d.ts +16 -14
- package/dist/es/AutoComplete/AutoComplete.js +19 -15
- package/dist/es/AutoComplete/AutoCompleteProps.js +1 -0
- package/dist/es/ComboBox/ComboBox.d.ts +14 -14
- package/dist/es/ComboBox/ComboBox.js +26 -22
- package/dist/es/ComboBox/ComboBoxProps.js +1 -0
- package/dist/es/DropDownList/DropDownList.d.ts +12 -14
- package/dist/es/DropDownList/DropDownList.js +22 -18
- package/dist/es/DropDownList/DropDownListProps.js +1 -0
- package/dist/es/DropDownTree/DropDownTree.d.ts +1 -1
- package/dist/es/DropDownTree/DropDownTree.js +22 -10
- package/dist/es/DropDownTree/DropDownTreeProps.js +1 -0
- package/dist/es/MultiColumnComboBox/MultiColumnComboBox.d.ts +2 -2
- package/dist/es/MultiColumnComboBox/MultiColumnComboBox.js +10 -8
- package/dist/es/MultiSelect/MultiSelect.d.ts +14 -16
- package/dist/es/MultiSelect/MultiSelect.js +36 -23
- package/dist/es/MultiSelect/MultiSelectProps.js +1 -0
- package/dist/es/MultiSelect/TagList.d.ts +1 -0
- package/dist/es/MultiSelect/TagList.js +4 -2
- package/dist/es/MultiSelectTree/MultiSelectTree.d.ts +1 -1
- package/dist/es/MultiSelectTree/MultiSelectTree.js +21 -9
- package/dist/es/MultiSelectTree/MultiSelectTreeProps.js +1 -0
- package/dist/es/MultiSelectTree/utils.d.ts +2 -2
- package/dist/es/MultiSelectTree/utils.js +11 -2
- package/dist/es/common/ClearButton.js +3 -1
- package/dist/es/common/DropDownBase.d.ts +6 -6
- package/dist/es/common/DropDownBase.js +5 -3
- package/dist/es/common/List.d.ts +2 -2
- package/dist/es/common/List.js +4 -2
- package/dist/es/common/ListContainer.d.ts +1 -0
- package/dist/es/common/ListContainer.js +3 -1
- package/dist/es/common/ListDefaultItem.js +3 -1
- package/dist/es/common/ListFilter.js +10 -6
- package/dist/es/common/ListItem.d.ts +1 -1
- package/dist/es/common/ListItem.js +3 -1
- package/dist/es/common/Navigation.d.ts +1 -1
- package/dist/es/common/SearchBar.d.ts +2 -2
- package/dist/es/common/SearchBar.js +7 -3
- package/dist/es/common/VirtualScroll.d.ts +3 -3
- package/dist/es/common/VirtualScroll.js +6 -2
- package/dist/es/common/events.js +1 -0
- package/dist/es/common/filterDescriptor.js +1 -0
- package/dist/es/common/settings.d.ts +1 -1
- package/dist/es/common/utils.d.ts +6 -6
- package/dist/es/main.js +2 -0
- package/dist/es/messages/index.d.ts +2 -2
- package/dist/es/package-metadata.js +1 -1
- package/dist/npm/AutoComplete/AutoComplete.d.ts +16 -14
- package/dist/npm/AutoComplete/AutoComplete.js +35 -30
- package/dist/npm/ComboBox/ComboBox.d.ts +14 -14
- package/dist/npm/ComboBox/ComboBox.js +61 -56
- package/dist/npm/DropDownList/DropDownList.d.ts +12 -14
- package/dist/npm/DropDownList/DropDownList.js +49 -44
- package/dist/npm/DropDownTree/DropDownTree.d.ts +1 -1
- package/dist/npm/DropDownTree/DropDownTree.js +39 -26
- package/dist/npm/DropDownTree/ListNoData.js +3 -1
- package/dist/npm/DropDownTree/useDropdownWidth.js +1 -0
- package/dist/npm/MultiColumnComboBox/MultiColumnComboBox.d.ts +2 -2
- package/dist/npm/MultiColumnComboBox/MultiColumnComboBox.js +18 -15
- package/dist/npm/MultiSelect/MultiSelect.d.ts +14 -16
- package/dist/npm/MultiSelect/MultiSelect.js +57 -43
- package/dist/npm/MultiSelect/TagList.d.ts +1 -0
- package/dist/npm/MultiSelect/TagList.js +4 -2
- package/dist/npm/MultiSelectTree/MultiSelectTree.d.ts +1 -1
- package/dist/npm/MultiSelectTree/MultiSelectTree.js +36 -23
- package/dist/npm/MultiSelectTree/utils.d.ts +2 -2
- package/dist/npm/MultiSelectTree/utils.js +23 -11
- package/dist/npm/common/ClearButton.js +5 -3
- package/dist/npm/common/DropDownBase.d.ts +6 -6
- package/dist/npm/common/DropDownBase.js +10 -8
- package/dist/npm/common/List.d.ts +2 -2
- package/dist/npm/common/List.js +10 -8
- package/dist/npm/common/ListContainer.d.ts +1 -0
- package/dist/npm/common/ListContainer.js +3 -1
- package/dist/npm/common/ListDefaultItem.js +5 -3
- package/dist/npm/common/ListFilter.js +11 -7
- package/dist/npm/common/ListItem.d.ts +1 -1
- package/dist/npm/common/ListItem.js +5 -3
- package/dist/npm/common/MultiColumnList.js +3 -1
- package/dist/npm/common/Navigation.d.ts +1 -1
- package/dist/npm/common/Navigation.js +2 -1
- package/dist/npm/common/SearchBar.d.ts +2 -2
- package/dist/npm/common/SearchBar.js +7 -3
- package/dist/npm/common/VirtualScroll.d.ts +3 -3
- package/dist/npm/common/VirtualScroll.js +6 -2
- package/dist/npm/common/settings.d.ts +1 -1
- package/dist/npm/common/settings.js +1 -0
- package/dist/npm/common/utils.d.ts +6 -6
- package/dist/npm/common/utils.js +1 -0
- package/dist/npm/main.js +32 -18
- package/dist/npm/messages/index.d.ts +2 -2
- package/dist/npm/messages/index.js +2 -1
- package/dist/npm/package-metadata.js +2 -1
- package/dist/systemjs/kendo-react-dropdowns.js +1 -1
- package/package.json +13 -13
|
@@ -2,10 +2,12 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
2
2
|
var extendStatics = function (d, b) {
|
|
3
3
|
extendStatics = Object.setPrototypeOf ||
|
|
4
4
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
-
function (d, b) { for (var p in b) if (
|
|
5
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
6
6
|
return extendStatics(d, b);
|
|
7
7
|
};
|
|
8
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");
|
|
9
11
|
extendStatics(d, b);
|
|
10
12
|
function __() { this.constructor = d; }
|
|
11
13
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
@@ -27,7 +29,7 @@ var TagList = /** @class */ (function (_super) {
|
|
|
27
29
|
var _a = this.props, data = _a.data, guid = _a.guid, focused = _a.focused, tagRender = _a.tagRender, TagComponent = _a.tag, onTagDelete = _a.onTagDelete, size = _a.size;
|
|
28
30
|
return (React.createElement(React.Fragment, null,
|
|
29
31
|
data.map(function (tagData, index) {
|
|
30
|
-
var tag = TagComponent ? (React.createElement(TagComponent, { key: tagData.text + index, tagData: tagData, guid: guid, focusedTag: focused, onTagDelete: onTagDelete })) : (React.createElement(Chip, { id: "tag-"
|
|
32
|
+
var tag = TagComponent ? (React.createElement(TagComponent, { key: tagData.text + index, tagData: tagData, guid: guid, focusedTag: focused, onTagDelete: onTagDelete })) : (React.createElement(Chip, { id: "tag-".concat(guid, "-").concat(tagData.text.replace(/\s+/g, '-')), "aria-selected": true, role: "option", "aria-setsize": data.length, key: tagData.text + index, text: tagData.text, removable: true, removeIcon: 'k-i-close', onRemove: function (e) { return onTagDelete.call(undefined, tagData.data, e.syntheticEvent); }, onMouseDown: preventDefault, onClick: stopPropagation, className: tagData === focused ? 'k-focus' : undefined, size: size }));
|
|
31
33
|
return tagRender ? tagRender(tagData, tag) : tag;
|
|
32
34
|
}),
|
|
33
35
|
this.props.children));
|
|
@@ -13,4 +13,4 @@ export declare const MultiSelectTreePropsContext: React.Context<(p: MultiSelectT
|
|
|
13
13
|
* Accepts properties of type [MultiSelectTreeProps]({% slug api_dropdowns_multiselecttreeprops %}).
|
|
14
14
|
* Obtaining the `ref` returns an object of type [MultiSelectTreeHandle]({% slug api_dropdowns_multiselecttreehandle %}).
|
|
15
15
|
*/
|
|
16
|
-
export declare const MultiSelectTree: React.ForwardRefExoticComponent<MultiSelectTreeProps & React.RefAttributes<MultiSelectTreeHandle>>;
|
|
16
|
+
export declare const MultiSelectTree: React.ForwardRefExoticComponent<MultiSelectTreeProps & React.RefAttributes<MultiSelectTreeHandle | null>>;
|
|
@@ -9,6 +9,15 @@ var __assign = (this && this.__assign) || function () {
|
|
|
9
9
|
};
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
13
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
14
|
+
if (ar || !(i in from)) {
|
|
15
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
16
|
+
ar[i] = from[i];
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
20
|
+
};
|
|
12
21
|
import * as React from 'react';
|
|
13
22
|
import * as PropTypes from 'prop-types';
|
|
14
23
|
import { classNames, noop, useRtl, getTabIndex, Keys, guid, kendoThemeMaps, createPropsContext, usePropsContext } from '@progress/kendo-react-common';
|
|
@@ -96,7 +105,7 @@ export var MultiSelectTree = React.forwardRef(function (directProps, ref) {
|
|
|
96
105
|
var popupStyles = __assign({ width: popupWidth }, (dir !== undefined ? { direction: dir } : {}));
|
|
97
106
|
var focus = React.useCallback(function () { return elementRef.current && elementRef.current.focus(); }, []);
|
|
98
107
|
tagsToRenderRef.current = tags === undefined ?
|
|
99
|
-
(value || []).map(function (item) { return ({ text: getItemValue(item, props.textField), data: [item] }); }) : tags
|
|
108
|
+
(value || []).map(function (item) { return ({ text: getItemValue(item, props.textField), data: [item] }); }) : __spreadArray([], tags, true);
|
|
100
109
|
React.useImperativeHandle(targetRef, function () { return ({
|
|
101
110
|
props: props,
|
|
102
111
|
element: elementRef.current,
|
|
@@ -296,7 +305,7 @@ export var MultiSelectTree = React.forwardRef(function (directProps, ref) {
|
|
|
296
305
|
keyCode === Keys.home || keyCode === Keys.end)) {
|
|
297
306
|
if (keyCode === Keys.up && inputRef.current) {
|
|
298
307
|
var items = Array.from(treeviewElement.querySelectorAll('.k-treeview-item'));
|
|
299
|
-
var focusedItem = items
|
|
308
|
+
var focusedItem = __spreadArray([], items, true).reverse().find(function (i) { return Boolean(i && i.querySelector('.k-focus')); });
|
|
300
309
|
if (focusedItem && items.indexOf(focusedItem) === 0) {
|
|
301
310
|
return switchFocus(function () { focusElement(inputRef.current); });
|
|
302
311
|
}
|
|
@@ -353,7 +362,10 @@ export var MultiSelectTree = React.forwardRef(function (directProps, ref) {
|
|
|
353
362
|
var item = event.item, itemHierarchicalIndex = event.itemHierarchicalIndex, nativeEvent = event.nativeEvent, syntheticEvent = event.syntheticEvent;
|
|
354
363
|
var expandEvent = {
|
|
355
364
|
level: toLevel(itemHierarchicalIndex),
|
|
356
|
-
item: item,
|
|
365
|
+
item: item,
|
|
366
|
+
nativeEvent: nativeEvent,
|
|
367
|
+
syntheticEvent: syntheticEvent,
|
|
368
|
+
target: targetRef.current
|
|
357
369
|
};
|
|
358
370
|
props.onExpandChange.call(undefined, expandEvent);
|
|
359
371
|
}
|
|
@@ -378,17 +390,17 @@ export var MultiSelectTree = React.forwardRef(function (directProps, ref) {
|
|
|
378
390
|
var isValid = !validityStyles || validity.valid;
|
|
379
391
|
var size = props.size, rounded = props.rounded, fillMode = props.fillMode;
|
|
380
392
|
var multiselecttree = (React.createElement("span", { className: classNames('k-multiselect k-input', props.className, (_a = {},
|
|
381
|
-
_a["k-input-"
|
|
382
|
-
_a["k-rounded-"
|
|
383
|
-
_a["k-input-"
|
|
393
|
+
_a["k-input-".concat(sizeMap[size] || size)] = size,
|
|
394
|
+
_a["k-rounded-".concat(roundedMap[rounded] || rounded)] = rounded,
|
|
395
|
+
_a["k-input-".concat(fillMode)] = fillMode,
|
|
384
396
|
_a['k-focus'] = focusedState && !disabled,
|
|
385
397
|
_a['k-invalid'] = !isValid,
|
|
386
398
|
_a['k-disabled'] = disabled,
|
|
387
399
|
_a['k-loading'] = props.loading,
|
|
388
400
|
_a['k-required'] = required,
|
|
389
|
-
_a)), tabIndex: tabIndex, accessKey: props.accessKey, id: id, style: label ? __assign({}, style, { width: undefined }) : style, dir: dir, ref: elementRef, onKeyDown: disabled ? undefined : onWrapperKeyDown, onMouseDown: onWrapperMouseDown, onFocus: onFocus, onBlur: onBlur, role: "listbox", "aria-haspopup": "true", "aria-expanded": isOpen, "aria-disabled": disabled, "aria-label": label, "aria-labelledby": props.ariaLabelledBy, "aria-describedby": props.ariaDescribedBy, onClick: disabled ? undefined : onWrapperClick },
|
|
401
|
+
_a)), tabIndex: tabIndex, accessKey: props.accessKey, id: id, style: label ? __assign(__assign({}, style), { width: undefined }) : style, dir: dir, ref: elementRef, onKeyDown: disabled ? undefined : onWrapperKeyDown, onMouseDown: onWrapperMouseDown, onFocus: onFocus, onBlur: onBlur, role: "listbox", "aria-haspopup": "true", "aria-expanded": isOpen, "aria-disabled": disabled, "aria-label": label, "aria-labelledby": props.ariaLabelledBy, "aria-describedby": props.ariaDescribedBy, onClick: disabled ? undefined : onWrapperClick },
|
|
390
402
|
tagsToRenderRef.current.length > 0 && (React.createElement("div", { className: classNames('k-input-values k-chip-list k-selection-multiple', (_b = {},
|
|
391
|
-
_b["k-chip-list-"
|
|
403
|
+
_b["k-chip-list-".concat(sizeMap[size] || size)] = size,
|
|
392
404
|
_b)), role: "listbox", id: 'tagslist-' + id },
|
|
393
405
|
React.createElement(TagList, { tag: props.tag, onTagDelete: onTagDelete, data: tagsToRenderRef.current, guid: id, focused: focusedTagState ? tagsToRenderRef.current.find(function (t) { return matchTags(t, focusedTagState, dataItemKey); }) : undefined, size: size }))),
|
|
394
406
|
!hasValue && React.createElement("span", { className: "k-input-inner" },
|
|
@@ -443,7 +455,7 @@ var propTypes = {
|
|
|
443
455
|
})]),
|
|
444
456
|
popupClass: PropTypes.string,
|
|
445
457
|
className: PropTypes.string,
|
|
446
|
-
appendTo: PropTypes.
|
|
458
|
+
appendTo: PropTypes.instanceOf(Element),
|
|
447
459
|
width: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
448
460
|
height: PropTypes.oneOfType([PropTypes.string, PropTypes.number])
|
|
449
461
|
}),
|
|
@@ -9,9 +9,9 @@ export declare const getValueMap: (value: any, idGetter: any) => {};
|
|
|
9
9
|
* @returns {any[]}
|
|
10
10
|
*/
|
|
11
11
|
export declare const getMultiSelectTreeValue: (data: any, options: {
|
|
12
|
-
subItemsField?: string;
|
|
12
|
+
subItemsField?: string | undefined;
|
|
13
13
|
dataItemKey: string;
|
|
14
14
|
items: any;
|
|
15
|
-
value: any
|
|
15
|
+
value: Array<any>;
|
|
16
16
|
operation: MultiSelectTreeChangeEventOperation;
|
|
17
17
|
}) => any[];
|
|
@@ -1,3 +1,12 @@
|
|
|
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
|
+
};
|
|
1
10
|
import { getter } from '@progress/kendo-react-common';
|
|
2
11
|
/** @hidden */
|
|
3
12
|
export var getValueMap = function (value, idGetter) {
|
|
@@ -31,7 +40,7 @@ export var getMultiSelectTreeValue = function (data, options) {
|
|
|
31
40
|
var selectedItem = items[0];
|
|
32
41
|
var selectedId = idGetter(selectedItem);
|
|
33
42
|
var subItemGetter = getter(subItemsField);
|
|
34
|
-
var stack = data
|
|
43
|
+
var stack = __spreadArray([], data, true);
|
|
35
44
|
var context = [];
|
|
36
45
|
var parents;
|
|
37
46
|
var foundItem;
|
|
@@ -55,7 +64,7 @@ export var getMultiSelectTreeValue = function (data, options) {
|
|
|
55
64
|
}
|
|
56
65
|
}
|
|
57
66
|
}
|
|
58
|
-
var childrenStack = (subItemGetter(foundItem) || [])
|
|
67
|
+
var childrenStack = __spreadArray([], (subItemGetter(foundItem) || []), true);
|
|
59
68
|
var children = [];
|
|
60
69
|
while (childrenStack.length) {
|
|
61
70
|
var currentItem = childrenStack.pop();
|
|
@@ -2,10 +2,12 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
2
2
|
var extendStatics = function (d, b) {
|
|
3
3
|
extendStatics = Object.setPrototypeOf ||
|
|
4
4
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
-
function (d, b) { for (var p in b) if (
|
|
5
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
6
6
|
return extendStatics(d, b);
|
|
7
7
|
};
|
|
8
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");
|
|
9
11
|
extendStatics(d, b);
|
|
10
12
|
function __() { this.constructor = d; }
|
|
11
13
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
@@ -68,7 +68,7 @@ export default class DropDownBase {
|
|
|
68
68
|
}>>;
|
|
69
69
|
popupClass: PropTypes.Requireable<string>;
|
|
70
70
|
className: PropTypes.Requireable<string>;
|
|
71
|
-
appendTo: PropTypes.Requireable<
|
|
71
|
+
appendTo: PropTypes.Requireable<Element>;
|
|
72
72
|
width: PropTypes.Requireable<string | number>;
|
|
73
73
|
height: PropTypes.Requireable<string | number>;
|
|
74
74
|
}>>;
|
|
@@ -112,7 +112,7 @@ export default class DropDownBase {
|
|
|
112
112
|
}>>;
|
|
113
113
|
popupClass: PropTypes.Requireable<string>;
|
|
114
114
|
className: PropTypes.Requireable<string>;
|
|
115
|
-
appendTo: PropTypes.Requireable<
|
|
115
|
+
appendTo: PropTypes.Requireable<Element>;
|
|
116
116
|
width: PropTypes.Requireable<string | number>;
|
|
117
117
|
height: PropTypes.Requireable<string | number>;
|
|
118
118
|
}>>;
|
|
@@ -148,16 +148,16 @@ export default class DropDownBase {
|
|
|
148
148
|
calculateDir(): void;
|
|
149
149
|
calculatePopupWidth(): void;
|
|
150
150
|
scrollToItem(itemIndex: number, vsEnabled?: boolean): void;
|
|
151
|
-
handleItemClick: (index: number, event: React.
|
|
151
|
+
handleItemClick: (index: number, event: React.MouseEvent<HTMLLIElement> | React.KeyboardEvent<HTMLInputElement>) => void;
|
|
152
152
|
handleFocus: React.FocusEventHandler<HTMLSpanElement>;
|
|
153
|
-
filterChanged: (text: string, state: InternalState) => void;
|
|
153
|
+
filterChanged: (text: string | null, state: InternalState) => void;
|
|
154
154
|
initState(): InternalState;
|
|
155
155
|
applyState(state: InternalState): void;
|
|
156
156
|
togglePopup: (state: InternalState) => void;
|
|
157
|
-
pageChange: (page: Page, syntheticEvent: React.SyntheticEvent<any
|
|
157
|
+
pageChange: (page: Page, syntheticEvent: React.SyntheticEvent<any>) => void;
|
|
158
158
|
triggerOnPageChange(state: InternalState, skip: number, take: number): void;
|
|
159
159
|
triggerPageChangeCornerItems(item: any, state: InternalState): void;
|
|
160
160
|
scrollToVirtualItem: (virtual: VirtualizationSettings, selectedItemIndex: number) => void;
|
|
161
|
-
renderScrollElement: () => JSX.Element;
|
|
161
|
+
renderScrollElement: () => false | JSX.Element;
|
|
162
162
|
getPopupSettings(): DropDownsPopupSettings;
|
|
163
163
|
}
|
|
@@ -21,6 +21,8 @@ import { guid } from '@progress/kendo-react-common';
|
|
|
21
21
|
var DropDownBase = /** @class */ (function () {
|
|
22
22
|
function DropDownBase(component) {
|
|
23
23
|
var _this = this;
|
|
24
|
+
this.wrapper = null;
|
|
25
|
+
this.list = null;
|
|
24
26
|
this.vs = new VirtualScroll();
|
|
25
27
|
this.navigation = new Navigation();
|
|
26
28
|
this.handleItemClick = function (index, event) {
|
|
@@ -167,7 +169,7 @@ var DropDownBase = /** @class */ (function () {
|
|
|
167
169
|
delete eventData.type;
|
|
168
170
|
var handler = type && _this.component.props[type];
|
|
169
171
|
if (handler) {
|
|
170
|
-
handler.call(undefined, __assign({}, eventArgs, eventData));
|
|
172
|
+
handler.call(undefined, __assign(__assign({}, eventArgs), eventData));
|
|
171
173
|
}
|
|
172
174
|
});
|
|
173
175
|
};
|
|
@@ -219,7 +221,7 @@ var DropDownBase = /** @class */ (function () {
|
|
|
219
221
|
})]),
|
|
220
222
|
popupClass: PropTypes.string,
|
|
221
223
|
className: PropTypes.string,
|
|
222
|
-
appendTo: PropTypes.
|
|
224
|
+
appendTo: PropTypes.instanceOf(Element),
|
|
223
225
|
width: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
224
226
|
height: PropTypes.oneOfType([PropTypes.string, PropTypes.number])
|
|
225
227
|
}),
|
|
@@ -234,7 +236,7 @@ var DropDownBase = /** @class */ (function () {
|
|
|
234
236
|
header: PropTypes.node,
|
|
235
237
|
footer: PropTypes.node
|
|
236
238
|
};
|
|
237
|
-
DropDownBase.propTypes = __assign({}, DropDownBase.basicPropTypes, { value: PropTypes.any, defaultValue: PropTypes.any, filterable: PropTypes.bool, filter: PropTypes.string, virtual: PropTypes.shape({
|
|
239
|
+
DropDownBase.propTypes = __assign(__assign({}, DropDownBase.basicPropTypes), { value: PropTypes.any, defaultValue: PropTypes.any, filterable: PropTypes.bool, filter: PropTypes.string, virtual: PropTypes.shape({
|
|
238
240
|
pageSize: PropTypes.number.isRequired,
|
|
239
241
|
skip: PropTypes.number.isRequired,
|
|
240
242
|
total: PropTypes.number.isRequired
|
package/dist/es/common/List.d.ts
CHANGED
|
@@ -36,6 +36,6 @@ export interface ListProps {
|
|
|
36
36
|
*/
|
|
37
37
|
export default class List extends React.Component<ListProps> {
|
|
38
38
|
renderItems(): JSX.Element[];
|
|
39
|
-
renderNoValueElement(localizationService: LocalizationService):
|
|
40
|
-
render():
|
|
39
|
+
renderNoValueElement(localizationService: LocalizationService): string | number | boolean | React.ReactFragment | JSX.Element | null | undefined;
|
|
40
|
+
render(): string | number | boolean | React.ReactFragment | JSX.Element | null | undefined;
|
|
41
41
|
}
|
package/dist/es/common/List.js
CHANGED
|
@@ -2,10 +2,12 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
2
2
|
var extendStatics = function (d, b) {
|
|
3
3
|
extendStatics = Object.setPrototypeOf ||
|
|
4
4
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
-
function (d, b) { for (var p in b) if (
|
|
5
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
6
6
|
return extendStatics(d, b);
|
|
7
7
|
};
|
|
8
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");
|
|
9
11
|
extendStatics(d, b);
|
|
10
12
|
function __() { this.constructor = d; }
|
|
11
13
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
@@ -42,7 +44,7 @@ var List = /** @class */ (function (_super) {
|
|
|
42
44
|
group = current;
|
|
43
45
|
}
|
|
44
46
|
}
|
|
45
|
-
return (React.createElement(ListItem, { id: "option-"
|
|
47
|
+
return (React.createElement(ListItem, { id: "option-".concat(optionsGuid, "-").concat(realIndex), virtual: virtual, dataItem: item, selected: selected, focused: focusedIndex === index, index: realIndex, key: realIndex, onClick: _this.props.onClick, textField: textField, group: group, render: itemRender }));
|
|
46
48
|
});
|
|
47
49
|
};
|
|
48
50
|
List.prototype.renderNoValueElement = function (localizationService) {
|
|
@@ -2,10 +2,12 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
2
2
|
var extendStatics = function (d, b) {
|
|
3
3
|
extendStatics = Object.setPrototypeOf ||
|
|
4
4
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
-
function (d, b) { for (var p in b) if (
|
|
5
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
6
6
|
return extendStatics(d, b);
|
|
7
7
|
};
|
|
8
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");
|
|
9
11
|
extendStatics(d, b);
|
|
10
12
|
function __() { this.constructor = d; }
|
|
11
13
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
@@ -2,10 +2,12 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
2
2
|
var extendStatics = function (d, b) {
|
|
3
3
|
extendStatics = Object.setPrototypeOf ||
|
|
4
4
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
-
function (d, b) { for (var p in b) if (
|
|
5
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
6
6
|
return extendStatics(d, b);
|
|
7
7
|
};
|
|
8
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");
|
|
9
11
|
extendStatics(d, b);
|
|
10
12
|
function __() { this.constructor = d; }
|
|
11
13
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
@@ -2,10 +2,12 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
2
2
|
var extendStatics = function (d, b) {
|
|
3
3
|
extendStatics = Object.setPrototypeOf ||
|
|
4
4
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
-
function (d, b) { for (var p in b) if (
|
|
5
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
6
6
|
return extendStatics(d, b);
|
|
7
7
|
};
|
|
8
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");
|
|
9
11
|
extendStatics(d, b);
|
|
10
12
|
function __() { this.constructor = d; }
|
|
11
13
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
@@ -20,17 +22,19 @@ var sizeMap = kendoThemeMaps.sizeMap, roundedMap = kendoThemeMaps.roundedMap;
|
|
|
20
22
|
var ListFilter = /** @class */ (function (_super) {
|
|
21
23
|
__extends(ListFilter, _super);
|
|
22
24
|
function ListFilter() {
|
|
23
|
-
|
|
25
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
26
|
+
_this.input = null;
|
|
27
|
+
return _this;
|
|
24
28
|
}
|
|
25
29
|
ListFilter.prototype.render = function () {
|
|
26
|
-
var _this = this;
|
|
27
30
|
var _a;
|
|
31
|
+
var _this = this;
|
|
28
32
|
var _b = this.props, size = _b.size, rounded = _b.rounded, fillMode = _b.fillMode, inputRef = _b.inputRef;
|
|
29
33
|
return (React.createElement("div", { className: "k-list-filter" },
|
|
30
34
|
React.createElement("span", { className: classNames('k-searchbox k-input', (_a = {},
|
|
31
|
-
_a["k-input-"
|
|
32
|
-
_a["k-rounded-"
|
|
33
|
-
_a["k-input-"
|
|
35
|
+
_a["k-input-".concat(sizeMap[size] || size)] = size,
|
|
36
|
+
_a["k-rounded-".concat(roundedMap[rounded] || rounded)] = rounded,
|
|
37
|
+
_a["k-input-".concat(fillMode)] = fillMode,
|
|
34
38
|
_a)) },
|
|
35
39
|
React.createElement("span", { className: "k-input-icon k-icon k-i-search" }),
|
|
36
40
|
React.createElement("input", { ref: inputRef ? inputRef : function (input) { return _this.input = input; }, value: this.props.value || '', className: "k-input-inner", onChange: this.props.onChange, onKeyDown: this.props.onKeyDown, tabIndex: this.props.tabIndex, onClick: function (e) { return e.stopPropagation(); } }))));
|
|
@@ -49,5 +49,5 @@ export interface ListItemProps {
|
|
|
49
49
|
*/
|
|
50
50
|
export default class ListItem extends React.Component<ListItemProps, {}> {
|
|
51
51
|
handleClick: React.MouseEventHandler<HTMLLIElement>;
|
|
52
|
-
render():
|
|
52
|
+
render(): string | number | boolean | React.ReactFragment | JSX.Element | null | undefined;
|
|
53
53
|
}
|
|
@@ -2,10 +2,12 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
2
2
|
var extendStatics = function (d, b) {
|
|
3
3
|
extendStatics = Object.setPrototypeOf ||
|
|
4
4
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
-
function (d, b) { for (var p in b) if (
|
|
5
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
6
6
|
return extendStatics(d, b);
|
|
7
7
|
};
|
|
8
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");
|
|
9
11
|
extendStatics(d, b);
|
|
10
12
|
function __() { this.constructor = d; }
|
|
11
13
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
@@ -34,7 +34,7 @@ export default class SearchBar extends React.Component<SearchBarProps> {
|
|
|
34
34
|
/**
|
|
35
35
|
* @hidden
|
|
36
36
|
*/
|
|
37
|
-
|
|
37
|
+
get input(): HTMLInputElement | null;
|
|
38
38
|
componentDidUpdate(prevProps: SearchBarProps): void;
|
|
39
|
-
render():
|
|
39
|
+
render(): string | number | boolean | React.ReactFragment | JSX.Element | null | undefined;
|
|
40
40
|
}
|
|
@@ -2,10 +2,12 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
2
2
|
var extendStatics = function (d, b) {
|
|
3
3
|
extendStatics = Object.setPrototypeOf ||
|
|
4
4
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
-
function (d, b) { for (var p in b) if (
|
|
5
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
6
6
|
return extendStatics(d, b);
|
|
7
7
|
};
|
|
8
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");
|
|
9
11
|
extendStatics(d, b);
|
|
10
12
|
function __() { this.constructor = d; }
|
|
11
13
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
@@ -18,7 +20,9 @@ import * as React from 'react';
|
|
|
18
20
|
var SearchBar = /** @class */ (function (_super) {
|
|
19
21
|
__extends(SearchBar, _super);
|
|
20
22
|
function SearchBar() {
|
|
21
|
-
|
|
23
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
24
|
+
_this._input = null;
|
|
25
|
+
return _this;
|
|
22
26
|
}
|
|
23
27
|
Object.defineProperty(SearchBar.prototype, "input", {
|
|
24
28
|
/**
|
|
@@ -27,7 +31,7 @@ var SearchBar = /** @class */ (function (_super) {
|
|
|
27
31
|
get: function () {
|
|
28
32
|
return this._input;
|
|
29
33
|
},
|
|
30
|
-
enumerable:
|
|
34
|
+
enumerable: false,
|
|
31
35
|
configurable: true
|
|
32
36
|
});
|
|
33
37
|
SearchBar.prototype.componentDidUpdate = function (prevProps) {
|
|
@@ -22,13 +22,13 @@ export default class VirtualScroll {
|
|
|
22
22
|
enabled: boolean;
|
|
23
23
|
pageSize: number;
|
|
24
24
|
itemHeight: number;
|
|
25
|
-
PageChange: (event: Page, syntheticEvent: React.SyntheticEvent<any>) => void;
|
|
25
|
+
PageChange: ((event: Page, syntheticEvent: React.SyntheticEvent<any>) => void) | null;
|
|
26
26
|
private prevScrollPos;
|
|
27
27
|
private listTranslate;
|
|
28
28
|
private scrollSyncing;
|
|
29
29
|
constructor();
|
|
30
|
-
|
|
31
|
-
scrollerRef: (element: HTMLDivElement) => void;
|
|
30
|
+
get translate(): number;
|
|
31
|
+
scrollerRef: (element: HTMLDivElement | null) => void;
|
|
32
32
|
calcScrollElementHeight: () => boolean;
|
|
33
33
|
changePage(skip: number, e: React.SyntheticEvent<HTMLElement>): void;
|
|
34
34
|
translateTo(dY: number): void;
|
|
@@ -5,12 +5,16 @@ var maxHeightIE = 1533915;
|
|
|
5
5
|
var VirtualScroll = /** @class */ (function () {
|
|
6
6
|
function VirtualScroll() {
|
|
7
7
|
var _this = this;
|
|
8
|
+
this.container = null;
|
|
9
|
+
this.scrollElement = null;
|
|
10
|
+
this.list = null;
|
|
8
11
|
this.containerHeight = 0;
|
|
9
12
|
this.skip = 0;
|
|
10
13
|
this.total = 0;
|
|
11
14
|
this.enabled = false;
|
|
12
15
|
this.pageSize = 0;
|
|
13
16
|
this.itemHeight = 0;
|
|
17
|
+
this.PageChange = null;
|
|
14
18
|
this.prevScrollPos = 0;
|
|
15
19
|
this.listTranslate = 0;
|
|
16
20
|
this.scrollSyncing = false;
|
|
@@ -43,12 +47,12 @@ var VirtualScroll = /** @class */ (function () {
|
|
|
43
47
|
get: function () {
|
|
44
48
|
return this.listTranslate;
|
|
45
49
|
},
|
|
46
|
-
enumerable:
|
|
50
|
+
enumerable: false,
|
|
47
51
|
configurable: true
|
|
48
52
|
});
|
|
49
53
|
VirtualScroll.prototype.changePage = function (skip, e) {
|
|
50
54
|
var newSkip = Math.min(Math.max(0, skip), this.total - this.pageSize);
|
|
51
|
-
if (newSkip !== this.skip) {
|
|
55
|
+
if (newSkip !== this.skip && this.PageChange) {
|
|
52
56
|
this.PageChange({ skip: newSkip, take: this.pageSize }, e);
|
|
53
57
|
}
|
|
54
58
|
};
|
package/dist/es/common/events.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -59,7 +59,7 @@ export interface DropDownsPopupSettings {
|
|
|
59
59
|
* Defaults to [`body`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/body).
|
|
60
60
|
* * If set to `null` the Popup will be rendered without React Portal.
|
|
61
61
|
*/
|
|
62
|
-
appendTo?: HTMLElement;
|
|
62
|
+
appendTo?: HTMLElement | null;
|
|
63
63
|
}
|
|
64
64
|
import { FilterDescriptor } from './filterDescriptor';
|
|
65
65
|
/**
|
|
@@ -10,7 +10,7 @@ declare const sameCharsOnly: (word: string, character: string) => boolean;
|
|
|
10
10
|
/**
|
|
11
11
|
* @hidden
|
|
12
12
|
*/
|
|
13
|
-
declare const shuffleData: (data: any
|
|
13
|
+
declare const shuffleData: (data: Array<any>, splitIndex: number, defaultItem: any) => any[];
|
|
14
14
|
/**
|
|
15
15
|
* @hidden
|
|
16
16
|
*/
|
|
@@ -26,7 +26,7 @@ declare const itemIndexStartsWith: (items: any[], text?: string, field?: string)
|
|
|
26
26
|
/**
|
|
27
27
|
* @hidden
|
|
28
28
|
*/
|
|
29
|
-
declare const getItemIndexByText: (data: any
|
|
29
|
+
declare const getItemIndexByText: (data: Array<any>, text: string, textField?: string, matchCase?: boolean) => number;
|
|
30
30
|
/**
|
|
31
31
|
* @hidden
|
|
32
32
|
*/
|
|
@@ -34,11 +34,11 @@ declare const getItemValue: (item: any, field?: string) => any;
|
|
|
34
34
|
/**
|
|
35
35
|
* @hidden
|
|
36
36
|
*/
|
|
37
|
-
declare const matchDataCollections: (data1?: any
|
|
37
|
+
declare const matchDataCollections: (data1?: Array<any>, data2?: Array<any>, key?: string) => boolean;
|
|
38
38
|
/**
|
|
39
39
|
* @hidden
|
|
40
40
|
*/
|
|
41
|
-
declare const removeDataItems: (items: any
|
|
41
|
+
declare const removeDataItems: (items: Array<any>, toRemove: Array<any>, key?: string) => void;
|
|
42
42
|
/**
|
|
43
43
|
* @hidden
|
|
44
44
|
*/
|
|
@@ -46,11 +46,11 @@ declare const areSame: (item1: any, item2: any, key?: string) => boolean;
|
|
|
46
46
|
/**
|
|
47
47
|
* @hidden
|
|
48
48
|
*/
|
|
49
|
-
declare const getFocusedItem: (data: any
|
|
49
|
+
declare const getFocusedItem: (data: Array<any>, value?: string, textField?: string) => number;
|
|
50
50
|
/**
|
|
51
51
|
* @hidden
|
|
52
52
|
*/
|
|
53
|
-
declare const suggestValue: (value?: string, data?: any
|
|
53
|
+
declare const suggestValue: (value?: string, data?: Array<any>, textField?: string) => string;
|
|
54
54
|
/**
|
|
55
55
|
* @hidden
|
|
56
56
|
*/
|
package/dist/es/main.js
CHANGED
|
@@ -4,6 +4,8 @@ import { AutoComplete, AutoCompletePropsContext } from './AutoComplete/AutoCompl
|
|
|
4
4
|
import { MultiSelect, MultiSelectPropsContext } from './MultiSelect/MultiSelect';
|
|
5
5
|
import { MultiColumnComboBox, MultiColumnComboBoxPropsContext } from './MultiColumnComboBox/MultiColumnComboBox';
|
|
6
6
|
import { DropDownTree, DropDownTreePropsContext } from './DropDownTree/DropDownTree';
|
|
7
|
+
export * from './DropDownTree/DropDownTreeProps';
|
|
7
8
|
import { MultiSelectTree, MultiSelectTreePropsContext } from './MultiSelectTree/MultiSelectTree';
|
|
9
|
+
export * from './MultiSelectTree/MultiSelectTreeProps';
|
|
8
10
|
export * from './MultiSelectTree/utils';
|
|
9
11
|
export { AutoComplete, AutoCompletePropsContext, DropDownList, DropDownListPropsContext, ComboBox, ComboBoxPropsContext, MultiSelect, MultiSelectPropsContext, MultiColumnComboBox, MultiColumnComboBoxPropsContext, DropDownTree, DropDownTreePropsContext, MultiSelectTree, MultiSelectTreePropsContext };
|
|
@@ -5,7 +5,7 @@ export var packageMetadata = {
|
|
|
5
5
|
name: '@progress/kendo-react-dropdowns',
|
|
6
6
|
productName: 'KendoReact',
|
|
7
7
|
productCodes: ['KENDOUIREACT', 'KENDOUICOMPLETE'],
|
|
8
|
-
publishDate:
|
|
8
|
+
publishDate: 1654509083,
|
|
9
9
|
version: '',
|
|
10
10
|
licensingDocsUrl: 'https://www.telerik.com/kendo-react-ui/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning'
|
|
11
11
|
};
|