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