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.79 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 p=require("react"),d=require("@progress/kendo-react-intl"),m=require("@progress/kendo-react-buttons"),k=require("./ViewSelectorItem.js"),c=require("../../../context/GanttContext.js"),i=require("../../../messages/index.js");function f(t){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const r in t)if(r!=="default"){const a=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(o,r,a.get?a:{enumerable:!0,get:()=>t[r]})}}return o.default=t,Object.freeze(o)}const n=f(p),s=n.forwardRef(()=>{const t=c.useGanttViewsContext(),[o,r]=c.useGanttActiveViewContext(),a=d.useLocalization(),l=e=>a.toLanguageString(e,i.messages[e]),u=n.useCallback(e=>{r&&(e.preventDefault(),r(e.target.value))},[r]);return n.createElement("div",{className:"k-gantt-views-wrapper"},n.createElement(m.ButtonGroup,{className:"k-gantt-views"},t.map(e=>n.createElement(k.ViewSelectorItem,{key:e.props.name,view:e.props}))),n.createElement("select",{value:o,onChange:u,"aria-label":l(i.viewSelector),className:"k-picker k-picker-solid k-dropdown-list k-dropdown k-views-dropdown k-rounded-md"},t.map(e=>n.createElement("option",{key:e.props.name,value:e.props.name},typeof e.props.title=="function"?e.props.title.call(void 0,a):e.props.title))))});s.displayName="KendoReactGanttViewSelectorList";exports.ViewSelectorList=s;