@progress/kendo-react-dropdowns 9.0.0-develop.1 → 9.0.0-develop.10

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/README.md CHANGED
@@ -5,10 +5,11 @@
5
5
  # KendoReact DropDowns Library for React
6
6
 
7
7
  > **Important**
8
- > * 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.
9
- > * 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).
10
- > * 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).
11
- > * 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!
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
- * [React AutoComplete component](#react-autocomplete-component)
20
- * [React ComboBox component](#react-combobox-component)
21
- * [React MultiColumnComboBox component](#react-multicolumncombobox-component)
22
- * [React DropDown List component](#react-dropdown-list-component)
23
- * [React DropDownTree component](#react-dropdowntree-component)
24
- * [React MultiSelect component](#react-multiselect-component)
25
- * [React MultiSelectTree component](#react-multiselecttree-component)
26
- * [React DropDowns Components Library Features](#react-dropdowns-components-library-features)
27
- * [Support Options](#support-options)
28
- * [Resources](#resources)
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
- * **Controlled state**—Control the value and popup state of the DropDowns.
63
- * **Filtering**—Filter the data of the DropDowns to easily find any value in a large dataset.
64
- * **Disabled state**—To disable user input or selection, just change a single property.
65
- * **Virtualization support**—The virtualization helps when displaying large sets of data.
66
- * **Custom rendering**—You can replace the value and the popup list item renders with custom ones.
67
- * **Setting the default value**—Easily configure the initial value that the DropDowns render.
68
- * **Form validation**—Validate the values, set validation requirements, and prevent the submission of forms which are in invalid state.
69
- * **Accessibility support**—The DropDowns are compliant with WAI-ARIA, Section 508, and provide keyboard navigation.
70
- * [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.
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
- * 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).
77
- * 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.
78
- * 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.
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
- * [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)
83
- * [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)
84
- * [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)
85
- * [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)
86
- * [Blogs](https://www.telerik.com/blogs/tag/kendoreact?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-dropdowns)
87
- * [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)
88
- * [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)
89
- * [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)
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
- * [React AutoComplete Component](https://www.telerik.com/kendo-react-ui/autocomplete)
94
- * [React ComboBox Component](https://www.telerik.com/kendo-react-ui/combobox)
95
- * [React DropDownList Component](https://www.telerik.com/kendo-react-ui/dropdownlist)
96
- * [React DropDownTree Component](https://www.telerik.com/kendo-react-ui/dropdowntree)
97
- * [React MultiColumn ComboBox Component](https://www.telerik.com/kendo-react-ui/multicolumncombobox)
98
- * [React MultiSelect Component](https://www.telerik.com/kendo-react-ui/multiselect)
99
- * [React MultiSelectTree Component](https://www.telerik.com/kendo-react-ui/multiselecttree)
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
- *Copyright © 2024 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved.*
102
+ _Copyright © 2024 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved._
102
103
 
103
- *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.*
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 T=require("react"),U=require("./ListItem.js"),J=require("./ListGroupItem.js"),f=require("./utils.js"),K=require("@progress/kendo-react-intl"),I=require("../messages/index.js"),n=require("@progress/kendo-react-common");function Q(e){const c=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const s=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(c,t,s.get?s:{enumerable:!0,get:()=>e[t]})}}return c.default=e,Object.freeze(c)}const r=Q(T),W=e=>{const c=K.useLocalization(),t=n.useUnstyled(),s=t&&t.uDropDownsBase,{id:k,show:q,wrapperCssClass:B,wrapperStyle:z,listStyle:L,listRef:M,wrapperRef:O,listClassName:j,ariaSetSize:x}=e,S=(()=>{const{textField:u,valueField:i,groupField:v,groupMode:d,isMultiColumn:A,optionsGuid:b,skip:w=0,virtual:C,focusedIndex:N,hasDuplicates:F,highlightSelected:V=!0,value:m,data:R,itemRender:_,groupHeaderItemRender:G}=e,h=Array.isArray(m);let E=0;return R.map((a,o)=>{const D=w+o,p=w+o+E,P=F?m?N===o:!1:a.disabled?!1:V&&(!h&&f.areSame(a,m,i)||h&&m.findIndex(H=>f.areSame(H,a,i))!==-1);let l,g,y;return o>0&&v!==void 0&&(g=f.getItemValue(a,v),y=f.getItemValue(R[o-1],v),g&&y&&g!==y&&(l=g)),l!==void 0&&d==="modern"&&(E+=1),[l!==void 0&&d==="modern"&&r.createElement(J,{id:`option-${b}-${p}`,virtual:C,key:D+"-group-item",group:l,isMultiColumn:A,render:G}),r.createElement(U,{id:`option-${b}-${l!==void 0&&d==="modern"?p+1:p}`,virtual:C,dataItem:a,groupMode:d,selected:P,focused:N===o,index:D,key:D,onClick:e.onClick,textField:u,group:l,render:_,disabled:a.disabled})]})})(),$=()=>{const u=e.noDataRender,i=r.createElement("div",{className:n.classNames(n.uDropDownsBase.noData({c:s}))},r.createElement("div",null,c.toLanguageString(I.nodata,I.messages[I.nodata])));return u?u.call(void 0,i):i};return S.length?r.createElement("div",{className:B,style:z,ref:O,onMouseDown:e.onMouseDown,onBlur:e.onBlur,onScroll:e.onScroll,unselectable:"on"},r.createElement("ul",{id:k,role:"listbox","aria-hidden":q?void 0:!0,"aria-setsize":x,className:j||n.classNames(n.uDropDownsBase.ul({c:s})),ref:M,style:L},S),e.scroller&&r.createElement("div",{className:n.classNames(n.uDropDownsBase.heightContainer({c:s}))},e.scroller)):$()};module.exports=W;
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 Q from "./ListItem.mjs";
11
- import T from "./ListGroupItem.mjs";
12
- import { areSame as R, getItemValue as b } from "./utils.mjs";
13
- import { useLocalization as W } from "@progress/kendo-react-intl";
14
- import { nodata as k, messages as X } from "../messages/index.mjs";
15
- import { useUnstyled as Y, classNames as g, uDropDownsBase as p } from "@progress/kendo-react-common";
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 B = W(), y = Y(), c = y && y.uDropDownsBase, {
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: n,
30
- valueField: l,
31
- groupField: u,
32
- groupMode: s,
33
- isMultiColumn: U,
34
- optionsGuid: I,
35
- skip: S = 0,
36
- virtual: h,
37
- focusedIndex: C,
38
- hasDuplicates: j,
39
- highlightSelected: q = !0,
40
- value: i,
41
- data: E,
42
- itemRender: J,
43
- groupHeaderItemRender: K
44
- } = e, w = Array.isArray(i);
45
- let N = 0;
46
- return E.map((o, r) => {
47
- const m = S + r, f = S + r + N, O = j ? i ? C === r : !1 : o.disabled ? !1 : q && (!w && R(o, i, l) || w && i.findIndex((P) => R(P, o, l)) !== -1);
48
- let a, d, v;
49
- return r > 0 && u !== void 0 && (d = b(o, u), v = b(E[r - 1], u), d && v && d !== v && (a = d)), a !== void 0 && s === "modern" && (N += 1), [
50
- a !== void 0 && s === "modern" && /* @__PURE__ */ t.createElement(
51
- T,
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-${I}-${f}`,
54
- virtual: h,
45
+ id: `option-${h}-${f}`,
46
+ virtual: E,
55
47
  key: m + "-group-item",
56
- group: a,
57
- isMultiColumn: U,
58
- render: K
48
+ group: n,
49
+ isMultiColumn: j,
50
+ render: O
59
51
  }
60
52
  ),
61
53
  /* @__PURE__ */ t.createElement(
62
- Q,
54
+ T,
63
55
  {
64
- id: `option-${I}-${a !== void 0 && s === "modern" ? f + 1 : f}`,
65
- virtual: h,
66
- dataItem: o,
67
- groupMode: s,
68
- selected: O,
69
- focused: C === r,
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: n,
74
- group: a,
75
- render: J,
76
- disabled: o.disabled
65
+ textField: s,
66
+ group: n,
67
+ render: K,
68
+ disabled: r.disabled
77
69
  }
78
70
  )
79
71
  ];
80
72
  });
81
- })(), H = () => {
82
- const n = e.noDataRender, l = /* @__PURE__ */ t.createElement("div", { className: g(p.noData({ c })) }, /* @__PURE__ */ t.createElement("div", null, B.toLanguageString(k, X[k])));
83
- return n ? n.call(void 0, l) : l;
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 D.length ? /* @__PURE__ */ t.createElement(
77
+ return I.length ? /* @__PURE__ */ t.createElement(
86
78
  "div",
87
79
  {
88
- className: M,
89
- style: $,
90
- ref: F,
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: L,
91
+ id: M,
100
92
  role: "listbox",
101
93
  "aria-hidden": z ? void 0 : !0,
102
- "aria-setsize": V,
103
- className: G || g(p.ul({ c })),
104
- ref: A,
105
- style: x
94
+ "aria-setsize": H,
95
+ className: V || v(y.ul({ c: d })),
96
+ ref: F,
97
+ style: A
106
98
  },
107
- D
99
+ I
108
100
  ),
109
- e.scroller && /* @__PURE__ */ t.createElement("div", { className: g(p.heightContainer({ c })) }, e.scroller)
110
- ) : H();
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
@@ -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
  {
@@ -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
- c,
18
- () => o.current
19
- );
20
- const p = () => /* @__PURE__ */ n.createElement(n.Fragment, null, /* @__PURE__ */ n.createElement(b, null, /* @__PURE__ */ n.createElement(D, { name: "search", icon: g, className: l(a.inputIcon({ c: t })) })), d && /* @__PURE__ */ n.createElement(I, null)), i = /* @__PURE__ */ n.createElement(
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,
@@ -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("span", { className: e ? void 0 : i(l.groupItemText({ c: r, isMultiColumn: s })) }, u)
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
  };
@@ -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(i.li({
31
- c: s,
32
- selected: o,
33
- focused: g,
34
- first: !!t && c === "classic",
35
- disabled: n
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-table k-table-list",
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
  );
@@ -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({ current: e.current, min: e.min, max: e.max, step: e.skipItems ? e.skipItems : -1 });
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({ current: e.current, min: e.min, max: e.max, step: e.skipItems ? e.skipItems : 1 });
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((r, n) => e.some((s, o) => s === r && o !== n));
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;