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