@progress/kendo-react-dropdowns 8.4.0-develop.3 → 8.4.0-develop.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ComboBox/ComboBox.js +1 -1
- package/ComboBox/ComboBox.mjs +284 -283
- package/DropDownList/DropDownList.js +1 -1
- package/DropDownList/DropDownList.mjs +1 -1
- package/common/SearchBar.js +1 -1
- package/common/SearchBar.mjs +19 -19
- package/dist/cdn/js/kendo-react-dropdowns.js +1 -1
- package/index.d.mts +2 -0
- package/index.d.ts +2 -0
- package/package-metadata.mjs +1 -1
- package/package.json +9 -9
package/ComboBox/ComboBox.mjs
CHANGED
|
@@ -7,26 +7,26 @@
|
|
|
7
7
|
*/
|
|
8
8
|
"use client";
|
|
9
9
|
import * as u from "react";
|
|
10
|
-
import
|
|
10
|
+
import f from "prop-types";
|
|
11
11
|
import N from "../common/DropDownBase.mjs";
|
|
12
|
-
import { Keys as C, validatePackage as
|
|
13
|
-
import { FloatingLabel as
|
|
14
|
-
import { getPlainDataDuplicates as
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import { packageMetadata as
|
|
21
|
-
import
|
|
22
|
-
import { Button as
|
|
23
|
-
import { caretAltDownIcon as
|
|
24
|
-
import { comboArrowBtnAriaLabelExpand as
|
|
25
|
-
import { provideLocalizationService as
|
|
26
|
-
import { ActionSheet as
|
|
27
|
-
import { MOBILE_MEDIUM_DEVISE as
|
|
28
|
-
import
|
|
29
|
-
const
|
|
12
|
+
import { Keys as C, validatePackage as ae, svgIconPropType as ne, canUseDOM as z, classNames as I, uComboBox as D, IconWrap as le, uDropDownsActionSheet as M, createPropsContext as re, withIdHOC as de, withPropsContext as pe, withUnstyledHOC as he } from "@progress/kendo-react-common";
|
|
13
|
+
import { FloatingLabel as ce } from "@progress/kendo-react-labels";
|
|
14
|
+
import { getPlainDataDuplicates as ue, getFilteredData as S, areSame as E, getItemValue as k, isPresent as w, getItemIndexByText as K, suggestValue as ge, itemIndexStartsWith as H } from "../common/utils.mjs";
|
|
15
|
+
import me from "../common/SearchBar.mjs";
|
|
16
|
+
import ve from "../common/ListContainer.mjs";
|
|
17
|
+
import fe from "../common/List.mjs";
|
|
18
|
+
import be from "../common/ListFilter.mjs";
|
|
19
|
+
import q from "../common/GroupStickyHeader.mjs";
|
|
20
|
+
import { packageMetadata as xe } from "../package-metadata.mjs";
|
|
21
|
+
import Ie from "../common/ClearButton.mjs";
|
|
22
|
+
import { Button as G } from "@progress/kendo-react-buttons";
|
|
23
|
+
import { caretAltDownIcon as ye, xIcon as Ce } from "@progress/kendo-svg-icons";
|
|
24
|
+
import { comboArrowBtnAriaLabelExpand as U, messages as W, comboArrowBtnAriaLabelCollapse as j } from "../messages/index.mjs";
|
|
25
|
+
import { provideLocalizationService as $ } from "@progress/kendo-react-intl";
|
|
26
|
+
import { ActionSheet as Se, ActionSheetHeader as De, ActionSheetContent as we } from "@progress/kendo-react-layout";
|
|
27
|
+
import { MOBILE_MEDIUM_DEVISE as Y, MOBILE_SMALL_DEVISE as J } from "../common/constants.mjs";
|
|
28
|
+
import Q from "../common/withCustomComponent.mjs";
|
|
29
|
+
const Ee = "Please enter a valid value!", F = class F extends u.Component {
|
|
30
30
|
constructor(s) {
|
|
31
31
|
super(s), this.state = {}, this.base = new N(this), this._element = null, this._suggested = "", this._skipBlur = !1, this._input = null, this._adaptiveFilterInput = null, this.itemHeight = 0, this.duplicates = [], this.hasDuplicates = !1, this.focus = () => {
|
|
32
32
|
this._input && this._input.focus();
|
|
@@ -34,11 +34,11 @@ const ke = "Please enter a valid value!", F = class F extends u.Component {
|
|
|
34
34
|
const e = this.props.textField !== void 0, t = this.props.dataItemKey !== void 0;
|
|
35
35
|
if (this.props.data && this.props.data.length > 0 && !e && !t) {
|
|
36
36
|
const i = this.props.data;
|
|
37
|
-
this.duplicates =
|
|
37
|
+
this.duplicates = ue(i), this.hasDuplicates = this.duplicates.length > 0;
|
|
38
38
|
}
|
|
39
39
|
}, this.handleItemSelect = (e, t) => {
|
|
40
|
-
const { virtual: i, dataItemKey: n } = this.props,
|
|
41
|
-
this.triggerOnChange(
|
|
40
|
+
const { virtual: i, dataItemKey: n } = this.props, r = S(this.props), a = i ? i.skip : 0, d = r[e - a], l = this.hasDuplicates || !E(d, this.value, n);
|
|
41
|
+
this.triggerOnChange(d, t), this.state.text !== void 0 && (t.data.text = void 0), l && this.base.triggerPageChangeCornerItems(d, t);
|
|
42
42
|
}, this.onPopupOpened = () => {
|
|
43
43
|
setTimeout(() => {
|
|
44
44
|
this.mobileMode && this._adaptiveFilterInput && (this._skipBlur = !0, this._adaptiveFilterInput.focus(), this._skipBlur = !1);
|
|
@@ -46,18 +46,18 @@ const ke = "Please enter a valid value!", F = class F extends u.Component {
|
|
|
46
46
|
}, this.componentRef = (e) => {
|
|
47
47
|
this._element = e, this.base.wrapper = e;
|
|
48
48
|
}, this.toggleBtnClick = (e) => {
|
|
49
|
-
const { skipDisabledItems: t, textField: i } = this.props, n = S(this.props),
|
|
50
|
-
if (
|
|
49
|
+
const { skipDisabledItems: t, textField: i } = this.props, n = S(this.props), r = this.getFocusedIndex(), a = this.getCurrentValueDisabledStatus(i, n, r), d = this.props.opened !== void 0 ? this.props.opened : this.state.opened, l = this.base.initState();
|
|
50
|
+
if (l.syntheticEvent = e, !t && i && a && this.clearValueOnToggleBtnClick(e), this.base.togglePopup(l), !d && this.mobileMode) {
|
|
51
51
|
const o = this.props.adaptiveFilter !== void 0 ? this.props.adaptiveFilter : this.state.text || null;
|
|
52
|
-
this.base.filterChanged(o,
|
|
52
|
+
this.base.filterChanged(o, l);
|
|
53
53
|
}
|
|
54
|
-
this.applyState(
|
|
54
|
+
this.applyState(l);
|
|
55
55
|
}, this.closeOpenedApplyStateNonMobileMode = (e, t) => {
|
|
56
56
|
t && !this.mobileMode && this.base.togglePopup(e);
|
|
57
57
|
}, this.renderMobileListFilter = () => {
|
|
58
58
|
const e = this.props.adaptiveFilter !== void 0 ? this.props.adaptiveFilter : this.state.text, t = k(this.value, this.props.textField), i = w(e) ? e : t;
|
|
59
59
|
return /* @__PURE__ */ u.createElement(
|
|
60
|
-
|
|
60
|
+
be,
|
|
61
61
|
{
|
|
62
62
|
value: i,
|
|
63
63
|
ref: (n) => this._adaptiveFilterInput = n && n.element,
|
|
@@ -75,14 +75,14 @@ const ke = "Please enter a valid value!", F = class F extends u.Component {
|
|
|
75
75
|
const { vs: t, list: i } = this.base;
|
|
76
76
|
t.scrollHandler(e);
|
|
77
77
|
const { groupField: n } = this.props;
|
|
78
|
-
let
|
|
79
|
-
if (!n || !
|
|
78
|
+
let r = S(this.props);
|
|
79
|
+
if (!n || !r.length)
|
|
80
80
|
return;
|
|
81
|
-
const a = this.itemHeight = this.itemHeight || (t.enabled ? t.itemHeight : i ? i.children[0].offsetHeight : 0),
|
|
82
|
-
this.props.groupMode === "modern" && (
|
|
83
|
-
let o =
|
|
84
|
-
for (let
|
|
85
|
-
|
|
81
|
+
const a = this.itemHeight = this.itemHeight || (t.enabled ? t.itemHeight : i ? i.children[0].offsetHeight : 0), l = e.target.scrollTop - t.skip * a;
|
|
82
|
+
this.props.groupMode === "modern" && (r = this.base.getGroupedDataModernMode(r, n));
|
|
83
|
+
let o = r[0][n];
|
|
84
|
+
for (let c = 1; c < r.length && !(a * c > l); c++)
|
|
85
|
+
r[c] && r[c][n] && (o = r[c][n]);
|
|
86
86
|
o !== this.state.group && (this.setState({
|
|
87
87
|
group: o
|
|
88
88
|
}), this.props.onGroupScroll && this.props.onGroupScroll.call(void 0, { group: o }));
|
|
@@ -90,8 +90,8 @@ const ke = "Please enter a valid value!", F = class F extends u.Component {
|
|
|
90
90
|
this.navigationIndex = e, this.base.handleItemClick(e, t), this._valueDuringOnChange = void 0;
|
|
91
91
|
}, this.handleBlur = (e) => {
|
|
92
92
|
if (this.state.focused && !this._skipBlur) {
|
|
93
|
-
const t = this.base.initState(), { textField: i } = this.props, n = S(this.props),
|
|
94
|
-
t.data.focused = !1, t.events.push({ type: "onBlur" }), t.syntheticEvent = e, i &&
|
|
93
|
+
const t = this.base.initState(), { textField: i } = this.props, n = S(this.props), r = this.getFocusedIndex(), d = !(r === -1) && this.getCurrentValueDisabledStatus(i, n, r);
|
|
94
|
+
t.data.focused = !1, t.events.push({ type: "onBlur" }), t.syntheticEvent = e, i && d && this.clearValueOnBlur(e), this.applyValueOnRejectSuggestions(e.currentTarget.value, t);
|
|
95
95
|
}
|
|
96
96
|
}, this.onInputClick = (e) => {
|
|
97
97
|
const t = this.props.opened !== void 0 ? this.props.opened : this.state.opened, i = this.props.adaptiveFilter !== void 0 ? this.props.adaptiveFilter : this.state.text || null;
|
|
@@ -100,72 +100,72 @@ const ke = "Please enter a valid value!", F = class F extends u.Component {
|
|
|
100
100
|
n.syntheticEvent = e, this.base.togglePopup(n), this.base.filterChanged(i, n), this.applyState(n);
|
|
101
101
|
}
|
|
102
102
|
}, this.onInputKeyDown = (e) => {
|
|
103
|
-
const { skipDisabledItems: t, textField: i, dataItemKey: n, groupField:
|
|
103
|
+
const { skipDisabledItems: t, textField: i, dataItemKey: n, groupField: r } = this.props, a = S(this.props), d = this.value, l = Math.max(
|
|
104
104
|
0,
|
|
105
|
-
a.findIndex((
|
|
106
|
-
), o = e.keyCode,
|
|
107
|
-
if (
|
|
108
|
-
if (e.preventDefault(),
|
|
109
|
-
if (!this.props.skipDisabledItems &&
|
|
110
|
-
this.onNavigate(
|
|
105
|
+
a.findIndex((h) => E(h, d, n))
|
|
106
|
+
), o = e.keyCode, c = this.props.opened !== void 0 ? this.props.opened : this.state.opened, p = this.base.initState();
|
|
107
|
+
if (p.syntheticEvent = e, !e.altKey && (o === C.up || o === C.down)) {
|
|
108
|
+
if (e.preventDefault(), r !== "" && i)
|
|
109
|
+
if (!this.props.skipDisabledItems && c)
|
|
110
|
+
this.onNavigate(p, o);
|
|
111
111
|
else {
|
|
112
|
-
let
|
|
112
|
+
let h = 0;
|
|
113
113
|
if (o === C.down || o === C.right) {
|
|
114
|
-
const
|
|
115
|
-
|
|
114
|
+
const g = a.slice(l + 1 < a.length ? l + 1 : l).find((b) => !b.disabled && b[i]);
|
|
115
|
+
h = g && a.findIndex((b) => b[i] === g[i]);
|
|
116
116
|
} else if (o === C.up || o === C.left) {
|
|
117
|
-
let
|
|
118
|
-
if (
|
|
119
|
-
|
|
117
|
+
let g;
|
|
118
|
+
if (l === 0)
|
|
119
|
+
g = a, h = a.findIndex((b) => !b.disabled && b[i]);
|
|
120
120
|
else {
|
|
121
|
-
|
|
122
|
-
let
|
|
123
|
-
for (;
|
|
124
|
-
|
|
125
|
-
|
|
121
|
+
g = a.slice(0, l);
|
|
122
|
+
let b = g.pop();
|
|
123
|
+
for (; b && b.disabled; )
|
|
124
|
+
b = g.pop();
|
|
125
|
+
h = b && a.findIndex((B) => B[i] === b[i]);
|
|
126
126
|
}
|
|
127
127
|
}
|
|
128
|
-
if (
|
|
129
|
-
const
|
|
130
|
-
this.onNavigate(
|
|
128
|
+
if (h !== void 0) {
|
|
129
|
+
const g = h - l;
|
|
130
|
+
this.onNavigate(p, o, g);
|
|
131
131
|
} else
|
|
132
|
-
|
|
132
|
+
h === void 0 && a.findIndex((g) => g[i] === d[i]) === a.length - 1 && this.onNavigate(p, o);
|
|
133
133
|
}
|
|
134
|
-
else if (!this.props.skipDisabledItems &&
|
|
135
|
-
this.onNavigate(
|
|
134
|
+
else if (!this.props.skipDisabledItems && c)
|
|
135
|
+
this.onNavigate(p, o);
|
|
136
136
|
else {
|
|
137
|
-
let
|
|
137
|
+
let h = null;
|
|
138
138
|
if (o === C.down || o === C.right)
|
|
139
|
-
|
|
139
|
+
h = a.slice(l + 1).find((g) => !g.disabled);
|
|
140
140
|
else if (o === C.up || o === C.left) {
|
|
141
|
-
const
|
|
142
|
-
for (
|
|
143
|
-
|
|
141
|
+
const g = a.slice(0, l);
|
|
142
|
+
for (h = g.pop(); h && h.disabled; )
|
|
143
|
+
h = g.pop();
|
|
144
144
|
}
|
|
145
|
-
if (
|
|
146
|
-
const
|
|
147
|
-
this.onNavigate(
|
|
145
|
+
if (h) {
|
|
146
|
+
const g = h.id - l - 1;
|
|
147
|
+
this.onNavigate(p, o, g);
|
|
148
148
|
} else
|
|
149
|
-
this.onNavigate(
|
|
149
|
+
this.onNavigate(p, o);
|
|
150
150
|
}
|
|
151
|
-
this.applyState(
|
|
151
|
+
this.applyState(p);
|
|
152
152
|
}
|
|
153
|
-
const
|
|
154
|
-
e.preventDefault(), this.base.togglePopup(
|
|
155
|
-
},
|
|
156
|
-
|
|
153
|
+
const y = () => {
|
|
154
|
+
e.preventDefault(), this.base.togglePopup(p), this.applyState(p);
|
|
155
|
+
}, x = this.getFocusedIndex(), v = x === -1, m = !v && this.getCurrentValueDisabledStatus(i, a, x);
|
|
156
|
+
c ? o === C.pageUp ? (e.preventDefault(), this.base.scrollPopupByPageSize(-1)) : o === C.pageDown ? (e.preventDefault(), this.base.scrollPopupByPageSize(1)) : e.altKey && o === C.up ? y() : o === C.enter ? (e.preventDefault(), (i && !v && e.currentTarget.value ? a[x][i] : void 0) ? !t && i && m ? this.clearValueOnEnterOrEsc(e) : m || this.applyValueOnEnter(e.currentTarget.value, p) : this.applyValueOnEnter(e.currentTarget.value, p)) : o === C.esc && (!t && i && m && this.clearValueOnEnterOrEsc(e), this.applyValueOnRejectSuggestions(e.currentTarget.value, p)) : !c && o === C.esc ? this.clearValueOnEnterOrEsc(e) : e.altKey && o === C.down && y();
|
|
157
157
|
}, this.inputOnChange = (e) => {
|
|
158
158
|
const t = this.base.initState();
|
|
159
159
|
t.syntheticEvent = e;
|
|
160
|
-
const i = this.props.opened !== void 0 ? this.props.opened : this.state.opened, n = e.currentTarget,
|
|
160
|
+
const i = this.props.opened !== void 0 ? this.props.opened : this.state.opened, n = e.currentTarget, r = n.value;
|
|
161
161
|
if (this.props.suggest) {
|
|
162
|
-
const a = n.selectionEnd ===
|
|
163
|
-
let
|
|
164
|
-
w(
|
|
165
|
-
const
|
|
166
|
-
|
|
162
|
+
const a = n.selectionEnd === r.length;
|
|
163
|
+
let d = this.props.filter !== void 0 ? this.props.filter : this.state.text;
|
|
164
|
+
w(d) || (d = k(this.value, this.props.textField) || "");
|
|
165
|
+
const l = d && d === r, o = d && d.length > r.length;
|
|
166
|
+
l || o || !a ? this._suggested = "" : this.suggestValue(r);
|
|
167
167
|
}
|
|
168
|
-
this.props.filter === void 0 && (t.data.text =
|
|
168
|
+
this.props.filter === void 0 && (t.data.text = r), this.state.focusedItem !== void 0 && (t.data.focusedItem = void 0), i || this.base.togglePopup(t), this.base.filterChanged(r, t), this.applyState(t), this.setState({ group: void 0 });
|
|
169
169
|
}, this.clearButtonClick = (e) => {
|
|
170
170
|
const t = this.base.initState();
|
|
171
171
|
t.syntheticEvent = e, e.stopPropagation(), this.clearValue();
|
|
@@ -180,15 +180,15 @@ const ke = "Please enter a valid value!", F = class F extends u.Component {
|
|
|
180
180
|
t.syntheticEvent = e, e.stopPropagation(), this.clearValue();
|
|
181
181
|
}, this.setValidity = () => {
|
|
182
182
|
this._input && this._input.setCustomValidity && this._input.setCustomValidity(
|
|
183
|
-
this.validity.valid ? "" : this.props.validationMessage ||
|
|
183
|
+
this.validity.valid ? "" : this.props.validationMessage || Ee
|
|
184
184
|
);
|
|
185
|
-
},
|
|
185
|
+
}, ae(xe);
|
|
186
186
|
}
|
|
187
187
|
get _inputId() {
|
|
188
188
|
return this.props.id;
|
|
189
189
|
}
|
|
190
190
|
get document() {
|
|
191
|
-
if (
|
|
191
|
+
if (z)
|
|
192
192
|
return this.element && this.element.ownerDocument || document;
|
|
193
193
|
}
|
|
194
194
|
/** @hidden */
|
|
@@ -199,7 +199,7 @@ const ke = "Please enter a valid value!", F = class F extends u.Component {
|
|
|
199
199
|
* The mobile mode of the ComboBox.
|
|
200
200
|
*/
|
|
201
201
|
get mobileMode() {
|
|
202
|
-
return !!(this.state.windowWidth && this.state.windowWidth <=
|
|
202
|
+
return !!(this.state.windowWidth && this.state.windowWidth <= Y && this.props.adaptive);
|
|
203
203
|
}
|
|
204
204
|
/**
|
|
205
205
|
* The value of the ComboBox.
|
|
@@ -247,25 +247,25 @@ const ke = "Please enter a valid value!", F = class F extends u.Component {
|
|
|
247
247
|
}
|
|
248
248
|
/** @hidden */
|
|
249
249
|
componentDidUpdate(s, e) {
|
|
250
|
-
var
|
|
251
|
-
const { dataItemKey: t, virtual: i, groupField: n = "", textField:
|
|
250
|
+
var y;
|
|
251
|
+
const { dataItemKey: t, virtual: i, groupField: n = "", textField: r } = this.props, a = S(this.props), d = s.virtual ? s.virtual.total : 0, l = this.props.opened !== void 0 ? this.props.opened : this.state.opened, o = s.opened !== void 0 ? s.opened : e.opened;
|
|
252
252
|
s.data !== a && this.checkForDuplicatePlainTextRecords();
|
|
253
|
-
const
|
|
254
|
-
if (this._valueOnDidUpdate =
|
|
253
|
+
const c = !o && l, p = this.value;
|
|
254
|
+
if (this._valueOnDidUpdate = p, this.base.didUpdate(), i && i.total !== d)
|
|
255
255
|
this.base.vs.calcScrollElementHeight(), this.base.vs.reset();
|
|
256
256
|
else {
|
|
257
|
-
const
|
|
258
|
-
let
|
|
259
|
-
this.props.groupMode === "modern" &&
|
|
260
|
-
const
|
|
261
|
-
|
|
257
|
+
const x = s.value !== void 0 ? s.value : e.value;
|
|
258
|
+
let v = this.hasDuplicates ? this.navigationIndex || 0 : a.findIndex((h) => E(h, p, t));
|
|
259
|
+
this.props.groupMode === "modern" && r && p && (v = (y = this.base.getGroupedDataModernMode(a, n)) == null ? void 0 : y.map((h) => h[r]).indexOf(p[r]));
|
|
260
|
+
const m = !E(x, p, t);
|
|
261
|
+
c && i ? this.base.scrollToVirtualItem(i, v) : c && !i ? (this.onPopupOpened(), a && a.length !== 0 && this.base.resetGroupStickyHeader(a[0][n], this), this.base.scrollToItem(v)) : (this.hasDuplicates || l && o && p && m) && this.base.scrollToItem(v);
|
|
262
262
|
}
|
|
263
|
-
|
|
263
|
+
c && this._input && this._input.focus(), this.setValidity();
|
|
264
264
|
}
|
|
265
265
|
/** @hidden */
|
|
266
266
|
componentDidMount() {
|
|
267
267
|
var s;
|
|
268
|
-
this.observerResize =
|
|
268
|
+
this.observerResize = z && window.ResizeObserver && new window.ResizeObserver(this.calculateMedia.bind(this)), this.base.didMount(), this.setValidity(), (s = this.document) != null && s.body && this.observerResize && this.observerResize.observe(this.document.body), this.checkForDuplicatePlainTextRecords();
|
|
269
269
|
}
|
|
270
270
|
/** @hidden */
|
|
271
271
|
componentWillUnmount() {
|
|
@@ -274,140 +274,139 @@ const ke = "Please enter a valid value!", F = class F extends u.Component {
|
|
|
274
274
|
}
|
|
275
275
|
/** @hidden */
|
|
276
276
|
render() {
|
|
277
|
-
const s =
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
), e =
|
|
281
|
-
|
|
282
|
-
j
|
|
277
|
+
const s = $(this).toLanguageString(
|
|
278
|
+
U,
|
|
279
|
+
W[U]
|
|
280
|
+
), e = $(this).toLanguageString(
|
|
281
|
+
j,
|
|
282
|
+
W[j]
|
|
283
283
|
), {
|
|
284
284
|
dir: t,
|
|
285
285
|
disabled: i,
|
|
286
286
|
clearButton: n = F.defaultProps.clearButton,
|
|
287
|
-
label:
|
|
287
|
+
label: r,
|
|
288
288
|
textField: a,
|
|
289
|
-
adaptive: r,
|
|
290
289
|
className: d,
|
|
291
|
-
style:
|
|
292
|
-
loading:
|
|
290
|
+
style: l,
|
|
291
|
+
loading: o,
|
|
293
292
|
iconClassName: c,
|
|
294
|
-
virtual:
|
|
295
|
-
size:
|
|
293
|
+
virtual: p,
|
|
294
|
+
size: y,
|
|
296
295
|
rounded: x,
|
|
297
|
-
fillMode:
|
|
298
|
-
opened:
|
|
299
|
-
placeholder:
|
|
300
|
-
svgIcon:
|
|
301
|
-
unstyled:
|
|
302
|
-
} = this.props,
|
|
303
|
-
V.enabled =
|
|
304
|
-
const [
|
|
296
|
+
fillMode: v,
|
|
297
|
+
opened: m = this.state.opened,
|
|
298
|
+
placeholder: h,
|
|
299
|
+
svgIcon: g,
|
|
300
|
+
unstyled: b
|
|
301
|
+
} = this.props, B = !this.validityStyles || this.validity.valid, O = this.props.filter !== void 0 ? this.props.filter : this.state.text, X = k(this.value, a), T = w(O) ? O : X, Z = n && (!!T || w(this.value)), V = this.base.vs, A = this.props.id || this._inputId, L = this.mobileMode, _ = b && b.uComboBox;
|
|
302
|
+
V.enabled = p !== void 0, p !== void 0 && (V.skip = p.skip, V.total = p.total, V.pageSize = p.pageSize);
|
|
303
|
+
const [ee, te] = Q(this.props.prefix || u.Fragment), [se, ie] = Q(this.props.suffix || u.Fragment), R = /* @__PURE__ */ u.createElement(u.Fragment, null, /* @__PURE__ */ u.createElement(
|
|
305
304
|
"span",
|
|
306
305
|
{
|
|
307
|
-
className:
|
|
306
|
+
className: I(
|
|
308
307
|
D.wrapper({
|
|
309
308
|
c: _,
|
|
310
|
-
size:
|
|
309
|
+
size: y,
|
|
311
310
|
rounded: x,
|
|
312
|
-
fillMode:
|
|
311
|
+
fillMode: v,
|
|
313
312
|
disabled: i,
|
|
314
|
-
invalid: !
|
|
315
|
-
loading:
|
|
313
|
+
invalid: !B,
|
|
314
|
+
loading: o,
|
|
316
315
|
required: this.required
|
|
317
316
|
}),
|
|
318
317
|
d
|
|
319
318
|
),
|
|
320
319
|
ref: this.componentRef,
|
|
321
|
-
style:
|
|
320
|
+
style: r ? { ...l, width: void 0 } : l,
|
|
322
321
|
dir: t
|
|
323
322
|
},
|
|
324
|
-
this.props.prefix && /* @__PURE__ */ u.createElement(
|
|
325
|
-
this.renderSearchBar(T || "",
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
this.props.suffix && /* @__PURE__ */ u.createElement(
|
|
323
|
+
this.props.prefix && /* @__PURE__ */ u.createElement(ee, { ...te }),
|
|
324
|
+
this.renderSearchBar(T || "", A, h),
|
|
325
|
+
Z && !o && /* @__PURE__ */ u.createElement(Ie, { onClick: this.clearButtonClick, key: "clearbutton" }),
|
|
326
|
+
o && /* @__PURE__ */ u.createElement(le, { className: I(D.loadingIcon({ c: _ })), name: "loading", key: "loading" }),
|
|
327
|
+
this.props.suffix && /* @__PURE__ */ u.createElement(se, { ...ie }),
|
|
329
328
|
/* @__PURE__ */ u.createElement(
|
|
330
|
-
|
|
329
|
+
G,
|
|
331
330
|
{
|
|
332
331
|
tabIndex: -1,
|
|
333
332
|
type: "button",
|
|
334
|
-
"aria-label":
|
|
333
|
+
"aria-label": m ? e : s,
|
|
335
334
|
icon: c ? void 0 : "caret-alt-down",
|
|
336
|
-
svgIcon:
|
|
335
|
+
svgIcon: g || ye,
|
|
337
336
|
iconClass: c,
|
|
338
|
-
size:
|
|
339
|
-
fillMode:
|
|
337
|
+
size: y,
|
|
338
|
+
fillMode: v,
|
|
340
339
|
rounded: null,
|
|
341
340
|
themeColor: "base",
|
|
342
|
-
className:
|
|
341
|
+
className: I(D.inputButton({ c: _ })),
|
|
343
342
|
onClick: this.toggleBtnClick,
|
|
344
|
-
onMouseDown: (
|
|
343
|
+
onMouseDown: (oe) => oe.preventDefault()
|
|
345
344
|
}
|
|
346
345
|
),
|
|
347
|
-
!
|
|
348
|
-
),
|
|
349
|
-
return
|
|
350
|
-
|
|
346
|
+
!L && this.renderListContainer()
|
|
347
|
+
), L && this.renderAdaptiveListContainer());
|
|
348
|
+
return r ? /* @__PURE__ */ u.createElement(
|
|
349
|
+
ce,
|
|
351
350
|
{
|
|
352
|
-
label:
|
|
353
|
-
editorId:
|
|
351
|
+
label: r,
|
|
352
|
+
editorId: A,
|
|
354
353
|
editorValue: T,
|
|
355
|
-
editorValid:
|
|
354
|
+
editorValid: B,
|
|
356
355
|
editorDisabled: i,
|
|
357
|
-
style: { width:
|
|
358
|
-
children:
|
|
359
|
-
unstyled:
|
|
356
|
+
style: { width: l ? l.width : void 0 },
|
|
357
|
+
children: R,
|
|
358
|
+
unstyled: b
|
|
360
359
|
}
|
|
361
|
-
) :
|
|
360
|
+
) : R;
|
|
362
361
|
}
|
|
363
362
|
/** @hidden */
|
|
364
363
|
onNavigate(s, e, t) {
|
|
365
|
-
const { virtual: i = { skip: 0 } } = this.props, n = S(this.props),
|
|
366
|
-
let a = -1,
|
|
367
|
-
const
|
|
364
|
+
const { virtual: i = { skip: 0 } } = this.props, n = S(this.props), r = this.props.filter ? this.props.filter : this.state.text;
|
|
365
|
+
let a = -1, d;
|
|
366
|
+
const l = this.base.vs, o = this.value;
|
|
368
367
|
this._suggested = "";
|
|
369
|
-
const
|
|
370
|
-
if (a = this.getFocusedIndex(
|
|
368
|
+
const c = this.hasDuplicates && this.duplicates.indexOf(o) !== -1;
|
|
369
|
+
if (a = this.getFocusedIndex(c), a !== -1 && !w(o))
|
|
371
370
|
this.handleItemSelect(a, s);
|
|
372
|
-
else if (
|
|
371
|
+
else if (r === "")
|
|
373
372
|
this.handleItemSelect(0, s);
|
|
374
373
|
else {
|
|
375
|
-
const
|
|
376
|
-
|
|
374
|
+
const p = i.skip + a;
|
|
375
|
+
d = this.base.navigation.navigate({
|
|
377
376
|
keyCode: e,
|
|
378
|
-
current:
|
|
379
|
-
max: (
|
|
377
|
+
current: p,
|
|
378
|
+
max: (l.enabled ? l.total : n.length) - 1,
|
|
380
379
|
min: 0,
|
|
381
380
|
skipItems: t || void 0
|
|
382
|
-
}),
|
|
381
|
+
}), d !== void 0 && this.handleItemSelect(d, s);
|
|
383
382
|
}
|
|
384
|
-
this.navigationIndex =
|
|
383
|
+
this.navigationIndex = d;
|
|
385
384
|
}
|
|
386
385
|
getCurrentValueDisabledStatus(s, e, t) {
|
|
387
386
|
return s && e && e[t] && e[t].disabled;
|
|
388
387
|
}
|
|
389
388
|
applyValueOnEnter(s, e) {
|
|
390
|
-
const { textField: t, allowCustom: i } = this.props, n = S(this.props),
|
|
389
|
+
const { textField: t, allowCustom: i } = this.props, n = S(this.props), r = this.props.opened !== void 0 ? this.props.opened : this.state.opened, d = k(this.value, t) === s ? this.index : K(n, s, t), l = d !== -1;
|
|
391
390
|
let o;
|
|
392
|
-
if (this._suggested = "",
|
|
393
|
-
o = n[
|
|
391
|
+
if (this._suggested = "", l)
|
|
392
|
+
o = n[d];
|
|
394
393
|
else if (i)
|
|
395
394
|
o = t !== void 0 ? { [t]: s } : s;
|
|
396
395
|
else
|
|
397
396
|
return this.selectFocusedItem(s, e);
|
|
398
|
-
this.triggerOnChange(o, e),
|
|
397
|
+
this.triggerOnChange(o, e), r && this.base.togglePopup(e), this.props.filter === void 0 && this.state.text !== void 0 && (e.data.text = void 0), this.applyState(e);
|
|
399
398
|
}
|
|
400
399
|
applyValueOnRejectSuggestions(s, e) {
|
|
401
|
-
const { textField: t, allowCustom: i } = this.props, n = S(this.props),
|
|
400
|
+
const { textField: t, allowCustom: i } = this.props, n = S(this.props), r = this.props.opened !== void 0 ? this.props.opened : this.state.opened, a = k(this.value, t);
|
|
402
401
|
if (this._suggested = "", s === a || s === "" && !w(a))
|
|
403
|
-
return this.closeOpenedApplyStateNonMobileMode(e,
|
|
404
|
-
const
|
|
402
|
+
return this.closeOpenedApplyStateNonMobileMode(e, r), this.applyState(e);
|
|
403
|
+
const d = K(n, s, t, !0), l = d !== -1;
|
|
405
404
|
let o = null;
|
|
406
|
-
|
|
405
|
+
l ? o = n[d] : i && (o = s ? t ? { [t]: s } : s : null), this.triggerOnChange(o, e), this.state.text !== void 0 && (e.data.text = void 0, this.base.filterChanged("", e)), this.closeOpenedApplyStateNonMobileMode(e, r), this.applyState(e);
|
|
407
406
|
}
|
|
408
407
|
selectFocusedItem(s, e) {
|
|
409
|
-
const t = this.props.opened !== void 0 ? this.props.opened : this.state.opened, { textField: i, virtual: n = { skip: 0 }, focusedItemIndex:
|
|
410
|
-
return
|
|
408
|
+
const t = this.props.opened !== void 0 ? this.props.opened : this.state.opened, { textField: i, virtual: n = { skip: 0 }, focusedItemIndex: r = H } = this.props, a = S(this.props), d = n.skip, l = s === "" && d === 0 ? 0 : r(a, s, i);
|
|
409
|
+
return l !== -1 ? this.handleItemSelect(l + d, e) : (this.triggerOnChange(null, e), this.state.text !== void 0 && (e.data.text = void 0)), t && this.base.togglePopup(e), this.applyState(e);
|
|
411
410
|
}
|
|
412
411
|
renderAdaptiveListContainer() {
|
|
413
412
|
const { windowWidth: s = 0 } = this.state, {
|
|
@@ -415,31 +414,31 @@ const ke = "Please enter a valid value!", F = class F extends u.Component {
|
|
|
415
414
|
footer: t,
|
|
416
415
|
size: i,
|
|
417
416
|
groupField: n,
|
|
418
|
-
groupMode:
|
|
417
|
+
groupMode: r,
|
|
419
418
|
list: a,
|
|
420
|
-
virtual:
|
|
421
|
-
adaptiveTitle:
|
|
419
|
+
virtual: d,
|
|
420
|
+
adaptiveTitle: l,
|
|
422
421
|
groupStickyHeaderItemRender: o,
|
|
423
|
-
unstyled:
|
|
424
|
-
} = this.props,
|
|
425
|
-
let { group:
|
|
426
|
-
|
|
427
|
-
const
|
|
422
|
+
unstyled: c
|
|
423
|
+
} = this.props, p = S(this.props), y = this.props.opened !== void 0 ? this.props.opened : this.state.opened, x = this.base.getAdaptiveAnimation(), v = c && c.uComboBox, m = c && c.uDropDownsActionSheet;
|
|
424
|
+
let { group: h } = this.state;
|
|
425
|
+
h === void 0 && n !== void 0 && (h = k(p[0], n));
|
|
426
|
+
const g = {
|
|
428
427
|
navigatable: !1,
|
|
429
428
|
navigatableElements: [],
|
|
430
|
-
expand:
|
|
431
|
-
animation:
|
|
432
|
-
onClose: (
|
|
433
|
-
animationStyles: s <=
|
|
434
|
-
className:
|
|
435
|
-
|
|
436
|
-
c:
|
|
437
|
-
isFullScreen: s <=
|
|
429
|
+
expand: y,
|
|
430
|
+
animation: x,
|
|
431
|
+
onClose: (b) => this.toggleBtnClick(b),
|
|
432
|
+
animationStyles: s <= J ? { top: 0, width: "100%", height: "100%" } : void 0,
|
|
433
|
+
className: I(
|
|
434
|
+
M.wrapper({
|
|
435
|
+
c: m,
|
|
436
|
+
isFullScreen: s <= J
|
|
438
437
|
})
|
|
439
438
|
)
|
|
440
439
|
};
|
|
441
|
-
return /* @__PURE__ */ u.createElement(
|
|
442
|
-
|
|
440
|
+
return /* @__PURE__ */ u.createElement(Se, { ...g }, /* @__PURE__ */ u.createElement(De, null, /* @__PURE__ */ u.createElement("div", { className: I(M.titleBar({ c: m })) }, /* @__PURE__ */ u.createElement("div", { className: I(M.title({ c: m })) }, /* @__PURE__ */ u.createElement("div", { className: I(M.header({ c: m })) }, l), /* @__PURE__ */ u.createElement("div", { className: I(M.subtitle({ c: m })) })), /* @__PURE__ */ u.createElement("div", { className: I(M.actions({ c: m })) }, /* @__PURE__ */ u.createElement(
|
|
441
|
+
G,
|
|
443
442
|
{
|
|
444
443
|
tabIndex: 0,
|
|
445
444
|
"aria-label": "Cancel",
|
|
@@ -450,80 +449,80 @@ const ke = "Please enter a valid value!", F = class F extends u.Component {
|
|
|
450
449
|
size: "large",
|
|
451
450
|
onClick: this.toggleBtnClick,
|
|
452
451
|
icon: "x",
|
|
453
|
-
svgIcon:
|
|
452
|
+
svgIcon: Ce
|
|
454
453
|
}
|
|
455
|
-
))), /* @__PURE__ */ u.createElement("div", { className:
|
|
454
|
+
))), /* @__PURE__ */ u.createElement("div", { className: I(M.titleBarGroup({ c: m })) }, this.renderMobileListFilter())), /* @__PURE__ */ u.createElement(we, { overflowHidden: !0 }, /* @__PURE__ */ u.createElement("div", { className: I(
|
|
456
455
|
D.listContainer({
|
|
457
|
-
c:
|
|
456
|
+
c: v
|
|
458
457
|
})
|
|
459
458
|
) }, /* @__PURE__ */ u.createElement(
|
|
460
459
|
"div",
|
|
461
460
|
{
|
|
462
|
-
className:
|
|
461
|
+
className: I(
|
|
463
462
|
D.list({
|
|
464
|
-
c:
|
|
463
|
+
c: v,
|
|
465
464
|
list: a,
|
|
466
465
|
size: "large",
|
|
467
466
|
tableSize: i,
|
|
468
|
-
virtual:
|
|
467
|
+
virtual: d
|
|
469
468
|
})
|
|
470
469
|
)
|
|
471
470
|
},
|
|
472
|
-
e && /* @__PURE__ */ u.createElement("div", { className:
|
|
473
|
-
!a &&
|
|
474
|
-
|
|
471
|
+
e && /* @__PURE__ */ u.createElement("div", { className: I(D.listHeader({ c: v })) }, e),
|
|
472
|
+
!a && h && p.length !== 0 && /* @__PURE__ */ u.createElement(
|
|
473
|
+
q,
|
|
475
474
|
{
|
|
476
|
-
group:
|
|
477
|
-
groupMode:
|
|
475
|
+
group: h,
|
|
476
|
+
groupMode: r,
|
|
478
477
|
render: o
|
|
479
478
|
}
|
|
480
479
|
),
|
|
481
480
|
this.renderList(),
|
|
482
|
-
t && /* @__PURE__ */ u.createElement("div", { className:
|
|
481
|
+
t && /* @__PURE__ */ u.createElement("div", { className: I(D.listFooter({ c: v }), this.props.footerClassName) }, t)
|
|
483
482
|
))));
|
|
484
483
|
}
|
|
485
484
|
renderListContainer() {
|
|
486
|
-
const s = this.base, { dir: e, header: t, footer: i, groupField: n, groupMode:
|
|
487
|
-
let { group:
|
|
488
|
-
return
|
|
489
|
-
|
|
485
|
+
const s = this.base, { dir: e, header: t, footer: i, groupField: n, groupMode: r, size: a, list: d, virtual: l, groupStickyHeaderItemRender: o, unstyled: c } = this.props, p = S(this.props), y = this.props.opened !== void 0 ? this.props.opened : this.state.opened, x = s.getPopupSettings(), v = x.width !== void 0 ? x.width : s.popupWidth, m = c && c.uComboBox;
|
|
486
|
+
let { group: h } = this.state;
|
|
487
|
+
return h === void 0 && n !== void 0 && (h = k(p[0], n)), /* @__PURE__ */ u.createElement(
|
|
488
|
+
ve,
|
|
490
489
|
{
|
|
491
|
-
width:
|
|
490
|
+
width: v,
|
|
492
491
|
popupSettings: {
|
|
493
|
-
...
|
|
494
|
-
anchor:
|
|
495
|
-
show:
|
|
496
|
-
popupClass:
|
|
497
|
-
|
|
492
|
+
...x,
|
|
493
|
+
anchor: x.anchor || this.element,
|
|
494
|
+
show: y,
|
|
495
|
+
popupClass: I(
|
|
496
|
+
x.popupClass,
|
|
498
497
|
D.listContainer({
|
|
499
|
-
c:
|
|
498
|
+
c: m,
|
|
500
499
|
popup: !0
|
|
501
500
|
})
|
|
502
501
|
)
|
|
503
502
|
},
|
|
504
503
|
dir: e !== void 0 ? e : this.base.dirCalculated,
|
|
505
|
-
itemsCount: [
|
|
504
|
+
itemsCount: [p.length]
|
|
506
505
|
},
|
|
507
506
|
/* @__PURE__ */ u.createElement(
|
|
508
507
|
"div",
|
|
509
508
|
{
|
|
510
|
-
className:
|
|
509
|
+
className: I(
|
|
511
510
|
D.list({
|
|
512
|
-
c:
|
|
513
|
-
list:
|
|
511
|
+
c: m,
|
|
512
|
+
list: d,
|
|
514
513
|
size: a,
|
|
515
514
|
tableSize: a,
|
|
516
|
-
virtual:
|
|
515
|
+
virtual: l
|
|
517
516
|
})
|
|
518
517
|
)
|
|
519
518
|
},
|
|
520
|
-
t && /* @__PURE__ */ u.createElement("div", { className:
|
|
521
|
-
!
|
|
519
|
+
t && /* @__PURE__ */ u.createElement("div", { className: I(D.listHeader({ c: m })) }, t),
|
|
520
|
+
!d && h && p.length !== 0 && /* @__PURE__ */ u.createElement(q, { group: h, groupMode: r, render: o }),
|
|
522
521
|
this.renderList(),
|
|
523
522
|
i && /* @__PURE__ */ u.createElement(
|
|
524
523
|
"div",
|
|
525
524
|
{
|
|
526
|
-
className:
|
|
525
|
+
className: I(D.listFooter({ c: m }), this.props.footerClassName)
|
|
527
526
|
},
|
|
528
527
|
i
|
|
529
528
|
)
|
|
@@ -536,19 +535,19 @@ const ke = "Please enter a valid value!", F = class F extends u.Component {
|
|
|
536
535
|
dataItemKey: t,
|
|
537
536
|
listNoDataRender: i,
|
|
538
537
|
itemRender: n,
|
|
539
|
-
groupHeaderItemRender:
|
|
538
|
+
groupHeaderItemRender: r,
|
|
540
539
|
virtual: a = { skip: 0, total: void 0 },
|
|
541
|
-
unstyled:
|
|
542
|
-
} = this.props,
|
|
540
|
+
unstyled: d
|
|
541
|
+
} = this.props, l = S(this.props), o = s.getPopupSettings(), c = s.vs, p = a.skip, y = this.props.opened !== void 0 ? this.props.opened : this.state.opened, x = `translateY(${c.translate}px)`, v = y ? this.getFocusedIndex(this.hasDuplicates) : void 0, m = this.props.filter !== void 0 ? this.props.filter : this.state.text, h = k(this.value, e), g = w(m) && m !== h ? null : this.value, b = this.props.list || fe, B = d && d.uComboBox;
|
|
543
542
|
return /* @__PURE__ */ u.createElement(
|
|
544
|
-
|
|
543
|
+
b,
|
|
545
544
|
{
|
|
546
545
|
id: s.listBoxId,
|
|
547
546
|
virtual: !!a,
|
|
548
|
-
show:
|
|
549
|
-
data:
|
|
550
|
-
focusedIndex:
|
|
551
|
-
value:
|
|
547
|
+
show: y,
|
|
548
|
+
data: l,
|
|
549
|
+
focusedIndex: v,
|
|
550
|
+
value: g,
|
|
552
551
|
textField: e,
|
|
553
552
|
valueField: t,
|
|
554
553
|
groupField: this.props.groupField,
|
|
@@ -557,23 +556,23 @@ const ke = "Please enter a valid value!", F = class F extends u.Component {
|
|
|
557
556
|
optionsGuid: s.guid,
|
|
558
557
|
hasDuplicates: this.hasDuplicates,
|
|
559
558
|
listRef: (O) => {
|
|
560
|
-
|
|
559
|
+
c.list = this.base.list = O, this.itemHeight = 0;
|
|
561
560
|
},
|
|
562
|
-
wrapperStyle: this.state.windowWidth && this.state.windowWidth >
|
|
563
|
-
wrapperCssClass:
|
|
564
|
-
c:
|
|
561
|
+
wrapperStyle: this.state.windowWidth && this.state.windowWidth > Y ? { maxHeight: o.height } : {},
|
|
562
|
+
wrapperCssClass: I(D.listContent({
|
|
563
|
+
c: B,
|
|
565
564
|
virtual: a
|
|
566
565
|
})),
|
|
567
|
-
listStyle:
|
|
566
|
+
listStyle: c.enabled ? { transform: x } : void 0,
|
|
568
567
|
key: "listkey",
|
|
569
|
-
skip:
|
|
568
|
+
skip: p,
|
|
570
569
|
onClick: this.handleItemClick,
|
|
571
570
|
itemRender: n,
|
|
572
|
-
groupHeaderItemRender:
|
|
571
|
+
groupHeaderItemRender: r,
|
|
573
572
|
noDataRender: i,
|
|
574
573
|
onMouseDown: (O) => O.preventDefault(),
|
|
575
574
|
onScroll: this.onScroll,
|
|
576
|
-
wrapperRef:
|
|
575
|
+
wrapperRef: c.scrollerRef,
|
|
577
576
|
scroller: this.base.renderScrollElement(),
|
|
578
577
|
ariaSetSize: a.total
|
|
579
578
|
}
|
|
@@ -583,48 +582,50 @@ const ke = "Please enter a valid value!", F = class F extends u.Component {
|
|
|
583
582
|
const {
|
|
584
583
|
tabIndex: i,
|
|
585
584
|
disabled: n,
|
|
586
|
-
title:
|
|
585
|
+
title: r,
|
|
587
586
|
ariaLabelledBy: a,
|
|
588
|
-
ariaDescribedBy:
|
|
589
|
-
dataItemKey:
|
|
587
|
+
ariaDescribedBy: d,
|
|
588
|
+
dataItemKey: l,
|
|
590
589
|
virtual: o = { skip: 0 },
|
|
591
|
-
accessKey:
|
|
592
|
-
|
|
590
|
+
accessKey: c,
|
|
591
|
+
unstyled: p
|
|
592
|
+
} = this.props, y = S(this.props), x = this.props.opened !== void 0 ? this.props.opened : this.state.opened, v = this.value, m = Math.max(
|
|
593
593
|
0,
|
|
594
|
-
|
|
594
|
+
y.findIndex((g) => E(g, v, l))
|
|
595
595
|
);
|
|
596
|
-
this._suggested && !E(this._valueOnDidUpdate,
|
|
597
|
-
const
|
|
598
|
-
accessKey:
|
|
596
|
+
this._suggested && !E(this._valueOnDidUpdate, v, l) && (this._suggested = "");
|
|
597
|
+
const h = {
|
|
598
|
+
accessKey: c
|
|
599
599
|
};
|
|
600
600
|
return /* @__PURE__ */ u.createElement(
|
|
601
|
-
|
|
601
|
+
me,
|
|
602
602
|
{
|
|
603
603
|
id: e,
|
|
604
|
-
readOnly:
|
|
604
|
+
readOnly: x && this.mobileMode,
|
|
605
605
|
placeholder: t,
|
|
606
606
|
tabIndex: i,
|
|
607
|
-
title:
|
|
607
|
+
title: r,
|
|
608
608
|
value: s + this._suggested,
|
|
609
609
|
suggestedText: this._suggested,
|
|
610
|
-
ref: (
|
|
610
|
+
ref: (g) => this._input = g && g.input,
|
|
611
611
|
onClick: this.onInputClick,
|
|
612
612
|
onKeyDown: this.onInputKeyDown,
|
|
613
613
|
onChange: this.inputOnChange,
|
|
614
614
|
onFocus: this.base.handleFocus,
|
|
615
615
|
onBlur: this.handleBlur,
|
|
616
616
|
disabled: n,
|
|
617
|
-
expanded:
|
|
617
|
+
expanded: x,
|
|
618
618
|
owns: this.base.listBoxId,
|
|
619
|
-
activedescendant: `option-${this.base.guid}-${
|
|
619
|
+
activedescendant: `option-${this.base.guid}-${m + o.skip}`,
|
|
620
620
|
role: "combobox",
|
|
621
621
|
ariaLabelledBy: a,
|
|
622
622
|
ariaLabel: this.props.ariaLabel,
|
|
623
|
-
ariaDescribedBy:
|
|
623
|
+
ariaDescribedBy: d,
|
|
624
624
|
ariaRequired: this.required,
|
|
625
625
|
render: this.props.valueRender,
|
|
626
626
|
ariaControls: this.base.listBoxId,
|
|
627
|
-
|
|
627
|
+
unstyled: p,
|
|
628
|
+
...h
|
|
628
629
|
}
|
|
629
630
|
);
|
|
630
631
|
}
|
|
@@ -643,14 +644,14 @@ const ke = "Please enter a valid value!", F = class F extends u.Component {
|
|
|
643
644
|
textField: t,
|
|
644
645
|
dataItemKey: i,
|
|
645
646
|
virtual: n = { skip: 0 },
|
|
646
|
-
focusedItemIndex:
|
|
647
|
+
focusedItemIndex: r = H,
|
|
647
648
|
skipDisabledItems: a
|
|
648
|
-
} = this.props,
|
|
649
|
-
return s && this.navigationIndex !== void 0 ? this.navigationIndex : w(e) &&
|
|
649
|
+
} = this.props, d = S(this.props), l = this.props.filter ? this.props.filter : this.state.text;
|
|
650
|
+
return s && this.navigationIndex !== void 0 ? this.navigationIndex : w(e) && l === void 0 ? d.findIndex((o) => E(o, e, i)) : l ? r(d, l, t) : a && t && !l && n.skip === 0 ? d.findIndex((o) => !o.disabled && o[t]) : n.skip === 0 ? 0 : -1;
|
|
650
651
|
}
|
|
651
652
|
suggestValue(s) {
|
|
652
653
|
const { data: e, textField: t } = this.props;
|
|
653
|
-
this._suggested =
|
|
654
|
+
this._suggested = ge(s, e, t);
|
|
654
655
|
}
|
|
655
656
|
applyState(s) {
|
|
656
657
|
this.base.applyState(s), this._valueDuringOnChange = void 0;
|
|
@@ -662,29 +663,29 @@ const ke = "Please enter a valid value!", F = class F extends u.Component {
|
|
|
662
663
|
};
|
|
663
664
|
F.displayName = "ComboBox", F.propTypes = {
|
|
664
665
|
...N.propTypes,
|
|
665
|
-
size:
|
|
666
|
-
rounded:
|
|
667
|
-
fillMode:
|
|
668
|
-
dataItemKey:
|
|
669
|
-
groupField:
|
|
670
|
-
groupMode:
|
|
671
|
-
isMultiColumn:
|
|
672
|
-
suggest:
|
|
673
|
-
placeholder:
|
|
674
|
-
title:
|
|
675
|
-
allowCustom:
|
|
676
|
-
clearButton:
|
|
677
|
-
iconClassName:
|
|
678
|
-
svgIcon:
|
|
679
|
-
validationMessage:
|
|
680
|
-
required:
|
|
681
|
-
id:
|
|
682
|
-
ariaLabelledBy:
|
|
683
|
-
ariaLabel:
|
|
684
|
-
ariaDescribedBy:
|
|
685
|
-
list:
|
|
686
|
-
valueRender:
|
|
687
|
-
skipDisabledItems:
|
|
666
|
+
size: f.oneOf([null, "small", "medium", "large"]),
|
|
667
|
+
rounded: f.oneOf([null, "small", "medium", "large", "full"]),
|
|
668
|
+
fillMode: f.oneOf([null, "solid", "flat", "outline"]),
|
|
669
|
+
dataItemKey: f.string,
|
|
670
|
+
groupField: f.string,
|
|
671
|
+
groupMode: f.oneOf([void 0, "classic", "modern"]),
|
|
672
|
+
isMultiColumn: f.bool,
|
|
673
|
+
suggest: f.bool,
|
|
674
|
+
placeholder: f.string,
|
|
675
|
+
title: f.string,
|
|
676
|
+
allowCustom: f.bool,
|
|
677
|
+
clearButton: f.bool,
|
|
678
|
+
iconClassName: f.string,
|
|
679
|
+
svgIcon: ne,
|
|
680
|
+
validationMessage: f.string,
|
|
681
|
+
required: f.bool,
|
|
682
|
+
id: f.string,
|
|
683
|
+
ariaLabelledBy: f.string,
|
|
684
|
+
ariaLabel: f.string,
|
|
685
|
+
ariaDescribedBy: f.string,
|
|
686
|
+
list: f.any,
|
|
687
|
+
valueRender: f.func,
|
|
688
|
+
skipDisabledItems: f.bool
|
|
688
689
|
}, F.defaultProps = {
|
|
689
690
|
...N.defaultProps,
|
|
690
691
|
size: "medium",
|
|
@@ -700,15 +701,15 @@ F.displayName = "ComboBox", F.propTypes = {
|
|
|
700
701
|
suffix: void 0
|
|
701
702
|
};
|
|
702
703
|
let P = F;
|
|
703
|
-
const
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
704
|
+
const ke = re(), Fe = de(
|
|
705
|
+
pe(
|
|
706
|
+
ke,
|
|
707
|
+
he(P)
|
|
707
708
|
)
|
|
708
709
|
);
|
|
709
|
-
|
|
710
|
+
Fe.displayName = "KendoReactComboBox";
|
|
710
711
|
export {
|
|
711
|
-
|
|
712
|
-
|
|
712
|
+
Fe as ComboBox,
|
|
713
|
+
ke as ComboBoxPropsContext,
|
|
713
714
|
P as ComboBoxWithoutContext
|
|
714
715
|
};
|