@progress/kendo-react-dropdowns 8.2.1-develop.5 → 8.3.0-develop.2

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.
@@ -36,18 +36,18 @@ const { sizeMap: D, roundedMap: yt } = st, bt = "Please enter a valid value!", $
36
36
  }, this._element = null, this._valueItemsDuringOnChange = null, this.base = new F(this), this._tags = [], this._input = null, this._adaptiveInput = null, this._skipFocusEvent = !1, this._lastSelectedOrDeslectedItemIndex = null, this.itemHeight = 0, this.scrollToFocused = !1, this.localization = null, this.focus = () => {
37
37
  this._input && this._input.focus();
38
38
  }, this.handleItemSelect = (e, t) => {
39
- const { dataItemKey: o, virtual: s } = this.props, a = I(this.props), h = s ? s.skip : 0, c = a[e - h], d = this.value.findIndex((g) => E(g, c, o));
39
+ const { dataItemKey: o, virtual: s } = this.props, a = I(this.props), p = s ? s.skip : 0, c = a[e - p], r = this.value.findIndex((g) => E(g, c, o));
40
40
  this._lastSelectedOrDeslectedItemIndex = a.findIndex((g) => E(g, c, o));
41
41
  let i = [];
42
- d !== -1 ? (i = this.value, i.splice(d, 1)) : i = [...this.value, c], (this.props.filter !== void 0 ? this.props.filter : this.state.text) && !this.mobileMode && (this.state.text && (t.data.text = ""), this.base.filterChanged("", t)), this._adaptiveInput && this._adaptiveInput.blur(), this.state.focusedIndex !== void 0 && (t.data.focusedIndex = void 0), this.triggerOnChange(i, t), this.base.triggerPageChangeCornerItems(c, t);
42
+ r !== -1 ? (i = this.value, i.splice(r, 1)) : i = [...this.value, c], (this.props.filter !== void 0 ? this.props.filter : this.state.text) && !this.mobileMode && (this.state.text && (t.data.text = ""), this.base.filterChanged("", t)), this._adaptiveInput && this._adaptiveInput.blur(), this.state.focusedIndex !== void 0 && (t.data.focusedIndex = void 0), this.triggerOnChange(i, t), this.base.triggerPageChangeCornerItems(c, t);
43
43
  }, this.onTagDelete = (e, t) => {
44
44
  const o = this.base.initState();
45
45
  o.syntheticEvent = t, this.opened && this.base.togglePopup(o), !this.state.focused && !this.mobileMode && (o.data.focused = !0, this.focus());
46
46
  const s = this.value;
47
47
  w(s, e, this.props.dataItemKey), this.triggerOnChange(s, o), this.applyState(o);
48
48
  }, this.itemFocus = (e, t) => {
49
- const { allowCustom: o, virtual: s } = this.props, a = I(this.props), h = s ? s.skip : 0, c = this.props.filter !== void 0 ? this.props.filter : this.state.text, { focusedIndex: d } = this.getFocusedState(), i = o && c, l = a[e - h];
50
- l && d !== e ? this.state.focusedIndex !== e && (t.data.focusedIndex = e, t.data.activedescendant = k.PopupList) : i && e === -1 && this.state.focusedIndex !== void 0 && (t.data.focusedIndex = void 0), this.base.triggerPageChangeCornerItems(l, t);
49
+ const { allowCustom: o, virtual: s } = this.props, a = I(this.props), p = s ? s.skip : 0, c = this.props.filter !== void 0 ? this.props.filter : this.state.text, { focusedIndex: r } = this.getFocusedState(), i = o && c, d = a[e - p];
50
+ d && r !== e ? this.state.focusedIndex !== e && (t.data.focusedIndex = e, t.data.activedescendant = k.PopupList) : i && e === -1 && this.state.focusedIndex !== void 0 && (t.data.focusedIndex = void 0), this.base.triggerPageChangeCornerItems(d, t);
51
51
  }, this.componentRef = (e) => {
52
52
  this._element = e, this.base.wrapper = e;
53
53
  }, this.searchbarRef = (e) => {
@@ -62,11 +62,11 @@ const { sizeMap: D, roundedMap: yt } = st, bt = "Please enter a valid value!", $
62
62
  const o = this.props.filter !== void 0 ? this.props.filter : this.state.text;
63
63
  M(o) && o !== "" && this.base.filterChanged("", t), this.state.text && (t.data.text = ""), this._lastSelectedOrDeslectedItemIndex = null, this.applyState(t);
64
64
  }, this.onInputKeyDown = (e) => {
65
- const { textField: t, groupField: o } = this.props, s = I(this.props), a = e.keyCode, h = this.props.filter !== void 0 ? this.props.filter : this.state.text, c = this.props.opened !== void 0 ? this.props.opened : this.state.opened, { focusedItem: d, focusedIndex: i } = this.getFocusedState(), l = this.base.initState();
66
- if (l.syntheticEvent = e, !h && this.value.length > 0 && (a === u.left || a === u.right || a === u.home || a === u.end || a === u.delete || a === u.backspace) && !e.shiftKey)
67
- return this.onTagsNavigate(e, l);
65
+ const { textField: t, groupField: o } = this.props, s = I(this.props), a = e.keyCode, p = this.props.filter !== void 0 ? this.props.filter : this.state.text, c = this.props.opened !== void 0 ? this.props.opened : this.state.opened, { focusedItem: r, focusedIndex: i } = this.getFocusedState(), d = this.base.initState();
66
+ if (d.syntheticEvent = e, !p && this.value.length > 0 && (a === u.left || a === u.right || a === u.home || a === u.end || a === u.delete || a === u.backspace) && !e.shiftKey)
67
+ return this.onTagsNavigate(e, d);
68
68
  const g = () => {
69
- e.preventDefault(), this.base.togglePopup(l), this.applyState(l);
69
+ e.preventDefault(), this.base.togglePopup(d), this.applyState(d);
70
70
  };
71
71
  if (this.opened)
72
72
  if (a === u.pageUp)
@@ -74,75 +74,75 @@ const { sizeMap: D, roundedMap: yt } = st, bt = "Please enter a valid value!", $
74
74
  else if (a === u.pageDown)
75
75
  e.preventDefault(), this.base.scrollPopupByPageSize(1);
76
76
  else if ((e.ctrlKey || e.metaKey) && e.code === "KeyA") {
77
- const p = (this.state.value && this.state.value.length) === s.length ? [] : s;
78
- this.updateStateOnKeyboardNavigation(p, l);
77
+ const h = (this.state.value && this.state.value.length) === s.length ? [] : s;
78
+ this.updateStateOnKeyboardNavigation(h, d);
79
79
  } else if ((e.ctrlKey || e.metaKey) && e.shiftKey && e.keyCode === u.end) {
80
- const r = s.slice(this.getFocusedState().focusedIndex);
81
- this.itemFocus(s.length - 1, l), this.updateStateOnKeyboardNavigation(r, l);
80
+ const l = s.slice(this.getFocusedState().focusedIndex);
81
+ this.itemFocus(s.length - 1, d), this.updateStateOnKeyboardNavigation(l, d);
82
82
  } else if ((e.ctrlKey || e.metaKey) && e.shiftKey && e.keyCode === u.home) {
83
- const r = s.slice(0, this.getFocusedState().focusedIndex + 1);
84
- this.itemFocus(0, l), this.updateStateOnKeyboardNavigation(r, l);
83
+ const l = s.slice(0, this.getFocusedState().focusedIndex + 1);
84
+ this.itemFocus(0, d), this.updateStateOnKeyboardNavigation(l, d);
85
85
  } else if (e.shiftKey && e.keyCode === u.up) {
86
- let r;
87
- const p = this.getLastSelectedOrDeselectedIndex(1, i);
88
- p === null ? r = i !== 0 ? s.slice(i - 1, i) : [s[i]] : p === i ? r = [s[p - 1]] : i >= 0 && (r = p > i ? s.slice(i - 1, p) : s.slice(p - 1, i)), r && r.length > 0 && (i >= 1 && this.itemFocus(i - 1, l), this.updateStateOnKeyboardNavigation(r, l));
86
+ let l;
87
+ const h = this.getLastSelectedOrDeselectedIndex(1, i);
88
+ h === null ? l = i !== 0 ? s.slice(i - 1, i) : [s[i]] : h === i ? l = [s[h - 1]] : i >= 0 && (l = h > i ? s.slice(i - 1, h) : s.slice(h - 1, i)), l && l.length > 0 && (i >= 1 && this.itemFocus(i - 1, d), this.updateStateOnKeyboardNavigation(l, d));
89
89
  } else if (e.shiftKey && e.keyCode === u.down) {
90
- let r;
91
- const p = this.getLastSelectedOrDeselectedIndex(0, i);
92
- p === null ? r = i !== s.length - 1 ? s.slice(i, i + 1) : [s[i]] : p === i ? r = s.slice(i, i + 2) : i >= 0 && (r = p > i ? s.slice(i + 1, p + 1) : s.slice(p, i + 2)), r && r.length >= 1 && (this.itemFocus(i + 1, l), this.updateStateOnKeyboardNavigation(r, l));
90
+ let l;
91
+ const h = this.getLastSelectedOrDeselectedIndex(0, i);
92
+ h === null ? l = i !== s.length - 1 ? s.slice(i, i + 1) : [s[i]] : h === i ? l = s.slice(i, i + 2) : i >= 0 && (l = h > i ? s.slice(i + 1, h + 1) : s.slice(h, i + 2)), l && l.length >= 1 && (this.itemFocus(i + 1, d), this.updateStateOnKeyboardNavigation(l, d));
93
93
  } else if (e.altKey && a === u.up)
94
94
  g();
95
95
  else if (a === u.up || a === u.down) {
96
96
  if (o !== "" && t)
97
97
  if (!this.props.skipDisabledItems && c)
98
- this.onNavigate(l, a);
98
+ this.onNavigate(d, a);
99
99
  else {
100
- let r = 0;
100
+ let l = 0;
101
101
  if (a === u.down || a === u.right) {
102
- const p = s.slice(i + 1).find((v) => !v.disabled && v[t]);
103
- r = p && s.findIndex((v) => v[t] === p[t]);
102
+ const h = s.slice(i + 1).find((v) => !v.disabled && v[t]);
103
+ l = h && s.findIndex((v) => v[t] === h[t]);
104
104
  } else if (a === u.up || a === u.left) {
105
- let p;
105
+ let h;
106
106
  if (i === -1)
107
- p = s, r = s.findIndex((v) => !v.disabled && v[t]);
107
+ h = s, l = s.findIndex((v) => !v.disabled && v[t]);
108
108
  else {
109
- p = s.slice(0, i);
110
- let v = p.pop();
109
+ h = s.slice(0, i);
110
+ let v = h.pop();
111
111
  for (; v && v.disabled; )
112
- v = p.pop();
113
- r = v && s.findIndex((S) => S[t] === v[t]);
112
+ v = h.pop();
113
+ l = v && s.findIndex((S) => S[t] === v[t]);
114
114
  }
115
115
  }
116
- if (r) {
117
- const p = r - i;
118
- this.onNavigate(l, a, p);
116
+ if (l) {
117
+ const h = l - i;
118
+ this.onNavigate(d, a, h);
119
119
  } else
120
- r !== void 0 && this.onNavigate(l, a);
120
+ l !== void 0 && this.onNavigate(d, a);
121
121
  }
122
122
  else if (!this.props.skipDisabledItems && c)
123
- this.onNavigate(l, a);
123
+ this.onNavigate(d, a);
124
124
  else {
125
- let r = null;
125
+ let l = null;
126
126
  if (a === u.down || a === u.right)
127
- r = s.slice(i + 1).find((p) => !p.disabled);
127
+ l = s.slice(i + 1).find((h) => !h.disabled);
128
128
  else if (a === u.up || a === u.left) {
129
- const p = s.slice(0, i);
130
- for (r = p.pop(); r && r.disabled; )
131
- r = p.pop();
129
+ const h = s.slice(0, i);
130
+ for (l = h.pop(); l && l.disabled; )
131
+ l = h.pop();
132
132
  }
133
- if (r) {
134
- const p = r.id - i - 1;
135
- this.onNavigate(l, a, p);
133
+ if (l) {
134
+ const h = l.id - i - 1;
135
+ this.onNavigate(d, a, h);
136
136
  } else
137
- this.onNavigate(l, a);
137
+ this.onNavigate(d, a);
138
138
  }
139
- this.applyState(l), e.preventDefault();
139
+ this.applyState(d), e.preventDefault();
140
140
  } else
141
- a === u.enter ? (e.preventDefault(), this.props.allowCustom && h && d === null ? this.customItemSelect(e) : d && d.disabled ? g() : this.selectFocusedItem(e)) : a === u.esc && g();
141
+ a === u.enter ? (e.preventDefault(), this.props.allowCustom && p && r === null ? this.customItemSelect(e) : r && r.disabled ? g() : this.selectFocusedItem(e)) : a === u.esc && g();
142
142
  else
143
143
  e.altKey && a === u.down ? g() : a === u.esc && this.clearButtonClick(e);
144
144
  }, this.listContainerContent = () => {
145
- const { header: e, footer: t, allowCustom: o, size: s, groupStickyHeaderItemRender: a, groupField: h, list: c } = this.props, d = I(this.props), i = this.props.filter !== void 0 ? this.props.filter : this.state.text, { focusedType: l } = this.getFocusedState(), g = o && i && /* @__PURE__ */ f.createElement(
145
+ const { header: e, footer: t, allowCustom: o, size: s, groupStickyHeaderItemRender: a, groupField: p, list: c } = this.props, r = I(this.props), i = this.props.filter !== void 0 ? this.props.filter : this.state.text, { focusedType: d } = this.getFocusedState(), g = o && i && /* @__PURE__ */ f.createElement(
146
146
  "div",
147
147
  {
148
148
  className: y("k-list", {
@@ -155,15 +155,15 @@ const { sizeMap: D, roundedMap: yt } = st, bt = "Please enter a valid value!", $
155
155
  /* @__PURE__ */ f.createElement(
156
156
  "div",
157
157
  {
158
- className: y("k-list-item k-custom-item", { "k-focus": q(l) }),
158
+ className: y("k-list-item k-custom-item", { "k-focus": q(d) }),
159
159
  style: { fontStyle: "italic" }
160
160
  },
161
161
  i,
162
162
  /* @__PURE__ */ f.createElement(R, { name: "plus", icon: it, style: { position: "absolute", right: "0.5em" } })
163
163
  )
164
164
  );
165
- let { group: r } = this.state;
166
- return r === void 0 && h !== void 0 && (r = O(d[0], h)), /* @__PURE__ */ f.createElement(f.Fragment, null, e && /* @__PURE__ */ f.createElement("div", { className: "k-list-header" }, e), g, /* @__PURE__ */ f.createElement(
165
+ let { group: l } = this.state;
166
+ return l === void 0 && p !== void 0 && (l = O(r[0], p)), /* @__PURE__ */ f.createElement(f.Fragment, null, e && /* @__PURE__ */ f.createElement("div", { className: "k-list-header" }, e), g, /* @__PURE__ */ f.createElement(
167
167
  "div",
168
168
  {
169
169
  className: y(
@@ -174,11 +174,11 @@ const { sizeMap: D, roundedMap: yt } = st, bt = "Please enter a valid value!", $
174
174
  }
175
175
  )
176
176
  },
177
- !c && r && d.length !== 0 && /* @__PURE__ */ f.createElement(lt, { group: r, groupMode: "modern", render: a }),
177
+ !c && l && r.length !== 0 && /* @__PURE__ */ f.createElement(lt, { group: l, groupMode: "modern", render: a }),
178
178
  this.renderList()
179
179
  ), t && /* @__PURE__ */ f.createElement("div", { className: "k-list-footer" }, t));
180
180
  }, this.renderListContainer = () => {
181
- const e = this.base, { dir: t } = this.props, o = I(this.props), s = this.base.getPopupSettings(), a = s.width !== void 0 ? s.width : e.popupWidth, h = {
181
+ const e = this.base, { dir: t } = this.props, o = I(this.props), s = this.base.getPopupSettings(), a = s.width !== void 0 ? s.width : e.popupWidth, p = {
182
182
  dir: t !== void 0 ? t : e.dirCalculated,
183
183
  width: a,
184
184
  popupSettings: {
@@ -195,15 +195,15 @@ const { sizeMap: D, roundedMap: yt } = st, bt = "Please enter a valid value!", $
195
195
  },
196
196
  itemsCount: [o.length, this.value.length]
197
197
  };
198
- return /* @__PURE__ */ f.createElement(at, { ...h }, this.listContainerContent());
198
+ return /* @__PURE__ */ f.createElement(at, { ...p }, this.listContainerContent());
199
199
  }, this.renderAdaptiveListContainer = () => {
200
200
  const { adaptiveTitle: e, filterable: t, filter: o } = this.props, { windowWidth: s = 0 } = this.state, a = o !== void 0 ? o : this.state.text;
201
201
  this.localization = vt(this);
202
- const h = t ? /* @__PURE__ */ f.createElement(
202
+ const p = t ? /* @__PURE__ */ f.createElement(
203
203
  It,
204
204
  {
205
205
  value: a,
206
- ref: (d) => this._adaptiveInput = d && d.element,
206
+ ref: (r) => this._adaptiveInput = r && r.element,
207
207
  onChange: this.onChangeHandler,
208
208
  onKeyDown: this.onInputKeyDown,
209
209
  size: this.props.size,
@@ -213,9 +213,9 @@ const { sizeMap: D, roundedMap: yt } = st, bt = "Please enter a valid value!", $
213
213
  ) : null, c = {
214
214
  adaptiveTitle: e,
215
215
  expand: this.opened,
216
- onClose: (d) => this.onCancel(d),
216
+ onClose: (r) => this.onCancel(r),
217
217
  windowWidth: s,
218
- mobileFilter: h,
218
+ mobileFilter: p,
219
219
  footer: {
220
220
  cancelText: this.localization.toLanguageString(z, V[z]),
221
221
  onCancel: this.onCancel,
@@ -241,29 +241,29 @@ const { sizeMap: D, roundedMap: yt } = st, bt = "Please enter a valid value!", $
241
241
  itemRender: o,
242
242
  groupHeaderItemRender: s,
243
243
  dataItemKey: a,
244
- virtual: h = { skip: 0, total: void 0 }
245
- } = this.props, c = I(this.props), d = this.base.vs, { focusedIndex: i } = this.getFocusedState(), l = this.base.getPopupSettings(), g = `translateY(${d.translate}px)`;
244
+ virtual: p = { skip: 0, total: void 0 }
245
+ } = this.props, c = I(this.props), r = this.base.vs, { focusedIndex: i } = this.getFocusedState(), d = this.base.getPopupSettings(), g = `translateY(${r.translate}px)`;
246
246
  return /* @__PURE__ */ f.createElement(
247
247
  nt,
248
248
  {
249
249
  id: this.base.listBoxId,
250
250
  show: this.opened,
251
251
  data: c.slice(),
252
- focusedIndex: i - h.skip,
252
+ focusedIndex: i - p.skip,
253
253
  value: this.value,
254
254
  textField: e,
255
255
  valueField: a,
256
256
  optionsGuid: this.base.guid,
257
257
  groupField: this.props.groupField,
258
258
  groupMode: "modern",
259
- listRef: (r) => {
260
- d.list = this.base.list = r;
259
+ listRef: (l) => {
260
+ r.list = this.base.list = l;
261
261
  },
262
- wrapperStyle: this.mobileMode ? {} : { maxHeight: l.height },
262
+ wrapperStyle: this.mobileMode ? {} : { maxHeight: d.height },
263
263
  wrapperCssClass: "k-list-content",
264
- listStyle: d.enabled ? { transform: g } : void 0,
264
+ listStyle: r.enabled ? { transform: g } : void 0,
265
265
  key: "listKey",
266
- skip: h.skip,
266
+ skip: p.skip,
267
267
  onClick: this.handleItemClick,
268
268
  itemRender: o,
269
269
  groupHeaderItemRender: s,
@@ -271,9 +271,9 @@ const { sizeMap: D, roundedMap: yt } = st, bt = "Please enter a valid value!", $
271
271
  onMouseDown: $,
272
272
  onBlur: this.handleBlur,
273
273
  onScroll: this.onScroll,
274
- wrapperRef: d.scrollerRef,
274
+ wrapperRef: r.scrollerRef,
275
275
  scroller: this.base.renderScrollElement(),
276
- ariaSetSize: h.total
276
+ ariaSetSize: p.total
277
277
  }
278
278
  );
279
279
  }, this.onScroll = (e) => {
@@ -282,11 +282,11 @@ const { sizeMap: D, roundedMap: yt } = st, bt = "Please enter a valid value!", $
282
282
  const { groupField: s } = this.props;
283
283
  let a = I(this.props);
284
284
  if (!(!s || !a.length) && s) {
285
- const h = this.itemHeight = this.itemHeight || (t.enabled ? t.itemHeight : o ? o.children[0].offsetHeight : 0), d = e.target.scrollTop - t.skip * h;
285
+ const p = this.itemHeight = this.itemHeight || (t.enabled ? t.itemHeight : o ? o.children[0].offsetHeight : 0), r = e.target.scrollTop - t.skip * p;
286
286
  a = this.base.getGroupedDataModernMode(a, s);
287
287
  let i = a[0][s];
288
- for (let l = 1; l < a.length && !(h * l > d); l++)
289
- a[l] && a[l][s] && (i = a[l][s]);
288
+ for (let d = 1; d < a.length && !(p * d > r); d++)
289
+ a[d] && a[d][s] && (i = a[d][s]);
290
290
  i !== this.state.group && this.setState({
291
291
  group: i
292
292
  });
@@ -299,8 +299,8 @@ const { sizeMap: D, roundedMap: yt } = st, bt = "Please enter a valid value!", $
299
299
  s.syntheticEvent = e;
300
300
  const a = o ? { [o]: t } : t;
301
301
  this.state.text !== void 0 && (s.data.text = ""), s.data.focusedIndex = void 0, this.base.filterChanged("", s);
302
- const h = [...this.value, a];
303
- this.triggerOnChange(h, s), this.base.togglePopup(s), this.applyState(s);
302
+ const p = [...this.value, a];
303
+ this.triggerOnChange(p, s), this.base.togglePopup(s), this.applyState(s);
304
304
  }, this.handleWrapperClick = (e) => {
305
305
  const t = this._input;
306
306
  !this.opened && t && this.focusElement(t);
@@ -390,12 +390,12 @@ const { sizeMap: D, roundedMap: yt } = st, bt = "Please enter a valid value!", $
390
390
  /** @hidden */
391
391
  componentDidUpdate(n, e) {
392
392
  var g;
393
- const { virtual: t, groupField: o = "" } = this.props, s = I(this.props), a = t ? t.skip : 0, h = n.virtual ? n.virtual.total : 0, c = n.opened !== void 0 ? n.opened : e.opened, d = !c && this.opened, i = c && !this.opened, l = this.base.getPopupSettings();
394
- if (this.base.didUpdate(), !l.animate && i && this.onPopupClosed(), t && t.total !== h)
393
+ const { virtual: t, groupField: o = "" } = this.props, s = I(this.props), a = t ? t.skip : 0, p = n.virtual ? n.virtual.total : 0, c = n.opened !== void 0 ? n.opened : e.opened, r = !c && this.opened, i = c && !this.opened, d = this.base.getPopupSettings();
394
+ if (this.base.didUpdate(), !d.animate && i && this.onPopupClosed(), t && t.total !== p)
395
395
  this.base.vs.calcScrollElementHeight(), this.base.vs.reset();
396
396
  else {
397
- let { focusedItem: r, focusedIndex: p } = this.getFocusedState();
398
- o !== "" && (p = (g = this.base.getGroupedDataModernMode(s, o)) == null ? void 0 : g.indexOf(r)), d && t ? this.base.scrollToVirtualItem(t, p - a) : d && !t ? (s && s.length !== 0 && this.base.resetGroupStickyHeader(s[0][o], this), this.base.scrollToItem(p)) : this.opened && c && r && this.scrollToFocused && this.base.scrollToItem(p - a);
397
+ let { focusedItem: l, focusedIndex: h } = this.getFocusedState();
398
+ o !== "" && (h = (g = this.base.getGroupedDataModernMode(s, o)) == null ? void 0 : g.indexOf(l)), r && t ? this.base.scrollToVirtualItem(t, h - a) : r && !t ? (s && s.length !== 0 && this.base.resetGroupStickyHeader(s[0][o], this), this.base.scrollToItem(h)) : this.opened && c && l && this.scrollToFocused && this.base.scrollToItem(h - a);
399
399
  }
400
400
  this.scrollToFocused = !1, this.setValidity();
401
401
  }
@@ -411,18 +411,18 @@ const { sizeMap: D, roundedMap: yt } = st, bt = "Please enter a valid value!", $
411
411
  }
412
412
  /** @hidden */
413
413
  onNavigate(n, e, t) {
414
- const { allowCustom: o } = this.props, s = I(this.props), a = this.props.filter !== void 0 ? this.props.filter : this.state.text, { focusedType: h, focusedIndex: c } = this.getFocusedState(), d = o && a, i = q(h), l = this.base, g = l.vs;
414
+ const { allowCustom: o } = this.props, s = I(this.props), a = this.props.filter !== void 0 ? this.props.filter : this.state.text, { focusedType: p, focusedIndex: c } = this.getFocusedState(), r = o && a, i = q(p), d = this.base, g = d.vs;
415
415
  if (this.opened && e === u.up && i)
416
416
  this.state.focusedIndex !== void 0 && (n.data.focusedIndex = void 0);
417
417
  else {
418
- const r = l.navigation.navigate({
418
+ const l = d.navigation.navigate({
419
419
  keyCode: e,
420
420
  current: c,
421
421
  max: (g.enabled ? g.total : s.length) - 1,
422
- min: d ? -1 : 0,
422
+ min: r ? -1 : 0,
423
423
  skipItems: t || void 0
424
424
  });
425
- r !== void 0 && (this.itemFocus(r, n), this.scrollToFocused = !0);
425
+ l !== void 0 && (this.itemFocus(l, n), this.scrollToFocused = !0);
426
426
  }
427
427
  this.applyState(n);
428
428
  }
@@ -435,25 +435,25 @@ const { sizeMap: D, roundedMap: yt } = st, bt = "Please enter a valid value!", $
435
435
  dir: o,
436
436
  disabled: s,
437
437
  textField: a,
438
- dataItemKey: h,
438
+ dataItemKey: p,
439
439
  virtual: c,
440
- size: d,
440
+ size: r,
441
441
  rounded: i,
442
- fillMode: l,
442
+ fillMode: d,
443
443
  loading: g,
444
- filter: r
445
- } = this.props, { text: p, focused: v, focusedTag: S, currentValue: W } = this.state, C = this.base.vs, _ = this.props.id || this._inputId;
444
+ filter: l
445
+ } = this.props, { text: h, focused: v, focusedTag: S, currentValue: W } = this.state, C = this.base.vs, _ = this.props.id || this._inputId;
446
446
  C.enabled = c !== void 0, c !== void 0 && (C.skip = c.skip, C.total = c.total, C.pageSize = c.pageSize);
447
447
  const x = this.mobileMode && this.opened ? W : this.tagsToRender;
448
448
  this.setItems(this.tagsToRender, this._tags);
449
- const K = !this.validityStyles || this.validity.valid, G = !!(r !== void 0 ? r : p) || x && x.length > 0, [U, Y] = A(this.props.prefix || f.Fragment), [j, J] = A(this.props.suffix || f.Fragment), N = /* @__PURE__ */ f.createElement(f.Fragment, null, /* @__PURE__ */ f.createElement(
449
+ const K = !this.validityStyles || this.validity.valid, G = !!(l !== void 0 ? l : h) || x && x.length > 0, [U, Y] = A(this.props.prefix || f.Fragment), [j, J] = A(this.props.suffix || f.Fragment), N = /* @__PURE__ */ f.createElement(f.Fragment, null, /* @__PURE__ */ f.createElement(
450
450
  "div",
451
451
  {
452
452
  ref: this.componentRef,
453
453
  className: y("k-multiselect k-input", e, {
454
- [`k-input-${D[d] || d}`]: d,
454
+ [`k-input-${D[r] || r}`]: r,
455
455
  [`k-rounded-${yt[i] || i}`]: i,
456
- [`k-input-${l}`]: l,
456
+ [`k-input-${d}`]: d,
457
457
  "k-focus": v && !s,
458
458
  "k-invalid": !K,
459
459
  "k-disabled": s,
@@ -473,7 +473,7 @@ const { sizeMap: D, roundedMap: yt } = st, bt = "Please enter a valid value!", $
473
473
  {
474
474
  className: y(
475
475
  "k-chip-list",
476
- { [`k-chip-list-${D[d] || d}`]: d }
476
+ { [`k-chip-list-${D[r] || r}`]: r }
477
477
  ),
478
478
  role: "listbox",
479
479
  id: "tagslist-" + this.base.guid
@@ -485,8 +485,8 @@ const { sizeMap: D, roundedMap: yt } = st, bt = "Please enter a valid value!", $
485
485
  onTagDelete: this.onTagDelete,
486
486
  data: x,
487
487
  guid: this.base.guid,
488
- focused: S ? x.find((Q) => B(Q, S, h)) : void 0,
489
- size: d
488
+ focused: S ? x.find((Q) => B(Q, S, p)) : void 0,
489
+ size: r
490
490
  }
491
491
  )
492
492
  ), this.renderSearchBar(_)),
@@ -500,7 +500,7 @@ const { sizeMap: D, roundedMap: yt } = st, bt = "Please enter a valid value!", $
500
500
  {
501
501
  label: t,
502
502
  editorId: _,
503
- editorValue: p || O(this.value[0], a),
503
+ editorValue: h || O(this.value[0], a),
504
504
  editorValid: K,
505
505
  editorDisabled: s,
506
506
  style: { width: n ? n.width : void 0 },
@@ -509,16 +509,17 @@ const { sizeMap: D, roundedMap: yt } = st, bt = "Please enter a valid value!", $
509
509
  ) : N;
510
510
  }
511
511
  renderSearchBar(n) {
512
- const { activedescendant: e, focusedTag: t, currentValue: o } = this.state, { disabled: s, placeholder: a, ariaDescribedBy: h } = this.props, c = !this.mobileMode && (this.props.filter !== void 0 ? this.props.filter : this.state.text) || "", { focusedIndex: d } = this.getFocusedState(), i = this.value.length === 0 && !c ? a : void 0, l = o && o.length > 0 ? void 0 : a, g = e === k.TagsList && t !== void 0 ? `tag-${this.base.guid}-${t.text.replace(/\s+/g, "-")}` : `option-${this.base.guid}-${d}`;
512
+ const { activedescendant: e, focusedTag: t, currentValue: o } = this.state, { disabled: s, placeholder: a, ariaDescribedBy: p, ariaLabelledBy: c, ariaLabel: r } = this.props, i = !this.mobileMode && (this.props.filter !== void 0 ? this.props.filter : this.state.text) || "", { focusedIndex: d } = this.getFocusedState(), g = this.value.length === 0 && !i ? a : void 0, l = o && o.length > 0 ? void 0 : a, h = e === k.TagsList && t !== void 0 ? `tag-${this.base.guid}-${t.text.replace(/\s+/g, "-")}` : `option-${this.base.guid}-${d}`, v = {
513
+ accessKey: this.props.accessKey,
514
+ tabIndex: this.props.tabIndex
515
+ };
513
516
  return /* @__PURE__ */ f.createElement(
514
517
  rt,
515
518
  {
516
519
  id: n,
517
- size: Math.max((i || "").length, c.length, 1),
518
- tabIndex: this.props.tabIndex,
519
- accessKey: this.props.accessKey,
520
- placeholder: this.mobileMode && this.opened ? l : i,
521
- value: c,
520
+ size: Math.max((g || "").length, i.length, 1),
521
+ placeholder: this.mobileMode && this.opened ? l : g,
522
+ value: i,
522
523
  onChange: this.onChangeHandler,
523
524
  onKeyDown: this.onInputKeyDown,
524
525
  ref: this.searchbarRef,
@@ -526,37 +527,39 @@ const { sizeMap: D, roundedMap: yt } = st, bt = "Please enter a valid value!", $
526
527
  expanded: this.opened,
527
528
  owns: this.base.listBoxId,
528
529
  role: "combobox",
529
- activedescendant: g,
530
- ariaDescribedBy: `tagslist-${this.base.guid}${h ? " " + h : ""}`,
531
- ariaLabelledBy: this.props.ariaLabelledBy,
532
- ariaRequired: this.required
530
+ activedescendant: h,
531
+ ariaDescribedBy: `tagslist-${this.base.guid}${p ? " " + p : ""}`,
532
+ ariaLabelledBy: c,
533
+ ariaRequired: this.required,
534
+ ariaLabel: r,
535
+ ...v
533
536
  }
534
537
  );
535
538
  }
536
539
  onTagsNavigate(n, e) {
537
540
  const t = n.keyCode, { focusedTag: o } = this.state, s = this._tags, a = this.props.dataItemKey;
538
- let h = o ? s.findIndex((i) => B(i, o, a)) : -1, c;
539
- const d = h !== -1;
541
+ let p = o ? s.findIndex((i) => B(i, o, a)) : -1, c;
542
+ const r = p !== -1;
540
543
  if (t === u.left)
541
- d ? h = Math.max(0, h - 1) : h = s.length - 1, c = s[h];
544
+ r ? p = Math.max(0, p - 1) : p = s.length - 1, c = s[p];
542
545
  else if (t === u.right)
543
- h === s.length - 1 ? c = void 0 : d && (h = Math.min(s.length - 1, h + 1), c = s[h]);
546
+ p === s.length - 1 ? c = void 0 : r && (p = Math.min(s.length - 1, p + 1), c = s[p]);
544
547
  else if (t === u.home && !n.shiftKey)
545
548
  c = s[0];
546
549
  else if (t === u.end && !n.shiftKey)
547
550
  c = s[s.length - 1];
548
551
  else if (t === u.delete) {
549
- if (d) {
552
+ if (r) {
550
553
  const i = this.value;
551
- w(i, s[h].data, a), this.triggerOnChange(i, e);
554
+ w(i, s[p].data, a), this.triggerOnChange(i, e);
552
555
  }
553
556
  } else if (t === u.backspace) {
554
557
  const i = this.value;
555
- if (d)
556
- w(i, s[h].data, a), this.triggerOnChange(i, e);
557
- else if (!d && s.length) {
558
- const l = s.pop();
559
- w(i, l.data, a), this.triggerOnChange(i, e);
558
+ if (r)
559
+ w(i, s[p].data, a), this.triggerOnChange(i, e);
560
+ else if (!r && s.length) {
561
+ const d = s.pop();
562
+ w(i, d.data, a), this.triggerOnChange(i, e);
560
563
  }
561
564
  }
562
565
  c !== o && (e.data.focusedTag = c, e.data.activedescendant = k.TagsList), this.applyState(e);
@@ -572,12 +575,12 @@ const { sizeMap: D, roundedMap: yt } = st, bt = "Please enter a valid value!", $
572
575
  e.length = 0, e.push(...n);
573
576
  }
574
577
  getFocusedState() {
575
- const { focusedIndex: n } = this.state, e = this.props.filter !== void 0 ? this.props.filter : this.state.text, { allowCustom: t, dataItemKey: o, virtual: s, textField: a, focusedItemIndex: h = pt, skipDisabledItems: c } = this.props, d = I(this.props), i = s && s.skip || 0;
576
- let l;
578
+ const { focusedIndex: n } = this.state, e = this.props.filter !== void 0 ? this.props.filter : this.state.text, { allowCustom: t, dataItemKey: o, virtual: s, textField: a, focusedItemIndex: p = pt, skipDisabledItems: c } = this.props, r = I(this.props), i = s && s.skip || 0;
579
+ let d;
577
580
  if (n !== void 0)
578
581
  return {
579
582
  focusedIndex: n,
580
- focusedItem: d[n - i],
583
+ focusedItem: r[n - i],
581
584
  focusedType: 1
582
585
  /* ListItem */
583
586
  };
@@ -590,31 +593,31 @@ const { sizeMap: D, roundedMap: yt } = st, bt = "Please enter a valid value!", $
590
593
  /* CustomItem */
591
594
  };
592
595
  if (e)
593
- return l = h(d, e, a), {
594
- focusedItem: d[l],
595
- focusedIndex: l + i,
596
+ return d = p(r, e, a), {
597
+ focusedItem: r[d],
598
+ focusedIndex: d + i,
596
599
  focusedType: 1
597
600
  /* ListItem */
598
601
  };
599
602
  if (g.length) {
600
- const r = g[g.length - 1];
601
- return l = d.findIndex((p) => E(p, r, o)), d[l] !== void 0 ? {
602
- focusedIndex: l + i,
603
- focusedItem: d[l],
603
+ const l = g[g.length - 1];
604
+ return d = r.findIndex((h) => E(h, l, o)), r[d] !== void 0 ? {
605
+ focusedIndex: d + i,
606
+ focusedItem: r[d],
604
607
  focusedType: 1
605
608
  /* ListItem */
606
609
  } : { focusedType: 0, focusedIndex: -1 };
607
610
  } else if (c && a && !e && i === 0) {
608
- const r = d.findIndex((p) => !p.disabled && p[a]);
611
+ const l = r.findIndex((h) => !h.disabled && h[a]);
609
612
  return {
610
- focusedIndex: r,
611
- focusedItem: d[r - i],
613
+ focusedIndex: l,
614
+ focusedItem: r[l - i],
612
615
  focusedType: 1
613
616
  /* ListItem */
614
617
  };
615
618
  }
616
619
  return i === 0 ? {
617
- focusedItem: d[0],
620
+ focusedItem: r[0],
618
621
  focusedIndex: 0,
619
622
  focusedType: 1
620
623
  /* ListItem */
@@ -5,4 +5,4 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- "use client";"use strict";const u=require("@progress/kendo-react-common"),h=require("react");function b(a){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(a){for(const e in a)if(e!=="default"){const s=Object.getOwnPropertyDescriptor(a,e);Object.defineProperty(t,e,s.get?s:{enumerable:!0,get:()=>a[e]})}}return t.default=a,Object.freeze(t)}const c=b(h);class g extends c.Component{constructor(){super(...arguments),this._input=null}get input(){return this._input}componentDidUpdate(t){const e=t.value,s=t.suggestedText,{value:n,suggestedText:i,focused:o}=this.props,r=this.input,p=e!==n||i!==s,l=p&&e.startsWith(n)&&!(s&&i&&s.endsWith(i)),d=u.getActiveElement(document);o&&r&&d!==r&&r.focus(),i&&p&&!l&&r&&r.setSelectionRange(n.length-i.length,n.length)}render(){const{expanded:t=!1,disabled:e,role:s="listbox",render:n}=this.props,i=c.createElement("input",{autoComplete:"off",id:this.props.id,type:"text",key:"searchbar",size:this.props.size,placeholder:this.props.placeholder,className:"k-input-inner",tabIndex:this.props.tabIndex,accessKey:this.props.accessKey,role:s,name:this.props.name,value:this.props.value,onChange:this.props.onChange,ref:o=>this._input=o,onKeyDown:this.props.onKeyDown,onFocus:this.props.onFocus,onBlur:this.props.onBlur,onClick:this.props.onClick,"aria-disabled":e||void 0,disabled:e||void 0,readOnly:this.props.readOnly||void 0,title:this.props.title,"aria-haspopup":"listbox","aria-expanded":t,"aria-owns":this.props.owns,"aria-activedescendant":t?this.props.activedescendant:void 0,"aria-describedby":this.props.ariaDescribedBy,"aria-labelledby":this.props.ariaLabelledBy,"aria-label":this.props.ariaLabel,"aria-required":this.props.ariaRequired});return n?n.call(void 0,i):i}}module.exports=g;
8
+ "use client";"use strict";const u=require("@progress/kendo-react-common"),h=require("react");function b(n){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const e in n)if(e!=="default"){const s=Object.getOwnPropertyDescriptor(n,e);Object.defineProperty(t,e,s.get?s:{enumerable:!0,get:()=>n[e]})}}return t.default=n,Object.freeze(t)}const l=b(h);class g extends l.Component{constructor(){super(...arguments),this._input=null}get input(){return this._input}componentDidUpdate(t){const e=t.value,s=t.suggestedText,{value:r,suggestedText:a,focused:p}=this.props,i=this.input,o=e!==r||a!==s,c=o&&e.startsWith(r)&&!(s&&a&&s.endsWith(a)),d=u.getActiveElement(document);p&&i&&d!==i&&i.focus(),a&&o&&!c&&i&&i.setSelectionRange(r.length-a.length,r.length)}render(){const{expanded:t=!1,disabled:e,role:s="listbox",render:r,tabIndex:a,accessKey:p}=this.props,i={tabIndex:a,accessKey:p},o=l.createElement("input",{autoComplete:"off",id:this.props.id,type:"text",key:"searchbar",size:this.props.size,placeholder:this.props.placeholder,className:"k-input-inner",role:s,name:this.props.name,value:this.props.value,onChange:this.props.onChange,ref:c=>this._input=c,onKeyDown:this.props.onKeyDown,onFocus:this.props.onFocus,onBlur:this.props.onBlur,onClick:this.props.onClick,"aria-disabled":e||void 0,disabled:e||void 0,readOnly:this.props.readOnly||void 0,title:this.props.title,"aria-haspopup":"listbox","aria-expanded":t,"aria-owns":this.props.owns,"aria-activedescendant":t?this.props.activedescendant:void 0,"aria-describedby":this.props.ariaDescribedBy,"aria-labelledby":this.props.ariaLabelledBy,"aria-label":this.props.ariaLabel,"aria-required":this.props.ariaRequired,"aria-controls":this.props.ariaControls,...i});return r?r.call(void 0,o):o}}module.exports=g;
@@ -7,8 +7,8 @@
7
7
  */
8
8
  "use client";
9
9
  import { getActiveElement as c } from "@progress/kendo-react-common";
10
- import * as p from "react";
11
- class b extends p.Component {
10
+ import * as l from "react";
11
+ class g extends l.Component {
12
12
  constructor() {
13
13
  super(...arguments), this._input = null;
14
14
  }
@@ -18,12 +18,15 @@ class b extends p.Component {
18
18
  get input() {
19
19
  return this._input;
20
20
  }
21
- componentDidUpdate(t) {
22
- const i = t.value, a = t.suggestedText, { value: s, suggestedText: e, focused: r } = this.props, o = this.input, n = i !== s || e !== a, l = n && i.startsWith(s) && !(a && e && a.endsWith(e)), d = c(document);
23
- r && o && d !== o && o.focus(), e && n && !l && o && o.setSelectionRange(s.length - e.length, s.length);
21
+ componentDidUpdate(i) {
22
+ const a = i.value, r = i.suggestedText, { value: e, suggestedText: t, focused: n } = this.props, s = this.input, o = a !== e || t !== r, p = o && a.startsWith(e) && !(r && t && r.endsWith(t)), d = c(document);
23
+ n && s && d !== s && s.focus(), t && o && !p && s && s.setSelectionRange(e.length - t.length, e.length);
24
24
  }
25
25
  render() {
26
- const { expanded: t = !1, disabled: i, role: a = "listbox", render: s } = this.props, e = /* @__PURE__ */ p.createElement(
26
+ const { expanded: i = !1, disabled: a, role: r = "listbox", render: e, tabIndex: t, accessKey: n } = this.props, s = {
27
+ tabIndex: t,
28
+ accessKey: n
29
+ }, o = /* @__PURE__ */ l.createElement(
27
30
  "input",
28
31
  {
29
32
  autoComplete: "off",
@@ -33,34 +36,34 @@ class b extends p.Component {
33
36
  size: this.props.size,
34
37
  placeholder: this.props.placeholder,
35
38
  className: "k-input-inner",
36
- tabIndex: this.props.tabIndex,
37
- accessKey: this.props.accessKey,
38
- role: a,
39
+ role: r,
39
40
  name: this.props.name,
40
41
  value: this.props.value,
41
42
  onChange: this.props.onChange,
42
- ref: (r) => this._input = r,
43
+ ref: (p) => this._input = p,
43
44
  onKeyDown: this.props.onKeyDown,
44
45
  onFocus: this.props.onFocus,
45
46
  onBlur: this.props.onBlur,
46
47
  onClick: this.props.onClick,
47
- "aria-disabled": i || void 0,
48
- disabled: i || void 0,
48
+ "aria-disabled": a || void 0,
49
+ disabled: a || void 0,
49
50
  readOnly: this.props.readOnly || void 0,
50
51
  title: this.props.title,
51
52
  "aria-haspopup": "listbox",
52
- "aria-expanded": t,
53
+ "aria-expanded": i,
53
54
  "aria-owns": this.props.owns,
54
- "aria-activedescendant": t ? this.props.activedescendant : void 0,
55
+ "aria-activedescendant": i ? this.props.activedescendant : void 0,
55
56
  "aria-describedby": this.props.ariaDescribedBy,
56
57
  "aria-labelledby": this.props.ariaLabelledBy,
57
58
  "aria-label": this.props.ariaLabel,
58
- "aria-required": this.props.ariaRequired
59
+ "aria-required": this.props.ariaRequired,
60
+ "aria-controls": this.props.ariaControls,
61
+ ...s
59
62
  }
60
63
  );
61
- return s ? s.call(void 0, e) : e;
64
+ return e ? e.call(void 0, o) : o;
62
65
  }
63
66
  }
64
67
  export {
65
- b as default
68
+ g as default
66
69
  };