@progress/kendo-react-dropdowns 13.3.0-develop.5 → 13.3.0-develop.6

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.
@@ -5,9 +5,9 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- import * as f from "react";
9
- import m from "prop-types";
10
- import { Keys as u, classNames as I, IconWrap as L, WatermarkOverlay as J, getLicenseMessage as Q, canUseDOM as B, validatePackage as X, createPropsContext as Z, withIdHOC as ee, withPropsContext as te, withAdaptiveModeContext as se, kendoThemeMaps as ie } from "@progress/kendo-react-common";
8
+ import * as g from "react";
9
+ import v from "prop-types";
10
+ import { Keys as u, classNames as S, IconWrap as B, WatermarkOverlay as J, getLicenseMessage as Q, canUseDOM as V, validatePackage as X, createPropsContext as Z, withIdHOC as ee, withPropsContext as te, withAdaptiveModeContext as se, kendoThemeMaps as ie } from "@progress/kendo-react-common";
11
11
  import { plusIcon as oe } from "@progress/kendo-svg-icons";
12
12
  import { FloatingLabel as ae } from "@progress/kendo-react-labels";
13
13
  import ne from "../common/ListContainer.mjs";
@@ -15,180 +15,193 @@ import le from "../common/List.mjs";
15
15
  import de from "../common/GroupStickyHeader.mjs";
16
16
  import re from "./TagList.mjs";
17
17
  import he from "../common/SearchBar.mjs";
18
- import M from "../common/DropDownBase.mjs";
18
+ import O from "../common/DropDownBase.mjs";
19
19
  import { ActiveDescendant as w } from "../common/settings.mjs";
20
- import { getFilteredData as b, areSame as E, removeDataItems as T, isPresent as O, getItemValue as P, preventDefaultNonInputs as pe, matchTags as V, itemIndexStartsWith as ce } from "../common/utils.mjs";
21
- import { packageMetadata as z } from "../package-metadata.mjs";
20
+ import { getFilteredData as x, areSame as P, removeDataItems as D, isPresent as _, getItemValue as K, preventDefaultNonInputs as pe, matchTags as z, itemIndexStartsWith as ce } from "../common/utils.mjs";
21
+ import { packageMetadata as A } from "../package-metadata.mjs";
22
22
  import ue from "../common/ClearButton.mjs";
23
23
  import { AdaptiveMode as fe } from "../common/AdaptiveMode.mjs";
24
24
  import { ActionSheetContent as ge } from "@progress/kendo-react-layout";
25
25
  import me from "../common/ListFilter.mjs";
26
- import A from "../common/withCustomComponent.mjs";
27
- const { sizeMap: D, roundedMap: ve } = ie, be = "Please enter a valid value!", H = (F) => F.preventDefault(), W = (F) => F === 2, y = class y extends f.Component {
26
+ import H from "../common/withCustomComponent.mjs";
27
+ const { sizeMap: M, roundedMap: ve } = ie, be = "Please enter a valid value!", W = (E) => E.preventDefault(), $ = (E) => E === 2, C = class C extends g.Component {
28
28
  constructor(n) {
29
29
  super(n), this.state = {
30
30
  activedescendant: w.PopupList,
31
31
  currentValue: []
32
- }, this._element = null, this._valueItemsDuringOnChange = null, this.base = new M(this), this._tags = [], this._input = null, this._adaptiveInput = null, this._skipFocusEvent = !1, this._lastSelectedOrDeslectedItemIndex = null, this.itemHeight = 0, this.scrollToFocused = !1, this.showLicenseWatermark = !1, this.focus = () => {
32
+ }, this._element = null, this._valueItemsDuringOnChange = null, this.base = new O(this), this._tags = [], this._input = null, this._adaptiveInput = null, this._skipFocusEvent = !1, this._lastSelectedOrDeslectedItemIndex = null, this.itemHeight = 0, this.scrollToFocused = !1, this.showLicenseWatermark = !1, this.focus = () => {
33
33
  this._input && this._input.focus();
34
34
  }, this.handleItemSelect = (e, t) => {
35
- const { dataItemKey: a, virtual: s } = this.props, o = b(this.props), p = s ? s.skip : 0, c = o[e - p], r = this.value.findIndex((g) => E(g, c, a));
36
- this._lastSelectedOrDeslectedItemIndex = o.findIndex((g) => E(g, c, a));
37
- let i = [];
38
- 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);
35
+ const { dataItemKey: o, virtual: s } = this.props, a = x(this.props), i = s ? s.skip : 0, p = a[e - i], r = this.value.findIndex((h) => P(h, p, o));
36
+ this._lastSelectedOrDeslectedItemIndex = a.findIndex((h) => P(h, p, o));
37
+ let d = [];
38
+ r !== -1 ? (d = this.value, d.splice(r, 1)) : d = [...this.value, p], (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(d, t), this.base.triggerPageChangeCornerItems(p, t);
39
39
  }, this.onTagDelete = (e, t) => {
40
- const a = this.base.initState();
41
- a.syntheticEvent = t, this.opened && this.base.togglePopup(a), !this.state.focused && !this.mobileMode && (a.data.focused = !0, this.focus());
40
+ const o = this.base.initState();
41
+ o.syntheticEvent = t, this.opened && this.base.togglePopup(o), !this.state.focused && !this.mobileMode && (o.data.focused = !0, this.focus());
42
42
  const s = this.value;
43
- T(s, e, this.props.dataItemKey), this.triggerOnChange(s, a), this.applyState(a);
43
+ D(s, e, this.props.dataItemKey), this.triggerOnChange(s, o), this.applyState(o);
44
44
  }, this.itemFocus = (e, t) => {
45
- const { allowCustom: a, virtual: s } = this.props, o = b(this.props), p = s ? s.skip : 0, c = this.props.filter !== void 0 ? this.props.filter : this.state.text, { focusedIndex: r } = this.getFocusedState(), i = a && c, l = o[e - p];
46
- l && r !== e ? this.state.focusedIndex !== e && (t.data.focusedIndex = e, t.data.activedescendant = w.PopupList) : i && e === -1 && this.state.focusedIndex !== void 0 && (t.data.focusedIndex = void 0), this.base.triggerPageChangeCornerItems(l, t);
45
+ const { allowCustom: o, virtual: s } = this.props, a = x(this.props), i = s ? s.skip : 0, p = s ? s.pageSize : 0, r = this.props.filter !== void 0 ? this.props.filter : this.state.text, { focusedIndex: d } = this.getFocusedState(), l = o && r, h = a[e - i];
46
+ if (s && !h && e >= 0 && d !== e) {
47
+ const f = Math.floor(e / p) * p;
48
+ if (f !== i) {
49
+ this.state.focusedIndex !== e && (t.data.focusedIndex = e, t.data.activedescendant = w.PopupList), this.base.triggerOnPageChange(t, f, p);
50
+ return;
51
+ }
52
+ }
53
+ h && d !== e ? this.state.focusedIndex !== e && (t.data.focusedIndex = e, t.data.activedescendant = w.PopupList) : l && e === -1 && this.state.focusedIndex !== void 0 && (t.data.focusedIndex = void 0), this.base.triggerPageChangeCornerItems(h, t);
47
54
  }, this.componentRef = (e) => {
48
55
  this._element = e, this.base.wrapper = e;
49
56
  }, this.searchbarRef = (e) => {
50
57
  const t = this._input = e && e.input;
51
58
  t && this.state.focused && window.setTimeout(() => t.focus(), 0);
52
59
  }, this.onChangeHandler = (e) => {
53
- const t = this.base.initState(), a = e.target.value;
54
- t.syntheticEvent = e, this.props.filter === void 0 && (t.data.text = a), t.data.focusedIndex = void 0, this.opened ? this.scrollToFocused = !0 : (this.base.togglePopup(t), this.setState({ currentValue: this.value })), this.base.filterChanged(a, t), this.applyState(t), this.setState({ group: void 0 });
60
+ const t = this.base.initState(), o = e.target.value;
61
+ t.syntheticEvent = e, this.props.filter === void 0 && (t.data.text = o), t.data.focusedIndex = void 0, this.opened ? this.scrollToFocused = !0 : (this.base.togglePopup(t), this.setState({ currentValue: this.value })), this.base.filterChanged(o, t), this.applyState(t), this.setState({ group: void 0 });
55
62
  }, this.clearButtonClick = (e) => {
56
63
  const t = this.base.initState();
57
64
  t.syntheticEvent = e, e.stopPropagation(), this.value.length > 0 && this.triggerOnChange([], t), this.state.focusedIndex !== void 0 && (t.data.focusedIndex = void 0), this.opened && this.base.togglePopup(t);
58
- const a = this.props.filter !== void 0 ? this.props.filter : this.state.text;
59
- O(a) && a !== "" && this.base.filterChanged("", t), this.state.text && (t.data.text = ""), this._lastSelectedOrDeslectedItemIndex = null, this.applyState(t);
65
+ const o = this.props.filter !== void 0 ? this.props.filter : this.state.text;
66
+ _(o) && o !== "" && this.base.filterChanged("", t), this.state.text && (t.data.text = ""), this._lastSelectedOrDeslectedItemIndex = null, this.applyState(t);
60
67
  }, this.onInputKeyDown = (e) => {
61
- const { textField: t, groupField: a } = this.props, s = b(this.props), o = 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(), l = this.base.initState();
62
- if (l.syntheticEvent = e, !p && this.value.length > 0 && (o === u.left || o === u.right || o === u.home || o === u.end || o === u.delete || o === u.backspace) && !e.shiftKey)
63
- return this.onTagsNavigate(e, l);
64
- const g = () => {
65
- e.preventDefault(), this.base.togglePopup(l), this.applyState(l);
68
+ const { textField: t, groupField: o, virtual: s } = this.props, a = x(this.props), i = e.keyCode, p = this.props.filter !== void 0 ? this.props.filter : this.state.text, r = this.props.opened !== void 0 ? this.props.opened : this.state.opened, { focusedItem: d, focusedIndex: l } = this.getFocusedState(), h = this.base.initState();
69
+ if (h.syntheticEvent = e, !p && this.value.length > 0 && (i === u.left || i === u.right || i === u.home || i === u.end || i === u.delete || i === u.backspace) && !e.shiftKey)
70
+ return this.onTagsNavigate(e, h);
71
+ const f = () => {
72
+ e.preventDefault(), this.base.togglePopup(h), this.applyState(h);
66
73
  };
67
74
  if (this.opened)
68
- if (o === u.pageUp)
75
+ if (i === u.pageUp)
69
76
  e.preventDefault(), this.base.scrollPopupByPageSize(-1);
70
- else if (o === u.pageDown)
77
+ else if (i === u.pageDown)
71
78
  e.preventDefault(), this.base.scrollPopupByPageSize(1);
72
79
  else if ((e.ctrlKey || e.metaKey) && e.code === "KeyA") {
73
- const h = (this.state.value && this.state.value.length) === s.length ? [] : s;
74
- this.updateStateOnKeyboardNavigation(h, l);
80
+ const b = (this.state.value && this.state.value.length) === a.length ? [] : a;
81
+ this.updateStateOnKeyboardNavigation(b, h);
75
82
  } else if ((e.ctrlKey || e.metaKey) && e.shiftKey && e.keyCode === u.end) {
76
- const d = s.slice(this.getFocusedState().focusedIndex);
77
- this.itemFocus(s.length - 1, l), this.updateStateOnKeyboardNavigation(d, l);
83
+ const c = a.slice(this.getFocusedState().focusedIndex);
84
+ this.itemFocus(a.length - 1, h), this.updateStateOnKeyboardNavigation(c, h);
78
85
  } else if ((e.ctrlKey || e.metaKey) && e.shiftKey && e.keyCode === u.home) {
79
- const d = s.slice(0, this.getFocusedState().focusedIndex + 1);
80
- this.itemFocus(0, l), this.updateStateOnKeyboardNavigation(d, l);
86
+ const c = a.slice(0, this.getFocusedState().focusedIndex + 1);
87
+ this.itemFocus(0, h), this.updateStateOnKeyboardNavigation(c, h);
81
88
  } else if (e.shiftKey && e.keyCode === u.up) {
82
- let d;
83
- const h = this.getLastSelectedOrDeselectedIndex(1, i);
84
- h === null ? d = i !== 0 ? s.slice(i - 1, i) : [s[i]] : h === i ? d = [s[h - 1]] : i >= 0 && (d = h > i ? s.slice(i - 1, h) : s.slice(h - 1, i)), d && d.length > 0 && (i >= 1 && this.itemFocus(i - 1, l), this.updateStateOnKeyboardNavigation(d, l));
89
+ let c;
90
+ const b = this.getLastSelectedOrDeselectedIndex(1, l);
91
+ b === null ? c = l !== 0 ? a.slice(l - 1, l) : [a[l]] : b === l ? c = [a[b - 1]] : l >= 0 && (c = b > l ? a.slice(l - 1, b) : a.slice(b - 1, l)), c && c.length > 0 && (l >= 1 && this.itemFocus(l - 1, h), this.updateStateOnKeyboardNavigation(c, h));
85
92
  } else if (e.shiftKey && e.keyCode === u.down) {
86
- let d;
87
- const h = this.getLastSelectedOrDeselectedIndex(0, i);
88
- h === null ? d = i !== s.length - 1 ? s.slice(i, i + 1) : [s[i]] : h === i ? d = s.slice(i, i + 2) : i >= 0 && (d = h > i ? s.slice(i + 1, h + 1) : s.slice(h, i + 2)), d && d.length >= 1 && (this.itemFocus(i + 1, l), this.updateStateOnKeyboardNavigation(d, l));
89
- } else if (e.altKey && o === u.up)
90
- g();
91
- else if (o === u.up || o === u.down) {
92
- if (a !== "" && t)
93
- if (!this.props.skipDisabledItems && c)
94
- this.onNavigate(l, o);
93
+ let c;
94
+ const b = this.getLastSelectedOrDeselectedIndex(0, l);
95
+ b === null ? c = l !== a.length - 1 ? a.slice(l, l + 1) : [a[l]] : b === l ? c = a.slice(l, l + 2) : l >= 0 && (c = b > l ? a.slice(l + 1, b + 1) : a.slice(b, l + 2)), c && c.length >= 1 && (this.itemFocus(l + 1, h), this.updateStateOnKeyboardNavigation(c, h));
96
+ } else if (e.altKey && i === u.up)
97
+ f();
98
+ else if (i === u.up || i === u.down) {
99
+ const c = s ? s.skip : 0, b = l - c;
100
+ if (o !== "" && t)
101
+ if (!this.props.skipDisabledItems && r)
102
+ this.onNavigate(h, i);
95
103
  else {
96
- let d = 0;
97
- if (o === u.down || o === u.right) {
98
- const h = s.slice(i + 1).find((v) => !v.disabled && v[t]);
99
- d = h && s.findIndex((v) => v[t] === h[t]);
100
- } else if (o === u.up || o === u.left) {
101
- let h;
102
- if (i === -1)
103
- h = s, d = s.findIndex((v) => !v.disabled && v[t]);
104
+ let m = 0;
105
+ if (i === u.down || i === u.right) {
106
+ const y = a.slice(b + 1).find((I) => !I.disabled && I[t]);
107
+ m = y && a.findIndex((I) => I[t] === y[t]), m && m !== -1 && (m = m + c);
108
+ } else if (i === u.up || i === u.left) {
109
+ let y;
110
+ if (l === -1)
111
+ y = a, m = a.findIndex((I) => !I.disabled && I[t]), m !== -1 && (m = m + c);
104
112
  else {
105
- h = s.slice(0, i);
106
- let v = h.pop();
107
- for (; v && v.disabled; )
108
- v = h.pop();
109
- d = v && s.findIndex((x) => x[t] === v[t]);
113
+ y = a.slice(0, b);
114
+ let I = y.pop();
115
+ for (; I && I.disabled; )
116
+ I = y.pop();
117
+ m = I && a.findIndex((T) => T[t] === I[t]), m && m !== -1 && (m = m + c);
110
118
  }
111
119
  }
112
- if (d) {
113
- const h = d - i;
114
- this.onNavigate(l, o, h);
115
- } else d !== void 0 && this.onNavigate(l, o);
120
+ if (m) {
121
+ const y = m - l;
122
+ this.onNavigate(h, i, y);
123
+ } else
124
+ this.onNavigate(h, i);
116
125
  }
117
- else if (!this.props.skipDisabledItems && c)
118
- this.onNavigate(l, o);
126
+ else if (!this.props.skipDisabledItems && r)
127
+ this.onNavigate(h, i);
119
128
  else {
120
- let d = null;
121
- if (o === u.down || o === u.right)
122
- d = s.slice(i + 1).find((h) => !h.disabled);
123
- else if (o === u.up || o === u.left) {
124
- const h = s.slice(0, i);
125
- for (d = h.pop(); d && d.disabled; )
126
- d = h.pop();
129
+ let m = null;
130
+ if (i === u.down || i === u.right)
131
+ m = a.slice(b + 1).find((y) => !y.disabled);
132
+ else if (i === u.up || i === u.left) {
133
+ const y = a.slice(0, b);
134
+ for (m = y.pop(); m && m.disabled; )
135
+ m = y.pop();
127
136
  }
128
- if (d) {
129
- const h = d.id - i - 1;
130
- this.onNavigate(l, o, h);
137
+ if (m) {
138
+ const y = a.indexOf(m);
139
+ if (y !== -1) {
140
+ const I = c + y - l;
141
+ this.onNavigate(h, i, I);
142
+ } else
143
+ this.onNavigate(h, i);
131
144
  } else
132
- this.onNavigate(l, o);
145
+ this.onNavigate(h, i);
133
146
  }
134
- this.applyState(l), e.preventDefault();
135
- } else o === u.enter ? (e.preventDefault(), this.props.allowCustom && p && r === null ? this.customItemSelect(e) : r && r.disabled ? g() : this.selectFocusedItem(e)) : o === u.esc && g();
136
- else e.altKey && o === u.down ? g() : o === u.esc && this.clearButtonClick(e);
147
+ this.applyState(h), e.preventDefault();
148
+ } else i === u.enter ? (e.preventDefault(), this.props.allowCustom && p && d === null ? this.customItemSelect(e) : d && d.disabled ? f() : this.selectFocusedItem(e)) : i === u.esc && f();
149
+ else e.altKey && i === u.down ? f() : i === u.esc && this.clearButtonClick(e);
137
150
  }, this.listContainerContent = () => {
138
- const { header: e, footer: t, allowCustom: a, size: s, groupStickyHeaderItemRender: o, groupField: p, list: c } = this.props, r = b(this.props), i = this.props.filter !== void 0 ? this.props.filter : this.state.text, { focusedType: l } = this.getFocusedState(), g = a && i && /* @__PURE__ */ f.createElement(
151
+ const { header: e, footer: t, allowCustom: o, size: s, groupStickyHeaderItemRender: a, groupField: i, list: p } = this.props, r = x(this.props), d = this.props.filter !== void 0 ? this.props.filter : this.state.text, { focusedType: l } = this.getFocusedState(), h = o && d && /* @__PURE__ */ g.createElement(
139
152
  "div",
140
153
  {
141
- className: I("k-list", {
142
- [`k-list-${D[s] || s}`]: s
154
+ className: S("k-list", {
155
+ [`k-list-${M[s] || s}`]: s
143
156
  }),
144
157
  key: "customitem",
145
158
  onClick: this.customItemSelect,
146
- onMouseDown: H
159
+ onMouseDown: W
147
160
  },
148
- /* @__PURE__ */ f.createElement(
161
+ /* @__PURE__ */ g.createElement(
149
162
  "div",
150
163
  {
151
- className: I("k-list-item k-custom-item", { "k-focus": W(l) }),
164
+ className: S("k-list-item k-custom-item", { "k-focus": $(l) }),
152
165
  style: { fontStyle: "italic" }
153
166
  },
154
- i,
155
- /* @__PURE__ */ f.createElement(L, { name: "plus", icon: oe, style: { position: "absolute", right: "0.5em" } })
167
+ d,
168
+ /* @__PURE__ */ g.createElement(B, { name: "plus", icon: oe, style: { position: "absolute", right: "0.5em" } })
156
169
  )
157
170
  );
158
- let { group: d } = this.state;
159
- return d === void 0 && p !== void 0 && (d = P(r[0], p)), /* @__PURE__ */ f.createElement(f.Fragment, null, e && /* @__PURE__ */ f.createElement("div", { className: "k-list-header" }, e), g, /* @__PURE__ */ f.createElement(
171
+ let { group: f } = this.state;
172
+ return f === void 0 && i !== void 0 && (f = K(r[0], i)), /* @__PURE__ */ g.createElement(g.Fragment, null, e && /* @__PURE__ */ g.createElement("div", { className: "k-list-header" }, e), h, /* @__PURE__ */ g.createElement(
160
173
  "div",
161
174
  {
162
- className: I("k-list", {
163
- [`k-list-${this.mobileMode ? "lg" : D[s] || s}`]: s,
175
+ className: S("k-list", {
176
+ [`k-list-${this.mobileMode ? "lg" : M[s] || s}`]: s,
164
177
  "k-virtual-list": this.base.vs.enabled
165
178
  })
166
179
  },
167
- !c && d && r.length !== 0 && /* @__PURE__ */ f.createElement(de, { group: d, groupMode: "modern", render: o }),
180
+ !p && f && r.length !== 0 && /* @__PURE__ */ g.createElement(de, { group: f, groupMode: "modern", render: a }),
168
181
  this.renderList()
169
- ), this.showLicenseWatermark && /* @__PURE__ */ f.createElement(J, { message: this.licenseMessage }), t && /* @__PURE__ */ f.createElement("div", { className: "k-list-footer" }, t));
182
+ ), this.showLicenseWatermark && /* @__PURE__ */ g.createElement(J, { message: this.licenseMessage }), t && /* @__PURE__ */ g.createElement("div", { className: "k-list-footer" }, t));
170
183
  }, this.renderListContainer = () => {
171
- const e = this.base, { dir: t } = this.props, a = b(this.props), s = this.base.getPopupSettings(), o = s.width !== void 0 ? s.width : e.popupWidth, p = {
184
+ const e = this.base, { dir: t } = this.props, o = x(this.props), s = this.base.getPopupSettings(), a = s.width !== void 0 ? s.width : e.popupWidth, i = {
172
185
  dir: t !== void 0 ? t : e.dirCalculated,
173
- width: o,
186
+ width: a,
174
187
  popupSettings: {
175
188
  ...s,
176
- popupClass: I(s.popupClass, "k-list-container", "k-multiselect-popup"),
189
+ popupClass: S(s.popupClass, "k-list-container", "k-multiselect-popup"),
177
190
  anchor: s.anchor || this.element,
178
191
  show: this.opened,
179
192
  onOpen: this.onPopupOpened,
180
193
  onClose: this.onPopupClosed
181
194
  },
182
- itemsCount: [a.length, this.value.length]
195
+ itemsCount: [o.length, this.value.length]
183
196
  };
184
- return /* @__PURE__ */ f.createElement(ne, { ...p }, this.listContainerContent());
197
+ return /* @__PURE__ */ g.createElement(ne, { ...i }, this.listContainerContent());
185
198
  }, this.renderAdaptiveListContainer = () => {
186
- const { adaptiveTitle: e, adaptiveSubtitle: t, filterable: a, filter: s } = this.props, { windowWidth: o = 0 } = this.state, p = s !== void 0 ? s : this.state.text, c = a ? /* @__PURE__ */ f.createElement(
199
+ const { adaptiveTitle: e, adaptiveSubtitle: t, filterable: o, filter: s } = this.props, { windowWidth: a = 0 } = this.state, i = s !== void 0 ? s : this.state.text, p = o ? /* @__PURE__ */ g.createElement(
187
200
  me,
188
201
  {
189
- value: p,
190
- ref: (i) => {
191
- this._adaptiveInput = i && i.element;
202
+ value: i,
203
+ ref: (d) => {
204
+ this._adaptiveInput = d && d.element;
192
205
  },
193
206
  onChange: this.onChangeHandler,
194
207
  onKeyDown: this.onInputKeyDown,
@@ -201,101 +214,101 @@ const { sizeMap: D, roundedMap: ve } = ie, be = "Please enter a valid value!", H
201
214
  title: e || this.props.label,
202
215
  subTitle: t,
203
216
  expand: this.opened,
204
- onClose: (i) => this.closePopup(i),
205
- windowWidth: o,
206
- mobileFilter: c
217
+ onClose: (d) => this.closePopup(d),
218
+ windowWidth: a,
219
+ mobileFilter: p
207
220
  };
208
- return /* @__PURE__ */ f.createElement(fe, { ...r }, /* @__PURE__ */ f.createElement(ge, null, /* @__PURE__ */ f.createElement("div", { className: "k-list-container" }, this.listContainerContent())));
221
+ return /* @__PURE__ */ g.createElement(fe, { ...r }, /* @__PURE__ */ g.createElement(ge, null, /* @__PURE__ */ g.createElement("div", { className: "k-list-container" }, this.listContainerContent())));
209
222
  }, this.closePopup = (e) => {
210
223
  const t = this.base.initState();
211
224
  t.syntheticEvent = e, e.stopPropagation(), this.state.focusedIndex !== void 0 && (t.data.focusedIndex = void 0), this.opened && this.base.togglePopup(t), t.events.push({ type: "onClose" });
212
- const a = this.props.filter !== void 0 ? this.props.filter : this.state.text;
213
- O(a) && a !== "" && this.base.filterChanged("", t), this.state.text && (t.data.text = ""), this.applyState(t);
225
+ const o = this.props.filter !== void 0 ? this.props.filter : this.state.text;
226
+ _(o) && o !== "" && this.base.filterChanged("", t), this.state.text && (t.data.text = ""), this.applyState(t);
214
227
  }, this.onCancel = (e) => {
215
228
  const t = this.base.initState();
216
229
  t.syntheticEvent = e, e.stopPropagation(), this.state.focusedIndex !== void 0 && (t.data.focusedIndex = void 0), this.opened && this.base.togglePopup(t), t.events.push({ type: "onCancel" });
217
- const a = this.props.filter !== void 0 ? this.props.filter : this.state.text;
218
- O(a) && a !== "" && this.base.filterChanged("", t), this.state.text && (t.data.text = ""), this.applyState(t);
230
+ const o = this.props.filter !== void 0 ? this.props.filter : this.state.text;
231
+ _(o) && o !== "" && this.base.filterChanged("", t), this.state.text && (t.data.text = ""), this.applyState(t);
219
232
  }, this.renderList = () => {
220
233
  const {
221
234
  textField: e,
222
235
  listNoDataRender: t,
223
- itemRender: a,
236
+ itemRender: o,
224
237
  groupHeaderItemRender: s,
225
- dataItemKey: o,
226
- virtual: p = { skip: 0, total: void 0 }
227
- } = this.props, c = b(this.props), r = this.base.vs, { focusedIndex: i } = this.getFocusedState(), l = this.base.getPopupSettings(), g = `translateY(${r.translate}px)`;
228
- return /* @__PURE__ */ f.createElement(
238
+ dataItemKey: a,
239
+ virtual: i = { skip: 0, total: void 0 }
240
+ } = this.props, p = x(this.props), r = this.base.vs, { focusedIndex: d } = this.getFocusedState(), l = this.base.getPopupSettings(), h = `translateY(${r.translate}px)`;
241
+ return /* @__PURE__ */ g.createElement(
229
242
  le,
230
243
  {
231
244
  id: this.base.listBoxId,
232
245
  show: this.opened,
233
- data: c.slice(),
234
- focusedIndex: i - p.skip,
246
+ data: p.slice(),
247
+ focusedIndex: d - i.skip,
235
248
  value: this.value,
236
249
  textField: e,
237
- valueField: o,
250
+ valueField: a,
238
251
  optionsGuid: this.base.guid,
239
252
  groupField: this.props.groupField,
240
253
  groupMode: "modern",
241
- listRef: (d) => {
242
- r.list = this.base.list = d;
254
+ listRef: (f) => {
255
+ r.list = this.base.list = f;
243
256
  },
244
257
  wrapperStyle: this.mobileMode ? {} : { maxHeight: l.height },
245
258
  wrapperCssClass: "k-list-content",
246
- listStyle: r.enabled ? { transform: g } : void 0,
259
+ listStyle: r.enabled ? { transform: h } : void 0,
247
260
  key: "listKey",
248
- skip: p.skip,
261
+ skip: i.skip,
249
262
  onClick: this.handleItemClick,
250
- itemRender: a,
263
+ itemRender: o,
251
264
  groupHeaderItemRender: s,
252
265
  noDataRender: t,
253
- onMouseDown: H,
266
+ onMouseDown: W,
254
267
  onBlur: this.handleBlur,
255
268
  onScroll: this.onScroll,
256
269
  wrapperRef: r.scrollerRef,
257
270
  scroller: this.base.renderScrollElement(),
258
- ariaSetSize: p.total
271
+ ariaSetSize: i.total
259
272
  }
260
273
  );
261
274
  }, this.onScroll = (e) => {
262
- const { vs: t, list: a } = this.base;
275
+ const { vs: t, list: o } = this.base;
263
276
  t.scrollHandler(e);
264
277
  const { groupField: s } = this.props;
265
- let o = b(this.props);
266
- if (!(!s || !o.length) && s) {
267
- const p = this.itemHeight = this.itemHeight || (t.enabled ? t.itemHeight : a ? a.children[0].offsetHeight : 0), r = e.target.scrollTop - t.skip * p;
268
- o = this.base.getGroupedDataModernMode(o, s);
269
- let i = o[0][s];
270
- for (let l = 1; l < o.length && !(p * l > r); l++)
271
- o[l] && o[l][s] && (i = o[l][s]);
272
- i !== this.state.group && this.setState({
273
- group: i
278
+ let a = x(this.props);
279
+ if (!(!s || !a.length) && s) {
280
+ const i = this.itemHeight = this.itemHeight || (t.enabled ? t.itemHeight : o ? o.children[0].offsetHeight : 0), r = e.target.scrollTop - t.skip * i;
281
+ a = this.base.getGroupedDataModernMode(a, s);
282
+ let d = a[0][s];
283
+ for (let l = 1; l < a.length && !(i * l > r); l++)
284
+ a[l] && a[l][s] && (d = a[l][s]);
285
+ d !== this.state.group && this.setState({
286
+ group: d
274
287
  });
275
288
  }
276
289
  }, this.customItemSelect = (e) => {
277
- const t = this.props.filter !== void 0 ? this.props.filter : this.state.text, { textField: a } = this.props;
290
+ const t = this.props.filter !== void 0 ? this.props.filter : this.state.text, { textField: o } = this.props;
278
291
  if (!t)
279
292
  return;
280
293
  const s = this.base.initState();
281
294
  s.syntheticEvent = e;
282
- const o = a ? { [a]: t } : t;
295
+ const a = o ? { [o]: t } : t;
283
296
  this.state.text !== void 0 && (s.data.text = ""), s.data.focusedIndex = void 0, this.base.filterChanged("", s);
284
- const p = [...this.value, o];
285
- this.triggerOnChange(p, s), this.base.togglePopup(s), this.applyState(s);
297
+ const i = [...this.value, a];
298
+ this.triggerOnChange(i, s), this.base.togglePopup(s), this.applyState(s);
286
299
  }, this.handleWrapperClick = (e) => {
287
300
  const t = this._input;
288
301
  !this.opened && t && this.focusElement(t);
289
- const a = this.base.initState();
290
- a.syntheticEvent = e, !this.state.focused && !this.mobileMode && (a.events.push({ type: "onFocus" }), a.data.focused = !0), this.mobileMode && (this.setState({ currentValue: this.tagsToRender }), this.mobileMode && window.setTimeout(() => this._adaptiveInput && this._adaptiveInput.focus(), 300)), this.base.togglePopup(a), this.applyState(a);
302
+ const o = this.base.initState();
303
+ o.syntheticEvent = e, !this.state.focused && !this.mobileMode && (o.events.push({ type: "onFocus" }), o.data.focused = !0), this.mobileMode && (this.setState({ currentValue: this.tagsToRender }), this.mobileMode && window.setTimeout(() => this._adaptiveInput && this._adaptiveInput.focus(), 300)), this.base.togglePopup(o), this.applyState(o);
291
304
  }, this.handleItemClick = (e, t) => {
292
- const a = this.base.initState();
293
- a.syntheticEvent = t, this.handleItemSelect(e, a), this.props.autoClose && this.base.togglePopup(a), t.stopPropagation(), this.applyState(a);
305
+ const o = this.base.initState();
306
+ o.syntheticEvent = t, this.handleItemSelect(e, o), this.props.autoClose && this.base.togglePopup(o), t.stopPropagation(), this.applyState(o);
294
307
  }, this.handleBlur = (e) => {
295
308
  if (!this.state.focused || this._skipFocusEvent)
296
309
  return;
297
- const t = this.base.initState(), { allowCustom: a, filterable: s } = this.props;
298
- t.syntheticEvent = e, t.data.focused = !1, t.events.push({ type: "onBlur" }), this.opened && !this.mobileMode && (this.state.opened && (t.data.opened = !1), t.events.push({ type: "onClose" })), !a && !s && this.state.text && (t.data.text = ""), this.applyState(t);
310
+ const t = this.base.initState(), { allowCustom: o, filterable: s } = this.props;
311
+ t.syntheticEvent = e, t.data.focused = !1, t.events.push({ type: "onBlur" }), this.opened && !this.mobileMode && (this.state.opened && (t.data.opened = !1), t.events.push({ type: "onClose" })), !o && !s && this.state.text && (t.data.text = ""), this.applyState(t);
299
312
  }, this.handleFocus = (e) => {
300
313
  this._skipFocusEvent || this.base.handleFocus(e);
301
314
  }, this.onPopupOpened = () => {
@@ -308,19 +321,19 @@ const { sizeMap: D, roundedMap: ve } = ie, be = "Please enter a valid value!", H
308
321
  this._input && this._input.setCustomValidity && this._input.setCustomValidity(
309
322
  this.validity.valid ? "" : this.props.validationMessage || be
310
323
  );
311
- }, this.validate(n), this.licenseMessage = Q(z);
324
+ }, this.validate(n), this.licenseMessage = Q(A);
312
325
  }
313
326
  get _inputId() {
314
327
  return this.props.id;
315
328
  }
316
329
  get document() {
317
- if (B)
330
+ if (V)
318
331
  return this.element && this.element.ownerDocument || document;
319
332
  }
320
333
  validate(n) {
321
334
  if (n.filterable || n.virtual) {
322
335
  const e = [];
323
- n.filterable && e.push("filterable"), n.virtual && e.push("virtualization"), this.showLicenseWatermark = !X(z, {
336
+ n.filterable && e.push("filterable"), n.virtual && e.push("virtualization"), this.showLicenseWatermark = !X(A, {
324
337
  component: "MultiSelect",
325
338
  features: e
326
339
  });
@@ -337,8 +350,8 @@ const { sizeMap: D, roundedMap: ve } = ie, be = "Please enter a valid value!", H
337
350
  /** @hidden */
338
351
  get tagsToRender() {
339
352
  const { tags: n, textField: e } = this.props, t = [];
340
- return n === void 0 ? this.value.forEach((a) => {
341
- t.push({ text: P(a, e), data: [a] });
353
+ return n === void 0 ? this.value.forEach((o) => {
354
+ t.push({ text: K(o, e), data: [o] });
342
355
  }) : t.push(...n), t;
343
356
  }
344
357
  /**
@@ -374,27 +387,27 @@ const { sizeMap: D, roundedMap: ve } = ie, be = "Please enter a valid value!", H
374
387
  }
375
388
  /** @hidden */
376
389
  get required() {
377
- return this.props.required !== void 0 ? this.props.required : y.defaultProps.required;
390
+ return this.props.required !== void 0 ? this.props.required : C.defaultProps.required;
378
391
  }
379
392
  get validityStyles() {
380
- return this.props.validityStyles !== void 0 ? this.props.validityStyles : y.defaultProps.validityStyles;
393
+ return this.props.validityStyles !== void 0 ? this.props.validityStyles : C.defaultProps.validityStyles;
381
394
  }
382
395
  /** @hidden */
383
396
  componentDidUpdate(n, e) {
384
- var g;
385
- const { virtual: t, groupField: a = "" } = this.props, s = b(this.props), o = 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, l = this.base.getPopupSettings();
386
- if (this.validate(this.props), this.base.didUpdate(), !l.animate && i && this.onPopupClosed(), t && t.total !== p)
397
+ var h;
398
+ const { virtual: t, groupField: o = "" } = this.props, s = x(this.props), a = t ? t.skip : 0, i = n.virtual ? n.virtual.total : 0, p = n.opened !== void 0 ? n.opened : e.opened, r = !p && this.opened, d = p && !this.opened, l = this.base.getPopupSettings();
399
+ if (this.validate(this.props), this.base.didUpdate(), !l.animate && d && this.onPopupClosed(), t && t.total !== i)
387
400
  this.base.vs.calcScrollElementHeight(), this.base.vs.reset();
388
401
  else {
389
- let { focusedItem: d, focusedIndex: h } = this.getFocusedState();
390
- a !== "" && (h = (g = this.base.getGroupedDataModernMode(s, a)) == null ? void 0 : g.indexOf(d)), r && t ? this.base.scrollToVirtualItem(t, h - o) : r && !t ? (s && s.length !== 0 && this.base.resetGroupStickyHeader(s[0][a], this), this.base.scrollToItem(h)) : this.opened && c && d && this.scrollToFocused && this.base.scrollToItem(h - o);
402
+ let { focusedItem: f, focusedIndex: c } = this.getFocusedState();
403
+ o !== "" && (c = (h = this.base.getGroupedDataModernMode(s, o)) == null ? void 0 : h.indexOf(f)), r && t ? this.base.scrollToVirtualItem(t, c - a) : r && !t ? (s && s.length !== 0 && this.base.resetGroupStickyHeader(s[0][o], this), this.base.scrollToItem(c)) : this.opened && p && f && this.scrollToFocused && this.base.scrollToItem(c - a);
391
404
  }
392
405
  this.scrollToFocused = !1, this.setValidity();
393
406
  }
394
407
  /** @hidden */
395
408
  componentDidMount() {
396
409
  var n;
397
- this.observerResize = B && window.ResizeObserver && new window.ResizeObserver(this.calculateMedia.bind(this)), this.base.didMount(), this.setValidity(), (n = this.document) != null && n.body && this.observerResize && this.observerResize.observe(this.document.body);
410
+ this.observerResize = V && window.ResizeObserver && new window.ResizeObserver(this.calculateMedia.bind(this)), this.base.didMount(), this.setValidity(), (n = this.document) != null && n.body && this.observerResize && this.observerResize.observe(this.document.body);
398
411
  }
399
412
  /** @hidden */
400
413
  componentWillUnmount() {
@@ -403,18 +416,18 @@ const { sizeMap: D, roundedMap: ve } = ie, be = "Please enter a valid value!", H
403
416
  }
404
417
  /** @hidden */
405
418
  onNavigate(n, e, t) {
406
- const { allowCustom: a } = this.props, s = b(this.props), o = this.props.filter !== void 0 ? this.props.filter : this.state.text, { focusedType: p, focusedIndex: c } = this.getFocusedState(), r = a && o, i = W(p), l = this.base, g = l.vs;
407
- if (this.opened && e === u.up && i)
419
+ const { allowCustom: o } = this.props, s = x(this.props), a = this.props.filter !== void 0 ? this.props.filter : this.state.text, { focusedType: i, focusedIndex: p } = this.getFocusedState(), r = o && a, d = $(i), l = this.base, h = l.vs;
420
+ if (this.opened && e === u.up && d)
408
421
  this.state.focusedIndex !== void 0 && (n.data.focusedIndex = void 0);
409
422
  else {
410
- const d = l.navigation.navigate({
423
+ const f = l.navigation.navigate({
411
424
  keyCode: e,
412
- current: c,
413
- max: (g.enabled ? g.total : s.length) - 1,
425
+ current: p,
426
+ max: (h.enabled ? h.total : s.length) - 1,
414
427
  min: r ? -1 : 0,
415
428
  skipItems: t || void 0
416
429
  });
417
- d !== void 0 && (this.itemFocus(d, n), this.scrollToFocused = !0);
430
+ f !== void 0 && (this.itemFocus(f, n), this.scrollToFocused = !0);
418
431
  }
419
432
  this.applyState(n);
420
433
  }
@@ -424,92 +437,92 @@ const { sizeMap: D, roundedMap: ve } = ie, be = "Please enter a valid value!", H
424
437
  style: n,
425
438
  className: e,
426
439
  label: t,
427
- dir: a,
440
+ dir: o,
428
441
  disabled: s,
429
- textField: o,
430
- dataItemKey: p,
431
- virtual: c,
442
+ textField: a,
443
+ dataItemKey: i,
444
+ virtual: p,
432
445
  size: r,
433
- rounded: i,
446
+ rounded: d,
434
447
  fillMode: l,
435
- loading: g,
436
- filter: d
437
- } = this.props, { text: h, focused: v, focusedTag: x, currentValue: $ } = this.state, C = this.base.vs, K = this.props.id || this._inputId;
438
- C.enabled = c !== void 0, c !== void 0 && (C.skip = c.skip, C.total = c.total, C.pageSize = c.pageSize);
439
- const S = this.mobileMode && this.opened ? $ : this.tagsToRender;
448
+ loading: h,
449
+ filter: f
450
+ } = this.props, { text: c, focused: b, focusedTag: m, currentValue: y } = this.state, I = this.base.vs, T = this.props.id || this._inputId;
451
+ I.enabled = p !== void 0, p !== void 0 && (I.skip = p.skip, I.total = p.total, I.pageSize = p.pageSize);
452
+ const k = this.mobileMode && this.opened ? y : this.tagsToRender;
440
453
  this.setItems(this.tagsToRender, this._tags);
441
- const N = !this.validityStyles || this.validity.valid, q = !!(d !== void 0 ? d : h) || S && S.length > 0, [G, U] = A(this.props.prefix || f.Fragment), [j, Y] = A(this.props.suffix || f.Fragment), R = /* @__PURE__ */ f.createElement(f.Fragment, null, /* @__PURE__ */ f.createElement(
454
+ const R = !this.validityStyles || this.validity.valid, q = !!(f !== void 0 ? f : c) || k && k.length > 0, [G, U] = H(this.props.prefix || g.Fragment), [j, Y] = H(this.props.suffix || g.Fragment), L = /* @__PURE__ */ g.createElement(g.Fragment, null, /* @__PURE__ */ g.createElement(
442
455
  "div",
443
456
  {
444
457
  ref: this.componentRef,
445
- className: I("k-multiselect k-input", e, {
446
- [`k-input-${D[r] || r}`]: r,
447
- [`k-rounded-${ve[i] || i}`]: i,
458
+ className: S("k-multiselect k-input", e, {
459
+ [`k-input-${M[r] || r}`]: r,
460
+ [`k-rounded-${ve[d] || d}`]: d,
448
461
  [`k-input-${l}`]: l,
449
- "k-focus": v && !s,
450
- "k-invalid": !N,
462
+ "k-focus": b && !s,
463
+ "k-invalid": !R,
451
464
  "k-disabled": s,
452
- "k-loading": g,
465
+ "k-loading": h,
453
466
  "k-required": this.required
454
467
  }),
455
468
  style: t ? { ...n, width: void 0 } : n,
456
- dir: a,
457
- onFocus: (k) => {
458
- this.mobileMode ? this.handleWrapperClick(k) : this.handleFocus(k);
469
+ dir: o,
470
+ onFocus: (F) => {
471
+ this.mobileMode ? this.handleWrapperClick(F) : this.handleFocus(F);
459
472
  },
460
473
  onBlur: this.handleBlur,
461
474
  onClick: this.handleWrapperClick,
462
475
  onMouseDown: pe
463
476
  },
464
- this.props.prefix && /* @__PURE__ */ f.createElement(G, { ...U }),
465
- /* @__PURE__ */ f.createElement("div", { className: I("k-input-values") }, /* @__PURE__ */ f.createElement(
477
+ this.props.prefix && /* @__PURE__ */ g.createElement(G, { ...U }),
478
+ /* @__PURE__ */ g.createElement("div", { className: S("k-input-values") }, /* @__PURE__ */ g.createElement(
466
479
  "div",
467
480
  {
468
- className: I("k-chip-list", { [`k-chip-list-${D[r] || r}`]: r }),
481
+ className: S("k-chip-list", { [`k-chip-list-${M[r] || r}`]: r }),
469
482
  role: "listbox",
470
483
  id: "tagslist-" + this.base.guid
471
484
  },
472
- S && S.length > 0 && /* @__PURE__ */ f.createElement(
485
+ k && k.length > 0 && /* @__PURE__ */ g.createElement(
473
486
  re,
474
487
  {
475
488
  tagRender: this.props.tagRender,
476
489
  onTagDelete: this.onTagDelete,
477
- data: S,
490
+ data: k,
478
491
  guid: this.base.guid,
479
- focused: x ? S.find((k) => V(k, x, p)) : void 0,
492
+ focused: m ? k.find((F) => z(F, m, i)) : void 0,
480
493
  size: r
481
494
  }
482
495
  )
483
- ), this.renderSearchBar(K)),
484
- g && /* @__PURE__ */ f.createElement(L, { className: "k-input-loading-icon", name: "loading" }),
485
- this.props.suffix && /* @__PURE__ */ f.createElement(j, { ...Y }),
486
- q && /* @__PURE__ */ f.createElement(ue, { onClick: this.clearButtonClick }),
496
+ ), this.renderSearchBar(T)),
497
+ h && /* @__PURE__ */ g.createElement(B, { className: "k-input-loading-icon", name: "loading" }),
498
+ this.props.suffix && /* @__PURE__ */ g.createElement(j, { ...Y }),
499
+ q && /* @__PURE__ */ g.createElement(ue, { onClick: this.clearButtonClick }),
487
500
  !this.mobileMode && this.renderListContainer()
488
501
  ), this.mobileMode && this.renderAdaptiveListContainer());
489
- return t ? /* @__PURE__ */ f.createElement(
502
+ return t ? /* @__PURE__ */ g.createElement(
490
503
  ae,
491
504
  {
492
505
  label: t,
493
- editorId: K,
494
- editorValue: h || P(this.value[0], o),
495
- editorValid: N,
506
+ editorId: T,
507
+ editorValue: c || K(this.value[0], a),
508
+ editorValid: R,
496
509
  editorDisabled: s,
497
510
  style: { width: n ? n.width : void 0 },
498
- children: R
511
+ children: L
499
512
  }
500
- ) : R;
513
+ ) : L;
501
514
  }
502
515
  renderSearchBar(n) {
503
- const { activedescendant: e, focusedTag: t, currentValue: a } = this.state, { disabled: s, placeholder: o, ariaDescribedBy: p, ariaLabelledBy: c, ariaLabel: r, inputAttributes: i } = this.props, l = !this.mobileMode && (this.props.filter !== void 0 ? this.props.filter : this.state.text) || "", { focusedIndex: g } = this.getFocusedState(), d = this.value.length === 0 && !l ? o : void 0, h = a && a.length > 0 ? void 0 : o, v = e === w.TagsList && t !== void 0 ? `tag-${this.base.guid}-${t.text.replace(/\s+/g, "-")}` : `option-${this.base.guid}-${g}`, x = {
516
+ const { activedescendant: e, focusedTag: t, currentValue: o } = this.state, { disabled: s, placeholder: a, ariaDescribedBy: i, ariaLabelledBy: p, ariaLabel: r, inputAttributes: d } = this.props, l = !this.mobileMode && (this.props.filter !== void 0 ? this.props.filter : this.state.text) || "", { focusedIndex: h } = this.getFocusedState(), f = this.value.length === 0 && !l ? a : void 0, c = o && o.length > 0 ? void 0 : a, b = e === w.TagsList && t !== void 0 ? `tag-${this.base.guid}-${t.text.replace(/\s+/g, "-")}` : `option-${this.base.guid}-${h}`, m = {
504
517
  accessKey: this.props.accessKey,
505
518
  tabIndex: this.props.tabIndex
506
519
  };
507
- return /* @__PURE__ */ f.createElement(
520
+ return /* @__PURE__ */ g.createElement(
508
521
  he,
509
522
  {
510
523
  id: n,
511
- size: Math.max((d || "").length, l.length, 1),
512
- placeholder: this.mobileMode && this.opened ? h : d,
524
+ size: Math.max((f || "").length, l.length, 1),
525
+ placeholder: this.mobileMode && this.opened ? c : f,
513
526
  value: l,
514
527
  onChange: this.onChangeHandler,
515
528
  onKeyDown: this.onInputKeyDown,
@@ -518,50 +531,50 @@ const { sizeMap: D, roundedMap: ve } = ie, be = "Please enter a valid value!", H
518
531
  expanded: this.opened,
519
532
  owns: this.base.listBoxId,
520
533
  role: "combobox",
521
- activedescendant: v,
522
- ariaDescribedBy: `tagslist-${this.base.guid}${p ? " " + p : ""}`,
523
- ariaLabelledBy: c,
534
+ activedescendant: b,
535
+ ariaDescribedBy: `tagslist-${this.base.guid}${i ? " " + i : ""}`,
536
+ ariaLabelledBy: p,
524
537
  ariaRequired: this.required,
525
538
  ariaLabel: r,
526
- inputAttributes: i,
527
- ...x
539
+ inputAttributes: d,
540
+ ...m
528
541
  }
529
542
  );
530
543
  }
531
544
  onTagsNavigate(n, e) {
532
- const t = n.keyCode, { focusedTag: a } = this.state, s = this._tags, o = this.props.dataItemKey;
533
- let p = a ? s.findIndex((i) => V(i, a, o)) : -1, c;
534
- const r = p !== -1;
545
+ const t = n.keyCode, { focusedTag: o } = this.state, s = this._tags, a = this.props.dataItemKey;
546
+ let i = o ? s.findIndex((d) => z(d, o, a)) : -1, p;
547
+ const r = i !== -1;
535
548
  if (t === u.left)
536
- r ? p = Math.max(0, p - 1) : p = s.length - 1, c = s[p];
549
+ r ? i = Math.max(0, i - 1) : i = s.length - 1, p = s[i];
537
550
  else if (t === u.right)
538
- p === s.length - 1 ? c = void 0 : r && (p = Math.min(s.length - 1, p + 1), c = s[p]);
551
+ i === s.length - 1 ? p = void 0 : r && (i = Math.min(s.length - 1, i + 1), p = s[i]);
539
552
  else if (t === u.home && !n.shiftKey)
540
- c = s[0];
553
+ p = s[0];
541
554
  else if (t === u.end && !n.shiftKey)
542
- c = s[s.length - 1];
555
+ p = s[s.length - 1];
543
556
  else if (t === u.delete) {
544
557
  if (r) {
545
- const i = this.value;
546
- T(i, s[p].data, o), this.triggerOnChange(i, e);
558
+ const d = this.value;
559
+ D(d, s[i].data, a), this.triggerOnChange(d, e);
547
560
  }
548
561
  } else if (t === u.backspace) {
549
- const i = this.value;
562
+ const d = this.value;
550
563
  if (r)
551
- T(i, s[p].data, o), this.triggerOnChange(i, e);
564
+ D(d, s[i].data, a), this.triggerOnChange(d, e);
552
565
  else if (!r && s.length) {
553
566
  const l = s.pop();
554
- T(i, l.data, o), this.triggerOnChange(i, e);
567
+ D(d, l.data, a), this.triggerOnChange(d, e);
555
568
  }
556
569
  }
557
- c !== a && (e.data.focusedTag = c, e.data.activedescendant = w.TagsList), this.applyState(e);
570
+ p !== o && (e.data.focusedTag = p, e.data.activedescendant = w.TagsList), this.applyState(e);
558
571
  }
559
572
  triggerOnChange(n, e) {
560
573
  this.props.value === void 0 && (e.data.value = [...n]), this._valueItemsDuringOnChange = [], this.setItems(n, this._valueItemsDuringOnChange), e.events.push({ type: "onChange" });
561
574
  }
562
575
  selectFocusedItem(n, e) {
563
- const { virtual: t } = this.props, a = b(this.props), { focusedIndex: s } = e || this.getFocusedState(), o = t ? t.skip : 0;
564
- a[s - o] !== void 0 && this.handleItemClick(s, n);
576
+ const { virtual: t } = this.props, o = x(this.props), { focusedIndex: s } = e || this.getFocusedState(), a = t ? t.skip : 0;
577
+ o[s - a] !== void 0 && this.handleItemClick(s, n);
565
578
  }
566
579
  setItems(n, e) {
567
580
  e.length = 0, e.push(...n);
@@ -569,21 +582,21 @@ const { sizeMap: D, roundedMap: ve } = ie, be = "Please enter a valid value!", H
569
582
  getFocusedState() {
570
583
  const { focusedIndex: n } = this.state, e = this.props.filter !== void 0 ? this.props.filter : this.state.text, {
571
584
  allowCustom: t,
572
- dataItemKey: a,
585
+ dataItemKey: o,
573
586
  virtual: s,
574
- textField: o,
575
- focusedItemIndex: p = ce,
576
- skipDisabledItems: c
577
- } = this.props, r = b(this.props), i = s && s.skip || 0;
587
+ textField: a,
588
+ focusedItemIndex: i = ce,
589
+ skipDisabledItems: p
590
+ } = this.props, r = x(this.props), d = s && s.skip || 0;
578
591
  let l;
579
592
  if (n !== void 0)
580
593
  return {
581
594
  focusedIndex: n,
582
- focusedItem: r[n - i],
595
+ focusedItem: r[n - d],
583
596
  focusedType: 1
584
597
  /* ListItem */
585
598
  };
586
- const g = this.value;
599
+ const h = this.value;
587
600
  if (t && e)
588
601
  return {
589
602
  focusedItem: null,
@@ -592,30 +605,30 @@ const { sizeMap: D, roundedMap: ve } = ie, be = "Please enter a valid value!", H
592
605
  /* CustomItem */
593
606
  };
594
607
  if (e)
595
- return l = p(r, e, o), {
608
+ return l = i(r, e, a), {
596
609
  focusedItem: r[l],
597
- focusedIndex: l + i,
610
+ focusedIndex: l + d,
598
611
  focusedType: 1
599
612
  /* ListItem */
600
613
  };
601
- if (g.length) {
602
- const d = g[g.length - 1];
603
- return l = r.findIndex((h) => E(h, d, a)), r[l] !== void 0 ? {
604
- focusedIndex: l + i,
614
+ if (h.length) {
615
+ const f = h[h.length - 1];
616
+ return l = r.findIndex((c) => P(c, f, o)), r[l] !== void 0 ? {
617
+ focusedIndex: l + d,
605
618
  focusedItem: r[l],
606
619
  focusedType: 1
607
620
  /* ListItem */
608
621
  } : { focusedType: 0, focusedIndex: -1 };
609
- } else if (c && o && !e && i === 0) {
610
- const d = r.findIndex((h) => !h.disabled && h[o]);
622
+ } else if (p && a && !e && d === 0) {
623
+ const f = r.findIndex((c) => !c.disabled && c[a]);
611
624
  return {
612
- focusedIndex: d,
613
- focusedItem: r[d - i],
625
+ focusedIndex: f,
626
+ focusedItem: r[f - d],
614
627
  focusedType: 1
615
628
  /* ListItem */
616
629
  };
617
630
  }
618
- return i === 0 ? {
631
+ return d === 0 ? {
619
632
  focusedItem: r[0],
620
633
  focusedIndex: 0,
621
634
  focusedType: 1
@@ -651,33 +664,33 @@ const { sizeMap: D, roundedMap: ve } = ie, be = "Please enter a valid value!", H
651
664
  return this._lastSelectedOrDeslectedItemIndex === null && (this._lastSelectedOrDeslectedItemIndex = e), this._lastSelectedOrDeslectedItemIndex !== null ? this._lastSelectedOrDeslectedItemIndex + n : null;
652
665
  }
653
666
  };
654
- y.displayName = "MultiSelect", y.propTypes = {
655
- ...M.propTypes,
656
- autoClose: m.bool,
657
- value: m.arrayOf(m.any),
658
- defaultValue: m.arrayOf(m.any),
659
- dataItemKey: m.string,
660
- placeholder: m.string,
661
- tags: m.arrayOf(
662
- m.shape({
663
- text: m.string,
664
- data: m.arrayOf(m.any)
667
+ C.displayName = "MultiSelect", C.propTypes = {
668
+ ...O.propTypes,
669
+ autoClose: v.bool,
670
+ value: v.arrayOf(v.any),
671
+ defaultValue: v.arrayOf(v.any),
672
+ dataItemKey: v.string,
673
+ placeholder: v.string,
674
+ tags: v.arrayOf(
675
+ v.shape({
676
+ text: v.string,
677
+ data: v.arrayOf(v.any)
665
678
  })
666
679
  ),
667
- tagRender: m.func,
668
- id: m.string,
669
- ariaLabelledBy: m.string,
670
- ariaDescribedBy: m.string,
671
- groupField: m.string,
672
- list: m.any,
673
- adaptive: m.bool,
674
- adaptiveTitle: m.string,
675
- adaptiveSubtitle: m.string,
676
- onCancel: m.func,
677
- skipDisabledItems: m.bool,
678
- inputAttributes: m.object
679
- }, y.defaultProps = {
680
- ...M.defaultProps,
680
+ tagRender: v.func,
681
+ id: v.string,
682
+ ariaLabelledBy: v.string,
683
+ ariaDescribedBy: v.string,
684
+ groupField: v.string,
685
+ list: v.any,
686
+ adaptive: v.bool,
687
+ adaptiveTitle: v.string,
688
+ adaptiveSubtitle: v.string,
689
+ onCancel: v.func,
690
+ skipDisabledItems: v.bool,
691
+ inputAttributes: v.object
692
+ }, C.defaultProps = {
693
+ ...O.defaultProps,
681
694
  autoClose: !0,
682
695
  required: !1,
683
696
  size: "medium",
@@ -688,16 +701,16 @@ y.displayName = "MultiSelect", y.propTypes = {
688
701
  prefix: void 0,
689
702
  suffix: void 0
690
703
  };
691
- let _ = y;
704
+ let N = C;
692
705
  const Ie = Z(), ye = ee(
693
706
  te(
694
707
  Ie,
695
- se(_)
708
+ se(N)
696
709
  )
697
710
  );
698
711
  ye.displayName = "KendoReactMultiSelect";
699
712
  export {
700
713
  ye as MultiSelect,
701
714
  Ie as MultiSelectPropsContext,
702
- _ as MultiSelectWithoutContext
715
+ N as MultiSelectWithoutContext
703
716
  };