@progress/kendo-react-data-tools 9.0.0-develop.2 → 9.0.0-develop.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +27 -27
- package/columnmenu/ColumnMenu.js +1 -1
- package/columnmenu/ColumnMenu.mjs +83 -98
- package/columnmenu/ColumnMenuFilterForm.mjs +2 -22
- package/columnmenu/ColumnMenuFilterLogic.mjs +8 -2
- package/columnmenu/ColumnMenuFilters.mjs +5 -8
- package/columnmenu/ColumnMenuOperators.mjs +1 -3
- package/dist/cdn/js/kendo-react-datatools.js +1 -1
- package/drag/DragClue.mjs +8 -1
- package/filter/Expression.mjs +21 -4
- package/filter/Filter.mjs +6 -5
- package/filter/Group.mjs +43 -25
- package/filter/filters/BooleanFilter.mjs +4 -1
- package/filter/filters/EnumFilter.mjs +4 -1
- package/filter/filters/NumericFilter.mjs +4 -1
- package/filter/filters/TextFilter.mjs +3 -1
- package/filteringCells/BooleanFilter.js +1 -1
- package/filteringCells/BooleanFilter.mjs +9 -9
- package/header/HeaderRow.js +1 -1
- package/header/HeaderRow.mjs +20 -18
- package/header/utils/index.js +1 -1
- package/header/utils/index.mjs +55 -57
- package/index.d.mts +3 -3
- package/index.d.ts +3 -3
- package/navigation/TableKeyboardNavigation.js +1 -1
- package/navigation/TableKeyboardNavigation.mjs +25 -13
- package/navigation/TableKeyboardNavigationContext.mjs +3 -1
- package/navigation/utils.mjs +2 -8
- package/package-metadata.mjs +1 -1
- package/package.json +9 -9
- package/pager/PagerInput.mjs +14 -4
- package/pager/PagerNumericButtons.mjs +16 -19
- package/pager/PagerPageSizes.mjs +8 -2
- package/selection/TableSelection.mjs +17 -20
package/README.md
CHANGED
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
<img src="https://www.telerik.com/kendo-react-ui/components/npm-banner.svg" alt="KendoReact NPM Banner">
|
|
3
3
|
</a>
|
|
4
4
|
|
|
5
|
-
|
|
6
5
|
# KendoReact Data Tools Library for React
|
|
7
6
|
|
|
8
7
|
> **Important**
|
|
9
|
-
>
|
|
10
|
-
>
|
|
11
|
-
>
|
|
12
|
-
>
|
|
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-datatools)—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-datatools).
|
|
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-datatools) 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-datatools). 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-datatools).
|
|
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!
|
|
13
13
|
>
|
|
14
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-datatools) and speed up your development process!
|
|
15
15
|
|
|
@@ -17,11 +17,11 @@ The React Data Tools package, part of KendoReact, delivers data-related componen
|
|
|
17
17
|
|
|
18
18
|
What's in this package (ToC):
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
20
|
+
- [React Pager component](#react-pager-component)
|
|
21
|
+
- [React Filter component](#react-filter-component)
|
|
22
|
+
- [React Data Tools Library Shared Features](#react-data-tools-library-shared-features)
|
|
23
|
+
- [Support Options](#support-options)
|
|
24
|
+
- [Resources](#resources)
|
|
25
25
|
|
|
26
26
|
## React Pager Component
|
|
27
27
|
|
|
@@ -33,33 +33,33 @@ What's in this package (ToC):
|
|
|
33
33
|
|
|
34
34
|
## React Data Tools Library Shared Features
|
|
35
35
|
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
- **Accessibility support**—The Data Tools are compliant with WAI-ARIA and Section 508.
|
|
37
|
+
- [**Theme support**](https://www.telerik.com/kendo-react-ui/components/styling/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-datatools)—The KendoReact Data Tools, 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.
|
|
38
38
|
|
|
39
39
|
## Support Options
|
|
40
40
|
|
|
41
41
|
For any issues you might encounter while working with the KendoReact Data Tools, use any of the available support channels:
|
|
42
42
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
43
|
+
- 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-datatools).
|
|
44
|
+
- 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-datatools) are part of the free support you can get from the community and from the KendoReact team.
|
|
45
|
+
- 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-datatools) is where you can request and vote for new features to be added.
|
|
46
46
|
|
|
47
47
|
## Resources
|
|
48
48
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
49
|
+
- [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-datatools)
|
|
50
|
+
- [Getting Started with the KendoReact Data Tools](https://www.telerik.com/kendo-react-ui/components/datatools/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-datatools)
|
|
51
|
+
- [API Reference of the KendoReact Data Tools](https://www.telerik.com/kendo-react-ui/components/datatools/api/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-datatools)
|
|
52
|
+
- [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-datatools)
|
|
53
|
+
- [Blogs](https://www.telerik.com/blogs/tag/kendoreact?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-datatools)
|
|
54
|
+
- [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-datatools)
|
|
55
|
+
- [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-datatools)
|
|
56
|
+
- [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-datatools)
|
|
57
57
|
|
|
58
58
|
High-level component overview pages
|
|
59
59
|
|
|
60
|
-
|
|
61
|
-
|
|
60
|
+
- [React Filter Component](https://www.telerik.com/kendo-react-ui/filter)
|
|
61
|
+
- [React Pager Component](https://www.telerik.com/kendo-react-ui/pager)
|
|
62
62
|
|
|
63
|
-
|
|
63
|
+
_Copyright © 2024 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved._
|
|
64
64
|
|
|
65
|
-
|
|
65
|
+
_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._
|
package/columnmenu/ColumnMenu.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";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ce=require("react"),se=require("@progress/kendo-react-popup"),ue=require("@progress/kendo-react-intl"),ae=require("@progress/kendo-data-query"),y=require("./ColumnMenuItem.js"),F=require("./ColumnMenuFilters.js"),T=require("./ColumnMenuFilterLogic.js"),me=require("./ColumnMenuFilterForm.js"),g=require("../messages/index.js"),H=require("@progress/kendo-react-common"),fe=require("../package-metadata.js"),h=require("@progress/kendo-svg-icons");function de(n){const m=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const t in n)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(n,t);Object.defineProperty(m,t,r.get?r:{enumerable:!0,get:()=>n[t]})}}return m.default=n,Object.freeze(m)}const e=de(ce),S=n=>{H.validatePackage(fe.packageMetadata);const m=e.useRef([]),{field:t,filter:r,sort:l=m.current,onSortChange:f,onFilterChange:i,initialFilter:k,sortAsc:
|
|
8
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ce=require("react"),se=require("@progress/kendo-react-popup"),ue=require("@progress/kendo-react-intl"),ae=require("@progress/kendo-data-query"),y=require("./ColumnMenuItem.js"),F=require("./ColumnMenuFilters.js"),T=require("./ColumnMenuFilterLogic.js"),me=require("./ColumnMenuFilterForm.js"),g=require("../messages/index.js"),H=require("@progress/kendo-react-common"),fe=require("../package-metadata.js"),h=require("@progress/kendo-svg-icons");function de(n){const m=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const t in n)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(n,t);Object.defineProperty(m,t,r.get?r:{enumerable:!0,get:()=>n[t]})}}return m.default=n,Object.freeze(m)}const e=de(ce),S=n=>{H.validatePackage(fe.packageMetadata);const m=e.useRef([]),{field:t,filter:r,sort:l=m.current,onSortChange:f,onFilterChange:i,initialFilter:k,sortAsc:A=!1,sortDesc:B=!1,filterContent:L=[],expandFilters:D=!1}=n,[d,O]=e.useState(!1),[E,N]=e.useState(D),[c,v]=e.useState(t&&k?k(t):null),I=e.useRef(null),q=e.useRef(null),x=e.useRef(null),w=e.useRef(!1),p=e.useCallback(()=>(r||[]).find(o=>o.filters.every(s=>!ae.isCompositeFilterDescriptor(s)&&s.field===t)),[r,t]),C=e.useCallback(()=>{O(!1)},[]),J=e.useCallback(()=>{if(w.current){w.current=!1;return}clearTimeout(x.current),x.current=window.setTimeout(()=>{C()})},[C]),K=e.useCallback(()=>clearTimeout(x.current),[]),U=e.useCallback(o=>{w.current=d&&o.currentTarget===I.current},[d]),V=e.useCallback(()=>{O(!d),t&&k&&(N(d?!1:D),v(d?c:p()||k(t)))},[p,t,d,c,k,D]);e.useEffect(()=>{d&&q.current&&q.current.focus()},[d]);const X=e.useCallback(()=>N(!E),[E]),b=e.useCallback((o,s)=>{const u=[...l],a=u.findIndex(ie=>ie.field===t),M={field:t,dir:s};a>=0?u[a].dir!==M.dir?u.splice(a,1,M):u.splice(a,1):u.push(M),C(),f&&f.call(void 0,o,u,t)},[l,t,f,C]),P=e.useCallback((o,s,u)=>{const a={...c,filters:[...c.filters]},M=a.filters.indexOf(u);a.filters.splice(M,1,s),v(a)},[c]),Y=e.useCallback(o=>{o.preventDefault();const s=(r||[]).slice(),u=p(),a=u?s.indexOf(u):-1;a>=0?s.splice(a,1,c):s.push(c),C(),i&&i.call(void 0,o,s,t)},[r,c,t,i,C,p]),Z=e.useCallback(o=>{const s=(r||[]).slice(),u=p(),a=u?s.indexOf(u):-1;a>=0&&s.splice(a,1),k&&v(k(t)),C(),i&&i.call(void 0,o,s,t)},[r,t,i,k,C,p]),$=e.useCallback(o=>b(o,"asc"),[b]),ee=e.useCallback(o=>b(o,"desc"),[b]),te=e.useCallback(o=>c&&v({...c,logic:o.value.logic}),[c]),j=l.find(o=>o.field===t)||{dir:""},[_,z,W]=L,R=ue.useLocalization(),ne=A||B?e.createElement("div",{className:"k-columnmenu-item-wrapper",key:"sorting"},A&&e.createElement(y.ColumnMenuItem,{title:R.toLanguageString(g.columnMenuSortAscending,g.messages[g.columnMenuSortAscending]),iconClass:"k-i-sort-asc-small",svgIcon:h.sortAscSmallIcon,selected:j.dir==="asc",onClick:$}),B&&e.createElement(y.ColumnMenuItem,{title:R.toLanguageString(g.columnMenuSortDescending,g.messages[g.columnMenuSortDescending]),iconClass:"k-i-sort-desc-small",svgIcon:h.sortDescSmallIcon,selected:j.dir==="desc",onClick:ee})):null,le=c&&L.length>0?e.createElement("div",{className:"k-columnmenu-item-wrapper",key:"filtering"},e.createElement(y.ColumnMenuItem,{iconClass:"k-i-filter",svgIcon:h.filterIcon,title:R.toLanguageString(g.columnMenuFilterTitle,g.messages[g.columnMenuFilterTitle]),onClick:X}),e.createElement(me.ColumnMenuFilterForm,{show:E,onSubmit:Y,onReset:Z},_&&e.createElement(_,{filter:c.filters[0],onFilterChange:P}),z&&e.createElement(z,{value:c.logic,onChange:te}),W&&e.createElement(W,{filter:c.filters[1],onFilterChange:P}))):null,Q=[ne,le],oe=e.createElement("span",{ref:I,onClick:V,onMouseDown:U,className:"k-grid-header-menu k-grid-column-menu"+(p()?" k-active":""),key:"button"},e.createElement(H.IconWrap,{name:"filter",icon:h.filterIcon})),re=e.createElement(se.Popup,{anchor:I.current,show:d,key:"popup",popupClass:"k-column-menu k-column-menu-popup"},e.createElement("div",{ref:q,tabIndex:0,onBlur:J,onFocus:K,style:{outline:"none"}},n.itemsRender?n.itemsRender.call(void 0,Q,{closeMenu:C,field:t}):Q)),G=[oe,re];return e.createElement(e.Fragment,null,n.render?n.render.call(void 0,G):G)},Ce=n=>{const{field:m,...t}=n,r=e.useCallback(i=>({logic:"and",filters:[{operator:"contains",field:i,value:""},{operator:"contains",field:i,value:""}]}),[]),l=!!n.field,f=l?[F.ColumnMenuTextFilter,T.ColumnMenuFilterLogic,F.ColumnMenuTextFilter]:[];return e.createElement(S,{sortAsc:l,sortDesc:l,filterContent:f,initialFilter:l?r:void 0,field:m,...t})},ge=n=>{const{field:m,...t}=n,r=e.useCallback(i=>({logic:"or",filters:[{operator:"eq",field:i,value:null},{operator:"eq",field:i,value:null}]}),[]),l=!!n.field,f=l?[F.ColumnMenuNumericFilter,T.ColumnMenuFilterLogic,F.ColumnMenuNumericFilter]:[];return e.createElement(S,{sortAsc:l,sortDesc:l,filterContent:f,initialFilter:l?r:void 0,field:m,...t})},ke=n=>{const{field:m,...t}=n,r=e.useCallback(i=>({logic:"or",filters:[{operator:"eq",field:i,value:null},{operator:"eq",field:i,value:null}]}),[]),l=!!n.field,f=l?[F.ColumnMenuDateFilter,T.ColumnMenuFilterLogic,F.ColumnMenuDateFilter]:[];return e.createElement(S,{sortAsc:l,sortDesc:l,filterContent:f,initialFilter:l?r:void 0,field:m,...t})},pe=n=>{const{field:m,...t}=n,r=e.useCallback(i=>({logic:"and",filters:[{operator:"eq",field:i,value:!1}]}),[]),l=!!n.field,f=l?[F.ColumnMenuBooleanFilter]:[];return e.createElement(S,{sortAsc:l,sortDesc:l,filterContent:f,initialFilter:l?r:void 0,field:m,...t})};exports.ColumnMenuBooleanColumn=pe;exports.ColumnMenuDateColumn=ke;exports.ColumnMenuNumericColumn=ge;exports.ColumnMenuTextColumn=Ce;
|
|
@@ -12,7 +12,7 @@ import { useLocalization as fe } from "@progress/kendo-react-intl";
|
|
|
12
12
|
import { isCompositeFilterDescriptor as de } from "@progress/kendo-data-query";
|
|
13
13
|
import { ColumnMenuItem as I } from "./ColumnMenuItem.mjs";
|
|
14
14
|
import { ColumnMenuTextFilter as G, ColumnMenuNumericFilter as H, ColumnMenuDateFilter as J, ColumnMenuBooleanFilter as Ce } from "./ColumnMenuFilters.mjs";
|
|
15
|
-
import { ColumnMenuFilterLogic as
|
|
15
|
+
import { ColumnMenuFilterLogic as A } from "./ColumnMenuFilterLogic.mjs";
|
|
16
16
|
import { ColumnMenuFilterForm as pe } from "./ColumnMenuFilterForm.mjs";
|
|
17
17
|
import { columnMenuSortAscending as K, messages as R, columnMenuSortDescending as Q, columnMenuFilterTitle as U } from "../messages/index.mjs";
|
|
18
18
|
import { validatePackage as ge, IconWrap as ke } from "@progress/kendo-react-common";
|
|
@@ -27,50 +27,37 @@ const h = (o) => {
|
|
|
27
27
|
onSortChange: m,
|
|
28
28
|
onFilterChange: r,
|
|
29
29
|
initialFilter: p,
|
|
30
|
-
sortAsc:
|
|
30
|
+
sortAsc: B = !1,
|
|
31
31
|
sortDesc: T = !1,
|
|
32
32
|
filterContent: y = [],
|
|
33
33
|
expandFilters: b = !1
|
|
34
34
|
} = o, [d, L] = e.useState(!1), [E, q] = e.useState(b), [i, F] = e.useState(t && p ? p(t) : null), S = e.useRef(null), M = e.useRef(null), x = e.useRef(null), D = e.useRef(!1), g = e.useCallback(
|
|
35
|
-
() => (c || []).find(
|
|
35
|
+
() => (c || []).find(
|
|
36
|
+
(l) => l.filters.every((s) => !de(s) && s.field === t)
|
|
37
|
+
),
|
|
36
38
|
[c, t]
|
|
37
|
-
), C = e.useCallback(
|
|
38
|
-
()
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
});
|
|
51
|
-
},
|
|
52
|
-
[C]
|
|
53
|
-
), Y = e.useCallback(
|
|
54
|
-
() => clearTimeout(x.current),
|
|
55
|
-
[]
|
|
56
|
-
), Z = e.useCallback((l) => {
|
|
57
|
-
D.current = d && l.currentTarget === S.current;
|
|
58
|
-
}, [d]), $ = e.useCallback(
|
|
59
|
-
() => {
|
|
60
|
-
L(!d), t && p && (q(d ? !1 : b), F(d ? i : g() || p(t)));
|
|
61
|
-
},
|
|
62
|
-
[g, t, d, i, p, b]
|
|
63
|
-
);
|
|
64
|
-
e.useEffect(
|
|
65
|
-
() => {
|
|
66
|
-
d && M.current && M.current.focus();
|
|
39
|
+
), C = e.useCallback(() => {
|
|
40
|
+
L(!1);
|
|
41
|
+
}, []), X = e.useCallback(() => {
|
|
42
|
+
if (D.current) {
|
|
43
|
+
D.current = !1;
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
clearTimeout(x.current), x.current = window.setTimeout(() => {
|
|
47
|
+
C();
|
|
48
|
+
});
|
|
49
|
+
}, [C]), Y = e.useCallback(() => clearTimeout(x.current), []), Z = e.useCallback(
|
|
50
|
+
(l) => {
|
|
51
|
+
D.current = d && l.currentTarget === S.current;
|
|
67
52
|
},
|
|
68
53
|
[d]
|
|
69
|
-
)
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
54
|
+
), $ = e.useCallback(() => {
|
|
55
|
+
L(!d), t && p && (q(d ? !1 : b), F(d ? i : g() || p(t)));
|
|
56
|
+
}, [g, t, d, i, p, b]);
|
|
57
|
+
e.useEffect(() => {
|
|
58
|
+
d && M.current && M.current.focus();
|
|
59
|
+
}, [d]);
|
|
60
|
+
const ee = e.useCallback(() => q(!E), [E]), v = e.useCallback(
|
|
74
61
|
(l, s) => {
|
|
75
62
|
const a = [...n], u = a.findIndex((ue) => ue.field === t), k = { field: t, dir: s };
|
|
76
63
|
u >= 0 ? a[u].dir !== k.dir ? a.splice(u, 1, k) : a.splice(u, 1) : a.push(k), C(), m && m.call(void 0, l, a, t);
|
|
@@ -95,17 +82,22 @@ const h = (o) => {
|
|
|
95
82
|
u >= 0 && s.splice(u, 1), p && F(p(t)), C(), r && r.call(void 0, l, s, t);
|
|
96
83
|
},
|
|
97
84
|
[c, t, r, p, C, g]
|
|
98
|
-
), le = e.useCallback(
|
|
85
|
+
), le = e.useCallback(
|
|
86
|
+
(l) => v(l, "asc"),
|
|
87
|
+
[v]
|
|
88
|
+
), oe = e.useCallback(
|
|
89
|
+
(l) => v(l, "desc"),
|
|
90
|
+
[v]
|
|
91
|
+
), re = e.useCallback(
|
|
99
92
|
(l) => i && F({ ...i, logic: l.value.logic }),
|
|
100
93
|
[i]
|
|
101
|
-
), O = n.find((l) => l.field === t) || { dir: "" }, [
|
|
102
|
-
z,
|
|
103
|
-
P,
|
|
104
|
-
W
|
|
105
|
-
] = y, w = fe(), ie = A || T ? /* @__PURE__ */ e.createElement("div", { className: "k-columnmenu-item-wrapper", key: "sorting" }, A && /* @__PURE__ */ e.createElement(
|
|
94
|
+
), O = n.find((l) => l.field === t) || { dir: "" }, [z, P, W] = y, w = fe(), ie = B || T ? /* @__PURE__ */ e.createElement("div", { className: "k-columnmenu-item-wrapper", key: "sorting" }, B && /* @__PURE__ */ e.createElement(
|
|
106
95
|
I,
|
|
107
96
|
{
|
|
108
|
-
title: w.toLanguageString(
|
|
97
|
+
title: w.toLanguageString(
|
|
98
|
+
K,
|
|
99
|
+
R[K]
|
|
100
|
+
),
|
|
109
101
|
iconClass: "k-i-sort-asc-small",
|
|
110
102
|
svgIcon: ve,
|
|
111
103
|
selected: O.dir === "asc",
|
|
@@ -114,7 +106,10 @@ const h = (o) => {
|
|
|
114
106
|
), T && /* @__PURE__ */ e.createElement(
|
|
115
107
|
I,
|
|
116
108
|
{
|
|
117
|
-
title: w.toLanguageString(
|
|
109
|
+
title: w.toLanguageString(
|
|
110
|
+
Q,
|
|
111
|
+
R[Q]
|
|
112
|
+
),
|
|
118
113
|
iconClass: "k-i-sort-desc-small",
|
|
119
114
|
svgIcon: he,
|
|
120
115
|
selected: O.dir === "desc",
|
|
@@ -128,17 +123,19 @@ const h = (o) => {
|
|
|
128
123
|
title: w.toLanguageString(U, R[U]),
|
|
129
124
|
onClick: ee
|
|
130
125
|
}
|
|
131
|
-
), /* @__PURE__ */ e.createElement(
|
|
132
|
-
|
|
126
|
+
), /* @__PURE__ */ e.createElement(pe, { show: E, onSubmit: te, onReset: ne }, z && /* @__PURE__ */ e.createElement(
|
|
127
|
+
z,
|
|
133
128
|
{
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
129
|
+
filter: i.filters[0],
|
|
130
|
+
onFilterChange: N
|
|
131
|
+
}
|
|
132
|
+
), P && /* @__PURE__ */ e.createElement(P, { value: i.logic, onChange: re }), W && /* @__PURE__ */ e.createElement(
|
|
133
|
+
W,
|
|
134
|
+
{
|
|
135
|
+
filter: i.filters[1],
|
|
136
|
+
onFilterChange: N
|
|
137
|
+
}
|
|
138
|
+
))) : null, _ = [ie, se], ce = /* @__PURE__ */ e.createElement(
|
|
142
139
|
"span",
|
|
143
140
|
{
|
|
144
141
|
ref: S,
|
|
@@ -148,36 +145,19 @@ const h = (o) => {
|
|
|
148
145
|
key: "button"
|
|
149
146
|
},
|
|
150
147
|
/* @__PURE__ */ e.createElement(ke, { name: "filter", icon: V })
|
|
151
|
-
), ae = /* @__PURE__ */ e.createElement(
|
|
152
|
-
me,
|
|
153
|
-
{
|
|
154
|
-
anchor: S.current,
|
|
155
|
-
show: d,
|
|
156
|
-
key: "popup",
|
|
157
|
-
popupClass: "k-column-menu k-column-menu-popup"
|
|
158
|
-
},
|
|
159
|
-
/* @__PURE__ */ e.createElement(
|
|
160
|
-
"div",
|
|
161
|
-
{
|
|
162
|
-
ref: M,
|
|
163
|
-
tabIndex: 0,
|
|
164
|
-
onBlur: X,
|
|
165
|
-
onFocus: Y,
|
|
166
|
-
style: { outline: "none" }
|
|
167
|
-
},
|
|
168
|
-
o.itemsRender ? o.itemsRender.call(void 0, _, { closeMenu: C, field: t }) : _
|
|
169
|
-
)
|
|
170
|
-
), j = [ce, ae];
|
|
148
|
+
), ae = /* @__PURE__ */ e.createElement(me, { anchor: S.current, show: d, key: "popup", popupClass: "k-column-menu k-column-menu-popup" }, /* @__PURE__ */ e.createElement("div", { ref: M, tabIndex: 0, onBlur: X, onFocus: Y, style: { outline: "none" } }, o.itemsRender ? o.itemsRender.call(void 0, _, { closeMenu: C, field: t }) : _)), j = [ce, ae];
|
|
171
149
|
return /* @__PURE__ */ e.createElement(e.Fragment, null, o.render ? o.render.call(void 0, j) : j);
|
|
172
150
|
}, Te = (o) => {
|
|
173
151
|
const { field: f, ...t } = o, c = e.useCallback(
|
|
174
|
-
(r) => ({
|
|
152
|
+
(r) => ({
|
|
153
|
+
logic: "and",
|
|
154
|
+
filters: [
|
|
155
|
+
{ operator: "contains", field: r, value: "" },
|
|
156
|
+
{ operator: "contains", field: r, value: "" }
|
|
157
|
+
]
|
|
158
|
+
}),
|
|
175
159
|
[]
|
|
176
|
-
), n = !!o.field, m = n ? [
|
|
177
|
-
G,
|
|
178
|
-
B,
|
|
179
|
-
G
|
|
180
|
-
] : [];
|
|
160
|
+
), n = !!o.field, m = n ? [G, A, G] : [];
|
|
181
161
|
return /* @__PURE__ */ e.createElement(
|
|
182
162
|
h,
|
|
183
163
|
{
|
|
@@ -191,13 +171,15 @@ const h = (o) => {
|
|
|
191
171
|
);
|
|
192
172
|
}, ye = (o) => {
|
|
193
173
|
const { field: f, ...t } = o, c = e.useCallback(
|
|
194
|
-
(r) => ({
|
|
174
|
+
(r) => ({
|
|
175
|
+
logic: "or",
|
|
176
|
+
filters: [
|
|
177
|
+
{ operator: "eq", field: r, value: null },
|
|
178
|
+
{ operator: "eq", field: r, value: null }
|
|
179
|
+
]
|
|
180
|
+
}),
|
|
195
181
|
[]
|
|
196
|
-
), n = !!o.field, m = n ? [
|
|
197
|
-
H,
|
|
198
|
-
B,
|
|
199
|
-
H
|
|
200
|
-
] : [];
|
|
182
|
+
), n = !!o.field, m = n ? [H, A, H] : [];
|
|
201
183
|
return /* @__PURE__ */ e.createElement(
|
|
202
184
|
h,
|
|
203
185
|
{
|
|
@@ -211,13 +193,15 @@ const h = (o) => {
|
|
|
211
193
|
);
|
|
212
194
|
}, Le = (o) => {
|
|
213
195
|
const { field: f, ...t } = o, c = e.useCallback(
|
|
214
|
-
(r) => ({
|
|
196
|
+
(r) => ({
|
|
197
|
+
logic: "or",
|
|
198
|
+
filters: [
|
|
199
|
+
{ operator: "eq", field: r, value: null },
|
|
200
|
+
{ operator: "eq", field: r, value: null }
|
|
201
|
+
]
|
|
202
|
+
}),
|
|
215
203
|
[]
|
|
216
|
-
), n = !!o.field, m = n ? [
|
|
217
|
-
J,
|
|
218
|
-
B,
|
|
219
|
-
J
|
|
220
|
-
] : [];
|
|
204
|
+
), n = !!o.field, m = n ? [J, A, J] : [];
|
|
221
205
|
return /* @__PURE__ */ e.createElement(
|
|
222
206
|
h,
|
|
223
207
|
{
|
|
@@ -231,11 +215,12 @@ const h = (o) => {
|
|
|
231
215
|
);
|
|
232
216
|
}, qe = (o) => {
|
|
233
217
|
const { field: f, ...t } = o, c = e.useCallback(
|
|
234
|
-
(r) => ({
|
|
218
|
+
(r) => ({
|
|
219
|
+
logic: "and",
|
|
220
|
+
filters: [{ operator: "eq", field: r, value: !1 }]
|
|
221
|
+
}),
|
|
235
222
|
[]
|
|
236
|
-
), n = !!o.field, m = n ? [
|
|
237
|
-
Ce
|
|
238
|
-
] : [];
|
|
223
|
+
), n = !!o.field, m = n ? [Ce] : [];
|
|
239
224
|
return /* @__PURE__ */ e.createElement(
|
|
240
225
|
h,
|
|
241
226
|
{
|
|
@@ -11,33 +11,13 @@ import { Reveal as l } from "@progress/kendo-react-animation";
|
|
|
11
11
|
import { useLocalization as i } from "@progress/kendo-react-intl";
|
|
12
12
|
import { columnMenuFilterClearButton as m, messages as o, columnMenuFilterSubmitButton as r } from "../messages/index.mjs";
|
|
13
13
|
import { Button as a } from "@progress/kendo-react-buttons";
|
|
14
|
-
const c = (t) => /* @__PURE__ */ e.createElement("div", { className: "k-columnmenu-item-content" }, /* @__PURE__ */ e.createElement(l, { style: { position: "relative", display: "block" } }, t.show && /* @__PURE__ */ e.createElement("div", { className: "kendo-grid-filter-menu-container" }, /* @__PURE__ */ e.createElement(
|
|
15
|
-
"form",
|
|
16
|
-
{
|
|
17
|
-
className: "k-filter-menu",
|
|
18
|
-
onSubmit: t.onSubmit,
|
|
19
|
-
onReset: t.onReset
|
|
20
|
-
},
|
|
21
|
-
/* @__PURE__ */ e.createElement("div", { className: "k-filter-menu-container" }, t.children, /* @__PURE__ */ e.createElement("div", { className: "k-actions k-hstack k-justify-content-stretch" }, t.actions))
|
|
22
|
-
)))), g = (t) => {
|
|
14
|
+
const c = (t) => /* @__PURE__ */ e.createElement("div", { className: "k-columnmenu-item-content" }, /* @__PURE__ */ e.createElement(l, { style: { position: "relative", display: "block" } }, t.show && /* @__PURE__ */ e.createElement("div", { className: "kendo-grid-filter-menu-container" }, /* @__PURE__ */ e.createElement("form", { className: "k-filter-menu", onSubmit: t.onSubmit, onReset: t.onReset }, /* @__PURE__ */ e.createElement("div", { className: "k-filter-menu-container" }, t.children, /* @__PURE__ */ e.createElement("div", { className: "k-actions k-hstack k-justify-content-stretch" }, t.actions)))))), g = (t) => {
|
|
23
15
|
const n = i();
|
|
24
16
|
return /* @__PURE__ */ e.createElement(
|
|
25
17
|
c,
|
|
26
18
|
{
|
|
27
19
|
...t,
|
|
28
|
-
actions: /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(
|
|
29
|
-
a,
|
|
30
|
-
{
|
|
31
|
-
type: "reset"
|
|
32
|
-
},
|
|
33
|
-
n.toLanguageString(m, o[m])
|
|
34
|
-
), /* @__PURE__ */ e.createElement(
|
|
35
|
-
a,
|
|
36
|
-
{
|
|
37
|
-
themeColor: "primary"
|
|
38
|
-
},
|
|
39
|
-
n.toLanguageString(r, o[r])
|
|
40
|
-
))
|
|
20
|
+
actions: /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(a, { type: "reset" }, n.toLanguageString(m, o[m])), /* @__PURE__ */ e.createElement(a, { themeColor: "primary" }, n.toLanguageString(r, o[r])))
|
|
41
21
|
}
|
|
42
22
|
);
|
|
43
23
|
};
|
|
@@ -10,8 +10,14 @@ import * as a from "react";
|
|
|
10
10
|
import { DropDownList as i } from "@progress/kendo-react-dropdowns";
|
|
11
11
|
import { useLocalization as l } from "@progress/kendo-react-intl";
|
|
12
12
|
import { messages as c, columnMenuFilterAndLogic as r, columnMenuFilterOrLogic as m } from "../messages/index.mjs";
|
|
13
|
-
const g = [
|
|
14
|
-
|
|
13
|
+
const g = [
|
|
14
|
+
{ text: r, logic: "and" },
|
|
15
|
+
{ text: m, logic: "or" }
|
|
16
|
+
], d = (e) => {
|
|
17
|
+
const n = l(), o = (e.data || g).map((t) => ({
|
|
18
|
+
...t,
|
|
19
|
+
text: n.toLanguageString(t.text, c[t.text])
|
|
20
|
+
}));
|
|
15
21
|
return /* @__PURE__ */ a.createElement(
|
|
16
22
|
i,
|
|
17
23
|
{
|
|
@@ -26,7 +26,10 @@ const p = (n) => {
|
|
|
26
26
|
a.call(void 0, l, m, i);
|
|
27
27
|
},
|
|
28
28
|
[t, a, o]
|
|
29
|
-
), f = C(), v = o.map((l) => ({
|
|
29
|
+
), f = C(), v = o.map((l) => ({
|
|
30
|
+
...l,
|
|
31
|
+
text: f.toLanguageString(l.text, F[l.text])
|
|
32
|
+
}));
|
|
30
33
|
return /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(
|
|
31
34
|
x,
|
|
32
35
|
{
|
|
@@ -35,13 +38,7 @@ const p = (n) => {
|
|
|
35
38
|
data: v,
|
|
36
39
|
textField: "text"
|
|
37
40
|
}
|
|
38
|
-
), /* @__PURE__ */ e.createElement(
|
|
39
|
-
n.input,
|
|
40
|
-
{
|
|
41
|
-
value: t.value,
|
|
42
|
-
onChange: g
|
|
43
|
-
}
|
|
44
|
-
));
|
|
41
|
+
), /* @__PURE__ */ e.createElement(n.input, { value: t.value, onChange: g }));
|
|
45
42
|
}, y = (n) => {
|
|
46
43
|
const { filter: t, onFilterChange: a } = n, o = e.useCallback(
|
|
47
44
|
(c) => a.call(void 0, c.syntheticEvent, { ...t, value: c.value }, t),
|
|
@@ -36,9 +36,7 @@ const E = [
|
|
|
36
36
|
{ text: q, operator: "lte" },
|
|
37
37
|
{ text: r, operator: "isnull" },
|
|
38
38
|
{ text: o, operator: "isnotnull" }
|
|
39
|
-
], f = [
|
|
40
|
-
{ text: g, operator: "" }
|
|
41
|
-
];
|
|
39
|
+
], f = [{ text: g, operator: "" }];
|
|
42
40
|
class y {
|
|
43
41
|
/**
|
|
44
42
|
* An array containing the operators for the ColumnMenuTextFilter component.
|