@progress/kendo-react-dropdowns 9.2.0-develop.1 → 9.2.0-develop.3
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 +2 -2
- package/AutoComplete/AutoComplete.mjs +282 -219
- package/ComboBox/ComboBox.js +2 -2
- package/ComboBox/ComboBox.mjs +38 -39
- package/DropDownList/DropDownList.js +2 -2
- package/DropDownList/DropDownList.mjs +116 -117
- package/DropDownTree/DropDownTree.js +2 -2
- package/DropDownTree/DropDownTree.mjs +67 -68
- package/DropDownTree/ListNoData.js +1 -1
- package/DropDownTree/ListNoData.mjs +1 -1
- package/DropDownTree/useDropdownWidth.js +1 -1
- package/DropDownTree/useDropdownWidth.mjs +1 -1
- package/LICENSE.md +1 -1
- package/MultiColumnComboBox/MultiColumnComboBox.js +1 -1
- package/MultiColumnComboBox/MultiColumnComboBox.mjs +1 -1
- package/MultiSelect/MultiSelect.js +2 -2
- package/MultiSelect/MultiSelect.mjs +42 -43
- package/MultiSelect/TagList.js +1 -1
- package/MultiSelect/TagList.mjs +1 -1
- package/MultiSelectTree/MultiSelectTree.js +2 -2
- package/MultiSelectTree/MultiSelectTree.mjs +65 -66
- package/MultiSelectTree/utils.js +1 -1
- package/MultiSelectTree/utils.mjs +1 -1
- package/README.md +1 -1
- package/common/AdaptiveMode.js +2 -2
- package/common/AdaptiveMode.mjs +44 -42
- package/common/ClearButton.js +1 -1
- package/common/ClearButton.mjs +1 -1
- package/common/DropDownBase.js +1 -1
- package/common/DropDownBase.mjs +1 -1
- package/common/GroupStickyHeader.js +1 -1
- package/common/GroupStickyHeader.mjs +1 -1
- package/common/List.js +1 -1
- package/common/List.mjs +1 -1
- package/common/ListContainer.js +1 -1
- package/common/ListContainer.mjs +1 -1
- package/common/ListDefaultItem.js +1 -1
- package/common/ListDefaultItem.mjs +1 -1
- package/common/ListFilter.js +1 -1
- package/common/ListFilter.mjs +1 -1
- package/common/ListGroupItem.js +1 -1
- package/common/ListGroupItem.mjs +1 -1
- package/common/ListItem.js +1 -1
- package/common/ListItem.mjs +1 -1
- package/common/MultiColumnList.js +1 -1
- package/common/MultiColumnList.mjs +1 -1
- package/common/Navigation.js +1 -1
- package/common/Navigation.mjs +1 -1
- package/common/SearchBar.js +1 -1
- package/common/SearchBar.mjs +1 -1
- package/common/VirtualScrollStatic.js +1 -1
- package/common/VirtualScrollStatic.mjs +1 -1
- package/common/settings.js +1 -1
- package/common/settings.mjs +1 -1
- package/common/utils.js +1 -1
- package/common/utils.mjs +1 -1
- package/common/withCustomComponent.js +1 -1
- package/common/withCustomComponent.mjs +1 -1
- package/dist/cdn/js/kendo-react-dropdowns.js +2 -2
- package/index.d.mts +31 -2
- package/index.d.ts +31 -2
- package/index.js +1 -1
- package/index.mjs +1 -1
- package/messages/index.js +1 -1
- package/messages/index.mjs +1 -1
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +9 -9
- package/common/constants.js +0 -8
- package/common/constants.mjs +0 -13
|
@@ -1,34 +1,33 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
*-------------------------------------------------------------------------------------------
|
|
4
|
-
* Copyright ©
|
|
4
|
+
* Copyright © 2025 Progress Software Corporation. All rights reserved.
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
"use client";
|
|
9
9
|
import * as f from "react";
|
|
10
10
|
import m from "prop-types";
|
|
11
|
-
import { Keys as u, classNames as b, IconWrap as R, validatePackage as X, canUseDOM as L,
|
|
12
|
-
import { plusIcon as
|
|
13
|
-
import { FloatingLabel as
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
11
|
+
import { Keys as u, classNames as b, IconWrap as R, validatePackage as X, canUseDOM as L, ADAPTIVE_MEDIUM_BREAKPOINT as Z, createPropsContext as tt, withIdHOC as et, withPropsContext as st, kendoThemeMaps as it } from "@progress/kendo-react-common";
|
|
12
|
+
import { plusIcon as ot } from "@progress/kendo-svg-icons";
|
|
13
|
+
import { FloatingLabel as at } from "@progress/kendo-react-labels";
|
|
14
|
+
import nt from "../common/ListContainer.mjs";
|
|
15
|
+
import lt from "../common/List.mjs";
|
|
16
|
+
import dt from "../common/GroupStickyHeader.mjs";
|
|
17
|
+
import rt from "./TagList.mjs";
|
|
18
|
+
import ht from "../common/SearchBar.mjs";
|
|
19
19
|
import F from "../common/DropDownBase.mjs";
|
|
20
20
|
import { ActiveDescendant as k } from "../common/settings.mjs";
|
|
21
|
-
import { getFilteredData as I, areSame as E, removeDataItems as w, isPresent as M, getItemValue as O, preventDefaultNonInputs as
|
|
22
|
-
import { packageMetadata as
|
|
23
|
-
import
|
|
24
|
-
import { AdaptiveMode as
|
|
25
|
-
import { ActionSheetContent as
|
|
26
|
-
import { MOBILE_MEDIUM_DEVISE as mt } from "../common/constants.mjs";
|
|
21
|
+
import { getFilteredData as I, areSame as E, removeDataItems as w, isPresent as M, getItemValue as O, preventDefaultNonInputs as pt, matchTags as B, itemIndexStartsWith as ct } from "../common/utils.mjs";
|
|
22
|
+
import { packageMetadata as ut } from "../package-metadata.mjs";
|
|
23
|
+
import ft from "../common/ClearButton.mjs";
|
|
24
|
+
import { AdaptiveMode as gt } from "../common/AdaptiveMode.mjs";
|
|
25
|
+
import { ActionSheetContent as mt } from "@progress/kendo-react-layout";
|
|
27
26
|
import { provideLocalizationService as vt } from "@progress/kendo-react-intl";
|
|
28
27
|
import { adaptiveModeFooterCancel as z, messages as V, adaptiveModeFooterApply as A } from "../messages/index.mjs";
|
|
29
28
|
import It from "../common/ListFilter.mjs";
|
|
30
29
|
import H from "../common/withCustomComponent.mjs";
|
|
31
|
-
const { sizeMap:
|
|
30
|
+
const { sizeMap: T, roundedMap: bt } = it, yt = "Please enter a valid value!", $ = (D) => D.preventDefault(), q = (D) => D === 2, y = class y extends f.Component {
|
|
32
31
|
constructor(n) {
|
|
33
32
|
super(n), this.state = {
|
|
34
33
|
activedescendant: k.PopupList,
|
|
@@ -146,7 +145,7 @@ const { sizeMap: D, roundedMap: bt } = st, yt = "Please enter a valid value!", $
|
|
|
146
145
|
"div",
|
|
147
146
|
{
|
|
148
147
|
className: b("k-list", {
|
|
149
|
-
[`k-list-${
|
|
148
|
+
[`k-list-${T[s] || s}`]: s
|
|
150
149
|
}),
|
|
151
150
|
key: "customitem",
|
|
152
151
|
onClick: this.customItemSelect,
|
|
@@ -159,7 +158,7 @@ const { sizeMap: D, roundedMap: bt } = st, yt = "Please enter a valid value!", $
|
|
|
159
158
|
style: { fontStyle: "italic" }
|
|
160
159
|
},
|
|
161
160
|
i,
|
|
162
|
-
/* @__PURE__ */ f.createElement(R, { name: "plus", icon:
|
|
161
|
+
/* @__PURE__ */ f.createElement(R, { name: "plus", icon: ot, style: { position: "absolute", right: "0.5em" } })
|
|
163
162
|
)
|
|
164
163
|
);
|
|
165
164
|
let { group: d } = this.state;
|
|
@@ -167,11 +166,11 @@ const { sizeMap: D, roundedMap: bt } = st, yt = "Please enter a valid value!", $
|
|
|
167
166
|
"div",
|
|
168
167
|
{
|
|
169
168
|
className: b("k-list", {
|
|
170
|
-
[`k-list-${this.mobileMode ? "lg" :
|
|
169
|
+
[`k-list-${this.mobileMode ? "lg" : T[s] || s}`]: s,
|
|
171
170
|
"k-virtual-list": this.base.vs.enabled
|
|
172
171
|
})
|
|
173
172
|
},
|
|
174
|
-
!c && d && r.length !== 0 && /* @__PURE__ */ f.createElement(
|
|
173
|
+
!c && d && r.length !== 0 && /* @__PURE__ */ f.createElement(dt, { group: d, groupMode: "modern", render: a }),
|
|
175
174
|
this.renderList()
|
|
176
175
|
), t && /* @__PURE__ */ f.createElement("div", { className: "k-list-footer" }, t));
|
|
177
176
|
}, this.renderListContainer = () => {
|
|
@@ -188,7 +187,7 @@ const { sizeMap: D, roundedMap: bt } = st, yt = "Please enter a valid value!", $
|
|
|
188
187
|
},
|
|
189
188
|
itemsCount: [o.length, this.value.length]
|
|
190
189
|
};
|
|
191
|
-
return /* @__PURE__ */ f.createElement(
|
|
190
|
+
return /* @__PURE__ */ f.createElement(nt, { ...p }, this.listContainerContent());
|
|
192
191
|
}, this.renderAdaptiveListContainer = () => {
|
|
193
192
|
const { adaptiveTitle: e, filterable: t, filter: o } = this.props, { windowWidth: s = 0 } = this.state, a = o !== void 0 ? o : this.state.text;
|
|
194
193
|
this.localization = vt(this);
|
|
@@ -204,7 +203,7 @@ const { sizeMap: D, roundedMap: bt } = st, yt = "Please enter a valid value!", $
|
|
|
204
203
|
fillMode: this.props.fillMode
|
|
205
204
|
}
|
|
206
205
|
) : null, c = {
|
|
207
|
-
|
|
206
|
+
title: e,
|
|
208
207
|
expand: this.opened,
|
|
209
208
|
onClose: (r) => this.onCancel(r),
|
|
210
209
|
windowWidth: s,
|
|
@@ -222,7 +221,7 @@ const { sizeMap: D, roundedMap: bt } = st, yt = "Please enter a valid value!", $
|
|
|
222
221
|
onApply: this.closePopup
|
|
223
222
|
}
|
|
224
223
|
};
|
|
225
|
-
return /* @__PURE__ */ f.createElement(
|
|
224
|
+
return /* @__PURE__ */ f.createElement(gt, { ...c }, /* @__PURE__ */ f.createElement(mt, { overflowHidden: !0 }, /* @__PURE__ */ f.createElement("div", { className: "k-list-container" }, this.listContainerContent())));
|
|
226
225
|
}, this.closePopup = (e) => {
|
|
227
226
|
const t = this.base.initState();
|
|
228
227
|
t.syntheticEvent = e, e.stopPropagation(), this.state.focusedIndex !== void 0 && (t.data.focusedIndex = void 0), this.opened && this.base.togglePopup(t), t.events.push({ type: "onClose" });
|
|
@@ -243,7 +242,7 @@ const { sizeMap: D, roundedMap: bt } = st, yt = "Please enter a valid value!", $
|
|
|
243
242
|
virtual: p = { skip: 0, total: void 0 }
|
|
244
243
|
} = this.props, c = I(this.props), r = this.base.vs, { focusedIndex: i } = this.getFocusedState(), l = this.base.getPopupSettings(), g = `translateY(${r.translate}px)`;
|
|
245
244
|
return /* @__PURE__ */ f.createElement(
|
|
246
|
-
|
|
245
|
+
lt,
|
|
247
246
|
{
|
|
248
247
|
id: this.base.listBoxId,
|
|
249
248
|
show: this.opened,
|
|
@@ -325,7 +324,7 @@ const { sizeMap: D, roundedMap: bt } = st, yt = "Please enter a valid value!", $
|
|
|
325
324
|
this._input && this._input.setCustomValidity && this._input.setCustomValidity(
|
|
326
325
|
this.validity.valid ? "" : this.props.validationMessage || yt
|
|
327
326
|
);
|
|
328
|
-
}, X(
|
|
327
|
+
}, X(ut);
|
|
329
328
|
}
|
|
330
329
|
get _inputId() {
|
|
331
330
|
return this.props.id;
|
|
@@ -350,10 +349,10 @@ const { sizeMap: D, roundedMap: bt } = st, yt = "Please enter a valid value!", $
|
|
|
350
349
|
}) : t.push(...n), t;
|
|
351
350
|
}
|
|
352
351
|
/**
|
|
353
|
-
* The mobile mode of the
|
|
352
|
+
* The mobile mode of the MultiSelect.
|
|
354
353
|
*/
|
|
355
354
|
get mobileMode() {
|
|
356
|
-
return !!(this.state.windowWidth && this.state.windowWidth <=
|
|
355
|
+
return !!(this.state.windowWidth && this.state.windowWidth <= Z && this.props.adaptive);
|
|
357
356
|
}
|
|
358
357
|
/**
|
|
359
358
|
* Represents the value of the MultiSelect.
|
|
@@ -441,20 +440,20 @@ const { sizeMap: D, roundedMap: bt } = st, yt = "Please enter a valid value!", $
|
|
|
441
440
|
fillMode: l,
|
|
442
441
|
loading: g,
|
|
443
442
|
filter: d
|
|
444
|
-
} = this.props, { text: h, focused: v, focusedTag: x, currentValue: W } = this.state, C = this.base.vs,
|
|
443
|
+
} = this.props, { text: h, focused: v, focusedTag: x, currentValue: W } = this.state, C = this.base.vs, K = this.props.id || this._inputId;
|
|
445
444
|
C.enabled = c !== void 0, c !== void 0 && (C.skip = c.skip, C.total = c.total, C.pageSize = c.pageSize);
|
|
446
445
|
const S = this.mobileMode && this.opened ? W : this.tagsToRender;
|
|
447
446
|
this.setItems(this.tagsToRender, this._tags);
|
|
448
|
-
const
|
|
447
|
+
const _ = !this.validityStyles || this.validity.valid, G = !!(d !== void 0 ? d : h) || S && S.length > 0, [U, j] = H(this.props.prefix || f.Fragment), [Y, J] = H(this.props.suffix || f.Fragment), N = /* @__PURE__ */ f.createElement(f.Fragment, null, /* @__PURE__ */ f.createElement(
|
|
449
448
|
"div",
|
|
450
449
|
{
|
|
451
450
|
ref: this.componentRef,
|
|
452
451
|
className: b("k-multiselect k-input", e, {
|
|
453
|
-
[`k-input-${
|
|
452
|
+
[`k-input-${T[r] || r}`]: r,
|
|
454
453
|
[`k-rounded-${bt[i] || i}`]: i,
|
|
455
454
|
[`k-input-${l}`]: l,
|
|
456
455
|
"k-focus": v && !s,
|
|
457
|
-
"k-invalid": !
|
|
456
|
+
"k-invalid": !_,
|
|
458
457
|
"k-disabled": s,
|
|
459
458
|
"k-loading": g,
|
|
460
459
|
"k-required": this.required
|
|
@@ -464,18 +463,18 @@ const { sizeMap: D, roundedMap: bt } = st, yt = "Please enter a valid value!", $
|
|
|
464
463
|
onFocus: this.handleFocus,
|
|
465
464
|
onBlur: this.handleBlur,
|
|
466
465
|
onClick: this.handleWrapperClick,
|
|
467
|
-
onMouseDown:
|
|
466
|
+
onMouseDown: pt
|
|
468
467
|
},
|
|
469
468
|
this.props.prefix && /* @__PURE__ */ f.createElement(U, { ...j }),
|
|
470
469
|
/* @__PURE__ */ f.createElement("div", { className: b("k-input-values") }, /* @__PURE__ */ f.createElement(
|
|
471
470
|
"div",
|
|
472
471
|
{
|
|
473
|
-
className: b("k-chip-list", { [`k-chip-list-${
|
|
472
|
+
className: b("k-chip-list", { [`k-chip-list-${T[r] || r}`]: r }),
|
|
474
473
|
role: "listbox",
|
|
475
474
|
id: "tagslist-" + this.base.guid
|
|
476
475
|
},
|
|
477
476
|
S && S.length > 0 && /* @__PURE__ */ f.createElement(
|
|
478
|
-
|
|
477
|
+
rt,
|
|
479
478
|
{
|
|
480
479
|
tagRender: this.props.tagRender,
|
|
481
480
|
onTagDelete: this.onTagDelete,
|
|
@@ -485,19 +484,19 @@ const { sizeMap: D, roundedMap: bt } = st, yt = "Please enter a valid value!", $
|
|
|
485
484
|
size: r
|
|
486
485
|
}
|
|
487
486
|
)
|
|
488
|
-
), this.renderSearchBar(
|
|
487
|
+
), this.renderSearchBar(K)),
|
|
489
488
|
g && /* @__PURE__ */ f.createElement(R, { className: "k-input-loading-icon", name: "loading" }),
|
|
490
489
|
this.props.suffix && /* @__PURE__ */ f.createElement(Y, { ...J }),
|
|
491
|
-
G && /* @__PURE__ */ f.createElement(
|
|
490
|
+
G && /* @__PURE__ */ f.createElement(ft, { onClick: this.clearButtonClick }),
|
|
492
491
|
!this.mobileMode && this.renderListContainer()
|
|
493
492
|
), this.mobileMode && this.renderAdaptiveListContainer());
|
|
494
493
|
return t ? /* @__PURE__ */ f.createElement(
|
|
495
|
-
|
|
494
|
+
at,
|
|
496
495
|
{
|
|
497
496
|
label: t,
|
|
498
|
-
editorId:
|
|
497
|
+
editorId: K,
|
|
499
498
|
editorValue: h || O(this.value[0], a),
|
|
500
|
-
editorValid:
|
|
499
|
+
editorValid: _,
|
|
501
500
|
editorDisabled: s,
|
|
502
501
|
style: { width: n ? n.width : void 0 },
|
|
503
502
|
children: N
|
|
@@ -510,7 +509,7 @@ const { sizeMap: D, roundedMap: bt } = st, yt = "Please enter a valid value!", $
|
|
|
510
509
|
tabIndex: this.props.tabIndex
|
|
511
510
|
};
|
|
512
511
|
return /* @__PURE__ */ f.createElement(
|
|
513
|
-
|
|
512
|
+
ht,
|
|
514
513
|
{
|
|
515
514
|
id: n,
|
|
516
515
|
size: Math.max((d || "").length, l.length, 1),
|
|
@@ -577,7 +576,7 @@ const { sizeMap: D, roundedMap: bt } = st, yt = "Please enter a valid value!", $
|
|
|
577
576
|
dataItemKey: o,
|
|
578
577
|
virtual: s,
|
|
579
578
|
textField: a,
|
|
580
|
-
focusedItemIndex: p =
|
|
579
|
+
focusedItemIndex: p = ct,
|
|
581
580
|
skipDisabledItems: c
|
|
582
581
|
} = this.props, r = I(this.props), i = s && s.skip || 0;
|
|
583
582
|
let l;
|
|
@@ -693,8 +692,8 @@ y.displayName = "MultiSelect", y.propTypes = {
|
|
|
693
692
|
suffix: void 0
|
|
694
693
|
};
|
|
695
694
|
let P = y;
|
|
696
|
-
const xt =
|
|
697
|
-
|
|
695
|
+
const xt = tt(), St = et(
|
|
696
|
+
st(
|
|
698
697
|
xt,
|
|
699
698
|
P
|
|
700
699
|
)
|
package/MultiSelect/TagList.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
*-------------------------------------------------------------------------------------------
|
|
4
|
-
* Copyright ©
|
|
4
|
+
* Copyright © 2025 Progress Software Corporation. All rights reserved.
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
package/MultiSelect/TagList.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
*-------------------------------------------------------------------------------------------
|
|
4
|
-
* Copyright ©
|
|
4
|
+
* Copyright © 2025 Progress Software Corporation. All rights reserved.
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
*-------------------------------------------------------------------------------------------
|
|
4
|
-
* Copyright ©
|
|
4
|
+
* Copyright © 2025 Progress Software Corporation. All rights reserved.
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Ze=require("react"),a=require("prop-types"),i=require("@progress/kendo-react-common"),et=require("@progress/kendo-react-popup"),tt=require("@progress/kendo-react-intl"),we=require("@progress/kendo-react-treeview"),nt=require("../package-metadata.js"),ee=require("../common/utils.js"),at=require("../DropDownTree/useDropdownWidth.js"),rt=require("../DropDownTree/ListNoData.js"),m=require("../messages/index.js"),it=require("@progress/kendo-react-labels"),st=require("../MultiSelect/TagList.js"),ot=require("../common/ClearButton.js"),Ie=require("../common/ListFilter.js"),lt=require("../common/AdaptiveMode.js"),ct=require("@progress/kendo-react-layout"),ut=require("../common/constants.js");function dt(h){const b=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(h){for(const n in h)if(n!=="default"){const I=Object.getOwnPropertyDescriptor(h,n);Object.defineProperty(b,n,I.get?I:{enumerable:!0,get:()=>h[n]})}}return b.default=h,Object.freeze(b)}const t=dt(Ze),pt="Please select a value from the list!",{sizeMap:Te,roundedMap:ft}=i.kendoThemeMaps,gt=h=>h.split("_").map(b=>parseInt(b,10)),vt=(h,b)=>{const{validationMessage:n,valid:I,required:T}=h;return{customError:n!==void 0,valid:!!(I!==void 0?I:!T||b),valueMissing:!b}},E={checkField:"checkField",checkIndeterminateField:"checkIndeterminateField",subItemsField:"items",popupSettings:{animate:!0,width:"200px",height:"200px"},size:"medium",rounded:"medium",fillMode:"solid",required:!1,validityStyles:!0},Me=i.createPropsContext(),ce=t.forwardRef((h,b)=>{const n=i.usePropsContext(Me,h);i.validatePackage(nt.packageMetadata);const I=i.useId(),T=n.id||I,{data:B=[],dataItemKey:M,style:L={},placeholder:ue,label:V,name:Ke,validationMessage:W,valid:Re,tags:de,value:g,opened:K,disabled:x,popupSettings:N=E.popupSettings,checkField:pe=E.checkField,checkIndeterminateField:fe=E.checkIndeterminateField,subItemsField:ge=E.subItemsField,size:y=E.size,rounded:A=E.rounded,fillMode:z=E.fillMode,required:ve=E.required,validityStyles:De=E.validityStyles,onOpen:te=i.noop,onClose:_=i.noop}=n,j=i.getTabIndex(n.tabIndex,x),o=t.useRef(null),F=t.useRef(null),R=t.useRef(null),ne=t.useRef(null),H=t.useRef(null),S=t.useRef(null),$=t.useRef(!1),G=t.useRef([]),U=t.useRef(null),[O,qe]=t.useState(),[Ne,me]=t.useState(!1),[d,ae]=t.useState(!1),[re,Oe]=t.useState(),[Pe,Le]=t.useState([]),[he,Ve]=t.useState(""),P=!!(re&&re<=ut.MOBILE_MEDIUM_DEVISE&&n.adaptive),l=K!==void 0?K:Ne,ie=!!(Array.isArray(g)&&g.length),se=vt({validationMessage:W,valid:Re,required:ve},ie),D=i.useRtl(F,n.dir),Ae={width:at.useDropdownWidth(F,E,N,L),...D!==void 0?{direction:D}:{}},Be=t.useCallback(()=>F.current&&F.current.focus(),[]);G.current=de===void 0?(g||[]).map(e=>({text:ee.getItemValue(e,n.textField),data:[e]})):[...de],t.useImperativeHandle(o,()=>({props:n,element:F.current,focus:Be})),t.useImperativeHandle(b,()=>o.current);const We=t.useCallback(()=>{H.current&&H.current.setCustomValidity&&H.current.setCustomValidity(se.valid?"":W===void 0?pt:W)},[W,se]);t.useEffect(We),t.useEffect(()=>{const e=i.canUseDOM&&window.ResizeObserver&&new window.ResizeObserver(Xe.bind(void 0));return document!=null&&document.body&&e&&e.observe(document.body),()=>{e&&e.disconnect()}},[]),t.useEffect(()=>{U.current&&l&&U.current.setPosition(U.current.element)},[g,l]);const w=t.useCallback((e,r,s)=>{if(n.onChange){const k={items:r,operation:s,...e};n.onChange.call(void 0,k)}},[n.onChange]),J=t.useCallback(e=>{if(ee.areSame(e.item,g,M)||!o.current)return;const{item:r,nativeEvent:s,syntheticEvent:k}=e,q={syntheticEvent:k,nativeEvent:s,target:o.current};w(q,[r],"toggle")},[g,M,w]),Q=t.useCallback(e=>{if(!l){if(te){const r={...e};te.call(void 0,r)}K===void 0&&(me(!0),Le(g||[]),P&&setTimeout(()=>{var r;u((r=ne.current)==null?void 0:r.element)},300))}},[l,K,te,P,ne]),v=t.useCallback(e=>{if(l){if(_){const r={...e};_.call(void 0,r)}K===void 0&&me(!1)}},[l,K,_]),C=t.useCallback(e=>{$.current=!0,e(),window.setTimeout(()=>$.current=!1,0)},[]),u=t.useCallback(e=>{e&&C(()=>e.focus())},[C]),ze=t.useCallback(()=>{var e;!d&&l?v({target:o.current}):n.filterable?u((e=R.current)==null?void 0:e.element):u(S.current&&S.current.element)},[d,l,u,v,n.filterable]),_e=t.useCallback(()=>{d&&u(F.current)},[d,u]),je=t.useCallback(e=>{if(!d&&!$.current&&(ae(!0),n.onFocus&&o.current)){const r={syntheticEvent:e,nativeEvent:e.nativeEvent,target:o.current};n.onFocus.call(void 0,r)}},[d,n.onFocus]),He=t.useCallback(e=>{if(d&&!$.current&&o.current){ae(!1);const r={syntheticEvent:e,nativeEvent:e.nativeEvent,target:o.current};if(n.onBlur){const s={...r};n.onBlur.call(void 0,s)}P||v(r)}},[d,n.onBlur,l,K,_]),$e=t.useCallback(()=>{d&&C(i.noop)},[d,C]),Ge=t.useCallback(e=>{if(!e.isDefaultPrevented()&&o.current){ae(!0);const r={syntheticEvent:e,nativeEvent:e.nativeEvent,target:o.current};l||Q(r)}},[l,Q]),Ue=t.useCallback(e=>{var Z,Se;const{keyCode:r,altKey:s}=e,k=S.current&&S.current.element;if(!o.current||e.isDefaultPrevented()&&((Z=R.current)==null?void 0:Z.element)===e.target)return;const q={syntheticEvent:e,nativeEvent:e.nativeEvent,target:o.current};if(g&&g.length>0&&(r===i.Keys.left||r===i.Keys.right||r===i.Keys.home||r===i.Keys.end||r===i.Keys.delete)){const c=G.current;let p=O?c.findIndex(Ye=>ee.matchTags(Ye,O,M)):-1,f;const le=p!==-1;r===i.Keys.left?(le?p=Math.max(0,p-1):p=c.length-1,f=c[p]):r===i.Keys.right?p===c.length-1?f=void 0:le&&(p=Math.min(c.length-1,p+1),f=c[p]):r===i.Keys.home?f=c[0]:r===i.Keys.end?f=c[c.length-1]:r===i.Keys.delete&&le&&w(q,c[p].data,"delete"),f!==O&&qe(f)}if(l)if(r===i.Keys.esc||s&&r===i.Keys.up)e.preventDefault(),v(q);else if(k&&k.querySelector(".k-focus")&&(r===i.Keys.up||r===i.Keys.down||r===i.Keys.left||r===i.Keys.right||r===i.Keys.home||r===i.Keys.end)){if(r===i.Keys.up&&((Se=R.current)!=null&&Se.element)){const c=Array.from(k.querySelectorAll(".k-treeview-item")),p=[...c].reverse().find(f=>!!(f&&f.querySelector(".k-focus")));if(p&&c.indexOf(p)===0)return C(()=>{var f;u((f=R.current)==null?void 0:f.element)})}C(i.noop)}else r===i.Keys.down&&C(()=>{var c;u(((c=R.current)==null?void 0:c.element)||k)});else s&&r===i.Keys.down&&(e.preventDefault(),Q(q))},[l,v,u,C,Q,O,M,g,w]),ye=t.useCallback(e=>{const{keyCode:r,altKey:s}=e;s||r!==i.Keys.up&&r!==i.Keys.down||(e.preventDefault(),C(r===i.Keys.up?()=>{u(F.current)}:()=>{u(S.current&&S.current.element)}))},[u,C]),oe=t.useCallback(e=>{if(!o.current)return;const r={syntheticEvent:e,nativeEvent:e.nativeEvent,target:o.current};w(r,[],"clear"),v(r),e.preventDefault()},[w,v]),Je=t.useCallback((e,r)=>{var s;v({target:o.current}),d||u((s=R.current)==null?void 0:s.element),w({syntheticEvent:r,nativeEvent:r.nativeEvent,target:o.current},e,"delete")},[w,v,u,d]),be=t.useCallback(e=>{if(n.onExpandChange&&o.current){const{item:r,itemHierarchicalIndex:s,nativeEvent:k,syntheticEvent:q}=e,Z={level:gt(s),item:r,nativeEvent:k,syntheticEvent:q,target:o.current};n.onExpandChange.call(void 0,Z)}},[n.onExpandChange]),Ce=t.useCallback(e=>{if(n.onFilterChange&&o.current){const s={filter:{field:n.textField,operator:"contains",value:e.target.value},syntheticEvent:e.syntheticEvent,nativeEvent:e.nativeEvent,target:o.current};n.onFilterChange.call(void 0,s),n.filter===void 0&&Ve(e.target.value)}},[n.onFilterChange,n.filter,n.textField]),ke=t.useCallback(e=>{if(!o.current)return;const r={syntheticEvent:e,nativeEvent:e.nativeEvent,target:o.current};n.onCancel&&n.onCancel.call(void 0,r),v(r),e.preventDefault()},[n.onCancel,v]),Qe=()=>{const e=n.filterable?t.createElement(Ie,{value:n.filter===void 0?he:n.filter,ref:ne,onChange:Ce,onKeyDown:ye,size:y,rounded:A,fillMode:z}):null,r={adaptiveTitle:n.adaptiveTitle,expand:l,onClose:s=>n.onCancel?ke(s):oe(s),windowWidth:re,mobileFilter:e,footer:{cancelText:X.toLanguageString(m.adaptiveModeFooterCancel,m.messages[m.adaptiveModeFooterCancel]),onCancel:s=>n.onCancel?ke(s):oe(s),applyText:X.toLanguageString(m.adaptiveModeFooterApply,m.messages[m.adaptiveModeFooterApply]),onApply:s=>v(s)}};return t.createElement(lt.AdaptiveMode,{...r},t.createElement(ct.ActionSheetContent,{overflowHidden:!0},t.createElement("div",{className:"k-list-container"},t.createElement("div",{className:"k-list k-list-lg"},B.length>0?t.createElement(we.TreeView,{ref:S,tabIndex:j,data:B,focusIdField:M,textField:n.textField,checkField:pe,checkIndeterminateField:fe,expandField:n.expandField,childrenField:ge,expandIcons:!0,onItemClick:J,onCheckChange:J,onExpandChange:be,checkboxes:!0,size:y,item:n.item,dir:D}):t.createElement(Ee,null,X.toLanguageString(m.nodata,m.messages[m.nodata]))))))},Xe=t.useCallback(e=>{for(const r of e)Oe(r.target.clientWidth)},[]),Ee=n.listNoData||rt.ListNoData,X=tt.useLocalization(),Fe=!De||se.valid,Y=P&&l?Pe:G.current,xe=t.createElement(t.Fragment,null,t.createElement("span",{className:i.classNames("k-multiselecttree k-input",n.className,{[`k-input-${Te[y]||y}`]:y,[`k-rounded-${ft[A]||A}`]:A,[`k-input-${z}`]:z,"k-focus":d&&!x,"k-invalid":!Fe,"k-disabled":x,"k-loading":n.loading,"k-required":ve}),tabIndex:j,accessKey:n.accessKey,id:T,style:V?{...L,width:void 0}:L,dir:D,ref:F,onKeyDown:x?void 0:Ue,onMouseDown:$e,onFocus:je,onBlur:He,role:"combobox","aria-haspopup":"tree","aria-expanded":l,"aria-disabled":x,"aria-label":V,"aria-labelledby":n.ariaLabelledBy,"aria-describedby":n.ariaDescribedBy?n.ariaDescribedBy:"tagslist-"+T,"aria-required":n.required,onClick:x?void 0:Ge},t.createElement("div",{id:"tagslist-"+T,className:i.classNames("k-input-values k-chip-list",{[`k-chip-list-${Te[y]||y}`]:y})},Y.length>0&&t.createElement(st,{tag:n.tag,onTagDelete:Je,data:Y,guid:T,focused:O?G.current.find(e=>ee.matchTags(e,O,M)):void 0,size:y})),t.createElement("span",{className:"k-input-inner"},Y.length===0&&t.createElement("span",{className:"k-input-value-text"},ue)),n.loading&&t.createElement(i.IconWrap,{className:"k-input-loading-icon",name:"loading"}),ie&&!x&&Y.length>0&&t.createElement(ot,{onClick:oe}),t.createElement("select",{name:Ke,ref:H,tabIndex:-1,"aria-hidden":!0,title:V,style:{opacity:0,width:1,border:0,zIndex:-1,position:"absolute",left:"50%"}},t.createElement("option",{value:n.valueMap?n.valueMap.call(void 0,g):g})),!P&&t.createElement(et.Popup,{...N,popupClass:i.classNames(N.popupClass,"k-multiselecttree-popup"),className:i.classNames(N.className,{"k-rtl":D==="rtl"}),style:Ae,anchor:N.anchor||F.current,show:l,onOpen:ze,onClose:_e,ref:U},n.filterable&&t.createElement(Ie,{value:n.filter===void 0?he:n.filter,ref:R,onChange:Ce,onKeyDown:ye,tabIndex:j,size:y,rounded:A,fillMode:z,renderListFilterWrapper:!0,renderPrefixSeparator:!0}),B.length>0?t.createElement(we.TreeView,{style:{height:N.height},ref:S,tabIndex:j,data:B,focusIdField:M,textField:n.textField,checkField:pe,checkIndeterminateField:fe,expandField:n.expandField,childrenField:ge,expandIcons:!0,onItemClick:J,onCheckChange:J,onExpandChange:be,checkboxes:!0,size:y,item:n.item,dir:D}):t.createElement(Ee,null,X.toLanguageString(m.nodata,m.messages[m.nodata])))),P&&Qe());return V?t.createElement(it.FloatingLabel,{label:V,editorValue:ie,editorPlaceholder:ue,editorValid:Fe,editorDisabled:x,editorId:T,style:{width:L?L.width:void 0},children:xe,dir:D}):xe}),mt={opened:a.bool,disabled:a.bool,dir:a.string,tabIndex:a.number,accessKey:a.string,data:a.array,value:a.any,valueMap:a.func,placeholder:a.string,dataItemKey:a.string.isRequired,textField:a.string.isRequired,checkField:a.string,checkIndeterminateField:a.string,expandField:a.string,subItemsField:a.string,className:a.string,style:a.object,label:a.string,validationMessage:a.string,validityStyles:a.bool,valid:a.bool,required:a.bool,name:a.string,id:a.string,ariaLabelledBy:a.string,ariaDescribedBy:a.string,filterable:a.bool,filter:a.string,loading:a.bool,tags:a.arrayOf(a.shape({text:a.string,data:a.arrayOf(a.any)})),popupSettings:a.shape({animate:a.oneOfType([a.bool,a.shape({openDuration:a.number,closeDuration:a.number})]),popupClass:a.string,className:a.string,appendTo:a.any,width:a.oneOfType([a.string,a.number]),height:a.oneOfType([a.string,a.number])}),onOpen:a.func,onClose:a.func,onFocus:a.func,onBlur:a.func,onChange:a.func,onFilterChange:a.func,onExpandChange:a.func,onCancel:a.func,item:a.func,listNoData:a.func,adaptiveTitle:a.string,adaptive:a.bool};ce.displayName="KendoReactMultiSelectTree";ce.propTypes=mt;exports.MultiSelectTree=ce;exports.MultiSelectTreePropsContext=Me;
|
|
8
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Ze=require("react"),a=require("prop-types"),i=require("@progress/kendo-react-common"),et=require("@progress/kendo-react-popup"),tt=require("@progress/kendo-react-intl"),we=require("@progress/kendo-react-treeview"),nt=require("../package-metadata.js"),ee=require("../common/utils.js"),at=require("../DropDownTree/useDropdownWidth.js"),rt=require("../DropDownTree/ListNoData.js"),m=require("../messages/index.js"),it=require("@progress/kendo-react-labels"),st=require("../MultiSelect/TagList.js"),ot=require("../common/ClearButton.js"),Ie=require("../common/ListFilter.js"),lt=require("../common/AdaptiveMode.js"),ct=require("@progress/kendo-react-layout");function ut(h){const b=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(h){for(const n in h)if(n!=="default"){const I=Object.getOwnPropertyDescriptor(h,n);Object.defineProperty(b,n,I.get?I:{enumerable:!0,get:()=>h[n]})}}return b.default=h,Object.freeze(b)}const t=ut(Ze),dt="Please select a value from the list!",{sizeMap:Te,roundedMap:pt}=i.kendoThemeMaps,ft=h=>h.split("_").map(b=>parseInt(b,10)),gt=(h,b)=>{const{validationMessage:n,valid:I,required:T}=h;return{customError:n!==void 0,valid:!!(I!==void 0?I:!T||b),valueMissing:!b}},E={checkField:"checkField",checkIndeterminateField:"checkIndeterminateField",subItemsField:"items",popupSettings:{animate:!0,width:"200px",height:"200px"},size:"medium",rounded:"medium",fillMode:"solid",required:!1,validityStyles:!0},Ke=i.createPropsContext(),ce=t.forwardRef((h,b)=>{const n=i.usePropsContext(Ke,h);i.validatePackage(nt.packageMetadata);const I=i.useId(),T=n.id||I,{data:B=[],dataItemKey:K,style:A={},placeholder:ue,label:L,name:Re,validationMessage:W,valid:Me,tags:de,value:g,opened:R,disabled:x,popupSettings:N=E.popupSettings,checkField:pe=E.checkField,checkIndeterminateField:fe=E.checkIndeterminateField,subItemsField:ge=E.subItemsField,size:y=E.size,rounded:V=E.rounded,fillMode:z=E.fillMode,required:ve=E.required,validityStyles:De=E.validityStyles,onOpen:te=i.noop,onClose:_=i.noop}=n,j=i.getTabIndex(n.tabIndex,x),o=t.useRef(null),F=t.useRef(null),M=t.useRef(null),ne=t.useRef(null),H=t.useRef(null),S=t.useRef(null),$=t.useRef(!1),G=t.useRef([]),U=t.useRef(null),[P,qe]=t.useState(),[Ne,me]=t.useState(!1),[d,ae]=t.useState(!1),[re,Pe]=t.useState(),[Oe,Ae]=t.useState([]),[he,Le]=t.useState(""),O=!!(re&&re<=i.ADAPTIVE_MEDIUM_BREAKPOINT&&n.adaptive),l=R!==void 0?R:Ne,ie=!!(Array.isArray(g)&&g.length),se=gt({validationMessage:W,valid:Me,required:ve},ie),D=i.useRtl(F,n.dir),Ve={width:at.useDropdownWidth(F,E,N,A),...D!==void 0?{direction:D}:{}},Be=t.useCallback(()=>F.current&&F.current.focus(),[]);G.current=de===void 0?(g||[]).map(e=>({text:ee.getItemValue(e,n.textField),data:[e]})):[...de],t.useImperativeHandle(o,()=>({props:n,element:F.current,focus:Be})),t.useImperativeHandle(b,()=>o.current);const We=t.useCallback(()=>{H.current&&H.current.setCustomValidity&&H.current.setCustomValidity(se.valid?"":W===void 0?dt:W)},[W,se]);t.useEffect(We),t.useEffect(()=>{const e=i.canUseDOM&&window.ResizeObserver&&new window.ResizeObserver(Xe.bind(void 0));return document!=null&&document.body&&e&&e.observe(document.body),()=>{e&&e.disconnect()}},[]),t.useEffect(()=>{U.current&&l&&U.current.setPosition(U.current.element)},[g,l]);const w=t.useCallback((e,r,s)=>{if(n.onChange){const k={items:r,operation:s,...e};n.onChange.call(void 0,k)}},[n.onChange]),J=t.useCallback(e=>{if(ee.areSame(e.item,g,K)||!o.current)return;const{item:r,nativeEvent:s,syntheticEvent:k}=e,q={syntheticEvent:k,nativeEvent:s,target:o.current};w(q,[r],"toggle")},[g,K,w]),Q=t.useCallback(e=>{if(!l){if(te){const r={...e};te.call(void 0,r)}R===void 0&&(me(!0),Ae(g||[]),O&&setTimeout(()=>{var r;u((r=ne.current)==null?void 0:r.element)},300))}},[l,R,te,O,ne]),v=t.useCallback(e=>{if(l){if(_){const r={...e};_.call(void 0,r)}R===void 0&&me(!1)}},[l,R,_]),C=t.useCallback(e=>{$.current=!0,e(),window.setTimeout(()=>$.current=!1,0)},[]),u=t.useCallback(e=>{e&&C(()=>e.focus())},[C]),ze=t.useCallback(()=>{var e;!d&&l?v({target:o.current}):n.filterable?u((e=M.current)==null?void 0:e.element):u(S.current&&S.current.element)},[d,l,u,v,n.filterable]),_e=t.useCallback(()=>{d&&u(F.current)},[d,u]),je=t.useCallback(e=>{if(!d&&!$.current&&(ae(!0),n.onFocus&&o.current)){const r={syntheticEvent:e,nativeEvent:e.nativeEvent,target:o.current};n.onFocus.call(void 0,r)}},[d,n.onFocus]),He=t.useCallback(e=>{if(d&&!$.current&&o.current){ae(!1);const r={syntheticEvent:e,nativeEvent:e.nativeEvent,target:o.current};if(n.onBlur){const s={...r};n.onBlur.call(void 0,s)}O||v(r)}},[d,n.onBlur,l,R,_]),$e=t.useCallback(()=>{d&&C(i.noop)},[d,C]),Ge=t.useCallback(e=>{if(!e.isDefaultPrevented()&&o.current){ae(!0);const r={syntheticEvent:e,nativeEvent:e.nativeEvent,target:o.current};l||Q(r)}},[l,Q]),Ue=t.useCallback(e=>{var Z,Se;const{keyCode:r,altKey:s}=e,k=S.current&&S.current.element;if(!o.current||e.isDefaultPrevented()&&((Z=M.current)==null?void 0:Z.element)===e.target)return;const q={syntheticEvent:e,nativeEvent:e.nativeEvent,target:o.current};if(g&&g.length>0&&(r===i.Keys.left||r===i.Keys.right||r===i.Keys.home||r===i.Keys.end||r===i.Keys.delete)){const c=G.current;let p=P?c.findIndex(Ye=>ee.matchTags(Ye,P,K)):-1,f;const le=p!==-1;r===i.Keys.left?(le?p=Math.max(0,p-1):p=c.length-1,f=c[p]):r===i.Keys.right?p===c.length-1?f=void 0:le&&(p=Math.min(c.length-1,p+1),f=c[p]):r===i.Keys.home?f=c[0]:r===i.Keys.end?f=c[c.length-1]:r===i.Keys.delete&&le&&w(q,c[p].data,"delete"),f!==P&&qe(f)}if(l)if(r===i.Keys.esc||s&&r===i.Keys.up)e.preventDefault(),v(q);else if(k&&k.querySelector(".k-focus")&&(r===i.Keys.up||r===i.Keys.down||r===i.Keys.left||r===i.Keys.right||r===i.Keys.home||r===i.Keys.end)){if(r===i.Keys.up&&((Se=M.current)!=null&&Se.element)){const c=Array.from(k.querySelectorAll(".k-treeview-item")),p=[...c].reverse().find(f=>!!(f&&f.querySelector(".k-focus")));if(p&&c.indexOf(p)===0)return C(()=>{var f;u((f=M.current)==null?void 0:f.element)})}C(i.noop)}else r===i.Keys.down&&C(()=>{var c;u(((c=M.current)==null?void 0:c.element)||k)});else s&&r===i.Keys.down&&(e.preventDefault(),Q(q))},[l,v,u,C,Q,P,K,g,w]),ye=t.useCallback(e=>{const{keyCode:r,altKey:s}=e;s||r!==i.Keys.up&&r!==i.Keys.down||(e.preventDefault(),C(r===i.Keys.up?()=>{u(F.current)}:()=>{u(S.current&&S.current.element)}))},[u,C]),oe=t.useCallback(e=>{if(!o.current)return;const r={syntheticEvent:e,nativeEvent:e.nativeEvent,target:o.current};w(r,[],"clear"),v(r),e.preventDefault()},[w,v]),Je=t.useCallback((e,r)=>{var s;v({target:o.current}),d||u((s=M.current)==null?void 0:s.element),w({syntheticEvent:r,nativeEvent:r.nativeEvent,target:o.current},e,"delete")},[w,v,u,d]),be=t.useCallback(e=>{if(n.onExpandChange&&o.current){const{item:r,itemHierarchicalIndex:s,nativeEvent:k,syntheticEvent:q}=e,Z={level:ft(s),item:r,nativeEvent:k,syntheticEvent:q,target:o.current};n.onExpandChange.call(void 0,Z)}},[n.onExpandChange]),Ce=t.useCallback(e=>{if(n.onFilterChange&&o.current){const s={filter:{field:n.textField,operator:"contains",value:e.target.value},syntheticEvent:e.syntheticEvent,nativeEvent:e.nativeEvent,target:o.current};n.onFilterChange.call(void 0,s),n.filter===void 0&&Le(e.target.value)}},[n.onFilterChange,n.filter,n.textField]),ke=t.useCallback(e=>{if(!o.current)return;const r={syntheticEvent:e,nativeEvent:e.nativeEvent,target:o.current};n.onCancel&&n.onCancel.call(void 0,r),v(r),e.preventDefault()},[n.onCancel,v]),Qe=()=>{const e=n.filterable?t.createElement(Ie,{value:n.filter===void 0?he:n.filter,ref:ne,onChange:Ce,onKeyDown:ye,size:y,rounded:V,fillMode:z}):null,r={title:n.adaptiveTitle,expand:l,onClose:s=>n.onCancel?ke(s):oe(s),windowWidth:re,mobileFilter:e,footer:{cancelText:X.toLanguageString(m.adaptiveModeFooterCancel,m.messages[m.adaptiveModeFooterCancel]),onCancel:s=>n.onCancel?ke(s):oe(s),applyText:X.toLanguageString(m.adaptiveModeFooterApply,m.messages[m.adaptiveModeFooterApply]),onApply:s=>v(s)}};return t.createElement(lt.AdaptiveMode,{...r},t.createElement(ct.ActionSheetContent,{overflowHidden:!0},t.createElement("div",{className:"k-list-container"},t.createElement("div",{className:"k-list k-list-lg"},B.length>0?t.createElement(we.TreeView,{ref:S,tabIndex:j,data:B,focusIdField:K,textField:n.textField,checkField:pe,checkIndeterminateField:fe,expandField:n.expandField,childrenField:ge,expandIcons:!0,onItemClick:J,onCheckChange:J,onExpandChange:be,checkboxes:!0,size:y,item:n.item,dir:D}):t.createElement(Ee,null,X.toLanguageString(m.nodata,m.messages[m.nodata]))))))},Xe=t.useCallback(e=>{for(const r of e)Pe(r.target.clientWidth)},[]),Ee=n.listNoData||rt.ListNoData,X=tt.useLocalization(),Fe=!De||se.valid,Y=O&&l?Oe:G.current,xe=t.createElement(t.Fragment,null,t.createElement("span",{className:i.classNames("k-multiselecttree k-input",n.className,{[`k-input-${Te[y]||y}`]:y,[`k-rounded-${pt[V]||V}`]:V,[`k-input-${z}`]:z,"k-focus":d&&!x,"k-invalid":!Fe,"k-disabled":x,"k-loading":n.loading,"k-required":ve}),tabIndex:j,accessKey:n.accessKey,id:T,style:L?{...A,width:void 0}:A,dir:D,ref:F,onKeyDown:x?void 0:Ue,onMouseDown:$e,onFocus:je,onBlur:He,role:"combobox","aria-haspopup":"tree","aria-expanded":l,"aria-disabled":x,"aria-label":L,"aria-labelledby":n.ariaLabelledBy,"aria-describedby":n.ariaDescribedBy?n.ariaDescribedBy:"tagslist-"+T,"aria-required":n.required,onClick:x?void 0:Ge},t.createElement("div",{id:"tagslist-"+T,className:i.classNames("k-input-values k-chip-list",{[`k-chip-list-${Te[y]||y}`]:y})},Y.length>0&&t.createElement(st,{tag:n.tag,onTagDelete:Je,data:Y,guid:T,focused:P?G.current.find(e=>ee.matchTags(e,P,K)):void 0,size:y})),t.createElement("span",{className:"k-input-inner"},Y.length===0&&t.createElement("span",{className:"k-input-value-text"},ue)),n.loading&&t.createElement(i.IconWrap,{className:"k-input-loading-icon",name:"loading"}),ie&&!x&&Y.length>0&&t.createElement(ot,{onClick:oe}),t.createElement("select",{name:Re,ref:H,tabIndex:-1,"aria-hidden":!0,title:L,style:{opacity:0,width:1,border:0,zIndex:-1,position:"absolute",left:"50%"}},t.createElement("option",{value:n.valueMap?n.valueMap.call(void 0,g):g})),!O&&t.createElement(et.Popup,{...N,popupClass:i.classNames(N.popupClass,"k-multiselecttree-popup"),className:i.classNames(N.className,{"k-rtl":D==="rtl"}),style:Ve,anchor:N.anchor||F.current,show:l,onOpen:ze,onClose:_e,ref:U},n.filterable&&t.createElement(Ie,{value:n.filter===void 0?he:n.filter,ref:M,onChange:Ce,onKeyDown:ye,tabIndex:j,size:y,rounded:V,fillMode:z,renderListFilterWrapper:!0,renderPrefixSeparator:!0}),B.length>0?t.createElement(we.TreeView,{style:{height:N.height},ref:S,tabIndex:j,data:B,focusIdField:K,textField:n.textField,checkField:pe,checkIndeterminateField:fe,expandField:n.expandField,childrenField:ge,expandIcons:!0,onItemClick:J,onCheckChange:J,onExpandChange:be,checkboxes:!0,size:y,item:n.item,dir:D}):t.createElement(Ee,null,X.toLanguageString(m.nodata,m.messages[m.nodata])))),O&&Qe());return L?t.createElement(it.FloatingLabel,{label:L,editorValue:ie,editorPlaceholder:ue,editorValid:Fe,editorDisabled:x,editorId:T,style:{width:A?A.width:void 0},children:xe,dir:D}):xe}),vt={opened:a.bool,disabled:a.bool,dir:a.string,tabIndex:a.number,accessKey:a.string,data:a.array,value:a.any,valueMap:a.func,placeholder:a.string,dataItemKey:a.string.isRequired,textField:a.string.isRequired,checkField:a.string,checkIndeterminateField:a.string,expandField:a.string,subItemsField:a.string,className:a.string,style:a.object,label:a.string,validationMessage:a.string,validityStyles:a.bool,valid:a.bool,required:a.bool,name:a.string,id:a.string,ariaLabelledBy:a.string,ariaDescribedBy:a.string,filterable:a.bool,filter:a.string,loading:a.bool,tags:a.arrayOf(a.shape({text:a.string,data:a.arrayOf(a.any)})),popupSettings:a.shape({animate:a.oneOfType([a.bool,a.shape({openDuration:a.number,closeDuration:a.number})]),popupClass:a.string,className:a.string,appendTo:a.any,width:a.oneOfType([a.string,a.number]),height:a.oneOfType([a.string,a.number])}),onOpen:a.func,onClose:a.func,onFocus:a.func,onBlur:a.func,onChange:a.func,onFilterChange:a.func,onExpandChange:a.func,onCancel:a.func,item:a.func,listNoData:a.func,adaptiveTitle:a.string,adaptive:a.bool};ce.displayName="KendoReactMultiSelectTree";ce.propTypes=vt;exports.MultiSelectTree=ce;exports.MultiSelectTreePropsContext=Ke;
|