@progress/kendo-react-pivotgrid 9.4.0-develop.6 → 9.4.0-develop.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/PivotGrid.js +1 -1
  2. package/PivotGrid.mjs +56 -45
  3. package/components/AxesEditor.js +1 -1
  4. package/components/AxesEditor.mjs +3 -4
  5. package/components/AxisEditor.js +1 -1
  6. package/components/AxisEditor.mjs +0 -1
  7. package/components/AxisFilterFieldsEditor.js +1 -1
  8. package/components/AxisFilterFieldsEditor.mjs +19 -20
  9. package/components/Cell.js +1 -1
  10. package/components/Cell.mjs +0 -1
  11. package/components/Column.js +1 -1
  12. package/components/Column.mjs +10 -11
  13. package/components/Configurator.js +1 -1
  14. package/components/Configurator.mjs +0 -1
  15. package/components/ConfiguratorButton.js +1 -1
  16. package/components/ConfiguratorButton.mjs +0 -1
  17. package/components/ConfiguratorEditor.js +1 -1
  18. package/components/ConfiguratorEditor.mjs +0 -1
  19. package/components/Container.js +1 -1
  20. package/components/Container.mjs +4 -5
  21. package/components/EditorContext.js +1 -1
  22. package/components/EditorContext.mjs +2 -3
  23. package/components/FieldsEditor.js +1 -1
  24. package/components/FieldsEditor.mjs +0 -1
  25. package/components/HeaderCell.js +1 -1
  26. package/components/HeaderCell.mjs +7 -8
  27. package/components/Row.js +1 -1
  28. package/components/Row.mjs +7 -8
  29. package/dist/cdn/js/kendo-react-pivotgrid.js +1 -1
  30. package/hooks/useExpansion.js +1 -1
  31. package/hooks/useExpansion.mjs +11 -12
  32. package/hooks/useHeaders.js +1 -1
  33. package/hooks/useHeaders.mjs +7 -8
  34. package/hooks/useHorizontalScrollSync.js +1 -1
  35. package/hooks/useHorizontalScrollSync.mjs +4 -5
  36. package/hooks/usePivotConfiguratorEditor.js +1 -1
  37. package/hooks/usePivotConfiguratorEditor.mjs +5 -6
  38. package/hooks/usePivotLocalDataService.js +1 -1
  39. package/hooks/usePivotLocalDataService.mjs +10 -11
  40. package/hooks/usePivotOLAPService.js +1 -1
  41. package/hooks/usePivotOLAPService.mjs +0 -1
  42. package/hooks/useVerticalScrollSync.js +1 -1
  43. package/hooks/useVerticalScrollSync.mjs +5 -6
  44. package/index.js +2 -1
  45. package/index.mjs +4 -4
  46. package/messages/index.js +1 -1
  47. package/messages/index.mjs +5 -6
  48. package/package-metadata.js +1 -1
  49. package/package-metadata.mjs +2 -3
  50. package/package.json +10 -10
  51. package/shared/PivotGridConfiguratorEditorEventsContext.js +1 -1
  52. package/shared/PivotGridConfiguratorEditorEventsContext.mjs +0 -1
  53. package/shared/PivotGridConfiguratorEditorStateContext.js +1 -1
  54. package/shared/PivotGridConfiguratorEditorStateContext.mjs +2 -3
  55. package/utils/index.js +1 -1
  56. package/utils/index.mjs +0 -1
package/PivotGrid.js CHANGED
@@ -5,4 +5,4 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Re=require("react"),c=require("@progress/kendo-react-common"),He=require("./package-metadata.js"),Se=require("@progress/kendo-react-intl"),O=require("./messages/index.js"),ke=require("./components/Row.js"),Pe=require("./components/Cell.js"),J=require("./hooks/useHeaders.js"),xe=require("./components/HeaderCell.js"),Ae=require("./hooks/useHorizontalScrollSync.js"),Te=require("./hooks/useVerticalScrollSync.js"),Ne=require("./components/Column.js"),f=require("./utils/index.js"),u=require("@progress/kendo-pivotgrid-common");function De(n){const w=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const m in n)if(m!=="default"){const v=Object.getOwnPropertyDescriptor(n,m);Object.defineProperty(w,m,v.get?v:{enumerable:!0,get:()=>n[m]})}}return w.default=n,Object.freeze(w)}const t=De(Re),Q=t.forwardRef((n,w)=>{c.validatePackage(He.packageMetadata);const{rows:m,rowAxes:v,columns:U,columnAxes:Y,data:Z}={...y,...n},s=t.useRef(null),E=t.useRef(null),d=t.useRef(null),b=t.useRef(null),q=t.useRef(null),z=t.useRef(null),k=t.useRef(null),ee=Se.useLocalization(),te=(e,r)=>{n.onRowAxesChange&&n.onRowAxesChange({value:e,target:E.current,syntheticEvent:r})},ne=(e,r)=>{n.onColumnAxesChange&&n.onColumnAxesChange({value:e,target:E.current,syntheticEvent:r})},I=u.toTree((m||[]).slice()),[,ae]=J.useHeaders((v||[]).slice(),I,te),[L,C,oe,G]=u.toRows(I),j=u.toTree((U||[]).slice()),[,re]=J.useHeaders((Y||[]).slice(),j,ne),[R,i,,K]=u.toColumns(j),P=u.toData((Z||[]).slice(),i,C,K,oe);t.useImperativeHandle(E,()=>({props:n,element:s.current,columnHeaderRows:R,rowHeaderRows:L,dataCells:P,rowHeaderBreadth:G,columnHeaderBreadth:K})),t.useImperativeHandle(w,()=>E.current);const B=[],V=[],_=[],[x,A]=c.useCustomComponent(n.row||y.row),[T,N]=c.useCustomComponent(n.column||y.column),[le,se]=c.useCustomComponent(n.cell||y.cell),[M,W]=c.useCustomComponent(n.headerCell||y.headerCell),ce=n.columnHeadersRow||x,ie=n.columnHeadersColumn||T,ue=n.columnHeadersCell||M,de=n.rowHeadersRow||x,me=n.rowHeadersColumn||T,Ce=n.rowHeadersCell||M,pe=n.dataRow||x,he=n.dataColumn||T;for(let e=0;e<i.length;e++)B.push(t.createElement(he,{key:String(i[e].path),...N,path:i[e].path})),_.push(t.createElement(ie,{key:String(i[e].path),...N,path:i[e].path}));for(let e=0;e<G;e++)V.push(t.createElement(me,{key:e,...N}));const ge=e=>{e.target.props.expandable&&re({type:u.HEADERS_ACTION.toggle,payload:e.target.props.dataItem.path},e.syntheticEvent)},fe=e=>{e.target.props.expandable&&ae({type:u.HEADERS_ACTION.toggle,payload:e.target.props.dataItem.path},e.syntheticEvent)},X=Ae.useHorizontalScrollSync(k,z),we=Te.useVerticalScrollSync(k,q),be=e=>{X(e),we(e)},$=t.useCallback(()=>{s.current&&b.current&&(s.current.style.gridTemplateRows="",s.current.style.gridTemplateRows=`${b.current.offsetHeight}px 1fr`)},[]),F=t.useCallback(()=>{s.current&&d.current&&(s.current.style.gridTemplateColumns="",s.current.style.gridTemplateColumns=`${d.current.offsetWidth}px 1fr`)},[]),p=t.useRef(new u.PivotGridNavigation({tabIndex:n.tabIndex||0}));t.useEffect(()=>{if(s.current){const e=n.tabIndex||0;if(p.current.stop(),p.current.tabIndex=e,n.navigatable){p.current.start(s.current);const r=p.current.first;r&&r.setAttribute("tabindex",String(e))}}return()=>{p.current.stop()}},[n.tabIndex,n.navigatable]),t.useEffect(()=>{p.current.update()}),t.useEffect(()=>{if(b.current){const e=new window.ResizeObserver($);return e.observe(b.current),()=>{e.disconnect()}}},[$]),t.useEffect(()=>{if(d.current){const e=new window.ResizeObserver(F);return e.observe(d.current),()=>{e.disconnect()}}},[F]),c.useIsomorphicLayoutEffect(()=>{if(c.setScrollbarWidth(),d.current){const e=new window.ResizeObserver(()=>c.setScrollbarWidth());return e.observe(d.current),()=>{e.disconnect()}}},[]);const h=new Array(R.length).fill([]).map(()=>new Array(i.length));R.forEach((e,r)=>{let a=0;Array.from(e.cells).forEach(o=>{const l=!!(o&&o.children&&o.children.length),D=(o?f.generateKey(o.normalizedPath)+(o.total?"|[TOTAL]":"")+(l?"|[EXPANDED]":""):"").replace(/\s/g,"-");if(o)for(let S=0;S<(o.colSpan||1);S++){for(let g=0;g<(o.rowSpan||1);g++){const ye=h[r+g].findIndex((ve,Ee)=>Ee>=a&&!ve);h[r+g][ye]=D}a++}})});const H=P.map(e=>e.cells.map(r=>f.generateDataKey(r.rowTuple.members,r.columnTuple.members).replace(/\s/g,"-")));return t.createElement("div",{ref:s,id:n.id,style:n.style,tabIndex:n.navigatable?void 0:n.tabIndex,className:c.classNames("k-pivotgrid",n.className),role:"grid"},t.createElement("span",{className:"k-pivotgrid-empty-cell"},t.createElement("span",{className:"k-sr-only"},ee.toLanguageString(O.emptyCellAriaLabel,O.messages[O.emptyCellAriaLabel]))),t.createElement("div",{ref:z,className:"k-pivotgrid-column-headers",onScroll:X},t.createElement("table",{ref:b,className:"k-pivotgrid-table",role:"none"},t.createElement("colgroup",null,_),t.createElement("tbody",{className:"k-pivotgrid-tbody",role:"rowgroup"},R.map((e,r)=>{let a=!1;return t.createElement(ce,{key:e.name,role:"row",...A},e.cells.map((o,l)=>{const D=l!==0&&!a;o&&(a=!0);const S=o&&!!(o.children&&o.children.length),g=o&&o.hasChildren&&(!o.total||o.total&&o.parent.total);return o?t.createElement(ue,{...W,key:h[r][l],"data-key":h[r][l],id:h[r][l],columnPath:o.normalizedPath,rowSpan:o.rowSpan||void 0,colSpan:o.colSpan||void 0,onIconClick:ge,dataItem:o,expanded:S,expandable:g,total:o.total,first:D,root:o.levelNum===0,role:"columnheader"},o.caption):null}))})))),t.createElement("div",{ref:q,className:"k-pivotgrid-row-headers"},t.createElement("table",{ref:d,className:"k-pivotgrid-table",role:"none"},t.createElement("colgroup",null,V),t.createElement("tbody",{className:"k-pivotgrid-tbody",role:"rowgroup"},L.map((e,r)=>t.createElement(de,{key:f.generateKey(C[r].path),...A,path:C[r].path,role:"row",ariaOwns:H[r].join(" ")},e.cells.filter(Boolean).map(a=>a?t.createElement(Ce,{...W,key:f.generateKey(a.normalizedPath)+(a.total?"|[TOTAL]":"")+(a.children&&a.children.length?"|[EXPANDED]":""),"data-key":f.generateKey(a.normalizedPath)+(a.total?"|[TOTAL]":"")+(a.children&&a.children.length?"|[EXPANDED]":""),rowPath:a.normalizedPath,rowSpan:a.rowSpan||void 0,colSpan:a.colSpan||void 0,dataItem:a,expanded:!!(a.children&&a.children.length),expandable:a.hasChildren&&!a.total,total:a.total,onIconClick:fe,root:a.levelNum===0,role:"rowheader"},a.caption):null)))))),t.createElement("div",{ref:k,className:"k-pivotgrid-values",onScroll:be},t.createElement("table",{className:"k-pivotgrid-table",role:"none"},t.createElement("colgroup",null,B),t.createElement("tbody",{className:"k-pivotgrid-tbody",role:"none"},P.map((e,r)=>t.createElement(pe,{key:f.generateKey(C[r].path),...A,path:C[r].path,role:"none"},e.cells.map((a,o)=>t.createElement(le,{key:H[r][o],"data-key":H[r][o],id:H[r][o],...se,rowPath:a.rowTuple.members.map(l=>l.name),columnPath:a.columnTuple.members.map(l=>l.name),dataItem:a,total:C[r].total||i[o].total,role:"gridcell",ariaDescribedby:h.map(l=>l[o]).join(" ")},a&&a.data&&a.data.fmtValue?a.data.fmtValue:" "))))))))}),y={rowAxes:[],columnAxes:[],data:[],row:ke.PivotGridRow,column:Ne.PivotGridColumn,cell:Pe.PivotGridCell,headerCell:xe.PivotGridHeaderCell};Q.displayName="KendoReactPivotGrid";exports.PivotGrid=Q;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Re=require("react"),c=require("@progress/kendo-react-common"),He=require("./package-metadata.js"),Se=require("@progress/kendo-react-intl"),D=require("./messages/index.js"),ke=require("./components/Row.js"),Pe=require("./components/Cell.js"),J=require("./hooks/useHeaders.js"),Ae=require("./components/HeaderCell.js"),xe=require("./hooks/useHorizontalScrollSync.js"),Te=require("./hooks/useVerticalScrollSync.js"),Ne=require("./components/Column.js"),f=require("./utils/index.js"),u=require("@progress/kendo-pivotgrid-common");function qe(n){const w=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const m in n)if(m!=="default"){const v=Object.getOwnPropertyDescriptor(n,m);Object.defineProperty(w,m,v.get?v:{enumerable:!0,get:()=>n[m]})}}return w.default=n,Object.freeze(w)}const t=qe(Re),Q=t.forwardRef((n,w)=>{c.validatePackage(He.packageMetadata);const{rows:m,rowAxes:v,columns:U,columnAxes:Y,data:Z}={...y,...n},s=t.useRef(null),E=t.useRef(null),d=t.useRef(null),b=t.useRef(null),O=t.useRef(null),z=t.useRef(null),k=t.useRef(null),ee=Se.useLocalization(),te=(e,r)=>{n.onRowAxesChange&&n.onRowAxesChange({value:e,target:E.current,syntheticEvent:r})},ne=(e,r)=>{n.onColumnAxesChange&&n.onColumnAxesChange({value:e,target:E.current,syntheticEvent:r})},I=u.toTree((m||[]).slice()),[,ae]=J.useHeaders((v||[]).slice(),I,te),[L,C,oe,G]=u.toRows(I),j=u.toTree((U||[]).slice()),[,re]=J.useHeaders((Y||[]).slice(),j,ne),[R,i,,K]=u.toColumns(j),P=u.toData((Z||[]).slice(),i,C,K,oe);t.useImperativeHandle(E,()=>({props:n,element:s.current,columnHeaderRows:R,rowHeaderRows:L,dataCells:P,rowHeaderBreadth:G,columnHeaderBreadth:K})),t.useImperativeHandle(w,()=>E.current);const B=[],V=[],_=[],[A,x]=c.useCustomComponent(n.row||y.row),[T,N]=c.useCustomComponent(n.column||y.column),[le,se]=c.useCustomComponent(n.cell||y.cell),[M,F]=c.useCustomComponent(n.headerCell||y.headerCell),ce=n.columnHeadersRow||A,ie=n.columnHeadersColumn||T,ue=n.columnHeadersCell||M,de=n.rowHeadersRow||A,me=n.rowHeadersColumn||T,Ce=n.rowHeadersCell||M,pe=n.dataRow||A,he=n.dataColumn||T;for(let e=0;e<i.length;e++)B.push(t.createElement(he,{key:String(i[e].path),...N,path:i[e].path})),_.push(t.createElement(ie,{key:String(i[e].path),...N,path:i[e].path}));for(let e=0;e<G;e++)V.push(t.createElement(me,{key:e,...N}));const ge=e=>{e.target.props.expandable&&re({type:u.HEADERS_ACTION.toggle,payload:e.target.props.dataItem.path},e.syntheticEvent)},fe=e=>{e.target.props.expandable&&ae({type:u.HEADERS_ACTION.toggle,payload:e.target.props.dataItem.path},e.syntheticEvent)},W=xe.useHorizontalScrollSync(k,z),we=Te.useVerticalScrollSync(k,O),be=e=>{W(e),we(e)},X=t.useCallback(()=>{s.current&&b.current&&(s.current.style.gridTemplateRows="",s.current.style.gridTemplateRows=`${b.current.offsetHeight}px 1fr`)},[]),$=t.useCallback(()=>{s.current&&d.current&&(s.current.style.gridTemplateColumns="",s.current.style.gridTemplateColumns=`${d.current.offsetWidth}px 1fr`)},[]),p=t.useRef(new u.PivotGridNavigation({tabIndex:n.tabIndex||0}));t.useEffect(()=>{if(s.current){const e=n.tabIndex||0;if(p.current.stop(),p.current.tabIndex=e,n.navigatable){p.current.start(s.current);const r=p.current.first;r&&r.setAttribute("tabindex",String(e))}}return()=>{p.current.stop()}},[n.tabIndex,n.navigatable]),t.useEffect(()=>{p.current.update()}),t.useEffect(()=>{if(b.current){const e=new window.ResizeObserver(()=>{window.requestAnimationFrame(()=>{X()})});return e.observe(b.current),()=>{e.disconnect()}}},[X]),t.useEffect(()=>{if(d.current){const e=new window.ResizeObserver(()=>{window.requestAnimationFrame(()=>{$()})});return e.observe(d.current),()=>{e.disconnect()}}},[$]),c.useIsomorphicLayoutEffect(()=>{if(c.setScrollbarWidth(),d.current){const e=new window.ResizeObserver(()=>window.requestAnimationFrame(()=>{c.setScrollbarWidth()}));return e.observe(d.current),()=>{e.disconnect()}}},[]);const h=new Array(R.length).fill([]).map(()=>new Array(i.length));R.forEach((e,r)=>{let a=0;Array.from(e.cells).forEach(o=>{const l=!!(o&&o.children&&o.children.length),q=(o?f.generateKey(o.normalizedPath)+(o.total?"|[TOTAL]":"")+(l?"|[EXPANDED]":""):"").replace(/\s/g,"-");if(o)for(let S=0;S<(o.colSpan||1);S++){for(let g=0;g<(o.rowSpan||1);g++){const ye=h[r+g].findIndex((ve,Ee)=>Ee>=a&&!ve);h[r+g][ye]=q}a++}})});const H=P.map(e=>e.cells.map(r=>f.generateDataKey(r.rowTuple.members,r.columnTuple.members).replace(/\s/g,"-")));return t.createElement("div",{ref:s,id:n.id,style:n.style,tabIndex:n.navigatable?void 0:n.tabIndex,className:c.classNames("k-pivotgrid",n.className),role:"grid"},t.createElement("span",{className:"k-pivotgrid-empty-cell"},t.createElement("span",{className:"k-sr-only"},ee.toLanguageString(D.emptyCellAriaLabel,D.messages[D.emptyCellAriaLabel]))),t.createElement("div",{ref:z,className:"k-pivotgrid-column-headers",onScroll:W},t.createElement("table",{ref:b,className:"k-pivotgrid-table",role:"none"},t.createElement("colgroup",null,_),t.createElement("tbody",{className:"k-pivotgrid-tbody",role:"rowgroup"},R.map((e,r)=>{let a=!1;return t.createElement(ce,{key:e.name,role:"row",...x},e.cells.map((o,l)=>{const q=l!==0&&!a;o&&(a=!0);const S=o&&!!(o.children&&o.children.length),g=o&&o.hasChildren&&(!o.total||o.total&&o.parent.total);return o?t.createElement(ue,{...F,key:h[r][l],"data-key":h[r][l],id:h[r][l],columnPath:o.normalizedPath,rowSpan:o.rowSpan||void 0,colSpan:o.colSpan||void 0,onIconClick:ge,dataItem:o,expanded:S,expandable:g,total:o.total,first:q,root:o.levelNum===0,role:"columnheader"},o.caption):null}))})))),t.createElement("div",{ref:O,className:"k-pivotgrid-row-headers"},t.createElement("table",{ref:d,className:"k-pivotgrid-table",role:"none"},t.createElement("colgroup",null,V),t.createElement("tbody",{className:"k-pivotgrid-tbody",role:"rowgroup"},L.map((e,r)=>t.createElement(de,{key:f.generateKey(C[r].path),...x,path:C[r].path,role:"row",ariaOwns:H[r].join(" ")},e.cells.filter(Boolean).map(a=>a?t.createElement(Ce,{...F,key:f.generateKey(a.normalizedPath)+(a.total?"|[TOTAL]":"")+(a.children&&a.children.length?"|[EXPANDED]":""),"data-key":f.generateKey(a.normalizedPath)+(a.total?"|[TOTAL]":"")+(a.children&&a.children.length?"|[EXPANDED]":""),rowPath:a.normalizedPath,rowSpan:a.rowSpan||void 0,colSpan:a.colSpan||void 0,dataItem:a,expanded:!!(a.children&&a.children.length),expandable:a.hasChildren&&!a.total,total:a.total,onIconClick:fe,root:a.levelNum===0,role:"rowheader"},a.caption):null)))))),t.createElement("div",{ref:k,className:"k-pivotgrid-values",onScroll:be},t.createElement("table",{className:"k-pivotgrid-table",role:"none"},t.createElement("colgroup",null,B),t.createElement("tbody",{className:"k-pivotgrid-tbody",role:"none"},P.map((e,r)=>t.createElement(pe,{key:f.generateKey(C[r].path),...x,path:C[r].path,role:"none"},e.cells.map((a,o)=>t.createElement(le,{key:H[r][o],"data-key":H[r][o],id:H[r][o],...se,rowPath:a.rowTuple.members.map(l=>l.name),columnPath:a.columnTuple.members.map(l=>l.name),dataItem:a,total:C[r].total||i[o].total,role:"gridcell",ariaDescribedby:h.map(l=>l[o]).join(" ")},a&&a.data&&a.data.fmtValue?a.data.fmtValue:" "))))))))}),y={rowAxes:[],columnAxes:[],data:[],row:ke.PivotGridRow,column:Ne.PivotGridColumn,cell:Pe.PivotGridCell,headerCell:Ae.PivotGridHeaderCell};Q.displayName="KendoReactPivotGrid";exports.PivotGrid=Q;
package/PivotGrid.mjs CHANGED
@@ -5,22 +5,21 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- "use client";
9
8
  import * as t from "react";
10
- import { validatePackage as He, useCustomComponent as y, useIsomorphicLayoutEffect as ke, setScrollbarWidth as $, classNames as Se } from "@progress/kendo-react-common";
9
+ import { validatePackage as He, useCustomComponent as y, useIsomorphicLayoutEffect as ke, setScrollbarWidth as j, classNames as Se } from "@progress/kendo-react-common";
11
10
  import { packageMetadata as xe } from "./package-metadata.mjs";
12
- import { useLocalization as Pe } from "@progress/kendo-react-intl";
13
- import { emptyCellAriaLabel as M, messages as Ae } from "./messages/index.mjs";
11
+ import { useLocalization as Ae } from "@progress/kendo-react-intl";
12
+ import { emptyCellAriaLabel as W, messages as Pe } from "./messages/index.mjs";
14
13
  import { PivotGridRow as Ne } from "./components/Row.mjs";
15
14
  import { PivotGridCell as Te } from "./components/Cell.mjs";
16
- import { useHeaders as _ } from "./hooks/useHeaders.mjs";
15
+ import { useHeaders as $ } from "./hooks/useHeaders.mjs";
17
16
  import { PivotGridHeaderCell as De } from "./components/HeaderCell.mjs";
18
17
  import { useHorizontalScrollSync as ze } from "./hooks/useHorizontalScrollSync.mjs";
19
18
  import { useVerticalScrollSync as Le } from "./hooks/useVerticalScrollSync.mjs";
20
19
  import { PivotGridColumn as Ie } from "./components/Column.mjs";
21
20
  import { generateKey as f, generateDataKey as Oe } from "./utils/index.mjs";
22
- import { toTree as q, toRows as Ge, toColumns as Be, toData as Ve, PivotGridNavigation as Ke, HEADERS_ACTION as F } from "@progress/kendo-pivotgrid-common";
23
- const Xe = t.forwardRef((n, J) => {
21
+ import { toTree as M, toRows as Ge, toColumns as Be, toData as Ve, PivotGridNavigation as qe, HEADERS_ACTION as _ } from "@progress/kendo-pivotgrid-common";
22
+ const Fe = t.forwardRef((n, J) => {
24
23
  He(xe);
25
24
  const {
26
25
  rows: Q,
@@ -28,37 +27,37 @@ const Xe = t.forwardRef((n, J) => {
28
27
  columns: Y,
29
28
  columnAxes: Z,
30
29
  data: ee
31
- } = { ...C, ...n }, s = t.useRef(null), g = t.useRef(null), i = t.useRef(null), h = t.useRef(null), A = t.useRef(null), N = t.useRef(null), E = t.useRef(null), te = Pe(), oe = (e, r) => {
30
+ } = { ...C, ...n }, s = t.useRef(null), w = t.useRef(null), i = t.useRef(null), h = t.useRef(null), P = t.useRef(null), N = t.useRef(null), E = t.useRef(null), te = Ae(), oe = (e, r) => {
32
31
  n.onRowAxesChange && n.onRowAxesChange({
33
32
  value: e,
34
- target: g.current,
33
+ target: w.current,
35
34
  syntheticEvent: r
36
35
  });
37
36
  }, ae = (e, r) => {
38
37
  n.onColumnAxesChange && n.onColumnAxesChange({
39
38
  value: e,
40
- target: g.current,
39
+ target: w.current,
41
40
  syntheticEvent: r
42
41
  });
43
- }, T = q((Q || []).slice()), [, ne] = _((U || []).slice(), T, oe), [D, c, re, z] = Ge(T), L = q((Y || []).slice()), [, le] = _((Z || []).slice(), L, ae), [w, m, , I] = Be(L), R = Ve(
42
+ }, T = M((Q || []).slice()), [, ne] = $((U || []).slice(), T, oe), [D, c, re, z] = Ge(T), L = M((Y || []).slice()), [, le] = $((Z || []).slice(), L, ae), [g, m, , I] = Be(L), R = Ve(
44
43
  (ee || []).slice(),
45
44
  m,
46
45
  c,
47
46
  I,
48
47
  re
49
48
  );
50
- t.useImperativeHandle(g, () => ({
49
+ t.useImperativeHandle(w, () => ({
51
50
  props: n,
52
51
  element: s.current,
53
- columnHeaderRows: w,
52
+ columnHeaderRows: g,
54
53
  rowHeaderRows: D,
55
54
  dataCells: R,
56
55
  rowHeaderBreadth: z,
57
56
  columnHeaderBreadth: I
58
- })), t.useImperativeHandle(J, () => g.current);
57
+ })), t.useImperativeHandle(J, () => w.current);
59
58
  const O = [], G = [], B = [], [H, k] = y(n.row || C.row), [S, x] = y(
60
59
  n.column || C.column
61
- ), [se, me] = y(n.cell || C.cell), [V, K] = y(
60
+ ), [se, me] = y(n.cell || C.cell), [V, q] = y(
62
61
  n.headerCell || C.headerCell
63
62
  ), ie = n.columnHeadersRow || H, ce = n.columnHeadersColumn || S, de = n.columnHeadersCell || V, ue = n.rowHeadersRow || H, pe = n.rowHeadersColumn || S, he = n.rowHeadersCell || V, fe = n.dataRow || H, Ce = n.dataColumn || S;
64
63
  for (let e = 0; e < m.length; e++)
@@ -83,29 +82,29 @@ const Xe = t.forwardRef((n, J) => {
83
82
  );
84
83
  for (let e = 0; e < z; e++)
85
84
  G.push(/* @__PURE__ */ t.createElement(pe, { key: e, ...x }));
86
- const ge = (e) => {
85
+ const we = (e) => {
87
86
  e.target.props.expandable && le(
88
87
  {
89
- type: F.toggle,
88
+ type: _.toggle,
90
89
  payload: e.target.props.dataItem.path
91
90
  },
92
91
  e.syntheticEvent
93
92
  );
94
- }, we = (e) => {
93
+ }, ge = (e) => {
95
94
  e.target.props.expandable && ne(
96
95
  {
97
- type: F.toggle,
96
+ type: _.toggle,
98
97
  payload: e.target.props.dataItem.path
99
98
  },
100
99
  e.syntheticEvent
101
100
  );
102
- }, X = ze(E, N), be = Le(E, A), ve = (e) => {
103
- X(e), be(e);
104
- }, j = t.useCallback(() => {
101
+ }, F = ze(E, N), be = Le(E, P), ve = (e) => {
102
+ F(e), be(e);
103
+ }, K = t.useCallback(() => {
105
104
  s.current && h.current && (s.current.style.gridTemplateRows = "", s.current.style.gridTemplateRows = `${h.current.offsetHeight}px 1fr`);
106
- }, []), W = t.useCallback(() => {
105
+ }, []), X = t.useCallback(() => {
107
106
  s.current && i.current && (s.current.style.gridTemplateColumns = "", s.current.style.gridTemplateColumns = `${i.current.offsetWidth}px 1fr`);
108
- }, []), d = t.useRef(new Ke({ tabIndex: n.tabIndex || 0 }));
107
+ }, []), d = t.useRef(new qe({ tabIndex: n.tabIndex || 0 }));
109
108
  t.useEffect(() => {
110
109
  if (s.current) {
111
110
  const e = n.tabIndex || 0;
@@ -122,38 +121,50 @@ const Xe = t.forwardRef((n, J) => {
122
121
  d.current.update();
123
122
  }), t.useEffect(() => {
124
123
  if (h.current) {
125
- const e = new window.ResizeObserver(j);
124
+ const e = new window.ResizeObserver(() => {
125
+ window.requestAnimationFrame(() => {
126
+ K();
127
+ });
128
+ });
126
129
  return e.observe(h.current), () => {
127
130
  e.disconnect();
128
131
  };
129
132
  }
130
- }, [j]), t.useEffect(() => {
133
+ }, [K]), t.useEffect(() => {
131
134
  if (i.current) {
132
- const e = new window.ResizeObserver(W);
135
+ const e = new window.ResizeObserver(() => {
136
+ window.requestAnimationFrame(() => {
137
+ X();
138
+ });
139
+ });
133
140
  return e.observe(i.current), () => {
134
141
  e.disconnect();
135
142
  };
136
143
  }
137
- }, [W]), ke(() => {
138
- if ($(), i.current) {
139
- const e = new window.ResizeObserver(() => $());
144
+ }, [X]), ke(() => {
145
+ if (j(), i.current) {
146
+ const e = new window.ResizeObserver(
147
+ () => window.requestAnimationFrame(() => {
148
+ j();
149
+ })
150
+ );
140
151
  return e.observe(i.current), () => {
141
152
  e.disconnect();
142
153
  };
143
154
  }
144
155
  }, []);
145
- const u = new Array(w.length).fill([]).map(() => new Array(m.length));
146
- w.forEach((e, r) => {
156
+ const u = new Array(g.length).fill([]).map(() => new Array(m.length));
157
+ g.forEach((e, r) => {
147
158
  let o = 0;
148
159
  Array.from(e.cells).forEach((a) => {
149
- const l = !!(a && a.children && a.children.length), P = (a ? f(a.normalizedPath) + (a.total ? "|[TOTAL]" : "") + (l ? "|[EXPANDED]" : "") : "").replace(/\s/g, "-");
160
+ const l = !!(a && a.children && a.children.length), A = (a ? f(a.normalizedPath) + (a.total ? "|[TOTAL]" : "") + (l ? "|[EXPANDED]" : "") : "").replace(/\s/g, "-");
150
161
  if (a)
151
162
  for (let v = 0; v < (a.colSpan || 1); v++) {
152
163
  for (let p = 0; p < (a.rowSpan || 1); p++) {
153
164
  const ye = u[r + p].findIndex(
154
165
  (Ee, Re) => Re >= o && !Ee
155
166
  );
156
- u[r + p][ye] = P;
167
+ u[r + p][ye] = A;
157
168
  }
158
169
  o++;
159
170
  }
@@ -172,29 +183,29 @@ const Xe = t.forwardRef((n, J) => {
172
183
  className: Se("k-pivotgrid", n.className),
173
184
  role: "grid"
174
185
  },
175
- /* @__PURE__ */ t.createElement("span", { className: "k-pivotgrid-empty-cell" }, /* @__PURE__ */ t.createElement("span", { className: "k-sr-only" }, te.toLanguageString(M, Ae[M]))),
176
- /* @__PURE__ */ t.createElement("div", { ref: N, className: "k-pivotgrid-column-headers", onScroll: X }, /* @__PURE__ */ t.createElement("table", { ref: h, className: "k-pivotgrid-table", role: "none" }, /* @__PURE__ */ t.createElement("colgroup", null, B), /* @__PURE__ */ t.createElement("tbody", { className: "k-pivotgrid-tbody", role: "rowgroup" }, w.map((e, r) => {
186
+ /* @__PURE__ */ t.createElement("span", { className: "k-pivotgrid-empty-cell" }, /* @__PURE__ */ t.createElement("span", { className: "k-sr-only" }, te.toLanguageString(W, Pe[W]))),
187
+ /* @__PURE__ */ t.createElement("div", { ref: N, className: "k-pivotgrid-column-headers", onScroll: F }, /* @__PURE__ */ t.createElement("table", { ref: h, className: "k-pivotgrid-table", role: "none" }, /* @__PURE__ */ t.createElement("colgroup", null, B), /* @__PURE__ */ t.createElement("tbody", { className: "k-pivotgrid-tbody", role: "rowgroup" }, g.map((e, r) => {
177
188
  let o = !1;
178
189
  return /* @__PURE__ */ t.createElement(ie, { key: e.name, role: "row", ...k }, e.cells.map((a, l) => {
179
- const P = l !== 0 && !o;
190
+ const A = l !== 0 && !o;
180
191
  a && (o = !0);
181
192
  const v = a && !!(a.children && a.children.length), p = a && a.hasChildren && (!a.total || a.total && a.parent.total);
182
193
  return a ? /* @__PURE__ */ t.createElement(
183
194
  de,
184
195
  {
185
- ...K,
196
+ ...q,
186
197
  key: u[r][l],
187
198
  "data-key": u[r][l],
188
199
  id: u[r][l],
189
200
  columnPath: a.normalizedPath,
190
201
  rowSpan: a.rowSpan || void 0,
191
202
  colSpan: a.colSpan || void 0,
192
- onIconClick: ge,
203
+ onIconClick: we,
193
204
  dataItem: a,
194
205
  expanded: v,
195
206
  expandable: p,
196
207
  total: a.total,
197
- first: P,
208
+ first: A,
198
209
  root: a.levelNum === 0,
199
210
  role: "columnheader"
200
211
  },
@@ -202,7 +213,7 @@ const Xe = t.forwardRef((n, J) => {
202
213
  ) : null;
203
214
  }));
204
215
  })))),
205
- /* @__PURE__ */ t.createElement("div", { ref: A, className: "k-pivotgrid-row-headers" }, /* @__PURE__ */ t.createElement("table", { ref: i, className: "k-pivotgrid-table", role: "none" }, /* @__PURE__ */ t.createElement("colgroup", null, G), /* @__PURE__ */ t.createElement("tbody", { className: "k-pivotgrid-tbody", role: "rowgroup" }, D.map((e, r) => /* @__PURE__ */ t.createElement(
216
+ /* @__PURE__ */ t.createElement("div", { ref: P, className: "k-pivotgrid-row-headers" }, /* @__PURE__ */ t.createElement("table", { ref: i, className: "k-pivotgrid-table", role: "none" }, /* @__PURE__ */ t.createElement("colgroup", null, G), /* @__PURE__ */ t.createElement("tbody", { className: "k-pivotgrid-tbody", role: "rowgroup" }, D.map((e, r) => /* @__PURE__ */ t.createElement(
206
217
  ue,
207
218
  {
208
219
  key: f(c[r].path),
@@ -215,7 +226,7 @@ const Xe = t.forwardRef((n, J) => {
215
226
  (o) => o ? /* @__PURE__ */ t.createElement(
216
227
  he,
217
228
  {
218
- ...K,
229
+ ...q,
219
230
  key: f(o.normalizedPath) + (o.total ? "|[TOTAL]" : "") + (o.children && o.children.length ? "|[EXPANDED]" : ""),
220
231
  "data-key": f(o.normalizedPath) + (o.total ? "|[TOTAL]" : "") + (o.children && o.children.length ? "|[EXPANDED]" : ""),
221
232
  rowPath: o.normalizedPath,
@@ -225,7 +236,7 @@ const Xe = t.forwardRef((n, J) => {
225
236
  expanded: !!(o.children && o.children.length),
226
237
  expandable: o.hasChildren && !o.total,
227
238
  total: o.total,
228
- onIconClick: we,
239
+ onIconClick: ge,
229
240
  root: o.levelNum === 0,
230
241
  role: "rowheader"
231
242
  },
@@ -268,7 +279,7 @@ const Xe = t.forwardRef((n, J) => {
268
279
  cell: Te,
269
280
  headerCell: De
270
281
  };
271
- Xe.displayName = "KendoReactPivotGrid";
282
+ Fe.displayName = "KendoReactPivotGrid";
272
283
  export {
273
- Xe as PivotGrid
284
+ Fe as PivotGrid
274
285
  };
@@ -5,4 +5,4 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- "use client";"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;
8
+ "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;
@@ -5,7 +5,6 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- "use client";
9
8
  import * as e from "react";
10
9
  import { ChipList as v } from "@progress/kendo-react-buttons";
11
10
  import { useCustomComponent as x, canUseRef as h } from "@progress/kendo-react-common";
@@ -13,7 +12,7 @@ import { PivotGridConfiguratorEditorAxesContext as C } from "./EditorContext.mjs
13
12
  import { PivotGridAxisEditor as P } from "./AxisEditor.mjs";
14
13
  const l = e.forwardRef(
15
14
  (i, m) => {
16
- const { value: c, field: u } = { ...n, ...i }, r = e.useRef(null), o = e.useRef(null), s = e.useRef(null), [a, d] = x(
15
+ const { value: c, field: d } = { ...n, ...i }, r = e.useRef(null), o = e.useRef(null), s = e.useRef(null), [a, u] = x(
17
16
  i.chipList || n.chipList
18
17
  );
19
18
  e.useImperativeHandle(
@@ -24,7 +23,7 @@ const l = e.forwardRef(
24
23
  () => s.current
25
24
  );
26
25
  const p = c.filter((t) => t.name.length === 1 && t.name.every((f) => f.indexOf("&") === -1)).map((t) => ({ ...t, text: String(t.name) }));
27
- return /* @__PURE__ */ e.createElement(C.Provider, { value: { axes: u } }, /* @__PURE__ */ e.createElement(
26
+ return /* @__PURE__ */ e.createElement(C.Provider, { value: { axes: d } }, /* @__PURE__ */ e.createElement(
28
27
  a,
29
28
  {
30
29
  ref: h(a) ? r : void 0,
@@ -35,7 +34,7 @@ const l = e.forwardRef(
35
34
  style: { position: "relative" },
36
35
  className: i.className,
37
36
  selection: "none",
38
- ...d
37
+ ...u
39
38
  }
40
39
  ));
41
40
  }
@@ -5,4 +5,4 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const z=require("react"),v=require("@progress/kendo-pivotgrid-common"),u=require("@progress/kendo-react-common"),A=require("@progress/kendo-react-data-tools"),H=require("@progress/kendo-react-buttons"),T=require("../utils/index.js"),B=require("./EditorContext.js"),$=require("./AxisFilterFieldsEditor.js"),K=require("../shared/PivotGridConfiguratorEditorStateContext.js"),l=require("../hooks/usePivotConfiguratorEditor.js");function Z(e){const d=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const s in e)if(s!=="default"){const c=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(d,s,c.get?c:{enumerable:!0,get:()=>e[s]})}}return d.default=e,Object.freeze(d)}const n=Z(z),p=n.forwardRef((e,d)=>{const s=n.useRef(0),c=n.useRef(0),f=n.useRef(null),i=n.useRef(null),R=n.useRef(null),{axes:I}=n.useContext(B.PivotGridConfiguratorEditorAxesContext),[y,x]=n.useState(!1),[r,a]=n.useContext(K.PivotGridConfiguratorEditorStateContext);n.useImperativeHandle(i,()=>f.current&&f.current.element),n.useImperativeHandle(R,()=>({props:e,element:i.current})),n.useImperativeHandle(d,()=>R.current);const[F,N]=u.useCustomComponent(e.chip||m.chip),[h,E]=u.useCustomComponent(e.dropClue||m.dropClue),[_,M]=u.useCustomComponent(e.columnMenuTextColumn||m.columnMenuTextColumn),[D,G]=u.useCustomComponent(e.filterFieldsEditor||m.filterFieldsEditor),P=T.findFilters(r.filter,String(e.value),"in"),g=T.findFilters(r.filter,String(e.value)),S=(t,o)=>{a({type:l.PIVOT_CONFIGURATOR_ACTION.setSort,payload:o},t)},b=(t,o)=>{o.length?a({type:l.PIVOT_CONFIGURATOR_ACTION.setFilter,payload:[...P||[],...o.reduce((C,O)=>[...C,...O.filters.filter(w=>w.value)],[])]},t):a({type:l.PIVOT_CONFIGURATOR_ACTION.setFilter,payload:P},t)},q=t=>{a({type:l.PIVOT_CONFIGURATOR_ACTION.remove,payload:e.dataItem},t.syntheticEvent)},U=t=>{const o=t.slice(),C=T.findFilter(r.filter,String(e.dataItem.name),"in");return o.splice(1,0,n.createElement(D,{key:"axis-filter-fields-editor",defaultFilter:C,dataItem:e.dataItem,data:e.dataItem.fields,axes:I,...G})),o},V=t=>{s.current=t.clientX,c.current=t.clientY},k=t=>{Math.abs(s.current-t.clientX)<10&&Math.abs(c.current-t.clientY)<10||(i.current&&(i.current.style.transform=`translate(${t.clientX-s.current}px, ${t.clientY-c.current}px)`),x(!0),a({type:l.PIVOT_CONFIGURATOR_ACTION.setDragItem,payload:e.dataItem}))},j=()=>{x(!1),r.dragItem&&(i.current&&(i.current.style.transform=""),a({type:l.PIVOT_CONFIGURATOR_ACTION.drop,payload:e.dataItem}))},X=t=>{r.dragItem&&(a({type:l.PIVOT_CONFIGURATOR_ACTION.setDropTarget,payload:e.dataItem},t.syntheticEvent),a({type:l.PIVOT_CONFIGURATOR_ACTION.setDropZone,payload:I},t.syntheticEvent))},Y=t=>{if(r.dragItem&&!y&&i.current){const o=i.current.getBoundingClientRect(),O=t.syntheticEvent.clientX-o.left<o.width/2?"before":"after";a({type:l.PIVOT_CONFIGURATOR_ACTION.setDropDirection,payload:O},t.syntheticEvent)}};return u.useDraggable(i,{onPress:V,onDrag:k,onRelease:j}),n.createElement(n.Fragment,null,r.dropTarget&&v.compareAxes(r.dropTarget,e.dataItem)&&r.dropDirection==="before"&&n.createElement(h,{...E}),n.createElement(F,{ref:u.canUseRef(F)?f:void 0,...e,removable:!0,onRemove:q,onMouseEnter:X,onMouseMove:Y,style:{pointerEvents:y?"none":void 0},rounded:"full",...N},e.text,I!=="measureAxes"&&n.createElement(_,{field:String(e.value),itemsRender:U,sort:r.sort,onSortChange:S,filter:g&&g.length?[{logic:"and",filters:g}]:void 0,onFilterChange:b,filterContent:[A.ColumnMenuTextFilter],...M})),r.dropTarget&&v.compareAxes(r.dropTarget,e.dataItem)&&r.dropDirection==="after"&&n.createElement(h,{...E}))}),m={chip:H.Chip,columnMenuTextColumn:A.ColumnMenuTextColumn,filterFieldsEditor:$.PivotGridAxisFilterFieldsEditor,dropClue:e=>n.createElement("div",{className:"k-grouping-dropclue",style:{position:"relative",zIndex:1e4},...e})};p.defaultProps=m;p.displayName="KendoReactPivotGridAxisEditor";exports.PivotGridAxisEditor=p;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const z=require("react"),v=require("@progress/kendo-pivotgrid-common"),u=require("@progress/kendo-react-common"),A=require("@progress/kendo-react-data-tools"),H=require("@progress/kendo-react-buttons"),T=require("../utils/index.js"),B=require("./EditorContext.js"),$=require("./AxisFilterFieldsEditor.js"),K=require("../shared/PivotGridConfiguratorEditorStateContext.js"),l=require("../hooks/usePivotConfiguratorEditor.js");function Z(e){const d=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const s in e)if(s!=="default"){const c=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(d,s,c.get?c:{enumerable:!0,get:()=>e[s]})}}return d.default=e,Object.freeze(d)}const n=Z(z),p=n.forwardRef((e,d)=>{const s=n.useRef(0),c=n.useRef(0),f=n.useRef(null),i=n.useRef(null),R=n.useRef(null),{axes:I}=n.useContext(B.PivotGridConfiguratorEditorAxesContext),[y,x]=n.useState(!1),[r,a]=n.useContext(K.PivotGridConfiguratorEditorStateContext);n.useImperativeHandle(i,()=>f.current&&f.current.element),n.useImperativeHandle(R,()=>({props:e,element:i.current})),n.useImperativeHandle(d,()=>R.current);const[F,N]=u.useCustomComponent(e.chip||m.chip),[h,E]=u.useCustomComponent(e.dropClue||m.dropClue),[_,M]=u.useCustomComponent(e.columnMenuTextColumn||m.columnMenuTextColumn),[D,G]=u.useCustomComponent(e.filterFieldsEditor||m.filterFieldsEditor),P=T.findFilters(r.filter,String(e.value),"in"),g=T.findFilters(r.filter,String(e.value)),S=(t,o)=>{a({type:l.PIVOT_CONFIGURATOR_ACTION.setSort,payload:o},t)},b=(t,o)=>{o.length?a({type:l.PIVOT_CONFIGURATOR_ACTION.setFilter,payload:[...P||[],...o.reduce((C,O)=>[...C,...O.filters.filter(w=>w.value)],[])]},t):a({type:l.PIVOT_CONFIGURATOR_ACTION.setFilter,payload:P},t)},q=t=>{a({type:l.PIVOT_CONFIGURATOR_ACTION.remove,payload:e.dataItem},t.syntheticEvent)},U=t=>{const o=t.slice(),C=T.findFilter(r.filter,String(e.dataItem.name),"in");return o.splice(1,0,n.createElement(D,{key:"axis-filter-fields-editor",defaultFilter:C,dataItem:e.dataItem,data:e.dataItem.fields,axes:I,...G})),o},V=t=>{s.current=t.clientX,c.current=t.clientY},k=t=>{Math.abs(s.current-t.clientX)<10&&Math.abs(c.current-t.clientY)<10||(i.current&&(i.current.style.transform=`translate(${t.clientX-s.current}px, ${t.clientY-c.current}px)`),x(!0),a({type:l.PIVOT_CONFIGURATOR_ACTION.setDragItem,payload:e.dataItem}))},j=()=>{x(!1),r.dragItem&&(i.current&&(i.current.style.transform=""),a({type:l.PIVOT_CONFIGURATOR_ACTION.drop,payload:e.dataItem}))},X=t=>{r.dragItem&&(a({type:l.PIVOT_CONFIGURATOR_ACTION.setDropTarget,payload:e.dataItem},t.syntheticEvent),a({type:l.PIVOT_CONFIGURATOR_ACTION.setDropZone,payload:I},t.syntheticEvent))},Y=t=>{if(r.dragItem&&!y&&i.current){const o=i.current.getBoundingClientRect(),O=t.syntheticEvent.clientX-o.left<o.width/2?"before":"after";a({type:l.PIVOT_CONFIGURATOR_ACTION.setDropDirection,payload:O},t.syntheticEvent)}};return u.useDraggable(i,{onPress:V,onDrag:k,onRelease:j}),n.createElement(n.Fragment,null,r.dropTarget&&v.compareAxes(r.dropTarget,e.dataItem)&&r.dropDirection==="before"&&n.createElement(h,{...E}),n.createElement(F,{ref:u.canUseRef(F)?f:void 0,...e,removable:!0,onRemove:q,onMouseEnter:X,onMouseMove:Y,style:{pointerEvents:y?"none":void 0},rounded:"full",...N},e.text,I!=="measureAxes"&&n.createElement(_,{field:String(e.value),itemsRender:U,sort:r.sort,onSortChange:S,filter:g&&g.length?[{logic:"and",filters:g}]:void 0,onFilterChange:b,filterContent:[A.ColumnMenuTextFilter],...M})),r.dropTarget&&v.compareAxes(r.dropTarget,e.dataItem)&&r.dropDirection==="after"&&n.createElement(h,{...E}))}),m={chip:H.Chip,columnMenuTextColumn:A.ColumnMenuTextColumn,filterFieldsEditor:$.PivotGridAxisFilterFieldsEditor,dropClue:e=>n.createElement("div",{className:"k-grouping-dropclue",style:{position:"relative",zIndex:1e4},...e})};p.defaultProps=m;p.displayName="KendoReactPivotGridAxisEditor";exports.PivotGridAxisEditor=p;
@@ -5,7 +5,6 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- "use client";
9
8
  import * as r from "react";
10
9
  import { compareAxes as R } from "@progress/kendo-pivotgrid-common";
11
10
  import { useCustomComponent as c, useDraggable as $, canUseRef as B } from "@progress/kendo-react-common";
@@ -5,4 +5,4 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const W=require("react"),Y=require("@progress/kendo-react-treeview"),P=require("@progress/kendo-react-buttons"),Z=require("@progress/kendo-react-indicators"),ee=require("@progress/kendo-react-intl"),N=require("@progress/kendo-react-data-tools"),i=require("@progress/kendo-react-common"),te=require("@progress/kendo-svg-icons"),C=require("../utils/index.js"),s=require("../messages/index.js"),ne=require("../shared/PivotGridConfiguratorEditorEventsContext.js"),oe=require("../shared/PivotGridConfiguratorEditorStateContext.js"),O=require("../hooks/useExpansion.js"),g=require("../hooks/usePivotConfiguratorEditor.js");function ae(n){const u=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const l in n)if(l!=="default"){const d=Object.getOwnPropertyDescriptor(n,l);Object.defineProperty(u,l,d.get?d:{enumerable:!0,get:()=>n[l]})}}return u.default=n,Object.freeze(u)}const t=ae(W),S=t.forwardRef((n,u)=>{const{data:l,dataItem:d,defaultFilter:I}={...r,...n},F=t.useRef(null),m=t.useRef(null),y=ee.useLocalization(),[q,A]=i.useCustomComponent(n.columnMenuItem||r.columnMenuItem),[T,w]=i.useCustomComponent(n.columnMenuForm||r.columnMenuForm),[B,b]=i.useCustomComponent(n.resetButton||r.resetButton),[_,G]=i.useCustomComponent(n.applyButton||r.applyButton),[V,D]=i.useCustomComponent(n.treeView||r.treeView),[j,L]=i.useCustomComponent(n.noData||r.noData);t.useImperativeHandle(m,()=>({props:n,element:F.current})),t.useImperativeHandle(u,()=>m.current);const[h,f]=t.useState(!1),{onAxisFilterFieldsExpandChange:v,onAxisFilterFieldExpand:k}=t.useContext(ne.PivotGridConfiguratorEditorEventsContext),[,E]=t.useContext(oe.PivotGridConfiguratorEditorStateContext),[c,z]=t.useState(I),x=c?c.value.split(","):[],[H,U]=O.useExpansion([],void 0,m,C.compareFields),R={caption:e=>e.dataItem.caption,id:e=>e.dataItem.uniqueName,parent:(e,a)=>a&&a.value,value:e=>e.dataItem.defaultHierarchy||e.dataItem.uniqueName,expanded:e=>H.some(a=>a.uniqueName===e.id),checked:e=>!x.length||(x||[]).some(a=>a===e.dataItem.uniqueName),hasChildren:e=>parseInt(e.dataItem.childrenCardinality,10)>0,children:e=>C.recursiveMap(e.dataItem.children,R,e),checkIndeterminate:e=>{const a=(e.children||[]).length&&e.children.every(o=>o.checked);return a&&(e.checked=!0),(e.children||[]).some(o=>o.checked)&&!a}},p=C.recursiveMap(l,R),M=C.flatMap(p),K=e=>{f(!h),v&&v({value:!h,target:m.current,syntheticEvent:e})},X=e=>{U({type:O.EXPANSION_ACTION.toggle,payload:e.item.dataItem},e.syntheticEvent),k&&k({value:e.item.dataItem,target:m.current,syntheticEvent:e.syntheticEvent})},$=e=>{let a;e.item.checked?a={field:String(d.name),operator:"in",value:M.filter(o=>o.checked).map(o=>String(o.value)).filter(o=>o!==e.item.value&&o!==e.item.parent).join(",")}:a={field:String(d.name),operator:"in",value:M.filter(o=>o.checked).map(o=>String(o.value)).concat([e.item.value]).join(",")},z(a)},J=e=>{f(!1),c&&E({type:g.PIVOT_CONFIGURATOR_ACTION.removeFilter,payload:c},e)},Q=e=>{f(!1),c&&E({type:I?g.PIVOT_CONFIGURATOR_ACTION.changeFilter:g.PIVOT_CONFIGURATOR_ACTION.addFilter,payload:c},e)};return t.createElement("div",{ref:F,id:n.id,tabIndex:n.tabIndex,style:n.style,className:i.classNames("k-columnmenu-item-wrapper",n.className)},t.createElement(q,{...A,title:"Include Fields",iconClass:"k-i-grid-layout",svgIcon:te.gridLayoutIcon,onClick:K}),t.createElement(T,{show:h,actions:t.createElement(t.Fragment,null,t.createElement(B,{type:"reset",onClick:J,...b},y.toLanguageString(s.fieldMenuReset,s.messages[s.fieldMenuReset])),t.createElement(_,{themeColor:"primary",onClick:Q,...G},y.toLanguageString(s.fieldMenuApply,s.messages[s.fieldMenuApply]))),...w},p&&p.length?t.createElement(V,{data:p,checkboxes:!0,onExpandChange:X,onCheckChange:$,textField:"caption",expandIcons:!0,hasChildrenField:"hasChildren",checkIndeterminateField:"checkIndeterminate",childrenField:"children",...D}):t.createElement(j,{...L})))}),r={data:[],resetButton:P.Button,applyButton:P.Button,treeView:Y.TreeView,noData:()=>t.createElement(Z.Skeleton,{shape:"rectangle",style:{height:"20px",width:"calc(100% - 16px)",margin:8}}),columnMenuItem:N.ColumnMenuItem,columnMenuForm:N.ColumnMenuForm};S.displayName="KendoReactPivotGridAxisFilterFieldsEditor";exports.PivotGridAxisFilterFieldsEditor=S;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const W=require("react"),Y=require("@progress/kendo-react-treeview"),P=require("@progress/kendo-react-buttons"),Z=require("@progress/kendo-react-indicators"),ee=require("@progress/kendo-react-intl"),N=require("@progress/kendo-react-data-tools"),i=require("@progress/kendo-react-common"),te=require("@progress/kendo-svg-icons"),C=require("../utils/index.js"),s=require("../messages/index.js"),ne=require("../shared/PivotGridConfiguratorEditorEventsContext.js"),oe=require("../shared/PivotGridConfiguratorEditorStateContext.js"),O=require("../hooks/useExpansion.js"),g=require("../hooks/usePivotConfiguratorEditor.js");function ae(n){const u=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const l in n)if(l!=="default"){const d=Object.getOwnPropertyDescriptor(n,l);Object.defineProperty(u,l,d.get?d:{enumerable:!0,get:()=>n[l]})}}return u.default=n,Object.freeze(u)}const t=ae(W),S=t.forwardRef((n,u)=>{const{data:l,dataItem:d,defaultFilter:I}={...r,...n},F=t.useRef(null),m=t.useRef(null),y=ee.useLocalization(),[q,A]=i.useCustomComponent(n.columnMenuItem||r.columnMenuItem),[T,w]=i.useCustomComponent(n.columnMenuForm||r.columnMenuForm),[B,b]=i.useCustomComponent(n.resetButton||r.resetButton),[_,G]=i.useCustomComponent(n.applyButton||r.applyButton),[V,D]=i.useCustomComponent(n.treeView||r.treeView),[j,L]=i.useCustomComponent(n.noData||r.noData);t.useImperativeHandle(m,()=>({props:n,element:F.current})),t.useImperativeHandle(u,()=>m.current);const[h,f]=t.useState(!1),{onAxisFilterFieldsExpandChange:v,onAxisFilterFieldExpand:k}=t.useContext(ne.PivotGridConfiguratorEditorEventsContext),[,E]=t.useContext(oe.PivotGridConfiguratorEditorStateContext),[c,z]=t.useState(I),x=c?c.value.split(","):[],[H,U]=O.useExpansion([],void 0,m,C.compareFields),R={caption:e=>e.dataItem.caption,id:e=>e.dataItem.uniqueName,parent:(e,a)=>a&&a.value,value:e=>e.dataItem.defaultHierarchy||e.dataItem.uniqueName,expanded:e=>H.some(a=>a.uniqueName===e.id),checked:e=>!x.length||(x||[]).some(a=>a===e.dataItem.uniqueName),hasChildren:e=>parseInt(e.dataItem.childrenCardinality,10)>0,children:e=>C.recursiveMap(e.dataItem.children,R,e),checkIndeterminate:e=>{const a=(e.children||[]).length&&e.children.every(o=>o.checked);return a&&(e.checked=!0),(e.children||[]).some(o=>o.checked)&&!a}},p=C.recursiveMap(l,R),M=C.flatMap(p),K=e=>{f(!h),v&&v({value:!h,target:m.current,syntheticEvent:e})},X=e=>{U({type:O.EXPANSION_ACTION.toggle,payload:e.item.dataItem},e.syntheticEvent),k&&k({value:e.item.dataItem,target:m.current,syntheticEvent:e.syntheticEvent})},$=e=>{let a;e.item.checked?a={field:String(d.name),operator:"in",value:M.filter(o=>o.checked).map(o=>String(o.value)).filter(o=>o!==e.item.value&&o!==e.item.parent).join(",")}:a={field:String(d.name),operator:"in",value:M.filter(o=>o.checked).map(o=>String(o.value)).concat([e.item.value]).join(",")},z(a)},J=e=>{f(!1),c&&E({type:g.PIVOT_CONFIGURATOR_ACTION.removeFilter,payload:c},e)},Q=e=>{f(!1),c&&E({type:I?g.PIVOT_CONFIGURATOR_ACTION.changeFilter:g.PIVOT_CONFIGURATOR_ACTION.addFilter,payload:c},e)};return t.createElement("div",{ref:F,id:n.id,tabIndex:n.tabIndex,style:n.style,className:i.classNames("k-columnmenu-item-wrapper",n.className)},t.createElement(q,{...A,title:"Include Fields",iconClass:"k-i-grid-layout",svgIcon:te.gridLayoutIcon,onClick:K}),t.createElement(T,{show:h,actions:t.createElement(t.Fragment,null,t.createElement(B,{type:"reset",onClick:J,...b},y.toLanguageString(s.fieldMenuReset,s.messages[s.fieldMenuReset])),t.createElement(_,{themeColor:"primary",onClick:Q,...G},y.toLanguageString(s.fieldMenuApply,s.messages[s.fieldMenuApply]))),...w},p&&p.length?t.createElement(V,{data:p,checkboxes:!0,onExpandChange:X,onCheckChange:$,textField:"caption",expandIcons:!0,hasChildrenField:"hasChildren",checkIndeterminateField:"checkIndeterminate",childrenField:"children",...D}):t.createElement(j,{...L})))}),r={data:[],resetButton:P.Button,applyButton:P.Button,treeView:Y.TreeView,noData:()=>t.createElement(Z.Skeleton,{shape:"rectangle",style:{height:"20px",width:"calc(100% - 16px)",margin:8}}),columnMenuItem:N.ColumnMenuItem,columnMenuForm:N.ColumnMenuForm};S.displayName="KendoReactPivotGridAxisFilterFieldsEditor";exports.PivotGridAxisFilterFieldsEditor=S;
@@ -5,7 +5,6 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- "use client";
9
8
  import * as t from "react";
10
9
  import { TreeView as W } from "@progress/kendo-react-treeview";
11
10
  import { Button as k } from "@progress/kendo-react-buttons";
@@ -18,10 +17,10 @@ import { recursiveMap as v, flatMap as ae, compareFields as oe } from "../utils/
18
17
  import { fieldMenuReset as M, messages as N, fieldMenuApply as P } from "../messages/index.mjs";
19
18
  import { PivotGridConfiguratorEditorEventsContext as ie } from "../shared/PivotGridConfiguratorEditorEventsContext.mjs";
20
19
  import { PivotGridConfiguratorEditorStateContext as re } from "../shared/PivotGridConfiguratorEditorStateContext.mjs";
21
- import { useExpansion as le, EXPANSION_ACTION as ce } from "../hooks/useExpansion.mjs";
20
+ import { useExpansion as le, EXPANSION_ACTION as me } from "../hooks/useExpansion.mjs";
22
21
  import { PIVOT_CONFIGURATOR_ACTION as u } from "../hooks/usePivotConfiguratorEditor.mjs";
23
- const me = t.forwardRef((o, S) => {
24
- const { data: w, dataItem: p, defaultFilter: h } = { ...i, ...o }, f = t.useRef(null), c = t.useRef(null), C = Z(), [A, B] = l(
22
+ const ce = t.forwardRef((o, S) => {
23
+ const { data: w, dataItem: p, defaultFilter: h } = { ...i, ...o }, f = t.useRef(null), m = t.useRef(null), C = Z(), [A, B] = l(
25
24
  o.columnMenuItem || i.columnMenuItem
26
25
  ), [R, T] = l(
27
26
  o.columnMenuForm || i.columnMenuForm
@@ -32,10 +31,10 @@ const me = t.forwardRef((o, S) => {
32
31
  ), [q, L] = l(
33
32
  o.treeView || i.treeView
34
33
  ), [_, b] = l(o.noData || i.noData);
35
- t.useImperativeHandle(c, () => ({ props: o, element: f.current })), t.useImperativeHandle(S, () => c.current);
36
- const [s, d] = t.useState(!1), { onAxisFilterFieldsExpandChange: I, onAxisFilterFieldExpand: g } = t.useContext(
34
+ t.useImperativeHandle(m, () => ({ props: o, element: f.current })), t.useImperativeHandle(S, () => m.current);
35
+ const [d, s] = t.useState(!1), { onAxisFilterFieldsExpandChange: I, onAxisFilterFieldExpand: g } = t.useContext(
37
36
  ie
38
- ), [, F] = t.useContext(re), [r, H] = t.useState(h), y = r ? r.value.split(",") : [], [j, z] = le([], void 0, c, oe), x = {
37
+ ), [, F] = t.useContext(re), [r, H] = t.useState(h), y = r ? r.value.split(",") : [], [j, z] = le([], void 0, m, oe), x = {
39
38
  caption: (e) => e.dataItem.caption,
40
39
  id: (e) => e.dataItem.uniqueName,
41
40
  parent: (e, a) => a && a.value,
@@ -48,16 +47,16 @@ const me = t.forwardRef((o, S) => {
48
47
  const a = (e.children || []).length && e.children.every((n) => n.checked);
49
48
  return a && (e.checked = !0), (e.children || []).some((n) => n.checked) && !a;
50
49
  }
51
- }, m = v(w, x), E = ae(m), K = (e) => {
52
- d(!s), I && I({
53
- value: !s,
54
- target: c.current,
50
+ }, c = v(w, x), E = ae(c), K = (e) => {
51
+ s(!d), I && I({
52
+ value: !d,
53
+ target: m.current,
55
54
  syntheticEvent: e
56
55
  });
57
56
  }, U = (e) => {
58
- z({ type: ce.toggle, payload: e.item.dataItem }, e.syntheticEvent), g && g({
57
+ z({ type: me.toggle, payload: e.item.dataItem }, e.syntheticEvent), g && g({
59
58
  value: e.item.dataItem,
60
- target: c.current,
59
+ target: m.current,
61
60
  syntheticEvent: e.syntheticEvent
62
61
  });
63
62
  }, X = (e) => {
@@ -72,7 +71,7 @@ const me = t.forwardRef((o, S) => {
72
71
  value: E.filter((n) => n.checked).map((n) => String(n.value)).concat([e.item.value]).join(",")
73
72
  }, H(a);
74
73
  }, J = (e) => {
75
- d(!1), r && F(
74
+ s(!1), r && F(
76
75
  {
77
76
  type: u.removeFilter,
78
77
  payload: r
@@ -80,7 +79,7 @@ const me = t.forwardRef((o, S) => {
80
79
  e
81
80
  );
82
81
  }, Q = (e) => {
83
- d(!1), r && F(
82
+ s(!1), r && F(
84
83
  {
85
84
  type: h ? u.changeFilter : u.addFilter,
86
85
  payload: r
@@ -110,14 +109,14 @@ const me = t.forwardRef((o, S) => {
110
109
  /* @__PURE__ */ t.createElement(
111
110
  R,
112
111
  {
113
- show: s,
112
+ show: d,
114
113
  actions: /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement(V, { type: "reset", onClick: J, ...O }, C.toLanguageString(M, N[M])), /* @__PURE__ */ t.createElement(D, { themeColor: "primary", onClick: Q, ...G }, C.toLanguageString(P, N[P]))),
115
114
  ...T
116
115
  },
117
- m && m.length ? /* @__PURE__ */ t.createElement(
116
+ c && c.length ? /* @__PURE__ */ t.createElement(
118
117
  q,
119
118
  {
120
- data: m,
119
+ data: c,
121
120
  checkboxes: !0,
122
121
  onExpandChange: U,
123
122
  onCheckChange: X,
@@ -140,7 +139,7 @@ const me = t.forwardRef((o, S) => {
140
139
  columnMenuItem: $,
141
140
  columnMenuForm: ee
142
141
  };
143
- me.displayName = "KendoReactPivotGridAxisFilterFieldsEditor";
142
+ ce.displayName = "KendoReactPivotGridAxisFilterFieldsEditor";
144
143
  export {
145
- me as PivotGridAxisFilterFieldsEditor
144
+ ce as PivotGridAxisFilterFieldsEditor
146
145
  };
@@ -5,4 +5,4 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react"),r=require("@progress/kendo-react-common");function d(e){const l=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(l,t,n.get?n:{enumerable:!0,get:()=>e[t]})}}return l.default=e,Object.freeze(l)}const a=d(o),c=a.forwardRef((e,l)=>{const t=a.useRef(null),n=a.useRef(null);a.useImperativeHandle(t,()=>({element:n.current,props:e})),a.useImperativeHandle(l,()=>t.current);const i=r.useMouse(e,t);return a.createElement("td",{ref:n,...i,id:e.id,style:e.style,tabIndex:e.tabIndex,role:e.role,"aria-describedby":e.ariaDescribedby,className:r.classNames("k-pivotgrid-cell",{"k-pivotgrid-header-total":e.total},e.className)},e.children)});c.displayName="KendoReactPivotGridCell";exports.PivotGridCell=c;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react"),n=require("@progress/kendo-react-common");function d(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const l=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,l.get?l:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const a=d(o),c=a.forwardRef((e,r)=>{const t=a.useRef(null),l=a.useRef(null);a.useImperativeHandle(t,()=>({element:l.current,props:e})),a.useImperativeHandle(r,()=>t.current);const i=n.useMouse(e,t);return a.createElement("td",{ref:l,...i,id:e.id,style:e.style,tabIndex:e.tabIndex,role:e.role,"aria-describedby":e.ariaDescribedby,className:n.classNames("k-pivotgrid-cell",{"k-pivotgrid-header-total":e.total},e.className)},e.children)});c.displayName="KendoReactPivotGridCell";exports.PivotGridCell=c;
@@ -5,7 +5,6 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- "use client";
9
8
  import * as t from "react";
10
9
  import { useMouse as d, classNames as n } from "@progress/kendo-react-common";
11
10
  const c = t.forwardRef((e, r) => {
@@ -5,4 +5,4 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("react"),p=require("@progress/kendo-react-common");function b(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,o.get?o:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const n=b(f),c=n.forwardRef((e,r)=>{const t=n.useRef(null),o=n.useRef(null),{id:a,style:u,tabIndex:l,children:s,className:i,path:d=g.path}=e;n.useImperativeHandle(t,()=>({element:o.current,props:{path:d,...e}})),n.useImperativeHandle(r,()=>t.current);const m=p.useMouse(e,t);return n.createElement("col",{ref:o,...m,id:a,style:u,tabIndex:l,children:s,className:i})}),g={path:[]};c.displayName="KendoReactPivotGridColumn";exports.PivotGridColumn=c;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("react"),p=require("@progress/kendo-react-common");function b(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,o.get?o:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const n=b(f),a=n.forwardRef((e,r)=>{const t=n.useRef(null),o=n.useRef(null),{id:c,style:u,tabIndex:l,children:s,className:i,path:d=g.path}=e;n.useImperativeHandle(t,()=>({element:o.current,props:{path:d,...e}})),n.useImperativeHandle(r,()=>t.current);const m=p.useMouse(e,t);return n.createElement("col",{ref:o,...m,id:c,style:u,tabIndex:l,children:s,className:i})}),g={path:[]};a.displayName="KendoReactPivotGridColumn";exports.PivotGridColumn=a;
@@ -5,23 +5,22 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- "use client";
9
8
  import * as e from "react";
10
- import { useMouse as d } from "@progress/kendo-react-common";
9
+ import { useMouse as i } from "@progress/kendo-react-common";
11
10
  const p = e.forwardRef((t, o) => {
12
- const n = e.useRef(null), r = e.useRef(null), { id: s, style: a, tabIndex: l, children: u, className: c, path: m = f.path } = t;
13
- e.useImperativeHandle(n, () => ({
14
- element: r.current,
11
+ const r = e.useRef(null), n = e.useRef(null), { id: a, style: s, tabIndex: l, children: u, className: c, path: m = f.path } = t;
12
+ e.useImperativeHandle(r, () => ({
13
+ element: n.current,
15
14
  props: { path: m, ...t }
16
- })), e.useImperativeHandle(o, () => n.current);
17
- const i = d(t, n);
15
+ })), e.useImperativeHandle(o, () => r.current);
16
+ const d = i(t, r);
18
17
  return /* @__PURE__ */ e.createElement(
19
18
  "col",
20
19
  {
21
- ref: r,
22
- ...i,
23
- id: s,
24
- style: a,
20
+ ref: n,
21
+ ...d,
22
+ id: a,
23
+ style: s,
25
24
  tabIndex: l,
26
25
  children: u,
27
26
  className: c
@@ -5,4 +5,4 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const P=require("react"),v=require("@progress/kendo-react-buttons"),l=require("@progress/kendo-react-common"),z=require("@progress/kendo-react-intl"),F=require("@progress/kendo-react-form"),q=require("./ConfiguratorEditor.js"),o=require("../messages/index.js");function j(e){const u=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const a in e)if(a!=="default"){const s=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(u,a,s.get?s:{enumerable:!0,get:()=>e[a]})}}return u.default=e,Object.freeze(u)}const t=j(P),h=t.forwardRef((e,u)=>{const{horizontal:a,data:s,rowAxes:d,columnAxes:f,measureAxes:g}={...m,...e},E=t.useRef(null),i=t.useRef(null),n=t.useRef(null),C=z.useLocalization(),[A,k]=l.useCustomComponent(e.editor||m.editor),[x,b]=l.useCustomComponent(e.form||m.form),[R,S]=l.useCustomComponent(e.formElement||m.formElement);t.useImperativeHandle(i,()=>({props:e,element:E.current})),t.useImperativeHandle(u,()=>i.current);const N=(r,c)=>{e.onRowAxesChange&&e.onRowAxesChange({target:i.current,value:r.rowAxes,syntheticEvent:c}),e.onColumnAxesChange&&e.onColumnAxesChange({target:i.current,value:r.columnAxes,syntheticEvent:c}),e.onMeasureAxesChange&&e.onMeasureAxesChange({target:i.current,value:r.measureAxes,syntheticEvent:c}),e.onSortChange&&e.onSortChange({target:i.current,value:r.sort,syntheticEvent:c}),e.onFilterChange&&e.onFilterChange({target:i.current,value:r.filter,syntheticEvent:c})},y={rowAxes:d,columnAxes:f,measureAxes:g,sort:e.sort,filter:e.filter};return t.useEffect(()=>{n.current&&n.current.onChange("rowAxes",{value:d})},[d]),t.useEffect(()=>{n.current&&n.current.onChange("columnAxes",{value:f})},[f]),t.useEffect(()=>{n.current&&n.current.onChange("measureAxes",{value:g})},[g]),t.useEffect(()=>{n.current&&n.current.onChange("sort",{value:e.sort})},[e.sort]),t.useEffect(()=>{n.current&&n.current.onChange("filter",{value:e.filter})},[e.filter]),t.createElement("div",{ref:E,id:e.id,tabIndex:e.tabIndex,style:e.style,className:l.classNames("k-pivotgrid-configurator",e.className)},t.createElement("div",{className:l.classNames("k-pivotgrid-configurator-panel","k-pivotgrid-configurator-push",{"k-pivotgrid-configurator-horizontal":a,"k-pivotgrid-configurator-vertical":!a})},t.createElement("div",{className:"k-pivotgrid-configurator-header"},t.createElement("div",{className:"k-pivotgrid-configurator-header-text"},C.toLanguageString(o.configuratorTitle,o.messages[o.configuratorTitle]))),t.createElement(x,{ref:l.canUseRef(x)?n:void 0,initialValues:y,onSubmit:N,render:r=>t.createElement(t.Fragment,null,t.createElement("div",{className:"k-pivotgrid-configurator-content"},t.createElement(R,{horizontal:a,...S},t.createElement(A,{...r,horizontal:e.horizontal,onFieldsEditorFieldExpand:e.onFieldsEditorFieldExpand,onFieldsEditorFieldCheck:e.onFieldsEditorFieldCheck,onAxisFilterFieldExpand:e.onAxisFilterFieldExpand,onAxisFilterFieldsExpandChange:e.onAxisFilterFieldsExpandChange,data:s,...k}))),t.createElement("div",{className:"k-pivotgrid-configurator-actions k-actions k-hstack k-justify-content-end"},t.createElement(v.Button,{type:"submit",onClick:r.onFormReset},C.toLanguageString(o.configuratorCancel,o.messages[o.configuratorCancel])),t.createElement(v.Button,{themeColor:"primary",type:"submit",onClick:r.onSubmit},C.toLanguageString(o.configuratorApply,o.messages[o.configuratorApply])))),...b})))}),m={form:F.Form,formElement:F.FormElement,editor:q.PivotGridConfiguratorEditor,horizontal:!1,data:[],columnAxes:[],rowAxes:[],measureAxes:[]};h.displayName="KendoReactPivotGridConfigurator";exports.PivotGridConfigurator=h;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const P=require("react"),v=require("@progress/kendo-react-buttons"),l=require("@progress/kendo-react-common"),z=require("@progress/kendo-react-intl"),F=require("@progress/kendo-react-form"),q=require("./ConfiguratorEditor.js"),o=require("../messages/index.js");function j(e){const u=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const a in e)if(a!=="default"){const s=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(u,a,s.get?s:{enumerable:!0,get:()=>e[a]})}}return u.default=e,Object.freeze(u)}const t=j(P),h=t.forwardRef((e,u)=>{const{horizontal:a,data:s,rowAxes:d,columnAxes:f,measureAxes:g}={...m,...e},E=t.useRef(null),i=t.useRef(null),n=t.useRef(null),C=z.useLocalization(),[A,k]=l.useCustomComponent(e.editor||m.editor),[x,b]=l.useCustomComponent(e.form||m.form),[R,S]=l.useCustomComponent(e.formElement||m.formElement);t.useImperativeHandle(i,()=>({props:e,element:E.current})),t.useImperativeHandle(u,()=>i.current);const N=(r,c)=>{e.onRowAxesChange&&e.onRowAxesChange({target:i.current,value:r.rowAxes,syntheticEvent:c}),e.onColumnAxesChange&&e.onColumnAxesChange({target:i.current,value:r.columnAxes,syntheticEvent:c}),e.onMeasureAxesChange&&e.onMeasureAxesChange({target:i.current,value:r.measureAxes,syntheticEvent:c}),e.onSortChange&&e.onSortChange({target:i.current,value:r.sort,syntheticEvent:c}),e.onFilterChange&&e.onFilterChange({target:i.current,value:r.filter,syntheticEvent:c})},y={rowAxes:d,columnAxes:f,measureAxes:g,sort:e.sort,filter:e.filter};return t.useEffect(()=>{n.current&&n.current.onChange("rowAxes",{value:d})},[d]),t.useEffect(()=>{n.current&&n.current.onChange("columnAxes",{value:f})},[f]),t.useEffect(()=>{n.current&&n.current.onChange("measureAxes",{value:g})},[g]),t.useEffect(()=>{n.current&&n.current.onChange("sort",{value:e.sort})},[e.sort]),t.useEffect(()=>{n.current&&n.current.onChange("filter",{value:e.filter})},[e.filter]),t.createElement("div",{ref:E,id:e.id,tabIndex:e.tabIndex,style:e.style,className:l.classNames("k-pivotgrid-configurator",e.className)},t.createElement("div",{className:l.classNames("k-pivotgrid-configurator-panel","k-pivotgrid-configurator-push",{"k-pivotgrid-configurator-horizontal":a,"k-pivotgrid-configurator-vertical":!a})},t.createElement("div",{className:"k-pivotgrid-configurator-header"},t.createElement("div",{className:"k-pivotgrid-configurator-header-text"},C.toLanguageString(o.configuratorTitle,o.messages[o.configuratorTitle]))),t.createElement(x,{ref:l.canUseRef(x)?n:void 0,initialValues:y,onSubmit:N,render:r=>t.createElement(t.Fragment,null,t.createElement("div",{className:"k-pivotgrid-configurator-content"},t.createElement(R,{horizontal:a,...S},t.createElement(A,{...r,horizontal:e.horizontal,onFieldsEditorFieldExpand:e.onFieldsEditorFieldExpand,onFieldsEditorFieldCheck:e.onFieldsEditorFieldCheck,onAxisFilterFieldExpand:e.onAxisFilterFieldExpand,onAxisFilterFieldsExpandChange:e.onAxisFilterFieldsExpandChange,data:s,...k}))),t.createElement("div",{className:"k-pivotgrid-configurator-actions k-actions k-hstack k-justify-content-end"},t.createElement(v.Button,{type:"submit",onClick:r.onFormReset},C.toLanguageString(o.configuratorCancel,o.messages[o.configuratorCancel])),t.createElement(v.Button,{themeColor:"primary",type:"submit",onClick:r.onSubmit},C.toLanguageString(o.configuratorApply,o.messages[o.configuratorApply])))),...b})))}),m={form:F.Form,formElement:F.FormElement,editor:q.PivotGridConfiguratorEditor,horizontal:!1,data:[],columnAxes:[],rowAxes:[],measureAxes:[]};h.displayName="KendoReactPivotGridConfigurator";exports.PivotGridConfigurator=h;
@@ -5,7 +5,6 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- "use client";
9
8
  import * as t from "react";
10
9
  import { Button as x } from "@progress/kendo-react-buttons";
11
10
  import { useCustomComponent as f, classNames as E, canUseRef as L } from "@progress/kendo-react-common";
@@ -5,4 +5,4 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("react"),a=require("@progress/kendo-react-common"),g=require("@progress/kendo-react-intl"),b=require("@progress/kendo-svg-icons"),c=require("../messages/index.js");function v(e){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(o,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return o.default=e,Object.freeze(o)}const t=v(f),u=t.forwardRef((e,o)=>{const n=t.useRef(null),r=t.useRef(null),i=g.useLocalization();t.useImperativeHandle(n,()=>({props:e,element:r.current})),t.useImperativeHandle(o,()=>n.current);const[s,l]=a.useCustomComponent(e.icon||I.icon),d=t.useMemo(()=>a.classNames("k-pivotgrid-configurator-button",e.className),[e.className]),m=a.useMouse(e,n);return t.createElement("div",{ref:r,id:e.id,className:d,tabIndex:e.tabIndex,...m},t.createElement("span",null,i.toLanguageString(c.configuratorButtonLabel,c.messages[c.configuratorButtonLabel]),t.createElement(s,{name:"gear",icon:b.gearIcon,...l})))}),I={icon:a.IconWrap};u.displayName="KendoReactPivotGridConfiguratorButton";exports.PivotGridConfiguratorButton=u;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("react"),a=require("@progress/kendo-react-common"),g=require("@progress/kendo-react-intl"),b=require("@progress/kendo-svg-icons"),c=require("../messages/index.js");function v(e){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(o,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return o.default=e,Object.freeze(o)}const t=v(f),u=t.forwardRef((e,o)=>{const n=t.useRef(null),r=t.useRef(null),i=g.useLocalization();t.useImperativeHandle(n,()=>({props:e,element:r.current})),t.useImperativeHandle(o,()=>n.current);const[s,l]=a.useCustomComponent(e.icon||I.icon),d=t.useMemo(()=>a.classNames("k-pivotgrid-configurator-button",e.className),[e.className]),m=a.useMouse(e,n);return t.createElement("div",{ref:r,id:e.id,className:d,tabIndex:e.tabIndex,...m},t.createElement("span",null,i.toLanguageString(c.configuratorButtonLabel,c.messages[c.configuratorButtonLabel]),t.createElement(s,{name:"gear",icon:b.gearIcon,...l})))}),I={icon:a.IconWrap};u.displayName="KendoReactPivotGridConfiguratorButton";exports.PivotGridConfiguratorButton=u;