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