@progress/kendo-react-data-tools 9.5.0 → 10.0.0-develop.2
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/columnmenu/ColumnMenu.js +1 -1
- package/columnmenu/ColumnMenu.mjs +138 -139
- package/dist/cdn/js/kendo-react-datatools.js +1 -1
- package/filter/Filter.js +1 -1
- package/filter/Filter.mjs +22 -21
- package/index.d.mts +1 -0
- package/index.d.ts +1 -0
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +10 -10
- package/pager/Pager.js +1 -1
- package/pager/Pager.mjs +36 -38
package/columnmenu/ColumnMenu.js
CHANGED
|
@@ -6,4 +6,4 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
"use client";
|
|
9
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
9
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ue=require("react"),ae=require("@progress/kendo-react-popup"),me=require("@progress/kendo-react-intl"),fe=require("@progress/kendo-data-query"),T=require("./ColumnMenuItem.js"),F=require("./ColumnMenuFilters.js"),A=require("./ColumnMenuFilterLogic.js"),de=require("./ColumnMenuFilterForm.js"),g=require("../messages/index.js"),L=require("@progress/kendo-react-common"),Ce=require("../package-metadata.js"),S=require("@progress/kendo-svg-icons");function ge(l){const m=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(l){for(const c in l)if(c!=="default"){const t=Object.getOwnPropertyDescriptor(l,c);Object.defineProperty(m,c,t.get?t:{enumerable:!0,get:()=>l[c]})}}return m.default=l,Object.freeze(m)}const e=ge(ue),E=l=>{const m=!L.validatePackage(Ce.packageMetadata,{component:"ColumnMenu"}),c=e.useRef([]),{field:t,filter:n,sort:f=c.current,onSortChange:s,onFilterChange:M,initialFilter:k,sortAsc:B=!1,sortDesc:O=!1,filterContent:N=[],expandFilters:D=!1}=l,[d,P]=e.useState(!1),[I,j]=e.useState(D),[r,b]=e.useState(t&&k?k(t):null),q=e.useRef(null),w=e.useRef(null),x=e.useRef(null),R=e.useRef(!1),p=e.useCallback(()=>(n||[]).find(o=>o.filters.every(i=>!fe.isCompositeFilterDescriptor(i)&&i.field===t)),[n,t]),C=e.useCallback(()=>{P(!1)},[]),K=e.useCallback(()=>{if(R.current){R.current=!1;return}clearTimeout(x.current),x.current=window.setTimeout(()=>{C()})},[C]),U=e.useCallback(()=>clearTimeout(x.current),[]),V=e.useCallback(o=>{R.current=d&&o.currentTarget===q.current},[d]),X=e.useCallback(()=>{P(!d),t&&k&&(j(d?!1:D),b(d?r:p()||k(t)))},[p,t,d,r,k,D]);e.useEffect(()=>{d&&w.current&&w.current.focus()},[d]);const Y=e.useCallback(()=>j(!I),[I]),h=e.useCallback((o,i)=>{const u=[...f],a=u.findIndex(se=>se.field===t),v={field:t,dir:i};a>=0?u[a].dir!==v.dir?u.splice(a,1,v):u.splice(a,1):u.push(v),C(),s&&s.call(void 0,o,u,t)},[f,t,s,C]),W=e.useCallback((o,i,u)=>{const a={...r,filters:[...r.filters]},v=a.filters.indexOf(u);a.filters.splice(v,1,i),b(a)},[r]),Z=e.useCallback(o=>{o.preventDefault();const i=(n||[]).slice(),u=p(),a=u?i.indexOf(u):-1;a>=0?i.splice(a,1,r):i.push(r),C(),M&&M.call(void 0,o,i,t)},[n,r,t,M,C,p]),$=e.useCallback(o=>{const i=(n||[]).slice(),u=p(),a=u?i.indexOf(u):-1;a>=0&&i.splice(a,1),k&&b(k(t)),C(),M&&M.call(void 0,o,i,t)},[n,t,M,k,C,p]),ee=e.useCallback(o=>h(o,"asc"),[h]),te=e.useCallback(o=>h(o,"desc"),[h]),ne=e.useCallback(o=>r&&b({...r,logic:o.value.logic}),[r]),_=f.find(o=>o.field===t)||{dir:""},[z,Q,G]=N,y=me.useLocalization(),le=B||O?e.createElement("div",{className:"k-columnmenu-item-wrapper",key:"sorting"},B&&e.createElement(T.ColumnMenuItem,{title:y.toLanguageString(g.columnMenuSortAscending,g.messages[g.columnMenuSortAscending]),iconClass:"k-i-sort-asc-small",svgIcon:S.sortAscSmallIcon,selected:_.dir==="asc",onClick:ee}),O&&e.createElement(T.ColumnMenuItem,{title:y.toLanguageString(g.columnMenuSortDescending,g.messages[g.columnMenuSortDescending]),iconClass:"k-i-sort-desc-small",svgIcon:S.sortDescSmallIcon,selected:_.dir==="desc",onClick:te})):null,oe=r&&N.length>0?e.createElement("div",{className:"k-columnmenu-item-wrapper",key:"filtering"},e.createElement(T.ColumnMenuItem,{iconClass:"k-i-filter",svgIcon:S.filterIcon,title:y.toLanguageString(g.columnMenuFilterTitle,g.messages[g.columnMenuFilterTitle]),onClick:Y}),e.createElement(de.ColumnMenuFilterForm,{show:I,onSubmit:Z,onReset:$},z&&e.createElement(z,{filter:r.filters[0],onFilterChange:W}),Q&&e.createElement(Q,{value:r.logic,onChange:ne}),G&&e.createElement(G,{filter:r.filters[1],onFilterChange:W}))):null,H=[le,oe],re=e.createElement("span",{ref:q,onClick:X,onMouseDown:V,className:"k-grid-header-menu k-grid-column-menu"+(p()?" k-active":""),key:"button"},e.createElement(L.IconWrap,{name:"filter",icon:S.filterIcon})),ie=e.createElement(ae.Popup,{anchor:q.current,show:d,key:"popup",popupClass:"k-column-menu k-column-menu-popup"},e.createElement("div",{ref:w,tabIndex:0,onBlur:K,onFocus:U,style:{outline:"none"}},l.itemsRender?l.itemsRender.call(void 0,H,{closeMenu:C,field:t}):H)),ce=m?e.createElement(L.WatermarkOverlay,null):e.createElement(e.Fragment,null),J=[re,ie,ce];return e.createElement(e.Fragment,null,l.render?l.render.call(void 0,J):J)},ke=l=>{const{field:m,...c}=l,t=e.useCallback(s=>({logic:"and",filters:[{operator:"contains",field:s,value:""},{operator:"contains",field:s,value:""}]}),[]),n=!!l.field,f=n?[F.ColumnMenuTextFilter,A.ColumnMenuFilterLogic,F.ColumnMenuTextFilter]:[];return e.createElement(E,{sortAsc:n,sortDesc:n,filterContent:f,initialFilter:n?t:void 0,field:m,...c})},pe=l=>{const{field:m,...c}=l,t=e.useCallback(s=>({logic:"or",filters:[{operator:"eq",field:s,value:null},{operator:"eq",field:s,value:null}]}),[]),n=!!l.field,f=n?[F.ColumnMenuNumericFilter,A.ColumnMenuFilterLogic,F.ColumnMenuNumericFilter]:[];return e.createElement(E,{sortAsc:n,sortDesc:n,filterContent:f,initialFilter:n?t:void 0,field:m,...c})},Fe=l=>{const{field:m,...c}=l,t=e.useCallback(s=>({logic:"or",filters:[{operator:"eq",field:s,value:null},{operator:"eq",field:s,value:null}]}),[]),n=!!l.field,f=n?[F.ColumnMenuDateFilter,A.ColumnMenuFilterLogic,F.ColumnMenuDateFilter]:[];return e.createElement(E,{sortAsc:n,sortDesc:n,filterContent:f,initialFilter:n?t:void 0,field:m,...c})},Me=l=>{const{field:m,...c}=l,t=e.useCallback(s=>({logic:"and",filters:[{operator:"eq",field:s,value:!1}]}),[]),n=!!l.field,f=n?[F.ColumnMenuBooleanFilter]:[];return e.createElement(E,{sortAsc:n,sortDesc:n,filterContent:f,initialFilter:n?t:void 0,field:m,...c})};exports.ColumnMenuBooleanColumn=Me;exports.ColumnMenuDateColumn=Fe;exports.ColumnMenuNumericColumn=pe;exports.ColumnMenuTextColumn=ke;
|
|
@@ -7,38 +7,37 @@
|
|
|
7
7
|
*/
|
|
8
8
|
"use client";
|
|
9
9
|
import * as e from "react";
|
|
10
|
-
import { Popup as
|
|
11
|
-
import { useLocalization as
|
|
12
|
-
import { isCompositeFilterDescriptor as
|
|
13
|
-
import { ColumnMenuItem as
|
|
14
|
-
import { ColumnMenuTextFilter as
|
|
15
|
-
import { ColumnMenuFilterLogic as
|
|
16
|
-
import { ColumnMenuFilterForm as
|
|
17
|
-
import { columnMenuSortAscending as
|
|
18
|
-
import { validatePackage as
|
|
19
|
-
import { packageMetadata as
|
|
20
|
-
import { sortAscSmallIcon as
|
|
21
|
-
const
|
|
22
|
-
|
|
23
|
-
const f = e.useRef([]), {
|
|
10
|
+
import { Popup as de } from "@progress/kendo-react-popup";
|
|
11
|
+
import { useLocalization as Ce } from "@progress/kendo-react-intl";
|
|
12
|
+
import { isCompositeFilterDescriptor as pe } from "@progress/kendo-data-query";
|
|
13
|
+
import { ColumnMenuItem as R } from "./ColumnMenuItem.mjs";
|
|
14
|
+
import { ColumnMenuTextFilter as H, ColumnMenuNumericFilter as J, ColumnMenuDateFilter as K, ColumnMenuBooleanFilter as ge } from "./ColumnMenuFilters.mjs";
|
|
15
|
+
import { ColumnMenuFilterLogic as B } from "./ColumnMenuFilterLogic.mjs";
|
|
16
|
+
import { ColumnMenuFilterForm as ke } from "./ColumnMenuFilterForm.mjs";
|
|
17
|
+
import { columnMenuSortAscending as Q, messages as A, columnMenuSortDescending as U, columnMenuFilterTitle as V } from "../messages/index.mjs";
|
|
18
|
+
import { validatePackage as Fe, IconWrap as ve, WatermarkOverlay as he } from "@progress/kendo-react-common";
|
|
19
|
+
import { packageMetadata as be } from "../package-metadata.mjs";
|
|
20
|
+
import { sortAscSmallIcon as Ee, sortDescSmallIcon as Me, filterIcon as X } from "@progress/kendo-svg-icons";
|
|
21
|
+
const b = (o) => {
|
|
22
|
+
const m = !Fe(be, { component: "ColumnMenu" }), f = e.useRef([]), {
|
|
24
23
|
field: t,
|
|
25
|
-
filter:
|
|
26
|
-
sort:
|
|
27
|
-
onSortChange:
|
|
28
|
-
onFilterChange:
|
|
24
|
+
filter: n,
|
|
25
|
+
sort: u = f.current,
|
|
26
|
+
onSortChange: s,
|
|
27
|
+
onFilterChange: k,
|
|
29
28
|
initialFilter: p,
|
|
30
|
-
sortAsc:
|
|
31
|
-
sortDesc:
|
|
32
|
-
filterContent:
|
|
33
|
-
expandFilters:
|
|
34
|
-
} = o, [d,
|
|
35
|
-
() => (
|
|
36
|
-
(l) => l.filters.every((
|
|
29
|
+
sortAsc: y = !1,
|
|
30
|
+
sortDesc: L = !1,
|
|
31
|
+
filterContent: T = [],
|
|
32
|
+
expandFilters: E = !1
|
|
33
|
+
} = o, [d, q] = e.useState(!1), [M, N] = e.useState(E), [r, v] = e.useState(t && p ? p(t) : null), S = e.useRef(null), w = e.useRef(null), x = e.useRef(null), D = e.useRef(!1), g = e.useCallback(
|
|
34
|
+
() => (n || []).find(
|
|
35
|
+
(l) => l.filters.every((i) => !pe(i) && i.field === t)
|
|
37
36
|
),
|
|
38
|
-
[
|
|
37
|
+
[n, t]
|
|
39
38
|
), C = e.useCallback(() => {
|
|
40
|
-
|
|
41
|
-
}, []),
|
|
39
|
+
q(!1);
|
|
40
|
+
}, []), Y = e.useCallback(() => {
|
|
42
41
|
if (D.current) {
|
|
43
42
|
D.current = !1;
|
|
44
43
|
return;
|
|
@@ -46,196 +45,196 @@ const h = (o) => {
|
|
|
46
45
|
clearTimeout(x.current), x.current = window.setTimeout(() => {
|
|
47
46
|
C();
|
|
48
47
|
});
|
|
49
|
-
}, [C]),
|
|
48
|
+
}, [C]), Z = e.useCallback(() => clearTimeout(x.current), []), $ = e.useCallback(
|
|
50
49
|
(l) => {
|
|
51
50
|
D.current = d && l.currentTarget === S.current;
|
|
52
51
|
},
|
|
53
52
|
[d]
|
|
54
|
-
),
|
|
55
|
-
|
|
56
|
-
}, [g, t, d,
|
|
53
|
+
), ee = e.useCallback(() => {
|
|
54
|
+
q(!d), t && p && (N(d ? !1 : E), v(d ? r : g() || p(t)));
|
|
55
|
+
}, [g, t, d, r, p, E]);
|
|
57
56
|
e.useEffect(() => {
|
|
58
|
-
d &&
|
|
57
|
+
d && w.current && w.current.focus();
|
|
59
58
|
}, [d]);
|
|
60
|
-
const
|
|
61
|
-
(l,
|
|
62
|
-
const
|
|
63
|
-
|
|
59
|
+
const te = e.useCallback(() => N(!M), [M]), h = e.useCallback(
|
|
60
|
+
(l, i) => {
|
|
61
|
+
const c = [...u], a = c.findIndex((fe) => fe.field === t), F = { field: t, dir: i };
|
|
62
|
+
a >= 0 ? c[a].dir !== F.dir ? c.splice(a, 1, F) : c.splice(a, 1) : c.push(F), C(), s && s.call(void 0, l, c, t);
|
|
64
63
|
},
|
|
65
|
-
[
|
|
66
|
-
),
|
|
67
|
-
(l,
|
|
68
|
-
const
|
|
69
|
-
|
|
64
|
+
[u, t, s, C]
|
|
65
|
+
), O = e.useCallback(
|
|
66
|
+
(l, i, c) => {
|
|
67
|
+
const a = { ...r, filters: [...r.filters] }, F = a.filters.indexOf(c);
|
|
68
|
+
a.filters.splice(F, 1, i), v(a);
|
|
70
69
|
},
|
|
71
|
-
[
|
|
72
|
-
),
|
|
70
|
+
[r]
|
|
71
|
+
), ne = e.useCallback(
|
|
73
72
|
(l) => {
|
|
74
73
|
l.preventDefault();
|
|
75
|
-
const
|
|
76
|
-
|
|
74
|
+
const i = (n || []).slice(), c = g(), a = c ? i.indexOf(c) : -1;
|
|
75
|
+
a >= 0 ? i.splice(a, 1, r) : i.push(r), C(), k && k.call(void 0, l, i, t);
|
|
77
76
|
},
|
|
78
|
-
[
|
|
79
|
-
),
|
|
77
|
+
[n, r, t, k, C, g]
|
|
78
|
+
), le = e.useCallback(
|
|
80
79
|
(l) => {
|
|
81
|
-
const
|
|
82
|
-
|
|
80
|
+
const i = (n || []).slice(), c = g(), a = c ? i.indexOf(c) : -1;
|
|
81
|
+
a >= 0 && i.splice(a, 1), p && v(p(t)), C(), k && k.call(void 0, l, i, t);
|
|
83
82
|
},
|
|
84
|
-
[
|
|
85
|
-
), le = e.useCallback(
|
|
86
|
-
(l) => v(l, "asc"),
|
|
87
|
-
[v]
|
|
83
|
+
[n, t, k, p, C, g]
|
|
88
84
|
), oe = e.useCallback(
|
|
89
|
-
(l) =>
|
|
90
|
-
[
|
|
85
|
+
(l) => h(l, "asc"),
|
|
86
|
+
[h]
|
|
91
87
|
), re = e.useCallback(
|
|
92
|
-
(l) =>
|
|
93
|
-
[
|
|
94
|
-
),
|
|
95
|
-
|
|
88
|
+
(l) => h(l, "desc"),
|
|
89
|
+
[h]
|
|
90
|
+
), ie = e.useCallback(
|
|
91
|
+
(l) => r && v({ ...r, logic: l.value.logic }),
|
|
92
|
+
[r]
|
|
93
|
+
), W = u.find((l) => l.field === t) || { dir: "" }, [z, P, _] = T, I = Ce(), se = y || L ? /* @__PURE__ */ e.createElement("div", { className: "k-columnmenu-item-wrapper", key: "sorting" }, y && /* @__PURE__ */ e.createElement(
|
|
94
|
+
R,
|
|
96
95
|
{
|
|
97
|
-
title:
|
|
98
|
-
|
|
99
|
-
|
|
96
|
+
title: I.toLanguageString(
|
|
97
|
+
Q,
|
|
98
|
+
A[Q]
|
|
100
99
|
),
|
|
101
100
|
iconClass: "k-i-sort-asc-small",
|
|
102
|
-
svgIcon:
|
|
103
|
-
selected:
|
|
104
|
-
onClick:
|
|
101
|
+
svgIcon: Ee,
|
|
102
|
+
selected: W.dir === "asc",
|
|
103
|
+
onClick: oe
|
|
105
104
|
}
|
|
106
|
-
),
|
|
107
|
-
|
|
105
|
+
), L && /* @__PURE__ */ e.createElement(
|
|
106
|
+
R,
|
|
108
107
|
{
|
|
109
|
-
title:
|
|
110
|
-
|
|
111
|
-
|
|
108
|
+
title: I.toLanguageString(
|
|
109
|
+
U,
|
|
110
|
+
A[U]
|
|
112
111
|
),
|
|
113
112
|
iconClass: "k-i-sort-desc-small",
|
|
114
|
-
svgIcon:
|
|
115
|
-
selected:
|
|
116
|
-
onClick:
|
|
113
|
+
svgIcon: Me,
|
|
114
|
+
selected: W.dir === "desc",
|
|
115
|
+
onClick: re
|
|
117
116
|
}
|
|
118
|
-
)) : null,
|
|
119
|
-
|
|
117
|
+
)) : null, ce = r && T.length > 0 ? /* @__PURE__ */ e.createElement("div", { className: "k-columnmenu-item-wrapper", key: "filtering" }, /* @__PURE__ */ e.createElement(
|
|
118
|
+
R,
|
|
120
119
|
{
|
|
121
120
|
iconClass: "k-i-filter",
|
|
122
|
-
svgIcon:
|
|
123
|
-
title:
|
|
124
|
-
onClick:
|
|
121
|
+
svgIcon: X,
|
|
122
|
+
title: I.toLanguageString(V, A[V]),
|
|
123
|
+
onClick: te
|
|
125
124
|
}
|
|
126
|
-
), /* @__PURE__ */ e.createElement(
|
|
125
|
+
), /* @__PURE__ */ e.createElement(ke, { show: M, onSubmit: ne, onReset: le }, z && /* @__PURE__ */ e.createElement(
|
|
127
126
|
z,
|
|
128
127
|
{
|
|
129
|
-
filter:
|
|
130
|
-
onFilterChange:
|
|
128
|
+
filter: r.filters[0],
|
|
129
|
+
onFilterChange: O
|
|
131
130
|
}
|
|
132
|
-
), P && /* @__PURE__ */ e.createElement(P, { value:
|
|
133
|
-
|
|
131
|
+
), P && /* @__PURE__ */ e.createElement(P, { value: r.logic, onChange: ie }), _ && /* @__PURE__ */ e.createElement(
|
|
132
|
+
_,
|
|
134
133
|
{
|
|
135
|
-
filter:
|
|
136
|
-
onFilterChange:
|
|
134
|
+
filter: r.filters[1],
|
|
135
|
+
onFilterChange: O
|
|
137
136
|
}
|
|
138
|
-
))) : null,
|
|
137
|
+
))) : null, j = [se, ce], ae = /* @__PURE__ */ e.createElement(
|
|
139
138
|
"span",
|
|
140
139
|
{
|
|
141
140
|
ref: S,
|
|
142
|
-
onClick:
|
|
143
|
-
onMouseDown:
|
|
141
|
+
onClick: ee,
|
|
142
|
+
onMouseDown: $,
|
|
144
143
|
className: "k-grid-header-menu k-grid-column-menu" + (g() ? " k-active" : ""),
|
|
145
144
|
key: "button"
|
|
146
145
|
},
|
|
147
|
-
/* @__PURE__ */ e.createElement(
|
|
148
|
-
),
|
|
149
|
-
return /* @__PURE__ */ e.createElement(e.Fragment, null, o.render ? o.render.call(void 0,
|
|
150
|
-
},
|
|
151
|
-
const { field:
|
|
152
|
-
(
|
|
146
|
+
/* @__PURE__ */ e.createElement(ve, { name: "filter", icon: X })
|
|
147
|
+
), ue = /* @__PURE__ */ e.createElement(de, { anchor: S.current, show: d, key: "popup", popupClass: "k-column-menu k-column-menu-popup" }, /* @__PURE__ */ e.createElement("div", { ref: w, tabIndex: 0, onBlur: Y, onFocus: Z, style: { outline: "none" } }, o.itemsRender ? o.itemsRender.call(void 0, j, { closeMenu: C, field: t }) : j)), me = m ? /* @__PURE__ */ e.createElement(he, null) : /* @__PURE__ */ e.createElement(e.Fragment, null), G = [ae, ue, me];
|
|
148
|
+
return /* @__PURE__ */ e.createElement(e.Fragment, null, o.render ? o.render.call(void 0, G) : G);
|
|
149
|
+
}, qe = (o) => {
|
|
150
|
+
const { field: m, ...f } = o, t = e.useCallback(
|
|
151
|
+
(s) => ({
|
|
153
152
|
logic: "and",
|
|
154
153
|
filters: [
|
|
155
|
-
{ operator: "contains", field:
|
|
156
|
-
{ operator: "contains", field:
|
|
154
|
+
{ operator: "contains", field: s, value: "" },
|
|
155
|
+
{ operator: "contains", field: s, value: "" }
|
|
157
156
|
]
|
|
158
157
|
}),
|
|
159
158
|
[]
|
|
160
|
-
), n = !!o.field,
|
|
159
|
+
), n = !!o.field, u = n ? [H, B, H] : [];
|
|
161
160
|
return /* @__PURE__ */ e.createElement(
|
|
162
|
-
|
|
161
|
+
b,
|
|
163
162
|
{
|
|
164
163
|
sortAsc: n,
|
|
165
164
|
sortDesc: n,
|
|
166
|
-
filterContent:
|
|
167
|
-
initialFilter: n ?
|
|
168
|
-
field:
|
|
169
|
-
...
|
|
165
|
+
filterContent: u,
|
|
166
|
+
initialFilter: n ? t : void 0,
|
|
167
|
+
field: m,
|
|
168
|
+
...f
|
|
170
169
|
}
|
|
171
170
|
);
|
|
172
|
-
},
|
|
173
|
-
const { field:
|
|
174
|
-
(
|
|
171
|
+
}, Ne = (o) => {
|
|
172
|
+
const { field: m, ...f } = o, t = e.useCallback(
|
|
173
|
+
(s) => ({
|
|
175
174
|
logic: "or",
|
|
176
175
|
filters: [
|
|
177
|
-
{ operator: "eq", field:
|
|
178
|
-
{ operator: "eq", field:
|
|
176
|
+
{ operator: "eq", field: s, value: null },
|
|
177
|
+
{ operator: "eq", field: s, value: null }
|
|
179
178
|
]
|
|
180
179
|
}),
|
|
181
180
|
[]
|
|
182
|
-
), n = !!o.field,
|
|
181
|
+
), n = !!o.field, u = n ? [J, B, J] : [];
|
|
183
182
|
return /* @__PURE__ */ e.createElement(
|
|
184
|
-
|
|
183
|
+
b,
|
|
185
184
|
{
|
|
186
185
|
sortAsc: n,
|
|
187
186
|
sortDesc: n,
|
|
188
|
-
filterContent:
|
|
189
|
-
initialFilter: n ?
|
|
190
|
-
field:
|
|
191
|
-
...
|
|
187
|
+
filterContent: u,
|
|
188
|
+
initialFilter: n ? t : void 0,
|
|
189
|
+
field: m,
|
|
190
|
+
...f
|
|
192
191
|
}
|
|
193
192
|
);
|
|
194
|
-
},
|
|
195
|
-
const { field:
|
|
196
|
-
(
|
|
193
|
+
}, Oe = (o) => {
|
|
194
|
+
const { field: m, ...f } = o, t = e.useCallback(
|
|
195
|
+
(s) => ({
|
|
197
196
|
logic: "or",
|
|
198
197
|
filters: [
|
|
199
|
-
{ operator: "eq", field:
|
|
200
|
-
{ operator: "eq", field:
|
|
198
|
+
{ operator: "eq", field: s, value: null },
|
|
199
|
+
{ operator: "eq", field: s, value: null }
|
|
201
200
|
]
|
|
202
201
|
}),
|
|
203
202
|
[]
|
|
204
|
-
), n = !!o.field,
|
|
203
|
+
), n = !!o.field, u = n ? [K, B, K] : [];
|
|
205
204
|
return /* @__PURE__ */ e.createElement(
|
|
206
|
-
|
|
205
|
+
b,
|
|
207
206
|
{
|
|
208
207
|
sortAsc: n,
|
|
209
208
|
sortDesc: n,
|
|
210
|
-
filterContent:
|
|
211
|
-
initialFilter: n ?
|
|
212
|
-
field:
|
|
213
|
-
...
|
|
209
|
+
filterContent: u,
|
|
210
|
+
initialFilter: n ? t : void 0,
|
|
211
|
+
field: m,
|
|
212
|
+
...f
|
|
214
213
|
}
|
|
215
214
|
);
|
|
216
|
-
},
|
|
217
|
-
const { field:
|
|
218
|
-
(
|
|
215
|
+
}, We = (o) => {
|
|
216
|
+
const { field: m, ...f } = o, t = e.useCallback(
|
|
217
|
+
(s) => ({
|
|
219
218
|
logic: "and",
|
|
220
|
-
filters: [{ operator: "eq", field:
|
|
219
|
+
filters: [{ operator: "eq", field: s, value: !1 }]
|
|
221
220
|
}),
|
|
222
221
|
[]
|
|
223
|
-
), n = !!o.field,
|
|
222
|
+
), n = !!o.field, u = n ? [ge] : [];
|
|
224
223
|
return /* @__PURE__ */ e.createElement(
|
|
225
|
-
|
|
224
|
+
b,
|
|
226
225
|
{
|
|
227
226
|
sortAsc: n,
|
|
228
227
|
sortDesc: n,
|
|
229
|
-
filterContent:
|
|
230
|
-
initialFilter: n ?
|
|
231
|
-
field:
|
|
232
|
-
...
|
|
228
|
+
filterContent: u,
|
|
229
|
+
initialFilter: n ? t : void 0,
|
|
230
|
+
field: m,
|
|
231
|
+
...f
|
|
233
232
|
}
|
|
234
233
|
);
|
|
235
234
|
};
|
|
236
235
|
export {
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
236
|
+
We as ColumnMenuBooleanColumn,
|
|
237
|
+
Oe as ColumnMenuDateColumn,
|
|
238
|
+
Ne as ColumnMenuNumericColumn,
|
|
239
|
+
qe as ColumnMenuTextColumn
|
|
241
240
|
};
|