@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.
- package/MultiSelect/MultiSelect.d.ts +17 -2
- package/MultiSelect/MultiSelect.js +1 -1
- package/MultiSelect/MultiSelect.mjs +541 -402
- package/MultiSelect/MultiSelectProps.d.ts +69 -0
- package/common/List.d.ts +1 -0
- package/common/List.js +1 -1
- package/common/List.mjs +60 -58
- package/common/ListItem.d.ts +5 -0
- package/common/ListItem.js +1 -1
- package/common/ListItem.mjs +40 -37
- package/dist/cdn/js/kendo-react-dropdowns.js +1 -1
- package/index.d.mts +2 -2
- package/index.d.ts +2 -2
- package/messages/index.d.ts +15 -0
- package/messages/index.js +1 -1
- package/messages/index.mjs +23 -17
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +10 -10
|
@@ -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
|
|
9
|
-
import
|
|
10
|
-
import { createPropsContext as
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import { ActiveDescendant as
|
|
21
|
-
import { getFilteredData as
|
|
22
|
-
import { packageMetadata as
|
|
23
|
-
import
|
|
24
|
-
import { AdaptiveMode as
|
|
25
|
-
import { ActionSheetContent as
|
|
26
|
-
import
|
|
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 {
|
|
29
|
-
const { sizeMap:
|
|
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:
|
|
32
|
+
activedescendant: T.PopupList,
|
|
33
33
|
currentValue: []
|
|
34
|
-
}, this._element = null, this._valueItemsDuringOnChange = null, this.base = new
|
|
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 = (
|
|
37
|
-
if (
|
|
36
|
+
}, this.handleKendoPasteValue = (e) => {
|
|
37
|
+
if (e == null)
|
|
38
38
|
return;
|
|
39
|
-
const
|
|
40
|
-
const d =
|
|
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 =
|
|
43
|
-
r.some((
|
|
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
|
|
50
|
-
|
|
51
|
-
}, this.handleItemSelect = (
|
|
52
|
-
|
|
53
|
-
this.
|
|
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
|
-
|
|
56
|
-
}, this.onTagDelete = (
|
|
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 =
|
|
59
|
-
const
|
|
60
|
-
|
|
61
|
-
}, this.itemFocus = (
|
|
62
|
-
const { allowCustom: o, virtual:
|
|
63
|
-
if (
|
|
64
|
-
const
|
|
65
|
-
if (
|
|
66
|
-
this.state.focusedIndex !==
|
|
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
|
-
|
|
71
|
-
}, this.componentRef = (
|
|
72
|
-
this._element =
|
|
73
|
-
}, this.searchbarRef = (
|
|
74
|
-
const
|
|
75
|
-
|
|
76
|
-
}, this.onChangeHandler = (
|
|
77
|
-
const
|
|
78
|
-
|
|
79
|
-
}, this.clearButtonClick = (
|
|
80
|
-
const
|
|
81
|
-
|
|
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
|
-
|
|
84
|
-
}, this.onInputKeyDown = (
|
|
85
|
-
const { textField:
|
|
86
|
-
if (
|
|
87
|
-
return this.onTagsNavigate(
|
|
88
|
-
const
|
|
89
|
-
|
|
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 (
|
|
93
|
-
|
|
94
|
-
else if (
|
|
95
|
-
|
|
96
|
-
else if ((
|
|
97
|
-
const
|
|
98
|
-
this.updateStateOnKeyboardNavigation(
|
|
99
|
-
} else if ((
|
|
100
|
-
const
|
|
101
|
-
this.itemFocus(a.length - 1,
|
|
102
|
-
} else if ((
|
|
103
|
-
const
|
|
104
|
-
this.itemFocus(0,
|
|
105
|
-
} else if (
|
|
106
|
-
let
|
|
107
|
-
const
|
|
108
|
-
|
|
109
|
-
} else if (
|
|
110
|
-
let
|
|
111
|
-
const
|
|
112
|
-
|
|
113
|
-
} else if (
|
|
114
|
-
|
|
115
|
-
else if (
|
|
116
|
-
const
|
|
117
|
-
if (o !== "" &&
|
|
118
|
-
if (!this.props.skipDisabledItems &&
|
|
119
|
-
this.onNavigate(
|
|
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
|
|
122
|
-
if (
|
|
123
|
-
const I = a.slice(
|
|
124
|
-
|
|
125
|
-
} else if (
|
|
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,
|
|
129
|
+
I = a, g = a.findIndex((S) => !S.disabled), g !== -1 && (g = g + p);
|
|
129
130
|
else {
|
|
130
|
-
I = a.slice(0,
|
|
131
|
-
let
|
|
132
|
-
for (;
|
|
133
|
-
|
|
134
|
-
|
|
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 (
|
|
138
|
-
const I =
|
|
139
|
-
this.onNavigate(
|
|
138
|
+
if (g) {
|
|
139
|
+
const I = g - n;
|
|
140
|
+
this.onNavigate(c, s, I);
|
|
140
141
|
} else
|
|
141
|
-
this.onNavigate(
|
|
142
|
+
this.onNavigate(c, s);
|
|
142
143
|
}
|
|
143
|
-
else if (!this.props.skipDisabledItems &&
|
|
144
|
-
this.onNavigate(
|
|
144
|
+
else if (!this.props.skipDisabledItems && h)
|
|
145
|
+
this.onNavigate(c, s);
|
|
145
146
|
else {
|
|
146
|
-
let
|
|
147
|
-
if (
|
|
148
|
-
|
|
149
|
-
else if (
|
|
150
|
-
const I = a.slice(0,
|
|
151
|
-
for (
|
|
152
|
-
|
|
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 (
|
|
155
|
-
const I = a.indexOf(
|
|
155
|
+
if (g) {
|
|
156
|
+
const I = a.indexOf(g);
|
|
156
157
|
if (I !== -1) {
|
|
157
|
-
const
|
|
158
|
-
this.onNavigate(
|
|
158
|
+
const S = p + I - n;
|
|
159
|
+
this.onNavigate(c, s, S);
|
|
159
160
|
} else
|
|
160
|
-
this.onNavigate(
|
|
161
|
+
this.onNavigate(c, s);
|
|
161
162
|
} else
|
|
162
|
-
this.onNavigate(
|
|
163
|
+
this.onNavigate(c, s);
|
|
163
164
|
}
|
|
164
|
-
this.applyState(
|
|
165
|
-
} else
|
|
166
|
-
|
|
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:
|
|
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:
|
|
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:
|
|
180
|
+
onMouseDown: N
|
|
177
181
|
},
|
|
178
|
-
|
|
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:
|
|
189
|
-
return
|
|
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:
|
|
193
|
-
[`k-list-${this.mobileMode ? "lg" :
|
|
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
|
-
|
|
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__ */
|
|
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
|
|
202
|
-
dir:
|
|
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
|
-
...
|
|
206
|
-
popupClass:
|
|
207
|
-
anchor:
|
|
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__ */
|
|
241
|
+
return /* @__PURE__ */ f.createElement(me, { ...s }, this.listContainerContent());
|
|
215
242
|
}, this.renderAdaptiveListContainer = () => {
|
|
216
|
-
const { adaptiveTitle:
|
|
217
|
-
|
|
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:
|
|
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,
|
|
231
|
-
title:
|
|
232
|
-
subTitle:
|
|
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__ */
|
|
239
|
-
}, this.closePopup = (
|
|
240
|
-
const
|
|
241
|
-
|
|
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
|
-
|
|
244
|
-
}, this.onCancel = (
|
|
245
|
-
const
|
|
246
|
-
|
|
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
|
-
|
|
275
|
+
L(o) && o !== "" && this.base.filterChanged("", t), this.state.text && (t.data.text = ""), this.applyState(t);
|
|
249
276
|
}, this.renderList = () => {
|
|
250
|
-
const
|
|
251
|
-
textField:
|
|
277
|
+
const e = w(this), {
|
|
278
|
+
textField: t,
|
|
252
279
|
listNoDataRender: o,
|
|
253
|
-
itemRender:
|
|
280
|
+
itemRender: i,
|
|
254
281
|
groupHeaderItemRender: a,
|
|
255
|
-
dataItemKey:
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
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:
|
|
264
|
-
focusedIndex:
|
|
291
|
+
data: d.slice(),
|
|
292
|
+
focusedIndex: c - h.skip,
|
|
265
293
|
value: this.value,
|
|
266
|
-
textField:
|
|
267
|
-
valueField:
|
|
294
|
+
textField: t,
|
|
295
|
+
valueField: s,
|
|
268
296
|
optionsGuid: this.base.guid,
|
|
269
297
|
groupField: this.props.groupField,
|
|
270
|
-
ariaLabel:
|
|
271
|
-
listRef: (
|
|
272
|
-
|
|
298
|
+
ariaLabel: e.toLanguageString(G, A[G]),
|
|
299
|
+
listRef: (v) => {
|
|
300
|
+
n.list = this.base.list = v;
|
|
273
301
|
},
|
|
274
|
-
wrapperStyle: this.mobileMode ? {} : { maxHeight:
|
|
302
|
+
wrapperStyle: this.mobileMode ? {} : { maxHeight: m.height },
|
|
275
303
|
wrapperCssClass: "k-list-content",
|
|
276
|
-
listStyle:
|
|
304
|
+
listStyle: n.enabled ? { transform: p } : void 0,
|
|
277
305
|
key: "listKey",
|
|
278
|
-
skip:
|
|
306
|
+
skip: h.skip,
|
|
279
307
|
onClick: this.handleItemClick,
|
|
280
|
-
itemRender:
|
|
308
|
+
itemRender: i,
|
|
281
309
|
groupHeaderItemRender: a,
|
|
282
310
|
noDataRender: o,
|
|
283
|
-
onMouseDown:
|
|
311
|
+
onMouseDown: N,
|
|
284
312
|
onBlur: this.handleBlur,
|
|
285
313
|
onScroll: this.onScroll,
|
|
286
|
-
wrapperRef:
|
|
314
|
+
wrapperRef: n.scrollerRef,
|
|
287
315
|
scroller: this.base.renderScrollElement(),
|
|
288
|
-
ariaSetSize:
|
|
316
|
+
ariaSetSize: h.total,
|
|
317
|
+
showSelectionCheckbox: r
|
|
289
318
|
}
|
|
290
319
|
);
|
|
291
|
-
}, this.onScroll = (
|
|
292
|
-
const { vs:
|
|
293
|
-
|
|
294
|
-
const { groupField:
|
|
295
|
-
let a =
|
|
296
|
-
if (!(!
|
|
297
|
-
const
|
|
298
|
-
a = this.base.getGroupedDataModernMode(a,
|
|
299
|
-
let d = a[0][
|
|
300
|
-
for (let n = 1; n < a.length && !(
|
|
301
|
-
a[n] && a[n][
|
|
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 = (
|
|
307
|
-
const
|
|
308
|
-
if (!
|
|
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
|
|
311
|
-
|
|
312
|
-
const a = o ? { [o]:
|
|
313
|
-
this.state.text !== void 0 && (
|
|
314
|
-
const
|
|
315
|
-
this.triggerOnChange(
|
|
316
|
-
}, this.handleWrapperClick = (
|
|
317
|
-
const
|
|
318
|
-
!this.opened &&
|
|
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 =
|
|
321
|
-
}, this.handleItemClick = (
|
|
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 =
|
|
324
|
-
}, this.
|
|
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
|
|
328
|
-
|
|
329
|
-
}, this.handleFocus = (
|
|
330
|
-
this._skipFocusEvent || this.base.handleFocus(
|
|
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 ||
|
|
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 =
|
|
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 (
|
|
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
|
|
353
|
-
l.filterable &&
|
|
406
|
+
const e = [];
|
|
407
|
+
l.filterable && e.push("filterable"), l.virtual && e.push("virtualization"), this.showLicenseWatermark = !ne(W, {
|
|
354
408
|
component: "MultiSelect",
|
|
355
|
-
features:
|
|
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,
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
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
|
|
379
|
-
return !!(this.state.windowWidth && this.props._adaptiveMode && this.state.windowWidth <= ((
|
|
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,
|
|
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:
|
|
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 :
|
|
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 :
|
|
485
|
+
return this.props.validityStyles !== void 0 ? this.props.validityStyles : k.defaultProps.validityStyles;
|
|
411
486
|
}
|
|
412
487
|
/** @hidden */
|
|
413
|
-
componentDidUpdate(l,
|
|
414
|
-
var
|
|
415
|
-
const { virtual:
|
|
416
|
-
if (this.validate(this.props), this.base.didUpdate(), !n.animate && d && this.onPopupClosed(),
|
|
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:
|
|
420
|
-
o !== "" && (
|
|
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
|
|
427
|
-
this.observerResize =
|
|
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 =
|
|
504
|
+
this.KendoPasteSubscription = de(this._element, {
|
|
430
505
|
fieldName: l,
|
|
431
|
-
onValueChange: (
|
|
432
|
-
this.handleKendoPasteValue(
|
|
506
|
+
onValueChange: (t) => {
|
|
507
|
+
this.handleKendoPasteValue(t);
|
|
433
508
|
}
|
|
434
509
|
});
|
|
435
510
|
}
|
|
436
511
|
/** @hidden */
|
|
437
512
|
componentWillUnmount() {
|
|
438
|
-
var l,
|
|
439
|
-
(l = this.document) != null && l.body && this.observerResize && this.observerResize.disconnect(), (
|
|
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,
|
|
443
|
-
const { allowCustom: o } = this.props,
|
|
444
|
-
if (this.
|
|
445
|
-
|
|
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
|
|
448
|
-
keyCode:
|
|
449
|
-
current:
|
|
450
|
-
max: (
|
|
451
|
-
min:
|
|
452
|
-
skipItems:
|
|
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
|
-
|
|
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:
|
|
463
|
-
label:
|
|
549
|
+
className: e,
|
|
550
|
+
label: t,
|
|
464
551
|
dir: o,
|
|
465
|
-
disabled:
|
|
552
|
+
disabled: i,
|
|
466
553
|
textField: a,
|
|
467
|
-
dataItemKey:
|
|
554
|
+
dataItemKey: s,
|
|
468
555
|
virtual: r,
|
|
469
|
-
size:
|
|
556
|
+
size: h,
|
|
470
557
|
rounded: d,
|
|
471
558
|
fillMode: n,
|
|
472
|
-
loading:
|
|
473
|
-
filter:
|
|
474
|
-
} = this.props, { text:
|
|
475
|
-
|
|
476
|
-
const
|
|
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
|
|
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:
|
|
483
|
-
[`k-input-${
|
|
484
|
-
[`k-rounded-${
|
|
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":
|
|
487
|
-
"k-invalid": !
|
|
488
|
-
"k-disabled":
|
|
489
|
-
"k-loading":
|
|
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:
|
|
579
|
+
style: t ? { ...l, width: void 0 } : l,
|
|
493
580
|
dir: o,
|
|
494
|
-
onFocus: (
|
|
495
|
-
this.mobileMode ? this.handleWrapperClick(
|
|
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:
|
|
586
|
+
onMouseDown: xe
|
|
500
587
|
},
|
|
501
|
-
this.props.prefix && /* @__PURE__ */
|
|
502
|
-
/* @__PURE__ */
|
|
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:
|
|
592
|
+
className: C("k-chip-list", { [`k-chip-list-${_[h] || h}`]: h }),
|
|
506
593
|
role: "listbox",
|
|
507
|
-
"aria-label":
|
|
594
|
+
"aria-label": Q.toLanguageString(Y, A[Y]),
|
|
508
595
|
"aria-orientation": "horizontal",
|
|
509
596
|
id: "tagslist-" + this.base.guid
|
|
510
597
|
},
|
|
511
|
-
|
|
512
|
-
|
|
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:
|
|
603
|
+
data: F,
|
|
517
604
|
guid: this.base.guid,
|
|
518
|
-
focused:
|
|
519
|
-
size:
|
|
605
|
+
focused: g ? F.find((E) => H(E, g, s)) : void 0,
|
|
606
|
+
size: h
|
|
520
607
|
}
|
|
521
608
|
)
|
|
522
|
-
), this.renderSearchBar(
|
|
523
|
-
|
|
524
|
-
this.props.suffix && /* @__PURE__ */
|
|
525
|
-
|
|
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
|
|
529
|
-
|
|
615
|
+
return t ? /* @__PURE__ */ f.createElement(
|
|
616
|
+
ue,
|
|
530
617
|
{
|
|
531
|
-
label:
|
|
532
|
-
editorId:
|
|
533
|
-
editorValue:
|
|
534
|
-
editorValid:
|
|
535
|
-
editorDisabled:
|
|
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:
|
|
624
|
+
children: B
|
|
538
625
|
}
|
|
539
|
-
) :
|
|
626
|
+
) : B;
|
|
540
627
|
}
|
|
541
628
|
renderSearchBar(l) {
|
|
542
|
-
const { activedescendant:
|
|
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__ */
|
|
547
|
-
|
|
633
|
+
return /* @__PURE__ */ f.createElement(
|
|
634
|
+
Se,
|
|
548
635
|
{
|
|
549
636
|
id: l,
|
|
550
637
|
name: this.props.name,
|
|
551
|
-
size: Math.max((
|
|
552
|
-
placeholder: this.mobileMode && this.opened ?
|
|
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:
|
|
644
|
+
disabled: i,
|
|
558
645
|
expanded: this.opened,
|
|
559
646
|
ariaControls: this.base.listBoxId,
|
|
560
647
|
role: "combobox",
|
|
561
|
-
activedescendant:
|
|
648
|
+
activedescendant: v,
|
|
562
649
|
ariaDescribedBy: I,
|
|
563
650
|
ariaLabelledBy: r,
|
|
564
651
|
ariaRequired: this.required,
|
|
565
|
-
ariaLabel:
|
|
652
|
+
ariaLabel: h,
|
|
566
653
|
ariaAutoComplete: "list",
|
|
567
654
|
inputAttributes: d,
|
|
568
|
-
...
|
|
655
|
+
...S
|
|
569
656
|
}
|
|
570
657
|
);
|
|
571
658
|
}
|
|
572
|
-
onTagsNavigate(l,
|
|
573
|
-
const
|
|
574
|
-
let
|
|
575
|
-
const
|
|
576
|
-
if (
|
|
577
|
-
|
|
578
|
-
else if (
|
|
579
|
-
|
|
580
|
-
else if (
|
|
581
|
-
r =
|
|
582
|
-
else if (
|
|
583
|
-
r =
|
|
584
|
-
else if (
|
|
585
|
-
if (
|
|
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
|
-
|
|
674
|
+
O(d, i[s].data, a), this.triggerOnChange(d, e);
|
|
588
675
|
}
|
|
589
|
-
} else if (
|
|
676
|
+
} else if (t === u.backspace) {
|
|
590
677
|
const d = this.value;
|
|
591
|
-
if (
|
|
592
|
-
|
|
593
|
-
else if (!
|
|
594
|
-
const n =
|
|
595
|
-
|
|
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 && (
|
|
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
|
-
|
|
601
|
-
|
|
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
|
-
|
|
604
|
-
|
|
605
|
-
o[s - a] !== void 0 && this.handleItemClick(s, l);
|
|
694
|
+
setItems(l, e) {
|
|
695
|
+
e.length = 0, e.push(...l);
|
|
606
696
|
}
|
|
607
|
-
|
|
608
|
-
|
|
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
|
-
|
|
612
|
-
|
|
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:
|
|
709
|
+
virtual: i,
|
|
615
710
|
textField: a,
|
|
616
|
-
focusedItemIndex:
|
|
711
|
+
focusedItemIndex: s = Ce,
|
|
617
712
|
skipDisabledItems: r
|
|
618
|
-
} = this.props,
|
|
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:
|
|
718
|
+
focusedItem: h[l - d],
|
|
624
719
|
focusedType: 1
|
|
625
720
|
/* ListItem */
|
|
626
721
|
};
|
|
627
|
-
const
|
|
628
|
-
if (
|
|
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 (
|
|
636
|
-
return n =
|
|
637
|
-
focusedItem:
|
|
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 (
|
|
643
|
-
|
|
644
|
-
|
|
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:
|
|
755
|
+
focusedItem: h[n],
|
|
647
756
|
focusedType: 1
|
|
648
757
|
/* ListItem */
|
|
649
758
|
} : { focusedType: 0, focusedIndex: -1 };
|
|
650
|
-
} else if (r && a && !
|
|
651
|
-
const
|
|
759
|
+
} else if (r && a && !e && d === 0) {
|
|
760
|
+
const m = h.findIndex((p) => !p.disabled);
|
|
652
761
|
return {
|
|
653
|
-
focusedIndex:
|
|
654
|
-
focusedItem:
|
|
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:
|
|
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
|
|
674
|
-
this.setState({ windowWidth:
|
|
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,
|
|
684
|
-
this.setState({ value: l }), this.triggerOnChange(l,
|
|
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,
|
|
692
|
-
return this._lastSelectedOrDeslectedItemIndex === null && (this._lastSelectedOrDeslectedItemIndex =
|
|
824
|
+
getLastSelectedOrDeselectedIndex(l, e) {
|
|
825
|
+
return this._lastSelectedOrDeslectedItemIndex === null && (this._lastSelectedOrDeslectedItemIndex = e), this._lastSelectedOrDeslectedItemIndex !== null ? this._lastSelectedOrDeslectedItemIndex + l : null;
|
|
693
826
|
}
|
|
694
827
|
};
|
|
695
|
-
|
|
696
|
-
...
|
|
697
|
-
autoClose:
|
|
698
|
-
value:
|
|
699
|
-
defaultValue:
|
|
700
|
-
dataItemKey:
|
|
701
|
-
placeholder:
|
|
702
|
-
tags:
|
|
703
|
-
|
|
704
|
-
text:
|
|
705
|
-
data:
|
|
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:
|
|
709
|
-
id:
|
|
710
|
-
ariaLabelledBy:
|
|
711
|
-
ariaDescribedBy:
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
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
|
|
732
|
-
const
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
870
|
+
let K = k;
|
|
871
|
+
const Ee = ie(), Oe = he(
|
|
872
|
+
ce(
|
|
873
|
+
Ee,
|
|
874
|
+
pe(K)
|
|
736
875
|
)
|
|
737
876
|
);
|
|
738
|
-
|
|
739
|
-
|
|
877
|
+
Oe.displayName = "KendoReactMultiSelect";
|
|
878
|
+
fe(K);
|
|
740
879
|
export {
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
880
|
+
Oe as MultiSelect,
|
|
881
|
+
Ee as MultiSelectPropsContext,
|
|
882
|
+
K as MultiSelectWithoutContext
|
|
744
883
|
};
|