UNPKG

@progress/kendo-react-grid

Version:

React Data Grid (Table) provides 100+ ready-to-use data grid features. KendoReact Grid package

10 lines (9 loc) 1.44 kB
/** * @license *------------------------------------------------------------------------------------------- * Copyright © 2025 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the package root for more information *------------------------------------------------------------------------------------------- */ "use client"; "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("react"),i=require("@progress/kendo-react-common"),f=require("../utils/GridContext.js"),a=require("@progress/kendo-svg-icons");function p(n){const c=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const e in n)if(e!=="default"){const o=Object.getOwnPropertyDescriptor(n,e);Object.defineProperty(c,e,o.get?o:{enumerable:!0,get:()=>n[e]})}}return c.default=n,Object.freeze(c)}const r=p(d),I=n=>{const{title:c,iconClass:e,svgIcon:o,selected:u,expandable:s,expanded:m}=n,t=r.useContext(f.GridContext);let l;return s&&(t!=null&&t.mobileMode?l=(t==null?void 0:t.dir)==="rtl"?a.chevronLeftIcon:a.chevronRightIcon:l=m?a.chevronUpIcon:a.chevronDownIcon),r.createElement("div",{onClick:n.onClick,className:`k-columnmenu-item ${u?"k-selected":""}`},(e||o)&&r.createElement(i.IconWrap,{name:e&&i.toIconName(e),icon:o}),c,r.createElement("span",{className:"k-spacer"}),s&&r.createElement(i.IconWrap,{icon:l}))};exports.GridColumnMenuItem=I;