@progress/kendo-react-dropdowns 15.2.0-develop.3 → 15.2.0-develop.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5,218 +5,245 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- import * as g from "react";
9
- import v from "prop-types";
10
- import { createPropsContext as et, Keys as u, classNames as S, kendoThemeMaps as st, IconWrap as B, WatermarkOverlay as it, getLicenseMessage as ot, canUseDOM as z, validatePackage as at, subscribeToKendoPaste as nt, withIdHOC as lt, withPropsContext as dt, withAdaptiveModeContext as rt } from "@progress/kendo-react-common";
11
- import { plusIcon as ht } from "@progress/kendo-svg-icons";
12
- import { FloatingLabel as pt } from "@progress/kendo-react-labels";
13
- import { provideLocalizationService as V, registerForLocalization as ct } from "@progress/kendo-react-intl";
14
- import ut from "../common/ListContainer.mjs";
15
- import ft from "../common/List.mjs";
16
- import gt from "../common/GroupStickyHeader.mjs";
17
- import mt from "./TagList.mjs";
18
- import vt from "../common/SearchBar.mjs";
19
- import E from "../common/DropDownBase.mjs";
20
- import { ActiveDescendant as w } from "../common/settings.mjs";
21
- import { getFilteredData as x, getItemIndexByText as bt, areSame as F, removeDataItems as D, isPresent as K, getItemValue as _, preventDefaultNonInputs as It, matchTags as A, itemIndexStartsWith as yt } from "../common/utils.mjs";
22
- import { packageMetadata as H } from "../package-metadata.mjs";
23
- import xt from "../common/ClearButton.mjs";
24
- import { AdaptiveMode as St } from "../common/AdaptiveMode.mjs";
25
- import { ActionSheetContent as Ct } from "@progress/kendo-react-layout";
26
- import kt from "../common/ListFilter.mjs";
8
+ import * as f from "react";
9
+ import b from "prop-types";
10
+ import { createPropsContext as ie, Keys as u, classNames as C, kendoThemeMaps as oe, WatermarkOverlay as ae, getLicenseMessage as le, canUseDOM as V, validatePackage as ne, subscribeToKendoPaste as de, IconWrap as re, withIdHOC as he, withPropsContext as ce, withAdaptiveModeContext as pe } from "@progress/kendo-react-common";
11
+ import { FloatingLabel as ue } from "@progress/kendo-react-labels";
12
+ import { provideLocalizationService as w, registerForLocalization as fe } from "@progress/kendo-react-intl";
13
+ import { Checkbox as ge } from "@progress/kendo-react-inputs";
14
+ import me from "../common/ListContainer.mjs";
15
+ import ve from "../common/List.mjs";
16
+ import be from "../common/GroupStickyHeader.mjs";
17
+ import Ie from "./TagList.mjs";
18
+ import Se from "../common/SearchBar.mjs";
19
+ import M from "../common/DropDownBase.mjs";
20
+ import { ActiveDescendant as T } from "../common/settings.mjs";
21
+ import { getFilteredData as y, getItemIndexByText as ye, areSame as x, removeDataItems as O, isPresent as L, getItemValue as D, preventDefaultNonInputs as xe, matchTags as H, itemIndexStartsWith as Ce } from "../common/utils.mjs";
22
+ import { packageMetadata as W } from "../package-metadata.mjs";
23
+ import ke from "../common/ClearButton.mjs";
24
+ import { AdaptiveMode as Fe } from "../common/AdaptiveMode.mjs";
25
+ import { ActionSheetContent as we } from "@progress/kendo-react-layout";
26
+ import Te from "../common/ListFilter.mjs";
27
27
  import $ from "../common/withCustomComponent.mjs";
28
- import { listAriaLabel as W, messages as q, chipListAriaLabel as G } from "../messages/index.mjs";
29
- const { sizeMap: P, roundedMap: wt } = st, Tt = "Please enter a valid value!", U = (O) => O.preventDefault(), j = (O) => O === 2, C = class C extends g.Component {
28
+ import { selectAllText as q, messages as A, listAriaLabel as G, itemsSelectedText as U, summaryTagText as j, chipListAriaLabel as Y } from "../messages/index.mjs";
29
+ const { sizeMap: _, roundedMap: De } = oe, Ae = "Please enter a valid value!", N = (P) => P.preventDefault(), J = (P) => P === 2, k = class k extends f.Component {
30
30
  constructor(l) {
31
31
  super(l), this.state = {
32
- activedescendant: w.PopupList,
32
+ activedescendant: T.PopupList,
33
33
  currentValue: []
34
- }, 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 = () => {
34
+ }, 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 = () => {
35
35
  this._input && this._input.focus();
36
- }, this.handleKendoPasteValue = (t) => {
37
- if (t == null)
36
+ }, this.handleKendoPasteValue = (e) => {
37
+ if (e == null)
38
38
  return;
39
- const e = x(this.props), { textField: o, dataItemKey: s } = this.props, a = String(t).split(",").map((r) => r.trim()).filter((r) => r).reduce((r, p) => {
40
- const d = bt(e, p, o, !1, !0);
39
+ const t = y(this.props), { textField: o, dataItemKey: i } = this.props, a = String(e).split(",").map((r) => r.trim()).filter((r) => r).reduce((r, h) => {
40
+ const d = ye(t, h, o, !1, !0);
41
41
  if (d !== -1) {
42
- const n = e[d];
43
- r.some((h) => F(h, n, s)) || r.push(n);
42
+ const n = t[d];
43
+ r.some((c) => x(c, n, i)) || r.push(n);
44
44
  }
45
45
  return r;
46
46
  }, []);
47
47
  if (a.length === 0)
48
48
  return;
49
- const i = this.base.initState();
50
- i.syntheticEvent = { target: this._element }, this.triggerOnChange(a, i), this.applyState(i);
51
- }, this.handleItemSelect = (t, e) => {
52
- const { dataItemKey: o, virtual: s } = this.props, a = x(this.props), i = s ? s.skip : 0, r = a[t - i], p = this.value.findIndex((h) => F(h, r, o));
53
- this._lastSelectedOrDeslectedItemIndex = a.findIndex((h) => F(h, r, o));
49
+ const s = this.base.initState();
50
+ s.syntheticEvent = { target: this._element }, this.triggerOnChange(a, s), this.applyState(s);
51
+ }, this.handleItemSelect = (e, t) => {
52
+ this.state.selectAllFocused && (t.data.selectAllFocused = !1);
53
+ const { dataItemKey: o, virtual: i } = this.props, a = y(this.props), s = i ? i.skip : 0, r = a[e - s], h = this.value.findIndex((c) => x(c, r, o));
54
+ this._lastSelectedOrDeslectedItemIndex = a.findIndex((c) => x(c, r, o));
54
55
  let d = [];
55
- p !== -1 ? (d = this.value, d.splice(p, 1)) : d = [...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(d, e), this.base.triggerPageChangeCornerItems(r, e);
56
- }, this.onTagDelete = (t, e) => {
56
+ h !== -1 ? (d = this.value, d.splice(h, 1)) : d = [...this.value, r], (this.props.filter !== void 0 ? this.props.filter : this.state.text) && !this.mobileMode && !this.props.checkboxes && (this.state.text && (t.data.text = ""), this.base.filterChanged("", t)), this._adaptiveInput && this._adaptiveInput.blur(), t.data.focusedIndex = e, this.triggerOnChange(d, t), this.base.triggerPageChangeCornerItems(r, t);
57
+ }, this.onTagDelete = (e, t) => {
57
58
  const o = this.base.initState();
58
- o.syntheticEvent = e, this.opened && this.base.togglePopup(o), !this.state.focused && !this.mobileMode && (o.data.focused = !0, this.focus());
59
- const s = this.value;
60
- D(s, t, this.props.dataItemKey), this.triggerOnChange(s, o), this.applyState(o);
61
- }, this.itemFocus = (t, e) => {
62
- const { allowCustom: o, virtual: s } = this.props, a = x(this.props), i = s ? s.skip : 0, r = s ? s.pageSize : 0, p = this.props.filter !== void 0 ? this.props.filter : this.state.text, { focusedIndex: d } = this.getFocusedState(), n = o && p, h = a[t - i];
63
- if (s && !h && t >= 0 && d !== t) {
64
- const f = Math.floor(t / r) * r;
65
- if (f !== i) {
66
- this.state.focusedIndex !== t && (e.data.focusedIndex = t, e.data.activedescendant = w.PopupList), this.base.triggerOnPageChange(e, f, r);
59
+ o.syntheticEvent = t, this.opened && this.base.togglePopup(o), !this.state.focused && !this.mobileMode && (o.data.focused = !0, this.focus());
60
+ const i = this.value;
61
+ O(i, e, this.props.dataItemKey), this.triggerOnChange(i, o), this.applyState(o);
62
+ }, this.itemFocus = (e, t) => {
63
+ const { allowCustom: o, virtual: i } = this.props, a = y(this.props), s = i ? i.skip : 0, r = i ? i.pageSize : 0, h = this.props.filter !== void 0 ? this.props.filter : this.state.text, { focusedIndex: d } = this.getFocusedState(), n = o && h, c = a[e - s];
64
+ if (i && !c && e >= 0 && d !== e) {
65
+ const m = Math.floor(e / r) * r;
66
+ if (m !== s) {
67
+ this.state.focusedIndex !== e && (t.data.focusedIndex = e, t.data.activedescendant = T.PopupList), this.base.triggerOnPageChange(t, m, r);
67
68
  return;
68
69
  }
69
70
  }
70
- h && d !== t ? this.state.focusedIndex !== t && (e.data.focusedIndex = t, e.data.activedescendant = w.PopupList) : n && t === -1 && this.state.focusedIndex !== void 0 && (e.data.focusedIndex = void 0), this.base.triggerPageChangeCornerItems(h, e);
71
- }, this.componentRef = (t) => {
72
- this._element = t, this.base.wrapper = t;
73
- }, this.searchbarRef = (t) => {
74
- const e = this._input = t && t.input;
75
- e && this.state.focused && window.setTimeout(() => e.focus(), 0);
76
- }, this.onChangeHandler = (t) => {
77
- const e = this.base.initState(), o = t.target.value;
78
- e.syntheticEvent = t, this.props.filter === void 0 && (e.data.text = o), e.data.focusedIndex = void 0, this.opened ? this.scrollToFocused = !0 : (this.base.togglePopup(e), this.setState({ currentValue: this.value })), this.base.filterChanged(o, e), this.applyState(e), this.setState({ group: void 0 });
79
- }, this.clearButtonClick = (t) => {
80
- const e = this.base.initState();
81
- 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);
71
+ c && d !== e ? this.state.focusedIndex !== e && (t.data.focusedIndex = e, t.data.activedescendant = T.PopupList) : n && e === -1 && this.state.focusedIndex !== void 0 && (t.data.focusedIndex = void 0), this.base.triggerPageChangeCornerItems(c, t);
72
+ }, this.componentRef = (e) => {
73
+ this._element = e, this.base.wrapper = e;
74
+ }, this.searchbarRef = (e) => {
75
+ const t = this._input = e && e.input;
76
+ t && this.state.focused && window.setTimeout(() => t.focus(), 0);
77
+ }, this.onChangeHandler = (e) => {
78
+ const t = this.base.initState(), o = e.target.value;
79
+ t.syntheticEvent = e, this.props.filter === void 0 && (t.data.text = o), t.data.focusedIndex = void 0, this.opened ? this.scrollToFocused = !0 : (this.base.togglePopup(t), this.setState({ currentValue: this.value })), this.base.filterChanged(o, t), this.applyState(t), this.setState({ group: void 0 });
80
+ }, this.clearButtonClick = (e) => {
81
+ const t = this.base.initState();
82
+ 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);
82
83
  const o = this.props.filter !== void 0 ? this.props.filter : this.state.text;
83
- K(o) && o !== "" && this.base.filterChanged("", e), this.state.text && (e.data.text = ""), this._lastSelectedOrDeslectedItemIndex = null, this.applyState(e);
84
- }, this.onInputKeyDown = (t) => {
85
- const { textField: e, groupField: o, virtual: s } = this.props, a = x(this.props), i = t.keyCode, r = this.props.filter !== void 0 ? this.props.filter : this.state.text, p = this.props.opened !== void 0 ? this.props.opened : this.state.opened, { focusedItem: d, focusedIndex: n } = this.getFocusedState(), h = this.base.initState();
86
- if (h.syntheticEvent = t, !r && this.value.length > 0 && (i === u.left || i === u.right || i === u.home || i === u.end || i === u.delete || i === u.backspace) && !t.shiftKey)
87
- return this.onTagsNavigate(t, h);
88
- const f = () => {
89
- t.preventDefault(), this.base.togglePopup(h), this.applyState(h);
84
+ L(o) && o !== "" && this.base.filterChanged("", t), this.state.text && (t.data.text = ""), this._lastSelectedOrDeslectedItemIndex = null, this.applyState(t);
85
+ }, this.onInputKeyDown = (e) => {
86
+ const { textField: t, groupField: o, virtual: i } = this.props, a = y(this.props), s = e.keyCode, r = this.props.filter !== void 0 ? this.props.filter : this.state.text, h = this.props.opened !== void 0 ? this.props.opened : this.state.opened, { focusedItem: d, focusedIndex: n } = this.getFocusedState(), c = this.base.initState();
87
+ if (c.syntheticEvent = e, !r && this.value.length > 0 && (s === u.left || s === u.right || s === u.home || s === u.end || s === u.delete || s === u.backspace) && !e.shiftKey)
88
+ return this.onTagsNavigate(e, c);
89
+ const m = () => {
90
+ e.preventDefault(), this.base.togglePopup(c), this.applyState(c);
90
91
  };
91
92
  if (this.opened)
92
- if (i === u.pageUp)
93
- t.preventDefault(), this.base.scrollPopupByPageSize(-1);
94
- else if (i === u.pageDown)
95
- t.preventDefault(), this.base.scrollPopupByPageSize(1);
96
- else if ((t.ctrlKey || t.metaKey) && t.code === "KeyA") {
97
- const b = (this.state.value && this.state.value.length) === a.length ? [] : a;
98
- this.updateStateOnKeyboardNavigation(b, h);
99
- } else if ((t.ctrlKey || t.metaKey) && t.shiftKey && t.keyCode === u.end) {
100
- const c = a.slice(this.getFocusedState().focusedIndex);
101
- this.itemFocus(a.length - 1, h), this.updateStateOnKeyboardNavigation(c, h);
102
- } else if ((t.ctrlKey || t.metaKey) && t.shiftKey && t.keyCode === u.home) {
103
- const c = a.slice(0, this.getFocusedState().focusedIndex + 1);
104
- this.itemFocus(0, h), this.updateStateOnKeyboardNavigation(c, h);
105
- } else if (t.shiftKey && t.keyCode === u.up) {
106
- let c;
107
- const b = this.getLastSelectedOrDeselectedIndex(1, n);
108
- b === null ? c = n !== 0 ? a.slice(n - 1, n) : [a[n]] : b === n ? c = [a[b - 1]] : n >= 0 && (c = b > n ? a.slice(n - 1, b) : a.slice(b - 1, n)), c && c.length > 0 && (n >= 1 && this.itemFocus(n - 1, h), this.updateStateOnKeyboardNavigation(c, h));
109
- } else if (t.shiftKey && t.keyCode === u.down) {
110
- let c;
111
- const b = this.getLastSelectedOrDeselectedIndex(0, n);
112
- b === null ? c = n !== a.length - 1 ? a.slice(n, n + 1) : [a[n]] : b === n ? c = a.slice(n, n + 2) : n >= 0 && (c = b > n ? a.slice(n + 1, b + 1) : a.slice(b, n + 2)), c && c.length >= 1 && (this.itemFocus(n + 1, h), this.updateStateOnKeyboardNavigation(c, h));
113
- } else if (t.altKey && i === u.up)
114
- f();
115
- else if (i === u.up || i === u.down) {
116
- const c = s ? s.skip : 0, b = n - c;
117
- if (o !== "" && e)
118
- if (!this.props.skipDisabledItems && p)
119
- this.onNavigate(h, i);
93
+ if (s === u.pageUp)
94
+ e.preventDefault(), this.base.scrollPopupByPageSize(-1);
95
+ else if (s === u.pageDown)
96
+ e.preventDefault(), this.base.scrollPopupByPageSize(1);
97
+ else if ((e.ctrlKey || e.metaKey) && e.code === "KeyA") {
98
+ const v = (this.state.value && this.state.value.length) === a.length ? [] : a;
99
+ c.data.focusedIndex = void 0, this.updateStateOnKeyboardNavigation(v, c);
100
+ } else if ((e.ctrlKey || e.metaKey) && e.shiftKey && e.keyCode === u.end) {
101
+ const p = a.slice(this.getFocusedState().focusedIndex);
102
+ this.itemFocus(a.length - 1, c), this.updateStateOnKeyboardNavigation(p, c);
103
+ } else if ((e.ctrlKey || e.metaKey) && e.shiftKey && e.keyCode === u.home) {
104
+ const p = a.slice(0, this.getFocusedState().focusedIndex + 1);
105
+ this.itemFocus(0, c), this.updateStateOnKeyboardNavigation(p, c);
106
+ } else if (e.shiftKey && e.keyCode === u.up) {
107
+ let p;
108
+ const v = this.getLastSelectedOrDeselectedIndex(1, n);
109
+ v === null ? p = n !== 0 ? a.slice(n - 1, n) : [a[n]] : v === n ? p = [a[v - 1]] : n >= 0 && (p = v > n ? a.slice(n - 1, v) : a.slice(v - 1, n)), p && p.length > 0 && (n >= 1 && this.itemFocus(n - 1, c), this.updateStateOnKeyboardNavigation(p, c));
110
+ } else if (e.shiftKey && e.keyCode === u.down) {
111
+ let p;
112
+ const v = this.getLastSelectedOrDeselectedIndex(0, n);
113
+ v === null ? p = n !== a.length - 1 ? a.slice(n, n + 1) : [a[n]] : v === n ? p = a.slice(n, n + 2) : n >= 0 && (p = v > n ? a.slice(n + 1, v + 1) : a.slice(v, n + 2)), p && p.length >= 1 && (this.itemFocus(n + 1, c), this.updateStateOnKeyboardNavigation(p, c));
114
+ } else if (e.altKey && s === u.up)
115
+ m();
116
+ else if (s === u.up || s === u.down) {
117
+ const p = i ? i.skip : 0, v = n - p;
118
+ if (o !== "" && t)
119
+ if (!this.props.skipDisabledItems && h)
120
+ this.onNavigate(c, s);
120
121
  else {
121
- let m = 0;
122
- if (i === u.down || i === u.right) {
123
- const I = a.slice(b + 1).find((y) => !y.disabled);
124
- m = I && a.indexOf(I), m && m !== -1 && (m = m + c);
125
- } else if (i === u.up || i === u.left) {
122
+ let g = 0;
123
+ if (s === u.down || s === u.right) {
124
+ const I = a.slice(v + 1).find((S) => !S.disabled);
125
+ g = I && a.indexOf(I), g && g !== -1 && (g = g + p);
126
+ } else if (s === u.up || s === u.left) {
126
127
  let I;
127
128
  if (n === -1)
128
- I = a, m = a.findIndex((y) => !y.disabled), m !== -1 && (m = m + c);
129
+ I = a, g = a.findIndex((S) => !S.disabled), g !== -1 && (g = g + p);
129
130
  else {
130
- I = a.slice(0, b);
131
- let y = I.pop();
132
- for (; y && y.disabled; )
133
- y = I.pop();
134
- m = y && a.indexOf(y), m && m !== -1 && (m = m + c);
131
+ I = a.slice(0, v);
132
+ let S = I.pop();
133
+ for (; S && S.disabled; )
134
+ S = I.pop();
135
+ g = S && a.indexOf(S), g && g !== -1 && (g = g + p);
135
136
  }
136
137
  }
137
- if (m) {
138
- const I = m - n;
139
- this.onNavigate(h, i, I);
138
+ if (g) {
139
+ const I = g - n;
140
+ this.onNavigate(c, s, I);
140
141
  } else
141
- this.onNavigate(h, i);
142
+ this.onNavigate(c, s);
142
143
  }
143
- else if (!this.props.skipDisabledItems && p)
144
- this.onNavigate(h, i);
144
+ else if (!this.props.skipDisabledItems && h)
145
+ this.onNavigate(c, s);
145
146
  else {
146
- let m = null;
147
- if (i === u.down || i === u.right)
148
- m = a.slice(b + 1).find((I) => !I.disabled);
149
- else if (i === u.up || i === u.left) {
150
- const I = a.slice(0, b);
151
- for (m = I.pop(); m && m.disabled; )
152
- m = I.pop();
147
+ let g = null;
148
+ if (s === u.down || s === u.right)
149
+ g = a.slice(v + 1).find((I) => !I.disabled);
150
+ else if (s === u.up || s === u.left) {
151
+ const I = a.slice(0, v);
152
+ for (g = I.pop(); g && g.disabled; )
153
+ g = I.pop();
153
154
  }
154
- if (m) {
155
- const I = a.indexOf(m);
155
+ if (g) {
156
+ const I = a.indexOf(g);
156
157
  if (I !== -1) {
157
- const y = c + I - n;
158
- this.onNavigate(h, i, y);
158
+ const S = p + I - n;
159
+ this.onNavigate(c, s, S);
159
160
  } else
160
- this.onNavigate(h, i);
161
+ this.onNavigate(c, s);
161
162
  } else
162
- this.onNavigate(h, i);
163
+ this.onNavigate(c, s);
163
164
  }
164
- this.applyState(h), t.preventDefault();
165
- } else i === u.enter ? (t.preventDefault(), this.props.allowCustom && r && d === null ? this.customItemSelect(t) : d && d.disabled ? f() : this.selectFocusedItem(t)) : i === u.esc && f();
166
- else t.altKey && i === u.down ? f() : i === u.esc && this.clearButtonClick(t);
165
+ this.applyState(c), e.preventDefault();
166
+ } else if (s === u.enter || s === u.space && this.state.selectAllFocused)
167
+ if (e.preventDefault(), this.state.selectAllFocused) {
168
+ const p = this.base.initState();
169
+ p.syntheticEvent = e, this.toggleSelectAll(p), this.applyState(p);
170
+ } else this.props.allowCustom && r && d === null ? this.customItemSelect(e) : d && d.disabled ? m() : this.selectFocusedItem(e);
171
+ else s === u.esc && m();
172
+ else e.altKey && s === u.down || s === u.space && this.props.selectAll ? m() : s === u.esc && this.clearButtonClick(e);
167
173
  }, this.listContainerContent = () => {
168
- const { header: t, footer: e, allowCustom: o, size: s, groupStickyHeaderItemRender: a, groupField: i, list: r } = this.props, p = x(this.props), d = this.props.filter !== void 0 ? this.props.filter : this.state.text, { focusedType: n } = this.getFocusedState(), h = o && d && /* @__PURE__ */ g.createElement(
174
+ const { header: e, footer: t, allowCustom: o, size: i, groupStickyHeaderItemRender: a, groupField: s, list: r, selectAll: h } = this.props, d = y(this.props), n = this.props.filter !== void 0 ? this.props.filter : this.state.text, { focusedType: c } = this.getFocusedState(), m = o && n && /* @__PURE__ */ f.createElement(
169
175
  "div",
170
176
  {
171
- className: S("k-list", {
172
- [`k-list-${P[s] || s}`]: s
173
- }),
177
+ className: C("k-list-custom-value", { "k-focus": J(c) }),
174
178
  key: "customitem",
175
179
  onClick: this.customItemSelect,
176
- onMouseDown: U
180
+ onMouseDown: N
177
181
  },
178
- /* @__PURE__ */ g.createElement(
179
- "div",
180
- {
181
- className: S("k-list-item k-custom-item", { "k-focus": j(n) }),
182
- style: { fontStyle: "italic" }
183
- },
184
- d,
185
- /* @__PURE__ */ g.createElement(B, { name: "plus", icon: ht, style: { position: "absolute", right: "0.5em" } })
186
- )
182
+ n
187
183
  );
188
- let { group: f } = this.state;
189
- return f === void 0 && i !== void 0 && (f = _(p[0], i)), /* @__PURE__ */ g.createElement(g.Fragment, null, t && /* @__PURE__ */ g.createElement("div", { className: "k-list-header" }, t), h, /* @__PURE__ */ g.createElement(
184
+ let { group: p } = this.state;
185
+ return p === void 0 && s !== void 0 && (p = D(d[0], s)), /* @__PURE__ */ f.createElement(f.Fragment, null, e && /* @__PURE__ */ f.createElement("div", { className: "k-list-header" }, e), /* @__PURE__ */ f.createElement(
190
186
  "div",
191
187
  {
192
- className: S("k-list", {
193
- [`k-list-${this.mobileMode ? "lg" : P[s] || s}`]: this.mobileMode || s,
188
+ className: C("k-list", {
189
+ [`k-list-${this.mobileMode ? "lg" : _[i] || i}`]: this.mobileMode || i,
194
190
  "k-virtual-list": this.base.vs.enabled
195
191
  })
196
192
  },
197
- !r && f && p.length !== 0 && /* @__PURE__ */ g.createElement(gt, { group: f, render: a }),
193
+ h && this.renderSelectAllItem(),
194
+ !r && p && d.length !== 0 && /* @__PURE__ */ f.createElement(be, { group: p, render: a }),
195
+ m,
198
196
  this.renderList()
199
- ), this.showLicenseWatermark && /* @__PURE__ */ g.createElement(it, { message: this.licenseMessage }), e && /* @__PURE__ */ g.createElement("div", { className: "k-list-footer" }, e));
197
+ ), this.showLicenseWatermark && /* @__PURE__ */ f.createElement(ae, { message: this.licenseMessage }), t && /* @__PURE__ */ f.createElement("div", { className: "k-list-footer" }, t));
198
+ }, this.renderSelectAllItem = () => {
199
+ const { checkboxes: e } = this.props, t = this.areAllSelectableItemsSelected(), o = !t && this.areSomeSelectableItemsSelected(), a = w(this).toLanguageString(q, A[q]), s = this.state.selectAllFocused;
200
+ return /* @__PURE__ */ f.createElement("div", { className: "k-list-sticky-header" }, /* @__PURE__ */ f.createElement(
201
+ "div",
202
+ {
203
+ className: C("k-list-sticky-header-item", {
204
+ "k-selected": !e && t,
205
+ "k-focus": s
206
+ }),
207
+ "aria-label": a,
208
+ ...!e && {
209
+ role: "button",
210
+ tabIndex: 0,
211
+ "aria-pressed": o ? "mixed" : t
212
+ },
213
+ onClick: this.handleSelectAllItemClick,
214
+ onKeyDown: this.handleSelectAllItemKeyDown,
215
+ onMouseDown: N
216
+ },
217
+ e && /* @__PURE__ */ f.createElement(
218
+ ge,
219
+ {
220
+ checked: o ? null : t,
221
+ "aria-label": a,
222
+ tabIndex: -1
223
+ }
224
+ ),
225
+ /* @__PURE__ */ f.createElement("span", { className: "k-list-item-text" }, a)
226
+ ));
200
227
  }, this.renderListContainer = () => {
201
- const t = this.base, { dir: e } = this.props, o = x(this.props), s = this.base.getPopupSettings(), a = s.width !== void 0 ? s.width : t.popupWidth, i = {
202
- dir: e !== void 0 ? e : t.dirCalculated,
228
+ const e = this.base, { dir: t } = this.props, o = y(this.props), i = this.base.getPopupSettings(), a = i.width !== void 0 ? i.width : e.popupWidth, s = {
229
+ dir: t !== void 0 ? t : e.dirCalculated,
203
230
  width: a,
204
231
  popupSettings: {
205
- ...s,
206
- popupClass: S(s.popupClass, "k-list-container", "k-multiselect-popup"),
207
- anchor: s.anchor || this.element,
232
+ ...i,
233
+ popupClass: C(i.popupClass, "k-list-container", "k-multiselect-popup"),
234
+ anchor: i.anchor || this.element,
208
235
  show: this.opened,
209
236
  onOpen: this.onPopupOpened,
210
237
  onClose: this.onPopupClosed
211
238
  },
212
239
  itemsCount: [o.length, this.value.length]
213
240
  };
214
- return /* @__PURE__ */ g.createElement(ut, { ...i }, this.listContainerContent());
241
+ return /* @__PURE__ */ f.createElement(me, { ...s }, this.listContainerContent());
215
242
  }, this.renderAdaptiveListContainer = () => {
216
- const { adaptiveTitle: t, adaptiveSubtitle: e, filterable: o, filter: s } = this.props, { windowWidth: a = 0 } = this.state, i = s !== void 0 ? s : this.state.text, r = o ? /* @__PURE__ */ g.createElement(
217
- kt,
243
+ const { adaptiveTitle: e, adaptiveSubtitle: t, filterable: o, filter: i } = this.props, { windowWidth: a = 0 } = this.state, s = i !== void 0 ? i : this.state.text, r = o ? /* @__PURE__ */ f.createElement(
244
+ Te,
218
245
  {
219
- value: i,
246
+ value: s,
220
247
  ref: (d) => {
221
248
  this._adaptiveInput = d && d.element;
222
249
  },
@@ -227,107 +254,118 @@ const { sizeMap: P, roundedMap: wt } = st, Tt = "Please enter a valid value!", U
227
254
  fillMode: this.props.fillMode,
228
255
  placeholder: this.props.placeholder
229
256
  }
230
- ) : null, p = {
231
- title: t || this.props.label,
232
- subTitle: e,
257
+ ) : null, h = {
258
+ title: e || this.props.label,
259
+ subTitle: t,
233
260
  expand: this.opened,
234
261
  onClose: (d) => this.closePopup(d),
235
262
  windowWidth: a,
236
263
  mobileFilter: r
237
264
  };
238
- return /* @__PURE__ */ g.createElement(St, { ...p }, /* @__PURE__ */ g.createElement(Ct, null, /* @__PURE__ */ g.createElement("div", { className: "k-list-container" }, this.listContainerContent())));
239
- }, this.closePopup = (t) => {
240
- const e = this.base.initState();
241
- 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" });
265
+ return /* @__PURE__ */ f.createElement(Fe, { ...h }, /* @__PURE__ */ f.createElement(we, null, /* @__PURE__ */ f.createElement("div", { className: "k-list-container" }, this.listContainerContent())));
266
+ }, this.closePopup = (e) => {
267
+ const t = this.base.initState();
268
+ 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" });
242
269
  const o = this.props.filter !== void 0 ? this.props.filter : this.state.text;
243
- K(o) && o !== "" && this.base.filterChanged("", e), this.state.text && (e.data.text = ""), this.applyState(e);
244
- }, this.onCancel = (t) => {
245
- const e = this.base.initState();
246
- 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" });
270
+ L(o) && o !== "" && this.base.filterChanged("", t), this.state.text && (t.data.text = ""), this.applyState(t);
271
+ }, this.onCancel = (e) => {
272
+ const t = this.base.initState();
273
+ 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" });
247
274
  const o = this.props.filter !== void 0 ? this.props.filter : this.state.text;
248
- K(o) && o !== "" && this.base.filterChanged("", e), this.state.text && (e.data.text = ""), this.applyState(e);
275
+ L(o) && o !== "" && this.base.filterChanged("", t), this.state.text && (t.data.text = ""), this.applyState(t);
249
276
  }, this.renderList = () => {
250
- const t = V(this), {
251
- textField: e,
277
+ const e = w(this), {
278
+ textField: t,
252
279
  listNoDataRender: o,
253
- itemRender: s,
280
+ itemRender: i,
254
281
  groupHeaderItemRender: a,
255
- dataItemKey: i,
256
- virtual: r = { skip: 0, total: void 0 }
257
- } = this.props, p = x(this.props), d = this.base.vs, { focusedIndex: n } = this.getFocusedState(), h = this.base.getPopupSettings(), f = `translateY(${d.translate}px)`;
258
- return /* @__PURE__ */ g.createElement(
259
- ft,
282
+ dataItemKey: s,
283
+ checkboxes: r,
284
+ virtual: h = { skip: 0, total: void 0 }
285
+ } = this.props, d = y(this.props), n = this.base.vs, { focusedIndex: c } = this.getFocusedState(), m = this.base.getPopupSettings(), p = `translateY(${n.translate}px)`;
286
+ return /* @__PURE__ */ f.createElement(
287
+ ve,
260
288
  {
261
289
  id: this.base.listBoxId,
262
290
  show: this.opened,
263
- data: p.slice(),
264
- focusedIndex: n - r.skip,
291
+ data: d.slice(),
292
+ focusedIndex: c - h.skip,
265
293
  value: this.value,
266
- textField: e,
267
- valueField: i,
294
+ textField: t,
295
+ valueField: s,
268
296
  optionsGuid: this.base.guid,
269
297
  groupField: this.props.groupField,
270
- ariaLabel: t.toLanguageString(W, q[W]),
271
- listRef: (c) => {
272
- d.list = this.base.list = c;
298
+ ariaLabel: e.toLanguageString(G, A[G]),
299
+ listRef: (v) => {
300
+ n.list = this.base.list = v;
273
301
  },
274
- wrapperStyle: this.mobileMode ? {} : { maxHeight: h.height },
302
+ wrapperStyle: this.mobileMode ? {} : { maxHeight: m.height },
275
303
  wrapperCssClass: "k-list-content",
276
- listStyle: d.enabled ? { transform: f } : void 0,
304
+ listStyle: n.enabled ? { transform: p } : void 0,
277
305
  key: "listKey",
278
- skip: r.skip,
306
+ skip: h.skip,
279
307
  onClick: this.handleItemClick,
280
- itemRender: s,
308
+ itemRender: i,
281
309
  groupHeaderItemRender: a,
282
310
  noDataRender: o,
283
- onMouseDown: U,
311
+ onMouseDown: N,
284
312
  onBlur: this.handleBlur,
285
313
  onScroll: this.onScroll,
286
- wrapperRef: d.scrollerRef,
314
+ wrapperRef: n.scrollerRef,
287
315
  scroller: this.base.renderScrollElement(),
288
- ariaSetSize: r.total
316
+ ariaSetSize: h.total,
317
+ showSelectionCheckbox: r
289
318
  }
290
319
  );
291
- }, this.onScroll = (t) => {
292
- const { vs: e, list: o } = this.base;
293
- e.scrollHandler(t);
294
- const { groupField: s } = this.props;
295
- let a = x(this.props);
296
- if (!(!s || !a.length) && s) {
297
- const i = this.itemHeight = this.itemHeight || (e.enabled ? e.itemHeight : o ? o.children[0].offsetHeight : 0), p = t.target.scrollTop - e.skip * i;
298
- a = this.base.getGroupedDataModernMode(a, s);
299
- let d = a[0][s];
300
- for (let n = 1; n < a.length && !(i * n > p); n++)
301
- a[n] && a[n][s] && (d = a[n][s]);
320
+ }, this.onScroll = (e) => {
321
+ const { vs: t, list: o } = this.base;
322
+ t.scrollHandler(e);
323
+ const { groupField: i } = this.props;
324
+ let a = y(this.props);
325
+ if (!(!i || !a.length) && i) {
326
+ const s = this.itemHeight = this.itemHeight || (t.enabled ? t.itemHeight : o ? o.children[0].offsetHeight : 0), h = e.target.scrollTop - t.skip * s;
327
+ a = this.base.getGroupedDataModernMode(a, i);
328
+ let d = a[0][i];
329
+ for (let n = 1; n < a.length && !(s * n > h); n++)
330
+ a[n] && a[n][i] && (d = a[n][i]);
302
331
  d !== this.state.group && this.setState({
303
332
  group: d
304
333
  });
305
334
  }
306
- }, this.customItemSelect = (t) => {
307
- const e = this.props.filter !== void 0 ? this.props.filter : this.state.text, { textField: o } = this.props;
308
- if (!e)
335
+ }, this.customItemSelect = (e) => {
336
+ const t = this.props.filter !== void 0 ? this.props.filter : this.state.text, { textField: o } = this.props;
337
+ if (!t)
309
338
  return;
310
- const s = this.base.initState();
311
- s.syntheticEvent = t;
312
- const a = o ? { [o]: e } : e;
313
- this.state.text !== void 0 && (s.data.text = ""), s.data.focusedIndex = void 0, this.base.filterChanged("", s);
314
- const i = [...this.value, a];
315
- this.triggerOnChange(i, s), this.base.togglePopup(s), this.applyState(s);
316
- }, this.handleWrapperClick = (t) => {
317
- const e = this._input;
318
- !this.opened && e && this.focusElement(e);
339
+ const i = this.base.initState();
340
+ i.syntheticEvent = e;
341
+ const a = o ? { [o]: t } : t;
342
+ this.state.text !== void 0 && (i.data.text = ""), i.data.focusedIndex = void 0, this.base.filterChanged("", i);
343
+ const s = [...this.value, a];
344
+ this.triggerOnChange(s, i), this.base.togglePopup(i), this.applyState(i);
345
+ }, this.handleWrapperClick = (e) => {
346
+ const t = this._input;
347
+ !this.opened && t && this.focusElement(t);
319
348
  const o = this.base.initState();
320
- o.syntheticEvent = t, !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);
321
- }, this.handleItemClick = (t, e) => {
349
+ 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);
350
+ }, this.handleItemClick = (e, t) => {
322
351
  const o = this.base.initState();
323
- o.syntheticEvent = e, this.handleItemSelect(t, o), this.props.autoClose && this.base.togglePopup(o), e.stopPropagation(), this.applyState(o);
324
- }, this.handleBlur = (t) => {
352
+ o.syntheticEvent = t, this.handleItemSelect(e, o), this.props.autoClose && !this.props.checkboxes && this.base.togglePopup(o), t.stopPropagation(), this.applyState(o);
353
+ }, this.handleSelectAllItemClick = (e) => {
354
+ const t = this.base.initState();
355
+ t.syntheticEvent = e, this.toggleSelectAll(t), e.stopPropagation(), this.applyState(t);
356
+ }, this.handleSelectAllItemKeyDown = (e) => {
357
+ if (e.keyCode !== u.enter && e.keyCode !== u.space)
358
+ return;
359
+ e.preventDefault();
360
+ const t = this.base.initState();
361
+ t.syntheticEvent = e, this.toggleSelectAll(t), this.applyState(t);
362
+ }, this.handleBlur = (e) => {
325
363
  if (!this.state.focused || this._skipFocusEvent)
326
364
  return;
327
- const e = this.base.initState(), { allowCustom: o, filterable: s } = this.props;
328
- 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" })), !o && !s && this.state.text && (e.data.text = ""), this.applyState(e);
329
- }, this.handleFocus = (t) => {
330
- this._skipFocusEvent || this.base.handleFocus(t);
365
+ const t = this.base.initState(), { allowCustom: o, filterable: i } = this.props;
366
+ t.syntheticEvent = e, t.data.focused = !1, t.data.selectAllFocused = !1, t.events.push({ type: "onBlur" }), this.opened && !this.mobileMode && (this.state.opened && (t.data.opened = !1), t.events.push({ type: "onClose" })), !o && !i && this.state.text && (t.data.text = ""), this.applyState(t);
367
+ }, this.handleFocus = (e) => {
368
+ this._skipFocusEvent || this.base.handleFocus(e);
331
369
  }, this.onPopupOpened = () => {
332
370
  this._input && this.state.focused && !this.mobileMode && this.focusElement(this._input);
333
371
  }, this.onPopupClosed = () => {
@@ -336,23 +374,39 @@ const { sizeMap: P, roundedMap: wt } = st, Tt = "Please enter a valid value!", U
336
374
  }, 0);
337
375
  }, this.setValidity = () => {
338
376
  this._input && this._input.setCustomValidity && this._input.setCustomValidity(
339
- this.validity.valid ? "" : this.props.validationMessage || Tt
377
+ this.validity.valid ? "" : this.props.validationMessage || Ae
378
+ );
379
+ }, this.getSelectableItems = () => y(this.props).filter((t) => !(t != null && t.disabled)), this.areAllSelectableItemsSelected = () => {
380
+ const e = this.getSelectableItems();
381
+ if (e.length === 0 || !e.every(
382
+ (a) => this.value.some((s) => x(s, a, this.props.dataItemKey))
383
+ ))
384
+ return !1;
385
+ const { virtual: o, dataItemKey: i } = this.props;
386
+ return !(o && o.total !== void 0 && (i ? this.value.filter((s) => (s == null ? void 0 : s[i]) !== void 0).length : this.value.length) < o.total);
387
+ }, this.areSomeSelectableItemsSelected = () => {
388
+ const e = this.value;
389
+ if (e.length > 0)
390
+ return !0;
391
+ const t = this.getSelectableItems();
392
+ return t.length === 0 ? !1 : t.some(
393
+ (o) => e.some((i) => x(i, o, this.props.dataItemKey))
340
394
  );
341
- }, this.validate(l), this.licenseMessage = ot(H);
395
+ }, this.validate(l), this.licenseMessage = le(W);
342
396
  }
343
397
  get _inputId() {
344
398
  return this.props.id;
345
399
  }
346
400
  get document() {
347
- if (z)
401
+ if (V)
348
402
  return this.element && this.element.ownerDocument || document;
349
403
  }
350
404
  validate(l) {
351
405
  if (l.filterable || l.virtual) {
352
- const t = [];
353
- l.filterable && t.push("filterable"), l.virtual && t.push("virtualization"), this.showLicenseWatermark = !at(H, {
406
+ const e = [];
407
+ l.filterable && e.push("filterable"), l.virtual && e.push("virtualization"), this.showLicenseWatermark = !ne(W, {
354
408
  component: "MultiSelect",
355
- features: t
409
+ features: e
356
410
  });
357
411
  }
358
412
  }
@@ -366,17 +420,38 @@ const { sizeMap: P, roundedMap: wt } = st, Tt = "Please enter a valid value!", U
366
420
  }
367
421
  /** @hidden */
368
422
  get tagsToRender() {
369
- const { tags: l, textField: t } = this.props, e = [];
370
- return l === void 0 ? this.value.forEach((o) => {
371
- e.push({ text: _(o, t), data: [o] });
372
- }) : e.push(...l), e;
423
+ const { tags: l, textField: e, dataItemKey: t, allowCustom: o, selectAll: i, summarizeAfter: a = 10 } = this.props, s = [];
424
+ if (l === void 0)
425
+ if (o && i && t) {
426
+ const r = this.value.filter((d) => d[t] !== void 0), h = this.value.filter((d) => d[t] === void 0);
427
+ if (r.length > 0) {
428
+ const n = w(this).toLanguageString(U, A[U]).replace("{0}", r.length.toString());
429
+ s.push({ text: n, data: [...r] });
430
+ }
431
+ h.forEach((d) => {
432
+ s.push({ text: D(d, e), data: [d] });
433
+ });
434
+ } else if (this.value.length > a) {
435
+ const r = w(this), h = this.value.slice(0, a), d = this.value.slice(a);
436
+ h.forEach((c) => {
437
+ s.push({ text: D(c, e), data: [c] });
438
+ });
439
+ const n = r.toLanguageString(j, A[j]).replace("{0}", d.length.toString());
440
+ s.push({ text: n, data: [...d] });
441
+ } else
442
+ this.value.forEach((r) => {
443
+ s.push({ text: D(r, e), data: [r] });
444
+ });
445
+ else
446
+ s.push(...l);
447
+ return s;
373
448
  }
374
449
  /**
375
450
  * The mobile mode of the MultiSelect.
376
451
  */
377
452
  get mobileMode() {
378
- var t;
379
- return !!(this.state.windowWidth && this.props._adaptiveMode && this.state.windowWidth <= ((t = this.props._adaptiveMode) == null ? void 0 : t.medium) && this.props.adaptive);
453
+ var e;
454
+ return !!(this.state.windowWidth && this.props._adaptiveMode && this.state.windowWidth <= ((e = this.props._adaptiveMode) == null ? void 0 : e.medium) && this.props.adaptive);
380
455
  }
381
456
  /**
382
457
  * Represents the value of the MultiSelect.
@@ -395,63 +470,75 @@ const { sizeMap: P, roundedMap: wt } = st, Tt = "Please enter a valid value!", U
395
470
  * Represents the validity state into which the MultiSelect is set.
396
471
  */
397
472
  get validity() {
398
- const l = 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;
473
+ const l = 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;
399
474
  return {
400
475
  customError: l,
401
- valid: e,
476
+ valid: t,
402
477
  valueMissing: this.value === null
403
478
  };
404
479
  }
405
480
  /** @hidden */
406
481
  get required() {
407
- return this.props.required !== void 0 ? this.props.required : C.defaultProps.required;
482
+ return this.props.required !== void 0 ? this.props.required : k.defaultProps.required;
408
483
  }
409
484
  get validityStyles() {
410
- return this.props.validityStyles !== void 0 ? this.props.validityStyles : C.defaultProps.validityStyles;
485
+ return this.props.validityStyles !== void 0 ? this.props.validityStyles : k.defaultProps.validityStyles;
411
486
  }
412
487
  /** @hidden */
413
- componentDidUpdate(l, t) {
414
- var h;
415
- const { virtual: e, groupField: o = "" } = this.props, s = x(this.props), a = e ? e.skip : 0, i = l.virtual ? l.virtual.total : 0, r = l.opened !== void 0 ? l.opened : t.opened, p = !r && this.opened, d = r && !this.opened, n = this.base.getPopupSettings();
416
- if (this.validate(this.props), this.base.didUpdate(), !n.animate && d && this.onPopupClosed(), e && e.total !== i)
488
+ componentDidUpdate(l, e) {
489
+ var c;
490
+ const { virtual: t, groupField: o = "" } = this.props, i = y(this.props), a = t ? t.skip : 0, s = l.virtual ? l.virtual.total : 0, r = l.opened !== void 0 ? l.opened : e.opened, h = !r && this.opened, d = r && !this.opened, n = this.base.getPopupSettings();
491
+ if (this.validate(this.props), this.base.didUpdate(), !n.animate && d && this.onPopupClosed(), d && this.state.selectAllFocused && this.setState({ selectAllFocused: !1 }), t && t.total !== s)
417
492
  this.base.vs.calcScrollElementHeight(), this.base.vs.reset();
418
493
  else {
419
- let { focusedItem: f, focusedIndex: c } = this.getFocusedState();
420
- o !== "" && (c = (h = this.base.getGroupedDataModernMode(s, o)) == null ? void 0 : h.indexOf(f)), p && e ? this.base.scrollToVirtualItem(e, c - a) : p && !e ? (s && s.length !== 0 && this.base.resetGroupStickyHeader(s[0][o], this), this.base.scrollToItem(c)) : this.opened && r && f && this.scrollToFocused && this.base.scrollToItem(c - a);
494
+ let { focusedItem: m, focusedIndex: p } = this.getFocusedState();
495
+ o !== "" && (p = (c = this.base.getGroupedDataModernMode(i, o)) == null ? void 0 : c.indexOf(m)), h && t ? this.base.scrollToVirtualItem(t, p - a) : h && !t ? (i && i.length !== 0 && this.base.resetGroupStickyHeader(i[0][o], this), this.base.scrollToItem(p)) : this.opened && r && m && this.scrollToFocused && this.base.scrollToItem(p - a);
421
496
  }
422
497
  this.scrollToFocused = !1, this.setValidity();
423
498
  }
424
499
  /** @hidden */
425
500
  componentDidMount() {
426
- var t;
427
- this.observerResize = z && window.ResizeObserver && new window.ResizeObserver(this.calculateMedia.bind(this)), this.base.didMount(), this.setValidity(), (t = this.document) != null && t.body && this.observerResize && this.observerResize.observe(this.document.body);
501
+ var e;
502
+ this.observerResize = V && window.ResizeObserver && new window.ResizeObserver(this.calculateMedia.bind(this)), this.base.didMount(), this.setValidity(), (e = this.document) != null && e.body && this.observerResize && this.observerResize.observe(this.document.body);
428
503
  const l = this.props.name || this.props.id;
429
- this.KendoPasteSubscription = nt(this._element, {
504
+ this.KendoPasteSubscription = de(this._element, {
430
505
  fieldName: l,
431
- onValueChange: (e) => {
432
- this.handleKendoPasteValue(e);
506
+ onValueChange: (t) => {
507
+ this.handleKendoPasteValue(t);
433
508
  }
434
509
  });
435
510
  }
436
511
  /** @hidden */
437
512
  componentWillUnmount() {
438
- var l, t;
439
- (l = this.document) != null && l.body && this.observerResize && this.observerResize.disconnect(), (t = this.KendoPasteSubscription) == null || t.unsubscribe();
513
+ var l, e;
514
+ (l = this.document) != null && l.body && this.observerResize && this.observerResize.disconnect(), (e = this.KendoPasteSubscription) == null || e.unsubscribe();
440
515
  }
441
516
  /** @hidden */
442
- onNavigate(l, t, e) {
443
- const { allowCustom: o } = this.props, s = x(this.props), a = this.props.filter !== void 0 ? this.props.filter : this.state.text, { focusedType: i, focusedIndex: r } = this.getFocusedState(), p = o && a, d = j(i), n = this.base, h = n.vs;
444
- if (this.opened && t === u.up && d)
445
- this.state.focusedIndex !== void 0 && (l.data.focusedIndex = void 0);
517
+ onNavigate(l, e, t) {
518
+ const { allowCustom: o, selectAll: i } = this.props, a = y(this.props), s = this.props.filter !== void 0 ? this.props.filter : this.state.text, { focusedType: r, focusedIndex: h } = this.getFocusedState(), d = o && s, n = J(r), c = this.base, m = c.vs;
519
+ if (this.state.selectAllFocused) {
520
+ e === u.down && (l.data.selectAllFocused = !1, d || (this.itemFocus(0, l), this.scrollToFocused = !0)), this.applyState(l);
521
+ return;
522
+ }
523
+ if (i && this.opened && h === -1 && !n) {
524
+ e === u.down && (l.data.selectAllFocused = !0), this.applyState(l);
525
+ return;
526
+ }
527
+ if (i && this.opened && e === u.up && h === 0 && !d) {
528
+ l.data.selectAllFocused = !0, l.data.focusedIndex = void 0, this.applyState(l);
529
+ return;
530
+ }
531
+ if (this.opened && e === u.up && n)
532
+ i && (l.data.selectAllFocused = !0), this.state.focusedIndex !== void 0 && (l.data.focusedIndex = void 0);
446
533
  else {
447
- const f = n.navigation.navigate({
448
- keyCode: t,
449
- current: r,
450
- max: (h.enabled ? h.total : s.length) - 1,
451
- min: p ? -1 : 0,
452
- skipItems: e || void 0
534
+ const p = c.navigation.navigate({
535
+ keyCode: e,
536
+ current: h,
537
+ max: (m.enabled ? m.total : a.length) - 1,
538
+ min: d ? -1 : 0,
539
+ skipItems: t || void 0
453
540
  });
454
- f !== void 0 && (this.itemFocus(f, l), this.scrollToFocused = !0);
541
+ p !== void 0 && (this.itemFocus(p, l), this.scrollToFocused = !0);
455
542
  }
456
543
  this.applyState(l);
457
544
  }
@@ -459,205 +546,227 @@ const { sizeMap: P, roundedMap: wt } = st, Tt = "Please enter a valid value!", U
459
546
  render() {
460
547
  const {
461
548
  style: l,
462
- className: t,
463
- label: e,
549
+ className: e,
550
+ label: t,
464
551
  dir: o,
465
- disabled: s,
552
+ disabled: i,
466
553
  textField: a,
467
- dataItemKey: i,
554
+ dataItemKey: s,
468
555
  virtual: r,
469
- size: p,
556
+ size: h,
470
557
  rounded: d,
471
558
  fillMode: n,
472
- loading: h,
473
- filter: f
474
- } = this.props, { text: c, focused: b, focusedTag: m, currentValue: I } = this.state, y = this.base.vs, L = this.props.id || this._inputId;
475
- y.enabled = r !== void 0, r !== void 0 && (y.skip = r.skip, y.total = r.total, y.pageSize = r.pageSize);
476
- const k = this.mobileMode && this.opened ? I : this.tagsToRender;
559
+ loading: c,
560
+ filter: m
561
+ } = this.props, { text: p, focused: v, focusedTag: g, currentValue: I } = this.state, S = this.base.vs, z = this.props.id || this._inputId;
562
+ S.enabled = r !== void 0, r !== void 0 && (S.skip = r.skip, S.total = r.total, S.pageSize = r.pageSize);
563
+ const F = this.mobileMode && this.opened ? I : this.tagsToRender;
477
564
  this.setItems(this.tagsToRender, this._tags);
478
- const N = !this.validityStyles || this.validity.valid, Y = V(this), J = !!(f !== void 0 ? f : c) || k && k.length > 0, [Q, X] = $(this.props.prefix || g.Fragment), [Z, tt] = $(this.props.suffix || g.Fragment), R = /* @__PURE__ */ g.createElement(g.Fragment, null, /* @__PURE__ */ g.createElement(
565
+ const R = !this.validityStyles || this.validity.valid, Q = w(this), X = !!(m !== void 0 ? m : p) || F && F.length > 0, [Z, ee] = $(this.props.prefix || f.Fragment), [te, se] = $(this.props.suffix || f.Fragment), B = /* @__PURE__ */ f.createElement(f.Fragment, null, /* @__PURE__ */ f.createElement(
479
566
  "div",
480
567
  {
481
568
  ref: this.componentRef,
482
- className: S("k-multiselect k-input", t, {
483
- [`k-input-${P[p] || p}`]: p,
484
- [`k-rounded-${wt[d] || d}`]: d,
569
+ className: C("k-multiselect k-input", e, {
570
+ [`k-input-${_[h] || h}`]: h,
571
+ [`k-rounded-${De[d] || d}`]: d,
485
572
  [`k-input-${n}`]: n,
486
- "k-focus": b && !s,
487
- "k-invalid": !N,
488
- "k-disabled": s,
489
- "k-loading": h,
573
+ "k-focus": v && !i,
574
+ "k-invalid": !R,
575
+ "k-disabled": i,
576
+ "k-loading": c,
490
577
  "k-required": this.required
491
578
  }),
492
- style: e ? { ...l, width: void 0 } : l,
579
+ style: t ? { ...l, width: void 0 } : l,
493
580
  dir: o,
494
- onFocus: (T) => {
495
- this.mobileMode ? this.handleWrapperClick(T) : this.handleFocus(T);
581
+ onFocus: (E) => {
582
+ this.mobileMode ? this.handleWrapperClick(E) : this.handleFocus(E);
496
583
  },
497
584
  onBlur: this.handleBlur,
498
585
  onClick: this.handleWrapperClick,
499
- onMouseDown: It
586
+ onMouseDown: xe
500
587
  },
501
- this.props.prefix && /* @__PURE__ */ g.createElement(Q, { ...X }),
502
- /* @__PURE__ */ g.createElement("div", { className: S("k-input-values") }, /* @__PURE__ */ g.createElement(
588
+ this.props.prefix && /* @__PURE__ */ f.createElement(Z, { ...ee }),
589
+ /* @__PURE__ */ f.createElement("div", { className: C("k-input-values") }, /* @__PURE__ */ f.createElement(
503
590
  "div",
504
591
  {
505
- className: S("k-chip-list", { [`k-chip-list-${P[p] || p}`]: p }),
592
+ className: C("k-chip-list", { [`k-chip-list-${_[h] || h}`]: h }),
506
593
  role: "listbox",
507
- "aria-label": Y.toLanguageString(G, q[G]),
594
+ "aria-label": Q.toLanguageString(Y, A[Y]),
508
595
  "aria-orientation": "horizontal",
509
596
  id: "tagslist-" + this.base.guid
510
597
  },
511
- k && k.length > 0 && /* @__PURE__ */ g.createElement(
512
- mt,
598
+ F && F.length > 0 && /* @__PURE__ */ f.createElement(
599
+ Ie,
513
600
  {
514
601
  tagRender: this.props.tagRender,
515
602
  onTagDelete: this.onTagDelete,
516
- data: k,
603
+ data: F,
517
604
  guid: this.base.guid,
518
- focused: m ? k.find((T) => A(T, m, i)) : void 0,
519
- size: p
605
+ focused: g ? F.find((E) => H(E, g, s)) : void 0,
606
+ size: h
520
607
  }
521
608
  )
522
- ), this.renderSearchBar(L)),
523
- h && /* @__PURE__ */ g.createElement(B, { className: "k-input-loading-icon", name: "loading" }),
524
- this.props.suffix && /* @__PURE__ */ g.createElement(Z, { ...tt }),
525
- J && /* @__PURE__ */ g.createElement(xt, { onClick: this.clearButtonClick }),
609
+ ), this.renderSearchBar(z)),
610
+ c && /* @__PURE__ */ f.createElement(re, { className: "k-input-loading-icon", name: "loading" }),
611
+ this.props.suffix && /* @__PURE__ */ f.createElement(te, { ...se }),
612
+ X && /* @__PURE__ */ f.createElement(ke, { onClick: this.clearButtonClick }),
526
613
  !this.mobileMode && this.renderListContainer()
527
614
  ), this.mobileMode && this.renderAdaptiveListContainer());
528
- return e ? /* @__PURE__ */ g.createElement(
529
- pt,
615
+ return t ? /* @__PURE__ */ f.createElement(
616
+ ue,
530
617
  {
531
- label: e,
532
- editorId: L,
533
- editorValue: c || _(this.value[0], a),
534
- editorValid: N,
535
- editorDisabled: s,
618
+ label: t,
619
+ editorId: z,
620
+ editorValue: p || D(this.value[0], a),
621
+ editorValid: R,
622
+ editorDisabled: i,
536
623
  style: { width: l ? l.width : void 0 },
537
- children: R
624
+ children: B
538
625
  }
539
- ) : R;
626
+ ) : B;
540
627
  }
541
628
  renderSearchBar(l) {
542
- const { activedescendant: t, focusedTag: e, currentValue: o } = this.state, { disabled: s, placeholder: a, ariaDescribedBy: i, ariaLabelledBy: r, ariaLabel: p, inputAttributes: d } = this.props, n = !this.mobileMode && (this.props.filter !== void 0 ? this.props.filter : this.state.text) || "", { focusedIndex: h } = this.getFocusedState(), f = this.value.length === 0 && !n ? a : void 0, c = o && o.length > 0 ? void 0 : a, b = t === w.TagsList && e !== void 0 ? `tag-${this.base.guid}-${e.text.replace(/\s+/g, "-")}` : `k-${this.base.guid}-item-${h + 1}`, m = i ? ` ${i}` : "", I = this.value.length > 0 ? `tagslist-${this.base.guid}${m}` : i, y = {
629
+ const { activedescendant: e, focusedTag: t, currentValue: o } = this.state, { disabled: i, placeholder: a, ariaDescribedBy: s, ariaLabelledBy: r, ariaLabel: h, inputAttributes: d } = this.props, n = !this.mobileMode && (this.props.filter !== void 0 ? this.props.filter : this.state.text) || "", { focusedIndex: c } = this.getFocusedState(), m = this.value.length === 0 && !n ? a : void 0, p = o && o.length > 0 ? void 0 : a, v = e === T.TagsList && t !== void 0 ? `tag-${this.base.guid}-${t.text.replace(/\s+/g, "-")}` : `k-${this.base.guid}-item-${c + 1}`, g = s ? ` ${s}` : "", I = this.value.length > 0 ? `tagslist-${this.base.guid}${g}` : s, S = {
543
630
  accessKey: this.props.accessKey,
544
631
  tabIndex: this.props.tabIndex
545
632
  };
546
- return /* @__PURE__ */ g.createElement(
547
- vt,
633
+ return /* @__PURE__ */ f.createElement(
634
+ Se,
548
635
  {
549
636
  id: l,
550
637
  name: this.props.name,
551
- size: Math.max((f || "").length, n.length, 1),
552
- placeholder: this.mobileMode && this.opened ? c : f,
638
+ size: Math.max((m || "").length, n.length, 1),
639
+ placeholder: this.mobileMode && this.opened ? p : m,
553
640
  value: n,
554
641
  onChange: this.onChangeHandler,
555
642
  onKeyDown: this.onInputKeyDown,
556
643
  ref: this.searchbarRef,
557
- disabled: s,
644
+ disabled: i,
558
645
  expanded: this.opened,
559
646
  ariaControls: this.base.listBoxId,
560
647
  role: "combobox",
561
- activedescendant: b,
648
+ activedescendant: v,
562
649
  ariaDescribedBy: I,
563
650
  ariaLabelledBy: r,
564
651
  ariaRequired: this.required,
565
- ariaLabel: p,
652
+ ariaLabel: h,
566
653
  ariaAutoComplete: "list",
567
654
  inputAttributes: d,
568
- ...y
655
+ ...S
569
656
  }
570
657
  );
571
658
  }
572
- onTagsNavigate(l, t) {
573
- const e = l.keyCode, { focusedTag: o } = this.state, s = this._tags, a = this.props.dataItemKey;
574
- let i = o ? s.findIndex((d) => A(d, o, a)) : -1, r;
575
- const p = i !== -1;
576
- if (e === u.left)
577
- p ? i = Math.max(0, i - 1) : i = s.length - 1, r = s[i];
578
- else if (e === u.right)
579
- i === s.length - 1 ? r = void 0 : p && (i = Math.min(s.length - 1, i + 1), r = s[i]);
580
- else if (e === u.home && !l.shiftKey)
581
- r = s[0];
582
- else if (e === u.end && !l.shiftKey)
583
- r = s[s.length - 1];
584
- else if (e === u.delete) {
585
- if (p) {
659
+ onTagsNavigate(l, e) {
660
+ const t = l.keyCode, { focusedTag: o } = this.state, i = this._tags, a = this.props.dataItemKey;
661
+ let s = o ? i.findIndex((d) => H(d, o, a)) : -1, r;
662
+ const h = s !== -1;
663
+ if (t === u.left)
664
+ h ? s = Math.max(0, s - 1) : s = i.length - 1, r = i[s];
665
+ else if (t === u.right)
666
+ s === i.length - 1 ? r = void 0 : h && (s = Math.min(i.length - 1, s + 1), r = i[s]);
667
+ else if (t === u.home && !l.shiftKey)
668
+ r = i[0];
669
+ else if (t === u.end && !l.shiftKey)
670
+ r = i[i.length - 1];
671
+ else if (t === u.delete) {
672
+ if (h) {
586
673
  const d = this.value;
587
- D(d, s[i].data, a), this.triggerOnChange(d, t);
674
+ O(d, i[s].data, a), this.triggerOnChange(d, e);
588
675
  }
589
- } else if (e === u.backspace) {
676
+ } else if (t === u.backspace) {
590
677
  const d = this.value;
591
- if (p)
592
- D(d, s[i].data, a), this.triggerOnChange(d, t);
593
- else if (!p && s.length) {
594
- const n = s.pop();
595
- D(d, n.data, a), this.triggerOnChange(d, t);
678
+ if (h)
679
+ O(d, i[s].data, a), this.triggerOnChange(d, e);
680
+ else if (!h && i.length) {
681
+ const n = i.pop();
682
+ O(d, n.data, a), this.triggerOnChange(d, e);
596
683
  }
597
684
  }
598
- r !== o && (t.data.focusedTag = r, t.data.activedescendant = w.TagsList), this.applyState(t);
685
+ r !== o && (e.data.focusedTag = r, e.data.activedescendant = T.TagsList), this.applyState(e);
686
+ }
687
+ triggerOnChange(l, e) {
688
+ this.props.value === void 0 && (e.data.value = [...l]), this._valueItemsDuringOnChange = [], this.setItems(l, this._valueItemsDuringOnChange), e.events.push({ type: "onChange" });
599
689
  }
600
- triggerOnChange(l, t) {
601
- this.props.value === void 0 && (t.data.value = [...l]), this._valueItemsDuringOnChange = [], this.setItems(l, this._valueItemsDuringOnChange), t.events.push({ type: "onChange" });
690
+ selectFocusedItem(l, e) {
691
+ const { virtual: t } = this.props, o = y(this.props), { focusedIndex: i } = e || this.getFocusedState(), a = t ? t.skip : 0;
692
+ o[i - a] !== void 0 && this.handleItemClick(i, l);
602
693
  }
603
- selectFocusedItem(l, t) {
604
- const { virtual: e } = this.props, o = x(this.props), { focusedIndex: s } = t || this.getFocusedState(), a = e ? e.skip : 0;
605
- o[s - a] !== void 0 && this.handleItemClick(s, l);
694
+ setItems(l, e) {
695
+ e.length = 0, e.push(...l);
606
696
  }
607
- setItems(l, t) {
608
- t.length = 0, t.push(...l);
697
+ shouldKeepNoFocusOnOpen(l, e) {
698
+ return !!this.props.selectAll && e === void 0 && this.value.length === 0 && !(this.props.allowCustom && l);
609
699
  }
610
700
  getFocusedState() {
611
- const { focusedIndex: l } = this.state, t = this.props.filter !== void 0 ? this.props.filter : this.state.text, {
612
- allowCustom: e,
701
+ if (this.state.selectAllFocused)
702
+ return { focusedType: 0, focusedIndex: -1 };
703
+ const { focusedIndex: l } = this.state, e = this.props.filter !== void 0 ? this.props.filter : this.state.text;
704
+ if (this.shouldKeepNoFocusOnOpen(e, l))
705
+ return { focusedType: 0, focusedIndex: -1 };
706
+ const {
707
+ allowCustom: t,
613
708
  dataItemKey: o,
614
- virtual: s,
709
+ virtual: i,
615
710
  textField: a,
616
- focusedItemIndex: i = yt,
711
+ focusedItemIndex: s = Ce,
617
712
  skipDisabledItems: r
618
- } = this.props, p = x(this.props), d = s && s.skip || 0;
713
+ } = this.props, h = y(this.props), d = i && i.skip || 0;
619
714
  let n;
620
715
  if (l !== void 0)
621
716
  return {
622
717
  focusedIndex: l,
623
- focusedItem: p[l - d],
718
+ focusedItem: h[l - d],
624
719
  focusedType: 1
625
720
  /* ListItem */
626
721
  };
627
- const h = this.value;
628
- if (e && t)
722
+ const c = this.value;
723
+ if (t && e)
629
724
  return {
630
725
  focusedItem: null,
631
726
  focusedIndex: -1,
632
727
  focusedType: 2
633
728
  /* CustomItem */
634
729
  };
635
- if (t)
636
- return n = i(p, t, a), {
637
- focusedItem: p[n],
730
+ if (e)
731
+ return n = s(h, e, a), {
732
+ focusedItem: h[n],
638
733
  focusedIndex: n + d,
639
734
  focusedType: 1
640
735
  /* ListItem */
641
736
  };
642
- if (h.length) {
643
- const f = h[h.length - 1];
644
- return n = p.findIndex((c) => F(c, f, o)), p[n] !== void 0 ? {
737
+ if (c.length) {
738
+ if (this.props.selectAll) {
739
+ const p = c[c.length - 1], v = h.findIndex((g) => x(g, p, o));
740
+ return v !== -1 ? {
741
+ focusedIndex: v + d,
742
+ focusedItem: h[v],
743
+ focusedType: 1
744
+ /* ListItem */
745
+ } : d === 0 ? {
746
+ focusedItem: h[0],
747
+ focusedIndex: 0,
748
+ focusedType: 1
749
+ /* ListItem */
750
+ } : { focusedType: 0, focusedIndex: -1 };
751
+ }
752
+ const m = c[c.length - 1];
753
+ return n = h.findIndex((p) => x(p, m, o)), h[n] !== void 0 ? {
645
754
  focusedIndex: n + d,
646
- focusedItem: p[n],
755
+ focusedItem: h[n],
647
756
  focusedType: 1
648
757
  /* ListItem */
649
758
  } : { focusedType: 0, focusedIndex: -1 };
650
- } else if (r && a && !t && d === 0) {
651
- const f = p.findIndex((c) => !c.disabled);
759
+ } else if (r && a && !e && d === 0) {
760
+ const m = h.findIndex((p) => !p.disabled);
652
761
  return {
653
- focusedIndex: f,
654
- focusedItem: p[f - d],
762
+ focusedIndex: m,
763
+ focusedItem: h[m - d],
655
764
  focusedType: 1
656
765
  /* ListItem */
657
766
  };
658
767
  }
659
768
  return d === 0 ? {
660
- focusedItem: p[0],
769
+ focusedItem: h[0],
661
770
  focusedIndex: 0,
662
771
  focusedType: 1
663
772
  /* ListItem */
@@ -670,8 +779,32 @@ const { sizeMap: P, roundedMap: wt } = st, Tt = "Please enter a valid value!", U
670
779
  this.base.applyState(l), this._valueItemsDuringOnChange = null;
671
780
  }
672
781
  calculateMedia(l) {
673
- for (const t of l)
674
- this.setState({ windowWidth: t.target.clientWidth });
782
+ for (const e of l)
783
+ this.setState({ windowWidth: e.target.clientWidth });
784
+ }
785
+ toggleSelectAll(l) {
786
+ if (this.props.disabled)
787
+ return;
788
+ l.data.focusedIndex = void 0;
789
+ const e = this.areAllSelectableItemsSelected();
790
+ if (l.data.selectAllFocused = !0, this.props.onSelectAllChange) {
791
+ this.props.onSelectAllChange({
792
+ syntheticEvent: l.syntheticEvent,
793
+ nativeEvent: l.syntheticEvent.nativeEvent,
794
+ target: this,
795
+ allSelected: !e
796
+ });
797
+ return;
798
+ }
799
+ const t = this.getSelectableItems();
800
+ if (t.length === 0)
801
+ return;
802
+ let o = [];
803
+ e ? o = this.value.filter(
804
+ (i) => !t.some((a) => x(a, i, this.props.dataItemKey))
805
+ ) : (o = [...this.value], t.forEach((i) => {
806
+ o.some((s) => x(s, i, this.props.dataItemKey)) || o.push(i);
807
+ })), this.triggerOnChange(o, l);
675
808
  }
676
809
  /**
677
810
  * Updates the state of the MultiSelect when the complex keyboard navigation that
@@ -680,47 +813,53 @@ const { sizeMap: P, roundedMap: wt } = st, Tt = "Please enter a valid value!", U
680
813
  * @param {Array<string | Object>} dataToSet Defines the array of new values that will be applied to the MultiSelect
681
814
  * @param {MultiSelectInternalState} state The current state of the MultiSelect
682
815
  */
683
- updateStateOnKeyboardNavigation(l, t) {
684
- this.setState({ value: l }), this.triggerOnChange(l, t), this.applyState(t);
816
+ updateStateOnKeyboardNavigation(l, e) {
817
+ this.setState({ value: l }), this.triggerOnChange(l, e), this.applyState(e);
685
818
  }
686
819
  /**
687
820
  * Returns the last element that was selected or deselected. Needed for the keyboard navigation specifications
688
821
  *
689
822
  * @param {number} correction A correction is needed depending on if UP or DOWN key is pressed
690
823
  */
691
- getLastSelectedOrDeselectedIndex(l, t) {
692
- return this._lastSelectedOrDeslectedItemIndex === null && (this._lastSelectedOrDeslectedItemIndex = t), this._lastSelectedOrDeslectedItemIndex !== null ? this._lastSelectedOrDeslectedItemIndex + l : null;
824
+ getLastSelectedOrDeselectedIndex(l, e) {
825
+ return this._lastSelectedOrDeslectedItemIndex === null && (this._lastSelectedOrDeslectedItemIndex = e), this._lastSelectedOrDeslectedItemIndex !== null ? this._lastSelectedOrDeslectedItemIndex + l : null;
693
826
  }
694
827
  };
695
- C.displayName = "MultiSelect", C.propTypes = {
696
- ...E.propTypes,
697
- autoClose: v.bool,
698
- value: v.arrayOf(v.any),
699
- defaultValue: v.arrayOf(v.any),
700
- dataItemKey: v.string,
701
- placeholder: v.string,
702
- tags: v.arrayOf(
703
- v.shape({
704
- text: v.string,
705
- data: v.arrayOf(v.any)
828
+ k.displayName = "MultiSelect", k.propTypes = {
829
+ ...M.propTypes,
830
+ autoClose: b.bool,
831
+ value: b.arrayOf(b.any),
832
+ defaultValue: b.arrayOf(b.any),
833
+ dataItemKey: b.string,
834
+ placeholder: b.string,
835
+ tags: b.arrayOf(
836
+ b.shape({
837
+ text: b.string,
838
+ data: b.arrayOf(b.any)
706
839
  })
707
840
  ),
708
- tagRender: v.func,
709
- id: v.string,
710
- ariaLabelledBy: v.string,
711
- ariaDescribedBy: v.string,
712
- groupField: v.string,
713
- list: v.any,
714
- adaptive: v.bool,
715
- adaptiveTitle: v.string,
716
- adaptiveSubtitle: v.string,
717
- onCancel: v.func,
718
- skipDisabledItems: v.bool,
719
- inputAttributes: v.object
720
- }, C.defaultProps = {
721
- ...E.defaultProps,
841
+ tagRender: b.func,
842
+ id: b.string,
843
+ ariaLabelledBy: b.string,
844
+ ariaDescribedBy: b.string,
845
+ selectAll: b.bool,
846
+ checkboxes: b.bool,
847
+ summarizeAfter: b.number,
848
+ onSelectAllChange: b.func,
849
+ groupField: b.string,
850
+ list: b.any,
851
+ adaptive: b.bool,
852
+ adaptiveTitle: b.string,
853
+ adaptiveSubtitle: b.string,
854
+ onCancel: b.func,
855
+ skipDisabledItems: b.bool,
856
+ inputAttributes: b.object
857
+ }, k.defaultProps = {
858
+ ...M.defaultProps,
722
859
  autoClose: !0,
723
860
  required: !1,
861
+ selectAll: !1,
862
+ checkboxes: !1,
724
863
  size: void 0,
725
864
  rounded: void 0,
726
865
  fillMode: void 0,
@@ -728,17 +867,17 @@ C.displayName = "MultiSelect", C.propTypes = {
728
867
  prefix: void 0,
729
868
  suffix: void 0
730
869
  };
731
- let M = C;
732
- const Ft = et(), Dt = lt(
733
- dt(
734
- Ft,
735
- rt(M)
870
+ let K = k;
871
+ const Ee = ie(), Oe = he(
872
+ ce(
873
+ Ee,
874
+ pe(K)
736
875
  )
737
876
  );
738
- Dt.displayName = "KendoReactMultiSelect";
739
- ct(M);
877
+ Oe.displayName = "KendoReactMultiSelect";
878
+ fe(K);
740
879
  export {
741
- Dt as MultiSelect,
742
- Ft as MultiSelectPropsContext,
743
- M as MultiSelectWithoutContext
880
+ Oe as MultiSelect,
881
+ Ee as MultiSelectPropsContext,
882
+ K as MultiSelectWithoutContext
744
883
  };