@progress/kendo-react-dropdowns 7.2.4-develop.3 → 7.3.0-develop.1
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 +8 -0
- package/AutoComplete/AutoComplete.mjs +458 -0
- package/ComboBox/ComboBox.js +8 -0
- package/ComboBox/ComboBox.mjs +618 -0
- package/DropDownList/DropDownList.js +8 -0
- package/DropDownList/DropDownList.mjs +630 -0
- package/DropDownTree/DropDownTree.js +8 -0
- package/DropDownTree/DropDownTree.mjs +550 -0
- package/DropDownTree/ListNoData.js +8 -0
- package/DropDownTree/ListNoData.mjs +13 -0
- package/DropDownTree/useDropdownWidth.js +8 -0
- package/DropDownTree/useDropdownWidth.mjs +25 -0
- package/MultiColumnComboBox/MultiColumnComboBox.js +8 -0
- package/MultiColumnComboBox/MultiColumnComboBox.mjs +186 -0
- package/MultiSelect/MultiSelect.js +8 -0
- package/MultiSelect/MultiSelect.mjs +694 -0
- package/MultiSelect/TagList.js +8 -0
- package/MultiSelect/TagList.mjs +48 -0
- package/MultiSelectTree/MultiSelectTree.js +8 -0
- package/MultiSelectTree/MultiSelectTree.mjs +590 -0
- package/MultiSelectTree/utils.js +8 -0
- package/MultiSelectTree/utils.mjs +74 -0
- package/common/AdaptiveMode.js +8 -0
- package/common/AdaptiveMode.mjs +73 -0
- package/common/ClearButton.js +8 -0
- package/common/ClearButton.mjs +38 -0
- package/common/DropDownBase.js +8 -0
- package/common/DropDownBase.mjs +194 -0
- package/common/GroupStickyHeader.js +8 -0
- package/common/GroupStickyHeader.mjs +22 -0
- package/common/List.js +8 -0
- package/common/List.mjs +117 -0
- package/common/ListContainer.js +8 -0
- package/common/ListContainer.mjs +33 -0
- package/common/ListDefaultItem.js +8 -0
- package/common/ListDefaultItem.mjs +36 -0
- package/common/ListFilter.js +8 -0
- package/common/ListFilter.mjs +49 -0
- package/common/ListGroupItem.js +8 -0
- package/common/ListGroupItem.mjs +32 -0
- package/common/ListItem.js +8 -0
- package/common/ListItem.mjs +49 -0
- package/common/MultiColumnList.js +8 -0
- package/common/MultiColumnList.mjs +28 -0
- package/common/Navigation.js +8 -0
- package/common/Navigation.mjs +29 -0
- package/common/SearchBar.js +8 -0
- package/common/SearchBar.mjs +65 -0
- package/common/VirtualScroll.js +8 -0
- package/common/VirtualScroll.mjs +75 -0
- package/common/constants.js +8 -0
- package/common/constants.mjs +13 -0
- package/common/settings.js +8 -0
- package/common/settings.mjs +12 -0
- package/common/utils.js +8 -0
- package/common/utils.mjs +109 -0
- package/common/withCustomComponent.js +8 -0
- package/common/withCustomComponent.mjs +13 -0
- package/dist/cdn/js/kendo-react-dropdowns.js +8 -5
- package/index.d.mts +4098 -5
- package/index.d.ts +4098 -31
- package/index.js +8 -5
- package/index.mjs +55 -4429
- package/messages/index.js +8 -0
- package/messages/index.mjs +27 -0
- package/package-metadata.js +8 -0
- package/package-metadata.mjs +19 -0
- package/package.json +9 -9
- package/AutoComplete/AutoComplete.d.ts +0 -236
- package/AutoComplete/AutoCompleteProps.d.ts +0 -254
- package/ComboBox/ComboBox.d.ts +0 -254
- package/ComboBox/ComboBoxProps.d.ts +0 -324
- package/DropDownList/DropDownList.d.ts +0 -264
- package/DropDownList/DropDownListProps.d.ts +0 -329
- package/DropDownTree/DropDownTree.d.ts +0 -74
- package/DropDownTree/DropDownTreeProps.d.ts +0 -297
- package/DropDownTree/ListNoData.d.ts +0 -10
- package/DropDownTree/useDropdownWidth.d.ts +0 -10
- package/MultiColumnComboBox/MultiColumnComboBox.d.ts +0 -300
- package/MultiSelect/MultiSelect.d.ts +0 -262
- package/MultiSelect/MultiSelectProps.d.ts +0 -325
- package/MultiSelect/TagList.d.ts +0 -42
- package/MultiSelectTree/MultiSelectTree.d.ts +0 -85
- package/MultiSelectTree/MultiSelectTreeProps.d.ts +0 -324
- package/MultiSelectTree/utils.d.ts +0 -21
- package/common/AdaptiveMode.d.ts +0 -25
- package/common/ClearButton.d.ts +0 -18
- package/common/DropDownBase.d.ts +0 -180
- package/common/GroupStickyHeader.d.ts +0 -28
- package/common/List.d.ts +0 -50
- package/common/ListContainer.d.ts +0 -22
- package/common/ListDefaultItem.d.ts +0 -20
- package/common/ListFilter.d.ts +0 -23
- package/common/ListGroupItem.d.ts +0 -37
- package/common/ListItem.d.ts +0 -65
- package/common/MultiColumnList.d.ts +0 -9
- package/common/Navigation.d.ts +0 -17
- package/common/SearchBar.d.ts +0 -47
- package/common/VirtualScroll.d.ts +0 -45
- package/common/constants.d.ts +0 -8
- package/common/events.d.ts +0 -76
- package/common/filterDescriptor.d.ts +0 -45
- package/common/settings.d.ts +0 -109
- package/common/utils.d.ts +0 -70
- package/common/withCustomComponent.d.ts +0 -11
- package/messages/index.d.ts +0 -44
- package/package-metadata.d.ts +0 -9
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
"use client";
|
|
9
|
+
import { getter as V } from "@progress/kendo-react-common";
|
|
10
|
+
const u = (r, f) => {
|
|
11
|
+
const i = {};
|
|
12
|
+
return r && r.length && r.forEach((g) => {
|
|
13
|
+
i[f(g)] = !0;
|
|
14
|
+
}), i;
|
|
15
|
+
}, E = (r, f) => {
|
|
16
|
+
const {
|
|
17
|
+
items: i,
|
|
18
|
+
dataItemKey: g,
|
|
19
|
+
value: a,
|
|
20
|
+
subItemsField: x = "items",
|
|
21
|
+
operation: w
|
|
22
|
+
} = f, t = V(g), I = u(a, t);
|
|
23
|
+
if (w === "clear")
|
|
24
|
+
return [];
|
|
25
|
+
if (w === "delete") {
|
|
26
|
+
const n = u(i, t);
|
|
27
|
+
return a.filter((e) => !n[t(e)]);
|
|
28
|
+
}
|
|
29
|
+
const G = i[0], C = t(G), d = V(x), h = [...r], c = [];
|
|
30
|
+
let b = [], m;
|
|
31
|
+
for (; h.length; ) {
|
|
32
|
+
const n = h.pop();
|
|
33
|
+
if (C === t(n)) {
|
|
34
|
+
b = c.map((e) => e.item), m = n;
|
|
35
|
+
break;
|
|
36
|
+
} else {
|
|
37
|
+
c && c.length && c[c.length - 1].parentPosition === h.length && c.pop();
|
|
38
|
+
const e = d(n);
|
|
39
|
+
e && e.length && (c.push({ item: n, parentPosition: h.length }), h.push(...e));
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
const k = [...d(m) || []];
|
|
43
|
+
let M = [];
|
|
44
|
+
for (; k.length; ) {
|
|
45
|
+
const n = k.pop();
|
|
46
|
+
M.push(n);
|
|
47
|
+
const e = d(n);
|
|
48
|
+
e && e.length && k.push(...e);
|
|
49
|
+
}
|
|
50
|
+
const L = !I[C], l = [];
|
|
51
|
+
if (L) {
|
|
52
|
+
l.push(...a), l.push(m), l.push(...M.filter((s) => !I[t(s)]));
|
|
53
|
+
const n = b.filter((s) => !I[t(s)]), e = u(l, t);
|
|
54
|
+
for (let s = n.length - 1; s > -1; s--) {
|
|
55
|
+
const p = n[s], o = d(p);
|
|
56
|
+
if (o.filter((P) => e[t(P)]).length < o.length)
|
|
57
|
+
break;
|
|
58
|
+
l.push(p), e[t(p)] = !0;
|
|
59
|
+
}
|
|
60
|
+
} else {
|
|
61
|
+
const n = t(m), e = u(M, t), s = u(b, t);
|
|
62
|
+
l.push(
|
|
63
|
+
...a.filter((p) => {
|
|
64
|
+
const o = t(p);
|
|
65
|
+
return !e[o] && n !== o && !s[o];
|
|
66
|
+
})
|
|
67
|
+
);
|
|
68
|
+
}
|
|
69
|
+
return l;
|
|
70
|
+
};
|
|
71
|
+
export {
|
|
72
|
+
E as getMultiSelectTreeValue,
|
|
73
|
+
u as getValueMap
|
|
74
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("react"),l=require("@progress/kendo-react-layout"),k=require("@progress/kendo-svg-icons"),i=require("@progress/kendo-react-buttons");function v(a){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(a){for(const n in a)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(a,n);Object.defineProperty(e,n,o.get?o:{enumerable:!0,get:()=>a[n]})}}return e.default=a,Object.freeze(e)}const t=v(h),s=500,g=a=>{const{footer:e,children:n,windowWidth:o=0,navigatable:d,navigatableElements:u,expand:m,animation:b,onClose:c,adaptiveTitle:p,mobileFilter:r}=a,f={navigatable:d||!1,navigatableElements:u||[],expand:m,animation:b!==!1,onClose:c,animationStyles:o<=s?{top:0,width:"100%",height:"100%"}:void 0,className:o<=s?"k-adaptive-actionsheet k-actionsheet-fullscreen":"k-adaptive-actionsheet k-actionsheet-bottom"};return t.createElement(l.ActionSheet,{...f},t.createElement(l.ActionSheetHeader,{className:"k-text-center"},t.createElement("div",{className:"k-actionsheet-titlebar-group k-hbox"},t.createElement("div",{className:"k-actionsheet-title"},t.createElement("div",null,p)),t.createElement("div",{className:"k-actionsheet-actions"},t.createElement(i.Button,{tabIndex:0,"aria-label":"Cancel","aria-disabled":"false",type:"button",fillMode:"flat",icon:"x",svgIcon:k.xIcon,onClick:c}))),r&&t.createElement("div",{className:"k-actionsheet-titlebar-group k-actionsheet-filter"},r)),n,e&&t.createElement(l.ActionSheetFooter,{className:"k-actions k-actions-stretched"},t.createElement(i.Button,{size:"large",tabIndex:0,"aria-label":e.cancelText,"aria-disabled":"false",type:"button",onClick:e.onCancel},e.cancelText),t.createElement(i.Button,{tabIndex:0,themeColor:"primary",size:"large","aria-label":e.applyText,"aria-disabled":"false",type:"button",onClick:e.onApply},e.applyText)))};exports.AdaptiveMode=g;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
"use client";
|
|
9
|
+
import * as e from "react";
|
|
10
|
+
import { ActionSheet as f, ActionSheetHeader as k, ActionSheetFooter as E } from "@progress/kendo-react-layout";
|
|
11
|
+
import { xIcon as v } from "@progress/kendo-svg-icons";
|
|
12
|
+
import { Button as a } from "@progress/kendo-react-buttons";
|
|
13
|
+
const o = 500, y = (c) => {
|
|
14
|
+
const {
|
|
15
|
+
footer: t,
|
|
16
|
+
children: s,
|
|
17
|
+
windowWidth: l = 0,
|
|
18
|
+
navigatable: r,
|
|
19
|
+
navigatableElements: m,
|
|
20
|
+
expand: d,
|
|
21
|
+
animation: p,
|
|
22
|
+
onClose: n,
|
|
23
|
+
adaptiveTitle: b,
|
|
24
|
+
mobileFilter: i
|
|
25
|
+
} = c, h = {
|
|
26
|
+
navigatable: r || !1,
|
|
27
|
+
navigatableElements: m || [],
|
|
28
|
+
expand: d,
|
|
29
|
+
animation: p !== !1,
|
|
30
|
+
onClose: n,
|
|
31
|
+
animationStyles: l <= o ? { top: 0, width: "100%", height: "100%" } : void 0,
|
|
32
|
+
className: l <= o ? "k-adaptive-actionsheet k-actionsheet-fullscreen" : "k-adaptive-actionsheet k-actionsheet-bottom"
|
|
33
|
+
};
|
|
34
|
+
return /* @__PURE__ */ e.createElement(f, { ...h }, /* @__PURE__ */ e.createElement(k, { className: "k-text-center" }, /* @__PURE__ */ e.createElement("div", { className: "k-actionsheet-titlebar-group k-hbox" }, /* @__PURE__ */ e.createElement("div", { className: "k-actionsheet-title" }, /* @__PURE__ */ e.createElement("div", null, b)), /* @__PURE__ */ e.createElement("div", { className: "k-actionsheet-actions" }, /* @__PURE__ */ e.createElement(
|
|
35
|
+
a,
|
|
36
|
+
{
|
|
37
|
+
tabIndex: 0,
|
|
38
|
+
"aria-label": "Cancel",
|
|
39
|
+
"aria-disabled": "false",
|
|
40
|
+
type: "button",
|
|
41
|
+
fillMode: "flat",
|
|
42
|
+
icon: "x",
|
|
43
|
+
svgIcon: v,
|
|
44
|
+
onClick: n
|
|
45
|
+
}
|
|
46
|
+
))), i && /* @__PURE__ */ e.createElement("div", { className: "k-actionsheet-titlebar-group k-actionsheet-filter" }, i)), s, t && /* @__PURE__ */ e.createElement(E, { className: "k-actions k-actions-stretched" }, /* @__PURE__ */ e.createElement(
|
|
47
|
+
a,
|
|
48
|
+
{
|
|
49
|
+
size: "large",
|
|
50
|
+
tabIndex: 0,
|
|
51
|
+
"aria-label": t.cancelText,
|
|
52
|
+
"aria-disabled": "false",
|
|
53
|
+
type: "button",
|
|
54
|
+
onClick: t.onCancel
|
|
55
|
+
},
|
|
56
|
+
t.cancelText
|
|
57
|
+
), /* @__PURE__ */ e.createElement(
|
|
58
|
+
a,
|
|
59
|
+
{
|
|
60
|
+
tabIndex: 0,
|
|
61
|
+
themeColor: "primary",
|
|
62
|
+
size: "large",
|
|
63
|
+
"aria-label": t.applyText,
|
|
64
|
+
"aria-disabled": "false",
|
|
65
|
+
type: "button",
|
|
66
|
+
onClick: t.onApply
|
|
67
|
+
},
|
|
68
|
+
t.applyText
|
|
69
|
+
)));
|
|
70
|
+
};
|
|
71
|
+
export {
|
|
72
|
+
y as AdaptiveMode
|
|
73
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
"use client";"use strict";const i=require("react"),a=require("@progress/kendo-react-intl"),o=require("../messages/index.js"),u=require("@progress/kendo-react-common"),l=require("@progress/kendo-svg-icons");function p(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const c=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,c.get?c:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const r=p(i);class s extends r.Component{constructor(){super(...arguments),this.onMouseDown=e=>e.preventDefault()}render(){const e=a.provideLocalizationService(this).toLanguageString(o.clear,o.messages[o.clear]);return r.createElement("span",{className:"k-clear-value",role:"button",onClick:this.props.onClick,onMouseDown:this.onMouseDown,tabIndex:-1,title:e,key:"clearbutton"},r.createElement(u.IconWrap,{name:"x",icon:l.xIcon}))}}a.registerForLocalization(s);module.exports=s;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
"use client";
|
|
9
|
+
import * as o from "react";
|
|
10
|
+
import { provideLocalizationService as r, registerForLocalization as n } from "@progress/kendo-react-intl";
|
|
11
|
+
import { clear as t, messages as a } from "../messages/index.mjs";
|
|
12
|
+
import { IconWrap as s } from "@progress/kendo-react-common";
|
|
13
|
+
import { xIcon as i } from "@progress/kendo-svg-icons";
|
|
14
|
+
class c extends o.Component {
|
|
15
|
+
constructor() {
|
|
16
|
+
super(...arguments), this.onMouseDown = (e) => e.preventDefault();
|
|
17
|
+
}
|
|
18
|
+
render() {
|
|
19
|
+
const e = r(this).toLanguageString(t, a[t]);
|
|
20
|
+
return /* @__PURE__ */ o.createElement(
|
|
21
|
+
"span",
|
|
22
|
+
{
|
|
23
|
+
className: "k-clear-value",
|
|
24
|
+
role: "button",
|
|
25
|
+
onClick: this.props.onClick,
|
|
26
|
+
onMouseDown: this.onMouseDown,
|
|
27
|
+
tabIndex: -1,
|
|
28
|
+
title: e,
|
|
29
|
+
key: "clearbutton"
|
|
30
|
+
},
|
|
31
|
+
/* @__PURE__ */ o.createElement(s, { name: "x", icon: i })
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
n(c);
|
|
36
|
+
export {
|
|
37
|
+
c as default
|
|
38
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
"use client";"use strict";const v=require("react"),i=require("prop-types"),y=require("./VirtualScroll.js"),S=require("./Navigation.js"),c=require("./utils.js");function b(l){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(l){for(const t in l)if(t!=="default"){const e=Object.getOwnPropertyDescriptor(l,t);Object.defineProperty(n,t,e.get?e:{enumerable:!0,get:()=>l[t]})}}return n.default=l,Object.freeze(n)}const P=b(v),p=class p{constructor(n){this.wrapper=null,this.list=null,this.vs=new y,this.navigation=new S.Navigation,this.handleItemClick=(t,e)=>{const s=this.initState();s.syntheticEvent=e,e.stopPropagation(),this.component.handleItemSelect(t,s),this.togglePopup(s),this.applyState(s)},this.handleFocus=t=>{if(!this.component.state.focused){const e=this.initState();e.data.focused=!0,e.events.push({type:"onFocus"}),e.syntheticEvent=t,this.applyState(e)}},this.filterChanged=(t,e)=>{const{textField:s,filterable:o}=this.component.props;o&&e.events.push({type:"onFilterChange",filter:{field:s,operator:"contains",ignoreCase:!0,value:t}})},this.togglePopup=t=>{const e=this.component.props,s=e.opened!==void 0?e.opened:this.component.state.opened;e.opened===void 0&&(t.data.opened=!s),s?t.events.push({type:"onClose"}):(t.events.push({type:"onOpen"}),this.calculatePopupWidth())},this.pageChange=(t,e)=>{const s=this.initState();s.syntheticEvent=e,this.triggerOnPageChange(s,t.skip,t.take),this.applyState(s)},this.scrollToVirtualItem=(t,e)=>{const s=this.vs;if(s.enabled=!1,t.skip===0)s.reset();else if(t.skip+t.pageSize===t.total)s.scrollToEnd();else{let o=s.translate;o===0&&(s.calcScrollElementHeight(),o=s.itemHeight*t.skip,s.translateTo(o-s.itemHeight)),s.container&&(s.container.scrollTop=o),this.scrollToItem(e,!0)}window.setTimeout(()=>s.enabled=!0,10)},this.scrollPopupByPageSize=t=>{var r,u,d,g,f,m;const e=this.vs,s=(u=(r=this.list)==null?void 0:r.parentElement)==null?void 0:u.scrollTop,o=e.enabled&&e.itemHeight?e.itemHeight:this.list?this.list.children[0].offsetHeight:0,a=(g=(d=this.list)==null?void 0:d.parentElement)==null?void 0:g.offsetHeight;s!==void 0&&a!==void 0&&((m=(f=this.list)==null?void 0:f.parentElement)==null||m.scroll({top:s+t*Math.floor(a/o)*o}))},this.renderScrollElement=()=>{const t=this.vs;return t.enabled&&P.createElement("div",{ref:e=>t.scrollElement=e,key:"scrollElementKey"})},this.resetGroupStickyHeader=(t,e)=>{t!==e.state.group&&e.setState({...e.state,group:t})},this.listBoxId=n.props.id+"list",this.guid=n.props.id,this.component=n,this.vs.PageChange=this.pageChange}didMount(){const n=this.component.props,t=n.popupSettings||{},e=n.style||{},s=t.width;let o=n.opened===!0;s===void 0&&this.calculatePopupWidth(),n.dir===void 0&&e.direction===void 0&&(this.calculateDir(),o=!0),o&&this.component.forceUpdate()}calculateDir(){const n=this.component.element;n&&n.ownerDocument&&n.ownerDocument.defaultView&&(this.dirCalculated=n.ownerDocument.defaultView.getComputedStyle(n).direction||void 0)}calculatePopupWidth(){this.wrapper&&(this.popupWidth=this.wrapper.offsetWidth+"px")}scrollToItem(n,t,e){const s=this.list||this.vs.list;if(!s&&!e&&setTimeout(()=>{this.scrollToItem(n,t,!0)},10),s&&n>=0){const o=this.vs,a=o.container||s.parentNode,r=t!==void 0?t:o.enabled;c.scrollToItem(a,s,n,o.translate,r)}}initState(){return{data:{},events:[],syntheticEvent:void 0}}applyState(n){Object.keys(n.data).length>0&&this.component.setState(n.data);const t={syntheticEvent:n.syntheticEvent,nativeEvent:n.syntheticEvent?n.syntheticEvent.nativeEvent:void 0,target:this.component,value:this.component.value};n.events.forEach(e=>{const s=e.type;delete e.type;const o=s&&this.component.props[s];o&&o.call(void 0,{...t,...e})})}triggerOnPageChange(n,t,e){const s=this.component.props.virtual;if(s){const o=Math.min(Math.max(0,t),Math.max(0,s.total-e));o!==s.skip&&n.events.push({type:"onPageChange",page:{skip:o,take:e}})}}triggerPageChangeCornerItems(n,t){const e=this.component.props,{data:s=[],dataItemKey:o,virtual:a}=e,r=e.opened!==void 0?e.opened:this.component.state.opened;n&&a&&this.vs.enabled&&(a.skip>0&&c.areSame(n,s[0],o)?this.triggerOnPageChange(t,a.skip-1,a.pageSize):!r&&a.skip+a.pageSize<a.total&&c.areSame(n,s[s.length-1],o)&&this.triggerOnPageChange(t,a.skip+1,a.pageSize))}getPopupSettings(){return Object.assign({},p.defaultProps.popupSettings,this.component.props.popupSettings)}getGroupedDataModernMode(n,t){let e=[];return n.forEach((s,o)=>{n[o-1]&&s[t]!==n[o-1][t]&&e.push({[t]:s[t]}),e.push(n[o])}),e}};p.basicPropTypes={opened:i.bool,disabled:i.bool,dir:i.string,tabIndex:i.number,accessKey:i.string,data:i.array,textField:i.string,className:i.string,label:i.string,loading:i.bool,popupSettings:i.shape({animate:i.oneOfType([i.bool,i.shape({openDuration:i.number,closeDuration:i.number})]),popupClass:i.string,className:i.string,appendTo:i.any,width:i.oneOfType([i.string,i.number]),height:i.oneOfType([i.string,i.number])}),onOpen:i.func,onClose:i.func,onFocus:i.func,onBlur:i.func,onChange:i.func,itemRender:i.func,listNoDataRender:i.func,focusedItemIndex:i.func,header:i.node,footer:i.node},p.propTypes={...p.basicPropTypes,value:i.any,defaultValue:i.any,filterable:i.bool,filter:i.string,virtual:i.shape({pageSize:i.number.isRequired,skip:i.number.isRequired,total:i.number.isRequired}),onFilterChange:i.func,onPageChange:i.func},p.defaultProps={popupSettings:{height:"200px"},required:!1,validityStyles:!0};let h=p;module.exports=h;
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
"use client";
|
|
9
|
+
import * as m from "react";
|
|
10
|
+
import s from "prop-types";
|
|
11
|
+
import v from "./VirtualScroll.mjs";
|
|
12
|
+
import { Navigation as y } from "./Navigation.mjs";
|
|
13
|
+
import { scrollToItem as S, areSame as g } from "./utils.mjs";
|
|
14
|
+
const a = class a {
|
|
15
|
+
constructor(n) {
|
|
16
|
+
this.wrapper = null, this.list = null, this.vs = new v(), this.navigation = new y(), this.handleItemClick = (i, e) => {
|
|
17
|
+
const t = this.initState();
|
|
18
|
+
t.syntheticEvent = e, e.stopPropagation(), this.component.handleItemSelect(i, t), this.togglePopup(t), this.applyState(t);
|
|
19
|
+
}, this.handleFocus = (i) => {
|
|
20
|
+
if (!this.component.state.focused) {
|
|
21
|
+
const e = this.initState();
|
|
22
|
+
e.data.focused = !0, e.events.push({ type: "onFocus" }), e.syntheticEvent = i, this.applyState(e);
|
|
23
|
+
}
|
|
24
|
+
}, this.filterChanged = (i, e) => {
|
|
25
|
+
const { textField: t, filterable: o } = this.component.props;
|
|
26
|
+
o && e.events.push({
|
|
27
|
+
type: "onFilterChange",
|
|
28
|
+
filter: {
|
|
29
|
+
field: t,
|
|
30
|
+
operator: "contains",
|
|
31
|
+
ignoreCase: !0,
|
|
32
|
+
value: i
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
}, this.togglePopup = (i) => {
|
|
36
|
+
const e = this.component.props, t = e.opened !== void 0 ? e.opened : this.component.state.opened;
|
|
37
|
+
e.opened === void 0 && (i.data.opened = !t), t ? i.events.push({ type: "onClose" }) : (i.events.push({ type: "onOpen" }), this.calculatePopupWidth());
|
|
38
|
+
}, this.pageChange = (i, e) => {
|
|
39
|
+
const t = this.initState();
|
|
40
|
+
t.syntheticEvent = e, this.triggerOnPageChange(t, i.skip, i.take), this.applyState(t);
|
|
41
|
+
}, this.scrollToVirtualItem = (i, e) => {
|
|
42
|
+
const t = this.vs;
|
|
43
|
+
if (t.enabled = !1, i.skip === 0)
|
|
44
|
+
t.reset();
|
|
45
|
+
else if (i.skip + i.pageSize === i.total)
|
|
46
|
+
t.scrollToEnd();
|
|
47
|
+
else {
|
|
48
|
+
let o = t.translate;
|
|
49
|
+
o === 0 && (t.calcScrollElementHeight(), o = t.itemHeight * i.skip, t.translateTo(o - t.itemHeight)), t.container && (t.container.scrollTop = o), this.scrollToItem(e, !0);
|
|
50
|
+
}
|
|
51
|
+
window.setTimeout(() => t.enabled = !0, 10);
|
|
52
|
+
}, this.scrollPopupByPageSize = (i) => {
|
|
53
|
+
var l, r, h, c, u, d;
|
|
54
|
+
const e = this.vs, t = (r = (l = this.list) == null ? void 0 : l.parentElement) == null ? void 0 : r.scrollTop, o = e.enabled && e.itemHeight ? e.itemHeight : this.list ? this.list.children[0].offsetHeight : 0, p = (c = (h = this.list) == null ? void 0 : h.parentElement) == null ? void 0 : c.offsetHeight;
|
|
55
|
+
t !== void 0 && p !== void 0 && ((d = (u = this.list) == null ? void 0 : u.parentElement) == null || d.scroll({ top: t + i * Math.floor(p / o) * o }));
|
|
56
|
+
}, this.renderScrollElement = () => {
|
|
57
|
+
const i = this.vs;
|
|
58
|
+
return i.enabled && /* @__PURE__ */ m.createElement(
|
|
59
|
+
"div",
|
|
60
|
+
{
|
|
61
|
+
ref: (e) => i.scrollElement = e,
|
|
62
|
+
key: "scrollElementKey"
|
|
63
|
+
}
|
|
64
|
+
);
|
|
65
|
+
}, this.resetGroupStickyHeader = (i, e) => {
|
|
66
|
+
i !== e.state.group && e.setState({ ...e.state, group: i });
|
|
67
|
+
}, this.listBoxId = n.props.id + "list", this.guid = n.props.id, this.component = n, this.vs.PageChange = this.pageChange;
|
|
68
|
+
}
|
|
69
|
+
didMount() {
|
|
70
|
+
const n = this.component.props, i = n.popupSettings || {}, e = n.style || {}, t = i.width;
|
|
71
|
+
let o = n.opened === !0;
|
|
72
|
+
t === void 0 && this.calculatePopupWidth(), n.dir === void 0 && e.direction === void 0 && (this.calculateDir(), o = !0), o && this.component.forceUpdate();
|
|
73
|
+
}
|
|
74
|
+
calculateDir() {
|
|
75
|
+
const n = this.component.element;
|
|
76
|
+
n && n.ownerDocument && n.ownerDocument.defaultView && (this.dirCalculated = n.ownerDocument.defaultView.getComputedStyle(n).direction || void 0);
|
|
77
|
+
}
|
|
78
|
+
calculatePopupWidth() {
|
|
79
|
+
this.wrapper && (this.popupWidth = this.wrapper.offsetWidth + "px");
|
|
80
|
+
}
|
|
81
|
+
scrollToItem(n, i, e) {
|
|
82
|
+
const t = this.list || this.vs.list;
|
|
83
|
+
if (!t && !e && setTimeout(() => {
|
|
84
|
+
this.scrollToItem(n, i, !0);
|
|
85
|
+
}, 10), t && n >= 0) {
|
|
86
|
+
const o = this.vs, p = o.container || t.parentNode, l = i !== void 0 ? i : o.enabled;
|
|
87
|
+
S(p, t, n, o.translate, l);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
initState() {
|
|
91
|
+
return {
|
|
92
|
+
data: {},
|
|
93
|
+
events: [],
|
|
94
|
+
syntheticEvent: void 0
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
applyState(n) {
|
|
98
|
+
Object.keys(n.data).length > 0 && this.component.setState(n.data);
|
|
99
|
+
const i = {
|
|
100
|
+
syntheticEvent: n.syntheticEvent,
|
|
101
|
+
nativeEvent: n.syntheticEvent ? n.syntheticEvent.nativeEvent : void 0,
|
|
102
|
+
target: this.component,
|
|
103
|
+
value: this.component.value
|
|
104
|
+
};
|
|
105
|
+
n.events.forEach((e) => {
|
|
106
|
+
const t = e.type;
|
|
107
|
+
delete e.type;
|
|
108
|
+
const o = t && this.component.props[t];
|
|
109
|
+
o && o.call(void 0, {
|
|
110
|
+
...i,
|
|
111
|
+
...e
|
|
112
|
+
});
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
triggerOnPageChange(n, i, e) {
|
|
116
|
+
const t = this.component.props.virtual;
|
|
117
|
+
if (t) {
|
|
118
|
+
const o = Math.min(Math.max(0, i), Math.max(0, t.total - e));
|
|
119
|
+
o !== t.skip && n.events.push({
|
|
120
|
+
type: "onPageChange",
|
|
121
|
+
page: { skip: o, take: e }
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
triggerPageChangeCornerItems(n, i) {
|
|
126
|
+
const e = this.component.props, { data: t = [], dataItemKey: o, virtual: p } = e, l = e.opened !== void 0 ? e.opened : this.component.state.opened;
|
|
127
|
+
n && p && this.vs.enabled && (p.skip > 0 && g(n, t[0], o) ? this.triggerOnPageChange(i, p.skip - 1, p.pageSize) : !l && p.skip + p.pageSize < p.total && g(n, t[t.length - 1], o) && this.triggerOnPageChange(i, p.skip + 1, p.pageSize));
|
|
128
|
+
}
|
|
129
|
+
getPopupSettings() {
|
|
130
|
+
return Object.assign({}, a.defaultProps.popupSettings, this.component.props.popupSettings);
|
|
131
|
+
}
|
|
132
|
+
getGroupedDataModernMode(n, i) {
|
|
133
|
+
let e = [];
|
|
134
|
+
return n.forEach((t, o) => {
|
|
135
|
+
n[o - 1] && t[i] !== n[o - 1][i] && e.push({ [i]: t[i] }), e.push(n[o]);
|
|
136
|
+
}), e;
|
|
137
|
+
}
|
|
138
|
+
};
|
|
139
|
+
a.basicPropTypes = {
|
|
140
|
+
opened: s.bool,
|
|
141
|
+
disabled: s.bool,
|
|
142
|
+
dir: s.string,
|
|
143
|
+
tabIndex: s.number,
|
|
144
|
+
accessKey: s.string,
|
|
145
|
+
data: s.array,
|
|
146
|
+
textField: s.string,
|
|
147
|
+
className: s.string,
|
|
148
|
+
label: s.string,
|
|
149
|
+
loading: s.bool,
|
|
150
|
+
popupSettings: s.shape({
|
|
151
|
+
animate: s.oneOfType([s.bool, s.shape({
|
|
152
|
+
openDuration: s.number,
|
|
153
|
+
closeDuration: s.number
|
|
154
|
+
})]),
|
|
155
|
+
popupClass: s.string,
|
|
156
|
+
className: s.string,
|
|
157
|
+
appendTo: s.any,
|
|
158
|
+
width: s.oneOfType([s.string, s.number]),
|
|
159
|
+
height: s.oneOfType([s.string, s.number])
|
|
160
|
+
}),
|
|
161
|
+
onOpen: s.func,
|
|
162
|
+
onClose: s.func,
|
|
163
|
+
onFocus: s.func,
|
|
164
|
+
onBlur: s.func,
|
|
165
|
+
onChange: s.func,
|
|
166
|
+
itemRender: s.func,
|
|
167
|
+
listNoDataRender: s.func,
|
|
168
|
+
focusedItemIndex: s.func,
|
|
169
|
+
header: s.node,
|
|
170
|
+
footer: s.node
|
|
171
|
+
}, a.propTypes = {
|
|
172
|
+
...a.basicPropTypes,
|
|
173
|
+
value: s.any,
|
|
174
|
+
defaultValue: s.any,
|
|
175
|
+
filterable: s.bool,
|
|
176
|
+
filter: s.string,
|
|
177
|
+
virtual: s.shape({
|
|
178
|
+
pageSize: s.number.isRequired,
|
|
179
|
+
skip: s.number.isRequired,
|
|
180
|
+
total: s.number.isRequired
|
|
181
|
+
}),
|
|
182
|
+
onFilterChange: s.func,
|
|
183
|
+
onPageChange: s.func
|
|
184
|
+
}, a.defaultProps = {
|
|
185
|
+
popupSettings: {
|
|
186
|
+
height: "200px"
|
|
187
|
+
},
|
|
188
|
+
required: !1,
|
|
189
|
+
validityStyles: !0
|
|
190
|
+
};
|
|
191
|
+
let f = a;
|
|
192
|
+
export {
|
|
193
|
+
f as default
|
|
194
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
"use client";"use strict";const o=require("react");function a(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const c=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,c.get?c:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const s=a(o);class i extends s.Component{render(){const{group:t,groupMode:r,render:c}=this.props,n=s.createElement("div",{className:"k-list-group-sticky-header"},r==="classic"?t:s.createElement("div",{className:"k-list-header-text"},t));return c!==void 0?c.call(void 0,n,this.props):n}}module.exports=i;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
"use client";
|
|
9
|
+
import * as e from "react";
|
|
10
|
+
class c extends e.Component {
|
|
11
|
+
render() {
|
|
12
|
+
const {
|
|
13
|
+
group: r,
|
|
14
|
+
groupMode: a,
|
|
15
|
+
render: t
|
|
16
|
+
} = this.props, s = /* @__PURE__ */ e.createElement("div", { className: "k-list-group-sticky-header" }, a === "classic" ? r : /* @__PURE__ */ e.createElement("div", { className: "k-list-header-text" }, r));
|
|
17
|
+
return t !== void 0 ? t.call(void 0, s, this.props) : s;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
export {
|
|
21
|
+
c as default
|
|
22
|
+
};
|
package/common/List.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
"use client";"use strict";const z=require("react"),L=require("./ListItem.js"),M=require("./ListGroupItem.js"),g=require("./utils.js"),C=require("@progress/kendo-react-intl"),b=require("../messages/index.js");function O(s){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(s){for(const e in s)if(e!=="default"){const t=Object.getOwnPropertyDescriptor(s,e);Object.defineProperty(r,e,t.get?t:{enumerable:!0,get:()=>s[e]})}}return r.default=s,Object.freeze(r)}const o=O(z);class N extends o.Component{renderItems(){const{textField:r,valueField:e,groupField:t,groupMode:n,isMultiColumn:h,optionsGuid:d,skip:u=0,virtual:p,focusedIndex:f,highlightSelected:v=!0,value:a,data:k,itemRender:w,groupHeaderItemRender:D}=this.props,E=Array.isArray(a);let R=0;return k.map((i,c)=>{const S=u+c,I=u+c+R,q=i.disabled?!1:v&&(!E&&g.areSame(i,a,e)||E&&a.findIndex(x=>g.areSame(x,i,e))!==-1);let l,m,y;return c>0&&t!==void 0&&(m=g.getItemValue(i,t),y=g.getItemValue(k[c-1],t),m&&y&&m!==y&&(l=m)),l!==void 0&&n==="modern"&&(R+=1),[l!==void 0&&n==="modern"&&o.createElement(M,{id:`option-${d}-${I}`,virtual:p,key:S+"-group-item",group:l,isMultiColumn:h,render:D}),o.createElement(L,{id:`option-${d}-${l!==void 0&&n==="modern"?I+1:I}`,virtual:p,dataItem:i,groupMode:n,selected:q,focused:f===c,index:S,key:S,onClick:this.props.onClick,textField:r,group:l,render:w,disabled:i.disabled})]})}renderNoValueElement(r){const e=this.props.noDataRender,t=o.createElement("div",{className:"k-nodata"},o.createElement("div",null,r.toLanguageString(b.nodata,b.messages[b.nodata])));return e?e.call(void 0,t):t}render(){const r=C.provideLocalizationService(this),{id:e,show:t,wrapperCssClass:n,wrapperStyle:h,listStyle:d,listRef:u,wrapperRef:p,listClassName:f="k-list-ul",ariaSetSize:v}=this.props,a=this.renderItems();return a.length?o.createElement("div",{className:n,style:h,ref:p,onMouseDown:this.props.onMouseDown,onBlur:this.props.onBlur,onScroll:this.props.onScroll,unselectable:"on"},o.createElement("ul",{id:e,role:"listbox","aria-hidden":t?void 0:!0,"aria-setsize":v,className:f,ref:u,style:d},a),this.props.scroller&&o.createElement("div",{className:"k-height-container"},this.props.scroller)):this.renderNoValueElement(r)}}C.registerForLocalization(N);module.exports=N;
|
package/common/List.mjs
ADDED
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
"use client";
|
|
9
|
+
import * as r from "react";
|
|
10
|
+
import x from "./ListItem.mjs";
|
|
11
|
+
import z from "./ListGroupItem.mjs";
|
|
12
|
+
import { areSame as k, getItemValue as C } from "./utils.mjs";
|
|
13
|
+
import { provideLocalizationService as D, registerForLocalization as F } from "@progress/kendo-react-intl";
|
|
14
|
+
import { nodata as N, messages as M } from "../messages/index.mjs";
|
|
15
|
+
class $ extends r.Component {
|
|
16
|
+
renderItems() {
|
|
17
|
+
const {
|
|
18
|
+
textField: a,
|
|
19
|
+
valueField: t,
|
|
20
|
+
groupField: e,
|
|
21
|
+
groupMode: o,
|
|
22
|
+
isMultiColumn: u,
|
|
23
|
+
optionsGuid: d,
|
|
24
|
+
skip: p = 0,
|
|
25
|
+
virtual: c,
|
|
26
|
+
focusedIndex: h,
|
|
27
|
+
highlightSelected: v = !0,
|
|
28
|
+
value: s,
|
|
29
|
+
data: S,
|
|
30
|
+
itemRender: R,
|
|
31
|
+
groupHeaderItemRender: w
|
|
32
|
+
} = this.props, E = Array.isArray(s);
|
|
33
|
+
let y = 0;
|
|
34
|
+
return S.map((i, l) => {
|
|
35
|
+
const f = p + l, g = p + l + y, L = i.disabled ? !1 : v && (!E && k(i, s, t) || E && s.findIndex((b) => k(b, i, t)) !== -1);
|
|
36
|
+
let n, m, I;
|
|
37
|
+
return l > 0 && e !== void 0 && (m = C(i, e), I = C(S[l - 1], e), m && I && m !== I && (n = m)), n !== void 0 && o === "modern" && (y += 1), [
|
|
38
|
+
n !== void 0 && o === "modern" && /* @__PURE__ */ r.createElement(
|
|
39
|
+
z,
|
|
40
|
+
{
|
|
41
|
+
id: `option-${d}-${g}`,
|
|
42
|
+
virtual: c,
|
|
43
|
+
key: f + "-group-item",
|
|
44
|
+
group: n,
|
|
45
|
+
isMultiColumn: u,
|
|
46
|
+
render: w
|
|
47
|
+
}
|
|
48
|
+
),
|
|
49
|
+
/* @__PURE__ */ r.createElement(
|
|
50
|
+
x,
|
|
51
|
+
{
|
|
52
|
+
id: `option-${d}-${n !== void 0 && o === "modern" ? g + 1 : g}`,
|
|
53
|
+
virtual: c,
|
|
54
|
+
dataItem: i,
|
|
55
|
+
groupMode: o,
|
|
56
|
+
selected: L,
|
|
57
|
+
focused: h === l,
|
|
58
|
+
index: f,
|
|
59
|
+
key: f,
|
|
60
|
+
onClick: this.props.onClick,
|
|
61
|
+
textField: a,
|
|
62
|
+
group: n,
|
|
63
|
+
render: R,
|
|
64
|
+
disabled: i.disabled
|
|
65
|
+
}
|
|
66
|
+
)
|
|
67
|
+
];
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
renderNoValueElement(a) {
|
|
71
|
+
const t = this.props.noDataRender, e = /* @__PURE__ */ r.createElement("div", { className: "k-nodata" }, /* @__PURE__ */ r.createElement("div", null, a.toLanguageString(N, M[N])));
|
|
72
|
+
return t ? t.call(void 0, e) : e;
|
|
73
|
+
}
|
|
74
|
+
render() {
|
|
75
|
+
const a = D(this), {
|
|
76
|
+
id: t,
|
|
77
|
+
show: e,
|
|
78
|
+
wrapperCssClass: o,
|
|
79
|
+
wrapperStyle: u,
|
|
80
|
+
listStyle: d,
|
|
81
|
+
listRef: p,
|
|
82
|
+
wrapperRef: c,
|
|
83
|
+
listClassName: h = "k-list-ul",
|
|
84
|
+
ariaSetSize: v
|
|
85
|
+
} = this.props, s = this.renderItems();
|
|
86
|
+
return s.length ? /* @__PURE__ */ r.createElement(
|
|
87
|
+
"div",
|
|
88
|
+
{
|
|
89
|
+
className: o,
|
|
90
|
+
style: u,
|
|
91
|
+
ref: c,
|
|
92
|
+
onMouseDown: this.props.onMouseDown,
|
|
93
|
+
onBlur: this.props.onBlur,
|
|
94
|
+
onScroll: this.props.onScroll,
|
|
95
|
+
unselectable: "on"
|
|
96
|
+
},
|
|
97
|
+
/* @__PURE__ */ r.createElement(
|
|
98
|
+
"ul",
|
|
99
|
+
{
|
|
100
|
+
id: t,
|
|
101
|
+
role: "listbox",
|
|
102
|
+
"aria-hidden": e ? void 0 : !0,
|
|
103
|
+
"aria-setsize": v,
|
|
104
|
+
className: h,
|
|
105
|
+
ref: p,
|
|
106
|
+
style: d
|
|
107
|
+
},
|
|
108
|
+
s
|
|
109
|
+
),
|
|
110
|
+
this.props.scroller && /* @__PURE__ */ r.createElement("div", { className: "k-height-container" }, this.props.scroller)
|
|
111
|
+
) : this.renderNoValueElement(a);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
F($);
|
|
115
|
+
export {
|
|
116
|
+
$ as default
|
|
117
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
"use client";"use strict";const s=require("react"),u=require("@progress/kendo-react-popup");function a(e){const n=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(n,t,r.get?r:{enumerable:!0,get:()=>e[t]})}}return n.default=e,Object.freeze(n)}const c=a(s);class p extends c.Component{render(){const{children:n,width:t,dir:r,itemsCount:o,popupSettings:i}=this.props;return c.createElement(u.Popup,{style:{width:t,direction:r},contentKey:o&&o.join(),...i},n)}}module.exports=p;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
"use client";
|
|
9
|
+
import * as e from "react";
|
|
10
|
+
import { Popup as s } from "@progress/kendo-react-popup";
|
|
11
|
+
class a extends e.Component {
|
|
12
|
+
render() {
|
|
13
|
+
const {
|
|
14
|
+
children: n,
|
|
15
|
+
width: o,
|
|
16
|
+
dir: r,
|
|
17
|
+
itemsCount: t,
|
|
18
|
+
popupSettings: i
|
|
19
|
+
} = this.props;
|
|
20
|
+
return /* @__PURE__ */ e.createElement(
|
|
21
|
+
s,
|
|
22
|
+
{
|
|
23
|
+
style: { width: o, direction: r },
|
|
24
|
+
contentKey: t && t.join(),
|
|
25
|
+
...i
|
|
26
|
+
},
|
|
27
|
+
n
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
export {
|
|
32
|
+
a as default
|
|
33
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
"use client";"use strict";const r=require("react"),c=require("@progress/kendo-react-common"),l=require("./utils.js");function a(e){const n=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(n,t,s.get?s:{enumerable:!0,get:()=>e[t]})}}return n.default=e,Object.freeze(n)}const o=a(r),i=e=>e.preventDefault();class u extends o.Component{render(){const{selected:n,defaultItem:t,textField:s}=this.props;return o.createElement("div",{onClick:this.props.onClick,onMouseDown:i,style:{position:"unset"},className:c.classNames("k-list-optionlabel",{"k-selected":n})},l.getItemValue(t,s)||"")}}module.exports=u;
|