@progress/kendo-react-grid 11.0.0-develop.4 → 11.0.0-develop.6
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/GridColumnMenuCheckboxFilter.js +1 -1
- package/columnMenu/GridColumnMenuCheckboxFilter.mjs +83 -84
- package/columnMenu/GridColumnMenuColumnsChooser.js +1 -1
- package/columnMenu/GridColumnMenuColumnsChooser.mjs +71 -72
- package/columnMenu/GridColumnMenuFilter.js +1 -1
- package/columnMenu/GridColumnMenuFilter.mjs +83 -84
- package/columnMenu/GridColumnMenuItem.js +1 -1
- package/columnMenu/GridColumnMenuItem.mjs +8 -8
- package/columnMenu/adaptiveContent/GridAdaptiveCheckboxFilter.js +1 -1
- package/columnMenu/adaptiveContent/GridAdaptiveCheckboxFilter.mjs +40 -34
- package/columnMenu/adaptiveContent/GridAdaptiveColumnChooser.js +1 -1
- package/columnMenu/adaptiveContent/GridAdaptiveColumnChooser.mjs +51 -45
- package/columnMenu/adaptiveContent/GridAdaptiveFilterMenu.js +1 -1
- package/columnMenu/adaptiveContent/GridAdaptiveFilterMenu.mjs +40 -33
- package/dist/cdn/js/kendo-react-grid.js +1 -1
- package/index.d.mts +6 -1
- package/index.d.ts +6 -1
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +16 -16
|
@@ -7,27 +7,26 @@
|
|
|
7
7
|
*/
|
|
8
8
|
"use client";
|
|
9
9
|
import * as l from "react";
|
|
10
|
-
import { isCompositeFilterDescriptor as
|
|
10
|
+
import { isCompositeFilterDescriptor as R } from "@progress/kendo-data-query";
|
|
11
11
|
import { GridColumnMenuItem as se } from "./GridColumnMenuItem.mjs";
|
|
12
|
-
import { GridColumnMenuItemGroup as
|
|
13
|
-
import { GridColumnMenuItemContent as
|
|
14
|
-
import { useLocalization as
|
|
15
|
-
import { getFilterType as
|
|
16
|
-
import { adaptiveColumnMenuFilterTitle as
|
|
17
|
-
import { GridColumnMenuFilterUI as
|
|
18
|
-
import { Button as
|
|
19
|
-
import { filterIcon as
|
|
20
|
-
import { GridContext as
|
|
21
|
-
import { GridColumnMenuAdaptiveContext as xe } from "./adaptiveContext/GridColumnMenuAdaptiveContext.mjs";
|
|
12
|
+
import { GridColumnMenuItemGroup as ce } from "./GridColumnMenuItemGroup.mjs";
|
|
13
|
+
import { GridColumnMenuItemContent as ue } from "./GridColumnMenuItemContent.mjs";
|
|
14
|
+
import { useLocalization as fe } from "@progress/kendo-react-intl";
|
|
15
|
+
import { getFilterType as $, getDefaultOperator as de, IsUnaryFilter as v, operatorMap as I, booleanFilterValues as me, filterLogicList as ge, defaultHideSecondFilter as Ce } from "../filterCommon.mjs";
|
|
16
|
+
import { adaptiveColumnMenuFilterTitle as j, messages as E, filterTitle as q, filterSubmitButton as J, filterClearButton as K } from "../messages/index.mjs";
|
|
17
|
+
import { GridColumnMenuFilterUI as Fe } from "./GridColumnMenuFilterUI.mjs";
|
|
18
|
+
import { Button as Q } from "@progress/kendo-react-buttons";
|
|
19
|
+
import { filterIcon as he } from "@progress/kendo-svg-icons";
|
|
20
|
+
import { GridContext as ve } from "../GridClientWrapper.mjs";
|
|
22
21
|
import { GridAdaptiveFilterMenu as Ee } from "./adaptiveContent/GridAdaptiveFilterMenu.mjs";
|
|
23
|
-
const k = (e) => e || { filters: [], logic: "and" }, x = (e,
|
|
24
|
-
const
|
|
22
|
+
const k = (e) => e || { filters: [], logic: "and" }, x = (e, a) => k(a).filters.filter((f) => R(f) ? f.filters && f.filters.length && !f.filters.find((g) => R(g) || g.field !== e) : !1)[0] || null, Ne = (e, a) => !!x(e, a), Oe = (e) => {
|
|
23
|
+
const a = l.useContext(ve), y = l.useCallback(() => {
|
|
25
24
|
let t;
|
|
26
25
|
if (e.column && e.column.field) {
|
|
27
|
-
const
|
|
26
|
+
const i = $(e.column.filter), r = de(e.filterOperators, i);
|
|
28
27
|
t = x(e.column.field, e.filter), t = t ? {
|
|
29
28
|
...t,
|
|
30
|
-
filters: t.filters.map((
|
|
29
|
+
filters: t.filters.map((n) => ({ ...n }))
|
|
31
30
|
} : {
|
|
32
31
|
logic: "and",
|
|
33
32
|
filters: [
|
|
@@ -42,50 +41,50 @@ const k = (e) => e || { filters: [], logic: "and" }, x = (e, i) => k(i).filters.
|
|
|
42
41
|
value: v(r) ? null : void 0
|
|
43
42
|
}
|
|
44
43
|
]
|
|
45
|
-
}, t.filters.filter((
|
|
44
|
+
}, t.filters.filter((n) => n.field === e.column.field).length === 1 && t.filters.splice(1, 0, { field: e.column.field, operator: r });
|
|
46
45
|
}
|
|
47
46
|
return t;
|
|
48
|
-
}, [e.column]), [
|
|
49
|
-
const t = T(),
|
|
50
|
-
|
|
51
|
-
},
|
|
47
|
+
}, [e.column]), [p, f] = l.useState(e.expanded || !1), [g, M] = l.useState(!1), [s, L] = l.useState(y()), T = () => e.expanded !== void 0, W = () => {
|
|
48
|
+
const t = T(), i = !(t ? e.expanded : p);
|
|
49
|
+
e.onExpandChange && e.onExpandChange(i), M(!g), !t && !a.mobileMode && f(i);
|
|
50
|
+
}, X = (t) => {
|
|
52
51
|
D(0, t);
|
|
53
|
-
},
|
|
52
|
+
}, Y = (t) => {
|
|
54
53
|
D(1, t);
|
|
55
|
-
}, D = (t,
|
|
56
|
-
const r = s.filters.map((
|
|
57
|
-
...
|
|
58
|
-
value:
|
|
59
|
-
operator:
|
|
60
|
-
} :
|
|
61
|
-
|
|
54
|
+
}, D = (t, i) => {
|
|
55
|
+
const r = s.filters.map((n, o) => o === t ? {
|
|
56
|
+
...n,
|
|
57
|
+
value: i.value,
|
|
58
|
+
operator: i.operator
|
|
59
|
+
} : n);
|
|
60
|
+
L({
|
|
62
61
|
...s,
|
|
63
62
|
filters: r
|
|
64
63
|
});
|
|
65
|
-
},
|
|
66
|
-
let
|
|
67
|
-
t.target.tagName === "SPAN" && (
|
|
68
|
-
},
|
|
64
|
+
}, Z = (t) => {
|
|
65
|
+
let i = t.target.value;
|
|
66
|
+
t.target.tagName === "SPAN" && (i = t.target.parentElement.value), L({ ...s, logic: i });
|
|
67
|
+
}, P = (t) => {
|
|
69
68
|
if (t.preventDefault(), !e.onFilterChange)
|
|
70
69
|
return;
|
|
71
|
-
const
|
|
72
|
-
|
|
73
|
-
},
|
|
70
|
+
const i = e.column.field, r = k(e.filter), n = x(i, e.filter), o = r.filters.filter((m) => m !== n);
|
|
71
|
+
o.length ? e.onFilterChange({ ...r, filters: o }, t) : e.onFilterChange(null, t), e.onCloseMenu && e.onCloseMenu();
|
|
72
|
+
}, N = () => ({
|
|
74
73
|
...s,
|
|
75
74
|
filters: s.filters.filter((t) => t.value !== void 0 && t.value !== null && t.value !== "" || t.value === null && t.operator)
|
|
76
|
-
}),
|
|
75
|
+
}), O = (t) => {
|
|
77
76
|
if (t.preventDefault(), !e.onFilterChange)
|
|
78
77
|
return;
|
|
79
|
-
const
|
|
78
|
+
const i = e.column.field, r = k(e.filter), n = x(i, e.filter), o = N();
|
|
80
79
|
let m = null;
|
|
81
|
-
if (
|
|
82
|
-
const F = r.filters.map((h) => h ===
|
|
80
|
+
if (n && o.filters.length > 0) {
|
|
81
|
+
const F = r.filters.map((h) => h === n ? o : h);
|
|
83
82
|
m = {
|
|
84
83
|
...r,
|
|
85
84
|
filters: F
|
|
86
85
|
};
|
|
87
|
-
} else if (
|
|
88
|
-
const F = r.filters.filter((h) => h !==
|
|
86
|
+
} else if (o.filters.length === 0) {
|
|
87
|
+
const F = r.filters.filter((h) => h !== n);
|
|
89
88
|
F.length && (m = {
|
|
90
89
|
...r,
|
|
91
90
|
filters: F
|
|
@@ -93,74 +92,74 @@ const k = (e) => e || { filters: [], logic: "and" }, x = (e, i) => k(i).filters.
|
|
|
93
92
|
} else
|
|
94
93
|
m = {
|
|
95
94
|
...r,
|
|
96
|
-
filters: [...r.filters,
|
|
95
|
+
filters: [...r.filters, o]
|
|
97
96
|
};
|
|
98
97
|
e.onFilterChange(m, t), e.onCloseMenu && e.onCloseMenu();
|
|
99
|
-
}, { column:
|
|
100
|
-
if (!
|
|
98
|
+
}, { column: c, filterUI: ee, hideSecondFilter: V, filterOperators: te } = e, u = fe();
|
|
99
|
+
if (!c || !c.field)
|
|
101
100
|
return /* @__PURE__ */ l.createElement("div", null);
|
|
102
|
-
const C =
|
|
103
|
-
field:
|
|
101
|
+
const C = $(c.filter), le = V !== void 0 ? V : Ce[C], d = s.filters, A = I(te[C], u), B = I(me, u), re = {
|
|
102
|
+
field: c.field,
|
|
104
103
|
value: d[0].value,
|
|
105
104
|
operator: d[0].operator,
|
|
106
|
-
operators:
|
|
105
|
+
operators: A,
|
|
107
106
|
booleanValues: B,
|
|
108
|
-
onChange:
|
|
107
|
+
onChange: X,
|
|
109
108
|
filterType: C
|
|
110
|
-
},
|
|
111
|
-
field:
|
|
109
|
+
}, ie = {
|
|
110
|
+
field: c.field,
|
|
112
111
|
value: d[1].value,
|
|
113
112
|
operator: d[1].operator,
|
|
114
|
-
operators:
|
|
113
|
+
operators: A,
|
|
115
114
|
booleanValues: B,
|
|
116
|
-
onChange:
|
|
115
|
+
onChange: Y,
|
|
117
116
|
filterType: C
|
|
118
|
-
}, U = s.logic,
|
|
119
|
-
value:
|
|
120
|
-
onChange:
|
|
121
|
-
data:
|
|
122
|
-
},
|
|
123
|
-
firstFilterProps:
|
|
124
|
-
secondFilterProps:
|
|
125
|
-
logicData:
|
|
126
|
-
logicValue:
|
|
127
|
-
onLogicChange:
|
|
128
|
-
hideSecondFilter:
|
|
129
|
-
}, _ =
|
|
130
|
-
M(!1)
|
|
131
|
-
},
|
|
117
|
+
}, U = s.logic, w = I(ge, u), G = {
|
|
118
|
+
value: w.find((t) => t.operator === (U === null ? "" : U)),
|
|
119
|
+
onChange: Z,
|
|
120
|
+
data: w
|
|
121
|
+
}, S = ee, b = {
|
|
122
|
+
firstFilterProps: re,
|
|
123
|
+
secondFilterProps: ie,
|
|
124
|
+
logicData: G.data,
|
|
125
|
+
logicValue: G.value,
|
|
126
|
+
onLogicChange: G.onChange,
|
|
127
|
+
hideSecondFilter: le
|
|
128
|
+
}, _ = N().filters.length !== 0 || v(d[0].operator) || v(d[1].operator), z = T() ? e.expanded : p, H = e.alwaysExpand && !a.mobileMode, ne = () => {
|
|
129
|
+
M(!1);
|
|
130
|
+
}, oe = () => {
|
|
132
131
|
M(!1), e.onCloseMenu && e.onCloseMenu();
|
|
133
|
-
},
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
)} ${
|
|
137
|
-
return /* @__PURE__ */ l.createElement(
|
|
132
|
+
}, ae = `${u.toLanguageString(
|
|
133
|
+
j,
|
|
134
|
+
E[j]
|
|
135
|
+
)} ${c.title || c.field}`;
|
|
136
|
+
return /* @__PURE__ */ l.createElement(ce, null, !H && /* @__PURE__ */ l.createElement("div", { className: "k-expander" }, /* @__PURE__ */ l.createElement(
|
|
138
137
|
se,
|
|
139
138
|
{
|
|
140
|
-
title:
|
|
139
|
+
title: u.toLanguageString(q, E[q]),
|
|
141
140
|
iconClass: "k-i-filter",
|
|
142
|
-
svgIcon:
|
|
141
|
+
svgIcon: he,
|
|
143
142
|
expandable: !0,
|
|
144
143
|
expanded: !!z,
|
|
145
|
-
onClick:
|
|
144
|
+
onClick: W
|
|
146
145
|
}
|
|
147
|
-
)),
|
|
146
|
+
)), a.mobileMode && g ? /* @__PURE__ */ l.createElement(
|
|
148
147
|
Ee,
|
|
149
148
|
{
|
|
150
|
-
FilterUI:
|
|
149
|
+
FilterUI: S,
|
|
151
150
|
filterUIProps: b,
|
|
152
|
-
onBackView:
|
|
153
|
-
adaptiveTitle:
|
|
154
|
-
handleClose:
|
|
155
|
-
submit:
|
|
156
|
-
clear:
|
|
151
|
+
onBackView: ne,
|
|
152
|
+
adaptiveTitle: ae,
|
|
153
|
+
handleClose: oe,
|
|
154
|
+
submit: O,
|
|
155
|
+
clear: P,
|
|
157
156
|
isFilterValid: _
|
|
158
157
|
}
|
|
159
|
-
)
|
|
158
|
+
) : /* @__PURE__ */ l.createElement(ue, { show: (H || !!z) && !a.mobileMode }, /* @__PURE__ */ l.createElement("form", { className: "k-filter-menu", onSubmit: O, onReset: P }, /* @__PURE__ */ l.createElement("div", { className: "k-filter-menu-container" }, S ? /* @__PURE__ */ l.createElement(S, { ...b }) : /* @__PURE__ */ l.createElement(Fe, { ...b }), /* @__PURE__ */ l.createElement("div", { className: "k-actions k-actions-stretched" }, /* @__PURE__ */ l.createElement(Q, { themeColor: "primary", disabled: !_ }, u.toLanguageString(J, E[J])), /* @__PURE__ */ l.createElement(Q, { type: "reset" }, u.toLanguageString(K, E[K])))))));
|
|
160
159
|
};
|
|
161
160
|
export {
|
|
162
|
-
|
|
161
|
+
Oe as GridColumnMenuFilter,
|
|
163
162
|
x as filterGroupByField,
|
|
164
|
-
|
|
163
|
+
Ne as isColumnMenuFilterActive,
|
|
165
164
|
k as rootFilterOrDefault
|
|
166
165
|
};
|
|
@@ -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 d=require("react"),i=require("@progress/kendo-react-common"),p=require("../GridClientWrapper.js"),a=require("@progress/kendo-svg-icons");function f(n){const c=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const e in n)if(e!=="default"){const o=Object.getOwnPropertyDescriptor(n,e);Object.defineProperty(c,e,o.get?o:{enumerable:!0,get:()=>n[e]})}}return c.default=n,Object.freeze(c)}const r=f(d),I=n=>{const{title:c,iconClass:e,svgIcon:o,selected:u,expandable:s,expanded:m}=n,t=r.useContext(p.GridContext);let l;return s&&(t!=null&&t.mobileMode?l=(t==null?void 0:t.dir)==="rtl"?a.chevronLeftIcon:a.chevronRightIcon:l=m?a.chevronUpIcon:a.chevronDownIcon),r.createElement("div",{onClick:n.onClick,className:`k-columnmenu-item ${u?"k-selected":""}`},(e||o)&&r.createElement(i.IconWrap,{name:e&&i.toIconName(e),icon:o}),c,r.createElement("span",{className:"k-spacer"}),s&&r.createElement(i.IconWrap,{icon:l}))};exports.GridColumnMenuItem=I;
|
|
@@ -6,15 +6,15 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
"use client";
|
|
9
|
-
import * as
|
|
10
|
-
import { IconWrap as
|
|
9
|
+
import * as o from "react";
|
|
10
|
+
import { IconWrap as a, toIconName as p } from "@progress/kendo-react-common";
|
|
11
11
|
import { GridContext as I } from "../GridClientWrapper.mjs";
|
|
12
|
-
import { chevronLeftIcon as
|
|
13
|
-
const
|
|
14
|
-
const { title:
|
|
15
|
-
let
|
|
16
|
-
return r && (
|
|
12
|
+
import { chevronLeftIcon as d, chevronRightIcon as v, chevronDownIcon as f, chevronUpIcon as h } from "@progress/kendo-svg-icons";
|
|
13
|
+
const C = (t) => {
|
|
14
|
+
const { title: l, iconClass: n, svgIcon: m, selected: i, expandable: r, expanded: s } = t, e = o.useContext(I);
|
|
15
|
+
let c;
|
|
16
|
+
return r && (e != null && e.mobileMode ? c = (e == null ? void 0 : e.dir) === "rtl" ? d : v : c = s ? h : f), /* @__PURE__ */ o.createElement("div", { onClick: t.onClick, className: `k-columnmenu-item ${i ? "k-selected" : ""}` }, (n || m) && /* @__PURE__ */ o.createElement(a, { name: n && p(n), icon: m }), l, /* @__PURE__ */ o.createElement("span", { className: "k-spacer" }), r && /* @__PURE__ */ o.createElement(a, { icon: c }));
|
|
17
17
|
};
|
|
18
18
|
export {
|
|
19
|
-
|
|
19
|
+
C as GridColumnMenuItem
|
|
20
20
|
};
|
|
@@ -6,4 +6,4 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
"use client";
|
|
9
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),
|
|
9
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),f=require("react-dom"),t=require("../../messages/index.js"),S=require("../../GridClientWrapper.js"),i=require("@progress/kendo-react-layout"),s=require("@progress/kendo-react-buttons"),o=require("@progress/kendo-svg-icons"),v=require("@progress/kendo-react-intl"),u=require("@progress/kendo-react-inputs"),b=require("../adaptiveContext/GridColumnMenuAdaptiveContext.js"),E=require("./GridActionSheetFooter.js"),x=n=>{const a=e.useContext(S.GridContext),l=v.useLocalization(),{actionSheetRef:r,secondViewRef:m}=e.useContext(b.GridColumnMenuAdaptiveContext),d=a.dir==="rtl"?o.chevronRightIcon:o.chevronLeftIcon,h=l.toLanguageString(t.adaptiveColumnMenuCheckboxFilterTitle,t.messages[t.adaptiveColumnMenuCheckboxFilterTitle]);e.useEffect(()=>{a!=null&&a.mobileMode&&r.current.element.style.setProperty("--kendo-actionsheet-view-current",2)},[]);const k=()=>{n.onBackView&&n.onBackView(),a!=null&&a.mobileMode&&r.current.element.style.setProperty("--kendo-actionsheet-view-current",1)};return e.createElement(e.Fragment,null,f.createPortal(e.createElement(e.Fragment,null,e.createElement(i.ActionSheetHeader,null,e.createElement("div",{className:"k-actionsheet-titlebar-group"},e.createElement("div",{className:"k-actionsheet-actions"},e.createElement(s.Button,{type:"button",onClick:k,svgIcon:d,fillMode:"flat"})),e.createElement("div",{className:"k-actionsheet-title"},e.createElement("div",{className:"k-text-center"},h)),e.createElement("div",{className:"k-actionsheet-actions"},e.createElement(s.Button,{type:"button",svgIcon:o.xIcon,onClick:n.handleClose,fillMode:"flat"})))),e.createElement(i.ActionSheetContent,null,e.createElement("div",{className:"k-filter-menu"},e.createElement("div",{className:"k-filter-menu-container"},n.searchBox,e.createElement("ul",{className:"k-reset k-multicheck-wrap"},e.createElement("li",{className:"k-item k-check-all-wrap"},e.createElement(u.Checkbox,{size:a.mobileMode?"large":"medium",label:l.toLanguageString(t.filterCheckAll,t.messages[t.filterCheckAll]),onChange:c=>n.handleCheckBoxChange(c,"all"),checked:n.isAllSelected()})),n.currentData.map((c,g)=>e.createElement("li",{className:"k-item",key:`colmenu-checkbox-item-${g}`},e.createElement(u.Checkbox,{size:a.mobileMode?"large":"medium",label:String(c),onChange:C=>n.handleCheckBoxChange(C,c),checked:n.uniqueFilterValues.includes(c)})))),e.createElement("div",{className:"k-filter-selected-items"},n.uniqueFilterValues.length+" "+l.toLanguageString(t.filterSelectedItems,t.messages[t.filterSelectedItems]))))),e.createElement(i.ActionSheetFooter,null,e.createElement(E.GridActionSheetFooterContent,{onApply:n.submit,onReset:n.clear,submitMessage:l.toLanguageString(t.filterSubmitButton,t.messages[t.filterSubmitButton]),resetMessage:l.toLanguageString(t.filterClearButton,t.messages[t.filterClearButton])}))),m.current.current))};exports.GridAdaptiveCheckboxFilter=x;
|
|
@@ -7,67 +7,73 @@
|
|
|
7
7
|
*/
|
|
8
8
|
"use client";
|
|
9
9
|
import e from "react";
|
|
10
|
-
import
|
|
11
|
-
import { adaptiveColumnMenuCheckboxFilterTitle as
|
|
12
|
-
import { GridContext as
|
|
13
|
-
import { ActionSheetHeader as x, ActionSheetContent as
|
|
14
|
-
import { Button as
|
|
15
|
-
import { chevronRightIcon as
|
|
16
|
-
import { useLocalization as
|
|
10
|
+
import S from "react-dom";
|
|
11
|
+
import { adaptiveColumnMenuCheckboxFilterTitle as i, messages as c, filterCheckAll as r, filterSelectedItems as m, filterSubmitButton as s, filterClearButton as u } from "../../messages/index.mjs";
|
|
12
|
+
import { GridContext as b } from "../../GridClientWrapper.mjs";
|
|
13
|
+
import { ActionSheetHeader as x, ActionSheetContent as M, ActionSheetFooter as N } from "@progress/kendo-react-layout";
|
|
14
|
+
import { Button as h } from "@progress/kendo-react-buttons";
|
|
15
|
+
import { chevronRightIcon as A, chevronLeftIcon as w, xIcon as B } from "@progress/kendo-svg-icons";
|
|
16
|
+
import { useLocalization as y } from "@progress/kendo-react-intl";
|
|
17
17
|
import { Checkbox as d } from "@progress/kendo-react-inputs";
|
|
18
|
-
import { GridColumnMenuAdaptiveContext as
|
|
18
|
+
import { GridColumnMenuAdaptiveContext as F } from "../adaptiveContext/GridColumnMenuAdaptiveContext.mjs";
|
|
19
19
|
import { GridActionSheetFooterContent as I } from "./GridActionSheetFooter.mjs";
|
|
20
|
-
const
|
|
21
|
-
const
|
|
22
|
-
|
|
23
|
-
|
|
20
|
+
const H = (t) => {
|
|
21
|
+
const n = e.useContext(b), l = y(), { actionSheetRef: o, secondViewRef: k } = e.useContext(F), f = n.dir === "rtl" ? A : w, g = l.toLanguageString(
|
|
22
|
+
i,
|
|
23
|
+
c[i]
|
|
24
24
|
);
|
|
25
|
-
|
|
25
|
+
e.useEffect(() => {
|
|
26
|
+
n != null && n.mobileMode && o.current.element.style.setProperty("--kendo-actionsheet-view-current", 2);
|
|
27
|
+
}, []);
|
|
28
|
+
const E = () => {
|
|
29
|
+
t.onBackView && t.onBackView(), n != null && n.mobileMode && o.current.element.style.setProperty("--kendo-actionsheet-view-current", 1);
|
|
30
|
+
};
|
|
31
|
+
return /* @__PURE__ */ e.createElement(e.Fragment, null, S.createPortal(
|
|
26
32
|
/* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(x, null, /* @__PURE__ */ e.createElement("div", { className: "k-actionsheet-titlebar-group" }, /* @__PURE__ */ e.createElement("div", { className: "k-actionsheet-actions" }, /* @__PURE__ */ e.createElement(
|
|
27
|
-
|
|
33
|
+
h,
|
|
28
34
|
{
|
|
29
35
|
type: "button",
|
|
30
|
-
onClick:
|
|
31
|
-
svgIcon:
|
|
36
|
+
onClick: E,
|
|
37
|
+
svgIcon: f,
|
|
32
38
|
fillMode: "flat"
|
|
33
39
|
}
|
|
34
|
-
)), /* @__PURE__ */ e.createElement("div", { className: "k-actionsheet-title" }, /* @__PURE__ */ e.createElement("div", { className: "k-text-center" },
|
|
40
|
+
)), /* @__PURE__ */ e.createElement("div", { className: "k-actionsheet-title" }, /* @__PURE__ */ e.createElement("div", { className: "k-text-center" }, g)), /* @__PURE__ */ e.createElement("div", { className: "k-actionsheet-actions" }, /* @__PURE__ */ e.createElement(h, { type: "button", svgIcon: B, onClick: t.handleClose, fillMode: "flat" })))), /* @__PURE__ */ e.createElement(M, null, /* @__PURE__ */ e.createElement("div", { className: "k-filter-menu" }, /* @__PURE__ */ e.createElement("div", { className: "k-filter-menu-container" }, t.searchBox, /* @__PURE__ */ e.createElement("ul", { className: "k-reset k-multicheck-wrap" }, /* @__PURE__ */ e.createElement("li", { className: "k-item k-check-all-wrap" }, /* @__PURE__ */ e.createElement(
|
|
35
41
|
d,
|
|
36
42
|
{
|
|
37
|
-
size:
|
|
38
|
-
label:
|
|
39
|
-
|
|
40
|
-
|
|
43
|
+
size: n.mobileMode ? "large" : "medium",
|
|
44
|
+
label: l.toLanguageString(
|
|
45
|
+
r,
|
|
46
|
+
c[r]
|
|
41
47
|
),
|
|
42
48
|
onChange: (a) => t.handleCheckBoxChange(a, "all"),
|
|
43
49
|
checked: t.isAllSelected()
|
|
44
50
|
}
|
|
45
|
-
)), t.currentData.map((a,
|
|
51
|
+
)), t.currentData.map((a, C) => /* @__PURE__ */ e.createElement("li", { className: "k-item", key: `colmenu-checkbox-item-${C}` }, /* @__PURE__ */ e.createElement(
|
|
46
52
|
d,
|
|
47
53
|
{
|
|
48
|
-
size:
|
|
54
|
+
size: n.mobileMode ? "large" : "medium",
|
|
49
55
|
label: String(a),
|
|
50
|
-
onChange: (
|
|
56
|
+
onChange: (v) => t.handleCheckBoxChange(v, a),
|
|
51
57
|
checked: t.uniqueFilterValues.includes(a)
|
|
52
58
|
}
|
|
53
|
-
)))), /* @__PURE__ */ e.createElement("div", { className: "k-filter-selected-items" }, t.uniqueFilterValues.length + " " +
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
))))), /* @__PURE__ */ e.createElement(
|
|
59
|
+
)))), /* @__PURE__ */ e.createElement("div", { className: "k-filter-selected-items" }, t.uniqueFilterValues.length + " " + l.toLanguageString(
|
|
60
|
+
m,
|
|
61
|
+
c[m]
|
|
62
|
+
))))), /* @__PURE__ */ e.createElement(N, null, /* @__PURE__ */ e.createElement(
|
|
57
63
|
I,
|
|
58
64
|
{
|
|
59
65
|
onApply: t.submit,
|
|
60
66
|
onReset: t.clear,
|
|
61
|
-
submitMessage:
|
|
62
|
-
|
|
63
|
-
|
|
67
|
+
submitMessage: l.toLanguageString(
|
|
68
|
+
s,
|
|
69
|
+
c[s]
|
|
64
70
|
),
|
|
65
|
-
resetMessage:
|
|
71
|
+
resetMessage: l.toLanguageString(u, c[u])
|
|
66
72
|
}
|
|
67
73
|
))),
|
|
68
|
-
|
|
74
|
+
k.current.current
|
|
69
75
|
));
|
|
70
76
|
};
|
|
71
77
|
export {
|
|
72
|
-
|
|
78
|
+
H as GridAdaptiveCheckboxFilter
|
|
73
79
|
};
|
|
@@ -6,4 +6,4 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
"use client";
|
|
9
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),
|
|
9
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),S=require("react-dom"),E=require("../../GridClientWrapper.js"),c=require("@progress/kendo-svg-icons"),t=require("../../messages/index.js"),m=require("@progress/kendo-react-buttons"),b=require("@progress/kendo-react-intl"),i=require("@progress/kendo-react-inputs"),r=require("@progress/kendo-react-layout"),x=require("@progress/kendo-react-common"),M=require("../adaptiveContext/GridColumnMenuAdaptiveContext.js"),A=require("./GridActionSheetFooter.js"),y=n=>{const l=b.useLocalization(),a=e.useContext(E.GridContext),{actionSheetRef:s,secondViewRef:d}=e.useContext(M.GridColumnMenuAdaptiveContext),h=a.dir==="rtl"?c.chevronRightIcon:c.chevronLeftIcon,g=l.toLanguageString(t.adaptiveColumnMenuChooserTitle,t.messages[t.adaptiveColumnMenuChooserTitle]),C=l.toLanguageString(t.adaptiveColumnMenuChooserSubTitle,t.messages[t.adaptiveColumnMenuChooserSubTitle]);e.useEffect(()=>{a.mobileMode&&s.current.element.style.setProperty("--kendo-actionsheet-view-current",2)},[]);const k=()=>{a.mobileMode&&s.current.element.style.setProperty("--kendo-actionsheet-view-current",1),n.onBackView&&n.onBackView()},f=()=>e.createElement(i.InputPrefix,null,e.createElement(x.IconWrap,{name:"search",icon:c.searchIcon}));return e.createElement(e.Fragment,null,S.createPortal(e.createElement(e.Fragment,null,e.createElement(r.ActionSheetHeader,null,e.createElement("div",{className:"k-actionsheet-titlebar-group"},e.createElement("div",{className:"k-actionsheet-actions"},e.createElement(m.Button,{type:"button",onClick:k,svgIcon:h,fillMode:"flat"})),e.createElement("div",{className:"k-actionsheet-title"},e.createElement("div",{className:"k-text-center"},g),e.createElement("div",{className:"k-actionsheet-subtitle k-text-center"},C)),e.createElement("div",{className:"k-actionsheet-actions"},e.createElement(m.Button,{type:"button",svgIcon:c.xIcon,onClick:n.handleClose,fillMode:"flat"})))),e.createElement(r.ActionSheetContent,null,e.createElement("div",{className:"k-filter-menu"},e.createElement("div",{className:"k-filter-menu-container"},e.createElement(i.TextBox,{size:a.mobileMode?"large":"medium",className:"k-searchbox",value:n.filter,onChange:n.onFilter,prefix:f}),e.createElement("ul",{className:"k-reset k-multicheck-wrap"},!n.filter&&e.createElement("li",{className:"k-item k-check-all-wrap"},e.createElement(i.Checkbox,{size:a.mobileMode?"large":"medium",checked:n.allSelected,onChange:n.onSelectAll,label:l.toLanguageString(t.filterSelectAll,t.messages[t.filterSelectAll])})),n.filtered.map((o,I)=>e.createElement("li",{key:o.id,className:"k-item"},e.createElement(i.Checkbox,{size:a.mobileMode?"large":"medium",disabled:n.selectedColumns[o.id||""]&&n.checkedCount===1,checked:n.selectedColumns[o.id||""],onChange:v=>{var u;return n.onCheckChange(!!((u=v.target.element)!=null&&u.checked),o.id)},label:o.title||o.field})))),e.createElement("div",{className:"k-filter-selected-items"},n.checkedCount," ",l.toLanguageString(t.columnMenuColumnChooserSelectedItems,t.messages[t.columnMenuColumnChooserSelectedItems]))))),e.createElement(r.ActionSheetFooter,null,e.createElement(A.GridActionSheetFooterContent,{onApply:n.onApply,onReset:n.onReset,resetMessage:l.toLanguageString(t.filterResetButton,t.messages[t.filterResetButton]),submitMessage:l.toLanguageString(t.filterApplyButton,t.messages[t.filterApplyButton])}))),d.current.current))};exports.GridAdaptiveColumnChooser=y;
|
|
@@ -7,78 +7,84 @@
|
|
|
7
7
|
*/
|
|
8
8
|
"use client";
|
|
9
9
|
import e from "react";
|
|
10
|
-
import
|
|
11
|
-
import { GridContext as
|
|
12
|
-
import { chevronRightIcon as
|
|
13
|
-
import { adaptiveColumnMenuChooserTitle as r, messages as a, adaptiveColumnMenuChooserSubTitle as
|
|
14
|
-
import { Button as
|
|
15
|
-
import { useLocalization as
|
|
16
|
-
import { TextBox as
|
|
17
|
-
import { ActionSheetHeader as p, ActionSheetContent as
|
|
18
|
-
import { IconWrap as
|
|
19
|
-
import { GridColumnMenuAdaptiveContext as
|
|
20
|
-
import { GridActionSheetFooterContent as
|
|
21
|
-
const
|
|
22
|
-
const
|
|
10
|
+
import M from "react-dom";
|
|
11
|
+
import { GridContext as N } from "../../GridClientWrapper.mjs";
|
|
12
|
+
import { chevronRightIcon as A, chevronLeftIcon as y, xIcon as I, searchIcon as w } from "@progress/kendo-svg-icons";
|
|
13
|
+
import { adaptiveColumnMenuChooserTitle as r, messages as a, adaptiveColumnMenuChooserSubTitle as m, filterSelectAll as s, columnMenuColumnChooserSelectedItems as u, filterResetButton as d, filterApplyButton as h } from "../../messages/index.mjs";
|
|
14
|
+
import { Button as f } from "@progress/kendo-react-buttons";
|
|
15
|
+
import { useLocalization as B } from "@progress/kendo-react-intl";
|
|
16
|
+
import { TextBox as L, Checkbox as g, InputPrefix as R } from "@progress/kendo-react-inputs";
|
|
17
|
+
import { ActionSheetHeader as p, ActionSheetContent as F, ActionSheetFooter as P } from "@progress/kendo-react-layout";
|
|
18
|
+
import { IconWrap as T } from "@progress/kendo-react-common";
|
|
19
|
+
import { GridColumnMenuAdaptiveContext as z } from "../adaptiveContext/GridColumnMenuAdaptiveContext.mjs";
|
|
20
|
+
import { GridActionSheetFooterContent as G } from "./GridActionSheetFooter.mjs";
|
|
21
|
+
const Y = (t) => {
|
|
22
|
+
const o = B(), l = e.useContext(N), { actionSheetRef: c, secondViewRef: k } = e.useContext(z), C = l.dir === "rtl" ? A : y, E = o.toLanguageString(
|
|
23
23
|
r,
|
|
24
24
|
a[r]
|
|
25
|
-
),
|
|
26
|
-
|
|
27
|
-
a[
|
|
28
|
-
)
|
|
29
|
-
|
|
25
|
+
), v = o.toLanguageString(
|
|
26
|
+
m,
|
|
27
|
+
a[m]
|
|
28
|
+
);
|
|
29
|
+
e.useEffect(() => {
|
|
30
|
+
l.mobileMode && c.current.element.style.setProperty("--kendo-actionsheet-view-current", 2);
|
|
31
|
+
}, []);
|
|
32
|
+
const S = () => {
|
|
33
|
+
l.mobileMode && c.current.element.style.setProperty("--kendo-actionsheet-view-current", 1), t.onBackView && t.onBackView();
|
|
34
|
+
}, x = () => /* @__PURE__ */ e.createElement(R, null, /* @__PURE__ */ e.createElement(T, { name: "search", icon: w }));
|
|
35
|
+
return /* @__PURE__ */ e.createElement(e.Fragment, null, M.createPortal(
|
|
30
36
|
/* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(p, null, /* @__PURE__ */ e.createElement("div", { className: "k-actionsheet-titlebar-group" }, /* @__PURE__ */ e.createElement("div", { className: "k-actionsheet-actions" }, /* @__PURE__ */ e.createElement(
|
|
31
|
-
|
|
37
|
+
f,
|
|
32
38
|
{
|
|
33
39
|
type: "button",
|
|
34
|
-
onClick:
|
|
35
|
-
svgIcon:
|
|
40
|
+
onClick: S,
|
|
41
|
+
svgIcon: C,
|
|
36
42
|
fillMode: "flat"
|
|
37
43
|
}
|
|
38
|
-
)), /* @__PURE__ */ e.createElement("div", { className: "k-actionsheet-title" }, /* @__PURE__ */ e.createElement("div", { className: "k-text-center" },
|
|
39
|
-
|
|
44
|
+
)), /* @__PURE__ */ e.createElement("div", { className: "k-actionsheet-title" }, /* @__PURE__ */ e.createElement("div", { className: "k-text-center" }, E), /* @__PURE__ */ e.createElement("div", { className: "k-actionsheet-subtitle k-text-center" }, v)), /* @__PURE__ */ e.createElement("div", { className: "k-actionsheet-actions" }, /* @__PURE__ */ e.createElement(f, { type: "button", svgIcon: I, onClick: t.handleClose, fillMode: "flat" })))), /* @__PURE__ */ e.createElement(F, null, /* @__PURE__ */ e.createElement("div", { className: "k-filter-menu" }, /* @__PURE__ */ e.createElement("div", { className: "k-filter-menu-container" }, /* @__PURE__ */ e.createElement(
|
|
45
|
+
L,
|
|
40
46
|
{
|
|
41
|
-
size:
|
|
47
|
+
size: l.mobileMode ? "large" : "medium",
|
|
42
48
|
className: "k-searchbox",
|
|
43
49
|
value: t.filter,
|
|
44
50
|
onChange: t.onFilter,
|
|
45
|
-
prefix:
|
|
51
|
+
prefix: x
|
|
46
52
|
}
|
|
47
53
|
), /* @__PURE__ */ e.createElement("ul", { className: "k-reset k-multicheck-wrap" }, !t.filter && /* @__PURE__ */ e.createElement("li", { className: "k-item k-check-all-wrap" }, /* @__PURE__ */ e.createElement(
|
|
48
|
-
|
|
54
|
+
g,
|
|
49
55
|
{
|
|
50
|
-
size:
|
|
56
|
+
size: l.mobileMode ? "large" : "medium",
|
|
51
57
|
checked: t.allSelected,
|
|
52
58
|
onChange: t.onSelectAll,
|
|
53
|
-
label:
|
|
59
|
+
label: o.toLanguageString(s, a[s])
|
|
54
60
|
}
|
|
55
|
-
)), t.filtered.map((
|
|
56
|
-
|
|
61
|
+
)), t.filtered.map((n, V) => /* @__PURE__ */ e.createElement("li", { key: n.id, className: "k-item" }, /* @__PURE__ */ e.createElement(
|
|
62
|
+
g,
|
|
57
63
|
{
|
|
58
|
-
size:
|
|
59
|
-
disabled: t.selectedColumns[
|
|
60
|
-
checked: t.selectedColumns[
|
|
61
|
-
onChange: (
|
|
64
|
+
size: l.mobileMode ? "large" : "medium",
|
|
65
|
+
disabled: t.selectedColumns[n.id || ""] && t.checkedCount === 1,
|
|
66
|
+
checked: t.selectedColumns[n.id || ""],
|
|
67
|
+
onChange: (b) => {
|
|
62
68
|
var i;
|
|
63
|
-
return t.onCheckChange(!!((i =
|
|
69
|
+
return t.onCheckChange(!!((i = b.target.element) != null && i.checked), n.id);
|
|
64
70
|
},
|
|
65
|
-
label:
|
|
71
|
+
label: n.title || n.field
|
|
66
72
|
}
|
|
67
|
-
)))), /* @__PURE__ */ e.createElement("div", { className: "k-filter-selected-items" }, t.checkedCount, " ",
|
|
68
|
-
|
|
69
|
-
a[
|
|
70
|
-
))))), /* @__PURE__ */ e.createElement(
|
|
71
|
-
|
|
73
|
+
)))), /* @__PURE__ */ e.createElement("div", { className: "k-filter-selected-items" }, t.checkedCount, " ", o.toLanguageString(
|
|
74
|
+
u,
|
|
75
|
+
a[u]
|
|
76
|
+
))))), /* @__PURE__ */ e.createElement(P, null, /* @__PURE__ */ e.createElement(
|
|
77
|
+
G,
|
|
72
78
|
{
|
|
73
79
|
onApply: t.onApply,
|
|
74
80
|
onReset: t.onReset,
|
|
75
|
-
resetMessage:
|
|
76
|
-
submitMessage:
|
|
81
|
+
resetMessage: o.toLanguageString(d, a[d]),
|
|
82
|
+
submitMessage: o.toLanguageString(h, a[h])
|
|
77
83
|
}
|
|
78
84
|
))),
|
|
79
|
-
|
|
85
|
+
k.current.current
|
|
80
86
|
));
|
|
81
87
|
};
|
|
82
88
|
export {
|
|
83
|
-
|
|
89
|
+
Y as GridAdaptiveColumnChooser
|
|
84
90
|
};
|
|
@@ -6,4 +6,4 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
"use client";
|
|
9
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),
|
|
9
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),f=require("react-dom"),o=require("@progress/kendo-react-layout"),a=require("@progress/kendo-react-buttons"),g=require("@progress/kendo-react-intl"),h=require("../adaptiveContext/GridColumnMenuAdaptiveContext.js"),r=require("@progress/kendo-svg-icons"),v=require("../GridColumnMenuFilterUI.js"),n=require("../../messages/index.js"),C=require("../../GridClientWrapper.js"),E=require("./GridActionSheetFooter.js"),k=t=>{const c=g.useLocalization(),i=e.useContext(C.GridContext),{actionSheetRef:l,secondViewRef:s}=e.useContext(h.GridColumnMenuAdaptiveContext),u=i.dir==="rtl"?r.chevronRightIcon:r.chevronLeftIcon;e.useEffect(()=>{i.mobileMode&&l.current.element.style.setProperty("--kendo-actionsheet-view-current",2)},[]);const m=()=>{i.mobileMode&&l.current.element.style.setProperty("--kendo-actionsheet-view-current",1),t.onBackView&&t.onBackView()};return e.createElement(e.Fragment,null,f.createPortal(e.createElement(e.Fragment,null,t.FilterUI?e.createElement(t.FilterUI,{...t.filterUIProps}):e.createElement(e.Fragment,null,e.createElement(o.ActionSheetHeader,null,e.createElement("div",{className:"k-actionsheet-titlebar-group"},e.createElement("div",{className:"k-actionsheet-actions"},e.createElement(a.Button,{type:"button",onClick:m,svgIcon:u,fillMode:"flat"})),e.createElement("div",{className:"k-actionsheet-title"},e.createElement("div",{className:"k-text-center"},t.adaptiveTitle)),e.createElement("div",{className:"k-actionsheet-actions"},e.createElement(a.Button,{type:"button",svgIcon:r.xIcon,onClick:t.handleClose,fillMode:"flat"})))),e.createElement(o.ActionSheetContent,null,e.createElement("div",{className:"k-filter-menu"},e.createElement("div",{className:"k-filter-menu-container"},e.createElement(v.GridColumnMenuFilterUI,{...t.filterUIProps})))),e.createElement(o.ActionSheetFooter,null,e.createElement(E.GridActionSheetFooterContent,{onApply:t.submit,onReset:t.clear,resetIcon:r.filterClearIcon,submitIcon:r.filterIcon,submitMessage:c.toLanguageString(n.filterSubmitButton,n.messages[n.filterSubmitButton]),resetMessage:c.toLanguageString(n.filterClearButton,n.messages[n.filterClearButton]),submitDisabled:!t.isFilterValid})))),s.current.current))};exports.GridAdaptiveFilterMenu=k;
|