@progress/kendo-react-dropdowns 9.2.0-develop.4 → 9.2.0-develop.6
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,26 +8,26 @@
|
|
|
8
8
|
"use client";
|
|
9
9
|
import * as t from "react";
|
|
10
10
|
import n from "prop-types";
|
|
11
|
-
import { createPropsContext as
|
|
12
|
-
import { Popup as
|
|
13
|
-
import { useLocalization as
|
|
14
|
-
import { TreeView as
|
|
15
|
-
import { packageMetadata as
|
|
16
|
-
import { getItemValue as
|
|
11
|
+
import { createPropsContext as Ye, validatePackage as Ze, usePropsContext as et, useId as tt, getTabIndex as nt, useRtl as ot, useAdaptiveModeContext as at, canUseDOM as rt, Keys as c, noop as j, mapTree as it, extendDataItem as lt, classNames as ae, IconWrap as Fe, kendoThemeMaps as st } from "@progress/kendo-react-common";
|
|
12
|
+
import { Popup as ct } from "@progress/kendo-react-popup";
|
|
13
|
+
import { useLocalization as ut } from "@progress/kendo-react-intl";
|
|
14
|
+
import { TreeView as De } from "@progress/kendo-react-treeview";
|
|
15
|
+
import { packageMetadata as dt } from "../package-metadata.mjs";
|
|
16
|
+
import { getItemValue as pt, areSame as Ie, isPresent as mt } from "../common/utils.mjs";
|
|
17
17
|
import { useDropdownWidth as ft } from "./useDropdownWidth.mjs";
|
|
18
|
-
import { ListNoData as
|
|
19
|
-
import { clear as
|
|
20
|
-
import { FloatingLabel as
|
|
21
|
-
import
|
|
22
|
-
import { Button as
|
|
23
|
-
import { xIcon as
|
|
24
|
-
import { AdaptiveMode as
|
|
18
|
+
import { ListNoData as vt } from "./ListNoData.mjs";
|
|
19
|
+
import { clear as Se, messages as re, nodata as G } from "../messages/index.mjs";
|
|
20
|
+
import { FloatingLabel as gt } from "@progress/kendo-react-labels";
|
|
21
|
+
import Me from "../common/ListFilter.mjs";
|
|
22
|
+
import { Button as bt } from "@progress/kendo-react-buttons";
|
|
23
|
+
import { xIcon as ht, caretAltDownIcon as yt } from "@progress/kendo-svg-icons";
|
|
24
|
+
import { AdaptiveMode as Ct } from "../common/AdaptiveMode.mjs";
|
|
25
25
|
import { ActionSheetContent as Et } from "@progress/kendo-react-layout";
|
|
26
|
-
const { sizeMap:
|
|
27
|
-
const { validationMessage: r, valid:
|
|
26
|
+
const { sizeMap: kt, roundedMap: xt } = st, wt = "Please select a value from the list!", Ft = (C) => /* @__PURE__ */ t.createElement("span", { className: "k-input-value-text" }, C.children), Re = (C) => C.split("_").map((D) => parseInt(D, 10)), Dt = (C, D) => {
|
|
27
|
+
const { validationMessage: r, valid: a, required: U } = C;
|
|
28
28
|
return {
|
|
29
29
|
customError: r !== void 0,
|
|
30
|
-
valid: !!(
|
|
30
|
+
valid: !!(a !== void 0 ? a : !U || D),
|
|
31
31
|
valueMissing: !D
|
|
32
32
|
};
|
|
33
33
|
}, ie = {
|
|
@@ -45,60 +45,60 @@ const { sizeMap: Ct, roundedMap: kt } = lt, xt = "Please select a value from the
|
|
|
45
45
|
size: "medium",
|
|
46
46
|
rounded: "medium",
|
|
47
47
|
fillMode: "solid"
|
|
48
|
-
},
|
|
49
|
-
|
|
50
|
-
const r =
|
|
48
|
+
}, It = Ye(), Te = t.forwardRef((C, D) => {
|
|
49
|
+
Ze(dt);
|
|
50
|
+
const r = et(It, C), a = {
|
|
51
51
|
...ie,
|
|
52
52
|
...r
|
|
53
|
-
},
|
|
53
|
+
}, U = tt(), le = a.id || U, {
|
|
54
54
|
data: T,
|
|
55
|
-
dataItemKey:
|
|
55
|
+
dataItemKey: N,
|
|
56
56
|
popupSettings: b = {},
|
|
57
|
-
style:
|
|
57
|
+
style: P,
|
|
58
58
|
opened: u,
|
|
59
59
|
disabled: I,
|
|
60
|
-
onOpen: V =
|
|
61
|
-
onClose:
|
|
60
|
+
onOpen: V = j,
|
|
61
|
+
onClose: m = j,
|
|
62
62
|
placeholder: J,
|
|
63
63
|
label: K,
|
|
64
|
-
name:
|
|
64
|
+
name: Ne,
|
|
65
65
|
selectField: z,
|
|
66
66
|
subItemsField: O,
|
|
67
67
|
validationMessage: H,
|
|
68
68
|
valid: Pe,
|
|
69
69
|
required: Q,
|
|
70
|
-
validityStyles:
|
|
71
|
-
} =
|
|
70
|
+
validityStyles: Ve
|
|
71
|
+
} = a, X = nt(a.tabIndex, I), i = t.useRef(null), f = t.useRef(null), S = t.useRef(null), Y = t.useRef(null), $ = t.useRef(null), h = t.useRef(null), _ = t.useRef(!1), [se, Ke] = t.useState(void 0), E = a.value !== void 0, v = E ? a.value : se !== void 0 ? se : a.defaultValue, L = mt(v), Z = L ? pt(v, a.textField) : "", ee = Dt({ validationMessage: H, valid: Pe, required: Q }, L), Oe = t.useCallback(() => f.current && f.current.focus(), []);
|
|
72
72
|
t.useImperativeHandle(i, () => ({
|
|
73
|
-
props:
|
|
74
|
-
element:
|
|
75
|
-
focus:
|
|
73
|
+
props: a,
|
|
74
|
+
element: f.current,
|
|
75
|
+
focus: Oe
|
|
76
76
|
})), t.useImperativeHandle(D, () => i.current);
|
|
77
|
-
const k =
|
|
77
|
+
const k = ot(f, a.dir), Le = {
|
|
78
78
|
width: ft(
|
|
79
|
-
|
|
79
|
+
f,
|
|
80
80
|
ie,
|
|
81
81
|
{ ...ie.popupSettings, ...b },
|
|
82
|
-
|
|
82
|
+
P
|
|
83
83
|
),
|
|
84
84
|
...k !== void 0 ? { direction: k } : {}
|
|
85
|
-
}, [
|
|
86
|
-
|
|
87
|
-
ee.valid ? "" : H === void 0 ?
|
|
85
|
+
}, [Be, ce] = t.useState(!1), l = u !== void 0 ? u : Be, [d, te] = t.useState(!1), [ne, We] = t.useState(), [ue, qe] = t.useState(""), de = at(), x = !!(ne && de && ne <= de.medium && a.adaptive), Ae = t.useCallback(() => {
|
|
86
|
+
$.current && $.current.setCustomValidity && $.current.setCustomValidity(
|
|
87
|
+
ee.valid ? "" : H === void 0 ? wt : H
|
|
88
88
|
);
|
|
89
89
|
}, [H, ee]);
|
|
90
|
-
t.useEffect(
|
|
91
|
-
const e =
|
|
90
|
+
t.useEffect(Ae), t.useEffect(() => {
|
|
91
|
+
const e = rt && window.ResizeObserver && new window.ResizeObserver(Qe.bind(void 0));
|
|
92
92
|
return document != null && document.body && e && e.observe(document.body), () => {
|
|
93
93
|
document != null && document.body && e && e.disconnect();
|
|
94
94
|
};
|
|
95
95
|
}, []);
|
|
96
|
-
const
|
|
96
|
+
const pe = t.useCallback(
|
|
97
97
|
(e) => {
|
|
98
98
|
if (!l) {
|
|
99
99
|
if (V) {
|
|
100
|
-
const
|
|
101
|
-
V.call(void 0,
|
|
100
|
+
const o = { ...e };
|
|
101
|
+
V.call(void 0, o);
|
|
102
102
|
}
|
|
103
103
|
u === void 0 && ce(!0);
|
|
104
104
|
}
|
|
@@ -107,36 +107,36 @@ const { sizeMap: Ct, roundedMap: kt } = lt, xt = "Please select a value from the
|
|
|
107
107
|
), w = t.useCallback(
|
|
108
108
|
(e) => {
|
|
109
109
|
if (l) {
|
|
110
|
-
if (
|
|
111
|
-
const
|
|
112
|
-
|
|
110
|
+
if (m) {
|
|
111
|
+
const o = { ...e };
|
|
112
|
+
m.call(void 0, o);
|
|
113
113
|
}
|
|
114
114
|
u === void 0 && (ce(!1), x && setTimeout(() => {
|
|
115
|
-
var
|
|
116
|
-
g((
|
|
115
|
+
var o;
|
|
116
|
+
g((o = Y.current) == null ? void 0 : o.element);
|
|
117
117
|
}, 300));
|
|
118
118
|
}
|
|
119
119
|
},
|
|
120
|
-
[l, u,
|
|
121
|
-
),
|
|
120
|
+
[l, u, m, x]
|
|
121
|
+
), ze = t.useCallback(
|
|
122
122
|
(e) => {
|
|
123
123
|
if (!e.isDefaultPrevented() && i.current) {
|
|
124
124
|
te(!0);
|
|
125
|
-
const
|
|
125
|
+
const o = {
|
|
126
126
|
syntheticEvent: e,
|
|
127
127
|
nativeEvent: e.nativeEvent,
|
|
128
128
|
target: i.current
|
|
129
129
|
};
|
|
130
|
-
(l ? w :
|
|
130
|
+
(l ? w : pe)(o);
|
|
131
131
|
}
|
|
132
132
|
},
|
|
133
|
-
[l, u, V,
|
|
133
|
+
[l, u, V, m]
|
|
134
134
|
), M = t.useCallback((e) => {
|
|
135
|
-
|
|
136
|
-
}, []),
|
|
135
|
+
_.current = !0, e(), window.setTimeout(() => _.current = !1, 0);
|
|
136
|
+
}, []), He = t.useCallback(
|
|
137
137
|
(e) => {
|
|
138
|
-
var F,
|
|
139
|
-
const { keyCode:
|
|
138
|
+
var F, xe;
|
|
139
|
+
const { keyCode: o, altKey: s } = e, p = h.current && h.current.element;
|
|
140
140
|
if (!i.current || e.isDefaultPrevented() && ((F = S.current) == null ? void 0 : F.element) === e.target)
|
|
141
141
|
return;
|
|
142
142
|
const R = {
|
|
@@ -145,120 +145,120 @@ const { sizeMap: Ct, roundedMap: kt } = lt, xt = "Please select a value from the
|
|
|
145
145
|
target: i.current
|
|
146
146
|
};
|
|
147
147
|
if (l)
|
|
148
|
-
if (
|
|
148
|
+
if (o === c.esc || s && o === c.up)
|
|
149
149
|
e.preventDefault(), w(R);
|
|
150
|
-
else if (p && p.querySelector(".k-focus") && (
|
|
151
|
-
if (
|
|
152
|
-
const
|
|
153
|
-
if (
|
|
150
|
+
else if (p && p.querySelector(".k-focus") && (o === c.up || o === c.down || o === c.left || o === c.right || o === c.home || o === c.end)) {
|
|
151
|
+
if (o === c.up && ((xe = S.current) != null && xe.element)) {
|
|
152
|
+
const q = Array.from(p.querySelectorAll(".k-treeview-item")), we = [...q].reverse().find((A) => !!(A && A.querySelector(".k-focus")));
|
|
153
|
+
if (we && q.indexOf(we) === 0)
|
|
154
154
|
return M(() => {
|
|
155
|
-
var
|
|
156
|
-
g((
|
|
155
|
+
var A;
|
|
156
|
+
g((A = S.current) == null ? void 0 : A.element);
|
|
157
157
|
});
|
|
158
158
|
}
|
|
159
|
-
M(
|
|
159
|
+
M(j);
|
|
160
160
|
} else
|
|
161
|
-
|
|
162
|
-
var
|
|
163
|
-
g(((
|
|
161
|
+
o === c.down && M(() => {
|
|
162
|
+
var q;
|
|
163
|
+
g(((q = S.current) == null ? void 0 : q.element) || p);
|
|
164
164
|
});
|
|
165
165
|
else
|
|
166
|
-
s &&
|
|
166
|
+
s && o === c.down ? (e.preventDefault(), pe(R)) : l || o === c.esc && ge(e);
|
|
167
167
|
},
|
|
168
|
-
[l, u, V,
|
|
169
|
-
),
|
|
170
|
-
const { keyCode:
|
|
171
|
-
s ||
|
|
172
|
-
|
|
173
|
-
g(
|
|
168
|
+
[l, u, V, m]
|
|
169
|
+
), me = t.useCallback((e) => {
|
|
170
|
+
const { keyCode: o, altKey: s } = e;
|
|
171
|
+
s || o !== c.up && o !== c.down || (e.preventDefault(), M(
|
|
172
|
+
o === c.up ? () => {
|
|
173
|
+
g(f.current);
|
|
174
174
|
} : () => {
|
|
175
175
|
g(h.current && h.current.element);
|
|
176
176
|
}
|
|
177
177
|
));
|
|
178
178
|
}, []), g = t.useCallback((e) => {
|
|
179
179
|
e && M(() => e.focus());
|
|
180
|
-
}, []),
|
|
180
|
+
}, []), $e = t.useCallback(() => {
|
|
181
181
|
var e;
|
|
182
182
|
!d && l && !u ? w({ target: i.current }) : r.filterable ? g((e = S.current) == null ? void 0 : e.element) : g(h.current && h.current.element);
|
|
183
|
-
}, [
|
|
184
|
-
d && g(
|
|
185
|
-
}, [d]),
|
|
183
|
+
}, [m, r.filterable, d, u, l]), _e = t.useCallback(() => {
|
|
184
|
+
d && g(f.current);
|
|
185
|
+
}, [d]), je = t.useCallback(
|
|
186
186
|
(e) => {
|
|
187
|
-
if (!d &&
|
|
188
|
-
const
|
|
187
|
+
if (!d && !_.current && (te(!0), r.onFocus && i.current)) {
|
|
188
|
+
const o = {
|
|
189
189
|
syntheticEvent: e,
|
|
190
190
|
nativeEvent: e.nativeEvent,
|
|
191
191
|
target: i.current
|
|
192
192
|
};
|
|
193
|
-
r.onFocus.call(void 0,
|
|
193
|
+
r.onFocus.call(void 0, o);
|
|
194
194
|
}
|
|
195
195
|
},
|
|
196
196
|
[d, r.onFocus]
|
|
197
|
-
),
|
|
197
|
+
), Ge = t.useCallback(
|
|
198
198
|
(e) => {
|
|
199
|
-
if (d &&
|
|
199
|
+
if (d && !_.current && i.current) {
|
|
200
200
|
te(!1);
|
|
201
|
-
const
|
|
201
|
+
const o = {
|
|
202
202
|
syntheticEvent: e,
|
|
203
203
|
nativeEvent: e.nativeEvent,
|
|
204
204
|
target: i.current
|
|
205
205
|
};
|
|
206
206
|
if (r.onBlur) {
|
|
207
|
-
const s = { ...
|
|
207
|
+
const s = { ...o };
|
|
208
208
|
r.onBlur.call(void 0, s);
|
|
209
209
|
}
|
|
210
|
-
x || w(
|
|
210
|
+
x || w(o);
|
|
211
211
|
}
|
|
212
212
|
},
|
|
213
|
-
[d, r.onBlur, l, u,
|
|
214
|
-
),
|
|
215
|
-
d && M(
|
|
213
|
+
[d, r.onBlur, l, u, m]
|
|
214
|
+
), Ue = t.useCallback(() => {
|
|
215
|
+
d && M(j), x && setTimeout(() => {
|
|
216
216
|
var e;
|
|
217
217
|
g((e = Y.current) == null ? void 0 : e.element);
|
|
218
218
|
}, 300);
|
|
219
219
|
}, [d, x]), fe = t.useCallback(
|
|
220
|
-
(e,
|
|
220
|
+
(e, o, s) => {
|
|
221
221
|
if (r.onChange) {
|
|
222
222
|
const p = {
|
|
223
|
-
value:
|
|
224
|
-
level: s ?
|
|
223
|
+
value: o,
|
|
224
|
+
level: s ? Re(s) : [],
|
|
225
225
|
...e
|
|
226
226
|
};
|
|
227
227
|
r.onChange.call(void 0, p);
|
|
228
228
|
}
|
|
229
|
-
|
|
229
|
+
E || Ke(o);
|
|
230
230
|
},
|
|
231
|
-
[r.onChange,
|
|
232
|
-
),
|
|
231
|
+
[r.onChange, E]
|
|
232
|
+
), ve = t.useCallback(
|
|
233
233
|
(e) => {
|
|
234
|
-
if (
|
|
234
|
+
if (Ie(e.item, v, N) || !i.current)
|
|
235
235
|
return;
|
|
236
|
-
const { item:
|
|
236
|
+
const { item: o, itemHierarchicalIndex: s, nativeEvent: p, syntheticEvent: R } = e, F = {
|
|
237
237
|
syntheticEvent: R,
|
|
238
238
|
nativeEvent: p,
|
|
239
239
|
target: i.current
|
|
240
240
|
};
|
|
241
|
-
fe(F,
|
|
241
|
+
fe(F, o, s), w(F);
|
|
242
242
|
},
|
|
243
|
-
[
|
|
244
|
-
),
|
|
243
|
+
[E, v, r.onChange, N, l, u, m]
|
|
244
|
+
), ge = t.useCallback(
|
|
245
245
|
(e) => {
|
|
246
246
|
if (!i.current)
|
|
247
247
|
return;
|
|
248
|
-
const
|
|
248
|
+
const o = {
|
|
249
249
|
syntheticEvent: e,
|
|
250
250
|
nativeEvent: e.nativeEvent,
|
|
251
251
|
target: i.current
|
|
252
252
|
};
|
|
253
|
-
fe(
|
|
253
|
+
fe(o, null), w(o), e.preventDefault();
|
|
254
254
|
},
|
|
255
|
-
[
|
|
256
|
-
),
|
|
255
|
+
[E, r.onChange, l, u, m]
|
|
256
|
+
), be = t.useCallback(
|
|
257
257
|
(e) => {
|
|
258
258
|
if (e.syntheticEvent.stopPropagation(), r.onExpandChange && i.current) {
|
|
259
|
-
const { item:
|
|
260
|
-
level:
|
|
261
|
-
item:
|
|
259
|
+
const { item: o, itemHierarchicalIndex: s, nativeEvent: p, syntheticEvent: R } = e, F = {
|
|
260
|
+
level: Re(s),
|
|
261
|
+
item: o,
|
|
262
262
|
nativeEvent: p,
|
|
263
263
|
syntheticEvent: R,
|
|
264
264
|
target: i.current
|
|
@@ -267,7 +267,7 @@ const { sizeMap: Ct, roundedMap: kt } = lt, xt = "Please select a value from the
|
|
|
267
267
|
}
|
|
268
268
|
},
|
|
269
269
|
[r.onExpandChange]
|
|
270
|
-
),
|
|
270
|
+
), he = t.useCallback(
|
|
271
271
|
(e) => {
|
|
272
272
|
if (r.onFilterChange && i.current) {
|
|
273
273
|
const s = {
|
|
@@ -280,181 +280,181 @@ const { sizeMap: Ct, roundedMap: kt } = lt, xt = "Please select a value from the
|
|
|
280
280
|
nativeEvent: e.nativeEvent,
|
|
281
281
|
target: i.current
|
|
282
282
|
};
|
|
283
|
-
r.onFilterChange.call(void 0, s), r.filter === void 0 &&
|
|
283
|
+
r.onFilterChange.call(void 0, s), r.filter === void 0 && qe(e.target.value);
|
|
284
284
|
}
|
|
285
285
|
},
|
|
286
286
|
[r.onFilterChange, r.filter, r.textField]
|
|
287
|
-
),
|
|
288
|
-
const e =
|
|
289
|
-
|
|
287
|
+
), Je = () => {
|
|
288
|
+
const e = a.filterable ? /* @__PURE__ */ t.createElement(
|
|
289
|
+
Me,
|
|
290
290
|
{
|
|
291
|
-
value:
|
|
291
|
+
value: a.filter === void 0 ? ue : a.filter,
|
|
292
292
|
ref: Y,
|
|
293
|
-
onChange:
|
|
294
|
-
onKeyDown:
|
|
293
|
+
onChange: he,
|
|
294
|
+
onKeyDown: me,
|
|
295
295
|
size: y,
|
|
296
296
|
rounded: B,
|
|
297
|
-
fillMode:
|
|
297
|
+
fillMode: W
|
|
298
298
|
}
|
|
299
|
-
) : null,
|
|
300
|
-
title:
|
|
299
|
+
) : null, o = {
|
|
300
|
+
title: a.adaptiveTitle,
|
|
301
301
|
expand: l,
|
|
302
302
|
onClose: (s) => w(s),
|
|
303
303
|
windowWidth: ne,
|
|
304
304
|
mobileFilter: e
|
|
305
305
|
};
|
|
306
|
-
return /* @__PURE__ */ t.createElement(
|
|
307
|
-
|
|
306
|
+
return /* @__PURE__ */ t.createElement(Ct, { ...o }, /* @__PURE__ */ t.createElement(Et, { overflowHidden: !0 }, /* @__PURE__ */ t.createElement("div", { className: "k-list-container" }, /* @__PURE__ */ t.createElement("div", { className: "k-list k-list-lg" }, T.length > 0 ? /* @__PURE__ */ t.createElement(
|
|
307
|
+
De,
|
|
308
308
|
{
|
|
309
309
|
ref: h,
|
|
310
310
|
tabIndex: X,
|
|
311
|
-
data:
|
|
312
|
-
focusIdField:
|
|
313
|
-
textField:
|
|
311
|
+
data: ye,
|
|
312
|
+
focusIdField: N,
|
|
313
|
+
textField: a.textField,
|
|
314
314
|
selectField: z,
|
|
315
|
-
expandField:
|
|
315
|
+
expandField: a.expandField,
|
|
316
316
|
childrenField: O,
|
|
317
317
|
expandIcons: !0,
|
|
318
|
-
onItemClick:
|
|
319
|
-
onExpandChange:
|
|
318
|
+
onItemClick: ve,
|
|
319
|
+
onExpandChange: be,
|
|
320
320
|
size: y,
|
|
321
|
-
item:
|
|
321
|
+
item: a.item,
|
|
322
322
|
dir: k,
|
|
323
323
|
animate: b.animate
|
|
324
324
|
}
|
|
325
|
-
) : /* @__PURE__ */ t.createElement(
|
|
326
|
-
},
|
|
327
|
-
for (const
|
|
328
|
-
|
|
329
|
-
}, []),
|
|
325
|
+
) : /* @__PURE__ */ t.createElement(Ce, null, oe.toLanguageString(G, re[G]))))));
|
|
326
|
+
}, Qe = t.useCallback((e) => {
|
|
327
|
+
for (const o of e)
|
|
328
|
+
We(o.target.clientWidth);
|
|
329
|
+
}, []), ye = t.useMemo(() => E || !L ? T : it(
|
|
330
330
|
T,
|
|
331
331
|
O,
|
|
332
|
-
(e) =>
|
|
333
|
-
), [T, v,
|
|
332
|
+
(e) => lt(e, O, { [z]: Ie(e, v, N) })
|
|
333
|
+
), [T, v, E, L, z, O]), Ce = a.listNoData || vt, Xe = a.valueHolder || Ft, oe = ut(), Ee = !Ve || ee.valid, { size: y, rounded: B, fillMode: W } = a, ke = /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement(
|
|
334
334
|
"span",
|
|
335
335
|
{
|
|
336
|
-
className:
|
|
337
|
-
[`k-picker-${
|
|
338
|
-
[`k-rounded-${
|
|
339
|
-
[`k-picker-${
|
|
336
|
+
className: ae("k-dropdowntree k-picker", a.className, {
|
|
337
|
+
[`k-picker-${kt[y] || y}`]: y,
|
|
338
|
+
[`k-rounded-${xt[B] || B}`]: B,
|
|
339
|
+
[`k-picker-${W}`]: W,
|
|
340
340
|
"k-focus": d,
|
|
341
341
|
"k-invalid": !Ee,
|
|
342
|
-
"k-loading":
|
|
342
|
+
"k-loading": a.loading,
|
|
343
343
|
"k-required": Q,
|
|
344
|
-
"k-disabled":
|
|
344
|
+
"k-disabled": a.disabled
|
|
345
345
|
}),
|
|
346
346
|
tabIndex: X,
|
|
347
|
-
accessKey:
|
|
347
|
+
accessKey: a.accessKey,
|
|
348
348
|
id: le,
|
|
349
|
-
style: K ? { ...
|
|
349
|
+
style: K ? { ...P, width: void 0 } : P,
|
|
350
350
|
dir: k,
|
|
351
|
-
ref:
|
|
352
|
-
onKeyDown: I ? void 0 :
|
|
353
|
-
onMouseDown:
|
|
354
|
-
onClick: I ? void 0 :
|
|
355
|
-
onFocus:
|
|
356
|
-
onBlur:
|
|
351
|
+
ref: f,
|
|
352
|
+
onKeyDown: I ? void 0 : He,
|
|
353
|
+
onMouseDown: Ue,
|
|
354
|
+
onClick: I ? void 0 : ze,
|
|
355
|
+
onFocus: je,
|
|
356
|
+
onBlur: Ge,
|
|
357
357
|
role: "combobox",
|
|
358
358
|
"aria-haspopup": "tree",
|
|
359
359
|
"aria-expanded": l,
|
|
360
360
|
"aria-disabled": I,
|
|
361
361
|
"aria-label": K,
|
|
362
|
-
"aria-labelledby":
|
|
363
|
-
"aria-describedby":
|
|
362
|
+
"aria-labelledby": a.ariaLabelledBy,
|
|
363
|
+
"aria-describedby": a.ariaDescribedBy,
|
|
364
364
|
"aria-required": Q
|
|
365
365
|
},
|
|
366
|
-
/* @__PURE__ */ t.createElement("span", { className: "k-input-inner" }, (Z || J) && /* @__PURE__ */ t.createElement(
|
|
367
|
-
|
|
368
|
-
|
|
366
|
+
/* @__PURE__ */ t.createElement("span", { className: "k-input-inner" }, (Z || J) && /* @__PURE__ */ t.createElement(Xe, { item: v }, Z || J)),
|
|
367
|
+
a.loading && /* @__PURE__ */ t.createElement(Fe, { className: "k-input-loading-icon", name: "loading" }),
|
|
368
|
+
L && !I && /* @__PURE__ */ t.createElement(
|
|
369
369
|
"span",
|
|
370
370
|
{
|
|
371
|
-
onClick:
|
|
371
|
+
onClick: ge,
|
|
372
372
|
className: "k-clear-value",
|
|
373
|
-
title:
|
|
373
|
+
title: oe.toLanguageString(Se, re[Se]),
|
|
374
374
|
role: "button",
|
|
375
375
|
tabIndex: -1,
|
|
376
376
|
onMouseDown: (e) => e.preventDefault()
|
|
377
377
|
},
|
|
378
|
-
/* @__PURE__ */ t.createElement(
|
|
378
|
+
/* @__PURE__ */ t.createElement(Fe, { name: "x", icon: ht })
|
|
379
379
|
),
|
|
380
380
|
/* @__PURE__ */ t.createElement(
|
|
381
|
-
|
|
381
|
+
bt,
|
|
382
382
|
{
|
|
383
383
|
tabIndex: -1,
|
|
384
384
|
type: "button",
|
|
385
385
|
"aria-label": "select",
|
|
386
386
|
className: "k-input-button",
|
|
387
387
|
size: y,
|
|
388
|
-
fillMode:
|
|
388
|
+
fillMode: W,
|
|
389
389
|
themeColor: "base",
|
|
390
390
|
rounded: null,
|
|
391
391
|
icon: "caret-alt-down",
|
|
392
|
-
svgIcon:
|
|
392
|
+
svgIcon: yt
|
|
393
393
|
}
|
|
394
394
|
),
|
|
395
395
|
/* @__PURE__ */ t.createElement(
|
|
396
396
|
"select",
|
|
397
397
|
{
|
|
398
|
-
name:
|
|
399
|
-
ref:
|
|
398
|
+
name: Ne,
|
|
399
|
+
ref: $,
|
|
400
400
|
tabIndex: -1,
|
|
401
401
|
"aria-hidden": !0,
|
|
402
402
|
title: K,
|
|
403
403
|
style: { opacity: 0, width: 1, border: 0, zIndex: -1, position: "absolute", left: "50%" }
|
|
404
404
|
},
|
|
405
|
-
/* @__PURE__ */ t.createElement("option", { value:
|
|
405
|
+
/* @__PURE__ */ t.createElement("option", { value: a.valueMap ? a.valueMap.call(void 0, v) : v })
|
|
406
406
|
),
|
|
407
407
|
!x && /* @__PURE__ */ t.createElement(
|
|
408
|
-
|
|
408
|
+
ct,
|
|
409
409
|
{
|
|
410
410
|
...b,
|
|
411
|
-
className:
|
|
412
|
-
popupClass:
|
|
413
|
-
style:
|
|
414
|
-
anchor: b.anchor ||
|
|
411
|
+
className: ae(b.className, { "k-rtl": k === "rtl" }),
|
|
412
|
+
popupClass: ae(b.popupClass, "k-dropdowntree-popup k-list-container"),
|
|
413
|
+
style: Le,
|
|
414
|
+
anchor: b.anchor || f.current,
|
|
415
415
|
show: l,
|
|
416
|
-
onOpen:
|
|
416
|
+
onOpen: $e,
|
|
417
417
|
onClose: _e
|
|
418
418
|
},
|
|
419
|
-
|
|
420
|
-
|
|
419
|
+
a.filterable && /* @__PURE__ */ t.createElement(
|
|
420
|
+
Me,
|
|
421
421
|
{
|
|
422
|
-
value:
|
|
422
|
+
value: a.filter === void 0 ? ue : a.filter,
|
|
423
423
|
ref: S,
|
|
424
|
-
onChange:
|
|
425
|
-
onKeyDown:
|
|
424
|
+
onChange: he,
|
|
425
|
+
onKeyDown: me,
|
|
426
426
|
size: y,
|
|
427
427
|
rounded: B,
|
|
428
|
-
fillMode:
|
|
428
|
+
fillMode: W,
|
|
429
429
|
renderListFilterWrapper: !0,
|
|
430
430
|
renderPrefixSeparator: !0
|
|
431
431
|
}
|
|
432
432
|
),
|
|
433
433
|
T.length > 0 ? /* @__PURE__ */ t.createElement(
|
|
434
|
-
|
|
434
|
+
De,
|
|
435
435
|
{
|
|
436
436
|
style: { height: b.height },
|
|
437
437
|
ref: h,
|
|
438
438
|
tabIndex: X,
|
|
439
|
-
data:
|
|
440
|
-
focusIdField:
|
|
441
|
-
textField:
|
|
439
|
+
data: ye,
|
|
440
|
+
focusIdField: N,
|
|
441
|
+
textField: a.textField,
|
|
442
442
|
selectField: z,
|
|
443
|
-
expandField:
|
|
443
|
+
expandField: a.expandField,
|
|
444
444
|
childrenField: O,
|
|
445
445
|
expandIcons: !0,
|
|
446
|
-
onItemClick:
|
|
447
|
-
onExpandChange:
|
|
446
|
+
onItemClick: ve,
|
|
447
|
+
onExpandChange: be,
|
|
448
448
|
size: y,
|
|
449
|
-
item:
|
|
449
|
+
item: a.item,
|
|
450
450
|
dir: k,
|
|
451
451
|
animate: b.animate
|
|
452
452
|
}
|
|
453
|
-
) : /* @__PURE__ */ t.createElement(
|
|
453
|
+
) : /* @__PURE__ */ t.createElement(Ce, null, oe.toLanguageString(G, re[G]))
|
|
454
454
|
)
|
|
455
|
-
), x &&
|
|
455
|
+
), x && Je());
|
|
456
456
|
return K ? /* @__PURE__ */ t.createElement(
|
|
457
|
-
|
|
457
|
+
gt,
|
|
458
458
|
{
|
|
459
459
|
label: K,
|
|
460
460
|
editorValue: Z,
|
|
@@ -462,12 +462,12 @@ const { sizeMap: Ct, roundedMap: kt } = lt, xt = "Please select a value from the
|
|
|
462
462
|
editorValid: Ee,
|
|
463
463
|
editorDisabled: I,
|
|
464
464
|
editorId: le,
|
|
465
|
-
style: { width:
|
|
466
|
-
children:
|
|
465
|
+
style: { width: P ? P.width : void 0 },
|
|
466
|
+
children: ke,
|
|
467
467
|
dir: k
|
|
468
468
|
}
|
|
469
|
-
) :
|
|
470
|
-
}),
|
|
469
|
+
) : ke;
|
|
470
|
+
}), St = {
|
|
471
471
|
opened: n.bool,
|
|
472
472
|
disabled: n.bool,
|
|
473
473
|
dir: n.string,
|
|
@@ -523,9 +523,9 @@ const { sizeMap: Ct, roundedMap: kt } = lt, xt = "Please select a value from the
|
|
|
523
523
|
adaptiveTitle: n.string,
|
|
524
524
|
adaptive: n.bool
|
|
525
525
|
};
|
|
526
|
-
|
|
527
|
-
|
|
526
|
+
Te.displayName = "KendoReactDropDownTree";
|
|
527
|
+
Te.propTypes = St;
|
|
528
528
|
export {
|
|
529
|
-
|
|
530
|
-
|
|
529
|
+
Te as DropDownTree,
|
|
530
|
+
It as DropDownTreePropsContext
|
|
531
531
|
};
|