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