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