@progress/kendo-react-treeview 5.4.0-dev.202205271059 → 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.
@@ -97,6 +97,8 @@ var TreeViewDragAnalyzer = /** @class */ (function () {
97
97
  function TreeViewDragAnalyzer(event) {
98
98
  this.event = event;
99
99
  this.initialized = false;
100
+ this.destItemId = '';
101
+ this.destTreeViewGuid = '';
100
102
  this.itemId = event.itemHierarchicalIndex;
101
103
  this.treeViewGuid = event.target.guid;
102
104
  }
@@ -120,8 +122,8 @@ var TreeViewDragAnalyzer = /** @class */ (function () {
120
122
  get: function () {
121
123
  if (this.initialized && this.destItemId && this.destTreeViewGuid) {
122
124
  // Disallow circular references.
123
- return !((this.destTreeViewGuid + "_" + this.destItemId + "_").
124
- startsWith(this.treeViewGuid + "_" + this.itemId + "_"));
125
+ return !(("".concat(this.destTreeViewGuid, "_").concat(this.destItemId, "_")).
126
+ startsWith("".concat(this.treeViewGuid, "_").concat(this.itemId, "_")));
125
127
  }
126
128
  else {
127
129
  return false;
@@ -127,7 +127,7 @@ export declare class TreeViewDragClue extends React.PureComponent<TreeViewDragCl
127
127
  /**
128
128
  * @hidden
129
129
  */
130
- render(): JSX.Element;
130
+ render(): false | JSX.Element | undefined;
131
131
  /**
132
132
  * Displays the TreeViewDragClue component.
133
133
  *
@@ -74,7 +74,7 @@ var TreeViewItemWithoutContext = /** @class */ (function (_super) {
74
74
  var subitems = this.renderSubitemsIfApplicable();
75
75
  var itemInPart = this.renderItemInPart();
76
76
  return (React.createElement("li", { className: this.getRootClassName(), tabIndex: this.tabIndex, role: "treeitem", "aria-expanded": this.ariaExpanded, "aria-selected": this.ariaSelected, "aria-checked": this.ariaChecked, "aria-disabled": this.fieldsSvc.disabled(this.item) ? true : undefined, ref: function (el) { return _this.itemElement = el; } },
77
- React.createElement("div", { className: "k-treeview-" + this.props.position, ref: this.assignDraggableMeta },
77
+ React.createElement("div", { className: "k-treeview-".concat(this.props.position), ref: this.assignDraggableMeta },
78
78
  this.renderExpandIcon(),
79
79
  this.renderCheckbox(),
80
80
  this.props.draggable ?
@@ -113,7 +113,7 @@ var TreeViewItemWithoutContext = /** @class */ (function (_super) {
113
113
  var size = this.props.size;
114
114
  return (React.createElement("div", { className: "k-checkbox-wrap" },
115
115
  React.createElement("input", { type: "checkbox", className: classNames('k-checkbox k-rounded-md', (_a = {},
116
- _a["k-checkbox-" + (sizeMap[size] || size)] = size,
116
+ _a["k-checkbox-".concat(sizeMap[size] || size)] = size,
117
117
  _a)), checked: Boolean(this.fieldsSvc.checked(this.item)), id: this.itemGuid, tabIndex: -1, onChange: this.onCheckChange, ref: function (el) { return _this.checkboxElement = el; } }),
118
118
  React.createElement("label", { className: "k-checkbox-label", htmlFor: this.itemGuid })));
119
119
  }
@@ -104,6 +104,6 @@
104
104
  * ```
105
105
  */
106
106
  export declare function moveTreeViewItem(sourceItemHierarchicalIndex: string, sourceData: any[] | null | undefined, operation: 'before' | 'after' | 'child', targetItemHierarchicalIndex: string, targetData?: any[] | null, childrenField?: string): any[] | {
107
- sourceData: any[];
107
+ sourceData: any[] | null | undefined;
108
108
  targetData: any[];
109
- };
109
+ } | null | undefined;
@@ -135,7 +135,7 @@ export function moveTreeViewItem(sourceItemHierarchicalIndex, sourceData, operat
135
135
  return targetData ? { sourceData: sourceData, targetData: targetData } : sourceData;
136
136
  }
137
137
  function validateNoCircularReference() {
138
- return !(targetItemHierarchicalIndex + "_").startsWith(sourceItemHierarchicalIndex + "_");
138
+ return !"".concat(targetItemHierarchicalIndex, "_").startsWith("".concat(sourceItemHierarchicalIndex, "_"));
139
139
  }
140
140
  function validateInput() {
141
141
  if (!sourceData || !sourceData.length ||
@@ -5,7 +5,7 @@ export var packageMetadata = {
5
5
  name: '@progress/kendo-react-treeview',
6
6
  productName: 'KendoReact',
7
7
  productCodes: ['KENDOUIREACT', 'KENDOUICOMPLETE'],
8
- publishDate: 1653648152,
8
+ publishDate: 1654509058,
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
  };
@@ -6,11 +6,11 @@ export declare function hasChildren(item: any, childrenField: string): boolean;
6
6
  /**
7
7
  * @hidden
8
8
  */
9
- export declare function isItemExpandedAndWithChildren(item: any, fieldsSvc: FieldsService): boolean;
9
+ export declare function isItemExpandedAndWithChildren(item: any, fieldsSvc: FieldsService): boolean | undefined;
10
10
  /**
11
11
  * @hidden
12
12
  */
13
- export declare function resolveItemId(publicId: any, idField: string, items: any[], childrenField: string): string;
13
+ export declare function resolveItemId(publicId: any, idField: string, items: any[], childrenField: string): string | undefined;
14
14
  /**
15
15
  * @hidden
16
16
  */
@@ -48,10 +48,10 @@ export declare class TreeView extends React.Component<TreeViewProps, TreeViewSta
48
48
  textField: PropTypes.Requireable<string>;
49
49
  disableField: PropTypes.Requireable<string>;
50
50
  item: PropTypes.Requireable<any>;
51
- 'aria-multiselectable': (props: any, propName: any, componentName: any) => Error;
51
+ 'aria-multiselectable': (props: any, propName: any, componentName: any) => Error | null;
52
52
  'aria-label': PropTypes.Requireable<string>;
53
53
  'aria-labelledby': PropTypes.Requireable<string>;
54
- size: PropTypes.Requireable<"small" | "medium" | "large">;
54
+ size: PropTypes.Requireable<"small" | "medium" | "large" | null | undefined>;
55
55
  };
56
56
  /**
57
57
  * @hidden
@@ -66,14 +66,14 @@ export declare class TreeView extends React.Component<TreeViewProps, TreeViewSta
66
66
  disableField: string;
67
67
  checkField: string;
68
68
  checkIndeterminateField: string;
69
- size: "small" | "medium" | "large";
69
+ size: "small" | "medium" | "large" | null | undefined;
70
70
  };
71
71
  /**
72
72
  * @hidden
73
73
  */
74
74
  state: {
75
- focusedItemId: any;
76
- focusedItemPublicId: any;
75
+ focusedItemId: undefined;
76
+ focusedItemPublicId: undefined;
77
77
  tabbableItemId: string;
78
78
  };
79
79
  private blurRequest;
@@ -84,7 +84,7 @@ export declare class TreeView extends React.Component<TreeViewProps, TreeViewSta
84
84
  /**
85
85
  * @hidden
86
86
  */
87
- get element(): HTMLDivElement;
87
+ get element(): HTMLDivElement | null;
88
88
  constructor(props: TreeViewProps);
89
89
  /**
90
90
  * @hidden
@@ -56,11 +56,12 @@ var TreeView = /** @class */ (function (_super) {
56
56
  * @hidden
57
57
  */
58
58
  _this.state = { focusedItemId: undefined, focusedItemPublicId: undefined, tabbableItemId: itemIdUtils_1.ZERO_LEVEL_ZERO_NODE_ID };
59
+ _this.fieldsSvc = null;
59
60
  // When there is a change in state.focusedItemId, calling focus() on the dom element of the focused item
60
61
  // is most often not needed, because the browser focuses the element on its own.
61
62
  // https://github.com/telerik/kendo-react/issues/190
62
63
  _this.allowExplicitFocus = false;
63
- _this.treeGuid = kendo_react_common_1.guid();
64
+ _this.treeGuid = (0, kendo_react_common_1.guid)();
64
65
  _this._element = null;
65
66
  _this.onFocusDomElNeeded = function (domItem) {
66
67
  if (_this.allowExplicitFocus) {
@@ -124,8 +125,8 @@ var TreeView = /** @class */ (function (_super) {
124
125
  };
125
126
  _this.onKeyDown = function (event) {
126
127
  var focusedItem = _this.getFocusedItem();
127
- if (focusedItem) {
128
- var newItemId = getItemIdUponKeyboardNavigation_1.default(focusedItem, _this.state.focusedItemId, _this.data, event.keyCode, _this.fieldsSvc);
128
+ if (focusedItem && _this.fieldsSvc) {
129
+ var newItemId = (0, getItemIdUponKeyboardNavigation_1.default)(focusedItem, _this.state.focusedItemId, _this.data, event.keyCode, _this.fieldsSvc);
129
130
  if (newItemId !== _this.state.focusedItemId) {
130
131
  // This disables the auto-scroll. The scroll is achieved via item focusing.
131
132
  event.preventDefault();
@@ -135,7 +136,7 @@ var TreeView = /** @class */ (function (_super) {
135
136
  _this.dispatchEventsOnKeyDown(event, focusedItem);
136
137
  }
137
138
  };
138
- kendo_react_common_2.validatePackage(package_metadata_1.packageMetadata);
139
+ (0, kendo_react_common_2.validatePackage)(package_metadata_1.packageMetadata);
139
140
  return _this;
140
141
  }
141
142
  Object.defineProperty(TreeView.prototype, "element", {
@@ -156,8 +157,8 @@ var TreeView = /** @class */ (function (_super) {
156
157
  var _this = this;
157
158
  this.fieldsSvc = new FieldsService_1.default(this.props);
158
159
  var _b = this.props, size = _b.size, className = _b.className;
159
- return (React.createElement("div", { className: kendo_react_common_1.classNames('k-treeview', (_a = {},
160
- _a["k-treeview-" + (sizeMap[size] || size)] = size,
160
+ return (React.createElement("div", { className: (0, kendo_react_common_1.classNames)('k-treeview', (_a = {},
161
+ _a["k-treeview-".concat(sizeMap[size] || size)] = size,
161
162
  _a), className), onKeyDown: this.onKeyDown, onFocus: this.onFocus, onBlur: this.onBlur, role: "tree", "aria-multiselectable": this.ariaMultiSelectable ? true : undefined, "aria-label": this.props['aria-label'], "aria-labelledby": this.props['aria-labelledby'], ref: function (element) { return _this._element = element; }, tabIndex: this.props.tabIndex },
162
163
  React.createElement("ul", { className: "k-treeview-lines k-treeview-group", role: "group" }, this.data.map(function (item, index) {
163
164
  return (React.createElement(TreeViewItem_1.TreeViewItem, { item: item, position: index === 0 ? 'top' : index === _this.data.length - 1 ? 'bot' : 'mid', itemId: index.toString(), treeGuid: _this.treeGuid, animate: _this.props.animate, focusedItemId: _this.state.focusedItemId, tabbableItemId: _this.state.tabbableItemId, fieldsService: _this.fieldsSvc, itemUI: _this.props.item, checkboxes: _this.props.checkboxes, ariaMultiSelectable: _this.ariaMultiSelectable, onItemClick: _this.onItemClick, onFocusDomElNeeded: _this.onFocusDomElNeeded, draggable: _this.props.draggable, onPress: _this.onPress, onDrag: _this.onDrag, onRelease: _this.onRelease, expandIcons: _this.props.expandIcons, onExpandChange: _this.onExpandChange, onCheckChange: _this.onCheckChange, key: index, size: size }));
@@ -172,15 +173,18 @@ var TreeView = /** @class */ (function (_super) {
172
173
  };
173
174
  TreeView.prototype.dispatchEventsOnKeyDown = function (event, focusedItem) {
174
175
  var _this = this;
176
+ if (this.fieldsSvc === null) {
177
+ return;
178
+ }
175
179
  // isEnabled is the most expensive op and that is why is left last.
176
180
  var isEnabled = function () {
177
- return itemUtils_1.isEnabledAndAllParentsEnabled(_this.state.focusedItemId, _this.data, _this.fieldsSvc);
181
+ return _this.fieldsSvc && (0, itemUtils_1.isEnabledAndAllParentsEnabled)(_this.state.focusedItemId, _this.data, _this.fieldsSvc);
178
182
  };
179
183
  if (event.keyCode === kendo_react_common_1.Keys.left && this.fieldsSvc.expanded(focusedItem) && isEnabled()) {
180
184
  this.dispatchExpandChange(event, focusedItem, this.state.focusedItemId);
181
185
  }
182
186
  else if (event.keyCode === kendo_react_common_1.Keys.right && !this.fieldsSvc.expanded(focusedItem) &&
183
- (this.fieldsSvc.hasChildren(focusedItem) || itemUtils_1.hasChildren(focusedItem, this.props.childrenField)) && isEnabled()) {
187
+ (this.fieldsSvc.hasChildren(focusedItem) || (0, itemUtils_1.hasChildren)(focusedItem, this.props.childrenField)) && isEnabled()) {
184
188
  this.dispatchExpandChange(event, focusedItem, this.state.focusedItemId);
185
189
  }
186
190
  else if (event.keyCode === kendo_react_common_1.Keys.enter && isEnabled()) {
@@ -193,7 +197,7 @@ var TreeView = /** @class */ (function (_super) {
193
197
  }
194
198
  };
195
199
  TreeView.prototype.setFocus = function (focusedItemId) {
196
- if (focusedItemId) {
200
+ if (focusedItemId && this.fieldsSvc) {
197
201
  if (this.fieldsSvc.focusIdField) {
198
202
  var item = this.getItemById(focusedItemId);
199
203
  this.setState({ focusedItemId: focusedItemId, focusedItemPublicId: this.fieldsSvc.focusId(item) });
@@ -216,24 +220,24 @@ var TreeView = /** @class */ (function (_super) {
216
220
  return this.state.focusedItemId ? this.getItemById(this.state.focusedItemId) : undefined;
217
221
  };
218
222
  TreeView.prototype.getItemById = function (itemId) {
219
- return itemIdUtils_1.getItemById(itemId, this.data, this.props.childrenField || consts_1.CHILDREN_FIELD);
223
+ return (0, itemIdUtils_1.getItemById)(itemId, this.data, this.props.childrenField || consts_1.CHILDREN_FIELD);
220
224
  };
221
225
  TreeView.prototype.dispatchCheckChange = function (dispatchedEvent, item, itemId) {
222
- kendo_react_common_1.dispatchEvent(this.props.onCheckChange, dispatchedEvent, this, { item: item, itemHierarchicalIndex: itemId });
226
+ (0, kendo_react_common_1.dispatchEvent)(this.props.onCheckChange, dispatchedEvent, this, { item: item, itemHierarchicalIndex: itemId });
223
227
  };
224
228
  TreeView.prototype.dispatchExpandChange = function (dispatchedEvent, item, itemId) {
225
- kendo_react_common_1.dispatchEvent(this.props.onExpandChange, dispatchedEvent, this, { item: item, itemHierarchicalIndex: itemId });
229
+ (0, kendo_react_common_1.dispatchEvent)(this.props.onExpandChange, dispatchedEvent, this, { item: item, itemHierarchicalIndex: itemId });
226
230
  };
227
231
  TreeView.prototype.dispatchItemClick = function (dispatchedEvent, item, itemId) {
228
- kendo_react_common_1.dispatchEvent(this.props.onItemClick, dispatchedEvent, this, { item: item, itemHierarchicalIndex: itemId });
232
+ (0, kendo_react_common_1.dispatchEvent)(this.props.onItemClick, dispatchedEvent, this, { item: item, itemHierarchicalIndex: itemId });
229
233
  };
230
234
  TreeView.prototype.refocusDueToFocusIdField = function () {
231
- if (this.fieldsSvc.focusIdField) {
235
+ if (this.fieldsSvc && this.fieldsSvc.focusIdField) {
232
236
  var focusedItemPublicId = this.state.focusedItemPublicId;
233
237
  if (focusedItemPublicId) {
234
238
  var focusedItemId = this.props.getFocusHierarchicalIndex ?
235
239
  this.props.getFocusHierarchicalIndex(focusedItemPublicId) :
236
- itemUtils_1.resolveItemId(focusedItemPublicId, this.fieldsSvc.focusIdField, this.data, this.props.childrenField);
240
+ (0, itemUtils_1.resolveItemId)(focusedItemPublicId, this.fieldsSvc.focusIdField, this.data, this.props.childrenField);
237
241
  if (focusedItemId !== this.state.focusedItemId) {
238
242
  this.allowExplicitFocus = true;
239
243
  this.setState({ focusedItemId: focusedItemId });
@@ -130,6 +130,6 @@ export declare class TreeViewDragAnalyzer {
130
130
  * * `child`&mdash;Indicates that the dragged item is positioned in the middle of the destination item.
131
131
  * * `undefined`&mdash;Indicates that dropping is not allowed.
132
132
  */
133
- getDropOperation(): "after" | "child" | "before";
133
+ getDropOperation(): "after" | "child" | "before" | undefined;
134
134
  private setDestimationMeta;
135
135
  }
@@ -100,6 +100,8 @@ var TreeViewDragAnalyzer = /** @class */ (function () {
100
100
  function TreeViewDragAnalyzer(event) {
101
101
  this.event = event;
102
102
  this.initialized = false;
103
+ this.destItemId = '';
104
+ this.destTreeViewGuid = '';
103
105
  this.itemId = event.itemHierarchicalIndex;
104
106
  this.treeViewGuid = event.target.guid;
105
107
  }
@@ -123,8 +125,8 @@ var TreeViewDragAnalyzer = /** @class */ (function () {
123
125
  get: function () {
124
126
  if (this.initialized && this.destItemId && this.destTreeViewGuid) {
125
127
  // Disallow circular references.
126
- return !((this.destTreeViewGuid + "_" + this.destItemId + "_").
127
- startsWith(this.treeViewGuid + "_" + this.itemId + "_"));
128
+ return !(("".concat(this.destTreeViewGuid, "_").concat(this.destItemId, "_")).
129
+ startsWith("".concat(this.treeViewGuid, "_").concat(this.itemId, "_")));
128
130
  }
129
131
  else {
130
132
  return false;
@@ -127,7 +127,7 @@ export declare class TreeViewDragClue extends React.PureComponent<TreeViewDragCl
127
127
  /**
128
128
  * @hidden
129
129
  */
130
- render(): JSX.Element;
130
+ render(): false | JSX.Element | undefined;
131
131
  /**
132
132
  * Displays the TreeViewDragClue component.
133
133
  *
@@ -140,7 +140,7 @@ var TreeViewDragClue = /** @class */ (function (_super) {
140
140
  TreeViewDragClue.prototype.render = function () {
141
141
  var dynamicStyle = { top: this.state.top + 'px', left: this.state.left + 'px' };
142
142
  return this.state.visible && (React.createElement("div", { className: "k-header k-drag-clue", style: __assign(__assign({}, this.props.style), dynamicStyle) },
143
- React.createElement("span", { className: kendo_react_common_1.classNames('k-icon k-drag-status k-icon-with-modifier', this.state.operationClassName) },
143
+ React.createElement("span", { className: (0, kendo_react_common_1.classNames)('k-icon k-drag-status k-icon-with-modifier', this.state.operationClassName) },
144
144
  React.createElement("span", { className: "k-icon k-icon-modifier" })),
145
145
  this.state.text));
146
146
  };
@@ -45,7 +45,7 @@ var TreeViewItemWithoutContext = /** @class */ (function (_super) {
45
45
  __extends(TreeViewItemWithoutContext, _super);
46
46
  function TreeViewItemWithoutContext() {
47
47
  var _this = _super !== null && _super.apply(this, arguments) || this;
48
- _this.itemGuid = kendo_react_common_1.guid();
48
+ _this.itemGuid = (0, kendo_react_common_1.guid)();
49
49
  _this.onCheckChange = function (e) {
50
50
  _this.props.onCheckChange(e, _this.item, _this.itemId);
51
51
  };
@@ -77,7 +77,7 @@ var TreeViewItemWithoutContext = /** @class */ (function (_super) {
77
77
  var subitems = this.renderSubitemsIfApplicable();
78
78
  var itemInPart = this.renderItemInPart();
79
79
  return (React.createElement("li", { className: this.getRootClassName(), tabIndex: this.tabIndex, role: "treeitem", "aria-expanded": this.ariaExpanded, "aria-selected": this.ariaSelected, "aria-checked": this.ariaChecked, "aria-disabled": this.fieldsSvc.disabled(this.item) ? true : undefined, ref: function (el) { return _this.itemElement = el; } },
80
- React.createElement("div", { className: "k-treeview-" + this.props.position, ref: this.assignDraggableMeta },
80
+ React.createElement("div", { className: "k-treeview-".concat(this.props.position), ref: this.assignDraggableMeta },
81
81
  this.renderExpandIcon(),
82
82
  this.renderCheckbox(),
83
83
  this.props.draggable ?
@@ -115,8 +115,8 @@ var TreeViewItemWithoutContext = /** @class */ (function (_super) {
115
115
  if (this.props.checkboxes) {
116
116
  var size = this.props.size;
117
117
  return (React.createElement("div", { className: "k-checkbox-wrap" },
118
- React.createElement("input", { type: "checkbox", className: kendo_react_common_1.classNames('k-checkbox k-rounded-md', (_a = {},
119
- _a["k-checkbox-" + (sizeMap[size] || size)] = size,
118
+ React.createElement("input", { type: "checkbox", className: (0, kendo_react_common_1.classNames)('k-checkbox k-rounded-md', (_a = {},
119
+ _a["k-checkbox-".concat(sizeMap[size] || size)] = size,
120
120
  _a)), checked: Boolean(this.fieldsSvc.checked(this.item)), id: this.itemGuid, tabIndex: -1, onChange: this.onCheckChange, ref: function (el) { return _this.checkboxElement = el; } }),
121
121
  React.createElement("label", { className: "k-checkbox-label", htmlFor: this.itemGuid })));
122
122
  }
@@ -128,16 +128,16 @@ var TreeViewItemWithoutContext = /** @class */ (function (_super) {
128
128
  var renderExpand = this.props.expandIcons &&
129
129
  // If it is explicitly said that the item has children (even not loaded yet)
130
130
  // or if the item actually has children, then render the icon.
131
- (this.fieldsSvc.hasChildren(this.item) || itemUtils_1.hasChildren(this.item, this.fieldsSvc.getChildrenField()));
131
+ (this.fieldsSvc.hasChildren(this.item) || (0, itemUtils_1.hasChildren)(this.item, this.fieldsSvc.getChildrenField()));
132
132
  return renderExpand && (React.createElement("span", { className: "k-treeview-toggle" },
133
133
  React.createElement("span", { className: this.getIconClassName(), onClick: this.onExpandChange })));
134
134
  };
135
135
  TreeViewItemWithoutContext.prototype.renderSubitemsIfApplicable = function () {
136
136
  var _this = this;
137
137
  var data = this.fieldsSvc.children(this.item);
138
- return itemUtils_1.isItemExpandedAndWithChildren(this.item, this.fieldsSvc) ?
138
+ return (0, itemUtils_1.isItemExpandedAndWithChildren)(this.item, this.fieldsSvc) ?
139
139
  (React.createElement("ul", { className: "k-treeview-group", role: "group" }, data.map(function (item, index) {
140
- return (React.createElement(exports.TreeViewItem, { item: item, position: index === 0 ? 'top' : index === data.length - 1 ? 'bot' : 'mid', itemId: itemIdUtils_1.createId(index, _this.itemId), treeGuid: _this.props.treeGuid, animate: _this.props.animate, focusedItemId: _this.props.focusedItemId, tabbableItemId: _this.props.tabbableItemId, fieldsService: _this.props.fieldsService, itemUI: _this.props.itemUI, checkboxes: _this.props.checkboxes, ariaMultiSelectable: _this.props.ariaMultiSelectable, onItemClick: _this.props.onItemClick, onFocusDomElNeeded: _this.props.onFocusDomElNeeded, draggable: _this.props.draggable, onPress: _this.props.onPress, onDrag: _this.props.onDrag, onRelease: _this.props.onRelease, expandIcons: _this.props.expandIcons, onExpandChange: _this.props.onExpandChange, onCheckChange: _this.props.onCheckChange, key: index, size: _this.props.size }));
140
+ return (React.createElement(exports.TreeViewItem, { item: item, position: index === 0 ? 'top' : index === data.length - 1 ? 'bot' : 'mid', itemId: (0, itemIdUtils_1.createId)(index, _this.itemId), treeGuid: _this.props.treeGuid, animate: _this.props.animate, focusedItemId: _this.props.focusedItemId, tabbableItemId: _this.props.tabbableItemId, fieldsService: _this.props.fieldsService, itemUI: _this.props.itemUI, checkboxes: _this.props.checkboxes, ariaMultiSelectable: _this.props.ariaMultiSelectable, onItemClick: _this.props.onItemClick, onFocusDomElNeeded: _this.props.onFocusDomElNeeded, draggable: _this.props.draggable, onPress: _this.props.onPress, onDrag: _this.props.onDrag, onRelease: _this.props.onRelease, expandIcons: _this.props.expandIcons, onExpandChange: _this.props.onExpandChange, onCheckChange: _this.props.onCheckChange, key: index, size: _this.props.size }));
141
141
  }))) : undefined;
142
142
  };
143
143
  TreeViewItemWithoutContext.prototype.renderItemInPart = function () {
@@ -176,7 +176,7 @@ var TreeViewItemWithoutContext = /** @class */ (function (_super) {
176
176
  });
177
177
  Object.defineProperty(TreeViewItemWithoutContext.prototype, "ariaExpanded", {
178
178
  get: function () {
179
- return this.fieldsSvc.hasChildren(this.item) || itemUtils_1.hasChildren(this.item, this.fieldsSvc.getChildrenField()) ?
179
+ return this.fieldsSvc.hasChildren(this.item) || (0, itemUtils_1.hasChildren)(this.item, this.fieldsSvc.getChildrenField()) ?
180
180
  Boolean(this.fieldsSvc.expanded(this.item)) : undefined;
181
181
  },
182
182
  enumerable: false,
@@ -216,17 +216,17 @@ var TreeViewItemWithoutContext = /** @class */ (function (_super) {
216
216
  });
217
217
  TreeViewItemWithoutContext.prototype.getIconClassName = function () {
218
218
  var expanded = this.fieldsSvc.expanded(this.item);
219
- return kendo_react_common_1.classNames('k-icon', {
219
+ return (0, kendo_react_common_1.classNames)('k-icon', {
220
220
  'k-i-expand': !expanded,
221
221
  'k-i-collapse': expanded,
222
- 'k-i-loading': expanded && !itemUtils_1.hasChildren(this.item, this.fieldsSvc.getChildrenField())
222
+ 'k-i-loading': expanded && !(0, itemUtils_1.hasChildren)(this.item, this.fieldsSvc.getChildrenField())
223
223
  });
224
224
  };
225
225
  TreeViewItemWithoutContext.prototype.getRootClassName = function () {
226
- return kendo_react_common_1.classNames('k-treeview-item', { 'k-disabled': this.fieldsSvc.disabled(this.item) });
226
+ return (0, kendo_react_common_1.classNames)('k-treeview-item', { 'k-disabled': this.fieldsSvc.disabled(this.item) });
227
227
  };
228
228
  TreeViewItemWithoutContext.prototype.getContentClassName = function () {
229
- return kendo_react_common_1.classNames('k-treeview-leaf', {
229
+ return (0, kendo_react_common_1.classNames)('k-treeview-leaf', {
230
230
  'k-focus': this.props.focusedItemId === this.itemId,
231
231
  'k-selected': this.fieldsSvc.selected(this.item)
232
232
  });
@@ -85,7 +85,7 @@ function handleTreeViewCheckChange(event, check, data, settings, childrenField)
85
85
  return [];
86
86
  }
87
87
  var _a = parseOperation(check), ids = _a.ids, idField = _a.idField;
88
- var itemId = idField ? misc_1.getNestedValue(idField, event.item) : event.itemHierarchicalIndex;
88
+ var itemId = idField ? (0, misc_1.getNestedValue)(idField, event.item) : event.itemHierarchicalIndex;
89
89
  var idIndex = ids.indexOf(itemId);
90
90
  var itemJustChecked = idIndex === -1;
91
91
  var subItemsField = childrenField || consts_1.CHILDREN_FIELD;
@@ -103,13 +103,13 @@ function handleTreeViewCheckChange(event, check, data, settings, childrenField)
103
103
  checkParents(event.itemHierarchicalIndex, itemJustChecked, idField, subItemsField, newIds, data);
104
104
  }
105
105
  }
106
- return misc_1.isArray(check) ? newIds : Object.assign({}, check, { ids: newIds });
106
+ return (0, misc_1.isArray)(check) ? newIds : Object.assign({}, check, { ids: newIds });
107
107
  }
108
108
  exports.handleTreeViewCheckChange = handleTreeViewCheckChange;
109
109
  function parseOperation(operation) {
110
110
  var ids;
111
111
  var idField = undefined;
112
- if (misc_1.isArray(operation)) {
112
+ if ((0, misc_1.isArray)(operation)) {
113
113
  ids = operation;
114
114
  }
115
115
  else {
@@ -119,7 +119,7 @@ function parseOperation(operation) {
119
119
  return { ids: ids, idField: idField };
120
120
  }
121
121
  function checkChildren(item, itemHierarchicalIndex, itemJustChecked, idField, childrenField, ids) {
122
- itemUtils_1.getAllDirectIndirectChildrenIds(item, itemHierarchicalIndex, childrenField, idField).forEach(function (itemId) {
122
+ (0, itemUtils_1.getAllDirectIndirectChildrenIds)(item, itemHierarchicalIndex, childrenField, idField).forEach(function (itemId) {
123
123
  if (itemJustChecked && ids.indexOf(itemId) === -1) {
124
124
  ids.push(itemId);
125
125
  }
@@ -138,7 +138,7 @@ function checkParents(itemHierarchicalIndex, itemJustChecked, idField, childrenF
138
138
  var _a = result.value, id = _a.id, item = _a.item;
139
139
  // The first check is needed. However, it is not sure whether to stop the entire loop.
140
140
  if (ids.indexOf(id) === -1 &&
141
- itemUtils_1.areAllDirectChildrenChecked(item, id, idField, childrenField, ids)) {
141
+ (0, itemUtils_1.areAllDirectChildrenChecked)(item, id, idField, childrenField, ids)) {
142
142
  ids.push(id);
143
143
  result = it.next();
144
144
  }
@@ -169,12 +169,12 @@ function checkParents(itemHierarchicalIndex, itemJustChecked, idField, childrenF
169
169
  switch (_a.label) {
170
170
  case 0:
171
171
  if (!idField) return [3 /*break*/, 5];
172
- parents = itemUtils_1.getAllParents(itemHierarchicalIndex, childrenField, data);
172
+ parents = (0, itemUtils_1.getAllParents)(itemHierarchicalIndex, childrenField, data);
173
173
  i = parents.length - 1;
174
174
  _a.label = 1;
175
175
  case 1:
176
176
  if (!(i > -1)) return [3 /*break*/, 4];
177
- return [4 /*yield*/, { id: misc_1.getNestedValue(idField, parents[i]), item: itemJustChecked ? parents[i] : undefined }];
177
+ return [4 /*yield*/, { id: (0, misc_1.getNestedValue)(idField, parents[i]), item: itemJustChecked ? parents[i] : undefined }];
178
178
  case 2:
179
179
  _a.sent();
180
180
  _a.label = 3;
@@ -183,14 +183,14 @@ function checkParents(itemHierarchicalIndex, itemJustChecked, idField, childrenF
183
183
  return [3 /*break*/, 1];
184
184
  case 4: return [3 /*break*/, 8];
185
185
  case 5:
186
- parentId = itemIdUtils_1.getDirectParentId(itemHierarchicalIndex);
186
+ parentId = (0, itemIdUtils_1.getDirectParentId)(itemHierarchicalIndex);
187
187
  _a.label = 6;
188
188
  case 6:
189
189
  if (!parentId) return [3 /*break*/, 8];
190
- return [4 /*yield*/, { id: parentId, item: itemJustChecked ? itemIdUtils_1.getItemById(parentId, data, childrenField) : undefined }];
190
+ return [4 /*yield*/, { id: parentId, item: itemJustChecked ? (0, itemIdUtils_1.getItemById)(parentId, data, childrenField) : undefined }];
191
191
  case 7:
192
192
  _a.sent();
193
- parentId = itemIdUtils_1.getDirectParentId(parentId);
193
+ parentId = (0, itemIdUtils_1.getDirectParentId)(parentId);
194
194
  return [3 /*break*/, 6];
195
195
  case 8: return [2 /*return*/];
196
196
  }
@@ -104,6 +104,6 @@
104
104
  * ```
105
105
  */
106
106
  export declare function moveTreeViewItem(sourceItemHierarchicalIndex: string, sourceData: any[] | null | undefined, operation: 'before' | 'after' | 'child', targetItemHierarchicalIndex: string, targetData?: any[] | null, childrenField?: string): any[] | {
107
- sourceData: any[];
107
+ sourceData: any[] | null | undefined;
108
108
  targetData: any[];
109
- };
109
+ } | null | undefined;
@@ -114,7 +114,7 @@ function moveTreeViewItem(sourceItemHierarchicalIndex, sourceData, operation, ta
114
114
  if (!validateInput()) {
115
115
  return prepareInputDataForReturn();
116
116
  }
117
- var sourceItem = itemIdUtils_1.getItemById(sourceItemHierarchicalIndex, sourceData, subItemsField);
117
+ var sourceItem = (0, itemIdUtils_1.getItemById)(sourceItemHierarchicalIndex, sourceData, subItemsField);
118
118
  if (!sourceItem) {
119
119
  return prepareInputDataForReturn();
120
120
  }
@@ -123,22 +123,22 @@ function moveTreeViewItem(sourceItemHierarchicalIndex, sourceData, operation, ta
123
123
  if (!validateNoCircularReference()) {
124
124
  return prepareInputDataForReturn();
125
125
  }
126
- var updatedSourceData = itemUtils_1.removeItem(sourceItemHierarchicalIndex, subItemsField, sourceData);
127
- var resultData = itemUtils_1.addItem(sourceItem, operation, subItemsField, itemIdUtils_1.getDecrementedItemIdAfterRemoval(sourceItemHierarchicalIndex, targetItemHierarchicalIndex), updatedSourceData);
126
+ var updatedSourceData = (0, itemUtils_1.removeItem)(sourceItemHierarchicalIndex, subItemsField, sourceData);
127
+ var resultData = (0, itemUtils_1.addItem)(sourceItem, operation, subItemsField, (0, itemIdUtils_1.getDecrementedItemIdAfterRemoval)(sourceItemHierarchicalIndex, targetItemHierarchicalIndex), updatedSourceData);
128
128
  // A simpler output is explicitly returned when the source and the target tree are
129
129
  // the same, that is, the targetData argument is skipped.
130
130
  return targetData ? { sourceData: resultData, targetData: resultData } : resultData;
131
131
  }
132
132
  else {
133
- var updatedSource = itemUtils_1.removeItem(sourceItemHierarchicalIndex, subItemsField, sourceData);
134
- var updatedTarget = itemUtils_1.addItem(sourceItem, operation, subItemsField, targetItemHierarchicalIndex, targetData);
133
+ var updatedSource = (0, itemUtils_1.removeItem)(sourceItemHierarchicalIndex, subItemsField, sourceData);
134
+ var updatedTarget = (0, itemUtils_1.addItem)(sourceItem, operation, subItemsField, targetItemHierarchicalIndex, targetData);
135
135
  return { sourceData: updatedSource, targetData: updatedTarget };
136
136
  }
137
137
  function prepareInputDataForReturn() {
138
138
  return targetData ? { sourceData: sourceData, targetData: targetData } : sourceData;
139
139
  }
140
140
  function validateNoCircularReference() {
141
- return !(targetItemHierarchicalIndex + "_").startsWith(sourceItemHierarchicalIndex + "_");
141
+ return !"".concat(targetItemHierarchicalIndex, "_").startsWith("".concat(sourceItemHierarchicalIndex, "_"));
142
142
  }
143
143
  function validateInput() {
144
144
  if (!sourceData || !sourceData.length ||
@@ -151,7 +151,7 @@ function moveTreeViewItem(sourceItemHierarchicalIndex, sourceData, operation, ta
151
151
  }
152
152
  // Validate that the target item exists.
153
153
  var data = !targetData || targetData === sourceData ? sourceData : targetData;
154
- if (!itemIdUtils_1.getItemById(targetItemHierarchicalIndex, data, subItemsField)) {
154
+ if (!(0, itemIdUtils_1.getItemById)(targetItemHierarchicalIndex, data, subItemsField)) {
155
155
  return false;
156
156
  }
157
157
  return true;
@@ -8,7 +8,7 @@ exports.packageMetadata = {
8
8
  name: '@progress/kendo-react-treeview',
9
9
  productName: 'KendoReact',
10
10
  productCodes: ['KENDOUIREACT', 'KENDOUICOMPLETE'],
11
- publishDate: 1653648152,
11
+ publishDate: 1654509058,
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
  };
@@ -85,7 +85,7 @@ exports.processTreeViewItems = processTreeViewItems;
85
85
  function handleOperation(items, defaultField, operation, cloneField, childrenField) {
86
86
  if (operation) {
87
87
  var _a = parseOperation(operation, defaultField), ids = _a.ids, field = _a.field;
88
- var indices = !misc_1.isArray(operation) && operation.idField ? itemUtils_1.resolveItemsIds(ids, operation.idField, items, childrenField) : ids;
88
+ var indices = !(0, misc_1.isArray)(operation) && operation.idField ? (0, itemUtils_1.resolveItemsIds)(ids, operation.idField, items, childrenField) : ids;
89
89
  return raiseFlags(items, indices, field, cloneField, childrenField);
90
90
  }
91
91
  else {
@@ -95,7 +95,7 @@ function handleOperation(items, defaultField, operation, cloneField, childrenFie
95
95
  function parseOperation(operation, defaultField) {
96
96
  var ids;
97
97
  var field;
98
- if (misc_1.isArray(operation)) {
98
+ if ((0, misc_1.isArray)(operation)) {
99
99
  ids = operation;
100
100
  field = defaultField;
101
101
  }
@@ -108,7 +108,7 @@ function parseOperation(operation, defaultField) {
108
108
  function raiseFlags(items, indices, field, cloneField, childrenField) {
109
109
  var result = items;
110
110
  indices.forEach(function (itemIndex) {
111
- result = itemUtils_1.updateItem(result, itemIndex, function (item) { return raiseNestedFlag(field, item); }, cloneField, childrenField);
111
+ result = (0, itemUtils_1.updateItem)(result, itemIndex, function (item) { return raiseNestedFlag(field, item); }, cloneField, childrenField);
112
112
  });
113
113
  return result;
114
114
  }
@@ -130,14 +130,14 @@ function raiseNestedFlag(fieldName, dataItem) {
130
130
  }
131
131
  }
132
132
  function applyCheckIndeterminate(items, childrenField, check) {
133
- if (check && !misc_1.isArray(check) && check.applyCheckIndeterminate) {
133
+ if (check && !(0, misc_1.isArray)(check) && check.applyCheckIndeterminate) {
134
134
  var checkField = parseOperation(check, consts_1.CHECK_FIELD).field;
135
135
  var checkIndeterminateField = check.checkIndeterminateField || consts_1.CHECK_INDETERMINATE_FIELD;
136
136
  for (var i = 0; i < items.length; i++) {
137
137
  var item = items[i];
138
138
  var subItems = item[childrenField];
139
139
  if (subItems) {
140
- applyCheckIndeterminateHelper(subItems, misc_1.getNestedValue(checkField, item) ? [] : [item], childrenField, checkField, checkIndeterminateField);
140
+ applyCheckIndeterminateHelper(subItems, (0, misc_1.getNestedValue)(checkField, item) ? [] : [item], childrenField, checkField, checkIndeterminateField);
141
141
  }
142
142
  }
143
143
  }
@@ -148,7 +148,7 @@ function applyCheckIndeterminateHelper(data, parents, childrenField, checkField,
148
148
  var parentsAlreadyUpdated = false;
149
149
  for (var i = 0; i < data.length; i++) {
150
150
  var item = data[i];
151
- if (misc_1.getNestedValue(checkField, item)) {
151
+ if ((0, misc_1.getNestedValue)(checkField, item)) {
152
152
  if (!parentsAlreadyUpdated) {
153
153
  for (var j = 0; j < parents.length; j++) {
154
154
  raiseNestedFlag(checkIndeterminateField, parents[j]);
@@ -17,32 +17,32 @@ var FieldsService = /** @class */ (function () {
17
17
  this.focusIdField = treeViewProps.focusIdField;
18
18
  }
19
19
  FieldsService.prototype.expanded = function (item) {
20
- return misc_1.getNestedValue(this.expandField, item);
20
+ return (0, misc_1.getNestedValue)(this.expandField, item);
21
21
  };
22
22
  FieldsService.prototype.selected = function (item) {
23
- return misc_1.getNestedValue(this.selectField, item);
23
+ return (0, misc_1.getNestedValue)(this.selectField, item);
24
24
  };
25
25
  FieldsService.prototype.text = function (item) {
26
- return misc_1.getNestedValue(this.textField, item);
26
+ return (0, misc_1.getNestedValue)(this.textField, item);
27
27
  };
28
28
  FieldsService.prototype.disabled = function (item) {
29
- return misc_1.getNestedValue(this.disableField, item);
29
+ return (0, misc_1.getNestedValue)(this.disableField, item);
30
30
  };
31
31
  FieldsService.prototype.hasChildren = function (item) {
32
- return misc_1.getNestedValue(this.hasChildrenField, item);
32
+ return (0, misc_1.getNestedValue)(this.hasChildrenField, item);
33
33
  };
34
34
  FieldsService.prototype.children = function (item) {
35
- var children = misc_1.getNestedValue(this.childrenField, item);
35
+ var children = (0, misc_1.getNestedValue)(this.childrenField, item);
36
36
  return children ? children : [];
37
37
  };
38
38
  FieldsService.prototype.checked = function (item) {
39
- return misc_1.getNestedValue(this.checkField, item);
39
+ return (0, misc_1.getNestedValue)(this.checkField, item);
40
40
  };
41
41
  FieldsService.prototype.checkIndeterminate = function (item) {
42
- return misc_1.getNestedValue(this.checkIndeterminateField, item);
42
+ return (0, misc_1.getNestedValue)(this.checkIndeterminateField, item);
43
43
  };
44
44
  FieldsService.prototype.focusId = function (item) {
45
- return this.focusIdField && misc_1.getNestedValue(this.focusIdField, item);
45
+ return this.focusIdField && (0, misc_1.getNestedValue)(this.focusIdField, item);
46
46
  };
47
47
  FieldsService.prototype.getChildrenField = function () {
48
48
  return this.childrenField;