@progress/kendo-react-dropdowns 14.5.0-develop.14 → 14.5.0-develop.16
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.
- package/AutoComplete/AutoComplete.d.ts +4 -23
- package/AutoComplete/AutoComplete.js +1 -1
- package/AutoComplete/AutoComplete.mjs +206 -196
- package/AutoComplete/AutoCompleteProps.d.ts +12 -0
- package/ComboBox/ComboBox.d.ts +1 -1
- package/ComboBox/ComboBox.js +1 -1
- package/ComboBox/ComboBox.mjs +224 -224
- package/DropDownList/DropDownList.js +1 -1
- package/DropDownList/DropDownList.mjs +253 -252
- package/DropDownTree/DropDownTree.js +1 -1
- package/DropDownTree/DropDownTree.mjs +202 -196
- package/DropDownTree/DropDownTreeProps.d.ts +12 -0
- package/MultiSelect/MultiSelect.d.ts +2 -1
- package/MultiSelect/MultiSelect.js +1 -1
- package/MultiSelect/MultiSelect.mjs +182 -175
- package/MultiSelect/TagList.js +1 -1
- package/MultiSelect/TagList.mjs +1 -1
- package/MultiSelectTree/MultiSelectTree.js +1 -1
- package/MultiSelectTree/MultiSelectTree.mjs +237 -221
- package/MultiSelectTree/MultiSelectTreeProps.d.ts +12 -0
- package/common/ClearButton.js +1 -1
- package/common/ClearButton.mjs +6 -7
- package/common/List.d.ts +1 -0
- package/common/List.js +1 -1
- package/common/List.mjs +84 -81
- package/common/ListFilter.js +1 -1
- package/common/ListFilter.mjs +20 -17
- package/common/SearchBar.d.ts +1 -0
- package/common/SearchBar.js +1 -1
- package/common/SearchBar.mjs +7 -7
- package/dist/cdn/js/kendo-react-dropdowns.js +1 -1
- package/messages/index.d.ts +14 -4
- package/messages/index.js +1 -1
- package/messages/index.mjs +15 -11
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +10 -10
|
@@ -7,65 +7,67 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import * as g from "react";
|
|
9
9
|
import v from "prop-types";
|
|
10
|
-
import { createPropsContext as
|
|
11
|
-
import { plusIcon as
|
|
12
|
-
import { FloatingLabel as
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
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";
|
|
19
20
|
import { ActiveDescendant as w } from "../common/settings.mjs";
|
|
20
|
-
import { getFilteredData as x, getItemIndexByText as
|
|
21
|
-
import { packageMetadata as
|
|
22
|
-
import
|
|
23
|
-
import { AdaptiveMode as
|
|
24
|
-
import { ActionSheetContent as
|
|
25
|
-
import
|
|
26
|
-
import
|
|
27
|
-
|
|
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";
|
|
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
30
|
constructor(l) {
|
|
29
31
|
super(l), this.state = {
|
|
30
32
|
activedescendant: w.PopupList,
|
|
31
33
|
currentValue: []
|
|
32
|
-
}, this._element = null, this._valueItemsDuringOnChange = null, this.base = new
|
|
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 = () => {
|
|
33
35
|
this._input && this._input.focus();
|
|
34
36
|
}, this.handleKendoPasteValue = (t) => {
|
|
35
37
|
if (t == null)
|
|
36
38
|
return;
|
|
37
|
-
const e = x(this.props), { textField: o, dataItemKey: s } = this.props, a = String(t).split(",").map((
|
|
38
|
-
const d =
|
|
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
41
|
if (d !== -1) {
|
|
40
42
|
const n = e[d];
|
|
41
|
-
|
|
43
|
+
r.some((h) => F(h, n, s)) || r.push(n);
|
|
42
44
|
}
|
|
43
|
-
return
|
|
45
|
+
return r;
|
|
44
46
|
}, []);
|
|
45
47
|
if (a.length === 0)
|
|
46
48
|
return;
|
|
47
49
|
const i = this.base.initState();
|
|
48
50
|
i.syntheticEvent = { target: this._element }, this.triggerOnChange(a, i), this.applyState(i);
|
|
49
51
|
}, this.handleItemSelect = (t, e) => {
|
|
50
|
-
const { dataItemKey: o, virtual: s } = this.props, a = x(this.props), i = s ? s.skip : 0,
|
|
51
|
-
this._lastSelectedOrDeslectedItemIndex = a.findIndex((
|
|
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));
|
|
52
54
|
let d = [];
|
|
53
|
-
|
|
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);
|
|
54
56
|
}, this.onTagDelete = (t, e) => {
|
|
55
57
|
const o = this.base.initState();
|
|
56
58
|
o.syntheticEvent = e, this.opened && this.base.togglePopup(o), !this.state.focused && !this.mobileMode && (o.data.focused = !0, this.focus());
|
|
57
59
|
const s = this.value;
|
|
58
60
|
D(s, t, this.props.dataItemKey), this.triggerOnChange(s, o), this.applyState(o);
|
|
59
61
|
}, this.itemFocus = (t, e) => {
|
|
60
|
-
const { allowCustom: o, virtual: s } = this.props, a = x(this.props), i = s ? s.skip : 0,
|
|
61
|
-
if (s && !
|
|
62
|
-
const f = Math.floor(t /
|
|
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;
|
|
63
65
|
if (f !== i) {
|
|
64
|
-
this.state.focusedIndex !== t && (e.data.focusedIndex = t, e.data.activedescendant = w.PopupList), this.base.triggerOnPageChange(e, f,
|
|
66
|
+
this.state.focusedIndex !== t && (e.data.focusedIndex = t, e.data.activedescendant = w.PopupList), this.base.triggerOnPageChange(e, f, r);
|
|
65
67
|
return;
|
|
66
68
|
}
|
|
67
69
|
}
|
|
68
|
-
|
|
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);
|
|
69
71
|
}, this.componentRef = (t) => {
|
|
70
72
|
this._element = t, this.base.wrapper = t;
|
|
71
73
|
}, this.searchbarRef = (t) => {
|
|
@@ -78,13 +80,13 @@ const { sizeMap: P, roundedMap: It } = Q, yt = "Please enter a valid value!", W
|
|
|
78
80
|
const e = this.base.initState();
|
|
79
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);
|
|
80
82
|
const o = this.props.filter !== void 0 ? this.props.filter : this.state.text;
|
|
81
|
-
|
|
83
|
+
K(o) && o !== "" && this.base.filterChanged("", e), this.state.text && (e.data.text = ""), this._lastSelectedOrDeslectedItemIndex = null, this.applyState(e);
|
|
82
84
|
}, this.onInputKeyDown = (t) => {
|
|
83
|
-
const { textField: e, groupField: o, virtual: s } = this.props, a = x(this.props), i = t.keyCode,
|
|
84
|
-
if (
|
|
85
|
-
return this.onTagsNavigate(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);
|
|
86
88
|
const f = () => {
|
|
87
|
-
t.preventDefault(), this.base.togglePopup(
|
|
89
|
+
t.preventDefault(), this.base.togglePopup(h), this.applyState(h);
|
|
88
90
|
};
|
|
89
91
|
if (this.opened)
|
|
90
92
|
if (i === u.pageUp)
|
|
@@ -93,28 +95,28 @@ const { sizeMap: P, roundedMap: It } = Q, yt = "Please enter a valid value!", W
|
|
|
93
95
|
t.preventDefault(), this.base.scrollPopupByPageSize(1);
|
|
94
96
|
else if ((t.ctrlKey || t.metaKey) && t.code === "KeyA") {
|
|
95
97
|
const b = (this.state.value && this.state.value.length) === a.length ? [] : a;
|
|
96
|
-
this.updateStateOnKeyboardNavigation(b,
|
|
98
|
+
this.updateStateOnKeyboardNavigation(b, h);
|
|
97
99
|
} else if ((t.ctrlKey || t.metaKey) && t.shiftKey && t.keyCode === u.end) {
|
|
98
100
|
const c = a.slice(this.getFocusedState().focusedIndex);
|
|
99
|
-
this.itemFocus(a.length - 1,
|
|
101
|
+
this.itemFocus(a.length - 1, h), this.updateStateOnKeyboardNavigation(c, h);
|
|
100
102
|
} else if ((t.ctrlKey || t.metaKey) && t.shiftKey && t.keyCode === u.home) {
|
|
101
103
|
const c = a.slice(0, this.getFocusedState().focusedIndex + 1);
|
|
102
|
-
this.itemFocus(0,
|
|
104
|
+
this.itemFocus(0, h), this.updateStateOnKeyboardNavigation(c, h);
|
|
103
105
|
} else if (t.shiftKey && t.keyCode === u.up) {
|
|
104
106
|
let c;
|
|
105
107
|
const b = this.getLastSelectedOrDeselectedIndex(1, n);
|
|
106
|
-
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,
|
|
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));
|
|
107
109
|
} else if (t.shiftKey && t.keyCode === u.down) {
|
|
108
110
|
let c;
|
|
109
111
|
const b = this.getLastSelectedOrDeselectedIndex(0, n);
|
|
110
|
-
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,
|
|
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));
|
|
111
113
|
} else if (t.altKey && i === u.up)
|
|
112
114
|
f();
|
|
113
115
|
else if (i === u.up || i === u.down) {
|
|
114
116
|
const c = s ? s.skip : 0, b = n - c;
|
|
115
117
|
if (o !== "" && e)
|
|
116
|
-
if (!this.props.skipDisabledItems &&
|
|
117
|
-
this.onNavigate(
|
|
118
|
+
if (!this.props.skipDisabledItems && p)
|
|
119
|
+
this.onNavigate(h, i);
|
|
118
120
|
else {
|
|
119
121
|
let m = 0;
|
|
120
122
|
if (i === u.down || i === u.right) {
|
|
@@ -134,12 +136,12 @@ const { sizeMap: P, roundedMap: It } = Q, yt = "Please enter a valid value!", W
|
|
|
134
136
|
}
|
|
135
137
|
if (m) {
|
|
136
138
|
const I = m - n;
|
|
137
|
-
this.onNavigate(
|
|
139
|
+
this.onNavigate(h, i, I);
|
|
138
140
|
} else
|
|
139
|
-
this.onNavigate(
|
|
141
|
+
this.onNavigate(h, i);
|
|
140
142
|
}
|
|
141
|
-
else if (!this.props.skipDisabledItems &&
|
|
142
|
-
this.onNavigate(
|
|
143
|
+
else if (!this.props.skipDisabledItems && p)
|
|
144
|
+
this.onNavigate(h, i);
|
|
143
145
|
else {
|
|
144
146
|
let m = null;
|
|
145
147
|
if (i === u.down || i === u.right)
|
|
@@ -153,17 +155,17 @@ const { sizeMap: P, roundedMap: It } = Q, yt = "Please enter a valid value!", W
|
|
|
153
155
|
const I = a.indexOf(m);
|
|
154
156
|
if (I !== -1) {
|
|
155
157
|
const y = c + I - n;
|
|
156
|
-
this.onNavigate(
|
|
158
|
+
this.onNavigate(h, i, y);
|
|
157
159
|
} else
|
|
158
|
-
this.onNavigate(
|
|
160
|
+
this.onNavigate(h, i);
|
|
159
161
|
} else
|
|
160
|
-
this.onNavigate(
|
|
162
|
+
this.onNavigate(h, i);
|
|
161
163
|
}
|
|
162
|
-
this.applyState(
|
|
163
|
-
} else i === u.enter ? (t.preventDefault(), this.props.allowCustom &&
|
|
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();
|
|
164
166
|
else t.altKey && i === u.down ? f() : i === u.esc && this.clearButtonClick(t);
|
|
165
167
|
}, this.listContainerContent = () => {
|
|
166
|
-
const { header: t, footer: e, allowCustom: o, size: s, groupStickyHeaderItemRender: a, groupField: i, list:
|
|
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(
|
|
167
169
|
"div",
|
|
168
170
|
{
|
|
169
171
|
className: S("k-list", {
|
|
@@ -171,20 +173,20 @@ const { sizeMap: P, roundedMap: It } = Q, yt = "Please enter a valid value!", W
|
|
|
171
173
|
}),
|
|
172
174
|
key: "customitem",
|
|
173
175
|
onClick: this.customItemSelect,
|
|
174
|
-
onMouseDown:
|
|
176
|
+
onMouseDown: U
|
|
175
177
|
},
|
|
176
178
|
/* @__PURE__ */ g.createElement(
|
|
177
179
|
"div",
|
|
178
180
|
{
|
|
179
|
-
className: S("k-list-item k-custom-item", { "k-focus":
|
|
181
|
+
className: S("k-list-item k-custom-item", { "k-focus": j(n) }),
|
|
180
182
|
style: { fontStyle: "italic" }
|
|
181
183
|
},
|
|
182
184
|
d,
|
|
183
|
-
/* @__PURE__ */ g.createElement(B, { name: "plus", icon:
|
|
185
|
+
/* @__PURE__ */ g.createElement(B, { name: "plus", icon: ht, style: { position: "absolute", right: "0.5em" } })
|
|
184
186
|
)
|
|
185
187
|
);
|
|
186
188
|
let { group: f } = this.state;
|
|
187
|
-
return f === void 0 && i !== void 0 && (f =
|
|
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(
|
|
188
190
|
"div",
|
|
189
191
|
{
|
|
190
192
|
className: S("k-list", {
|
|
@@ -192,9 +194,9 @@ const { sizeMap: P, roundedMap: It } = Q, yt = "Please enter a valid value!", W
|
|
|
192
194
|
"k-virtual-list": this.base.vs.enabled
|
|
193
195
|
})
|
|
194
196
|
},
|
|
195
|
-
!
|
|
197
|
+
!r && f && p.length !== 0 && /* @__PURE__ */ g.createElement(gt, { group: f, render: a }),
|
|
196
198
|
this.renderList()
|
|
197
|
-
), this.showLicenseWatermark && /* @__PURE__ */ g.createElement(
|
|
199
|
+
), this.showLicenseWatermark && /* @__PURE__ */ g.createElement(it, { message: this.licenseMessage }), e && /* @__PURE__ */ g.createElement("div", { className: "k-list-footer" }, e));
|
|
198
200
|
}, this.renderListContainer = () => {
|
|
199
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 = {
|
|
200
202
|
dir: e !== void 0 ? e : t.dirCalculated,
|
|
@@ -209,10 +211,10 @@ const { sizeMap: P, roundedMap: It } = Q, yt = "Please enter a valid value!", W
|
|
|
209
211
|
},
|
|
210
212
|
itemsCount: [o.length, this.value.length]
|
|
211
213
|
};
|
|
212
|
-
return /* @__PURE__ */ g.createElement(
|
|
214
|
+
return /* @__PURE__ */ g.createElement(ut, { ...i }, this.listContainerContent());
|
|
213
215
|
}, this.renderAdaptiveListContainer = () => {
|
|
214
|
-
const { adaptiveTitle: t, adaptiveSubtitle: e, filterable: o, filter: s } = this.props, { windowWidth: a = 0 } = this.state, i = s !== void 0 ? s : this.state.text,
|
|
215
|
-
|
|
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,
|
|
216
218
|
{
|
|
217
219
|
value: i,
|
|
218
220
|
ref: (d) => {
|
|
@@ -225,64 +227,65 @@ const { sizeMap: P, roundedMap: It } = Q, yt = "Please enter a valid value!", W
|
|
|
225
227
|
fillMode: this.props.fillMode,
|
|
226
228
|
placeholder: this.props.placeholder
|
|
227
229
|
}
|
|
228
|
-
) : null,
|
|
230
|
+
) : null, p = {
|
|
229
231
|
title: t || this.props.label,
|
|
230
232
|
subTitle: e,
|
|
231
233
|
expand: this.opened,
|
|
232
234
|
onClose: (d) => this.closePopup(d),
|
|
233
235
|
windowWidth: a,
|
|
234
|
-
mobileFilter:
|
|
236
|
+
mobileFilter: r
|
|
235
237
|
};
|
|
236
|
-
return /* @__PURE__ */ g.createElement(
|
|
238
|
+
return /* @__PURE__ */ g.createElement(St, { ...p }, /* @__PURE__ */ g.createElement(Ct, null, /* @__PURE__ */ g.createElement("div", { className: "k-list-container" }, this.listContainerContent())));
|
|
237
239
|
}, this.closePopup = (t) => {
|
|
238
240
|
const e = this.base.initState();
|
|
239
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" });
|
|
240
242
|
const o = this.props.filter !== void 0 ? this.props.filter : this.state.text;
|
|
241
|
-
|
|
243
|
+
K(o) && o !== "" && this.base.filterChanged("", e), this.state.text && (e.data.text = ""), this.applyState(e);
|
|
242
244
|
}, this.onCancel = (t) => {
|
|
243
245
|
const e = this.base.initState();
|
|
244
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" });
|
|
245
247
|
const o = this.props.filter !== void 0 ? this.props.filter : this.state.text;
|
|
246
|
-
|
|
248
|
+
K(o) && o !== "" && this.base.filterChanged("", e), this.state.text && (e.data.text = ""), this.applyState(e);
|
|
247
249
|
}, this.renderList = () => {
|
|
248
|
-
const {
|
|
249
|
-
textField:
|
|
250
|
-
listNoDataRender:
|
|
251
|
-
itemRender:
|
|
252
|
-
groupHeaderItemRender:
|
|
253
|
-
dataItemKey:
|
|
254
|
-
virtual:
|
|
255
|
-
} = this.props,
|
|
250
|
+
const t = V(this), {
|
|
251
|
+
textField: e,
|
|
252
|
+
listNoDataRender: o,
|
|
253
|
+
itemRender: s,
|
|
254
|
+
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)`;
|
|
256
258
|
return /* @__PURE__ */ g.createElement(
|
|
257
|
-
|
|
259
|
+
ft,
|
|
258
260
|
{
|
|
259
261
|
id: this.base.listBoxId,
|
|
260
262
|
show: this.opened,
|
|
261
|
-
data:
|
|
262
|
-
focusedIndex:
|
|
263
|
+
data: p.slice(),
|
|
264
|
+
focusedIndex: n - r.skip,
|
|
263
265
|
value: this.value,
|
|
264
|
-
textField:
|
|
265
|
-
valueField:
|
|
266
|
+
textField: e,
|
|
267
|
+
valueField: i,
|
|
266
268
|
optionsGuid: this.base.guid,
|
|
267
269
|
groupField: this.props.groupField,
|
|
268
|
-
|
|
269
|
-
|
|
270
|
+
ariaLabel: t.toLanguageString(W, q[W]),
|
|
271
|
+
listRef: (c) => {
|
|
272
|
+
d.list = this.base.list = c;
|
|
270
273
|
},
|
|
271
|
-
wrapperStyle: this.mobileMode ? {} : { maxHeight:
|
|
274
|
+
wrapperStyle: this.mobileMode ? {} : { maxHeight: h.height },
|
|
272
275
|
wrapperCssClass: "k-list-content",
|
|
273
|
-
listStyle:
|
|
276
|
+
listStyle: d.enabled ? { transform: f } : void 0,
|
|
274
277
|
key: "listKey",
|
|
275
|
-
skip:
|
|
278
|
+
skip: r.skip,
|
|
276
279
|
onClick: this.handleItemClick,
|
|
277
|
-
itemRender:
|
|
278
|
-
groupHeaderItemRender:
|
|
279
|
-
noDataRender:
|
|
280
|
-
onMouseDown:
|
|
280
|
+
itemRender: s,
|
|
281
|
+
groupHeaderItemRender: a,
|
|
282
|
+
noDataRender: o,
|
|
283
|
+
onMouseDown: U,
|
|
281
284
|
onBlur: this.handleBlur,
|
|
282
285
|
onScroll: this.onScroll,
|
|
283
|
-
wrapperRef:
|
|
286
|
+
wrapperRef: d.scrollerRef,
|
|
284
287
|
scroller: this.base.renderScrollElement(),
|
|
285
|
-
ariaSetSize:
|
|
288
|
+
ariaSetSize: r.total
|
|
286
289
|
}
|
|
287
290
|
);
|
|
288
291
|
}, this.onScroll = (t) => {
|
|
@@ -291,10 +294,10 @@ const { sizeMap: P, roundedMap: It } = Q, yt = "Please enter a valid value!", W
|
|
|
291
294
|
const { groupField: s } = this.props;
|
|
292
295
|
let a = x(this.props);
|
|
293
296
|
if (!(!s || !a.length) && s) {
|
|
294
|
-
const i = this.itemHeight = this.itemHeight || (e.enabled ? e.itemHeight : o ? o.children[0].offsetHeight : 0),
|
|
297
|
+
const i = this.itemHeight = this.itemHeight || (e.enabled ? e.itemHeight : o ? o.children[0].offsetHeight : 0), p = t.target.scrollTop - e.skip * i;
|
|
295
298
|
a = this.base.getGroupedDataModernMode(a, s);
|
|
296
299
|
let d = a[0][s];
|
|
297
|
-
for (let n = 1; n < a.length && !(i * n >
|
|
300
|
+
for (let n = 1; n < a.length && !(i * n > p); n++)
|
|
298
301
|
a[n] && a[n][s] && (d = a[n][s]);
|
|
299
302
|
d !== this.state.group && this.setState({
|
|
300
303
|
group: d
|
|
@@ -333,21 +336,21 @@ const { sizeMap: P, roundedMap: It } = Q, yt = "Please enter a valid value!", W
|
|
|
333
336
|
}, 0);
|
|
334
337
|
}, this.setValidity = () => {
|
|
335
338
|
this._input && this._input.setCustomValidity && this._input.setCustomValidity(
|
|
336
|
-
this.validity.valid ? "" : this.props.validationMessage ||
|
|
339
|
+
this.validity.valid ? "" : this.props.validationMessage || Tt
|
|
337
340
|
);
|
|
338
|
-
}, this.validate(l), this.licenseMessage =
|
|
341
|
+
}, this.validate(l), this.licenseMessage = ot(H);
|
|
339
342
|
}
|
|
340
343
|
get _inputId() {
|
|
341
344
|
return this.props.id;
|
|
342
345
|
}
|
|
343
346
|
get document() {
|
|
344
|
-
if (
|
|
347
|
+
if (z)
|
|
345
348
|
return this.element && this.element.ownerDocument || document;
|
|
346
349
|
}
|
|
347
350
|
validate(l) {
|
|
348
351
|
if (l.filterable || l.virtual) {
|
|
349
352
|
const t = [];
|
|
350
|
-
l.filterable && t.push("filterable"), l.virtual && t.push("virtualization"), this.showLicenseWatermark = !
|
|
353
|
+
l.filterable && t.push("filterable"), l.virtual && t.push("virtualization"), this.showLicenseWatermark = !at(H, {
|
|
351
354
|
component: "MultiSelect",
|
|
352
355
|
features: t
|
|
353
356
|
});
|
|
@@ -365,7 +368,7 @@ const { sizeMap: P, roundedMap: It } = Q, yt = "Please enter a valid value!", W
|
|
|
365
368
|
get tagsToRender() {
|
|
366
369
|
const { tags: l, textField: t } = this.props, e = [];
|
|
367
370
|
return l === void 0 ? this.value.forEach((o) => {
|
|
368
|
-
e.push({ text:
|
|
371
|
+
e.push({ text: _(o, t), data: [o] });
|
|
369
372
|
}) : e.push(...l), e;
|
|
370
373
|
}
|
|
371
374
|
/**
|
|
@@ -408,22 +411,22 @@ const { sizeMap: P, roundedMap: It } = Q, yt = "Please enter a valid value!", W
|
|
|
408
411
|
}
|
|
409
412
|
/** @hidden */
|
|
410
413
|
componentDidUpdate(l, t) {
|
|
411
|
-
var
|
|
412
|
-
const { virtual: e, groupField: o = "" } = this.props, s = x(this.props), a = e ? e.skip : 0, i = l.virtual ? l.virtual.total : 0,
|
|
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();
|
|
413
416
|
if (this.validate(this.props), this.base.didUpdate(), !n.animate && d && this.onPopupClosed(), e && e.total !== i)
|
|
414
417
|
this.base.vs.calcScrollElementHeight(), this.base.vs.reset();
|
|
415
418
|
else {
|
|
416
419
|
let { focusedItem: f, focusedIndex: c } = this.getFocusedState();
|
|
417
|
-
o !== "" && (c = (
|
|
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);
|
|
418
421
|
}
|
|
419
422
|
this.scrollToFocused = !1, this.setValidity();
|
|
420
423
|
}
|
|
421
424
|
/** @hidden */
|
|
422
425
|
componentDidMount() {
|
|
423
426
|
var t;
|
|
424
|
-
this.observerResize =
|
|
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);
|
|
425
428
|
const l = this.props.name || this.props.id;
|
|
426
|
-
this.KendoPasteSubscription =
|
|
429
|
+
this.KendoPasteSubscription = nt(this._element, {
|
|
427
430
|
fieldName: l,
|
|
428
431
|
onValueChange: (e) => {
|
|
429
432
|
this.handleKendoPasteValue(e);
|
|
@@ -437,15 +440,15 @@ const { sizeMap: P, roundedMap: It } = Q, yt = "Please enter a valid value!", W
|
|
|
437
440
|
}
|
|
438
441
|
/** @hidden */
|
|
439
442
|
onNavigate(l, t, e) {
|
|
440
|
-
const { allowCustom: o } = this.props, s = x(this.props), a = this.props.filter !== void 0 ? this.props.filter : this.state.text, { focusedType: i, focusedIndex:
|
|
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;
|
|
441
444
|
if (this.opened && t === u.up && d)
|
|
442
445
|
this.state.focusedIndex !== void 0 && (l.data.focusedIndex = void 0);
|
|
443
446
|
else {
|
|
444
447
|
const f = n.navigation.navigate({
|
|
445
448
|
keyCode: t,
|
|
446
|
-
current:
|
|
447
|
-
max: (
|
|
448
|
-
min:
|
|
449
|
+
current: r,
|
|
450
|
+
max: (h.enabled ? h.total : s.length) - 1,
|
|
451
|
+
min: p ? -1 : 0,
|
|
449
452
|
skipItems: e || void 0
|
|
450
453
|
});
|
|
451
454
|
f !== void 0 && (this.itemFocus(f, l), this.scrollToFocused = !0);
|
|
@@ -462,28 +465,28 @@ const { sizeMap: P, roundedMap: It } = Q, yt = "Please enter a valid value!", W
|
|
|
462
465
|
disabled: s,
|
|
463
466
|
textField: a,
|
|
464
467
|
dataItemKey: i,
|
|
465
|
-
virtual:
|
|
466
|
-
size:
|
|
468
|
+
virtual: r,
|
|
469
|
+
size: p,
|
|
467
470
|
rounded: d,
|
|
468
471
|
fillMode: n,
|
|
469
|
-
loading:
|
|
472
|
+
loading: h,
|
|
470
473
|
filter: f
|
|
471
|
-
} = this.props, { text: c, focused: b, focusedTag: m, currentValue: I } = this.state, y = this.base.vs,
|
|
472
|
-
y.enabled =
|
|
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);
|
|
473
476
|
const k = this.mobileMode && this.opened ? I : this.tagsToRender;
|
|
474
477
|
this.setItems(this.tagsToRender, this._tags);
|
|
475
|
-
const
|
|
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(
|
|
476
479
|
"div",
|
|
477
480
|
{
|
|
478
481
|
ref: this.componentRef,
|
|
479
482
|
className: S("k-multiselect k-input", t, {
|
|
480
|
-
[`k-input-${P[
|
|
481
|
-
[`k-rounded-${
|
|
483
|
+
[`k-input-${P[p] || p}`]: p,
|
|
484
|
+
[`k-rounded-${wt[d] || d}`]: d,
|
|
482
485
|
[`k-input-${n}`]: n,
|
|
483
486
|
"k-focus": b && !s,
|
|
484
|
-
"k-invalid": !
|
|
487
|
+
"k-invalid": !N,
|
|
485
488
|
"k-disabled": s,
|
|
486
|
-
"k-loading":
|
|
489
|
+
"k-loading": h,
|
|
487
490
|
"k-required": this.required
|
|
488
491
|
}),
|
|
489
492
|
style: e ? { ...l, width: void 0 } : l,
|
|
@@ -493,53 +496,55 @@ const { sizeMap: P, roundedMap: It } = Q, yt = "Please enter a valid value!", W
|
|
|
493
496
|
},
|
|
494
497
|
onBlur: this.handleBlur,
|
|
495
498
|
onClick: this.handleWrapperClick,
|
|
496
|
-
onMouseDown:
|
|
499
|
+
onMouseDown: It
|
|
497
500
|
},
|
|
498
|
-
this.props.prefix && /* @__PURE__ */ g.createElement(
|
|
501
|
+
this.props.prefix && /* @__PURE__ */ g.createElement(Q, { ...X }),
|
|
499
502
|
/* @__PURE__ */ g.createElement("div", { className: S("k-input-values") }, /* @__PURE__ */ g.createElement(
|
|
500
503
|
"div",
|
|
501
504
|
{
|
|
502
|
-
className: S("k-chip-list", { [`k-chip-list-${P[
|
|
505
|
+
className: S("k-chip-list", { [`k-chip-list-${P[p] || p}`]: p }),
|
|
503
506
|
role: "listbox",
|
|
507
|
+
"aria-label": Y.toLanguageString(G, q[G]),
|
|
508
|
+
"aria-orientation": "horizontal",
|
|
504
509
|
id: "tagslist-" + this.base.guid
|
|
505
510
|
},
|
|
506
511
|
k && k.length > 0 && /* @__PURE__ */ g.createElement(
|
|
507
|
-
|
|
512
|
+
mt,
|
|
508
513
|
{
|
|
509
514
|
tagRender: this.props.tagRender,
|
|
510
515
|
onTagDelete: this.onTagDelete,
|
|
511
516
|
data: k,
|
|
512
517
|
guid: this.base.guid,
|
|
513
|
-
focused: m ? k.find((T) =>
|
|
514
|
-
size:
|
|
518
|
+
focused: m ? k.find((T) => A(T, m, i)) : void 0,
|
|
519
|
+
size: p
|
|
515
520
|
}
|
|
516
521
|
)
|
|
517
|
-
), this.renderSearchBar(
|
|
518
|
-
|
|
519
|
-
this.props.suffix && /* @__PURE__ */ g.createElement(
|
|
520
|
-
|
|
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 }),
|
|
521
526
|
!this.mobileMode && this.renderListContainer()
|
|
522
527
|
), this.mobileMode && this.renderAdaptiveListContainer());
|
|
523
528
|
return e ? /* @__PURE__ */ g.createElement(
|
|
524
|
-
|
|
529
|
+
pt,
|
|
525
530
|
{
|
|
526
531
|
label: e,
|
|
527
|
-
editorId:
|
|
528
|
-
editorValue: c ||
|
|
529
|
-
editorValid:
|
|
532
|
+
editorId: L,
|
|
533
|
+
editorValue: c || _(this.value[0], a),
|
|
534
|
+
editorValid: N,
|
|
530
535
|
editorDisabled: s,
|
|
531
536
|
style: { width: l ? l.width : void 0 },
|
|
532
|
-
children:
|
|
537
|
+
children: R
|
|
533
538
|
}
|
|
534
|
-
) :
|
|
539
|
+
) : R;
|
|
535
540
|
}
|
|
536
541
|
renderSearchBar(l) {
|
|
537
|
-
const { activedescendant: t, focusedTag: e, currentValue: o } = this.state, { disabled: s, placeholder: a, ariaDescribedBy: i, ariaLabelledBy:
|
|
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 = {
|
|
538
543
|
accessKey: this.props.accessKey,
|
|
539
544
|
tabIndex: this.props.tabIndex
|
|
540
545
|
};
|
|
541
546
|
return /* @__PURE__ */ g.createElement(
|
|
542
|
-
|
|
547
|
+
vt,
|
|
543
548
|
{
|
|
544
549
|
id: l,
|
|
545
550
|
name: this.props.name,
|
|
@@ -551,45 +556,46 @@ const { sizeMap: P, roundedMap: It } = Q, yt = "Please enter a valid value!", W
|
|
|
551
556
|
ref: this.searchbarRef,
|
|
552
557
|
disabled: s,
|
|
553
558
|
expanded: this.opened,
|
|
554
|
-
|
|
559
|
+
ariaControls: this.base.listBoxId,
|
|
555
560
|
role: "combobox",
|
|
556
561
|
activedescendant: b,
|
|
557
|
-
ariaDescribedBy:
|
|
558
|
-
ariaLabelledBy:
|
|
562
|
+
ariaDescribedBy: I,
|
|
563
|
+
ariaLabelledBy: r,
|
|
559
564
|
ariaRequired: this.required,
|
|
560
|
-
ariaLabel:
|
|
565
|
+
ariaLabel: p,
|
|
566
|
+
ariaAutoComplete: "list",
|
|
561
567
|
inputAttributes: d,
|
|
562
|
-
...
|
|
568
|
+
...y
|
|
563
569
|
}
|
|
564
570
|
);
|
|
565
571
|
}
|
|
566
572
|
onTagsNavigate(l, t) {
|
|
567
573
|
const e = l.keyCode, { focusedTag: o } = this.state, s = this._tags, a = this.props.dataItemKey;
|
|
568
|
-
let i = o ? s.findIndex((d) =>
|
|
569
|
-
const
|
|
574
|
+
let i = o ? s.findIndex((d) => A(d, o, a)) : -1, r;
|
|
575
|
+
const p = i !== -1;
|
|
570
576
|
if (e === u.left)
|
|
571
|
-
|
|
577
|
+
p ? i = Math.max(0, i - 1) : i = s.length - 1, r = s[i];
|
|
572
578
|
else if (e === u.right)
|
|
573
|
-
i === s.length - 1 ?
|
|
579
|
+
i === s.length - 1 ? r = void 0 : p && (i = Math.min(s.length - 1, i + 1), r = s[i]);
|
|
574
580
|
else if (e === u.home && !l.shiftKey)
|
|
575
|
-
|
|
581
|
+
r = s[0];
|
|
576
582
|
else if (e === u.end && !l.shiftKey)
|
|
577
|
-
|
|
583
|
+
r = s[s.length - 1];
|
|
578
584
|
else if (e === u.delete) {
|
|
579
|
-
if (
|
|
585
|
+
if (p) {
|
|
580
586
|
const d = this.value;
|
|
581
587
|
D(d, s[i].data, a), this.triggerOnChange(d, t);
|
|
582
588
|
}
|
|
583
589
|
} else if (e === u.backspace) {
|
|
584
590
|
const d = this.value;
|
|
585
|
-
if (
|
|
591
|
+
if (p)
|
|
586
592
|
D(d, s[i].data, a), this.triggerOnChange(d, t);
|
|
587
|
-
else if (!
|
|
593
|
+
else if (!p && s.length) {
|
|
588
594
|
const n = s.pop();
|
|
589
595
|
D(d, n.data, a), this.triggerOnChange(d, t);
|
|
590
596
|
}
|
|
591
597
|
}
|
|
592
|
-
|
|
598
|
+
r !== o && (t.data.focusedTag = r, t.data.activedescendant = w.TagsList), this.applyState(t);
|
|
593
599
|
}
|
|
594
600
|
triggerOnChange(l, t) {
|
|
595
601
|
this.props.value === void 0 && (t.data.value = [...l]), this._valueItemsDuringOnChange = [], this.setItems(l, this._valueItemsDuringOnChange), t.events.push({ type: "onChange" });
|
|
@@ -607,18 +613,18 @@ const { sizeMap: P, roundedMap: It } = Q, yt = "Please enter a valid value!", W
|
|
|
607
613
|
dataItemKey: o,
|
|
608
614
|
virtual: s,
|
|
609
615
|
textField: a,
|
|
610
|
-
focusedItemIndex: i =
|
|
611
|
-
skipDisabledItems:
|
|
612
|
-
} = this.props,
|
|
616
|
+
focusedItemIndex: i = yt,
|
|
617
|
+
skipDisabledItems: r
|
|
618
|
+
} = this.props, p = x(this.props), d = s && s.skip || 0;
|
|
613
619
|
let n;
|
|
614
620
|
if (l !== void 0)
|
|
615
621
|
return {
|
|
616
622
|
focusedIndex: l,
|
|
617
|
-
focusedItem:
|
|
623
|
+
focusedItem: p[l - d],
|
|
618
624
|
focusedType: 1
|
|
619
625
|
/* ListItem */
|
|
620
626
|
};
|
|
621
|
-
const
|
|
627
|
+
const h = this.value;
|
|
622
628
|
if (e && t)
|
|
623
629
|
return {
|
|
624
630
|
focusedItem: null,
|
|
@@ -627,31 +633,31 @@ const { sizeMap: P, roundedMap: It } = Q, yt = "Please enter a valid value!", W
|
|
|
627
633
|
/* CustomItem */
|
|
628
634
|
};
|
|
629
635
|
if (t)
|
|
630
|
-
return n = i(
|
|
631
|
-
focusedItem:
|
|
636
|
+
return n = i(p, t, a), {
|
|
637
|
+
focusedItem: p[n],
|
|
632
638
|
focusedIndex: n + d,
|
|
633
639
|
focusedType: 1
|
|
634
640
|
/* ListItem */
|
|
635
641
|
};
|
|
636
|
-
if (
|
|
637
|
-
const f =
|
|
638
|
-
return n =
|
|
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 ? {
|
|
639
645
|
focusedIndex: n + d,
|
|
640
|
-
focusedItem:
|
|
646
|
+
focusedItem: p[n],
|
|
641
647
|
focusedType: 1
|
|
642
648
|
/* ListItem */
|
|
643
649
|
} : { focusedType: 0, focusedIndex: -1 };
|
|
644
|
-
} else if (
|
|
645
|
-
const f =
|
|
650
|
+
} else if (r && a && !t && d === 0) {
|
|
651
|
+
const f = p.findIndex((c) => !c.disabled);
|
|
646
652
|
return {
|
|
647
653
|
focusedIndex: f,
|
|
648
|
-
focusedItem:
|
|
654
|
+
focusedItem: p[f - d],
|
|
649
655
|
focusedType: 1
|
|
650
656
|
/* ListItem */
|
|
651
657
|
};
|
|
652
658
|
}
|
|
653
659
|
return d === 0 ? {
|
|
654
|
-
focusedItem:
|
|
660
|
+
focusedItem: p[0],
|
|
655
661
|
focusedIndex: 0,
|
|
656
662
|
focusedType: 1
|
|
657
663
|
/* ListItem */
|
|
@@ -687,7 +693,7 @@ const { sizeMap: P, roundedMap: It } = Q, yt = "Please enter a valid value!", W
|
|
|
687
693
|
}
|
|
688
694
|
};
|
|
689
695
|
C.displayName = "MultiSelect", C.propTypes = {
|
|
690
|
-
...
|
|
696
|
+
...E.propTypes,
|
|
691
697
|
autoClose: v.bool,
|
|
692
698
|
value: v.arrayOf(v.any),
|
|
693
699
|
defaultValue: v.arrayOf(v.any),
|
|
@@ -712,7 +718,7 @@ C.displayName = "MultiSelect", C.propTypes = {
|
|
|
712
718
|
skipDisabledItems: v.bool,
|
|
713
719
|
inputAttributes: v.object
|
|
714
720
|
}, C.defaultProps = {
|
|
715
|
-
...
|
|
721
|
+
...E.defaultProps,
|
|
716
722
|
autoClose: !0,
|
|
717
723
|
required: !1,
|
|
718
724
|
size: void 0,
|
|
@@ -722,16 +728,17 @@ C.displayName = "MultiSelect", C.propTypes = {
|
|
|
722
728
|
prefix: void 0,
|
|
723
729
|
suffix: void 0
|
|
724
730
|
};
|
|
725
|
-
let
|
|
726
|
-
const
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
731
|
+
let M = C;
|
|
732
|
+
const Ft = et(), Dt = lt(
|
|
733
|
+
dt(
|
|
734
|
+
Ft,
|
|
735
|
+
rt(M)
|
|
730
736
|
)
|
|
731
737
|
);
|
|
732
|
-
|
|
738
|
+
Dt.displayName = "KendoReactMultiSelect";
|
|
739
|
+
ct(M);
|
|
733
740
|
export {
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
741
|
+
Dt as MultiSelect,
|
|
742
|
+
Ft as MultiSelectPropsContext,
|
|
743
|
+
M as MultiSelectWithoutContext
|
|
737
744
|
};
|