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