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) 2.59 kB
/** * @license *------------------------------------------------------------------------------------------- * Copyright © 2026 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 m=require("react"),a=require("@progress/kendo-react-layout"),d=require("@progress/kendo-react-common"),v=require("../../utils/GridContext.js"),f=require("@progress/kendo-react-buttons"),g=require("@progress/kendo-svg-icons"),h=require("../adaptiveContext/GridColumnMenuAdaptiveContext.js"),p=require("@progress/kendo-react-intl"),r=require("../../messages/index.js");function C(t){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const o in t)if(o!=="default"){const i=Object.getOwnPropertyDescriptor(t,o);Object.defineProperty(n,o,i.get?i:{enumerable:!0,get:()=>t[o]})}}return n.default=t,Object.freeze(n)}const e=C(m),k=t=>{const n=e.useContext(v.GridContext),{actionSheetRef:o,firstViewRef:i,secondViewRef:s}=e.useContext(h.GridColumnMenuAdaptiveContext),c=d.useAdaptiveModeContext(),l=p.useLocalization(),u={animation:!0,navigatable:!1,navigatableElements:[],expand:t.computedShow,animationStyles:c&&n.adaptiveColumnMenuRef<=c.small?{top:0,width:"100%",height:"100%"}:void 0,className:"k-adaptive-actionsheet",position:c&&n.adaptiveColumnMenuRef<=c.small?"fullscreen":void 0};return e.createElement(a.ActionSheet,{...u,ref:o,style:{"--kendo-actionsheet-view-current":1},onClose:()=>{t.closeMenu()}},e.createElement(a.ActionSheetView,{className:"k-actionsheet-view-animated",ref:i,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"},n.adaptiveTitle||l.toLanguageString(r.columnMenu,r.messages[r.columnMenu]))),e.createElement("div",{className:"k-actionsheet-actions"},e.createElement(f.Button,{svgIcon:g.xIcon,onClick:t.closeMenu,fillMode:"flat"})))),e.createElement(a.ActionSheetContent,null,e.createElement("div",{className:"k-column-menu k-column-menu-lg"},t.children))),e.createElement(a.ActionSheetView,{className:"k-actionsheet-view-animated",ref:s,style:{transitionDuration:"500ms",transitionProperty:"transform"}}))};exports.GridAdaptiveColumnMenu=k;