@progress/kendo-react-grid 14.5.0-develop.8 → 15.0.0-develop.1

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.
Files changed (35) hide show
  1. package/GridClientWrapper.js +1 -1
  2. package/GridClientWrapper.mjs +84 -84
  3. package/GridWebMcpProps.d.ts +82 -0
  4. package/README.md +4 -4
  5. package/cells/datacell/utils.js +1 -1
  6. package/cells/datacell/utils.mjs +19 -13
  7. package/cells/groupcell/GridGroupCellToggle.js +1 -1
  8. package/cells/groupcell/GridGroupCellToggle.mjs +23 -23
  9. package/cells/pincell/GridPinDropdownButton.js +1 -1
  10. package/cells/pincell/GridPinDropdownButton.mjs +14 -14
  11. package/columnMenu/GridColumnMenuFilterCell.js +1 -1
  12. package/columnMenu/GridColumnMenuFilterCell.mjs +4 -4
  13. package/columnMenu/GridColumnMenuWrapper.js +1 -1
  14. package/columnMenu/GridColumnMenuWrapper.mjs +46 -46
  15. package/contextMenu/GridContextMenu.js +1 -1
  16. package/contextMenu/GridContextMenu.mjs +44 -44
  17. package/dist/cdn/js/kendo-react-grid.js +1 -1
  18. package/filterCommon.d.ts +1 -1
  19. package/filterCommon.js +1 -1
  20. package/filterCommon.mjs +56 -58
  21. package/header/HeaderRow.js +1 -1
  22. package/header/HeaderRow.mjs +30 -29
  23. package/index.d.mts +3 -1
  24. package/index.d.ts +3 -1
  25. package/interfaces/GridProps.d.ts +22 -0
  26. package/package-metadata.js +1 -1
  27. package/package-metadata.mjs +2 -2
  28. package/package.json +23 -18
  29. package/toolbar-tools/smartbox/SmartBox.js +1 -1
  30. package/toolbar-tools/smartbox/SmartBox.mjs +1 -1
  31. package/toolbar-tools/smartbox/hooks/useSmartBoxListData.js +1 -1
  32. package/toolbar-tools/smartbox/hooks/useSmartBoxListData.mjs +7 -7
  33. package/toolbar-tools/smartbox/listItemRenders.js +1 -1
  34. package/toolbar-tools/smartbox/listItemRenders.mjs +1 -1
  35. package/utils/handleAIResponse.d.ts +7 -3
@@ -5,38 +5,44 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- import { getNestedValue as m } from "../../utils/index.mjs";
8
+ import { getNestedValue as r } from "../../utils/index.mjs";
9
9
  import { GRID_COL_INDEX_ATTRIBUTE as u } from "../../constants/index.mjs";
10
- import { uGrid as s, classNames as r } from "@progress/kendo-react-common";
10
+ import { uGrid as s, classNames as o } from "@progress/kendo-react-common";
11
11
  const y = (e) => {
12
- var d, n;
13
- let t = null, i = null;
14
- const a = e.unstyled, c = a && a.uGrid ? a.uGrid : s;
12
+ var n, c;
13
+ let t = null, a = null;
14
+ const i = e.unstyled, d = i && i.uGrid ? i.uGrid : s;
15
15
  if (e.rowType === "groupFooter")
16
16
  t = {
17
- className: e.className
17
+ className: o(d.td({}), e.className),
18
+ role: "gridcell"
18
19
  };
19
20
  else if (e.rowType !== "groupHeader") {
20
21
  if (e.field !== void 0) {
21
- const l = m(e.field, e.dataItem);
22
- l != null && (i = e.intl && e.format ? e.intl.format(e.format, l) : l.toString());
22
+ const l = r(e.field, e.dataItem);
23
+ l != null && (a = e.intl && e.format ? e.intl.format(e.format, l) : l.toString());
23
24
  }
24
- const o = r(
25
- c.td({ selected: e.isSelected, highlighted: e.isHighlighted, sorted: e.isSorted, alt: e.isAlt }),
25
+ const m = o(
26
+ d.td({
27
+ selected: e.isSelected,
28
+ highlighted: e.isHighlighted,
29
+ sorted: e.isSorted,
30
+ alt: e.isAlt
31
+ }),
26
32
  e.className
27
33
  );
28
34
  t = {
29
- rowSpan: (n = (d = e._rowSpan) == null ? void 0 : d.count) != null ? n : void 0,
35
+ rowSpan: (c = (n = e._rowSpan) == null ? void 0 : n.count) != null ? c : void 0,
30
36
  colSpan: e.colSpan,
31
37
  style: e.style,
32
- className: o,
38
+ className: m,
33
39
  role: "gridcell",
34
40
  "aria-colindex": e.ariaColumnIndex,
35
41
  "aria-selected": e.isSelected,
36
42
  [u]: e.columnIndex
37
43
  };
38
44
  }
39
- return { tdProps: t, content: i };
45
+ return { tdProps: t, content: a };
40
46
  }, N = (e) => {
41
47
  var t;
42
48
  return (t = e.cells) == null ? void 0 : t[e.rowType || "data"];
@@ -6,4 +6,4 @@
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
8
  "use client";
9
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react"),g=require("../../utils/GridContext.js"),f=require("@progress/kendo-react-common"),o=require("@progress/kendo-svg-icons"),m=require("@progress/kendo-react-intl"),c=require("../../messages/index.js"),p=require("@progress/kendo-react-data-tools");function I(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const a in t)if(a!=="default"){const n=Object.getOwnPropertyDescriptor(t,a);Object.defineProperty(e,a,n.get?n:{enumerable:!0,get:()=>t[a]})}}return e.default=t,Object.freeze(e)}const r=I(s),b=t=>{const e=r.useContext(g.GridContext),a=m.useLocalization(),n=t.expanded?c.groupCollapse:c.groupExpand,u=a.toLanguageString(n,c.messages[n]),l=e.dir==="rtl";return r.createElement("a",{onClick:i=>{var d;i.preventDefault(),e!=null&&e.itemChange&&e.itemChange({dataItem:t.dataItem,dataIndex:t.dataIndex,syntheticEvent:i,field:void 0,value:!t.expanded}),(d=e==null?void 0:e.dispatchGroupExpand)==null||d.call(e,{type:p.GROUP_EXPAND_ACTION.TOGGLE,group:t.group})},href:"#",tabIndex:-1,"aria-label":u},r.createElement(f.IconWrap,{name:t.expanded?"caret-alt-down":l?"caret-alt-left":"caret-alt-right",icon:t.expanded?o.caretAltDownIcon:l?o.caretAltLeftIcon:o.caretAltRightIcon}))};exports.GridGroupCellToggle=b;
9
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("react"),m=require("../../utils/GridContext.js"),h=require("@progress/kendo-react-common"),a=require("@progress/kendo-svg-icons"),p=require("@progress/kendo-react-intl"),c=require("../../messages/index.js"),v=require("@progress/kendo-react-data-tools");function I(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,o.get?o:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const r=I(f),b=t=>{const e=r.useContext(m.GridContext),n=p.useLocalization(),o=t.expanded?c.groupCollapse:c.groupExpand,d=n.toLanguageString(o,c.messages[o]),i=e.dir==="rtl",u=i?"chevron-left":"chevron-right",g=i?a.chevronLeftIcon:a.chevronRightIcon;return r.createElement("a",{onClick:l=>{var s;l.preventDefault(),e!=null&&e.itemChange&&e.itemChange({dataItem:t.dataItem,dataIndex:t.dataIndex,syntheticEvent:l,field:void 0,value:!t.expanded}),(s=e==null?void 0:e.dispatchGroupExpand)==null||s.call(e,{type:v.GROUP_EXPAND_ACTION.TOGGLE,group:t.group})},href:"#",tabIndex:-1,"aria-label":d},r.createElement(h.IconWrap,{name:t.expanded?"chevron-down":u,icon:t.expanded?a.chevronDownIcon:g}))};exports.GridGroupCellToggle=b;
@@ -6,47 +6,47 @@
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
8
  "use client";
9
- import * as a from "react";
10
- import { GridContext as m } from "../../utils/GridContext.mjs";
11
- import { IconWrap as d } from "@progress/kendo-react-common";
12
- import { caretAltDownIcon as s, caretAltLeftIcon as f, caretAltRightIcon as p } from "@progress/kendo-svg-icons";
13
- import { useLocalization as u } from "@progress/kendo-react-intl";
14
- import { groupCollapse as g, groupExpand as I, messages as h } from "../../messages/index.mjs";
15
- import { GROUP_EXPAND_ACTION as x } from "@progress/kendo-react-data-tools";
16
- const b = (t) => {
17
- const e = a.useContext(m), l = u(), o = t.expanded ? g : I, i = l.toLanguageString(o, h[o]), n = e.dir === "rtl";
9
+ import * as t from "react";
10
+ import { GridContext as d } from "../../utils/GridContext.mjs";
11
+ import { IconWrap as f } from "@progress/kendo-react-common";
12
+ import { chevronDownIcon as h, chevronLeftIcon as p, chevronRightIcon as u } from "@progress/kendo-svg-icons";
13
+ import { useLocalization as g } from "@progress/kendo-react-intl";
14
+ import { groupCollapse as I, groupExpand as v, messages as x } from "../../messages/index.mjs";
15
+ import { GROUP_EXPAND_ACTION as E } from "@progress/kendo-react-data-tools";
16
+ const D = (o) => {
17
+ const e = t.useContext(d), c = g(), n = o.expanded ? I : v, m = c.toLanguageString(n, x[n]), a = e.dir === "rtl", l = a ? "chevron-left" : "chevron-right", s = a ? p : u;
18
18
  return (
19
19
  // eslint-disable-next-line jsx-a11y/anchor-is-valid
20
- /* @__PURE__ */ a.createElement(
20
+ /* @__PURE__ */ t.createElement(
21
21
  "a",
22
22
  {
23
23
  onClick: (r) => {
24
- var c;
24
+ var i;
25
25
  r.preventDefault(), e != null && e.itemChange && e.itemChange({
26
- dataItem: t.dataItem,
27
- dataIndex: t.dataIndex,
26
+ dataItem: o.dataItem,
27
+ dataIndex: o.dataIndex,
28
28
  syntheticEvent: r,
29
29
  field: void 0,
30
- value: !t.expanded
31
- }), (c = e == null ? void 0 : e.dispatchGroupExpand) == null || c.call(e, {
32
- type: x.TOGGLE,
33
- group: t.group
30
+ value: !o.expanded
31
+ }), (i = e == null ? void 0 : e.dispatchGroupExpand) == null || i.call(e, {
32
+ type: E.TOGGLE,
33
+ group: o.group
34
34
  });
35
35
  },
36
36
  href: "#",
37
37
  tabIndex: -1,
38
- "aria-label": i
38
+ "aria-label": m
39
39
  },
40
- /* @__PURE__ */ a.createElement(
41
- d,
40
+ /* @__PURE__ */ t.createElement(
41
+ f,
42
42
  {
43
- name: t.expanded ? "caret-alt-down" : n ? "caret-alt-left" : "caret-alt-right",
44
- icon: t.expanded ? s : n ? f : p
43
+ name: o.expanded ? "chevron-down" : l,
44
+ icon: o.expanded ? h : s
45
45
  }
46
46
  )
47
47
  )
48
48
  );
49
49
  };
50
50
  export {
51
- b as GridGroupCellToggle
51
+ D as GridGroupCellToggle
52
52
  };
@@ -6,4 +6,4 @@
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
8
  "use client";
9
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const w=require("react"),v=require("@progress/kendo-react-common"),q=require("@progress/kendo-react-popup"),B=require("@progress/kendo-react-intl"),r=require("@progress/kendo-svg-icons"),o=require("../../messages/index.js"),x=require("../../utils/GridContext.js"),y=require("@progress/kendo-react-layout");function C(i){const c=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(i){for(const e in i)if(e!=="default"){const a=Object.getOwnPropertyDescriptor(i,e);Object.defineProperty(c,e,a.get?a:{enumerable:!0,get:()=>i[e]})}}return c.default=i,Object.freeze(c)}const n=C(w),D=i=>{const{dataItem:c}=i,e=n.useContext(x.GridContext),a=B.useLocalization(),b="#",u=e!=null&&e.getRowPinPosition?e.getRowPinPosition(c):"none",s=u!=="none",[I,l]=n.useState(!1),g=n.useRef(null),k=n.useCallback(t=>{t.preventDefault(),l(d=>!d)},[]),O=n.useCallback(t=>{!t.isAnchorClicked&&l(!1)},[]),p=a.toLanguageString(o.gridPinToTop,o.messages[o.gridPinToTop]),f=a.toLanguageString(o.gridPinToBottom,o.messages[o.gridPinToBottom]),m=a.toLanguageString(o.gridUnpin,o.messages[o.gridUnpin]),S=n.useMemo(()=>{const t=[];return s&&t.push({text:m,svgIcon:r.unpinOutlineIcon,data:{action:"unpin"}}),u!=="top"&&t.push({text:p,svgIcon:r.pinOutlineTopIcon,data:{action:"pinTop"}}),u!=="bottom"&&t.push({text:f,svgIcon:r.pinOutlineBottomIcon,data:{action:"pinBottom"}}),t},[s,m,u,p,f]),R=n.useCallback(t=>{var P,h,T;const d=(h=(P=t.item)==null?void 0:P.data)==null?void 0:h.action;(T=e==null?void 0:e.onRowPin)==null||T.call(e,d,c),l(!1)},[e,c]);return n.createElement(n.Fragment,null,n.createElement("a",{className:"k-pin-cell",ref:g,href:b,tabIndex:-1,onClick:k,"aria-label":s?m:p},n.createElement(v.IconWrap,{name:s?"unpin":"pin",icon:s?r.unpinOutlineIcon:r.pinOutlineIcon})),n.createElement(q.Popup,{anchor:g.current,show:I,anchorAlign:{vertical:"bottom",horizontal:"right"},popupClass:"k-menu-popup",onMouseDownOutside:O},n.createElement(y.Menu,{vertical:!0,items:S,onSelect:R})))};exports.GridPinDropdownButton=D;
9
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("react"),q=require("@progress/kendo-react-common"),B=require("@progress/kendo-react-popup"),O=require("@progress/kendo-react-intl"),r=require("@progress/kendo-svg-icons"),o=require("../../messages/index.js"),x=require("../../utils/GridContext.js"),y=require("@progress/kendo-react-layout");function C(i){const c=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(i){for(const e in i)if(e!=="default"){const a=Object.getOwnPropertyDescriptor(i,e);Object.defineProperty(c,e,a.get?a:{enumerable:!0,get:()=>i[e]})}}return c.default=i,Object.freeze(c)}const n=C(v),D=i=>{const{dataItem:c}=i,e=n.useContext(x.GridContext),a=O.useLocalization(),b="#",u=e!=null&&e.getRowPinPosition?e.getRowPinPosition(c):"none",s=u!=="none",[I,l]=n.useState(!1),g=n.useRef(null),k=n.useCallback(t=>{t.preventDefault(),l(d=>!d)},[]),S=n.useCallback(t=>{!t.isAnchorClicked&&l(!1)},[]),p=a.toLanguageString(o.gridPinToTop,o.messages[o.gridPinToTop]),f=a.toLanguageString(o.gridPinToBottom,o.messages[o.gridPinToBottom]),m=a.toLanguageString(o.gridUnpin,o.messages[o.gridUnpin]),R=n.useMemo(()=>{const t=[];return s&&t.push({text:m,svgIcon:r.unpinIcon,data:{action:"unpin"}}),u!=="top"&&t.push({text:p,svgIcon:r.pinTopIcon,data:{action:"pinTop"}}),u!=="bottom"&&t.push({text:f,svgIcon:r.pinBottomIcon,data:{action:"pinBottom"}}),t},[s,m,u,p,f]),w=n.useCallback(t=>{var P,h,T;const d=(h=(P=t.item)==null?void 0:P.data)==null?void 0:h.action;(T=e==null?void 0:e.onRowPin)==null||T.call(e,d,c),l(!1)},[e,c]);return n.createElement(n.Fragment,null,n.createElement("a",{className:"k-pin-cell",ref:g,href:b,tabIndex:-1,onClick:k,"aria-label":s?m:p},n.createElement(q.IconWrap,{name:s?"unpin":"pin",icon:s?r.unpinIcon:r.pinIcon})),n.createElement(B.Popup,{anchor:g.current,show:I,anchorAlign:{vertical:"bottom",horizontal:"right"},popupClass:"k-menu-popup",onMouseDownOutside:S},n.createElement(y.Menu,{vertical:!0,items:R,onSelect:w})))};exports.GridPinDropdownButton=D;
@@ -8,20 +8,20 @@
8
8
  "use client";
9
9
  import * as o from "react";
10
10
  import { IconWrap as E } from "@progress/kendo-react-common";
11
- import { Popup as O } from "@progress/kendo-react-popup";
12
- import { useLocalization as C } from "@progress/kendo-react-intl";
13
- import { unpinOutlineIcon as P, pinOutlineTopIcon as L, pinOutlineBottomIcon as M, pinOutlineIcon as z } from "@progress/kendo-svg-icons";
14
- import { gridPinToTop as T, messages as u, gridPinToBottom as I, gridUnpin as w } from "../../messages/index.mjs";
15
- import { GridContext as D } from "../../utils/GridContext.mjs";
16
- import { Menu as A } from "@progress/kendo-react-layout";
11
+ import { Popup as C } from "@progress/kendo-react-popup";
12
+ import { useLocalization as L } from "@progress/kendo-react-intl";
13
+ import { unpinIcon as P, pinTopIcon as M, pinBottomIcon as z, pinIcon as D } from "@progress/kendo-svg-icons";
14
+ import { gridPinToTop as T, messages as m, gridPinToBottom as I, gridUnpin as w } from "../../messages/index.mjs";
15
+ import { GridContext as A } from "../../utils/GridContext.mjs";
16
+ import { Menu as G } from "@progress/kendo-react-layout";
17
17
  const q = (b) => {
18
- const { dataItem: a } = b, n = o.useContext(D), s = C(), k = "#", i = n != null && n.getRowPinPosition ? n.getRowPinPosition(a) : "none", e = i !== "none", [S, c] = o.useState(!1), m = o.useRef(null), v = o.useCallback((t) => {
18
+ const { dataItem: a } = b, n = o.useContext(A), s = L(), k = "#", i = n != null && n.getRowPinPosition ? n.getRowPinPosition(a) : "none", e = i !== "none", [S, c] = o.useState(!1), u = o.useRef(null), v = o.useCallback((t) => {
19
19
  t.preventDefault(), c((l) => !l);
20
20
  }, []), R = o.useCallback((t) => {
21
21
  !t.isAnchorClicked && c(!1);
22
- }, []), r = s.toLanguageString(T, u[T]), f = s.toLanguageString(I, u[I]), p = s.toLanguageString(w, u[w]), x = o.useMemo(() => {
22
+ }, []), r = s.toLanguageString(T, m[T]), f = s.toLanguageString(I, m[I]), p = s.toLanguageString(w, m[w]), x = o.useMemo(() => {
23
23
  const t = [];
24
- return e && t.push({ text: p, svgIcon: P, data: { action: "unpin" } }), i !== "top" && t.push({ text: r, svgIcon: L, data: { action: "pinTop" } }), i !== "bottom" && t.push({ text: f, svgIcon: M, data: { action: "pinBottom" } }), t;
24
+ return e && t.push({ text: p, svgIcon: P, data: { action: "unpin" } }), i !== "top" && t.push({ text: r, svgIcon: M, data: { action: "pinTop" } }), i !== "bottom" && t.push({ text: f, svgIcon: z, data: { action: "pinBottom" } }), t;
25
25
  }, [e, p, i, r, f]), B = o.useCallback(
26
26
  (t) => {
27
27
  var g, h, d;
@@ -34,23 +34,23 @@ const q = (b) => {
34
34
  "a",
35
35
  {
36
36
  className: "k-pin-cell",
37
- ref: m,
37
+ ref: u,
38
38
  href: k,
39
39
  tabIndex: -1,
40
40
  onClick: v,
41
41
  "aria-label": e ? p : r
42
42
  },
43
- /* @__PURE__ */ o.createElement(E, { name: e ? "unpin" : "pin", icon: e ? P : z })
43
+ /* @__PURE__ */ o.createElement(E, { name: e ? "unpin" : "pin", icon: e ? P : D })
44
44
  ), /* @__PURE__ */ o.createElement(
45
- O,
45
+ C,
46
46
  {
47
- anchor: m.current,
47
+ anchor: u.current,
48
48
  show: S,
49
49
  anchorAlign: { vertical: "bottom", horizontal: "right" },
50
50
  popupClass: "k-menu-popup",
51
51
  onMouseDownOutside: R
52
52
  },
53
- /* @__PURE__ */ o.createElement(A, { vertical: !0, items: x, onSelect: B })
53
+ /* @__PURE__ */ o.createElement(G, { vertical: !0, items: x, onSelect: B })
54
54
  ));
55
55
  };
56
56
  export {
@@ -6,4 +6,4 @@
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
8
  "use client";
9
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("react"),d=require("@progress/kendo-react-dropdowns"),m=require("@progress/kendo-react-inputs"),h=require("@progress/kendo-react-dateinputs"),c=require("../filterCommon.js"),x=require("../utils/GridContext.js");function p(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const a in e)if(a!=="default"){const i=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(t,a,i.get?i:{enumerable:!0,get:()=>e[a]})}}return t.default=e,Object.freeze(t)}const o=p(b),D=e=>{const t=o.useContext(x.GridContext),a=()=>{if(e.filterType==="boolean")return;const n=e.operators.find(r=>r.operator===e.operator)||null;return o.createElement(d.DropDownList,{adaptive:t.adaptive,size:t.mobileMode?"large":"medium",value:n,onChange:s,data:e.operators,textField:"text"})},i=n=>{c.cellInputChange(n.value,n.syntheticEvent,e)},s=n=>{c.cellOperatorChange(n,e.value,e.onChange)},g=n=>{c.cellBoolDropdownChange(n,e.onChange)},C=(n,r,u)=>{switch(n){case"numeric":return o.createElement(m.NumericTextBox,{value:r,size:t.mobileMode?"large":"medium",onChange:i,rangeOnEnter:!1});case"date":return o.createElement(h.DatePicker,{value:r,size:t.mobileMode?"large":"medium",onChange:i});case"boolean":{const f=l=>l==null;return o.createElement(d.DropDownList,{adaptive:t.adaptive,onChange:g,size:t.mobileMode?"large":"medium",value:u.find(l=>l.operator===(f(r)?"":r)),data:u,textField:"text"})}default:return o.createElement(m.TextBox,{size:t.mobileMode?"large":"medium",value:r||"",onChange:i})}};return o.createElement(o.Fragment,null,a(),C(e.filterType,e.value,e.booleanValues))};exports.GridColumnMenuFilterCell=D;
9
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("react"),d=require("@progress/kendo-react-dropdowns"),m=require("@progress/kendo-react-inputs"),h=require("@progress/kendo-react-dateinputs"),c=require("../filterCommon.js"),x=require("../utils/GridContext.js");function p(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const a in e)if(a!=="default"){const i=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(t,a,i.get?i:{enumerable:!0,get:()=>e[a]})}}return t.default=e,Object.freeze(t)}const o=p(b),D=e=>{const t=o.useContext(x.GridContext),a=()=>{if(e.filterType==="boolean")return;const n=e.operators.find(r=>r.operator===e.operator)||null;return o.createElement(d.DropDownList,{adaptive:t.adaptive,size:t.mobileMode?"large":"medium",value:n,onChange:s,data:e.operators,textField:"text"})},i=n=>{c.cellInputChange(n.value,n.syntheticEvent,e,!1)},s=n=>{c.cellOperatorChange(n,e.value,e.onChange)},g=n=>{c.cellBoolDropdownChange(n,e.onChange)},C=(n,r,u)=>{switch(n){case"numeric":return o.createElement(m.NumericTextBox,{value:r,size:t.mobileMode?"large":"medium",onChange:i,rangeOnEnter:!1});case"date":return o.createElement(h.DatePicker,{value:r,size:t.mobileMode?"large":"medium",onChange:i});case"boolean":{const f=l=>l==null;return o.createElement(d.DropDownList,{adaptive:t.adaptive,onChange:g,size:t.mobileMode?"large":"medium",value:u.find(l=>l.operator===(f(r)?"":r)),data:u,textField:"text"})}default:return o.createElement(m.TextBox,{size:t.mobileMode?"large":"medium",value:r||"",onChange:i})}};return o.createElement(o.Fragment,null,a(),C(e.filterType,e.value,e.booleanValues))};exports.GridColumnMenuFilterCell=D;
@@ -8,7 +8,7 @@
8
8
  "use client";
9
9
  import * as n from "react";
10
10
  import { DropDownList as m } from "@progress/kendo-react-dropdowns";
11
- import { TextBox as h, NumericTextBox as s } from "@progress/kendo-react-inputs";
11
+ import { TextBox as s, NumericTextBox as h } from "@progress/kendo-react-inputs";
12
12
  import { DatePicker as f } from "@progress/kendo-react-dateinputs";
13
13
  import { cellOperatorChange as x, cellInputChange as E, cellBoolDropdownChange as b } from "../filterCommon.mjs";
14
14
  import { GridContext as p } from "../utils/GridContext.mjs";
@@ -29,7 +29,7 @@ const w = (e) => {
29
29
  }
30
30
  );
31
31
  }, i = (t) => {
32
- E(t.value, t.syntheticEvent, e);
32
+ E(t.value, t.syntheticEvent, e, !1);
33
33
  }, c = (t) => {
34
34
  x(t, e.value, e.onChange);
35
35
  }, u = (t) => {
@@ -38,7 +38,7 @@ const w = (e) => {
38
38
  switch (t) {
39
39
  case "numeric":
40
40
  return /* @__PURE__ */ n.createElement(
41
- s,
41
+ h,
42
42
  {
43
43
  value: r,
44
44
  size: o.mobileMode ? "large" : "medium",
@@ -71,7 +71,7 @@ const w = (e) => {
71
71
  }
72
72
  default:
73
73
  return /* @__PURE__ */ n.createElement(
74
- h,
74
+ s,
75
75
  {
76
76
  size: o.mobileMode ? "large" : "medium",
77
77
  value: r || "",
@@ -6,4 +6,4 @@
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
8
  "use client";
9
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const $=require("react"),L=require("@progress/kendo-react-popup"),s=require("@progress/kendo-react-common"),O=require("@progress/kendo-svg-icons"),k=require("../messages/index.js"),V=require("@progress/kendo-react-intl"),H=require("../utils/GridContext.js"),j=require("./adaptiveContext/GridColumnMenuAdaptiveContext.js"),J=require("./adaptiveContent/GridAdaptiveColumnMenu.js"),Q=require("react-dom");function U(o){const c=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(o){for(const u in o)if(u!=="default"){const a=Object.getOwnPropertyDescriptor(o,u);Object.defineProperty(c,u,a.get?a:{enumerable:!0,get:()=>o[u]})}}return c.default=o,Object.freeze(c)}const t=U($),X=[".k-columnmenu-item-content",".k-filter-menu-container"].map(o=>s.TABBABLE_ELEMENTS.map(c=>`${o} ${c}`)),Y=[[".k-tabstrip-items"],[".k-columnmenu-item"],...X],Z=o=>{var D;const c=t.useContext(H.GridContext),[u,a]=t.useState(!1),i=t.useRef(null),d=t.useRef(null),l=t.useRef(null),v=t.useRef(0),A=s.useDocument(i),{columnMenu:f,...p}=o,{column:m,columnMenuIcon:C,navigatable:w}=o,S=V.useLocalization(),b=m.title||m.field,T=b?`${b} `:"",q="#",R=n=>{const e=s.getActiveElement(document);clearTimeout(v.current),v.current=window.setTimeout(()=>{!c.mobileMode&&e&&n.relatedTarget!==i.current&&d.current&&!d.current.contains(e)&&g()})},x=()=>{clearTimeout(v.current)},G=n=>{n.preventDefault(),u&&o.onCloseMenu&&o.onCloseMenu(),a(!u)},g=()=>{o.onCloseMenu&&o.onCloseMenu(),a(!1),!o.navigatable&&i.current&&i.current.focus()},I=n=>{var e;if(n.key==="Tab"){const r=n.target,M=r&&((e=r.closest(".k-grid"))==null?void 0:e.getElementsByClassName("k-grid-content")[0]);M&&M.scrollWidth>M.clientWidth&&r.scrollIntoView({inline:"center"})}},E=t.useMemo(()=>o.show!==void 0?o.show:u,[o.show,u]),P=n=>{var e;(e=l.current)==null||e.triggerKeyboardEvent(n)},N=n=>{var e;(e=l.current)==null||e.triggerMouseEvent(n)},B=(n,e,r)=>{r.preventDefault(),r.shiftKey?e.focusPrevious(n):e.focusNext(n)},K=(n,e,r)=>{n&&(r.preventDefault(),n.click())},W=(n,e,r)=>{r.preventDefault(),g()},_=(n,e,r)=>{e.focusElement(n)},z=n=>{!n.isAnchorClicked&&a(!1)},h=t.useCallback((n,e)=>{const r=[];if(!e||typeof e!="object")return!1;if(Array.isArray(e.filters)){for(const M of e.filters)if(h(n,M))return!0}return"field"in e&&typeof e.field=="string"&&r.push(e.field),r.includes(n)},[]),y=t.useCallback((n,e)=>!e||!Array.isArray(e)?!1:e.some(r=>r.field===n),[]),F=t.useMemo(()=>m.field&&(h(m.field,c.filter)||y(m.field,c.group)),[m.field,c.filter,c.group,h,y]);return t.useEffect(()=>(E&&d.current&&(l.current=new s.Navigation({tabIndex:0,root:d,selectors:Y,keyboardEvents:{keydown:{Tab:B,Enter:K,Escape:W}},mouseEvents:{mousedown:_}}),l.current.focusElement(l.current.first,null)),()=>{l.current&&(l.current=null)}),[E]),t.createElement(t.Fragment,null,t.createElement("a",{className:s.classNames("k-grid-header-menu k-grid-column-menu",{"k-active":F}),ref:i,onClick:G,onKeyDown:I,href:q,tabIndex:w?-1:void 0,"aria-label":`${w?"":T}${S.toLanguageString(k.columnMenu,k.messages[k.columnMenu])}`},C?t.createElement(s.IconWrap,{name:C.name,icon:C}):t.createElement(s.IconWrap,{name:"more-vertical",icon:O.moreVerticalIcon})),t.createElement(j.GridColumnMenuAdaptiveProvider,null,c.mobileMode?t.createElement(t.Fragment,null,Q.createPortal(t.createElement(J.GridAdaptiveColumnMenu,{computedShow:E,ColumnMenu:f,closeMenu:g},f&&t.createElement(f,{...p,onCloseMenu:g})),(D=A())==null?void 0:D.body)):t.createElement(L.Popup,{anchor:i.current,show:E,popupClass:"k-grid-columnmenu-popup",onMouseDownOutside:z},t.createElement("div",{ref:d,onBlur:R,onFocus:x,onMouseDown:N,onKeyDown:P,className:"k-column-menu k-column-menu-md"},f&&t.createElement(f,{...p,onCloseMenu:g})))))};exports.GridColumnMenuWrapper=Z;
9
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const B=require("react"),L=require("@progress/kendo-react-popup"),s=require("@progress/kendo-react-common"),O=require("@progress/kendo-svg-icons"),k=require("../messages/index.js"),V=require("@progress/kendo-react-intl"),H=require("../utils/GridContext.js"),U=require("./adaptiveContext/GridColumnMenuAdaptiveContext.js"),j=require("./adaptiveContent/GridAdaptiveColumnMenu.js"),J=require("react-dom");function Q(o){const c=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(o){for(const u in o)if(u!=="default"){const a=Object.getOwnPropertyDescriptor(o,u);Object.defineProperty(c,u,a.get?a:{enumerable:!0,get:()=>o[u]})}}return c.default=o,Object.freeze(c)}const t=Q(B),X=[".k-columnmenu-item-content",".k-filter-menu-container"].map(o=>s.FOCUSABLE_ELEMENTS.map(c=>`${o} ${c}`)),Y=[[".k-columnmenu-item"],...X],Z=o=>{var D;const c=t.useContext(H.GridContext),[u,a]=t.useState(!1),i=t.useRef(null),d=t.useRef(null),l=t.useRef(null),E=t.useRef(0),S=s.useDocument(i),{columnMenu:f,...p}=o,{column:m,columnMenuIcon:v,navigatable:w}=o,A=V.useLocalization(),y=m.title||m.field,T=y?`${y} `:"",q="#",R=n=>{const e=s.getActiveElement(document);clearTimeout(E.current),E.current=window.setTimeout(()=>{!c.mobileMode&&e&&n.relatedTarget!==i.current&&d.current&&!d.current.contains(e)&&g()})},x=()=>{clearTimeout(E.current)},G=n=>{n.preventDefault(),u&&o.onCloseMenu&&o.onCloseMenu(),a(!u)},g=()=>{o.onCloseMenu&&o.onCloseMenu(),a(!1),!o.navigatable&&i.current&&i.current.focus()},I=n=>{var e;if(n.key==="Tab"){const r=n.target,M=r&&((e=r.closest(".k-grid"))==null?void 0:e.getElementsByClassName("k-grid-content")[0]);M&&M.scrollWidth>M.clientWidth&&r.scrollIntoView({inline:"center"})}},C=t.useMemo(()=>o.show!==void 0?o.show:u,[o.show,u]),P=n=>{var e;(e=l.current)==null||e.triggerKeyboardEvent(n)},N=n=>{var e;(e=l.current)==null||e.triggerMouseEvent(n)},F=(n,e,r)=>{r.preventDefault(),r.shiftKey?e.focusPrevious(n):e.focusNext(n)},K=(n,e,r)=>{n&&(r.preventDefault(),n.click())},W=(n,e,r)=>{r.preventDefault(),g()},_=(n,e,r)=>{e.focusElement(n)},z=n=>{!n.isAnchorClicked&&a(!1)},h=t.useCallback((n,e)=>{const r=[];if(!e||typeof e!="object")return!1;if(Array.isArray(e.filters)){for(const M of e.filters)if(h(n,M))return!0}return"field"in e&&typeof e.field=="string"&&r.push(e.field),r.includes(n)},[]),b=t.useCallback((n,e)=>!e||!Array.isArray(e)?!1:e.some(r=>r.field===n),[]),$=t.useMemo(()=>m.field&&(h(m.field,c.filter)||b(m.field,c.group)),[m.field,c.filter,c.group,h,b]);return t.useEffect(()=>(C&&d.current&&(l.current=new s.Navigation({tabIndex:0,root:d,selectors:Y,keyboardEvents:{keydown:{Tab:F,Enter:K,Escape:W}},mouseEvents:{mousedown:_}}),l.current.focusElement(l.current.first,null)),()=>{l.current&&(l.current=null)}),[C]),t.createElement(t.Fragment,null,t.createElement("a",{className:s.classNames("k-grid-header-menu k-grid-column-menu",{"k-active":$}),ref:i,onClick:G,onKeyDown:I,href:q,tabIndex:w?-1:void 0,"aria-label":`${w?"":T}${A.toLanguageString(k.columnMenu,k.messages[k.columnMenu])}`},v?t.createElement(s.IconWrap,{name:v.name,icon:v}):t.createElement(s.IconWrap,{name:"more-vertical",icon:O.moreVerticalIcon})),t.createElement(U.GridColumnMenuAdaptiveProvider,null,c.mobileMode?t.createElement(t.Fragment,null,J.createPortal(t.createElement(j.GridAdaptiveColumnMenu,{computedShow:C,ColumnMenu:f,closeMenu:g},f&&t.createElement(f,{...p,onCloseMenu:g})),(D=S())==null?void 0:D.body)):t.createElement(L.Popup,{anchor:i.current,show:C,popupClass:"k-grid-columnmenu-popup",onMouseDownOutside:z},t.createElement("div",{ref:d,onBlur:R,onFocus:x,onMouseDown:N,onKeyDown:P,className:"k-column-menu k-column-menu-md"},f&&t.createElement(f,{...p,onCloseMenu:g})))))};exports.GridColumnMenuWrapper=Z;
@@ -6,54 +6,54 @@
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
8
  "use client";
9
- import * as t from "react";
9
+ import * as o from "react";
10
10
  import { Popup as V } from "@progress/kendo-react-popup";
11
- import { useDocument as _, Navigation as H, classNames as q, IconWrap as D, TABBABLE_ELEMENTS as J, getActiveElement as Q } from "@progress/kendo-react-common";
12
- import { moreVerticalIcon as U } from "@progress/kendo-svg-icons";
11
+ import { useDocument as _, Navigation as H, classNames as U, IconWrap as D, FOCUSABLE_ELEMENTS as q, getActiveElement as J } from "@progress/kendo-react-common";
12
+ import { moreVerticalIcon as Q } from "@progress/kendo-svg-icons";
13
13
  import { columnMenu as b, messages as X } from "../messages/index.mjs";
14
14
  import { useLocalization as Y } from "@progress/kendo-react-intl";
15
15
  import { GridContext as Z } from "../utils/GridContext.mjs";
16
16
  import { GridColumnMenuAdaptiveProvider as O } from "./adaptiveContext/GridColumnMenuAdaptiveContext.mjs";
17
17
  import { GridAdaptiveColumnMenu as j } from "./adaptiveContent/GridAdaptiveColumnMenu.mjs";
18
18
  import ee from "react-dom";
19
- const ne = [".k-columnmenu-item-content", ".k-filter-menu-container"].map((r) => J.map((c) => `${r} ${c}`)), te = [[".k-tabstrip-items"], [".k-columnmenu-item"], ...ne], de = (r) => {
19
+ const ne = [".k-columnmenu-item-content", ".k-filter-menu-container"].map((r) => q.map((c) => `${r} ${c}`)), oe = [[".k-columnmenu-item"], ...ne], de = (r) => {
20
20
  var y;
21
- const c = t.useContext(Z), [d, M] = t.useState(!1), s = t.useRef(null), i = t.useRef(null), l = t.useRef(null), h = t.useRef(0), A = _(s), { columnMenu: a, ...p } = r, { column: u, columnMenuIcon: g, navigatable: C } = r, T = Y(), w = u.title || u.field, S = w ? `${w} ` : "", x = "#", N = (n) => {
22
- const e = Q(document);
21
+ const c = o.useContext(Z), [d, M] = o.useState(!1), u = o.useRef(null), a = o.useRef(null), l = o.useRef(null), h = o.useRef(0), A = _(u), { columnMenu: i, ...C } = r, { column: s, columnMenuIcon: g, navigatable: p } = r, T = Y(), w = s.title || s.field, S = w ? `${w} ` : "", x = "#", N = (n) => {
22
+ const e = J(document);
23
23
  clearTimeout(h.current), h.current = window.setTimeout(() => {
24
- !c.mobileMode && e && n.relatedTarget !== s.current && i.current && !i.current.contains(e) && m();
24
+ !c.mobileMode && e && n.relatedTarget !== u.current && a.current && !a.current.contains(e) && m();
25
25
  });
26
- }, B = () => {
26
+ }, F = () => {
27
27
  clearTimeout(h.current);
28
28
  }, I = (n) => {
29
29
  n.preventDefault(), d && r.onCloseMenu && r.onCloseMenu(), M(!d);
30
30
  }, m = () => {
31
- r.onCloseMenu && r.onCloseMenu(), M(!1), !r.navigatable && s.current && s.current.focus();
31
+ r.onCloseMenu && r.onCloseMenu(), M(!1), !r.navigatable && u.current && u.current.focus();
32
32
  }, K = (n) => {
33
33
  var e;
34
34
  if (n.key === "Tab") {
35
- const o = n.target, f = o && ((e = o.closest(".k-grid")) == null ? void 0 : e.getElementsByClassName("k-grid-content")[0]);
36
- f && f.scrollWidth > f.clientWidth && o.scrollIntoView({ inline: "center" });
35
+ const t = n.target, f = t && ((e = t.closest(".k-grid")) == null ? void 0 : e.getElementsByClassName("k-grid-content")[0]);
36
+ f && f.scrollWidth > f.clientWidth && t.scrollIntoView({ inline: "center" });
37
37
  }
38
- }, E = t.useMemo(() => r.show !== void 0 ? r.show : d, [r.show, d]), R = (n) => {
38
+ }, E = o.useMemo(() => r.show !== void 0 ? r.show : d, [r.show, d]), R = (n) => {
39
39
  var e;
40
40
  (e = l.current) == null || e.triggerKeyboardEvent(n);
41
- }, F = (n) => {
41
+ }, G = (n) => {
42
42
  var e;
43
43
  (e = l.current) == null || e.triggerMouseEvent(n);
44
- }, G = (n, e, o) => {
45
- o.preventDefault(), o.shiftKey ? e.focusPrevious(n) : e.focusNext(n);
46
- }, P = (n, e, o) => {
47
- n && (o.preventDefault(), n.click());
48
- }, $ = (n, e, o) => {
49
- o.preventDefault(), m();
50
- }, z = (n, e, o) => {
44
+ }, P = (n, e, t) => {
45
+ t.preventDefault(), t.shiftKey ? e.focusPrevious(n) : e.focusNext(n);
46
+ }, $ = (n, e, t) => {
47
+ n && (t.preventDefault(), n.click());
48
+ }, z = (n, e, t) => {
49
+ t.preventDefault(), m();
50
+ }, B = (n, e, t) => {
51
51
  e.focusElement(n);
52
52
  }, L = (n) => {
53
53
  !n.isAnchorClicked && M(!1);
54
- }, v = t.useCallback(
54
+ }, v = o.useCallback(
55
55
  (n, e) => {
56
- const o = [];
56
+ const t = [];
57
57
  if (!e || typeof e != "object")
58
58
  return !1;
59
59
  if (Array.isArray(e.filters)) {
@@ -61,67 +61,67 @@ const ne = [".k-columnmenu-item-content", ".k-filter-menu-container"].map((r) =>
61
61
  if (v(n, f))
62
62
  return !0;
63
63
  }
64
- return "field" in e && typeof e.field == "string" && o.push(e.field), o.includes(n);
64
+ return "field" in e && typeof e.field == "string" && t.push(e.field), t.includes(n);
65
65
  },
66
66
  []
67
- ), k = t.useCallback((n, e) => !e || !Array.isArray(e) ? !1 : e.some((o) => o.field === n), []), W = t.useMemo(() => u.field && (v(u.field, c.filter) || k(u.field, c.group)), [u.field, c.filter, c.group, v, k]);
68
- return t.useEffect(() => (E && i.current && (l.current = new H({
67
+ ), k = o.useCallback((n, e) => !e || !Array.isArray(e) ? !1 : e.some((t) => t.field === n), []), W = o.useMemo(() => s.field && (v(s.field, c.filter) || k(s.field, c.group)), [s.field, c.filter, c.group, v, k]);
68
+ return o.useEffect(() => (E && a.current && (l.current = new H({
69
69
  tabIndex: 0,
70
- root: i,
71
- selectors: te,
70
+ root: a,
71
+ selectors: oe,
72
72
  keyboardEvents: {
73
- keydown: { Tab: G, Enter: P, Escape: $ }
73
+ keydown: { Tab: P, Enter: $, Escape: z }
74
74
  },
75
- mouseEvents: { mousedown: z }
75
+ mouseEvents: { mousedown: B }
76
76
  }), l.current.focusElement(l.current.first, null)), () => {
77
77
  l.current && (l.current = null);
78
- }), [E]), /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement(
78
+ }), [E]), /* @__PURE__ */ o.createElement(o.Fragment, null, /* @__PURE__ */ o.createElement(
79
79
  "a",
80
80
  {
81
- className: q("k-grid-header-menu k-grid-column-menu", {
81
+ className: U("k-grid-header-menu k-grid-column-menu", {
82
82
  "k-active": W
83
83
  }),
84
- ref: s,
84
+ ref: u,
85
85
  onClick: I,
86
86
  onKeyDown: K,
87
87
  href: x,
88
- tabIndex: C ? -1 : void 0,
89
- "aria-label": `${C ? "" : S}${T.toLanguageString(
88
+ tabIndex: p ? -1 : void 0,
89
+ "aria-label": `${p ? "" : S}${T.toLanguageString(
90
90
  b,
91
91
  X[b]
92
92
  )}`
93
93
  },
94
- g ? /* @__PURE__ */ t.createElement(D, { name: g.name, icon: g }) : /* @__PURE__ */ t.createElement(D, { name: "more-vertical", icon: U })
95
- ), /* @__PURE__ */ t.createElement(O, null, c.mobileMode ? /* @__PURE__ */ t.createElement(t.Fragment, null, ee.createPortal(
96
- /* @__PURE__ */ t.createElement(
94
+ g ? /* @__PURE__ */ o.createElement(D, { name: g.name, icon: g }) : /* @__PURE__ */ o.createElement(D, { name: "more-vertical", icon: Q })
95
+ ), /* @__PURE__ */ o.createElement(O, null, c.mobileMode ? /* @__PURE__ */ o.createElement(o.Fragment, null, ee.createPortal(
96
+ /* @__PURE__ */ o.createElement(
97
97
  j,
98
98
  {
99
99
  computedShow: E,
100
- ColumnMenu: a,
100
+ ColumnMenu: i,
101
101
  closeMenu: m
102
102
  },
103
- a && /* @__PURE__ */ t.createElement(a, { ...p, onCloseMenu: m })
103
+ i && /* @__PURE__ */ o.createElement(i, { ...C, onCloseMenu: m })
104
104
  ),
105
105
  (y = A()) == null ? void 0 : y.body
106
- )) : /* @__PURE__ */ t.createElement(
106
+ )) : /* @__PURE__ */ o.createElement(
107
107
  V,
108
108
  {
109
- anchor: s.current,
109
+ anchor: u.current,
110
110
  show: E,
111
111
  popupClass: "k-grid-columnmenu-popup",
112
112
  onMouseDownOutside: L
113
113
  },
114
- /* @__PURE__ */ t.createElement(
114
+ /* @__PURE__ */ o.createElement(
115
115
  "div",
116
116
  {
117
- ref: i,
117
+ ref: a,
118
118
  onBlur: N,
119
- onFocus: B,
120
- onMouseDown: F,
119
+ onFocus: F,
120
+ onMouseDown: G,
121
121
  onKeyDown: R,
122
122
  className: "k-column-menu k-column-menu-md"
123
123
  },
124
- a && /* @__PURE__ */ t.createElement(a, { ...p, onCloseMenu: m })
124
+ i && /* @__PURE__ */ o.createElement(i, { ...C, onCloseMenu: m })
125
125
  )
126
126
  )));
127
127
  };
@@ -6,4 +6,4 @@
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
8
  "use client";
9
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const S=require("react"),e=require("@progress/kendo-svg-icons"),v=require("@progress/kendo-react-intl"),M=require("@progress/kendo-react-layout"),t=require("./enums.js");function R(n){const i=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const c in n)if(c!=="default"){const r=Object.getOwnPropertyDescriptor(n,c);Object.defineProperty(i,c,r.get?r:{enumerable:!0,get:()=>n[c]})}}return i.default=n,Object.freeze(i)}const s=R(S),x={[t.GridContextMenuItemNames.create]:{name:"create",text:"Add",icon:"plus",svgIcon:e.plusIcon,data:{action:"AddCommand"}},[t.GridContextMenuItemNames.edit]:{name:"edit",text:"Edit",icon:"pencil",svgIcon:e.pencilIcon,data:{action:"EditCommand"}},[t.GridContextMenuItemNames.delete]:{name:"delete",text:"Delete",icon:"trash",svgIcon:e.trashIcon,data:{action:"DeleteCommand"}},[t.GridContextMenuItemNames.select]:{name:"select",text:"Select",icon:"table-body",svgIcon:e.tableBodyIcon,items:[{name:"selectRow",text:"Row",icon:"table-row-groups",svgIcon:e.tableRowGroupsIcon,data:{action:"SelectRowCommand"}},{name:"selectAllRows",text:"All rows",icon:"grid",svgIcon:e.gridIcon,data:{action:"SelectAllRowsCommand"}},{name:"clearSelection",text:"Clear selection",icon:"table-unmerge",svgIcon:e.tableUnmergeIcon,data:{action:"ClearSelectionCommand"}}]},[t.GridContextMenuItemNames.pinRow]:{name:"pinRow",text:"Pin row",icon:"pin-outline",svgIcon:e.pinOutlineIcon,items:[{name:"pinTop",text:"Pin to Top",icon:"pin-outline-top",svgIcon:e.pinOutlineTopIcon,data:{action:"PinTopCommand"}},{name:"pinBottom",text:"Pin to Bottom",icon:"pin-outline-bottom",svgIcon:e.pinOutlineBottomIcon,data:{action:"PinBottomCommand"}},{name:"unpin",text:"Unpin",icon:"unpin-outline",svgIcon:e.unpinOutlineIcon,data:{action:"UnpinCommand"}}]},[t.GridContextMenuItemNames.pinTop]:{name:"pinTop",text:"Pin to Top",icon:"pin-outline-top",svgIcon:e.pinOutlineTopIcon,data:{action:"PinTopCommand"}},[t.GridContextMenuItemNames.pinBottom]:{name:"pinBottom",text:"Pin to Bottom",icon:"pin-outline-bottom",svgIcon:e.pinOutlineBottomIcon,data:{action:"PinBottomCommand"}},[t.GridContextMenuItemNames.unpin]:{name:"unpin",text:"Unpin",icon:"unpin-outline",svgIcon:e.unpinOutlineIcon,data:{action:"UnpinCommand"}},[t.GridContextMenuItemNames.copySelection]:{name:"copySelection",text:"Copy selection",icon:"page-header-section",svgIcon:e.pageHeaderSectionIcon,data:{action:"CopySelectionCommand"},options:"withHeaders"},[t.GridContextMenuItemNames.copySelectionNoHeaders]:{name:"copySelectionNoHeaders",text:"Copy selection (No Headers)",icon:"file-txt",svgIcon:e.fileTxtIcon,data:{action:"CopySelectionCommand"}},[t.GridContextMenuItemNames.paste]:{name:"paste",text:"Paste (use CTRL/⌘ + V)",icon:"clipboard",svgIcon:e.clipboardIcon,data:{action:"PasteCommand"}},[t.GridContextMenuItemNames.reorderRow]:{name:"reorderRow",text:"Reorder row",icon:"caret-alt-expand",svgIcon:e.caretAltExpandIcon,items:[{name:"reorderRowUp",text:"Up",icon:"caret-alt-up",svgIcon:e.caretAltUpIcon,data:{action:"ReorderRowCommand"}},{name:"reorderRowDown",text:"Down",icon:"caret-alt-down",svgIcon:e.caretAltDownIcon,data:{action:"ReorderRowCommand"}},{name:"reorderRowTop",text:"Top",icon:"caret-alt-to-top",svgIcon:e.caretAltToTopIcon,data:{action:"ReorderRowCommand"}},{name:"reorderRowBottom",text:"Bottom",icon:"caret-alt-to-bottom",svgIcon:e.caretAltToBottomIcon,data:{action:"ReorderRowCommand"}}]},[t.GridContextMenuItemNames.exportPDF]:{name:"exportPDF",text:"Export to PDF",icon:"file-pdf",svgIcon:e.filePdfIcon,data:{action:"ExportPDFCommand"}},[t.GridContextMenuItemNames.exportExcel]:{name:"exportExcel",text:"Export to Excel",icon:"file-excel",svgIcon:e.fileExcelIcon,items:[{name:"exportToExcelAll",text:"All",data:{action:"ExportExcelCommand"}},{name:"exportToExcelSelection",text:"Selection",data:{action:"ExportExcelCommand"},options:"selection,withHeaders"},{name:"exportToExcelSelectionNoHeaders",text:"Selection (No Headers)",data:{action:"ExportExcelCommand"},options:"selection"}]},[t.GridContextMenuItemNames.separator]:{name:"separator",separator:!0},[t.GridContextMenuItemNames.sortAsc]:{name:"sortAsc",text:"Sort Ascending",icon:"sort-asc-small",svgIcon:e.sortAscSmallIcon,data:{action:"SortCommand"}},[t.GridContextMenuItemNames.sortDesc]:{name:"sortDesc",text:"Sort Descending",icon:"sort-desc-small",svgIcon:e.sortDescSmallIcon,data:{action:"SortCommand"}}},f=n=>{const{show:i,offset:c,dataItem:r,field:d,items:m,onClose:I,onSelect:p}=n,u=v.useLocalization(),C=s.useCallback(a=>{p.call(void 0,{event:a,dataItem:r,field:d})},[p,r,d]),l=s.useCallback(a=>{const o=a;return o.text&&o.name&&(o.text=u.toLanguageString(`contextMenu.${o.name}`,o.text||"")),o.items&&Array.isArray(o.items)&&(o.items=o.items.map(w=>l(w))),o},[u]),g=s.useMemo(()=>m&&m.map(a=>{const o=typeof a=="string"?x[a]:a;return l(o)}),[m,l]);return s.createElement(M.ContextMenu,{show:i,offset:c,items:g,onClose:I,onSelect:C})};exports.GridContextMenu=f;exports.contextMenuItemsMap=x;
9
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const w=require("react"),e=require("@progress/kendo-svg-icons"),S=require("@progress/kendo-react-intl"),M=require("@progress/kendo-react-layout"),t=require("./enums.js");function R(n){const i=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const c in n)if(c!=="default"){const r=Object.getOwnPropertyDescriptor(n,c);Object.defineProperty(i,c,r.get?r:{enumerable:!0,get:()=>n[c]})}}return i.default=n,Object.freeze(i)}const s=R(w),I={[t.GridContextMenuItemNames.create]:{name:"create",text:"Add",icon:"plus",svgIcon:e.plusIcon,data:{action:"AddCommand"}},[t.GridContextMenuItemNames.edit]:{name:"edit",text:"Edit",icon:"pencil",svgIcon:e.pencilIcon,data:{action:"EditCommand"}},[t.GridContextMenuItemNames.delete]:{name:"delete",text:"Delete",icon:"trash",svgIcon:e.trashIcon,data:{action:"DeleteCommand"}},[t.GridContextMenuItemNames.select]:{name:"select",text:"Select",icon:"table-body",svgIcon:e.tableBodyIcon,items:[{name:"selectRow",text:"Row",icon:"table-row-groups",svgIcon:e.tableRowGroupsIcon,data:{action:"SelectRowCommand"}},{name:"selectAllRows",text:"All rows",icon:"grid",svgIcon:e.gridIcon,data:{action:"SelectAllRowsCommand"}},{name:"clearSelection",text:"Clear selection",icon:"table-unmerge",svgIcon:e.tableUnmergeIcon,data:{action:"ClearSelectionCommand"}}]},[t.GridContextMenuItemNames.pinRow]:{name:"pinRow",text:"Pin row",icon:"pin",svgIcon:e.pinIcon,items:[{name:"pinTop",text:"Pin to Top",icon:"pin-top",svgIcon:e.pinTopIcon,data:{action:"PinTopCommand"}},{name:"pinBottom",text:"Pin to Bottom",icon:"pin-bottom",svgIcon:e.pinBottomIcon,data:{action:"PinBottomCommand"}},{name:"unpin",text:"Unpin",icon:"unpin",svgIcon:e.unpinIcon,data:{action:"UnpinCommand"}}]},[t.GridContextMenuItemNames.pinTop]:{name:"pinTop",text:"Pin to Top",icon:"pin-top",svgIcon:e.pinTopIcon,data:{action:"PinTopCommand"}},[t.GridContextMenuItemNames.pinBottom]:{name:"pinBottom",text:"Pin to Bottom",icon:"pin-bottom",svgIcon:e.pinBottomIcon,data:{action:"PinBottomCommand"}},[t.GridContextMenuItemNames.unpin]:{name:"unpin",text:"Unpin",icon:"unpin",svgIcon:e.unpinIcon,data:{action:"UnpinCommand"}},[t.GridContextMenuItemNames.copySelection]:{name:"copySelection",text:"Copy selection",icon:"page-header-section",svgIcon:e.pageHeaderSectionIcon,data:{action:"CopySelectionCommand"},options:"withHeaders"},[t.GridContextMenuItemNames.copySelectionNoHeaders]:{name:"copySelectionNoHeaders",text:"Copy selection (No Headers)",icon:"file-txt",svgIcon:e.fileTxtIcon,data:{action:"CopySelectionCommand"}},[t.GridContextMenuItemNames.paste]:{name:"paste",text:"Paste (use CTRL/⌘ + V)",icon:"clipboard",svgIcon:e.clipboardIcon,data:{action:"PasteCommand"}},[t.GridContextMenuItemNames.reorderRow]:{name:"reorderRow",text:"Reorder row",icon:"caret-alt-expand",svgIcon:e.caretAltExpandIcon,items:[{name:"reorderRowUp",text:"Up",icon:"chevron-up",svgIcon:e.chevronUpIcon,data:{action:"ReorderRowCommand"}},{name:"reorderRowDown",text:"Down",icon:"chevron-down",svgIcon:e.chevronDownIcon,data:{action:"ReorderRowCommand"}},{name:"reorderRowTop",text:"Top",icon:"chevron-double-up",svgIcon:e.chevronDoubleUpIcon,data:{action:"ReorderRowCommand"}},{name:"reorderRowBottom",text:"Bottom",icon:"chevron-double-down",svgIcon:e.chevronDoubleDownIcon,data:{action:"ReorderRowCommand"}}]},[t.GridContextMenuItemNames.exportPDF]:{name:"exportPDF",text:"Export to PDF",icon:"file-pdf",svgIcon:e.filePdfIcon,data:{action:"ExportPDFCommand"}},[t.GridContextMenuItemNames.exportExcel]:{name:"exportExcel",text:"Export to Excel",icon:"file-excel",svgIcon:e.fileExcelIcon,items:[{name:"exportToExcelAll",text:"All",data:{action:"ExportExcelCommand"}},{name:"exportToExcelSelection",text:"Selection",data:{action:"ExportExcelCommand"},options:"selection,withHeaders"},{name:"exportToExcelSelectionNoHeaders",text:"Selection (No Headers)",data:{action:"ExportExcelCommand"},options:"selection"}]},[t.GridContextMenuItemNames.separator]:{name:"separator",separator:!0},[t.GridContextMenuItemNames.sortAsc]:{name:"sortAsc",text:"Sort Ascending",icon:"sort-asc-small",svgIcon:e.sortAscSmallIcon,data:{action:"SortCommand"}},[t.GridContextMenuItemNames.sortDesc]:{name:"sortDesc",text:"Sort Descending",icon:"sort-desc-small",svgIcon:e.sortDescSmallIcon,data:{action:"SortCommand"}}},b=n=>{const{show:i,offset:c,dataItem:r,field:l,items:m,onClose:u,onSelect:p}=n,x=S.useLocalization(),C=s.useCallback(a=>{p.call(void 0,{event:a,dataItem:r,field:l})},[p,r,l]),d=s.useCallback(a=>{const o=a;return o.text&&o.name&&(o.text=x.toLanguageString(`contextMenu.${o.name}`,o.text||"")),o.items&&Array.isArray(o.items)&&(o.items=o.items.map(v=>d(v))),o},[x]),g=s.useMemo(()=>m&&m.map(a=>{const o=typeof a=="string"?I[a]:a;return d(o)}),[m,d]);return s.createElement(M.ContextMenu,{show:i,offset:c,items:g,onClose:u,onSelect:C})};exports.GridContextMenu=b;exports.contextMenuItemsMap=I;