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