@progress/kendo-react-dropdowns 8.3.0-develop.5 → 8.3.0-develop.7
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/ComboBox/ComboBox.js +1 -1
- package/ComboBox/ComboBox.mjs +30 -30
- package/DropDownList/DropDownList.js +1 -1
- package/DropDownList/DropDownList.mjs +282 -277
- package/DropDownTree/DropDownTree.js +1 -1
- package/DropDownTree/DropDownTree.mjs +1 -1
- package/MultiSelect/MultiSelect.js +1 -1
- package/MultiSelect/MultiSelect.mjs +1 -1
- package/MultiSelectTree/MultiSelectTree.js +1 -1
- package/MultiSelectTree/MultiSelectTree.mjs +11 -11
- package/common/ClearButton.js +1 -1
- package/common/ClearButton.mjs +21 -27
- package/common/GroupStickyHeader.js +1 -1
- package/common/GroupStickyHeader.mjs +11 -12
- package/common/List.js +1 -1
- package/common/List.mjs +88 -92
- package/common/ListContainer.js +1 -1
- package/common/ListContainer.mjs +21 -23
- package/common/ListDefaultItem.js +1 -1
- package/common/ListDefaultItem.mjs +20 -25
- package/common/ListFilter.js +1 -1
- package/common/ListFilter.mjs +19 -19
- package/common/ListGroupItem.js +1 -1
- package/common/ListGroupItem.mjs +22 -22
- package/common/ListItem.js +1 -1
- package/common/ListItem.mjs +37 -39
- package/dist/cdn/js/kendo-react-dropdowns.js +1 -1
- package/index.d.mts +15 -19
- package/index.d.ts +15 -19
- package/package-metadata.mjs +1 -1
- package/package.json +9 -9
|
@@ -6,34 +6,34 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
"use client";
|
|
9
|
-
import * as
|
|
10
|
-
import
|
|
11
|
-
import { classNames as
|
|
12
|
-
import { FloatingLabel as
|
|
13
|
-
import { caretAltDownIcon as
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import { getFilteredData as
|
|
21
|
-
import { packageMetadata as
|
|
22
|
-
import { Button as
|
|
23
|
-
import { provideLocalizationService as
|
|
24
|
-
import { dropDownListArrowBtnAriaLabel as
|
|
25
|
-
import {
|
|
26
|
-
import { ActionSheet as
|
|
27
|
-
const
|
|
9
|
+
import * as u from "react";
|
|
10
|
+
import C from "prop-types";
|
|
11
|
+
import { classNames as x, uDropDownList as D, Keys as I, validatePackage as ee, svgIconPropType as te, canUseDOM as B, getTabIndex as se, IconWrap as ie, uDropDownsActionSheet as K, createPropsContext as ae, withIdHOC as oe, withPropsContext as ne, withUnstyledHOC as re } from "@progress/kendo-react-common";
|
|
12
|
+
import { FloatingLabel as le } from "@progress/kendo-react-labels";
|
|
13
|
+
import { caretAltDownIcon as de, xIcon as pe } from "@progress/kendo-svg-icons";
|
|
14
|
+
import he from "../common/ListContainer.mjs";
|
|
15
|
+
import ce from "../common/ListFilter.mjs";
|
|
16
|
+
import W from "../common/GroupStickyHeader.mjs";
|
|
17
|
+
import ue from "../common/ListDefaultItem.mjs";
|
|
18
|
+
import me from "../common/List.mjs";
|
|
19
|
+
import R from "../common/DropDownBase.mjs";
|
|
20
|
+
import { getFilteredData as E, areSame as k, getItemValue as T, sameCharsOnly as fe, shuffleData as ge, matchText as q, isPresent as U, itemIndexStartsWith as ve } from "../common/utils.mjs";
|
|
21
|
+
import { packageMetadata as be } from "../package-metadata.mjs";
|
|
22
|
+
import { Button as G } from "@progress/kendo-react-buttons";
|
|
23
|
+
import { provideLocalizationService as Ie } from "@progress/kendo-react-intl";
|
|
24
|
+
import { dropDownListArrowBtnAriaLabel as Y, messages as ye } from "../messages/index.mjs";
|
|
25
|
+
import { MOBILE_SMALL_DEVISE as $, MOBILE_MEDIUM_DEVISE as j } from "../common/constants.mjs";
|
|
26
|
+
import { ActionSheet as we, ActionSheetHeader as Se, ActionSheetContent as xe } from "@progress/kendo-react-layout";
|
|
27
|
+
const Ce = "Please select a value from the list!", N = class N extends u.Component {
|
|
28
28
|
constructor(s) {
|
|
29
|
-
super(s), this.state = {}, this._element = null, this.base = new
|
|
29
|
+
super(s), this.state = {}, this._element = null, this.base = new R(this), this.searchState = { word: "", last: "" }, this._select = null, this._skipFocusEvent = !1, this._filterInput = null, this._navigated = !1, this._lastKeypressIsFilter = !1, this.itemHeight = 0, this.focus = () => {
|
|
30
30
|
this.base.wrapper && this.base.wrapper.focus({ preventScroll: !0 });
|
|
31
31
|
}, this.handleItemSelect = (e, t) => {
|
|
32
|
-
const { virtual:
|
|
33
|
-
this.triggerOnChange(
|
|
32
|
+
const { virtual: o, dataItemKey: h, defaultItem: n } = this.props, l = E(this.props), b = o ? o.skip : 0, d = e === -1 && n !== void 0 ? n : l[e - b], i = !k(d, this.value, h);
|
|
33
|
+
this.triggerOnChange(d, t), i && this.base.triggerPageChangeCornerItems(d, t);
|
|
34
34
|
}, this.componentRef = (e) => {
|
|
35
35
|
this._element = e, this.base.wrapper = e;
|
|
36
|
-
}, this.dummySelect = (e) => /* @__PURE__ */
|
|
36
|
+
}, this.dummySelect = (e) => /* @__PURE__ */ u.createElement(
|
|
37
37
|
"select",
|
|
38
38
|
{
|
|
39
39
|
name: this.props.name,
|
|
@@ -45,61 +45,63 @@ const ke = "Please select a value from the list!", { sizeMap: T, roundedMap: Se
|
|
|
45
45
|
title: this.props.label,
|
|
46
46
|
style: { opacity: 0, width: 1, border: 0, zIndex: -1, position: "absolute", left: "50%" }
|
|
47
47
|
},
|
|
48
|
-
/* @__PURE__ */
|
|
48
|
+
/* @__PURE__ */ u.createElement(
|
|
49
49
|
"option",
|
|
50
50
|
{
|
|
51
51
|
value: this.props.valueMap ? this.props.valueMap.call(void 0, e) : e
|
|
52
52
|
}
|
|
53
53
|
)
|
|
54
54
|
), this.renderListContainer = () => {
|
|
55
|
-
const { header: e, footer: t, dir:
|
|
56
|
-
dir:
|
|
57
|
-
width:
|
|
55
|
+
const { header: e, footer: t, dir: o, size: h, groupField: n, groupStickyHeaderItemRender: l, list: b, unstyled: d } = this.props, i = E(this.props), c = this.base, a = c.getPopupSettings(), f = this.props.opened !== void 0 ? this.props.opened : this.state.opened, g = a.width !== void 0 ? a.width : c.popupWidth, p = d && d.uDropDownList, r = {
|
|
56
|
+
dir: o !== void 0 ? o : c.dirCalculated,
|
|
57
|
+
width: g,
|
|
58
58
|
popupSettings: {
|
|
59
|
-
...
|
|
60
|
-
popupClass:
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
59
|
+
...a,
|
|
60
|
+
popupClass: x(
|
|
61
|
+
a.popupClass,
|
|
62
|
+
D.listContainer({
|
|
63
|
+
c: p
|
|
64
|
+
})
|
|
64
65
|
),
|
|
65
|
-
anchor:
|
|
66
|
-
show:
|
|
66
|
+
anchor: a.anchor || this.element,
|
|
67
|
+
show: f,
|
|
67
68
|
onOpen: this.onPopupOpened,
|
|
68
69
|
onClose: this.onPopupClosed
|
|
69
70
|
},
|
|
70
|
-
itemsCount: [
|
|
71
|
+
itemsCount: [i.length]
|
|
71
72
|
};
|
|
72
|
-
let { group:
|
|
73
|
-
return
|
|
73
|
+
let { group: w } = this.state;
|
|
74
|
+
return w === void 0 && n !== void 0 && (w = T(i[0], n)), /* @__PURE__ */ u.createElement(he, { ...r }, this.renderListFilter(), e && /* @__PURE__ */ u.createElement("div", { className: x(D.listHeader({ c: p })) }, e), /* @__PURE__ */ u.createElement(
|
|
74
75
|
"div",
|
|
75
76
|
{
|
|
76
|
-
className:
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
}
|
|
77
|
+
className: x(
|
|
78
|
+
D.list({
|
|
79
|
+
c: p,
|
|
80
|
+
size: h,
|
|
81
|
+
virtual: this.base.vs.enabled
|
|
82
|
+
})
|
|
82
83
|
)
|
|
83
84
|
},
|
|
84
85
|
this.renderDefaultItem(),
|
|
85
|
-
!
|
|
86
|
+
!b && w && i.length !== 0 && /* @__PURE__ */ u.createElement(W, { group: w, groupMode: "modern", render: l }),
|
|
86
87
|
this.renderList()
|
|
87
|
-
), t && /* @__PURE__ */
|
|
88
|
+
), t && /* @__PURE__ */ u.createElement("div", { className: x(D.listFooter({ c: p })) }, t));
|
|
88
89
|
}, this.renderList = () => {
|
|
89
90
|
const {
|
|
90
91
|
textField: e,
|
|
91
92
|
dataItemKey: t,
|
|
92
|
-
virtual:
|
|
93
|
-
groupHeaderItemRender:
|
|
93
|
+
virtual: o = { skip: 0, total: void 0 },
|
|
94
|
+
groupHeaderItemRender: h,
|
|
94
95
|
listNoDataRender: n,
|
|
95
|
-
itemRender:
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
96
|
+
itemRender: l,
|
|
97
|
+
unstyled: b
|
|
98
|
+
} = this.props, d = E(this.props), i = b && b.uDropDownList, c = this.base.vs, a = o.skip, f = this.props.opened !== void 0 ? this.props.opened : this.state.opened, g = this.base.getPopupSettings(), p = `translateY(${c.translate}px)`;
|
|
99
|
+
return /* @__PURE__ */ u.createElement(
|
|
100
|
+
me,
|
|
99
101
|
{
|
|
100
102
|
id: this._listboxId,
|
|
101
|
-
show:
|
|
102
|
-
data:
|
|
103
|
+
show: f,
|
|
104
|
+
data: d.slice(),
|
|
103
105
|
focusedIndex: this.getFocusedIndex(),
|
|
104
106
|
value: this.value,
|
|
105
107
|
textField: e,
|
|
@@ -107,41 +109,41 @@ const ke = "Please select a value from the list!", { sizeMap: T, roundedMap: Se
|
|
|
107
109
|
optionsGuid: this._guid,
|
|
108
110
|
groupField: this.props.groupField,
|
|
109
111
|
groupMode: "modern",
|
|
110
|
-
listRef: (
|
|
111
|
-
wrapperStyle: { maxHeight:
|
|
112
|
-
wrapperCssClass:
|
|
113
|
-
listStyle:
|
|
112
|
+
listRef: (r) => c.list = this.base.list = r,
|
|
113
|
+
wrapperStyle: { maxHeight: g.height },
|
|
114
|
+
wrapperCssClass: x(D.listContent({ c: i })),
|
|
115
|
+
listStyle: c.enabled ? { transform: p } : void 0,
|
|
114
116
|
key: "listkey",
|
|
115
|
-
skip:
|
|
117
|
+
skip: a,
|
|
116
118
|
onClick: this.handleItemClick,
|
|
117
|
-
itemRender:
|
|
118
|
-
groupHeaderItemRender:
|
|
119
|
+
itemRender: l,
|
|
120
|
+
groupHeaderItemRender: h,
|
|
119
121
|
noDataRender: n,
|
|
120
122
|
onScroll: this.onScroll,
|
|
121
|
-
wrapperRef:
|
|
123
|
+
wrapperRef: c.scrollerRef,
|
|
122
124
|
scroller: this.base.renderScrollElement(),
|
|
123
|
-
ariaSetSize:
|
|
125
|
+
ariaSetSize: o.total
|
|
124
126
|
}
|
|
125
127
|
);
|
|
126
128
|
}, this.onScroll = (e) => {
|
|
127
|
-
const { vs: t, list:
|
|
129
|
+
const { vs: t, list: o } = this.base;
|
|
128
130
|
t.scrollHandler(e);
|
|
129
|
-
const { groupField:
|
|
130
|
-
let n =
|
|
131
|
-
if (!(!
|
|
132
|
-
const
|
|
133
|
-
n = this.base.getGroupedDataModernMode(n,
|
|
134
|
-
let i = n[0][
|
|
135
|
-
for (let c = 1; c < n.length && !(
|
|
136
|
-
n[c] && n[c][
|
|
131
|
+
const { groupField: h } = this.props;
|
|
132
|
+
let n = E(this.props);
|
|
133
|
+
if (!(!h || !n.length) && h) {
|
|
134
|
+
const l = this.itemHeight = this.itemHeight || (t.enabled ? t.itemHeight : o ? o.children[0].offsetHeight : 0), d = e.target.scrollTop - t.skip * l;
|
|
135
|
+
n = this.base.getGroupedDataModernMode(n, h);
|
|
136
|
+
let i = n[0][h];
|
|
137
|
+
for (let c = 1; c < n.length && !(l * c > d); c++)
|
|
138
|
+
n[c] && n[c][h] && (i = n[c][h]);
|
|
137
139
|
i !== this.state.group && this.setState({
|
|
138
140
|
group: i
|
|
139
141
|
});
|
|
140
142
|
}
|
|
141
143
|
}, this.renderListFilter = () => {
|
|
142
144
|
const e = this.props.filter !== void 0 ? this.props.filter : this.state.text;
|
|
143
|
-
return this.props.filterable && /* @__PURE__ */
|
|
144
|
-
|
|
145
|
+
return this.props.filterable && /* @__PURE__ */ u.createElement(
|
|
146
|
+
ce,
|
|
145
147
|
{
|
|
146
148
|
value: e,
|
|
147
149
|
ref: (t) => this._filterInput = t && t.element,
|
|
@@ -154,13 +156,13 @@ const ke = "Please select a value from the list!", { sizeMap: T, roundedMap: Se
|
|
|
154
156
|
}
|
|
155
157
|
);
|
|
156
158
|
}, this.renderDefaultItem = () => {
|
|
157
|
-
const { textField: e, defaultItem: t, dataItemKey:
|
|
158
|
-
return t !== void 0 && /* @__PURE__ */
|
|
159
|
-
|
|
159
|
+
const { textField: e, defaultItem: t, dataItemKey: o } = this.props;
|
|
160
|
+
return t !== void 0 && /* @__PURE__ */ u.createElement(
|
|
161
|
+
ue,
|
|
160
162
|
{
|
|
161
163
|
defaultItem: t,
|
|
162
164
|
textField: e,
|
|
163
|
-
selected:
|
|
165
|
+
selected: k(this.value, t, o),
|
|
164
166
|
key: "defaultitemkey",
|
|
165
167
|
onClick: this.handleDefaultItemClick
|
|
166
168
|
}
|
|
@@ -168,107 +170,107 @@ const ke = "Please select a value from the list!", { sizeMap: T, roundedMap: Se
|
|
|
168
170
|
}, this.search = (e) => {
|
|
169
171
|
clearTimeout(this._typingTimeout), this.props.filterable || (this._typingTimeout = window.setTimeout(() => this.searchState.word = "", this.props.delay), this.selectNext(e));
|
|
170
172
|
}, this.selectNext = (e) => {
|
|
171
|
-
const { dataItemKey: t } = this.props,
|
|
172
|
-
let
|
|
173
|
-
const n = this.searchState.word,
|
|
174
|
-
let
|
|
175
|
-
this.props.defaultItem && (c = { item: this.props.defaultItem, itemIndex: -1 },
|
|
176
|
-
let
|
|
177
|
-
const { textField:
|
|
178
|
-
for (;
|
|
179
|
-
if (
|
|
180
|
-
|
|
173
|
+
const { dataItemKey: t } = this.props, o = E(this.props);
|
|
174
|
+
let h = o.map((F, L) => ({ item: F, itemIndex: L }));
|
|
175
|
+
const n = this.searchState.word, l = this.searchState.last, b = fe(n, l);
|
|
176
|
+
let d = h.length, i = Math.max(0, o.findIndex((F) => k(F, this.value, t))), c;
|
|
177
|
+
this.props.defaultItem && (c = { item: this.props.defaultItem, itemIndex: -1 }, d += 1, i += 1), i += b ? 1 : 0, h = ge(h, i, c);
|
|
178
|
+
let a, f, g, p = 0;
|
|
179
|
+
const { textField: r, ignoreCase: w } = this.props;
|
|
180
|
+
for (; p < d; p++)
|
|
181
|
+
if (a = T(h[p].item, r), f = b && q(a, l, w), g = q(a, n, w), f || g) {
|
|
182
|
+
p = h[p].itemIndex;
|
|
181
183
|
break;
|
|
182
184
|
}
|
|
183
|
-
if (
|
|
184
|
-
const
|
|
185
|
-
|
|
185
|
+
if (p !== d) {
|
|
186
|
+
const F = this.base.initState();
|
|
187
|
+
F.syntheticEvent = e, this.handleItemSelect(p, F), this.applyState(F), this._valueDuringOnChange = void 0;
|
|
186
188
|
}
|
|
187
189
|
}, this.handleKeyDown = (e) => {
|
|
188
190
|
e && e.target instanceof Element && e.target.nodeName === "INPUT" && e.stopPropagation && e.stopPropagation();
|
|
189
191
|
const {
|
|
190
192
|
filterable: t,
|
|
191
|
-
disabled:
|
|
192
|
-
defaultItem:
|
|
193
|
+
disabled: o,
|
|
194
|
+
defaultItem: h,
|
|
193
195
|
leftRightKeysNavigation: n = !0,
|
|
194
|
-
virtual:
|
|
195
|
-
dataItemKey:
|
|
196
|
-
groupField:
|
|
196
|
+
virtual: l = { skip: 0, total: 0, pageSize: 0 },
|
|
197
|
+
dataItemKey: b,
|
|
198
|
+
groupField: d = "",
|
|
197
199
|
textField: i,
|
|
198
200
|
skipDisabledItems: c = !0
|
|
199
|
-
} = this.props,
|
|
200
|
-
if (
|
|
201
|
+
} = this.props, a = E(this.props), f = this.value, g = a.findIndex((y) => k(y, f, b)), p = this.props.opened !== void 0 ? this.props.opened : this.state.opened, r = e.keyCode, w = r === I.home || r === I.end, F = r === I.up || r === I.down, L = !p && (e.altKey && r === I.down || r === I.enter || r === I.space), _ = p && (e.altKey && r === I.up || r === I.esc), z = n && (r === I.left || r === I.right), P = F || z && !t || w, S = this.base.initState();
|
|
202
|
+
if (S.syntheticEvent = e, !o) {
|
|
201
203
|
if (w && this.base.vs.enabled)
|
|
202
|
-
|
|
203
|
-
else if (
|
|
204
|
+
r === I.home ? l.skip !== 0 ? (this.base.triggerOnPageChange(S, 0, l.pageSize), this._navigated = !0) : this.triggerOnChange(a[0], S) : l.skip < l.total - l.pageSize ? (this.base.triggerOnPageChange(S, l.total - l.pageSize, l.pageSize), this._navigated = !0) : this.triggerOnChange(a[a.length - 1], S);
|
|
205
|
+
else if (p && r === I.pageUp)
|
|
204
206
|
e.preventDefault(), this.base.scrollPopupByPageSize(-1);
|
|
205
|
-
else if (
|
|
207
|
+
else if (p && r === I.pageDown)
|
|
206
208
|
e.preventDefault(), this.base.scrollPopupByPageSize(1);
|
|
207
|
-
else if (
|
|
209
|
+
else if (p && r === I.enter) {
|
|
208
210
|
const y = this.getFocusedIndex();
|
|
209
|
-
this.haveFocusedItemAndDataNotEmpty(
|
|
210
|
-
} else if (
|
|
211
|
-
|
|
211
|
+
this.haveFocusedItemAndDataNotEmpty(a, y) ? (this.triggerOnChange(null, S), this.applyState(S)) : this.handleItemSelect(y, S), this.base.togglePopup(S), e.preventDefault();
|
|
212
|
+
} else if (L || _)
|
|
213
|
+
_ && this.resetValueIfDisabledItem(), this.base.togglePopup(S), e.preventDefault();
|
|
212
214
|
else if (P) {
|
|
213
|
-
if (this._lastKeypressIsFilter = !1,
|
|
214
|
-
if (!c &&
|
|
215
|
-
this.onNavigate(
|
|
215
|
+
if (this._lastKeypressIsFilter = !1, d !== "" && i)
|
|
216
|
+
if (!c && p)
|
|
217
|
+
this.onNavigate(S, r);
|
|
216
218
|
else {
|
|
217
219
|
let y;
|
|
218
|
-
if (
|
|
219
|
-
const
|
|
220
|
-
y =
|
|
221
|
-
} else if (
|
|
222
|
-
let
|
|
223
|
-
if (
|
|
220
|
+
if (r === I.down || r === I.right) {
|
|
221
|
+
const v = a.slice(g + 1).find((m) => !m.disabled && m[i]);
|
|
222
|
+
y = v && a.findIndex((m) => m[i] === v[i]);
|
|
223
|
+
} else if (r === I.up || r === I.left) {
|
|
224
|
+
let v;
|
|
225
|
+
if (g === 0 && h)
|
|
224
226
|
y = -1;
|
|
225
|
-
else if (
|
|
226
|
-
|
|
227
|
+
else if (g === -1)
|
|
228
|
+
v = a, y = a.findIndex((m) => !m.disabled && m[i]);
|
|
227
229
|
else {
|
|
228
|
-
|
|
229
|
-
let
|
|
230
|
-
for (;
|
|
231
|
-
|
|
232
|
-
y =
|
|
230
|
+
v = a.slice(0, g);
|
|
231
|
+
let m = v.pop();
|
|
232
|
+
for (; m && m.disabled; )
|
|
233
|
+
m = v.pop();
|
|
234
|
+
y = m && a.findIndex((M) => M[i] === m[i]);
|
|
233
235
|
}
|
|
234
236
|
}
|
|
235
237
|
if (y !== void 0) {
|
|
236
|
-
const
|
|
237
|
-
this.onNavigate(
|
|
238
|
+
const v = y - g;
|
|
239
|
+
this.onNavigate(S, r, v);
|
|
238
240
|
} else
|
|
239
|
-
y === void 0 &&
|
|
241
|
+
y === void 0 && a.findIndex((v) => v[i] === f[i]) === a.length - 1 && this.onNavigate(S, r);
|
|
240
242
|
}
|
|
241
|
-
else if (!c &&
|
|
242
|
-
this.onNavigate(
|
|
243
|
+
else if (!c && p || w)
|
|
244
|
+
this.onNavigate(S, r);
|
|
243
245
|
else if (i) {
|
|
244
246
|
let y;
|
|
245
|
-
if (
|
|
246
|
-
const
|
|
247
|
-
y =
|
|
248
|
-
} else if (
|
|
249
|
-
let
|
|
250
|
-
if (
|
|
247
|
+
if (r === I.down || r === I.right) {
|
|
248
|
+
const v = a.slice(g + 1).find((m) => !m.disabled && m[i]);
|
|
249
|
+
y = v && a.findIndex((m) => m[i] === v[i]);
|
|
250
|
+
} else if (r === I.up || r === I.left) {
|
|
251
|
+
let v;
|
|
252
|
+
if (g === 0 && h)
|
|
251
253
|
y = -1;
|
|
252
|
-
else if (
|
|
253
|
-
|
|
254
|
+
else if (g === -1)
|
|
255
|
+
v = a, y = a.find((m) => !m.disabled && m[i]);
|
|
254
256
|
else {
|
|
255
|
-
|
|
256
|
-
let
|
|
257
|
-
for (;
|
|
258
|
-
|
|
259
|
-
y =
|
|
257
|
+
v = a.slice(0, g);
|
|
258
|
+
let m = v.pop();
|
|
259
|
+
for (; m && m.disabled; )
|
|
260
|
+
m = v.pop();
|
|
261
|
+
y = m && a.findIndex((M) => M[i] === m[i]);
|
|
260
262
|
}
|
|
261
263
|
}
|
|
262
264
|
if (y !== void 0) {
|
|
263
|
-
const
|
|
264
|
-
this.onNavigate(
|
|
265
|
+
const v = y - g;
|
|
266
|
+
this.onNavigate(S, r, v);
|
|
265
267
|
} else
|
|
266
|
-
y === void 0 &&
|
|
268
|
+
y === void 0 && a.findIndex((v) => v[i] === f[i]) === a.length - 1 && this.onNavigate(S, r);
|
|
267
269
|
} else
|
|
268
|
-
this.onNavigate(
|
|
270
|
+
this.onNavigate(S, r);
|
|
269
271
|
e.preventDefault();
|
|
270
272
|
}
|
|
271
|
-
this.applyState(
|
|
273
|
+
this.applyState(S);
|
|
272
274
|
}
|
|
273
275
|
}, this.handleItemClick = (e, t) => {
|
|
274
276
|
this.base.handleItemClick(e, t), this._valueDuringOnChange = void 0;
|
|
@@ -277,8 +279,8 @@ const ke = "Please select a value from the list!", { sizeMap: T, roundedMap: Se
|
|
|
277
279
|
}, this.handleBlur = (e) => {
|
|
278
280
|
if (this._skipFocusEvent || !this.state.focused)
|
|
279
281
|
return;
|
|
280
|
-
const t = this.props.opened !== void 0 ? this.props.opened : this.state.opened, { adaptive:
|
|
281
|
-
|
|
282
|
+
const t = this.props.opened !== void 0 ? this.props.opened : this.state.opened, { adaptive: o } = this.props, { windowWidth: h = 0 } = this.state, n = h <= j && o, l = this.base.initState();
|
|
283
|
+
l.syntheticEvent = e, l.data.focused = !1, l.events.push({ type: "onBlur" }), t && this.resetValueIfDisabledItem(), t && !n && this.base.togglePopup(l), this.applyState(l);
|
|
282
284
|
}, this.handleDefaultItemClick = (e) => {
|
|
283
285
|
const t = this.base.initState();
|
|
284
286
|
t.syntheticEvent = e, this.base.togglePopup(t), this.triggerOnChange(this.props.defaultItem, t), this.applyState(t);
|
|
@@ -288,7 +290,7 @@ const ke = "Please select a value from the list!", { sizeMap: T, roundedMap: Se
|
|
|
288
290
|
const t = this.base.initState();
|
|
289
291
|
t.syntheticEvent = e, this.state.focused || (t.data.focused = !0), this.resetValueIfDisabledItem(), this.base.togglePopup(t), this.applyState(t);
|
|
290
292
|
}, this.handleKeyPress = (e) => {
|
|
291
|
-
if (this.props.filterable || e.which === 0 || e.keyCode ===
|
|
293
|
+
if (this.props.filterable || e.which === 0 || e.keyCode === I.enter)
|
|
292
294
|
return;
|
|
293
295
|
let t = String.fromCharCode(e.charCode || e.keyCode);
|
|
294
296
|
this.props.ignoreCase && (t = t.toLowerCase()), t === " " && e.preventDefault(), this.searchState = {
|
|
@@ -310,9 +312,9 @@ const ke = "Please select a value from the list!", { sizeMap: T, roundedMap: Se
|
|
|
310
312
|
);
|
|
311
313
|
}, this.setValidity = () => {
|
|
312
314
|
this._select && this._select.setCustomValidity && this._select.setCustomValidity(
|
|
313
|
-
this.validity.valid ? "" : this.props.validationMessage ||
|
|
315
|
+
this.validity.valid ? "" : this.props.validationMessage || Ce
|
|
314
316
|
);
|
|
315
|
-
},
|
|
317
|
+
}, ee(be);
|
|
316
318
|
}
|
|
317
319
|
get _inputId() {
|
|
318
320
|
return this.props.id + "-accessibility-id";
|
|
@@ -324,7 +326,7 @@ const ke = "Please select a value from the list!", { sizeMap: T, roundedMap: Se
|
|
|
324
326
|
return this.props.id + "-guid";
|
|
325
327
|
}
|
|
326
328
|
get document() {
|
|
327
|
-
if (
|
|
329
|
+
if (B)
|
|
328
330
|
return this.element && this.element.ownerDocument || document;
|
|
329
331
|
}
|
|
330
332
|
/**
|
|
@@ -338,14 +340,14 @@ const ke = "Please select a value from the list!", { sizeMap: T, roundedMap: Se
|
|
|
338
340
|
*/
|
|
339
341
|
get value() {
|
|
340
342
|
let s;
|
|
341
|
-
return this._valueDuringOnChange !== void 0 ? s = this._valueDuringOnChange : this.props.value !== void 0 ? s = this.props.value : this.state.value !== void 0 ? s = this.state.value : this.props.defaultValue !== void 0 && (s = this.props.defaultValue), !
|
|
343
|
+
return this._valueDuringOnChange !== void 0 ? s = this._valueDuringOnChange : this.props.value !== void 0 ? s = this.props.value : this.state.value !== void 0 ? s = this.state.value : this.props.defaultValue !== void 0 && (s = this.props.defaultValue), !U(s) && this.props.defaultItem !== void 0 && (s = this.props.defaultItem), s;
|
|
342
344
|
}
|
|
343
345
|
/**
|
|
344
346
|
* The index of the selected item.
|
|
345
347
|
*/
|
|
346
348
|
get index() {
|
|
347
|
-
const { dataItemKey: s } = this.props, e =
|
|
348
|
-
return e.findIndex((
|
|
349
|
+
const { dataItemKey: s } = this.props, e = E(this.props), t = this.value;
|
|
350
|
+
return e.findIndex((o) => k(o, t, s));
|
|
349
351
|
}
|
|
350
352
|
/**
|
|
351
353
|
* Gets the `name` property of the DropDownList.
|
|
@@ -365,28 +367,28 @@ const ke = "Please select a value from the list!", { sizeMap: T, roundedMap: Se
|
|
|
365
367
|
};
|
|
366
368
|
}
|
|
367
369
|
get validityStyles() {
|
|
368
|
-
return this.props.validityStyles !== void 0 ? this.props.validityStyles :
|
|
370
|
+
return this.props.validityStyles !== void 0 ? this.props.validityStyles : N.defaultProps.validityStyles;
|
|
369
371
|
}
|
|
370
372
|
/**
|
|
371
373
|
* @hidden
|
|
372
374
|
*/
|
|
373
375
|
get required() {
|
|
374
|
-
return this.props.required !== void 0 ? this.props.required :
|
|
376
|
+
return this.props.required !== void 0 ? this.props.required : N.defaultProps.required;
|
|
375
377
|
}
|
|
376
378
|
/**
|
|
377
379
|
* @hidden
|
|
378
380
|
*/
|
|
379
381
|
componentDidUpdate(s, e) {
|
|
380
|
-
var
|
|
381
|
-
const { dataItemKey: t, virtual:
|
|
382
|
-
if (this.base.didUpdate(), this.base.getPopupSettings().animate || c && this.onPopupOpened(),
|
|
382
|
+
var a;
|
|
383
|
+
const { dataItemKey: t, virtual: o, groupField: h = "", textField: n } = this.props, l = E(this.props), b = s.virtual ? s.virtual.total : 0, d = this.props.opened !== void 0 ? this.props.opened : this.state.opened, i = s.opened !== void 0 ? s.opened : e.opened, c = !i && d;
|
|
384
|
+
if (this.base.didUpdate(), this.base.getPopupSettings().animate || c && this.onPopupOpened(), o && o.total !== b)
|
|
383
385
|
this.base.vs.calcScrollElementHeight(), this.base.vs.reset();
|
|
384
386
|
else {
|
|
385
|
-
const
|
|
386
|
-
let
|
|
387
|
-
|
|
388
|
-
const
|
|
389
|
-
c &&
|
|
387
|
+
const f = this.value, g = s.value !== void 0 ? s.value : e.value;
|
|
388
|
+
let p = l.findIndex((w) => k(w, f, t));
|
|
389
|
+
h !== "" && f && n && (p = (a = this.base.getGroupedDataModernMode(l, h)) == null ? void 0 : a.map((w) => w[n]).indexOf(f[n]));
|
|
390
|
+
const r = !k(g, f, t);
|
|
391
|
+
c && o ? this.base.scrollToVirtualItem(o, p) : c && !o ? (this.onPopupOpened(), l && l.length !== 0 && this.base.resetGroupStickyHeader(l[0][h], this), this.base.scrollToItem(p)) : d && i && f && r && !this._navigated ? this.base.scrollToItem(p, this.base.vs.enabled) : d && i && this._navigated && (this._navigated && o && o.skip === 0 ? this.base.vs.reset() : this._navigated && o && o.skip === o.total - o.pageSize && this.base.vs.scrollToEnd());
|
|
390
392
|
}
|
|
391
393
|
this._navigated = !1, this.setValidity();
|
|
392
394
|
}
|
|
@@ -395,7 +397,7 @@ const ke = "Please select a value from the list!", { sizeMap: T, roundedMap: Se
|
|
|
395
397
|
*/
|
|
396
398
|
componentDidMount() {
|
|
397
399
|
var s;
|
|
398
|
-
this.observerResize =
|
|
400
|
+
this.observerResize = B && window.ResizeObserver && new window.ResizeObserver(this.calculateMedia.bind(this)), this.base.didMount(), this.setValidity(), (s = this.document) != null && s.body && this.observerResize && this.observerResize.observe(this.document.body);
|
|
399
401
|
}
|
|
400
402
|
/** @hidden */
|
|
401
403
|
componentWillUnmount() {
|
|
@@ -406,53 +408,53 @@ const ke = "Please select a value from the list!", { sizeMap: T, roundedMap: Se
|
|
|
406
408
|
* @hidden
|
|
407
409
|
*/
|
|
408
410
|
render() {
|
|
409
|
-
const s =
|
|
410
|
-
|
|
411
|
+
const s = Ie(this).toLanguageString(Y, ye[Y]), { style: e, className: t, label: o, dir: h, virtual: n, size: l, rounded: b, fillMode: d, adaptive: i, unstyled: c } = this.props, { windowWidth: a = 0 } = this.state, f = this.props.opened !== void 0 ? this.props.opened : this.state.opened, g = this.value, p = T(g, this.props.textField), r = !this.validityStyles || this.validity.valid, w = this.base, F = w.vs, L = a <= j && i, _ = c && c.uDropDownList;
|
|
412
|
+
F.enabled = n !== void 0, n !== void 0 && (w.vs.skip = n.skip, w.vs.total = n.total, w.vs.pageSize = n.pageSize);
|
|
411
413
|
const {
|
|
412
|
-
dataItemKey:
|
|
413
|
-
disabled:
|
|
414
|
-
tabIndex:
|
|
415
|
-
loading:
|
|
416
|
-
iconClassName:
|
|
417
|
-
svgIcon:
|
|
418
|
-
valueRender:
|
|
419
|
-
} = this.props,
|
|
414
|
+
dataItemKey: z,
|
|
415
|
+
disabled: P,
|
|
416
|
+
tabIndex: S,
|
|
417
|
+
loading: y,
|
|
418
|
+
iconClassName: v,
|
|
419
|
+
svgIcon: m,
|
|
420
|
+
valueRender: M
|
|
421
|
+
} = this.props, J = E(this.props), { focused: Q } = this.state, X = J.findIndex((O) => k(O, g, z)), H = /* @__PURE__ */ u.createElement("span", { id: this._inputId, className: x(D.input({ c: _ })) }, p && /* @__PURE__ */ u.createElement("span", { className: x(D.inputText({ c: _ })) }, p)), Z = M !== void 0 ? M.call(void 0, H, g) : H, V = /* @__PURE__ */ u.createElement(u.Fragment, null, /* @__PURE__ */ u.createElement(
|
|
420
422
|
"span",
|
|
421
423
|
{
|
|
422
424
|
ref: this.componentRef,
|
|
423
|
-
className:
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
425
|
+
className: x(
|
|
426
|
+
D.wrapper({
|
|
427
|
+
c: _,
|
|
428
|
+
size: l,
|
|
429
|
+
rounded: b,
|
|
430
|
+
fillMode: d,
|
|
431
|
+
focused: Q,
|
|
432
|
+
disabled: P,
|
|
433
|
+
invalid: !r,
|
|
434
|
+
loading: y,
|
|
435
|
+
required: this.required
|
|
436
|
+
}),
|
|
437
|
+
t
|
|
436
438
|
),
|
|
437
|
-
style:
|
|
438
|
-
dir:
|
|
439
|
-
onMouseDown:
|
|
440
|
-
|
|
439
|
+
style: o ? { ...e, width: void 0 } : e,
|
|
440
|
+
dir: h,
|
|
441
|
+
onMouseDown: f ? (O) => {
|
|
442
|
+
O.target.nodeName !== "INPUT" && (this.focusElement(this.base.wrapper), O.preventDefault());
|
|
441
443
|
} : void 0,
|
|
442
444
|
onFocus: this.handleFocus,
|
|
443
445
|
onBlur: this.handleBlur,
|
|
444
|
-
tabIndex:
|
|
446
|
+
tabIndex: se(S, P),
|
|
445
447
|
accessKey: this.props.accessKey,
|
|
446
448
|
onKeyDown: this.handleKeyDown,
|
|
447
449
|
onKeyPress: this.handleKeyPress,
|
|
448
|
-
onClick:
|
|
450
|
+
onClick: P ? void 0 : this.handleWrapperClick,
|
|
449
451
|
role: "combobox",
|
|
450
452
|
"aria-required": this.required,
|
|
451
|
-
"aria-disabled":
|
|
453
|
+
"aria-disabled": P || void 0,
|
|
452
454
|
"aria-haspopup": "listbox",
|
|
453
|
-
"aria-expanded":
|
|
455
|
+
"aria-expanded": f || !1,
|
|
454
456
|
"aria-owns": this._listboxId,
|
|
455
|
-
"aria-activedescendant":
|
|
457
|
+
"aria-activedescendant": f ? "option-" + this._guid + "-" + (X + (n ? n.skip : 0)) : void 0,
|
|
456
458
|
"aria-label": this.props.ariaLabel || this.props.label,
|
|
457
459
|
"aria-labelledby": this.props.ariaLabelledBy,
|
|
458
460
|
"aria-describedby": this.props.ariaDescribedBy || this._inputId,
|
|
@@ -460,71 +462,74 @@ const ke = "Please select a value from the list!", { sizeMap: T, roundedMap: Se
|
|
|
460
462
|
id: this.props.id,
|
|
461
463
|
title: this.props.title
|
|
462
464
|
},
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
/* @__PURE__ */
|
|
466
|
-
|
|
465
|
+
Z,
|
|
466
|
+
y && /* @__PURE__ */ u.createElement(ie, { className: x(D.loadingIcon({ c: _ })), name: "loading" }),
|
|
467
|
+
/* @__PURE__ */ u.createElement(
|
|
468
|
+
G,
|
|
467
469
|
{
|
|
468
470
|
tabIndex: -1,
|
|
469
471
|
type: "button",
|
|
470
472
|
"aria-label": s,
|
|
471
473
|
"aria-hidden": !0,
|
|
472
|
-
size:
|
|
473
|
-
fillMode:
|
|
474
|
-
iconClass:
|
|
475
|
-
className:
|
|
474
|
+
size: l,
|
|
475
|
+
fillMode: d,
|
|
476
|
+
iconClass: v,
|
|
477
|
+
className: x(D.iconButton({ c: _ })),
|
|
476
478
|
rounded: null,
|
|
477
479
|
themeColor: "base",
|
|
478
|
-
icon:
|
|
479
|
-
svgIcon:
|
|
480
|
-
onMouseDown: (
|
|
480
|
+
icon: v ? void 0 : "caret-alt-down",
|
|
481
|
+
svgIcon: m || de,
|
|
482
|
+
onMouseDown: (O) => this.state.focused && O.preventDefault()
|
|
481
483
|
}
|
|
482
484
|
),
|
|
483
|
-
this.dummySelect(
|
|
484
|
-
!
|
|
485
|
-
),
|
|
486
|
-
return
|
|
487
|
-
|
|
485
|
+
this.dummySelect(g),
|
|
486
|
+
!L && this.renderListContainer()
|
|
487
|
+
), L && this.renderAdaptiveListContainer());
|
|
488
|
+
return o ? /* @__PURE__ */ u.createElement(
|
|
489
|
+
le,
|
|
488
490
|
{
|
|
489
|
-
label:
|
|
490
|
-
editorValue:
|
|
491
|
-
editorValid:
|
|
491
|
+
label: o,
|
|
492
|
+
editorValue: p,
|
|
493
|
+
editorValid: r,
|
|
492
494
|
editorDisabled: this.props.disabled,
|
|
493
495
|
style: { width: e ? e.width : void 0 },
|
|
494
|
-
children:
|
|
496
|
+
children: V
|
|
495
497
|
}
|
|
496
|
-
) :
|
|
498
|
+
) : V;
|
|
497
499
|
}
|
|
498
500
|
/**
|
|
499
501
|
* @hidden
|
|
500
502
|
*/
|
|
501
503
|
onNavigate(s, e, t) {
|
|
502
504
|
const {
|
|
503
|
-
defaultItem:
|
|
504
|
-
dataItemKey:
|
|
505
|
+
defaultItem: o,
|
|
506
|
+
dataItemKey: h,
|
|
505
507
|
virtual: n = { skip: 0, total: 0, pageSize: 0 }
|
|
506
|
-
} = this.props,
|
|
508
|
+
} = this.props, l = E(this.props), b = this.base.vs, d = this.value, i = l.findIndex((a) => k(a, d, h)), c = this.base.navigation.navigate({
|
|
507
509
|
current: n.skip + i,
|
|
508
|
-
max: (
|
|
509
|
-
min:
|
|
510
|
+
max: (b.enabled ? n.total : l.length) - 1,
|
|
511
|
+
min: o !== void 0 ? -1 : 0,
|
|
510
512
|
keyCode: e,
|
|
511
513
|
skipItems: t || void 0
|
|
512
514
|
});
|
|
513
515
|
c !== void 0 && this.handleItemSelect(c, s), this.applyState(s);
|
|
514
516
|
}
|
|
515
517
|
renderAdaptiveListContainer() {
|
|
516
|
-
const { windowWidth: s = 0 } = this.state, { header: e, footer: t, size:
|
|
518
|
+
const { windowWidth: s = 0 } = this.state, { header: e, footer: t, size: o, adaptiveTitle: h, groupField: n, groupStickyHeaderItemRender: l, list: b, unstyled: d } = this.props, i = E(this.props), c = this.props.opened !== void 0 ? this.props.opened : this.state.opened, a = d && d.uDropDownList, f = d && d.uDropDownList, g = {
|
|
517
519
|
navigatable: !1,
|
|
518
520
|
navigatableElements: [],
|
|
519
|
-
expand:
|
|
521
|
+
expand: c,
|
|
520
522
|
animation: !0,
|
|
521
|
-
onClose: (
|
|
522
|
-
animationStyles: s <=
|
|
523
|
-
className:
|
|
523
|
+
onClose: (r) => this.handleWrapperClick(r),
|
|
524
|
+
animationStyles: s <= $ ? { top: 0, width: "100%", height: "100%" } : void 0,
|
|
525
|
+
className: x(K.wrapper({
|
|
526
|
+
c: a,
|
|
527
|
+
isFullScreen: s <= $
|
|
528
|
+
}))
|
|
524
529
|
};
|
|
525
|
-
let { group:
|
|
526
|
-
return
|
|
527
|
-
|
|
530
|
+
let { group: p } = this.state;
|
|
531
|
+
return p === void 0 && n !== void 0 && (p = T(i[0], n)), /* @__PURE__ */ u.createElement(we, { ...g }, /* @__PURE__ */ u.createElement(Se, { className: x(K.header({ c: f })) }, /* @__PURE__ */ u.createElement("div", { className: x(K.titleBar({ c: f })) }, /* @__PURE__ */ u.createElement("div", { className: x(K.title({ c: f })) }, /* @__PURE__ */ u.createElement("div", null, h)), /* @__PURE__ */ u.createElement("div", { className: x(K.actions({ c: f })) }, /* @__PURE__ */ u.createElement(
|
|
532
|
+
G,
|
|
528
533
|
{
|
|
529
534
|
tabIndex: 0,
|
|
530
535
|
"aria-label": "Cancel",
|
|
@@ -533,40 +538,40 @@ const ke = "Please select a value from the list!", { sizeMap: T, roundedMap: Se
|
|
|
533
538
|
fillMode: "flat",
|
|
534
539
|
onClick: this.handleWrapperClick,
|
|
535
540
|
icon: "x",
|
|
536
|
-
svgIcon:
|
|
541
|
+
svgIcon: pe
|
|
537
542
|
}
|
|
538
|
-
))), /* @__PURE__ */
|
|
543
|
+
))), /* @__PURE__ */ u.createElement("div", { className: x(K.titleBarGroup({ c: f })) }, this.renderListFilter())), /* @__PURE__ */ u.createElement(xe, { overflowHidden: !0 }, e && /* @__PURE__ */ u.createElement("div", { className: x(D.listHeader({ c: a })) }, e), /* @__PURE__ */ u.createElement(
|
|
539
544
|
"div",
|
|
540
545
|
{
|
|
541
|
-
className:
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
}
|
|
546
|
+
className: x(
|
|
547
|
+
D.list({
|
|
548
|
+
c: a,
|
|
549
|
+
size: o,
|
|
550
|
+
virtual: this.base.vs.enabled
|
|
551
|
+
})
|
|
547
552
|
)
|
|
548
553
|
},
|
|
549
554
|
this.renderDefaultItem(),
|
|
550
|
-
!
|
|
555
|
+
!b && p && i.length !== 0 && /* @__PURE__ */ u.createElement(W, { group: p, groupMode: "modern", render: l }),
|
|
551
556
|
this.renderList()
|
|
552
|
-
), t && /* @__PURE__ */
|
|
557
|
+
), t && /* @__PURE__ */ u.createElement("div", { className: x(D.listFooter({ c: a })) }, t)));
|
|
553
558
|
}
|
|
554
559
|
getFocusedIndex() {
|
|
555
560
|
const s = this.value, {
|
|
556
561
|
textField: e,
|
|
557
562
|
dataItemKey: t,
|
|
558
|
-
virtual:
|
|
559
|
-
focusedItemIndex:
|
|
563
|
+
virtual: o = { skip: 0 },
|
|
564
|
+
focusedItemIndex: h = ve,
|
|
560
565
|
filterable: n,
|
|
561
|
-
skipDisabledItems:
|
|
562
|
-
} = this.props,
|
|
563
|
-
return
|
|
566
|
+
skipDisabledItems: l = !0
|
|
567
|
+
} = this.props, b = E(this.props), d = this.props.filter ? this.props.filter : this.state.text;
|
|
568
|
+
return l && e && !d && !s ? b.findIndex((i) => !i.disabled && i[e]) : U(s) && d === void 0 || n && d === "" ? b.findIndex((i) => k(i, s, t)) : d ? this._lastKeypressIsFilter ? h(b, d, e) : b.findIndex((i) => k(i, s, t)) : o.skip === 0 ? 0 : -1;
|
|
564
569
|
}
|
|
565
570
|
focusElement(s) {
|
|
566
571
|
this._skipFocusEvent = !0, s.focus(), window.setTimeout(() => this._skipFocusEvent = !1, 30);
|
|
567
572
|
}
|
|
568
573
|
triggerOnChange(s, e) {
|
|
569
|
-
|
|
574
|
+
k(this.value, s, this.props.dataItemKey) || (this.props.value === void 0 && (e.data.value = s), this._valueDuringOnChange = s, e.events.push({ type: "onChange" }));
|
|
570
575
|
}
|
|
571
576
|
applyState(s) {
|
|
572
577
|
this.base.applyState(s), this._valueDuringOnChange = void 0;
|
|
@@ -576,53 +581,53 @@ const ke = "Please select a value from the list!", { sizeMap: T, roundedMap: Se
|
|
|
576
581
|
this.setState({ windowWidth: e.target.clientWidth });
|
|
577
582
|
}
|
|
578
583
|
resetValueIfDisabledItem() {
|
|
579
|
-
const s =
|
|
584
|
+
const s = E(this.props), e = this.base.initState(), t = this.getFocusedIndex();
|
|
580
585
|
this.haveFocusedItemAndDataNotEmpty(s, t) && (this.triggerOnChange(null, e), this.applyState(e));
|
|
581
586
|
}
|
|
582
587
|
haveFocusedItemAndDataNotEmpty(s, e) {
|
|
583
588
|
return e !== void 0 && e !== -1 && s && s.length > 0 && s[e].disabled;
|
|
584
589
|
}
|
|
585
590
|
};
|
|
586
|
-
|
|
587
|
-
delay:
|
|
588
|
-
ignoreCase:
|
|
589
|
-
iconClassName:
|
|
590
|
-
svgIcon:
|
|
591
|
-
defaultItem:
|
|
592
|
-
valueRender:
|
|
593
|
-
valueMap:
|
|
594
|
-
validationMessage:
|
|
595
|
-
required:
|
|
596
|
-
id:
|
|
597
|
-
ariaLabelledBy:
|
|
598
|
-
ariaDescribedBy:
|
|
599
|
-
ariaLabel:
|
|
600
|
-
leftRightKeysNavigation:
|
|
601
|
-
title:
|
|
602
|
-
groupField:
|
|
603
|
-
list:
|
|
604
|
-
skipDisabledItems:
|
|
605
|
-
renderListFilterWrapper:
|
|
606
|
-
...
|
|
607
|
-
},
|
|
591
|
+
N.displayName = "DropDownList", N.propTypes = {
|
|
592
|
+
delay: C.number,
|
|
593
|
+
ignoreCase: C.bool,
|
|
594
|
+
iconClassName: C.string,
|
|
595
|
+
svgIcon: te,
|
|
596
|
+
defaultItem: C.any,
|
|
597
|
+
valueRender: C.func,
|
|
598
|
+
valueMap: C.func,
|
|
599
|
+
validationMessage: C.string,
|
|
600
|
+
required: C.bool,
|
|
601
|
+
id: C.string,
|
|
602
|
+
ariaLabelledBy: C.string,
|
|
603
|
+
ariaDescribedBy: C.string,
|
|
604
|
+
ariaLabel: C.string,
|
|
605
|
+
leftRightKeysNavigation: C.bool,
|
|
606
|
+
title: C.string,
|
|
607
|
+
groupField: C.string,
|
|
608
|
+
list: C.any,
|
|
609
|
+
skipDisabledItems: C.bool,
|
|
610
|
+
renderListFilterWrapper: C.bool,
|
|
611
|
+
...R.propTypes
|
|
612
|
+
}, N.defaultProps = {
|
|
608
613
|
delay: 500,
|
|
609
614
|
tabIndex: 0,
|
|
610
615
|
ignoreCase: !0,
|
|
611
|
-
...
|
|
616
|
+
...R.defaultProps,
|
|
612
617
|
required: !1,
|
|
613
618
|
size: "medium",
|
|
614
619
|
rounded: "medium",
|
|
615
620
|
fillMode: "solid",
|
|
616
621
|
groupMode: "modern"
|
|
617
622
|
};
|
|
618
|
-
let
|
|
619
|
-
const
|
|
620
|
-
|
|
621
|
-
|
|
623
|
+
let A = N;
|
|
624
|
+
const De = ae(), Ee = oe(ne(
|
|
625
|
+
De,
|
|
626
|
+
re(A)
|
|
622
627
|
));
|
|
623
|
-
|
|
628
|
+
Ee.displayName = "KendoReactDropDownList";
|
|
624
629
|
export {
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
630
|
+
Ee as DropDownList,
|
|
631
|
+
De as DropDownListPropsContext,
|
|
632
|
+
A as DropDownListWithoutContext
|
|
628
633
|
};
|