@progress/kendo-react-dropdowns 14.5.0-develop.13 → 14.5.0-develop.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AutoComplete/AutoComplete.d.ts +4 -23
- package/AutoComplete/AutoComplete.js +1 -1
- package/AutoComplete/AutoComplete.mjs +206 -196
- package/AutoComplete/AutoCompleteProps.d.ts +18 -1
- package/AutoCompleteMcpWrapper.d.ts +17 -0
- package/AutoCompleteMcpWrapper.js +8 -0
- package/AutoCompleteMcpWrapper.mjs +18 -0
- package/ComboBox/ComboBox.d.ts +1 -1
- package/ComboBox/ComboBox.js +1 -1
- package/ComboBox/ComboBox.mjs +224 -224
- package/ComboBox/ComboBoxProps.d.ts +6 -1
- package/ComboBoxMcpWrapper.d.ts +17 -0
- package/ComboBoxMcpWrapper.js +8 -0
- package/ComboBoxMcpWrapper.mjs +18 -0
- package/DropDownList/DropDownList.js +1 -1
- package/DropDownList/DropDownList.mjs +283 -282
- package/DropDownList/DropDownListProps.d.ts +6 -1
- package/DropDownTree/DropDownTree.js +1 -1
- package/DropDownTree/DropDownTree.mjs +206 -200
- package/DropDownTree/DropDownTreeProps.d.ts +18 -1
- package/MultiSelect/MultiSelect.d.ts +2 -1
- package/MultiSelect/MultiSelect.js +1 -1
- package/MultiSelect/MultiSelect.mjs +182 -175
- package/MultiSelect/MultiSelectProps.d.ts +6 -1
- package/MultiSelect/TagList.js +1 -1
- package/MultiSelect/TagList.mjs +1 -1
- package/MultiSelectMcpWrapper.d.ts +17 -0
- package/MultiSelectMcpWrapper.js +8 -0
- package/MultiSelectMcpWrapper.mjs +18 -0
- package/MultiSelectTree/MultiSelectTree.js +1 -1
- package/MultiSelectTree/MultiSelectTree.mjs +237 -221
- package/MultiSelectTree/MultiSelectTreeProps.d.ts +12 -0
- package/common/ClearButton.js +1 -1
- package/common/ClearButton.mjs +6 -7
- package/common/List.d.ts +1 -0
- package/common/List.js +1 -1
- package/common/List.mjs +84 -81
- package/common/ListFilter.js +1 -1
- package/common/ListFilter.mjs +20 -17
- package/common/SearchBar.d.ts +1 -0
- package/common/SearchBar.js +1 -1
- package/common/SearchBar.mjs +7 -7
- package/dist/cdn/js/kendo-react-dropdowns.js +1 -1
- package/index.d.mts +9 -3
- package/index.d.ts +9 -3
- package/index.js +1 -1
- package/index.mjs +51 -47
- package/messages/index.d.ts +14 -4
- package/messages/index.js +1 -1
- package/messages/index.mjs +15 -11
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +10 -10
package/ComboBox/ComboBox.mjs
CHANGED
|
@@ -5,41 +5,41 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
import * as
|
|
8
|
+
import * as c from "react";
|
|
9
9
|
import m from "prop-types";
|
|
10
|
-
import
|
|
11
|
-
import {
|
|
12
|
-
import { FloatingLabel as
|
|
13
|
-
import { getPlainDataDuplicates as
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import { packageMetadata as
|
|
20
|
-
import
|
|
21
|
-
import { Button as
|
|
22
|
-
import { chevronDownIcon as
|
|
23
|
-
import { comboArrowBtnAriaLabelExpand as
|
|
24
|
-
import { provideLocalizationService as
|
|
25
|
-
import { ActionSheetContent as
|
|
26
|
-
import
|
|
27
|
-
import { AdaptiveMode as
|
|
28
|
-
const
|
|
10
|
+
import P from "../common/DropDownBase.mjs";
|
|
11
|
+
import { createPropsContext as it, classNames as S, uComboBox as F, Keys as x, validatePackage as ot, getLicenseMessage as at, svgIconPropType as nt, canUseDOM as H, subscribeToKendoPaste as lt, IconWrap as rt, WatermarkOverlay as pt, withIdHOC as dt, withPropsContext as ht, withUnstyledHOC as ct, withAdaptiveModeContext as ut } from "@progress/kendo-react-common";
|
|
12
|
+
import { FloatingLabel as gt } from "@progress/kendo-react-labels";
|
|
13
|
+
import { getPlainDataDuplicates as mt, getItemIndexByText as L, getFilteredData as I, areSame as w, getItemValue as D, isPresent as k, itemIndexStartsWith as N, suggestValue as ft } from "../common/utils.mjs";
|
|
14
|
+
import vt from "../common/SearchBar.mjs";
|
|
15
|
+
import bt from "../common/ListContainer.mjs";
|
|
16
|
+
import xt from "../common/List.mjs";
|
|
17
|
+
import It from "../common/ListFilter.mjs";
|
|
18
|
+
import q from "../common/GroupStickyHeader.mjs";
|
|
19
|
+
import { packageMetadata as W } from "../package-metadata.mjs";
|
|
20
|
+
import yt from "../common/ClearButton.mjs";
|
|
21
|
+
import { Button as Ct } from "@progress/kendo-react-buttons";
|
|
22
|
+
import { chevronDownIcon as St } from "@progress/kendo-svg-icons";
|
|
23
|
+
import { comboArrowBtnAriaLabelExpand as G, messages as R, comboArrowBtnAriaLabelCollapse as U, listAriaLabel as j } from "../messages/index.mjs";
|
|
24
|
+
import { provideLocalizationService as $ } from "@progress/kendo-react-intl";
|
|
25
|
+
import { ActionSheetContent as Ft } from "@progress/kendo-react-layout";
|
|
26
|
+
import Y from "../common/withCustomComponent.mjs";
|
|
27
|
+
import { AdaptiveMode as kt } from "../common/AdaptiveMode.mjs";
|
|
28
|
+
const Dt = "Please enter a valid value!", E = class E extends c.Component {
|
|
29
29
|
constructor(s) {
|
|
30
|
-
super(s), this.state = {}, this.base = new
|
|
30
|
+
super(s), this.state = {}, this.base = new P(this), this._element = null, this._suggested = "", this._skipBlur = !1, this._input = null, this._adaptiveFilterInput = null, this._skipFocus = !1, this.itemHeight = 0, this.duplicates = [], this.hasDuplicates = !1, this.scrollToFocused = !1, this.showLicenseWatermark = !1, this.focus = () => {
|
|
31
31
|
this._input && this._input.focus();
|
|
32
32
|
}, this.checkForDuplicatePlainTextRecords = () => {
|
|
33
33
|
const t = this.props.textField !== void 0, e = this.props.dataItemKey !== void 0;
|
|
34
34
|
if (this.props.data && this.props.data.length > 0 && !t && !e) {
|
|
35
35
|
const a = this.props.data;
|
|
36
|
-
this.duplicates =
|
|
36
|
+
this.duplicates = mt(a), this.hasDuplicates = this.duplicates.length > 0;
|
|
37
37
|
}
|
|
38
38
|
}, this.handleKendoPasteValue = (t) => {
|
|
39
39
|
const { data: e, textField: a, allowCustom: r } = this.props;
|
|
40
40
|
if (!e)
|
|
41
41
|
return;
|
|
42
|
-
const l = t != null ? String(t) : "", o =
|
|
42
|
+
const l = t != null ? String(t) : "", o = L(e, l, a, !1, !0), p = o !== -1;
|
|
43
43
|
let n = null;
|
|
44
44
|
if (p ? n = e[o] : r && (n = a ? { [a]: l } : l), n === null)
|
|
45
45
|
return;
|
|
@@ -50,7 +50,7 @@ const Ft = "Please enter a valid value!", E = class E extends u.Component {
|
|
|
50
50
|
nativeEvent: new Event("change", { bubbles: !0 })
|
|
51
51
|
}, this.state.text !== void 0 && (i.data.text = void 0), this.triggerOnChange(n, i), this.applyState(i);
|
|
52
52
|
}, this.handleItemSelect = (t, e) => {
|
|
53
|
-
const { virtual: a, dataItemKey: r } = this.props, l =
|
|
53
|
+
const { virtual: a, dataItemKey: r } = this.props, l = I(this.props), o = a ? a.skip : 0, p = l[t - o], n = this.hasDuplicates || !w(p, this.value, r);
|
|
54
54
|
this.triggerOnChange(p, e), this.state.text !== void 0 && (e.data.text = void 0), n && this.base.triggerPageChangeCornerItems(p, e);
|
|
55
55
|
}, this.onPopupOpened = () => {
|
|
56
56
|
setTimeout(() => {
|
|
@@ -60,7 +60,7 @@ const Ft = "Please enter a valid value!", E = class E extends u.Component {
|
|
|
60
60
|
this._element = t, this.base.wrapper = t;
|
|
61
61
|
}, this.toggleBtnClick = (t) => {
|
|
62
62
|
this._skipFocus = !0;
|
|
63
|
-
const { skipDisabledItems: e, textField: a } = this.props, r =
|
|
63
|
+
const { skipDisabledItems: e, textField: a } = this.props, r = I(this.props), l = this.getFocusedIndex(), o = this.getCurrentValueDisabledStatus(a, r, l), p = this.props.opened !== void 0 ? this.props.opened : this.state.opened, n = this.base.initState();
|
|
64
64
|
if (n.syntheticEvent = t, !e && a && o && this.clearValueOnToggleBtnClick(t), this.base.togglePopup(n), !p && this.mobileMode) {
|
|
65
65
|
const i = this.props.adaptiveFilter !== void 0 ? this.props.adaptiveFilter : this.state.text || null;
|
|
66
66
|
this.base.filterChanged(i, n);
|
|
@@ -71,9 +71,9 @@ const Ft = "Please enter a valid value!", E = class E extends u.Component {
|
|
|
71
71
|
}, this.closeOpenedApplyStateNonMobileMode = (t, e) => {
|
|
72
72
|
e && !this.mobileMode && this.base.togglePopup(t);
|
|
73
73
|
}, this.renderMobileListFilter = () => {
|
|
74
|
-
const t = this.props.adaptiveFilter !== void 0 ? this.props.adaptiveFilter : this.state.text, e =
|
|
75
|
-
return /* @__PURE__ */
|
|
76
|
-
|
|
74
|
+
const t = this.props.adaptiveFilter !== void 0 ? this.props.adaptiveFilter : this.state.text, e = D(this.value, this.props.textField), a = k(t) ? t : e;
|
|
75
|
+
return /* @__PURE__ */ c.createElement(
|
|
76
|
+
It,
|
|
77
77
|
{
|
|
78
78
|
value: a,
|
|
79
79
|
ref: (r) => {
|
|
@@ -88,9 +88,9 @@ const Ft = "Please enter a valid value!", E = class E extends u.Component {
|
|
|
88
88
|
}
|
|
89
89
|
);
|
|
90
90
|
}, this.listContainerContent = () => {
|
|
91
|
-
const { header: t, footer: e, size: a, groupStickyHeaderItemRender: r, groupField: l, list: o, unstyled: p, virtual: n } = this.props, i =
|
|
91
|
+
const { header: t, footer: e, size: a, groupStickyHeaderItemRender: r, groupField: l, list: o, unstyled: p, virtual: n } = this.props, i = I(this.props), d = p && p.uComboBox;
|
|
92
92
|
let { group: h } = this.state;
|
|
93
|
-
return h === void 0 && l !== void 0 && (h =
|
|
93
|
+
return h === void 0 && l !== void 0 && (h = D(i[0], l)), /* @__PURE__ */ c.createElement(
|
|
94
94
|
"div",
|
|
95
95
|
{
|
|
96
96
|
className: S(
|
|
@@ -103,10 +103,10 @@ const Ft = "Please enter a valid value!", E = class E extends u.Component {
|
|
|
103
103
|
})
|
|
104
104
|
)
|
|
105
105
|
},
|
|
106
|
-
t && /* @__PURE__ */
|
|
107
|
-
!o && h && i.length !== 0 && /* @__PURE__ */
|
|
106
|
+
t && /* @__PURE__ */ c.createElement("div", { className: S(F.listHeader({ c: d })) }, t),
|
|
107
|
+
!o && h && i.length !== 0 && /* @__PURE__ */ c.createElement(q, { group: h, render: r }),
|
|
108
108
|
this.renderList(),
|
|
109
|
-
e && /* @__PURE__ */
|
|
109
|
+
e && /* @__PURE__ */ c.createElement(
|
|
110
110
|
"div",
|
|
111
111
|
{
|
|
112
112
|
className: S(F.listFooter({ c: d }), this.props.footerClassName)
|
|
@@ -122,7 +122,7 @@ const Ft = "Please enter a valid value!", E = class E extends u.Component {
|
|
|
122
122
|
e.scrollHandler(t);
|
|
123
123
|
const { groupField: r } = this.props;
|
|
124
124
|
this.props.onListScroll && this.props.onListScroll(t);
|
|
125
|
-
let l =
|
|
125
|
+
let l = I(this.props);
|
|
126
126
|
if (!r || !l.length)
|
|
127
127
|
return;
|
|
128
128
|
const o = this.itemHeight = this.itemHeight || (e.enabled ? e.itemHeight : a ? a.children[0].offsetHeight : 0), n = t.target.scrollTop - e.skip * o;
|
|
@@ -137,7 +137,7 @@ const Ft = "Please enter a valid value!", E = class E extends u.Component {
|
|
|
137
137
|
this.navigationIndex = t, this.base.handleItemClick(t, e), this._valueDuringOnChange = void 0;
|
|
138
138
|
}, this.handleBlur = (t) => {
|
|
139
139
|
if (this.state.focused && !this._skipBlur) {
|
|
140
|
-
const e = this.base.initState(), { textField: a } = this.props, r =
|
|
140
|
+
const e = this.base.initState(), { textField: a } = this.props, r = I(this.props), l = this.getFocusedIndex(), p = !(l === -1) && this.getCurrentValueDisabledStatus(a, r, l);
|
|
141
141
|
e.data.focused = !1, e.events.push({ type: "onBlur" }), e.syntheticEvent = t, a && p && this.clearValueOnBlur(t), this.applyValueOnRejectSuggestions(t.currentTarget.value, e);
|
|
142
142
|
}
|
|
143
143
|
}, this.onInputClick = (t) => {
|
|
@@ -147,59 +147,59 @@ const Ft = "Please enter a valid value!", E = class E extends u.Component {
|
|
|
147
147
|
r.syntheticEvent = t, this.base.togglePopup(r), this.base.filterChanged(a, r), this.applyState(r);
|
|
148
148
|
}
|
|
149
149
|
}, this.onInputKeyDown = (t) => {
|
|
150
|
-
const { skipDisabledItems: e, textField: a, dataItemKey: r, groupField: l } = this.props, o =
|
|
150
|
+
const { skipDisabledItems: e, textField: a, dataItemKey: r, groupField: l } = this.props, o = I(this.props), p = this.value, n = Math.max(
|
|
151
151
|
0,
|
|
152
|
-
o.findIndex((g) =>
|
|
152
|
+
o.findIndex((g) => w(g, p, r))
|
|
153
153
|
), i = t.keyCode, d = this.props.opened !== void 0 ? this.props.opened : this.state.opened, h = this.base.initState();
|
|
154
|
-
if (h.syntheticEvent = t, !t.altKey && (i ===
|
|
154
|
+
if (h.syntheticEvent = t, !t.altKey && (i === x.up || i === x.down)) {
|
|
155
155
|
if (t.preventDefault(), l !== "" && a)
|
|
156
156
|
if (!this.props.skipDisabledItems && d)
|
|
157
157
|
this.onNavigate(h, i);
|
|
158
158
|
else {
|
|
159
159
|
let g = 0;
|
|
160
|
-
if (i ===
|
|
161
|
-
const
|
|
162
|
-
g =
|
|
163
|
-
} else if (i ===
|
|
164
|
-
let
|
|
160
|
+
if (i === x.down || i === x.right) {
|
|
161
|
+
const u = o.slice(n + 1 < o.length ? n + 1 : n).find((C) => !C.disabled);
|
|
162
|
+
g = u && o.indexOf(u);
|
|
163
|
+
} else if (i === x.up || i === x.left) {
|
|
164
|
+
let u;
|
|
165
165
|
if (n === 0)
|
|
166
|
-
|
|
166
|
+
u = o, g = o.findIndex((C) => !C.disabled);
|
|
167
167
|
else {
|
|
168
|
-
|
|
169
|
-
let
|
|
170
|
-
for (;
|
|
171
|
-
|
|
172
|
-
g =
|
|
168
|
+
u = o.slice(0, n);
|
|
169
|
+
let C = u.pop();
|
|
170
|
+
for (; C && C.disabled; )
|
|
171
|
+
C = u.pop();
|
|
172
|
+
g = C && o.indexOf(C);
|
|
173
173
|
}
|
|
174
174
|
}
|
|
175
175
|
if (g !== void 0) {
|
|
176
|
-
const
|
|
177
|
-
this.onNavigate(h, i,
|
|
176
|
+
const u = g - n;
|
|
177
|
+
this.onNavigate(h, i, u);
|
|
178
178
|
} else g === void 0 && n === o.length - 1 && this.onNavigate(h, i);
|
|
179
179
|
}
|
|
180
180
|
else if (!this.props.skipDisabledItems && d)
|
|
181
181
|
this.onNavigate(h, i);
|
|
182
182
|
else {
|
|
183
183
|
let g = null;
|
|
184
|
-
if (i ===
|
|
185
|
-
g = o.slice(n + 1).find((
|
|
186
|
-
else if (i ===
|
|
187
|
-
const
|
|
188
|
-
for (g =
|
|
189
|
-
g =
|
|
184
|
+
if (i === x.down || i === x.right)
|
|
185
|
+
g = o.slice(n + 1).find((u) => !u.disabled);
|
|
186
|
+
else if (i === x.up || i === x.left) {
|
|
187
|
+
const u = o.slice(0, n);
|
|
188
|
+
for (g = u.pop(); g && g.disabled; )
|
|
189
|
+
g = u.pop();
|
|
190
190
|
}
|
|
191
191
|
if (g) {
|
|
192
|
-
const
|
|
193
|
-
this.onNavigate(h, i,
|
|
192
|
+
const u = g.id - n - 1;
|
|
193
|
+
this.onNavigate(h, i, u);
|
|
194
194
|
} else
|
|
195
195
|
this.onNavigate(h, i);
|
|
196
196
|
}
|
|
197
197
|
this.applyState(h);
|
|
198
198
|
}
|
|
199
|
-
const
|
|
199
|
+
const f = () => {
|
|
200
200
|
t.preventDefault(), this.base.togglePopup(h), this.applyState(h);
|
|
201
|
-
},
|
|
202
|
-
d ? i ===
|
|
201
|
+
}, b = this.getFocusedIndex(), y = b === -1, v = !y && this.getCurrentValueDisabledStatus(a, o, b);
|
|
202
|
+
d ? i === x.pageUp ? (t.preventDefault(), this.base.scrollPopupByPageSize(-1)) : i === x.pageDown ? (t.preventDefault(), this.base.scrollPopupByPageSize(1)) : t.altKey && i === x.up ? f() : i === x.enter ? (t.preventDefault(), (a && !y && t.currentTarget.value ? o[b][a] : void 0) ? !e && a && v ? this.clearValueOnEnterOrEsc(t) : v || this.applyValueOnEnter(t.currentTarget.value, h) : this.applyValueOnEnter(t.currentTarget.value, h)) : i === x.esc && (!e && a && v && this.clearValueOnEnterOrEsc(t), this.applyValueOnRejectSuggestions(t.currentTarget.value, h)) : !d && i === x.esc ? this.clearValueOnEnterOrEsc(t) : t.altKey && i === x.down && f();
|
|
203
203
|
}, this.inputOnChange = (t) => {
|
|
204
204
|
const e = this.base.initState();
|
|
205
205
|
e.syntheticEvent = t;
|
|
@@ -207,7 +207,7 @@ const Ft = "Please enter a valid value!", E = class E extends u.Component {
|
|
|
207
207
|
if (this.props.suggest) {
|
|
208
208
|
const o = r.selectionEnd === l.length;
|
|
209
209
|
let p = this.props.filter !== void 0 ? this.props.filter : this.state.text;
|
|
210
|
-
k(p) || (p =
|
|
210
|
+
k(p) || (p = D(this.value, this.props.textField) || "");
|
|
211
211
|
const n = p && p === l, i = p && p.length > l.length;
|
|
212
212
|
n || i || !o ? this._suggested = "" : this.suggestValue(l);
|
|
213
213
|
}
|
|
@@ -226,7 +226,7 @@ const Ft = "Please enter a valid value!", E = class E extends u.Component {
|
|
|
226
226
|
e.syntheticEvent = t, t.stopPropagation(), this.clearValue();
|
|
227
227
|
}, this.setValidity = () => {
|
|
228
228
|
this._input && this._input.setCustomValidity && this._input.setCustomValidity(
|
|
229
|
-
this.validity.valid ? "" : this.props.validationMessage ||
|
|
229
|
+
this.validity.valid ? "" : this.props.validationMessage || Dt
|
|
230
230
|
);
|
|
231
231
|
}, this.handleFocus = (t) => {
|
|
232
232
|
if (this._skipFocus)
|
|
@@ -235,13 +235,13 @@ const Ft = "Please enter a valid value!", E = class E extends u.Component {
|
|
|
235
235
|
e.syntheticEvent = t, this.mobileMode && !this._skipFocus && (this._skipFocus = !0, this.base.togglePopup(e), this.applyState(e), setTimeout(() => {
|
|
236
236
|
this._skipFocus = !1;
|
|
237
237
|
}, 300)), this.base.handleFocus(t);
|
|
238
|
-
}, this.showLicenseWatermark = !
|
|
238
|
+
}, this.showLicenseWatermark = !ot(W, { component: "ComboBox" }), this.licenseMessage = at(W);
|
|
239
239
|
}
|
|
240
240
|
get _inputId() {
|
|
241
241
|
return this.props.id;
|
|
242
242
|
}
|
|
243
243
|
get document() {
|
|
244
|
-
if (
|
|
244
|
+
if (H)
|
|
245
245
|
return this.element && this.element.ownerDocument || document;
|
|
246
246
|
}
|
|
247
247
|
/** @hidden */
|
|
@@ -272,8 +272,8 @@ const Ft = "Please enter a valid value!", E = class E extends u.Component {
|
|
|
272
272
|
* The index of the selected item.
|
|
273
273
|
*/
|
|
274
274
|
get index() {
|
|
275
|
-
const { dataItemKey: s } = this.props, t =
|
|
276
|
-
return t.findIndex((a) =>
|
|
275
|
+
const { dataItemKey: s } = this.props, t = I(this.props), e = this.value;
|
|
276
|
+
return t.findIndex((a) => w(a, e, s));
|
|
277
277
|
}
|
|
278
278
|
/**
|
|
279
279
|
* Gets the `name` property of the ComboBox.
|
|
@@ -301,21 +301,21 @@ const Ft = "Please enter a valid value!", E = class E extends u.Component {
|
|
|
301
301
|
}
|
|
302
302
|
/** @hidden */
|
|
303
303
|
componentDidUpdate(s, t) {
|
|
304
|
-
var
|
|
305
|
-
const { dataItemKey: e, virtual: a, groupField: r = "", textField: l } = this.props, o =
|
|
304
|
+
var f, b;
|
|
305
|
+
const { dataItemKey: e, virtual: a, groupField: r = "", textField: l } = this.props, o = I(this.props), p = s.virtual ? s.virtual.total : 0, n = this.props.opened !== void 0 ? this.props.opened : this.state.opened, i = s.opened !== void 0 ? s.opened : t.opened;
|
|
306
306
|
s.data !== o && this.checkForDuplicatePlainTextRecords();
|
|
307
307
|
const d = !i && n, h = this.value;
|
|
308
308
|
if (this._valueOnDidUpdate = h, this.base.didUpdate(), a && a.total !== p)
|
|
309
309
|
this.base.vs.calcScrollElementHeight(), this.base.vs.reset();
|
|
310
310
|
else {
|
|
311
|
-
const
|
|
312
|
-
let
|
|
313
|
-
l && h && (
|
|
314
|
-
const g = !
|
|
315
|
-
if (d && a ? this.base.scrollToVirtualItem(a,
|
|
316
|
-
const
|
|
317
|
-
if (
|
|
318
|
-
const { focusedItemIndex:
|
|
311
|
+
const y = s.value !== void 0 ? s.value : t.value;
|
|
312
|
+
let v = this.hasDuplicates ? this.navigationIndex || 0 : o.findIndex((u) => w(u, h, e));
|
|
313
|
+
l && h && (v = (f = this.base.getGroupedDataModernMode(o, r)) == null ? void 0 : f.map((u) => u[l]).indexOf(h[l]));
|
|
314
|
+
const g = !w(y, h, e);
|
|
315
|
+
if (d && a ? this.base.scrollToVirtualItem(a, v) : d && !a ? (this.onPopupOpened(), o && o.length !== 0 && this.base.resetGroupStickyHeader(o[0][r], this), this.base.scrollToItem(v)) : (this.hasDuplicates || n && i && h && g) && this.base.scrollToItem(v), n && i && this.scrollToFocused) {
|
|
316
|
+
const u = (b = this.props.filter ? this.props.filter : this.state.text) != null ? b : "";
|
|
317
|
+
if (u) {
|
|
318
|
+
const { focusedItemIndex: C = N } = this.props, M = C(o, u, l);
|
|
319
319
|
this.base.scrollToItem(M);
|
|
320
320
|
} else
|
|
321
321
|
this.base.scrollToItem(0);
|
|
@@ -326,9 +326,9 @@ const Ft = "Please enter a valid value!", E = class E extends u.Component {
|
|
|
326
326
|
/** @hidden */
|
|
327
327
|
componentDidMount() {
|
|
328
328
|
var t;
|
|
329
|
-
this.observerResize =
|
|
329
|
+
this.observerResize = H && window.ResizeObserver && new window.ResizeObserver(this.calculateMedia.bind(this)), this.base.didMount(), this.setValidity(), (t = this.document) != null && t.body && this.observerResize && this.observerResize.observe(this.document.body), this.checkForDuplicatePlainTextRecords();
|
|
330
330
|
const s = this.props.name || this.props.id;
|
|
331
|
-
this.KendoPasteSubscription =
|
|
331
|
+
this.KendoPasteSubscription = lt(this._element, {
|
|
332
332
|
fieldName: s,
|
|
333
333
|
onValueChange: (e) => {
|
|
334
334
|
this.handleKendoPasteValue(e);
|
|
@@ -342,99 +342,99 @@ const Ft = "Please enter a valid value!", E = class E extends u.Component {
|
|
|
342
342
|
}
|
|
343
343
|
/** @hidden */
|
|
344
344
|
render() {
|
|
345
|
-
const s =
|
|
346
|
-
q,
|
|
347
|
-
W[q]
|
|
348
|
-
), t = U(this).toLanguageString(
|
|
345
|
+
const s = $(this), t = s.toLanguageString(
|
|
349
346
|
G,
|
|
350
|
-
|
|
347
|
+
R[G]
|
|
348
|
+
), e = s.toLanguageString(
|
|
349
|
+
U,
|
|
350
|
+
R[U]
|
|
351
351
|
), {
|
|
352
|
-
dir:
|
|
353
|
-
disabled:
|
|
354
|
-
clearButton:
|
|
355
|
-
label:
|
|
356
|
-
textField:
|
|
357
|
-
className:
|
|
358
|
-
style:
|
|
359
|
-
loading:
|
|
360
|
-
iconClassName:
|
|
361
|
-
virtual:
|
|
362
|
-
size:
|
|
363
|
-
rounded:
|
|
364
|
-
fillMode:
|
|
365
|
-
opened:
|
|
366
|
-
placeholder:
|
|
367
|
-
svgIcon:
|
|
368
|
-
unstyled:
|
|
369
|
-
} = this.props,
|
|
370
|
-
|
|
371
|
-
const [
|
|
352
|
+
dir: a,
|
|
353
|
+
disabled: r,
|
|
354
|
+
clearButton: l = E.defaultProps.clearButton,
|
|
355
|
+
label: o,
|
|
356
|
+
textField: p,
|
|
357
|
+
className: n,
|
|
358
|
+
style: i,
|
|
359
|
+
loading: d,
|
|
360
|
+
iconClassName: h,
|
|
361
|
+
virtual: f,
|
|
362
|
+
size: b,
|
|
363
|
+
rounded: y,
|
|
364
|
+
fillMode: v,
|
|
365
|
+
opened: g = this.state.opened,
|
|
366
|
+
placeholder: u,
|
|
367
|
+
svgIcon: C,
|
|
368
|
+
unstyled: M
|
|
369
|
+
} = this.props, T = !this.validityStyles || this.validity.valid, O = this.props.filter !== void 0 ? this.props.filter : this.state.text, J = D(this.value, p), B = k(O) ? O : J, Q = l && (!!B || k(this.value)), V = this.base.vs, z = this.props.id || this._inputId, _ = M && M.uComboBox;
|
|
370
|
+
V.enabled = f !== void 0, f !== void 0 && (V.skip = f.skip, V.total = f.total, V.pageSize = f.pageSize);
|
|
371
|
+
const [X, Z] = Y(this.props.prefix || c.Fragment), [tt, et] = Y(this.props.suffix || c.Fragment), A = /* @__PURE__ */ c.createElement(c.Fragment, null, /* @__PURE__ */ c.createElement(
|
|
372
372
|
"span",
|
|
373
373
|
{
|
|
374
374
|
className: S(
|
|
375
375
|
F.wrapper({
|
|
376
|
-
c:
|
|
377
|
-
size:
|
|
378
|
-
rounded:
|
|
379
|
-
fillMode:
|
|
380
|
-
disabled:
|
|
381
|
-
invalid: !
|
|
382
|
-
loading:
|
|
376
|
+
c: _,
|
|
377
|
+
size: b,
|
|
378
|
+
rounded: y,
|
|
379
|
+
fillMode: v,
|
|
380
|
+
disabled: r,
|
|
381
|
+
invalid: !T,
|
|
382
|
+
loading: d,
|
|
383
383
|
required: this.required
|
|
384
384
|
}),
|
|
385
|
-
|
|
385
|
+
n
|
|
386
386
|
),
|
|
387
387
|
ref: this.componentRef,
|
|
388
|
-
style:
|
|
389
|
-
dir:
|
|
388
|
+
style: o ? { ...i, width: void 0 } : i,
|
|
389
|
+
dir: a,
|
|
390
390
|
onFocus: this.handleFocus
|
|
391
391
|
},
|
|
392
|
-
this.props.prefix && /* @__PURE__ */
|
|
393
|
-
this.renderSearchBar(
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
392
|
+
this.props.prefix && /* @__PURE__ */ c.createElement(X, { ...Z }),
|
|
393
|
+
this.renderSearchBar(B || "", z, u),
|
|
394
|
+
Q && !d && /* @__PURE__ */ c.createElement(yt, { onClick: this.clearButtonClick, key: "clearbutton" }),
|
|
395
|
+
d && /* @__PURE__ */ c.createElement(
|
|
396
|
+
rt,
|
|
397
397
|
{
|
|
398
|
-
className: S(F.loadingIcon({ c:
|
|
398
|
+
className: S(F.loadingIcon({ c: _ })),
|
|
399
399
|
name: "loading",
|
|
400
400
|
key: "loading"
|
|
401
401
|
}
|
|
402
402
|
),
|
|
403
|
-
this.props.suffix && /* @__PURE__ */
|
|
404
|
-
/* @__PURE__ */
|
|
405
|
-
|
|
403
|
+
this.props.suffix && /* @__PURE__ */ c.createElement(tt, { ...et }),
|
|
404
|
+
/* @__PURE__ */ c.createElement(
|
|
405
|
+
Ct,
|
|
406
406
|
{
|
|
407
407
|
tabIndex: -1,
|
|
408
408
|
type: "button",
|
|
409
|
-
"aria-label":
|
|
410
|
-
svgIcon:
|
|
411
|
-
iconClass:
|
|
412
|
-
size:
|
|
413
|
-
fillMode:
|
|
414
|
-
className: S(F.inputButton({ c:
|
|
409
|
+
"aria-label": g ? e : t,
|
|
410
|
+
svgIcon: C || (h ? void 0 : St),
|
|
411
|
+
iconClass: h,
|
|
412
|
+
size: b,
|
|
413
|
+
fillMode: v,
|
|
414
|
+
className: S(F.inputButton({ c: _ })),
|
|
415
415
|
onClick: this.toggleBtnClick,
|
|
416
|
-
onMouseDown: (
|
|
416
|
+
onMouseDown: (st) => st.preventDefault()
|
|
417
417
|
}
|
|
418
418
|
),
|
|
419
419
|
!this.mobileMode && this.renderListContainer()
|
|
420
420
|
), this.mobileMode && this.renderAdaptiveListContainer());
|
|
421
|
-
return
|
|
422
|
-
|
|
421
|
+
return o ? /* @__PURE__ */ c.createElement(
|
|
422
|
+
gt,
|
|
423
423
|
{
|
|
424
|
-
label:
|
|
425
|
-
editorId:
|
|
426
|
-
editorValue:
|
|
427
|
-
editorValid:
|
|
428
|
-
editorDisabled:
|
|
429
|
-
style: { width:
|
|
430
|
-
children:
|
|
431
|
-
unstyled:
|
|
424
|
+
label: o,
|
|
425
|
+
editorId: z,
|
|
426
|
+
editorValue: B,
|
|
427
|
+
editorValid: T,
|
|
428
|
+
editorDisabled: r,
|
|
429
|
+
style: { width: i ? i.width : void 0 },
|
|
430
|
+
children: A,
|
|
431
|
+
unstyled: M
|
|
432
432
|
}
|
|
433
|
-
) :
|
|
433
|
+
) : A;
|
|
434
434
|
}
|
|
435
435
|
/** @hidden */
|
|
436
436
|
onNavigate(s, t, e) {
|
|
437
|
-
const { virtual: a = { skip: 0 } } = this.props, r =
|
|
437
|
+
const { virtual: a = { skip: 0 } } = this.props, r = I(this.props), l = this.props.filter ? this.props.filter : this.state.text;
|
|
438
438
|
let o = -1, p;
|
|
439
439
|
const n = this.base.vs, i = this.value;
|
|
440
440
|
this._suggested = "";
|
|
@@ -459,7 +459,7 @@ const Ft = "Please enter a valid value!", E = class E extends u.Component {
|
|
|
459
459
|
return s && t && t[e] && t[e].disabled;
|
|
460
460
|
}
|
|
461
461
|
applyValueOnEnter(s, t) {
|
|
462
|
-
const { textField: e, allowCustom: a, ignoreCase: r } = this.props, l =
|
|
462
|
+
const { textField: e, allowCustom: a, ignoreCase: r } = this.props, l = I(this.props), o = this.props.opened !== void 0 ? this.props.opened : this.state.opened, n = D(this.value, e) === s ? this.index : L(l, s, e, !1, r), i = n !== -1;
|
|
463
463
|
let d;
|
|
464
464
|
if (this._suggested = "", i)
|
|
465
465
|
d = l[n];
|
|
@@ -470,21 +470,21 @@ const Ft = "Please enter a valid value!", E = class E extends u.Component {
|
|
|
470
470
|
this.triggerOnChange(d, t), o && this.base.togglePopup(t), this.props.filter === void 0 && this.state.text !== void 0 && (t.data.text = void 0), this.applyState(t);
|
|
471
471
|
}
|
|
472
472
|
applyValueOnRejectSuggestions(s, t) {
|
|
473
|
-
const { textField: e, allowCustom: a, ignoreCase: r } = this.props, l =
|
|
473
|
+
const { textField: e, allowCustom: a, ignoreCase: r } = this.props, l = I(this.props), o = this.props.opened !== void 0 ? this.props.opened : this.state.opened, p = D(this.value, e);
|
|
474
474
|
if (this._suggested = "", s === p || s === "" && !k(p))
|
|
475
475
|
return this.closeOpenedApplyStateNonMobileMode(t, o), this.applyState(t);
|
|
476
|
-
const n =
|
|
476
|
+
const n = L(l, s, e, !0, r), i = n !== -1;
|
|
477
477
|
let d = null;
|
|
478
478
|
i ? d = l[n] : a && (d = s ? e ? { [e]: s } : s : null), this.triggerOnChange(d, t), this.state.text !== void 0 && (t.data.text = void 0, this.base.filterChanged("", t)), this.closeOpenedApplyStateNonMobileMode(t, o), this.applyState(t);
|
|
479
479
|
}
|
|
480
480
|
selectFocusedItem(s, t) {
|
|
481
|
-
const e = this.props.opened !== void 0 ? this.props.opened : this.state.opened, { textField: a, virtual: r = { skip: 0 }, focusedItemIndex: l =
|
|
481
|
+
const e = this.props.opened !== void 0 ? this.props.opened : this.state.opened, { textField: a, virtual: r = { skip: 0 }, focusedItemIndex: l = N } = this.props, o = I(this.props), p = r.skip, n = s === "" && p === 0 ? 0 : l(o, s, a);
|
|
482
482
|
return n !== -1 ? this.handleItemSelect(n + p, t) : (this.triggerOnChange(null, t), this.state.text !== void 0 && (t.data.text = void 0)), e && this.base.togglePopup(t), this.applyState(t);
|
|
483
483
|
}
|
|
484
484
|
renderAdaptiveListContainer() {
|
|
485
|
-
const { windowWidth: s = 0 } = this.state, { groupField: t, adaptiveTitle: e = this.props.label, adaptiveSubtitle: a } = this.props, r =
|
|
485
|
+
const { windowWidth: s = 0 } = this.state, { groupField: t, adaptiveTitle: e = this.props.label, adaptiveSubtitle: a } = this.props, r = I(this.props), l = this.props.opened !== void 0 ? this.props.opened : this.state.opened;
|
|
486
486
|
let { group: o } = this.state;
|
|
487
|
-
o === void 0 && t !== void 0 && (o =
|
|
487
|
+
o === void 0 && t !== void 0 && (o = D(r[0], t));
|
|
488
488
|
const p = {
|
|
489
489
|
title: e || this.props.label,
|
|
490
490
|
subTitle: a,
|
|
@@ -493,23 +493,23 @@ const Ft = "Please enter a valid value!", E = class E extends u.Component {
|
|
|
493
493
|
windowWidth: s,
|
|
494
494
|
mobileFilter: this.renderMobileListFilter()
|
|
495
495
|
};
|
|
496
|
-
return /* @__PURE__ */
|
|
496
|
+
return /* @__PURE__ */ c.createElement(kt, { ...p }, /* @__PURE__ */ c.createElement(Ft, null, /* @__PURE__ */ c.createElement("div", { className: "k-list-container" }, this.listContainerContent())));
|
|
497
497
|
}
|
|
498
498
|
renderListContainer() {
|
|
499
|
-
const s = this.base, { dir: t, header: e, footer: a, groupField: r, size: l, list: o, virtual: p, groupStickyHeaderItemRender: n, unstyled: i } = this.props, d =
|
|
500
|
-
let { group:
|
|
501
|
-
return
|
|
502
|
-
|
|
499
|
+
const s = this.base, { dir: t, header: e, footer: a, groupField: r, size: l, list: o, virtual: p, groupStickyHeaderItemRender: n, unstyled: i } = this.props, d = I(this.props), h = this.props.opened !== void 0 ? this.props.opened : this.state.opened, f = s.getPopupSettings(), b = f.width !== void 0 ? f.width : s.popupWidth, y = i && i.uComboBox;
|
|
500
|
+
let { group: v } = this.state;
|
|
501
|
+
return v === void 0 && r !== void 0 && (v = D(d[0], r)), /* @__PURE__ */ c.createElement(
|
|
502
|
+
bt,
|
|
503
503
|
{
|
|
504
|
-
width:
|
|
504
|
+
width: b,
|
|
505
505
|
popupSettings: {
|
|
506
|
-
...
|
|
507
|
-
anchor:
|
|
506
|
+
...f,
|
|
507
|
+
anchor: f.anchor || this.element,
|
|
508
508
|
show: h,
|
|
509
509
|
popupClass: S(
|
|
510
|
-
|
|
510
|
+
f.popupClass,
|
|
511
511
|
F.listContainer({
|
|
512
|
-
c:
|
|
512
|
+
c: y,
|
|
513
513
|
popup: !0
|
|
514
514
|
})
|
|
515
515
|
)
|
|
@@ -517,12 +517,12 @@ const Ft = "Please enter a valid value!", E = class E extends u.Component {
|
|
|
517
517
|
dir: t !== void 0 ? t : this.base.dirCalculated,
|
|
518
518
|
itemsCount: [d.length]
|
|
519
519
|
},
|
|
520
|
-
/* @__PURE__ */
|
|
520
|
+
/* @__PURE__ */ c.createElement(
|
|
521
521
|
"div",
|
|
522
522
|
{
|
|
523
523
|
className: S(
|
|
524
524
|
F.list({
|
|
525
|
-
c:
|
|
525
|
+
c: y,
|
|
526
526
|
list: o,
|
|
527
527
|
size: l,
|
|
528
528
|
tableSize: l,
|
|
@@ -530,70 +530,71 @@ const Ft = "Please enter a valid value!", E = class E extends u.Component {
|
|
|
530
530
|
})
|
|
531
531
|
)
|
|
532
532
|
},
|
|
533
|
-
e && /* @__PURE__ */
|
|
534
|
-
!o &&
|
|
533
|
+
e && /* @__PURE__ */ c.createElement("div", { className: S(F.listHeader({ c: y })) }, e),
|
|
534
|
+
!o && v && d.length !== 0 && /* @__PURE__ */ c.createElement(q, { group: v, render: n }),
|
|
535
535
|
this.renderList(),
|
|
536
|
-
a && /* @__PURE__ */
|
|
536
|
+
a && /* @__PURE__ */ c.createElement(
|
|
537
537
|
"div",
|
|
538
538
|
{
|
|
539
539
|
className: S(
|
|
540
|
-
F.listFooter({ c:
|
|
540
|
+
F.listFooter({ c: y }),
|
|
541
541
|
this.props.footerClassName
|
|
542
542
|
)
|
|
543
543
|
},
|
|
544
544
|
a
|
|
545
545
|
)
|
|
546
546
|
),
|
|
547
|
-
this.showLicenseWatermark && /* @__PURE__ */
|
|
547
|
+
this.showLicenseWatermark && /* @__PURE__ */ c.createElement(pt, { message: this.licenseMessage })
|
|
548
548
|
);
|
|
549
549
|
}
|
|
550
550
|
renderList() {
|
|
551
|
-
const s = this.base, {
|
|
552
|
-
textField:
|
|
553
|
-
dataItemKey:
|
|
554
|
-
listNoDataRender:
|
|
555
|
-
itemRender:
|
|
556
|
-
groupHeaderItemRender:
|
|
557
|
-
virtual:
|
|
558
|
-
unstyled:
|
|
559
|
-
} = this.props,
|
|
560
|
-
return /* @__PURE__ */
|
|
561
|
-
|
|
551
|
+
const s = this.base, t = $(this), {
|
|
552
|
+
textField: e,
|
|
553
|
+
dataItemKey: a,
|
|
554
|
+
listNoDataRender: r,
|
|
555
|
+
itemRender: l,
|
|
556
|
+
groupHeaderItemRender: o,
|
|
557
|
+
virtual: p = { skip: 0, total: void 0 },
|
|
558
|
+
unstyled: n
|
|
559
|
+
} = this.props, i = I(this.props), d = s.getPopupSettings(), h = s.vs, f = p.skip, b = this.props.opened !== void 0 ? this.props.opened : this.state.opened, y = `translateY(${h.translate}px)`, v = b ? this.getFocusedIndex(this.hasDuplicates) : void 0, g = this.props.filter !== void 0 ? this.props.filter : this.state.text, u = D(this.value, e), C = k(g) && g !== u ? null : this.value, M = this.props.list || xt, T = n && n.uComboBox;
|
|
560
|
+
return /* @__PURE__ */ c.createElement(
|
|
561
|
+
M,
|
|
562
562
|
{
|
|
563
563
|
id: s.listBoxId,
|
|
564
|
-
virtual: !!
|
|
565
|
-
show:
|
|
566
|
-
data:
|
|
567
|
-
focusedIndex:
|
|
568
|
-
value:
|
|
569
|
-
textField:
|
|
570
|
-
valueField:
|
|
564
|
+
virtual: !!p,
|
|
565
|
+
show: b,
|
|
566
|
+
data: i,
|
|
567
|
+
focusedIndex: v,
|
|
568
|
+
value: C,
|
|
569
|
+
textField: e,
|
|
570
|
+
valueField: a,
|
|
571
571
|
groupField: this.props.groupField,
|
|
572
572
|
isMultiColumn: this.props.isMultiColumn,
|
|
573
573
|
optionsGuid: s.guid,
|
|
574
574
|
hasDuplicates: this.hasDuplicates,
|
|
575
|
+
ariaLabel: t.toLanguageString(j, R[j]),
|
|
575
576
|
listRef: (O) => {
|
|
576
|
-
|
|
577
|
+
h.list = this.base.list = O, this.itemHeight = 0;
|
|
577
578
|
},
|
|
578
|
-
wrapperStyle: this.mobileMode ? {} : { maxHeight:
|
|
579
|
+
wrapperStyle: this.mobileMode ? {} : { maxHeight: d.height },
|
|
579
580
|
wrapperCssClass: S(
|
|
580
581
|
F.listContent({
|
|
581
|
-
c:
|
|
582
|
-
virtual:
|
|
582
|
+
c: T,
|
|
583
|
+
virtual: p
|
|
583
584
|
})
|
|
584
585
|
),
|
|
585
|
-
listStyle:
|
|
586
|
+
listStyle: h.enabled ? { transform: y } : void 0,
|
|
586
587
|
key: "listkey",
|
|
587
|
-
skip:
|
|
588
|
+
skip: f,
|
|
588
589
|
onClick: this.handleItemClick,
|
|
589
|
-
itemRender:
|
|
590
|
-
groupHeaderItemRender:
|
|
591
|
-
noDataRender:
|
|
590
|
+
itemRender: l,
|
|
591
|
+
groupHeaderItemRender: o,
|
|
592
|
+
noDataRender: r,
|
|
592
593
|
onMouseDown: (O) => O.preventDefault(),
|
|
593
594
|
onScroll: this.onScroll,
|
|
594
|
-
wrapperRef:
|
|
595
|
+
wrapperRef: h.scrollerRef,
|
|
595
596
|
scroller: this.base.renderScrollElement(),
|
|
596
|
-
ariaSetSize:
|
|
597
|
+
ariaSetSize: p.total
|
|
597
598
|
}
|
|
598
599
|
);
|
|
599
600
|
}
|
|
@@ -608,13 +609,12 @@ const Ft = "Please enter a valid value!", E = class E extends u.Component {
|
|
|
608
609
|
dataItemKey: i,
|
|
609
610
|
virtual: d = { skip: 0 },
|
|
610
611
|
unstyled: h,
|
|
611
|
-
inputAttributes:
|
|
612
|
-
} = this.props
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
)
|
|
616
|
-
|
|
617
|
-
mt,
|
|
612
|
+
inputAttributes: f
|
|
613
|
+
} = this.props;
|
|
614
|
+
I(this.props);
|
|
615
|
+
const b = this.props.opened !== void 0 ? this.props.opened : this.state.opened, y = b ? this.getFocusedIndex(this.hasDuplicates) : -1;
|
|
616
|
+
return this._suggested && !w(this._valueOnDidUpdate, this.value, i) && (this._suggested = ""), /* @__PURE__ */ c.createElement(
|
|
617
|
+
vt,
|
|
618
618
|
{
|
|
619
619
|
id: t,
|
|
620
620
|
readOnly: b && this.mobileMode,
|
|
@@ -624,8 +624,8 @@ const Ft = "Please enter a valid value!", E = class E extends u.Component {
|
|
|
624
624
|
title: o,
|
|
625
625
|
value: s + this._suggested,
|
|
626
626
|
suggestedText: this._suggested,
|
|
627
|
-
ref: (
|
|
628
|
-
this._input =
|
|
627
|
+
ref: (v) => {
|
|
628
|
+
this._input = v && v.input;
|
|
629
629
|
},
|
|
630
630
|
onClick: this.onInputClick,
|
|
631
631
|
onKeyDown: this.onInputKeyDown,
|
|
@@ -635,7 +635,7 @@ const Ft = "Please enter a valid value!", E = class E extends u.Component {
|
|
|
635
635
|
disabled: l,
|
|
636
636
|
expanded: b,
|
|
637
637
|
owns: this.base.listBoxId,
|
|
638
|
-
activedescendant: `
|
|
638
|
+
activedescendant: b && y >= 0 ? `k-${this.base.guid}-item-${y + d.skip + 1}` : void 0,
|
|
639
639
|
role: "combobox",
|
|
640
640
|
ariaLabelledBy: p,
|
|
641
641
|
ariaLabel: this.props.ariaLabel,
|
|
@@ -644,7 +644,7 @@ const Ft = "Please enter a valid value!", E = class E extends u.Component {
|
|
|
644
644
|
render: this.props.valueRender,
|
|
645
645
|
ariaControls: b ? this.base.listBoxId : void 0,
|
|
646
646
|
unstyled: h,
|
|
647
|
-
inputAttributes:
|
|
647
|
+
inputAttributes: f
|
|
648
648
|
}
|
|
649
649
|
);
|
|
650
650
|
}
|
|
@@ -656,21 +656,21 @@ const Ft = "Please enter a valid value!", E = class E extends u.Component {
|
|
|
656
656
|
}
|
|
657
657
|
triggerOnChange(s, t) {
|
|
658
658
|
const e = this.value;
|
|
659
|
-
!this.hasDuplicates && (!k(e) && !k(s) ||
|
|
659
|
+
!this.hasDuplicates && (!k(e) && !k(s) || w(e, s, this.props.dataItemKey)) || (this.props.value === void 0 && (t.data.value = s), this._valueDuringOnChange = s, t.events.push({ type: "onChange" }));
|
|
660
660
|
}
|
|
661
661
|
getFocusedIndex(s) {
|
|
662
662
|
const t = this.value, {
|
|
663
663
|
textField: e,
|
|
664
664
|
dataItemKey: a,
|
|
665
665
|
virtual: r = { skip: 0 },
|
|
666
|
-
focusedItemIndex: l =
|
|
666
|
+
focusedItemIndex: l = N,
|
|
667
667
|
skipDisabledItems: o
|
|
668
|
-
} = this.props, p =
|
|
669
|
-
return s && this.navigationIndex !== void 0 ? this.navigationIndex : k(t) && n === void 0 ? p.findIndex((i) =>
|
|
668
|
+
} = this.props, p = I(this.props), n = this.props.filter ? this.props.filter : this.state.text;
|
|
669
|
+
return s && this.navigationIndex !== void 0 ? this.navigationIndex : k(t) && n === void 0 ? p.findIndex((i) => w(i, t, a)) : n ? l(p, n, e) : o && e && !n && r.skip === 0 ? p.findIndex((i) => !i.disabled) : r.skip === 0 ? 0 : -1;
|
|
670
670
|
}
|
|
671
671
|
suggestValue(s) {
|
|
672
672
|
const { data: t, textField: e } = this.props;
|
|
673
|
-
this._suggested =
|
|
673
|
+
this._suggested = ft(s, t, e);
|
|
674
674
|
}
|
|
675
675
|
applyState(s) {
|
|
676
676
|
this.base.applyState(s), this._valueDuringOnChange = void 0;
|
|
@@ -681,7 +681,7 @@ const Ft = "Please enter a valid value!", E = class E extends u.Component {
|
|
|
681
681
|
}
|
|
682
682
|
};
|
|
683
683
|
E.displayName = "ComboBox", E.propTypes = {
|
|
684
|
-
...
|
|
684
|
+
...P.propTypes,
|
|
685
685
|
size: m.oneOf(["small", "medium", "large"]),
|
|
686
686
|
rounded: m.oneOf(["small", "medium", "large", "full", "none"]),
|
|
687
687
|
fillMode: m.oneOf(["solid", "flat", "outline"]),
|
|
@@ -695,7 +695,7 @@ E.displayName = "ComboBox", E.propTypes = {
|
|
|
695
695
|
ignoreCase: m.bool,
|
|
696
696
|
clearButton: m.bool,
|
|
697
697
|
iconClassName: m.string,
|
|
698
|
-
svgIcon:
|
|
698
|
+
svgIcon: nt,
|
|
699
699
|
validationMessage: m.string,
|
|
700
700
|
required: m.bool,
|
|
701
701
|
id: m.string,
|
|
@@ -707,7 +707,7 @@ E.displayName = "ComboBox", E.propTypes = {
|
|
|
707
707
|
skipDisabledItems: m.bool,
|
|
708
708
|
inputAttributes: m.object
|
|
709
709
|
}, E.defaultProps = {
|
|
710
|
-
...
|
|
710
|
+
...P.defaultProps,
|
|
711
711
|
size: void 0,
|
|
712
712
|
rounded: void 0,
|
|
713
713
|
fillMode: void 0,
|
|
@@ -720,18 +720,18 @@ E.displayName = "ComboBox", E.propTypes = {
|
|
|
720
720
|
prefix: void 0,
|
|
721
721
|
suffix: void 0
|
|
722
722
|
};
|
|
723
|
-
let
|
|
724
|
-
const
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
723
|
+
let K = E;
|
|
724
|
+
const wt = it(), Et = dt(
|
|
725
|
+
ht(
|
|
726
|
+
wt,
|
|
727
|
+
ct(
|
|
728
|
+
ut(K)
|
|
729
729
|
)
|
|
730
730
|
)
|
|
731
731
|
);
|
|
732
|
-
|
|
732
|
+
Et.displayName = "KendoReactComboBox";
|
|
733
733
|
export {
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
734
|
+
Et as ComboBox,
|
|
735
|
+
wt as ComboBoxPropsContext,
|
|
736
|
+
K as ComboBoxWithoutContext
|
|
737
737
|
};
|