@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.62 kB
JavaScript
/**
* @license
*-------------------------------------------------------------------------------------------
* Copyright © 2025 Progress Software Corporation. All rights reserved.
* Licensed under commercial license. See LICENSE.md in the package root for more information
*-------------------------------------------------------------------------------------------
*/
;Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("@progress/kendo-pivotgrid-common"),g=(e,t,r)=>{const n=JSON.parse(JSON.stringify(e||[])),a=JSON.parse(JSON.stringify(t||[])),o=JSON.parse(JSON.stringify(r||[])),s=c.toTree(n),[,u,d]=c.toRows(s),f=c.toTree(a),[,p,,m]=c.toColumns(f);return c.toData(o,p,u,m,d)},h=(e=[],t={},r=null)=>e.map(n=>{const a={dataItem:n};return Object.keys(t).forEach(o=>{a[o]=t[o](a,r)}),a}),i=(e=[])=>{let t=[...e];return(e||[]).forEach(r=>{t=t.concat(i(r.children))}),t},y=(e=[])=>{const t=new Set;return e.forEach(r=>{t.add(String(r.name))}),Array.from(t)},l=(e=[])=>`${e.join(",")}`,O=(e,t)=>`${l(e.map(r=>r.name))}|${l(t.map(r=>r.name))}`,S=(e,t,r)=>{if(!e)return;let n=0,a;const o=e.length;let s;for(;n<o;n++)s=e[n].operator,s===r&&e[n].field===t&&(a=e[n]);return a},F=(e,t,r)=>{if(!e)return[];let n=0;const a=[],o=e.length;let s;for(;n<o;n++)s=e[n].operator,(!r&&s!=="in"||s===r)&&e[n].field===t&&a.push(e[n]);return a},N=(e,t)=>e.uniqueName===t.uniqueName;exports.compareFields=N;exports.dataCells=g;exports.extractDefaultFields=y;exports.findFilter=S;exports.findFilters=F;exports.flatMap=i;exports.generateDataKey=O;exports.generateKey=l;exports.recursiveMap=h;