@progress/kendo-react-dropdowns 9.0.0-develop.2 → 9.0.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.mjs +67 -29
- package/DropDownTree/useDropdownWidth.mjs +3 -6
- package/MultiColumnComboBox/MultiColumnComboBox.mjs +144 -141
- package/MultiSelectTree/utils.js +1 -1
- package/MultiSelectTree/utils.mjs +12 -19
- package/README.md +44 -43
- package/common/GroupStickyHeader.mjs +1 -5
- package/common/List.js +1 -1
- package/common/List.mjs +63 -71
- package/common/ListContainer.mjs +1 -7
- package/common/ListDefaultItem.mjs +1 -5
- package/common/ListFilter.mjs +9 -5
- package/common/ListGroupItem.mjs +8 -8
- package/common/ListItem.mjs +10 -18
- package/common/MultiColumnList.mjs +3 -6
- package/common/Navigation.mjs +12 -2
- package/common/utils.mjs +3 -1
- package/dist/cdn/js/kendo-react-dropdowns.js +1 -1
- package/index.d.mts +0 -2
- package/index.d.ts +0 -2
- package/package-metadata.mjs +1 -1
- package/package.json +9 -9
package/README.md
CHANGED
|
@@ -5,10 +5,11 @@
|
|
|
5
5
|
# KendoReact DropDowns Library for React
|
|
6
6
|
|
|
7
7
|
> **Important**
|
|
8
|
-
>
|
|
9
|
-
>
|
|
10
|
-
>
|
|
11
|
-
>
|
|
8
|
+
>
|
|
9
|
+
> - This package is а part of [KendoReact](https://www.telerik.com/kendo-react-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-dropdowns)—a commercial UI library.
|
|
10
|
+
> - You will need to install a license key when adding the package to your project. For more information, please refer to the [KendoReact My License page](https://www.telerik.com/kendo-react-ui/components/my-license/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-dropdowns).
|
|
11
|
+
> - To receive a license key, you need to either [purchase a license](https://www.telerik.com/kendo-react-ui/pricing?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-dropdowns) or register for a [free trial](https://www.telerik.com/try/kendo-react-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-dropdowns). Doing so indicates that you [accept the KendoReact License Agreement](https://www.telerik.com/purchase/license-agreement/progress-kendoreact?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-dropdowns).
|
|
12
|
+
> - The 30-day free trial gives you access to all the KendoReact components and their full functionality. Additionally, for the period of your license, you get access to our legendary technical support provided directly by the KendoReact dev team!
|
|
12
13
|
>
|
|
13
14
|
> [Start using KendoReact](https://www.telerik.com/try/kendo-react-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-dropdowns) and speed up your development process!
|
|
14
15
|
|
|
@@ -16,16 +17,16 @@ The React DropDowns, part of KendoReact, offer a highly customizable interface f
|
|
|
16
17
|
|
|
17
18
|
What's in this package (ToC):
|
|
18
19
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
20
|
+
- [React AutoComplete component](#react-autocomplete-component)
|
|
21
|
+
- [React ComboBox component](#react-combobox-component)
|
|
22
|
+
- [React MultiColumnComboBox component](#react-multicolumncombobox-component)
|
|
23
|
+
- [React DropDown List component](#react-dropdown-list-component)
|
|
24
|
+
- [React DropDownTree component](#react-dropdowntree-component)
|
|
25
|
+
- [React MultiSelect component](#react-multiselect-component)
|
|
26
|
+
- [React MultiSelectTree component](#react-multiselecttree-component)
|
|
27
|
+
- [React DropDowns Components Library Features](#react-dropdowns-components-library-features)
|
|
28
|
+
- [Support Options](#support-options)
|
|
29
|
+
- [Resources](#resources)
|
|
29
30
|
|
|
30
31
|
## React AutoComplete Component
|
|
31
32
|
|
|
@@ -59,45 +60,45 @@ A combination of a TreeView and a DropDown component, [the KendoReact DropDownTr
|
|
|
59
60
|
|
|
60
61
|
Among the many features which the KendoReact DropDowns deliver are:
|
|
61
62
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
63
|
+
- **Controlled state**—Control the value and popup state of the DropDowns.
|
|
64
|
+
- **Filtering**—Filter the data of the DropDowns to easily find any value in a large dataset.
|
|
65
|
+
- **Disabled state**—To disable user input or selection, just change a single property.
|
|
66
|
+
- **Virtualization support**—The virtualization helps when displaying large sets of data.
|
|
67
|
+
- **Custom rendering**—You can replace the value and the popup list item renders with custom ones.
|
|
68
|
+
- **Setting the default value**—Easily configure the initial value that the DropDowns render.
|
|
69
|
+
- **Form validation**—Validate the values, set validation requirements, and prevent the submission of forms which are in invalid state.
|
|
70
|
+
- **Accessibility support**—The DropDowns are compliant with WAI-ARIA, Section 508, and provide keyboard navigation.
|
|
71
|
+
- [Theme support](https://www.telerik.com/kendo-react-ui/components/styling/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-dropdowns)—The KendoReact DropDowns, as well as all 100+ components in the KendoReact suite, are styled in three polished themes (Bootstrap, Material, and Default) and can be further customized to match your specific design guidelines.
|
|
71
72
|
|
|
72
73
|
## Support Options
|
|
73
74
|
|
|
74
75
|
For any issues you might encounter while working with the KendoReact DropDowns, use any of the available support channels:
|
|
75
76
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
77
|
+
- Industry-leading technical support—KendoReact paid license holders and users with an active (free) trial license can take advantage of our outstanding customer support. To submit a ticket, use [the dedicated KendoReact support system](https://www.telerik.com/account/support-tickets?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-dropdowns).
|
|
78
|
+
- Product forums—The [KendoReact forums](https://www.telerik.com/forums/kendo-ui-react?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-dropdowns) are part of the free support you can get from the community and from the KendoReact team.
|
|
79
|
+
- Feedback portal—The [KendoReact feedback portal](https://feedback.telerik.com/kendo-react-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-dropdowns) is where you can request and vote for new features to be added.
|
|
79
80
|
|
|
80
81
|
## Resources
|
|
81
82
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
83
|
+
- [Getting Started with KendoReact](https://www.telerik.com/kendo-react-ui/components/getting-started/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-dropdowns)
|
|
84
|
+
- [Getting Started with the KendoReact DropDowns](https://www.telerik.com/kendo-react-ui/components/dropdowns/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-dropdowns)
|
|
85
|
+
- [API Reference of the KendoReact DropDowns](https://www.telerik.com/kendo-react-ui/components/dropdowns/api/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-dropdowns)
|
|
86
|
+
- [KendoReact Roadmap](https://www.telerik.com/support/whats-new/kendo-react-ui/roadmap?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-dropdowns)
|
|
87
|
+
- [Blogs](https://www.telerik.com/blogs/tag/kendoreact?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-dropdowns)
|
|
88
|
+
- [Demos, documentation, and component reference](https://www.telerik.com/kendo-react-ui/components/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-dropdowns)
|
|
89
|
+
- [KendoReact pricing and licensing](https://www.telerik.com/kendo-react-ui/pricing?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-dropdowns)
|
|
90
|
+
- [Changelog](https://www.telerik.com/kendo-react-ui/components/changelogs/ui-for-react/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-dropdowns)
|
|
90
91
|
|
|
91
92
|
High-level component overview pages
|
|
92
93
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
94
|
+
- [React AutoComplete Component](https://www.telerik.com/kendo-react-ui/autocomplete)
|
|
95
|
+
- [React ComboBox Component](https://www.telerik.com/kendo-react-ui/combobox)
|
|
96
|
+
- [React DropDownList Component](https://www.telerik.com/kendo-react-ui/dropdownlist)
|
|
97
|
+
- [React DropDownTree Component](https://www.telerik.com/kendo-react-ui/dropdowntree)
|
|
98
|
+
- [React MultiColumn ComboBox Component](https://www.telerik.com/kendo-react-ui/multicolumncombobox)
|
|
99
|
+
- [React MultiSelect Component](https://www.telerik.com/kendo-react-ui/multiselect)
|
|
100
|
+
- [React MultiSelectTree Component](https://www.telerik.com/kendo-react-ui/multiselecttree)
|
|
100
101
|
|
|
101
|
-
|
|
102
|
+
_Copyright © 2024 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved._
|
|
102
103
|
|
|
103
|
-
|
|
104
|
+
_Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries._
|
|
@@ -9,11 +9,7 @@
|
|
|
9
9
|
import { useUnstyled as i, classNames as c, uDropDownsBase as d } from "@progress/kendo-react-common";
|
|
10
10
|
import * as l from "react";
|
|
11
11
|
const m = (e) => {
|
|
12
|
-
const {
|
|
13
|
-
group: s,
|
|
14
|
-
groupMode: n,
|
|
15
|
-
render: t
|
|
16
|
-
} = e, r = i(), a = r && r.uDropDownsBase, o = /* @__PURE__ */ l.createElement("div", { className: c(d.groupStickyHeader({ c: a })) }, n === "classic" ? s : /* @__PURE__ */ l.createElement("div", { className: c(d.listHeaderText({ c: a })) }, s));
|
|
12
|
+
const { group: s, groupMode: n, render: t } = e, r = i(), a = r && r.uDropDownsBase, o = /* @__PURE__ */ l.createElement("div", { className: c(d.groupStickyHeader({ c: a })) }, n === "classic" ? s : /* @__PURE__ */ l.createElement("div", { className: c(d.listHeaderText({ c: a })) }, s));
|
|
17
13
|
return t !== void 0 ? t.call(void 0, o, e) : o;
|
|
18
14
|
};
|
|
19
15
|
export {
|
package/common/List.js
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use client";"use strict";const
|
|
8
|
+
"use client";"use strict";const U=require("react"),J=require("./ListItem.js"),K=require("./ListGroupItem.js"),f=require("./utils.js"),Q=require("@progress/kendo-react-intl"),S=require("../messages/index.js"),n=require("@progress/kendo-react-common");function W(e){const l=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(l,t,r.get?r:{enumerable:!0,get:()=>e[t]})}}return l.default=e,Object.freeze(l)}const s=W(U),X=e=>{const l=Q.useLocalization(),t=n.useUnstyled(),r=t&&t.uDropDownsBase,{id:q,show:B,wrapperCssClass:M,wrapperStyle:z,listStyle:L,listRef:O,wrapperRef:j,listClassName:x,ariaSetSize:$}=e,b=(()=>{const{textField:i,valueField:c,groupField:g,groupMode:w,isMultiColumn:F,optionsGuid:C,skip:N=0,virtual:R,focusedIndex:h,hasDuplicates:G,highlightSelected:V=!0,value:u,data:E,itemRender:_,groupHeaderItemRender:P}=e,k=Array.isArray(u);let D=0;return E.map((a,o)=>{const p=N+o,v=N+o+D,H=G?u?h===o:!1:a.disabled?!1:V&&(!k&&f.areSame(a,u,c)||k&&u.findIndex(T=>f.areSame(T,a,c))!==-1);let d,m,y;o>0&&g!==void 0&&(m=f.getItemValue(a,g),y=f.getItemValue(E[o-1],g),m&&y&&m!==y&&(d=m));const I=d!==void 0&&w==="modern";return I?D+=1:D=0,[I&&s.createElement(K,{id:`option-${C}-${v}`,virtual:R,key:p+"-group-item",group:d,isMultiColumn:F,render:P}),s.createElement(J,{id:`option-${C}-${I?v+1:v}`,virtual:R,dataItem:a,groupMode:w,selected:H,focused:h===o,index:p,key:p,onClick:e.onClick,textField:i,group:d,render:_,disabled:a.disabled})]})})(),A=()=>{const i=e.noDataRender,c=s.createElement("div",{className:n.classNames(n.uDropDownsBase.noData({c:r}))},s.createElement("div",null,l.toLanguageString(S.nodata,S.messages[S.nodata])));return i?i.call(void 0,c):c};return b.length?s.createElement("div",{className:M,style:z,ref:j,onMouseDown:e.onMouseDown,onBlur:e.onBlur,onScroll:e.onScroll,unselectable:"on"},s.createElement("ul",{id:q,role:"listbox","aria-hidden":B?void 0:!0,"aria-setsize":$,className:x||n.classNames(n.uDropDownsBase.ul({c:r})),ref:O,style:L},b),e.scroller&&s.createElement("div",{className:n.classNames(n.uDropDownsBase.heightContainer({c:r}))},e.scroller)):A()};module.exports=X;
|
package/common/List.mjs
CHANGED
|
@@ -7,87 +7,79 @@
|
|
|
7
7
|
*/
|
|
8
8
|
"use client";
|
|
9
9
|
import * as t from "react";
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import { areSame as
|
|
13
|
-
import { useLocalization as
|
|
14
|
-
import { nodata as
|
|
15
|
-
import { useUnstyled as
|
|
10
|
+
import T from "./ListItem.mjs";
|
|
11
|
+
import W from "./ListGroupItem.mjs";
|
|
12
|
+
import { areSame as b, getItemValue as k } from "./utils.mjs";
|
|
13
|
+
import { useLocalization as X } from "@progress/kendo-react-intl";
|
|
14
|
+
import { nodata as B, messages as Y } from "../messages/index.mjs";
|
|
15
|
+
import { useUnstyled as Z, classNames as v, uDropDownsBase as y } from "@progress/kendo-react-common";
|
|
16
16
|
const le = (e) => {
|
|
17
|
-
const
|
|
18
|
-
id: L,
|
|
19
|
-
show: z,
|
|
20
|
-
wrapperCssClass: M,
|
|
21
|
-
wrapperStyle: $,
|
|
22
|
-
listStyle: x,
|
|
23
|
-
listRef: A,
|
|
24
|
-
wrapperRef: F,
|
|
25
|
-
listClassName: G,
|
|
26
|
-
ariaSetSize: V
|
|
27
|
-
} = e, D = (() => {
|
|
17
|
+
const L = X(), D = Z(), d = D && D.uDropDownsBase, { id: M, show: z, wrapperCssClass: $, wrapperStyle: x, listStyle: A, listRef: F, wrapperRef: G, listClassName: V, ariaSetSize: H } = e, I = (() => {
|
|
28
18
|
const {
|
|
29
|
-
textField:
|
|
30
|
-
valueField:
|
|
31
|
-
groupField:
|
|
32
|
-
groupMode:
|
|
33
|
-
isMultiColumn:
|
|
34
|
-
optionsGuid:
|
|
35
|
-
skip:
|
|
36
|
-
virtual:
|
|
37
|
-
focusedIndex:
|
|
38
|
-
hasDuplicates:
|
|
39
|
-
highlightSelected:
|
|
40
|
-
value:
|
|
41
|
-
data:
|
|
42
|
-
itemRender:
|
|
43
|
-
groupHeaderItemRender:
|
|
44
|
-
} = e,
|
|
45
|
-
let
|
|
46
|
-
return
|
|
47
|
-
const m =
|
|
48
|
-
let
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
19
|
+
textField: s,
|
|
20
|
+
valueField: a,
|
|
21
|
+
groupField: c,
|
|
22
|
+
groupMode: S,
|
|
23
|
+
isMultiColumn: j,
|
|
24
|
+
optionsGuid: h,
|
|
25
|
+
skip: C = 0,
|
|
26
|
+
virtual: E,
|
|
27
|
+
focusedIndex: w,
|
|
28
|
+
hasDuplicates: q,
|
|
29
|
+
highlightSelected: J = !0,
|
|
30
|
+
value: l,
|
|
31
|
+
data: N,
|
|
32
|
+
itemRender: K,
|
|
33
|
+
groupHeaderItemRender: O
|
|
34
|
+
} = e, R = Array.isArray(l);
|
|
35
|
+
let u = 0;
|
|
36
|
+
return N.map((r, o) => {
|
|
37
|
+
const m = C + o, f = C + o + u, P = q ? l ? w === o : !1 : r.disabled ? !1 : J && (!R && b(r, l, a) || R && l.findIndex((Q) => b(Q, r, a)) !== -1);
|
|
38
|
+
let n, i, g;
|
|
39
|
+
o > 0 && c !== void 0 && (i = k(r, c), g = k(N[o - 1], c), i && g && i !== g && (n = i));
|
|
40
|
+
const p = n !== void 0 && S === "modern";
|
|
41
|
+
return p ? u += 1 : u = 0, [
|
|
42
|
+
p && /* @__PURE__ */ t.createElement(
|
|
43
|
+
W,
|
|
52
44
|
{
|
|
53
|
-
id: `option-${
|
|
54
|
-
virtual:
|
|
45
|
+
id: `option-${h}-${f}`,
|
|
46
|
+
virtual: E,
|
|
55
47
|
key: m + "-group-item",
|
|
56
|
-
group:
|
|
57
|
-
isMultiColumn:
|
|
58
|
-
render:
|
|
48
|
+
group: n,
|
|
49
|
+
isMultiColumn: j,
|
|
50
|
+
render: O
|
|
59
51
|
}
|
|
60
52
|
),
|
|
61
53
|
/* @__PURE__ */ t.createElement(
|
|
62
|
-
|
|
54
|
+
T,
|
|
63
55
|
{
|
|
64
|
-
id: `option-${
|
|
65
|
-
virtual:
|
|
66
|
-
dataItem:
|
|
67
|
-
groupMode:
|
|
68
|
-
selected:
|
|
69
|
-
focused:
|
|
56
|
+
id: `option-${h}-${p ? f + 1 : f}`,
|
|
57
|
+
virtual: E,
|
|
58
|
+
dataItem: r,
|
|
59
|
+
groupMode: S,
|
|
60
|
+
selected: P,
|
|
61
|
+
focused: w === o,
|
|
70
62
|
index: m,
|
|
71
63
|
key: m,
|
|
72
64
|
onClick: e.onClick,
|
|
73
|
-
textField:
|
|
74
|
-
group:
|
|
75
|
-
render:
|
|
76
|
-
disabled:
|
|
65
|
+
textField: s,
|
|
66
|
+
group: n,
|
|
67
|
+
render: K,
|
|
68
|
+
disabled: r.disabled
|
|
77
69
|
}
|
|
78
70
|
)
|
|
79
71
|
];
|
|
80
72
|
});
|
|
81
|
-
})(),
|
|
82
|
-
const
|
|
83
|
-
return
|
|
73
|
+
})(), U = () => {
|
|
74
|
+
const s = e.noDataRender, a = /* @__PURE__ */ t.createElement("div", { className: v(y.noData({ c: d })) }, /* @__PURE__ */ t.createElement("div", null, L.toLanguageString(B, Y[B])));
|
|
75
|
+
return s ? s.call(void 0, a) : a;
|
|
84
76
|
};
|
|
85
|
-
return
|
|
77
|
+
return I.length ? /* @__PURE__ */ t.createElement(
|
|
86
78
|
"div",
|
|
87
79
|
{
|
|
88
|
-
className:
|
|
89
|
-
style:
|
|
90
|
-
ref:
|
|
80
|
+
className: $,
|
|
81
|
+
style: x,
|
|
82
|
+
ref: G,
|
|
91
83
|
onMouseDown: e.onMouseDown,
|
|
92
84
|
onBlur: e.onBlur,
|
|
93
85
|
onScroll: e.onScroll,
|
|
@@ -96,18 +88,18 @@ const le = (e) => {
|
|
|
96
88
|
/* @__PURE__ */ t.createElement(
|
|
97
89
|
"ul",
|
|
98
90
|
{
|
|
99
|
-
id:
|
|
91
|
+
id: M,
|
|
100
92
|
role: "listbox",
|
|
101
93
|
"aria-hidden": z ? void 0 : !0,
|
|
102
|
-
"aria-setsize":
|
|
103
|
-
className:
|
|
104
|
-
ref:
|
|
105
|
-
style:
|
|
94
|
+
"aria-setsize": H,
|
|
95
|
+
className: V || v(y.ul({ c: d })),
|
|
96
|
+
ref: F,
|
|
97
|
+
style: A
|
|
106
98
|
},
|
|
107
|
-
|
|
99
|
+
I
|
|
108
100
|
),
|
|
109
|
-
e.scroller && /* @__PURE__ */ t.createElement("div", { className:
|
|
110
|
-
) :
|
|
101
|
+
e.scroller && /* @__PURE__ */ t.createElement("div", { className: v(y.heightContainer({ c: d })) }, e.scroller)
|
|
102
|
+
) : U();
|
|
111
103
|
};
|
|
112
104
|
export {
|
|
113
105
|
le as default
|
package/common/ListContainer.mjs
CHANGED
|
@@ -9,13 +9,7 @@
|
|
|
9
9
|
import * as s from "react";
|
|
10
10
|
import { Popup as c } from "@progress/kendo-react-popup";
|
|
11
11
|
const a = (e) => {
|
|
12
|
-
const {
|
|
13
|
-
children: n,
|
|
14
|
-
width: o,
|
|
15
|
-
dir: i,
|
|
16
|
-
itemsCount: t,
|
|
17
|
-
popupSettings: r
|
|
18
|
-
} = e;
|
|
12
|
+
const { children: n, width: o, dir: i, itemsCount: t, popupSettings: r } = e;
|
|
19
13
|
return /* @__PURE__ */ s.createElement(
|
|
20
14
|
c,
|
|
21
15
|
{
|
|
@@ -10,11 +10,7 @@ import * as a from "react";
|
|
|
10
10
|
import { useUnstyled as c, classNames as u, uDropDownsBase as r } from "@progress/kendo-react-common";
|
|
11
11
|
import { getItemValue as i } from "./utils.mjs";
|
|
12
12
|
const m = (e) => e.preventDefault(), p = (e) => {
|
|
13
|
-
const {
|
|
14
|
-
selected: s,
|
|
15
|
-
defaultItem: o,
|
|
16
|
-
textField: n
|
|
17
|
-
} = e, t = c(), l = t && t.uDropDownsBase;
|
|
13
|
+
const { selected: s, defaultItem: o, textField: n } = e, t = c(), l = t && t.uDropDownsBase;
|
|
18
14
|
return /* @__PURE__ */ a.createElement(
|
|
19
15
|
"div",
|
|
20
16
|
{
|
package/common/ListFilter.mjs
CHANGED
|
@@ -13,11 +13,15 @@ import { searchIcon as g } from "@progress/kendo-svg-icons";
|
|
|
13
13
|
import { useUnstyled as h, classNames as l, uDropDownsBase as a, IconWrap as D } from "@progress/kendo-react-common";
|
|
14
14
|
const u = n.forwardRef((r, c) => {
|
|
15
15
|
const o = n.useRef(null), { renderListFilterWrapper: m = !1, renderPrefixSeparator: d = !1, ...f } = r, s = h(), t = s && s.uDropDownsBase;
|
|
16
|
-
n.useImperativeHandle(
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
16
|
+
n.useImperativeHandle(c, () => o.current);
|
|
17
|
+
const p = () => /* @__PURE__ */ n.createElement(n.Fragment, null, /* @__PURE__ */ n.createElement(b, null, /* @__PURE__ */ n.createElement(
|
|
18
|
+
D,
|
|
19
|
+
{
|
|
20
|
+
name: "search",
|
|
21
|
+
icon: g,
|
|
22
|
+
className: l(a.inputIcon({ c: t }))
|
|
23
|
+
}
|
|
24
|
+
)), d && /* @__PURE__ */ n.createElement(I, null)), i = /* @__PURE__ */ n.createElement(
|
|
21
25
|
y,
|
|
22
26
|
{
|
|
23
27
|
...f,
|
package/common/ListGroupItem.mjs
CHANGED
|
@@ -9,13 +9,7 @@
|
|
|
9
9
|
import { useUnstyled as d, classNames as i, uDropDownsBase as l } from "@progress/kendo-react-common";
|
|
10
10
|
import * as n from "react";
|
|
11
11
|
const g = (t) => {
|
|
12
|
-
const {
|
|
13
|
-
group: u,
|
|
14
|
-
virtual: c,
|
|
15
|
-
render: e,
|
|
16
|
-
isMultiColumn: s = !1,
|
|
17
|
-
id: m
|
|
18
|
-
} = t, o = d(), r = o && o.uDropDownsBase, a = /* @__PURE__ */ n.createElement(
|
|
12
|
+
const { group: u, virtual: c, render: e, isMultiColumn: s = !1, id: m } = t, o = d(), r = o && o.uDropDownsBase, a = /* @__PURE__ */ n.createElement(
|
|
19
13
|
"li",
|
|
20
14
|
{
|
|
21
15
|
id: m,
|
|
@@ -23,7 +17,13 @@ const g = (t) => {
|
|
|
23
17
|
className: i(l.groupLi({ c: r, isMultiColumn: s })),
|
|
24
18
|
style: s ? { boxSizing: "inherit" } : { position: c ? "relative" : "unset" }
|
|
25
19
|
},
|
|
26
|
-
/* @__PURE__ */ n.createElement(
|
|
20
|
+
/* @__PURE__ */ n.createElement(
|
|
21
|
+
"span",
|
|
22
|
+
{
|
|
23
|
+
className: e ? void 0 : i(l.groupItemText({ c: r, isMultiColumn: s }))
|
|
24
|
+
},
|
|
25
|
+
u
|
|
26
|
+
)
|
|
27
27
|
);
|
|
28
28
|
return e !== void 0 ? e.call(void 0, a, t) : a;
|
|
29
29
|
};
|
package/common/ListItem.mjs
CHANGED
|
@@ -10,30 +10,22 @@ import * as a from "react";
|
|
|
10
10
|
import { useUnstyled as B, classNames as l, uDropDownsBase as i } from "@progress/kendo-react-common";
|
|
11
11
|
import { getItemValue as C } from "./utils.mjs";
|
|
12
12
|
const b = (e) => {
|
|
13
|
-
const {
|
|
14
|
-
selected: o,
|
|
15
|
-
group: t,
|
|
16
|
-
dataItem: u,
|
|
17
|
-
virtual: v,
|
|
18
|
-
groupMode: c,
|
|
19
|
-
disabled: n,
|
|
20
|
-
id: f,
|
|
21
|
-
focused: g,
|
|
22
|
-
render: r
|
|
23
|
-
} = e, d = B(), s = d && d.uDropDownsBase, p = (x) => e.onClick(e.index, x), m = /* @__PURE__ */ a.createElement(
|
|
13
|
+
const { selected: o, group: t, dataItem: u, virtual: v, groupMode: c, disabled: n, id: f, focused: g, render: r } = e, d = B(), s = d && d.uDropDownsBase, p = (x) => e.onClick(e.index, x), m = /* @__PURE__ */ a.createElement(
|
|
24
14
|
"li",
|
|
25
15
|
{
|
|
26
16
|
id: f,
|
|
27
17
|
role: "option",
|
|
28
18
|
"aria-selected": o,
|
|
29
19
|
"aria-disabled": n ? !0 : void 0,
|
|
30
|
-
className: l(
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
20
|
+
className: l(
|
|
21
|
+
i.li({
|
|
22
|
+
c: s,
|
|
23
|
+
selected: o,
|
|
24
|
+
focused: g,
|
|
25
|
+
first: !!t && c === "classic",
|
|
26
|
+
disabled: n
|
|
27
|
+
})
|
|
28
|
+
),
|
|
37
29
|
onClick: p,
|
|
38
30
|
style: { position: v ? "relative" : "unset" }
|
|
39
31
|
},
|
|
@@ -14,12 +14,9 @@ const r = (t) => /* @__PURE__ */ l.createElement(
|
|
|
14
14
|
{
|
|
15
15
|
...t,
|
|
16
16
|
wrapperCssClass: "k-table-body k-table-scroller",
|
|
17
|
-
listClassName: s(
|
|
18
|
-
"k-
|
|
19
|
-
|
|
20
|
-
"k-virtual-table": t.virtual !== void 0
|
|
21
|
-
}
|
|
22
|
-
),
|
|
17
|
+
listClassName: s("k-table k-table-list", {
|
|
18
|
+
"k-virtual-table": t.virtual !== void 0
|
|
19
|
+
}),
|
|
23
20
|
listStyle: { ...t.listStyle }
|
|
24
21
|
}
|
|
25
22
|
);
|
package/common/Navigation.mjs
CHANGED
|
@@ -12,9 +12,19 @@ class o {
|
|
|
12
12
|
navigate(e) {
|
|
13
13
|
const t = e.keyCode;
|
|
14
14
|
if (t === n.up || t === n.left)
|
|
15
|
-
return this.next({
|
|
15
|
+
return this.next({
|
|
16
|
+
current: e.current,
|
|
17
|
+
min: e.min,
|
|
18
|
+
max: e.max,
|
|
19
|
+
step: e.skipItems ? e.skipItems : -1
|
|
20
|
+
});
|
|
16
21
|
if (t === n.down || t === n.right)
|
|
17
|
-
return this.next({
|
|
22
|
+
return this.next({
|
|
23
|
+
current: e.current,
|
|
24
|
+
min: e.min,
|
|
25
|
+
max: e.max,
|
|
26
|
+
step: e.skipItems ? e.skipItems : 1
|
|
27
|
+
});
|
|
18
28
|
if (t === n.home)
|
|
19
29
|
return 0;
|
|
20
30
|
if (t === n.end)
|
package/common/utils.mjs
CHANGED
|
@@ -89,7 +89,9 @@ const l = (e) => e != null, d = (e, t) => {
|
|
|
89
89
|
}, S = (e) => {
|
|
90
90
|
e.target.nodeName !== "INPUT" && e.preventDefault();
|
|
91
91
|
}, y = (e, t, r) => !!e != !!t || e.text !== t.text ? !1 : e === t || a(e.data, t.data, r), N = (e) => {
|
|
92
|
-
const t = e.filter(
|
|
92
|
+
const t = e.filter(
|
|
93
|
+
(r, n) => e.some((s, o) => s === r && o !== n)
|
|
94
|
+
);
|
|
93
95
|
return Array.from(new Set(t));
|
|
94
96
|
}, O = (e) => {
|
|
95
97
|
const { data: t = [], groupField: r } = e;
|