UNPKG

@progress/kendo-react-pivotgrid

Version:

React PivotGrid (also called Pivot Table) can be data-bound to an OLAP service and customized extensively. KendoReact PivotGrid package

9 lines (8 loc) 1.75 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 x=require("react"),P=require("@progress/kendo-react-buttons"),m=require("@progress/kendo-react-common"),g=require("./EditorContext.js"),C=require("./AxisEditor.js");function R(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,o.get?o:{enumerable:!0,get:()=>e[n]})}}return r.default=e,Object.freeze(r)}const t=R(x),c=t.forwardRef((e,r)=>{const{value:n,field:o}={...a,...e},s=t.useRef(null),l=t.useRef(null),u=t.useRef(null),[d,f]=m.useCustomComponent(e.chipList||a.chipList);t.useImperativeHandle(l,()=>s.current&&s.current.element),t.useImperativeHandle(u,()=>({props:e,element:l.current})),t.useImperativeHandle(r,()=>u.current);const p=n.filter(i=>i.name.length===1&&i.name.every(v=>v.indexOf("&")===-1)).map(i=>({...i,text:String(i.name)}));return t.createElement(g.PivotGridConfiguratorEditorAxesContext.Provider,{value:{axes:o}},t.createElement(d,{ref:m.canUseRef(d)?s:void 0,textField:"text",valueField:"name",data:p,chip:C.PivotGridAxisEditor,style:{position:"relative"},className:e.className,selection:"none",...f}))}),a={value:[],chipList:P.ChipList};c.defaultProps=a;c.displayName="KendoReactPivotGridAxesEditor";exports.PivotGridAxesEditor=c;