@progress/kendo-react-dropdowns 10.2.0-develop.10 → 10.2.0-develop.12
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.
|
@@ -6,131 +6,132 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
import * as i from "react";
|
|
9
|
-
import
|
|
10
|
-
import {
|
|
9
|
+
import E from "prop-types";
|
|
10
|
+
import { usePropsContext as Yt, validatePackage as $t, useUnstyled as jt, useId as Jt, canUseDOM as nt, useAdaptiveModeContext as Qt, classNames as C, uDropDownList as L, getTabIndex as Xt, IconWrap as Zt, svgIconPropType as Rt, createPropsContext as en, Keys as w, uDropDownsActionSheet as j, WatermarkOverlay as tn } from "@progress/kendo-react-common";
|
|
11
11
|
import { FloatingLabel as nn } from "@progress/kendo-react-labels";
|
|
12
12
|
import { caretAltDownIcon as rn, xIcon as on } from "@progress/kendo-svg-icons";
|
|
13
13
|
import an from "../common/ListContainer.mjs";
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
14
|
+
import sn from "../common/ListFilter.mjs";
|
|
15
|
+
import rt from "../common/GroupStickyHeader.mjs";
|
|
16
|
+
import ln from "../common/ListDefaultItem.mjs";
|
|
17
17
|
import dn from "../common/List.mjs";
|
|
18
|
-
import
|
|
19
|
-
import { getFilteredData as
|
|
18
|
+
import lt from "../common/DropDownBase.mjs";
|
|
19
|
+
import { getFilteredData as b, areSame as M, getItemValue as me, isPresent as ot, itemIndexStartsWith as cn, sameCharsOnly as un, shuffleData as pn, matchText as it } from "../common/utils.mjs";
|
|
20
20
|
import { packageMetadata as mn } from "../package-metadata.mjs";
|
|
21
|
-
import { Button as
|
|
21
|
+
import { Button as at } from "@progress/kendo-react-buttons";
|
|
22
22
|
import { useLocalization as fn } from "@progress/kendo-react-intl";
|
|
23
23
|
import { dropDownListArrowBtnAriaLabel as st, messages as vn } from "../messages/index.mjs";
|
|
24
24
|
import { ActionSheet as gn, ActionSheetHeader as hn, ActionSheetContent as In } from "@progress/kendo-react-layout";
|
|
25
|
-
const yn = "Please select a value from the list!",
|
|
26
|
-
let
|
|
27
|
-
|
|
25
|
+
const yn = "Please select a value from the list!", Ke = i.forwardRef((dt, ct) => {
|
|
26
|
+
let Te = !1;
|
|
27
|
+
const n = Yt(wn, dt), {
|
|
28
|
+
delay: ut = T.delay,
|
|
29
|
+
tabIndex: pt = T.tabIndex,
|
|
30
|
+
ignoreCase: fe = T.ignoreCase,
|
|
31
|
+
size: J = T.size,
|
|
32
|
+
rounded: ze = T.rounded,
|
|
33
|
+
fillMode: ve = T.fillMode,
|
|
34
|
+
groupMode: xn = T.groupMode
|
|
35
|
+
} = n;
|
|
36
|
+
if (n.filterable || n.virtual) {
|
|
28
37
|
const e = [];
|
|
29
|
-
|
|
38
|
+
n.filterable && e.push("filterable"), n.virtual && e.push("virtualization"), Te = !$t(mn, {
|
|
30
39
|
component: "DropDownList",
|
|
31
40
|
features: e
|
|
32
41
|
});
|
|
33
42
|
}
|
|
34
|
-
const
|
|
35
|
-
delay: ut = z.delay,
|
|
36
|
-
tabIndex: pt = z.tabIndex,
|
|
37
|
-
ignoreCase: ge = z.ignoreCase,
|
|
38
|
-
size: Q = z.size,
|
|
39
|
-
rounded: Oe = z.rounded,
|
|
40
|
-
fillMode: he = z.fillMode,
|
|
41
|
-
groupMode: xn = z.groupMode
|
|
42
|
-
} = r, Ie = () => {
|
|
43
|
+
const N = jt(), ge = Jt(n.id), he = () => {
|
|
43
44
|
var e;
|
|
44
|
-
if (
|
|
45
|
-
return ((e =
|
|
45
|
+
if (nt)
|
|
46
|
+
return ((e = X.current) == null ? void 0 : e.ownerDocument) || window.document;
|
|
46
47
|
}, mt = () => {
|
|
47
|
-
var e,
|
|
48
|
-
(e = t == null ? void 0 : t.current) != null && e.wrapper && ((
|
|
49
|
-
},
|
|
48
|
+
var e, r;
|
|
49
|
+
(e = t == null ? void 0 : t.current) != null && e.wrapper && ((r = t == null ? void 0 : t.current) == null || r.wrapper.focus({ preventScroll: !0 }));
|
|
50
|
+
}, k = () => {
|
|
50
51
|
let e;
|
|
51
|
-
return
|
|
52
|
+
return A.current !== void 0 && A.current !== null ? e = A.current : n.value !== void 0 ? e = n.value : p.value !== void 0 && p.value !== null ? e = p.value : n.defaultValue !== void 0 && n.defaultValue !== null && (e = n.defaultValue), !ot(e) && n.defaultItem !== void 0 && n.defaultItem !== null && (e = n.defaultItem), e;
|
|
52
53
|
}, ft = () => {
|
|
53
|
-
const { dataItemKey: e } =
|
|
54
|
-
return
|
|
55
|
-
},
|
|
56
|
-
const e =
|
|
54
|
+
const { dataItemKey: e } = n, r = b(n), a = k();
|
|
55
|
+
return r.findIndex((c) => M(c, a, e));
|
|
56
|
+
}, Ie = () => n.required !== void 0 ? n.required : T.required, ye = () => {
|
|
57
|
+
const e = n.validationMessage !== void 0, r = k(), a = !Ie() || r !== null && r !== "" && r !== void 0, c = n.valid !== void 0 ? n.valid : a;
|
|
57
58
|
return {
|
|
58
59
|
customError: e,
|
|
59
60
|
valid: c,
|
|
60
|
-
valueMissing:
|
|
61
|
+
valueMissing: r === null
|
|
61
62
|
};
|
|
62
|
-
}, vt = () =>
|
|
63
|
-
|
|
64
|
-
},
|
|
65
|
-
|
|
66
|
-
|
|
63
|
+
}, vt = () => n.validityStyles !== void 0 ? n.validityStyles : T.validityStyles, re = (e) => {
|
|
64
|
+
oe.current = !0, e.focus(), window.setTimeout(() => oe.current = !1, 30);
|
|
65
|
+
}, we = () => {
|
|
66
|
+
Z.current && re(Z.current), n.adaptive && setTimeout(() => {
|
|
67
|
+
Z.current && re(Z.current);
|
|
67
68
|
}, 300);
|
|
68
69
|
}, gt = i.useCallback((e) => {
|
|
69
|
-
for (const
|
|
70
|
-
Tt(
|
|
71
|
-
}, []),
|
|
70
|
+
for (const r of e)
|
|
71
|
+
Tt(r.target.clientWidth);
|
|
72
|
+
}, []), Oe = () => {
|
|
72
73
|
var e;
|
|
73
|
-
(e =
|
|
74
|
-
|
|
74
|
+
(e = Ce.current) != null && e.setCustomValidity && Ce.current.setCustomValidity(
|
|
75
|
+
ye().valid ? "" : n.validationMessage || yn
|
|
75
76
|
);
|
|
76
|
-
}, q = (e,
|
|
77
|
-
const a =
|
|
78
|
-
|
|
79
|
-
},
|
|
80
|
-
var
|
|
81
|
-
(
|
|
82
|
-
},
|
|
83
|
-
var
|
|
84
|
-
const { virtual: a, dataItemKey: c, defaultItem: u } =
|
|
85
|
-
q(o,
|
|
86
|
-
},
|
|
77
|
+
}, q = (e, r) => {
|
|
78
|
+
const a = k();
|
|
79
|
+
M(a, e, n.dataItemKey) || (n.value === void 0 && (r.data.value = e), t.current.updateComponentArgs({ value: e }), A.current = e, r.events.push({ type: "onChange" }));
|
|
80
|
+
}, F = (e) => {
|
|
81
|
+
var r;
|
|
82
|
+
(r = t == null ? void 0 : t.current) == null || r.applyState(e), A.current = void 0;
|
|
83
|
+
}, Q = (e, r) => {
|
|
84
|
+
var l;
|
|
85
|
+
const { virtual: a, dataItemKey: c, defaultItem: u } = n, m = b(n), v = a ? a.skip : 0, f = k(), o = e === -1 && u !== void 0 ? u : m[e - v], d = !M(o, f, c);
|
|
86
|
+
q(o, r), d && ((l = t == null ? void 0 : t.current) == null || l.triggerPageChangeCornerItems(o, r));
|
|
87
|
+
}, O = (e, r, a) => {
|
|
87
88
|
var I, h;
|
|
88
|
-
const { defaultItem: c, dataItemKey: u, virtual: m = { skip: 0, total: 0, pageSize: 0 } } =
|
|
89
|
+
const { defaultItem: c, dataItemKey: u, virtual: m = { skip: 0, total: 0, pageSize: 0 } } = n, v = k(), f = b(n), o = (I = t == null ? void 0 : t.current) == null ? void 0 : I.vs, d = f.findIndex((y) => M(y, v, u)), l = (h = t == null ? void 0 : t.current) == null ? void 0 : h.navigation.navigate({
|
|
89
90
|
current: m.skip + d,
|
|
90
91
|
max: (o != null && o.enabled ? m.total : f.length) - 1,
|
|
91
92
|
min: c !== void 0 ? -1 : 0,
|
|
92
|
-
keyCode:
|
|
93
|
+
keyCode: r,
|
|
93
94
|
skipItems: a || void 0
|
|
94
95
|
});
|
|
95
|
-
|
|
96
|
+
l !== void 0 && Q(l, e), F(e);
|
|
96
97
|
}, ht = (e) => {
|
|
97
|
-
|
|
98
|
+
X.current = e, t.current.wrapper = e;
|
|
98
99
|
}, It = (e) => /* @__PURE__ */ i.createElement(
|
|
99
100
|
"select",
|
|
100
101
|
{
|
|
101
|
-
name:
|
|
102
|
-
ref: (
|
|
103
|
-
|
|
102
|
+
name: n.name,
|
|
103
|
+
ref: (r) => {
|
|
104
|
+
Ce.current = r;
|
|
104
105
|
},
|
|
105
106
|
tabIndex: -1,
|
|
106
107
|
"aria-hidden": !0,
|
|
107
|
-
title:
|
|
108
|
+
title: n.label,
|
|
108
109
|
style: { opacity: 0, width: 1, border: 0, zIndex: -1, position: "absolute", left: "50%" }
|
|
109
110
|
},
|
|
110
|
-
/* @__PURE__ */ i.createElement("option", { value:
|
|
111
|
-
),
|
|
111
|
+
/* @__PURE__ */ i.createElement("option", { value: n.valueMap ? n.valueMap.call(void 0, e) : e })
|
|
112
|
+
), xe = () => {
|
|
112
113
|
const {
|
|
113
114
|
textField: e,
|
|
114
|
-
dataItemKey:
|
|
115
|
+
dataItemKey: r,
|
|
115
116
|
virtual: a = { skip: 0 },
|
|
116
117
|
focusedItemIndex: c = cn,
|
|
117
118
|
filterable: u,
|
|
118
119
|
skipDisabledItems: m = !0
|
|
119
|
-
} =
|
|
120
|
-
return m && e && !o && !v ? f.findIndex((d) => !d.disabled && d[e]) :
|
|
121
|
-
},
|
|
122
|
-
const e =
|
|
123
|
-
|
|
124
|
-
},
|
|
120
|
+
} = n, v = k(), f = b(n), o = n.filter ? n.filter : p.text;
|
|
121
|
+
return m && e && !o && !v ? f.findIndex((d) => !d.disabled && d[e]) : ot(v) && o === void 0 || u && o === "" ? f.findIndex((d) => M(d, v, r)) : o ? Ee.current ? c(f, o, e) : f.findIndex((d) => M(d, v, r)) : a.skip === 0 ? 0 : -1;
|
|
122
|
+
}, Ae = (e, r) => r !== void 0 && r !== -1 && e && e.length > 0 && e[r].disabled, De = () => {
|
|
123
|
+
const e = b(n), r = t.current.initState(), a = xe();
|
|
124
|
+
Ae(e, a) && (q(null, r), F(r));
|
|
125
|
+
}, Se = (e) => {
|
|
125
126
|
if (e.isPropagationStopped())
|
|
126
127
|
return;
|
|
127
|
-
const
|
|
128
|
-
|
|
129
|
-
},
|
|
130
|
-
var
|
|
128
|
+
const r = t.current.initState();
|
|
129
|
+
r.syntheticEvent = e, p.focused || (r.data.focused = !0), De(), t.current.togglePopup(r), F(r);
|
|
130
|
+
}, He = (e) => {
|
|
131
|
+
var z, ue, W, pe, $, et, tt;
|
|
131
132
|
e && e.target instanceof Element && e.target.nodeName === "INPUT" && e.stopPropagation && e.stopPropagation();
|
|
132
133
|
const {
|
|
133
|
-
filterable:
|
|
134
|
+
filterable: r,
|
|
134
135
|
disabled: a,
|
|
135
136
|
defaultItem: c,
|
|
136
137
|
leftRightKeysNavigation: u = !0,
|
|
@@ -139,162 +140,162 @@ const yn = "Please select a value from the list!", Te = i.forwardRef((D, ct) =>
|
|
|
139
140
|
groupField: f = "",
|
|
140
141
|
textField: o,
|
|
141
142
|
skipDisabledItems: d = !0
|
|
142
|
-
} =
|
|
143
|
-
if (
|
|
144
|
-
if (
|
|
145
|
-
|
|
146
|
-
|
|
143
|
+
} = n, l = b(n), I = k(), h = l.findIndex((S) => M(S, I, v)), y = n.opened !== void 0 ? n.opened : p.opened, s = e.keyCode, K = s === w.home || s === w.end, P = s === w.up || s === w.down, Y = !y && (e.altKey && s === w.down || s === w.enter || s === w.space), ne = y && (e.altKey && s === w.up || s === w.esc), de = u && (s === w.left || s === w.right), ce = P || de && !r || K, D = t.current.initState();
|
|
144
|
+
if (D.syntheticEvent = e, !a) {
|
|
145
|
+
if (K && ((z = t == null ? void 0 : t.current) != null && z.vs.enabled))
|
|
146
|
+
s === w.home ? m.skip !== 0 ? ((ue = t == null ? void 0 : t.current) == null || ue.triggerOnPageChange(D, 0, m.pageSize), H.current = !0) : q(l[0], D) : m.skip < m.total - m.pageSize ? ((W = t == null ? void 0 : t.current) == null || W.triggerOnPageChange(
|
|
147
|
+
D,
|
|
147
148
|
m.total - m.pageSize,
|
|
148
149
|
m.pageSize
|
|
149
|
-
),
|
|
150
|
-
else if (y &&
|
|
151
|
-
e.preventDefault(), (
|
|
152
|
-
else if (y &&
|
|
153
|
-
e.preventDefault(), (
|
|
154
|
-
else if (y &&
|
|
155
|
-
const
|
|
156
|
-
|
|
157
|
-
} else if (
|
|
158
|
-
|
|
159
|
-
else if (
|
|
160
|
-
if (
|
|
150
|
+
), H.current = !0) : q(l[l.length - 1], D);
|
|
151
|
+
else if (y && s === w.pageUp)
|
|
152
|
+
e.preventDefault(), (pe = t == null ? void 0 : t.current) == null || pe.scrollPopupByPageSize(-1);
|
|
153
|
+
else if (y && s === w.pageDown)
|
|
154
|
+
e.preventDefault(), ($ = t == null ? void 0 : t.current) == null || $.scrollPopupByPageSize(1);
|
|
155
|
+
else if (y && s === w.enter) {
|
|
156
|
+
const S = xe();
|
|
157
|
+
Ae(l, S) ? (q(null, D), F(D)) : Q(S, D), (et = t == null ? void 0 : t.current) == null || et.togglePopup(D), e.preventDefault();
|
|
158
|
+
} else if (Y || ne)
|
|
159
|
+
ne && De(), (tt = t == null ? void 0 : t.current) == null || tt.togglePopup(D), e.preventDefault();
|
|
160
|
+
else if (ce) {
|
|
161
|
+
if (Ee.current = !1, f !== "" && o)
|
|
161
162
|
if (!d && y)
|
|
162
|
-
|
|
163
|
+
O(D, s);
|
|
163
164
|
else {
|
|
164
|
-
let
|
|
165
|
-
if (
|
|
166
|
-
const x =
|
|
167
|
-
|
|
168
|
-
} else if (
|
|
165
|
+
let S;
|
|
166
|
+
if (s === w.down || s === w.right) {
|
|
167
|
+
const x = l.slice(h + 1).find((g) => !g.disabled && g[o]);
|
|
168
|
+
S = x && l.findIndex((g) => g[o] === x[o]);
|
|
169
|
+
} else if (s === w.up || s === w.left) {
|
|
169
170
|
let x;
|
|
170
171
|
if (h === 0 && c)
|
|
171
|
-
|
|
172
|
+
S = -1;
|
|
172
173
|
else if (h === -1)
|
|
173
|
-
x =
|
|
174
|
+
x = l, S = l.findIndex((g) => !g.disabled && g[o]);
|
|
174
175
|
else {
|
|
175
|
-
x =
|
|
176
|
+
x = l.slice(0, h);
|
|
176
177
|
let g = x.pop();
|
|
177
178
|
for (; g && g.disabled; )
|
|
178
179
|
g = x.pop();
|
|
179
|
-
|
|
180
|
+
S = g && l.findIndex((Fe) => Fe[o] === g[o]);
|
|
180
181
|
}
|
|
181
182
|
}
|
|
182
|
-
if (
|
|
183
|
-
const x =
|
|
184
|
-
|
|
185
|
-
} else
|
|
183
|
+
if (S !== void 0) {
|
|
184
|
+
const x = S - h;
|
|
185
|
+
O(D, s, x);
|
|
186
|
+
} else S === void 0 && l.findIndex((x) => x[o] === I[o]) === l.length - 1 && O(D, s);
|
|
186
187
|
}
|
|
187
|
-
else if (!d && y ||
|
|
188
|
-
|
|
188
|
+
else if (!d && y || K)
|
|
189
|
+
O(D, s);
|
|
189
190
|
else if (o) {
|
|
190
|
-
let
|
|
191
|
-
if (
|
|
192
|
-
const x =
|
|
193
|
-
|
|
194
|
-
} else if (
|
|
191
|
+
let S;
|
|
192
|
+
if (s === w.down || s === w.right) {
|
|
193
|
+
const x = l.slice(h + 1).find((g) => !g.disabled && g[o]);
|
|
194
|
+
S = x && l.findIndex((g) => g[o] === x[o]);
|
|
195
|
+
} else if (s === w.up || s === w.left) {
|
|
195
196
|
let x;
|
|
196
197
|
if (h === 0 && c)
|
|
197
|
-
|
|
198
|
+
S = -1;
|
|
198
199
|
else if (h === -1)
|
|
199
|
-
x =
|
|
200
|
+
x = l, S = l.find((g) => !g.disabled && g[o]);
|
|
200
201
|
else {
|
|
201
|
-
x =
|
|
202
|
+
x = l.slice(0, h);
|
|
202
203
|
let g = x.pop();
|
|
203
204
|
for (; g && g.disabled; )
|
|
204
205
|
g = x.pop();
|
|
205
|
-
|
|
206
|
+
S = g && l.findIndex((Fe) => Fe[o] === g[o]);
|
|
206
207
|
}
|
|
207
208
|
}
|
|
208
|
-
if (
|
|
209
|
-
const x =
|
|
210
|
-
|
|
211
|
-
} else
|
|
209
|
+
if (S !== void 0) {
|
|
210
|
+
const x = S - h;
|
|
211
|
+
O(D, s, x);
|
|
212
|
+
} else S === void 0 && l.findIndex((x) => x[o] === I[o]) === l.length - 1 && O(D, s);
|
|
212
213
|
} else
|
|
213
|
-
|
|
214
|
+
O(D, s);
|
|
214
215
|
e.preventDefault();
|
|
215
216
|
}
|
|
216
|
-
|
|
217
|
+
F(D);
|
|
217
218
|
}
|
|
218
219
|
}, yt = (e) => {
|
|
219
|
-
const
|
|
220
|
-
|
|
221
|
-
},
|
|
222
|
-
const e =
|
|
223
|
-
return
|
|
224
|
-
|
|
220
|
+
const r = t.current.initState();
|
|
221
|
+
r.syntheticEvent = e.syntheticEvent, n.filter === void 0 && (r.data.text = e.target.value), t.current.filterChanged(e.target.value, r), Ee.current = !0, F(r), ee({ group: void 0, text: String(e.target.value) });
|
|
222
|
+
}, Ve = () => {
|
|
223
|
+
const e = n.filter !== void 0 ? n.filter : p.text;
|
|
224
|
+
return n.filterable && /* @__PURE__ */ i.createElement(
|
|
225
|
+
sn,
|
|
225
226
|
{
|
|
226
227
|
value: e,
|
|
227
|
-
ref: (
|
|
228
|
-
|
|
228
|
+
ref: (r) => {
|
|
229
|
+
Z.current = r && r.element;
|
|
229
230
|
},
|
|
230
231
|
onChange: yt,
|
|
231
|
-
onKeyDown:
|
|
232
|
-
size:
|
|
233
|
-
rounded:
|
|
234
|
-
fillMode:
|
|
232
|
+
onKeyDown: He,
|
|
233
|
+
size: J,
|
|
234
|
+
rounded: ze,
|
|
235
|
+
fillMode: ve,
|
|
235
236
|
renderListFilterWrapper: !0
|
|
236
237
|
}
|
|
237
238
|
);
|
|
238
239
|
}, wt = (e) => {
|
|
239
240
|
var a;
|
|
240
|
-
const
|
|
241
|
-
|
|
242
|
-
},
|
|
243
|
-
const { textField: e, defaultItem:
|
|
244
|
-
return
|
|
245
|
-
|
|
241
|
+
const r = t.current.initState();
|
|
242
|
+
r.syntheticEvent = e, (a = t == null ? void 0 : t.current) == null || a.togglePopup(r), q(n.defaultItem, r), F(r);
|
|
243
|
+
}, Be = () => {
|
|
244
|
+
const { textField: e, defaultItem: r, dataItemKey: a } = n, c = k();
|
|
245
|
+
return r !== void 0 && /* @__PURE__ */ i.createElement(
|
|
246
|
+
ln,
|
|
246
247
|
{
|
|
247
|
-
defaultItem:
|
|
248
|
+
defaultItem: r,
|
|
248
249
|
textField: e,
|
|
249
|
-
selected:
|
|
250
|
+
selected: M(c, r, a),
|
|
250
251
|
key: "defaultitemkey",
|
|
251
252
|
onClick: wt
|
|
252
253
|
}
|
|
253
254
|
);
|
|
254
|
-
}, xt = (e,
|
|
255
|
+
}, xt = (e, r) => {
|
|
255
256
|
var a;
|
|
256
|
-
(a = t == null ? void 0 : t.current) == null || a.handleItemClick(e,
|
|
257
|
+
(a = t == null ? void 0 : t.current) == null || a.handleItemClick(e, r), A.current = void 0;
|
|
257
258
|
}, Dt = (e) => {
|
|
258
|
-
const { vs:
|
|
259
|
-
|
|
260
|
-
const { groupField: c } =
|
|
261
|
-
let u =
|
|
259
|
+
const { vs: r, list: a } = t.current;
|
|
260
|
+
r.scrollHandler(e);
|
|
261
|
+
const { groupField: c } = n;
|
|
262
|
+
let u = b(n);
|
|
262
263
|
if (!(!c || !u.length) && c) {
|
|
263
|
-
const m =
|
|
264
|
+
const m = _e.current = _e.current || (r.enabled ? r.itemHeight : a ? a.children[0].offsetHeight : 0), f = e.target.scrollTop - r.skip * m;
|
|
264
265
|
u = t.current.getGroupedDataModernMode(u, c);
|
|
265
266
|
let o = u[0][c];
|
|
266
267
|
for (let d = 1; d < u.length && !(m * d > f); d++)
|
|
267
268
|
u[d] && u[d][c] && (o = u[d][c]);
|
|
268
|
-
o !== p.group &&
|
|
269
|
+
o !== p.group && ee({ group: o });
|
|
269
270
|
}
|
|
270
|
-
},
|
|
271
|
-
var
|
|
271
|
+
}, We = () => {
|
|
272
|
+
var s;
|
|
272
273
|
const {
|
|
273
274
|
textField: e,
|
|
274
|
-
dataItemKey:
|
|
275
|
+
dataItemKey: r,
|
|
275
276
|
virtual: a = { skip: 0, total: void 0 },
|
|
276
277
|
groupHeaderItemRender: c,
|
|
277
278
|
listNoDataRender: u,
|
|
278
279
|
itemRender: m
|
|
279
|
-
} =
|
|
280
|
+
} = n, v = b(n), f = N && N.uDropDownList, o = t.current.vs, d = a.skip, l = n.opened !== void 0 ? n.opened : p.opened, I = t.current.getPopupSettings(), h = `translateY(${o.translate}px)`, y = k();
|
|
280
281
|
return /* @__PURE__ */ i.createElement(
|
|
281
282
|
dn,
|
|
282
283
|
{
|
|
283
|
-
id:
|
|
284
|
-
show:
|
|
284
|
+
id: Le,
|
|
285
|
+
show: l,
|
|
285
286
|
data: v.slice(),
|
|
286
|
-
focusedIndex:
|
|
287
|
+
focusedIndex: xe(),
|
|
287
288
|
value: y,
|
|
288
289
|
textField: e,
|
|
289
|
-
valueField:
|
|
290
|
-
optionsGuid:
|
|
291
|
-
groupField:
|
|
290
|
+
valueField: r,
|
|
291
|
+
optionsGuid: $e,
|
|
292
|
+
groupField: n.groupField,
|
|
292
293
|
groupMode: "modern",
|
|
293
|
-
listRef: (
|
|
294
|
-
o.list = t.current.list =
|
|
294
|
+
listRef: (K) => {
|
|
295
|
+
o.list = t.current.list = K;
|
|
295
296
|
},
|
|
296
297
|
wrapperStyle: { maxHeight: I.height },
|
|
297
|
-
wrapperCssClass:
|
|
298
|
+
wrapperCssClass: C(L.listContent({ c: f })),
|
|
298
299
|
listStyle: o.enabled ? { transform: h } : void 0,
|
|
299
300
|
key: "listkey",
|
|
300
301
|
skip: d,
|
|
@@ -304,165 +305,164 @@ const yn = "Please select a value from the list!", Te = i.forwardRef((D, ct) =>
|
|
|
304
305
|
noDataRender: u,
|
|
305
306
|
onScroll: Dt,
|
|
306
307
|
wrapperRef: o.scrollerRef,
|
|
307
|
-
scroller: (
|
|
308
|
+
scroller: (s = t == null ? void 0 : t.current) == null ? void 0 : s.renderScrollElement(),
|
|
308
309
|
ariaSetSize: a.total
|
|
309
310
|
}
|
|
310
311
|
);
|
|
311
312
|
}, St = () => {
|
|
312
313
|
var h;
|
|
313
|
-
const { header: e, footer:
|
|
314
|
+
const { header: e, footer: r, adaptiveTitle: a, groupField: c, groupStickyHeaderItemRender: u, list: m } = n, v = b(n), f = n.opened !== void 0 ? n.opened : p.opened, o = N && N.uDropDownList, d = N && N.uDropDownsActionSheet, l = {
|
|
314
315
|
navigatable: !1,
|
|
315
316
|
navigatableElements: [],
|
|
316
317
|
expand: f,
|
|
317
318
|
animation: !0,
|
|
318
|
-
onClose: (y) =>
|
|
319
|
-
className:
|
|
320
|
-
|
|
319
|
+
onClose: (y) => Se(y),
|
|
320
|
+
className: C(
|
|
321
|
+
j.wrapper({
|
|
321
322
|
c: d
|
|
322
323
|
}),
|
|
323
324
|
"k-adaptive-actionsheet"
|
|
324
325
|
),
|
|
325
|
-
animationStyles:
|
|
326
|
-
position:
|
|
326
|
+
animationStyles: _ && G && _ <= G.small ? { top: 0, width: "100%", height: "100%" } : void 0,
|
|
327
|
+
position: _ && G && _ <= G.small ? "fullscreen" : void 0
|
|
327
328
|
};
|
|
328
329
|
let { group: I } = p;
|
|
329
|
-
return I === void 0 && c !== void 0 && (I =
|
|
330
|
-
|
|
330
|
+
return I === void 0 && c !== void 0 && (I = me(v[0], c)), /* @__PURE__ */ i.createElement(gn, { ...l }, /* @__PURE__ */ i.createElement(hn, { className: C(j.header({ c: d })) }, /* @__PURE__ */ i.createElement("div", { className: C(j.titleBar({ c: d })) }, /* @__PURE__ */ i.createElement("div", { className: C(j.title({ c: d })) }, /* @__PURE__ */ i.createElement("div", null, a)), /* @__PURE__ */ i.createElement("div", { className: C(j.actions({ c: d })) }, /* @__PURE__ */ i.createElement(
|
|
331
|
+
at,
|
|
331
332
|
{
|
|
332
333
|
tabIndex: 0,
|
|
333
334
|
"aria-label": "Cancel",
|
|
334
335
|
"aria-disabled": "false",
|
|
335
336
|
type: "button",
|
|
336
337
|
fillMode: "flat",
|
|
337
|
-
onClick:
|
|
338
|
+
onClick: Se,
|
|
338
339
|
icon: "x",
|
|
339
340
|
svgIcon: on
|
|
340
341
|
}
|
|
341
|
-
))), /* @__PURE__ */ i.createElement("div", { className:
|
|
342
|
+
))), /* @__PURE__ */ i.createElement("div", { className: C(j.titleBarGroup({ c: d })) }, Ve())), /* @__PURE__ */ i.createElement(In, null, e && /* @__PURE__ */ i.createElement("div", { className: C(L.listHeader({ c: o })) }, e), /* @__PURE__ */ i.createElement(
|
|
342
343
|
"div",
|
|
343
344
|
{
|
|
344
|
-
className:
|
|
345
|
-
|
|
345
|
+
className: C(
|
|
346
|
+
L.list({
|
|
346
347
|
c: o,
|
|
347
|
-
size:
|
|
348
|
+
size: J,
|
|
348
349
|
virtual: (h = t == null ? void 0 : t.current) == null ? void 0 : h.vs.enabled
|
|
349
350
|
})
|
|
350
351
|
)
|
|
351
352
|
},
|
|
352
|
-
|
|
353
|
+
Be(),
|
|
353
354
|
!m && I && v.length !== 0 && /* @__PURE__ */ i.createElement(
|
|
354
|
-
|
|
355
|
+
rt,
|
|
355
356
|
{
|
|
356
357
|
group: I,
|
|
357
358
|
groupMode: "modern",
|
|
358
359
|
render: u
|
|
359
360
|
}
|
|
360
361
|
),
|
|
361
|
-
|
|
362
|
-
),
|
|
362
|
+
We()
|
|
363
|
+
), r && /* @__PURE__ */ i.createElement("div", { className: C(L.listFooter({ c: o })) }, r)));
|
|
363
364
|
}, Ct = () => {
|
|
364
365
|
p.focused && window.setTimeout(() => {
|
|
365
|
-
p.focused && t.current.wrapper &&
|
|
366
|
+
p.focused && t.current.wrapper && re(t.current.wrapper);
|
|
366
367
|
});
|
|
367
368
|
}, Et = (e) => {
|
|
368
|
-
|
|
369
|
-
(n = r.popupSettings) != null && n.onMouseDownOutside && r.popupSettings.onMouseDownOutside.call(void 0, e);
|
|
369
|
+
"onMouseDownOutside" in (n.popupSettings || {}) && n.popupSettings.onMouseDownOutside.call(void 0, e);
|
|
370
370
|
}, kt = () => {
|
|
371
|
-
const { header: e, footer:
|
|
371
|
+
const { header: e, footer: r, dir: a, groupField: c, groupStickyHeaderItemRender: u, list: m } = n, v = b(n), f = t.current, o = f.getPopupSettings(), d = n.opened !== void 0 ? n.opened : p.opened, l = o.width !== void 0 ? o.width : f.popupWidth, I = N && N.uDropDownList, h = {
|
|
372
372
|
dir: a !== void 0 ? a : f.dirCalculated,
|
|
373
|
-
width:
|
|
373
|
+
width: l,
|
|
374
374
|
popupSettings: {
|
|
375
375
|
...o,
|
|
376
|
-
popupClass:
|
|
376
|
+
popupClass: C(
|
|
377
377
|
o.popupClass,
|
|
378
|
-
|
|
378
|
+
L.listContainer({
|
|
379
379
|
c: I
|
|
380
380
|
})
|
|
381
381
|
),
|
|
382
|
-
anchor: o.anchor ||
|
|
382
|
+
anchor: o.anchor || X.current,
|
|
383
383
|
show: d,
|
|
384
|
-
onOpen:
|
|
384
|
+
onOpen: we,
|
|
385
385
|
onClose: Ct,
|
|
386
386
|
onMouseDownOutside: Et
|
|
387
387
|
},
|
|
388
388
|
itemsCount: [v.length]
|
|
389
389
|
};
|
|
390
390
|
let { group: y } = p;
|
|
391
|
-
return y === void 0 && c !== void 0 && (y =
|
|
391
|
+
return y === void 0 && c !== void 0 && (y = me(v[0], c)), /* @__PURE__ */ i.createElement(an, { ...h }, Ve(), e && /* @__PURE__ */ i.createElement("div", { className: C(L.listHeader({ c: I })) }, e), /* @__PURE__ */ i.createElement(
|
|
392
392
|
"div",
|
|
393
393
|
{
|
|
394
|
-
className:
|
|
395
|
-
|
|
394
|
+
className: C(
|
|
395
|
+
L.list({
|
|
396
396
|
c: I,
|
|
397
|
-
size:
|
|
397
|
+
size: J,
|
|
398
398
|
virtual: t.current.vs.enabled
|
|
399
399
|
})
|
|
400
400
|
)
|
|
401
401
|
},
|
|
402
|
-
|
|
403
|
-
!m && y && v.length !== 0 && /* @__PURE__ */ i.createElement(
|
|
404
|
-
|
|
405
|
-
),
|
|
402
|
+
Be(),
|
|
403
|
+
!m && y && v.length !== 0 && /* @__PURE__ */ i.createElement(rt, { group: y, groupMode: "modern", render: u }),
|
|
404
|
+
We()
|
|
405
|
+
), r && /* @__PURE__ */ i.createElement("div", { className: C(L.listFooter({ c: I })) }, r), Te && /* @__PURE__ */ i.createElement(tn, null));
|
|
406
406
|
}, Lt = (e) => {
|
|
407
|
-
const { dataItemKey:
|
|
408
|
-
let u = a.map((
|
|
407
|
+
const { dataItemKey: r } = n, a = b(n), c = k();
|
|
408
|
+
let u = a.map((P, Y) => ({ item: P, itemIndex: Y }));
|
|
409
409
|
const m = U.current.word, v = U.current.last, f = un(m, v);
|
|
410
410
|
let o = u.length, d = Math.max(
|
|
411
411
|
0,
|
|
412
|
-
a.findIndex((
|
|
413
|
-
),
|
|
414
|
-
|
|
415
|
-
let I, h, y,
|
|
416
|
-
const { textField:
|
|
417
|
-
for (;
|
|
418
|
-
if (I =
|
|
419
|
-
|
|
412
|
+
a.findIndex((P) => M(P, c, r))
|
|
413
|
+
), l;
|
|
414
|
+
n.defaultItem && (l = { item: n.defaultItem, itemIndex: -1 }, o += 1, d += 1), d += f ? 1 : 0, u = pn(u, d, l);
|
|
415
|
+
let I, h, y, s = 0;
|
|
416
|
+
const { textField: K } = n;
|
|
417
|
+
for (; s < o; ) {
|
|
418
|
+
if (I = me(u[s].item, K), h = f && it(I, v, fe), y = it(I, m, fe), h || y) {
|
|
419
|
+
s = u[s].itemIndex;
|
|
420
420
|
break;
|
|
421
421
|
}
|
|
422
|
-
|
|
422
|
+
s++;
|
|
423
423
|
}
|
|
424
|
-
if (
|
|
425
|
-
const
|
|
426
|
-
|
|
424
|
+
if (s !== o) {
|
|
425
|
+
const P = t.current.initState();
|
|
426
|
+
P.syntheticEvent = e, Q(s, P), F(P), A.current = void 0;
|
|
427
427
|
}
|
|
428
428
|
}, bt = (e) => {
|
|
429
|
-
clearTimeout(Ue.current),
|
|
429
|
+
clearTimeout(Ue.current), n.filterable || (Ue.current = window.setTimeout(() => U.current.word = "", ut), Lt(e));
|
|
430
430
|
}, Pt = (e) => {
|
|
431
|
-
|
|
431
|
+
oe.current || t.current.handleFocus(e);
|
|
432
432
|
}, Mt = (e) => {
|
|
433
|
-
if (
|
|
433
|
+
if (oe.current || !p.focused)
|
|
434
434
|
return;
|
|
435
|
-
const
|
|
436
|
-
a.syntheticEvent = e, a.data.focused = !1, a.events.push({ type: "onBlur" }),
|
|
435
|
+
const r = n.opened !== void 0 ? n.opened : p.opened, a = t.current.initState();
|
|
436
|
+
a.syntheticEvent = e, a.data.focused = !1, a.events.push({ type: "onBlur" }), r && De(), r && !Ne && t.current.togglePopup(a), F(a);
|
|
437
437
|
}, Nt = (e) => {
|
|
438
|
-
if (
|
|
438
|
+
if (n.filterable || e.which === 0 || e.keyCode === w.enter)
|
|
439
439
|
return;
|
|
440
|
-
let
|
|
441
|
-
|
|
442
|
-
word: U.current.word +
|
|
443
|
-
last: U.current.last +
|
|
440
|
+
let r = String.fromCharCode(e.charCode || e.keyCode);
|
|
441
|
+
fe && (r = r.toLowerCase()), r === " " && e.preventDefault(), U.current = {
|
|
442
|
+
word: U.current.word + r,
|
|
443
|
+
last: U.current.last + r
|
|
444
444
|
}, bt(e);
|
|
445
445
|
}, Ft = () => {
|
|
446
446
|
const e = t.current.initState();
|
|
447
|
-
e.data.opened = p.opened, t.current.togglePopup(e),
|
|
448
|
-
}, qe = i.useRef(null),
|
|
447
|
+
e.data.opened = p.opened, t.current.togglePopup(e), F(e);
|
|
448
|
+
}, qe = i.useRef(null), X = i.useRef(null), Ce = i.useRef(null), Z = i.useRef(null);
|
|
449
449
|
i.useImperativeHandle(
|
|
450
450
|
qe,
|
|
451
451
|
() => ({
|
|
452
452
|
get element() {
|
|
453
|
-
return
|
|
453
|
+
return X.current;
|
|
454
454
|
},
|
|
455
455
|
get index() {
|
|
456
456
|
return ft();
|
|
457
457
|
},
|
|
458
458
|
get name() {
|
|
459
|
-
return
|
|
459
|
+
return n.name;
|
|
460
460
|
},
|
|
461
461
|
get validity() {
|
|
462
|
-
return
|
|
462
|
+
return ye();
|
|
463
463
|
},
|
|
464
464
|
get value() {
|
|
465
|
-
return
|
|
465
|
+
return k();
|
|
466
466
|
},
|
|
467
467
|
get focused() {
|
|
468
468
|
return p.focused;
|
|
@@ -471,16 +471,16 @@ const yn = "Please select a value from the list!", Te = i.forwardRef((D, ct) =>
|
|
|
471
471
|
return p.opened;
|
|
472
472
|
},
|
|
473
473
|
focus: mt,
|
|
474
|
-
props:
|
|
474
|
+
props: n,
|
|
475
475
|
togglePopup: Ft
|
|
476
476
|
})
|
|
477
477
|
), i.useImperativeHandle(
|
|
478
478
|
ct,
|
|
479
479
|
() => qe.current
|
|
480
480
|
);
|
|
481
|
-
const Ue = i.useRef(null), U = i.useRef({ word: "", last: "" }),
|
|
482
|
-
new
|
|
483
|
-
props:
|
|
481
|
+
const Ue = i.useRef(null), U = i.useRef({ word: "", last: "" }), oe = i.useRef(!1), A = i.useRef(null), H = i.useRef(!1), Ee = i.useRef(!1), V = i.useRef({}), ke = i.useRef({}), t = i.useRef(
|
|
482
|
+
new lt({
|
|
483
|
+
props: n,
|
|
484
484
|
setState: () => {
|
|
485
485
|
},
|
|
486
486
|
state: {},
|
|
@@ -491,176 +491,176 @@ const yn = "Please select a value from the list!", Te = i.forwardRef((D, ct) =>
|
|
|
491
491
|
handleItemSelect: () => {
|
|
492
492
|
}
|
|
493
493
|
})
|
|
494
|
-
),
|
|
494
|
+
), _e = i.useRef(0), R = i.useRef(null), [p, Kt] = i.useState({}), [_, Tt] = i.useState(), [, Ge] = i.useReducer((e) => e, !0), zt = fn(), ee = (e) => {
|
|
495
495
|
Kt({ ...p, ...e });
|
|
496
496
|
};
|
|
497
497
|
i.useEffect(() => {
|
|
498
498
|
t.current.updateComponentArgs({
|
|
499
|
-
props:
|
|
500
|
-
setState:
|
|
499
|
+
props: n,
|
|
500
|
+
setState: ee,
|
|
501
501
|
state: p,
|
|
502
|
-
forceUpdate:
|
|
503
|
-
element:
|
|
504
|
-
handleItemSelect:
|
|
505
|
-
value:
|
|
502
|
+
forceUpdate: Ge,
|
|
503
|
+
element: X.current,
|
|
504
|
+
handleItemSelect: Q,
|
|
505
|
+
value: k()
|
|
506
506
|
});
|
|
507
|
-
}, [
|
|
508
|
-
var d,
|
|
509
|
-
const { dataItemKey: e, virtual:
|
|
510
|
-
if ((d = t == null ? void 0 : t.current) == null || d.didUpdate(), (
|
|
507
|
+
}, [ee, p, Ge, Q, k]), i.useEffect(() => {
|
|
508
|
+
var d, l, I, h, y, s, K, P, Y, ne, de, ce, D;
|
|
509
|
+
const { dataItemKey: e, virtual: r, groupField: a = "", textField: c } = n, u = b(n), m = V.current.virtual ? V.current.virtual.total : 0, v = n.opened !== void 0 ? n.opened : p.opened, f = V.current.opened !== void 0 ? V.current.opened : ke.current.opened, o = !f && v;
|
|
510
|
+
if ((d = t == null ? void 0 : t.current) == null || d.didUpdate(), (l = t == null ? void 0 : t.current) != null && l.getPopupSettings().animate || o && we(), r && r.total !== m)
|
|
511
511
|
(I = t == null ? void 0 : t.current) == null || I.vs.calcScrollElementHeight(), (h = t == null ? void 0 : t.current) == null || h.vs.reset();
|
|
512
512
|
else {
|
|
513
|
-
const
|
|
514
|
-
let
|
|
515
|
-
a !== "" &&
|
|
516
|
-
const
|
|
517
|
-
o &&
|
|
518
|
-
setState:
|
|
513
|
+
const z = k(), ue = V.current.value !== void 0 ? V.current.value : ke.current.value;
|
|
514
|
+
let W = u.findIndex(($) => M($, z, e));
|
|
515
|
+
a !== "" && z && c && (W = (s = (y = t == null ? void 0 : t.current) == null ? void 0 : y.getGroupedDataModernMode(u, a)) == null ? void 0 : s.map(($) => $[c]).indexOf(z[c]));
|
|
516
|
+
const pe = !M(ue, z, e);
|
|
517
|
+
o && r ? (K = t == null ? void 0 : t.current) == null || K.scrollToVirtualItem(r, W) : o && !r ? (we(), u && u.length !== 0 && ((P = t == null ? void 0 : t.current) == null || P.resetGroupStickyHeader(u[0][a], {
|
|
518
|
+
setState: ee,
|
|
519
519
|
group: p.group,
|
|
520
520
|
state: p
|
|
521
|
-
})), (
|
|
521
|
+
})), (Y = t == null ? void 0 : t.current) == null || Y.scrollToItem(W)) : v && f && z && pe && !H.current ? (de = t == null ? void 0 : t.current) == null || de.scrollToItem(W, (ne = t == null ? void 0 : t.current) == null ? void 0 : ne.vs.enabled) : v && f && H.current && (H.current && r && r.skip === 0 ? (ce = t == null ? void 0 : t.current) == null || ce.vs.reset() : H.current && r && r.skip === r.total - r.pageSize && ((D = t == null ? void 0 : t.current) == null || D.vs.scrollToEnd()));
|
|
522
522
|
}
|
|
523
|
-
|
|
523
|
+
H.current = !1, ke.current = p, V.current = n, Oe();
|
|
524
524
|
}), i.useEffect(() => {
|
|
525
|
-
var e,
|
|
526
|
-
return
|
|
525
|
+
var e, r;
|
|
526
|
+
return R.current = nt && window.ResizeObserver && new window.ResizeObserver(gt.bind(void 0)), (e = t == null ? void 0 : t.current) == null || e.didMount(), Oe(), (r = he()) != null && r.body && R.current && R.current.observe(he().body), () => {
|
|
527
527
|
var a;
|
|
528
|
-
(a =
|
|
528
|
+
(a = he()) != null && a.body && R.current && R.current.disconnect();
|
|
529
529
|
};
|
|
530
530
|
}, []);
|
|
531
|
-
const
|
|
531
|
+
const Ye = ge + "-accessibility-id", Le = ge + "-listbox-id", $e = ge + "-guid", Ot = zt.toLanguageString(
|
|
532
532
|
st,
|
|
533
533
|
vn[st]
|
|
534
534
|
), {
|
|
535
|
-
style:
|
|
535
|
+
style: ie,
|
|
536
536
|
className: At,
|
|
537
|
-
label:
|
|
537
|
+
label: be,
|
|
538
538
|
dir: Ht,
|
|
539
|
-
virtual:
|
|
539
|
+
virtual: B,
|
|
540
540
|
adaptive: Dn,
|
|
541
541
|
dataItemKey: Vt,
|
|
542
|
-
disabled:
|
|
543
|
-
loading:
|
|
544
|
-
iconClassName:
|
|
542
|
+
disabled: ae,
|
|
543
|
+
loading: je,
|
|
544
|
+
iconClassName: Je,
|
|
545
545
|
svgIcon: Bt,
|
|
546
|
-
valueRender:
|
|
547
|
-
} =
|
|
548
|
-
Wt.enabled =
|
|
549
|
-
const
|
|
550
|
-
|
|
551
|
-
const
|
|
546
|
+
valueRender: Qe
|
|
547
|
+
} = n, Pe = n.opened !== void 0 ? n.opened : p.opened, se = k(), Me = me(se, n.textField), Xe = !vt() || ye().valid, le = t.current, Wt = le.vs, te = N && N.uDropDownList;
|
|
548
|
+
Wt.enabled = B !== void 0;
|
|
549
|
+
const G = Qt(), Ne = !!(_ && G && _ <= G.medium && n.adaptive);
|
|
550
|
+
B !== void 0 && (le.vs.skip = B.skip, le.vs.total = B.total, le.vs.pageSize = B.pageSize);
|
|
551
|
+
const qt = b(n), { focused: Ut } = p, _t = qt.findIndex((e) => M(e, se, Vt)), Ze = /* @__PURE__ */ i.createElement("span", { id: Ye, className: C(L.inputInner({ c: te })) }, Me && /* @__PURE__ */ i.createElement("span", { className: C(L.inputText({ c: te })) }, Me)), Gt = Qe !== void 0 ? Qe.call(void 0, Ze, se) : Ze, Re = /* @__PURE__ */ i.createElement(i.Fragment, null, /* @__PURE__ */ i.createElement(
|
|
552
552
|
"span",
|
|
553
553
|
{
|
|
554
554
|
ref: ht,
|
|
555
|
-
className:
|
|
556
|
-
|
|
557
|
-
c:
|
|
558
|
-
size:
|
|
559
|
-
rounded:
|
|
560
|
-
fillMode:
|
|
561
|
-
focused:
|
|
562
|
-
disabled:
|
|
563
|
-
invalid: !
|
|
564
|
-
loading:
|
|
565
|
-
required:
|
|
555
|
+
className: C(
|
|
556
|
+
L.wrapper({
|
|
557
|
+
c: te,
|
|
558
|
+
size: J,
|
|
559
|
+
rounded: ze,
|
|
560
|
+
fillMode: ve,
|
|
561
|
+
focused: Ut,
|
|
562
|
+
disabled: ae,
|
|
563
|
+
invalid: !Xe,
|
|
564
|
+
loading: je,
|
|
565
|
+
required: Ie()
|
|
566
566
|
}),
|
|
567
567
|
At
|
|
568
568
|
),
|
|
569
|
-
style:
|
|
569
|
+
style: be ? { ...ie, width: void 0 } : ie,
|
|
570
570
|
dir: Ht,
|
|
571
|
-
onMouseDown:
|
|
572
|
-
e.target.nodeName !== "INPUT" && (
|
|
571
|
+
onMouseDown: Pe ? (e) => {
|
|
572
|
+
e.target.nodeName !== "INPUT" && (re(t.current.wrapper), e.preventDefault());
|
|
573
573
|
} : void 0,
|
|
574
574
|
onFocus: Pt,
|
|
575
575
|
onBlur: Mt,
|
|
576
|
-
tabIndex: Xt(pt,
|
|
577
|
-
accessKey:
|
|
578
|
-
onKeyDown:
|
|
576
|
+
tabIndex: Xt(pt, ae),
|
|
577
|
+
accessKey: n.accessKey,
|
|
578
|
+
onKeyDown: He,
|
|
579
579
|
onKeyPress: Nt,
|
|
580
|
-
onClick:
|
|
580
|
+
onClick: ae ? void 0 : Se,
|
|
581
581
|
role: "combobox",
|
|
582
|
-
"aria-required":
|
|
583
|
-
"aria-disabled":
|
|
582
|
+
"aria-required": Ie(),
|
|
583
|
+
"aria-disabled": ae || void 0,
|
|
584
584
|
"aria-haspopup": "listbox",
|
|
585
|
-
"aria-expanded":
|
|
586
|
-
"aria-owns":
|
|
587
|
-
"aria-activedescendant":
|
|
588
|
-
"aria-label":
|
|
589
|
-
"aria-labelledby":
|
|
590
|
-
"aria-describedby":
|
|
591
|
-
"aria-controls":
|
|
592
|
-
id:
|
|
593
|
-
title:
|
|
585
|
+
"aria-expanded": Pe || !1,
|
|
586
|
+
"aria-owns": Le,
|
|
587
|
+
"aria-activedescendant": Pe ? "option-" + $e + "-" + (_t + (B ? B.skip : 0)) : void 0,
|
|
588
|
+
"aria-label": n.ariaLabel || n.label,
|
|
589
|
+
"aria-labelledby": n.ariaLabelledBy,
|
|
590
|
+
"aria-describedby": n.ariaDescribedBy || Ye,
|
|
591
|
+
"aria-controls": Le,
|
|
592
|
+
id: n.id,
|
|
593
|
+
title: n.title
|
|
594
594
|
},
|
|
595
595
|
Gt,
|
|
596
|
-
|
|
596
|
+
je && /* @__PURE__ */ i.createElement(Zt, { className: C(L.loadingIcon({ c: te })), name: "loading" }),
|
|
597
597
|
/* @__PURE__ */ i.createElement(
|
|
598
|
-
|
|
598
|
+
at,
|
|
599
599
|
{
|
|
600
600
|
tabIndex: -1,
|
|
601
601
|
type: "button",
|
|
602
602
|
"aria-label": Ot,
|
|
603
|
-
size:
|
|
604
|
-
fillMode:
|
|
605
|
-
className:
|
|
603
|
+
size: J,
|
|
604
|
+
fillMode: ve,
|
|
605
|
+
className: C(L.inputButton({ c: te })),
|
|
606
606
|
rounded: null,
|
|
607
607
|
themeColor: "base",
|
|
608
|
-
iconClass:
|
|
609
|
-
svgIcon:
|
|
608
|
+
iconClass: Je,
|
|
609
|
+
svgIcon: Je ? void 0 : Bt || rn,
|
|
610
610
|
onMouseDown: (e) => p.focused && e.preventDefault()
|
|
611
611
|
}
|
|
612
612
|
),
|
|
613
613
|
It(se),
|
|
614
|
-
!
|
|
615
|
-
),
|
|
616
|
-
return
|
|
614
|
+
!Ne && kt()
|
|
615
|
+
), Ne && St());
|
|
616
|
+
return be ? /* @__PURE__ */ i.createElement(
|
|
617
617
|
nn,
|
|
618
618
|
{
|
|
619
|
-
label:
|
|
620
|
-
editorValue:
|
|
621
|
-
editorValid:
|
|
622
|
-
editorDisabled:
|
|
623
|
-
style: { width:
|
|
624
|
-
children:
|
|
619
|
+
label: be,
|
|
620
|
+
editorValue: Me,
|
|
621
|
+
editorValid: Xe,
|
|
622
|
+
editorDisabled: n.disabled,
|
|
623
|
+
style: { width: ie ? ie.width : void 0 },
|
|
624
|
+
children: Re
|
|
625
625
|
}
|
|
626
|
-
) :
|
|
626
|
+
) : Re;
|
|
627
627
|
});
|
|
628
|
-
|
|
629
|
-
delay:
|
|
630
|
-
ignoreCase:
|
|
631
|
-
iconClassName:
|
|
628
|
+
Ke.propTypes = {
|
|
629
|
+
delay: E.number,
|
|
630
|
+
ignoreCase: E.bool,
|
|
631
|
+
iconClassName: E.string,
|
|
632
632
|
svgIcon: Rt,
|
|
633
|
-
defaultItem:
|
|
634
|
-
valueRender:
|
|
635
|
-
valueMap:
|
|
636
|
-
validationMessage:
|
|
637
|
-
required:
|
|
638
|
-
id:
|
|
639
|
-
ariaLabelledBy:
|
|
640
|
-
ariaDescribedBy:
|
|
641
|
-
ariaLabel:
|
|
642
|
-
leftRightKeysNavigation:
|
|
643
|
-
title:
|
|
644
|
-
groupField:
|
|
645
|
-
list:
|
|
646
|
-
skipDisabledItems:
|
|
633
|
+
defaultItem: E.any,
|
|
634
|
+
valueRender: E.func,
|
|
635
|
+
valueMap: E.func,
|
|
636
|
+
validationMessage: E.string,
|
|
637
|
+
required: E.bool,
|
|
638
|
+
id: E.string,
|
|
639
|
+
ariaLabelledBy: E.string,
|
|
640
|
+
ariaDescribedBy: E.string,
|
|
641
|
+
ariaLabel: E.string,
|
|
642
|
+
leftRightKeysNavigation: E.bool,
|
|
643
|
+
title: E.string,
|
|
644
|
+
groupField: E.string,
|
|
645
|
+
list: E.any,
|
|
646
|
+
skipDisabledItems: E.bool
|
|
647
647
|
};
|
|
648
|
-
const
|
|
648
|
+
const T = {
|
|
649
649
|
delay: 500,
|
|
650
650
|
tabIndex: 0,
|
|
651
651
|
ignoreCase: !0,
|
|
652
|
-
...
|
|
652
|
+
...lt.defaultProps,
|
|
653
653
|
required: !1,
|
|
654
654
|
size: "medium",
|
|
655
655
|
rounded: "medium",
|
|
656
656
|
fillMode: "solid",
|
|
657
657
|
groupMode: "modern"
|
|
658
658
|
};
|
|
659
|
-
|
|
659
|
+
Ke.displayName = "KendoReactDropDownList";
|
|
660
660
|
const wn = en();
|
|
661
|
-
|
|
661
|
+
Ke.displayName = "KendoReactDropDownList";
|
|
662
662
|
export {
|
|
663
|
-
|
|
663
|
+
Ke as DropDownList,
|
|
664
664
|
wn as DropDownListPropsContext,
|
|
665
|
-
|
|
665
|
+
T as dropDownListDefaultProps
|
|
666
666
|
};
|