@progress/kendo-react-dropdowns 5.19.0 → 5.20.0-dev.202309281201
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/DropDownTree/DropDownTree.js +31 -29
- package/dist/es/package-metadata.js +1 -1
- package/dist/npm/DropDownTree/DropDownTree.js +31 -29
- package/dist/npm/package-metadata.js +1 -1
- package/dist/systemjs/kendo-react-dropdowns.js +1 -1
- package/package.json +16 -16
|
@@ -62,7 +62,9 @@ var defaultProps = {
|
|
|
62
62
|
width: '200px',
|
|
63
63
|
height: '200px'
|
|
64
64
|
},
|
|
65
|
+
data: [],
|
|
65
66
|
required: false,
|
|
67
|
+
style: {},
|
|
66
68
|
validityStyles: true,
|
|
67
69
|
size: 'medium',
|
|
68
70
|
rounded: 'medium',
|
|
@@ -139,10 +141,11 @@ export var DropDownTree = React.forwardRef(function (directProps, ref) {
|
|
|
139
141
|
var _a;
|
|
140
142
|
validatePackage(packageMetadata);
|
|
141
143
|
var props = usePropsContext(DropDownTreePropsContext, directProps);
|
|
144
|
+
var combinedProps = __assign(__assign({}, defaultProps), props);
|
|
142
145
|
var calculatedId = React.useMemo(function () { return guid(); }, []);
|
|
143
|
-
var id =
|
|
144
|
-
var
|
|
145
|
-
var tabIndex = getTabIndex(
|
|
146
|
+
var id = combinedProps.id || calculatedId;
|
|
147
|
+
var data = combinedProps.data, dataItemKey = combinedProps.dataItemKey, popupSettings = combinedProps.popupSettings, style = combinedProps.style, opened = combinedProps.opened, disabled = combinedProps.disabled, _b = combinedProps.onOpen, onOpen = _b === void 0 ? noop : _b, _c = combinedProps.onClose, onClose = _c === void 0 ? noop : _c, placeholder = combinedProps.placeholder, label = combinedProps.label, name = combinedProps.name, selectField = combinedProps.selectField, subItemsField = combinedProps.subItemsField, validationMessage = combinedProps.validationMessage, valid = combinedProps.valid, required = combinedProps.required, validityStyles = combinedProps.validityStyles;
|
|
148
|
+
var tabIndex = getTabIndex(combinedProps.tabIndex, disabled);
|
|
146
149
|
var target = React.useRef(null);
|
|
147
150
|
var elementRef = React.useRef(null);
|
|
148
151
|
var inputRef = React.useRef(null);
|
|
@@ -150,30 +153,30 @@ export var DropDownTree = React.forwardRef(function (directProps, ref) {
|
|
|
150
153
|
var selectRef = React.useRef(null);
|
|
151
154
|
var treeViewRef = React.useRef(null);
|
|
152
155
|
var skipFocusRef = React.useRef(false);
|
|
153
|
-
var
|
|
154
|
-
var controlled =
|
|
155
|
-
var value = controlled ?
|
|
156
|
+
var _d = React.useState(undefined), stateValue = _d[0], setStateValue = _d[1];
|
|
157
|
+
var controlled = combinedProps.value !== undefined;
|
|
158
|
+
var value = controlled ? combinedProps.value : (stateValue !== undefined ? stateValue : combinedProps.defaultValue);
|
|
156
159
|
var hasValue = isPresent(value);
|
|
157
|
-
var currentValueText = hasValue ? getItemValue(value,
|
|
160
|
+
var currentValueText = hasValue ? getItemValue(value, combinedProps.textField) : '';
|
|
158
161
|
var validity = getValidity({ validationMessage: validationMessage, valid: valid, required: required }, hasValue);
|
|
159
162
|
var focus = React.useCallback(function () { return elementRef.current && elementRef.current.focus(); }, []);
|
|
160
163
|
React.useImperativeHandle(target, function () { return ({
|
|
161
|
-
props:
|
|
164
|
+
props: combinedProps,
|
|
162
165
|
element: elementRef.current,
|
|
163
166
|
focus: focus
|
|
164
167
|
}); });
|
|
165
168
|
React.useImperativeHandle(ref, function () { return target.current; });
|
|
166
|
-
var dir = useRtl(elementRef,
|
|
169
|
+
var dir = useRtl(elementRef, combinedProps.dir);
|
|
167
170
|
var initialStyleWidth = popupSettings.width !== undefined ?
|
|
168
171
|
popupSettings.width : (style.width !== undefined ? style.width : defaultProps.popupSettings.width);
|
|
169
172
|
var popupWidth = useDropdownWidth(elementRef, initialStyleWidth);
|
|
170
173
|
var popupStyles = __assign({ width: popupWidth }, (dir !== undefined ? { direction: dir } : {}));
|
|
171
|
-
var
|
|
174
|
+
var _e = React.useState(false), open = _e[0], setOpen = _e[1];
|
|
172
175
|
var isOpen = opened !== undefined ? opened : open;
|
|
173
|
-
var
|
|
174
|
-
var
|
|
175
|
-
var isAdaptive = !!(windowWidth && windowWidth <= MOBILE_MEDIUM_DEVISE &&
|
|
176
|
-
var
|
|
176
|
+
var _f = React.useState(false), focused = _f[0], setFocused = _f[1];
|
|
177
|
+
var _g = React.useState(), windowWidth = _g[0], setWindowWidth = _g[1];
|
|
178
|
+
var isAdaptive = !!(windowWidth && windowWidth <= MOBILE_MEDIUM_DEVISE && combinedProps.adaptive);
|
|
179
|
+
var _h = React.useState(''), filter = _h[0], setFilter = _h[1];
|
|
177
180
|
var setValidity = React.useCallback(function () {
|
|
178
181
|
if (selectRef.current && selectRef.current.setCustomValidity) {
|
|
179
182
|
selectRef.current.setCustomValidity(validity.valid
|
|
@@ -423,9 +426,9 @@ export var DropDownTree = React.forwardRef(function (directProps, ref) {
|
|
|
423
426
|
}
|
|
424
427
|
}, [props.onFilterChange, props.filter, props.textField]);
|
|
425
428
|
var renderAdaptiveListContainer = function () {
|
|
426
|
-
var mobileFilter =
|
|
429
|
+
var mobileFilter = combinedProps.filterable ? (React.createElement(ListFilter, { value: combinedProps.filter === undefined ? filter : combinedProps.filter, ref: adaptiveInputRef, onChange: onFilterChange, onKeyDown: onInputKeyDown, size: size, rounded: rounded, fillMode: fillMode })) : null;
|
|
427
430
|
var actionSheetProps = {
|
|
428
|
-
adaptiveTitle:
|
|
431
|
+
adaptiveTitle: combinedProps.adaptiveTitle,
|
|
429
432
|
expand: isOpen,
|
|
430
433
|
onClose: function (event) { return closePopup(event); },
|
|
431
434
|
windowWidth: windowWidth,
|
|
@@ -434,7 +437,7 @@ export var DropDownTree = React.forwardRef(function (directProps, ref) {
|
|
|
434
437
|
return (React.createElement(AdaptiveMode, __assign({}, actionSheetProps),
|
|
435
438
|
React.createElement(ActionSheetContent, { className: '!k-overflow-hidden' },
|
|
436
439
|
React.createElement("div", { className: 'k-list-container' },
|
|
437
|
-
React.createElement("div", { className: 'k-list k-list-lg' }, data.length > 0 ? (React.createElement(TreeView, { ref: treeViewRef, tabIndex: tabIndex, data: treeViewData, focusIdField: dataItemKey, textField:
|
|
440
|
+
React.createElement("div", { className: 'k-list k-list-lg' }, data.length > 0 ? (React.createElement(TreeView, { ref: treeViewRef, tabIndex: tabIndex, data: treeViewData, focusIdField: dataItemKey, textField: combinedProps.textField, selectField: selectField, expandField: combinedProps.expandField, childrenField: subItemsField, expandIcons: true, onItemClick: onChange, onExpandChange: onExpand, size: size, item: combinedProps.item, dir: dir })) : (React.createElement(NoData, null, localization.toLanguageString(nodata, messages[nodata]))))))));
|
|
438
441
|
};
|
|
439
442
|
var calculateMedia = React.useCallback(function (entries) {
|
|
440
443
|
for (var _i = 0, entries_1 = entries; _i < entries_1.length; _i++) {
|
|
@@ -450,33 +453,33 @@ export var DropDownTree = React.forwardRef(function (directProps, ref) {
|
|
|
450
453
|
return extendDataItem(item, subItemsField, (_a = {}, _a[selectField] = areSame(item, value, dataItemKey), _a));
|
|
451
454
|
});
|
|
452
455
|
}, [data, value, controlled, hasValue, selectField, subItemsField]);
|
|
453
|
-
var NoData =
|
|
454
|
-
var ValueComponent =
|
|
456
|
+
var NoData = combinedProps.listNoData || ListNoData;
|
|
457
|
+
var ValueComponent = combinedProps.valueHolder || ValueHolder;
|
|
455
458
|
var localization = useLocalization();
|
|
456
459
|
var isValid = !validityStyles || validity.valid;
|
|
457
|
-
var size =
|
|
460
|
+
var size = combinedProps.size, rounded = combinedProps.rounded, fillMode = combinedProps.fillMode;
|
|
458
461
|
var dropdowntree = (React.createElement(React.Fragment, null,
|
|
459
|
-
React.createElement("span", { className: classNames('k-dropdowntree k-picker',
|
|
462
|
+
React.createElement("span", { className: classNames('k-dropdowntree k-picker', combinedProps.className, (_a = {},
|
|
460
463
|
_a["k-picker-".concat(sizeMap[size] || size)] = size,
|
|
461
464
|
_a["k-rounded-".concat(roundedMap[rounded] || rounded)] = rounded,
|
|
462
465
|
_a["k-picker-".concat(fillMode)] = fillMode,
|
|
463
466
|
_a['k-focus'] = focused,
|
|
464
467
|
_a['k-invalid'] = !isValid,
|
|
465
|
-
_a['k-loading'] =
|
|
468
|
+
_a['k-loading'] = combinedProps.loading,
|
|
466
469
|
_a['k-required'] = required,
|
|
467
|
-
_a['k-disabled'] =
|
|
468
|
-
_a)), tabIndex: tabIndex, accessKey:
|
|
470
|
+
_a['k-disabled'] = combinedProps.disabled,
|
|
471
|
+
_a)), tabIndex: tabIndex, accessKey: combinedProps.accessKey, id: id, style: label ? __assign(__assign({}, style), { width: undefined }) : style, dir: dir, ref: elementRef, onKeyDown: disabled ? undefined : onWrapperKeyDown, onMouseDown: onWrapperMouseDown, onClick: disabled ? undefined : onWrapperClick, onFocus: onFocus, onBlur: onBlur, role: "combobox", "aria-haspopup": "tree", "aria-expanded": isOpen, "aria-disabled": disabled, "aria-label": label, "aria-labelledby": combinedProps.ariaLabelledBy, "aria-describedby": combinedProps.ariaDescribedBy, "aria-required": required },
|
|
469
472
|
React.createElement("span", { className: "k-input-inner" },
|
|
470
473
|
React.createElement(ValueComponent, { item: value }, currentValueText || placeholder)),
|
|
471
|
-
|
|
474
|
+
combinedProps.loading && React.createElement(IconWrap, { className: "k-input-loading-icon", name: 'loading' }),
|
|
472
475
|
hasValue && !disabled && (React.createElement("span", { onClick: onClear, className: "k-clear-value", title: localization.toLanguageString(clear, messages[clear]), role: "button", tabIndex: -1, onMouseDown: function (e) { return e.preventDefault(); } },
|
|
473
476
|
React.createElement(IconWrap, { name: 'x', icon: xIcon }))),
|
|
474
477
|
React.createElement(Button, { tabIndex: -1, type: "button", "aria-label": "select", className: "k-input-button", size: size, fillMode: fillMode, themeColor: "base", rounded: null, icon: "caret-alt-down", svgIcon: caretAltDownIcon }),
|
|
475
478
|
React.createElement("select", { name: name, ref: selectRef, tabIndex: -1, "aria-hidden": true, title: label, style: { opacity: 0, width: 1, border: 0, zIndex: -1, position: 'absolute', left: '50%' } },
|
|
476
|
-
React.createElement("option", { value:
|
|
479
|
+
React.createElement("option", { value: combinedProps.valueMap ? combinedProps.valueMap.call(undefined, value) : value })),
|
|
477
480
|
!isAdaptive && React.createElement(Popup, { className: classNames(popupSettings.className, { 'k-rtl': dir === 'rtl' }), popupClass: classNames(popupSettings.popupClass, 'k-dropdowntree-popup'), style: popupStyles, animate: popupSettings.animate, anchor: elementRef.current, show: isOpen, onOpen: onPopupOpened, onClose: onPopupClosed, appendTo: popupSettings.appendTo },
|
|
478
|
-
|
|
479
|
-
data.length > 0 ? (React.createElement(TreeView, { ref: treeViewRef, tabIndex: tabIndex, data: treeViewData, focusIdField: dataItemKey, textField:
|
|
481
|
+
combinedProps.filterable && (React.createElement(ListFilter, { value: combinedProps.filter === undefined ? filter : combinedProps.filter, ref: inputRef, onChange: onFilterChange, onKeyDown: onInputKeyDown, size: size, rounded: rounded, fillMode: fillMode })),
|
|
482
|
+
data.length > 0 ? (React.createElement(TreeView, { ref: treeViewRef, tabIndex: tabIndex, data: treeViewData, focusIdField: dataItemKey, textField: combinedProps.textField, selectField: selectField, expandField: combinedProps.expandField, childrenField: subItemsField, expandIcons: true, onItemClick: onChange, onExpandChange: onExpand, size: size, item: combinedProps.item, dir: dir })) : (React.createElement(NoData, null, localization.toLanguageString(nodata, messages[nodata]))))),
|
|
480
483
|
isAdaptive && renderAdaptiveListContainer()));
|
|
481
484
|
return label ? (React.createElement(FloatingLabel, { label: label, editorValue: currentValueText, editorPlaceholder: placeholder, editorValid: isValid, editorDisabled: disabled, editorId: id, style: { width: style ? style.width : undefined }, children: dropdowntree, dir: dir })) : dropdowntree;
|
|
482
485
|
});
|
|
@@ -534,5 +537,4 @@ var propTypes = {
|
|
|
534
537
|
adaptive: PropTypes.bool
|
|
535
538
|
};
|
|
536
539
|
DropDownTree.displayName = 'KendoReactDropDownTree';
|
|
537
|
-
DropDownTree.defaultProps = defaultProps;
|
|
538
540
|
DropDownTree.propTypes = propTypes;
|
|
@@ -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: 1695900617,
|
|
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
|
};
|
|
@@ -65,7 +65,9 @@ var defaultProps = {
|
|
|
65
65
|
width: '200px',
|
|
66
66
|
height: '200px'
|
|
67
67
|
},
|
|
68
|
+
data: [],
|
|
68
69
|
required: false,
|
|
70
|
+
style: {},
|
|
69
71
|
validityStyles: true,
|
|
70
72
|
size: 'medium',
|
|
71
73
|
rounded: 'medium',
|
|
@@ -142,10 +144,11 @@ exports.DropDownTree = React.forwardRef(function (directProps, ref) {
|
|
|
142
144
|
var _a;
|
|
143
145
|
(0, kendo_react_common_2.validatePackage)(package_metadata_1.packageMetadata);
|
|
144
146
|
var props = (0, kendo_react_common_1.usePropsContext)(exports.DropDownTreePropsContext, directProps);
|
|
147
|
+
var combinedProps = __assign(__assign({}, defaultProps), props);
|
|
145
148
|
var calculatedId = React.useMemo(function () { return (0, kendo_react_common_1.guid)(); }, []);
|
|
146
|
-
var id =
|
|
147
|
-
var
|
|
148
|
-
var tabIndex = (0, kendo_react_common_1.getTabIndex)(
|
|
149
|
+
var id = combinedProps.id || calculatedId;
|
|
150
|
+
var data = combinedProps.data, dataItemKey = combinedProps.dataItemKey, popupSettings = combinedProps.popupSettings, style = combinedProps.style, opened = combinedProps.opened, disabled = combinedProps.disabled, _b = combinedProps.onOpen, onOpen = _b === void 0 ? kendo_react_common_1.noop : _b, _c = combinedProps.onClose, onClose = _c === void 0 ? kendo_react_common_1.noop : _c, placeholder = combinedProps.placeholder, label = combinedProps.label, name = combinedProps.name, selectField = combinedProps.selectField, subItemsField = combinedProps.subItemsField, validationMessage = combinedProps.validationMessage, valid = combinedProps.valid, required = combinedProps.required, validityStyles = combinedProps.validityStyles;
|
|
151
|
+
var tabIndex = (0, kendo_react_common_1.getTabIndex)(combinedProps.tabIndex, disabled);
|
|
149
152
|
var target = React.useRef(null);
|
|
150
153
|
var elementRef = React.useRef(null);
|
|
151
154
|
var inputRef = React.useRef(null);
|
|
@@ -153,30 +156,30 @@ exports.DropDownTree = React.forwardRef(function (directProps, ref) {
|
|
|
153
156
|
var selectRef = React.useRef(null);
|
|
154
157
|
var treeViewRef = React.useRef(null);
|
|
155
158
|
var skipFocusRef = React.useRef(false);
|
|
156
|
-
var
|
|
157
|
-
var controlled =
|
|
158
|
-
var value = controlled ?
|
|
159
|
+
var _d = React.useState(undefined), stateValue = _d[0], setStateValue = _d[1];
|
|
160
|
+
var controlled = combinedProps.value !== undefined;
|
|
161
|
+
var value = controlled ? combinedProps.value : (stateValue !== undefined ? stateValue : combinedProps.defaultValue);
|
|
159
162
|
var hasValue = (0, utils_1.isPresent)(value);
|
|
160
|
-
var currentValueText = hasValue ? (0, utils_1.getItemValue)(value,
|
|
163
|
+
var currentValueText = hasValue ? (0, utils_1.getItemValue)(value, combinedProps.textField) : '';
|
|
161
164
|
var validity = getValidity({ validationMessage: validationMessage, valid: valid, required: required }, hasValue);
|
|
162
165
|
var focus = React.useCallback(function () { return elementRef.current && elementRef.current.focus(); }, []);
|
|
163
166
|
React.useImperativeHandle(target, function () { return ({
|
|
164
|
-
props:
|
|
167
|
+
props: combinedProps,
|
|
165
168
|
element: elementRef.current,
|
|
166
169
|
focus: focus
|
|
167
170
|
}); });
|
|
168
171
|
React.useImperativeHandle(ref, function () { return target.current; });
|
|
169
|
-
var dir = (0, kendo_react_common_1.useRtl)(elementRef,
|
|
172
|
+
var dir = (0, kendo_react_common_1.useRtl)(elementRef, combinedProps.dir);
|
|
170
173
|
var initialStyleWidth = popupSettings.width !== undefined ?
|
|
171
174
|
popupSettings.width : (style.width !== undefined ? style.width : defaultProps.popupSettings.width);
|
|
172
175
|
var popupWidth = (0, useDropdownWidth_1.useDropdownWidth)(elementRef, initialStyleWidth);
|
|
173
176
|
var popupStyles = __assign({ width: popupWidth }, (dir !== undefined ? { direction: dir } : {}));
|
|
174
|
-
var
|
|
177
|
+
var _e = React.useState(false), open = _e[0], setOpen = _e[1];
|
|
175
178
|
var isOpen = opened !== undefined ? opened : open;
|
|
176
|
-
var
|
|
177
|
-
var
|
|
178
|
-
var isAdaptive = !!(windowWidth && windowWidth <= constants_1.MOBILE_MEDIUM_DEVISE &&
|
|
179
|
-
var
|
|
179
|
+
var _f = React.useState(false), focused = _f[0], setFocused = _f[1];
|
|
180
|
+
var _g = React.useState(), windowWidth = _g[0], setWindowWidth = _g[1];
|
|
181
|
+
var isAdaptive = !!(windowWidth && windowWidth <= constants_1.MOBILE_MEDIUM_DEVISE && combinedProps.adaptive);
|
|
182
|
+
var _h = React.useState(''), filter = _h[0], setFilter = _h[1];
|
|
180
183
|
var setValidity = React.useCallback(function () {
|
|
181
184
|
if (selectRef.current && selectRef.current.setCustomValidity) {
|
|
182
185
|
selectRef.current.setCustomValidity(validity.valid
|
|
@@ -426,9 +429,9 @@ exports.DropDownTree = React.forwardRef(function (directProps, ref) {
|
|
|
426
429
|
}
|
|
427
430
|
}, [props.onFilterChange, props.filter, props.textField]);
|
|
428
431
|
var renderAdaptiveListContainer = function () {
|
|
429
|
-
var mobileFilter =
|
|
432
|
+
var mobileFilter = combinedProps.filterable ? (React.createElement(ListFilter_1.default, { value: combinedProps.filter === undefined ? filter : combinedProps.filter, ref: adaptiveInputRef, onChange: onFilterChange, onKeyDown: onInputKeyDown, size: size, rounded: rounded, fillMode: fillMode })) : null;
|
|
430
433
|
var actionSheetProps = {
|
|
431
|
-
adaptiveTitle:
|
|
434
|
+
adaptiveTitle: combinedProps.adaptiveTitle,
|
|
432
435
|
expand: isOpen,
|
|
433
436
|
onClose: function (event) { return closePopup(event); },
|
|
434
437
|
windowWidth: windowWidth,
|
|
@@ -437,7 +440,7 @@ exports.DropDownTree = React.forwardRef(function (directProps, ref) {
|
|
|
437
440
|
return (React.createElement(AdaptiveMode_1.AdaptiveMode, __assign({}, actionSheetProps),
|
|
438
441
|
React.createElement(kendo_react_layout_1.ActionSheetContent, { className: '!k-overflow-hidden' },
|
|
439
442
|
React.createElement("div", { className: 'k-list-container' },
|
|
440
|
-
React.createElement("div", { className: 'k-list k-list-lg' }, data.length > 0 ? (React.createElement(kendo_react_treeview_1.TreeView, { ref: treeViewRef, tabIndex: tabIndex, data: treeViewData, focusIdField: dataItemKey, textField:
|
|
443
|
+
React.createElement("div", { className: 'k-list k-list-lg' }, data.length > 0 ? (React.createElement(kendo_react_treeview_1.TreeView, { ref: treeViewRef, tabIndex: tabIndex, data: treeViewData, focusIdField: dataItemKey, textField: combinedProps.textField, selectField: selectField, expandField: combinedProps.expandField, childrenField: subItemsField, expandIcons: true, onItemClick: onChange, onExpandChange: onExpand, size: size, item: combinedProps.item, dir: dir })) : (React.createElement(NoData, null, localization.toLanguageString(messages_1.nodata, messages_1.messages[messages_1.nodata]))))))));
|
|
441
444
|
};
|
|
442
445
|
var calculateMedia = React.useCallback(function (entries) {
|
|
443
446
|
for (var _i = 0, entries_1 = entries; _i < entries_1.length; _i++) {
|
|
@@ -453,33 +456,33 @@ exports.DropDownTree = React.forwardRef(function (directProps, ref) {
|
|
|
453
456
|
return (0, kendo_react_common_1.extendDataItem)(item, subItemsField, (_a = {}, _a[selectField] = (0, utils_1.areSame)(item, value, dataItemKey), _a));
|
|
454
457
|
});
|
|
455
458
|
}, [data, value, controlled, hasValue, selectField, subItemsField]);
|
|
456
|
-
var NoData =
|
|
457
|
-
var ValueComponent =
|
|
459
|
+
var NoData = combinedProps.listNoData || ListNoData_1.ListNoData;
|
|
460
|
+
var ValueComponent = combinedProps.valueHolder || ValueHolder;
|
|
458
461
|
var localization = (0, kendo_react_intl_1.useLocalization)();
|
|
459
462
|
var isValid = !validityStyles || validity.valid;
|
|
460
|
-
var size =
|
|
463
|
+
var size = combinedProps.size, rounded = combinedProps.rounded, fillMode = combinedProps.fillMode;
|
|
461
464
|
var dropdowntree = (React.createElement(React.Fragment, null,
|
|
462
|
-
React.createElement("span", { className: (0, kendo_react_common_1.classNames)('k-dropdowntree k-picker',
|
|
465
|
+
React.createElement("span", { className: (0, kendo_react_common_1.classNames)('k-dropdowntree k-picker', combinedProps.className, (_a = {},
|
|
463
466
|
_a["k-picker-".concat(sizeMap[size] || size)] = size,
|
|
464
467
|
_a["k-rounded-".concat(roundedMap[rounded] || rounded)] = rounded,
|
|
465
468
|
_a["k-picker-".concat(fillMode)] = fillMode,
|
|
466
469
|
_a['k-focus'] = focused,
|
|
467
470
|
_a['k-invalid'] = !isValid,
|
|
468
|
-
_a['k-loading'] =
|
|
471
|
+
_a['k-loading'] = combinedProps.loading,
|
|
469
472
|
_a['k-required'] = required,
|
|
470
|
-
_a['k-disabled'] =
|
|
471
|
-
_a)), tabIndex: tabIndex, accessKey:
|
|
473
|
+
_a['k-disabled'] = combinedProps.disabled,
|
|
474
|
+
_a)), tabIndex: tabIndex, accessKey: combinedProps.accessKey, id: id, style: label ? __assign(__assign({}, style), { width: undefined }) : style, dir: dir, ref: elementRef, onKeyDown: disabled ? undefined : onWrapperKeyDown, onMouseDown: onWrapperMouseDown, onClick: disabled ? undefined : onWrapperClick, onFocus: onFocus, onBlur: onBlur, role: "combobox", "aria-haspopup": "tree", "aria-expanded": isOpen, "aria-disabled": disabled, "aria-label": label, "aria-labelledby": combinedProps.ariaLabelledBy, "aria-describedby": combinedProps.ariaDescribedBy, "aria-required": required },
|
|
472
475
|
React.createElement("span", { className: "k-input-inner" },
|
|
473
476
|
React.createElement(ValueComponent, { item: value }, currentValueText || placeholder)),
|
|
474
|
-
|
|
477
|
+
combinedProps.loading && React.createElement(kendo_react_common_1.IconWrap, { className: "k-input-loading-icon", name: 'loading' }),
|
|
475
478
|
hasValue && !disabled && (React.createElement("span", { onClick: onClear, className: "k-clear-value", title: localization.toLanguageString(messages_1.clear, messages_1.messages[messages_1.clear]), role: "button", tabIndex: -1, onMouseDown: function (e) { return e.preventDefault(); } },
|
|
476
479
|
React.createElement(kendo_react_common_1.IconWrap, { name: 'x', icon: kendo_svg_icons_1.xIcon }))),
|
|
477
480
|
React.createElement(kendo_react_buttons_1.Button, { tabIndex: -1, type: "button", "aria-label": "select", className: "k-input-button", size: size, fillMode: fillMode, themeColor: "base", rounded: null, icon: "caret-alt-down", svgIcon: kendo_svg_icons_1.caretAltDownIcon }),
|
|
478
481
|
React.createElement("select", { name: name, ref: selectRef, tabIndex: -1, "aria-hidden": true, title: label, style: { opacity: 0, width: 1, border: 0, zIndex: -1, position: 'absolute', left: '50%' } },
|
|
479
|
-
React.createElement("option", { value:
|
|
482
|
+
React.createElement("option", { value: combinedProps.valueMap ? combinedProps.valueMap.call(undefined, value) : value })),
|
|
480
483
|
!isAdaptive && React.createElement(kendo_react_popup_1.Popup, { className: (0, kendo_react_common_1.classNames)(popupSettings.className, { 'k-rtl': dir === 'rtl' }), popupClass: (0, kendo_react_common_1.classNames)(popupSettings.popupClass, 'k-dropdowntree-popup'), style: popupStyles, animate: popupSettings.animate, anchor: elementRef.current, show: isOpen, onOpen: onPopupOpened, onClose: onPopupClosed, appendTo: popupSettings.appendTo },
|
|
481
|
-
|
|
482
|
-
data.length > 0 ? (React.createElement(kendo_react_treeview_1.TreeView, { ref: treeViewRef, tabIndex: tabIndex, data: treeViewData, focusIdField: dataItemKey, textField:
|
|
484
|
+
combinedProps.filterable && (React.createElement(ListFilter_1.default, { value: combinedProps.filter === undefined ? filter : combinedProps.filter, ref: inputRef, onChange: onFilterChange, onKeyDown: onInputKeyDown, size: size, rounded: rounded, fillMode: fillMode })),
|
|
485
|
+
data.length > 0 ? (React.createElement(kendo_react_treeview_1.TreeView, { ref: treeViewRef, tabIndex: tabIndex, data: treeViewData, focusIdField: dataItemKey, textField: combinedProps.textField, selectField: selectField, expandField: combinedProps.expandField, childrenField: subItemsField, expandIcons: true, onItemClick: onChange, onExpandChange: onExpand, size: size, item: combinedProps.item, dir: dir })) : (React.createElement(NoData, null, localization.toLanguageString(messages_1.nodata, messages_1.messages[messages_1.nodata]))))),
|
|
483
486
|
isAdaptive && renderAdaptiveListContainer()));
|
|
484
487
|
return label ? (React.createElement(kendo_react_labels_1.FloatingLabel, { label: label, editorValue: currentValueText, editorPlaceholder: placeholder, editorValid: isValid, editorDisabled: disabled, editorId: id, style: { width: style ? style.width : undefined }, children: dropdowntree, dir: dir })) : dropdowntree;
|
|
485
488
|
});
|
|
@@ -537,5 +540,4 @@ var propTypes = {
|
|
|
537
540
|
adaptive: PropTypes.bool
|
|
538
541
|
};
|
|
539
542
|
exports.DropDownTree.displayName = 'KendoReactDropDownTree';
|
|
540
|
-
exports.DropDownTree.defaultProps = defaultProps;
|
|
541
543
|
exports.DropDownTree.propTypes = propTypes;
|
|
@@ -8,7 +8,7 @@ exports.packageMetadata = {
|
|
|
8
8
|
name: '@progress/kendo-react-dropdowns',
|
|
9
9
|
productName: 'KendoReact',
|
|
10
10
|
productCodes: ['KENDOUIREACT', 'KENDOUICOMPLETE'],
|
|
11
|
-
publishDate:
|
|
11
|
+
publishDate: 1695900617,
|
|
12
12
|
version: '',
|
|
13
13
|
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'
|
|
14
14
|
};
|