@progress/kendo-react-dropdowns 8.2.0 → 8.2.1-develop.1

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