@progress/kendo-react-dropdowns 11.4.0-develop.6 → 11.4.0-develop.8

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.
@@ -6,107 +6,107 @@
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
8
  import * as f from "react";
9
- import g from "prop-types";
10
- import { Keys as u, classNames as I, IconWrap as L, WatermarkOverlay as Y, canUseDOM as B, validatePackage as J, createPropsContext as Q, withIdHOC as X, withPropsContext as Z, withAdaptiveModeContext as tt, kendoThemeMaps as et } from "@progress/kendo-react-common";
11
- import { plusIcon as st } from "@progress/kendo-svg-icons";
12
- import { FloatingLabel as it } from "@progress/kendo-react-labels";
13
- import ot from "../common/ListContainer.mjs";
14
- import at from "../common/List.mjs";
15
- import nt from "../common/GroupStickyHeader.mjs";
16
- import lt from "./TagList.mjs";
17
- import dt from "../common/SearchBar.mjs";
18
- import E from "../common/DropDownBase.mjs";
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";
11
+ import { plusIcon as oe } from "@progress/kendo-svg-icons";
12
+ import { FloatingLabel as ae } from "@progress/kendo-react-labels";
13
+ import ne from "../common/ListContainer.mjs";
14
+ import le from "../common/List.mjs";
15
+ import de from "../common/GroupStickyHeader.mjs";
16
+ import re from "./TagList.mjs";
17
+ import he from "../common/SearchBar.mjs";
18
+ import M from "../common/DropDownBase.mjs";
19
19
  import { ActiveDescendant as w } from "../common/settings.mjs";
20
- import { getFilteredData as b, areSame as M, removeDataItems as T, isPresent as O, getItemValue as P, preventDefaultNonInputs as rt, matchTags as V, itemIndexStartsWith as ht } from "../common/utils.mjs";
21
- import { packageMetadata as pt } from "../package-metadata.mjs";
22
- import ct from "../common/ClearButton.mjs";
23
- import { AdaptiveMode as ut } from "../common/AdaptiveMode.mjs";
24
- import { ActionSheetContent as ft } from "@progress/kendo-react-layout";
25
- import mt from "../common/ListFilter.mjs";
26
- import z from "../common/withCustomComponent.mjs";
27
- const { sizeMap: D, roundedMap: gt } = et, vt = "Please enter a valid value!", A = (F) => F.preventDefault(), H = (F) => F === 2, y = class y extends f.Component {
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";
22
+ import ue from "../common/ClearButton.mjs";
23
+ import { AdaptiveMode as fe } from "../common/AdaptiveMode.mjs";
24
+ import { ActionSheetContent as ge } from "@progress/kendo-react-layout";
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 {
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 E(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 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 = () => {
33
33
  this._input && this._input.focus();
34
- }, this.handleItemSelect = (t, e) => {
35
- const { dataItemKey: a, virtual: s } = this.props, o = b(this.props), p = s ? s.skip : 0, c = o[t - p], r = this.value.findIndex((m) => M(m, c, a));
36
- this._lastSelectedOrDeslectedItemIndex = o.findIndex((m) => M(m, c, a));
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
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 && (e.data.text = ""), this.base.filterChanged("", e)), this._adaptiveInput && this._adaptiveInput.blur(), this.state.focusedIndex !== void 0 && (e.data.focusedIndex = void 0), this.triggerOnChange(i, e), this.base.triggerPageChangeCornerItems(c, e);
39
- }, this.onTagDelete = (t, e) => {
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);
39
+ }, this.onTagDelete = (e, t) => {
40
40
  const a = this.base.initState();
41
- a.syntheticEvent = e, this.opened && this.base.togglePopup(a), !this.state.focused && !this.mobileMode && (a.data.focused = !0, this.focus());
41
+ a.syntheticEvent = t, this.opened && this.base.togglePopup(a), !this.state.focused && !this.mobileMode && (a.data.focused = !0, this.focus());
42
42
  const s = this.value;
43
- T(s, t, this.props.dataItemKey), this.triggerOnChange(s, a), this.applyState(a);
44
- }, this.itemFocus = (t, e) => {
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[t - p];
46
- l && r !== t ? this.state.focusedIndex !== t && (e.data.focusedIndex = t, e.data.activedescendant = w.PopupList) : i && t === -1 && this.state.focusedIndex !== void 0 && (e.data.focusedIndex = void 0), this.base.triggerPageChangeCornerItems(l, e);
47
- }, this.componentRef = (t) => {
48
- this._element = t, this.base.wrapper = t;
49
- }, this.searchbarRef = (t) => {
50
- const e = this._input = t && t.input;
51
- e && this.state.focused && window.setTimeout(() => e.focus(), 0);
52
- }, this.onChangeHandler = (t) => {
53
- const e = this.base.initState(), a = t.target.value;
54
- e.syntheticEvent = t, this.props.filter === void 0 && (e.data.text = a), e.data.focusedIndex = void 0, this.opened || (this.base.togglePopup(e), this.setState({ currentValue: this.value })), this.base.filterChanged(a, e), this.applyState(e), this.setState({ group: void 0 });
55
- }, this.clearButtonClick = (t) => {
56
- const e = this.base.initState();
57
- e.syntheticEvent = t, t.stopPropagation(), this.value.length > 0 && this.triggerOnChange([], e), this.state.focusedIndex !== void 0 && (e.data.focusedIndex = void 0), this.opened && this.base.togglePopup(e);
43
+ T(s, e, this.props.dataItemKey), this.triggerOnChange(s, a), this.applyState(a);
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);
47
+ }, this.componentRef = (e) => {
48
+ this._element = e, this.base.wrapper = e;
49
+ }, this.searchbarRef = (e) => {
50
+ const t = this._input = e && e.input;
51
+ t && this.state.focused && window.setTimeout(() => t.focus(), 0);
52
+ }, 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.base.togglePopup(t), this.setState({ currentValue: this.value })), this.base.filterChanged(a, t), this.applyState(t), this.setState({ group: void 0 });
55
+ }, this.clearButtonClick = (e) => {
56
+ const t = this.base.initState();
57
+ 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
58
  const a = this.props.filter !== void 0 ? this.props.filter : this.state.text;
59
- O(a) && a !== "" && this.base.filterChanged("", e), this.state.text && (e.data.text = ""), this._lastSelectedOrDeslectedItemIndex = null, this.applyState(e);
60
- }, this.onInputKeyDown = (t) => {
61
- const { textField: e, groupField: a } = this.props, s = b(this.props), o = t.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 = t, !p && this.value.length > 0 && (o === u.left || o === u.right || o === u.home || o === u.end || o === u.delete || o === u.backspace) && !t.shiftKey)
63
- return this.onTagsNavigate(t, l);
64
- const m = () => {
65
- t.preventDefault(), this.base.togglePopup(l), this.applyState(l);
59
+ O(a) && a !== "" && this.base.filterChanged("", t), this.state.text && (t.data.text = ""), this._lastSelectedOrDeslectedItemIndex = null, this.applyState(t);
60
+ }, 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);
66
66
  };
67
67
  if (this.opened)
68
68
  if (o === u.pageUp)
69
- t.preventDefault(), this.base.scrollPopupByPageSize(-1);
69
+ e.preventDefault(), this.base.scrollPopupByPageSize(-1);
70
70
  else if (o === u.pageDown)
71
- t.preventDefault(), this.base.scrollPopupByPageSize(1);
72
- else if ((t.ctrlKey || t.metaKey) && t.code === "KeyA") {
71
+ e.preventDefault(), this.base.scrollPopupByPageSize(1);
72
+ else if ((e.ctrlKey || e.metaKey) && e.code === "KeyA") {
73
73
  const h = (this.state.value && this.state.value.length) === s.length ? [] : s;
74
74
  this.updateStateOnKeyboardNavigation(h, l);
75
- } else if ((t.ctrlKey || t.metaKey) && t.shiftKey && t.keyCode === u.end) {
75
+ } else if ((e.ctrlKey || e.metaKey) && e.shiftKey && e.keyCode === u.end) {
76
76
  const d = s.slice(this.getFocusedState().focusedIndex);
77
77
  this.itemFocus(s.length - 1, l), this.updateStateOnKeyboardNavigation(d, l);
78
- } else if ((t.ctrlKey || t.metaKey) && t.shiftKey && t.keyCode === u.home) {
78
+ } else if ((e.ctrlKey || e.metaKey) && e.shiftKey && e.keyCode === u.home) {
79
79
  const d = s.slice(0, this.getFocusedState().focusedIndex + 1);
80
80
  this.itemFocus(0, l), this.updateStateOnKeyboardNavigation(d, l);
81
- } else if (t.shiftKey && t.keyCode === u.up) {
81
+ } else if (e.shiftKey && e.keyCode === u.up) {
82
82
  let d;
83
83
  const h = this.getLastSelectedOrDeselectedIndex(1, i);
84
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));
85
- } else if (t.shiftKey && t.keyCode === u.down) {
85
+ } else if (e.shiftKey && e.keyCode === u.down) {
86
86
  let d;
87
87
  const h = this.getLastSelectedOrDeselectedIndex(0, i);
88
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 (t.altKey && o === u.up)
90
- m();
89
+ } else if (e.altKey && o === u.up)
90
+ g();
91
91
  else if (o === u.up || o === u.down) {
92
- if (a !== "" && e)
92
+ if (a !== "" && t)
93
93
  if (!this.props.skipDisabledItems && c)
94
94
  this.onNavigate(l, o);
95
95
  else {
96
96
  let d = 0;
97
97
  if (o === u.down || o === u.right) {
98
- const h = s.slice(i + 1).find((v) => !v.disabled && v[e]);
99
- d = h && s.findIndex((v) => v[e] === h[e]);
98
+ const h = s.slice(i + 1).find((v) => !v.disabled && v[t]);
99
+ d = h && s.findIndex((v) => v[t] === h[t]);
100
100
  } else if (o === u.up || o === u.left) {
101
101
  let h;
102
102
  if (i === -1)
103
- h = s, d = s.findIndex((v) => !v.disabled && v[e]);
103
+ h = s, d = s.findIndex((v) => !v.disabled && v[t]);
104
104
  else {
105
105
  h = s.slice(0, i);
106
106
  let v = h.pop();
107
107
  for (; v && v.disabled; )
108
108
  v = h.pop();
109
- d = v && s.findIndex((x) => x[e] === v[e]);
109
+ d = v && s.findIndex((x) => x[t] === v[t]);
110
110
  }
111
111
  }
112
112
  if (d) {
@@ -131,11 +131,11 @@ const { sizeMap: D, roundedMap: gt } = et, vt = "Please enter a valid value!", A
131
131
  } else
132
132
  this.onNavigate(l, o);
133
133
  }
134
- this.applyState(l), t.preventDefault();
135
- } else o === u.enter ? (t.preventDefault(), this.props.allowCustom && p && r === null ? this.customItemSelect(t) : r && r.disabled ? m() : this.selectFocusedItem(t)) : o === u.esc && m();
136
- else t.altKey && o === u.down ? m() : o === u.esc && this.clearButtonClick(t);
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);
137
137
  }, this.listContainerContent = () => {
138
- const { header: t, footer: e, 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(), m = a && i && /* @__PURE__ */ f.createElement(
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(
139
139
  "div",
140
140
  {
141
141
  className: I("k-list", {
@@ -143,20 +143,20 @@ const { sizeMap: D, roundedMap: gt } = et, vt = "Please enter a valid value!", A
143
143
  }),
144
144
  key: "customitem",
145
145
  onClick: this.customItemSelect,
146
- onMouseDown: A
146
+ onMouseDown: H
147
147
  },
148
148
  /* @__PURE__ */ f.createElement(
149
149
  "div",
150
150
  {
151
- className: I("k-list-item k-custom-item", { "k-focus": H(l) }),
151
+ className: I("k-list-item k-custom-item", { "k-focus": W(l) }),
152
152
  style: { fontStyle: "italic" }
153
153
  },
154
154
  i,
155
- /* @__PURE__ */ f.createElement(L, { name: "plus", icon: st, style: { position: "absolute", right: "0.5em" } })
155
+ /* @__PURE__ */ f.createElement(L, { name: "plus", icon: oe, style: { position: "absolute", right: "0.5em" } })
156
156
  )
157
157
  );
158
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, t && /* @__PURE__ */ f.createElement("div", { className: "k-list-header" }, t), m, /* @__PURE__ */ f.createElement(
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(
160
160
  "div",
161
161
  {
162
162
  className: I("k-list", {
@@ -164,12 +164,12 @@ const { sizeMap: D, roundedMap: gt } = et, vt = "Please enter a valid value!", A
164
164
  "k-virtual-list": this.base.vs.enabled
165
165
  })
166
166
  },
167
- !c && d && r.length !== 0 && /* @__PURE__ */ f.createElement(nt, { group: d, groupMode: "modern", render: o }),
167
+ !c && d && r.length !== 0 && /* @__PURE__ */ f.createElement(de, { group: d, groupMode: "modern", render: o }),
168
168
  this.renderList()
169
- ), this.showLicenseWatermark && /* @__PURE__ */ f.createElement(Y, null), e && /* @__PURE__ */ f.createElement("div", { className: "k-list-footer" }, e));
169
+ ), this.showLicenseWatermark && /* @__PURE__ */ f.createElement(J, { message: this.licenseMessage }), t && /* @__PURE__ */ f.createElement("div", { className: "k-list-footer" }, t));
170
170
  }, this.renderListContainer = () => {
171
- const t = this.base, { dir: e } = this.props, a = b(this.props), s = this.base.getPopupSettings(), o = s.width !== void 0 ? s.width : t.popupWidth, p = {
172
- dir: e !== void 0 ? e : t.dirCalculated,
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 = {
172
+ dir: t !== void 0 ? t : e.dirCalculated,
173
173
  width: o,
174
174
  popupSettings: {
175
175
  ...s,
@@ -181,10 +181,10 @@ const { sizeMap: D, roundedMap: gt } = et, vt = "Please enter a valid value!", A
181
181
  },
182
182
  itemsCount: [a.length, this.value.length]
183
183
  };
184
- return /* @__PURE__ */ f.createElement(ot, { ...p }, this.listContainerContent());
184
+ return /* @__PURE__ */ f.createElement(ne, { ...p }, this.listContainerContent());
185
185
  }, this.renderAdaptiveListContainer = () => {
186
- const { adaptiveTitle: t, adaptiveSubtitle: e, filterable: a, filter: s } = this.props, { windowWidth: o = 0 } = this.state, p = s !== void 0 ? s : this.state.text, c = a ? /* @__PURE__ */ f.createElement(
187
- mt,
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(
187
+ me,
188
188
  {
189
189
  value: p,
190
190
  ref: (i) => {
@@ -198,42 +198,42 @@ const { sizeMap: D, roundedMap: gt } = et, vt = "Please enter a valid value!", A
198
198
  placeholder: this.props.placeholder
199
199
  }
200
200
  ) : null, r = {
201
- title: t || this.props.label,
202
- subTitle: e,
201
+ title: e || this.props.label,
202
+ subTitle: t,
203
203
  expand: this.opened,
204
204
  onClose: (i) => this.closePopup(i),
205
205
  windowWidth: o,
206
206
  mobileFilter: c
207
207
  };
208
- return /* @__PURE__ */ f.createElement(ut, { ...r }, /* @__PURE__ */ f.createElement(ft, null, /* @__PURE__ */ f.createElement("div", { className: "k-list-container" }, this.listContainerContent())));
209
- }, this.closePopup = (t) => {
210
- const e = this.base.initState();
211
- e.syntheticEvent = t, t.stopPropagation(), this.state.focusedIndex !== void 0 && (e.data.focusedIndex = void 0), this.opened && this.base.togglePopup(e), e.events.push({ type: "onClose" });
208
+ return /* @__PURE__ */ f.createElement(fe, { ...r }, /* @__PURE__ */ f.createElement(ge, null, /* @__PURE__ */ f.createElement("div", { className: "k-list-container" }, this.listContainerContent())));
209
+ }, this.closePopup = (e) => {
210
+ const t = this.base.initState();
211
+ 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
212
  const a = this.props.filter !== void 0 ? this.props.filter : this.state.text;
213
- O(a) && a !== "" && this.base.filterChanged("", e), this.state.text && (e.data.text = ""), this.applyState(e);
214
- }, this.onCancel = (t) => {
215
- const e = this.base.initState();
216
- e.syntheticEvent = t, t.stopPropagation(), this.state.focusedIndex !== void 0 && (e.data.focusedIndex = void 0), this.opened && this.base.togglePopup(e), e.events.push({ type: "onCancel" });
213
+ O(a) && a !== "" && this.base.filterChanged("", t), this.state.text && (t.data.text = ""), this.applyState(t);
214
+ }, this.onCancel = (e) => {
215
+ const t = this.base.initState();
216
+ 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
217
  const a = this.props.filter !== void 0 ? this.props.filter : this.state.text;
218
- O(a) && a !== "" && this.base.filterChanged("", e), this.state.text && (e.data.text = ""), this.applyState(e);
218
+ O(a) && a !== "" && this.base.filterChanged("", t), this.state.text && (t.data.text = ""), this.applyState(t);
219
219
  }, this.renderList = () => {
220
220
  const {
221
- textField: t,
222
- listNoDataRender: e,
221
+ textField: e,
222
+ listNoDataRender: t,
223
223
  itemRender: a,
224
224
  groupHeaderItemRender: s,
225
225
  dataItemKey: o,
226
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(), m = `translateY(${r.translate}px)`;
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
228
  return /* @__PURE__ */ f.createElement(
229
- at,
229
+ le,
230
230
  {
231
231
  id: this.base.listBoxId,
232
232
  show: this.opened,
233
233
  data: c.slice(),
234
234
  focusedIndex: i - p.skip,
235
235
  value: this.value,
236
- textField: t,
236
+ textField: e,
237
237
  valueField: o,
238
238
  optionsGuid: this.base.guid,
239
239
  groupField: this.props.groupField,
@@ -243,14 +243,14 @@ const { sizeMap: D, roundedMap: gt } = et, vt = "Please enter a valid value!", A
243
243
  },
244
244
  wrapperStyle: this.mobileMode ? {} : { maxHeight: l.height },
245
245
  wrapperCssClass: "k-list-content",
246
- listStyle: r.enabled ? { transform: m } : void 0,
246
+ listStyle: r.enabled ? { transform: g } : void 0,
247
247
  key: "listKey",
248
248
  skip: p.skip,
249
249
  onClick: this.handleItemClick,
250
250
  itemRender: a,
251
251
  groupHeaderItemRender: s,
252
- noDataRender: e,
253
- onMouseDown: A,
252
+ noDataRender: t,
253
+ onMouseDown: H,
254
254
  onBlur: this.handleBlur,
255
255
  onScroll: this.onScroll,
256
256
  wrapperRef: r.scrollerRef,
@@ -258,13 +258,13 @@ const { sizeMap: D, roundedMap: gt } = et, vt = "Please enter a valid value!", A
258
258
  ariaSetSize: p.total
259
259
  }
260
260
  );
261
- }, this.onScroll = (t) => {
262
- const { vs: e, list: a } = this.base;
263
- e.scrollHandler(t);
261
+ }, this.onScroll = (e) => {
262
+ const { vs: t, list: a } = this.base;
263
+ t.scrollHandler(e);
264
264
  const { groupField: s } = this.props;
265
265
  let o = b(this.props);
266
266
  if (!(!s || !o.length) && s) {
267
- const p = this.itemHeight = this.itemHeight || (e.enabled ? e.itemHeight : a ? a.children[0].offsetHeight : 0), r = t.target.scrollTop - e.skip * p;
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
268
  o = this.base.getGroupedDataModernMode(o, s);
269
269
  let i = o[0][s];
270
270
  for (let l = 1; l < o.length && !(p * l > r); l++)
@@ -273,31 +273,31 @@ const { sizeMap: D, roundedMap: gt } = et, vt = "Please enter a valid value!", A
273
273
  group: i
274
274
  });
275
275
  }
276
- }, this.customItemSelect = (t) => {
277
- const e = this.props.filter !== void 0 ? this.props.filter : this.state.text, { textField: a } = this.props;
278
- if (!e)
276
+ }, this.customItemSelect = (e) => {
277
+ const t = this.props.filter !== void 0 ? this.props.filter : this.state.text, { textField: a } = this.props;
278
+ if (!t)
279
279
  return;
280
280
  const s = this.base.initState();
281
- s.syntheticEvent = t;
282
- const o = a ? { [a]: e } : e;
281
+ s.syntheticEvent = e;
282
+ const o = a ? { [a]: t } : t;
283
283
  this.state.text !== void 0 && (s.data.text = ""), s.data.focusedIndex = void 0, this.base.filterChanged("", s);
284
284
  const p = [...this.value, o];
285
285
  this.triggerOnChange(p, s), this.base.togglePopup(s), this.applyState(s);
286
- }, this.handleWrapperClick = (t) => {
287
- const e = this._input;
288
- !this.opened && e && this.focusElement(e);
286
+ }, this.handleWrapperClick = (e) => {
287
+ const t = this._input;
288
+ !this.opened && t && this.focusElement(t);
289
289
  const a = this.base.initState();
290
- a.syntheticEvent = t, !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);
291
- }, this.handleItemClick = (t, e) => {
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);
291
+ }, this.handleItemClick = (e, t) => {
292
292
  const a = this.base.initState();
293
- a.syntheticEvent = e, this.handleItemSelect(t, a), this.props.autoClose && this.base.togglePopup(a), e.stopPropagation(), this.applyState(a);
294
- }, this.handleBlur = (t) => {
293
+ a.syntheticEvent = t, this.handleItemSelect(e, a), this.props.autoClose && this.base.togglePopup(a), t.stopPropagation(), this.applyState(a);
294
+ }, this.handleBlur = (e) => {
295
295
  if (!this.state.focused || this._skipFocusEvent)
296
296
  return;
297
- const e = this.base.initState(), { allowCustom: a, filterable: s } = this.props;
298
- e.syntheticEvent = t, e.data.focused = !1, e.events.push({ type: "onBlur" }), this.opened && !this.mobileMode && (this.state.opened && (e.data.opened = !1), e.events.push({ type: "onClose" })), !a && !s && this.state.text && (e.data.text = ""), this.applyState(e);
299
- }, this.handleFocus = (t) => {
300
- this._skipFocusEvent || this.base.handleFocus(t);
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);
299
+ }, this.handleFocus = (e) => {
300
+ this._skipFocusEvent || this.base.handleFocus(e);
301
301
  }, this.onPopupOpened = () => {
302
302
  this._input && this.state.focused && !this.mobileMode && this.focusElement(this._input);
303
303
  }, this.onPopupClosed = () => {
@@ -306,9 +306,9 @@ const { sizeMap: D, roundedMap: gt } = et, vt = "Please enter a valid value!", A
306
306
  }, 0);
307
307
  }, this.setValidity = () => {
308
308
  this._input && this._input.setCustomValidity && this._input.setCustomValidity(
309
- this.validity.valid ? "" : this.props.validationMessage || vt
309
+ this.validity.valid ? "" : this.props.validationMessage || be
310
310
  );
311
- }, this.validate(n);
311
+ }, this.validate(n), this.licenseMessage = Q(z);
312
312
  }
313
313
  get _inputId() {
314
314
  return this.props.id;
@@ -319,10 +319,10 @@ const { sizeMap: D, roundedMap: gt } = et, vt = "Please enter a valid value!", A
319
319
  }
320
320
  validate(n) {
321
321
  if (n.filterable || n.virtual) {
322
- const t = [];
323
- n.filterable && t.push("filterable"), n.virtual && t.push("virtualization"), this.showLicenseWatermark = !J(pt, {
322
+ const e = [];
323
+ n.filterable && e.push("filterable"), n.virtual && e.push("virtualization"), this.showLicenseWatermark = !X(z, {
324
324
  component: "MultiSelect",
325
- features: t
325
+ features: e
326
326
  });
327
327
  }
328
328
  }
@@ -336,17 +336,17 @@ const { sizeMap: D, roundedMap: gt } = et, vt = "Please enter a valid value!", A
336
336
  }
337
337
  /** @hidden */
338
338
  get tagsToRender() {
339
- const { tags: n, textField: t } = this.props, e = [];
339
+ const { tags: n, textField: e } = this.props, t = [];
340
340
  return n === void 0 ? this.value.forEach((a) => {
341
- e.push({ text: P(a, t), data: [a] });
342
- }) : e.push(...n), e;
341
+ t.push({ text: P(a, e), data: [a] });
342
+ }) : t.push(...n), t;
343
343
  }
344
344
  /**
345
345
  * The mobile mode of the MultiSelect.
346
346
  */
347
347
  get mobileMode() {
348
- var t;
349
- return !!(this.state.windowWidth && this.props._adaptiveMode && this.state.windowWidth <= ((t = this.props._adaptiveMode) == null ? void 0 : t.medium) && this.props.adaptive);
348
+ var e;
349
+ return !!(this.state.windowWidth && this.props._adaptiveMode && this.state.windowWidth <= ((e = this.props._adaptiveMode) == null ? void 0 : e.medium) && this.props.adaptive);
350
350
  }
351
351
  /**
352
352
  * Represents the value of the MultiSelect.
@@ -365,10 +365,10 @@ const { sizeMap: D, roundedMap: gt } = et, vt = "Please enter a valid value!", A
365
365
  * Represents the validity state into which the MultiSelect is set.
366
366
  */
367
367
  get validity() {
368
- const n = this.props.validationMessage !== void 0, t = !this.required || this.value !== null && this.value.length > 0 && this.value !== void 0, e = this.props.valid !== void 0 ? this.props.valid : t;
368
+ const n = this.props.validationMessage !== void 0, e = !this.required || this.value !== null && this.value.length > 0 && this.value !== void 0, t = this.props.valid !== void 0 ? this.props.valid : e;
369
369
  return {
370
370
  customError: n,
371
- valid: e,
371
+ valid: t,
372
372
  valueMissing: this.value === null
373
373
  };
374
374
  }
@@ -380,14 +380,14 @@ const { sizeMap: D, roundedMap: gt } = et, vt = "Please enter a valid value!", A
380
380
  return this.props.validityStyles !== void 0 ? this.props.validityStyles : y.defaultProps.validityStyles;
381
381
  }
382
382
  /** @hidden */
383
- componentDidUpdate(n, t) {
384
- var m;
385
- const { virtual: e, groupField: a = "" } = this.props, s = b(this.props), o = e ? e.skip : 0, p = n.virtual ? n.virtual.total : 0, c = n.opened !== void 0 ? n.opened : t.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(), e && e.total !== p)
383
+ 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)
387
387
  this.base.vs.calcScrollElementHeight(), this.base.vs.reset();
388
388
  else {
389
389
  let { focusedItem: d, focusedIndex: h } = this.getFocusedState();
390
- a !== "" && (h = (m = this.base.getGroupedDataModernMode(s, a)) == null ? void 0 : m.indexOf(d)), r && e ? this.base.scrollToVirtualItem(e, h - o) : r && !e ? (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);
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);
391
391
  }
392
392
  this.scrollToFocused = !1, this.setValidity();
393
393
  }
@@ -402,17 +402,17 @@ const { sizeMap: D, roundedMap: gt } = et, vt = "Please enter a valid value!", A
402
402
  (n = this.document) != null && n.body && this.observerResize && this.observerResize.disconnect();
403
403
  }
404
404
  /** @hidden */
405
- onNavigate(n, t, e) {
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 = H(p), l = this.base, m = l.vs;
407
- if (this.opened && t === u.up && i)
405
+ 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)
408
408
  this.state.focusedIndex !== void 0 && (n.data.focusedIndex = void 0);
409
409
  else {
410
410
  const d = l.navigation.navigate({
411
- keyCode: t,
411
+ keyCode: e,
412
412
  current: c,
413
- max: (m.enabled ? m.total : s.length) - 1,
413
+ max: (g.enabled ? g.total : s.length) - 1,
414
414
  min: r ? -1 : 0,
415
- skipItems: e || void 0
415
+ skipItems: t || void 0
416
416
  });
417
417
  d !== void 0 && (this.itemFocus(d, n), this.scrollToFocused = !0);
418
418
  }
@@ -422,8 +422,8 @@ const { sizeMap: D, roundedMap: gt } = et, vt = "Please enter a valid value!", A
422
422
  render() {
423
423
  const {
424
424
  style: n,
425
- className: t,
426
- label: e,
425
+ className: e,
426
+ label: t,
427
427
  dir: a,
428
428
  disabled: s,
429
429
  textField: o,
@@ -432,36 +432,36 @@ const { sizeMap: D, roundedMap: gt } = et, vt = "Please enter a valid value!", A
432
432
  size: r,
433
433
  rounded: i,
434
434
  fillMode: l,
435
- loading: m,
435
+ loading: g,
436
436
  filter: d
437
- } = this.props, { text: h, focused: v, focusedTag: x, currentValue: W } = this.state, C = this.base.vs, K = this.props.id || this._inputId;
437
+ } = this.props, { text: h, focused: v, focusedTag: x, currentValue: $ } = this.state, C = this.base.vs, K = this.props.id || this._inputId;
438
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 ? W : this.tagsToRender;
439
+ const S = this.mobileMode && this.opened ? $ : this.tagsToRender;
440
440
  this.setItems(this.tagsToRender, this._tags);
441
- const N = !this.validityStyles || this.validity.valid, $ = !!(d !== void 0 ? d : h) || S && S.length > 0, [q, G] = z(this.props.prefix || f.Fragment), [U, j] = z(this.props.suffix || f.Fragment), R = /* @__PURE__ */ f.createElement(f.Fragment, null, /* @__PURE__ */ f.createElement(
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(
442
442
  "div",
443
443
  {
444
444
  ref: this.componentRef,
445
- className: I("k-multiselect k-input", t, {
445
+ className: I("k-multiselect k-input", e, {
446
446
  [`k-input-${D[r] || r}`]: r,
447
- [`k-rounded-${gt[i] || i}`]: i,
447
+ [`k-rounded-${ve[i] || i}`]: i,
448
448
  [`k-input-${l}`]: l,
449
449
  "k-focus": v && !s,
450
450
  "k-invalid": !N,
451
451
  "k-disabled": s,
452
- "k-loading": m,
452
+ "k-loading": g,
453
453
  "k-required": this.required
454
454
  }),
455
- style: e ? { ...n, width: void 0 } : n,
455
+ style: t ? { ...n, width: void 0 } : n,
456
456
  dir: a,
457
457
  onFocus: (k) => {
458
458
  this.mobileMode ? this.handleWrapperClick(k) : this.handleFocus(k);
459
459
  },
460
460
  onBlur: this.handleBlur,
461
461
  onClick: this.handleWrapperClick,
462
- onMouseDown: rt
462
+ onMouseDown: pe
463
463
  },
464
- this.props.prefix && /* @__PURE__ */ f.createElement(q, { ...G }),
464
+ this.props.prefix && /* @__PURE__ */ f.createElement(G, { ...U }),
465
465
  /* @__PURE__ */ f.createElement("div", { className: I("k-input-values") }, /* @__PURE__ */ f.createElement(
466
466
  "div",
467
467
  {
@@ -470,7 +470,7 @@ const { sizeMap: D, roundedMap: gt } = et, vt = "Please enter a valid value!", A
470
470
  id: "tagslist-" + this.base.guid
471
471
  },
472
472
  S && S.length > 0 && /* @__PURE__ */ f.createElement(
473
- lt,
473
+ re,
474
474
  {
475
475
  tagRender: this.props.tagRender,
476
476
  onTagDelete: this.onTagDelete,
@@ -481,15 +481,15 @@ const { sizeMap: D, roundedMap: gt } = et, vt = "Please enter a valid value!", A
481
481
  }
482
482
  )
483
483
  ), this.renderSearchBar(K)),
484
- m && /* @__PURE__ */ f.createElement(L, { className: "k-input-loading-icon", name: "loading" }),
485
- this.props.suffix && /* @__PURE__ */ f.createElement(U, { ...j }),
486
- $ && /* @__PURE__ */ f.createElement(ct, { onClick: this.clearButtonClick }),
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 }),
487
487
  !this.mobileMode && this.renderListContainer()
488
488
  ), this.mobileMode && this.renderAdaptiveListContainer());
489
- return e ? /* @__PURE__ */ f.createElement(
490
- it,
489
+ return t ? /* @__PURE__ */ f.createElement(
490
+ ae,
491
491
  {
492
- label: e,
492
+ label: t,
493
493
  editorId: K,
494
494
  editorValue: h || P(this.value[0], o),
495
495
  editorValid: N,
@@ -500,12 +500,12 @@ const { sizeMap: D, roundedMap: gt } = et, vt = "Please enter a valid value!", A
500
500
  ) : R;
501
501
  }
502
502
  renderSearchBar(n) {
503
- const { activedescendant: t, focusedTag: e, 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: m } = this.getFocusedState(), d = this.value.length === 0 && !l ? o : void 0, h = a && a.length > 0 ? void 0 : o, v = t === w.TagsList && e !== void 0 ? `tag-${this.base.guid}-${e.text.replace(/\s+/g, "-")}` : `option-${this.base.guid}-${m}`, x = {
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 = {
504
504
  accessKey: this.props.accessKey,
505
505
  tabIndex: this.props.tabIndex
506
506
  };
507
507
  return /* @__PURE__ */ f.createElement(
508
- dt,
508
+ he,
509
509
  {
510
510
  id: n,
511
511
  size: Math.max((d || "").length, l.length, 1),
@@ -528,51 +528,51 @@ const { sizeMap: D, roundedMap: gt } = et, vt = "Please enter a valid value!", A
528
528
  }
529
529
  );
530
530
  }
531
- onTagsNavigate(n, t) {
532
- const e = n.keyCode, { focusedTag: a } = this.state, s = this._tags, o = this.props.dataItemKey;
531
+ onTagsNavigate(n, e) {
532
+ const t = n.keyCode, { focusedTag: a } = this.state, s = this._tags, o = this.props.dataItemKey;
533
533
  let p = a ? s.findIndex((i) => V(i, a, o)) : -1, c;
534
534
  const r = p !== -1;
535
- if (e === u.left)
535
+ if (t === u.left)
536
536
  r ? p = Math.max(0, p - 1) : p = s.length - 1, c = s[p];
537
- else if (e === u.right)
537
+ else if (t === u.right)
538
538
  p === s.length - 1 ? c = void 0 : r && (p = Math.min(s.length - 1, p + 1), c = s[p]);
539
- else if (e === u.home && !n.shiftKey)
539
+ else if (t === u.home && !n.shiftKey)
540
540
  c = s[0];
541
- else if (e === u.end && !n.shiftKey)
541
+ else if (t === u.end && !n.shiftKey)
542
542
  c = s[s.length - 1];
543
- else if (e === u.delete) {
543
+ else if (t === u.delete) {
544
544
  if (r) {
545
545
  const i = this.value;
546
- T(i, s[p].data, o), this.triggerOnChange(i, t);
546
+ T(i, s[p].data, o), this.triggerOnChange(i, e);
547
547
  }
548
- } else if (e === u.backspace) {
548
+ } else if (t === u.backspace) {
549
549
  const i = this.value;
550
550
  if (r)
551
- T(i, s[p].data, o), this.triggerOnChange(i, t);
551
+ T(i, s[p].data, o), this.triggerOnChange(i, e);
552
552
  else if (!r && s.length) {
553
553
  const l = s.pop();
554
- T(i, l.data, o), this.triggerOnChange(i, t);
554
+ T(i, l.data, o), this.triggerOnChange(i, e);
555
555
  }
556
556
  }
557
- c !== a && (t.data.focusedTag = c, t.data.activedescendant = w.TagsList), this.applyState(t);
557
+ c !== a && (e.data.focusedTag = c, e.data.activedescendant = w.TagsList), this.applyState(e);
558
558
  }
559
- triggerOnChange(n, t) {
560
- this.props.value === void 0 && (t.data.value = [...n]), this._valueItemsDuringOnChange = [], this.setItems(n, this._valueItemsDuringOnChange), t.events.push({ type: "onChange" });
559
+ triggerOnChange(n, e) {
560
+ this.props.value === void 0 && (e.data.value = [...n]), this._valueItemsDuringOnChange = [], this.setItems(n, this._valueItemsDuringOnChange), e.events.push({ type: "onChange" });
561
561
  }
562
- selectFocusedItem(n, t) {
563
- const { virtual: e } = this.props, a = b(this.props), { focusedIndex: s } = t || this.getFocusedState(), o = e ? e.skip : 0;
562
+ selectFocusedItem(n, e) {
563
+ const { virtual: t } = this.props, a = b(this.props), { focusedIndex: s } = e || this.getFocusedState(), o = t ? t.skip : 0;
564
564
  a[s - o] !== void 0 && this.handleItemClick(s, n);
565
565
  }
566
- setItems(n, t) {
567
- t.length = 0, t.push(...n);
566
+ setItems(n, e) {
567
+ e.length = 0, e.push(...n);
568
568
  }
569
569
  getFocusedState() {
570
- const { focusedIndex: n } = this.state, t = this.props.filter !== void 0 ? this.props.filter : this.state.text, {
571
- allowCustom: e,
570
+ const { focusedIndex: n } = this.state, e = this.props.filter !== void 0 ? this.props.filter : this.state.text, {
571
+ allowCustom: t,
572
572
  dataItemKey: a,
573
573
  virtual: s,
574
574
  textField: o,
575
- focusedItemIndex: p = ht,
575
+ focusedItemIndex: p = ce,
576
576
  skipDisabledItems: c
577
577
  } = this.props, r = b(this.props), i = s && s.skip || 0;
578
578
  let l;
@@ -583,30 +583,30 @@ const { sizeMap: D, roundedMap: gt } = et, vt = "Please enter a valid value!", A
583
583
  focusedType: 1
584
584
  /* ListItem */
585
585
  };
586
- const m = this.value;
587
- if (e && t)
586
+ const g = this.value;
587
+ if (t && e)
588
588
  return {
589
589
  focusedItem: null,
590
590
  focusedIndex: -1,
591
591
  focusedType: 2
592
592
  /* CustomItem */
593
593
  };
594
- if (t)
595
- return l = p(r, t, o), {
594
+ if (e)
595
+ return l = p(r, e, o), {
596
596
  focusedItem: r[l],
597
597
  focusedIndex: l + i,
598
598
  focusedType: 1
599
599
  /* ListItem */
600
600
  };
601
- if (m.length) {
602
- const d = m[m.length - 1];
603
- return l = r.findIndex((h) => M(h, d, a)), r[l] !== void 0 ? {
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
604
  focusedIndex: l + i,
605
605
  focusedItem: r[l],
606
606
  focusedType: 1
607
607
  /* ListItem */
608
608
  } : { focusedType: 0, focusedIndex: -1 };
609
- } else if (c && o && !t && i === 0) {
609
+ } else if (c && o && !e && i === 0) {
610
610
  const d = r.findIndex((h) => !h.disabled && h[o]);
611
611
  return {
612
612
  focusedIndex: d,
@@ -629,8 +629,8 @@ const { sizeMap: D, roundedMap: gt } = et, vt = "Please enter a valid value!", A
629
629
  this.base.applyState(n), this._valueItemsDuringOnChange = null;
630
630
  }
631
631
  calculateMedia(n) {
632
- for (const t of n)
633
- this.setState({ windowWidth: t.target.clientWidth });
632
+ for (const e of n)
633
+ this.setState({ windowWidth: e.target.clientWidth });
634
634
  }
635
635
  /**
636
636
  * Updates the state of the MultiSelect when the complex keyboard navigation that
@@ -639,45 +639,45 @@ const { sizeMap: D, roundedMap: gt } = et, vt = "Please enter a valid value!", A
639
639
  * @param {Array<string | Object>} dataToSet Defines the array of new values that will be applied to the MultiSelect
640
640
  * @param {MultiSelectInternalState} state The current state of the MultiSelect
641
641
  */
642
- updateStateOnKeyboardNavigation(n, t) {
643
- this.setState({ value: n }), this.triggerOnChange(n, t), this.applyState(t);
642
+ updateStateOnKeyboardNavigation(n, e) {
643
+ this.setState({ value: n }), this.triggerOnChange(n, e), this.applyState(e);
644
644
  }
645
645
  /**
646
646
  * Returns the last element that was selected or deselected. Needed for the keyboard navigation specifications
647
647
  *
648
648
  * @param {number} correction A correction is needed depending on if UP or DOWN key is pressed
649
649
  */
650
- getLastSelectedOrDeselectedIndex(n, t) {
651
- return this._lastSelectedOrDeslectedItemIndex === null && (this._lastSelectedOrDeslectedItemIndex = t), this._lastSelectedOrDeslectedItemIndex !== null ? this._lastSelectedOrDeslectedItemIndex + n : null;
650
+ getLastSelectedOrDeselectedIndex(n, e) {
651
+ return this._lastSelectedOrDeslectedItemIndex === null && (this._lastSelectedOrDeslectedItemIndex = e), this._lastSelectedOrDeslectedItemIndex !== null ? this._lastSelectedOrDeslectedItemIndex + n : null;
652
652
  }
653
653
  };
654
654
  y.displayName = "MultiSelect", y.propTypes = {
655
- ...E.propTypes,
656
- autoClose: g.bool,
657
- value: g.arrayOf(g.any),
658
- defaultValue: g.arrayOf(g.any),
659
- dataItemKey: g.string,
660
- placeholder: g.string,
661
- tags: g.arrayOf(
662
- g.shape({
663
- text: g.string,
664
- data: g.arrayOf(g.any)
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)
665
665
  })
666
666
  ),
667
- tagRender: g.func,
668
- id: g.string,
669
- ariaLabelledBy: g.string,
670
- ariaDescribedBy: g.string,
671
- groupField: g.string,
672
- list: g.any,
673
- adaptive: g.bool,
674
- adaptiveTitle: g.string,
675
- adaptiveSubtitle: g.string,
676
- onCancel: g.func,
677
- skipDisabledItems: g.bool,
678
- inputAttributes: g.object
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
679
  }, y.defaultProps = {
680
- ...E.defaultProps,
680
+ ...M.defaultProps,
681
681
  autoClose: !0,
682
682
  required: !1,
683
683
  size: "medium",
@@ -689,15 +689,15 @@ y.displayName = "MultiSelect", y.propTypes = {
689
689
  suffix: void 0
690
690
  };
691
691
  let _ = y;
692
- const bt = Q(), It = X(
693
- Z(
694
- bt,
695
- tt(_)
692
+ const Ie = Z(), ye = ee(
693
+ te(
694
+ Ie,
695
+ se(_)
696
696
  )
697
697
  );
698
- It.displayName = "KendoReactMultiSelect";
698
+ ye.displayName = "KendoReactMultiSelect";
699
699
  export {
700
- It as MultiSelect,
701
- bt as MultiSelectPropsContext,
700
+ ye as MultiSelect,
701
+ Ie as MultiSelectPropsContext,
702
702
  _ as MultiSelectWithoutContext
703
703
  };