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