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