@progress/kendo-react-pivotgrid 8.6.0-develop.1 → 9.0.0-develop.10

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.
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,B]=u.toRows(I),G=u.toTree((U||[]).slice()),[,re]=J.useHeaders((Y||[]).slice(),G,ne),[R,i,,j]=u.toColumns(G),P=u.toData((Z||[]).slice(),i,C,j,oe);t.useImperativeHandle(E,()=>({props:n,element:s.current,columnHeaderRows:R,rowHeaderRows:L,dataCells:P,rowHeaderBreadth:B,columnHeaderBreadth:j})),t.useImperativeHandle(w,()=>E.current);const K=[],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++)K.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<B;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,K),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 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;
package/PivotGrid.mjs CHANGED
@@ -17,9 +17,9 @@ import { useHeaders as _ } from "./hooks/useHeaders.mjs";
17
17
  import { PivotGridHeaderCell as De } from "./components/HeaderCell.mjs";
18
18
  import { useHorizontalScrollSync as ze } from "./hooks/useHorizontalScrollSync.mjs";
19
19
  import { useVerticalScrollSync as Le } from "./hooks/useVerticalScrollSync.mjs";
20
- import { PivotGridColumn as Be } from "./components/Column.mjs";
21
- import { generateKey as f, generateDataKey as Ie } from "./utils/index.mjs";
22
- import { toTree as q, toRows as Oe, toColumns as Ge, toData as Ve, PivotGridNavigation as Ke, HEADERS_ACTION as F } from "@progress/kendo-pivotgrid-common";
20
+ import { PivotGridColumn as Ie } from "./components/Column.mjs";
21
+ 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
23
  const Xe = t.forwardRef((n, J) => {
24
24
  He(xe);
25
25
  const {
@@ -40,11 +40,11 @@ const Xe = t.forwardRef((n, J) => {
40
40
  target: g.current,
41
41
  syntheticEvent: r
42
42
  });
43
- }, T = q((Q || []).slice()), [, ne] = _((U || []).slice(), T, oe), [D, c, re, z] = Oe(T), L = q((Y || []).slice()), [, le] = _((Z || []).slice(), L, ae), [w, m, , B] = Ge(L), R = Ve(
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(
44
44
  (ee || []).slice(),
45
45
  m,
46
46
  c,
47
- B,
47
+ I,
48
48
  re
49
49
  );
50
50
  t.useImperativeHandle(g, () => ({
@@ -54,15 +54,15 @@ const Xe = t.forwardRef((n, J) => {
54
54
  rowHeaderRows: D,
55
55
  dataCells: R,
56
56
  rowHeaderBreadth: z,
57
- columnHeaderBreadth: B
57
+ columnHeaderBreadth: I
58
58
  })), t.useImperativeHandle(J, () => g.current);
59
- const I = [], O = [], G = [], [H, k] = y(n.row || C.row), [S, x] = y(
59
+ const O = [], G = [], B = [], [H, k] = y(n.row || C.row), [S, x] = y(
60
60
  n.column || C.column
61
61
  ), [se, me] = y(n.cell || C.cell), [V, K] = y(
62
62
  n.headerCell || C.headerCell
63
63
  ), 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
64
  for (let e = 0; e < m.length; e++)
65
- I.push(
65
+ O.push(
66
66
  /* @__PURE__ */ t.createElement(
67
67
  Ce,
68
68
  {
@@ -71,7 +71,7 @@ const Xe = t.forwardRef((n, J) => {
71
71
  path: m[e].path
72
72
  }
73
73
  )
74
- ), G.push(
74
+ ), B.push(
75
75
  /* @__PURE__ */ t.createElement(
76
76
  ce,
77
77
  {
@@ -82,7 +82,7 @@ const Xe = t.forwardRef((n, J) => {
82
82
  )
83
83
  );
84
84
  for (let e = 0; e < z; e++)
85
- O.push(/* @__PURE__ */ t.createElement(pe, { key: e, ...x }));
85
+ G.push(/* @__PURE__ */ t.createElement(pe, { key: e, ...x }));
86
86
  const ge = (e) => {
87
87
  e.target.props.expandable && le(
88
88
  {
@@ -160,7 +160,7 @@ const Xe = t.forwardRef((n, J) => {
160
160
  });
161
161
  });
162
162
  const b = R.map((e) => e.cells.map(
163
- (r) => Ie(r.rowTuple.members, r.columnTuple.members).replace(/\s/g, "-")
163
+ (r) => Oe(r.rowTuple.members, r.columnTuple.members).replace(/\s/g, "-")
164
164
  ));
165
165
  return /* @__PURE__ */ t.createElement(
166
166
  "div",
@@ -173,7 +173,7 @@ const Xe = t.forwardRef((n, J) => {
173
173
  role: "grid"
174
174
  },
175
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, G), /* @__PURE__ */ t.createElement("tbody", { className: "k-pivotgrid-tbody", role: "rowgroup" }, w.map((e, r) => {
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) => {
177
177
  let o = !1;
178
178
  return /* @__PURE__ */ t.createElement(ie, { key: e.name, role: "row", ...k }, e.cells.map((a, l) => {
179
179
  const P = l !== 0 && !o;
@@ -202,7 +202,7 @@ const Xe = t.forwardRef((n, J) => {
202
202
  ) : null;
203
203
  }));
204
204
  })))),
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, O), /* @__PURE__ */ t.createElement("tbody", { className: "k-pivotgrid-tbody", role: "rowgroup" }, D.map((e, r) => /* @__PURE__ */ t.createElement(
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(
206
206
  ue,
207
207
  {
208
208
  key: f(c[r].path),
@@ -233,7 +233,7 @@ const Xe = t.forwardRef((n, J) => {
233
233
  ) : null
234
234
  )
235
235
  ))))),
236
- /* @__PURE__ */ t.createElement("div", { ref: E, className: "k-pivotgrid-values", onScroll: ve }, /* @__PURE__ */ t.createElement("table", { className: "k-pivotgrid-table", role: "none" }, /* @__PURE__ */ t.createElement("colgroup", null, I), /* @__PURE__ */ t.createElement("tbody", { className: "k-pivotgrid-tbody", role: "none" }, R.map((e, r) => /* @__PURE__ */ t.createElement(
236
+ /* @__PURE__ */ t.createElement("div", { ref: E, className: "k-pivotgrid-values", onScroll: ve }, /* @__PURE__ */ t.createElement("table", { className: "k-pivotgrid-table", role: "none" }, /* @__PURE__ */ t.createElement("colgroup", null, O), /* @__PURE__ */ t.createElement("tbody", { className: "k-pivotgrid-tbody", role: "none" }, R.map((e, r) => /* @__PURE__ */ t.createElement(
237
237
  fe,
238
238
  {
239
239
  key: f(c[r].path),
@@ -264,7 +264,7 @@ const Xe = t.forwardRef((n, J) => {
264
264
  columnAxes: [],
265
265
  data: [],
266
266
  row: Ne,
267
- column: Be,
267
+ column: Ie,
268
268
  cell: Te,
269
269
  headerCell: De
270
270
  };
package/README.md CHANGED
@@ -5,10 +5,11 @@
5
5
  # KendoReact PivotGrid (Pivot Table) Component for React
6
6
 
7
7
  > **Important**
8
- > * This package is а part of [KendoReact](https://www.telerik.com/kendo-react-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-pivotgrid)&mdash;a commercial UI library.
9
- > * You will need to install a license key when adding the package to your project. For more information, please refer to the [KendoReact My License page](https://www.telerik.com/kendo-react-ui/components/my-license/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-pivotgrid).
10
- > * To receive a license key, you need to either [purchase a license](https://www.telerik.com/kendo-react-ui/pricing?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-pivotgrid) or register for a [free trial](https://www.telerik.com/try/kendo-react-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-pivotgrid). Doing so indicates that you [accept the KendoReact License Agreement](https://www.telerik.com/purchase/license-agreement/progress-kendoreact?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-pivotgrid).
11
- > * The 30-day free trial gives you access to all the KendoReact components and their full functionality. Additionally, for the period of your license, you get access to our legendary technical support provided directly by the KendoReact dev team!
8
+ >
9
+ > - This package is а part of [KendoReact](https://www.telerik.com/kendo-react-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-pivotgrid)&mdash;a commercial UI library.
10
+ > - You will need to install a license key when adding the package to your project. For more information, please refer to the [KendoReact My License page](https://www.telerik.com/kendo-react-ui/components/my-license/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-pivotgrid).
11
+ > - To receive a license key, you need to either [purchase a license](https://www.telerik.com/kendo-react-ui/pricing?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-pivotgrid) or register for a [free trial](https://www.telerik.com/try/kendo-react-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-pivotgrid). Doing so indicates that you [accept the KendoReact License Agreement](https://www.telerik.com/purchase/license-agreement/progress-kendoreact?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-pivotgrid).
12
+ > - The 30-day free trial gives you access to all the KendoReact components and their full functionality. Additionally, for the period of your license, you get access to our legendary technical support provided directly by the KendoReact dev team!
12
13
  >
13
14
  > [Start using KendoReact](https://www.telerik.com/try/kendo-react-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-pivotgrid) and speed up your development process!
14
15
 
@@ -21,35 +22,36 @@ The [React PivotGrid](https://www.telerik.com/kendo-react-ui/pivotgrid) (also ca
21
22
  The KendoReact PivotGrid component is built on React from the ground up by developers with 19+ years of experience in making enterprise-ready components. This results in a React PivotGrid that delivers lightning-fast performance and is highly customizable.
22
23
 
23
24
  Key KendoReact PivotGrid features:
24
- * [Row and column sorting](https://www.telerik.com/kendo-react-ui/components/pivotgrid/sorting/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-pivotgrid)&mdash;Ability to sort and unsort via row and column headers.
25
- * [Row and column filtering](https://www.telerik.com/kendo-react-ui/components/pivotgrid/filtering/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-pivotgrid)&mdash;Ability to filter pivot table data via row and column headers.
26
- * Row and column totals&mdash;Automatically applied formatting to separate totals from the rest of the data.
27
- * [End-user configurator interface](https://www.telerik.com/kendo-react-ui/components/pivotgrid/configurator/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-pivotgrid)&mdash;A visual “command center” for the user to slice and dice the data.
28
- * [Data binding](https://www.telerik.com/kendo-react-ui/components/pivotgrid/data-binding/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-pivotgrid)&mdash;The component can be bound to a OLAP service through a custom react hook or, alternatively, a higher-order component (HOC).
29
- * [Custom rendering](https://www.telerik.com/kendo-react-ui/components/pivotgrid/customization/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-pivotgrid)&mdash;Almost all the UI components comprising the PivotGrid can be modified.
25
+
26
+ - [Row and column sorting](https://www.telerik.com/kendo-react-ui/components/pivotgrid/sorting/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-pivotgrid)&mdash;Ability to sort and unsort via row and column headers.
27
+ - [Row and column filtering](https://www.telerik.com/kendo-react-ui/components/pivotgrid/filtering/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-pivotgrid)&mdash;Ability to filter pivot table data via row and column headers.
28
+ - Row and column totals&mdash;Automatically applied formatting to separate totals from the rest of the data.
29
+ - [End-user configurator interface](https://www.telerik.com/kendo-react-ui/components/pivotgrid/configurator/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-pivotgrid)&mdash;A visual “command center” for the user to slice and dice the data.
30
+ - [Data binding](https://www.telerik.com/kendo-react-ui/components/pivotgrid/data-binding/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-pivotgrid)&mdash;The component can be bound to a OLAP service through a custom react hook or, alternatively, a higher-order component (HOC).
31
+ - [Custom rendering](https://www.telerik.com/kendo-react-ui/components/pivotgrid/customization/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-pivotgrid)&mdash;Almost all the UI components comprising the PivotGrid can be modified.
30
32
 
31
33
  ## Support Options
32
34
 
33
35
  For any issues you might encounter while working with the KendoReact PivotGrid, use any of the available support channels:
34
36
 
35
- * Industry-leading technical support&mdash;KendoReact paid license holders and users with an active (free) trial license can take advantage of our outstanding customer support. To submit a ticket, use [the dedicated KendoReact support system](https://www.telerik.com/account/support-tickets?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-pivotgrid).
36
- * Product forums&mdash;The [KendoReact forums](https://www.telerik.com/forums/kendo-ui-react?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-pivotgrid) are part of the free support you can get from the community and from the KendoReact team.
37
- * Feedback portal&mdash;The [KendoReact feedback portal](https://feedback.telerik.com/kendo-react-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-pivotgrid) is where you can request and vote for new features to be added.
37
+ - Industry-leading technical support&mdash;KendoReact paid license holders and users with an active (free) trial license can take advantage of our outstanding customer support. To submit a ticket, use [the dedicated KendoReact support system](https://www.telerik.com/account/support-tickets?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-pivotgrid).
38
+ - Product forums&mdash;The [KendoReact forums](https://www.telerik.com/forums/kendo-ui-react?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-pivotgrid) are part of the free support you can get from the community and from the KendoReact team.
39
+ - Feedback portal&mdash;The [KendoReact feedback portal](https://feedback.telerik.com/kendo-react-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-pivotgrid) is where you can request and vote for new features to be added.
38
40
 
39
41
  ## Resources
40
42
 
41
- * [Getting Started with KendoReact](https://www.telerik.com/kendo-react-ui/components/getting-started/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-pivotgrid)
42
- * [API Reference of the KendoReact PivotGrid](https://www.telerik.com/kendo-react-ui/components/pivotgrid/api/PivotGridProps/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-pivotgrid)
43
- * [KendoReact Roadmap](https://www.telerik.com/support/whats-new/kendo-react-ui/roadmap?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-pivotgrid)
44
- * [Blogs](https://www.telerik.com/blogs/tag/kendoreact?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-pivotgrid)
45
- * [Demos, documentation, and component reference](https://www.telerik.com/kendo-react-ui/components/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-pivotgrid)
46
- * [KendoReact pricing and licensing](https://www.telerik.com/kendo-react-ui/pricing?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-pivotgrid)
47
- * [Changelog](https://www.telerik.com/kendo-react-ui/components/changelogs/ui-for-react/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-pivotgrid)
43
+ - [Getting Started with KendoReact](https://www.telerik.com/kendo-react-ui/components/getting-started/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-pivotgrid)
44
+ - [API Reference of the KendoReact PivotGrid](https://www.telerik.com/kendo-react-ui/components/pivotgrid/api/PivotGridProps/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-pivotgrid)
45
+ - [KendoReact Roadmap](https://www.telerik.com/support/whats-new/kendo-react-ui/roadmap?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-pivotgrid)
46
+ - [Blogs](https://www.telerik.com/blogs/tag/kendoreact?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-pivotgrid)
47
+ - [Demos, documentation, and component reference](https://www.telerik.com/kendo-react-ui/components/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-pivotgrid)
48
+ - [KendoReact pricing and licensing](https://www.telerik.com/kendo-react-ui/pricing?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-pivotgrid)
49
+ - [Changelog](https://www.telerik.com/kendo-react-ui/components/changelogs/ui-for-react/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-pivotgrid)
48
50
 
49
51
  High-level component overview pages
50
52
 
51
- * [React PivotGrid Component](https://www.telerik.com/kendo-react-ui/pivotgrid)
53
+ - [React PivotGrid Component](https://www.telerik.com/kendo-react-ui/pivotgrid)
52
54
 
53
- *Copyright © 2024 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved.*
55
+ _Copyright © 2024 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved._
54
56
 
55
- *Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries.*
57
+ _Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries._
@@ -11,28 +11,35 @@ import { ChipList as v } from "@progress/kendo-react-buttons";
11
11
  import { useCustomComponent as x, canUseRef as h } from "@progress/kendo-react-common";
12
12
  import { PivotGridConfiguratorEditorAxesContext as C } from "./EditorContext.mjs";
13
13
  import { PivotGridAxisEditor as P } from "./AxisEditor.mjs";
14
- const l = e.forwardRef((i, m) => {
15
- const {
16
- value: c,
17
- field: u
18
- } = { ...n, ...i }, r = e.useRef(null), o = e.useRef(null), s = e.useRef(null), [a, d] = x(i.chipList || n.chipList);
19
- e.useImperativeHandle(o, () => r.current && r.current.element), e.useImperativeHandle(s, () => ({ props: i, element: o.current })), e.useImperativeHandle(m, () => s.current);
20
- const p = c.filter((t) => t.name.length === 1 && t.name.every((f) => f.indexOf("&") === -1)).map((t) => ({ ...t, text: String(t.name) }));
21
- return /* @__PURE__ */ e.createElement(C.Provider, { value: { axes: u } }, /* @__PURE__ */ e.createElement(
22
- a,
23
- {
24
- ref: h(a) ? r : void 0,
25
- textField: "text",
26
- valueField: "name",
27
- data: p,
28
- chip: P,
29
- style: { position: "relative" },
30
- className: i.className,
31
- selection: "none",
32
- ...d
33
- }
34
- ));
35
- }), n = {
14
+ const l = e.forwardRef(
15
+ (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(
17
+ i.chipList || n.chipList
18
+ );
19
+ e.useImperativeHandle(
20
+ o,
21
+ () => r.current && r.current.element
22
+ ), e.useImperativeHandle(s, () => ({ props: i, element: o.current })), e.useImperativeHandle(
23
+ m,
24
+ () => s.current
25
+ );
26
+ 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(
28
+ a,
29
+ {
30
+ ref: h(a) ? r : void 0,
31
+ textField: "text",
32
+ valueField: "name",
33
+ data: p,
34
+ chip: P,
35
+ style: { position: "relative" },
36
+ className: i.className,
37
+ selection: "none",
38
+ ...d
39
+ }
40
+ ));
41
+ }
42
+ ), n = {
36
43
  value: [],
37
44
  chipList: v
38
45
  };
@@ -16,86 +16,112 @@ import { PivotGridConfiguratorEditorAxesContext as q } from "./EditorContext.mjs
16
16
  import { PivotGridAxisFilterFieldsEditor as J } from "./AxisFilterFieldsEditor.mjs";
17
17
  import { PivotGridConfiguratorEditorStateContext as L } from "../shared/PivotGridConfiguratorEditorStateContext.mjs";
18
18
  import { PIVOT_CONFIGURATOR_ACTION as a } from "../hooks/usePivotConfiguratorEditor.mjs";
19
- const T = r.forwardRef((t, P) => {
20
- const u = r.useRef(0), m = r.useRef(0), f = r.useRef(null), i = r.useRef(null), h = r.useRef(null), { axes: p } = r.useContext(q), [y, x] = r.useState(!1), [n, l] = r.useContext(L);
21
- r.useImperativeHandle(i, () => f.current && f.current.element), r.useImperativeHandle(h, () => ({ props: t, element: i.current })), r.useImperativeHandle(P, () => h.current);
22
- const [E, D] = c(t.chip || s.chip), [v, F] = c(t.dropClue || s.dropClue), [S, A] = c(t.columnMenuTextColumn || s.columnMenuTextColumn), [b, G] = c(t.filterFieldsEditor || s.filterFieldsEditor), I = M(n.filter, String(t.value), "in"), C = M(n.filter, String(t.value)), X = (e, o) => {
23
- l({ type: a.setSort, payload: o }, e);
24
- }, N = (e, o) => {
25
- o.length ? l({
26
- type: a.setFilter,
27
- payload: [
28
- ...I || [],
29
- ...o.reduce((d, g) => [
30
- ...d,
31
- ...g.filters.filter((_) => _.value)
32
- ], [])
33
- ]
34
- }, e) : l({ type: a.setFilter, payload: I }, e);
35
- }, O = (e) => {
36
- l({ type: a.remove, payload: t.dataItem }, e.syntheticEvent);
37
- }, Y = (e) => {
38
- const o = e.slice(), d = j(n.filter, String(t.dataItem.name), "in");
39
- return o.splice(1, 0, /* @__PURE__ */ r.createElement(
40
- b,
41
- {
42
- key: "axis-filter-fields-editor",
43
- defaultFilter: d,
44
- dataItem: t.dataItem,
45
- data: t.dataItem.fields,
46
- axes: p,
47
- ...G
19
+ const T = r.forwardRef(
20
+ (t, P) => {
21
+ const u = r.useRef(0), m = r.useRef(0), f = r.useRef(null), i = r.useRef(null), h = r.useRef(null), { axes: p } = r.useContext(q), [y, x] = r.useState(!1), [n, l] = r.useContext(L);
22
+ r.useImperativeHandle(
23
+ i,
24
+ () => f.current && f.current.element
25
+ ), r.useImperativeHandle(h, () => ({ props: t, element: i.current })), r.useImperativeHandle(
26
+ P,
27
+ () => h.current
28
+ );
29
+ const [E, D] = c(t.chip || s.chip), [v, F] = c(t.dropClue || s.dropClue), [S, A] = c(
30
+ t.columnMenuTextColumn || s.columnMenuTextColumn
31
+ ), [b, G] = c(
32
+ t.filterFieldsEditor || s.filterFieldsEditor
33
+ ), I = M(n.filter, String(t.value), "in"), C = M(n.filter, String(t.value)), X = (e, o) => {
34
+ l({ type: a.setSort, payload: o }, e);
35
+ }, N = (e, o) => {
36
+ o.length ? l(
37
+ {
38
+ type: a.setFilter,
39
+ payload: [
40
+ ...I || [],
41
+ ...o.reduce(
42
+ (d, g) => [...d, ...g.filters.filter((_) => _.value)],
43
+ []
44
+ )
45
+ ]
46
+ },
47
+ e
48
+ ) : l({ type: a.setFilter, payload: I }, e);
49
+ }, O = (e) => {
50
+ l({ type: a.remove, payload: t.dataItem }, e.syntheticEvent);
51
+ }, Y = (e) => {
52
+ const o = e.slice(), d = j(n.filter, String(t.dataItem.name), "in");
53
+ return o.splice(
54
+ 1,
55
+ 0,
56
+ /* @__PURE__ */ r.createElement(
57
+ b,
58
+ {
59
+ key: "axis-filter-fields-editor",
60
+ defaultFilter: d,
61
+ dataItem: t.dataItem,
62
+ data: t.dataItem.fields,
63
+ axes: p,
64
+ ...G
65
+ }
66
+ )
67
+ ), o;
68
+ }, H = (e) => {
69
+ u.current = e.clientX, m.current = e.clientY;
70
+ }, k = (e) => {
71
+ Math.abs(u.current - e.clientX) < 10 && Math.abs(m.current - e.clientY) < 10 || (i.current && (i.current.style.transform = `translate(${e.clientX - u.current}px, ${e.clientY - m.current}px)`), x(!0), l({ type: a.setDragItem, payload: t.dataItem }));
72
+ }, w = () => {
73
+ x(!1), n.dragItem && (i.current && (i.current.style.transform = ""), l({ type: a.drop, payload: t.dataItem }));
74
+ }, z = (e) => {
75
+ n.dragItem && (l(
76
+ { type: a.setDropTarget, payload: t.dataItem },
77
+ e.syntheticEvent
78
+ ), l(
79
+ { type: a.setDropZone, payload: p },
80
+ e.syntheticEvent
81
+ ));
82
+ }, U = (e) => {
83
+ if (n.dragItem && !y && i.current) {
84
+ const o = i.current.getBoundingClientRect(), g = e.syntheticEvent.clientX - o.left < o.width / 2 ? "before" : "after";
85
+ l(
86
+ { type: a.setDropDirection, payload: g },
87
+ e.syntheticEvent
88
+ );
48
89
  }
49
- )), o;
50
- }, H = (e) => {
51
- u.current = e.clientX, m.current = e.clientY;
52
- }, k = (e) => {
53
- Math.abs(u.current - e.clientX) < 10 && Math.abs(m.current - e.clientY) < 10 || (i.current && (i.current.style.transform = `translate(${e.clientX - u.current}px, ${e.clientY - m.current}px)`), x(!0), l({ type: a.setDragItem, payload: t.dataItem }));
54
- }, w = () => {
55
- x(!1), n.dragItem && (i.current && (i.current.style.transform = ""), l({ type: a.drop, payload: t.dataItem }));
56
- }, z = (e) => {
57
- n.dragItem && (l({ type: a.setDropTarget, payload: t.dataItem }, e.syntheticEvent), l({ type: a.setDropZone, payload: p }, e.syntheticEvent));
58
- }, U = (e) => {
59
- if (n.dragItem && !y && i.current) {
60
- const o = i.current.getBoundingClientRect(), g = e.syntheticEvent.clientX - o.left < o.width / 2 ? "before" : "after";
61
- l({ type: a.setDropDirection, payload: g }, e.syntheticEvent);
62
- }
63
- };
64
- return $(i, {
65
- onPress: H,
66
- onDrag: k,
67
- onRelease: w
68
- }), /* @__PURE__ */ r.createElement(r.Fragment, null, n.dropTarget && R(n.dropTarget, t.dataItem) && n.dropDirection === "before" && /* @__PURE__ */ r.createElement(v, { ...F }), /* @__PURE__ */ r.createElement(
69
- E,
70
- {
71
- ref: B(E) ? f : void 0,
72
- ...t,
73
- removable: !0,
74
- onRemove: O,
75
- onMouseEnter: z,
76
- onMouseMove: U,
77
- style: { pointerEvents: y ? "none" : void 0 },
78
- rounded: "full",
79
- ...D
80
- },
81
- t.text,
82
- p !== "measureAxes" && /* @__PURE__ */ r.createElement(
83
- S,
90
+ };
91
+ return $(i, {
92
+ onPress: H,
93
+ onDrag: k,
94
+ onRelease: w
95
+ }), /* @__PURE__ */ r.createElement(r.Fragment, null, n.dropTarget && R(n.dropTarget, t.dataItem) && n.dropDirection === "before" && /* @__PURE__ */ r.createElement(v, { ...F }), /* @__PURE__ */ r.createElement(
96
+ E,
84
97
  {
85
- field: String(t.value),
86
- itemsRender: Y,
87
- sort: n.sort,
88
- onSortChange: X,
89
- filter: C && C.length ? [{ logic: "and", filters: C }] : void 0,
90
- onFilterChange: N,
91
- filterContent: [
92
- K
93
- ],
94
- ...A
95
- }
96
- )
97
- ), n.dropTarget && R(n.dropTarget, t.dataItem) && n.dropDirection === "after" && /* @__PURE__ */ r.createElement(v, { ...F }));
98
- }), s = {
98
+ ref: B(E) ? f : void 0,
99
+ ...t,
100
+ removable: !0,
101
+ onRemove: O,
102
+ onMouseEnter: z,
103
+ onMouseMove: U,
104
+ style: { pointerEvents: y ? "none" : void 0 },
105
+ rounded: "full",
106
+ ...D
107
+ },
108
+ t.text,
109
+ p !== "measureAxes" && /* @__PURE__ */ r.createElement(
110
+ S,
111
+ {
112
+ field: String(t.value),
113
+ itemsRender: Y,
114
+ sort: n.sort,
115
+ onSortChange: X,
116
+ filter: C && C.length ? [{ logic: "and", filters: C }] : void 0,
117
+ onFilterChange: N,
118
+ filterContent: [K],
119
+ ...A
120
+ }
121
+ )
122
+ ), n.dropTarget && R(n.dropTarget, t.dataItem) && n.dropDirection === "after" && /* @__PURE__ */ r.createElement(v, { ...F }));
123
+ }
124
+ ), s = {
99
125
  chip: Z,
100
126
  columnMenuTextColumn: V,
101
127
  filterFieldsEditor: J,