@progress/kendo-react-grid 15.1.0-develop.4 → 15.1.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/dist/cdn/js/kendo-react-grid.js +1 -1
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +17 -17
- package/toolbar-tools/GridToolbarColumnsChooser.js +1 -1
- package/toolbar-tools/GridToolbarColumnsChooser.mjs +33 -33
- package/toolbar-tools/GridToolbarFilter.js +1 -1
- package/toolbar-tools/GridToolbarFilter.mjs +207 -194
- package/toolbar-tools/GridToolbarSort.js +1 -1
- package/toolbar-tools/GridToolbarSort.mjs +84 -101
- package/toolbar-tools/adaptiveContent/GridAdaptiveToolbarFilter.js +1 -1
- package/toolbar-tools/adaptiveContent/GridAdaptiveToolbarFilter.mjs +50 -46
- package/toolbar-tools/adaptiveContent/GridAdaptiveToolbarSort.d.ts +0 -1
- package/toolbar-tools/adaptiveContent/GridAdaptiveToolbarSort.js +1 -1
- package/toolbar-tools/adaptiveContent/GridAdaptiveToolbarSort.mjs +10 -19
|
@@ -6,141 +6,124 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
import * as e from "react";
|
|
9
|
-
import
|
|
10
|
-
import { GridColumnMenuItemGroup as
|
|
11
|
-
import { GridColumnMenuItem as
|
|
12
|
-
import { GridContext as
|
|
13
|
-
import { Button as
|
|
14
|
-
import { sortAscSmallIcon as
|
|
15
|
-
import { useLocalization as
|
|
16
|
-
import { sortClearButton as
|
|
17
|
-
import { useDocument as
|
|
18
|
-
import { BadgeContainer as
|
|
19
|
-
import { Popup as
|
|
20
|
-
import { GridToolbarAdaptiveProvider as
|
|
21
|
-
import { GridAdaptiveToolbarSort as
|
|
22
|
-
const
|
|
23
|
-
var
|
|
24
|
-
const
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
const S = e.useMemo(
|
|
29
|
-
() => (s == null ? void 0 : s.filter((t) => {
|
|
30
|
-
var o;
|
|
31
|
-
return (o = t.title || t.field) == null ? void 0 : o.toLowerCase();
|
|
9
|
+
import z from "react-dom";
|
|
10
|
+
import { GridColumnMenuItemGroup as K } from "../columnMenu/GridColumnMenuItemGroup.mjs";
|
|
11
|
+
import { GridColumnMenuItem as P } from "../columnMenu/GridColumnMenuItem.mjs";
|
|
12
|
+
import { GridContext as F } from "../utils/GridContext.mjs";
|
|
13
|
+
import { Button as w } from "@progress/kendo-react-buttons";
|
|
14
|
+
import { sortAscSmallIcon as O, sortDescSmallIcon as V, xIcon as j, arrowsSwapIcon as q } from "@progress/kendo-svg-icons";
|
|
15
|
+
import { useLocalization as H } from "@progress/kendo-react-intl";
|
|
16
|
+
import { sortClearButton as S, messages as g, toolbarSort as i } from "../messages/index.mjs";
|
|
17
|
+
import { useDocument as J, SvgIcon as Q, classNames as U } from "@progress/kendo-react-common";
|
|
18
|
+
import { BadgeContainer as W, Badge as X } from "@progress/kendo-react-indicators";
|
|
19
|
+
import { Popup as Y } from "@progress/kendo-react-popup";
|
|
20
|
+
import { GridToolbarAdaptiveProvider as Z } from "./adaptiveContext/GridToolbarAdaptiveContext.mjs";
|
|
21
|
+
import { GridAdaptiveToolbarSort as _ } from "./adaptiveContent/GridAdaptiveToolbarSort.mjs";
|
|
22
|
+
const $ = (l) => {
|
|
23
|
+
var M, v;
|
|
24
|
+
const { onCloseMenu: m } = l, r = e.useContext(F), c = r.columnsState, I = r.sortable, n = r.sort, D = !!(n != null && n.length), [u, s] = e.useState(!1), a = e.useRef(null), y = e.useRef(null), C = e.useRef(null), d = H(), x = J(a), h = e.useMemo(
|
|
25
|
+
() => (c == null ? void 0 : c.filter((o) => {
|
|
26
|
+
var t;
|
|
27
|
+
return (t = o.title || o.field) == null ? void 0 : t.toLowerCase();
|
|
32
28
|
})) || [],
|
|
33
|
-
[
|
|
34
|
-
),
|
|
35
|
-
(
|
|
36
|
-
|
|
29
|
+
[c]
|
|
30
|
+
), k = e.useCallback(
|
|
31
|
+
(o, t) => {
|
|
32
|
+
r.headerCellClick(o, t);
|
|
37
33
|
},
|
|
38
|
-
[
|
|
39
|
-
),
|
|
40
|
-
(
|
|
41
|
-
n.sortChange([],
|
|
34
|
+
[r]
|
|
35
|
+
), b = e.useCallback(
|
|
36
|
+
(o) => {
|
|
37
|
+
n != null && n.length && (r.sortChange([], o), s(!1), m && m());
|
|
42
38
|
},
|
|
43
|
-
[n]
|
|
44
|
-
),
|
|
45
|
-
(
|
|
46
|
-
const
|
|
47
|
-
return /* @__PURE__ */ e.createElement(e.Fragment, null,
|
|
39
|
+
[r, n, m]
|
|
40
|
+
), p = e.useCallback(
|
|
41
|
+
(o) => {
|
|
42
|
+
const t = n ? n.findIndex((T) => T.field === o.field) : -1;
|
|
43
|
+
return /* @__PURE__ */ e.createElement(e.Fragment, null, o.title || o.field, /* @__PURE__ */ e.createElement("span", { className: "k-columnmenu-indicators" }, t >= 0 && [
|
|
48
44
|
/* @__PURE__ */ e.createElement(
|
|
49
|
-
|
|
45
|
+
Q,
|
|
50
46
|
{
|
|
51
47
|
key: 1,
|
|
52
|
-
icon:
|
|
48
|
+
icon: n[t].dir === "asc" ? O : V
|
|
53
49
|
}
|
|
54
50
|
),
|
|
55
|
-
|
|
51
|
+
n.length > 1 && /* @__PURE__ */ e.createElement("span", { key: 2, className: "k-sort-index" }, t + 1)
|
|
56
52
|
]));
|
|
57
53
|
},
|
|
58
|
-
[
|
|
59
|
-
),
|
|
60
|
-
|
|
61
|
-
},
|
|
62
|
-
var t;
|
|
63
|
-
r.onCloseMenu && r.onCloseMenu(), m(!1), a.current && ((t = a.current.element) == null || t.focus());
|
|
64
|
-
}, L = (t) => {
|
|
65
|
-
const o = ne(document);
|
|
66
|
-
clearTimeout(f.current), f.current = window.setTimeout(() => {
|
|
67
|
-
!n.mobileMode && o && t.relatedTarget !== a.current && d.current && !d.current.contains(o) && D();
|
|
68
|
-
});
|
|
69
|
-
}, z = () => {
|
|
70
|
-
clearTimeout(f.current);
|
|
71
|
-
}, { onFocus: K, onBlur: P } = te({
|
|
72
|
-
onFocus: (t) => z(),
|
|
73
|
-
onBlur: (t) => L(t)
|
|
74
|
-
}), O = (t) => {
|
|
75
|
-
var o;
|
|
76
|
-
(o = E.current) == null || o.triggerMouseEvent(t);
|
|
77
|
-
}, V = (t) => {
|
|
54
|
+
[n]
|
|
55
|
+
), G = (o) => {
|
|
56
|
+
o.preventDefault(), s(!u);
|
|
57
|
+
}, f = e.useMemo(() => l.show !== void 0 ? l.show : u, [l.show, u]), B = () => {
|
|
78
58
|
var o;
|
|
79
|
-
(o =
|
|
80
|
-
},
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
59
|
+
l.onCloseMenu && l.onCloseMenu(), s(!1), a.current && ((o = a.current.element) == null || o.focus());
|
|
60
|
+
}, N = (o) => {
|
|
61
|
+
var t;
|
|
62
|
+
(t = C.current) == null || t.triggerMouseEvent(o);
|
|
63
|
+
}, R = (o) => {
|
|
64
|
+
var t;
|
|
65
|
+
(t = C.current) == null || t.triggerKeyboardEvent(o);
|
|
66
|
+
}, A = (o) => {
|
|
67
|
+
!o.isAnchorClicked && s(!1);
|
|
68
|
+
}, E = /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(K, null, h.map((o) => /* @__PURE__ */ e.createElement(
|
|
69
|
+
P,
|
|
84
70
|
{
|
|
85
|
-
key:
|
|
86
|
-
title:
|
|
87
|
-
onClick: (
|
|
71
|
+
key: o.id,
|
|
72
|
+
title: p(o),
|
|
73
|
+
onClick: (t) => k(t, o)
|
|
88
74
|
}
|
|
89
|
-
))), /* @__PURE__ */ e.createElement("div", { className: "k-actions k-actions-stretched k-actions-horizontal k-column-menu-footer" }, /* @__PURE__ */ e.createElement(
|
|
90
|
-
|
|
75
|
+
))), /* @__PURE__ */ e.createElement("div", { className: "k-actions k-actions-stretched k-actions-horizontal k-column-menu-footer" }, /* @__PURE__ */ e.createElement(w, { svgIcon: j, onClick: b }, d.toLanguageString(S, g[S])))), L = /* @__PURE__ */ e.createElement(
|
|
76
|
+
w,
|
|
91
77
|
{
|
|
92
78
|
ref: a,
|
|
93
79
|
togglable: !0,
|
|
94
|
-
selected:
|
|
95
|
-
svgIcon:
|
|
96
|
-
icon:
|
|
97
|
-
size:
|
|
98
|
-
className:
|
|
99
|
-
"k-icon-button":
|
|
80
|
+
selected: f,
|
|
81
|
+
svgIcon: l.svgIcon ? l.svgIcon : l.icon ? void 0 : q,
|
|
82
|
+
icon: l.icon,
|
|
83
|
+
size: r.mobileMode ? "large" : "medium",
|
|
84
|
+
className: U("k-toolbar-button", {
|
|
85
|
+
"k-icon-button": r.mobileMode
|
|
100
86
|
}),
|
|
101
|
-
title:
|
|
102
|
-
onClick:
|
|
87
|
+
title: d.toLanguageString(i, g[i]),
|
|
88
|
+
onClick: G
|
|
103
89
|
},
|
|
104
|
-
!
|
|
90
|
+
!r.mobileMode && d.toLanguageString(i, g[i])
|
|
105
91
|
);
|
|
106
|
-
return
|
|
92
|
+
return I && /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(W, null, L, D && /* @__PURE__ */ e.createElement(X, { themeColor: "primary" })), r.mobileMode ? /* @__PURE__ */ e.createElement(Z, null, z.createPortal(
|
|
107
93
|
/* @__PURE__ */ e.createElement(
|
|
108
|
-
|
|
94
|
+
_,
|
|
109
95
|
{
|
|
110
|
-
filtered:
|
|
111
|
-
computedShow:
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
handleSorting: v
|
|
96
|
+
filtered: h,
|
|
97
|
+
computedShow: f,
|
|
98
|
+
renderTitle: p,
|
|
99
|
+
onClose: B,
|
|
100
|
+
onClear: b,
|
|
101
|
+
handleSorting: k
|
|
117
102
|
},
|
|
118
|
-
|
|
103
|
+
E
|
|
119
104
|
),
|
|
120
|
-
(
|
|
105
|
+
(M = x()) == null ? void 0 : M.body
|
|
121
106
|
)) : /* @__PURE__ */ e.createElement(
|
|
122
|
-
|
|
107
|
+
Y,
|
|
123
108
|
{
|
|
124
|
-
anchor: (
|
|
125
|
-
show:
|
|
109
|
+
anchor: (v = a.current) == null ? void 0 : v.element,
|
|
110
|
+
show: f,
|
|
126
111
|
popupClass: "k-grid-columnmenu-popup",
|
|
127
|
-
onMouseDownOutside:
|
|
112
|
+
onMouseDownOutside: A
|
|
128
113
|
},
|
|
129
114
|
/* @__PURE__ */ e.createElement(
|
|
130
115
|
"div",
|
|
131
116
|
{
|
|
132
|
-
ref:
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
onMouseDown: O,
|
|
136
|
-
onKeyDown: V,
|
|
117
|
+
ref: y,
|
|
118
|
+
onMouseDown: N,
|
|
119
|
+
onKeyDown: R,
|
|
137
120
|
className: "k-column-menu k-column-menu-md"
|
|
138
121
|
},
|
|
139
|
-
|
|
122
|
+
E
|
|
140
123
|
)
|
|
141
124
|
));
|
|
142
125
|
};
|
|
143
|
-
|
|
126
|
+
$.displayName = "KendoReactGridToolbarSort";
|
|
144
127
|
export {
|
|
145
|
-
|
|
128
|
+
$ as GridToolbarSort
|
|
146
129
|
};
|
|
@@ -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"),o=require("@progress/kendo-react-layout"),x=require("@progress/kendo-react-common"),N=require("../../utils/GridContext.js"),s=require("@progress/kendo-react-buttons"),l=require("@progress/kendo-svg-icons"),M=require("../adaptiveContext/GridToolbarAdaptiveContext.js"),y=require("@progress/kendo-react-intl"),n=require("../../messages/index.js"),G=require("../../columnMenu/GridColumnMenuItemGroup.js"),w=require("../../columnMenu/GridColumnMenuFilterUI.js"),B=require("../../columnMenu/GridColumnMenuItem.js"),F=require("../../columnMenu/adaptiveContent/GridActionSheetFooter.js"),q=t=>{const i=e.useContext(N.GridContext),{actionSheetRef:m,firstViewRef:g,secondViewRef:S}=e.useContext(M.GridToolbarAdaptiveContext),r=x.useAdaptiveModeContext(),c=y.useLocalization(),[h,I]=e.useState(""),b=i.dir==="rtl"?l.chevronRightIcon:l.chevronLeftIcon,f=c.toLanguageString(n.adaptiveColumnMenuFilterTitle,n.messages[n.adaptiveColumnMenuFilterTitle]),A={animation:!0,navigatable:!1,navigatableElements:[],expand:t.computedShow,animationStyles:r&&i.adaptiveColumnMenuRef<=r.small?{top:0,width:"100%",height:"100%"}:void 0,className:"k-adaptive-actionsheet",position:r&&i.adaptiveColumnMenuRef<=r.small?"fullscreen":void 0},u=()=>{t.onBackView&&t.onBackView(),i!=null&&i.mobileMode&&m.current.element.style.setProperty("--kendo-actionsheet-view-current",1)},v=a=>{t.submit&&t.submit(a),u()},k=a=>{t.clear(a),u()};return e.createElement(o.ActionSheet,{...A,ref:m,style:{"--kendo-actionsheet-view-current":1},onClose:t.onClose},e.createElement(o.ActionSheetView,{className:"k-actionsheet-view-animated",ref:g,style:{transitionDuration:"500ms",transitionProperty:"transform"}},e.createElement(o.ActionSheetHeader,null,e.createElement("div",{className:"k-actionsheet-titlebar-group"},e.createElement("div",{className:"k-actionsheet-title"},e.createElement("div",{className:"k-text-center"},f)),e.createElement("div",{className:"k-actionsheet-actions"},e.createElement(s.Button,{svgIcon:l.xIcon,onClick:t.onClose,fillMode:"flat"})))),e.createElement(o.ActionSheetContent,null,e.createElement("div",{className:"k-column-menu k-column-menu-lg"},t.filtered.map(a=>{var C,E;return e.createElement(G.GridColumnMenuItemGroup,{key:a.id},e.createElement("div",{className:"k-expander"},e.createElement(B.GridColumnMenuItem,{title:t.renderTitle(a),expandable:!0,expanded:!!((E=(C=t.expandState)==null?void 0:C.find(d=>d.column.field===a.field))!=null&&E.expanded),onClick:d=>(m.current.element.style.setProperty("--kendo-actionsheet-view-current",2),I(a.field),t.onFilterExpand(d,a))})))}))),e.createElement(o.ActionSheetFooter,null,e.createElement("div",{className:"k-actions k-actions-stretched k-actions-horizontal k-column-menu-footer"},e.createElement(s.Button,{svgIcon:l.filterClearIcon,onClick:t.handleClearAllFilters,size:"large"},c.toLanguageString(n.filterClearAllButton,n.messages[n.filterClearAllButton]))))),e.createElement(o.ActionSheetView,{className:"k-actionsheet-view-animated",ref:S,style:{transitionDuration:"500ms",transitionProperty:"transform"}},e.createElement(o.ActionSheetHeader,null,e.createElement("div",{className:"k-actionsheet-titlebar-group"},e.createElement("div",{className:"k-actionsheet-actions"},e.createElement(s.Button,{type:"button",onClick:u,svgIcon:b,fillMode:"flat"})),e.createElement("div",{className:"k-actionsheet-title"},e.createElement("div",{className:"k-text-center"},f+(h?` ${h}`:""))),e.createElement("div",{className:"k-actionsheet-actions"},e.createElement(s.Button,{type:"button",svgIcon:l.xIcon,onClick:t.onClose,fillMode:"flat"})))),e.createElement(o.ActionSheetContent,null,e.createElement("form",{className:"k-filter-menu",onSubmit:v,onReset:k},e.createElement("div",{className:"k-filter-menu-container"},t.FilterUI?e.createElement(t.FilterUI,{...t.filterUIProps}):e.createElement(w.GridColumnMenuFilterUI,{...t.filterUIProps})))),e.createElement(o.ActionSheetFooter,null,e.createElement(F.GridActionSheetFooterContent,{onApply:v,onReset:k,submitMessage:c.toLanguageString(n.filterSubmitButton,n.messages[n.filterSubmitButton]),resetMessage:c.toLanguageString(n.filterClearButton,n.messages[n.filterClearButton])}))))};exports.GridAdaptiveToolbarFilter=q;
|
|
@@ -7,92 +7,96 @@
|
|
|
7
7
|
*/
|
|
8
8
|
"use client";
|
|
9
9
|
import e from "react";
|
|
10
|
-
import { ActionSheet as
|
|
11
|
-
import { useAdaptiveModeContext as
|
|
12
|
-
import { GridContext as
|
|
10
|
+
import { ActionSheet as R, ActionSheetView as k, ActionSheetHeader as C, ActionSheetContent as g, ActionSheetFooter as S } from "@progress/kendo-react-layout";
|
|
11
|
+
import { useAdaptiveModeContext as G } from "@progress/kendo-react-common";
|
|
12
|
+
import { GridContext as B } from "../../utils/GridContext.mjs";
|
|
13
13
|
import { Button as l } from "@progress/kendo-react-buttons";
|
|
14
|
-
import { chevronRightIcon as
|
|
15
|
-
import { GridToolbarAdaptiveContext as
|
|
16
|
-
import { useLocalization as
|
|
17
|
-
import { adaptiveColumnMenuFilterTitle as
|
|
18
|
-
import { GridColumnMenuItemGroup as
|
|
19
|
-
import { GridColumnMenuFilterUI as
|
|
20
|
-
import { GridColumnMenuItem as
|
|
21
|
-
import { GridActionSheetFooterContent as
|
|
22
|
-
const
|
|
23
|
-
const
|
|
24
|
-
|
|
25
|
-
r[
|
|
26
|
-
),
|
|
14
|
+
import { chevronRightIcon as P, chevronLeftIcon as L, xIcon as N, filterClearIcon as V } from "@progress/kendo-svg-icons";
|
|
15
|
+
import { GridToolbarAdaptiveContext as T } from "../adaptiveContext/GridToolbarAdaptiveContext.mjs";
|
|
16
|
+
import { useLocalization as U } from "@progress/kendo-react-intl";
|
|
17
|
+
import { adaptiveColumnMenuFilterTitle as b, messages as r, filterClearAllButton as x, filterClearButton as I, filterSubmitButton as p } from "../../messages/index.mjs";
|
|
18
|
+
import { GridColumnMenuItemGroup as z } from "../../columnMenu/GridColumnMenuItemGroup.mjs";
|
|
19
|
+
import { GridColumnMenuFilterUI as D } from "../../columnMenu/GridColumnMenuFilterUI.mjs";
|
|
20
|
+
import { GridColumnMenuItem as _ } from "../../columnMenu/GridColumnMenuItem.mjs";
|
|
21
|
+
import { GridActionSheetFooterContent as H } from "../../columnMenu/adaptiveContent/GridActionSheetFooter.mjs";
|
|
22
|
+
const ae = (t) => {
|
|
23
|
+
const a = e.useContext(B), { actionSheetRef: c, firstViewRef: w, secondViewRef: y } = e.useContext(T), o = G(), i = U(), [u, A] = e.useState(""), M = a.dir === "rtl" ? P : L, d = i.toLanguageString(
|
|
24
|
+
b,
|
|
25
|
+
r[b]
|
|
26
|
+
), F = {
|
|
27
27
|
animation: !0,
|
|
28
28
|
navigatable: !1,
|
|
29
29
|
navigatableElements: [],
|
|
30
30
|
expand: t.computedShow,
|
|
31
|
-
animationStyles: o &&
|
|
31
|
+
animationStyles: o && a.adaptiveColumnMenuRef <= o.small ? { top: 0, width: "100%", height: "100%" } : void 0,
|
|
32
32
|
className: "k-adaptive-actionsheet",
|
|
33
|
-
position: o &&
|
|
34
|
-
},
|
|
35
|
-
t.onBackView && t.onBackView(),
|
|
33
|
+
position: o && a.adaptiveColumnMenuRef <= o.small ? "fullscreen" : void 0
|
|
34
|
+
}, m = () => {
|
|
35
|
+
t.onBackView && t.onBackView(), a != null && a.mobileMode && c.current.element.style.setProperty("--kendo-actionsheet-view-current", 1);
|
|
36
|
+
}, f = (n) => {
|
|
37
|
+
t.submit && t.submit(n), m();
|
|
38
|
+
}, h = (n) => {
|
|
39
|
+
t.clear(n), m();
|
|
36
40
|
};
|
|
37
41
|
return /* @__PURE__ */ e.createElement(
|
|
38
|
-
|
|
42
|
+
R,
|
|
39
43
|
{
|
|
40
|
-
...
|
|
44
|
+
...F,
|
|
41
45
|
ref: c,
|
|
42
46
|
style: { "--kendo-actionsheet-view-current": 1 },
|
|
43
47
|
onClose: t.onClose
|
|
44
48
|
},
|
|
45
49
|
/* @__PURE__ */ e.createElement(
|
|
46
|
-
|
|
50
|
+
k,
|
|
47
51
|
{
|
|
48
52
|
className: "k-actionsheet-view-animated",
|
|
49
|
-
ref:
|
|
53
|
+
ref: w,
|
|
50
54
|
style: {
|
|
51
55
|
transitionDuration: "500ms",
|
|
52
56
|
transitionProperty: "transform"
|
|
53
57
|
}
|
|
54
58
|
},
|
|
55
|
-
/* @__PURE__ */ e.createElement(
|
|
56
|
-
/* @__PURE__ */ e.createElement(
|
|
57
|
-
var
|
|
58
|
-
return /* @__PURE__ */ e.createElement(
|
|
59
|
-
|
|
59
|
+
/* @__PURE__ */ e.createElement(C, null, /* @__PURE__ */ e.createElement("div", { className: "k-actionsheet-titlebar-group" }, /* @__PURE__ */ e.createElement("div", { className: "k-actionsheet-title" }, /* @__PURE__ */ e.createElement("div", { className: "k-text-center" }, d)), /* @__PURE__ */ e.createElement("div", { className: "k-actionsheet-actions" }, /* @__PURE__ */ e.createElement(l, { svgIcon: N, onClick: t.onClose, fillMode: "flat" })))),
|
|
60
|
+
/* @__PURE__ */ e.createElement(g, null, /* @__PURE__ */ e.createElement("div", { className: "k-column-menu k-column-menu-lg" }, t.filtered.map((n) => {
|
|
61
|
+
var v, E;
|
|
62
|
+
return /* @__PURE__ */ e.createElement(z, { key: n.id }, /* @__PURE__ */ e.createElement("div", { className: "k-expander" }, /* @__PURE__ */ e.createElement(
|
|
63
|
+
_,
|
|
60
64
|
{
|
|
61
|
-
title: t.renderTitle(
|
|
65
|
+
title: t.renderTitle(n),
|
|
62
66
|
expandable: !0,
|
|
63
|
-
expanded: !!((
|
|
64
|
-
(
|
|
65
|
-
)) != null &&
|
|
66
|
-
onClick: (
|
|
67
|
+
expanded: !!((E = (v = t.expandState) == null ? void 0 : v.find(
|
|
68
|
+
(s) => s.column.field === n.field
|
|
69
|
+
)) != null && E.expanded),
|
|
70
|
+
onClick: (s) => (c.current.element.style.setProperty("--kendo-actionsheet-view-current", 2), A(n.field), t.onFilterExpand(s, n))
|
|
67
71
|
}
|
|
68
72
|
)));
|
|
69
73
|
}))),
|
|
70
|
-
/* @__PURE__ */ e.createElement(
|
|
74
|
+
/* @__PURE__ */ e.createElement(S, null, /* @__PURE__ */ e.createElement("div", { className: "k-actions k-actions-stretched k-actions-horizontal k-column-menu-footer" }, /* @__PURE__ */ e.createElement(l, { svgIcon: V, onClick: t.handleClearAllFilters, size: "large" }, i.toLanguageString(x, r[x]))))
|
|
71
75
|
),
|
|
72
76
|
/* @__PURE__ */ e.createElement(
|
|
73
|
-
|
|
77
|
+
k,
|
|
74
78
|
{
|
|
75
79
|
className: "k-actionsheet-view-animated",
|
|
76
|
-
ref:
|
|
80
|
+
ref: y,
|
|
77
81
|
style: {
|
|
78
82
|
transitionDuration: "500ms",
|
|
79
83
|
transitionProperty: "transform"
|
|
80
84
|
}
|
|
81
85
|
},
|
|
82
|
-
/* @__PURE__ */ e.createElement(
|
|
83
|
-
/* @__PURE__ */ e.createElement(
|
|
84
|
-
/* @__PURE__ */ e.createElement(
|
|
85
|
-
|
|
86
|
+
/* @__PURE__ */ e.createElement(C, null, /* @__PURE__ */ e.createElement("div", { className: "k-actionsheet-titlebar-group" }, /* @__PURE__ */ e.createElement("div", { className: "k-actionsheet-actions" }, /* @__PURE__ */ e.createElement(l, { type: "button", onClick: m, svgIcon: M, fillMode: "flat" })), /* @__PURE__ */ e.createElement("div", { className: "k-actionsheet-title" }, /* @__PURE__ */ e.createElement("div", { className: "k-text-center" }, d + (u ? ` ${u}` : ""))), /* @__PURE__ */ e.createElement("div", { className: "k-actionsheet-actions" }, /* @__PURE__ */ e.createElement(l, { type: "button", svgIcon: N, onClick: t.onClose, fillMode: "flat" })))),
|
|
87
|
+
/* @__PURE__ */ e.createElement(g, null, /* @__PURE__ */ e.createElement("form", { className: "k-filter-menu", onSubmit: f, onReset: h }, /* @__PURE__ */ e.createElement("div", { className: "k-filter-menu-container" }, t.FilterUI ? /* @__PURE__ */ e.createElement(t.FilterUI, { ...t.filterUIProps }) : /* @__PURE__ */ e.createElement(D, { ...t.filterUIProps })))),
|
|
88
|
+
/* @__PURE__ */ e.createElement(S, null, /* @__PURE__ */ e.createElement(
|
|
89
|
+
H,
|
|
86
90
|
{
|
|
87
|
-
onApply:
|
|
88
|
-
onReset:
|
|
89
|
-
submitMessage: i.toLanguageString(
|
|
90
|
-
resetMessage: i.toLanguageString(
|
|
91
|
+
onApply: f,
|
|
92
|
+
onReset: h,
|
|
93
|
+
submitMessage: i.toLanguageString(p, r[p]),
|
|
94
|
+
resetMessage: i.toLanguageString(I, r[I])
|
|
91
95
|
}
|
|
92
96
|
))
|
|
93
97
|
)
|
|
94
98
|
);
|
|
95
99
|
};
|
|
96
100
|
export {
|
|
97
|
-
|
|
101
|
+
ae as GridAdaptiveToolbarFilter
|
|
98
102
|
};
|
|
@@ -14,7 +14,6 @@ type GridAdaptiveToolbarSortProps = {
|
|
|
14
14
|
filtered: GridColumnState[];
|
|
15
15
|
computedShow?: boolean;
|
|
16
16
|
children?: React.ReactNode;
|
|
17
|
-
isDisabledButton?: boolean;
|
|
18
17
|
renderTitle: (column: GridColumnState) => React.ReactNode;
|
|
19
18
|
onClose?: () => void;
|
|
20
19
|
onClear?: (event: any) => void;
|
|
@@ -6,4 +6,4 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
"use client";
|
|
9
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const C=require("react"),s=require("@progress/kendo-svg-icons"),n=require("../../messages/index.js"),u=require("@progress/kendo-react-buttons"),v=require("@progress/kendo-react-intl"),i=require("@progress/kendo-react-layout"),k=require("../../columnMenu/GridColumnMenuItem.js"),h=require("../../columnMenu/GridColumnMenuItemGroup.js"),S=require("../../utils/GridContext.js"),
|
|
9
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const C=require("react"),s=require("@progress/kendo-svg-icons"),n=require("../../messages/index.js"),u=require("@progress/kendo-react-buttons"),v=require("@progress/kendo-react-intl"),i=require("@progress/kendo-react-layout"),k=require("../../columnMenu/GridColumnMenuItem.js"),h=require("../../columnMenu/GridColumnMenuItemGroup.js"),S=require("../../utils/GridContext.js"),p=require("../adaptiveContext/GridToolbarAdaptiveContext.js"),f=require("@progress/kendo-react-common");function b(t){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const r in t)if(r!=="default"){const o=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(a,r,o.get?o:{enumerable:!0,get:()=>t[r]})}}return a.default=t,Object.freeze(a)}const e=b(C),E=t=>{const a=e.useContext(S.GridContext),{actionSheetRef:r}=e.useContext(p.GridToolbarAdaptiveContext),o=f.useAdaptiveModeContext(),l=v.useLocalization(),m={animation:!0,navigatable:!1,navigatableElements:[],expand:t.computedShow,animationStyles:o&&a.adaptiveColumnMenuRef<=o.small?{top:0,width:"100%",height:"100%"}:void 0,className:"k-adaptive-actionsheet",position:o&&a.adaptiveColumnMenuRef<=o.small?"fullscreen":void 0},d=l.toLanguageString(n.adaptiveToolbarSortTitle,n.messages[n.adaptiveToolbarSortTitle]);return e.createElement(i.ActionSheet,{...m,ref:r,style:{"--kendo-actionsheet-view-current":1},onClose:t.onClose},e.createElement(i.ActionSheetView,null,e.createElement(i.ActionSheetHeader,null,e.createElement("div",{className:"k-actionsheet-titlebar-group"},e.createElement("div",{className:"k-actionsheet-title"},e.createElement("div",{className:"k-text-center"},d)),e.createElement("div",{className:"k-actionsheet-actions"},e.createElement(u.Button,{type:"button",svgIcon:s.checkIcon,themeColor:"primary",onClick:t.onClose,fillMode:"flat"})))),e.createElement(i.ActionSheetContent,null,e.createElement("div",{className:"k-column-menu k-column-menu-lg"},e.createElement(h.GridColumnMenuItemGroup,null,t.filtered.map(c=>e.createElement(k.GridColumnMenuItem,{key:c.id,title:t.renderTitle(c),onClick:g=>t.handleSorting(g,c)}))))),e.createElement(i.ActionSheetFooter,null,e.createElement("div",{className:"k-actions k-actions-stretched"},e.createElement(u.Button,{svgIcon:s.xIcon,onClick:t.onClear,size:"large"},l.toLanguageString(n.sortClearButton,n.messages[n.sortClearButton])),e.createElement(u.Button,{svgIcon:s.checkIcon,themeColor:"primary",size:"large",onClick:t.onClose},l.toLanguageString(n.sortApplyButton,n.messages[n.sortApplyButton]))))))};exports.GridAdaptiveToolbarSort=E;
|
|
@@ -8,17 +8,17 @@
|
|
|
8
8
|
"use client";
|
|
9
9
|
import * as e from "react";
|
|
10
10
|
import { checkIcon as m, xIcon as h } from "@progress/kendo-svg-icons";
|
|
11
|
-
import { adaptiveToolbarSortTitle as c, messages as i, sortClearButton as s, sortApplyButton as
|
|
11
|
+
import { adaptiveToolbarSortTitle as c, messages as i, sortClearButton as s, sortApplyButton as u } from "../../messages/index.mjs";
|
|
12
12
|
import { Button as l } from "@progress/kendo-react-buttons";
|
|
13
13
|
import { useLocalization as f } from "@progress/kendo-react-intl";
|
|
14
14
|
import { ActionSheet as p, ActionSheetView as E, ActionSheetHeader as k, ActionSheetContent as S, ActionSheetFooter as x } from "@progress/kendo-react-layout";
|
|
15
|
-
import { GridColumnMenuItem as
|
|
16
|
-
import { GridColumnMenuItemGroup as
|
|
15
|
+
import { GridColumnMenuItem as A } from "../../columnMenu/GridColumnMenuItem.mjs";
|
|
16
|
+
import { GridColumnMenuItemGroup as b } from "../../columnMenu/GridColumnMenuItemGroup.mjs";
|
|
17
17
|
import { GridContext as y } from "../../utils/GridContext.mjs";
|
|
18
18
|
import { GridToolbarAdaptiveContext as I } from "../adaptiveContext/GridToolbarAdaptiveContext.mjs";
|
|
19
19
|
import { useAdaptiveModeContext as N } from "@progress/kendo-react-common";
|
|
20
|
-
const
|
|
21
|
-
const r = e.useContext(y), { actionSheetRef:
|
|
20
|
+
const P = (t) => {
|
|
21
|
+
const r = e.useContext(y), { actionSheetRef: d } = e.useContext(I), o = N(), n = f(), C = {
|
|
22
22
|
animation: !0,
|
|
23
23
|
navigatable: !1,
|
|
24
24
|
navigatableElements: [],
|
|
@@ -31,7 +31,7 @@ const H = (t) => {
|
|
|
31
31
|
p,
|
|
32
32
|
{
|
|
33
33
|
...C,
|
|
34
|
-
ref:
|
|
34
|
+
ref: d,
|
|
35
35
|
style: { "--kendo-actionsheet-view-current": 1 },
|
|
36
36
|
onClose: t.onClose
|
|
37
37
|
},
|
|
@@ -44,25 +44,16 @@ const H = (t) => {
|
|
|
44
44
|
onClick: t.onClose,
|
|
45
45
|
fillMode: "flat"
|
|
46
46
|
}
|
|
47
|
-
)))), /* @__PURE__ */ e.createElement(S, null, /* @__PURE__ */ e.createElement("div", { className: "k-column-menu k-column-menu-lg" }, /* @__PURE__ */ e.createElement(
|
|
48
|
-
|
|
47
|
+
)))), /* @__PURE__ */ e.createElement(S, null, /* @__PURE__ */ e.createElement("div", { className: "k-column-menu k-column-menu-lg" }, /* @__PURE__ */ e.createElement(b, null, t.filtered.map((a) => /* @__PURE__ */ e.createElement(
|
|
48
|
+
A,
|
|
49
49
|
{
|
|
50
50
|
key: a.id,
|
|
51
51
|
title: t.renderTitle(a),
|
|
52
52
|
onClick: (g) => t.handleSorting(g, a)
|
|
53
53
|
}
|
|
54
|
-
))))), /* @__PURE__ */ e.createElement(x, null, /* @__PURE__ */ e.createElement("div", { className: "k-actions k-actions-stretched" }, /* @__PURE__ */ e.createElement(
|
|
55
|
-
l,
|
|
56
|
-
{
|
|
57
|
-
svgIcon: h,
|
|
58
|
-
onClick: t.onClear,
|
|
59
|
-
size: "large",
|
|
60
|
-
disabled: t.isDisabledButton
|
|
61
|
-
},
|
|
62
|
-
n.toLanguageString(s, i[s])
|
|
63
|
-
), /* @__PURE__ */ e.createElement(l, { svgIcon: m, themeColor: "primary", size: "large", onClick: t.onClose }, n.toLanguageString(d, i[d])))))
|
|
54
|
+
))))), /* @__PURE__ */ e.createElement(x, null, /* @__PURE__ */ e.createElement("div", { className: "k-actions k-actions-stretched" }, /* @__PURE__ */ e.createElement(l, { svgIcon: h, onClick: t.onClear, size: "large" }, n.toLanguageString(s, i[s])), /* @__PURE__ */ e.createElement(l, { svgIcon: m, themeColor: "primary", size: "large", onClick: t.onClose }, n.toLanguageString(u, i[u])))))
|
|
64
55
|
);
|
|
65
56
|
};
|
|
66
57
|
export {
|
|
67
|
-
|
|
58
|
+
P as GridAdaptiveToolbarSort
|
|
68
59
|
};
|