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