UNPKG

@progress/kendo-react-gantt

Version:

React Gantt enables the display of self-referencing tabular data with many features. KendoReact Gantt package

9 lines (8 loc) 1.34 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 strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react"),u=require("@progress/kendo-react-buttons"),s=require("@progress/kendo-react-intl"),m=require("../../../context/GanttContext.js");function d(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const i=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,i.get?i:{enumerable:!0,get:()=>e[t]})}}return n.default=e,Object.freeze(n)}const c=d(r),o=e=>{const[n,t]=m.useGanttActiveViewContext(),i=s.useLocalization(),a=c.useMemo(()=>typeof e.view.title=="function"?e.view.title.call(void 0,i):e.view.title,[e.view.title,i]),l=c.useCallback(()=>{e.view.name&&t(e.view.name)},[t,e.view.name]);return c.createElement(u.Button,{role:"button",type:"button",tabIndex:-1,togglable:!0,selected:e.view.name===n,onClick:l},a)};o.displayName="KendoReactGanttViewSelectorItem";exports.ViewSelectorItem=o;